[MIPS] Pb1550 code style cleanup
Fix a few errors and warnings given by checkpatch.pl: - macros with complex values not enclosed in parentheses; - printk() without KERN_* facility level; - unnecessary braces for single-statement block; - using simple_strtol() where strict_strtol() could be used. In addition to these changes, also do the following: - replace numeric literals with the matching macros; - properly indent the code and the array initializers; - insert spaces between operator and its operands, also remove excess spaces there; - remove space after the type cast's closing parenthesis; - insert missing space before closing brace in the array initializers; - replace spaces after the macro name with tabs in the #define directives, also sometimes insert space there for better looks; - remove excess tabs after the macro name in the #define directives; - fix typos/errors, capitalize acronyms, etc. in the comments; - make the multi-line comment style consistent with the kernel style elsewhere by adding empty first line; - update MontaVista copyright; - remove Pete Popov's old email address... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
committed by
Ralf Baechle
parent
2091a17ff7
commit
6afabe6c93
@@ -1,9 +1,8 @@
|
||||
#
|
||||
# Copyright 2000 MontaVista Software Inc.
|
||||
# Author: MontaVista Software, Inc.
|
||||
# ppopov@mvista.com or source@mvista.com
|
||||
# Copyright 2000, 2008 MontaVista Software Inc.
|
||||
# Author: MontaVista Software, Inc. <source@mvista.com>
|
||||
#
|
||||
# Makefile for the Alchemy Semiconductor PB1000 board.
|
||||
# Makefile for the Alchemy Semiconductor Pb1550 board.
|
||||
#
|
||||
|
||||
lib-y := init.o board_setup.o irqmap.o
|
||||
|
@@ -3,9 +3,8 @@
|
||||
* BRIEF MODULE DESCRIPTION
|
||||
* Alchemy Pb1550 board setup.
|
||||
*
|
||||
* Copyright 2000 MontaVista Software Inc.
|
||||
* Author: MontaVista Software, Inc.
|
||||
* ppopov@mvista.com or source@mvista.com
|
||||
* Copyright 2000, 2008 MontaVista Software Inc.
|
||||
* Author: MontaVista Software, Inc. <source@mvista.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -35,15 +34,16 @@
|
||||
|
||||
void board_reset(void)
|
||||
{
|
||||
/* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
|
||||
au_writew(au_readw(0xAF00001C) & ~(1<<15), 0xAF00001C);
|
||||
/* Hit BCSR.SYSTEM[RESET] */
|
||||
au_writew(au_readw(0xAF00001C) & ~BCSR_SYSTEM_RESET, 0xAF00001C);
|
||||
}
|
||||
|
||||
void __init board_setup(void)
|
||||
{
|
||||
u32 pin_func;
|
||||
|
||||
/* Enable PSC1 SYNC for AC97. Normaly done in audio driver,
|
||||
/*
|
||||
* Enable PSC1 SYNC for AC'97. Normaly done in audio driver,
|
||||
* but it is board specific code, so put it here.
|
||||
*/
|
||||
pin_func = au_readl(SYS_PINFUNC);
|
||||
@@ -51,8 +51,8 @@ void __init board_setup(void)
|
||||
pin_func |= SYS_PF_MUST_BE_SET | SYS_PF_PSC1_S1;
|
||||
au_writel(pin_func, SYS_PINFUNC);
|
||||
|
||||
au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */
|
||||
au_writel(0, (u32)bcsr | 0x10); /* turn off PCMCIA power */
|
||||
au_sync();
|
||||
|
||||
printk("AMD Alchemy Pb1550 Board\n");
|
||||
printk(KERN_INFO "AMD Alchemy Pb1550 Board\n");
|
||||
}
|
||||
|
@@ -1,11 +1,10 @@
|
||||
/*
|
||||
*
|
||||
* BRIEF MODULE DESCRIPTION
|
||||
* PB1550 board setup
|
||||
* Pb1550 board setup
|
||||
*
|
||||
* Copyright 2001 MontaVista Software Inc.
|
||||
* Author: MontaVista Software, Inc.
|
||||
* ppopov@mvista.com or source@mvista.com
|
||||
* Copyright 2001, 2008 MontaVista Software Inc.
|
||||
* Author: MontaVista Software, Inc. <source@mvista.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -51,10 +50,9 @@ void __init prom_init(void)
|
||||
|
||||
prom_init_cmdline();
|
||||
memsize_str = prom_getenv("memsize");
|
||||
if (!memsize_str) {
|
||||
if (!memsize_str)
|
||||
memsize = 0x08000000;
|
||||
} else {
|
||||
memsize = simple_strtol(memsize_str, NULL, 0);
|
||||
}
|
||||
else
|
||||
memsize = strict_strtol(memsize_str, 0, NULL);
|
||||
add_memory_region(0, memsize, BOOT_MEM_RAM);
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* BRIEF MODULE DESCRIPTION
|
||||
* Au1xxx irq map table
|
||||
* Au1xx0 IRQ map table
|
||||
*
|
||||
* Copyright 2003 Embedded Edge, LLC
|
||||
* dan@embeddededge.com
|
||||
|
@@ -144,7 +144,8 @@ static BCSR * const bcsr = (BCSR *)BCSR_PHYS_ADDR;
|
||||
#define PB1550_USER_ONLY
|
||||
#endif
|
||||
|
||||
/* Timing values as described in databook, * ns value stripped of
|
||||
/*
|
||||
* Timing values as described in databook, * ns value stripped of
|
||||
* lower 2 bits.
|
||||
* These defines are here rather than an SOC1550 generic file because
|
||||
* the parts chosen on another board may be different and may require
|
||||
@@ -161,14 +162,14 @@ static BCSR * const bcsr = (BCSR *)BCSR_PHYS_ADDR;
|
||||
#define NAND_T_SU_SHIFT 8
|
||||
#define NAND_T_WH_SHIFT 12
|
||||
|
||||
#define NAND_TIMING ((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \
|
||||
#define NAND_TIMING (((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \
|
||||
((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \
|
||||
((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \
|
||||
((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)
|
||||
((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT))
|
||||
|
||||
#define NAND_CS 1
|
||||
|
||||
/* should be done by yamon */
|
||||
/* Should be done by YAMON */
|
||||
#define NAND_STCFG 0x00400005 /* 8-bit NAND */
|
||||
#define NAND_STTIME 0x00007774 /* valid for 396 MHz SD=2 only */
|
||||
#define NAND_STADDR 0x12000FFF /* physical address 0x20000000 */
|
||||
|
Reference in New Issue
Block a user