diff options
author | Syed Mohammed, Khasim <khasim@ti.com> | 2008-10-09 10:51:41 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-10-09 10:51:41 -0400 |
commit | cc26b3b01bc96a8b8c36671b0dc4898b2a152ea8 (patch) | |
tree | 8cd836cd32a38c1a849837ab295eeaa3ec104336 /arch/arm/plat-omap | |
parent | 2e7509e5b3acc4b8653faa1966e5ac234d36ac82 (diff) |
ARM: OMAP3: Add minimal omap3430 support
Add minimal omap3430 support based on earlier patches from
Syed Mohammed Khasim. Also merge in omap34xx SRAM support
from Karthik Dasu and use consistent naming for sram init
functions.
Also do following changes that make 34xx support usable:
- Remove unused sram.c functions for 34xx
- Rename IRQ_SIR_IRQ to INTCPS_SIR_IRQ and define it locally
in entry-macro.S
- Update mach-omap2/io.c to support 2420, 2430, and 34xx
- Also merge in 34xx GPMC changes to add fields wr_access and
wr_data_mux_bus from Adrian Hunter
- Remove memory initialization call omap2_init_memory() until
until more generic memory initialization patches are posted.
It's OK to rely on bootloader initialization until then.
Signed-off-by: Syed Mohammed, Khasim <khasim@ti.com>
Signed-off-by: Karthik Dasu<karthik-dp@ti.com>
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/Kconfig | 9 | ||||
-rw-r--r-- | arch/arm/plat-omap/devices.c | 15 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/debug-macro.S | 12 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/entry-macro.S | 12 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/gpmc.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/io.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/irqs.h | 35 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/mcbsp.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/memory.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/mux.h | 26 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/omap24xx.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/sdrc.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/sram.h | 10 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/system.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/io.c | 32 | ||||
-rw-r--r-- | arch/arm/plat-omap/sram.c | 53 |
16 files changed, 166 insertions, 56 deletions
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index ef62bf21e179..a94f0c44ebc8 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -15,6 +15,9 @@ config ARCH_OMAP1 | |||
15 | config ARCH_OMAP2 | 15 | config ARCH_OMAP2 |
16 | bool "TI OMAP2" | 16 | bool "TI OMAP2" |
17 | 17 | ||
18 | config ARCH_OMAP3 | ||
19 | bool "TI OMAP3" | ||
20 | |||
18 | endchoice | 21 | endchoice |
19 | 22 | ||
20 | comment "OMAP Feature Selections" | 23 | comment "OMAP Feature Selections" |
@@ -112,13 +115,13 @@ config OMAP_MPU_TIMER | |||
112 | 115 | ||
113 | config OMAP_32K_TIMER | 116 | config OMAP_32K_TIMER |
114 | bool "Use 32KHz timer" | 117 | bool "Use 32KHz timer" |
115 | depends on ARCH_OMAP16XX || ARCH_OMAP24XX | 118 | depends on ARCH_OMAP16XX || ARCH_OMAP24XX || ARCH_OMAP34XX |
116 | help | 119 | help |
117 | Select this option if you want to enable the OMAP 32KHz timer. | 120 | Select this option if you want to enable the OMAP 32KHz timer. |
118 | This timer saves power compared to the OMAP_MPU_TIMER, and has | 121 | This timer saves power compared to the OMAP_MPU_TIMER, and has |
119 | support for no tick during idle. The 32KHz timer provides less | 122 | support for no tick during idle. The 32KHz timer provides less |
120 | intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is | 123 | intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is |
121 | currently only available for OMAP16XX and 24XX. | 124 | currently only available for OMAP16XX, 24XX and 34XX. |
122 | 125 | ||
123 | endchoice | 126 | endchoice |
124 | 127 | ||
@@ -133,7 +136,7 @@ config OMAP_32K_TIMER_HZ | |||
133 | 136 | ||
134 | config OMAP_DM_TIMER | 137 | config OMAP_DM_TIMER |
135 | bool "Use dual-mode timer" | 138 | bool "Use dual-mode timer" |
136 | depends on ARCH_OMAP16XX || ARCH_OMAP24XX | 139 | depends on ARCH_OMAP16XX || ARCH_OMAP24XX || ARCH_OMAP34XX |
137 | help | 140 | help |
138 | Select this option if you want to use OMAP Dual-Mode timers. | 141 | Select this option if you want to use OMAP Dual-Mode timers. |
139 | 142 | ||
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 1c1d831a0c09..2625ce32e602 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -94,6 +94,10 @@ static inline void omap_init_dsp(void) { } | |||
94 | 94 | ||
95 | static void omap_init_kp(void) | 95 | static void omap_init_kp(void) |
96 | { | 96 | { |
97 | /* 2430 and 34xx keypad is on TWL4030 */ | ||
98 | if (cpu_is_omap2430() || cpu_is_omap34xx()) | ||
99 | return; | ||
100 | |||
97 | if (machine_is_omap_h2() || machine_is_omap_h3()) { | 101 | if (machine_is_omap_h2() || machine_is_omap_h3()) { |
98 | omap_cfg_reg(F18_1610_KBC0); | 102 | omap_cfg_reg(F18_1610_KBC0); |
99 | omap_cfg_reg(D20_1610_KBC1); | 103 | omap_cfg_reg(D20_1610_KBC1); |
@@ -395,8 +399,17 @@ static inline void omap_init_uwire(void) {} | |||
395 | 399 | ||
396 | #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) | 400 | #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) |
397 | 401 | ||
398 | #ifdef CONFIG_ARCH_OMAP24XX | 402 | #if defined(CONFIG_ARCH_OMAP34XX) |
403 | #define OMAP_WDT_BASE 0x48314000 | ||
404 | #elif defined(CONFIG_ARCH_OMAP24XX) | ||
405 | |||
406 | #ifdef CONFIG_ARCH_OMAP2430 | ||
407 | /* WDT2 */ | ||
408 | #define OMAP_WDT_BASE 0x49016000 | ||
409 | #else | ||
399 | #define OMAP_WDT_BASE 0x48022000 | 410 | #define OMAP_WDT_BASE 0x48022000 |
411 | #endif | ||
412 | |||
400 | #else | 413 | #else |
401 | #define OMAP_WDT_BASE 0xfffeb000 | 414 | #define OMAP_WDT_BASE 0xfffeb000 |
402 | #endif | 415 | #endif |
diff --git a/arch/arm/plat-omap/include/mach/debug-macro.S b/arch/arm/plat-omap/include/mach/debug-macro.S index 1b0039bdeb4e..1b11f5c6a2d9 100644 --- a/arch/arm/plat-omap/include/mach/debug-macro.S +++ b/arch/arm/plat-omap/include/mach/debug-macro.S | |||
@@ -35,6 +35,18 @@ | |||
35 | #ifdef CONFIG_OMAP_LL_DEBUG_UART3 | 35 | #ifdef CONFIG_OMAP_LL_DEBUG_UART3 |
36 | add \rx, \rx, #0x00004000 @ UART 3 | 36 | add \rx, \rx, #0x00004000 @ UART 3 |
37 | #endif | 37 | #endif |
38 | |||
39 | #elif CONFIG_ARCH_OMAP3 | ||
40 | moveq \rx, #0x48000000 @ physical base address | ||
41 | movne \rx, #0xd8000000 @ virtual base | ||
42 | orr \rx, \rx, #0x0006a000 | ||
43 | #ifdef CONFIG_OMAP_LL_DEBUG_UART2 | ||
44 | add \rx, \rx, #0x00002000 @ UART 2 | ||
45 | #endif | ||
46 | #ifdef CONFIG_OMAP_LL_DEBUG_UART3 | ||
47 | add \rx, \rx, #0x00fb0000 @ UART 3 | ||
48 | add \rx, \rx, #0x00006000 | ||
49 | #endif | ||
38 | #endif | 50 | #endif |
39 | .endm | 51 | .endm |
40 | 52 | ||
diff --git a/arch/arm/plat-omap/include/mach/entry-macro.S b/arch/arm/plat-omap/include/mach/entry-macro.S index d4e9043bf201..030118ee204a 100644 --- a/arch/arm/plat-omap/include/mach/entry-macro.S +++ b/arch/arm/plat-omap/include/mach/entry-macro.S | |||
@@ -55,9 +55,17 @@ | |||
55 | 1510: | 55 | 1510: |
56 | .endm | 56 | .endm |
57 | 57 | ||
58 | #elif defined(CONFIG_ARCH_OMAP24XX) | 58 | #endif |
59 | #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) | ||
59 | 60 | ||
61 | #if defined(CONFIG_ARCH_OMAP24XX) | ||
60 | #include <mach/omap24xx.h> | 62 | #include <mach/omap24xx.h> |
63 | #endif | ||
64 | #if defined(CONFIG_ARCH_OMAP34XX) | ||
65 | #include <mach/omap34xx.h> | ||
66 | #endif | ||
67 | |||
68 | #define INTCPS_SIR_IRQ_OFFSET 0x0040 /* Active interrupt number */ | ||
61 | 69 | ||
62 | .macro disable_fiq | 70 | .macro disable_fiq |
63 | .endm | 71 | .endm |
@@ -79,7 +87,7 @@ | |||
79 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ | 87 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ |
80 | cmp \irqnr, #0x0 | 88 | cmp \irqnr, #0x0 |
81 | 2222: | 89 | 2222: |
82 | ldrne \irqnr, [\base, #IRQ_SIR_IRQ] | 90 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] |
83 | 91 | ||
84 | .endm | 92 | .endm |
85 | 93 | ||
diff --git a/arch/arm/plat-omap/include/mach/gpmc.h b/arch/arm/plat-omap/include/mach/gpmc.h index 3c7b425c585e..45b678439bb7 100644 --- a/arch/arm/plat-omap/include/mach/gpmc.h +++ b/arch/arm/plat-omap/include/mach/gpmc.h | |||
@@ -84,6 +84,10 @@ struct gpmc_timings { | |||
84 | u16 access; /* Start-cycle to first data valid delay */ | 84 | u16 access; /* Start-cycle to first data valid delay */ |
85 | u16 rd_cycle; /* Total read cycle time */ | 85 | u16 rd_cycle; /* Total read cycle time */ |
86 | u16 wr_cycle; /* Total write cycle time */ | 86 | u16 wr_cycle; /* Total write cycle time */ |
87 | |||
88 | /* The following are only on OMAP3430 */ | ||
89 | u16 wr_access; /* WRACCESSTIME */ | ||
90 | u16 wr_data_mux_bus; /* WRDATAONADMUXBUS */ | ||
87 | }; | 91 | }; |
88 | 92 | ||
89 | extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns); | 93 | extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns); |
diff --git a/arch/arm/plat-omap/include/mach/io.h b/arch/arm/plat-omap/include/mach/io.h index dd0cf069431d..adc83b7b8205 100644 --- a/arch/arm/plat-omap/include/mach/io.h +++ b/arch/arm/plat-omap/include/mach/io.h | |||
@@ -73,7 +73,6 @@ | |||
73 | #define L4_24XX_VIRT 0xd8000000 | 73 | #define L4_24XX_VIRT 0xd8000000 |
74 | #define L4_24XX_SIZE SZ_1M /* 1MB of 128MB used, want 1MB sect */ | 74 | #define L4_24XX_SIZE SZ_1M /* 1MB of 128MB used, want 1MB sect */ |
75 | 75 | ||
76 | #ifdef CONFIG_ARCH_OMAP2430 | ||
77 | #define L4_WK_243X_PHYS L4_WK_243X_BASE /* 0x49000000 */ | 76 | #define L4_WK_243X_PHYS L4_WK_243X_BASE /* 0x49000000 */ |
78 | #define L4_WK_243X_VIRT 0xd9000000 | 77 | #define L4_WK_243X_VIRT 0xd9000000 |
79 | #define L4_WK_243X_SIZE SZ_1M | 78 | #define L4_WK_243X_SIZE SZ_1M |
@@ -87,8 +86,6 @@ | |||
87 | #define OMAP243X_SMS_VIRT 0xFC000000 | 86 | #define OMAP243X_SMS_VIRT 0xFC000000 |
88 | #define OMAP243X_SMS_SIZE SZ_1M | 87 | #define OMAP243X_SMS_SIZE SZ_1M |
89 | 88 | ||
90 | #endif | ||
91 | |||
92 | #define IO_OFFSET 0x90000000 | 89 | #define IO_OFFSET 0x90000000 |
93 | #define __IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ | 90 | #define __IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ |
94 | #define __OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ | 91 | #define __OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ |
diff --git a/arch/arm/plat-omap/include/mach/irqs.h b/arch/arm/plat-omap/include/mach/irqs.h index e9fd63055cb2..9ee04969d366 100644 --- a/arch/arm/plat-omap/include/mach/irqs.h +++ b/arch/arm/plat-omap/include/mach/irqs.h | |||
@@ -286,6 +286,41 @@ | |||
286 | #define INT_24XX_USB_IRQ_OTG 80 | 286 | #define INT_24XX_USB_IRQ_OTG 80 |
287 | #define INT_24XX_MMC_IRQ 83 | 287 | #define INT_24XX_MMC_IRQ 83 |
288 | 288 | ||
289 | #define INT_34XX_BENCH_MPU_EMUL 3 | ||
290 | #define INT_34XX_ST_MCBSP2_IRQ 4 | ||
291 | #define INT_34XX_ST_MCBSP3_IRQ 5 | ||
292 | #define INT_34XX_SSM_ABORT_IRQ 6 | ||
293 | #define INT_34XX_SYS_NIRQ 7 | ||
294 | #define INT_34XX_D2D_FW_IRQ 8 | ||
295 | #define INT_34XX_PRCM_MPU_IRQ 11 | ||
296 | #define INT_34XX_MCBSP1_IRQ 16 | ||
297 | #define INT_34XX_MCBSP2_IRQ 17 | ||
298 | #define INT_34XX_MCBSP3_IRQ 22 | ||
299 | #define INT_34XX_MCBSP4_IRQ 23 | ||
300 | #define INT_34XX_CAM_IRQ 24 | ||
301 | #define INT_34XX_MCBSP5_IRQ 27 | ||
302 | #define INT_34XX_GPIO_BANK1 29 | ||
303 | #define INT_34XX_GPIO_BANK2 30 | ||
304 | #define INT_34XX_GPIO_BANK3 31 | ||
305 | #define INT_34XX_GPIO_BANK4 32 | ||
306 | #define INT_34XX_GPIO_BANK5 33 | ||
307 | #define INT_34XX_GPIO_BANK6 34 | ||
308 | #define INT_34XX_USIM_IRQ 35 | ||
309 | #define INT_34XX_WDT3_IRQ 36 | ||
310 | #define INT_34XX_SPI4_IRQ 48 | ||
311 | #define INT_34XX_SHA1MD52_IRQ 49 | ||
312 | #define INT_34XX_FPKA_READY_IRQ 50 | ||
313 | #define INT_34XX_SHA1MD51_IRQ 51 | ||
314 | #define INT_34XX_RNG_IRQ 52 | ||
315 | #define INT_34XX_I2C3_IRQ 61 | ||
316 | #define INT_34XX_FPKA_ERROR_IRQ 64 | ||
317 | #define INT_34XX_PBIAS_IRQ 75 | ||
318 | #define INT_34XX_OHCI_IRQ 76 | ||
319 | #define INT_34XX_EHCI_IRQ 77 | ||
320 | #define INT_34XX_TLL_IRQ 78 | ||
321 | #define INT_34XX_PARTHASH_IRQ 79 | ||
322 | #define INT_34XX_MMC3_IRQ 94 | ||
323 | #define INT_34XX_GPT12_IRQ 95 | ||
289 | /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and | 324 | /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and |
290 | * 16 MPUIO lines */ | 325 | * 16 MPUIO lines */ |
291 | #define OMAP_MAX_GPIO_LINES 192 | 326 | #define OMAP_MAX_GPIO_LINES 192 |
diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat-omap/include/mach/mcbsp.h index a3074f2fb7ce..c8d0aa118be7 100644 --- a/arch/arm/plat-omap/include/mach/mcbsp.h +++ b/arch/arm/plat-omap/include/mach/mcbsp.h | |||
@@ -91,7 +91,7 @@ | |||
91 | #define AUDIO_DMA_TX OMAP_DMA_MCBSP1_TX | 91 | #define AUDIO_DMA_TX OMAP_DMA_MCBSP1_TX |
92 | #define AUDIO_DMA_RX OMAP_DMA_MCBSP1_RX | 92 | #define AUDIO_DMA_RX OMAP_DMA_MCBSP1_RX |
93 | 93 | ||
94 | #elif defined(CONFIG_ARCH_OMAP24XX) | 94 | #elif defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) |
95 | 95 | ||
96 | #define OMAP_MCBSP_REG_DRR2 0x00 | 96 | #define OMAP_MCBSP_REG_DRR2 0x00 |
97 | #define OMAP_MCBSP_REG_DRR1 0x04 | 97 | #define OMAP_MCBSP_REG_DRR1 0x04 |
diff --git a/arch/arm/plat-omap/include/mach/memory.h b/arch/arm/plat-omap/include/mach/memory.h index a325caf80d04..d40cac60b959 100644 --- a/arch/arm/plat-omap/include/mach/memory.h +++ b/arch/arm/plat-omap/include/mach/memory.h | |||
@@ -38,7 +38,7 @@ | |||
38 | */ | 38 | */ |
39 | #if defined(CONFIG_ARCH_OMAP1) | 39 | #if defined(CONFIG_ARCH_OMAP1) |
40 | #define PHYS_OFFSET UL(0x10000000) | 40 | #define PHYS_OFFSET UL(0x10000000) |
41 | #elif defined(CONFIG_ARCH_OMAP2) | 41 | #elif defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) |
42 | #define PHYS_OFFSET UL(0x80000000) | 42 | #define PHYS_OFFSET UL(0x80000000) |
43 | #endif | 43 | #endif |
44 | 44 | ||
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h index 5670d563f378..6bbf1789bed5 100644 --- a/arch/arm/plat-omap/include/mach/mux.h +++ b/arch/arm/plat-omap/include/mach/mux.h | |||
@@ -723,7 +723,31 @@ enum omap34xx_index { | |||
723 | AB12_3430_USB3HS_TLL_DATA4, | 723 | AB12_3430_USB3HS_TLL_DATA4, |
724 | AB13_3430_USB3HS_TLL_DATA5, | 724 | AB13_3430_USB3HS_TLL_DATA5, |
725 | AA13_3430_USB3HS_TLL_DATA6, | 725 | AA13_3430_USB3HS_TLL_DATA6, |
726 | AA12_3430_USB3HS_TLL_DATA7 | 726 | AA12_3430_USB3HS_TLL_DATA7, |
727 | |||
728 | /* PHY FSUSB: FS Serial for Port 1 (multiple PHY modes supported) */ | ||
729 | AF10_3430_USB1FS_PHY_MM1_RXDP, | ||
730 | AG9_3430_USB1FS_PHY_MM1_RXDM, | ||
731 | W13_3430_USB1FS_PHY_MM1_RXRCV, | ||
732 | W12_3430_USB1FS_PHY_MM1_TXSE0, | ||
733 | W11_3430_USB1FS_PHY_MM1_TXDAT, | ||
734 | Y11_3430_USB1FS_PHY_MM1_TXEN_N, | ||
735 | |||
736 | /* PHY FSUSB: FS Serial for Port 2 (multiple PHY modes supported) */ | ||
737 | AF7_3430_USB2FS_PHY_MM2_RXDP, | ||
738 | AH7_3430_USB2FS_PHY_MM2_RXDM, | ||
739 | AB10_3430_USB2FS_PHY_MM2_RXRCV, | ||
740 | AB9_3430_USB2FS_PHY_MM2_TXSE0, | ||
741 | W3_3430_USB2FS_PHY_MM2_TXDAT, | ||
742 | T4_3430_USB2FS_PHY_MM2_TXEN_N, | ||
743 | |||
744 | /* PHY FSUSB: FS Serial for Port 3 (multiple PHY modes supported) */ | ||
745 | AH3_3430_USB3FS_PHY_MM3_RXDP, | ||
746 | AE3_3430_USB3FS_PHY_MM3_RXDM, | ||
747 | AD1_3430_USB3FS_PHY_MM3_RXRCV, | ||
748 | AE1_3430_USB3FS_PHY_MM3_TXSE0, | ||
749 | AD2_3430_USB3FS_PHY_MM3_TXDAT, | ||
750 | AC1_3430_USB3FS_PHY_MM3_TXEN_N, | ||
727 | 751 | ||
728 | }; | 752 | }; |
729 | 753 | ||
diff --git a/arch/arm/plat-omap/include/mach/omap24xx.h b/arch/arm/plat-omap/include/mach/omap24xx.h index 556f0eb4d55c..24335d4932f5 100644 --- a/arch/arm/plat-omap/include/mach/omap24xx.h +++ b/arch/arm/plat-omap/include/mach/omap24xx.h | |||
@@ -39,7 +39,6 @@ | |||
39 | /* interrupt controller */ | 39 | /* interrupt controller */ |
40 | #define OMAP24XX_IC_BASE (L4_24XX_BASE + 0xfe000) | 40 | #define OMAP24XX_IC_BASE (L4_24XX_BASE + 0xfe000) |
41 | #define OMAP24XX_IVA_INTC_BASE 0x40000000 | 41 | #define OMAP24XX_IVA_INTC_BASE 0x40000000 |
42 | #define IRQ_SIR_IRQ 0x0040 | ||
43 | 42 | ||
44 | #define OMAP2420_CTRL_BASE L4_24XX_BASE | 43 | #define OMAP2420_CTRL_BASE L4_24XX_BASE |
45 | #define OMAP2420_32KSYNCT_BASE (L4_24XX_BASE + 0x4000) | 44 | #define OMAP2420_32KSYNCT_BASE (L4_24XX_BASE + 0x4000) |
diff --git a/arch/arm/plat-omap/include/mach/sdrc.h b/arch/arm/plat-omap/include/mach/sdrc.h index 25ee3819faad..a98c6c3beb2c 100644 --- a/arch/arm/plat-omap/include/mach/sdrc.h +++ b/arch/arm/plat-omap/include/mach/sdrc.h | |||
@@ -25,8 +25,8 @@ | |||
25 | #define SDRC_DLLB_STATUS 0x06C | 25 | #define SDRC_DLLB_STATUS 0x06C |
26 | #define SDRC_POWER 0x070 | 26 | #define SDRC_POWER 0x070 |
27 | #define SDRC_MR_0 0x084 | 27 | #define SDRC_MR_0 0x084 |
28 | #define SDRC_ACTIM_CTRL_A 0x09c | 28 | #define SDRC_ACTIM_CTRL_A_0 0x09c |
29 | #define SDRC_ACTIM_CTRL_B 0x0a0 | 29 | #define SDRC_ACTIM_CTRL_B_0 0x0a0 |
30 | #define SDRC_RFR_CTRL_0 0x0a4 | 30 | #define SDRC_RFR_CTRL_0 0x0a4 |
31 | 31 | ||
32 | /* | 32 | /* |
diff --git a/arch/arm/plat-omap/include/mach/sram.h b/arch/arm/plat-omap/include/mach/sram.h index e09323449981..ab35d622dcf5 100644 --- a/arch/arm/plat-omap/include/mach/sram.h +++ b/arch/arm/plat-omap/include/mach/sram.h | |||
@@ -21,6 +21,10 @@ extern void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | |||
21 | u32 mem_type); | 21 | u32 mem_type); |
22 | extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); | 22 | extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); |
23 | 23 | ||
24 | extern u32 omap3_configure_core_dpll(u32 sdrc_rfr_ctrl, | ||
25 | u32 sdrc_actim_ctrla, | ||
26 | u32 sdrc_actim_ctrlb, u32 m2); | ||
27 | |||
24 | /* Do not use these */ | 28 | /* Do not use these */ |
25 | extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl); | 29 | extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl); |
26 | extern unsigned long omap1_sram_reprogram_clock_sz; | 30 | extern unsigned long omap1_sram_reprogram_clock_sz; |
@@ -53,4 +57,10 @@ extern void omap243x_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | |||
53 | u32 mem_type); | 57 | u32 mem_type); |
54 | extern unsigned long omap243x_sram_reprogram_sdrc_sz; | 58 | extern unsigned long omap243x_sram_reprogram_sdrc_sz; |
55 | 59 | ||
60 | |||
61 | extern u32 omap3_sram_configure_core_dpll(u32 sdrc_rfr_ctrl, | ||
62 | u32 sdrc_actim_ctrla, | ||
63 | u32 sdrc_actim_ctrlb, u32 m2); | ||
64 | extern unsigned long omap3_sram_configure_core_dpll_sz; | ||
65 | |||
56 | #endif | 66 | #endif |
diff --git a/arch/arm/plat-omap/include/mach/system.h b/arch/arm/plat-omap/include/mach/system.h index 06a28c7b98de..06923f261545 100644 --- a/arch/arm/plat-omap/include/mach/system.h +++ b/arch/arm/plat-omap/include/mach/system.h | |||
@@ -40,7 +40,7 @@ static inline void omap1_arch_reset(char mode) | |||
40 | 40 | ||
41 | static inline void arch_reset(char mode) | 41 | static inline void arch_reset(char mode) |
42 | { | 42 | { |
43 | if (!cpu_is_omap24xx()) | 43 | if (!cpu_class_is_omap2()) |
44 | omap1_arch_reset(mode); | 44 | omap1_arch_reset(mode); |
45 | else | 45 | else |
46 | omap_prcm_arch_reset(mode); | 46 | omap_prcm_arch_reset(mode); |
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c index 0253c456ed5b..af326efc1ad3 100644 --- a/arch/arm/plat-omap/io.c +++ b/arch/arm/plat-omap/io.c | |||
@@ -47,11 +47,13 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) | |||
47 | } | 47 | } |
48 | #endif | 48 | #endif |
49 | #ifdef CONFIG_ARCH_OMAP2 | 49 | #ifdef CONFIG_ARCH_OMAP2 |
50 | if (cpu_class_is_omap2()) { | 50 | if (cpu_is_omap24xx()) { |
51 | if (BETWEEN(p, L3_24XX_PHYS, L3_24XX_SIZE)) | 51 | if (BETWEEN(p, L3_24XX_PHYS, L3_24XX_SIZE)) |
52 | return XLATE(p, L3_24XX_PHYS, L3_24XX_VIRT); | 52 | return XLATE(p, L3_24XX_PHYS, L3_24XX_VIRT); |
53 | if (BETWEEN(p, L4_24XX_PHYS, L4_24XX_SIZE)) | 53 | if (BETWEEN(p, L4_24XX_PHYS, L4_24XX_SIZE)) |
54 | return XLATE(p, L4_24XX_PHYS, L4_24XX_VIRT); | 54 | return XLATE(p, L4_24XX_PHYS, L4_24XX_VIRT); |
55 | } | ||
56 | if (cpu_is_omap2420()) { | ||
55 | if (BETWEEN(p, DSP_MEM_24XX_PHYS, DSP_MEM_24XX_SIZE)) | 57 | if (BETWEEN(p, DSP_MEM_24XX_PHYS, DSP_MEM_24XX_SIZE)) |
56 | return XLATE(p, DSP_MEM_24XX_PHYS, DSP_MEM_24XX_VIRT); | 58 | return XLATE(p, DSP_MEM_24XX_PHYS, DSP_MEM_24XX_VIRT); |
57 | if (BETWEEN(p, DSP_IPI_24XX_PHYS, DSP_IPI_24XX_SIZE)) | 59 | if (BETWEEN(p, DSP_IPI_24XX_PHYS, DSP_IPI_24XX_SIZE)) |
@@ -59,14 +61,36 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) | |||
59 | if (BETWEEN(p, DSP_MMU_24XX_PHYS, DSP_MMU_24XX_SIZE)) | 61 | if (BETWEEN(p, DSP_MMU_24XX_PHYS, DSP_MMU_24XX_SIZE)) |
60 | return XLATE(p, DSP_MMU_24XX_PHYS, DSP_MMU_24XX_VIRT); | 62 | return XLATE(p, DSP_MMU_24XX_PHYS, DSP_MMU_24XX_VIRT); |
61 | } | 63 | } |
62 | #ifdef CONFIG_ARCH_OMAP2430 | ||
63 | if (cpu_is_omap2430()) { | 64 | if (cpu_is_omap2430()) { |
64 | if (BETWEEN(p, L4_WK_243X_PHYS, L4_WK_243X_SIZE)) | 65 | if (BETWEEN(p, L4_WK_243X_PHYS, L4_WK_243X_SIZE)) |
65 | return XLATE(L4_WK_243X_PHYS, L4_WK_243X_VIRT); | 66 | return XLATE(p, L4_WK_243X_PHYS, L4_WK_243X_VIRT); |
66 | if (BETWEEN(p, OMAP243X_GPMC_PHYS, OMAP243X_GPMC_SIZE)) | 67 | if (BETWEEN(p, OMAP243X_GPMC_PHYS, OMAP243X_GPMC_SIZE)) |
67 | return XLATE(OMAP243X_GPMC_PHYS, OMAP243X_GPMC_VIRT); | 68 | return XLATE(p, OMAP243X_GPMC_PHYS, OMAP243X_GPMC_VIRT); |
69 | if (BETWEEN(p, OMAP243X_SDRC_PHYS, OMAP243X_SDRC_SIZE)) | ||
70 | return XLATE(p, OMAP243X_SDRC_PHYS, OMAP243X_SDRC_VIRT); | ||
71 | if (BETWEEN(p, OMAP243X_SMS_PHYS, OMAP243X_SMS_SIZE)) | ||
72 | return XLATE(p, OMAP243X_SMS_PHYS, OMAP243X_SMS_VIRT); | ||
68 | } | 73 | } |
69 | #endif | 74 | #endif |
75 | #ifdef CONFIG_ARCH_OMAP3 | ||
76 | if (cpu_is_omap34xx()) { | ||
77 | if (BETWEEN(p, L3_34XX_PHYS, L3_34XX_SIZE)) | ||
78 | return XLATE(p, L3_34XX_PHYS, L3_34XX_VIRT); | ||
79 | if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE)) | ||
80 | return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT); | ||
81 | if (BETWEEN(p, L4_WK_34XX_PHYS, L4_WK_34XX_SIZE)) | ||
82 | return XLATE(p, L4_WK_34XX_PHYS, L4_WK_34XX_VIRT); | ||
83 | if (BETWEEN(p, OMAP34XX_GPMC_PHYS, OMAP34XX_GPMC_SIZE)) | ||
84 | return XLATE(p, OMAP34XX_GPMC_PHYS, OMAP34XX_GPMC_VIRT); | ||
85 | if (BETWEEN(p, OMAP343X_SMS_PHYS, OMAP343X_SMS_SIZE)) | ||
86 | return XLATE(p, OMAP343X_SMS_PHYS, OMAP343X_SMS_VIRT); | ||
87 | if (BETWEEN(p, OMAP343X_SDRC_PHYS, OMAP343X_SDRC_SIZE)) | ||
88 | return XLATE(p, OMAP343X_SDRC_PHYS, OMAP343X_SDRC_VIRT); | ||
89 | if (BETWEEN(p, L4_PER_34XX_PHYS, L4_PER_34XX_SIZE)) | ||
90 | return XLATE(p, L4_PER_34XX_PHYS, L4_PER_34XX_VIRT); | ||
91 | if (BETWEEN(p, L4_EMU_34XX_PHYS, L4_EMU_34XX_SIZE)) | ||
92 | return XLATE(p, L4_EMU_34XX_PHYS, L4_EMU_34XX_VIRT); | ||
93 | } | ||
70 | #endif | 94 | #endif |
71 | 95 | ||
72 | return __arm_ioremap(p, size, type); | 96 | return __arm_ioremap(p, size, type); |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index ac67eeb6ca6a..4d22452a0743 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -271,7 +271,7 @@ int __init omap1_sram_init(void) | |||
271 | #define omap1_sram_init() do {} while (0) | 271 | #define omap1_sram_init() do {} while (0) |
272 | #endif | 272 | #endif |
273 | 273 | ||
274 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | 274 | #if defined(CONFIG_ARCH_OMAP2) |
275 | 275 | ||
276 | static void (*_omap2_sram_ddr_init)(u32 *slow_dll_ctrl, u32 fast_dll_ctrl, | 276 | static void (*_omap2_sram_ddr_init)(u32 *slow_dll_ctrl, u32 fast_dll_ctrl, |
277 | u32 base_cs, u32 force_unlock); | 277 | u32 base_cs, u32 force_unlock); |
@@ -352,23 +352,19 @@ static inline int omap243x_sram_init(void) | |||
352 | 352 | ||
353 | #ifdef CONFIG_ARCH_OMAP3 | 353 | #ifdef CONFIG_ARCH_OMAP3 |
354 | 354 | ||
355 | static u32 (*_omap2_sram_reprogram_gpmc)(u32 perf_level); | 355 | static u32 (*_omap3_sram_configure_core_dpll)(u32 sdrc_rfr_ctrl, |
356 | u32 omap2_sram_reprogram_gpmc(u32 perf_level) | 356 | u32 sdrc_actim_ctrla, |
357 | { | 357 | u32 sdrc_actim_ctrlb, |
358 | if (!_omap2_sram_reprogram_gpmc) | 358 | u32 m2); |
359 | omap_sram_error(); | 359 | u32 omap3_configure_core_dpll(u32 sdrc_rfr_ctrl, u32 sdrc_actim_ctrla, |
360 | 360 | u32 sdrc_actim_ctrlb, u32 m2) | |
361 | return _omap2_sram_reprogram_gpmc(perf_level); | ||
362 | } | ||
363 | |||
364 | static u32 (*_omap2_sram_configure_core_dpll)(u32 m, u32 n, | ||
365 | u32 freqsel, u32 m2); | ||
366 | u32 omap2_sram_configure_core_dpll(u32 m, u32 n, u32 freqsel, u32 m2) | ||
367 | { | 361 | { |
368 | if (!_omap2_sram_configure_core_dpll) | 362 | if (!_omap3_sram_configure_core_dpll) |
369 | omap_sram_error(); | 363 | omap_sram_error(); |
370 | 364 | ||
371 | return _omap2_sram_configure_core_dpll(m, n, freqsel, m2); | 365 | return _omap3_sram_configure_core_dpll(sdrc_rfr_ctrl, |
366 | sdrc_actim_ctrla, | ||
367 | sdrc_actim_ctrlb, m2); | ||
372 | } | 368 | } |
373 | 369 | ||
374 | /* REVISIT: Should this be same as omap34xx_sram_init() after off-idle? */ | 370 | /* REVISIT: Should this be same as omap34xx_sram_init() after off-idle? */ |
@@ -376,31 +372,16 @@ void restore_sram_functions(void) | |||
376 | { | 372 | { |
377 | omap_sram_ceil = omap_sram_base + omap_sram_size; | 373 | omap_sram_ceil = omap_sram_base + omap_sram_size; |
378 | 374 | ||
379 | _omap2_sram_reprogram_gpmc = omap_sram_push(omap34xx_sram_reprogram_gpmc, | 375 | _omap3_sram_configure_core_dpll = |
380 | omap34xx_sram_reprogram_gpmc_sz); | 376 | omap_sram_push(omap3_sram_configure_core_dpll, |
381 | 377 | omap3_sram_configure_core_dpll_sz); | |
382 | _omap2_sram_configure_core_dpll = | ||
383 | omap_sram_push(omap34xx_sram_configure_core_dpll, | ||
384 | omap34xx_sram_configure_core_dpll_sz); | ||
385 | } | 378 | } |
386 | 379 | ||
387 | int __init omap34xx_sram_init(void) | 380 | int __init omap34xx_sram_init(void) |
388 | { | 381 | { |
389 | _omap2_sram_ddr_init = omap_sram_push(omap34xx_sram_ddr_init, | 382 | _omap3_sram_configure_core_dpll = |
390 | omap34xx_sram_ddr_init_sz); | 383 | omap_sram_push(omap3_sram_configure_core_dpll, |
391 | 384 | omap3_sram_configure_core_dpll_sz); | |
392 | _omap2_sram_reprogram_sdrc = omap_sram_push(omap34xx_sram_reprogram_sdrc, | ||
393 | omap34xx_sram_reprogram_sdrc_sz); | ||
394 | |||
395 | _omap2_set_prcm = omap_sram_push(omap34xx_sram_set_prcm, | ||
396 | omap34xx_sram_set_prcm_sz); | ||
397 | |||
398 | _omap2_sram_reprogram_gpmc = omap_sram_push(omap34xx_sram_reprogram_gpmc, | ||
399 | omap34xx_sram_reprogram_gpmc_sz); | ||
400 | |||
401 | _omap2_sram_configure_core_dpll = | ||
402 | omap_sram_push(omap34xx_sram_configure_core_dpll, | ||
403 | omap34xx_sram_configure_core_dpll_sz); | ||
404 | 385 | ||
405 | return 0; | 386 | return 0; |
406 | } | 387 | } |