diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2008-04-30 15:28:17 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-05-12 11:46:55 -0400 |
commit | 6afabe6c9335c0534224b53c3db4b091621af2dd (patch) | |
tree | 886cd102533a3a63b6185ee1eb4b74c47092855b /include/asm-mips/mach-pb1x00 | |
parent | 2091a17ff7f32432976d1eacbb79a06819d95301 (diff) |
[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>
Diffstat (limited to 'include/asm-mips/mach-pb1x00')
-rw-r--r-- | include/asm-mips/mach-pb1x00/pb1550.h | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/include/asm-mips/mach-pb1x00/pb1550.h b/include/asm-mips/mach-pb1x00/pb1550.h index c2ab0e2df4ae..6704a11497db 100644 --- a/include/asm-mips/mach-pb1x00/pb1550.h +++ b/include/asm-mips/mach-pb1x00/pb1550.h | |||
@@ -30,15 +30,15 @@ | |||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <asm/mach-au1x00/au1xxx_psc.h> | 31 | #include <asm/mach-au1x00/au1xxx_psc.h> |
32 | 32 | ||
33 | #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX | 33 | #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX |
34 | #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX | 34 | #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX |
35 | #define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC3_TX | 35 | #define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC3_TX |
36 | #define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC3_RX | 36 | #define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC3_RX |
37 | 37 | ||
38 | #define SPI_PSC_BASE PSC0_BASE_ADDR | 38 | #define SPI_PSC_BASE PSC0_BASE_ADDR |
39 | #define AC97_PSC_BASE PSC1_BASE_ADDR | 39 | #define AC97_PSC_BASE PSC1_BASE_ADDR |
40 | #define SMBUS_PSC_BASE PSC2_BASE_ADDR | 40 | #define SMBUS_PSC_BASE PSC2_BASE_ADDR |
41 | #define I2S_PSC_BASE PSC3_BASE_ADDR | 41 | #define I2S_PSC_BASE PSC3_BASE_ADDR |
42 | 42 | ||
43 | #define BCSR_PHYS_ADDR 0xAF000000 | 43 | #define BCSR_PHYS_ADDR 0xAF000000 |
44 | 44 | ||
@@ -129,12 +129,12 @@ static BCSR * const bcsr = (BCSR *)BCSR_PHYS_ADDR; | |||
129 | #define BCSR_SYSTEM_POWEROFF 0x4000 | 129 | #define BCSR_SYSTEM_POWEROFF 0x4000 |
130 | #define BCSR_SYSTEM_RESET 0x8000 | 130 | #define BCSR_SYSTEM_RESET 0x8000 |
131 | 131 | ||
132 | #define PCMCIA_MAX_SOCK 1 | 132 | #define PCMCIA_MAX_SOCK 1 |
133 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1) | 133 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK + 1) |
134 | 134 | ||
135 | /* VPP/VCC */ | 135 | /* VPP/VCC */ |
136 | #define SET_VCC_VPP(VCC, VPP, SLOT)\ | 136 | #define SET_VCC_VPP(VCC, VPP, SLOT) \ |
137 | ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8)) | 137 | ((((VCC) << 2) | ((VPP) << 0)) << ((SLOT) * 8)) |
138 | 138 | ||
139 | #if defined(CONFIG_MTD_PB1550_BOOT) && defined(CONFIG_MTD_PB1550_USER) | 139 | #if defined(CONFIG_MTD_PB1550_BOOT) && defined(CONFIG_MTD_PB1550_USER) |
140 | #define PB1550_BOTH_BANKS | 140 | #define PB1550_BOTH_BANKS |
@@ -144,16 +144,17 @@ static BCSR * const bcsr = (BCSR *)BCSR_PHYS_ADDR; | |||
144 | #define PB1550_USER_ONLY | 144 | #define PB1550_USER_ONLY |
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | /* Timing values as described in databook, * ns value stripped of | 147 | /* |
148 | * Timing values as described in databook, * ns value stripped of | ||
148 | * lower 2 bits. | 149 | * lower 2 bits. |
149 | * These defines are here rather than an SOC1550 generic file because | 150 | * These defines are here rather than an SOC1550 generic file because |
150 | * the parts chosen on another board may be different and may require | 151 | * the parts chosen on another board may be different and may require |
151 | * different timings. | 152 | * different timings. |
152 | */ | 153 | */ |
153 | #define NAND_T_H (18 >> 2) | 154 | #define NAND_T_H (18 >> 2) |
154 | #define NAND_T_PUL (30 >> 2) | 155 | #define NAND_T_PUL (30 >> 2) |
155 | #define NAND_T_SU (30 >> 2) | 156 | #define NAND_T_SU (30 >> 2) |
156 | #define NAND_T_WH (30 >> 2) | 157 | #define NAND_T_WH (30 >> 2) |
157 | 158 | ||
158 | /* Bitfield shift amounts */ | 159 | /* Bitfield shift amounts */ |
159 | #define NAND_T_H_SHIFT 0 | 160 | #define NAND_T_H_SHIFT 0 |
@@ -161,16 +162,16 @@ static BCSR * const bcsr = (BCSR *)BCSR_PHYS_ADDR; | |||
161 | #define NAND_T_SU_SHIFT 8 | 162 | #define NAND_T_SU_SHIFT 8 |
162 | #define NAND_T_WH_SHIFT 12 | 163 | #define NAND_T_WH_SHIFT 12 |
163 | 164 | ||
164 | #define NAND_TIMING ((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \ | 165 | #define NAND_TIMING (((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \ |
165 | ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \ | 166 | ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \ |
166 | ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \ | 167 | ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \ |
167 | ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT) | 168 | ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)) |
168 | 169 | ||
169 | #define NAND_CS 1 | 170 | #define NAND_CS 1 |
170 | 171 | ||
171 | /* should be done by yamon */ | 172 | /* Should be done by YAMON */ |
172 | #define NAND_STCFG 0x00400005 /* 8-bit NAND */ | 173 | #define NAND_STCFG 0x00400005 /* 8-bit NAND */ |
173 | #define NAND_STTIME 0x00007774 /* valid for 396MHz SD=2 only */ | 174 | #define NAND_STTIME 0x00007774 /* valid for 396 MHz SD=2 only */ |
174 | #define NAND_STADDR 0x12000FFF /* physical address 0x20000000 */ | 175 | #define NAND_STADDR 0x12000FFF /* physical address 0x20000000 */ |
175 | 176 | ||
176 | #endif /* __ASM_PB1550_H */ | 177 | #endif /* __ASM_PB1550_H */ |