diff options
Diffstat (limited to 'arch/mips/alchemy/devboards')
-rw-r--r-- | arch/mips/alchemy/devboards/db1x00/board_setup.c | 61 |
1 files changed, 33 insertions, 28 deletions
diff --git a/arch/mips/alchemy/devboards/db1x00/board_setup.c b/arch/mips/alchemy/devboards/db1x00/board_setup.c index 05f120ff90f9..5c956fe8760f 100644 --- a/arch/mips/alchemy/devboards/db1x00/board_setup.c +++ b/arch/mips/alchemy/devboards/db1x00/board_setup.c | |||
@@ -127,13 +127,10 @@ const char *get_system_type(void) | |||
127 | void __init board_setup(void) | 127 | void __init board_setup(void) |
128 | { | 128 | { |
129 | unsigned long bcsr1, bcsr2; | 129 | unsigned long bcsr1, bcsr2; |
130 | u32 pin_func; | ||
131 | 130 | ||
132 | bcsr1 = DB1000_BCSR_PHYS_ADDR; | 131 | bcsr1 = DB1000_BCSR_PHYS_ADDR; |
133 | bcsr2 = DB1000_BCSR_PHYS_ADDR + DB1000_BCSR_HEXLED_OFS; | 132 | bcsr2 = DB1000_BCSR_PHYS_ADDR + DB1000_BCSR_HEXLED_OFS; |
134 | 133 | ||
135 | pin_func = 0; | ||
136 | |||
137 | #ifdef CONFIG_MIPS_DB1000 | 134 | #ifdef CONFIG_MIPS_DB1000 |
138 | printk(KERN_INFO "AMD Alchemy Au1000/Db1000 Board\n"); | 135 | printk(KERN_INFO "AMD Alchemy Au1000/Db1000 Board\n"); |
139 | #endif | 136 | #endif |
@@ -164,12 +161,16 @@ void __init board_setup(void) | |||
164 | /* Not valid for Au1550 */ | 161 | /* Not valid for Au1550 */ |
165 | #if defined(CONFIG_IRDA) && \ | 162 | #if defined(CONFIG_IRDA) && \ |
166 | (defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100)) | 163 | (defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100)) |
167 | /* Set IRFIRSEL instead of GPIO15 */ | 164 | { |
168 | pin_func = au_readl(SYS_PINFUNC) | SYS_PF_IRF; | 165 | u32 pin_func; |
169 | au_writel(pin_func, SYS_PINFUNC); | 166 | |
170 | /* Power off until the driver is in use */ | 167 | /* Set IRFIRSEL instead of GPIO15 */ |
171 | bcsr_mod(BCSR_RESETS, BCSR_RESETS_IRDA_MODE_MASK, | 168 | pin_func = au_readl(SYS_PINFUNC) | SYS_PF_IRF; |
172 | BCSR_RESETS_IRDA_MODE_OFF); | 169 | au_writel(pin_func, SYS_PINFUNC); |
170 | /* Power off until the driver is in use */ | ||
171 | bcsr_mod(BCSR_RESETS, BCSR_RESETS_IRDA_MODE_MASK, | ||
172 | BCSR_RESETS_IRDA_MODE_OFF); | ||
173 | } | ||
173 | #endif | 174 | #endif |
174 | bcsr_write(BCSR_PCMCIA, 0); /* turn off PCMCIA power */ | 175 | bcsr_write(BCSR_PCMCIA, 0); /* turn off PCMCIA power */ |
175 | 176 | ||
@@ -177,31 +178,35 @@ void __init board_setup(void) | |||
177 | alchemy_gpio1_input_enable(); | 178 | alchemy_gpio1_input_enable(); |
178 | 179 | ||
179 | #ifdef CONFIG_MIPS_MIRAGE | 180 | #ifdef CONFIG_MIPS_MIRAGE |
180 | /* GPIO[20] is output */ | 181 | { |
181 | alchemy_gpio_direction_output(20, 0); | 182 | u32 pin_func; |
182 | 183 | ||
183 | /* Set GPIO[210:208] instead of SSI_0 */ | 184 | /* GPIO[20] is output */ |
184 | pin_func = au_readl(SYS_PINFUNC) | SYS_PF_S0; | 185 | alchemy_gpio_direction_output(20, 0); |
185 | 186 | ||
186 | /* Set GPIO[215:211] for LEDs */ | 187 | /* Set GPIO[210:208] instead of SSI_0 */ |
187 | pin_func |= 5 << 2; | 188 | pin_func = au_readl(SYS_PINFUNC) | SYS_PF_S0; |
188 | 189 | ||
189 | /* Set GPIO[214:213] for more LEDs */ | 190 | /* Set GPIO[215:211] for LEDs */ |
190 | pin_func |= 5 << 12; | 191 | pin_func |= 5 << 2; |
191 | 192 | ||
192 | /* Set GPIO[207:200] instead of PCMCIA/LCD */ | 193 | /* Set GPIO[214:213] for more LEDs */ |
193 | pin_func |= SYS_PF_LCD | SYS_PF_PC; | 194 | pin_func |= 5 << 12; |
194 | au_writel(pin_func, SYS_PINFUNC); | ||
195 | 195 | ||
196 | /* | 196 | /* Set GPIO[207:200] instead of PCMCIA/LCD */ |
197 | * Enable speaker amplifier. This should | 197 | pin_func |= SYS_PF_LCD | SYS_PF_PC; |
198 | * be part of the audio driver. | 198 | au_writel(pin_func, SYS_PINFUNC); |
199 | */ | ||
200 | alchemy_gpio_direction_output(209, 1); | ||
201 | 199 | ||
202 | pm_power_off = mirage_power_off; | 200 | /* |
203 | _machine_halt = mirage_power_off; | 201 | * Enable speaker amplifier. This should |
204 | _machine_restart = (void(*)(char *))mips_softreset; | 202 | * be part of the audio driver. |
203 | */ | ||
204 | alchemy_gpio_direction_output(209, 1); | ||
205 | |||
206 | pm_power_off = mirage_power_off; | ||
207 | _machine_halt = mirage_power_off; | ||
208 | _machine_restart = (void(*)(char *))mips_softreset; | ||
209 | } | ||
205 | #endif | 210 | #endif |
206 | 211 | ||
207 | #ifdef CONFIG_MIPS_BOSPORUS | 212 | #ifdef CONFIG_MIPS_BOSPORUS |