aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/au1000/xxs1500/board_setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/au1000/xxs1500/board_setup.c')
-rw-r--r--arch/mips/au1000/xxs1500/board_setup.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/arch/mips/au1000/xxs1500/board_setup.c b/arch/mips/au1000/xxs1500/board_setup.c
index 79d1798621bf..4c587acac5c3 100644
--- a/arch/mips/au1000/xxs1500/board_setup.c
+++ b/arch/mips/au1000/xxs1500/board_setup.c
@@ -1,7 +1,6 @@
1/* 1/*
2 * Copyright 2000-2003 MontaVista Software Inc. 2 * Copyright 2000-2003, 2008 MontaVista Software Inc.
3 * Author: MontaVista Software, Inc. 3 * Author: MontaVista Software, Inc. <source@mvista.com>
4 * ppopov@mvista.com or source@mvista.com
5 * 4 *
6 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the 6 * under the terms of the GNU General Public License as published by the
@@ -39,40 +38,40 @@ void __init board_setup(void)
39{ 38{
40 u32 pin_func; 39 u32 pin_func;
41 40
42 // set multiple use pins (UART3/GPIO) to UART (it's used as UART too) 41 /* Set multiple use pins (UART3/GPIO) to UART (it's used as UART too) */
43 pin_func = au_readl(SYS_PINFUNC) & (u32)(~SYS_PF_UR3); 42 pin_func = au_readl(SYS_PINFUNC) & ~SYS_PF_UR3;
44 pin_func |= SYS_PF_UR3; 43 pin_func |= SYS_PF_UR3;
45 au_writel(pin_func, SYS_PINFUNC); 44 au_writel(pin_func, SYS_PINFUNC);
46 45
47 // enable UART 46 /* Enable UART */
48 au_writel(0x01, UART3_ADDR+UART_MOD_CNTRL); // clock enable (CE) 47 au_writel(0x01, UART3_ADDR + UART_MOD_CNTRL); /* clock enable (CE) */
49 mdelay(10); 48 mdelay(10);
50 au_writel(0x03, UART3_ADDR+UART_MOD_CNTRL); // CE and "enable" 49 au_writel(0x03, UART3_ADDR + UART_MOD_CNTRL); /* CE and "enable" */
51 mdelay(10); 50 mdelay(10);
52 51
53 // enable DTR = USB power up 52 /* Enable DTR = USB power up */
54 au_writel(0x01, UART3_ADDR+UART_MCR); //? UART_MCR_DTR is 0x01??? 53 au_writel(0x01, UART3_ADDR + UART_MCR); /* UART_MCR_DTR is 0x01??? */
55 54
56#ifdef CONFIG_PCMCIA_XXS1500 55#ifdef CONFIG_PCMCIA_XXS1500
57 /* setup pcmcia signals */ 56 /* Setup PCMCIA signals */
58 au_writel(0, SYS_PININPUTEN); 57 au_writel(0, SYS_PININPUTEN);
59 58
60 /* gpio 0, 1, and 4 are inputs */ 59 /* GPIO 0, 1, and 4 are inputs */
61 au_writel(1 | (1<<1) | (1<<4), SYS_TRIOUTCLR); 60 au_writel(1 | (1 << 1) | (1 << 4), SYS_TRIOUTCLR);
62 61
63 /* enable GPIO2 if not already enabled */ 62 /* Enable GPIO2 if not already enabled */
64 au_writel(1, GPIO2_ENABLE); 63 au_writel(1, GPIO2_ENABLE);
65 /* gpio2 208/9/10/11 are inputs */ 64 /* GPIO2 208/9/10/11 are inputs */
66 au_writel((1<<8) | (1<<9) | (1<<10) | (1<<11), GPIO2_DIR); 65 au_writel((1 << 8) | (1 << 9) | (1 << 10) | (1 << 11), GPIO2_DIR);
67 66
68 /* turn off power */ 67 /* Turn off power */
69 au_writel((au_readl(GPIO2_PINSTATE) & ~(1<<14))|(1<<30), GPIO2_OUTPUT); 68 au_writel((au_readl(GPIO2_PINSTATE) & ~(1 << 14)) | (1 << 30),
69 GPIO2_OUTPUT);
70#endif 70#endif
71 71
72
73#ifdef CONFIG_PCI 72#ifdef CONFIG_PCI
74#if defined(__MIPSEB__) 73#if defined(__MIPSEB__)
75 au_writel(0xf | (2<<6) | (1<<4), Au1500_PCI_CFG); 74 au_writel(0xf | (2 << 6) | (1 << 4), Au1500_PCI_CFG);
76#else 75#else
77 au_writel(0xf, Au1500_PCI_CFG); 76 au_writel(0xf, Au1500_PCI_CFG);
78#endif 77#endif