aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-osk.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1/board-osk.c')
-rw-r--r--arch/arm/mach-omap1/board-osk.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index a66505f58b15..845c66371ca3 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -267,13 +267,17 @@ static struct i2c_board_info __initdata osk_i2c_board_info[] = {
267 267
268static void __init osk_init_smc91x(void) 268static void __init osk_init_smc91x(void)
269{ 269{
270 u32 l;
271
270 if ((gpio_request(0, "smc_irq")) < 0) { 272 if ((gpio_request(0, "smc_irq")) < 0) {
271 printk("Error requesting gpio 0 for smc91x irq\n"); 273 printk("Error requesting gpio 0 for smc91x irq\n");
272 return; 274 return;
273 } 275 }
274 276
275 /* Check EMIFS wait states to fix errors with SMC_GET_PKT_HDR */ 277 /* Check EMIFS wait states to fix errors with SMC_GET_PKT_HDR */
276 EMIFS_CCS(1) |= 0x3; 278 l = omap_readl(EMIFS_CCS(1));
279 l |= 0x3;
280 omap_writel(l, EMIFS_CCS(1));
277} 281}
278 282
279static void __init osk_init_cf(void) 283static void __init osk_init_cf(void)
@@ -526,20 +530,26 @@ static void __init osk_mistral_init(void) { }
526 530
527static void __init osk_init(void) 531static void __init osk_init(void)
528{ 532{
533 u32 l;
534
529 /* Workaround for wrong CS3 (NOR flash) timing 535 /* Workaround for wrong CS3 (NOR flash) timing
530 * There are some U-Boot versions out there which configure 536 * There are some U-Boot versions out there which configure
531 * wrong CS3 memory timings. This mainly leads to CRC 537 * wrong CS3 memory timings. This mainly leads to CRC
532 * or similar errors if you use NOR flash (e.g. with JFFS2) 538 * or similar errors if you use NOR flash (e.g. with JFFS2)
533 */ 539 */
534 if (EMIFS_CCS(3) != EMIFS_CS3_VAL) 540 l = omap_readl(EMIFS_CCS(3));
535 EMIFS_CCS(3) = EMIFS_CS3_VAL; 541 if (l != EMIFS_CS3_VAL)
542 omap_writel(EMIFS_CS3_VAL, EMIFS_CCS(3));
536 543
537 osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys(); 544 osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys();
538 osk_flash_resource.end += SZ_32M - 1; 545 osk_flash_resource.end += SZ_32M - 1;
539 platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices)); 546 platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices));
540 omap_board_config = osk_config; 547 omap_board_config = osk_config;
541 omap_board_config_size = ARRAY_SIZE(osk_config); 548 omap_board_config_size = ARRAY_SIZE(osk_config);
542 USB_TRANSCEIVER_CTRL_REG |= (3 << 1); 549
550 l = omap_readl(USB_TRANSCEIVER_CTRL);
551 l |= (3 << 1);
552 omap_writel(l, USB_TRANSCEIVER_CTRL);
543 553
544 /* irq for tps65010 chip */ 554 /* irq for tps65010 chip */
545 /* bootloader effectively does: omap_cfg_reg(U19_1610_MPUIO1); */ 555 /* bootloader effectively does: omap_cfg_reg(U19_1610_MPUIO1); */