block: move down direct IO plugging
[linux/fpc-iii.git] / arch / arm / mach-mxs / mm.c
blobdccb67a9e7c4f5968668380aa55c4fcd2fdacd7b
1 /*
2 * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
11 * Create static mapping between physical to virtual memory.
14 #include <linux/mm.h>
15 #include <linux/init.h>
16 #include <linux/pinctrl/machine.h>
18 #include <asm/mach/map.h>
20 #include <mach/mx23.h>
21 #include <mach/mx28.h>
22 #include <mach/common.h>
23 #include <mach/iomux.h>
26 * Define the MX23 memory map.
28 static struct map_desc mx23_io_desc[] __initdata = {
29 mxs_map_entry(MX23, OCRAM, MT_DEVICE),
30 mxs_map_entry(MX23, IO, MT_DEVICE),
34 * Define the MX28 memory map.
36 static struct map_desc mx28_io_desc[] __initdata = {
37 mxs_map_entry(MX28, OCRAM, MT_DEVICE),
38 mxs_map_entry(MX28, IO, MT_DEVICE),
42 * This function initializes the memory map. It is called during the
43 * system startup to create static physical to virtual memory mappings
44 * for the IO modules.
46 void __init mx23_map_io(void)
48 iotable_init(mx23_io_desc, ARRAY_SIZE(mx23_io_desc));
51 void __init mx23_init_irq(void)
53 icoll_init_irq();
56 void __init mx28_map_io(void)
58 iotable_init(mx28_io_desc, ARRAY_SIZE(mx28_io_desc));
61 void __init mx28_init_irq(void)
63 icoll_init_irq();
66 void __init mx23_soc_init(void)
68 pinctrl_provide_dummies();
70 mxs_add_dma("imx23-dma-apbh", MX23_APBH_DMA_BASE_ADDR);
71 mxs_add_dma("imx23-dma-apbx", MX23_APBX_DMA_BASE_ADDR);
73 mxs_add_gpio("imx23-gpio", 0, MX23_PINCTRL_BASE_ADDR, MX23_INT_GPIO0);
74 mxs_add_gpio("imx23-gpio", 1, MX23_PINCTRL_BASE_ADDR, MX23_INT_GPIO1);
75 mxs_add_gpio("imx23-gpio", 2, MX23_PINCTRL_BASE_ADDR, MX23_INT_GPIO2);
78 void __init mx28_soc_init(void)
80 pinctrl_provide_dummies();
82 mxs_add_dma("imx28-dma-apbh", MX23_APBH_DMA_BASE_ADDR);
83 mxs_add_dma("imx28-dma-apbx", MX23_APBX_DMA_BASE_ADDR);
85 mxs_add_gpio("imx28-gpio", 0, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO0);
86 mxs_add_gpio("imx28-gpio", 1, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO1);
87 mxs_add_gpio("imx28-gpio", 2, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO2);
88 mxs_add_gpio("imx28-gpio", 3, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO3);
89 mxs_add_gpio("imx28-gpio", 4, MX28_PINCTRL_BASE_ADDR, MX28_INT_GPIO4);