Eukrea CPUIMX27 : Add MMU support
Signed-off-by: Eric Benard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
2adeb59c22
commit
4b3e650d10
|
@ -140,6 +140,7 @@ choice
|
||||||
config MACH_EUKREA_CPUIMX27
|
config MACH_EUKREA_CPUIMX27
|
||||||
bool "EUKREA CPUIMX27"
|
bool "EUKREA CPUIMX27"
|
||||||
select HAS_CFI
|
select HAS_CFI
|
||||||
|
select HAVE_MMU
|
||||||
select MACH_HAS_LOWLEVEL_INIT
|
select MACH_HAS_LOWLEVEL_INIT
|
||||||
help
|
help
|
||||||
Say Y here if you are using Eukrea's CPUIMX27 equipped
|
Say Y here if you are using Eukrea's CPUIMX27 equipped
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include <mach/imx-nand.h>
|
#include <mach/imx-nand.h>
|
||||||
#include <mach/imx-pll.h>
|
#include <mach/imx-pll.h>
|
||||||
#include <ns16550.h>
|
#include <ns16550.h>
|
||||||
|
#include <asm/mmu.h>
|
||||||
|
|
||||||
static struct device_d cfi_dev = {
|
static struct device_d cfi_dev = {
|
||||||
.name = "cfi_flash",
|
.name = "cfi_flash",
|
||||||
|
@ -138,6 +139,29 @@ static struct device_d quad_uart_serial_device = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
|
static void eukrea_cpuimx27_mmu_init(void)
|
||||||
|
{
|
||||||
|
mmu_init();
|
||||||
|
|
||||||
|
arm_create_section(0xa0000000, 0xa0000000, 128, PMD_SECT_DEF_CACHED);
|
||||||
|
arm_create_section(0xb0000000, 0xa0000000, 128, PMD_SECT_DEF_UNCACHED);
|
||||||
|
|
||||||
|
setup_dma_coherent(0x10000000);
|
||||||
|
|
||||||
|
#if TEXT_BASE & (0x100000 - 1)
|
||||||
|
#warning cannot create vector section. Adjust TEXT_BASE to a 1M boundary
|
||||||
|
#else
|
||||||
|
arm_create_section(0x0, TEXT_BASE, 1, PMD_SECT_DEF_UNCACHED);
|
||||||
|
#endif
|
||||||
|
mmu_enable();
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void eukrea_cpuimx27_mmu_init(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int eukrea_cpuimx27_devices_init(void)
|
static int eukrea_cpuimx27_devices_init(void)
|
||||||
{
|
{
|
||||||
char *envdev = "no";
|
char *envdev = "no";
|
||||||
|
@ -170,6 +194,8 @@ static int eukrea_cpuimx27_devices_init(void)
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
eukrea_cpuimx27_mmu_init();
|
||||||
|
|
||||||
/* configure 16 bit nor flash on cs0 */
|
/* configure 16 bit nor flash on cs0 */
|
||||||
CS0U = 0x0000CC03;
|
CS0U = 0x0000CC03;
|
||||||
CS0L = 0xa0330D01;
|
CS0L = 0xa0330D01;
|
||||||
|
|
Loading…
Reference in New Issue