diff options
author | Syed Mohammed Khasim <x0khasim@ti.com> | 2006-12-06 20:14:08 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-05-05 05:56:45 -0400 |
commit | 56a2564185db752d83bbc78be9b1e257bf103444 (patch) | |
tree | 63983fbd8306cdc08f0835655527cf79e04370bc /arch | |
parent | e5c56ed3c9caa6ba717af0a5c23e2c7bf5c97a1f (diff) |
ARM: OMAP: plat-omap changes for 2430 SDP
This patch adds minimal OMAP2430 support to plat-omap files to
get the kernel booting on 2430SDP.
Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-omap/devices.c | 6 | ||||
-rw-r--r-- | arch/arm/plat-omap/dmtimer.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 76 | ||||
-rw-r--r-- | arch/arm/plat-omap/mcbsp.c | 15 |
4 files changed, 80 insertions, 19 deletions
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index dbc3f44e07a6..eeb33fed6f7c 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -429,6 +429,10 @@ static inline void omap_init_rng(void) {} | |||
429 | */ | 429 | */ |
430 | static int __init omap_init_devices(void) | 430 | static int __init omap_init_devices(void) |
431 | { | 431 | { |
432 | /* | ||
433 | * Need to enable relevant once for 2430 SDP | ||
434 | */ | ||
435 | #ifndef CONFIG_MACH_OMAP_2430SDP | ||
432 | /* please keep these calls, and their implementations above, | 436 | /* please keep these calls, and their implementations above, |
433 | * in alphabetical order so they're easier to sort through. | 437 | * in alphabetical order so they're easier to sort through. |
434 | */ | 438 | */ |
@@ -438,7 +442,7 @@ static int __init omap_init_devices(void) | |||
438 | omap_init_uwire(); | 442 | omap_init_uwire(); |
439 | omap_init_wdt(); | 443 | omap_init_wdt(); |
440 | omap_init_rng(); | 444 | omap_init_rng(); |
441 | 445 | #endif | |
442 | return 0; | 446 | return 0; |
443 | } | 447 | } |
444 | arch_initcall(omap_init_devices); | 448 | arch_initcall(omap_init_devices); |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 45f0439bffba..659619f235ca 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -506,6 +506,8 @@ int omap_dm_timer_init(void) | |||
506 | BUG_ON(dm_source_clocks[i] == NULL); | 506 | BUG_ON(dm_source_clocks[i] == NULL); |
507 | } | 507 | } |
508 | #endif | 508 | #endif |
509 | if (cpu_is_omap243x()) | ||
510 | dm_timers[0].phys_base = 0x49018000; | ||
509 | 511 | ||
510 | for (i = 0; i < dm_timer_count; i++) { | 512 | for (i = 0; i < dm_timer_count; i++) { |
511 | #ifdef CONFIG_ARCH_OMAP2 | 513 | #ifdef CONFIG_ARCH_OMAP2 |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index f0a882b8ab3a..1da7a5d1ddd9 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -85,10 +85,17 @@ | |||
85 | /* | 85 | /* |
86 | * omap24xx specific GPIO registers | 86 | * omap24xx specific GPIO registers |
87 | */ | 87 | */ |
88 | #define OMAP24XX_GPIO1_BASE (void __iomem *)0x48018000 | 88 | #define OMAP242X_GPIO1_BASE (void __iomem *)0x48018000 |
89 | #define OMAP24XX_GPIO2_BASE (void __iomem *)0x4801a000 | 89 | #define OMAP242X_GPIO2_BASE (void __iomem *)0x4801a000 |
90 | #define OMAP24XX_GPIO3_BASE (void __iomem *)0x4801c000 | 90 | #define OMAP242X_GPIO3_BASE (void __iomem *)0x4801c000 |
91 | #define OMAP24XX_GPIO4_BASE (void __iomem *)0x4801e000 | 91 | #define OMAP242X_GPIO4_BASE (void __iomem *)0x4801e000 |
92 | |||
93 | #define OMAP243X_GPIO1_BASE (void __iomem *)0x4900C000 | ||
94 | #define OMAP243X_GPIO2_BASE (void __iomem *)0x4900E000 | ||
95 | #define OMAP243X_GPIO3_BASE (void __iomem *)0x49010000 | ||
96 | #define OMAP243X_GPIO4_BASE (void __iomem *)0x49012000 | ||
97 | #define OMAP243X_GPIO5_BASE (void __iomem *)0x480B6000 | ||
98 | |||
92 | #define OMAP24XX_GPIO_REVISION 0x0000 | 99 | #define OMAP24XX_GPIO_REVISION 0x0000 |
93 | #define OMAP24XX_GPIO_SYSCONFIG 0x0010 | 100 | #define OMAP24XX_GPIO_SYSCONFIG 0x0010 |
94 | #define OMAP24XX_GPIO_SYSSTATUS 0x0014 | 101 | #define OMAP24XX_GPIO_SYSSTATUS 0x0014 |
@@ -168,12 +175,22 @@ static struct gpio_bank gpio_bank_730[7] = { | |||
168 | #endif | 175 | #endif |
169 | 176 | ||
170 | #ifdef CONFIG_ARCH_OMAP24XX | 177 | #ifdef CONFIG_ARCH_OMAP24XX |
171 | static struct gpio_bank gpio_bank_24xx[4] = { | 178 | |
172 | { OMAP24XX_GPIO1_BASE, INT_24XX_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_24XX }, | 179 | static struct gpio_bank gpio_bank_242x[4] = { |
173 | { OMAP24XX_GPIO2_BASE, INT_24XX_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_24XX }, | 180 | { OMAP242X_GPIO1_BASE, INT_24XX_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_24XX }, |
174 | { OMAP24XX_GPIO3_BASE, INT_24XX_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_24XX }, | 181 | { OMAP242X_GPIO2_BASE, INT_24XX_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_24XX }, |
175 | { OMAP24XX_GPIO4_BASE, INT_24XX_GPIO_BANK4, IH_GPIO_BASE + 96, METHOD_GPIO_24XX }, | 182 | { OMAP242X_GPIO3_BASE, INT_24XX_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_24XX }, |
183 | { OMAP242X_GPIO4_BASE, INT_24XX_GPIO_BANK4, IH_GPIO_BASE + 96, METHOD_GPIO_24XX }, | ||
176 | }; | 184 | }; |
185 | |||
186 | static struct gpio_bank gpio_bank_243x[5] = { | ||
187 | { OMAP243X_GPIO1_BASE, INT_24XX_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_24XX }, | ||
188 | { OMAP243X_GPIO2_BASE, INT_24XX_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_24XX }, | ||
189 | { OMAP243X_GPIO3_BASE, INT_24XX_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_24XX }, | ||
190 | { OMAP243X_GPIO4_BASE, INT_24XX_GPIO_BANK4, IH_GPIO_BASE + 96, METHOD_GPIO_24XX }, | ||
191 | { OMAP243X_GPIO5_BASE, INT_24XX_GPIO_BANK5, IH_GPIO_BASE + 128, METHOD_GPIO_24XX }, | ||
192 | }; | ||
193 | |||
177 | #endif | 194 | #endif |
178 | 195 | ||
179 | static struct gpio_bank *gpio_bank; | 196 | static struct gpio_bank *gpio_bank; |
@@ -1113,6 +1130,11 @@ static int initialized; | |||
1113 | static struct clk * gpio_ick; | 1130 | static struct clk * gpio_ick; |
1114 | static struct clk * gpio_fck; | 1131 | static struct clk * gpio_fck; |
1115 | 1132 | ||
1133 | #ifdef CONFIG_ARCH_OMAP2430 | ||
1134 | static struct clk * gpio5_ick; | ||
1135 | static struct clk * gpio5_fck; | ||
1136 | #endif | ||
1137 | |||
1116 | static int __init _omap_gpio_init(void) | 1138 | static int __init _omap_gpio_init(void) |
1117 | { | 1139 | { |
1118 | int i; | 1140 | int i; |
@@ -1138,7 +1160,25 @@ static int __init _omap_gpio_init(void) | |||
1138 | printk("Could not get gpios_fck\n"); | 1160 | printk("Could not get gpios_fck\n"); |
1139 | else | 1161 | else |
1140 | clk_enable(gpio_fck); | 1162 | clk_enable(gpio_fck); |
1141 | } | 1163 | |
1164 | /* | ||
1165 | * On 2430 GPIO 5 uses CORE L4 ICLK | ||
1166 | */ | ||
1167 | #ifdef CONFIG_ARCH_OMAP2430 | ||
1168 | if (cpu_is_omap2430()) { | ||
1169 | gpio5_ick = clk_get(NULL, "gpio5_ick"); | ||
1170 | if (IS_ERR(gpio5_ick)) | ||
1171 | printk("Could not get gpio5_ick\n"); | ||
1172 | else | ||
1173 | clk_enable(gpio5_ick); | ||
1174 | gpio5_fck = clk_get(NULL, "gpio5_fck"); | ||
1175 | if (IS_ERR(gpio5_fck)) | ||
1176 | printk("Could not get gpio5_fck\n"); | ||
1177 | else | ||
1178 | clk_enable(gpio5_fck); | ||
1179 | } | ||
1180 | #endif | ||
1181 | } | ||
1142 | 1182 | ||
1143 | #ifdef CONFIG_ARCH_OMAP15XX | 1183 | #ifdef CONFIG_ARCH_OMAP15XX |
1144 | if (cpu_is_omap15xx()) { | 1184 | if (cpu_is_omap15xx()) { |
@@ -1165,14 +1205,24 @@ static int __init _omap_gpio_init(void) | |||
1165 | gpio_bank = gpio_bank_730; | 1205 | gpio_bank = gpio_bank_730; |
1166 | } | 1206 | } |
1167 | #endif | 1207 | #endif |
1208 | |||
1168 | #ifdef CONFIG_ARCH_OMAP24XX | 1209 | #ifdef CONFIG_ARCH_OMAP24XX |
1169 | if (cpu_is_omap24xx()) { | 1210 | if (cpu_is_omap242x()) { |
1170 | int rev; | 1211 | int rev; |
1171 | 1212 | ||
1172 | gpio_bank_count = 4; | 1213 | gpio_bank_count = 4; |
1173 | gpio_bank = gpio_bank_24xx; | 1214 | gpio_bank = gpio_bank_242x; |
1215 | rev = omap_readl(gpio_bank[0].base + OMAP24XX_GPIO_REVISION); | ||
1216 | printk(KERN_INFO "OMAP242x GPIO hardware version %d.%d\n", | ||
1217 | (rev >> 4) & 0x0f, rev & 0x0f); | ||
1218 | } | ||
1219 | if (cpu_is_omap243x()) { | ||
1220 | int rev; | ||
1221 | |||
1222 | gpio_bank_count = 5; | ||
1223 | gpio_bank = gpio_bank_243x; | ||
1174 | rev = omap_readl(gpio_bank[0].base + OMAP24XX_GPIO_REVISION); | 1224 | rev = omap_readl(gpio_bank[0].base + OMAP24XX_GPIO_REVISION); |
1175 | printk(KERN_INFO "OMAP24xx GPIO hardware version %d.%d\n", | 1225 | printk(KERN_INFO "OMAP243x GPIO hardware version %d.%d\n", |
1176 | (rev >> 4) & 0x0f, rev & 0x0f); | 1226 | (rev >> 4) & 0x0f, rev & 0x0f); |
1177 | } | 1227 | } |
1178 | #endif | 1228 | #endif |
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index b8d6f17ff58f..f7b9ccdaacbc 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
@@ -225,11 +225,16 @@ static void omap_mcbsp_dsp_free(void) | |||
225 | #ifdef CONFIG_ARCH_OMAP2 | 225 | #ifdef CONFIG_ARCH_OMAP2 |
226 | static void omap2_mcbsp2_mux_setup(void) | 226 | static void omap2_mcbsp2_mux_setup(void) |
227 | { | 227 | { |
228 | omap_cfg_reg(Y15_24XX_MCBSP2_CLKX); | 228 | if (cpu_is_omap2420()) { |
229 | omap_cfg_reg(R14_24XX_MCBSP2_FSX); | 229 | omap_cfg_reg(Y15_24XX_MCBSP2_CLKX); |
230 | omap_cfg_reg(W15_24XX_MCBSP2_DR); | 230 | omap_cfg_reg(R14_24XX_MCBSP2_FSX); |
231 | omap_cfg_reg(V15_24XX_MCBSP2_DX); | 231 | omap_cfg_reg(W15_24XX_MCBSP2_DR); |
232 | omap_cfg_reg(V14_24XX_GPIO117); | 232 | omap_cfg_reg(V15_24XX_MCBSP2_DX); |
233 | omap_cfg_reg(V14_24XX_GPIO117); | ||
234 | } | ||
235 | /* | ||
236 | * Need to add MUX settings for OMAP 2430 SDP | ||
237 | */ | ||
233 | } | 238 | } |
234 | #endif | 239 | #endif |
235 | 240 | ||