|
@@ -24,11 +24,14 @@
|
|
#include <mach/hardware.h>
|
|
#include <mach/hardware.h>
|
|
|
|
|
|
#include "common.h"
|
|
#include "common.h"
|
|
|
|
+#include "omap4-sar-layout.h"
|
|
|
|
|
|
#ifdef CONFIG_CACHE_L2X0
|
|
#ifdef CONFIG_CACHE_L2X0
|
|
static void __iomem *l2cache_base;
|
|
static void __iomem *l2cache_base;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+static void __iomem *sar_ram_base;
|
|
|
|
+
|
|
void __init gic_init_irq(void)
|
|
void __init gic_init_irq(void)
|
|
{
|
|
{
|
|
void __iomem *omap_irq_base;
|
|
void __iomem *omap_irq_base;
|
|
@@ -118,3 +121,30 @@ static int __init omap_l2_cache_init(void)
|
|
}
|
|
}
|
|
early_initcall(omap_l2_cache_init);
|
|
early_initcall(omap_l2_cache_init);
|
|
#endif
|
|
#endif
|
|
|
|
+
|
|
|
|
+void __iomem *omap4_get_sar_ram_base(void)
|
|
|
|
+{
|
|
|
|
+ return sar_ram_base;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * SAR RAM used to save and restore the HW
|
|
|
|
+ * context in low power modes
|
|
|
|
+ */
|
|
|
|
+static int __init omap4_sar_ram_init(void)
|
|
|
|
+{
|
|
|
|
+ /*
|
|
|
|
+ * To avoid code running on other OMAPs in
|
|
|
|
+ * multi-omap builds
|
|
|
|
+ */
|
|
|
|
+ if (!cpu_is_omap44xx())
|
|
|
|
+ return -ENOMEM;
|
|
|
|
+
|
|
|
|
+ /* Static mapping, never released */
|
|
|
|
+ sar_ram_base = ioremap(OMAP44XX_SAR_RAM_BASE, SZ_16K);
|
|
|
|
+ if (WARN_ON(!sar_ram_base))
|
|
|
|
+ return -ENOMEM;
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+early_initcall(omap4_sar_ram_init);
|