Merge tag 'sched-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / arm / mach-imx / mach-imx27.c
blob262422a9c196c2e52e26faa629b5dd5317e46dbd
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright 2012 Sascha Hauer, Pengutronix
4 */
6 #include <linux/init.h>
7 #include <linux/irq.h>
8 #include <linux/of_address.h>
9 #include <linux/of_irq.h>
10 #include <linux/of_platform.h>
11 #include <linux/mm.h>
12 #include <asm/mach/arch.h>
13 #include <asm/mach/map.h>
14 #include <asm/mach/time.h>
16 #include "common.h"
17 #include "hardware.h"
18 #include "mx27.h"
20 /* MX27 memory map definition */
21 static struct map_desc imx27_io_desc[] __initdata = {
23 * this fixed mapping covers:
24 * - AIPI1
25 * - AIPI2
26 * - AITC
27 * - ROM Patch
28 * - and some reserved space
30 imx_map_entry(MX27, AIPI, MT_DEVICE),
32 * this fixed mapping covers:
33 * - CSI
34 * - ATA
36 imx_map_entry(MX27, SAHB1, MT_DEVICE),
38 * this fixed mapping covers:
39 * - EMI
41 imx_map_entry(MX27, X_MEMC, MT_DEVICE),
45 * Initialize the memory map. It is called during the
46 * system startup to create static physical to virtual
47 * memory map for the IO modules.
49 static void __init mx27_map_io(void)
51 iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc));
54 static void __init imx27_init_early(void)
56 mxc_set_cpu_type(MXC_CPU_MX27);
59 static void __init mx27_init_irq(void)
61 void __iomem *avic_base;
62 struct device_node *np;
64 np = of_find_compatible_node(NULL, NULL, "fsl,avic");
65 avic_base = of_iomap(np, 0);
66 BUG_ON(!avic_base);
67 mxc_init_irq(avic_base);
70 static const char * const imx27_dt_board_compat[] __initconst = {
71 "fsl,imx27",
72 NULL
75 DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)")
76 .map_io = mx27_map_io,
77 .init_early = imx27_init_early,
78 .init_irq = mx27_init_irq,
79 .init_late = imx27_pm_init,
80 .dt_compat = imx27_dt_board_compat,
81 MACHINE_END