14 #include <linux/kernel.h>
21 #include <linux/export.h>
26 #include <asm/memblock.h>
39 #ifdef CONFIG_CACHE_L2X0
40 static void __iomem *l2cache_base;
43 static void __iomem *sar_ram_base;
45 #ifdef CONFIG_OMAP4_ERRATA_I688
47 #define OMAP4_DRAM_BARRIER_VA 0xfe600000
49 void __iomem *dram_sync, *sram_sync;
56 if (dram_sync && sram_sync) {
65 int __init omap_barrier_reserve_memblock(
void)
78 dram_io_desc[0].
virtual = OMAP4_DRAM_BARRIER_VA;
80 dram_io_desc[0].length =
size;
83 dram_sync = (
void __iomem *) dram_io_desc[0].
virtual;
84 sram_sync = (
void __iomem *) OMAP4_SRAM_VA;
86 pr_info(
"OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n",
87 (
long long)
paddr, dram_io_desc[0].
virtual);
98 void __iomem *gic_dist_base_addr;
102 BUG_ON(!gic_dist_base_addr);
110 gic_init(0, 29, gic_dist_base_addr, omap_irq_base);
113 #ifdef CONFIG_CACHE_L2X0
115 void __iomem *omap4_get_l2cache_base(
void)
120 static void omap4_l2x0_disable(
void)
123 omap_smc1(0x102, 0x0);
126 static void omap4_l2x0_set_debug(
unsigned long val)
129 omap_smc1(0x100, val);
132 static int __init omap_l2_cache_init(
void)
168 omap_smc1(0x109, aux_ctrl);
171 omap_smc1(0x102, 0x1);
173 if (of_have_populated_dt())
182 outer_cache.disable = omap4_l2x0_disable;
183 outer_cache.set_debug = omap4_l2x0_set_debug;
199 static int __init omap4_sar_ram_init(
void)
218 { .compatible =
"arm,cortex-a9-gic", .data =
gic_of_init, },
219 { .compatible =
"arm,cortex-a15-gic", .data =
gic_of_init, },
229 #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
230 static int omap4_twl6030_hsmmc_late_init(
struct device *
dev)
241 dev_err(dev,
"%s: Error card detect config(%d)\n",
245 pdata->
slots[0].card_detect_irq = irq;
251 static __init void omap4_twl6030_hsmmc_set_late_init(
struct device *dev)
257 pr_err(
"Failed %s\n", __func__);
261 pdata->
init = omap4_twl6030_hsmmc_late_init;
268 omap_hsmmc_init(controllers);
269 for (c = controllers; c->
mmc; c++) {
273 omap4_twl6030_hsmmc_set_late_init(&c->
pdev->dev);