aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/au1000/pb1200/board_setup.c
diff options
context:
space:
mode:
authorPete Popov <ppopov@embeddedalley.com>2005-09-14 12:17:59 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:32:20 -0400
commit64abf64d10b3a547becefeb26394dfbefac273fb (patch)
tree2960d858aa3490548385f77fbd460c6dc60e1e5b /arch/mips/au1000/pb1200/board_setup.c
parent4f94afa258c3e574a8d985160e87146a5183944b (diff)
Misc au1200 updates.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/au1000/pb1200/board_setup.c')
-rw-r--r--arch/mips/au1000/pb1200/board_setup.c74
1 files changed, 42 insertions, 32 deletions
diff --git a/arch/mips/au1000/pb1200/board_setup.c b/arch/mips/au1000/pb1200/board_setup.c
index 9c5d48dd7121..a45b17538ac9 100644
--- a/arch/mips/au1000/pb1200/board_setup.c
+++ b/arch/mips/au1000/pb1200/board_setup.c
@@ -58,22 +58,10 @@
58extern void _board_init_irq(void); 58extern void _board_init_irq(void);
59extern void (*board_init_irq)(void); 59extern void (*board_init_irq)(void);
60 60
61#ifdef CONFIG_BLK_DEV_IDE_AU1XXX
62extern u32 au1xxx_ide_virtbase;
63extern u64 au1xxx_ide_physbase;
64extern int au1xxx_ide_irq;
65
66u32 led_base_addr;
67/* Ddma */
68chan_tab_t *ide_read_ch, *ide_write_ch;
69u32 au1xxx_ide_ddma_enable = 0, switch4ddma = 1; // PIO+ddma
70
71dbdev_tab_t new_dbdev_tab_element = { DSCR_CMD0_THROTTLE, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 };
72#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX */
73
74void board_reset (void) 61void board_reset (void)
75{ 62{
76 bcsr->resets = 0; 63 bcsr->resets = 0;
64 bcsr->system = 0;
77} 65}
78 66
79void __init board_setup(void) 67void __init board_setup(void)
@@ -94,7 +82,7 @@ void __init board_setup(void)
94 au_sync(); 82 au_sync();
95#endif 83#endif
96 84
97#if defined( CONFIG_I2C_ALGO_AU1550 ) 85#if defined(CONFIG_I2C_AU1550)
98 { 86 {
99 u32 freq0, clksrc; 87 u32 freq0, clksrc;
100 88
@@ -134,35 +122,24 @@ void __init board_setup(void)
134#ifdef CONFIG_FB_AU1200 122#ifdef CONFIG_FB_AU1200
135 argptr = prom_getcmdline(); 123 argptr = prom_getcmdline();
136#ifdef CONFIG_MIPS_PB1200 124#ifdef CONFIG_MIPS_PB1200
137 strcat(argptr, " video=au1200fb:panel:s11"); 125 strcat(argptr, " video=au1200fb:panel:bs");
138#endif 126#endif
139#ifdef CONFIG_MIPS_DB1200 127#ifdef CONFIG_MIPS_DB1200
140 strcat(argptr, " video=au1200fb:panel:s7"); 128 strcat(argptr, " video=au1200fb:panel:bs");
141#endif 129#endif
142#endif 130#endif
143 131
144#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
145 /*
146 * Iniz IDE parameters
147 */
148 au1xxx_ide_irq = PB1200_IDE_INT;
149 au1xxx_ide_physbase = AU1XXX_ATA_PHYS_ADDR;
150 au1xxx_ide_virtbase = KSEG1ADDR(AU1XXX_ATA_PHYS_ADDR);
151 /*
152 * change PIO or PIO+Ddma
153 * check the GPIO-5 pin condition. pb1200:s18_dot */
154 switch4ddma = (au_readl(SYS_PINSTATERD) & (1 << 5)) ? 1 : 0;
155#endif
156
157 /* The Pb1200 development board uses external MUX for PSC0 to 132 /* The Pb1200 development board uses external MUX for PSC0 to
158 support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI 133 support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI
159 */ 134 */
160#if defined(CONFIG_AU1550_PSC_SPI) && defined(CONFIG_I2C_ALGO_AU1550) 135#if defined(CONFIG_AU1XXX_PSC_SPI) && defined(CONFIG_I2C_AU1550)
161 #error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\ 136 #error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\
162 Refer to Pb1200/Db1200 documentation. 137 Refer to Pb1200/Db1200 documentation.
163#elif defined( CONFIG_AU1550_PSC_SPI ) 138#elif defined( CONFIG_AU1XXX_PSC_SPI )
164 bcsr->resets |= BCSR_RESETS_PCS0MUX; 139 bcsr->resets |= BCSR_RESETS_PCS0MUX;
165#elif defined( CONFIG_I2C_ALGO_AU1550 ) 140 /*Hard Coding Value to enable Temp Sensors [bit 14] Value for SOC Au1200. Pls refer documentation*/
141 bcsr->resets =0x900f;
142#elif defined( CONFIG_I2C_AU1550 )
166 bcsr->resets &= (~BCSR_RESETS_PCS0MUX); 143 bcsr->resets &= (~BCSR_RESETS_PCS0MUX);
167#endif 144#endif
168 au_sync(); 145 au_sync();
@@ -181,3 +158,36 @@ void __init board_setup(void)
181 board_init_irq = _board_init_irq; 158 board_init_irq = _board_init_irq;
182 } 159 }
183} 160}
161
162int
163board_au1200fb_panel (void)
164{
165 BCSR *bcsr = (BCSR *)BCSR_KSEG1_ADDR;
166 int p;
167
168 p = bcsr->switches;
169 p >>= 8;
170 p &= 0x0F;
171 return p;
172}
173
174int
175board_au1200fb_panel_init (void)
176{
177 /* Apply power */
178 BCSR *bcsr = (BCSR *)BCSR_KSEG1_ADDR;
179 bcsr->board |= (BCSR_BOARD_LCDVEE | BCSR_BOARD_LCDVDD | BCSR_BOARD_LCDBL);
180 /*printk("board_au1200fb_panel_init()\n"); */
181 return 0;
182}
183
184int
185board_au1200fb_panel_shutdown (void)
186{
187 /* Remove power */
188 BCSR *bcsr = (BCSR *)BCSR_KSEG1_ADDR;
189 bcsr->board &= ~(BCSR_BOARD_LCDVEE | BCSR_BOARD_LCDVDD | BCSR_BOARD_LCDBL);
190 /*printk("board_au1200fb_panel_shutdown()\n"); */
191 return 0;
192}
193