aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-2430sdp.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2008-03-18 04:04:51 -0400
committerTony Lindgren <tony@atomide.com>2008-04-14 13:29:37 -0400
commit445959821f82846913fe09fee0573e0238415e8c (patch)
tree38d0ec8fd827017e21961a42a58a9bcaaede7c6e /arch/arm/mach-omap2/board-2430sdp.c
parentc595713da76bc7cedddf5135072ea6037cc0befb (diff)
ARM: OMAP2: Change 24xx to use new register access
This patch changes 24xx to use new register access, except for clock framework. Clock framework register access will get updates in the next patch. Note that board-*.c files change GPMC (General Purpose Memory Controller) access to use gpmc_cs_write_reg() instead of accessing the registers directly. The code also uses gpmc_fck instead of it's parent clock core_l3_ck for GPMC clock. The H4 board file also adds h4_init_flash() function, which specify the flash start and end addresses. Also note that sleep.S removes some unused registers addresses. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-2430sdp.c')
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 64235dee5614..1c12d7c6c7fc 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -33,7 +33,6 @@
33#include <asm/arch/board.h> 33#include <asm/arch/board.h>
34#include <asm/arch/common.h> 34#include <asm/arch/common.h>
35#include <asm/arch/gpmc.h> 35#include <asm/arch/gpmc.h>
36#include "prcm-regs.h"
37 36
38#include <asm/io.h> 37#include <asm/io.h>
39 38
@@ -125,15 +124,18 @@ static inline void __init sdp2430_init_smc91x(void)
125 int eth_cs; 124 int eth_cs;
126 unsigned long cs_mem_base; 125 unsigned long cs_mem_base;
127 unsigned int rate; 126 unsigned int rate;
128 struct clk *l3ck; 127 struct clk *gpmc_fck;
129 128
130 eth_cs = SDP2430_SMC91X_CS; 129 eth_cs = SDP2430_SMC91X_CS;
131 130
132 l3ck = clk_get(NULL, "core_l3_ck"); 131 gpmc_fck = clk_get(NULL, "gpmc_fck"); /* Always on ENABLE_ON_INIT */
133 if (IS_ERR(l3ck)) 132 if (IS_ERR(gpmc_fck)) {
134 rate = 100000000; 133 WARN_ON(1);
135 else 134 return;
136 rate = clk_get_rate(l3ck); 135 }
136
137 clk_enable(gpmc_fck);
138 rate = clk_get_rate(gpmc_fck);
137 139
138 /* Make sure CS1 timings are correct, for 2430 always muxed */ 140 /* Make sure CS1 timings are correct, for 2430 always muxed */
139 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1, 0x00011200); 141 gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1, 0x00011200);
@@ -160,7 +162,7 @@ static inline void __init sdp2430_init_smc91x(void)
160 162
161 if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) { 163 if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) {
162 printk(KERN_ERR "Failed to request GPMC mem for smc91x\n"); 164 printk(KERN_ERR "Failed to request GPMC mem for smc91x\n");
163 return; 165 goto out;
164 } 166 }
165 167
166 sdp2430_smc91x_resources[0].start = cs_mem_base + 0x300; 168 sdp2430_smc91x_resources[0].start = cs_mem_base + 0x300;
@@ -171,10 +173,13 @@ static inline void __init sdp2430_init_smc91x(void)
171 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", 173 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n",
172 OMAP24XX_ETHR_GPIO_IRQ); 174 OMAP24XX_ETHR_GPIO_IRQ);
173 gpmc_cs_free(eth_cs); 175 gpmc_cs_free(eth_cs);
174 return; 176 goto out;
175 } 177 }
176 omap_set_gpio_direction(OMAP24XX_ETHR_GPIO_IRQ, 1); 178 omap_set_gpio_direction(OMAP24XX_ETHR_GPIO_IRQ, 1);
177 179
180out:
181 clk_disable(gpmc_fck);
182 clk_put(gpmc_fck);
178} 183}
179 184
180static void __init omap_2430sdp_init_irq(void) 185static void __init omap_2430sdp_init_irq(void)