diff options
author | Tony Lindgren <tony@atomide.com> | 2008-07-03 05:24:41 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-07-03 05:24:41 -0400 |
commit | 030b15457d8069a6255579a28db196e002cb9c86 (patch) | |
tree | 94c33eca9faa2e3ca828ab442a83304de464d06c /arch/arm/mach-omap1 | |
parent | 137b3ee27ab1b27dba081542476054836978ca45 (diff) |
ARM: OMAP: Change omap_cf.c and omap_nor.c to use omap_readw/writew instead of __REG
Change omap_cf.c and omap_nor.c to use omap_readw/writew instead of __REG.
This is needed for multi-omap in the future.
Cc: David Brownell <david-b@pacbell.net>
Cc: linux-pcmcia@lists.infradead.org
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Tony Lindren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/board-osk.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index a66505f58b15..82ec34c43bc5 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 | ||
268 | static void __init osk_init_smc91x(void) | 268 | static 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 | ||
279 | static void __init osk_init_cf(void) | 283 | static void __init osk_init_cf(void) |
@@ -526,13 +530,16 @@ static void __init osk_mistral_init(void) { } | |||
526 | 530 | ||
527 | static void __init osk_init(void) | 531 | static 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; |