diff options
Diffstat (limited to 'arch/arm/plat-omap/sram.c')
-rw-r--r-- | arch/arm/plat-omap/sram.c | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index a5b9bcd6b108..5eae7876979c 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -44,9 +44,9 @@ | |||
44 | #define OMAP2_SRAM_VA 0xe3000000 | 44 | #define OMAP2_SRAM_VA 0xe3000000 |
45 | #define OMAP2_SRAM_PUB_VA (OMAP2_SRAM_VA + 0x800) | 45 | #define OMAP2_SRAM_PUB_VA (OMAP2_SRAM_VA + 0x800) |
46 | #define OMAP3_SRAM_PA 0x40200000 | 46 | #define OMAP3_SRAM_PA 0x40200000 |
47 | #define OMAP3_SRAM_VA 0xd7000000 | 47 | #define OMAP3_SRAM_VA 0xe3000000 |
48 | #define OMAP3_SRAM_PUB_PA 0x40208000 | 48 | #define OMAP3_SRAM_PUB_PA 0x40208000 |
49 | #define OMAP3_SRAM_PUB_VA 0xd7008000 | 49 | #define OMAP3_SRAM_PUB_VA (OMAP3_SRAM_VA + 0x8000) |
50 | #define OMAP4_SRAM_PA 0x40200000 /*0x402f0000*/ | 50 | #define OMAP4_SRAM_PA 0x40200000 /*0x402f0000*/ |
51 | #define OMAP4_SRAM_VA 0xd7000000 /*0xd70f0000*/ | 51 | #define OMAP4_SRAM_VA 0xd7000000 /*0xd70f0000*/ |
52 | 52 | ||
@@ -133,7 +133,12 @@ void __init omap_detect_sram(void) | |||
133 | if (cpu_is_omap34xx()) { | 133 | if (cpu_is_omap34xx()) { |
134 | omap_sram_base = OMAP3_SRAM_PUB_VA; | 134 | omap_sram_base = OMAP3_SRAM_PUB_VA; |
135 | omap_sram_start = OMAP3_SRAM_PUB_PA; | 135 | omap_sram_start = OMAP3_SRAM_PUB_PA; |
136 | omap_sram_size = 0x8000; /* 32K */ | 136 | if ((omap_type() == OMAP2_DEVICE_TYPE_EMU) || |
137 | (omap_type() == OMAP2_DEVICE_TYPE_SEC)) { | ||
138 | omap_sram_size = 0x7000; /* 28K */ | ||
139 | } else { | ||
140 | omap_sram_size = 0x8000; /* 32K */ | ||
141 | } | ||
137 | } else { | 142 | } else { |
138 | omap_sram_base = OMAP2_SRAM_PUB_VA; | 143 | omap_sram_base = OMAP2_SRAM_PUB_VA; |
139 | omap_sram_start = OMAP2_SRAM_PUB_PA; | 144 | omap_sram_start = OMAP2_SRAM_PUB_PA; |
@@ -368,18 +373,26 @@ static inline int omap243x_sram_init(void) | |||
368 | 373 | ||
369 | #ifdef CONFIG_ARCH_OMAP3 | 374 | #ifdef CONFIG_ARCH_OMAP3 |
370 | 375 | ||
371 | static u32 (*_omap3_sram_configure_core_dpll)(u32 sdrc_rfr_ctrl, | 376 | static u32 (*_omap3_sram_configure_core_dpll)( |
372 | u32 sdrc_actim_ctrla, | 377 | u32 m2, u32 unlock_dll, u32 f, u32 inc, |
373 | u32 sdrc_actim_ctrlb, | 378 | u32 sdrc_rfr_ctrl_0, u32 sdrc_actim_ctrl_a_0, |
374 | u32 m2, u32 unlock_dll); | 379 | u32 sdrc_actim_ctrl_b_0, u32 sdrc_mr_0, |
375 | u32 omap3_configure_core_dpll(u32 sdrc_rfr_ctrl, u32 sdrc_actim_ctrla, | 380 | u32 sdrc_rfr_ctrl_1, u32 sdrc_actim_ctrl_a_1, |
376 | u32 sdrc_actim_ctrlb, u32 m2, u32 unlock_dll) | 381 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1); |
382 | |||
383 | u32 omap3_configure_core_dpll(u32 m2, u32 unlock_dll, u32 f, u32 inc, | ||
384 | u32 sdrc_rfr_ctrl_0, u32 sdrc_actim_ctrl_a_0, | ||
385 | u32 sdrc_actim_ctrl_b_0, u32 sdrc_mr_0, | ||
386 | u32 sdrc_rfr_ctrl_1, u32 sdrc_actim_ctrl_a_1, | ||
387 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1) | ||
377 | { | 388 | { |
378 | BUG_ON(!_omap3_sram_configure_core_dpll); | 389 | BUG_ON(!_omap3_sram_configure_core_dpll); |
379 | return _omap3_sram_configure_core_dpll(sdrc_rfr_ctrl, | 390 | return _omap3_sram_configure_core_dpll( |
380 | sdrc_actim_ctrla, | 391 | m2, unlock_dll, f, inc, |
381 | sdrc_actim_ctrlb, m2, | 392 | sdrc_rfr_ctrl_0, sdrc_actim_ctrl_a_0, |
382 | unlock_dll); | 393 | sdrc_actim_ctrl_b_0, sdrc_mr_0, |
394 | sdrc_rfr_ctrl_1, sdrc_actim_ctrl_a_1, | ||
395 | sdrc_actim_ctrl_b_1, sdrc_mr_1); | ||
383 | } | 396 | } |
384 | 397 | ||
385 | /* REVISIT: Should this be same as omap34xx_sram_init() after off-idle? */ | 398 | /* REVISIT: Should this be same as omap34xx_sram_init() after off-idle? */ |