1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * arch/arm/mach-imx/mm-imx27.c
5 * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
9 #include <linux/init.h>
10 #include <linux/pinctrl/machine.h>
11 #include <asm/mach/map.h>
14 #include "devices/devices-common.h"
18 /* MX27 memory map definition */
19 static struct map_desc imx27_io_desc[] __initdata = {
21 * this fixed mapping covers:
26 * - and some reserved space
28 imx_map_entry(MX27, AIPI, MT_DEVICE),
30 * this fixed mapping covers:
34 imx_map_entry(MX27, SAHB1, MT_DEVICE),
36 * this fixed mapping covers:
39 imx_map_entry(MX27, X_MEMC, MT_DEVICE),
43 * Initialize the memory map. It is called during the
44 * system startup to create static physical to virtual
45 * memory map for the IO modules.
47 void __init mx27_map_io(void)
49 iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc));
52 void __init imx27_init_early(void)
54 mxc_set_cpu_type(MXC_CPU_MX27);
55 imx_iomuxv1_init(MX27_IO_ADDRESS(MX27_GPIO_BASE_ADDR),
59 void __init mx27_init_irq(void)
61 mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR));
64 static const struct resource imx27_audmux_res[] __initconst = {
65 DEFINE_RES_MEM(MX27_AUDMUX_BASE_ADDR, SZ_4K),
68 void __init imx27_soc_init(void)
70 mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR));
73 /* i.mx27 has the i.mx21 type gpio */
74 mxc_register_gpio("imx21-gpio", 0, MX27_GPIO1_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0);
75 mxc_register_gpio("imx21-gpio", 1, MX27_GPIO2_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0);
76 mxc_register_gpio("imx21-gpio", 2, MX27_GPIO3_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0);
77 mxc_register_gpio("imx21-gpio", 3, MX27_GPIO4_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0);
78 mxc_register_gpio("imx21-gpio", 4, MX27_GPIO5_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0);
79 mxc_register_gpio("imx21-gpio", 5, MX27_GPIO6_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0);
81 pinctrl_provide_dummies();
82 imx_add_imx_dma("imx27-dma", MX27_DMA_BASE_ADDR, MX27_INT_DMACH0);
83 /* imx27 has the imx21 type audmux */
84 platform_device_register_simple("imx21-audmux", 0, imx27_audmux_res,
85 ARRAY_SIZE(imx27_audmux_res));