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
|
||||
bool "EUKREA CPUIMX27"
|
||||
select HAS_CFI
|
||||
select HAVE_MMU
|
||||
select MACH_HAS_LOWLEVEL_INIT
|
||||
help
|
||||
Say Y here if you are using Eukrea's CPUIMX27 equipped
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <mach/imx-nand.h>
|
||||
#include <mach/imx-pll.h>
|
||||
#include <ns16550.h>
|
||||
#include <asm/mmu.h>
|
||||
|
||||
static struct device_d cfi_dev = {
|
||||
.name = "cfi_flash",
|
||||
|
@ -138,6 +139,29 @@ static struct device_d quad_uart_serial_device = {
|
|||
};
|
||||
#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)
|
||||
{
|
||||
char *envdev = "no";
|
||||
|
@ -170,6 +194,8 @@ static int eukrea_cpuimx27_devices_init(void)
|
|||
#endif
|
||||
};
|
||||
|
||||
eukrea_cpuimx27_mmu_init();
|
||||
|
||||
/* configure 16 bit nor flash on cs0 */
|
||||
CS0U = 0x0000CC03;
|
||||
CS0L = 0xa0330D01;
|
||||
|
|
Loading…
Reference in New Issue