diff options
Diffstat (limited to 'arch/arm/plat-omap/sram.c')
-rw-r--r-- | arch/arm/plat-omap/sram.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 4243bdcc87bc..eec98afa0f83 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -31,11 +31,10 @@ | |||
31 | 31 | ||
32 | #include "sram.h" | 32 | #include "sram.h" |
33 | 33 | ||
34 | /* XXX These "sideways" includes are a sign that something is wrong */ | 34 | /* XXX These "sideways" includes will disappear when sram.c becomes a driver */ |
35 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | 35 | #include "../mach-omap2/iomap.h" |
36 | # include "../mach-omap2/prm2xxx_3xxx.h" | 36 | #include "../mach-omap2/prm2xxx_3xxx.h" |
37 | # include "../mach-omap2/sdrc.h" | 37 | #include "../mach-omap2/sdrc.h" |
38 | #endif | ||
39 | 38 | ||
40 | #define OMAP1_SRAM_PA 0x20000000 | 39 | #define OMAP1_SRAM_PA 0x20000000 |
41 | #define OMAP2_SRAM_PUB_PA (OMAP2_SRAM_PA + 0xf800) | 40 | #define OMAP2_SRAM_PUB_PA (OMAP2_SRAM_PA + 0xf800) |
@@ -86,7 +85,7 @@ static int is_sram_locked(void) | |||
86 | __raw_writel(0xCFDE, OMAP24XX_VA_READPERM0); /* all i-read */ | 85 | __raw_writel(0xCFDE, OMAP24XX_VA_READPERM0); /* all i-read */ |
87 | __raw_writel(0xCFDE, OMAP24XX_VA_WRITEPERM0); /* all i-write */ | 86 | __raw_writel(0xCFDE, OMAP24XX_VA_WRITEPERM0); /* all i-write */ |
88 | } | 87 | } |
89 | if (cpu_is_omap34xx()) { | 88 | if (cpu_is_omap34xx() && !cpu_is_am33xx()) { |
90 | __raw_writel(0xFFFF, OMAP34XX_VA_REQINFOPERM0); /* all q-vects */ | 89 | __raw_writel(0xFFFF, OMAP34XX_VA_REQINFOPERM0); /* all q-vects */ |
91 | __raw_writel(0xFFFF, OMAP34XX_VA_READPERM0); /* all i-read */ | 90 | __raw_writel(0xFFFF, OMAP34XX_VA_READPERM0); /* all i-read */ |
92 | __raw_writel(0xFFFF, OMAP34XX_VA_WRITEPERM0); /* all i-write */ | 91 | __raw_writel(0xFFFF, OMAP34XX_VA_WRITEPERM0); /* all i-write */ |
@@ -124,7 +123,10 @@ static void __init omap_detect_sram(void) | |||
124 | omap_sram_size = 0x800; /* 2K */ | 123 | omap_sram_size = 0x800; /* 2K */ |
125 | } | 124 | } |
126 | } else { | 125 | } else { |
127 | if (cpu_is_omap34xx()) { | 126 | if (cpu_is_am33xx()) { |
127 | omap_sram_start = AM33XX_SRAM_PA; | ||
128 | omap_sram_size = 0x10000; /* 64K */ | ||
129 | } else if (cpu_is_omap34xx()) { | ||
128 | omap_sram_start = OMAP3_SRAM_PA; | 130 | omap_sram_start = OMAP3_SRAM_PA; |
129 | omap_sram_size = 0x10000; /* 64K */ | 131 | omap_sram_size = 0x10000; /* 64K */ |
130 | } else if (cpu_is_omap44xx()) { | 132 | } else if (cpu_is_omap44xx()) { |
@@ -368,6 +370,11 @@ static inline int omap34xx_sram_init(void) | |||
368 | return 0; | 370 | return 0; |
369 | } | 371 | } |
370 | 372 | ||
373 | static inline int am33xx_sram_init(void) | ||
374 | { | ||
375 | return 0; | ||
376 | } | ||
377 | |||
371 | int __init omap_sram_init(void) | 378 | int __init omap_sram_init(void) |
372 | { | 379 | { |
373 | omap_detect_sram(); | 380 | omap_detect_sram(); |
@@ -379,6 +386,8 @@ int __init omap_sram_init(void) | |||
379 | omap242x_sram_init(); | 386 | omap242x_sram_init(); |
380 | else if (cpu_is_omap2430()) | 387 | else if (cpu_is_omap2430()) |
381 | omap243x_sram_init(); | 388 | omap243x_sram_init(); |
389 | else if (cpu_is_am33xx()) | ||
390 | am33xx_sram_init(); | ||
382 | else if (cpu_is_omap34xx()) | 391 | else if (cpu_is_omap34xx()) |
383 | omap34xx_sram_init(); | 392 | omap34xx_sram_init(); |
384 | 393 | ||