Commit 403fbdff authored by Ralf Baechle's avatar Ralf Baechle

MIPS: Alchemy: Fix GCC 4.6.0 build error.

  CC      arch/mips/alchemy/devboards/db1x00/board_setup.o
arch/mips/alchemy/devboards/db1x00/board_setup.c: In function 'board_setup':
arch/mips/alchemy/devboards/db1x00/board_setup.c:130:6: error: variable 'pin_func' set but not used [-Werror=unused-but-set-variable]
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 8bdd5142
...@@ -127,13 +127,10 @@ const char *get_system_type(void) ...@@ -127,13 +127,10 @@ const char *get_system_type(void)
void __init board_setup(void) void __init board_setup(void)
{ {
unsigned long bcsr1, bcsr2; unsigned long bcsr1, bcsr2;
u32 pin_func;
bcsr1 = DB1000_BCSR_PHYS_ADDR; bcsr1 = DB1000_BCSR_PHYS_ADDR;
bcsr2 = DB1000_BCSR_PHYS_ADDR + DB1000_BCSR_HEXLED_OFS; bcsr2 = DB1000_BCSR_PHYS_ADDR + DB1000_BCSR_HEXLED_OFS;
pin_func = 0;
#ifdef CONFIG_MIPS_DB1000 #ifdef CONFIG_MIPS_DB1000
printk(KERN_INFO "AMD Alchemy Au1000/Db1000 Board\n"); printk(KERN_INFO "AMD Alchemy Au1000/Db1000 Board\n");
#endif #endif
...@@ -164,12 +161,16 @@ void __init board_setup(void) ...@@ -164,12 +161,16 @@ void __init board_setup(void)
/* Not valid for Au1550 */ /* Not valid for Au1550 */
#if defined(CONFIG_IRDA) && \ #if defined(CONFIG_IRDA) && \
(defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100)) (defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100))
/* Set IRFIRSEL instead of GPIO15 */ {
pin_func = au_readl(SYS_PINFUNC) | SYS_PF_IRF; u32 pin_func;
au_writel(pin_func, SYS_PINFUNC);
/* Power off until the driver is in use */ /* Set IRFIRSEL instead of GPIO15 */
bcsr_mod(BCSR_RESETS, BCSR_RESETS_IRDA_MODE_MASK, pin_func = au_readl(SYS_PINFUNC) | SYS_PF_IRF;
BCSR_RESETS_IRDA_MODE_OFF); au_writel(pin_func, SYS_PINFUNC);
/* Power off until the driver is in use */
bcsr_mod(BCSR_RESETS, BCSR_RESETS_IRDA_MODE_MASK,
BCSR_RESETS_IRDA_MODE_OFF);
}
#endif #endif
bcsr_write(BCSR_PCMCIA, 0); /* turn off PCMCIA power */ bcsr_write(BCSR_PCMCIA, 0); /* turn off PCMCIA power */
...@@ -177,31 +178,35 @@ void __init board_setup(void) ...@@ -177,31 +178,35 @@ void __init board_setup(void)
alchemy_gpio1_input_enable(); alchemy_gpio1_input_enable();
#ifdef CONFIG_MIPS_MIRAGE #ifdef CONFIG_MIPS_MIRAGE
/* GPIO[20] is output */ {
alchemy_gpio_direction_output(20, 0); u32 pin_func;
/* Set GPIO[210:208] instead of SSI_0 */ /* GPIO[20] is output */
pin_func = au_readl(SYS_PINFUNC) | SYS_PF_S0; alchemy_gpio_direction_output(20, 0);
/* Set GPIO[215:211] for LEDs */ /* Set GPIO[210:208] instead of SSI_0 */
pin_func |= 5 << 2; pin_func = au_readl(SYS_PINFUNC) | SYS_PF_S0;
/* Set GPIO[214:213] for more LEDs */ /* Set GPIO[215:211] for LEDs */
pin_func |= 5 << 12; pin_func |= 5 << 2;
/* Set GPIO[207:200] instead of PCMCIA/LCD */ /* Set GPIO[214:213] for more LEDs */
pin_func |= SYS_PF_LCD | SYS_PF_PC; pin_func |= 5 << 12;
au_writel(pin_func, SYS_PINFUNC);
/* /* Set GPIO[207:200] instead of PCMCIA/LCD */
* Enable speaker amplifier. This should pin_func |= SYS_PF_LCD | SYS_PF_PC;
* be part of the audio driver. au_writel(pin_func, SYS_PINFUNC);
*/
alchemy_gpio_direction_output(209, 1);
pm_power_off = mirage_power_off; /*
_machine_halt = mirage_power_off; * Enable speaker amplifier. This should
_machine_restart = (void(*)(char *))mips_softreset; * be part of the audio driver.
*/
alchemy_gpio_direction_output(209, 1);
pm_power_off = mirage_power_off;
_machine_halt = mirage_power_off;
_machine_restart = (void(*)(char *))mips_softreset;
}
#endif #endif
#ifdef CONFIG_MIPS_BOSPORUS #ifdef CONFIG_MIPS_BOSPORUS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment