[MIPS] PB1100: Fix pile of warnings
CC arch/mips/au1000/pb1100/board_setup.o arch/mips/au1000/pb1100/board_setup.c: In function ‘board_setup’: arch/mips/au1000/pb1100/board_setup.c:104: warning: passing argument 1 of ‘readb’ makes pointer from integer without a cast arch/mips/au1000/pb1100/board_setup.c:105: warning: passing argument 1 of ‘readb’ makes pointer from integer without a cast arch/mips/au1000/pb1100/board_setup.c:105: warning: passing argument 2 of ‘writeb’ makes pointer from integer without a cast arch/mips/au1000/pb1100/board_setup.c:109: warning: passing argument 1 of ‘readb’ makes pointer from integer without a cast arch/mips/au1000/pb1100/board_setup.c:110: warning: passing argument 1 of ‘readb’ makes pointer from integer without a cast arch/mips/au1000/pb1100/board_setup.c:110: warning: passing argument 2 of ‘writeb’ makes pointer from integer without a cast arch/mips/au1000/pb1100/board_setup.c:51: warning: unused variable ‘sys_clksrc’ arch/mips/au1000/pb1100/board_setup.c:51: warning: unused variable ‘sys_freqctrl’ arch/mips/au1000/pb1100/board_setup.c:50: warning: unused variable ‘pin_func’ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
@@ -47,8 +47,7 @@ void board_reset (void)
|
|||||||
|
|
||||||
void __init board_setup(void)
|
void __init board_setup(void)
|
||||||
{
|
{
|
||||||
u32 pin_func;
|
volatile void __iomem * base = (volatile void __iomem *) 0xac000000UL;
|
||||||
u32 sys_freqctrl, sys_clksrc;
|
|
||||||
|
|
||||||
// set AUX clock to 12MHz * 8 = 96 MHz
|
// set AUX clock to 12MHz * 8 = 96 MHz
|
||||||
au_writel(8, SYS_AUXPLL);
|
au_writel(8, SYS_AUXPLL);
|
||||||
@@ -56,6 +55,9 @@ void __init board_setup(void)
|
|||||||
udelay(100);
|
udelay(100);
|
||||||
|
|
||||||
#ifdef CONFIG_USB_OHCI
|
#ifdef CONFIG_USB_OHCI
|
||||||
|
{
|
||||||
|
u32 pin_func, sys_freqctrl, sys_clksrc;
|
||||||
|
|
||||||
// configure pins GPIO[14:9] as GPIO
|
// configure pins GPIO[14:9] as GPIO
|
||||||
pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x80);
|
pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x80);
|
||||||
|
|
||||||
@@ -95,19 +97,20 @@ void __init board_setup(void)
|
|||||||
// 2nd USB port is USB host
|
// 2nd USB port is USB host
|
||||||
pin_func |= 0x8000;
|
pin_func |= 0x8000;
|
||||||
au_writel(pin_func, SYS_PINFUNC);
|
au_writel(pin_func, SYS_PINFUNC);
|
||||||
|
}
|
||||||
#endif // defined (CONFIG_USB_OHCI)
|
#endif // defined (CONFIG_USB_OHCI)
|
||||||
|
|
||||||
/* Enable sys bus clock divider when IDLE state or no bus activity. */
|
/* Enable sys bus clock divider when IDLE state or no bus activity. */
|
||||||
au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
|
au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
|
||||||
|
|
||||||
// Enable the RTC if not already enabled
|
// Enable the RTC if not already enabled
|
||||||
if (!(readb(0xac000028) & 0x20)) {
|
if (!(readb(base + 0x28) & 0x20)) {
|
||||||
writeb(readb(0xac000028) | 0x20, 0xac000028);
|
writeb(readb(base + 0x28) | 0x20, base + 0x28);
|
||||||
au_sync();
|
au_sync();
|
||||||
}
|
}
|
||||||
// Put the clock in BCD mode
|
// Put the clock in BCD mode
|
||||||
if (readb(0xac00002C) & 0x4) { /* reg B */
|
if (readb(base + 0x2C) & 0x4) { /* reg B */
|
||||||
writeb(readb(0xac00002c) & ~0x4, 0xac00002c);
|
writeb(readb(base + 0x2c) & ~0x4, base + 0x2c);
|
||||||
au_sync();
|
au_sync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user