aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-voiceblue.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1/board-voiceblue.c')
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c107
1 files changed, 60 insertions, 47 deletions
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 815a69ce821d..bdc0ac8dc21f 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -26,10 +26,12 @@
26#include <linux/smc91x.h> 26#include <linux/smc91x.h>
27 27
28#include <mach/hardware.h> 28#include <mach/hardware.h>
29#include <mach/system.h>
29#include <asm/mach-types.h> 30#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 32#include <asm/mach/map.h>
32 33
34#include <plat/board-voiceblue.h>
33#include <plat/common.h> 35#include <plat/common.h>
34#include <mach/gpio.h> 36#include <mach/gpio.h>
35#include <plat/flash.h> 37#include <plat/flash.h>
@@ -163,52 +165,6 @@ static void __init voiceblue_init_irq(void)
163 omap_init_irq(); 165 omap_init_irq();
164} 166}
165 167
166static void __init voiceblue_init(void)
167{
168 /* mux pins for uarts */
169 omap_cfg_reg(UART1_TX);
170 omap_cfg_reg(UART1_RTS);
171 omap_cfg_reg(UART2_TX);
172 omap_cfg_reg(UART2_RTS);
173 omap_cfg_reg(UART3_TX);
174 omap_cfg_reg(UART3_RX);
175
176 /* Watchdog */
177 gpio_request(0, "Watchdog");
178 /* smc91x reset */
179 gpio_request(7, "SMC91x reset");
180 gpio_direction_output(7, 1);
181 udelay(2); /* wait at least 100ns */
182 gpio_set_value(7, 0);
183 mdelay(50); /* 50ms until PHY ready */
184 /* smc91x interrupt pin */
185 gpio_request(8, "SMC91x irq");
186 /* 16C554 reset*/
187 gpio_request(6, "16C554 reset");
188 gpio_direction_output(6, 0);
189 /* 16C554 interrupt pins */
190 gpio_request(12, "16C554 irq");
191 gpio_request(13, "16C554 irq");
192 gpio_request(14, "16C554 irq");
193 gpio_request(15, "16C554 irq");
194 set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
195 set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
196 set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
197 set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);
198
199 platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
200 omap_board_config = voiceblue_config;
201 omap_board_config_size = ARRAY_SIZE(voiceblue_config);
202 omap_serial_init();
203 omap1_usb_init(&voiceblue_usb_config);
204 omap_register_i2c_bus(1, 100, NULL, 0);
205
206 /* There is a good chance board is going up, so enable power LED
207 * (it is connected through invertor) */
208 omap_writeb(0x00, OMAP_LPG1_LCR);
209 omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */
210}
211
212static void __init voiceblue_map_io(void) 168static void __init voiceblue_map_io(void)
213{ 169{
214 omap1_map_common_io(); 170 omap1_map_common_io();
@@ -275,8 +231,17 @@ void voiceblue_wdt_ping(void)
275 gpio_set_value(0, wdt_gpio_state); 231 gpio_set_value(0, wdt_gpio_state);
276} 232}
277 233
278void voiceblue_reset(void) 234static void voiceblue_reset(char mode, const char *cmd)
279{ 235{
236 /*
237 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
238 * "Global Software Reset Affects Traffic Controller Frequency".
239 */
240 if (cpu_is_omap5912()) {
241 omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL);
242 omap_writew(0x8, ARM_RSTCT1);
243 }
244
280 set_bit(MACHINE_REBOOT, &machine_state); 245 set_bit(MACHINE_REBOOT, &machine_state);
281 voiceblue_wdt_enable(); 246 voiceblue_wdt_enable();
282 while (1) ; 247 while (1) ;
@@ -286,6 +251,54 @@ EXPORT_SYMBOL(voiceblue_wdt_enable);
286EXPORT_SYMBOL(voiceblue_wdt_disable); 251EXPORT_SYMBOL(voiceblue_wdt_disable);
287EXPORT_SYMBOL(voiceblue_wdt_ping); 252EXPORT_SYMBOL(voiceblue_wdt_ping);
288 253
254static void __init voiceblue_init(void)
255{
256 /* mux pins for uarts */
257 omap_cfg_reg(UART1_TX);
258 omap_cfg_reg(UART1_RTS);
259 omap_cfg_reg(UART2_TX);
260 omap_cfg_reg(UART2_RTS);
261 omap_cfg_reg(UART3_TX);
262 omap_cfg_reg(UART3_RX);
263
264 /* Watchdog */
265 gpio_request(0, "Watchdog");
266 /* smc91x reset */
267 gpio_request(7, "SMC91x reset");
268 gpio_direction_output(7, 1);
269 udelay(2); /* wait at least 100ns */
270 gpio_set_value(7, 0);
271 mdelay(50); /* 50ms until PHY ready */
272 /* smc91x interrupt pin */
273 gpio_request(8, "SMC91x irq");
274 /* 16C554 reset*/
275 gpio_request(6, "16C554 reset");
276 gpio_direction_output(6, 0);
277 /* 16C554 interrupt pins */
278 gpio_request(12, "16C554 irq");
279 gpio_request(13, "16C554 irq");
280 gpio_request(14, "16C554 irq");
281 gpio_request(15, "16C554 irq");
282 set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
283 set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
284 set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
285 set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);
286
287 platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
288 omap_board_config = voiceblue_config;
289 omap_board_config_size = ARRAY_SIZE(voiceblue_config);
290 omap_serial_init();
291 omap1_usb_init(&voiceblue_usb_config);
292 omap_register_i2c_bus(1, 100, NULL, 0);
293
294 /* There is a good chance board is going up, so enable power LED
295 * (it is connected through invertor) */
296 omap_writeb(0x00, OMAP_LPG1_LCR);
297 omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */
298
299 arch_reset = voiceblue_reset;
300}
301
289MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") 302MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
290 /* Maintainer: Ladislav Michl <michl@2n.cz> */ 303 /* Maintainer: Ladislav Michl <michl@2n.cz> */
291 .boot_params = 0x10000100, 304 .boot_params = 0x10000100,