Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Copyright 2012 Sascha Hauer, Pengutronix
0004  */
0005 
0006 #include <linux/init.h>
0007 #include <linux/irq.h>
0008 #include <linux/of_address.h>
0009 #include <linux/of_irq.h>
0010 #include <linux/of_platform.h>
0011 #include <linux/mm.h>
0012 #include <asm/mach/arch.h>
0013 #include <asm/mach/map.h>
0014 #include <asm/mach/time.h>
0015 
0016 #include "common.h"
0017 #include "hardware.h"
0018 #include "mx27.h"
0019 
0020 /* MX27 memory map definition */
0021 static struct map_desc imx27_io_desc[] __initdata = {
0022     /*
0023      * this fixed mapping covers:
0024      * - AIPI1
0025      * - AIPI2
0026      * - AITC
0027      * - ROM Patch
0028      * - and some reserved space
0029      */
0030     imx_map_entry(MX27, AIPI, MT_DEVICE),
0031     /*
0032      * this fixed mapping covers:
0033      * - CSI
0034      * - ATA
0035      */
0036     imx_map_entry(MX27, SAHB1, MT_DEVICE),
0037     /*
0038      * this fixed mapping covers:
0039      * - EMI
0040      */
0041     imx_map_entry(MX27, X_MEMC, MT_DEVICE),
0042 };
0043 
0044 /*
0045  * Initialize the memory map. It is called during the
0046  * system startup to create static physical to virtual
0047  * memory map for the IO modules.
0048  */
0049 static void __init mx27_map_io(void)
0050 {
0051     iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc));
0052 }
0053 
0054 static void __init imx27_init_early(void)
0055 {
0056     mxc_set_cpu_type(MXC_CPU_MX27);
0057 }
0058 
0059 static const char * const imx27_dt_board_compat[] __initconst = {
0060     "fsl,imx27",
0061     NULL
0062 };
0063 
0064 DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)")
0065     .map_io     = mx27_map_io,
0066     .init_early = imx27_init_early,
0067     .init_late  = imx27_pm_init,
0068     .dt_compat  = imx27_dt_board_compat,
0069 MACHINE_END