Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a66cb345 authored by Tony Lindgren's avatar Tony Lindgren
Browse files

ARM: OMAP: Map SRAM later on with ioremap_exec()



This allows us to remove omap hacks for map_io.

Acked-by: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
Reviewed-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent fee926bb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <mach/hardware.h>
#include <asm/mach/map.h>

#include <plat/common.h>
#include <plat/tc.h>
#include <plat/board.h>
#include <plat/mux.h>
@@ -291,6 +292,8 @@ static int __init omap1_init_devices(void)
	if (!cpu_class_is_omap1())
		return -ENODEV;

	omap_sram_init();

	/* please keep these calls, and their implementations above,
	 * in alphabetical order so they're easier to sort through.
	 */
+0 −2
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@
#include "clock.h"

extern void omap_check_revision(void);
extern void omap_sram_init(void);

/*
 * The machine specific code may provide the extra mapping besides the
@@ -133,7 +132,6 @@ void omap1_init_early(void)
	 */
	omap1_clk_init();
	omap1_mux_init();
	omap_sram_init();
}

/*
+3 −18
Original line number Diff line number Diff line
@@ -35,8 +35,8 @@
#include "clock2xxx.h"
#include "clock3xxx.h"
#include "clock44xx.h"
#include "io.h"

#include <plat/common.h>
#include <plat/omap-pm.h>
#include "voltage.h"
#include "powerdomain.h"
@@ -240,22 +240,11 @@ static struct map_desc omap44xx_io_desc[] __initdata = {
};
#endif

static void __init _omap2_map_common_io(void)
{
	/* Normally devicemaps_init() would flush caches and tlb after
	 * mdesc->map_io(), but we must also do it here because of the CPU
	 * revision check below.
	 */
	local_flush_tlb_all();
	flush_cache_all();
}

#ifdef CONFIG_SOC_OMAP2420
void __init omap242x_map_common_io(void)
{
	iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
	iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc));
	_omap2_map_common_io();
}
#endif

@@ -264,7 +253,6 @@ void __init omap243x_map_common_io(void)
{
	iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
	iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc));
	_omap2_map_common_io();
}
#endif

@@ -272,7 +260,6 @@ void __init omap243x_map_common_io(void)
void __init omap34xx_map_common_io(void)
{
	iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc));
	_omap2_map_common_io();
}
#endif

@@ -280,7 +267,6 @@ void __init omap34xx_map_common_io(void)
void __init omapti816x_map_common_io(void)
{
	iotable_init(omapti816x_io_desc, ARRAY_SIZE(omapti816x_io_desc));
	_omap2_map_common_io();
}
#endif

@@ -288,7 +274,6 @@ void __init omapti816x_map_common_io(void)
void __init omap44xx_map_common_io(void)
{
	iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc));
	_omap2_map_common_io();
}
#endif

@@ -337,7 +322,6 @@ void __iomem *omap_irq_base;
static void __init omap_common_init_early(void)
{
	omap2_check_revision();
	omap_sram_init();
}

static void __init omap_hwmod_init_postsetup(void)
@@ -449,11 +433,12 @@ void __init omap4430_init_early(void)
void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
				      struct omap_sdrc_params *sdrc_cs1)
{
	omap_sram_init();

	if (cpu_is_omap24xx() || omap3_has_sdrc()) {
		omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
		_omap2_init_reprogram_sdrc();
	}

}

/*
+0 −7
Original line number Diff line number Diff line

#ifndef __MACH_OMAP2_IO_H__
#define __MACH_OMAP2_IO_H__

extern int __init omap_sram_init(void);

#endif /*  __MACH_OMAP2_IO_H__ */
+2 −0
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@ void am35xx_init_early(void);
void ti816x_init_early(void);
void omap4430_init_early(void);

void omap_sram_init(void);

/*
 * IO bases for various OMAP processors
 * Except the tap base, rest all the io bases
Loading