Merge git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6
[pandora-kernel.git] / arch / arm / plat-omap / sram.c
index ad2bf07..226b2e8 100644 (file)
 #define OMAP3_SRAM_VA           0xfe400000
 #define OMAP3_SRAM_PUB_PA       0x40208000
 #define OMAP3_SRAM_PUB_VA       (OMAP3_SRAM_VA + 0x8000)
-#define OMAP4_SRAM_PA          0x40200000              /*0x402f0000*/
-#define OMAP4_SRAM_VA          0xfe400000              /*0xfe4f0000*/
+#define OMAP4_SRAM_PA          0x40300000
+#define OMAP4_SRAM_VA          0xfe400000
+#define OMAP4_SRAM_PUB_PA      (OMAP4_SRAM_PA + 0x4000)
+#define OMAP4_SRAM_PUB_VA      (OMAP4_SRAM_VA + 0x4000)
 
-#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
+#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
 #define SRAM_BOOTLOADER_SZ     0x00
 #else
 #define SRAM_BOOTLOADER_SZ     0x80
@@ -140,6 +142,10 @@ void __init omap_detect_sram(void)
                                } else {
                                        omap_sram_size = 0x8000; /* 32K */
                                }
+                       } else if (cpu_is_omap44xx()) {
+                               omap_sram_base = OMAP4_SRAM_PUB_VA;
+                               omap_sram_start = OMAP4_SRAM_PUB_PA;
+                               omap_sram_size = 0xa000; /* 40K */
                        } else {
                                omap_sram_base = OMAP2_SRAM_PUB_VA;
                                omap_sram_start = OMAP2_SRAM_PUB_PA;
@@ -153,7 +159,7 @@ void __init omap_detect_sram(void)
                        } else if (cpu_is_omap44xx()) {
                                omap_sram_base = OMAP4_SRAM_VA;
                                omap_sram_start = OMAP4_SRAM_PA;
-                               omap_sram_size = 0x8000; /* 32K */
+                               omap_sram_size = 0xe000; /* 56K */
                        } else {
                                omap_sram_base = OMAP2_SRAM_VA;
                                omap_sram_start = OMAP2_SRAM_PA;
@@ -431,6 +437,20 @@ static inline int omap34xx_sram_init(void)
 }
 #endif
 
+#ifdef CONFIG_ARCH_OMAP4
+int __init omap44xx_sram_init(void)
+{
+       printk(KERN_ERR "FIXME: %s not implemented\n", __func__);
+
+       return -ENODEV;
+}
+#else
+static inline int omap44xx_sram_init(void)
+{
+       return 0;
+}
+#endif
+
 int __init omap_sram_init(void)
 {
        omap_detect_sram();
@@ -445,7 +465,7 @@ int __init omap_sram_init(void)
        else if (cpu_is_omap34xx())
                omap34xx_sram_init();
        else if (cpu_is_omap44xx())
-               omap34xx_sram_init(); /* FIXME: */
+               omap44xx_sram_init();
 
        return 0;
 }