diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/arm/mach-imx | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'arch/arm/mach-imx')
199 files changed, 844 insertions, 24646 deletions
diff --git a/arch/arm/mach-imx/3ds_debugboard.c b/arch/arm/mach-imx/3ds_debugboard.c deleted file mode 100644 index 13437735296..00000000000 --- a/arch/arm/mach-imx/3ds_debugboard.c +++ /dev/null | |||
@@ -1,213 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2010 Jason Wang <jason77.wang@gmail.com> | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/irq.h> | ||
15 | #include <linux/irqdomain.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <linux/module.h> | ||
20 | #include <linux/smsc911x.h> | ||
21 | #include <linux/regulator/machine.h> | ||
22 | #include <linux/regulator/fixed.h> | ||
23 | |||
24 | #include "hardware.h" | ||
25 | |||
26 | /* LAN9217 ethernet base address */ | ||
27 | #define LAN9217_BASE_ADDR(n) (n + 0x0) | ||
28 | /* External UART */ | ||
29 | #define UARTA_BASE_ADDR(n) (n + 0x8000) | ||
30 | #define UARTB_BASE_ADDR(n) (n + 0x10000) | ||
31 | |||
32 | #define BOARD_IO_ADDR(n) (n + 0x20000) | ||
33 | /* LED switchs */ | ||
34 | #define LED_SWITCH_REG 0x00 | ||
35 | /* buttons */ | ||
36 | #define SWITCH_BUTTONS_REG 0x08 | ||
37 | /* status, interrupt */ | ||
38 | #define INTR_STATUS_REG 0x10 | ||
39 | #define INTR_MASK_REG 0x38 | ||
40 | #define INTR_RESET_REG 0x20 | ||
41 | /* magic word for debug CPLD */ | ||
42 | #define MAGIC_NUMBER1_REG 0x40 | ||
43 | #define MAGIC_NUMBER2_REG 0x48 | ||
44 | /* CPLD code version */ | ||
45 | #define CPLD_CODE_VER_REG 0x50 | ||
46 | /* magic word for debug CPLD */ | ||
47 | #define MAGIC_NUMBER3_REG 0x58 | ||
48 | /* module reset register*/ | ||
49 | #define MODULE_RESET_REG 0x60 | ||
50 | /* CPU ID and Personality ID */ | ||
51 | #define MCU_BOARD_ID_REG 0x68 | ||
52 | |||
53 | #define MXC_MAX_EXP_IO_LINES 16 | ||
54 | |||
55 | /* interrupts like external uart , external ethernet etc*/ | ||
56 | #define EXPIO_INT_ENET 0 | ||
57 | #define EXPIO_INT_XUART_A 1 | ||
58 | #define EXPIO_INT_XUART_B 2 | ||
59 | #define EXPIO_INT_BUTTON_A 3 | ||
60 | #define EXPIO_INT_BUTTON_B 4 | ||
61 | |||
62 | static void __iomem *brd_io; | ||
63 | static struct irq_domain *domain; | ||
64 | |||
65 | static struct resource smsc911x_resources[] = { | ||
66 | { | ||
67 | .flags = IORESOURCE_MEM, | ||
68 | } , { | ||
69 | .flags = IORESOURCE_IRQ, | ||
70 | }, | ||
71 | }; | ||
72 | |||
73 | static struct smsc911x_platform_config smsc911x_config = { | ||
74 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
75 | .flags = SMSC911X_USE_32BIT | SMSC911X_FORCE_INTERNAL_PHY, | ||
76 | }; | ||
77 | |||
78 | static struct platform_device smsc_lan9217_device = { | ||
79 | .name = "smsc911x", | ||
80 | .id = -1, | ||
81 | .dev = { | ||
82 | .platform_data = &smsc911x_config, | ||
83 | }, | ||
84 | .num_resources = ARRAY_SIZE(smsc911x_resources), | ||
85 | .resource = smsc911x_resources, | ||
86 | }; | ||
87 | |||
88 | static void mxc_expio_irq_handler(u32 irq, struct irq_desc *desc) | ||
89 | { | ||
90 | u32 imr_val; | ||
91 | u32 int_valid; | ||
92 | u32 expio_irq; | ||
93 | |||
94 | /* irq = gpio irq number */ | ||
95 | desc->irq_data.chip->irq_mask(&desc->irq_data); | ||
96 | |||
97 | imr_val = __raw_readw(brd_io + INTR_MASK_REG); | ||
98 | int_valid = __raw_readw(brd_io + INTR_STATUS_REG) & ~imr_val; | ||
99 | |||
100 | expio_irq = 0; | ||
101 | for (; int_valid != 0; int_valid >>= 1, expio_irq++) { | ||
102 | if ((int_valid & 1) == 0) | ||
103 | continue; | ||
104 | generic_handle_irq(irq_find_mapping(domain, expio_irq)); | ||
105 | } | ||
106 | |||
107 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
108 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
109 | } | ||
110 | |||
111 | /* | ||
112 | * Disable an expio pin's interrupt by setting the bit in the imr. | ||
113 | * Irq is an expio virtual irq number | ||
114 | */ | ||
115 | static void expio_mask_irq(struct irq_data *d) | ||
116 | { | ||
117 | u16 reg; | ||
118 | u32 expio = d->hwirq; | ||
119 | |||
120 | reg = __raw_readw(brd_io + INTR_MASK_REG); | ||
121 | reg |= (1 << expio); | ||
122 | __raw_writew(reg, brd_io + INTR_MASK_REG); | ||
123 | } | ||
124 | |||
125 | static void expio_ack_irq(struct irq_data *d) | ||
126 | { | ||
127 | u32 expio = d->hwirq; | ||
128 | |||
129 | __raw_writew(1 << expio, brd_io + INTR_RESET_REG); | ||
130 | __raw_writew(0, brd_io + INTR_RESET_REG); | ||
131 | expio_mask_irq(d); | ||
132 | } | ||
133 | |||
134 | static void expio_unmask_irq(struct irq_data *d) | ||
135 | { | ||
136 | u16 reg; | ||
137 | u32 expio = d->hwirq; | ||
138 | |||
139 | reg = __raw_readw(brd_io + INTR_MASK_REG); | ||
140 | reg &= ~(1 << expio); | ||
141 | __raw_writew(reg, brd_io + INTR_MASK_REG); | ||
142 | } | ||
143 | |||
144 | static struct irq_chip expio_irq_chip = { | ||
145 | .irq_ack = expio_ack_irq, | ||
146 | .irq_mask = expio_mask_irq, | ||
147 | .irq_unmask = expio_unmask_irq, | ||
148 | }; | ||
149 | |||
150 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
151 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
152 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
153 | }; | ||
154 | |||
155 | int __init mxc_expio_init(u32 base, u32 intr_gpio) | ||
156 | { | ||
157 | u32 p_irq = gpio_to_irq(intr_gpio); | ||
158 | int irq_base; | ||
159 | int i; | ||
160 | |||
161 | brd_io = ioremap(BOARD_IO_ADDR(base), SZ_4K); | ||
162 | if (brd_io == NULL) | ||
163 | return -ENOMEM; | ||
164 | |||
165 | if ((__raw_readw(brd_io + MAGIC_NUMBER1_REG) != 0xAAAA) || | ||
166 | (__raw_readw(brd_io + MAGIC_NUMBER2_REG) != 0x5555) || | ||
167 | (__raw_readw(brd_io + MAGIC_NUMBER3_REG) != 0xCAFE)) { | ||
168 | pr_info("3-Stack Debug board not detected\n"); | ||
169 | iounmap(brd_io); | ||
170 | brd_io = NULL; | ||
171 | return -ENODEV; | ||
172 | } | ||
173 | |||
174 | pr_info("3-Stack Debug board detected, rev = 0x%04X\n", | ||
175 | readw(brd_io + CPLD_CODE_VER_REG)); | ||
176 | |||
177 | /* | ||
178 | * Configure INT line as GPIO input | ||
179 | */ | ||
180 | gpio_request(intr_gpio, "expio_pirq"); | ||
181 | gpio_direction_input(intr_gpio); | ||
182 | |||
183 | /* disable the interrupt and clear the status */ | ||
184 | __raw_writew(0, brd_io + INTR_MASK_REG); | ||
185 | __raw_writew(0xFFFF, brd_io + INTR_RESET_REG); | ||
186 | __raw_writew(0, brd_io + INTR_RESET_REG); | ||
187 | __raw_writew(0x1F, brd_io + INTR_MASK_REG); | ||
188 | |||
189 | irq_base = irq_alloc_descs(-1, 0, MXC_MAX_EXP_IO_LINES, numa_node_id()); | ||
190 | WARN_ON(irq_base < 0); | ||
191 | |||
192 | domain = irq_domain_add_legacy(NULL, MXC_MAX_EXP_IO_LINES, irq_base, 0, | ||
193 | &irq_domain_simple_ops, NULL); | ||
194 | WARN_ON(!domain); | ||
195 | |||
196 | for (i = irq_base; i < irq_base + MXC_MAX_EXP_IO_LINES; i++) { | ||
197 | irq_set_chip_and_handler(i, &expio_irq_chip, handle_level_irq); | ||
198 | set_irq_flags(i, IRQF_VALID); | ||
199 | } | ||
200 | irq_set_irq_type(p_irq, IRQF_TRIGGER_LOW); | ||
201 | irq_set_chained_handler(p_irq, mxc_expio_irq_handler); | ||
202 | |||
203 | /* Register Lan device on the debugboard */ | ||
204 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
205 | |||
206 | smsc911x_resources[0].start = LAN9217_BASE_ADDR(base); | ||
207 | smsc911x_resources[0].end = LAN9217_BASE_ADDR(base) + 0x100 - 1; | ||
208 | smsc911x_resources[1].start = irq_find_mapping(domain, EXPIO_INT_ENET); | ||
209 | smsc911x_resources[1].end = irq_find_mapping(domain, EXPIO_INT_ENET); | ||
210 | platform_device_register(&smsc_lan9217_device); | ||
211 | |||
212 | return 0; | ||
213 | } | ||
diff --git a/arch/arm/mach-imx/3ds_debugboard.h b/arch/arm/mach-imx/3ds_debugboard.h deleted file mode 100644 index 9fd6cb3f8fa..00000000000 --- a/arch/arm/mach-imx/3ds_debugboard.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MXC_3DS_DB_H__ | ||
14 | #define __ASM_ARCH_MXC_3DS_DB_H__ | ||
15 | |||
16 | extern int __init mxc_expio_init(u32 base, u32 intr_gpio); | ||
17 | |||
18 | #endif /* __ASM_ARCH_MXC_3DS_DB_H__ */ | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 3e628fd7a67..0519dd7f034 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -1,183 +1,65 @@ | |||
1 | config ARCH_MXC | 1 | config IMX_HAVE_DMA_V1 |
2 | bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 | ||
3 | select ARCH_REQUIRE_GPIOLIB | ||
4 | select ARM_PATCH_PHYS_VIRT | ||
5 | select AUTO_ZRELADDR if !ZBOOT_ROM | ||
6 | select CLKDEV_LOOKUP | ||
7 | select CLKSRC_MMIO | ||
8 | select GENERIC_CLOCKEVENTS | ||
9 | select GENERIC_IRQ_CHIP | ||
10 | select MULTI_IRQ_HANDLER | ||
11 | select SPARSE_IRQ | ||
12 | select USE_OF | ||
13 | help | ||
14 | Support for Freescale MXC/iMX-based family of processors | ||
15 | |||
16 | menu "Freescale i.MX support" | ||
17 | depends on ARCH_MXC | ||
18 | |||
19 | config MXC_IRQ_PRIOR | ||
20 | bool "Use IRQ priority" | ||
21 | help | ||
22 | Select this if you want to use prioritized IRQ handling. | ||
23 | This feature prevents higher priority ISR to be interrupted | ||
24 | by lower priority IRQ even IRQF_DISABLED flag is not set. | ||
25 | This may be useful in embedded applications, where are strong | ||
26 | requirements for timing. | ||
27 | Say N here, unless you have a specialized requirement. | ||
28 | |||
29 | config MXC_TZIC | ||
30 | bool | 2 | bool |
31 | 3 | # | |
32 | config MXC_AVIC | 4 | # ARCH_MX31 and ARCH_MX35 are left for compatibility |
33 | bool | 5 | # Some usages assume that having one of them implies not having (e.g.) ARCH_MX2. |
34 | 6 | # To easily distinguish good and reviewed from unreviewed usages new (and IMHO | |
35 | config MXC_DEBUG_BOARD | 7 | # more sensible) names are used: SOC_IMX31 and SOC_IMX35 |
36 | bool "Enable MXC debug board(for 3-stack)" | 8 | config ARCH_MX31 |
37 | help | ||
38 | The debug board is an integral part of the MXC 3-stack(PDK) | ||
39 | platforms, it can be attached or removed from the peripheral | ||
40 | board. On debug board, several debug devices(ethernet, UART, | ||
41 | buttons, LEDs and JTAG) are implemented. Between the MCU and | ||
42 | these devices, a CPLD is added as a bridge which performs | ||
43 | data/address de-multiplexing and decode, signal level shift, | ||
44 | interrupt control and various board functions. | ||
45 | |||
46 | config HAVE_EPIT | ||
47 | bool | ||
48 | |||
49 | config MXC_USE_EPIT | ||
50 | bool "Use EPIT instead of GPT" | ||
51 | depends on HAVE_EPIT | ||
52 | help | ||
53 | Use EPIT as the system timer on systems that have it. Normally you | ||
54 | don't have a reason to do so as the EPIT has the same features and | ||
55 | uses the same clocks as the GPT. Anyway, on some systems the GPT | ||
56 | may be in use for other purposes. | ||
57 | |||
58 | config MXC_ULPI | ||
59 | bool | ||
60 | |||
61 | config ARCH_HAS_RNGA | ||
62 | bool | ||
63 | |||
64 | config IRAM_ALLOC | ||
65 | bool | ||
66 | select GENERIC_ALLOCATOR | ||
67 | |||
68 | config HAVE_IMX_GPC | ||
69 | bool | ||
70 | |||
71 | config HAVE_IMX_MMDC | ||
72 | bool | ||
73 | |||
74 | config HAVE_IMX_SRC | ||
75 | def_bool y if SMP | ||
76 | |||
77 | config IMX_HAVE_IOMUX_V1 | ||
78 | bool | ||
79 | |||
80 | config ARCH_MXC_IOMUX_V3 | ||
81 | bool | ||
82 | |||
83 | config ARCH_MX1 | ||
84 | bool | ||
85 | |||
86 | config MACH_MX21 | ||
87 | bool | ||
88 | |||
89 | config ARCH_MX25 | ||
90 | bool | ||
91 | |||
92 | config MACH_MX27 | ||
93 | bool | ||
94 | |||
95 | config ARCH_MX5 | ||
96 | bool | ||
97 | |||
98 | config ARCH_MX50 | ||
99 | bool | ||
100 | |||
101 | config ARCH_MX51 | ||
102 | bool | 9 | bool |
103 | 10 | ||
104 | config ARCH_MX53 | 11 | config ARCH_MX35 |
105 | bool | 12 | bool |
106 | 13 | ||
107 | config SOC_IMX1 | 14 | config SOC_IMX1 |
108 | bool | 15 | bool |
109 | select ARCH_MX1 | ||
110 | select COMMON_CLK | ||
111 | select CPU_ARM920T | 16 | select CPU_ARM920T |
17 | select IMX_HAVE_DMA_V1 | ||
112 | select IMX_HAVE_IOMUX_V1 | 18 | select IMX_HAVE_IOMUX_V1 |
113 | select MXC_AVIC | 19 | select MXC_AVIC |
114 | 20 | ||
115 | config SOC_IMX21 | 21 | config SOC_IMX21 |
116 | bool | 22 | bool |
117 | select COMMON_CLK | ||
118 | select CPU_ARM926T | 23 | select CPU_ARM926T |
24 | select ARCH_MXC_AUDMUX_V1 | ||
25 | select IMX_HAVE_DMA_V1 | ||
119 | select IMX_HAVE_IOMUX_V1 | 26 | select IMX_HAVE_IOMUX_V1 |
120 | select MACH_MX21 | ||
121 | select MXC_AVIC | 27 | select MXC_AVIC |
122 | 28 | ||
123 | config SOC_IMX25 | 29 | config SOC_IMX25 |
124 | bool | 30 | bool |
125 | select ARCH_MX25 | ||
126 | select ARCH_MXC_IOMUX_V3 | ||
127 | select COMMON_CLK | ||
128 | select CPU_ARM926T | 31 | select CPU_ARM926T |
129 | select HAVE_CAN_FLEXCAN if CAN | 32 | select ARCH_MXC_AUDMUX_V2 |
33 | select ARCH_MXC_IOMUX_V3 | ||
130 | select MXC_AVIC | 34 | select MXC_AVIC |
131 | 35 | ||
132 | config SOC_IMX27 | 36 | config SOC_IMX27 |
133 | bool | 37 | bool |
134 | select COMMON_CLK | ||
135 | select CPU_ARM926T | 38 | select CPU_ARM926T |
39 | select ARCH_MXC_AUDMUX_V1 | ||
40 | select IMX_HAVE_DMA_V1 | ||
136 | select IMX_HAVE_IOMUX_V1 | 41 | select IMX_HAVE_IOMUX_V1 |
137 | select MACH_MX27 | ||
138 | select MXC_AVIC | 42 | select MXC_AVIC |
139 | 43 | ||
140 | config SOC_IMX31 | 44 | config SOC_IMX31 |
141 | bool | 45 | bool |
142 | select COMMON_CLK | ||
143 | select CPU_V6 | 46 | select CPU_V6 |
144 | select IMX_HAVE_PLATFORM_MXC_RNGA | 47 | select IMX_HAVE_PLATFORM_MXC_RNGA |
48 | select ARCH_MXC_AUDMUX_V2 | ||
49 | select ARCH_MX31 | ||
145 | select MXC_AVIC | 50 | select MXC_AVIC |
146 | select SMP_ON_UP if SMP | ||
147 | 51 | ||
148 | config SOC_IMX35 | 52 | config SOC_IMX35 |
149 | bool | 53 | bool |
54 | select CPU_V6 | ||
150 | select ARCH_MXC_IOMUX_V3 | 55 | select ARCH_MXC_IOMUX_V3 |
151 | select COMMON_CLK | 56 | select ARCH_MXC_AUDMUX_V2 |
152 | select CPU_V6K | ||
153 | select HAVE_CAN_FLEXCAN if CAN | ||
154 | select HAVE_EPIT | 57 | select HAVE_EPIT |
58 | select ARCH_MX35 | ||
155 | select MXC_AVIC | 59 | select MXC_AVIC |
156 | select SMP_ON_UP if SMP | ||
157 | |||
158 | config SOC_IMX5 | ||
159 | bool | ||
160 | select ARCH_HAS_CPUFREQ | ||
161 | select ARCH_MX5 | ||
162 | select ARCH_MXC_IOMUX_V3 | ||
163 | select COMMON_CLK | ||
164 | select CPU_V7 | ||
165 | select MXC_TZIC | ||
166 | 60 | ||
167 | config SOC_IMX50 | ||
168 | bool | ||
169 | select ARCH_MX50 | ||
170 | select SOC_IMX5 | ||
171 | 61 | ||
172 | config SOC_IMX51 | 62 | if ARCH_MX1 |
173 | bool | ||
174 | select ARCH_MX5 | ||
175 | select ARCH_MX51 | ||
176 | select PINCTRL | ||
177 | select PINCTRL_IMX51 | ||
178 | select SOC_IMX5 | ||
179 | |||
180 | if ARCH_MULTI_V4T | ||
181 | 63 | ||
182 | comment "MX1 platforms:" | 64 | comment "MX1 platforms:" |
183 | config MACH_MXLADS | 65 | config MACH_MXLADS |
@@ -185,10 +67,10 @@ config MACH_MXLADS | |||
185 | 67 | ||
186 | config ARCH_MX1ADS | 68 | config ARCH_MX1ADS |
187 | bool "MX1ADS platform" | 69 | bool "MX1ADS platform" |
188 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
189 | select IMX_HAVE_PLATFORM_IMX_UART | ||
190 | select MACH_MXLADS | 70 | select MACH_MXLADS |
191 | select SOC_IMX1 | 71 | select SOC_IMX1 |
72 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
73 | select IMX_HAVE_PLATFORM_IMX_UART | ||
192 | help | 74 | help |
193 | Say Y here if you are using Motorola MX1ADS/MXLADS boards | 75 | Say Y here if you are using Motorola MX1ADS/MXLADS boards |
194 | 76 | ||
@@ -200,51 +82,73 @@ config MACH_SCB9328 | |||
200 | 82 | ||
201 | config MACH_APF9328 | 83 | config MACH_APF9328 |
202 | bool "APF9328" | 84 | bool "APF9328" |
203 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
204 | select IMX_HAVE_PLATFORM_IMX_UART | ||
205 | select SOC_IMX1 | 85 | select SOC_IMX1 |
86 | select IMX_HAVE_PLATFORM_IMX_UART | ||
206 | help | 87 | help |
207 | Say Yes here if you are using the Armadeus APF9328 development board | 88 | Say Yes here if you are using the Armadeus APF9328 development board |
208 | 89 | ||
209 | endif | 90 | endif |
210 | 91 | ||
211 | if ARCH_MULTI_V5 | 92 | if ARCH_MX2 |
93 | |||
94 | choice | ||
95 | prompt "CPUs:" | ||
96 | default MACH_MX21 | ||
97 | |||
98 | config MACH_MX21 | ||
99 | bool "i.MX21 support" | ||
100 | help | ||
101 | This enables support for Freescale's MX2 based i.MX21 processor. | ||
102 | |||
103 | config MACH_MX27 | ||
104 | bool "i.MX27 support" | ||
105 | help | ||
106 | This enables support for Freescale's MX2 based i.MX27 processor. | ||
107 | |||
108 | endchoice | ||
109 | |||
110 | endif | ||
111 | |||
112 | if MACH_MX21 | ||
212 | 113 | ||
213 | comment "MX21 platforms:" | 114 | comment "MX21 platforms:" |
214 | 115 | ||
215 | config MACH_MX21ADS | 116 | config MACH_MX21ADS |
216 | bool "MX21ADS platform" | 117 | bool "MX21ADS platform" |
118 | select SOC_IMX21 | ||
217 | select IMX_HAVE_PLATFORM_IMX_FB | 119 | select IMX_HAVE_PLATFORM_IMX_FB |
218 | select IMX_HAVE_PLATFORM_IMX_UART | 120 | select IMX_HAVE_PLATFORM_IMX_UART |
219 | select IMX_HAVE_PLATFORM_MXC_MMC | 121 | select IMX_HAVE_PLATFORM_MXC_MMC |
220 | select IMX_HAVE_PLATFORM_MXC_NAND | 122 | select IMX_HAVE_PLATFORM_MXC_NAND |
221 | select SOC_IMX21 | ||
222 | help | 123 | help |
223 | Include support for MX21ADS platform. This includes specific | 124 | Include support for MX21ADS platform. This includes specific |
224 | configurations for the board and its peripherals. | 125 | configurations for the board and its peripherals. |
225 | 126 | ||
127 | endif | ||
128 | |||
129 | if ARCH_MX25 | ||
130 | |||
226 | comment "MX25 platforms:" | 131 | comment "MX25 platforms:" |
227 | 132 | ||
228 | config MACH_MX25_3DS | 133 | config MACH_MX25_3DS |
229 | bool "Support MX25PDK (3DS) Platform" | 134 | bool "Support MX25PDK (3DS) Platform" |
230 | select IMX_HAVE_PLATFORM_FLEXCAN | 135 | select SOC_IMX25 |
231 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 136 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
232 | select IMX_HAVE_PLATFORM_IMX2_WDT | 137 | select IMX_HAVE_PLATFORM_IMX2_WDT |
233 | select IMX_HAVE_PLATFORM_IMXDI_RTC | 138 | select IMX_HAVE_PLATFORM_IMXDI_RTC |
234 | select IMX_HAVE_PLATFORM_IMX_FB | ||
235 | select IMX_HAVE_PLATFORM_IMX_I2C | 139 | select IMX_HAVE_PLATFORM_IMX_I2C |
140 | select IMX_HAVE_PLATFORM_IMX_FB | ||
236 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | 141 | select IMX_HAVE_PLATFORM_IMX_KEYPAD |
237 | select IMX_HAVE_PLATFORM_IMX_UART | 142 | select IMX_HAVE_PLATFORM_IMX_UART |
238 | select IMX_HAVE_PLATFORM_MXC_EHCI | 143 | select IMX_HAVE_PLATFORM_MXC_EHCI |
239 | select IMX_HAVE_PLATFORM_MXC_NAND | 144 | select IMX_HAVE_PLATFORM_MXC_NAND |
240 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 145 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
241 | select SOC_IMX25 | ||
242 | 146 | ||
243 | config MACH_EUKREA_CPUIMX25SD | 147 | config MACH_EUKREA_CPUIMX25 |
244 | bool "Support Eukrea CPUIMX25 Platform" | 148 | bool "Support Eukrea CPUIMX25 Platform" |
149 | select SOC_IMX25 | ||
245 | select IMX_HAVE_PLATFORM_FLEXCAN | 150 | select IMX_HAVE_PLATFORM_FLEXCAN |
246 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 151 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
247 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
248 | select IMX_HAVE_PLATFORM_IMXDI_RTC | 152 | select IMX_HAVE_PLATFORM_IMXDI_RTC |
249 | select IMX_HAVE_PLATFORM_IMX_FB | 153 | select IMX_HAVE_PLATFORM_IMX_FB |
250 | select IMX_HAVE_PLATFORM_IMX_I2C | 154 | select IMX_HAVE_PLATFORM_IMX_I2C |
@@ -253,18 +157,16 @@ config MACH_EUKREA_CPUIMX25SD | |||
253 | select IMX_HAVE_PLATFORM_MXC_NAND | 157 | select IMX_HAVE_PLATFORM_MXC_NAND |
254 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 158 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
255 | select MXC_ULPI if USB_ULPI | 159 | select MXC_ULPI if USB_ULPI |
256 | select SOC_IMX25 | ||
257 | 160 | ||
258 | choice | 161 | choice |
259 | prompt "Baseboard" | 162 | prompt "Baseboard" |
260 | depends on MACH_EUKREA_CPUIMX25SD | 163 | depends on MACH_EUKREA_CPUIMX25 |
261 | default MACH_EUKREA_MBIMXSD25_BASEBOARD | 164 | default MACH_EUKREA_MBIMXSD25_BASEBOARD |
262 | 165 | ||
263 | config MACH_EUKREA_MBIMXSD25_BASEBOARD | 166 | config MACH_EUKREA_MBIMXSD25_BASEBOARD |
264 | bool "Eukrea MBIMXSD development board" | 167 | bool "Eukrea MBIMXSD development board" |
265 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 168 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
266 | select IMX_HAVE_PLATFORM_IMX_SSI | 169 | select IMX_HAVE_PLATFORM_IMX_SSI |
267 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
268 | select LEDS_GPIO_REGISTER | 170 | select LEDS_GPIO_REGISTER |
269 | help | 171 | help |
270 | This adds board specific devices that can be found on Eukrea's | 172 | This adds board specific devices that can be found on Eukrea's |
@@ -272,30 +174,28 @@ config MACH_EUKREA_MBIMXSD25_BASEBOARD | |||
272 | 174 | ||
273 | endchoice | 175 | endchoice |
274 | 176 | ||
275 | config MACH_IMX25_DT | 177 | endif |
276 | bool "Support i.MX25 platforms from device tree" | 178 | |
277 | select SOC_IMX25 | 179 | if MACH_MX27 |
278 | help | ||
279 | Include support for Freescale i.MX25 based platforms | ||
280 | using the device tree for discovery | ||
281 | 180 | ||
282 | comment "MX27 platforms:" | 181 | comment "MX27 platforms:" |
283 | 182 | ||
284 | config MACH_MX27ADS | 183 | config MACH_MX27ADS |
285 | bool "MX27ADS platform" | 184 | bool "MX27ADS platform" |
185 | select SOC_IMX27 | ||
286 | select IMX_HAVE_PLATFORM_IMX_FB | 186 | select IMX_HAVE_PLATFORM_IMX_FB |
287 | select IMX_HAVE_PLATFORM_IMX_I2C | 187 | select IMX_HAVE_PLATFORM_IMX_I2C |
288 | select IMX_HAVE_PLATFORM_IMX_UART | 188 | select IMX_HAVE_PLATFORM_IMX_UART |
289 | select IMX_HAVE_PLATFORM_MXC_MMC | 189 | select IMX_HAVE_PLATFORM_MXC_MMC |
290 | select IMX_HAVE_PLATFORM_MXC_NAND | 190 | select IMX_HAVE_PLATFORM_MXC_NAND |
291 | select IMX_HAVE_PLATFORM_MXC_W1 | 191 | select IMX_HAVE_PLATFORM_MXC_W1 |
292 | select SOC_IMX27 | ||
293 | help | 192 | help |
294 | Include support for MX27ADS platform. This includes specific | 193 | Include support for MX27ADS platform. This includes specific |
295 | configurations for the board and its peripherals. | 194 | configurations for the board and its peripherals. |
296 | 195 | ||
297 | config MACH_PCM038 | 196 | config MACH_PCM038 |
298 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" | 197 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" |
198 | select SOC_IMX27 | ||
299 | select IMX_HAVE_PLATFORM_IMX2_WDT | 199 | select IMX_HAVE_PLATFORM_IMX2_WDT |
300 | select IMX_HAVE_PLATFORM_IMX_I2C | 200 | select IMX_HAVE_PLATFORM_IMX_I2C |
301 | select IMX_HAVE_PLATFORM_IMX_UART | 201 | select IMX_HAVE_PLATFORM_IMX_UART |
@@ -304,7 +204,6 @@ config MACH_PCM038 | |||
304 | select IMX_HAVE_PLATFORM_MXC_W1 | 204 | select IMX_HAVE_PLATFORM_MXC_W1 |
305 | select IMX_HAVE_PLATFORM_SPI_IMX | 205 | select IMX_HAVE_PLATFORM_SPI_IMX |
306 | select MXC_ULPI if USB_ULPI | 206 | select MXC_ULPI if USB_ULPI |
307 | select SOC_IMX27 | ||
308 | help | 207 | help |
309 | Include support for phyCORE-i.MX27 (aka pcm038) platform. This | 208 | Include support for phyCORE-i.MX27 (aka pcm038) platform. This |
310 | includes specific configurations for the module and its peripherals. | 209 | includes specific configurations for the module and its peripherals. |
@@ -326,6 +225,7 @@ endchoice | |||
326 | 225 | ||
327 | config MACH_CPUIMX27 | 226 | config MACH_CPUIMX27 |
328 | bool "Eukrea CPUIMX27 module" | 227 | bool "Eukrea CPUIMX27 module" |
228 | select SOC_IMX27 | ||
329 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 229 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
330 | select IMX_HAVE_PLATFORM_IMX2_WDT | 230 | select IMX_HAVE_PLATFORM_IMX2_WDT |
331 | select IMX_HAVE_PLATFORM_IMX_I2C | 231 | select IMX_HAVE_PLATFORM_IMX_I2C |
@@ -334,7 +234,6 @@ config MACH_CPUIMX27 | |||
334 | select IMX_HAVE_PLATFORM_MXC_NAND | 234 | select IMX_HAVE_PLATFORM_MXC_NAND |
335 | select IMX_HAVE_PLATFORM_MXC_W1 | 235 | select IMX_HAVE_PLATFORM_MXC_W1 |
336 | select MXC_ULPI if USB_ULPI | 236 | select MXC_ULPI if USB_ULPI |
337 | select SOC_IMX27 | ||
338 | help | 237 | help |
339 | Include support for Eukrea CPUIMX27 platform. This includes | 238 | Include support for Eukrea CPUIMX27 platform. This includes |
340 | specific configurations for the module and its peripherals. | 239 | specific configurations for the module and its peripherals. |
@@ -376,36 +275,31 @@ endchoice | |||
376 | 275 | ||
377 | config MACH_MX27_3DS | 276 | config MACH_MX27_3DS |
378 | bool "MX27PDK platform" | 277 | bool "MX27PDK platform" |
278 | select SOC_IMX27 | ||
379 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 279 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
380 | select IMX_HAVE_PLATFORM_IMX2_WDT | 280 | select IMX_HAVE_PLATFORM_IMX2_WDT |
381 | select IMX_HAVE_PLATFORM_IMX_FB | 281 | select IMX_HAVE_PLATFORM_IMX_FB |
382 | select IMX_HAVE_PLATFORM_IMX_I2C | 282 | select IMX_HAVE_PLATFORM_IMX_I2C |
383 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | 283 | select IMX_HAVE_PLATFORM_IMX_KEYPAD |
384 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
385 | select IMX_HAVE_PLATFORM_IMX_UART | 284 | select IMX_HAVE_PLATFORM_IMX_UART |
386 | select IMX_HAVE_PLATFORM_MX2_CAMERA | ||
387 | select IMX_HAVE_PLATFORM_MXC_EHCI | 285 | select IMX_HAVE_PLATFORM_MXC_EHCI |
388 | select IMX_HAVE_PLATFORM_MXC_MMC | 286 | select IMX_HAVE_PLATFORM_MXC_MMC |
389 | select IMX_HAVE_PLATFORM_SPI_IMX | 287 | select IMX_HAVE_PLATFORM_SPI_IMX |
390 | select MXC_DEBUG_BOARD | 288 | select MXC_DEBUG_BOARD |
391 | select MXC_ULPI if USB_ULPI | 289 | select MXC_ULPI if USB_ULPI |
392 | select SOC_IMX27 | ||
393 | help | 290 | help |
394 | Include support for MX27PDK platform. This includes specific | 291 | Include support for MX27PDK platform. This includes specific |
395 | configurations for the board and its peripherals. | 292 | configurations for the board and its peripherals. |
396 | 293 | ||
397 | config MACH_IMX27_VISSTRIM_M10 | 294 | config MACH_IMX27_VISSTRIM_M10 |
398 | bool "Vista Silicon i.MX27 Visstrim_m10" | 295 | bool "Vista Silicon i.MX27 Visstrim_m10" |
296 | select SOC_IMX27 | ||
399 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 297 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
400 | select IMX_HAVE_PLATFORM_IMX_I2C | 298 | select IMX_HAVE_PLATFORM_IMX_I2C |
401 | select IMX_HAVE_PLATFORM_IMX_SSI | 299 | select IMX_HAVE_PLATFORM_IMX_SSI |
402 | select IMX_HAVE_PLATFORM_IMX_UART | 300 | select IMX_HAVE_PLATFORM_IMX_UART |
403 | select IMX_HAVE_PLATFORM_MX2_CAMERA | ||
404 | select IMX_HAVE_PLATFORM_MX2_EMMA | ||
405 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
406 | select IMX_HAVE_PLATFORM_MXC_MMC | 301 | select IMX_HAVE_PLATFORM_MXC_MMC |
407 | select LEDS_GPIO_REGISTER | 302 | select IMX_HAVE_PLATFORM_MXC_EHCI |
408 | select SOC_IMX27 | ||
409 | help | 303 | help |
410 | Include support for Visstrim_m10 platform and its different variants. | 304 | Include support for Visstrim_m10 platform and its different variants. |
411 | This includes specific configurations for the board and its | 305 | This includes specific configurations for the board and its |
@@ -413,15 +307,16 @@ config MACH_IMX27_VISSTRIM_M10 | |||
413 | 307 | ||
414 | config MACH_IMX27LITE | 308 | config MACH_IMX27LITE |
415 | bool "LogicPD MX27 LITEKIT platform" | 309 | bool "LogicPD MX27 LITEKIT platform" |
416 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
417 | select IMX_HAVE_PLATFORM_IMX_UART | ||
418 | select SOC_IMX27 | 310 | select SOC_IMX27 |
311 | select IMX_HAVE_PLATFORM_IMX_UART | ||
312 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
419 | help | 313 | help |
420 | Include support for MX27 LITEKIT platform. This includes specific | 314 | Include support for MX27 LITEKIT platform. This includes specific |
421 | configurations for the board and its peripherals. | 315 | configurations for the board and its peripherals. |
422 | 316 | ||
423 | config MACH_PCA100 | 317 | config MACH_PCA100 |
424 | bool "Phytec phyCARD-s (pca100)" | 318 | bool "Phytec phyCARD-s (pca100)" |
319 | select SOC_IMX27 | ||
425 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 320 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
426 | select IMX_HAVE_PLATFORM_IMX2_WDT | 321 | select IMX_HAVE_PLATFORM_IMX2_WDT |
427 | select IMX_HAVE_PLATFORM_IMX_FB | 322 | select IMX_HAVE_PLATFORM_IMX_FB |
@@ -434,52 +329,44 @@ config MACH_PCA100 | |||
434 | select IMX_HAVE_PLATFORM_MXC_W1 | 329 | select IMX_HAVE_PLATFORM_MXC_W1 |
435 | select IMX_HAVE_PLATFORM_SPI_IMX | 330 | select IMX_HAVE_PLATFORM_SPI_IMX |
436 | select MXC_ULPI if USB_ULPI | 331 | select MXC_ULPI if USB_ULPI |
437 | select SOC_IMX27 | ||
438 | help | 332 | help |
439 | Include support for phyCARD-s (aka pca100) platform. This | 333 | Include support for phyCARD-s (aka pca100) platform. This |
440 | includes specific configurations for the module and its peripherals. | 334 | includes specific configurations for the module and its peripherals. |
441 | 335 | ||
442 | config MACH_MXT_TD60 | 336 | config MACH_MXT_TD60 |
443 | bool "Maxtrack i-MXT TD60" | 337 | bool "Maxtrack i-MXT TD60" |
338 | select SOC_IMX27 | ||
444 | select IMX_HAVE_PLATFORM_IMX_FB | 339 | select IMX_HAVE_PLATFORM_IMX_FB |
445 | select IMX_HAVE_PLATFORM_IMX_I2C | 340 | select IMX_HAVE_PLATFORM_IMX_I2C |
446 | select IMX_HAVE_PLATFORM_IMX_UART | 341 | select IMX_HAVE_PLATFORM_IMX_UART |
447 | select IMX_HAVE_PLATFORM_MXC_MMC | 342 | select IMX_HAVE_PLATFORM_MXC_MMC |
448 | select IMX_HAVE_PLATFORM_MXC_NAND | 343 | select IMX_HAVE_PLATFORM_MXC_NAND |
449 | select SOC_IMX27 | ||
450 | help | 344 | help |
451 | Include support for i-MXT (aka td60) platform. This | 345 | Include support for i-MXT (aka td60) platform. This |
452 | includes specific configurations for the module and its peripherals. | 346 | includes specific configurations for the module and its peripherals. |
453 | 347 | ||
454 | config MACH_IMX27IPCAM | 348 | config MACH_IMX27IPCAM |
455 | bool "IMX27 IPCAM platform" | 349 | bool "IMX27 IPCAM platform" |
350 | select SOC_IMX27 | ||
456 | select IMX_HAVE_PLATFORM_IMX2_WDT | 351 | select IMX_HAVE_PLATFORM_IMX2_WDT |
457 | select IMX_HAVE_PLATFORM_IMX_UART | 352 | select IMX_HAVE_PLATFORM_IMX_UART |
458 | select SOC_IMX27 | ||
459 | help | 353 | help |
460 | Include support for IMX27 IPCAM platform. This includes specific | 354 | Include support for IMX27 IPCAM platform. This includes specific |
461 | configurations for the board and its peripherals. | 355 | configurations for the board and its peripherals. |
462 | 356 | ||
463 | config MACH_IMX27_DT | ||
464 | bool "Support i.MX27 platforms from device tree" | ||
465 | select SOC_IMX27 | ||
466 | help | ||
467 | Include support for Freescale i.MX27 based platforms | ||
468 | using the device tree for discovery | ||
469 | |||
470 | endif | 357 | endif |
471 | 358 | ||
472 | if ARCH_MULTI_V6 | 359 | if ARCH_MX3 |
473 | 360 | ||
474 | comment "MX31 platforms:" | 361 | comment "MX31 platforms:" |
475 | 362 | ||
476 | config MACH_MX31ADS | 363 | config MACH_MX31ADS |
477 | bool "Support MX31ADS platforms" | 364 | bool "Support MX31ADS platforms" |
478 | default y | 365 | select SOC_IMX31 |
479 | select IMX_HAVE_PLATFORM_IMX_I2C | 366 | select IMX_HAVE_PLATFORM_IMX_I2C |
480 | select IMX_HAVE_PLATFORM_IMX_SSI | 367 | select IMX_HAVE_PLATFORM_IMX_SSI |
481 | select IMX_HAVE_PLATFORM_IMX_UART | 368 | select IMX_HAVE_PLATFORM_IMX_UART |
482 | select SOC_IMX31 | 369 | default y |
483 | help | 370 | help |
484 | Include support for MX31ADS platform. This includes specific | 371 | Include support for MX31ADS platform. This includes specific |
485 | configurations for the board and its peripherals. | 372 | configurations for the board and its peripherals. |
@@ -497,19 +384,21 @@ config MACH_MX31ADS_WM1133_EV1 | |||
497 | 384 | ||
498 | config MACH_MX31LILLY | 385 | config MACH_MX31LILLY |
499 | bool "Support MX31 LILLY-1131 platforms (INCO startec)" | 386 | bool "Support MX31 LILLY-1131 platforms (INCO startec)" |
387 | select SOC_IMX31 | ||
500 | select IMX_HAVE_PLATFORM_IMX_UART | 388 | select IMX_HAVE_PLATFORM_IMX_UART |
501 | select IMX_HAVE_PLATFORM_IPU_CORE | 389 | select IMX_HAVE_PLATFORM_IPU_CORE |
502 | select IMX_HAVE_PLATFORM_MXC_EHCI | 390 | select IMX_HAVE_PLATFORM_MXC_EHCI |
503 | select IMX_HAVE_PLATFORM_MXC_MMC | 391 | select IMX_HAVE_PLATFORM_MXC_MMC |
504 | select IMX_HAVE_PLATFORM_SPI_IMX | 392 | select IMX_HAVE_PLATFORM_SPI_IMX |
505 | select MXC_ULPI if USB_ULPI | 393 | select MXC_ULPI if USB_ULPI |
506 | select SOC_IMX31 | ||
507 | help | 394 | help |
508 | Include support for mx31 based LILLY1131 modules. This includes | 395 | Include support for mx31 based LILLY1131 modules. This includes |
509 | specific configurations for the board and its peripherals. | 396 | specific configurations for the board and its peripherals. |
510 | 397 | ||
511 | config MACH_MX31LITE | 398 | config MACH_MX31LITE |
512 | bool "Support MX31 LITEKIT (LogicPD)" | 399 | bool "Support MX31 LITEKIT (LogicPD)" |
400 | select SOC_IMX31 | ||
401 | select MXC_ULPI if USB_ULPI | ||
513 | select IMX_HAVE_PLATFORM_IMX2_WDT | 402 | select IMX_HAVE_PLATFORM_IMX2_WDT |
514 | select IMX_HAVE_PLATFORM_IMX_UART | 403 | select IMX_HAVE_PLATFORM_IMX_UART |
515 | select IMX_HAVE_PLATFORM_MXC_EHCI | 404 | select IMX_HAVE_PLATFORM_MXC_EHCI |
@@ -518,14 +407,13 @@ config MACH_MX31LITE | |||
518 | select IMX_HAVE_PLATFORM_MXC_RTC | 407 | select IMX_HAVE_PLATFORM_MXC_RTC |
519 | select IMX_HAVE_PLATFORM_SPI_IMX | 408 | select IMX_HAVE_PLATFORM_SPI_IMX |
520 | select LEDS_GPIO_REGISTER | 409 | select LEDS_GPIO_REGISTER |
521 | select MXC_ULPI if USB_ULPI | ||
522 | select SOC_IMX31 | ||
523 | help | 410 | help |
524 | Include support for MX31 LITEKIT platform. This includes specific | 411 | Include support for MX31 LITEKIT platform. This includes specific |
525 | configurations for the board and its peripherals. | 412 | configurations for the board and its peripherals. |
526 | 413 | ||
527 | config MACH_PCM037 | 414 | config MACH_PCM037 |
528 | bool "Support Phytec pcm037 (i.MX31) platforms" | 415 | bool "Support Phytec pcm037 (i.MX31) platforms" |
416 | select SOC_IMX31 | ||
529 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 417 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
530 | select IMX_HAVE_PLATFORM_IMX2_WDT | 418 | select IMX_HAVE_PLATFORM_IMX2_WDT |
531 | select IMX_HAVE_PLATFORM_IMX_I2C | 419 | select IMX_HAVE_PLATFORM_IMX_I2C |
@@ -536,7 +424,6 @@ config MACH_PCM037 | |||
536 | select IMX_HAVE_PLATFORM_MXC_NAND | 424 | select IMX_HAVE_PLATFORM_MXC_NAND |
537 | select IMX_HAVE_PLATFORM_MXC_W1 | 425 | select IMX_HAVE_PLATFORM_MXC_W1 |
538 | select MXC_ULPI if USB_ULPI | 426 | select MXC_ULPI if USB_ULPI |
539 | select SOC_IMX31 | ||
540 | help | 427 | help |
541 | Include support for Phytec pcm037 platform. This includes | 428 | Include support for Phytec pcm037 platform. This includes |
542 | specific configurations for the board and its peripherals. | 429 | specific configurations for the board and its peripherals. |
@@ -553,20 +440,18 @@ config MACH_PCM037_EET | |||
553 | 440 | ||
554 | config MACH_MX31_3DS | 441 | config MACH_MX31_3DS |
555 | bool "Support MX31PDK (3DS)" | 442 | bool "Support MX31PDK (3DS)" |
443 | select SOC_IMX31 | ||
444 | select MXC_DEBUG_BOARD | ||
556 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 445 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
557 | select IMX_HAVE_PLATFORM_IMX2_WDT | 446 | select IMX_HAVE_PLATFORM_IMX2_WDT |
558 | select IMX_HAVE_PLATFORM_IMX_I2C | 447 | select IMX_HAVE_PLATFORM_IMX_I2C |
559 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | 448 | select IMX_HAVE_PLATFORM_IMX_KEYPAD |
560 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
561 | select IMX_HAVE_PLATFORM_IMX_UART | 449 | select IMX_HAVE_PLATFORM_IMX_UART |
562 | select IMX_HAVE_PLATFORM_IPU_CORE | 450 | select IMX_HAVE_PLATFORM_IPU_CORE |
563 | select IMX_HAVE_PLATFORM_MXC_EHCI | 451 | select IMX_HAVE_PLATFORM_MXC_EHCI |
564 | select IMX_HAVE_PLATFORM_MXC_MMC | ||
565 | select IMX_HAVE_PLATFORM_MXC_NAND | 452 | select IMX_HAVE_PLATFORM_MXC_NAND |
566 | select IMX_HAVE_PLATFORM_SPI_IMX | 453 | select IMX_HAVE_PLATFORM_SPI_IMX |
567 | select MXC_DEBUG_BOARD | ||
568 | select MXC_ULPI if USB_ULPI | 454 | select MXC_ULPI if USB_ULPI |
569 | select SOC_IMX31 | ||
570 | help | 455 | help |
571 | Include support for MX31PDK (3DS) platform. This includes specific | 456 | Include support for MX31PDK (3DS) platform. This includes specific |
572 | configurations for the board and its peripherals. | 457 | configurations for the board and its peripherals. |
@@ -582,10 +467,9 @@ config MACH_MX31_3DS_MXC_NAND_USE_BBT | |||
582 | 467 | ||
583 | config MACH_MX31MOBOARD | 468 | config MACH_MX31MOBOARD |
584 | bool "Support mx31moboard platforms (EPFL Mobots group)" | 469 | bool "Support mx31moboard platforms (EPFL Mobots group)" |
470 | select SOC_IMX31 | ||
585 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 471 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
586 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
587 | select IMX_HAVE_PLATFORM_IMX_I2C | 472 | select IMX_HAVE_PLATFORM_IMX_I2C |
588 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
589 | select IMX_HAVE_PLATFORM_IMX_UART | 473 | select IMX_HAVE_PLATFORM_IMX_UART |
590 | select IMX_HAVE_PLATFORM_IPU_CORE | 474 | select IMX_HAVE_PLATFORM_IPU_CORE |
591 | select IMX_HAVE_PLATFORM_MXC_EHCI | 475 | select IMX_HAVE_PLATFORM_MXC_EHCI |
@@ -593,22 +477,21 @@ config MACH_MX31MOBOARD | |||
593 | select IMX_HAVE_PLATFORM_SPI_IMX | 477 | select IMX_HAVE_PLATFORM_SPI_IMX |
594 | select LEDS_GPIO_REGISTER | 478 | select LEDS_GPIO_REGISTER |
595 | select MXC_ULPI if USB_ULPI | 479 | select MXC_ULPI if USB_ULPI |
596 | select SOC_IMX31 | ||
597 | help | 480 | help |
598 | Include support for mx31moboard platform. This includes specific | 481 | Include support for mx31moboard platform. This includes specific |
599 | configurations for the board and its peripherals. | 482 | configurations for the board and its peripherals. |
600 | 483 | ||
601 | config MACH_QONG | 484 | config MACH_QONG |
602 | bool "Support Dave/DENX QongEVB-LITE platform" | 485 | bool "Support Dave/DENX QongEVB-LITE platform" |
603 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
604 | select IMX_HAVE_PLATFORM_IMX_UART | ||
605 | select SOC_IMX31 | 486 | select SOC_IMX31 |
487 | select IMX_HAVE_PLATFORM_IMX_UART | ||
606 | help | 488 | help |
607 | Include support for Dave/DENX QongEVB-LITE platform. This includes | 489 | Include support for Dave/DENX QongEVB-LITE platform. This includes |
608 | specific configurations for the board and its peripherals. | 490 | specific configurations for the board and its peripherals. |
609 | 491 | ||
610 | config MACH_ARMADILLO5X0 | 492 | config MACH_ARMADILLO5X0 |
611 | bool "Support Atmark Armadillo-500 Development Base Board" | 493 | bool "Support Atmark Armadillo-500 Development Base Board" |
494 | select SOC_IMX31 | ||
612 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 495 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
613 | select IMX_HAVE_PLATFORM_IMX_I2C | 496 | select IMX_HAVE_PLATFORM_IMX_I2C |
614 | select IMX_HAVE_PLATFORM_IMX_UART | 497 | select IMX_HAVE_PLATFORM_IMX_UART |
@@ -617,39 +500,32 @@ config MACH_ARMADILLO5X0 | |||
617 | select IMX_HAVE_PLATFORM_MXC_MMC | 500 | select IMX_HAVE_PLATFORM_MXC_MMC |
618 | select IMX_HAVE_PLATFORM_MXC_NAND | 501 | select IMX_HAVE_PLATFORM_MXC_NAND |
619 | select MXC_ULPI if USB_ULPI | 502 | select MXC_ULPI if USB_ULPI |
620 | select SOC_IMX31 | ||
621 | help | 503 | help |
622 | Include support for Atmark Armadillo-500 platform. This includes | 504 | Include support for Atmark Armadillo-500 platform. This includes |
623 | specific configurations for the board and its peripherals. | 505 | specific configurations for the board and its peripherals. |
624 | 506 | ||
625 | config MACH_KZM_ARM11_01 | 507 | config MACH_KZM_ARM11_01 |
626 | bool "Support KZM-ARM11-01(Kyoto Microcomputer)" | 508 | bool "Support KZM-ARM11-01(Kyoto Microcomputer)" |
627 | select IMX_HAVE_PLATFORM_IMX_UART | ||
628 | select SOC_IMX31 | 509 | select SOC_IMX31 |
510 | select IMX_HAVE_PLATFORM_IMX_UART | ||
629 | help | 511 | help |
630 | Include support for KZM-ARM11-01. This includes specific | 512 | Include support for KZM-ARM11-01. This includes specific |
631 | configurations for the board and its peripherals. | 513 | configurations for the board and its peripherals. |
632 | 514 | ||
633 | config MACH_BUG | 515 | config MACH_BUG |
634 | bool "Support Buglabs BUGBase platform" | 516 | bool "Support Buglabs BUGBase platform" |
635 | default y | ||
636 | select IMX_HAVE_PLATFORM_IMX_UART | ||
637 | select SOC_IMX31 | 517 | select SOC_IMX31 |
518 | select IMX_HAVE_PLATFORM_IMX_UART | ||
519 | default y | ||
638 | help | 520 | help |
639 | Include support for BUGBase 1.3 platform. This includes specific | 521 | Include support for BUGBase 1.3 platform. This includes specific |
640 | configurations for the board and its peripherals. | 522 | configurations for the board and its peripherals. |
641 | 523 | ||
642 | config MACH_IMX31_DT | ||
643 | bool "Support i.MX31 platforms from device tree" | ||
644 | select SOC_IMX31 | ||
645 | help | ||
646 | Include support for Freescale i.MX31 based platforms | ||
647 | using the device tree for discovery. | ||
648 | |||
649 | comment "MX35 platforms:" | 524 | comment "MX35 platforms:" |
650 | 525 | ||
651 | config MACH_PCM043 | 526 | config MACH_PCM043 |
652 | bool "Support Phytec pcm043 (i.MX35) platforms" | 527 | bool "Support Phytec pcm043 (i.MX35) platforms" |
528 | select SOC_IMX35 | ||
653 | select IMX_HAVE_PLATFORM_FLEXCAN | 529 | select IMX_HAVE_PLATFORM_FLEXCAN |
654 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 530 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
655 | select IMX_HAVE_PLATFORM_IMX2_WDT | 531 | select IMX_HAVE_PLATFORM_IMX2_WDT |
@@ -661,31 +537,28 @@ config MACH_PCM043 | |||
661 | select IMX_HAVE_PLATFORM_MXC_NAND | 537 | select IMX_HAVE_PLATFORM_MXC_NAND |
662 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 538 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
663 | select MXC_ULPI if USB_ULPI | 539 | select MXC_ULPI if USB_ULPI |
664 | select SOC_IMX35 | ||
665 | help | 540 | help |
666 | Include support for Phytec pcm043 platform. This includes | 541 | Include support for Phytec pcm043 platform. This includes |
667 | specific configurations for the board and its peripherals. | 542 | specific configurations for the board and its peripherals. |
668 | 543 | ||
669 | config MACH_MX35_3DS | 544 | config MACH_MX35_3DS |
670 | bool "Support MX35PDK platform" | 545 | bool "Support MX35PDK platform" |
546 | select SOC_IMX35 | ||
547 | select MXC_DEBUG_BOARD | ||
671 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 548 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
672 | select IMX_HAVE_PLATFORM_IMX2_WDT | 549 | select IMX_HAVE_PLATFORM_IMX2_WDT |
673 | select IMX_HAVE_PLATFORM_IMX_FB | ||
674 | select IMX_HAVE_PLATFORM_IMX_I2C | 550 | select IMX_HAVE_PLATFORM_IMX_I2C |
675 | select IMX_HAVE_PLATFORM_IMX_UART | 551 | select IMX_HAVE_PLATFORM_IMX_UART |
676 | select IMX_HAVE_PLATFORM_IPU_CORE | ||
677 | select IMX_HAVE_PLATFORM_MXC_EHCI | 552 | select IMX_HAVE_PLATFORM_MXC_EHCI |
678 | select IMX_HAVE_PLATFORM_MXC_NAND | 553 | select IMX_HAVE_PLATFORM_MXC_NAND |
679 | select IMX_HAVE_PLATFORM_MXC_RTC | ||
680 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 554 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
681 | select MXC_DEBUG_BOARD | ||
682 | select SOC_IMX35 | ||
683 | help | 555 | help |
684 | Include support for MX35PDK platform. This includes specific | 556 | Include support for MX35PDK platform. This includes specific |
685 | configurations for the board and its peripherals. | 557 | configurations for the board and its peripherals. |
686 | 558 | ||
687 | config MACH_EUKREA_CPUIMX35SD | 559 | config MACH_EUKREA_CPUIMX35 |
688 | bool "Support Eukrea CPUIMX35 Platform" | 560 | bool "Support Eukrea CPUIMX35 Platform" |
561 | select SOC_IMX35 | ||
689 | select IMX_HAVE_PLATFORM_FLEXCAN | 562 | select IMX_HAVE_PLATFORM_FLEXCAN |
690 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 563 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
691 | select IMX_HAVE_PLATFORM_IMX2_WDT | 564 | select IMX_HAVE_PLATFORM_IMX2_WDT |
@@ -695,14 +568,13 @@ config MACH_EUKREA_CPUIMX35SD | |||
695 | select IMX_HAVE_PLATFORM_MXC_NAND | 568 | select IMX_HAVE_PLATFORM_MXC_NAND |
696 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 569 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
697 | select MXC_ULPI if USB_ULPI | 570 | select MXC_ULPI if USB_ULPI |
698 | select SOC_IMX35 | ||
699 | help | 571 | help |
700 | Include support for Eukrea CPUIMX35 platform. This includes | 572 | Include support for Eukrea CPUIMX35 platform. This includes |
701 | specific configurations for the board and its peripherals. | 573 | specific configurations for the board and its peripherals. |
702 | 574 | ||
703 | choice | 575 | choice |
704 | prompt "Baseboard" | 576 | prompt "Baseboard" |
705 | depends on MACH_EUKREA_CPUIMX35SD | 577 | depends on MACH_EUKREA_CPUIMX35 |
706 | default MACH_EUKREA_MBIMXSD35_BASEBOARD | 578 | default MACH_EUKREA_MBIMXSD35_BASEBOARD |
707 | 579 | ||
708 | config MACH_EUKREA_MBIMXSD35_BASEBOARD | 580 | config MACH_EUKREA_MBIMXSD35_BASEBOARD |
@@ -710,7 +582,6 @@ config MACH_EUKREA_MBIMXSD35_BASEBOARD | |||
710 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 582 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
711 | select IMX_HAVE_PLATFORM_IMX_SSI | 583 | select IMX_HAVE_PLATFORM_IMX_SSI |
712 | select IMX_HAVE_PLATFORM_IPU_CORE | 584 | select IMX_HAVE_PLATFORM_IPU_CORE |
713 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
714 | select LEDS_GPIO_REGISTER | 585 | select LEDS_GPIO_REGISTER |
715 | help | 586 | help |
716 | This adds board specific devices that can be found on Eukrea's | 587 | This adds board specific devices that can be found on Eukrea's |
@@ -720,151 +591,18 @@ endchoice | |||
720 | 591 | ||
721 | config MACH_VPR200 | 592 | config MACH_VPR200 |
722 | bool "Support VPR200 platform" | 593 | bool "Support VPR200 platform" |
594 | select SOC_IMX35 | ||
723 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 595 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
724 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 596 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
725 | select IMX_HAVE_PLATFORM_IMX2_WDT | 597 | select IMX_HAVE_PLATFORM_IMX2_WDT |
726 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
727 | select IMX_HAVE_PLATFORM_IMX_UART | 598 | select IMX_HAVE_PLATFORM_IMX_UART |
599 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
728 | select IMX_HAVE_PLATFORM_IPU_CORE | 600 | select IMX_HAVE_PLATFORM_IPU_CORE |
729 | select IMX_HAVE_PLATFORM_MXC_EHCI | 601 | select IMX_HAVE_PLATFORM_MXC_EHCI |
730 | select IMX_HAVE_PLATFORM_MXC_NAND | 602 | select IMX_HAVE_PLATFORM_MXC_NAND |
731 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 603 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
732 | select SOC_IMX35 | ||
733 | help | 604 | help |
734 | Include support for VPR200 platform. This includes specific | 605 | Include support for VPR200 platform. This includes specific |
735 | configurations for the board and its peripherals. | 606 | configurations for the board and its peripherals. |
736 | 607 | ||
737 | endif | 608 | endif |
738 | |||
739 | if ARCH_MULTI_V7 | ||
740 | |||
741 | comment "i.MX5 platforms:" | ||
742 | |||
743 | config MACH_MX50_RDP | ||
744 | bool "Support MX50 reference design platform" | ||
745 | depends on BROKEN | ||
746 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
747 | select IMX_HAVE_PLATFORM_IMX_UART | ||
748 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
749 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
750 | select SOC_IMX50 | ||
751 | help | ||
752 | Include support for MX50 reference design platform (RDP) board. This | ||
753 | includes specific configurations for the board and its peripherals. | ||
754 | |||
755 | comment "i.MX51 machines:" | ||
756 | |||
757 | config MACH_IMX51_DT | ||
758 | bool "Support i.MX51 platforms from device tree" | ||
759 | select MACH_MX51_BABBAGE | ||
760 | select SOC_IMX51 | ||
761 | help | ||
762 | Include support for Freescale i.MX51 based platforms | ||
763 | using the device tree for discovery | ||
764 | |||
765 | config MACH_MX51_BABBAGE | ||
766 | bool "Support MX51 BABBAGE platforms" | ||
767 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | ||
768 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
769 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
770 | select IMX_HAVE_PLATFORM_IMX_UART | ||
771 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
772 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
773 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
774 | select SOC_IMX51 | ||
775 | help | ||
776 | Include support for MX51 Babbage platform, also known as MX51EVK in | ||
777 | u-boot. This includes specific configurations for the board and its | ||
778 | peripherals. | ||
779 | |||
780 | config MACH_MX51_3DS | ||
781 | bool "Support MX51PDK (3DS)" | ||
782 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
783 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | ||
784 | select IMX_HAVE_PLATFORM_IMX_UART | ||
785 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
786 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
787 | select MXC_DEBUG_BOARD | ||
788 | select SOC_IMX51 | ||
789 | help | ||
790 | Include support for MX51PDK (3DS) platform. This includes specific | ||
791 | configurations for the board and its peripherals. | ||
792 | |||
793 | config MACH_EUKREA_CPUIMX51SD | ||
794 | bool "Support Eukrea CPUIMX51SD module" | ||
795 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | ||
796 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
797 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
798 | select IMX_HAVE_PLATFORM_IMX_UART | ||
799 | select IMX_HAVE_PLATFORM_MXC_EHCI | ||
800 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
801 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
802 | select SOC_IMX51 | ||
803 | help | ||
804 | Include support for Eukrea CPUIMX51SD platform. This includes | ||
805 | specific configurations for the module and its peripherals. | ||
806 | |||
807 | choice | ||
808 | prompt "Baseboard" | ||
809 | depends on MACH_EUKREA_CPUIMX51SD | ||
810 | default MACH_EUKREA_MBIMXSD51_BASEBOARD | ||
811 | |||
812 | config MACH_EUKREA_MBIMXSD51_BASEBOARD | ||
813 | prompt "Eukrea MBIMXSD development board" | ||
814 | bool | ||
815 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
816 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
817 | select LEDS_GPIO_REGISTER | ||
818 | help | ||
819 | This adds board specific devices that can be found on Eukrea's | ||
820 | MBIMXSD evaluation board. | ||
821 | |||
822 | endchoice | ||
823 | |||
824 | comment "Device tree only" | ||
825 | |||
826 | config SOC_IMX53 | ||
827 | bool "i.MX53 support" | ||
828 | select ARCH_MX5 | ||
829 | select ARCH_MX53 | ||
830 | select HAVE_CAN_FLEXCAN if CAN | ||
831 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
832 | select PINCTRL | ||
833 | select PINCTRL_IMX53 | ||
834 | select SOC_IMX5 | ||
835 | |||
836 | help | ||
837 | This enables support for Freescale i.MX53 processor. | ||
838 | |||
839 | config SOC_IMX6Q | ||
840 | bool "i.MX6 Quad support" | ||
841 | select ARCH_HAS_CPUFREQ | ||
842 | select ARCH_HAS_OPP | ||
843 | select ARM_CPU_SUSPEND if PM | ||
844 | select ARM_ERRATA_754322 | ||
845 | select ARM_ERRATA_764369 if SMP | ||
846 | select ARM_ERRATA_775420 | ||
847 | select ARM_GIC | ||
848 | select COMMON_CLK | ||
849 | select CPU_V7 | ||
850 | select HAVE_ARM_SCU | ||
851 | select HAVE_CAN_FLEXCAN if CAN | ||
852 | select HAVE_IMX_GPC | ||
853 | select HAVE_IMX_MMDC | ||
854 | select HAVE_SMP | ||
855 | select MFD_SYSCON | ||
856 | select PINCTRL | ||
857 | select PINCTRL_IMX6Q | ||
858 | select PL310_ERRATA_588369 if CACHE_PL310 | ||
859 | select PL310_ERRATA_727915 if CACHE_PL310 | ||
860 | select PL310_ERRATA_769419 if CACHE_PL310 | ||
861 | select PM_OPP if PM | ||
862 | |||
863 | help | ||
864 | This enables support for Freescale i.MX6 Quad processor. | ||
865 | |||
866 | endif | ||
867 | |||
868 | source "arch/arm/mach-imx/devices/Kconfig" | ||
869 | |||
870 | endmenu | ||
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 0634b3152c2..e9eb36dad88 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -1,39 +1,16 @@ | |||
1 | obj-y := time.o cpu.o system.o irq-common.o | 1 | obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o |
2 | 2 | ||
3 | obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o | 3 | obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o |
4 | obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.o | 4 | obj-$(CONFIG_MACH_MX21) += clock-imx21.o mm-imx21.o |
5 | 5 | ||
6 | obj-$(CONFIG_SOC_IMX25) += clk-imx25.o mm-imx25.o ehci-imx25.o cpu-imx25.o | 6 | obj-$(CONFIG_ARCH_MX25) += clock-imx25.o mm-imx25.o ehci-imx25.o |
7 | 7 | ||
8 | obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o | 8 | obj-$(CONFIG_MACH_MX27) += cpu-imx27.o pm-imx27.o |
9 | obj-$(CONFIG_SOC_IMX27) += clk-imx27.o mm-imx27.o ehci-imx27.o | 9 | obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o ehci-imx27.o |
10 | 10 | ||
11 | obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clk-imx31.o iomux-imx31.o ehci-imx31.o pm-imx3.o | 11 | obj-$(CONFIG_SOC_IMX31) += mm-imx31.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o |
12 | obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clk-imx35.o ehci-imx35.o pm-imx3.o | 12 | obj-$(CONFIG_SOC_IMX35) += mm-imx35.o cpu-imx35.o clock-imx35.o ehci-imx35.o |
13 | 13 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o | |
14 | imx5-pm-$(CONFIG_PM) += pm-imx5.o | ||
15 | obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o $(imx5-pm-y) cpu_op-mx51.o | ||
16 | |||
17 | obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ | ||
18 | clk-pfd.o clk-busy.o clk.o | ||
19 | |||
20 | obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o | ||
21 | obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o | ||
22 | |||
23 | obj-$(CONFIG_MXC_TZIC) += tzic.o | ||
24 | obj-$(CONFIG_MXC_AVIC) += avic.o | ||
25 | |||
26 | obj-$(CONFIG_IRAM_ALLOC) += iram_alloc.o | ||
27 | obj-$(CONFIG_MXC_ULPI) += ulpi.o | ||
28 | obj-$(CONFIG_MXC_USE_EPIT) += epit.o | ||
29 | obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o | ||
30 | obj-$(CONFIG_CPU_FREQ_IMX) += cpufreq.o | ||
31 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | ||
32 | |||
33 | ifdef CONFIG_SND_IMX_SOC | ||
34 | obj-y += ssi-fiq.o | ||
35 | obj-y += ssi-fiq-ksym.o | ||
36 | endif | ||
37 | 14 | ||
38 | # Support for CMOS sensor interface | 15 | # Support for CMOS sensor interface |
39 | obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o | 16 | obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o |
@@ -48,9 +25,8 @@ obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o | |||
48 | 25 | ||
49 | # i.MX25 based machines | 26 | # i.MX25 based machines |
50 | obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o | 27 | obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o |
51 | obj-$(CONFIG_MACH_EUKREA_CPUIMX25SD) += mach-eukrea_cpuimx25.o | 28 | obj-$(CONFIG_MACH_EUKREA_CPUIMX25) += mach-eukrea_cpuimx25.o |
52 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd25-baseboard.o | 29 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd25-baseboard.o |
53 | obj-$(CONFIG_MACH_IMX25_DT) += imx25-dt.o | ||
54 | 30 | ||
55 | # i.MX27 based machines | 31 | # i.MX27 based machines |
56 | obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o | 32 | obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o |
@@ -64,7 +40,6 @@ obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o | |||
64 | obj-$(CONFIG_MACH_PCA100) += mach-pca100.o | 40 | obj-$(CONFIG_MACH_PCA100) += mach-pca100.o |
65 | obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_td60.o | 41 | obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_td60.o |
66 | obj-$(CONFIG_MACH_IMX27IPCAM) += mach-imx27ipcam.o | 42 | obj-$(CONFIG_MACH_IMX27IPCAM) += mach-imx27ipcam.o |
67 | obj-$(CONFIG_MACH_IMX27_DT) += imx27-dt.o | ||
68 | 43 | ||
69 | # i.MX31 based machines | 44 | # i.MX31 based machines |
70 | obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o | 45 | obj-$(CONFIG_MACH_MX31ADS) += mach-mx31ads.o |
@@ -79,36 +54,10 @@ obj-$(CONFIG_MACH_QONG) += mach-qong.o | |||
79 | obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o | 54 | obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o |
80 | obj-$(CONFIG_MACH_KZM_ARM11_01) += mach-kzm_arm11_01.o | 55 | obj-$(CONFIG_MACH_KZM_ARM11_01) += mach-kzm_arm11_01.o |
81 | obj-$(CONFIG_MACH_BUG) += mach-bug.o | 56 | obj-$(CONFIG_MACH_BUG) += mach-bug.o |
82 | obj-$(CONFIG_MACH_IMX31_DT) += imx31-dt.o | ||
83 | 57 | ||
84 | # i.MX35 based machines | 58 | # i.MX35 based machines |
85 | obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o | 59 | obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o |
86 | obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o | 60 | obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o |
87 | obj-$(CONFIG_MACH_EUKREA_CPUIMX35SD) += mach-cpuimx35.o | 61 | obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o |
88 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o | 62 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o |
89 | obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o | 63 | obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o |
90 | |||
91 | obj-$(CONFIG_DEBUG_LL) += lluart.o | ||
92 | obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o | ||
93 | obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o | ||
94 | obj-$(CONFIG_HAVE_IMX_SRC) += src.o | ||
95 | AFLAGS_headsmp.o :=-Wa,-march=armv7-a | ||
96 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o | ||
97 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | ||
98 | obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o | ||
99 | |||
100 | ifeq ($(CONFIG_PM),y) | ||
101 | obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o headsmp.o | ||
102 | endif | ||
103 | |||
104 | # i.MX5 based machines | ||
105 | obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o | ||
106 | obj-$(CONFIG_MACH_MX51_3DS) += mach-mx51_3ds.o | ||
107 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o | ||
108 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o | ||
109 | obj-$(CONFIG_MACH_MX50_RDP) += mach-mx50_rdp.o | ||
110 | |||
111 | obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o | ||
112 | obj-$(CONFIG_SOC_IMX53) += mach-imx53.o | ||
113 | |||
114 | obj-y += devices/ | ||
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot index b27815de847..ebee18b3884 100644 --- a/arch/arm/mach-imx/Makefile.boot +++ b/arch/arm/mach-imx/Makefile.boot | |||
@@ -1,39 +1,19 @@ | |||
1 | zreladdr-$(CONFIG_SOC_IMX1) += 0x08008000 | 1 | zreladdr-$(CONFIG_ARCH_MX1) := 0x08008000 |
2 | params_phys-$(CONFIG_SOC_IMX1) := 0x08000100 | 2 | params_phys-$(CONFIG_ARCH_MX1) := 0x08000100 |
3 | initrd_phys-$(CONFIG_SOC_IMX1) := 0x08800000 | 3 | initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000 |
4 | 4 | ||
5 | zreladdr-$(CONFIG_SOC_IMX21) += 0xC0008000 | 5 | zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000 |
6 | params_phys-$(CONFIG_SOC_IMX21) := 0xC0000100 | 6 | params_phys-$(CONFIG_MACH_MX21) := 0xC0000100 |
7 | initrd_phys-$(CONFIG_SOC_IMX21) := 0xC0800000 | 7 | initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000 |
8 | 8 | ||
9 | zreladdr-$(CONFIG_SOC_IMX25) += 0x80008000 | 9 | zreladdr-$(CONFIG_ARCH_MX25) := 0x80008000 |
10 | params_phys-$(CONFIG_SOC_IMX25) := 0x80000100 | 10 | params_phys-$(CONFIG_ARCH_MX25) := 0x80000100 |
11 | initrd_phys-$(CONFIG_SOC_IMX25) := 0x80800000 | 11 | initrd_phys-$(CONFIG_ARCH_MX25) := 0x80800000 |
12 | 12 | ||
13 | zreladdr-$(CONFIG_SOC_IMX27) += 0xA0008000 | 13 | zreladdr-$(CONFIG_MACH_MX27) := 0xA0008000 |
14 | params_phys-$(CONFIG_SOC_IMX27) := 0xA0000100 | 14 | params_phys-$(CONFIG_MACH_MX27) := 0xA0000100 |
15 | initrd_phys-$(CONFIG_SOC_IMX27) := 0xA0800000 | 15 | initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000 |
16 | 16 | ||
17 | zreladdr-$(CONFIG_SOC_IMX31) += 0x80008000 | 17 | zreladdr-$(CONFIG_ARCH_MX3) := 0x80008000 |
18 | params_phys-$(CONFIG_SOC_IMX31) := 0x80000100 | 18 | params_phys-$(CONFIG_ARCH_MX3) := 0x80000100 |
19 | initrd_phys-$(CONFIG_SOC_IMX31) := 0x80800000 | 19 | initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000 |
20 | |||
21 | zreladdr-$(CONFIG_SOC_IMX35) += 0x80008000 | ||
22 | params_phys-$(CONFIG_SOC_IMX35) := 0x80000100 | ||
23 | initrd_phys-$(CONFIG_SOC_IMX35) := 0x80800000 | ||
24 | |||
25 | zreladdr-$(CONFIG_SOC_IMX50) += 0x70008000 | ||
26 | params_phys-$(CONFIG_SOC_IMX50) := 0x70000100 | ||
27 | initrd_phys-$(CONFIG_SOC_IMX50) := 0x70800000 | ||
28 | |||
29 | zreladdr-$(CONFIG_SOC_IMX51) += 0x90008000 | ||
30 | params_phys-$(CONFIG_SOC_IMX51) := 0x90000100 | ||
31 | initrd_phys-$(CONFIG_SOC_IMX51) := 0x90800000 | ||
32 | |||
33 | zreladdr-$(CONFIG_SOC_IMX53) += 0x70008000 | ||
34 | params_phys-$(CONFIG_SOC_IMX53) := 0x70000100 | ||
35 | initrd_phys-$(CONFIG_SOC_IMX53) := 0x70800000 | ||
36 | |||
37 | zreladdr-$(CONFIG_SOC_IMX6Q) += 0x10008000 | ||
38 | params_phys-$(CONFIG_SOC_IMX6Q) := 0x10000100 | ||
39 | initrd_phys-$(CONFIG_SOC_IMX6Q) := 0x10800000 | ||
diff --git a/arch/arm/mach-imx/avic.c b/arch/arm/mach-imx/avic.c deleted file mode 100644 index 0eff23ed92b..00000000000 --- a/arch/arm/mach-imx/avic.c +++ /dev/null | |||
@@ -1,224 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #include <linux/module.h> | ||
21 | #include <linux/irq.h> | ||
22 | #include <linux/irqdomain.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/of.h> | ||
25 | #include <asm/mach/irq.h> | ||
26 | #include <asm/exception.h> | ||
27 | |||
28 | #include "common.h" | ||
29 | #include "hardware.h" | ||
30 | #include "irq-common.h" | ||
31 | |||
32 | #define AVIC_INTCNTL 0x00 /* int control reg */ | ||
33 | #define AVIC_NIMASK 0x04 /* int mask reg */ | ||
34 | #define AVIC_INTENNUM 0x08 /* int enable number reg */ | ||
35 | #define AVIC_INTDISNUM 0x0C /* int disable number reg */ | ||
36 | #define AVIC_INTENABLEH 0x10 /* int enable reg high */ | ||
37 | #define AVIC_INTENABLEL 0x14 /* int enable reg low */ | ||
38 | #define AVIC_INTTYPEH 0x18 /* int type reg high */ | ||
39 | #define AVIC_INTTYPEL 0x1C /* int type reg low */ | ||
40 | #define AVIC_NIPRIORITY(x) (0x20 + 4 * (7 - (x))) /* int priority */ | ||
41 | #define AVIC_NIVECSR 0x40 /* norm int vector/status */ | ||
42 | #define AVIC_FIVECSR 0x44 /* fast int vector/status */ | ||
43 | #define AVIC_INTSRCH 0x48 /* int source reg high */ | ||
44 | #define AVIC_INTSRCL 0x4C /* int source reg low */ | ||
45 | #define AVIC_INTFRCH 0x50 /* int force reg high */ | ||
46 | #define AVIC_INTFRCL 0x54 /* int force reg low */ | ||
47 | #define AVIC_NIPNDH 0x58 /* norm int pending high */ | ||
48 | #define AVIC_NIPNDL 0x5C /* norm int pending low */ | ||
49 | #define AVIC_FIPNDH 0x60 /* fast int pending high */ | ||
50 | #define AVIC_FIPNDL 0x64 /* fast int pending low */ | ||
51 | |||
52 | #define AVIC_NUM_IRQS 64 | ||
53 | |||
54 | void __iomem *avic_base; | ||
55 | static struct irq_domain *domain; | ||
56 | |||
57 | static u32 avic_saved_mask_reg[2]; | ||
58 | |||
59 | #ifdef CONFIG_MXC_IRQ_PRIOR | ||
60 | static int avic_irq_set_priority(unsigned char irq, unsigned char prio) | ||
61 | { | ||
62 | struct irq_data *d = irq_get_irq_data(irq); | ||
63 | unsigned int temp; | ||
64 | unsigned int mask = 0x0F << irq % 8 * 4; | ||
65 | |||
66 | irq = d->hwirq; | ||
67 | |||
68 | if (irq >= AVIC_NUM_IRQS) | ||
69 | return -EINVAL; | ||
70 | |||
71 | temp = __raw_readl(avic_base + AVIC_NIPRIORITY(irq / 8)); | ||
72 | temp &= ~mask; | ||
73 | temp |= prio & mask; | ||
74 | |||
75 | __raw_writel(temp, avic_base + AVIC_NIPRIORITY(irq / 8)); | ||
76 | |||
77 | return 0; | ||
78 | } | ||
79 | #endif | ||
80 | |||
81 | #ifdef CONFIG_FIQ | ||
82 | static int avic_set_irq_fiq(unsigned int irq, unsigned int type) | ||
83 | { | ||
84 | struct irq_data *d = irq_get_irq_data(irq); | ||
85 | unsigned int irqt; | ||
86 | |||
87 | irq = d->hwirq; | ||
88 | |||
89 | if (irq >= AVIC_NUM_IRQS) | ||
90 | return -EINVAL; | ||
91 | |||
92 | if (irq < AVIC_NUM_IRQS / 2) { | ||
93 | irqt = __raw_readl(avic_base + AVIC_INTTYPEL) & ~(1 << irq); | ||
94 | __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEL); | ||
95 | } else { | ||
96 | irq -= AVIC_NUM_IRQS / 2; | ||
97 | irqt = __raw_readl(avic_base + AVIC_INTTYPEH) & ~(1 << irq); | ||
98 | __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEH); | ||
99 | } | ||
100 | |||
101 | return 0; | ||
102 | } | ||
103 | #endif /* CONFIG_FIQ */ | ||
104 | |||
105 | |||
106 | static struct mxc_extra_irq avic_extra_irq = { | ||
107 | #ifdef CONFIG_MXC_IRQ_PRIOR | ||
108 | .set_priority = avic_irq_set_priority, | ||
109 | #endif | ||
110 | #ifdef CONFIG_FIQ | ||
111 | .set_irq_fiq = avic_set_irq_fiq, | ||
112 | #endif | ||
113 | }; | ||
114 | |||
115 | #ifdef CONFIG_PM | ||
116 | static void avic_irq_suspend(struct irq_data *d) | ||
117 | { | ||
118 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
119 | struct irq_chip_type *ct = gc->chip_types; | ||
120 | int idx = d->hwirq >> 5; | ||
121 | |||
122 | avic_saved_mask_reg[idx] = __raw_readl(avic_base + ct->regs.mask); | ||
123 | __raw_writel(gc->wake_active, avic_base + ct->regs.mask); | ||
124 | } | ||
125 | |||
126 | static void avic_irq_resume(struct irq_data *d) | ||
127 | { | ||
128 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
129 | struct irq_chip_type *ct = gc->chip_types; | ||
130 | int idx = d->hwirq >> 5; | ||
131 | |||
132 | __raw_writel(avic_saved_mask_reg[idx], avic_base + ct->regs.mask); | ||
133 | } | ||
134 | |||
135 | #else | ||
136 | #define avic_irq_suspend NULL | ||
137 | #define avic_irq_resume NULL | ||
138 | #endif | ||
139 | |||
140 | static __init void avic_init_gc(int idx, unsigned int irq_start) | ||
141 | { | ||
142 | struct irq_chip_generic *gc; | ||
143 | struct irq_chip_type *ct; | ||
144 | |||
145 | gc = irq_alloc_generic_chip("mxc-avic", 1, irq_start, avic_base, | ||
146 | handle_level_irq); | ||
147 | gc->private = &avic_extra_irq; | ||
148 | gc->wake_enabled = IRQ_MSK(32); | ||
149 | |||
150 | ct = gc->chip_types; | ||
151 | ct->chip.irq_mask = irq_gc_mask_clr_bit; | ||
152 | ct->chip.irq_unmask = irq_gc_mask_set_bit; | ||
153 | ct->chip.irq_ack = irq_gc_mask_clr_bit; | ||
154 | ct->chip.irq_set_wake = irq_gc_set_wake; | ||
155 | ct->chip.irq_suspend = avic_irq_suspend; | ||
156 | ct->chip.irq_resume = avic_irq_resume; | ||
157 | ct->regs.mask = !idx ? AVIC_INTENABLEL : AVIC_INTENABLEH; | ||
158 | ct->regs.ack = ct->regs.mask; | ||
159 | |||
160 | irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0); | ||
161 | } | ||
162 | |||
163 | asmlinkage void __exception_irq_entry avic_handle_irq(struct pt_regs *regs) | ||
164 | { | ||
165 | u32 nivector; | ||
166 | |||
167 | do { | ||
168 | nivector = __raw_readl(avic_base + AVIC_NIVECSR) >> 16; | ||
169 | if (nivector == 0xffff) | ||
170 | break; | ||
171 | |||
172 | handle_IRQ(irq_find_mapping(domain, nivector), regs); | ||
173 | } while (1); | ||
174 | } | ||
175 | |||
176 | /* | ||
177 | * This function initializes the AVIC hardware and disables all the | ||
178 | * interrupts. It registers the interrupt enable and disable functions | ||
179 | * to the kernel for each interrupt source. | ||
180 | */ | ||
181 | void __init mxc_init_irq(void __iomem *irqbase) | ||
182 | { | ||
183 | struct device_node *np; | ||
184 | int irq_base; | ||
185 | int i; | ||
186 | |||
187 | avic_base = irqbase; | ||
188 | |||
189 | /* put the AVIC into the reset value with | ||
190 | * all interrupts disabled | ||
191 | */ | ||
192 | __raw_writel(0, avic_base + AVIC_INTCNTL); | ||
193 | __raw_writel(0x1f, avic_base + AVIC_NIMASK); | ||
194 | |||
195 | /* disable all interrupts */ | ||
196 | __raw_writel(0, avic_base + AVIC_INTENABLEH); | ||
197 | __raw_writel(0, avic_base + AVIC_INTENABLEL); | ||
198 | |||
199 | /* all IRQ no FIQ */ | ||
200 | __raw_writel(0, avic_base + AVIC_INTTYPEH); | ||
201 | __raw_writel(0, avic_base + AVIC_INTTYPEL); | ||
202 | |||
203 | irq_base = irq_alloc_descs(-1, 0, AVIC_NUM_IRQS, numa_node_id()); | ||
204 | WARN_ON(irq_base < 0); | ||
205 | |||
206 | np = of_find_compatible_node(NULL, NULL, "fsl,avic"); | ||
207 | domain = irq_domain_add_legacy(np, AVIC_NUM_IRQS, irq_base, 0, | ||
208 | &irq_domain_simple_ops, NULL); | ||
209 | WARN_ON(!domain); | ||
210 | |||
211 | for (i = 0; i < AVIC_NUM_IRQS / 32; i++, irq_base += 32) | ||
212 | avic_init_gc(i, irq_base); | ||
213 | |||
214 | /* Set default priority value (0) for all IRQ's */ | ||
215 | for (i = 0; i < 8; i++) | ||
216 | __raw_writel(0, avic_base + AVIC_NIPRIORITY(i)); | ||
217 | |||
218 | #ifdef CONFIG_FIQ | ||
219 | /* Initialize FIQ */ | ||
220 | init_FIQ(FIQ_START); | ||
221 | #endif | ||
222 | |||
223 | printk(KERN_INFO "MXC IRQ initialized\n"); | ||
224 | } | ||
diff --git a/arch/arm/mach-imx/board-mx31lilly.h b/arch/arm/mach-imx/board-mx31lilly.h deleted file mode 100644 index 0df71bfefbb..00000000000 --- a/arch/arm/mach-imx/board-mx31lilly.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Daniel Mack <daniel@caiaq.de> | ||
3 | * | ||
4 | * Based on code for mobots boards, | ||
5 | * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version 2 | ||
10 | * of the License, or (at your option) any later version. | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
19 | * MA 02110-1301, USA. | ||
20 | */ | ||
21 | |||
22 | #ifndef __ASM_ARCH_MXC_BOARD_MX31LILLY_H__ | ||
23 | #define __ASM_ARCH_MXC_BOARD_MX31LILLY_H__ | ||
24 | |||
25 | #ifndef __ASSEMBLY__ | ||
26 | |||
27 | enum mx31lilly_boards { | ||
28 | MX31LILLY_NOBOARD = 0, | ||
29 | MX31LILLY_DB = 1, | ||
30 | }; | ||
31 | |||
32 | /* | ||
33 | * This CPU module needs a baseboard to work. After basic initializing | ||
34 | * its own devices, it calls the baseboard's init function. | ||
35 | */ | ||
36 | |||
37 | extern void mx31lilly_db_init(void); | ||
38 | |||
39 | #endif | ||
40 | |||
41 | #endif /* __ASM_ARCH_MXC_BOARD_MX31LILLY_H__ */ | ||
diff --git a/arch/arm/mach-imx/board-mx31lite.h b/arch/arm/mach-imx/board-mx31lite.h deleted file mode 100644 index c1ad0ae807c..00000000000 --- a/arch/arm/mach-imx/board-mx31lite.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2009 Daniel Mack <daniel@caiaq.de> | ||
4 | * | ||
5 | * Based on code for mobots boards, | ||
6 | * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version 2 | ||
11 | * of the License, or (at your option) any later version. | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
20 | * MA 02110-1301, USA. | ||
21 | */ | ||
22 | |||
23 | #ifndef __ASM_ARCH_MXC_BOARD_MX31LITE_H__ | ||
24 | #define __ASM_ARCH_MXC_BOARD_MX31LITE_H__ | ||
25 | |||
26 | #ifndef __ASSEMBLY__ | ||
27 | |||
28 | enum mx31lite_boards { | ||
29 | MX31LITE_NOBOARD = 0, | ||
30 | MX31LITE_DB = 1, | ||
31 | }; | ||
32 | |||
33 | /* | ||
34 | * This CPU module needs a baseboard to work. After basic initializing | ||
35 | * its own devices, it calls the baseboard's init function. | ||
36 | */ | ||
37 | |||
38 | extern void mx31lite_db_init(void); | ||
39 | |||
40 | #endif | ||
41 | |||
42 | #endif /* __ASM_ARCH_MXC_BOARD_MX31LITE_H__ */ | ||
diff --git a/arch/arm/mach-imx/board-mx31moboard.h b/arch/arm/mach-imx/board-mx31moboard.h deleted file mode 100644 index de14543891c..00000000000 --- a/arch/arm/mach-imx/board-mx31moboard.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
16 | * MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_MXC_BOARD_MX31MOBOARD_H__ | ||
20 | #define __ASM_ARCH_MXC_BOARD_MX31MOBOARD_H__ | ||
21 | |||
22 | #ifndef __ASSEMBLY__ | ||
23 | |||
24 | enum mx31moboard_boards { | ||
25 | MX31NOBOARD = 0, | ||
26 | MX31DEVBOARD = 1, | ||
27 | MX31MARXBOT = 2, | ||
28 | MX31SMARTBOT = 3, | ||
29 | MX31EYEBOT = 4, | ||
30 | }; | ||
31 | |||
32 | /* | ||
33 | * This CPU module needs a baseboard to work. After basic initializing | ||
34 | * its own devices, it calls the baseboard's init function. | ||
35 | */ | ||
36 | |||
37 | extern void mx31moboard_devboard_init(void); | ||
38 | extern void mx31moboard_marxbot_init(void); | ||
39 | extern void mx31moboard_smartbot_init(int board); | ||
40 | |||
41 | #endif | ||
42 | |||
43 | #endif /* __ASM_ARCH_MXC_BOARD_MX31MOBOARD_H__ */ | ||
diff --git a/arch/arm/mach-imx/board-pcm038.h b/arch/arm/mach-imx/board-pcm038.h deleted file mode 100644 index 6f371e35753..00000000000 --- a/arch/arm/mach-imx/board-pcm038.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
16 | * MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_MXC_BOARD_PCM038_H__ | ||
20 | #define __ASM_ARCH_MXC_BOARD_PCM038_H__ | ||
21 | |||
22 | #ifndef __ASSEMBLY__ | ||
23 | /* | ||
24 | * This CPU module needs a baseboard to work. After basic initializing | ||
25 | * its own devices, it calls the baseboard's init function. | ||
26 | * TODO: Add your own baseboard init function and call it from | ||
27 | * inside pcm038_init(). | ||
28 | * | ||
29 | * This example here is for the development board. Refer pcm970-baseboard.c | ||
30 | */ | ||
31 | |||
32 | extern void pcm970_baseboard_init(void); | ||
33 | |||
34 | #endif | ||
35 | |||
36 | #endif /* __ASM_ARCH_MXC_BOARD_PCM038_H__ */ | ||
diff --git a/arch/arm/mach-imx/clk-busy.c b/arch/arm/mach-imx/clk-busy.c deleted file mode 100644 index 1ab91b5209e..00000000000 --- a/arch/arm/mach-imx/clk-busy.c +++ /dev/null | |||
@@ -1,189 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2012 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/clk.h> | ||
14 | #include <linux/clk-provider.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/slab.h> | ||
17 | #include <linux/jiffies.h> | ||
18 | #include <linux/err.h> | ||
19 | #include "clk.h" | ||
20 | |||
21 | static int clk_busy_wait(void __iomem *reg, u8 shift) | ||
22 | { | ||
23 | unsigned long timeout = jiffies + msecs_to_jiffies(10); | ||
24 | |||
25 | while (readl_relaxed(reg) & (1 << shift)) | ||
26 | if (time_after(jiffies, timeout)) | ||
27 | return -ETIMEDOUT; | ||
28 | |||
29 | return 0; | ||
30 | } | ||
31 | |||
32 | struct clk_busy_divider { | ||
33 | struct clk_divider div; | ||
34 | const struct clk_ops *div_ops; | ||
35 | void __iomem *reg; | ||
36 | u8 shift; | ||
37 | }; | ||
38 | |||
39 | static inline struct clk_busy_divider *to_clk_busy_divider(struct clk_hw *hw) | ||
40 | { | ||
41 | struct clk_divider *div = container_of(hw, struct clk_divider, hw); | ||
42 | |||
43 | return container_of(div, struct clk_busy_divider, div); | ||
44 | } | ||
45 | |||
46 | static unsigned long clk_busy_divider_recalc_rate(struct clk_hw *hw, | ||
47 | unsigned long parent_rate) | ||
48 | { | ||
49 | struct clk_busy_divider *busy = to_clk_busy_divider(hw); | ||
50 | |||
51 | return busy->div_ops->recalc_rate(&busy->div.hw, parent_rate); | ||
52 | } | ||
53 | |||
54 | static long clk_busy_divider_round_rate(struct clk_hw *hw, unsigned long rate, | ||
55 | unsigned long *prate) | ||
56 | { | ||
57 | struct clk_busy_divider *busy = to_clk_busy_divider(hw); | ||
58 | |||
59 | return busy->div_ops->round_rate(&busy->div.hw, rate, prate); | ||
60 | } | ||
61 | |||
62 | static int clk_busy_divider_set_rate(struct clk_hw *hw, unsigned long rate, | ||
63 | unsigned long parent_rate) | ||
64 | { | ||
65 | struct clk_busy_divider *busy = to_clk_busy_divider(hw); | ||
66 | int ret; | ||
67 | |||
68 | ret = busy->div_ops->set_rate(&busy->div.hw, rate, parent_rate); | ||
69 | if (!ret) | ||
70 | ret = clk_busy_wait(busy->reg, busy->shift); | ||
71 | |||
72 | return ret; | ||
73 | } | ||
74 | |||
75 | static struct clk_ops clk_busy_divider_ops = { | ||
76 | .recalc_rate = clk_busy_divider_recalc_rate, | ||
77 | .round_rate = clk_busy_divider_round_rate, | ||
78 | .set_rate = clk_busy_divider_set_rate, | ||
79 | }; | ||
80 | |||
81 | struct clk *imx_clk_busy_divider(const char *name, const char *parent_name, | ||
82 | void __iomem *reg, u8 shift, u8 width, | ||
83 | void __iomem *busy_reg, u8 busy_shift) | ||
84 | { | ||
85 | struct clk_busy_divider *busy; | ||
86 | struct clk *clk; | ||
87 | struct clk_init_data init; | ||
88 | |||
89 | busy = kzalloc(sizeof(*busy), GFP_KERNEL); | ||
90 | if (!busy) | ||
91 | return ERR_PTR(-ENOMEM); | ||
92 | |||
93 | busy->reg = busy_reg; | ||
94 | busy->shift = busy_shift; | ||
95 | |||
96 | busy->div.reg = reg; | ||
97 | busy->div.shift = shift; | ||
98 | busy->div.width = width; | ||
99 | busy->div.lock = &imx_ccm_lock; | ||
100 | busy->div_ops = &clk_divider_ops; | ||
101 | |||
102 | init.name = name; | ||
103 | init.ops = &clk_busy_divider_ops; | ||
104 | init.flags = CLK_SET_RATE_PARENT; | ||
105 | init.parent_names = &parent_name; | ||
106 | init.num_parents = 1; | ||
107 | |||
108 | busy->div.hw.init = &init; | ||
109 | |||
110 | clk = clk_register(NULL, &busy->div.hw); | ||
111 | if (IS_ERR(clk)) | ||
112 | kfree(busy); | ||
113 | |||
114 | return clk; | ||
115 | } | ||
116 | |||
117 | struct clk_busy_mux { | ||
118 | struct clk_mux mux; | ||
119 | const struct clk_ops *mux_ops; | ||
120 | void __iomem *reg; | ||
121 | u8 shift; | ||
122 | }; | ||
123 | |||
124 | static inline struct clk_busy_mux *to_clk_busy_mux(struct clk_hw *hw) | ||
125 | { | ||
126 | struct clk_mux *mux = container_of(hw, struct clk_mux, hw); | ||
127 | |||
128 | return container_of(mux, struct clk_busy_mux, mux); | ||
129 | } | ||
130 | |||
131 | static u8 clk_busy_mux_get_parent(struct clk_hw *hw) | ||
132 | { | ||
133 | struct clk_busy_mux *busy = to_clk_busy_mux(hw); | ||
134 | |||
135 | return busy->mux_ops->get_parent(&busy->mux.hw); | ||
136 | } | ||
137 | |||
138 | static int clk_busy_mux_set_parent(struct clk_hw *hw, u8 index) | ||
139 | { | ||
140 | struct clk_busy_mux *busy = to_clk_busy_mux(hw); | ||
141 | int ret; | ||
142 | |||
143 | ret = busy->mux_ops->set_parent(&busy->mux.hw, index); | ||
144 | if (!ret) | ||
145 | ret = clk_busy_wait(busy->reg, busy->shift); | ||
146 | |||
147 | return ret; | ||
148 | } | ||
149 | |||
150 | struct clk_ops clk_busy_mux_ops = { | ||
151 | .get_parent = clk_busy_mux_get_parent, | ||
152 | .set_parent = clk_busy_mux_set_parent, | ||
153 | }; | ||
154 | |||
155 | struct clk *imx_clk_busy_mux(const char *name, void __iomem *reg, u8 shift, | ||
156 | u8 width, void __iomem *busy_reg, u8 busy_shift, | ||
157 | const char **parent_names, int num_parents) | ||
158 | { | ||
159 | struct clk_busy_mux *busy; | ||
160 | struct clk *clk; | ||
161 | struct clk_init_data init; | ||
162 | |||
163 | busy = kzalloc(sizeof(*busy), GFP_KERNEL); | ||
164 | if (!busy) | ||
165 | return ERR_PTR(-ENOMEM); | ||
166 | |||
167 | busy->reg = busy_reg; | ||
168 | busy->shift = busy_shift; | ||
169 | |||
170 | busy->mux.reg = reg; | ||
171 | busy->mux.shift = shift; | ||
172 | busy->mux.width = width; | ||
173 | busy->mux.lock = &imx_ccm_lock; | ||
174 | busy->mux_ops = &clk_mux_ops; | ||
175 | |||
176 | init.name = name; | ||
177 | init.ops = &clk_busy_mux_ops; | ||
178 | init.flags = 0; | ||
179 | init.parent_names = parent_names; | ||
180 | init.num_parents = num_parents; | ||
181 | |||
182 | busy->mux.hw.init = &init; | ||
183 | |||
184 | clk = clk_register(NULL, &busy->mux.hw); | ||
185 | if (IS_ERR(clk)) | ||
186 | kfree(busy); | ||
187 | |||
188 | return clk; | ||
189 | } | ||
diff --git a/arch/arm/mach-imx/clk-gate2.c b/arch/arm/mach-imx/clk-gate2.c deleted file mode 100644 index cc49c7ae186..00000000000 --- a/arch/arm/mach-imx/clk-gate2.c +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010-2011 Canonical Ltd <jeremy.kerr@canonical.com> | ||
3 | * Copyright (C) 2011-2012 Mike Turquette, Linaro Ltd <mturquette@linaro.org> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * Gated clock implementation | ||
10 | */ | ||
11 | |||
12 | #include <linux/clk-provider.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/slab.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/err.h> | ||
17 | #include <linux/string.h> | ||
18 | |||
19 | /** | ||
20 | * DOC: basic gatable clock which can gate and ungate it's ouput | ||
21 | * | ||
22 | * Traits of this clock: | ||
23 | * prepare - clk_(un)prepare only ensures parent is (un)prepared | ||
24 | * enable - clk_enable and clk_disable are functional & control gating | ||
25 | * rate - inherits rate from parent. No clk_set_rate support | ||
26 | * parent - fixed parent. No clk_set_parent support | ||
27 | */ | ||
28 | |||
29 | #define to_clk_gate(_hw) container_of(_hw, struct clk_gate, hw) | ||
30 | |||
31 | static int clk_gate2_enable(struct clk_hw *hw) | ||
32 | { | ||
33 | struct clk_gate *gate = to_clk_gate(hw); | ||
34 | u32 reg; | ||
35 | unsigned long flags = 0; | ||
36 | |||
37 | if (gate->lock) | ||
38 | spin_lock_irqsave(gate->lock, flags); | ||
39 | |||
40 | reg = readl(gate->reg); | ||
41 | reg |= 3 << gate->bit_idx; | ||
42 | writel(reg, gate->reg); | ||
43 | |||
44 | if (gate->lock) | ||
45 | spin_unlock_irqrestore(gate->lock, flags); | ||
46 | |||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | static void clk_gate2_disable(struct clk_hw *hw) | ||
51 | { | ||
52 | struct clk_gate *gate = to_clk_gate(hw); | ||
53 | u32 reg; | ||
54 | unsigned long flags = 0; | ||
55 | |||
56 | if (gate->lock) | ||
57 | spin_lock_irqsave(gate->lock, flags); | ||
58 | |||
59 | reg = readl(gate->reg); | ||
60 | reg &= ~(3 << gate->bit_idx); | ||
61 | writel(reg, gate->reg); | ||
62 | |||
63 | if (gate->lock) | ||
64 | spin_unlock_irqrestore(gate->lock, flags); | ||
65 | } | ||
66 | |||
67 | static int clk_gate2_is_enabled(struct clk_hw *hw) | ||
68 | { | ||
69 | u32 reg; | ||
70 | struct clk_gate *gate = to_clk_gate(hw); | ||
71 | |||
72 | reg = readl(gate->reg); | ||
73 | |||
74 | if (((reg >> gate->bit_idx) & 3) == 3) | ||
75 | return 1; | ||
76 | |||
77 | return 0; | ||
78 | } | ||
79 | |||
80 | static struct clk_ops clk_gate2_ops = { | ||
81 | .enable = clk_gate2_enable, | ||
82 | .disable = clk_gate2_disable, | ||
83 | .is_enabled = clk_gate2_is_enabled, | ||
84 | }; | ||
85 | |||
86 | struct clk *clk_register_gate2(struct device *dev, const char *name, | ||
87 | const char *parent_name, unsigned long flags, | ||
88 | void __iomem *reg, u8 bit_idx, | ||
89 | u8 clk_gate2_flags, spinlock_t *lock) | ||
90 | { | ||
91 | struct clk_gate *gate; | ||
92 | struct clk *clk; | ||
93 | struct clk_init_data init; | ||
94 | |||
95 | gate = kzalloc(sizeof(struct clk_gate), GFP_KERNEL); | ||
96 | if (!gate) | ||
97 | return ERR_PTR(-ENOMEM); | ||
98 | |||
99 | /* struct clk_gate assignments */ | ||
100 | gate->reg = reg; | ||
101 | gate->bit_idx = bit_idx; | ||
102 | gate->flags = clk_gate2_flags; | ||
103 | gate->lock = lock; | ||
104 | |||
105 | init.name = name; | ||
106 | init.ops = &clk_gate2_ops; | ||
107 | init.flags = flags; | ||
108 | init.parent_names = parent_name ? &parent_name : NULL; | ||
109 | init.num_parents = parent_name ? 1 : 0; | ||
110 | |||
111 | gate->hw.init = &init; | ||
112 | |||
113 | clk = clk_register(dev, &gate->hw); | ||
114 | if (IS_ERR(clk)) | ||
115 | kfree(gate); | ||
116 | |||
117 | return clk; | ||
118 | } | ||
diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c deleted file mode 100644 index 15f9d223cf0..00000000000 --- a/arch/arm/mach-imx/clk-imx1.c +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along | ||
14 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
15 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | ||
16 | */ | ||
17 | |||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/clk.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/clkdev.h> | ||
23 | #include <linux/err.h> | ||
24 | |||
25 | #include "clk.h" | ||
26 | #include "common.h" | ||
27 | #include "hardware.h" | ||
28 | |||
29 | /* CCM register addresses */ | ||
30 | #define IO_ADDR_CCM(off) (MX1_IO_ADDRESS(MX1_CCM_BASE_ADDR + (off))) | ||
31 | |||
32 | #define CCM_CSCR IO_ADDR_CCM(0x0) | ||
33 | #define CCM_MPCTL0 IO_ADDR_CCM(0x4) | ||
34 | #define CCM_SPCTL0 IO_ADDR_CCM(0xc) | ||
35 | #define CCM_PCDR IO_ADDR_CCM(0x20) | ||
36 | |||
37 | /* SCM register addresses */ | ||
38 | #define IO_ADDR_SCM(off) (MX1_IO_ADDRESS(MX1_SCM_BASE_ADDR + (off))) | ||
39 | |||
40 | #define SCM_GCCR IO_ADDR_SCM(0xc) | ||
41 | |||
42 | static const char *prem_sel_clks[] = { "clk32_premult", "clk16m", }; | ||
43 | static const char *clko_sel_clks[] = { "per1", "hclk", "clk48m", "clk16m", "prem", | ||
44 | "fclk", }; | ||
45 | enum imx1_clks { | ||
46 | dummy, clk32, clk16m_ext, clk16m, clk32_premult, prem, mpll, spll, mcu, | ||
47 | fclk, hclk, clk48m, per1, per2, per3, clko, dma_gate, csi_gate, | ||
48 | mma_gate, usbd_gate, clk_max | ||
49 | }; | ||
50 | |||
51 | static struct clk *clk[clk_max]; | ||
52 | |||
53 | int __init mx1_clocks_init(unsigned long fref) | ||
54 | { | ||
55 | int i; | ||
56 | |||
57 | clk[dummy] = imx_clk_fixed("dummy", 0); | ||
58 | clk[clk32] = imx_clk_fixed("clk32", fref); | ||
59 | clk[clk16m_ext] = imx_clk_fixed("clk16m_ext", 16000000); | ||
60 | clk[clk16m] = imx_clk_gate("clk16m", "clk16m_ext", CCM_CSCR, 17); | ||
61 | clk[clk32_premult] = imx_clk_fixed_factor("clk32_premult", "clk32", 512, 1); | ||
62 | clk[prem] = imx_clk_mux("prem", CCM_CSCR, 16, 1, prem_sel_clks, | ||
63 | ARRAY_SIZE(prem_sel_clks)); | ||
64 | clk[mpll] = imx_clk_pllv1("mpll", "clk32_premult", CCM_MPCTL0); | ||
65 | clk[spll] = imx_clk_pllv1("spll", "prem", CCM_SPCTL0); | ||
66 | clk[mcu] = imx_clk_divider("mcu", "clk32_premult", CCM_CSCR, 15, 1); | ||
67 | clk[fclk] = imx_clk_divider("fclk", "mpll", CCM_CSCR, 15, 1); | ||
68 | clk[hclk] = imx_clk_divider("hclk", "spll", CCM_CSCR, 10, 4); | ||
69 | clk[clk48m] = imx_clk_divider("clk48m", "spll", CCM_CSCR, 26, 3); | ||
70 | clk[per1] = imx_clk_divider("per1", "spll", CCM_PCDR, 0, 4); | ||
71 | clk[per2] = imx_clk_divider("per2", "spll", CCM_PCDR, 4, 4); | ||
72 | clk[per3] = imx_clk_divider("per3", "spll", CCM_PCDR, 16, 7); | ||
73 | clk[clko] = imx_clk_mux("clko", CCM_CSCR, 29, 3, clko_sel_clks, | ||
74 | ARRAY_SIZE(clko_sel_clks)); | ||
75 | clk[dma_gate] = imx_clk_gate("dma_gate", "hclk", SCM_GCCR, 4); | ||
76 | clk[csi_gate] = imx_clk_gate("csi_gate", "hclk", SCM_GCCR, 2); | ||
77 | clk[mma_gate] = imx_clk_gate("mma_gate", "hclk", SCM_GCCR, 1); | ||
78 | clk[usbd_gate] = imx_clk_gate("usbd_gate", "clk48m", SCM_GCCR, 0); | ||
79 | |||
80 | for (i = 0; i < ARRAY_SIZE(clk); i++) | ||
81 | if (IS_ERR(clk[i])) | ||
82 | pr_err("imx1 clk %d: register failed with %ld\n", | ||
83 | i, PTR_ERR(clk[i])); | ||
84 | |||
85 | clk_register_clkdev(clk[dma_gate], "ahb", "imx1-dma"); | ||
86 | clk_register_clkdev(clk[hclk], "ipg", "imx1-dma"); | ||
87 | clk_register_clkdev(clk[csi_gate], NULL, "mx1-camera.0"); | ||
88 | clk_register_clkdev(clk[mma_gate], "mma", NULL); | ||
89 | clk_register_clkdev(clk[usbd_gate], NULL, "imx_udc.0"); | ||
90 | clk_register_clkdev(clk[per1], "per", "imx-gpt.0"); | ||
91 | clk_register_clkdev(clk[hclk], "ipg", "imx-gpt.0"); | ||
92 | clk_register_clkdev(clk[per1], "per", "imx1-uart.0"); | ||
93 | clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.0"); | ||
94 | clk_register_clkdev(clk[per1], "per", "imx1-uart.1"); | ||
95 | clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1"); | ||
96 | clk_register_clkdev(clk[per1], "per", "imx1-uart.2"); | ||
97 | clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.2"); | ||
98 | clk_register_clkdev(clk[hclk], NULL, "imx1-i2c.0"); | ||
99 | clk_register_clkdev(clk[per2], "per", "imx1-cspi.0"); | ||
100 | clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0"); | ||
101 | clk_register_clkdev(clk[per2], "per", "imx1-cspi.1"); | ||
102 | clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.1"); | ||
103 | clk_register_clkdev(clk[per2], NULL, "imx-mmc.0"); | ||
104 | clk_register_clkdev(clk[per2], "per", "imx1-fb.0"); | ||
105 | clk_register_clkdev(clk[dummy], "ipg", "imx1-fb.0"); | ||
106 | clk_register_clkdev(clk[dummy], "ahb", "imx1-fb.0"); | ||
107 | clk_register_clkdev(clk[hclk], "mshc", NULL); | ||
108 | clk_register_clkdev(clk[per3], "ssi", NULL); | ||
109 | clk_register_clkdev(clk[clk32], NULL, "imx1-rtc.0"); | ||
110 | clk_register_clkdev(clk[clko], "clko", NULL); | ||
111 | |||
112 | mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT); | ||
113 | |||
114 | return 0; | ||
115 | } | ||
diff --git a/arch/arm/mach-imx/clk-imx21.c b/arch/arm/mach-imx/clk-imx21.c deleted file mode 100644 index d7ed66091a2..00000000000 --- a/arch/arm/mach-imx/clk-imx21.c +++ /dev/null | |||
@@ -1,185 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de | ||
4 | * Copyright 2008 Martin Fuzzey, mfuzzey@gmail.com | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version 2 | ||
9 | * of the License, or (at your option) any later version. | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
18 | * MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/clk.h> | ||
22 | #include <linux/clkdev.h> | ||
23 | #include <linux/clk-provider.h> | ||
24 | #include <linux/io.h> | ||
25 | #include <linux/module.h> | ||
26 | #include <linux/err.h> | ||
27 | |||
28 | #include "clk.h" | ||
29 | #include "common.h" | ||
30 | #include "hardware.h" | ||
31 | |||
32 | #define IO_ADDR_CCM(off) (MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR + (off))) | ||
33 | |||
34 | /* Register offsets */ | ||
35 | #define CCM_CSCR IO_ADDR_CCM(0x0) | ||
36 | #define CCM_MPCTL0 IO_ADDR_CCM(0x4) | ||
37 | #define CCM_MPCTL1 IO_ADDR_CCM(0x8) | ||
38 | #define CCM_SPCTL0 IO_ADDR_CCM(0xc) | ||
39 | #define CCM_SPCTL1 IO_ADDR_CCM(0x10) | ||
40 | #define CCM_OSC26MCTL IO_ADDR_CCM(0x14) | ||
41 | #define CCM_PCDR0 IO_ADDR_CCM(0x18) | ||
42 | #define CCM_PCDR1 IO_ADDR_CCM(0x1c) | ||
43 | #define CCM_PCCR0 IO_ADDR_CCM(0x20) | ||
44 | #define CCM_PCCR1 IO_ADDR_CCM(0x24) | ||
45 | #define CCM_CCSR IO_ADDR_CCM(0x28) | ||
46 | #define CCM_PMCTL IO_ADDR_CCM(0x2c) | ||
47 | #define CCM_PMCOUNT IO_ADDR_CCM(0x30) | ||
48 | #define CCM_WKGDCTL IO_ADDR_CCM(0x34) | ||
49 | |||
50 | static const char *mpll_sel_clks[] = { "fpm", "ckih", }; | ||
51 | static const char *spll_sel_clks[] = { "fpm", "ckih", }; | ||
52 | |||
53 | enum imx21_clks { | ||
54 | ckil, ckih, fpm, mpll_sel, spll_sel, mpll, spll, fclk, hclk, ipg, per1, | ||
55 | per2, per3, per4, uart1_ipg_gate, uart2_ipg_gate, uart3_ipg_gate, | ||
56 | uart4_ipg_gate, gpt1_ipg_gate, gpt2_ipg_gate, gpt3_ipg_gate, | ||
57 | pwm_ipg_gate, sdhc1_ipg_gate, sdhc2_ipg_gate, lcdc_ipg_gate, | ||
58 | lcdc_hclk_gate, cspi3_ipg_gate, cspi2_ipg_gate, cspi1_ipg_gate, | ||
59 | per4_gate, csi_hclk_gate, usb_div, usb_gate, usb_hclk_gate, ssi1_gate, | ||
60 | ssi2_gate, nfc_div, nfc_gate, dma_gate, dma_hclk_gate, brom_gate, | ||
61 | emma_gate, emma_hclk_gate, slcdc_gate, slcdc_hclk_gate, wdog_gate, | ||
62 | gpio_gate, i2c_gate, kpp_gate, owire_gate, rtc_gate, clk_max | ||
63 | }; | ||
64 | |||
65 | static struct clk *clk[clk_max]; | ||
66 | |||
67 | /* | ||
68 | * must be called very early to get information about the | ||
69 | * available clock rate when the timer framework starts | ||
70 | */ | ||
71 | int __init mx21_clocks_init(unsigned long lref, unsigned long href) | ||
72 | { | ||
73 | int i; | ||
74 | |||
75 | clk[ckil] = imx_clk_fixed("ckil", lref); | ||
76 | clk[ckih] = imx_clk_fixed("ckih", href); | ||
77 | clk[fpm] = imx_clk_fixed_factor("fpm", "ckil", 512, 1); | ||
78 | clk[mpll_sel] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks, | ||
79 | ARRAY_SIZE(mpll_sel_clks)); | ||
80 | clk[spll_sel] = imx_clk_mux("spll_sel", CCM_CSCR, 17, 1, spll_sel_clks, | ||
81 | ARRAY_SIZE(spll_sel_clks)); | ||
82 | clk[mpll] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0); | ||
83 | clk[spll] = imx_clk_pllv1("spll", "spll_sel", CCM_SPCTL0); | ||
84 | clk[fclk] = imx_clk_divider("fclk", "mpll", CCM_CSCR, 29, 3); | ||
85 | clk[hclk] = imx_clk_divider("hclk", "fclk", CCM_CSCR, 10, 4); | ||
86 | clk[ipg] = imx_clk_divider("ipg", "hclk", CCM_CSCR, 9, 1); | ||
87 | clk[per1] = imx_clk_divider("per1", "mpll", CCM_PCDR1, 0, 6); | ||
88 | clk[per2] = imx_clk_divider("per2", "mpll", CCM_PCDR1, 8, 6); | ||
89 | clk[per3] = imx_clk_divider("per3", "mpll", CCM_PCDR1, 16, 6); | ||
90 | clk[per4] = imx_clk_divider("per4", "mpll", CCM_PCDR1, 24, 6); | ||
91 | clk[uart1_ipg_gate] = imx_clk_gate("uart1_ipg_gate", "ipg", CCM_PCCR0, 0); | ||
92 | clk[uart2_ipg_gate] = imx_clk_gate("uart2_ipg_gate", "ipg", CCM_PCCR0, 1); | ||
93 | clk[uart3_ipg_gate] = imx_clk_gate("uart3_ipg_gate", "ipg", CCM_PCCR0, 2); | ||
94 | clk[uart4_ipg_gate] = imx_clk_gate("uart4_ipg_gate", "ipg", CCM_PCCR0, 3); | ||
95 | clk[gpt1_ipg_gate] = imx_clk_gate("gpt1_ipg_gate", "ipg", CCM_PCCR1, 25); | ||
96 | clk[gpt2_ipg_gate] = imx_clk_gate("gpt2_ipg_gate", "ipg", CCM_PCCR1, 26); | ||
97 | clk[gpt3_ipg_gate] = imx_clk_gate("gpt3_ipg_gate", "ipg", CCM_PCCR1, 27); | ||
98 | clk[pwm_ipg_gate] = imx_clk_gate("pwm_ipg_gate", "ipg", CCM_PCCR1, 28); | ||
99 | clk[sdhc1_ipg_gate] = imx_clk_gate("sdhc1_ipg_gate", "ipg", CCM_PCCR0, 9); | ||
100 | clk[sdhc2_ipg_gate] = imx_clk_gate("sdhc2_ipg_gate", "ipg", CCM_PCCR0, 10); | ||
101 | clk[lcdc_ipg_gate] = imx_clk_gate("lcdc_ipg_gate", "ipg", CCM_PCCR0, 18); | ||
102 | clk[lcdc_hclk_gate] = imx_clk_gate("lcdc_hclk_gate", "hclk", CCM_PCCR0, 26); | ||
103 | clk[cspi3_ipg_gate] = imx_clk_gate("cspi3_ipg_gate", "ipg", CCM_PCCR1, 23); | ||
104 | clk[cspi2_ipg_gate] = imx_clk_gate("cspi2_ipg_gate", "ipg", CCM_PCCR0, 5); | ||
105 | clk[cspi1_ipg_gate] = imx_clk_gate("cspi1_ipg_gate", "ipg", CCM_PCCR0, 4); | ||
106 | clk[per4_gate] = imx_clk_gate("per4_gate", "per4", CCM_PCCR0, 22); | ||
107 | clk[csi_hclk_gate] = imx_clk_gate("csi_hclk_gate", "hclk", CCM_PCCR0, 31); | ||
108 | clk[usb_div] = imx_clk_divider("usb_div", "spll", CCM_CSCR, 26, 3); | ||
109 | clk[usb_gate] = imx_clk_gate("usb_gate", "usb_div", CCM_PCCR0, 14); | ||
110 | clk[usb_hclk_gate] = imx_clk_gate("usb_hclk_gate", "hclk", CCM_PCCR0, 24); | ||
111 | clk[ssi1_gate] = imx_clk_gate("ssi1_gate", "ipg", CCM_PCCR0, 6); | ||
112 | clk[ssi2_gate] = imx_clk_gate("ssi2_gate", "ipg", CCM_PCCR0, 7); | ||
113 | clk[nfc_div] = imx_clk_divider("nfc_div", "ipg", CCM_PCDR0, 12, 4); | ||
114 | clk[nfc_gate] = imx_clk_gate("nfc_gate", "nfc_div", CCM_PCCR0, 19); | ||
115 | clk[dma_gate] = imx_clk_gate("dma_gate", "ipg", CCM_PCCR0, 13); | ||
116 | clk[dma_hclk_gate] = imx_clk_gate("dma_hclk_gate", "hclk", CCM_PCCR0, 30); | ||
117 | clk[brom_gate] = imx_clk_gate("brom_gate", "hclk", CCM_PCCR0, 28); | ||
118 | clk[emma_gate] = imx_clk_gate("emma_gate", "ipg", CCM_PCCR0, 15); | ||
119 | clk[emma_hclk_gate] = imx_clk_gate("emma_hclk_gate", "hclk", CCM_PCCR0, 27); | ||
120 | clk[slcdc_gate] = imx_clk_gate("slcdc_gate", "ipg", CCM_PCCR0, 25); | ||
121 | clk[slcdc_hclk_gate] = imx_clk_gate("slcdc_hclk_gate", "hclk", CCM_PCCR0, 21); | ||
122 | clk[wdog_gate] = imx_clk_gate("wdog_gate", "ipg", CCM_PCCR1, 24); | ||
123 | clk[gpio_gate] = imx_clk_gate("gpio_gate", "ipg", CCM_PCCR0, 11); | ||
124 | clk[i2c_gate] = imx_clk_gate("i2c_gate", "ipg", CCM_PCCR0, 12); | ||
125 | clk[kpp_gate] = imx_clk_gate("kpp_gate", "ipg", CCM_PCCR1, 30); | ||
126 | clk[owire_gate] = imx_clk_gate("owire_gate", "ipg", CCM_PCCR1, 31); | ||
127 | clk[rtc_gate] = imx_clk_gate("rtc_gate", "ipg", CCM_PCCR1, 29); | ||
128 | |||
129 | for (i = 0; i < ARRAY_SIZE(clk); i++) | ||
130 | if (IS_ERR(clk[i])) | ||
131 | pr_err("i.MX21 clk %d: register failed with %ld\n", | ||
132 | i, PTR_ERR(clk[i])); | ||
133 | |||
134 | clk_register_clkdev(clk[per1], "per1", NULL); | ||
135 | clk_register_clkdev(clk[per2], "per2", NULL); | ||
136 | clk_register_clkdev(clk[per3], "per3", NULL); | ||
137 | clk_register_clkdev(clk[per4], "per4", NULL); | ||
138 | clk_register_clkdev(clk[per1], "per", "imx21-uart.0"); | ||
139 | clk_register_clkdev(clk[uart1_ipg_gate], "ipg", "imx21-uart.0"); | ||
140 | clk_register_clkdev(clk[per1], "per", "imx21-uart.1"); | ||
141 | clk_register_clkdev(clk[uart2_ipg_gate], "ipg", "imx21-uart.1"); | ||
142 | clk_register_clkdev(clk[per1], "per", "imx21-uart.2"); | ||
143 | clk_register_clkdev(clk[uart3_ipg_gate], "ipg", "imx21-uart.2"); | ||
144 | clk_register_clkdev(clk[per1], "per", "imx21-uart.3"); | ||
145 | clk_register_clkdev(clk[uart4_ipg_gate], "ipg", "imx21-uart.3"); | ||
146 | clk_register_clkdev(clk[gpt1_ipg_gate], "ipg", "imx-gpt.0"); | ||
147 | clk_register_clkdev(clk[per1], "per", "imx-gpt.0"); | ||
148 | clk_register_clkdev(clk[gpt2_ipg_gate], "ipg", "imx-gpt.1"); | ||
149 | clk_register_clkdev(clk[per1], "per", "imx-gpt.1"); | ||
150 | clk_register_clkdev(clk[gpt3_ipg_gate], "ipg", "imx-gpt.2"); | ||
151 | clk_register_clkdev(clk[per1], "per", "imx-gpt.2"); | ||
152 | clk_register_clkdev(clk[pwm_ipg_gate], "pwm", "mxc_pwm.0"); | ||
153 | clk_register_clkdev(clk[per2], "per", "imx21-cspi.0"); | ||
154 | clk_register_clkdev(clk[cspi1_ipg_gate], "ipg", "imx21-cspi.0"); | ||
155 | clk_register_clkdev(clk[per2], "per", "imx21-cspi.1"); | ||
156 | clk_register_clkdev(clk[cspi2_ipg_gate], "ipg", "imx21-cspi.1"); | ||
157 | clk_register_clkdev(clk[per2], "per", "imx21-cspi.2"); | ||
158 | clk_register_clkdev(clk[cspi3_ipg_gate], "ipg", "imx21-cspi.2"); | ||
159 | clk_register_clkdev(clk[per3], "per", "imx21-fb.0"); | ||
160 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0"); | ||
161 | clk_register_clkdev(clk[lcdc_hclk_gate], "ahb", "imx21-fb.0"); | ||
162 | clk_register_clkdev(clk[usb_gate], "per", "imx21-hcd.0"); | ||
163 | clk_register_clkdev(clk[usb_hclk_gate], "ahb", "imx21-hcd.0"); | ||
164 | clk_register_clkdev(clk[nfc_gate], NULL, "imx21-nand.0"); | ||
165 | clk_register_clkdev(clk[dma_hclk_gate], "ahb", "imx21-dma"); | ||
166 | clk_register_clkdev(clk[dma_gate], "ipg", "imx21-dma"); | ||
167 | clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); | ||
168 | clk_register_clkdev(clk[i2c_gate], NULL, "imx21-i2c.0"); | ||
169 | clk_register_clkdev(clk[kpp_gate], NULL, "mxc-keypad"); | ||
170 | clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0"); | ||
171 | clk_register_clkdev(clk[brom_gate], "brom", NULL); | ||
172 | clk_register_clkdev(clk[emma_gate], "emma", NULL); | ||
173 | clk_register_clkdev(clk[slcdc_gate], "slcdc", NULL); | ||
174 | clk_register_clkdev(clk[gpio_gate], "gpio", NULL); | ||
175 | clk_register_clkdev(clk[rtc_gate], "rtc", NULL); | ||
176 | clk_register_clkdev(clk[csi_hclk_gate], "csi", NULL); | ||
177 | clk_register_clkdev(clk[ssi1_gate], "ssi1", NULL); | ||
178 | clk_register_clkdev(clk[ssi2_gate], "ssi2", NULL); | ||
179 | clk_register_clkdev(clk[sdhc1_ipg_gate], "sdhc1", NULL); | ||
180 | clk_register_clkdev(clk[sdhc2_ipg_gate], "sdhc2", NULL); | ||
181 | |||
182 | mxc_timer_init(MX21_IO_ADDRESS(MX21_GPT1_BASE_ADDR), MX21_INT_GPT1); | ||
183 | |||
184 | return 0; | ||
185 | } | ||
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c deleted file mode 100644 index b197aa73dc4..00000000000 --- a/arch/arm/mach-imx/clk-imx25.c +++ /dev/null | |||
@@ -1,341 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 by Sascha Hauer, Pengutronix | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
16 | * MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/list.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/clkdev.h> | ||
25 | #include <linux/err.h> | ||
26 | #include <linux/of.h> | ||
27 | #include <linux/of_address.h> | ||
28 | #include <linux/of_irq.h> | ||
29 | |||
30 | #include "clk.h" | ||
31 | #include "common.h" | ||
32 | #include "hardware.h" | ||
33 | #include "mx25.h" | ||
34 | |||
35 | #define CRM_BASE MX25_IO_ADDRESS(MX25_CRM_BASE_ADDR) | ||
36 | |||
37 | #define CCM_MPCTL 0x00 | ||
38 | #define CCM_UPCTL 0x04 | ||
39 | #define CCM_CCTL 0x08 | ||
40 | #define CCM_CGCR0 0x0C | ||
41 | #define CCM_CGCR1 0x10 | ||
42 | #define CCM_CGCR2 0x14 | ||
43 | #define CCM_PCDR0 0x18 | ||
44 | #define CCM_PCDR1 0x1C | ||
45 | #define CCM_PCDR2 0x20 | ||
46 | #define CCM_PCDR3 0x24 | ||
47 | #define CCM_RCSR 0x28 | ||
48 | #define CCM_CRDR 0x2C | ||
49 | #define CCM_DCVR0 0x30 | ||
50 | #define CCM_DCVR1 0x34 | ||
51 | #define CCM_DCVR2 0x38 | ||
52 | #define CCM_DCVR3 0x3c | ||
53 | #define CCM_LTR0 0x40 | ||
54 | #define CCM_LTR1 0x44 | ||
55 | #define CCM_LTR2 0x48 | ||
56 | #define CCM_LTR3 0x4c | ||
57 | #define CCM_MCR 0x64 | ||
58 | |||
59 | #define ccm(x) (CRM_BASE + (x)) | ||
60 | |||
61 | static struct clk_onecell_data clk_data; | ||
62 | |||
63 | static const char *cpu_sel_clks[] = { "mpll", "mpll_cpu_3_4", }; | ||
64 | static const char *per_sel_clks[] = { "ahb", "upll", }; | ||
65 | |||
66 | enum mx25_clks { | ||
67 | dummy, osc, mpll, upll, mpll_cpu_3_4, cpu_sel, cpu, ahb, usb_div, ipg, | ||
68 | per0_sel, per1_sel, per2_sel, per3_sel, per4_sel, per5_sel, per6_sel, | ||
69 | per7_sel, per8_sel, per9_sel, per10_sel, per11_sel, per12_sel, | ||
70 | per13_sel, per14_sel, per15_sel, per0, per1, per2, per3, per4, per5, | ||
71 | per6, per7, per8, per9, per10, per11, per12, per13, per14, per15, | ||
72 | csi_ipg_per, epit_ipg_per, esai_ipg_per, esdhc1_ipg_per, esdhc2_ipg_per, | ||
73 | gpt_ipg_per, i2c_ipg_per, lcdc_ipg_per, nfc_ipg_per, owire_ipg_per, | ||
74 | pwm_ipg_per, sim1_ipg_per, sim2_ipg_per, ssi1_ipg_per, ssi2_ipg_per, | ||
75 | uart_ipg_per, ata_ahb, reserved1, csi_ahb, emi_ahb, esai_ahb, esdhc1_ahb, | ||
76 | esdhc2_ahb, fec_ahb, lcdc_ahb, rtic_ahb, sdma_ahb, slcdc_ahb, usbotg_ahb, | ||
77 | reserved2, reserved3, reserved4, reserved5, can1_ipg, can2_ipg, csi_ipg, | ||
78 | cspi1_ipg, cspi2_ipg, cspi3_ipg, dryice_ipg, ect_ipg, epit1_ipg, epit2_ipg, | ||
79 | reserved6, esdhc1_ipg, esdhc2_ipg, fec_ipg, reserved7, reserved8, reserved9, | ||
80 | gpt1_ipg, gpt2_ipg, gpt3_ipg, gpt4_ipg, reserved10, reserved11, reserved12, | ||
81 | iim_ipg, reserved13, reserved14, kpp_ipg, lcdc_ipg, reserved15, pwm1_ipg, | ||
82 | pwm2_ipg, pwm3_ipg, pwm4_ipg, rngb_ipg, reserved16, scc_ipg, sdma_ipg, | ||
83 | sim1_ipg, sim2_ipg, slcdc_ipg, spba_ipg, ssi1_ipg, ssi2_ipg, tsc_ipg, | ||
84 | uart1_ipg, uart2_ipg, uart3_ipg, uart4_ipg, uart5_ipg, reserved17, | ||
85 | wdt_ipg, clk_max | ||
86 | }; | ||
87 | |||
88 | static struct clk *clk[clk_max]; | ||
89 | |||
90 | static int __init __mx25_clocks_init(unsigned long osc_rate) | ||
91 | { | ||
92 | int i; | ||
93 | |||
94 | clk[dummy] = imx_clk_fixed("dummy", 0); | ||
95 | clk[osc] = imx_clk_fixed("osc", osc_rate); | ||
96 | clk[mpll] = imx_clk_pllv1("mpll", "osc", ccm(CCM_MPCTL)); | ||
97 | clk[upll] = imx_clk_pllv1("upll", "osc", ccm(CCM_UPCTL)); | ||
98 | clk[mpll_cpu_3_4] = imx_clk_fixed_factor("mpll_cpu_3_4", "mpll", 3, 4); | ||
99 | clk[cpu_sel] = imx_clk_mux("cpu_sel", ccm(CCM_CCTL), 14, 1, cpu_sel_clks, ARRAY_SIZE(cpu_sel_clks)); | ||
100 | clk[cpu] = imx_clk_divider("cpu", "cpu_sel", ccm(CCM_CCTL), 30, 2); | ||
101 | clk[ahb] = imx_clk_divider("ahb", "cpu", ccm(CCM_CCTL), 28, 2); | ||
102 | clk[usb_div] = imx_clk_divider("usb_div", "upll", ccm(CCM_CCTL), 16, 6); | ||
103 | clk[ipg] = imx_clk_fixed_factor("ipg", "ahb", 1, 2); | ||
104 | clk[per0_sel] = imx_clk_mux("per0_sel", ccm(CCM_MCR), 0, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
105 | clk[per1_sel] = imx_clk_mux("per1_sel", ccm(CCM_MCR), 1, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
106 | clk[per2_sel] = imx_clk_mux("per2_sel", ccm(CCM_MCR), 2, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
107 | clk[per3_sel] = imx_clk_mux("per3_sel", ccm(CCM_MCR), 3, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
108 | clk[per4_sel] = imx_clk_mux("per4_sel", ccm(CCM_MCR), 4, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
109 | clk[per5_sel] = imx_clk_mux("per5_sel", ccm(CCM_MCR), 5, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
110 | clk[per6_sel] = imx_clk_mux("per6_sel", ccm(CCM_MCR), 6, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
111 | clk[per7_sel] = imx_clk_mux("per7_sel", ccm(CCM_MCR), 7, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
112 | clk[per8_sel] = imx_clk_mux("per8_sel", ccm(CCM_MCR), 8, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
113 | clk[per9_sel] = imx_clk_mux("per9_sel", ccm(CCM_MCR), 9, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
114 | clk[per10_sel] = imx_clk_mux("per10_sel", ccm(CCM_MCR), 10, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
115 | clk[per11_sel] = imx_clk_mux("per11_sel", ccm(CCM_MCR), 11, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
116 | clk[per12_sel] = imx_clk_mux("per12_sel", ccm(CCM_MCR), 12, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
117 | clk[per13_sel] = imx_clk_mux("per13_sel", ccm(CCM_MCR), 13, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
118 | clk[per14_sel] = imx_clk_mux("per14_sel", ccm(CCM_MCR), 14, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
119 | clk[per15_sel] = imx_clk_mux("per15_sel", ccm(CCM_MCR), 15, 1, per_sel_clks, ARRAY_SIZE(per_sel_clks)); | ||
120 | clk[per0] = imx_clk_divider("per0", "per0_sel", ccm(CCM_PCDR0), 0, 6); | ||
121 | clk[per1] = imx_clk_divider("per1", "per1_sel", ccm(CCM_PCDR0), 8, 6); | ||
122 | clk[per2] = imx_clk_divider("per2", "per2_sel", ccm(CCM_PCDR0), 16, 6); | ||
123 | clk[per3] = imx_clk_divider("per3", "per3_sel", ccm(CCM_PCDR0), 24, 6); | ||
124 | clk[per4] = imx_clk_divider("per4", "per4_sel", ccm(CCM_PCDR1), 0, 6); | ||
125 | clk[per5] = imx_clk_divider("per5", "per5_sel", ccm(CCM_PCDR1), 8, 6); | ||
126 | clk[per6] = imx_clk_divider("per6", "per6_sel", ccm(CCM_PCDR1), 16, 6); | ||
127 | clk[per7] = imx_clk_divider("per7", "per7_sel", ccm(CCM_PCDR1), 24, 6); | ||
128 | clk[per8] = imx_clk_divider("per8", "per8_sel", ccm(CCM_PCDR2), 0, 6); | ||
129 | clk[per9] = imx_clk_divider("per9", "per9_sel", ccm(CCM_PCDR2), 8, 6); | ||
130 | clk[per10] = imx_clk_divider("per10", "per10_sel", ccm(CCM_PCDR2), 16, 6); | ||
131 | clk[per11] = imx_clk_divider("per11", "per11_sel", ccm(CCM_PCDR2), 24, 6); | ||
132 | clk[per12] = imx_clk_divider("per12", "per12_sel", ccm(CCM_PCDR3), 0, 6); | ||
133 | clk[per13] = imx_clk_divider("per13", "per13_sel", ccm(CCM_PCDR3), 8, 6); | ||
134 | clk[per14] = imx_clk_divider("per14", "per14_sel", ccm(CCM_PCDR3), 16, 6); | ||
135 | clk[per15] = imx_clk_divider("per15", "per15_sel", ccm(CCM_PCDR3), 24, 6); | ||
136 | clk[csi_ipg_per] = imx_clk_gate("csi_ipg_per", "per0", ccm(CCM_CGCR0), 0); | ||
137 | clk[epit_ipg_per] = imx_clk_gate("epit_ipg_per", "per1", ccm(CCM_CGCR0), 1); | ||
138 | clk[esai_ipg_per] = imx_clk_gate("esai_ipg_per", "per2", ccm(CCM_CGCR0), 2); | ||
139 | clk[esdhc1_ipg_per] = imx_clk_gate("esdhc1_ipg_per", "per3", ccm(CCM_CGCR0), 3); | ||
140 | clk[esdhc2_ipg_per] = imx_clk_gate("esdhc2_ipg_per", "per4", ccm(CCM_CGCR0), 4); | ||
141 | clk[gpt_ipg_per] = imx_clk_gate("gpt_ipg_per", "per5", ccm(CCM_CGCR0), 5); | ||
142 | clk[i2c_ipg_per] = imx_clk_gate("i2c_ipg_per", "per6", ccm(CCM_CGCR0), 6); | ||
143 | clk[lcdc_ipg_per] = imx_clk_gate("lcdc_ipg_per", "per7", ccm(CCM_CGCR0), 7); | ||
144 | clk[nfc_ipg_per] = imx_clk_gate("nfc_ipg_per", "per8", ccm(CCM_CGCR0), 8); | ||
145 | clk[owire_ipg_per] = imx_clk_gate("owire_ipg_per", "per9", ccm(CCM_CGCR0), 9); | ||
146 | clk[pwm_ipg_per] = imx_clk_gate("pwm_ipg_per", "per10", ccm(CCM_CGCR0), 10); | ||
147 | clk[sim1_ipg_per] = imx_clk_gate("sim1_ipg_per", "per11", ccm(CCM_CGCR0), 11); | ||
148 | clk[sim2_ipg_per] = imx_clk_gate("sim2_ipg_per", "per12", ccm(CCM_CGCR0), 12); | ||
149 | clk[ssi1_ipg_per] = imx_clk_gate("ssi1_ipg_per", "per13", ccm(CCM_CGCR0), 13); | ||
150 | clk[ssi2_ipg_per] = imx_clk_gate("ssi2_ipg_per", "per14", ccm(CCM_CGCR0), 14); | ||
151 | clk[uart_ipg_per] = imx_clk_gate("uart_ipg_per", "per15", ccm(CCM_CGCR0), 15); | ||
152 | clk[ata_ahb] = imx_clk_gate("ata_ahb", "ahb", ccm(CCM_CGCR0), 16); | ||
153 | /* CCM_CGCR0(17): reserved */ | ||
154 | clk[csi_ahb] = imx_clk_gate("csi_ahb", "ahb", ccm(CCM_CGCR0), 18); | ||
155 | clk[emi_ahb] = imx_clk_gate("emi_ahb", "ahb", ccm(CCM_CGCR0), 19); | ||
156 | clk[esai_ahb] = imx_clk_gate("esai_ahb", "ahb", ccm(CCM_CGCR0), 20); | ||
157 | clk[esdhc1_ahb] = imx_clk_gate("esdhc1_ahb", "ahb", ccm(CCM_CGCR0), 21); | ||
158 | clk[esdhc2_ahb] = imx_clk_gate("esdhc2_ahb", "ahb", ccm(CCM_CGCR0), 22); | ||
159 | clk[fec_ahb] = imx_clk_gate("fec_ahb", "ahb", ccm(CCM_CGCR0), 23); | ||
160 | clk[lcdc_ahb] = imx_clk_gate("lcdc_ahb", "ahb", ccm(CCM_CGCR0), 24); | ||
161 | clk[rtic_ahb] = imx_clk_gate("rtic_ahb", "ahb", ccm(CCM_CGCR0), 25); | ||
162 | clk[sdma_ahb] = imx_clk_gate("sdma_ahb", "ahb", ccm(CCM_CGCR0), 26); | ||
163 | clk[slcdc_ahb] = imx_clk_gate("slcdc_ahb", "ahb", ccm(CCM_CGCR0), 27); | ||
164 | clk[usbotg_ahb] = imx_clk_gate("usbotg_ahb", "ahb", ccm(CCM_CGCR0), 28); | ||
165 | /* CCM_CGCR0(29-31): reserved */ | ||
166 | /* CCM_CGCR1(0): reserved in datasheet, used as audmux in FSL kernel */ | ||
167 | clk[can1_ipg] = imx_clk_gate("can1_ipg", "ipg", ccm(CCM_CGCR1), 2); | ||
168 | clk[can2_ipg] = imx_clk_gate("can2_ipg", "ipg", ccm(CCM_CGCR1), 3); | ||
169 | clk[csi_ipg] = imx_clk_gate("csi_ipg", "ipg", ccm(CCM_CGCR1), 4); | ||
170 | clk[cspi1_ipg] = imx_clk_gate("cspi1_ipg", "ipg", ccm(CCM_CGCR1), 5); | ||
171 | clk[cspi2_ipg] = imx_clk_gate("cspi2_ipg", "ipg", ccm(CCM_CGCR1), 6); | ||
172 | clk[cspi3_ipg] = imx_clk_gate("cspi3_ipg", "ipg", ccm(CCM_CGCR1), 7); | ||
173 | clk[dryice_ipg] = imx_clk_gate("dryice_ipg", "ipg", ccm(CCM_CGCR1), 8); | ||
174 | clk[ect_ipg] = imx_clk_gate("ect_ipg", "ipg", ccm(CCM_CGCR1), 9); | ||
175 | clk[epit1_ipg] = imx_clk_gate("epit1_ipg", "ipg", ccm(CCM_CGCR1), 10); | ||
176 | clk[epit2_ipg] = imx_clk_gate("epit2_ipg", "ipg", ccm(CCM_CGCR1), 11); | ||
177 | /* CCM_CGCR1(12): reserved in datasheet, used as esai in FSL kernel */ | ||
178 | clk[esdhc1_ipg] = imx_clk_gate("esdhc1_ipg", "ipg", ccm(CCM_CGCR1), 13); | ||
179 | clk[esdhc2_ipg] = imx_clk_gate("esdhc2_ipg", "ipg", ccm(CCM_CGCR1), 14); | ||
180 | clk[fec_ipg] = imx_clk_gate("fec_ipg", "ipg", ccm(CCM_CGCR1), 15); | ||
181 | /* CCM_CGCR1(16): reserved in datasheet, used as gpio1 in FSL kernel */ | ||
182 | /* CCM_CGCR1(17): reserved in datasheet, used as gpio2 in FSL kernel */ | ||
183 | /* CCM_CGCR1(18): reserved in datasheet, used as gpio3 in FSL kernel */ | ||
184 | clk[gpt1_ipg] = imx_clk_gate("gpt1_ipg", "ipg", ccm(CCM_CGCR1), 19); | ||
185 | clk[gpt2_ipg] = imx_clk_gate("gpt2_ipg", "ipg", ccm(CCM_CGCR1), 20); | ||
186 | clk[gpt3_ipg] = imx_clk_gate("gpt3_ipg", "ipg", ccm(CCM_CGCR1), 21); | ||
187 | clk[gpt4_ipg] = imx_clk_gate("gpt4_ipg", "ipg", ccm(CCM_CGCR1), 22); | ||
188 | /* CCM_CGCR1(23): reserved in datasheet, used as i2c1 in FSL kernel */ | ||
189 | /* CCM_CGCR1(24): reserved in datasheet, used as i2c2 in FSL kernel */ | ||
190 | /* CCM_CGCR1(25): reserved in datasheet, used as i2c3 in FSL kernel */ | ||
191 | clk[iim_ipg] = imx_clk_gate("iim_ipg", "ipg", ccm(CCM_CGCR1), 26); | ||
192 | /* CCM_CGCR1(27): reserved in datasheet, used as iomuxc in FSL kernel */ | ||
193 | /* CCM_CGCR1(28): reserved in datasheet, used as kpp in FSL kernel */ | ||
194 | clk[kpp_ipg] = imx_clk_gate("kpp_ipg", "ipg", ccm(CCM_CGCR1), 28); | ||
195 | clk[lcdc_ipg] = imx_clk_gate("lcdc_ipg", "ipg", ccm(CCM_CGCR1), 29); | ||
196 | /* CCM_CGCR1(30): reserved in datasheet, used as owire in FSL kernel */ | ||
197 | clk[pwm1_ipg] = imx_clk_gate("pwm1_ipg", "ipg", ccm(CCM_CGCR1), 31); | ||
198 | clk[pwm2_ipg] = imx_clk_gate("pwm2_ipg", "ipg", ccm(CCM_CGCR2), 0); | ||
199 | clk[pwm3_ipg] = imx_clk_gate("pwm3_ipg", "ipg", ccm(CCM_CGCR2), 1); | ||
200 | clk[pwm4_ipg] = imx_clk_gate("pwm4_ipg", "ipg", ccm(CCM_CGCR2), 2); | ||
201 | clk[rngb_ipg] = imx_clk_gate("rngb_ipg", "ipg", ccm(CCM_CGCR2), 3); | ||
202 | /* CCM_CGCR2(4): reserved in datasheet, used as rtic in FSL kernel */ | ||
203 | clk[scc_ipg] = imx_clk_gate("scc_ipg", "ipg", ccm(CCM_CGCR2), 5); | ||
204 | clk[sdma_ipg] = imx_clk_gate("sdma_ipg", "ipg", ccm(CCM_CGCR2), 6); | ||
205 | clk[sim1_ipg] = imx_clk_gate("sim1_ipg", "ipg", ccm(CCM_CGCR2), 7); | ||
206 | clk[sim2_ipg] = imx_clk_gate("sim2_ipg", "ipg", ccm(CCM_CGCR2), 8); | ||
207 | clk[slcdc_ipg] = imx_clk_gate("slcdc_ipg", "ipg", ccm(CCM_CGCR2), 9); | ||
208 | clk[spba_ipg] = imx_clk_gate("spba_ipg", "ipg", ccm(CCM_CGCR2), 10); | ||
209 | clk[ssi1_ipg] = imx_clk_gate("ssi1_ipg", "ipg", ccm(CCM_CGCR2), 11); | ||
210 | clk[ssi2_ipg] = imx_clk_gate("ssi2_ipg", "ipg", ccm(CCM_CGCR2), 12); | ||
211 | clk[tsc_ipg] = imx_clk_gate("tsc_ipg", "ipg", ccm(CCM_CGCR2), 13); | ||
212 | clk[uart1_ipg] = imx_clk_gate("uart1_ipg", "ipg", ccm(CCM_CGCR2), 14); | ||
213 | clk[uart2_ipg] = imx_clk_gate("uart2_ipg", "ipg", ccm(CCM_CGCR2), 15); | ||
214 | clk[uart3_ipg] = imx_clk_gate("uart3_ipg", "ipg", ccm(CCM_CGCR2), 16); | ||
215 | clk[uart4_ipg] = imx_clk_gate("uart4_ipg", "ipg", ccm(CCM_CGCR2), 17); | ||
216 | clk[uart5_ipg] = imx_clk_gate("uart5_ipg", "ipg", ccm(CCM_CGCR2), 18); | ||
217 | /* CCM_CGCR2(19): reserved in datasheet, but used as wdt in FSL kernel */ | ||
218 | clk[wdt_ipg] = imx_clk_gate("wdt_ipg", "ipg", ccm(CCM_CGCR2), 19); | ||
219 | |||
220 | for (i = 0; i < ARRAY_SIZE(clk); i++) | ||
221 | if (IS_ERR(clk[i])) | ||
222 | pr_err("i.MX25 clk %d: register failed with %ld\n", | ||
223 | i, PTR_ERR(clk[i])); | ||
224 | |||
225 | clk_prepare_enable(clk[emi_ahb]); | ||
226 | |||
227 | clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0"); | ||
228 | clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); | ||
229 | |||
230 | return 0; | ||
231 | } | ||
232 | |||
233 | int __init mx25_clocks_init(void) | ||
234 | { | ||
235 | __mx25_clocks_init(24000000); | ||
236 | |||
237 | /* i.mx25 has the i.mx21 type uart */ | ||
238 | clk_register_clkdev(clk[uart1_ipg], "ipg", "imx21-uart.0"); | ||
239 | clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.0"); | ||
240 | clk_register_clkdev(clk[uart2_ipg], "ipg", "imx21-uart.1"); | ||
241 | clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.1"); | ||
242 | clk_register_clkdev(clk[uart3_ipg], "ipg", "imx21-uart.2"); | ||
243 | clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.2"); | ||
244 | clk_register_clkdev(clk[uart4_ipg], "ipg", "imx21-uart.3"); | ||
245 | clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.3"); | ||
246 | clk_register_clkdev(clk[uart5_ipg], "ipg", "imx21-uart.4"); | ||
247 | clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.4"); | ||
248 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0"); | ||
249 | clk_register_clkdev(clk[usbotg_ahb], "ahb", "mxc-ehci.0"); | ||
250 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0"); | ||
251 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.1"); | ||
252 | clk_register_clkdev(clk[usbotg_ahb], "ahb", "mxc-ehci.1"); | ||
253 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.1"); | ||
254 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); | ||
255 | clk_register_clkdev(clk[usbotg_ahb], "ahb", "mxc-ehci.2"); | ||
256 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); | ||
257 | clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); | ||
258 | clk_register_clkdev(clk[usbotg_ahb], "ahb", "fsl-usb2-udc"); | ||
259 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | ||
260 | clk_register_clkdev(clk[nfc_ipg_per], NULL, "imx25-nand.0"); | ||
261 | /* i.mx25 has the i.mx35 type cspi */ | ||
262 | clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0"); | ||
263 | clk_register_clkdev(clk[cspi2_ipg], NULL, "imx35-cspi.1"); | ||
264 | clk_register_clkdev(clk[cspi3_ipg], NULL, "imx35-cspi.2"); | ||
265 | clk_register_clkdev(clk[pwm1_ipg], "ipg", "mxc_pwm.0"); | ||
266 | clk_register_clkdev(clk[per10], "per", "mxc_pwm.0"); | ||
267 | clk_register_clkdev(clk[pwm1_ipg], "ipg", "mxc_pwm.1"); | ||
268 | clk_register_clkdev(clk[per10], "per", "mxc_pwm.1"); | ||
269 | clk_register_clkdev(clk[pwm1_ipg], "ipg", "mxc_pwm.2"); | ||
270 | clk_register_clkdev(clk[per10], "per", "mxc_pwm.2"); | ||
271 | clk_register_clkdev(clk[pwm1_ipg], "ipg", "mxc_pwm.3"); | ||
272 | clk_register_clkdev(clk[per10], "per", "mxc_pwm.3"); | ||
273 | clk_register_clkdev(clk[kpp_ipg], NULL, "imx-keypad"); | ||
274 | clk_register_clkdev(clk[tsc_ipg], NULL, "mx25-adc"); | ||
275 | clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.0"); | ||
276 | clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.1"); | ||
277 | clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.2"); | ||
278 | clk_register_clkdev(clk[fec_ipg], "ipg", "imx25-fec.0"); | ||
279 | clk_register_clkdev(clk[fec_ahb], "ahb", "imx25-fec.0"); | ||
280 | clk_register_clkdev(clk[dryice_ipg], NULL, "imxdi_rtc.0"); | ||
281 | clk_register_clkdev(clk[lcdc_ipg_per], "per", "imx21-fb.0"); | ||
282 | clk_register_clkdev(clk[lcdc_ipg], "ipg", "imx21-fb.0"); | ||
283 | clk_register_clkdev(clk[lcdc_ahb], "ahb", "imx21-fb.0"); | ||
284 | clk_register_clkdev(clk[wdt_ipg], NULL, "imx2-wdt.0"); | ||
285 | clk_register_clkdev(clk[ssi1_ipg], NULL, "imx-ssi.0"); | ||
286 | clk_register_clkdev(clk[ssi2_ipg], NULL, "imx-ssi.1"); | ||
287 | clk_register_clkdev(clk[esdhc1_ipg_per], "per", "sdhci-esdhc-imx25.0"); | ||
288 | clk_register_clkdev(clk[esdhc1_ipg], "ipg", "sdhci-esdhc-imx25.0"); | ||
289 | clk_register_clkdev(clk[esdhc1_ahb], "ahb", "sdhci-esdhc-imx25.0"); | ||
290 | clk_register_clkdev(clk[esdhc2_ipg_per], "per", "sdhci-esdhc-imx25.1"); | ||
291 | clk_register_clkdev(clk[esdhc2_ipg], "ipg", "sdhci-esdhc-imx25.1"); | ||
292 | clk_register_clkdev(clk[esdhc2_ahb], "ahb", "sdhci-esdhc-imx25.1"); | ||
293 | clk_register_clkdev(clk[csi_ipg_per], "per", "imx25-camera.0"); | ||
294 | clk_register_clkdev(clk[csi_ipg], "ipg", "imx25-camera.0"); | ||
295 | clk_register_clkdev(clk[csi_ahb], "ahb", "imx25-camera.0"); | ||
296 | clk_register_clkdev(clk[dummy], "audmux", NULL); | ||
297 | clk_register_clkdev(clk[can1_ipg], NULL, "flexcan.0"); | ||
298 | clk_register_clkdev(clk[can2_ipg], NULL, "flexcan.1"); | ||
299 | /* i.mx25 has the i.mx35 type sdma */ | ||
300 | clk_register_clkdev(clk[sdma_ipg], "ipg", "imx35-sdma"); | ||
301 | clk_register_clkdev(clk[sdma_ahb], "ahb", "imx35-sdma"); | ||
302 | clk_register_clkdev(clk[iim_ipg], "iim", NULL); | ||
303 | |||
304 | mxc_timer_init(MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), MX25_INT_GPT1); | ||
305 | |||
306 | return 0; | ||
307 | } | ||
308 | |||
309 | int __init mx25_clocks_init_dt(void) | ||
310 | { | ||
311 | struct device_node *np; | ||
312 | void __iomem *base; | ||
313 | int irq; | ||
314 | unsigned long osc_rate = 24000000; | ||
315 | |||
316 | /* retrieve the freqency of fixed clocks from device tree */ | ||
317 | for_each_compatible_node(np, NULL, "fixed-clock") { | ||
318 | u32 rate; | ||
319 | if (of_property_read_u32(np, "clock-frequency", &rate)) | ||
320 | continue; | ||
321 | |||
322 | if (of_device_is_compatible(np, "fsl,imx-osc")) | ||
323 | osc_rate = rate; | ||
324 | } | ||
325 | |||
326 | np = of_find_compatible_node(NULL, NULL, "fsl,imx25-ccm"); | ||
327 | clk_data.clks = clk; | ||
328 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
329 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
330 | |||
331 | __mx25_clocks_init(osc_rate); | ||
332 | |||
333 | np = of_find_compatible_node(NULL, NULL, "fsl,imx25-gpt"); | ||
334 | base = of_iomap(np, 0); | ||
335 | WARN_ON(!base); | ||
336 | irq = irq_of_parse_and_map(np, 0); | ||
337 | |||
338 | mxc_timer_init(base, irq); | ||
339 | |||
340 | return 0; | ||
341 | } | ||
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c deleted file mode 100644 index 4c1d1e4efc7..00000000000 --- a/arch/arm/mach-imx/clk-imx27.c +++ /dev/null | |||
@@ -1,305 +0,0 @@ | |||
1 | #include <linux/clk.h> | ||
2 | #include <linux/io.h> | ||
3 | #include <linux/module.h> | ||
4 | #include <linux/clkdev.h> | ||
5 | #include <linux/err.h> | ||
6 | #include <linux/clk-provider.h> | ||
7 | #include <linux/of.h> | ||
8 | |||
9 | #include "clk.h" | ||
10 | #include "common.h" | ||
11 | #include "hardware.h" | ||
12 | |||
13 | #define IO_ADDR_CCM(off) (MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR + (off))) | ||
14 | |||
15 | /* Register offsets */ | ||
16 | #define CCM_CSCR IO_ADDR_CCM(0x0) | ||
17 | #define CCM_MPCTL0 IO_ADDR_CCM(0x4) | ||
18 | #define CCM_MPCTL1 IO_ADDR_CCM(0x8) | ||
19 | #define CCM_SPCTL0 IO_ADDR_CCM(0xc) | ||
20 | #define CCM_SPCTL1 IO_ADDR_CCM(0x10) | ||
21 | #define CCM_OSC26MCTL IO_ADDR_CCM(0x14) | ||
22 | #define CCM_PCDR0 IO_ADDR_CCM(0x18) | ||
23 | #define CCM_PCDR1 IO_ADDR_CCM(0x1c) | ||
24 | #define CCM_PCCR0 IO_ADDR_CCM(0x20) | ||
25 | #define CCM_PCCR1 IO_ADDR_CCM(0x24) | ||
26 | #define CCM_CCSR IO_ADDR_CCM(0x28) | ||
27 | #define CCM_PMCTL IO_ADDR_CCM(0x2c) | ||
28 | #define CCM_PMCOUNT IO_ADDR_CCM(0x30) | ||
29 | #define CCM_WKGDCTL IO_ADDR_CCM(0x34) | ||
30 | |||
31 | #define CCM_CSCR_UPDATE_DIS (1 << 31) | ||
32 | #define CCM_CSCR_SSI2 (1 << 23) | ||
33 | #define CCM_CSCR_SSI1 (1 << 22) | ||
34 | #define CCM_CSCR_VPU (1 << 21) | ||
35 | #define CCM_CSCR_MSHC (1 << 20) | ||
36 | #define CCM_CSCR_SPLLRES (1 << 19) | ||
37 | #define CCM_CSCR_MPLLRES (1 << 18) | ||
38 | #define CCM_CSCR_SP (1 << 17) | ||
39 | #define CCM_CSCR_MCU (1 << 16) | ||
40 | #define CCM_CSCR_OSC26MDIV (1 << 4) | ||
41 | #define CCM_CSCR_OSC26M (1 << 3) | ||
42 | #define CCM_CSCR_FPM (1 << 2) | ||
43 | #define CCM_CSCR_SPEN (1 << 1) | ||
44 | #define CCM_CSCR_MPEN (1 << 0) | ||
45 | |||
46 | /* i.MX27 TO 2+ */ | ||
47 | #define CCM_CSCR_ARM_SRC (1 << 15) | ||
48 | |||
49 | #define CCM_SPCTL1_LF (1 << 15) | ||
50 | #define CCM_SPCTL1_BRMO (1 << 6) | ||
51 | |||
52 | static const char *vpu_sel_clks[] = { "spll", "mpll_main2", }; | ||
53 | static const char *cpu_sel_clks[] = { "mpll_main2", "mpll", }; | ||
54 | static const char *mpll_sel_clks[] = { "fpm", "mpll_osc_sel", }; | ||
55 | static const char *mpll_osc_sel_clks[] = { "ckih", "ckih_div1p5", }; | ||
56 | static const char *clko_sel_clks[] = { | ||
57 | "ckil", "fpm", "ckih", "ckih", | ||
58 | "ckih", "mpll", "spll", "cpu_div", | ||
59 | "ahb", "ipg", "per1_div", "per2_div", | ||
60 | "per3_div", "per4_div", "ssi1_div", "ssi2_div", | ||
61 | "nfc_div", "mshc_div", "vpu_div", "60m", | ||
62 | "32k", "usb_div", "dptc", | ||
63 | }; | ||
64 | |||
65 | static const char *ssi_sel_clks[] = { "spll", "mpll", }; | ||
66 | |||
67 | enum mx27_clks { | ||
68 | dummy, ckih, ckil, mpll, spll, mpll_main2, ahb, ipg, nfc_div, per1_div, | ||
69 | per2_div, per3_div, per4_div, vpu_sel, vpu_div, usb_div, cpu_sel, | ||
70 | clko_sel, cpu_div, clko_div, ssi1_sel, ssi2_sel, ssi1_div, ssi2_div, | ||
71 | clko_en, ssi2_ipg_gate, ssi1_ipg_gate, slcdc_ipg_gate, sdhc3_ipg_gate, | ||
72 | sdhc2_ipg_gate, sdhc1_ipg_gate, scc_ipg_gate, sahara_ipg_gate, | ||
73 | rtc_ipg_gate, pwm_ipg_gate, owire_ipg_gate, lcdc_ipg_gate, | ||
74 | kpp_ipg_gate, iim_ipg_gate, i2c2_ipg_gate, i2c1_ipg_gate, | ||
75 | gpt6_ipg_gate, gpt5_ipg_gate, gpt4_ipg_gate, gpt3_ipg_gate, | ||
76 | gpt2_ipg_gate, gpt1_ipg_gate, gpio_ipg_gate, fec_ipg_gate, | ||
77 | emma_ipg_gate, dma_ipg_gate, cspi3_ipg_gate, cspi2_ipg_gate, | ||
78 | cspi1_ipg_gate, nfc_baud_gate, ssi2_baud_gate, ssi1_baud_gate, | ||
79 | vpu_baud_gate, per4_gate, per3_gate, per2_gate, per1_gate, | ||
80 | usb_ahb_gate, slcdc_ahb_gate, sahara_ahb_gate, lcdc_ahb_gate, | ||
81 | vpu_ahb_gate, fec_ahb_gate, emma_ahb_gate, emi_ahb_gate, dma_ahb_gate, | ||
82 | csi_ahb_gate, brom_ahb_gate, ata_ahb_gate, wdog_ipg_gate, usb_ipg_gate, | ||
83 | uart6_ipg_gate, uart5_ipg_gate, uart4_ipg_gate, uart3_ipg_gate, | ||
84 | uart2_ipg_gate, uart1_ipg_gate, ckih_div1p5, fpm, mpll_osc_sel, | ||
85 | mpll_sel, clk_max | ||
86 | }; | ||
87 | |||
88 | static struct clk *clk[clk_max]; | ||
89 | |||
90 | int __init mx27_clocks_init(unsigned long fref) | ||
91 | { | ||
92 | int i; | ||
93 | |||
94 | clk[dummy] = imx_clk_fixed("dummy", 0); | ||
95 | clk[ckih] = imx_clk_fixed("ckih", fref); | ||
96 | clk[ckil] = imx_clk_fixed("ckil", 32768); | ||
97 | clk[fpm] = imx_clk_fixed_factor("fpm", "ckil", 1024, 1); | ||
98 | clk[ckih_div1p5] = imx_clk_fixed_factor("ckih_div1p5", "ckih", 2, 3); | ||
99 | |||
100 | clk[mpll_osc_sel] = imx_clk_mux("mpll_osc_sel", CCM_CSCR, 4, 1, | ||
101 | mpll_osc_sel_clks, | ||
102 | ARRAY_SIZE(mpll_osc_sel_clks)); | ||
103 | clk[mpll_sel] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks, | ||
104 | ARRAY_SIZE(mpll_sel_clks)); | ||
105 | clk[mpll] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0); | ||
106 | clk[spll] = imx_clk_pllv1("spll", "ckih", CCM_SPCTL0); | ||
107 | clk[mpll_main2] = imx_clk_fixed_factor("mpll_main2", "mpll", 2, 3); | ||
108 | |||
109 | if (mx27_revision() >= IMX_CHIP_REVISION_2_0) { | ||
110 | clk[ahb] = imx_clk_divider("ahb", "mpll_main2", CCM_CSCR, 8, 2); | ||
111 | clk[ipg] = imx_clk_fixed_factor("ipg", "ahb", 1, 2); | ||
112 | } else { | ||
113 | clk[ahb] = imx_clk_divider("ahb", "mpll_main2", CCM_CSCR, 9, 4); | ||
114 | clk[ipg] = imx_clk_divider("ipg", "ahb", CCM_CSCR, 8, 1); | ||
115 | } | ||
116 | |||
117 | clk[nfc_div] = imx_clk_divider("nfc_div", "ahb", CCM_PCDR0, 6, 4); | ||
118 | clk[per1_div] = imx_clk_divider("per1_div", "mpll_main2", CCM_PCDR1, 0, 6); | ||
119 | clk[per2_div] = imx_clk_divider("per2_div", "mpll_main2", CCM_PCDR1, 8, 6); | ||
120 | clk[per3_div] = imx_clk_divider("per3_div", "mpll_main2", CCM_PCDR1, 16, 6); | ||
121 | clk[per4_div] = imx_clk_divider("per4_div", "mpll_main2", CCM_PCDR1, 24, 6); | ||
122 | clk[vpu_sel] = imx_clk_mux("vpu_sel", CCM_CSCR, 21, 1, vpu_sel_clks, ARRAY_SIZE(vpu_sel_clks)); | ||
123 | clk[vpu_div] = imx_clk_divider("vpu_div", "vpu_sel", CCM_PCDR0, 10, 6); | ||
124 | clk[usb_div] = imx_clk_divider("usb_div", "spll", CCM_CSCR, 28, 3); | ||
125 | clk[cpu_sel] = imx_clk_mux("cpu_sel", CCM_CSCR, 15, 1, cpu_sel_clks, ARRAY_SIZE(cpu_sel_clks)); | ||
126 | clk[clko_sel] = imx_clk_mux("clko_sel", CCM_CCSR, 0, 5, clko_sel_clks, ARRAY_SIZE(clko_sel_clks)); | ||
127 | if (mx27_revision() >= IMX_CHIP_REVISION_2_0) | ||
128 | clk[cpu_div] = imx_clk_divider("cpu_div", "cpu_sel", CCM_CSCR, 12, 2); | ||
129 | else | ||
130 | clk[cpu_div] = imx_clk_divider("cpu_div", "cpu_sel", CCM_CSCR, 13, 3); | ||
131 | clk[clko_div] = imx_clk_divider("clko_div", "clko_sel", CCM_PCDR0, 22, 3); | ||
132 | clk[ssi1_sel] = imx_clk_mux("ssi1_sel", CCM_CSCR, 22, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); | ||
133 | clk[ssi2_sel] = imx_clk_mux("ssi2_sel", CCM_CSCR, 23, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); | ||
134 | clk[ssi1_div] = imx_clk_divider("ssi1_div", "ssi1_sel", CCM_PCDR0, 16, 6); | ||
135 | clk[ssi2_div] = imx_clk_divider("ssi2_div", "ssi2_sel", CCM_PCDR0, 26, 6); | ||
136 | clk[clko_en] = imx_clk_gate("clko_en", "clko_div", CCM_PCCR0, 0); | ||
137 | clk[ssi2_ipg_gate] = imx_clk_gate("ssi2_ipg_gate", "ipg", CCM_PCCR0, 0); | ||
138 | clk[ssi1_ipg_gate] = imx_clk_gate("ssi1_ipg_gate", "ipg", CCM_PCCR0, 1); | ||
139 | clk[slcdc_ipg_gate] = imx_clk_gate("slcdc_ipg_gate", "ipg", CCM_PCCR0, 2); | ||
140 | clk[sdhc3_ipg_gate] = imx_clk_gate("sdhc3_ipg_gate", "ipg", CCM_PCCR0, 3); | ||
141 | clk[sdhc2_ipg_gate] = imx_clk_gate("sdhc2_ipg_gate", "ipg", CCM_PCCR0, 4); | ||
142 | clk[sdhc1_ipg_gate] = imx_clk_gate("sdhc1_ipg_gate", "ipg", CCM_PCCR0, 5); | ||
143 | clk[scc_ipg_gate] = imx_clk_gate("scc_ipg_gate", "ipg", CCM_PCCR0, 6); | ||
144 | clk[sahara_ipg_gate] = imx_clk_gate("sahara_ipg_gate", "ipg", CCM_PCCR0, 7); | ||
145 | clk[rtc_ipg_gate] = imx_clk_gate("rtc_ipg_gate", "ipg", CCM_PCCR0, 9); | ||
146 | clk[pwm_ipg_gate] = imx_clk_gate("pwm_ipg_gate", "ipg", CCM_PCCR0, 11); | ||
147 | clk[owire_ipg_gate] = imx_clk_gate("owire_ipg_gate", "ipg", CCM_PCCR0, 12); | ||
148 | clk[lcdc_ipg_gate] = imx_clk_gate("lcdc_ipg_gate", "ipg", CCM_PCCR0, 14); | ||
149 | clk[kpp_ipg_gate] = imx_clk_gate("kpp_ipg_gate", "ipg", CCM_PCCR0, 15); | ||
150 | clk[iim_ipg_gate] = imx_clk_gate("iim_ipg_gate", "ipg", CCM_PCCR0, 16); | ||
151 | clk[i2c2_ipg_gate] = imx_clk_gate("i2c2_ipg_gate", "ipg", CCM_PCCR0, 17); | ||
152 | clk[i2c1_ipg_gate] = imx_clk_gate("i2c1_ipg_gate", "ipg", CCM_PCCR0, 18); | ||
153 | clk[gpt6_ipg_gate] = imx_clk_gate("gpt6_ipg_gate", "ipg", CCM_PCCR0, 19); | ||
154 | clk[gpt5_ipg_gate] = imx_clk_gate("gpt5_ipg_gate", "ipg", CCM_PCCR0, 20); | ||
155 | clk[gpt4_ipg_gate] = imx_clk_gate("gpt4_ipg_gate", "ipg", CCM_PCCR0, 21); | ||
156 | clk[gpt3_ipg_gate] = imx_clk_gate("gpt3_ipg_gate", "ipg", CCM_PCCR0, 22); | ||
157 | clk[gpt2_ipg_gate] = imx_clk_gate("gpt2_ipg_gate", "ipg", CCM_PCCR0, 23); | ||
158 | clk[gpt1_ipg_gate] = imx_clk_gate("gpt1_ipg_gate", "ipg", CCM_PCCR0, 24); | ||
159 | clk[gpio_ipg_gate] = imx_clk_gate("gpio_ipg_gate", "ipg", CCM_PCCR0, 25); | ||
160 | clk[fec_ipg_gate] = imx_clk_gate("fec_ipg_gate", "ipg", CCM_PCCR0, 26); | ||
161 | clk[emma_ipg_gate] = imx_clk_gate("emma_ipg_gate", "ipg", CCM_PCCR0, 27); | ||
162 | clk[dma_ipg_gate] = imx_clk_gate("dma_ipg_gate", "ipg", CCM_PCCR0, 28); | ||
163 | clk[cspi3_ipg_gate] = imx_clk_gate("cspi3_ipg_gate", "ipg", CCM_PCCR0, 29); | ||
164 | clk[cspi2_ipg_gate] = imx_clk_gate("cspi2_ipg_gate", "ipg", CCM_PCCR0, 30); | ||
165 | clk[cspi1_ipg_gate] = imx_clk_gate("cspi1_ipg_gate", "ipg", CCM_PCCR0, 31); | ||
166 | clk[nfc_baud_gate] = imx_clk_gate("nfc_baud_gate", "nfc_div", CCM_PCCR1, 3); | ||
167 | clk[ssi2_baud_gate] = imx_clk_gate("ssi2_baud_gate", "ssi2_div", CCM_PCCR1, 4); | ||
168 | clk[ssi1_baud_gate] = imx_clk_gate("ssi1_baud_gate", "ssi1_div", CCM_PCCR1, 5); | ||
169 | clk[vpu_baud_gate] = imx_clk_gate("vpu_baud_gate", "vpu_div", CCM_PCCR1, 6); | ||
170 | clk[per4_gate] = imx_clk_gate("per4_gate", "per4_div", CCM_PCCR1, 7); | ||
171 | clk[per3_gate] = imx_clk_gate("per3_gate", "per3_div", CCM_PCCR1, 8); | ||
172 | clk[per2_gate] = imx_clk_gate("per2_gate", "per2_div", CCM_PCCR1, 9); | ||
173 | clk[per1_gate] = imx_clk_gate("per1_gate", "per1_div", CCM_PCCR1, 10); | ||
174 | clk[usb_ahb_gate] = imx_clk_gate("usb_ahb_gate", "ahb", CCM_PCCR1, 11); | ||
175 | clk[slcdc_ahb_gate] = imx_clk_gate("slcdc_ahb_gate", "ahb", CCM_PCCR1, 12); | ||
176 | clk[sahara_ahb_gate] = imx_clk_gate("sahara_ahb_gate", "ahb", CCM_PCCR1, 13); | ||
177 | clk[lcdc_ahb_gate] = imx_clk_gate("lcdc_ahb_gate", "ahb", CCM_PCCR1, 15); | ||
178 | clk[vpu_ahb_gate] = imx_clk_gate("vpu_ahb_gate", "ahb", CCM_PCCR1, 16); | ||
179 | clk[fec_ahb_gate] = imx_clk_gate("fec_ahb_gate", "ahb", CCM_PCCR1, 17); | ||
180 | clk[emma_ahb_gate] = imx_clk_gate("emma_ahb_gate", "ahb", CCM_PCCR1, 18); | ||
181 | clk[emi_ahb_gate] = imx_clk_gate("emi_ahb_gate", "ahb", CCM_PCCR1, 19); | ||
182 | clk[dma_ahb_gate] = imx_clk_gate("dma_ahb_gate", "ahb", CCM_PCCR1, 20); | ||
183 | clk[csi_ahb_gate] = imx_clk_gate("csi_ahb_gate", "ahb", CCM_PCCR1, 21); | ||
184 | clk[brom_ahb_gate] = imx_clk_gate("brom_ahb_gate", "ahb", CCM_PCCR1, 22); | ||
185 | clk[ata_ahb_gate] = imx_clk_gate("ata_ahb_gate", "ahb", CCM_PCCR1, 23); | ||
186 | clk[wdog_ipg_gate] = imx_clk_gate("wdog_ipg_gate", "ipg", CCM_PCCR1, 24); | ||
187 | clk[usb_ipg_gate] = imx_clk_gate("usb_ipg_gate", "ipg", CCM_PCCR1, 25); | ||
188 | clk[uart6_ipg_gate] = imx_clk_gate("uart6_ipg_gate", "ipg", CCM_PCCR1, 26); | ||
189 | clk[uart5_ipg_gate] = imx_clk_gate("uart5_ipg_gate", "ipg", CCM_PCCR1, 27); | ||
190 | clk[uart4_ipg_gate] = imx_clk_gate("uart4_ipg_gate", "ipg", CCM_PCCR1, 28); | ||
191 | clk[uart3_ipg_gate] = imx_clk_gate("uart3_ipg_gate", "ipg", CCM_PCCR1, 29); | ||
192 | clk[uart2_ipg_gate] = imx_clk_gate("uart2_ipg_gate", "ipg", CCM_PCCR1, 30); | ||
193 | clk[uart1_ipg_gate] = imx_clk_gate("uart1_ipg_gate", "ipg", CCM_PCCR1, 31); | ||
194 | |||
195 | for (i = 0; i < ARRAY_SIZE(clk); i++) | ||
196 | if (IS_ERR(clk[i])) | ||
197 | pr_err("i.MX27 clk %d: register failed with %ld\n", | ||
198 | i, PTR_ERR(clk[i])); | ||
199 | |||
200 | clk_register_clkdev(clk[uart1_ipg_gate], "ipg", "imx21-uart.0"); | ||
201 | clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.0"); | ||
202 | clk_register_clkdev(clk[uart2_ipg_gate], "ipg", "imx21-uart.1"); | ||
203 | clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.1"); | ||
204 | clk_register_clkdev(clk[uart3_ipg_gate], "ipg", "imx21-uart.2"); | ||
205 | clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.2"); | ||
206 | clk_register_clkdev(clk[uart4_ipg_gate], "ipg", "imx21-uart.3"); | ||
207 | clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.3"); | ||
208 | clk_register_clkdev(clk[uart5_ipg_gate], "ipg", "imx21-uart.4"); | ||
209 | clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.4"); | ||
210 | clk_register_clkdev(clk[uart6_ipg_gate], "ipg", "imx21-uart.5"); | ||
211 | clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.5"); | ||
212 | clk_register_clkdev(clk[gpt1_ipg_gate], "ipg", "imx-gpt.0"); | ||
213 | clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.0"); | ||
214 | clk_register_clkdev(clk[gpt2_ipg_gate], "ipg", "imx-gpt.1"); | ||
215 | clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.1"); | ||
216 | clk_register_clkdev(clk[gpt3_ipg_gate], "ipg", "imx-gpt.2"); | ||
217 | clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.2"); | ||
218 | clk_register_clkdev(clk[gpt4_ipg_gate], "ipg", "imx-gpt.3"); | ||
219 | clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.3"); | ||
220 | clk_register_clkdev(clk[gpt5_ipg_gate], "ipg", "imx-gpt.4"); | ||
221 | clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.4"); | ||
222 | clk_register_clkdev(clk[gpt6_ipg_gate], "ipg", "imx-gpt.5"); | ||
223 | clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.5"); | ||
224 | clk_register_clkdev(clk[pwm_ipg_gate], NULL, "mxc_pwm.0"); | ||
225 | clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.0"); | ||
226 | clk_register_clkdev(clk[sdhc1_ipg_gate], "ipg", "imx21-mmc.0"); | ||
227 | clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.1"); | ||
228 | clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "imx21-mmc.1"); | ||
229 | clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.2"); | ||
230 | clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "imx21-mmc.2"); | ||
231 | clk_register_clkdev(clk[cspi1_ipg_gate], NULL, "imx27-cspi.0"); | ||
232 | clk_register_clkdev(clk[cspi2_ipg_gate], NULL, "imx27-cspi.1"); | ||
233 | clk_register_clkdev(clk[cspi3_ipg_gate], NULL, "imx27-cspi.2"); | ||
234 | clk_register_clkdev(clk[per3_gate], "per", "imx21-fb.0"); | ||
235 | clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0"); | ||
236 | clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0"); | ||
237 | clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); | ||
238 | clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0"); | ||
239 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | ||
240 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); | ||
241 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc"); | ||
242 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0"); | ||
243 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.0"); | ||
244 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.0"); | ||
245 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.1"); | ||
246 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.1"); | ||
247 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.1"); | ||
248 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); | ||
249 | clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.2"); | ||
250 | clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.2"); | ||
251 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); | ||
252 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); | ||
253 | clk_register_clkdev(clk[nfc_baud_gate], NULL, "imx27-nand.0"); | ||
254 | clk_register_clkdev(clk[vpu_baud_gate], "per", "coda-imx27.0"); | ||
255 | clk_register_clkdev(clk[vpu_ahb_gate], "ahb", "coda-imx27.0"); | ||
256 | clk_register_clkdev(clk[dma_ahb_gate], "ahb", "imx27-dma"); | ||
257 | clk_register_clkdev(clk[dma_ipg_gate], "ipg", "imx27-dma"); | ||
258 | clk_register_clkdev(clk[fec_ipg_gate], "ipg", "imx27-fec.0"); | ||
259 | clk_register_clkdev(clk[fec_ahb_gate], "ahb", "imx27-fec.0"); | ||
260 | clk_register_clkdev(clk[wdog_ipg_gate], NULL, "imx2-wdt.0"); | ||
261 | clk_register_clkdev(clk[i2c1_ipg_gate], NULL, "imx21-i2c.0"); | ||
262 | clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx21-i2c.1"); | ||
263 | clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0"); | ||
264 | clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad"); | ||
265 | clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "imx27-camera.0"); | ||
266 | clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "imx27-camera.0"); | ||
267 | clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0"); | ||
268 | clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0"); | ||
269 | clk_register_clkdev(clk[iim_ipg_gate], "iim", NULL); | ||
270 | clk_register_clkdev(clk[gpio_ipg_gate], "gpio", NULL); | ||
271 | clk_register_clkdev(clk[brom_ahb_gate], "brom", NULL); | ||
272 | clk_register_clkdev(clk[ata_ahb_gate], "ata", NULL); | ||
273 | clk_register_clkdev(clk[rtc_ipg_gate], NULL, "imx21-rtc"); | ||
274 | clk_register_clkdev(clk[scc_ipg_gate], "scc", NULL); | ||
275 | clk_register_clkdev(clk[cpu_div], "cpu", NULL); | ||
276 | clk_register_clkdev(clk[emi_ahb_gate], "emi_ahb" , NULL); | ||
277 | clk_register_clkdev(clk[ssi1_baud_gate], "bitrate" , "imx-ssi.0"); | ||
278 | clk_register_clkdev(clk[ssi2_baud_gate], "bitrate" , "imx-ssi.1"); | ||
279 | |||
280 | mxc_timer_init(MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), MX27_INT_GPT1); | ||
281 | |||
282 | clk_prepare_enable(clk[emi_ahb_gate]); | ||
283 | |||
284 | imx_print_silicon_rev("i.MX27", mx27_revision()); | ||
285 | |||
286 | return 0; | ||
287 | } | ||
288 | |||
289 | #ifdef CONFIG_OF | ||
290 | int __init mx27_clocks_init_dt(void) | ||
291 | { | ||
292 | struct device_node *np; | ||
293 | u32 fref = 26000000; /* default */ | ||
294 | |||
295 | for_each_compatible_node(np, NULL, "fixed-clock") { | ||
296 | if (!of_device_is_compatible(np, "fsl,imx-osc26m")) | ||
297 | continue; | ||
298 | |||
299 | if (!of_property_read_u32(np, "clock-frequency", &fref)) | ||
300 | break; | ||
301 | } | ||
302 | |||
303 | return mx27_clocks_init(fref); | ||
304 | } | ||
305 | #endif | ||
diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c deleted file mode 100644 index 8be64e0a4ac..00000000000 --- a/arch/arm/mach-imx/clk-imx31.c +++ /dev/null | |||
@@ -1,199 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Sascha Hauer <kernel@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation. | ||
16 | */ | ||
17 | |||
18 | #include <linux/module.h> | ||
19 | #include <linux/clk.h> | ||
20 | #include <linux/clkdev.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/err.h> | ||
23 | #include <linux/of.h> | ||
24 | |||
25 | #include "clk.h" | ||
26 | #include "common.h" | ||
27 | #include "crmregs-imx3.h" | ||
28 | #include "hardware.h" | ||
29 | #include "mx31.h" | ||
30 | |||
31 | static const char *mcu_main_sel[] = { "spll", "mpll", }; | ||
32 | static const char *per_sel[] = { "per_div", "ipg", }; | ||
33 | static const char *csi_sel[] = { "upll", "spll", }; | ||
34 | static const char *fir_sel[] = { "mcu_main", "upll", "spll" }; | ||
35 | |||
36 | enum mx31_clks { | ||
37 | ckih, ckil, mpll, spll, upll, mcu_main, hsp, ahb, nfc, ipg, per_div, | ||
38 | per, csi, fir, csi_div, usb_div_pre, usb_div_post, fir_div_pre, | ||
39 | fir_div_post, sdhc1_gate, sdhc2_gate, gpt_gate, epit1_gate, epit2_gate, | ||
40 | iim_gate, ata_gate, sdma_gate, cspi3_gate, rng_gate, uart1_gate, | ||
41 | uart2_gate, ssi1_gate, i2c1_gate, i2c2_gate, i2c3_gate, hantro_gate, | ||
42 | mstick1_gate, mstick2_gate, csi_gate, rtc_gate, wdog_gate, pwm_gate, | ||
43 | sim_gate, ect_gate, usb_gate, kpp_gate, ipu_gate, uart3_gate, | ||
44 | uart4_gate, uart5_gate, owire_gate, ssi2_gate, cspi1_gate, cspi2_gate, | ||
45 | gacc_gate, emi_gate, rtic_gate, firi_gate, clk_max | ||
46 | }; | ||
47 | |||
48 | static struct clk *clk[clk_max]; | ||
49 | |||
50 | int __init mx31_clocks_init(unsigned long fref) | ||
51 | { | ||
52 | void __iomem *base = MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR); | ||
53 | int i; | ||
54 | |||
55 | clk[ckih] = imx_clk_fixed("ckih", fref); | ||
56 | clk[ckil] = imx_clk_fixed("ckil", 32768); | ||
57 | clk[mpll] = imx_clk_pllv1("mpll", "ckih", base + MXC_CCM_MPCTL); | ||
58 | clk[spll] = imx_clk_pllv1("spll", "ckih", base + MXC_CCM_SRPCTL); | ||
59 | clk[upll] = imx_clk_pllv1("upll", "ckih", base + MXC_CCM_UPCTL); | ||
60 | clk[mcu_main] = imx_clk_mux("mcu_main", base + MXC_CCM_PMCR0, 31, 1, mcu_main_sel, ARRAY_SIZE(mcu_main_sel)); | ||
61 | clk[hsp] = imx_clk_divider("hsp", "mcu_main", base + MXC_CCM_PDR0, 11, 3); | ||
62 | clk[ahb] = imx_clk_divider("ahb", "mcu_main", base + MXC_CCM_PDR0, 3, 3); | ||
63 | clk[nfc] = imx_clk_divider("nfc", "ahb", base + MXC_CCM_PDR0, 8, 3); | ||
64 | clk[ipg] = imx_clk_divider("ipg", "ahb", base + MXC_CCM_PDR0, 6, 2); | ||
65 | clk[per_div] = imx_clk_divider("per_div", "upll", base + MXC_CCM_PDR0, 16, 5); | ||
66 | clk[per] = imx_clk_mux("per", base + MXC_CCM_CCMR, 24, 1, per_sel, ARRAY_SIZE(per_sel)); | ||
67 | clk[csi] = imx_clk_mux("csi_sel", base + MXC_CCM_CCMR, 25, 1, csi_sel, ARRAY_SIZE(csi_sel)); | ||
68 | clk[fir] = imx_clk_mux("fir_sel", base + MXC_CCM_CCMR, 11, 2, fir_sel, ARRAY_SIZE(fir_sel)); | ||
69 | clk[csi_div] = imx_clk_divider("csi_div", "csi_sel", base + MXC_CCM_PDR0, 23, 9); | ||
70 | clk[usb_div_pre] = imx_clk_divider("usb_div_pre", "upll", base + MXC_CCM_PDR1, 30, 2); | ||
71 | clk[usb_div_post] = imx_clk_divider("usb_div_post", "usb_div_pre", base + MXC_CCM_PDR1, 27, 3); | ||
72 | clk[fir_div_pre] = imx_clk_divider("fir_div_pre", "fir_sel", base + MXC_CCM_PDR1, 24, 3); | ||
73 | clk[fir_div_post] = imx_clk_divider("fir_div_post", "fir_div_pre", base + MXC_CCM_PDR1, 23, 6); | ||
74 | clk[sdhc1_gate] = imx_clk_gate2("sdhc1_gate", "per", base + MXC_CCM_CGR0, 0); | ||
75 | clk[sdhc2_gate] = imx_clk_gate2("sdhc2_gate", "per", base + MXC_CCM_CGR0, 2); | ||
76 | clk[gpt_gate] = imx_clk_gate2("gpt_gate", "per", base + MXC_CCM_CGR0, 4); | ||
77 | clk[epit1_gate] = imx_clk_gate2("epit1_gate", "per", base + MXC_CCM_CGR0, 6); | ||
78 | clk[epit2_gate] = imx_clk_gate2("epit2_gate", "per", base + MXC_CCM_CGR0, 8); | ||
79 | clk[iim_gate] = imx_clk_gate2("iim_gate", "ipg", base + MXC_CCM_CGR0, 10); | ||
80 | clk[ata_gate] = imx_clk_gate2("ata_gate", "ipg", base + MXC_CCM_CGR0, 12); | ||
81 | clk[sdma_gate] = imx_clk_gate2("sdma_gate", "ahb", base + MXC_CCM_CGR0, 14); | ||
82 | clk[cspi3_gate] = imx_clk_gate2("cspi3_gate", "ipg", base + MXC_CCM_CGR0, 16); | ||
83 | clk[rng_gate] = imx_clk_gate2("rng_gate", "ipg", base + MXC_CCM_CGR0, 18); | ||
84 | clk[uart1_gate] = imx_clk_gate2("uart1_gate", "per", base + MXC_CCM_CGR0, 20); | ||
85 | clk[uart2_gate] = imx_clk_gate2("uart2_gate", "per", base + MXC_CCM_CGR0, 22); | ||
86 | clk[ssi1_gate] = imx_clk_gate2("ssi1_gate", "spll", base + MXC_CCM_CGR0, 24); | ||
87 | clk[i2c1_gate] = imx_clk_gate2("i2c1_gate", "per", base + MXC_CCM_CGR0, 26); | ||
88 | clk[i2c2_gate] = imx_clk_gate2("i2c2_gate", "per", base + MXC_CCM_CGR0, 28); | ||
89 | clk[i2c3_gate] = imx_clk_gate2("i2c3_gate", "per", base + MXC_CCM_CGR0, 30); | ||
90 | clk[hantro_gate] = imx_clk_gate2("hantro_gate", "per", base + MXC_CCM_CGR1, 0); | ||
91 | clk[mstick1_gate] = imx_clk_gate2("mstick1_gate", "per", base + MXC_CCM_CGR1, 2); | ||
92 | clk[mstick2_gate] = imx_clk_gate2("mstick2_gate", "per", base + MXC_CCM_CGR1, 4); | ||
93 | clk[csi_gate] = imx_clk_gate2("csi_gate", "csi_div", base + MXC_CCM_CGR1, 6); | ||
94 | clk[rtc_gate] = imx_clk_gate2("rtc_gate", "ipg", base + MXC_CCM_CGR1, 8); | ||
95 | clk[wdog_gate] = imx_clk_gate2("wdog_gate", "ipg", base + MXC_CCM_CGR1, 10); | ||
96 | clk[pwm_gate] = imx_clk_gate2("pwm_gate", "per", base + MXC_CCM_CGR1, 12); | ||
97 | clk[sim_gate] = imx_clk_gate2("sim_gate", "per", base + MXC_CCM_CGR1, 14); | ||
98 | clk[ect_gate] = imx_clk_gate2("ect_gate", "per", base + MXC_CCM_CGR1, 16); | ||
99 | clk[usb_gate] = imx_clk_gate2("usb_gate", "ahb", base + MXC_CCM_CGR1, 18); | ||
100 | clk[kpp_gate] = imx_clk_gate2("kpp_gate", "ipg", base + MXC_CCM_CGR1, 20); | ||
101 | clk[ipu_gate] = imx_clk_gate2("ipu_gate", "hsp", base + MXC_CCM_CGR1, 22); | ||
102 | clk[uart3_gate] = imx_clk_gate2("uart3_gate", "per", base + MXC_CCM_CGR1, 24); | ||
103 | clk[uart4_gate] = imx_clk_gate2("uart4_gate", "per", base + MXC_CCM_CGR1, 26); | ||
104 | clk[uart5_gate] = imx_clk_gate2("uart5_gate", "per", base + MXC_CCM_CGR1, 28); | ||
105 | clk[owire_gate] = imx_clk_gate2("owire_gate", "per", base + MXC_CCM_CGR1, 30); | ||
106 | clk[ssi2_gate] = imx_clk_gate2("ssi2_gate", "spll", base + MXC_CCM_CGR2, 0); | ||
107 | clk[cspi1_gate] = imx_clk_gate2("cspi1_gate", "ipg", base + MXC_CCM_CGR2, 2); | ||
108 | clk[cspi2_gate] = imx_clk_gate2("cspi2_gate", "ipg", base + MXC_CCM_CGR2, 4); | ||
109 | clk[gacc_gate] = imx_clk_gate2("gacc_gate", "per", base + MXC_CCM_CGR2, 6); | ||
110 | clk[emi_gate] = imx_clk_gate2("emi_gate", "ahb", base + MXC_CCM_CGR2, 8); | ||
111 | clk[rtic_gate] = imx_clk_gate2("rtic_gate", "ahb", base + MXC_CCM_CGR2, 10); | ||
112 | clk[firi_gate] = imx_clk_gate2("firi_gate", "upll", base+MXC_CCM_CGR2, 12); | ||
113 | |||
114 | for (i = 0; i < ARRAY_SIZE(clk); i++) | ||
115 | if (IS_ERR(clk[i])) | ||
116 | pr_err("imx31 clk %d: register failed with %ld\n", | ||
117 | i, PTR_ERR(clk[i])); | ||
118 | |||
119 | clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0"); | ||
120 | clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0"); | ||
121 | clk_register_clkdev(clk[cspi1_gate], NULL, "imx31-cspi.0"); | ||
122 | clk_register_clkdev(clk[cspi2_gate], NULL, "imx31-cspi.1"); | ||
123 | clk_register_clkdev(clk[cspi3_gate], NULL, "imx31-cspi.2"); | ||
124 | clk_register_clkdev(clk[pwm_gate], "pwm", NULL); | ||
125 | clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); | ||
126 | clk_register_clkdev(clk[rtc_gate], NULL, "imx21-rtc"); | ||
127 | clk_register_clkdev(clk[epit1_gate], "epit", NULL); | ||
128 | clk_register_clkdev(clk[epit2_gate], "epit", NULL); | ||
129 | clk_register_clkdev(clk[nfc], NULL, "imx27-nand.0"); | ||
130 | clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core"); | ||
131 | clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb"); | ||
132 | clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad"); | ||
133 | clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.0"); | ||
134 | clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.0"); | ||
135 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0"); | ||
136 | clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.1"); | ||
137 | clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.1"); | ||
138 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.1"); | ||
139 | clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.2"); | ||
140 | clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.2"); | ||
141 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); | ||
142 | clk_register_clkdev(clk[usb_div_post], "per", "fsl-usb2-udc"); | ||
143 | clk_register_clkdev(clk[usb_gate], "ahb", "fsl-usb2-udc"); | ||
144 | clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); | ||
145 | clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); | ||
146 | /* i.mx31 has the i.mx21 type uart */ | ||
147 | clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0"); | ||
148 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.0"); | ||
149 | clk_register_clkdev(clk[uart2_gate], "per", "imx21-uart.1"); | ||
150 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.1"); | ||
151 | clk_register_clkdev(clk[uart3_gate], "per", "imx21-uart.2"); | ||
152 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.2"); | ||
153 | clk_register_clkdev(clk[uart4_gate], "per", "imx21-uart.3"); | ||
154 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.3"); | ||
155 | clk_register_clkdev(clk[uart5_gate], "per", "imx21-uart.4"); | ||
156 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.4"); | ||
157 | clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0"); | ||
158 | clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1"); | ||
159 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); | ||
160 | clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0"); | ||
161 | clk_register_clkdev(clk[sdhc1_gate], NULL, "imx31-mmc.0"); | ||
162 | clk_register_clkdev(clk[sdhc2_gate], NULL, "imx31-mmc.1"); | ||
163 | clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0"); | ||
164 | clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1"); | ||
165 | clk_register_clkdev(clk[firi_gate], "firi", NULL); | ||
166 | clk_register_clkdev(clk[ata_gate], NULL, "pata_imx"); | ||
167 | clk_register_clkdev(clk[rtic_gate], "rtic", NULL); | ||
168 | clk_register_clkdev(clk[rng_gate], NULL, "mxc_rnga"); | ||
169 | clk_register_clkdev(clk[sdma_gate], NULL, "imx31-sdma"); | ||
170 | clk_register_clkdev(clk[iim_gate], "iim", NULL); | ||
171 | |||
172 | clk_set_parent(clk[csi], clk[upll]); | ||
173 | clk_prepare_enable(clk[emi_gate]); | ||
174 | clk_prepare_enable(clk[iim_gate]); | ||
175 | mx31_revision(); | ||
176 | clk_disable_unprepare(clk[iim_gate]); | ||
177 | |||
178 | mxc_timer_init(MX31_IO_ADDRESS(MX31_GPT1_BASE_ADDR), MX31_INT_GPT); | ||
179 | |||
180 | return 0; | ||
181 | } | ||
182 | |||
183 | #ifdef CONFIG_OF | ||
184 | int __init mx31_clocks_init_dt(void) | ||
185 | { | ||
186 | struct device_node *np; | ||
187 | u32 fref = 26000000; /* default */ | ||
188 | |||
189 | for_each_compatible_node(np, NULL, "fixed-clock") { | ||
190 | if (!of_device_is_compatible(np, "fsl,imx-osc26m")) | ||
191 | continue; | ||
192 | |||
193 | if (!of_property_read_u32(np, "clock-frequency", &fref)) | ||
194 | break; | ||
195 | } | ||
196 | |||
197 | return mx31_clocks_init(fref); | ||
198 | } | ||
199 | #endif | ||
diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c deleted file mode 100644 index 66f3d65ea27..00000000000 --- a/arch/arm/mach-imx/clk-imx35.c +++ /dev/null | |||
@@ -1,285 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | */ | ||
9 | #include <linux/mm.h> | ||
10 | #include <linux/delay.h> | ||
11 | #include <linux/clk.h> | ||
12 | #include <linux/io.h> | ||
13 | #include <linux/clkdev.h> | ||
14 | #include <linux/of.h> | ||
15 | #include <linux/err.h> | ||
16 | |||
17 | #include "crmregs-imx3.h" | ||
18 | #include "clk.h" | ||
19 | #include "common.h" | ||
20 | #include "hardware.h" | ||
21 | |||
22 | struct arm_ahb_div { | ||
23 | unsigned char arm, ahb, sel; | ||
24 | }; | ||
25 | |||
26 | static struct arm_ahb_div clk_consumer[] = { | ||
27 | { .arm = 1, .ahb = 4, .sel = 0}, | ||
28 | { .arm = 1, .ahb = 3, .sel = 1}, | ||
29 | { .arm = 2, .ahb = 2, .sel = 0}, | ||
30 | { .arm = 0, .ahb = 0, .sel = 0}, | ||
31 | { .arm = 0, .ahb = 0, .sel = 0}, | ||
32 | { .arm = 0, .ahb = 0, .sel = 0}, | ||
33 | { .arm = 4, .ahb = 1, .sel = 0}, | ||
34 | { .arm = 1, .ahb = 5, .sel = 0}, | ||
35 | { .arm = 1, .ahb = 8, .sel = 0}, | ||
36 | { .arm = 1, .ahb = 6, .sel = 1}, | ||
37 | { .arm = 2, .ahb = 4, .sel = 0}, | ||
38 | { .arm = 0, .ahb = 0, .sel = 0}, | ||
39 | { .arm = 0, .ahb = 0, .sel = 0}, | ||
40 | { .arm = 0, .ahb = 0, .sel = 0}, | ||
41 | { .arm = 4, .ahb = 2, .sel = 0}, | ||
42 | { .arm = 0, .ahb = 0, .sel = 0}, | ||
43 | }; | ||
44 | |||
45 | static char hsp_div_532[] = { 4, 8, 3, 0 }; | ||
46 | static char hsp_div_400[] = { 3, 6, 3, 0 }; | ||
47 | |||
48 | static const char *std_sel[] = {"ppll", "arm"}; | ||
49 | static const char *ipg_per_sel[] = {"ahb_per_div", "arm_per_div"}; | ||
50 | |||
51 | enum mx35_clks { | ||
52 | ckih, mpll, ppll, mpll_075, arm, hsp, hsp_div, hsp_sel, ahb, ipg, | ||
53 | arm_per_div, ahb_per_div, ipg_per, uart_sel, uart_div, esdhc_sel, | ||
54 | esdhc1_div, esdhc2_div, esdhc3_div, spdif_sel, spdif_div_pre, | ||
55 | spdif_div_post, ssi_sel, ssi1_div_pre, ssi1_div_post, ssi2_div_pre, | ||
56 | ssi2_div_post, usb_sel, usb_div, nfc_div, asrc_gate, pata_gate, | ||
57 | audmux_gate, can1_gate, can2_gate, cspi1_gate, cspi2_gate, ect_gate, | ||
58 | edio_gate, emi_gate, epit1_gate, epit2_gate, esai_gate, esdhc1_gate, | ||
59 | esdhc2_gate, esdhc3_gate, fec_gate, gpio1_gate, gpio2_gate, gpio3_gate, | ||
60 | gpt_gate, i2c1_gate, i2c2_gate, i2c3_gate, iomuxc_gate, ipu_gate, | ||
61 | kpp_gate, mlb_gate, mshc_gate, owire_gate, pwm_gate, rngc_gate, | ||
62 | rtc_gate, rtic_gate, scc_gate, sdma_gate, spba_gate, spdif_gate, | ||
63 | ssi1_gate, ssi2_gate, uart1_gate, uart2_gate, uart3_gate, usbotg_gate, | ||
64 | wdog_gate, max_gate, admux_gate, csi_gate, csi_div, csi_sel, iim_gate, | ||
65 | gpu2d_gate, clk_max | ||
66 | }; | ||
67 | |||
68 | static struct clk *clk[clk_max]; | ||
69 | |||
70 | int __init mx35_clocks_init() | ||
71 | { | ||
72 | void __iomem *base = MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR); | ||
73 | u32 pdr0, consumer_sel, hsp_sel; | ||
74 | struct arm_ahb_div *aad; | ||
75 | unsigned char *hsp_div; | ||
76 | int i; | ||
77 | |||
78 | pdr0 = __raw_readl(base + MXC_CCM_PDR0); | ||
79 | consumer_sel = (pdr0 >> 16) & 0xf; | ||
80 | aad = &clk_consumer[consumer_sel]; | ||
81 | if (!aad->arm) { | ||
82 | pr_err("i.MX35 clk: illegal consumer mux selection 0x%x\n", consumer_sel); | ||
83 | /* | ||
84 | * We are basically stuck. Continue with a default entry and hope we | ||
85 | * get far enough to actually show the above message | ||
86 | */ | ||
87 | aad = &clk_consumer[0]; | ||
88 | } | ||
89 | |||
90 | clk[ckih] = imx_clk_fixed("ckih", 24000000); | ||
91 | clk[mpll] = imx_clk_pllv1("mpll", "ckih", base + MX35_CCM_MPCTL); | ||
92 | clk[ppll] = imx_clk_pllv1("ppll", "ckih", base + MX35_CCM_PPCTL); | ||
93 | |||
94 | clk[mpll] = imx_clk_fixed_factor("mpll_075", "mpll", 3, 4); | ||
95 | |||
96 | if (aad->sel) | ||
97 | clk[arm] = imx_clk_fixed_factor("arm", "mpll_075", 1, aad->arm); | ||
98 | else | ||
99 | clk[arm] = imx_clk_fixed_factor("arm", "mpll", 1, aad->arm); | ||
100 | |||
101 | if (clk_get_rate(clk[arm]) > 400000000) | ||
102 | hsp_div = hsp_div_532; | ||
103 | else | ||
104 | hsp_div = hsp_div_400; | ||
105 | |||
106 | hsp_sel = (pdr0 >> 20) & 0x3; | ||
107 | if (!hsp_div[hsp_sel]) { | ||
108 | pr_err("i.MX35 clk: illegal hsp clk selection 0x%x\n", hsp_sel); | ||
109 | hsp_sel = 0; | ||
110 | } | ||
111 | |||
112 | clk[hsp] = imx_clk_fixed_factor("hsp", "arm", 1, hsp_div[hsp_sel]); | ||
113 | |||
114 | clk[ahb] = imx_clk_fixed_factor("ahb", "arm", 1, aad->ahb); | ||
115 | clk[ipg] = imx_clk_fixed_factor("ipg", "ahb", 1, 2); | ||
116 | |||
117 | clk[arm_per_div] = imx_clk_divider("arm_per_div", "arm", base + MX35_CCM_PDR4, 16, 6); | ||
118 | clk[ahb_per_div] = imx_clk_divider("ahb_per_div", "ahb", base + MXC_CCM_PDR0, 12, 3); | ||
119 | clk[ipg_per] = imx_clk_mux("ipg_per", base + MXC_CCM_PDR0, 26, 1, ipg_per_sel, ARRAY_SIZE(ipg_per_sel)); | ||
120 | |||
121 | clk[uart_sel] = imx_clk_mux("uart_sel", base + MX35_CCM_PDR3, 14, 1, std_sel, ARRAY_SIZE(std_sel)); | ||
122 | clk[uart_div] = imx_clk_divider("uart_div", "uart_sel", base + MX35_CCM_PDR4, 10, 6); | ||
123 | |||
124 | clk[esdhc_sel] = imx_clk_mux("esdhc_sel", base + MX35_CCM_PDR4, 9, 1, std_sel, ARRAY_SIZE(std_sel)); | ||
125 | clk[esdhc1_div] = imx_clk_divider("esdhc1_div", "esdhc_sel", base + MX35_CCM_PDR3, 0, 6); | ||
126 | clk[esdhc2_div] = imx_clk_divider("esdhc2_div", "esdhc_sel", base + MX35_CCM_PDR3, 8, 6); | ||
127 | clk[esdhc3_div] = imx_clk_divider("esdhc3_div", "esdhc_sel", base + MX35_CCM_PDR3, 16, 6); | ||
128 | |||
129 | clk[spdif_sel] = imx_clk_mux("spdif_sel", base + MX35_CCM_PDR3, 22, 1, std_sel, ARRAY_SIZE(std_sel)); | ||
130 | clk[spdif_div_pre] = imx_clk_divider("spdif_div_pre", "spdif_sel", base + MX35_CCM_PDR3, 29, 3); /* divide by 1 not allowed */ | ||
131 | clk[spdif_div_post] = imx_clk_divider("spdif_div_post", "spdif_div_pre", base + MX35_CCM_PDR3, 23, 6); | ||
132 | |||
133 | clk[ssi_sel] = imx_clk_mux("ssi_sel", base + MX35_CCM_PDR2, 6, 1, std_sel, ARRAY_SIZE(std_sel)); | ||
134 | clk[ssi1_div_pre] = imx_clk_divider("ssi1_div_pre", "ssi_sel", base + MX35_CCM_PDR2, 24, 3); | ||
135 | clk[ssi1_div_post] = imx_clk_divider("ssi1_div_post", "ssi1_div_pre", base + MX35_CCM_PDR2, 0, 6); | ||
136 | clk[ssi2_div_pre] = imx_clk_divider("ssi2_div_pre", "ssi_sel", base + MX35_CCM_PDR2, 27, 3); | ||
137 | clk[ssi2_div_post] = imx_clk_divider("ssi2_div_post", "ssi2_div_pre", base + MX35_CCM_PDR2, 8, 6); | ||
138 | |||
139 | clk[usb_sel] = imx_clk_mux("usb_sel", base + MX35_CCM_PDR4, 9, 1, std_sel, ARRAY_SIZE(std_sel)); | ||
140 | clk[usb_div] = imx_clk_divider("usb_div", "usb_sel", base + MX35_CCM_PDR4, 22, 6); | ||
141 | |||
142 | clk[nfc_div] = imx_clk_divider("nfc_div", "ahb", base + MX35_CCM_PDR4, 28, 4); | ||
143 | |||
144 | clk[csi_sel] = imx_clk_mux("csi_sel", base + MX35_CCM_PDR2, 7, 1, std_sel, ARRAY_SIZE(std_sel)); | ||
145 | clk[csi_div] = imx_clk_divider("csi_div", "csi_sel", base + MX35_CCM_PDR2, 16, 6); | ||
146 | |||
147 | clk[asrc_gate] = imx_clk_gate2("asrc_gate", "ipg", base + MX35_CCM_CGR0, 0); | ||
148 | clk[pata_gate] = imx_clk_gate2("pata_gate", "ipg", base + MX35_CCM_CGR0, 2); | ||
149 | clk[audmux_gate] = imx_clk_gate2("audmux_gate", "ipg", base + MX35_CCM_CGR0, 4); | ||
150 | clk[can1_gate] = imx_clk_gate2("can1_gate", "ipg", base + MX35_CCM_CGR0, 6); | ||
151 | clk[can2_gate] = imx_clk_gate2("can2_gate", "ipg", base + MX35_CCM_CGR0, 8); | ||
152 | clk[cspi1_gate] = imx_clk_gate2("cspi1_gate", "ipg", base + MX35_CCM_CGR0, 10); | ||
153 | clk[cspi2_gate] = imx_clk_gate2("cspi2_gate", "ipg", base + MX35_CCM_CGR0, 12); | ||
154 | clk[ect_gate] = imx_clk_gate2("ect_gate", "ipg", base + MX35_CCM_CGR0, 14); | ||
155 | clk[edio_gate] = imx_clk_gate2("edio_gate", "ipg", base + MX35_CCM_CGR0, 16); | ||
156 | clk[emi_gate] = imx_clk_gate2("emi_gate", "ipg", base + MX35_CCM_CGR0, 18); | ||
157 | clk[epit1_gate] = imx_clk_gate2("epit1_gate", "ipg", base + MX35_CCM_CGR0, 20); | ||
158 | clk[epit2_gate] = imx_clk_gate2("epit2_gate", "ipg", base + MX35_CCM_CGR0, 22); | ||
159 | clk[esai_gate] = imx_clk_gate2("esai_gate", "ipg", base + MX35_CCM_CGR0, 24); | ||
160 | clk[esdhc1_gate] = imx_clk_gate2("esdhc1_gate", "esdhc1_div", base + MX35_CCM_CGR0, 26); | ||
161 | clk[esdhc2_gate] = imx_clk_gate2("esdhc2_gate", "esdhc2_div", base + MX35_CCM_CGR0, 28); | ||
162 | clk[esdhc3_gate] = imx_clk_gate2("esdhc3_gate", "esdhc3_div", base + MX35_CCM_CGR0, 30); | ||
163 | |||
164 | clk[fec_gate] = imx_clk_gate2("fec_gate", "ipg", base + MX35_CCM_CGR1, 0); | ||
165 | clk[gpio1_gate] = imx_clk_gate2("gpio1_gate", "ipg", base + MX35_CCM_CGR1, 2); | ||
166 | clk[gpio2_gate] = imx_clk_gate2("gpio2_gate", "ipg", base + MX35_CCM_CGR1, 4); | ||
167 | clk[gpio3_gate] = imx_clk_gate2("gpio3_gate", "ipg", base + MX35_CCM_CGR1, 6); | ||
168 | clk[gpt_gate] = imx_clk_gate2("gpt_gate", "ipg", base + MX35_CCM_CGR1, 8); | ||
169 | clk[i2c1_gate] = imx_clk_gate2("i2c1_gate", "ipg_per", base + MX35_CCM_CGR1, 10); | ||
170 | clk[i2c2_gate] = imx_clk_gate2("i2c2_gate", "ipg_per", base + MX35_CCM_CGR1, 12); | ||
171 | clk[i2c3_gate] = imx_clk_gate2("i2c3_gate", "ipg_per", base + MX35_CCM_CGR1, 14); | ||
172 | clk[iomuxc_gate] = imx_clk_gate2("iomuxc_gate", "ipg", base + MX35_CCM_CGR1, 16); | ||
173 | clk[ipu_gate] = imx_clk_gate2("ipu_gate", "hsp", base + MX35_CCM_CGR1, 18); | ||
174 | clk[kpp_gate] = imx_clk_gate2("kpp_gate", "ipg", base + MX35_CCM_CGR1, 20); | ||
175 | clk[mlb_gate] = imx_clk_gate2("mlb_gate", "ahb", base + MX35_CCM_CGR1, 22); | ||
176 | clk[mshc_gate] = imx_clk_gate2("mshc_gate", "dummy", base + MX35_CCM_CGR1, 24); | ||
177 | clk[owire_gate] = imx_clk_gate2("owire_gate", "ipg_per", base + MX35_CCM_CGR1, 26); | ||
178 | clk[pwm_gate] = imx_clk_gate2("pwm_gate", "ipg_per", base + MX35_CCM_CGR1, 28); | ||
179 | clk[rngc_gate] = imx_clk_gate2("rngc_gate", "ipg", base + MX35_CCM_CGR1, 30); | ||
180 | |||
181 | clk[rtc_gate] = imx_clk_gate2("rtc_gate", "ipg", base + MX35_CCM_CGR2, 0); | ||
182 | clk[rtic_gate] = imx_clk_gate2("rtic_gate", "ahb", base + MX35_CCM_CGR2, 2); | ||
183 | clk[scc_gate] = imx_clk_gate2("scc_gate", "ipg", base + MX35_CCM_CGR2, 4); | ||
184 | clk[sdma_gate] = imx_clk_gate2("sdma_gate", "ahb", base + MX35_CCM_CGR2, 6); | ||
185 | clk[spba_gate] = imx_clk_gate2("spba_gate", "ipg", base + MX35_CCM_CGR2, 8); | ||
186 | clk[spdif_gate] = imx_clk_gate2("spdif_gate", "spdif_div_post", base + MX35_CCM_CGR2, 10); | ||
187 | clk[ssi1_gate] = imx_clk_gate2("ssi1_gate", "ssi1_div_post", base + MX35_CCM_CGR2, 12); | ||
188 | clk[ssi2_gate] = imx_clk_gate2("ssi2_gate", "ssi2_div_post", base + MX35_CCM_CGR2, 14); | ||
189 | clk[uart1_gate] = imx_clk_gate2("uart1_gate", "uart_div", base + MX35_CCM_CGR2, 16); | ||
190 | clk[uart2_gate] = imx_clk_gate2("uart2_gate", "uart_div", base + MX35_CCM_CGR2, 18); | ||
191 | clk[uart3_gate] = imx_clk_gate2("uart3_gate", "uart_div", base + MX35_CCM_CGR2, 20); | ||
192 | clk[usbotg_gate] = imx_clk_gate2("usbotg_gate", "ahb", base + MX35_CCM_CGR2, 22); | ||
193 | clk[wdog_gate] = imx_clk_gate2("wdog_gate", "ipg", base + MX35_CCM_CGR2, 24); | ||
194 | clk[max_gate] = imx_clk_gate2("max_gate", "dummy", base + MX35_CCM_CGR2, 26); | ||
195 | clk[admux_gate] = imx_clk_gate2("admux_gate", "ipg", base + MX35_CCM_CGR2, 30); | ||
196 | |||
197 | clk[csi_gate] = imx_clk_gate2("csi_gate", "csi_div", base + MX35_CCM_CGR3, 0); | ||
198 | clk[iim_gate] = imx_clk_gate2("iim_gate", "ipg", base + MX35_CCM_CGR3, 2); | ||
199 | clk[gpu2d_gate] = imx_clk_gate2("gpu2d_gate", "ahb", base + MX35_CCM_CGR3, 4); | ||
200 | |||
201 | for (i = 0; i < ARRAY_SIZE(clk); i++) | ||
202 | if (IS_ERR(clk[i])) | ||
203 | pr_err("i.MX35 clk %d: register failed with %ld\n", | ||
204 | i, PTR_ERR(clk[i])); | ||
205 | |||
206 | clk_register_clkdev(clk[pata_gate], NULL, "pata_imx"); | ||
207 | clk_register_clkdev(clk[can1_gate], NULL, "flexcan.0"); | ||
208 | clk_register_clkdev(clk[can2_gate], NULL, "flexcan.1"); | ||
209 | clk_register_clkdev(clk[cspi1_gate], "per", "imx35-cspi.0"); | ||
210 | clk_register_clkdev(clk[cspi1_gate], "ipg", "imx35-cspi.0"); | ||
211 | clk_register_clkdev(clk[cspi2_gate], "per", "imx35-cspi.1"); | ||
212 | clk_register_clkdev(clk[cspi2_gate], "ipg", "imx35-cspi.1"); | ||
213 | clk_register_clkdev(clk[epit1_gate], NULL, "imx-epit.0"); | ||
214 | clk_register_clkdev(clk[epit2_gate], NULL, "imx-epit.1"); | ||
215 | clk_register_clkdev(clk[esdhc1_gate], "per", "sdhci-esdhc-imx35.0"); | ||
216 | clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.0"); | ||
217 | clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.0"); | ||
218 | clk_register_clkdev(clk[esdhc2_gate], "per", "sdhci-esdhc-imx35.1"); | ||
219 | clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.1"); | ||
220 | clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.1"); | ||
221 | clk_register_clkdev(clk[esdhc3_gate], "per", "sdhci-esdhc-imx35.2"); | ||
222 | clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.2"); | ||
223 | clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.2"); | ||
224 | /* i.mx35 has the i.mx27 type fec */ | ||
225 | clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); | ||
226 | clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0"); | ||
227 | clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0"); | ||
228 | clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0"); | ||
229 | clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1"); | ||
230 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); | ||
231 | clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core"); | ||
232 | clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb"); | ||
233 | clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad"); | ||
234 | clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1"); | ||
235 | clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma"); | ||
236 | clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0"); | ||
237 | clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1"); | ||
238 | /* i.mx35 has the i.mx21 type uart */ | ||
239 | clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0"); | ||
240 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.0"); | ||
241 | clk_register_clkdev(clk[uart2_gate], "per", "imx21-uart.1"); | ||
242 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.1"); | ||
243 | clk_register_clkdev(clk[uart3_gate], "per", "imx21-uart.2"); | ||
244 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.2"); | ||
245 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0"); | ||
246 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0"); | ||
247 | clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.0"); | ||
248 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.1"); | ||
249 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.1"); | ||
250 | clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.1"); | ||
251 | clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); | ||
252 | clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); | ||
253 | clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.2"); | ||
254 | clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); | ||
255 | clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); | ||
256 | clk_register_clkdev(clk[usbotg_gate], "ahb", "fsl-usb2-udc"); | ||
257 | clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); | ||
258 | clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0"); | ||
259 | clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); | ||
260 | |||
261 | clk_prepare_enable(clk[spba_gate]); | ||
262 | clk_prepare_enable(clk[gpio1_gate]); | ||
263 | clk_prepare_enable(clk[gpio2_gate]); | ||
264 | clk_prepare_enable(clk[gpio3_gate]); | ||
265 | clk_prepare_enable(clk[iim_gate]); | ||
266 | clk_prepare_enable(clk[emi_gate]); | ||
267 | |||
268 | /* | ||
269 | * SCC is needed to boot via mmc after a watchdog reset. The clock code | ||
270 | * before conversion to common clk also enabled UART1 (which isn't | ||
271 | * handled here and not needed for mmc) and IIM (which is enabled | ||
272 | * unconditionally above). | ||
273 | */ | ||
274 | clk_prepare_enable(clk[scc_gate]); | ||
275 | |||
276 | imx_print_silicon_rev("i.MX35", mx35_revision()); | ||
277 | |||
278 | #ifdef CONFIG_MXC_USE_EPIT | ||
279 | epit_timer_init(MX35_IO_ADDRESS(MX35_EPIT1_BASE_ADDR), MX35_INT_EPIT1); | ||
280 | #else | ||
281 | mxc_timer_init(MX35_IO_ADDRESS(MX35_GPT1_BASE_ADDR), MX35_INT_GPT); | ||
282 | #endif | ||
283 | |||
284 | return 0; | ||
285 | } | ||
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c deleted file mode 100644 index 579023f59dc..00000000000 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ /dev/null | |||
@@ -1,545 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | */ | ||
9 | #include <linux/mm.h> | ||
10 | #include <linux/delay.h> | ||
11 | #include <linux/clk.h> | ||
12 | #include <linux/io.h> | ||
13 | #include <linux/clkdev.h> | ||
14 | #include <linux/of.h> | ||
15 | #include <linux/err.h> | ||
16 | |||
17 | #include "crm-regs-imx5.h" | ||
18 | #include "clk.h" | ||
19 | #include "common.h" | ||
20 | #include "hardware.h" | ||
21 | |||
22 | /* Low-power Audio Playback Mode clock */ | ||
23 | static const char *lp_apm_sel[] = { "osc", }; | ||
24 | |||
25 | /* This is used multiple times */ | ||
26 | static const char *standard_pll_sel[] = { "pll1_sw", "pll2_sw", "pll3_sw", "lp_apm", }; | ||
27 | static const char *periph_apm_sel[] = { "pll1_sw", "pll3_sw", "lp_apm", }; | ||
28 | static const char *main_bus_sel[] = { "pll2_sw", "periph_apm", }; | ||
29 | static const char *per_lp_apm_sel[] = { "main_bus", "lp_apm", }; | ||
30 | static const char *per_root_sel[] = { "per_podf", "ipg", }; | ||
31 | static const char *esdhc_c_sel[] = { "esdhc_a_podf", "esdhc_b_podf", }; | ||
32 | static const char *esdhc_d_sel[] = { "esdhc_a_podf", "esdhc_b_podf", }; | ||
33 | static const char *ssi_apm_sels[] = { "ckih1", "lp_amp", "ckih2", }; | ||
34 | static const char *ssi_clk_sels[] = { "pll1_sw", "pll2_sw", "pll3_sw", "ssi_apm", }; | ||
35 | static const char *ssi3_clk_sels[] = { "ssi1_root_gate", "ssi2_root_gate", }; | ||
36 | static const char *ssi_ext1_com_sels[] = { "ssi_ext1_podf", "ssi1_root_gate", }; | ||
37 | static const char *ssi_ext2_com_sels[] = { "ssi_ext2_podf", "ssi2_root_gate", }; | ||
38 | static const char *emi_slow_sel[] = { "main_bus", "ahb", }; | ||
39 | static const char *usb_phy_sel_str[] = { "osc", "usb_phy_podf", }; | ||
40 | static const char *mx51_ipu_di0_sel[] = { "di_pred", "osc", "ckih1", "tve_di", }; | ||
41 | static const char *mx53_ipu_di0_sel[] = { "di_pred", "osc", "ckih1", "di_pll4_podf", "dummy", "ldb_di0_gate", }; | ||
42 | static const char *mx53_ldb_di0_sel[] = { "pll3_sw", "pll4_sw", }; | ||
43 | static const char *mx51_ipu_di1_sel[] = { "di_pred", "osc", "ckih1", "tve_di", "ipp_di1", }; | ||
44 | static const char *mx53_ipu_di1_sel[] = { "di_pred", "osc", "ckih1", "tve_di", "ipp_di1", "ldb_di1_gate", }; | ||
45 | static const char *mx53_ldb_di1_sel[] = { "pll3_sw", "pll4_sw", }; | ||
46 | static const char *mx51_tve_ext_sel[] = { "osc", "ckih1", }; | ||
47 | static const char *mx53_tve_ext_sel[] = { "pll4_sw", "ckih1", }; | ||
48 | static const char *tve_sel[] = { "tve_pred", "tve_ext_sel", }; | ||
49 | static const char *ipu_sel[] = { "axi_a", "axi_b", "emi_slow_gate", "ahb", }; | ||
50 | static const char *vpu_sel[] = { "axi_a", "axi_b", "emi_slow_gate", "ahb", }; | ||
51 | static const char *mx53_can_sel[] = { "ipg", "ckih1", "ckih2", "lp_apm", }; | ||
52 | |||
53 | enum imx5_clks { | ||
54 | dummy, ckil, osc, ckih1, ckih2, ahb, ipg, axi_a, axi_b, uart_pred, | ||
55 | uart_root, esdhc_a_pred, esdhc_b_pred, esdhc_c_s, esdhc_d_s, | ||
56 | emi_sel, emi_slow_podf, nfc_podf, ecspi_pred, ecspi_podf, usboh3_pred, | ||
57 | usboh3_podf, usb_phy_pred, usb_phy_podf, cpu_podf, di_pred, tve_di, | ||
58 | tve_s, uart1_ipg_gate, uart1_per_gate, uart2_ipg_gate, | ||
59 | uart2_per_gate, uart3_ipg_gate, uart3_per_gate, i2c1_gate, i2c2_gate, | ||
60 | gpt_ipg_gate, pwm1_ipg_gate, pwm1_hf_gate, pwm2_ipg_gate, pwm2_hf_gate, | ||
61 | gpt_hf_gate, fec_gate, usboh3_per_gate, esdhc1_ipg_gate, esdhc2_ipg_gate, | ||
62 | esdhc3_ipg_gate, esdhc4_ipg_gate, ssi1_ipg_gate, ssi2_ipg_gate, | ||
63 | ssi3_ipg_gate, ecspi1_ipg_gate, ecspi1_per_gate, ecspi2_ipg_gate, | ||
64 | ecspi2_per_gate, cspi_ipg_gate, sdma_gate, emi_slow_gate, ipu_s, | ||
65 | ipu_gate, nfc_gate, ipu_di1_gate, vpu_s, vpu_gate, | ||
66 | vpu_reference_gate, uart4_ipg_gate, uart4_per_gate, uart5_ipg_gate, | ||
67 | uart5_per_gate, tve_gate, tve_pred, esdhc1_per_gate, esdhc2_per_gate, | ||
68 | esdhc3_per_gate, esdhc4_per_gate, usb_phy_gate, hsi2c_gate, | ||
69 | mipi_hsc1_gate, mipi_hsc2_gate, mipi_esc_gate, mipi_hsp_gate, | ||
70 | ldb_di1_div_3_5, ldb_di1_div, ldb_di0_div_3_5, ldb_di0_div, | ||
71 | ldb_di1_gate, can2_serial_gate, can2_ipg_gate, i2c3_gate, lp_apm, | ||
72 | periph_apm, main_bus, ahb_max, aips_tz1, aips_tz2, tmax1, tmax2, | ||
73 | tmax3, spba, uart_sel, esdhc_a_sel, esdhc_b_sel, esdhc_a_podf, | ||
74 | esdhc_b_podf, ecspi_sel, usboh3_sel, usb_phy_sel, iim_gate, | ||
75 | usboh3_gate, emi_fast_gate, ipu_di0_gate,gpc_dvfs, pll1_sw, pll2_sw, | ||
76 | pll3_sw, ipu_di0_sel, ipu_di1_sel, tve_ext_sel, mx51_mipi, pll4_sw, | ||
77 | ldb_di1_sel, di_pll4_podf, ldb_di0_sel, ldb_di0_gate, usb_phy1_gate, | ||
78 | usb_phy2_gate, per_lp_apm, per_pred1, per_pred2, per_podf, per_root, | ||
79 | ssi_apm, ssi1_root_sel, ssi2_root_sel, ssi3_root_sel, ssi_ext1_sel, | ||
80 | ssi_ext2_sel, ssi_ext1_com_sel, ssi_ext2_com_sel, ssi1_root_pred, | ||
81 | ssi1_root_podf, ssi2_root_pred, ssi2_root_podf, ssi_ext1_pred, | ||
82 | ssi_ext1_podf, ssi_ext2_pred, ssi_ext2_podf, ssi1_root_gate, | ||
83 | ssi2_root_gate, ssi3_root_gate, ssi_ext1_gate, ssi_ext2_gate, | ||
84 | epit1_ipg_gate, epit1_hf_gate, epit2_ipg_gate, epit2_hf_gate, | ||
85 | can_sel, can1_serial_gate, can1_ipg_gate, | ||
86 | clk_max | ||
87 | }; | ||
88 | |||
89 | static struct clk *clk[clk_max]; | ||
90 | static struct clk_onecell_data clk_data; | ||
91 | |||
92 | static void __init mx5_clocks_common_init(unsigned long rate_ckil, | ||
93 | unsigned long rate_osc, unsigned long rate_ckih1, | ||
94 | unsigned long rate_ckih2) | ||
95 | { | ||
96 | int i; | ||
97 | |||
98 | clk[dummy] = imx_clk_fixed("dummy", 0); | ||
99 | clk[ckil] = imx_clk_fixed("ckil", rate_ckil); | ||
100 | clk[osc] = imx_clk_fixed("osc", rate_osc); | ||
101 | clk[ckih1] = imx_clk_fixed("ckih1", rate_ckih1); | ||
102 | clk[ckih2] = imx_clk_fixed("ckih2", rate_ckih2); | ||
103 | |||
104 | clk[lp_apm] = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 9, 1, | ||
105 | lp_apm_sel, ARRAY_SIZE(lp_apm_sel)); | ||
106 | clk[periph_apm] = imx_clk_mux("periph_apm", MXC_CCM_CBCMR, 12, 2, | ||
107 | periph_apm_sel, ARRAY_SIZE(periph_apm_sel)); | ||
108 | clk[main_bus] = imx_clk_mux("main_bus", MXC_CCM_CBCDR, 25, 1, | ||
109 | main_bus_sel, ARRAY_SIZE(main_bus_sel)); | ||
110 | clk[per_lp_apm] = imx_clk_mux("per_lp_apm", MXC_CCM_CBCMR, 1, 1, | ||
111 | per_lp_apm_sel, ARRAY_SIZE(per_lp_apm_sel)); | ||
112 | clk[per_pred1] = imx_clk_divider("per_pred1", "per_lp_apm", MXC_CCM_CBCDR, 6, 2); | ||
113 | clk[per_pred2] = imx_clk_divider("per_pred2", "per_pred1", MXC_CCM_CBCDR, 3, 3); | ||
114 | clk[per_podf] = imx_clk_divider("per_podf", "per_pred2", MXC_CCM_CBCDR, 0, 3); | ||
115 | clk[per_root] = imx_clk_mux("per_root", MXC_CCM_CBCMR, 0, 1, | ||
116 | per_root_sel, ARRAY_SIZE(per_root_sel)); | ||
117 | clk[ahb] = imx_clk_divider("ahb", "main_bus", MXC_CCM_CBCDR, 10, 3); | ||
118 | clk[ahb_max] = imx_clk_gate2("ahb_max", "ahb", MXC_CCM_CCGR0, 28); | ||
119 | clk[aips_tz1] = imx_clk_gate2("aips_tz1", "ahb", MXC_CCM_CCGR0, 24); | ||
120 | clk[aips_tz2] = imx_clk_gate2("aips_tz2", "ahb", MXC_CCM_CCGR0, 26); | ||
121 | clk[tmax1] = imx_clk_gate2("tmax1", "ahb", MXC_CCM_CCGR1, 0); | ||
122 | clk[tmax2] = imx_clk_gate2("tmax2", "ahb", MXC_CCM_CCGR1, 2); | ||
123 | clk[tmax3] = imx_clk_gate2("tmax3", "ahb", MXC_CCM_CCGR1, 4); | ||
124 | clk[spba] = imx_clk_gate2("spba", "ipg", MXC_CCM_CCGR5, 0); | ||
125 | clk[ipg] = imx_clk_divider("ipg", "ahb", MXC_CCM_CBCDR, 8, 2); | ||
126 | clk[axi_a] = imx_clk_divider("axi_a", "main_bus", MXC_CCM_CBCDR, 16, 3); | ||
127 | clk[axi_b] = imx_clk_divider("axi_b", "main_bus", MXC_CCM_CBCDR, 19, 3); | ||
128 | clk[uart_sel] = imx_clk_mux("uart_sel", MXC_CCM_CSCMR1, 24, 2, | ||
129 | standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); | ||
130 | clk[uart_pred] = imx_clk_divider("uart_pred", "uart_sel", MXC_CCM_CSCDR1, 3, 3); | ||
131 | clk[uart_root] = imx_clk_divider("uart_root", "uart_pred", MXC_CCM_CSCDR1, 0, 3); | ||
132 | |||
133 | clk[esdhc_a_sel] = imx_clk_mux("esdhc_a_sel", MXC_CCM_CSCMR1, 20, 2, | ||
134 | standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); | ||
135 | clk[esdhc_b_sel] = imx_clk_mux("esdhc_b_sel", MXC_CCM_CSCMR1, 16, 2, | ||
136 | standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); | ||
137 | clk[esdhc_a_pred] = imx_clk_divider("esdhc_a_pred", "esdhc_a_sel", MXC_CCM_CSCDR1, 16, 3); | ||
138 | clk[esdhc_a_podf] = imx_clk_divider("esdhc_a_podf", "esdhc_a_pred", MXC_CCM_CSCDR1, 11, 3); | ||
139 | clk[esdhc_b_pred] = imx_clk_divider("esdhc_b_pred", "esdhc_b_sel", MXC_CCM_CSCDR1, 22, 3); | ||
140 | clk[esdhc_b_podf] = imx_clk_divider("esdhc_b_podf", "esdhc_b_pred", MXC_CCM_CSCDR1, 19, 3); | ||
141 | clk[esdhc_c_s] = imx_clk_mux("esdhc_c_sel", MXC_CCM_CSCMR1, 19, 1, esdhc_c_sel, ARRAY_SIZE(esdhc_c_sel)); | ||
142 | clk[esdhc_d_s] = imx_clk_mux("esdhc_d_sel", MXC_CCM_CSCMR1, 18, 1, esdhc_d_sel, ARRAY_SIZE(esdhc_d_sel)); | ||
143 | |||
144 | clk[emi_sel] = imx_clk_mux("emi_sel", MXC_CCM_CBCDR, 26, 1, | ||
145 | emi_slow_sel, ARRAY_SIZE(emi_slow_sel)); | ||
146 | clk[emi_slow_podf] = imx_clk_divider("emi_slow_podf", "emi_sel", MXC_CCM_CBCDR, 22, 3); | ||
147 | clk[nfc_podf] = imx_clk_divider("nfc_podf", "emi_slow_podf", MXC_CCM_CBCDR, 13, 3); | ||
148 | clk[ecspi_sel] = imx_clk_mux("ecspi_sel", MXC_CCM_CSCMR1, 4, 2, | ||
149 | standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); | ||
150 | clk[ecspi_pred] = imx_clk_divider("ecspi_pred", "ecspi_sel", MXC_CCM_CSCDR2, 25, 3); | ||
151 | clk[ecspi_podf] = imx_clk_divider("ecspi_podf", "ecspi_pred", MXC_CCM_CSCDR2, 19, 6); | ||
152 | clk[usboh3_sel] = imx_clk_mux("usboh3_sel", MXC_CCM_CSCMR1, 22, 2, | ||
153 | standard_pll_sel, ARRAY_SIZE(standard_pll_sel)); | ||
154 | clk[usboh3_pred] = imx_clk_divider("usboh3_pred", "usboh3_sel", MXC_CCM_CSCDR1, 8, 3); | ||
155 | clk[usboh3_podf] = imx_clk_divider("usboh3_podf", "usboh3_pred", MXC_CCM_CSCDR1, 6, 2); | ||
156 | clk[usb_phy_pred] = imx_clk_divider("usb_phy_pred", "pll3_sw", MXC_CCM_CDCDR, 3, 3); | ||
157 | clk[usb_phy_podf] = imx_clk_divider("usb_phy_podf", "usb_phy_pred", MXC_CCM_CDCDR, 0, 3); | ||
158 | clk[usb_phy_sel] = imx_clk_mux("usb_phy_sel", MXC_CCM_CSCMR1, 26, 1, | ||
159 | usb_phy_sel_str, ARRAY_SIZE(usb_phy_sel_str)); | ||
160 | clk[cpu_podf] = imx_clk_divider("cpu_podf", "pll1_sw", MXC_CCM_CACRR, 0, 3); | ||
161 | clk[di_pred] = imx_clk_divider("di_pred", "pll3_sw", MXC_CCM_CDCDR, 6, 3); | ||
162 | clk[tve_di] = imx_clk_fixed("tve_di", 65000000); /* FIXME */ | ||
163 | clk[tve_s] = imx_clk_mux("tve_sel", MXC_CCM_CSCMR1, 7, 1, tve_sel, ARRAY_SIZE(tve_sel)); | ||
164 | clk[iim_gate] = imx_clk_gate2("iim_gate", "ipg", MXC_CCM_CCGR0, 30); | ||
165 | clk[uart1_ipg_gate] = imx_clk_gate2("uart1_ipg_gate", "ipg", MXC_CCM_CCGR1, 6); | ||
166 | clk[uart1_per_gate] = imx_clk_gate2("uart1_per_gate", "uart_root", MXC_CCM_CCGR1, 8); | ||
167 | clk[uart2_ipg_gate] = imx_clk_gate2("uart2_ipg_gate", "ipg", MXC_CCM_CCGR1, 10); | ||
168 | clk[uart2_per_gate] = imx_clk_gate2("uart2_per_gate", "uart_root", MXC_CCM_CCGR1, 12); | ||
169 | clk[uart3_ipg_gate] = imx_clk_gate2("uart3_ipg_gate", "ipg", MXC_CCM_CCGR1, 14); | ||
170 | clk[uart3_per_gate] = imx_clk_gate2("uart3_per_gate", "uart_root", MXC_CCM_CCGR1, 16); | ||
171 | clk[i2c1_gate] = imx_clk_gate2("i2c1_gate", "per_root", MXC_CCM_CCGR1, 18); | ||
172 | clk[i2c2_gate] = imx_clk_gate2("i2c2_gate", "per_root", MXC_CCM_CCGR1, 20); | ||
173 | clk[pwm1_ipg_gate] = imx_clk_gate2("pwm1_ipg_gate", "ipg", MXC_CCM_CCGR2, 10); | ||
174 | clk[pwm1_hf_gate] = imx_clk_gate2("pwm1_hf_gate", "per_root", MXC_CCM_CCGR2, 12); | ||
175 | clk[pwm2_ipg_gate] = imx_clk_gate2("pwm2_ipg_gate", "ipg", MXC_CCM_CCGR2, 14); | ||
176 | clk[pwm2_hf_gate] = imx_clk_gate2("pwm2_hf_gate", "per_root", MXC_CCM_CCGR2, 16); | ||
177 | clk[gpt_ipg_gate] = imx_clk_gate2("gpt_ipg_gate", "ipg", MXC_CCM_CCGR2, 18); | ||
178 | clk[gpt_hf_gate] = imx_clk_gate2("gpt_hf_gate", "per_root", MXC_CCM_CCGR2, 20); | ||
179 | clk[fec_gate] = imx_clk_gate2("fec_gate", "ipg", MXC_CCM_CCGR2, 24); | ||
180 | clk[usboh3_gate] = imx_clk_gate2("usboh3_gate", "ipg", MXC_CCM_CCGR2, 26); | ||
181 | clk[usboh3_per_gate] = imx_clk_gate2("usboh3_per_gate", "usboh3_podf", MXC_CCM_CCGR2, 28); | ||
182 | clk[esdhc1_ipg_gate] = imx_clk_gate2("esdhc1_ipg_gate", "ipg", MXC_CCM_CCGR3, 0); | ||
183 | clk[esdhc2_ipg_gate] = imx_clk_gate2("esdhc2_ipg_gate", "ipg", MXC_CCM_CCGR3, 4); | ||
184 | clk[esdhc3_ipg_gate] = imx_clk_gate2("esdhc3_ipg_gate", "ipg", MXC_CCM_CCGR3, 8); | ||
185 | clk[esdhc4_ipg_gate] = imx_clk_gate2("esdhc4_ipg_gate", "ipg", MXC_CCM_CCGR3, 12); | ||
186 | clk[ssi1_ipg_gate] = imx_clk_gate2("ssi1_ipg_gate", "ipg", MXC_CCM_CCGR3, 16); | ||
187 | clk[ssi2_ipg_gate] = imx_clk_gate2("ssi2_ipg_gate", "ipg", MXC_CCM_CCGR3, 20); | ||
188 | clk[ssi3_ipg_gate] = imx_clk_gate2("ssi3_ipg_gate", "ipg", MXC_CCM_CCGR3, 24); | ||
189 | clk[ecspi1_ipg_gate] = imx_clk_gate2("ecspi1_ipg_gate", "ipg", MXC_CCM_CCGR4, 18); | ||
190 | clk[ecspi1_per_gate] = imx_clk_gate2("ecspi1_per_gate", "ecspi_podf", MXC_CCM_CCGR4, 20); | ||
191 | clk[ecspi2_ipg_gate] = imx_clk_gate2("ecspi2_ipg_gate", "ipg", MXC_CCM_CCGR4, 22); | ||
192 | clk[ecspi2_per_gate] = imx_clk_gate2("ecspi2_per_gate", "ecspi_podf", MXC_CCM_CCGR4, 24); | ||
193 | clk[cspi_ipg_gate] = imx_clk_gate2("cspi_ipg_gate", "ipg", MXC_CCM_CCGR4, 26); | ||
194 | clk[sdma_gate] = imx_clk_gate2("sdma_gate", "ipg", MXC_CCM_CCGR4, 30); | ||
195 | clk[emi_fast_gate] = imx_clk_gate2("emi_fast_gate", "dummy", MXC_CCM_CCGR5, 14); | ||
196 | clk[emi_slow_gate] = imx_clk_gate2("emi_slow_gate", "emi_slow_podf", MXC_CCM_CCGR5, 16); | ||
197 | clk[ipu_s] = imx_clk_mux("ipu_sel", MXC_CCM_CBCMR, 6, 2, ipu_sel, ARRAY_SIZE(ipu_sel)); | ||
198 | clk[ipu_gate] = imx_clk_gate2("ipu_gate", "ipu_sel", MXC_CCM_CCGR5, 10); | ||
199 | clk[nfc_gate] = imx_clk_gate2("nfc_gate", "nfc_podf", MXC_CCM_CCGR5, 20); | ||
200 | clk[ipu_di0_gate] = imx_clk_gate2("ipu_di0_gate", "ipu_di0_sel", MXC_CCM_CCGR6, 10); | ||
201 | clk[ipu_di1_gate] = imx_clk_gate2("ipu_di1_gate", "ipu_di1_sel", MXC_CCM_CCGR6, 12); | ||
202 | clk[vpu_s] = imx_clk_mux("vpu_sel", MXC_CCM_CBCMR, 14, 2, vpu_sel, ARRAY_SIZE(vpu_sel)); | ||
203 | clk[vpu_gate] = imx_clk_gate2("vpu_gate", "vpu_sel", MXC_CCM_CCGR5, 6); | ||
204 | clk[vpu_reference_gate] = imx_clk_gate2("vpu_reference_gate", "osc", MXC_CCM_CCGR5, 8); | ||
205 | clk[uart4_ipg_gate] = imx_clk_gate2("uart4_ipg_gate", "ipg", MXC_CCM_CCGR7, 8); | ||
206 | clk[uart4_per_gate] = imx_clk_gate2("uart4_per_gate", "uart_root", MXC_CCM_CCGR7, 10); | ||
207 | clk[uart5_ipg_gate] = imx_clk_gate2("uart5_ipg_gate", "ipg", MXC_CCM_CCGR7, 12); | ||
208 | clk[uart5_per_gate] = imx_clk_gate2("uart5_per_gate", "uart_root", MXC_CCM_CCGR7, 14); | ||
209 | clk[gpc_dvfs] = imx_clk_gate2("gpc_dvfs", "dummy", MXC_CCM_CCGR5, 24); | ||
210 | |||
211 | clk[ssi_apm] = imx_clk_mux("ssi_apm", MXC_CCM_CSCMR1, 8, 2, ssi_apm_sels, ARRAY_SIZE(ssi_apm_sels)); | ||
212 | clk[ssi1_root_sel] = imx_clk_mux("ssi1_root_sel", MXC_CCM_CSCMR1, 14, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels)); | ||
213 | clk[ssi2_root_sel] = imx_clk_mux("ssi2_root_sel", MXC_CCM_CSCMR1, 12, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels)); | ||
214 | clk[ssi3_root_sel] = imx_clk_mux("ssi3_root_sel", MXC_CCM_CSCMR1, 11, 1, ssi3_clk_sels, ARRAY_SIZE(ssi3_clk_sels)); | ||
215 | clk[ssi_ext1_sel] = imx_clk_mux("ssi_ext1_sel", MXC_CCM_CSCMR1, 28, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels)); | ||
216 | clk[ssi_ext2_sel] = imx_clk_mux("ssi_ext2_sel", MXC_CCM_CSCMR1, 30, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels)); | ||
217 | clk[ssi_ext1_com_sel] = imx_clk_mux("ssi_ext1_com_sel", MXC_CCM_CSCMR1, 0, 1, ssi_ext1_com_sels, ARRAY_SIZE(ssi_ext1_com_sels)); | ||
218 | clk[ssi_ext2_com_sel] = imx_clk_mux("ssi_ext2_com_sel", MXC_CCM_CSCMR1, 1, 1, ssi_ext2_com_sels, ARRAY_SIZE(ssi_ext2_com_sels)); | ||
219 | clk[ssi1_root_pred] = imx_clk_divider("ssi1_root_pred", "ssi1_root_sel", MXC_CCM_CS1CDR, 6, 3); | ||
220 | clk[ssi1_root_podf] = imx_clk_divider("ssi1_root_podf", "ssi1_root_pred", MXC_CCM_CS1CDR, 0, 6); | ||
221 | clk[ssi2_root_pred] = imx_clk_divider("ssi2_root_pred", "ssi2_root_sel", MXC_CCM_CS2CDR, 6, 3); | ||
222 | clk[ssi2_root_podf] = imx_clk_divider("ssi2_root_podf", "ssi2_root_pred", MXC_CCM_CS2CDR, 0, 6); | ||
223 | clk[ssi_ext1_pred] = imx_clk_divider("ssi_ext1_pred", "ssi_ext1_sel", MXC_CCM_CS1CDR, 22, 3); | ||
224 | clk[ssi_ext1_podf] = imx_clk_divider("ssi_ext1_podf", "ssi_ext1_pred", MXC_CCM_CS1CDR, 16, 6); | ||
225 | clk[ssi_ext2_pred] = imx_clk_divider("ssi_ext2_pred", "ssi_ext2_sel", MXC_CCM_CS2CDR, 22, 3); | ||
226 | clk[ssi_ext2_podf] = imx_clk_divider("ssi_ext2_podf", "ssi_ext2_pred", MXC_CCM_CS2CDR, 16, 6); | ||
227 | clk[ssi1_root_gate] = imx_clk_gate2("ssi1_root_gate", "ssi1_root_podf", MXC_CCM_CCGR3, 18); | ||
228 | clk[ssi2_root_gate] = imx_clk_gate2("ssi2_root_gate", "ssi2_root_podf", MXC_CCM_CCGR3, 22); | ||
229 | clk[ssi3_root_gate] = imx_clk_gate2("ssi3_root_gate", "ssi3_root_sel", MXC_CCM_CCGR3, 26); | ||
230 | clk[ssi_ext1_gate] = imx_clk_gate2("ssi_ext1_gate", "ssi_ext1_com_sel", MXC_CCM_CCGR3, 28); | ||
231 | clk[ssi_ext2_gate] = imx_clk_gate2("ssi_ext2_gate", "ssi_ext2_com_sel", MXC_CCM_CCGR3, 30); | ||
232 | clk[epit1_ipg_gate] = imx_clk_gate2("epit1_ipg_gate", "ipg", MXC_CCM_CCGR2, 2); | ||
233 | clk[epit1_hf_gate] = imx_clk_gate2("epit1_hf_gate", "per_root", MXC_CCM_CCGR2, 4); | ||
234 | clk[epit2_ipg_gate] = imx_clk_gate2("epit2_ipg_gate", "ipg", MXC_CCM_CCGR2, 6); | ||
235 | clk[epit2_hf_gate] = imx_clk_gate2("epit2_hf_gate", "per_root", MXC_CCM_CCGR2, 8); | ||
236 | |||
237 | for (i = 0; i < ARRAY_SIZE(clk); i++) | ||
238 | if (IS_ERR(clk[i])) | ||
239 | pr_err("i.MX5 clk %d: register failed with %ld\n", | ||
240 | i, PTR_ERR(clk[i])); | ||
241 | |||
242 | clk_register_clkdev(clk[gpt_hf_gate], "per", "imx-gpt.0"); | ||
243 | clk_register_clkdev(clk[gpt_ipg_gate], "ipg", "imx-gpt.0"); | ||
244 | clk_register_clkdev(clk[uart1_per_gate], "per", "imx21-uart.0"); | ||
245 | clk_register_clkdev(clk[uart1_ipg_gate], "ipg", "imx21-uart.0"); | ||
246 | clk_register_clkdev(clk[uart2_per_gate], "per", "imx21-uart.1"); | ||
247 | clk_register_clkdev(clk[uart2_ipg_gate], "ipg", "imx21-uart.1"); | ||
248 | clk_register_clkdev(clk[uart3_per_gate], "per", "imx21-uart.2"); | ||
249 | clk_register_clkdev(clk[uart3_ipg_gate], "ipg", "imx21-uart.2"); | ||
250 | clk_register_clkdev(clk[uart4_per_gate], "per", "imx21-uart.3"); | ||
251 | clk_register_clkdev(clk[uart4_ipg_gate], "ipg", "imx21-uart.3"); | ||
252 | clk_register_clkdev(clk[uart5_per_gate], "per", "imx21-uart.4"); | ||
253 | clk_register_clkdev(clk[uart5_ipg_gate], "ipg", "imx21-uart.4"); | ||
254 | clk_register_clkdev(clk[ecspi1_per_gate], "per", "imx51-ecspi.0"); | ||
255 | clk_register_clkdev(clk[ecspi1_ipg_gate], "ipg", "imx51-ecspi.0"); | ||
256 | clk_register_clkdev(clk[ecspi2_per_gate], "per", "imx51-ecspi.1"); | ||
257 | clk_register_clkdev(clk[ecspi2_ipg_gate], "ipg", "imx51-ecspi.1"); | ||
258 | clk_register_clkdev(clk[cspi_ipg_gate], NULL, "imx35-cspi.2"); | ||
259 | clk_register_clkdev(clk[pwm1_ipg_gate], "pwm", "mxc_pwm.0"); | ||
260 | clk_register_clkdev(clk[pwm2_ipg_gate], "pwm", "mxc_pwm.1"); | ||
261 | clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0"); | ||
262 | clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1"); | ||
263 | clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.0"); | ||
264 | clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.0"); | ||
265 | clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.0"); | ||
266 | clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.1"); | ||
267 | clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.1"); | ||
268 | clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.1"); | ||
269 | clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.2"); | ||
270 | clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.2"); | ||
271 | clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.2"); | ||
272 | clk_register_clkdev(clk[usboh3_per_gate], "per", "fsl-usb2-udc"); | ||
273 | clk_register_clkdev(clk[usboh3_gate], "ipg", "fsl-usb2-udc"); | ||
274 | clk_register_clkdev(clk[usboh3_gate], "ahb", "fsl-usb2-udc"); | ||
275 | clk_register_clkdev(clk[nfc_gate], NULL, "imx51-nand"); | ||
276 | clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); | ||
277 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); | ||
278 | clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "imx-ssi.2"); | ||
279 | clk_register_clkdev(clk[ssi_ext1_gate], "ssi_ext1", NULL); | ||
280 | clk_register_clkdev(clk[ssi_ext2_gate], "ssi_ext2", NULL); | ||
281 | clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma"); | ||
282 | clk_register_clkdev(clk[cpu_podf], "cpu", NULL); | ||
283 | clk_register_clkdev(clk[iim_gate], "iim", NULL); | ||
284 | clk_register_clkdev(clk[dummy], NULL, "imx2-wdt.0"); | ||
285 | clk_register_clkdev(clk[dummy], NULL, "imx2-wdt.1"); | ||
286 | clk_register_clkdev(clk[dummy], NULL, "imx-keypad"); | ||
287 | clk_register_clkdev(clk[tve_gate], NULL, "imx-tve.0"); | ||
288 | clk_register_clkdev(clk[ipu_di1_gate], "di1", "imx-tve.0"); | ||
289 | clk_register_clkdev(clk[gpc_dvfs], "gpc_dvfs", NULL); | ||
290 | clk_register_clkdev(clk[epit1_ipg_gate], "ipg", "imx-epit.0"); | ||
291 | clk_register_clkdev(clk[epit1_hf_gate], "per", "imx-epit.0"); | ||
292 | clk_register_clkdev(clk[epit2_ipg_gate], "ipg", "imx-epit.1"); | ||
293 | clk_register_clkdev(clk[epit2_hf_gate], "per", "imx-epit.1"); | ||
294 | |||
295 | /* Set SDHC parents to be PLL2 */ | ||
296 | clk_set_parent(clk[esdhc_a_sel], clk[pll2_sw]); | ||
297 | clk_set_parent(clk[esdhc_b_sel], clk[pll2_sw]); | ||
298 | |||
299 | /* move usb phy clk to 24MHz */ | ||
300 | clk_set_parent(clk[usb_phy_sel], clk[osc]); | ||
301 | |||
302 | clk_prepare_enable(clk[gpc_dvfs]); | ||
303 | clk_prepare_enable(clk[ahb_max]); /* esdhc3 */ | ||
304 | clk_prepare_enable(clk[aips_tz1]); | ||
305 | clk_prepare_enable(clk[aips_tz2]); /* fec */ | ||
306 | clk_prepare_enable(clk[spba]); | ||
307 | clk_prepare_enable(clk[emi_fast_gate]); /* fec */ | ||
308 | clk_prepare_enable(clk[emi_slow_gate]); /* eim */ | ||
309 | clk_prepare_enable(clk[mipi_hsc1_gate]); | ||
310 | clk_prepare_enable(clk[mipi_hsc2_gate]); | ||
311 | clk_prepare_enable(clk[mipi_esc_gate]); | ||
312 | clk_prepare_enable(clk[mipi_hsp_gate]); | ||
313 | clk_prepare_enable(clk[tmax1]); | ||
314 | clk_prepare_enable(clk[tmax2]); /* esdhc2, fec */ | ||
315 | clk_prepare_enable(clk[tmax3]); /* esdhc1, esdhc4 */ | ||
316 | } | ||
317 | |||
318 | int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | ||
319 | unsigned long rate_ckih1, unsigned long rate_ckih2) | ||
320 | { | ||
321 | int i; | ||
322 | u32 val; | ||
323 | struct device_node *np; | ||
324 | |||
325 | clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX51_DPLL1_BASE); | ||
326 | clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX51_DPLL2_BASE); | ||
327 | clk[pll3_sw] = imx_clk_pllv2("pll3_sw", "osc", MX51_DPLL3_BASE); | ||
328 | clk[ipu_di0_sel] = imx_clk_mux("ipu_di0_sel", MXC_CCM_CSCMR2, 26, 3, | ||
329 | mx51_ipu_di0_sel, ARRAY_SIZE(mx51_ipu_di0_sel)); | ||
330 | clk[ipu_di1_sel] = imx_clk_mux("ipu_di1_sel", MXC_CCM_CSCMR2, 29, 3, | ||
331 | mx51_ipu_di1_sel, ARRAY_SIZE(mx51_ipu_di1_sel)); | ||
332 | clk[tve_ext_sel] = imx_clk_mux("tve_ext_sel", MXC_CCM_CSCMR1, 6, 1, | ||
333 | mx51_tve_ext_sel, ARRAY_SIZE(mx51_tve_ext_sel)); | ||
334 | clk[tve_gate] = imx_clk_gate2("tve_gate", "tve_sel", MXC_CCM_CCGR2, 30); | ||
335 | clk[tve_pred] = imx_clk_divider("tve_pred", "pll3_sw", MXC_CCM_CDCDR, 28, 3); | ||
336 | clk[esdhc1_per_gate] = imx_clk_gate2("esdhc1_per_gate", "esdhc_a_podf", MXC_CCM_CCGR3, 2); | ||
337 | clk[esdhc2_per_gate] = imx_clk_gate2("esdhc2_per_gate", "esdhc_b_podf", MXC_CCM_CCGR3, 6); | ||
338 | clk[esdhc3_per_gate] = imx_clk_gate2("esdhc3_per_gate", "esdhc_c_sel", MXC_CCM_CCGR3, 10); | ||
339 | clk[esdhc4_per_gate] = imx_clk_gate2("esdhc4_per_gate", "esdhc_d_sel", MXC_CCM_CCGR3, 14); | ||
340 | clk[usb_phy_gate] = imx_clk_gate2("usb_phy_gate", "usb_phy_sel", MXC_CCM_CCGR2, 0); | ||
341 | clk[hsi2c_gate] = imx_clk_gate2("hsi2c_gate", "ipg", MXC_CCM_CCGR1, 22); | ||
342 | clk[mipi_hsc1_gate] = imx_clk_gate2("mipi_hsc1_gate", "ipg", MXC_CCM_CCGR4, 6); | ||
343 | clk[mipi_hsc2_gate] = imx_clk_gate2("mipi_hsc2_gate", "ipg", MXC_CCM_CCGR4, 8); | ||
344 | clk[mipi_esc_gate] = imx_clk_gate2("mipi_esc_gate", "ipg", MXC_CCM_CCGR4, 10); | ||
345 | clk[mipi_hsp_gate] = imx_clk_gate2("mipi_hsp_gate", "ipg", MXC_CCM_CCGR4, 12); | ||
346 | |||
347 | for (i = 0; i < ARRAY_SIZE(clk); i++) | ||
348 | if (IS_ERR(clk[i])) | ||
349 | pr_err("i.MX51 clk %d: register failed with %ld\n", | ||
350 | i, PTR_ERR(clk[i])); | ||
351 | |||
352 | np = of_find_compatible_node(NULL, NULL, "fsl,imx51-ccm"); | ||
353 | clk_data.clks = clk; | ||
354 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
355 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
356 | |||
357 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); | ||
358 | |||
359 | clk_register_clkdev(clk[hsi2c_gate], NULL, "imx21-i2c.2"); | ||
360 | clk_register_clkdev(clk[mx51_mipi], "mipi_hsp", NULL); | ||
361 | clk_register_clkdev(clk[vpu_gate], NULL, "imx51-vpu.0"); | ||
362 | clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); | ||
363 | clk_register_clkdev(clk[ipu_gate], "bus", "40000000.ipu"); | ||
364 | clk_register_clkdev(clk[ipu_di0_gate], "di0", "40000000.ipu"); | ||
365 | clk_register_clkdev(clk[ipu_di1_gate], "di1", "40000000.ipu"); | ||
366 | clk_register_clkdev(clk[usb_phy_gate], "phy", "mxc-ehci.0"); | ||
367 | clk_register_clkdev(clk[esdhc1_ipg_gate], "ipg", "sdhci-esdhc-imx51.0"); | ||
368 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.0"); | ||
369 | clk_register_clkdev(clk[esdhc1_per_gate], "per", "sdhci-esdhc-imx51.0"); | ||
370 | clk_register_clkdev(clk[esdhc2_ipg_gate], "ipg", "sdhci-esdhc-imx51.1"); | ||
371 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.1"); | ||
372 | clk_register_clkdev(clk[esdhc2_per_gate], "per", "sdhci-esdhc-imx51.1"); | ||
373 | clk_register_clkdev(clk[esdhc3_ipg_gate], "ipg", "sdhci-esdhc-imx51.2"); | ||
374 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.2"); | ||
375 | clk_register_clkdev(clk[esdhc3_per_gate], "per", "sdhci-esdhc-imx51.2"); | ||
376 | clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx51.3"); | ||
377 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.3"); | ||
378 | clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx51.3"); | ||
379 | |||
380 | /* set the usboh3 parent to pll2_sw */ | ||
381 | clk_set_parent(clk[usboh3_sel], clk[pll2_sw]); | ||
382 | |||
383 | /* set SDHC root clock to 166.25MHZ*/ | ||
384 | clk_set_rate(clk[esdhc_a_podf], 166250000); | ||
385 | clk_set_rate(clk[esdhc_b_podf], 166250000); | ||
386 | |||
387 | /* System timer */ | ||
388 | mxc_timer_init(MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), MX51_INT_GPT); | ||
389 | |||
390 | clk_prepare_enable(clk[iim_gate]); | ||
391 | imx_print_silicon_rev("i.MX51", mx51_revision()); | ||
392 | clk_disable_unprepare(clk[iim_gate]); | ||
393 | |||
394 | /* | ||
395 | * Reference Manual says: Functionality of CCDR[18] and CLPCR[23] is no | ||
396 | * longer supported. Set to one for better power saving. | ||
397 | * | ||
398 | * The effect of not setting these bits is that MIPI clocks can't be | ||
399 | * enabled without the IPU clock being enabled aswell. | ||
400 | */ | ||
401 | val = readl(MXC_CCM_CCDR); | ||
402 | val |= 1 << 18; | ||
403 | writel(val, MXC_CCM_CCDR); | ||
404 | |||
405 | val = readl(MXC_CCM_CLPCR); | ||
406 | val |= 1 << 23; | ||
407 | writel(val, MXC_CCM_CLPCR); | ||
408 | |||
409 | return 0; | ||
410 | } | ||
411 | |||
412 | int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | ||
413 | unsigned long rate_ckih1, unsigned long rate_ckih2) | ||
414 | { | ||
415 | int i; | ||
416 | unsigned long r; | ||
417 | struct device_node *np; | ||
418 | |||
419 | clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); | ||
420 | clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); | ||
421 | clk[pll3_sw] = imx_clk_pllv2("pll3_sw", "osc", MX53_DPLL3_BASE); | ||
422 | clk[pll4_sw] = imx_clk_pllv2("pll4_sw", "osc", MX53_DPLL4_BASE); | ||
423 | |||
424 | clk[ldb_di1_sel] = imx_clk_mux("ldb_di1_sel", MXC_CCM_CSCMR2, 9, 1, | ||
425 | mx53_ldb_di1_sel, ARRAY_SIZE(mx53_ldb_di1_sel)); | ||
426 | clk[ldb_di1_div_3_5] = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7); | ||
427 | clk[ldb_di1_div] = imx_clk_divider("ldb_di1_div", "ldb_di1_div_3_5", MXC_CCM_CSCMR2, 11, 1); | ||
428 | clk[di_pll4_podf] = imx_clk_divider("di_pll4_podf", "pll4_sw", MXC_CCM_CDCDR, 16, 3); | ||
429 | clk[ldb_di0_sel] = imx_clk_mux("ldb_di0_sel", MXC_CCM_CSCMR2, 8, 1, | ||
430 | mx53_ldb_di0_sel, ARRAY_SIZE(mx53_ldb_di0_sel)); | ||
431 | clk[ldb_di0_div_3_5] = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7); | ||
432 | clk[ldb_di0_div] = imx_clk_divider("ldb_di0_div", "ldb_di0_div_3_5", MXC_CCM_CSCMR2, 10, 1); | ||
433 | clk[ldb_di0_gate] = imx_clk_gate2("ldb_di0_gate", "ldb_di0_div", MXC_CCM_CCGR6, 28); | ||
434 | clk[ldb_di1_gate] = imx_clk_gate2("ldb_di1_gate", "ldb_di1_div", MXC_CCM_CCGR6, 30); | ||
435 | clk[ipu_di0_sel] = imx_clk_mux("ipu_di0_sel", MXC_CCM_CSCMR2, 26, 3, | ||
436 | mx53_ipu_di0_sel, ARRAY_SIZE(mx53_ipu_di0_sel)); | ||
437 | clk[ipu_di1_sel] = imx_clk_mux("ipu_di1_sel", MXC_CCM_CSCMR2, 29, 3, | ||
438 | mx53_ipu_di1_sel, ARRAY_SIZE(mx53_ipu_di1_sel)); | ||
439 | clk[tve_ext_sel] = imx_clk_mux("tve_ext_sel", MXC_CCM_CSCMR1, 6, 1, | ||
440 | mx53_tve_ext_sel, ARRAY_SIZE(mx53_tve_ext_sel)); | ||
441 | clk[tve_gate] = imx_clk_gate2("tve_gate", "tve_pred", MXC_CCM_CCGR2, 30); | ||
442 | clk[tve_pred] = imx_clk_divider("tve_pred", "tve_ext_sel", MXC_CCM_CDCDR, 28, 3); | ||
443 | clk[esdhc1_per_gate] = imx_clk_gate2("esdhc1_per_gate", "esdhc_a_podf", MXC_CCM_CCGR3, 2); | ||
444 | clk[esdhc2_per_gate] = imx_clk_gate2("esdhc2_per_gate", "esdhc_c_sel", MXC_CCM_CCGR3, 6); | ||
445 | clk[esdhc3_per_gate] = imx_clk_gate2("esdhc3_per_gate", "esdhc_b_podf", MXC_CCM_CCGR3, 10); | ||
446 | clk[esdhc4_per_gate] = imx_clk_gate2("esdhc4_per_gate", "esdhc_d_sel", MXC_CCM_CCGR3, 14); | ||
447 | clk[usb_phy1_gate] = imx_clk_gate2("usb_phy1_gate", "usb_phy_sel", MXC_CCM_CCGR4, 10); | ||
448 | clk[usb_phy2_gate] = imx_clk_gate2("usb_phy2_gate", "usb_phy_sel", MXC_CCM_CCGR4, 12); | ||
449 | clk[can_sel] = imx_clk_mux("can_sel", MXC_CCM_CSCMR2, 6, 2, | ||
450 | mx53_can_sel, ARRAY_SIZE(mx53_can_sel)); | ||
451 | clk[can1_serial_gate] = imx_clk_gate2("can1_serial_gate", "can_sel", MXC_CCM_CCGR6, 22); | ||
452 | clk[can1_ipg_gate] = imx_clk_gate2("can1_ipg_gate", "ipg", MXC_CCM_CCGR6, 20); | ||
453 | clk[can2_serial_gate] = imx_clk_gate2("can2_serial_gate", "can_sel", MXC_CCM_CCGR4, 8); | ||
454 | clk[can2_ipg_gate] = imx_clk_gate2("can2_ipg_gate", "ipg", MXC_CCM_CCGR4, 6); | ||
455 | clk[i2c3_gate] = imx_clk_gate2("i2c3_gate", "per_root", MXC_CCM_CCGR1, 22); | ||
456 | |||
457 | for (i = 0; i < ARRAY_SIZE(clk); i++) | ||
458 | if (IS_ERR(clk[i])) | ||
459 | pr_err("i.MX53 clk %d: register failed with %ld\n", | ||
460 | i, PTR_ERR(clk[i])); | ||
461 | |||
462 | np = of_find_compatible_node(NULL, NULL, "fsl,imx53-ccm"); | ||
463 | clk_data.clks = clk; | ||
464 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
465 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
466 | |||
467 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); | ||
468 | |||
469 | clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); | ||
470 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); | ||
471 | clk_register_clkdev(clk[fec_gate], NULL, "imx25-fec.0"); | ||
472 | clk_register_clkdev(clk[ipu_gate], "bus", "18000000.ipu"); | ||
473 | clk_register_clkdev(clk[ipu_di0_gate], "di0", "18000000.ipu"); | ||
474 | clk_register_clkdev(clk[ipu_di1_gate], "di1", "18000000.ipu"); | ||
475 | clk_register_clkdev(clk[ipu_gate], "hsp", "18000000.ipu"); | ||
476 | clk_register_clkdev(clk[usb_phy1_gate], "usb_phy1", "mxc-ehci.0"); | ||
477 | clk_register_clkdev(clk[esdhc1_ipg_gate], "ipg", "sdhci-esdhc-imx53.0"); | ||
478 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.0"); | ||
479 | clk_register_clkdev(clk[esdhc1_per_gate], "per", "sdhci-esdhc-imx53.0"); | ||
480 | clk_register_clkdev(clk[esdhc2_ipg_gate], "ipg", "sdhci-esdhc-imx53.1"); | ||
481 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.1"); | ||
482 | clk_register_clkdev(clk[esdhc2_per_gate], "per", "sdhci-esdhc-imx53.1"); | ||
483 | clk_register_clkdev(clk[esdhc3_ipg_gate], "ipg", "sdhci-esdhc-imx53.2"); | ||
484 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.2"); | ||
485 | clk_register_clkdev(clk[esdhc3_per_gate], "per", "sdhci-esdhc-imx53.2"); | ||
486 | clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx53.3"); | ||
487 | clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.3"); | ||
488 | clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx53.3"); | ||
489 | |||
490 | /* set SDHC root clock to 200MHZ*/ | ||
491 | clk_set_rate(clk[esdhc_a_podf], 200000000); | ||
492 | clk_set_rate(clk[esdhc_b_podf], 200000000); | ||
493 | |||
494 | /* System timer */ | ||
495 | mxc_timer_init(MX53_IO_ADDRESS(MX53_GPT1_BASE_ADDR), MX53_INT_GPT); | ||
496 | |||
497 | clk_prepare_enable(clk[iim_gate]); | ||
498 | imx_print_silicon_rev("i.MX53", mx53_revision()); | ||
499 | clk_disable_unprepare(clk[iim_gate]); | ||
500 | |||
501 | r = clk_round_rate(clk[usboh3_per_gate], 54000000); | ||
502 | clk_set_rate(clk[usboh3_per_gate], r); | ||
503 | |||
504 | return 0; | ||
505 | } | ||
506 | |||
507 | #ifdef CONFIG_OF | ||
508 | static void __init clk_get_freq_dt(unsigned long *ckil, unsigned long *osc, | ||
509 | unsigned long *ckih1, unsigned long *ckih2) | ||
510 | { | ||
511 | struct device_node *np; | ||
512 | |||
513 | /* retrieve the freqency of fixed clocks from device tree */ | ||
514 | for_each_compatible_node(np, NULL, "fixed-clock") { | ||
515 | u32 rate; | ||
516 | if (of_property_read_u32(np, "clock-frequency", &rate)) | ||
517 | continue; | ||
518 | |||
519 | if (of_device_is_compatible(np, "fsl,imx-ckil")) | ||
520 | *ckil = rate; | ||
521 | else if (of_device_is_compatible(np, "fsl,imx-osc")) | ||
522 | *osc = rate; | ||
523 | else if (of_device_is_compatible(np, "fsl,imx-ckih1")) | ||
524 | *ckih1 = rate; | ||
525 | else if (of_device_is_compatible(np, "fsl,imx-ckih2")) | ||
526 | *ckih2 = rate; | ||
527 | } | ||
528 | } | ||
529 | |||
530 | int __init mx51_clocks_init_dt(void) | ||
531 | { | ||
532 | unsigned long ckil, osc, ckih1, ckih2; | ||
533 | |||
534 | clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2); | ||
535 | return mx51_clocks_init(ckil, osc, ckih1, ckih2); | ||
536 | } | ||
537 | |||
538 | int __init mx53_clocks_init_dt(void) | ||
539 | { | ||
540 | unsigned long ckil, osc, ckih1, ckih2; | ||
541 | |||
542 | clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2); | ||
543 | return mx53_clocks_init(ckil, osc, ckih1, ckih2); | ||
544 | } | ||
545 | #endif | ||
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c deleted file mode 100644 index 7f2c10c7413..00000000000 --- a/arch/arm/mach-imx/clk-imx6q.c +++ /dev/null | |||
@@ -1,446 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/clk.h> | ||
16 | #include <linux/clkdev.h> | ||
17 | #include <linux/err.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <linux/of.h> | ||
20 | #include <linux/of_address.h> | ||
21 | #include <linux/of_irq.h> | ||
22 | |||
23 | #include "clk.h" | ||
24 | #include "common.h" | ||
25 | |||
26 | #define CCGR0 0x68 | ||
27 | #define CCGR1 0x6c | ||
28 | #define CCGR2 0x70 | ||
29 | #define CCGR3 0x74 | ||
30 | #define CCGR4 0x78 | ||
31 | #define CCGR5 0x7c | ||
32 | #define CCGR6 0x80 | ||
33 | #define CCGR7 0x84 | ||
34 | |||
35 | #define CLPCR 0x54 | ||
36 | #define BP_CLPCR_LPM 0 | ||
37 | #define BM_CLPCR_LPM (0x3 << 0) | ||
38 | #define BM_CLPCR_BYPASS_PMIC_READY (0x1 << 2) | ||
39 | #define BM_CLPCR_ARM_CLK_DIS_ON_LPM (0x1 << 5) | ||
40 | #define BM_CLPCR_SBYOS (0x1 << 6) | ||
41 | #define BM_CLPCR_DIS_REF_OSC (0x1 << 7) | ||
42 | #define BM_CLPCR_VSTBY (0x1 << 8) | ||
43 | #define BP_CLPCR_STBY_COUNT 9 | ||
44 | #define BM_CLPCR_STBY_COUNT (0x3 << 9) | ||
45 | #define BM_CLPCR_COSC_PWRDOWN (0x1 << 11) | ||
46 | #define BM_CLPCR_WB_PER_AT_LPM (0x1 << 16) | ||
47 | #define BM_CLPCR_WB_CORE_AT_LPM (0x1 << 17) | ||
48 | #define BM_CLPCR_BYP_MMDC_CH0_LPM_HS (0x1 << 19) | ||
49 | #define BM_CLPCR_BYP_MMDC_CH1_LPM_HS (0x1 << 21) | ||
50 | #define BM_CLPCR_MASK_CORE0_WFI (0x1 << 22) | ||
51 | #define BM_CLPCR_MASK_CORE1_WFI (0x1 << 23) | ||
52 | #define BM_CLPCR_MASK_CORE2_WFI (0x1 << 24) | ||
53 | #define BM_CLPCR_MASK_CORE3_WFI (0x1 << 25) | ||
54 | #define BM_CLPCR_MASK_SCU_IDLE (0x1 << 26) | ||
55 | #define BM_CLPCR_MASK_L2CC_IDLE (0x1 << 27) | ||
56 | |||
57 | static void __iomem *ccm_base; | ||
58 | |||
59 | void __init imx6q_clock_map_io(void) { } | ||
60 | |||
61 | int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) | ||
62 | { | ||
63 | u32 val = readl_relaxed(ccm_base + CLPCR); | ||
64 | |||
65 | val &= ~BM_CLPCR_LPM; | ||
66 | switch (mode) { | ||
67 | case WAIT_CLOCKED: | ||
68 | break; | ||
69 | case WAIT_UNCLOCKED: | ||
70 | val |= 0x1 << BP_CLPCR_LPM; | ||
71 | break; | ||
72 | case STOP_POWER_ON: | ||
73 | val |= 0x2 << BP_CLPCR_LPM; | ||
74 | break; | ||
75 | case WAIT_UNCLOCKED_POWER_OFF: | ||
76 | val |= 0x1 << BP_CLPCR_LPM; | ||
77 | val &= ~BM_CLPCR_VSTBY; | ||
78 | val &= ~BM_CLPCR_SBYOS; | ||
79 | break; | ||
80 | case STOP_POWER_OFF: | ||
81 | val |= 0x2 << BP_CLPCR_LPM; | ||
82 | val |= 0x3 << BP_CLPCR_STBY_COUNT; | ||
83 | val |= BM_CLPCR_VSTBY; | ||
84 | val |= BM_CLPCR_SBYOS; | ||
85 | break; | ||
86 | default: | ||
87 | return -EINVAL; | ||
88 | } | ||
89 | |||
90 | writel_relaxed(val, ccm_base + CLPCR); | ||
91 | |||
92 | return 0; | ||
93 | } | ||
94 | |||
95 | static const char *step_sels[] = { "osc", "pll2_pfd2_396m", }; | ||
96 | static const char *pll1_sw_sels[] = { "pll1_sys", "step", }; | ||
97 | static const char *periph_pre_sels[] = { "pll2_bus", "pll2_pfd2_396m", "pll2_pfd0_352m", "pll2_198m", }; | ||
98 | static const char *periph_clk2_sels[] = { "pll3_usb_otg", "osc", }; | ||
99 | static const char *periph_sels[] = { "periph_pre", "periph_clk2", }; | ||
100 | static const char *periph2_sels[] = { "periph2_pre", "periph2_clk2", }; | ||
101 | static const char *axi_sels[] = { "periph", "pll2_pfd2_396m", "pll3_pfd1_540m", }; | ||
102 | static const char *audio_sels[] = { "pll4_audio", "pll3_pfd2_508m", "pll3_pfd3_454m", "pll3_usb_otg", }; | ||
103 | static const char *gpu_axi_sels[] = { "axi", "ahb", }; | ||
104 | static const char *gpu2d_core_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd0_352m", "pll2_pfd2_396m", }; | ||
105 | static const char *gpu3d_core_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd2_396m", }; | ||
106 | static const char *gpu3d_shader_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd9_720m", }; | ||
107 | static const char *ipu_sels[] = { "mmdc_ch0_axi", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", }; | ||
108 | static const char *ldb_di_sels[] = { "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "mmdc_ch1_axi", "pll3_pfd1_540m", }; | ||
109 | static const char *ipu_di_pre_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", }; | ||
110 | static const char *ipu1_di0_sels[] = { "ipu1_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | ||
111 | static const char *ipu1_di1_sels[] = { "ipu1_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | ||
112 | static const char *ipu2_di0_sels[] = { "ipu2_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | ||
113 | static const char *ipu2_di1_sels[] = { "ipu2_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | ||
114 | static const char *hsi_tx_sels[] = { "pll3_120m", "pll2_pfd2_396m", }; | ||
115 | static const char *pcie_axi_sels[] = { "axi", "ahb", }; | ||
116 | static const char *ssi_sels[] = { "pll3_pfd2_508m", "pll3_pfd3_454m", "pll4_audio", }; | ||
117 | static const char *usdhc_sels[] = { "pll2_pfd2_396m", "pll2_pfd0_352m", }; | ||
118 | static const char *enfc_sels[] = { "pll2_pfd0_352m", "pll2_bus", "pll3_usb_otg", "pll2_pfd2_396m", }; | ||
119 | static const char *emi_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd2_396m", "pll2_pfd0_352m", }; | ||
120 | static const char *vdo_axi_sels[] = { "axi", "ahb", }; | ||
121 | static const char *vpu_axi_sels[] = { "axi", "pll2_pfd2_396m", "pll2_pfd0_352m", }; | ||
122 | static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5_video", | ||
123 | "dummy", "axi", "enfc", "ipu1_di0", "ipu1_di1", "ipu2_di0", | ||
124 | "ipu2_di1", "ahb", "ipg", "ipg_per", "ckil", "pll4_audio", }; | ||
125 | |||
126 | enum mx6q_clks { | ||
127 | dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m, | ||
128 | pll3_pfd0_720m, pll3_pfd1_540m, pll3_pfd2_508m, pll3_pfd3_454m, | ||
129 | pll2_198m, pll3_120m, pll3_80m, pll3_60m, twd, step, pll1_sw, | ||
130 | periph_pre, periph2_pre, periph_clk2_sel, periph2_clk2_sel, axi_sel, | ||
131 | esai_sel, asrc_sel, spdif_sel, gpu2d_axi, gpu3d_axi, gpu2d_core_sel, | ||
132 | gpu3d_core_sel, gpu3d_shader_sel, ipu1_sel, ipu2_sel, ldb_di0_sel, | ||
133 | ldb_di1_sel, ipu1_di0_pre_sel, ipu1_di1_pre_sel, ipu2_di0_pre_sel, | ||
134 | ipu2_di1_pre_sel, ipu1_di0_sel, ipu1_di1_sel, ipu2_di0_sel, | ||
135 | ipu2_di1_sel, hsi_tx_sel, pcie_axi_sel, ssi1_sel, ssi2_sel, ssi3_sel, | ||
136 | usdhc1_sel, usdhc2_sel, usdhc3_sel, usdhc4_sel, enfc_sel, emi_sel, | ||
137 | emi_slow_sel, vdo_axi_sel, vpu_axi_sel, cko1_sel, periph, periph2, | ||
138 | periph_clk2, periph2_clk2, ipg, ipg_per, esai_pred, esai_podf, | ||
139 | asrc_pred, asrc_podf, spdif_pred, spdif_podf, can_root, ecspi_root, | ||
140 | gpu2d_core_podf, gpu3d_core_podf, gpu3d_shader, ipu1_podf, ipu2_podf, | ||
141 | ldb_di0_podf, ldb_di1_podf, ipu1_di0_pre, ipu1_di1_pre, ipu2_di0_pre, | ||
142 | ipu2_di1_pre, hsi_tx_podf, ssi1_pred, ssi1_podf, ssi2_pred, ssi2_podf, | ||
143 | ssi3_pred, ssi3_podf, uart_serial_podf, usdhc1_podf, usdhc2_podf, | ||
144 | usdhc3_podf, usdhc4_podf, enfc_pred, enfc_podf, emi_podf, | ||
145 | emi_slow_podf, vpu_axi_podf, cko1_podf, axi, mmdc_ch0_axi_podf, | ||
146 | mmdc_ch1_axi_podf, arm, ahb, apbh_dma, asrc, can1_ipg, can1_serial, | ||
147 | can2_ipg, can2_serial, ecspi1, ecspi2, ecspi3, ecspi4, ecspi5, enet, | ||
148 | esai, gpt_ipg, gpt_ipg_per, gpu2d_core, gpu3d_core, hdmi_iahb, | ||
149 | hdmi_isfr, i2c1, i2c2, i2c3, iim, enfc, ipu1, ipu1_di0, ipu1_di1, ipu2, | ||
150 | ipu2_di0, ldb_di0, ldb_di1, ipu2_di1, hsi_tx, mlb, mmdc_ch0_axi, | ||
151 | mmdc_ch1_axi, ocram, openvg_axi, pcie_axi, pwm1, pwm2, pwm3, pwm4, per1_bch, | ||
152 | gpmi_bch_apb, gpmi_bch, gpmi_io, gpmi_apb, sata, sdma, spba, ssi1, | ||
153 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, | ||
154 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, | ||
155 | pll4_audio, pll5_video, pll8_mlb, pll7_usb_host, pll6_enet, ssi1_ipg, | ||
156 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, | ||
157 | sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, | ||
158 | clk_max | ||
159 | }; | ||
160 | |||
161 | static struct clk *clk[clk_max]; | ||
162 | static struct clk_onecell_data clk_data; | ||
163 | |||
164 | static enum mx6q_clks const clks_init_on[] __initconst = { | ||
165 | mmdc_ch0_axi, rom, | ||
166 | }; | ||
167 | |||
168 | static struct clk_div_table clk_enet_ref_table[] = { | ||
169 | { .val = 0, .div = 20, }, | ||
170 | { .val = 1, .div = 10, }, | ||
171 | { .val = 2, .div = 5, }, | ||
172 | { .val = 3, .div = 4, }, | ||
173 | }; | ||
174 | |||
175 | int __init mx6q_clocks_init(void) | ||
176 | { | ||
177 | struct device_node *np; | ||
178 | void __iomem *base; | ||
179 | int i, irq; | ||
180 | |||
181 | clk[dummy] = imx_clk_fixed("dummy", 0); | ||
182 | |||
183 | /* retrieve the freqency of fixed clocks from device tree */ | ||
184 | for_each_compatible_node(np, NULL, "fixed-clock") { | ||
185 | u32 rate; | ||
186 | if (of_property_read_u32(np, "clock-frequency", &rate)) | ||
187 | continue; | ||
188 | |||
189 | if (of_device_is_compatible(np, "fsl,imx-ckil")) | ||
190 | clk[ckil] = imx_clk_fixed("ckil", rate); | ||
191 | else if (of_device_is_compatible(np, "fsl,imx-ckih1")) | ||
192 | clk[ckih] = imx_clk_fixed("ckih", rate); | ||
193 | else if (of_device_is_compatible(np, "fsl,imx-osc")) | ||
194 | clk[osc] = imx_clk_fixed("osc", rate); | ||
195 | } | ||
196 | |||
197 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); | ||
198 | base = of_iomap(np, 0); | ||
199 | WARN_ON(!base); | ||
200 | |||
201 | /* type name parent_name base div_mask */ | ||
202 | clk[pll1_sys] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f); | ||
203 | clk[pll2_bus] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x1); | ||
204 | clk[pll3_usb_otg] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3_usb_otg", "osc", base + 0x10, 0x3); | ||
205 | clk[pll4_audio] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4_audio", "osc", base + 0x70, 0x7f); | ||
206 | clk[pll5_video] = imx_clk_pllv3(IMX_PLLV3_AV, "pll5_video", "osc", base + 0xa0, 0x7f); | ||
207 | clk[pll6_enet] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll6_enet", "osc", base + 0xe0, 0x3); | ||
208 | clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_usb_host","osc", base + 0x20, 0x3); | ||
209 | clk[pll8_mlb] = imx_clk_pllv3(IMX_PLLV3_MLB, "pll8_mlb", "osc", base + 0xd0, 0x0); | ||
210 | |||
211 | clk[usbphy1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 6); | ||
212 | clk[usbphy2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 6); | ||
213 | |||
214 | clk[sata_ref] = imx_clk_fixed_factor("sata_ref", "pll6_enet", 1, 5); | ||
215 | clk[pcie_ref] = imx_clk_fixed_factor("pcie_ref", "pll6_enet", 1, 4); | ||
216 | |||
217 | clk[sata_ref_100m] = imx_clk_gate("sata_ref_100m", "sata_ref", base + 0xe0, 20); | ||
218 | clk[pcie_ref_125m] = imx_clk_gate("pcie_ref_125m", "pcie_ref", base + 0xe0, 19); | ||
219 | |||
220 | clk[enet_ref] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0, | ||
221 | base + 0xe0, 0, 2, 0, clk_enet_ref_table, | ||
222 | &imx_ccm_lock); | ||
223 | |||
224 | /* name parent_name reg idx */ | ||
225 | clk[pll2_pfd0_352m] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0); | ||
226 | clk[pll2_pfd1_594m] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus", base + 0x100, 1); | ||
227 | clk[pll2_pfd2_396m] = imx_clk_pfd("pll2_pfd2_396m", "pll2_bus", base + 0x100, 2); | ||
228 | clk[pll3_pfd0_720m] = imx_clk_pfd("pll3_pfd0_720m", "pll3_usb_otg", base + 0xf0, 0); | ||
229 | clk[pll3_pfd1_540m] = imx_clk_pfd("pll3_pfd1_540m", "pll3_usb_otg", base + 0xf0, 1); | ||
230 | clk[pll3_pfd2_508m] = imx_clk_pfd("pll3_pfd2_508m", "pll3_usb_otg", base + 0xf0, 2); | ||
231 | clk[pll3_pfd3_454m] = imx_clk_pfd("pll3_pfd3_454m", "pll3_usb_otg", base + 0xf0, 3); | ||
232 | |||
233 | /* name parent_name mult div */ | ||
234 | clk[pll2_198m] = imx_clk_fixed_factor("pll2_198m", "pll2_pfd2_396m", 1, 2); | ||
235 | clk[pll3_120m] = imx_clk_fixed_factor("pll3_120m", "pll3_usb_otg", 1, 4); | ||
236 | clk[pll3_80m] = imx_clk_fixed_factor("pll3_80m", "pll3_usb_otg", 1, 6); | ||
237 | clk[pll3_60m] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8); | ||
238 | clk[twd] = imx_clk_fixed_factor("twd", "arm", 1, 2); | ||
239 | |||
240 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-ccm"); | ||
241 | base = of_iomap(np, 0); | ||
242 | WARN_ON(!base); | ||
243 | ccm_base = base; | ||
244 | |||
245 | /* name reg shift width parent_names num_parents */ | ||
246 | clk[step] = imx_clk_mux("step", base + 0xc, 8, 1, step_sels, ARRAY_SIZE(step_sels)); | ||
247 | clk[pll1_sw] = imx_clk_mux("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels)); | ||
248 | clk[periph_pre] = imx_clk_mux("periph_pre", base + 0x18, 18, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels)); | ||
249 | clk[periph2_pre] = imx_clk_mux("periph2_pre", base + 0x18, 21, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels)); | ||
250 | clk[periph_clk2_sel] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 1, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels)); | ||
251 | clk[periph2_clk2_sel] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels)); | ||
252 | clk[axi_sel] = imx_clk_mux("axi_sel", base + 0x14, 6, 2, axi_sels, ARRAY_SIZE(axi_sels)); | ||
253 | clk[esai_sel] = imx_clk_mux("esai_sel", base + 0x20, 19, 2, audio_sels, ARRAY_SIZE(audio_sels)); | ||
254 | clk[asrc_sel] = imx_clk_mux("asrc_sel", base + 0x30, 7, 2, audio_sels, ARRAY_SIZE(audio_sels)); | ||
255 | clk[spdif_sel] = imx_clk_mux("spdif_sel", base + 0x30, 20, 2, audio_sels, ARRAY_SIZE(audio_sels)); | ||
256 | clk[gpu2d_axi] = imx_clk_mux("gpu2d_axi", base + 0x18, 0, 1, gpu_axi_sels, ARRAY_SIZE(gpu_axi_sels)); | ||
257 | clk[gpu3d_axi] = imx_clk_mux("gpu3d_axi", base + 0x18, 1, 1, gpu_axi_sels, ARRAY_SIZE(gpu_axi_sels)); | ||
258 | clk[gpu2d_core_sel] = imx_clk_mux("gpu2d_core_sel", base + 0x18, 16, 2, gpu2d_core_sels, ARRAY_SIZE(gpu2d_core_sels)); | ||
259 | clk[gpu3d_core_sel] = imx_clk_mux("gpu3d_core_sel", base + 0x18, 4, 2, gpu3d_core_sels, ARRAY_SIZE(gpu3d_core_sels)); | ||
260 | clk[gpu3d_shader_sel] = imx_clk_mux("gpu3d_shader_sel", base + 0x18, 8, 2, gpu3d_shader_sels, ARRAY_SIZE(gpu3d_shader_sels)); | ||
261 | clk[ipu1_sel] = imx_clk_mux("ipu1_sel", base + 0x3c, 9, 2, ipu_sels, ARRAY_SIZE(ipu_sels)); | ||
262 | clk[ipu2_sel] = imx_clk_mux("ipu2_sel", base + 0x3c, 14, 2, ipu_sels, ARRAY_SIZE(ipu_sels)); | ||
263 | clk[ldb_di0_sel] = imx_clk_mux("ldb_di0_sel", base + 0x2c, 9, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels)); | ||
264 | clk[ldb_di1_sel] = imx_clk_mux("ldb_di1_sel", base + 0x2c, 12, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels)); | ||
265 | clk[ipu1_di0_pre_sel] = imx_clk_mux("ipu1_di0_pre_sel", base + 0x34, 6, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels)); | ||
266 | clk[ipu1_di1_pre_sel] = imx_clk_mux("ipu1_di1_pre_sel", base + 0x34, 15, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels)); | ||
267 | clk[ipu2_di0_pre_sel] = imx_clk_mux("ipu2_di0_pre_sel", base + 0x38, 6, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels)); | ||
268 | clk[ipu2_di1_pre_sel] = imx_clk_mux("ipu2_di1_pre_sel", base + 0x38, 15, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels)); | ||
269 | clk[ipu1_di0_sel] = imx_clk_mux("ipu1_di0_sel", base + 0x34, 0, 3, ipu1_di0_sels, ARRAY_SIZE(ipu1_di0_sels)); | ||
270 | clk[ipu1_di1_sel] = imx_clk_mux("ipu1_di1_sel", base + 0x34, 9, 3, ipu1_di1_sels, ARRAY_SIZE(ipu1_di1_sels)); | ||
271 | clk[ipu2_di0_sel] = imx_clk_mux("ipu2_di0_sel", base + 0x38, 0, 3, ipu2_di0_sels, ARRAY_SIZE(ipu2_di0_sels)); | ||
272 | clk[ipu2_di1_sel] = imx_clk_mux("ipu2_di1_sel", base + 0x38, 9, 3, ipu2_di1_sels, ARRAY_SIZE(ipu2_di1_sels)); | ||
273 | clk[hsi_tx_sel] = imx_clk_mux("hsi_tx_sel", base + 0x30, 28, 1, hsi_tx_sels, ARRAY_SIZE(hsi_tx_sels)); | ||
274 | clk[pcie_axi_sel] = imx_clk_mux("pcie_axi_sel", base + 0x18, 10, 1, pcie_axi_sels, ARRAY_SIZE(pcie_axi_sels)); | ||
275 | clk[ssi1_sel] = imx_clk_mux("ssi1_sel", base + 0x1c, 10, 2, ssi_sels, ARRAY_SIZE(ssi_sels)); | ||
276 | clk[ssi2_sel] = imx_clk_mux("ssi2_sel", base + 0x1c, 12, 2, ssi_sels, ARRAY_SIZE(ssi_sels)); | ||
277 | clk[ssi3_sel] = imx_clk_mux("ssi3_sel", base + 0x1c, 14, 2, ssi_sels, ARRAY_SIZE(ssi_sels)); | ||
278 | clk[usdhc1_sel] = imx_clk_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); | ||
279 | clk[usdhc2_sel] = imx_clk_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); | ||
280 | clk[usdhc3_sel] = imx_clk_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); | ||
281 | clk[usdhc4_sel] = imx_clk_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); | ||
282 | clk[enfc_sel] = imx_clk_mux("enfc_sel", base + 0x2c, 16, 2, enfc_sels, ARRAY_SIZE(enfc_sels)); | ||
283 | clk[emi_sel] = imx_clk_mux("emi_sel", base + 0x1c, 27, 2, emi_sels, ARRAY_SIZE(emi_sels)); | ||
284 | clk[emi_slow_sel] = imx_clk_mux("emi_slow_sel", base + 0x1c, 29, 2, emi_sels, ARRAY_SIZE(emi_sels)); | ||
285 | clk[vdo_axi_sel] = imx_clk_mux("vdo_axi_sel", base + 0x18, 11, 1, vdo_axi_sels, ARRAY_SIZE(vdo_axi_sels)); | ||
286 | clk[vpu_axi_sel] = imx_clk_mux("vpu_axi_sel", base + 0x18, 14, 2, vpu_axi_sels, ARRAY_SIZE(vpu_axi_sels)); | ||
287 | clk[cko1_sel] = imx_clk_mux("cko1_sel", base + 0x60, 0, 4, cko1_sels, ARRAY_SIZE(cko1_sels)); | ||
288 | |||
289 | /* name reg shift width busy: reg, shift parent_names num_parents */ | ||
290 | clk[periph] = imx_clk_busy_mux("periph", base + 0x14, 25, 1, base + 0x48, 5, periph_sels, ARRAY_SIZE(periph_sels)); | ||
291 | clk[periph2] = imx_clk_busy_mux("periph2", base + 0x14, 26, 1, base + 0x48, 3, periph2_sels, ARRAY_SIZE(periph2_sels)); | ||
292 | |||
293 | /* name parent_name reg shift width */ | ||
294 | clk[periph_clk2] = imx_clk_divider("periph_clk2", "periph_clk2_sel", base + 0x14, 27, 3); | ||
295 | clk[periph2_clk2] = imx_clk_divider("periph2_clk2", "periph2_clk2_sel", base + 0x14, 0, 3); | ||
296 | clk[ipg] = imx_clk_divider("ipg", "ahb", base + 0x14, 8, 2); | ||
297 | clk[ipg_per] = imx_clk_divider("ipg_per", "ipg", base + 0x1c, 0, 6); | ||
298 | clk[esai_pred] = imx_clk_divider("esai_pred", "esai_sel", base + 0x28, 9, 3); | ||
299 | clk[esai_podf] = imx_clk_divider("esai_podf", "esai_pred", base + 0x28, 25, 3); | ||
300 | clk[asrc_pred] = imx_clk_divider("asrc_pred", "asrc_sel", base + 0x30, 12, 3); | ||
301 | clk[asrc_podf] = imx_clk_divider("asrc_podf", "asrc_pred", base + 0x30, 9, 3); | ||
302 | clk[spdif_pred] = imx_clk_divider("spdif_pred", "spdif_sel", base + 0x30, 25, 3); | ||
303 | clk[spdif_podf] = imx_clk_divider("spdif_podf", "spdif_pred", base + 0x30, 22, 3); | ||
304 | clk[can_root] = imx_clk_divider("can_root", "pll3_usb_otg", base + 0x20, 2, 6); | ||
305 | clk[ecspi_root] = imx_clk_divider("ecspi_root", "pll3_60m", base + 0x38, 19, 6); | ||
306 | clk[gpu2d_core_podf] = imx_clk_divider("gpu2d_core_podf", "gpu2d_core_sel", base + 0x18, 23, 3); | ||
307 | clk[gpu3d_core_podf] = imx_clk_divider("gpu3d_core_podf", "gpu3d_core_sel", base + 0x18, 26, 3); | ||
308 | clk[gpu3d_shader] = imx_clk_divider("gpu3d_shader", "gpu3d_shader_sel", base + 0x18, 29, 3); | ||
309 | clk[ipu1_podf] = imx_clk_divider("ipu1_podf", "ipu1_sel", base + 0x3c, 11, 3); | ||
310 | clk[ipu2_podf] = imx_clk_divider("ipu2_podf", "ipu2_sel", base + 0x3c, 16, 3); | ||
311 | clk[ldb_di0_div_3_5] = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7); | ||
312 | clk[ldb_di0_podf] = imx_clk_divider("ldb_di0_podf", "ldb_di0_div_3_5", base + 0x20, 10, 1); | ||
313 | clk[ldb_di1_div_3_5] = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7); | ||
314 | clk[ldb_di1_podf] = imx_clk_divider("ldb_di1_podf", "ldb_di1_div_3_5", base + 0x20, 11, 1); | ||
315 | clk[ipu1_di0_pre] = imx_clk_divider("ipu1_di0_pre", "ipu1_di0_pre_sel", base + 0x34, 3, 3); | ||
316 | clk[ipu1_di1_pre] = imx_clk_divider("ipu1_di1_pre", "ipu1_di1_pre_sel", base + 0x34, 12, 3); | ||
317 | clk[ipu2_di0_pre] = imx_clk_divider("ipu2_di0_pre", "ipu2_di0_pre_sel", base + 0x38, 3, 3); | ||
318 | clk[ipu2_di1_pre] = imx_clk_divider("ipu2_di1_pre", "ipu2_di1_pre_sel", base + 0x38, 12, 3); | ||
319 | clk[hsi_tx_podf] = imx_clk_divider("hsi_tx_podf", "hsi_tx_sel", base + 0x30, 29, 3); | ||
320 | clk[ssi1_pred] = imx_clk_divider("ssi1_pred", "ssi1_sel", base + 0x28, 6, 3); | ||
321 | clk[ssi1_podf] = imx_clk_divider("ssi1_podf", "ssi1_pred", base + 0x28, 0, 6); | ||
322 | clk[ssi2_pred] = imx_clk_divider("ssi2_pred", "ssi2_sel", base + 0x2c, 6, 3); | ||
323 | clk[ssi2_podf] = imx_clk_divider("ssi2_podf", "ssi2_pred", base + 0x2c, 0, 6); | ||
324 | clk[ssi3_pred] = imx_clk_divider("ssi3_pred", "ssi3_sel", base + 0x28, 22, 3); | ||
325 | clk[ssi3_podf] = imx_clk_divider("ssi3_podf", "ssi3_pred", base + 0x28, 16, 6); | ||
326 | clk[uart_serial_podf] = imx_clk_divider("uart_serial_podf", "pll3_80m", base + 0x24, 0, 6); | ||
327 | clk[usdhc1_podf] = imx_clk_divider("usdhc1_podf", "usdhc1_sel", base + 0x24, 11, 3); | ||
328 | clk[usdhc2_podf] = imx_clk_divider("usdhc2_podf", "usdhc2_sel", base + 0x24, 16, 3); | ||
329 | clk[usdhc3_podf] = imx_clk_divider("usdhc3_podf", "usdhc3_sel", base + 0x24, 19, 3); | ||
330 | clk[usdhc4_podf] = imx_clk_divider("usdhc4_podf", "usdhc4_sel", base + 0x24, 22, 3); | ||
331 | clk[enfc_pred] = imx_clk_divider("enfc_pred", "enfc_sel", base + 0x2c, 18, 3); | ||
332 | clk[enfc_podf] = imx_clk_divider("enfc_podf", "enfc_pred", base + 0x2c, 21, 6); | ||
333 | clk[emi_podf] = imx_clk_divider("emi_podf", "emi_sel", base + 0x1c, 20, 3); | ||
334 | clk[emi_slow_podf] = imx_clk_divider("emi_slow_podf", "emi_slow_sel", base + 0x1c, 23, 3); | ||
335 | clk[vpu_axi_podf] = imx_clk_divider("vpu_axi_podf", "vpu_axi_sel", base + 0x24, 25, 3); | ||
336 | clk[cko1_podf] = imx_clk_divider("cko1_podf", "cko1_sel", base + 0x60, 4, 3); | ||
337 | |||
338 | /* name parent_name reg shift width busy: reg, shift */ | ||
339 | clk[axi] = imx_clk_busy_divider("axi", "axi_sel", base + 0x14, 16, 3, base + 0x48, 0); | ||
340 | clk[mmdc_ch0_axi_podf] = imx_clk_busy_divider("mmdc_ch0_axi_podf", "periph", base + 0x14, 19, 3, base + 0x48, 4); | ||
341 | clk[mmdc_ch1_axi_podf] = imx_clk_busy_divider("mmdc_ch1_axi_podf", "periph2", base + 0x14, 3, 3, base + 0x48, 2); | ||
342 | clk[arm] = imx_clk_busy_divider("arm", "pll1_sw", base + 0x10, 0, 3, base + 0x48, 16); | ||
343 | clk[ahb] = imx_clk_busy_divider("ahb", "periph", base + 0x14, 10, 3, base + 0x48, 1); | ||
344 | |||
345 | /* name parent_name reg shift */ | ||
346 | clk[apbh_dma] = imx_clk_gate2("apbh_dma", "usdhc3", base + 0x68, 4); | ||
347 | clk[asrc] = imx_clk_gate2("asrc", "asrc_podf", base + 0x68, 6); | ||
348 | clk[can1_ipg] = imx_clk_gate2("can1_ipg", "ipg", base + 0x68, 14); | ||
349 | clk[can1_serial] = imx_clk_gate2("can1_serial", "can_root", base + 0x68, 16); | ||
350 | clk[can2_ipg] = imx_clk_gate2("can2_ipg", "ipg", base + 0x68, 18); | ||
351 | clk[can2_serial] = imx_clk_gate2("can2_serial", "can_root", base + 0x68, 20); | ||
352 | clk[ecspi1] = imx_clk_gate2("ecspi1", "ecspi_root", base + 0x6c, 0); | ||
353 | clk[ecspi2] = imx_clk_gate2("ecspi2", "ecspi_root", base + 0x6c, 2); | ||
354 | clk[ecspi3] = imx_clk_gate2("ecspi3", "ecspi_root", base + 0x6c, 4); | ||
355 | clk[ecspi4] = imx_clk_gate2("ecspi4", "ecspi_root", base + 0x6c, 6); | ||
356 | clk[ecspi5] = imx_clk_gate2("ecspi5", "ecspi_root", base + 0x6c, 8); | ||
357 | clk[enet] = imx_clk_gate2("enet", "ipg", base + 0x6c, 10); | ||
358 | clk[esai] = imx_clk_gate2("esai", "esai_podf", base + 0x6c, 16); | ||
359 | clk[gpt_ipg] = imx_clk_gate2("gpt_ipg", "ipg", base + 0x6c, 20); | ||
360 | clk[gpt_ipg_per] = imx_clk_gate2("gpt_ipg_per", "ipg_per", base + 0x6c, 22); | ||
361 | clk[gpu2d_core] = imx_clk_gate2("gpu2d_core", "gpu2d_core_podf", base + 0x6c, 24); | ||
362 | clk[gpu3d_core] = imx_clk_gate2("gpu3d_core", "gpu3d_core_podf", base + 0x6c, 26); | ||
363 | clk[hdmi_iahb] = imx_clk_gate2("hdmi_iahb", "ahb", base + 0x70, 0); | ||
364 | clk[hdmi_isfr] = imx_clk_gate2("hdmi_isfr", "pll3_pfd1_540m", base + 0x70, 4); | ||
365 | clk[i2c1] = imx_clk_gate2("i2c1", "ipg_per", base + 0x70, 6); | ||
366 | clk[i2c2] = imx_clk_gate2("i2c2", "ipg_per", base + 0x70, 8); | ||
367 | clk[i2c3] = imx_clk_gate2("i2c3", "ipg_per", base + 0x70, 10); | ||
368 | clk[iim] = imx_clk_gate2("iim", "ipg", base + 0x70, 12); | ||
369 | clk[enfc] = imx_clk_gate2("enfc", "enfc_podf", base + 0x70, 14); | ||
370 | clk[ipu1] = imx_clk_gate2("ipu1", "ipu1_podf", base + 0x74, 0); | ||
371 | clk[ipu1_di0] = imx_clk_gate2("ipu1_di0", "ipu1_di0_sel", base + 0x74, 2); | ||
372 | clk[ipu1_di1] = imx_clk_gate2("ipu1_di1", "ipu1_di1_sel", base + 0x74, 4); | ||
373 | clk[ipu2] = imx_clk_gate2("ipu2", "ipu2_podf", base + 0x74, 6); | ||
374 | clk[ipu2_di0] = imx_clk_gate2("ipu2_di0", "ipu2_di0_sel", base + 0x74, 8); | ||
375 | clk[ldb_di0] = imx_clk_gate2("ldb_di0", "ldb_di0_podf", base + 0x74, 12); | ||
376 | clk[ldb_di1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); | ||
377 | clk[ipu2_di1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); | ||
378 | clk[hsi_tx] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16); | ||
379 | clk[mlb] = imx_clk_gate2("mlb", "pll8_mlb", base + 0x74, 18); | ||
380 | clk[mmdc_ch0_axi] = imx_clk_gate2("mmdc_ch0_axi", "mmdc_ch0_axi_podf", base + 0x74, 20); | ||
381 | clk[mmdc_ch1_axi] = imx_clk_gate2("mmdc_ch1_axi", "mmdc_ch1_axi_podf", base + 0x74, 22); | ||
382 | clk[ocram] = imx_clk_gate2("ocram", "ahb", base + 0x74, 28); | ||
383 | clk[openvg_axi] = imx_clk_gate2("openvg_axi", "axi", base + 0x74, 30); | ||
384 | clk[pcie_axi] = imx_clk_gate2("pcie_axi", "pcie_axi_sel", base + 0x78, 0); | ||
385 | clk[per1_bch] = imx_clk_gate2("per1_bch", "usdhc3", base + 0x78, 12); | ||
386 | clk[pwm1] = imx_clk_gate2("pwm1", "ipg_per", base + 0x78, 16); | ||
387 | clk[pwm2] = imx_clk_gate2("pwm2", "ipg_per", base + 0x78, 18); | ||
388 | clk[pwm3] = imx_clk_gate2("pwm3", "ipg_per", base + 0x78, 20); | ||
389 | clk[pwm4] = imx_clk_gate2("pwm4", "ipg_per", base + 0x78, 22); | ||
390 | clk[gpmi_bch_apb] = imx_clk_gate2("gpmi_bch_apb", "usdhc3", base + 0x78, 24); | ||
391 | clk[gpmi_bch] = imx_clk_gate2("gpmi_bch", "usdhc4", base + 0x78, 26); | ||
392 | clk[gpmi_io] = imx_clk_gate2("gpmi_io", "enfc", base + 0x78, 28); | ||
393 | clk[gpmi_apb] = imx_clk_gate2("gpmi_apb", "usdhc3", base + 0x78, 30); | ||
394 | clk[rom] = imx_clk_gate2("rom", "ahb", base + 0x7c, 0); | ||
395 | clk[sata] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4); | ||
396 | clk[sdma] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); | ||
397 | clk[spba] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); | ||
398 | clk[ssi1_ipg] = imx_clk_gate2("ssi1_ipg", "ipg", base + 0x7c, 18); | ||
399 | clk[ssi2_ipg] = imx_clk_gate2("ssi2_ipg", "ipg", base + 0x7c, 20); | ||
400 | clk[ssi3_ipg] = imx_clk_gate2("ssi3_ipg", "ipg", base + 0x7c, 22); | ||
401 | clk[uart_ipg] = imx_clk_gate2("uart_ipg", "ipg", base + 0x7c, 24); | ||
402 | clk[uart_serial] = imx_clk_gate2("uart_serial", "uart_serial_podf", base + 0x7c, 26); | ||
403 | clk[usboh3] = imx_clk_gate2("usboh3", "ipg", base + 0x80, 0); | ||
404 | clk[usdhc1] = imx_clk_gate2("usdhc1", "usdhc1_podf", base + 0x80, 2); | ||
405 | clk[usdhc2] = imx_clk_gate2("usdhc2", "usdhc2_podf", base + 0x80, 4); | ||
406 | clk[usdhc3] = imx_clk_gate2("usdhc3", "usdhc3_podf", base + 0x80, 6); | ||
407 | clk[usdhc4] = imx_clk_gate2("usdhc4", "usdhc4_podf", base + 0x80, 8); | ||
408 | clk[vdo_axi] = imx_clk_gate2("vdo_axi", "vdo_axi_sel", base + 0x80, 12); | ||
409 | clk[vpu_axi] = imx_clk_gate2("vpu_axi", "vpu_axi_podf", base + 0x80, 14); | ||
410 | clk[cko1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7); | ||
411 | |||
412 | for (i = 0; i < ARRAY_SIZE(clk); i++) | ||
413 | if (IS_ERR(clk[i])) | ||
414 | pr_err("i.MX6q clk %d: register failed with %ld\n", | ||
415 | i, PTR_ERR(clk[i])); | ||
416 | |||
417 | clk_data.clks = clk; | ||
418 | clk_data.clk_num = ARRAY_SIZE(clk); | ||
419 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
420 | |||
421 | clk_register_clkdev(clk[gpt_ipg], "ipg", "imx-gpt.0"); | ||
422 | clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); | ||
423 | clk_register_clkdev(clk[twd], NULL, "smp_twd"); | ||
424 | clk_register_clkdev(clk[cko1_sel], "cko1_sel", NULL); | ||
425 | clk_register_clkdev(clk[ahb], "ahb", NULL); | ||
426 | clk_register_clkdev(clk[cko1], "cko1", NULL); | ||
427 | clk_register_clkdev(clk[arm], NULL, "cpu0"); | ||
428 | |||
429 | /* | ||
430 | * The gpmi needs 100MHz frequency in the EDO/Sync mode, | ||
431 | * We can not get the 100MHz from the pll2_pfd0_352m. | ||
432 | * So choose pll2_pfd2_396m as enfc_sel's parent. | ||
433 | */ | ||
434 | clk_set_parent(clk[enfc_sel], clk[pll2_pfd2_396m]); | ||
435 | |||
436 | for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) | ||
437 | clk_prepare_enable(clk[clks_init_on[i]]); | ||
438 | |||
439 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); | ||
440 | base = of_iomap(np, 0); | ||
441 | WARN_ON(!base); | ||
442 | irq = irq_of_parse_and_map(np, 0); | ||
443 | mxc_timer_init(base, irq); | ||
444 | |||
445 | return 0; | ||
446 | } | ||
diff --git a/arch/arm/mach-imx/clk-pfd.c b/arch/arm/mach-imx/clk-pfd.c deleted file mode 100644 index e2ed4160f32..00000000000 --- a/arch/arm/mach-imx/clk-pfd.c +++ /dev/null | |||
@@ -1,147 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2012 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/clk.h> | ||
14 | #include <linux/clk-provider.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/slab.h> | ||
17 | #include <linux/err.h> | ||
18 | #include "clk.h" | ||
19 | |||
20 | /** | ||
21 | * struct clk_pfd - IMX PFD clock | ||
22 | * @clk_hw: clock source | ||
23 | * @reg: PFD register address | ||
24 | * @idx: the index of PFD encoded in the register | ||
25 | * | ||
26 | * PFD clock found on i.MX6 series. Each register for PFD has 4 clk_pfd | ||
27 | * data encoded, and member idx is used to specify the one. And each | ||
28 | * register has SET, CLR and TOG registers at offset 0x4 0x8 and 0xc. | ||
29 | */ | ||
30 | struct clk_pfd { | ||
31 | struct clk_hw hw; | ||
32 | void __iomem *reg; | ||
33 | u8 idx; | ||
34 | }; | ||
35 | |||
36 | #define to_clk_pfd(_hw) container_of(_hw, struct clk_pfd, hw) | ||
37 | |||
38 | #define SET 0x4 | ||
39 | #define CLR 0x8 | ||
40 | #define OTG 0xc | ||
41 | |||
42 | static int clk_pfd_enable(struct clk_hw *hw) | ||
43 | { | ||
44 | struct clk_pfd *pfd = to_clk_pfd(hw); | ||
45 | |||
46 | writel_relaxed(1 << ((pfd->idx + 1) * 8 - 1), pfd->reg + CLR); | ||
47 | |||
48 | return 0; | ||
49 | } | ||
50 | |||
51 | static void clk_pfd_disable(struct clk_hw *hw) | ||
52 | { | ||
53 | struct clk_pfd *pfd = to_clk_pfd(hw); | ||
54 | |||
55 | writel_relaxed(1 << ((pfd->idx + 1) * 8 - 1), pfd->reg + SET); | ||
56 | } | ||
57 | |||
58 | static unsigned long clk_pfd_recalc_rate(struct clk_hw *hw, | ||
59 | unsigned long parent_rate) | ||
60 | { | ||
61 | struct clk_pfd *pfd = to_clk_pfd(hw); | ||
62 | u64 tmp = parent_rate; | ||
63 | u8 frac = (readl_relaxed(pfd->reg) >> (pfd->idx * 8)) & 0x3f; | ||
64 | |||
65 | tmp *= 18; | ||
66 | do_div(tmp, frac); | ||
67 | |||
68 | return tmp; | ||
69 | } | ||
70 | |||
71 | static long clk_pfd_round_rate(struct clk_hw *hw, unsigned long rate, | ||
72 | unsigned long *prate) | ||
73 | { | ||
74 | u64 tmp = *prate; | ||
75 | u8 frac; | ||
76 | |||
77 | tmp = tmp * 18 + rate / 2; | ||
78 | do_div(tmp, rate); | ||
79 | frac = tmp; | ||
80 | if (frac < 12) | ||
81 | frac = 12; | ||
82 | else if (frac > 35) | ||
83 | frac = 35; | ||
84 | tmp = *prate; | ||
85 | tmp *= 18; | ||
86 | do_div(tmp, frac); | ||
87 | |||
88 | return tmp; | ||
89 | } | ||
90 | |||
91 | static int clk_pfd_set_rate(struct clk_hw *hw, unsigned long rate, | ||
92 | unsigned long parent_rate) | ||
93 | { | ||
94 | struct clk_pfd *pfd = to_clk_pfd(hw); | ||
95 | u64 tmp = parent_rate; | ||
96 | u8 frac; | ||
97 | |||
98 | tmp = tmp * 18 + rate / 2; | ||
99 | do_div(tmp, rate); | ||
100 | frac = tmp; | ||
101 | if (frac < 12) | ||
102 | frac = 12; | ||
103 | else if (frac > 35) | ||
104 | frac = 35; | ||
105 | |||
106 | writel_relaxed(0x3f << (pfd->idx * 8), pfd->reg + CLR); | ||
107 | writel_relaxed(frac << (pfd->idx * 8), pfd->reg + SET); | ||
108 | |||
109 | return 0; | ||
110 | } | ||
111 | |||
112 | static const struct clk_ops clk_pfd_ops = { | ||
113 | .enable = clk_pfd_enable, | ||
114 | .disable = clk_pfd_disable, | ||
115 | .recalc_rate = clk_pfd_recalc_rate, | ||
116 | .round_rate = clk_pfd_round_rate, | ||
117 | .set_rate = clk_pfd_set_rate, | ||
118 | }; | ||
119 | |||
120 | struct clk *imx_clk_pfd(const char *name, const char *parent_name, | ||
121 | void __iomem *reg, u8 idx) | ||
122 | { | ||
123 | struct clk_pfd *pfd; | ||
124 | struct clk *clk; | ||
125 | struct clk_init_data init; | ||
126 | |||
127 | pfd = kzalloc(sizeof(*pfd), GFP_KERNEL); | ||
128 | if (!pfd) | ||
129 | return ERR_PTR(-ENOMEM); | ||
130 | |||
131 | pfd->reg = reg; | ||
132 | pfd->idx = idx; | ||
133 | |||
134 | init.name = name; | ||
135 | init.ops = &clk_pfd_ops; | ||
136 | init.flags = 0; | ||
137 | init.parent_names = &parent_name; | ||
138 | init.num_parents = 1; | ||
139 | |||
140 | pfd->hw.init = &init; | ||
141 | |||
142 | clk = clk_register(NULL, &pfd->hw); | ||
143 | if (IS_ERR(clk)) | ||
144 | kfree(pfd); | ||
145 | |||
146 | return clk; | ||
147 | } | ||
diff --git a/arch/arm/mach-imx/clk-pllv1.c b/arch/arm/mach-imx/clk-pllv1.c deleted file mode 100644 index abff350ba24..00000000000 --- a/arch/arm/mach-imx/clk-pllv1.c +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | #include <linux/clk.h> | ||
2 | #include <linux/clk-provider.h> | ||
3 | #include <linux/io.h> | ||
4 | #include <linux/slab.h> | ||
5 | #include <linux/kernel.h> | ||
6 | #include <linux/err.h> | ||
7 | |||
8 | #include "clk.h" | ||
9 | #include "common.h" | ||
10 | #include "hardware.h" | ||
11 | |||
12 | /** | ||
13 | * pll v1 | ||
14 | * | ||
15 | * @clk_hw clock source | ||
16 | * @parent the parent clock name | ||
17 | * @base base address of pll registers | ||
18 | * | ||
19 | * PLL clock version 1, found on i.MX1/21/25/27/31/35 | ||
20 | */ | ||
21 | struct clk_pllv1 { | ||
22 | struct clk_hw hw; | ||
23 | void __iomem *base; | ||
24 | }; | ||
25 | |||
26 | #define to_clk_pllv1(clk) (container_of(clk, struct clk_pllv1, clk)) | ||
27 | |||
28 | static unsigned long clk_pllv1_recalc_rate(struct clk_hw *hw, | ||
29 | unsigned long parent_rate) | ||
30 | { | ||
31 | struct clk_pllv1 *pll = to_clk_pllv1(hw); | ||
32 | long long ll; | ||
33 | int mfn_abs; | ||
34 | unsigned int mfi, mfn, mfd, pd; | ||
35 | u32 reg; | ||
36 | unsigned long rate; | ||
37 | |||
38 | reg = readl(pll->base); | ||
39 | |||
40 | /* | ||
41 | * Get the resulting clock rate from a PLL register value and the input | ||
42 | * frequency. PLLs with this register layout can be found on i.MX1, | ||
43 | * i.MX21, i.MX27 and i,MX31 | ||
44 | * | ||
45 | * mfi + mfn / (mfd + 1) | ||
46 | * f = 2 * f_ref * -------------------- | ||
47 | * pd + 1 | ||
48 | */ | ||
49 | |||
50 | mfi = (reg >> 10) & 0xf; | ||
51 | mfn = reg & 0x3ff; | ||
52 | mfd = (reg >> 16) & 0x3ff; | ||
53 | pd = (reg >> 26) & 0xf; | ||
54 | |||
55 | mfi = mfi <= 5 ? 5 : mfi; | ||
56 | |||
57 | mfn_abs = mfn; | ||
58 | |||
59 | /* | ||
60 | * On all i.MXs except i.MX1 and i.MX21 mfn is a 10bit | ||
61 | * 2's complements number | ||
62 | */ | ||
63 | if (!cpu_is_mx1() && !cpu_is_mx21() && mfn >= 0x200) | ||
64 | mfn_abs = 0x400 - mfn; | ||
65 | |||
66 | rate = parent_rate * 2; | ||
67 | rate /= pd + 1; | ||
68 | |||
69 | ll = (unsigned long long)rate * mfn_abs; | ||
70 | |||
71 | do_div(ll, mfd + 1); | ||
72 | |||
73 | if (!cpu_is_mx1() && !cpu_is_mx21() && mfn >= 0x200) | ||
74 | ll = -ll; | ||
75 | |||
76 | ll = (rate * mfi) + ll; | ||
77 | |||
78 | return ll; | ||
79 | } | ||
80 | |||
81 | struct clk_ops clk_pllv1_ops = { | ||
82 | .recalc_rate = clk_pllv1_recalc_rate, | ||
83 | }; | ||
84 | |||
85 | struct clk *imx_clk_pllv1(const char *name, const char *parent, | ||
86 | void __iomem *base) | ||
87 | { | ||
88 | struct clk_pllv1 *pll; | ||
89 | struct clk *clk; | ||
90 | struct clk_init_data init; | ||
91 | |||
92 | pll = kmalloc(sizeof(*pll), GFP_KERNEL); | ||
93 | if (!pll) | ||
94 | return ERR_PTR(-ENOMEM); | ||
95 | |||
96 | pll->base = base; | ||
97 | |||
98 | init.name = name; | ||
99 | init.ops = &clk_pllv1_ops; | ||
100 | init.flags = 0; | ||
101 | init.parent_names = &parent; | ||
102 | init.num_parents = 1; | ||
103 | |||
104 | pll->hw.init = &init; | ||
105 | |||
106 | clk = clk_register(NULL, &pll->hw); | ||
107 | if (IS_ERR(clk)) | ||
108 | kfree(pll); | ||
109 | |||
110 | return clk; | ||
111 | } | ||
diff --git a/arch/arm/mach-imx/clk-pllv2.c b/arch/arm/mach-imx/clk-pllv2.c deleted file mode 100644 index 0440379e362..00000000000 --- a/arch/arm/mach-imx/clk-pllv2.c +++ /dev/null | |||
@@ -1,266 +0,0 @@ | |||
1 | #include <linux/kernel.h> | ||
2 | #include <linux/clk.h> | ||
3 | #include <linux/io.h> | ||
4 | #include <linux/errno.h> | ||
5 | #include <linux/delay.h> | ||
6 | #include <linux/slab.h> | ||
7 | #include <linux/err.h> | ||
8 | |||
9 | #include <asm/div64.h> | ||
10 | |||
11 | #include "clk.h" | ||
12 | |||
13 | #define to_clk_pllv2(clk) (container_of(clk, struct clk_pllv2, clk)) | ||
14 | |||
15 | /* PLL Register Offsets */ | ||
16 | #define MXC_PLL_DP_CTL 0x00 | ||
17 | #define MXC_PLL_DP_CONFIG 0x04 | ||
18 | #define MXC_PLL_DP_OP 0x08 | ||
19 | #define MXC_PLL_DP_MFD 0x0C | ||
20 | #define MXC_PLL_DP_MFN 0x10 | ||
21 | #define MXC_PLL_DP_MFNMINUS 0x14 | ||
22 | #define MXC_PLL_DP_MFNPLUS 0x18 | ||
23 | #define MXC_PLL_DP_HFS_OP 0x1C | ||
24 | #define MXC_PLL_DP_HFS_MFD 0x20 | ||
25 | #define MXC_PLL_DP_HFS_MFN 0x24 | ||
26 | #define MXC_PLL_DP_MFN_TOGC 0x28 | ||
27 | #define MXC_PLL_DP_DESTAT 0x2c | ||
28 | |||
29 | /* PLL Register Bit definitions */ | ||
30 | #define MXC_PLL_DP_CTL_MUL_CTRL 0x2000 | ||
31 | #define MXC_PLL_DP_CTL_DPDCK0_2_EN 0x1000 | ||
32 | #define MXC_PLL_DP_CTL_DPDCK0_2_OFFSET 12 | ||
33 | #define MXC_PLL_DP_CTL_ADE 0x800 | ||
34 | #define MXC_PLL_DP_CTL_REF_CLK_DIV 0x400 | ||
35 | #define MXC_PLL_DP_CTL_REF_CLK_SEL_MASK (3 << 8) | ||
36 | #define MXC_PLL_DP_CTL_REF_CLK_SEL_OFFSET 8 | ||
37 | #define MXC_PLL_DP_CTL_HFSM 0x80 | ||
38 | #define MXC_PLL_DP_CTL_PRE 0x40 | ||
39 | #define MXC_PLL_DP_CTL_UPEN 0x20 | ||
40 | #define MXC_PLL_DP_CTL_RST 0x10 | ||
41 | #define MXC_PLL_DP_CTL_RCP 0x8 | ||
42 | #define MXC_PLL_DP_CTL_PLM 0x4 | ||
43 | #define MXC_PLL_DP_CTL_BRM0 0x2 | ||
44 | #define MXC_PLL_DP_CTL_LRF 0x1 | ||
45 | |||
46 | #define MXC_PLL_DP_CONFIG_BIST 0x8 | ||
47 | #define MXC_PLL_DP_CONFIG_SJC_CE 0x4 | ||
48 | #define MXC_PLL_DP_CONFIG_AREN 0x2 | ||
49 | #define MXC_PLL_DP_CONFIG_LDREQ 0x1 | ||
50 | |||
51 | #define MXC_PLL_DP_OP_MFI_OFFSET 4 | ||
52 | #define MXC_PLL_DP_OP_MFI_MASK (0xF << 4) | ||
53 | #define MXC_PLL_DP_OP_PDF_OFFSET 0 | ||
54 | #define MXC_PLL_DP_OP_PDF_MASK 0xF | ||
55 | |||
56 | #define MXC_PLL_DP_MFD_OFFSET 0 | ||
57 | #define MXC_PLL_DP_MFD_MASK 0x07FFFFFF | ||
58 | |||
59 | #define MXC_PLL_DP_MFN_OFFSET 0x0 | ||
60 | #define MXC_PLL_DP_MFN_MASK 0x07FFFFFF | ||
61 | |||
62 | #define MXC_PLL_DP_MFN_TOGC_TOG_DIS (1 << 17) | ||
63 | #define MXC_PLL_DP_MFN_TOGC_TOG_EN (1 << 16) | ||
64 | #define MXC_PLL_DP_MFN_TOGC_CNT_OFFSET 0x0 | ||
65 | #define MXC_PLL_DP_MFN_TOGC_CNT_MASK 0xFFFF | ||
66 | |||
67 | #define MXC_PLL_DP_DESTAT_TOG_SEL (1 << 31) | ||
68 | #define MXC_PLL_DP_DESTAT_MFN 0x07FFFFFF | ||
69 | |||
70 | #define MAX_DPLL_WAIT_TRIES 1000 /* 1000 * udelay(1) = 1ms */ | ||
71 | |||
72 | struct clk_pllv2 { | ||
73 | struct clk_hw hw; | ||
74 | void __iomem *base; | ||
75 | }; | ||
76 | |||
77 | static unsigned long __clk_pllv2_recalc_rate(unsigned long parent_rate, | ||
78 | u32 dp_ctl, u32 dp_op, u32 dp_mfd, u32 dp_mfn) | ||
79 | { | ||
80 | long mfi, mfn, mfd, pdf, ref_clk, mfn_abs; | ||
81 | unsigned long dbl; | ||
82 | s64 temp; | ||
83 | |||
84 | dbl = dp_ctl & MXC_PLL_DP_CTL_DPDCK0_2_EN; | ||
85 | |||
86 | pdf = dp_op & MXC_PLL_DP_OP_PDF_MASK; | ||
87 | mfi = (dp_op & MXC_PLL_DP_OP_MFI_MASK) >> MXC_PLL_DP_OP_MFI_OFFSET; | ||
88 | mfi = (mfi <= 5) ? 5 : mfi; | ||
89 | mfd = dp_mfd & MXC_PLL_DP_MFD_MASK; | ||
90 | mfn = mfn_abs = dp_mfn & MXC_PLL_DP_MFN_MASK; | ||
91 | /* Sign extend to 32-bits */ | ||
92 | if (mfn >= 0x04000000) { | ||
93 | mfn |= 0xFC000000; | ||
94 | mfn_abs = -mfn; | ||
95 | } | ||
96 | |||
97 | ref_clk = 2 * parent_rate; | ||
98 | if (dbl != 0) | ||
99 | ref_clk *= 2; | ||
100 | |||
101 | ref_clk /= (pdf + 1); | ||
102 | temp = (u64) ref_clk * mfn_abs; | ||
103 | do_div(temp, mfd + 1); | ||
104 | if (mfn < 0) | ||
105 | temp = -temp; | ||
106 | temp = (ref_clk * mfi) + temp; | ||
107 | |||
108 | return temp; | ||
109 | } | ||
110 | |||
111 | static unsigned long clk_pllv2_recalc_rate(struct clk_hw *hw, | ||
112 | unsigned long parent_rate) | ||
113 | { | ||
114 | u32 dp_op, dp_mfd, dp_mfn, dp_ctl; | ||
115 | void __iomem *pllbase; | ||
116 | struct clk_pllv2 *pll = to_clk_pllv2(hw); | ||
117 | |||
118 | pllbase = pll->base; | ||
119 | |||
120 | dp_ctl = __raw_readl(pllbase + MXC_PLL_DP_CTL); | ||
121 | dp_op = __raw_readl(pllbase + MXC_PLL_DP_OP); | ||
122 | dp_mfd = __raw_readl(pllbase + MXC_PLL_DP_MFD); | ||
123 | dp_mfn = __raw_readl(pllbase + MXC_PLL_DP_MFN); | ||
124 | |||
125 | return __clk_pllv2_recalc_rate(parent_rate, dp_ctl, dp_op, dp_mfd, dp_mfn); | ||
126 | } | ||
127 | |||
128 | static int __clk_pllv2_set_rate(unsigned long rate, unsigned long parent_rate, | ||
129 | u32 *dp_op, u32 *dp_mfd, u32 *dp_mfn) | ||
130 | { | ||
131 | u32 reg; | ||
132 | long mfi, pdf, mfn, mfd = 999999; | ||
133 | s64 temp64; | ||
134 | unsigned long quad_parent_rate; | ||
135 | |||
136 | quad_parent_rate = 4 * parent_rate; | ||
137 | pdf = mfi = -1; | ||
138 | while (++pdf < 16 && mfi < 5) | ||
139 | mfi = rate * (pdf+1) / quad_parent_rate; | ||
140 | if (mfi > 15) | ||
141 | return -EINVAL; | ||
142 | pdf--; | ||
143 | |||
144 | temp64 = rate * (pdf + 1) - quad_parent_rate * mfi; | ||
145 | do_div(temp64, quad_parent_rate / 1000000); | ||
146 | mfn = (long)temp64; | ||
147 | |||
148 | reg = mfi << 4 | pdf; | ||
149 | |||
150 | *dp_op = reg; | ||
151 | *dp_mfd = mfd; | ||
152 | *dp_mfn = mfn; | ||
153 | |||
154 | return 0; | ||
155 | } | ||
156 | |||
157 | static int clk_pllv2_set_rate(struct clk_hw *hw, unsigned long rate, | ||
158 | unsigned long parent_rate) | ||
159 | { | ||
160 | struct clk_pllv2 *pll = to_clk_pllv2(hw); | ||
161 | void __iomem *pllbase; | ||
162 | u32 dp_ctl, dp_op, dp_mfd, dp_mfn; | ||
163 | int ret; | ||
164 | |||
165 | pllbase = pll->base; | ||
166 | |||
167 | |||
168 | ret = __clk_pllv2_set_rate(rate, parent_rate, &dp_op, &dp_mfd, &dp_mfn); | ||
169 | if (ret) | ||
170 | return ret; | ||
171 | |||
172 | dp_ctl = __raw_readl(pllbase + MXC_PLL_DP_CTL); | ||
173 | /* use dpdck0_2 */ | ||
174 | __raw_writel(dp_ctl | 0x1000L, pllbase + MXC_PLL_DP_CTL); | ||
175 | |||
176 | __raw_writel(dp_op, pllbase + MXC_PLL_DP_OP); | ||
177 | __raw_writel(dp_mfd, pllbase + MXC_PLL_DP_MFD); | ||
178 | __raw_writel(dp_mfn, pllbase + MXC_PLL_DP_MFN); | ||
179 | |||
180 | return 0; | ||
181 | } | ||
182 | |||
183 | static long clk_pllv2_round_rate(struct clk_hw *hw, unsigned long rate, | ||
184 | unsigned long *prate) | ||
185 | { | ||
186 | u32 dp_op, dp_mfd, dp_mfn; | ||
187 | |||
188 | __clk_pllv2_set_rate(rate, *prate, &dp_op, &dp_mfd, &dp_mfn); | ||
189 | return __clk_pllv2_recalc_rate(*prate, MXC_PLL_DP_CTL_DPDCK0_2_EN, | ||
190 | dp_op, dp_mfd, dp_mfn); | ||
191 | } | ||
192 | |||
193 | static int clk_pllv2_prepare(struct clk_hw *hw) | ||
194 | { | ||
195 | struct clk_pllv2 *pll = to_clk_pllv2(hw); | ||
196 | u32 reg; | ||
197 | void __iomem *pllbase; | ||
198 | int i = 0; | ||
199 | |||
200 | pllbase = pll->base; | ||
201 | reg = __raw_readl(pllbase + MXC_PLL_DP_CTL) | MXC_PLL_DP_CTL_UPEN; | ||
202 | __raw_writel(reg, pllbase + MXC_PLL_DP_CTL); | ||
203 | |||
204 | /* Wait for lock */ | ||
205 | do { | ||
206 | reg = __raw_readl(pllbase + MXC_PLL_DP_CTL); | ||
207 | if (reg & MXC_PLL_DP_CTL_LRF) | ||
208 | break; | ||
209 | |||
210 | udelay(1); | ||
211 | } while (++i < MAX_DPLL_WAIT_TRIES); | ||
212 | |||
213 | if (i == MAX_DPLL_WAIT_TRIES) { | ||
214 | pr_err("MX5: pll locking failed\n"); | ||
215 | return -EINVAL; | ||
216 | } | ||
217 | |||
218 | return 0; | ||
219 | } | ||
220 | |||
221 | static void clk_pllv2_unprepare(struct clk_hw *hw) | ||
222 | { | ||
223 | struct clk_pllv2 *pll = to_clk_pllv2(hw); | ||
224 | u32 reg; | ||
225 | void __iomem *pllbase; | ||
226 | |||
227 | pllbase = pll->base; | ||
228 | reg = __raw_readl(pllbase + MXC_PLL_DP_CTL) & ~MXC_PLL_DP_CTL_UPEN; | ||
229 | __raw_writel(reg, pllbase + MXC_PLL_DP_CTL); | ||
230 | } | ||
231 | |||
232 | struct clk_ops clk_pllv2_ops = { | ||
233 | .prepare = clk_pllv2_prepare, | ||
234 | .unprepare = clk_pllv2_unprepare, | ||
235 | .recalc_rate = clk_pllv2_recalc_rate, | ||
236 | .round_rate = clk_pllv2_round_rate, | ||
237 | .set_rate = clk_pllv2_set_rate, | ||
238 | }; | ||
239 | |||
240 | struct clk *imx_clk_pllv2(const char *name, const char *parent, | ||
241 | void __iomem *base) | ||
242 | { | ||
243 | struct clk_pllv2 *pll; | ||
244 | struct clk *clk; | ||
245 | struct clk_init_data init; | ||
246 | |||
247 | pll = kzalloc(sizeof(*pll), GFP_KERNEL); | ||
248 | if (!pll) | ||
249 | return ERR_PTR(-ENOMEM); | ||
250 | |||
251 | pll->base = base; | ||
252 | |||
253 | init.name = name; | ||
254 | init.ops = &clk_pllv2_ops; | ||
255 | init.flags = 0; | ||
256 | init.parent_names = &parent; | ||
257 | init.num_parents = 1; | ||
258 | |||
259 | pll->hw.init = &init; | ||
260 | |||
261 | clk = clk_register(NULL, &pll->hw); | ||
262 | if (IS_ERR(clk)) | ||
263 | kfree(pll); | ||
264 | |||
265 | return clk; | ||
266 | } | ||
diff --git a/arch/arm/mach-imx/clk-pllv3.c b/arch/arm/mach-imx/clk-pllv3.c deleted file mode 100644 index d09bc3df9a7..00000000000 --- a/arch/arm/mach-imx/clk-pllv3.c +++ /dev/null | |||
@@ -1,355 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2012 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/clk.h> | ||
14 | #include <linux/clk-provider.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/slab.h> | ||
17 | #include <linux/jiffies.h> | ||
18 | #include <linux/err.h> | ||
19 | #include "clk.h" | ||
20 | |||
21 | #define PLL_NUM_OFFSET 0x10 | ||
22 | #define PLL_DENOM_OFFSET 0x20 | ||
23 | |||
24 | #define BM_PLL_POWER (0x1 << 12) | ||
25 | #define BM_PLL_ENABLE (0x1 << 13) | ||
26 | #define BM_PLL_BYPASS (0x1 << 16) | ||
27 | #define BM_PLL_LOCK (0x1 << 31) | ||
28 | |||
29 | /** | ||
30 | * struct clk_pllv3 - IMX PLL clock version 3 | ||
31 | * @clk_hw: clock source | ||
32 | * @base: base address of PLL registers | ||
33 | * @powerup_set: set POWER bit to power up the PLL | ||
34 | * @div_mask: mask of divider bits | ||
35 | * | ||
36 | * IMX PLL clock version 3, found on i.MX6 series. Divider for pllv3 | ||
37 | * is actually a multiplier, and always sits at bit 0. | ||
38 | */ | ||
39 | struct clk_pllv3 { | ||
40 | struct clk_hw hw; | ||
41 | void __iomem *base; | ||
42 | bool powerup_set; | ||
43 | u32 div_mask; | ||
44 | }; | ||
45 | |||
46 | #define to_clk_pllv3(_hw) container_of(_hw, struct clk_pllv3, hw) | ||
47 | |||
48 | static int clk_pllv3_prepare(struct clk_hw *hw) | ||
49 | { | ||
50 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
51 | unsigned long timeout = jiffies + msecs_to_jiffies(10); | ||
52 | u32 val; | ||
53 | |||
54 | val = readl_relaxed(pll->base); | ||
55 | val &= ~BM_PLL_BYPASS; | ||
56 | if (pll->powerup_set) | ||
57 | val |= BM_PLL_POWER; | ||
58 | else | ||
59 | val &= ~BM_PLL_POWER; | ||
60 | writel_relaxed(val, pll->base); | ||
61 | |||
62 | /* Wait for PLL to lock */ | ||
63 | while (!(readl_relaxed(pll->base) & BM_PLL_LOCK)) | ||
64 | if (time_after(jiffies, timeout)) | ||
65 | return -ETIMEDOUT; | ||
66 | |||
67 | return 0; | ||
68 | } | ||
69 | |||
70 | static void clk_pllv3_unprepare(struct clk_hw *hw) | ||
71 | { | ||
72 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
73 | u32 val; | ||
74 | |||
75 | val = readl_relaxed(pll->base); | ||
76 | val |= BM_PLL_BYPASS; | ||
77 | if (pll->powerup_set) | ||
78 | val &= ~BM_PLL_POWER; | ||
79 | else | ||
80 | val |= BM_PLL_POWER; | ||
81 | writel_relaxed(val, pll->base); | ||
82 | } | ||
83 | |||
84 | static int clk_pllv3_enable(struct clk_hw *hw) | ||
85 | { | ||
86 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
87 | u32 val; | ||
88 | |||
89 | val = readl_relaxed(pll->base); | ||
90 | val |= BM_PLL_ENABLE; | ||
91 | writel_relaxed(val, pll->base); | ||
92 | |||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | static void clk_pllv3_disable(struct clk_hw *hw) | ||
97 | { | ||
98 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
99 | u32 val; | ||
100 | |||
101 | val = readl_relaxed(pll->base); | ||
102 | val &= ~BM_PLL_ENABLE; | ||
103 | writel_relaxed(val, pll->base); | ||
104 | } | ||
105 | |||
106 | static unsigned long clk_pllv3_recalc_rate(struct clk_hw *hw, | ||
107 | unsigned long parent_rate) | ||
108 | { | ||
109 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
110 | u32 div = readl_relaxed(pll->base) & pll->div_mask; | ||
111 | |||
112 | return (div == 1) ? parent_rate * 22 : parent_rate * 20; | ||
113 | } | ||
114 | |||
115 | static long clk_pllv3_round_rate(struct clk_hw *hw, unsigned long rate, | ||
116 | unsigned long *prate) | ||
117 | { | ||
118 | unsigned long parent_rate = *prate; | ||
119 | |||
120 | return (rate >= parent_rate * 22) ? parent_rate * 22 : | ||
121 | parent_rate * 20; | ||
122 | } | ||
123 | |||
124 | static int clk_pllv3_set_rate(struct clk_hw *hw, unsigned long rate, | ||
125 | unsigned long parent_rate) | ||
126 | { | ||
127 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
128 | u32 val, div; | ||
129 | |||
130 | if (rate == parent_rate * 22) | ||
131 | div = 1; | ||
132 | else if (rate == parent_rate * 20) | ||
133 | div = 0; | ||
134 | else | ||
135 | return -EINVAL; | ||
136 | |||
137 | val = readl_relaxed(pll->base); | ||
138 | val &= ~pll->div_mask; | ||
139 | val |= div; | ||
140 | writel_relaxed(val, pll->base); | ||
141 | |||
142 | return 0; | ||
143 | } | ||
144 | |||
145 | static const struct clk_ops clk_pllv3_ops = { | ||
146 | .prepare = clk_pllv3_prepare, | ||
147 | .unprepare = clk_pllv3_unprepare, | ||
148 | .enable = clk_pllv3_enable, | ||
149 | .disable = clk_pllv3_disable, | ||
150 | .recalc_rate = clk_pllv3_recalc_rate, | ||
151 | .round_rate = clk_pllv3_round_rate, | ||
152 | .set_rate = clk_pllv3_set_rate, | ||
153 | }; | ||
154 | |||
155 | static unsigned long clk_pllv3_sys_recalc_rate(struct clk_hw *hw, | ||
156 | unsigned long parent_rate) | ||
157 | { | ||
158 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
159 | u32 div = readl_relaxed(pll->base) & pll->div_mask; | ||
160 | |||
161 | return parent_rate * div / 2; | ||
162 | } | ||
163 | |||
164 | static long clk_pllv3_sys_round_rate(struct clk_hw *hw, unsigned long rate, | ||
165 | unsigned long *prate) | ||
166 | { | ||
167 | unsigned long parent_rate = *prate; | ||
168 | unsigned long min_rate = parent_rate * 54 / 2; | ||
169 | unsigned long max_rate = parent_rate * 108 / 2; | ||
170 | u32 div; | ||
171 | |||
172 | if (rate > max_rate) | ||
173 | rate = max_rate; | ||
174 | else if (rate < min_rate) | ||
175 | rate = min_rate; | ||
176 | div = rate * 2 / parent_rate; | ||
177 | |||
178 | return parent_rate * div / 2; | ||
179 | } | ||
180 | |||
181 | static int clk_pllv3_sys_set_rate(struct clk_hw *hw, unsigned long rate, | ||
182 | unsigned long parent_rate) | ||
183 | { | ||
184 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
185 | unsigned long min_rate = parent_rate * 54 / 2; | ||
186 | unsigned long max_rate = parent_rate * 108 / 2; | ||
187 | u32 val, div; | ||
188 | |||
189 | if (rate < min_rate || rate > max_rate) | ||
190 | return -EINVAL; | ||
191 | |||
192 | div = rate * 2 / parent_rate; | ||
193 | val = readl_relaxed(pll->base); | ||
194 | val &= ~pll->div_mask; | ||
195 | val |= div; | ||
196 | writel_relaxed(val, pll->base); | ||
197 | |||
198 | return 0; | ||
199 | } | ||
200 | |||
201 | static const struct clk_ops clk_pllv3_sys_ops = { | ||
202 | .prepare = clk_pllv3_prepare, | ||
203 | .unprepare = clk_pllv3_unprepare, | ||
204 | .enable = clk_pllv3_enable, | ||
205 | .disable = clk_pllv3_disable, | ||
206 | .recalc_rate = clk_pllv3_sys_recalc_rate, | ||
207 | .round_rate = clk_pllv3_sys_round_rate, | ||
208 | .set_rate = clk_pllv3_sys_set_rate, | ||
209 | }; | ||
210 | |||
211 | static unsigned long clk_pllv3_av_recalc_rate(struct clk_hw *hw, | ||
212 | unsigned long parent_rate) | ||
213 | { | ||
214 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
215 | u32 mfn = readl_relaxed(pll->base + PLL_NUM_OFFSET); | ||
216 | u32 mfd = readl_relaxed(pll->base + PLL_DENOM_OFFSET); | ||
217 | u32 div = readl_relaxed(pll->base) & pll->div_mask; | ||
218 | |||
219 | return (parent_rate * div) + ((parent_rate / mfd) * mfn); | ||
220 | } | ||
221 | |||
222 | static long clk_pllv3_av_round_rate(struct clk_hw *hw, unsigned long rate, | ||
223 | unsigned long *prate) | ||
224 | { | ||
225 | unsigned long parent_rate = *prate; | ||
226 | unsigned long min_rate = parent_rate * 27; | ||
227 | unsigned long max_rate = parent_rate * 54; | ||
228 | u32 div; | ||
229 | u32 mfn, mfd = 1000000; | ||
230 | s64 temp64; | ||
231 | |||
232 | if (rate > max_rate) | ||
233 | rate = max_rate; | ||
234 | else if (rate < min_rate) | ||
235 | rate = min_rate; | ||
236 | |||
237 | div = rate / parent_rate; | ||
238 | temp64 = (u64) (rate - div * parent_rate); | ||
239 | temp64 *= mfd; | ||
240 | do_div(temp64, parent_rate); | ||
241 | mfn = temp64; | ||
242 | |||
243 | return parent_rate * div + parent_rate / mfd * mfn; | ||
244 | } | ||
245 | |||
246 | static int clk_pllv3_av_set_rate(struct clk_hw *hw, unsigned long rate, | ||
247 | unsigned long parent_rate) | ||
248 | { | ||
249 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | ||
250 | unsigned long min_rate = parent_rate * 27; | ||
251 | unsigned long max_rate = parent_rate * 54; | ||
252 | u32 val, div; | ||
253 | u32 mfn, mfd = 1000000; | ||
254 | s64 temp64; | ||
255 | |||
256 | if (rate < min_rate || rate > max_rate) | ||
257 | return -EINVAL; | ||
258 | |||
259 | div = rate / parent_rate; | ||
260 | temp64 = (u64) (rate - div * parent_rate); | ||
261 | temp64 *= mfd; | ||
262 | do_div(temp64, parent_rate); | ||
263 | mfn = temp64; | ||
264 | |||
265 | val = readl_relaxed(pll->base); | ||
266 | val &= ~pll->div_mask; | ||
267 | val |= div; | ||
268 | writel_relaxed(val, pll->base); | ||
269 | writel_relaxed(mfn, pll->base + PLL_NUM_OFFSET); | ||
270 | writel_relaxed(mfd, pll->base + PLL_DENOM_OFFSET); | ||
271 | |||
272 | return 0; | ||
273 | } | ||
274 | |||
275 | static const struct clk_ops clk_pllv3_av_ops = { | ||
276 | .prepare = clk_pllv3_prepare, | ||
277 | .unprepare = clk_pllv3_unprepare, | ||
278 | .enable = clk_pllv3_enable, | ||
279 | .disable = clk_pllv3_disable, | ||
280 | .recalc_rate = clk_pllv3_av_recalc_rate, | ||
281 | .round_rate = clk_pllv3_av_round_rate, | ||
282 | .set_rate = clk_pllv3_av_set_rate, | ||
283 | }; | ||
284 | |||
285 | static unsigned long clk_pllv3_enet_recalc_rate(struct clk_hw *hw, | ||
286 | unsigned long parent_rate) | ||
287 | { | ||
288 | return 500000000; | ||
289 | } | ||
290 | |||
291 | static const struct clk_ops clk_pllv3_enet_ops = { | ||
292 | .prepare = clk_pllv3_prepare, | ||
293 | .unprepare = clk_pllv3_unprepare, | ||
294 | .enable = clk_pllv3_enable, | ||
295 | .disable = clk_pllv3_disable, | ||
296 | .recalc_rate = clk_pllv3_enet_recalc_rate, | ||
297 | }; | ||
298 | |||
299 | static const struct clk_ops clk_pllv3_mlb_ops = { | ||
300 | .prepare = clk_pllv3_prepare, | ||
301 | .unprepare = clk_pllv3_unprepare, | ||
302 | .enable = clk_pllv3_enable, | ||
303 | .disable = clk_pllv3_disable, | ||
304 | }; | ||
305 | |||
306 | struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, | ||
307 | const char *parent_name, void __iomem *base, | ||
308 | u32 div_mask) | ||
309 | { | ||
310 | struct clk_pllv3 *pll; | ||
311 | const struct clk_ops *ops; | ||
312 | struct clk *clk; | ||
313 | struct clk_init_data init; | ||
314 | |||
315 | pll = kzalloc(sizeof(*pll), GFP_KERNEL); | ||
316 | if (!pll) | ||
317 | return ERR_PTR(-ENOMEM); | ||
318 | |||
319 | switch (type) { | ||
320 | case IMX_PLLV3_SYS: | ||
321 | ops = &clk_pllv3_sys_ops; | ||
322 | break; | ||
323 | case IMX_PLLV3_USB: | ||
324 | ops = &clk_pllv3_ops; | ||
325 | pll->powerup_set = true; | ||
326 | break; | ||
327 | case IMX_PLLV3_AV: | ||
328 | ops = &clk_pllv3_av_ops; | ||
329 | break; | ||
330 | case IMX_PLLV3_ENET: | ||
331 | ops = &clk_pllv3_enet_ops; | ||
332 | break; | ||
333 | case IMX_PLLV3_MLB: | ||
334 | ops = &clk_pllv3_mlb_ops; | ||
335 | break; | ||
336 | default: | ||
337 | ops = &clk_pllv3_ops; | ||
338 | } | ||
339 | pll->base = base; | ||
340 | pll->div_mask = div_mask; | ||
341 | |||
342 | init.name = name; | ||
343 | init.ops = ops; | ||
344 | init.flags = 0; | ||
345 | init.parent_names = &parent_name; | ||
346 | init.num_parents = 1; | ||
347 | |||
348 | pll->hw.init = &init; | ||
349 | |||
350 | clk = clk_register(NULL, &pll->hw); | ||
351 | if (IS_ERR(clk)) | ||
352 | kfree(pll); | ||
353 | |||
354 | return clk; | ||
355 | } | ||
diff --git a/arch/arm/mach-imx/clk.c b/arch/arm/mach-imx/clk.c deleted file mode 100644 index f5e8be8e7f1..00000000000 --- a/arch/arm/mach-imx/clk.c +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | #include <linux/spinlock.h> | ||
2 | |||
3 | DEFINE_SPINLOCK(imx_ccm_lock); | ||
diff --git a/arch/arm/mach-imx/clk.h b/arch/arm/mach-imx/clk.h deleted file mode 100644 index 9d1f3b99d1d..00000000000 --- a/arch/arm/mach-imx/clk.h +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | #ifndef __MACH_IMX_CLK_H | ||
2 | #define __MACH_IMX_CLK_H | ||
3 | |||
4 | #include <linux/spinlock.h> | ||
5 | #include <linux/clk-provider.h> | ||
6 | |||
7 | extern spinlock_t imx_ccm_lock; | ||
8 | |||
9 | struct clk *imx_clk_pllv1(const char *name, const char *parent, | ||
10 | void __iomem *base); | ||
11 | |||
12 | struct clk *imx_clk_pllv2(const char *name, const char *parent, | ||
13 | void __iomem *base); | ||
14 | |||
15 | enum imx_pllv3_type { | ||
16 | IMX_PLLV3_GENERIC, | ||
17 | IMX_PLLV3_SYS, | ||
18 | IMX_PLLV3_USB, | ||
19 | IMX_PLLV3_AV, | ||
20 | IMX_PLLV3_ENET, | ||
21 | IMX_PLLV3_MLB, | ||
22 | }; | ||
23 | |||
24 | struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, | ||
25 | const char *parent_name, void __iomem *base, u32 div_mask); | ||
26 | |||
27 | struct clk *clk_register_gate2(struct device *dev, const char *name, | ||
28 | const char *parent_name, unsigned long flags, | ||
29 | void __iomem *reg, u8 bit_idx, | ||
30 | u8 clk_gate_flags, spinlock_t *lock); | ||
31 | |||
32 | static inline struct clk *imx_clk_gate2(const char *name, const char *parent, | ||
33 | void __iomem *reg, u8 shift) | ||
34 | { | ||
35 | return clk_register_gate2(NULL, name, parent, CLK_SET_RATE_PARENT, reg, | ||
36 | shift, 0, &imx_ccm_lock); | ||
37 | } | ||
38 | |||
39 | struct clk *imx_clk_pfd(const char *name, const char *parent_name, | ||
40 | void __iomem *reg, u8 idx); | ||
41 | |||
42 | struct clk *imx_clk_busy_divider(const char *name, const char *parent_name, | ||
43 | void __iomem *reg, u8 shift, u8 width, | ||
44 | void __iomem *busy_reg, u8 busy_shift); | ||
45 | |||
46 | struct clk *imx_clk_busy_mux(const char *name, void __iomem *reg, u8 shift, | ||
47 | u8 width, void __iomem *busy_reg, u8 busy_shift, | ||
48 | const char **parent_names, int num_parents); | ||
49 | |||
50 | static inline struct clk *imx_clk_fixed(const char *name, int rate) | ||
51 | { | ||
52 | return clk_register_fixed_rate(NULL, name, NULL, CLK_IS_ROOT, rate); | ||
53 | } | ||
54 | |||
55 | static inline struct clk *imx_clk_divider(const char *name, const char *parent, | ||
56 | void __iomem *reg, u8 shift, u8 width) | ||
57 | { | ||
58 | return clk_register_divider(NULL, name, parent, CLK_SET_RATE_PARENT, | ||
59 | reg, shift, width, 0, &imx_ccm_lock); | ||
60 | } | ||
61 | |||
62 | static inline struct clk *imx_clk_gate(const char *name, const char *parent, | ||
63 | void __iomem *reg, u8 shift) | ||
64 | { | ||
65 | return clk_register_gate(NULL, name, parent, CLK_SET_RATE_PARENT, reg, | ||
66 | shift, 0, &imx_ccm_lock); | ||
67 | } | ||
68 | |||
69 | static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg, | ||
70 | u8 shift, u8 width, const char **parents, int num_parents) | ||
71 | { | ||
72 | return clk_register_mux(NULL, name, parents, num_parents, 0, reg, shift, | ||
73 | width, 0, &imx_ccm_lock); | ||
74 | } | ||
75 | |||
76 | static inline struct clk *imx_clk_fixed_factor(const char *name, | ||
77 | const char *parent, unsigned int mult, unsigned int div) | ||
78 | { | ||
79 | return clk_register_fixed_factor(NULL, name, parent, | ||
80 | CLK_SET_RATE_PARENT, mult, div); | ||
81 | } | ||
82 | |||
83 | #endif | ||
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h deleted file mode 100644 index 7191ab4434e..00000000000 --- a/arch/arm/mach-imx/common.h +++ /dev/null | |||
@@ -1,164 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_MXC_COMMON_H__ | ||
12 | #define __ASM_ARCH_MXC_COMMON_H__ | ||
13 | |||
14 | struct platform_device; | ||
15 | struct clk; | ||
16 | enum mxc_cpu_pwr_mode; | ||
17 | |||
18 | extern void mx1_map_io(void); | ||
19 | extern void mx21_map_io(void); | ||
20 | extern void mx25_map_io(void); | ||
21 | extern void mx27_map_io(void); | ||
22 | extern void mx31_map_io(void); | ||
23 | extern void mx35_map_io(void); | ||
24 | extern void mx50_map_io(void); | ||
25 | extern void mx51_map_io(void); | ||
26 | extern void mx53_map_io(void); | ||
27 | extern void imx1_init_early(void); | ||
28 | extern void imx21_init_early(void); | ||
29 | extern void imx25_init_early(void); | ||
30 | extern void imx27_init_early(void); | ||
31 | extern void imx31_init_early(void); | ||
32 | extern void imx35_init_early(void); | ||
33 | extern void imx50_init_early(void); | ||
34 | extern void imx51_init_early(void); | ||
35 | extern void imx53_init_early(void); | ||
36 | extern void mxc_init_irq(void __iomem *); | ||
37 | extern void tzic_init_irq(void __iomem *); | ||
38 | extern void mx1_init_irq(void); | ||
39 | extern void mx21_init_irq(void); | ||
40 | extern void mx25_init_irq(void); | ||
41 | extern void mx27_init_irq(void); | ||
42 | extern void mx31_init_irq(void); | ||
43 | extern void mx35_init_irq(void); | ||
44 | extern void mx50_init_irq(void); | ||
45 | extern void mx51_init_irq(void); | ||
46 | extern void mx53_init_irq(void); | ||
47 | extern void imx1_soc_init(void); | ||
48 | extern void imx21_soc_init(void); | ||
49 | extern void imx25_soc_init(void); | ||
50 | extern void imx27_soc_init(void); | ||
51 | extern void imx31_soc_init(void); | ||
52 | extern void imx35_soc_init(void); | ||
53 | extern void imx50_soc_init(void); | ||
54 | extern void imx51_soc_init(void); | ||
55 | extern void imx51_init_late(void); | ||
56 | extern void imx53_init_late(void); | ||
57 | extern void epit_timer_init(void __iomem *base, int irq); | ||
58 | extern void mxc_timer_init(void __iomem *, int); | ||
59 | extern int mx1_clocks_init(unsigned long fref); | ||
60 | extern int mx21_clocks_init(unsigned long lref, unsigned long fref); | ||
61 | extern int mx25_clocks_init(void); | ||
62 | extern int mx27_clocks_init(unsigned long fref); | ||
63 | extern int mx31_clocks_init(unsigned long fref); | ||
64 | extern int mx35_clocks_init(void); | ||
65 | extern int mx51_clocks_init(unsigned long ckil, unsigned long osc, | ||
66 | unsigned long ckih1, unsigned long ckih2); | ||
67 | extern int mx53_clocks_init(unsigned long ckil, unsigned long osc, | ||
68 | unsigned long ckih1, unsigned long ckih2); | ||
69 | extern int mx25_clocks_init_dt(void); | ||
70 | extern int mx27_clocks_init_dt(void); | ||
71 | extern int mx31_clocks_init_dt(void); | ||
72 | extern int mx51_clocks_init_dt(void); | ||
73 | extern int mx53_clocks_init_dt(void); | ||
74 | extern int mx6q_clocks_init(void); | ||
75 | extern struct platform_device *mxc_register_gpio(char *name, int id, | ||
76 | resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); | ||
77 | extern void mxc_set_cpu_type(unsigned int type); | ||
78 | extern void mxc_restart(char, const char *); | ||
79 | extern void mxc_arch_reset_init(void __iomem *); | ||
80 | extern int mx53_revision(void); | ||
81 | extern int mx53_display_revision(void); | ||
82 | extern void imx_set_aips(void __iomem *); | ||
83 | extern int mxc_device_init(void); | ||
84 | |||
85 | enum mxc_cpu_pwr_mode { | ||
86 | WAIT_CLOCKED, /* wfi only */ | ||
87 | WAIT_UNCLOCKED, /* WAIT */ | ||
88 | WAIT_UNCLOCKED_POWER_OFF, /* WAIT + SRPG */ | ||
89 | STOP_POWER_ON, /* just STOP */ | ||
90 | STOP_POWER_OFF, /* STOP + SRPG */ | ||
91 | }; | ||
92 | |||
93 | enum mx3_cpu_pwr_mode { | ||
94 | MX3_RUN, | ||
95 | MX3_WAIT, | ||
96 | MX3_DOZE, | ||
97 | MX3_SLEEP, | ||
98 | }; | ||
99 | |||
100 | extern void mx3_cpu_lp_set(enum mx3_cpu_pwr_mode mode); | ||
101 | extern void imx_print_silicon_rev(const char *cpu, int srev); | ||
102 | |||
103 | void avic_handle_irq(struct pt_regs *); | ||
104 | void tzic_handle_irq(struct pt_regs *); | ||
105 | |||
106 | #define imx1_handle_irq avic_handle_irq | ||
107 | #define imx21_handle_irq avic_handle_irq | ||
108 | #define imx25_handle_irq avic_handle_irq | ||
109 | #define imx27_handle_irq avic_handle_irq | ||
110 | #define imx31_handle_irq avic_handle_irq | ||
111 | #define imx35_handle_irq avic_handle_irq | ||
112 | #define imx50_handle_irq tzic_handle_irq | ||
113 | #define imx51_handle_irq tzic_handle_irq | ||
114 | #define imx53_handle_irq tzic_handle_irq | ||
115 | #define imx6q_handle_irq gic_handle_irq | ||
116 | |||
117 | extern void imx_enable_cpu(int cpu, bool enable); | ||
118 | extern void imx_set_cpu_jump(int cpu, void *jump_addr); | ||
119 | #ifdef CONFIG_DEBUG_LL | ||
120 | extern void imx_lluart_map_io(void); | ||
121 | #else | ||
122 | static inline void imx_lluart_map_io(void) {} | ||
123 | #endif | ||
124 | extern void v7_cpu_resume(void); | ||
125 | extern u32 *pl310_get_save_ptr(void); | ||
126 | #ifdef CONFIG_SMP | ||
127 | extern void v7_secondary_startup(void); | ||
128 | extern void imx_scu_map_io(void); | ||
129 | extern void imx_smp_prepare(void); | ||
130 | #else | ||
131 | static inline void imx_scu_map_io(void) {} | ||
132 | static inline void imx_smp_prepare(void) {} | ||
133 | #endif | ||
134 | extern void imx_enable_cpu(int cpu, bool enable); | ||
135 | extern void imx_set_cpu_jump(int cpu, void *jump_addr); | ||
136 | extern void imx_src_init(void); | ||
137 | extern void imx_src_prepare_restart(void); | ||
138 | extern void imx_gpc_init(void); | ||
139 | extern void imx_gpc_pre_suspend(void); | ||
140 | extern void imx_gpc_post_resume(void); | ||
141 | extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); | ||
142 | extern void imx6q_clock_map_io(void); | ||
143 | |||
144 | extern void imx_cpu_die(unsigned int cpu); | ||
145 | |||
146 | #ifdef CONFIG_PM | ||
147 | extern void imx6q_pm_init(void); | ||
148 | extern void imx51_pm_init(void); | ||
149 | extern void imx53_pm_init(void); | ||
150 | #else | ||
151 | static inline void imx6q_pm_init(void) {} | ||
152 | static inline void imx51_pm_init(void) {} | ||
153 | static inline void imx53_pm_init(void) {} | ||
154 | #endif | ||
155 | |||
156 | #ifdef CONFIG_NEON | ||
157 | extern int mx51_neon_fixup(void); | ||
158 | #else | ||
159 | static inline int mx51_neon_fixup(void) { return 0; } | ||
160 | #endif | ||
161 | |||
162 | extern struct smp_operations imx_smp_ops; | ||
163 | |||
164 | #endif | ||
diff --git a/arch/arm/mach-imx/cpu-imx25.c b/arch/arm/mach-imx/cpu-imx25.c deleted file mode 100644 index 96ec64b5ff7..00000000000 --- a/arch/arm/mach-imx/cpu-imx25.c +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * MX25 CPU type detection | ||
3 | * | ||
4 | * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> | ||
5 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/io.h> | ||
14 | |||
15 | #include "iim.h" | ||
16 | #include "hardware.h" | ||
17 | |||
18 | static int mx25_cpu_rev = -1; | ||
19 | |||
20 | static int mx25_read_cpu_rev(void) | ||
21 | { | ||
22 | u32 rev; | ||
23 | |||
24 | rev = __raw_readl(MX25_IO_ADDRESS(MX25_IIM_BASE_ADDR + MXC_IIMSREV)); | ||
25 | switch (rev) { | ||
26 | case 0x00: | ||
27 | return IMX_CHIP_REVISION_1_0; | ||
28 | case 0x01: | ||
29 | return IMX_CHIP_REVISION_1_1; | ||
30 | default: | ||
31 | return IMX_CHIP_REVISION_UNKNOWN; | ||
32 | } | ||
33 | } | ||
34 | |||
35 | int mx25_revision(void) | ||
36 | { | ||
37 | if (mx25_cpu_rev == -1) | ||
38 | mx25_cpu_rev = mx25_read_cpu_rev(); | ||
39 | |||
40 | return mx25_cpu_rev; | ||
41 | } | ||
42 | EXPORT_SYMBOL(mx25_revision); | ||
diff --git a/arch/arm/mach-imx/cpu-imx27.c b/arch/arm/mach-imx/cpu-imx27.c index fe8d36f7e30..3b117be37bd 100644 --- a/arch/arm/mach-imx/cpu-imx27.c +++ b/arch/arm/mach-imx/cpu-imx27.c | |||
@@ -24,14 +24,14 @@ | |||
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | 26 | ||
27 | #include "hardware.h" | 27 | #include <mach/hardware.h> |
28 | 28 | ||
29 | static int mx27_cpu_rev = -1; | 29 | static int cpu_silicon_rev = -1; |
30 | static int mx27_cpu_partnumber; | 30 | static int cpu_partnumber; |
31 | 31 | ||
32 | #define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */ | 32 | #define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */ |
33 | 33 | ||
34 | static int mx27_read_cpu_rev(void) | 34 | static void query_silicon_parameter(void) |
35 | { | 35 | { |
36 | u32 val; | 36 | u32 val; |
37 | /* | 37 | /* |
@@ -42,18 +42,20 @@ static int mx27_read_cpu_rev(void) | |||
42 | val = __raw_readl(MX27_IO_ADDRESS(MX27_SYSCTRL_BASE_ADDR | 42 | val = __raw_readl(MX27_IO_ADDRESS(MX27_SYSCTRL_BASE_ADDR |
43 | + SYS_CHIP_ID)); | 43 | + SYS_CHIP_ID)); |
44 | 44 | ||
45 | mx27_cpu_partnumber = (int)((val >> 12) & 0xFFFF); | ||
46 | |||
47 | switch (val >> 28) { | 45 | switch (val >> 28) { |
48 | case 0: | 46 | case 0: |
49 | return IMX_CHIP_REVISION_1_0; | 47 | cpu_silicon_rev = IMX_CHIP_REVISION_1_0; |
48 | break; | ||
50 | case 1: | 49 | case 1: |
51 | return IMX_CHIP_REVISION_2_0; | 50 | cpu_silicon_rev = IMX_CHIP_REVISION_2_0; |
51 | break; | ||
52 | case 2: | 52 | case 2: |
53 | return IMX_CHIP_REVISION_2_1; | 53 | cpu_silicon_rev = IMX_CHIP_REVISION_2_1; |
54 | break; | ||
54 | default: | 55 | default: |
55 | return IMX_CHIP_REVISION_UNKNOWN; | 56 | cpu_silicon_rev = IMX_CHIP_REVISION_UNKNOWN; |
56 | } | 57 | } |
58 | cpu_partnumber = (int)((val >> 12) & 0xFFFF); | ||
57 | } | 59 | } |
58 | 60 | ||
59 | /* | 61 | /* |
@@ -63,12 +65,12 @@ static int mx27_read_cpu_rev(void) | |||
63 | */ | 65 | */ |
64 | int mx27_revision(void) | 66 | int mx27_revision(void) |
65 | { | 67 | { |
66 | if (mx27_cpu_rev == -1) | 68 | if (cpu_silicon_rev == -1) |
67 | mx27_cpu_rev = mx27_read_cpu_rev(); | 69 | query_silicon_parameter(); |
68 | 70 | ||
69 | if (mx27_cpu_partnumber != 0x8821) | 71 | if (cpu_partnumber != 0x8821) |
70 | return -EINVAL; | 72 | return -EINVAL; |
71 | 73 | ||
72 | return mx27_cpu_rev; | 74 | return cpu_silicon_rev; |
73 | } | 75 | } |
74 | EXPORT_SYMBOL(mx27_revision); | 76 | EXPORT_SYMBOL(mx27_revision); |
diff --git a/arch/arm/mach-imx/cpu-imx31.c b/arch/arm/mach-imx/cpu-imx31.c index fde1860a252..a3780700a88 100644 --- a/arch/arm/mach-imx/cpu-imx31.c +++ b/arch/arm/mach-imx/cpu-imx31.c | |||
@@ -11,53 +11,47 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <mach/hardware.h> | ||
15 | #include <mach/iim.h> | ||
14 | 16 | ||
15 | #include "common.h" | 17 | unsigned int mx31_cpu_rev; |
16 | #include "hardware.h" | 18 | EXPORT_SYMBOL(mx31_cpu_rev); |
17 | #include "iim.h" | ||
18 | |||
19 | static int mx31_cpu_rev = -1; | ||
20 | 19 | ||
21 | static struct { | 20 | static struct { |
22 | u8 srev; | 21 | u8 srev; |
23 | const char *name; | 22 | const char *name; |
23 | const char *v; | ||
24 | unsigned int rev; | 24 | unsigned int rev; |
25 | } mx31_cpu_type[] = { | 25 | } mx31_cpu_type[] __initdata = { |
26 | { .srev = 0x00, .name = "i.MX31(L)", .rev = IMX_CHIP_REVISION_1_0 }, | 26 | { .srev = 0x00, .name = "i.MX31(L)", .v = "1.0", .rev = IMX_CHIP_REVISION_1_0 }, |
27 | { .srev = 0x10, .name = "i.MX31", .rev = IMX_CHIP_REVISION_1_1 }, | 27 | { .srev = 0x10, .name = "i.MX31", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 }, |
28 | { .srev = 0x11, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_1_1 }, | 28 | { .srev = 0x11, .name = "i.MX31L", .v = "1.1", .rev = IMX_CHIP_REVISION_1_1 }, |
29 | { .srev = 0x12, .name = "i.MX31", .rev = IMX_CHIP_REVISION_1_1 }, | 29 | { .srev = 0x12, .name = "i.MX31", .v = "1.15", .rev = IMX_CHIP_REVISION_1_1 }, |
30 | { .srev = 0x13, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_1_1 }, | 30 | { .srev = 0x13, .name = "i.MX31L", .v = "1.15", .rev = IMX_CHIP_REVISION_1_1 }, |
31 | { .srev = 0x14, .name = "i.MX31", .rev = IMX_CHIP_REVISION_1_2 }, | 31 | { .srev = 0x14, .name = "i.MX31", .v = "1.2", .rev = IMX_CHIP_REVISION_1_2 }, |
32 | { .srev = 0x15, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_1_2 }, | 32 | { .srev = 0x15, .name = "i.MX31L", .v = "1.2", .rev = IMX_CHIP_REVISION_1_2 }, |
33 | { .srev = 0x28, .name = "i.MX31", .rev = IMX_CHIP_REVISION_2_0 }, | 33 | { .srev = 0x28, .name = "i.MX31", .v = "2.0", .rev = IMX_CHIP_REVISION_2_0 }, |
34 | { .srev = 0x29, .name = "i.MX31L", .rev = IMX_CHIP_REVISION_2_0 }, | 34 | { .srev = 0x29, .name = "i.MX31L", .v = "2.0", .rev = IMX_CHIP_REVISION_2_0 }, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static int mx31_read_cpu_rev(void) | 37 | void __init mx31_read_cpu_rev(void) |
38 | { | 38 | { |
39 | u32 i, srev; | 39 | u32 i, srev; |
40 | 40 | ||
41 | /* read SREV register from IIM module */ | 41 | /* read SREV register from IIM module */ |
42 | srev = __raw_readl(MX31_IO_ADDRESS(MX31_IIM_BASE_ADDR + MXC_IIMSREV)); | 42 | srev = __raw_readl(MX31_IO_ADDRESS(MX31_IIM_BASE_ADDR + MXC_IIMSREV)); |
43 | srev &= 0xff; | ||
44 | 43 | ||
45 | for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++) | 44 | for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++) |
46 | if (srev == mx31_cpu_type[i].srev) { | 45 | if (srev == mx31_cpu_type[i].srev) { |
47 | imx_print_silicon_rev(mx31_cpu_type[i].name, | 46 | printk(KERN_INFO |
48 | mx31_cpu_type[i].rev); | 47 | "CPU identified as %s, silicon rev %s\n", |
49 | return mx31_cpu_type[i].rev; | 48 | mx31_cpu_type[i].name, mx31_cpu_type[i].v); |
50 | } | ||
51 | 49 | ||
52 | imx_print_silicon_rev("i.MX31", IMX_CHIP_REVISION_UNKNOWN); | 50 | mx31_cpu_rev = mx31_cpu_type[i].rev; |
53 | return IMX_CHIP_REVISION_UNKNOWN; | 51 | return; |
54 | } | 52 | } |
55 | 53 | ||
56 | int mx31_revision(void) | 54 | mx31_cpu_rev = IMX_CHIP_REVISION_UNKNOWN; |
57 | { | ||
58 | if (mx31_cpu_rev == -1) | ||
59 | mx31_cpu_rev = mx31_read_cpu_rev(); | ||
60 | 55 | ||
61 | return mx31_cpu_rev; | 56 | printk(KERN_WARNING "Unknown CPU identifier. srev = %02x\n", srev); |
62 | } | 57 | } |
63 | EXPORT_SYMBOL(mx31_revision); | ||
diff --git a/arch/arm/mach-imx/cpu-imx35.c b/arch/arm/mach-imx/cpu-imx35.c index ec3aaa098c1..6637cd819ec 100644 --- a/arch/arm/mach-imx/cpu-imx35.c +++ b/arch/arm/mach-imx/cpu-imx35.c | |||
@@ -10,34 +10,35 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
13 | #include <mach/hardware.h> | ||
14 | #include <mach/iim.h> | ||
13 | 15 | ||
14 | #include "hardware.h" | 16 | unsigned int mx35_cpu_rev; |
15 | #include "iim.h" | 17 | EXPORT_SYMBOL(mx35_cpu_rev); |
16 | 18 | ||
17 | static int mx35_cpu_rev = -1; | 19 | void __init mx35_read_cpu_rev(void) |
18 | |||
19 | static int mx35_read_cpu_rev(void) | ||
20 | { | 20 | { |
21 | u32 rev; | 21 | u32 rev; |
22 | char *srev; | ||
22 | 23 | ||
23 | rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV)); | 24 | rev = __raw_readl(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSREV)); |
24 | switch (rev) { | 25 | switch (rev) { |
25 | case 0x00: | 26 | case 0x00: |
26 | return IMX_CHIP_REVISION_1_0; | 27 | mx35_cpu_rev = IMX_CHIP_REVISION_1_0; |
28 | srev = "1.0"; | ||
29 | break; | ||
27 | case 0x10: | 30 | case 0x10: |
28 | return IMX_CHIP_REVISION_2_0; | 31 | mx35_cpu_rev = IMX_CHIP_REVISION_2_0; |
32 | srev = "2.0"; | ||
33 | break; | ||
29 | case 0x11: | 34 | case 0x11: |
30 | return IMX_CHIP_REVISION_2_1; | 35 | mx35_cpu_rev = IMX_CHIP_REVISION_2_1; |
36 | srev = "2.1"; | ||
37 | break; | ||
31 | default: | 38 | default: |
32 | return IMX_CHIP_REVISION_UNKNOWN; | 39 | mx35_cpu_rev = IMX_CHIP_REVISION_UNKNOWN; |
40 | srev = "unknown"; | ||
33 | } | 41 | } |
34 | } | ||
35 | |||
36 | int mx35_revision(void) | ||
37 | { | ||
38 | if (mx35_cpu_rev == -1) | ||
39 | mx35_cpu_rev = mx35_read_cpu_rev(); | ||
40 | 42 | ||
41 | return mx35_cpu_rev; | 43 | printk(KERN_INFO "CPU identified as i.MX35, silicon rev %s\n", srev); |
42 | } | 44 | } |
43 | EXPORT_SYMBOL(mx35_revision); | ||
diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c deleted file mode 100644 index d88760014ff..00000000000 --- a/arch/arm/mach-imx/cpu-imx5.c +++ /dev/null | |||
@@ -1,148 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
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: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | * | ||
11 | * This file contains the CPU initialization code. | ||
12 | */ | ||
13 | |||
14 | #include <linux/types.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/io.h> | ||
19 | |||
20 | #include "hardware.h" | ||
21 | |||
22 | static int mx5_cpu_rev = -1; | ||
23 | |||
24 | #define IIM_SREV 0x24 | ||
25 | #define MX50_HW_ADADIG_DIGPROG 0xB0 | ||
26 | |||
27 | static int get_mx51_srev(void) | ||
28 | { | ||
29 | void __iomem *iim_base = MX51_IO_ADDRESS(MX51_IIM_BASE_ADDR); | ||
30 | u32 rev = readl(iim_base + IIM_SREV) & 0xff; | ||
31 | |||
32 | switch (rev) { | ||
33 | case 0x0: | ||
34 | return IMX_CHIP_REVISION_2_0; | ||
35 | case 0x10: | ||
36 | return IMX_CHIP_REVISION_3_0; | ||
37 | default: | ||
38 | return IMX_CHIP_REVISION_UNKNOWN; | ||
39 | } | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | * Returns: | ||
44 | * the silicon revision of the cpu | ||
45 | * -EINVAL - not a mx51 | ||
46 | */ | ||
47 | int mx51_revision(void) | ||
48 | { | ||
49 | if (!cpu_is_mx51()) | ||
50 | return -EINVAL; | ||
51 | |||
52 | if (mx5_cpu_rev == -1) | ||
53 | mx5_cpu_rev = get_mx51_srev(); | ||
54 | |||
55 | return mx5_cpu_rev; | ||
56 | } | ||
57 | EXPORT_SYMBOL(mx51_revision); | ||
58 | |||
59 | #ifdef CONFIG_NEON | ||
60 | |||
61 | /* | ||
62 | * All versions of the silicon before Rev. 3 have broken NEON implementations. | ||
63 | * Dependent on link order - so the assumption is that vfp_init is called | ||
64 | * before us. | ||
65 | */ | ||
66 | int __init mx51_neon_fixup(void) | ||
67 | { | ||
68 | if (mx51_revision() < IMX_CHIP_REVISION_3_0 && | ||
69 | (elf_hwcap & HWCAP_NEON)) { | ||
70 | elf_hwcap &= ~HWCAP_NEON; | ||
71 | pr_info("Turning off NEON support, detected broken NEON implementation\n"); | ||
72 | } | ||
73 | return 0; | ||
74 | } | ||
75 | |||
76 | #endif | ||
77 | |||
78 | static int get_mx53_srev(void) | ||
79 | { | ||
80 | void __iomem *iim_base = MX51_IO_ADDRESS(MX53_IIM_BASE_ADDR); | ||
81 | u32 rev = readl(iim_base + IIM_SREV) & 0xff; | ||
82 | |||
83 | switch (rev) { | ||
84 | case 0x0: | ||
85 | return IMX_CHIP_REVISION_1_0; | ||
86 | case 0x2: | ||
87 | return IMX_CHIP_REVISION_2_0; | ||
88 | case 0x3: | ||
89 | return IMX_CHIP_REVISION_2_1; | ||
90 | default: | ||
91 | return IMX_CHIP_REVISION_UNKNOWN; | ||
92 | } | ||
93 | } | ||
94 | |||
95 | /* | ||
96 | * Returns: | ||
97 | * the silicon revision of the cpu | ||
98 | * -EINVAL - not a mx53 | ||
99 | */ | ||
100 | int mx53_revision(void) | ||
101 | { | ||
102 | if (!cpu_is_mx53()) | ||
103 | return -EINVAL; | ||
104 | |||
105 | if (mx5_cpu_rev == -1) | ||
106 | mx5_cpu_rev = get_mx53_srev(); | ||
107 | |||
108 | return mx5_cpu_rev; | ||
109 | } | ||
110 | EXPORT_SYMBOL(mx53_revision); | ||
111 | |||
112 | static int get_mx50_srev(void) | ||
113 | { | ||
114 | void __iomem *anatop = ioremap(MX50_ANATOP_BASE_ADDR, SZ_8K); | ||
115 | u32 rev; | ||
116 | |||
117 | if (!anatop) { | ||
118 | mx5_cpu_rev = -EINVAL; | ||
119 | return 0; | ||
120 | } | ||
121 | |||
122 | rev = readl(anatop + MX50_HW_ADADIG_DIGPROG); | ||
123 | rev &= 0xff; | ||
124 | |||
125 | iounmap(anatop); | ||
126 | if (rev == 0x0) | ||
127 | return IMX_CHIP_REVISION_1_0; | ||
128 | else if (rev == 0x1) | ||
129 | return IMX_CHIP_REVISION_1_1; | ||
130 | return 0; | ||
131 | } | ||
132 | |||
133 | /* | ||
134 | * Returns: | ||
135 | * the silicon revision of the cpu | ||
136 | * -EINVAL - not a mx50 | ||
137 | */ | ||
138 | int mx50_revision(void) | ||
139 | { | ||
140 | if (!cpu_is_mx50()) | ||
141 | return -EINVAL; | ||
142 | |||
143 | if (mx5_cpu_rev == -1) | ||
144 | mx5_cpu_rev = get_mx50_srev(); | ||
145 | |||
146 | return mx5_cpu_rev; | ||
147 | } | ||
148 | EXPORT_SYMBOL(mx50_revision); | ||
diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c deleted file mode 100644 index 03fcbd08259..00000000000 --- a/arch/arm/mach-imx/cpu.c +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | |||
2 | #include <linux/module.h> | ||
3 | #include <linux/io.h> | ||
4 | |||
5 | #include "hardware.h" | ||
6 | |||
7 | unsigned int __mxc_cpu_type; | ||
8 | EXPORT_SYMBOL(__mxc_cpu_type); | ||
9 | |||
10 | void mxc_set_cpu_type(unsigned int type) | ||
11 | { | ||
12 | __mxc_cpu_type = type; | ||
13 | } | ||
14 | |||
15 | void imx_print_silicon_rev(const char *cpu, int srev) | ||
16 | { | ||
17 | if (srev == IMX_CHIP_REVISION_UNKNOWN) | ||
18 | pr_info("CPU identified as %s, unknown revision\n", cpu); | ||
19 | else | ||
20 | pr_info("CPU identified as %s, silicon rev %d.%d\n", | ||
21 | cpu, (srev >> 4) & 0xf, srev & 0xf); | ||
22 | } | ||
23 | |||
24 | void __init imx_set_aips(void __iomem *base) | ||
25 | { | ||
26 | unsigned int reg; | ||
27 | /* | ||
28 | * Set all MPROTx to be non-bufferable, trusted for R/W, | ||
29 | * not forced to user-mode. | ||
30 | */ | ||
31 | __raw_writel(0x77777777, base + 0x0); | ||
32 | __raw_writel(0x77777777, base + 0x4); | ||
33 | |||
34 | /* | ||
35 | * Set all OPACRx to be non-bufferable, to not require | ||
36 | * supervisor privilege level for access, allow for | ||
37 | * write access and untrusted master access. | ||
38 | */ | ||
39 | __raw_writel(0x0, base + 0x40); | ||
40 | __raw_writel(0x0, base + 0x44); | ||
41 | __raw_writel(0x0, base + 0x48); | ||
42 | __raw_writel(0x0, base + 0x4C); | ||
43 | reg = __raw_readl(base + 0x50) & 0x00FFFFFF; | ||
44 | __raw_writel(reg, base + 0x50); | ||
45 | } | ||
diff --git a/arch/arm/mach-imx/cpu_op-mx51.c b/arch/arm/mach-imx/cpu_op-mx51.c deleted file mode 100644 index b9ef692b61a..00000000000 --- a/arch/arm/mach-imx/cpu_op-mx51.c +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | #include <linux/bug.h> | ||
15 | #include <linux/types.h> | ||
16 | #include <linux/kernel.h> | ||
17 | |||
18 | #include "hardware.h" | ||
19 | |||
20 | static struct cpu_op mx51_cpu_op[] = { | ||
21 | { | ||
22 | .cpu_rate = 160000000,}, | ||
23 | { | ||
24 | .cpu_rate = 800000000,}, | ||
25 | }; | ||
26 | |||
27 | struct cpu_op *mx51_get_cpu_op(int *op) | ||
28 | { | ||
29 | *op = ARRAY_SIZE(mx51_cpu_op); | ||
30 | return mx51_cpu_op; | ||
31 | } | ||
diff --git a/arch/arm/mach-imx/cpu_op-mx51.h b/arch/arm/mach-imx/cpu_op-mx51.h deleted file mode 100644 index 97477fecb46..00000000000 --- a/arch/arm/mach-imx/cpu_op-mx51.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | extern struct cpu_op *mx51_get_cpu_op(int *op); | ||
diff --git a/arch/arm/mach-imx/cpufreq.c b/arch/arm/mach-imx/cpufreq.c deleted file mode 100644 index d8c75c3c925..00000000000 --- a/arch/arm/mach-imx/cpufreq.c +++ /dev/null | |||
@@ -1,206 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | /* | ||
15 | * A driver for the Freescale Semiconductor i.MXC CPUfreq module. | ||
16 | * The CPUFREQ driver is for controlling CPU frequency. It allows you to change | ||
17 | * the CPU clock speed on the fly. | ||
18 | */ | ||
19 | |||
20 | #include <linux/module.h> | ||
21 | #include <linux/cpufreq.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/err.h> | ||
24 | #include <linux/slab.h> | ||
25 | |||
26 | #include "hardware.h" | ||
27 | |||
28 | #define CLK32_FREQ 32768 | ||
29 | #define NANOSECOND (1000 * 1000 * 1000) | ||
30 | |||
31 | struct cpu_op *(*get_cpu_op)(int *op); | ||
32 | |||
33 | static int cpu_freq_khz_min; | ||
34 | static int cpu_freq_khz_max; | ||
35 | |||
36 | static struct clk *cpu_clk; | ||
37 | static struct cpufreq_frequency_table *imx_freq_table; | ||
38 | |||
39 | static int cpu_op_nr; | ||
40 | static struct cpu_op *cpu_op_tbl; | ||
41 | |||
42 | static int set_cpu_freq(int freq) | ||
43 | { | ||
44 | int ret = 0; | ||
45 | int org_cpu_rate; | ||
46 | |||
47 | org_cpu_rate = clk_get_rate(cpu_clk); | ||
48 | if (org_cpu_rate == freq) | ||
49 | return ret; | ||
50 | |||
51 | ret = clk_set_rate(cpu_clk, freq); | ||
52 | if (ret != 0) { | ||
53 | printk(KERN_DEBUG "cannot set CPU clock rate\n"); | ||
54 | return ret; | ||
55 | } | ||
56 | |||
57 | return ret; | ||
58 | } | ||
59 | |||
60 | static int mxc_verify_speed(struct cpufreq_policy *policy) | ||
61 | { | ||
62 | if (policy->cpu != 0) | ||
63 | return -EINVAL; | ||
64 | |||
65 | return cpufreq_frequency_table_verify(policy, imx_freq_table); | ||
66 | } | ||
67 | |||
68 | static unsigned int mxc_get_speed(unsigned int cpu) | ||
69 | { | ||
70 | if (cpu) | ||
71 | return 0; | ||
72 | |||
73 | return clk_get_rate(cpu_clk) / 1000; | ||
74 | } | ||
75 | |||
76 | static int mxc_set_target(struct cpufreq_policy *policy, | ||
77 | unsigned int target_freq, unsigned int relation) | ||
78 | { | ||
79 | struct cpufreq_freqs freqs; | ||
80 | int freq_Hz; | ||
81 | int ret = 0; | ||
82 | unsigned int index; | ||
83 | |||
84 | cpufreq_frequency_table_target(policy, imx_freq_table, | ||
85 | target_freq, relation, &index); | ||
86 | freq_Hz = imx_freq_table[index].frequency * 1000; | ||
87 | |||
88 | freqs.old = clk_get_rate(cpu_clk) / 1000; | ||
89 | freqs.new = freq_Hz / 1000; | ||
90 | freqs.cpu = 0; | ||
91 | freqs.flags = 0; | ||
92 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | ||
93 | |||
94 | ret = set_cpu_freq(freq_Hz); | ||
95 | |||
96 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | ||
97 | |||
98 | return ret; | ||
99 | } | ||
100 | |||
101 | static int mxc_cpufreq_init(struct cpufreq_policy *policy) | ||
102 | { | ||
103 | int ret; | ||
104 | int i; | ||
105 | |||
106 | printk(KERN_INFO "i.MXC CPU frequency driver\n"); | ||
107 | |||
108 | if (policy->cpu != 0) | ||
109 | return -EINVAL; | ||
110 | |||
111 | if (!get_cpu_op) | ||
112 | return -EINVAL; | ||
113 | |||
114 | cpu_clk = clk_get(NULL, "cpu_clk"); | ||
115 | if (IS_ERR(cpu_clk)) { | ||
116 | printk(KERN_ERR "%s: failed to get cpu clock\n", __func__); | ||
117 | return PTR_ERR(cpu_clk); | ||
118 | } | ||
119 | |||
120 | cpu_op_tbl = get_cpu_op(&cpu_op_nr); | ||
121 | |||
122 | cpu_freq_khz_min = cpu_op_tbl[0].cpu_rate / 1000; | ||
123 | cpu_freq_khz_max = cpu_op_tbl[0].cpu_rate / 1000; | ||
124 | |||
125 | imx_freq_table = kmalloc( | ||
126 | sizeof(struct cpufreq_frequency_table) * (cpu_op_nr + 1), | ||
127 | GFP_KERNEL); | ||
128 | if (!imx_freq_table) { | ||
129 | ret = -ENOMEM; | ||
130 | goto err1; | ||
131 | } | ||
132 | |||
133 | for (i = 0; i < cpu_op_nr; i++) { | ||
134 | imx_freq_table[i].index = i; | ||
135 | imx_freq_table[i].frequency = cpu_op_tbl[i].cpu_rate / 1000; | ||
136 | |||
137 | if ((cpu_op_tbl[i].cpu_rate / 1000) < cpu_freq_khz_min) | ||
138 | cpu_freq_khz_min = cpu_op_tbl[i].cpu_rate / 1000; | ||
139 | |||
140 | if ((cpu_op_tbl[i].cpu_rate / 1000) > cpu_freq_khz_max) | ||
141 | cpu_freq_khz_max = cpu_op_tbl[i].cpu_rate / 1000; | ||
142 | } | ||
143 | |||
144 | imx_freq_table[i].index = i; | ||
145 | imx_freq_table[i].frequency = CPUFREQ_TABLE_END; | ||
146 | |||
147 | policy->cur = clk_get_rate(cpu_clk) / 1000; | ||
148 | policy->min = policy->cpuinfo.min_freq = cpu_freq_khz_min; | ||
149 | policy->max = policy->cpuinfo.max_freq = cpu_freq_khz_max; | ||
150 | |||
151 | /* Manual states, that PLL stabilizes in two CLK32 periods */ | ||
152 | policy->cpuinfo.transition_latency = 2 * NANOSECOND / CLK32_FREQ; | ||
153 | |||
154 | ret = cpufreq_frequency_table_cpuinfo(policy, imx_freq_table); | ||
155 | |||
156 | if (ret < 0) { | ||
157 | printk(KERN_ERR "%s: failed to register i.MXC CPUfreq with error code %d\n", | ||
158 | __func__, ret); | ||
159 | goto err; | ||
160 | } | ||
161 | |||
162 | cpufreq_frequency_table_get_attr(imx_freq_table, policy->cpu); | ||
163 | return 0; | ||
164 | err: | ||
165 | kfree(imx_freq_table); | ||
166 | err1: | ||
167 | clk_put(cpu_clk); | ||
168 | return ret; | ||
169 | } | ||
170 | |||
171 | static int mxc_cpufreq_exit(struct cpufreq_policy *policy) | ||
172 | { | ||
173 | cpufreq_frequency_table_put_attr(policy->cpu); | ||
174 | |||
175 | set_cpu_freq(cpu_freq_khz_max * 1000); | ||
176 | clk_put(cpu_clk); | ||
177 | kfree(imx_freq_table); | ||
178 | return 0; | ||
179 | } | ||
180 | |||
181 | static struct cpufreq_driver mxc_driver = { | ||
182 | .flags = CPUFREQ_STICKY, | ||
183 | .verify = mxc_verify_speed, | ||
184 | .target = mxc_set_target, | ||
185 | .get = mxc_get_speed, | ||
186 | .init = mxc_cpufreq_init, | ||
187 | .exit = mxc_cpufreq_exit, | ||
188 | .name = "imx", | ||
189 | }; | ||
190 | |||
191 | static int mxc_cpufreq_driver_init(void) | ||
192 | { | ||
193 | return cpufreq_register_driver(&mxc_driver); | ||
194 | } | ||
195 | |||
196 | static void mxc_cpufreq_driver_exit(void) | ||
197 | { | ||
198 | cpufreq_unregister_driver(&mxc_driver); | ||
199 | } | ||
200 | |||
201 | module_init(mxc_cpufreq_driver_init); | ||
202 | module_exit(mxc_cpufreq_driver_exit); | ||
203 | |||
204 | MODULE_AUTHOR("Freescale Semiconductor Inc. Yong Shen <yong.shen@linaro.org>"); | ||
205 | MODULE_DESCRIPTION("CPUfreq driver for i.MX"); | ||
206 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/arm/mach-imx/cpuidle.c b/arch/arm/mach-imx/cpuidle.c deleted file mode 100644 index d4cb511a44a..00000000000 --- a/arch/arm/mach-imx/cpuidle.c +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2012 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/cpuidle.h> | ||
14 | #include <linux/err.h> | ||
15 | #include <linux/hrtimer.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/slab.h> | ||
19 | |||
20 | static struct cpuidle_device __percpu * imx_cpuidle_devices; | ||
21 | |||
22 | static void __init imx_cpuidle_devices_uninit(void) | ||
23 | { | ||
24 | int cpu_id; | ||
25 | struct cpuidle_device *dev; | ||
26 | |||
27 | for_each_possible_cpu(cpu_id) { | ||
28 | dev = per_cpu_ptr(imx_cpuidle_devices, cpu_id); | ||
29 | cpuidle_unregister_device(dev); | ||
30 | } | ||
31 | |||
32 | free_percpu(imx_cpuidle_devices); | ||
33 | } | ||
34 | |||
35 | int __init imx_cpuidle_init(struct cpuidle_driver *drv) | ||
36 | { | ||
37 | struct cpuidle_device *dev; | ||
38 | int cpu_id, ret; | ||
39 | |||
40 | if (drv->state_count > CPUIDLE_STATE_MAX) { | ||
41 | pr_err("%s: state_count exceeds maximum\n", __func__); | ||
42 | return -EINVAL; | ||
43 | } | ||
44 | |||
45 | ret = cpuidle_register_driver(drv); | ||
46 | if (ret) { | ||
47 | pr_err("%s: Failed to register cpuidle driver with error: %d\n", | ||
48 | __func__, ret); | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | imx_cpuidle_devices = alloc_percpu(struct cpuidle_device); | ||
53 | if (imx_cpuidle_devices == NULL) { | ||
54 | ret = -ENOMEM; | ||
55 | goto unregister_drv; | ||
56 | } | ||
57 | |||
58 | /* initialize state data for each cpuidle_device */ | ||
59 | for_each_possible_cpu(cpu_id) { | ||
60 | dev = per_cpu_ptr(imx_cpuidle_devices, cpu_id); | ||
61 | dev->cpu = cpu_id; | ||
62 | dev->state_count = drv->state_count; | ||
63 | |||
64 | ret = cpuidle_register_device(dev); | ||
65 | if (ret) { | ||
66 | pr_err("%s: Failed to register cpu %u, error: %d\n", | ||
67 | __func__, cpu_id, ret); | ||
68 | goto uninit; | ||
69 | } | ||
70 | } | ||
71 | |||
72 | return 0; | ||
73 | |||
74 | uninit: | ||
75 | imx_cpuidle_devices_uninit(); | ||
76 | |||
77 | unregister_drv: | ||
78 | cpuidle_unregister_driver(drv); | ||
79 | return ret; | ||
80 | } | ||
diff --git a/arch/arm/mach-imx/cpuidle.h b/arch/arm/mach-imx/cpuidle.h deleted file mode 100644 index bc932d1af37..00000000000 --- a/arch/arm/mach-imx/cpuidle.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2012 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/cpuidle.h> | ||
14 | |||
15 | #ifdef CONFIG_CPU_IDLE | ||
16 | extern int imx_cpuidle_init(struct cpuidle_driver *drv); | ||
17 | #else | ||
18 | static inline int imx_cpuidle_init(struct cpuidle_driver *drv) | ||
19 | { | ||
20 | return -ENODEV; | ||
21 | } | ||
22 | #endif | ||
diff --git a/arch/arm/mach-imx/crm-regs-imx5.h b/arch/arm/mach-imx/crm-regs-imx5.h deleted file mode 100644 index 5e3f1f0f4ca..00000000000 --- a/arch/arm/mach-imx/crm-regs-imx5.h +++ /dev/null | |||
@@ -1,600 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
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: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | #ifndef __ARCH_ARM_MACH_MX51_CRM_REGS_H__ | ||
12 | #define __ARCH_ARM_MACH_MX51_CRM_REGS_H__ | ||
13 | |||
14 | #define MX51_CCM_BASE MX51_IO_ADDRESS(MX51_CCM_BASE_ADDR) | ||
15 | #define MX51_DPLL1_BASE MX51_IO_ADDRESS(MX51_PLL1_BASE_ADDR) | ||
16 | #define MX51_DPLL2_BASE MX51_IO_ADDRESS(MX51_PLL2_BASE_ADDR) | ||
17 | #define MX51_DPLL3_BASE MX51_IO_ADDRESS(MX51_PLL3_BASE_ADDR) | ||
18 | #define MX51_CORTEXA8_BASE MX51_IO_ADDRESS(MX51_ARM_BASE_ADDR) | ||
19 | #define MX51_GPC_BASE MX51_IO_ADDRESS(MX51_GPC_BASE_ADDR) | ||
20 | |||
21 | /*MX53*/ | ||
22 | #define MX53_CCM_BASE MX53_IO_ADDRESS(MX53_CCM_BASE_ADDR) | ||
23 | #define MX53_DPLL1_BASE MX53_IO_ADDRESS(MX53_PLL1_BASE_ADDR) | ||
24 | #define MX53_DPLL2_BASE MX53_IO_ADDRESS(MX53_PLL2_BASE_ADDR) | ||
25 | #define MX53_DPLL3_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR) | ||
26 | #define MX53_DPLL4_BASE MX53_IO_ADDRESS(MX53_PLL4_BASE_ADDR) | ||
27 | |||
28 | /* PLL Register Offsets */ | ||
29 | #define MXC_PLL_DP_CTL 0x00 | ||
30 | #define MXC_PLL_DP_CONFIG 0x04 | ||
31 | #define MXC_PLL_DP_OP 0x08 | ||
32 | #define MXC_PLL_DP_MFD 0x0C | ||
33 | #define MXC_PLL_DP_MFN 0x10 | ||
34 | #define MXC_PLL_DP_MFNMINUS 0x14 | ||
35 | #define MXC_PLL_DP_MFNPLUS 0x18 | ||
36 | #define MXC_PLL_DP_HFS_OP 0x1C | ||
37 | #define MXC_PLL_DP_HFS_MFD 0x20 | ||
38 | #define MXC_PLL_DP_HFS_MFN 0x24 | ||
39 | #define MXC_PLL_DP_MFN_TOGC 0x28 | ||
40 | #define MXC_PLL_DP_DESTAT 0x2c | ||
41 | |||
42 | /* PLL Register Bit definitions */ | ||
43 | #define MXC_PLL_DP_CTL_MUL_CTRL 0x2000 | ||
44 | #define MXC_PLL_DP_CTL_DPDCK0_2_EN 0x1000 | ||
45 | #define MXC_PLL_DP_CTL_DPDCK0_2_OFFSET 12 | ||
46 | #define MXC_PLL_DP_CTL_ADE 0x800 | ||
47 | #define MXC_PLL_DP_CTL_REF_CLK_DIV 0x400 | ||
48 | #define MXC_PLL_DP_CTL_REF_CLK_SEL_MASK (3 << 8) | ||
49 | #define MXC_PLL_DP_CTL_REF_CLK_SEL_OFFSET 8 | ||
50 | #define MXC_PLL_DP_CTL_HFSM 0x80 | ||
51 | #define MXC_PLL_DP_CTL_PRE 0x40 | ||
52 | #define MXC_PLL_DP_CTL_UPEN 0x20 | ||
53 | #define MXC_PLL_DP_CTL_RST 0x10 | ||
54 | #define MXC_PLL_DP_CTL_RCP 0x8 | ||
55 | #define MXC_PLL_DP_CTL_PLM 0x4 | ||
56 | #define MXC_PLL_DP_CTL_BRM0 0x2 | ||
57 | #define MXC_PLL_DP_CTL_LRF 0x1 | ||
58 | |||
59 | #define MXC_PLL_DP_CONFIG_BIST 0x8 | ||
60 | #define MXC_PLL_DP_CONFIG_SJC_CE 0x4 | ||
61 | #define MXC_PLL_DP_CONFIG_AREN 0x2 | ||
62 | #define MXC_PLL_DP_CONFIG_LDREQ 0x1 | ||
63 | |||
64 | #define MXC_PLL_DP_OP_MFI_OFFSET 4 | ||
65 | #define MXC_PLL_DP_OP_MFI_MASK (0xF << 4) | ||
66 | #define MXC_PLL_DP_OP_PDF_OFFSET 0 | ||
67 | #define MXC_PLL_DP_OP_PDF_MASK 0xF | ||
68 | |||
69 | #define MXC_PLL_DP_MFD_OFFSET 0 | ||
70 | #define MXC_PLL_DP_MFD_MASK 0x07FFFFFF | ||
71 | |||
72 | #define MXC_PLL_DP_MFN_OFFSET 0x0 | ||
73 | #define MXC_PLL_DP_MFN_MASK 0x07FFFFFF | ||
74 | |||
75 | #define MXC_PLL_DP_MFN_TOGC_TOG_DIS (1 << 17) | ||
76 | #define MXC_PLL_DP_MFN_TOGC_TOG_EN (1 << 16) | ||
77 | #define MXC_PLL_DP_MFN_TOGC_CNT_OFFSET 0x0 | ||
78 | #define MXC_PLL_DP_MFN_TOGC_CNT_MASK 0xFFFF | ||
79 | |||
80 | #define MXC_PLL_DP_DESTAT_TOG_SEL (1 << 31) | ||
81 | #define MXC_PLL_DP_DESTAT_MFN 0x07FFFFFF | ||
82 | |||
83 | /* Register addresses of CCM*/ | ||
84 | #define MXC_CCM_CCR (MX51_CCM_BASE + 0x00) | ||
85 | #define MXC_CCM_CCDR (MX51_CCM_BASE + 0x04) | ||
86 | #define MXC_CCM_CSR (MX51_CCM_BASE + 0x08) | ||
87 | #define MXC_CCM_CCSR (MX51_CCM_BASE + 0x0C) | ||
88 | #define MXC_CCM_CACRR (MX51_CCM_BASE + 0x10) | ||
89 | #define MXC_CCM_CBCDR (MX51_CCM_BASE + 0x14) | ||
90 | #define MXC_CCM_CBCMR (MX51_CCM_BASE + 0x18) | ||
91 | #define MXC_CCM_CSCMR1 (MX51_CCM_BASE + 0x1C) | ||
92 | #define MXC_CCM_CSCMR2 (MX51_CCM_BASE + 0x20) | ||
93 | #define MXC_CCM_CSCDR1 (MX51_CCM_BASE + 0x24) | ||
94 | #define MXC_CCM_CS1CDR (MX51_CCM_BASE + 0x28) | ||
95 | #define MXC_CCM_CS2CDR (MX51_CCM_BASE + 0x2C) | ||
96 | #define MXC_CCM_CDCDR (MX51_CCM_BASE + 0x30) | ||
97 | #define MXC_CCM_CHSCDR (MX51_CCM_BASE + 0x34) | ||
98 | #define MXC_CCM_CSCDR2 (MX51_CCM_BASE + 0x38) | ||
99 | #define MXC_CCM_CSCDR3 (MX51_CCM_BASE + 0x3C) | ||
100 | #define MXC_CCM_CSCDR4 (MX51_CCM_BASE + 0x40) | ||
101 | #define MXC_CCM_CWDR (MX51_CCM_BASE + 0x44) | ||
102 | #define MXC_CCM_CDHIPR (MX51_CCM_BASE + 0x48) | ||
103 | #define MXC_CCM_CDCR (MX51_CCM_BASE + 0x4C) | ||
104 | #define MXC_CCM_CTOR (MX51_CCM_BASE + 0x50) | ||
105 | #define MXC_CCM_CLPCR (MX51_CCM_BASE + 0x54) | ||
106 | #define MXC_CCM_CISR (MX51_CCM_BASE + 0x58) | ||
107 | #define MXC_CCM_CIMR (MX51_CCM_BASE + 0x5C) | ||
108 | #define MXC_CCM_CCOSR (MX51_CCM_BASE + 0x60) | ||
109 | #define MXC_CCM_CGPR (MX51_CCM_BASE + 0x64) | ||
110 | #define MXC_CCM_CCGR0 (MX51_CCM_BASE + 0x68) | ||
111 | #define MXC_CCM_CCGR1 (MX51_CCM_BASE + 0x6C) | ||
112 | #define MXC_CCM_CCGR2 (MX51_CCM_BASE + 0x70) | ||
113 | #define MXC_CCM_CCGR3 (MX51_CCM_BASE + 0x74) | ||
114 | #define MXC_CCM_CCGR4 (MX51_CCM_BASE + 0x78) | ||
115 | #define MXC_CCM_CCGR5 (MX51_CCM_BASE + 0x7C) | ||
116 | #define MXC_CCM_CCGR6 (MX51_CCM_BASE + 0x80) | ||
117 | #define MXC_CCM_CCGR7 (MX51_CCM_BASE + 0x84) | ||
118 | |||
119 | #define MXC_CCM_CMEOR (MX51_CCM_BASE + 0x84) | ||
120 | |||
121 | /* Define the bits in register CCR */ | ||
122 | #define MXC_CCM_CCR_COSC_EN (1 << 12) | ||
123 | #define MXC_CCM_CCR_FPM_MULT_MASK (1 << 11) | ||
124 | #define MXC_CCM_CCR_CAMP2_EN (1 << 10) | ||
125 | #define MXC_CCM_CCR_CAMP1_EN (1 << 9) | ||
126 | #define MXC_CCM_CCR_FPM_EN (1 << 8) | ||
127 | #define MXC_CCM_CCR_OSCNT_OFFSET (0) | ||
128 | #define MXC_CCM_CCR_OSCNT_MASK (0xFF) | ||
129 | |||
130 | /* Define the bits in register CCDR */ | ||
131 | #define MXC_CCM_CCDR_HSC_HS_MASK (0x1 << 18) | ||
132 | #define MXC_CCM_CCDR_IPU_HS_MASK (0x1 << 17) | ||
133 | #define MXC_CCM_CCDR_EMI_HS_MASK (0x1 << 16) | ||
134 | |||
135 | /* Define the bits in register CSR */ | ||
136 | #define MXC_CCM_CSR_COSR_READY (1 << 5) | ||
137 | #define MXC_CCM_CSR_LVS_VALUE (1 << 4) | ||
138 | #define MXC_CCM_CSR_CAMP2_READY (1 << 3) | ||
139 | #define MXC_CCM_CSR_CAMP1_READY (1 << 2) | ||
140 | #define MXC_CCM_CSR_FPM_READY (1 << 1) | ||
141 | #define MXC_CCM_CSR_REF_EN_B (1 << 0) | ||
142 | |||
143 | /* Define the bits in register CCSR */ | ||
144 | #define MXC_CCM_CCSR_LP_APM_SEL (0x1 << 9) | ||
145 | #define MXC_CCM_CCSR_STEP_SEL_OFFSET (7) | ||
146 | #define MXC_CCM_CCSR_STEP_SEL_MASK (0x3 << 7) | ||
147 | #define MXC_CCM_CCSR_STEP_SEL_LP_APM 0 | ||
148 | #define MXC_CCM_CCSR_STEP_SEL_PLL1_BYPASS 1 /* Only when JTAG connected? */ | ||
149 | #define MXC_CCM_CCSR_STEP_SEL_PLL2_DIVIDED 2 | ||
150 | #define MXC_CCM_CCSR_STEP_SEL_PLL3_DIVIDED 3 | ||
151 | #define MXC_CCM_CCSR_PLL2_PODF_OFFSET (5) | ||
152 | #define MXC_CCM_CCSR_PLL2_PODF_MASK (0x3 << 5) | ||
153 | #define MXC_CCM_CCSR_PLL3_PODF_OFFSET (3) | ||
154 | #define MXC_CCM_CCSR_PLL3_PODF_MASK (0x3 << 3) | ||
155 | #define MXC_CCM_CCSR_PLL1_SW_CLK_SEL (1 << 2) /* 0: pll1_main_clk, | ||
156 | 1: step_clk */ | ||
157 | #define MXC_CCM_CCSR_PLL2_SW_CLK_SEL (1 << 1) | ||
158 | #define MXC_CCM_CCSR_PLL3_SW_CLK_SEL (1 << 0) | ||
159 | |||
160 | /* Define the bits in register CACRR */ | ||
161 | #define MXC_CCM_CACRR_ARM_PODF_OFFSET (0) | ||
162 | #define MXC_CCM_CACRR_ARM_PODF_MASK (0x7) | ||
163 | |||
164 | /* Define the bits in register CBCDR */ | ||
165 | #define MXC_CCM_CBCDR_EMI_CLK_SEL (0x1 << 26) | ||
166 | #define MXC_CCM_CBCDR_PERIPH_CLK_SEL (0x1 << 25) | ||
167 | #define MXC_CCM_CBCDR_DDR_HF_SEL_OFFSET (30) | ||
168 | #define MXC_CCM_CBCDR_DDR_HF_SEL (0x1 << 30) | ||
169 | #define MXC_CCM_CBCDR_DDR_PODF_OFFSET (27) | ||
170 | #define MXC_CCM_CBCDR_DDR_PODF_MASK (0x7 << 27) | ||
171 | #define MXC_CCM_CBCDR_EMI_PODF_OFFSET (22) | ||
172 | #define MXC_CCM_CBCDR_EMI_PODF_MASK (0x7 << 22) | ||
173 | #define MXC_CCM_CBCDR_AXI_B_PODF_OFFSET (19) | ||
174 | #define MXC_CCM_CBCDR_AXI_B_PODF_MASK (0x7 << 19) | ||
175 | #define MXC_CCM_CBCDR_AXI_A_PODF_OFFSET (16) | ||
176 | #define MXC_CCM_CBCDR_AXI_A_PODF_MASK (0x7 << 16) | ||
177 | #define MXC_CCM_CBCDR_NFC_PODF_OFFSET (13) | ||
178 | #define MXC_CCM_CBCDR_NFC_PODF_MASK (0x7 << 13) | ||
179 | #define MXC_CCM_CBCDR_AHB_PODF_OFFSET (10) | ||
180 | #define MXC_CCM_CBCDR_AHB_PODF_MASK (0x7 << 10) | ||
181 | #define MXC_CCM_CBCDR_IPG_PODF_OFFSET (8) | ||
182 | #define MXC_CCM_CBCDR_IPG_PODF_MASK (0x3 << 8) | ||
183 | #define MXC_CCM_CBCDR_PERCLK_PRED1_OFFSET (6) | ||
184 | #define MXC_CCM_CBCDR_PERCLK_PRED1_MASK (0x3 << 6) | ||
185 | #define MXC_CCM_CBCDR_PERCLK_PRED2_OFFSET (3) | ||
186 | #define MXC_CCM_CBCDR_PERCLK_PRED2_MASK (0x7 << 3) | ||
187 | #define MXC_CCM_CBCDR_PERCLK_PODF_OFFSET (0) | ||
188 | #define MXC_CCM_CBCDR_PERCLK_PODF_MASK (0x7) | ||
189 | |||
190 | /* Define the bits in register CBCMR */ | ||
191 | #define MXC_CCM_CBCMR_VPU_AXI_CLK_SEL_OFFSET (14) | ||
192 | #define MXC_CCM_CBCMR_VPU_AXI_CLK_SEL_MASK (0x3 << 14) | ||
193 | #define MXC_CCM_CBCMR_PERIPH_CLK_SEL_OFFSET (12) | ||
194 | #define MXC_CCM_CBCMR_PERIPH_CLK_SEL_MASK (0x3 << 12) | ||
195 | #define MXC_CCM_CBCMR_DDR_CLK_SEL_OFFSET (10) | ||
196 | #define MXC_CCM_CBCMR_DDR_CLK_SEL_MASK (0x3 << 10) | ||
197 | #define MXC_CCM_CBCMR_ARM_AXI_CLK_SEL_OFFSET (8) | ||
198 | #define MXC_CCM_CBCMR_ARM_AXI_CLK_SEL_MASK (0x3 << 8) | ||
199 | #define MXC_CCM_CBCMR_IPU_HSP_CLK_SEL_OFFSET (6) | ||
200 | #define MXC_CCM_CBCMR_IPU_HSP_CLK_SEL_MASK (0x3 << 6) | ||
201 | #define MXC_CCM_CBCMR_GPU_CLK_SEL_OFFSET (4) | ||
202 | #define MXC_CCM_CBCMR_GPU_CLK_SEL_MASK (0x3 << 4) | ||
203 | #define MXC_CCM_CBCMR_GPU2D_CLK_SEL_OFFSET (14) | ||
204 | #define MXC_CCM_CBCMR_GPU2D_CLK_SEL_MASK (0x3 << 14) | ||
205 | #define MXC_CCM_CBCMR_PERCLK_LP_APM_CLK_SEL (0x1 << 1) | ||
206 | #define MXC_CCM_CBCMR_PERCLK_IPG_CLK_SEL (0x1 << 0) | ||
207 | |||
208 | /* Define the bits in register CSCMR1 */ | ||
209 | #define MXC_CCM_CSCMR1_SSI_EXT2_CLK_SEL_OFFSET (30) | ||
210 | #define MXC_CCM_CSCMR1_SSI_EXT2_CLK_SEL_MASK (0x3 << 30) | ||
211 | #define MXC_CCM_CSCMR1_SSI_EXT1_CLK_SEL_OFFSET (28) | ||
212 | #define MXC_CCM_CSCMR1_SSI_EXT1_CLK_SEL_MASK (0x3 << 28) | ||
213 | #define MXC_CCM_CSCMR1_USB_PHY_CLK_SEL_OFFSET (26) | ||
214 | #define MXC_CCM_CSCMR1_USB_PHY_CLK_SEL (0x1 << 26) | ||
215 | #define MXC_CCM_CSCMR1_UART_CLK_SEL_OFFSET (24) | ||
216 | #define MXC_CCM_CSCMR1_UART_CLK_SEL_MASK (0x3 << 24) | ||
217 | #define MXC_CCM_CSCMR1_USBOH3_CLK_SEL_OFFSET (22) | ||
218 | #define MXC_CCM_CSCMR1_USBOH3_CLK_SEL_MASK (0x3 << 22) | ||
219 | #define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_OFFSET (20) | ||
220 | #define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_MASK (0x3 << 20) | ||
221 | #define MXC_CCM_CSCMR1_ESDHC3_CLK_SEL (0x1 << 19) | ||
222 | #define MXC_CCM_CSCMR1_ESDHC2_MSHC2_MX53_CLK_SEL (0x1 << 19) | ||
223 | #define MXC_CCM_CSCMR1_ESDHC4_CLK_SEL (0x1 << 18) | ||
224 | #define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_OFFSET (16) | ||
225 | #define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_MASK (0x3 << 16) | ||
226 | #define MXC_CCM_CSCMR1_ESDHC3_MX53_CLK_SEL_OFFSET (16) | ||
227 | #define MXC_CCM_CSCMR1_ESDHC3_MX53_CLK_SEL_MASK (0x3 << 16) | ||
228 | #define MXC_CCM_CSCMR1_SSI1_CLK_SEL_OFFSET (14) | ||
229 | #define MXC_CCM_CSCMR1_SSI1_CLK_SEL_MASK (0x3 << 14) | ||
230 | #define MXC_CCM_CSCMR1_SSI2_CLK_SEL_OFFSET (12) | ||
231 | #define MXC_CCM_CSCMR1_SSI2_CLK_SEL_MASK (0x3 << 12) | ||
232 | #define MXC_CCM_CSCMR1_SSI3_CLK_SEL (0x1 << 11) | ||
233 | #define MXC_CCM_CSCMR1_VPU_RCLK_SEL (0x1 << 10) | ||
234 | #define MXC_CCM_CSCMR1_SSI_APM_CLK_SEL_OFFSET (8) | ||
235 | #define MXC_CCM_CSCMR1_SSI_APM_CLK_SEL_MASK (0x3 << 8) | ||
236 | #define MXC_CCM_CSCMR1_TVE_CLK_SEL (0x1 << 7) | ||
237 | #define MXC_CCM_CSCMR1_TVE_EXT_CLK_SEL (0x1 << 6) | ||
238 | #define MXC_CCM_CSCMR1_CSPI_CLK_SEL_OFFSET (4) | ||
239 | #define MXC_CCM_CSCMR1_CSPI_CLK_SEL_MASK (0x3 << 4) | ||
240 | #define MXC_CCM_CSCMR1_SPDIF_CLK_SEL_OFFSET (2) | ||
241 | #define MXC_CCM_CSCMR1_SPDIF_CLK_SEL_MASK (0x3 << 2) | ||
242 | #define MXC_CCM_CSCMR1_SSI_EXT2_COM_CLK_SEL (0x1 << 1) | ||
243 | #define MXC_CCM_CSCMR1_SSI_EXT1_COM_CLK_SEL (0x1) | ||
244 | |||
245 | /* Define the bits in register CSCMR2 */ | ||
246 | #define MXC_CCM_CSCMR2_DI_CLK_SEL_OFFSET(n) (26+n*3) | ||
247 | #define MXC_CCM_CSCMR2_DI_CLK_SEL_MASK(n) (0x7 << (26+n*3)) | ||
248 | #define MXC_CCM_CSCMR2_CSI_MCLK2_CLK_SEL_OFFSET (24) | ||
249 | #define MXC_CCM_CSCMR2_CSI_MCLK2_CLK_SEL_MASK (0x3 << 24) | ||
250 | #define MXC_CCM_CSCMR2_CSI_MCLK1_CLK_SEL_OFFSET (22) | ||
251 | #define MXC_CCM_CSCMR2_CSI_MCLK1_CLK_SEL_MASK (0x3 << 22) | ||
252 | #define MXC_CCM_CSCMR2_ESC_CLK_SEL_OFFSET (20) | ||
253 | #define MXC_CCM_CSCMR2_ESC_CLK_SEL_MASK (0x3 << 20) | ||
254 | #define MXC_CCM_CSCMR2_HSC2_CLK_SEL_OFFSET (18) | ||
255 | #define MXC_CCM_CSCMR2_HSC2_CLK_SEL_MASK (0x3 << 18) | ||
256 | #define MXC_CCM_CSCMR2_HSC1_CLK_SEL_OFFSET (16) | ||
257 | #define MXC_CCM_CSCMR2_HSC1_CLK_SEL_MASK (0x3 << 16) | ||
258 | #define MXC_CCM_CSCMR2_HSI2C_CLK_SEL_OFFSET (14) | ||
259 | #define MXC_CCM_CSCMR2_HSI2C_CLK_SEL_MASK (0x3 << 14) | ||
260 | #define MXC_CCM_CSCMR2_FIRI_CLK_SEL_OFFSET (12) | ||
261 | #define MXC_CCM_CSCMR2_FIRI_CLK_SEL_MASK (0x3 << 12) | ||
262 | #define MXC_CCM_CSCMR2_SIM_CLK_SEL_OFFSET (10) | ||
263 | #define MXC_CCM_CSCMR2_SIM_CLK_SEL_MASK (0x3 << 10) | ||
264 | #define MXC_CCM_CSCMR2_SLIMBUS_COM (0x1 << 9) | ||
265 | #define MXC_CCM_CSCMR2_SLIMBUS_CLK_SEL_OFFSET (6) | ||
266 | #define MXC_CCM_CSCMR2_SLIMBUS_CLK_SEL_MASK (0x7 << 6) | ||
267 | #define MXC_CCM_CSCMR2_SPDIF1_COM (1 << 5) | ||
268 | #define MXC_CCM_CSCMR2_SPDIF0_COM (1 << 4) | ||
269 | #define MXC_CCM_CSCMR2_SPDIF1_CLK_SEL_OFFSET (2) | ||
270 | #define MXC_CCM_CSCMR2_SPDIF1_CLK_SEL_MASK (0x3 << 2) | ||
271 | #define MXC_CCM_CSCMR2_SPDIF0_CLK_SEL_OFFSET (0) | ||
272 | #define MXC_CCM_CSCMR2_SPDIF0_CLK_SEL_MASK (0x3) | ||
273 | |||
274 | /* Define the bits in register CSCDR1 */ | ||
275 | #define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_OFFSET (22) | ||
276 | #define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_MASK (0x7 << 22) | ||
277 | #define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_OFFSET (19) | ||
278 | #define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_MASK (0x7 << 19) | ||
279 | #define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PRED_OFFSET (22) | ||
280 | #define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PRED_MASK (0x7 << 22) | ||
281 | #define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PODF_OFFSET (19) | ||
282 | #define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PODF_MASK (0x7 << 19) | ||
283 | #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_OFFSET (16) | ||
284 | #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_MASK (0x7 << 16) | ||
285 | #define MXC_CCM_CSCDR1_PGC_CLK_PODF_OFFSET (14) | ||
286 | #define MXC_CCM_CSCDR1_PGC_CLK_PODF_MASK (0x3 << 14) | ||
287 | #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_OFFSET (11) | ||
288 | #define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_MASK (0x7 << 11) | ||
289 | #define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_OFFSET (8) | ||
290 | #define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_MASK (0x7 << 8) | ||
291 | #define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_OFFSET (6) | ||
292 | #define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_MASK (0x3 << 6) | ||
293 | #define MXC_CCM_CSCDR1_UART_CLK_PRED_OFFSET (3) | ||
294 | #define MXC_CCM_CSCDR1_UART_CLK_PRED_MASK (0x7 << 3) | ||
295 | #define MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET (0) | ||
296 | #define MXC_CCM_CSCDR1_UART_CLK_PODF_MASK (0x7) | ||
297 | |||
298 | /* Define the bits in register CS1CDR and CS2CDR */ | ||
299 | #define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PRED_OFFSET (22) | ||
300 | #define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PRED_MASK (0x7 << 22) | ||
301 | #define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PODF_OFFSET (16) | ||
302 | #define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PODF_MASK (0x3F << 16) | ||
303 | #define MXC_CCM_CS1CDR_SSI1_CLK_PRED_OFFSET (6) | ||
304 | #define MXC_CCM_CS1CDR_SSI1_CLK_PRED_MASK (0x7 << 6) | ||
305 | #define MXC_CCM_CS1CDR_SSI1_CLK_PODF_OFFSET (0) | ||
306 | #define MXC_CCM_CS1CDR_SSI1_CLK_PODF_MASK (0x3F) | ||
307 | |||
308 | #define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PRED_OFFSET (22) | ||
309 | #define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PRED_MASK (0x7 << 22) | ||
310 | #define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PODF_OFFSET (16) | ||
311 | #define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PODF_MASK (0x3F << 16) | ||
312 | #define MXC_CCM_CS2CDR_SSI2_CLK_PRED_OFFSET (6) | ||
313 | #define MXC_CCM_CS2CDR_SSI2_CLK_PRED_MASK (0x7 << 6) | ||
314 | #define MXC_CCM_CS2CDR_SSI2_CLK_PODF_OFFSET (0) | ||
315 | #define MXC_CCM_CS2CDR_SSI2_CLK_PODF_MASK (0x3F) | ||
316 | |||
317 | /* Define the bits in register CDCDR */ | ||
318 | #define MXC_CCM_CDCDR_TVE_CLK_PRED_OFFSET (28) | ||
319 | #define MXC_CCM_CDCDR_TVE_CLK_PRED_MASK (0x7 << 28) | ||
320 | #define MXC_CCM_CDCDR_SPDIF0_CLK_PRED_OFFSET (25) | ||
321 | #define MXC_CCM_CDCDR_SPDIF0_CLK_PRED_MASK (0x7 << 25) | ||
322 | #define MXC_CCM_CDCDR_SPDIF0_CLK_PODF_OFFSET (19) | ||
323 | #define MXC_CCM_CDCDR_SPDIF0_CLK_PODF_MASK (0x3F << 19) | ||
324 | #define MXC_CCM_CDCDR_SPDIF1_CLK_PRED_OFFSET (16) | ||
325 | #define MXC_CCM_CDCDR_SPDIF1_CLK_PRED_MASK (0x7 << 16) | ||
326 | #define MXC_CCM_CDCDR_SPDIF1_CLK_PODF_OFFSET (9) | ||
327 | #define MXC_CCM_CDCDR_SPDIF1_CLK_PODF_MASK (0x3F << 9) | ||
328 | #define MXC_CCM_CDCDR_DI_CLK_PRED_OFFSET (6) | ||
329 | #define MXC_CCM_CDCDR_DI_CLK_PRED_MASK (0x7 << 6) | ||
330 | #define MXC_CCM_CDCDR_USB_PHY_PRED_OFFSET (3) | ||
331 | #define MXC_CCM_CDCDR_USB_PHY_PRED_MASK (0x7 << 3) | ||
332 | #define MXC_CCM_CDCDR_USB_PHY_PODF_OFFSET (0) | ||
333 | #define MXC_CCM_CDCDR_USB_PHY_PODF_MASK (0x7) | ||
334 | |||
335 | /* Define the bits in register CHSCCDR */ | ||
336 | #define MXC_CCM_CHSCCDR_ESC_CLK_PRED_OFFSET (12) | ||
337 | #define MXC_CCM_CHSCCDR_ESC_CLK_PRED_MASK (0x7 << 12) | ||
338 | #define MXC_CCM_CHSCCDR_ESC_CLK_PODF_OFFSET (6) | ||
339 | #define MXC_CCM_CHSCCDR_ESC_CLK_PODF_MASK (0x3F << 6) | ||
340 | #define MXC_CCM_CHSCCDR_HSC2_CLK_PODF_OFFSET (3) | ||
341 | #define MXC_CCM_CHSCCDR_HSC2_CLK_PODF_MASK (0x7 << 3) | ||
342 | #define MXC_CCM_CHSCCDR_HSC1_CLK_PODF_OFFSET (0) | ||
343 | #define MXC_CCM_CHSCCDR_HSC1_CLK_PODF_MASK (0x7) | ||
344 | |||
345 | /* Define the bits in register CSCDR2 */ | ||
346 | #define MXC_CCM_CSCDR2_CSPI_CLK_PRED_OFFSET (25) | ||
347 | #define MXC_CCM_CSCDR2_CSPI_CLK_PRED_MASK (0x7 << 25) | ||
348 | #define MXC_CCM_CSCDR2_CSPI_CLK_PODF_OFFSET (19) | ||
349 | #define MXC_CCM_CSCDR2_CSPI_CLK_PODF_MASK (0x3F << 19) | ||
350 | #define MXC_CCM_CSCDR2_SIM_CLK_PRED_OFFSET (16) | ||
351 | #define MXC_CCM_CSCDR2_SIM_CLK_PRED_MASK (0x7 << 16) | ||
352 | #define MXC_CCM_CSCDR2_SIM_CLK_PODF_OFFSET (9) | ||
353 | #define MXC_CCM_CSCDR2_SIM_CLK_PODF_MASK (0x3F << 9) | ||
354 | #define MXC_CCM_CSCDR2_SLIMBUS_CLK_PRED_OFFSET (6) | ||
355 | #define MXC_CCM_CSCDR2_SLIMBUS_PRED_MASK (0x7 << 6) | ||
356 | #define MXC_CCM_CSCDR2_SLIMBUS_PODF_OFFSET (0) | ||
357 | #define MXC_CCM_CSCDR2_SLIMBUS_PODF_MASK (0x3F) | ||
358 | |||
359 | /* Define the bits in register CSCDR3 */ | ||
360 | #define MXC_CCM_CSCDR3_HSI2C_CLK_PRED_OFFSET (16) | ||
361 | #define MXC_CCM_CSCDR3_HSI2C_CLK_PRED_MASK (0x7 << 16) | ||
362 | #define MXC_CCM_CSCDR3_HSI2C_CLK_PODF_OFFSET (9) | ||
363 | #define MXC_CCM_CSCDR3_HSI2C_CLK_PODF_MASK (0x3F << 9) | ||
364 | #define MXC_CCM_CSCDR3_FIRI_CLK_PRED_OFFSET (6) | ||
365 | #define MXC_CCM_CSCDR3_FIRI_CLK_PRED_MASK (0x7 << 6) | ||
366 | #define MXC_CCM_CSCDR3_FIRI_CLK_PODF_OFFSET (0) | ||
367 | #define MXC_CCM_CSCDR3_FIRI_CLK_PODF_MASK (0x3F) | ||
368 | |||
369 | /* Define the bits in register CSCDR4 */ | ||
370 | #define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PRED_OFFSET (16) | ||
371 | #define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PRED_MASK (0x7 << 16) | ||
372 | #define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PODF_OFFSET (9) | ||
373 | #define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PODF_MASK (0x3F << 9) | ||
374 | #define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PRED_OFFSET (6) | ||
375 | #define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PRED_MASK (0x7 << 6) | ||
376 | #define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PODF_OFFSET (0) | ||
377 | #define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PODF_MASK (0x3F) | ||
378 | |||
379 | /* Define the bits in register CDHIPR */ | ||
380 | #define MXC_CCM_CDHIPR_ARM_PODF_BUSY (1 << 16) | ||
381 | #define MXC_CCM_CDHIPR_DDR_HF_CLK_SEL_BUSY (1 << 8) | ||
382 | #define MXC_CCM_CDHIPR_DDR_PODF_BUSY (1 << 7) | ||
383 | #define MXC_CCM_CDHIPR_EMI_CLK_SEL_BUSY (1 << 6) | ||
384 | #define MXC_CCM_CDHIPR_PERIPH_CLK_SEL_BUSY (1 << 5) | ||
385 | #define MXC_CCM_CDHIPR_NFC_IPG_INT_MEM_PODF_BUSY (1 << 4) | ||
386 | #define MXC_CCM_CDHIPR_AHB_PODF_BUSY (1 << 3) | ||
387 | #define MXC_CCM_CDHIPR_EMI_PODF_BUSY (1 << 2) | ||
388 | #define MXC_CCM_CDHIPR_AXI_B_PODF_BUSY (1 << 1) | ||
389 | #define MXC_CCM_CDHIPR_AXI_A_PODF_BUSY (1 << 0) | ||
390 | |||
391 | /* Define the bits in register CDCR */ | ||
392 | #define MXC_CCM_CDCR_ARM_FREQ_SHIFT_DIVIDER (0x1 << 2) | ||
393 | #define MXC_CCM_CDCR_PERIPH_CLK_DVFS_PODF_OFFSET (0) | ||
394 | #define MXC_CCM_CDCR_PERIPH_CLK_DVFS_PODF_MASK (0x3) | ||
395 | |||
396 | /* Define the bits in register CLPCR */ | ||
397 | #define MXC_CCM_CLPCR_BYPASS_HSC_LPM_HS (0x1 << 23) | ||
398 | #define MXC_CCM_CLPCR_BYPASS_SCC_LPM_HS (0x1 << 22) | ||
399 | #define MX51_CCM_CLPCR_BYPASS_MAX_LPM_HS (0x1 << 21) | ||
400 | #define MX53_CCM_CLPCR_BYPASS_MAX_LPM_HS (0x1 << 25) | ||
401 | #define MXC_CCM_CLPCR_BYPASS_SDMA_LPM_HS (0x1 << 20) | ||
402 | #define MXC_CCM_CLPCR_BYPASS_EMI_LPM_HS (0x1 << 19) | ||
403 | #define MXC_CCM_CLPCR_BYPASS_IPU_LPM_HS (0x1 << 18) | ||
404 | #define MXC_CCM_CLPCR_BYPASS_RTIC_LPM_HS (0x1 << 17) | ||
405 | #define MXC_CCM_CLPCR_BYPASS_RNGC_LPM_HS (0x1 << 16) | ||
406 | #define MXC_CCM_CLPCR_COSC_PWRDOWN (0x1 << 11) | ||
407 | #define MXC_CCM_CLPCR_STBY_COUNT_OFFSET (9) | ||
408 | #define MXC_CCM_CLPCR_STBY_COUNT_MASK (0x3 << 9) | ||
409 | #define MXC_CCM_CLPCR_VSTBY (0x1 << 8) | ||
410 | #define MXC_CCM_CLPCR_DIS_REF_OSC (0x1 << 7) | ||
411 | #define MXC_CCM_CLPCR_SBYOS (0x1 << 6) | ||
412 | #define MXC_CCM_CLPCR_ARM_CLK_DIS_ON_LPM (0x1 << 5) | ||
413 | #define MXC_CCM_CLPCR_LPSR_CLK_SEL_OFFSET (3) | ||
414 | #define MXC_CCM_CLPCR_LPSR_CLK_SEL_MASK (0x3 << 3) | ||
415 | #define MXC_CCM_CLPCR_LPM_OFFSET (0) | ||
416 | #define MXC_CCM_CLPCR_LPM_MASK (0x3) | ||
417 | |||
418 | /* Define the bits in register CISR */ | ||
419 | #define MXC_CCM_CISR_ARM_PODF_LOADED (0x1 << 25) | ||
420 | #define MXC_CCM_CISR_NFC_IPG_INT_MEM_PODF_LOADED (0x1 << 21) | ||
421 | #define MXC_CCM_CISR_AHB_PODF_LOADED (0x1 << 20) | ||
422 | #define MXC_CCM_CISR_EMI_PODF_LOADED (0x1 << 19) | ||
423 | #define MXC_CCM_CISR_AXI_B_PODF_LOADED (0x1 << 18) | ||
424 | #define MXC_CCM_CISR_AXI_A_PODF_LOADED (0x1 << 17) | ||
425 | #define MXC_CCM_CISR_DIVIDER_LOADED (0x1 << 16) | ||
426 | #define MXC_CCM_CISR_COSC_READY (0x1 << 6) | ||
427 | #define MXC_CCM_CISR_CKIH2_READY (0x1 << 5) | ||
428 | #define MXC_CCM_CISR_CKIH_READY (0x1 << 4) | ||
429 | #define MXC_CCM_CISR_FPM_READY (0x1 << 3) | ||
430 | #define MXC_CCM_CISR_LRF_PLL3 (0x1 << 2) | ||
431 | #define MXC_CCM_CISR_LRF_PLL2 (0x1 << 1) | ||
432 | #define MXC_CCM_CISR_LRF_PLL1 (0x1) | ||
433 | |||
434 | /* Define the bits in register CIMR */ | ||
435 | #define MXC_CCM_CIMR_MASK_ARM_PODF_LOADED (0x1 << 25) | ||
436 | #define MXC_CCM_CIMR_MASK_NFC_IPG_INT_MEM_PODF_LOADED (0x1 << 21) | ||
437 | #define MXC_CCM_CIMR_MASK_EMI_PODF_LOADED (0x1 << 20) | ||
438 | #define MXC_CCM_CIMR_MASK_AXI_C_PODF_LOADED (0x1 << 19) | ||
439 | #define MXC_CCM_CIMR_MASK_AXI_B_PODF_LOADED (0x1 << 18) | ||
440 | #define MXC_CCM_CIMR_MASK_AXI_A_PODF_LOADED (0x1 << 17) | ||
441 | #define MXC_CCM_CIMR_MASK_DIVIDER_LOADED (0x1 << 16) | ||
442 | #define MXC_CCM_CIMR_MASK_COSC_READY (0x1 << 5) | ||
443 | #define MXC_CCM_CIMR_MASK_CKIH_READY (0x1 << 4) | ||
444 | #define MXC_CCM_CIMR_MASK_FPM_READY (0x1 << 3) | ||
445 | #define MXC_CCM_CIMR_MASK_LRF_PLL3 (0x1 << 2) | ||
446 | #define MXC_CCM_CIMR_MASK_LRF_PLL2 (0x1 << 1) | ||
447 | #define MXC_CCM_CIMR_MASK_LRF_PLL1 (0x1) | ||
448 | |||
449 | /* Define the bits in register CCOSR */ | ||
450 | #define MXC_CCM_CCOSR_CKO2_EN_OFFSET (0x1 << 24) | ||
451 | #define MXC_CCM_CCOSR_CKO2_DIV_OFFSET (21) | ||
452 | #define MXC_CCM_CCOSR_CKO2_DIV_MASK (0x7 << 21) | ||
453 | #define MXC_CCM_CCOSR_CKO2_SEL_OFFSET (16) | ||
454 | #define MXC_CCM_CCOSR_CKO2_SEL_MASK (0x1F << 16) | ||
455 | #define MXC_CCM_CCOSR_CKOL_EN (0x1 << 7) | ||
456 | #define MXC_CCM_CCOSR_CKOL_DIV_OFFSET (4) | ||
457 | #define MXC_CCM_CCOSR_CKOL_DIV_MASK (0x7 << 4) | ||
458 | #define MXC_CCM_CCOSR_CKOL_SEL_OFFSET (0) | ||
459 | #define MXC_CCM_CCOSR_CKOL_SEL_MASK (0xF) | ||
460 | |||
461 | /* Define the bits in registers CGPR */ | ||
462 | #define MXC_CCM_CGPR_EFUSE_PROG_SUPPLY_GATE (0x1 << 4) | ||
463 | #define MXC_CCM_CGPR_FPM_SEL (0x1 << 3) | ||
464 | #define MXC_CCM_CGPR_VL_L2BIST_CLKDIV_OFFSET (0) | ||
465 | #define MXC_CCM_CGPR_VL_L2BIST_CLKDIV_MASK (0x7) | ||
466 | |||
467 | /* Define the bits in registers CCGRx */ | ||
468 | #define MXC_CCM_CCGRx_CG_MASK 0x3 | ||
469 | #define MXC_CCM_CCGRx_MOD_OFF 0x0 | ||
470 | #define MXC_CCM_CCGRx_MOD_ON 0x3 | ||
471 | #define MXC_CCM_CCGRx_MOD_IDLE 0x1 | ||
472 | |||
473 | #define MXC_CCM_CCGRx_CG15_MASK (0x3 << 30) | ||
474 | #define MXC_CCM_CCGRx_CG14_MASK (0x3 << 28) | ||
475 | #define MXC_CCM_CCGRx_CG13_MASK (0x3 << 26) | ||
476 | #define MXC_CCM_CCGRx_CG12_MASK (0x3 << 24) | ||
477 | #define MXC_CCM_CCGRx_CG11_MASK (0x3 << 22) | ||
478 | #define MXC_CCM_CCGRx_CG10_MASK (0x3 << 20) | ||
479 | #define MXC_CCM_CCGRx_CG9_MASK (0x3 << 18) | ||
480 | #define MXC_CCM_CCGRx_CG8_MASK (0x3 << 16) | ||
481 | #define MXC_CCM_CCGRx_CG5_MASK (0x3 << 10) | ||
482 | #define MXC_CCM_CCGRx_CG4_MASK (0x3 << 8) | ||
483 | #define MXC_CCM_CCGRx_CG3_MASK (0x3 << 6) | ||
484 | #define MXC_CCM_CCGRx_CG2_MASK (0x3 << 4) | ||
485 | #define MXC_CCM_CCGRx_CG1_MASK (0x3 << 2) | ||
486 | #define MXC_CCM_CCGRx_CG0_MASK (0x3 << 0) | ||
487 | |||
488 | #define MXC_CCM_CCGRx_CG15_OFFSET 30 | ||
489 | #define MXC_CCM_CCGRx_CG14_OFFSET 28 | ||
490 | #define MXC_CCM_CCGRx_CG13_OFFSET 26 | ||
491 | #define MXC_CCM_CCGRx_CG12_OFFSET 24 | ||
492 | #define MXC_CCM_CCGRx_CG11_OFFSET 22 | ||
493 | #define MXC_CCM_CCGRx_CG10_OFFSET 20 | ||
494 | #define MXC_CCM_CCGRx_CG9_OFFSET 18 | ||
495 | #define MXC_CCM_CCGRx_CG8_OFFSET 16 | ||
496 | #define MXC_CCM_CCGRx_CG7_OFFSET 14 | ||
497 | #define MXC_CCM_CCGRx_CG6_OFFSET 12 | ||
498 | #define MXC_CCM_CCGRx_CG5_OFFSET 10 | ||
499 | #define MXC_CCM_CCGRx_CG4_OFFSET 8 | ||
500 | #define MXC_CCM_CCGRx_CG3_OFFSET 6 | ||
501 | #define MXC_CCM_CCGRx_CG2_OFFSET 4 | ||
502 | #define MXC_CCM_CCGRx_CG1_OFFSET 2 | ||
503 | #define MXC_CCM_CCGRx_CG0_OFFSET 0 | ||
504 | |||
505 | #define MXC_DPTC_LP_BASE (MX51_GPC_BASE + 0x80) | ||
506 | #define MXC_DPTC_GP_BASE (MX51_GPC_BASE + 0x100) | ||
507 | #define MXC_DVFS_CORE_BASE (MX51_GPC_BASE + 0x180) | ||
508 | #define MXC_DPTC_PER_BASE (MX51_GPC_BASE + 0x1C0) | ||
509 | #define MXC_PGC_IPU_BASE (MX51_GPC_BASE + 0x220) | ||
510 | #define MXC_PGC_VPU_BASE (MX51_GPC_BASE + 0x240) | ||
511 | #define MXC_PGC_GPU_BASE (MX51_GPC_BASE + 0x260) | ||
512 | #define MXC_SRPG_NEON_BASE (MX51_GPC_BASE + 0x280) | ||
513 | #define MXC_SRPG_ARM_BASE (MX51_GPC_BASE + 0x2A0) | ||
514 | #define MXC_SRPG_EMPGC0_BASE (MX51_GPC_BASE + 0x2C0) | ||
515 | #define MXC_SRPG_EMPGC1_BASE (MX51_GPC_BASE + 0x2D0) | ||
516 | #define MXC_SRPG_MEGAMIX_BASE (MX51_GPC_BASE + 0x2E0) | ||
517 | #define MXC_SRPG_EMI_BASE (MX51_GPC_BASE + 0x300) | ||
518 | |||
519 | /* CORTEXA8 platform */ | ||
520 | #define MXC_CORTEXA8_PLAT_PVID (MX51_CORTEXA8_BASE + 0x0) | ||
521 | #define MXC_CORTEXA8_PLAT_GPC (MX51_CORTEXA8_BASE + 0x4) | ||
522 | #define MXC_CORTEXA8_PLAT_PIC (MX51_CORTEXA8_BASE + 0x8) | ||
523 | #define MXC_CORTEXA8_PLAT_LPC (MX51_CORTEXA8_BASE + 0xC) | ||
524 | #define MXC_CORTEXA8_PLAT_NEON_LPC (MX51_CORTEXA8_BASE + 0x10) | ||
525 | #define MXC_CORTEXA8_PLAT_ICGC (MX51_CORTEXA8_BASE + 0x14) | ||
526 | #define MXC_CORTEXA8_PLAT_AMC (MX51_CORTEXA8_BASE + 0x18) | ||
527 | #define MXC_CORTEXA8_PLAT_NMC (MX51_CORTEXA8_BASE + 0x20) | ||
528 | #define MXC_CORTEXA8_PLAT_NMS (MX51_CORTEXA8_BASE + 0x24) | ||
529 | |||
530 | /* DVFS CORE */ | ||
531 | #define MXC_DVFSTHRS (MXC_DVFS_CORE_BASE + 0x00) | ||
532 | #define MXC_DVFSCOUN (MXC_DVFS_CORE_BASE + 0x04) | ||
533 | #define MXC_DVFSSIG1 (MXC_DVFS_CORE_BASE + 0x08) | ||
534 | #define MXC_DVFSSIG0 (MXC_DVFS_CORE_BASE + 0x0C) | ||
535 | #define MXC_DVFSGPC0 (MXC_DVFS_CORE_BASE + 0x10) | ||
536 | #define MXC_DVFSGPC1 (MXC_DVFS_CORE_BASE + 0x14) | ||
537 | #define MXC_DVFSGPBT (MXC_DVFS_CORE_BASE + 0x18) | ||
538 | #define MXC_DVFSEMAC (MXC_DVFS_CORE_BASE + 0x1C) | ||
539 | #define MXC_DVFSCNTR (MXC_DVFS_CORE_BASE + 0x20) | ||
540 | #define MXC_DVFSLTR0_0 (MXC_DVFS_CORE_BASE + 0x24) | ||
541 | #define MXC_DVFSLTR0_1 (MXC_DVFS_CORE_BASE + 0x28) | ||
542 | #define MXC_DVFSLTR1_0 (MXC_DVFS_CORE_BASE + 0x2C) | ||
543 | #define MXC_DVFSLTR1_1 (MXC_DVFS_CORE_BASE + 0x30) | ||
544 | #define MXC_DVFSPT0 (MXC_DVFS_CORE_BASE + 0x34) | ||
545 | #define MXC_DVFSPT1 (MXC_DVFS_CORE_BASE + 0x38) | ||
546 | #define MXC_DVFSPT2 (MXC_DVFS_CORE_BASE + 0x3C) | ||
547 | #define MXC_DVFSPT3 (MXC_DVFS_CORE_BASE + 0x40) | ||
548 | |||
549 | /* GPC */ | ||
550 | #define MXC_GPC_CNTR (MX51_GPC_BASE + 0x0) | ||
551 | #define MXC_GPC_PGR (MX51_GPC_BASE + 0x4) | ||
552 | #define MXC_GPC_VCR (MX51_GPC_BASE + 0x8) | ||
553 | #define MXC_GPC_ALL_PU (MX51_GPC_BASE + 0xC) | ||
554 | #define MXC_GPC_NEON (MX51_GPC_BASE + 0x10) | ||
555 | #define MXC_GPC_PGR_ARMPG_OFFSET 8 | ||
556 | #define MXC_GPC_PGR_ARMPG_MASK (3 << 8) | ||
557 | |||
558 | /* PGC */ | ||
559 | #define MXC_PGC_IPU_PGCR (MXC_PGC_IPU_BASE + 0x0) | ||
560 | #define MXC_PGC_IPU_PGSR (MXC_PGC_IPU_BASE + 0xC) | ||
561 | #define MXC_PGC_VPU_PGCR (MXC_PGC_VPU_BASE + 0x0) | ||
562 | #define MXC_PGC_VPU_PGSR (MXC_PGC_VPU_BASE + 0xC) | ||
563 | #define MXC_PGC_GPU_PGCR (MXC_PGC_GPU_BASE + 0x0) | ||
564 | #define MXC_PGC_GPU_PGSR (MXC_PGC_GPU_BASE + 0xC) | ||
565 | |||
566 | #define MXC_PGCR_PCR 1 | ||
567 | #define MXC_SRPGCR_PCR 1 | ||
568 | #define MXC_EMPGCR_PCR 1 | ||
569 | #define MXC_PGSR_PSR 1 | ||
570 | |||
571 | |||
572 | #define MXC_CORTEXA8_PLAT_LPC_DSM (1 << 0) | ||
573 | #define MXC_CORTEXA8_PLAT_LPC_DBG_DSM (1 << 1) | ||
574 | |||
575 | /* SRPG */ | ||
576 | #define MXC_SRPG_NEON_SRPGCR (MXC_SRPG_NEON_BASE + 0x0) | ||
577 | #define MXC_SRPG_NEON_PUPSCR (MXC_SRPG_NEON_BASE + 0x4) | ||
578 | #define MXC_SRPG_NEON_PDNSCR (MXC_SRPG_NEON_BASE + 0x8) | ||
579 | |||
580 | #define MXC_SRPG_ARM_SRPGCR (MXC_SRPG_ARM_BASE + 0x0) | ||
581 | #define MXC_SRPG_ARM_PUPSCR (MXC_SRPG_ARM_BASE + 0x4) | ||
582 | #define MXC_SRPG_ARM_PDNSCR (MXC_SRPG_ARM_BASE + 0x8) | ||
583 | |||
584 | #define MXC_SRPG_EMPGC0_SRPGCR (MXC_SRPG_EMPGC0_BASE + 0x0) | ||
585 | #define MXC_SRPG_EMPGC0_PUPSCR (MXC_SRPG_EMPGC0_BASE + 0x4) | ||
586 | #define MXC_SRPG_EMPGC0_PDNSCR (MXC_SRPG_EMPGC0_BASE + 0x8) | ||
587 | |||
588 | #define MXC_SRPG_EMPGC1_SRPGCR (MXC_SRPG_EMPGC1_BASE + 0x0) | ||
589 | #define MXC_SRPG_EMPGC1_PUPSCR (MXC_SRPG_EMPGC1_BASE + 0x4) | ||
590 | #define MXC_SRPG_EMPGC1_PDNSCR (MXC_SRPG_EMPGC1_BASE + 0x8) | ||
591 | |||
592 | #define MXC_SRPG_MEGAMIX_SRPGCR (MXC_SRPG_MEGAMIX_BASE + 0x0) | ||
593 | #define MXC_SRPG_MEGAMIX_PUPSCR (MXC_SRPG_MEGAMIX_BASE + 0x4) | ||
594 | #define MXC_SRPG_MEGAMIX_PDNSCR (MXC_SRPG_MEGAMIX_BASE + 0x8) | ||
595 | |||
596 | #define MXC_SRPGC_EMI_SRPGCR (MXC_SRPGC_EMI_BASE + 0x0) | ||
597 | #define MXC_SRPGC_EMI_PUPSCR (MXC_SRPGC_EMI_BASE + 0x4) | ||
598 | #define MXC_SRPGC_EMI_PDNSCR (MXC_SRPGC_EMI_BASE + 0x8) | ||
599 | |||
600 | #endif /* __ARCH_ARM_MACH_MX51_CRM_REGS_H__ */ | ||
diff --git a/arch/arm/mach-imx/crmregs-imx3.h b/arch/arm/mach-imx/crmregs-imx3.h deleted file mode 100644 index a1dfde53e33..00000000000 --- a/arch/arm/mach-imx/crmregs-imx3.h +++ /dev/null | |||
@@ -1,261 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ARCH_ARM_MACH_MX3_CRM_REGS_H__ | ||
21 | #define __ARCH_ARM_MACH_MX3_CRM_REGS_H__ | ||
22 | |||
23 | #define CKIH_CLK_FREQ 26000000 | ||
24 | #define CKIH_CLK_FREQ_27MHZ 27000000 | ||
25 | #define CKIL_CLK_FREQ 32768 | ||
26 | |||
27 | extern void __iomem *mx3_ccm_base; | ||
28 | |||
29 | /* Register addresses */ | ||
30 | #define MXC_CCM_CCMR 0x00 | ||
31 | #define MXC_CCM_PDR0 0x04 | ||
32 | #define MXC_CCM_PDR1 0x08 | ||
33 | #define MX35_CCM_PDR2 0x0C | ||
34 | #define MXC_CCM_RCSR 0x0C | ||
35 | #define MX35_CCM_PDR3 0x10 | ||
36 | #define MXC_CCM_MPCTL 0x10 | ||
37 | #define MX35_CCM_PDR4 0x14 | ||
38 | #define MXC_CCM_UPCTL 0x14 | ||
39 | #define MX35_CCM_RCSR 0x18 | ||
40 | #define MXC_CCM_SRPCTL 0x18 | ||
41 | #define MX35_CCM_MPCTL 0x1C | ||
42 | #define MXC_CCM_COSR 0x1C | ||
43 | #define MX35_CCM_PPCTL 0x20 | ||
44 | #define MXC_CCM_CGR0 0x20 | ||
45 | #define MX35_CCM_ACMR 0x24 | ||
46 | #define MXC_CCM_CGR1 0x24 | ||
47 | #define MX35_CCM_COSR 0x28 | ||
48 | #define MXC_CCM_CGR2 0x28 | ||
49 | #define MX35_CCM_CGR0 0x2C | ||
50 | #define MXC_CCM_WIMR 0x2C | ||
51 | #define MX35_CCM_CGR1 0x30 | ||
52 | #define MXC_CCM_LDC 0x30 | ||
53 | #define MX35_CCM_CGR2 0x34 | ||
54 | #define MXC_CCM_DCVR0 0x34 | ||
55 | #define MX35_CCM_CGR3 0x38 | ||
56 | #define MXC_CCM_DCVR1 0x38 | ||
57 | #define MXC_CCM_DCVR2 0x3C | ||
58 | #define MXC_CCM_DCVR3 0x40 | ||
59 | #define MXC_CCM_LTR0 0x44 | ||
60 | #define MXC_CCM_LTR1 0x48 | ||
61 | #define MXC_CCM_LTR2 0x4C | ||
62 | #define MXC_CCM_LTR3 0x50 | ||
63 | #define MXC_CCM_LTBR0 0x54 | ||
64 | #define MXC_CCM_LTBR1 0x58 | ||
65 | #define MXC_CCM_PMCR0 0x5C | ||
66 | #define MXC_CCM_PMCR1 0x60 | ||
67 | #define MXC_CCM_PDR2 0x64 | ||
68 | |||
69 | /* Register bit definitions */ | ||
70 | #define MXC_CCM_CCMR_WBEN (1 << 27) | ||
71 | #define MXC_CCM_CCMR_CSCS (1 << 25) | ||
72 | #define MXC_CCM_CCMR_PERCS (1 << 24) | ||
73 | #define MXC_CCM_CCMR_SSI1S_OFFSET 18 | ||
74 | #define MXC_CCM_CCMR_SSI1S_MASK (0x3 << 18) | ||
75 | #define MXC_CCM_CCMR_SSI2S_OFFSET 21 | ||
76 | #define MXC_CCM_CCMR_SSI2S_MASK (0x3 << 21) | ||
77 | #define MXC_CCM_CCMR_LPM_OFFSET 14 | ||
78 | #define MXC_CCM_CCMR_LPM_MASK (0x3 << 14) | ||
79 | #define MXC_CCM_CCMR_LPM_WAIT_MX35 (0x1 << 14) | ||
80 | #define MXC_CCM_CCMR_FIRS_OFFSET 11 | ||
81 | #define MXC_CCM_CCMR_FIRS_MASK (0x3 << 11) | ||
82 | #define MXC_CCM_CCMR_UPE (1 << 9) | ||
83 | #define MXC_CCM_CCMR_SPE (1 << 8) | ||
84 | #define MXC_CCM_CCMR_MDS (1 << 7) | ||
85 | #define MXC_CCM_CCMR_SBYCS (1 << 4) | ||
86 | #define MXC_CCM_CCMR_MPE (1 << 3) | ||
87 | #define MXC_CCM_CCMR_PRCS_OFFSET 1 | ||
88 | #define MXC_CCM_CCMR_PRCS_MASK (0x3 << 1) | ||
89 | |||
90 | #define MXC_CCM_PDR0_CSI_PODF_OFFSET 26 | ||
91 | #define MXC_CCM_PDR0_CSI_PODF_MASK (0x3F << 26) | ||
92 | #define MXC_CCM_PDR0_CSI_PRDF_OFFSET 23 | ||
93 | #define MXC_CCM_PDR0_CSI_PRDF_MASK (0x7 << 23) | ||
94 | #define MXC_CCM_PDR0_PER_PODF_OFFSET 16 | ||
95 | #define MXC_CCM_PDR0_PER_PODF_MASK (0x1F << 16) | ||
96 | #define MXC_CCM_PDR0_HSP_PODF_OFFSET 11 | ||
97 | #define MXC_CCM_PDR0_HSP_PODF_MASK (0x7 << 11) | ||
98 | #define MXC_CCM_PDR0_NFC_PODF_OFFSET 8 | ||
99 | #define MXC_CCM_PDR0_NFC_PODF_MASK (0x7 << 8) | ||
100 | #define MXC_CCM_PDR0_IPG_PODF_OFFSET 6 | ||
101 | #define MXC_CCM_PDR0_IPG_PODF_MASK (0x3 << 6) | ||
102 | #define MXC_CCM_PDR0_MAX_PODF_OFFSET 3 | ||
103 | #define MXC_CCM_PDR0_MAX_PODF_MASK (0x7 << 3) | ||
104 | #define MXC_CCM_PDR0_MCU_PODF_OFFSET 0 | ||
105 | #define MXC_CCM_PDR0_MCU_PODF_MASK 0x7 | ||
106 | |||
107 | #define MXC_CCM_PDR1_USB_PRDF_OFFSET 30 | ||
108 | #define MXC_CCM_PDR1_USB_PRDF_MASK (0x3 << 30) | ||
109 | #define MXC_CCM_PDR1_USB_PODF_OFFSET 27 | ||
110 | #define MXC_CCM_PDR1_USB_PODF_MASK (0x7 << 27) | ||
111 | #define MXC_CCM_PDR1_FIRI_PRE_PODF_OFFSET 24 | ||
112 | #define MXC_CCM_PDR1_FIRI_PRE_PODF_MASK (0x7 << 24) | ||
113 | #define MXC_CCM_PDR1_FIRI_PODF_OFFSET 18 | ||
114 | #define MXC_CCM_PDR1_FIRI_PODF_MASK (0x3F << 18) | ||
115 | #define MXC_CCM_PDR1_SSI2_PRE_PODF_OFFSET 15 | ||
116 | #define MXC_CCM_PDR1_SSI2_PRE_PODF_MASK (0x7 << 15) | ||
117 | #define MXC_CCM_PDR1_SSI2_PODF_OFFSET 9 | ||
118 | #define MXC_CCM_PDR1_SSI2_PODF_MASK (0x3F << 9) | ||
119 | #define MXC_CCM_PDR1_SSI1_PRE_PODF_OFFSET 6 | ||
120 | #define MXC_CCM_PDR1_SSI1_PRE_PODF_MASK (0x7 << 6) | ||
121 | #define MXC_CCM_PDR1_SSI1_PODF_OFFSET 0 | ||
122 | #define MXC_CCM_PDR1_SSI1_PODF_MASK 0x3F | ||
123 | |||
124 | /* Bit definitions for RCSR */ | ||
125 | #define MXC_CCM_RCSR_NF16B 0x80000000 | ||
126 | |||
127 | /* | ||
128 | * LTR0 register offsets | ||
129 | */ | ||
130 | #define MXC_CCM_LTR0_DIV3CK_OFFSET 1 | ||
131 | #define MXC_CCM_LTR0_DIV3CK_MASK (0x3 << 1) | ||
132 | #define MXC_CCM_LTR0_DNTHR_OFFSET 16 | ||
133 | #define MXC_CCM_LTR0_DNTHR_MASK (0x3F << 16) | ||
134 | #define MXC_CCM_LTR0_UPTHR_OFFSET 22 | ||
135 | #define MXC_CCM_LTR0_UPTHR_MASK (0x3F << 22) | ||
136 | |||
137 | /* | ||
138 | * LTR1 register offsets | ||
139 | */ | ||
140 | #define MXC_CCM_LTR1_PNCTHR_OFFSET 0 | ||
141 | #define MXC_CCM_LTR1_PNCTHR_MASK 0x3F | ||
142 | #define MXC_CCM_LTR1_UPCNT_OFFSET 6 | ||
143 | #define MXC_CCM_LTR1_UPCNT_MASK (0xFF << 6) | ||
144 | #define MXC_CCM_LTR1_DNCNT_OFFSET 14 | ||
145 | #define MXC_CCM_LTR1_DNCNT_MASK (0xFF << 14) | ||
146 | #define MXC_CCM_LTR1_LTBRSR_MASK 0x400000 | ||
147 | #define MXC_CCM_LTR1_LTBRSR_OFFSET 22 | ||
148 | #define MXC_CCM_LTR1_LTBRSR 0x400000 | ||
149 | #define MXC_CCM_LTR1_LTBRSH 0x800000 | ||
150 | |||
151 | /* | ||
152 | * LTR2 bit definitions. x ranges from 0 for WSW9 to 6 for WSW15 | ||
153 | */ | ||
154 | #define MXC_CCM_LTR2_WSW_OFFSET(x) (11 + (x) * 3) | ||
155 | #define MXC_CCM_LTR2_WSW_MASK(x) (0x7 << \ | ||
156 | MXC_CCM_LTR2_WSW_OFFSET((x))) | ||
157 | #define MXC_CCM_LTR2_EMAC_OFFSET 0 | ||
158 | #define MXC_CCM_LTR2_EMAC_MASK 0x1FF | ||
159 | |||
160 | /* | ||
161 | * LTR3 bit definitions. x ranges from 0 for WSW0 to 8 for WSW8 | ||
162 | */ | ||
163 | #define MXC_CCM_LTR3_WSW_OFFSET(x) (5 + (x) * 3) | ||
164 | #define MXC_CCM_LTR3_WSW_MASK(x) (0x7 << \ | ||
165 | MXC_CCM_LTR3_WSW_OFFSET((x))) | ||
166 | |||
167 | #define MXC_CCM_PMCR0_DFSUP1 0x80000000 | ||
168 | #define MXC_CCM_PMCR0_DFSUP1_SPLL (0 << 31) | ||
169 | #define MXC_CCM_PMCR0_DFSUP1_MPLL (1 << 31) | ||
170 | #define MXC_CCM_PMCR0_DFSUP0 0x40000000 | ||
171 | #define MXC_CCM_PMCR0_DFSUP0_PLL (0 << 30) | ||
172 | #define MXC_CCM_PMCR0_DFSUP0_PDR (1 << 30) | ||
173 | #define MXC_CCM_PMCR0_DFSUP_MASK (0x3 << 30) | ||
174 | |||
175 | #define DVSUP_TURBO 0 | ||
176 | #define DVSUP_HIGH 1 | ||
177 | #define DVSUP_MEDIUM 2 | ||
178 | #define DVSUP_LOW 3 | ||
179 | #define MXC_CCM_PMCR0_DVSUP_TURBO (DVSUP_TURBO << 28) | ||
180 | #define MXC_CCM_PMCR0_DVSUP_HIGH (DVSUP_HIGH << 28) | ||
181 | #define MXC_CCM_PMCR0_DVSUP_MEDIUM (DVSUP_MEDIUM << 28) | ||
182 | #define MXC_CCM_PMCR0_DVSUP_LOW (DVSUP_LOW << 28) | ||
183 | #define MXC_CCM_PMCR0_DVSUP_OFFSET 28 | ||
184 | #define MXC_CCM_PMCR0_DVSUP_MASK (0x3 << 28) | ||
185 | #define MXC_CCM_PMCR0_UDSC 0x08000000 | ||
186 | #define MXC_CCM_PMCR0_UDSC_MASK (1 << 27) | ||
187 | #define MXC_CCM_PMCR0_UDSC_UP (1 << 27) | ||
188 | #define MXC_CCM_PMCR0_UDSC_DOWN (0 << 27) | ||
189 | |||
190 | #define MXC_CCM_PMCR0_VSCNT_1 (0x0 << 24) | ||
191 | #define MXC_CCM_PMCR0_VSCNT_2 (0x1 << 24) | ||
192 | #define MXC_CCM_PMCR0_VSCNT_3 (0x2 << 24) | ||
193 | #define MXC_CCM_PMCR0_VSCNT_4 (0x3 << 24) | ||
194 | #define MXC_CCM_PMCR0_VSCNT_5 (0x4 << 24) | ||
195 | #define MXC_CCM_PMCR0_VSCNT_6 (0x5 << 24) | ||
196 | #define MXC_CCM_PMCR0_VSCNT_7 (0x6 << 24) | ||
197 | #define MXC_CCM_PMCR0_VSCNT_8 (0x7 << 24) | ||
198 | #define MXC_CCM_PMCR0_VSCNT_OFFSET 24 | ||
199 | #define MXC_CCM_PMCR0_VSCNT_MASK (0x7 << 24) | ||
200 | #define MXC_CCM_PMCR0_DVFEV 0x00800000 | ||
201 | #define MXC_CCM_PMCR0_DVFIS 0x00400000 | ||
202 | #define MXC_CCM_PMCR0_LBMI 0x00200000 | ||
203 | #define MXC_CCM_PMCR0_LBFL 0x00100000 | ||
204 | #define MXC_CCM_PMCR0_LBCF_4 (0x0 << 18) | ||
205 | #define MXC_CCM_PMCR0_LBCF_8 (0x1 << 18) | ||
206 | #define MXC_CCM_PMCR0_LBCF_12 (0x2 << 18) | ||
207 | #define MXC_CCM_PMCR0_LBCF_16 (0x3 << 18) | ||
208 | #define MXC_CCM_PMCR0_LBCF_OFFSET 18 | ||
209 | #define MXC_CCM_PMCR0_LBCF_MASK (0x3 << 18) | ||
210 | #define MXC_CCM_PMCR0_PTVIS 0x00020000 | ||
211 | #define MXC_CCM_PMCR0_UPDTEN 0x00010000 | ||
212 | #define MXC_CCM_PMCR0_UPDTEN_MASK (0x1 << 16) | ||
213 | #define MXC_CCM_PMCR0_FSVAIM 0x00008000 | ||
214 | #define MXC_CCM_PMCR0_FSVAI_OFFSET 13 | ||
215 | #define MXC_CCM_PMCR0_FSVAI_MASK (0x3 << 13) | ||
216 | #define MXC_CCM_PMCR0_DPVCR 0x00001000 | ||
217 | #define MXC_CCM_PMCR0_DPVV 0x00000800 | ||
218 | #define MXC_CCM_PMCR0_WFIM 0x00000400 | ||
219 | #define MXC_CCM_PMCR0_DRCE3 0x00000200 | ||
220 | #define MXC_CCM_PMCR0_DRCE2 0x00000100 | ||
221 | #define MXC_CCM_PMCR0_DRCE1 0x00000080 | ||
222 | #define MXC_CCM_PMCR0_DRCE0 0x00000040 | ||
223 | #define MXC_CCM_PMCR0_DCR 0x00000020 | ||
224 | #define MXC_CCM_PMCR0_DVFEN 0x00000010 | ||
225 | #define MXC_CCM_PMCR0_PTVAIM 0x00000008 | ||
226 | #define MXC_CCM_PMCR0_PTVAI_OFFSET 1 | ||
227 | #define MXC_CCM_PMCR0_PTVAI_MASK (0x3 << 1) | ||
228 | #define MXC_CCM_PMCR0_DPTEN 0x00000001 | ||
229 | |||
230 | #define MXC_CCM_PMCR1_DVGP_OFFSET 0 | ||
231 | #define MXC_CCM_PMCR1_DVGP_MASK (0xF) | ||
232 | |||
233 | #define MXC_CCM_PMCR1_PLLRDIS (0x1 << 7) | ||
234 | #define MXC_CCM_PMCR1_EMIRQ_EN (0x1 << 8) | ||
235 | |||
236 | #define MXC_CCM_DCVR_ULV_MASK (0x3FF << 22) | ||
237 | #define MXC_CCM_DCVR_ULV_OFFSET 22 | ||
238 | #define MXC_CCM_DCVR_LLV_MASK (0x3FF << 12) | ||
239 | #define MXC_CCM_DCVR_LLV_OFFSET 12 | ||
240 | #define MXC_CCM_DCVR_ELV_MASK (0x3FF << 2) | ||
241 | #define MXC_CCM_DCVR_ELV_OFFSET 2 | ||
242 | |||
243 | #define MXC_CCM_PDR2_MST2_PDF_MASK (0x3F << 7) | ||
244 | #define MXC_CCM_PDR2_MST2_PDF_OFFSET 7 | ||
245 | #define MXC_CCM_PDR2_MST1_PDF_MASK 0x3F | ||
246 | #define MXC_CCM_PDR2_MST1_PDF_OFFSET 0 | ||
247 | |||
248 | #define MXC_CCM_COSR_CLKOSEL_MASK 0x0F | ||
249 | #define MXC_CCM_COSR_CLKOSEL_OFFSET 0 | ||
250 | #define MXC_CCM_COSR_CLKOUTDIV_MASK (0x07 << 6) | ||
251 | #define MXC_CCM_COSR_CLKOUTDIV_OFFSET 6 | ||
252 | #define MXC_CCM_COSR_CLKOEN (1 << 9) | ||
253 | |||
254 | /* | ||
255 | * PMCR0 register offsets | ||
256 | */ | ||
257 | #define MXC_CCM_PMCR0_LBFL_OFFSET 20 | ||
258 | #define MXC_CCM_PMCR0_DFSUP0_OFFSET 30 | ||
259 | #define MXC_CCM_PMCR0_DFSUP1_OFFSET 31 | ||
260 | |||
261 | #endif /* __ARCH_ARM_MACH_MX3_CRM_REGS_H__ */ | ||
diff --git a/arch/arm/mach-imx/devices-imx1.h b/arch/arm/mach-imx/devices-imx1.h index f9b5afc6bcd..3aad1e70de9 100644 --- a/arch/arm/mach-imx/devices-imx1.h +++ b/arch/arm/mach-imx/devices-imx1.h | |||
@@ -6,7 +6,8 @@ | |||
6 | * the terms of the GNU General Public License version 2 as published by the | 6 | * the terms of the GNU General Public License version 2 as published by the |
7 | * Free Software Foundation. | 7 | * Free Software Foundation. |
8 | */ | 8 | */ |
9 | #include "devices/devices-common.h" | 9 | #include <mach/mx1.h> |
10 | #include <mach/devices-common.h> | ||
10 | 11 | ||
11 | extern const struct imx_imx_fb_data imx1_imx_fb_data; | 12 | extern const struct imx_imx_fb_data imx1_imx_fb_data; |
12 | #define imx1_add_imx_fb(pdata) \ | 13 | #define imx1_add_imx_fb(pdata) \ |
diff --git a/arch/arm/mach-imx/devices-imx21.h b/arch/arm/mach-imx/devices-imx21.h index bd939328015..2628e0c474d 100644 --- a/arch/arm/mach-imx/devices-imx21.h +++ b/arch/arm/mach-imx/devices-imx21.h | |||
@@ -6,14 +6,15 @@ | |||
6 | * the terms of the GNU General Public License version 2 as published by the | 6 | * the terms of the GNU General Public License version 2 as published by the |
7 | * Free Software Foundation. | 7 | * Free Software Foundation. |
8 | */ | 8 | */ |
9 | #include "devices/devices-common.h" | 9 | #include <mach/mx21.h> |
10 | #include <mach/devices-common.h> | ||
10 | 11 | ||
11 | extern const struct imx_imx21_hcd_data imx21_imx21_hcd_data; | 12 | extern const struct imx_imx21_hcd_data imx21_imx21_hcd_data; |
12 | #define imx21_add_imx21_hcd(pdata) \ | 13 | #define imx21_add_imx21_hcd(pdata) \ |
13 | imx_add_imx21_hcd(&imx21_imx21_hcd_data, pdata) | 14 | imx_add_imx21_hcd(&imx21_imx21_hcd_data, pdata) |
14 | 15 | ||
15 | extern const struct imx_imx2_wdt_data imx21_imx2_wdt_data; | 16 | extern const struct imx_imx2_wdt_data imx21_imx2_wdt_data; |
16 | #define imx21_add_imx2_wdt() \ | 17 | #define imx21_add_imx2_wdt(pdata) \ |
17 | imx_add_imx2_wdt(&imx21_imx2_wdt_data) | 18 | imx_add_imx2_wdt(&imx21_imx2_wdt_data) |
18 | 19 | ||
19 | extern const struct imx_imx_fb_data imx21_imx_fb_data; | 20 | extern const struct imx_imx_fb_data imx21_imx_fb_data; |
@@ -49,7 +50,7 @@ extern const struct imx_mxc_nand_data imx21_mxc_nand_data; | |||
49 | imx_add_mxc_nand(&imx21_mxc_nand_data, pdata) | 50 | imx_add_mxc_nand(&imx21_mxc_nand_data, pdata) |
50 | 51 | ||
51 | extern const struct imx_mxc_w1_data imx21_mxc_w1_data; | 52 | extern const struct imx_mxc_w1_data imx21_mxc_w1_data; |
52 | #define imx21_add_mxc_w1() \ | 53 | #define imx21_add_mxc_w1(pdata) \ |
53 | imx_add_mxc_w1(&imx21_mxc_w1_data) | 54 | imx_add_mxc_w1(&imx21_mxc_w1_data) |
54 | 55 | ||
55 | extern const struct imx_spi_imx_data imx21_cspi_data[]; | 56 | extern const struct imx_spi_imx_data imx21_cspi_data[]; |
diff --git a/arch/arm/mach-imx/devices-imx25.h b/arch/arm/mach-imx/devices-imx25.h index 0d2922bc575..efa0761c508 100644 --- a/arch/arm/mach-imx/devices-imx25.h +++ b/arch/arm/mach-imx/devices-imx25.h | |||
@@ -6,7 +6,8 @@ | |||
6 | * the terms of the GNU General Public License version 2 as published by the | 6 | * the terms of the GNU General Public License version 2 as published by the |
7 | * Free Software Foundation. | 7 | * Free Software Foundation. |
8 | */ | 8 | */ |
9 | #include "devices/devices-common.h" | 9 | #include <mach/mx25.h> |
10 | #include <mach/devices-common.h> | ||
10 | 11 | ||
11 | extern const struct imx_fec_data imx25_fec_data; | 12 | extern const struct imx_fec_data imx25_fec_data; |
12 | #define imx25_add_fec(pdata) \ | 13 | #define imx25_add_fec(pdata) \ |
@@ -23,11 +24,11 @@ extern const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data; | |||
23 | imx_add_fsl_usb2_udc(&imx25_fsl_usb2_udc_data, pdata) | 24 | imx_add_fsl_usb2_udc(&imx25_fsl_usb2_udc_data, pdata) |
24 | 25 | ||
25 | extern struct imx_imxdi_rtc_data imx25_imxdi_rtc_data; | 26 | extern struct imx_imxdi_rtc_data imx25_imxdi_rtc_data; |
26 | #define imx25_add_imxdi_rtc() \ | 27 | #define imx25_add_imxdi_rtc(pdata) \ |
27 | imx_add_imxdi_rtc(&imx25_imxdi_rtc_data) | 28 | imx_add_imxdi_rtc(&imx25_imxdi_rtc_data) |
28 | 29 | ||
29 | extern const struct imx_imx2_wdt_data imx25_imx2_wdt_data; | 30 | extern const struct imx_imx2_wdt_data imx25_imx2_wdt_data; |
30 | #define imx25_add_imx2_wdt() \ | 31 | #define imx25_add_imx2_wdt(pdata) \ |
31 | imx_add_imx2_wdt(&imx25_imx2_wdt_data) | 32 | imx_add_imx2_wdt(&imx25_imx2_wdt_data) |
32 | 33 | ||
33 | extern const struct imx_imx_fb_data imx25_imx_fb_data; | 34 | extern const struct imx_imx_fb_data imx25_imx_fb_data; |
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h index 13096251975..7f97a3cdd41 100644 --- a/arch/arm/mach-imx/devices-imx27.h +++ b/arch/arm/mach-imx/devices-imx27.h | |||
@@ -6,7 +6,8 @@ | |||
6 | * the terms of the GNU General Public License version 2 as published by the | 6 | * the terms of the GNU General Public License version 2 as published by the |
7 | * Free Software Foundation. | 7 | * Free Software Foundation. |
8 | */ | 8 | */ |
9 | #include "devices/devices-common.h" | 9 | #include <mach/mx27.h> |
10 | #include <mach/devices-common.h> | ||
10 | 11 | ||
11 | extern const struct imx_fec_data imx27_fec_data; | 12 | extern const struct imx_fec_data imx27_fec_data; |
12 | #define imx27_add_fec(pdata) \ | 13 | #define imx27_add_fec(pdata) \ |
@@ -16,12 +17,8 @@ extern const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data; | |||
16 | #define imx27_add_fsl_usb2_udc(pdata) \ | 17 | #define imx27_add_fsl_usb2_udc(pdata) \ |
17 | imx_add_fsl_usb2_udc(&imx27_fsl_usb2_udc_data, pdata) | 18 | imx_add_fsl_usb2_udc(&imx27_fsl_usb2_udc_data, pdata) |
18 | 19 | ||
19 | extern const struct imx_imx27_coda_data imx27_coda_data; | ||
20 | #define imx27_add_coda() \ | ||
21 | imx_add_imx27_coda(&imx27_coda_data) | ||
22 | |||
23 | extern const struct imx_imx2_wdt_data imx27_imx2_wdt_data; | 20 | extern const struct imx_imx2_wdt_data imx27_imx2_wdt_data; |
24 | #define imx27_add_imx2_wdt() \ | 21 | #define imx27_add_imx2_wdt(pdata) \ |
25 | imx_add_imx2_wdt(&imx27_imx2_wdt_data) | 22 | imx_add_imx2_wdt(&imx27_imx2_wdt_data) |
26 | 23 | ||
27 | extern const struct imx_imx_fb_data imx27_imx_fb_data; | 24 | extern const struct imx_imx_fb_data imx27_imx_fb_data; |
@@ -54,10 +51,6 @@ extern const struct imx_mx2_camera_data imx27_mx2_camera_data; | |||
54 | #define imx27_add_mx2_camera(pdata) \ | 51 | #define imx27_add_mx2_camera(pdata) \ |
55 | imx_add_mx2_camera(&imx27_mx2_camera_data, pdata) | 52 | imx_add_mx2_camera(&imx27_mx2_camera_data, pdata) |
56 | 53 | ||
57 | extern const struct imx_mx2_emma_data imx27_mx2_emmaprp_data; | ||
58 | #define imx27_add_mx2_emmaprp() \ | ||
59 | imx_add_mx2_emmaprp(&imx27_mx2_emmaprp_data) | ||
60 | |||
61 | extern const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data; | 54 | extern const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data; |
62 | #define imx27_add_mxc_ehci_otg(pdata) \ | 55 | #define imx27_add_mxc_ehci_otg(pdata) \ |
63 | imx_add_mxc_ehci(&imx27_mxc_ehci_otg_data, pdata) | 56 | imx_add_mxc_ehci(&imx27_mxc_ehci_otg_data, pdata) |
@@ -74,7 +67,7 @@ extern const struct imx_mxc_nand_data imx27_mxc_nand_data; | |||
74 | imx_add_mxc_nand(&imx27_mxc_nand_data, pdata) | 67 | imx_add_mxc_nand(&imx27_mxc_nand_data, pdata) |
75 | 68 | ||
76 | extern const struct imx_mxc_w1_data imx27_mxc_w1_data; | 69 | extern const struct imx_mxc_w1_data imx27_mxc_w1_data; |
77 | #define imx27_add_mxc_w1() \ | 70 | #define imx27_add_mxc_w1(pdata) \ |
78 | imx_add_mxc_w1(&imx27_mxc_w1_data) | 71 | imx_add_mxc_w1(&imx27_mxc_w1_data) |
79 | 72 | ||
80 | extern const struct imx_spi_imx_data imx27_cspi_data[]; | 73 | extern const struct imx_spi_imx_data imx27_cspi_data[]; |
@@ -83,7 +76,3 @@ extern const struct imx_spi_imx_data imx27_cspi_data[]; | |||
83 | #define imx27_add_spi_imx0(pdata) imx27_add_cspi(0, pdata) | 76 | #define imx27_add_spi_imx0(pdata) imx27_add_cspi(0, pdata) |
84 | #define imx27_add_spi_imx1(pdata) imx27_add_cspi(1, pdata) | 77 | #define imx27_add_spi_imx1(pdata) imx27_add_cspi(1, pdata) |
85 | #define imx27_add_spi_imx2(pdata) imx27_add_cspi(2, pdata) | 78 | #define imx27_add_spi_imx2(pdata) imx27_add_cspi(2, pdata) |
86 | |||
87 | extern const struct imx_pata_imx_data imx27_pata_imx_data; | ||
88 | #define imx27_add_pata_imx() \ | ||
89 | imx_add_pata_imx(&imx27_pata_imx_data) | ||
diff --git a/arch/arm/mach-imx/devices-imx31.h b/arch/arm/mach-imx/devices-imx31.h index e8d1611bbc8..dbe940d9c53 100644 --- a/arch/arm/mach-imx/devices-imx31.h +++ b/arch/arm/mach-imx/devices-imx31.h | |||
@@ -6,14 +6,15 @@ | |||
6 | * the terms of the GNU General Public License version 2 as published by the | 6 | * the terms of the GNU General Public License version 2 as published by the |
7 | * Free Software Foundation. | 7 | * Free Software Foundation. |
8 | */ | 8 | */ |
9 | #include "devices/devices-common.h" | 9 | #include <mach/mx31.h> |
10 | #include <mach/devices-common.h> | ||
10 | 11 | ||
11 | extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data; | 12 | extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data; |
12 | #define imx31_add_fsl_usb2_udc(pdata) \ | 13 | #define imx31_add_fsl_usb2_udc(pdata) \ |
13 | imx_add_fsl_usb2_udc(&imx31_fsl_usb2_udc_data, pdata) | 14 | imx_add_fsl_usb2_udc(&imx31_fsl_usb2_udc_data, pdata) |
14 | 15 | ||
15 | extern const struct imx_imx2_wdt_data imx31_imx2_wdt_data; | 16 | extern const struct imx_imx2_wdt_data imx31_imx2_wdt_data; |
16 | #define imx31_add_imx2_wdt() \ | 17 | #define imx31_add_imx2_wdt(pdata) \ |
17 | imx_add_imx2_wdt(&imx31_imx2_wdt_data) | 18 | imx_add_imx2_wdt(&imx31_imx2_wdt_data) |
18 | 19 | ||
19 | extern const struct imx_imx_i2c_data imx31_imx_i2c_data[]; | 20 | extern const struct imx_imx_i2c_data imx31_imx_i2c_data[]; |
@@ -41,8 +42,8 @@ extern const struct imx_imx_uart_1irq_data imx31_imx_uart_data[]; | |||
41 | #define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata) | 42 | #define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata) |
42 | 43 | ||
43 | extern const struct imx_ipu_core_data imx31_ipu_core_data; | 44 | extern const struct imx_ipu_core_data imx31_ipu_core_data; |
44 | #define imx31_add_ipu_core() \ | 45 | #define imx31_add_ipu_core(pdata) \ |
45 | imx_add_ipu_core(&imx31_ipu_core_data) | 46 | imx_add_ipu_core(&imx31_ipu_core_data, pdata) |
46 | #define imx31_alloc_mx3_camera(pdata) \ | 47 | #define imx31_alloc_mx3_camera(pdata) \ |
47 | imx_alloc_mx3_camera(&imx31_ipu_core_data, pdata) | 48 | imx_alloc_mx3_camera(&imx31_ipu_core_data, pdata) |
48 | #define imx31_add_mx3_sdc_fb(pdata) \ | 49 | #define imx31_add_mx3_sdc_fb(pdata) \ |
@@ -64,11 +65,11 @@ extern const struct imx_mxc_nand_data imx31_mxc_nand_data; | |||
64 | imx_add_mxc_nand(&imx31_mxc_nand_data, pdata) | 65 | imx_add_mxc_nand(&imx31_mxc_nand_data, pdata) |
65 | 66 | ||
66 | extern const struct imx_mxc_rtc_data imx31_mxc_rtc_data; | 67 | extern const struct imx_mxc_rtc_data imx31_mxc_rtc_data; |
67 | #define imx31_add_mxc_rtc() \ | 68 | #define imx31_add_mxc_rtc(pdata) \ |
68 | imx_add_mxc_rtc(&imx31_mxc_rtc_data) | 69 | imx_add_mxc_rtc(&imx31_mxc_rtc_data) |
69 | 70 | ||
70 | extern const struct imx_mxc_w1_data imx31_mxc_w1_data; | 71 | extern const struct imx_mxc_w1_data imx31_mxc_w1_data; |
71 | #define imx31_add_mxc_w1() \ | 72 | #define imx31_add_mxc_w1(pdata) \ |
72 | imx_add_mxc_w1(&imx31_mxc_w1_data) | 73 | imx_add_mxc_w1(&imx31_mxc_w1_data) |
73 | 74 | ||
74 | extern const struct imx_spi_imx_data imx31_cspi_data[]; | 75 | extern const struct imx_spi_imx_data imx31_cspi_data[]; |
@@ -77,7 +78,3 @@ extern const struct imx_spi_imx_data imx31_cspi_data[]; | |||
77 | #define imx31_add_spi_imx0(pdata) imx31_add_cspi(0, pdata) | 78 | #define imx31_add_spi_imx0(pdata) imx31_add_cspi(0, pdata) |
78 | #define imx31_add_spi_imx1(pdata) imx31_add_cspi(1, pdata) | 79 | #define imx31_add_spi_imx1(pdata) imx31_add_cspi(1, pdata) |
79 | #define imx31_add_spi_imx2(pdata) imx31_add_cspi(2, pdata) | 80 | #define imx31_add_spi_imx2(pdata) imx31_add_cspi(2, pdata) |
80 | |||
81 | extern const struct imx_pata_imx_data imx31_pata_imx_data; | ||
82 | #define imx31_add_pata_imx() \ | ||
83 | imx_add_pata_imx(&imx31_pata_imx_data) | ||
diff --git a/arch/arm/mach-imx/devices-imx35.h b/arch/arm/mach-imx/devices-imx35.h index e2675f1b141..234cbd3c18a 100644 --- a/arch/arm/mach-imx/devices-imx35.h +++ b/arch/arm/mach-imx/devices-imx35.h | |||
@@ -6,7 +6,8 @@ | |||
6 | * the terms of the GNU General Public License version 2 as published by the | 6 | * the terms of the GNU General Public License version 2 as published by the |
7 | * Free Software Foundation. | 7 | * Free Software Foundation. |
8 | */ | 8 | */ |
9 | #include "devices/devices-common.h" | 9 | #include <mach/mx35.h> |
10 | #include <mach/devices-common.h> | ||
10 | 11 | ||
11 | extern const struct imx_fec_data imx35_fec_data; | 12 | extern const struct imx_fec_data imx35_fec_data; |
12 | #define imx35_add_fec(pdata) \ | 13 | #define imx35_add_fec(pdata) \ |
@@ -23,7 +24,7 @@ extern const struct imx_flexcan_data imx35_flexcan_data[]; | |||
23 | #define imx35_add_flexcan1(pdata) imx35_add_flexcan(1, pdata) | 24 | #define imx35_add_flexcan1(pdata) imx35_add_flexcan(1, pdata) |
24 | 25 | ||
25 | extern const struct imx_imx2_wdt_data imx35_imx2_wdt_data; | 26 | extern const struct imx_imx2_wdt_data imx35_imx2_wdt_data; |
26 | #define imx35_add_imx2_wdt() \ | 27 | #define imx35_add_imx2_wdt(pdata) \ |
27 | imx_add_imx2_wdt(&imx35_imx2_wdt_data) | 28 | imx_add_imx2_wdt(&imx35_imx2_wdt_data) |
28 | 29 | ||
29 | extern const struct imx_imx_i2c_data imx35_imx_i2c_data[]; | 30 | extern const struct imx_imx_i2c_data imx35_imx_i2c_data[]; |
@@ -49,8 +50,8 @@ extern const struct imx_imx_uart_1irq_data imx35_imx_uart_data[]; | |||
49 | #define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata) | 50 | #define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata) |
50 | 51 | ||
51 | extern const struct imx_ipu_core_data imx35_ipu_core_data; | 52 | extern const struct imx_ipu_core_data imx35_ipu_core_data; |
52 | #define imx35_add_ipu_core() \ | 53 | #define imx35_add_ipu_core(pdata) \ |
53 | imx_add_ipu_core(&imx35_ipu_core_data) | 54 | imx_add_ipu_core(&imx35_ipu_core_data, pdata) |
54 | #define imx35_alloc_mx3_camera(pdata) \ | 55 | #define imx35_alloc_mx3_camera(pdata) \ |
55 | imx_alloc_mx3_camera(&imx35_ipu_core_data, pdata) | 56 | imx_alloc_mx3_camera(&imx35_ipu_core_data, pdata) |
56 | #define imx35_add_mx3_sdc_fb(pdata) \ | 57 | #define imx35_add_mx3_sdc_fb(pdata) \ |
@@ -67,12 +68,8 @@ extern const struct imx_mxc_nand_data imx35_mxc_nand_data; | |||
67 | #define imx35_add_mxc_nand(pdata) \ | 68 | #define imx35_add_mxc_nand(pdata) \ |
68 | imx_add_mxc_nand(&imx35_mxc_nand_data, pdata) | 69 | imx_add_mxc_nand(&imx35_mxc_nand_data, pdata) |
69 | 70 | ||
70 | extern const struct imx_mxc_rtc_data imx35_mxc_rtc_data; | ||
71 | #define imx35_add_mxc_rtc() \ | ||
72 | imx_add_mxc_rtc(&imx35_mxc_rtc_data) | ||
73 | |||
74 | extern const struct imx_mxc_w1_data imx35_mxc_w1_data; | 71 | extern const struct imx_mxc_w1_data imx35_mxc_w1_data; |
75 | #define imx35_add_mxc_w1() \ | 72 | #define imx35_add_mxc_w1(pdata) \ |
76 | imx_add_mxc_w1(&imx35_mxc_w1_data) | 73 | imx_add_mxc_w1(&imx35_mxc_w1_data) |
77 | 74 | ||
78 | extern const struct imx_sdhci_esdhc_imx_data imx35_sdhci_esdhc_imx_data[]; | 75 | extern const struct imx_sdhci_esdhc_imx_data imx35_sdhci_esdhc_imx_data[]; |
@@ -84,7 +81,3 @@ extern const struct imx_spi_imx_data imx35_cspi_data[]; | |||
84 | imx_add_spi_imx(&imx35_cspi_data[id], pdata) | 81 | imx_add_spi_imx(&imx35_cspi_data[id], pdata) |
85 | #define imx35_add_spi_imx0(pdata) imx35_add_cspi(0, pdata) | 82 | #define imx35_add_spi_imx0(pdata) imx35_add_cspi(0, pdata) |
86 | #define imx35_add_spi_imx1(pdata) imx35_add_cspi(1, pdata) | 83 | #define imx35_add_spi_imx1(pdata) imx35_add_cspi(1, pdata) |
87 | |||
88 | extern const struct imx_pata_imx_data imx35_pata_imx_data; | ||
89 | #define imx35_add_pata_imx() \ | ||
90 | imx_add_pata_imx(&imx35_pata_imx_data) | ||
diff --git a/arch/arm/mach-imx/devices-imx50.h b/arch/arm/mach-imx/devices-imx50.h deleted file mode 100644 index 2c290391f29..00000000000 --- a/arch/arm/mach-imx/devices-imx50.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | |||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | |||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #include "devices/devices-common.h" | ||
22 | |||
23 | extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[]; | ||
24 | #define imx50_add_imx_uart(id, pdata) \ | ||
25 | imx_add_imx_uart_1irq(&imx50_imx_uart_data[id], pdata) | ||
26 | |||
27 | extern const struct imx_fec_data imx50_fec_data; | ||
28 | #define imx50_add_fec(pdata) \ | ||
29 | imx_add_fec(&imx50_fec_data, pdata) | ||
30 | |||
31 | extern const struct imx_imx_i2c_data imx50_imx_i2c_data[]; | ||
32 | #define imx50_add_imx_i2c(id, pdata) \ | ||
33 | imx_add_imx_i2c(&imx50_imx_i2c_data[id], pdata) | ||
diff --git a/arch/arm/mach-imx/devices-imx51.h b/arch/arm/mach-imx/devices-imx51.h deleted file mode 100644 index deee5baee88..00000000000 --- a/arch/arm/mach-imx/devices-imx51.h +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "devices/devices-common.h" | ||
10 | |||
11 | extern const struct imx_fec_data imx51_fec_data; | ||
12 | #define imx51_add_fec(pdata) \ | ||
13 | imx_add_fec(&imx51_fec_data, pdata) | ||
14 | |||
15 | extern const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data; | ||
16 | #define imx51_add_fsl_usb2_udc(pdata) \ | ||
17 | imx_add_fsl_usb2_udc(&imx51_fsl_usb2_udc_data, pdata) | ||
18 | |||
19 | extern const struct imx_imx_i2c_data imx51_imx_i2c_data[]; | ||
20 | #define imx51_add_imx_i2c(id, pdata) \ | ||
21 | imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata) | ||
22 | #define imx51_add_hsi2c(pdata) \ | ||
23 | imx51_add_imx_i2c(2, pdata) | ||
24 | |||
25 | extern const struct imx_imx_ssi_data imx51_imx_ssi_data[]; | ||
26 | #define imx51_add_imx_ssi(id, pdata) \ | ||
27 | imx_add_imx_ssi(&imx51_imx_ssi_data[id], pdata) | ||
28 | |||
29 | extern const struct imx_imx_uart_1irq_data imx51_imx_uart_data[]; | ||
30 | #define imx51_add_imx_uart(id, pdata) \ | ||
31 | imx_add_imx_uart_1irq(&imx51_imx_uart_data[id], pdata) | ||
32 | |||
33 | extern const struct imx_mxc_ehci_data imx51_mxc_ehci_otg_data; | ||
34 | #define imx51_add_mxc_ehci_otg(pdata) \ | ||
35 | imx_add_mxc_ehci(&imx51_mxc_ehci_otg_data, pdata) | ||
36 | extern const struct imx_mxc_ehci_data imx51_mxc_ehci_hs_data[]; | ||
37 | #define imx51_add_mxc_ehci_hs(id, pdata) \ | ||
38 | imx_add_mxc_ehci(&imx51_mxc_ehci_hs_data[id - 1], pdata) | ||
39 | |||
40 | extern const struct imx_mxc_nand_data imx51_mxc_nand_data; | ||
41 | #define imx51_add_mxc_nand(pdata) \ | ||
42 | imx_add_mxc_nand(&imx51_mxc_nand_data, pdata) | ||
43 | |||
44 | extern const struct imx_sdhci_esdhc_imx_data imx51_sdhci_esdhc_imx_data[]; | ||
45 | #define imx51_add_sdhci_esdhc_imx(id, pdata) \ | ||
46 | imx_add_sdhci_esdhc_imx(&imx51_sdhci_esdhc_imx_data[id], pdata) | ||
47 | |||
48 | extern const struct imx_spi_imx_data imx51_cspi_data; | ||
49 | #define imx51_add_cspi(pdata) \ | ||
50 | imx_add_spi_imx(&imx51_cspi_data, pdata) | ||
51 | |||
52 | extern const struct imx_spi_imx_data imx51_ecspi_data[]; | ||
53 | #define imx51_add_ecspi(id, pdata) \ | ||
54 | imx_add_spi_imx(&imx51_ecspi_data[id], pdata) | ||
55 | |||
56 | extern const struct imx_imx2_wdt_data imx51_imx2_wdt_data[]; | ||
57 | #define imx51_add_imx2_wdt(id) \ | ||
58 | imx_add_imx2_wdt(&imx51_imx2_wdt_data[id]) | ||
59 | |||
60 | extern const struct imx_mxc_pwm_data imx51_mxc_pwm_data[]; | ||
61 | #define imx51_add_mxc_pwm(id) \ | ||
62 | imx_add_mxc_pwm(&imx51_mxc_pwm_data[id]) | ||
63 | |||
64 | extern const struct imx_imx_keypad_data imx51_imx_keypad_data; | ||
65 | #define imx51_add_imx_keypad(pdata) \ | ||
66 | imx_add_imx_keypad(&imx51_imx_keypad_data, pdata) | ||
67 | |||
68 | extern const struct imx_pata_imx_data imx51_pata_imx_data; | ||
69 | #define imx51_add_pata_imx() \ | ||
70 | imx_add_pata_imx(&imx51_pata_imx_data) | ||
diff --git a/arch/arm/mach-imx/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig deleted file mode 100644 index 9a8f1ca7bcb..00000000000 --- a/arch/arm/mach-imx/devices/Kconfig +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | config IMX_HAVE_PLATFORM_FEC | ||
2 | bool | ||
3 | default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX50 || SOC_IMX51 || SOC_IMX53 | ||
4 | |||
5 | config IMX_HAVE_PLATFORM_FLEXCAN | ||
6 | bool | ||
7 | select HAVE_CAN_FLEXCAN if CAN | ||
8 | |||
9 | config IMX_HAVE_PLATFORM_FSL_USB2_UDC | ||
10 | bool | ||
11 | |||
12 | config IMX_HAVE_PLATFORM_GPIO_KEYS | ||
13 | bool | ||
14 | default y if SOC_IMX51 | ||
15 | |||
16 | config IMX_HAVE_PLATFORM_IMX21_HCD | ||
17 | bool | ||
18 | |||
19 | config IMX_HAVE_PLATFORM_IMX27_CODA | ||
20 | bool | ||
21 | default y if SOC_IMX27 | ||
22 | |||
23 | config IMX_HAVE_PLATFORM_IMX2_WDT | ||
24 | bool | ||
25 | |||
26 | config IMX_HAVE_PLATFORM_IMXDI_RTC | ||
27 | bool | ||
28 | |||
29 | config IMX_HAVE_PLATFORM_IMX_FB | ||
30 | bool | ||
31 | |||
32 | config IMX_HAVE_PLATFORM_IMX_I2C | ||
33 | bool | ||
34 | |||
35 | config IMX_HAVE_PLATFORM_IMX_KEYPAD | ||
36 | bool | ||
37 | |||
38 | config IMX_HAVE_PLATFORM_PATA_IMX | ||
39 | bool | ||
40 | |||
41 | config IMX_HAVE_PLATFORM_IMX_SSI | ||
42 | bool | ||
43 | |||
44 | config IMX_HAVE_PLATFORM_IMX_UART | ||
45 | bool | ||
46 | |||
47 | config IMX_HAVE_PLATFORM_IMX_UDC | ||
48 | bool | ||
49 | |||
50 | config IMX_HAVE_PLATFORM_IPU_CORE | ||
51 | bool | ||
52 | |||
53 | config IMX_HAVE_PLATFORM_MX1_CAMERA | ||
54 | bool | ||
55 | |||
56 | config IMX_HAVE_PLATFORM_MX2_CAMERA | ||
57 | bool | ||
58 | |||
59 | config IMX_HAVE_PLATFORM_MX2_EMMA | ||
60 | bool | ||
61 | |||
62 | config IMX_HAVE_PLATFORM_MXC_EHCI | ||
63 | bool | ||
64 | |||
65 | config IMX_HAVE_PLATFORM_MXC_MMC | ||
66 | bool | ||
67 | |||
68 | config IMX_HAVE_PLATFORM_MXC_NAND | ||
69 | bool | ||
70 | |||
71 | config IMX_HAVE_PLATFORM_MXC_PWM | ||
72 | bool | ||
73 | |||
74 | config IMX_HAVE_PLATFORM_MXC_RNGA | ||
75 | bool | ||
76 | select ARCH_HAS_RNGA | ||
77 | |||
78 | config IMX_HAVE_PLATFORM_MXC_RTC | ||
79 | bool | ||
80 | |||
81 | config IMX_HAVE_PLATFORM_MXC_W1 | ||
82 | bool | ||
83 | |||
84 | config IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
85 | bool | ||
86 | |||
87 | config IMX_HAVE_PLATFORM_SPI_IMX | ||
88 | bool | ||
89 | |||
90 | config IMX_HAVE_PLATFORM_AHCI | ||
91 | bool | ||
92 | default y if ARCH_MX53 | ||
diff --git a/arch/arm/mach-imx/devices/Makefile b/arch/arm/mach-imx/devices/Makefile deleted file mode 100644 index 6acf37e0c11..00000000000 --- a/arch/arm/mach-imx/devices/Makefile +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | obj-y := devices.o | ||
2 | |||
3 | obj-$(CONFIG_IMX_HAVE_PLATFORM_FEC) += platform-fec.o | ||
4 | obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o | ||
5 | obj-$(CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC) += platform-fsl-usb2-udc.o | ||
6 | obj-$(CONFIG_IMX_HAVE_PLATFORM_GPIO_KEYS) += platform-gpio_keys.o | ||
7 | obj-y += platform-gpio-mxc.o | ||
8 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX21_HCD) += platform-imx21-hcd.o | ||
9 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX27_CODA) += platform-imx27-coda.o | ||
10 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX2_WDT) += platform-imx2-wdt.o | ||
11 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMXDI_RTC) += platform-imxdi_rtc.o | ||
12 | obj-y += platform-imx-dma.o | ||
13 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_FB) += platform-imx-fb.o | ||
14 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o | ||
15 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_KEYPAD) += platform-imx-keypad.o | ||
16 | obj-$(CONFIG_IMX_HAVE_PLATFORM_PATA_IMX) += platform-pata_imx.o | ||
17 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o | ||
18 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o | ||
19 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o | ||
20 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IPU_CORE) += platform-ipu-core.o | ||
21 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MX1_CAMERA) += platform-mx1-camera.o | ||
22 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA) += platform-mx2-camera.o | ||
23 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI) += platform-mxc-ehci.o | ||
24 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC) += platform-mxc-mmc.o | ||
25 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND) += platform-mxc_nand.o | ||
26 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_PWM) += platform-mxc_pwm.o | ||
27 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RNGA) += platform-mxc_rnga.o | ||
28 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RTC) += platform-mxc_rtc.o | ||
29 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o | ||
30 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o | ||
31 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o | ||
32 | obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o | ||
33 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_EMMA) += platform-mx2-emma.o | ||
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h deleted file mode 100644 index 6277baf1b7b..00000000000 --- a/arch/arm/mach-imx/devices/devices-common.h +++ /dev/null | |||
@@ -1,355 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/platform_data/dma-imx-sdma.h> | ||
13 | |||
14 | extern struct device mxc_aips_bus; | ||
15 | extern struct device mxc_ahb_bus; | ||
16 | |||
17 | static inline struct platform_device *imx_add_platform_device_dmamask( | ||
18 | const char *name, int id, | ||
19 | const struct resource *res, unsigned int num_resources, | ||
20 | const void *data, size_t size_data, u64 dmamask) | ||
21 | { | ||
22 | struct platform_device_info pdevinfo = { | ||
23 | .name = name, | ||
24 | .id = id, | ||
25 | .res = res, | ||
26 | .num_res = num_resources, | ||
27 | .data = data, | ||
28 | .size_data = size_data, | ||
29 | .dma_mask = dmamask, | ||
30 | }; | ||
31 | return platform_device_register_full(&pdevinfo); | ||
32 | } | ||
33 | |||
34 | static inline struct platform_device *imx_add_platform_device( | ||
35 | const char *name, int id, | ||
36 | const struct resource *res, unsigned int num_resources, | ||
37 | const void *data, size_t size_data) | ||
38 | { | ||
39 | return imx_add_platform_device_dmamask( | ||
40 | name, id, res, num_resources, data, size_data, 0); | ||
41 | } | ||
42 | |||
43 | #include <linux/fec.h> | ||
44 | struct imx_fec_data { | ||
45 | const char *devid; | ||
46 | resource_size_t iobase; | ||
47 | resource_size_t irq; | ||
48 | }; | ||
49 | struct platform_device *__init imx_add_fec( | ||
50 | const struct imx_fec_data *data, | ||
51 | const struct fec_platform_data *pdata); | ||
52 | |||
53 | #include <linux/can/platform/flexcan.h> | ||
54 | struct imx_flexcan_data { | ||
55 | int id; | ||
56 | resource_size_t iobase; | ||
57 | resource_size_t iosize; | ||
58 | resource_size_t irq; | ||
59 | }; | ||
60 | struct platform_device *__init imx_add_flexcan( | ||
61 | const struct imx_flexcan_data *data, | ||
62 | const struct flexcan_platform_data *pdata); | ||
63 | |||
64 | #include <linux/fsl_devices.h> | ||
65 | struct imx_fsl_usb2_udc_data { | ||
66 | resource_size_t iobase; | ||
67 | resource_size_t irq; | ||
68 | }; | ||
69 | struct platform_device *__init imx_add_fsl_usb2_udc( | ||
70 | const struct imx_fsl_usb2_udc_data *data, | ||
71 | const struct fsl_usb2_platform_data *pdata); | ||
72 | |||
73 | #include <linux/gpio_keys.h> | ||
74 | struct platform_device *__init imx_add_gpio_keys( | ||
75 | const struct gpio_keys_platform_data *pdata); | ||
76 | |||
77 | #include <linux/platform_data/usb-mx2.h> | ||
78 | struct imx_imx21_hcd_data { | ||
79 | resource_size_t iobase; | ||
80 | resource_size_t irq; | ||
81 | }; | ||
82 | struct platform_device *__init imx_add_imx21_hcd( | ||
83 | const struct imx_imx21_hcd_data *data, | ||
84 | const struct mx21_usbh_platform_data *pdata); | ||
85 | |||
86 | struct imx_imx27_coda_data { | ||
87 | resource_size_t iobase; | ||
88 | resource_size_t iosize; | ||
89 | resource_size_t irq; | ||
90 | }; | ||
91 | struct platform_device *__init imx_add_imx27_coda( | ||
92 | const struct imx_imx27_coda_data *data); | ||
93 | |||
94 | struct imx_imx2_wdt_data { | ||
95 | int id; | ||
96 | resource_size_t iobase; | ||
97 | resource_size_t iosize; | ||
98 | }; | ||
99 | struct platform_device *__init imx_add_imx2_wdt( | ||
100 | const struct imx_imx2_wdt_data *data); | ||
101 | |||
102 | struct imx_imxdi_rtc_data { | ||
103 | resource_size_t iobase; | ||
104 | resource_size_t irq; | ||
105 | }; | ||
106 | struct platform_device *__init imx_add_imxdi_rtc( | ||
107 | const struct imx_imxdi_rtc_data *data); | ||
108 | |||
109 | #include <linux/platform_data/video-imxfb.h> | ||
110 | struct imx_imx_fb_data { | ||
111 | const char *devid; | ||
112 | resource_size_t iobase; | ||
113 | resource_size_t iosize; | ||
114 | resource_size_t irq; | ||
115 | }; | ||
116 | struct platform_device *__init imx_add_imx_fb( | ||
117 | const struct imx_imx_fb_data *data, | ||
118 | const struct imx_fb_platform_data *pdata); | ||
119 | |||
120 | #include <linux/platform_data/i2c-imx.h> | ||
121 | struct imx_imx_i2c_data { | ||
122 | const char *devid; | ||
123 | int id; | ||
124 | resource_size_t iobase; | ||
125 | resource_size_t iosize; | ||
126 | resource_size_t irq; | ||
127 | }; | ||
128 | struct platform_device *__init imx_add_imx_i2c( | ||
129 | const struct imx_imx_i2c_data *data, | ||
130 | const struct imxi2c_platform_data *pdata); | ||
131 | |||
132 | #include <linux/input/matrix_keypad.h> | ||
133 | struct imx_imx_keypad_data { | ||
134 | resource_size_t iobase; | ||
135 | resource_size_t iosize; | ||
136 | resource_size_t irq; | ||
137 | }; | ||
138 | struct platform_device *__init imx_add_imx_keypad( | ||
139 | const struct imx_imx_keypad_data *data, | ||
140 | const struct matrix_keymap_data *pdata); | ||
141 | |||
142 | #include <linux/platform_data/asoc-imx-ssi.h> | ||
143 | struct imx_imx_ssi_data { | ||
144 | int id; | ||
145 | resource_size_t iobase; | ||
146 | resource_size_t iosize; | ||
147 | resource_size_t irq; | ||
148 | resource_size_t dmatx0; | ||
149 | resource_size_t dmarx0; | ||
150 | resource_size_t dmatx1; | ||
151 | resource_size_t dmarx1; | ||
152 | }; | ||
153 | struct platform_device *__init imx_add_imx_ssi( | ||
154 | const struct imx_imx_ssi_data *data, | ||
155 | const struct imx_ssi_platform_data *pdata); | ||
156 | |||
157 | #include <linux/platform_data/serial-imx.h> | ||
158 | struct imx_imx_uart_3irq_data { | ||
159 | int id; | ||
160 | resource_size_t iobase; | ||
161 | resource_size_t iosize; | ||
162 | resource_size_t irqrx; | ||
163 | resource_size_t irqtx; | ||
164 | resource_size_t irqrts; | ||
165 | }; | ||
166 | struct platform_device *__init imx_add_imx_uart_3irq( | ||
167 | const struct imx_imx_uart_3irq_data *data, | ||
168 | const struct imxuart_platform_data *pdata); | ||
169 | |||
170 | struct imx_imx_uart_1irq_data { | ||
171 | int id; | ||
172 | resource_size_t iobase; | ||
173 | resource_size_t iosize; | ||
174 | resource_size_t irq; | ||
175 | }; | ||
176 | struct platform_device *__init imx_add_imx_uart_1irq( | ||
177 | const struct imx_imx_uart_1irq_data *data, | ||
178 | const struct imxuart_platform_data *pdata); | ||
179 | |||
180 | #include <linux/platform_data/usb-imx_udc.h> | ||
181 | struct imx_imx_udc_data { | ||
182 | resource_size_t iobase; | ||
183 | resource_size_t iosize; | ||
184 | resource_size_t irq0; | ||
185 | resource_size_t irq1; | ||
186 | resource_size_t irq2; | ||
187 | resource_size_t irq3; | ||
188 | resource_size_t irq4; | ||
189 | resource_size_t irq5; | ||
190 | resource_size_t irq6; | ||
191 | }; | ||
192 | struct platform_device *__init imx_add_imx_udc( | ||
193 | const struct imx_imx_udc_data *data, | ||
194 | const struct imxusb_platform_data *pdata); | ||
195 | |||
196 | #include <linux/platform_data/video-mx3fb.h> | ||
197 | #include <linux/platform_data/camera-mx3.h> | ||
198 | struct imx_ipu_core_data { | ||
199 | resource_size_t iobase; | ||
200 | resource_size_t synirq; | ||
201 | resource_size_t errirq; | ||
202 | }; | ||
203 | struct platform_device *__init imx_add_ipu_core( | ||
204 | const struct imx_ipu_core_data *data); | ||
205 | struct platform_device *__init imx_alloc_mx3_camera( | ||
206 | const struct imx_ipu_core_data *data, | ||
207 | const struct mx3_camera_pdata *pdata); | ||
208 | struct platform_device *__init imx_add_mx3_sdc_fb( | ||
209 | const struct imx_ipu_core_data *data, | ||
210 | struct mx3fb_platform_data *pdata); | ||
211 | |||
212 | #include <linux/platform_data/camera-mx1.h> | ||
213 | struct imx_mx1_camera_data { | ||
214 | resource_size_t iobase; | ||
215 | resource_size_t iosize; | ||
216 | resource_size_t irq; | ||
217 | }; | ||
218 | struct platform_device *__init imx_add_mx1_camera( | ||
219 | const struct imx_mx1_camera_data *data, | ||
220 | const struct mx1_camera_pdata *pdata); | ||
221 | |||
222 | #include <linux/platform_data/camera-mx2.h> | ||
223 | struct imx_mx2_camera_data { | ||
224 | const char *devid; | ||
225 | resource_size_t iobasecsi; | ||
226 | resource_size_t iosizecsi; | ||
227 | resource_size_t irqcsi; | ||
228 | resource_size_t iobaseemmaprp; | ||
229 | resource_size_t iosizeemmaprp; | ||
230 | resource_size_t irqemmaprp; | ||
231 | }; | ||
232 | struct platform_device *__init imx_add_mx2_camera( | ||
233 | const struct imx_mx2_camera_data *data, | ||
234 | const struct mx2_camera_platform_data *pdata); | ||
235 | |||
236 | |||
237 | struct imx_mx2_emma_data { | ||
238 | resource_size_t iobase; | ||
239 | resource_size_t iosize; | ||
240 | resource_size_t irq; | ||
241 | }; | ||
242 | struct platform_device *__init imx_add_mx2_emmaprp( | ||
243 | const struct imx_mx2_emma_data *data); | ||
244 | |||
245 | #include <linux/platform_data/usb-ehci-mxc.h> | ||
246 | struct imx_mxc_ehci_data { | ||
247 | int id; | ||
248 | resource_size_t iobase; | ||
249 | resource_size_t irq; | ||
250 | }; | ||
251 | struct platform_device *__init imx_add_mxc_ehci( | ||
252 | const struct imx_mxc_ehci_data *data, | ||
253 | const struct mxc_usbh_platform_data *pdata); | ||
254 | |||
255 | #include <linux/platform_data/mmc-mxcmmc.h> | ||
256 | struct imx_mxc_mmc_data { | ||
257 | const char *devid; | ||
258 | int id; | ||
259 | resource_size_t iobase; | ||
260 | resource_size_t iosize; | ||
261 | resource_size_t irq; | ||
262 | resource_size_t dmareq; | ||
263 | }; | ||
264 | struct platform_device *__init imx_add_mxc_mmc( | ||
265 | const struct imx_mxc_mmc_data *data, | ||
266 | const struct imxmmc_platform_data *pdata); | ||
267 | |||
268 | #include <linux/platform_data/mtd-mxc_nand.h> | ||
269 | struct imx_mxc_nand_data { | ||
270 | const char *devid; | ||
271 | /* | ||
272 | * id is traditionally 0, but -1 is more appropriate. We use -1 for new | ||
273 | * machines but don't change existing devices as the nand device usually | ||
274 | * appears in the kernel command line to pass its partitioning. | ||
275 | */ | ||
276 | int id; | ||
277 | resource_size_t iobase; | ||
278 | resource_size_t iosize; | ||
279 | resource_size_t axibase; | ||
280 | resource_size_t irq; | ||
281 | }; | ||
282 | struct platform_device *__init imx_add_mxc_nand( | ||
283 | const struct imx_mxc_nand_data *data, | ||
284 | const struct mxc_nand_platform_data *pdata); | ||
285 | |||
286 | struct imx_pata_imx_data { | ||
287 | resource_size_t iobase; | ||
288 | resource_size_t iosize; | ||
289 | resource_size_t irq; | ||
290 | }; | ||
291 | struct platform_device *__init imx_add_pata_imx( | ||
292 | const struct imx_pata_imx_data *data); | ||
293 | |||
294 | struct imx_mxc_pwm_data { | ||
295 | int id; | ||
296 | resource_size_t iobase; | ||
297 | resource_size_t iosize; | ||
298 | resource_size_t irq; | ||
299 | }; | ||
300 | struct platform_device *__init imx_add_mxc_pwm( | ||
301 | const struct imx_mxc_pwm_data *data); | ||
302 | |||
303 | /* mxc_rtc */ | ||
304 | struct imx_mxc_rtc_data { | ||
305 | const char *devid; | ||
306 | resource_size_t iobase; | ||
307 | resource_size_t irq; | ||
308 | }; | ||
309 | struct platform_device *__init imx_add_mxc_rtc( | ||
310 | const struct imx_mxc_rtc_data *data); | ||
311 | |||
312 | /* mxc_w1 */ | ||
313 | struct imx_mxc_w1_data { | ||
314 | resource_size_t iobase; | ||
315 | }; | ||
316 | struct platform_device *__init imx_add_mxc_w1( | ||
317 | const struct imx_mxc_w1_data *data); | ||
318 | |||
319 | #include <linux/platform_data/mmc-esdhc-imx.h> | ||
320 | struct imx_sdhci_esdhc_imx_data { | ||
321 | const char *devid; | ||
322 | int id; | ||
323 | resource_size_t iobase; | ||
324 | resource_size_t irq; | ||
325 | }; | ||
326 | struct platform_device *__init imx_add_sdhci_esdhc_imx( | ||
327 | const struct imx_sdhci_esdhc_imx_data *data, | ||
328 | const struct esdhc_platform_data *pdata); | ||
329 | |||
330 | #include <linux/platform_data/spi-imx.h> | ||
331 | struct imx_spi_imx_data { | ||
332 | const char *devid; | ||
333 | int id; | ||
334 | resource_size_t iobase; | ||
335 | resource_size_t iosize; | ||
336 | int irq; | ||
337 | }; | ||
338 | struct platform_device *__init imx_add_spi_imx( | ||
339 | const struct imx_spi_imx_data *data, | ||
340 | const struct spi_imx_master *pdata); | ||
341 | |||
342 | struct platform_device *imx_add_imx_dma(char *name, resource_size_t iobase, | ||
343 | int irq, int irq_err); | ||
344 | struct platform_device *imx_add_imx_sdma(char *name, | ||
345 | resource_size_t iobase, int irq, struct sdma_platform_data *pdata); | ||
346 | |||
347 | #include <linux/ahci_platform.h> | ||
348 | struct imx_ahci_imx_data { | ||
349 | const char *devid; | ||
350 | resource_size_t iobase; | ||
351 | resource_size_t irq; | ||
352 | }; | ||
353 | struct platform_device *__init imx_add_ahci_imx( | ||
354 | const struct imx_ahci_imx_data *data, | ||
355 | const struct ahci_platform_data *pdata); | ||
diff --git a/arch/arm/mach-imx/devices/devices.c b/arch/arm/mach-imx/devices/devices.c deleted file mode 100644 index 1b37482407f..00000000000 --- a/arch/arm/mach-imx/devices/devices.c +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008 Sascha Hauer, kernel@pengutronix.de | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
16 | * Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/slab.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/err.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | |||
25 | struct device mxc_aips_bus = { | ||
26 | .init_name = "mxc_aips", | ||
27 | .parent = &platform_bus, | ||
28 | }; | ||
29 | |||
30 | struct device mxc_ahb_bus = { | ||
31 | .init_name = "mxc_ahb", | ||
32 | .parent = &platform_bus, | ||
33 | }; | ||
34 | |||
35 | int __init mxc_device_init(void) | ||
36 | { | ||
37 | int ret; | ||
38 | |||
39 | ret = device_register(&mxc_aips_bus); | ||
40 | if (IS_ERR_VALUE(ret)) | ||
41 | goto done; | ||
42 | |||
43 | ret = device_register(&mxc_ahb_bus); | ||
44 | |||
45 | done: | ||
46 | return ret; | ||
47 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-ahci-imx.c b/arch/arm/mach-imx/devices/platform-ahci-imx.c deleted file mode 100644 index 3d87dd9c284..00000000000 --- a/arch/arm/mach-imx/devices/platform-ahci-imx.c +++ /dev/null | |||
@@ -1,157 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | |||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | |||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/io.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/err.h> | ||
24 | #include <linux/device.h> | ||
25 | #include <linux/dma-mapping.h> | ||
26 | #include <asm/sizes.h> | ||
27 | |||
28 | #include "../hardware.h" | ||
29 | #include "devices-common.h" | ||
30 | |||
31 | #define imx_ahci_imx_data_entry_single(soc, _devid) \ | ||
32 | { \ | ||
33 | .devid = _devid, \ | ||
34 | .iobase = soc ## _SATA_BASE_ADDR, \ | ||
35 | .irq = soc ## _INT_SATA, \ | ||
36 | } | ||
37 | |||
38 | #ifdef CONFIG_SOC_IMX53 | ||
39 | const struct imx_ahci_imx_data imx53_ahci_imx_data __initconst = | ||
40 | imx_ahci_imx_data_entry_single(MX53, "imx53-ahci"); | ||
41 | #endif | ||
42 | |||
43 | enum { | ||
44 | HOST_CAP = 0x00, | ||
45 | HOST_CAP_SSS = (1 << 27), /* Staggered Spin-up */ | ||
46 | HOST_PORTS_IMPL = 0x0c, | ||
47 | HOST_TIMER1MS = 0xe0, /* Timer 1-ms */ | ||
48 | }; | ||
49 | |||
50 | static struct clk *sata_clk, *sata_ref_clk; | ||
51 | |||
52 | /* AHCI module Initialization, if return 0, initialization is successful. */ | ||
53 | static int imx_sata_init(struct device *dev, void __iomem *addr) | ||
54 | { | ||
55 | u32 tmpdata; | ||
56 | int ret = 0; | ||
57 | struct clk *clk; | ||
58 | |||
59 | sata_clk = clk_get(dev, "ahci"); | ||
60 | if (IS_ERR(sata_clk)) { | ||
61 | dev_err(dev, "no sata clock.\n"); | ||
62 | return PTR_ERR(sata_clk); | ||
63 | } | ||
64 | ret = clk_prepare_enable(sata_clk); | ||
65 | if (ret) { | ||
66 | dev_err(dev, "can't prepare/enable sata clock.\n"); | ||
67 | goto put_sata_clk; | ||
68 | } | ||
69 | |||
70 | /* Get the AHCI SATA PHY CLK */ | ||
71 | sata_ref_clk = clk_get(dev, "ahci_phy"); | ||
72 | if (IS_ERR(sata_ref_clk)) { | ||
73 | dev_err(dev, "no sata ref clock.\n"); | ||
74 | ret = PTR_ERR(sata_ref_clk); | ||
75 | goto release_sata_clk; | ||
76 | } | ||
77 | ret = clk_prepare_enable(sata_ref_clk); | ||
78 | if (ret) { | ||
79 | dev_err(dev, "can't prepare/enable sata ref clock.\n"); | ||
80 | goto put_sata_ref_clk; | ||
81 | } | ||
82 | |||
83 | /* Get the AHB clock rate, and configure the TIMER1MS reg later */ | ||
84 | clk = clk_get(dev, "ahci_dma"); | ||
85 | if (IS_ERR(clk)) { | ||
86 | dev_err(dev, "no dma clock.\n"); | ||
87 | ret = PTR_ERR(clk); | ||
88 | goto release_sata_ref_clk; | ||
89 | } | ||
90 | tmpdata = clk_get_rate(clk) / 1000; | ||
91 | clk_put(clk); | ||
92 | |||
93 | writel(tmpdata, addr + HOST_TIMER1MS); | ||
94 | |||
95 | tmpdata = readl(addr + HOST_CAP); | ||
96 | if (!(tmpdata & HOST_CAP_SSS)) { | ||
97 | tmpdata |= HOST_CAP_SSS; | ||
98 | writel(tmpdata, addr + HOST_CAP); | ||
99 | } | ||
100 | |||
101 | if (!(readl(addr + HOST_PORTS_IMPL) & 0x1)) | ||
102 | writel((readl(addr + HOST_PORTS_IMPL) | 0x1), | ||
103 | addr + HOST_PORTS_IMPL); | ||
104 | |||
105 | return 0; | ||
106 | |||
107 | release_sata_ref_clk: | ||
108 | clk_disable_unprepare(sata_ref_clk); | ||
109 | put_sata_ref_clk: | ||
110 | clk_put(sata_ref_clk); | ||
111 | release_sata_clk: | ||
112 | clk_disable_unprepare(sata_clk); | ||
113 | put_sata_clk: | ||
114 | clk_put(sata_clk); | ||
115 | |||
116 | return ret; | ||
117 | } | ||
118 | |||
119 | static void imx_sata_exit(struct device *dev) | ||
120 | { | ||
121 | clk_disable_unprepare(sata_ref_clk); | ||
122 | clk_put(sata_ref_clk); | ||
123 | |||
124 | clk_disable_unprepare(sata_clk); | ||
125 | clk_put(sata_clk); | ||
126 | |||
127 | } | ||
128 | struct platform_device *__init imx_add_ahci_imx( | ||
129 | const struct imx_ahci_imx_data *data, | ||
130 | const struct ahci_platform_data *pdata) | ||
131 | { | ||
132 | struct resource res[] = { | ||
133 | { | ||
134 | .start = data->iobase, | ||
135 | .end = data->iobase + SZ_4K - 1, | ||
136 | .flags = IORESOURCE_MEM, | ||
137 | }, { | ||
138 | .start = data->irq, | ||
139 | .end = data->irq, | ||
140 | .flags = IORESOURCE_IRQ, | ||
141 | }, | ||
142 | }; | ||
143 | |||
144 | return imx_add_platform_device_dmamask(data->devid, 0, | ||
145 | res, ARRAY_SIZE(res), | ||
146 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
147 | } | ||
148 | |||
149 | struct platform_device *__init imx53_add_ahci_imx(void) | ||
150 | { | ||
151 | struct ahci_platform_data pdata = { | ||
152 | .init = imx_sata_init, | ||
153 | .exit = imx_sata_exit, | ||
154 | }; | ||
155 | |||
156 | return imx_add_ahci_imx(&imx53_ahci_imx_data, &pdata); | ||
157 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-fec.c b/arch/arm/mach-imx/devices/platform-fec.c deleted file mode 100644 index 2cb188ad9a0..00000000000 --- a/arch/arm/mach-imx/devices/platform-fec.c +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/dma-mapping.h> | ||
10 | #include <asm/sizes.h> | ||
11 | |||
12 | #include "../hardware.h" | ||
13 | #include "devices-common.h" | ||
14 | |||
15 | #define imx_fec_data_entry_single(soc, _devid) \ | ||
16 | { \ | ||
17 | .devid = _devid, \ | ||
18 | .iobase = soc ## _FEC_BASE_ADDR, \ | ||
19 | .irq = soc ## _INT_FEC, \ | ||
20 | } | ||
21 | |||
22 | #ifdef CONFIG_SOC_IMX25 | ||
23 | const struct imx_fec_data imx25_fec_data __initconst = | ||
24 | imx_fec_data_entry_single(MX25, "imx25-fec"); | ||
25 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
26 | |||
27 | #ifdef CONFIG_SOC_IMX27 | ||
28 | const struct imx_fec_data imx27_fec_data __initconst = | ||
29 | imx_fec_data_entry_single(MX27, "imx27-fec"); | ||
30 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
31 | |||
32 | #ifdef CONFIG_SOC_IMX35 | ||
33 | /* i.mx35 has the i.mx27 type fec */ | ||
34 | const struct imx_fec_data imx35_fec_data __initconst = | ||
35 | imx_fec_data_entry_single(MX35, "imx27-fec"); | ||
36 | #endif | ||
37 | |||
38 | #ifdef CONFIG_SOC_IMX50 | ||
39 | /* i.mx50 has the i.mx25 type fec */ | ||
40 | const struct imx_fec_data imx50_fec_data __initconst = | ||
41 | imx_fec_data_entry_single(MX50, "imx25-fec"); | ||
42 | #endif | ||
43 | |||
44 | #ifdef CONFIG_SOC_IMX51 | ||
45 | /* i.mx51 has the i.mx27 type fec */ | ||
46 | const struct imx_fec_data imx51_fec_data __initconst = | ||
47 | imx_fec_data_entry_single(MX51, "imx27-fec"); | ||
48 | #endif | ||
49 | |||
50 | #ifdef CONFIG_SOC_IMX53 | ||
51 | /* i.mx53 has the i.mx25 type fec */ | ||
52 | const struct imx_fec_data imx53_fec_data __initconst = | ||
53 | imx_fec_data_entry_single(MX53, "imx25-fec"); | ||
54 | #endif | ||
55 | |||
56 | struct platform_device *__init imx_add_fec( | ||
57 | const struct imx_fec_data *data, | ||
58 | const struct fec_platform_data *pdata) | ||
59 | { | ||
60 | struct resource res[] = { | ||
61 | { | ||
62 | .start = data->iobase, | ||
63 | .end = data->iobase + SZ_4K - 1, | ||
64 | .flags = IORESOURCE_MEM, | ||
65 | }, { | ||
66 | .start = data->irq, | ||
67 | .end = data->irq, | ||
68 | .flags = IORESOURCE_IRQ, | ||
69 | }, | ||
70 | }; | ||
71 | |||
72 | return imx_add_platform_device_dmamask(data->devid, 0, | ||
73 | res, ARRAY_SIZE(res), | ||
74 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
75 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-flexcan.c b/arch/arm/mach-imx/devices/platform-flexcan.c deleted file mode 100644 index 1078bf0a94e..00000000000 --- a/arch/arm/mach-imx/devices/platform-flexcan.c +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix, Marc Kleine-Budde <kernel@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it under | ||
5 | * the terms of the GNU General Public License version 2 as published by the | ||
6 | * Free Software Foundation. | ||
7 | */ | ||
8 | #include "../hardware.h" | ||
9 | #include "devices-common.h" | ||
10 | |||
11 | #define imx_flexcan_data_entry_single(soc, _id, _hwid, _size) \ | ||
12 | { \ | ||
13 | .id = _id, \ | ||
14 | .iobase = soc ## _CAN ## _hwid ## _BASE_ADDR, \ | ||
15 | .iosize = _size, \ | ||
16 | .irq = soc ## _INT_CAN ## _hwid, \ | ||
17 | } | ||
18 | |||
19 | #define imx_flexcan_data_entry(soc, _id, _hwid, _size) \ | ||
20 | [_id] = imx_flexcan_data_entry_single(soc, _id, _hwid, _size) | ||
21 | |||
22 | #ifdef CONFIG_SOC_IMX25 | ||
23 | const struct imx_flexcan_data imx25_flexcan_data[] __initconst = { | ||
24 | #define imx25_flexcan_data_entry(_id, _hwid) \ | ||
25 | imx_flexcan_data_entry(MX25, _id, _hwid, SZ_16K) | ||
26 | imx25_flexcan_data_entry(0, 1), | ||
27 | imx25_flexcan_data_entry(1, 2), | ||
28 | }; | ||
29 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
30 | |||
31 | #ifdef CONFIG_SOC_IMX35 | ||
32 | const struct imx_flexcan_data imx35_flexcan_data[] __initconst = { | ||
33 | #define imx35_flexcan_data_entry(_id, _hwid) \ | ||
34 | imx_flexcan_data_entry(MX35, _id, _hwid, SZ_16K) | ||
35 | imx35_flexcan_data_entry(0, 1), | ||
36 | imx35_flexcan_data_entry(1, 2), | ||
37 | }; | ||
38 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
39 | |||
40 | struct platform_device *__init imx_add_flexcan( | ||
41 | const struct imx_flexcan_data *data, | ||
42 | const struct flexcan_platform_data *pdata) | ||
43 | { | ||
44 | struct resource res[] = { | ||
45 | { | ||
46 | .start = data->iobase, | ||
47 | .end = data->iobase + data->iosize - 1, | ||
48 | .flags = IORESOURCE_MEM, | ||
49 | }, { | ||
50 | .start = data->irq, | ||
51 | .end = data->irq, | ||
52 | .flags = IORESOURCE_IRQ, | ||
53 | }, | ||
54 | }; | ||
55 | |||
56 | return imx_add_platform_device("flexcan", data->id, | ||
57 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
58 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c deleted file mode 100644 index 37e44398197..00000000000 --- a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/dma-mapping.h> | ||
10 | |||
11 | #include "../hardware.h" | ||
12 | #include "devices-common.h" | ||
13 | |||
14 | #define imx_fsl_usb2_udc_data_entry_single(soc) \ | ||
15 | { \ | ||
16 | .iobase = soc ## _USB_OTG_BASE_ADDR, \ | ||
17 | .irq = soc ## _INT_USB_OTG, \ | ||
18 | } | ||
19 | |||
20 | #ifdef CONFIG_SOC_IMX25 | ||
21 | const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst = | ||
22 | imx_fsl_usb2_udc_data_entry_single(MX25); | ||
23 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
24 | |||
25 | #ifdef CONFIG_SOC_IMX27 | ||
26 | const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst = | ||
27 | imx_fsl_usb2_udc_data_entry_single(MX27); | ||
28 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
29 | |||
30 | #ifdef CONFIG_SOC_IMX31 | ||
31 | const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst = | ||
32 | imx_fsl_usb2_udc_data_entry_single(MX31); | ||
33 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
34 | |||
35 | #ifdef CONFIG_SOC_IMX35 | ||
36 | const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst = | ||
37 | imx_fsl_usb2_udc_data_entry_single(MX35); | ||
38 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
39 | |||
40 | #ifdef CONFIG_SOC_IMX51 | ||
41 | const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst = | ||
42 | imx_fsl_usb2_udc_data_entry_single(MX51); | ||
43 | #endif | ||
44 | |||
45 | struct platform_device *__init imx_add_fsl_usb2_udc( | ||
46 | const struct imx_fsl_usb2_udc_data *data, | ||
47 | const struct fsl_usb2_platform_data *pdata) | ||
48 | { | ||
49 | struct resource res[] = { | ||
50 | { | ||
51 | .start = data->iobase, | ||
52 | .end = data->iobase + SZ_512 - 1, | ||
53 | .flags = IORESOURCE_MEM, | ||
54 | }, { | ||
55 | .start = data->irq, | ||
56 | .end = data->irq, | ||
57 | .flags = IORESOURCE_IRQ, | ||
58 | }, | ||
59 | }; | ||
60 | return imx_add_platform_device_dmamask("fsl-usb2-udc", -1, | ||
61 | res, ARRAY_SIZE(res), | ||
62 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
63 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-gpio-mxc.c b/arch/arm/mach-imx/devices/platform-gpio-mxc.c deleted file mode 100644 index 26483fa94b7..00000000000 --- a/arch/arm/mach-imx/devices/platform-gpio-mxc.c +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2011 Linaro Limited | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "devices-common.h" | ||
10 | |||
11 | struct platform_device *__init mxc_register_gpio(char *name, int id, | ||
12 | resource_size_t iobase, resource_size_t iosize, int irq, int irq_high) | ||
13 | { | ||
14 | struct resource res[] = { | ||
15 | { | ||
16 | .start = iobase, | ||
17 | .end = iobase + iosize - 1, | ||
18 | .flags = IORESOURCE_MEM, | ||
19 | }, { | ||
20 | .start = irq, | ||
21 | .end = irq, | ||
22 | .flags = IORESOURCE_IRQ, | ||
23 | }, { | ||
24 | .start = irq_high, | ||
25 | .end = irq_high, | ||
26 | .flags = IORESOURCE_IRQ, | ||
27 | }, | ||
28 | }; | ||
29 | |||
30 | return platform_device_register_resndata(&mxc_aips_bus, | ||
31 | name, id, res, ARRAY_SIZE(res), NULL, 0); | ||
32 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-gpio_keys.c b/arch/arm/mach-imx/devices/platform-gpio_keys.c deleted file mode 100644 index 486282539c7..00000000000 --- a/arch/arm/mach-imx/devices/platform-gpio_keys.c +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
16 | * Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | #include <asm/sizes.h> | ||
19 | |||
20 | #include "../hardware.h" | ||
21 | #include "devices-common.h" | ||
22 | |||
23 | struct platform_device *__init imx_add_gpio_keys( | ||
24 | const struct gpio_keys_platform_data *pdata) | ||
25 | { | ||
26 | return imx_add_platform_device("gpio-keys", -1, NULL, | ||
27 | 0, pdata, sizeof(*pdata)); | ||
28 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-imx-dma.c b/arch/arm/mach-imx/devices/platform-imx-dma.c deleted file mode 100644 index ccdb5dc4ddb..00000000000 --- a/arch/arm/mach-imx/devices/platform-imx-dma.c +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "devices-common.h" | ||
10 | |||
11 | struct platform_device __init __maybe_unused *imx_add_imx_dma(char *name, | ||
12 | resource_size_t iobase, int irq, int irq_err) | ||
13 | { | ||
14 | struct resource res[] = { | ||
15 | { | ||
16 | .start = iobase, | ||
17 | .end = iobase + SZ_4K - 1, | ||
18 | .flags = IORESOURCE_MEM, | ||
19 | }, { | ||
20 | .start = irq, | ||
21 | .end = irq, | ||
22 | .flags = IORESOURCE_IRQ, | ||
23 | }, { | ||
24 | .start = irq_err, | ||
25 | .end = irq_err, | ||
26 | .flags = IORESOURCE_IRQ, | ||
27 | }, | ||
28 | }; | ||
29 | |||
30 | return platform_device_register_resndata(&mxc_ahb_bus, | ||
31 | name, -1, res, ARRAY_SIZE(res), NULL, 0); | ||
32 | } | ||
33 | |||
34 | struct platform_device __init __maybe_unused *imx_add_imx_sdma(char *name, | ||
35 | resource_size_t iobase, int irq, struct sdma_platform_data *pdata) | ||
36 | { | ||
37 | struct resource res[] = { | ||
38 | { | ||
39 | .start = iobase, | ||
40 | .end = iobase + SZ_16K - 1, | ||
41 | .flags = IORESOURCE_MEM, | ||
42 | }, { | ||
43 | .start = irq, | ||
44 | .end = irq, | ||
45 | .flags = IORESOURCE_IRQ, | ||
46 | }, | ||
47 | }; | ||
48 | |||
49 | return platform_device_register_resndata(&mxc_ahb_bus, name, | ||
50 | -1, res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
51 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-imx-fb.c b/arch/arm/mach-imx/devices/platform-imx-fb.c deleted file mode 100644 index 10b0ed39f07..00000000000 --- a/arch/arm/mach-imx/devices/platform-imx-fb.c +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/dma-mapping.h> | ||
10 | |||
11 | #include "../hardware.h" | ||
12 | #include "devices-common.h" | ||
13 | |||
14 | #define imx_imx_fb_data_entry_single(soc, _devid, _size) \ | ||
15 | { \ | ||
16 | .devid = _devid, \ | ||
17 | .iobase = soc ## _LCDC_BASE_ADDR, \ | ||
18 | .iosize = _size, \ | ||
19 | .irq = soc ## _INT_LCDC, \ | ||
20 | } | ||
21 | |||
22 | #ifdef CONFIG_SOC_IMX1 | ||
23 | const struct imx_imx_fb_data imx1_imx_fb_data __initconst = | ||
24 | imx_imx_fb_data_entry_single(MX1, "imx1-fb", SZ_4K); | ||
25 | #endif /* ifdef CONFIG_SOC_IMX1 */ | ||
26 | |||
27 | #ifdef CONFIG_SOC_IMX21 | ||
28 | const struct imx_imx_fb_data imx21_imx_fb_data __initconst = | ||
29 | imx_imx_fb_data_entry_single(MX21, "imx21-fb", SZ_4K); | ||
30 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
31 | |||
32 | #ifdef CONFIG_SOC_IMX25 | ||
33 | const struct imx_imx_fb_data imx25_imx_fb_data __initconst = | ||
34 | imx_imx_fb_data_entry_single(MX25, "imx21-fb", SZ_16K); | ||
35 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
36 | |||
37 | #ifdef CONFIG_SOC_IMX27 | ||
38 | const struct imx_imx_fb_data imx27_imx_fb_data __initconst = | ||
39 | imx_imx_fb_data_entry_single(MX27, "imx21-fb", SZ_4K); | ||
40 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
41 | |||
42 | struct platform_device *__init imx_add_imx_fb( | ||
43 | const struct imx_imx_fb_data *data, | ||
44 | const struct imx_fb_platform_data *pdata) | ||
45 | { | ||
46 | struct resource res[] = { | ||
47 | { | ||
48 | .start = data->iobase, | ||
49 | .end = data->iobase + data->iosize - 1, | ||
50 | .flags = IORESOURCE_MEM, | ||
51 | }, { | ||
52 | .start = data->irq, | ||
53 | .end = data->irq, | ||
54 | .flags = IORESOURCE_IRQ, | ||
55 | }, | ||
56 | }; | ||
57 | return imx_add_platform_device_dmamask("imx-fb", 0, | ||
58 | res, ARRAY_SIZE(res), | ||
59 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
60 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-imx-i2c.c b/arch/arm/mach-imx/devices/platform-imx-i2c.c deleted file mode 100644 index 8e30e5703cd..00000000000 --- a/arch/arm/mach-imx/devices/platform-imx-i2c.c +++ /dev/null | |||
@@ -1,128 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_imx_i2c_data_entry_single(soc, _devid, _id, _hwid, _size) \ | ||
13 | { \ | ||
14 | .devid = _devid, \ | ||
15 | .id = _id, \ | ||
16 | .iobase = soc ## _I2C ## _hwid ## _BASE_ADDR, \ | ||
17 | .iosize = _size, \ | ||
18 | .irq = soc ## _INT_I2C ## _hwid, \ | ||
19 | } | ||
20 | |||
21 | #define imx_imx_i2c_data_entry(soc, _devid, _id, _hwid, _size) \ | ||
22 | [_id] = imx_imx_i2c_data_entry_single(soc, _devid, _id, _hwid, _size) | ||
23 | |||
24 | #ifdef CONFIG_SOC_IMX1 | ||
25 | const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst = | ||
26 | imx_imx_i2c_data_entry_single(MX1, "imx1-i2c", 0, , SZ_4K); | ||
27 | #endif /* ifdef CONFIG_SOC_IMX1 */ | ||
28 | |||
29 | #ifdef CONFIG_SOC_IMX21 | ||
30 | const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst = | ||
31 | imx_imx_i2c_data_entry_single(MX21, "imx21-i2c", 0, , SZ_4K); | ||
32 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
33 | |||
34 | #ifdef CONFIG_SOC_IMX25 | ||
35 | const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = { | ||
36 | #define imx25_imx_i2c_data_entry(_id, _hwid) \ | ||
37 | imx_imx_i2c_data_entry(MX25, "imx21-i2c", _id, _hwid, SZ_16K) | ||
38 | imx25_imx_i2c_data_entry(0, 1), | ||
39 | imx25_imx_i2c_data_entry(1, 2), | ||
40 | imx25_imx_i2c_data_entry(2, 3), | ||
41 | }; | ||
42 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
43 | |||
44 | #ifdef CONFIG_SOC_IMX27 | ||
45 | const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = { | ||
46 | #define imx27_imx_i2c_data_entry(_id, _hwid) \ | ||
47 | imx_imx_i2c_data_entry(MX27, "imx21-i2c", _id, _hwid, SZ_4K) | ||
48 | imx27_imx_i2c_data_entry(0, 1), | ||
49 | imx27_imx_i2c_data_entry(1, 2), | ||
50 | }; | ||
51 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
52 | |||
53 | #ifdef CONFIG_SOC_IMX31 | ||
54 | const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = { | ||
55 | #define imx31_imx_i2c_data_entry(_id, _hwid) \ | ||
56 | imx_imx_i2c_data_entry(MX31, "imx21-i2c", _id, _hwid, SZ_4K) | ||
57 | imx31_imx_i2c_data_entry(0, 1), | ||
58 | imx31_imx_i2c_data_entry(1, 2), | ||
59 | imx31_imx_i2c_data_entry(2, 3), | ||
60 | }; | ||
61 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
62 | |||
63 | #ifdef CONFIG_SOC_IMX35 | ||
64 | const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = { | ||
65 | #define imx35_imx_i2c_data_entry(_id, _hwid) \ | ||
66 | imx_imx_i2c_data_entry(MX35, "imx21-i2c", _id, _hwid, SZ_4K) | ||
67 | imx35_imx_i2c_data_entry(0, 1), | ||
68 | imx35_imx_i2c_data_entry(1, 2), | ||
69 | imx35_imx_i2c_data_entry(2, 3), | ||
70 | }; | ||
71 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
72 | |||
73 | #ifdef CONFIG_SOC_IMX50 | ||
74 | const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = { | ||
75 | #define imx50_imx_i2c_data_entry(_id, _hwid) \ | ||
76 | imx_imx_i2c_data_entry(MX50, "imx21-i2c", _id, _hwid, SZ_4K) | ||
77 | imx50_imx_i2c_data_entry(0, 1), | ||
78 | imx50_imx_i2c_data_entry(1, 2), | ||
79 | imx50_imx_i2c_data_entry(2, 3), | ||
80 | }; | ||
81 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
82 | |||
83 | #ifdef CONFIG_SOC_IMX51 | ||
84 | const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = { | ||
85 | #define imx51_imx_i2c_data_entry(_id, _hwid) \ | ||
86 | imx_imx_i2c_data_entry(MX51, "imx21-i2c", _id, _hwid, SZ_4K) | ||
87 | imx51_imx_i2c_data_entry(0, 1), | ||
88 | imx51_imx_i2c_data_entry(1, 2), | ||
89 | { | ||
90 | .devid = "imx21-i2c", | ||
91 | .id = 2, | ||
92 | .iobase = MX51_HSI2C_DMA_BASE_ADDR, | ||
93 | .iosize = SZ_16K, | ||
94 | .irq = MX51_INT_HS_I2C, | ||
95 | }, | ||
96 | }; | ||
97 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
98 | |||
99 | #ifdef CONFIG_SOC_IMX53 | ||
100 | const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = { | ||
101 | #define imx53_imx_i2c_data_entry(_id, _hwid) \ | ||
102 | imx_imx_i2c_data_entry(MX53, "imx21-i2c", _id, _hwid, SZ_4K) | ||
103 | imx53_imx_i2c_data_entry(0, 1), | ||
104 | imx53_imx_i2c_data_entry(1, 2), | ||
105 | imx53_imx_i2c_data_entry(2, 3), | ||
106 | }; | ||
107 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
108 | |||
109 | struct platform_device *__init imx_add_imx_i2c( | ||
110 | const struct imx_imx_i2c_data *data, | ||
111 | const struct imxi2c_platform_data *pdata) | ||
112 | { | ||
113 | struct resource res[] = { | ||
114 | { | ||
115 | .start = data->iobase, | ||
116 | .end = data->iobase + data->iosize - 1, | ||
117 | .flags = IORESOURCE_MEM, | ||
118 | }, { | ||
119 | .start = data->irq, | ||
120 | .end = data->irq, | ||
121 | .flags = IORESOURCE_IRQ, | ||
122 | }, | ||
123 | }; | ||
124 | |||
125 | return imx_add_platform_device(data->devid, data->id, | ||
126 | res, ARRAY_SIZE(res), | ||
127 | pdata, sizeof(*pdata)); | ||
128 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-imx-keypad.c b/arch/arm/mach-imx/devices/platform-imx-keypad.c deleted file mode 100644 index 8f22a4c98a4..00000000000 --- a/arch/arm/mach-imx/devices/platform-imx-keypad.c +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_imx_keypad_data_entry_single(soc, _size) \ | ||
13 | { \ | ||
14 | .iobase = soc ## _KPP_BASE_ADDR, \ | ||
15 | .iosize = _size, \ | ||
16 | .irq = soc ## _INT_KPP, \ | ||
17 | } | ||
18 | |||
19 | #ifdef CONFIG_SOC_IMX21 | ||
20 | const struct imx_imx_keypad_data imx21_imx_keypad_data __initconst = | ||
21 | imx_imx_keypad_data_entry_single(MX21, SZ_16); | ||
22 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
23 | |||
24 | #ifdef CONFIG_SOC_IMX25 | ||
25 | const struct imx_imx_keypad_data imx25_imx_keypad_data __initconst = | ||
26 | imx_imx_keypad_data_entry_single(MX25, SZ_16K); | ||
27 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
28 | |||
29 | #ifdef CONFIG_SOC_IMX27 | ||
30 | const struct imx_imx_keypad_data imx27_imx_keypad_data __initconst = | ||
31 | imx_imx_keypad_data_entry_single(MX27, SZ_16); | ||
32 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
33 | |||
34 | #ifdef CONFIG_SOC_IMX31 | ||
35 | const struct imx_imx_keypad_data imx31_imx_keypad_data __initconst = | ||
36 | imx_imx_keypad_data_entry_single(MX31, SZ_16); | ||
37 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
38 | |||
39 | #ifdef CONFIG_SOC_IMX35 | ||
40 | const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst = | ||
41 | imx_imx_keypad_data_entry_single(MX35, SZ_16); | ||
42 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
43 | |||
44 | #ifdef CONFIG_SOC_IMX51 | ||
45 | const struct imx_imx_keypad_data imx51_imx_keypad_data __initconst = | ||
46 | imx_imx_keypad_data_entry_single(MX51, SZ_16); | ||
47 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
48 | |||
49 | #ifdef CONFIG_SOC_IMX53 | ||
50 | const struct imx_imx_keypad_data imx53_imx_keypad_data __initconst = | ||
51 | imx_imx_keypad_data_entry_single(MX53, SZ_16); | ||
52 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
53 | |||
54 | struct platform_device *__init imx_add_imx_keypad( | ||
55 | const struct imx_imx_keypad_data *data, | ||
56 | const struct matrix_keymap_data *pdata) | ||
57 | { | ||
58 | struct resource res[] = { | ||
59 | { | ||
60 | .start = data->iobase, | ||
61 | .end = data->iobase + data->iosize - 1, | ||
62 | .flags = IORESOURCE_MEM, | ||
63 | }, { | ||
64 | .start = data->irq, | ||
65 | .end = data->irq, | ||
66 | .flags = IORESOURCE_IRQ, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | return imx_add_platform_device("imx-keypad", -1, | ||
71 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
72 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-imx-ssi.c b/arch/arm/mach-imx/devices/platform-imx-ssi.c deleted file mode 100644 index bfcb8f3dfa8..00000000000 --- a/arch/arm/mach-imx/devices/platform-imx-ssi.c +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_imx_ssi_data_entry(soc, _id, _hwid, _size) \ | ||
13 | [_id] = { \ | ||
14 | .id = _id, \ | ||
15 | .iobase = soc ## _SSI ## _hwid ## _BASE_ADDR, \ | ||
16 | .iosize = _size, \ | ||
17 | .irq = soc ## _INT_SSI ## _hwid, \ | ||
18 | .dmatx0 = soc ## _DMA_REQ_SSI ## _hwid ## _TX0, \ | ||
19 | .dmarx0 = soc ## _DMA_REQ_SSI ## _hwid ## _RX0, \ | ||
20 | .dmatx1 = soc ## _DMA_REQ_SSI ## _hwid ## _TX1, \ | ||
21 | .dmarx1 = soc ## _DMA_REQ_SSI ## _hwid ## _RX1, \ | ||
22 | } | ||
23 | |||
24 | #ifdef CONFIG_SOC_IMX21 | ||
25 | const struct imx_imx_ssi_data imx21_imx_ssi_data[] __initconst = { | ||
26 | #define imx21_imx_ssi_data_entry(_id, _hwid) \ | ||
27 | imx_imx_ssi_data_entry(MX21, _id, _hwid, SZ_4K) | ||
28 | imx21_imx_ssi_data_entry(0, 1), | ||
29 | imx21_imx_ssi_data_entry(1, 2), | ||
30 | }; | ||
31 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
32 | |||
33 | #ifdef CONFIG_SOC_IMX25 | ||
34 | const struct imx_imx_ssi_data imx25_imx_ssi_data[] __initconst = { | ||
35 | #define imx25_imx_ssi_data_entry(_id, _hwid) \ | ||
36 | imx_imx_ssi_data_entry(MX25, _id, _hwid, SZ_4K) | ||
37 | imx25_imx_ssi_data_entry(0, 1), | ||
38 | imx25_imx_ssi_data_entry(1, 2), | ||
39 | }; | ||
40 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
41 | |||
42 | #ifdef CONFIG_SOC_IMX27 | ||
43 | const struct imx_imx_ssi_data imx27_imx_ssi_data[] __initconst = { | ||
44 | #define imx27_imx_ssi_data_entry(_id, _hwid) \ | ||
45 | imx_imx_ssi_data_entry(MX27, _id, _hwid, SZ_4K) | ||
46 | imx27_imx_ssi_data_entry(0, 1), | ||
47 | imx27_imx_ssi_data_entry(1, 2), | ||
48 | }; | ||
49 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
50 | |||
51 | #ifdef CONFIG_SOC_IMX31 | ||
52 | const struct imx_imx_ssi_data imx31_imx_ssi_data[] __initconst = { | ||
53 | #define imx31_imx_ssi_data_entry(_id, _hwid) \ | ||
54 | imx_imx_ssi_data_entry(MX31, _id, _hwid, SZ_4K) | ||
55 | imx31_imx_ssi_data_entry(0, 1), | ||
56 | imx31_imx_ssi_data_entry(1, 2), | ||
57 | }; | ||
58 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
59 | |||
60 | #ifdef CONFIG_SOC_IMX35 | ||
61 | const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst = { | ||
62 | #define imx35_imx_ssi_data_entry(_id, _hwid) \ | ||
63 | imx_imx_ssi_data_entry(MX35, _id, _hwid, SZ_4K) | ||
64 | imx35_imx_ssi_data_entry(0, 1), | ||
65 | imx35_imx_ssi_data_entry(1, 2), | ||
66 | }; | ||
67 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
68 | |||
69 | #ifdef CONFIG_SOC_IMX51 | ||
70 | const struct imx_imx_ssi_data imx51_imx_ssi_data[] __initconst = { | ||
71 | #define imx51_imx_ssi_data_entry(_id, _hwid) \ | ||
72 | imx_imx_ssi_data_entry(MX51, _id, _hwid, SZ_16K) | ||
73 | imx51_imx_ssi_data_entry(0, 1), | ||
74 | imx51_imx_ssi_data_entry(1, 2), | ||
75 | imx51_imx_ssi_data_entry(2, 3), | ||
76 | }; | ||
77 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
78 | |||
79 | #ifdef CONFIG_SOC_IMX53 | ||
80 | const struct imx_imx_ssi_data imx53_imx_ssi_data[] __initconst = { | ||
81 | #define imx53_imx_ssi_data_entry(_id, _hwid) \ | ||
82 | imx_imx_ssi_data_entry(MX53, _id, _hwid, SZ_16K) | ||
83 | imx53_imx_ssi_data_entry(0, 1), | ||
84 | imx53_imx_ssi_data_entry(1, 2), | ||
85 | imx53_imx_ssi_data_entry(2, 3), | ||
86 | }; | ||
87 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
88 | |||
89 | struct platform_device *__init imx_add_imx_ssi( | ||
90 | const struct imx_imx_ssi_data *data, | ||
91 | const struct imx_ssi_platform_data *pdata) | ||
92 | { | ||
93 | struct resource res[] = { | ||
94 | { | ||
95 | .start = data->iobase, | ||
96 | .end = data->iobase + data->iosize - 1, | ||
97 | .flags = IORESOURCE_MEM, | ||
98 | }, { | ||
99 | .start = data->irq, | ||
100 | .end = data->irq, | ||
101 | .flags = IORESOURCE_IRQ, | ||
102 | }, | ||
103 | #define DMARES(_name) { \ | ||
104 | .name = #_name, \ | ||
105 | .start = data->dma ## _name, \ | ||
106 | .end = data->dma ## _name, \ | ||
107 | .flags = IORESOURCE_DMA, \ | ||
108 | } | ||
109 | DMARES(tx0), | ||
110 | DMARES(rx0), | ||
111 | DMARES(tx1), | ||
112 | DMARES(rx1), | ||
113 | }; | ||
114 | |||
115 | return imx_add_platform_device("imx-ssi", data->id, | ||
116 | res, ARRAY_SIZE(res), | ||
117 | pdata, sizeof(*pdata)); | ||
118 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-imx-uart.c b/arch/arm/mach-imx/devices/platform-imx-uart.c deleted file mode 100644 index 67bf866a2cb..00000000000 --- a/arch/arm/mach-imx/devices/platform-imx-uart.c +++ /dev/null | |||
@@ -1,178 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_imx_uart_3irq_data_entry(soc, _id, _hwid, _size) \ | ||
13 | [_id] = { \ | ||
14 | .id = _id, \ | ||
15 | .iobase = soc ## _UART ## _hwid ## _BASE_ADDR, \ | ||
16 | .iosize = _size, \ | ||
17 | .irqrx = soc ## _INT_UART ## _hwid ## RX, \ | ||
18 | .irqtx = soc ## _INT_UART ## _hwid ## TX, \ | ||
19 | .irqrts = soc ## _INT_UART ## _hwid ## RTS, \ | ||
20 | } | ||
21 | |||
22 | #define imx_imx_uart_1irq_data_entry(soc, _id, _hwid, _size) \ | ||
23 | [_id] = { \ | ||
24 | .id = _id, \ | ||
25 | .iobase = soc ## _UART ## _hwid ## _BASE_ADDR, \ | ||
26 | .iosize = _size, \ | ||
27 | .irq = soc ## _INT_UART ## _hwid, \ | ||
28 | } | ||
29 | |||
30 | #ifdef CONFIG_SOC_IMX1 | ||
31 | const struct imx_imx_uart_3irq_data imx1_imx_uart_data[] __initconst = { | ||
32 | #define imx1_imx_uart_data_entry(_id, _hwid) \ | ||
33 | imx_imx_uart_3irq_data_entry(MX1, _id, _hwid, 0xd0) | ||
34 | imx1_imx_uart_data_entry(0, 1), | ||
35 | imx1_imx_uart_data_entry(1, 2), | ||
36 | }; | ||
37 | #endif /* ifdef CONFIG_SOC_IMX1 */ | ||
38 | |||
39 | #ifdef CONFIG_SOC_IMX21 | ||
40 | const struct imx_imx_uart_1irq_data imx21_imx_uart_data[] __initconst = { | ||
41 | #define imx21_imx_uart_data_entry(_id, _hwid) \ | ||
42 | imx_imx_uart_1irq_data_entry(MX21, _id, _hwid, SZ_4K) | ||
43 | imx21_imx_uart_data_entry(0, 1), | ||
44 | imx21_imx_uart_data_entry(1, 2), | ||
45 | imx21_imx_uart_data_entry(2, 3), | ||
46 | imx21_imx_uart_data_entry(3, 4), | ||
47 | }; | ||
48 | #endif | ||
49 | |||
50 | #ifdef CONFIG_SOC_IMX25 | ||
51 | const struct imx_imx_uart_1irq_data imx25_imx_uart_data[] __initconst = { | ||
52 | #define imx25_imx_uart_data_entry(_id, _hwid) \ | ||
53 | imx_imx_uart_1irq_data_entry(MX25, _id, _hwid, SZ_16K) | ||
54 | imx25_imx_uart_data_entry(0, 1), | ||
55 | imx25_imx_uart_data_entry(1, 2), | ||
56 | imx25_imx_uart_data_entry(2, 3), | ||
57 | imx25_imx_uart_data_entry(3, 4), | ||
58 | imx25_imx_uart_data_entry(4, 5), | ||
59 | }; | ||
60 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
61 | |||
62 | #ifdef CONFIG_SOC_IMX27 | ||
63 | const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst = { | ||
64 | #define imx27_imx_uart_data_entry(_id, _hwid) \ | ||
65 | imx_imx_uart_1irq_data_entry(MX27, _id, _hwid, SZ_4K) | ||
66 | imx27_imx_uart_data_entry(0, 1), | ||
67 | imx27_imx_uart_data_entry(1, 2), | ||
68 | imx27_imx_uart_data_entry(2, 3), | ||
69 | imx27_imx_uart_data_entry(3, 4), | ||
70 | imx27_imx_uart_data_entry(4, 5), | ||
71 | imx27_imx_uart_data_entry(5, 6), | ||
72 | }; | ||
73 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
74 | |||
75 | #ifdef CONFIG_SOC_IMX31 | ||
76 | const struct imx_imx_uart_1irq_data imx31_imx_uart_data[] __initconst = { | ||
77 | #define imx31_imx_uart_data_entry(_id, _hwid) \ | ||
78 | imx_imx_uart_1irq_data_entry(MX31, _id, _hwid, SZ_4K) | ||
79 | imx31_imx_uart_data_entry(0, 1), | ||
80 | imx31_imx_uart_data_entry(1, 2), | ||
81 | imx31_imx_uart_data_entry(2, 3), | ||
82 | imx31_imx_uart_data_entry(3, 4), | ||
83 | imx31_imx_uart_data_entry(4, 5), | ||
84 | }; | ||
85 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
86 | |||
87 | #ifdef CONFIG_SOC_IMX35 | ||
88 | const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst = { | ||
89 | #define imx35_imx_uart_data_entry(_id, _hwid) \ | ||
90 | imx_imx_uart_1irq_data_entry(MX35, _id, _hwid, SZ_16K) | ||
91 | imx35_imx_uart_data_entry(0, 1), | ||
92 | imx35_imx_uart_data_entry(1, 2), | ||
93 | imx35_imx_uart_data_entry(2, 3), | ||
94 | }; | ||
95 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
96 | |||
97 | #ifdef CONFIG_SOC_IMX50 | ||
98 | const struct imx_imx_uart_1irq_data imx50_imx_uart_data[] __initconst = { | ||
99 | #define imx50_imx_uart_data_entry(_id, _hwid) \ | ||
100 | imx_imx_uart_1irq_data_entry(MX50, _id, _hwid, SZ_4K) | ||
101 | imx50_imx_uart_data_entry(0, 1), | ||
102 | imx50_imx_uart_data_entry(1, 2), | ||
103 | imx50_imx_uart_data_entry(2, 3), | ||
104 | imx50_imx_uart_data_entry(3, 4), | ||
105 | imx50_imx_uart_data_entry(4, 5), | ||
106 | }; | ||
107 | #endif /* ifdef CONFIG_SOC_IMX50 */ | ||
108 | |||
109 | #ifdef CONFIG_SOC_IMX51 | ||
110 | const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = { | ||
111 | #define imx51_imx_uart_data_entry(_id, _hwid) \ | ||
112 | imx_imx_uart_1irq_data_entry(MX51, _id, _hwid, SZ_4K) | ||
113 | imx51_imx_uart_data_entry(0, 1), | ||
114 | imx51_imx_uart_data_entry(1, 2), | ||
115 | imx51_imx_uart_data_entry(2, 3), | ||
116 | }; | ||
117 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
118 | |||
119 | #ifdef CONFIG_SOC_IMX53 | ||
120 | const struct imx_imx_uart_1irq_data imx53_imx_uart_data[] __initconst = { | ||
121 | #define imx53_imx_uart_data_entry(_id, _hwid) \ | ||
122 | imx_imx_uart_1irq_data_entry(MX53, _id, _hwid, SZ_4K) | ||
123 | imx53_imx_uart_data_entry(0, 1), | ||
124 | imx53_imx_uart_data_entry(1, 2), | ||
125 | imx53_imx_uart_data_entry(2, 3), | ||
126 | imx53_imx_uart_data_entry(3, 4), | ||
127 | imx53_imx_uart_data_entry(4, 5), | ||
128 | }; | ||
129 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
130 | |||
131 | struct platform_device *__init imx_add_imx_uart_3irq( | ||
132 | const struct imx_imx_uart_3irq_data *data, | ||
133 | const struct imxuart_platform_data *pdata) | ||
134 | { | ||
135 | struct resource res[] = { | ||
136 | { | ||
137 | .start = data->iobase, | ||
138 | .end = data->iobase + data->iosize - 1, | ||
139 | .flags = IORESOURCE_MEM, | ||
140 | }, { | ||
141 | .start = data->irqrx, | ||
142 | .end = data->irqrx, | ||
143 | .flags = IORESOURCE_IRQ, | ||
144 | }, { | ||
145 | .start = data->irqtx, | ||
146 | .end = data->irqtx, | ||
147 | .flags = IORESOURCE_IRQ, | ||
148 | }, { | ||
149 | .start = data->irqrts, | ||
150 | .end = data->irqrx, | ||
151 | .flags = IORESOURCE_IRQ, | ||
152 | }, | ||
153 | }; | ||
154 | |||
155 | return imx_add_platform_device("imx1-uart", data->id, res, | ||
156 | ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
157 | } | ||
158 | |||
159 | struct platform_device *__init imx_add_imx_uart_1irq( | ||
160 | const struct imx_imx_uart_1irq_data *data, | ||
161 | const struct imxuart_platform_data *pdata) | ||
162 | { | ||
163 | struct resource res[] = { | ||
164 | { | ||
165 | .start = data->iobase, | ||
166 | .end = data->iobase + data->iosize - 1, | ||
167 | .flags = IORESOURCE_MEM, | ||
168 | }, { | ||
169 | .start = data->irq, | ||
170 | .end = data->irq, | ||
171 | .flags = IORESOURCE_IRQ, | ||
172 | }, | ||
173 | }; | ||
174 | |||
175 | /* i.mx21 type uart runs on all i.mx except i.mx1 */ | ||
176 | return imx_add_platform_device("imx21-uart", data->id, | ||
177 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
178 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-imx2-wdt.c b/arch/arm/mach-imx/devices/platform-imx2-wdt.c deleted file mode 100644 index ec75d641368..00000000000 --- a/arch/arm/mach-imx/devices/platform-imx2-wdt.c +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <asm/sizes.h> | ||
10 | |||
11 | #include "../hardware.h" | ||
12 | #include "devices-common.h" | ||
13 | |||
14 | #define imx_imx2_wdt_data_entry_single(soc, _id, _hwid, _size) \ | ||
15 | { \ | ||
16 | .id = _id, \ | ||
17 | .iobase = soc ## _WDOG ## _hwid ## _BASE_ADDR, \ | ||
18 | .iosize = _size, \ | ||
19 | } | ||
20 | #define imx_imx2_wdt_data_entry(soc, _id, _hwid, _size) \ | ||
21 | [_id] = imx_imx2_wdt_data_entry_single(soc, _id, _hwid, _size) | ||
22 | |||
23 | #ifdef CONFIG_SOC_IMX21 | ||
24 | const struct imx_imx2_wdt_data imx21_imx2_wdt_data __initconst = | ||
25 | imx_imx2_wdt_data_entry_single(MX21, 0, , SZ_4K); | ||
26 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
27 | |||
28 | #ifdef CONFIG_SOC_IMX25 | ||
29 | const struct imx_imx2_wdt_data imx25_imx2_wdt_data __initconst = | ||
30 | imx_imx2_wdt_data_entry_single(MX25, 0, , SZ_16K); | ||
31 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
32 | |||
33 | #ifdef CONFIG_SOC_IMX27 | ||
34 | const struct imx_imx2_wdt_data imx27_imx2_wdt_data __initconst = | ||
35 | imx_imx2_wdt_data_entry_single(MX27, 0, , SZ_4K); | ||
36 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
37 | |||
38 | #ifdef CONFIG_SOC_IMX31 | ||
39 | const struct imx_imx2_wdt_data imx31_imx2_wdt_data __initconst = | ||
40 | imx_imx2_wdt_data_entry_single(MX31, 0, , SZ_16K); | ||
41 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
42 | |||
43 | #ifdef CONFIG_SOC_IMX35 | ||
44 | const struct imx_imx2_wdt_data imx35_imx2_wdt_data __initconst = | ||
45 | imx_imx2_wdt_data_entry_single(MX35, 0, , SZ_16K); | ||
46 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
47 | |||
48 | #ifdef CONFIG_SOC_IMX51 | ||
49 | const struct imx_imx2_wdt_data imx51_imx2_wdt_data[] __initconst = { | ||
50 | #define imx51_imx2_wdt_data_entry(_id, _hwid) \ | ||
51 | imx_imx2_wdt_data_entry(MX51, _id, _hwid, SZ_16K) | ||
52 | imx51_imx2_wdt_data_entry(0, 1), | ||
53 | imx51_imx2_wdt_data_entry(1, 2), | ||
54 | }; | ||
55 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
56 | |||
57 | #ifdef CONFIG_SOC_IMX53 | ||
58 | const struct imx_imx2_wdt_data imx53_imx2_wdt_data[] __initconst = { | ||
59 | #define imx53_imx2_wdt_data_entry(_id, _hwid) \ | ||
60 | imx_imx2_wdt_data_entry(MX53, _id, _hwid, SZ_16K) | ||
61 | imx53_imx2_wdt_data_entry(0, 1), | ||
62 | imx53_imx2_wdt_data_entry(1, 2), | ||
63 | }; | ||
64 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
65 | |||
66 | struct platform_device *__init imx_add_imx2_wdt( | ||
67 | const struct imx_imx2_wdt_data *data) | ||
68 | { | ||
69 | struct resource res[] = { | ||
70 | { | ||
71 | .start = data->iobase, | ||
72 | .end = data->iobase + data->iosize - 1, | ||
73 | .flags = IORESOURCE_MEM, | ||
74 | }, | ||
75 | }; | ||
76 | return imx_add_platform_device("imx2-wdt", data->id, | ||
77 | res, ARRAY_SIZE(res), NULL, 0); | ||
78 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-imx21-hcd.c b/arch/arm/mach-imx/devices/platform-imx21-hcd.c deleted file mode 100644 index 30c81616a9a..00000000000 --- a/arch/arm/mach-imx/devices/platform-imx21-hcd.c +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_imx21_hcd_data_entry_single(soc) \ | ||
13 | { \ | ||
14 | .iobase = soc ## _USBOTG_BASE_ADDR, \ | ||
15 | .irq = soc ## _INT_USBHOST, \ | ||
16 | } | ||
17 | |||
18 | #ifdef CONFIG_SOC_IMX21 | ||
19 | const struct imx_imx21_hcd_data imx21_imx21_hcd_data __initconst = | ||
20 | imx_imx21_hcd_data_entry_single(MX21); | ||
21 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
22 | |||
23 | struct platform_device *__init imx_add_imx21_hcd( | ||
24 | const struct imx_imx21_hcd_data *data, | ||
25 | const struct mx21_usbh_platform_data *pdata) | ||
26 | { | ||
27 | struct resource res[] = { | ||
28 | { | ||
29 | .start = data->iobase, | ||
30 | .end = data->iobase + SZ_8K - 1, | ||
31 | .flags = IORESOURCE_MEM, | ||
32 | }, { | ||
33 | .start = data->irq, | ||
34 | .end = data->irq, | ||
35 | .flags = IORESOURCE_IRQ, | ||
36 | }, | ||
37 | }; | ||
38 | return imx_add_platform_device_dmamask("imx21-hcd", 0, | ||
39 | res, ARRAY_SIZE(res), | ||
40 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
41 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-imx27-coda.c b/arch/arm/mach-imx/devices/platform-imx27-coda.c deleted file mode 100644 index 25bebc29e54..00000000000 --- a/arch/arm/mach-imx/devices/platform-imx27-coda.c +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Vista Silicon | ||
3 | * Javier Martin <javier.martin@vista-silicon.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | #include "../hardware.h" | ||
11 | #include "devices-common.h" | ||
12 | |||
13 | #ifdef CONFIG_SOC_IMX27 | ||
14 | const struct imx_imx27_coda_data imx27_coda_data __initconst = { | ||
15 | .iobase = MX27_VPU_BASE_ADDR, | ||
16 | .iosize = SZ_512, | ||
17 | .irq = MX27_INT_VPU, | ||
18 | }; | ||
19 | #endif | ||
20 | |||
21 | struct platform_device *__init imx_add_imx27_coda( | ||
22 | const struct imx_imx27_coda_data *data) | ||
23 | { | ||
24 | struct resource res[] = { | ||
25 | { | ||
26 | .start = data->iobase, | ||
27 | .end = data->iobase + data->iosize - 1, | ||
28 | .flags = IORESOURCE_MEM, | ||
29 | }, { | ||
30 | .start = data->irq, | ||
31 | .end = data->irq, | ||
32 | .flags = IORESOURCE_IRQ, | ||
33 | }, | ||
34 | }; | ||
35 | return imx_add_platform_device_dmamask("coda-imx27", 0, res, 2, NULL, | ||
36 | 0, DMA_BIT_MASK(32)); | ||
37 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-imx_udc.c b/arch/arm/mach-imx/devices/platform-imx_udc.c deleted file mode 100644 index 5ced7e4e2c7..00000000000 --- a/arch/arm/mach-imx/devices/platform-imx_udc.c +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_imx_udc_data_entry_single(soc, _size) \ | ||
13 | { \ | ||
14 | .iobase = soc ## _USBD_BASE_ADDR, \ | ||
15 | .iosize = _size, \ | ||
16 | .irq0 = soc ## _INT_USBD0, \ | ||
17 | .irq1 = soc ## _INT_USBD1, \ | ||
18 | .irq2 = soc ## _INT_USBD2, \ | ||
19 | .irq3 = soc ## _INT_USBD3, \ | ||
20 | .irq4 = soc ## _INT_USBD4, \ | ||
21 | .irq5 = soc ## _INT_USBD5, \ | ||
22 | .irq6 = soc ## _INT_USBD6, \ | ||
23 | } | ||
24 | |||
25 | #define imx_imx_udc_data_entry(soc, _size) \ | ||
26 | [_id] = imx_imx_udc_data_entry_single(soc, _size) | ||
27 | |||
28 | #ifdef CONFIG_SOC_IMX1 | ||
29 | const struct imx_imx_udc_data imx1_imx_udc_data __initconst = | ||
30 | imx_imx_udc_data_entry_single(MX1, SZ_4K); | ||
31 | #endif /* ifdef CONFIG_SOC_IMX1 */ | ||
32 | |||
33 | struct platform_device *__init imx_add_imx_udc( | ||
34 | const struct imx_imx_udc_data *data, | ||
35 | const struct imxusb_platform_data *pdata) | ||
36 | { | ||
37 | struct resource res[] = { | ||
38 | { | ||
39 | .start = data->iobase, | ||
40 | .end = data->iobase + data->iosize - 1, | ||
41 | .flags = IORESOURCE_MEM, | ||
42 | }, { | ||
43 | .start = data->irq0, | ||
44 | .end = data->irq0, | ||
45 | .flags = IORESOURCE_IRQ, | ||
46 | }, { | ||
47 | .start = data->irq1, | ||
48 | .end = data->irq1, | ||
49 | .flags = IORESOURCE_IRQ, | ||
50 | }, { | ||
51 | .start = data->irq2, | ||
52 | .end = data->irq2, | ||
53 | .flags = IORESOURCE_IRQ, | ||
54 | }, { | ||
55 | .start = data->irq3, | ||
56 | .end = data->irq3, | ||
57 | .flags = IORESOURCE_IRQ, | ||
58 | }, { | ||
59 | .start = data->irq4, | ||
60 | .end = data->irq4, | ||
61 | .flags = IORESOURCE_IRQ, | ||
62 | }, { | ||
63 | .start = data->irq5, | ||
64 | .end = data->irq5, | ||
65 | .flags = IORESOURCE_IRQ, | ||
66 | }, { | ||
67 | .start = data->irq6, | ||
68 | .end = data->irq6, | ||
69 | .flags = IORESOURCE_IRQ, | ||
70 | }, | ||
71 | }; | ||
72 | |||
73 | return imx_add_platform_device("imx_udc", 0, | ||
74 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
75 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-imxdi_rtc.c b/arch/arm/mach-imx/devices/platform-imxdi_rtc.c deleted file mode 100644 index 5bb490d556e..00000000000 --- a/arch/arm/mach-imx/devices/platform-imxdi_rtc.c +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <asm/sizes.h> | ||
10 | |||
11 | #include "../hardware.h" | ||
12 | #include "devices-common.h" | ||
13 | |||
14 | #define imx_imxdi_rtc_data_entry_single(soc) \ | ||
15 | { \ | ||
16 | .iobase = soc ## _DRYICE_BASE_ADDR, \ | ||
17 | .irq = soc ## _INT_DRYICE, \ | ||
18 | } | ||
19 | |||
20 | #ifdef CONFIG_SOC_IMX25 | ||
21 | const struct imx_imxdi_rtc_data imx25_imxdi_rtc_data __initconst = | ||
22 | imx_imxdi_rtc_data_entry_single(MX25); | ||
23 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
24 | |||
25 | struct platform_device *__init imx_add_imxdi_rtc( | ||
26 | const struct imx_imxdi_rtc_data *data) | ||
27 | { | ||
28 | struct resource res[] = { | ||
29 | { | ||
30 | .start = data->iobase, | ||
31 | .end = data->iobase + SZ_16K - 1, | ||
32 | .flags = IORESOURCE_MEM, | ||
33 | }, { | ||
34 | .start = data->irq, | ||
35 | .end = data->irq, | ||
36 | .flags = IORESOURCE_IRQ, | ||
37 | }, | ||
38 | }; | ||
39 | |||
40 | return imx_add_platform_device("imxdi_rtc", 0, | ||
41 | res, ARRAY_SIZE(res), NULL, 0); | ||
42 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-ipu-core.c b/arch/arm/mach-imx/devices/platform-ipu-core.c deleted file mode 100644 index fc4dd7cedc1..00000000000 --- a/arch/arm/mach-imx/devices/platform-ipu-core.c +++ /dev/null | |||
@@ -1,130 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/dma-mapping.h> | ||
10 | |||
11 | #include "../hardware.h" | ||
12 | #include "devices-common.h" | ||
13 | |||
14 | #define imx_ipu_core_entry_single(soc) \ | ||
15 | { \ | ||
16 | .iobase = soc ## _IPU_CTRL_BASE_ADDR, \ | ||
17 | .synirq = soc ## _INT_IPU_SYN, \ | ||
18 | .errirq = soc ## _INT_IPU_ERR, \ | ||
19 | } | ||
20 | |||
21 | #ifdef CONFIG_SOC_IMX31 | ||
22 | const struct imx_ipu_core_data imx31_ipu_core_data __initconst = | ||
23 | imx_ipu_core_entry_single(MX31); | ||
24 | #endif | ||
25 | |||
26 | #ifdef CONFIG_SOC_IMX35 | ||
27 | const struct imx_ipu_core_data imx35_ipu_core_data __initconst = | ||
28 | imx_ipu_core_entry_single(MX35); | ||
29 | #endif | ||
30 | |||
31 | static struct platform_device *imx_ipu_coredev __initdata; | ||
32 | |||
33 | struct platform_device *__init imx_add_ipu_core( | ||
34 | const struct imx_ipu_core_data *data) | ||
35 | { | ||
36 | /* The resource order is important! */ | ||
37 | struct resource res[] = { | ||
38 | { | ||
39 | .start = data->iobase, | ||
40 | .end = data->iobase + 0x5f, | ||
41 | .flags = IORESOURCE_MEM, | ||
42 | }, { | ||
43 | .start = data->iobase + 0x88, | ||
44 | .end = data->iobase + 0xb3, | ||
45 | .flags = IORESOURCE_MEM, | ||
46 | }, { | ||
47 | .start = data->synirq, | ||
48 | .end = data->synirq, | ||
49 | .flags = IORESOURCE_IRQ, | ||
50 | }, { | ||
51 | .start = data->errirq, | ||
52 | .end = data->errirq, | ||
53 | .flags = IORESOURCE_IRQ, | ||
54 | }, | ||
55 | }; | ||
56 | |||
57 | return imx_ipu_coredev = imx_add_platform_device("ipu-core", -1, | ||
58 | res, ARRAY_SIZE(res), NULL, 0); | ||
59 | } | ||
60 | |||
61 | struct platform_device *__init imx_alloc_mx3_camera( | ||
62 | const struct imx_ipu_core_data *data, | ||
63 | const struct mx3_camera_pdata *pdata) | ||
64 | { | ||
65 | struct resource res[] = { | ||
66 | { | ||
67 | .start = data->iobase + 0x60, | ||
68 | .end = data->iobase + 0x87, | ||
69 | .flags = IORESOURCE_MEM, | ||
70 | }, | ||
71 | }; | ||
72 | int ret = -ENOMEM; | ||
73 | struct platform_device *pdev; | ||
74 | |||
75 | if (IS_ERR_OR_NULL(imx_ipu_coredev)) | ||
76 | return ERR_PTR(-ENODEV); | ||
77 | |||
78 | pdev = platform_device_alloc("mx3-camera", 0); | ||
79 | if (!pdev) | ||
80 | goto err; | ||
81 | |||
82 | pdev->dev.dma_mask = kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL); | ||
83 | if (!pdev->dev.dma_mask) | ||
84 | goto err; | ||
85 | |||
86 | *pdev->dev.dma_mask = DMA_BIT_MASK(32); | ||
87 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
88 | |||
89 | ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res)); | ||
90 | if (ret) | ||
91 | goto err; | ||
92 | |||
93 | if (pdata) { | ||
94 | struct mx3_camera_pdata *copied_pdata; | ||
95 | |||
96 | ret = platform_device_add_data(pdev, pdata, sizeof(*pdata)); | ||
97 | if (ret) { | ||
98 | err: | ||
99 | kfree(pdev->dev.dma_mask); | ||
100 | platform_device_put(pdev); | ||
101 | return ERR_PTR(-ENODEV); | ||
102 | } | ||
103 | copied_pdata = dev_get_platdata(&pdev->dev); | ||
104 | copied_pdata->dma_dev = &imx_ipu_coredev->dev; | ||
105 | } | ||
106 | |||
107 | return pdev; | ||
108 | } | ||
109 | |||
110 | struct platform_device *__init imx_add_mx3_sdc_fb( | ||
111 | const struct imx_ipu_core_data *data, | ||
112 | struct mx3fb_platform_data *pdata) | ||
113 | { | ||
114 | struct resource res[] = { | ||
115 | { | ||
116 | .start = data->iobase + 0xb4, | ||
117 | .end = data->iobase + 0x1bf, | ||
118 | .flags = IORESOURCE_MEM, | ||
119 | }, | ||
120 | }; | ||
121 | |||
122 | if (IS_ERR_OR_NULL(imx_ipu_coredev)) | ||
123 | return ERR_PTR(-ENODEV); | ||
124 | |||
125 | pdata->dma_dev = &imx_ipu_coredev->dev; | ||
126 | |||
127 | return imx_add_platform_device_dmamask("mx3_sdc_fb", -1, | ||
128 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata), | ||
129 | DMA_BIT_MASK(32)); | ||
130 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-mx1-camera.c b/arch/arm/mach-imx/devices/platform-mx1-camera.c deleted file mode 100644 index 2c678813108..00000000000 --- a/arch/arm/mach-imx/devices/platform-mx1-camera.c +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_mx1_camera_data_entry_single(soc, _size) \ | ||
13 | { \ | ||
14 | .iobase = soc ## _CSI ## _BASE_ADDR, \ | ||
15 | .iosize = _size, \ | ||
16 | .irq = soc ## _INT_CSI, \ | ||
17 | } | ||
18 | |||
19 | #ifdef CONFIG_SOC_IMX1 | ||
20 | const struct imx_mx1_camera_data imx1_mx1_camera_data __initconst = | ||
21 | imx_mx1_camera_data_entry_single(MX1, 10); | ||
22 | #endif /* ifdef CONFIG_SOC_IMX1 */ | ||
23 | |||
24 | struct platform_device *__init imx_add_mx1_camera( | ||
25 | const struct imx_mx1_camera_data *data, | ||
26 | const struct mx1_camera_pdata *pdata) | ||
27 | { | ||
28 | struct resource res[] = { | ||
29 | { | ||
30 | .start = data->iobase, | ||
31 | .end = data->iobase + data->iosize - 1, | ||
32 | .flags = IORESOURCE_MEM, | ||
33 | }, { | ||
34 | .start = data->irq, | ||
35 | .end = data->irq, | ||
36 | .flags = IORESOURCE_IRQ, | ||
37 | }, | ||
38 | }; | ||
39 | return imx_add_platform_device_dmamask("mx1-camera", 0, | ||
40 | res, ARRAY_SIZE(res), | ||
41 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
42 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c b/arch/arm/mach-imx/devices/platform-mx2-camera.c deleted file mode 100644 index b53e1f348f5..00000000000 --- a/arch/arm/mach-imx/devices/platform-mx2-camera.c +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_mx2_camera_data_entry_single(soc, _devid) \ | ||
13 | { \ | ||
14 | .devid = _devid, \ | ||
15 | .iobasecsi = soc ## _CSI_BASE_ADDR, \ | ||
16 | .iosizecsi = SZ_4K, \ | ||
17 | .irqcsi = soc ## _INT_CSI, \ | ||
18 | } | ||
19 | #define imx_mx2_camera_data_entry_single_emma(soc, _devid) \ | ||
20 | { \ | ||
21 | .devid = _devid, \ | ||
22 | .iobasecsi = soc ## _CSI_BASE_ADDR, \ | ||
23 | .iosizecsi = SZ_32, \ | ||
24 | .irqcsi = soc ## _INT_CSI, \ | ||
25 | .iobaseemmaprp = soc ## _EMMAPRP_BASE_ADDR, \ | ||
26 | .iosizeemmaprp = SZ_32, \ | ||
27 | .irqemmaprp = soc ## _INT_EMMAPRP, \ | ||
28 | } | ||
29 | |||
30 | #ifdef CONFIG_SOC_IMX25 | ||
31 | const struct imx_mx2_camera_data imx25_mx2_camera_data __initconst = | ||
32 | imx_mx2_camera_data_entry_single(MX25, "imx25-camera"); | ||
33 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
34 | |||
35 | #ifdef CONFIG_SOC_IMX27 | ||
36 | const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst = | ||
37 | imx_mx2_camera_data_entry_single_emma(MX27, "imx27-camera"); | ||
38 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
39 | |||
40 | struct platform_device *__init imx_add_mx2_camera( | ||
41 | const struct imx_mx2_camera_data *data, | ||
42 | const struct mx2_camera_platform_data *pdata) | ||
43 | { | ||
44 | struct resource res[] = { | ||
45 | { | ||
46 | .start = data->iobasecsi, | ||
47 | .end = data->iobasecsi + data->iosizecsi - 1, | ||
48 | .flags = IORESOURCE_MEM, | ||
49 | }, { | ||
50 | .start = data->irqcsi, | ||
51 | .end = data->irqcsi, | ||
52 | .flags = IORESOURCE_IRQ, | ||
53 | }, { | ||
54 | .start = data->iobaseemmaprp, | ||
55 | .end = data->iobaseemmaprp + data->iosizeemmaprp - 1, | ||
56 | .flags = IORESOURCE_MEM, | ||
57 | }, { | ||
58 | .start = data->irqemmaprp, | ||
59 | .end = data->irqemmaprp, | ||
60 | .flags = IORESOURCE_IRQ, | ||
61 | }, | ||
62 | }; | ||
63 | return imx_add_platform_device_dmamask(data->devid, 0, | ||
64 | res, data->iobaseemmaprp ? 4 : 2, | ||
65 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
66 | } | ||
67 | |||
diff --git a/arch/arm/mach-imx/devices/platform-mx2-emma.c b/arch/arm/mach-imx/devices/platform-mx2-emma.c deleted file mode 100644 index 11bd01d402f..00000000000 --- a/arch/arm/mach-imx/devices/platform-mx2-emma.c +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_mx2_emmaprp_data_entry_single(soc) \ | ||
13 | { \ | ||
14 | .iobase = soc ## _EMMAPRP_BASE_ADDR, \ | ||
15 | .iosize = SZ_32, \ | ||
16 | .irq = soc ## _INT_EMMAPRP, \ | ||
17 | } | ||
18 | |||
19 | #ifdef CONFIG_SOC_IMX27 | ||
20 | const struct imx_mx2_emma_data imx27_mx2_emmaprp_data __initconst = | ||
21 | imx_mx2_emmaprp_data_entry_single(MX27); | ||
22 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
23 | |||
24 | struct platform_device *__init imx_add_mx2_emmaprp( | ||
25 | const struct imx_mx2_emma_data *data) | ||
26 | { | ||
27 | struct resource res[] = { | ||
28 | { | ||
29 | .start = data->iobase, | ||
30 | .end = data->iobase + data->iosize - 1, | ||
31 | .flags = IORESOURCE_MEM, | ||
32 | }, { | ||
33 | .start = data->irq, | ||
34 | .end = data->irq, | ||
35 | .flags = IORESOURCE_IRQ, | ||
36 | }, | ||
37 | }; | ||
38 | return imx_add_platform_device_dmamask("m2m-emmaprp", 0, | ||
39 | res, 2, NULL, 0, DMA_BIT_MASK(32)); | ||
40 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-mxc-ehci.c b/arch/arm/mach-imx/devices/platform-mxc-ehci.c deleted file mode 100644 index 5d4bbbfde64..00000000000 --- a/arch/arm/mach-imx/devices/platform-mxc-ehci.c +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/dma-mapping.h> | ||
10 | |||
11 | #include "../hardware.h" | ||
12 | #include "devices-common.h" | ||
13 | |||
14 | #define imx_mxc_ehci_data_entry_single(soc, _id, hs) \ | ||
15 | { \ | ||
16 | .id = _id, \ | ||
17 | .iobase = soc ## _USB_ ## hs ## _BASE_ADDR, \ | ||
18 | .irq = soc ## _INT_USB_ ## hs, \ | ||
19 | } | ||
20 | |||
21 | #ifdef CONFIG_SOC_IMX25 | ||
22 | const struct imx_mxc_ehci_data imx25_mxc_ehci_otg_data __initconst = | ||
23 | imx_mxc_ehci_data_entry_single(MX25, 0, OTG); | ||
24 | const struct imx_mxc_ehci_data imx25_mxc_ehci_hs_data __initconst = | ||
25 | imx_mxc_ehci_data_entry_single(MX25, 1, HS); | ||
26 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
27 | |||
28 | #ifdef CONFIG_SOC_IMX27 | ||
29 | const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data __initconst = | ||
30 | imx_mxc_ehci_data_entry_single(MX27, 0, OTG); | ||
31 | const struct imx_mxc_ehci_data imx27_mxc_ehci_hs_data[] __initconst = { | ||
32 | imx_mxc_ehci_data_entry_single(MX27, 1, HS1), | ||
33 | imx_mxc_ehci_data_entry_single(MX27, 2, HS2), | ||
34 | }; | ||
35 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
36 | |||
37 | #ifdef CONFIG_SOC_IMX31 | ||
38 | const struct imx_mxc_ehci_data imx31_mxc_ehci_otg_data __initconst = | ||
39 | imx_mxc_ehci_data_entry_single(MX31, 0, OTG); | ||
40 | const struct imx_mxc_ehci_data imx31_mxc_ehci_hs_data[] __initconst = { | ||
41 | imx_mxc_ehci_data_entry_single(MX31, 1, HS1), | ||
42 | imx_mxc_ehci_data_entry_single(MX31, 2, HS2), | ||
43 | }; | ||
44 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
45 | |||
46 | #ifdef CONFIG_SOC_IMX35 | ||
47 | const struct imx_mxc_ehci_data imx35_mxc_ehci_otg_data __initconst = | ||
48 | imx_mxc_ehci_data_entry_single(MX35, 0, OTG); | ||
49 | const struct imx_mxc_ehci_data imx35_mxc_ehci_hs_data __initconst = | ||
50 | imx_mxc_ehci_data_entry_single(MX35, 1, HS); | ||
51 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
52 | |||
53 | #ifdef CONFIG_SOC_IMX51 | ||
54 | const struct imx_mxc_ehci_data imx51_mxc_ehci_otg_data __initconst = | ||
55 | imx_mxc_ehci_data_entry_single(MX51, 0, OTG); | ||
56 | const struct imx_mxc_ehci_data imx51_mxc_ehci_hs_data[] __initconst = { | ||
57 | imx_mxc_ehci_data_entry_single(MX51, 1, HS1), | ||
58 | imx_mxc_ehci_data_entry_single(MX51, 2, HS2), | ||
59 | }; | ||
60 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
61 | |||
62 | struct platform_device *__init imx_add_mxc_ehci( | ||
63 | const struct imx_mxc_ehci_data *data, | ||
64 | const struct mxc_usbh_platform_data *pdata) | ||
65 | { | ||
66 | struct resource res[] = { | ||
67 | { | ||
68 | .start = data->iobase, | ||
69 | .end = data->iobase + SZ_512 - 1, | ||
70 | .flags = IORESOURCE_MEM, | ||
71 | }, { | ||
72 | .start = data->irq, | ||
73 | .end = data->irq, | ||
74 | .flags = IORESOURCE_IRQ, | ||
75 | }, | ||
76 | }; | ||
77 | return imx_add_platform_device_dmamask("mxc-ehci", data->id, | ||
78 | res, ARRAY_SIZE(res), | ||
79 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
80 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-mxc-mmc.c b/arch/arm/mach-imx/devices/platform-mxc-mmc.c deleted file mode 100644 index b8203c760c8..00000000000 --- a/arch/arm/mach-imx/devices/platform-mxc-mmc.c +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/dma-mapping.h> | ||
10 | |||
11 | #include "../hardware.h" | ||
12 | #include "devices-common.h" | ||
13 | |||
14 | #define imx_mxc_mmc_data_entry_single(soc, _devid, _id, _hwid, _size) \ | ||
15 | { \ | ||
16 | .devid = _devid, \ | ||
17 | .id = _id, \ | ||
18 | .iobase = soc ## _SDHC ## _hwid ## _BASE_ADDR, \ | ||
19 | .iosize = _size, \ | ||
20 | .irq = soc ## _INT_SDHC ## _hwid, \ | ||
21 | .dmareq = soc ## _DMA_REQ_SDHC ## _hwid, \ | ||
22 | } | ||
23 | #define imx_mxc_mmc_data_entry(soc, _devid, _id, _hwid, _size) \ | ||
24 | [_id] = imx_mxc_mmc_data_entry_single(soc, _devid, _id, _hwid, _size) | ||
25 | |||
26 | #ifdef CONFIG_SOC_IMX21 | ||
27 | const struct imx_mxc_mmc_data imx21_mxc_mmc_data[] __initconst = { | ||
28 | #define imx21_mxc_mmc_data_entry(_id, _hwid) \ | ||
29 | imx_mxc_mmc_data_entry(MX21, "imx21-mmc", _id, _hwid, SZ_4K) | ||
30 | imx21_mxc_mmc_data_entry(0, 1), | ||
31 | imx21_mxc_mmc_data_entry(1, 2), | ||
32 | }; | ||
33 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
34 | |||
35 | #ifdef CONFIG_SOC_IMX27 | ||
36 | const struct imx_mxc_mmc_data imx27_mxc_mmc_data[] __initconst = { | ||
37 | #define imx27_mxc_mmc_data_entry(_id, _hwid) \ | ||
38 | imx_mxc_mmc_data_entry(MX27, "imx21-mmc", _id, _hwid, SZ_4K) | ||
39 | imx27_mxc_mmc_data_entry(0, 1), | ||
40 | imx27_mxc_mmc_data_entry(1, 2), | ||
41 | }; | ||
42 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
43 | |||
44 | #ifdef CONFIG_SOC_IMX31 | ||
45 | const struct imx_mxc_mmc_data imx31_mxc_mmc_data[] __initconst = { | ||
46 | #define imx31_mxc_mmc_data_entry(_id, _hwid) \ | ||
47 | imx_mxc_mmc_data_entry(MX31, "imx31-mmc", _id, _hwid, SZ_16K) | ||
48 | imx31_mxc_mmc_data_entry(0, 1), | ||
49 | imx31_mxc_mmc_data_entry(1, 2), | ||
50 | }; | ||
51 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
52 | |||
53 | struct platform_device *__init imx_add_mxc_mmc( | ||
54 | const struct imx_mxc_mmc_data *data, | ||
55 | const struct imxmmc_platform_data *pdata) | ||
56 | { | ||
57 | struct resource res[] = { | ||
58 | { | ||
59 | .start = data->iobase, | ||
60 | .end = data->iobase + data->iosize - 1, | ||
61 | .flags = IORESOURCE_MEM, | ||
62 | }, { | ||
63 | .start = data->irq, | ||
64 | .end = data->irq, | ||
65 | .flags = IORESOURCE_IRQ, | ||
66 | }, { | ||
67 | .start = data->dmareq, | ||
68 | .end = data->dmareq, | ||
69 | .flags = IORESOURCE_DMA, | ||
70 | }, | ||
71 | }; | ||
72 | return imx_add_platform_device_dmamask(data->devid, data->id, | ||
73 | res, ARRAY_SIZE(res), | ||
74 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
75 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-mxc_nand.c b/arch/arm/mach-imx/devices/platform-mxc_nand.c deleted file mode 100644 index 7af1c53e42b..00000000000 --- a/arch/arm/mach-imx/devices/platform-mxc_nand.c +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <asm/sizes.h> | ||
10 | |||
11 | #include "../hardware.h" | ||
12 | #include "devices-common.h" | ||
13 | |||
14 | #define imx_mxc_nand_data_entry_single(soc, _devid, _size) \ | ||
15 | { \ | ||
16 | .devid = _devid, \ | ||
17 | .iobase = soc ## _NFC_BASE_ADDR, \ | ||
18 | .iosize = _size, \ | ||
19 | .irq = soc ## _INT_NFC \ | ||
20 | } | ||
21 | |||
22 | #define imx_mxc_nandv3_data_entry_single(soc, _devid, _size) \ | ||
23 | { \ | ||
24 | .devid = _devid, \ | ||
25 | .id = -1, \ | ||
26 | .iobase = soc ## _NFC_BASE_ADDR, \ | ||
27 | .iosize = _size, \ | ||
28 | .axibase = soc ## _NFC_AXI_BASE_ADDR, \ | ||
29 | .irq = soc ## _INT_NFC \ | ||
30 | } | ||
31 | |||
32 | #ifdef CONFIG_SOC_IMX21 | ||
33 | const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst = | ||
34 | imx_mxc_nand_data_entry_single(MX21, "imx21-nand", SZ_4K); | ||
35 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
36 | |||
37 | #ifdef CONFIG_SOC_IMX25 | ||
38 | const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst = | ||
39 | imx_mxc_nand_data_entry_single(MX25, "imx25-nand", SZ_8K); | ||
40 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
41 | |||
42 | #ifdef CONFIG_SOC_IMX27 | ||
43 | const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst = | ||
44 | imx_mxc_nand_data_entry_single(MX27, "imx27-nand", SZ_4K); | ||
45 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
46 | |||
47 | #ifdef CONFIG_SOC_IMX31 | ||
48 | const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst = | ||
49 | imx_mxc_nand_data_entry_single(MX31, "imx27-nand", SZ_4K); | ||
50 | #endif | ||
51 | |||
52 | #ifdef CONFIG_SOC_IMX35 | ||
53 | const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst = | ||
54 | imx_mxc_nand_data_entry_single(MX35, "imx25-nand", SZ_8K); | ||
55 | #endif | ||
56 | |||
57 | #ifdef CONFIG_SOC_IMX51 | ||
58 | const struct imx_mxc_nand_data imx51_mxc_nand_data __initconst = | ||
59 | imx_mxc_nandv3_data_entry_single(MX51, "imx51-nand", SZ_16K); | ||
60 | #endif | ||
61 | |||
62 | struct platform_device *__init imx_add_mxc_nand( | ||
63 | const struct imx_mxc_nand_data *data, | ||
64 | const struct mxc_nand_platform_data *pdata) | ||
65 | { | ||
66 | /* AXI has to come first, that's how the mxc_nand driver expect it */ | ||
67 | struct resource res[] = { | ||
68 | { | ||
69 | .start = data->iobase, | ||
70 | .end = data->iobase + data->iosize - 1, | ||
71 | .flags = IORESOURCE_MEM, | ||
72 | }, { | ||
73 | .start = data->irq, | ||
74 | .end = data->irq, | ||
75 | .flags = IORESOURCE_IRQ, | ||
76 | }, { | ||
77 | .start = data->axibase, | ||
78 | .end = data->axibase + SZ_16K - 1, | ||
79 | .flags = IORESOURCE_MEM, | ||
80 | }, | ||
81 | }; | ||
82 | return imx_add_platform_device(data->devid, data->id, | ||
83 | res, ARRAY_SIZE(res) - !data->axibase, | ||
84 | pdata, sizeof(*pdata)); | ||
85 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-mxc_pwm.c b/arch/arm/mach-imx/devices/platform-mxc_pwm.c deleted file mode 100644 index dcd28977768..00000000000 --- a/arch/arm/mach-imx/devices/platform-mxc_pwm.c +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size) \ | ||
13 | { \ | ||
14 | .id = _id, \ | ||
15 | .iobase = soc ## _PWM ## _hwid ## _BASE_ADDR, \ | ||
16 | .iosize = _size, \ | ||
17 | .irq = soc ## _INT_PWM ## _hwid, \ | ||
18 | } | ||
19 | #define imx_mxc_pwm_data_entry(soc, _id, _hwid, _size) \ | ||
20 | [_id] = imx_mxc_pwm_data_entry_single(soc, _id, _hwid, _size) | ||
21 | |||
22 | #ifdef CONFIG_SOC_IMX21 | ||
23 | const struct imx_mxc_pwm_data imx21_mxc_pwm_data __initconst = | ||
24 | imx_mxc_pwm_data_entry_single(MX21, 0, , SZ_4K); | ||
25 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
26 | |||
27 | #ifdef CONFIG_SOC_IMX25 | ||
28 | const struct imx_mxc_pwm_data imx25_mxc_pwm_data[] __initconst = { | ||
29 | #define imx25_mxc_pwm_data_entry(_id, _hwid) \ | ||
30 | imx_mxc_pwm_data_entry(MX25, _id, _hwid, SZ_16K) | ||
31 | imx25_mxc_pwm_data_entry(0, 1), | ||
32 | imx25_mxc_pwm_data_entry(1, 2), | ||
33 | imx25_mxc_pwm_data_entry(2, 3), | ||
34 | imx25_mxc_pwm_data_entry(3, 4), | ||
35 | }; | ||
36 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
37 | |||
38 | #ifdef CONFIG_SOC_IMX27 | ||
39 | const struct imx_mxc_pwm_data imx27_mxc_pwm_data __initconst = | ||
40 | imx_mxc_pwm_data_entry_single(MX27, 0, , SZ_4K); | ||
41 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
42 | |||
43 | #ifdef CONFIG_SOC_IMX51 | ||
44 | const struct imx_mxc_pwm_data imx51_mxc_pwm_data[] __initconst = { | ||
45 | #define imx51_mxc_pwm_data_entry(_id, _hwid) \ | ||
46 | imx_mxc_pwm_data_entry(MX51, _id, _hwid, SZ_16K) | ||
47 | imx51_mxc_pwm_data_entry(0, 1), | ||
48 | imx51_mxc_pwm_data_entry(1, 2), | ||
49 | }; | ||
50 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
51 | |||
52 | struct platform_device *__init imx_add_mxc_pwm( | ||
53 | const struct imx_mxc_pwm_data *data) | ||
54 | { | ||
55 | struct resource res[] = { | ||
56 | { | ||
57 | .start = data->iobase, | ||
58 | .end = data->iobase + data->iosize - 1, | ||
59 | .flags = IORESOURCE_MEM, | ||
60 | }, { | ||
61 | .start = data->irq, | ||
62 | .end = data->irq, | ||
63 | .flags = IORESOURCE_IRQ, | ||
64 | }, | ||
65 | }; | ||
66 | |||
67 | return imx_add_platform_device("mxc_pwm", data->id, | ||
68 | res, ARRAY_SIZE(res), NULL, 0); | ||
69 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-mxc_rnga.c b/arch/arm/mach-imx/devices/platform-mxc_rnga.c deleted file mode 100644 index c58404badb5..00000000000 --- a/arch/arm/mach-imx/devices/platform-mxc_rnga.c +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | struct imx_mxc_rnga_data { | ||
13 | resource_size_t iobase; | ||
14 | }; | ||
15 | |||
16 | #define imx_mxc_rnga_data_entry_single(soc) \ | ||
17 | { \ | ||
18 | .iobase = soc ## _RNGA_BASE_ADDR, \ | ||
19 | } | ||
20 | |||
21 | #ifdef CONFIG_SOC_IMX31 | ||
22 | static const struct imx_mxc_rnga_data imx31_mxc_rnga_data __initconst = | ||
23 | imx_mxc_rnga_data_entry_single(MX31); | ||
24 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
25 | |||
26 | static struct platform_device *__init imx_add_mxc_rnga( | ||
27 | const struct imx_mxc_rnga_data *data) | ||
28 | { | ||
29 | struct resource res[] = { | ||
30 | { | ||
31 | .start = data->iobase, | ||
32 | .end = data->iobase + SZ_16K - 1, | ||
33 | .flags = IORESOURCE_MEM, | ||
34 | }, | ||
35 | }; | ||
36 | return imx_add_platform_device("mxc_rnga", -1, | ||
37 | res, ARRAY_SIZE(res), NULL, 0); | ||
38 | } | ||
39 | |||
40 | static int __init imxXX_add_mxc_rnga(void) | ||
41 | { | ||
42 | struct platform_device *ret; | ||
43 | |||
44 | #if defined(CONFIG_SOC_IMX31) | ||
45 | if (cpu_is_mx31()) | ||
46 | ret = imx_add_mxc_rnga(&imx31_mxc_rnga_data); | ||
47 | else | ||
48 | #endif /* if defined(CONFIG_SOC_IMX31) */ | ||
49 | ret = ERR_PTR(-ENODEV); | ||
50 | |||
51 | if (IS_ERR(ret)) | ||
52 | return PTR_ERR(ret); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
56 | arch_initcall(imxXX_add_mxc_rnga); | ||
diff --git a/arch/arm/mach-imx/devices/platform-mxc_rtc.c b/arch/arm/mach-imx/devices/platform-mxc_rtc.c deleted file mode 100644 index c7fffaadf84..00000000000 --- a/arch/arm/mach-imx/devices/platform-mxc_rtc.c +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010-2011 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_mxc_rtc_data_entry_single(soc, _devid) \ | ||
13 | { \ | ||
14 | .devid = _devid, \ | ||
15 | .iobase = soc ## _RTC_BASE_ADDR, \ | ||
16 | .irq = soc ## _INT_RTC, \ | ||
17 | } | ||
18 | |||
19 | #ifdef CONFIG_SOC_IMX31 | ||
20 | const struct imx_mxc_rtc_data imx31_mxc_rtc_data __initconst = | ||
21 | imx_mxc_rtc_data_entry_single(MX31, "imx21-rtc"); | ||
22 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
23 | |||
24 | #ifdef CONFIG_SOC_IMX35 | ||
25 | const struct imx_mxc_rtc_data imx35_mxc_rtc_data __initconst = | ||
26 | imx_mxc_rtc_data_entry_single(MX35, "imx21-rtc"); | ||
27 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
28 | |||
29 | struct platform_device *__init imx_add_mxc_rtc( | ||
30 | const struct imx_mxc_rtc_data *data) | ||
31 | { | ||
32 | struct resource res[] = { | ||
33 | { | ||
34 | .start = data->iobase, | ||
35 | .end = data->iobase + SZ_16K - 1, | ||
36 | .flags = IORESOURCE_MEM, | ||
37 | }, { | ||
38 | .start = data->irq, | ||
39 | .end = data->irq, | ||
40 | .flags = IORESOURCE_IRQ, | ||
41 | }, | ||
42 | }; | ||
43 | |||
44 | return imx_add_platform_device(data->devid, -1, | ||
45 | res, ARRAY_SIZE(res), NULL, 0); | ||
46 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-mxc_w1.c b/arch/arm/mach-imx/devices/platform-mxc_w1.c deleted file mode 100644 index 88c18b720d6..00000000000 --- a/arch/arm/mach-imx/devices/platform-mxc_w1.c +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_mxc_w1_data_entry_single(soc) \ | ||
13 | { \ | ||
14 | .iobase = soc ## _OWIRE_BASE_ADDR, \ | ||
15 | } | ||
16 | |||
17 | #ifdef CONFIG_SOC_IMX21 | ||
18 | const struct imx_mxc_w1_data imx21_mxc_w1_data __initconst = | ||
19 | imx_mxc_w1_data_entry_single(MX21); | ||
20 | #endif /* ifdef CONFIG_SOC_IMX21 */ | ||
21 | |||
22 | #ifdef CONFIG_SOC_IMX27 | ||
23 | const struct imx_mxc_w1_data imx27_mxc_w1_data __initconst = | ||
24 | imx_mxc_w1_data_entry_single(MX27); | ||
25 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
26 | |||
27 | #ifdef CONFIG_SOC_IMX31 | ||
28 | const struct imx_mxc_w1_data imx31_mxc_w1_data __initconst = | ||
29 | imx_mxc_w1_data_entry_single(MX31); | ||
30 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
31 | |||
32 | #ifdef CONFIG_SOC_IMX35 | ||
33 | const struct imx_mxc_w1_data imx35_mxc_w1_data __initconst = | ||
34 | imx_mxc_w1_data_entry_single(MX35); | ||
35 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
36 | |||
37 | struct platform_device *__init imx_add_mxc_w1( | ||
38 | const struct imx_mxc_w1_data *data) | ||
39 | { | ||
40 | struct resource res[] = { | ||
41 | { | ||
42 | .start = data->iobase, | ||
43 | .end = data->iobase + SZ_4K - 1, | ||
44 | .flags = IORESOURCE_MEM, | ||
45 | }, | ||
46 | }; | ||
47 | |||
48 | return imx_add_platform_device("mxc_w1", 0, | ||
49 | res, ARRAY_SIZE(res), NULL, 0); | ||
50 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-pata_imx.c b/arch/arm/mach-imx/devices/platform-pata_imx.c deleted file mode 100644 index e4ec11c8ce5..00000000000 --- a/arch/arm/mach-imx/devices/platform-pata_imx.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify it under | ||
3 | * the terms of the GNU General Public License version 2 as published by the | ||
4 | * Free Software Foundation. | ||
5 | */ | ||
6 | #include "../hardware.h" | ||
7 | #include "devices-common.h" | ||
8 | |||
9 | #define imx_pata_imx_data_entry_single(soc, _size) \ | ||
10 | { \ | ||
11 | .iobase = soc ## _ATA_BASE_ADDR, \ | ||
12 | .iosize = _size, \ | ||
13 | .irq = soc ## _INT_ATA, \ | ||
14 | } | ||
15 | |||
16 | #ifdef CONFIG_SOC_IMX27 | ||
17 | const struct imx_pata_imx_data imx27_pata_imx_data __initconst = | ||
18 | imx_pata_imx_data_entry_single(MX27, SZ_4K); | ||
19 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
20 | |||
21 | #ifdef CONFIG_SOC_IMX31 | ||
22 | const struct imx_pata_imx_data imx31_pata_imx_data __initconst = | ||
23 | imx_pata_imx_data_entry_single(MX31, SZ_16K); | ||
24 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
25 | |||
26 | #ifdef CONFIG_SOC_IMX35 | ||
27 | const struct imx_pata_imx_data imx35_pata_imx_data __initconst = | ||
28 | imx_pata_imx_data_entry_single(MX35, SZ_16K); | ||
29 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
30 | |||
31 | #ifdef CONFIG_SOC_IMX51 | ||
32 | const struct imx_pata_imx_data imx51_pata_imx_data __initconst = | ||
33 | imx_pata_imx_data_entry_single(MX51, SZ_16K); | ||
34 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
35 | |||
36 | #ifdef CONFIG_SOC_IMX53 | ||
37 | const struct imx_pata_imx_data imx53_pata_imx_data __initconst = | ||
38 | imx_pata_imx_data_entry_single(MX53, SZ_16K); | ||
39 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
40 | |||
41 | struct platform_device *__init imx_add_pata_imx( | ||
42 | const struct imx_pata_imx_data *data) | ||
43 | { | ||
44 | struct resource res[] = { | ||
45 | { | ||
46 | .start = data->iobase, | ||
47 | .end = data->iobase + data->iosize - 1, | ||
48 | .flags = IORESOURCE_MEM, | ||
49 | }, | ||
50 | { | ||
51 | .start = data->irq, | ||
52 | .end = data->irq, | ||
53 | .flags = IORESOURCE_IRQ, | ||
54 | }, | ||
55 | }; | ||
56 | return imx_add_platform_device("pata_imx", -1, | ||
57 | res, ARRAY_SIZE(res), NULL, 0); | ||
58 | } | ||
59 | |||
diff --git a/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c b/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c deleted file mode 100644 index e66a4e31631..00000000000 --- a/arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix, Wolfram Sang <w.sang@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it under | ||
5 | * the terms of the GNU General Public License version 2 as published by the | ||
6 | * Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #include <linux/platform_data/mmc-esdhc-imx.h> | ||
10 | |||
11 | #include "../hardware.h" | ||
12 | #include "devices-common.h" | ||
13 | |||
14 | #define imx_sdhci_esdhc_imx_data_entry_single(soc, _devid, _id, hwid) \ | ||
15 | { \ | ||
16 | .devid = _devid, \ | ||
17 | .id = _id, \ | ||
18 | .iobase = soc ## _ESDHC ## hwid ## _BASE_ADDR, \ | ||
19 | .irq = soc ## _INT_ESDHC ## hwid, \ | ||
20 | } | ||
21 | |||
22 | #define imx_sdhci_esdhc_imx_data_entry(soc, devid, id, hwid) \ | ||
23 | [id] = imx_sdhci_esdhc_imx_data_entry_single(soc, devid, id, hwid) | ||
24 | |||
25 | #ifdef CONFIG_SOC_IMX25 | ||
26 | const struct imx_sdhci_esdhc_imx_data | ||
27 | imx25_sdhci_esdhc_imx_data[] __initconst = { | ||
28 | #define imx25_sdhci_esdhc_imx_data_entry(_id, _hwid) \ | ||
29 | imx_sdhci_esdhc_imx_data_entry(MX25, "sdhci-esdhc-imx25", _id, _hwid) | ||
30 | imx25_sdhci_esdhc_imx_data_entry(0, 1), | ||
31 | imx25_sdhci_esdhc_imx_data_entry(1, 2), | ||
32 | }; | ||
33 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
34 | |||
35 | #ifdef CONFIG_SOC_IMX35 | ||
36 | const struct imx_sdhci_esdhc_imx_data | ||
37 | imx35_sdhci_esdhc_imx_data[] __initconst = { | ||
38 | #define imx35_sdhci_esdhc_imx_data_entry(_id, _hwid) \ | ||
39 | imx_sdhci_esdhc_imx_data_entry(MX35, "sdhci-esdhc-imx35", _id, _hwid) | ||
40 | imx35_sdhci_esdhc_imx_data_entry(0, 1), | ||
41 | imx35_sdhci_esdhc_imx_data_entry(1, 2), | ||
42 | imx35_sdhci_esdhc_imx_data_entry(2, 3), | ||
43 | }; | ||
44 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
45 | |||
46 | #ifdef CONFIG_SOC_IMX51 | ||
47 | const struct imx_sdhci_esdhc_imx_data | ||
48 | imx51_sdhci_esdhc_imx_data[] __initconst = { | ||
49 | #define imx51_sdhci_esdhc_imx_data_entry(_id, _hwid) \ | ||
50 | imx_sdhci_esdhc_imx_data_entry(MX51, "sdhci-esdhc-imx51", _id, _hwid) | ||
51 | imx51_sdhci_esdhc_imx_data_entry(0, 1), | ||
52 | imx51_sdhci_esdhc_imx_data_entry(1, 2), | ||
53 | imx51_sdhci_esdhc_imx_data_entry(2, 3), | ||
54 | imx51_sdhci_esdhc_imx_data_entry(3, 4), | ||
55 | }; | ||
56 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
57 | |||
58 | #ifdef CONFIG_SOC_IMX53 | ||
59 | const struct imx_sdhci_esdhc_imx_data | ||
60 | imx53_sdhci_esdhc_imx_data[] __initconst = { | ||
61 | #define imx53_sdhci_esdhc_imx_data_entry(_id, _hwid) \ | ||
62 | imx_sdhci_esdhc_imx_data_entry(MX53, "sdhci-esdhc-imx53", _id, _hwid) | ||
63 | imx53_sdhci_esdhc_imx_data_entry(0, 1), | ||
64 | imx53_sdhci_esdhc_imx_data_entry(1, 2), | ||
65 | imx53_sdhci_esdhc_imx_data_entry(2, 3), | ||
66 | imx53_sdhci_esdhc_imx_data_entry(3, 4), | ||
67 | }; | ||
68 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
69 | |||
70 | static const struct esdhc_platform_data default_esdhc_pdata __initconst = { | ||
71 | .wp_type = ESDHC_WP_NONE, | ||
72 | .cd_type = ESDHC_CD_NONE, | ||
73 | }; | ||
74 | |||
75 | struct platform_device *__init imx_add_sdhci_esdhc_imx( | ||
76 | const struct imx_sdhci_esdhc_imx_data *data, | ||
77 | const struct esdhc_platform_data *pdata) | ||
78 | { | ||
79 | struct resource res[] = { | ||
80 | { | ||
81 | .start = data->iobase, | ||
82 | .end = data->iobase + SZ_16K - 1, | ||
83 | .flags = IORESOURCE_MEM, | ||
84 | }, { | ||
85 | .start = data->irq, | ||
86 | .end = data->irq, | ||
87 | .flags = IORESOURCE_IRQ, | ||
88 | }, | ||
89 | }; | ||
90 | |||
91 | /* | ||
92 | * If machine does not provide pdata, use the default one | ||
93 | * which means no WP/CD support | ||
94 | */ | ||
95 | if (!pdata) | ||
96 | pdata = &default_esdhc_pdata; | ||
97 | |||
98 | return imx_add_platform_device(data->devid, data->id, res, | ||
99 | ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
100 | } | ||
diff --git a/arch/arm/mach-imx/devices/platform-spi_imx.c b/arch/arm/mach-imx/devices/platform-spi_imx.c deleted file mode 100644 index 8880bcb11e0..00000000000 --- a/arch/arm/mach-imx/devices/platform-spi_imx.c +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include "../hardware.h" | ||
10 | #include "devices-common.h" | ||
11 | |||
12 | #define imx_spi_imx_data_entry_single(soc, type, _devid, _id, hwid, _size) \ | ||
13 | { \ | ||
14 | .devid = _devid, \ | ||
15 | .id = _id, \ | ||
16 | .iobase = soc ## _ ## type ## hwid ## _BASE_ADDR, \ | ||
17 | .iosize = _size, \ | ||
18 | .irq = soc ## _INT_ ## type ## hwid, \ | ||
19 | } | ||
20 | |||
21 | #define imx_spi_imx_data_entry(soc, type, devid, id, hwid, size) \ | ||
22 | [id] = imx_spi_imx_data_entry_single(soc, type, devid, id, hwid, size) | ||
23 | |||
24 | #ifdef CONFIG_SOC_IMX1 | ||
25 | const struct imx_spi_imx_data imx1_cspi_data[] __initconst = { | ||
26 | #define imx1_cspi_data_entry(_id, _hwid) \ | ||
27 | imx_spi_imx_data_entry(MX1, CSPI, "imx1-cspi", _id, _hwid, SZ_4K) | ||
28 | imx1_cspi_data_entry(0, 1), | ||
29 | imx1_cspi_data_entry(1, 2), | ||
30 | }; | ||
31 | #endif | ||
32 | |||
33 | #ifdef CONFIG_SOC_IMX21 | ||
34 | const struct imx_spi_imx_data imx21_cspi_data[] __initconst = { | ||
35 | #define imx21_cspi_data_entry(_id, _hwid) \ | ||
36 | imx_spi_imx_data_entry(MX21, CSPI, "imx21-cspi", _id, _hwid, SZ_4K) | ||
37 | imx21_cspi_data_entry(0, 1), | ||
38 | imx21_cspi_data_entry(1, 2), | ||
39 | }; | ||
40 | #endif | ||
41 | |||
42 | #ifdef CONFIG_SOC_IMX25 | ||
43 | /* i.mx25 has the i.mx35 type cspi */ | ||
44 | const struct imx_spi_imx_data imx25_cspi_data[] __initconst = { | ||
45 | #define imx25_cspi_data_entry(_id, _hwid) \ | ||
46 | imx_spi_imx_data_entry(MX25, CSPI, "imx35-cspi", _id, _hwid, SZ_16K) | ||
47 | imx25_cspi_data_entry(0, 1), | ||
48 | imx25_cspi_data_entry(1, 2), | ||
49 | imx25_cspi_data_entry(2, 3), | ||
50 | }; | ||
51 | #endif /* ifdef CONFIG_SOC_IMX25 */ | ||
52 | |||
53 | #ifdef CONFIG_SOC_IMX27 | ||
54 | const struct imx_spi_imx_data imx27_cspi_data[] __initconst = { | ||
55 | #define imx27_cspi_data_entry(_id, _hwid) \ | ||
56 | imx_spi_imx_data_entry(MX27, CSPI, "imx27-cspi", _id, _hwid, SZ_4K) | ||
57 | imx27_cspi_data_entry(0, 1), | ||
58 | imx27_cspi_data_entry(1, 2), | ||
59 | imx27_cspi_data_entry(2, 3), | ||
60 | }; | ||
61 | #endif /* ifdef CONFIG_SOC_IMX27 */ | ||
62 | |||
63 | #ifdef CONFIG_SOC_IMX31 | ||
64 | const struct imx_spi_imx_data imx31_cspi_data[] __initconst = { | ||
65 | #define imx31_cspi_data_entry(_id, _hwid) \ | ||
66 | imx_spi_imx_data_entry(MX31, CSPI, "imx31-cspi", _id, _hwid, SZ_4K) | ||
67 | imx31_cspi_data_entry(0, 1), | ||
68 | imx31_cspi_data_entry(1, 2), | ||
69 | imx31_cspi_data_entry(2, 3), | ||
70 | }; | ||
71 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
72 | |||
73 | #ifdef CONFIG_SOC_IMX35 | ||
74 | const struct imx_spi_imx_data imx35_cspi_data[] __initconst = { | ||
75 | #define imx35_cspi_data_entry(_id, _hwid) \ | ||
76 | imx_spi_imx_data_entry(MX35, CSPI, "imx35-cspi", _id, _hwid, SZ_4K) | ||
77 | imx35_cspi_data_entry(0, 1), | ||
78 | imx35_cspi_data_entry(1, 2), | ||
79 | }; | ||
80 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
81 | |||
82 | #ifdef CONFIG_SOC_IMX51 | ||
83 | /* i.mx51 has the i.mx35 type cspi */ | ||
84 | const struct imx_spi_imx_data imx51_cspi_data __initconst = | ||
85 | imx_spi_imx_data_entry_single(MX51, CSPI, "imx35-cspi", 2, , SZ_4K); | ||
86 | |||
87 | const struct imx_spi_imx_data imx51_ecspi_data[] __initconst = { | ||
88 | #define imx51_ecspi_data_entry(_id, _hwid) \ | ||
89 | imx_spi_imx_data_entry(MX51, ECSPI, "imx51-ecspi", _id, _hwid, SZ_4K) | ||
90 | imx51_ecspi_data_entry(0, 1), | ||
91 | imx51_ecspi_data_entry(1, 2), | ||
92 | }; | ||
93 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
94 | |||
95 | #ifdef CONFIG_SOC_IMX53 | ||
96 | /* i.mx53 has the i.mx35 type cspi */ | ||
97 | const struct imx_spi_imx_data imx53_cspi_data __initconst = | ||
98 | imx_spi_imx_data_entry_single(MX53, CSPI, "imx35-cspi", 2, , SZ_4K); | ||
99 | |||
100 | /* i.mx53 has the i.mx51 type ecspi */ | ||
101 | const struct imx_spi_imx_data imx53_ecspi_data[] __initconst = { | ||
102 | #define imx53_ecspi_data_entry(_id, _hwid) \ | ||
103 | imx_spi_imx_data_entry(MX53, ECSPI, "imx51-ecspi", _id, _hwid, SZ_4K) | ||
104 | imx53_ecspi_data_entry(0, 1), | ||
105 | imx53_ecspi_data_entry(1, 2), | ||
106 | }; | ||
107 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
108 | |||
109 | struct platform_device *__init imx_add_spi_imx( | ||
110 | const struct imx_spi_imx_data *data, | ||
111 | const struct spi_imx_master *pdata) | ||
112 | { | ||
113 | struct resource res[] = { | ||
114 | { | ||
115 | .start = data->iobase, | ||
116 | .end = data->iobase + data->iosize - 1, | ||
117 | .flags = IORESOURCE_MEM, | ||
118 | }, { | ||
119 | .start = data->irq, | ||
120 | .end = data->irq, | ||
121 | .flags = IORESOURCE_IRQ, | ||
122 | }, | ||
123 | }; | ||
124 | |||
125 | return imx_add_platform_device(data->devid, data->id, | ||
126 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
127 | } | ||
diff --git a/arch/arm/mach-imx/ehci-imx25.c b/arch/arm/mach-imx/ehci-imx25.c index 134c190e300..865daf0b09e 100644 --- a/arch/arm/mach-imx/ehci-imx25.c +++ b/arch/arm/mach-imx/ehci-imx25.c | |||
@@ -15,27 +15,23 @@ | |||
15 | 15 | ||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_data/usb-ehci-mxc.h> | ||
19 | 18 | ||
20 | #include "hardware.h" | 19 | #include <mach/hardware.h> |
20 | #include <mach/mxc_ehci.h> | ||
21 | 21 | ||
22 | #define USBCTRL_OTGBASE_OFFSET 0x600 | 22 | #define USBCTRL_OTGBASE_OFFSET 0x600 |
23 | 23 | ||
24 | #define MX25_OTG_SIC_SHIFT 29 | 24 | #define MX25_OTG_SIC_SHIFT 29 |
25 | #define MX25_OTG_SIC_MASK (0x3 << MX25_OTG_SIC_SHIFT) | 25 | #define MX25_OTG_SIC_MASK (0x3 << MX25_OTG_SIC_SHIFT) |
26 | #define MX25_OTG_PM_BIT (1 << 24) | 26 | #define MX25_OTG_PM_BIT (1 << 24) |
27 | #define MX25_OTG_PP_BIT (1 << 11) | ||
28 | #define MX25_OTG_OCPOL_BIT (1 << 3) | ||
29 | 27 | ||
30 | #define MX25_H1_SIC_SHIFT 21 | 28 | #define MX25_H1_SIC_SHIFT 21 |
31 | #define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT) | 29 | #define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT) |
32 | #define MX25_H1_PP_BIT (1 << 18) | 30 | #define MX25_H1_PM_BIT (1 << 8) |
33 | #define MX25_H1_PM_BIT (1 << 16) | ||
34 | #define MX25_H1_IPPUE_UP_BIT (1 << 7) | 31 | #define MX25_H1_IPPUE_UP_BIT (1 << 7) |
35 | #define MX25_H1_IPPUE_DOWN_BIT (1 << 6) | 32 | #define MX25_H1_IPPUE_DOWN_BIT (1 << 6) |
36 | #define MX25_H1_TLL_BIT (1 << 5) | 33 | #define MX25_H1_TLL_BIT (1 << 5) |
37 | #define MX25_H1_USBTE_BIT (1 << 4) | 34 | #define MX25_H1_USBTE_BIT (1 << 4) |
38 | #define MX25_H1_OCPOL_BIT (1 << 2) | ||
39 | 35 | ||
40 | int mx25_initialize_usb_hw(int port, unsigned int flags) | 36 | int mx25_initialize_usb_hw(int port, unsigned int flags) |
41 | { | 37 | { |
@@ -45,35 +41,21 @@ int mx25_initialize_usb_hw(int port, unsigned int flags) | |||
45 | 41 | ||
46 | switch (port) { | 42 | switch (port) { |
47 | case 0: /* OTG port */ | 43 | case 0: /* OTG port */ |
48 | v &= ~(MX25_OTG_SIC_MASK | MX25_OTG_PM_BIT | MX25_OTG_PP_BIT | | 44 | v &= ~(MX25_OTG_SIC_MASK | MX25_OTG_PM_BIT); |
49 | MX25_OTG_OCPOL_BIT); | ||
50 | v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX25_OTG_SIC_SHIFT; | 45 | v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX25_OTG_SIC_SHIFT; |
51 | 46 | ||
52 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | 47 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) |
53 | v |= MX25_OTG_PM_BIT; | 48 | v |= MX25_OTG_PM_BIT; |
54 | 49 | ||
55 | if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH) | ||
56 | v |= MX25_OTG_PP_BIT; | ||
57 | |||
58 | if (!(flags & MXC_EHCI_OC_PIN_ACTIVE_LOW)) | ||
59 | v |= MX25_OTG_OCPOL_BIT; | ||
60 | |||
61 | break; | 50 | break; |
62 | case 1: /* H1 port */ | 51 | case 1: /* H1 port */ |
63 | v &= ~(MX25_H1_SIC_MASK | MX25_H1_PM_BIT | MX25_H1_PP_BIT | | 52 | v &= ~(MX25_H1_SIC_MASK | MX25_H1_PM_BIT | MX25_H1_TLL_BIT | |
64 | MX25_H1_OCPOL_BIT | MX25_H1_TLL_BIT | MX25_H1_USBTE_BIT | | 53 | MX25_H1_USBTE_BIT | MX25_H1_IPPUE_DOWN_BIT | MX25_H1_IPPUE_UP_BIT); |
65 | MX25_H1_IPPUE_DOWN_BIT | MX25_H1_IPPUE_UP_BIT); | ||
66 | v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX25_H1_SIC_SHIFT; | 54 | v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX25_H1_SIC_SHIFT; |
67 | 55 | ||
68 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | 56 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) |
69 | v |= MX25_H1_PM_BIT; | 57 | v |= MX25_H1_PM_BIT; |
70 | 58 | ||
71 | if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH) | ||
72 | v |= MX25_H1_PP_BIT; | ||
73 | |||
74 | if (!(flags & MXC_EHCI_OC_PIN_ACTIVE_LOW)) | ||
75 | v |= MX25_H1_OCPOL_BIT; | ||
76 | |||
77 | if (!(flags & MXC_EHCI_TTL_ENABLED)) | 59 | if (!(flags & MXC_EHCI_TTL_ENABLED)) |
78 | v |= MX25_H1_TLL_BIT; | 60 | v |= MX25_H1_TLL_BIT; |
79 | 61 | ||
diff --git a/arch/arm/mach-imx/ehci-imx27.c b/arch/arm/mach-imx/ehci-imx27.c index 448d9115539..fa69419eabd 100644 --- a/arch/arm/mach-imx/ehci-imx27.c +++ b/arch/arm/mach-imx/ehci-imx27.c | |||
@@ -15,9 +15,9 @@ | |||
15 | 15 | ||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_data/usb-ehci-mxc.h> | ||
19 | 18 | ||
20 | #include "hardware.h" | 19 | #include <mach/hardware.h> |
20 | #include <mach/mxc_ehci.h> | ||
21 | 21 | ||
22 | #define USBCTRL_OTGBASE_OFFSET 0x600 | 22 | #define USBCTRL_OTGBASE_OFFSET 0x600 |
23 | 23 | ||
diff --git a/arch/arm/mach-imx/ehci-imx31.c b/arch/arm/mach-imx/ehci-imx31.c index 05de4e1e39d..faad0f15ac7 100644 --- a/arch/arm/mach-imx/ehci-imx31.c +++ b/arch/arm/mach-imx/ehci-imx31.c | |||
@@ -15,9 +15,9 @@ | |||
15 | 15 | ||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_data/usb-ehci-mxc.h> | ||
19 | 18 | ||
20 | #include "hardware.h" | 19 | #include <mach/hardware.h> |
20 | #include <mach/mxc_ehci.h> | ||
21 | 21 | ||
22 | #define USBCTRL_OTGBASE_OFFSET 0x600 | 22 | #define USBCTRL_OTGBASE_OFFSET 0x600 |
23 | 23 | ||
diff --git a/arch/arm/mach-imx/ehci-imx35.c b/arch/arm/mach-imx/ehci-imx35.c index 554e7cccff5..001ec3971f5 100644 --- a/arch/arm/mach-imx/ehci-imx35.c +++ b/arch/arm/mach-imx/ehci-imx35.c | |||
@@ -15,27 +15,23 @@ | |||
15 | 15 | ||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_data/usb-ehci-mxc.h> | ||
19 | 18 | ||
20 | #include "hardware.h" | 19 | #include <mach/hardware.h> |
20 | #include <mach/mxc_ehci.h> | ||
21 | 21 | ||
22 | #define USBCTRL_OTGBASE_OFFSET 0x600 | 22 | #define USBCTRL_OTGBASE_OFFSET 0x600 |
23 | 23 | ||
24 | #define MX35_OTG_SIC_SHIFT 29 | 24 | #define MX35_OTG_SIC_SHIFT 29 |
25 | #define MX35_OTG_SIC_MASK (0x3 << MX35_OTG_SIC_SHIFT) | 25 | #define MX35_OTG_SIC_MASK (0x3 << MX35_OTG_SIC_SHIFT) |
26 | #define MX35_OTG_PM_BIT (1 << 24) | 26 | #define MX35_OTG_PM_BIT (1 << 24) |
27 | #define MX35_OTG_PP_BIT (1 << 11) | ||
28 | #define MX35_OTG_OCPOL_BIT (1 << 3) | ||
29 | 27 | ||
30 | #define MX35_H1_SIC_SHIFT 21 | 28 | #define MX35_H1_SIC_SHIFT 21 |
31 | #define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT) | 29 | #define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT) |
32 | #define MX35_H1_PP_BIT (1 << 18) | 30 | #define MX35_H1_PM_BIT (1 << 8) |
33 | #define MX35_H1_PM_BIT (1 << 16) | ||
34 | #define MX35_H1_IPPUE_UP_BIT (1 << 7) | 31 | #define MX35_H1_IPPUE_UP_BIT (1 << 7) |
35 | #define MX35_H1_IPPUE_DOWN_BIT (1 << 6) | 32 | #define MX35_H1_IPPUE_DOWN_BIT (1 << 6) |
36 | #define MX35_H1_TLL_BIT (1 << 5) | 33 | #define MX35_H1_TLL_BIT (1 << 5) |
37 | #define MX35_H1_USBTE_BIT (1 << 4) | 34 | #define MX35_H1_USBTE_BIT (1 << 4) |
38 | #define MX35_H1_OCPOL_BIT (1 << 2) | ||
39 | 35 | ||
40 | int mx35_initialize_usb_hw(int port, unsigned int flags) | 36 | int mx35_initialize_usb_hw(int port, unsigned int flags) |
41 | { | 37 | { |
@@ -45,35 +41,21 @@ int mx35_initialize_usb_hw(int port, unsigned int flags) | |||
45 | 41 | ||
46 | switch (port) { | 42 | switch (port) { |
47 | case 0: /* OTG port */ | 43 | case 0: /* OTG port */ |
48 | v &= ~(MX35_OTG_SIC_MASK | MX35_OTG_PM_BIT | MX35_OTG_PP_BIT | | 44 | v &= ~(MX35_OTG_SIC_MASK | MX35_OTG_PM_BIT); |
49 | MX35_OTG_OCPOL_BIT); | ||
50 | v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX35_OTG_SIC_SHIFT; | 45 | v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX35_OTG_SIC_SHIFT; |
51 | 46 | ||
52 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | 47 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) |
53 | v |= MX35_OTG_PM_BIT; | 48 | v |= MX35_OTG_PM_BIT; |
54 | 49 | ||
55 | if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH) | ||
56 | v |= MX35_OTG_PP_BIT; | ||
57 | |||
58 | if (!(flags & MXC_EHCI_OC_PIN_ACTIVE_LOW)) | ||
59 | v |= MX35_OTG_OCPOL_BIT; | ||
60 | |||
61 | break; | 50 | break; |
62 | case 1: /* H1 port */ | 51 | case 1: /* H1 port */ |
63 | v &= ~(MX35_H1_SIC_MASK | MX35_H1_PM_BIT | MX35_H1_PP_BIT | | 52 | v &= ~(MX35_H1_SIC_MASK | MX35_H1_PM_BIT | MX35_H1_TLL_BIT | |
64 | MX35_H1_OCPOL_BIT | MX35_H1_TLL_BIT | MX35_H1_USBTE_BIT | | 53 | MX35_H1_USBTE_BIT | MX35_H1_IPPUE_DOWN_BIT | MX35_H1_IPPUE_UP_BIT); |
65 | MX35_H1_IPPUE_DOWN_BIT | MX35_H1_IPPUE_UP_BIT); | ||
66 | v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX35_H1_SIC_SHIFT; | 54 | v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX35_H1_SIC_SHIFT; |
67 | 55 | ||
68 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | 56 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) |
69 | v |= MX35_H1_PM_BIT; | 57 | v |= MX35_H1_PM_BIT; |
70 | 58 | ||
71 | if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH) | ||
72 | v |= MX35_H1_PP_BIT; | ||
73 | |||
74 | if (!(flags & MXC_EHCI_OC_PIN_ACTIVE_LOW)) | ||
75 | v |= MX35_H1_OCPOL_BIT; | ||
76 | |||
77 | if (!(flags & MXC_EHCI_TTL_ENABLED)) | 59 | if (!(flags & MXC_EHCI_TTL_ENABLED)) |
78 | v |= MX35_H1_TLL_BIT; | 60 | v |= MX35_H1_TLL_BIT; |
79 | 61 | ||
diff --git a/arch/arm/mach-imx/ehci-imx5.c b/arch/arm/mach-imx/ehci-imx5.c deleted file mode 100644 index e49710b10c6..00000000000 --- a/arch/arm/mach-imx/ehci-imx5.c +++ /dev/null | |||
@@ -1,171 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> | ||
3 | * Copyright (C) 2010 Freescale Semiconductor, Inc. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License as published by the | ||
7 | * Free Software Foundation; either version 2 of the License, or (at your | ||
8 | * option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
12 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
13 | * for more details. | ||
14 | */ | ||
15 | |||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/platform_data/usb-ehci-mxc.h> | ||
19 | |||
20 | #include "hardware.h" | ||
21 | |||
22 | #define MXC_OTG_OFFSET 0 | ||
23 | #define MXC_H1_OFFSET 0x200 | ||
24 | #define MXC_H2_OFFSET 0x400 | ||
25 | |||
26 | /* USB_CTRL */ | ||
27 | #define MXC_OTG_UCTRL_OWIE_BIT (1 << 27) /* OTG wakeup intr enable */ | ||
28 | #define MXC_OTG_UCTRL_OPM_BIT (1 << 24) /* OTG power mask */ | ||
29 | #define MXC_H1_UCTRL_H1UIE_BIT (1 << 12) /* Host1 ULPI interrupt enable */ | ||
30 | #define MXC_H1_UCTRL_H1WIE_BIT (1 << 11) /* HOST1 wakeup intr enable */ | ||
31 | #define MXC_H1_UCTRL_H1PM_BIT (1 << 8) /* HOST1 power mask */ | ||
32 | |||
33 | /* USB_PHY_CTRL_FUNC */ | ||
34 | #define MXC_OTG_PHYCTRL_OC_POL_BIT (1 << 9) /* OTG Polarity of Overcurrent */ | ||
35 | #define MXC_OTG_PHYCTRL_OC_DIS_BIT (1 << 8) /* OTG Disable Overcurrent Event */ | ||
36 | #define MXC_H1_OC_POL_BIT (1 << 6) /* UH1 Polarity of Overcurrent */ | ||
37 | #define MXC_H1_OC_DIS_BIT (1 << 5) /* UH1 Disable Overcurrent Event */ | ||
38 | #define MXC_OTG_PHYCTRL_PWR_POL_BIT (1 << 3) /* OTG Power Pin Polarity */ | ||
39 | |||
40 | /* USBH2CTRL */ | ||
41 | #define MXC_H2_UCTRL_H2UIE_BIT (1 << 8) | ||
42 | #define MXC_H2_UCTRL_H2WIE_BIT (1 << 7) | ||
43 | #define MXC_H2_UCTRL_H2PM_BIT (1 << 4) | ||
44 | |||
45 | #define MXC_USBCMD_OFFSET 0x140 | ||
46 | |||
47 | /* USBCMD */ | ||
48 | #define MXC_UCMD_ITC_NO_THRESHOLD_MASK (~(0xff << 16)) /* Interrupt Threshold Control */ | ||
49 | |||
50 | int mx51_initialize_usb_hw(int port, unsigned int flags) | ||
51 | { | ||
52 | unsigned int v; | ||
53 | void __iomem *usb_base; | ||
54 | void __iomem *usbotg_base; | ||
55 | void __iomem *usbother_base; | ||
56 | int ret = 0; | ||
57 | |||
58 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); | ||
59 | if (!usb_base) { | ||
60 | printk(KERN_ERR "%s(): ioremap failed\n", __func__); | ||
61 | return -ENOMEM; | ||
62 | } | ||
63 | |||
64 | switch (port) { | ||
65 | case 0: /* OTG port */ | ||
66 | usbotg_base = usb_base + MXC_OTG_OFFSET; | ||
67 | break; | ||
68 | case 1: /* Host 1 port */ | ||
69 | usbotg_base = usb_base + MXC_H1_OFFSET; | ||
70 | break; | ||
71 | case 2: /* Host 2 port */ | ||
72 | usbotg_base = usb_base + MXC_H2_OFFSET; | ||
73 | break; | ||
74 | default: | ||
75 | printk(KERN_ERR"%s no such port %d\n", __func__, port); | ||
76 | ret = -ENOENT; | ||
77 | goto error; | ||
78 | } | ||
79 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | ||
80 | |||
81 | switch (port) { | ||
82 | case 0: /*OTG port */ | ||
83 | if (flags & MXC_EHCI_INTERNAL_PHY) { | ||
84 | v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET); | ||
85 | |||
86 | if (flags & MXC_EHCI_OC_PIN_ACTIVE_LOW) | ||
87 | v |= MXC_OTG_PHYCTRL_OC_POL_BIT; | ||
88 | else | ||
89 | v &= ~MXC_OTG_PHYCTRL_OC_POL_BIT; | ||
90 | if (flags & MXC_EHCI_POWER_PINS_ENABLED) { | ||
91 | /* OC/USBPWR is used */ | ||
92 | v &= ~MXC_OTG_PHYCTRL_OC_DIS_BIT; | ||
93 | } else { | ||
94 | /* OC/USBPWR is not used */ | ||
95 | v |= MXC_OTG_PHYCTRL_OC_DIS_BIT; | ||
96 | } | ||
97 | if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH) | ||
98 | v |= MXC_OTG_PHYCTRL_PWR_POL_BIT; | ||
99 | else | ||
100 | v &= ~MXC_OTG_PHYCTRL_PWR_POL_BIT; | ||
101 | __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET); | ||
102 | |||
103 | v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET); | ||
104 | if (flags & MXC_EHCI_WAKEUP_ENABLED) | ||
105 | v |= MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup enable */ | ||
106 | else | ||
107 | v &= ~MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup disable */ | ||
108 | if (flags & MXC_EHCI_POWER_PINS_ENABLED) | ||
109 | v &= ~MXC_OTG_UCTRL_OPM_BIT; | ||
110 | else | ||
111 | v |= MXC_OTG_UCTRL_OPM_BIT; | ||
112 | __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET); | ||
113 | } | ||
114 | break; | ||
115 | case 1: /* Host 1 */ | ||
116 | /*Host ULPI */ | ||
117 | v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET); | ||
118 | if (flags & MXC_EHCI_WAKEUP_ENABLED) { | ||
119 | /* HOST1 wakeup/ULPI intr enable */ | ||
120 | v |= (MXC_H1_UCTRL_H1WIE_BIT | MXC_H1_UCTRL_H1UIE_BIT); | ||
121 | } else { | ||
122 | /* HOST1 wakeup/ULPI intr disable */ | ||
123 | v &= ~(MXC_H1_UCTRL_H1WIE_BIT | MXC_H1_UCTRL_H1UIE_BIT); | ||
124 | } | ||
125 | |||
126 | if (flags & MXC_EHCI_POWER_PINS_ENABLED) | ||
127 | v &= ~MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask unused*/ | ||
128 | else | ||
129 | v |= MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/ | ||
130 | __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET); | ||
131 | |||
132 | v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET); | ||
133 | if (flags & MXC_EHCI_OC_PIN_ACTIVE_LOW) | ||
134 | v |= MXC_H1_OC_POL_BIT; | ||
135 | else | ||
136 | v &= ~MXC_H1_OC_POL_BIT; | ||
137 | if (flags & MXC_EHCI_POWER_PINS_ENABLED) | ||
138 | v &= ~MXC_H1_OC_DIS_BIT; /* OC is used */ | ||
139 | else | ||
140 | v |= MXC_H1_OC_DIS_BIT; /* OC is not used */ | ||
141 | __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET); | ||
142 | |||
143 | v = __raw_readl(usbotg_base + MXC_USBCMD_OFFSET); | ||
144 | if (flags & MXC_EHCI_ITC_NO_THRESHOLD) | ||
145 | /* Interrupt Threshold Control:Immediate (no threshold) */ | ||
146 | v &= MXC_UCMD_ITC_NO_THRESHOLD_MASK; | ||
147 | __raw_writel(v, usbotg_base + MXC_USBCMD_OFFSET); | ||
148 | break; | ||
149 | case 2: /* Host 2 ULPI */ | ||
150 | v = __raw_readl(usbother_base + MXC_USBH2CTRL_OFFSET); | ||
151 | if (flags & MXC_EHCI_WAKEUP_ENABLED) { | ||
152 | /* HOST1 wakeup/ULPI intr enable */ | ||
153 | v |= (MXC_H2_UCTRL_H2WIE_BIT | MXC_H2_UCTRL_H2UIE_BIT); | ||
154 | } else { | ||
155 | /* HOST1 wakeup/ULPI intr disable */ | ||
156 | v &= ~(MXC_H2_UCTRL_H2WIE_BIT | MXC_H2_UCTRL_H2UIE_BIT); | ||
157 | } | ||
158 | |||
159 | if (flags & MXC_EHCI_POWER_PINS_ENABLED) | ||
160 | v &= ~MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask unused*/ | ||
161 | else | ||
162 | v |= MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask used*/ | ||
163 | __raw_writel(v, usbother_base + MXC_USBH2CTRL_OFFSET); | ||
164 | break; | ||
165 | } | ||
166 | |||
167 | error: | ||
168 | iounmap(usb_base); | ||
169 | return ret; | ||
170 | } | ||
171 | |||
diff --git a/arch/arm/mach-imx/epit.c b/arch/arm/mach-imx/epit.c deleted file mode 100644 index 04a5961beea..00000000000 --- a/arch/arm/mach-imx/epit.c +++ /dev/null | |||
@@ -1,234 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/plat-mxc/epit.c | ||
3 | * | ||
4 | * Copyright (C) 2010 Sascha Hauer <s.hauer@pengutronix.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version 2 | ||
9 | * of the License, or (at your option) any later version. | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
18 | * MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #define EPITCR 0x00 | ||
22 | #define EPITSR 0x04 | ||
23 | #define EPITLR 0x08 | ||
24 | #define EPITCMPR 0x0c | ||
25 | #define EPITCNR 0x10 | ||
26 | |||
27 | #define EPITCR_EN (1 << 0) | ||
28 | #define EPITCR_ENMOD (1 << 1) | ||
29 | #define EPITCR_OCIEN (1 << 2) | ||
30 | #define EPITCR_RLD (1 << 3) | ||
31 | #define EPITCR_PRESC(x) (((x) & 0xfff) << 4) | ||
32 | #define EPITCR_SWR (1 << 16) | ||
33 | #define EPITCR_IOVW (1 << 17) | ||
34 | #define EPITCR_DBGEN (1 << 18) | ||
35 | #define EPITCR_WAITEN (1 << 19) | ||
36 | #define EPITCR_RES (1 << 20) | ||
37 | #define EPITCR_STOPEN (1 << 21) | ||
38 | #define EPITCR_OM_DISCON (0 << 22) | ||
39 | #define EPITCR_OM_TOGGLE (1 << 22) | ||
40 | #define EPITCR_OM_CLEAR (2 << 22) | ||
41 | #define EPITCR_OM_SET (3 << 22) | ||
42 | #define EPITCR_CLKSRC_OFF (0 << 24) | ||
43 | #define EPITCR_CLKSRC_PERIPHERAL (1 << 24) | ||
44 | #define EPITCR_CLKSRC_REF_HIGH (1 << 24) | ||
45 | #define EPITCR_CLKSRC_REF_LOW (3 << 24) | ||
46 | |||
47 | #define EPITSR_OCIF (1 << 0) | ||
48 | |||
49 | #include <linux/interrupt.h> | ||
50 | #include <linux/irq.h> | ||
51 | #include <linux/clockchips.h> | ||
52 | #include <linux/clk.h> | ||
53 | #include <linux/err.h> | ||
54 | #include <asm/mach/time.h> | ||
55 | |||
56 | #include "common.h" | ||
57 | #include "hardware.h" | ||
58 | |||
59 | static struct clock_event_device clockevent_epit; | ||
60 | static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; | ||
61 | |||
62 | static void __iomem *timer_base; | ||
63 | |||
64 | static inline void epit_irq_disable(void) | ||
65 | { | ||
66 | u32 val; | ||
67 | |||
68 | val = __raw_readl(timer_base + EPITCR); | ||
69 | val &= ~EPITCR_OCIEN; | ||
70 | __raw_writel(val, timer_base + EPITCR); | ||
71 | } | ||
72 | |||
73 | static inline void epit_irq_enable(void) | ||
74 | { | ||
75 | u32 val; | ||
76 | |||
77 | val = __raw_readl(timer_base + EPITCR); | ||
78 | val |= EPITCR_OCIEN; | ||
79 | __raw_writel(val, timer_base + EPITCR); | ||
80 | } | ||
81 | |||
82 | static void epit_irq_acknowledge(void) | ||
83 | { | ||
84 | __raw_writel(EPITSR_OCIF, timer_base + EPITSR); | ||
85 | } | ||
86 | |||
87 | static int __init epit_clocksource_init(struct clk *timer_clk) | ||
88 | { | ||
89 | unsigned int c = clk_get_rate(timer_clk); | ||
90 | |||
91 | return clocksource_mmio_init(timer_base + EPITCNR, "epit", c, 200, 32, | ||
92 | clocksource_mmio_readl_down); | ||
93 | } | ||
94 | |||
95 | /* clock event */ | ||
96 | |||
97 | static int epit_set_next_event(unsigned long evt, | ||
98 | struct clock_event_device *unused) | ||
99 | { | ||
100 | unsigned long tcmp; | ||
101 | |||
102 | tcmp = __raw_readl(timer_base + EPITCNR); | ||
103 | |||
104 | __raw_writel(tcmp - evt, timer_base + EPITCMPR); | ||
105 | |||
106 | return 0; | ||
107 | } | ||
108 | |||
109 | static void epit_set_mode(enum clock_event_mode mode, | ||
110 | struct clock_event_device *evt) | ||
111 | { | ||
112 | unsigned long flags; | ||
113 | |||
114 | /* | ||
115 | * The timer interrupt generation is disabled at least | ||
116 | * for enough time to call epit_set_next_event() | ||
117 | */ | ||
118 | local_irq_save(flags); | ||
119 | |||
120 | /* Disable interrupt in GPT module */ | ||
121 | epit_irq_disable(); | ||
122 | |||
123 | if (mode != clockevent_mode) { | ||
124 | /* Set event time into far-far future */ | ||
125 | |||
126 | /* Clear pending interrupt */ | ||
127 | epit_irq_acknowledge(); | ||
128 | } | ||
129 | |||
130 | /* Remember timer mode */ | ||
131 | clockevent_mode = mode; | ||
132 | local_irq_restore(flags); | ||
133 | |||
134 | switch (mode) { | ||
135 | case CLOCK_EVT_MODE_PERIODIC: | ||
136 | printk(KERN_ERR "epit_set_mode: Periodic mode is not " | ||
137 | "supported for i.MX EPIT\n"); | ||
138 | break; | ||
139 | case CLOCK_EVT_MODE_ONESHOT: | ||
140 | /* | ||
141 | * Do not put overhead of interrupt enable/disable into | ||
142 | * epit_set_next_event(), the core has about 4 minutes | ||
143 | * to call epit_set_next_event() or shutdown clock after | ||
144 | * mode switching | ||
145 | */ | ||
146 | local_irq_save(flags); | ||
147 | epit_irq_enable(); | ||
148 | local_irq_restore(flags); | ||
149 | break; | ||
150 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
151 | case CLOCK_EVT_MODE_UNUSED: | ||
152 | case CLOCK_EVT_MODE_RESUME: | ||
153 | /* Left event sources disabled, no more interrupts appear */ | ||
154 | break; | ||
155 | } | ||
156 | } | ||
157 | |||
158 | /* | ||
159 | * IRQ handler for the timer | ||
160 | */ | ||
161 | static irqreturn_t epit_timer_interrupt(int irq, void *dev_id) | ||
162 | { | ||
163 | struct clock_event_device *evt = &clockevent_epit; | ||
164 | |||
165 | epit_irq_acknowledge(); | ||
166 | |||
167 | evt->event_handler(evt); | ||
168 | |||
169 | return IRQ_HANDLED; | ||
170 | } | ||
171 | |||
172 | static struct irqaction epit_timer_irq = { | ||
173 | .name = "i.MX EPIT Timer Tick", | ||
174 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
175 | .handler = epit_timer_interrupt, | ||
176 | }; | ||
177 | |||
178 | static struct clock_event_device clockevent_epit = { | ||
179 | .name = "epit", | ||
180 | .features = CLOCK_EVT_FEAT_ONESHOT, | ||
181 | .shift = 32, | ||
182 | .set_mode = epit_set_mode, | ||
183 | .set_next_event = epit_set_next_event, | ||
184 | .rating = 200, | ||
185 | }; | ||
186 | |||
187 | static int __init epit_clockevent_init(struct clk *timer_clk) | ||
188 | { | ||
189 | unsigned int c = clk_get_rate(timer_clk); | ||
190 | |||
191 | clockevent_epit.mult = div_sc(c, NSEC_PER_SEC, | ||
192 | clockevent_epit.shift); | ||
193 | clockevent_epit.max_delta_ns = | ||
194 | clockevent_delta2ns(0xfffffffe, &clockevent_epit); | ||
195 | clockevent_epit.min_delta_ns = | ||
196 | clockevent_delta2ns(0x800, &clockevent_epit); | ||
197 | |||
198 | clockevent_epit.cpumask = cpumask_of(0); | ||
199 | |||
200 | clockevents_register_device(&clockevent_epit); | ||
201 | |||
202 | return 0; | ||
203 | } | ||
204 | |||
205 | void __init epit_timer_init(void __iomem *base, int irq) | ||
206 | { | ||
207 | struct clk *timer_clk; | ||
208 | |||
209 | timer_clk = clk_get_sys("imx-epit.0", NULL); | ||
210 | if (IS_ERR(timer_clk)) { | ||
211 | pr_err("i.MX epit: unable to get clk\n"); | ||
212 | return; | ||
213 | } | ||
214 | |||
215 | clk_prepare_enable(timer_clk); | ||
216 | |||
217 | timer_base = base; | ||
218 | |||
219 | /* | ||
220 | * Initialise to a known state (all timers off, and timing reset) | ||
221 | */ | ||
222 | __raw_writel(0x0, timer_base + EPITCR); | ||
223 | |||
224 | __raw_writel(0xffffffff, timer_base + EPITLR); | ||
225 | __raw_writel(EPITCR_EN | EPITCR_CLKSRC_REF_HIGH | EPITCR_WAITEN, | ||
226 | timer_base + EPITCR); | ||
227 | |||
228 | /* init and register the timer to the framework */ | ||
229 | epit_clocksource_init(timer_clk); | ||
230 | epit_clockevent_init(timer_clk); | ||
231 | |||
232 | /* Make irqs happen */ | ||
233 | setup_irq(irq, &epit_timer_irq); | ||
234 | } | ||
diff --git a/arch/arm/mach-imx/eukrea-baseboards.h b/arch/arm/mach-imx/eukrea-baseboards.h deleted file mode 100644 index a21d3313f99..00000000000 --- a/arch/arm/mach-imx/eukrea-baseboards.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Eric Benard - eric@eukrea.com | ||
3 | * | ||
4 | * Based on board-pcm038.h which is : | ||
5 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version 2 | ||
10 | * of the License, or (at your option) any later version. | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
19 | * MA 02110-1301, USA. | ||
20 | */ | ||
21 | |||
22 | #ifndef __MACH_EUKREA_BASEBOARDS_H__ | ||
23 | #define __MACH_EUKREA_BASEBOARDS_H__ | ||
24 | |||
25 | #ifndef __ASSEMBLY__ | ||
26 | /* | ||
27 | * This CPU module needs a baseboard to work. After basic initializing | ||
28 | * its own devices, it calls baseboard's init function. | ||
29 | * TODO: Add your own baseboard init function and call it from | ||
30 | * inside eukrea_cpuimx25_init() eukrea_cpuimx27_init() | ||
31 | * eukrea_cpuimx35_init() eukrea_cpuimx51_init() | ||
32 | * or eukrea_cpuimx51sd_init(). | ||
33 | * | ||
34 | * This example here is for the development board. Refer | ||
35 | * mach-mx25/eukrea_mbimxsd-baseboard.c for cpuimx25 | ||
36 | * mach-imx/eukrea_mbimx27-baseboard.c for cpuimx27 | ||
37 | * mach-mx3/eukrea_mbimxsd-baseboard.c for cpuimx35 | ||
38 | * mach-mx5/eukrea_mbimx51-baseboard.c for cpuimx51 | ||
39 | * mach-mx5/eukrea_mbimxsd-baseboard.c for cpuimx51sd | ||
40 | */ | ||
41 | |||
42 | extern void eukrea_mbimxsd25_baseboard_init(void); | ||
43 | extern void eukrea_mbimx27_baseboard_init(void); | ||
44 | extern void eukrea_mbimxsd35_baseboard_init(void); | ||
45 | extern void eukrea_mbimx51_baseboard_init(void); | ||
46 | extern void eukrea_mbimxsd51_baseboard_init(void); | ||
47 | |||
48 | #endif | ||
49 | |||
50 | #endif /* __MACH_EUKREA_BASEBOARDS_H__ */ | ||
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index b4c70028d35..5db3e1463af 100644 --- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | |||
@@ -29,10 +29,12 @@ | |||
29 | 29 | ||
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | 31 | ||
32 | #include "common.h" | 32 | #include <mach/common.h> |
33 | #include <mach/iomux-mx27.h> | ||
34 | #include <mach/hardware.h> | ||
35 | #include <mach/audmux.h> | ||
36 | |||
33 | #include "devices-imx27.h" | 37 | #include "devices-imx27.h" |
34 | #include "hardware.h" | ||
35 | #include "iomux-mx27.h" | ||
36 | 38 | ||
37 | static const int eukrea_mbimx27_pins[] __initconst = { | 39 | static const int eukrea_mbimx27_pins[] __initconst = { |
38 | /* UART2 */ | 40 | /* UART2 */ |
@@ -242,7 +244,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
242 | static void __maybe_unused ads7846_dev_init(void) | 244 | static void __maybe_unused ads7846_dev_init(void) |
243 | { | 245 | { |
244 | if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) { | 246 | if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) { |
245 | printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); | 247 | printk(KERN_ERR "can't get ads746 pen down GPIO\n"); |
246 | return; | 248 | return; |
247 | } | 249 | } |
248 | gpio_direction_input(ADS7846_PENDOWN); | 250 | gpio_direction_input(ADS7846_PENDOWN); |
@@ -265,7 +267,7 @@ static struct spi_board_info __maybe_unused | |||
265 | .bus_num = 0, | 267 | .bus_num = 0, |
266 | .chip_select = 0, | 268 | .chip_select = 0, |
267 | .max_speed_hz = 1500000, | 269 | .max_speed_hz = 1500000, |
268 | /* irq number is run-time assigned */ | 270 | .irq = IRQ_GPIOD(25), |
269 | .platform_data = &ads7846_config, | 271 | .platform_data = &ads7846_config, |
270 | .mode = SPI_MODE_2, | 272 | .mode = SPI_MODE_2, |
271 | }, | 273 | }, |
@@ -304,6 +306,25 @@ void __init eukrea_mbimx27_baseboard_init(void) | |||
304 | mxc_gpio_setup_multiple_pins(eukrea_mbimx27_pins, | 306 | mxc_gpio_setup_multiple_pins(eukrea_mbimx27_pins, |
305 | ARRAY_SIZE(eukrea_mbimx27_pins), "MBIMX27"); | 307 | ARRAY_SIZE(eukrea_mbimx27_pins), "MBIMX27"); |
306 | 308 | ||
309 | #if defined(CONFIG_SND_SOC_EUKREA_TLV320) \ | ||
310 | || defined(CONFIG_SND_SOC_EUKREA_TLV320_MODULE) | ||
311 | /* SSI unit master I2S codec connected to SSI_PINS_4*/ | ||
312 | mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, | ||
313 | MXC_AUDMUX_V1_PCR_SYN | | ||
314 | MXC_AUDMUX_V1_PCR_TFSDIR | | ||
315 | MXC_AUDMUX_V1_PCR_TCLKDIR | | ||
316 | MXC_AUDMUX_V1_PCR_RFSDIR | | ||
317 | MXC_AUDMUX_V1_PCR_RCLKDIR | | ||
318 | MXC_AUDMUX_V1_PCR_TFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) | | ||
319 | MXC_AUDMUX_V1_PCR_RFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) | | ||
320 | MXC_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) | ||
321 | ); | ||
322 | mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR3_SSI_PINS_4, | ||
323 | MXC_AUDMUX_V1_PCR_SYN | | ||
324 | MXC_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR1_SSI0) | ||
325 | ); | ||
326 | #endif | ||
327 | |||
307 | imx27_add_imx_uart1(&uart_pdata); | 328 | imx27_add_imx_uart1(&uart_pdata); |
308 | imx27_add_imx_uart2(&uart_pdata); | 329 | imx27_add_imx_uart2(&uart_pdata); |
309 | #if !defined(MACH_EUKREA_CPUIMX27_USEUART4) | 330 | #if !defined(MACH_EUKREA_CPUIMX27_USEUART4) |
@@ -328,7 +349,6 @@ void __init eukrea_mbimx27_baseboard_init(void) | |||
328 | /* SPI_CS0 init */ | 349 | /* SPI_CS0 init */ |
329 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); | 350 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); |
330 | imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data); | 351 | imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data); |
331 | eukrea_mbimx27_spi_board_info[0].irq = gpio_to_irq(IMX_GPIO_NR(4, 25)); | ||
332 | spi_register_board_info(eukrea_mbimx27_spi_board_info, | 352 | spi_register_board_info(eukrea_mbimx27_spi_board_info, |
333 | ARRAY_SIZE(eukrea_mbimx27_spi_board_info)); | 353 | ARRAY_SIZE(eukrea_mbimx27_spi_board_info)); |
334 | 354 | ||
@@ -347,5 +367,4 @@ void __init eukrea_mbimx27_baseboard_init(void) | |||
347 | imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data); | 367 | imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data); |
348 | 368 | ||
349 | gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info); | 369 | gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info); |
350 | imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0); | ||
351 | } | 370 | } |
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c index e2b70f4c1a2..66e8726253f 100644 --- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c | |||
@@ -23,17 +23,17 @@ | |||
23 | #include <linux/leds.h> | 23 | #include <linux/leds.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/spi/spi.h> | ||
27 | #include <video/platform_lcd.h> | 26 | #include <video/platform_lcd.h> |
28 | 27 | ||
28 | #include <mach/hardware.h> | ||
29 | #include <mach/iomux-mx25.h> | ||
30 | #include <mach/common.h> | ||
29 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
33 | #include <mach/mx25.h> | ||
34 | #include <mach/audmux.h> | ||
31 | 35 | ||
32 | #include "common.h" | ||
33 | #include "devices-imx25.h" | 36 | #include "devices-imx25.h" |
34 | #include "hardware.h" | ||
35 | #include "iomux-mx25.h" | ||
36 | #include "mx25.h" | ||
37 | 37 | ||
38 | static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { | 38 | static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { |
39 | /* LCD */ | 39 | /* LCD */ |
@@ -88,22 +88,12 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { | |||
88 | /* CAN */ | 88 | /* CAN */ |
89 | MX25_PAD_GPIO_D__CAN2_RX, | 89 | MX25_PAD_GPIO_D__CAN2_RX, |
90 | MX25_PAD_GPIO_C__CAN2_TX, | 90 | MX25_PAD_GPIO_C__CAN2_TX, |
91 | /* SPI1 */ | ||
92 | MX25_PAD_CSPI1_MOSI__CSPI1_MOSI, | ||
93 | MX25_PAD_CSPI1_MISO__CSPI1_MISO, | ||
94 | MX25_PAD_CSPI1_SS0__GPIO_1_16, | ||
95 | MX25_PAD_CSPI1_SS1__GPIO_1_17, | ||
96 | MX25_PAD_CSPI1_SCLK__CSPI1_SCLK, | ||
97 | MX25_PAD_CSPI1_RDY__GPIO_2_22, | ||
98 | }; | 91 | }; |
99 | 92 | ||
100 | #define GPIO_LED1 IMX_GPIO_NR(3, 19) | 93 | #define GPIO_LED1 83 |
101 | #define GPIO_SWITCH1 IMX_GPIO_NR(3, 18) | 94 | #define GPIO_SWITCH1 82 |
102 | #define GPIO_SD1CD IMX_GPIO_NR(2, 20) | 95 | #define GPIO_SD1CD 52 |
103 | #define GPIO_LCDPWR IMX_GPIO_NR(1, 26) | 96 | #define GPIO_LCDPWR 26 |
104 | #define GPIO_SPI1_SS0 IMX_GPIO_NR(1, 16) | ||
105 | #define GPIO_SPI1_SS1 IMX_GPIO_NR(1, 17) | ||
106 | #define GPIO_SPI1_IRQ IMX_GPIO_NR(2, 22) | ||
107 | 97 | ||
108 | static struct imx_fb_videomode eukrea_mximxsd_modes[] = { | 98 | static struct imx_fb_videomode eukrea_mximxsd_modes[] = { |
109 | { | 99 | { |
@@ -239,30 +229,6 @@ static struct esdhc_platform_data sd1_pdata = { | |||
239 | .wp_type = ESDHC_WP_NONE, | 229 | .wp_type = ESDHC_WP_NONE, |
240 | }; | 230 | }; |
241 | 231 | ||
242 | static struct spi_board_info eukrea_mbimxsd25_spi_board_info[] __initdata = { | ||
243 | { | ||
244 | .modalias = "spidev", | ||
245 | .max_speed_hz = 20000000, | ||
246 | .bus_num = 0, | ||
247 | .chip_select = 0, | ||
248 | .mode = SPI_MODE_0, | ||
249 | }, | ||
250 | { | ||
251 | .modalias = "spidev", | ||
252 | .max_speed_hz = 20000000, | ||
253 | .bus_num = 0, | ||
254 | .chip_select = 1, | ||
255 | .mode = SPI_MODE_0, | ||
256 | }, | ||
257 | }; | ||
258 | |||
259 | static int eukrea_mbimxsd25_spi_cs[] = {GPIO_SPI1_SS0, GPIO_SPI1_SS1}; | ||
260 | |||
261 | static const struct spi_imx_master eukrea_mbimxsd25_spi0_data __initconst = { | ||
262 | .chipselect = eukrea_mbimxsd25_spi_cs, | ||
263 | .num_chipselect = ARRAY_SIZE(eukrea_mbimxsd25_spi_cs), | ||
264 | }; | ||
265 | |||
266 | /* | 232 | /* |
267 | * system init for baseboard usage. Will be called by cpuimx25 init. | 233 | * system init for baseboard usage. Will be called by cpuimx25 init. |
268 | * | 234 | * |
@@ -275,6 +241,22 @@ void __init eukrea_mbimxsd25_baseboard_init(void) | |||
275 | ARRAY_SIZE(eukrea_mbimxsd_pads))) | 241 | ARRAY_SIZE(eukrea_mbimxsd_pads))) |
276 | printk(KERN_ERR "error setting mbimxsd pads !\n"); | 242 | printk(KERN_ERR "error setting mbimxsd pads !\n"); |
277 | 243 | ||
244 | #if defined(CONFIG_SND_SOC_EUKREA_TLV320) | ||
245 | /* SSI unit master I2S codec connected to SSI_AUD5*/ | ||
246 | mxc_audmux_v2_configure_port(0, | ||
247 | MXC_AUDMUX_V2_PTCR_SYN | | ||
248 | MXC_AUDMUX_V2_PTCR_TFSDIR | | ||
249 | MXC_AUDMUX_V2_PTCR_TFSEL(4) | | ||
250 | MXC_AUDMUX_V2_PTCR_TCLKDIR | | ||
251 | MXC_AUDMUX_V2_PTCR_TCSEL(4), | ||
252 | MXC_AUDMUX_V2_PDCR_RXDSEL(4) | ||
253 | ); | ||
254 | mxc_audmux_v2_configure_port(4, | ||
255 | MXC_AUDMUX_V2_PTCR_SYN, | ||
256 | MXC_AUDMUX_V2_PDCR_RXDSEL(0) | ||
257 | ); | ||
258 | #endif | ||
259 | |||
278 | imx25_add_imx_uart1(&uart_pdata); | 260 | imx25_add_imx_uart1(&uart_pdata); |
279 | imx25_add_imx_fb(&eukrea_mximxsd_fb_pdata); | 261 | imx25_add_imx_fb(&eukrea_mximxsd_fb_pdata); |
280 | imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); | 262 | imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); |
@@ -292,19 +274,12 @@ void __init eukrea_mbimxsd25_baseboard_init(void) | |||
292 | 274 | ||
293 | gpio_request(GPIO_LCDPWR, "LCDPWR"); | 275 | gpio_request(GPIO_LCDPWR, "LCDPWR"); |
294 | gpio_direction_output(GPIO_LCDPWR, 1); | 276 | gpio_direction_output(GPIO_LCDPWR, 1); |
277 | gpio_free(GPIO_SWITCH1); | ||
295 | 278 | ||
296 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, | 279 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, |
297 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | 280 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); |
298 | 281 | ||
299 | gpio_request(GPIO_SPI1_IRQ, "SPI1_IRQ"); | ||
300 | gpio_direction_input(GPIO_SPI1_IRQ); | ||
301 | gpio_free(GPIO_SPI1_IRQ); | ||
302 | imx25_add_spi_imx0(&eukrea_mbimxsd25_spi0_data); | ||
303 | spi_register_board_info(eukrea_mbimxsd25_spi_board_info, | ||
304 | ARRAY_SIZE(eukrea_mbimxsd25_spi_board_info)); | ||
305 | |||
306 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 282 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
307 | gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); | 283 | gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); |
308 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); | 284 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); |
309 | imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0); | ||
310 | } | 285 | } |
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c index 5a2d5ef12dd..0f0af02b318 100644 --- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/leds.h> | 27 | #include <linux/leds.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/input.h> | 29 | #include <linux/input.h> |
30 | #include <linux/spi/spi.h> | ||
31 | #include <video/platform_lcd.h> | 30 | #include <video/platform_lcd.h> |
32 | #include <linux/i2c.h> | 31 | #include <linux/i2c.h> |
33 | 32 | ||
@@ -36,10 +35,12 @@ | |||
36 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
37 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
38 | 37 | ||
39 | #include "common.h" | 38 | #include <mach/hardware.h> |
39 | #include <mach/common.h> | ||
40 | #include <mach/iomux-mx35.h> | ||
41 | #include <mach/audmux.h> | ||
42 | |||
40 | #include "devices-imx35.h" | 43 | #include "devices-imx35.h" |
41 | #include "hardware.h" | ||
42 | #include "iomux-mx35.h" | ||
43 | 44 | ||
44 | static const struct fb_videomode fb_modedb[] = { | 45 | static const struct fb_videomode fb_modedb[] = { |
45 | { | 46 | { |
@@ -94,6 +95,10 @@ static const struct fb_videomode fb_modedb[] = { | |||
94 | }, | 95 | }, |
95 | }; | 96 | }; |
96 | 97 | ||
98 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
99 | .irq_base = MXC_IPU_IRQ_START, | ||
100 | }; | ||
101 | |||
97 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | 102 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
98 | .name = "CMO-QVGA", | 103 | .name = "CMO-QVGA", |
99 | .mode = fb_modedb, | 104 | .mode = fb_modedb, |
@@ -154,22 +159,12 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { | |||
154 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, | 159 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, |
155 | /* SD1 CD */ | 160 | /* SD1 CD */ |
156 | MX35_PAD_LD18__GPIO3_24, | 161 | MX35_PAD_LD18__GPIO3_24, |
157 | /* SPI */ | ||
158 | MX35_PAD_CSPI1_MOSI__CSPI1_MOSI, | ||
159 | MX35_PAD_CSPI1_MISO__CSPI1_MISO, | ||
160 | MX35_PAD_CSPI1_SS0__GPIO1_18, | ||
161 | MX35_PAD_CSPI1_SS1__GPIO1_19, | ||
162 | MX35_PAD_CSPI1_SCLK__CSPI1_SCLK, | ||
163 | MX35_PAD_CSPI1_SPI_RDY__GPIO3_5, | ||
164 | }; | 162 | }; |
165 | 163 | ||
166 | #define GPIO_LED1 IMX_GPIO_NR(3, 29) | 164 | #define GPIO_LED1 IMX_GPIO_NR(3, 29) |
167 | #define GPIO_SWITCH1 IMX_GPIO_NR(3, 25) | 165 | #define GPIO_SWITCH1 IMX_GPIO_NR(3, 25) |
168 | #define GPIO_LCDPWR IMX_GPIO_NR(1, 4) | 166 | #define GPIO_LCDPWR IMX_GPIO_NR(1, 4) |
169 | #define GPIO_SD1CD IMX_GPIO_NR(3, 24) | 167 | #define GPIO_SD1CD IMX_GPIO_NR(3, 24) |
170 | #define GPIO_SPI1_SS0 IMX_GPIO_NR(1, 18) | ||
171 | #define GPIO_SPI1_SS1 IMX_GPIO_NR(1, 19) | ||
172 | #define GPIO_SPI1_IRQ IMX_GPIO_NR(3, 5) | ||
173 | 168 | ||
174 | static void eukrea_mbimxsd_lcd_power_set(struct plat_lcd_data *pd, | 169 | static void eukrea_mbimxsd_lcd_power_set(struct plat_lcd_data *pd, |
175 | unsigned int power) | 170 | unsigned int power) |
@@ -245,30 +240,6 @@ static struct esdhc_platform_data sd1_pdata = { | |||
245 | .wp_type = ESDHC_WP_NONE, | 240 | .wp_type = ESDHC_WP_NONE, |
246 | }; | 241 | }; |
247 | 242 | ||
248 | static struct spi_board_info eukrea_mbimxsd35_spi_board_info[] __initdata = { | ||
249 | { | ||
250 | .modalias = "spidev", | ||
251 | .max_speed_hz = 20000000, | ||
252 | .bus_num = 0, | ||
253 | .chip_select = 0, | ||
254 | .mode = SPI_MODE_0, | ||
255 | }, | ||
256 | { | ||
257 | .modalias = "spidev", | ||
258 | .max_speed_hz = 20000000, | ||
259 | .bus_num = 0, | ||
260 | .chip_select = 1, | ||
261 | .mode = SPI_MODE_0, | ||
262 | }, | ||
263 | }; | ||
264 | |||
265 | static int eukrea_mbimxsd35_spi_cs[] = {GPIO_SPI1_SS0, GPIO_SPI1_SS1}; | ||
266 | |||
267 | static const struct spi_imx_master eukrea_mbimxsd35_spi0_data __initconst = { | ||
268 | .chipselect = eukrea_mbimxsd35_spi_cs, | ||
269 | .num_chipselect = ARRAY_SIZE(eukrea_mbimxsd35_spi_cs), | ||
270 | }; | ||
271 | |||
272 | /* | 243 | /* |
273 | * system init for baseboard usage. Will be called by cpuimx35 init. | 244 | * system init for baseboard usage. Will be called by cpuimx35 init. |
274 | * | 245 | * |
@@ -281,8 +252,24 @@ void __init eukrea_mbimxsd35_baseboard_init(void) | |||
281 | ARRAY_SIZE(eukrea_mbimxsd_pads))) | 252 | ARRAY_SIZE(eukrea_mbimxsd_pads))) |
282 | printk(KERN_ERR "error setting mbimxsd pads !\n"); | 253 | printk(KERN_ERR "error setting mbimxsd pads !\n"); |
283 | 254 | ||
255 | #if defined(CONFIG_SND_SOC_EUKREA_TLV320) | ||
256 | /* SSI unit master I2S codec connected to SSI_AUD4 */ | ||
257 | mxc_audmux_v2_configure_port(0, | ||
258 | MXC_AUDMUX_V2_PTCR_SYN | | ||
259 | MXC_AUDMUX_V2_PTCR_TFSDIR | | ||
260 | MXC_AUDMUX_V2_PTCR_TFSEL(3) | | ||
261 | MXC_AUDMUX_V2_PTCR_TCLKDIR | | ||
262 | MXC_AUDMUX_V2_PTCR_TCSEL(3), | ||
263 | MXC_AUDMUX_V2_PDCR_RXDSEL(3) | ||
264 | ); | ||
265 | mxc_audmux_v2_configure_port(3, | ||
266 | MXC_AUDMUX_V2_PTCR_SYN, | ||
267 | MXC_AUDMUX_V2_PDCR_RXDSEL(0) | ||
268 | ); | ||
269 | #endif | ||
270 | |||
284 | imx35_add_imx_uart1(&uart_pdata); | 271 | imx35_add_imx_uart1(&uart_pdata); |
285 | imx35_add_ipu_core(); | 272 | imx35_add_ipu_core(&mx3_ipu_data); |
286 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); | 273 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); |
287 | 274 | ||
288 | imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); | 275 | imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); |
@@ -304,15 +291,7 @@ void __init eukrea_mbimxsd35_baseboard_init(void) | |||
304 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, | 291 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, |
305 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | 292 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); |
306 | 293 | ||
307 | gpio_request(GPIO_SPI1_IRQ, "SPI1_IRQ"); | ||
308 | gpio_direction_input(GPIO_SPI1_IRQ); | ||
309 | gpio_free(GPIO_SPI1_IRQ); | ||
310 | imx35_add_spi_imx0(&eukrea_mbimxsd35_spi0_data); | ||
311 | spi_register_board_info(eukrea_mbimxsd35_spi_board_info, | ||
312 | ARRAY_SIZE(eukrea_mbimxsd35_spi_board_info)); | ||
313 | |||
314 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 294 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
315 | gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); | 295 | gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); |
316 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); | 296 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); |
317 | imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0); | ||
318 | } | 297 | } |
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c deleted file mode 100644 index 9be6c1e69d6..00000000000 --- a/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c +++ /dev/null | |||
@@ -1,231 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Eric Benard - eric@eukrea.com | ||
3 | * | ||
4 | * Based on pcm970-baseboard.c which is : | ||
5 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version 2 | ||
10 | * of the License, or (at your option) any later version. | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
19 | * MA 02110-1301, USA. | ||
20 | */ | ||
21 | |||
22 | #include <linux/types.h> | ||
23 | #include <linux/init.h> | ||
24 | |||
25 | #include <linux/gpio.h> | ||
26 | #include <linux/interrupt.h> | ||
27 | #include <linux/leds.h> | ||
28 | #include <linux/platform_device.h> | ||
29 | #include <linux/input.h> | ||
30 | #include <linux/i2c.h> | ||
31 | #include <video/platform_lcd.h> | ||
32 | #include <linux/backlight.h> | ||
33 | |||
34 | #include <asm/mach-types.h> | ||
35 | #include <asm/mach/arch.h> | ||
36 | #include <asm/mach/time.h> | ||
37 | #include <asm/mach/map.h> | ||
38 | |||
39 | #include "common.h" | ||
40 | #include "devices-imx51.h" | ||
41 | #include "hardware.h" | ||
42 | #include "iomux-mx51.h" | ||
43 | |||
44 | static iomux_v3_cfg_t eukrea_mbimxsd51_pads[] = { | ||
45 | /* LED */ | ||
46 | MX51_PAD_NANDF_D10__GPIO3_30, | ||
47 | /* SWITCH */ | ||
48 | NEW_PAD_CTRL(MX51_PAD_NANDF_D9__GPIO3_31, PAD_CTL_PUS_22K_UP | | ||
49 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | | ||
50 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), | ||
51 | /* UART2 */ | ||
52 | MX51_PAD_UART2_RXD__UART2_RXD, | ||
53 | MX51_PAD_UART2_TXD__UART2_TXD, | ||
54 | /* UART 3 */ | ||
55 | MX51_PAD_UART3_RXD__UART3_RXD, | ||
56 | MX51_PAD_UART3_TXD__UART3_TXD, | ||
57 | MX51_PAD_KEY_COL4__UART3_RTS, | ||
58 | MX51_PAD_KEY_COL5__UART3_CTS, | ||
59 | /* SD */ | ||
60 | MX51_PAD_SD1_CMD__SD1_CMD, | ||
61 | MX51_PAD_SD1_CLK__SD1_CLK, | ||
62 | MX51_PAD_SD1_DATA0__SD1_DATA0, | ||
63 | MX51_PAD_SD1_DATA1__SD1_DATA1, | ||
64 | MX51_PAD_SD1_DATA2__SD1_DATA2, | ||
65 | MX51_PAD_SD1_DATA3__SD1_DATA3, | ||
66 | /* SD1 CD */ | ||
67 | NEW_PAD_CTRL(MX51_PAD_GPIO1_0__SD1_CD, PAD_CTL_PUS_22K_UP | | ||
68 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | | ||
69 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), | ||
70 | /* SSI */ | ||
71 | MX51_PAD_AUD3_BB_TXD__AUD3_TXD, | ||
72 | MX51_PAD_AUD3_BB_RXD__AUD3_RXD, | ||
73 | MX51_PAD_AUD3_BB_CK__AUD3_TXC, | ||
74 | MX51_PAD_AUD3_BB_FS__AUD3_TXFS, | ||
75 | /* LCD Backlight */ | ||
76 | MX51_PAD_DI1_D1_CS__GPIO3_4, | ||
77 | /* LCD RST */ | ||
78 | MX51_PAD_CSI1_D9__GPIO3_13, | ||
79 | }; | ||
80 | |||
81 | #define GPIO_LED1 IMX_GPIO_NR(3, 30) | ||
82 | #define GPIO_SWITCH1 IMX_GPIO_NR(3, 31) | ||
83 | #define GPIO_LCDRST IMX_GPIO_NR(3, 13) | ||
84 | #define GPIO_LCDBL IMX_GPIO_NR(3, 4) | ||
85 | |||
86 | static void eukrea_mbimxsd51_lcd_power_set(struct plat_lcd_data *pd, | ||
87 | unsigned int power) | ||
88 | { | ||
89 | if (power) | ||
90 | gpio_direction_output(GPIO_LCDRST, 1); | ||
91 | else | ||
92 | gpio_direction_output(GPIO_LCDRST, 0); | ||
93 | } | ||
94 | |||
95 | static struct plat_lcd_data eukrea_mbimxsd51_lcd_power_data = { | ||
96 | .set_power = eukrea_mbimxsd51_lcd_power_set, | ||
97 | }; | ||
98 | |||
99 | static struct platform_device eukrea_mbimxsd51_lcd_powerdev = { | ||
100 | .name = "platform-lcd", | ||
101 | .dev.platform_data = &eukrea_mbimxsd51_lcd_power_data, | ||
102 | }; | ||
103 | |||
104 | static void eukrea_mbimxsd51_bl_set_intensity(int intensity) | ||
105 | { | ||
106 | if (intensity) | ||
107 | gpio_direction_output(GPIO_LCDBL, 1); | ||
108 | else | ||
109 | gpio_direction_output(GPIO_LCDBL, 0); | ||
110 | } | ||
111 | |||
112 | static struct generic_bl_info eukrea_mbimxsd51_bl_info = { | ||
113 | .name = "eukrea_mbimxsd51-bl", | ||
114 | .max_intensity = 0xff, | ||
115 | .default_intensity = 0xff, | ||
116 | .set_bl_intensity = eukrea_mbimxsd51_bl_set_intensity, | ||
117 | }; | ||
118 | |||
119 | static struct platform_device eukrea_mbimxsd51_bl_dev = { | ||
120 | .name = "generic-bl", | ||
121 | .id = 1, | ||
122 | .dev = { | ||
123 | .platform_data = &eukrea_mbimxsd51_bl_info, | ||
124 | }, | ||
125 | }; | ||
126 | |||
127 | static const struct gpio_led eukrea_mbimxsd51_leds[] __initconst = { | ||
128 | { | ||
129 | .name = "led1", | ||
130 | .default_trigger = "heartbeat", | ||
131 | .active_low = 1, | ||
132 | .gpio = GPIO_LED1, | ||
133 | }, | ||
134 | }; | ||
135 | |||
136 | static const struct gpio_led_platform_data | ||
137 | eukrea_mbimxsd51_led_info __initconst = { | ||
138 | .leds = eukrea_mbimxsd51_leds, | ||
139 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd51_leds), | ||
140 | }; | ||
141 | |||
142 | static struct gpio_keys_button eukrea_mbimxsd51_gpio_buttons[] = { | ||
143 | { | ||
144 | .gpio = GPIO_SWITCH1, | ||
145 | .code = BTN_0, | ||
146 | .desc = "BP1", | ||
147 | .active_low = 1, | ||
148 | .wakeup = 1, | ||
149 | }, | ||
150 | }; | ||
151 | |||
152 | static const struct gpio_keys_platform_data | ||
153 | eukrea_mbimxsd51_button_data __initconst = { | ||
154 | .buttons = eukrea_mbimxsd51_gpio_buttons, | ||
155 | .nbuttons = ARRAY_SIZE(eukrea_mbimxsd51_gpio_buttons), | ||
156 | }; | ||
157 | |||
158 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
159 | .flags = IMXUART_HAVE_RTSCTS, | ||
160 | }; | ||
161 | |||
162 | static struct i2c_board_info eukrea_mbimxsd51_i2c_devices[] = { | ||
163 | { | ||
164 | I2C_BOARD_INFO("tlv320aic23", 0x1a), | ||
165 | }, | ||
166 | }; | ||
167 | |||
168 | static const | ||
169 | struct imx_ssi_platform_data eukrea_mbimxsd51_ssi_pdata __initconst = { | ||
170 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, | ||
171 | }; | ||
172 | |||
173 | static int screen_type; | ||
174 | |||
175 | static int __init eukrea_mbimxsd51_screen_type(char *options) | ||
176 | { | ||
177 | if (!strcmp(options, "dvi")) | ||
178 | screen_type = 1; | ||
179 | else if (!strcmp(options, "tft")) | ||
180 | screen_type = 0; | ||
181 | |||
182 | return 0; | ||
183 | } | ||
184 | __setup("screen_type=", eukrea_mbimxsd51_screen_type); | ||
185 | |||
186 | /* | ||
187 | * system init for baseboard usage. Will be called by cpuimx51sd init. | ||
188 | * | ||
189 | * Add platform devices present on this baseboard and init | ||
190 | * them from CPU side as far as required to use them later on | ||
191 | */ | ||
192 | void __init eukrea_mbimxsd51_baseboard_init(void) | ||
193 | { | ||
194 | if (mxc_iomux_v3_setup_multiple_pads(eukrea_mbimxsd51_pads, | ||
195 | ARRAY_SIZE(eukrea_mbimxsd51_pads))) | ||
196 | printk(KERN_ERR "error setting mbimxsd pads !\n"); | ||
197 | |||
198 | imx51_add_imx_uart(1, NULL); | ||
199 | imx51_add_imx_uart(2, &uart_pdata); | ||
200 | |||
201 | imx51_add_sdhci_esdhc_imx(0, NULL); | ||
202 | |||
203 | imx51_add_imx_ssi(0, &eukrea_mbimxsd51_ssi_pdata); | ||
204 | |||
205 | gpio_request(GPIO_LED1, "LED1"); | ||
206 | gpio_direction_output(GPIO_LED1, 1); | ||
207 | gpio_free(GPIO_LED1); | ||
208 | |||
209 | gpio_request(GPIO_SWITCH1, "SWITCH1"); | ||
210 | gpio_direction_input(GPIO_SWITCH1); | ||
211 | gpio_free(GPIO_SWITCH1); | ||
212 | |||
213 | gpio_request(GPIO_LCDRST, "LCDRST"); | ||
214 | gpio_direction_output(GPIO_LCDRST, 0); | ||
215 | gpio_request(GPIO_LCDBL, "LCDBL"); | ||
216 | gpio_direction_output(GPIO_LCDBL, 0); | ||
217 | if (!screen_type) { | ||
218 | platform_device_register(&eukrea_mbimxsd51_bl_dev); | ||
219 | platform_device_register(&eukrea_mbimxsd51_lcd_powerdev); | ||
220 | } else { | ||
221 | gpio_free(GPIO_LCDRST); | ||
222 | gpio_free(GPIO_LCDBL); | ||
223 | } | ||
224 | |||
225 | i2c_register_board_info(0, eukrea_mbimxsd51_i2c_devices, | ||
226 | ARRAY_SIZE(eukrea_mbimxsd51_i2c_devices)); | ||
227 | |||
228 | gpio_led_register_device(-1, &eukrea_mbimxsd51_led_info); | ||
229 | imx_add_gpio_keys(&eukrea_mbimxsd51_button_data); | ||
230 | imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0); | ||
231 | } | ||
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c deleted file mode 100644 index e1537f9e45b..00000000000 --- a/arch/arm/mach-imx/gpc.c +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/io.h> | ||
14 | #include <linux/irq.h> | ||
15 | #include <linux/of.h> | ||
16 | #include <linux/of_address.h> | ||
17 | #include <linux/of_irq.h> | ||
18 | #include <asm/hardware/gic.h> | ||
19 | |||
20 | #define GPC_IMR1 0x008 | ||
21 | #define GPC_PGC_CPU_PDN 0x2a0 | ||
22 | |||
23 | #define IMR_NUM 4 | ||
24 | |||
25 | static void __iomem *gpc_base; | ||
26 | static u32 gpc_wake_irqs[IMR_NUM]; | ||
27 | static u32 gpc_saved_imrs[IMR_NUM]; | ||
28 | |||
29 | void imx_gpc_pre_suspend(void) | ||
30 | { | ||
31 | void __iomem *reg_imr1 = gpc_base + GPC_IMR1; | ||
32 | int i; | ||
33 | |||
34 | /* Tell GPC to power off ARM core when suspend */ | ||
35 | writel_relaxed(0x1, gpc_base + GPC_PGC_CPU_PDN); | ||
36 | |||
37 | for (i = 0; i < IMR_NUM; i++) { | ||
38 | gpc_saved_imrs[i] = readl_relaxed(reg_imr1 + i * 4); | ||
39 | writel_relaxed(~gpc_wake_irqs[i], reg_imr1 + i * 4); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | void imx_gpc_post_resume(void) | ||
44 | { | ||
45 | void __iomem *reg_imr1 = gpc_base + GPC_IMR1; | ||
46 | int i; | ||
47 | |||
48 | /* Keep ARM core powered on for other low-power modes */ | ||
49 | writel_relaxed(0x0, gpc_base + GPC_PGC_CPU_PDN); | ||
50 | |||
51 | for (i = 0; i < IMR_NUM; i++) | ||
52 | writel_relaxed(gpc_saved_imrs[i], reg_imr1 + i * 4); | ||
53 | } | ||
54 | |||
55 | static int imx_gpc_irq_set_wake(struct irq_data *d, unsigned int on) | ||
56 | { | ||
57 | unsigned int idx = d->irq / 32 - 1; | ||
58 | u32 mask; | ||
59 | |||
60 | /* Sanity check for SPI irq */ | ||
61 | if (d->irq < 32) | ||
62 | return -EINVAL; | ||
63 | |||
64 | mask = 1 << d->irq % 32; | ||
65 | gpc_wake_irqs[idx] = on ? gpc_wake_irqs[idx] | mask : | ||
66 | gpc_wake_irqs[idx] & ~mask; | ||
67 | |||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | static void imx_gpc_irq_unmask(struct irq_data *d) | ||
72 | { | ||
73 | void __iomem *reg; | ||
74 | u32 val; | ||
75 | |||
76 | /* Sanity check for SPI irq */ | ||
77 | if (d->irq < 32) | ||
78 | return; | ||
79 | |||
80 | reg = gpc_base + GPC_IMR1 + (d->irq / 32 - 1) * 4; | ||
81 | val = readl_relaxed(reg); | ||
82 | val &= ~(1 << d->irq % 32); | ||
83 | writel_relaxed(val, reg); | ||
84 | } | ||
85 | |||
86 | static void imx_gpc_irq_mask(struct irq_data *d) | ||
87 | { | ||
88 | void __iomem *reg; | ||
89 | u32 val; | ||
90 | |||
91 | /* Sanity check for SPI irq */ | ||
92 | if (d->irq < 32) | ||
93 | return; | ||
94 | |||
95 | reg = gpc_base + GPC_IMR1 + (d->irq / 32 - 1) * 4; | ||
96 | val = readl_relaxed(reg); | ||
97 | val |= 1 << (d->irq % 32); | ||
98 | writel_relaxed(val, reg); | ||
99 | } | ||
100 | |||
101 | void __init imx_gpc_init(void) | ||
102 | { | ||
103 | struct device_node *np; | ||
104 | |||
105 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpc"); | ||
106 | gpc_base = of_iomap(np, 0); | ||
107 | WARN_ON(!gpc_base); | ||
108 | |||
109 | /* Register GPC as the secondary interrupt controller behind GIC */ | ||
110 | gic_arch_extn.irq_mask = imx_gpc_irq_mask; | ||
111 | gic_arch_extn.irq_unmask = imx_gpc_irq_unmask; | ||
112 | gic_arch_extn.irq_set_wake = imx_gpc_irq_set_wake; | ||
113 | } | ||
diff --git a/arch/arm/mach-imx/hardware.h b/arch/arm/mach-imx/hardware.h deleted file mode 100644 index 3ce7fa3bd43..00000000000 --- a/arch/arm/mach-imx/hardware.h +++ /dev/null | |||
@@ -1,134 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_MXC_HARDWARE_H__ | ||
21 | #define __ASM_ARCH_MXC_HARDWARE_H__ | ||
22 | |||
23 | #include <asm/sizes.h> | ||
24 | |||
25 | #define addr_in_module(addr, mod) \ | ||
26 | ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE) | ||
27 | |||
28 | #define IMX_IO_P2V_MODULE(addr, module) \ | ||
29 | (((addr) - module ## _BASE_ADDR) < module ## _SIZE ? \ | ||
30 | (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0) | ||
31 | |||
32 | /* | ||
33 | * This is rather complicated for humans and ugly to verify, but for a machine | ||
34 | * it's OK. Still more as it is usually only applied to constants. The upsides | ||
35 | * on using this approach are: | ||
36 | * | ||
37 | * - same mapping on all i.MX machines | ||
38 | * - works for assembler, too | ||
39 | * - no need to nurture #defines for virtual addresses | ||
40 | * | ||
41 | * The downside it, it's hard to verify (but I have a script for that). | ||
42 | * | ||
43 | * Obviously this needs to be injective for each SoC. In general it maps the | ||
44 | * whole address space to [0xf4000000, 0xf5ffffff]. So [0xf6000000,0xfeffffff] | ||
45 | * is free for per-machine use (e.g. KZM_ARM11_01 uses 64MiB there). | ||
46 | * | ||
47 | * It applies the following mappings for the different SoCs: | ||
48 | * | ||
49 | * mx1: | ||
50 | * IO 0x00200000+0x100000 -> 0xf4000000+0x100000 | ||
51 | * mx21: | ||
52 | * AIPI 0x10000000+0x100000 -> 0xf4400000+0x100000 | ||
53 | * SAHB1 0x80000000+0x100000 -> 0xf5000000+0x100000 | ||
54 | * X_MEMC 0xdf000000+0x004000 -> 0xf5f00000+0x004000 | ||
55 | * mx25: | ||
56 | * AIPS1 0x43f00000+0x100000 -> 0xf5300000+0x100000 | ||
57 | * AIPS2 0x53f00000+0x100000 -> 0xf5700000+0x100000 | ||
58 | * AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000 | ||
59 | * mx27: | ||
60 | * AIPI 0x10000000+0x100000 -> 0xf4400000+0x100000 | ||
61 | * SAHB1 0x80000000+0x100000 -> 0xf5000000+0x100000 | ||
62 | * X_MEMC 0xd8000000+0x100000 -> 0xf5c00000+0x100000 | ||
63 | * mx31: | ||
64 | * AIPS1 0x43f00000+0x100000 -> 0xf5300000+0x100000 | ||
65 | * AIPS2 0x53f00000+0x100000 -> 0xf5700000+0x100000 | ||
66 | * AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000 | ||
67 | * X_MEMC 0xb8000000+0x010000 -> 0xf5c00000+0x010000 | ||
68 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 | ||
69 | * mx35: | ||
70 | * AIPS1 0x43f00000+0x100000 -> 0xf5300000+0x100000 | ||
71 | * AIPS2 0x53f00000+0x100000 -> 0xf5700000+0x100000 | ||
72 | * AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000 | ||
73 | * X_MEMC 0xb8000000+0x010000 -> 0xf5c00000+0x010000 | ||
74 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 | ||
75 | * mx50: | ||
76 | * TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000 | ||
77 | * AIPS1 0x53f00000+0x100000 -> 0xf5700000+0x100000 | ||
78 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 | ||
79 | * AIPS2 0x63f00000+0x100000 -> 0xf5300000+0x100000 | ||
80 | * mx51: | ||
81 | * TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000 | ||
82 | * IRAM 0x1ffe0000+0x020000 -> 0xf4fe0000+0x020000 | ||
83 | * DEBUG 0x60000000+0x100000 -> 0xf5000000+0x100000 | ||
84 | * SPBA0 0x70000000+0x100000 -> 0xf5400000+0x100000 | ||
85 | * AIPS1 0x73f00000+0x100000 -> 0xf5700000+0x100000 | ||
86 | * AIPS2 0x83f00000+0x100000 -> 0xf5300000+0x100000 | ||
87 | * mx53: | ||
88 | * TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000 | ||
89 | * DEBUG 0x40000000+0x100000 -> 0xf5000000+0x100000 | ||
90 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 | ||
91 | * AIPS1 0x53f00000+0x100000 -> 0xf5700000+0x100000 | ||
92 | * AIPS2 0x63f00000+0x100000 -> 0xf5300000+0x100000 | ||
93 | * mx6q: | ||
94 | * SCU 0x00a00000+0x004000 -> 0xf4000000+0x004000 | ||
95 | * CCM 0x020c4000+0x004000 -> 0xf42c4000+0x004000 | ||
96 | * ANATOP 0x020c8000+0x004000 -> 0xf42c8000+0x004000 | ||
97 | * UART4 0x021f0000+0x004000 -> 0xf42f0000+0x004000 | ||
98 | */ | ||
99 | #define IMX_IO_P2V(x) ( \ | ||
100 | (((x) & 0x80000000) >> 7) | \ | ||
101 | (0xf4000000 + \ | ||
102 | (((x) & 0x50000000) >> 6) + \ | ||
103 | (((x) & 0x0b000000) >> 4) + \ | ||
104 | (((x) & 0x000fffff)))) | ||
105 | |||
106 | #define IMX_IO_ADDRESS(x) IOMEM(IMX_IO_P2V(x)) | ||
107 | |||
108 | #include "mxc.h" | ||
109 | |||
110 | #include "mx6q.h" | ||
111 | #include "mx50.h" | ||
112 | #include "mx51.h" | ||
113 | #include "mx53.h" | ||
114 | #include "mx3x.h" | ||
115 | #include "mx31.h" | ||
116 | #include "mx35.h" | ||
117 | #include "mx2x.h" | ||
118 | #include "mx21.h" | ||
119 | #include "mx27.h" | ||
120 | #include "mx1.h" | ||
121 | #include "mx25.h" | ||
122 | |||
123 | #define imx_map_entry(soc, name, _type) { \ | ||
124 | .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \ | ||
125 | .pfn = __phys_to_pfn(soc ## _ ## name ## _BASE_ADDR), \ | ||
126 | .length = soc ## _ ## name ## _SIZE, \ | ||
127 | .type = _type, \ | ||
128 | } | ||
129 | |||
130 | /* There's a off-by-one betweem the gpio bank number and the gpiochip */ | ||
131 | /* range e.g. GPIO_1_5 is gpio 5 under linux */ | ||
132 | #define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr)) | ||
133 | |||
134 | #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ | ||
diff --git a/arch/arm/mach-imx/headsmp.S b/arch/arm/mach-imx/headsmp.S deleted file mode 100644 index 7e49deb128a..00000000000 --- a/arch/arm/mach-imx/headsmp.S +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/linkage.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <asm/asm-offsets.h> | ||
16 | #include <asm/hardware/cache-l2x0.h> | ||
17 | |||
18 | .section ".text.head", "ax" | ||
19 | |||
20 | /* | ||
21 | * The secondary kernel init calls v7_flush_dcache_all before it enables | ||
22 | * the L1; however, the L1 comes out of reset in an undefined state, so | ||
23 | * the clean + invalidate performed by v7_flush_dcache_all causes a bunch | ||
24 | * of cache lines with uninitialized data and uninitialized tags to get | ||
25 | * written out to memory, which does really unpleasant things to the main | ||
26 | * processor. We fix this by performing an invalidate, rather than a | ||
27 | * clean + invalidate, before jumping into the kernel. | ||
28 | * | ||
29 | * This funciton is cloned from arch/arm/mach-tegra/headsmp.S, and needs | ||
30 | * to be called for both secondary cores startup and primary core resume | ||
31 | * procedures. Ideally, it should be moved into arch/arm/mm/cache-v7.S. | ||
32 | */ | ||
33 | ENTRY(v7_invalidate_l1) | ||
34 | mov r0, #0 | ||
35 | mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache | ||
36 | mcr p15, 2, r0, c0, c0, 0 | ||
37 | mrc p15, 1, r0, c0, c0, 0 | ||
38 | |||
39 | ldr r1, =0x7fff | ||
40 | and r2, r1, r0, lsr #13 | ||
41 | |||
42 | ldr r1, =0x3ff | ||
43 | |||
44 | and r3, r1, r0, lsr #3 @ NumWays - 1 | ||
45 | add r2, r2, #1 @ NumSets | ||
46 | |||
47 | and r0, r0, #0x7 | ||
48 | add r0, r0, #4 @ SetShift | ||
49 | |||
50 | clz r1, r3 @ WayShift | ||
51 | add r4, r3, #1 @ NumWays | ||
52 | 1: sub r2, r2, #1 @ NumSets-- | ||
53 | mov r3, r4 @ Temp = NumWays | ||
54 | 2: subs r3, r3, #1 @ Temp-- | ||
55 | mov r5, r3, lsl r1 | ||
56 | mov r6, r2, lsl r0 | ||
57 | orr r5, r5, r6 @ Reg = (Temp<<WayShift)|(NumSets<<SetShift) | ||
58 | mcr p15, 0, r5, c7, c6, 2 | ||
59 | bgt 2b | ||
60 | cmp r2, #0 | ||
61 | bgt 1b | ||
62 | dsb | ||
63 | isb | ||
64 | mov pc, lr | ||
65 | ENDPROC(v7_invalidate_l1) | ||
66 | |||
67 | #ifdef CONFIG_SMP | ||
68 | ENTRY(v7_secondary_startup) | ||
69 | bl v7_invalidate_l1 | ||
70 | b secondary_startup | ||
71 | ENDPROC(v7_secondary_startup) | ||
72 | #endif | ||
73 | |||
74 | #ifdef CONFIG_PM | ||
75 | /* | ||
76 | * The following code is located into the .data section. This is to | ||
77 | * allow phys_l2x0_saved_regs to be accessed with a relative load | ||
78 | * as we are running on physical address here. | ||
79 | */ | ||
80 | .data | ||
81 | .align | ||
82 | |||
83 | #ifdef CONFIG_CACHE_L2X0 | ||
84 | .macro pl310_resume | ||
85 | ldr r2, phys_l2x0_saved_regs | ||
86 | ldr r0, [r2, #L2X0_R_PHY_BASE] @ get physical base of l2x0 | ||
87 | ldr r1, [r2, #L2X0_R_AUX_CTRL] @ get aux_ctrl value | ||
88 | str r1, [r0, #L2X0_AUX_CTRL] @ restore aux_ctrl | ||
89 | mov r1, #0x1 | ||
90 | str r1, [r0, #L2X0_CTRL] @ re-enable L2 | ||
91 | .endm | ||
92 | |||
93 | .globl phys_l2x0_saved_regs | ||
94 | phys_l2x0_saved_regs: | ||
95 | .long 0 | ||
96 | #else | ||
97 | .macro pl310_resume | ||
98 | .endm | ||
99 | #endif | ||
100 | |||
101 | ENTRY(v7_cpu_resume) | ||
102 | bl v7_invalidate_l1 | ||
103 | pl310_resume | ||
104 | b cpu_resume | ||
105 | ENDPROC(v7_cpu_resume) | ||
106 | #endif | ||
diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c deleted file mode 100644 index 3dec962b077..00000000000 --- a/arch/arm/mach-imx/hotplug.c +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/errno.h> | ||
14 | #include <asm/cacheflush.h> | ||
15 | #include <asm/cp15.h> | ||
16 | |||
17 | #include "common.h" | ||
18 | |||
19 | static inline void cpu_enter_lowpower(void) | ||
20 | { | ||
21 | unsigned int v; | ||
22 | |||
23 | flush_cache_all(); | ||
24 | asm volatile( | ||
25 | "mcr p15, 0, %1, c7, c5, 0\n" | ||
26 | " mcr p15, 0, %1, c7, c10, 4\n" | ||
27 | /* | ||
28 | * Turn off coherency | ||
29 | */ | ||
30 | " mrc p15, 0, %0, c1, c0, 1\n" | ||
31 | " bic %0, %0, %3\n" | ||
32 | " mcr p15, 0, %0, c1, c0, 1\n" | ||
33 | " mrc p15, 0, %0, c1, c0, 0\n" | ||
34 | " bic %0, %0, %2\n" | ||
35 | " mcr p15, 0, %0, c1, c0, 0\n" | ||
36 | : "=&r" (v) | ||
37 | : "r" (0), "Ir" (CR_C), "Ir" (0x40) | ||
38 | : "cc"); | ||
39 | } | ||
40 | |||
41 | /* | ||
42 | * platform-specific code to shutdown a CPU | ||
43 | * | ||
44 | * Called with IRQs disabled | ||
45 | */ | ||
46 | void imx_cpu_die(unsigned int cpu) | ||
47 | { | ||
48 | cpu_enter_lowpower(); | ||
49 | imx_enable_cpu(cpu, false); | ||
50 | |||
51 | /* spin here until hardware takes it down */ | ||
52 | while (1) | ||
53 | ; | ||
54 | } | ||
diff --git a/arch/arm/mach-imx/iim.h b/arch/arm/mach-imx/iim.h deleted file mode 100644 index 315bffadafd..00000000000 --- a/arch/arm/mach-imx/iim.h +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_MXC_IIM_H__ | ||
21 | #define __ASM_ARCH_MXC_IIM_H__ | ||
22 | |||
23 | /* Register offsets */ | ||
24 | #define MXC_IIMSTAT 0x0000 | ||
25 | #define MXC_IIMSTATM 0x0004 | ||
26 | #define MXC_IIMERR 0x0008 | ||
27 | #define MXC_IIMEMASK 0x000C | ||
28 | #define MXC_IIMFCTL 0x0010 | ||
29 | #define MXC_IIMUA 0x0014 | ||
30 | #define MXC_IIMLA 0x0018 | ||
31 | #define MXC_IIMSDAT 0x001C | ||
32 | #define MXC_IIMPREV 0x0020 | ||
33 | #define MXC_IIMSREV 0x0024 | ||
34 | #define MXC_IIMPRG_P 0x0028 | ||
35 | #define MXC_IIMSCS0 0x002C | ||
36 | #define MXC_IIMSCS1 0x0030 | ||
37 | #define MXC_IIMSCS2 0x0034 | ||
38 | #define MXC_IIMSCS3 0x0038 | ||
39 | #define MXC_IIMFBAC0 0x0800 | ||
40 | #define MXC_IIMJAC 0x0804 | ||
41 | #define MXC_IIMHWV1 0x0808 | ||
42 | #define MXC_IIMHWV2 0x080C | ||
43 | #define MXC_IIMHAB0 0x0810 | ||
44 | #define MXC_IIMHAB1 0x0814 | ||
45 | /* Definitions for i.MX27 TO2 */ | ||
46 | #define MXC_IIMMAC 0x0814 | ||
47 | #define MXC_IIMPREV_FUSE 0x0818 | ||
48 | #define MXC_IIMSREV_FUSE 0x081C | ||
49 | #define MXC_IIMSJC_CHALL_0 0x0820 | ||
50 | #define MXC_IIMSJC_CHALL_7 0x083C | ||
51 | #define MXC_IIMFB0UC17 0x0840 | ||
52 | #define MXC_IIMFB0UC255 0x0BFC | ||
53 | #define MXC_IIMFBAC1 0x0C00 | ||
54 | /* Definitions for i.MX27 TO2 */ | ||
55 | #define MXC_IIMSUID 0x0C04 | ||
56 | #define MXC_IIMKEY0 0x0C04 | ||
57 | #define MXC_IIMKEY20 0x0C54 | ||
58 | #define MXC_IIMSJC_RESP_0 0x0C58 | ||
59 | #define MXC_IIMSJC_RESP_7 0x0C74 | ||
60 | #define MXC_IIMFB1UC30 0x0C78 | ||
61 | #define MXC_IIMFB1UC255 0x0FFC | ||
62 | |||
63 | /* Bit definitions */ | ||
64 | |||
65 | #define MXC_IIMHWV1_WLOCK (0x1 << 7) | ||
66 | #define MXC_IIMHWV1_MCU_ENDIAN (0x1 << 6) | ||
67 | #define MXC_IIMHWV1_DSP_ENDIAN (0x1 << 5) | ||
68 | #define MXC_IIMHWV1_BOOT_INT (0x1 << 4) | ||
69 | #define MXC_IIMHWV1_SCC_DISABLE (0x1 << 3) | ||
70 | #define MXC_IIMHWV1_HANTRO_DISABLE (0x1 << 2) | ||
71 | #define MXC_IIMHWV1_MEMSTICK_DIS (0x1 << 1) | ||
72 | |||
73 | #define MXC_IIMHWV2_WLOCK (0x1 << 7) | ||
74 | #define MXC_IIMHWV2_BP_SDMA (0x1 << 6) | ||
75 | #define MXC_IIMHWV2_SCM_DCM (0x1 << 5) | ||
76 | |||
77 | #endif /* __ASM_ARCH_MXC_IIM_H__ */ | ||
diff --git a/arch/arm/mach-imx/imx25-dt.c b/arch/arm/mach-imx/imx25-dt.c deleted file mode 100644 index e17dfbc4219..00000000000 --- a/arch/arm/mach-imx/imx25-dt.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Sascha Hauer, Pengutronix | ||
3 | * | ||
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: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #include <linux/irq.h> | ||
13 | #include <linux/of_irq.h> | ||
14 | #include <linux/of_platform.h> | ||
15 | #include <asm/mach/arch.h> | ||
16 | #include <asm/mach/time.h> | ||
17 | #include "common.h" | ||
18 | #include "mx25.h" | ||
19 | |||
20 | static void __init imx25_dt_init(void) | ||
21 | { | ||
22 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
23 | } | ||
24 | |||
25 | static void __init imx25_timer_init(void) | ||
26 | { | ||
27 | mx25_clocks_init_dt(); | ||
28 | } | ||
29 | |||
30 | static struct sys_timer imx25_timer = { | ||
31 | .init = imx25_timer_init, | ||
32 | }; | ||
33 | |||
34 | static const char * const imx25_dt_board_compat[] __initconst = { | ||
35 | "fsl,imx25", | ||
36 | NULL | ||
37 | }; | ||
38 | |||
39 | DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)") | ||
40 | .map_io = mx25_map_io, | ||
41 | .init_early = imx25_init_early, | ||
42 | .init_irq = mx25_init_irq, | ||
43 | .handle_irq = imx25_handle_irq, | ||
44 | .timer = &imx25_timer, | ||
45 | .init_machine = imx25_dt_init, | ||
46 | .dt_compat = imx25_dt_board_compat, | ||
47 | .restart = mxc_restart, | ||
48 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c deleted file mode 100644 index ebfae96543c..00000000000 --- a/arch/arm/mach-imx/imx27-dt.c +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Sascha Hauer, Pengutronix | ||
3 | * | ||
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: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #include <linux/irq.h> | ||
13 | #include <linux/of_irq.h> | ||
14 | #include <linux/of_platform.h> | ||
15 | #include <asm/mach/arch.h> | ||
16 | #include <asm/mach/time.h> | ||
17 | |||
18 | #include "common.h" | ||
19 | #include "mx27.h" | ||
20 | |||
21 | static const struct of_dev_auxdata imx27_auxdata_lookup[] __initconst = { | ||
22 | OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART1_BASE_ADDR, "imx21-uart.0", NULL), | ||
23 | OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART2_BASE_ADDR, "imx21-uart.1", NULL), | ||
24 | OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART3_BASE_ADDR, "imx21-uart.2", NULL), | ||
25 | OF_DEV_AUXDATA("fsl,imx27-fec", MX27_FEC_BASE_ADDR, "imx27-fec.0", NULL), | ||
26 | OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C1_BASE_ADDR, "imx21-i2c.0", NULL), | ||
27 | OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C2_BASE_ADDR, "imx21-i2c.1", NULL), | ||
28 | OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI1_BASE_ADDR, "imx27-cspi.0", NULL), | ||
29 | OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI2_BASE_ADDR, "imx27-cspi.1", NULL), | ||
30 | OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI3_BASE_ADDR, "imx27-cspi.2", NULL), | ||
31 | OF_DEV_AUXDATA("fsl,imx27-wdt", MX27_WDOG_BASE_ADDR, "imx2-wdt.0", NULL), | ||
32 | OF_DEV_AUXDATA("fsl,imx27-nand", MX27_NFC_BASE_ADDR, "imx27-nand.0", NULL), | ||
33 | { /* sentinel */ } | ||
34 | }; | ||
35 | |||
36 | static void __init imx27_dt_init(void) | ||
37 | { | ||
38 | of_platform_populate(NULL, of_default_bus_match_table, | ||
39 | imx27_auxdata_lookup, NULL); | ||
40 | } | ||
41 | |||
42 | static void __init imx27_timer_init(void) | ||
43 | { | ||
44 | mx27_clocks_init_dt(); | ||
45 | } | ||
46 | |||
47 | static struct sys_timer imx27_timer = { | ||
48 | .init = imx27_timer_init, | ||
49 | }; | ||
50 | |||
51 | static const char * const imx27_dt_board_compat[] __initconst = { | ||
52 | "fsl,imx27", | ||
53 | NULL | ||
54 | }; | ||
55 | |||
56 | DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)") | ||
57 | .map_io = mx27_map_io, | ||
58 | .init_early = imx27_init_early, | ||
59 | .init_irq = mx27_init_irq, | ||
60 | .handle_irq = imx27_handle_irq, | ||
61 | .timer = &imx27_timer, | ||
62 | .init_machine = imx27_dt_init, | ||
63 | .dt_compat = imx27_dt_board_compat, | ||
64 | .restart = mxc_restart, | ||
65 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/imx31-dt.c b/arch/arm/mach-imx/imx31-dt.c deleted file mode 100644 index af476de2570..00000000000 --- a/arch/arm/mach-imx/imx31-dt.c +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Sascha Hauer, Pengutronix | ||
3 | * | ||
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: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #include <linux/irq.h> | ||
13 | #include <linux/of_irq.h> | ||
14 | #include <linux/of_platform.h> | ||
15 | #include <asm/mach/arch.h> | ||
16 | #include <asm/mach/time.h> | ||
17 | |||
18 | #include "common.h" | ||
19 | #include "mx31.h" | ||
20 | |||
21 | static const struct of_dev_auxdata imx31_auxdata_lookup[] __initconst = { | ||
22 | OF_DEV_AUXDATA("fsl,imx31-uart", MX31_UART1_BASE_ADDR, | ||
23 | "imx21-uart.0", NULL), | ||
24 | OF_DEV_AUXDATA("fsl,imx31-uart", MX31_UART2_BASE_ADDR, | ||
25 | "imx21-uart.1", NULL), | ||
26 | OF_DEV_AUXDATA("fsl,imx31-uart", MX31_UART3_BASE_ADDR, | ||
27 | "imx21-uart.2", NULL), | ||
28 | OF_DEV_AUXDATA("fsl,imx31-uart", MX31_UART4_BASE_ADDR, | ||
29 | "imx21-uart.3", NULL), | ||
30 | OF_DEV_AUXDATA("fsl,imx31-uart", MX31_UART5_BASE_ADDR, | ||
31 | "imx21-uart.4", NULL), | ||
32 | { /* sentinel */ } | ||
33 | }; | ||
34 | |||
35 | static void __init imx31_dt_init(void) | ||
36 | { | ||
37 | of_platform_populate(NULL, of_default_bus_match_table, | ||
38 | imx31_auxdata_lookup, NULL); | ||
39 | } | ||
40 | |||
41 | static void __init imx31_timer_init(void) | ||
42 | { | ||
43 | mx31_clocks_init_dt(); | ||
44 | } | ||
45 | |||
46 | static struct sys_timer imx31_timer = { | ||
47 | .init = imx31_timer_init, | ||
48 | }; | ||
49 | |||
50 | static const char *imx31_dt_board_compat[] __initdata = { | ||
51 | "fsl,imx31", | ||
52 | NULL | ||
53 | }; | ||
54 | |||
55 | DT_MACHINE_START(IMX31_DT, "Freescale i.MX31 (Device Tree Support)") | ||
56 | .map_io = mx31_map_io, | ||
57 | .init_early = imx31_init_early, | ||
58 | .init_irq = mx31_init_irq, | ||
59 | .handle_irq = imx31_handle_irq, | ||
60 | .timer = &imx31_timer, | ||
61 | .init_machine = imx31_dt_init, | ||
62 | .dt_compat = imx31_dt_board_compat, | ||
63 | .restart = mxc_restart, | ||
64 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c deleted file mode 100644 index 5ffa40c673f..00000000000 --- a/arch/arm/mach-imx/imx51-dt.c +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/irq.h> | ||
14 | #include <linux/of_irq.h> | ||
15 | #include <linux/of_platform.h> | ||
16 | #include <asm/mach/arch.h> | ||
17 | #include <asm/mach/time.h> | ||
18 | |||
19 | #include "common.h" | ||
20 | #include "mx51.h" | ||
21 | |||
22 | static void __init imx51_dt_init(void) | ||
23 | { | ||
24 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
25 | } | ||
26 | |||
27 | static void __init imx51_timer_init(void) | ||
28 | { | ||
29 | mx51_clocks_init_dt(); | ||
30 | } | ||
31 | |||
32 | static struct sys_timer imx51_timer = { | ||
33 | .init = imx51_timer_init, | ||
34 | }; | ||
35 | |||
36 | static const char *imx51_dt_board_compat[] __initdata = { | ||
37 | "fsl,imx51", | ||
38 | NULL | ||
39 | }; | ||
40 | |||
41 | DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") | ||
42 | .map_io = mx51_map_io, | ||
43 | .init_early = imx51_init_early, | ||
44 | .init_irq = mx51_init_irq, | ||
45 | .handle_irq = imx51_handle_irq, | ||
46 | .timer = &imx51_timer, | ||
47 | .init_machine = imx51_dt_init, | ||
48 | .init_late = imx51_init_late, | ||
49 | .dt_compat = imx51_dt_board_compat, | ||
50 | .restart = mxc_restart, | ||
51 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/iomux-imx31.c b/arch/arm/mach-imx/iomux-imx31.c index cabefbc5e7c..cf8f8099ebd 100644 --- a/arch/arm/mach-imx/iomux-imx31.c +++ b/arch/arm/mach-imx/iomux-imx31.c | |||
@@ -17,14 +17,14 @@ | |||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
18 | * MA 02110-1301, USA. | 18 | * MA 02110-1301, USA. |
19 | */ | 19 | */ |
20 | #include <linux/gpio.h> | 20 | |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | 25 | #include <mach/hardware.h> | |
26 | #include "hardware.h" | 26 | #include <mach/gpio.h> |
27 | #include "iomux-mx3.h" | 27 | #include <mach/iomux-mx3.h> |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * IOMUX register (base) addresses | 30 | * IOMUX register (base) addresses |
diff --git a/arch/arm/mach-imx/iomux-mx1.h b/arch/arm/mach-imx/iomux-mx1.h deleted file mode 100644 index 95f4681d85d..00000000000 --- a/arch/arm/mach-imx/iomux-mx1.h +++ /dev/null | |||
@@ -1,155 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
16 | * MA 02110-1301, USA. | ||
17 | */ | ||
18 | #ifndef __MACH_IOMUX_MX1_H__ | ||
19 | #define __MACH_IOMUX_MX1_H__ | ||
20 | |||
21 | #include "iomux-v1.h" | ||
22 | |||
23 | #define PA0_AIN_SPI2_CLK (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 0) | ||
24 | #define PA0_AF_ETMTRACESYNC (GPIO_PORTA | GPIO_AF | 0) | ||
25 | #define PA1_AOUT_SPI2_RXD (GPIO_PORTA | GPIO_AOUT | GPIO_IN | 1) | ||
26 | #define PA1_PF_TIN (GPIO_PORTA | GPIO_PF | 1) | ||
27 | #define PA2_PF_PWM0 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 2) | ||
28 | #define PA3_PF_CSI_MCLK (GPIO_PORTA | GPIO_PF | 3) | ||
29 | #define PA4_PF_CSI_D0 (GPIO_PORTA | GPIO_PF | 4) | ||
30 | #define PA5_PF_CSI_D1 (GPIO_PORTA | GPIO_PF | 5) | ||
31 | #define PA6_PF_CSI_D2 (GPIO_PORTA | GPIO_PF | 6) | ||
32 | #define PA7_PF_CSI_D3 (GPIO_PORTA | GPIO_PF | 7) | ||
33 | #define PA8_PF_CSI_D4 (GPIO_PORTA | GPIO_PF | 8) | ||
34 | #define PA9_PF_CSI_D5 (GPIO_PORTA | GPIO_PF | 9) | ||
35 | #define PA10_PF_CSI_D6 (GPIO_PORTA | GPIO_PF | 10) | ||
36 | #define PA11_PF_CSI_D7 (GPIO_PORTA | GPIO_PF | 11) | ||
37 | #define PA12_PF_CSI_VSYNC (GPIO_PORTA | GPIO_PF | 12) | ||
38 | #define PA13_PF_CSI_HSYNC (GPIO_PORTA | GPIO_PF | 13) | ||
39 | #define PA14_PF_CSI_PIXCLK (GPIO_PORTA | GPIO_PF | 14) | ||
40 | #define PA15_PF_I2C_SDA (GPIO_PORTA | GPIO_PF | GPIO_OUT | 15) | ||
41 | #define PA16_PF_I2C_SCL (GPIO_PORTA | GPIO_PF | GPIO_OUT | 16) | ||
42 | #define PA17_AF_ETMTRACEPKT4 (GPIO_PORTA | GPIO_AF | 17) | ||
43 | #define PA17_AIN_SPI2_SS (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 17) | ||
44 | #define PA18_AF_ETMTRACEPKT5 (GPIO_PORTA | GPIO_AF | 18) | ||
45 | #define PA19_AF_ETMTRACEPKT6 (GPIO_PORTA | GPIO_AF | 19) | ||
46 | #define PA20_AF_ETMTRACEPKT7 (GPIO_PORTA | GPIO_AF | 20) | ||
47 | #define PA21_PF_A0 (GPIO_PORTA | GPIO_PF | 21) | ||
48 | #define PA22_PF_CS4 (GPIO_PORTA | GPIO_PF | 22) | ||
49 | #define PA23_PF_CS5 (GPIO_PORTA | GPIO_PF | 23) | ||
50 | #define PA24_PF_A16 (GPIO_PORTA | GPIO_PF | 24) | ||
51 | #define PA24_AF_ETMTRACEPKT0 (GPIO_PORTA | GPIO_AF | 24) | ||
52 | #define PA25_PF_A17 (GPIO_PORTA | GPIO_PF | 25) | ||
53 | #define PA25_AF_ETMTRACEPKT1 (GPIO_PORTA | GPIO_AF | 25) | ||
54 | #define PA26_PF_A18 (GPIO_PORTA | GPIO_PF | 26) | ||
55 | #define PA26_AF_ETMTRACEPKT2 (GPIO_PORTA | GPIO_AF | 26) | ||
56 | #define PA27_PF_A19 (GPIO_PORTA | GPIO_PF | 27) | ||
57 | #define PA27_AF_ETMTRACEPKT3 (GPIO_PORTA | GPIO_AF | 27) | ||
58 | #define PA28_PF_A20 (GPIO_PORTA | GPIO_PF | 28) | ||
59 | #define PA28_AF_ETMPIPESTAT0 (GPIO_PORTA | GPIO_AF | 28) | ||
60 | #define PA29_PF_A21 (GPIO_PORTA | GPIO_PF | 29) | ||
61 | #define PA29_AF_ETMPIPESTAT1 (GPIO_PORTA | GPIO_AF | 29) | ||
62 | #define PA30_PF_A22 (GPIO_PORTA | GPIO_PF | 30) | ||
63 | #define PA30_AF_ETMPIPESTAT2 (GPIO_PORTA | GPIO_AF | 30) | ||
64 | #define PA31_PF_A23 (GPIO_PORTA | GPIO_PF | 31) | ||
65 | #define PA31_AF_ETMTRACECLK (GPIO_PORTA | GPIO_AF | 31) | ||
66 | #define PB8_PF_SD_DAT0 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 8) | ||
67 | #define PB8_AF_MS_PIO (GPIO_PORTB | GPIO_AF | 8) | ||
68 | #define PB9_PF_SD_DAT1 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 9) | ||
69 | #define PB9_AF_MS_PI1 (GPIO_PORTB | GPIO_AF | 9) | ||
70 | #define PB10_PF_SD_DAT2 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 10) | ||
71 | #define PB10_AF_MS_SCLKI (GPIO_PORTB | GPIO_AF | 10) | ||
72 | #define PB11_PF_SD_DAT3 (GPIO_PORTB | GPIO_PF | 11) | ||
73 | #define PB11_AF_MS_SDIO (GPIO_PORTB | GPIO_AF | 11) | ||
74 | #define PB12_PF_SD_CLK (GPIO_PORTB | GPIO_PF | 12) | ||
75 | #define PB12_AF_MS_SCLK0 (GPIO_PORTB | GPIO_AF | 12) | ||
76 | #define PB13_PF_SD_CMD (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 13) | ||
77 | #define PB13_AF_MS_BS (GPIO_PORTB | GPIO_AF | 13) | ||
78 | #define PB14_AF_SSI_RXFS (GPIO_PORTB | GPIO_AF | 14) | ||
79 | #define PB15_AF_SSI_RXCLK (GPIO_PORTB | GPIO_AF | 15) | ||
80 | #define PB16_AF_SSI_RXDAT (GPIO_PORTB | GPIO_AF | GPIO_IN | 16) | ||
81 | #define PB17_AF_SSI_TXDAT (GPIO_PORTB | GPIO_AF | GPIO_OUT | 17) | ||
82 | #define PB18_AF_SSI_TXFS (GPIO_PORTB | GPIO_AF | 18) | ||
83 | #define PB19_AF_SSI_TXCLK (GPIO_PORTB | GPIO_AF | 19) | ||
84 | #define PB20_PF_USBD_AFE (GPIO_PORTB | GPIO_PF | 20) | ||
85 | #define PB21_PF_USBD_OE (GPIO_PORTB | GPIO_PF | 21) | ||
86 | #define PB22_PF_USBD_RCV (GPIO_PORTB | GPIO_PF | 22) | ||
87 | #define PB23_PF_USBD_SUSPND (GPIO_PORTB | GPIO_PF | 23) | ||
88 | #define PB24_PF_USBD_VP (GPIO_PORTB | GPIO_PF | 24) | ||
89 | #define PB25_PF_USBD_VM (GPIO_PORTB | GPIO_PF | 25) | ||
90 | #define PB26_PF_USBD_VPO (GPIO_PORTB | GPIO_PF | 26) | ||
91 | #define PB27_PF_USBD_VMO (GPIO_PORTB | GPIO_PF | 27) | ||
92 | #define PB28_PF_UART2_CTS (GPIO_PORTB | GPIO_PF | GPIO_OUT | 28) | ||
93 | #define PB29_PF_UART2_RTS (GPIO_PORTB | GPIO_PF | GPIO_IN | 29) | ||
94 | #define PB30_PF_UART2_TXD (GPIO_PORTB | GPIO_PF | GPIO_OUT | 30) | ||
95 | #define PB31_PF_UART2_RXD (GPIO_PORTB | GPIO_PF | GPIO_IN | 31) | ||
96 | #define PC3_PF_SSI_RXFS (GPIO_PORTC | GPIO_PF | 3) | ||
97 | #define PC4_PF_SSI_RXCLK (GPIO_PORTC | GPIO_PF | 4) | ||
98 | #define PC5_PF_SSI_RXDAT (GPIO_PORTC | GPIO_PF | GPIO_IN | 5) | ||
99 | #define PC6_PF_SSI_TXDAT (GPIO_PORTC | GPIO_PF | GPIO_OUT | 6) | ||
100 | #define PC7_PF_SSI_TXFS (GPIO_PORTC | GPIO_PF | 7) | ||
101 | #define PC8_PF_SSI_TXCLK (GPIO_PORTC | GPIO_PF | 8) | ||
102 | #define PC9_PF_UART1_CTS (GPIO_PORTC | GPIO_PF | GPIO_OUT | 9) | ||
103 | #define PC10_PF_UART1_RTS (GPIO_PORTC | GPIO_PF | GPIO_IN | 10) | ||
104 | #define PC11_PF_UART1_TXD (GPIO_PORTC | GPIO_PF | GPIO_OUT | 11) | ||
105 | #define PC12_PF_UART1_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 12) | ||
106 | #define PC13_PF_SPI1_SPI_RDY (GPIO_PORTC | GPIO_PF | 13) | ||
107 | #define PC14_PF_SPI1_SCLK (GPIO_PORTC | GPIO_PF | 14) | ||
108 | #define PC15_PF_SPI1_SS (GPIO_PORTC | GPIO_PF | 15) | ||
109 | #define PC16_PF_SPI1_MISO (GPIO_PORTC | GPIO_PF | 16) | ||
110 | #define PC17_PF_SPI1_MOSI (GPIO_PORTC | GPIO_PF | 17) | ||
111 | #define PC24_BIN_UART3_RI (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 24) | ||
112 | #define PC25_BIN_UART3_DSR (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 25) | ||
113 | #define PC26_AOUT_UART3_DTR (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 26) | ||
114 | #define PC27_BIN_UART3_DCD (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 27) | ||
115 | #define PC28_BIN_UART3_CTS (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 28) | ||
116 | #define PC29_AOUT_UART3_RTS (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 29) | ||
117 | #define PC30_BIN_UART3_TX (GPIO_PORTC | GPIO_BIN | 30) | ||
118 | #define PC31_AOUT_UART3_RX (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 31) | ||
119 | #define PD6_PF_LSCLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 6) | ||
120 | #define PD7_PF_REV (GPIO_PORTD | GPIO_PF | 7) | ||
121 | #define PD7_AF_UART2_DTR (GPIO_PORTD | GPIO_AF | GPIO_IN | 7) | ||
122 | #define PD7_AIN_SPI2_SCLK (GPIO_PORTD | GPIO_AIN | 7) | ||
123 | #define PD8_PF_CLS (GPIO_PORTD | GPIO_PF | 8) | ||
124 | #define PD8_AF_UART2_DCD (GPIO_PORTD | GPIO_AF | GPIO_OUT | 8) | ||
125 | #define PD8_AIN_SPI2_SS (GPIO_PORTD | GPIO_AIN | 8) | ||
126 | #define PD9_PF_PS (GPIO_PORTD | GPIO_PF | 9) | ||
127 | #define PD9_AF_UART2_RI (GPIO_PORTD | GPIO_AF | GPIO_OUT | 9) | ||
128 | #define PD9_AOUT_SPI2_RXD (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 9) | ||
129 | #define PD10_PF_SPL_SPR (GPIO_PORTD | GPIO_PF | GPIO_OUT | 10) | ||
130 | #define PD10_AF_UART2_DSR (GPIO_PORTD | GPIO_AF | GPIO_OUT | 10) | ||
131 | #define PD10_AIN_SPI2_TXD (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 10) | ||
132 | #define PD11_PF_CONTRAST (GPIO_PORTD | GPIO_PF | GPIO_OUT | 11) | ||
133 | #define PD12_PF_ACD_OE (GPIO_PORTD | GPIO_PF | GPIO_OUT | 12) | ||
134 | #define PD13_PF_LP_HSYNC (GPIO_PORTD | GPIO_PF | GPIO_OUT | 13) | ||
135 | #define PD14_PF_FLM_VSYNC (GPIO_PORTD | GPIO_PF | GPIO_OUT | 14) | ||
136 | #define PD15_PF_LD0 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 15) | ||
137 | #define PD16_PF_LD1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 16) | ||
138 | #define PD17_PF_LD2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17) | ||
139 | #define PD18_PF_LD3 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18) | ||
140 | #define PD19_PF_LD4 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 19) | ||
141 | #define PD20_PF_LD5 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 20) | ||
142 | #define PD21_PF_LD6 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 21) | ||
143 | #define PD22_PF_LD7 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 22) | ||
144 | #define PD23_PF_LD8 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 23) | ||
145 | #define PD24_PF_LD9 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 24) | ||
146 | #define PD25_PF_LD10 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25) | ||
147 | #define PD26_PF_LD11 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26) | ||
148 | #define PD27_PF_LD12 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27) | ||
149 | #define PD28_PF_LD13 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 28) | ||
150 | #define PD29_PF_LD14 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 29) | ||
151 | #define PD30_PF_LD15 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 30) | ||
152 | #define PD31_PF_TMR2OUT (GPIO_PORTD | GPIO_PF | 31) | ||
153 | #define PD31_BIN_SPI2_TXD (GPIO_PORTD | GPIO_BIN | 31) | ||
154 | |||
155 | #endif /* ifndef __MACH_IOMUX_MX1_H__ */ | ||
diff --git a/arch/arm/mach-imx/iomux-mx21.h b/arch/arm/mach-imx/iomux-mx21.h deleted file mode 100644 index a70cffceb08..00000000000 --- a/arch/arm/mach-imx/iomux-mx21.h +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
16 | * MA 02110-1301, USA. | ||
17 | */ | ||
18 | #ifndef __MACH_IOMUX_MX21_H__ | ||
19 | #define __MACH_IOMUX_MX21_H__ | ||
20 | |||
21 | #include "iomux-mx2x.h" | ||
22 | #include "iomux-v1.h" | ||
23 | |||
24 | /* Primary GPIO pin functions */ | ||
25 | |||
26 | #define PB22_PF_USBH1_BYP (GPIO_PORTB | GPIO_PF | 22) | ||
27 | #define PB25_PF_USBH1_ON (GPIO_PORTB | GPIO_PF | 25) | ||
28 | #define PC5_PF_USBOTG_SDA (GPIO_PORTC | GPIO_PF | 5) | ||
29 | #define PC6_PF_USBOTG_SCL (GPIO_PORTC | GPIO_PF | 6) | ||
30 | #define PC7_PF_USBOTG_ON (GPIO_PORTC | GPIO_PF | 7) | ||
31 | #define PC8_PF_USBOTG_FS (GPIO_PORTC | GPIO_PF | 8) | ||
32 | #define PC9_PF_USBOTG_OE (GPIO_PORTC | GPIO_PF | 9) | ||
33 | #define PC10_PF_USBOTG_TXDM (GPIO_PORTC | GPIO_PF | 10) | ||
34 | #define PC11_PF_USBOTG_TXDP (GPIO_PORTC | GPIO_PF | 11) | ||
35 | #define PC12_PF_USBOTG_RXDM (GPIO_PORTC | GPIO_PF | 12) | ||
36 | #define PC13_PF_USBOTG_RXDP (GPIO_PORTC | GPIO_PF | 13) | ||
37 | #define PC16_PF_SAP_FS (GPIO_PORTC | GPIO_PF | 16) | ||
38 | #define PC17_PF_SAP_RXD (GPIO_PORTC | GPIO_PF | 17) | ||
39 | #define PC18_PF_SAP_TXD (GPIO_PORTC | GPIO_PF | 18) | ||
40 | #define PC19_PF_SAP_CLK (GPIO_PORTC | GPIO_PF | 19) | ||
41 | #define PE0_PF_TEST_WB2 (GPIO_PORTE | GPIO_PF | 0) | ||
42 | #define PE1_PF_TEST_WB1 (GPIO_PORTE | GPIO_PF | 1) | ||
43 | #define PE2_PF_TEST_WB0 (GPIO_PORTE | GPIO_PF | 2) | ||
44 | #define PF1_PF_NFCE (GPIO_PORTF | GPIO_PF | 1) | ||
45 | #define PF3_PF_NFCLE (GPIO_PORTF | GPIO_PF | 3) | ||
46 | #define PF7_PF_NFIO0 (GPIO_PORTF | GPIO_PF | 7) | ||
47 | #define PF8_PF_NFIO1 (GPIO_PORTF | GPIO_PF | 8) | ||
48 | #define PF9_PF_NFIO2 (GPIO_PORTF | GPIO_PF | 9) | ||
49 | #define PF10_PF_NFIO3 (GPIO_PORTF | GPIO_PF | 10) | ||
50 | #define PF11_PF_NFIO4 (GPIO_PORTF | GPIO_PF | 11) | ||
51 | #define PF12_PF_NFIO5 (GPIO_PORTF | GPIO_PF | 12) | ||
52 | #define PF13_PF_NFIO6 (GPIO_PORTF | GPIO_PF | 13) | ||
53 | #define PF14_PF_NFIO7 (GPIO_PORTF | GPIO_PF | 14) | ||
54 | #define PF16_PF_RES (GPIO_PORTF | GPIO_PF | 16) | ||
55 | |||
56 | /* Alternate GPIO pin functions */ | ||
57 | |||
58 | #define PA5_AF_BMI_CLK_CS (GPIO_PORTA | GPIO_AF | 5) | ||
59 | #define PA6_AF_BMI_D0 (GPIO_PORTA | GPIO_AF | 6) | ||
60 | #define PA7_AF_BMI_D1 (GPIO_PORTA | GPIO_AF | 7) | ||
61 | #define PA8_AF_BMI_D2 (GPIO_PORTA | GPIO_AF | 8) | ||
62 | #define PA9_AF_BMI_D3 (GPIO_PORTA | GPIO_AF | 9) | ||
63 | #define PA10_AF_BMI_D4 (GPIO_PORTA | GPIO_AF | 10) | ||
64 | #define PA11_AF_BMI_D5 (GPIO_PORTA | GPIO_AF | 11) | ||
65 | #define PA12_AF_BMI_D6 (GPIO_PORTA | GPIO_AF | 12) | ||
66 | #define PA13_AF_BMI_D7 (GPIO_PORTA | GPIO_AF | 13) | ||
67 | #define PA14_AF_BMI_D8 (GPIO_PORTA | GPIO_AF | 14) | ||
68 | #define PA15_AF_BMI_D9 (GPIO_PORTA | GPIO_AF | 15) | ||
69 | #define PA16_AF_BMI_D10 (GPIO_PORTA | GPIO_AF | 16) | ||
70 | #define PA17_AF_BMI_D11 (GPIO_PORTA | GPIO_AF | 17) | ||
71 | #define PA18_AF_BMI_D12 (GPIO_PORTA | GPIO_AF | 18) | ||
72 | #define PA19_AF_BMI_D13 (GPIO_PORTA | GPIO_AF | 19) | ||
73 | #define PA20_AF_BMI_D14 (GPIO_PORTA | GPIO_AF | 20) | ||
74 | #define PA21_AF_BMI_D15 (GPIO_PORTA | GPIO_AF | 21) | ||
75 | #define PA22_AF_BMI_READ_REQ (GPIO_PORTA | GPIO_AF | 22) | ||
76 | #define PA23_AF_BMI_WRITE (GPIO_PORTA | GPIO_AF | 23) | ||
77 | #define PA29_AF_BMI_RX_FULL (GPIO_PORTA | GPIO_AF | 29) | ||
78 | #define PA30_AF_BMI_READ (GPIO_PORTA | GPIO_AF | 30) | ||
79 | |||
80 | /* AIN GPIO pin functions */ | ||
81 | |||
82 | #define PC14_AIN_SYS_CLK (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 14) | ||
83 | #define PD21_AIN_USBH2_FS (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 21) | ||
84 | #define PD22_AIN_USBH2_OE (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 22) | ||
85 | #define PD23_AIN_USBH2_TXDM (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 23) | ||
86 | #define PD24_AIN_USBH2_TXDP (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 24) | ||
87 | #define PE8_AIN_IR_TXD (GPIO_PORTE | GPIO_AIN | GPIO_OUT | 8) | ||
88 | #define PF0_AIN_PC_RST (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 0) | ||
89 | #define PF1_AIN_PC_CE1 (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 1) | ||
90 | #define PF2_AIN_PC_CE2 (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 2) | ||
91 | #define PF3_AIN_PC_POE (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 3) | ||
92 | #define PF4_AIN_PC_OE (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 4) | ||
93 | #define PF5_AIN_PC_RW (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 5) | ||
94 | |||
95 | /* BIN GPIO pin functions */ | ||
96 | |||
97 | #define PC14_BIN_SYS_CLK (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 14) | ||
98 | #define PD27_BIN_EXT_DMA_GRANT (GPIO_PORTD | GPIO_BIN | GPIO_OUT | 27) | ||
99 | |||
100 | /* CIN GPIO pin functions */ | ||
101 | |||
102 | #define PB26_CIN_USBH1_RXDAT (GPIO_PORTB | GPIO_CIN | GPIO_OUT | 26) | ||
103 | |||
104 | /* AOUT GPIO pin functions */ | ||
105 | |||
106 | #define PA29_AOUT_BMI_WAIT (GPIO_PORTA | GPIO_AOUT | GPIO_IN | 29) | ||
107 | #define PD19_AOUT_USBH2_RXDM (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 19) | ||
108 | #define PD20_AOUT_USBH2_RXDP (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 20) | ||
109 | #define PD25_AOUT_EXT_DMAREQ (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 25) | ||
110 | #define PD26_AOUT_USBOTG_RXDAT (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 26) | ||
111 | #define PE9_AOUT_IR_RXD (GPIO_PORTE | GPIO_AOUT | GPIO_IN | 9) | ||
112 | #define PF6_AOUT_PC_BVD2 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 6) | ||
113 | #define PF7_AOUT_PC_BVD1 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 7) | ||
114 | #define PF8_AOUT_PC_VS2 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 8) | ||
115 | #define PF9_AOUT_PC_VS1 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 9) | ||
116 | #define PF10_AOUT_PC_WP (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 10) | ||
117 | #define PF11_AOUT_PC_READY (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 11) | ||
118 | #define PF12_AOUT_PC_WAIT (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 12) | ||
119 | #define PF13_AOUT_PC_CD2 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 13) | ||
120 | #define PF14_AOUT_PC_CD1 (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 14) | ||
121 | |||
122 | #endif /* ifndef __MACH_IOMUX_MX21_H__ */ | ||
diff --git a/arch/arm/mach-imx/iomux-mx25.h b/arch/arm/mach-imx/iomux-mx25.h deleted file mode 100644 index be51e838375..00000000000 --- a/arch/arm/mach-imx/iomux-mx25.h +++ /dev/null | |||
@@ -1,524 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-mxc/include/mach/iomux-mx25.h | ||
3 | * | ||
4 | * Copyright (C) 2009 by Lothar Wassmann <LW@KARO-electronics.de> | ||
5 | * | ||
6 | * based on arch/arm/mach-mx25/mx25_pins.h | ||
7 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. | ||
8 | * and | ||
9 | * arch/arm/plat-mxc/include/mach/iomux-mx35.h | ||
10 | * Copyright (C) 2009 by Jan Weitzel Phytec Messtechnik GmbH <armlinux@phytec.de> | ||
11 | * | ||
12 | * The code contained herein is licensed under the GNU General Public | ||
13 | * License. You may obtain a copy of the GNU General Public License | ||
14 | * Version 2 or later at the following locations: | ||
15 | * | ||
16 | * http://www.opensource.org/licenses/gpl-license.html | ||
17 | * http://www.gnu.org/copyleft/gpl.html | ||
18 | */ | ||
19 | #ifndef __MACH_IOMUX_MX25_H__ | ||
20 | #define __MACH_IOMUX_MX25_H__ | ||
21 | |||
22 | #include "iomux-v3.h" | ||
23 | |||
24 | /* | ||
25 | * IOMUX/PAD Bit field definitions | ||
26 | */ | ||
27 | |||
28 | #define MX25_PAD_A10__A10 IOMUX_PAD(0x000, 0x008, 0x00, 0, 0, NO_PAD_CTRL) | ||
29 | #define MX25_PAD_A10__GPIO_4_0 IOMUX_PAD(0x000, 0x008, 0x05, 0, 0, NO_PAD_CTRL) | ||
30 | |||
31 | #define MX25_PAD_A13__A13 IOMUX_PAD(0x22C, 0x00c, 0x00, 0, 0, NO_PAD_CTRL) | ||
32 | #define MX25_PAD_A13__GPIO_4_1 IOMUX_PAD(0x22C, 0x00c, 0x05, 0, 0, NO_PAD_CTRL) | ||
33 | |||
34 | #define MX25_PAD_A14__A14 IOMUX_PAD(0x230, 0x010, 0x10, 0, 0, NO_PAD_CTRL) | ||
35 | #define MX25_PAD_A14__GPIO_2_0 IOMUX_PAD(0x230, 0x010, 0x15, 0, 0, NO_PAD_CTRL) | ||
36 | |||
37 | #define MX25_PAD_A15__A15 IOMUX_PAD(0x234, 0x014, 0x10, 0, 0, NO_PAD_CTRL) | ||
38 | #define MX25_PAD_A15__GPIO_2_1 IOMUX_PAD(0x234, 0x014, 0x15, 0, 0, NO_PAD_CTRL) | ||
39 | |||
40 | #define MX25_PAD_A16__A16 IOMUX_PAD(0x000, 0x018, 0x10, 0, 0, NO_PAD_CTRL) | ||
41 | #define MX25_PAD_A16__GPIO_2_2 IOMUX_PAD(0x000, 0x018, 0x15, 0, 0, NO_PAD_CTRL) | ||
42 | |||
43 | #define MX25_PAD_A17__A17 IOMUX_PAD(0x238, 0x01c, 0x10, 0, 0, NO_PAD_CTRL) | ||
44 | #define MX25_PAD_A17__GPIO_2_3 IOMUX_PAD(0x238, 0x01c, 0x15, 0, 0, NO_PAD_CTRL) | ||
45 | |||
46 | #define MX25_PAD_A18__A18 IOMUX_PAD(0x23c, 0x020, 0x10, 0, 0, NO_PAD_CTRL) | ||
47 | #define MX25_PAD_A18__GPIO_2_4 IOMUX_PAD(0x23c, 0x020, 0x15, 0, 0, NO_PAD_CTRL) | ||
48 | #define MX25_PAD_A18__FEC_COL IOMUX_PAD(0x23c, 0x020, 0x17, 0x504, 0, NO_PAD_CTRL) | ||
49 | |||
50 | #define MX25_PAD_A19__A19 IOMUX_PAD(0x240, 0x024, 0x10, 0, 0, NO_PAD_CTRL) | ||
51 | #define MX25_PAD_A19__FEC_RX_ER IOMUX_PAD(0x240, 0x024, 0x17, 0x518, 0, NO_PAD_CTRL) | ||
52 | #define MX25_PAD_A19__GPIO_2_5 IOMUX_PAD(0x240, 0x024, 0x15, 0, 0, NO_PAD_CTRL) | ||
53 | |||
54 | #define MX25_PAD_A20__A20 IOMUX_PAD(0x244, 0x028, 0x10, 0, 0, NO_PAD_CTRL) | ||
55 | #define MX25_PAD_A20__GPIO_2_6 IOMUX_PAD(0x244, 0x028, 0x15, 0, 0, NO_PAD_CTRL) | ||
56 | #define MX25_PAD_A20__FEC_RDATA2 IOMUX_PAD(0x244, 0x028, 0x17, 0x50c, 0, NO_PAD_CTRL) | ||
57 | |||
58 | #define MX25_PAD_A21__A21 IOMUX_PAD(0x248, 0x02c, 0x10, 0, 0, NO_PAD_CTRL) | ||
59 | #define MX25_PAD_A21__GPIO_2_7 IOMUX_PAD(0x248, 0x02c, 0x15, 0, 0, NO_PAD_CTRL) | ||
60 | #define MX25_PAD_A21__FEC_RDATA3 IOMUX_PAD(0x248, 0x02c, 0x17, 0x510, 0, NO_PAD_CTRL) | ||
61 | |||
62 | #define MX25_PAD_A22__A22 IOMUX_PAD(0x000, 0x030, 0x10, 0, 0, NO_PAD_CTRL) | ||
63 | #define MX25_PAD_A22__GPIO_2_8 IOMUX_PAD(0x000, 0x030, 0x15, 0, 0, NO_PAD_CTRL) | ||
64 | |||
65 | #define MX25_PAD_A23__A23 IOMUX_PAD(0x24c, 0x034, 0x10, 0, 0, NO_PAD_CTRL) | ||
66 | #define MX25_PAD_A23__GPIO_2_9 IOMUX_PAD(0x24c, 0x034, 0x15, 0, 0, NO_PAD_CTRL) | ||
67 | |||
68 | #define MX25_PAD_A24__A24 IOMUX_PAD(0x250, 0x038, 0x10, 0, 0, NO_PAD_CTRL) | ||
69 | #define MX25_PAD_A24__GPIO_2_10 IOMUX_PAD(0x250, 0x038, 0x15, 0, 0, NO_PAD_CTRL) | ||
70 | #define MX25_PAD_A24__FEC_RX_CLK IOMUX_PAD(0x250, 0x038, 0x17, 0x514, 0, NO_PAD_CTRL) | ||
71 | |||
72 | #define MX25_PAD_A25__A25 IOMUX_PAD(0x254, 0x03c, 0x10, 0, 0, NO_PAD_CTRL) | ||
73 | #define MX25_PAD_A25__GPIO_2_11 IOMUX_PAD(0x254, 0x03c, 0x15, 0, 0, NO_PAD_CTRL) | ||
74 | #define MX25_PAD_A25__FEC_CRS IOMUX_PAD(0x254, 0x03c, 0x17, 0x508, 0, NO_PAD_CTRL) | ||
75 | |||
76 | #define MX25_PAD_EB0__EB0 IOMUX_PAD(0x258, 0x040, 0x10, 0, 0, NO_PAD_CTRL) | ||
77 | #define MX25_PAD_EB0__AUD4_TXD IOMUX_PAD(0x258, 0x040, 0x14, 0x464, 0, NO_PAD_CTRL) | ||
78 | #define MX25_PAD_EB0__GPIO_2_12 IOMUX_PAD(0x258, 0x040, 0x15, 0, 0, NO_PAD_CTRL) | ||
79 | |||
80 | #define MX25_PAD_EB1__EB1 IOMUX_PAD(0x25c, 0x044, 0x10, 0, 0, NO_PAD_CTRL) | ||
81 | #define MX25_PAD_EB1__AUD4_RXD IOMUX_PAD(0x25c, 0x044, 0x14, 0x460, 0, NO_PAD_CTRL) | ||
82 | #define MX25_PAD_EB1__GPIO_2_13 IOMUX_PAD(0x25c, 0x044, 0x15, 0, 0, NO_PAD_CTRL) | ||
83 | |||
84 | #define MX25_PAD_OE__OE IOMUX_PAD(0x260, 0x048, 0x10, 0, 0, NO_PAD_CTRL) | ||
85 | #define MX25_PAD_OE__AUD4_TXC IOMUX_PAD(0x260, 0x048, 0x14, 0, 0, NO_PAD_CTRL) | ||
86 | #define MX25_PAD_OE__GPIO_2_14 IOMUX_PAD(0x260, 0x048, 0x15, 0, 0, NO_PAD_CTRL) | ||
87 | |||
88 | #define MX25_PAD_CS0__CS0 IOMUX_PAD(0x000, 0x04c, 0x00, 0, 0, NO_PAD_CTRL) | ||
89 | #define MX25_PAD_CS0__GPIO_4_2 IOMUX_PAD(0x000, 0x04c, 0x05, 0, 0, NO_PAD_CTRL) | ||
90 | |||
91 | #define MX25_PAD_CS1__CS1 IOMUX_PAD(0x000, 0x050, 0x00, 0, 0, NO_PAD_CTRL) | ||
92 | #define MX25_PAD_CS1__NF_CE3 IOMUX_PAD(0x000, 0x050, 0x01, 0, 0, NO_PAD_CTRL) | ||
93 | #define MX25_PAD_CS1__GPIO_4_3 IOMUX_PAD(0x000, 0x050, 0x05, 0, 0, NO_PAD_CTRL) | ||
94 | |||
95 | #define MX25_PAD_CS4__CS4 IOMUX_PAD(0x264, 0x054, 0x10, 0, 0, NO_PAD_CTRL) | ||
96 | #define MX25_PAD_CS4__NF_CE1 IOMUX_PAD(0x264, 0x054, 0x01, 0, 0, NO_PAD_CTRL) | ||
97 | #define MX25_PAD_CS4__UART5_CTS IOMUX_PAD(0x264, 0x054, 0x13, 0, 0, NO_PAD_CTRL) | ||
98 | #define MX25_PAD_CS4__GPIO_3_20 IOMUX_PAD(0x264, 0x054, 0x15, 0, 0, NO_PAD_CTRL) | ||
99 | |||
100 | #define MX25_PAD_CS5__CS5 IOMUX_PAD(0x268, 0x058, 0x10, 0, 0, NO_PAD_CTRL) | ||
101 | #define MX25_PAD_CS5__NF_CE2 IOMUX_PAD(0x268, 0x058, 0x01, 0, 0, NO_PAD_CTRL) | ||
102 | #define MX25_PAD_CS5__UART5_RTS IOMUX_PAD(0x268, 0x058, 0x13, 0x574, 0, NO_PAD_CTRL) | ||
103 | #define MX25_PAD_CS5__GPIO_3_21 IOMUX_PAD(0x268, 0x058, 0x15, 0, 0, NO_PAD_CTRL) | ||
104 | |||
105 | #define MX25_PAD_NF_CE0__NF_CE0 IOMUX_PAD(0x26c, 0x05c, 0x10, 0, 0, NO_PAD_CTRL) | ||
106 | #define MX25_PAD_NF_CE0__GPIO_3_22 IOMUX_PAD(0x26c, 0x05c, 0x15, 0, 0, NO_PAD_CTRL) | ||
107 | |||
108 | #define MX25_PAD_ECB__ECB IOMUX_PAD(0x270, 0x060, 0x10, 0, 0, NO_PAD_CTRL) | ||
109 | #define MX25_PAD_ECB__UART5_TXD_MUX IOMUX_PAD(0x270, 0x060, 0x13, 0, 0, NO_PAD_CTRL) | ||
110 | #define MX25_PAD_ECB__GPIO_3_23 IOMUX_PAD(0x270, 0x060, 0x15, 0, 0, NO_PAD_CTRL) | ||
111 | |||
112 | #define MX25_PAD_LBA__LBA IOMUX_PAD(0x274, 0x064, 0x10, 0, 0, NO_PAD_CTRL) | ||
113 | #define MX25_PAD_LBA__UART5_RXD_MUX IOMUX_PAD(0x274, 0x064, 0x13, 0x578, 0, NO_PAD_CTRL) | ||
114 | #define MX25_PAD_LBA__GPIO_3_24 IOMUX_PAD(0x274, 0x064, 0x15, 0, 0, NO_PAD_CTRL) | ||
115 | |||
116 | #define MX25_PAD_BCLK__BCLK IOMUX_PAD(0x000, 0x068, 0x00, 0, 0, NO_PAD_CTRL) | ||
117 | #define MX25_PAD_BCLK__GPIO_4_4 IOMUX_PAD(0x000, 0x068, 0x05, 0, 0, NO_PAD_CTRL) | ||
118 | |||
119 | #define MX25_PAD_RW__RW IOMUX_PAD(0x278, 0x06c, 0x10, 0, 0, NO_PAD_CTRL) | ||
120 | #define MX25_PAD_RW__AUD4_TXFS IOMUX_PAD(0x278, 0x06c, 0x14, 0x474, 0, NO_PAD_CTRL) | ||
121 | #define MX25_PAD_RW__GPIO_3_25 IOMUX_PAD(0x278, 0x06c, 0x15, 0, 0, NO_PAD_CTRL) | ||
122 | |||
123 | #define MX25_PAD_NFWE_B__NFWE_B IOMUX_PAD(0x000, 0x070, 0x10, 0, 0, NO_PAD_CTRL) | ||
124 | #define MX25_PAD_NFWE_B__GPIO_3_26 IOMUX_PAD(0x000, 0x070, 0x15, 0, 0, NO_PAD_CTRL) | ||
125 | |||
126 | #define MX25_PAD_NFRE_B__NFRE_B IOMUX_PAD(0x000, 0x074, 0x10, 0, 0, NO_PAD_CTRL) | ||
127 | #define MX25_PAD_NFRE_B__GPIO_3_27 IOMUX_PAD(0x000, 0x074, 0x15, 0, 0, NO_PAD_CTRL) | ||
128 | |||
129 | #define MX25_PAD_NFALE__NFALE IOMUX_PAD(0x000, 0x078, 0x10, 0, 0, NO_PAD_CTRL) | ||
130 | #define MX25_PAD_NFALE__GPIO_3_28 IOMUX_PAD(0x000, 0x078, 0x15, 0, 0, NO_PAD_CTRL) | ||
131 | |||
132 | #define MX25_PAD_NFCLE__NFCLE IOMUX_PAD(0x000, 0x07c, 0x10, 0, 0, NO_PAD_CTRL) | ||
133 | #define MX25_PAD_NFCLE__GPIO_3_29 IOMUX_PAD(0x000, 0x07c, 0x15, 0, 0, NO_PAD_CTRL) | ||
134 | |||
135 | #define MX25_PAD_NFWP_B__NFWP_B IOMUX_PAD(0x000, 0x080, 0x10, 0, 0, NO_PAD_CTRL) | ||
136 | #define MX25_PAD_NFWP_B__GPIO_3_30 IOMUX_PAD(0x000, 0x080, 0x15, 0, 0, NO_PAD_CTRL) | ||
137 | |||
138 | #define MX25_PAD_NFRB__NFRB IOMUX_PAD(0x27c, 0x084, 0x10, 0, 0, PAD_CTL_PKE) | ||
139 | #define MX25_PAD_NFRB__GPIO_3_31 IOMUX_PAD(0x27c, 0x084, 0x15, 0, 0, NO_PAD_CTRL) | ||
140 | |||
141 | #define MX25_PAD_D15__D15 IOMUX_PAD(0x280, 0x088, 0x00, 0, 0, NO_PAD_CTRL) | ||
142 | #define MX25_PAD_D15__LD16 IOMUX_PAD(0x280, 0x088, 0x01, 0, 0, PAD_CTL_SRE_FAST) | ||
143 | #define MX25_PAD_D15__GPIO_4_5 IOMUX_PAD(0x280, 0x088, 0x05, 0, 0, NO_PAD_CTRL) | ||
144 | |||
145 | #define MX25_PAD_D14__D14 IOMUX_PAD(0x284, 0x08c, 0x00, 0, 0, NO_PAD_CTRL) | ||
146 | #define MX25_PAD_D14__LD17 IOMUX_PAD(0x284, 0x08c, 0x01, 0, 0, PAD_CTL_SRE_FAST) | ||
147 | #define MX25_PAD_D14__GPIO_4_6 IOMUX_PAD(0x284, 0x08c, 0x05, 0, 0, NO_PAD_CTRL) | ||
148 | |||
149 | #define MX25_PAD_D13__D13 IOMUX_PAD(0x288, 0x090, 0x00, 0, 0, NO_PAD_CTRL) | ||
150 | #define MX25_PAD_D13__LD18 IOMUX_PAD(0x288, 0x090, 0x01, 0, 0, PAD_CTL_SRE_FAST) | ||
151 | #define MX25_PAD_D13__GPIO_4_7 IOMUX_PAD(0x288, 0x090, 0x05, 0, 0, NO_PAD_CTRL) | ||
152 | |||
153 | #define MX25_PAD_D12__D12 IOMUX_PAD(0x28c, 0x094, 0x00, 0, 0, NO_PAD_CTRL) | ||
154 | #define MX25_PAD_D12__GPIO_4_8 IOMUX_PAD(0x28c, 0x094, 0x05, 0, 0, NO_PAD_CTRL) | ||
155 | |||
156 | #define MX25_PAD_D11__D11 IOMUX_PAD(0x290, 0x098, 0x00, 0, 0, NO_PAD_CTRL) | ||
157 | #define MX25_PAD_D11__GPIO_4_9 IOMUX_PAD(0x290, 0x098, 0x05, 0, 0, NO_PAD_CTRL) | ||
158 | |||
159 | #define MX25_PAD_D10__D10 IOMUX_PAD(0x294, 0x09c, 0x00, 0, 0, NO_PAD_CTRL) | ||
160 | #define MX25_PAD_D10__GPIO_4_10 IOMUX_PAD(0x294, 0x09c, 0x05, 0, 0, NO_PAD_CTRL) | ||
161 | #define MX25_PAD_D10__USBOTG_OC IOMUX_PAD(0x294, 0x09c, 0x06, 0x57c, 0, PAD_CTL_PUS_100K_UP) | ||
162 | |||
163 | #define MX25_PAD_D9__D9 IOMUX_PAD(0x298, 0x0a0, 0x00, 0, 0, NO_PAD_CTRL) | ||
164 | #define MX25_PAD_D9__GPIO_4_11 IOMUX_PAD(0x298, 0x0a0, 0x05, 0, 0, NO_PAD_CTRL) | ||
165 | #define MX25_PAD_D9__USBH2_PWR IOMUX_PAD(0x298, 0x0a0, 0x06, 0, 0, PAD_CTL_PKE) | ||
166 | |||
167 | #define MX25_PAD_D8__D8 IOMUX_PAD(0x29c, 0x0a4, 0x00, 0, 0, NO_PAD_CTRL) | ||
168 | #define MX25_PAD_D8__GPIO_4_12 IOMUX_PAD(0x29c, 0x0a4, 0x05, 0, 0, NO_PAD_CTRL) | ||
169 | #define MX25_PAD_D8__USBH2_OC IOMUX_PAD(0x29c, 0x0a4, 0x06, 0x580, 0, PAD_CTL_PUS_100K_UP) | ||
170 | |||
171 | #define MX25_PAD_D7__D7 IOMUX_PAD(0x2a0, 0x0a8, 0x00, 0, 0, NO_PAD_CTRL) | ||
172 | #define MX25_PAD_D7__GPIO_4_13 IOMUX_PAD(0x2a0, 0x0a8, 0x05, 0, 0, NO_PAD_CTRL) | ||
173 | |||
174 | #define MX25_PAD_D6__D6 IOMUX_PAD(0x2a4, 0x0ac, 0x00, 0, 0, NO_PAD_CTRL) | ||
175 | #define MX25_PAD_D6__GPIO_4_14 IOMUX_PAD(0x2a4, 0x0ac, 0x05, 0, 0, NO_PAD_CTRL) | ||
176 | |||
177 | #define MX25_PAD_D5__D5 IOMUX_PAD(0x2a8, 0x0b0, 0x00, 0, 0, NO_PAD_CTRL) | ||
178 | #define MX25_PAD_D5__GPIO_4_15 IOMUX_PAD(0x2a8, 0x0b0, 0x05, 0, 0, NO_PAD_CTRL) | ||
179 | |||
180 | #define MX25_PAD_D4__D4 IOMUX_PAD(0x2ac, 0x0b4, 0x00, 0, 0, NO_PAD_CTRL) | ||
181 | #define MX25_PAD_D4__GPIO_4_16 IOMUX_PAD(0x2ac, 0x0b4, 0x05, 0, 0, NO_PAD_CTRL) | ||
182 | |||
183 | #define MX25_PAD_D3__D3 IOMUX_PAD(0x2b0, 0x0b8, 0x00, 0, 0, NO_PAD_CTRL) | ||
184 | #define MX25_PAD_D3__GPIO_4_17 IOMUX_PAD(0x2b0, 0x0b8, 0x05, 0, 0, NO_PAD_CTRL) | ||
185 | |||
186 | #define MX25_PAD_D2__D2 IOMUX_PAD(0x2b4, 0x0bc, 0x00, 0, 0, NO_PAD_CTRL) | ||
187 | #define MX25_PAD_D2__GPIO_4_18 IOMUX_PAD(0x2b4, 0x0bc, 0x05, 0, 0, NO_PAD_CTRL) | ||
188 | |||
189 | #define MX25_PAD_D1__D1 IOMUX_PAD(0x2b8, 0x0c0, 0x00, 0, 0, NO_PAD_CTRL) | ||
190 | #define MX25_PAD_D1__GPIO_4_19 IOMUX_PAD(0x2b8, 0x0c0, 0x05, 0, 0, NO_PAD_CTRL) | ||
191 | |||
192 | #define MX25_PAD_D0__D0 IOMUX_PAD(0x2bc, 0x0c4, 0x00, 0, 0, NO_PAD_CTRL) | ||
193 | #define MX25_PAD_D0__GPIO_4_20 IOMUX_PAD(0x2bc, 0x0c4, 0x05, 0, 0, NO_PAD_CTRL) | ||
194 | |||
195 | #define MX25_PAD_LD0__LD0 IOMUX_PAD(0x2c0, 0x0c8, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
196 | #define MX25_PAD_LD0__CSI_D0 IOMUX_PAD(0x2c0, 0x0c8, 0x12, 0x488, 0, NO_PAD_CTRL) | ||
197 | #define MX25_PAD_LD0__GPIO_2_15 IOMUX_PAD(0x2c0, 0x0c8, 0x15, 0, 0, NO_PAD_CTRL) | ||
198 | |||
199 | #define MX25_PAD_LD1__LD1 IOMUX_PAD(0x2c4, 0x0cc, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
200 | #define MX25_PAD_LD1__CSI_D1 IOMUX_PAD(0x2c4, 0x0cc, 0x12, 0x48c, 0, NO_PAD_CTRL) | ||
201 | #define MX25_PAD_LD1__GPIO_2_16 IOMUX_PAD(0x2c4, 0x0cc, 0x15, 0, 0, NO_PAD_CTRL) | ||
202 | |||
203 | #define MX25_PAD_LD2__LD2 IOMUX_PAD(0x2c8, 0x0d0, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
204 | #define MX25_PAD_LD2__GPIO_2_17 IOMUX_PAD(0x2c8, 0x0d0, 0x15, 0, 0, NO_PAD_CTRL) | ||
205 | |||
206 | #define MX25_PAD_LD3__LD3 IOMUX_PAD(0x2cc, 0x0d4, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
207 | #define MX25_PAD_LD3__GPIO_2_18 IOMUX_PAD(0x2cc, 0x0d4, 0x15, 0, 0, NO_PAD_CTRL) | ||
208 | |||
209 | #define MX25_PAD_LD4__LD4 IOMUX_PAD(0x2d0, 0x0d8, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
210 | #define MX25_PAD_LD4__GPIO_2_19 IOMUX_PAD(0x2d0, 0x0d8, 0x15, 0, 0, NO_PAD_CTRL) | ||
211 | |||
212 | #define MX25_PAD_LD5__LD5 IOMUX_PAD(0x2d4, 0x0dc, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
213 | #define MX25_PAD_LD5__GPIO_1_19 IOMUX_PAD(0x2d4, 0x0dc, 0x15, 0, 0, NO_PAD_CTRL) | ||
214 | |||
215 | #define MX25_PAD_LD6__LD6 IOMUX_PAD(0x2d8, 0x0e0, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
216 | #define MX25_PAD_LD6__GPIO_1_20 IOMUX_PAD(0x2d8, 0x0e0, 0x15, 0, 0, NO_PAD_CTRL) | ||
217 | |||
218 | #define MX25_PAD_LD7__LD7 IOMUX_PAD(0x2dc, 0x0e4, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
219 | #define MX25_PAD_LD7__GPIO_1_21 IOMUX_PAD(0x2dc, 0x0e4, 0x15, 0, 0, NO_PAD_CTRL) | ||
220 | |||
221 | #define MX25_PAD_LD8__LD8 IOMUX_PAD(0x2e0, 0x0e8, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
222 | #define MX25_PAD_LD8__FEC_TX_ERR IOMUX_PAD(0x2e0, 0x0e8, 0x15, 0, 0, NO_PAD_CTRL) | ||
223 | |||
224 | #define MX25_PAD_LD9__LD9 IOMUX_PAD(0x2e4, 0x0ec, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
225 | #define MX25_PAD_LD9__FEC_COL IOMUX_PAD(0x2e4, 0x0ec, 0x15, 0x504, 1, NO_PAD_CTRL) | ||
226 | |||
227 | #define MX25_PAD_LD10__LD10 IOMUX_PAD(0x2e8, 0x0f0, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
228 | #define MX25_PAD_LD10__FEC_RX_ER IOMUX_PAD(0x2e8, 0x0f0, 0x15, 0x518, 1, NO_PAD_CTRL) | ||
229 | |||
230 | #define MX25_PAD_LD11__LD11 IOMUX_PAD(0x2ec, 0x0f4, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
231 | #define MX25_PAD_LD11__FEC_RDATA2 IOMUX_PAD(0x2ec, 0x0f4, 0x15, 0x50c, 1, NO_PAD_CTRL) | ||
232 | |||
233 | #define MX25_PAD_LD12__LD12 IOMUX_PAD(0x2f0, 0x0f8, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
234 | #define MX25_PAD_LD12__FEC_RDATA3 IOMUX_PAD(0x2f0, 0x0f8, 0x15, 0x510, 1, NO_PAD_CTRL) | ||
235 | |||
236 | #define MX25_PAD_LD13__LD13 IOMUX_PAD(0x2f4, 0x0fc, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
237 | #define MX25_PAD_LD13__FEC_TDATA2 IOMUX_PAD(0x2f4, 0x0fc, 0x15, 0, 0, NO_PAD_CTRL) | ||
238 | |||
239 | #define MX25_PAD_LD14__LD14 IOMUX_PAD(0x2f8, 0x100, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
240 | #define MX25_PAD_LD14__FEC_TDATA3 IOMUX_PAD(0x2f8, 0x100, 0x15, 0, 0, NO_PAD_CTRL) | ||
241 | |||
242 | #define MX25_PAD_LD15__LD15 IOMUX_PAD(0x2fc, 0x104, 0x10, 0, 0, PAD_CTL_SRE_FAST) | ||
243 | #define MX25_PAD_LD15__FEC_RX_CLK IOMUX_PAD(0x2fc, 0x104, 0x15, 0x514, 1, NO_PAD_CTRL) | ||
244 | |||
245 | #define MX25_PAD_HSYNC__HSYNC IOMUX_PAD(0x300, 0x108, 0x10, 0, 0, NO_PAD_CTRL) | ||
246 | #define MX25_PAD_HSYNC__GPIO_1_22 IOMUX_PAD(0x300, 0x108, 0x15, 0, 0, NO_PAD_CTRL) | ||
247 | |||
248 | #define MX25_PAD_VSYNC__VSYNC IOMUX_PAD(0x304, 0x10c, 0x10, 0, 0, NO_PAD_CTRL) | ||
249 | #define MX25_PAD_VSYNC__GPIO_1_23 IOMUX_PAD(0x304, 0x10c, 0x15, 0, 0, NO_PAD_CTRL) | ||
250 | |||
251 | #define MX25_PAD_LSCLK__LSCLK IOMUX_PAD(0x308, 0x110, 0x10, 0, 0, NO_PAD_CTRL) | ||
252 | #define MX25_PAD_LSCLK__GPIO_1_24 IOMUX_PAD(0x308, 0x110, 0x15, 0, 0, NO_PAD_CTRL) | ||
253 | |||
254 | #define MX25_PAD_OE_ACD__OE_ACD IOMUX_PAD(0x30c, 0x114, 0x10, 0, 0, NO_PAD_CTRL) | ||
255 | #define MX25_PAD_OE_ACD__GPIO_1_25 IOMUX_PAD(0x30c, 0x114, 0x15, 0, 0, NO_PAD_CTRL) | ||
256 | |||
257 | #define MX25_PAD_CONTRAST__CONTRAST IOMUX_PAD(0x310, 0x118, 0x10, 0, 0, NO_PAD_CTRL) | ||
258 | #define MX25_PAD_CONTRAST__PWM4_PWMO IOMUX_PAD(0x310, 0x118, 0x14, 0, 0, NO_PAD_CTRL) | ||
259 | #define MX25_PAD_CONTRAST__FEC_CRS IOMUX_PAD(0x310, 0x118, 0x15, 0x508, 1, NO_PAD_CTRL) | ||
260 | |||
261 | #define MX25_PAD_PWM__PWM IOMUX_PAD(0x314, 0x11c, 0x10, 0, 0, NO_PAD_CTRL) | ||
262 | #define MX25_PAD_PWM__GPIO_1_26 IOMUX_PAD(0x314, 0x11c, 0x15, 0, 0, NO_PAD_CTRL) | ||
263 | #define MX25_PAD_PWM__USBH2_OC IOMUX_PAD(0x314, 0x11c, 0x16, 0x580, 1, PAD_CTL_PUS_100K_UP) | ||
264 | |||
265 | #define MX25_PAD_CSI_D2__CSI_D2 IOMUX_PAD(0x318, 0x120, 0x10, 0, 0, NO_PAD_CTRL) | ||
266 | #define MX25_PAD_CSI_D2__UART5_RXD_MUX IOMUX_PAD(0x318, 0x120, 0x11, 0x578, 1, NO_PAD_CTRL) | ||
267 | #define MX25_PAD_CSI_D2__GPIO_1_27 IOMUX_PAD(0x318, 0x120, 0x15, 0, 0, NO_PAD_CTRL) | ||
268 | #define MX25_PAD_CSI_D2__CSPI3_MOSI IOMUX_PAD(0x318, 0x120, 0x17, 0, 0, NO_PAD_CTRL) | ||
269 | |||
270 | #define MX25_PAD_CSI_D3__CSI_D3 IOMUX_PAD(0x31c, 0x124, 0x10, 0, 0, NO_PAD_CTRL) | ||
271 | #define MX25_PAD_CSI_D3__GPIO_1_28 IOMUX_PAD(0x31c, 0x124, 0x15, 0, 0, NO_PAD_CTRL) | ||
272 | #define MX25_PAD_CSI_D3__CSPI3_MISO IOMUX_PAD(0x31c, 0x124, 0x17, 0x4b4, 1, NO_PAD_CTRL) | ||
273 | |||
274 | #define MX25_PAD_CSI_D4__CSI_D4 IOMUX_PAD(0x320, 0x128, 0x10, 0, 0, NO_PAD_CTRL) | ||
275 | #define MX25_PAD_CSI_D4__UART5_RTS IOMUX_PAD(0x320, 0x128, 0x11, 0x574, 1, NO_PAD_CTRL) | ||
276 | #define MX25_PAD_CSI_D4__GPIO_1_29 IOMUX_PAD(0x320, 0x128, 0x15, 0, 0, NO_PAD_CTRL) | ||
277 | #define MX25_PAD_CSI_D4__CSPI3_SCLK IOMUX_PAD(0x320, 0x128, 0x17, 0, 0, NO_PAD_CTRL) | ||
278 | |||
279 | #define MX25_PAD_CSI_D5__CSI_D5 IOMUX_PAD(0x324, 0x12c, 0x10, 0, 0, NO_PAD_CTRL) | ||
280 | #define MX25_PAD_CSI_D5__GPIO_1_30 IOMUX_PAD(0x324, 0x12c, 0x15, 0, 0, NO_PAD_CTRL) | ||
281 | #define MX25_PAD_CSI_D5__CSPI3_RDY IOMUX_PAD(0x324, 0x12c, 0x17, 0, 0, NO_PAD_CTRL) | ||
282 | |||
283 | #define MX25_PAD_CSI_D6__CSI_D6 IOMUX_PAD(0x328, 0x130, 0x10, 0, 0, NO_PAD_CTRL) | ||
284 | #define MX25_PAD_CSI_D6__GPIO_1_31 IOMUX_PAD(0x328, 0x130, 0x15, 0, 0, NO_PAD_CTRL) | ||
285 | |||
286 | #define MX25_PAD_CSI_D7__CSI_D7 IOMUX_PAD(0x32c, 0x134, 0x10, 0, 0, NO_PAD_CTRL) | ||
287 | #define MX25_PAD_CSI_D7__GPIO_1_6 IOMUX_PAD(0x32c, 0x134, 0x15, 0, 0, NO_PAD_CTRL) | ||
288 | |||
289 | #define MX25_PAD_CSI_D8__CSI_D8 IOMUX_PAD(0x330, 0x138, 0x10, 0, 0, NO_PAD_CTRL) | ||
290 | #define MX25_PAD_CSI_D8__GPIO_1_7 IOMUX_PAD(0x330, 0x138, 0x15, 0, 0, NO_PAD_CTRL) | ||
291 | |||
292 | #define MX25_PAD_CSI_D9__CSI_D9 IOMUX_PAD(0x334, 0x13c, 0x10, 0, 0, NO_PAD_CTRL) | ||
293 | #define MX25_PAD_CSI_D9__GPIO_4_21 IOMUX_PAD(0x334, 0x13c, 0x15, 0, 0, NO_PAD_CTRL) | ||
294 | |||
295 | #define MX25_PAD_CSI_MCLK__CSI_MCLK IOMUX_PAD(0x338, 0x140, 0x10, 0, 0, NO_PAD_CTRL) | ||
296 | #define MX25_PAD_CSI_MCLK__GPIO_1_8 IOMUX_PAD(0x338, 0x140, 0x15, 0, 0, NO_PAD_CTRL) | ||
297 | |||
298 | #define MX25_PAD_CSI_VSYNC__CSI_VSYNC IOMUX_PAD(0x33c, 0x144, 0x10, 0, 0, NO_PAD_CTRL) | ||
299 | #define MX25_PAD_CSI_VSYNC__GPIO_1_9 IOMUX_PAD(0x33c, 0x144, 0x15, 0, 0, NO_PAD_CTRL) | ||
300 | |||
301 | #define MX25_PAD_CSI_HSYNC__CSI_HSYNC IOMUX_PAD(0x340, 0x148, 0x10, 0, 0, NO_PAD_CTRL) | ||
302 | #define MX25_PAD_CSI_HSYNC__GPIO_1_10 IOMUX_PAD(0x340, 0x148, 0x15, 0, 0, NO_PAD_CTRL) | ||
303 | |||
304 | #define MX25_PAD_CSI_PIXCLK__CSI_PIXCLK IOMUX_PAD(0x344, 0x14c, 0x10, 0, 0, NO_PAD_CTRL) | ||
305 | #define MX25_PAD_CSI_PIXCLK__GPIO_1_11 IOMUX_PAD(0x344, 0x14c, 0x15, 0, 0, NO_PAD_CTRL) | ||
306 | |||
307 | #define MX25_PAD_I2C1_CLK__I2C1_CLK IOMUX_PAD(0x348, 0x150, 0x10, 0, 0, NO_PAD_CTRL) | ||
308 | #define MX25_PAD_I2C1_CLK__GPIO_1_12 IOMUX_PAD(0x348, 0x150, 0x15, 0, 0, NO_PAD_CTRL) | ||
309 | |||
310 | #define MX25_PAD_I2C1_DAT__I2C1_DAT IOMUX_PAD(0x34c, 0x154, 0x10, 0, 0, NO_PAD_CTRL) | ||
311 | #define MX25_PAD_I2C1_DAT__GPIO_1_13 IOMUX_PAD(0x34c, 0x154, 0x15, 0, 0, NO_PAD_CTRL) | ||
312 | |||
313 | #define MX25_PAD_CSPI1_MOSI__CSPI1_MOSI IOMUX_PAD(0x350, 0x158, 0x10, 0, 0, NO_PAD_CTRL) | ||
314 | #define MX25_PAD_CSPI1_MOSI__GPIO_1_14 IOMUX_PAD(0x350, 0x158, 0x15, 0, 0, NO_PAD_CTRL) | ||
315 | |||
316 | #define MX25_PAD_CSPI1_MISO__CSPI1_MISO IOMUX_PAD(0x354, 0x15c, 0x10, 0, 0, NO_PAD_CTRL) | ||
317 | #define MX25_PAD_CSPI1_MISO__GPIO_1_15 IOMUX_PAD(0x354, 0x15c, 0x15, 0, 0, NO_PAD_CTRL) | ||
318 | |||
319 | #define MX25_PAD_CSPI1_SS0__CSPI1_SS0 IOMUX_PAD(0x358, 0x160, 0x10, 0, 0, NO_PAD_CTRL) | ||
320 | #define MX25_PAD_CSPI1_SS0__GPIO_1_16 IOMUX_PAD(0x358, 0x160, 0x15, 0, 0, NO_PAD_CTRL) | ||
321 | |||
322 | #define MX25_PAD_CSPI1_SS1__CSPI1_SS1 IOMUX_PAD(0x35c, 0x164, 0x10, 0, 0, NO_PAD_CTRL) | ||
323 | #define MX25_PAD_CSPI1_SS1__GPIO_1_17 IOMUX_PAD(0x35c, 0x164, 0x15, 0, 0, NO_PAD_CTRL) | ||
324 | |||
325 | #define MX25_PAD_CSPI1_SCLK__CSPI1_SCLK IOMUX_PAD(0x360, 0x168, 0x10, 0, 0, NO_PAD_CTRL) | ||
326 | #define MX25_PAD_CSPI1_SCLK__GPIO_1_18 IOMUX_PAD(0x360, 0x168, 0x15, 0, 0, NO_PAD_CTRL) | ||
327 | |||
328 | #define MX25_PAD_CSPI1_RDY__CSPI1_RDY IOMUX_PAD(0x364, 0x16c, 0x10, 0, 0, PAD_CTL_PKE) | ||
329 | #define MX25_PAD_CSPI1_RDY__GPIO_2_22 IOMUX_PAD(0x364, 0x16c, 0x15, 0, 0, NO_PAD_CTRL) | ||
330 | |||
331 | #define MX25_PAD_UART1_RXD__UART1_RXD IOMUX_PAD(0x368, 0x170, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN) | ||
332 | #define MX25_PAD_UART1_RXD__GPIO_4_22 IOMUX_PAD(0x368, 0x170, 0x15, 0, 0, NO_PAD_CTRL) | ||
333 | |||
334 | #define MX25_PAD_UART1_TXD__UART1_TXD IOMUX_PAD(0x36c, 0x174, 0x10, 0, 0, NO_PAD_CTRL) | ||
335 | #define MX25_PAD_UART1_TXD__GPIO_4_23 IOMUX_PAD(0x36c, 0x174, 0x15, 0, 0, NO_PAD_CTRL) | ||
336 | |||
337 | #define MX25_PAD_UART1_RTS__UART1_RTS IOMUX_PAD(0x370, 0x178, 0x10, 0, 0, PAD_CTL_PUS_100K_UP) | ||
338 | #define MX25_PAD_UART1_RTS__CSI_D0 IOMUX_PAD(0x370, 0x178, 0x11, 0x488, 1, NO_PAD_CTRL) | ||
339 | #define MX25_PAD_UART1_RTS__GPIO_4_24 IOMUX_PAD(0x370, 0x178, 0x15, 0, 0, NO_PAD_CTRL) | ||
340 | |||
341 | #define MX25_PAD_UART1_CTS__UART1_CTS IOMUX_PAD(0x374, 0x17c, 0x10, 0, 0, PAD_CTL_PUS_100K_UP) | ||
342 | #define MX25_PAD_UART1_CTS__CSI_D1 IOMUX_PAD(0x374, 0x17c, 0x11, 0x48c, 1, NO_PAD_CTRL) | ||
343 | #define MX25_PAD_UART1_CTS__GPIO_4_25 IOMUX_PAD(0x374, 0x17c, 0x15, 0, 0, NO_PAD_CTRL) | ||
344 | |||
345 | #define MX25_PAD_UART2_RXD__UART2_RXD IOMUX_PAD(0x378, 0x180, 0x10, 0, 0, NO_PAD_CTRL) | ||
346 | #define MX25_PAD_UART2_RXD__GPIO_4_26 IOMUX_PAD(0x378, 0x180, 0x15, 0, 0, NO_PAD_CTRL) | ||
347 | |||
348 | #define MX25_PAD_UART2_TXD__UART2_TXD IOMUX_PAD(0x37c, 0x184, 0x10, 0, 0, NO_PAD_CTRL) | ||
349 | #define MX25_PAD_UART2_TXD__GPIO_4_27 IOMUX_PAD(0x37c, 0x184, 0x15, 0, 0, NO_PAD_CTRL) | ||
350 | |||
351 | #define MX25_PAD_UART2_RTS__UART2_RTS IOMUX_PAD(0x380, 0x188, 0x10, 0, 0, NO_PAD_CTRL) | ||
352 | #define MX25_PAD_UART2_RTS__FEC_COL IOMUX_PAD(0x380, 0x188, 0x12, 0x504, 2, NO_PAD_CTRL) | ||
353 | #define MX25_PAD_UART2_RTS__GPIO_4_28 IOMUX_PAD(0x380, 0x188, 0x15, 0, 0, NO_PAD_CTRL) | ||
354 | |||
355 | #define MX25_PAD_UART2_CTS__FEC_RX_ER IOMUX_PAD(0x384, 0x18c, 0x12, 0x518, 2, NO_PAD_CTRL) | ||
356 | #define MX25_PAD_UART2_CTS__UART2_CTS IOMUX_PAD(0x384, 0x18c, 0x10, 0, 0, NO_PAD_CTRL) | ||
357 | #define MX25_PAD_UART2_CTS__GPIO_4_29 IOMUX_PAD(0x384, 0x18c, 0x15, 0, 0, NO_PAD_CTRL) | ||
358 | |||
359 | #define MX25_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x388, 0x190, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) | ||
360 | #define MX25_PAD_SD1_CMD__FEC_RDATA2 IOMUX_PAD(0x388, 0x190, 0x12, 0x50c, 2, NO_PAD_CTRL) | ||
361 | #define MX25_PAD_SD1_CMD__GPIO_2_23 IOMUX_PAD(0x388, 0x190, 0x15, 0, 0, NO_PAD_CTRL) | ||
362 | |||
363 | #define MX25_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x38c, 0x194, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) | ||
364 | #define MX25_PAD_SD1_CLK__FEC_RDATA3 IOMUX_PAD(0x38c, 0x194, 0x12, 0x510, 2, NO_PAD_CTRL) | ||
365 | #define MX25_PAD_SD1_CLK__GPIO_2_24 IOMUX_PAD(0x38c, 0x194, 0x15, 0, 0, NO_PAD_CTRL) | ||
366 | |||
367 | #define MX25_PAD_SD1_DATA0__SD1_DATA0 IOMUX_PAD(0x390, 0x198, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) | ||
368 | #define MX25_PAD_SD1_DATA0__GPIO_2_25 IOMUX_PAD(0x390, 0x198, 0x15, 0, 0, NO_PAD_CTRL) | ||
369 | |||
370 | #define MX25_PAD_SD1_DATA1__SD1_DATA1 IOMUX_PAD(0x394, 0x19c, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) | ||
371 | #define MX25_PAD_SD1_DATA1__AUD7_RXD IOMUX_PAD(0x394, 0x19c, 0x13, 0x478, 0, NO_PAD_CTRL) | ||
372 | #define MX25_PAD_SD1_DATA1__GPIO_2_26 IOMUX_PAD(0x394, 0x19c, 0x15, 0, 0, NO_PAD_CTRL) | ||
373 | |||
374 | #define MX25_PAD_SD1_DATA2__SD1_DATA2 IOMUX_PAD(0x398, 0x1a0, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) | ||
375 | #define MX25_PAD_SD1_DATA2__FEC_RX_CLK IOMUX_PAD(0x398, 0x1a0, 0x15, 0x514, 2, NO_PAD_CTRL) | ||
376 | #define MX25_PAD_SD1_DATA2__GPIO_2_27 IOMUX_PAD(0x398, 0x1a0, 0x15, 0, 0, NO_PAD_CTRL) | ||
377 | |||
378 | #define MX25_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x39c, 0x1a4, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) | ||
379 | #define MX25_PAD_SD1_DATA3__FEC_CRS IOMUX_PAD(0x39c, 0x1a4, 0x10, 0x508, 2, NO_PAD_CTRL) | ||
380 | #define MX25_PAD_SD1_DATA3__GPIO_2_28 IOMUX_PAD(0x39c, 0x1a4, 0x15, 0, 0, NO_PAD_CTRL) | ||
381 | |||
382 | #define KPP_CTL_ROW (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP) | ||
383 | #define KPP_CTL_COL (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP | PAD_CTL_ODE) | ||
384 | |||
385 | #define MX25_PAD_KPP_ROW0__KPP_ROW0 IOMUX_PAD(0x3a0, 0x1a8, 0x10, 0, 0, KPP_CTL_ROW) | ||
386 | #define MX25_PAD_KPP_ROW0__GPIO_2_29 IOMUX_PAD(0x3a0, 0x1a8, 0x15, 0, 0, NO_PAD_CTRL) | ||
387 | |||
388 | #define MX25_PAD_KPP_ROW1__KPP_ROW1 IOMUX_PAD(0x3a4, 0x1ac, 0x10, 0, 0, KPP_CTL_ROW) | ||
389 | #define MX25_PAD_KPP_ROW1__GPIO_2_30 IOMUX_PAD(0x3a4, 0x1ac, 0x15, 0, 0, NO_PAD_CTRL) | ||
390 | |||
391 | #define MX25_PAD_KPP_ROW2__KPP_ROW2 IOMUX_PAD(0x3a8, 0x1b0, 0x10, 0, 0, KPP_CTL_ROW) | ||
392 | #define MX25_PAD_KPP_ROW2__CSI_D0 IOMUX_PAD(0x3a8, 0x1b0, 0x13, 0x488, 2, NO_PAD_CTRL) | ||
393 | #define MX25_PAD_KPP_ROW2__GPIO_2_31 IOMUX_PAD(0x3a8, 0x1b0, 0x15, 0, 0, NO_PAD_CTRL) | ||
394 | |||
395 | #define MX25_PAD_KPP_ROW3__KPP_ROW3 IOMUX_PAD(0x3ac, 0x1b4, 0x10, 0, 0, KPP_CTL_ROW) | ||
396 | #define MX25_PAD_KPP_ROW3__CSI_LD1 IOMUX_PAD(0x3ac, 0x1b4, 0x13, 0x48c, 2, NO_PAD_CTRL) | ||
397 | #define MX25_PAD_KPP_ROW3__GPIO_3_0 IOMUX_PAD(0x3ac, 0x1b4, 0x15, 0, 0, NO_PAD_CTRL) | ||
398 | |||
399 | #define MX25_PAD_KPP_COL0__KPP_COL0 IOMUX_PAD(0x3b0, 0x1b8, 0x10, 0, 0, KPP_CTL_COL) | ||
400 | #define MX25_PAD_KPP_COL0__UART4_RXD_MUX IOMUX_PAD(0x3b0, 0x1b8, 0x11, 0x570, 1, NO_PAD_CTRL) | ||
401 | #define MX25_PAD_KPP_COL0__AUD5_TXD IOMUX_PAD(0x3b0, 0x1b8, 0x12, 0, 0, PAD_CTL_PKE | PAD_CTL_PUS_100K_UP) | ||
402 | #define MX25_PAD_KPP_COL0__GPIO_3_1 IOMUX_PAD(0x3b0, 0x1b8, 0x15, 0, 0, NO_PAD_CTRL) | ||
403 | |||
404 | #define MX25_PAD_KPP_COL1__KPP_COL1 IOMUX_PAD(0x3b4, 0x1bc, 0x10, 0, 0, KPP_CTL_COL) | ||
405 | #define MX25_PAD_KPP_COL1__UART4_TXD_MUX IOMUX_PAD(0x3b4, 0x1bc, 0x11, 0, 0, NO_PAD_CTRL) | ||
406 | #define MX25_PAD_KPP_COL1__AUD5_RXD IOMUX_PAD(0x3b4, 0x1bc, 0x12, 0, 0, PAD_CTL_PKE | PAD_CTL_PUS_100K_UP) | ||
407 | #define MX25_PAD_KPP_COL1__GPIO_3_2 IOMUX_PAD(0x3b4, 0x1bc, 0x15, 0, 0, NO_PAD_CTRL) | ||
408 | |||
409 | #define MX25_PAD_KPP_COL2__KPP_COL2 IOMUX_PAD(0x3b8, 0x1c0, 0x10, 0, 0, KPP_CTL_COL) | ||
410 | #define MX25_PAD_KPP_COL2__UART4_RTS IOMUX_PAD(0x3b8, 0x1c0, 0x11, 0, 0, NO_PAD_CTRL) | ||
411 | #define MX25_PAD_KPP_COL2__AUD5_TXC IOMUX_PAD(0x3b8, 0x1c0, 0x12, 0, 0, PAD_CTL_PKE | PAD_CTL_PUS_100K_UP) | ||
412 | #define MX25_PAD_KPP_COL2__GPIO_3_3 IOMUX_PAD(0x3b8, 0x1c0, 0x15, 0, 0, NO_PAD_CTRL) | ||
413 | |||
414 | #define MX25_PAD_KPP_COL3__KPP_COL3 IOMUX_PAD(0x3bc, 0x1c4, 0x10, 0, 0, KPP_CTL_COL) | ||
415 | #define MX25_PAD_KPP_COL3__UART4_CTS IOMUX_PAD(0x3bc, 0x1c4, 0x11, 0, 0, NO_PAD_CTRL) | ||
416 | #define MX25_PAD_KPP_COL3__AUD5_TXFS IOMUX_PAD(0x3bc, 0x1c4, 0x12, 0, 0, PAD_CTL_PKE | PAD_CTL_PUS_100K_UP) | ||
417 | #define MX25_PAD_KPP_COL3__GPIO_3_4 IOMUX_PAD(0x3bc, 0x1c4, 0x15, 0, 0, NO_PAD_CTRL) | ||
418 | |||
419 | #define MX25_PAD_FEC_MDC__FEC_MDC IOMUX_PAD(0x3c0, 0x1c8, 0x10, 0, 0, NO_PAD_CTRL) | ||
420 | #define MX25_PAD_FEC_MDC__AUD4_TXD IOMUX_PAD(0x3c0, 0x1c8, 0x12, 0x464, 1, NO_PAD_CTRL) | ||
421 | #define MX25_PAD_FEC_MDC__GPIO_3_5 IOMUX_PAD(0x3c0, 0x1c8, 0x15, 0, 0, NO_PAD_CTRL) | ||
422 | |||
423 | #define MX25_PAD_FEC_MDIO__FEC_MDIO IOMUX_PAD(0x3c4, 0x1cc, 0x10, 0, 0, PAD_CTL_HYS | PAD_CTL_PUS_22K_UP) | ||
424 | #define MX25_PAD_FEC_MDIO__AUD4_RXD IOMUX_PAD(0x3c4, 0x1cc, 0x12, 0x460, 1, NO_PAD_CTRL) | ||
425 | #define MX25_PAD_FEC_MDIO__GPIO_3_6 IOMUX_PAD(0x3c4, 0x1cc, 0x15, 0, 0, NO_PAD_CTRL) | ||
426 | |||
427 | #define MX25_PAD_FEC_TDATA0__FEC_TDATA0 IOMUX_PAD(0x3c8, 0x1d0, 0x10, 0, 0, NO_PAD_CTRL) | ||
428 | #define MX25_PAD_FEC_TDATA0__GPIO_3_7 IOMUX_PAD(0x3c8, 0x1d0, 0x15, 0, 0, NO_PAD_CTRL) | ||
429 | |||
430 | #define MX25_PAD_FEC_TDATA1__FEC_TDATA1 IOMUX_PAD(0x3cc, 0x1d4, 0x10, 0, 0, NO_PAD_CTRL) | ||
431 | #define MX25_PAD_FEC_TDATA1__AUD4_TXFS IOMUX_PAD(0x3cc, 0x1d4, 0x12, 0x474, 1, NO_PAD_CTRL) | ||
432 | #define MX25_PAD_FEC_TDATA1__GPIO_3_8 IOMUX_PAD(0x3cc, 0x1d4, 0x15, 0, 0, NO_PAD_CTRL) | ||
433 | |||
434 | #define MX25_PAD_FEC_TX_EN__FEC_TX_EN IOMUX_PAD(0x3d0, 0x1d8, 0x10, 0, 0, NO_PAD_CTRL) | ||
435 | #define MX25_PAD_FEC_TX_EN__GPIO_3_9 IOMUX_PAD(0x3d0, 0x1d8, 0x15, 0, 0, NO_PAD_CTRL) | ||
436 | |||
437 | #define MX25_PAD_FEC_RDATA0__FEC_RDATA0 IOMUX_PAD(0x3d4, 0x1dc, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN | NO_PAD_CTRL) | ||
438 | #define MX25_PAD_FEC_RDATA0__GPIO_3_10 IOMUX_PAD(0x3d4, 0x1dc, 0x15, 0, 0, NO_PAD_CTRL) | ||
439 | |||
440 | #define MX25_PAD_FEC_RDATA1__FEC_RDATA1 IOMUX_PAD(0x3d8, 0x1e0, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN | NO_PAD_CTRL) | ||
441 | #define MX25_PAD_FEC_RDATA1__GPIO_3_11 IOMUX_PAD(0x3d8, 0x1e0, 0x15, 0, 0, NO_PAD_CTRL) | ||
442 | |||
443 | #define MX25_PAD_FEC_RX_DV__FEC_RX_DV IOMUX_PAD(0x3dc, 0x1e4, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN | NO_PAD_CTRL) | ||
444 | #define MX25_PAD_FEC_RX_DV__CAN2_RX IOMUX_PAD(0x3dc, 0x1e4, 0x14, 0x484, 0, PAD_CTL_PUS_22K_UP) | ||
445 | #define MX25_PAD_FEC_RX_DV__GPIO_3_12 IOMUX_PAD(0x3dc, 0x1e4, 0x15, 0, 0, NO_PAD_CTRL) | ||
446 | |||
447 | #define MX25_PAD_FEC_TX_CLK__FEC_TX_CLK IOMUX_PAD(0x3e0, 0x1e8, 0x10, 0, 0, PAD_CTL_HYS | PAD_CTL_PUS_100K_DOWN) | ||
448 | #define MX25_PAD_FEC_TX_CLK__GPIO_3_13 IOMUX_PAD(0x3e0, 0x1e8, 0x15, 0, 0, NO_PAD_CTRL) | ||
449 | |||
450 | #define MX25_PAD_RTCK__RTCK IOMUX_PAD(0x3e4, 0x1ec, 0x10, 0, 0, NO_PAD_CTRL) | ||
451 | #define MX25_PAD_RTCK__OWIRE IOMUX_PAD(0x3e4, 0x1ec, 0x11, 0, 0, NO_PAD_CTRL) | ||
452 | #define MX25_PAD_RTCK__GPIO_3_14 IOMUX_PAD(0x3e4, 0x1ec, 0x15, 0, 0, NO_PAD_CTRL) | ||
453 | |||
454 | #define MX25_PAD_DE_B__DE_B IOMUX_PAD(0x3ec, 0x1f0, 0x10, 0, 0, NO_PAD_CTRL) | ||
455 | #define MX25_PAD_DE_B__GPIO_2_20 IOMUX_PAD(0x3ec, 0x1f0, 0x15, 0, 0, NO_PAD_CTRL) | ||
456 | |||
457 | #define MX25_PAD_TDO__TDO IOMUX_PAD(0x3e8, 0x000, 0x00, 0, 0, NO_PAD_CTRL) | ||
458 | |||
459 | #define MX25_PAD_GPIO_A__GPIO_A IOMUX_PAD(0x3f0, 0x1f4, 0x10, 0, 0, NO_PAD_CTRL) | ||
460 | #define MX25_PAD_GPIO_A__CAN1_TX IOMUX_PAD(0x3f0, 0x1f4, 0x16, 0, 0, PAD_CTL_PUS_22K_UP) | ||
461 | #define MX25_PAD_GPIO_A__USBOTG_PWR IOMUX_PAD(0x3f0, 0x1f4, 0x12, 0, 0, PAD_CTL_PKE) | ||
462 | |||
463 | #define MX25_PAD_GPIO_B__GPIO_B IOMUX_PAD(0x3f4, 0x1f8, 0x10, 0, 0, NO_PAD_CTRL) | ||
464 | #define MX25_PAD_GPIO_B__CAN1_RX IOMUX_PAD(0x3f4, 0x1f8, 0x16, 0x480, 1, PAD_CTL_PUS_22K_UP) | ||
465 | #define MX25_PAD_GPIO_B__USBOTG_OC IOMUX_PAD(0x3f4, 0x1f8, 0x12, 0x57c, 1, PAD_CTL_PUS_100K_UP) | ||
466 | |||
467 | #define MX25_PAD_GPIO_C__GPIO_C IOMUX_PAD(0x3f8, 0x1fc, 0x10, 0, 0, NO_PAD_CTRL) | ||
468 | #define MX25_PAD_GPIO_C__CAN2_TX IOMUX_PAD(0x3f8, 0x1fc, 0x16, 0, 0, PAD_CTL_PUS_22K_UP) | ||
469 | |||
470 | #define MX25_PAD_GPIO_D__GPIO_D IOMUX_PAD(0x3fc, 0x200, 0x10, 0, 0, NO_PAD_CTRL) | ||
471 | #define MX25_PAD_GPIO_E__LD16 IOMUX_PAD(0x400, 0x204, 0x02, 0, 0, PAD_CTL_SRE_FAST) | ||
472 | #define MX25_PAD_GPIO_D__CAN2_RX IOMUX_PAD(0x3fc, 0x200, 0x16, 0x484, 1, PAD_CTL_PUS_22K_UP) | ||
473 | |||
474 | #define MX25_PAD_GPIO_E__GPIO_E IOMUX_PAD(0x400, 0x204, 0x10, 0, 0, NO_PAD_CTRL) | ||
475 | #define MX25_PAD_GPIO_F__LD17 IOMUX_PAD(0x404, 0x208, 0x02, 0, 0, PAD_CTL_SRE_FAST) | ||
476 | #define MX25_PAD_GPIO_E__AUD7_TXD IOMUX_PAD(0x400, 0x204, 0x14, 0, 0, NO_PAD_CTRL) | ||
477 | |||
478 | #define MX25_PAD_GPIO_F__GPIO_F IOMUX_PAD(0x404, 0x208, 0x10, 0, 0, NO_PAD_CTRL) | ||
479 | #define MX25_PAD_GPIO_F__AUD7_TXC IOMUX_PAD(0x404, 0x208, 0x14, 0, 0, NO_PAD_CTRL) | ||
480 | |||
481 | #define MX25_PAD_EXT_ARMCLK__EXT_ARMCLK IOMUX_PAD(0x000, 0x20c, 0x10, 0, 0, NO_PAD_CTRL) | ||
482 | #define MX25_PAD_EXT_ARMCLK__GPIO_3_15 IOMUX_PAD(0x000, 0x20c, 0x15, 0, 0, NO_PAD_CTRL) | ||
483 | |||
484 | #define MX25_PAD_UPLL_BYPCLK__UPLL_BYPCLK IOMUX_PAD(0x000, 0x210, 0x10, 0, 0, NO_PAD_CTRL) | ||
485 | #define MX25_PAD_UPLL_BYPCLK__GPIO_3_16 IOMUX_PAD(0x000, 0x210, 0x15, 0, 0, NO_PAD_CTRL) | ||
486 | |||
487 | #define MX25_PAD_VSTBY_REQ__VSTBY_REQ IOMUX_PAD(0x408, 0x214, 0x10, 0, 0, NO_PAD_CTRL) | ||
488 | #define MX25_PAD_VSTBY_REQ__AUD7_TXFS IOMUX_PAD(0x408, 0x214, 0x14, 0, 0, NO_PAD_CTRL) | ||
489 | #define MX25_PAD_VSTBY_REQ__GPIO_3_17 IOMUX_PAD(0x408, 0x214, 0x15, 0, 0, NO_PAD_CTRL) | ||
490 | #define MX25_PAD_VSTBY_ACK__VSTBY_ACK IOMUX_PAD(0x40c, 0x218, 0x10, 0, 0, NO_PAD_CTRL) | ||
491 | #define MX25_PAD_VSTBY_ACK__GPIO_3_18 IOMUX_PAD(0x40c, 0x218, 0x15, 0, 0, NO_PAD_CTRL) | ||
492 | |||
493 | #define MX25_PAD_POWER_FAIL__POWER_FAIL IOMUX_PAD(0x410, 0x21c, 0x10, 0, 0, NO_PAD_CTRL) | ||
494 | #define MX25_PAD_POWER_FAIL__AUD7_RXD IOMUX_PAD(0x410, 0x21c, 0x14, 0x478, 1, NO_PAD_CTRL) | ||
495 | #define MX25_PAD_POWER_FAIL__GPIO_3_19 IOMUX_PAD(0x410, 0x21c, 0x15, 0, 0, NO_PAD_CTRL) | ||
496 | |||
497 | #define MX25_PAD_CLKO__CLKO IOMUX_PAD(0x414, 0x220, 0x10, 0, 0, NO_PAD_CTRL) | ||
498 | #define MX25_PAD_CLKO__GPIO_2_21 IOMUX_PAD(0x414, 0x220, 0x15, 0, 0, NO_PAD_CTRL) | ||
499 | |||
500 | #define MX25_PAD_BOOT_MODE0__BOOT_MODE0 IOMUX_PAD(0x000, 0x224, 0x00, 0, 0, NO_PAD_CTRL) | ||
501 | #define MX25_PAD_BOOT_MODE0__GPIO_4_30 IOMUX_PAD(0x000, 0x224, 0x05, 0, 0, NO_PAD_CTRL) | ||
502 | #define MX25_PAD_BOOT_MODE1__BOOT_MODE1 IOMUX_PAD(0x000, 0x228, 0x00, 0, 0, NO_PAD_CTRL) | ||
503 | #define MX25_PAD_BOOT_MODE1__GPIO_4_31 IOMUX_PAD(0x000, 0x228, 0x05, 0, 0, NO_PAD_CTRL) | ||
504 | |||
505 | #define MX25_PAD_CTL_GRP_DVS_MISC IOMUX_PAD(0x418, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
506 | #define MX25_PAD_CTL_GRP_DSE_FEC IOMUX_PAD(0x41c, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
507 | #define MX25_PAD_CTL_GRP_DVS_JTAG IOMUX_PAD(0x420, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
508 | #define MX25_PAD_CTL_GRP_DSE_NFC IOMUX_PAD(0x424, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
509 | #define MX25_PAD_CTL_GRP_DSE_CSI IOMUX_PAD(0x428, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
510 | #define MX25_PAD_CTL_GRP_DSE_WEIM IOMUX_PAD(0x42c, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
511 | #define MX25_PAD_CTL_GRP_DSE_DDR IOMUX_PAD(0x430, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
512 | #define MX25_PAD_CTL_GRP_DVS_CRM IOMUX_PAD(0x434, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
513 | #define MX25_PAD_CTL_GRP_DSE_KPP IOMUX_PAD(0x438, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
514 | #define MX25_PAD_CTL_GRP_DSE_SDHC1 IOMUX_PAD(0x43c, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
515 | #define MX25_PAD_CTL_GRP_DSE_LCD IOMUX_PAD(0x440, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
516 | #define MX25_PAD_CTL_GRP_DSE_UART IOMUX_PAD(0x444, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
517 | #define MX25_PAD_CTL_GRP_DVS_NFC IOMUX_PAD(0x448, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
518 | #define MX25_PAD_CTL_GRP_DVS_CSI IOMUX_PAD(0x44c, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
519 | #define MX25_PAD_CTL_GRP_DSE_CSPI1 IOMUX_PAD(0x450, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
520 | #define MX25_PAD_CTL_GRP_DDRTYPE IOMUX_PAD(0x454, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
521 | #define MX25_PAD_CTL_GRP_DVS_SDHC1 IOMUX_PAD(0x458, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
522 | #define MX25_PAD_CTL_GRP_DVS_LCD IOMUX_PAD(0x45c, 0x000, 0, 0, 0, NO_PAD_CTRL) | ||
523 | |||
524 | #endif /* __MACH_IOMUX_MX25_H__ */ | ||
diff --git a/arch/arm/mach-imx/iomux-mx27.h b/arch/arm/mach-imx/iomux-mx27.h deleted file mode 100644 index 218e99e89e8..00000000000 --- a/arch/arm/mach-imx/iomux-mx27.h +++ /dev/null | |||
@@ -1,205 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | ||
3 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | #ifndef __MACH_IOMUX_MX27_H__ | ||
20 | #define __MACH_IOMUX_MX27_H__ | ||
21 | |||
22 | #include "iomux-mx2x.h" | ||
23 | #include "iomux-v1.h" | ||
24 | |||
25 | /* Primary GPIO pin functions */ | ||
26 | |||
27 | #define PA0_PF_USBH2_CLK (GPIO_PORTA | GPIO_PF | 0) | ||
28 | #define PA1_PF_USBH2_DIR (GPIO_PORTA | GPIO_PF | 1) | ||
29 | #define PA2_PF_USBH2_DATA7 (GPIO_PORTA | GPIO_PF | 2) | ||
30 | #define PA3_PF_USBH2_NXT (GPIO_PORTA | GPIO_PF | 3) | ||
31 | #define PA4_PF_USBH2_STP (GPIO_PORTA | GPIO_PF | 4) | ||
32 | #define PB22_PF_USBH1_SUSP (GPIO_PORTB | GPIO_PF | 22) | ||
33 | #define PB25_PF_USBH1_RCV (GPIO_PORTB | GPIO_PF | 25) | ||
34 | #define PC5_PF_I2C2_SDA (GPIO_PORTC | GPIO_PF | GPIO_IN | 5) | ||
35 | #define PC6_PF_I2C2_SCL (GPIO_PORTC | GPIO_PF | GPIO_IN | 6) | ||
36 | #define PC7_PF_USBOTG_DATA5 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 7) | ||
37 | #define PC8_PF_USBOTG_DATA6 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 8) | ||
38 | #define PC9_PF_USBOTG_DATA0 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 9) | ||
39 | #define PC10_PF_USBOTG_DATA2 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 10) | ||
40 | #define PC11_PF_USBOTG_DATA1 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 11) | ||
41 | #define PC12_PF_USBOTG_DATA4 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 12) | ||
42 | #define PC13_PF_USBOTG_DATA3 (GPIO_PORTC | GPIO_PF | GPIO_OUT | 13) | ||
43 | #define PC16_PF_SSI4_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 16) | ||
44 | #define PC17_PF_SSI4_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 17) | ||
45 | #define PC18_PF_SSI4_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 18) | ||
46 | #define PC19_PF_SSI4_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 19) | ||
47 | #define PD0_PF_SD3_CMD (GPIO_PORTD | GPIO_PF | 0) | ||
48 | #define PD1_PF_SD3_CLK (GPIO_PORTD | GPIO_PF | 1) | ||
49 | #define PD2_PF_ATA_DATA0 (GPIO_PORTD | GPIO_PF | 2) | ||
50 | #define PD3_PF_ATA_DATA1 (GPIO_PORTD | GPIO_PF | 3) | ||
51 | #define PD4_PF_ATA_DATA2 (GPIO_PORTD | GPIO_PF | 4) | ||
52 | #define PD5_PF_ATA_DATA3 (GPIO_PORTD | GPIO_PF | 5) | ||
53 | #define PD6_PF_ATA_DATA4 (GPIO_PORTD | GPIO_PF | 6) | ||
54 | #define PD7_PF_ATA_DATA5 (GPIO_PORTD | GPIO_PF | 7) | ||
55 | #define PD8_PF_ATA_DATA6 (GPIO_PORTD | GPIO_PF | 8) | ||
56 | #define PD9_PF_ATA_DATA7 (GPIO_PORTD | GPIO_PF | 9) | ||
57 | #define PD10_PF_ATA_DATA8 (GPIO_PORTD | GPIO_PF | 10) | ||
58 | #define PD11_PF_ATA_DATA9 (GPIO_PORTD | GPIO_PF | 11) | ||
59 | #define PD12_PF_ATA_DATA10 (GPIO_PORTD | GPIO_PF | 12) | ||
60 | #define PD13_PF_ATA_DATA11 (GPIO_PORTD | GPIO_PF | 13) | ||
61 | #define PD14_PF_ATA_DATA12 (GPIO_PORTD | GPIO_PF | 14) | ||
62 | #define PD15_PF_ATA_DATA13 (GPIO_PORTD | GPIO_PF | 15) | ||
63 | #define PD16_PF_ATA_DATA14 (GPIO_PORTD | GPIO_PF | 16) | ||
64 | #define PE0_PF_USBOTG_NXT (GPIO_PORTE | GPIO_PF | GPIO_OUT | 0) | ||
65 | #define PE1_PF_USBOTG_STP (GPIO_PORTE | GPIO_PF | GPIO_OUT | 1) | ||
66 | #define PE2_PF_USBOTG_DIR (GPIO_PORTE | GPIO_PF | GPIO_OUT | 2) | ||
67 | #define PE24_PF_USBOTG_CLK (GPIO_PORTE | GPIO_PF | GPIO_OUT | 24) | ||
68 | #define PE25_PF_USBOTG_DATA7 (GPIO_PORTE | GPIO_PF | GPIO_OUT | 25) | ||
69 | #define PF1_PF_NFCLE (GPIO_PORTF | GPIO_PF | 1) | ||
70 | #define PF3_PF_NFCE (GPIO_PORTF | GPIO_PF | 3) | ||
71 | #define PF7_PF_PC_POE (GPIO_PORTF | GPIO_PF | 7) | ||
72 | #define PF8_PF_PC_RW (GPIO_PORTF | GPIO_PF | 8) | ||
73 | #define PF9_PF_PC_IOIS16 (GPIO_PORTF | GPIO_PF | 9) | ||
74 | #define PF10_PF_PC_RST (GPIO_PORTF | GPIO_PF | 10) | ||
75 | #define PF11_PF_PC_BVD2 (GPIO_PORTF | GPIO_PF | 11) | ||
76 | #define PF12_PF_PC_BVD1 (GPIO_PORTF | GPIO_PF | 12) | ||
77 | #define PF13_PF_PC_VS2 (GPIO_PORTF | GPIO_PF | 13) | ||
78 | #define PF14_PF_PC_VS1 (GPIO_PORTF | GPIO_PF | 14) | ||
79 | #define PF16_PF_PC_PWRON (GPIO_PORTF | GPIO_PF | 16) | ||
80 | #define PF17_PF_PC_READY (GPIO_PORTF | GPIO_PF | 17) | ||
81 | #define PF18_PF_PC_WAIT (GPIO_PORTF | GPIO_PF | 18) | ||
82 | #define PF19_PF_PC_CD2 (GPIO_PORTF | GPIO_PF | 19) | ||
83 | #define PF20_PF_PC_CD1 (GPIO_PORTF | GPIO_PF | 20) | ||
84 | #define PF23_PF_ATA_DATA15 (GPIO_PORTF | GPIO_PF | 23) | ||
85 | |||
86 | /* Alternate GPIO pin functions */ | ||
87 | |||
88 | #define PB4_AF_MSHC_DATA0 (GPIO_PORTB | GPIO_AF | GPIO_OUT | 4) | ||
89 | #define PB5_AF_MSHC_DATA1 (GPIO_PORTB | GPIO_AF | GPIO_OUT | 5) | ||
90 | #define PB6_AF_MSHC_DATA2 (GPIO_PORTB | GPIO_AF | GPIO_OUT | 6) | ||
91 | #define PB7_AF_MSHC_DATA4 (GPIO_PORTB | GPIO_AF | GPIO_OUT | 7) | ||
92 | #define PB8_AF_MSHC_BS (GPIO_PORTB | GPIO_AF | GPIO_OUT | 8) | ||
93 | #define PB9_AF_MSHC_SCLK (GPIO_PORTB | GPIO_AF | GPIO_OUT | 9) | ||
94 | #define PB10_AF_UART6_TXD (GPIO_PORTB | GPIO_AF | GPIO_OUT | 10) | ||
95 | #define PB11_AF_UART6_RXD (GPIO_PORTB | GPIO_AF | GPIO_IN | 11) | ||
96 | #define PB12_AF_UART6_CTS (GPIO_PORTB | GPIO_AF | GPIO_OUT | 12) | ||
97 | #define PB13_AF_UART6_RTS (GPIO_PORTB | GPIO_AF | GPIO_IN | 13) | ||
98 | #define PB18_AF_UART5_TXD (GPIO_PORTB | GPIO_AF | GPIO_OUT | 18) | ||
99 | #define PB19_AF_UART5_RXD (GPIO_PORTB | GPIO_AF | GPIO_IN | 19) | ||
100 | #define PB20_AF_UART5_CTS (GPIO_PORTB | GPIO_AF | GPIO_OUT | 20) | ||
101 | #define PB21_AF_UART5_RTS (GPIO_PORTB | GPIO_AF | GPIO_IN | 21) | ||
102 | #define PC8_AF_FEC_MDIO (GPIO_PORTC | GPIO_AF | GPIO_IN | 8) | ||
103 | #define PC24_AF_GPT5_TOUT (GPIO_PORTC | GPIO_AF | 24) | ||
104 | #define PC25_AF_GPT5_TIN (GPIO_PORTC | GPIO_AF | 25) | ||
105 | #define PC26_AF_GPT4_TOUT (GPIO_PORTC | GPIO_AF | 26) | ||
106 | #define PC27_AF_GPT4_TIN (GPIO_PORTC | GPIO_AF | 27) | ||
107 | #define PD1_AF_ETMTRACE_PKT15 (GPIO_PORTD | GPIO_AF | 1) | ||
108 | #define PD6_AF_ETMTRACE_PKT14 (GPIO_PORTD | GPIO_AF | 6) | ||
109 | #define PD7_AF_ETMTRACE_PKT13 (GPIO_PORTD | GPIO_AF | 7) | ||
110 | #define PD9_AF_ETMTRACE_PKT12 (GPIO_PORTD | GPIO_AF | 9) | ||
111 | #define PD2_AF_SD3_D0 (GPIO_PORTD | GPIO_AF | 2) | ||
112 | #define PD3_AF_SD3_D1 (GPIO_PORTD | GPIO_AF | 3) | ||
113 | #define PD4_AF_SD3_D2 (GPIO_PORTD | GPIO_AF | 4) | ||
114 | #define PD5_AF_SD3_D3 (GPIO_PORTD | GPIO_AF | 5) | ||
115 | #define PD8_AF_FEC_MDIO (GPIO_PORTD | GPIO_AF | GPIO_IN | 8) | ||
116 | #define PD10_AF_ETMTRACE_PKT11 (GPIO_PORTD | GPIO_AF | 10) | ||
117 | #define PD11_AF_ETMTRACE_PKT10 (GPIO_PORTD | GPIO_AF | 11) | ||
118 | #define PD12_AF_ETMTRACE_PKT9 (GPIO_PORTD | GPIO_AF | 12) | ||
119 | #define PD13_AF_ETMTRACE_PKT8 (GPIO_PORTD | GPIO_AF | 13) | ||
120 | #define PD14_AF_ETMTRACE_PKT7 (GPIO_PORTD | GPIO_AF | 14) | ||
121 | #define PD15_AF_ETMTRACE_PKT6 (GPIO_PORTD | GPIO_AF | 15) | ||
122 | #define PD16_AF_ETMTRACE_PKT5 (GPIO_PORTD | GPIO_AF | 16) | ||
123 | #define PF1_AF_ETMTRACE_PKT0 (GPIO_PORTF | GPIO_AF | 1) | ||
124 | #define PF3_AF_ETMTRACE_PKT2 (GPIO_PORTF | GPIO_AF | 3) | ||
125 | #define PF5_AF_ETMPIPESTAT11 (GPIO_PORTF | GPIO_AF | 5) | ||
126 | #define PF7_AF_ATA_BUFFER_EN (GPIO_PORTF | GPIO_AF | 7) | ||
127 | #define PF8_AF_ATA_IORDY (GPIO_PORTF | GPIO_AF | 8) | ||
128 | #define PF9_AF_ATA_INTRQ (GPIO_PORTF | GPIO_AF | 9) | ||
129 | #define PF10_AF_ATA_RESET (GPIO_PORTF | GPIO_AF | 10) | ||
130 | #define PF11_AF_ATA_DMACK (GPIO_PORTF | GPIO_AF | 11) | ||
131 | #define PF12_AF_ATA_DMAREQ (GPIO_PORTF | GPIO_AF | 12) | ||
132 | #define PF13_AF_ATA_DA0 (GPIO_PORTF | GPIO_AF | 13) | ||
133 | #define PF14_AF_ATA_DA1 (GPIO_PORTF | GPIO_AF | 14) | ||
134 | #define PF15_AF_ETMTRACE_SYNC (GPIO_PORTF | GPIO_AF | 15) | ||
135 | #define PF16_AF_ATA_DA2 (GPIO_PORTF | GPIO_AF | 16) | ||
136 | #define PF17_AF_ATA_CS0 (GPIO_PORTF | GPIO_AF | 17) | ||
137 | #define PF18_AF_ATA_CS1 (GPIO_PORTF | GPIO_AF | 18) | ||
138 | #define PF19_AF_ATA_DIOW (GPIO_PORTF | GPIO_AF | 19) | ||
139 | #define PF20_AF_ATA_DIOR (GPIO_PORTF | GPIO_AF | 20) | ||
140 | #define PF22_AF_ETMTRACE_CLK (GPIO_PORTF | GPIO_AF | 22) | ||
141 | #define PF23_AF_ETMTRACE_PKT4 (GPIO_PORTF | GPIO_AF | 23) | ||
142 | |||
143 | /* AIN GPIO pin functions */ | ||
144 | |||
145 | #define PC14_AIN_SSI1_MCLK (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 14) | ||
146 | #define PC15_AIN_GPT6_TOUT (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 15) | ||
147 | #define PD0_AIN_FEC_TXD0 (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 0) | ||
148 | #define PD1_AIN_FEC_TXD1 (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 1) | ||
149 | #define PD2_AIN_FEC_TXD2 (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 2) | ||
150 | #define PD3_AIN_FEC_TXD3 (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 3) | ||
151 | #define PD9_AIN_FEC_MDC (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 9) | ||
152 | #define PD16_AIN_FEC_TX_ER (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 16) | ||
153 | #define PD27_AIN_EXT_DMA_GRANT (GPIO_PORTD | GPIO_AIN | GPIO_OUT | 27) | ||
154 | #define PF23_AIN_FEC_TX_EN (GPIO_PORTF | GPIO_AIN | GPIO_OUT | 23) | ||
155 | |||
156 | /* BIN GPIO pin functions */ | ||
157 | |||
158 | #define PC14_BIN_SSI2_MCLK (GPIO_PORTC | GPIO_BIN | GPIO_OUT | 14) | ||
159 | |||
160 | /* CIN GPIO pin functions */ | ||
161 | |||
162 | #define PD2_CIN_SLCDC1_DAT0 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 2) | ||
163 | #define PD3_CIN_SLCDC1_DAT1 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 3) | ||
164 | #define PD4_CIN_SLCDC1_DAT2 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 4) | ||
165 | #define PD5_CIN_SLCDC1_DAT3 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 5) | ||
166 | #define PD6_CIN_SLCDC1_DAT4 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 6) | ||
167 | #define PD7_CIN_SLCDC1_DAT5 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 7) | ||
168 | #define PD8_CIN_SLCDC1_DAT6 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 8) | ||
169 | #define PD9_CIN_SLCDC1_DAT7 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 9) | ||
170 | #define PD10_CIN_SLCDC1_DAT8 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 10) | ||
171 | #define PD11_CIN_SLCDC1_DAT9 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 11) | ||
172 | #define PD12_CIN_SLCDC1_DAT10 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 12) | ||
173 | #define PD13_CIN_SLCDC1_DAT11 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 13) | ||
174 | #define PD14_CIN_SLCDC1_DAT12 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 14) | ||
175 | #define PD15_CIN_SLCDC1_DAT13 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 15) | ||
176 | #define PD16_CIN_SLCDC1_DAT14 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 16) | ||
177 | #define PD23_CIN_SLCDC1_DAT15 (GPIO_PORTD | GPIO_CIN | GPIO_OUT | 23) | ||
178 | #define PF27_CIN_EXT_DMA_GRANT (GPIO_PORTF | GPIO_CIN | GPIO_OUT | 27) | ||
179 | /* LCDC_TESTx on PBxx omitted, because it's not clear what they do */ | ||
180 | |||
181 | /* AOUT GPIO pin functions */ | ||
182 | |||
183 | #define PC14_AOUT_GPT6_TIN (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 14) | ||
184 | #define PD4_AOUT_FEC_RX_ER (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 4) | ||
185 | #define PD5_AOUT_FEC_RXD1 (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 5) | ||
186 | #define PD6_AOUT_FEC_RXD2 (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 6) | ||
187 | #define PD7_AOUT_FEC_RXD3 (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 7) | ||
188 | #define PD10_AOUT_FEC_CRS (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 10) | ||
189 | #define PD11_AOUT_FEC_TX_CLK (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 11) | ||
190 | #define PD12_AOUT_FEC_RXD0 (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 12) | ||
191 | #define PD13_AOUT_FEC_RX_DV (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 13) | ||
192 | #define PD14_AOUT_FEC_RX_CLK (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 14) | ||
193 | #define PD15_AOUT_FEC_COL (GPIO_PORTD | GPIO_AOUT | GPIO_IN | 15) | ||
194 | |||
195 | /* BOUT GPIO pin functions */ | ||
196 | |||
197 | #define PC17_BOUT_PC_IOIS16 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 17) | ||
198 | #define PC18_BOUT_PC_BVD2 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 18) | ||
199 | #define PC19_BOUT_PC_BVD1 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 19) | ||
200 | #define PC28_BOUT_PC_BVD2 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 28) | ||
201 | #define PC29_BOUT_PC_VS1 (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 29) | ||
202 | #define PC30_BOUT_PC_READY (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 30) | ||
203 | #define PC31_BOUT_PC_WAIT (GPIO_PORTC | GPIO_BOUT | GPIO_IN | 31) | ||
204 | |||
205 | #endif /* __MACH_IOMUX_MX27_H__ */ | ||
diff --git a/arch/arm/mach-imx/iomux-mx2x.h b/arch/arm/mach-imx/iomux-mx2x.h deleted file mode 100644 index 7a9b20abda0..00000000000 --- a/arch/arm/mach-imx/iomux-mx2x.h +++ /dev/null | |||
@@ -1,230 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | ||
3 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | #ifndef __MACH_IOMUX_MX2x_H__ | ||
20 | #define __MACH_IOMUX_MX2x_H__ | ||
21 | |||
22 | /* Primary GPIO pin functions */ | ||
23 | |||
24 | #define PA5_PF_LSCLK (GPIO_PORTA | GPIO_PF | GPIO_OUT | 5) | ||
25 | #define PA6_PF_LD0 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 6) | ||
26 | #define PA7_PF_LD1 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 7) | ||
27 | #define PA8_PF_LD2 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 8) | ||
28 | #define PA9_PF_LD3 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 9) | ||
29 | #define PA10_PF_LD4 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 10) | ||
30 | #define PA11_PF_LD5 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 11) | ||
31 | #define PA12_PF_LD6 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 12) | ||
32 | #define PA13_PF_LD7 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 13) | ||
33 | #define PA14_PF_LD8 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 14) | ||
34 | #define PA15_PF_LD9 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 15) | ||
35 | #define PA16_PF_LD10 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 16) | ||
36 | #define PA17_PF_LD11 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 17) | ||
37 | #define PA18_PF_LD12 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 18) | ||
38 | #define PA19_PF_LD13 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 19) | ||
39 | #define PA20_PF_LD14 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 20) | ||
40 | #define PA21_PF_LD15 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 21) | ||
41 | #define PA22_PF_LD16 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 22) | ||
42 | #define PA23_PF_LD17 (GPIO_PORTA | GPIO_PF | GPIO_OUT | 23) | ||
43 | #define PA24_PF_REV (GPIO_PORTA | GPIO_PF | GPIO_OUT | 24) | ||
44 | #define PA25_PF_CLS (GPIO_PORTA | GPIO_PF | GPIO_OUT | 25) | ||
45 | #define PA26_PF_PS (GPIO_PORTA | GPIO_PF | GPIO_OUT | 26) | ||
46 | #define PA27_PF_SPL_SPR (GPIO_PORTA | GPIO_PF | GPIO_OUT | 27) | ||
47 | #define PA28_PF_HSYNC (GPIO_PORTA | GPIO_PF | GPIO_OUT | 28) | ||
48 | #define PA29_PF_VSYNC (GPIO_PORTA | GPIO_PF | GPIO_OUT | 29) | ||
49 | #define PA30_PF_CONTRAST (GPIO_PORTA | GPIO_PF | GPIO_OUT | 30) | ||
50 | #define PA31_PF_OE_ACD (GPIO_PORTA | GPIO_PF | GPIO_OUT | 31) | ||
51 | #define PB4_PF_SD2_D0 (GPIO_PORTB | GPIO_PF | 4) | ||
52 | #define PB5_PF_SD2_D1 (GPIO_PORTB | GPIO_PF | 5) | ||
53 | #define PB6_PF_SD2_D2 (GPIO_PORTB | GPIO_PF | 6) | ||
54 | #define PB7_PF_SD2_D3 (GPIO_PORTB | GPIO_PF | 7) | ||
55 | #define PB8_PF_SD2_CMD (GPIO_PORTB | GPIO_PF | 8) | ||
56 | #define PB9_PF_SD2_CLK (GPIO_PORTB | GPIO_PF | 9) | ||
57 | #define PB10_PF_CSI_D0 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 10) | ||
58 | #define PB11_PF_CSI_D1 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 11) | ||
59 | #define PB12_PF_CSI_D2 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 12) | ||
60 | #define PB13_PF_CSI_D3 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 13) | ||
61 | #define PB14_PF_CSI_D4 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 14) | ||
62 | #define PB15_PF_CSI_MCLK (GPIO_PORTB | GPIO_PF | GPIO_OUT | 15) | ||
63 | #define PB16_PF_CSI_PIXCLK (GPIO_PORTB | GPIO_PF | GPIO_OUT | 16) | ||
64 | #define PB17_PF_CSI_D5 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 17) | ||
65 | #define PB18_PF_CSI_D6 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 18) | ||
66 | #define PB19_PF_CSI_D7 (GPIO_PORTB | GPIO_PF | GPIO_OUT | 19) | ||
67 | #define PB20_PF_CSI_VSYNC (GPIO_PORTB | GPIO_PF | GPIO_OUT | 20) | ||
68 | #define PB21_PF_CSI_HSYNC (GPIO_PORTB | GPIO_PF | GPIO_OUT | 21) | ||
69 | #define PB23_PF_USB_PWR (GPIO_PORTB | GPIO_PF | 23) | ||
70 | #define PB24_PF_USB_OC (GPIO_PORTB | GPIO_PF | 24) | ||
71 | #define PB26_PF_USBH1_FS (GPIO_PORTB | GPIO_PF | 26) | ||
72 | #define PB27_PF_USBH1_OE (GPIO_PORTB | GPIO_PF | 27) | ||
73 | #define PB28_PF_USBH1_TXDM (GPIO_PORTB | GPIO_PF | 28) | ||
74 | #define PB29_PF_USBH1_TXDP (GPIO_PORTB | GPIO_PF | 29) | ||
75 | #define PB30_PF_USBH1_RXDM (GPIO_PORTB | GPIO_PF | 30) | ||
76 | #define PB31_PF_USBH1_RXDP (GPIO_PORTB | GPIO_PF | 31) | ||
77 | #define PC14_PF_TOUT (GPIO_PORTC | GPIO_PF | 14) | ||
78 | #define PC15_PF_TIN (GPIO_PORTC | GPIO_PF | 15) | ||
79 | #define PC20_PF_SSI1_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 20) | ||
80 | #define PC21_PF_SSI1_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 21) | ||
81 | #define PC22_PF_SSI1_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 22) | ||
82 | #define PC23_PF_SSI1_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 23) | ||
83 | #define PC24_PF_SSI2_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 24) | ||
84 | #define PC25_PF_SSI2_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 25) | ||
85 | #define PC26_PF_SSI2_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 26) | ||
86 | #define PC27_PF_SSI2_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 27) | ||
87 | #define PC28_PF_SSI3_FS (GPIO_PORTC | GPIO_PF | GPIO_IN | 28) | ||
88 | #define PC29_PF_SSI3_RXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 29) | ||
89 | #define PC30_PF_SSI3_TXD (GPIO_PORTC | GPIO_PF | GPIO_IN | 30) | ||
90 | #define PC31_PF_SSI3_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 31) | ||
91 | #define PD17_PF_I2C_DATA (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17) | ||
92 | #define PD18_PF_I2C_CLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18) | ||
93 | #define PD19_PF_CSPI2_SS2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 19) | ||
94 | #define PD20_PF_CSPI2_SS1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 20) | ||
95 | #define PD21_PF_CSPI2_SS0 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 21) | ||
96 | #define PD22_PF_CSPI2_SCLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 22) | ||
97 | #define PD23_PF_CSPI2_MISO (GPIO_PORTD | GPIO_PF | GPIO_IN | 23) | ||
98 | #define PD24_PF_CSPI2_MOSI (GPIO_PORTD | GPIO_PF | GPIO_OUT | 24) | ||
99 | #define PD25_PF_CSPI1_RDY (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25) | ||
100 | #define PD26_PF_CSPI1_SS2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26) | ||
101 | #define PD27_PF_CSPI1_SS1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27) | ||
102 | #define PD28_PF_CSPI1_SS0 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 28) | ||
103 | #define PD29_PF_CSPI1_SCLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 29) | ||
104 | #define PD30_PF_CSPI1_MISO (GPIO_PORTD | GPIO_PF | GPIO_IN | 30) | ||
105 | #define PD31_PF_CSPI1_MOSI (GPIO_PORTD | GPIO_PF | GPIO_OUT | 31) | ||
106 | #define PE3_PF_UART2_CTS (GPIO_PORTE | GPIO_PF | GPIO_OUT | 3) | ||
107 | #define PE4_PF_UART2_RTS (GPIO_PORTE | GPIO_PF | GPIO_IN | 4) | ||
108 | #define PE5_PF_PWMO (GPIO_PORTE | GPIO_PF | 5) | ||
109 | #define PE6_PF_UART2_TXD (GPIO_PORTE | GPIO_PF | GPIO_OUT | 6) | ||
110 | #define PE7_PF_UART2_RXD (GPIO_PORTE | GPIO_PF | GPIO_IN | 7) | ||
111 | #define PE8_PF_UART3_TXD (GPIO_PORTE | GPIO_PF | GPIO_OUT | 8) | ||
112 | #define PE9_PF_UART3_RXD (GPIO_PORTE | GPIO_PF | GPIO_IN | 9) | ||
113 | #define PE10_PF_UART3_CTS (GPIO_PORTE | GPIO_PF | GPIO_OUT | 10) | ||
114 | #define PE11_PF_UART3_RTS (GPIO_PORTE | GPIO_PF | GPIO_IN | 11) | ||
115 | #define PE12_PF_UART1_TXD (GPIO_PORTE | GPIO_PF | GPIO_OUT | 12) | ||
116 | #define PE13_PF_UART1_RXD (GPIO_PORTE | GPIO_PF | GPIO_IN | 13) | ||
117 | #define PE14_PF_UART1_CTS (GPIO_PORTE | GPIO_PF | GPIO_OUT | 14) | ||
118 | #define PE15_PF_UART1_RTS (GPIO_PORTE | GPIO_PF | GPIO_IN | 15) | ||
119 | #define PE16_PF_RTCK (GPIO_PORTE | GPIO_PF | GPIO_OUT | 16) | ||
120 | #define PE17_PF_RESET_OUT (GPIO_PORTE | GPIO_PF | 17) | ||
121 | #define PE18_PF_SD1_D0 (GPIO_PORTE | GPIO_PF | 18) | ||
122 | #define PE19_PF_SD1_D1 (GPIO_PORTE | GPIO_PF | 19) | ||
123 | #define PE20_PF_SD1_D2 (GPIO_PORTE | GPIO_PF | 20) | ||
124 | #define PE21_PF_SD1_D3 (GPIO_PORTE | GPIO_PF | 21) | ||
125 | #define PE22_PF_SD1_CMD (GPIO_PORTE | GPIO_PF | 22) | ||
126 | #define PE23_PF_SD1_CLK (GPIO_PORTE | GPIO_PF | 23) | ||
127 | #define PF0_PF_NRFB (GPIO_PORTF | GPIO_PF | 0) | ||
128 | #define PF2_PF_NFWP (GPIO_PORTF | GPIO_PF | 2) | ||
129 | #define PF4_PF_NFALE (GPIO_PORTF | GPIO_PF | 4) | ||
130 | #define PF5_PF_NFRE (GPIO_PORTF | GPIO_PF | 5) | ||
131 | #define PF6_PF_NFWE (GPIO_PORTF | GPIO_PF | 6) | ||
132 | #define PF15_PF_CLKO (GPIO_PORTF | GPIO_PF | 15) | ||
133 | #define PF21_PF_CS4 (GPIO_PORTF | GPIO_PF | 21) | ||
134 | #define PF22_PF_CS5 (GPIO_PORTF | GPIO_PF | 22) | ||
135 | |||
136 | /* Alternate GPIO pin functions */ | ||
137 | |||
138 | #define PB26_AF_UART4_RTS (GPIO_PORTB | GPIO_AF | GPIO_IN | 26) | ||
139 | #define PB28_AF_UART4_TXD (GPIO_PORTB | GPIO_AF | GPIO_OUT | 28) | ||
140 | #define PB29_AF_UART4_CTS (GPIO_PORTB | GPIO_AF | GPIO_OUT | 29) | ||
141 | #define PB31_AF_UART4_RXD (GPIO_PORTB | GPIO_AF | GPIO_IN | 31) | ||
142 | #define PC28_AF_SLCDC2_D0 (GPIO_PORTC | GPIO_AF | 28) | ||
143 | #define PC29_AF_SLCDC2_RS (GPIO_PORTC | GPIO_AF | 29) | ||
144 | #define PC30_AF_SLCDC2_CS (GPIO_PORTC | GPIO_AF | 30) | ||
145 | #define PC31_AF_SLCDC2_CLK (GPIO_PORTC | GPIO_AF | 31) | ||
146 | #define PD19_AF_USBH2_DATA4 (GPIO_PORTD | GPIO_AF | 19) | ||
147 | #define PD20_AF_USBH2_DATA3 (GPIO_PORTD | GPIO_AF | 20) | ||
148 | #define PD21_AF_USBH2_DATA6 (GPIO_PORTD | GPIO_AF | 21) | ||
149 | #define PD22_AF_USBH2_DATA0 (GPIO_PORTD | GPIO_AF | 22) | ||
150 | #define PD23_AF_USBH2_DATA2 (GPIO_PORTD | GPIO_AF | 23) | ||
151 | #define PD24_AF_USBH2_DATA1 (GPIO_PORTD | GPIO_AF | 24) | ||
152 | #define PD26_AF_USBH2_DATA5 (GPIO_PORTD | GPIO_AF | 26) | ||
153 | #define PE0_AF_KP_COL6 (GPIO_PORTE | GPIO_AF | 0) | ||
154 | #define PE1_AF_KP_ROW6 (GPIO_PORTE | GPIO_AF | 1) | ||
155 | #define PE2_AF_KP_ROW7 (GPIO_PORTE | GPIO_AF | 2) | ||
156 | #define PE3_AF_KP_COL7 (GPIO_PORTE | GPIO_AF | 3) | ||
157 | #define PE4_AF_KP_ROW7 (GPIO_PORTE | GPIO_AF | 4) | ||
158 | #define PE6_AF_KP_COL6 (GPIO_PORTE | GPIO_AF | 6) | ||
159 | #define PE7_AF_KP_ROW6 (GPIO_PORTE | GPIO_AF | 7) | ||
160 | #define PE16_AF_OWIRE (GPIO_PORTE | GPIO_AF | 16) | ||
161 | #define PE18_AF_CSPI3_MISO (GPIO_PORTE | GPIO_AF | GPIO_IN | 18) | ||
162 | #define PE21_AF_CSPI3_SS (GPIO_PORTE | GPIO_AF | GPIO_OUT | 21) | ||
163 | #define PE22_AF_CSPI3_MOSI (GPIO_PORTE | GPIO_AF | GPIO_OUT | 22) | ||
164 | #define PE23_AF_CSPI3_SCLK (GPIO_PORTE | GPIO_AF | GPIO_OUT | 23) | ||
165 | |||
166 | /* AIN GPIO pin functions */ | ||
167 | |||
168 | #define PA6_AIN_SLCDC1_DAT0 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 6) | ||
169 | #define PA7_AIN_SLCDC1_DAT1 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 7) | ||
170 | #define PA8_AIN_SLCDC1_DAT2 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 8) | ||
171 | #define PA0_AIN_SLCDC1_DAT3 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 0) | ||
172 | #define PA11_AIN_SLCDC1_DAT5 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 11) | ||
173 | #define PA13_AIN_SLCDC1_DAT7 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 13) | ||
174 | #define PA15_AIN_SLCDC1_DAT9 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 15) | ||
175 | #define PA17_AIN_SLCDC1_DAT11 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 17) | ||
176 | #define PA19_AIN_SLCDC1_DAT13 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 19) | ||
177 | #define PA21_AIN_SLCDC1_DAT15 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 21) | ||
178 | #define PA22_AIN_EXT_DMAGRANT (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 22) | ||
179 | #define PA24_AIN_SLCDC1_D0 (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 24) | ||
180 | #define PA25_AIN_SLCDC1_RS (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 25) | ||
181 | #define PA26_AIN_SLCDC1_CS (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 26) | ||
182 | #define PA27_AIN_SLCDC1_CLK (GPIO_PORTA | GPIO_AIN | GPIO_OUT | 27) | ||
183 | #define PB6_AIN_SLCDC1_D0 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 6) | ||
184 | #define PB7_AIN_SLCDC1_RS (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 7) | ||
185 | #define PB8_AIN_SLCDC1_CS (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 8) | ||
186 | #define PB9_AIN_SLCDC1_CLK (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 9) | ||
187 | #define PB25_AIN_SLCDC1_DAT0 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 25) | ||
188 | #define PB26_AIN_SLCDC1_DAT1 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 26) | ||
189 | #define PB27_AIN_SLCDC1_DAT2 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 27) | ||
190 | #define PB28_AIN_SLCDC1_DAT3 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 28) | ||
191 | #define PB29_AIN_SLCDC1_DAT4 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 29) | ||
192 | #define PB30_AIN_SLCDC1_DAT5 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 30) | ||
193 | #define PB31_AIN_SLCDC1_DAT6 (GPIO_PORTB | GPIO_AIN | GPIO_OUT | 31) | ||
194 | #define PC5_AIN_SLCDC1_DAT7 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 5) | ||
195 | #define PC6_AIN_SLCDC1_DAT8 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 6) | ||
196 | #define PC7_AIN_SLCDC1_DAT9 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 7) | ||
197 | #define PC8_AIN_SLCDC1_DAT10 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 8) | ||
198 | #define PC9_AIN_SLCDC1_DAT11 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 9) | ||
199 | #define PC10_AIN_SLCDC1_DAT12 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 10) | ||
200 | #define PC11_AIN_SLCDC1_DAT13 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 11) | ||
201 | #define PC12_AIN_SLCDC1_DAT14 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 12) | ||
202 | #define PC13_AIN_SLCDC1_DAT15 (GPIO_PORTC | GPIO_AIN | GPIO_OUT | 13) | ||
203 | #define PE5_AIN_PC_SPKOUT (GPIO_PORTE | GPIO_AIN | GPIO_OUT | 5) | ||
204 | |||
205 | /* BIN GPIO pin functions */ | ||
206 | |||
207 | #define PE5_BIN_TOUT2 (GPIO_PORTE | GPIO_BIN | GPIO_OUT | 5) | ||
208 | |||
209 | /* CIN GPIO pin functions */ | ||
210 | |||
211 | #define PA14_CIN_SLCDC1_DAT0 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 14) | ||
212 | #define PA15_CIN_SLCDC1_DAT1 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 15) | ||
213 | #define PA16_CIN_SLCDC1_DAT2 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 16) | ||
214 | #define PA17_CIN_SLCDC1_DAT3 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 17) | ||
215 | #define PA18_CIN_SLCDC1_DAT4 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 18) | ||
216 | #define PA19_CIN_SLCDC1_DAT5 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 19) | ||
217 | #define PA20_CIN_SLCDC1_DAT6 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 20) | ||
218 | #define PA21_CIN_SLCDC1_DAT7 (GPIO_PORTA | GPIO_CIN | GPIO_OUT | 21) | ||
219 | #define PB30_CIN_UART4_CTS (GPIO_PORTB | GPIO_CIN | GPIO_OUT | 30) | ||
220 | #define PE5_CIN_TOUT3 (GPIO_PORTE | GPIO_CIN | GPIO_OUT | 5) | ||
221 | |||
222 | /* AOUT GPIO pin functions */ | ||
223 | |||
224 | #define PB29_AOUT_UART4_RXD (GPIO_PORTB | GPIO_AOUT | GPIO_IN | 29) | ||
225 | #define PB31_AOUT_UART4_RTS (GPIO_PORTB | GPIO_AOUT | GPIO_IN | 31) | ||
226 | #define PC8_AOUT_USBOTG_TXR_INT (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 8) | ||
227 | #define PC15_AOUT_WKGD (GPIO_PORTC | GPIO_AOUT | GPIO_IN | 15) | ||
228 | #define PF21_AOUT_DTACK (GPIO_PORTF | GPIO_AOUT | GPIO_IN | 21) | ||
229 | |||
230 | #endif /* ifndef __MACH_IOMUX_MX2x_H__ */ | ||
diff --git a/arch/arm/mach-imx/iomux-mx3.h b/arch/arm/mach-imx/iomux-mx3.h deleted file mode 100644 index f79f78a1c0e..00000000000 --- a/arch/arm/mach-imx/iomux-mx3.h +++ /dev/null | |||
@@ -1,753 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2006 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | #ifndef __MACH_IOMUX_MX3_H__ | ||
20 | #define __MACH_IOMUX_MX3_H__ | ||
21 | |||
22 | #include <linux/types.h> | ||
23 | /* | ||
24 | * various IOMUX output functions | ||
25 | */ | ||
26 | |||
27 | #define IOMUX_OCONFIG_GPIO (0 << 4) /* used as GPIO */ | ||
28 | #define IOMUX_OCONFIG_FUNC (1 << 4) /* used as function */ | ||
29 | #define IOMUX_OCONFIG_ALT1 (2 << 4) /* used as alternate function 1 */ | ||
30 | #define IOMUX_OCONFIG_ALT2 (3 << 4) /* used as alternate function 2 */ | ||
31 | #define IOMUX_OCONFIG_ALT3 (4 << 4) /* used as alternate function 3 */ | ||
32 | #define IOMUX_OCONFIG_ALT4 (5 << 4) /* used as alternate function 4 */ | ||
33 | #define IOMUX_OCONFIG_ALT5 (6 << 4) /* used as alternate function 5 */ | ||
34 | #define IOMUX_OCONFIG_ALT6 (7 << 4) /* used as alternate function 6 */ | ||
35 | #define IOMUX_ICONFIG_NONE 0 /* not configured for input */ | ||
36 | #define IOMUX_ICONFIG_GPIO 1 /* used as GPIO */ | ||
37 | #define IOMUX_ICONFIG_FUNC 2 /* used as function */ | ||
38 | #define IOMUX_ICONFIG_ALT1 4 /* used as alternate function 1 */ | ||
39 | #define IOMUX_ICONFIG_ALT2 8 /* used as alternate function 2 */ | ||
40 | |||
41 | #define IOMUX_CONFIG_GPIO (IOMUX_OCONFIG_GPIO | IOMUX_ICONFIG_GPIO) | ||
42 | #define IOMUX_CONFIG_FUNC (IOMUX_OCONFIG_FUNC | IOMUX_ICONFIG_FUNC) | ||
43 | #define IOMUX_CONFIG_ALT1 (IOMUX_OCONFIG_ALT1 | IOMUX_ICONFIG_ALT1) | ||
44 | #define IOMUX_CONFIG_ALT2 (IOMUX_OCONFIG_ALT2 | IOMUX_ICONFIG_ALT2) | ||
45 | |||
46 | /* | ||
47 | * various IOMUX pad functions | ||
48 | */ | ||
49 | enum iomux_pad_config { | ||
50 | PAD_CTL_NOLOOPBACK = 0x0 << 9, | ||
51 | PAD_CTL_LOOPBACK = 0x1 << 9, | ||
52 | PAD_CTL_PKE_NONE = 0x0 << 8, | ||
53 | PAD_CTL_PKE_ENABLE = 0x1 << 8, | ||
54 | PAD_CTL_PUE_KEEPER = 0x0 << 7, | ||
55 | PAD_CTL_PUE_PUD = 0x1 << 7, | ||
56 | PAD_CTL_100K_PD = 0x0 << 5, | ||
57 | PAD_CTL_100K_PU = 0x1 << 5, | ||
58 | PAD_CTL_47K_PU = 0x2 << 5, | ||
59 | PAD_CTL_22K_PU = 0x3 << 5, | ||
60 | PAD_CTL_HYS_CMOS = 0x0 << 4, | ||
61 | PAD_CTL_HYS_SCHMITZ = 0x1 << 4, | ||
62 | PAD_CTL_ODE_CMOS = 0x0 << 3, | ||
63 | PAD_CTL_ODE_OpenDrain = 0x1 << 3, | ||
64 | PAD_CTL_DRV_NORMAL = 0x0 << 1, | ||
65 | PAD_CTL_DRV_HIGH = 0x1 << 1, | ||
66 | PAD_CTL_DRV_MAX = 0x2 << 1, | ||
67 | PAD_CTL_SRE_SLOW = 0x0 << 0, | ||
68 | PAD_CTL_SRE_FAST = 0x1 << 0 | ||
69 | }; | ||
70 | |||
71 | /* | ||
72 | * various IOMUX general purpose functions | ||
73 | */ | ||
74 | enum iomux_gp_func { | ||
75 | MUX_PGP_FIRI = 1 << 0, | ||
76 | MUX_DDR_MODE = 1 << 1, | ||
77 | MUX_PGP_CSPI_BB = 1 << 2, | ||
78 | MUX_PGP_ATA_1 = 1 << 3, | ||
79 | MUX_PGP_ATA_2 = 1 << 4, | ||
80 | MUX_PGP_ATA_3 = 1 << 5, | ||
81 | MUX_PGP_ATA_4 = 1 << 6, | ||
82 | MUX_PGP_ATA_5 = 1 << 7, | ||
83 | MUX_PGP_ATA_6 = 1 << 8, | ||
84 | MUX_PGP_ATA_7 = 1 << 9, | ||
85 | MUX_PGP_ATA_8 = 1 << 10, | ||
86 | MUX_PGP_UH2 = 1 << 11, | ||
87 | MUX_SDCTL_CSD0_SEL = 1 << 12, | ||
88 | MUX_SDCTL_CSD1_SEL = 1 << 13, | ||
89 | MUX_CSPI1_UART3 = 1 << 14, | ||
90 | MUX_EXTDMAREQ2_MBX_SEL = 1 << 15, | ||
91 | MUX_TAMPER_DETECT_EN = 1 << 16, | ||
92 | MUX_PGP_USB_4WIRE = 1 << 17, | ||
93 | MUX_PGP_USB_COMMON = 1 << 18, | ||
94 | MUX_SDHC_MEMSTICK1 = 1 << 19, | ||
95 | MUX_SDHC_MEMSTICK2 = 1 << 20, | ||
96 | MUX_PGP_SPLL_BYP = 1 << 21, | ||
97 | MUX_PGP_UPLL_BYP = 1 << 22, | ||
98 | MUX_PGP_MSHC1_CLK_SEL = 1 << 23, | ||
99 | MUX_PGP_MSHC2_CLK_SEL = 1 << 24, | ||
100 | MUX_CSPI3_UART5_SEL = 1 << 25, | ||
101 | MUX_PGP_ATA_9 = 1 << 26, | ||
102 | MUX_PGP_USB_SUSPEND = 1 << 27, | ||
103 | MUX_PGP_USB_OTG_LOOPBACK = 1 << 28, | ||
104 | MUX_PGP_USB_HS1_LOOPBACK = 1 << 29, | ||
105 | MUX_PGP_USB_HS2_LOOPBACK = 1 << 30, | ||
106 | MUX_CLKO_DDR_MODE = 1 << 31, | ||
107 | }; | ||
108 | |||
109 | /* | ||
110 | * setups a single pin: | ||
111 | * - reserves the pin so that it is not claimed by another driver | ||
112 | * - setups the iomux according to the configuration | ||
113 | * - if the pin is configured as a GPIO, we claim it through kernel gpiolib | ||
114 | */ | ||
115 | int mxc_iomux_alloc_pin(unsigned int pin, const char *label); | ||
116 | /* | ||
117 | * setups mutliple pins | ||
118 | * convenient way to call the above function with tables | ||
119 | */ | ||
120 | int mxc_iomux_setup_multiple_pins(const unsigned int *pin_list, unsigned count, | ||
121 | const char *label); | ||
122 | |||
123 | /* | ||
124 | * releases a single pin: | ||
125 | * - make it available for a future use by another driver | ||
126 | * - frees the GPIO if the pin was configured as GPIO | ||
127 | * - DOES NOT reconfigure the IOMUX in its reset state | ||
128 | */ | ||
129 | void mxc_iomux_release_pin(unsigned int pin); | ||
130 | /* | ||
131 | * releases multiple pins | ||
132 | * convenvient way to call the above function with tables | ||
133 | */ | ||
134 | void mxc_iomux_release_multiple_pins(const unsigned int *pin_list, int count); | ||
135 | |||
136 | /* | ||
137 | * This function enables/disables the general purpose function for a particular | ||
138 | * signal. | ||
139 | */ | ||
140 | void mxc_iomux_set_gpr(enum iomux_gp_func, bool en); | ||
141 | |||
142 | /* | ||
143 | * This function only configures the iomux hardware. | ||
144 | * It is called by the setup functions and should not be called directly anymore. | ||
145 | * It is here visible for backward compatibility | ||
146 | */ | ||
147 | int mxc_iomux_mode(unsigned int pin_mode); | ||
148 | |||
149 | #define IOMUX_PADNUM_MASK 0x1ff | ||
150 | #define IOMUX_GPIONUM_SHIFT 9 | ||
151 | #define IOMUX_GPIONUM_MASK (0xff << IOMUX_GPIONUM_SHIFT) | ||
152 | #define IOMUX_MODE_SHIFT 17 | ||
153 | #define IOMUX_MODE_MASK (0xff << IOMUX_MODE_SHIFT) | ||
154 | |||
155 | #define IOMUX_PIN(gpionum, padnum) \ | ||
156 | (((gpionum << IOMUX_GPIONUM_SHIFT) & IOMUX_GPIONUM_MASK) | \ | ||
157 | (padnum & IOMUX_PADNUM_MASK)) | ||
158 | |||
159 | #define IOMUX_MODE(pin, mode) (pin | mode << IOMUX_MODE_SHIFT) | ||
160 | |||
161 | #define IOMUX_TO_GPIO(iomux_pin) \ | ||
162 | ((iomux_pin & IOMUX_GPIONUM_MASK) >> IOMUX_GPIONUM_SHIFT) | ||
163 | |||
164 | /* | ||
165 | * This enumeration is constructed based on the Section | ||
166 | * "sw_pad_ctl & sw_mux_ctl details" of the MX31 IC Spec. Each enumerated | ||
167 | * value is constructed based on the rules described above. | ||
168 | */ | ||
169 | |||
170 | enum iomux_pins { | ||
171 | MX31_PIN_TTM_PAD = IOMUX_PIN(0xff, 0), | ||
172 | MX31_PIN_CSPI3_SPI_RDY = IOMUX_PIN(0xff, 1), | ||
173 | MX31_PIN_CSPI3_SCLK = IOMUX_PIN(0xff, 2), | ||
174 | MX31_PIN_CSPI3_MISO = IOMUX_PIN(0xff, 3), | ||
175 | MX31_PIN_CSPI3_MOSI = IOMUX_PIN(0xff, 4), | ||
176 | MX31_PIN_CLKSS = IOMUX_PIN(0xff, 5), | ||
177 | MX31_PIN_CE_CONTROL = IOMUX_PIN(0xff, 6), | ||
178 | MX31_PIN_ATA_RESET_B = IOMUX_PIN(95, 7), | ||
179 | MX31_PIN_ATA_DMACK = IOMUX_PIN(94, 8), | ||
180 | MX31_PIN_ATA_DIOW = IOMUX_PIN(93, 9), | ||
181 | MX31_PIN_ATA_DIOR = IOMUX_PIN(92, 10), | ||
182 | MX31_PIN_ATA_CS1 = IOMUX_PIN(91, 11), | ||
183 | MX31_PIN_ATA_CS0 = IOMUX_PIN(90, 12), | ||
184 | MX31_PIN_SD1_DATA3 = IOMUX_PIN(63, 13), | ||
185 | MX31_PIN_SD1_DATA2 = IOMUX_PIN(62, 14), | ||
186 | MX31_PIN_SD1_DATA1 = IOMUX_PIN(61, 15), | ||
187 | MX31_PIN_SD1_DATA0 = IOMUX_PIN(60, 16), | ||
188 | MX31_PIN_SD1_CLK = IOMUX_PIN(59, 17), | ||
189 | MX31_PIN_SD1_CMD = IOMUX_PIN(58, 18), | ||
190 | MX31_PIN_D3_SPL = IOMUX_PIN(0xff, 19), | ||
191 | MX31_PIN_D3_CLS = IOMUX_PIN(0xff, 20), | ||
192 | MX31_PIN_D3_REV = IOMUX_PIN(0xff, 21), | ||
193 | MX31_PIN_CONTRAST = IOMUX_PIN(0xff, 22), | ||
194 | MX31_PIN_VSYNC3 = IOMUX_PIN(0xff, 23), | ||
195 | MX31_PIN_READ = IOMUX_PIN(0xff, 24), | ||
196 | MX31_PIN_WRITE = IOMUX_PIN(0xff, 25), | ||
197 | MX31_PIN_PAR_RS = IOMUX_PIN(0xff, 26), | ||
198 | MX31_PIN_SER_RS = IOMUX_PIN(89, 27), | ||
199 | MX31_PIN_LCS1 = IOMUX_PIN(88, 28), | ||
200 | MX31_PIN_LCS0 = IOMUX_PIN(87, 29), | ||
201 | MX31_PIN_SD_D_CLK = IOMUX_PIN(86, 30), | ||
202 | MX31_PIN_SD_D_IO = IOMUX_PIN(85, 31), | ||
203 | MX31_PIN_SD_D_I = IOMUX_PIN(84, 32), | ||
204 | MX31_PIN_DRDY0 = IOMUX_PIN(0xff, 33), | ||
205 | MX31_PIN_FPSHIFT = IOMUX_PIN(0xff, 34), | ||
206 | MX31_PIN_HSYNC = IOMUX_PIN(0xff, 35), | ||
207 | MX31_PIN_VSYNC0 = IOMUX_PIN(0xff, 36), | ||
208 | MX31_PIN_LD17 = IOMUX_PIN(0xff, 37), | ||
209 | MX31_PIN_LD16 = IOMUX_PIN(0xff, 38), | ||
210 | MX31_PIN_LD15 = IOMUX_PIN(0xff, 39), | ||
211 | MX31_PIN_LD14 = IOMUX_PIN(0xff, 40), | ||
212 | MX31_PIN_LD13 = IOMUX_PIN(0xff, 41), | ||
213 | MX31_PIN_LD12 = IOMUX_PIN(0xff, 42), | ||
214 | MX31_PIN_LD11 = IOMUX_PIN(0xff, 43), | ||
215 | MX31_PIN_LD10 = IOMUX_PIN(0xff, 44), | ||
216 | MX31_PIN_LD9 = IOMUX_PIN(0xff, 45), | ||
217 | MX31_PIN_LD8 = IOMUX_PIN(0xff, 46), | ||
218 | MX31_PIN_LD7 = IOMUX_PIN(0xff, 47), | ||
219 | MX31_PIN_LD6 = IOMUX_PIN(0xff, 48), | ||
220 | MX31_PIN_LD5 = IOMUX_PIN(0xff, 49), | ||
221 | MX31_PIN_LD4 = IOMUX_PIN(0xff, 50), | ||
222 | MX31_PIN_LD3 = IOMUX_PIN(0xff, 51), | ||
223 | MX31_PIN_LD2 = IOMUX_PIN(0xff, 52), | ||
224 | MX31_PIN_LD1 = IOMUX_PIN(0xff, 53), | ||
225 | MX31_PIN_LD0 = IOMUX_PIN(0xff, 54), | ||
226 | MX31_PIN_USBH2_DATA1 = IOMUX_PIN(0xff, 55), | ||
227 | MX31_PIN_USBH2_DATA0 = IOMUX_PIN(0xff, 56), | ||
228 | MX31_PIN_USBH2_NXT = IOMUX_PIN(0xff, 57), | ||
229 | MX31_PIN_USBH2_STP = IOMUX_PIN(0xff, 58), | ||
230 | MX31_PIN_USBH2_DIR = IOMUX_PIN(0xff, 59), | ||
231 | MX31_PIN_USBH2_CLK = IOMUX_PIN(0xff, 60), | ||
232 | MX31_PIN_USBOTG_DATA7 = IOMUX_PIN(0xff, 61), | ||
233 | MX31_PIN_USBOTG_DATA6 = IOMUX_PIN(0xff, 62), | ||
234 | MX31_PIN_USBOTG_DATA5 = IOMUX_PIN(0xff, 63), | ||
235 | MX31_PIN_USBOTG_DATA4 = IOMUX_PIN(0xff, 64), | ||
236 | MX31_PIN_USBOTG_DATA3 = IOMUX_PIN(0xff, 65), | ||
237 | MX31_PIN_USBOTG_DATA2 = IOMUX_PIN(0xff, 66), | ||
238 | MX31_PIN_USBOTG_DATA1 = IOMUX_PIN(0xff, 67), | ||
239 | MX31_PIN_USBOTG_DATA0 = IOMUX_PIN(0xff, 68), | ||
240 | MX31_PIN_USBOTG_NXT = IOMUX_PIN(0xff, 69), | ||
241 | MX31_PIN_USBOTG_STP = IOMUX_PIN(0xff, 70), | ||
242 | MX31_PIN_USBOTG_DIR = IOMUX_PIN(0xff, 71), | ||
243 | MX31_PIN_USBOTG_CLK = IOMUX_PIN(0xff, 72), | ||
244 | MX31_PIN_USB_BYP = IOMUX_PIN(31, 73), | ||
245 | MX31_PIN_USB_OC = IOMUX_PIN(30, 74), | ||
246 | MX31_PIN_USB_PWR = IOMUX_PIN(29, 75), | ||
247 | MX31_PIN_SJC_MOD = IOMUX_PIN(0xff, 76), | ||
248 | MX31_PIN_DE_B = IOMUX_PIN(0xff, 77), | ||
249 | MX31_PIN_TRSTB = IOMUX_PIN(0xff, 78), | ||
250 | MX31_PIN_TDO = IOMUX_PIN(0xff, 79), | ||
251 | MX31_PIN_TDI = IOMUX_PIN(0xff, 80), | ||
252 | MX31_PIN_TMS = IOMUX_PIN(0xff, 81), | ||
253 | MX31_PIN_TCK = IOMUX_PIN(0xff, 82), | ||
254 | MX31_PIN_RTCK = IOMUX_PIN(0xff, 83), | ||
255 | MX31_PIN_KEY_COL7 = IOMUX_PIN(57, 84), | ||
256 | MX31_PIN_KEY_COL6 = IOMUX_PIN(56, 85), | ||
257 | MX31_PIN_KEY_COL5 = IOMUX_PIN(55, 86), | ||
258 | MX31_PIN_KEY_COL4 = IOMUX_PIN(54, 87), | ||
259 | MX31_PIN_KEY_COL3 = IOMUX_PIN(0xff, 88), | ||
260 | MX31_PIN_KEY_COL2 = IOMUX_PIN(0xff, 89), | ||
261 | MX31_PIN_KEY_COL1 = IOMUX_PIN(0xff, 90), | ||
262 | MX31_PIN_KEY_COL0 = IOMUX_PIN(0xff, 91), | ||
263 | MX31_PIN_KEY_ROW7 = IOMUX_PIN(53, 92), | ||
264 | MX31_PIN_KEY_ROW6 = IOMUX_PIN(52, 93), | ||
265 | MX31_PIN_KEY_ROW5 = IOMUX_PIN(51, 94), | ||
266 | MX31_PIN_KEY_ROW4 = IOMUX_PIN(50, 95), | ||
267 | MX31_PIN_KEY_ROW3 = IOMUX_PIN(0xff, 96), | ||
268 | MX31_PIN_KEY_ROW2 = IOMUX_PIN(0xff, 97), | ||
269 | MX31_PIN_KEY_ROW1 = IOMUX_PIN(0xff, 98), | ||
270 | MX31_PIN_KEY_ROW0 = IOMUX_PIN(0xff, 99), | ||
271 | MX31_PIN_BATT_LINE = IOMUX_PIN(49, 100), | ||
272 | MX31_PIN_CTS2 = IOMUX_PIN(0xff, 101), | ||
273 | MX31_PIN_RTS2 = IOMUX_PIN(0xff, 102), | ||
274 | MX31_PIN_TXD2 = IOMUX_PIN(28, 103), | ||
275 | MX31_PIN_RXD2 = IOMUX_PIN(27, 104), | ||
276 | MX31_PIN_DTR_DCE2 = IOMUX_PIN(48, 105), | ||
277 | MX31_PIN_DCD_DTE1 = IOMUX_PIN(47, 106), | ||
278 | MX31_PIN_RI_DTE1 = IOMUX_PIN(46, 107), | ||
279 | MX31_PIN_DSR_DTE1 = IOMUX_PIN(45, 108), | ||
280 | MX31_PIN_DTR_DTE1 = IOMUX_PIN(44, 109), | ||
281 | MX31_PIN_DCD_DCE1 = IOMUX_PIN(43, 110), | ||
282 | MX31_PIN_RI_DCE1 = IOMUX_PIN(42, 111), | ||
283 | MX31_PIN_DSR_DCE1 = IOMUX_PIN(41, 112), | ||
284 | MX31_PIN_DTR_DCE1 = IOMUX_PIN(40, 113), | ||
285 | MX31_PIN_CTS1 = IOMUX_PIN(39, 114), | ||
286 | MX31_PIN_RTS1 = IOMUX_PIN(38, 115), | ||
287 | MX31_PIN_TXD1 = IOMUX_PIN(37, 116), | ||
288 | MX31_PIN_RXD1 = IOMUX_PIN(36, 117), | ||
289 | MX31_PIN_CSPI2_SPI_RDY = IOMUX_PIN(0xff, 118), | ||
290 | MX31_PIN_CSPI2_SCLK = IOMUX_PIN(0xff, 119), | ||
291 | MX31_PIN_CSPI2_SS2 = IOMUX_PIN(0xff, 120), | ||
292 | MX31_PIN_CSPI2_SS1 = IOMUX_PIN(0xff, 121), | ||
293 | MX31_PIN_CSPI2_SS0 = IOMUX_PIN(0xff, 122), | ||
294 | MX31_PIN_CSPI2_MISO = IOMUX_PIN(0xff, 123), | ||
295 | MX31_PIN_CSPI2_MOSI = IOMUX_PIN(0xff, 124), | ||
296 | MX31_PIN_CSPI1_SPI_RDY = IOMUX_PIN(0xff, 125), | ||
297 | MX31_PIN_CSPI1_SCLK = IOMUX_PIN(0xff, 126), | ||
298 | MX31_PIN_CSPI1_SS2 = IOMUX_PIN(0xff, 127), | ||
299 | MX31_PIN_CSPI1_SS1 = IOMUX_PIN(0xff, 128), | ||
300 | MX31_PIN_CSPI1_SS0 = IOMUX_PIN(0xff, 129), | ||
301 | MX31_PIN_CSPI1_MISO = IOMUX_PIN(0xff, 130), | ||
302 | MX31_PIN_CSPI1_MOSI = IOMUX_PIN(0xff, 131), | ||
303 | MX31_PIN_SFS6 = IOMUX_PIN(26, 132), | ||
304 | MX31_PIN_SCK6 = IOMUX_PIN(25, 133), | ||
305 | MX31_PIN_SRXD6 = IOMUX_PIN(24, 134), | ||
306 | MX31_PIN_STXD6 = IOMUX_PIN(23, 135), | ||
307 | MX31_PIN_SFS5 = IOMUX_PIN(0xff, 136), | ||
308 | MX31_PIN_SCK5 = IOMUX_PIN(0xff, 137), | ||
309 | MX31_PIN_SRXD5 = IOMUX_PIN(22, 138), | ||
310 | MX31_PIN_STXD5 = IOMUX_PIN(21, 139), | ||
311 | MX31_PIN_SFS4 = IOMUX_PIN(0xff, 140), | ||
312 | MX31_PIN_SCK4 = IOMUX_PIN(0xff, 141), | ||
313 | MX31_PIN_SRXD4 = IOMUX_PIN(20, 142), | ||
314 | MX31_PIN_STXD4 = IOMUX_PIN(19, 143), | ||
315 | MX31_PIN_SFS3 = IOMUX_PIN(0xff, 144), | ||
316 | MX31_PIN_SCK3 = IOMUX_PIN(0xff, 145), | ||
317 | MX31_PIN_SRXD3 = IOMUX_PIN(18, 146), | ||
318 | MX31_PIN_STXD3 = IOMUX_PIN(17, 147), | ||
319 | MX31_PIN_I2C_DAT = IOMUX_PIN(0xff, 148), | ||
320 | MX31_PIN_I2C_CLK = IOMUX_PIN(0xff, 149), | ||
321 | MX31_PIN_CSI_PIXCLK = IOMUX_PIN(83, 150), | ||
322 | MX31_PIN_CSI_HSYNC = IOMUX_PIN(82, 151), | ||
323 | MX31_PIN_CSI_VSYNC = IOMUX_PIN(81, 152), | ||
324 | MX31_PIN_CSI_MCLK = IOMUX_PIN(80, 153), | ||
325 | MX31_PIN_CSI_D15 = IOMUX_PIN(79, 154), | ||
326 | MX31_PIN_CSI_D14 = IOMUX_PIN(78, 155), | ||
327 | MX31_PIN_CSI_D13 = IOMUX_PIN(77, 156), | ||
328 | MX31_PIN_CSI_D12 = IOMUX_PIN(76, 157), | ||
329 | MX31_PIN_CSI_D11 = IOMUX_PIN(75, 158), | ||
330 | MX31_PIN_CSI_D10 = IOMUX_PIN(74, 159), | ||
331 | MX31_PIN_CSI_D9 = IOMUX_PIN(73, 160), | ||
332 | MX31_PIN_CSI_D8 = IOMUX_PIN(72, 161), | ||
333 | MX31_PIN_CSI_D7 = IOMUX_PIN(71, 162), | ||
334 | MX31_PIN_CSI_D6 = IOMUX_PIN(70, 163), | ||
335 | MX31_PIN_CSI_D5 = IOMUX_PIN(69, 164), | ||
336 | MX31_PIN_CSI_D4 = IOMUX_PIN(68, 165), | ||
337 | MX31_PIN_M_GRANT = IOMUX_PIN(0xff, 166), | ||
338 | MX31_PIN_M_REQUEST = IOMUX_PIN(0xff, 167), | ||
339 | MX31_PIN_PC_POE = IOMUX_PIN(0xff, 168), | ||
340 | MX31_PIN_PC_RW_B = IOMUX_PIN(0xff, 169), | ||
341 | MX31_PIN_IOIS16 = IOMUX_PIN(0xff, 170), | ||
342 | MX31_PIN_PC_RST = IOMUX_PIN(0xff, 171), | ||
343 | MX31_PIN_PC_BVD2 = IOMUX_PIN(0xff, 172), | ||
344 | MX31_PIN_PC_BVD1 = IOMUX_PIN(0xff, 173), | ||
345 | MX31_PIN_PC_VS2 = IOMUX_PIN(0xff, 174), | ||
346 | MX31_PIN_PC_VS1 = IOMUX_PIN(0xff, 175), | ||
347 | MX31_PIN_PC_PWRON = IOMUX_PIN(0xff, 176), | ||
348 | MX31_PIN_PC_READY = IOMUX_PIN(0xff, 177), | ||
349 | MX31_PIN_PC_WAIT_B = IOMUX_PIN(0xff, 178), | ||
350 | MX31_PIN_PC_CD2_B = IOMUX_PIN(0xff, 179), | ||
351 | MX31_PIN_PC_CD1_B = IOMUX_PIN(0xff, 180), | ||
352 | MX31_PIN_D0 = IOMUX_PIN(0xff, 181), | ||
353 | MX31_PIN_D1 = IOMUX_PIN(0xff, 182), | ||
354 | MX31_PIN_D2 = IOMUX_PIN(0xff, 183), | ||
355 | MX31_PIN_D3 = IOMUX_PIN(0xff, 184), | ||
356 | MX31_PIN_D4 = IOMUX_PIN(0xff, 185), | ||
357 | MX31_PIN_D5 = IOMUX_PIN(0xff, 186), | ||
358 | MX31_PIN_D6 = IOMUX_PIN(0xff, 187), | ||
359 | MX31_PIN_D7 = IOMUX_PIN(0xff, 188), | ||
360 | MX31_PIN_D8 = IOMUX_PIN(0xff, 189), | ||
361 | MX31_PIN_D9 = IOMUX_PIN(0xff, 190), | ||
362 | MX31_PIN_D10 = IOMUX_PIN(0xff, 191), | ||
363 | MX31_PIN_D11 = IOMUX_PIN(0xff, 192), | ||
364 | MX31_PIN_D12 = IOMUX_PIN(0xff, 193), | ||
365 | MX31_PIN_D13 = IOMUX_PIN(0xff, 194), | ||
366 | MX31_PIN_D14 = IOMUX_PIN(0xff, 195), | ||
367 | MX31_PIN_D15 = IOMUX_PIN(0xff, 196), | ||
368 | MX31_PIN_NFRB = IOMUX_PIN(16, 197), | ||
369 | MX31_PIN_NFCE_B = IOMUX_PIN(15, 198), | ||
370 | MX31_PIN_NFWP_B = IOMUX_PIN(14, 199), | ||
371 | MX31_PIN_NFCLE = IOMUX_PIN(13, 200), | ||
372 | MX31_PIN_NFALE = IOMUX_PIN(12, 201), | ||
373 | MX31_PIN_NFRE_B = IOMUX_PIN(11, 202), | ||
374 | MX31_PIN_NFWE_B = IOMUX_PIN(10, 203), | ||
375 | MX31_PIN_SDQS3 = IOMUX_PIN(0xff, 204), | ||
376 | MX31_PIN_SDQS2 = IOMUX_PIN(0xff, 205), | ||
377 | MX31_PIN_SDQS1 = IOMUX_PIN(0xff, 206), | ||
378 | MX31_PIN_SDQS0 = IOMUX_PIN(0xff, 207), | ||
379 | MX31_PIN_SDCLK_B = IOMUX_PIN(0xff, 208), | ||
380 | MX31_PIN_SDCLK = IOMUX_PIN(0xff, 209), | ||
381 | MX31_PIN_SDCKE1 = IOMUX_PIN(0xff, 210), | ||
382 | MX31_PIN_SDCKE0 = IOMUX_PIN(0xff, 211), | ||
383 | MX31_PIN_SDWE = IOMUX_PIN(0xff, 212), | ||
384 | MX31_PIN_CAS = IOMUX_PIN(0xff, 213), | ||
385 | MX31_PIN_RAS = IOMUX_PIN(0xff, 214), | ||
386 | MX31_PIN_RW = IOMUX_PIN(0xff, 215), | ||
387 | MX31_PIN_BCLK = IOMUX_PIN(0xff, 216), | ||
388 | MX31_PIN_LBA = IOMUX_PIN(0xff, 217), | ||
389 | MX31_PIN_ECB = IOMUX_PIN(0xff, 218), | ||
390 | MX31_PIN_CS5 = IOMUX_PIN(0xff, 219), | ||
391 | MX31_PIN_CS4 = IOMUX_PIN(0xff, 220), | ||
392 | MX31_PIN_CS3 = IOMUX_PIN(0xff, 221), | ||
393 | MX31_PIN_CS2 = IOMUX_PIN(0xff, 222), | ||
394 | MX31_PIN_CS1 = IOMUX_PIN(0xff, 223), | ||
395 | MX31_PIN_CS0 = IOMUX_PIN(0xff, 224), | ||
396 | MX31_PIN_OE = IOMUX_PIN(0xff, 225), | ||
397 | MX31_PIN_EB1 = IOMUX_PIN(0xff, 226), | ||
398 | MX31_PIN_EB0 = IOMUX_PIN(0xff, 227), | ||
399 | MX31_PIN_DQM3 = IOMUX_PIN(0xff, 228), | ||
400 | MX31_PIN_DQM2 = IOMUX_PIN(0xff, 229), | ||
401 | MX31_PIN_DQM1 = IOMUX_PIN(0xff, 230), | ||
402 | MX31_PIN_DQM0 = IOMUX_PIN(0xff, 231), | ||
403 | MX31_PIN_SD31 = IOMUX_PIN(0xff, 232), | ||
404 | MX31_PIN_SD30 = IOMUX_PIN(0xff, 233), | ||
405 | MX31_PIN_SD29 = IOMUX_PIN(0xff, 234), | ||
406 | MX31_PIN_SD28 = IOMUX_PIN(0xff, 235), | ||
407 | MX31_PIN_SD27 = IOMUX_PIN(0xff, 236), | ||
408 | MX31_PIN_SD26 = IOMUX_PIN(0xff, 237), | ||
409 | MX31_PIN_SD25 = IOMUX_PIN(0xff, 238), | ||
410 | MX31_PIN_SD24 = IOMUX_PIN(0xff, 239), | ||
411 | MX31_PIN_SD23 = IOMUX_PIN(0xff, 240), | ||
412 | MX31_PIN_SD22 = IOMUX_PIN(0xff, 241), | ||
413 | MX31_PIN_SD21 = IOMUX_PIN(0xff, 242), | ||
414 | MX31_PIN_SD20 = IOMUX_PIN(0xff, 243), | ||
415 | MX31_PIN_SD19 = IOMUX_PIN(0xff, 244), | ||
416 | MX31_PIN_SD18 = IOMUX_PIN(0xff, 245), | ||
417 | MX31_PIN_SD17 = IOMUX_PIN(0xff, 246), | ||
418 | MX31_PIN_SD16 = IOMUX_PIN(0xff, 247), | ||
419 | MX31_PIN_SD15 = IOMUX_PIN(0xff, 248), | ||
420 | MX31_PIN_SD14 = IOMUX_PIN(0xff, 249), | ||
421 | MX31_PIN_SD13 = IOMUX_PIN(0xff, 250), | ||
422 | MX31_PIN_SD12 = IOMUX_PIN(0xff, 251), | ||
423 | MX31_PIN_SD11 = IOMUX_PIN(0xff, 252), | ||
424 | MX31_PIN_SD10 = IOMUX_PIN(0xff, 253), | ||
425 | MX31_PIN_SD9 = IOMUX_PIN(0xff, 254), | ||
426 | MX31_PIN_SD8 = IOMUX_PIN(0xff, 255), | ||
427 | MX31_PIN_SD7 = IOMUX_PIN(0xff, 256), | ||
428 | MX31_PIN_SD6 = IOMUX_PIN(0xff, 257), | ||
429 | MX31_PIN_SD5 = IOMUX_PIN(0xff, 258), | ||
430 | MX31_PIN_SD4 = IOMUX_PIN(0xff, 259), | ||
431 | MX31_PIN_SD3 = IOMUX_PIN(0xff, 260), | ||
432 | MX31_PIN_SD2 = IOMUX_PIN(0xff, 261), | ||
433 | MX31_PIN_SD1 = IOMUX_PIN(0xff, 262), | ||
434 | MX31_PIN_SD0 = IOMUX_PIN(0xff, 263), | ||
435 | MX31_PIN_SDBA0 = IOMUX_PIN(0xff, 264), | ||
436 | MX31_PIN_SDBA1 = IOMUX_PIN(0xff, 265), | ||
437 | MX31_PIN_A25 = IOMUX_PIN(0xff, 266), | ||
438 | MX31_PIN_A24 = IOMUX_PIN(0xff, 267), | ||
439 | MX31_PIN_A23 = IOMUX_PIN(0xff, 268), | ||
440 | MX31_PIN_A22 = IOMUX_PIN(0xff, 269), | ||
441 | MX31_PIN_A21 = IOMUX_PIN(0xff, 270), | ||
442 | MX31_PIN_A20 = IOMUX_PIN(0xff, 271), | ||
443 | MX31_PIN_A19 = IOMUX_PIN(0xff, 272), | ||
444 | MX31_PIN_A18 = IOMUX_PIN(0xff, 273), | ||
445 | MX31_PIN_A17 = IOMUX_PIN(0xff, 274), | ||
446 | MX31_PIN_A16 = IOMUX_PIN(0xff, 275), | ||
447 | MX31_PIN_A14 = IOMUX_PIN(0xff, 276), | ||
448 | MX31_PIN_A15 = IOMUX_PIN(0xff, 277), | ||
449 | MX31_PIN_A13 = IOMUX_PIN(0xff, 278), | ||
450 | MX31_PIN_A12 = IOMUX_PIN(0xff, 279), | ||
451 | MX31_PIN_A11 = IOMUX_PIN(0xff, 280), | ||
452 | MX31_PIN_MA10 = IOMUX_PIN(0xff, 281), | ||
453 | MX31_PIN_A10 = IOMUX_PIN(0xff, 282), | ||
454 | MX31_PIN_A9 = IOMUX_PIN(0xff, 283), | ||
455 | MX31_PIN_A8 = IOMUX_PIN(0xff, 284), | ||
456 | MX31_PIN_A7 = IOMUX_PIN(0xff, 285), | ||
457 | MX31_PIN_A6 = IOMUX_PIN(0xff, 286), | ||
458 | MX31_PIN_A5 = IOMUX_PIN(0xff, 287), | ||
459 | MX31_PIN_A4 = IOMUX_PIN(0xff, 288), | ||
460 | MX31_PIN_A3 = IOMUX_PIN(0xff, 289), | ||
461 | MX31_PIN_A2 = IOMUX_PIN(0xff, 290), | ||
462 | MX31_PIN_A1 = IOMUX_PIN(0xff, 291), | ||
463 | MX31_PIN_A0 = IOMUX_PIN(0xff, 292), | ||
464 | MX31_PIN_VPG1 = IOMUX_PIN(0xff, 293), | ||
465 | MX31_PIN_VPG0 = IOMUX_PIN(0xff, 294), | ||
466 | MX31_PIN_DVFS1 = IOMUX_PIN(0xff, 295), | ||
467 | MX31_PIN_DVFS0 = IOMUX_PIN(0xff, 296), | ||
468 | MX31_PIN_VSTBY = IOMUX_PIN(0xff, 297), | ||
469 | MX31_PIN_POWER_FAIL = IOMUX_PIN(0xff, 298), | ||
470 | MX31_PIN_CKIL = IOMUX_PIN(0xff, 299), | ||
471 | MX31_PIN_BOOT_MODE4 = IOMUX_PIN(0xff, 300), | ||
472 | MX31_PIN_BOOT_MODE3 = IOMUX_PIN(0xff, 301), | ||
473 | MX31_PIN_BOOT_MODE2 = IOMUX_PIN(0xff, 302), | ||
474 | MX31_PIN_BOOT_MODE1 = IOMUX_PIN(0xff, 303), | ||
475 | MX31_PIN_BOOT_MODE0 = IOMUX_PIN(0xff, 304), | ||
476 | MX31_PIN_CLKO = IOMUX_PIN(0xff, 305), | ||
477 | MX31_PIN_POR_B = IOMUX_PIN(0xff, 306), | ||
478 | MX31_PIN_RESET_IN_B = IOMUX_PIN(0xff, 307), | ||
479 | MX31_PIN_CKIH = IOMUX_PIN(0xff, 308), | ||
480 | MX31_PIN_SIMPD0 = IOMUX_PIN(35, 309), | ||
481 | MX31_PIN_SRX0 = IOMUX_PIN(34, 310), | ||
482 | MX31_PIN_STX0 = IOMUX_PIN(33, 311), | ||
483 | MX31_PIN_SVEN0 = IOMUX_PIN(32, 312), | ||
484 | MX31_PIN_SRST0 = IOMUX_PIN(67, 313), | ||
485 | MX31_PIN_SCLK0 = IOMUX_PIN(66, 314), | ||
486 | MX31_PIN_GPIO3_1 = IOMUX_PIN(65, 315), | ||
487 | MX31_PIN_GPIO3_0 = IOMUX_PIN(64, 316), | ||
488 | MX31_PIN_GPIO1_6 = IOMUX_PIN( 6, 317), | ||
489 | MX31_PIN_GPIO1_5 = IOMUX_PIN( 5, 318), | ||
490 | MX31_PIN_GPIO1_4 = IOMUX_PIN( 4, 319), | ||
491 | MX31_PIN_GPIO1_3 = IOMUX_PIN( 3, 320), | ||
492 | MX31_PIN_GPIO1_2 = IOMUX_PIN( 2, 321), | ||
493 | MX31_PIN_GPIO1_1 = IOMUX_PIN( 1, 322), | ||
494 | MX31_PIN_GPIO1_0 = IOMUX_PIN( 0, 323), | ||
495 | MX31_PIN_PWMO = IOMUX_PIN( 9, 324), | ||
496 | MX31_PIN_WATCHDOG_RST = IOMUX_PIN(0xff, 325), | ||
497 | MX31_PIN_COMPARE = IOMUX_PIN( 8, 326), | ||
498 | MX31_PIN_CAPTURE = IOMUX_PIN( 7, 327), | ||
499 | }; | ||
500 | |||
501 | #define PIN_MAX 327 | ||
502 | #define NB_PORTS 12 /* NB_PINS/32, we chose 32 pins per "PORT" */ | ||
503 | |||
504 | /* | ||
505 | * Convenience values for use with mxc_iomux_mode() | ||
506 | * | ||
507 | * Format here is MX31_PIN_(pin name)__(function) | ||
508 | */ | ||
509 | #define MX31_PIN_CSPI3_MOSI__RXD3 IOMUX_MODE(MX31_PIN_CSPI3_MOSI, IOMUX_CONFIG_ALT1) | ||
510 | #define MX31_PIN_CSPI3_MISO__TXD3 IOMUX_MODE(MX31_PIN_CSPI3_MISO, IOMUX_CONFIG_ALT1) | ||
511 | #define MX31_PIN_CSPI3_SCLK__RTS3 IOMUX_MODE(MX31_PIN_CSPI3_SCLK, IOMUX_CONFIG_ALT1) | ||
512 | #define MX31_PIN_CSPI3_SPI_RDY__CTS3 IOMUX_MODE(MX31_PIN_CSPI3_SPI_RDY, IOMUX_CONFIG_ALT1) | ||
513 | #define MX31_PIN_CTS1__CTS1 IOMUX_MODE(MX31_PIN_CTS1, IOMUX_CONFIG_FUNC) | ||
514 | #define MX31_PIN_RTS1__RTS1 IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_FUNC) | ||
515 | #define MX31_PIN_RTS1__SFS IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_ALT2) | ||
516 | #define MX31_PIN_TXD1__TXD1 IOMUX_MODE(MX31_PIN_TXD1, IOMUX_CONFIG_FUNC) | ||
517 | #define MX31_PIN_TXD1__SCK IOMUX_MODE(MX31_PIN_TXD1, IOMUX_CONFIG_ALT2) | ||
518 | #define MX31_PIN_RXD1__RXD1 IOMUX_MODE(MX31_PIN_RXD1, IOMUX_CONFIG_FUNC) | ||
519 | #define MX31_PIN_RXD1__STXDA IOMUX_MODE(MX31_PIN_RXD1, IOMUX_CONFIG_ALT2) | ||
520 | #define MX31_PIN_DCD_DCE1__DCD_DCE1 IOMUX_MODE(MX31_PIN_DCD_DCE1, IOMUX_CONFIG_FUNC) | ||
521 | #define MX31_PIN_RI_DCE1__RI_DCE1 IOMUX_MODE(MX31_PIN_RI_DCE1, IOMUX_CONFIG_FUNC) | ||
522 | #define MX31_PIN_DSR_DCE1__DSR_DCE1 IOMUX_MODE(MX31_PIN_DSR_DCE1, IOMUX_CONFIG_FUNC) | ||
523 | #define MX31_PIN_DTR_DCE1__DTR_DCE1 IOMUX_MODE(MX31_PIN_DTR_DCE1, IOMUX_CONFIG_FUNC) | ||
524 | #define MX31_PIN_DTR_DCE1__SRXDA IOMUX_MODE(MX31_PIN_DTR_DCE1, IOMUX_CONFIG_ALT2) | ||
525 | #define MX31_PIN_CTS2__CTS2 IOMUX_MODE(MX31_PIN_CTS2, IOMUX_CONFIG_FUNC) | ||
526 | #define MX31_PIN_RTS2__RTS2 IOMUX_MODE(MX31_PIN_RTS2, IOMUX_CONFIG_FUNC) | ||
527 | #define MX31_PIN_TXD2__TXD2 IOMUX_MODE(MX31_PIN_TXD2, IOMUX_CONFIG_FUNC) | ||
528 | #define MX31_PIN_RXD2__RXD2 IOMUX_MODE(MX31_PIN_RXD2, IOMUX_CONFIG_FUNC) | ||
529 | #define MX31_PIN_DCD_DTE1__DCD_DTE2 IOMUX_MODE(MX31_PIN_DCD_DTE1, IOMUX_CONFIG_ALT1) | ||
530 | #define MX31_PIN_RI_DTE1__RI_DTE2 IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_ALT1) | ||
531 | #define MX31_PIN_DSR_DTE1__DSR_DTE2 IOMUX_MODE(MX31_PIN_DSR_DTE1, IOMUX_CONFIG_ALT1) | ||
532 | #define MX31_PIN_DTR_DTE1__DTR_DTE2 IOMUX_MODE(MX31_PIN_DTR_DTE1, IOMUX_OCONFIG_ALT3 | IOMUX_ICONFIG_NONE) | ||
533 | #define MX31_PIN_PC_RST__CTS5 IOMUX_MODE(MX31_PIN_PC_RST, IOMUX_CONFIG_ALT2) | ||
534 | #define MX31_PIN_PC_VS2__RTS5 IOMUX_MODE(MX31_PIN_PC_VS2, IOMUX_CONFIG_ALT2) | ||
535 | #define MX31_PIN_PC_BVD2__TXD5 IOMUX_MODE(MX31_PIN_PC_BVD2, IOMUX_CONFIG_ALT2) | ||
536 | #define MX31_PIN_PC_BVD1__RXD5 IOMUX_MODE(MX31_PIN_PC_BVD1, IOMUX_CONFIG_ALT2) | ||
537 | #define MX31_PIN_CSPI1_MOSI__MOSI IOMUX_MODE(MX31_PIN_CSPI1_MOSI, IOMUX_CONFIG_FUNC) | ||
538 | #define MX31_PIN_CSPI1_MISO__MISO IOMUX_MODE(MX31_PIN_CSPI1_MISO, IOMUX_CONFIG_FUNC) | ||
539 | #define MX31_PIN_CSPI1_SCLK__SCLK IOMUX_MODE(MX31_PIN_CSPI1_SCLK, IOMUX_CONFIG_FUNC) | ||
540 | #define MX31_PIN_CSPI1_SPI_RDY__SPI_RDY IOMUX_MODE(MX31_PIN_CSPI1_SPI_RDY, IOMUX_CONFIG_FUNC) | ||
541 | #define MX31_PIN_CSPI1_SS0__SS0 IOMUX_MODE(MX31_PIN_CSPI1_SS0, IOMUX_CONFIG_FUNC) | ||
542 | #define MX31_PIN_CSPI1_SS1__SS1 IOMUX_MODE(MX31_PIN_CSPI1_SS1, IOMUX_CONFIG_FUNC) | ||
543 | #define MX31_PIN_CSPI1_SS2__SS2 IOMUX_MODE(MX31_PIN_CSPI1_SS2, IOMUX_CONFIG_FUNC) | ||
544 | #define MX31_PIN_CSPI2_MOSI__MOSI IOMUX_MODE(MX31_PIN_CSPI2_MOSI, IOMUX_CONFIG_FUNC) | ||
545 | #define MX31_PIN_CSPI2_MOSI__SCL IOMUX_MODE(MX31_PIN_CSPI2_MOSI, IOMUX_CONFIG_ALT1) | ||
546 | #define MX31_PIN_CSPI2_MISO__MISO IOMUX_MODE(MX31_PIN_CSPI2_MISO, IOMUX_CONFIG_FUNC) | ||
547 | #define MX31_PIN_CSPI2_MISO__SDA IOMUX_MODE(MX31_PIN_CSPI2_MISO, IOMUX_CONFIG_ALT1) | ||
548 | #define MX31_PIN_CSPI2_SCLK__SCLK IOMUX_MODE(MX31_PIN_CSPI2_SCLK, IOMUX_CONFIG_FUNC) | ||
549 | #define MX31_PIN_CSPI2_SPI_RDY__SPI_RDY IOMUX_MODE(MX31_PIN_CSPI2_SPI_RDY, IOMUX_CONFIG_FUNC) | ||
550 | #define MX31_PIN_CSPI2_SS0__SS0 IOMUX_MODE(MX31_PIN_CSPI2_SS0, IOMUX_CONFIG_FUNC) | ||
551 | #define MX31_PIN_CSPI2_SS1__SS1 IOMUX_MODE(MX31_PIN_CSPI2_SS1, IOMUX_CONFIG_FUNC) | ||
552 | #define MX31_PIN_CSPI2_SS2__SS2 IOMUX_MODE(MX31_PIN_CSPI2_SS2, IOMUX_CONFIG_FUNC) | ||
553 | #define MX31_PIN_CSPI3_MOSI__MOSI IOMUX_MODE(MX31_PIN_CSPI3_MOSI, IOMUX_CONFIG_FUNC) | ||
554 | #define MX31_PIN_CSPI3_MISO__MISO IOMUX_MODE(MX31_PIN_CSPI3_MISO, IOMUX_CONFIG_FUNC) | ||
555 | #define MX31_PIN_CSPI3_SCLK__SCLK IOMUX_MODE(MX31_PIN_CSPI3_SCLK, IOMUX_CONFIG_FUNC) | ||
556 | #define MX31_PIN_CSPI3_SPI_RDY__SPI_RDY IOMUX_MODE(MX31_PIN_CSPI3_SPI_RDY, IOMUX_CONFIG_FUNC) | ||
557 | #define MX31_PIN_BATT_LINE__OWIRE IOMUX_MODE(MX31_PIN_BATT_LINE, IOMUX_CONFIG_FUNC) | ||
558 | #define MX31_PIN_CS4__CS4 IOMUX_MODE(MX31_PIN_CS4, IOMUX_CONFIG_FUNC) | ||
559 | #define MX31_PIN_SD1_DATA3__SD1_DATA3 IOMUX_MODE(MX31_PIN_SD1_DATA3, IOMUX_CONFIG_FUNC) | ||
560 | #define MX31_PIN_SD1_DATA2__SD1_DATA2 IOMUX_MODE(MX31_PIN_SD1_DATA2, IOMUX_CONFIG_FUNC) | ||
561 | #define MX31_PIN_SD1_DATA1__SD1_DATA1 IOMUX_MODE(MX31_PIN_SD1_DATA1, IOMUX_CONFIG_FUNC) | ||
562 | #define MX31_PIN_SD1_DATA0__SD1_DATA0 IOMUX_MODE(MX31_PIN_SD1_DATA0, IOMUX_CONFIG_FUNC) | ||
563 | #define MX31_PIN_SD1_CLK__SD1_CLK IOMUX_MODE(MX31_PIN_SD1_CLK, IOMUX_CONFIG_FUNC) | ||
564 | #define MX31_PIN_SD1_CMD__SD1_CMD IOMUX_MODE(MX31_PIN_SD1_CMD, IOMUX_CONFIG_FUNC) | ||
565 | #define MX31_PIN_ATA_CS0__GPIO3_26 IOMUX_MODE(MX31_PIN_ATA_CS0, IOMUX_CONFIG_GPIO) | ||
566 | #define MX31_PIN_ATA_CS1__GPIO3_27 IOMUX_MODE(MX31_PIN_ATA_CS1, IOMUX_CONFIG_GPIO) | ||
567 | #define MX31_PIN_PC_PWRON__SD2_DATA3 IOMUX_MODE(MX31_PIN_PC_PWRON, IOMUX_CONFIG_ALT1) | ||
568 | #define MX31_PIN_PC_VS1__SD2_DATA2 IOMUX_MODE(MX31_PIN_PC_VS1, IOMUX_CONFIG_ALT1) | ||
569 | #define MX31_PIN_PC_READY__SD2_DATA1 IOMUX_MODE(MX31_PIN_PC_READY, IOMUX_CONFIG_ALT1) | ||
570 | #define MX31_PIN_PC_WAIT_B__SD2_DATA0 IOMUX_MODE(MX31_PIN_PC_WAIT_B, IOMUX_CONFIG_ALT1) | ||
571 | #define MX31_PIN_PC_CD2_B__SD2_CLK IOMUX_MODE(MX31_PIN_PC_CD2_B, IOMUX_CONFIG_ALT1) | ||
572 | #define MX31_PIN_PC_CD1_B__SD2_CMD IOMUX_MODE(MX31_PIN_PC_CD1_B, IOMUX_CONFIG_ALT1) | ||
573 | #define MX31_PIN_ATA_DIOR__GPIO3_28 IOMUX_MODE(MX31_PIN_ATA_DIOR, IOMUX_CONFIG_GPIO) | ||
574 | #define MX31_PIN_ATA_DIOW__GPIO3_29 IOMUX_MODE(MX31_PIN_ATA_DIOW, IOMUX_CONFIG_GPIO) | ||
575 | #define MX31_PIN_LD0__LD0 IOMUX_MODE(MX31_PIN_LD0, IOMUX_CONFIG_FUNC) | ||
576 | #define MX31_PIN_LD1__LD1 IOMUX_MODE(MX31_PIN_LD1, IOMUX_CONFIG_FUNC) | ||
577 | #define MX31_PIN_LD2__LD2 IOMUX_MODE(MX31_PIN_LD2, IOMUX_CONFIG_FUNC) | ||
578 | #define MX31_PIN_LD3__LD3 IOMUX_MODE(MX31_PIN_LD3, IOMUX_CONFIG_FUNC) | ||
579 | #define MX31_PIN_LD4__LD4 IOMUX_MODE(MX31_PIN_LD4, IOMUX_CONFIG_FUNC) | ||
580 | #define MX31_PIN_LD5__LD5 IOMUX_MODE(MX31_PIN_LD5, IOMUX_CONFIG_FUNC) | ||
581 | #define MX31_PIN_LD6__LD6 IOMUX_MODE(MX31_PIN_LD6, IOMUX_CONFIG_FUNC) | ||
582 | #define MX31_PIN_LD7__LD7 IOMUX_MODE(MX31_PIN_LD7, IOMUX_CONFIG_FUNC) | ||
583 | #define MX31_PIN_LD8__LD8 IOMUX_MODE(MX31_PIN_LD8, IOMUX_CONFIG_FUNC) | ||
584 | #define MX31_PIN_LD9__LD9 IOMUX_MODE(MX31_PIN_LD9, IOMUX_CONFIG_FUNC) | ||
585 | #define MX31_PIN_LD10__LD10 IOMUX_MODE(MX31_PIN_LD10, IOMUX_CONFIG_FUNC) | ||
586 | #define MX31_PIN_LD11__LD11 IOMUX_MODE(MX31_PIN_LD11, IOMUX_CONFIG_FUNC) | ||
587 | #define MX31_PIN_LD12__LD12 IOMUX_MODE(MX31_PIN_LD12, IOMUX_CONFIG_FUNC) | ||
588 | #define MX31_PIN_LD13__LD13 IOMUX_MODE(MX31_PIN_LD13, IOMUX_CONFIG_FUNC) | ||
589 | #define MX31_PIN_LD14__LD14 IOMUX_MODE(MX31_PIN_LD14, IOMUX_CONFIG_FUNC) | ||
590 | #define MX31_PIN_LD15__LD15 IOMUX_MODE(MX31_PIN_LD15, IOMUX_CONFIG_FUNC) | ||
591 | #define MX31_PIN_LD16__LD16 IOMUX_MODE(MX31_PIN_LD16, IOMUX_CONFIG_FUNC) | ||
592 | #define MX31_PIN_LD17__LD17 IOMUX_MODE(MX31_PIN_LD17, IOMUX_CONFIG_FUNC) | ||
593 | #define MX31_PIN_VSYNC3__VSYNC3 IOMUX_MODE(MX31_PIN_VSYNC3, IOMUX_CONFIG_FUNC) | ||
594 | #define MX31_PIN_HSYNC__HSYNC IOMUX_MODE(MX31_PIN_HSYNC, IOMUX_CONFIG_FUNC) | ||
595 | #define MX31_PIN_FPSHIFT__FPSHIFT IOMUX_MODE(MX31_PIN_FPSHIFT, IOMUX_CONFIG_FUNC) | ||
596 | #define MX31_PIN_DRDY0__DRDY0 IOMUX_MODE(MX31_PIN_DRDY0, IOMUX_CONFIG_FUNC) | ||
597 | #define MX31_PIN_D3_REV__D3_REV IOMUX_MODE(MX31_PIN_D3_REV, IOMUX_CONFIG_FUNC) | ||
598 | #define MX31_PIN_CONTRAST__CONTRAST IOMUX_MODE(MX31_PIN_CONTRAST, IOMUX_CONFIG_FUNC) | ||
599 | #define MX31_PIN_D3_SPL__D3_SPL IOMUX_MODE(MX31_PIN_D3_SPL, IOMUX_CONFIG_FUNC) | ||
600 | #define MX31_PIN_D3_CLS__D3_CLS IOMUX_MODE(MX31_PIN_D3_CLS, IOMUX_CONFIG_FUNC) | ||
601 | #define MX31_PIN_LCS0__GPI03_23 IOMUX_MODE(MX31_PIN_LCS0, IOMUX_CONFIG_GPIO) | ||
602 | #define MX31_PIN_GPIO1_1__GPIO IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO) | ||
603 | #define MX31_PIN_I2C_CLK__SCL IOMUX_MODE(MX31_PIN_I2C_CLK, IOMUX_CONFIG_FUNC) | ||
604 | #define MX31_PIN_I2C_DAT__SDA IOMUX_MODE(MX31_PIN_I2C_DAT, IOMUX_CONFIG_FUNC) | ||
605 | #define MX31_PIN_DCD_DTE1__I2C2_SDA IOMUX_MODE(MX31_PIN_DCD_DTE1, IOMUX_CONFIG_ALT2) | ||
606 | #define MX31_PIN_RI_DTE1__I2C2_SCL IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_ALT2) | ||
607 | #define MX31_PIN_CSPI2_SS2__I2C3_SDA IOMUX_MODE(MX31_PIN_CSPI2_SS2, IOMUX_CONFIG_ALT1) | ||
608 | #define MX31_PIN_CSPI2_SCLK__I2C3_SCL IOMUX_MODE(MX31_PIN_CSPI2_SCLK, IOMUX_CONFIG_ALT1) | ||
609 | #define MX31_PIN_CSI_D4__CSI_D4 IOMUX_MODE(MX31_PIN_CSI_D4, IOMUX_CONFIG_FUNC) | ||
610 | #define MX31_PIN_CSI_D5__CSI_D5 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_FUNC) | ||
611 | #define MX31_PIN_CSI_D6__CSI_D6 IOMUX_MODE(MX31_PIN_CSI_D6, IOMUX_CONFIG_FUNC) | ||
612 | #define MX31_PIN_CSI_D7__CSI_D7 IOMUX_MODE(MX31_PIN_CSI_D7, IOMUX_CONFIG_FUNC) | ||
613 | #define MX31_PIN_CSI_D8__CSI_D8 IOMUX_MODE(MX31_PIN_CSI_D8, IOMUX_CONFIG_FUNC) | ||
614 | #define MX31_PIN_CSI_D9__CSI_D9 IOMUX_MODE(MX31_PIN_CSI_D9, IOMUX_CONFIG_FUNC) | ||
615 | #define MX31_PIN_CSI_D10__CSI_D10 IOMUX_MODE(MX31_PIN_CSI_D10, IOMUX_CONFIG_FUNC) | ||
616 | #define MX31_PIN_CSI_D11__CSI_D11 IOMUX_MODE(MX31_PIN_CSI_D11, IOMUX_CONFIG_FUNC) | ||
617 | #define MX31_PIN_CSI_D12__CSI_D12 IOMUX_MODE(MX31_PIN_CSI_D12, IOMUX_CONFIG_FUNC) | ||
618 | #define MX31_PIN_CSI_D13__CSI_D13 IOMUX_MODE(MX31_PIN_CSI_D13, IOMUX_CONFIG_FUNC) | ||
619 | #define MX31_PIN_CSI_D14__CSI_D14 IOMUX_MODE(MX31_PIN_CSI_D14, IOMUX_CONFIG_FUNC) | ||
620 | #define MX31_PIN_CSI_D15__CSI_D15 IOMUX_MODE(MX31_PIN_CSI_D15, IOMUX_CONFIG_FUNC) | ||
621 | #define MX31_PIN_CSI_HSYNC__CSI_HSYNC IOMUX_MODE(MX31_PIN_CSI_HSYNC, IOMUX_CONFIG_FUNC) | ||
622 | #define MX31_PIN_CSI_MCLK__CSI_MCLK IOMUX_MODE(MX31_PIN_CSI_MCLK, IOMUX_CONFIG_FUNC) | ||
623 | #define MX31_PIN_CSI_PIXCLK__CSI_PIXCLK IOMUX_MODE(MX31_PIN_CSI_PIXCLK, IOMUX_CONFIG_FUNC) | ||
624 | #define MX31_PIN_CSI_VSYNC__CSI_VSYNC IOMUX_MODE(MX31_PIN_CSI_VSYNC, IOMUX_CONFIG_FUNC) | ||
625 | #define MX31_PIN_GPIO3_0__GPIO3_0 IOMUX_MODE(MX31_PIN_GPIO3_0, IOMUX_CONFIG_GPIO) | ||
626 | #define MX31_PIN_GPIO3_1__GPIO3_1 IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO) | ||
627 | #define MX31_PIN_TXD2__GPIO1_28 IOMUX_MODE(MX31_PIN_TXD2, IOMUX_CONFIG_GPIO) | ||
628 | #define MX31_PIN_CSI_D4__GPIO3_4 IOMUX_MODE(MX31_PIN_CSI_D4, IOMUX_CONFIG_GPIO) | ||
629 | #define MX31_PIN_CSI_D5__GPIO3_5 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_GPIO) | ||
630 | #define MX31_PIN_USBOTG_DATA0__USBOTG_DATA0 IOMUX_MODE(MX31_PIN_USBOTG_DATA0, IOMUX_CONFIG_FUNC) | ||
631 | #define MX31_PIN_USBOTG_DATA1__USBOTG_DATA1 IOMUX_MODE(MX31_PIN_USBOTG_DATA1, IOMUX_CONFIG_FUNC) | ||
632 | #define MX31_PIN_USBOTG_DATA2__USBOTG_DATA2 IOMUX_MODE(MX31_PIN_USBOTG_DATA2, IOMUX_CONFIG_FUNC) | ||
633 | #define MX31_PIN_USBOTG_DATA3__USBOTG_DATA3 IOMUX_MODE(MX31_PIN_USBOTG_DATA3, IOMUX_CONFIG_FUNC) | ||
634 | #define MX31_PIN_USBOTG_DATA4__USBOTG_DATA4 IOMUX_MODE(MX31_PIN_USBOTG_DATA4, IOMUX_CONFIG_FUNC) | ||
635 | #define MX31_PIN_USBOTG_DATA5__USBOTG_DATA5 IOMUX_MODE(MX31_PIN_USBOTG_DATA5, IOMUX_CONFIG_FUNC) | ||
636 | #define MX31_PIN_USBOTG_DATA6__USBOTG_DATA6 IOMUX_MODE(MX31_PIN_USBOTG_DATA6, IOMUX_CONFIG_FUNC) | ||
637 | #define MX31_PIN_USBOTG_DATA7__USBOTG_DATA7 IOMUX_MODE(MX31_PIN_USBOTG_DATA7, IOMUX_CONFIG_FUNC) | ||
638 | #define MX31_PIN_USBOTG_CLK__USBOTG_CLK IOMUX_MODE(MX31_PIN_USBOTG_CLK, IOMUX_CONFIG_FUNC) | ||
639 | #define MX31_PIN_USBOTG_DIR__USBOTG_DIR IOMUX_MODE(MX31_PIN_USBOTG_DIR, IOMUX_CONFIG_FUNC) | ||
640 | #define MX31_PIN_USBOTG_NXT__USBOTG_NXT IOMUX_MODE(MX31_PIN_USBOTG_NXT, IOMUX_CONFIG_FUNC) | ||
641 | #define MX31_PIN_USBOTG_STP__USBOTG_STP IOMUX_MODE(MX31_PIN_USBOTG_STP, IOMUX_CONFIG_FUNC) | ||
642 | #define MX31_PIN_CSPI1_MOSI__USBH1_RXDM IOMUX_MODE(MX31_PIN_CSPI1_MOSI, IOMUX_CONFIG_ALT1) | ||
643 | #define MX31_PIN_CSPI1_MISO__USBH1_RXDP IOMUX_MODE(MX31_PIN_CSPI1_MISO, IOMUX_CONFIG_ALT1) | ||
644 | #define MX31_PIN_CSPI1_SS0__USBH1_TXDM IOMUX_MODE(MX31_PIN_CSPI1_SS0, IOMUX_CONFIG_ALT1) | ||
645 | #define MX31_PIN_CSPI1_SS1__USBH1_TXDP IOMUX_MODE(MX31_PIN_CSPI1_SS1, IOMUX_CONFIG_ALT1) | ||
646 | #define MX31_PIN_CSPI1_SS2__USBH1_RCV IOMUX_MODE(MX31_PIN_CSPI1_SS2, IOMUX_CONFIG_ALT1) | ||
647 | #define MX31_PIN_CSPI1_SCLK__USBH1_OEB IOMUX_MODE(MX31_PIN_CSPI1_SCLK, IOMUX_CONFIG_ALT1) | ||
648 | #define MX31_PIN_CSPI1_SPI_RDY__USBH1_FS IOMUX_MODE(MX31_PIN_CSPI1_SPI_RDY, IOMUX_CONFIG_ALT1) | ||
649 | #define MX31_PIN_SFS6__USBH1_SUSPEND IOMUX_MODE(MX31_PIN_SFS6, IOMUX_CONFIG_FUNC) | ||
650 | #define MX31_PIN_NFRE_B__GPIO1_11 IOMUX_MODE(MX31_PIN_NFRE_B, IOMUX_CONFIG_GPIO) | ||
651 | #define MX31_PIN_NFALE__GPIO1_12 IOMUX_MODE(MX31_PIN_NFALE, IOMUX_CONFIG_GPIO) | ||
652 | #define MX31_PIN_USBH2_DATA0__USBH2_DATA0 IOMUX_MODE(MX31_PIN_USBH2_DATA0, IOMUX_CONFIG_FUNC) | ||
653 | #define MX31_PIN_USBH2_DATA1__USBH2_DATA1 IOMUX_MODE(MX31_PIN_USBH2_DATA1, IOMUX_CONFIG_FUNC) | ||
654 | #define MX31_PIN_STXD3__USBH2_DATA2 IOMUX_MODE(MX31_PIN_STXD3, IOMUX_CONFIG_FUNC) | ||
655 | #define MX31_PIN_SRXD3__USBH2_DATA3 IOMUX_MODE(MX31_PIN_SRXD3, IOMUX_CONFIG_FUNC) | ||
656 | #define MX31_PIN_SCK3__USBH2_DATA4 IOMUX_MODE(MX31_PIN_SCK3, IOMUX_CONFIG_FUNC) | ||
657 | #define MX31_PIN_SFS3__USBH2_DATA5 IOMUX_MODE(MX31_PIN_SFS3, IOMUX_CONFIG_FUNC) | ||
658 | #define MX31_PIN_STXD6__USBH2_DATA6 IOMUX_MODE(MX31_PIN_STXD6, IOMUX_CONFIG_FUNC) | ||
659 | #define MX31_PIN_SRXD6__USBH2_DATA7 IOMUX_MODE(MX31_PIN_SRXD6, IOMUX_CONFIG_FUNC) | ||
660 | #define MX31_PIN_USBH2_CLK__USBH2_CLK IOMUX_MODE(MX31_PIN_USBH2_CLK, IOMUX_CONFIG_FUNC) | ||
661 | #define MX31_PIN_USBH2_DIR__USBH2_DIR IOMUX_MODE(MX31_PIN_USBH2_DIR, IOMUX_CONFIG_FUNC) | ||
662 | #define MX31_PIN_USBH2_NXT__USBH2_NXT IOMUX_MODE(MX31_PIN_USBH2_NXT, IOMUX_CONFIG_FUNC) | ||
663 | #define MX31_PIN_USBH2_STP__USBH2_STP IOMUX_MODE(MX31_PIN_USBH2_STP, IOMUX_CONFIG_FUNC) | ||
664 | #define MX31_PIN_SCK6__GPIO1_25 IOMUX_MODE(MX31_PIN_SCK6, IOMUX_CONFIG_GPIO) | ||
665 | #define MX31_PIN_USB_OC__GPIO1_30 IOMUX_MODE(MX31_PIN_USB_OC, IOMUX_CONFIG_GPIO) | ||
666 | #define MX31_PIN_I2C_DAT__I2C1_SDA IOMUX_MODE(MX31_PIN_I2C_DAT, IOMUX_CONFIG_FUNC) | ||
667 | #define MX31_PIN_I2C_CLK__I2C1_SCL IOMUX_MODE(MX31_PIN_I2C_CLK, IOMUX_CONFIG_FUNC) | ||
668 | #define MX31_PIN_DCD_DTE1__I2C2_SDA IOMUX_MODE(MX31_PIN_DCD_DTE1, IOMUX_CONFIG_ALT2) | ||
669 | #define MX31_PIN_RI_DTE1__I2C2_SCL IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_ALT2) | ||
670 | #define MX31_PIN_ATA_CS0__GPIO3_26 IOMUX_MODE(MX31_PIN_ATA_CS0, IOMUX_CONFIG_GPIO) | ||
671 | #define MX31_PIN_ATA_CS1__GPIO3_27 IOMUX_MODE(MX31_PIN_ATA_CS1, IOMUX_CONFIG_GPIO) | ||
672 | #define MX31_PIN_PC_PWRON__SD2_DATA3 IOMUX_MODE(MX31_PIN_PC_PWRON, IOMUX_CONFIG_ALT1) | ||
673 | #define MX31_PIN_PC_VS1__SD2_DATA2 IOMUX_MODE(MX31_PIN_PC_VS1, IOMUX_CONFIG_ALT1) | ||
674 | #define MX31_PIN_PC_READY__SD2_DATA1 IOMUX_MODE(MX31_PIN_PC_READY, IOMUX_CONFIG_ALT1) | ||
675 | #define MX31_PIN_PC_WAIT_B__SD2_DATA0 IOMUX_MODE(MX31_PIN_PC_WAIT_B, IOMUX_CONFIG_ALT1) | ||
676 | #define MX31_PIN_PC_CD2_B__SD2_CLK IOMUX_MODE(MX31_PIN_PC_CD2_B, IOMUX_CONFIG_ALT1) | ||
677 | #define MX31_PIN_PC_CD1_B__SD2_CMD IOMUX_MODE(MX31_PIN_PC_CD1_B, IOMUX_CONFIG_ALT1) | ||
678 | #define MX31_PIN_ATA_DIOR__GPIO3_28 IOMUX_MODE(MX31_PIN_ATA_DIOR, IOMUX_CONFIG_GPIO) | ||
679 | #define MX31_PIN_ATA_DIOW__GPIO3_29 IOMUX_MODE(MX31_PIN_ATA_DIOW, IOMUX_CONFIG_GPIO) | ||
680 | #define MX31_PIN_CSI_D4__CSI_D4 IOMUX_MODE(MX31_PIN_CSI_D4, IOMUX_CONFIG_FUNC) | ||
681 | #define MX31_PIN_CSI_D5__CSI_D5 IOMUX_MODE(MX31_PIN_CSI_D5, IOMUX_CONFIG_FUNC) | ||
682 | #define MX31_PIN_CSI_D6__CSI_D6 IOMUX_MODE(MX31_PIN_CSI_D6, IOMUX_CONFIG_FUNC) | ||
683 | #define MX31_PIN_CSI_D7__CSI_D7 IOMUX_MODE(MX31_PIN_CSI_D7, IOMUX_CONFIG_FUNC) | ||
684 | #define MX31_PIN_CSI_D8__CSI_D8 IOMUX_MODE(MX31_PIN_CSI_D8, IOMUX_CONFIG_FUNC) | ||
685 | #define MX31_PIN_CSI_D9__CSI_D9 IOMUX_MODE(MX31_PIN_CSI_D9, IOMUX_CONFIG_FUNC) | ||
686 | #define MX31_PIN_CSI_D10__CSI_D10 IOMUX_MODE(MX31_PIN_CSI_D10, IOMUX_CONFIG_FUNC) | ||
687 | #define MX31_PIN_CSI_D11__CSI_D11 IOMUX_MODE(MX31_PIN_CSI_D11, IOMUX_CONFIG_FUNC) | ||
688 | #define MX31_PIN_CSI_D12__CSI_D12 IOMUX_MODE(MX31_PIN_CSI_D12, IOMUX_CONFIG_FUNC) | ||
689 | #define MX31_PIN_CSI_D13__CSI_D13 IOMUX_MODE(MX31_PIN_CSI_D13, IOMUX_CONFIG_FUNC) | ||
690 | #define MX31_PIN_CSI_D14__CSI_D14 IOMUX_MODE(MX31_PIN_CSI_D14, IOMUX_CONFIG_FUNC) | ||
691 | #define MX31_PIN_CSI_D15__CSI_D15 IOMUX_MODE(MX31_PIN_CSI_D15, IOMUX_CONFIG_FUNC) | ||
692 | #define MX31_PIN_CSI_HSYNC__CSI_HSYNC IOMUX_MODE(MX31_PIN_CSI_HSYNC, IOMUX_CONFIG_FUNC) | ||
693 | #define MX31_PIN_CSI_MCLK__CSI_MCLK IOMUX_MODE(MX31_PIN_CSI_MCLK, IOMUX_CONFIG_FUNC) | ||
694 | #define MX31_PIN_CSI_PIXCLK__CSI_PIXCLK IOMUX_MODE(MX31_PIN_CSI_PIXCLK, IOMUX_CONFIG_FUNC) | ||
695 | #define MX31_PIN_CSI_VSYNC__CSI_VSYNC IOMUX_MODE(MX31_PIN_CSI_VSYNC, IOMUX_CONFIG_FUNC) | ||
696 | #define MX31_PIN_GPIO3_0__GPIO3_0 IOMUX_MODE(MX31_PIN_GPIO3_0, IOMUX_CONFIG_GPIO) | ||
697 | #define MX31_PIN_GPIO3_1__GPIO3_1 IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO) | ||
698 | #define MX31_PIN_TXD2__GPIO1_28 IOMUX_MODE(MX31_PIN_TXD2, IOMUX_CONFIG_GPIO) | ||
699 | #define MX31_PIN_GPIO1_0__GPIO1_0 IOMUX_MODE(MX31_PIN_GPIO1_0, IOMUX_CONFIG_GPIO) | ||
700 | #define MX31_PIN_SVEN0__GPIO2_0 IOMUX_MODE(MX31_PIN_SVEN0, IOMUX_CONFIG_GPIO) | ||
701 | #define MX31_PIN_STX0__GPIO2_1 IOMUX_MODE(MX31_PIN_STX0, IOMUX_CONFIG_GPIO) | ||
702 | #define MX31_PIN_SRX0__GPIO2_2 IOMUX_MODE(MX31_PIN_SRX0, IOMUX_CONFIG_GPIO) | ||
703 | #define MX31_PIN_SIMPD0__GPIO2_3 IOMUX_MODE(MX31_PIN_SIMPD0, IOMUX_CONFIG_GPIO) | ||
704 | #define MX31_PIN_DTR_DCE1__GPIO2_8 IOMUX_MODE(MX31_PIN_DTR_DCE1, IOMUX_CONFIG_GPIO) | ||
705 | #define MX31_PIN_DSR_DCE1__GPIO2_9 IOMUX_MODE(MX31_PIN_DSR_DCE1, IOMUX_CONFIG_GPIO) | ||
706 | #define MX31_PIN_RI_DCE1__GPIO2_10 IOMUX_MODE(MX31_PIN_RI_DCE1, IOMUX_CONFIG_GPIO) | ||
707 | #define MX31_PIN_DCD_DCE1__GPIO2_11 IOMUX_MODE(MX31_PIN_DCD_DCE1, IOMUX_CONFIG_GPIO) | ||
708 | #define MX31_PIN_STXD5__GPIO1_21 IOMUX_MODE(MX31_PIN_STXD5, IOMUX_CONFIG_GPIO) | ||
709 | #define MX31_PIN_SRXD5__GPIO1_22 IOMUX_MODE(MX31_PIN_SRXD5, IOMUX_CONFIG_GPIO) | ||
710 | #define MX31_PIN_GPIO1_3__GPIO1_3 IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO) | ||
711 | #define MX31_PIN_CSPI2_SS1__CSPI3_SS1 IOMUX_MODE(MX31_PIN_CSPI2_SS1, IOMUX_CONFIG_ALT1) | ||
712 | #define MX31_PIN_RTS1__GPIO2_6 IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_GPIO) | ||
713 | #define MX31_PIN_CTS1__GPIO2_7 IOMUX_MODE(MX31_PIN_CTS1, IOMUX_CONFIG_GPIO) | ||
714 | #define MX31_PIN_LCS0__GPIO3_23 IOMUX_MODE(MX31_PIN_LCS0, IOMUX_CONFIG_GPIO) | ||
715 | #define MX31_PIN_STXD4__STXD4 IOMUX_MODE(MX31_PIN_STXD4, IOMUX_CONFIG_FUNC) | ||
716 | #define MX31_PIN_SRXD4__SRXD4 IOMUX_MODE(MX31_PIN_SRXD4, IOMUX_CONFIG_FUNC) | ||
717 | #define MX31_PIN_SCK4__SCK4 IOMUX_MODE(MX31_PIN_SCK4, IOMUX_CONFIG_FUNC) | ||
718 | #define MX31_PIN_SFS4__SFS4 IOMUX_MODE(MX31_PIN_SFS4, IOMUX_CONFIG_FUNC) | ||
719 | #define MX31_PIN_STXD5__STXD5 IOMUX_MODE(MX31_PIN_STXD5, IOMUX_CONFIG_FUNC) | ||
720 | #define MX31_PIN_SRXD5__SRXD5 IOMUX_MODE(MX31_PIN_SRXD5, IOMUX_CONFIG_FUNC) | ||
721 | #define MX31_PIN_SCK5__SCK5 IOMUX_MODE(MX31_PIN_SCK5, IOMUX_CONFIG_FUNC) | ||
722 | #define MX31_PIN_SFS5__SFS5 IOMUX_MODE(MX31_PIN_SFS5, IOMUX_CONFIG_FUNC) | ||
723 | #define MX31_PIN_KEY_ROW0_KEY_ROW0 IOMUX_MODE(MX31_PIN_KEY_ROW0, IOMUX_CONFIG_FUNC) | ||
724 | #define MX31_PIN_KEY_ROW1_KEY_ROW1 IOMUX_MODE(MX31_PIN_KEY_ROW1, IOMUX_CONFIG_FUNC) | ||
725 | #define MX31_PIN_KEY_ROW2_KEY_ROW2 IOMUX_MODE(MX31_PIN_KEY_ROW2, IOMUX_CONFIG_FUNC) | ||
726 | #define MX31_PIN_KEY_ROW3_KEY_ROW3 IOMUX_MODE(MX31_PIN_KEY_ROW3, IOMUX_CONFIG_FUNC) | ||
727 | #define MX31_PIN_KEY_ROW4_KEY_ROW4 IOMUX_MODE(MX31_PIN_KEY_ROW4, IOMUX_CONFIG_FUNC) | ||
728 | #define MX31_PIN_KEY_ROW4_GPIO IOMUX_MODE(MX31_PIN_KEY_ROW4, IOMUX_CONFIG_GPIO) | ||
729 | #define MX31_PIN_KEY_ROW5_KEY_ROW5 IOMUX_MODE(MX31_PIN_KEY_ROW5, IOMUX_CONFIG_FUNC) | ||
730 | #define MX31_PIN_KEY_ROW6_KEY_ROW6 IOMUX_MODE(MX31_PIN_KEY_ROW6, IOMUX_CONFIG_FUNC) | ||
731 | #define MX31_PIN_KEY_ROW7_KEY_ROW7 IOMUX_MODE(MX31_PIN_KEY_ROW7, IOMUX_CONFIG_FUNC) | ||
732 | #define MX31_PIN_KEY_COL0_KEY_COL0 IOMUX_MODE(MX31_PIN_KEY_COL0, IOMUX_CONFIG_FUNC) | ||
733 | #define MX31_PIN_KEY_COL1_KEY_COL1 IOMUX_MODE(MX31_PIN_KEY_COL1, IOMUX_CONFIG_FUNC) | ||
734 | #define MX31_PIN_KEY_COL2_KEY_COL2 IOMUX_MODE(MX31_PIN_KEY_COL2, IOMUX_CONFIG_FUNC) | ||
735 | #define MX31_PIN_KEY_COL3_KEY_COL3 IOMUX_MODE(MX31_PIN_KEY_COL3, IOMUX_CONFIG_FUNC) | ||
736 | #define MX31_PIN_KEY_COL4_KEY_COL4 IOMUX_MODE(MX31_PIN_KEY_COL4, IOMUX_CONFIG_FUNC) | ||
737 | #define MX31_PIN_KEY_COL5_KEY_COL5 IOMUX_MODE(MX31_PIN_KEY_COL5, IOMUX_CONFIG_FUNC) | ||
738 | #define MX31_PIN_KEY_COL6_KEY_COL6 IOMUX_MODE(MX31_PIN_KEY_COL6, IOMUX_CONFIG_FUNC) | ||
739 | #define MX31_PIN_KEY_COL7_KEY_COL7 IOMUX_MODE(MX31_PIN_KEY_COL7, IOMUX_CONFIG_FUNC) | ||
740 | #define MX31_PIN_WATCHDOG_RST__WATCHDOG_RST IOMUX_MODE(MX31_PIN_WATCHDOG_RST, IOMUX_CONFIG_FUNC) | ||
741 | |||
742 | |||
743 | /* | ||
744 | * XXX: The SS0, SS1, SS2, SS3 lines of spi3 are multiplexed with cspi2_ss0, | ||
745 | * cspi2_ss1, cspi1_ss0 cspi1_ss1 | ||
746 | */ | ||
747 | |||
748 | /* | ||
749 | * This function configures the pad value for a IOMUX pin. | ||
750 | */ | ||
751 | void mxc_iomux_set_pad(enum iomux_pins, u32); | ||
752 | |||
753 | #endif /* ifndef __MACH_IOMUX_MX3_H__ */ | ||
diff --git a/arch/arm/mach-imx/iomux-mx35.h b/arch/arm/mach-imx/iomux-mx35.h deleted file mode 100644 index 90bfa6b5be6..00000000000 --- a/arch/arm/mach-imx/iomux-mx35.h +++ /dev/null | |||
@@ -1,1267 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 by Jan Weitzel Phytec Messtechnik GmbH <armlinux@phytec.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option, NO_PAD_CTRL) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
16 | * MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef __MACH_IOMUX_MX35_H__ | ||
20 | #define __MACH_IOMUX_MX35_H__ | ||
21 | |||
22 | #include "iomux-v3.h" | ||
23 | |||
24 | /* | ||
25 | * The naming convention for the pad modes is MX35_PAD_<padname>__<padmode> | ||
26 | * If <padname> or <padmode> refers to a GPIO, it is named | ||
27 | * GPIO_<unit>_<num> see also iomux-v3.h | ||
28 | */ | ||
29 | |||
30 | /* PAD MUX ALT INPSE PATH */ | ||
31 | #define MX35_PAD_CAPTURE__GPT_CAPIN1 IOMUX_PAD(0x328, 0x004, 0, 0x0, 0, NO_PAD_CTRL) | ||
32 | #define MX35_PAD_CAPTURE__GPT_CMPOUT2 IOMUX_PAD(0x328, 0x004, 1, 0x0, 0, NO_PAD_CTRL) | ||
33 | #define MX35_PAD_CAPTURE__CSPI2_SS1 IOMUX_PAD(0x328, 0x004, 2, 0x7f4, 0, NO_PAD_CTRL) | ||
34 | #define MX35_PAD_CAPTURE__EPIT1_EPITO IOMUX_PAD(0x328, 0x004, 3, 0x0, 0, NO_PAD_CTRL) | ||
35 | #define MX35_PAD_CAPTURE__CCM_CLK32K IOMUX_PAD(0x328, 0x004, 4, 0x7d0, 0, NO_PAD_CTRL) | ||
36 | #define MX35_PAD_CAPTURE__GPIO1_4 IOMUX_PAD(0x328, 0x004, 5, 0x850, 0, NO_PAD_CTRL) | ||
37 | |||
38 | #define MX35_PAD_COMPARE__GPT_CMPOUT1 IOMUX_PAD(0x32c, 0x008, 0, 0x0, 0, NO_PAD_CTRL) | ||
39 | #define MX35_PAD_COMPARE__GPT_CAPIN2 IOMUX_PAD(0x32c, 0x008, 1, 0x0, 0, NO_PAD_CTRL) | ||
40 | #define MX35_PAD_COMPARE__GPT_CMPOUT3 IOMUX_PAD(0x32c, 0x008, 2, 0x0, 0, NO_PAD_CTRL) | ||
41 | #define MX35_PAD_COMPARE__EPIT2_EPITO IOMUX_PAD(0x32c, 0x008, 3, 0x0, 0, NO_PAD_CTRL) | ||
42 | #define MX35_PAD_COMPARE__GPIO1_5 IOMUX_PAD(0x32c, 0x008, 5, 0x854, 0, NO_PAD_CTRL) | ||
43 | #define MX35_PAD_COMPARE__SDMA_EXTDMA_2 IOMUX_PAD(0x32c, 0x008, 7, 0x0, 0, NO_PAD_CTRL) | ||
44 | |||
45 | #define MX35_PAD_WDOG_RST__WDOG_WDOG_B IOMUX_PAD(0x330, 0x00c, 0, 0x0, 0, NO_PAD_CTRL) | ||
46 | #define MX35_PAD_WDOG_RST__IPU_FLASH_STROBE IOMUX_PAD(0x330, 0x00c, 3, 0x0, 0, NO_PAD_CTRL) | ||
47 | #define MX35_PAD_WDOG_RST__GPIO1_6 IOMUX_PAD(0x330, 0x00c, 5, 0x858, 0, NO_PAD_CTRL) | ||
48 | |||
49 | #define MX35_PAD_GPIO1_0__GPIO1_0 IOMUX_PAD(0x334, 0x010, 0, 0x82c, 0, NO_PAD_CTRL) | ||
50 | #define MX35_PAD_GPIO1_0__CCM_PMIC_RDY IOMUX_PAD(0x334, 0x010, 1, 0x7d4, 0, NO_PAD_CTRL) | ||
51 | #define MX35_PAD_GPIO1_0__OWIRE_LINE IOMUX_PAD(0x334, 0x010, 2, 0x990, 0, NO_PAD_CTRL) | ||
52 | #define MX35_PAD_GPIO1_0__SDMA_EXTDMA_0 IOMUX_PAD(0x334, 0x010, 7, 0x0, 0, NO_PAD_CTRL) | ||
53 | |||
54 | #define MX35_PAD_GPIO1_1__GPIO1_1 IOMUX_PAD(0x338, 0x014, 0, 0x838, 0, NO_PAD_CTRL) | ||
55 | #define MX35_PAD_GPIO1_1__PWM_PWMO IOMUX_PAD(0x338, 0x014, 2, 0x0, 0, NO_PAD_CTRL) | ||
56 | #define MX35_PAD_GPIO1_1__CSPI1_SS2 IOMUX_PAD(0x338, 0x014, 3, 0x7d8, 0, NO_PAD_CTRL) | ||
57 | #define MX35_PAD_GPIO1_1__SCC_TAMPER_DETECT IOMUX_PAD(0x338, 0x014, 6, 0x0, 0, NO_PAD_CTRL) | ||
58 | #define MX35_PAD_GPIO1_1__SDMA_EXTDMA_1 IOMUX_PAD(0x338, 0x014, 7, 0x0, 0, NO_PAD_CTRL) | ||
59 | |||
60 | #define MX35_PAD_GPIO2_0__GPIO2_0 IOMUX_PAD(0x33c, 0x018, 0, 0x868, 0, NO_PAD_CTRL) | ||
61 | #define MX35_PAD_GPIO2_0__USB_TOP_USBOTG_CLK IOMUX_PAD(0x33c, 0x018, 1, 0x0, 0, NO_PAD_CTRL) | ||
62 | |||
63 | #define MX35_PAD_GPIO3_0__GPIO3_0 IOMUX_PAD(0x340, 0x01c, 0, 0x8e8, 0, NO_PAD_CTRL) | ||
64 | #define MX35_PAD_GPIO3_0__USB_TOP_USBH2_CLK IOMUX_PAD(0x340, 0x01c, 1, 0x0, 0, NO_PAD_CTRL) | ||
65 | |||
66 | #define MX35_PAD_RESET_IN_B__CCM_RESET_IN_B IOMUX_PAD(0x344, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
67 | |||
68 | #define MX35_PAD_POR_B__CCM_POR_B IOMUX_PAD(0x348, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
69 | |||
70 | #define MX35_PAD_CLKO__CCM_CLKO IOMUX_PAD(0x34c, 0x020, 0, 0x0, 0, NO_PAD_CTRL) | ||
71 | #define MX35_PAD_CLKO__GPIO1_8 IOMUX_PAD(0x34c, 0x020, 5, 0x860, 0, NO_PAD_CTRL) | ||
72 | |||
73 | #define MX35_PAD_BOOT_MODE0__CCM_BOOT_MODE_0 IOMUX_PAD(0x350, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
74 | |||
75 | #define MX35_PAD_BOOT_MODE1__CCM_BOOT_MODE_1 IOMUX_PAD(0x354, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
76 | |||
77 | #define MX35_PAD_CLK_MODE0__CCM_CLK_MODE_0 IOMUX_PAD(0x358, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
78 | |||
79 | #define MX35_PAD_CLK_MODE1__CCM_CLK_MODE_1 IOMUX_PAD(0x35c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
80 | |||
81 | #define MX35_PAD_POWER_FAIL__CCM_DSM_WAKEUP_INT_26 IOMUX_PAD(0x360, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
82 | |||
83 | #define MX35_PAD_VSTBY__CCM_VSTBY IOMUX_PAD(0x364, 0x024, 0, 0x0, 0, NO_PAD_CTRL) | ||
84 | #define MX35_PAD_VSTBY__GPIO1_7 IOMUX_PAD(0x364, 0x024, 5, 0x85c, 0, NO_PAD_CTRL) | ||
85 | |||
86 | #define MX35_PAD_A0__EMI_EIM_DA_L_0 IOMUX_PAD(0x368, 0x028, 0, 0x0, 0, NO_PAD_CTRL) | ||
87 | |||
88 | #define MX35_PAD_A1__EMI_EIM_DA_L_1 IOMUX_PAD(0x36c, 0x02c, 0, 0x0, 0, NO_PAD_CTRL) | ||
89 | |||
90 | #define MX35_PAD_A2__EMI_EIM_DA_L_2 IOMUX_PAD(0x370, 0x030, 0, 0x0, 0, NO_PAD_CTRL) | ||
91 | |||
92 | #define MX35_PAD_A3__EMI_EIM_DA_L_3 IOMUX_PAD(0x374, 0x034, 0, 0x0, 0, NO_PAD_CTRL) | ||
93 | |||
94 | #define MX35_PAD_A4__EMI_EIM_DA_L_4 IOMUX_PAD(0x378, 0x038, 0, 0x0, 0, NO_PAD_CTRL) | ||
95 | |||
96 | #define MX35_PAD_A5__EMI_EIM_DA_L_5 IOMUX_PAD(0x37c, 0x03c, 0, 0x0, 0, NO_PAD_CTRL) | ||
97 | |||
98 | #define MX35_PAD_A6__EMI_EIM_DA_L_6 IOMUX_PAD(0x380, 0x040, 0, 0x0, 0, NO_PAD_CTRL) | ||
99 | |||
100 | #define MX35_PAD_A7__EMI_EIM_DA_L_7 IOMUX_PAD(0x384, 0x044, 0, 0x0, 0, NO_PAD_CTRL) | ||
101 | |||
102 | #define MX35_PAD_A8__EMI_EIM_DA_H_8 IOMUX_PAD(0x388, 0x048, 0, 0x0, 0, NO_PAD_CTRL) | ||
103 | |||
104 | #define MX35_PAD_A9__EMI_EIM_DA_H_9 IOMUX_PAD(0x38c, 0x04c, 0, 0x0, 0, NO_PAD_CTRL) | ||
105 | |||
106 | #define MX35_PAD_A10__EMI_EIM_DA_H_10 IOMUX_PAD(0x390, 0x050, 0, 0x0, 0, NO_PAD_CTRL) | ||
107 | |||
108 | #define MX35_PAD_MA10__EMI_MA10 IOMUX_PAD(0x394, 0x054, 0, 0x0, 0, NO_PAD_CTRL) | ||
109 | |||
110 | #define MX35_PAD_A11__EMI_EIM_DA_H_11 IOMUX_PAD(0x398, 0x058, 0, 0x0, 0, NO_PAD_CTRL) | ||
111 | |||
112 | #define MX35_PAD_A12__EMI_EIM_DA_H_12 IOMUX_PAD(0x39c, 0x05c, 0, 0x0, 0, NO_PAD_CTRL) | ||
113 | |||
114 | #define MX35_PAD_A13__EMI_EIM_DA_H_13 IOMUX_PAD(0x3a0, 0x060, 0, 0x0, 0, NO_PAD_CTRL) | ||
115 | |||
116 | #define MX35_PAD_A14__EMI_EIM_DA_H2_14 IOMUX_PAD(0x3a4, 0x064, 0, 0x0, 0, NO_PAD_CTRL) | ||
117 | |||
118 | #define MX35_PAD_A15__EMI_EIM_DA_H2_15 IOMUX_PAD(0x3a8, 0x068, 0, 0x0, 0, NO_PAD_CTRL) | ||
119 | |||
120 | #define MX35_PAD_A16__EMI_EIM_A_16 IOMUX_PAD(0x3ac, 0x06c, 0, 0x0, 0, NO_PAD_CTRL) | ||
121 | |||
122 | #define MX35_PAD_A17__EMI_EIM_A_17 IOMUX_PAD(0x3b0, 0x070, 0, 0x0, 0, NO_PAD_CTRL) | ||
123 | |||
124 | #define MX35_PAD_A18__EMI_EIM_A_18 IOMUX_PAD(0x3b4, 0x074, 0, 0x0, 0, NO_PAD_CTRL) | ||
125 | |||
126 | #define MX35_PAD_A19__EMI_EIM_A_19 IOMUX_PAD(0x3b8, 0x078, 0, 0x0, 0, NO_PAD_CTRL) | ||
127 | |||
128 | #define MX35_PAD_A20__EMI_EIM_A_20 IOMUX_PAD(0x3bc, 0x07c, 0, 0x0, 0, NO_PAD_CTRL) | ||
129 | |||
130 | #define MX35_PAD_A21__EMI_EIM_A_21 IOMUX_PAD(0x3c0, 0x080, 0, 0x0, 0, NO_PAD_CTRL) | ||
131 | |||
132 | #define MX35_PAD_A22__EMI_EIM_A_22 IOMUX_PAD(0x3c4, 0x084, 0, 0x0, 0, NO_PAD_CTRL) | ||
133 | |||
134 | #define MX35_PAD_A23__EMI_EIM_A_23 IOMUX_PAD(0x3c8, 0x088, 0, 0x0, 0, NO_PAD_CTRL) | ||
135 | |||
136 | #define MX35_PAD_A24__EMI_EIM_A_24 IOMUX_PAD(0x3cc, 0x08c, 0, 0x0, 0, NO_PAD_CTRL) | ||
137 | |||
138 | #define MX35_PAD_A25__EMI_EIM_A_25 IOMUX_PAD(0x3d0, 0x090, 0, 0x0, 0, NO_PAD_CTRL) | ||
139 | |||
140 | #define MX35_PAD_SDBA1__EMI_EIM_SDBA1 IOMUX_PAD(0x3d4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
141 | |||
142 | #define MX35_PAD_SDBA0__EMI_EIM_SDBA0 IOMUX_PAD(0x3d8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
143 | |||
144 | #define MX35_PAD_SD0__EMI_DRAM_D_0 IOMUX_PAD(0x3dc, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
145 | |||
146 | #define MX35_PAD_SD1__EMI_DRAM_D_1 IOMUX_PAD(0x3e0, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
147 | |||
148 | #define MX35_PAD_SD2__EMI_DRAM_D_2 IOMUX_PAD(0x3e4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
149 | |||
150 | #define MX35_PAD_SD3__EMI_DRAM_D_3 IOMUX_PAD(0x3e8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
151 | |||
152 | #define MX35_PAD_SD4__EMI_DRAM_D_4 IOMUX_PAD(0x3ec, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
153 | |||
154 | #define MX35_PAD_SD5__EMI_DRAM_D_5 IOMUX_PAD(0x3f0, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
155 | |||
156 | #define MX35_PAD_SD6__EMI_DRAM_D_6 IOMUX_PAD(0x3f4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
157 | |||
158 | #define MX35_PAD_SD7__EMI_DRAM_D_7 IOMUX_PAD(0x3f8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
159 | |||
160 | #define MX35_PAD_SD8__EMI_DRAM_D_8 IOMUX_PAD(0x3fc, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
161 | |||
162 | #define MX35_PAD_SD9__EMI_DRAM_D_9 IOMUX_PAD(0x400, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
163 | |||
164 | #define MX35_PAD_SD10__EMI_DRAM_D_10 IOMUX_PAD(0x404, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
165 | |||
166 | #define MX35_PAD_SD11__EMI_DRAM_D_11 IOMUX_PAD(0x408, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
167 | |||
168 | #define MX35_PAD_SD12__EMI_DRAM_D_12 IOMUX_PAD(0x40c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
169 | |||
170 | #define MX35_PAD_SD13__EMI_DRAM_D_13 IOMUX_PAD(0x410, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
171 | |||
172 | #define MX35_PAD_SD14__EMI_DRAM_D_14 IOMUX_PAD(0x414, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
173 | |||
174 | #define MX35_PAD_SD15__EMI_DRAM_D_15 IOMUX_PAD(0x418, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
175 | |||
176 | #define MX35_PAD_SD16__EMI_DRAM_D_16 IOMUX_PAD(0x41c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
177 | |||
178 | #define MX35_PAD_SD17__EMI_DRAM_D_17 IOMUX_PAD(0x420, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
179 | |||
180 | #define MX35_PAD_SD18__EMI_DRAM_D_18 IOMUX_PAD(0x424, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
181 | |||
182 | #define MX35_PAD_SD19__EMI_DRAM_D_19 IOMUX_PAD(0x428, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
183 | |||
184 | #define MX35_PAD_SD20__EMI_DRAM_D_20 IOMUX_PAD(0x42c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
185 | |||
186 | #define MX35_PAD_SD21__EMI_DRAM_D_21 IOMUX_PAD(0x430, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
187 | |||
188 | #define MX35_PAD_SD22__EMI_DRAM_D_22 IOMUX_PAD(0x434, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
189 | |||
190 | #define MX35_PAD_SD23__EMI_DRAM_D_23 IOMUX_PAD(0x438, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
191 | |||
192 | #define MX35_PAD_SD24__EMI_DRAM_D_24 IOMUX_PAD(0x43c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
193 | |||
194 | #define MX35_PAD_SD25__EMI_DRAM_D_25 IOMUX_PAD(0x440, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
195 | |||
196 | #define MX35_PAD_SD26__EMI_DRAM_D_26 IOMUX_PAD(0x444, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
197 | |||
198 | #define MX35_PAD_SD27__EMI_DRAM_D_27 IOMUX_PAD(0x448, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
199 | |||
200 | #define MX35_PAD_SD28__EMI_DRAM_D_28 IOMUX_PAD(0x44c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
201 | |||
202 | #define MX35_PAD_SD29__EMI_DRAM_D_29 IOMUX_PAD(0x450, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
203 | |||
204 | #define MX35_PAD_SD30__EMI_DRAM_D_30 IOMUX_PAD(0x454, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
205 | |||
206 | #define MX35_PAD_SD31__EMI_DRAM_D_31 IOMUX_PAD(0x458, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
207 | |||
208 | #define MX35_PAD_DQM0__EMI_DRAM_DQM_0 IOMUX_PAD(0x45c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
209 | |||
210 | #define MX35_PAD_DQM1__EMI_DRAM_DQM_1 IOMUX_PAD(0x460, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
211 | |||
212 | #define MX35_PAD_DQM2__EMI_DRAM_DQM_2 IOMUX_PAD(0x464, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
213 | |||
214 | #define MX35_PAD_DQM3__EMI_DRAM_DQM_3 IOMUX_PAD(0x468, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
215 | |||
216 | #define MX35_PAD_EB0__EMI_EIM_EB0_B IOMUX_PAD(0x46c, 0x094, 0, 0x0, 0, NO_PAD_CTRL) | ||
217 | |||
218 | #define MX35_PAD_EB1__EMI_EIM_EB1_B IOMUX_PAD(0x470, 0x098, 0, 0x0, 0, NO_PAD_CTRL) | ||
219 | |||
220 | #define MX35_PAD_OE__EMI_EIM_OE IOMUX_PAD(0x474, 0x09c, 0, 0x0, 0, NO_PAD_CTRL) | ||
221 | |||
222 | #define MX35_PAD_CS0__EMI_EIM_CS0 IOMUX_PAD(0x478, 0x0a0, 0, 0x0, 0, NO_PAD_CTRL) | ||
223 | |||
224 | #define MX35_PAD_CS1__EMI_EIM_CS1 IOMUX_PAD(0x47c, 0x0a4, 0, 0x0, 0, NO_PAD_CTRL) | ||
225 | #define MX35_PAD_CS1__EMI_NANDF_CE3 IOMUX_PAD(0x47c, 0x0a4, 3, 0x0, 0, NO_PAD_CTRL) | ||
226 | |||
227 | #define MX35_PAD_CS2__EMI_EIM_CS2 IOMUX_PAD(0x480, 0x0a8, 0, 0x0, 0, NO_PAD_CTRL) | ||
228 | |||
229 | #define MX35_PAD_CS3__EMI_EIM_CS3 IOMUX_PAD(0x484, 0x0ac, 0, 0x0, 0, NO_PAD_CTRL) | ||
230 | |||
231 | #define MX35_PAD_CS4__EMI_EIM_CS4 IOMUX_PAD(0x488, 0x0b0, 0, 0x0, 0, NO_PAD_CTRL) | ||
232 | #define MX35_PAD_CS4__EMI_DTACK_B IOMUX_PAD(0x488, 0x0b0, 1, 0x800, 0, NO_PAD_CTRL) | ||
233 | #define MX35_PAD_CS4__EMI_NANDF_CE1 IOMUX_PAD(0x488, 0x0b0, 3, 0x0, 0, NO_PAD_CTRL) | ||
234 | #define MX35_PAD_CS4__GPIO1_20 IOMUX_PAD(0x488, 0x0b0, 5, 0x83c, 0, NO_PAD_CTRL) | ||
235 | |||
236 | #define MX35_PAD_CS5__EMI_EIM_CS5 IOMUX_PAD(0x48c, 0x0b4, 0, 0x0, 0, NO_PAD_CTRL) | ||
237 | #define MX35_PAD_CS5__CSPI2_SS2 IOMUX_PAD(0x48c, 0x0b4, 1, 0x7f8, 0, NO_PAD_CTRL) | ||
238 | #define MX35_PAD_CS5__CSPI1_SS2 IOMUX_PAD(0x48c, 0x0b4, 2, 0x7d8, 1, NO_PAD_CTRL) | ||
239 | #define MX35_PAD_CS5__EMI_NANDF_CE2 IOMUX_PAD(0x48c, 0x0b4, 3, 0x0, 0, NO_PAD_CTRL) | ||
240 | #define MX35_PAD_CS5__GPIO1_21 IOMUX_PAD(0x48c, 0x0b4, 5, 0x840, 0, NO_PAD_CTRL) | ||
241 | |||
242 | #define MX35_PAD_NF_CE0__EMI_NANDF_CE0 IOMUX_PAD(0x490, 0x0b8, 0, 0x0, 0, NO_PAD_CTRL) | ||
243 | #define MX35_PAD_NF_CE0__GPIO1_22 IOMUX_PAD(0x490, 0x0b8, 5, 0x844, 0, NO_PAD_CTRL) | ||
244 | |||
245 | #define MX35_PAD_ECB__EMI_EIM_ECB IOMUX_PAD(0x494, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
246 | |||
247 | #define MX35_PAD_LBA__EMI_EIM_LBA IOMUX_PAD(0x498, 0x0bc, 0, 0x0, 0, NO_PAD_CTRL) | ||
248 | |||
249 | #define MX35_PAD_BCLK__EMI_EIM_BCLK IOMUX_PAD(0x49c, 0x0c0, 0, 0x0, 0, NO_PAD_CTRL) | ||
250 | |||
251 | #define MX35_PAD_RW__EMI_EIM_RW IOMUX_PAD(0x4a0, 0x0c4, 0, 0x0, 0, NO_PAD_CTRL) | ||
252 | |||
253 | #define MX35_PAD_RAS__EMI_DRAM_RAS IOMUX_PAD(0x4a4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
254 | |||
255 | #define MX35_PAD_CAS__EMI_DRAM_CAS IOMUX_PAD(0x4a8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
256 | |||
257 | #define MX35_PAD_SDWE__EMI_DRAM_SDWE IOMUX_PAD(0x4ac, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
258 | |||
259 | #define MX35_PAD_SDCKE0__EMI_DRAM_SDCKE_0 IOMUX_PAD(0x4b0, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
260 | |||
261 | #define MX35_PAD_SDCKE1__EMI_DRAM_SDCKE_1 IOMUX_PAD(0x4b4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
262 | |||
263 | #define MX35_PAD_SDCLK__EMI_DRAM_SDCLK IOMUX_PAD(0x4b8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
264 | |||
265 | #define MX35_PAD_SDQS0__EMI_DRAM_SDQS_0 IOMUX_PAD(0x4bc, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
266 | |||
267 | #define MX35_PAD_SDQS1__EMI_DRAM_SDQS_1 IOMUX_PAD(0x4c0, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
268 | |||
269 | #define MX35_PAD_SDQS2__EMI_DRAM_SDQS_2 IOMUX_PAD(0x4c4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
270 | |||
271 | #define MX35_PAD_SDQS3__EMI_DRAM_SDQS_3 IOMUX_PAD(0x4c8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
272 | |||
273 | #define MX35_PAD_NFWE_B__EMI_NANDF_WE_B IOMUX_PAD(0x4cc, 0x0c8, 0, 0x0, 0, NO_PAD_CTRL) | ||
274 | #define MX35_PAD_NFWE_B__USB_TOP_USBH2_DATA_3 IOMUX_PAD(0x4cc, 0x0c8, 1, 0x9d8, 0, NO_PAD_CTRL) | ||
275 | #define MX35_PAD_NFWE_B__IPU_DISPB_D0_VSYNC IOMUX_PAD(0x4cc, 0x0c8, 2, 0x924, 0, NO_PAD_CTRL) | ||
276 | #define MX35_PAD_NFWE_B__GPIO2_18 IOMUX_PAD(0x4cc, 0x0c8, 5, 0x88c, 0, NO_PAD_CTRL) | ||
277 | #define MX35_PAD_NFWE_B__ARM11P_TOP_TRACE_0 IOMUX_PAD(0x4cc, 0x0c8, 7, 0x0, 0, NO_PAD_CTRL) | ||
278 | |||
279 | #define MX35_PAD_NFRE_B__EMI_NANDF_RE_B IOMUX_PAD(0x4d0, 0x0cc, 0, 0x0, 0, NO_PAD_CTRL) | ||
280 | #define MX35_PAD_NFRE_B__USB_TOP_USBH2_DIR IOMUX_PAD(0x4d0, 0x0cc, 1, 0x9ec, 0, NO_PAD_CTRL) | ||
281 | #define MX35_PAD_NFRE_B__IPU_DISPB_BCLK IOMUX_PAD(0x4d0, 0x0cc, 2, 0x0, 0, NO_PAD_CTRL) | ||
282 | #define MX35_PAD_NFRE_B__GPIO2_19 IOMUX_PAD(0x4d0, 0x0cc, 5, 0x890, 0, NO_PAD_CTRL) | ||
283 | #define MX35_PAD_NFRE_B__ARM11P_TOP_TRACE_1 IOMUX_PAD(0x4d0, 0x0cc, 7, 0x0, 0, NO_PAD_CTRL) | ||
284 | |||
285 | #define MX35_PAD_NFALE__EMI_NANDF_ALE IOMUX_PAD(0x4d4, 0x0d0, 0, 0x0, 0, NO_PAD_CTRL) | ||
286 | #define MX35_PAD_NFALE__USB_TOP_USBH2_STP IOMUX_PAD(0x4d4, 0x0d0, 1, 0x0, 0, NO_PAD_CTRL) | ||
287 | #define MX35_PAD_NFALE__IPU_DISPB_CS0 IOMUX_PAD(0x4d4, 0x0d0, 2, 0x0, 0, NO_PAD_CTRL) | ||
288 | #define MX35_PAD_NFALE__GPIO2_20 IOMUX_PAD(0x4d4, 0x0d0, 5, 0x898, 0, NO_PAD_CTRL) | ||
289 | #define MX35_PAD_NFALE__ARM11P_TOP_TRACE_2 IOMUX_PAD(0x4d4, 0x0d0, 7, 0x0, 0, NO_PAD_CTRL) | ||
290 | |||
291 | #define MX35_PAD_NFCLE__EMI_NANDF_CLE IOMUX_PAD(0x4d8, 0x0d4, 0, 0x0, 0, NO_PAD_CTRL) | ||
292 | #define MX35_PAD_NFCLE__USB_TOP_USBH2_NXT IOMUX_PAD(0x4d8, 0x0d4, 1, 0x9f0, 0, NO_PAD_CTRL) | ||
293 | #define MX35_PAD_NFCLE__IPU_DISPB_PAR_RS IOMUX_PAD(0x4d8, 0x0d4, 2, 0x0, 0, NO_PAD_CTRL) | ||
294 | #define MX35_PAD_NFCLE__GPIO2_21 IOMUX_PAD(0x4d8, 0x0d4, 5, 0x89c, 0, NO_PAD_CTRL) | ||
295 | #define MX35_PAD_NFCLE__ARM11P_TOP_TRACE_3 IOMUX_PAD(0x4d8, 0x0d4, 7, 0x0, 0, NO_PAD_CTRL) | ||
296 | |||
297 | #define MX35_PAD_NFWP_B__EMI_NANDF_WP_B IOMUX_PAD(0x4dc, 0x0d8, 0, 0x0, 0, NO_PAD_CTRL) | ||
298 | #define MX35_PAD_NFWP_B__USB_TOP_USBH2_DATA_7 IOMUX_PAD(0x4dc, 0x0d8, 1, 0x9e8, 0, NO_PAD_CTRL) | ||
299 | #define MX35_PAD_NFWP_B__IPU_DISPB_WR IOMUX_PAD(0x4dc, 0x0d8, 2, 0x0, 0, NO_PAD_CTRL) | ||
300 | #define MX35_PAD_NFWP_B__GPIO2_22 IOMUX_PAD(0x4dc, 0x0d8, 5, 0x8a0, 0, NO_PAD_CTRL) | ||
301 | #define MX35_PAD_NFWP_B__ARM11P_TOP_TRCTL IOMUX_PAD(0x4dc, 0x0d8, 7, 0x0, 0, NO_PAD_CTRL) | ||
302 | |||
303 | #define MX35_PAD_NFRB__EMI_NANDF_RB IOMUX_PAD(0x4e0, 0x0dc, 0, 0x0, 0, NO_PAD_CTRL) | ||
304 | #define MX35_PAD_NFRB__IPU_DISPB_RD IOMUX_PAD(0x4e0, 0x0dc, 2, 0x0, 0, NO_PAD_CTRL) | ||
305 | #define MX35_PAD_NFRB__GPIO2_23 IOMUX_PAD(0x4e0, 0x0dc, 5, 0x8a4, 0, NO_PAD_CTRL) | ||
306 | #define MX35_PAD_NFRB__ARM11P_TOP_TRCLK IOMUX_PAD(0x4e0, 0x0dc, 7, 0x0, 0, NO_PAD_CTRL) | ||
307 | |||
308 | #define MX35_PAD_D15__EMI_EIM_D_15 IOMUX_PAD(0x4e4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
309 | |||
310 | #define MX35_PAD_D14__EMI_EIM_D_14 IOMUX_PAD(0x4e8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
311 | |||
312 | #define MX35_PAD_D13__EMI_EIM_D_13 IOMUX_PAD(0x4ec, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
313 | |||
314 | #define MX35_PAD_D12__EMI_EIM_D_12 IOMUX_PAD(0x4f0, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
315 | |||
316 | #define MX35_PAD_D11__EMI_EIM_D_11 IOMUX_PAD(0x4f4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
317 | |||
318 | #define MX35_PAD_D10__EMI_EIM_D_10 IOMUX_PAD(0x4f8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
319 | |||
320 | #define MX35_PAD_D9__EMI_EIM_D_9 IOMUX_PAD(0x4fc, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
321 | |||
322 | #define MX35_PAD_D8__EMI_EIM_D_8 IOMUX_PAD(0x500, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
323 | |||
324 | #define MX35_PAD_D7__EMI_EIM_D_7 IOMUX_PAD(0x504, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
325 | |||
326 | #define MX35_PAD_D6__EMI_EIM_D_6 IOMUX_PAD(0x508, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
327 | |||
328 | #define MX35_PAD_D5__EMI_EIM_D_5 IOMUX_PAD(0x50c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
329 | |||
330 | #define MX35_PAD_D4__EMI_EIM_D_4 IOMUX_PAD(0x510, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
331 | |||
332 | #define MX35_PAD_D3__EMI_EIM_D_3 IOMUX_PAD(0x514, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
333 | |||
334 | #define MX35_PAD_D2__EMI_EIM_D_2 IOMUX_PAD(0x518, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
335 | |||
336 | #define MX35_PAD_D1__EMI_EIM_D_1 IOMUX_PAD(0x51c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
337 | |||
338 | #define MX35_PAD_D0__EMI_EIM_D_0 IOMUX_PAD(0x520, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
339 | |||
340 | #define MX35_PAD_CSI_D8__IPU_CSI_D_8 IOMUX_PAD(0x524, 0x0e0, 0, 0x0, 0, NO_PAD_CTRL) | ||
341 | #define MX35_PAD_CSI_D8__KPP_COL_0 IOMUX_PAD(0x524, 0x0e0, 1, 0x950, 0, NO_PAD_CTRL) | ||
342 | #define MX35_PAD_CSI_D8__GPIO1_20 IOMUX_PAD(0x524, 0x0e0, 5, 0x83c, 1, NO_PAD_CTRL) | ||
343 | #define MX35_PAD_CSI_D8__ARM11P_TOP_EVNTBUS_13 IOMUX_PAD(0x524, 0x0e0, 7, 0x0, 0, NO_PAD_CTRL) | ||
344 | |||
345 | #define MX35_PAD_CSI_D9__IPU_CSI_D_9 IOMUX_PAD(0x528, 0x0e4, 0, 0x0, 0, NO_PAD_CTRL) | ||
346 | #define MX35_PAD_CSI_D9__KPP_COL_1 IOMUX_PAD(0x528, 0x0e4, 1, 0x954, 0, NO_PAD_CTRL) | ||
347 | #define MX35_PAD_CSI_D9__GPIO1_21 IOMUX_PAD(0x528, 0x0e4, 5, 0x840, 1, NO_PAD_CTRL) | ||
348 | #define MX35_PAD_CSI_D9__ARM11P_TOP_EVNTBUS_14 IOMUX_PAD(0x528, 0x0e4, 7, 0x0, 0, NO_PAD_CTRL) | ||
349 | |||
350 | #define MX35_PAD_CSI_D10__IPU_CSI_D_10 IOMUX_PAD(0x52c, 0x0e8, 0, 0x0, 0, NO_PAD_CTRL) | ||
351 | #define MX35_PAD_CSI_D10__KPP_COL_2 IOMUX_PAD(0x52c, 0x0e8, 1, 0x958, 0, NO_PAD_CTRL) | ||
352 | #define MX35_PAD_CSI_D10__GPIO1_22 IOMUX_PAD(0x52c, 0x0e8, 5, 0x844, 1, NO_PAD_CTRL) | ||
353 | #define MX35_PAD_CSI_D10__ARM11P_TOP_EVNTBUS_15 IOMUX_PAD(0x52c, 0x0e8, 7, 0x0, 0, NO_PAD_CTRL) | ||
354 | |||
355 | #define MX35_PAD_CSI_D11__IPU_CSI_D_11 IOMUX_PAD(0x530, 0x0ec, 0, 0x0, 0, NO_PAD_CTRL) | ||
356 | #define MX35_PAD_CSI_D11__KPP_COL_3 IOMUX_PAD(0x530, 0x0ec, 1, 0x95c, 0, NO_PAD_CTRL) | ||
357 | #define MX35_PAD_CSI_D11__GPIO1_23 IOMUX_PAD(0x530, 0x0ec, 5, 0x0, 0, NO_PAD_CTRL) | ||
358 | |||
359 | #define MX35_PAD_CSI_D12__IPU_CSI_D_12 IOMUX_PAD(0x534, 0x0f0, 0, 0x0, 0, NO_PAD_CTRL) | ||
360 | #define MX35_PAD_CSI_D12__KPP_ROW_0 IOMUX_PAD(0x534, 0x0f0, 1, 0x970, 0, NO_PAD_CTRL) | ||
361 | #define MX35_PAD_CSI_D12__GPIO1_24 IOMUX_PAD(0x534, 0x0f0, 5, 0x0, 0, NO_PAD_CTRL) | ||
362 | |||
363 | #define MX35_PAD_CSI_D13__IPU_CSI_D_13 IOMUX_PAD(0x538, 0x0f4, 0, 0x0, 0, NO_PAD_CTRL) | ||
364 | #define MX35_PAD_CSI_D13__KPP_ROW_1 IOMUX_PAD(0x538, 0x0f4, 1, 0x974, 0, NO_PAD_CTRL) | ||
365 | #define MX35_PAD_CSI_D13__GPIO1_25 IOMUX_PAD(0x538, 0x0f4, 5, 0x0, 0, NO_PAD_CTRL) | ||
366 | |||
367 | #define MX35_PAD_CSI_D14__IPU_CSI_D_14 IOMUX_PAD(0x53c, 0x0f8, 0, 0x0, 0, NO_PAD_CTRL) | ||
368 | #define MX35_PAD_CSI_D14__KPP_ROW_2 IOMUX_PAD(0x53c, 0x0f8, 1, 0x978, 0, NO_PAD_CTRL) | ||
369 | #define MX35_PAD_CSI_D14__GPIO1_26 IOMUX_PAD(0x53c, 0x0f8, 5, 0x0, 0, NO_PAD_CTRL) | ||
370 | |||
371 | #define MX35_PAD_CSI_D15__IPU_CSI_D_15 IOMUX_PAD(0x540, 0x0fc, 0, 0x97c, 0, NO_PAD_CTRL) | ||
372 | #define MX35_PAD_CSI_D15__KPP_ROW_3 IOMUX_PAD(0x540, 0x0fc, 1, 0x0, 0, NO_PAD_CTRL) | ||
373 | #define MX35_PAD_CSI_D15__GPIO1_27 IOMUX_PAD(0x540, 0x0fc, 5, 0x0, 0, NO_PAD_CTRL) | ||
374 | |||
375 | #define MX35_PAD_CSI_MCLK__IPU_CSI_MCLK IOMUX_PAD(0x544, 0x100, 0, 0x0, 0, NO_PAD_CTRL) | ||
376 | #define MX35_PAD_CSI_MCLK__GPIO1_28 IOMUX_PAD(0x544, 0x100, 5, 0x0, 0, NO_PAD_CTRL) | ||
377 | |||
378 | #define MX35_PAD_CSI_VSYNC__IPU_CSI_VSYNC IOMUX_PAD(0x548, 0x104, 0, 0x0, 0, NO_PAD_CTRL) | ||
379 | #define MX35_PAD_CSI_VSYNC__GPIO1_29 IOMUX_PAD(0x548, 0x104, 5, 0x0, 0, NO_PAD_CTRL) | ||
380 | |||
381 | #define MX35_PAD_CSI_HSYNC__IPU_CSI_HSYNC IOMUX_PAD(0x54c, 0x108, 0, 0x0, 0, NO_PAD_CTRL) | ||
382 | #define MX35_PAD_CSI_HSYNC__GPIO1_30 IOMUX_PAD(0x54c, 0x108, 5, 0x0, 0, NO_PAD_CTRL) | ||
383 | |||
384 | #define MX35_PAD_CSI_PIXCLK__IPU_CSI_PIXCLK IOMUX_PAD(0x550, 0x10c, 0, 0x0, 0, NO_PAD_CTRL) | ||
385 | #define MX35_PAD_CSI_PIXCLK__GPIO1_31 IOMUX_PAD(0x550, 0x10c, 5, 0x0, 0, NO_PAD_CTRL) | ||
386 | |||
387 | #define MX35_PAD_I2C1_CLK__I2C1_SCL IOMUX_PAD(0x554, 0x110, 0, 0x0, 0, NO_PAD_CTRL) | ||
388 | #define MX35_PAD_I2C1_CLK__GPIO2_24 IOMUX_PAD(0x554, 0x110, 5, 0x8a8, 0, NO_PAD_CTRL) | ||
389 | #define MX35_PAD_I2C1_CLK__CCM_USB_BYP_CLK IOMUX_PAD(0x554, 0x110, 6, 0x0, 0, NO_PAD_CTRL) | ||
390 | |||
391 | #define MX35_PAD_I2C1_DAT__I2C1_SDA IOMUX_PAD(0x558, 0x114, 0, 0x0, 0, NO_PAD_CTRL) | ||
392 | #define MX35_PAD_I2C1_DAT__GPIO2_25 IOMUX_PAD(0x558, 0x114, 5, 0x8ac, 0, NO_PAD_CTRL) | ||
393 | |||
394 | #define MX35_PAD_I2C2_CLK__I2C2_SCL IOMUX_PAD(0x55c, 0x118, 0, 0x0, 0, NO_PAD_CTRL) | ||
395 | #define MX35_PAD_I2C2_CLK__CAN1_TXCAN IOMUX_PAD(0x55c, 0x118, 1, 0x0, 0, NO_PAD_CTRL) | ||
396 | #define MX35_PAD_I2C2_CLK__USB_TOP_USBH2_PWR IOMUX_PAD(0x55c, 0x118, 2, 0x0, 0, NO_PAD_CTRL) | ||
397 | #define MX35_PAD_I2C2_CLK__GPIO2_26 IOMUX_PAD(0x55c, 0x118, 5, 0x8b0, 0, NO_PAD_CTRL) | ||
398 | #define MX35_PAD_I2C2_CLK__SDMA_DEBUG_BUS_DEVICE_2 IOMUX_PAD(0x55c, 0x118, 6, 0x0, 0, NO_PAD_CTRL) | ||
399 | |||
400 | #define MX35_PAD_I2C2_DAT__I2C2_SDA IOMUX_PAD(0x560, 0x11c, 0, 0x0, 0, NO_PAD_CTRL) | ||
401 | #define MX35_PAD_I2C2_DAT__CAN1_RXCAN IOMUX_PAD(0x560, 0x11c, 1, 0x7c8, 0, NO_PAD_CTRL) | ||
402 | #define MX35_PAD_I2C2_DAT__USB_TOP_USBH2_OC IOMUX_PAD(0x560, 0x11c, 2, 0x9f4, 0, NO_PAD_CTRL) | ||
403 | #define MX35_PAD_I2C2_DAT__GPIO2_27 IOMUX_PAD(0x560, 0x11c, 5, 0x8b4, 0, NO_PAD_CTRL) | ||
404 | #define MX35_PAD_I2C2_DAT__SDMA_DEBUG_BUS_DEVICE_3 IOMUX_PAD(0x560, 0x11c, 6, 0x0, 0, NO_PAD_CTRL) | ||
405 | |||
406 | #define MX35_PAD_STXD4__AUDMUX_AUD4_TXD IOMUX_PAD(0x564, 0x120, 0, 0x0, 0, NO_PAD_CTRL) | ||
407 | #define MX35_PAD_STXD4__GPIO2_28 IOMUX_PAD(0x564, 0x120, 5, 0x8b8, 0, NO_PAD_CTRL) | ||
408 | #define MX35_PAD_STXD4__ARM11P_TOP_ARM_COREASID0 IOMUX_PAD(0x564, 0x120, 7, 0x0, 0, NO_PAD_CTRL) | ||
409 | |||
410 | #define MX35_PAD_SRXD4__AUDMUX_AUD4_RXD IOMUX_PAD(0x568, 0x124, 0, 0x0, 0, NO_PAD_CTRL) | ||
411 | #define MX35_PAD_SRXD4__GPIO2_29 IOMUX_PAD(0x568, 0x124, 5, 0x8bc, 0, NO_PAD_CTRL) | ||
412 | #define MX35_PAD_SRXD4__ARM11P_TOP_ARM_COREASID1 IOMUX_PAD(0x568, 0x124, 7, 0x0, 0, NO_PAD_CTRL) | ||
413 | |||
414 | #define MX35_PAD_SCK4__AUDMUX_AUD4_TXC IOMUX_PAD(0x56c, 0x128, 0, 0x0, 0, NO_PAD_CTRL) | ||
415 | #define MX35_PAD_SCK4__GPIO2_30 IOMUX_PAD(0x56c, 0x128, 5, 0x8c4, 0, NO_PAD_CTRL) | ||
416 | #define MX35_PAD_SCK4__ARM11P_TOP_ARM_COREASID2 IOMUX_PAD(0x56c, 0x128, 7, 0x0, 0, NO_PAD_CTRL) | ||
417 | |||
418 | #define MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS IOMUX_PAD(0x570, 0x12c, 0, 0x0, 0, NO_PAD_CTRL) | ||
419 | #define MX35_PAD_STXFS4__GPIO2_31 IOMUX_PAD(0x570, 0x12c, 5, 0x8c8, 0, NO_PAD_CTRL) | ||
420 | #define MX35_PAD_STXFS4__ARM11P_TOP_ARM_COREASID3 IOMUX_PAD(0x570, 0x12c, 7, 0x0, 0, NO_PAD_CTRL) | ||
421 | |||
422 | #define MX35_PAD_STXD5__AUDMUX_AUD5_TXD IOMUX_PAD(0x574, 0x130, 0, 0x0, 0, NO_PAD_CTRL) | ||
423 | #define MX35_PAD_STXD5__SPDIF_SPDIF_OUT1 IOMUX_PAD(0x574, 0x130, 1, 0x0, 0, NO_PAD_CTRL) | ||
424 | #define MX35_PAD_STXD5__CSPI2_MOSI IOMUX_PAD(0x574, 0x130, 2, 0x7ec, 0, NO_PAD_CTRL) | ||
425 | #define MX35_PAD_STXD5__GPIO1_0 IOMUX_PAD(0x574, 0x130, 5, 0x82c, 1, NO_PAD_CTRL) | ||
426 | #define MX35_PAD_STXD5__ARM11P_TOP_ARM_COREASID4 IOMUX_PAD(0x574, 0x130, 7, 0x0, 0, NO_PAD_CTRL) | ||
427 | |||
428 | #define MX35_PAD_SRXD5__AUDMUX_AUD5_RXD IOMUX_PAD(0x578, 0x134, 0, 0x0, 0, NO_PAD_CTRL) | ||
429 | #define MX35_PAD_SRXD5__SPDIF_SPDIF_IN1 IOMUX_PAD(0x578, 0x134, 1, 0x998, 0, NO_PAD_CTRL) | ||
430 | #define MX35_PAD_SRXD5__CSPI2_MISO IOMUX_PAD(0x578, 0x134, 2, 0x7e8, 0, NO_PAD_CTRL) | ||
431 | #define MX35_PAD_SRXD5__GPIO1_1 IOMUX_PAD(0x578, 0x134, 5, 0x838, 1, NO_PAD_CTRL) | ||
432 | #define MX35_PAD_SRXD5__ARM11P_TOP_ARM_COREASID5 IOMUX_PAD(0x578, 0x134, 7, 0x0, 0, NO_PAD_CTRL) | ||
433 | |||
434 | #define MX35_PAD_SCK5__AUDMUX_AUD5_TXC IOMUX_PAD(0x57c, 0x138, 0, 0x0, 0, NO_PAD_CTRL) | ||
435 | #define MX35_PAD_SCK5__SPDIF_SPDIF_EXTCLK IOMUX_PAD(0x57c, 0x138, 1, 0x994, 0, NO_PAD_CTRL) | ||
436 | #define MX35_PAD_SCK5__CSPI2_SCLK IOMUX_PAD(0x57c, 0x138, 2, 0x7e0, 0, NO_PAD_CTRL) | ||
437 | #define MX35_PAD_SCK5__GPIO1_2 IOMUX_PAD(0x57c, 0x138, 5, 0x848, 0, NO_PAD_CTRL) | ||
438 | #define MX35_PAD_SCK5__ARM11P_TOP_ARM_COREASID6 IOMUX_PAD(0x57c, 0x138, 7, 0x0, 0, NO_PAD_CTRL) | ||
439 | |||
440 | #define MX35_PAD_STXFS5__AUDMUX_AUD5_TXFS IOMUX_PAD(0x580, 0x13c, 0, 0x0, 0, NO_PAD_CTRL) | ||
441 | #define MX35_PAD_STXFS5__CSPI2_RDY IOMUX_PAD(0x580, 0x13c, 2, 0x7e4, 0, NO_PAD_CTRL) | ||
442 | #define MX35_PAD_STXFS5__GPIO1_3 IOMUX_PAD(0x580, 0x13c, 5, 0x84c, 0, NO_PAD_CTRL) | ||
443 | #define MX35_PAD_STXFS5__ARM11P_TOP_ARM_COREASID7 IOMUX_PAD(0x580, 0x13c, 7, 0x0, 0, NO_PAD_CTRL) | ||
444 | |||
445 | #define MX35_PAD_SCKR__ESAI_SCKR IOMUX_PAD(0x584, 0x140, 0, 0x0, 0, NO_PAD_CTRL) | ||
446 | #define MX35_PAD_SCKR__GPIO1_4 IOMUX_PAD(0x584, 0x140, 5, 0x850, 1, NO_PAD_CTRL) | ||
447 | #define MX35_PAD_SCKR__ARM11P_TOP_EVNTBUS_10 IOMUX_PAD(0x584, 0x140, 7, 0x0, 0, NO_PAD_CTRL) | ||
448 | |||
449 | #define MX35_PAD_FSR__ESAI_FSR IOMUX_PAD(0x588, 0x144, 0, 0x0, 0, NO_PAD_CTRL) | ||
450 | #define MX35_PAD_FSR__GPIO1_5 IOMUX_PAD(0x588, 0x144, 5, 0x854, 1, NO_PAD_CTRL) | ||
451 | #define MX35_PAD_FSR__ARM11P_TOP_EVNTBUS_11 IOMUX_PAD(0x588, 0x144, 7, 0x0, 0, NO_PAD_CTRL) | ||
452 | |||
453 | #define MX35_PAD_HCKR__ESAI_HCKR IOMUX_PAD(0x58c, 0x148, 0, 0x0, 0, NO_PAD_CTRL) | ||
454 | #define MX35_PAD_HCKR__AUDMUX_AUD5_RXFS IOMUX_PAD(0x58c, 0x148, 1, 0x0, 0, NO_PAD_CTRL) | ||
455 | #define MX35_PAD_HCKR__CSPI2_SS0 IOMUX_PAD(0x58c, 0x148, 2, 0x7f0, 0, NO_PAD_CTRL) | ||
456 | #define MX35_PAD_HCKR__IPU_FLASH_STROBE IOMUX_PAD(0x58c, 0x148, 3, 0x0, 0, NO_PAD_CTRL) | ||
457 | #define MX35_PAD_HCKR__GPIO1_6 IOMUX_PAD(0x58c, 0x148, 5, 0x858, 1, NO_PAD_CTRL) | ||
458 | #define MX35_PAD_HCKR__ARM11P_TOP_EVNTBUS_12 IOMUX_PAD(0x58c, 0x148, 7, 0x0, 0, NO_PAD_CTRL) | ||
459 | |||
460 | #define MX35_PAD_SCKT__ESAI_SCKT IOMUX_PAD(0x590, 0x14c, 0, 0x0, 0, NO_PAD_CTRL) | ||
461 | #define MX35_PAD_SCKT__GPIO1_7 IOMUX_PAD(0x590, 0x14c, 5, 0x85c, 1, NO_PAD_CTRL) | ||
462 | #define MX35_PAD_SCKT__IPU_CSI_D_0 IOMUX_PAD(0x590, 0x14c, 6, 0x930, 0, NO_PAD_CTRL) | ||
463 | #define MX35_PAD_SCKT__KPP_ROW_2 IOMUX_PAD(0x590, 0x14c, 7, 0x978, 1, NO_PAD_CTRL) | ||
464 | |||
465 | #define MX35_PAD_FST__ESAI_FST IOMUX_PAD(0x594, 0x150, 0, 0x0, 0, NO_PAD_CTRL) | ||
466 | #define MX35_PAD_FST__GPIO1_8 IOMUX_PAD(0x594, 0x150, 5, 0x860, 1, NO_PAD_CTRL) | ||
467 | #define MX35_PAD_FST__IPU_CSI_D_1 IOMUX_PAD(0x594, 0x150, 6, 0x934, 0, NO_PAD_CTRL) | ||
468 | #define MX35_PAD_FST__KPP_ROW_3 IOMUX_PAD(0x594, 0x150, 7, 0x97c, 1, NO_PAD_CTRL) | ||
469 | |||
470 | #define MX35_PAD_HCKT__ESAI_HCKT IOMUX_PAD(0x598, 0x154, 0, 0x0, 0, NO_PAD_CTRL) | ||
471 | #define MX35_PAD_HCKT__AUDMUX_AUD5_RXC IOMUX_PAD(0x598, 0x154, 1, 0x7a8, 0, NO_PAD_CTRL) | ||
472 | #define MX35_PAD_HCKT__GPIO1_9 IOMUX_PAD(0x598, 0x154, 5, 0x864, 0, NO_PAD_CTRL) | ||
473 | #define MX35_PAD_HCKT__IPU_CSI_D_2 IOMUX_PAD(0x598, 0x154, 6, 0x938, 0, NO_PAD_CTRL) | ||
474 | #define MX35_PAD_HCKT__KPP_COL_3 IOMUX_PAD(0x598, 0x154, 7, 0x95c, 1, NO_PAD_CTRL) | ||
475 | |||
476 | #define MX35_PAD_TX5_RX0__ESAI_TX5_RX0 IOMUX_PAD(0x59c, 0x158, 0, 0x0, 0, NO_PAD_CTRL) | ||
477 | #define MX35_PAD_TX5_RX0__AUDMUX_AUD4_RXC IOMUX_PAD(0x59c, 0x158, 1, 0x0, 0, NO_PAD_CTRL) | ||
478 | #define MX35_PAD_TX5_RX0__CSPI2_SS2 IOMUX_PAD(0x59c, 0x158, 2, 0x7f8, 1, NO_PAD_CTRL) | ||
479 | #define MX35_PAD_TX5_RX0__CAN2_TXCAN IOMUX_PAD(0x59c, 0x158, 3, 0x0, 0, NO_PAD_CTRL) | ||
480 | #define MX35_PAD_TX5_RX0__UART2_DTR IOMUX_PAD(0x59c, 0x158, 4, 0x0, 0, NO_PAD_CTRL) | ||
481 | #define MX35_PAD_TX5_RX0__GPIO1_10 IOMUX_PAD(0x59c, 0x158, 5, 0x830, 0, NO_PAD_CTRL) | ||
482 | #define MX35_PAD_TX5_RX0__EMI_M3IF_CHOSEN_MASTER_0 IOMUX_PAD(0x59c, 0x158, 7, 0x0, 0, NO_PAD_CTRL) | ||
483 | |||
484 | #define MX35_PAD_TX4_RX1__ESAI_TX4_RX1 IOMUX_PAD(0x5a0, 0x15c, 0, 0x0, 0, NO_PAD_CTRL) | ||
485 | #define MX35_PAD_TX4_RX1__AUDMUX_AUD4_RXFS IOMUX_PAD(0x5a0, 0x15c, 1, 0x0, 0, NO_PAD_CTRL) | ||
486 | #define MX35_PAD_TX4_RX1__CSPI2_SS3 IOMUX_PAD(0x5a0, 0x15c, 2, 0x7fc, 0, NO_PAD_CTRL) | ||
487 | #define MX35_PAD_TX4_RX1__CAN2_RXCAN IOMUX_PAD(0x5a0, 0x15c, 3, 0x7cc, 0, NO_PAD_CTRL) | ||
488 | #define MX35_PAD_TX4_RX1__UART2_DSR IOMUX_PAD(0x5a0, 0x15c, 4, 0x0, 0, NO_PAD_CTRL) | ||
489 | #define MX35_PAD_TX4_RX1__GPIO1_11 IOMUX_PAD(0x5a0, 0x15c, 5, 0x834, 0, NO_PAD_CTRL) | ||
490 | #define MX35_PAD_TX4_RX1__IPU_CSI_D_3 IOMUX_PAD(0x5a0, 0x15c, 6, 0x93c, 0, NO_PAD_CTRL) | ||
491 | #define MX35_PAD_TX4_RX1__KPP_ROW_0 IOMUX_PAD(0x5a0, 0x15c, 7, 0x970, 1, NO_PAD_CTRL) | ||
492 | |||
493 | #define MX35_PAD_TX3_RX2__ESAI_TX3_RX2 IOMUX_PAD(0x5a4, 0x160, 0, 0x0, 0, NO_PAD_CTRL) | ||
494 | #define MX35_PAD_TX3_RX2__I2C3_SCL IOMUX_PAD(0x5a4, 0x160, 1, 0x91c, 0, NO_PAD_CTRL) | ||
495 | #define MX35_PAD_TX3_RX2__EMI_NANDF_CE1 IOMUX_PAD(0x5a4, 0x160, 3, 0x0, 0, NO_PAD_CTRL) | ||
496 | #define MX35_PAD_TX3_RX2__GPIO1_12 IOMUX_PAD(0x5a4, 0x160, 5, 0x0, 0, NO_PAD_CTRL) | ||
497 | #define MX35_PAD_TX3_RX2__IPU_CSI_D_4 IOMUX_PAD(0x5a4, 0x160, 6, 0x940, 0, NO_PAD_CTRL) | ||
498 | #define MX35_PAD_TX3_RX2__KPP_ROW_1 IOMUX_PAD(0x5a4, 0x160, 7, 0x974, 1, NO_PAD_CTRL) | ||
499 | |||
500 | #define MX35_PAD_TX2_RX3__ESAI_TX2_RX3 IOMUX_PAD(0x5a8, 0x164, 0, 0x0, 0, NO_PAD_CTRL) | ||
501 | #define MX35_PAD_TX2_RX3__I2C3_SDA IOMUX_PAD(0x5a8, 0x164, 1, 0x920, 0, NO_PAD_CTRL) | ||
502 | #define MX35_PAD_TX2_RX3__EMI_NANDF_CE2 IOMUX_PAD(0x5a8, 0x164, 3, 0x0, 0, NO_PAD_CTRL) | ||
503 | #define MX35_PAD_TX2_RX3__GPIO1_13 IOMUX_PAD(0x5a8, 0x164, 5, 0x0, 0, NO_PAD_CTRL) | ||
504 | #define MX35_PAD_TX2_RX3__IPU_CSI_D_5 IOMUX_PAD(0x5a8, 0x164, 6, 0x944, 0, NO_PAD_CTRL) | ||
505 | #define MX35_PAD_TX2_RX3__KPP_COL_0 IOMUX_PAD(0x5a8, 0x164, 7, 0x950, 1, NO_PAD_CTRL) | ||
506 | |||
507 | #define MX35_PAD_TX1__ESAI_TX1 IOMUX_PAD(0x5ac, 0x168, 0, 0x0, 0, NO_PAD_CTRL) | ||
508 | #define MX35_PAD_TX1__CCM_PMIC_RDY IOMUX_PAD(0x5ac, 0x168, 1, 0x7d4, 1, NO_PAD_CTRL) | ||
509 | #define MX35_PAD_TX1__CSPI1_SS2 IOMUX_PAD(0x5ac, 0x168, 2, 0x7d8, 2, NO_PAD_CTRL) | ||
510 | #define MX35_PAD_TX1__EMI_NANDF_CE3 IOMUX_PAD(0x5ac, 0x168, 3, 0x0, 0, NO_PAD_CTRL) | ||
511 | #define MX35_PAD_TX1__UART2_RI IOMUX_PAD(0x5ac, 0x168, 4, 0x0, 0, NO_PAD_CTRL) | ||
512 | #define MX35_PAD_TX1__GPIO1_14 IOMUX_PAD(0x5ac, 0x168, 5, 0x0, 0, NO_PAD_CTRL) | ||
513 | #define MX35_PAD_TX1__IPU_CSI_D_6 IOMUX_PAD(0x5ac, 0x168, 6, 0x948, 0, NO_PAD_CTRL) | ||
514 | #define MX35_PAD_TX1__KPP_COL_1 IOMUX_PAD(0x5ac, 0x168, 7, 0x954, 1, NO_PAD_CTRL) | ||
515 | |||
516 | #define MX35_PAD_TX0__ESAI_TX0 IOMUX_PAD(0x5b0, 0x16c, 0, 0x0, 0, NO_PAD_CTRL) | ||
517 | #define MX35_PAD_TX0__SPDIF_SPDIF_EXTCLK IOMUX_PAD(0x5b0, 0x16c, 1, 0x994, 1, NO_PAD_CTRL) | ||
518 | #define MX35_PAD_TX0__CSPI1_SS3 IOMUX_PAD(0x5b0, 0x16c, 2, 0x7dc, 0, NO_PAD_CTRL) | ||
519 | #define MX35_PAD_TX0__EMI_DTACK_B IOMUX_PAD(0x5b0, 0x16c, 3, 0x800, 1, NO_PAD_CTRL) | ||
520 | #define MX35_PAD_TX0__UART2_DCD IOMUX_PAD(0x5b0, 0x16c, 4, 0x0, 0, NO_PAD_CTRL) | ||
521 | #define MX35_PAD_TX0__GPIO1_15 IOMUX_PAD(0x5b0, 0x16c, 5, 0x0, 0, NO_PAD_CTRL) | ||
522 | #define MX35_PAD_TX0__IPU_CSI_D_7 IOMUX_PAD(0x5b0, 0x16c, 6, 0x94c, 0, NO_PAD_CTRL) | ||
523 | #define MX35_PAD_TX0__KPP_COL_2 IOMUX_PAD(0x5b0, 0x16c, 7, 0x958, 1, NO_PAD_CTRL) | ||
524 | |||
525 | #define MX35_PAD_CSPI1_MOSI__CSPI1_MOSI IOMUX_PAD(0x5b4, 0x170, 0, 0x0, 0, NO_PAD_CTRL) | ||
526 | #define MX35_PAD_CSPI1_MOSI__GPIO1_16 IOMUX_PAD(0x5b4, 0x170, 5, 0x0, 0, NO_PAD_CTRL) | ||
527 | #define MX35_PAD_CSPI1_MOSI__ECT_CTI_TRIG_OUT1_2 IOMUX_PAD(0x5b4, 0x170, 7, 0x0, 0, NO_PAD_CTRL) | ||
528 | |||
529 | #define MX35_PAD_CSPI1_MISO__CSPI1_MISO IOMUX_PAD(0x5b8, 0x174, 0, 0x0, 0, NO_PAD_CTRL) | ||
530 | #define MX35_PAD_CSPI1_MISO__GPIO1_17 IOMUX_PAD(0x5b8, 0x174, 5, 0x0, 0, NO_PAD_CTRL) | ||
531 | #define MX35_PAD_CSPI1_MISO__ECT_CTI_TRIG_OUT1_3 IOMUX_PAD(0x5b8, 0x174, 7, 0x0, 0, NO_PAD_CTRL) | ||
532 | |||
533 | #define MX35_PAD_CSPI1_SS0__CSPI1_SS0 IOMUX_PAD(0x5bc, 0x178, 0, 0x0, 0, NO_PAD_CTRL) | ||
534 | #define MX35_PAD_CSPI1_SS0__OWIRE_LINE IOMUX_PAD(0x5bc, 0x178, 1, 0x990, 1, NO_PAD_CTRL) | ||
535 | #define MX35_PAD_CSPI1_SS0__CSPI2_SS3 IOMUX_PAD(0x5bc, 0x178, 2, 0x7fc, 1, NO_PAD_CTRL) | ||
536 | #define MX35_PAD_CSPI1_SS0__GPIO1_18 IOMUX_PAD(0x5bc, 0x178, 5, 0x0, 0, NO_PAD_CTRL) | ||
537 | #define MX35_PAD_CSPI1_SS0__ECT_CTI_TRIG_OUT1_4 IOMUX_PAD(0x5bc, 0x178, 7, 0x0, 0, NO_PAD_CTRL) | ||
538 | |||
539 | #define MX35_PAD_CSPI1_SS1__CSPI1_SS1 IOMUX_PAD(0x5c0, 0x17c, 0, 0x0, 0, NO_PAD_CTRL) | ||
540 | #define MX35_PAD_CSPI1_SS1__PWM_PWMO IOMUX_PAD(0x5c0, 0x17c, 1, 0x0, 0, NO_PAD_CTRL) | ||
541 | #define MX35_PAD_CSPI1_SS1__CCM_CLK32K IOMUX_PAD(0x5c0, 0x17c, 2, 0x7d0, 1, NO_PAD_CTRL) | ||
542 | #define MX35_PAD_CSPI1_SS1__GPIO1_19 IOMUX_PAD(0x5c0, 0x17c, 5, 0x0, 0, NO_PAD_CTRL) | ||
543 | #define MX35_PAD_CSPI1_SS1__IPU_DIAGB_29 IOMUX_PAD(0x5c0, 0x17c, 6, 0x0, 0, NO_PAD_CTRL) | ||
544 | #define MX35_PAD_CSPI1_SS1__ECT_CTI_TRIG_OUT1_5 IOMUX_PAD(0x5c0, 0x17c, 7, 0x0, 0, NO_PAD_CTRL) | ||
545 | |||
546 | #define MX35_PAD_CSPI1_SCLK__CSPI1_SCLK IOMUX_PAD(0x5c4, 0x180, 0, 0x0, 0, NO_PAD_CTRL) | ||
547 | #define MX35_PAD_CSPI1_SCLK__GPIO3_4 IOMUX_PAD(0x5c4, 0x180, 5, 0x904, 0, NO_PAD_CTRL) | ||
548 | #define MX35_PAD_CSPI1_SCLK__IPU_DIAGB_30 IOMUX_PAD(0x5c4, 0x180, 6, 0x0, 0, NO_PAD_CTRL) | ||
549 | #define MX35_PAD_CSPI1_SCLK__EMI_M3IF_CHOSEN_MASTER_1 IOMUX_PAD(0x5c4, 0x180, 7, 0x0, 0, NO_PAD_CTRL) | ||
550 | |||
551 | #define MX35_PAD_CSPI1_SPI_RDY__CSPI1_RDY IOMUX_PAD(0x5c8, 0x184, 0, 0x0, 0, NO_PAD_CTRL) | ||
552 | #define MX35_PAD_CSPI1_SPI_RDY__GPIO3_5 IOMUX_PAD(0x5c8, 0x184, 5, 0x908, 0, NO_PAD_CTRL) | ||
553 | #define MX35_PAD_CSPI1_SPI_RDY__IPU_DIAGB_31 IOMUX_PAD(0x5c8, 0x184, 6, 0x0, 0, NO_PAD_CTRL) | ||
554 | #define MX35_PAD_CSPI1_SPI_RDY__EMI_M3IF_CHOSEN_MASTER_2 IOMUX_PAD(0x5c8, 0x184, 7, 0x0, 0, NO_PAD_CTRL) | ||
555 | |||
556 | #define MX35_PAD_RXD1__UART1_RXD_MUX IOMUX_PAD(0x5cc, 0x188, 0, 0x0, 0, NO_PAD_CTRL) | ||
557 | #define MX35_PAD_RXD1__CSPI2_MOSI IOMUX_PAD(0x5cc, 0x188, 1, 0x7ec, 1, NO_PAD_CTRL) | ||
558 | #define MX35_PAD_RXD1__KPP_COL_4 IOMUX_PAD(0x5cc, 0x188, 4, 0x960, 0, NO_PAD_CTRL) | ||
559 | #define MX35_PAD_RXD1__GPIO3_6 IOMUX_PAD(0x5cc, 0x188, 5, 0x90c, 0, NO_PAD_CTRL) | ||
560 | #define MX35_PAD_RXD1__ARM11P_TOP_EVNTBUS_16 IOMUX_PAD(0x5cc, 0x188, 7, 0x0, 0, NO_PAD_CTRL) | ||
561 | |||
562 | #define MX35_PAD_TXD1__UART1_TXD_MUX IOMUX_PAD(0x5d0, 0x18c, 0, 0x0, 0, NO_PAD_CTRL) | ||
563 | #define MX35_PAD_TXD1__CSPI2_MISO IOMUX_PAD(0x5d0, 0x18c, 1, 0x7e8, 1, NO_PAD_CTRL) | ||
564 | #define MX35_PAD_TXD1__KPP_COL_5 IOMUX_PAD(0x5d0, 0x18c, 4, 0x964, 0, NO_PAD_CTRL) | ||
565 | #define MX35_PAD_TXD1__GPIO3_7 IOMUX_PAD(0x5d0, 0x18c, 5, 0x910, 0, NO_PAD_CTRL) | ||
566 | #define MX35_PAD_TXD1__ARM11P_TOP_EVNTBUS_17 IOMUX_PAD(0x5d0, 0x18c, 7, 0x0, 0, NO_PAD_CTRL) | ||
567 | |||
568 | #define MX35_PAD_RTS1__UART1_RTS IOMUX_PAD(0x5d4, 0x190, 0, 0x0, 0, NO_PAD_CTRL) | ||
569 | #define MX35_PAD_RTS1__CSPI2_SCLK IOMUX_PAD(0x5d4, 0x190, 1, 0x7e0, 1, NO_PAD_CTRL) | ||
570 | #define MX35_PAD_RTS1__I2C3_SCL IOMUX_PAD(0x5d4, 0x190, 2, 0x91c, 1, NO_PAD_CTRL) | ||
571 | #define MX35_PAD_RTS1__IPU_CSI_D_0 IOMUX_PAD(0x5d4, 0x190, 3, 0x930, 1, NO_PAD_CTRL) | ||
572 | #define MX35_PAD_RTS1__KPP_COL_6 IOMUX_PAD(0x5d4, 0x190, 4, 0x968, 0, NO_PAD_CTRL) | ||
573 | #define MX35_PAD_RTS1__GPIO3_8 IOMUX_PAD(0x5d4, 0x190, 5, 0x914, 0, NO_PAD_CTRL) | ||
574 | #define MX35_PAD_RTS1__EMI_NANDF_CE1 IOMUX_PAD(0x5d4, 0x190, 6, 0x0, 0, NO_PAD_CTRL) | ||
575 | #define MX35_PAD_RTS1__ARM11P_TOP_EVNTBUS_18 IOMUX_PAD(0x5d4, 0x190, 7, 0x0, 0, NO_PAD_CTRL) | ||
576 | |||
577 | #define MX35_PAD_CTS1__UART1_CTS IOMUX_PAD(0x5d8, 0x194, 0, 0x0, 0, NO_PAD_CTRL) | ||
578 | #define MX35_PAD_CTS1__CSPI2_RDY IOMUX_PAD(0x5d8, 0x194, 1, 0x7e4, 1, NO_PAD_CTRL) | ||
579 | #define MX35_PAD_CTS1__I2C3_SDA IOMUX_PAD(0x5d8, 0x194, 2, 0x920, 1, NO_PAD_CTRL) | ||
580 | #define MX35_PAD_CTS1__IPU_CSI_D_1 IOMUX_PAD(0x5d8, 0x194, 3, 0x934, 1, NO_PAD_CTRL) | ||
581 | #define MX35_PAD_CTS1__KPP_COL_7 IOMUX_PAD(0x5d8, 0x194, 4, 0x96c, 0, NO_PAD_CTRL) | ||
582 | #define MX35_PAD_CTS1__GPIO3_9 IOMUX_PAD(0x5d8, 0x194, 5, 0x918, 0, NO_PAD_CTRL) | ||
583 | #define MX35_PAD_CTS1__EMI_NANDF_CE2 IOMUX_PAD(0x5d8, 0x194, 6, 0x0, 0, NO_PAD_CTRL) | ||
584 | #define MX35_PAD_CTS1__ARM11P_TOP_EVNTBUS_19 IOMUX_PAD(0x5d8, 0x194, 7, 0x0, 0, NO_PAD_CTRL) | ||
585 | |||
586 | #define MX35_PAD_RXD2__UART2_RXD_MUX IOMUX_PAD(0x5dc, 0x198, 0, 0x0, 0, NO_PAD_CTRL) | ||
587 | #define MX35_PAD_RXD2__KPP_ROW_4 IOMUX_PAD(0x5dc, 0x198, 4, 0x980, 0, NO_PAD_CTRL) | ||
588 | #define MX35_PAD_RXD2__GPIO3_10 IOMUX_PAD(0x5dc, 0x198, 5, 0x8ec, 0, NO_PAD_CTRL) | ||
589 | |||
590 | #define MX35_PAD_TXD2__UART2_TXD_MUX IOMUX_PAD(0x5e0, 0x19c, 0, 0x0, 0, NO_PAD_CTRL) | ||
591 | #define MX35_PAD_TXD2__SPDIF_SPDIF_EXTCLK IOMUX_PAD(0x5e0, 0x19c, 1, 0x994, 2, NO_PAD_CTRL) | ||
592 | #define MX35_PAD_TXD2__KPP_ROW_5 IOMUX_PAD(0x5e0, 0x19c, 4, 0x984, 0, NO_PAD_CTRL) | ||
593 | #define MX35_PAD_TXD2__GPIO3_11 IOMUX_PAD(0x5e0, 0x19c, 5, 0x8f0, 0, NO_PAD_CTRL) | ||
594 | |||
595 | #define MX35_PAD_RTS2__UART2_RTS IOMUX_PAD(0x5e4, 0x1a0, 0, 0x0, 0, NO_PAD_CTRL) | ||
596 | #define MX35_PAD_RTS2__SPDIF_SPDIF_IN1 IOMUX_PAD(0x5e4, 0x1a0, 1, 0x998, 1, NO_PAD_CTRL) | ||
597 | #define MX35_PAD_RTS2__CAN2_RXCAN IOMUX_PAD(0x5e4, 0x1a0, 2, 0x7cc, 1, NO_PAD_CTRL) | ||
598 | #define MX35_PAD_RTS2__IPU_CSI_D_2 IOMUX_PAD(0x5e4, 0x1a0, 3, 0x938, 1, NO_PAD_CTRL) | ||
599 | #define MX35_PAD_RTS2__KPP_ROW_6 IOMUX_PAD(0x5e4, 0x1a0, 4, 0x988, 0, NO_PAD_CTRL) | ||
600 | #define MX35_PAD_RTS2__GPIO3_12 IOMUX_PAD(0x5e4, 0x1a0, 5, 0x8f4, 0, NO_PAD_CTRL) | ||
601 | #define MX35_PAD_RTS2__AUDMUX_AUD5_RXC IOMUX_PAD(0x5e4, 0x1a0, 6, 0x0, 0, NO_PAD_CTRL) | ||
602 | #define MX35_PAD_RTS2__UART3_RXD_MUX IOMUX_PAD(0x5e4, 0x1a0, 7, 0x9a0, 0, NO_PAD_CTRL) | ||
603 | |||
604 | #define MX35_PAD_CTS2__UART2_CTS IOMUX_PAD(0x5e8, 0x1a4, 0, 0x0, 0, NO_PAD_CTRL) | ||
605 | #define MX35_PAD_CTS2__SPDIF_SPDIF_OUT1 IOMUX_PAD(0x5e8, 0x1a4, 1, 0x0, 0, NO_PAD_CTRL) | ||
606 | #define MX35_PAD_CTS2__CAN2_TXCAN IOMUX_PAD(0x5e8, 0x1a4, 2, 0x0, 0, NO_PAD_CTRL) | ||
607 | #define MX35_PAD_CTS2__IPU_CSI_D_3 IOMUX_PAD(0x5e8, 0x1a4, 3, 0x93c, 1, NO_PAD_CTRL) | ||
608 | #define MX35_PAD_CTS2__KPP_ROW_7 IOMUX_PAD(0x5e8, 0x1a4, 4, 0x98c, 0, NO_PAD_CTRL) | ||
609 | #define MX35_PAD_CTS2__GPIO3_13 IOMUX_PAD(0x5e8, 0x1a4, 5, 0x8f8, 0, NO_PAD_CTRL) | ||
610 | #define MX35_PAD_CTS2__AUDMUX_AUD5_RXFS IOMUX_PAD(0x5e8, 0x1a4, 6, 0x0, 0, NO_PAD_CTRL) | ||
611 | #define MX35_PAD_CTS2__UART3_TXD_MUX IOMUX_PAD(0x5e8, 0x1a4, 7, 0x0, 0, NO_PAD_CTRL) | ||
612 | |||
613 | #define MX35_PAD_RTCK__ARM11P_TOP_RTCK IOMUX_PAD(0x5ec, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
614 | |||
615 | #define MX35_PAD_TCK__SJC_TCK IOMUX_PAD(0x5f0, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
616 | |||
617 | #define MX35_PAD_TMS__SJC_TMS IOMUX_PAD(0x5f4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
618 | |||
619 | #define MX35_PAD_TDI__SJC_TDI IOMUX_PAD(0x5f8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
620 | |||
621 | #define MX35_PAD_TDO__SJC_TDO IOMUX_PAD(0x5fc, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
622 | |||
623 | #define MX35_PAD_TRSTB__SJC_TRSTB IOMUX_PAD(0x600, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
624 | |||
625 | #define MX35_PAD_DE_B__SJC_DE_B IOMUX_PAD(0x604, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
626 | |||
627 | #define MX35_PAD_SJC_MOD__SJC_MOD IOMUX_PAD(0x608, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
628 | |||
629 | #define MX35_PAD_USBOTG_PWR__USB_TOP_USBOTG_PWR IOMUX_PAD(0x60c, 0x1a8, 0, 0x0, 0, NO_PAD_CTRL) | ||
630 | #define MX35_PAD_USBOTG_PWR__USB_TOP_USBH2_PWR IOMUX_PAD(0x60c, 0x1a8, 1, 0x0, 0, NO_PAD_CTRL) | ||
631 | #define MX35_PAD_USBOTG_PWR__GPIO3_14 IOMUX_PAD(0x60c, 0x1a8, 5, 0x8fc, 0, NO_PAD_CTRL) | ||
632 | |||
633 | #define MX35_PAD_USBOTG_OC__USB_TOP_USBOTG_OC IOMUX_PAD(0x610, 0x1ac, 0, 0x0, 0, NO_PAD_CTRL) | ||
634 | #define MX35_PAD_USBOTG_OC__USB_TOP_USBH2_OC IOMUX_PAD(0x610, 0x1ac, 1, 0x9f4, 1, NO_PAD_CTRL) | ||
635 | #define MX35_PAD_USBOTG_OC__GPIO3_15 IOMUX_PAD(0x610, 0x1ac, 5, 0x900, 0, NO_PAD_CTRL) | ||
636 | |||
637 | #define MX35_PAD_LD0__IPU_DISPB_DAT_0 IOMUX_PAD(0x614, 0x1b0, 0, 0x0, 0, NO_PAD_CTRL) | ||
638 | #define MX35_PAD_LD0__GPIO2_0 IOMUX_PAD(0x614, 0x1b0, 5, 0x868, 1, NO_PAD_CTRL) | ||
639 | #define MX35_PAD_LD0__SDMA_SDMA_DEBUG_PC_0 IOMUX_PAD(0x614, 0x1b0, 6, 0x0, 0, NO_PAD_CTRL) | ||
640 | |||
641 | #define MX35_PAD_LD1__IPU_DISPB_DAT_1 IOMUX_PAD(0x618, 0x1b4, 0, 0x0, 0, NO_PAD_CTRL) | ||
642 | #define MX35_PAD_LD1__GPIO2_1 IOMUX_PAD(0x618, 0x1b4, 5, 0x894, 0, NO_PAD_CTRL) | ||
643 | #define MX35_PAD_LD1__SDMA_SDMA_DEBUG_PC_1 IOMUX_PAD(0x618, 0x1b4, 6, 0x0, 0, NO_PAD_CTRL) | ||
644 | |||
645 | #define MX35_PAD_LD2__IPU_DISPB_DAT_2 IOMUX_PAD(0x61c, 0x1b8, 0, 0x0, 0, NO_PAD_CTRL) | ||
646 | #define MX35_PAD_LD2__GPIO2_2 IOMUX_PAD(0x61c, 0x1b8, 5, 0x8c0, 0, NO_PAD_CTRL) | ||
647 | #define MX35_PAD_LD2__SDMA_SDMA_DEBUG_PC_2 IOMUX_PAD(0x61c, 0x1b8, 6, 0x0, 0, NO_PAD_CTRL) | ||
648 | |||
649 | #define MX35_PAD_LD3__IPU_DISPB_DAT_3 IOMUX_PAD(0x620, 0x1bc, 0, 0x0, 0, NO_PAD_CTRL) | ||
650 | #define MX35_PAD_LD3__GPIO2_3 IOMUX_PAD(0x620, 0x1bc, 5, 0x8cc, 0, NO_PAD_CTRL) | ||
651 | #define MX35_PAD_LD3__SDMA_SDMA_DEBUG_PC_3 IOMUX_PAD(0x620, 0x1bc, 6, 0x0, 0, NO_PAD_CTRL) | ||
652 | |||
653 | #define MX35_PAD_LD4__IPU_DISPB_DAT_4 IOMUX_PAD(0x624, 0x1c0, 0, 0x0, 0, NO_PAD_CTRL) | ||
654 | #define MX35_PAD_LD4__GPIO2_4 IOMUX_PAD(0x624, 0x1c0, 5, 0x8d0, 0, NO_PAD_CTRL) | ||
655 | #define MX35_PAD_LD4__SDMA_SDMA_DEBUG_PC_4 IOMUX_PAD(0x624, 0x1c0, 6, 0x0, 0, NO_PAD_CTRL) | ||
656 | |||
657 | #define MX35_PAD_LD5__IPU_DISPB_DAT_5 IOMUX_PAD(0x628, 0x1c4, 0, 0x0, 0, NO_PAD_CTRL) | ||
658 | #define MX35_PAD_LD5__GPIO2_5 IOMUX_PAD(0x628, 0x1c4, 5, 0x8d4, 0, NO_PAD_CTRL) | ||
659 | #define MX35_PAD_LD5__SDMA_SDMA_DEBUG_PC_5 IOMUX_PAD(0x628, 0x1c4, 6, 0x0, 0, NO_PAD_CTRL) | ||
660 | |||
661 | #define MX35_PAD_LD6__IPU_DISPB_DAT_6 IOMUX_PAD(0x62c, 0x1c8, 0, 0x0, 0, NO_PAD_CTRL) | ||
662 | #define MX35_PAD_LD6__GPIO2_6 IOMUX_PAD(0x62c, 0x1c8, 5, 0x8d8, 0, NO_PAD_CTRL) | ||
663 | #define MX35_PAD_LD6__SDMA_SDMA_DEBUG_PC_6 IOMUX_PAD(0x62c, 0x1c8, 6, 0x0, 0, NO_PAD_CTRL) | ||
664 | |||
665 | #define MX35_PAD_LD7__IPU_DISPB_DAT_7 IOMUX_PAD(0x630, 0x1cc, 0, 0x0, 0, NO_PAD_CTRL) | ||
666 | #define MX35_PAD_LD7__GPIO2_7 IOMUX_PAD(0x630, 0x1cc, 5, 0x8dc, 0, NO_PAD_CTRL) | ||
667 | #define MX35_PAD_LD7__SDMA_SDMA_DEBUG_PC_7 IOMUX_PAD(0x630, 0x1cc, 6, 0x0, 0, NO_PAD_CTRL) | ||
668 | |||
669 | #define MX35_PAD_LD8__IPU_DISPB_DAT_8 IOMUX_PAD(0x634, 0x1d0, 0, 0x0, 0, NO_PAD_CTRL) | ||
670 | #define MX35_PAD_LD8__GPIO2_8 IOMUX_PAD(0x634, 0x1d0, 5, 0x8e0, 0, NO_PAD_CTRL) | ||
671 | #define MX35_PAD_LD8__SDMA_SDMA_DEBUG_PC_8 IOMUX_PAD(0x634, 0x1d0, 6, 0x0, 0, NO_PAD_CTRL) | ||
672 | |||
673 | #define MX35_PAD_LD9__IPU_DISPB_DAT_9 IOMUX_PAD(0x638, 0x1d4, 0, 0x0, 0, NO_PAD_CTRL) | ||
674 | #define MX35_PAD_LD9__GPIO2_9 IOMUX_PAD(0x638, 0x1d4, 5, 0x8e4, 0, NO_PAD_CTRL) | ||
675 | #define MX35_PAD_LD9__SDMA_SDMA_DEBUG_PC_9 IOMUX_PAD(0x638, 0x1d4, 6, 0x0, 0, NO_PAD_CTRL) | ||
676 | |||
677 | #define MX35_PAD_LD10__IPU_DISPB_DAT_10 IOMUX_PAD(0x63c, 0x1d8, 0, 0x0, 0, NO_PAD_CTRL) | ||
678 | #define MX35_PAD_LD10__GPIO2_10 IOMUX_PAD(0x63c, 0x1d8, 5, 0x86c, 0, NO_PAD_CTRL) | ||
679 | #define MX35_PAD_LD10__SDMA_SDMA_DEBUG_PC_10 IOMUX_PAD(0x63c, 0x1d8, 6, 0x0, 0, NO_PAD_CTRL) | ||
680 | |||
681 | #define MX35_PAD_LD11__IPU_DISPB_DAT_11 IOMUX_PAD(0x640, 0x1dc, 0, 0x0, 0, NO_PAD_CTRL) | ||
682 | #define MX35_PAD_LD11__GPIO2_11 IOMUX_PAD(0x640, 0x1dc, 5, 0x870, 0, NO_PAD_CTRL) | ||
683 | #define MX35_PAD_LD11__SDMA_SDMA_DEBUG_PC_11 IOMUX_PAD(0x640, 0x1dc, 6, 0x0, 0, NO_PAD_CTRL) | ||
684 | #define MX35_PAD_LD11__ARM11P_TOP_TRACE_4 IOMUX_PAD(0x640, 0x1dc, 7, 0x0, 0, NO_PAD_CTRL) | ||
685 | |||
686 | #define MX35_PAD_LD12__IPU_DISPB_DAT_12 IOMUX_PAD(0x644, 0x1e0, 0, 0x0, 0, NO_PAD_CTRL) | ||
687 | #define MX35_PAD_LD12__GPIO2_12 IOMUX_PAD(0x644, 0x1e0, 5, 0x874, 0, NO_PAD_CTRL) | ||
688 | #define MX35_PAD_LD12__SDMA_SDMA_DEBUG_PC_12 IOMUX_PAD(0x644, 0x1e0, 6, 0x0, 0, NO_PAD_CTRL) | ||
689 | #define MX35_PAD_LD12__ARM11P_TOP_TRACE_5 IOMUX_PAD(0x644, 0x1e0, 7, 0x0, 0, NO_PAD_CTRL) | ||
690 | |||
691 | #define MX35_PAD_LD13__IPU_DISPB_DAT_13 IOMUX_PAD(0x648, 0x1e4, 0, 0x0, 0, NO_PAD_CTRL) | ||
692 | #define MX35_PAD_LD13__GPIO2_13 IOMUX_PAD(0x648, 0x1e4, 5, 0x878, 0, NO_PAD_CTRL) | ||
693 | #define MX35_PAD_LD13__SDMA_SDMA_DEBUG_PC_13 IOMUX_PAD(0x648, 0x1e4, 6, 0x0, 0, NO_PAD_CTRL) | ||
694 | #define MX35_PAD_LD13__ARM11P_TOP_TRACE_6 IOMUX_PAD(0x648, 0x1e4, 7, 0x0, 0, NO_PAD_CTRL) | ||
695 | |||
696 | #define MX35_PAD_LD14__IPU_DISPB_DAT_14 IOMUX_PAD(0x64c, 0x1e8, 0, 0x0, 0, NO_PAD_CTRL) | ||
697 | #define MX35_PAD_LD14__GPIO2_14 IOMUX_PAD(0x64c, 0x1e8, 5, 0x87c, 0, NO_PAD_CTRL) | ||
698 | #define MX35_PAD_LD14__SDMA_SDMA_DEBUG_EVENT_CHANNEL_0 IOMUX_PAD(0x64c, 0x1e8, 6, 0x0, 0, NO_PAD_CTRL) | ||
699 | #define MX35_PAD_LD14__ARM11P_TOP_TRACE_7 IOMUX_PAD(0x64c, 0x1e8, 7, 0x0, 0, NO_PAD_CTRL) | ||
700 | |||
701 | #define MX35_PAD_LD15__IPU_DISPB_DAT_15 IOMUX_PAD(0x650, 0x1ec, 0, 0x0, 0, NO_PAD_CTRL) | ||
702 | #define MX35_PAD_LD15__GPIO2_15 IOMUX_PAD(0x650, 0x1ec, 5, 0x880, 0, NO_PAD_CTRL) | ||
703 | #define MX35_PAD_LD15__SDMA_SDMA_DEBUG_EVENT_CHANNEL_1 IOMUX_PAD(0x650, 0x1ec, 6, 0x0, 0, NO_PAD_CTRL) | ||
704 | #define MX35_PAD_LD15__ARM11P_TOP_TRACE_8 IOMUX_PAD(0x650, 0x1ec, 7, 0x0, 0, NO_PAD_CTRL) | ||
705 | |||
706 | #define MX35_PAD_LD16__IPU_DISPB_DAT_16 IOMUX_PAD(0x654, 0x1f0, 0, 0x0, 0, NO_PAD_CTRL) | ||
707 | #define MX35_PAD_LD16__IPU_DISPB_D12_VSYNC IOMUX_PAD(0x654, 0x1f0, 2, 0x928, 0, NO_PAD_CTRL) | ||
708 | #define MX35_PAD_LD16__GPIO2_16 IOMUX_PAD(0x654, 0x1f0, 5, 0x884, 0, NO_PAD_CTRL) | ||
709 | #define MX35_PAD_LD16__SDMA_SDMA_DEBUG_EVENT_CHANNEL_2 IOMUX_PAD(0x654, 0x1f0, 6, 0x0, 0, NO_PAD_CTRL) | ||
710 | #define MX35_PAD_LD16__ARM11P_TOP_TRACE_9 IOMUX_PAD(0x654, 0x1f0, 7, 0x0, 0, NO_PAD_CTRL) | ||
711 | |||
712 | #define MX35_PAD_LD17__IPU_DISPB_DAT_17 IOMUX_PAD(0x658, 0x1f4, 0, 0x0, 0, NO_PAD_CTRL) | ||
713 | #define MX35_PAD_LD17__IPU_DISPB_CS2 IOMUX_PAD(0x658, 0x1f4, 2, 0x0, 0, NO_PAD_CTRL) | ||
714 | #define MX35_PAD_LD17__GPIO2_17 IOMUX_PAD(0x658, 0x1f4, 5, 0x888, 0, NO_PAD_CTRL) | ||
715 | #define MX35_PAD_LD17__SDMA_SDMA_DEBUG_EVENT_CHANNEL_3 IOMUX_PAD(0x658, 0x1f4, 6, 0x0, 0, NO_PAD_CTRL) | ||
716 | #define MX35_PAD_LD17__ARM11P_TOP_TRACE_10 IOMUX_PAD(0x658, 0x1f4, 7, 0x0, 0, NO_PAD_CTRL) | ||
717 | |||
718 | #define MX35_PAD_LD18__IPU_DISPB_DAT_18 IOMUX_PAD(0x65c, 0x1f8, 0, 0x0, 0, NO_PAD_CTRL) | ||
719 | #define MX35_PAD_LD18__IPU_DISPB_D0_VSYNC IOMUX_PAD(0x65c, 0x1f8, 1, 0x924, 1, NO_PAD_CTRL) | ||
720 | #define MX35_PAD_LD18__IPU_DISPB_D12_VSYNC IOMUX_PAD(0x65c, 0x1f8, 2, 0x928, 1, NO_PAD_CTRL) | ||
721 | #define MX35_PAD_LD18__ESDHC3_CMD IOMUX_PAD(0x65c, 0x1f8, 3, 0x818, 0, NO_PAD_CTRL) | ||
722 | #define MX35_PAD_LD18__USB_TOP_USBOTG_DATA_3 IOMUX_PAD(0x65c, 0x1f8, 4, 0x9b0, 0, NO_PAD_CTRL) | ||
723 | #define MX35_PAD_LD18__GPIO3_24 IOMUX_PAD(0x65c, 0x1f8, 5, 0x0, 0, NO_PAD_CTRL) | ||
724 | #define MX35_PAD_LD18__SDMA_SDMA_DEBUG_EVENT_CHANNEL_4 IOMUX_PAD(0x65c, 0x1f8, 6, 0x0, 0, NO_PAD_CTRL) | ||
725 | #define MX35_PAD_LD18__ARM11P_TOP_TRACE_11 IOMUX_PAD(0x65c, 0x1f8, 7, 0x0, 0, NO_PAD_CTRL) | ||
726 | |||
727 | #define MX35_PAD_LD19__IPU_DISPB_DAT_19 IOMUX_PAD(0x660, 0x1fc, 0, 0x0, 0, NO_PAD_CTRL) | ||
728 | #define MX35_PAD_LD19__IPU_DISPB_BCLK IOMUX_PAD(0x660, 0x1fc, 1, 0x0, 0, NO_PAD_CTRL) | ||
729 | #define MX35_PAD_LD19__IPU_DISPB_CS1 IOMUX_PAD(0x660, 0x1fc, 2, 0x0, 0, NO_PAD_CTRL) | ||
730 | #define MX35_PAD_LD19__ESDHC3_CLK IOMUX_PAD(0x660, 0x1fc, 3, 0x814, 0, NO_PAD_CTRL) | ||
731 | #define MX35_PAD_LD19__USB_TOP_USBOTG_DIR IOMUX_PAD(0x660, 0x1fc, 4, 0x9c4, 0, NO_PAD_CTRL) | ||
732 | #define MX35_PAD_LD19__GPIO3_25 IOMUX_PAD(0x660, 0x1fc, 5, 0x0, 0, NO_PAD_CTRL) | ||
733 | #define MX35_PAD_LD19__SDMA_SDMA_DEBUG_EVENT_CHANNEL_5 IOMUX_PAD(0x660, 0x1fc, 6, 0x0, 0, NO_PAD_CTRL) | ||
734 | #define MX35_PAD_LD19__ARM11P_TOP_TRACE_12 IOMUX_PAD(0x660, 0x1fc, 7, 0x0, 0, NO_PAD_CTRL) | ||
735 | |||
736 | #define MX35_PAD_LD20__IPU_DISPB_DAT_20 IOMUX_PAD(0x664, 0x200, 0, 0x0, 0, NO_PAD_CTRL) | ||
737 | #define MX35_PAD_LD20__IPU_DISPB_CS0 IOMUX_PAD(0x664, 0x200, 1, 0x0, 0, NO_PAD_CTRL) | ||
738 | #define MX35_PAD_LD20__IPU_DISPB_SD_CLK IOMUX_PAD(0x664, 0x200, 2, 0x0, 0, NO_PAD_CTRL) | ||
739 | #define MX35_PAD_LD20__ESDHC3_DAT0 IOMUX_PAD(0x664, 0x200, 3, 0x81c, 0, NO_PAD_CTRL) | ||
740 | #define MX35_PAD_LD20__GPIO3_26 IOMUX_PAD(0x664, 0x200, 5, 0x0, 0, NO_PAD_CTRL) | ||
741 | #define MX35_PAD_LD20__SDMA_SDMA_DEBUG_CORE_STATUS_3 IOMUX_PAD(0x664, 0x200, 6, 0x0, 0, NO_PAD_CTRL) | ||
742 | #define MX35_PAD_LD20__ARM11P_TOP_TRACE_13 IOMUX_PAD(0x664, 0x200, 7, 0x0, 0, NO_PAD_CTRL) | ||
743 | |||
744 | #define MX35_PAD_LD21__IPU_DISPB_DAT_21 IOMUX_PAD(0x668, 0x204, 0, 0x0, 0, NO_PAD_CTRL) | ||
745 | #define MX35_PAD_LD21__IPU_DISPB_PAR_RS IOMUX_PAD(0x668, 0x204, 1, 0x0, 0, NO_PAD_CTRL) | ||
746 | #define MX35_PAD_LD21__IPU_DISPB_SER_RS IOMUX_PAD(0x668, 0x204, 2, 0x0, 0, NO_PAD_CTRL) | ||
747 | #define MX35_PAD_LD21__ESDHC3_DAT1 IOMUX_PAD(0x668, 0x204, 3, 0x820, 0, NO_PAD_CTRL) | ||
748 | #define MX35_PAD_LD21__USB_TOP_USBOTG_STP IOMUX_PAD(0x668, 0x204, 4, 0x0, 0, NO_PAD_CTRL) | ||
749 | #define MX35_PAD_LD21__GPIO3_27 IOMUX_PAD(0x668, 0x204, 5, 0x0, 0, NO_PAD_CTRL) | ||
750 | #define MX35_PAD_LD21__SDMA_DEBUG_EVENT_CHANNEL_SEL IOMUX_PAD(0x668, 0x204, 6, 0x0, 0, NO_PAD_CTRL) | ||
751 | #define MX35_PAD_LD21__ARM11P_TOP_TRACE_14 IOMUX_PAD(0x668, 0x204, 7, 0x0, 0, NO_PAD_CTRL) | ||
752 | |||
753 | #define MX35_PAD_LD22__IPU_DISPB_DAT_22 IOMUX_PAD(0x66c, 0x208, 0, 0x0, 0, NO_PAD_CTRL) | ||
754 | #define MX35_PAD_LD22__IPU_DISPB_WR IOMUX_PAD(0x66c, 0x208, 1, 0x0, 0, NO_PAD_CTRL) | ||
755 | #define MX35_PAD_LD22__IPU_DISPB_SD_D_I IOMUX_PAD(0x66c, 0x208, 2, 0x92c, 0, NO_PAD_CTRL) | ||
756 | #define MX35_PAD_LD22__ESDHC3_DAT2 IOMUX_PAD(0x66c, 0x208, 3, 0x824, 0, NO_PAD_CTRL) | ||
757 | #define MX35_PAD_LD22__USB_TOP_USBOTG_NXT IOMUX_PAD(0x66c, 0x208, 4, 0x9c8, 0, NO_PAD_CTRL) | ||
758 | #define MX35_PAD_LD22__GPIO3_28 IOMUX_PAD(0x66c, 0x208, 5, 0x0, 0, NO_PAD_CTRL) | ||
759 | #define MX35_PAD_LD22__SDMA_DEBUG_BUS_ERROR IOMUX_PAD(0x66c, 0x208, 6, 0x0, 0, NO_PAD_CTRL) | ||
760 | #define MX35_PAD_LD22__ARM11P_TOP_TRCTL IOMUX_PAD(0x66c, 0x208, 7, 0x0, 0, NO_PAD_CTRL) | ||
761 | |||
762 | #define MX35_PAD_LD23__IPU_DISPB_DAT_23 IOMUX_PAD(0x670, 0x20c, 0, 0x0, 0, NO_PAD_CTRL) | ||
763 | #define MX35_PAD_LD23__IPU_DISPB_RD IOMUX_PAD(0x670, 0x20c, 1, 0x0, 0, NO_PAD_CTRL) | ||
764 | #define MX35_PAD_LD23__IPU_DISPB_SD_D_IO IOMUX_PAD(0x670, 0x20c, 2, 0x92c, 1, NO_PAD_CTRL) | ||
765 | #define MX35_PAD_LD23__ESDHC3_DAT3 IOMUX_PAD(0x670, 0x20c, 3, 0x828, 0, NO_PAD_CTRL) | ||
766 | #define MX35_PAD_LD23__USB_TOP_USBOTG_DATA_7 IOMUX_PAD(0x670, 0x20c, 4, 0x9c0, 0, NO_PAD_CTRL) | ||
767 | #define MX35_PAD_LD23__GPIO3_29 IOMUX_PAD(0x670, 0x20c, 5, 0x0, 0, NO_PAD_CTRL) | ||
768 | #define MX35_PAD_LD23__SDMA_DEBUG_MATCHED_DMBUS IOMUX_PAD(0x670, 0x20c, 6, 0x0, 0, NO_PAD_CTRL) | ||
769 | #define MX35_PAD_LD23__ARM11P_TOP_TRCLK IOMUX_PAD(0x670, 0x20c, 7, 0x0, 0, NO_PAD_CTRL) | ||
770 | |||
771 | #define MX35_PAD_D3_HSYNC__IPU_DISPB_D3_HSYNC IOMUX_PAD(0x674, 0x210, 0, 0x0, 0, NO_PAD_CTRL) | ||
772 | #define MX35_PAD_D3_HSYNC__IPU_DISPB_SD_D_IO IOMUX_PAD(0x674, 0x210, 2, 0x92c, 2, NO_PAD_CTRL) | ||
773 | #define MX35_PAD_D3_HSYNC__GPIO3_30 IOMUX_PAD(0x674, 0x210, 5, 0x0, 0, NO_PAD_CTRL) | ||
774 | #define MX35_PAD_D3_HSYNC__SDMA_DEBUG_RTBUFFER_WRITE IOMUX_PAD(0x674, 0x210, 6, 0x0, 0, NO_PAD_CTRL) | ||
775 | #define MX35_PAD_D3_HSYNC__ARM11P_TOP_TRACE_15 IOMUX_PAD(0x674, 0x210, 7, 0x0, 0, NO_PAD_CTRL) | ||
776 | |||
777 | #define MX35_PAD_D3_FPSHIFT__IPU_DISPB_D3_CLK IOMUX_PAD(0x678, 0x214, 0, 0x0, 0, NO_PAD_CTRL) | ||
778 | #define MX35_PAD_D3_FPSHIFT__IPU_DISPB_SD_CLK IOMUX_PAD(0x678, 0x214, 2, 0x0, 0, NO_PAD_CTRL) | ||
779 | #define MX35_PAD_D3_FPSHIFT__GPIO3_31 IOMUX_PAD(0x678, 0x214, 5, 0x0, 0, NO_PAD_CTRL) | ||
780 | #define MX35_PAD_D3_FPSHIFT__SDMA_SDMA_DEBUG_CORE_STATUS_0 IOMUX_PAD(0x678, 0x214, 6, 0x0, 0, NO_PAD_CTRL) | ||
781 | #define MX35_PAD_D3_FPSHIFT__ARM11P_TOP_TRACE_16 IOMUX_PAD(0x678, 0x214, 7, 0x0, 0, NO_PAD_CTRL) | ||
782 | |||
783 | #define MX35_PAD_D3_DRDY__IPU_DISPB_D3_DRDY IOMUX_PAD(0x67c, 0x218, 0, 0x0, 0, NO_PAD_CTRL) | ||
784 | #define MX35_PAD_D3_DRDY__IPU_DISPB_SD_D_O IOMUX_PAD(0x67c, 0x218, 2, 0x0, 0, NO_PAD_CTRL) | ||
785 | #define MX35_PAD_D3_DRDY__GPIO1_0 IOMUX_PAD(0x67c, 0x218, 5, 0x82c, 2, NO_PAD_CTRL) | ||
786 | #define MX35_PAD_D3_DRDY__SDMA_SDMA_DEBUG_CORE_STATUS_1 IOMUX_PAD(0x67c, 0x218, 6, 0x0, 0, NO_PAD_CTRL) | ||
787 | #define MX35_PAD_D3_DRDY__ARM11P_TOP_TRACE_17 IOMUX_PAD(0x67c, 0x218, 7, 0x0, 0, NO_PAD_CTRL) | ||
788 | |||
789 | #define MX35_PAD_CONTRAST__IPU_DISPB_CONTR IOMUX_PAD(0x680, 0x21c, 0, 0x0, 0, NO_PAD_CTRL) | ||
790 | #define MX35_PAD_CONTRAST__GPIO1_1 IOMUX_PAD(0x680, 0x21c, 5, 0x838, 2, NO_PAD_CTRL) | ||
791 | #define MX35_PAD_CONTRAST__SDMA_SDMA_DEBUG_CORE_STATUS_2 IOMUX_PAD(0x680, 0x21c, 6, 0x0, 0, NO_PAD_CTRL) | ||
792 | #define MX35_PAD_CONTRAST__ARM11P_TOP_TRACE_18 IOMUX_PAD(0x680, 0x21c, 7, 0x0, 0, NO_PAD_CTRL) | ||
793 | |||
794 | #define MX35_PAD_D3_VSYNC__IPU_DISPB_D3_VSYNC IOMUX_PAD(0x684, 0x220, 0, 0x0, 0, NO_PAD_CTRL) | ||
795 | #define MX35_PAD_D3_VSYNC__IPU_DISPB_CS1 IOMUX_PAD(0x684, 0x220, 2, 0x0, 0, NO_PAD_CTRL) | ||
796 | #define MX35_PAD_D3_VSYNC__GPIO1_2 IOMUX_PAD(0x684, 0x220, 5, 0x848, 1, NO_PAD_CTRL) | ||
797 | #define MX35_PAD_D3_VSYNC__SDMA_DEBUG_YIELD IOMUX_PAD(0x684, 0x220, 6, 0x0, 0, NO_PAD_CTRL) | ||
798 | #define MX35_PAD_D3_VSYNC__ARM11P_TOP_TRACE_19 IOMUX_PAD(0x684, 0x220, 7, 0x0, 0, NO_PAD_CTRL) | ||
799 | |||
800 | #define MX35_PAD_D3_REV__IPU_DISPB_D3_REV IOMUX_PAD(0x688, 0x224, 0, 0x0, 0, NO_PAD_CTRL) | ||
801 | #define MX35_PAD_D3_REV__IPU_DISPB_SER_RS IOMUX_PAD(0x688, 0x224, 2, 0x0, 0, NO_PAD_CTRL) | ||
802 | #define MX35_PAD_D3_REV__GPIO1_3 IOMUX_PAD(0x688, 0x224, 5, 0x84c, 1, NO_PAD_CTRL) | ||
803 | #define MX35_PAD_D3_REV__SDMA_DEBUG_BUS_RWB IOMUX_PAD(0x688, 0x224, 6, 0x0, 0, NO_PAD_CTRL) | ||
804 | #define MX35_PAD_D3_REV__ARM11P_TOP_TRACE_20 IOMUX_PAD(0x688, 0x224, 7, 0x0, 0, NO_PAD_CTRL) | ||
805 | |||
806 | #define MX35_PAD_D3_CLS__IPU_DISPB_D3_CLS IOMUX_PAD(0x68c, 0x228, 0, 0x0, 0, NO_PAD_CTRL) | ||
807 | #define MX35_PAD_D3_CLS__IPU_DISPB_CS2 IOMUX_PAD(0x68c, 0x228, 2, 0x0, 0, NO_PAD_CTRL) | ||
808 | #define MX35_PAD_D3_CLS__GPIO1_4 IOMUX_PAD(0x68c, 0x228, 5, 0x850, 2, NO_PAD_CTRL) | ||
809 | #define MX35_PAD_D3_CLS__SDMA_DEBUG_BUS_DEVICE_0 IOMUX_PAD(0x68c, 0x228, 6, 0x0, 0, NO_PAD_CTRL) | ||
810 | #define MX35_PAD_D3_CLS__ARM11P_TOP_TRACE_21 IOMUX_PAD(0x68c, 0x228, 7, 0x0, 0, NO_PAD_CTRL) | ||
811 | |||
812 | #define MX35_PAD_D3_SPL__IPU_DISPB_D3_SPL IOMUX_PAD(0x690, 0x22c, 0, 0x0, 0, NO_PAD_CTRL) | ||
813 | #define MX35_PAD_D3_SPL__IPU_DISPB_D12_VSYNC IOMUX_PAD(0x690, 0x22c, 2, 0x928, 2, NO_PAD_CTRL) | ||
814 | #define MX35_PAD_D3_SPL__GPIO1_5 IOMUX_PAD(0x690, 0x22c, 5, 0x854, 2, NO_PAD_CTRL) | ||
815 | #define MX35_PAD_D3_SPL__SDMA_DEBUG_BUS_DEVICE_1 IOMUX_PAD(0x690, 0x22c, 6, 0x0, 0, NO_PAD_CTRL) | ||
816 | #define MX35_PAD_D3_SPL__ARM11P_TOP_TRACE_22 IOMUX_PAD(0x690, 0x22c, 7, 0x0, 0, NO_PAD_CTRL) | ||
817 | |||
818 | #define MX35_PAD_SD1_CMD__ESDHC1_CMD IOMUX_PAD(0x694, 0x230, 0, 0x0, 0, NO_PAD_CTRL) | ||
819 | #define MX35_PAD_SD1_CMD__MSHC_SCLK IOMUX_PAD(0x694, 0x230, 1, 0x0, 0, NO_PAD_CTRL) | ||
820 | #define MX35_PAD_SD1_CMD__IPU_DISPB_D0_VSYNC IOMUX_PAD(0x694, 0x230, 3, 0x924, 2, NO_PAD_CTRL) | ||
821 | #define MX35_PAD_SD1_CMD__USB_TOP_USBOTG_DATA_4 IOMUX_PAD(0x694, 0x230, 4, 0x9b4, 0, NO_PAD_CTRL) | ||
822 | #define MX35_PAD_SD1_CMD__GPIO1_6 IOMUX_PAD(0x694, 0x230, 5, 0x858, 2, NO_PAD_CTRL) | ||
823 | #define MX35_PAD_SD1_CMD__ARM11P_TOP_TRCTL IOMUX_PAD(0x694, 0x230, 7, 0x0, 0, NO_PAD_CTRL) | ||
824 | |||
825 | #define MX35_PAD_SD1_CLK__ESDHC1_CLK IOMUX_PAD(0x698, 0x234, 0, 0x0, 0, NO_PAD_CTRL) | ||
826 | #define MX35_PAD_SD1_CLK__MSHC_BS IOMUX_PAD(0x698, 0x234, 1, 0x0, 0, NO_PAD_CTRL) | ||
827 | #define MX35_PAD_SD1_CLK__IPU_DISPB_BCLK IOMUX_PAD(0x698, 0x234, 3, 0x0, 0, NO_PAD_CTRL) | ||
828 | #define MX35_PAD_SD1_CLK__USB_TOP_USBOTG_DATA_5 IOMUX_PAD(0x698, 0x234, 4, 0x9b8, 0, NO_PAD_CTRL) | ||
829 | #define MX35_PAD_SD1_CLK__GPIO1_7 IOMUX_PAD(0x698, 0x234, 5, 0x85c, 2, NO_PAD_CTRL) | ||
830 | #define MX35_PAD_SD1_CLK__ARM11P_TOP_TRCLK IOMUX_PAD(0x698, 0x234, 7, 0x0, 0, NO_PAD_CTRL) | ||
831 | |||
832 | #define MX35_PAD_SD1_DATA0__ESDHC1_DAT0 IOMUX_PAD(0x69c, 0x238, 0, 0x0, 0, NO_PAD_CTRL) | ||
833 | #define MX35_PAD_SD1_DATA0__MSHC_DATA_0 IOMUX_PAD(0x69c, 0x238, 1, 0x0, 0, NO_PAD_CTRL) | ||
834 | #define MX35_PAD_SD1_DATA0__IPU_DISPB_CS0 IOMUX_PAD(0x69c, 0x238, 3, 0x0, 0, NO_PAD_CTRL) | ||
835 | #define MX35_PAD_SD1_DATA0__USB_TOP_USBOTG_DATA_6 IOMUX_PAD(0x69c, 0x238, 4, 0x9bc, 0, NO_PAD_CTRL) | ||
836 | #define MX35_PAD_SD1_DATA0__GPIO1_8 IOMUX_PAD(0x69c, 0x238, 5, 0x860, 2, NO_PAD_CTRL) | ||
837 | #define MX35_PAD_SD1_DATA0__ARM11P_TOP_TRACE_23 IOMUX_PAD(0x69c, 0x238, 7, 0x0, 0, NO_PAD_CTRL) | ||
838 | |||
839 | #define MX35_PAD_SD1_DATA1__ESDHC1_DAT1 IOMUX_PAD(0x6a0, 0x23c, 0, 0x0, 0, NO_PAD_CTRL) | ||
840 | #define MX35_PAD_SD1_DATA1__MSHC_DATA_1 IOMUX_PAD(0x6a0, 0x23c, 1, 0x0, 0, NO_PAD_CTRL) | ||
841 | #define MX35_PAD_SD1_DATA1__IPU_DISPB_PAR_RS IOMUX_PAD(0x6a0, 0x23c, 3, 0x0, 0, NO_PAD_CTRL) | ||
842 | #define MX35_PAD_SD1_DATA1__USB_TOP_USBOTG_DATA_0 IOMUX_PAD(0x6a0, 0x23c, 4, 0x9a4, 0, NO_PAD_CTRL) | ||
843 | #define MX35_PAD_SD1_DATA1__GPIO1_9 IOMUX_PAD(0x6a0, 0x23c, 5, 0x864, 1, NO_PAD_CTRL) | ||
844 | #define MX35_PAD_SD1_DATA1__ARM11P_TOP_TRACE_24 IOMUX_PAD(0x6a0, 0x23c, 7, 0x0, 0, NO_PAD_CTRL) | ||
845 | |||
846 | #define MX35_PAD_SD1_DATA2__ESDHC1_DAT2 IOMUX_PAD(0x6a4, 0x240, 0, 0x0, 0, NO_PAD_CTRL) | ||
847 | #define MX35_PAD_SD1_DATA2__MSHC_DATA_2 IOMUX_PAD(0x6a4, 0x240, 1, 0x0, 0, NO_PAD_CTRL) | ||
848 | #define MX35_PAD_SD1_DATA2__IPU_DISPB_WR IOMUX_PAD(0x6a4, 0x240, 3, 0x0, 0, NO_PAD_CTRL) | ||
849 | #define MX35_PAD_SD1_DATA2__USB_TOP_USBOTG_DATA_1 IOMUX_PAD(0x6a4, 0x240, 4, 0x9a8, 0, NO_PAD_CTRL) | ||
850 | #define MX35_PAD_SD1_DATA2__GPIO1_10 IOMUX_PAD(0x6a4, 0x240, 5, 0x830, 1, NO_PAD_CTRL) | ||
851 | #define MX35_PAD_SD1_DATA2__ARM11P_TOP_TRACE_25 IOMUX_PAD(0x6a4, 0x240, 7, 0x0, 0, NO_PAD_CTRL) | ||
852 | |||
853 | #define MX35_PAD_SD1_DATA3__ESDHC1_DAT3 IOMUX_PAD(0x6a8, 0x244, 0, 0x0, 0, NO_PAD_CTRL) | ||
854 | #define MX35_PAD_SD1_DATA3__MSHC_DATA_3 IOMUX_PAD(0x6a8, 0x244, 1, 0x0, 0, NO_PAD_CTRL) | ||
855 | #define MX35_PAD_SD1_DATA3__IPU_DISPB_RD IOMUX_PAD(0x6a8, 0x244, 3, 0x0, 0, NO_PAD_CTRL) | ||
856 | #define MX35_PAD_SD1_DATA3__USB_TOP_USBOTG_DATA_2 IOMUX_PAD(0x6a8, 0x244, 4, 0x9ac, 0, NO_PAD_CTRL) | ||
857 | #define MX35_PAD_SD1_DATA3__GPIO1_11 IOMUX_PAD(0x6a8, 0x244, 5, 0x834, 1, NO_PAD_CTRL) | ||
858 | #define MX35_PAD_SD1_DATA3__ARM11P_TOP_TRACE_26 IOMUX_PAD(0x6a8, 0x244, 7, 0x0, 0, NO_PAD_CTRL) | ||
859 | |||
860 | #define MX35_PAD_SD2_CMD__ESDHC2_CMD IOMUX_PAD(0x6ac, 0x248, 0, 0x0, 0, NO_PAD_CTRL) | ||
861 | #define MX35_PAD_SD2_CMD__I2C3_SCL IOMUX_PAD(0x6ac, 0x248, 1, 0x91c, 2, NO_PAD_CTRL) | ||
862 | #define MX35_PAD_SD2_CMD__ESDHC1_DAT4 IOMUX_PAD(0x6ac, 0x248, 2, 0x804, 0, NO_PAD_CTRL) | ||
863 | #define MX35_PAD_SD2_CMD__IPU_CSI_D_2 IOMUX_PAD(0x6ac, 0x248, 3, 0x938, 2, NO_PAD_CTRL) | ||
864 | #define MX35_PAD_SD2_CMD__USB_TOP_USBH2_DATA_4 IOMUX_PAD(0x6ac, 0x248, 4, 0x9dc, 0, NO_PAD_CTRL) | ||
865 | #define MX35_PAD_SD2_CMD__GPIO2_0 IOMUX_PAD(0x6ac, 0x248, 5, 0x868, 2, NO_PAD_CTRL) | ||
866 | #define MX35_PAD_SD2_CMD__SPDIF_SPDIF_OUT1 IOMUX_PAD(0x6ac, 0x248, 6, 0x0, 0, NO_PAD_CTRL) | ||
867 | #define MX35_PAD_SD2_CMD__IPU_DISPB_D12_VSYNC IOMUX_PAD(0x6ac, 0x248, 7, 0x928, 3, NO_PAD_CTRL) | ||
868 | |||
869 | #define MX35_PAD_SD2_CLK__ESDHC2_CLK IOMUX_PAD(0x6b0, 0x24c, 0, 0x0, 0, NO_PAD_CTRL) | ||
870 | #define MX35_PAD_SD2_CLK__I2C3_SDA IOMUX_PAD(0x6b0, 0x24c, 1, 0x920, 2, NO_PAD_CTRL) | ||
871 | #define MX35_PAD_SD2_CLK__ESDHC1_DAT5 IOMUX_PAD(0x6b0, 0x24c, 2, 0x808, 0, NO_PAD_CTRL) | ||
872 | #define MX35_PAD_SD2_CLK__IPU_CSI_D_3 IOMUX_PAD(0x6b0, 0x24c, 3, 0x93c, 2, NO_PAD_CTRL) | ||
873 | #define MX35_PAD_SD2_CLK__USB_TOP_USBH2_DATA_5 IOMUX_PAD(0x6b0, 0x24c, 4, 0x9e0, 0, NO_PAD_CTRL) | ||
874 | #define MX35_PAD_SD2_CLK__GPIO2_1 IOMUX_PAD(0x6b0, 0x24c, 5, 0x894, 1, NO_PAD_CTRL) | ||
875 | #define MX35_PAD_SD2_CLK__SPDIF_SPDIF_IN1 IOMUX_PAD(0x6b0, 0x24c, 6, 0x998, 2, NO_PAD_CTRL) | ||
876 | #define MX35_PAD_SD2_CLK__IPU_DISPB_CS2 IOMUX_PAD(0x6b0, 0x24c, 7, 0x0, 0, NO_PAD_CTRL) | ||
877 | |||
878 | #define MX35_PAD_SD2_DATA0__ESDHC2_DAT0 IOMUX_PAD(0x6b4, 0x250, 0, 0x0, 0, NO_PAD_CTRL) | ||
879 | #define MX35_PAD_SD2_DATA0__UART3_RXD_MUX IOMUX_PAD(0x6b4, 0x250, 1, 0x9a0, 1, NO_PAD_CTRL) | ||
880 | #define MX35_PAD_SD2_DATA0__ESDHC1_DAT6 IOMUX_PAD(0x6b4, 0x250, 2, 0x80c, 0, NO_PAD_CTRL) | ||
881 | #define MX35_PAD_SD2_DATA0__IPU_CSI_D_4 IOMUX_PAD(0x6b4, 0x250, 3, 0x940, 1, NO_PAD_CTRL) | ||
882 | #define MX35_PAD_SD2_DATA0__USB_TOP_USBH2_DATA_6 IOMUX_PAD(0x6b4, 0x250, 4, 0x9e4, 0, NO_PAD_CTRL) | ||
883 | #define MX35_PAD_SD2_DATA0__GPIO2_2 IOMUX_PAD(0x6b4, 0x250, 5, 0x8c0, 1, NO_PAD_CTRL) | ||
884 | #define MX35_PAD_SD2_DATA0__SPDIF_SPDIF_EXTCLK IOMUX_PAD(0x6b4, 0x250, 6, 0x994, 3, NO_PAD_CTRL) | ||
885 | |||
886 | #define MX35_PAD_SD2_DATA1__ESDHC2_DAT1 IOMUX_PAD(0x6b8, 0x254, 0, 0x0, 0, NO_PAD_CTRL) | ||
887 | #define MX35_PAD_SD2_DATA1__UART3_TXD_MUX IOMUX_PAD(0x6b8, 0x254, 1, 0x0, 0, NO_PAD_CTRL) | ||
888 | #define MX35_PAD_SD2_DATA1__ESDHC1_DAT7 IOMUX_PAD(0x6b8, 0x254, 2, 0x810, 0, NO_PAD_CTRL) | ||
889 | #define MX35_PAD_SD2_DATA1__IPU_CSI_D_5 IOMUX_PAD(0x6b8, 0x254, 3, 0x944, 1, NO_PAD_CTRL) | ||
890 | #define MX35_PAD_SD2_DATA1__USB_TOP_USBH2_DATA_0 IOMUX_PAD(0x6b8, 0x254, 4, 0x9cc, 0, NO_PAD_CTRL) | ||
891 | #define MX35_PAD_SD2_DATA1__GPIO2_3 IOMUX_PAD(0x6b8, 0x254, 5, 0x8cc, 1, NO_PAD_CTRL) | ||
892 | |||
893 | #define MX35_PAD_SD2_DATA2__ESDHC2_DAT2 IOMUX_PAD(0x6bc, 0x258, 0, 0x0, 0, NO_PAD_CTRL) | ||
894 | #define MX35_PAD_SD2_DATA2__UART3_RTS IOMUX_PAD(0x6bc, 0x258, 1, 0x99c, 0, NO_PAD_CTRL) | ||
895 | #define MX35_PAD_SD2_DATA2__CAN1_RXCAN IOMUX_PAD(0x6bc, 0x258, 2, 0x7c8, 1, NO_PAD_CTRL) | ||
896 | #define MX35_PAD_SD2_DATA2__IPU_CSI_D_6 IOMUX_PAD(0x6bc, 0x258, 3, 0x948, 1, NO_PAD_CTRL) | ||
897 | #define MX35_PAD_SD2_DATA2__USB_TOP_USBH2_DATA_1 IOMUX_PAD(0x6bc, 0x258, 4, 0x9d0, 0, NO_PAD_CTRL) | ||
898 | #define MX35_PAD_SD2_DATA2__GPIO2_4 IOMUX_PAD(0x6bc, 0x258, 5, 0x8d0, 1, NO_PAD_CTRL) | ||
899 | |||
900 | #define MX35_PAD_SD2_DATA3__ESDHC2_DAT3 IOMUX_PAD(0x6c0, 0x25c, 0, 0x0, 0, NO_PAD_CTRL) | ||
901 | #define MX35_PAD_SD2_DATA3__UART3_CTS IOMUX_PAD(0x6c0, 0x25c, 1, 0x0, 0, NO_PAD_CTRL) | ||
902 | #define MX35_PAD_SD2_DATA3__CAN1_TXCAN IOMUX_PAD(0x6c0, 0x25c, 2, 0x0, 0, NO_PAD_CTRL) | ||
903 | #define MX35_PAD_SD2_DATA3__IPU_CSI_D_7 IOMUX_PAD(0x6c0, 0x25c, 3, 0x94c, 1, NO_PAD_CTRL) | ||
904 | #define MX35_PAD_SD2_DATA3__USB_TOP_USBH2_DATA_2 IOMUX_PAD(0x6c0, 0x25c, 4, 0x9d4, 0, NO_PAD_CTRL) | ||
905 | #define MX35_PAD_SD2_DATA3__GPIO2_5 IOMUX_PAD(0x6c0, 0x25c, 5, 0x8d4, 1, NO_PAD_CTRL) | ||
906 | |||
907 | #define MX35_PAD_ATA_CS0__ATA_CS0 IOMUX_PAD(0x6c4, 0x260, 0, 0x0, 0, NO_PAD_CTRL) | ||
908 | #define MX35_PAD_ATA_CS0__CSPI1_SS3 IOMUX_PAD(0x6c4, 0x260, 1, 0x7dc, 1, NO_PAD_CTRL) | ||
909 | #define MX35_PAD_ATA_CS0__IPU_DISPB_CS1 IOMUX_PAD(0x6c4, 0x260, 3, 0x0, 0, NO_PAD_CTRL) | ||
910 | #define MX35_PAD_ATA_CS0__GPIO2_6 IOMUX_PAD(0x6c4, 0x260, 5, 0x8d8, 1, NO_PAD_CTRL) | ||
911 | #define MX35_PAD_ATA_CS0__IPU_DIAGB_0 IOMUX_PAD(0x6c4, 0x260, 6, 0x0, 0, NO_PAD_CTRL) | ||
912 | #define MX35_PAD_ATA_CS0__ARM11P_TOP_MAX1_HMASTER_0 IOMUX_PAD(0x6c4, 0x260, 7, 0x0, 0, NO_PAD_CTRL) | ||
913 | |||
914 | #define MX35_PAD_ATA_CS1__ATA_CS1 IOMUX_PAD(0x6c8, 0x264, 0, 0x0, 0, NO_PAD_CTRL) | ||
915 | #define MX35_PAD_ATA_CS1__IPU_DISPB_CS2 IOMUX_PAD(0x6c8, 0x264, 3, 0x0, 0, NO_PAD_CTRL) | ||
916 | #define MX35_PAD_ATA_CS1__CSPI2_SS0 IOMUX_PAD(0x6c8, 0x264, 4, 0x7f0, 1, NO_PAD_CTRL) | ||
917 | #define MX35_PAD_ATA_CS1__GPIO2_7 IOMUX_PAD(0x6c8, 0x264, 5, 0x8dc, 1, NO_PAD_CTRL) | ||
918 | #define MX35_PAD_ATA_CS1__IPU_DIAGB_1 IOMUX_PAD(0x6c8, 0x264, 6, 0x0, 0, NO_PAD_CTRL) | ||
919 | #define MX35_PAD_ATA_CS1__ARM11P_TOP_MAX1_HMASTER_1 IOMUX_PAD(0x6c8, 0x264, 7, 0x0, 0, NO_PAD_CTRL) | ||
920 | |||
921 | #define MX35_PAD_ATA_DIOR__ATA_DIOR IOMUX_PAD(0x6cc, 0x268, 0, 0x0, 0, NO_PAD_CTRL) | ||
922 | #define MX35_PAD_ATA_DIOR__ESDHC3_DAT0 IOMUX_PAD(0x6cc, 0x268, 1, 0x81c, 1, NO_PAD_CTRL) | ||
923 | #define MX35_PAD_ATA_DIOR__USB_TOP_USBOTG_DIR IOMUX_PAD(0x6cc, 0x268, 2, 0x9c4, 1, NO_PAD_CTRL) | ||
924 | #define MX35_PAD_ATA_DIOR__IPU_DISPB_BE0 IOMUX_PAD(0x6cc, 0x268, 3, 0x0, 0, NO_PAD_CTRL) | ||
925 | #define MX35_PAD_ATA_DIOR__CSPI2_SS1 IOMUX_PAD(0x6cc, 0x268, 4, 0x7f4, 1, NO_PAD_CTRL) | ||
926 | #define MX35_PAD_ATA_DIOR__GPIO2_8 IOMUX_PAD(0x6cc, 0x268, 5, 0x8e0, 1, NO_PAD_CTRL) | ||
927 | #define MX35_PAD_ATA_DIOR__IPU_DIAGB_2 IOMUX_PAD(0x6cc, 0x268, 6, 0x0, 0, NO_PAD_CTRL) | ||
928 | #define MX35_PAD_ATA_DIOR__ARM11P_TOP_MAX1_HMASTER_2 IOMUX_PAD(0x6cc, 0x268, 7, 0x0, 0, NO_PAD_CTRL) | ||
929 | |||
930 | #define MX35_PAD_ATA_DIOW__ATA_DIOW IOMUX_PAD(0x6d0, 0x26c, 0, 0x0, 0, NO_PAD_CTRL) | ||
931 | #define MX35_PAD_ATA_DIOW__ESDHC3_DAT1 IOMUX_PAD(0x6d0, 0x26c, 1, 0x820, 1, NO_PAD_CTRL) | ||
932 | #define MX35_PAD_ATA_DIOW__USB_TOP_USBOTG_STP IOMUX_PAD(0x6d0, 0x26c, 2, 0x0, 0, NO_PAD_CTRL) | ||
933 | #define MX35_PAD_ATA_DIOW__IPU_DISPB_BE1 IOMUX_PAD(0x6d0, 0x26c, 3, 0x0, 0, NO_PAD_CTRL) | ||
934 | #define MX35_PAD_ATA_DIOW__CSPI2_MOSI IOMUX_PAD(0x6d0, 0x26c, 4, 0x7ec, 2, NO_PAD_CTRL) | ||
935 | #define MX35_PAD_ATA_DIOW__GPIO2_9 IOMUX_PAD(0x6d0, 0x26c, 5, 0x8e4, 1, NO_PAD_CTRL) | ||
936 | #define MX35_PAD_ATA_DIOW__IPU_DIAGB_3 IOMUX_PAD(0x6d0, 0x26c, 6, 0x0, 0, NO_PAD_CTRL) | ||
937 | #define MX35_PAD_ATA_DIOW__ARM11P_TOP_MAX1_HMASTER_3 IOMUX_PAD(0x6d0, 0x26c, 7, 0x0, 0, NO_PAD_CTRL) | ||
938 | |||
939 | #define MX35_PAD_ATA_DMACK__ATA_DMACK IOMUX_PAD(0x6d4, 0x270, 0, 0x0, 0, NO_PAD_CTRL) | ||
940 | #define MX35_PAD_ATA_DMACK__ESDHC3_DAT2 IOMUX_PAD(0x6d4, 0x270, 1, 0x824, 1, NO_PAD_CTRL) | ||
941 | #define MX35_PAD_ATA_DMACK__USB_TOP_USBOTG_NXT IOMUX_PAD(0x6d4, 0x270, 2, 0x9c8, 1, NO_PAD_CTRL) | ||
942 | #define MX35_PAD_ATA_DMACK__CSPI2_MISO IOMUX_PAD(0x6d4, 0x270, 4, 0x7e8, 2, NO_PAD_CTRL) | ||
943 | #define MX35_PAD_ATA_DMACK__GPIO2_10 IOMUX_PAD(0x6d4, 0x270, 5, 0x86c, 1, NO_PAD_CTRL) | ||
944 | #define MX35_PAD_ATA_DMACK__IPU_DIAGB_4 IOMUX_PAD(0x6d4, 0x270, 6, 0x0, 0, NO_PAD_CTRL) | ||
945 | #define MX35_PAD_ATA_DMACK__ARM11P_TOP_MAX0_HMASTER_0 IOMUX_PAD(0x6d4, 0x270, 7, 0x0, 0, NO_PAD_CTRL) | ||
946 | |||
947 | #define MX35_PAD_ATA_RESET_B__ATA_RESET_B IOMUX_PAD(0x6d8, 0x274, 0, 0x0, 0, NO_PAD_CTRL) | ||
948 | #define MX35_PAD_ATA_RESET_B__ESDHC3_DAT3 IOMUX_PAD(0x6d8, 0x274, 1, 0x828, 1, NO_PAD_CTRL) | ||
949 | #define MX35_PAD_ATA_RESET_B__USB_TOP_USBOTG_DATA_0 IOMUX_PAD(0x6d8, 0x274, 2, 0x9a4, 1, NO_PAD_CTRL) | ||
950 | #define MX35_PAD_ATA_RESET_B__IPU_DISPB_SD_D_O IOMUX_PAD(0x6d8, 0x274, 3, 0x0, 0, NO_PAD_CTRL) | ||
951 | #define MX35_PAD_ATA_RESET_B__CSPI2_RDY IOMUX_PAD(0x6d8, 0x274, 4, 0x7e4, 2, NO_PAD_CTRL) | ||
952 | #define MX35_PAD_ATA_RESET_B__GPIO2_11 IOMUX_PAD(0x6d8, 0x274, 5, 0x870, 1, NO_PAD_CTRL) | ||
953 | #define MX35_PAD_ATA_RESET_B__IPU_DIAGB_5 IOMUX_PAD(0x6d8, 0x274, 6, 0x0, 0, NO_PAD_CTRL) | ||
954 | #define MX35_PAD_ATA_RESET_B__ARM11P_TOP_MAX0_HMASTER_1 IOMUX_PAD(0x6d8, 0x274, 7, 0x0, 0, NO_PAD_CTRL) | ||
955 | |||
956 | #define MX35_PAD_ATA_IORDY__ATA_IORDY IOMUX_PAD(0x6dc, 0x278, 0, 0x0, 0, NO_PAD_CTRL) | ||
957 | #define MX35_PAD_ATA_IORDY__ESDHC3_DAT4 IOMUX_PAD(0x6dc, 0x278, 1, 0x0, 0, NO_PAD_CTRL) | ||
958 | #define MX35_PAD_ATA_IORDY__USB_TOP_USBOTG_DATA_1 IOMUX_PAD(0x6dc, 0x278, 2, 0x9a8, 1, NO_PAD_CTRL) | ||
959 | #define MX35_PAD_ATA_IORDY__IPU_DISPB_SD_D_IO IOMUX_PAD(0x6dc, 0x278, 3, 0x92c, 3, NO_PAD_CTRL) | ||
960 | #define MX35_PAD_ATA_IORDY__ESDHC2_DAT4 IOMUX_PAD(0x6dc, 0x278, 4, 0x0, 0, NO_PAD_CTRL) | ||
961 | #define MX35_PAD_ATA_IORDY__GPIO2_12 IOMUX_PAD(0x6dc, 0x278, 5, 0x874, 1, NO_PAD_CTRL) | ||
962 | #define MX35_PAD_ATA_IORDY__IPU_DIAGB_6 IOMUX_PAD(0x6dc, 0x278, 6, 0x0, 0, NO_PAD_CTRL) | ||
963 | #define MX35_PAD_ATA_IORDY__ARM11P_TOP_MAX0_HMASTER_2 IOMUX_PAD(0x6dc, 0x278, 7, 0x0, 0, NO_PAD_CTRL) | ||
964 | |||
965 | #define MX35_PAD_ATA_DATA0__ATA_DATA_0 IOMUX_PAD(0x6e0, 0x27c, 0, 0x0, 0, NO_PAD_CTRL) | ||
966 | #define MX35_PAD_ATA_DATA0__ESDHC3_DAT5 IOMUX_PAD(0x6e0, 0x27c, 1, 0x0, 0, NO_PAD_CTRL) | ||
967 | #define MX35_PAD_ATA_DATA0__USB_TOP_USBOTG_DATA_2 IOMUX_PAD(0x6e0, 0x27c, 2, 0x9ac, 1, NO_PAD_CTRL) | ||
968 | #define MX35_PAD_ATA_DATA0__IPU_DISPB_D12_VSYNC IOMUX_PAD(0x6e0, 0x27c, 3, 0x928, 4, NO_PAD_CTRL) | ||
969 | #define MX35_PAD_ATA_DATA0__ESDHC2_DAT5 IOMUX_PAD(0x6e0, 0x27c, 4, 0x0, 0, NO_PAD_CTRL) | ||
970 | #define MX35_PAD_ATA_DATA0__GPIO2_13 IOMUX_PAD(0x6e0, 0x27c, 5, 0x878, 1, NO_PAD_CTRL) | ||
971 | #define MX35_PAD_ATA_DATA0__IPU_DIAGB_7 IOMUX_PAD(0x6e0, 0x27c, 6, 0x0, 0, NO_PAD_CTRL) | ||
972 | #define MX35_PAD_ATA_DATA0__ARM11P_TOP_MAX0_HMASTER_3 IOMUX_PAD(0x6e0, 0x27c, 7, 0x0, 0, NO_PAD_CTRL) | ||
973 | |||
974 | #define MX35_PAD_ATA_DATA1__ATA_DATA_1 IOMUX_PAD(0x6e4, 0x280, 0, 0x0, 0, NO_PAD_CTRL) | ||
975 | #define MX35_PAD_ATA_DATA1__ESDHC3_DAT6 IOMUX_PAD(0x6e4, 0x280, 1, 0x0, 0, NO_PAD_CTRL) | ||
976 | #define MX35_PAD_ATA_DATA1__USB_TOP_USBOTG_DATA_3 IOMUX_PAD(0x6e4, 0x280, 2, 0x9b0, 1, NO_PAD_CTRL) | ||
977 | #define MX35_PAD_ATA_DATA1__IPU_DISPB_SD_CLK IOMUX_PAD(0x6e4, 0x280, 3, 0x0, 0, NO_PAD_CTRL) | ||
978 | #define MX35_PAD_ATA_DATA1__ESDHC2_DAT6 IOMUX_PAD(0x6e4, 0x280, 4, 0x0, 0, NO_PAD_CTRL) | ||
979 | #define MX35_PAD_ATA_DATA1__GPIO2_14 IOMUX_PAD(0x6e4, 0x280, 5, 0x87c, 1, NO_PAD_CTRL) | ||
980 | #define MX35_PAD_ATA_DATA1__IPU_DIAGB_8 IOMUX_PAD(0x6e4, 0x280, 6, 0x0, 0, NO_PAD_CTRL) | ||
981 | #define MX35_PAD_ATA_DATA1__ARM11P_TOP_TRACE_27 IOMUX_PAD(0x6e4, 0x280, 7, 0x0, 0, NO_PAD_CTRL) | ||
982 | |||
983 | #define MX35_PAD_ATA_DATA2__ATA_DATA_2 IOMUX_PAD(0x6e8, 0x284, 0, 0x0, 0, NO_PAD_CTRL) | ||
984 | #define MX35_PAD_ATA_DATA2__ESDHC3_DAT7 IOMUX_PAD(0x6e8, 0x284, 1, 0x0, 0, NO_PAD_CTRL) | ||
985 | #define MX35_PAD_ATA_DATA2__USB_TOP_USBOTG_DATA_4 IOMUX_PAD(0x6e8, 0x284, 2, 0x9b4, 1, NO_PAD_CTRL) | ||
986 | #define MX35_PAD_ATA_DATA2__IPU_DISPB_SER_RS IOMUX_PAD(0x6e8, 0x284, 3, 0x0, 0, NO_PAD_CTRL) | ||
987 | #define MX35_PAD_ATA_DATA2__ESDHC2_DAT7 IOMUX_PAD(0x6e8, 0x284, 4, 0x0, 0, NO_PAD_CTRL) | ||
988 | #define MX35_PAD_ATA_DATA2__GPIO2_15 IOMUX_PAD(0x6e8, 0x284, 5, 0x880, 1, NO_PAD_CTRL) | ||
989 | #define MX35_PAD_ATA_DATA2__IPU_DIAGB_9 IOMUX_PAD(0x6e8, 0x284, 6, 0x0, 0, NO_PAD_CTRL) | ||
990 | #define MX35_PAD_ATA_DATA2__ARM11P_TOP_TRACE_28 IOMUX_PAD(0x6e8, 0x284, 7, 0x0, 0, NO_PAD_CTRL) | ||
991 | |||
992 | #define MX35_PAD_ATA_DATA3__ATA_DATA_3 IOMUX_PAD(0x6ec, 0x288, 0, 0x0, 0, NO_PAD_CTRL) | ||
993 | #define MX35_PAD_ATA_DATA3__ESDHC3_CLK IOMUX_PAD(0x6ec, 0x288, 1, 0x814, 1, NO_PAD_CTRL) | ||
994 | #define MX35_PAD_ATA_DATA3__USB_TOP_USBOTG_DATA_5 IOMUX_PAD(0x6ec, 0x288, 2, 0x9b8, 1, NO_PAD_CTRL) | ||
995 | #define MX35_PAD_ATA_DATA3__CSPI2_SCLK IOMUX_PAD(0x6ec, 0x288, 4, 0x7e0, 2, NO_PAD_CTRL) | ||
996 | #define MX35_PAD_ATA_DATA3__GPIO2_16 IOMUX_PAD(0x6ec, 0x288, 5, 0x884, 1, NO_PAD_CTRL) | ||
997 | #define MX35_PAD_ATA_DATA3__IPU_DIAGB_10 IOMUX_PAD(0x6ec, 0x288, 6, 0x0, 0, NO_PAD_CTRL) | ||
998 | #define MX35_PAD_ATA_DATA3__ARM11P_TOP_TRACE_29 IOMUX_PAD(0x6ec, 0x288, 7, 0x0, 0, NO_PAD_CTRL) | ||
999 | |||
1000 | #define MX35_PAD_ATA_DATA4__ATA_DATA_4 IOMUX_PAD(0x6f0, 0x28c, 0, 0x0, 0, NO_PAD_CTRL) | ||
1001 | #define MX35_PAD_ATA_DATA4__ESDHC3_CMD IOMUX_PAD(0x6f0, 0x28c, 1, 0x818, 1, NO_PAD_CTRL) | ||
1002 | #define MX35_PAD_ATA_DATA4__USB_TOP_USBOTG_DATA_6 IOMUX_PAD(0x6f0, 0x28c, 2, 0x9bc, 1, NO_PAD_CTRL) | ||
1003 | #define MX35_PAD_ATA_DATA4__GPIO2_17 IOMUX_PAD(0x6f0, 0x28c, 5, 0x888, 1, NO_PAD_CTRL) | ||
1004 | #define MX35_PAD_ATA_DATA4__IPU_DIAGB_11 IOMUX_PAD(0x6f0, 0x28c, 6, 0x0, 0, NO_PAD_CTRL) | ||
1005 | #define MX35_PAD_ATA_DATA4__ARM11P_TOP_TRACE_30 IOMUX_PAD(0x6f0, 0x28c, 7, 0x0, 0, NO_PAD_CTRL) | ||
1006 | |||
1007 | #define MX35_PAD_ATA_DATA5__ATA_DATA_5 IOMUX_PAD(0x6f4, 0x290, 0, 0x0, 0, NO_PAD_CTRL) | ||
1008 | #define MX35_PAD_ATA_DATA5__USB_TOP_USBOTG_DATA_7 IOMUX_PAD(0x6f4, 0x290, 2, 0x9c0, 1, NO_PAD_CTRL) | ||
1009 | #define MX35_PAD_ATA_DATA5__GPIO2_18 IOMUX_PAD(0x6f4, 0x290, 5, 0x88c, 1, NO_PAD_CTRL) | ||
1010 | #define MX35_PAD_ATA_DATA5__IPU_DIAGB_12 IOMUX_PAD(0x6f4, 0x290, 6, 0x0, 0, NO_PAD_CTRL) | ||
1011 | #define MX35_PAD_ATA_DATA5__ARM11P_TOP_TRACE_31 IOMUX_PAD(0x6f4, 0x290, 7, 0x0, 0, NO_PAD_CTRL) | ||
1012 | |||
1013 | #define MX35_PAD_ATA_DATA6__ATA_DATA_6 IOMUX_PAD(0x6f8, 0x294, 0, 0x0, 0, NO_PAD_CTRL) | ||
1014 | #define MX35_PAD_ATA_DATA6__CAN1_TXCAN IOMUX_PAD(0x6f8, 0x294, 1, 0x0, 0, NO_PAD_CTRL) | ||
1015 | #define MX35_PAD_ATA_DATA6__UART1_DTR IOMUX_PAD(0x6f8, 0x294, 2, 0x0, 0, NO_PAD_CTRL) | ||
1016 | #define MX35_PAD_ATA_DATA6__AUDMUX_AUD6_TXD IOMUX_PAD(0x6f8, 0x294, 3, 0x7b4, 0, NO_PAD_CTRL) | ||
1017 | #define MX35_PAD_ATA_DATA6__GPIO2_19 IOMUX_PAD(0x6f8, 0x294, 5, 0x890, 1, NO_PAD_CTRL) | ||
1018 | #define MX35_PAD_ATA_DATA6__IPU_DIAGB_13 IOMUX_PAD(0x6f8, 0x294, 6, 0x0, 0, NO_PAD_CTRL) | ||
1019 | |||
1020 | #define MX35_PAD_ATA_DATA7__ATA_DATA_7 IOMUX_PAD(0x6fc, 0x298, 0, 0x0, 0, NO_PAD_CTRL) | ||
1021 | #define MX35_PAD_ATA_DATA7__CAN1_RXCAN IOMUX_PAD(0x6fc, 0x298, 1, 0x7c8, 2, NO_PAD_CTRL) | ||
1022 | #define MX35_PAD_ATA_DATA7__UART1_DSR IOMUX_PAD(0x6fc, 0x298, 2, 0x0, 0, NO_PAD_CTRL) | ||
1023 | #define MX35_PAD_ATA_DATA7__AUDMUX_AUD6_RXD IOMUX_PAD(0x6fc, 0x298, 3, 0x7b0, 0, NO_PAD_CTRL) | ||
1024 | #define MX35_PAD_ATA_DATA7__GPIO2_20 IOMUX_PAD(0x6fc, 0x298, 5, 0x898, 1, NO_PAD_CTRL) | ||
1025 | #define MX35_PAD_ATA_DATA7__IPU_DIAGB_14 IOMUX_PAD(0x6fc, 0x298, 6, 0x0, 0, NO_PAD_CTRL) | ||
1026 | |||
1027 | #define MX35_PAD_ATA_DATA8__ATA_DATA_8 IOMUX_PAD(0x700, 0x29c, 0, 0x0, 0, NO_PAD_CTRL) | ||
1028 | #define MX35_PAD_ATA_DATA8__UART3_RTS IOMUX_PAD(0x700, 0x29c, 1, 0x99c, 1, NO_PAD_CTRL) | ||
1029 | #define MX35_PAD_ATA_DATA8__UART1_RI IOMUX_PAD(0x700, 0x29c, 2, 0x0, 0, NO_PAD_CTRL) | ||
1030 | #define MX35_PAD_ATA_DATA8__AUDMUX_AUD6_TXC IOMUX_PAD(0x700, 0x29c, 3, 0x7c0, 0, NO_PAD_CTRL) | ||
1031 | #define MX35_PAD_ATA_DATA8__GPIO2_21 IOMUX_PAD(0x700, 0x29c, 5, 0x89c, 1, NO_PAD_CTRL) | ||
1032 | #define MX35_PAD_ATA_DATA8__IPU_DIAGB_15 IOMUX_PAD(0x700, 0x29c, 6, 0x0, 0, NO_PAD_CTRL) | ||
1033 | |||
1034 | #define MX35_PAD_ATA_DATA9__ATA_DATA_9 IOMUX_PAD(0x704, 0x2a0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1035 | #define MX35_PAD_ATA_DATA9__UART3_CTS IOMUX_PAD(0x704, 0x2a0, 1, 0x0, 0, NO_PAD_CTRL) | ||
1036 | #define MX35_PAD_ATA_DATA9__UART1_DCD IOMUX_PAD(0x704, 0x2a0, 2, 0x0, 0, NO_PAD_CTRL) | ||
1037 | #define MX35_PAD_ATA_DATA9__AUDMUX_AUD6_TXFS IOMUX_PAD(0x704, 0x2a0, 3, 0x7c4, 0, NO_PAD_CTRL) | ||
1038 | #define MX35_PAD_ATA_DATA9__GPIO2_22 IOMUX_PAD(0x704, 0x2a0, 5, 0x8a0, 1, NO_PAD_CTRL) | ||
1039 | #define MX35_PAD_ATA_DATA9__IPU_DIAGB_16 IOMUX_PAD(0x704, 0x2a0, 6, 0x0, 0, NO_PAD_CTRL) | ||
1040 | |||
1041 | #define MX35_PAD_ATA_DATA10__ATA_DATA_10 IOMUX_PAD(0x708, 0x2a4, 0, 0x0, 0, NO_PAD_CTRL) | ||
1042 | #define MX35_PAD_ATA_DATA10__UART3_RXD_MUX IOMUX_PAD(0x708, 0x2a4, 1, 0x9a0, 2, NO_PAD_CTRL) | ||
1043 | #define MX35_PAD_ATA_DATA10__AUDMUX_AUD6_RXC IOMUX_PAD(0x708, 0x2a4, 3, 0x7b8, 0, NO_PAD_CTRL) | ||
1044 | #define MX35_PAD_ATA_DATA10__GPIO2_23 IOMUX_PAD(0x708, 0x2a4, 5, 0x8a4, 1, NO_PAD_CTRL) | ||
1045 | #define MX35_PAD_ATA_DATA10__IPU_DIAGB_17 IOMUX_PAD(0x708, 0x2a4, 6, 0x0, 0, NO_PAD_CTRL) | ||
1046 | |||
1047 | #define MX35_PAD_ATA_DATA11__ATA_DATA_11 IOMUX_PAD(0x70c, 0x2a8, 0, 0x0, 0, NO_PAD_CTRL) | ||
1048 | #define MX35_PAD_ATA_DATA11__UART3_TXD_MUX IOMUX_PAD(0x70c, 0x2a8, 1, 0x0, 0, NO_PAD_CTRL) | ||
1049 | #define MX35_PAD_ATA_DATA11__AUDMUX_AUD6_RXFS IOMUX_PAD(0x70c, 0x2a8, 3, 0x7bc, 0, NO_PAD_CTRL) | ||
1050 | #define MX35_PAD_ATA_DATA11__GPIO2_24 IOMUX_PAD(0x70c, 0x2a8, 5, 0x8a8, 1, NO_PAD_CTRL) | ||
1051 | #define MX35_PAD_ATA_DATA11__IPU_DIAGB_18 IOMUX_PAD(0x70c, 0x2a8, 6, 0x0, 0, NO_PAD_CTRL) | ||
1052 | |||
1053 | #define MX35_PAD_ATA_DATA12__ATA_DATA_12 IOMUX_PAD(0x710, 0x2ac, 0, 0x0, 0, NO_PAD_CTRL) | ||
1054 | #define MX35_PAD_ATA_DATA12__I2C3_SCL IOMUX_PAD(0x710, 0x2ac, 1, 0x91c, 3, NO_PAD_CTRL) | ||
1055 | #define MX35_PAD_ATA_DATA12__GPIO2_25 IOMUX_PAD(0x710, 0x2ac, 5, 0x8ac, 1, NO_PAD_CTRL) | ||
1056 | #define MX35_PAD_ATA_DATA12__IPU_DIAGB_19 IOMUX_PAD(0x710, 0x2ac, 6, 0x0, 0, NO_PAD_CTRL) | ||
1057 | |||
1058 | #define MX35_PAD_ATA_DATA13__ATA_DATA_13 IOMUX_PAD(0x714, 0x2b0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1059 | #define MX35_PAD_ATA_DATA13__I2C3_SDA IOMUX_PAD(0x714, 0x2b0, 1, 0x920, 3, NO_PAD_CTRL) | ||
1060 | #define MX35_PAD_ATA_DATA13__GPIO2_26 IOMUX_PAD(0x714, 0x2b0, 5, 0x8b0, 1, NO_PAD_CTRL) | ||
1061 | #define MX35_PAD_ATA_DATA13__IPU_DIAGB_20 IOMUX_PAD(0x714, 0x2b0, 6, 0x0, 0, NO_PAD_CTRL) | ||
1062 | |||
1063 | #define MX35_PAD_ATA_DATA14__ATA_DATA_14 IOMUX_PAD(0x718, 0x2b4, 0, 0x0, 0, NO_PAD_CTRL) | ||
1064 | #define MX35_PAD_ATA_DATA14__IPU_CSI_D_0 IOMUX_PAD(0x718, 0x2b4, 1, 0x930, 2, NO_PAD_CTRL) | ||
1065 | #define MX35_PAD_ATA_DATA14__KPP_ROW_0 IOMUX_PAD(0x718, 0x2b4, 3, 0x970, 2, NO_PAD_CTRL) | ||
1066 | #define MX35_PAD_ATA_DATA14__GPIO2_27 IOMUX_PAD(0x718, 0x2b4, 5, 0x8b4, 1, NO_PAD_CTRL) | ||
1067 | #define MX35_PAD_ATA_DATA14__IPU_DIAGB_21 IOMUX_PAD(0x718, 0x2b4, 6, 0x0, 0, NO_PAD_CTRL) | ||
1068 | |||
1069 | #define MX35_PAD_ATA_DATA15__ATA_DATA_15 IOMUX_PAD(0x71c, 0x2b8, 0, 0x0, 0, NO_PAD_CTRL) | ||
1070 | #define MX35_PAD_ATA_DATA15__IPU_CSI_D_1 IOMUX_PAD(0x71c, 0x2b8, 1, 0x934, 2, NO_PAD_CTRL) | ||
1071 | #define MX35_PAD_ATA_DATA15__KPP_ROW_1 IOMUX_PAD(0x71c, 0x2b8, 3, 0x974, 2, NO_PAD_CTRL) | ||
1072 | #define MX35_PAD_ATA_DATA15__GPIO2_28 IOMUX_PAD(0x71c, 0x2b8, 5, 0x8b8, 1, NO_PAD_CTRL) | ||
1073 | #define MX35_PAD_ATA_DATA15__IPU_DIAGB_22 IOMUX_PAD(0x71c, 0x2b8, 6, 0x0, 0, NO_PAD_CTRL) | ||
1074 | |||
1075 | #define MX35_PAD_ATA_INTRQ__ATA_INTRQ IOMUX_PAD(0x720, 0x2bc, 0, 0x0, 0, NO_PAD_CTRL) | ||
1076 | #define MX35_PAD_ATA_INTRQ__IPU_CSI_D_2 IOMUX_PAD(0x720, 0x2bc, 1, 0x938, 3, NO_PAD_CTRL) | ||
1077 | #define MX35_PAD_ATA_INTRQ__KPP_ROW_2 IOMUX_PAD(0x720, 0x2bc, 3, 0x978, 2, NO_PAD_CTRL) | ||
1078 | #define MX35_PAD_ATA_INTRQ__GPIO2_29 IOMUX_PAD(0x720, 0x2bc, 5, 0x8bc, 1, NO_PAD_CTRL) | ||
1079 | #define MX35_PAD_ATA_INTRQ__IPU_DIAGB_23 IOMUX_PAD(0x720, 0x2bc, 6, 0x0, 0, NO_PAD_CTRL) | ||
1080 | |||
1081 | #define MX35_PAD_ATA_BUFF_EN__ATA_BUFFER_EN IOMUX_PAD(0x724, 0x2c0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1082 | #define MX35_PAD_ATA_BUFF_EN__IPU_CSI_D_3 IOMUX_PAD(0x724, 0x2c0, 1, 0x93c, 3, NO_PAD_CTRL) | ||
1083 | #define MX35_PAD_ATA_BUFF_EN__KPP_ROW_3 IOMUX_PAD(0x724, 0x2c0, 3, 0x97c, 2, NO_PAD_CTRL) | ||
1084 | #define MX35_PAD_ATA_BUFF_EN__GPIO2_30 IOMUX_PAD(0x724, 0x2c0, 5, 0x8c4, 1, NO_PAD_CTRL) | ||
1085 | #define MX35_PAD_ATA_BUFF_EN__IPU_DIAGB_24 IOMUX_PAD(0x724, 0x2c0, 6, 0x0, 0, NO_PAD_CTRL) | ||
1086 | |||
1087 | #define MX35_PAD_ATA_DMARQ__ATA_DMARQ IOMUX_PAD(0x728, 0x2c4, 0, 0x0, 0, NO_PAD_CTRL) | ||
1088 | #define MX35_PAD_ATA_DMARQ__IPU_CSI_D_4 IOMUX_PAD(0x728, 0x2c4, 1, 0x940, 2, NO_PAD_CTRL) | ||
1089 | #define MX35_PAD_ATA_DMARQ__KPP_COL_0 IOMUX_PAD(0x728, 0x2c4, 3, 0x950, 2, NO_PAD_CTRL) | ||
1090 | #define MX35_PAD_ATA_DMARQ__GPIO2_31 IOMUX_PAD(0x728, 0x2c4, 5, 0x8c8, 1, NO_PAD_CTRL) | ||
1091 | #define MX35_PAD_ATA_DMARQ__IPU_DIAGB_25 IOMUX_PAD(0x728, 0x2c4, 6, 0x0, 0, NO_PAD_CTRL) | ||
1092 | #define MX35_PAD_ATA_DMARQ__ECT_CTI_TRIG_IN1_4 IOMUX_PAD(0x728, 0x2c4, 7, 0x0, 0, NO_PAD_CTRL) | ||
1093 | |||
1094 | #define MX35_PAD_ATA_DA0__ATA_DA_0 IOMUX_PAD(0x72c, 0x2c8, 0, 0x0, 0, NO_PAD_CTRL) | ||
1095 | #define MX35_PAD_ATA_DA0__IPU_CSI_D_5 IOMUX_PAD(0x72c, 0x2c8, 1, 0x944, 2, NO_PAD_CTRL) | ||
1096 | #define MX35_PAD_ATA_DA0__KPP_COL_1 IOMUX_PAD(0x72c, 0x2c8, 3, 0x954, 2, NO_PAD_CTRL) | ||
1097 | #define MX35_PAD_ATA_DA0__GPIO3_0 IOMUX_PAD(0x72c, 0x2c8, 5, 0x8e8, 1, NO_PAD_CTRL) | ||
1098 | #define MX35_PAD_ATA_DA0__IPU_DIAGB_26 IOMUX_PAD(0x72c, 0x2c8, 6, 0x0, 0, NO_PAD_CTRL) | ||
1099 | #define MX35_PAD_ATA_DA0__ECT_CTI_TRIG_IN1_5 IOMUX_PAD(0x72c, 0x2c8, 7, 0x0, 0, NO_PAD_CTRL) | ||
1100 | |||
1101 | #define MX35_PAD_ATA_DA1__ATA_DA_1 IOMUX_PAD(0x730, 0x2cc, 0, 0x0, 0, NO_PAD_CTRL) | ||
1102 | #define MX35_PAD_ATA_DA1__IPU_CSI_D_6 IOMUX_PAD(0x730, 0x2cc, 1, 0x948, 2, NO_PAD_CTRL) | ||
1103 | #define MX35_PAD_ATA_DA1__KPP_COL_2 IOMUX_PAD(0x730, 0x2cc, 3, 0x958, 2, NO_PAD_CTRL) | ||
1104 | #define MX35_PAD_ATA_DA1__GPIO3_1 IOMUX_PAD(0x730, 0x2cc, 5, 0x0, 0, NO_PAD_CTRL) | ||
1105 | #define MX35_PAD_ATA_DA1__IPU_DIAGB_27 IOMUX_PAD(0x730, 0x2cc, 6, 0x0, 0, NO_PAD_CTRL) | ||
1106 | #define MX35_PAD_ATA_DA1__ECT_CTI_TRIG_IN1_6 IOMUX_PAD(0x730, 0x2cc, 7, 0x0, 0, NO_PAD_CTRL) | ||
1107 | |||
1108 | #define MX35_PAD_ATA_DA2__ATA_DA_2 IOMUX_PAD(0x734, 0x2d0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1109 | #define MX35_PAD_ATA_DA2__IPU_CSI_D_7 IOMUX_PAD(0x734, 0x2d0, 1, 0x94c, 2, NO_PAD_CTRL) | ||
1110 | #define MX35_PAD_ATA_DA2__KPP_COL_3 IOMUX_PAD(0x734, 0x2d0, 3, 0x95c, 2, NO_PAD_CTRL) | ||
1111 | #define MX35_PAD_ATA_DA2__GPIO3_2 IOMUX_PAD(0x734, 0x2d0, 5, 0x0, 0, NO_PAD_CTRL) | ||
1112 | #define MX35_PAD_ATA_DA2__IPU_DIAGB_28 IOMUX_PAD(0x734, 0x2d0, 6, 0x0, 0, NO_PAD_CTRL) | ||
1113 | #define MX35_PAD_ATA_DA2__ECT_CTI_TRIG_IN1_7 IOMUX_PAD(0x734, 0x2d0, 7, 0x0, 0, NO_PAD_CTRL) | ||
1114 | |||
1115 | #define MX35_PAD_MLB_CLK__MLB_MLBCLK IOMUX_PAD(0x738, 0x2d4, 0, 0x0, 0, NO_PAD_CTRL) | ||
1116 | #define MX35_PAD_MLB_CLK__GPIO3_3 IOMUX_PAD(0x738, 0x2d4, 5, 0x0, 0, NO_PAD_CTRL) | ||
1117 | |||
1118 | #define MX35_PAD_MLB_DAT__MLB_MLBDAT IOMUX_PAD(0x73c, 0x2d8, 0, 0x0, 0, NO_PAD_CTRL) | ||
1119 | #define MX35_PAD_MLB_DAT__GPIO3_4 IOMUX_PAD(0x73c, 0x2d8, 5, 0x904, 1, NO_PAD_CTRL) | ||
1120 | |||
1121 | #define MX35_PAD_MLB_SIG__MLB_MLBSIG IOMUX_PAD(0x740, 0x2dc, 0, 0x0, 0, NO_PAD_CTRL) | ||
1122 | #define MX35_PAD_MLB_SIG__GPIO3_5 IOMUX_PAD(0x740, 0x2dc, 5, 0x908, 1, NO_PAD_CTRL) | ||
1123 | |||
1124 | #define MX35_PAD_FEC_TX_CLK__FEC_TX_CLK IOMUX_PAD(0x744, 0x2e0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1125 | #define MX35_PAD_FEC_TX_CLK__ESDHC1_DAT4 IOMUX_PAD(0x744, 0x2e0, 1, 0x804, 1, NO_PAD_CTRL) | ||
1126 | #define MX35_PAD_FEC_TX_CLK__UART3_RXD_MUX IOMUX_PAD(0x744, 0x2e0, 2, 0x9a0, 3, NO_PAD_CTRL) | ||
1127 | #define MX35_PAD_FEC_TX_CLK__USB_TOP_USBH2_DIR IOMUX_PAD(0x744, 0x2e0, 3, 0x9ec, 1, NO_PAD_CTRL) | ||
1128 | #define MX35_PAD_FEC_TX_CLK__CSPI2_MOSI IOMUX_PAD(0x744, 0x2e0, 4, 0x7ec, 3, NO_PAD_CTRL) | ||
1129 | #define MX35_PAD_FEC_TX_CLK__GPIO3_6 IOMUX_PAD(0x744, 0x2e0, 5, 0x90c, 1, NO_PAD_CTRL) | ||
1130 | #define MX35_PAD_FEC_TX_CLK__IPU_DISPB_D12_VSYNC IOMUX_PAD(0x744, 0x2e0, 6, 0x928, 5, NO_PAD_CTRL) | ||
1131 | #define MX35_PAD_FEC_TX_CLK__ARM11P_TOP_EVNTBUS_0 IOMUX_PAD(0x744, 0x2e0, 7, 0x0, 0, NO_PAD_CTRL) | ||
1132 | |||
1133 | #define MX35_PAD_FEC_RX_CLK__FEC_RX_CLK IOMUX_PAD(0x748, 0x2e4, 0, 0x0, 0, NO_PAD_CTRL) | ||
1134 | #define MX35_PAD_FEC_RX_CLK__ESDHC1_DAT5 IOMUX_PAD(0x748, 0x2e4, 1, 0x808, 1, NO_PAD_CTRL) | ||
1135 | #define MX35_PAD_FEC_RX_CLK__UART3_TXD_MUX IOMUX_PAD(0x748, 0x2e4, 2, 0x0, 0, NO_PAD_CTRL) | ||
1136 | #define MX35_PAD_FEC_RX_CLK__USB_TOP_USBH2_STP IOMUX_PAD(0x748, 0x2e4, 3, 0x0, 0, NO_PAD_CTRL) | ||
1137 | #define MX35_PAD_FEC_RX_CLK__CSPI2_MISO IOMUX_PAD(0x748, 0x2e4, 4, 0x7e8, 3, NO_PAD_CTRL) | ||
1138 | #define MX35_PAD_FEC_RX_CLK__GPIO3_7 IOMUX_PAD(0x748, 0x2e4, 5, 0x910, 1, NO_PAD_CTRL) | ||
1139 | #define MX35_PAD_FEC_RX_CLK__IPU_DISPB_SD_D_I IOMUX_PAD(0x748, 0x2e4, 6, 0x92c, 4, NO_PAD_CTRL) | ||
1140 | #define MX35_PAD_FEC_RX_CLK__ARM11P_TOP_EVNTBUS_1 IOMUX_PAD(0x748, 0x2e4, 7, 0x0, 0, NO_PAD_CTRL) | ||
1141 | |||
1142 | #define MX35_PAD_FEC_RX_DV__FEC_RX_DV IOMUX_PAD(0x74c, 0x2e8, 0, 0x0, 0, NO_PAD_CTRL) | ||
1143 | #define MX35_PAD_FEC_RX_DV__ESDHC1_DAT6 IOMUX_PAD(0x74c, 0x2e8, 1, 0x80c, 1, NO_PAD_CTRL) | ||
1144 | #define MX35_PAD_FEC_RX_DV__UART3_RTS IOMUX_PAD(0x74c, 0x2e8, 2, 0x99c, 2, NO_PAD_CTRL) | ||
1145 | #define MX35_PAD_FEC_RX_DV__USB_TOP_USBH2_NXT IOMUX_PAD(0x74c, 0x2e8, 3, 0x9f0, 1, NO_PAD_CTRL) | ||
1146 | #define MX35_PAD_FEC_RX_DV__CSPI2_SCLK IOMUX_PAD(0x74c, 0x2e8, 4, 0x7e0, 3, NO_PAD_CTRL) | ||
1147 | #define MX35_PAD_FEC_RX_DV__GPIO3_8 IOMUX_PAD(0x74c, 0x2e8, 5, 0x914, 1, NO_PAD_CTRL) | ||
1148 | #define MX35_PAD_FEC_RX_DV__IPU_DISPB_SD_CLK IOMUX_PAD(0x74c, 0x2e8, 6, 0x0, 0, NO_PAD_CTRL) | ||
1149 | #define MX35_PAD_FEC_RX_DV__ARM11P_TOP_EVNTBUS_2 IOMUX_PAD(0x74c, 0x2e8, 7, 0x0, 0, NO_PAD_CTRL) | ||
1150 | |||
1151 | #define MX35_PAD_FEC_COL__FEC_COL IOMUX_PAD(0x750, 0x2ec, 0, 0x0, 0, NO_PAD_CTRL) | ||
1152 | #define MX35_PAD_FEC_COL__ESDHC1_DAT7 IOMUX_PAD(0x750, 0x2ec, 1, 0x810, 1, NO_PAD_CTRL) | ||
1153 | #define MX35_PAD_FEC_COL__UART3_CTS IOMUX_PAD(0x750, 0x2ec, 2, 0x0, 0, NO_PAD_CTRL) | ||
1154 | #define MX35_PAD_FEC_COL__USB_TOP_USBH2_DATA_0 IOMUX_PAD(0x750, 0x2ec, 3, 0x9cc, 1, NO_PAD_CTRL) | ||
1155 | #define MX35_PAD_FEC_COL__CSPI2_RDY IOMUX_PAD(0x750, 0x2ec, 4, 0x7e4, 3, NO_PAD_CTRL) | ||
1156 | #define MX35_PAD_FEC_COL__GPIO3_9 IOMUX_PAD(0x750, 0x2ec, 5, 0x918, 1, NO_PAD_CTRL) | ||
1157 | #define MX35_PAD_FEC_COL__IPU_DISPB_SER_RS IOMUX_PAD(0x750, 0x2ec, 6, 0x0, 0, NO_PAD_CTRL) | ||
1158 | #define MX35_PAD_FEC_COL__ARM11P_TOP_EVNTBUS_3 IOMUX_PAD(0x750, 0x2ec, 7, 0x0, 0, NO_PAD_CTRL) | ||
1159 | |||
1160 | #define MX35_PAD_FEC_RDATA0__FEC_RDATA_0 IOMUX_PAD(0x754, 0x2f0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1161 | #define MX35_PAD_FEC_RDATA0__PWM_PWMO IOMUX_PAD(0x754, 0x2f0, 1, 0x0, 0, NO_PAD_CTRL) | ||
1162 | #define MX35_PAD_FEC_RDATA0__UART3_DTR IOMUX_PAD(0x754, 0x2f0, 2, 0x0, 0, NO_PAD_CTRL) | ||
1163 | #define MX35_PAD_FEC_RDATA0__USB_TOP_USBH2_DATA_1 IOMUX_PAD(0x754, 0x2f0, 3, 0x9d0, 1, NO_PAD_CTRL) | ||
1164 | #define MX35_PAD_FEC_RDATA0__CSPI2_SS0 IOMUX_PAD(0x754, 0x2f0, 4, 0x7f0, 2, NO_PAD_CTRL) | ||
1165 | #define MX35_PAD_FEC_RDATA0__GPIO3_10 IOMUX_PAD(0x754, 0x2f0, 5, 0x8ec, 1, NO_PAD_CTRL) | ||
1166 | #define MX35_PAD_FEC_RDATA0__IPU_DISPB_CS1 IOMUX_PAD(0x754, 0x2f0, 6, 0x0, 0, NO_PAD_CTRL) | ||
1167 | #define MX35_PAD_FEC_RDATA0__ARM11P_TOP_EVNTBUS_4 IOMUX_PAD(0x754, 0x2f0, 7, 0x0, 0, NO_PAD_CTRL) | ||
1168 | |||
1169 | #define MX35_PAD_FEC_TDATA0__FEC_TDATA_0 IOMUX_PAD(0x758, 0x2f4, 0, 0x0, 0, NO_PAD_CTRL) | ||
1170 | #define MX35_PAD_FEC_TDATA0__SPDIF_SPDIF_OUT1 IOMUX_PAD(0x758, 0x2f4, 1, 0x0, 0, NO_PAD_CTRL) | ||
1171 | #define MX35_PAD_FEC_TDATA0__UART3_DSR IOMUX_PAD(0x758, 0x2f4, 2, 0x0, 0, NO_PAD_CTRL) | ||
1172 | #define MX35_PAD_FEC_TDATA0__USB_TOP_USBH2_DATA_2 IOMUX_PAD(0x758, 0x2f4, 3, 0x9d4, 1, NO_PAD_CTRL) | ||
1173 | #define MX35_PAD_FEC_TDATA0__CSPI2_SS1 IOMUX_PAD(0x758, 0x2f4, 4, 0x7f4, 2, NO_PAD_CTRL) | ||
1174 | #define MX35_PAD_FEC_TDATA0__GPIO3_11 IOMUX_PAD(0x758, 0x2f4, 5, 0x8f0, 1, NO_PAD_CTRL) | ||
1175 | #define MX35_PAD_FEC_TDATA0__IPU_DISPB_CS0 IOMUX_PAD(0x758, 0x2f4, 6, 0x0, 0, NO_PAD_CTRL) | ||
1176 | #define MX35_PAD_FEC_TDATA0__ARM11P_TOP_EVNTBUS_5 IOMUX_PAD(0x758, 0x2f4, 7, 0x0, 0, NO_PAD_CTRL) | ||
1177 | |||
1178 | #define MX35_PAD_FEC_TX_EN__FEC_TX_EN IOMUX_PAD(0x75c, 0x2f8, 0, 0x0, 0, NO_PAD_CTRL) | ||
1179 | #define MX35_PAD_FEC_TX_EN__SPDIF_SPDIF_IN1 IOMUX_PAD(0x75c, 0x2f8, 1, 0x998, 3, NO_PAD_CTRL) | ||
1180 | #define MX35_PAD_FEC_TX_EN__UART3_RI IOMUX_PAD(0x75c, 0x2f8, 2, 0x0, 0, NO_PAD_CTRL) | ||
1181 | #define MX35_PAD_FEC_TX_EN__USB_TOP_USBH2_DATA_3 IOMUX_PAD(0x75c, 0x2f8, 3, 0x9d8, 1, NO_PAD_CTRL) | ||
1182 | #define MX35_PAD_FEC_TX_EN__GPIO3_12 IOMUX_PAD(0x75c, 0x2f8, 5, 0x8f4, 1, NO_PAD_CTRL) | ||
1183 | #define MX35_PAD_FEC_TX_EN__IPU_DISPB_PAR_RS IOMUX_PAD(0x75c, 0x2f8, 6, 0x0, 0, NO_PAD_CTRL) | ||
1184 | #define MX35_PAD_FEC_TX_EN__ARM11P_TOP_EVNTBUS_6 IOMUX_PAD(0x75c, 0x2f8, 7, 0x0, 0, NO_PAD_CTRL) | ||
1185 | |||
1186 | #define MX35_PAD_FEC_MDC__FEC_MDC IOMUX_PAD(0x760, 0x2fc, 0, 0x0, 0, NO_PAD_CTRL) | ||
1187 | #define MX35_PAD_FEC_MDC__CAN2_TXCAN IOMUX_PAD(0x760, 0x2fc, 1, 0x0, 0, NO_PAD_CTRL) | ||
1188 | #define MX35_PAD_FEC_MDC__UART3_DCD IOMUX_PAD(0x760, 0x2fc, 2, 0x0, 0, NO_PAD_CTRL) | ||
1189 | #define MX35_PAD_FEC_MDC__USB_TOP_USBH2_DATA_4 IOMUX_PAD(0x760, 0x2fc, 3, 0x9dc, 1, NO_PAD_CTRL) | ||
1190 | #define MX35_PAD_FEC_MDC__GPIO3_13 IOMUX_PAD(0x760, 0x2fc, 5, 0x8f8, 1, NO_PAD_CTRL) | ||
1191 | #define MX35_PAD_FEC_MDC__IPU_DISPB_WR IOMUX_PAD(0x760, 0x2fc, 6, 0x0, 0, NO_PAD_CTRL) | ||
1192 | #define MX35_PAD_FEC_MDC__ARM11P_TOP_EVNTBUS_7 IOMUX_PAD(0x760, 0x2fc, 7, 0x0, 0, NO_PAD_CTRL) | ||
1193 | |||
1194 | #define MX35_PAD_FEC_MDIO__FEC_MDIO IOMUX_PAD(0x764, 0x300, 0, 0x0, 0, NO_PAD_CTRL) | ||
1195 | #define MX35_PAD_FEC_MDIO__CAN2_RXCAN IOMUX_PAD(0x764, 0x300, 1, 0x7cc, 2, NO_PAD_CTRL) | ||
1196 | #define MX35_PAD_FEC_MDIO__USB_TOP_USBH2_DATA_5 IOMUX_PAD(0x764, 0x300, 3, 0x9e0, 1, NO_PAD_CTRL) | ||
1197 | #define MX35_PAD_FEC_MDIO__GPIO3_14 IOMUX_PAD(0x764, 0x300, 5, 0x8fc, 1, NO_PAD_CTRL) | ||
1198 | #define MX35_PAD_FEC_MDIO__IPU_DISPB_RD IOMUX_PAD(0x764, 0x300, 6, 0x0, 0, NO_PAD_CTRL) | ||
1199 | #define MX35_PAD_FEC_MDIO__ARM11P_TOP_EVNTBUS_8 IOMUX_PAD(0x764, 0x300, 7, 0x0, 0, NO_PAD_CTRL) | ||
1200 | |||
1201 | #define MX35_PAD_FEC_TX_ERR__FEC_TX_ERR IOMUX_PAD(0x768, 0x304, 0, 0x0, 0, NO_PAD_CTRL) | ||
1202 | #define MX35_PAD_FEC_TX_ERR__OWIRE_LINE IOMUX_PAD(0x768, 0x304, 1, 0x990, 2, NO_PAD_CTRL) | ||
1203 | #define MX35_PAD_FEC_TX_ERR__SPDIF_SPDIF_EXTCLK IOMUX_PAD(0x768, 0x304, 2, 0x994, 4, NO_PAD_CTRL) | ||
1204 | #define MX35_PAD_FEC_TX_ERR__USB_TOP_USBH2_DATA_6 IOMUX_PAD(0x768, 0x304, 3, 0x9e4, 1, NO_PAD_CTRL) | ||
1205 | #define MX35_PAD_FEC_TX_ERR__GPIO3_15 IOMUX_PAD(0x768, 0x304, 5, 0x900, 1, NO_PAD_CTRL) | ||
1206 | #define MX35_PAD_FEC_TX_ERR__IPU_DISPB_D0_VSYNC IOMUX_PAD(0x768, 0x304, 6, 0x924, 3, NO_PAD_CTRL) | ||
1207 | #define MX35_PAD_FEC_TX_ERR__ARM11P_TOP_EVNTBUS_9 IOMUX_PAD(0x768, 0x304, 7, 0x0, 0, NO_PAD_CTRL) | ||
1208 | |||
1209 | #define MX35_PAD_FEC_RX_ERR__FEC_RX_ERR IOMUX_PAD(0x76c, 0x308, 0, 0x0, 0, NO_PAD_CTRL) | ||
1210 | #define MX35_PAD_FEC_RX_ERR__IPU_CSI_D_0 IOMUX_PAD(0x76c, 0x308, 1, 0x930, 3, NO_PAD_CTRL) | ||
1211 | #define MX35_PAD_FEC_RX_ERR__USB_TOP_USBH2_DATA_7 IOMUX_PAD(0x76c, 0x308, 3, 0x9e8, 1, NO_PAD_CTRL) | ||
1212 | #define MX35_PAD_FEC_RX_ERR__KPP_COL_4 IOMUX_PAD(0x76c, 0x308, 4, 0x960, 1, NO_PAD_CTRL) | ||
1213 | #define MX35_PAD_FEC_RX_ERR__GPIO3_16 IOMUX_PAD(0x76c, 0x308, 5, 0x0, 0, NO_PAD_CTRL) | ||
1214 | #define MX35_PAD_FEC_RX_ERR__IPU_DISPB_SD_D_IO IOMUX_PAD(0x76c, 0x308, 6, 0x92c, 5, NO_PAD_CTRL) | ||
1215 | |||
1216 | #define MX35_PAD_FEC_CRS__FEC_CRS IOMUX_PAD(0x770, 0x30c, 0, 0x0, 0, NO_PAD_CTRL) | ||
1217 | #define MX35_PAD_FEC_CRS__IPU_CSI_D_1 IOMUX_PAD(0x770, 0x30c, 1, 0x934, 3, NO_PAD_CTRL) | ||
1218 | #define MX35_PAD_FEC_CRS__USB_TOP_USBH2_PWR IOMUX_PAD(0x770, 0x30c, 3, 0x0, 0, NO_PAD_CTRL) | ||
1219 | #define MX35_PAD_FEC_CRS__KPP_COL_5 IOMUX_PAD(0x770, 0x30c, 4, 0x964, 1, NO_PAD_CTRL) | ||
1220 | #define MX35_PAD_FEC_CRS__GPIO3_17 IOMUX_PAD(0x770, 0x30c, 5, 0x0, 0, NO_PAD_CTRL) | ||
1221 | #define MX35_PAD_FEC_CRS__IPU_FLASH_STROBE IOMUX_PAD(0x770, 0x30c, 6, 0x0, 0, NO_PAD_CTRL) | ||
1222 | |||
1223 | #define MX35_PAD_FEC_RDATA1__FEC_RDATA_1 IOMUX_PAD(0x774, 0x310, 0, 0x0, 0, NO_PAD_CTRL) | ||
1224 | #define MX35_PAD_FEC_RDATA1__IPU_CSI_D_2 IOMUX_PAD(0x774, 0x310, 1, 0x938, 4, NO_PAD_CTRL) | ||
1225 | #define MX35_PAD_FEC_RDATA1__AUDMUX_AUD6_RXC IOMUX_PAD(0x774, 0x310, 2, 0x0, 0, NO_PAD_CTRL) | ||
1226 | #define MX35_PAD_FEC_RDATA1__USB_TOP_USBH2_OC IOMUX_PAD(0x774, 0x310, 3, 0x9f4, 2, NO_PAD_CTRL) | ||
1227 | #define MX35_PAD_FEC_RDATA1__KPP_COL_6 IOMUX_PAD(0x774, 0x310, 4, 0x968, 1, NO_PAD_CTRL) | ||
1228 | #define MX35_PAD_FEC_RDATA1__GPIO3_18 IOMUX_PAD(0x774, 0x310, 5, 0x0, 0, NO_PAD_CTRL) | ||
1229 | #define MX35_PAD_FEC_RDATA1__IPU_DISPB_BE0 IOMUX_PAD(0x774, 0x310, 6, 0x0, 0, NO_PAD_CTRL) | ||
1230 | |||
1231 | #define MX35_PAD_FEC_TDATA1__FEC_TDATA_1 IOMUX_PAD(0x778, 0x314, 0, 0x0, 0, NO_PAD_CTRL) | ||
1232 | #define MX35_PAD_FEC_TDATA1__IPU_CSI_D_3 IOMUX_PAD(0x778, 0x314, 1, 0x93c, 4, NO_PAD_CTRL) | ||
1233 | #define MX35_PAD_FEC_TDATA1__AUDMUX_AUD6_RXFS IOMUX_PAD(0x778, 0x314, 2, 0x7bc, 1, NO_PAD_CTRL) | ||
1234 | #define MX35_PAD_FEC_TDATA1__KPP_COL_7 IOMUX_PAD(0x778, 0x314, 4, 0x96c, 1, NO_PAD_CTRL) | ||
1235 | #define MX35_PAD_FEC_TDATA1__GPIO3_19 IOMUX_PAD(0x778, 0x314, 5, 0x0, 0, NO_PAD_CTRL) | ||
1236 | #define MX35_PAD_FEC_TDATA1__IPU_DISPB_BE1 IOMUX_PAD(0x778, 0x314, 6, 0x0, 0, NO_PAD_CTRL) | ||
1237 | |||
1238 | #define MX35_PAD_FEC_RDATA2__FEC_RDATA_2 IOMUX_PAD(0x77c, 0x318, 0, 0x0, 0, NO_PAD_CTRL) | ||
1239 | #define MX35_PAD_FEC_RDATA2__IPU_CSI_D_4 IOMUX_PAD(0x77c, 0x318, 1, 0x940, 3, NO_PAD_CTRL) | ||
1240 | #define MX35_PAD_FEC_RDATA2__AUDMUX_AUD6_TXD IOMUX_PAD(0x77c, 0x318, 2, 0x7b4, 1, NO_PAD_CTRL) | ||
1241 | #define MX35_PAD_FEC_RDATA2__KPP_ROW_4 IOMUX_PAD(0x77c, 0x318, 4, 0x980, 1, NO_PAD_CTRL) | ||
1242 | #define MX35_PAD_FEC_RDATA2__GPIO3_20 IOMUX_PAD(0x77c, 0x318, 5, 0x0, 0, NO_PAD_CTRL) | ||
1243 | |||
1244 | #define MX35_PAD_FEC_TDATA2__FEC_TDATA_2 IOMUX_PAD(0x780, 0x31c, 0, 0x0, 0, NO_PAD_CTRL) | ||
1245 | #define MX35_PAD_FEC_TDATA2__IPU_CSI_D_5 IOMUX_PAD(0x780, 0x31c, 1, 0x944, 3, NO_PAD_CTRL) | ||
1246 | #define MX35_PAD_FEC_TDATA2__AUDMUX_AUD6_RXD IOMUX_PAD(0x780, 0x31c, 2, 0x7b0, 1, NO_PAD_CTRL) | ||
1247 | #define MX35_PAD_FEC_TDATA2__KPP_ROW_5 IOMUX_PAD(0x780, 0x31c, 4, 0x984, 1, NO_PAD_CTRL) | ||
1248 | #define MX35_PAD_FEC_TDATA2__GPIO3_21 IOMUX_PAD(0x780, 0x31c, 5, 0x0, 0, NO_PAD_CTRL) | ||
1249 | |||
1250 | #define MX35_PAD_FEC_RDATA3__FEC_RDATA_3 IOMUX_PAD(0x784, 0x320, 0, 0x0, 0, NO_PAD_CTRL) | ||
1251 | #define MX35_PAD_FEC_RDATA3__IPU_CSI_D_6 IOMUX_PAD(0x784, 0x320, 1, 0x948, 3, NO_PAD_CTRL) | ||
1252 | #define MX35_PAD_FEC_RDATA3__AUDMUX_AUD6_TXC IOMUX_PAD(0x784, 0x320, 2, 0x7c0, 1, NO_PAD_CTRL) | ||
1253 | #define MX35_PAD_FEC_RDATA3__KPP_ROW_6 IOMUX_PAD(0x784, 0x320, 4, 0x988, 1, NO_PAD_CTRL) | ||
1254 | #define MX35_PAD_FEC_RDATA3__GPIO3_22 IOMUX_PAD(0x784, 0x320, 6, 0x0, 0, NO_PAD_CTRL) | ||
1255 | |||
1256 | #define MX35_PAD_FEC_TDATA3__FEC_TDATA_3 IOMUX_PAD(0x788, 0x324, 0, 0x0, 0, NO_PAD_CTRL) | ||
1257 | #define MX35_PAD_FEC_TDATA3__IPU_CSI_D_7 IOMUX_PAD(0x788, 0x324, 1, 0x94c, 3, NO_PAD_CTRL) | ||
1258 | #define MX35_PAD_FEC_TDATA3__AUDMUX_AUD6_TXFS IOMUX_PAD(0x788, 0x324, 2, 0x7c4, 1, NO_PAD_CTRL) | ||
1259 | #define MX35_PAD_FEC_TDATA3__KPP_ROW_7 IOMUX_PAD(0x788, 0x324, 4, 0x98c, 1, NO_PAD_CTRL) | ||
1260 | #define MX35_PAD_FEC_TDATA3__GPIO3_23 IOMUX_PAD(0x788, 0x324, 5, 0x0, 0, NO_PAD_CTRL) | ||
1261 | |||
1262 | #define MX35_PAD_EXT_ARMCLK__CCM_EXT_ARMCLK IOMUX_PAD(0x78c, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1263 | |||
1264 | #define MX35_PAD_TEST_MODE__TCU_TEST_MODE IOMUX_PAD(0x790, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | ||
1265 | |||
1266 | |||
1267 | #endif /* __MACH_IOMUX_MX35_H__ */ | ||
diff --git a/arch/arm/mach-imx/iomux-mx50.h b/arch/arm/mach-imx/iomux-mx50.h deleted file mode 100644 index 00f56e0e800..00000000000 --- a/arch/arm/mach-imx/iomux-mx50.h +++ /dev/null | |||
@@ -1,977 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | |||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | |||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef __MACH_IOMUX_MX50_H__ | ||
20 | #define __MACH_IOMUX_MX50_H__ | ||
21 | |||
22 | #include "iomux-v3.h" | ||
23 | |||
24 | #define MX50_ELCDIF_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_DSE_HIGH) | ||
25 | |||
26 | #define MX50_SD_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \ | ||
27 | PAD_CTL_PUS_47K_UP | PAD_CTL_DSE_HIGH) | ||
28 | |||
29 | #define MX50_UART_PAD_CTRL (PAD_CTL_DSE_HIGH | PAD_CTL_PKE) | ||
30 | |||
31 | #define MX50_I2C_PAD_CTRL (PAD_CTL_ODE | PAD_CTL_DSE_HIGH | \ | ||
32 | PAD_CTL_PUS_100K_UP | PAD_CTL_HYS) | ||
33 | |||
34 | #define MX50_USB_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ | ||
35 | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_47K_UP) | ||
36 | |||
37 | #define MX50_FEC_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \ | ||
38 | PAD_CTL_PUS_22K_UP | PAD_CTL_ODE | \ | ||
39 | PAD_CTL_DSE_HIGH) | ||
40 | |||
41 | #define MX50_OWIRE_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \ | ||
42 | PAD_CTL_PUS_100K_UP | PAD_CTL_ODE | \ | ||
43 | PAD_CTL_DSE_HIGH | PAD_CTL_SRE_FAST) | ||
44 | |||
45 | #define MX50_KEYPAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \ | ||
46 | PAD_CTL_PUS_100K_UP | PAD_CTL_DSE_HIGH) | ||
47 | |||
48 | #define MX50_CSPI_SS_PAD (PAD_CTL_PKE | PAD_CTL_PUE | \ | ||
49 | PAD_CTL_PUS_22K_UP | PAD_CTL_DSE_HIGH) | ||
50 | |||
51 | #define MX50_PAD_KEY_COL0__KEY_COL0 IOMUX_PAD(0x2CC, 0x20, 0, 0x0, 0, NO_PAD_CTRL) | ||
52 | #define MX50_PAD_KEY_COL0__GPIO_4_0 IOMUX_PAD(0x2CC, 0x20, 1, 0x0, 0, NO_PAD_CTRL) | ||
53 | #define MX50_PAD_KEY_COL0__NANDF_CLE IOMUX_PAD(0x2CC, 0x20, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
54 | |||
55 | #define MX50_PAD_KEY_ROW0__KEY_ROW0 IOMUX_PAD(0x2D0, 0x24, 0, 0x0, 0, MX50_KEYPAD_CTRL) | ||
56 | #define MX50_PAD_KEY_ROW0__GPIO_4_1 IOMUX_PAD(0x2D0, 0x24, 1, 0x0, 0, NO_PAD_CTRL) | ||
57 | #define MX50_PAD_KEY_ROW0__NANDF_ALE IOMUX_PAD(0x2D0, 0x24, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
58 | |||
59 | #define MX50_PAD_KEY_COL1__KEY_COL1 IOMUX_PAD(0x2D4, 0x28, 0, 0x0, 0, NO_PAD_CTRL) | ||
60 | #define MX50_PAD_KEY_COL1__GPIO_4_2 IOMUX_PAD(0x2D4, 0x28, 1, 0x0, 0, NO_PAD_CTRL) | ||
61 | #define MX50_PAD_KEY_COL1__NANDF_CE0 IOMUX_PAD(0x2D4, 0x28, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
62 | |||
63 | #define MX50_PAD_KEY_ROW1__KEY_ROW1 IOMUX_PAD(0x2D8, 0x2C, 0, 0x0, 0, MX50_KEYPAD_CTRL) | ||
64 | #define MX50_PAD_KEY_ROW1__GPIO_4_3 IOMUX_PAD(0x2D8, 0x2C, 1, 0x0, 0, NO_PAD_CTRL) | ||
65 | #define MX50_PAD_KEY_ROW1__NANDF_CE1 IOMUX_PAD(0x2D8, 0x2C, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
66 | |||
67 | #define MX50_PAD_KEY_COL2__KEY_COL2 IOMUX_PAD(0x2DC, 0x30, 0, 0x0, 0, MX50_KEYPAD_CTRL) | ||
68 | #define MX50_PAD_KEY_COL2__GPIO_4_4 IOMUX_PAD(0x2DC, 0x30, 1, 0x0, 0, NO_PAD_CTRL) | ||
69 | #define MX50_PAD_KEY_COL2__NANDF_CE2 IOMUX_PAD(0x2DC, 0x30, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
70 | |||
71 | #define MX50_PAD_KEY_ROW2__KEY_ROW2 IOMUX_PAD(0x2E0, 0x34, 0, 0x0, 0, MX50_KEYPAD_CTRL) | ||
72 | #define MX50_PAD_KEY_ROW2__GPIO_4_5 IOMUX_PAD(0x2E0, 0x34, 1, 0x0, 0, NO_PAD_CTRL) | ||
73 | #define MX50_PAD_KEY_ROW2__NANDF_CE3 IOMUX_PAD(0x2E0, 0x34, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
74 | |||
75 | #define MX50_PAD_KEY_COL3__KEY_COL3 IOMUX_PAD(0x2E4, 0x38, 0, 0x0, 0, NO_PAD_CTRL) | ||
76 | #define MX50_PAD_KEY_COL3__GPIO_4_6 IOMUX_PAD(0x2E4, 0x38, 1, 0x0, 0, NO_PAD_CTRL) | ||
77 | #define MX50_PAD_KEY_COL3__NANDF_READY IOMUX_PAD(0x2E4, 0x38, 2, 0x7b4, 0, PAD_CTL_PKE | \ | ||
78 | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP) | ||
79 | #define MX50_PAD_KEY_COL3__SDMA_EXT0 IOMUX_PAD(0x2E4, 0x38, 6, 0x7b8, 0, NO_PAD_CTRL) | ||
80 | |||
81 | #define MX50_PAD_KEY_ROW3__KEY_ROW3 IOMUX_PAD(0x2E8, 0x3C, 0, 0x0, 0, MX50_KEYPAD_CTRL) | ||
82 | #define MX50_PAD_KEY_ROW3__GPIO_4_7 IOMUX_PAD(0x2E8, 0x3C, 1, 0x0, 0, NO_PAD_CTRL) | ||
83 | #define MX50_PAD_KEY_ROW3__NANDF_DQS IOMUX_PAD(0x2E8, 0x3C, 2, 0x7b0, 0, PAD_CTL_DSE_HIGH) | ||
84 | #define MX50_PAD_KEY_ROW3__SDMA_EXT1 IOMUX_PAD(0x2E8, 0x3C, 6, 0x7bc, 0, NO_PAD_CTRL) | ||
85 | |||
86 | #define MX50_PAD_I2C1_SCL__I2C1_SCL IOMUX_PAD(0x2EC, 0x40, IOMUX_CONFIG_SION, 0x0, 0, \ | ||
87 | MX50_I2C_PAD_CTRL) | ||
88 | #define MX50_PAD_I2C1_SCL__GPIO_6_18 IOMUX_PAD(0x2EC, 0x40, 1, 0x0, 0, NO_PAD_CTRL) | ||
89 | #define MX50_PAD_I2C1_SCL__UART2_TXD IOMUX_PAD(0x2EC, 0x40, 2, 0x0, 0, MX50_UART_PAD_CTRL) | ||
90 | |||
91 | #define MX50_PAD_I2C1_SDA__I2C1_SDA IOMUX_PAD(0x2F0, 0x44, IOMUX_CONFIG_SION, 0x0, 0, \ | ||
92 | MX50_I2C_PAD_CTRL) | ||
93 | #define MX50_PAD_I2C1_SDA__GPIO_6_19 IOMUX_PAD(0x2F0, 0x44, 1, 0x0, 0, NO_PAD_CTRL) | ||
94 | #define MX50_PAD_I2C1_SDA__UART2_RXD IOMUX_PAD(0x2F0, 0x44, 2, 0x7cc, 1, MX50_UART_PAD_CTRL) | ||
95 | |||
96 | #define MX50_PAD_I2C2_SCL__I2C2_SCL IOMUX_PAD(0x2F4, 0x48, IOMUX_CONFIG_SION, 0x0, 0, \ | ||
97 | MX50_I2C_PAD_CTRL) | ||
98 | #define MX50_PAD_I2C2_SCL__GPIO_6_20 IOMUX_PAD(0x2F4, 0x48, 1, 0x0, 0, NO_PAD_CTRL) | ||
99 | #define MX50_PAD_I2C2_SCL__UART2_CTS IOMUX_PAD(0x2F4, 0x48, 2, 0x0, 0, MX50_UART_PAD_CTRL) | ||
100 | #define MX50_PAD_I2C2_SCL__DCDC_OK IOMUX_PAD(0x2F4, 0x48, 7, 0x0, 0, NO_PAD_CTRL) | ||
101 | |||
102 | #define MX50_PAD_I2C2_SDA__I2C2_SDA IOMUX_PAD(0x2F8, 0x4C, IOMUX_CONFIG_SION, 0x0, 0, \ | ||
103 | MX50_I2C_PAD_CTRL) | ||
104 | #define MX50_PAD_I2C2_SDA__GPIO_6_21 IOMUX_PAD(0x2F8, 0x4C, 1, 0x0, 0, NO_PAD_CTRL) | ||
105 | #define MX50_PAD_I2C2_SDA__UART2_RTS IOMUX_PAD(0x2F8, 0x4C, 2, 0x7c8, 1, MX50_UART_PAD_CTRL) | ||
106 | #define MX50_PAD_I2C2_SDA__PWRSTABLE IOMUX_PAD(0x2F8, 0x4C, 7, 0x0, 0, NO_PAD_CTRL) | ||
107 | |||
108 | #define MX50_PAD_I2C3_SCL__I2C3_SCL IOMUX_PAD(0x2FC, 0x50, IOMUX_CONFIG_SION, 0x0, 0, \ | ||
109 | MX50_I2C_PAD_CTRL) | ||
110 | #define MX50_PAD_I2C3_SCL__GPIO_6_22 IOMUX_PAD(0x2FC, 0x50, 1, 0x0, 0, NO_PAD_CTRL) | ||
111 | #define MX50_PAD_I2C3_SCL__FEC_MDC IOMUX_PAD(0x2FC, 0x50, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
112 | #define MX50_PAD_I2C3_SCL__PMIC_RDY IOMUX_PAD(0x2FC, 0x50, 3, 0x0, 0, NO_PAD_CTRL) | ||
113 | #define MX50_PAD_I2C3_SCL__GPT_CAPIN1 IOMUX_PAD(0x2FC, 0x50, 5, 0x0, 0, NO_PAD_CTRL) | ||
114 | #define MX50_PAD_I2C3_SCL__USBOTG_OC IOMUX_PAD(0x2FC, 0x50, 7, 0x7E8, 0, MX50_USB_PAD_CTRL) | ||
115 | |||
116 | #define MX50_PAD_I2C3_SDA__I2C3_SDA IOMUX_PAD(0x300, 0x54, IOMUX_CONFIG_SION, 0x0, 0, \ | ||
117 | MX50_I2C_PAD_CTRL) | ||
118 | #define MX50_PAD_I2C3_SDA__GPIO_6_23 IOMUX_PAD(0x300, 0x54, 1, 0x0, 0, NO_PAD_CTRL) | ||
119 | #define MX50_PAD_I2C3_SDA__FEC_MDIO IOMUX_PAD(0x300, 0x54, 2, 0x774, 0, MX50_FEC_PAD_CTRL) | ||
120 | #define MX50_PAD_I2C3_SDA__PWRFAIL_INT IOMUX_PAD(0x300, 0x54, 3, 0x0, 0, NO_PAD_CTRL) | ||
121 | #define MX50_PAD_I2C3_SDA__ALARM_DEB IOMUX_PAD(0x300, 0x54, 4, 0x0, 0, NO_PAD_CTRL) | ||
122 | #define MX50_PAD_I2C3_SDA__GPT_CAPIN1 IOMUX_PAD(0x300, 0x54, 5, 0x0, 0, NO_PAD_CTRL) | ||
123 | #define MX50_PAD_I2C3_SDA__USBOTG_PWR IOMUX_PAD(0x300, 0x54, 7, 0x0, 0, \ | ||
124 | PAD_CTL_PKE | PAD_CTL_DSE_HIGH) | ||
125 | |||
126 | #define MX50_PAD_PWM1__PWM1_PWMO IOMUX_PAD(0x304, 0x58, 0, 0x0, 0, NO_PAD_CTRL) | ||
127 | #define MX50_PAD_PWM1__GPIO_6_24 IOMUX_PAD(0x304, 0x58, 1, 0x0, 0, NO_PAD_CTRL) | ||
128 | #define MX50_PAD_PWM1__USBOTG_OC IOMUX_PAD(0x304, 0x58, 2, 0x7E8, 1, MX50_USB_PAD_CTRL) | ||
129 | #define MX50_PAD_PWM1__GPT_CMPOUT1 IOMUX_PAD(0x304, 0x58, 5, 0x0, 0, NO_PAD_CTRL) | ||
130 | |||
131 | #define MX50_PAD_PWM2__PWM2_PWMO IOMUX_PAD(0x308, 0x5C, 0, 0x0, 0, NO_PAD_CTRL) | ||
132 | #define MX50_PAD_PWM2__GPIO_6_25 IOMUX_PAD(0x308, 0x5C, 1, 0x0, 0, NO_PAD_CTRL) | ||
133 | #define MX50_PAD_PWM2__USBOTG_PWR IOMUX_PAD(0x308, 0x5C, 2, 0x0, 0, \ | ||
134 | PAD_CTL_PKE | PAD_CTL_DSE_HIGH) | ||
135 | #define MX50_PAD_PWM2__DCDC_PWM IOMUX_PAD(0x308, 0x5C, 4, 0x0, 0, NO_PAD_CTRL) | ||
136 | #define MX50_PAD_PWM2__GPT_CMPOUT2 IOMUX_PAD(0x308, 0x5C, 5, 0x0, 0, NO_PAD_CTRL) | ||
137 | #define MX50_PAD_PWM2__ANY_PU_RST IOMUX_PAD(0x308, 0x5C, 7, 0x0, 0, NO_PAD_CTRL) | ||
138 | |||
139 | #define MX50_PAD_OWIRE__OWIRE IOMUX_PAD(0x30C, 0x60, 0, 0x0, 0, MX50_OWIRE_PAD_CTRL) | ||
140 | #define MX50_PAD_OWIRE__GPIO_6_26 IOMUX_PAD(0x30C, 0x60, 1, 0x0, 0, NO_PAD_CTRL) | ||
141 | #define MX50_PAD_OWIRE__USBH1_OC IOMUX_PAD(0x30C, 0x60, 2, 0x0, 0, MX50_USB_PAD_CTRL) | ||
142 | #define MX50_PAD_OWIRE__SSI_EXT1_CLK IOMUX_PAD(0x30C, 0x60, 3, 0x0, 0, NO_PAD_CTRL) | ||
143 | #define MX50_PAD_OWIRE__EPDC_PWRIRQ IOMUX_PAD(0x30C, 0x60, 4, 0x0, 0, NO_PAD_CTRL) | ||
144 | #define MX50_PAD_OWIRE__GPT_CMPOUT3 IOMUX_PAD(0x30C, 0x60, 5, 0x0, 0, NO_PAD_CTRL) | ||
145 | |||
146 | #define MX50_PAD_EPITO__EPITO IOMUX_PAD(0x310, 0x64, 0, 0x0, 0, NO_PAD_CTRL) | ||
147 | #define MX50_PAD_EPITO__GPIO_6_27 IOMUX_PAD(0x310, 0x64, 1, 0x0, 0, NO_PAD_CTRL) | ||
148 | #define MX50_PAD_EPITO__USBH1_PWR IOMUX_PAD(0x310, 0x64, 2, 0x0, 0, \ | ||
149 | PAD_CTL_PKE | PAD_CTL_DSE_HIGH) | ||
150 | #define MX50_PAD_EPITO__SSI_EXT2_CLK IOMUX_PAD(0x310, 0x64, 3, 0x0, 0, NO_PAD_CTRL) | ||
151 | #define MX50_PAD_EPITO__TOG_EN IOMUX_PAD(0x310, 0x64, 4, 0x0, 0, NO_PAD_CTRL) | ||
152 | #define MX50_PAD_EPITO__GPT_CLKIN IOMUX_PAD(0x310, 0x64, 5, 0x0, 0, NO_PAD_CTRL) | ||
153 | |||
154 | #define MX50_PAD_WDOG__WDOG IOMUX_PAD(0x314, 0x68, 0, 0x0, 0, NO_PAD_CTRL) | ||
155 | #define MX50_PAD_WDOG__GPIO_6_28 IOMUX_PAD(0x314, 0x68, 1, 0x0, 0, NO_PAD_CTRL) | ||
156 | #define MX50_PAD_WDOG__WDOG_RST IOMUX_PAD(0x314, 0x68, 2, 0x0, 0, NO_PAD_CTRL) | ||
157 | #define MX50_PAD_WDOG__XTAL32K IOMUX_PAD(0x314, 0x68, 6, 0x0, 0, NO_PAD_CTRL) | ||
158 | |||
159 | #define MX50_PAD_SSI_TXFS__SSI_TXFS IOMUX_PAD(0x318, 0x6C, 0, 0x0, 0, NO_PAD_CTRL) | ||
160 | #define MX50_PAD_SSI_TXFS__GPIO_6_0 IOMUX_PAD(0x318, 0x6C, 1, 0x0, 0, NO_PAD_CTRL) | ||
161 | |||
162 | #define MX50_PAD_SSI_TXC__SSI_TXC IOMUX_PAD(0x31C, 0x70, 0, 0x0, 0, NO_PAD_CTRL) | ||
163 | #define MX50_PAD_SSI_TXC__GPIO_6_1 IOMUX_PAD(0x31C, 0x70, 1, 0x0, 0, NO_PAD_CTRL) | ||
164 | |||
165 | #define MX50_PAD_SSI_TXD__SSI_TXD IOMUX_PAD(0x320, 0x74, 0, 0x0, 0, NO_PAD_CTRL) | ||
166 | #define MX50_PAD_SSI_TXD__GPIO_6_2 IOMUX_PAD(0x320, 0x74, 1, 0x0, 0, NO_PAD_CTRL) | ||
167 | #define MX50_PAD_SSI_TXD__CSPI_RDY IOMUX_PAD(0x320, 0x74, 4, 0x6e8, 0, NO_PAD_CTRL) | ||
168 | |||
169 | #define MX50_PAD_SSI_RXD__SSI_RXD IOMUX_PAD(0x324, 0x78, 0, 0x0, 0, NO_PAD_CTRL) | ||
170 | #define MX50_PAD_SSI_RXD__GPIO_6_3 IOMUX_PAD(0x324, 0x78, 1, 0x0, 0, NO_PAD_CTRL) | ||
171 | #define MX50_PAD_SSI_RXD__CSPI_SS3 IOMUX_PAD(0x324, 0x78, 4, 0x6f4, 0, MX50_CSPI_SS_PAD) | ||
172 | |||
173 | #define MX50_PAD_SSI_RXFS__AUD3_RXFS IOMUX_PAD(0x328, 0x7C, 0, 0x0, 0, NO_PAD_CTRL) | ||
174 | #define MX50_PAD_SSI_RXFS__GPIO_6_4 IOMUX_PAD(0x328, 0x7C, 1, 0x0, 0, NO_PAD_CTRL) | ||
175 | #define MX50_PAD_SSI_RXFS__UART5_TXD IOMUX_PAD(0x328, 0x7C, 2, 0x0, 0, MX50_UART_PAD_CTRL) | ||
176 | #define MX50_PAD_SSI_RXFS__WEIM_D6 IOMUX_PAD(0x328, 0x7C, 3, 0x804, 0, NO_PAD_CTRL) | ||
177 | #define MX50_PAD_SSI_RXFS__CSPI_SS2 IOMUX_PAD(0x328, 0x7C, 4, 0x6f0, 0, MX50_CSPI_SS_PAD) | ||
178 | #define MX50_PAD_SSI_RXFS__FEC_COL IOMUX_PAD(0x328, 0x7C, 5, 0x770, 0, PAD_CTL_DSE_HIGH) | ||
179 | #define MX50_PAD_SSI_RXFS__FEC_MDC IOMUX_PAD(0x328, 0x7C, 6, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
180 | |||
181 | #define MX50_PAD_SSI_RXC__AUD3_RXC IOMUX_PAD(0x32C, 0x80, 0, 0x0, 0, NO_PAD_CTRL) | ||
182 | #define MX50_PAD_SSI_RXC__GPIO_6_5 IOMUX_PAD(0x32C, 0x80, 1, 0x0, 0, NO_PAD_CTRL) | ||
183 | #define MX50_PAD_SSI_RXC__UART5_RXD IOMUX_PAD(0x32C, 0x80, 2, 0x7e4, 1, MX50_UART_PAD_CTRL) | ||
184 | #define MX50_PAD_SSI_RXC__WEIM_D7 IOMUX_PAD(0x32C, 0x80, 3, 0x808, 0, NO_PAD_CTRL) | ||
185 | #define MX50_PAD_SSI_RXC__CSPI_SS1 IOMUX_PAD(0x32C, 0x80, 4, 0x6ec, 0, MX50_CSPI_SS_PAD) | ||
186 | #define MX50_PAD_SSI_RXC__FEC_RX_CLK IOMUX_PAD(0x32C, 0x80, 5, 0x780, 0, NO_PAD_CTRL) | ||
187 | #define MX50_PAD_SSI_RXC__FEC_MDIO IOMUX_PAD(0x32C, 0x80, 6, 0x774, 1, MX50_FEC_PAD_CTRL) | ||
188 | |||
189 | #define MX50_PAD_UART1_TXD__UART1_TXD IOMUX_PAD(0x330, 0x84, 0, 0x0, 0, MX50_UART_PAD_CTRL) | ||
190 | #define MX50_PAD_UART1_TXD__GPIO_6_6 IOMUX_PAD(0x330, 0x84, 1, 0x0, 0, NO_PAD_CTRL) | ||
191 | |||
192 | #define MX50_PAD_UART1_RXD__UART1_RXD IOMUX_PAD(0x334, 0x88, 0, 0x7c4, 1, MX50_UART_PAD_CTRL) | ||
193 | #define MX50_PAD_UART1_RXD__GPIO_6_7 IOMUX_PAD(0x334, 0x88, 1, 0x0, 0, NO_PAD_CTRL) | ||
194 | |||
195 | #define MX50_PAD_UART1_CTS__UART1_CTS IOMUX_PAD(0x338, 0x8C, 0, 0x0, 0, MX50_UART_PAD_CTRL) | ||
196 | #define MX50_PAD_UART1_CTS__GPIO_6_8 IOMUX_PAD(0x338, 0x8C, 1, 0x0, 0, NO_PAD_CTRL) | ||
197 | #define MX50_PAD_UART1_CTS__UART5_TXD IOMUX_PAD(0x338, 0x8C, 2, 0x0, 0, MX50_UART_PAD_CTRL) | ||
198 | #define MX50_PAD_UART1_CTS__SD4_D4 IOMUX_PAD(0x338, 0x8C, 4, 0x760, 0, MX50_SD_PAD_CTRL) | ||
199 | #define MX50_PAD_UART1_CTS__SD4_CMD IOMUX_PAD(0x338, 0x8C, 5, 0x74c, 0, MX50_SD_PAD_CTRL) | ||
200 | |||
201 | #define MX50_PAD_UART1_RTS__UART1_RTS IOMUX_PAD(0x33C, 0x90, 0, 0x7c0, 1, MX50_UART_PAD_CTRL) | ||
202 | #define MX50_PAD_UART1_RTS__GPIO_6_9 IOMUX_PAD(0x33C, 0x90, 1, 0x0, 0, NO_PAD_CTRL) | ||
203 | #define MX50_PAD_UART1_RTS__UART5_RXD IOMUX_PAD(0x33C, 0x90, 2, 0x7e4, 3, MX50_UART_PAD_CTRL) | ||
204 | #define MX50_PAD_UART1_RTS__SD4_D5 IOMUX_PAD(0x33C, 0x90, 4, 0x764, 0, MX50_SD_PAD_CTRL) | ||
205 | #define MX50_PAD_UART1_RTS__SD4_CLK IOMUX_PAD(0x33C, 0x90, 5, 0x748, 0, MX50_SD_PAD_CTRL) | ||
206 | |||
207 | #define MX50_PAD_UART2_TXD__UART2_TXD IOMUX_PAD(0x340, 0x94, 0, 0x0, 0, MX50_UART_PAD_CTRL) | ||
208 | #define MX50_PAD_UART2_TXD__GPIO_6_10 IOMUX_PAD(0x340, 0x94, 1, 0x0, 0, NO_PAD_CTRL) | ||
209 | #define MX50_PAD_UART2_TXD__SD4_D6 IOMUX_PAD(0x340, 0x94, 4, 0x768, 0, MX50_SD_PAD_CTRL) | ||
210 | #define MX50_PAD_UART2_TXD__SD4_D4 IOMUX_PAD(0x340, 0x94, 5, 0x760, 1, MX50_SD_PAD_CTRL) | ||
211 | |||
212 | #define MX50_PAD_UART2_RXD__UART2_RXD IOMUX_PAD(0x344, 0x98, 0, 0x7cc, 3, MX50_UART_PAD_CTRL) | ||
213 | #define MX50_PAD_UART2_RXD__GPIO_6_11 IOMUX_PAD(0x344, 0x98, 1, 0x0, 0, NO_PAD_CTRL) | ||
214 | #define MX50_PAD_UART2_RXD__SD4_D7 IOMUX_PAD(0x344, 0x98, 4, 0x76c, 0, MX50_SD_PAD_CTRL) | ||
215 | #define MX50_PAD_UART2_RXD__SD4_D5 IOMUX_PAD(0x344, 0x98, 5, 0x764, 1, MX50_SD_PAD_CTRL) | ||
216 | |||
217 | #define MX50_PAD_UART2_CTS__UART2_CTS IOMUX_PAD(0x348, 0x9C, 0, 0x0, 0, MX50_UART_PAD_CTRL) | ||
218 | #define MX50_PAD_UART2_CTS__GPIO_6_12 IOMUX_PAD(0x348, 0x9C, 1, 0x0, 0, NO_PAD_CTRL) | ||
219 | #define MX50_PAD_UART2_CTS__SD4_CMD IOMUX_PAD(0x348, 0x9C, 4, 0x74c, 1, MX50_SD_PAD_CTRL) | ||
220 | #define MX50_PAD_UART2_CTS__SD4_D6 IOMUX_PAD(0x348, 0x9C, 5, 0x768, 1, MX50_SD_PAD_CTRL) | ||
221 | |||
222 | #define MX50_PAD_UART2_RTS__UART2_RTS IOMUX_PAD(0x34C, 0xA0, 0, 0x7c8, 3, MX50_UART_PAD_CTRL) | ||
223 | #define MX50_PAD_UART2_RTS__GPIO_6_13 IOMUX_PAD(0x34C, 0xA0, 1, 0x0, 0, NO_PAD_CTRL) | ||
224 | #define MX50_PAD_UART2_RTS__SD4_CLK IOMUX_PAD(0x34C, 0xA0, 4, 0x748, 1, MX50_SD_PAD_CTRL) | ||
225 | #define MX50_PAD_UART2_RTS__SD4_D7 IOMUX_PAD(0x34C, 0xA0, 5, 0x76c, 1, MX50_SD_PAD_CTRL) | ||
226 | |||
227 | #define MX50_PAD_UART3_TXD__UART3_TXD IOMUX_PAD(0x350, 0xA4, 0, 0x0, 0, MX50_UART_PAD_CTRL) | ||
228 | #define MX50_PAD_UART3_TXD__GPIO_6_14 IOMUX_PAD(0x350, 0xA4, 1, 0x0, 0, NO_PAD_CTRL) | ||
229 | #define MX50_PAD_UART3_TXD__SD1_D4 IOMUX_PAD(0x350, 0xA4, 3, 0x0, 0, MX50_SD_PAD_CTRL) | ||
230 | #define MX50_PAD_UART3_TXD__SD4_D0 IOMUX_PAD(0x350, 0xA4, 4, 0x750, 0, MX50_SD_PAD_CTRL) | ||
231 | #define MX50_PAD_UART3_TXD__SD2_WP IOMUX_PAD(0x350, 0xA4, 5, 0x744, 0, MX50_SD_PAD_CTRL) | ||
232 | #define MX50_PAD_UART3_TXD__WEIM_D12 IOMUX_PAD(0x350, 0xA4, 6, 0x81c, 0, NO_PAD_CTRL) | ||
233 | |||
234 | #define MX50_PAD_UART3_RXD__UART3_RXD IOMUX_PAD(0x354, 0xA8, 0, 0x7d4, 1, MX50_UART_PAD_CTRL) | ||
235 | #define MX50_PAD_UART3_RXD__GPIO_6_15 IOMUX_PAD(0x354, 0xA8, 1, 0x0, 0, NO_PAD_CTRL) | ||
236 | #define MX50_PAD_UART3_RXD__SD1_D5 IOMUX_PAD(0x354, 0xA8, 3, 0x0, 0, MX50_SD_PAD_CTRL) | ||
237 | #define MX50_PAD_UART3_RXD__SD4_D1 IOMUX_PAD(0x354, 0xA8, 4, 0x754, 0, MX50_SD_PAD_CTRL) | ||
238 | #define MX50_PAD_UART3_RXD__SD2_CD IOMUX_PAD(0x354, 0xA8, 5, 0x740, 0, MX50_SD_PAD_CTRL) | ||
239 | #define MX50_PAD_UART3_RXD__WEIM_D13 IOMUX_PAD(0x354, 0xA8, 6, 0x820, 0, NO_PAD_CTRL) | ||
240 | |||
241 | #define MX50_PAD_UART4_TXD__UART4_TXD IOMUX_PAD(0x358, 0xAC, 0, 0x0, 0, MX50_UART_PAD_CTRL) | ||
242 | #define MX50_PAD_UART4_TXD__GPIO_6_16 IOMUX_PAD(0x358, 0xAC, 1, 0x0, 0, NO_PAD_CTRL) | ||
243 | #define MX50_PAD_UART4_TXD__UART3_CTS IOMUX_PAD(0x358, 0xAC, 2, 0x0, 0, MX50_UART_PAD_CTRL) | ||
244 | #define MX50_PAD_UART4_TXD__SD1_D6 IOMUX_PAD(0x358, 0xAC, 3, 0x0, 0, MX50_SD_PAD_CTRL) | ||
245 | #define MX50_PAD_UART4_TXD__SD4_D2 IOMUX_PAD(0x358, 0xAC, 4, 0x758, 0, MX50_SD_PAD_CTRL) | ||
246 | #define MX50_PAD_UART4_TXD__SD2_LCTL IOMUX_PAD(0x358, 0xAC, 5, 0x0, 0, MX50_SD_PAD_CTRL) | ||
247 | #define MX50_PAD_UART4_TXD__WEIM_D14 IOMUX_PAD(0x358, 0xAC, 6, 0x824, 0, NO_PAD_CTRL) | ||
248 | |||
249 | #define MX50_PAD_UART4_RXD__UART4_RXD IOMUX_PAD(0x35C, 0xB0, 0, 0x7dc, 1, MX50_UART_PAD_CTRL) | ||
250 | #define MX50_PAD_UART4_RXD__GPIO_6_17 IOMUX_PAD(0x35C, 0xB0, 1, 0x0, 0, NO_PAD_CTRL) | ||
251 | #define MX50_PAD_UART4_RXD__UART3_RTS IOMUX_PAD(0x35C, 0xB0, 2, 0x7d0, 1, MX50_UART_PAD_CTRL) | ||
252 | #define MX50_PAD_UART4_RXD__SD1_D7 IOMUX_PAD(0x35C, 0xB0, 3, 0x0, 0, MX50_SD_PAD_CTRL) | ||
253 | #define MX50_PAD_UART4_RXD__SD4_D3 IOMUX_PAD(0x35C, 0xB0, 4, 0x75c, 0, MX50_SD_PAD_CTRL) | ||
254 | #define MX50_PAD_UART4_RXD__SD1_LCTL IOMUX_PAD(0x35C, 0xB0, 5, 0x0, 0, MX50_SD_PAD_CTRL) | ||
255 | #define MX50_PAD_UART4_RXD__WEIM_D15 IOMUX_PAD(0x35C, 0xB0, 6, 0x828, 0, NO_PAD_CTRL) | ||
256 | |||
257 | #define MX50_PAD_CSPI_SCLK__CSPI_SCLK IOMUX_PAD(0x360, 0xB4, 0, 0x0, 0, NO_PAD_CTRL) | ||
258 | #define MX50_PAD_CSPI_SCLK__GPIO_4_8 IOMUX_PAD(0x360, 0xB4, 1, 0x0, 0, NO_PAD_CTRL) | ||
259 | |||
260 | #define MX50_PAD_CSPI_MOSI__CSPI_MOSI IOMUX_PAD(0x364, 0xB8, 0, 0x0, 0, NO_PAD_CTRL) | ||
261 | #define MX50_PAD_CSPI_MOSI__GPIO_4_9 IOMUX_PAD(0x364, 0xB8, 1, 0x0, 0, NO_PAD_CTRL) | ||
262 | |||
263 | #define MX50_PAD_CSPI_MISO__CSPI_MISO IOMUX_PAD(0x368, 0xBC, 0, 0x0, 0, NO_PAD_CTRL) | ||
264 | #define MX50_PAD_CSPI_MISO__GPIO_4_10 IOMUX_PAD(0x368, 0xBC, 1, 0x0, 0, NO_PAD_CTRL) | ||
265 | |||
266 | #define MX50_PAD_CSPI_SS0__CSPI_SS0 IOMUX_PAD(0x36C, 0xC0, 0, 0x0, 0, MX50_CSPI_SS_PAD) | ||
267 | #define MX50_PAD_CSPI_SS0__GPIO_4_11 IOMUX_PAD(0x36C, 0xC0, 1, 0x0, 0, NO_PAD_CTRL) | ||
268 | |||
269 | #define MX50_PAD_ECSPI1_SCLK__ECSPI1_SCLK IOMUX_PAD(0x370, 0xC4, 0, 0x0, 0, NO_PAD_CTRL) | ||
270 | #define MX50_PAD_ECSPI1_SCLK__GPIO_4_12 IOMUX_PAD(0x370, 0xC4, 1, 0x0, 0, NO_PAD_CTRL) | ||
271 | #define MX50_PAD_ECSPI1_SCLK__CSPI_RDY IOMUX_PAD(0x370, 0xC4, 2, 0x6e8, 1, NO_PAD_CTRL) | ||
272 | #define MX50_PAD_ECSPI1_SCLK__ECSPI2_RDY IOMUX_PAD(0x370, 0xC4, 3, 0x0, 0, NO_PAD_CTRL) | ||
273 | #define MX50_PAD_ECSPI1_SCLK__UART3_RTS IOMUX_PAD(0x370, 0xC4, 4, 0x7d0, 2, MX50_UART_PAD_CTRL) | ||
274 | #define MX50_PAD_ECSPI1_SCLK__EPDC_SDCE6 IOMUX_PAD(0x370, 0xC4, 5, 0x0, 0, NO_PAD_CTRL) | ||
275 | #define MX50_PAD_ECSPI1_SCLK__WEIM_D8 IOMUX_PAD(0x370, 0xC4, 7, 0x80c, 0, NO_PAD_CTRL) | ||
276 | |||
277 | #define MX50_PAD_ECSPI1_MOSI__ECSPI1_MOSI IOMUX_PAD(0x374, 0xC8, 0, 0x0, 0, NO_PAD_CTRL) | ||
278 | #define MX50_PAD_ECSPI1_MOSI__GPIO_4_13 IOMUX_PAD(0x374, 0xC8, 1, 0x0, 0, NO_PAD_CTRL) | ||
279 | #define MX50_PAD_ECSPI1_MOSI__CSPI_SS1 IOMUX_PAD(0x374, 0xC8, 2, 0x6ec, 1, MX50_CSPI_SS_PAD) | ||
280 | #define MX50_PAD_ECSPI1_MOSI__ECSPI2_SS1 IOMUX_PAD(0x374, 0xC8, 3, 0x0, 0, MX50_CSPI_SS_PAD) | ||
281 | #define MX50_PAD_ECSPI1_MOSI__UART3_CTS IOMUX_PAD(0x374, 0xC8, 4, 0x0, 0, MX50_UART_PAD_CTRL) | ||
282 | #define MX50_PAD_ECSPI1_MOSI__EPDC_SDCE7 IOMUX_PAD(0x374, 0xC8, 5, 0x0, 0, NO_PAD_CTRL) | ||
283 | #define MX50_PAD_ECSPI1_MOSI__WEIM_D9 IOMUX_PAD(0x374, 0xC8, 7, 0x810, 0, NO_PAD_CTRL) | ||
284 | |||
285 | #define MX50_PAD_ECSPI1_MISO__ECSPI1_MISO IOMUX_PAD(0x378, 0xCC, 0, 0x0, 0, NO_PAD_CTRL) | ||
286 | #define MX50_PAD_ECSPI1_MISO__GPIO_4_14 IOMUX_PAD(0x378, 0xCC, 1, 0x0, 0, NO_PAD_CTRL) | ||
287 | #define MX50_PAD_ECSPI1_MISO__CSPI_SS2 IOMUX_PAD(0x378, 0xCC, 2, 0x6f0, 1, MX50_CSPI_SS_PAD) | ||
288 | #define MX50_PAD_ECSPI1_MISO__ECSPI2_SS2 IOMUX_PAD(0x378, 0xCC, 3, 0x0, 0, MX50_CSPI_SS_PAD) | ||
289 | #define MX50_PAD_ECSPI1_MISO__UART4_RTS IOMUX_PAD(0x378, 0xCC, 4, 0x7d8, 0, MX50_UART_PAD_CTRL) | ||
290 | #define MX50_PAD_ECSPI1_MISO__EPDC_SDCE8 IOMUX_PAD(0x378, 0xCC, 5, 0x0, 0, NO_PAD_CTRL) | ||
291 | #define MX50_PAD_ECSPI1_MISO__WEIM_D10 IOMUX_PAD(0x378, 0xCC, 7, 0x814, 0, NO_PAD_CTRL) | ||
292 | |||
293 | #define MX50_PAD_ECSPI1_SS0__ECSPI1_SS0 IOMUX_PAD(0x37C, 0xD0, 0, 0x0, 0, MX50_CSPI_SS_PAD) | ||
294 | #define MX50_PAD_ECSPI1_SS0__GPIO_4_15 IOMUX_PAD(0x37C, 0xD0, 1, 0x0, 0, PAD_CTL_PUS_100K_UP) | ||
295 | #define MX50_PAD_ECSPI1_SS0__CSPI_SS3 IOMUX_PAD(0x37C, 0xD0, 2, 0x6f4, 1, MX50_CSPI_SS_PAD) | ||
296 | #define MX50_PAD_ECSPI1_SS0__ECSPI2_SS3 IOMUX_PAD(0x37C, 0xD0, 3, 0x0, 0, MX50_CSPI_SS_PAD) | ||
297 | #define MX50_PAD_ECSPI1_SS0__UART4_CTS IOMUX_PAD(0x37C, 0xD0, 4, 0x0, 0, MX50_UART_PAD_CTRL) | ||
298 | #define MX50_PAD_ECSPI1_SS0__EPDC_SDCE9 IOMUX_PAD(0x37C, 0xD0, 5, 0x0, 0, NO_PAD_CTRL) | ||
299 | #define MX50_PAD_ECSPI1_SS0__WEIM_D11 IOMUX_PAD(0x37C, 0xD0, 7, 0x818, 0, NO_PAD_CTRL) | ||
300 | |||
301 | #define MX50_PAD_ECSPI2_SCLK__ECSPI2_SCLK IOMUX_PAD(0x380, 0xD4, 0, 0x0, 0, NO_PAD_CTRL) | ||
302 | #define MX50_PAD_ECSPI2_SCLK__GPIO_4_16 IOMUX_PAD(0x380, 0xD4, 1, 0x0, 0, NO_PAD_CTRL) | ||
303 | #define MX50_PAD_ECSPI2_SCLK__ELCDIF_WR IOMUX_PAD(0x380, 0xD4, 2, 0x0, 0, NO_PAD_CTRL) | ||
304 | #define MX50_PAD_ECSPI2_SCLK__ECSPI1_RDY IOMUX_PAD(0x380, 0xD4, 3, 0x0, 0, NO_PAD_CTRL) | ||
305 | #define MX50_PAD_ECSPI2_SCLK__UART5_RTS IOMUX_PAD(0x380, 0xD4, 4, 0x7e0, 0, MX50_UART_PAD_CTRL) | ||
306 | #define MX50_PAD_ECSPI2_SCLK__ELCDIF_DOTCLK IOMUX_PAD(0x380, 0xD4, 5, 0x0, 0, NO_PAD_CTRL) | ||
307 | #define MX50_PAD_ECSPI2_SCLK__NANDF_CEN4 IOMUX_PAD(0x380, 0xD4, 6, 0x0, 0, NO_PAD_CTRL) | ||
308 | #define MX50_PAD_ECSPI2_SCLK__WEIM_D8 IOMUX_PAD(0x380, 0xD4, 7, 0x80c, 1, NO_PAD_CTRL) | ||
309 | |||
310 | #define MX50_PAD_ECSPI2_MOSI__ECSPI2_MOSI IOMUX_PAD(0x384, 0xD8, 0, 0x0, 0, NO_PAD_CTRL) | ||
311 | #define MX50_PAD_ECSPI2_MOSI__GPIO_4_17 IOMUX_PAD(0x384, 0xD8, 1, 0x0, 0, NO_PAD_CTRL) | ||
312 | #define MX50_PAD_ECSPI2_MOSI__ELCDIF_RD IOMUX_PAD(0x384, 0xD8, 2, 0x0, 0, NO_PAD_CTRL) | ||
313 | #define MX50_PAD_ECSPI2_MOSI__ECSPI1_SS1 IOMUX_PAD(0x384, 0xD8, 3, 0x0, 0, MX50_CSPI_SS_PAD) | ||
314 | #define MX50_PAD_ECSPI2_MOSI__UART5_CTS IOMUX_PAD(0x384, 0xD8, 4, 0x0, 0, MX50_UART_PAD_CTRL) | ||
315 | #define MX50_PAD_ECSPI2_MOSI__ELCDIF_EN IOMUX_PAD(0x384, 0xD8, 5, 0x0, 0, NO_PAD_CTRL) | ||
316 | #define MX50_PAD_ECSPI2_MOSI__NANDF_CEN5 IOMUX_PAD(0x384, 0xD8, 6, 0x0, 0, NO_PAD_CTRL) | ||
317 | #define MX50_PAD_ECSPI2_MOSI__WEIM_D9 IOMUX_PAD(0x384, 0xD8, 7, 0x810, 1, NO_PAD_CTRL) | ||
318 | |||
319 | #define MX50_PAD_ECSPI2_MISO__ECSPI2_MISO IOMUX_PAD(0x388, 0xDC, 0, 0x0, 0, NO_PAD_CTRL) | ||
320 | #define MX50_PAD_ECSPI2_MISO__GPIO_4_18 IOMUX_PAD(0x388, 0xDC, 1, 0x0, 0, PAD_CTL_PUS_100K_UP) | ||
321 | #define MX50_PAD_ECSPI2_MISO__ELCDIF_RS IOMUX_PAD(0x388, 0xDC, 2, 0x0, 0, NO_PAD_CTRL) | ||
322 | #define MX50_PAD_ECSPI2_MISO__ECSPI1_SS2 IOMUX_PAD(0x388, 0xDC, 3, 0x0, 0, MX50_CSPI_SS_PAD) | ||
323 | #define MX50_PAD_ECSPI2_MISO__UART5_TXD IOMUX_PAD(0x388, 0xDC, 4, 0x0, 0, MX50_UART_PAD_CTRL) | ||
324 | #define MX50_PAD_ECSPI2_MISO__ELCDIF_VSYNC IOMUX_PAD(0x388, 0xDC, 5, 0x73c, 0, NO_PAD_CTRL) | ||
325 | #define MX50_PAD_ECSPI2_MISO__NANDF_CEN6 IOMUX_PAD(0x388, 0xDC, 6, 0x0, 0, NO_PAD_CTRL) | ||
326 | #define MX50_PAD_ECSPI2_MISO__WEIM_D10 IOMUX_PAD(0x388, 0xDC, 7, 0x814, 1, NO_PAD_CTRL) | ||
327 | |||
328 | #define MX50_PAD_ECSPI2_SS0__ECSPI2_SS0 IOMUX_PAD(0x38C, 0xE0, 0, 0x0, 0, MX50_CSPI_SS_PAD) | ||
329 | #define MX50_PAD_ECSPI2_SS0__GPIO_4_19 IOMUX_PAD(0x38C, 0xE0, 1, 0x0, 0, NO_PAD_CTRL) | ||
330 | #define MX50_PAD_ECSPI2_SS0__ELCDIF_CS IOMUX_PAD(0x38C, 0xE0, 2, 0x0, 0, NO_PAD_CTRL) | ||
331 | #define MX50_PAD_ECSPI2_SS0__ECSPI1_SS3 IOMUX_PAD(0x38C, 0xE0, 3, 0x0, 0, MX50_CSPI_SS_PAD) | ||
332 | #define MX50_PAD_ECSPI2_SS0__UART5_RXD IOMUX_PAD(0x38C, 0xE0, 4, 0x7e4, 5, MX50_UART_PAD_CTRL) | ||
333 | #define MX50_PAD_ECSPI2_SS0__ELCDIF_HSYNC IOMUX_PAD(0x38C, 0xE0, 5, 0x6f8, 0, NO_PAD_CTRL) | ||
334 | #define MX50_PAD_ECSPI2_SS0__NANDF_CEN7 IOMUX_PAD(0x38C, 0xE0, 6, 0x0, 0, NO_PAD_CTRL) | ||
335 | #define MX50_PAD_ECSPI2_SS0__WEIM_D11 IOMUX_PAD(0x38C, 0xE0, 7, 0x818, 1, NO_PAD_CTRL) | ||
336 | |||
337 | #define MX50_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x390, 0xE4, IOMUX_CONFIG_SION, 0x0, 0, MX50_SD_PAD_CTRL) | ||
338 | #define MX50_PAD_SD1_CLK__GPIO_5_0 IOMUX_PAD(0x390, 0xE4, 1, 0x0, 0, NO_PAD_CTRL) | ||
339 | #define MX50_PAD_SD1_CLK__CLKO IOMUX_PAD(0x390, 0xE4, 7, 0x0, 0, NO_PAD_CTRL) | ||
340 | |||
341 | #define MX50_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x394, 0xE8, IOMUX_CONFIG_SION, 0x0, 0, MX50_SD_PAD_CTRL) | ||
342 | #define MX50_PAD_SD1_CMD__GPIO_5_1 IOMUX_PAD(0x394, 0xE8, 1, 0x0, 0, NO_PAD_CTRL) | ||
343 | #define MX50_PAD_SD1_CMD__CLKO2 IOMUX_PAD(0x394, 0xE8, 7, 0x0, 0, NO_PAD_CTRL) | ||
344 | |||
345 | #define MX50_PAD_SD1_D0__SD1_D0 IOMUX_PAD(0x398, 0xEC, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
346 | #define MX50_PAD_SD1_D0__GPIO_5_2 IOMUX_PAD(0x398, 0xEC, 1, 0x0, 0, NO_PAD_CTRL) | ||
347 | #define MX50_PAD_SD1_D0__PLL1_BYP IOMUX_PAD(0x398, 0xEC, 7, 0x6dc, 0, NO_PAD_CTRL) | ||
348 | |||
349 | #define MX50_PAD_SD1_D1__SD1_D1 IOMUX_PAD(0x39C, 0xF0, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
350 | #define MX50_PAD_SD1_D1__GPIO_5_3 IOMUX_PAD(0x39C, 0xF0, 1, 0x0, 0, NO_PAD_CTRL) | ||
351 | #define MX50_PAD_SD1_D1__PLL2_BYP IOMUX_PAD(0x39C, 0xF0, 7, 0x6e0, 0, NO_PAD_CTRL) | ||
352 | |||
353 | #define MX50_PAD_SD1_D2__SD1_D2 IOMUX_PAD(0x3A0, 0xF4, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
354 | #define MX50_PAD_SD1_D2__GPIO_5_4 IOMUX_PAD(0x3A0, 0xF4, 1, 0x0, 0, NO_PAD_CTRL) | ||
355 | #define MX50_PAD_SD1_D2__PLL3_BYP IOMUX_PAD(0x3A0, 0xF4, 7, 0x6e4, 0, NO_PAD_CTRL) | ||
356 | |||
357 | #define MX50_PAD_SD1_D3__SD1_D3 IOMUX_PAD(0x3A4, 0xF8, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
358 | #define MX50_PAD_SD1_D3__GPIO_5_5 IOMUX_PAD(0x3A4, 0xF8, 1, 0x0, 0, NO_PAD_CTRL) | ||
359 | |||
360 | #define MX50_PAD_SD2_CLK__SD2_CLK IOMUX_PAD(0x3A8, 0xFC, IOMUX_CONFIG_SION, 0x0, 0, MX50_SD_PAD_CTRL) | ||
361 | #define MX50_PAD_SD2_CLK__GPIO_5_6 IOMUX_PAD(0x3A8, 0xFC, 1, 0x0, 0, NO_PAD_CTRL) | ||
362 | #define MX50_PAD_SD2_CLK__MSHC_SCLK IOMUX_PAD(0x3A8, 0xFC, 2, 0x0, 0, MX50_SD_PAD_CTRL) | ||
363 | |||
364 | #define MX50_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x3AC, 0x100, IOMUX_CONFIG_SION, 0x0, 0, MX50_SD_PAD_CTRL) | ||
365 | #define MX50_PAD_SD2_CMD__GPIO_5_7 IOMUX_PAD(0x3AC, 0x100, 1, 0x0, 0, NO_PAD_CTRL) | ||
366 | #define MX50_PAD_SD2_CMD__MSHC_BS IOMUX_PAD(0x3AC, 0x100, 2, 0x0, 0, MX50_SD_PAD_CTRL) | ||
367 | |||
368 | #define MX50_PAD_SD2_D0__SD2_D0 IOMUX_PAD(0x3B0, 0x104, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
369 | #define MX50_PAD_SD2_D0__GPIO_5_8 IOMUX_PAD(0x3B0, 0x104, 1, 0x0, 0, NO_PAD_CTRL) | ||
370 | #define MX50_PAD_SD2_D0__MSHC_D0 IOMUX_PAD(0x3B0, 0x104, 2, 0x0, 0, MX50_SD_PAD_CTRL) | ||
371 | #define MX50_PAD_SD2_D0__KEY_COL4 IOMUX_PAD(0x3B0, 0x104, 3, 0x790, 0, NO_PAD_CTRL) | ||
372 | |||
373 | #define MX50_PAD_SD2_D1__SD2_D1 IOMUX_PAD(0x3B4, 0x108, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
374 | #define MX50_PAD_SD2_D1__GPIO_5_9 IOMUX_PAD(0x3B4, 0x108, 1, 0x0, 0, NO_PAD_CTRL) | ||
375 | #define MX50_PAD_SD2_D1__MSHC_D1 IOMUX_PAD(0x3B4, 0x108, 2, 0x0, 0, MX50_SD_PAD_CTRL) | ||
376 | #define MX50_PAD_SD2_D1__KEY_ROW4 IOMUX_PAD(0x3B4, 0x108, 3, 0x7a0, 0, NO_PAD_CTRL) | ||
377 | |||
378 | #define MX50_PAD_SD2_D2__SD2_D2 IOMUX_PAD(0x3B8, 0x10C, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
379 | #define MX50_PAD_SD2_D2__GPIO_5_10 IOMUX_PAD(0x3B8, 0x10C, 1, 0x0, 0, NO_PAD_CTRL) | ||
380 | #define MX50_PAD_SD2_D2__MSHC_D2 IOMUX_PAD(0x3B8, 0x10C, 2, 0x0, 0, MX50_SD_PAD_CTRL) | ||
381 | #define MX50_PAD_SD2_D2__KEY_COL5 IOMUX_PAD(0x3B8, 0x10C, 3, 0x794, 0, NO_PAD_CTRL) | ||
382 | |||
383 | #define MX50_PAD_SD2_D3__SD2_D3 IOMUX_PAD(0x3BC, 0x110, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
384 | #define MX50_PAD_SD2_D3__GPIO_5_11 IOMUX_PAD(0x3BC, 0x110, 1, 0x0, 0, NO_PAD_CTRL) | ||
385 | #define MX50_PAD_SD2_D3__MSHC_D3 IOMUX_PAD(0x3BC, 0x110, 2, 0x0, 0, MX50_SD_PAD_CTRL) | ||
386 | #define MX50_PAD_SD2_D3__KEY_ROW5 IOMUX_PAD(0x3BC, 0x110, 3, 0x7a4, 0, NO_PAD_CTRL) | ||
387 | |||
388 | #define MX50_PAD_SD2_D4__SD2_D4 IOMUX_PAD(0x3C0, 0x114, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
389 | #define MX50_PAD_SD2_D4__GPIO_5_12 IOMUX_PAD(0x3C0, 0x114, 1, 0x0, 0, NO_PAD_CTRL) | ||
390 | #define MX50_PAD_SD2_D4__AUD4_RXFS IOMUX_PAD(0x3C0, 0x114, 2, 0x6d0, 0, NO_PAD_CTRL) | ||
391 | #define MX50_PAD_SD2_D4__KEY_COL6 IOMUX_PAD(0x3C0, 0x114, 3, 0x798, 0, NO_PAD_CTRL) | ||
392 | #define MX50_PAD_SD2_D4__WEIM_D0 IOMUX_PAD(0x3C0, 0x114, 4, 0x7ec, 0, NO_PAD_CTRL) | ||
393 | #define MX50_PAD_SD2_D4__CCM_OUT0 IOMUX_PAD(0x3C0, 0x114, 7, 0x0, 0, NO_PAD_CTRL) | ||
394 | |||
395 | #define MX50_PAD_SD2_D5__SD2_D5 IOMUX_PAD(0x3C4, 0x118, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
396 | #define MX50_PAD_SD2_D5__GPIO_5_13 IOMUX_PAD(0x3C4, 0x118, 1, 0x0, 0, NO_PAD_CTRL) | ||
397 | #define MX50_PAD_SD2_D5__AUD4_RXC IOMUX_PAD(0x3C4, 0x118, 2, 0x6cc, 0, NO_PAD_CTRL) | ||
398 | #define MX50_PAD_SD2_D5__KEY_ROW6 IOMUX_PAD(0x3C4, 0x118, 3, 0x7a8, 0, NO_PAD_CTRL) | ||
399 | #define MX50_PAD_SD2_D5__WEIM_D1 IOMUX_PAD(0x3C4, 0x118, 4, 0x7f0, 0, NO_PAD_CTRL) | ||
400 | #define MX50_PAD_SD2_D5__CCM_OUT1 IOMUX_PAD(0x3C4, 0x118, 7, 0x0, 0, NO_PAD_CTRL) | ||
401 | |||
402 | #define MX50_PAD_SD2_D6__SD2_D6 IOMUX_PAD(0x3C8, 0x11C, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
403 | #define MX50_PAD_SD2_D6__GPIO_5_14 IOMUX_PAD(0x3C8, 0x11C, 1, 0x0, 0, NO_PAD_CTRL) | ||
404 | #define MX50_PAD_SD2_D6__AUD4_RXD IOMUX_PAD(0x3C8, 0x11C, 2, 0x6c4, 0, NO_PAD_CTRL) | ||
405 | #define MX50_PAD_SD2_D6__KEY_COL7 IOMUX_PAD(0x3C8, 0x11C, 3, 0x79c, 0, NO_PAD_CTRL) | ||
406 | #define MX50_PAD_SD2_D6__WEIM_D2 IOMUX_PAD(0x3C8, 0x11C, 4, 0x7f4, 0, NO_PAD_CTRL) | ||
407 | #define MX50_PAD_SD2_D6__CCM_OUT2 IOMUX_PAD(0x3C8, 0x11C, 7, 0x0, 0, NO_PAD_CTRL) | ||
408 | |||
409 | #define MX50_PAD_SD2_D7__SD2_D7 IOMUX_PAD(0x3CC, 0x120, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
410 | #define MX50_PAD_SD2_D7__GPIO_5_15 IOMUX_PAD(0x3CC, 0x120, 1, 0x0, 0, NO_PAD_CTRL) | ||
411 | #define MX50_PAD_SD2_D7__AUD4_TXFS IOMUX_PAD(0x3CC, 0x120, 2, 0x6d8, 0, NO_PAD_CTRL) | ||
412 | #define MX50_PAD_SD2_D7__KEY_ROW7 IOMUX_PAD(0x3CC, 0x120, 3, 0x7ac, 0, NO_PAD_CTRL) | ||
413 | #define MX50_PAD_SD2_D7__WEIM_D3 IOMUX_PAD(0x3CC, 0x120, 4, 0x7f8, 0, NO_PAD_CTRL) | ||
414 | #define MX50_PAD_SD2_D7__CCM_STOP IOMUX_PAD(0x3CC, 0x120, 7, 0x0, 0, NO_PAD_CTRL) | ||
415 | |||
416 | #define MX50_PAD_SD2_WP__SD2_WP IOMUX_PAD(0x3D0, 0x124, 0, 0x744, 1, MX50_SD_PAD_CTRL) | ||
417 | #define MX50_PAD_SD2_WP__GPIO_5_16 IOMUX_PAD(0x3D0, 0x124, 1, 0x0, 0, NO_PAD_CTRL) | ||
418 | #define MX50_PAD_SD2_WP__AUD4_TXD IOMUX_PAD(0x3D0, 0x124, 2, 0x6c8, 0, NO_PAD_CTRL) | ||
419 | #define MX50_PAD_SD2_WP__WEIM_D4 IOMUX_PAD(0x3D0, 0x124, 4, 0x7fc, 0, NO_PAD_CTRL) | ||
420 | #define MX50_PAD_SD2_WP__CCM_WAIT IOMUX_PAD(0x3D0, 0x124, 7, 0x0, 0, NO_PAD_CTRL) | ||
421 | |||
422 | #define MX50_PAD_SD2_CD__SD2_CD IOMUX_PAD(0x3D4, 0x128, 0, 0x740, 1, MX50_SD_PAD_CTRL) | ||
423 | #define MX50_PAD_SD2_CD__GPIO_5_17 IOMUX_PAD(0x3D4, 0x128, 1, 0x0, 0, NO_PAD_CTRL) | ||
424 | #define MX50_PAD_SD2_CD__AUD4_TXC IOMUX_PAD(0x3D4, 0x128, 2, 0x6d4, 0, NO_PAD_CTRL) | ||
425 | #define MX50_PAD_SD2_CD__WEIM_D5 IOMUX_PAD(0x3D4, 0x128, 4, 0x800, 0, NO_PAD_CTRL) | ||
426 | #define MX50_PAD_SD2_CD__CCM_REF_EN IOMUX_PAD(0x3D4, 0x128, 7, 0x0, 0, NO_PAD_CTRL) | ||
427 | |||
428 | #define MX50_PAD_PMIC_ON_REQ__PMIC_ON_REQ IOMUX_PAD(0x3D8, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
429 | |||
430 | #define MX50_PAD_PMIC_STBY_REQ__PMIC_STBY_REQ IOMUX_PAD(0x3DC, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
431 | |||
432 | #define MX50_PAD_PMIC_PORT_B__PMIC_PORT_B IOMUX_PAD(0x3E0, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
433 | |||
434 | #define MX50_PAD_PMIC_BOOT_MODE1__PMIC_BOOT_MODE1 IOMUX_PAD(0x3E4, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
435 | |||
436 | #define MX50_PAD_PMIC_RESET_IN_B__PMIC_RESET_IN_B IOMUX_PAD(0x3E8, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
437 | |||
438 | #define MX50_PAD_PMIC_BOOT_MODE0__PMIC_BOOT_MODE0 IOMUX_PAD(0x3EC, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
439 | |||
440 | #define MX50_PAD_PMIC_TEST_MODE__PMIC_TEST_MODE IOMUX_PAD(0x3F0, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
441 | |||
442 | #define MX50_PAD_PMIC_JTAG_TMS__PMIC_JTAG_TMS IOMUX_PAD(0x3F4, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
443 | |||
444 | #define MX50_PAD_PMIC_JTAG_MOD__PMIC_JTAG_MOD IOMUX_PAD(0x3F8, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
445 | |||
446 | #define MX50_PAD_PMIC_JTAG_TRSTB__PMIC_JTAG_TRSTB IOMUX_PAD(0x3FC, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
447 | |||
448 | #define MX50_PAD_PMIC_JTAG_TDI__PMIC_JTAG_TDI IOMUX_PAD(0x400, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
449 | |||
450 | #define MX50_PAD_PMIC_JTAG_TCK__PMIC_JTAG_TCK IOMUX_PAD(0x404, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
451 | |||
452 | #define MX50_PAD_PMIC_JTAG_TDO__PMIC_JTAG_TDO IOMUX_PAD(0x408, 0, 0, 0x0, 0, NO_PAD_CTRL) | ||
453 | |||
454 | #define MX50_PAD_DISP_D0__DISP_D0 IOMUX_PAD(0x40C, 0x12C, 0, 0x6fc, 0, MX50_ELCDIF_PAD_CTRL) | ||
455 | #define MX50_PAD_DISP_D0__GPIO_2_0 IOMUX_PAD(0x40C, 0x12C, 1, 0x0, 0, NO_PAD_CTRL) | ||
456 | #define MX50_PAD_DISP_D0__FEC_TXCLK IOMUX_PAD(0x40C, 0x12C, 2, 0x78c, 0, PAD_CTL_HYS | PAD_CTL_PKE) | ||
457 | |||
458 | #define MX50_PAD_DISP_D1__DISP_D1 IOMUX_PAD(0x410, 0x130, 0, 0x700, 0, MX50_ELCDIF_PAD_CTRL) | ||
459 | #define MX50_PAD_DISP_D1__GPIO_2_1 IOMUX_PAD(0x410, 0x130, 1, 0x0, 0, NO_PAD_CTRL) | ||
460 | #define MX50_PAD_DISP_D1__FEC_RX_ER IOMUX_PAD(0x410, 0x130, 2, 0x788, 0, PAD_CTL_HYS | PAD_CTL_PKE) | ||
461 | #define MX50_PAD_DISP_D1__WEIM_A17 IOMUX_PAD(0x410, 0x130, 3, 0x0, 0, NO_PAD_CTRL) | ||
462 | |||
463 | #define MX50_PAD_DISP_D2__DISP_D2 IOMUX_PAD(0x414, 0x134, 0, 0x704, 0, MX50_ELCDIF_PAD_CTRL) | ||
464 | #define MX50_PAD_DISP_D2__GPIO_2_2 IOMUX_PAD(0x414, 0x134, 1, 0x0, 0, NO_PAD_CTRL) | ||
465 | #define MX50_PAD_DISP_D2__FEC_RX_DV IOMUX_PAD(0x414, 0x134, 2, 0x784, 0, PAD_CTL_HYS | PAD_CTL_PKE) | ||
466 | #define MX50_PAD_DISP_D2__WEIM_A18 IOMUX_PAD(0x414, 0x134, 3, 0x0, 0, NO_PAD_CTRL) | ||
467 | |||
468 | #define MX50_PAD_DISP_D3__DISP_D3 IOMUX_PAD(0x418, 0x138, 0, 0x708, 0, MX50_ELCDIF_PAD_CTRL) | ||
469 | #define MX50_PAD_DISP_D3__GPIO_2_3 IOMUX_PAD(0x418, 0x138, 1, 0x0, 0, NO_PAD_CTRL) | ||
470 | #define MX50_PAD_DISP_D3__FEC_RXD1 IOMUX_PAD(0x418, 0x138, 2, 0x77C, 0, PAD_CTL_HYS | PAD_CTL_PKE) | ||
471 | #define MX50_PAD_DISP_D3__WEIM_A19 IOMUX_PAD(0x418, 0x138, 3, 0x0, 0, NO_PAD_CTRL) | ||
472 | #define MX50_PAD_DISP_D3__FEC_COL IOMUX_PAD(0x418, 0x138, 4, 0x770, 1, NO_PAD_CTRL) | ||
473 | |||
474 | #define MX50_PAD_DISP_D4__DISP_D4 IOMUX_PAD(0x41C, 0x13C, 0, 0x70c, 0, MX50_ELCDIF_PAD_CTRL) | ||
475 | #define MX50_PAD_DISP_D4__GPIO_2_4 IOMUX_PAD(0x41C, 0x13C, 1, 0x0, 0, NO_PAD_CTRL) | ||
476 | #define MX50_PAD_DISP_D4__FEC_RXD0 IOMUX_PAD(0x41C, 0x13C, 2, 0x778, 0, PAD_CTL_HYS | PAD_CTL_PKE) | ||
477 | #define MX50_PAD_DISP_D4__WEIM_A20 IOMUX_PAD(0x41C, 0x13C, 3, 0x0, 0, NO_PAD_CTRL) | ||
478 | |||
479 | #define MX50_PAD_DISP_D5__DISP_D5 IOMUX_PAD(0x420, 0x140, 0, 0x710, 0, MX50_ELCDIF_PAD_CTRL) | ||
480 | #define MX50_PAD_DISP_D5__GPIO_2_5 IOMUX_PAD(0x420, 0x140, 1, 0x0, 0, NO_PAD_CTRL) | ||
481 | #define MX50_PAD_DISP_D5__FEC_TX_EN IOMUX_PAD(0x420, 0x140, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
482 | #define MX50_PAD_DISP_D5__WEIM_A21 IOMUX_PAD(0x420, 0x140, 3, 0x0, 0, NO_PAD_CTRL) | ||
483 | |||
484 | #define MX50_PAD_DISP_D6__DISP_D6 IOMUX_PAD(0x424, 0x144, 0, 0x714, 0, MX50_ELCDIF_PAD_CTRL) | ||
485 | #define MX50_PAD_DISP_D6__GPIO_2_6 IOMUX_PAD(0x424, 0x144, 1, 0x0, 0, NO_PAD_CTRL) | ||
486 | #define MX50_PAD_DISP_D6__FEC_TXD1 IOMUX_PAD(0x424, 0x144, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
487 | #define MX50_PAD_DISP_D6__WEIM_A22 IOMUX_PAD(0x424, 0x144, 3, 0x0, 0, NO_PAD_CTRL) | ||
488 | #define MX50_PAD_DISP_D6__FEC_RX_CLK IOMUX_PAD(0x424, 0x144, 4, 0x780, 1, NO_PAD_CTRL) | ||
489 | |||
490 | #define MX50_PAD_DISP_D7__DISP_D7 IOMUX_PAD(0x428, 0x148, 0, 0x718, 0, MX50_ELCDIF_PAD_CTRL) | ||
491 | #define MX50_PAD_DISP_D7__GPIO_2_7 IOMUX_PAD(0x428, 0x148, 1, 0x0, 0, NO_PAD_CTRL) | ||
492 | #define MX50_PAD_DISP_D7__FEC_TXD0 IOMUX_PAD(0x428, 0x148, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
493 | #define MX50_PAD_DISP_D7__WEIM_A23 IOMUX_PAD(0x428, 0x148, 3, 0x0, 0, NO_PAD_CTRL) | ||
494 | |||
495 | |||
496 | #define MX50_PAD_DISP_WR__ELCDIF_WR IOMUX_PAD(0x42C, 0x14C, 0, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
497 | #define MX50_PAD_DISP_WR__GPIO_2_16 IOMUX_PAD(0x42C, 0x14C, 1, 0x0, 0, NO_PAD_CTRL) | ||
498 | #define MX50_PAD_DISP_WR__ELCDIF_PIXCLK IOMUX_PAD(0x42C, 0x14C, 2, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
499 | #define MX50_PAD_DISP_WR__WEIM_A24 IOMUX_PAD(0x42C, 0x14C, 3, 0x0, 0, NO_PAD_CTRL) | ||
500 | |||
501 | #define MX50_PAD_DISP_RD__ELCDIF_RD IOMUX_PAD(0x430, 0x150, 0, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
502 | #define MX50_PAD_DISP_RD__GPIO_2_19 IOMUX_PAD(0x430, 0x150, 1, 0x0, 0, NO_PAD_CTRL) | ||
503 | #define MX50_PAD_DISP_RD__ELCDIF_EN IOMUX_PAD(0x430, 0x150, 2, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
504 | #define MX50_PAD_DISP_RD__WEIM_A25 IOMUX_PAD(0x430, 0x150, 3, 0x0, 0, NO_PAD_CTRL) | ||
505 | |||
506 | #define MX50_PAD_DISP_RS__ELCDIF_RS IOMUX_PAD(0x434, 0x154, 0, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
507 | #define MX50_PAD_DISP_RS__GPIO_2_17 IOMUX_PAD(0x434, 0x154, 1, 0x0, 0, NO_PAD_CTRL) | ||
508 | #define MX50_PAD_DISP_RS__ELCDIF_VSYNC IOMUX_PAD(0x434, 0x154, 2, 0x73c, 1, MX50_ELCDIF_PAD_CTRL) | ||
509 | #define MX50_PAD_DISP_RS__WEIM_A26 IOMUX_PAD(0x434, 0x154, 3, 0x0, 0, NO_PAD_CTRL) | ||
510 | |||
511 | #define MX50_PAD_DISP_CS__ELCDIF_CS IOMUX_PAD(0x438, 0x158, 0, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
512 | #define MX50_PAD_DISP_CS__GPIO_2_21 IOMUX_PAD(0x438, 0x158, 1, 0x0, 0, NO_PAD_CTRL) | ||
513 | #define MX50_PAD_DISP_CS__ELCDIF_HSYNC IOMUX_PAD(0x438, 0x158, 2, 0x6f8, 1, MX50_ELCDIF_PAD_CTRL) | ||
514 | #define MX50_PAD_DISP_CS__WEIM_A27 IOMUX_PAD(0x438, 0x158, 3, 0x0, 0, NO_PAD_CTRL) | ||
515 | #define MX50_PAD_DISP_CS__WEIM_CS3 IOMUX_PAD(0x438, 0x158, 4, 0x0, 0, NO_PAD_CTRL) | ||
516 | |||
517 | #define MX50_PAD_DISP_BUSY__ELCDIF_HSYNC IOMUX_PAD(0x43C, 0x15C, 0, 0x6f8, 2, MX50_ELCDIF_PAD_CTRL) | ||
518 | #define MX50_PAD_DISP_BUSY__GPIO_2_18 IOMUX_PAD(0x43C, 0x15C, 1, 0x0, 0, NO_PAD_CTRL) | ||
519 | #define MX50_PAD_DISP_BUSY__WEIM_CS3 IOMUX_PAD(0x43C, 0x15C, 3, 0x0, 0, NO_PAD_CTRL) | ||
520 | |||
521 | #define MX50_PAD_DISP_RESET__ELCDIF_RST IOMUX_PAD(0x440, 0x160, 0, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
522 | #define MX50_PAD_DISP_RESET__GPIO_2_20 IOMUX_PAD(0x440, 0x160, 1, 0x0, 0, NO_PAD_CTRL) | ||
523 | #define MX50_PAD_DISP_RESET__WEIM_CS3 IOMUX_PAD(0x440, 0x160, 4, 0x0, 0, NO_PAD_CTRL) | ||
524 | |||
525 | #define MX50_PAD_SD3_CMD__SD3_CMD IOMUX_PAD(0x444, 0x164, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
526 | #define MX50_PAD_SD3_CMD__GPIO_5_18 IOMUX_PAD(0x444, 0x164, 1, 0x0, 0, NO_PAD_CTRL) | ||
527 | #define MX50_PIN_SD3_CMD__NANDF_WRN IOMUX_PAD(0x444, 0x164, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
528 | #define MX50_PAD_SD3_CMD__SSP_CMD IOMUX_PAD(0x444, 0x164, 3, 0x0, 0, NO_PAD_CTRL) | ||
529 | |||
530 | #define MX50_PAD_SD3_CLK__SD3_CLK IOMUX_PAD(0x448, 0x168, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
531 | #define MX50_PAD_SD3_CLK__GPIO_5_19 IOMUX_PAD(0x448, 0x168, 1, 0x0, 0, NO_PAD_CTRL) | ||
532 | #define MX50_PIN_SD3_CLK__NANDF_RDN IOMUX_PAD(0x448, 0x168, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
533 | #define MX50_PAD_SD3_CLK__SSP_CLK IOMUX_PAD(0x448, 0x168, 3, 0x0, 0, NO_PAD_CTRL) | ||
534 | |||
535 | #define MX50_PAD_SD3_D0__SD3_D0 IOMUX_PAD(0x44C, 0x16C, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
536 | #define MX50_PAD_SD3_D0__GPIO_5_20 IOMUX_PAD(0x44C, 0x16C, 1, 0x0, 0, NO_PAD_CTRL) | ||
537 | #define MX50_PIN_SD3_D0__NANDF_D4 IOMUX_PAD(0x44C, 0x16C, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
538 | #define MX50_PAD_SD3_D0__SSP_D0 IOMUX_PAD(0x44C, 0x16C, 3, 0x0, 0, NO_PAD_CTRL) | ||
539 | #define MX50_PAD_SD3_D0__PLL1_BYP IOMUX_PAD(0x44C, 0x16C, 7, 0x6dc, 1, NO_PAD_CTRL) | ||
540 | |||
541 | #define MX50_PAD_SD3_D1__SD3_D1 IOMUX_PAD(0x450, 0x170, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
542 | #define MX50_PAD_SD3_D1__GPIO_5_21 IOMUX_PAD(0x450, 0x170, 1, 0x0, 0, NO_PAD_CTRL) | ||
543 | #define MX50_PIN_SD3_D1__NANDF_D5 IOMUX_PAD(0x450, 0x170, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
544 | #define MX50_PAD_SD3_D1__PLL2_BYP IOMUX_PAD(0x450, 0x170, 7, 0x6e0, 1, NO_PAD_CTRL) | ||
545 | |||
546 | #define MX50_PAD_SD3_D2__SD3_D2 IOMUX_PAD(0x454, 0x174, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
547 | #define MX50_PAD_SD3_D2__GPIO_5_22 IOMUX_PAD(0x454, 0x174, 1, 0x0, 0, NO_PAD_CTRL) | ||
548 | #define MX50_PIN_SD3_D2__NANDF_D6 IOMUX_PAD(0x454, 0x174, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
549 | #define MX50_PAD_SD3_D2__SSP_D2 IOMUX_PAD(0x454, 0x174, 3, 0x0, 0, NO_PAD_CTRL) | ||
550 | #define MX50_PAD_SD3_D2__PLL3_BYP IOMUX_PAD(0x454, 0x174, 7, 0x6e4, 1, NO_PAD_CTRL) | ||
551 | |||
552 | #define MX50_PAD_SD3_D3__SD3_D3 IOMUX_PAD(0x458, 0x178, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
553 | #define MX50_PAD_SD3_D3__GPIO_5_23 IOMUX_PAD(0x458, 0x178, 1, 0x0, 0, NO_PAD_CTRL) | ||
554 | #define MX50_PIN_SD3_D3__NANDF_D7 IOMUX_PAD(0x458, 0x178, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
555 | #define MX50_PAD_SD3_D3__SSP_D3 IOMUX_PAD(0x458, 0x178, 3, 0x0, 0, NO_PAD_CTRL) | ||
556 | |||
557 | #define MX50_PAD_SD3_D4__SD3_D4 IOMUX_PAD(0x45C, 0x17C, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
558 | #define MX50_PAD_SD3_D4__GPIO_5_24 IOMUX_PAD(0x45C, 0x17C, 1, 0x0, 0, NO_PAD_CTRL) | ||
559 | #define MX50_PIN_SD3_D4__NANDF_D0 IOMUX_PAD(0x45C, 0x17C, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
560 | #define MX50_PAD_SD3_D4__SSP_D4 IOMUX_PAD(0x45C, 0x17C, 1, 0x0, 0, NO_PAD_CTRL) | ||
561 | |||
562 | #define MX50_PAD_SD3_D5__SD3_D5 IOMUX_PAD(0x460, 0x180, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
563 | #define MX50_PAD_SD3_D5__GPIO_5_25 IOMUX_PAD(0x460, 0x180, 1, 0x0, 0, NO_PAD_CTRL) | ||
564 | #define MX50_PIN_SD3_D5__NANDF_D1 IOMUX_PAD(0x460, 0x180, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
565 | #define MX50_PAD_SD3_D5__SSP_D5 IOMUX_PAD(0x460, 0x180, 3, 0x0, 0, NO_PAD_CTRL) | ||
566 | |||
567 | #define MX50_PAD_SD3_D6__SD3_D6 IOMUX_PAD(0x464, 0x184, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
568 | #define MX50_PAD_SD3_D6__GPIO_5_26 IOMUX_PAD(0x464, 0x184, 1, 0x0, 0, NO_PAD_CTRL) | ||
569 | #define MX50_PIN_SD3_D6__NANDF_D2 IOMUX_PAD(0x464, 0x184, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
570 | #define MX50_PAD_SD3_D6__SSP_D6 IOMUX_PAD(0x464, 0x184, 3, 0x0, 0, NO_PAD_CTRL) | ||
571 | |||
572 | #define MX50_PAD_SD3_D7__SD3_D7 IOMUX_PAD(0x468, 0x188, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
573 | #define MX50_PAD_SD3_D7__GPIO_5_27 IOMUX_PAD(0x468, 0x188, 1, 0x0, 0, NO_PAD_CTRL) | ||
574 | #define MX50_PIN_SD3_D7__NANDF_D3 IOMUX_PAD(0x468, 0x188, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
575 | #define MX50_PAD_SD3_D7__SSP_D7 IOMUX_PAD(0x468, 0x188, 3, 0x0, 0, NO_PAD_CTRL) | ||
576 | |||
577 | #define MX50_PAD_SD3_WP__SD3_WP IOMUX_PAD(0x46C, 0x18C, 0, 0x0, 0, MX50_SD_PAD_CTRL) | ||
578 | #define MX50_PAD_SD3_WP__GPIO_5_28 IOMUX_PAD(0x46C, 0x18C, 1, 0x0, 0, NO_PAD_CTRL) | ||
579 | #define MX50_PIN_SD3_WP__NANDF_RESETN IOMUX_PAD(0x46C, 0x18C, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
580 | #define MX50_PAD_SD3_WP__SSP_CD IOMUX_PAD(0x46C, 0x18C, 3, 0x0, 0, NO_PAD_CTRL) | ||
581 | #define MX50_PAD_SD3_WP__SD4_LCTL IOMUX_PAD(0x46C, 0x18C, 4, 0x0, 0, MX50_SD_PAD_CTRL) | ||
582 | #define MX50_PAD_SD3_WP__WEIM_CS3 IOMUX_PAD(0x46C, 0x18C, 5, 0x0, 0, NO_PAD_CTRL) | ||
583 | |||
584 | #define MX50_PAD_DISP_D8__DISP_D8 IOMUX_PAD(0x470, 0x190, 0, 0x71c, 0, MX50_ELCDIF_PAD_CTRL) | ||
585 | #define MX50_PAD_DISP_D8__GPIO_2_8 IOMUX_PAD(0x470, 0x190, 1, 0x0, 0, NO_PAD_CTRL) | ||
586 | #define MX50_PAD_DISP_D8__NANDF_CLE IOMUX_PAD(0x470, 0x190, 2, 0x0, 0, NO_PAD_CTRL) | ||
587 | #define MX50_PAD_DISP_D8__SD1_LCTL IOMUX_PAD(0x470, 0x190, 3, 0x0, 0, MX50_SD_PAD_CTRL) | ||
588 | #define MX50_PAD_DISP_D8__SD4_CMD IOMUX_PAD(0x470, 0x190, 4, 0x74c, 2, MX50_SD_PAD_CTRL) | ||
589 | #define MX50_PAD_DISP_D8__KEY_COL4 IOMUX_PAD(0x470, 0x190, 5, 0x790, 1, NO_PAD_CTRL) | ||
590 | #define MX50_PAD_DISP_D8__FEC_TX_CLK IOMUX_PAD(0x470, 0x190, 6, 0x78c, 1, NO_PAD_CTRL) | ||
591 | |||
592 | #define MX50_PAD_DISP_D9__DISP_D9 IOMUX_PAD(0x474, 0x194, 0, 0x720, 0, MX50_ELCDIF_PAD_CTRL) | ||
593 | #define MX50_PAD_DISP_D9__GPIO_2_9 IOMUX_PAD(0x474, 0x194, 1, 0x0, 0, NO_PAD_CTRL) | ||
594 | #define MX50_PAD_DISP_D9__NANDF_ALE IOMUX_PAD(0x474, 0x194, 2, 0x0, 0, NO_PAD_CTRL) | ||
595 | #define MX50_PAD_DISP_D9__SD2_LCTL IOMUX_PAD(0x474, 0x194, 3, 0x0, 0, MX50_SD_PAD_CTRL) | ||
596 | #define MX50_PAD_DISP_D9__SD4_CLK IOMUX_PAD(0x474, 0x194, 4, 0x748, 2, MX50_SD_PAD_CTRL) | ||
597 | #define MX50_PAD_DISP_D9__KEY_ROW4 IOMUX_PAD(0x474, 0x194, 5, 0x7a0, 1, NO_PAD_CTRL) | ||
598 | #define MX50_PAD_DISP_D9__FEC_RX_ER IOMUX_PAD(0x474, 0x194, 6, 0x788, 1, NO_PAD_CTRL) | ||
599 | |||
600 | #define MX50_PAD_DISP_D10__DISP_D10 IOMUX_PAD(0x478, 0x198, 0, 0x724, 0, MX50_ELCDIF_PAD_CTRL) | ||
601 | #define MX50_PAD_DISP_D10__GPIO_2_10 IOMUX_PAD(0x478, 0x198, 1, 0x0, 0, NO_PAD_CTRL) | ||
602 | #define MX50_PAD_DISP_D10__NANDF_CEN0 IOMUX_PAD(0x478, 0x198, 2, 0x0, 0, NO_PAD_CTRL) | ||
603 | #define MX50_PAD_DISP_D10__SD3_LCTL IOMUX_PAD(0x478, 0x198, 3, 0x0, 0, MX50_SD_PAD_CTRL) | ||
604 | #define MX50_PAD_DISP_D10__SD4_D0 IOMUX_PAD(0x478, 0x198, 4, 0x750, 1, MX50_SD_PAD_CTRL) | ||
605 | #define MX50_PAD_DISP_D10__KEY_COL5 IOMUX_PAD(0x478, 0x198, 5, 0x794, 1, NO_PAD_CTRL) | ||
606 | #define MX50_PAD_DISP_D10__FEC_RX_DV IOMUX_PAD(0x478, 0x198, 6, 0x784, 1, NO_PAD_CTRL) | ||
607 | |||
608 | #define MX50_PAD_DISP_D11__DISP_D11 IOMUX_PAD(0x47C, 0x19C, 0, 0x728, 0, MX50_ELCDIF_PAD_CTRL) | ||
609 | #define MX50_PAD_DISP_D11__GPIO_2_11 IOMUX_PAD(0x47C, 0x19C, 1, 0x0, 0, NO_PAD_CTRL) | ||
610 | #define MX50_PAD_DISP_D11__NANDF_CEN1 IOMUX_PAD(0x47C, 0x19C, 2, 0x0, 0, NO_PAD_CTRL) | ||
611 | #define MX50_PAD_DISP_D11__SD4_D1 IOMUX_PAD(0x47C, 0x19C, 4, 0x754, 1, MX50_SD_PAD_CTRL) | ||
612 | #define MX50_PAD_DISP_D11__KEY_ROW5 IOMUX_PAD(0x47C, 0x19C, 5, 0x7a4, 1, NO_PAD_CTRL) | ||
613 | #define MX50_PAD_DISP_D11__FEC_RDAT1 IOMUX_PAD(0x47C, 0x19C, 6, 0x77c, 1, NO_PAD_CTRL) | ||
614 | |||
615 | #define MX50_PAD_DISP_D12__DISP_D12 IOMUX_PAD(0x480, 0x1A0, 0, 0x72c, 0, MX50_ELCDIF_PAD_CTRL) | ||
616 | #define MX50_PAD_DISP_D12__GPIO_2_12 IOMUX_PAD(0x480, 0x1A0, 1, 0x0, 0, NO_PAD_CTRL) | ||
617 | #define MX50_PAD_DISP_D12__NANDF_CEN2 IOMUX_PAD(0x480, 0x1A0, 2, 0x0, 0, NO_PAD_CTRL) | ||
618 | #define MX50_PAD_DISP_D12__SD1_CD IOMUX_PAD(0x480, 0x1A0, 3, 0x0, 0, MX50_SD_PAD_CTRL) | ||
619 | #define MX50_PAD_DISP_D12__SD4_D2 IOMUX_PAD(0x480, 0x1A0, 4, 0x758, 1, MX50_SD_PAD_CTRL) | ||
620 | #define MX50_PAD_DISP_D12__KEY_COL6 IOMUX_PAD(0x480, 0x1A0, 5, 0x798, 1, NO_PAD_CTRL) | ||
621 | #define MX50_PAD_DISP_D12__FEC_RDAT0 IOMUX_PAD(0x480, 0x1A0, 6, 0x778, 1, NO_PAD_CTRL) | ||
622 | |||
623 | #define MX50_PAD_DISP_D13__DISP_D13 IOMUX_PAD(0x484, 0x1A4, 0, 0x730, 0, MX50_ELCDIF_PAD_CTRL) | ||
624 | #define MX50_PAD_DISP_D13__GPIO_2_13 IOMUX_PAD(0x484, 0x1A4, 1, 0x0, 0, NO_PAD_CTRL) | ||
625 | #define MX50_PAD_DISP_D13__NANDF_CEN3 IOMUX_PAD(0x484, 0x1A4, 2, 0x0, 0, NO_PAD_CTRL) | ||
626 | #define MX50_PAD_DISP_D13__SD3_CD IOMUX_PAD(0x484, 0x1A4, 3, 0x0, 0, MX50_SD_PAD_CTRL) | ||
627 | #define MX50_PAD_DISP_D13__SD4_D3 IOMUX_PAD(0x484, 0x1A4, 4, 0x75c, 1, MX50_SD_PAD_CTRL) | ||
628 | #define MX50_PAD_DISP_D13__KEY_ROW6 IOMUX_PAD(0x484, 0x1A4, 5, 0x7a8, 1, NO_PAD_CTRL) | ||
629 | #define MX50_PAD_DISP_D13__FEC_TX_EN IOMUX_PAD(0x484, 0x1A4, 6, 0x0, 0, NO_PAD_CTRL) | ||
630 | |||
631 | #define MX50_PAD_DISP_D14__DISP_D14 IOMUX_PAD(0x488, 0x1A8, 0, 0x734, 0, MX50_ELCDIF_PAD_CTRL) | ||
632 | #define MX50_PAD_DISP_D14__GPIO_2_14 IOMUX_PAD(0x488, 0x1A8, 1, 0x0, 0, NO_PAD_CTRL) | ||
633 | #define MX50_PAD_DISP_D14__NANDF_RDY0 IOMUX_PAD(0x488, 0x1A8, 2, 0x7b4, 1, NO_PAD_CTRL) | ||
634 | #define MX50_PAD_DISP_D14__SD1_WP IOMUX_PAD(0x488, 0x1A8, 3, 0x0, 0, MX50_SD_PAD_CTRL) | ||
635 | #define MX50_PAD_DISP_D14__SD4_WP IOMUX_PAD(0x488, 0x1A8, 4, 0x0, 0, MX50_SD_PAD_CTRL) | ||
636 | #define MX50_PAD_DISP_D14__KEY_COL7 IOMUX_PAD(0x488, 0x1A8, 5, 0x79c, 1, NO_PAD_CTRL) | ||
637 | #define MX50_PAD_DISP_D14__FEC_TDAT1 IOMUX_PAD(0x488, 0x1A8, 6, 0x0, 0, NO_PAD_CTRL) | ||
638 | |||
639 | #define MX50_PAD_DISP_D15__DISP_D15 IOMUX_PAD(0x48C, 0x1AC, 0, 0x738, 0, MX50_ELCDIF_PAD_CTRL) | ||
640 | #define MX50_PAD_DISP_D15__GPIO_2_15 IOMUX_PAD(0x48C, 0x1AC, 1, 0x0, 0, NO_PAD_CTRL) | ||
641 | #define MX50_PAD_DISP_D15__NANDF_DQS IOMUX_PAD(0x48C, 0x1AC, 2, 0x7b0, 1, NO_PAD_CTRL) | ||
642 | #define MX50_PAD_DISP_D15__SD3_RST IOMUX_PAD(0x48C, 0x1AC, 3, 0x0, 0, MX50_SD_PAD_CTRL) | ||
643 | #define MX50_PAD_DISP_D15__SD4_CD IOMUX_PAD(0x48C, 0x1AC, 4, 0x0, 0, MX50_SD_PAD_CTRL) | ||
644 | #define MX50_PAD_DISP_D15__KEY_ROW7 IOMUX_PAD(0x48C, 0x1AC, 5, 0x7ac, 1, NO_PAD_CTRL) | ||
645 | #define MX50_PAD_DISP_D15__FEC_TDAT0 IOMUX_PAD(0x48C, 0x1AC, 6, 0x0, 0, NO_PAD_CTRL) | ||
646 | |||
647 | #define MX50_PAD_EPDC_D0__EPDC_D0 IOMUX_PAD(0x54C, 0x1B0, 0, 0x0, 0, NO_PAD_CTRL) | ||
648 | #define MX50_PAD_EPDC_D0__GPIO_3_0 IOMUX_PAD(0x54C, 0x1B0, 1, 0x0, 0, NO_PAD_CTRL) | ||
649 | #define MX50_PAD_EPDC_D0__WEIM_D0 IOMUX_PAD(0x54C, 0x1B0, 2, 0x7ec, 1, NO_PAD_CTRL) | ||
650 | #define MX50_PAD_EPDC_D0__ELCDIF_RS IOMUX_PAD(0x54C, 0x1B0, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
651 | #define MX50_PAD_EPDC_D0__ELCDIF_PIXCLK IOMUX_PAD(0x54C, 0x1B0, 4, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
652 | |||
653 | #define MX50_PAD_EPDC_D1__EPDC_D1 IOMUX_PAD(0x550, 0x1B4, 0, 0x0, 0, NO_PAD_CTRL) | ||
654 | #define MX50_PAD_EPDC_D1__GPIO_3_1 IOMUX_PAD(0x550, 0x1B4, 1, 0x0, 0, NO_PAD_CTRL) | ||
655 | #define MX50_PAD_EPDC_D1__WEIM_D1 IOMUX_PAD(0x550, 0x1B4, 2, 0x7f0, 1, NO_PAD_CTRL) | ||
656 | #define MX50_PAD_EPDC_D1__ELCDIF_CS IOMUX_PAD(0x550, 0x1B4, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
657 | #define MX50_PAD_EPDC_D1__ELCDIF_EN IOMUX_PAD(0x550, 0x1B4, 4, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
658 | |||
659 | #define MX50_PAD_EPDC_D2__EPDC_D2 IOMUX_PAD(0x554, 0x1B8, 0, 0x0, 0, NO_PAD_CTRL) | ||
660 | #define MX50_PAD_EPDC_D2__GPIO_3_2 IOMUX_PAD(0x554, 0x1B8, 1, 0x0, 0, NO_PAD_CTRL) | ||
661 | #define MX50_PAD_EPDC_D2__WEIM_D2 IOMUX_PAD(0x554, 0x1B8, 2, 0x7f4, 1, NO_PAD_CTRL) | ||
662 | #define MX50_PAD_EPDC_D2__ELCDIF_WR IOMUX_PAD(0x554, 0x1B8, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
663 | #define MX50_PAD_EPDC_D2__ELCDIF_VSYNC IOMUX_PAD(0x554, 0x1B8, 4, 0x73c, 2, MX50_ELCDIF_PAD_CTRL) | ||
664 | |||
665 | #define MX50_PAD_EPDC_D3__EPDC_D3 IOMUX_PAD(0x558, 0x1BC, 0, 0x0, 0, NO_PAD_CTRL) | ||
666 | #define MX50_PAD_EPDC_D3__GPIO_3_3 IOMUX_PAD(0x558, 0x1BC, 1, 0x0, 0, NO_PAD_CTRL) | ||
667 | #define MX50_PAD_EPDC_D3__WEIM_D3 IOMUX_PAD(0x558, 0x1BC, 2, 0x7f8, 1, NO_PAD_CTRL) | ||
668 | #define MX50_PAD_EPDC_D3__ELCDIF_RD IOMUX_PAD(0x558, 0x1BC, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
669 | #define MX50_PAD_EPDC_D3__ELCDIF_HSYNC IOMUX_PAD(0x558, 0x1BC, 4, 0x6f8, 3, MX50_ELCDIF_PAD_CTRL) | ||
670 | |||
671 | #define MX50_PAD_EPDC_D4__EPDC_D4 IOMUX_PAD(0x55C, 0x1C0, 0, 0x0, 0, NO_PAD_CTRL) | ||
672 | #define MX50_PAD_EPDC_D4__GPIO_3_4 IOMUX_PAD(0x55C, 0x1C0, 1, 0x0, 0, NO_PAD_CTRL) | ||
673 | #define MX50_PAD_EPDC_D4__WEIM_D4 IOMUX_PAD(0x55C, 0x1C0, 2, 0x7fc, 1, NO_PAD_CTRL) | ||
674 | |||
675 | #define MX50_PAD_EPDC_D5__EPDC_D5 IOMUX_PAD(0x560, 0x1C4, 0, 0x0, 0, NO_PAD_CTRL) | ||
676 | #define MX50_PAD_EPDC_D5__GPIO_3_5 IOMUX_PAD(0x560, 0x1C4, 1, 0x0, 0, NO_PAD_CTRL) | ||
677 | #define MX50_PAD_EPDC_D5__WEIM_D5 IOMUX_PAD(0x560, 0x1C4, 2, 0x800, 1, NO_PAD_CTRL) | ||
678 | |||
679 | #define MX50_PAD_EPDC_D6__EPDC_D6 IOMUX_PAD(0x564, 0x1C8, 0, 0x0, 0, NO_PAD_CTRL) | ||
680 | #define MX50_PAD_EPDC_D6__GPIO_3_6 IOMUX_PAD(0x564, 0x1C8, 1, 0x0, 0, NO_PAD_CTRL) | ||
681 | #define MX50_PAD_EPDC_D6__WEIM_D6 IOMUX_PAD(0x564, 0x1C8, 2, 0x804, 1, NO_PAD_CTRL) | ||
682 | |||
683 | #define MX50_PAD_EPDC_D7__EPDC_D7 IOMUX_PAD(0x568, 0x1CC, 0, 0x0, 0, NO_PAD_CTRL) | ||
684 | #define MX50_PAD_EPDC_D7__GPIO_3_7 IOMUX_PAD(0x568, 0x1CC, 1, 0x0, 0, NO_PAD_CTRL) | ||
685 | #define MX50_PAD_EPDC_D7__WEIM_D7 IOMUX_PAD(0x568, 0x1CC, 2, 0x808, 1, NO_PAD_CTRL) | ||
686 | |||
687 | #define MX50_PAD_EPDC_D8__EPDC_D8 IOMUX_PAD(0x56C, 0x1D0, 0, 0x0, 0, NO_PAD_CTRL) | ||
688 | #define MX50_PAD_EPDC_D8__GPIO_3_8 IOMUX_PAD(0x56C, 0x1D0, 1, 0x0, 0, NO_PAD_CTRL) | ||
689 | #define MX50_PAD_EPDC_D8__WEIM_D8 IOMUX_PAD(0x56C, 0x1D0, 2, 0x80c, 2, NO_PAD_CTRL) | ||
690 | #define MX50_PAD_EPDC_D8__ELCDIF_D24 IOMUX_PAD(0x56C, 0x1D0, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
691 | |||
692 | #define MX50_PAD_EPDC_D9__EPDC_D9 IOMUX_PAD(0x570, 0x1D4, 0, 0x0, 0, NO_PAD_CTRL) | ||
693 | #define MX50_PAD_EPDC_D9__GPIO_3_9 IOMUX_PAD(0x570, 0x1D4, 1, 0x0, 0, NO_PAD_CTRL) | ||
694 | #define MX50_PAD_EPDC_D9__WEIM_D9 IOMUX_PAD(0x570, 0x1D4, 2, 0x810, 2, NO_PAD_CTRL) | ||
695 | #define MX50_PAD_EPDC_D9__ELCDIF_D25 IOMUX_PAD(0x570, 0x1D4, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
696 | |||
697 | #define MX50_PAD_EPDC_D10__EPDC_D10 IOMUX_PAD(0x574, 0x1D8, 0, 0x0, 0, NO_PAD_CTRL) | ||
698 | #define MX50_PAD_EPDC_D10__GPIO_3_10 IOMUX_PAD(0x574, 0x1D8, 1, 0x0, 0, NO_PAD_CTRL) | ||
699 | #define MX50_PAD_EPDC_D10__WEIM_D10 IOMUX_PAD(0x574, 0x1D8, 2, 0x814, 2, NO_PAD_CTRL) | ||
700 | #define MX50_PAD_EPDC_D10__ELCDIF_D26 IOMUX_PAD(0x574, 0x1D8, 3, 0x0, 0, NO_PAD_CTRL) | ||
701 | |||
702 | #define MX50_PAD_EPDC_D11__EPDC_D11 IOMUX_PAD(0x578, 0x1DC, 0, 0x0, 0, NO_PAD_CTRL) | ||
703 | #define MX50_PAD_EPDC_D11__GPIO_3_11 IOMUX_PAD(0x578, 0x1DC, 1, 0x0, 0, NO_PAD_CTRL) | ||
704 | #define MX50_PAD_EPDC_D11__WEIM_D11 IOMUX_PAD(0x578, 0x1DC, 2, 0x818, 2, NO_PAD_CTRL) | ||
705 | #define MX50_PAD_EPDC_D11__ELCDIF_D27 IOMUX_PAD(0x578, 0x1DC, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
706 | |||
707 | #define MX50_PAD_EPDC_D12__EPDC_D12 IOMUX_PAD(0x57C, 0x1E0, 0, 0x0, 0, NO_PAD_CTRL) | ||
708 | #define MX50_PAD_EPDC_D12__GPIO_3_12 IOMUX_PAD(0x57C, 0x1E0, 1, 0x0, 0, NO_PAD_CTRL) | ||
709 | #define MX50_PAD_EPDC_D12__WEIM_D12 IOMUX_PAD(0x57C, 0x1E0, 2, 0x81c, 1, NO_PAD_CTRL) | ||
710 | #define MX50_PAD_EPDC_D12__ELCDIF_D28 IOMUX_PAD(0x57C, 0x1E0, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
711 | |||
712 | #define MX50_PAD_EPDC_D13__EPDC_D13 IOMUX_PAD(0x580, 0x1E4, 0, 0x0, 0, NO_PAD_CTRL) | ||
713 | #define MX50_PAD_EPDC_D13__GPIO_3_13 IOMUX_PAD(0x580, 0x1E4, 1, 0x0, 0, NO_PAD_CTRL) | ||
714 | #define MX50_PAD_EPDC_D13__WEIM_D13 IOMUX_PAD(0x580, 0x1E4, 2, 0x820, 1, NO_PAD_CTRL) | ||
715 | #define MX50_PAD_EPDC_D13__ELCDIF_D29 IOMUX_PAD(0x580, 0x1E4, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
716 | |||
717 | #define MX50_PAD_EPDC_D14__EPDC_D14 IOMUX_PAD(0x584, 0x1E8, 0, 0x0, 0, NO_PAD_CTRL) | ||
718 | #define MX50_PAD_EPDC_D14__GPIO_3_14 IOMUX_PAD(0x584, 0x1E8, 1, 0x0, 0, NO_PAD_CTRL) | ||
719 | #define MX50_PAD_EPDC_D14__WEIM_D14 IOMUX_PAD(0x584, 0x1E8, 2, 0x824, 1, NO_PAD_CTRL) | ||
720 | #define MX50_PAD_EPDC_D14__ELCDIF_D30 IOMUX_PAD(0x584, 0x1E8, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
721 | #define MX50_PAD_EPDC_D14__AUD6_TXD IOMUX_PAD(0x584, 0x1E8, 4, 0x0, 0, NO_PAD_CTRL) | ||
722 | |||
723 | #define MX50_PAD_EPDC_D15__EPDC_D15 IOMUX_PAD(0x588, 0x1EC, 0, 0x0, 0, NO_PAD_CTRL) | ||
724 | #define MX50_PAD_EPDC_D15__GPIO_3_15 IOMUX_PAD(0x588, 0x1EC, 1, 0x0, 0, NO_PAD_CTRL) | ||
725 | #define MX50_PAD_EPDC_D15__WEIM_D15 IOMUX_PAD(0x588, 0x1EC, 2, 0x828, 1, NO_PAD_CTRL) | ||
726 | #define MX50_PAD_EPDC_D15__ELCDIF_D31 IOMUX_PAD(0x588, 0x1EC, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
727 | #define MX50_PAD_EPDC_D15__AUD6_TXC IOMUX_PAD(0x588, 0x1EC, 4, 0x0, 0, NO_PAD_CTRL) | ||
728 | |||
729 | #define MX50_PAD_EPDC_GDCLK__EPDC_GDCLK IOMUX_PAD(0x58C, 0x1F0, 0, 0x0, 0, NO_PAD_CTRL) | ||
730 | #define MX50_PAD_EPDC_GDCLK__GPIO_3_16 IOMUX_PAD(0x58C, 0x1F0, 1, 0x0, 0, NO_PAD_CTRL) | ||
731 | #define MX50_PAD_EPDC_GDCLK__WEIM_D16 IOMUX_PAD(0x58C, 0x1F0, 2, 0x0, 0, NO_PAD_CTRL) | ||
732 | #define MX50_PAD_EPDC_GDCLK__ELCDIF_D16 IOMUX_PAD(0x58C, 0x1F0, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
733 | #define MX50_PAD_EPDC_GDCLK__AUD6_TXFS IOMUX_PAD(0x58C, 0x1F0, 4, 0x0, 0, NO_PAD_CTRL) | ||
734 | |||
735 | #define MX50_PAD_EPDC_GDSP__EPDC_GDSP IOMUX_PAD(0x590, 0x1F4, 0, 0x0, 0, NO_PAD_CTRL) | ||
736 | #define MX50_PAD_EPDC_GDSP__GPIO_3_17 IOMUX_PAD(0x590, 0x1F4, 1, 0x0, 0, NO_PAD_CTRL) | ||
737 | #define MX50_PAD_EPDC_GDSP__WEIM_D17 IOMUX_PAD(0x590, 0x1F4, 2, 0x0, 0, NO_PAD_CTRL) | ||
738 | #define MX50_PAD_EPDC_GDSP__ELCDIF_D17 IOMUX_PAD(0x590, 0x1F4, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
739 | #define MX50_PAD_EPDC_GDSP__AUD6_RXD IOMUX_PAD(0x590, 0x1F4, 4, 0x0, 0, NO_PAD_CTRL) | ||
740 | |||
741 | #define MX50_PAD_EPDC_GDOE__EPDC_GDOE IOMUX_PAD(0x594, 0x1F8, 0, 0x0, 0, NO_PAD_CTRL) | ||
742 | #define MX50_PAD_EPDC_GDOE__GPIO_3_18 IOMUX_PAD(0x594, 0x1F8, 1, 0x0, 0, NO_PAD_CTRL) | ||
743 | #define MX50_PAD_EPDC_GDOE__WEIM_D18 IOMUX_PAD(0x594, 0x1F8, 2, 0x0, 0, NO_PAD_CTRL) | ||
744 | #define MX50_PAD_EPDC_GDOE__ELCDIF_D18 IOMUX_PAD(0x594, 0x1F8, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
745 | #define MX50_PAD_EPDC_GDOE__AUD6_RXC IOMUX_PAD(0x594, 0x1F8, 4, 0x0, 0, NO_PAD_CTRL) | ||
746 | |||
747 | #define MX50_PAD_EPDC_GDRL__EPDC_GDRL IOMUX_PAD(0x598, 0x1FC, 0, 0x0, 0, NO_PAD_CTRL) | ||
748 | #define MX50_PAD_EPDC_GDRL__GPIO_3_19 IOMUX_PAD(0x598, 0x1FC, 1, 0x0, 0, NO_PAD_CTRL) | ||
749 | #define MX50_PAD_EPDC_GDRL__WEIM_D19 IOMUX_PAD(0x598, 0x1FC, 2, 0x0, 0, NO_PAD_CTRL) | ||
750 | #define MX50_PAD_EPDC_GDRL__ELCDIF_D19 IOMUX_PAD(0x598, 0x1FC, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
751 | #define MX50_PAD_EPDC_GDRL__AUD6_RXFS IOMUX_PAD(0x598, 0x1FC, 4, 0x0, 0, NO_PAD_CTRL) | ||
752 | |||
753 | #define MX50_PAD_EPDC_SDCLK__EPDC_SDCLK IOMUX_PAD(0x59C, 0x200, 0, 0x0, 0, NO_PAD_CTRL) | ||
754 | #define MX50_PAD_EPDC_SDCLK__GPIO_3_20 IOMUX_PAD(0x59C, 0x200, 1, 0x0, 0, NO_PAD_CTRL) | ||
755 | #define MX50_PAD_EPDC_SDCLK__WEIM_D20 IOMUX_PAD(0x59C, 0x200, 2, 0x0, 0, NO_PAD_CTRL) | ||
756 | #define MX50_PAD_EPDC_SDCLK__ELCDIF_D20 IOMUX_PAD(0x59C, 0x200, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
757 | #define MX50_PAD_EPDC_SDCLK__AUD5_TXD IOMUX_PAD(0x59C, 0x200, 4, 0x0, 0, NO_PAD_CTRL) | ||
758 | |||
759 | #define MX50_PAD_EPDC_SDOEZ__EPDC_SDOEZ IOMUX_PAD(0x5A0, 0x204, 0, 0x0, 0, NO_PAD_CTRL) | ||
760 | #define MX50_PAD_EPDC_SDOEZ__GPIO_3_21 IOMUX_PAD(0x5A0, 0x204, 1, 0x0, 0, NO_PAD_CTRL) | ||
761 | #define MX50_PAD_EPDC_SDOEZ__WEIM_D21 IOMUX_PAD(0x5A0, 0x204, 2, 0x0, 0, NO_PAD_CTRL) | ||
762 | #define MX50_PAD_EPDC_SDOEZ__ELCDIF_D21 IOMUX_PAD(0x5A0, 0x204, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
763 | #define MX50_PAD_EPDC_SDOEZ__AUD5_TXC IOMUX_PAD(0x5A0, 0x204, 4, 0x0, 0, NO_PAD_CTRL) | ||
764 | |||
765 | #define MX50_PAD_EPDC_SDOED__EPDC_SDOED IOMUX_PAD(0x5A4, 0x208, 0, 0x0, 0, NO_PAD_CTRL) | ||
766 | #define MX50_PAD_EPDC_SDOED__GPIO_3_22 IOMUX_PAD(0x5A4, 0x208, 1, 0x0, 0, NO_PAD_CTRL) | ||
767 | #define MX50_PAD_EPDC_SDOED__WEIM_D22 IOMUX_PAD(0x5A4, 0x208, 2, 0x0, 0, NO_PAD_CTRL) | ||
768 | #define MX50_PAD_EPDC_SDOED__ELCDIF_D22 IOMUX_PAD(0x5A4, 0x208, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
769 | #define MX50_PAD_EPDC_SDOED__AUD5_TXFS IOMUX_PAD(0x5A4, 0x208, 4, 0x0, 0, NO_PAD_CTRL) | ||
770 | |||
771 | #define MX50_PAD_EPDC_SDOE__EPDC_SDOE IOMUX_PAD(0x5A8, 0x20C, 0, 0x0, 0, NO_PAD_CTRL) | ||
772 | #define MX50_PAD_EPDC_SDOE__GPIO_3_23 IOMUX_PAD(0x5A8, 0x20C, 1, 0x0, 0, NO_PAD_CTRL) | ||
773 | #define MX50_PAD_EPDC_SDOE__WEIM_D23 IOMUX_PAD(0x5A8, 0x20C, 2, 0x0, 0, NO_PAD_CTRL) | ||
774 | #define MX50_PAD_EPDC_SDOE__ELCDIF_D23 IOMUX_PAD(0x5A8, 0x20C, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL) | ||
775 | #define MX50_PAD_EPDC_SDOE__AUD5_RXD IOMUX_PAD(0x5A8, 0x20C, 4, 0x0, 0, NO_PAD_CTRL) | ||
776 | |||
777 | #define MX50_PAD_EPDC_SDLE__EPDC_SDLE IOMUX_PAD(0x5AC, 0x210, 0, 0x0, 0, NO_PAD_CTRL) | ||
778 | #define MX50_PAD_EPDC_SDLE__GPIO_3_24 IOMUX_PAD(0x5AC, 0x210, 1, 0x0, 0, NO_PAD_CTRL) | ||
779 | #define MX50_PAD_EPDC_SDLE__WEIM_D24 IOMUX_PAD(0x5AC, 0x210, 2, 0x0, 0, NO_PAD_CTRL) | ||
780 | #define MX50_PAD_EPDC_SDLE__ELCDIF_D8 IOMUX_PAD(0x5AC, 0x210, 3, 0x71c, 1, MX50_ELCDIF_PAD_CTRL) | ||
781 | #define MX50_PAD_EPDC_SDLE__AUD5_RXC IOMUX_PAD(0x5AC, 0x210, 4, 0x0, 0, NO_PAD_CTRL) | ||
782 | |||
783 | #define MX50_PAD_EPDC_SDCLKN__EPDC_SDCLKN IOMUX_PAD(0x5B0, 0x214, 0, 0x0, 0, NO_PAD_CTRL) | ||
784 | #define MX50_PAD_EPDC_SDCLKN__GPIO_3_25 IOMUX_PAD(0x5B0, 0x214, 1, 0x0, 0, NO_PAD_CTRL) | ||
785 | #define MX50_PAD_EPDC_SDCLKN__WEIM_D25 IOMUX_PAD(0x5B0, 0x214, 2, 0x0, 0, NO_PAD_CTRL) | ||
786 | #define MX50_PAD_EPDC_SDCLKN__ELCDIF_D9 IOMUX_PAD(0x5B0, 0x214, 3, 0x720, 1, MX50_ELCDIF_PAD_CTRL) | ||
787 | #define MX50_PAD_EPDC_SDCLKN__AUD5_RXFS IOMUX_PAD(0x5B0, 0x214, 4, 0x0, 0, NO_PAD_CTRL) | ||
788 | |||
789 | #define MX50_PAD_EPDC_SDSHR__EPDC_SDSHR IOMUX_PAD(0x5B4, 0x218, 0, 0x0, 0, NO_PAD_CTRL) | ||
790 | #define MX50_PAD_EPDC_SDSHR__GPIO_3_26 IOMUX_PAD(0x5B4, 0x218, 1, 0x0, 0, NO_PAD_CTRL) | ||
791 | #define MX50_PAD_EPDC_SDSHR__WEIM_D26 IOMUX_PAD(0x5B4, 0x218, 2, 0x0, 0, NO_PAD_CTRL) | ||
792 | #define MX50_PAD_EPDC_SDSHR__ELCDIF_D10 IOMUX_PAD(0x5B4, 0x218, 3, 0x724, 1, MX50_ELCDIF_PAD_CTRL) | ||
793 | #define MX50_PAD_EPDC_SDSHR__AUD4_TXD IOMUX_PAD(0x5B4, 0x218, 4, 0x6c8, 1, NO_PAD_CTRL) | ||
794 | |||
795 | #define MX50_PAD_EPDC_PWRCOM__EPDC_PWRCOM IOMUX_PAD(0x5B8, 0x21C, 0, 0x0, 0, NO_PAD_CTRL) | ||
796 | #define MX50_PAD_EPDC_PWRCOM__GPIO_3_27 IOMUX_PAD(0x5B8, 0x21C, 1, 0x0, 0, NO_PAD_CTRL) | ||
797 | #define MX50_PAD_EPDC_PWRCOM__WEIM_D27 IOMUX_PAD(0x5B8, 0x21C, 2, 0x0, 0, NO_PAD_CTRL) | ||
798 | #define MX50_PAD_EPDC_PWRCOM__ELCDIF_D11 IOMUX_PAD(0x5B8, 0x21C, 3, 0x728, 1, MX50_ELCDIF_PAD_CTRL) | ||
799 | #define MX50_PAD_EPDC_PWRCOM__AUD4_TXC IOMUX_PAD(0x5B8, 0x21C, 4, 0x6d4, 1, NO_PAD_CTRL) | ||
800 | |||
801 | #define MX50_PAD_EPDC_PWRSTAT__EPDC_PWRSTAT IOMUX_PAD(0x5BC, 0x220, 0, 0x0, 0, NO_PAD_CTRL) | ||
802 | #define MX50_PAD_EPDC_PWRSTAT__GPIO_3_28 IOMUX_PAD(0x5BC, 0x220, 1, 0x0, 0, NO_PAD_CTRL) | ||
803 | #define MX50_PAD_EPDC_PWRSTAT__WEIM_D28 IOMUX_PAD(0x5BC, 0x220, 2, 0x0, 0, NO_PAD_CTRL) | ||
804 | #define MX50_PAD_EPDC_PWRSTAT__ELCDIF_D12 IOMUX_PAD(0x5BC, 0x220, 3, 0x72c, 1, MX50_ELCDIF_PAD_CTRL) | ||
805 | #define MX50_PAD_EPDC_PWRSTAT__AUD4_TXFS IOMUX_PAD(0x5BC, 0x220, 4, 0x6d8, 1, NO_PAD_CTRL) | ||
806 | |||
807 | #define MX50_PAD_EPDC_PWRCTRL0__EPDC_PWRCTRL0 IOMUX_PAD(0x5C0, 0x224, 0, 0x0, 0, NO_PAD_CTRL) | ||
808 | #define MX50_PAD_EPDC_PWRCTRL0__GPIO_3_29 IOMUX_PAD(0x5C0, 0x224, 1, 0x0, 0, NO_PAD_CTRL) | ||
809 | #define MX50_PAD_EPDC_PWRCTRL0__WEIM_D29 IOMUX_PAD(0x5C0, 0x224, 2, 0x0, 0, NO_PAD_CTRL) | ||
810 | #define MX50_PAD_EPDC_PWRCTRL0__ELCDIF_D13 IOMUX_PAD(0x5C0, 0x224, 3, 0x730, 1, MX50_ELCDIF_PAD_CTRL) | ||
811 | #define MX50_PAD_EPDC_PWRCTRL0__AUD4_RXD IOMUX_PAD(0x5C0, 0x224, 4, 0x6c4, 1, NO_PAD_CTRL) | ||
812 | |||
813 | #define MX50_PAD_EPDC_PWRCTRL1__EPDC_PWRCTRL1 IOMUX_PAD(0x5C4, 0x228, 0, 0x0, 0, NO_PAD_CTRL) | ||
814 | #define MX50_PAD_EPDC_PWRCTRL1__GPIO_3_30 IOMUX_PAD(0x5C4, 0x228, 1, 0x0, 0, NO_PAD_CTRL) | ||
815 | #define MX50_PAD_EPDC_PWRCTRL1__WEIM_D30 IOMUX_PAD(0x5C4, 0x228, 2, 0x0, 0, NO_PAD_CTRL) | ||
816 | #define MX50_PAD_EPDC_PWRCTRL1__ELCDIF_D14 IOMUX_PAD(0x5C4, 0x228, 3, 0x734, 1, MX50_ELCDIF_PAD_CTRL) | ||
817 | #define MX50_PAD_EPDC_PWRCTRL1__AUD4_RXC IOMUX_PAD(0x5C4, 0x228, 4, 0x6cc, 1, NO_PAD_CTRL) | ||
818 | |||
819 | #define MX50_PAD_EPDC_PWRCTRL2__EPDC_PWRCTRL2 IOMUX_PAD(0x5C8, 0x22C, 0, 0x0, 0, NO_PAD_CTRL) | ||
820 | #define MX50_PAD_EPDC_PWRCTRL2__GPIO_3_31 IOMUX_PAD(0x5C8, 0x22C, 1, 0x0, 0, NO_PAD_CTRL) | ||
821 | #define MX50_PAD_EPDC_PWRCTRL2__WEIM_D31 IOMUX_PAD(0x5C8, 0x22C, 2, 0x0, 0, NO_PAD_CTRL) | ||
822 | #define MX50_PAD_EPDC_PWRCTRL2__ELCDIF_D15 IOMUX_PAD(0x5C8, 0x22C, 3, 0x738, 1, MX50_ELCDIF_PAD_CTRL) | ||
823 | #define MX50_PAD_EPDC_PWRCTRL2__AUD4_RXFS IOMUX_PAD(0x5C8, 0x22C, 4, 0x6d0, 1, NO_PAD_CTRL) | ||
824 | #define MX50_PAD_EPDC_PWRCTRL2__SDMA_EXT0 IOMUX_PAD(0x5C8, 0x22C, 6, 0x7b8, 1, NO_PAD_CTRL) | ||
825 | |||
826 | #define MX50_PAD_EPDC_PWRCTRL3__PWRCTRL3 IOMUX_PAD(0x5CC, 0x230, 0, 0x0, 0, NO_PAD_CTRL) | ||
827 | #define MX50_PAD_EPDC_PWRCTRL3__GPIO_4_20 IOMUX_PAD(0x5CC, 0x230, 1, 0x0, 0, NO_PAD_CTRL) | ||
828 | #define MX50_PAD_EPDC_PWRCTRL3__WEIM_EB2 IOMUX_PAD(0x5CC, 0x230, 2, 0x0, 0, NO_PAD_CTRL) | ||
829 | #define MX50_PAD_EPDC_PWRCTRL3__SDMA_EXT1 IOMUX_PAD(0x5CC, 0x230, 6, 0x7bc, 1, NO_PAD_CTRL) | ||
830 | |||
831 | #define MX50_PAD_EPDC_VCOM0__EPDC_VCOM0 IOMUX_PAD(0x5D0, 0x234, 0, 0x0, 0, NO_PAD_CTRL) | ||
832 | #define MX50_PAD_EPDC_VCOM0__GPIO_4_21 IOMUX_PAD(0x5D0, 0x234, 1, 0x0, 0, NO_PAD_CTRL) | ||
833 | #define MX50_PAD_EPDC_VCOM0__WEIM_EB3 IOMUX_PAD(0x5D0, 0x234, 2, 0x0, 0, NO_PAD_CTRL) | ||
834 | |||
835 | #define MX50_PAD_EPDC_VCOM1__EPDC_VCOM1 IOMUX_PAD(0x5D4, 0x238, 0, 0x0, 0, NO_PAD_CTRL) | ||
836 | #define MX50_PAD_EPDC_VCOM1__GPIO_4_22 IOMUX_PAD(0x5D4, 0x238, 1, 0x0, 0, NO_PAD_CTRL) | ||
837 | #define MX50_PAD_EPDC_VCOM1__WEIM_CS3 IOMUX_PAD(0x5D4, 0x238, 2, 0x0, 0, NO_PAD_CTRL) | ||
838 | |||
839 | #define MX50_PAD_EPDC_BDR0__EPDC_BDR0 IOMUX_PAD(0x5D8, 0x23C, 0, 0x0, 0, NO_PAD_CTRL) | ||
840 | #define MX50_PAD_EPDC_BDR0__GPIO_4_23 IOMUX_PAD(0x5D8, 0x23C, 1, 0x0, 0, NO_PAD_CTRL) | ||
841 | #define MX50_PAD_EPDC_BDR0__ELCDIF_D7 IOMUX_PAD(0x5D8, 0x23C, 3, 0x718, 1, MX50_ELCDIF_PAD_CTRL) | ||
842 | |||
843 | #define MX50_PAD_EPDC_BDR1__EPDC_BDR1 IOMUX_PAD(0x5DC, 0x240, 0, 0x0, 0, NO_PAD_CTRL) | ||
844 | #define MX50_PAD_EPDC_BDR1__GPIO_4_24 IOMUX_PAD(0x5DC, 0x240, 1, 0x0, 0, NO_PAD_CTRL) | ||
845 | #define MX50_PAD_EPDC_BDR1__ELCDIF_D6 IOMUX_PAD(0x5DC, 0x240, 3, 0x714, 1, MX50_ELCDIF_PAD_CTRL) | ||
846 | |||
847 | #define MX50_PAD_EPDC_SDCE0__EPDC_SDCE0 IOMUX_PAD(0x5E0, 0x244, 0, 0x0, 0, NO_PAD_CTRL) | ||
848 | #define MX50_PAD_EPDC_SDCE0__GPIO_4_25 IOMUX_PAD(0x5E0, 0x244, 1, 0x0, 0, NO_PAD_CTRL) | ||
849 | #define MX50_PAD_EPDC_SDCE0__ELCDIF_D5 IOMUX_PAD(0x5E0, 0x244, 3, 0x710, 1, MX50_ELCDIF_PAD_CTRL) | ||
850 | |||
851 | #define MX50_PAD_EPDC_SDCE1__EPDC_SDCE1 IOMUX_PAD(0x5E4, 0x248, 0, 0x0, 0, NO_PAD_CTRL) | ||
852 | #define MX50_PAD_EPDC_SDCE1__GPIO_4_26 IOMUX_PAD(0x5E4, 0x248, 1, 0x0, 0, NO_PAD_CTRL) | ||
853 | #define MX50_PAD_EPDC_SDCE1__ELCDIF_D4 IOMUX_PAD(0x5E4, 0x248, 2, 0x70c, 1, MX50_ELCDIF_PAD_CTRL) | ||
854 | |||
855 | #define MX50_PAD_EPDC_SDCE2__EPDC_SDCE2 IOMUX_PAD(0x5E8, 0x24C, 0, 0x0, 0, NO_PAD_CTRL) | ||
856 | #define MX50_PAD_EPDC_SDCE2__GPIO_4_27 IOMUX_PAD(0x5E8, 0x24C, 1, 0x0, 0, NO_PAD_CTRL) | ||
857 | #define MX50_PAD_EPDC_SDCE2__ELCDIF_DAT3 IOMUX_PAD(0x5E8, 0x24C, 3, 0x708, 1, MX50_ELCDIF_PAD_CTRL) | ||
858 | |||
859 | #define MX50_PAD_EPDC_SDCE3__EPDC_SDCE3 IOMUX_PAD(0x5EC, 0x250, 0, 0x0, 0, NO_PAD_CTRL) | ||
860 | #define MX50_PAD_EPDC_SDCE3__GPIO_4_28 IOMUX_PAD(0x5EC, 0x250, 1, 0x0, 0, NO_PAD_CTRL) | ||
861 | #define MX50_PAD_EPDC_SDCE3__ELCDIF_D2 IOMUX_PAD(0x5EC, 0x250, 3, 0x704, 1, MX50_ELCDIF_PAD_CTRL) | ||
862 | |||
863 | #define MX50_PAD_EPDC_SDCE4__EPDC_SDCE4 IOMUX_PAD(0x5F0, 0x254, 0, 0x0, 0, NO_PAD_CTRL) | ||
864 | #define MX50_PAD_EPDC_SDCE4__GPIO_4_29 IOMUX_PAD(0x5F0, 0x254, 1, 0x0, 0, NO_PAD_CTRL) | ||
865 | #define MX50_PAD_EPDC_SDCE4__ELCDIF_D1 IOMUX_PAD(0x5F0, 0x254, 3, 0x700, 1, MX50_ELCDIF_PAD_CTRL) | ||
866 | |||
867 | #define MX50_PAD_EPDC_SDCE5__EPDC_SDCE5 IOMUX_PAD(0x5F4, 0x258, 0, 0x0, 0, NO_PAD_CTRL) | ||
868 | #define MX50_PAD_EPDC_SDCE5__GPIO_4_30 IOMUX_PAD(0x5F4, 0x258, 1, 0x0, 0, NO_PAD_CTRL) | ||
869 | #define MX50_PAD_EPDC_SDCE5__ELCDIF_D0 IOMUX_PAD(0x5F4, 0x258, 3, 0x6fc, 1, MX50_ELCDIF_PAD_CTRL) | ||
870 | |||
871 | #define MX50_PAD_EIM_DA0__WEIM_A0 IOMUX_PAD(0x5F8, 0x25C, 0, 0x0, 0, NO_PAD_CTRL) | ||
872 | #define MX50_PAD_EIM_DA0__GPIO_1_0 IOMUX_PAD(0x5F8, 0x25C, 1, 0x0, 0, NO_PAD_CTRL) | ||
873 | #define MX50_PAD_EIM_DA0__KEY_COL4 IOMUX_PAD(0x5f8, 0x25C, 3, 0x790, 2, NO_PAD_CTRL) | ||
874 | |||
875 | #define MX50_PAD_EIM_DA1__WEIM_A1 IOMUX_PAD(0x5FC, 0x260, 0, 0x0, 0, NO_PAD_CTRL) | ||
876 | #define MX50_PAD_EIM_DA1__GPIO_1_1 IOMUX_PAD(0x5FC, 0x260, 1, 0x0, 0, NO_PAD_CTRL) | ||
877 | #define MX50_PAD_EIM_DA1__KEY_ROW4 IOMUX_PAD(0x5fc, 0x260, 3, 0x7a0, 2, MX50_KEYPAD_CTRL) | ||
878 | |||
879 | #define MX50_PAD_EIM_DA2__WEIM_A2 IOMUX_PAD(0x600, 0x264, 0, 0x0, 0, NO_PAD_CTRL) | ||
880 | #define MX50_PAD_EIM_DA2__GPIO_1_2 IOMUX_PAD(0x600, 0x264, 1, 0x0, 0, NO_PAD_CTRL) | ||
881 | #define MX50_PAD_EIM_DA2__KEY_COL5 IOMUX_PAD(0x600, 0x264, 3, 0x794, 2, NO_PAD_CTRL) | ||
882 | |||
883 | #define MX50_PAD_EIM_DA3__WEIM_A3 IOMUX_PAD(0x604, 0x268, 0, 0x0, 0, NO_PAD_CTRL) | ||
884 | #define MX50_PAD_EIM_DA3__GPIO_1_3 IOMUX_PAD(0x604, 0x268, 1, 0x0, 0, NO_PAD_CTRL) | ||
885 | #define MX50_PAD_EIM_DA3__KEY_ROW5 IOMUX_PAD(0x604, 0x268, 3, 0x7a4, 2, MX50_KEYPAD_CTRL) | ||
886 | |||
887 | #define MX50_PAD_EIM_DA4__WEIM_A4 IOMUX_PAD(0x608, 0x26C, 0, 0x0, 0, NO_PAD_CTRL) | ||
888 | #define MX50_PAD_EIM_DA4__GPIO_1_4 IOMUX_PAD(0x608, 0x26C, 1, 0x0, 0, NO_PAD_CTRL) | ||
889 | #define MX50_PAD_EIM_DA4__KEY_COL6 IOMUX_PAD(0x608, 0x26C, 3, 0x798, 2, NO_PAD_CTRL) | ||
890 | |||
891 | #define MX50_PAD_EIM_DA5__WEIM_A5 IOMUX_PAD(0x60C, 0x270, 0, 0x0, 0, NO_PAD_CTRL) | ||
892 | #define MX50_PAD_EIM_DA5__GPIO_1_5 IOMUX_PAD(0x60C, 0x270, 1, 0x0, 0, NO_PAD_CTRL) | ||
893 | #define MX50_PAD_EIM_DA5__KEY_ROW6 IOMUX_PAD(0x60C, 0x270, 3, 0x7a8, 2, MX50_KEYPAD_CTRL) | ||
894 | |||
895 | #define MX50_PAD_EIM_DA6__WEIM_A6 IOMUX_PAD(0x610, 0x274, 0, 0x0, 0, NO_PAD_CTRL) | ||
896 | #define MX50_PAD_EIM_DA6__GPIO_1_6 IOMUX_PAD(0x610, 0x274, 1, 0x0, 0, NO_PAD_CTRL) | ||
897 | #define MX50_PAD_EIM_DA6__KEY_COL7 IOMUX_PAD(0x610, 0x274, 3, 0x79c, 2, NO_PAD_CTRL) | ||
898 | |||
899 | #define MX50_PAD_EIM_DA7__WEIM_A7 IOMUX_PAD(0x614, 0x278, 0, 0x0, 0, NO_PAD_CTRL) | ||
900 | #define MX50_PAD_EIM_DA7__GPIO_1_7 IOMUX_PAD(0x614, 0x278, 1, 0x0, 0, NO_PAD_CTRL) | ||
901 | #define MX50_PAD_EIM_DA7__KEY_ROW7 IOMUX_PAD(0x614, 0x278, 3, 0x7ac, 2, MX50_KEYPAD_CTRL) | ||
902 | |||
903 | #define MX50_PAD_EIM_DA8__WEIM_A8 IOMUX_PAD(0x618, 0x27C, 0, 0x0, 0, NO_PAD_CTRL) | ||
904 | #define MX50_PAD_EIM_DA8__GPIO_1_8 IOMUX_PAD(0x618, 0x27C, 1, 0x0, 0, NO_PAD_CTRL) | ||
905 | #define MX50_PIN_EIM_DA8__NANDF_CLE IOMUX_PAD(0x618, 0x27C, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
906 | |||
907 | #define MX50_PAD_EIM_DA9__WEIM_A9 IOMUX_PAD(0x61C, 0x280, 0, 0x0, 0, NO_PAD_CTRL) | ||
908 | #define MX50_PAD_EIM_DA9__GPIO_1_9 IOMUX_PAD(0x61C, 0x280, 1, 0x0, 0, NO_PAD_CTRL) | ||
909 | #define MX50_PIN_EIM_DA9__NANDF_ALE IOMUX_PAD(0x61C, 0x280, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
910 | |||
911 | #define MX50_PAD_EIM_DA10__WEIM_A10 IOMUX_PAD(0x620, 0x284, 0, 0x0, 0, NO_PAD_CTRL) | ||
912 | #define MX50_PAD_EIM_DA10__GPIO_1_10 IOMUX_PAD(0x620, 0x284, 1, 0x0, 0, NO_PAD_CTRL) | ||
913 | #define MX50_PIN_EIM_DA10__NANDF_CE0 IOMUX_PAD(0x620, 0x284, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
914 | |||
915 | #define MX50_PAD_EIM_DA11__WEIM_A11 IOMUX_PAD(0x624, 0x288, 0, 0x0, 0, NO_PAD_CTRL) | ||
916 | #define MX50_PAD_EIM_DA11__GPIO_1_11 IOMUX_PAD(0x624, 0x288, 1, 0x0, 0, NO_PAD_CTRL) | ||
917 | #define MX50_PIN_EIM_DA11__NANDF_CE1 IOMUX_PAD(0x624, 0x288, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
918 | |||
919 | #define MX50_PAD_EIM_DA12__WEIM_A12 IOMUX_PAD(0x628, 0x28C, 0, 0x0, 0, NO_PAD_CTRL) | ||
920 | #define MX50_PAD_EIM_DA12__GPIO_1_12 IOMUX_PAD(0x628, 0x28C, 1, 0x0, 0, NO_PAD_CTRL) | ||
921 | #define MX50_PIN_EIM_DA12__NANDF_CE2 IOMUX_PAD(0x628, 0x28C, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
922 | #define MX50_PAD_EIM_DA12__EPDC_SDCE6 IOMUX_PAD(0x628, 0x28C, 3, 0x0, 0, NO_PAD_CTRL) | ||
923 | |||
924 | #define MX50_PAD_EIM_DA13__WEIM_A13 IOMUX_PAD(0x62C, 0x290, 0, 0x0, 0, NO_PAD_CTRL) | ||
925 | #define MX50_PAD_EIM_DA13__GPIO_1_13 IOMUX_PAD(0x62C, 0x290, 1, 0x0, 0, NO_PAD_CTRL) | ||
926 | #define MX50_PIN_EIM_DA13__NANDF_CE3 IOMUX_PAD(0x62C, 0x290, 2, 0x0, 0, PAD_CTL_DSE_HIGH) | ||
927 | #define MX50_PIN_EIM_DA13__EPDC_SDCE7 IOMUX_PAD(0x62C, 0x290, 3, 0x0, 0, NO_PAD_CTRL) | ||
928 | |||
929 | #define MX50_PAD_EIM_DA14__WEIM_A14 IOMUX_PAD(0x630, 0x294, 0, 0x0, 0, NO_PAD_CTRL) | ||
930 | #define MX50_PAD_EIM_DA14__GPIO_1_14 IOMUX_PAD(0x630, 0x294, 1, 0x0, 0, NO_PAD_CTRL) | ||
931 | #define MX50_PAD_EIM_DA14__NANDF_READY IOMUX_PAD(0x630, 0x294, 2, 0x7B4, 2, PAD_CTL_PKE | \ | ||
932 | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP) | ||
933 | #define MX50_PAD_EIM_DA14__EPDC_SDCE8 IOMUX_PAD(0x630, 0x294, 3, 0x0, 0, NO_PAD_CTRL) | ||
934 | |||
935 | #define MX50_PAD_EIM_DA15__WEIM_A15 IOMUX_PAD(0x634, 0x298, 0, 0x0, 0, NO_PAD_CTRL) | ||
936 | #define MX50_PAD_EIM_DA15__GPIO_1_15 IOMUX_PAD(0x634, 0x298, 1, 0x0, 0, NO_PAD_CTRL) | ||
937 | #define MX50_PIN_EIM_DA15__NANDF_DQS IOMUX_PAD(0x634, 0x298, 2, 0x7B0, 2, PAD_CTL_DSE_HIGH) | ||
938 | #define MX50_PAD_EIM_DA15__EPDC_SDCE9 IOMUX_PAD(0x634, 0x298, 3, 0x0, 0, NO_PAD_CTRL) | ||
939 | |||
940 | #define MX50_PAD_EIM_CS2__WEIM_CS2 IOMUX_PAD(0x638, 0x29C, 0, 0x0, 0, NO_PAD_CTRL) | ||
941 | #define MX50_PAD_EIM_CS2__GPIO_1_16 IOMUX_PAD(0x638, 0x29C, 1, 0x0, 0, NO_PAD_CTRL) | ||
942 | #define MX50_PAD_EIM_CS2__WEIM_A27 IOMUX_PAD(0x638, 0x29C, 2, 0x0, 0, NO_PAD_CTRL) | ||
943 | |||
944 | #define MX50_PAD_EIM_CS1__WEIM_CS1 IOMUX_PAD(0x63C, 0x2A0, 0, 0x0, 0, NO_PAD_CTRL) | ||
945 | #define MX50_PAD_EIM_CS1__GPIO_1_17 IOMUX_PAD(0x63C, 0x2A0, 1, 0x0, 0, NO_PAD_CTRL) | ||
946 | |||
947 | #define MX50_PAD_EIM_CS0__WEIM_CS0 IOMUX_PAD(0x640, 0x2A4, 0, 0x0, 0, NO_PAD_CTRL) | ||
948 | #define MX50_PAD_EIM_CS0__GPIO_1_18 IOMUX_PAD(0x640, 0x2A4, 1, 0x0, 0, NO_PAD_CTRL) | ||
949 | |||
950 | #define MX50_PAD_EIM_EB0__WEIM_EB0 IOMUX_PAD(0x644, 0x2A8, 0, 0x0, 0, NO_PAD_CTRL) | ||
951 | #define MX50_PAD_EIM_EB0__GPIO_1_19 IOMUX_PAD(0x644, 0x2A8, 1, 0x0, 0, NO_PAD_CTRL) | ||
952 | |||
953 | #define MX50_PAD_EIM_EB1__WEIM_EB1 IOMUX_PAD(0x648, 0x2AC, 0, 0x0, 0, NO_PAD_CTRL) | ||
954 | #define MX50_PAD_EIM_EB1__GPIO_1_20 IOMUX_PAD(0x648, 0x2AC, 1, 0x0, 0, NO_PAD_CTRL) | ||
955 | |||
956 | #define MX50_PAD_EIM_WAIT__WEIM_WAIT IOMUX_PAD(0x64C, 0x2B0, 0, 0x0, 0, NO_PAD_CTRL) | ||
957 | #define MX50_PAD_EIM_WAIT__GPIO_1_21 IOMUX_PAD(0x64C, 0x2B0, 1, 0x0, 0, NO_PAD_CTRL) | ||
958 | |||
959 | #define MX50_PAD_EIM_BCLK__WEIM_BCLK IOMUX_PAD(0x650, 0x2B4, 0, 0x0, 0, NO_PAD_CTRL) | ||
960 | #define MX50_PAD_EIM_BCLK__GPIO_1_22 IOMUX_PAD(0x650, 0x2B4, 1, 0x0, 0, NO_PAD_CTRL) | ||
961 | |||
962 | #define MX50_PAD_EIM_RDY__WEIM_RDY IOMUX_PAD(0x654, 0x2B8, 0, 0x0, 0, NO_PAD_CTRL) | ||
963 | #define MX50_PAD_EIM_RDY__GPIO_1_23 IOMUX_PAD(0x654, 0x2B8, 1, 0x0, 0, NO_PAD_CTRL) | ||
964 | |||
965 | #define MX50_PAD_EIM_OE__WEIM_OE IOMUX_PAD(0x658, 0x2BC, 0, 0x0, 0, NO_PAD_CTRL) | ||
966 | #define MX50_PAD_EIM_OE__GPIO_1_24 IOMUX_PAD(0x658, 0x2BC, 1, 0x0, 0, NO_PAD_CTRL) | ||
967 | |||
968 | #define MX50_PAD_EIM_RW__WEIM_RW IOMUX_PAD(0x65C, 0x2C0, 0, 0x0, 0, NO_PAD_CTRL) | ||
969 | #define MX50_PAD_EIM_RW__GPIO_1_25 IOMUX_PAD(0x65C, 0x2C0, 1, 0x0, 0, NO_PAD_CTRL) | ||
970 | |||
971 | #define MX50_PAD_EIM_LBA__WEIM_LBA IOMUX_PAD(0x660, 0x2C4, 0, 0x0, 0, NO_PAD_CTRL) | ||
972 | #define MX50_PAD_EIM_LBA__GPIO_1_26 IOMUX_PAD(0x660, 0x2C4, 1, 0x0, 0, NO_PAD_CTRL) | ||
973 | |||
974 | #define MX50_PAD_EIM_CRE__WEIM_CRE IOMUX_PAD(0x664, 0x2C8, 0, 0x0, 0, NO_PAD_CTRL) | ||
975 | #define MX50_PAD_EIM_CRE__GPIO_1_27 IOMUX_PAD(0x664, 0x2C8, 1, 0x0, 0, NO_PAD_CTRL) | ||
976 | |||
977 | #endif /* __MACH_IOMUX_MX50_H__ */ | ||
diff --git a/arch/arm/mach-imx/iomux-mx51.h b/arch/arm/mach-imx/iomux-mx51.h deleted file mode 100644 index 75bbcc4aa2d..00000000000 --- a/arch/arm/mach-imx/iomux-mx51.h +++ /dev/null | |||
@@ -1,827 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com> | ||
3 | * Copyright (C) 2010 Freescale Semiconductor, Inc. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #ifndef __MACH_IOMUX_MX51_H__ | ||
14 | #define __MACH_IOMUX_MX51_H__ | ||
15 | |||
16 | #include "iomux-v3.h" | ||
17 | #define __NA_ 0x000 | ||
18 | |||
19 | |||
20 | /* Pad control groupings */ | ||
21 | #define MX51_UART_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_DSE_HIGH | \ | ||
22 | PAD_CTL_HYS | PAD_CTL_SRE_FAST) | ||
23 | #define MX51_I2C_PAD_CTRL (PAD_CTL_SRE_FAST | PAD_CTL_ODE | \ | ||
24 | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP | \ | ||
25 | PAD_CTL_HYS) | ||
26 | #define MX51_ESDHC_PAD_CTRL (PAD_CTL_SRE_FAST | PAD_CTL_ODE | \ | ||
27 | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP | \ | ||
28 | PAD_CTL_HYS) | ||
29 | #define MX51_USBH1_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_SRE_FAST | \ | ||
30 | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP | \ | ||
31 | PAD_CTL_HYS | PAD_CTL_PUE) | ||
32 | #define MX51_ECSPI_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_HYS | \ | ||
33 | PAD_CTL_DSE_HIGH | PAD_CTL_SRE_FAST) | ||
34 | #define MX51_SDHCI_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_DSE_HIGH | \ | ||
35 | PAD_CTL_PUS_47K_UP | PAD_CTL_PUE | \ | ||
36 | PAD_CTL_SRE_FAST | PAD_CTL_DVS) | ||
37 | #define MX51_GPIO_PAD_CTRL (PAD_CTL_DSE_HIGH | PAD_CTL_PKE | PAD_CTL_SRE_FAST) | ||
38 | |||
39 | #define MX51_PAD_CTRL_2 (PAD_CTL_PKE | PAD_CTL_HYS) | ||
40 | #define MX51_PAD_CTRL_3 (PAD_CTL_PKE | PAD_CTL_PUS_100K_UP) | ||
41 | #define MX51_PAD_CTRL_4 (PAD_CTL_PKE | PAD_CTL_DVS | PAD_CTL_HYS) | ||
42 | #define MX51_PAD_CTRL_5 (PAD_CTL_DVS | PAD_CTL_DSE_HIGH) | ||
43 | |||
44 | /* | ||
45 | * The naming convention for the pad modes is MX51_PAD_<padname>__<padmode> | ||
46 | * If <padname> or <padmode> refers to a GPIO, it is named GPIO<unit>_<num> | ||
47 | * See also iomux-v3.h | ||
48 | */ | ||
49 | |||
50 | /* Raw pin modes without pad control */ | ||
51 | /* PAD MUX ALT INPSE PATH PADCTRL */ | ||
52 | |||
53 | /* The same pins as above but with the default pad control values applied */ | ||
54 | #define MX51_PAD_EIM_D16__AUD4_RXFS IOMUX_PAD(0x3f0, 0x05c, 5, __NA_, 0, NO_PAD_CTRL) | ||
55 | #define MX51_PAD_EIM_D16__AUD5_TXD IOMUX_PAD(0x3f0, 0x05c, 7, 0x8d8, 0, NO_PAD_CTRL) | ||
56 | #define MX51_PAD_EIM_D16__EIM_D16 IOMUX_PAD(0x3f0, 0x05c, 0, __NA_, 0, NO_PAD_CTRL) | ||
57 | #define MX51_PAD_EIM_D16__GPIO2_0 IOMUX_PAD(0x3f0, 0x05c, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
58 | #define MX51_PAD_EIM_D16__I2C1_SDA IOMUX_PAD(0x3f0, 0x05c, 0x14, 0x9b4, 0, MX51_I2C_PAD_CTRL) | ||
59 | #define MX51_PAD_EIM_D16__UART2_CTS IOMUX_PAD(0x3f0, 0x05c, 3, __NA_, 0, MX51_UART_PAD_CTRL) | ||
60 | #define MX51_PAD_EIM_D16__USBH2_DATA0 IOMUX_PAD(0x3f0, 0x05c, 2, __NA_, 0, NO_PAD_CTRL) | ||
61 | #define MX51_PAD_EIM_D17__AUD5_RXD IOMUX_PAD(0x3f4, 0x060, 7, 0x8d4, 0, NO_PAD_CTRL) | ||
62 | #define MX51_PAD_EIM_D17__EIM_D17 IOMUX_PAD(0x3f4, 0x060, 0, __NA_, 0, NO_PAD_CTRL) | ||
63 | #define MX51_PAD_EIM_D17__GPIO2_1 IOMUX_PAD(0x3f4, 0x060, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
64 | #define MX51_PAD_EIM_D17__UART2_RXD IOMUX_PAD(0x3f4, 0x060, 3, 0x9ec, 0, MX51_UART_PAD_CTRL) | ||
65 | #define MX51_PAD_EIM_D17__UART3_CTS IOMUX_PAD(0x3f4, 0x060, 4, __NA_, 0, MX51_UART_PAD_CTRL) | ||
66 | #define MX51_PAD_EIM_D17__USBH2_DATA1 IOMUX_PAD(0x3f4, 0x060, 2, __NA_, 0, NO_PAD_CTRL) | ||
67 | #define MX51_PAD_EIM_D18__AUD5_TXC IOMUX_PAD(0x3f8, 0x064, 7, 0x8e4, 0, NO_PAD_CTRL) | ||
68 | #define MX51_PAD_EIM_D18__EIM_D18 IOMUX_PAD(0x3f8, 0x064, 0, __NA_, 0, NO_PAD_CTRL) | ||
69 | #define MX51_PAD_EIM_D18__GPIO2_2 IOMUX_PAD(0x3f8, 0x064, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
70 | #define MX51_PAD_EIM_D18__UART2_TXD IOMUX_PAD(0x3f8, 0x064, 3, __NA_, 0, MX51_UART_PAD_CTRL) | ||
71 | #define MX51_PAD_EIM_D18__UART3_RTS IOMUX_PAD(0x3f8, 0x064, 4, 0x9f0, 1, MX51_UART_PAD_CTRL) | ||
72 | #define MX51_PAD_EIM_D18__USBH2_DATA2 IOMUX_PAD(0x3f8, 0x064, 2, __NA_, 0, NO_PAD_CTRL) | ||
73 | #define MX51_PAD_EIM_D19__AUD4_RXC IOMUX_PAD(0x3fc, 0x068, 5, __NA_, 0, NO_PAD_CTRL) | ||
74 | #define MX51_PAD_EIM_D19__AUD5_TXFS IOMUX_PAD(0x3fc, 0x068, 7, 0x8e8, 0, NO_PAD_CTRL) | ||
75 | #define MX51_PAD_EIM_D19__EIM_D19 IOMUX_PAD(0x3fc, 0x068, 0, __NA_, 0, NO_PAD_CTRL) | ||
76 | #define MX51_PAD_EIM_D19__GPIO2_3 IOMUX_PAD(0x3fc, 0x068, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
77 | #define MX51_PAD_EIM_D19__I2C1_SCL IOMUX_PAD(0x3fc, 0x068, 0x14, 0x9b0, 0, MX51_I2C_PAD_CTRL) | ||
78 | #define MX51_PAD_EIM_D19__UART2_RTS IOMUX_PAD(0x3fc, 0x068, 3, 0x9e8, 1, MX51_UART_PAD_CTRL) | ||
79 | #define MX51_PAD_EIM_D19__USBH2_DATA3 IOMUX_PAD(0x3fc, 0x068, 2, __NA_, 0, NO_PAD_CTRL) | ||
80 | #define MX51_PAD_EIM_D20__AUD4_TXD IOMUX_PAD(0x400, 0x06c, 5, 0x8c8, 0, NO_PAD_CTRL) | ||
81 | #define MX51_PAD_EIM_D20__EIM_D20 IOMUX_PAD(0x400, 0x06c, 0, __NA_, 0, NO_PAD_CTRL) | ||
82 | #define MX51_PAD_EIM_D20__GPIO2_4 IOMUX_PAD(0x400, 0x06c, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
83 | #define MX51_PAD_EIM_D20__SRTC_ALARM_DEB IOMUX_PAD(0x400, 0x06c, 4, __NA_, 0, NO_PAD_CTRL) | ||
84 | #define MX51_PAD_EIM_D20__USBH2_DATA4 IOMUX_PAD(0x400, 0x06c, 2, __NA_, 0, NO_PAD_CTRL) | ||
85 | #define MX51_PAD_EIM_D21__AUD4_RXD IOMUX_PAD(0x404, 0x070, 5, 0x8c4, 0, NO_PAD_CTRL) | ||
86 | #define MX51_PAD_EIM_D21__EIM_D21 IOMUX_PAD(0x404, 0x070, 0, __NA_, 0, NO_PAD_CTRL) | ||
87 | #define MX51_PAD_EIM_D21__GPIO2_5 IOMUX_PAD(0x404, 0x070, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
88 | #define MX51_PAD_EIM_D21__SRTC_ALARM_DEB IOMUX_PAD(0x404, 0x070, 3, __NA_, 0, NO_PAD_CTRL) | ||
89 | #define MX51_PAD_EIM_D21__USBH2_DATA5 IOMUX_PAD(0x404, 0x070, 2, __NA_, 0, NO_PAD_CTRL) | ||
90 | #define MX51_PAD_EIM_D22__AUD4_TXC IOMUX_PAD(0x408, 0x074, 5, 0x8cc, 0, NO_PAD_CTRL) | ||
91 | #define MX51_PAD_EIM_D22__EIM_D22 IOMUX_PAD(0x408, 0x074, 0, __NA_, 0, NO_PAD_CTRL) | ||
92 | #define MX51_PAD_EIM_D22__GPIO2_6 IOMUX_PAD(0x408, 0x074, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
93 | #define MX51_PAD_EIM_D22__USBH2_DATA6 IOMUX_PAD(0x408, 0x074, 2, __NA_, 0, NO_PAD_CTRL) | ||
94 | #define MX51_PAD_EIM_D23__AUD4_TXFS IOMUX_PAD(0x40c, 0x078, 5, 0x8d0, 0, NO_PAD_CTRL) | ||
95 | #define MX51_PAD_EIM_D23__EIM_D23 IOMUX_PAD(0x40c, 0x078, 0, __NA_, 0, NO_PAD_CTRL) | ||
96 | #define MX51_PAD_EIM_D23__GPIO2_7 IOMUX_PAD(0x40c, 0x078, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
97 | #define MX51_PAD_EIM_D23__SPDIF_OUT1 IOMUX_PAD(0x40c, 0x078, 4, __NA_, 0, NO_PAD_CTRL) | ||
98 | #define MX51_PAD_EIM_D23__USBH2_DATA7 IOMUX_PAD(0x40c, 0x078, 2, __NA_, 0, NO_PAD_CTRL) | ||
99 | #define MX51_PAD_EIM_D24__AUD6_RXFS IOMUX_PAD(0x410, 0x07c, 5, 0x8f8, 0, NO_PAD_CTRL) | ||
100 | #define MX51_PAD_EIM_D24__EIM_D24 IOMUX_PAD(0x410, 0x07c, 0, __NA_, 0, NO_PAD_CTRL) | ||
101 | #define MX51_PAD_EIM_D24__GPIO2_8 IOMUX_PAD(0x410, 0x07c, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
102 | #define MX51_PAD_EIM_D24__I2C2_SDA IOMUX_PAD(0x410, 0x07c, 0x14, 0x9bc, 0, MX51_I2C_PAD_CTRL) | ||
103 | #define MX51_PAD_EIM_D24__UART3_CTS IOMUX_PAD(0x410, 0x07c, 3, __NA_, 0, MX51_UART_PAD_CTRL) | ||
104 | #define MX51_PAD_EIM_D24__USBOTG_DATA0 IOMUX_PAD(0x410, 0x07c, 2, __NA_, 0, NO_PAD_CTRL) | ||
105 | #define MX51_PAD_EIM_D25__EIM_D25 IOMUX_PAD(0x414, 0x080, 0, __NA_, 0, NO_PAD_CTRL) | ||
106 | #define MX51_PAD_EIM_D25__KEY_COL6 IOMUX_PAD(0x414, 0x080, 1, 0x9c8, 0, NO_PAD_CTRL) | ||
107 | #define MX51_PAD_EIM_D25__UART2_CTS IOMUX_PAD(0x414, 0x080, 4, __NA_, 0, MX51_UART_PAD_CTRL) | ||
108 | #define MX51_PAD_EIM_D25__UART3_RXD IOMUX_PAD(0x414, 0x080, 3, 0x9f4, 0, MX51_UART_PAD_CTRL) | ||
109 | #define MX51_PAD_EIM_D25__USBOTG_DATA1 IOMUX_PAD(0x414, 0x080, 2, __NA_, 0, NO_PAD_CTRL) | ||
110 | #define MX51_PAD_EIM_D25__GPT_CMPOUT1 IOMUX_PAD(0x414, 0x080, 5, __NA_, 0, NO_PAD_CTRL) | ||
111 | #define MX51_PAD_EIM_D26__EIM_D26 IOMUX_PAD(0x418, 0x084, 0, __NA_, 0, NO_PAD_CTRL) | ||
112 | #define MX51_PAD_EIM_D26__KEY_COL7 IOMUX_PAD(0x418, 0x084, 1, 0x9cc, 0, NO_PAD_CTRL) | ||
113 | #define MX51_PAD_EIM_D26__UART2_RTS IOMUX_PAD(0x418, 0x084, 4, 0x9e8, 3, MX51_UART_PAD_CTRL) | ||
114 | #define MX51_PAD_EIM_D26__UART3_TXD IOMUX_PAD(0x418, 0x084, 3, __NA_, 0, MX51_UART_PAD_CTRL) | ||
115 | #define MX51_PAD_EIM_D26__USBOTG_DATA2 IOMUX_PAD(0x418, 0x084, 2, __NA_, 0, NO_PAD_CTRL) | ||
116 | #define MX51_PAD_EIM_D26__GPT_CMPOUT2 IOMUX_PAD(0x418, 0x084, 5, __NA_, 0, NO_PAD_CTRL) | ||
117 | #define MX51_PAD_EIM_D27__AUD6_RXC IOMUX_PAD(0x41c, 0x088, 5, 0x8f4, 0, NO_PAD_CTRL) | ||
118 | #define MX51_PAD_EIM_D27__EIM_D27 IOMUX_PAD(0x41c, 0x088, 0, __NA_, 0, NO_PAD_CTRL) | ||
119 | #define MX51_PAD_EIM_D27__GPIO2_9 IOMUX_PAD(0x41c, 0x088, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
120 | #define MX51_PAD_EIM_D27__I2C2_SCL IOMUX_PAD(0x41c, 0x088, 0x14, 0x9b8, 0, MX51_I2C_PAD_CTRL) | ||
121 | #define MX51_PAD_EIM_D27__UART3_RTS IOMUX_PAD(0x41c, 0x088, 3, 0x9f0, 3, MX51_UART_PAD_CTRL) | ||
122 | #define MX51_PAD_EIM_D27__USBOTG_DATA3 IOMUX_PAD(0x41c, 0x088, 2, __NA_, 0, NO_PAD_CTRL) | ||
123 | #define MX51_PAD_EIM_D28__AUD6_TXD IOMUX_PAD(0x420, 0x08c, 5, 0x8f0, 0, NO_PAD_CTRL) | ||
124 | #define MX51_PAD_EIM_D28__EIM_D28 IOMUX_PAD(0x420, 0x08c, 0, __NA_, 0, NO_PAD_CTRL) | ||
125 | #define MX51_PAD_EIM_D28__KEY_ROW4 IOMUX_PAD(0x420, 0x08c, 1, 0x9d0, 0, NO_PAD_CTRL) | ||
126 | #define MX51_PAD_EIM_D28__USBOTG_DATA4 IOMUX_PAD(0x420, 0x08c, 2, __NA_, 0, NO_PAD_CTRL) | ||
127 | #define MX51_PAD_EIM_D29__AUD6_RXD IOMUX_PAD(0x424, 0x090, 5, 0x8ec, 0, NO_PAD_CTRL) | ||
128 | #define MX51_PAD_EIM_D29__EIM_D29 IOMUX_PAD(0x424, 0x090, 0, __NA_, 0, NO_PAD_CTRL) | ||
129 | #define MX51_PAD_EIM_D29__KEY_ROW5 IOMUX_PAD(0x424, 0x090, 1, 0x9d4, 0, NO_PAD_CTRL) | ||
130 | #define MX51_PAD_EIM_D29__USBOTG_DATA5 IOMUX_PAD(0x424, 0x090, 2, __NA_, 0, NO_PAD_CTRL) | ||
131 | #define MX51_PAD_EIM_D30__AUD6_TXC IOMUX_PAD(0x428, 0x094, 5, 0x8fc, 0, NO_PAD_CTRL) | ||
132 | #define MX51_PAD_EIM_D30__EIM_D30 IOMUX_PAD(0x428, 0x094, 0, __NA_, 0, NO_PAD_CTRL) | ||
133 | #define MX51_PAD_EIM_D30__KEY_ROW6 IOMUX_PAD(0x428, 0x094, 1, 0x9d8, 0, NO_PAD_CTRL) | ||
134 | #define MX51_PAD_EIM_D30__USBOTG_DATA6 IOMUX_PAD(0x428, 0x094, 2, __NA_, 0, NO_PAD_CTRL) | ||
135 | #define MX51_PAD_EIM_D31__AUD6_TXFS IOMUX_PAD(0x42c, 0x098, 5, 0x900, 0, NO_PAD_CTRL) | ||
136 | #define MX51_PAD_EIM_D31__EIM_D31 IOMUX_PAD(0x42c, 0x098, 0, __NA_, 0, NO_PAD_CTRL) | ||
137 | #define MX51_PAD_EIM_D31__KEY_ROW7 IOMUX_PAD(0x42c, 0x098, 1, 0x9dc, 0, NO_PAD_CTRL) | ||
138 | #define MX51_PAD_EIM_D31__USBOTG_DATA7 IOMUX_PAD(0x42c, 0x098, 2, __NA_, 0, NO_PAD_CTRL) | ||
139 | #define MX51_PAD_EIM_A16__EIM_A16 IOMUX_PAD(0x430, 0x09c, 0, __NA_, 0, NO_PAD_CTRL) | ||
140 | #define MX51_PAD_EIM_A16__GPIO2_10 IOMUX_PAD(0x430, 0x09c, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
141 | #define MX51_PAD_EIM_A16__OSC_FREQ_SEL0 IOMUX_PAD(0x430, 0x09c, 7, __NA_, 0, NO_PAD_CTRL) | ||
142 | #define MX51_PAD_EIM_A17__EIM_A17 IOMUX_PAD(0x434, 0x0a0, 0, __NA_, 0, NO_PAD_CTRL) | ||
143 | #define MX51_PAD_EIM_A17__GPIO2_11 IOMUX_PAD(0x434, 0x0a0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
144 | #define MX51_PAD_EIM_A17__OSC_FREQ_SEL1 IOMUX_PAD(0x434, 0x0a0, 7, __NA_, 0, NO_PAD_CTRL) | ||
145 | #define MX51_PAD_EIM_A18__BOOT_LPB0 IOMUX_PAD(0x438, 0x0a4, 7, __NA_, 0, NO_PAD_CTRL) | ||
146 | #define MX51_PAD_EIM_A18__EIM_A18 IOMUX_PAD(0x438, 0x0a4, 0, __NA_, 0, NO_PAD_CTRL) | ||
147 | #define MX51_PAD_EIM_A18__GPIO2_12 IOMUX_PAD(0x438, 0x0a4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
148 | #define MX51_PAD_EIM_A19__BOOT_LPB1 IOMUX_PAD(0x43c, 0x0a8, 7, __NA_, 0, NO_PAD_CTRL) | ||
149 | #define MX51_PAD_EIM_A19__EIM_A19 IOMUX_PAD(0x43c, 0x0a8, 0, __NA_, 0, NO_PAD_CTRL) | ||
150 | #define MX51_PAD_EIM_A19__GPIO2_13 IOMUX_PAD(0x43c, 0x0a8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
151 | #define MX51_PAD_EIM_A20__BOOT_UART_SRC0 IOMUX_PAD(0x440, 0x0ac, 7, __NA_, 0, NO_PAD_CTRL) | ||
152 | #define MX51_PAD_EIM_A20__EIM_A20 IOMUX_PAD(0x440, 0x0ac, 0, __NA_, 0, NO_PAD_CTRL) | ||
153 | #define MX51_PAD_EIM_A20__GPIO2_14 IOMUX_PAD(0x440, 0x0ac, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
154 | #define MX51_PAD_EIM_A21__BOOT_UART_SRC1 IOMUX_PAD(0x444, 0x0b0, 7, __NA_, 0, NO_PAD_CTRL) | ||
155 | #define MX51_PAD_EIM_A21__EIM_A21 IOMUX_PAD(0x444, 0x0b0, 0, __NA_, 0, NO_PAD_CTRL) | ||
156 | #define MX51_PAD_EIM_A21__GPIO2_15 IOMUX_PAD(0x444, 0x0b0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
157 | #define MX51_PAD_EIM_A22__EIM_A22 IOMUX_PAD(0x448, 0x0b4, 0, __NA_, 0, NO_PAD_CTRL) | ||
158 | #define MX51_PAD_EIM_A22__GPIO2_16 IOMUX_PAD(0x448, 0x0b4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
159 | #define MX51_PAD_EIM_A23__BOOT_HPN_EN IOMUX_PAD(0x44c, 0x0b8, 7, __NA_, 0, NO_PAD_CTRL) | ||
160 | #define MX51_PAD_EIM_A23__EIM_A23 IOMUX_PAD(0x44c, 0x0b8, 0, __NA_, 0, NO_PAD_CTRL) | ||
161 | #define MX51_PAD_EIM_A23__GPIO2_17 IOMUX_PAD(0x44c, 0x0b8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
162 | #define MX51_PAD_EIM_A24__EIM_A24 IOMUX_PAD(0x450, 0x0bc, 0, __NA_, 0, NO_PAD_CTRL) | ||
163 | #define MX51_PAD_EIM_A24__GPIO2_18 IOMUX_PAD(0x450, 0x0bc, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
164 | #define MX51_PAD_EIM_A24__USBH2_CLK IOMUX_PAD(0x450, 0x0bc, 2, __NA_, 0, NO_PAD_CTRL) | ||
165 | #define MX51_PAD_EIM_A25__DISP1_PIN4 IOMUX_PAD(0x454, 0x0c0, 6, __NA_, 0, NO_PAD_CTRL) | ||
166 | #define MX51_PAD_EIM_A25__EIM_A25 IOMUX_PAD(0x454, 0x0c0, 0, __NA_, 0, NO_PAD_CTRL) | ||
167 | #define MX51_PAD_EIM_A25__GPIO2_19 IOMUX_PAD(0x454, 0x0c0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
168 | #define MX51_PAD_EIM_A25__USBH2_DIR IOMUX_PAD(0x454, 0x0c0, 2, __NA_, 0, NO_PAD_CTRL) | ||
169 | #define MX51_PAD_EIM_A26__CSI1_DATA_EN IOMUX_PAD(0x458, 0x0c4, 5, 0x9a0, 0, NO_PAD_CTRL) | ||
170 | #define MX51_PAD_EIM_A26__DISP2_EXT_CLK IOMUX_PAD(0x458, 0x0c4, 6, 0x908, 0, NO_PAD_CTRL) | ||
171 | #define MX51_PAD_EIM_A26__EIM_A26 IOMUX_PAD(0x458, 0x0c4, 0, __NA_, 0, NO_PAD_CTRL) | ||
172 | #define MX51_PAD_EIM_A26__GPIO2_20 IOMUX_PAD(0x458, 0x0c4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
173 | #define MX51_PAD_EIM_A26__USBH2_STP IOMUX_PAD(0x458, 0x0c4, 2, __NA_, 0, NO_PAD_CTRL) | ||
174 | #define MX51_PAD_EIM_A27__CSI2_DATA_EN IOMUX_PAD(0x45c, 0x0c8, 5, 0x99c, 0, NO_PAD_CTRL) | ||
175 | #define MX51_PAD_EIM_A27__DISP1_PIN1 IOMUX_PAD(0x45c, 0x0c8, 6, 0x9a4, 0, NO_PAD_CTRL) | ||
176 | #define MX51_PAD_EIM_A27__EIM_A27 IOMUX_PAD(0x45c, 0x0c8, 0, __NA_, 0, NO_PAD_CTRL) | ||
177 | #define MX51_PAD_EIM_A27__GPIO2_21 IOMUX_PAD(0x45c, 0x0c8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
178 | #define MX51_PAD_EIM_A27__USBH2_NXT IOMUX_PAD(0x45c, 0x0c8, 2, __NA_, 0, NO_PAD_CTRL) | ||
179 | #define MX51_PAD_EIM_EB0__EIM_EB0 IOMUX_PAD(0x460, 0x0cc, 0, __NA_, 0, NO_PAD_CTRL) | ||
180 | #define MX51_PAD_EIM_EB1__EIM_EB1 IOMUX_PAD(0x464, 0x0d0, 0, __NA_, 0, NO_PAD_CTRL) | ||
181 | #define MX51_PAD_EIM_EB2__AUD5_RXFS IOMUX_PAD(0x468, 0x0d4, 6, 0x8e0, 0, NO_PAD_CTRL) | ||
182 | #define MX51_PAD_EIM_EB2__CSI1_D2 IOMUX_PAD(0x468, 0x0d4, 5, __NA_, 0, NO_PAD_CTRL) | ||
183 | #define MX51_PAD_EIM_EB2__EIM_EB2 IOMUX_PAD(0x468, 0x0d4, 0, __NA_, 0, NO_PAD_CTRL) | ||
184 | #define MX51_PAD_EIM_EB2__FEC_MDIO (IOMUX_PAD(0x468, 0x0d4, 3, 0x954, 0, 0) | \ | ||
185 | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | PAD_CTL_PKE | PAD_CTL_SRE_FAST | \ | ||
186 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS)) | ||
187 | #define MX51_PAD_EIM_EB2__GPIO2_22 IOMUX_PAD(0x468, 0x0d4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
188 | #define MX51_PAD_EIM_EB2__GPT_CMPOUT1 IOMUX_PAD(0x468, 0x0d4, 7, __NA_, 0, NO_PAD_CTRL) | ||
189 | #define MX51_PAD_EIM_EB3__AUD5_RXC IOMUX_PAD(0x46c, 0x0d8, 6, 0x8dc, 0, NO_PAD_CTRL) | ||
190 | #define MX51_PAD_EIM_EB3__CSI1_D3 IOMUX_PAD(0x46c, 0x0d8, 5, __NA_, 0, NO_PAD_CTRL) | ||
191 | #define MX51_PAD_EIM_EB3__EIM_EB3 IOMUX_PAD(0x46c, 0x0d8, 0, __NA_, 0, NO_PAD_CTRL) | ||
192 | #define MX51_PAD_EIM_EB3__FEC_RDATA1 IOMUX_PAD(0x46c, 0x0d8, 3, 0x95c, 0, NO_PAD_CTRL) | ||
193 | #define MX51_PAD_EIM_EB3__GPIO2_23 IOMUX_PAD(0x46c, 0x0d8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
194 | #define MX51_PAD_EIM_EB3__GPT_CMPOUT2 IOMUX_PAD(0x46c, 0x0d8, 7, __NA_, 0, NO_PAD_CTRL) | ||
195 | #define MX51_PAD_EIM_OE__EIM_OE IOMUX_PAD(0x470, 0x0dc, 0, __NA_, 0, NO_PAD_CTRL) | ||
196 | #define MX51_PAD_EIM_OE__GPIO2_24 IOMUX_PAD(0x470, 0x0dc, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
197 | #define MX51_PAD_EIM_CS0__EIM_CS0 IOMUX_PAD(0x474, 0x0e0, 0, __NA_, 0, NO_PAD_CTRL) | ||
198 | #define MX51_PAD_EIM_CS0__GPIO2_25 IOMUX_PAD(0x474, 0x0e0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
199 | #define MX51_PAD_EIM_CS1__EIM_CS1 IOMUX_PAD(0x478, 0x0e4, 0, __NA_, 0, NO_PAD_CTRL) | ||
200 | #define MX51_PAD_EIM_CS1__GPIO2_26 IOMUX_PAD(0x478, 0x0e4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
201 | #define MX51_PAD_EIM_CS2__AUD5_TXD IOMUX_PAD(0x47c, 0x0e8, 6, 0x8d8, 1, NO_PAD_CTRL) | ||
202 | #define MX51_PAD_EIM_CS2__CSI1_D4 IOMUX_PAD(0x47c, 0x0e8, 5, __NA_, 0, NO_PAD_CTRL) | ||
203 | #define MX51_PAD_EIM_CS2__EIM_CS2 IOMUX_PAD(0x47c, 0x0e8, 0, __NA_, 0, NO_PAD_CTRL) | ||
204 | #define MX51_PAD_EIM_CS2__FEC_RDATA2 IOMUX_PAD(0x47c, 0x0e8, 3, 0x960, 0, NO_PAD_CTRL) | ||
205 | #define MX51_PAD_EIM_CS2__GPIO2_27 IOMUX_PAD(0x47c, 0x0e8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
206 | #define MX51_PAD_EIM_CS2__USBOTG_STP IOMUX_PAD(0x47c, 0x0e8, 2, __NA_, 0, NO_PAD_CTRL) | ||
207 | #define MX51_PAD_EIM_CS3__AUD5_RXD IOMUX_PAD(0x480, 0x0ec, 6, 0x8d4, 1, NO_PAD_CTRL) | ||
208 | #define MX51_PAD_EIM_CS3__CSI1_D5 IOMUX_PAD(0x480, 0x0ec, 5, __NA_, 0, NO_PAD_CTRL) | ||
209 | #define MX51_PAD_EIM_CS3__EIM_CS3 IOMUX_PAD(0x480, 0x0ec, 0, __NA_, 0, NO_PAD_CTRL) | ||
210 | #define MX51_PAD_EIM_CS3__FEC_RDATA3 IOMUX_PAD(0x480, 0x0ec, 3, 0x964, 0, NO_PAD_CTRL) | ||
211 | #define MX51_PAD_EIM_CS3__GPIO2_28 IOMUX_PAD(0x480, 0x0ec, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
212 | #define MX51_PAD_EIM_CS3__USBOTG_NXT IOMUX_PAD(0x480, 0x0ec, 2, __NA_, 0, NO_PAD_CTRL) | ||
213 | #define MX51_PAD_EIM_CS4__AUD5_TXC IOMUX_PAD(0x484, 0x0f0, 6, 0x8e4, 1, NO_PAD_CTRL) | ||
214 | #define MX51_PAD_EIM_CS4__CSI1_D6 IOMUX_PAD(0x484, 0x0f0, 5, __NA_, 0, NO_PAD_CTRL) | ||
215 | #define MX51_PAD_EIM_CS4__EIM_CS4 IOMUX_PAD(0x484, 0x0f0, 0, __NA_, 0, NO_PAD_CTRL) | ||
216 | #define MX51_PAD_EIM_CS4__FEC_RX_ER IOMUX_PAD(0x484, 0x0f0, 3, 0x970, 0, MX51_PAD_CTRL_2) | ||
217 | #define MX51_PAD_EIM_CS4__GPIO2_29 IOMUX_PAD(0x484, 0x0f0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
218 | #define MX51_PAD_EIM_CS4__USBOTG_CLK IOMUX_PAD(0x484, 0x0f0, 2, __NA_, 0, NO_PAD_CTRL) | ||
219 | #define MX51_PAD_EIM_CS5__AUD5_TXFS IOMUX_PAD(0x488, 0x0f4, 6, 0x8e8, 1, NO_PAD_CTRL) | ||
220 | #define MX51_PAD_EIM_CS5__CSI1_D7 IOMUX_PAD(0x488, 0x0f4, 5, __NA_, 0, NO_PAD_CTRL) | ||
221 | #define MX51_PAD_EIM_CS5__DISP1_EXT_CLK IOMUX_PAD(0x488, 0x0f4, 4, 0x904, 0, NO_PAD_CTRL) | ||
222 | #define MX51_PAD_EIM_CS5__EIM_CS5 IOMUX_PAD(0x488, 0x0f4, 0, __NA_, 0, NO_PAD_CTRL) | ||
223 | #define MX51_PAD_EIM_CS5__FEC_CRS IOMUX_PAD(0x488, 0x0f4, 3, 0x950, 0, MX51_PAD_CTRL_2) | ||
224 | #define MX51_PAD_EIM_CS5__GPIO2_30 IOMUX_PAD(0x488, 0x0f4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
225 | #define MX51_PAD_EIM_CS5__USBOTG_DIR IOMUX_PAD(0x488, 0x0f4, 2, __NA_, 0, NO_PAD_CTRL) | ||
226 | #define MX51_PAD_EIM_DTACK__EIM_DTACK IOMUX_PAD(0x48c, 0x0f8, 0, __NA_, 0, NO_PAD_CTRL) | ||
227 | #define MX51_PAD_EIM_DTACK__GPIO2_31 IOMUX_PAD(0x48c, 0x0f8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
228 | #define MX51_PAD_EIM_LBA__EIM_LBA IOMUX_PAD(0x494, 0x0fc, 0, __NA_, 0, NO_PAD_CTRL) | ||
229 | #define MX51_PAD_EIM_LBA__GPIO3_1 IOMUX_PAD(0x494, 0x0fc, 1, 0x978, 0, MX51_GPIO_PAD_CTRL) | ||
230 | #define MX51_PAD_EIM_CRE__EIM_CRE IOMUX_PAD(0x4a0, 0x100, 0, __NA_, 0, NO_PAD_CTRL) | ||
231 | #define MX51_PAD_EIM_CRE__GPIO3_2 IOMUX_PAD(0x4a0, 0x100, 1, 0x97c, 0, MX51_GPIO_PAD_CTRL) | ||
232 | #define MX51_PAD_DRAM_CS1__DRAM_CS1 IOMUX_PAD(0x4d0, 0x104, 0, __NA_, 0, NO_PAD_CTRL) | ||
233 | #define MX51_PAD_DRAM_CS1__CCM_CLKO IOMUX_PAD(0x4d0, 0x104, 1, __NA_, 0, NO_PAD_CTRL) | ||
234 | #define MX51_PAD_NANDF_WE_B__GPIO3_3 IOMUX_PAD(0x4e4, 0x108, 3, 0x980, 0, MX51_GPIO_PAD_CTRL) | ||
235 | #define MX51_PAD_NANDF_WE_B__NANDF_WE_B IOMUX_PAD(0x4e4, 0x108, 0, __NA_, 0, NO_PAD_CTRL) | ||
236 | #define MX51_PAD_NANDF_WE_B__PATA_DIOW IOMUX_PAD(0x4e4, 0x108, 1, __NA_, 0, NO_PAD_CTRL) | ||
237 | #define MX51_PAD_NANDF_WE_B__SD3_DATA0 IOMUX_PAD(0x4e4, 0x108, 2, 0x93c, 0, MX51_SDHCI_PAD_CTRL) | ||
238 | #define MX51_PAD_NANDF_RE_B__GPIO3_4 IOMUX_PAD(0x4e8, 0x10c, 3, 0x984, 0, MX51_GPIO_PAD_CTRL) | ||
239 | #define MX51_PAD_NANDF_RE_B__NANDF_RE_B IOMUX_PAD(0x4e8, 0x10c, 0, __NA_, 0, NO_PAD_CTRL) | ||
240 | #define MX51_PAD_NANDF_RE_B__PATA_DIOR IOMUX_PAD(0x4e8, 0x10c, 1, __NA_, 0, NO_PAD_CTRL) | ||
241 | #define MX51_PAD_NANDF_RE_B__SD3_DATA1 IOMUX_PAD(0x4e8, 0x10c, 2, 0x940, 0, MX51_SDHCI_PAD_CTRL) | ||
242 | #define MX51_PAD_NANDF_ALE__GPIO3_5 IOMUX_PAD(0x4ec, 0x110, 3, 0x988, 0, MX51_GPIO_PAD_CTRL) | ||
243 | #define MX51_PAD_NANDF_ALE__NANDF_ALE IOMUX_PAD(0x4ec, 0x110, 0, __NA_, 0, NO_PAD_CTRL) | ||
244 | #define MX51_PAD_NANDF_ALE__PATA_BUFFER_EN IOMUX_PAD(0x4ec, 0x110, 1, __NA_, 0, NO_PAD_CTRL) | ||
245 | #define MX51_PAD_NANDF_CLE__GPIO3_6 IOMUX_PAD(0x4f0, 0x114, 3, 0x98c, 0, MX51_GPIO_PAD_CTRL) | ||
246 | #define MX51_PAD_NANDF_CLE__NANDF_CLE IOMUX_PAD(0x4f0, 0x114, 0, __NA_, 0, NO_PAD_CTRL) | ||
247 | #define MX51_PAD_NANDF_CLE__PATA_RESET_B IOMUX_PAD(0x4f0, 0x114, 1, __NA_, 0, NO_PAD_CTRL) | ||
248 | #define MX51_PAD_NANDF_WP_B__GPIO3_7 IOMUX_PAD(0x4f4, 0x118, 3, 0x990, 0, MX51_GPIO_PAD_CTRL) | ||
249 | #define MX51_PAD_NANDF_WP_B__NANDF_WP_B IOMUX_PAD(0x4f4, 0x118, 0, __NA_, 0, NO_PAD_CTRL) | ||
250 | #define MX51_PAD_NANDF_WP_B__PATA_DMACK IOMUX_PAD(0x4f4, 0x118, 1, __NA_, 0, NO_PAD_CTRL) | ||
251 | #define MX51_PAD_NANDF_WP_B__SD3_DATA2 IOMUX_PAD(0x4f4, 0x118, 2, 0x944, 0, MX51_SDHCI_PAD_CTRL) | ||
252 | #define MX51_PAD_NANDF_RB0__ECSPI2_SS1 IOMUX_PAD(0x4f8, 0x11c, 5, 0x930, 0, MX51_ECSPI_PAD_CTRL) | ||
253 | #define MX51_PAD_NANDF_RB0__GPIO3_8 IOMUX_PAD(0x4f8, 0x11c, 3, 0x994, 0, MX51_GPIO_PAD_CTRL) | ||
254 | #define MX51_PAD_NANDF_RB0__NANDF_RB0 IOMUX_PAD(0x4f8, 0x11c, 0, __NA_, 0, NO_PAD_CTRL) | ||
255 | #define MX51_PAD_NANDF_RB0__PATA_DMARQ IOMUX_PAD(0x4f8, 0x11c, 1, __NA_, 0, NO_PAD_CTRL) | ||
256 | #define MX51_PAD_NANDF_RB0__SD3_DATA3 IOMUX_PAD(0x4f8, 0x11c, 2, 0x948, 0, MX51_SDHCI_PAD_CTRL) | ||
257 | #define MX51_PAD_NANDF_RB1__CSPI_MOSI IOMUX_PAD(0x4fc, 0x120, 6, 0x91c, 0, MX51_ECSPI_PAD_CTRL) | ||
258 | #define MX51_PAD_NANDF_RB1__ECSPI2_RDY IOMUX_PAD(0x4fc, 0x120, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
259 | #define MX51_PAD_NANDF_RB1__GPIO3_9 IOMUX_PAD(0x4fc, 0x120, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
260 | #define MX51_PAD_NANDF_RB1__NANDF_RB1 IOMUX_PAD(0x4fc, 0x120, 0, __NA_, 0, NO_PAD_CTRL) | ||
261 | #define MX51_PAD_NANDF_RB1__PATA_IORDY IOMUX_PAD(0x4fc, 0x120, 1, __NA_, 0, NO_PAD_CTRL) | ||
262 | #define MX51_PAD_NANDF_RB1__GPT_CMPOUT2 IOMUX_PAD(0x4fc, 0x120, 4, __NA_, 0, NO_PAD_CTRL) | ||
263 | #define MX51_PAD_NANDF_RB1__SD4_CMD IOMUX_PAD(0x4fc, 0x120, 0x15, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
264 | #define MX51_PAD_NANDF_RB2__DISP2_WAIT IOMUX_PAD(0x500, 0x124, 5, 0x9a8, 0, NO_PAD_CTRL) | ||
265 | #define MX51_PAD_NANDF_RB2__ECSPI2_SCLK IOMUX_PAD(0x500, 0x124, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
266 | #define MX51_PAD_NANDF_RB2__FEC_COL IOMUX_PAD(0x500, 0x124, 1, 0x94c, 0, MX51_PAD_CTRL_2) | ||
267 | #define MX51_PAD_NANDF_RB2__GPIO3_10 IOMUX_PAD(0x500, 0x124, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
268 | #define MX51_PAD_NANDF_RB2__NANDF_RB2 IOMUX_PAD(0x500, 0x124, 0, __NA_, 0, NO_PAD_CTRL) | ||
269 | #define MX51_PAD_NANDF_RB2__GPT_CMPOUT3 IOMUX_PAD(0x500, 0x124, 4, __NA_, 0, NO_PAD_CTRL) | ||
270 | #define MX51_PAD_NANDF_RB2__USBH3_H3_DP IOMUX_PAD(0x500, 0x124, 0x17, __NA_, 0, NO_PAD_CTRL) | ||
271 | #define MX51_PAD_NANDF_RB2__USBH3_NXT IOMUX_PAD(0x500, 0x124, 6, 0xa20, 0, NO_PAD_CTRL) | ||
272 | #define MX51_PAD_NANDF_RB3__DISP1_WAIT IOMUX_PAD(0x504, 0x128, 5, __NA_, 0, NO_PAD_CTRL) | ||
273 | #define MX51_PAD_NANDF_RB3__ECSPI2_MISO IOMUX_PAD(0x504, 0x128, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
274 | #define MX51_PAD_NANDF_RB3__FEC_RX_CLK IOMUX_PAD(0x504, 0x128, 1, 0x968, 0, MX51_PAD_CTRL_2) | ||
275 | #define MX51_PAD_NANDF_RB3__GPIO3_11 IOMUX_PAD(0x504, 0x128, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
276 | #define MX51_PAD_NANDF_RB3__NANDF_RB3 IOMUX_PAD(0x504, 0x128, 0, __NA_, 0, NO_PAD_CTRL) | ||
277 | #define MX51_PAD_NANDF_RB3__USBH3_CLK IOMUX_PAD(0x504, 0x128, 6, 0x9f8, 0, NO_PAD_CTRL) | ||
278 | #define MX51_PAD_NANDF_RB3__USBH3_H3_DM IOMUX_PAD(0x504, 0x128, 0x17, __NA_, 0, NO_PAD_CTRL) | ||
279 | #define MX51_PAD_GPIO_NAND__GPIO_NAND IOMUX_PAD(0x514, 0x12c, 0, 0x998, 0, MX51_GPIO_PAD_CTRL) | ||
280 | #define MX51_PAD_GPIO_NAND__PATA_INTRQ IOMUX_PAD(0x514, 0x12c, 1, __NA_, 0, NO_PAD_CTRL) | ||
281 | #define MX51_PAD_NANDF_CS0__GPIO3_16 IOMUX_PAD(0x518, 0x130, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
282 | #define MX51_PAD_NANDF_CS0__NANDF_CS0 IOMUX_PAD(0x518, 0x130, 0, __NA_, 0, NO_PAD_CTRL) | ||
283 | #define MX51_PAD_NANDF_CS1__GPIO3_17 IOMUX_PAD(0x51c, 0x134, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
284 | #define MX51_PAD_NANDF_CS1__NANDF_CS1 IOMUX_PAD(0x51c, 0x134, 0, __NA_, 0, NO_PAD_CTRL) | ||
285 | #define MX51_PAD_NANDF_CS2__CSPI_SCLK IOMUX_PAD(0x520, 0x138, 6, 0x914, 0, MX51_ECSPI_PAD_CTRL) | ||
286 | #define MX51_PAD_NANDF_CS2__FEC_TX_ER IOMUX_PAD(0x520, 0x138, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
287 | #define MX51_PAD_NANDF_CS2__GPIO3_18 IOMUX_PAD(0x520, 0x138, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
288 | #define MX51_PAD_NANDF_CS2__NANDF_CS2 IOMUX_PAD(0x520, 0x138, 0, __NA_, 0, NO_PAD_CTRL) | ||
289 | #define MX51_PAD_NANDF_CS2__PATA_CS_0 IOMUX_PAD(0x520, 0x138, 1, __NA_, 0, NO_PAD_CTRL) | ||
290 | #define MX51_PAD_NANDF_CS2__SD4_CLK IOMUX_PAD(0x520, 0x138, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS) | ||
291 | #define MX51_PAD_NANDF_CS2__USBH3_H1_DP IOMUX_PAD(0x520, 0x138, 0x17, __NA_, 0, NO_PAD_CTRL) | ||
292 | #define MX51_PAD_NANDF_CS3__FEC_MDC IOMUX_PAD(0x524, 0x13c, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
293 | #define MX51_PAD_NANDF_CS3__GPIO3_19 IOMUX_PAD(0x524, 0x13c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
294 | #define MX51_PAD_NANDF_CS3__NANDF_CS3 IOMUX_PAD(0x524, 0x13c, 0, __NA_, 0, NO_PAD_CTRL) | ||
295 | #define MX51_PAD_NANDF_CS3__PATA_CS_1 IOMUX_PAD(0x524, 0x13c, 1, __NA_, 0, NO_PAD_CTRL) | ||
296 | #define MX51_PAD_NANDF_CS3__SD4_DAT0 IOMUX_PAD(0x524, 0x13c, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
297 | #define MX51_PAD_NANDF_CS3__USBH3_H1_DM IOMUX_PAD(0x524, 0x13c, 0x17, __NA_, 0, NO_PAD_CTRL) | ||
298 | #define MX51_PAD_NANDF_CS4__FEC_TDATA1 IOMUX_PAD(0x528, 0x140, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
299 | #define MX51_PAD_NANDF_CS4__GPIO3_20 IOMUX_PAD(0x528, 0x140, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
300 | #define MX51_PAD_NANDF_CS4__NANDF_CS4 IOMUX_PAD(0x528, 0x140, 0, __NA_, 0, NO_PAD_CTRL) | ||
301 | #define MX51_PAD_NANDF_CS4__PATA_DA_0 IOMUX_PAD(0x528, 0x140, 1, __NA_, 0, NO_PAD_CTRL) | ||
302 | #define MX51_PAD_NANDF_CS4__SD4_DAT1 IOMUX_PAD(0x528, 0x140, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
303 | #define MX51_PAD_NANDF_CS4__USBH3_STP IOMUX_PAD(0x528, 0x140, 7, 0xa24, 0, NO_PAD_CTRL) | ||
304 | #define MX51_PAD_NANDF_CS5__FEC_TDATA2 IOMUX_PAD(0x52c, 0x144, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
305 | #define MX51_PAD_NANDF_CS5__GPIO3_21 IOMUX_PAD(0x52c, 0x144, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
306 | #define MX51_PAD_NANDF_CS5__NANDF_CS5 IOMUX_PAD(0x52c, 0x144, 0, __NA_, 0, NO_PAD_CTRL) | ||
307 | #define MX51_PAD_NANDF_CS5__PATA_DA_1 IOMUX_PAD(0x52c, 0x144, 1, __NA_, 0, NO_PAD_CTRL) | ||
308 | #define MX51_PAD_NANDF_CS5__SD4_DAT2 IOMUX_PAD(0x52c, 0x144, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
309 | #define MX51_PAD_NANDF_CS5__USBH3_DIR IOMUX_PAD(0x52c, 0x144, 7, 0xa1c, 0, NO_PAD_CTRL) | ||
310 | #define MX51_PAD_NANDF_CS6__CSPI_SS3 IOMUX_PAD(0x530, 0x148, 7, 0x928, 0, MX51_ECSPI_PAD_CTRL) | ||
311 | #define MX51_PAD_NANDF_CS6__FEC_TDATA3 IOMUX_PAD(0x530, 0x148, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
312 | #define MX51_PAD_NANDF_CS6__GPIO3_22 IOMUX_PAD(0x530, 0x148, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
313 | #define MX51_PAD_NANDF_CS6__NANDF_CS6 IOMUX_PAD(0x530, 0x148, 0, __NA_, 0, NO_PAD_CTRL) | ||
314 | #define MX51_PAD_NANDF_CS6__PATA_DA_2 IOMUX_PAD(0x530, 0x148, 1, __NA_, 0, NO_PAD_CTRL) | ||
315 | #define MX51_PAD_NANDF_CS6__SD4_DAT3 IOMUX_PAD(0x530, 0x148, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
316 | #define MX51_PAD_NANDF_CS7__FEC_TX_EN IOMUX_PAD(0x534, 0x14c, 1, __NA_, 0, MX51_PAD_CTRL_5) | ||
317 | #define MX51_PAD_NANDF_CS7__GPIO3_23 IOMUX_PAD(0x534, 0x14c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
318 | #define MX51_PAD_NANDF_CS7__NANDF_CS7 IOMUX_PAD(0x534, 0x14c, 0, __NA_, 0, NO_PAD_CTRL) | ||
319 | #define MX51_PAD_NANDF_CS7__SD3_CLK IOMUX_PAD(0x534, 0x14c, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS) | ||
320 | #define MX51_PAD_NANDF_RDY_INT__ECSPI2_SS0 IOMUX_PAD(0x538, 0x150, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
321 | #define MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK IOMUX_PAD(0x538, 0x150, 1, 0x974, 0, MX51_PAD_CTRL_4) | ||
322 | #define MX51_PAD_NANDF_RDY_INT__GPIO3_24 IOMUX_PAD(0x538, 0x150, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
323 | #define MX51_PAD_NANDF_RDY_INT__NANDF_RDY_INT IOMUX_PAD(0x538, 0x150, 0, 0x938, 0, NO_PAD_CTRL) | ||
324 | #define MX51_PAD_NANDF_RDY_INT__SD3_CMD IOMUX_PAD(0x538, 0x150, 0x15, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
325 | #define MX51_PAD_NANDF_D15__ECSPI2_MOSI IOMUX_PAD(0x53c, 0x154, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
326 | #define MX51_PAD_NANDF_D15__GPIO3_25 IOMUX_PAD(0x53c, 0x154, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
327 | #define MX51_PAD_NANDF_D15__NANDF_D15 IOMUX_PAD(0x53c, 0x154, 0, __NA_, 0, NO_PAD_CTRL) | ||
328 | #define MX51_PAD_NANDF_D15__PATA_DATA15 IOMUX_PAD(0x53c, 0x154, 1, __NA_, 0, NO_PAD_CTRL) | ||
329 | #define MX51_PAD_NANDF_D15__SD3_DAT7 IOMUX_PAD(0x53c, 0x154, 5, __NA_, 0, NO_PAD_CTRL) | ||
330 | #define MX51_PAD_NANDF_D14__ECSPI2_SS3 IOMUX_PAD(0x540, 0x158, 2, 0x934, 0, MX51_ECSPI_PAD_CTRL) | ||
331 | #define MX51_PAD_NANDF_D14__GPIO3_26 IOMUX_PAD(0x540, 0x158, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
332 | #define MX51_PAD_NANDF_D14__NANDF_D14 IOMUX_PAD(0x540, 0x158, 0, __NA_, 0, NO_PAD_CTRL) | ||
333 | #define MX51_PAD_NANDF_D14__PATA_DATA14 IOMUX_PAD(0x540, 0x158, 1, __NA_, 0, NO_PAD_CTRL) | ||
334 | #define MX51_PAD_NANDF_D14__SD3_DAT6 IOMUX_PAD(0x540, 0x158, 5, __NA_, 0, NO_PAD_CTRL) | ||
335 | #define MX51_PAD_NANDF_D13__ECSPI2_SS2 IOMUX_PAD(0x544, 0x15c, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
336 | #define MX51_PAD_NANDF_D13__GPIO3_27 IOMUX_PAD(0x544, 0x15c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
337 | #define MX51_PAD_NANDF_D13__NANDF_D13 IOMUX_PAD(0x544, 0x15c, 0, __NA_, 0, NO_PAD_CTRL) | ||
338 | #define MX51_PAD_NANDF_D13__PATA_DATA13 IOMUX_PAD(0x544, 0x15c, 1, __NA_, 0, NO_PAD_CTRL) | ||
339 | #define MX51_PAD_NANDF_D13__SD3_DAT5 IOMUX_PAD(0x544, 0x15c, 5, __NA_, 0, NO_PAD_CTRL) | ||
340 | #define MX51_PAD_NANDF_D12__ECSPI2_SS1 IOMUX_PAD(0x548, 0x160, 2, 0x930, 1, MX51_ECSPI_PAD_CTRL) | ||
341 | #define MX51_PAD_NANDF_D12__GPIO3_28 IOMUX_PAD(0x548, 0x160, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
342 | #define MX51_PAD_NANDF_D12__NANDF_D12 IOMUX_PAD(0x548, 0x160, 0, __NA_, 0, NO_PAD_CTRL) | ||
343 | #define MX51_PAD_NANDF_D12__PATA_DATA12 IOMUX_PAD(0x548, 0x160, 1, __NA_, 0, NO_PAD_CTRL) | ||
344 | #define MX51_PAD_NANDF_D12__SD3_DAT4 IOMUX_PAD(0x548, 0x160, 5, __NA_, 0, NO_PAD_CTRL) | ||
345 | #define MX51_PAD_NANDF_D11__FEC_RX_DV IOMUX_PAD(0x54c, 0x164, 2, 0x96c, 0, NO_PAD_CTRL) | ||
346 | #define MX51_PAD_NANDF_D11__GPIO3_29 IOMUX_PAD(0x54c, 0x164, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
347 | #define MX51_PAD_NANDF_D11__NANDF_D11 IOMUX_PAD(0x54c, 0x164, 0, __NA_, 0, NO_PAD_CTRL) | ||
348 | #define MX51_PAD_NANDF_D11__PATA_DATA11 IOMUX_PAD(0x54c, 0x164, 1, __NA_, 0, NO_PAD_CTRL) | ||
349 | #define MX51_PAD_NANDF_D11__SD3_DATA3 IOMUX_PAD(0x54c, 0x164, 5, 0x948, 1, NO_PAD_CTRL) | ||
350 | #define MX51_PAD_NANDF_D10__GPIO3_30 IOMUX_PAD(0x550, 0x168, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
351 | #define MX51_PAD_NANDF_D10__NANDF_D10 IOMUX_PAD(0x550, 0x168, 0, __NA_, 0, NO_PAD_CTRL) | ||
352 | #define MX51_PAD_NANDF_D10__PATA_DATA10 IOMUX_PAD(0x550, 0x168, 1, __NA_, 0, NO_PAD_CTRL) | ||
353 | #define MX51_PAD_NANDF_D10__SD3_DATA2 IOMUX_PAD(0x550, 0x168, 5, 0x944, 1, NO_PAD_CTRL) | ||
354 | #define MX51_PAD_NANDF_D9__FEC_RDATA0 IOMUX_PAD(0x554, 0x16c, 0x12, 0x958, 0, MX51_PAD_CTRL_4) | ||
355 | #define MX51_PAD_NANDF_D9__GPIO3_31 IOMUX_PAD(0x554, 0x16c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
356 | #define MX51_PAD_NANDF_D9__NANDF_D9 IOMUX_PAD(0x554, 0x16c, 0, __NA_, 0, NO_PAD_CTRL) | ||
357 | #define MX51_PAD_NANDF_D9__PATA_DATA9 IOMUX_PAD(0x554, 0x16c, 1, __NA_, 0, NO_PAD_CTRL) | ||
358 | #define MX51_PAD_NANDF_D9__SD3_DATA1 IOMUX_PAD(0x554, 0x16c, 5, 0x940, 1, NO_PAD_CTRL) | ||
359 | #define MX51_PAD_NANDF_D8__FEC_TDATA0 IOMUX_PAD(0x558, 0x170, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
360 | #define MX51_PAD_NANDF_D8__GPIO4_0 IOMUX_PAD(0x558, 0x170, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
361 | #define MX51_PAD_NANDF_D8__NANDF_D8 IOMUX_PAD(0x558, 0x170, 0, __NA_, 0, NO_PAD_CTRL) | ||
362 | #define MX51_PAD_NANDF_D8__PATA_DATA8 IOMUX_PAD(0x558, 0x170, 1, __NA_, 0, NO_PAD_CTRL) | ||
363 | #define MX51_PAD_NANDF_D8__SD3_DATA0 IOMUX_PAD(0x558, 0x170, 5, 0x93c, 1, NO_PAD_CTRL) | ||
364 | #define MX51_PAD_NANDF_D7__GPIO4_1 IOMUX_PAD(0x55c, 0x174, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
365 | #define MX51_PAD_NANDF_D7__NANDF_D7 IOMUX_PAD(0x55c, 0x174, 0, __NA_, 0, NO_PAD_CTRL) | ||
366 | #define MX51_PAD_NANDF_D7__PATA_DATA7 IOMUX_PAD(0x55c, 0x174, 1, __NA_, 0, NO_PAD_CTRL) | ||
367 | #define MX51_PAD_NANDF_D7__USBH3_DATA0 IOMUX_PAD(0x55c, 0x174, 5, 0x9fc, 0, NO_PAD_CTRL) | ||
368 | #define MX51_PAD_NANDF_D6__GPIO4_2 IOMUX_PAD(0x560, 0x178, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
369 | #define MX51_PAD_NANDF_D6__NANDF_D6 IOMUX_PAD(0x560, 0x178, 0, __NA_, 0, NO_PAD_CTRL) | ||
370 | #define MX51_PAD_NANDF_D6__PATA_DATA6 IOMUX_PAD(0x560, 0x178, 1, __NA_, 0, NO_PAD_CTRL) | ||
371 | #define MX51_PAD_NANDF_D6__SD4_LCTL IOMUX_PAD(0x560, 0x178, 2, __NA_, 0, NO_PAD_CTRL) | ||
372 | #define MX51_PAD_NANDF_D6__USBH3_DATA1 IOMUX_PAD(0x560, 0x178, 5, 0xa00, 0, NO_PAD_CTRL) | ||
373 | #define MX51_PAD_NANDF_D5__GPIO4_3 IOMUX_PAD(0x564, 0x17c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
374 | #define MX51_PAD_NANDF_D5__NANDF_D5 IOMUX_PAD(0x564, 0x17c, 0, __NA_, 0, NO_PAD_CTRL) | ||
375 | #define MX51_PAD_NANDF_D5__PATA_DATA5 IOMUX_PAD(0x564, 0x17c, 1, __NA_, 0, NO_PAD_CTRL) | ||
376 | #define MX51_PAD_NANDF_D5__SD4_WP IOMUX_PAD(0x564, 0x17c, 2, __NA_, 0, NO_PAD_CTRL) | ||
377 | #define MX51_PAD_NANDF_D5__USBH3_DATA2 IOMUX_PAD(0x564, 0x17c, 5, 0xa04, 0, NO_PAD_CTRL) | ||
378 | #define MX51_PAD_NANDF_D4__GPIO4_4 IOMUX_PAD(0x568, 0x180, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
379 | #define MX51_PAD_NANDF_D4__NANDF_D4 IOMUX_PAD(0x568, 0x180, 0, __NA_, 0, NO_PAD_CTRL) | ||
380 | #define MX51_PAD_NANDF_D4__PATA_DATA4 IOMUX_PAD(0x568, 0x180, 1, __NA_, 0, NO_PAD_CTRL) | ||
381 | #define MX51_PAD_NANDF_D4__SD4_CD IOMUX_PAD(0x568, 0x180, 2, __NA_, 0, NO_PAD_CTRL) | ||
382 | #define MX51_PAD_NANDF_D4__USBH3_DATA3 IOMUX_PAD(0x568, 0x180, 5, 0xa08, 0, NO_PAD_CTRL) | ||
383 | #define MX51_PAD_NANDF_D3__GPIO4_5 IOMUX_PAD(0x56c, 0x184, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
384 | #define MX51_PAD_NANDF_D3__NANDF_D3 IOMUX_PAD(0x56c, 0x184, 0, __NA_, 0, NO_PAD_CTRL) | ||
385 | #define MX51_PAD_NANDF_D3__PATA_DATA3 IOMUX_PAD(0x56c, 0x184, 1, __NA_, 0, NO_PAD_CTRL) | ||
386 | #define MX51_PAD_NANDF_D3__SD4_DAT4 IOMUX_PAD(0x56c, 0x184, 2, __NA_, 0, NO_PAD_CTRL) | ||
387 | #define MX51_PAD_NANDF_D3__USBH3_DATA4 IOMUX_PAD(0x56c, 0x184, 5, 0xa0c, 0, NO_PAD_CTRL) | ||
388 | #define MX51_PAD_NANDF_D2__GPIO4_6 IOMUX_PAD(0x570, 0x188, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
389 | #define MX51_PAD_NANDF_D2__NANDF_D2 IOMUX_PAD(0x570, 0x188, 0, __NA_, 0, NO_PAD_CTRL) | ||
390 | #define MX51_PAD_NANDF_D2__PATA_DATA2 IOMUX_PAD(0x570, 0x188, 1, __NA_, 0, NO_PAD_CTRL) | ||
391 | #define MX51_PAD_NANDF_D2__SD4_DAT5 IOMUX_PAD(0x570, 0x188, 2, __NA_, 0, NO_PAD_CTRL) | ||
392 | #define MX51_PAD_NANDF_D2__USBH3_DATA5 IOMUX_PAD(0x570, 0x188, 5, 0xa10, 0, NO_PAD_CTRL) | ||
393 | #define MX51_PAD_NANDF_D1__GPIO4_7 IOMUX_PAD(0x574, 0x18c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
394 | #define MX51_PAD_NANDF_D1__NANDF_D1 IOMUX_PAD(0x574, 0x18c, 0, __NA_, 0, NO_PAD_CTRL) | ||
395 | #define MX51_PAD_NANDF_D1__PATA_DATA1 IOMUX_PAD(0x574, 0x18c, 1, __NA_, 0, NO_PAD_CTRL) | ||
396 | #define MX51_PAD_NANDF_D1__SD4_DAT6 IOMUX_PAD(0x574, 0x18c, 2, __NA_, 0, NO_PAD_CTRL) | ||
397 | #define MX51_PAD_NANDF_D1__USBH3_DATA6 IOMUX_PAD(0x574, 0x18c, 5, 0xa14, 0, NO_PAD_CTRL) | ||
398 | #define MX51_PAD_NANDF_D0__GPIO4_8 IOMUX_PAD(0x578, 0x190, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
399 | #define MX51_PAD_NANDF_D0__NANDF_D0 IOMUX_PAD(0x578, 0x190, 0, __NA_, 0, NO_PAD_CTRL) | ||
400 | #define MX51_PAD_NANDF_D0__PATA_DATA0 IOMUX_PAD(0x578, 0x190, 1, __NA_, 0, NO_PAD_CTRL) | ||
401 | #define MX51_PAD_NANDF_D0__SD4_DAT7 IOMUX_PAD(0x578, 0x190, 2, __NA_, 0, NO_PAD_CTRL) | ||
402 | #define MX51_PAD_NANDF_D0__USBH3_DATA7 IOMUX_PAD(0x578, 0x190, 5, 0xa18, 0, NO_PAD_CTRL) | ||
403 | #define MX51_PAD_CSI1_D8__CSI1_D8 IOMUX_PAD(0x57c, 0x194, 0, __NA_, 0, NO_PAD_CTRL) | ||
404 | #define MX51_PAD_CSI1_D8__GPIO3_12 IOMUX_PAD(0x57c, 0x194, 3, 0x998, 1, MX51_GPIO_PAD_CTRL) | ||
405 | #define MX51_PAD_CSI1_D9__CSI1_D9 IOMUX_PAD(0x580, 0x198, 0, __NA_, 0, NO_PAD_CTRL) | ||
406 | #define MX51_PAD_CSI1_D9__GPIO3_13 IOMUX_PAD(0x580, 0x198, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
407 | #define MX51_PAD_CSI1_D10__CSI1_D10 IOMUX_PAD(0x584, 0x19c, 0, __NA_, 0, NO_PAD_CTRL) | ||
408 | #define MX51_PAD_CSI1_D11__CSI1_D11 IOMUX_PAD(0x588, 0x1a0, 0, __NA_, 0, NO_PAD_CTRL) | ||
409 | #define MX51_PAD_CSI1_D12__CSI1_D12 IOMUX_PAD(0x58c, 0x1a4, 0, __NA_, 0, NO_PAD_CTRL) | ||
410 | #define MX51_PAD_CSI1_D13__CSI1_D13 IOMUX_PAD(0x590, 0x1a8, 0, __NA_, 0, NO_PAD_CTRL) | ||
411 | #define MX51_PAD_CSI1_D14__CSI1_D14 IOMUX_PAD(0x594, 0x1ac, 0, __NA_, 0, NO_PAD_CTRL) | ||
412 | #define MX51_PAD_CSI1_D15__CSI1_D15 IOMUX_PAD(0x598, 0x1b0, 0, __NA_, 0, NO_PAD_CTRL) | ||
413 | #define MX51_PAD_CSI1_D16__CSI1_D16 IOMUX_PAD(0x59c, 0x1b4, 0, __NA_, 0, NO_PAD_CTRL) | ||
414 | #define MX51_PAD_CSI1_D17__CSI1_D17 IOMUX_PAD(0x5a0, 0x1b8, 0, __NA_, 0, NO_PAD_CTRL) | ||
415 | #define MX51_PAD_CSI1_D18__CSI1_D18 IOMUX_PAD(0x5a4, 0x1bc, 0, __NA_, 0, NO_PAD_CTRL) | ||
416 | #define MX51_PAD_CSI1_D19__CSI1_D19 IOMUX_PAD(0x5a8, 0x1c0, 0, __NA_, 0, NO_PAD_CTRL) | ||
417 | #define MX51_PAD_CSI1_VSYNC__CSI1_VSYNC IOMUX_PAD(0x5ac, 0x1c4, 0, __NA_, 0, NO_PAD_CTRL) | ||
418 | #define MX51_PAD_CSI1_VSYNC__GPIO3_14 IOMUX_PAD(0x5ac, 0x1c4, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
419 | #define MX51_PAD_CSI1_HSYNC__CSI1_HSYNC IOMUX_PAD(0x5b0, 0x1c8, 0, __NA_, 0, NO_PAD_CTRL) | ||
420 | #define MX51_PAD_CSI1_HSYNC__GPIO3_15 IOMUX_PAD(0x5b0, 0x1c8, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
421 | #define MX51_PAD_CSI1_PIXCLK__CSI1_PIXCLK IOMUX_PAD(0x5b4, __NA_, 0, 0x000, 0, NO_PAD_CTRL) | ||
422 | #define MX51_PAD_CSI1_MCLK__CSI1_MCLK IOMUX_PAD(0x5b8, __NA_, 0, 0x000, 0, NO_PAD_CTRL) | ||
423 | #define MX51_PAD_CSI2_D12__CSI2_D12 IOMUX_PAD(0x5bc, 0x1cc, 0, __NA_, 0, NO_PAD_CTRL) | ||
424 | #define MX51_PAD_CSI2_D12__GPIO4_9 IOMUX_PAD(0x5bc, 0x1cc, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
425 | #define MX51_PAD_CSI2_D13__CSI2_D13 IOMUX_PAD(0x5c0, 0x1d0, 0, __NA_, 0, NO_PAD_CTRL) | ||
426 | #define MX51_PAD_CSI2_D13__GPIO4_10 IOMUX_PAD(0x5c0, 0x1d0, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
427 | #define MX51_PAD_CSI2_D14__CSI2_D14 IOMUX_PAD(0x5c4, 0x1d4, 0, __NA_, 0, NO_PAD_CTRL) | ||
428 | #define MX51_PAD_CSI2_D15__CSI2_D15 IOMUX_PAD(0x5c8, 0x1d8, 0, __NA_, 0, NO_PAD_CTRL) | ||
429 | #define MX51_PAD_CSI2_D16__CSI2_D16 IOMUX_PAD(0x5cc, 0x1dc, 0, __NA_, 0, NO_PAD_CTRL) | ||
430 | #define MX51_PAD_CSI2_D17__CSI2_D17 IOMUX_PAD(0x5d0, 0x1e0, 0, __NA_, 0, NO_PAD_CTRL) | ||
431 | #define MX51_PAD_CSI2_D18__CSI2_D18 IOMUX_PAD(0x5d4, 0x1e4, 0, __NA_, 0, NO_PAD_CTRL) | ||
432 | #define MX51_PAD_CSI2_D18__GPIO4_11 IOMUX_PAD(0x5d4, 0x1e4, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
433 | #define MX51_PAD_CSI2_D19__CSI2_D19 IOMUX_PAD(0x5d8, 0x1e8, 0, __NA_, 0, NO_PAD_CTRL) | ||
434 | #define MX51_PAD_CSI2_D19__GPIO4_12 IOMUX_PAD(0x5d8, 0x1e8, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
435 | #define MX51_PAD_CSI2_VSYNC__CSI2_VSYNC IOMUX_PAD(0x5dc, 0x1ec, 0, __NA_, 0, NO_PAD_CTRL) | ||
436 | #define MX51_PAD_CSI2_VSYNC__GPIO4_13 IOMUX_PAD(0x5dc, 0x1ec, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
437 | #define MX51_PAD_CSI2_HSYNC__CSI2_HSYNC IOMUX_PAD(0x5e0, 0x1f0, 0, __NA_, 0, NO_PAD_CTRL) | ||
438 | #define MX51_PAD_CSI2_HSYNC__GPIO4_14 IOMUX_PAD(0x5e0, 0x1f0, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
439 | #define MX51_PAD_CSI2_PIXCLK__CSI2_PIXCLK IOMUX_PAD(0x5e4, 0x1f4, 0, __NA_, 0, NO_PAD_CTRL) | ||
440 | #define MX51_PAD_CSI2_PIXCLK__GPIO4_15 IOMUX_PAD(0x5e4, 0x1f4, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
441 | #define MX51_PAD_I2C1_CLK__GPIO4_16 IOMUX_PAD(0x5e8, 0x1f8, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
442 | #define MX51_PAD_I2C1_CLK__I2C1_CLK IOMUX_PAD(0x5e8, 0x1f8, 0x10, __NA_, 0, MX51_I2C_PAD_CTRL) | ||
443 | #define MX51_PAD_I2C1_DAT__GPIO4_17 IOMUX_PAD(0x5ec, 0x1fc, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
444 | #define MX51_PAD_I2C1_DAT__I2C1_DAT IOMUX_PAD(0x5ec, 0x1fc, 0x10, __NA_, 0, MX51_I2C_PAD_CTRL) | ||
445 | #define MX51_PAD_AUD3_BB_TXD__AUD3_TXD IOMUX_PAD(0x5f0, 0x200, 0, __NA_, 0, NO_PAD_CTRL) | ||
446 | #define MX51_PAD_AUD3_BB_TXD__GPIO4_18 IOMUX_PAD(0x5f0, 0x200, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
447 | #define MX51_PAD_AUD3_BB_RXD__AUD3_RXD IOMUX_PAD(0x5f4, 0x204, 0, __NA_, 0, NO_PAD_CTRL) | ||
448 | #define MX51_PAD_AUD3_BB_RXD__GPIO4_19 IOMUX_PAD(0x5f4, 0x204, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
449 | #define MX51_PAD_AUD3_BB_RXD__UART3_RXD IOMUX_PAD(0x5f4, 0x204, 1, 0x9f4, 2, MX51_UART_PAD_CTRL) | ||
450 | #define MX51_PAD_AUD3_BB_CK__AUD3_TXC IOMUX_PAD(0x5f8, 0x208, 0, __NA_, 0, NO_PAD_CTRL) | ||
451 | #define MX51_PAD_AUD3_BB_CK__GPIO4_20 IOMUX_PAD(0x5f8, 0x208, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
452 | #define MX51_PAD_AUD3_BB_FS__AUD3_TXFS IOMUX_PAD(0x5fc, 0x20c, 0, __NA_, 0, NO_PAD_CTRL) | ||
453 | #define MX51_PAD_AUD3_BB_FS__GPIO4_21 IOMUX_PAD(0x5fc, 0x20c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
454 | #define MX51_PAD_AUD3_BB_FS__UART3_TXD IOMUX_PAD(0x5fc, 0x20c, 1, __NA_, 0, MX51_UART_PAD_CTRL) | ||
455 | #define MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI IOMUX_PAD(0x600, 0x210, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
456 | #define MX51_PAD_CSPI1_MOSI__GPIO4_22 IOMUX_PAD(0x600, 0x210, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
457 | #define MX51_PAD_CSPI1_MOSI__I2C1_SDA IOMUX_PAD(0x600, 0x210, 0x11, 0x9b4, 1, MX51_I2C_PAD_CTRL) | ||
458 | #define MX51_PAD_CSPI1_MISO__AUD4_RXD IOMUX_PAD(0x604, 0x214, 1, 0x8c4, 1, NO_PAD_CTRL) | ||
459 | #define MX51_PAD_CSPI1_MISO__ECSPI1_MISO IOMUX_PAD(0x604, 0x214, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
460 | #define MX51_PAD_CSPI1_MISO__GPIO4_23 IOMUX_PAD(0x604, 0x214, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
461 | #define MX51_PAD_CSPI1_SS0__AUD4_TXC IOMUX_PAD(0x608, 0x218, 1, 0x8cc, 1, NO_PAD_CTRL) | ||
462 | #define MX51_PAD_CSPI1_SS0__ECSPI1_SS0 IOMUX_PAD(0x608, 0x218, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
463 | #define MX51_PAD_CSPI1_SS0__GPIO4_24 IOMUX_PAD(0x608, 0x218, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
464 | #define MX51_PAD_CSPI1_SS1__AUD4_TXD IOMUX_PAD(0x60c, 0x21c, 1, 0x8c8, 1, NO_PAD_CTRL) | ||
465 | #define MX51_PAD_CSPI1_SS1__ECSPI1_SS1 IOMUX_PAD(0x60c, 0x21c, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
466 | #define MX51_PAD_CSPI1_SS1__GPIO4_25 IOMUX_PAD(0x60c, 0x21c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
467 | #define MX51_PAD_CSPI1_RDY__AUD4_TXFS IOMUX_PAD(0x610, 0x220, 1, 0x8d0, 1, NO_PAD_CTRL) | ||
468 | #define MX51_PAD_CSPI1_RDY__ECSPI1_RDY IOMUX_PAD(0x610, 0x220, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
469 | #define MX51_PAD_CSPI1_RDY__GPIO4_26 IOMUX_PAD(0x610, 0x220, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
470 | #define MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK IOMUX_PAD(0x614, 0x224, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
471 | #define MX51_PAD_CSPI1_SCLK__GPIO4_27 IOMUX_PAD(0x614, 0x224, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
472 | #define MX51_PAD_CSPI1_SCLK__I2C1_SCL IOMUX_PAD(0x614, 0x224, 0x11, 0x9b0, 1, MX51_I2C_PAD_CTRL) | ||
473 | #define MX51_PAD_UART1_RXD__GPIO4_28 IOMUX_PAD(0x618, 0x228, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
474 | #define MX51_PAD_UART1_RXD__UART1_RXD IOMUX_PAD(0x618, 0x228, 0, 0x9e4, 0, MX51_UART_PAD_CTRL) | ||
475 | #define MX51_PAD_UART1_TXD__GPIO4_29 IOMUX_PAD(0x61c, 0x22c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
476 | #define MX51_PAD_UART1_TXD__PWM2_PWMO IOMUX_PAD(0x61c, 0x22c, 1, __NA_, 0, NO_PAD_CTRL) | ||
477 | #define MX51_PAD_UART1_TXD__UART1_TXD IOMUX_PAD(0x61c, 0x22c, 0, __NA_, 0, MX51_UART_PAD_CTRL) | ||
478 | #define MX51_PAD_UART1_RTS__GPIO4_30 IOMUX_PAD(0x620, 0x230, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
479 | #define MX51_PAD_UART1_RTS__UART1_RTS IOMUX_PAD(0x620, 0x230, 0, 0x9e0, 0, MX51_UART_PAD_CTRL) | ||
480 | #define MX51_PAD_UART1_CTS__GPIO4_31 IOMUX_PAD(0x624, 0x234, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
481 | #define MX51_PAD_UART1_CTS__UART1_CTS IOMUX_PAD(0x624, 0x234, 0, __NA_, 0, MX51_UART_PAD_CTRL) | ||
482 | #define MX51_PAD_UART2_RXD__FIRI_TXD IOMUX_PAD(0x628, 0x238, 1, __NA_, 0, NO_PAD_CTRL) | ||
483 | #define MX51_PAD_UART2_RXD__GPIO1_20 IOMUX_PAD(0x628, 0x238, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
484 | #define MX51_PAD_UART2_RXD__UART2_RXD IOMUX_PAD(0x628, 0x238, 0, 0x9ec, 2, MX51_UART_PAD_CTRL) | ||
485 | #define MX51_PAD_UART2_TXD__FIRI_RXD IOMUX_PAD(0x62c, 0x23c, 1, __NA_, 0, NO_PAD_CTRL) | ||
486 | #define MX51_PAD_UART2_TXD__GPIO1_21 IOMUX_PAD(0x62c, 0x23c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
487 | #define MX51_PAD_UART2_TXD__UART2_TXD IOMUX_PAD(0x62c, 0x23c, 0, __NA_, 0, MX51_UART_PAD_CTRL) | ||
488 | #define MX51_PAD_UART3_RXD__CSI1_D0 IOMUX_PAD(0x630, 0x240, 2, __NA_, 0, NO_PAD_CTRL) | ||
489 | #define MX51_PAD_UART3_RXD__GPIO1_22 IOMUX_PAD(0x630, 0x240, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
490 | #define MX51_PAD_UART3_RXD__UART1_DTR IOMUX_PAD(0x630, 0x240, 0, __NA_, 0, NO_PAD_CTRL) | ||
491 | #define MX51_PAD_UART3_RXD__UART3_RXD IOMUX_PAD(0x630, 0x240, 1, 0x9f4, 4, MX51_UART_PAD_CTRL) | ||
492 | #define MX51_PAD_UART3_TXD__CSI1_D1 IOMUX_PAD(0x634, 0x244, 2, __NA_, 0, NO_PAD_CTRL) | ||
493 | #define MX51_PAD_UART3_TXD__GPIO1_23 IOMUX_PAD(0x634, 0x244, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
494 | #define MX51_PAD_UART3_TXD__UART1_DSR IOMUX_PAD(0x634, 0x244, 0, __NA_, 0, MX51_UART_PAD_CTRL) | ||
495 | #define MX51_PAD_UART3_TXD__UART3_TXD IOMUX_PAD(0x634, 0x244, 1, __NA_, 0, MX51_UART_PAD_CTRL) | ||
496 | #define MX51_PAD_OWIRE_LINE__GPIO1_24 IOMUX_PAD(0x638, 0x248, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
497 | #define MX51_PAD_OWIRE_LINE__OWIRE_LINE IOMUX_PAD(0x638, 0x248, 0, __NA_, 0, NO_PAD_CTRL) | ||
498 | #define MX51_PAD_OWIRE_LINE__SPDIF_OUT IOMUX_PAD(0x638, 0x248, 6, __NA_, 0, NO_PAD_CTRL) | ||
499 | #define MX51_PAD_KEY_ROW0__KEY_ROW0 IOMUX_PAD(0x63c, 0x24c, 0, __NA_, 0, NO_PAD_CTRL) | ||
500 | #define MX51_PAD_KEY_ROW1__KEY_ROW1 IOMUX_PAD(0x640, 0x250, 0, __NA_, 0, NO_PAD_CTRL) | ||
501 | #define MX51_PAD_KEY_ROW2__KEY_ROW2 IOMUX_PAD(0x644, 0x254, 0, __NA_, 0, NO_PAD_CTRL) | ||
502 | #define MX51_PAD_KEY_ROW3__KEY_ROW3 IOMUX_PAD(0x648, 0x258, 0, __NA_, 0, NO_PAD_CTRL) | ||
503 | #define MX51_PAD_KEY_COL0__KEY_COL0 IOMUX_PAD(0x64c, 0x25c, 0, __NA_, 0, NO_PAD_CTRL) | ||
504 | #define MX51_PAD_KEY_COL0__PLL1_BYP IOMUX_PAD(0x64c, 0x25c, 7, 0x90c, 0, NO_PAD_CTRL) | ||
505 | #define MX51_PAD_KEY_COL1__KEY_COL1 IOMUX_PAD(0x650, 0x260, 0, __NA_, 0, NO_PAD_CTRL) | ||
506 | #define MX51_PAD_KEY_COL1__PLL2_BYP IOMUX_PAD(0x650, 0x260, 7, 0x910, 0, NO_PAD_CTRL) | ||
507 | #define MX51_PAD_KEY_COL2__KEY_COL2 IOMUX_PAD(0x654, 0x264, 0, __NA_, 0, NO_PAD_CTRL) | ||
508 | #define MX51_PAD_KEY_COL2__PLL3_BYP IOMUX_PAD(0x654, 0x264, 7, __NA_, 0, NO_PAD_CTRL) | ||
509 | #define MX51_PAD_KEY_COL3__KEY_COL3 IOMUX_PAD(0x658, 0x268, 0, __NA_, 0, NO_PAD_CTRL) | ||
510 | #define MX51_PAD_KEY_COL4__I2C2_SCL IOMUX_PAD(0x65c, 0x26c, 0x13, 0x9b8, 1, MX51_I2C_PAD_CTRL) | ||
511 | #define MX51_PAD_KEY_COL4__KEY_COL4 IOMUX_PAD(0x65c, 0x26c, 0, __NA_, 0, NO_PAD_CTRL) | ||
512 | #define MX51_PAD_KEY_COL4__SPDIF_OUT1 IOMUX_PAD(0x65c, 0x26c, 6, __NA_, 0, NO_PAD_CTRL) | ||
513 | #define MX51_PAD_KEY_COL4__UART1_RI IOMUX_PAD(0x65c, 0x26c, 1, __NA_, 0, MX51_UART_PAD_CTRL) | ||
514 | #define MX51_PAD_KEY_COL4__UART3_RTS IOMUX_PAD(0x65c, 0x26c, 2, 0x9f0, 4, MX51_UART_PAD_CTRL) | ||
515 | #define MX51_PAD_KEY_COL5__I2C2_SDA IOMUX_PAD(0x660, 0x270, 0x13, 0x9bc, 1, MX51_I2C_PAD_CTRL) | ||
516 | #define MX51_PAD_KEY_COL5__KEY_COL5 IOMUX_PAD(0x660, 0x270, 0, __NA_, 0, NO_PAD_CTRL) | ||
517 | #define MX51_PAD_KEY_COL5__UART1_DCD IOMUX_PAD(0x660, 0x270, 1, __NA_, 0, MX51_UART_PAD_CTRL) | ||
518 | #define MX51_PAD_KEY_COL5__UART3_CTS IOMUX_PAD(0x660, 0x270, 2, __NA_, 0, MX51_UART_PAD_CTRL) | ||
519 | #define MX51_PAD_USBH1_CLK__CSPI_SCLK IOMUX_PAD(0x678, 0x278, 1, 0x914, 1, MX51_ECSPI_PAD_CTRL) | ||
520 | #define MX51_PAD_USBH1_CLK__GPIO1_25 IOMUX_PAD(0x678, 0x278, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
521 | #define MX51_PAD_USBH1_CLK__I2C2_SCL IOMUX_PAD(0x678, 0x278, 0x15, 0x9b8, 2, MX51_I2C_PAD_CTRL) | ||
522 | #define MX51_PAD_USBH1_CLK__USBH1_CLK IOMUX_PAD(0x678, 0x278, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
523 | #define MX51_PAD_USBH1_DIR__CSPI_MOSI IOMUX_PAD(0x67c, 0x27c, 1, 0x91c, 1, MX51_ECSPI_PAD_CTRL) | ||
524 | #define MX51_PAD_USBH1_DIR__GPIO1_26 IOMUX_PAD(0x67c, 0x27c, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
525 | #define MX51_PAD_USBH1_DIR__I2C2_SDA IOMUX_PAD(0x67c, 0x27c, 0x15, 0x9bc, 2, MX51_I2C_PAD_CTRL) | ||
526 | #define MX51_PAD_USBH1_DIR__USBH1_DIR IOMUX_PAD(0x67c, 0x27c, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
527 | #define MX51_PAD_USBH1_STP__CSPI_RDY IOMUX_PAD(0x680, 0x280, 1, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
528 | #define MX51_PAD_USBH1_STP__GPIO1_27 IOMUX_PAD(0x680, 0x280, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
529 | #define MX51_PAD_USBH1_STP__UART3_RXD IOMUX_PAD(0x680, 0x280, 5, 0x9f4, 6, MX51_UART_PAD_CTRL) | ||
530 | #define MX51_PAD_USBH1_STP__USBH1_STP IOMUX_PAD(0x680, 0x280, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
531 | #define MX51_PAD_USBH1_NXT__CSPI_MISO IOMUX_PAD(0x684, 0x284, 1, 0x918, 0, MX51_ECSPI_PAD_CTRL) | ||
532 | #define MX51_PAD_USBH1_NXT__GPIO1_28 IOMUX_PAD(0x684, 0x284, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
533 | #define MX51_PAD_USBH1_NXT__UART3_TXD IOMUX_PAD(0x684, 0x284, 5, __NA_, 0, MX51_UART_PAD_CTRL) | ||
534 | #define MX51_PAD_USBH1_NXT__USBH1_NXT IOMUX_PAD(0x684, 0x284, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
535 | #define MX51_PAD_USBH1_DATA0__GPIO1_11 IOMUX_PAD(0x688, 0x288, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
536 | #define MX51_PAD_USBH1_DATA0__UART2_CTS IOMUX_PAD(0x688, 0x288, 1, __NA_, 0, MX51_UART_PAD_CTRL) | ||
537 | #define MX51_PAD_USBH1_DATA0__USBH1_DATA0 IOMUX_PAD(0x688, 0x288, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
538 | #define MX51_PAD_USBH1_DATA1__GPIO1_12 IOMUX_PAD(0x68c, 0x28c, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
539 | #define MX51_PAD_USBH1_DATA1__UART2_RXD IOMUX_PAD(0x68c, 0x28c, 1, 0x9ec, 4, MX51_UART_PAD_CTRL) | ||
540 | #define MX51_PAD_USBH1_DATA1__USBH1_DATA1 IOMUX_PAD(0x68c, 0x28c, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
541 | #define MX51_PAD_USBH1_DATA2__GPIO1_13 IOMUX_PAD(0x690, 0x290, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
542 | #define MX51_PAD_USBH1_DATA2__UART2_TXD IOMUX_PAD(0x690, 0x290, 1, __NA_, 0, MX51_UART_PAD_CTRL) | ||
543 | #define MX51_PAD_USBH1_DATA2__USBH1_DATA2 IOMUX_PAD(0x690, 0x290, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
544 | #define MX51_PAD_USBH1_DATA3__GPIO1_14 IOMUX_PAD(0x694, 0x294, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
545 | #define MX51_PAD_USBH1_DATA3__UART2_RTS IOMUX_PAD(0x694, 0x294, 1, 0x9e8, 5, MX51_UART_PAD_CTRL) | ||
546 | #define MX51_PAD_USBH1_DATA3__USBH1_DATA3 IOMUX_PAD(0x694, 0x294, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
547 | #define MX51_PAD_USBH1_DATA4__CSPI_SS0 IOMUX_PAD(0x698, 0x298, 1, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
548 | #define MX51_PAD_USBH1_DATA4__GPIO1_15 IOMUX_PAD(0x698, 0x298, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
549 | #define MX51_PAD_USBH1_DATA4__USBH1_DATA4 IOMUX_PAD(0x698, 0x298, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
550 | #define MX51_PAD_USBH1_DATA5__CSPI_SS1 IOMUX_PAD(0x69c, 0x29c, 1, 0x920, 0, MX51_ECSPI_PAD_CTRL) | ||
551 | #define MX51_PAD_USBH1_DATA5__GPIO1_16 IOMUX_PAD(0x69c, 0x29c, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
552 | #define MX51_PAD_USBH1_DATA5__USBH1_DATA5 IOMUX_PAD(0x69c, 0x29c, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
553 | #define MX51_PAD_USBH1_DATA6__CSPI_SS3 IOMUX_PAD(0x6a0, 0x2a0, 1, 0x928, 1, MX51_ECSPI_PAD_CTRL) | ||
554 | #define MX51_PAD_USBH1_DATA6__GPIO1_17 IOMUX_PAD(0x6a0, 0x2a0, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
555 | #define MX51_PAD_USBH1_DATA6__USBH1_DATA6 IOMUX_PAD(0x6a0, 0x2a0, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
556 | #define MX51_PAD_USBH1_DATA7__ECSPI1_SS3 IOMUX_PAD(0x6a4, 0x2a4, 1, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
557 | #define MX51_PAD_USBH1_DATA7__ECSPI2_SS3 IOMUX_PAD(0x6a4, 0x2a4, 5, 0x934, 1, MX51_ECSPI_PAD_CTRL) | ||
558 | #define MX51_PAD_USBH1_DATA7__GPIO1_18 IOMUX_PAD(0x6a4, 0x2a4, 2, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
559 | #define MX51_PAD_USBH1_DATA7__USBH1_DATA7 IOMUX_PAD(0x6a4, 0x2a4, 0, __NA_, 0, MX51_USBH1_PAD_CTRL) | ||
560 | #define MX51_PAD_DI1_PIN11__DI1_PIN11 IOMUX_PAD(0x6a8, 0x2a8, 0, __NA_, 0, NO_PAD_CTRL) | ||
561 | #define MX51_PAD_DI1_PIN11__ECSPI1_SS2 IOMUX_PAD(0x6a8, 0x2a8, 7, __NA_, 0, MX51_ECSPI_PAD_CTRL) | ||
562 | #define MX51_PAD_DI1_PIN11__GPIO3_0 IOMUX_PAD(0x6a8, 0x2a8, 4, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
563 | #define MX51_PAD_DI1_PIN12__DI1_PIN12 IOMUX_PAD(0x6ac, 0x2ac, 0, __NA_, 0, NO_PAD_CTRL) | ||
564 | #define MX51_PAD_DI1_PIN12__GPIO3_1 IOMUX_PAD(0x6ac, 0x2ac, 4, 0x978, 1, MX51_GPIO_PAD_CTRL) | ||
565 | #define MX51_PAD_DI1_PIN13__DI1_PIN13 IOMUX_PAD(0x6b0, 0x2b0, 0, __NA_, 0, NO_PAD_CTRL) | ||
566 | #define MX51_PAD_DI1_PIN13__GPIO3_2 IOMUX_PAD(0x6b0, 0x2b0, 4, 0x97c, 1, MX51_GPIO_PAD_CTRL) | ||
567 | #define MX51_PAD_DI1_D0_CS__DI1_D0_CS IOMUX_PAD(0x6b4, 0x2b4, 0, __NA_, 0, NO_PAD_CTRL) | ||
568 | #define MX51_PAD_DI1_D0_CS__GPIO3_3 IOMUX_PAD(0x6b4, 0x2b4, 4, 0x980, 1, MX51_GPIO_PAD_CTRL) | ||
569 | #define MX51_PAD_DI1_D1_CS__DI1_D1_CS IOMUX_PAD(0x6b8, 0x2b8, 0, __NA_, 0, NO_PAD_CTRL) | ||
570 | #define MX51_PAD_DI1_D1_CS__DISP1_PIN14 IOMUX_PAD(0x6b8, 0x2b8, 2, __NA_, 0, NO_PAD_CTRL) | ||
571 | #define MX51_PAD_DI1_D1_CS__DISP1_PIN5 IOMUX_PAD(0x6b8, 0x2b8, 3, __NA_, 0, NO_PAD_CTRL) | ||
572 | #define MX51_PAD_DI1_D1_CS__GPIO3_4 IOMUX_PAD(0x6b8, 0x2b8, 4, 0x984, 1, MX51_GPIO_PAD_CTRL) | ||
573 | #define MX51_PAD_DISPB2_SER_DIN__DISP1_PIN1 IOMUX_PAD(0x6bc, 0x2bc, 2, 0x9a4, 1, NO_PAD_CTRL) | ||
574 | #define MX51_PAD_DISPB2_SER_DIN__DISPB2_SER_DIN IOMUX_PAD(0x6bc, 0x2bc, 0, 0x9c4, 0, NO_PAD_CTRL) | ||
575 | #define MX51_PAD_DISPB2_SER_DIN__GPIO3_5 IOMUX_PAD(0x6bc, 0x2bc, 4, 0x988, 1, MX51_GPIO_PAD_CTRL) | ||
576 | #define MX51_PAD_DISPB2_SER_DIO__DISP1_PIN6 IOMUX_PAD(0x6c0, 0x2c0, 3, __NA_, 0, NO_PAD_CTRL) | ||
577 | #define MX51_PAD_DISPB2_SER_DIO__DISPB2_SER_DIO IOMUX_PAD(0x6c0, 0x2c0, 0, 0x9c4, 1, NO_PAD_CTRL) | ||
578 | #define MX51_PAD_DISPB2_SER_DIO__GPIO3_6 IOMUX_PAD(0x6c0, 0x2c0, 4, 0x98c, 1, MX51_GPIO_PAD_CTRL) | ||
579 | #define MX51_PAD_DISPB2_SER_CLK__DISP1_PIN17 IOMUX_PAD(0x6c4, 0x2c4, 2, __NA_, 0, NO_PAD_CTRL) | ||
580 | #define MX51_PAD_DISPB2_SER_CLK__DISP1_PIN7 IOMUX_PAD(0x6c4, 0x2c4, 3, __NA_, 0, NO_PAD_CTRL) | ||
581 | #define MX51_PAD_DISPB2_SER_CLK__DISPB2_SER_CLK IOMUX_PAD(0x6c4, 0x2c4, 0, __NA_, 0, NO_PAD_CTRL) | ||
582 | #define MX51_PAD_DISPB2_SER_CLK__GPIO3_7 IOMUX_PAD(0x6c4, 0x2c4, 4, 0x990, 1, MX51_GPIO_PAD_CTRL) | ||
583 | #define MX51_PAD_DISPB2_SER_RS__DISP1_EXT_CLK IOMUX_PAD(0x6c8, 0x2c8, 2, __NA_, 0, NO_PAD_CTRL) | ||
584 | #define MX51_PAD_DISPB2_SER_RS__DISP1_PIN16 IOMUX_PAD(0x6c8, 0x2c8, 2, __NA_, 0, NO_PAD_CTRL) | ||
585 | #define MX51_PAD_DISPB2_SER_RS__DISP1_PIN8 IOMUX_PAD(0x6c8, 0x2c8, 3, __NA_, 0, NO_PAD_CTRL) | ||
586 | #define MX51_PAD_DISPB2_SER_RS__DISPB2_SER_RS IOMUX_PAD(0x6c8, 0x2c8, 0, __NA_, 0, NO_PAD_CTRL) | ||
587 | #define MX51_PAD_DISPB2_SER_RS__DISPB2_SER_RS IOMUX_PAD(0x6c8, 0x2c8, 0, __NA_, 0, NO_PAD_CTRL) | ||
588 | #define MX51_PAD_DISPB2_SER_RS__GPIO3_8 IOMUX_PAD(0x6c8, 0x2c8, 4, 0x994, 1, MX51_GPIO_PAD_CTRL) | ||
589 | #define MX51_PAD_DISP1_DAT0__DISP1_DAT0 IOMUX_PAD(0x6cc, 0x2cc, 0, __NA_, 0, NO_PAD_CTRL) | ||
590 | #define MX51_PAD_DISP1_DAT1__DISP1_DAT1 IOMUX_PAD(0x6d0, 0x2d0, 0, __NA_, 0, NO_PAD_CTRL) | ||
591 | #define MX51_PAD_DISP1_DAT2__DISP1_DAT2 IOMUX_PAD(0x6d4, 0x2d4, 0, __NA_, 0, NO_PAD_CTRL) | ||
592 | #define MX51_PAD_DISP1_DAT3__DISP1_DAT3 IOMUX_PAD(0x6d8, 0x2d8, 0, __NA_, 0, NO_PAD_CTRL) | ||
593 | #define MX51_PAD_DISP1_DAT4__DISP1_DAT4 IOMUX_PAD(0x6dc, 0x2dc, 0, __NA_, 0, NO_PAD_CTRL) | ||
594 | #define MX51_PAD_DISP1_DAT5__DISP1_DAT5 IOMUX_PAD(0x6e0, 0x2e0, 0, __NA_, 0, NO_PAD_CTRL) | ||
595 | #define MX51_PAD_DISP1_DAT6__BOOT_USB_SRC IOMUX_PAD(0x6e4, 0x2e4, 7, __NA_, 0, NO_PAD_CTRL) | ||
596 | #define MX51_PAD_DISP1_DAT6__DISP1_DAT6 IOMUX_PAD(0x6e4, 0x2e4, 0, __NA_, 0, NO_PAD_CTRL) | ||
597 | #define MX51_PAD_DISP1_DAT7__BOOT_EEPROM_CFG IOMUX_PAD(0x6e8, 0x2e8, 7, __NA_, 0, NO_PAD_CTRL) | ||
598 | #define MX51_PAD_DISP1_DAT7__DISP1_DAT7 IOMUX_PAD(0x6e8, 0x2e8, 0, __NA_, 0, NO_PAD_CTRL) | ||
599 | #define MX51_PAD_DISP1_DAT8__BOOT_SRC0 IOMUX_PAD(0x6ec, 0x2ec, 7, __NA_, 0, NO_PAD_CTRL) | ||
600 | #define MX51_PAD_DISP1_DAT8__DISP1_DAT8 IOMUX_PAD(0x6ec, 0x2ec, 0, __NA_, 0, NO_PAD_CTRL) | ||
601 | #define MX51_PAD_DISP1_DAT9__BOOT_SRC1 IOMUX_PAD(0x6f0, 0x2f0, 7, __NA_, 0, NO_PAD_CTRL) | ||
602 | #define MX51_PAD_DISP1_DAT9__DISP1_DAT9 IOMUX_PAD(0x6f0, 0x2f0, 0, __NA_, 0, NO_PAD_CTRL) | ||
603 | #define MX51_PAD_DISP1_DAT10__BOOT_SPARE_SIZE IOMUX_PAD(0x6f4, 0x2f4, 7, __NA_, 0, NO_PAD_CTRL) | ||
604 | #define MX51_PAD_DISP1_DAT10__DISP1_DAT10 IOMUX_PAD(0x6f4, 0x2f4, 0, __NA_, 0, NO_PAD_CTRL) | ||
605 | #define MX51_PAD_DISP1_DAT11__BOOT_LPB_FREQ2 IOMUX_PAD(0x6f8, 0x2f8, 7, __NA_, 0, NO_PAD_CTRL) | ||
606 | #define MX51_PAD_DISP1_DAT11__DISP1_DAT11 IOMUX_PAD(0x6f8, 0x2f8, 0, __NA_, 0, NO_PAD_CTRL) | ||
607 | #define MX51_PAD_DISP1_DAT12__BOOT_MLC_SEL IOMUX_PAD(0x6fc, 0x2fc, 7, __NA_, 0, NO_PAD_CTRL) | ||
608 | #define MX51_PAD_DISP1_DAT12__DISP1_DAT12 IOMUX_PAD(0x6fc, 0x2fc, 0, __NA_, 0, NO_PAD_CTRL) | ||
609 | #define MX51_PAD_DISP1_DAT13__BOOT_MEM_CTL0 IOMUX_PAD(0x700, 0x300, 7, __NA_, 0, NO_PAD_CTRL) | ||
610 | #define MX51_PAD_DISP1_DAT13__DISP1_DAT13 IOMUX_PAD(0x700, 0x300, 0, __NA_, 0, NO_PAD_CTRL) | ||
611 | #define MX51_PAD_DISP1_DAT14__BOOT_MEM_CTL1 IOMUX_PAD(0x704, 0x304, 7, __NA_, 0, NO_PAD_CTRL) | ||
612 | #define MX51_PAD_DISP1_DAT14__DISP1_DAT14 IOMUX_PAD(0x704, 0x304, 0, __NA_, 0, NO_PAD_CTRL) | ||
613 | #define MX51_PAD_DISP1_DAT15__BOOT_BUS_WIDTH IOMUX_PAD(0x708, 0x308, 7, __NA_, 0, NO_PAD_CTRL) | ||
614 | #define MX51_PAD_DISP1_DAT15__DISP1_DAT15 IOMUX_PAD(0x708, 0x308, 0, __NA_, 0, NO_PAD_CTRL) | ||
615 | #define MX51_PAD_DISP1_DAT16__BOOT_PAGE_SIZE0 IOMUX_PAD(0x70c, 0x30c, 7, __NA_, 0, NO_PAD_CTRL) | ||
616 | #define MX51_PAD_DISP1_DAT16__DISP1_DAT16 IOMUX_PAD(0x70c, 0x30c, 0, __NA_, 0, NO_PAD_CTRL) | ||
617 | #define MX51_PAD_DISP1_DAT17__BOOT_PAGE_SIZE1 IOMUX_PAD(0x710, 0x310, 7, __NA_, 0, NO_PAD_CTRL) | ||
618 | #define MX51_PAD_DISP1_DAT17__DISP1_DAT17 IOMUX_PAD(0x710, 0x310, 0, __NA_, 0, NO_PAD_CTRL) | ||
619 | #define MX51_PAD_DISP1_DAT18__BOOT_WEIM_MUXED0 IOMUX_PAD(0x714, 0x314, 7, __NA_, 0, NO_PAD_CTRL) | ||
620 | #define MX51_PAD_DISP1_DAT18__DISP1_DAT18 IOMUX_PAD(0x714, 0x314, 0, __NA_, 0, NO_PAD_CTRL) | ||
621 | #define MX51_PAD_DISP1_DAT18__DISP2_PIN11 IOMUX_PAD(0x714, 0x314, 5, __NA_, 0, NO_PAD_CTRL) | ||
622 | #define MX51_PAD_DISP1_DAT18__DISP2_PIN5 IOMUX_PAD(0x714, 0x314, 4, __NA_, 0, NO_PAD_CTRL) | ||
623 | #define MX51_PAD_DISP1_DAT19__BOOT_WEIM_MUXED1 IOMUX_PAD(0x718, 0x318, 7, __NA_, 0, NO_PAD_CTRL) | ||
624 | #define MX51_PAD_DISP1_DAT19__DISP1_DAT19 IOMUX_PAD(0x718, 0x318, 0, __NA_, 0, NO_PAD_CTRL) | ||
625 | #define MX51_PAD_DISP1_DAT19__DISP2_PIN12 IOMUX_PAD(0x718, 0x318, 5, __NA_, 0, NO_PAD_CTRL) | ||
626 | #define MX51_PAD_DISP1_DAT19__DISP2_PIN6 IOMUX_PAD(0x718, 0x318, 4, __NA_, 0, NO_PAD_CTRL) | ||
627 | #define MX51_PAD_DISP1_DAT20__BOOT_MEM_TYPE0 IOMUX_PAD(0x71c, 0x31c, 7, __NA_, 0, NO_PAD_CTRL) | ||
628 | #define MX51_PAD_DISP1_DAT20__DISP1_DAT20 IOMUX_PAD(0x71c, 0x31c, 0, __NA_, 0, NO_PAD_CTRL) | ||
629 | #define MX51_PAD_DISP1_DAT20__DISP2_PIN13 IOMUX_PAD(0x71c, 0x31c, 5, __NA_, 0, NO_PAD_CTRL) | ||
630 | #define MX51_PAD_DISP1_DAT20__DISP2_PIN7 IOMUX_PAD(0x71c, 0x31c, 4, __NA_, 0, NO_PAD_CTRL) | ||
631 | #define MX51_PAD_DISP1_DAT21__BOOT_MEM_TYPE1 IOMUX_PAD(0x720, 0x320, 7, __NA_, 0, NO_PAD_CTRL) | ||
632 | #define MX51_PAD_DISP1_DAT21__DISP1_DAT21 IOMUX_PAD(0x720, 0x320, 0, __NA_, 0, NO_PAD_CTRL) | ||
633 | #define MX51_PAD_DISP1_DAT21__DISP2_PIN14 IOMUX_PAD(0x720, 0x320, 5, __NA_, 0, NO_PAD_CTRL) | ||
634 | #define MX51_PAD_DISP1_DAT21__DISP2_PIN8 IOMUX_PAD(0x720, 0x320, 4, __NA_, 0, NO_PAD_CTRL) | ||
635 | #define MX51_PAD_DISP1_DAT22__BOOT_LPB_FREQ0 IOMUX_PAD(0x724, 0x324, 7, __NA_, 0, NO_PAD_CTRL) | ||
636 | #define MX51_PAD_DISP1_DAT22__DISP1_DAT22 IOMUX_PAD(0x724, 0x324, 0, __NA_, 0, NO_PAD_CTRL) | ||
637 | #define MX51_PAD_DISP1_DAT22__DISP2_D0_CS IOMUX_PAD(0x724, 0x324, 6, __NA_, 0, NO_PAD_CTRL) | ||
638 | #define MX51_PAD_DISP1_DAT22__DISP2_DAT16 IOMUX_PAD(0x724, 0x324, 5, __NA_, 0, NO_PAD_CTRL) | ||
639 | #define MX51_PAD_DISP1_DAT23__BOOT_LPB_FREQ1 IOMUX_PAD(0x728, 0x328, 7, __NA_, 0, NO_PAD_CTRL) | ||
640 | #define MX51_PAD_DISP1_DAT23__DISP1_DAT23 IOMUX_PAD(0x728, 0x328, 0, __NA_, 0, NO_PAD_CTRL) | ||
641 | #define MX51_PAD_DISP1_DAT23__DISP2_D1_CS IOMUX_PAD(0x728, 0x328, 6, __NA_, 0, NO_PAD_CTRL) | ||
642 | #define MX51_PAD_DISP1_DAT23__DISP2_DAT17 IOMUX_PAD(0x728, 0x328, 5, __NA_, 0, NO_PAD_CTRL) | ||
643 | #define MX51_PAD_DISP1_DAT23__DISP2_SER_CS IOMUX_PAD(0x728, 0x328, 4, __NA_, 0, NO_PAD_CTRL) | ||
644 | #define MX51_PAD_DI1_PIN3__DI1_PIN3 IOMUX_PAD(0x72c, 0x32c, 0, __NA_, 0, NO_PAD_CTRL) | ||
645 | #define MX51_PAD_DI1_DISP_CLK__DI1_DISP_CLK IOMUX_PAD(0x730, __NA_, 0, __NA_, 0, NO_PAD_CTRL) | ||
646 | #define MX51_PAD_DI1_PIN2__DI1_PIN2 IOMUX_PAD(0x734, 0x330, 0, __NA_, 0, NO_PAD_CTRL) | ||
647 | #define MX51_PAD_DI1_PIN15__DI1_PIN15 IOMUX_PAD(0x738, __NA_, 0, __NA_, 0, NO_PAD_CTRL) | ||
648 | #define MX51_PAD_DI_GP2__DISP1_SER_CLK IOMUX_PAD(0x740, 0x338, 0, __NA_, 0, NO_PAD_CTRL) | ||
649 | #define MX51_PAD_DI_GP2__DISP2_WAIT IOMUX_PAD(0x740, 0x338, 2, 0x9a8, 1, NO_PAD_CTRL) | ||
650 | #define MX51_PAD_DI_GP3__CSI1_DATA_EN IOMUX_PAD(0x744, 0x33c, 3, 0x9a0, 1, NO_PAD_CTRL) | ||
651 | #define MX51_PAD_DI_GP3__DISP1_SER_DIO IOMUX_PAD(0x744, 0x33c, 0, 0x9c0, 0, NO_PAD_CTRL) | ||
652 | #define MX51_PAD_DI_GP3__FEC_TX_ER IOMUX_PAD(0x744, 0x33c, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
653 | #define MX51_PAD_DI2_PIN4__CSI2_DATA_EN IOMUX_PAD(0x748, 0x340, 3, 0x99c, 1, NO_PAD_CTRL) | ||
654 | #define MX51_PAD_DI2_PIN4__DI2_PIN4 IOMUX_PAD(0x748, 0x340, 0, __NA_, 0, NO_PAD_CTRL) | ||
655 | #define MX51_PAD_DI2_PIN4__FEC_CRS IOMUX_PAD(0x748, 0x340, 2, 0x950, 1, NO_PAD_CTRL) | ||
656 | #define MX51_PAD_DI2_PIN2__DI2_PIN2 IOMUX_PAD(0x74c, 0x344, 0, __NA_, 0, NO_PAD_CTRL) | ||
657 | #define MX51_PAD_DI2_PIN2__FEC_MDC IOMUX_PAD(0x74c, 0x344, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
658 | #define MX51_PAD_DI2_PIN3__DI2_PIN3 IOMUX_PAD(0x750, 0x348, 0, __NA_, 0, NO_PAD_CTRL) | ||
659 | #define MX51_PAD_DI2_PIN3__FEC_MDIO IOMUX_PAD(0x750, 0x348, 2, 0x954, 1, NO_PAD_CTRL) | ||
660 | #define MX51_PAD_DI2_DISP_CLK__DI2_DISP_CLK IOMUX_PAD(0x754, 0x34c, 0, __NA_, 0, NO_PAD_CTRL) | ||
661 | #define MX51_PAD_DI2_DISP_CLK__FEC_RDATA1 IOMUX_PAD(0x754, 0x34c, 2, 0x95c, 1, NO_PAD_CTRL) | ||
662 | #define MX51_PAD_DI_GP4__DI2_PIN15 IOMUX_PAD(0x758, 0x350, 4, __NA_, 0, NO_PAD_CTRL) | ||
663 | #define MX51_PAD_DI_GP4__DISP1_SER_DIN IOMUX_PAD(0x758, 0x350, 0, 0x9c0, 1, NO_PAD_CTRL) | ||
664 | #define MX51_PAD_DI_GP4__DISP2_PIN1 IOMUX_PAD(0x758, 0x350, 3, __NA_, 0, NO_PAD_CTRL) | ||
665 | #define MX51_PAD_DI_GP4__FEC_RDATA2 IOMUX_PAD(0x758, 0x350, 2, 0x960, 1, NO_PAD_CTRL) | ||
666 | #define MX51_PAD_DISP2_DAT0__DISP2_DAT0 IOMUX_PAD(0x75c, 0x354, 0, __NA_, 0, NO_PAD_CTRL) | ||
667 | #define MX51_PAD_DISP2_DAT0__FEC_RDATA3 IOMUX_PAD(0x75c, 0x354, 2, 0x964, 1, NO_PAD_CTRL) | ||
668 | #define MX51_PAD_DISP2_DAT0__KEY_COL6 IOMUX_PAD(0x75c, 0x354, 4, 0x9c8, 1, NO_PAD_CTRL) | ||
669 | #define MX51_PAD_DISP2_DAT0__UART3_RXD IOMUX_PAD(0x75c, 0x354, 5, 0x9f4, 8, MX51_UART_PAD_CTRL) | ||
670 | #define MX51_PAD_DISP2_DAT0__USBH3_CLK IOMUX_PAD(0x75c, 0x354, 3, 0x9f8, 1, MX51_UART_PAD_CTRL) | ||
671 | #define MX51_PAD_DISP2_DAT1__DISP2_DAT1 IOMUX_PAD(0x760, 0x358, 0, __NA_, 0, NO_PAD_CTRL) | ||
672 | #define MX51_PAD_DISP2_DAT1__FEC_RX_ER IOMUX_PAD(0x760, 0x358, 2, 0x970, 1, NO_PAD_CTRL) | ||
673 | #define MX51_PAD_DISP2_DAT1__KEY_COL7 IOMUX_PAD(0x760, 0x358, 4, 0x9cc, 1, NO_PAD_CTRL) | ||
674 | #define MX51_PAD_DISP2_DAT1__UART3_TXD IOMUX_PAD(0x760, 0x358, 5, __NA_, 0, MX51_UART_PAD_CTRL) | ||
675 | #define MX51_PAD_DISP2_DAT1__USBH3_DIR IOMUX_PAD(0x760, 0x358, 3, 0xa1c, 1, NO_PAD_CTRL) | ||
676 | #define MX51_PAD_DISP2_DAT2__DISP2_DAT2 IOMUX_PAD(0x764, 0x35c, 0, __NA_, 0, NO_PAD_CTRL) | ||
677 | #define MX51_PAD_DISP2_DAT3__DISP2_DAT3 IOMUX_PAD(0x768, 0x360, 0, __NA_, 0, NO_PAD_CTRL) | ||
678 | #define MX51_PAD_DISP2_DAT4__DISP2_DAT4 IOMUX_PAD(0x76c, 0x364, 0, __NA_, 0, NO_PAD_CTRL) | ||
679 | #define MX51_PAD_DISP2_DAT5__DISP2_DAT5 IOMUX_PAD(0x770, 0x368, 0, __NA_, 0, NO_PAD_CTRL) | ||
680 | #define MX51_PAD_DISP2_DAT6__DISP2_DAT6 IOMUX_PAD(0x774, 0x36c, 0, __NA_, 0, NO_PAD_CTRL) | ||
681 | #define MX51_PAD_DISP2_DAT6__FEC_TDATA1 IOMUX_PAD(0x774, 0x36c, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
682 | #define MX51_PAD_DISP2_DAT6__GPIO1_19 IOMUX_PAD(0x774, 0x36c, 5, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
683 | #define MX51_PAD_DISP2_DAT6__KEY_ROW4 IOMUX_PAD(0x774, 0x36c, 4, 0x9d0, 1, NO_PAD_CTRL) | ||
684 | #define MX51_PAD_DISP2_DAT6__USBH3_STP IOMUX_PAD(0x774, 0x36c, 3, 0xa24, 1, NO_PAD_CTRL) | ||
685 | #define MX51_PAD_DISP2_DAT7__DISP2_DAT7 IOMUX_PAD(0x778, 0x370, 0, __NA_, 0, NO_PAD_CTRL) | ||
686 | #define MX51_PAD_DISP2_DAT7__FEC_TDATA2 IOMUX_PAD(0x778, 0x370, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
687 | #define MX51_PAD_DISP2_DAT7__GPIO1_29 IOMUX_PAD(0x778, 0x370, 5, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
688 | #define MX51_PAD_DISP2_DAT7__KEY_ROW5 IOMUX_PAD(0x778, 0x370, 4, 0x9d4, 1, NO_PAD_CTRL) | ||
689 | #define MX51_PAD_DISP2_DAT7__USBH3_NXT IOMUX_PAD(0x778, 0x370, 3, 0xa20, 1, NO_PAD_CTRL) | ||
690 | #define MX51_PAD_DISP2_DAT8__DISP2_DAT8 IOMUX_PAD(0x77c, 0x374, 0, __NA_, 0, NO_PAD_CTRL) | ||
691 | #define MX51_PAD_DISP2_DAT8__FEC_TDATA3 IOMUX_PAD(0x77c, 0x374, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
692 | #define MX51_PAD_DISP2_DAT8__GPIO1_30 IOMUX_PAD(0x77c, 0x374, 5, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
693 | #define MX51_PAD_DISP2_DAT8__KEY_ROW6 IOMUX_PAD(0x77c, 0x374, 4, 0x9d8, 1, NO_PAD_CTRL) | ||
694 | #define MX51_PAD_DISP2_DAT8__USBH3_DATA0 IOMUX_PAD(0x77c, 0x374, 3, 0x9fc, 1, NO_PAD_CTRL) | ||
695 | #define MX51_PAD_DISP2_DAT9__AUD6_RXC IOMUX_PAD(0x780, 0x378, 4, 0x8f4, 1, NO_PAD_CTRL) | ||
696 | #define MX51_PAD_DISP2_DAT9__DISP2_DAT9 IOMUX_PAD(0x780, 0x378, 0, __NA_, 0, NO_PAD_CTRL) | ||
697 | #define MX51_PAD_DISP2_DAT9__FEC_TX_EN IOMUX_PAD(0x780, 0x378, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
698 | #define MX51_PAD_DISP2_DAT9__GPIO1_31 IOMUX_PAD(0x780, 0x378, 5, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
699 | #define MX51_PAD_DISP2_DAT9__USBH3_DATA1 IOMUX_PAD(0x780, 0x378, 3, 0xa00, 1, NO_PAD_CTRL) | ||
700 | #define MX51_PAD_DISP2_DAT10__DISP2_DAT10 IOMUX_PAD(0x784, 0x37c, 0, __NA_, 0, NO_PAD_CTRL) | ||
701 | #define MX51_PAD_DISP2_DAT10__DISP2_SER_CS IOMUX_PAD(0x784, 0x37c, 5, __NA_, 0, NO_PAD_CTRL) | ||
702 | #define MX51_PAD_DISP2_DAT10__FEC_COL IOMUX_PAD(0x784, 0x37c, 2, 0x94c, 1, NO_PAD_CTRL) | ||
703 | #define MX51_PAD_DISP2_DAT10__KEY_ROW7 IOMUX_PAD(0x784, 0x37c, 4, 0x9dc, 1, NO_PAD_CTRL) | ||
704 | #define MX51_PAD_DISP2_DAT10__USBH3_DATA2 IOMUX_PAD(0x784, 0x37c, 3, 0xa04, 1, NO_PAD_CTRL) | ||
705 | #define MX51_PAD_DISP2_DAT11__AUD6_TXD IOMUX_PAD(0x788, 0x380, 4, 0x8f0, 1, NO_PAD_CTRL) | ||
706 | #define MX51_PAD_DISP2_DAT11__DISP2_DAT11 IOMUX_PAD(0x788, 0x380, 0, __NA_, 0, NO_PAD_CTRL) | ||
707 | #define MX51_PAD_DISP2_DAT11__FEC_RX_CLK IOMUX_PAD(0x788, 0x380, 2, 0x968, 1, NO_PAD_CTRL) | ||
708 | #define MX51_PAD_DISP2_DAT11__GPIO1_10 IOMUX_PAD(0x788, 0x380, 7, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
709 | #define MX51_PAD_DISP2_DAT11__USBH3_DATA3 IOMUX_PAD(0x788, 0x380, 3, 0xa08, 1, NO_PAD_CTRL) | ||
710 | #define MX51_PAD_DISP2_DAT12__AUD6_RXD IOMUX_PAD(0x78c, 0x384, 4, 0x8ec, 1, NO_PAD_CTRL) | ||
711 | #define MX51_PAD_DISP2_DAT12__DISP2_DAT12 IOMUX_PAD(0x78c, 0x384, 0, __NA_, 0, NO_PAD_CTRL) | ||
712 | #define MX51_PAD_DISP2_DAT12__FEC_RX_DV IOMUX_PAD(0x78c, 0x384, 2, 0x96c, 1, NO_PAD_CTRL) | ||
713 | #define MX51_PAD_DISP2_DAT12__USBH3_DATA4 IOMUX_PAD(0x78c, 0x384, 3, 0xa0c, 1, NO_PAD_CTRL) | ||
714 | #define MX51_PAD_DISP2_DAT13__AUD6_TXC IOMUX_PAD(0x790, 0x388, 4, 0x8fc, 1, NO_PAD_CTRL) | ||
715 | #define MX51_PAD_DISP2_DAT13__DISP2_DAT13 IOMUX_PAD(0x790, 0x388, 0, __NA_, 0, NO_PAD_CTRL) | ||
716 | #define MX51_PAD_DISP2_DAT13__FEC_TX_CLK IOMUX_PAD(0x790, 0x388, 2, 0x974, 1, MX51_PAD_CTRL_4) | ||
717 | #define MX51_PAD_DISP2_DAT13__USBH3_DATA5 IOMUX_PAD(0x790, 0x388, 3, 0xa10, 1, NO_PAD_CTRL) | ||
718 | #define MX51_PAD_DISP2_DAT14__AUD6_TXFS IOMUX_PAD(0x794, 0x38c, 4, 0x900, 1, NO_PAD_CTRL) | ||
719 | #define MX51_PAD_DISP2_DAT14__DISP2_DAT14 IOMUX_PAD(0x794, 0x38c, 0, __NA_, 0, NO_PAD_CTRL) | ||
720 | #define MX51_PAD_DISP2_DAT14__FEC_RDATA0 IOMUX_PAD(0x794, 0x38c, 2, 0x958, 1, MX51_PAD_CTRL_4) | ||
721 | #define MX51_PAD_DISP2_DAT14__USBH3_DATA6 IOMUX_PAD(0x794, 0x38c, 3, 0xa14, 1, NO_PAD_CTRL) | ||
722 | #define MX51_PAD_DISP2_DAT15__AUD6_RXFS IOMUX_PAD(0x798, 0x390, 4, 0x8f8, 1, NO_PAD_CTRL) | ||
723 | #define MX51_PAD_DISP2_DAT15__DISP1_SER_CS IOMUX_PAD(0x798, 0x390, 5, __NA_, 0, NO_PAD_CTRL) | ||
724 | #define MX51_PAD_DISP2_DAT15__DISP2_DAT15 IOMUX_PAD(0x798, 0x390, 0, __NA_, 0, NO_PAD_CTRL) | ||
725 | #define MX51_PAD_DISP2_DAT15__FEC_TDATA0 IOMUX_PAD(0x798, 0x390, 2, __NA_, 0, MX51_PAD_CTRL_5) | ||
726 | #define MX51_PAD_DISP2_DAT15__USBH3_DATA7 IOMUX_PAD(0x798, 0x390, 3, 0xa18, 1, NO_PAD_CTRL) | ||
727 | #define MX51_PAD_SD1_CMD__AUD5_RXFS IOMUX_PAD(0x79c, 0x394, 1, 0x8e0, 1, NO_PAD_CTRL) | ||
728 | #define MX51_PAD_SD1_CMD__CSPI_MOSI IOMUX_PAD(0x79c, 0x394, 2, 0x91c, 2, NO_PAD_CTRL) | ||
729 | #define MX51_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x79c, 0x394, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
730 | #define MX51_PAD_SD1_CLK__AUD5_RXC IOMUX_PAD(0x7a0, 0x398, 1, 0x8dc, 1, NO_PAD_CTRL) | ||
731 | #define MX51_PAD_SD1_CLK__CSPI_SCLK IOMUX_PAD(0x7a0, 0x398, 2, 0x914, 2, NO_PAD_CTRL) | ||
732 | #define MX51_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x7a0, 0x398, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS) | ||
733 | #define MX51_PAD_SD1_DATA0__AUD5_TXD IOMUX_PAD(0x7a4, 0x39c, 1, 0x8d8, 2, NO_PAD_CTRL) | ||
734 | #define MX51_PAD_SD1_DATA0__CSPI_MISO IOMUX_PAD(0x7a4, 0x39c, 2, 0x918, 1, MX51_ECSPI_PAD_CTRL) | ||
735 | #define MX51_PAD_SD1_DATA0__SD1_DATA0 IOMUX_PAD(0x7a4, 0x39c, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
736 | #define MX51_PAD_EIM_DA0__EIM_DA0 IOMUX_PAD(__NA_, 0x01c, 0, 0x000, 0, NO_PAD_CTRL) | ||
737 | #define MX51_PAD_EIM_DA1__EIM_DA1 IOMUX_PAD(__NA_, 0x020, 0, 0x000, 0, NO_PAD_CTRL) | ||
738 | #define MX51_PAD_EIM_DA2__EIM_DA2 IOMUX_PAD(__NA_, 0x024, 0, 0x000, 0, NO_PAD_CTRL) | ||
739 | #define MX51_PAD_EIM_DA3__EIM_DA3 IOMUX_PAD(__NA_, 0x028, 0, 0x000, 0, NO_PAD_CTRL) | ||
740 | #define MX51_PAD_SD1_DATA1__AUD5_RXD IOMUX_PAD(0x7a8, 0x3a0, 1, 0x8d4, 2, NO_PAD_CTRL) | ||
741 | #define MX51_PAD_SD1_DATA1__SD1_DATA1 IOMUX_PAD(0x7a8, 0x3a0, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
742 | #define MX51_PAD_EIM_DA4__EIM_DA4 IOMUX_PAD(__NA_, 0x02c, 0, 0x000, 0, NO_PAD_CTRL) | ||
743 | #define MX51_PAD_EIM_DA5__EIM_DA5 IOMUX_PAD(__NA_, 0x030, 0, 0x000, 0, NO_PAD_CTRL) | ||
744 | #define MX51_PAD_EIM_DA6__EIM_DA6 IOMUX_PAD(__NA_, 0x034, 0, 0x000, 0, NO_PAD_CTRL) | ||
745 | #define MX51_PAD_EIM_DA7__EIM_DA7 IOMUX_PAD(__NA_, 0x038, 0, 0x000, 0, NO_PAD_CTRL) | ||
746 | #define MX51_PAD_SD1_DATA2__AUD5_TXC IOMUX_PAD(0x7ac, 0x3a4, 1, 0x8e4, 2, NO_PAD_CTRL) | ||
747 | #define MX51_PAD_SD1_DATA2__SD1_DATA2 IOMUX_PAD(0x7ac, 0x3a4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
748 | #define MX51_PAD_EIM_DA10__EIM_DA10 IOMUX_PAD(__NA_, 0x044, 0, 0x000, 0, NO_PAD_CTRL) | ||
749 | #define MX51_PAD_EIM_DA11__EIM_DA11 IOMUX_PAD(__NA_, 0x048, 0, 0x000, 0, NO_PAD_CTRL) | ||
750 | #define MX51_PAD_EIM_DA8__EIM_DA8 IOMUX_PAD(__NA_, 0x03c, 0, 0x000, 0, NO_PAD_CTRL) | ||
751 | #define MX51_PAD_EIM_DA9__EIM_DA9 IOMUX_PAD(__NA_, 0x040, 0, 0x000, 0, NO_PAD_CTRL) | ||
752 | #define MX51_PAD_SD1_DATA3__AUD5_TXFS IOMUX_PAD(0x7b0, 0x3a8, 1, 0x8e8, 2, NO_PAD_CTRL) | ||
753 | #define MX51_PAD_SD1_DATA3__CSPI_SS1 IOMUX_PAD(0x7b0, 0x3a8, 2, 0x920, 1, MX51_ECSPI_PAD_CTRL) | ||
754 | #define MX51_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x7b0, 0x3a8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
755 | #define MX51_PAD_GPIO1_0__CSPI_SS2 IOMUX_PAD(0x7b4, 0x3ac, 2, 0x924, 0, MX51_ECSPI_PAD_CTRL) | ||
756 | #define MX51_PAD_GPIO1_0__GPIO1_0 IOMUX_PAD(0x7b4, 0x3ac, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
757 | #define MX51_PAD_GPIO1_0__SD1_CD IOMUX_PAD(0x7b4, 0x3ac, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL) | ||
758 | #define MX51_PAD_GPIO1_1__CSPI_MISO IOMUX_PAD(0x7b8, 0x3b0, 2, 0x918, 2, MX51_ECSPI_PAD_CTRL) | ||
759 | #define MX51_PAD_GPIO1_1__GPIO1_1 IOMUX_PAD(0x7b8, 0x3b0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
760 | #define MX51_PAD_GPIO1_1__SD1_WP IOMUX_PAD(0x7b8, 0x3b0, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL) | ||
761 | #define MX51_PAD_EIM_DA12__EIM_DA12 IOMUX_PAD(__NA_, 0x04c, 0, 0x000, 0, NO_PAD_CTRL) | ||
762 | #define MX51_PAD_EIM_DA13__EIM_DA13 IOMUX_PAD(__NA_, 0x050, 0, 0x000, 0, NO_PAD_CTRL) | ||
763 | #define MX51_PAD_EIM_DA14__EIM_DA14 IOMUX_PAD(__NA_, 0x054, 0, 0x000, 0, NO_PAD_CTRL) | ||
764 | #define MX51_PAD_EIM_DA15__EIM_DA15 IOMUX_PAD(__NA_, 0x058, 0, 0x000, 0, NO_PAD_CTRL) | ||
765 | #define MX51_PAD_SD2_CMD__CSPI_MOSI IOMUX_PAD(0x7bc, 0x3b4, 2, 0x91c, 3, MX51_ECSPI_PAD_CTRL) | ||
766 | #define MX51_PAD_SD2_CMD__I2C1_SCL IOMUX_PAD(0x7bc, 0x3b4, 0x11, 0x9b0, 2, MX51_I2C_PAD_CTRL) | ||
767 | #define MX51_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x7bc, 0x3b4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
768 | #define MX51_PAD_SD2_CLK__CSPI_SCLK IOMUX_PAD(0x7c0, 0x3b8, 2, 0x914, 3, MX51_ECSPI_PAD_CTRL) | ||
769 | #define MX51_PAD_SD2_CLK__I2C1_SDA IOMUX_PAD(0x7c0, 0x3b8, 0x11, 0x9b4, 2, MX51_I2C_PAD_CTRL) | ||
770 | #define MX51_PAD_SD2_CLK__SD2_CLK IOMUX_PAD(0x7c0, 0x3b8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS) | ||
771 | #define MX51_PAD_SD2_DATA0__CSPI_MISO IOMUX_PAD(0x7c4, 0x3bc, 2, 0x918, 3, MX51_ECSPI_PAD_CTRL) | ||
772 | #define MX51_PAD_SD2_DATA0__SD1_DAT4 IOMUX_PAD(0x7c4, 0x3bc, 1, __NA_, 0, NO_PAD_CTRL) | ||
773 | #define MX51_PAD_SD2_DATA0__SD2_DATA0 IOMUX_PAD(0x7c4, 0x3bc, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
774 | #define MX51_PAD_SD2_DATA1__SD1_DAT5 IOMUX_PAD(0x7c8, 0x3c0, 1, __NA_, 0, NO_PAD_CTRL) | ||
775 | #define MX51_PAD_SD2_DATA1__SD2_DATA1 IOMUX_PAD(0x7c8, 0x3c0, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
776 | #define MX51_PAD_SD2_DATA1__USBH3_H2_DP IOMUX_PAD(0x7c8, 0x3c0, 0x12, __NA_, 0, NO_PAD_CTRL) | ||
777 | #define MX51_PAD_SD2_DATA2__SD1_DAT6 IOMUX_PAD(0x7cc, 0x3c4, 1, __NA_, 0, NO_PAD_CTRL) | ||
778 | #define MX51_PAD_SD2_DATA2__SD2_DATA2 IOMUX_PAD(0x7cc, 0x3c4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
779 | #define MX51_PAD_SD2_DATA2__USBH3_H2_DM IOMUX_PAD(0x7cc, 0x3c4, 0x12, __NA_, 0, NO_PAD_CTRL) | ||
780 | #define MX51_PAD_SD2_DATA3__CSPI_SS2 IOMUX_PAD(0x7d0, 0x3c8, 2, 0x924, 1, MX51_ECSPI_PAD_CTRL) | ||
781 | #define MX51_PAD_SD2_DATA3__SD1_DAT7 IOMUX_PAD(0x7d0, 0x3c8, 1, __NA_, 0, NO_PAD_CTRL) | ||
782 | #define MX51_PAD_SD2_DATA3__SD2_DATA3 IOMUX_PAD(0x7d0, 0x3c8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | ||
783 | #define MX51_PAD_GPIO1_2__CCM_OUT_2 IOMUX_PAD(0x7d4, 0x3cc, 5, __NA_, 0, NO_PAD_CTRL) | ||
784 | #define MX51_PAD_GPIO1_2__GPIO1_2 IOMUX_PAD(0x7d4, 0x3cc, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
785 | #define MX51_PAD_GPIO1_2__I2C2_SCL IOMUX_PAD(0x7d4, 0x3cc, 0x12, 0x9b8, 3, MX51_I2C_PAD_CTRL) | ||
786 | #define MX51_PAD_GPIO1_2__PLL1_BYP IOMUX_PAD(0x7d4, 0x3cc, 7, 0x90c, 1, NO_PAD_CTRL) | ||
787 | #define MX51_PAD_GPIO1_2__PWM1_PWMO IOMUX_PAD(0x7d4, 0x3cc, 1, __NA_, 0, NO_PAD_CTRL) | ||
788 | #define MX51_PAD_GPIO1_3__GPIO1_3 IOMUX_PAD(0x7d8, 0x3d0, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
789 | #define MX51_PAD_GPIO1_3__I2C2_SDA IOMUX_PAD(0x7d8, 0x3d0, 0x12, 0x9bc, 3, MX51_I2C_PAD_CTRL) | ||
790 | #define MX51_PAD_GPIO1_3__CCM_CLKO2 IOMUX_PAD(0x7d8, 0x3d0, 5, __NA_, 0, NO_PAD_CTRL) | ||
791 | #define MX51_PAD_GPIO1_3__GPT_CLKIN IOMUX_PAD(0x7d8, 0x3d0, 6, __NA_, 0, NO_PAD_CTRL) | ||
792 | #define MX51_PAD_GPIO1_3__PLL2_BYP IOMUX_PAD(0x7d8, 0x3d0, 7, 0x910, 1, NO_PAD_CTRL) | ||
793 | #define MX51_PAD_GPIO1_3__PWM2_PWMO IOMUX_PAD(0x7d8, 0x3d0, 1, __NA_, 0, NO_PAD_CTRL) | ||
794 | #define MX51_PAD_PMIC_INT_REQ__PMIC_INT_REQ IOMUX_PAD(0x7fc, 0x3d4, 0, __NA_, 0, NO_PAD_CTRL) | ||
795 | #define MX51_PAD_PMIC_INT_REQ__PMIC_PMU_IRQ_B IOMUX_PAD(0x7fc, 0x3d4, 1, __NA_, 0, NO_PAD_CTRL) | ||
796 | #define MX51_PAD_GPIO1_4__DISP2_EXT_CLK IOMUX_PAD(0x804, 0x3d8, 4, 0x908, 1, NO_PAD_CTRL) | ||
797 | #define MX51_PAD_GPIO1_4__EIM_RDY IOMUX_PAD(0x804, 0x3d8, 3, 0x938, 1, NO_PAD_CTRL) | ||
798 | #define MX51_PAD_GPIO1_4__GPIO1_4 IOMUX_PAD(0x804, 0x3d8, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
799 | #define MX51_PAD_GPIO1_4__WDOG1_WDOG_B IOMUX_PAD(0x804, 0x3d8, 2, __NA_, 0, NO_PAD_CTRL) | ||
800 | #define MX51_PAD_GPIO1_4__GPT_CAPIN1 IOMUX_PAD(0x804, 0x3d8, 6, __NA_, 0, NO_PAD_CTRL) | ||
801 | #define MX51_PAD_GPIO1_5__CSI2_MCLK IOMUX_PAD(0x808, 0x3dc, 6, __NA_, 0, NO_PAD_CTRL) | ||
802 | #define MX51_PAD_GPIO1_5__DISP2_PIN16 IOMUX_PAD(0x808, 0x3dc, 3, __NA_, 0, NO_PAD_CTRL) | ||
803 | #define MX51_PAD_GPIO1_5__GPIO1_5 IOMUX_PAD(0x808, 0x3dc, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
804 | #define MX51_PAD_GPIO1_5__WDOG2_WDOG_B IOMUX_PAD(0x808, 0x3dc, 2, __NA_, 0, NO_PAD_CTRL) | ||
805 | #define MX51_PAD_GPIO1_5__CCM_CLKO IOMUX_PAD(0x808, 0x3dc, 5, __NA_, 0, NO_PAD_CTRL) | ||
806 | #define MX51_PAD_GPIO1_6__DISP2_PIN17 IOMUX_PAD(0x80c, 0x3e0, 4, __NA_, 0, NO_PAD_CTRL) | ||
807 | #define MX51_PAD_GPIO1_6__GPIO1_6 IOMUX_PAD(0x80c, 0x3e0, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
808 | #define MX51_PAD_GPIO1_6__REF_EN_B IOMUX_PAD(0x80c, 0x3e0, 3, __NA_, 0, NO_PAD_CTRL) | ||
809 | #define MX51_PAD_GPIO1_6__GPT_CAPIN2 IOMUX_PAD(0x80c, 0x3e0, 6, __NA_, 0, NO_PAD_CTRL) | ||
810 | #define MX51_PAD_GPIO1_7__CCM_OUT_0 IOMUX_PAD(0x810, 0x3e4, 3, __NA_, 0, NO_PAD_CTRL) | ||
811 | #define MX51_PAD_GPIO1_7__GPIO1_7 IOMUX_PAD(0x810, 0x3e4, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
812 | #define MX51_PAD_GPIO1_7__SD2_WP IOMUX_PAD(0x810, 0x3e4, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL) | ||
813 | #define MX51_PAD_GPIO1_7__SPDIF_OUT1 IOMUX_PAD(0x810, 0x3e4, 2, __NA_, 0, NO_PAD_CTRL) | ||
814 | #define MX51_PAD_GPIO1_8__CSI2_DATA_EN IOMUX_PAD(0x814, 0x3e8, 2, 0x99c, 2, NO_PAD_CTRL) | ||
815 | #define MX51_PAD_GPIO1_8__GPIO1_8 IOMUX_PAD(0x814, 0x3e8, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
816 | #define MX51_PAD_GPIO1_8__SD2_CD IOMUX_PAD(0x814, 0x3e8, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL) | ||
817 | #define MX51_PAD_GPIO1_8__USBH3_PWR IOMUX_PAD(0x814, 0x3e8, 1, __NA_, 0, NO_PAD_CTRL) | ||
818 | #define MX51_PAD_GPIO1_8__CCM_CLKO2 IOMUX_PAD(0x814, 0x3e8, 4, __NA_, 0, NO_PAD_CTRL) | ||
819 | #define MX51_PAD_GPIO1_9__CCM_OUT_1 IOMUX_PAD(0x818, 0x3ec, 3, __NA_, 0, NO_PAD_CTRL) | ||
820 | #define MX51_PAD_GPIO1_9__DISP2_D1_CS IOMUX_PAD(0x818, 0x3ec, 2, __NA_, 0, NO_PAD_CTRL) | ||
821 | #define MX51_PAD_GPIO1_9__DISP2_SER_CS IOMUX_PAD(0x818, 0x3ec, 7, __NA_, 0, NO_PAD_CTRL) | ||
822 | #define MX51_PAD_GPIO1_9__GPIO1_9 IOMUX_PAD(0x818, 0x3ec, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) | ||
823 | #define MX51_PAD_GPIO1_9__SD2_LCTL IOMUX_PAD(0x818, 0x3ec, 6, __NA_, 0, NO_PAD_CTRL) | ||
824 | #define MX51_PAD_GPIO1_9__USBH3_OC IOMUX_PAD(0x818, 0x3ec, 1, __NA_, 0, NO_PAD_CTRL) | ||
825 | #define MX51_PAD_GPIO1_9__CCM_CLKO IOMUX_PAD(0x818, 0x3ec, 4, __NA_, 0, NO_PAD_CTRL) | ||
826 | |||
827 | #endif /* __MACH_IOMUX_MX51_H__ */ | ||
diff --git a/arch/arm/mach-imx/iomux-v1.c b/arch/arm/mach-imx/iomux-v1.c deleted file mode 100644 index 2b156d1d9e2..00000000000 --- a/arch/arm/mach-imx/iomux-v1.c +++ /dev/null | |||
@@ -1,189 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-mxc/iomux-v1.c | ||
3 | * | ||
4 | * Copyright (C) 2004 Sascha Hauer, Synertronixx GmbH | ||
5 | * Copyright (C) 2009 Uwe Kleine-Koenig, Pengutronix | ||
6 | * | ||
7 | * Common code for i.MX1, i.MX21 and i.MX27 | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software Foundation, Inc., | ||
21 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | ||
22 | */ | ||
23 | |||
24 | #include <linux/errno.h> | ||
25 | #include <linux/init.h> | ||
26 | #include <linux/kernel.h> | ||
27 | #include <linux/module.h> | ||
28 | #include <linux/string.h> | ||
29 | #include <linux/gpio.h> | ||
30 | |||
31 | #include <asm/mach/map.h> | ||
32 | |||
33 | #include "hardware.h" | ||
34 | #include "iomux-v1.h" | ||
35 | |||
36 | static void __iomem *imx_iomuxv1_baseaddr; | ||
37 | static unsigned imx_iomuxv1_numports; | ||
38 | |||
39 | static inline unsigned long imx_iomuxv1_readl(unsigned offset) | ||
40 | { | ||
41 | return __raw_readl(imx_iomuxv1_baseaddr + offset); | ||
42 | } | ||
43 | |||
44 | static inline void imx_iomuxv1_writel(unsigned long val, unsigned offset) | ||
45 | { | ||
46 | __raw_writel(val, imx_iomuxv1_baseaddr + offset); | ||
47 | } | ||
48 | |||
49 | static inline void imx_iomuxv1_rmwl(unsigned offset, | ||
50 | unsigned long mask, unsigned long value) | ||
51 | { | ||
52 | unsigned long reg = imx_iomuxv1_readl(offset); | ||
53 | |||
54 | reg &= ~mask; | ||
55 | reg |= value; | ||
56 | |||
57 | imx_iomuxv1_writel(reg, offset); | ||
58 | } | ||
59 | |||
60 | static inline void imx_iomuxv1_set_puen( | ||
61 | unsigned int port, unsigned int pin, int on) | ||
62 | { | ||
63 | unsigned long mask = 1 << pin; | ||
64 | |||
65 | imx_iomuxv1_rmwl(MXC_PUEN(port), mask, on ? mask : 0); | ||
66 | } | ||
67 | |||
68 | static inline void imx_iomuxv1_set_ddir( | ||
69 | unsigned int port, unsigned int pin, int out) | ||
70 | { | ||
71 | unsigned long mask = 1 << pin; | ||
72 | |||
73 | imx_iomuxv1_rmwl(MXC_DDIR(port), mask, out ? mask : 0); | ||
74 | } | ||
75 | |||
76 | static inline void imx_iomuxv1_set_gpr( | ||
77 | unsigned int port, unsigned int pin, int af) | ||
78 | { | ||
79 | unsigned long mask = 1 << pin; | ||
80 | |||
81 | imx_iomuxv1_rmwl(MXC_GPR(port), mask, af ? mask : 0); | ||
82 | } | ||
83 | |||
84 | static inline void imx_iomuxv1_set_gius( | ||
85 | unsigned int port, unsigned int pin, int inuse) | ||
86 | { | ||
87 | unsigned long mask = 1 << pin; | ||
88 | |||
89 | imx_iomuxv1_rmwl(MXC_GIUS(port), mask, inuse ? mask : 0); | ||
90 | } | ||
91 | |||
92 | static inline void imx_iomuxv1_set_ocr( | ||
93 | unsigned int port, unsigned int pin, unsigned int ocr) | ||
94 | { | ||
95 | unsigned long shift = (pin & 0xf) << 1; | ||
96 | unsigned long mask = 3 << shift; | ||
97 | unsigned long value = ocr << shift; | ||
98 | unsigned long offset = pin < 16 ? MXC_OCR1(port) : MXC_OCR2(port); | ||
99 | |||
100 | imx_iomuxv1_rmwl(offset, mask, value); | ||
101 | } | ||
102 | |||
103 | static inline void imx_iomuxv1_set_iconfa( | ||
104 | unsigned int port, unsigned int pin, unsigned int aout) | ||
105 | { | ||
106 | unsigned long shift = (pin & 0xf) << 1; | ||
107 | unsigned long mask = 3 << shift; | ||
108 | unsigned long value = aout << shift; | ||
109 | unsigned long offset = pin < 16 ? MXC_ICONFA1(port) : MXC_ICONFA2(port); | ||
110 | |||
111 | imx_iomuxv1_rmwl(offset, mask, value); | ||
112 | } | ||
113 | |||
114 | static inline void imx_iomuxv1_set_iconfb( | ||
115 | unsigned int port, unsigned int pin, unsigned int bout) | ||
116 | { | ||
117 | unsigned long shift = (pin & 0xf) << 1; | ||
118 | unsigned long mask = 3 << shift; | ||
119 | unsigned long value = bout << shift; | ||
120 | unsigned long offset = pin < 16 ? MXC_ICONFB1(port) : MXC_ICONFB2(port); | ||
121 | |||
122 | imx_iomuxv1_rmwl(offset, mask, value); | ||
123 | } | ||
124 | |||
125 | int mxc_gpio_mode(int gpio_mode) | ||
126 | { | ||
127 | unsigned int pin = gpio_mode & GPIO_PIN_MASK; | ||
128 | unsigned int port = (gpio_mode & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; | ||
129 | unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >> GPIO_OCR_SHIFT; | ||
130 | unsigned int aout = (gpio_mode >> GPIO_AOUT_SHIFT) & 3; | ||
131 | unsigned int bout = (gpio_mode >> GPIO_BOUT_SHIFT) & 3; | ||
132 | |||
133 | if (port >= imx_iomuxv1_numports) | ||
134 | return -EINVAL; | ||
135 | |||
136 | /* Pullup enable */ | ||
137 | imx_iomuxv1_set_puen(port, pin, gpio_mode & GPIO_PUEN); | ||
138 | |||
139 | /* Data direction */ | ||
140 | imx_iomuxv1_set_ddir(port, pin, gpio_mode & GPIO_OUT); | ||
141 | |||
142 | /* Primary / alternate function */ | ||
143 | imx_iomuxv1_set_gpr(port, pin, gpio_mode & GPIO_AF); | ||
144 | |||
145 | /* use as gpio? */ | ||
146 | imx_iomuxv1_set_gius(port, pin, !(gpio_mode & (GPIO_PF | GPIO_AF))); | ||
147 | |||
148 | imx_iomuxv1_set_ocr(port, pin, ocr); | ||
149 | |||
150 | imx_iomuxv1_set_iconfa(port, pin, aout); | ||
151 | |||
152 | imx_iomuxv1_set_iconfb(port, pin, bout); | ||
153 | |||
154 | return 0; | ||
155 | } | ||
156 | EXPORT_SYMBOL(mxc_gpio_mode); | ||
157 | |||
158 | static int imx_iomuxv1_setup_multiple(const int *list, unsigned count) | ||
159 | { | ||
160 | size_t i; | ||
161 | int ret = 0; | ||
162 | |||
163 | for (i = 0; i < count; ++i) { | ||
164 | ret = mxc_gpio_mode(list[i]); | ||
165 | |||
166 | if (ret) | ||
167 | return ret; | ||
168 | } | ||
169 | |||
170 | return ret; | ||
171 | } | ||
172 | |||
173 | int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | ||
174 | const char *label) | ||
175 | { | ||
176 | int ret; | ||
177 | |||
178 | ret = imx_iomuxv1_setup_multiple(pin_list, count); | ||
179 | return ret; | ||
180 | } | ||
181 | EXPORT_SYMBOL(mxc_gpio_setup_multiple_pins); | ||
182 | |||
183 | int __init imx_iomuxv1_init(void __iomem *base, int numports) | ||
184 | { | ||
185 | imx_iomuxv1_baseaddr = base; | ||
186 | imx_iomuxv1_numports = numports; | ||
187 | |||
188 | return 0; | ||
189 | } | ||
diff --git a/arch/arm/mach-imx/iomux-v1.h b/arch/arm/mach-imx/iomux-v1.h deleted file mode 100644 index 02651a40fe2..00000000000 --- a/arch/arm/mach-imx/iomux-v1.h +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | ||
3 | * Copyright (C) 2009 by Holger Schurig <hs4233@mail.mn-solutions.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | #ifndef __MACH_IOMUX_V1_H__ | ||
20 | #define __MACH_IOMUX_V1_H__ | ||
21 | |||
22 | /* | ||
23 | * GPIO Module and I/O Multiplexer | ||
24 | * x = 0..3 for reg_A, reg_B, reg_C, reg_D | ||
25 | */ | ||
26 | #define MXC_DDIR(x) (0x00 + ((x) << 8)) | ||
27 | #define MXC_OCR1(x) (0x04 + ((x) << 8)) | ||
28 | #define MXC_OCR2(x) (0x08 + ((x) << 8)) | ||
29 | #define MXC_ICONFA1(x) (0x0c + ((x) << 8)) | ||
30 | #define MXC_ICONFA2(x) (0x10 + ((x) << 8)) | ||
31 | #define MXC_ICONFB1(x) (0x14 + ((x) << 8)) | ||
32 | #define MXC_ICONFB2(x) (0x18 + ((x) << 8)) | ||
33 | #define MXC_DR(x) (0x1c + ((x) << 8)) | ||
34 | #define MXC_GIUS(x) (0x20 + ((x) << 8)) | ||
35 | #define MXC_SSR(x) (0x24 + ((x) << 8)) | ||
36 | #define MXC_ICR1(x) (0x28 + ((x) << 8)) | ||
37 | #define MXC_ICR2(x) (0x2c + ((x) << 8)) | ||
38 | #define MXC_IMR(x) (0x30 + ((x) << 8)) | ||
39 | #define MXC_ISR(x) (0x34 + ((x) << 8)) | ||
40 | #define MXC_GPR(x) (0x38 + ((x) << 8)) | ||
41 | #define MXC_SWR(x) (0x3c + ((x) << 8)) | ||
42 | #define MXC_PUEN(x) (0x40 + ((x) << 8)) | ||
43 | |||
44 | #define MX1_NUM_GPIO_PORT 4 | ||
45 | #define MX21_NUM_GPIO_PORT 6 | ||
46 | #define MX27_NUM_GPIO_PORT 6 | ||
47 | |||
48 | #define GPIO_PIN_MASK 0x1f | ||
49 | |||
50 | #define GPIO_PORT_SHIFT 5 | ||
51 | #define GPIO_PORT_MASK (0x7 << GPIO_PORT_SHIFT) | ||
52 | |||
53 | #define GPIO_PORTA (0 << GPIO_PORT_SHIFT) | ||
54 | #define GPIO_PORTB (1 << GPIO_PORT_SHIFT) | ||
55 | #define GPIO_PORTC (2 << GPIO_PORT_SHIFT) | ||
56 | #define GPIO_PORTD (3 << GPIO_PORT_SHIFT) | ||
57 | #define GPIO_PORTE (4 << GPIO_PORT_SHIFT) | ||
58 | #define GPIO_PORTF (5 << GPIO_PORT_SHIFT) | ||
59 | |||
60 | #define GPIO_OUT (1 << 8) | ||
61 | #define GPIO_IN (0 << 8) | ||
62 | #define GPIO_PUEN (1 << 9) | ||
63 | |||
64 | #define GPIO_PF (1 << 10) | ||
65 | #define GPIO_AF (1 << 11) | ||
66 | |||
67 | #define GPIO_OCR_SHIFT 12 | ||
68 | #define GPIO_OCR_MASK (3 << GPIO_OCR_SHIFT) | ||
69 | #define GPIO_AIN (0 << GPIO_OCR_SHIFT) | ||
70 | #define GPIO_BIN (1 << GPIO_OCR_SHIFT) | ||
71 | #define GPIO_CIN (2 << GPIO_OCR_SHIFT) | ||
72 | #define GPIO_GPIO (3 << GPIO_OCR_SHIFT) | ||
73 | |||
74 | #define GPIO_AOUT_SHIFT 14 | ||
75 | #define GPIO_AOUT_MASK (3 << GPIO_AOUT_SHIFT) | ||
76 | #define GPIO_AOUT (0 << GPIO_AOUT_SHIFT) | ||
77 | #define GPIO_AOUT_ISR (1 << GPIO_AOUT_SHIFT) | ||
78 | #define GPIO_AOUT_0 (2 << GPIO_AOUT_SHIFT) | ||
79 | #define GPIO_AOUT_1 (3 << GPIO_AOUT_SHIFT) | ||
80 | |||
81 | #define GPIO_BOUT_SHIFT 16 | ||
82 | #define GPIO_BOUT_MASK (3 << GPIO_BOUT_SHIFT) | ||
83 | #define GPIO_BOUT (0 << GPIO_BOUT_SHIFT) | ||
84 | #define GPIO_BOUT_ISR (1 << GPIO_BOUT_SHIFT) | ||
85 | #define GPIO_BOUT_0 (2 << GPIO_BOUT_SHIFT) | ||
86 | #define GPIO_BOUT_1 (3 << GPIO_BOUT_SHIFT) | ||
87 | |||
88 | extern int mxc_gpio_mode(int gpio_mode); | ||
89 | extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | ||
90 | const char *label); | ||
91 | |||
92 | extern int imx_iomuxv1_init(void __iomem *base, int numports); | ||
93 | |||
94 | #endif /* __MACH_IOMUX_V1_H__ */ | ||
diff --git a/arch/arm/mach-imx/iomux-v3.c b/arch/arm/mach-imx/iomux-v3.c deleted file mode 100644 index 9dae74bf47f..00000000000 --- a/arch/arm/mach-imx/iomux-v3.c +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2006 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de> | ||
4 | * Copyright (C) 2009 by Jan Weitzel Phytec Messtechnik GmbH, | ||
5 | * <armlinux@phytec.de> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version 2 | ||
10 | * of the License, or (at your option) any later version. | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
19 | * MA 02110-1301, USA. | ||
20 | */ | ||
21 | #include <linux/errno.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/kernel.h> | ||
24 | #include <linux/module.h> | ||
25 | #include <linux/string.h> | ||
26 | #include <linux/gpio.h> | ||
27 | |||
28 | #include <asm/mach/map.h> | ||
29 | |||
30 | #include "hardware.h" | ||
31 | #include "iomux-v3.h" | ||
32 | |||
33 | static void __iomem *base; | ||
34 | |||
35 | /* | ||
36 | * configures a single pad in the iomuxer | ||
37 | */ | ||
38 | int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad) | ||
39 | { | ||
40 | u32 mux_ctrl_ofs = (pad & MUX_CTRL_OFS_MASK) >> MUX_CTRL_OFS_SHIFT; | ||
41 | u32 mux_mode = (pad & MUX_MODE_MASK) >> MUX_MODE_SHIFT; | ||
42 | u32 sel_input_ofs = (pad & MUX_SEL_INPUT_OFS_MASK) >> MUX_SEL_INPUT_OFS_SHIFT; | ||
43 | u32 sel_input = (pad & MUX_SEL_INPUT_MASK) >> MUX_SEL_INPUT_SHIFT; | ||
44 | u32 pad_ctrl_ofs = (pad & MUX_PAD_CTRL_OFS_MASK) >> MUX_PAD_CTRL_OFS_SHIFT; | ||
45 | u32 pad_ctrl = (pad & MUX_PAD_CTRL_MASK) >> MUX_PAD_CTRL_SHIFT; | ||
46 | |||
47 | if (mux_ctrl_ofs) | ||
48 | __raw_writel(mux_mode, base + mux_ctrl_ofs); | ||
49 | |||
50 | if (sel_input_ofs) | ||
51 | __raw_writel(sel_input, base + sel_input_ofs); | ||
52 | |||
53 | if (!(pad_ctrl & NO_PAD_CTRL) && pad_ctrl_ofs) | ||
54 | __raw_writel(pad_ctrl, base + pad_ctrl_ofs); | ||
55 | |||
56 | return 0; | ||
57 | } | ||
58 | EXPORT_SYMBOL(mxc_iomux_v3_setup_pad); | ||
59 | |||
60 | int mxc_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t *pad_list, unsigned count) | ||
61 | { | ||
62 | iomux_v3_cfg_t *p = pad_list; | ||
63 | int i; | ||
64 | int ret; | ||
65 | |||
66 | for (i = 0; i < count; i++) { | ||
67 | ret = mxc_iomux_v3_setup_pad(*p); | ||
68 | if (ret) | ||
69 | return ret; | ||
70 | p++; | ||
71 | } | ||
72 | return 0; | ||
73 | } | ||
74 | EXPORT_SYMBOL(mxc_iomux_v3_setup_multiple_pads); | ||
75 | |||
76 | void mxc_iomux_v3_init(void __iomem *iomux_v3_base) | ||
77 | { | ||
78 | base = iomux_v3_base; | ||
79 | } | ||
diff --git a/arch/arm/mach-imx/iomux-v3.h b/arch/arm/mach-imx/iomux-v3.h deleted file mode 100644 index 2fa3b543010..00000000000 --- a/arch/arm/mach-imx/iomux-v3.h +++ /dev/null | |||
@@ -1,142 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 by Jan Weitzel Phytec Messtechnik GmbH, | ||
3 | * <armlinux@phytec.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #ifndef __MACH_IOMUX_V3_H__ | ||
21 | #define __MACH_IOMUX_V3_H__ | ||
22 | |||
23 | /* | ||
24 | * build IOMUX_PAD structure | ||
25 | * | ||
26 | * This iomux scheme is based around pads, which are the physical balls | ||
27 | * on the processor. | ||
28 | * | ||
29 | * - Each pad has a pad control register (IOMUXC_SW_PAD_CTRL_x) which controls | ||
30 | * things like driving strength and pullup/pulldown. | ||
31 | * - Each pad can have but not necessarily does have an output routing register | ||
32 | * (IOMUXC_SW_MUX_CTL_PAD_x). | ||
33 | * - Each pad can have but not necessarily does have an input routing register | ||
34 | * (IOMUXC_x_SELECT_INPUT) | ||
35 | * | ||
36 | * The three register sets do not have a fixed offset to each other, | ||
37 | * hence we order this table by pad control registers (which all pads | ||
38 | * have) and put the optional i/o routing registers into additional | ||
39 | * fields. | ||
40 | * | ||
41 | * The naming convention for the pad modes is MX35_PAD_<padname>__<padmode> | ||
42 | * If <padname> or <padmode> refers to a GPIO, it is named | ||
43 | * GPIO_<unit>_<num> | ||
44 | * | ||
45 | * IOMUX/PAD Bit field definitions | ||
46 | * | ||
47 | * MUX_CTRL_OFS: 0..11 (12) | ||
48 | * PAD_CTRL_OFS: 12..23 (12) | ||
49 | * SEL_INPUT_OFS: 24..35 (12) | ||
50 | * MUX_MODE + SION: 36..40 (5) | ||
51 | * PAD_CTRL + NO_PAD_CTRL: 41..57 (17) | ||
52 | * SEL_INP: 58..61 (4) | ||
53 | * reserved: 63 (1) | ||
54 | */ | ||
55 | |||
56 | typedef u64 iomux_v3_cfg_t; | ||
57 | |||
58 | #define MUX_CTRL_OFS_SHIFT 0 | ||
59 | #define MUX_CTRL_OFS_MASK ((iomux_v3_cfg_t)0xfff << MUX_CTRL_OFS_SHIFT) | ||
60 | #define MUX_PAD_CTRL_OFS_SHIFT 12 | ||
61 | #define MUX_PAD_CTRL_OFS_MASK ((iomux_v3_cfg_t)0xfff << MUX_PAD_CTRL_OFS_SHIFT) | ||
62 | #define MUX_SEL_INPUT_OFS_SHIFT 24 | ||
63 | #define MUX_SEL_INPUT_OFS_MASK ((iomux_v3_cfg_t)0xfff << MUX_SEL_INPUT_OFS_SHIFT) | ||
64 | |||
65 | #define MUX_MODE_SHIFT 36 | ||
66 | #define MUX_MODE_MASK ((iomux_v3_cfg_t)0x1f << MUX_MODE_SHIFT) | ||
67 | #define MUX_PAD_CTRL_SHIFT 41 | ||
68 | #define MUX_PAD_CTRL_MASK ((iomux_v3_cfg_t)0x1ffff << MUX_PAD_CTRL_SHIFT) | ||
69 | #define MUX_SEL_INPUT_SHIFT 58 | ||
70 | #define MUX_SEL_INPUT_MASK ((iomux_v3_cfg_t)0xf << MUX_SEL_INPUT_SHIFT) | ||
71 | |||
72 | #define MUX_PAD_CTRL(x) ((iomux_v3_cfg_t)(x) << MUX_PAD_CTRL_SHIFT) | ||
73 | |||
74 | #define IOMUX_PAD(_pad_ctrl_ofs, _mux_ctrl_ofs, _mux_mode, _sel_input_ofs, \ | ||
75 | _sel_input, _pad_ctrl) \ | ||
76 | (((iomux_v3_cfg_t)(_mux_ctrl_ofs) << MUX_CTRL_OFS_SHIFT) | \ | ||
77 | ((iomux_v3_cfg_t)(_mux_mode) << MUX_MODE_SHIFT) | \ | ||
78 | ((iomux_v3_cfg_t)(_pad_ctrl_ofs) << MUX_PAD_CTRL_OFS_SHIFT) | \ | ||
79 | ((iomux_v3_cfg_t)(_pad_ctrl) << MUX_PAD_CTRL_SHIFT) | \ | ||
80 | ((iomux_v3_cfg_t)(_sel_input_ofs) << MUX_SEL_INPUT_OFS_SHIFT) | \ | ||
81 | ((iomux_v3_cfg_t)(_sel_input) << MUX_SEL_INPUT_SHIFT)) | ||
82 | |||
83 | #define NEW_PAD_CTRL(cfg, pad) (((cfg) & ~MUX_PAD_CTRL_MASK) | MUX_PAD_CTRL(pad)) | ||
84 | /* | ||
85 | * Use to set PAD control | ||
86 | */ | ||
87 | |||
88 | #define NO_PAD_CTRL (1 << 16) | ||
89 | #define PAD_CTL_DVS (1 << 13) | ||
90 | #define PAD_CTL_HYS (1 << 8) | ||
91 | |||
92 | #define PAD_CTL_PKE (1 << 7) | ||
93 | #define PAD_CTL_PUE (1 << 6 | PAD_CTL_PKE) | ||
94 | #define PAD_CTL_PUS_100K_DOWN (0 << 4 | PAD_CTL_PUE) | ||
95 | #define PAD_CTL_PUS_47K_UP (1 << 4 | PAD_CTL_PUE) | ||
96 | #define PAD_CTL_PUS_100K_UP (2 << 4 | PAD_CTL_PUE) | ||
97 | #define PAD_CTL_PUS_22K_UP (3 << 4 | PAD_CTL_PUE) | ||
98 | |||
99 | #define PAD_CTL_ODE (1 << 3) | ||
100 | |||
101 | #define PAD_CTL_DSE_LOW (0 << 1) | ||
102 | #define PAD_CTL_DSE_MED (1 << 1) | ||
103 | #define PAD_CTL_DSE_HIGH (2 << 1) | ||
104 | #define PAD_CTL_DSE_MAX (3 << 1) | ||
105 | |||
106 | #define PAD_CTL_SRE_FAST (1 << 0) | ||
107 | #define PAD_CTL_SRE_SLOW (0 << 0) | ||
108 | |||
109 | #define IOMUX_CONFIG_SION (0x1 << 4) | ||
110 | |||
111 | #define MX51_NUM_GPIO_PORT 4 | ||
112 | |||
113 | #define GPIO_PIN_MASK 0x1f | ||
114 | |||
115 | #define GPIO_PORT_SHIFT 5 | ||
116 | #define GPIO_PORT_MASK (0x7 << GPIO_PORT_SHIFT) | ||
117 | |||
118 | #define GPIO_PORTA (0 << GPIO_PORT_SHIFT) | ||
119 | #define GPIO_PORTB (1 << GPIO_PORT_SHIFT) | ||
120 | #define GPIO_PORTC (2 << GPIO_PORT_SHIFT) | ||
121 | #define GPIO_PORTD (3 << GPIO_PORT_SHIFT) | ||
122 | #define GPIO_PORTE (4 << GPIO_PORT_SHIFT) | ||
123 | #define GPIO_PORTF (5 << GPIO_PORT_SHIFT) | ||
124 | |||
125 | /* | ||
126 | * setups a single pad in the iomuxer | ||
127 | */ | ||
128 | int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad); | ||
129 | |||
130 | /* | ||
131 | * setups mutliple pads | ||
132 | * convenient way to call the above function with tables | ||
133 | */ | ||
134 | int mxc_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t *pad_list, unsigned count); | ||
135 | |||
136 | /* | ||
137 | * Initialise the iomux controller | ||
138 | */ | ||
139 | void mxc_iomux_v3_init(void __iomem *iomux_v3_base); | ||
140 | |||
141 | #endif /* __MACH_IOMUX_V3_H__*/ | ||
142 | |||
diff --git a/arch/arm/mach-imx/iram.h b/arch/arm/mach-imx/iram.h deleted file mode 100644 index 022690c3370..00000000000 --- a/arch/arm/mach-imx/iram.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | #include <linux/errno.h> | ||
20 | |||
21 | #ifdef CONFIG_IRAM_ALLOC | ||
22 | |||
23 | int __init iram_init(unsigned long base, unsigned long size); | ||
24 | void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr); | ||
25 | void iram_free(unsigned long dma_addr, unsigned int size); | ||
26 | |||
27 | #else | ||
28 | |||
29 | static inline int __init iram_init(unsigned long base, unsigned long size) | ||
30 | { | ||
31 | return -ENOMEM; | ||
32 | } | ||
33 | |||
34 | static inline void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr) | ||
35 | { | ||
36 | return NULL; | ||
37 | } | ||
38 | |||
39 | static inline void iram_free(unsigned long base, unsigned long size) {} | ||
40 | |||
41 | #endif | ||
diff --git a/arch/arm/mach-imx/iram_alloc.c b/arch/arm/mach-imx/iram_alloc.c deleted file mode 100644 index 6c80424f678..00000000000 --- a/arch/arm/mach-imx/iram_alloc.c +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/module.h> | ||
23 | #include <linux/spinlock.h> | ||
24 | #include <linux/genalloc.h> | ||
25 | |||
26 | #include "iram.h" | ||
27 | |||
28 | static unsigned long iram_phys_base; | ||
29 | static void __iomem *iram_virt_base; | ||
30 | static struct gen_pool *iram_pool; | ||
31 | |||
32 | static inline void __iomem *iram_phys_to_virt(unsigned long p) | ||
33 | { | ||
34 | return iram_virt_base + (p - iram_phys_base); | ||
35 | } | ||
36 | |||
37 | void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr) | ||
38 | { | ||
39 | if (!iram_pool) | ||
40 | return NULL; | ||
41 | |||
42 | *dma_addr = gen_pool_alloc(iram_pool, size); | ||
43 | pr_debug("iram alloc - %dB@0x%lX\n", size, *dma_addr); | ||
44 | if (!*dma_addr) | ||
45 | return NULL; | ||
46 | return iram_phys_to_virt(*dma_addr); | ||
47 | } | ||
48 | EXPORT_SYMBOL(iram_alloc); | ||
49 | |||
50 | void iram_free(unsigned long addr, unsigned int size) | ||
51 | { | ||
52 | if (!iram_pool) | ||
53 | return; | ||
54 | |||
55 | gen_pool_free(iram_pool, addr, size); | ||
56 | } | ||
57 | EXPORT_SYMBOL(iram_free); | ||
58 | |||
59 | int __init iram_init(unsigned long base, unsigned long size) | ||
60 | { | ||
61 | iram_phys_base = base; | ||
62 | |||
63 | iram_pool = gen_pool_create(PAGE_SHIFT, -1); | ||
64 | if (!iram_pool) | ||
65 | return -ENOMEM; | ||
66 | |||
67 | gen_pool_add(iram_pool, base, size, -1); | ||
68 | iram_virt_base = ioremap(iram_phys_base, size); | ||
69 | if (!iram_virt_base) | ||
70 | return -EIO; | ||
71 | |||
72 | pr_debug("i.MX IRAM pool: %ld KB@0x%p\n", size / 1024, iram_virt_base); | ||
73 | return 0; | ||
74 | } | ||
diff --git a/arch/arm/mach-imx/irq-common.c b/arch/arm/mach-imx/irq-common.c deleted file mode 100644 index b6e11458e5a..00000000000 --- a/arch/arm/mach-imx/irq-common.c +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) BitBox Ltd 2010 | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
16 | * MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #include <linux/module.h> | ||
20 | #include <linux/irq.h> | ||
21 | |||
22 | #include "irq-common.h" | ||
23 | |||
24 | int imx_irq_set_priority(unsigned char irq, unsigned char prio) | ||
25 | { | ||
26 | struct irq_chip_generic *gc; | ||
27 | struct mxc_extra_irq *exirq; | ||
28 | int ret; | ||
29 | |||
30 | ret = -ENOSYS; | ||
31 | |||
32 | gc = irq_get_chip_data(irq); | ||
33 | if (gc && gc->private) { | ||
34 | exirq = gc->private; | ||
35 | if (exirq->set_priority) | ||
36 | ret = exirq->set_priority(irq, prio); | ||
37 | } | ||
38 | |||
39 | return ret; | ||
40 | } | ||
41 | EXPORT_SYMBOL(imx_irq_set_priority); | ||
42 | |||
43 | int mxc_set_irq_fiq(unsigned int irq, unsigned int type) | ||
44 | { | ||
45 | struct irq_chip_generic *gc; | ||
46 | struct mxc_extra_irq *exirq; | ||
47 | int ret; | ||
48 | |||
49 | ret = -ENOSYS; | ||
50 | |||
51 | gc = irq_get_chip_data(irq); | ||
52 | if (gc && gc->private) { | ||
53 | exirq = gc->private; | ||
54 | if (exirq->set_irq_fiq) | ||
55 | ret = exirq->set_irq_fiq(irq, type); | ||
56 | } | ||
57 | |||
58 | return ret; | ||
59 | } | ||
60 | EXPORT_SYMBOL(mxc_set_irq_fiq); | ||
diff --git a/arch/arm/mach-imx/irq-common.h b/arch/arm/mach-imx/irq-common.h deleted file mode 100644 index 5b2dabba330..00000000000 --- a/arch/arm/mach-imx/irq-common.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) BitBox Ltd 2010 | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
16 | * MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef __PLAT_MXC_IRQ_COMMON_H__ | ||
20 | #define __PLAT_MXC_IRQ_COMMON_H__ | ||
21 | |||
22 | /* all normal IRQs can be FIQs */ | ||
23 | #define FIQ_START 0 | ||
24 | |||
25 | struct mxc_extra_irq | ||
26 | { | ||
27 | int (*set_priority)(unsigned char irq, unsigned char prio); | ||
28 | int (*set_irq_fiq)(unsigned int irq, unsigned int type); | ||
29 | }; | ||
30 | |||
31 | #endif | ||
diff --git a/arch/arm/mach-imx/lluart.c b/arch/arm/mach-imx/lluart.c deleted file mode 100644 index 2fdc9bf2fb5..00000000000 --- a/arch/arm/mach-imx/lluart.c +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <asm/page.h> | ||
15 | #include <asm/sizes.h> | ||
16 | #include <asm/mach/map.h> | ||
17 | |||
18 | #include "hardware.h" | ||
19 | |||
20 | #define IMX6Q_UART1_BASE_ADDR 0x02020000 | ||
21 | #define IMX6Q_UART2_BASE_ADDR 0x021e8000 | ||
22 | #define IMX6Q_UART3_BASE_ADDR 0x021ec000 | ||
23 | #define IMX6Q_UART4_BASE_ADDR 0x021f0000 | ||
24 | #define IMX6Q_UART5_BASE_ADDR 0x021f4000 | ||
25 | |||
26 | /* | ||
27 | * IMX6Q_UART_BASE_ADDR is put in the middle to force the expansion | ||
28 | * of IMX6Q_UART##n##_BASE_ADDR. | ||
29 | */ | ||
30 | #define IMX6Q_UART_BASE_ADDR(n) IMX6Q_UART##n##_BASE_ADDR | ||
31 | #define IMX6Q_UART_BASE(n) IMX6Q_UART_BASE_ADDR(n) | ||
32 | #define IMX6Q_DEBUG_UART_BASE IMX6Q_UART_BASE(CONFIG_DEBUG_IMX6Q_UART_PORT) | ||
33 | |||
34 | static struct map_desc imx_lluart_desc = { | ||
35 | #ifdef CONFIG_DEBUG_IMX6Q_UART | ||
36 | .virtual = IMX_IO_P2V(IMX6Q_DEBUG_UART_BASE), | ||
37 | .pfn = __phys_to_pfn(IMX6Q_DEBUG_UART_BASE), | ||
38 | .length = 0x4000, | ||
39 | .type = MT_DEVICE, | ||
40 | #endif | ||
41 | }; | ||
42 | |||
43 | void __init imx_lluart_map_io(void) | ||
44 | { | ||
45 | if (imx_lluart_desc.virtual) | ||
46 | iotable_init(&imx_lluart_desc, 1); | ||
47 | } | ||
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c index 5c9bd2c66e6..a404c89485c 100644 --- a/arch/arm/mach-imx/mach-apf9328.c +++ b/arch/arm/mach-imx/mach-apf9328.c | |||
@@ -18,17 +18,17 @@ | |||
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/dm9000.h> | 20 | #include <linux/dm9000.h> |
21 | #include <linux/gpio.h> | ||
22 | #include <linux/i2c.h> | ||
23 | 21 | ||
24 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/time.h> | 24 | #include <asm/mach/time.h> |
27 | 25 | ||
28 | #include "common.h" | 26 | #include <mach/common.h> |
27 | #include <mach/hardware.h> | ||
28 | #include <mach/irqs.h> | ||
29 | #include <mach/iomux-mx1.h> | ||
30 | |||
29 | #include "devices-imx1.h" | 31 | #include "devices-imx1.h" |
30 | #include "hardware.h" | ||
31 | #include "iomux-mx1.h" | ||
32 | 32 | ||
33 | static const int apf9328_pins[] __initconst = { | 33 | static const int apf9328_pins[] __initconst = { |
34 | /* UART1 */ | 34 | /* UART1 */ |
@@ -41,9 +41,6 @@ static const int apf9328_pins[] __initconst = { | |||
41 | PB29_PF_UART2_RTS, | 41 | PB29_PF_UART2_RTS, |
42 | PB30_PF_UART2_TXD, | 42 | PB30_PF_UART2_TXD, |
43 | PB31_PF_UART2_RXD, | 43 | PB31_PF_UART2_RXD, |
44 | /* I2C */ | ||
45 | PA15_PF_I2C_SDA, | ||
46 | PA16_PF_I2C_SCL, | ||
47 | }; | 44 | }; |
48 | 45 | ||
49 | /* | 46 | /* |
@@ -86,7 +83,8 @@ static struct resource dm9000_resources[] = { | |||
86 | .end = MX1_CS4_PHYS + 0x00C00003, | 83 | .end = MX1_CS4_PHYS + 0x00C00003, |
87 | .flags = IORESOURCE_MEM, | 84 | .flags = IORESOURCE_MEM, |
88 | }, { | 85 | }, { |
89 | /* irq number is run-time assigned */ | 86 | .start = IRQ_GPIOB(14), |
87 | .end = IRQ_GPIOB(14), | ||
90 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 88 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
91 | }, | 89 | }, |
92 | }; | 90 | }; |
@@ -105,10 +103,6 @@ static const struct imxuart_platform_data uart1_pdata __initconst = { | |||
105 | .flags = IMXUART_HAVE_RTSCTS, | 103 | .flags = IMXUART_HAVE_RTSCTS, |
106 | }; | 104 | }; |
107 | 105 | ||
108 | static const struct imxi2c_platform_data apf9328_i2c_data __initconst = { | ||
109 | .bitrate = 100000, | ||
110 | }; | ||
111 | |||
112 | static struct platform_device *devices[] __initdata = { | 106 | static struct platform_device *devices[] __initdata = { |
113 | &apf9328_flash_device, | 107 | &apf9328_flash_device, |
114 | &dm9000x_device, | 108 | &dm9000x_device, |
@@ -125,10 +119,6 @@ static void __init apf9328_init(void) | |||
125 | imx1_add_imx_uart0(NULL); | 119 | imx1_add_imx_uart0(NULL); |
126 | imx1_add_imx_uart1(&uart1_pdata); | 120 | imx1_add_imx_uart1(&uart1_pdata); |
127 | 121 | ||
128 | imx1_add_imx_i2c(&apf9328_i2c_data); | ||
129 | |||
130 | dm9000_resources[2].start = gpio_to_irq(IMX_GPIO_NR(2, 14)); | ||
131 | dm9000_resources[2].end = gpio_to_irq(IMX_GPIO_NR(2, 14)); | ||
132 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 122 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
133 | } | 123 | } |
134 | 124 | ||
@@ -146,8 +136,6 @@ MACHINE_START(APF9328, "Armadeus APF9328") | |||
146 | .map_io = mx1_map_io, | 136 | .map_io = mx1_map_io, |
147 | .init_early = imx1_init_early, | 137 | .init_early = imx1_init_early, |
148 | .init_irq = mx1_init_irq, | 138 | .init_irq = mx1_init_irq, |
149 | .handle_irq = imx1_handle_irq, | ||
150 | .timer = &apf9328_timer, | 139 | .timer = &apf9328_timer, |
151 | .init_machine = apf9328_init, | 140 | .init_machine = apf9328_init, |
152 | .restart = mxc_restart, | ||
153 | MACHINE_END | 141 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index 59bd6b06a6b..ede2710f8b7 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
@@ -38,21 +38,20 @@ | |||
38 | #include <linux/usb/otg.h> | 38 | #include <linux/usb/otg.h> |
39 | #include <linux/usb/ulpi.h> | 39 | #include <linux/usb/ulpi.h> |
40 | #include <linux/delay.h> | 40 | #include <linux/delay.h> |
41 | #include <linux/regulator/machine.h> | ||
42 | #include <linux/regulator/fixed.h> | ||
43 | 41 | ||
42 | #include <mach/hardware.h> | ||
44 | #include <asm/mach-types.h> | 43 | #include <asm/mach-types.h> |
45 | #include <asm/mach/arch.h> | 44 | #include <asm/mach/arch.h> |
46 | #include <asm/mach/time.h> | 45 | #include <asm/mach/time.h> |
47 | #include <asm/memory.h> | 46 | #include <asm/memory.h> |
48 | #include <asm/mach/map.h> | 47 | #include <asm/mach/map.h> |
49 | 48 | ||
50 | #include "common.h" | 49 | #include <mach/common.h> |
50 | #include <mach/iomux-mx3.h> | ||
51 | #include <mach/ulpi.h> | ||
52 | |||
51 | #include "devices-imx31.h" | 53 | #include "devices-imx31.h" |
52 | #include "crmregs-imx3.h" | 54 | #include "crmregs-imx31.h" |
53 | #include "hardware.h" | ||
54 | #include "iomux-mx3.h" | ||
55 | #include "ulpi.h" | ||
56 | 55 | ||
57 | static int armadillo5x0_pins[] = { | 56 | static int armadillo5x0_pins[] = { |
58 | /* UART1 */ | 57 | /* UART1 */ |
@@ -315,19 +314,25 @@ static struct mtd_partition armadillo5x0_nor_flash_partitions[] = { | |||
315 | }, | 314 | }, |
316 | }; | 315 | }; |
317 | 316 | ||
318 | static const struct physmap_flash_data | 317 | static struct physmap_flash_data armadillo5x0_nor_flash_pdata = { |
319 | armadillo5x0_nor_flash_pdata __initconst = { | ||
320 | .width = 2, | 318 | .width = 2, |
321 | .parts = armadillo5x0_nor_flash_partitions, | 319 | .parts = armadillo5x0_nor_flash_partitions, |
322 | .nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions), | 320 | .nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions), |
323 | }; | 321 | }; |
324 | 322 | ||
325 | static const struct resource armadillo5x0_nor_flash_resource __initconst = { | 323 | static struct resource armadillo5x0_nor_flash_resource = { |
326 | .flags = IORESOURCE_MEM, | 324 | .flags = IORESOURCE_MEM, |
327 | .start = MX31_CS0_BASE_ADDR, | 325 | .start = MX31_CS0_BASE_ADDR, |
328 | .end = MX31_CS0_BASE_ADDR + SZ_64M - 1, | 326 | .end = MX31_CS0_BASE_ADDR + SZ_64M - 1, |
329 | }; | 327 | }; |
330 | 328 | ||
329 | static struct platform_device armadillo5x0_nor_flash = { | ||
330 | .name = "physmap-flash", | ||
331 | .id = -1, | ||
332 | .num_resources = 1, | ||
333 | .resource = &armadillo5x0_nor_flash_resource, | ||
334 | }; | ||
335 | |||
331 | /* | 336 | /* |
332 | * FB support | 337 | * FB support |
333 | */ | 338 | */ |
@@ -366,6 +371,10 @@ static const struct fb_videomode fb_modedb[] = { | |||
366 | }, | 371 | }, |
367 | }; | 372 | }; |
368 | 373 | ||
374 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
375 | .irq_base = MXC_IPU_IRQ_START, | ||
376 | }; | ||
377 | |||
369 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | 378 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
370 | .name = "CRT-VGA", | 379 | .name = "CRT-VGA", |
371 | .mode = fb_modedb, | 380 | .mode = fb_modedb, |
@@ -403,8 +412,7 @@ static int armadillo5x0_sdhc1_init(struct device *dev, | |||
403 | gpio_direction_input(gpio_wp); | 412 | gpio_direction_input(gpio_wp); |
404 | 413 | ||
405 | /* When supported the trigger type have to be BOTH */ | 414 | /* When supported the trigger type have to be BOTH */ |
406 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)), | 415 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_ATA_DMACK), detect_irq, |
407 | detect_irq, | ||
408 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | 416 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, |
409 | "sdhc-detect", data); | 417 | "sdhc-detect", data); |
410 | 418 | ||
@@ -425,7 +433,7 @@ err_gpio_free: | |||
425 | 433 | ||
426 | static void armadillo5x0_sdhc1_exit(struct device *dev, void *data) | 434 | static void armadillo5x0_sdhc1_exit(struct device *dev, void *data) |
427 | { | 435 | { |
428 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)), data); | 436 | free_irq(IOMUX_TO_IRQ(MX31_PIN_ATA_DMACK), data); |
429 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)); | 437 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)); |
430 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); | 438 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); |
431 | } | 439 | } |
@@ -446,7 +454,8 @@ static struct resource armadillo5x0_smc911x_resources[] = { | |||
446 | .end = MX31_CS3_BASE_ADDR + SZ_32M - 1, | 454 | .end = MX31_CS3_BASE_ADDR + SZ_32M - 1, |
447 | .flags = IORESOURCE_MEM, | 455 | .flags = IORESOURCE_MEM, |
448 | }, { | 456 | }, { |
449 | /* irq number is run-time assigned */ | 457 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), |
458 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | ||
450 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 459 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
451 | }, | 460 | }, |
452 | }; | 461 | }; |
@@ -476,11 +485,6 @@ static struct platform_device *devices[] __initdata = { | |||
476 | &armadillo5x0_smc911x_device, | 485 | &armadillo5x0_smc911x_device, |
477 | }; | 486 | }; |
478 | 487 | ||
479 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
480 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
481 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
482 | }; | ||
483 | |||
484 | /* | 488 | /* |
485 | * Perform board specific initializations | 489 | * Perform board specific initializations |
486 | */ | 490 | */ |
@@ -491,12 +495,6 @@ static void __init armadillo5x0_init(void) | |||
491 | mxc_iomux_setup_multiple_pins(armadillo5x0_pins, | 495 | mxc_iomux_setup_multiple_pins(armadillo5x0_pins, |
492 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); | 496 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); |
493 | 497 | ||
494 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
495 | |||
496 | armadillo5x0_smc911x_resources[1].start = | ||
497 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
498 | armadillo5x0_smc911x_resources[1].end = | ||
499 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
500 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 498 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
501 | imx_add_gpio_keys(&armadillo5x0_button_data); | 499 | imx_add_gpio_keys(&armadillo5x0_button_data); |
502 | imx31_add_imx_i2c1(NULL); | 500 | imx31_add_imx_i2c1(NULL); |
@@ -512,21 +510,18 @@ static void __init armadillo5x0_init(void) | |||
512 | imx31_add_mxc_mmc(0, &sdhc_pdata); | 510 | imx31_add_mxc_mmc(0, &sdhc_pdata); |
513 | 511 | ||
514 | /* Register FB */ | 512 | /* Register FB */ |
515 | imx31_add_ipu_core(); | 513 | imx31_add_ipu_core(&mx3_ipu_data); |
516 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | 514 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); |
517 | 515 | ||
518 | /* Register NOR Flash */ | 516 | /* Register NOR Flash */ |
519 | platform_device_register_resndata(NULL, "physmap-flash", -1, | 517 | mxc_register_device(&armadillo5x0_nor_flash, |
520 | &armadillo5x0_nor_flash_resource, 1, | 518 | &armadillo5x0_nor_flash_pdata); |
521 | &armadillo5x0_nor_flash_pdata, | ||
522 | sizeof(armadillo5x0_nor_flash_pdata)); | ||
523 | 519 | ||
524 | /* Register NAND Flash */ | 520 | /* Register NAND Flash */ |
525 | imx31_add_mxc_nand(&armadillo5x0_nand_board_info); | 521 | imx31_add_mxc_nand(&armadillo5x0_nand_board_info); |
526 | 522 | ||
527 | /* set NAND page size to 2k if not configured via boot mode pins */ | 523 | /* set NAND page size to 2k if not configured via boot mode pins */ |
528 | __raw_writel(__raw_readl(mx3_ccm_base + MXC_CCM_RCSR) | | 524 | __raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR); |
529 | (1 << 30), mx3_ccm_base + MXC_CCM_RCSR); | ||
530 | 525 | ||
531 | /* RTC */ | 526 | /* RTC */ |
532 | /* Get RTC IRQ and register the chip */ | 527 | /* Get RTC IRQ and register the chip */ |
@@ -563,12 +558,10 @@ static struct sys_timer armadillo5x0_timer = { | |||
563 | 558 | ||
564 | MACHINE_START(ARMADILLO5X0, "Armadillo-500") | 559 | MACHINE_START(ARMADILLO5X0, "Armadillo-500") |
565 | /* Maintainer: Alberto Panizzo */ | 560 | /* Maintainer: Alberto Panizzo */ |
566 | .atag_offset = 0x100, | 561 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
567 | .map_io = mx31_map_io, | 562 | .map_io = mx31_map_io, |
568 | .init_early = imx31_init_early, | 563 | .init_early = imx31_init_early, |
569 | .init_irq = mx31_init_irq, | 564 | .init_irq = mx31_init_irq, |
570 | .handle_irq = imx31_handle_irq, | ||
571 | .timer = &armadillo5x0_timer, | 565 | .timer = &armadillo5x0_timer, |
572 | .init_machine = armadillo5x0_init, | 566 | .init_machine = armadillo5x0_init, |
573 | .restart = mxc_restart, | ||
574 | MACHINE_END | 567 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-bug.c b/arch/arm/mach-imx/mach-bug.c index 3a39d5aec07..f49470553bd 100644 --- a/arch/arm/mach-imx/mach-bug.c +++ b/arch/arm/mach-imx/mach-bug.c | |||
@@ -19,14 +19,15 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | 21 | ||
22 | #include <mach/iomux-mx3.h> | ||
23 | #include <mach/hardware.h> | ||
24 | #include <mach/common.h> | ||
25 | |||
22 | #include <asm/mach/time.h> | 26 | #include <asm/mach/time.h> |
23 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
24 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
25 | 29 | ||
26 | #include "common.h" | ||
27 | #include "devices-imx31.h" | 30 | #include "devices-imx31.h" |
28 | #include "hardware.h" | ||
29 | #include "iomux-mx3.h" | ||
30 | 31 | ||
31 | static const struct imxuart_platform_data uart_pdata __initconst = { | 32 | static const struct imxuart_platform_data uart_pdata __initconst = { |
32 | .flags = IMXUART_HAVE_RTSCTS, | 33 | .flags = IMXUART_HAVE_RTSCTS, |
@@ -61,8 +62,6 @@ MACHINE_START(BUG, "BugLabs BUGBase") | |||
61 | .map_io = mx31_map_io, | 62 | .map_io = mx31_map_io, |
62 | .init_early = imx31_init_early, | 63 | .init_early = imx31_init_early, |
63 | .init_irq = mx31_init_irq, | 64 | .init_irq = mx31_init_irq, |
64 | .handle_irq = imx31_handle_irq, | ||
65 | .timer = &bug_timer, | 65 | .timer = &bug_timer, |
66 | .init_machine = bug_board_init, | 66 | .init_machine = bug_board_init, |
67 | .restart = mxc_restart, | ||
68 | MACHINE_END | 67 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 12a370646b4..f851fe90368 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -34,12 +34,13 @@ | |||
34 | #include <asm/mach/time.h> | 34 | #include <asm/mach/time.h> |
35 | #include <asm/mach/map.h> | 35 | #include <asm/mach/map.h> |
36 | 36 | ||
37 | #include "common.h" | 37 | #include <mach/eukrea-baseboards.h> |
38 | #include <mach/common.h> | ||
39 | #include <mach/hardware.h> | ||
40 | #include <mach/iomux-mx27.h> | ||
41 | #include <mach/ulpi.h> | ||
42 | |||
38 | #include "devices-imx27.h" | 43 | #include "devices-imx27.h" |
39 | #include "eukrea-baseboards.h" | ||
40 | #include "hardware.h" | ||
41 | #include "iomux-mx27.h" | ||
42 | #include "ulpi.h" | ||
43 | 44 | ||
44 | static const int eukrea_cpuimx27_pins[] __initconst = { | 45 | static const int eukrea_cpuimx27_pins[] __initconst = { |
45 | /* UART1 */ | 46 | /* UART1 */ |
@@ -168,28 +169,28 @@ static struct i2c_board_info eukrea_cpuimx27_i2c_devices[] = { | |||
168 | static struct plat_serial8250_port serial_platform_data[] = { | 169 | static struct plat_serial8250_port serial_platform_data[] = { |
169 | { | 170 | { |
170 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x200000), | 171 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x200000), |
171 | /* irq number is run-time assigned */ | 172 | .irq = IRQ_GPIOB(23), |
172 | .uartclk = 14745600, | 173 | .uartclk = 14745600, |
173 | .regshift = 1, | 174 | .regshift = 1, |
174 | .iotype = UPIO_MEM, | 175 | .iotype = UPIO_MEM, |
175 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 176 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
176 | }, { | 177 | }, { |
177 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x400000), | 178 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x400000), |
178 | /* irq number is run-time assigned */ | 179 | .irq = IRQ_GPIOB(22), |
179 | .uartclk = 14745600, | 180 | .uartclk = 14745600, |
180 | .regshift = 1, | 181 | .regshift = 1, |
181 | .iotype = UPIO_MEM, | 182 | .iotype = UPIO_MEM, |
182 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 183 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
183 | }, { | 184 | }, { |
184 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x800000), | 185 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x800000), |
185 | /* irq number is run-time assigned */ | 186 | .irq = IRQ_GPIOB(27), |
186 | .uartclk = 14745600, | 187 | .uartclk = 14745600, |
187 | .regshift = 1, | 188 | .regshift = 1, |
188 | .iotype = UPIO_MEM, | 189 | .iotype = UPIO_MEM, |
189 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 190 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
190 | }, { | 191 | }, { |
191 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x1000000), | 192 | .mapbase = (unsigned long)(MX27_CS3_BASE_ADDR + 0x1000000), |
192 | /* irq number is run-time assigned */ | 193 | .irq = IRQ_GPIOB(30), |
193 | .uartclk = 14745600, | 194 | .uartclk = 14745600, |
194 | .regshift = 1, | 195 | .regshift = 1, |
195 | .iotype = UPIO_MEM, | 196 | .iotype = UPIO_MEM, |
@@ -232,18 +233,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
232 | .phy_mode = FSL_USB2_PHY_ULPI, | 233 | .phy_mode = FSL_USB2_PHY_ULPI, |
233 | }; | 234 | }; |
234 | 235 | ||
235 | static bool otg_mode_host __initdata; | 236 | static int otg_mode_host; |
236 | 237 | ||
237 | static int __init eukrea_cpuimx27_otg_mode(char *options) | 238 | static int __init eukrea_cpuimx27_otg_mode(char *options) |
238 | { | 239 | { |
239 | if (!strcmp(options, "host")) | 240 | if (!strcmp(options, "host")) |
240 | otg_mode_host = true; | 241 | otg_mode_host = 1; |
241 | else if (!strcmp(options, "device")) | 242 | else if (!strcmp(options, "device")) |
242 | otg_mode_host = false; | 243 | otg_mode_host = 0; |
243 | else | 244 | else |
244 | pr_info("otg_mode neither \"host\" nor \"device\". " | 245 | pr_info("otg_mode neither \"host\" nor \"device\". " |
245 | "Defaulting to device\n"); | 246 | "Defaulting to device\n"); |
246 | return 1; | 247 | return 0; |
247 | } | 248 | } |
248 | __setup("otg_mode=", eukrea_cpuimx27_otg_mode); | 249 | __setup("otg_mode=", eukrea_cpuimx27_otg_mode); |
249 | 250 | ||
@@ -265,8 +266,8 @@ static void __init eukrea_cpuimx27_init(void) | |||
265 | 266 | ||
266 | imx27_add_fec(NULL); | 267 | imx27_add_fec(NULL); |
267 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 268 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
268 | imx27_add_imx2_wdt(); | 269 | imx27_add_imx2_wdt(NULL); |
269 | imx27_add_mxc_w1(); | 270 | imx27_add_mxc_w1(NULL); |
270 | 271 | ||
271 | #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2) | 272 | #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2) |
272 | /* SDHC2 can be used for Wifi */ | 273 | /* SDHC2 can be used for Wifi */ |
@@ -278,10 +279,6 @@ static void __init eukrea_cpuimx27_init(void) | |||
278 | #endif | 279 | #endif |
279 | 280 | ||
280 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 281 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
281 | serial_platform_data[0].irq = IMX_GPIO_NR(2, 23); | ||
282 | serial_platform_data[1].irq = IMX_GPIO_NR(2, 22); | ||
283 | serial_platform_data[2].irq = IMX_GPIO_NR(2, 27); | ||
284 | serial_platform_data[3].irq = IMX_GPIO_NR(2, 30); | ||
285 | platform_device_register(&serial_device); | 282 | platform_device_register(&serial_device); |
286 | #endif | 283 | #endif |
287 | 284 | ||
@@ -314,12 +311,10 @@ static struct sys_timer eukrea_cpuimx27_timer = { | |||
314 | }; | 311 | }; |
315 | 312 | ||
316 | MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27") | 313 | MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27") |
317 | .atag_offset = 0x100, | 314 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
318 | .map_io = mx27_map_io, | 315 | .map_io = mx27_map_io, |
319 | .init_early = imx27_init_early, | 316 | .init_early = imx27_init_early, |
320 | .init_irq = mx27_init_irq, | 317 | .init_irq = mx27_init_irq, |
321 | .handle_irq = imx27_handle_irq, | ||
322 | .timer = &eukrea_cpuimx27_timer, | 318 | .timer = &eukrea_cpuimx27_timer, |
323 | .init_machine = eukrea_cpuimx27_init, | 319 | .init_machine = eukrea_cpuimx27_init, |
324 | .restart = mxc_restart, | ||
325 | MACHINE_END | 320 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index 5a31bf8c8f4..4bd083ba9af 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -37,11 +37,12 @@ | |||
37 | #include <asm/mach/time.h> | 37 | #include <asm/mach/time.h> |
38 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
39 | 39 | ||
40 | #include "common.h" | 40 | #include <mach/eukrea-baseboards.h> |
41 | #include <mach/hardware.h> | ||
42 | #include <mach/common.h> | ||
43 | #include <mach/iomux-mx35.h> | ||
44 | |||
41 | #include "devices-imx35.h" | 45 | #include "devices-imx35.h" |
42 | #include "eukrea-baseboards.h" | ||
43 | #include "hardware.h" | ||
44 | #include "iomux-mx35.h" | ||
45 | 46 | ||
46 | static const struct imxuart_platform_data uart_pdata __initconst = { | 47 | static const struct imxuart_platform_data uart_pdata __initconst = { |
47 | .flags = IMXUART_HAVE_RTSCTS, | 48 | .flags = IMXUART_HAVE_RTSCTS, |
@@ -52,25 +53,20 @@ static const struct imxi2c_platform_data | |||
52 | .bitrate = 100000, | 53 | .bitrate = 100000, |
53 | }; | 54 | }; |
54 | 55 | ||
55 | #define TSC2007_IRQGPIO IMX_GPIO_NR(3, 2) | ||
56 | static int tsc2007_get_pendown_state(void) | ||
57 | { | ||
58 | return !gpio_get_value(TSC2007_IRQGPIO); | ||
59 | } | ||
60 | |||
61 | static struct tsc2007_platform_data tsc2007_info = { | 56 | static struct tsc2007_platform_data tsc2007_info = { |
62 | .model = 2007, | 57 | .model = 2007, |
63 | .x_plate_ohms = 180, | 58 | .x_plate_ohms = 180, |
64 | .get_pendown_state = tsc2007_get_pendown_state, | ||
65 | }; | 59 | }; |
66 | 60 | ||
61 | #define TSC2007_IRQGPIO IMX_GPIO_NR(3, 2) | ||
67 | static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { | 62 | static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { |
68 | { | 63 | { |
69 | I2C_BOARD_INFO("pcf8563", 0x51), | 64 | I2C_BOARD_INFO("pcf8563", 0x51), |
70 | }, { | 65 | }, { |
71 | I2C_BOARD_INFO("tsc2007", 0x48), | 66 | I2C_BOARD_INFO("tsc2007", 0x48), |
67 | .type = "tsc2007", | ||
72 | .platform_data = &tsc2007_info, | 68 | .platform_data = &tsc2007_info, |
73 | /* irq number is run-time assigned */ | 69 | .irq = gpio_to_irq(TSC2007_IRQGPIO), |
74 | }, | 70 | }, |
75 | }; | 71 | }; |
76 | 72 | ||
@@ -140,18 +136,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
140 | .workaround = FLS_USB2_WORKAROUND_ENGCM09152, | 136 | .workaround = FLS_USB2_WORKAROUND_ENGCM09152, |
141 | }; | 137 | }; |
142 | 138 | ||
143 | static bool otg_mode_host __initdata; | 139 | static int otg_mode_host; |
144 | 140 | ||
145 | static int __init eukrea_cpuimx35_otg_mode(char *options) | 141 | static int __init eukrea_cpuimx35_otg_mode(char *options) |
146 | { | 142 | { |
147 | if (!strcmp(options, "host")) | 143 | if (!strcmp(options, "host")) |
148 | otg_mode_host = true; | 144 | otg_mode_host = 1; |
149 | else if (!strcmp(options, "device")) | 145 | else if (!strcmp(options, "device")) |
150 | otg_mode_host = false; | 146 | otg_mode_host = 0; |
151 | else | 147 | else |
152 | pr_info("otg_mode neither \"host\" nor \"device\". " | 148 | pr_info("otg_mode neither \"host\" nor \"device\". " |
153 | "Defaulting to device\n"); | 149 | "Defaulting to device\n"); |
154 | return 1; | 150 | return 0; |
155 | } | 151 | } |
156 | __setup("otg_mode=", eukrea_cpuimx35_otg_mode); | 152 | __setup("otg_mode=", eukrea_cpuimx35_otg_mode); |
157 | 153 | ||
@@ -166,12 +162,11 @@ static void __init eukrea_cpuimx35_init(void) | |||
166 | ARRAY_SIZE(eukrea_cpuimx35_pads)); | 162 | ARRAY_SIZE(eukrea_cpuimx35_pads)); |
167 | 163 | ||
168 | imx35_add_fec(NULL); | 164 | imx35_add_fec(NULL); |
169 | imx35_add_imx2_wdt(); | 165 | imx35_add_imx2_wdt(NULL); |
170 | 166 | ||
171 | imx35_add_imx_uart0(&uart_pdata); | 167 | imx35_add_imx_uart0(&uart_pdata); |
172 | imx35_add_mxc_nand(&eukrea_cpuimx35_nand_board_info); | 168 | imx35_add_mxc_nand(&eukrea_cpuimx35_nand_board_info); |
173 | 169 | ||
174 | eukrea_cpuimx35_i2c_devices[1].irq = gpio_to_irq(TSC2007_IRQGPIO); | ||
175 | i2c_register_board_info(0, eukrea_cpuimx35_i2c_devices, | 170 | i2c_register_board_info(0, eukrea_cpuimx35_i2c_devices, |
176 | ARRAY_SIZE(eukrea_cpuimx35_i2c_devices)); | 171 | ARRAY_SIZE(eukrea_cpuimx35_i2c_devices)); |
177 | imx35_add_imx_i2c0(&eukrea_cpuimx35_i2c0_data); | 172 | imx35_add_imx_i2c0(&eukrea_cpuimx35_i2c0_data); |
@@ -193,18 +188,16 @@ static void __init eukrea_cpuimx35_timer_init(void) | |||
193 | mx35_clocks_init(); | 188 | mx35_clocks_init(); |
194 | } | 189 | } |
195 | 190 | ||
196 | static struct sys_timer eukrea_cpuimx35_timer = { | 191 | struct sys_timer eukrea_cpuimx35_timer = { |
197 | .init = eukrea_cpuimx35_timer_init, | 192 | .init = eukrea_cpuimx35_timer_init, |
198 | }; | 193 | }; |
199 | 194 | ||
200 | MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35") | 195 | MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35") |
201 | /* Maintainer: Eukrea Electromatique */ | 196 | /* Maintainer: Eukrea Electromatique */ |
202 | .atag_offset = 0x100, | 197 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
203 | .map_io = mx35_map_io, | 198 | .map_io = mx35_map_io, |
204 | .init_early = imx35_init_early, | 199 | .init_early = imx35_init_early, |
205 | .init_irq = mx35_init_irq, | 200 | .init_irq = mx35_init_irq, |
206 | .handle_irq = imx35_handle_irq, | ||
207 | .timer = &eukrea_cpuimx35_timer, | 201 | .timer = &eukrea_cpuimx35_timer, |
208 | .init_machine = eukrea_cpuimx35_init, | 202 | .init_machine = eukrea_cpuimx35_init, |
209 | .restart = mxc_restart, | ||
210 | MACHINE_END | 203 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-cpuimx51sd.c b/arch/arm/mach-imx/mach-cpuimx51sd.c deleted file mode 100644 index b727de029c8..00000000000 --- a/arch/arm/mach-imx/mach-cpuimx51sd.c +++ /dev/null | |||
@@ -1,373 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright (C) 2010 Eric Bénard <eric@eukrea.com> | ||
4 | * | ||
5 | * based on board-mx51_babbage.c which is | ||
6 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
7 | * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com> | ||
8 | * | ||
9 | * The code contained herein is licensed under the GNU General Public | ||
10 | * License. You may obtain a copy of the GNU General Public License | ||
11 | * Version 2 or later at the following locations: | ||
12 | * | ||
13 | * http://www.opensource.org/licenses/gpl-license.html | ||
14 | * http://www.gnu.org/copyleft/gpl.html | ||
15 | */ | ||
16 | |||
17 | #include <linux/init.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/i2c.h> | ||
20 | #include <linux/i2c/tsc2007.h> | ||
21 | #include <linux/gpio.h> | ||
22 | #include <linux/delay.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/interrupt.h> | ||
25 | #include <linux/i2c-gpio.h> | ||
26 | #include <linux/spi/spi.h> | ||
27 | #include <linux/can/platform/mcp251x.h> | ||
28 | |||
29 | #include <asm/setup.h> | ||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/mach/arch.h> | ||
32 | #include <asm/mach/time.h> | ||
33 | |||
34 | #include "common.h" | ||
35 | #include "devices-imx51.h" | ||
36 | #include "cpu_op-mx51.h" | ||
37 | #include "eukrea-baseboards.h" | ||
38 | #include "hardware.h" | ||
39 | #include "iomux-mx51.h" | ||
40 | |||
41 | #define USBH1_RST IMX_GPIO_NR(2, 28) | ||
42 | #define ETH_RST IMX_GPIO_NR(2, 31) | ||
43 | #define TSC2007_IRQGPIO_REV2 IMX_GPIO_NR(3, 12) | ||
44 | #define TSC2007_IRQGPIO_REV3 IMX_GPIO_NR(4, 0) | ||
45 | #define CAN_IRQGPIO IMX_GPIO_NR(1, 1) | ||
46 | #define CAN_RST IMX_GPIO_NR(4, 15) | ||
47 | #define CAN_NCS IMX_GPIO_NR(4, 24) | ||
48 | #define CAN_RXOBF_REV2 IMX_GPIO_NR(1, 4) | ||
49 | #define CAN_RXOBF_REV3 IMX_GPIO_NR(3, 12) | ||
50 | #define CAN_RX1BF IMX_GPIO_NR(1, 6) | ||
51 | #define CAN_TXORTS IMX_GPIO_NR(1, 7) | ||
52 | #define CAN_TX1RTS IMX_GPIO_NR(1, 8) | ||
53 | #define CAN_TX2RTS IMX_GPIO_NR(1, 9) | ||
54 | #define I2C_SCL IMX_GPIO_NR(4, 16) | ||
55 | #define I2C_SDA IMX_GPIO_NR(4, 17) | ||
56 | |||
57 | /* USB_CTRL_1 */ | ||
58 | #define MX51_USB_CTRL_1_OFFSET 0x10 | ||
59 | #define MX51_USB_CTRL_UH1_EXT_CLK_EN (1 << 25) | ||
60 | |||
61 | #define MX51_USB_PLLDIV_12_MHZ 0x00 | ||
62 | #define MX51_USB_PLL_DIV_19_2_MHZ 0x01 | ||
63 | #define MX51_USB_PLL_DIV_24_MHZ 0x02 | ||
64 | |||
65 | static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = { | ||
66 | /* UART1 */ | ||
67 | MX51_PAD_UART1_RXD__UART1_RXD, | ||
68 | MX51_PAD_UART1_TXD__UART1_TXD, | ||
69 | MX51_PAD_UART1_RTS__UART1_RTS, | ||
70 | MX51_PAD_UART1_CTS__UART1_CTS, | ||
71 | |||
72 | /* USB HOST1 */ | ||
73 | MX51_PAD_USBH1_CLK__USBH1_CLK, | ||
74 | MX51_PAD_USBH1_DIR__USBH1_DIR, | ||
75 | MX51_PAD_USBH1_NXT__USBH1_NXT, | ||
76 | MX51_PAD_USBH1_DATA0__USBH1_DATA0, | ||
77 | MX51_PAD_USBH1_DATA1__USBH1_DATA1, | ||
78 | MX51_PAD_USBH1_DATA2__USBH1_DATA2, | ||
79 | MX51_PAD_USBH1_DATA3__USBH1_DATA3, | ||
80 | MX51_PAD_USBH1_DATA4__USBH1_DATA4, | ||
81 | MX51_PAD_USBH1_DATA5__USBH1_DATA5, | ||
82 | MX51_PAD_USBH1_DATA6__USBH1_DATA6, | ||
83 | MX51_PAD_USBH1_DATA7__USBH1_DATA7, | ||
84 | MX51_PAD_USBH1_STP__USBH1_STP, | ||
85 | MX51_PAD_EIM_CS3__GPIO2_28, /* PHY nRESET */ | ||
86 | |||
87 | /* FEC */ | ||
88 | MX51_PAD_EIM_DTACK__GPIO2_31, /* PHY nRESET */ | ||
89 | |||
90 | /* HSI2C */ | ||
91 | MX51_PAD_I2C1_CLK__GPIO4_16, | ||
92 | MX51_PAD_I2C1_DAT__GPIO4_17, | ||
93 | |||
94 | /* I2C1 */ | ||
95 | MX51_PAD_SD2_CMD__I2C1_SCL, | ||
96 | MX51_PAD_SD2_CLK__I2C1_SDA, | ||
97 | |||
98 | /* CAN */ | ||
99 | MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI, | ||
100 | MX51_PAD_CSPI1_MISO__ECSPI1_MISO, | ||
101 | MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK, | ||
102 | MX51_PAD_CSPI1_SS0__GPIO4_24, /* nCS */ | ||
103 | MX51_PAD_CSI2_PIXCLK__GPIO4_15, /* nReset */ | ||
104 | MX51_PAD_GPIO1_1__GPIO1_1, /* IRQ */ | ||
105 | MX51_PAD_GPIO1_4__GPIO1_4, /* Control signals */ | ||
106 | MX51_PAD_GPIO1_6__GPIO1_6, | ||
107 | MX51_PAD_GPIO1_7__GPIO1_7, | ||
108 | MX51_PAD_GPIO1_8__GPIO1_8, | ||
109 | MX51_PAD_GPIO1_9__GPIO1_9, | ||
110 | |||
111 | /* Touchscreen */ | ||
112 | /* IRQ */ | ||
113 | NEW_PAD_CTRL(MX51_PAD_GPIO_NAND__GPIO_NAND, PAD_CTL_PUS_22K_UP | | ||
114 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | | ||
115 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), | ||
116 | NEW_PAD_CTRL(MX51_PAD_NANDF_D8__GPIO4_0, PAD_CTL_PUS_22K_UP | | ||
117 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | | ||
118 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), | ||
119 | }; | ||
120 | |||
121 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
122 | .flags = IMXUART_HAVE_RTSCTS, | ||
123 | }; | ||
124 | |||
125 | static int tsc2007_get_pendown_state(void) | ||
126 | { | ||
127 | if (mx51_revision() < IMX_CHIP_REVISION_3_0) | ||
128 | return !gpio_get_value(TSC2007_IRQGPIO_REV2); | ||
129 | else | ||
130 | return !gpio_get_value(TSC2007_IRQGPIO_REV3); | ||
131 | } | ||
132 | |||
133 | static struct tsc2007_platform_data tsc2007_info = { | ||
134 | .model = 2007, | ||
135 | .x_plate_ohms = 180, | ||
136 | .get_pendown_state = tsc2007_get_pendown_state, | ||
137 | }; | ||
138 | |||
139 | static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = { | ||
140 | { | ||
141 | I2C_BOARD_INFO("pcf8563", 0x51), | ||
142 | }, { | ||
143 | I2C_BOARD_INFO("tsc2007", 0x49), | ||
144 | .platform_data = &tsc2007_info, | ||
145 | }, | ||
146 | }; | ||
147 | |||
148 | static const struct mxc_nand_platform_data | ||
149 | eukrea_cpuimx51sd_nand_board_info __initconst = { | ||
150 | .width = 1, | ||
151 | .hw_ecc = 1, | ||
152 | .flash_bbt = 1, | ||
153 | }; | ||
154 | |||
155 | /* This function is board specific as the bit mask for the plldiv will also | ||
156 | be different for other Freescale SoCs, thus a common bitmask is not | ||
157 | possible and cannot get place in /plat-mxc/ehci.c.*/ | ||
158 | static int initialize_otg_port(struct platform_device *pdev) | ||
159 | { | ||
160 | u32 v; | ||
161 | void __iomem *usb_base; | ||
162 | void __iomem *usbother_base; | ||
163 | |||
164 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); | ||
165 | if (!usb_base) | ||
166 | return -ENOMEM; | ||
167 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | ||
168 | |||
169 | /* Set the PHY clock to 19.2MHz */ | ||
170 | v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); | ||
171 | v &= ~MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK; | ||
172 | v |= MX51_USB_PLL_DIV_19_2_MHZ; | ||
173 | __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); | ||
174 | iounmap(usb_base); | ||
175 | |||
176 | mdelay(10); | ||
177 | |||
178 | return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY); | ||
179 | } | ||
180 | |||
181 | static int initialize_usbh1_port(struct platform_device *pdev) | ||
182 | { | ||
183 | u32 v; | ||
184 | void __iomem *usb_base; | ||
185 | void __iomem *usbother_base; | ||
186 | |||
187 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); | ||
188 | if (!usb_base) | ||
189 | return -ENOMEM; | ||
190 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | ||
191 | |||
192 | /* The clock for the USBH1 ULPI port will come from the PHY. */ | ||
193 | v = __raw_readl(usbother_base + MX51_USB_CTRL_1_OFFSET); | ||
194 | __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, | ||
195 | usbother_base + MX51_USB_CTRL_1_OFFSET); | ||
196 | iounmap(usb_base); | ||
197 | |||
198 | mdelay(10); | ||
199 | |||
200 | return mx51_initialize_usb_hw(1, MXC_EHCI_POWER_PINS_ENABLED | | ||
201 | MXC_EHCI_ITC_NO_THRESHOLD); | ||
202 | } | ||
203 | |||
204 | static const struct mxc_usbh_platform_data dr_utmi_config __initconst = { | ||
205 | .init = initialize_otg_port, | ||
206 | .portsc = MXC_EHCI_UTMI_16BIT, | ||
207 | }; | ||
208 | |||
209 | static const struct fsl_usb2_platform_data usb_pdata __initconst = { | ||
210 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
211 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, | ||
212 | }; | ||
213 | |||
214 | static const struct mxc_usbh_platform_data usbh1_config __initconst = { | ||
215 | .init = initialize_usbh1_port, | ||
216 | .portsc = MXC_EHCI_MODE_ULPI, | ||
217 | }; | ||
218 | |||
219 | static bool otg_mode_host __initdata; | ||
220 | |||
221 | static int __init eukrea_cpuimx51sd_otg_mode(char *options) | ||
222 | { | ||
223 | if (!strcmp(options, "host")) | ||
224 | otg_mode_host = true; | ||
225 | else if (!strcmp(options, "device")) | ||
226 | otg_mode_host = false; | ||
227 | else | ||
228 | pr_info("otg_mode neither \"host\" nor \"device\". " | ||
229 | "Defaulting to device\n"); | ||
230 | return 1; | ||
231 | } | ||
232 | __setup("otg_mode=", eukrea_cpuimx51sd_otg_mode); | ||
233 | |||
234 | static struct i2c_gpio_platform_data pdata = { | ||
235 | .sda_pin = I2C_SDA, | ||
236 | .sda_is_open_drain = 0, | ||
237 | .scl_pin = I2C_SCL, | ||
238 | .scl_is_open_drain = 0, | ||
239 | .udelay = 2, | ||
240 | }; | ||
241 | |||
242 | static struct platform_device hsi2c_gpio_device = { | ||
243 | .name = "i2c-gpio", | ||
244 | .id = 0, | ||
245 | .dev.platform_data = &pdata, | ||
246 | }; | ||
247 | |||
248 | static struct mcp251x_platform_data mcp251x_info = { | ||
249 | .oscillator_frequency = 24E6, | ||
250 | }; | ||
251 | |||
252 | static struct spi_board_info cpuimx51sd_spi_device[] = { | ||
253 | { | ||
254 | .modalias = "mcp2515", | ||
255 | .max_speed_hz = 10000000, | ||
256 | .bus_num = 0, | ||
257 | .mode = SPI_MODE_0, | ||
258 | .chip_select = 0, | ||
259 | .platform_data = &mcp251x_info, | ||
260 | /* irq number is run-time assigned */ | ||
261 | }, | ||
262 | }; | ||
263 | |||
264 | static int cpuimx51sd_spi1_cs[] = { | ||
265 | CAN_NCS, | ||
266 | }; | ||
267 | |||
268 | static const struct spi_imx_master cpuimx51sd_ecspi1_pdata __initconst = { | ||
269 | .chipselect = cpuimx51sd_spi1_cs, | ||
270 | .num_chipselect = ARRAY_SIZE(cpuimx51sd_spi1_cs), | ||
271 | }; | ||
272 | |||
273 | static struct platform_device *rev2_platform_devices[] __initdata = { | ||
274 | &hsi2c_gpio_device, | ||
275 | }; | ||
276 | |||
277 | static const struct imxi2c_platform_data cpuimx51sd_i2c_data __initconst = { | ||
278 | .bitrate = 100000, | ||
279 | }; | ||
280 | |||
281 | static void __init eukrea_cpuimx51sd_init(void) | ||
282 | { | ||
283 | imx51_soc_init(); | ||
284 | |||
285 | mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx51sd_pads, | ||
286 | ARRAY_SIZE(eukrea_cpuimx51sd_pads)); | ||
287 | |||
288 | #if defined(CONFIG_CPU_FREQ_IMX) | ||
289 | get_cpu_op = mx51_get_cpu_op; | ||
290 | #endif | ||
291 | |||
292 | imx51_add_imx_uart(0, &uart_pdata); | ||
293 | imx51_add_mxc_nand(&eukrea_cpuimx51sd_nand_board_info); | ||
294 | imx51_add_imx2_wdt(0); | ||
295 | |||
296 | gpio_request(ETH_RST, "eth_rst"); | ||
297 | gpio_set_value(ETH_RST, 1); | ||
298 | imx51_add_fec(NULL); | ||
299 | |||
300 | gpio_request(CAN_IRQGPIO, "can_irq"); | ||
301 | gpio_direction_input(CAN_IRQGPIO); | ||
302 | gpio_free(CAN_IRQGPIO); | ||
303 | gpio_request(CAN_NCS, "can_ncs"); | ||
304 | gpio_direction_output(CAN_NCS, 1); | ||
305 | gpio_free(CAN_NCS); | ||
306 | gpio_request(CAN_RST, "can_rst"); | ||
307 | gpio_direction_output(CAN_RST, 0); | ||
308 | msleep(20); | ||
309 | gpio_set_value(CAN_RST, 1); | ||
310 | imx51_add_ecspi(0, &cpuimx51sd_ecspi1_pdata); | ||
311 | cpuimx51sd_spi_device[0].irq = gpio_to_irq(CAN_IRQGPIO); | ||
312 | spi_register_board_info(cpuimx51sd_spi_device, | ||
313 | ARRAY_SIZE(cpuimx51sd_spi_device)); | ||
314 | |||
315 | if (mx51_revision() < IMX_CHIP_REVISION_3_0) { | ||
316 | eukrea_cpuimx51sd_i2c_devices[1].irq = | ||
317 | gpio_to_irq(TSC2007_IRQGPIO_REV2), | ||
318 | platform_add_devices(rev2_platform_devices, | ||
319 | ARRAY_SIZE(rev2_platform_devices)); | ||
320 | gpio_request(TSC2007_IRQGPIO_REV2, "tsc2007_irq"); | ||
321 | gpio_direction_input(TSC2007_IRQGPIO_REV2); | ||
322 | gpio_free(TSC2007_IRQGPIO_REV2); | ||
323 | } else { | ||
324 | eukrea_cpuimx51sd_i2c_devices[1].irq = | ||
325 | gpio_to_irq(TSC2007_IRQGPIO_REV3), | ||
326 | imx51_add_imx_i2c(0, &cpuimx51sd_i2c_data); | ||
327 | gpio_request(TSC2007_IRQGPIO_REV3, "tsc2007_irq"); | ||
328 | gpio_direction_input(TSC2007_IRQGPIO_REV3); | ||
329 | gpio_free(TSC2007_IRQGPIO_REV3); | ||
330 | } | ||
331 | |||
332 | i2c_register_board_info(0, eukrea_cpuimx51sd_i2c_devices, | ||
333 | ARRAY_SIZE(eukrea_cpuimx51sd_i2c_devices)); | ||
334 | |||
335 | if (otg_mode_host) | ||
336 | imx51_add_mxc_ehci_otg(&dr_utmi_config); | ||
337 | else { | ||
338 | initialize_otg_port(NULL); | ||
339 | imx51_add_fsl_usb2_udc(&usb_pdata); | ||
340 | } | ||
341 | |||
342 | gpio_request(USBH1_RST, "usb_rst"); | ||
343 | gpio_direction_output(USBH1_RST, 0); | ||
344 | msleep(20); | ||
345 | gpio_set_value(USBH1_RST, 1); | ||
346 | imx51_add_mxc_ehci_hs(1, &usbh1_config); | ||
347 | |||
348 | #ifdef CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD | ||
349 | eukrea_mbimxsd51_baseboard_init(); | ||
350 | #endif | ||
351 | } | ||
352 | |||
353 | static void __init eukrea_cpuimx51sd_timer_init(void) | ||
354 | { | ||
355 | mx51_clocks_init(32768, 24000000, 22579200, 0); | ||
356 | } | ||
357 | |||
358 | static struct sys_timer mxc_timer = { | ||
359 | .init = eukrea_cpuimx51sd_timer_init, | ||
360 | }; | ||
361 | |||
362 | MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD") | ||
363 | /* Maintainer: Eric Bénard <eric@eukrea.com> */ | ||
364 | .atag_offset = 0x100, | ||
365 | .map_io = mx51_map_io, | ||
366 | .init_early = imx51_init_early, | ||
367 | .init_irq = mx51_init_irq, | ||
368 | .handle_irq = imx51_handle_irq, | ||
369 | .timer = &mxc_timer, | ||
370 | .init_machine = eukrea_cpuimx51sd_init, | ||
371 | .init_late = imx51_init_late, | ||
372 | .restart = mxc_restart, | ||
373 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c index 75027a5ad8b..2442d5da883 100644 --- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c +++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c | |||
@@ -27,18 +27,18 @@ | |||
27 | #include <linux/usb/otg.h> | 27 | #include <linux/usb/otg.h> |
28 | #include <linux/usb/ulpi.h> | 28 | #include <linux/usb/ulpi.h> |
29 | 29 | ||
30 | #include <mach/eukrea-baseboards.h> | ||
31 | #include <mach/hardware.h> | ||
30 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/time.h> | 34 | #include <asm/mach/time.h> |
33 | #include <asm/memory.h> | 35 | #include <asm/memory.h> |
34 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
37 | #include <mach/common.h> | ||
38 | #include <mach/mx25.h> | ||
39 | #include <mach/iomux-mx25.h> | ||
35 | 40 | ||
36 | #include "common.h" | ||
37 | #include "devices-imx25.h" | 41 | #include "devices-imx25.h" |
38 | #include "eukrea-baseboards.h" | ||
39 | #include "hardware.h" | ||
40 | #include "iomux-mx25.h" | ||
41 | #include "mx25.h" | ||
42 | 42 | ||
43 | static const struct imxuart_platform_data uart_pdata __initconst = { | 43 | static const struct imxuart_platform_data uart_pdata __initconst = { |
44 | .flags = IMXUART_HAVE_RTSCTS, | 44 | .flags = IMXUART_HAVE_RTSCTS, |
@@ -106,21 +106,20 @@ static const struct mxc_usbh_platform_data usbh2_pdata __initconst = { | |||
106 | static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | 106 | static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { |
107 | .operating_mode = FSL_USB2_DR_DEVICE, | 107 | .operating_mode = FSL_USB2_DR_DEVICE, |
108 | .phy_mode = FSL_USB2_PHY_UTMI, | 108 | .phy_mode = FSL_USB2_PHY_UTMI, |
109 | .workaround = FLS_USB2_WORKAROUND_ENGCM09152, | ||
110 | }; | 109 | }; |
111 | 110 | ||
112 | static bool otg_mode_host __initdata; | 111 | static int otg_mode_host; |
113 | 112 | ||
114 | static int __init eukrea_cpuimx25_otg_mode(char *options) | 113 | static int __init eukrea_cpuimx25_otg_mode(char *options) |
115 | { | 114 | { |
116 | if (!strcmp(options, "host")) | 115 | if (!strcmp(options, "host")) |
117 | otg_mode_host = true; | 116 | otg_mode_host = 1; |
118 | else if (!strcmp(options, "device")) | 117 | else if (!strcmp(options, "device")) |
119 | otg_mode_host = false; | 118 | otg_mode_host = 0; |
120 | else | 119 | else |
121 | pr_info("otg_mode neither \"host\" nor \"device\". " | 120 | pr_info("otg_mode neither \"host\" nor \"device\". " |
122 | "Defaulting to device\n"); | 121 | "Defaulting to device\n"); |
123 | return 1; | 122 | return 0; |
124 | } | 123 | } |
125 | __setup("otg_mode=", eukrea_cpuimx25_otg_mode); | 124 | __setup("otg_mode=", eukrea_cpuimx25_otg_mode); |
126 | 125 | ||
@@ -134,9 +133,8 @@ static void __init eukrea_cpuimx25_init(void) | |||
134 | 133 | ||
135 | imx25_add_imx_uart0(&uart_pdata); | 134 | imx25_add_imx_uart0(&uart_pdata); |
136 | imx25_add_mxc_nand(&eukrea_cpuimx25_nand_board_info); | 135 | imx25_add_mxc_nand(&eukrea_cpuimx25_nand_board_info); |
137 | imx25_add_imxdi_rtc(); | 136 | imx25_add_imxdi_rtc(NULL); |
138 | imx25_add_fec(&mx25_fec_pdata); | 137 | imx25_add_fec(&mx25_fec_pdata); |
139 | imx25_add_imx2_wdt(); | ||
140 | 138 | ||
141 | i2c_register_board_info(0, eukrea_cpuimx25_i2c_devices, | 139 | i2c_register_board_info(0, eukrea_cpuimx25_i2c_devices, |
142 | ARRAY_SIZE(eukrea_cpuimx25_i2c_devices)); | 140 | ARRAY_SIZE(eukrea_cpuimx25_i2c_devices)); |
@@ -165,12 +163,10 @@ static struct sys_timer eukrea_cpuimx25_timer = { | |||
165 | 163 | ||
166 | MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25") | 164 | MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25") |
167 | /* Maintainer: Eukrea Electromatique */ | 165 | /* Maintainer: Eukrea Electromatique */ |
168 | .atag_offset = 0x100, | 166 | .boot_params = MX25_PHYS_OFFSET + 0x100, |
169 | .map_io = mx25_map_io, | 167 | .map_io = mx25_map_io, |
170 | .init_early = imx25_init_early, | 168 | .init_early = imx25_init_early, |
171 | .init_irq = mx25_init_irq, | 169 | .init_irq = mx25_init_irq, |
172 | .handle_irq = imx25_handle_irq, | ||
173 | .timer = &eukrea_cpuimx25_timer, | 170 | .timer = &eukrea_cpuimx25_timer, |
174 | .init_machine = eukrea_cpuimx25_init, | 171 | .init_machine = eukrea_cpuimx25_init, |
175 | .restart = mxc_restart, | ||
176 | MACHINE_END | 172 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index 318bd8df7fc..6778f8193bc 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -30,43 +30,17 @@ | |||
30 | #include <linux/input.h> | 30 | #include <linux/input.h> |
31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/dma-mapping.h> | ||
34 | #include <linux/leds.h> | ||
35 | #include <linux/platform_data/asoc-mx27vis.h> | ||
36 | #include <media/soc_camera.h> | ||
37 | #include <sound/tlv320aic32x4.h> | 33 | #include <sound/tlv320aic32x4.h> |
38 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
39 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/time.h> | 36 | #include <asm/mach/time.h> |
41 | #include <asm/system_info.h> | 37 | #include <mach/common.h> |
42 | #include <asm/memblock.h> | 38 | #include <mach/iomux-mx27.h> |
43 | 39 | ||
44 | #include "common.h" | ||
45 | #include "devices-imx27.h" | 40 | #include "devices-imx27.h" |
46 | #include "hardware.h" | ||
47 | #include "iomux-mx27.h" | ||
48 | 41 | ||
49 | #define TVP5150_RSTN (GPIO_PORTC + 18) | ||
50 | #define TVP5150_PWDN (GPIO_PORTC + 19) | ||
51 | #define OTG_PHY_CS_GPIO (GPIO_PORTF + 17) | 42 | #define OTG_PHY_CS_GPIO (GPIO_PORTF + 17) |
52 | #define SDHC1_IRQ_GPIO IMX_GPIO_NR(2, 25) | 43 | #define SDHC1_IRQ IRQ_GPIOB(25) |
53 | |||
54 | #define VERSION_MASK 0x7 | ||
55 | #define MOTHERBOARD_SHIFT 4 | ||
56 | #define EXPBOARD_SHIFT 0 | ||
57 | |||
58 | #define MOTHERBOARD_BIT2 (GPIO_PORTD + 31) | ||
59 | #define MOTHERBOARD_BIT1 (GPIO_PORTD + 30) | ||
60 | #define MOTHERBOARD_BIT0 (GPIO_PORTD + 29) | ||
61 | |||
62 | #define EXPBOARD_BIT2 (GPIO_PORTD + 25) | ||
63 | #define EXPBOARD_BIT1 (GPIO_PORTD + 27) | ||
64 | #define EXPBOARD_BIT0 (GPIO_PORTD + 28) | ||
65 | |||
66 | #define AMP_GAIN_0 (GPIO_PORTF + 9) | ||
67 | #define AMP_GAIN_1 (GPIO_PORTF + 8) | ||
68 | #define AMP_MUTE_SDL (GPIO_PORTE + 5) | ||
69 | #define AMP_MUTE_SDR (GPIO_PORTF + 7) | ||
70 | 44 | ||
71 | static const int visstrim_m10_pins[] __initconst = { | 45 | static const int visstrim_m10_pins[] __initconst = { |
72 | /* UART1 (console) */ | 46 | /* UART1 (console) */ |
@@ -126,152 +100,8 @@ static const int visstrim_m10_pins[] __initconst = { | |||
126 | PE1_PF_USBOTG_STP, | 100 | PE1_PF_USBOTG_STP, |
127 | PB23_PF_USB_PWR, | 101 | PB23_PF_USB_PWR, |
128 | PB24_PF_USB_OC, | 102 | PB24_PF_USB_OC, |
129 | /* CSI */ | ||
130 | TVP5150_RSTN | GPIO_GPIO | GPIO_OUT, | ||
131 | TVP5150_PWDN | GPIO_GPIO | GPIO_OUT, | ||
132 | PB10_PF_CSI_D0, | ||
133 | PB11_PF_CSI_D1, | ||
134 | PB12_PF_CSI_D2, | ||
135 | PB13_PF_CSI_D3, | ||
136 | PB14_PF_CSI_D4, | ||
137 | PB15_PF_CSI_MCLK, | ||
138 | PB16_PF_CSI_PIXCLK, | ||
139 | PB17_PF_CSI_D5, | ||
140 | PB18_PF_CSI_D6, | ||
141 | PB19_PF_CSI_D7, | ||
142 | PB20_PF_CSI_VSYNC, | ||
143 | PB21_PF_CSI_HSYNC, | ||
144 | /* mother board version */ | ||
145 | MOTHERBOARD_BIT2 | GPIO_GPIO | GPIO_IN | GPIO_PUEN, | ||
146 | MOTHERBOARD_BIT1 | GPIO_GPIO | GPIO_IN | GPIO_PUEN, | ||
147 | MOTHERBOARD_BIT0 | GPIO_GPIO | GPIO_IN | GPIO_PUEN, | ||
148 | /* expansion board version */ | ||
149 | EXPBOARD_BIT2 | GPIO_GPIO | GPIO_IN | GPIO_PUEN, | ||
150 | EXPBOARD_BIT1 | GPIO_GPIO | GPIO_IN | GPIO_PUEN, | ||
151 | EXPBOARD_BIT0 | GPIO_GPIO | GPIO_IN | GPIO_PUEN, | ||
152 | /* Audio AMP control */ | ||
153 | AMP_GAIN_0 | GPIO_GPIO | GPIO_OUT, | ||
154 | AMP_GAIN_1 | GPIO_GPIO | GPIO_OUT, | ||
155 | AMP_MUTE_SDL | GPIO_GPIO | GPIO_OUT, | ||
156 | AMP_MUTE_SDR | GPIO_GPIO | GPIO_OUT, | ||
157 | }; | ||
158 | |||
159 | static struct gpio visstrim_m10_version_gpios[] = { | ||
160 | { EXPBOARD_BIT0, GPIOF_IN, "exp-version-0" }, | ||
161 | { EXPBOARD_BIT1, GPIOF_IN, "exp-version-1" }, | ||
162 | { EXPBOARD_BIT2, GPIOF_IN, "exp-version-2" }, | ||
163 | { MOTHERBOARD_BIT0, GPIOF_IN, "mother-version-0" }, | ||
164 | { MOTHERBOARD_BIT1, GPIOF_IN, "mother-version-1" }, | ||
165 | { MOTHERBOARD_BIT2, GPIOF_IN, "mother-version-2" }, | ||
166 | }; | ||
167 | |||
168 | static const struct gpio visstrim_m10_gpios[] __initconst = { | ||
169 | { | ||
170 | .gpio = TVP5150_RSTN, | ||
171 | .flags = GPIOF_DIR_OUT | GPIOF_INIT_HIGH, | ||
172 | .label = "tvp5150_rstn", | ||
173 | }, | ||
174 | { | ||
175 | .gpio = TVP5150_PWDN, | ||
176 | .flags = GPIOF_DIR_OUT | GPIOF_INIT_LOW, | ||
177 | .label = "tvp5150_pwdn", | ||
178 | }, | ||
179 | { | ||
180 | .gpio = OTG_PHY_CS_GPIO, | ||
181 | .flags = GPIOF_DIR_OUT | GPIOF_INIT_LOW, | ||
182 | .label = "usbotg_cs", | ||
183 | }, | ||
184 | { | ||
185 | .gpio = AMP_GAIN_0, | ||
186 | .flags = GPIOF_DIR_OUT, | ||
187 | .label = "amp-gain-0", | ||
188 | }, | ||
189 | { | ||
190 | .gpio = AMP_GAIN_1, | ||
191 | .flags = GPIOF_DIR_OUT, | ||
192 | .label = "amp-gain-1", | ||
193 | }, | ||
194 | { | ||
195 | .gpio = AMP_MUTE_SDL, | ||
196 | .flags = GPIOF_DIR_OUT, | ||
197 | .label = "amp-mute-sdl", | ||
198 | }, | ||
199 | { | ||
200 | .gpio = AMP_MUTE_SDR, | ||
201 | .flags = GPIOF_DIR_OUT, | ||
202 | .label = "amp-mute-sdr", | ||
203 | }, | ||
204 | }; | ||
205 | |||
206 | /* Camera */ | ||
207 | static int visstrim_camera_power(struct device *dev, int on) | ||
208 | { | ||
209 | gpio_set_value(TVP5150_PWDN, on); | ||
210 | |||
211 | return 0; | ||
212 | }; | ||
213 | |||
214 | static int visstrim_camera_reset(struct device *dev) | ||
215 | { | ||
216 | gpio_set_value(TVP5150_RSTN, 0); | ||
217 | ndelay(500); | ||
218 | gpio_set_value(TVP5150_RSTN, 1); | ||
219 | |||
220 | return 0; | ||
221 | }; | ||
222 | |||
223 | static struct i2c_board_info visstrim_i2c_camera = { | ||
224 | I2C_BOARD_INFO("tvp5150", 0x5d), | ||
225 | }; | 103 | }; |
226 | 104 | ||
227 | static struct soc_camera_link iclink_tvp5150 = { | ||
228 | .bus_id = 0, | ||
229 | .board_info = &visstrim_i2c_camera, | ||
230 | .i2c_adapter_id = 0, | ||
231 | .power = visstrim_camera_power, | ||
232 | .reset = visstrim_camera_reset, | ||
233 | }; | ||
234 | |||
235 | static struct mx2_camera_platform_data visstrim_camera = { | ||
236 | .flags = MX2_CAMERA_CCIR | MX2_CAMERA_CCIR_INTERLACE | | ||
237 | MX2_CAMERA_PCLK_SAMPLE_RISING, | ||
238 | .clk = 100000, | ||
239 | }; | ||
240 | |||
241 | static phys_addr_t mx2_camera_base __initdata; | ||
242 | #define MX2_CAMERA_BUF_SIZE SZ_8M | ||
243 | |||
244 | static void __init visstrim_analog_camera_init(void) | ||
245 | { | ||
246 | struct platform_device *pdev; | ||
247 | int dma; | ||
248 | |||
249 | gpio_set_value(TVP5150_PWDN, 1); | ||
250 | ndelay(1); | ||
251 | gpio_set_value(TVP5150_RSTN, 0); | ||
252 | ndelay(500); | ||
253 | gpio_set_value(TVP5150_RSTN, 1); | ||
254 | ndelay(200000); | ||
255 | |||
256 | pdev = imx27_add_mx2_camera(&visstrim_camera); | ||
257 | if (IS_ERR(pdev)) | ||
258 | return; | ||
259 | |||
260 | dma = dma_declare_coherent_memory(&pdev->dev, | ||
261 | mx2_camera_base, mx2_camera_base, | ||
262 | MX2_CAMERA_BUF_SIZE, | ||
263 | DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); | ||
264 | if (!(dma & DMA_MEMORY_MAP)) | ||
265 | return; | ||
266 | } | ||
267 | |||
268 | static void __init visstrim_reserve(void) | ||
269 | { | ||
270 | /* reserve 4 MiB for mx2-camera */ | ||
271 | mx2_camera_base = arm_memblock_steal(3 * MX2_CAMERA_BUF_SIZE, | ||
272 | MX2_CAMERA_BUF_SIZE); | ||
273 | } | ||
274 | |||
275 | /* GPIOs used as events for applications */ | 105 | /* GPIOs used as events for applications */ |
276 | static struct gpio_keys_button visstrim_gpio_keys[] = { | 106 | static struct gpio_keys_button visstrim_gpio_keys[] = { |
277 | { | 107 | { |
@@ -306,49 +136,20 @@ static const struct gpio_keys_platform_data | |||
306 | .nbuttons = ARRAY_SIZE(visstrim_gpio_keys), | 136 | .nbuttons = ARRAY_SIZE(visstrim_gpio_keys), |
307 | }; | 137 | }; |
308 | 138 | ||
309 | /* led */ | ||
310 | static const struct gpio_led visstrim_m10_leds[] __initconst = { | ||
311 | { | ||
312 | .name = "visstrim:ld0", | ||
313 | .default_trigger = "nand-disk", | ||
314 | .gpio = (GPIO_PORTC + 29), | ||
315 | }, | ||
316 | { | ||
317 | .name = "visstrim:ld1", | ||
318 | .default_trigger = "nand-disk", | ||
319 | .gpio = (GPIO_PORTC + 24), | ||
320 | }, | ||
321 | { | ||
322 | .name = "visstrim:ld2", | ||
323 | .default_trigger = "nand-disk", | ||
324 | .gpio = (GPIO_PORTC + 28), | ||
325 | }, | ||
326 | { | ||
327 | .name = "visstrim:ld3", | ||
328 | .default_trigger = "nand-disk", | ||
329 | .gpio = (GPIO_PORTC + 25), | ||
330 | }, | ||
331 | }; | ||
332 | |||
333 | static const struct gpio_led_platform_data visstrim_m10_led_data __initconst = { | ||
334 | .leds = visstrim_m10_leds, | ||
335 | .num_leds = ARRAY_SIZE(visstrim_m10_leds), | ||
336 | }; | ||
337 | |||
338 | /* Visstrim_SM10 has a microSD slot connected to sdhc1 */ | 139 | /* Visstrim_SM10 has a microSD slot connected to sdhc1 */ |
339 | static int visstrim_m10_sdhc1_init(struct device *dev, | 140 | static int visstrim_m10_sdhc1_init(struct device *dev, |
340 | irq_handler_t detect_irq, void *data) | 141 | irq_handler_t detect_irq, void *data) |
341 | { | 142 | { |
342 | int ret; | 143 | int ret; |
343 | 144 | ||
344 | ret = request_irq(gpio_to_irq(SDHC1_IRQ_GPIO), detect_irq, | 145 | ret = request_irq(SDHC1_IRQ, detect_irq, IRQF_TRIGGER_FALLING, |
345 | IRQF_TRIGGER_FALLING, "mmc-detect", data); | 146 | "mmc-detect", data); |
346 | return ret; | 147 | return ret; |
347 | } | 148 | } |
348 | 149 | ||
349 | static void visstrim_m10_sdhc1_exit(struct device *dev, void *data) | 150 | static void visstrim_m10_sdhc1_exit(struct device *dev, void *data) |
350 | { | 151 | { |
351 | free_irq(gpio_to_irq(SDHC1_IRQ_GPIO), data); | 152 | free_irq(SDHC1_IRQ, data); |
352 | } | 153 | } |
353 | 154 | ||
354 | static const struct imxmmc_platform_data visstrim_m10_sdhc_pdata __initconst = { | 155 | static const struct imxmmc_platform_data visstrim_m10_sdhc_pdata __initconst = { |
@@ -415,15 +216,16 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = { | |||
415 | { | 216 | { |
416 | I2C_BOARD_INFO("tlv320aic32x4", 0x18), | 217 | I2C_BOARD_INFO("tlv320aic32x4", 0x18), |
417 | .platform_data = &visstrim_m10_aic32x4_pdata, | 218 | .platform_data = &visstrim_m10_aic32x4_pdata, |
418 | }, | ||
419 | { | ||
420 | I2C_BOARD_INFO("m41t00", 0x68), | ||
421 | } | 219 | } |
422 | }; | 220 | }; |
423 | 221 | ||
424 | /* USB OTG */ | 222 | /* USB OTG */ |
425 | static int otg_phy_init(struct platform_device *pdev) | 223 | static int otg_phy_init(struct platform_device *pdev) |
426 | { | 224 | { |
225 | gpio_set_value(OTG_PHY_CS_GPIO, 0); | ||
226 | |||
227 | mdelay(10); | ||
228 | |||
427 | return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED); | 229 | return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED); |
428 | } | 230 | } |
429 | 231 | ||
@@ -438,159 +240,29 @@ static const struct imx_ssi_platform_data visstrim_m10_ssi_pdata __initconst = { | |||
438 | .flags = IMX_SSI_DMA | IMX_SSI_SYN, | 240 | .flags = IMX_SSI_DMA | IMX_SSI_SYN, |
439 | }; | 241 | }; |
440 | 242 | ||
441 | /* coda */ | ||
442 | |||
443 | static void __init visstrim_coda_init(void) | ||
444 | { | ||
445 | struct platform_device *pdev; | ||
446 | int dma; | ||
447 | |||
448 | pdev = imx27_add_coda(); | ||
449 | dma = dma_declare_coherent_memory(&pdev->dev, | ||
450 | mx2_camera_base + MX2_CAMERA_BUF_SIZE, | ||
451 | mx2_camera_base + MX2_CAMERA_BUF_SIZE, | ||
452 | MX2_CAMERA_BUF_SIZE, | ||
453 | DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); | ||
454 | if (!(dma & DMA_MEMORY_MAP)) | ||
455 | return; | ||
456 | } | ||
457 | |||
458 | /* DMA deinterlace */ | ||
459 | static struct platform_device visstrim_deinterlace = { | ||
460 | .name = "m2m-deinterlace", | ||
461 | .id = 0, | ||
462 | }; | ||
463 | |||
464 | static void __init visstrim_deinterlace_init(void) | ||
465 | { | ||
466 | int ret = -ENOMEM; | ||
467 | struct platform_device *pdev = &visstrim_deinterlace; | ||
468 | int dma; | ||
469 | |||
470 | ret = platform_device_register(pdev); | ||
471 | |||
472 | dma = dma_declare_coherent_memory(&pdev->dev, | ||
473 | mx2_camera_base + 2 * MX2_CAMERA_BUF_SIZE, | ||
474 | mx2_camera_base + 2 * MX2_CAMERA_BUF_SIZE, | ||
475 | MX2_CAMERA_BUF_SIZE, | ||
476 | DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); | ||
477 | if (!(dma & DMA_MEMORY_MAP)) | ||
478 | return; | ||
479 | } | ||
480 | |||
481 | /* Emma-PrP for format conversion */ | ||
482 | static void __init visstrim_emmaprp_init(void) | ||
483 | { | ||
484 | struct platform_device *pdev; | ||
485 | int dma; | ||
486 | |||
487 | pdev = imx27_add_mx2_emmaprp(); | ||
488 | if (IS_ERR(pdev)) | ||
489 | return; | ||
490 | |||
491 | /* | ||
492 | * Use the same memory area as the analog camera since both | ||
493 | * devices are, by nature, exclusive. | ||
494 | */ | ||
495 | dma = dma_declare_coherent_memory(&pdev->dev, | ||
496 | mx2_camera_base, mx2_camera_base, | ||
497 | MX2_CAMERA_BUF_SIZE, | ||
498 | DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); | ||
499 | if (!(dma & DMA_MEMORY_MAP)) | ||
500 | pr_err("Failed to declare memory for emmaprp\n"); | ||
501 | } | ||
502 | |||
503 | /* Audio */ | ||
504 | static const struct snd_mx27vis_platform_data snd_mx27vis_pdata __initconst = { | ||
505 | .amp_gain0_gpio = AMP_GAIN_0, | ||
506 | .amp_gain1_gpio = AMP_GAIN_1, | ||
507 | .amp_mutel_gpio = AMP_MUTE_SDL, | ||
508 | .amp_muter_gpio = AMP_MUTE_SDR, | ||
509 | }; | ||
510 | |||
511 | static void __init visstrim_m10_revision(void) | ||
512 | { | ||
513 | int exp_version = 0; | ||
514 | int mo_version = 0; | ||
515 | int ret; | ||
516 | |||
517 | ret = gpio_request_array(visstrim_m10_version_gpios, | ||
518 | ARRAY_SIZE(visstrim_m10_version_gpios)); | ||
519 | if (ret) { | ||
520 | pr_err("Failed to request version gpios"); | ||
521 | return; | ||
522 | } | ||
523 | |||
524 | /* Get expansion board version (negative logic) */ | ||
525 | exp_version |= !gpio_get_value(EXPBOARD_BIT2) << 2; | ||
526 | exp_version |= !gpio_get_value(EXPBOARD_BIT1) << 1; | ||
527 | exp_version |= !gpio_get_value(EXPBOARD_BIT0); | ||
528 | |||
529 | /* Get mother board version (negative logic) */ | ||
530 | mo_version |= !gpio_get_value(MOTHERBOARD_BIT2) << 2; | ||
531 | mo_version |= !gpio_get_value(MOTHERBOARD_BIT1) << 1; | ||
532 | mo_version |= !gpio_get_value(MOTHERBOARD_BIT0); | ||
533 | |||
534 | system_rev = 0x27000; | ||
535 | system_rev |= (mo_version << MOTHERBOARD_SHIFT); | ||
536 | system_rev |= (exp_version << EXPBOARD_SHIFT); | ||
537 | } | ||
538 | |||
539 | static void __init visstrim_m10_board_init(void) | 243 | static void __init visstrim_m10_board_init(void) |
540 | { | 244 | { |
541 | int ret; | 245 | int ret; |
542 | int mo_version; | ||
543 | 246 | ||
544 | imx27_soc_init(); | 247 | imx27_soc_init(); |
545 | visstrim_m10_revision(); | ||
546 | 248 | ||
547 | ret = mxc_gpio_setup_multiple_pins(visstrim_m10_pins, | 249 | ret = mxc_gpio_setup_multiple_pins(visstrim_m10_pins, |
548 | ARRAY_SIZE(visstrim_m10_pins), "VISSTRIM_M10"); | 250 | ARRAY_SIZE(visstrim_m10_pins), "VISSTRIM_M10"); |
549 | if (ret) | 251 | if (ret) |
550 | pr_err("Failed to setup pins (%d)\n", ret); | 252 | pr_err("Failed to setup pins (%d)\n", ret); |
551 | 253 | ||
552 | ret = gpio_request_array(visstrim_m10_gpios, | ||
553 | ARRAY_SIZE(visstrim_m10_gpios)); | ||
554 | if (ret) | ||
555 | pr_err("Failed to request gpios (%d)\n", ret); | ||
556 | |||
557 | imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata); | 254 | imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata); |
558 | imx27_add_imx_uart0(&uart_pdata); | 255 | imx27_add_imx_uart0(&uart_pdata); |
559 | 256 | ||
560 | imx27_add_imx_i2c(0, &visstrim_m10_i2c_data); | ||
561 | imx27_add_imx_i2c(1, &visstrim_m10_i2c_data); | ||
562 | i2c_register_board_info(0, visstrim_m10_i2c_devices, | 257 | i2c_register_board_info(0, visstrim_m10_i2c_devices, |
563 | ARRAY_SIZE(visstrim_m10_i2c_devices)); | 258 | ARRAY_SIZE(visstrim_m10_i2c_devices)); |
564 | 259 | imx27_add_imx_i2c(0, &visstrim_m10_i2c_data); | |
260 | imx27_add_imx_i2c(1, &visstrim_m10_i2c_data); | ||
565 | imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata); | 261 | imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata); |
566 | imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata); | 262 | imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata); |
567 | imx27_add_fec(NULL); | 263 | imx27_add_fec(NULL); |
568 | imx_add_gpio_keys(&visstrim_gpio_keys_platform_data); | 264 | imx_add_gpio_keys(&visstrim_gpio_keys_platform_data); |
569 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 265 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
570 | imx_add_platform_device("mx27vis", 0, NULL, 0, &snd_mx27vis_pdata, | ||
571 | sizeof(snd_mx27vis_pdata)); | ||
572 | platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0, | ||
573 | &iclink_tvp5150, sizeof(iclink_tvp5150)); | ||
574 | gpio_led_register_device(0, &visstrim_m10_led_data); | ||
575 | |||
576 | /* Use mother board version to decide what video devices we shall use */ | ||
577 | mo_version = (system_rev >> MOTHERBOARD_SHIFT) & VERSION_MASK; | ||
578 | if (mo_version & 0x1) { | ||
579 | visstrim_emmaprp_init(); | ||
580 | |||
581 | /* | ||
582 | * Despite not being used, tvp5150 must be | ||
583 | * powered on to avoid I2C problems. To minimize | ||
584 | * power consupmtion keep reset enabled. | ||
585 | */ | ||
586 | gpio_set_value(TVP5150_PWDN, 1); | ||
587 | ndelay(1); | ||
588 | gpio_set_value(TVP5150_RSTN, 0); | ||
589 | } else { | ||
590 | visstrim_deinterlace_init(); | ||
591 | visstrim_analog_camera_init(); | ||
592 | } | ||
593 | visstrim_coda_init(); | ||
594 | } | 266 | } |
595 | 267 | ||
596 | static void __init visstrim_m10_timer_init(void) | 268 | static void __init visstrim_m10_timer_init(void) |
@@ -603,13 +275,10 @@ static struct sys_timer visstrim_m10_timer = { | |||
603 | }; | 275 | }; |
604 | 276 | ||
605 | MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") | 277 | MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") |
606 | .atag_offset = 0x100, | 278 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
607 | .reserve = visstrim_reserve, | ||
608 | .map_io = mx27_map_io, | 279 | .map_io = mx27_map_io, |
609 | .init_early = imx27_init_early, | 280 | .init_early = imx27_init_early, |
610 | .init_irq = mx27_init_irq, | 281 | .init_irq = mx27_init_irq, |
611 | .handle_irq = imx27_handle_irq, | ||
612 | .timer = &visstrim_m10_timer, | 282 | .timer = &visstrim_m10_timer, |
613 | .init_machine = visstrim_m10_board_init, | 283 | .init_machine = visstrim_m10_board_init, |
614 | .restart = mxc_restart, | ||
615 | MACHINE_END | 284 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c index 53a86011293..272f793e924 100644 --- a/arch/arm/mach-imx/mach-imx27ipcam.c +++ b/arch/arm/mach-imx/mach-imx27ipcam.c | |||
@@ -17,11 +17,11 @@ | |||
17 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
18 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
19 | #include <asm/mach/time.h> | 19 | #include <asm/mach/time.h> |
20 | #include <mach/hardware.h> | ||
21 | #include <mach/common.h> | ||
22 | #include <mach/iomux-mx27.h> | ||
20 | 23 | ||
21 | #include "hardware.h" | ||
22 | #include "common.h" | ||
23 | #include "devices-imx27.h" | 24 | #include "devices-imx27.h" |
24 | #include "iomux-mx27.h" | ||
25 | 25 | ||
26 | static const int mx27ipcam_pins[] __initconst = { | 26 | static const int mx27ipcam_pins[] __initconst = { |
27 | /* UART1 */ | 27 | /* UART1 */ |
@@ -57,7 +57,7 @@ static void __init mx27ipcam_init(void) | |||
57 | 57 | ||
58 | imx27_add_imx_uart0(NULL); | 58 | imx27_add_imx_uart0(NULL); |
59 | imx27_add_fec(NULL); | 59 | imx27_add_fec(NULL); |
60 | imx27_add_imx2_wdt(); | 60 | imx27_add_imx2_wdt(NULL); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void __init mx27ipcam_timer_init(void) | 63 | static void __init mx27ipcam_timer_init(void) |
@@ -71,12 +71,10 @@ static struct sys_timer mx27ipcam_timer = { | |||
71 | 71 | ||
72 | MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM") | 72 | MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM") |
73 | /* maintainer: Freescale Semiconductor, Inc. */ | 73 | /* maintainer: Freescale Semiconductor, Inc. */ |
74 | .atag_offset = 0x100, | 74 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
75 | .map_io = mx27_map_io, | 75 | .map_io = mx27_map_io, |
76 | .init_early = imx27_init_early, | 76 | .init_early = imx27_init_early, |
77 | .init_irq = mx27_init_irq, | 77 | .init_irq = mx27_init_irq, |
78 | .handle_irq = imx27_handle_irq, | ||
79 | .timer = &mx27ipcam_timer, | 78 | .timer = &mx27ipcam_timer, |
80 | .init_machine = mx27ipcam_init, | 79 | .init_machine = mx27ipcam_init, |
81 | .restart = mxc_restart, | ||
82 | MACHINE_END | 80 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c index fc8dce93137..d81a769fe89 100644 --- a/arch/arm/mach-imx/mach-imx27lite.c +++ b/arch/arm/mach-imx/mach-imx27lite.c | |||
@@ -20,11 +20,11 @@ | |||
20 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
21 | #include <asm/mach/time.h> | 21 | #include <asm/mach/time.h> |
22 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
23 | #include <mach/hardware.h> | ||
24 | #include <mach/common.h> | ||
25 | #include <mach/iomux-mx27.h> | ||
23 | 26 | ||
24 | #include "common.h" | ||
25 | #include "devices-imx27.h" | 27 | #include "devices-imx27.h" |
26 | #include "hardware.h" | ||
27 | #include "iomux-mx27.h" | ||
28 | 28 | ||
29 | static const int mx27lite_pins[] __initconst = { | 29 | static const int mx27lite_pins[] __initconst = { |
30 | /* UART1 */ | 30 | /* UART1 */ |
@@ -77,12 +77,10 @@ static struct sys_timer mx27lite_timer = { | |||
77 | }; | 77 | }; |
78 | 78 | ||
79 | MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") | 79 | MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") |
80 | .atag_offset = 0x100, | 80 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
81 | .map_io = mx27_map_io, | 81 | .map_io = mx27_map_io, |
82 | .init_early = imx27_init_early, | 82 | .init_early = imx27_init_early, |
83 | .init_irq = mx27_init_irq, | 83 | .init_irq = mx27_init_irq, |
84 | .handle_irq = imx27_handle_irq, | ||
85 | .timer = &mx27lite_timer, | 84 | .timer = &mx27lite_timer, |
86 | .init_machine = mx27lite_init, | 85 | .init_machine = mx27lite_init, |
87 | .restart = mxc_restart, | ||
88 | MACHINE_END | 86 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c deleted file mode 100644 index 860284dea0e..00000000000 --- a/arch/arm/mach-imx/mach-imx53.c +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/clk.h> | ||
14 | #include <linux/clkdev.h> | ||
15 | #include <linux/err.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/irq.h> | ||
18 | #include <linux/of_irq.h> | ||
19 | #include <linux/of_platform.h> | ||
20 | #include <asm/mach/arch.h> | ||
21 | #include <asm/mach/time.h> | ||
22 | |||
23 | #include "common.h" | ||
24 | #include "mx53.h" | ||
25 | |||
26 | static void __init imx53_qsb_init(void) | ||
27 | { | ||
28 | struct clk *clk; | ||
29 | |||
30 | clk = clk_get_sys(NULL, "ssi_ext1"); | ||
31 | if (IS_ERR(clk)) { | ||
32 | pr_err("failed to get clk ssi_ext1\n"); | ||
33 | return; | ||
34 | } | ||
35 | |||
36 | clk_register_clkdev(clk, NULL, "0-000a"); | ||
37 | } | ||
38 | |||
39 | static void __init imx53_dt_init(void) | ||
40 | { | ||
41 | if (of_machine_is_compatible("fsl,imx53-qsb")) | ||
42 | imx53_qsb_init(); | ||
43 | |||
44 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
45 | } | ||
46 | |||
47 | static void __init imx53_timer_init(void) | ||
48 | { | ||
49 | mx53_clocks_init_dt(); | ||
50 | } | ||
51 | |||
52 | static struct sys_timer imx53_timer = { | ||
53 | .init = imx53_timer_init, | ||
54 | }; | ||
55 | |||
56 | static const char *imx53_dt_board_compat[] __initdata = { | ||
57 | "fsl,imx53", | ||
58 | NULL | ||
59 | }; | ||
60 | |||
61 | DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") | ||
62 | .map_io = mx53_map_io, | ||
63 | .init_early = imx53_init_early, | ||
64 | .init_irq = mx53_init_irq, | ||
65 | .handle_irq = imx53_handle_irq, | ||
66 | .timer = &imx53_timer, | ||
67 | .init_machine = imx53_dt_init, | ||
68 | .init_late = imx53_init_late, | ||
69 | .dt_compat = imx53_dt_board_compat, | ||
70 | .restart = mxc_restart, | ||
71 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c deleted file mode 100644 index 4eb1b3ac794..00000000000 --- a/arch/arm/mach-imx/mach-imx6q.c +++ /dev/null | |||
@@ -1,263 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/clk.h> | ||
14 | #include <linux/clkdev.h> | ||
15 | #include <linux/cpuidle.h> | ||
16 | #include <linux/delay.h> | ||
17 | #include <linux/export.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <linux/irq.h> | ||
21 | #include <linux/of.h> | ||
22 | #include <linux/of_address.h> | ||
23 | #include <linux/of_irq.h> | ||
24 | #include <linux/of_platform.h> | ||
25 | #include <linux/phy.h> | ||
26 | #include <linux/regmap.h> | ||
27 | #include <linux/micrel_phy.h> | ||
28 | #include <linux/mfd/syscon.h> | ||
29 | #include <asm/cpuidle.h> | ||
30 | #include <asm/smp_twd.h> | ||
31 | #include <asm/hardware/cache-l2x0.h> | ||
32 | #include <asm/hardware/gic.h> | ||
33 | #include <asm/mach/arch.h> | ||
34 | #include <asm/mach/time.h> | ||
35 | #include <asm/system_misc.h> | ||
36 | |||
37 | #include "common.h" | ||
38 | #include "cpuidle.h" | ||
39 | #include "hardware.h" | ||
40 | |||
41 | #define IMX6Q_ANALOG_DIGPROG 0x260 | ||
42 | |||
43 | static int imx6q_revision(void) | ||
44 | { | ||
45 | struct device_node *np; | ||
46 | void __iomem *base; | ||
47 | static u32 rev; | ||
48 | |||
49 | if (!rev) { | ||
50 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); | ||
51 | if (!np) | ||
52 | return IMX_CHIP_REVISION_UNKNOWN; | ||
53 | base = of_iomap(np, 0); | ||
54 | if (!base) { | ||
55 | of_node_put(np); | ||
56 | return IMX_CHIP_REVISION_UNKNOWN; | ||
57 | } | ||
58 | rev = readl_relaxed(base + IMX6Q_ANALOG_DIGPROG); | ||
59 | iounmap(base); | ||
60 | of_node_put(np); | ||
61 | } | ||
62 | |||
63 | switch (rev & 0xff) { | ||
64 | case 0: | ||
65 | return IMX_CHIP_REVISION_1_0; | ||
66 | case 1: | ||
67 | return IMX_CHIP_REVISION_1_1; | ||
68 | case 2: | ||
69 | return IMX_CHIP_REVISION_1_2; | ||
70 | default: | ||
71 | return IMX_CHIP_REVISION_UNKNOWN; | ||
72 | } | ||
73 | } | ||
74 | |||
75 | void imx6q_restart(char mode, const char *cmd) | ||
76 | { | ||
77 | struct device_node *np; | ||
78 | void __iomem *wdog_base; | ||
79 | |||
80 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-wdt"); | ||
81 | wdog_base = of_iomap(np, 0); | ||
82 | if (!wdog_base) | ||
83 | goto soft; | ||
84 | |||
85 | imx_src_prepare_restart(); | ||
86 | |||
87 | /* enable wdog */ | ||
88 | writew_relaxed(1 << 2, wdog_base); | ||
89 | /* write twice to ensure the request will not get ignored */ | ||
90 | writew_relaxed(1 << 2, wdog_base); | ||
91 | |||
92 | /* wait for reset to assert ... */ | ||
93 | mdelay(500); | ||
94 | |||
95 | pr_err("Watchdog reset failed to assert reset\n"); | ||
96 | |||
97 | /* delay to allow the serial port to show the message */ | ||
98 | mdelay(50); | ||
99 | |||
100 | soft: | ||
101 | /* we'll take a jump through zero as a poor second */ | ||
102 | soft_restart(0); | ||
103 | } | ||
104 | |||
105 | /* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */ | ||
106 | static int ksz9021rn_phy_fixup(struct phy_device *phydev) | ||
107 | { | ||
108 | if (IS_BUILTIN(CONFIG_PHYLIB)) { | ||
109 | /* min rx data delay */ | ||
110 | phy_write(phydev, 0x0b, 0x8105); | ||
111 | phy_write(phydev, 0x0c, 0x0000); | ||
112 | |||
113 | /* max rx/tx clock delay, min rx/tx control delay */ | ||
114 | phy_write(phydev, 0x0b, 0x8104); | ||
115 | phy_write(phydev, 0x0c, 0xf0f0); | ||
116 | phy_write(phydev, 0x0b, 0x104); | ||
117 | } | ||
118 | |||
119 | return 0; | ||
120 | } | ||
121 | |||
122 | static void __init imx6q_sabrelite_cko1_setup(void) | ||
123 | { | ||
124 | struct clk *cko1_sel, *ahb, *cko1; | ||
125 | unsigned long rate; | ||
126 | |||
127 | cko1_sel = clk_get_sys(NULL, "cko1_sel"); | ||
128 | ahb = clk_get_sys(NULL, "ahb"); | ||
129 | cko1 = clk_get_sys(NULL, "cko1"); | ||
130 | if (IS_ERR(cko1_sel) || IS_ERR(ahb) || IS_ERR(cko1)) { | ||
131 | pr_err("cko1 setup failed!\n"); | ||
132 | goto put_clk; | ||
133 | } | ||
134 | clk_set_parent(cko1_sel, ahb); | ||
135 | rate = clk_round_rate(cko1, 16000000); | ||
136 | clk_set_rate(cko1, rate); | ||
137 | put_clk: | ||
138 | if (!IS_ERR(cko1_sel)) | ||
139 | clk_put(cko1_sel); | ||
140 | if (!IS_ERR(ahb)) | ||
141 | clk_put(ahb); | ||
142 | if (!IS_ERR(cko1)) | ||
143 | clk_put(cko1); | ||
144 | } | ||
145 | |||
146 | static void __init imx6q_sabrelite_init(void) | ||
147 | { | ||
148 | if (IS_BUILTIN(CONFIG_PHYLIB)) | ||
149 | phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, | ||
150 | ksz9021rn_phy_fixup); | ||
151 | imx6q_sabrelite_cko1_setup(); | ||
152 | } | ||
153 | |||
154 | static void __init imx6q_1588_init(void) | ||
155 | { | ||
156 | struct regmap *gpr; | ||
157 | |||
158 | gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); | ||
159 | if (!IS_ERR(gpr)) | ||
160 | regmap_update_bits(gpr, 0x4, 1 << 21, 1 << 21); | ||
161 | else | ||
162 | pr_err("failed to find fsl,imx6q-iomux-gpr regmap\n"); | ||
163 | |||
164 | } | ||
165 | static void __init imx6q_usb_init(void) | ||
166 | { | ||
167 | struct regmap *anatop; | ||
168 | |||
169 | #define HW_ANADIG_USB1_CHRG_DETECT 0x000001b0 | ||
170 | #define HW_ANADIG_USB2_CHRG_DETECT 0x00000210 | ||
171 | |||
172 | #define BM_ANADIG_USB_CHRG_DETECT_EN_B 0x00100000 | ||
173 | #define BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B 0x00080000 | ||
174 | |||
175 | anatop = syscon_regmap_lookup_by_compatible("fsl,imx6q-anatop"); | ||
176 | if (!IS_ERR(anatop)) { | ||
177 | /* | ||
178 | * The external charger detector needs to be disabled, | ||
179 | * or the signal at DP will be poor | ||
180 | */ | ||
181 | regmap_write(anatop, HW_ANADIG_USB1_CHRG_DETECT, | ||
182 | BM_ANADIG_USB_CHRG_DETECT_EN_B | ||
183 | | BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B); | ||
184 | regmap_write(anatop, HW_ANADIG_USB2_CHRG_DETECT, | ||
185 | BM_ANADIG_USB_CHRG_DETECT_EN_B | | ||
186 | BM_ANADIG_USB_CHRG_DETECT_CHK_CHRG_B); | ||
187 | } else { | ||
188 | pr_warn("failed to find fsl,imx6q-anatop regmap\n"); | ||
189 | } | ||
190 | } | ||
191 | |||
192 | static void __init imx6q_init_machine(void) | ||
193 | { | ||
194 | if (of_machine_is_compatible("fsl,imx6q-sabrelite")) | ||
195 | imx6q_sabrelite_init(); | ||
196 | |||
197 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
198 | |||
199 | imx6q_pm_init(); | ||
200 | imx6q_usb_init(); | ||
201 | imx6q_1588_init(); | ||
202 | } | ||
203 | |||
204 | static struct cpuidle_driver imx6q_cpuidle_driver = { | ||
205 | .name = "imx6q_cpuidle", | ||
206 | .owner = THIS_MODULE, | ||
207 | .en_core_tk_irqen = 1, | ||
208 | .states[0] = ARM_CPUIDLE_WFI_STATE, | ||
209 | .state_count = 1, | ||
210 | }; | ||
211 | |||
212 | static void __init imx6q_init_late(void) | ||
213 | { | ||
214 | imx_cpuidle_init(&imx6q_cpuidle_driver); | ||
215 | } | ||
216 | |||
217 | static void __init imx6q_map_io(void) | ||
218 | { | ||
219 | imx_lluart_map_io(); | ||
220 | imx_scu_map_io(); | ||
221 | imx6q_clock_map_io(); | ||
222 | } | ||
223 | |||
224 | static const struct of_device_id imx6q_irq_match[] __initconst = { | ||
225 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | ||
226 | { /* sentinel */ } | ||
227 | }; | ||
228 | |||
229 | static void __init imx6q_init_irq(void) | ||
230 | { | ||
231 | l2x0_of_init(0, ~0UL); | ||
232 | imx_src_init(); | ||
233 | imx_gpc_init(); | ||
234 | of_irq_init(imx6q_irq_match); | ||
235 | } | ||
236 | |||
237 | static void __init imx6q_timer_init(void) | ||
238 | { | ||
239 | mx6q_clocks_init(); | ||
240 | twd_local_timer_of_register(); | ||
241 | imx_print_silicon_rev("i.MX6Q", imx6q_revision()); | ||
242 | } | ||
243 | |||
244 | static struct sys_timer imx6q_timer = { | ||
245 | .init = imx6q_timer_init, | ||
246 | }; | ||
247 | |||
248 | static const char *imx6q_dt_compat[] __initdata = { | ||
249 | "fsl,imx6q", | ||
250 | NULL, | ||
251 | }; | ||
252 | |||
253 | DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)") | ||
254 | .smp = smp_ops(imx_smp_ops), | ||
255 | .map_io = imx6q_map_io, | ||
256 | .init_irq = imx6q_init_irq, | ||
257 | .handle_irq = imx6q_handle_irq, | ||
258 | .timer = &imx6q_timer, | ||
259 | .init_machine = imx6q_init_machine, | ||
260 | .init_late = imx6q_init_late, | ||
261 | .dt_compat = imx6q_dt_compat, | ||
262 | .restart = imx6q_restart, | ||
263 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c index 2e536ea5344..e472a1d8805 100644 --- a/arch/arm/mach-imx/mach-kzm_arm11_01.c +++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include <linux/serial_8250.h> | 24 | #include <linux/serial_8250.h> |
25 | #include <linux/smsc911x.h> | 25 | #include <linux/smsc911x.h> |
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <linux/regulator/machine.h> | ||
28 | #include <linux/regulator/fixed.h> | ||
29 | 27 | ||
30 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
31 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
@@ -36,10 +34,11 @@ | |||
36 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
37 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
38 | 36 | ||
39 | #include "common.h" | 37 | #include <mach/clock.h> |
38 | #include <mach/common.h> | ||
39 | #include <mach/iomux-mx3.h> | ||
40 | |||
40 | #include "devices-imx31.h" | 41 | #include "devices-imx31.h" |
41 | #include "hardware.h" | ||
42 | #include "iomux-mx3.h" | ||
43 | 42 | ||
44 | #define KZM_ARM11_IO_ADDRESS(x) (IOMEM( \ | 43 | #define KZM_ARM11_IO_ADDRESS(x) (IOMEM( \ |
45 | IMX_IO_P2V_MODULE(x, MX31_CS4) ?: \ | 44 | IMX_IO_P2V_MODULE(x, MX31_CS4) ?: \ |
@@ -71,7 +70,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
71 | { | 70 | { |
72 | .membase = KZM_ARM11_IO_ADDRESS(KZM_ARM11_16550), | 71 | .membase = KZM_ARM11_IO_ADDRESS(KZM_ARM11_16550), |
73 | .mapbase = KZM_ARM11_16550, | 72 | .mapbase = KZM_ARM11_16550, |
74 | /* irq number is run-time assigned */ | 73 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), |
75 | .irqflags = IRQ_TYPE_EDGE_RISING, | 74 | .irqflags = IRQ_TYPE_EDGE_RISING, |
76 | .uartclk = 14745600, | 75 | .uartclk = 14745600, |
77 | .regshift = 0, | 76 | .regshift = 0, |
@@ -89,7 +88,8 @@ static struct resource serial8250_resources[] = { | |||
89 | .flags = IORESOURCE_MEM, | 88 | .flags = IORESOURCE_MEM, |
90 | }, | 89 | }, |
91 | { | 90 | { |
92 | /* irq number is run-time assigned */ | 91 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), |
92 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), | ||
93 | .flags = IORESOURCE_IRQ, | 93 | .flags = IORESOURCE_IRQ, |
94 | }, | 94 | }, |
95 | }; | 95 | }; |
@@ -122,13 +122,6 @@ static int __init kzm_init_ext_uart(void) | |||
122 | tmp |= 0x2; | 122 | tmp |= 0x2; |
123 | __raw_writeb(tmp, KZM_ARM11_IO_ADDRESS(KZM_ARM11_CTL1)); | 123 | __raw_writeb(tmp, KZM_ARM11_IO_ADDRESS(KZM_ARM11_CTL1)); |
124 | 124 | ||
125 | serial_platform_data[0].irq = | ||
126 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)); | ||
127 | serial8250_resources[1].start = | ||
128 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)); | ||
129 | serial8250_resources[1].end = | ||
130 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)); | ||
131 | |||
132 | return platform_device_register(&serial_device); | 125 | return platform_device_register(&serial_device); |
133 | } | 126 | } |
134 | #else | 127 | #else |
@@ -156,7 +149,8 @@ static struct resource kzm_smsc9118_resources[] = { | |||
156 | .flags = IORESOURCE_MEM, | 149 | .flags = IORESOURCE_MEM, |
157 | }, | 150 | }, |
158 | { | 151 | { |
159 | /* irq number is run-time assigned */ | 152 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_2), |
153 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_2), | ||
160 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | 154 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
161 | }, | 155 | }, |
162 | }; | 156 | }; |
@@ -171,11 +165,6 @@ static struct platform_device kzm_smsc9118_device = { | |||
171 | }, | 165 | }, |
172 | }; | 166 | }; |
173 | 167 | ||
174 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
175 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
176 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
177 | }; | ||
178 | |||
179 | static int __init kzm_init_smsc9118(void) | 168 | static int __init kzm_init_smsc9118(void) |
180 | { | 169 | { |
181 | /* | 170 | /* |
@@ -185,13 +174,6 @@ static int __init kzm_init_smsc9118(void) | |||
185 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2), "smsc9118-int"); | 174 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2), "smsc9118-int"); |
186 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2)); | 175 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2)); |
187 | 176 | ||
188 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
189 | |||
190 | kzm_smsc9118_resources[1].start = | ||
191 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2)); | ||
192 | kzm_smsc9118_resources[1].end = | ||
193 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2)); | ||
194 | |||
195 | return platform_device_register(&kzm_smsc9118_device); | 177 | return platform_device_register(&kzm_smsc9118_device); |
196 | } | 178 | } |
197 | #else | 179 | #else |
@@ -257,13 +239,13 @@ static void __init kzm_board_init(void) | |||
257 | */ | 239 | */ |
258 | static struct map_desc kzm_io_desc[] __initdata = { | 240 | static struct map_desc kzm_io_desc[] __initdata = { |
259 | { | 241 | { |
260 | .virtual = (unsigned long)MX31_CS4_BASE_ADDR_VIRT, | 242 | .virtual = MX31_CS4_BASE_ADDR_VIRT, |
261 | .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR), | 243 | .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR), |
262 | .length = MX31_CS4_SIZE, | 244 | .length = MX31_CS4_SIZE, |
263 | .type = MT_DEVICE | 245 | .type = MT_DEVICE |
264 | }, | 246 | }, |
265 | { | 247 | { |
266 | .virtual = (unsigned long)MX31_CS5_BASE_ADDR_VIRT, | 248 | .virtual = MX31_CS5_BASE_ADDR_VIRT, |
267 | .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR), | 249 | .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR), |
268 | .length = MX31_CS5_SIZE, | 250 | .length = MX31_CS5_SIZE, |
269 | .type = MT_DEVICE | 251 | .type = MT_DEVICE |
@@ -289,12 +271,10 @@ static struct sys_timer kzm_timer = { | |||
289 | }; | 271 | }; |
290 | 272 | ||
291 | MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") | 273 | MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") |
292 | .atag_offset = 0x100, | 274 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
293 | .map_io = kzm_map_io, | 275 | .map_io = kzm_map_io, |
294 | .init_early = imx31_init_early, | 276 | .init_early = imx31_init_early, |
295 | .init_irq = mx31_init_irq, | 277 | .init_irq = mx31_init_irq, |
296 | .handle_irq = imx31_handle_irq, | ||
297 | .timer = &kzm_timer, | 278 | .timer = &kzm_timer, |
298 | .init_machine = kzm_board_init, | 279 | .init_machine = kzm_board_init, |
299 | .restart = mxc_restart, | ||
300 | MACHINE_END | 280 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index 06b483783e6..5cd8bee4696 100644 --- a/arch/arm/mach-imx/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c | |||
@@ -23,10 +23,12 @@ | |||
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | #include <asm/mach/time.h> | 24 | #include <asm/mach/time.h> |
25 | 25 | ||
26 | #include "common.h" | 26 | #include <mach/common.h> |
27 | #include <mach/hardware.h> | ||
28 | #include <mach/iomux-mx1.h> | ||
29 | #include <mach/irqs.h> | ||
30 | |||
27 | #include "devices-imx1.h" | 31 | #include "devices-imx1.h" |
28 | #include "hardware.h" | ||
29 | #include "iomux-mx1.h" | ||
30 | 32 | ||
31 | static const int mx1ads_pins[] __initconst = { | 33 | static const int mx1ads_pins[] __initconst = { |
32 | /* UART1 */ | 34 | /* UART1 */ |
@@ -66,16 +68,23 @@ static const struct imxuart_platform_data uart1_pdata __initconst = { | |||
66 | * Physmap flash | 68 | * Physmap flash |
67 | */ | 69 | */ |
68 | 70 | ||
69 | static const struct physmap_flash_data mx1ads_flash_data __initconst = { | 71 | static struct physmap_flash_data mx1ads_flash_data = { |
70 | .width = 4, /* bankwidth in bytes */ | 72 | .width = 4, /* bankwidth in bytes */ |
71 | }; | 73 | }; |
72 | 74 | ||
73 | static const struct resource flash_resource __initconst = { | 75 | static struct resource flash_resource = { |
74 | .start = MX1_CS0_PHYS, | 76 | .start = MX1_CS0_PHYS, |
75 | .end = MX1_CS0_PHYS + SZ_32M - 1, | 77 | .end = MX1_CS0_PHYS + SZ_32M - 1, |
76 | .flags = IORESOURCE_MEM, | 78 | .flags = IORESOURCE_MEM, |
77 | }; | 79 | }; |
78 | 80 | ||
81 | static struct platform_device flash_device = { | ||
82 | .name = "physmap-flash", | ||
83 | .id = 0, | ||
84 | .resource = &flash_resource, | ||
85 | .num_resources = 1, | ||
86 | }; | ||
87 | |||
79 | /* | 88 | /* |
80 | * I2C | 89 | * I2C |
81 | */ | 90 | */ |
@@ -116,9 +125,7 @@ static void __init mx1ads_init(void) | |||
116 | imx1_add_imx_uart1(&uart1_pdata); | 125 | imx1_add_imx_uart1(&uart1_pdata); |
117 | 126 | ||
118 | /* Physmap flash */ | 127 | /* Physmap flash */ |
119 | platform_device_register_resndata(NULL, "physmap-flash", 0, | 128 | mxc_register_device(&flash_device, &mx1ads_flash_data); |
120 | &flash_resource, 1, | ||
121 | &mx1ads_flash_data, sizeof(mx1ads_flash_data)); | ||
122 | 129 | ||
123 | /* I2C */ | 130 | /* I2C */ |
124 | i2c_register_board_info(0, mx1ads_i2c_devices, | 131 | i2c_register_board_info(0, mx1ads_i2c_devices, |
@@ -132,29 +139,25 @@ static void __init mx1ads_timer_init(void) | |||
132 | mx1_clocks_init(32000); | 139 | mx1_clocks_init(32000); |
133 | } | 140 | } |
134 | 141 | ||
135 | static struct sys_timer mx1ads_timer = { | 142 | struct sys_timer mx1ads_timer = { |
136 | .init = mx1ads_timer_init, | 143 | .init = mx1ads_timer_init, |
137 | }; | 144 | }; |
138 | 145 | ||
139 | MACHINE_START(MX1ADS, "Freescale MX1ADS") | 146 | MACHINE_START(MX1ADS, "Freescale MX1ADS") |
140 | /* Maintainer: Sascha Hauer, Pengutronix */ | 147 | /* Maintainer: Sascha Hauer, Pengutronix */ |
141 | .atag_offset = 0x100, | 148 | .boot_params = MX1_PHYS_OFFSET + 0x100, |
142 | .map_io = mx1_map_io, | 149 | .map_io = mx1_map_io, |
143 | .init_early = imx1_init_early, | 150 | .init_early = imx1_init_early, |
144 | .init_irq = mx1_init_irq, | 151 | .init_irq = mx1_init_irq, |
145 | .handle_irq = imx1_handle_irq, | ||
146 | .timer = &mx1ads_timer, | 152 | .timer = &mx1ads_timer, |
147 | .init_machine = mx1ads_init, | 153 | .init_machine = mx1ads_init, |
148 | .restart = mxc_restart, | ||
149 | MACHINE_END | 154 | MACHINE_END |
150 | 155 | ||
151 | MACHINE_START(MXLADS, "Freescale MXLADS") | 156 | MACHINE_START(MXLADS, "Freescale MXLADS") |
152 | .atag_offset = 0x100, | 157 | .boot_params = MX1_PHYS_OFFSET + 0x100, |
153 | .map_io = mx1_map_io, | 158 | .map_io = mx1_map_io, |
154 | .init_early = imx1_init_early, | 159 | .init_early = imx1_init_early, |
155 | .init_irq = mx1_init_irq, | 160 | .init_irq = mx1_init_irq, |
156 | .handle_irq = imx1_handle_irq, | ||
157 | .timer = &mx1ads_timer, | 161 | .timer = &mx1ads_timer, |
158 | .init_machine = mx1ads_init, | 162 | .init_machine = mx1ads_init, |
159 | .restart = mxc_restart, | ||
160 | MACHINE_END | 163 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index 6adb3136bb0..d389ecf9b5a 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -18,27 +18,27 @@ | |||
18 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <mach/common.h> | ||
22 | #include <mach/hardware.h> | ||
21 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
22 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
23 | #include <asm/mach/time.h> | 25 | #include <asm/mach/time.h> |
24 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
27 | #include <mach/iomux-mx21.h> | ||
25 | 28 | ||
26 | #include "common.h" | ||
27 | #include "devices-imx21.h" | 29 | #include "devices-imx21.h" |
28 | #include "hardware.h" | ||
29 | #include "iomux-mx21.h" | ||
30 | 30 | ||
31 | /* | 31 | /* |
32 | * Memory-mapped I/O on MX21ADS base board | 32 | * Memory-mapped I/O on MX21ADS base board |
33 | */ | 33 | */ |
34 | #define MX21ADS_MMIO_BASE_ADDR 0xf5000000 | 34 | #define MX21ADS_MMIO_BASE_ADDR 0xf5000000 |
35 | #define MX21ADS_MMIO_SIZE 0xc00000 | 35 | #define MX21ADS_MMIO_SIZE SZ_16M |
36 | 36 | ||
37 | #define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \ | 37 | #define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \ |
38 | (MX21ADS_MMIO_BASE_ADDR + (offset)) | 38 | (MX21ADS_MMIO_BASE_ADDR + (offset)) |
39 | 39 | ||
40 | #define MX21ADS_CS8900A_MMIO_SIZE 0x200000 | 40 | #define MX21ADS_CS8900A_IRQ IRQ_GPIOE(11) |
41 | #define MX21ADS_CS8900A_IRQ_GPIO IMX_GPIO_NR(5, 11) | 41 | #define MX21ADS_CS8900A_IOBASE_REG MX21ADS_REG_ADDR(0x000000) |
42 | #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) | 42 | #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) |
43 | #define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000) | 43 | #define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000) |
44 | #define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000) | 44 | #define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000) |
@@ -159,19 +159,6 @@ static struct platform_device mx21ads_nor_mtd_device = { | |||
159 | .resource = &mx21ads_flash_resource, | 159 | .resource = &mx21ads_flash_resource, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static struct resource mx21ads_cs8900_resources[] __initdata = { | ||
163 | DEFINE_RES_MEM(MX21_CS1_BASE_ADDR, MX21ADS_CS8900A_MMIO_SIZE), | ||
164 | /* irq number is run-time assigned */ | ||
165 | DEFINE_RES_IRQ(-1), | ||
166 | }; | ||
167 | |||
168 | static const struct platform_device_info mx21ads_cs8900_devinfo __initconst = { | ||
169 | .name = "cs89x0", | ||
170 | .id = 0, | ||
171 | .res = mx21ads_cs8900_resources, | ||
172 | .num_res = ARRAY_SIZE(mx21ads_cs8900_resources), | ||
173 | }; | ||
174 | |||
175 | static const struct imxuart_platform_data uart_pdata_rts __initconst = { | 162 | static const struct imxuart_platform_data uart_pdata_rts __initconst = { |
176 | .flags = IMXUART_HAVE_RTSCTS, | 163 | .flags = IMXUART_HAVE_RTSCTS, |
177 | }; | 164 | }; |
@@ -242,13 +229,13 @@ static int mx21ads_sdhc_get_ro(struct device *dev) | |||
242 | static int mx21ads_sdhc_init(struct device *dev, irq_handler_t detect_irq, | 229 | static int mx21ads_sdhc_init(struct device *dev, irq_handler_t detect_irq, |
243 | void *data) | 230 | void *data) |
244 | { | 231 | { |
245 | return request_irq(gpio_to_irq(IMX_GPIO_NR(4, 25)), detect_irq, | 232 | return request_irq(IRQ_GPIOD(25), detect_irq, |
246 | IRQF_TRIGGER_FALLING, "mmc-detect", data); | 233 | IRQF_TRIGGER_FALLING, "mmc-detect", data); |
247 | } | 234 | } |
248 | 235 | ||
249 | static void mx21ads_sdhc_exit(struct device *dev, void *data) | 236 | static void mx21ads_sdhc_exit(struct device *dev, void *data) |
250 | { | 237 | { |
251 | free_irq(gpio_to_irq(IMX_GPIO_NR(4, 25)), data); | 238 | free_irq(IRQ_GPIOD(25), data); |
252 | } | 239 | } |
253 | 240 | ||
254 | static const struct imxmmc_platform_data mx21ads_sdhc_pdata __initconst = { | 241 | static const struct imxmmc_platform_data mx21ads_sdhc_pdata __initconst = { |
@@ -305,12 +292,6 @@ static void __init mx21ads_board_init(void) | |||
305 | imx21_add_mxc_nand(&mx21ads_nand_board_info); | 292 | imx21_add_mxc_nand(&mx21ads_nand_board_info); |
306 | 293 | ||
307 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 294 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
308 | |||
309 | mx21ads_cs8900_resources[1].start = | ||
310 | gpio_to_irq(MX21ADS_CS8900A_IRQ_GPIO); | ||
311 | mx21ads_cs8900_resources[1].end = | ||
312 | gpio_to_irq(MX21ADS_CS8900A_IRQ_GPIO); | ||
313 | platform_device_register_full(&mx21ads_cs8900_devinfo); | ||
314 | } | 295 | } |
315 | 296 | ||
316 | static void __init mx21ads_timer_init(void) | 297 | static void __init mx21ads_timer_init(void) |
@@ -324,12 +305,10 @@ static struct sys_timer mx21ads_timer = { | |||
324 | 305 | ||
325 | MACHINE_START(MX21ADS, "Freescale i.MX21ADS") | 306 | MACHINE_START(MX21ADS, "Freescale i.MX21ADS") |
326 | /* maintainer: Freescale Semiconductor, Inc. */ | 307 | /* maintainer: Freescale Semiconductor, Inc. */ |
327 | .atag_offset = 0x100, | 308 | .boot_params = MX21_PHYS_OFFSET + 0x100, |
328 | .map_io = mx21ads_map_io, | 309 | .map_io = mx21ads_map_io, |
329 | .init_early = imx21_init_early, | 310 | .init_early = imx21_init_early, |
330 | .init_irq = mx21_init_irq, | 311 | .init_irq = mx21_init_irq, |
331 | .handle_irq = imx21_handle_irq, | ||
332 | .timer = &mx21ads_timer, | 312 | .timer = &mx21ads_timer, |
333 | .init_machine = mx21ads_board_init, | 313 | .init_machine = mx21ads_board_init, |
334 | .restart = mxc_restart, | ||
335 | MACHINE_END | 314 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c index b1b03aa55bb..7f66a91df36 100644 --- a/arch/arm/mach-imx/mach-mx25_3ds.c +++ b/arch/arm/mach-imx/mach-mx25_3ds.c | |||
@@ -31,19 +31,17 @@ | |||
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/usb/otg.h> | 32 | #include <linux/usb/otg.h> |
33 | 33 | ||
34 | #include <mach/hardware.h> | ||
34 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
36 | #include <asm/mach/time.h> | 37 | #include <asm/mach/time.h> |
37 | #include <asm/memory.h> | 38 | #include <asm/memory.h> |
38 | #include <asm/mach/map.h> | 39 | #include <asm/mach/map.h> |
40 | #include <mach/common.h> | ||
41 | #include <mach/mx25.h> | ||
42 | #include <mach/iomux-mx25.h> | ||
39 | 43 | ||
40 | #include "common.h" | ||
41 | #include "devices-imx25.h" | 44 | #include "devices-imx25.h" |
42 | #include "hardware.h" | ||
43 | #include "iomux-mx25.h" | ||
44 | #include "mx25.h" | ||
45 | |||
46 | #define MX25PDK_CAN_PWDN IMX_GPIO_NR(4, 6) | ||
47 | 45 | ||
48 | static const struct imxuart_platform_data uart_pdata __initconst = { | 46 | static const struct imxuart_platform_data uart_pdata __initconst = { |
49 | .flags = IMXUART_HAVE_RTSCTS, | 47 | .flags = IMXUART_HAVE_RTSCTS, |
@@ -110,11 +108,6 @@ static iomux_v3_cfg_t mx25pdk_pads[] = { | |||
110 | /* I2C1 */ | 108 | /* I2C1 */ |
111 | MX25_PAD_I2C1_CLK__I2C1_CLK, | 109 | MX25_PAD_I2C1_CLK__I2C1_CLK, |
112 | MX25_PAD_I2C1_DAT__I2C1_DAT, | 110 | MX25_PAD_I2C1_DAT__I2C1_DAT, |
113 | |||
114 | /* CAN1 */ | ||
115 | MX25_PAD_GPIO_A__CAN1_TX, | ||
116 | MX25_PAD_GPIO_B__CAN1_RX, | ||
117 | MX25_PAD_D14__GPIO_4_6, /* CAN_PWDN */ | ||
118 | }; | 111 | }; |
119 | 112 | ||
120 | static const struct fec_platform_data mx25_fec_pdata __initconst = { | 113 | static const struct fec_platform_data mx25_fec_pdata __initconst = { |
@@ -237,9 +230,9 @@ static void __init mx25pdk_init(void) | |||
237 | imx25_add_fsl_usb2_udc(&otg_device_pdata); | 230 | imx25_add_fsl_usb2_udc(&otg_device_pdata); |
238 | imx25_add_mxc_ehci_hs(&usbh2_pdata); | 231 | imx25_add_mxc_ehci_hs(&usbh2_pdata); |
239 | imx25_add_mxc_nand(&mx25pdk_nand_board_info); | 232 | imx25_add_mxc_nand(&mx25pdk_nand_board_info); |
240 | imx25_add_imxdi_rtc(); | 233 | imx25_add_imxdi_rtc(NULL); |
241 | imx25_add_imx_fb(&mx25pdk_fb_pdata); | 234 | imx25_add_imx_fb(&mx25pdk_fb_pdata); |
242 | imx25_add_imx2_wdt(); | 235 | imx25_add_imx2_wdt(NULL); |
243 | 236 | ||
244 | mx25pdk_fec_reset(); | 237 | mx25pdk_fec_reset(); |
245 | imx25_add_fec(&mx25_fec_pdata); | 238 | imx25_add_fec(&mx25_fec_pdata); |
@@ -247,9 +240,6 @@ static void __init mx25pdk_init(void) | |||
247 | 240 | ||
248 | imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata); | 241 | imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata); |
249 | imx25_add_imx_i2c0(&mx25_3ds_i2c0_data); | 242 | imx25_add_imx_i2c0(&mx25_3ds_i2c0_data); |
250 | |||
251 | gpio_request_one(MX25PDK_CAN_PWDN, GPIOF_OUT_INIT_LOW, "can-pwdn"); | ||
252 | imx25_add_flexcan0(NULL); | ||
253 | } | 243 | } |
254 | 244 | ||
255 | static void __init mx25pdk_timer_init(void) | 245 | static void __init mx25pdk_timer_init(void) |
@@ -263,12 +253,10 @@ static struct sys_timer mx25pdk_timer = { | |||
263 | 253 | ||
264 | MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") | 254 | MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") |
265 | /* Maintainer: Freescale Semiconductor, Inc. */ | 255 | /* Maintainer: Freescale Semiconductor, Inc. */ |
266 | .atag_offset = 0x100, | 256 | .boot_params = MX25_PHYS_OFFSET + 0x100, |
267 | .map_io = mx25_map_io, | 257 | .map_io = mx25_map_io, |
268 | .init_early = imx25_init_early, | 258 | .init_early = imx25_init_early, |
269 | .init_irq = mx25_init_irq, | 259 | .init_irq = mx25_init_irq, |
270 | .handle_irq = imx25_handle_irq, | ||
271 | .timer = &mx25pdk_timer, | 260 | .timer = &mx25pdk_timer, |
272 | .init_machine = mx25pdk_init, | 261 | .init_machine = mx25pdk_init, |
273 | .restart = mxc_restart, | ||
274 | MACHINE_END | 262 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index d0e547fa925..6fa6934ab15 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -31,29 +31,27 @@ | |||
31 | #include <linux/regulator/machine.h> | 31 | #include <linux/regulator/machine.h> |
32 | #include <linux/spi/l4f00242t03.h> | 32 | #include <linux/spi/l4f00242t03.h> |
33 | 33 | ||
34 | #include <media/soc_camera.h> | ||
35 | |||
36 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
37 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
38 | #include <asm/mach/time.h> | 36 | #include <asm/mach/time.h> |
37 | #include <mach/hardware.h> | ||
38 | #include <mach/common.h> | ||
39 | #include <mach/iomux-mx27.h> | ||
40 | #include <mach/ulpi.h> | ||
41 | #include <mach/irqs.h> | ||
42 | #include <mach/3ds_debugboard.h> | ||
39 | 43 | ||
40 | #include "3ds_debugboard.h" | ||
41 | #include "common.h" | ||
42 | #include "devices-imx27.h" | 44 | #include "devices-imx27.h" |
43 | #include "hardware.h" | ||
44 | #include "iomux-mx27.h" | ||
45 | #include "ulpi.h" | ||
46 | 45 | ||
47 | #define SD1_EN_GPIO IMX_GPIO_NR(2, 25) | 46 | #define SD1_EN_GPIO IMX_GPIO_NR(2, 25) |
48 | #define OTG_PHY_RESET_GPIO IMX_GPIO_NR(2, 23) | 47 | #define OTG_PHY_RESET_GPIO IMX_GPIO_NR(2, 23) |
49 | #define SPI2_SS0 IMX_GPIO_NR(4, 21) | 48 | #define SPI2_SS0 IMX_GPIO_NR(4, 21) |
49 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(3, 28)) | ||
50 | #define PMIC_INT IMX_GPIO_NR(3, 14) | 50 | #define PMIC_INT IMX_GPIO_NR(3, 14) |
51 | #define SPI1_SS0 IMX_GPIO_NR(4, 28) | 51 | #define SPI1_SS0 IMX_GPIO_NR(4, 28) |
52 | #define SD1_CD IMX_GPIO_NR(2, 26) | 52 | #define SD1_CD IMX_GPIO_NR(2, 26) |
53 | #define LCD_RESET IMX_GPIO_NR(1, 3) | 53 | #define LCD_RESET IMX_GPIO_NR(1, 3) |
54 | #define LCD_ENABLE IMX_GPIO_NR(1, 31) | 54 | #define LCD_ENABLE IMX_GPIO_NR(1, 31) |
55 | #define CSI_PWRDWN IMX_GPIO_NR(4, 19) | ||
56 | #define CSI_RESET IMX_GPIO_NR(3, 6) | ||
57 | 55 | ||
58 | static const int mx27pdk_pins[] __initconst = { | 56 | static const int mx27pdk_pins[] __initconst = { |
59 | /* UART1 */ | 57 | /* UART1 */ |
@@ -143,31 +141,6 @@ static const int mx27pdk_pins[] __initconst = { | |||
143 | PA30_PF_CONTRAST, | 141 | PA30_PF_CONTRAST, |
144 | LCD_ENABLE | GPIO_GPIO | GPIO_OUT, | 142 | LCD_ENABLE | GPIO_GPIO | GPIO_OUT, |
145 | LCD_RESET | GPIO_GPIO | GPIO_OUT, | 143 | LCD_RESET | GPIO_GPIO | GPIO_OUT, |
146 | /* CSI */ | ||
147 | PB10_PF_CSI_D0, | ||
148 | PB11_PF_CSI_D1, | ||
149 | PB12_PF_CSI_D2, | ||
150 | PB13_PF_CSI_D3, | ||
151 | PB14_PF_CSI_D4, | ||
152 | PB15_PF_CSI_MCLK, | ||
153 | PB16_PF_CSI_PIXCLK, | ||
154 | PB17_PF_CSI_D5, | ||
155 | PB18_PF_CSI_D6, | ||
156 | PB19_PF_CSI_D7, | ||
157 | PB20_PF_CSI_VSYNC, | ||
158 | PB21_PF_CSI_HSYNC, | ||
159 | CSI_PWRDWN | GPIO_GPIO | GPIO_OUT, | ||
160 | CSI_RESET | GPIO_GPIO | GPIO_OUT, | ||
161 | /* SSI4 */ | ||
162 | PC16_PF_SSI4_FS, | ||
163 | PC17_PF_SSI4_RXD, | ||
164 | PC18_PF_SSI4_TXD, | ||
165 | PC19_PF_SSI4_CLK, | ||
166 | }; | ||
167 | |||
168 | static struct gpio mx27_3ds_camera_gpios[] = { | ||
169 | { CSI_PWRDWN, GPIOF_OUT_INIT_HIGH, "camera-power" }, | ||
170 | { CSI_RESET, GPIOF_OUT_INIT_HIGH, "camera-reset" }, | ||
171 | }; | 144 | }; |
172 | 145 | ||
173 | static const struct imxuart_platform_data uart_pdata __initconst = { | 146 | static const struct imxuart_platform_data uart_pdata __initconst = { |
@@ -244,18 +217,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
244 | .phy_mode = FSL_USB2_PHY_ULPI, | 217 | .phy_mode = FSL_USB2_PHY_ULPI, |
245 | }; | 218 | }; |
246 | 219 | ||
247 | static bool otg_mode_host __initdata; | 220 | static int otg_mode_host; |
248 | 221 | ||
249 | static int __init mx27_3ds_otg_mode(char *options) | 222 | static int __init mx27_3ds_otg_mode(char *options) |
250 | { | 223 | { |
251 | if (!strcmp(options, "host")) | 224 | if (!strcmp(options, "host")) |
252 | otg_mode_host = true; | 225 | otg_mode_host = 1; |
253 | else if (!strcmp(options, "device")) | 226 | else if (!strcmp(options, "device")) |
254 | otg_mode_host = false; | 227 | otg_mode_host = 0; |
255 | else | 228 | else |
256 | pr_info("otg_mode neither \"host\" nor \"device\". " | 229 | pr_info("otg_mode neither \"host\" nor \"device\". " |
257 | "Defaulting to device\n"); | 230 | "Defaulting to device\n"); |
258 | return 1; | 231 | return 0; |
259 | } | 232 | } |
260 | __setup("otg_mode=", mx27_3ds_otg_mode); | 233 | __setup("otg_mode=", mx27_3ds_otg_mode); |
261 | 234 | ||
@@ -268,8 +241,7 @@ static struct regulator_init_data gpo_init = { | |||
268 | }; | 241 | }; |
269 | 242 | ||
270 | static struct regulator_consumer_supply vmmc1_consumers[] = { | 243 | static struct regulator_consumer_supply vmmc1_consumers[] = { |
271 | REGULATOR_SUPPLY("vcore", "spi0.0"), | 244 | REGULATOR_SUPPLY("lcd_2v8", NULL), |
272 | REGULATOR_SUPPLY("cmos_2v8", "soc-camera-pdrv.0"), | ||
273 | }; | 245 | }; |
274 | 246 | ||
275 | static struct regulator_init_data vmmc1_init = { | 247 | static struct regulator_init_data vmmc1_init = { |
@@ -285,7 +257,7 @@ static struct regulator_init_data vmmc1_init = { | |||
285 | }; | 257 | }; |
286 | 258 | ||
287 | static struct regulator_consumer_supply vgen_consumers[] = { | 259 | static struct regulator_consumer_supply vgen_consumers[] = { |
288 | REGULATOR_SUPPLY("vdd", "spi0.0"), | 260 | REGULATOR_SUPPLY("vdd_lcdio", NULL), |
289 | }; | 261 | }; |
290 | 262 | ||
291 | static struct regulator_init_data vgen_init = { | 263 | static struct regulator_init_data vgen_init = { |
@@ -298,22 +270,6 @@ static struct regulator_init_data vgen_init = { | |||
298 | .consumer_supplies = vgen_consumers, | 270 | .consumer_supplies = vgen_consumers, |
299 | }; | 271 | }; |
300 | 272 | ||
301 | static struct regulator_consumer_supply vvib_consumers[] = { | ||
302 | REGULATOR_SUPPLY("cmos_vcore", "soc-camera-pdrv.0"), | ||
303 | }; | ||
304 | |||
305 | static struct regulator_init_data vvib_init = { | ||
306 | .constraints = { | ||
307 | .min_uV = 1300000, | ||
308 | .max_uV = 1300000, | ||
309 | .apply_uV = 1, | ||
310 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | ||
311 | REGULATOR_CHANGE_STATUS, | ||
312 | }, | ||
313 | .num_consumer_supplies = ARRAY_SIZE(vvib_consumers), | ||
314 | .consumer_supplies = vvib_consumers, | ||
315 | }; | ||
316 | |||
317 | static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = { | 273 | static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = { |
318 | { | 274 | { |
319 | .id = MC13783_REG_VMMC1, | 275 | .id = MC13783_REG_VMMC1, |
@@ -327,31 +283,18 @@ static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = { | |||
327 | }, { | 283 | }, { |
328 | .id = MC13783_REG_GPO3, /* Turn on 3.3V */ | 284 | .id = MC13783_REG_GPO3, /* Turn on 3.3V */ |
329 | .init_data = &gpo_init, | 285 | .init_data = &gpo_init, |
330 | }, { | ||
331 | .id = MC13783_REG_VVIB, /* Power OV2640 */ | ||
332 | .init_data = &vvib_init, | ||
333 | }, | 286 | }, |
334 | }; | 287 | }; |
335 | 288 | ||
336 | /* MC13783 */ | 289 | /* MC13783 */ |
337 | static struct mc13xxx_codec_platform_data mx27_3ds_codec = { | ||
338 | .dac_ssi_port = MC13783_SSI1_PORT, | ||
339 | .adc_ssi_port = MC13783_SSI1_PORT, | ||
340 | }; | ||
341 | |||
342 | static struct mc13xxx_platform_data mc13783_pdata = { | 290 | static struct mc13xxx_platform_data mc13783_pdata = { |
343 | .regulators = { | 291 | .regulators = { |
344 | .regulators = mx27_3ds_regulators, | 292 | .regulators = mx27_3ds_regulators, |
345 | .num_regulators = ARRAY_SIZE(mx27_3ds_regulators), | 293 | .num_regulators = ARRAY_SIZE(mx27_3ds_regulators), |
346 | 294 | ||
347 | }, | 295 | }, |
348 | .flags = MC13XXX_USE_TOUCHSCREEN | MC13XXX_USE_RTC | | 296 | .flags = MC13783_USE_REGULATOR | MC13783_USE_TOUCHSCREEN | |
349 | MC13XXX_USE_CODEC, | 297 | MC13783_USE_RTC, |
350 | .codec = &mx27_3ds_codec, | ||
351 | }; | ||
352 | |||
353 | static struct imx_ssi_platform_data mx27_3ds_ssi_pdata = { | ||
354 | .flags = IMX_SSI_DMA | IMX_SSI_NET, | ||
355 | }; | 298 | }; |
356 | 299 | ||
357 | /* SPI */ | 300 | /* SPI */ |
@@ -369,51 +312,6 @@ static const struct spi_imx_master spi2_pdata __initconst = { | |||
369 | .num_chipselect = ARRAY_SIZE(spi2_chipselect), | 312 | .num_chipselect = ARRAY_SIZE(spi2_chipselect), |
370 | }; | 313 | }; |
371 | 314 | ||
372 | static int mx27_3ds_camera_power(struct device *dev, int on) | ||
373 | { | ||
374 | /* enable or disable the camera */ | ||
375 | pr_debug("%s: %s the camera\n", __func__, on ? "ENABLE" : "DISABLE"); | ||
376 | gpio_set_value(CSI_PWRDWN, on ? 0 : 1); | ||
377 | |||
378 | if (!on) | ||
379 | goto out; | ||
380 | |||
381 | /* If enabled, give a reset impulse */ | ||
382 | gpio_set_value(CSI_RESET, 0); | ||
383 | msleep(20); | ||
384 | gpio_set_value(CSI_RESET, 1); | ||
385 | msleep(100); | ||
386 | |||
387 | out: | ||
388 | return 0; | ||
389 | } | ||
390 | |||
391 | static struct i2c_board_info mx27_3ds_i2c_camera = { | ||
392 | I2C_BOARD_INFO("ov2640", 0x30), | ||
393 | }; | ||
394 | |||
395 | static struct regulator_bulk_data mx27_3ds_camera_regs[] = { | ||
396 | { .supply = "cmos_vcore" }, | ||
397 | { .supply = "cmos_2v8" }, | ||
398 | }; | ||
399 | |||
400 | static struct soc_camera_link iclink_ov2640 = { | ||
401 | .bus_id = 0, | ||
402 | .board_info = &mx27_3ds_i2c_camera, | ||
403 | .i2c_adapter_id = 0, | ||
404 | .power = mx27_3ds_camera_power, | ||
405 | .regulators = mx27_3ds_camera_regs, | ||
406 | .num_regulators = ARRAY_SIZE(mx27_3ds_camera_regs), | ||
407 | }; | ||
408 | |||
409 | static struct platform_device mx27_3ds_ov2640 = { | ||
410 | .name = "soc-camera-pdrv", | ||
411 | .id = 0, | ||
412 | .dev = { | ||
413 | .platform_data = &iclink_ov2640, | ||
414 | }, | ||
415 | }; | ||
416 | |||
417 | static struct imx_fb_videomode mx27_3ds_modes[] = { | 315 | static struct imx_fb_videomode mx27_3ds_modes[] = { |
418 | { /* 480x640 @ 60 Hz */ | 316 | { /* 480x640 @ 60 Hz */ |
419 | .mode = { | 317 | .mode = { |
@@ -450,6 +348,8 @@ static const struct imx_fb_platform_data mx27_3ds_fb_data __initconst = { | |||
450 | static struct l4f00242t03_pdata mx27_3ds_lcd_pdata = { | 348 | static struct l4f00242t03_pdata mx27_3ds_lcd_pdata = { |
451 | .reset_gpio = LCD_RESET, | 349 | .reset_gpio = LCD_RESET, |
452 | .data_enable_gpio = LCD_ENABLE, | 350 | .data_enable_gpio = LCD_ENABLE, |
351 | .core_supply = "lcd_2v8", | ||
352 | .io_supply = "vdd_lcdio", | ||
453 | }; | 353 | }; |
454 | 354 | ||
455 | static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | 355 | static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { |
@@ -459,7 +359,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | |||
459 | .bus_num = 1, | 359 | .bus_num = 1, |
460 | .chip_select = 0, /* SS0 */ | 360 | .chip_select = 0, /* SS0 */ |
461 | .platform_data = &mc13783_pdata, | 361 | .platform_data = &mc13783_pdata, |
462 | /* irq number is run-time assigned */ | 362 | .irq = gpio_to_irq(PMIC_INT), |
463 | .mode = SPI_CS_HIGH, | 363 | .mode = SPI_CS_HIGH, |
464 | }, { | 364 | }, { |
465 | .modalias = "l4f00242t03", | 365 | .modalias = "l4f00242t03", |
@@ -470,21 +370,12 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | |||
470 | }, | 370 | }, |
471 | }; | 371 | }; |
472 | 372 | ||
473 | static struct platform_device *devices[] __initdata = { | ||
474 | &mx27_3ds_ov2640, | ||
475 | }; | ||
476 | |||
477 | static const struct mx2_camera_platform_data mx27_3ds_cam_pdata __initconst = { | ||
478 | .clk = 26000000, | ||
479 | }; | ||
480 | |||
481 | static const struct imxi2c_platform_data mx27_3ds_i2c0_data __initconst = { | 373 | static const struct imxi2c_platform_data mx27_3ds_i2c0_data __initconst = { |
482 | .bitrate = 100000, | 374 | .bitrate = 100000, |
483 | }; | 375 | }; |
484 | 376 | ||
485 | static void __init mx27pdk_init(void) | 377 | static void __init mx27pdk_init(void) |
486 | { | 378 | { |
487 | int ret; | ||
488 | imx27_soc_init(); | 379 | imx27_soc_init(); |
489 | 380 | ||
490 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), | 381 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), |
@@ -494,7 +385,7 @@ static void __init mx27pdk_init(void) | |||
494 | imx27_add_fec(NULL); | 385 | imx27_add_fec(NULL); |
495 | imx27_add_imx_keypad(&mx27_3ds_keymap_data); | 386 | imx27_add_imx_keypad(&mx27_3ds_keymap_data); |
496 | imx27_add_mxc_mmc(0, &sdhc1_pdata); | 387 | imx27_add_mxc_mmc(0, &sdhc1_pdata); |
497 | imx27_add_imx2_wdt(); | 388 | imx27_add_imx2_wdt(NULL); |
498 | otg_phy_init(); | 389 | otg_phy_init(); |
499 | 390 | ||
500 | if (otg_mode_host) { | 391 | if (otg_mode_host) { |
@@ -510,27 +401,13 @@ static void __init mx27pdk_init(void) | |||
510 | 401 | ||
511 | imx27_add_spi_imx1(&spi2_pdata); | 402 | imx27_add_spi_imx1(&spi2_pdata); |
512 | imx27_add_spi_imx0(&spi1_pdata); | 403 | imx27_add_spi_imx0(&spi1_pdata); |
513 | mx27_3ds_spi_devs[0].irq = gpio_to_irq(PMIC_INT); | ||
514 | spi_register_board_info(mx27_3ds_spi_devs, | 404 | spi_register_board_info(mx27_3ds_spi_devs, |
515 | ARRAY_SIZE(mx27_3ds_spi_devs)); | 405 | ARRAY_SIZE(mx27_3ds_spi_devs)); |
516 | 406 | ||
517 | if (mxc_expio_init(MX27_CS5_BASE_ADDR, IMX_GPIO_NR(3, 28))) | 407 | if (mxc_expio_init(MX27_CS5_BASE_ADDR, EXPIO_PARENT_INT)) |
518 | pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n"); | 408 | pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n"); |
519 | imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data); | 409 | imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data); |
520 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
521 | imx27_add_imx_fb(&mx27_3ds_fb_data); | 410 | imx27_add_imx_fb(&mx27_3ds_fb_data); |
522 | |||
523 | ret = gpio_request_array(mx27_3ds_camera_gpios, | ||
524 | ARRAY_SIZE(mx27_3ds_camera_gpios)); | ||
525 | if (ret) { | ||
526 | pr_err("Failed to request camera gpios"); | ||
527 | iclink_ov2640.power = NULL; | ||
528 | } | ||
529 | |||
530 | imx27_add_mx2_camera(&mx27_3ds_cam_pdata); | ||
531 | imx27_add_imx_ssi(0, &mx27_3ds_ssi_pdata); | ||
532 | |||
533 | imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); | ||
534 | } | 411 | } |
535 | 412 | ||
536 | static void __init mx27pdk_timer_init(void) | 413 | static void __init mx27pdk_timer_init(void) |
@@ -544,12 +421,10 @@ static struct sys_timer mx27pdk_timer = { | |||
544 | 421 | ||
545 | MACHINE_START(MX27_3DS, "Freescale MX27PDK") | 422 | MACHINE_START(MX27_3DS, "Freescale MX27PDK") |
546 | /* maintainer: Freescale Semiconductor, Inc. */ | 423 | /* maintainer: Freescale Semiconductor, Inc. */ |
547 | .atag_offset = 0x100, | 424 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
548 | .map_io = mx27_map_io, | 425 | .map_io = mx27_map_io, |
549 | .init_early = imx27_init_early, | 426 | .init_early = imx27_init_early, |
550 | .init_irq = mx27_init_irq, | 427 | .init_irq = mx27_init_irq, |
551 | .handle_irq = imx27_handle_irq, | ||
552 | .timer = &mx27pdk_timer, | 428 | .timer = &mx27pdk_timer, |
553 | .init_machine = mx27pdk_init, | 429 | .init_machine = mx27pdk_init, |
554 | .restart = mxc_restart, | ||
555 | MACHINE_END | 430 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index 3d036f57f0e..fc26ed71b9e 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | */ | 15 | */ |
16 | #include <linux/gpio.h> | 16 | |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
19 | #include <linux/mtd/map.h> | 19 | #include <linux/mtd/map.h> |
@@ -21,15 +21,16 @@ | |||
21 | #include <linux/mtd/physmap.h> | 21 | #include <linux/mtd/physmap.h> |
22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <mach/common.h> | ||
25 | #include <mach/hardware.h> | ||
24 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
27 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
30 | #include <mach/gpio.h> | ||
31 | #include <mach/iomux-mx27.h> | ||
28 | 32 | ||
29 | #include "common.h" | ||
30 | #include "devices-imx27.h" | 33 | #include "devices-imx27.h" |
31 | #include "hardware.h" | ||
32 | #include "iomux-mx27.h" | ||
33 | 34 | ||
34 | /* | 35 | /* |
35 | * Base address of PBC controller, CS4 | 36 | * Base address of PBC controller, CS4 |
@@ -246,25 +247,25 @@ static const struct imx_fb_platform_data mx27ads_fb_data __initconst = { | |||
246 | static int mx27ads_sdhc1_init(struct device *dev, irq_handler_t detect_irq, | 247 | static int mx27ads_sdhc1_init(struct device *dev, irq_handler_t detect_irq, |
247 | void *data) | 248 | void *data) |
248 | { | 249 | { |
249 | return request_irq(gpio_to_irq(IMX_GPIO_NR(5, 21)), detect_irq, | 250 | return request_irq(IRQ_GPIOE(21), detect_irq, IRQF_TRIGGER_RISING, |
250 | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data); | 251 | "sdhc1-card-detect", data); |
251 | } | 252 | } |
252 | 253 | ||
253 | static int mx27ads_sdhc2_init(struct device *dev, irq_handler_t detect_irq, | 254 | static int mx27ads_sdhc2_init(struct device *dev, irq_handler_t detect_irq, |
254 | void *data) | 255 | void *data) |
255 | { | 256 | { |
256 | return request_irq(gpio_to_irq(IMX_GPIO_NR(2, 7)), detect_irq, | 257 | return request_irq(IRQ_GPIOB(7), detect_irq, IRQF_TRIGGER_RISING, |
257 | IRQF_TRIGGER_RISING, "sdhc2-card-detect", data); | 258 | "sdhc2-card-detect", data); |
258 | } | 259 | } |
259 | 260 | ||
260 | static void mx27ads_sdhc1_exit(struct device *dev, void *data) | 261 | static void mx27ads_sdhc1_exit(struct device *dev, void *data) |
261 | { | 262 | { |
262 | free_irq(gpio_to_irq(IMX_GPIO_NR(5, 21)), data); | 263 | free_irq(IRQ_GPIOE(21), data); |
263 | } | 264 | } |
264 | 265 | ||
265 | static void mx27ads_sdhc2_exit(struct device *dev, void *data) | 266 | static void mx27ads_sdhc2_exit(struct device *dev, void *data) |
266 | { | 267 | { |
267 | free_irq(gpio_to_irq(IMX_GPIO_NR(2, 7)), data); | 268 | free_irq(IRQ_GPIOB(7), data); |
268 | } | 269 | } |
269 | 270 | ||
270 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { | 271 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { |
@@ -310,7 +311,7 @@ static void __init mx27ads_board_init(void) | |||
310 | 311 | ||
311 | imx27_add_fec(NULL); | 312 | imx27_add_fec(NULL); |
312 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 313 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
313 | imx27_add_mxc_w1(); | 314 | imx27_add_mxc_w1(NULL); |
314 | } | 315 | } |
315 | 316 | ||
316 | static void __init mx27ads_timer_init(void) | 317 | static void __init mx27ads_timer_init(void) |
@@ -344,12 +345,10 @@ static void __init mx27ads_map_io(void) | |||
344 | 345 | ||
345 | MACHINE_START(MX27ADS, "Freescale i.MX27ADS") | 346 | MACHINE_START(MX27ADS, "Freescale i.MX27ADS") |
346 | /* maintainer: Freescale Semiconductor, Inc. */ | 347 | /* maintainer: Freescale Semiconductor, Inc. */ |
347 | .atag_offset = 0x100, | 348 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
348 | .map_io = mx27ads_map_io, | 349 | .map_io = mx27ads_map_io, |
349 | .init_early = imx27_init_early, | 350 | .init_early = imx27_init_early, |
350 | .init_irq = mx27_init_irq, | 351 | .init_irq = mx27_init_irq, |
351 | .handle_irq = imx27_handle_irq, | ||
352 | .timer = &mx27ads_timer, | 352 | .timer = &mx27ads_timer, |
353 | .init_machine = mx27ads_board_init, | 353 | .init_machine = mx27ads_board_init, |
354 | .restart = mxc_restart, | ||
355 | MACHINE_END | 354 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index bc301befdd0..c20be753092 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -30,19 +30,21 @@ | |||
30 | 30 | ||
31 | #include <media/soc_camera.h> | 31 | #include <media/soc_camera.h> |
32 | 32 | ||
33 | #include <mach/hardware.h> | ||
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
35 | #include <asm/mach/time.h> | 36 | #include <asm/mach/time.h> |
36 | #include <asm/memory.h> | 37 | #include <asm/memory.h> |
37 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
38 | #include <asm/memblock.h> | 39 | #include <mach/common.h> |
40 | #include <mach/iomux-mx3.h> | ||
41 | #include <mach/3ds_debugboard.h> | ||
42 | #include <mach/ulpi.h> | ||
39 | 43 | ||
40 | #include "3ds_debugboard.h" | ||
41 | #include "common.h" | ||
42 | #include "devices-imx31.h" | 44 | #include "devices-imx31.h" |
43 | #include "hardware.h" | 45 | |
44 | #include "iomux-mx3.h" | 46 | /* CPLD IRQ line for external uart, external ethernet etc */ |
45 | #include "ulpi.h" | 47 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1) |
46 | 48 | ||
47 | static int mx31_3ds_pins[] = { | 49 | static int mx31_3ds_pins[] = { |
48 | /* UART1 */ | 50 | /* UART1 */ |
@@ -153,11 +155,6 @@ static int mx31_3ds_pins[] = { | |||
153 | MX31_PIN_CSI_VSYNC__CSI_VSYNC, | 155 | MX31_PIN_CSI_VSYNC__CSI_VSYNC, |
154 | MX31_PIN_CSI_D5__GPIO3_5, /* CMOS PWDN */ | 156 | MX31_PIN_CSI_D5__GPIO3_5, /* CMOS PWDN */ |
155 | IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_GPIO), /* CMOS reset */ | 157 | IOMUX_MODE(MX31_PIN_RI_DTE1, IOMUX_CONFIG_GPIO), /* CMOS reset */ |
156 | /* SSI */ | ||
157 | MX31_PIN_STXD4__STXD4, | ||
158 | MX31_PIN_SRXD4__SRXD4, | ||
159 | MX31_PIN_SCK4__SCK4, | ||
160 | MX31_PIN_SFS4__SFS4, | ||
161 | }; | 158 | }; |
162 | 159 | ||
163 | /* | 160 | /* |
@@ -274,6 +271,10 @@ static const struct fb_videomode fb_modedb[] = { | |||
274 | }, | 271 | }, |
275 | }; | 272 | }; |
276 | 273 | ||
274 | static struct ipu_platform_data mx3_ipu_data = { | ||
275 | .irq_base = MXC_IPU_IRQ_START, | ||
276 | }; | ||
277 | |||
277 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | 278 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
278 | .name = "Epson-VGA", | 279 | .name = "Epson-VGA", |
279 | .mode = fb_modedb, | 280 | .mode = fb_modedb, |
@@ -284,6 +285,8 @@ static struct mx3fb_platform_data mx3fb_pdata __initdata = { | |||
284 | static struct l4f00242t03_pdata mx31_3ds_l4f00242t03_pdata = { | 285 | static struct l4f00242t03_pdata mx31_3ds_l4f00242t03_pdata = { |
285 | .reset_gpio = IOMUX_TO_GPIO(MX31_PIN_LCS1), | 286 | .reset_gpio = IOMUX_TO_GPIO(MX31_PIN_LCS1), |
286 | .data_enable_gpio = IOMUX_TO_GPIO(MX31_PIN_SER_RS), | 287 | .data_enable_gpio = IOMUX_TO_GPIO(MX31_PIN_SER_RS), |
288 | .core_supply = "lcd_2v8", | ||
289 | .io_supply = "vdd_lcdio", | ||
287 | }; | 290 | }; |
288 | 291 | ||
289 | /* | 292 | /* |
@@ -310,7 +313,7 @@ static int mx31_3ds_sdhc1_init(struct device *dev, | |||
310 | return ret; | 313 | return ret; |
311 | } | 314 | } |
312 | 315 | ||
313 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)), | 316 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), |
314 | detect_irq, IRQF_DISABLED | | 317 | detect_irq, IRQF_DISABLED | |
315 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, | 318 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, |
316 | "sdhc1-detect", data); | 319 | "sdhc1-detect", data); |
@@ -329,7 +332,7 @@ gpio_free: | |||
329 | 332 | ||
330 | static void mx31_3ds_sdhc1_exit(struct device *dev, void *data) | 333 | static void mx31_3ds_sdhc1_exit(struct device *dev, void *data) |
331 | { | 334 | { |
332 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)), data); | 335 | free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), data); |
333 | gpio_free_array(mx31_3ds_sdhc1_gpios, | 336 | gpio_free_array(mx31_3ds_sdhc1_gpios, |
334 | ARRAY_SIZE(mx31_3ds_sdhc1_gpios)); | 337 | ARRAY_SIZE(mx31_3ds_sdhc1_gpios)); |
335 | } | 338 | } |
@@ -393,7 +396,7 @@ static struct regulator_init_data gpo_init = { | |||
393 | }; | 396 | }; |
394 | 397 | ||
395 | static struct regulator_consumer_supply vmmc2_consumers[] = { | 398 | static struct regulator_consumer_supply vmmc2_consumers[] = { |
396 | REGULATOR_SUPPLY("vmmc", "imx31-mmc.0"), | 399 | REGULATOR_SUPPLY("vmmc", "mxc-mmc.0"), |
397 | }; | 400 | }; |
398 | 401 | ||
399 | static struct regulator_init_data vmmc2_init = { | 402 | static struct regulator_init_data vmmc2_init = { |
@@ -408,7 +411,7 @@ static struct regulator_init_data vmmc2_init = { | |||
408 | }; | 411 | }; |
409 | 412 | ||
410 | static struct regulator_consumer_supply vmmc1_consumers[] = { | 413 | static struct regulator_consumer_supply vmmc1_consumers[] = { |
411 | REGULATOR_SUPPLY("vcore", "spi0.0"), | 414 | REGULATOR_SUPPLY("lcd_2v8", NULL), |
412 | REGULATOR_SUPPLY("cmos_2v8", "soc-camera-pdrv.0"), | 415 | REGULATOR_SUPPLY("cmos_2v8", "soc-camera-pdrv.0"), |
413 | }; | 416 | }; |
414 | 417 | ||
@@ -425,7 +428,7 @@ static struct regulator_init_data vmmc1_init = { | |||
425 | }; | 428 | }; |
426 | 429 | ||
427 | static struct regulator_consumer_supply vgen_consumers[] = { | 430 | static struct regulator_consumer_supply vgen_consumers[] = { |
428 | REGULATOR_SUPPLY("vdd", "spi0.0"), | 431 | REGULATOR_SUPPLY("vdd_lcdio", NULL), |
429 | }; | 432 | }; |
430 | 433 | ||
431 | static struct regulator_init_data vgen_init = { | 434 | static struct regulator_init_data vgen_init = { |
@@ -486,23 +489,12 @@ static struct mc13xxx_regulator_init_data mx31_3ds_regulators[] = { | |||
486 | }; | 489 | }; |
487 | 490 | ||
488 | /* MC13783 */ | 491 | /* MC13783 */ |
489 | static struct mc13xxx_codec_platform_data mx31_3ds_codec = { | ||
490 | .dac_ssi_port = MC13783_SSI1_PORT, | ||
491 | .adc_ssi_port = MC13783_SSI1_PORT, | ||
492 | }; | ||
493 | |||
494 | static struct mc13xxx_platform_data mc13783_pdata = { | 492 | static struct mc13xxx_platform_data mc13783_pdata = { |
495 | .regulators = { | 493 | .regulators = { |
496 | .regulators = mx31_3ds_regulators, | 494 | .regulators = mx31_3ds_regulators, |
497 | .num_regulators = ARRAY_SIZE(mx31_3ds_regulators), | 495 | .num_regulators = ARRAY_SIZE(mx31_3ds_regulators), |
498 | }, | 496 | }, |
499 | .codec = &mx31_3ds_codec, | 497 | .flags = MC13783_USE_REGULATOR | MC13783_USE_TOUCHSCREEN, |
500 | .flags = MC13XXX_USE_TOUCHSCREEN | MC13XXX_USE_RTC | MC13XXX_USE_CODEC, | ||
501 | |||
502 | }; | ||
503 | |||
504 | static struct imx_ssi_platform_data mx31_3ds_ssi_pdata = { | ||
505 | .flags = IMX_SSI_DMA | IMX_SSI_NET, | ||
506 | }; | 498 | }; |
507 | 499 | ||
508 | /* SPI */ | 500 | /* SPI */ |
@@ -532,7 +524,7 @@ static struct spi_board_info mx31_3ds_spi_devs[] __initdata = { | |||
532 | .bus_num = 1, | 524 | .bus_num = 1, |
533 | .chip_select = 1, /* SS2 */ | 525 | .chip_select = 1, /* SS2 */ |
534 | .platform_data = &mc13783_pdata, | 526 | .platform_data = &mc13783_pdata, |
535 | /* irq number is run-time assigned */ | 527 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), |
536 | .mode = SPI_CS_HIGH, | 528 | .mode = SPI_CS_HIGH, |
537 | }, { | 529 | }, { |
538 | .modalias = "l4f00242t03", | 530 | .modalias = "l4f00242t03", |
@@ -550,7 +542,7 @@ static const struct mxc_nand_platform_data | |||
550 | mx31_3ds_nand_board_info __initconst = { | 542 | mx31_3ds_nand_board_info __initconst = { |
551 | .width = 1, | 543 | .width = 1, |
552 | .hw_ecc = 1, | 544 | .hw_ecc = 1, |
553 | #ifdef CONFIG_MACH_MX31_3DS_MXC_NAND_USE_BBT | 545 | #ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT |
554 | .flash_bbt = 1, | 546 | .flash_bbt = 1, |
555 | #endif | 547 | #endif |
556 | }; | 548 | }; |
@@ -664,18 +656,18 @@ static const struct fsl_usb2_platform_data usbotg_pdata __initconst = { | |||
664 | .phy_mode = FSL_USB2_PHY_ULPI, | 656 | .phy_mode = FSL_USB2_PHY_ULPI, |
665 | }; | 657 | }; |
666 | 658 | ||
667 | static bool otg_mode_host __initdata; | 659 | static int otg_mode_host; |
668 | 660 | ||
669 | static int __init mx31_3ds_otg_mode(char *options) | 661 | static int __init mx31_3ds_otg_mode(char *options) |
670 | { | 662 | { |
671 | if (!strcmp(options, "host")) | 663 | if (!strcmp(options, "host")) |
672 | otg_mode_host = true; | 664 | otg_mode_host = 1; |
673 | else if (!strcmp(options, "device")) | 665 | else if (!strcmp(options, "device")) |
674 | otg_mode_host = false; | 666 | otg_mode_host = 0; |
675 | else | 667 | else |
676 | pr_info("otg_mode neither \"host\" nor \"device\". " | 668 | pr_info("otg_mode neither \"host\" nor \"device\". " |
677 | "Defaulting to device\n"); | 669 | "Defaulting to device\n"); |
678 | return 1; | 670 | return 0; |
679 | } | 671 | } |
680 | __setup("otg_mode=", mx31_3ds_otg_mode); | 672 | __setup("otg_mode=", mx31_3ds_otg_mode); |
681 | 673 | ||
@@ -707,7 +699,6 @@ static void __init mx31_3ds_init(void) | |||
707 | imx31_add_mxc_nand(&mx31_3ds_nand_board_info); | 699 | imx31_add_mxc_nand(&mx31_3ds_nand_board_info); |
708 | 700 | ||
709 | imx31_add_spi_imx1(&spi1_pdata); | 701 | imx31_add_spi_imx1(&spi1_pdata); |
710 | mx31_3ds_spi_devs[0].irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
711 | spi_register_board_info(mx31_3ds_spi_devs, | 702 | spi_register_board_info(mx31_3ds_spi_devs, |
712 | ARRAY_SIZE(mx31_3ds_spi_devs)); | 703 | ARRAY_SIZE(mx31_3ds_spi_devs)); |
713 | 704 | ||
@@ -730,15 +721,15 @@ static void __init mx31_3ds_init(void) | |||
730 | if (!otg_mode_host) | 721 | if (!otg_mode_host) |
731 | imx31_add_fsl_usb2_udc(&usbotg_pdata); | 722 | imx31_add_fsl_usb2_udc(&usbotg_pdata); |
732 | 723 | ||
733 | if (mxc_expio_init(MX31_CS5_BASE_ADDR, IOMUX_TO_GPIO(MX31_PIN_GPIO1_1))) | 724 | if (mxc_expio_init(MX31_CS5_BASE_ADDR, EXPIO_PARENT_INT)) |
734 | printk(KERN_WARNING "Init of the debug board failed, all " | 725 | printk(KERN_WARNING "Init of the debug board failed, all " |
735 | "devices on the debug board are unusable.\n"); | 726 | "devices on the debug board are unusable.\n"); |
736 | imx31_add_imx2_wdt(); | 727 | imx31_add_imx2_wdt(NULL); |
737 | imx31_add_imx_i2c0(&mx31_3ds_i2c0_data); | 728 | imx31_add_imx_i2c0(&mx31_3ds_i2c0_data); |
738 | imx31_add_mxc_mmc(0, &sdhc1_pdata); | 729 | imx31_add_mxc_mmc(0, &sdhc1_pdata); |
739 | 730 | ||
740 | imx31_add_spi_imx0(&spi0_pdata); | 731 | imx31_add_spi_imx0(&spi0_pdata); |
741 | imx31_add_ipu_core(); | 732 | imx31_add_ipu_core(&mx3_ipu_data); |
742 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | 733 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); |
743 | 734 | ||
744 | /* CSI */ | 735 | /* CSI */ |
@@ -751,10 +742,6 @@ static void __init mx31_3ds_init(void) | |||
751 | } | 742 | } |
752 | 743 | ||
753 | mx31_3ds_init_camera(); | 744 | mx31_3ds_init_camera(); |
754 | |||
755 | imx31_add_imx_ssi(0, &mx31_3ds_ssi_pdata); | ||
756 | |||
757 | imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); | ||
758 | } | 745 | } |
759 | 746 | ||
760 | static void __init mx31_3ds_timer_init(void) | 747 | static void __init mx31_3ds_timer_init(void) |
@@ -769,19 +756,19 @@ static struct sys_timer mx31_3ds_timer = { | |||
769 | static void __init mx31_3ds_reserve(void) | 756 | static void __init mx31_3ds_reserve(void) |
770 | { | 757 | { |
771 | /* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */ | 758 | /* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */ |
772 | mx3_camera_base = arm_memblock_steal(MX31_3DS_CAMERA_BUF_SIZE, | 759 | mx3_camera_base = memblock_alloc(MX31_3DS_CAMERA_BUF_SIZE, |
773 | MX31_3DS_CAMERA_BUF_SIZE); | 760 | MX31_3DS_CAMERA_BUF_SIZE); |
761 | memblock_free(mx3_camera_base, MX31_3DS_CAMERA_BUF_SIZE); | ||
762 | memblock_remove(mx3_camera_base, MX31_3DS_CAMERA_BUF_SIZE); | ||
774 | } | 763 | } |
775 | 764 | ||
776 | MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") | 765 | MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") |
777 | /* Maintainer: Freescale Semiconductor, Inc. */ | 766 | /* Maintainer: Freescale Semiconductor, Inc. */ |
778 | .atag_offset = 0x100, | 767 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
779 | .map_io = mx31_map_io, | 768 | .map_io = mx31_map_io, |
780 | .init_early = imx31_init_early, | 769 | .init_early = imx31_init_early, |
781 | .init_irq = mx31_init_irq, | 770 | .init_irq = mx31_init_irq, |
782 | .handle_irq = imx31_handle_irq, | ||
783 | .timer = &mx31_3ds_timer, | 771 | .timer = &mx31_3ds_timer, |
784 | .init_machine = mx31_3ds_init, | 772 | .init_machine = mx31_3ds_init, |
785 | .reserve = mx31_3ds_reserve, | 773 | .reserve = mx31_3ds_reserve, |
786 | .restart = mxc_restart, | ||
787 | MACHINE_END | 774 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c index 8b56f8883f3..29ca8907a78 100644 --- a/arch/arm/mach-imx/mach-mx31ads.c +++ b/arch/arm/mach-imx/mach-mx31ads.c | |||
@@ -21,13 +21,15 @@ | |||
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/irqdomain.h> | ||
25 | 24 | ||
26 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/time.h> | 27 | #include <asm/mach/time.h> |
29 | #include <asm/memory.h> | 28 | #include <asm/memory.h> |
30 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
30 | #include <mach/common.h> | ||
31 | #include <mach/board-mx31ads.h> | ||
32 | #include <mach/iomux-mx3.h> | ||
31 | 33 | ||
32 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 | 34 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 |
33 | #include <linux/mfd/wm8350/audio.h> | 35 | #include <linux/mfd/wm8350/audio.h> |
@@ -35,13 +37,7 @@ | |||
35 | #include <linux/mfd/wm8350/pmic.h> | 37 | #include <linux/mfd/wm8350/pmic.h> |
36 | #endif | 38 | #endif |
37 | 39 | ||
38 | #include "common.h" | ||
39 | #include "devices-imx31.h" | 40 | #include "devices-imx31.h" |
40 | #include "hardware.h" | ||
41 | #include "iomux-mx3.h" | ||
42 | |||
43 | /* Base address of PBC controller */ | ||
44 | #define PBC_BASE_ADDRESS MX31_CS4_BASE_ADDR_VIRT | ||
45 | 41 | ||
46 | /* PBC Board interrupt status register */ | 42 | /* PBC Board interrupt status register */ |
47 | #define PBC_INTSTATUS 0x000016 | 43 | #define PBC_INTSTATUS 0x000016 |
@@ -64,17 +60,14 @@ | |||
64 | #define PBC_INTSTATUS_REG (PBC_INTSTATUS + PBC_BASE_ADDRESS) | 60 | #define PBC_INTSTATUS_REG (PBC_INTSTATUS + PBC_BASE_ADDRESS) |
65 | #define PBC_INTMASK_SET_REG (PBC_INTMASK_SET + PBC_BASE_ADDRESS) | 61 | #define PBC_INTMASK_SET_REG (PBC_INTMASK_SET + PBC_BASE_ADDRESS) |
66 | #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) | 62 | #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) |
63 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4) | ||
67 | 64 | ||
68 | #define EXPIO_INT_XUART_INTA 10 | 65 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) |
69 | #define EXPIO_INT_XUART_INTB 11 | ||
70 | |||
71 | #define MXC_MAX_EXP_IO_LINES 16 | ||
72 | 66 | ||
73 | /* CS8900 */ | 67 | #define EXPIO_INT_XUART_INTA (MXC_EXP_IO_BASE + 10) |
74 | #define EXPIO_INT_ENET_INT 8 | 68 | #define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11) |
75 | #define CS4_CS8900_MMIO_START 0x20000 | ||
76 | 69 | ||
77 | static struct irq_domain *domain; | 70 | #define MXC_MAX_EXP_IO_LINES 16 |
78 | 71 | ||
79 | /* | 72 | /* |
80 | * The serial port definition structure. | 73 | * The serial port definition structure. |
@@ -83,6 +76,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
83 | { | 76 | { |
84 | .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTA), | 77 | .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTA), |
85 | .mapbase = (unsigned long)(MX31_CS4_BASE_ADDR + PBC_SC16C652_UARTA), | 78 | .mapbase = (unsigned long)(MX31_CS4_BASE_ADDR + PBC_SC16C652_UARTA), |
79 | .irq = EXPIO_INT_XUART_INTA, | ||
86 | .uartclk = 14745600, | 80 | .uartclk = 14745600, |
87 | .regshift = 0, | 81 | .regshift = 0, |
88 | .iotype = UPIO_MEM, | 82 | .iotype = UPIO_MEM, |
@@ -90,6 +84,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
90 | }, { | 84 | }, { |
91 | .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTB), | 85 | .membase = (void *)(PBC_BASE_ADDRESS + PBC_SC16C652_UARTB), |
92 | .mapbase = (unsigned long)(MX31_CS4_BASE_ADDR + PBC_SC16C652_UARTB), | 86 | .mapbase = (unsigned long)(MX31_CS4_BASE_ADDR + PBC_SC16C652_UARTB), |
87 | .irq = EXPIO_INT_XUART_INTB, | ||
93 | .uartclk = 14745600, | 88 | .uartclk = 14745600, |
94 | .regshift = 0, | 89 | .regshift = 0, |
95 | .iotype = UPIO_MEM, | 90 | .iotype = UPIO_MEM, |
@@ -106,37 +101,11 @@ static struct platform_device serial_device = { | |||
106 | }, | 101 | }, |
107 | }; | 102 | }; |
108 | 103 | ||
109 | static struct resource mx31ads_cs8900_resources[] __initdata = { | ||
110 | DEFINE_RES_MEM(MX31_CS4_BASE_ADDR + CS4_CS8900_MMIO_START, SZ_64K), | ||
111 | DEFINE_RES_IRQ(-1), | ||
112 | }; | ||
113 | |||
114 | static const struct platform_device_info mx31ads_cs8900_devinfo __initconst = { | ||
115 | .name = "cs89x0", | ||
116 | .id = 0, | ||
117 | .res = mx31ads_cs8900_resources, | ||
118 | .num_res = ARRAY_SIZE(mx31ads_cs8900_resources), | ||
119 | }; | ||
120 | |||
121 | static int __init mxc_init_extuart(void) | 104 | static int __init mxc_init_extuart(void) |
122 | { | 105 | { |
123 | serial_platform_data[0].irq = irq_find_mapping(domain, | ||
124 | EXPIO_INT_XUART_INTA); | ||
125 | serial_platform_data[1].irq = irq_find_mapping(domain, | ||
126 | EXPIO_INT_XUART_INTB); | ||
127 | return platform_device_register(&serial_device); | 106 | return platform_device_register(&serial_device); |
128 | } | 107 | } |
129 | 108 | ||
130 | static void __init mxc_init_ext_ethernet(void) | ||
131 | { | ||
132 | mx31ads_cs8900_resources[1].start = | ||
133 | irq_find_mapping(domain, EXPIO_INT_ENET_INT); | ||
134 | mx31ads_cs8900_resources[1].end = | ||
135 | irq_find_mapping(domain, EXPIO_INT_ENET_INT); | ||
136 | platform_device_register_full( | ||
137 | (struct platform_device_info *)&mx31ads_cs8900_devinfo); | ||
138 | } | ||
139 | |||
140 | static const struct imxuart_platform_data uart_pdata __initconst = { | 109 | static const struct imxuart_platform_data uart_pdata __initconst = { |
141 | .flags = IMXUART_HAVE_RTSCTS, | 110 | .flags = IMXUART_HAVE_RTSCTS, |
142 | }; | 111 | }; |
@@ -163,12 +132,12 @@ static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc) | |||
163 | imr_val = __raw_readw(PBC_INTMASK_SET_REG); | 132 | imr_val = __raw_readw(PBC_INTMASK_SET_REG); |
164 | int_valid = __raw_readw(PBC_INTSTATUS_REG) & imr_val; | 133 | int_valid = __raw_readw(PBC_INTSTATUS_REG) & imr_val; |
165 | 134 | ||
166 | expio_irq = 0; | 135 | expio_irq = MXC_EXP_IO_BASE; |
167 | for (; int_valid != 0; int_valid >>= 1, expio_irq++) { | 136 | for (; int_valid != 0; int_valid >>= 1, expio_irq++) { |
168 | if ((int_valid & 1) == 0) | 137 | if ((int_valid & 1) == 0) |
169 | continue; | 138 | continue; |
170 | 139 | ||
171 | generic_handle_irq(irq_find_mapping(domain, expio_irq)); | 140 | generic_handle_irq(expio_irq); |
172 | } | 141 | } |
173 | } | 142 | } |
174 | 143 | ||
@@ -178,7 +147,7 @@ static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc) | |||
178 | */ | 147 | */ |
179 | static void expio_mask_irq(struct irq_data *d) | 148 | static void expio_mask_irq(struct irq_data *d) |
180 | { | 149 | { |
181 | u32 expio = d->hwirq; | 150 | u32 expio = MXC_IRQ_TO_EXPIO(d->irq); |
182 | /* mask the interrupt */ | 151 | /* mask the interrupt */ |
183 | __raw_writew(1 << expio, PBC_INTMASK_CLEAR_REG); | 152 | __raw_writew(1 << expio, PBC_INTMASK_CLEAR_REG); |
184 | __raw_readw(PBC_INTMASK_CLEAR_REG); | 153 | __raw_readw(PBC_INTMASK_CLEAR_REG); |
@@ -190,7 +159,7 @@ static void expio_mask_irq(struct irq_data *d) | |||
190 | */ | 159 | */ |
191 | static void expio_ack_irq(struct irq_data *d) | 160 | static void expio_ack_irq(struct irq_data *d) |
192 | { | 161 | { |
193 | u32 expio = d->hwirq; | 162 | u32 expio = MXC_IRQ_TO_EXPIO(d->irq); |
194 | /* clear the interrupt status */ | 163 | /* clear the interrupt status */ |
195 | __raw_writew(1 << expio, PBC_INTSTATUS_REG); | 164 | __raw_writew(1 << expio, PBC_INTSTATUS_REG); |
196 | } | 165 | } |
@@ -201,7 +170,7 @@ static void expio_ack_irq(struct irq_data *d) | |||
201 | */ | 170 | */ |
202 | static void expio_unmask_irq(struct irq_data *d) | 171 | static void expio_unmask_irq(struct irq_data *d) |
203 | { | 172 | { |
204 | u32 expio = d->hwirq; | 173 | u32 expio = MXC_IRQ_TO_EXPIO(d->irq); |
205 | /* unmask the interrupt */ | 174 | /* unmask the interrupt */ |
206 | __raw_writew(1 << expio, PBC_INTMASK_SET_REG); | 175 | __raw_writew(1 << expio, PBC_INTMASK_SET_REG); |
207 | } | 176 | } |
@@ -215,8 +184,7 @@ static struct irq_chip expio_irq_chip = { | |||
215 | 184 | ||
216 | static void __init mx31ads_init_expio(void) | 185 | static void __init mx31ads_init_expio(void) |
217 | { | 186 | { |
218 | int irq_base; | 187 | int i; |
219 | int i, irq; | ||
220 | 188 | ||
221 | printk(KERN_INFO "MX31ADS EXPIO(CPLD) hardware\n"); | 189 | printk(KERN_INFO "MX31ADS EXPIO(CPLD) hardware\n"); |
222 | 190 | ||
@@ -228,21 +196,13 @@ static void __init mx31ads_init_expio(void) | |||
228 | /* disable the interrupt and clear the status */ | 196 | /* disable the interrupt and clear the status */ |
229 | __raw_writew(0xFFFF, PBC_INTMASK_CLEAR_REG); | 197 | __raw_writew(0xFFFF, PBC_INTMASK_CLEAR_REG); |
230 | __raw_writew(0xFFFF, PBC_INTSTATUS_REG); | 198 | __raw_writew(0xFFFF, PBC_INTSTATUS_REG); |
231 | 199 | for (i = MXC_EXP_IO_BASE; i < (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES); | |
232 | irq_base = irq_alloc_descs(-1, 0, MXC_MAX_EXP_IO_LINES, numa_node_id()); | 200 | i++) { |
233 | WARN_ON(irq_base < 0); | ||
234 | |||
235 | domain = irq_domain_add_legacy(NULL, MXC_MAX_EXP_IO_LINES, irq_base, 0, | ||
236 | &irq_domain_simple_ops, NULL); | ||
237 | WARN_ON(!domain); | ||
238 | |||
239 | for (i = irq_base; i < irq_base + MXC_MAX_EXP_IO_LINES; i++) { | ||
240 | irq_set_chip_and_handler(i, &expio_irq_chip, handle_level_irq); | 201 | irq_set_chip_and_handler(i, &expio_irq_chip, handle_level_irq); |
241 | set_irq_flags(i, IRQF_VALID); | 202 | set_irq_flags(i, IRQF_VALID); |
242 | } | 203 | } |
243 | irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_4)); | 204 | irq_set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_HIGH); |
244 | irq_set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH); | 205 | irq_set_chained_handler(EXPIO_PARENT_INT, mx31ads_expio_irq_handler); |
245 | irq_set_chained_handler(irq, mx31ads_expio_irq_handler); | ||
246 | } | 206 | } |
247 | 207 | ||
248 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 | 208 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 |
@@ -494,6 +454,7 @@ static int mx31_wm8350_init(struct wm8350 *wm8350) | |||
494 | 454 | ||
495 | static struct wm8350_platform_data __initdata mx31_wm8350_pdata = { | 455 | static struct wm8350_platform_data __initdata mx31_wm8350_pdata = { |
496 | .init = mx31_wm8350_init, | 456 | .init = mx31_wm8350_init, |
457 | .irq_base = MXC_BOARD_IRQ_START + MXC_MAX_EXP_IO_LINES, | ||
497 | }; | 458 | }; |
498 | #endif | 459 | #endif |
499 | 460 | ||
@@ -502,17 +463,13 @@ static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = { | |||
502 | { | 463 | { |
503 | I2C_BOARD_INFO("wm8350", 0x1a), | 464 | I2C_BOARD_INFO("wm8350", 0x1a), |
504 | .platform_data = &mx31_wm8350_pdata, | 465 | .platform_data = &mx31_wm8350_pdata, |
505 | /* irq number is run-time assigned */ | 466 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), |
506 | }, | 467 | }, |
507 | #endif | 468 | #endif |
508 | }; | 469 | }; |
509 | 470 | ||
510 | static void __init mxc_init_i2c(void) | 471 | static void __init mxc_init_i2c(void) |
511 | { | 472 | { |
512 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 | ||
513 | mx31ads_i2c1_devices[0].irq = | ||
514 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
515 | #endif | ||
516 | i2c_register_board_info(1, mx31ads_i2c1_devices, | 473 | i2c_register_board_info(1, mx31ads_i2c1_devices, |
517 | ARRAY_SIZE(mx31ads_i2c1_devices)); | 474 | ARRAY_SIZE(mx31ads_i2c1_devices)); |
518 | 475 | ||
@@ -535,15 +492,12 @@ static void __init mxc_init_audio(void) | |||
535 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); | 492 | mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); |
536 | } | 493 | } |
537 | 494 | ||
538 | /* | 495 | /* static mappings */ |
539 | * Static mappings, starting from the CS4 start address up to the start address | ||
540 | * of the CS8900. | ||
541 | */ | ||
542 | static struct map_desc mx31ads_io_desc[] __initdata = { | 496 | static struct map_desc mx31ads_io_desc[] __initdata = { |
543 | { | 497 | { |
544 | .virtual = (unsigned long)MX31_CS4_BASE_ADDR_VIRT, | 498 | .virtual = MX31_CS4_BASE_ADDR_VIRT, |
545 | .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR), | 499 | .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR), |
546 | .length = CS4_CS8900_MMIO_START, | 500 | .length = MX31_CS4_SIZE / 2, |
547 | .type = MT_DEVICE | 501 | .type = MT_DEVICE |
548 | }, | 502 | }, |
549 | }; | 503 | }; |
@@ -568,7 +522,6 @@ static void __init mx31ads_init(void) | |||
568 | mxc_init_imx_uart(); | 522 | mxc_init_imx_uart(); |
569 | mxc_init_i2c(); | 523 | mxc_init_i2c(); |
570 | mxc_init_audio(); | 524 | mxc_init_audio(); |
571 | mxc_init_ext_ethernet(); | ||
572 | } | 525 | } |
573 | 526 | ||
574 | static void __init mx31ads_timer_init(void) | 527 | static void __init mx31ads_timer_init(void) |
@@ -582,12 +535,10 @@ static struct sys_timer mx31ads_timer = { | |||
582 | 535 | ||
583 | MACHINE_START(MX31ADS, "Freescale MX31ADS") | 536 | MACHINE_START(MX31ADS, "Freescale MX31ADS") |
584 | /* Maintainer: Freescale Semiconductor, Inc. */ | 537 | /* Maintainer: Freescale Semiconductor, Inc. */ |
585 | .atag_offset = 0x100, | 538 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
586 | .map_io = mx31ads_map_io, | 539 | .map_io = mx31ads_map_io, |
587 | .init_early = imx31_init_early, | 540 | .init_early = imx31_init_early, |
588 | .init_irq = mx31ads_init_irq, | 541 | .init_irq = mx31ads_init_irq, |
589 | .handle_irq = imx31_handle_irq, | ||
590 | .timer = &mx31ads_timer, | 542 | .timer = &mx31ads_timer, |
591 | .init_machine = mx31ads_init, | 543 | .init_machine = mx31ads_init, |
592 | .restart = mxc_restart, | ||
593 | MACHINE_END | 544 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c index 08b9965c8b3..126913ad106 100644 --- a/arch/arm/mach-imx/mach-mx31lilly.c +++ b/arch/arm/mach-imx/mach-mx31lilly.c | |||
@@ -27,27 +27,25 @@ | |||
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
30 | #include <linux/moduleparam.h> | ||
31 | #include <linux/smsc911x.h> | 30 | #include <linux/smsc911x.h> |
32 | #include <linux/mtd/physmap.h> | 31 | #include <linux/mtd/physmap.h> |
33 | #include <linux/spi/spi.h> | 32 | #include <linux/spi/spi.h> |
34 | #include <linux/mfd/mc13783.h> | 33 | #include <linux/mfd/mc13783.h> |
35 | #include <linux/usb/otg.h> | 34 | #include <linux/usb/otg.h> |
36 | #include <linux/usb/ulpi.h> | 35 | #include <linux/usb/ulpi.h> |
37 | #include <linux/regulator/machine.h> | ||
38 | #include <linux/regulator/fixed.h> | ||
39 | 36 | ||
40 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
41 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
42 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
43 | #include <asm/mach/map.h> | 40 | #include <asm/mach/map.h> |
44 | 41 | ||
45 | #include "board-mx31lilly.h" | 42 | #include <mach/hardware.h> |
46 | #include "common.h" | 43 | #include <mach/common.h> |
44 | #include <mach/iomux-mx3.h> | ||
45 | #include <mach/board-mx31lilly.h> | ||
46 | #include <mach/ulpi.h> | ||
47 | |||
47 | #include "devices-imx31.h" | 48 | #include "devices-imx31.h" |
48 | #include "hardware.h" | ||
49 | #include "iomux-mx3.h" | ||
50 | #include "ulpi.h" | ||
51 | 49 | ||
52 | /* | 50 | /* |
53 | * This file contains module-specific initialization routines for LILLY-1131. | 51 | * This file contains module-specific initialization routines for LILLY-1131. |
@@ -64,7 +62,8 @@ static struct resource smsc91x_resources[] = { | |||
64 | .flags = IORESOURCE_MEM, | 62 | .flags = IORESOURCE_MEM, |
65 | }, | 63 | }, |
66 | { | 64 | { |
67 | /* irq number is run-time assigned */ | 65 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), |
66 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | ||
68 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, | 67 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, |
69 | } | 68 | } |
70 | }; | 69 | }; |
@@ -231,7 +230,7 @@ static struct spi_board_info mc13783_dev __initdata = { | |||
231 | .bus_num = 1, | 230 | .bus_num = 1, |
232 | .chip_select = 0, | 231 | .chip_select = 0, |
233 | .platform_data = &mc13783_pdata, | 232 | .platform_data = &mc13783_pdata, |
234 | /* irq number is run-time assigned */ | 233 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), |
235 | }; | 234 | }; |
236 | 235 | ||
237 | static struct platform_device *devices[] __initdata = { | 236 | static struct platform_device *devices[] __initdata = { |
@@ -242,11 +241,6 @@ static struct platform_device *devices[] __initdata = { | |||
242 | static int mx31lilly_baseboard; | 241 | static int mx31lilly_baseboard; |
243 | core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); | 242 | core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); |
244 | 243 | ||
245 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
246 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
247 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
248 | }; | ||
249 | |||
250 | static void __init mx31lilly_board_init(void) | 244 | static void __init mx31lilly_board_init(void) |
251 | { | 245 | { |
252 | imx31_soc_init(); | 246 | imx31_soc_init(); |
@@ -283,15 +277,8 @@ static void __init mx31lilly_board_init(void) | |||
283 | 277 | ||
284 | imx31_add_spi_imx0(&spi0_pdata); | 278 | imx31_add_spi_imx0(&spi0_pdata); |
285 | imx31_add_spi_imx1(&spi1_pdata); | 279 | imx31_add_spi_imx1(&spi1_pdata); |
286 | mc13783_dev.irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
287 | spi_register_board_info(&mc13783_dev, 1); | 280 | spi_register_board_info(&mc13783_dev, 1); |
288 | 281 | ||
289 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
290 | |||
291 | smsc91x_resources[1].start = | ||
292 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
293 | smsc91x_resources[1].end = | ||
294 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_0)); | ||
295 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 282 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
296 | 283 | ||
297 | /* USB */ | 284 | /* USB */ |
@@ -308,12 +295,10 @@ static struct sys_timer mx31lilly_timer = { | |||
308 | }; | 295 | }; |
309 | 296 | ||
310 | MACHINE_START(LILLY1131, "INCO startec LILLY-1131") | 297 | MACHINE_START(LILLY1131, "INCO startec LILLY-1131") |
311 | .atag_offset = 0x100, | 298 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
312 | .map_io = mx31_map_io, | 299 | .map_io = mx31_map_io, |
313 | .init_early = imx31_init_early, | 300 | .init_early = imx31_init_early, |
314 | .init_irq = mx31_init_irq, | 301 | .init_irq = mx31_init_irq, |
315 | .handle_irq = imx31_handle_irq, | ||
316 | .timer = &mx31lilly_timer, | 302 | .timer = &mx31lilly_timer, |
317 | .init_machine = mx31lilly_board_init, | 303 | .init_machine = mx31lilly_board_init, |
318 | .restart = mxc_restart, | ||
319 | MACHINE_END | 304 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c index bdcd92e5951..4b47fd9fdd8 100644 --- a/arch/arm/mach-imx/mach-mx31lite.c +++ b/arch/arm/mach-imx/mach-mx31lite.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/memory.h> | 21 | #include <linux/memory.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/moduleparam.h> | ||
25 | #include <linux/smsc911x.h> | 24 | #include <linux/smsc911x.h> |
26 | #include <linux/mfd/mc13783.h> | 25 | #include <linux/mfd/mc13783.h> |
27 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
@@ -29,8 +28,6 @@ | |||
29 | #include <linux/usb/ulpi.h> | 28 | #include <linux/usb/ulpi.h> |
30 | #include <linux/mtd/physmap.h> | 29 | #include <linux/mtd/physmap.h> |
31 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
32 | #include <linux/regulator/machine.h> | ||
33 | #include <linux/regulator/fixed.h> | ||
34 | 31 | ||
35 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
@@ -39,12 +36,14 @@ | |||
39 | #include <asm/page.h> | 36 | #include <asm/page.h> |
40 | #include <asm/setup.h> | 37 | #include <asm/setup.h> |
41 | 38 | ||
42 | #include "board-mx31lite.h" | 39 | #include <mach/hardware.h> |
43 | #include "common.h" | 40 | #include <mach/common.h> |
41 | #include <mach/board-mx31lite.h> | ||
42 | #include <mach/iomux-mx3.h> | ||
43 | #include <mach/irqs.h> | ||
44 | #include <mach/ulpi.h> | ||
45 | |||
44 | #include "devices-imx31.h" | 46 | #include "devices-imx31.h" |
45 | #include "hardware.h" | ||
46 | #include "iomux-mx3.h" | ||
47 | #include "ulpi.h" | ||
48 | 47 | ||
49 | /* | 48 | /* |
50 | * This file contains the module-specific initialization routines. | 49 | * This file contains the module-specific initialization routines. |
@@ -81,7 +80,8 @@ static struct resource smsc911x_resources[] = { | |||
81 | .end = MX31_CS4_BASE_ADDR + 0x100, | 80 | .end = MX31_CS4_BASE_ADDR + 0x100, |
82 | .flags = IORESOURCE_MEM, | 81 | .flags = IORESOURCE_MEM, |
83 | }, { | 82 | }, { |
84 | /* irq number is run-time assigned */ | 83 | .start = IOMUX_TO_IRQ(MX31_PIN_SFS6), |
84 | .end = IOMUX_TO_IRQ(MX31_PIN_SFS6), | ||
85 | .flags = IORESOURCE_IRQ, | 85 | .flags = IORESOURCE_IRQ, |
86 | }, | 86 | }, |
87 | }; | 87 | }; |
@@ -112,7 +112,8 @@ static const struct spi_imx_master spi1_pdata __initconst = { | |||
112 | }; | 112 | }; |
113 | 113 | ||
114 | static struct mc13xxx_platform_data mc13783_pdata __initdata = { | 114 | static struct mc13xxx_platform_data mc13783_pdata __initdata = { |
115 | .flags = MC13XXX_USE_RTC, | 115 | .flags = MC13XXX_USE_RTC | |
116 | MC13XXX_USE_REGULATOR, | ||
116 | }; | 117 | }; |
117 | 118 | ||
118 | static struct spi_board_info mc13783_spi_dev __initdata = { | 119 | static struct spi_board_info mc13783_spi_dev __initdata = { |
@@ -121,7 +122,7 @@ static struct spi_board_info mc13783_spi_dev __initdata = { | |||
121 | .bus_num = 1, | 122 | .bus_num = 1, |
122 | .chip_select = 0, | 123 | .chip_select = 0, |
123 | .platform_data = &mc13783_pdata, | 124 | .platform_data = &mc13783_pdata, |
124 | /* irq number is run-time assigned */ | 125 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), |
125 | }; | 126 | }; |
126 | 127 | ||
127 | /* | 128 | /* |
@@ -206,7 +207,7 @@ static struct platform_device physmap_flash_device = { | |||
206 | */ | 207 | */ |
207 | static struct map_desc mx31lite_io_desc[] __initdata = { | 208 | static struct map_desc mx31lite_io_desc[] __initdata = { |
208 | { | 209 | { |
209 | .virtual = (unsigned long)MX31_CS4_BASE_ADDR_VIRT, | 210 | .virtual = MX31_CS4_BASE_ADDR_VIRT, |
210 | .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR), | 211 | .pfn = __phys_to_pfn(MX31_CS4_BASE_ADDR), |
211 | .length = MX31_CS4_SIZE, | 212 | .length = MX31_CS4_SIZE, |
212 | .type = MT_DEVICE | 213 | .type = MT_DEVICE |
@@ -225,11 +226,6 @@ void __init mx31lite_map_io(void) | |||
225 | static int mx31lite_baseboard; | 226 | static int mx31lite_baseboard; |
226 | core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444); | 227 | core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444); |
227 | 228 | ||
228 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
229 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
230 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
231 | }; | ||
232 | |||
233 | static void __init mx31lite_init(void) | 229 | static void __init mx31lite_init(void) |
234 | { | 230 | { |
235 | int ret; | 231 | int ret; |
@@ -255,7 +251,6 @@ static void __init mx31lite_init(void) | |||
255 | imx31_add_mxc_nand(&mx31lite_nand_board_info); | 251 | imx31_add_mxc_nand(&mx31lite_nand_board_info); |
256 | 252 | ||
257 | imx31_add_spi_imx1(&spi1_pdata); | 253 | imx31_add_spi_imx1(&spi1_pdata); |
258 | mc13783_spi_dev.irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
259 | spi_register_board_info(&mc13783_spi_dev, 1); | 254 | spi_register_board_info(&mc13783_spi_dev, 1); |
260 | 255 | ||
261 | /* USB */ | 256 | /* USB */ |
@@ -264,18 +259,12 @@ static void __init mx31lite_init(void) | |||
264 | if (usbh2_pdata.otg) | 259 | if (usbh2_pdata.otg) |
265 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); | 260 | imx31_add_mxc_ehci_hs(2, &usbh2_pdata); |
266 | 261 | ||
267 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
268 | |||
269 | /* SMSC9117 IRQ pin */ | 262 | /* SMSC9117 IRQ pin */ |
270 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); | 263 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); |
271 | if (ret) | 264 | if (ret) |
272 | pr_warning("could not get LAN irq gpio\n"); | 265 | pr_warning("could not get LAN irq gpio\n"); |
273 | else { | 266 | else { |
274 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_SFS6)); | 267 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_SFS6)); |
275 | smsc911x_resources[1].start = | ||
276 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SFS6)); | ||
277 | smsc911x_resources[1].end = | ||
278 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SFS6)); | ||
279 | platform_device_register(&smsc911x_device); | 268 | platform_device_register(&smsc911x_device); |
280 | } | 269 | } |
281 | } | 270 | } |
@@ -285,18 +274,16 @@ static void __init mx31lite_timer_init(void) | |||
285 | mx31_clocks_init(26000000); | 274 | mx31_clocks_init(26000000); |
286 | } | 275 | } |
287 | 276 | ||
288 | static struct sys_timer mx31lite_timer = { | 277 | struct sys_timer mx31lite_timer = { |
289 | .init = mx31lite_timer_init, | 278 | .init = mx31lite_timer_init, |
290 | }; | 279 | }; |
291 | 280 | ||
292 | MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") | 281 | MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") |
293 | /* Maintainer: Freescale Semiconductor, Inc. */ | 282 | /* Maintainer: Freescale Semiconductor, Inc. */ |
294 | .atag_offset = 0x100, | 283 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
295 | .map_io = mx31lite_map_io, | 284 | .map_io = mx31lite_map_io, |
296 | .init_early = imx31_init_early, | 285 | .init_early = imx31_init_early, |
297 | .init_irq = mx31_init_irq, | 286 | .init_irq = mx31_init_irq, |
298 | .handle_irq = imx31_handle_irq, | ||
299 | .timer = &mx31lite_timer, | 287 | .timer = &mx31lite_timer, |
300 | .init_machine = mx31lite_init, | 288 | .init_machine = mx31lite_init, |
301 | .restart = mxc_restart, | ||
302 | MACHINE_END | 289 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index 2517cfa9f26..b358383120e 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/moduleparam.h> | ||
22 | #include <linux/leds.h> | 21 | #include <linux/leds.h> |
23 | #include <linux/memory.h> | 22 | #include <linux/memory.h> |
24 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
@@ -29,10 +28,6 @@ | |||
29 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
30 | #include <linux/types.h> | 29 | #include <linux/types.h> |
31 | #include <linux/memblock.h> | 30 | #include <linux/memblock.h> |
32 | #include <linux/clk.h> | ||
33 | #include <linux/io.h> | ||
34 | #include <linux/err.h> | ||
35 | #include <linux/input.h> | ||
36 | 31 | ||
37 | #include <linux/usb/otg.h> | 32 | #include <linux/usb/otg.h> |
38 | #include <linux/usb/ulpi.h> | 33 | #include <linux/usb/ulpi.h> |
@@ -41,15 +36,13 @@ | |||
41 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
42 | #include <asm/mach/time.h> | 37 | #include <asm/mach/time.h> |
43 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
44 | #include <asm/memblock.h> | 39 | #include <mach/board-mx31moboard.h> |
45 | #include <linux/platform_data/asoc-imx-ssi.h> | 40 | #include <mach/common.h> |
41 | #include <mach/hardware.h> | ||
42 | #include <mach/iomux-mx3.h> | ||
43 | #include <mach/ulpi.h> | ||
46 | 44 | ||
47 | #include "board-mx31moboard.h" | ||
48 | #include "common.h" | ||
49 | #include "devices-imx31.h" | 45 | #include "devices-imx31.h" |
50 | #include "hardware.h" | ||
51 | #include "iomux-mx3.h" | ||
52 | #include "ulpi.h" | ||
53 | 46 | ||
54 | static unsigned int moboard_pins[] = { | 47 | static unsigned int moboard_pins[] = { |
55 | /* UART0 */ | 48 | /* UART0 */ |
@@ -103,9 +96,6 @@ static unsigned int moboard_pins[] = { | |||
103 | MX31_PIN_CSPI3_MOSI__MOSI, MX31_PIN_CSPI3_MISO__MISO, | 96 | MX31_PIN_CSPI3_MOSI__MOSI, MX31_PIN_CSPI3_MISO__MISO, |
104 | MX31_PIN_CSPI3_SCLK__SCLK, MX31_PIN_CSPI3_SPI_RDY__SPI_RDY, | 97 | MX31_PIN_CSPI3_SCLK__SCLK, MX31_PIN_CSPI3_SPI_RDY__SPI_RDY, |
105 | MX31_PIN_CSPI2_SS1__CSPI3_SS1, | 98 | MX31_PIN_CSPI2_SS1__CSPI3_SS1, |
106 | /* SSI */ | ||
107 | MX31_PIN_STXD4__STXD4, MX31_PIN_SRXD4__SRXD4, | ||
108 | MX31_PIN_SCK4__SCK4, MX31_PIN_SFS4__SFS4, | ||
109 | }; | 99 | }; |
110 | 100 | ||
111 | static struct physmap_flash_data mx31moboard_flash_data = { | 101 | static struct physmap_flash_data mx31moboard_flash_data = { |
@@ -175,11 +165,11 @@ static const struct spi_imx_master moboard_spi1_pdata __initconst = { | |||
175 | 165 | ||
176 | static struct regulator_consumer_supply sdhc_consumers[] = { | 166 | static struct regulator_consumer_supply sdhc_consumers[] = { |
177 | { | 167 | { |
178 | .dev_name = "imx31-mmc.0", | 168 | .dev_name = "mxc-mmc.0", |
179 | .supply = "sdhc0_vcc", | 169 | .supply = "sdhc0_vcc", |
180 | }, | 170 | }, |
181 | { | 171 | { |
182 | .dev_name = "imx31-mmc.1", | 172 | .dev_name = "mxc-mmc.1", |
183 | .supply = "sdhc1_vcc", | 173 | .supply = "sdhc1_vcc", |
184 | }, | 174 | }, |
185 | }; | 175 | }; |
@@ -232,7 +222,7 @@ static struct mc13xxx_regulator_init_data moboard_regulators[] = { | |||
232 | }, | 222 | }, |
233 | }; | 223 | }; |
234 | 224 | ||
235 | static struct mc13xxx_led_platform_data moboard_led[] = { | 225 | static struct mc13783_led_platform_data moboard_led[] = { |
236 | { | 226 | { |
237 | .id = MC13783_LED_R1, | 227 | .id = MC13783_LED_R1, |
238 | .name = "coreboard-led-4:red", | 228 | .name = "coreboard-led-4:red", |
@@ -265,7 +255,7 @@ static struct mc13xxx_led_platform_data moboard_led[] = { | |||
265 | }, | 255 | }, |
266 | }; | 256 | }; |
267 | 257 | ||
268 | static struct mc13xxx_leds_platform_data moboard_leds = { | 258 | static struct mc13783_leds_platform_data moboard_leds = { |
269 | .num_leds = ARRAY_SIZE(moboard_led), | 259 | .num_leds = ARRAY_SIZE(moboard_led), |
270 | .led = moboard_led, | 260 | .led = moboard_led, |
271 | .flags = MC13783_LED_SLEWLIMTC, | 261 | .flags = MC13783_LED_SLEWLIMTC, |
@@ -274,36 +264,20 @@ static struct mc13xxx_leds_platform_data moboard_leds = { | |||
274 | .tc2_period = MC13783_LED_PERIOD_10MS, | 264 | .tc2_period = MC13783_LED_PERIOD_10MS, |
275 | }; | 265 | }; |
276 | 266 | ||
277 | static struct mc13xxx_buttons_platform_data moboard_buttons = { | ||
278 | .b1on_flags = MC13783_BUTTON_DBNC_750MS | MC13783_BUTTON_ENABLE | | ||
279 | MC13783_BUTTON_POL_INVERT, | ||
280 | .b1on_key = KEY_POWER, | ||
281 | }; | ||
282 | |||
283 | static struct mc13xxx_codec_platform_data moboard_codec = { | ||
284 | .dac_ssi_port = MC13783_SSI1_PORT, | ||
285 | .adc_ssi_port = MC13783_SSI1_PORT, | ||
286 | }; | ||
287 | |||
288 | static struct mc13xxx_platform_data moboard_pmic = { | 267 | static struct mc13xxx_platform_data moboard_pmic = { |
289 | .regulators = { | 268 | .regulators = { |
290 | .regulators = moboard_regulators, | 269 | .regulators = moboard_regulators, |
291 | .num_regulators = ARRAY_SIZE(moboard_regulators), | 270 | .num_regulators = ARRAY_SIZE(moboard_regulators), |
292 | }, | 271 | }, |
293 | .leds = &moboard_leds, | 272 | .leds = &moboard_leds, |
294 | .buttons = &moboard_buttons, | 273 | .flags = MC13XXX_USE_REGULATOR | MC13XXX_USE_RTC | |
295 | .codec = &moboard_codec, | 274 | MC13XXX_USE_ADC | MC13XXX_USE_LED, |
296 | .flags = MC13XXX_USE_RTC | MC13XXX_USE_ADC | MC13XXX_USE_CODEC, | ||
297 | }; | ||
298 | |||
299 | static struct imx_ssi_platform_data moboard_ssi_pdata = { | ||
300 | .flags = IMX_SSI_DMA | IMX_SSI_NET, | ||
301 | }; | 275 | }; |
302 | 276 | ||
303 | static struct spi_board_info moboard_spi_board_info[] __initdata = { | 277 | static struct spi_board_info moboard_spi_board_info[] __initdata = { |
304 | { | 278 | { |
305 | .modalias = "mc13783", | 279 | .modalias = "mc13783", |
306 | /* irq number is run-time assigned */ | 280 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), |
307 | .max_speed_hz = 300000, | 281 | .max_speed_hz = 300000, |
308 | .bus_num = 1, | 282 | .bus_num = 1, |
309 | .chip_select = 0, | 283 | .chip_select = 0, |
@@ -473,6 +447,10 @@ static const struct gpio_led_platform_data mx31moboard_led_pdata __initconst = { | |||
473 | .leds = mx31moboard_leds, | 447 | .leds = mx31moboard_leds, |
474 | }; | 448 | }; |
475 | 449 | ||
450 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
451 | .irq_base = MXC_IPU_IRQ_START, | ||
452 | }; | ||
453 | |||
476 | static struct platform_device *devices[] __initdata = { | 454 | static struct platform_device *devices[] __initdata = { |
477 | &mx31moboard_flash, | 455 | &mx31moboard_flash, |
478 | }; | 456 | }; |
@@ -490,7 +468,7 @@ static int __init mx31moboard_init_cam(void) | |||
490 | int dma, ret = -ENOMEM; | 468 | int dma, ret = -ENOMEM; |
491 | struct platform_device *pdev; | 469 | struct platform_device *pdev; |
492 | 470 | ||
493 | imx31_add_ipu_core(); | 471 | imx31_add_ipu_core(&mx3_ipu_data); |
494 | 472 | ||
495 | pdev = imx31_alloc_mx3_camera(&camera_pdata); | 473 | pdev = imx31_alloc_mx3_camera(&camera_pdata); |
496 | if (IS_ERR(pdev)) | 474 | if (IS_ERR(pdev)) |
@@ -512,18 +490,6 @@ err: | |||
512 | 490 | ||
513 | } | 491 | } |
514 | 492 | ||
515 | static void mx31moboard_poweroff(void) | ||
516 | { | ||
517 | struct clk *clk = clk_get_sys("imx2-wdt.0", NULL); | ||
518 | |||
519 | if (!IS_ERR(clk)) | ||
520 | clk_prepare_enable(clk); | ||
521 | |||
522 | mxc_iomux_mode(MX31_PIN_WATCHDOG_RST__WATCHDOG_RST); | ||
523 | |||
524 | __raw_writew(1 << 6 | 1 << 2, MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); | ||
525 | } | ||
526 | |||
527 | static int mx31moboard_baseboard; | 493 | static int mx31moboard_baseboard; |
528 | core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444); | 494 | core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444); |
529 | 495 | ||
@@ -540,8 +506,6 @@ static void __init mx31moboard_init(void) | |||
540 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 506 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
541 | gpio_led_register_device(-1, &mx31moboard_led_pdata); | 507 | gpio_led_register_device(-1, &mx31moboard_led_pdata); |
542 | 508 | ||
543 | imx31_add_imx2_wdt(); | ||
544 | |||
545 | imx31_add_imx_uart0(&uart0_pdata); | 509 | imx31_add_imx_uart0(&uart0_pdata); |
546 | imx31_add_imx_uart4(&uart4_pdata); | 510 | imx31_add_imx_uart4(&uart4_pdata); |
547 | 511 | ||
@@ -553,8 +517,6 @@ static void __init mx31moboard_init(void) | |||
553 | 517 | ||
554 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3), "pmic-irq"); | 518 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3), "pmic-irq"); |
555 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | 519 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); |
556 | moboard_spi_board_info[0].irq = | ||
557 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
558 | spi_register_board_info(moboard_spi_board_info, | 520 | spi_register_board_info(moboard_spi_board_info, |
559 | ARRAY_SIZE(moboard_spi_board_info)); | 521 | ARRAY_SIZE(moboard_spi_board_info)); |
560 | 522 | ||
@@ -566,12 +528,6 @@ static void __init mx31moboard_init(void) | |||
566 | 528 | ||
567 | moboard_usbh2_init(); | 529 | moboard_usbh2_init(); |
568 | 530 | ||
569 | imx31_add_imx_ssi(0, &moboard_ssi_pdata); | ||
570 | |||
571 | imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); | ||
572 | |||
573 | pm_power_off = mx31moboard_poweroff; | ||
574 | |||
575 | switch (mx31moboard_baseboard) { | 531 | switch (mx31moboard_baseboard) { |
576 | case MX31NOBOARD: | 532 | case MX31NOBOARD: |
577 | break; | 533 | break; |
@@ -596,26 +552,26 @@ static void __init mx31moboard_timer_init(void) | |||
596 | mx31_clocks_init(26000000); | 552 | mx31_clocks_init(26000000); |
597 | } | 553 | } |
598 | 554 | ||
599 | static struct sys_timer mx31moboard_timer = { | 555 | struct sys_timer mx31moboard_timer = { |
600 | .init = mx31moboard_timer_init, | 556 | .init = mx31moboard_timer_init, |
601 | }; | 557 | }; |
602 | 558 | ||
603 | static void __init mx31moboard_reserve(void) | 559 | static void __init mx31moboard_reserve(void) |
604 | { | 560 | { |
605 | /* reserve 4 MiB for mx3-camera */ | 561 | /* reserve 4 MiB for mx3-camera */ |
606 | mx3_camera_base = arm_memblock_steal(MX3_CAMERA_BUF_SIZE, | 562 | mx3_camera_base = memblock_alloc(MX3_CAMERA_BUF_SIZE, |
607 | MX3_CAMERA_BUF_SIZE); | 563 | MX3_CAMERA_BUF_SIZE); |
564 | memblock_free(mx3_camera_base, MX3_CAMERA_BUF_SIZE); | ||
565 | memblock_remove(mx3_camera_base, MX3_CAMERA_BUF_SIZE); | ||
608 | } | 566 | } |
609 | 567 | ||
610 | MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") | 568 | MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") |
611 | /* Maintainer: Philippe Retornaz, EPFL Mobots group */ | 569 | /* Maintainer: Valentin Longchamp, EPFL Mobots group */ |
612 | .atag_offset = 0x100, | 570 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
613 | .reserve = mx31moboard_reserve, | 571 | .reserve = mx31moboard_reserve, |
614 | .map_io = mx31_map_io, | 572 | .map_io = mx31_map_io, |
615 | .init_early = imx31_init_early, | 573 | .init_early = imx31_init_early, |
616 | .init_irq = mx31_init_irq, | 574 | .init_irq = mx31_init_irq, |
617 | .handle_irq = imx31_handle_irq, | ||
618 | .timer = &mx31moboard_timer, | 575 | .timer = &mx31moboard_timer, |
619 | .init_machine = mx31moboard_init, | 576 | .init_machine = mx31moboard_init, |
620 | .restart = mxc_restart, | ||
621 | MACHINE_END | 577 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index 5277da45d60..b3b9bd8ac2a 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * | 4 | * |
5 | * Author: Fabio Estevam <fabio.estevam@freescale.com> | 5 | * Author: Fabio Estevam <fabio.estevam@freescale.com> |
6 | * | 6 | * |
7 | * Copyright (C) 2011 Meprolight, Ltd. | ||
8 | * Alex Gershgorin <alexg@meprolight.com> | ||
9 | * | ||
10 | * Modified from i.MX31 3-Stack Development System | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
13 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
14 | * the Free Software Foundation; either version 2 of the License, or | 9 | * the Free Software Foundation; either version 2 of the License, or |
@@ -34,102 +29,21 @@ | |||
34 | #include <linux/usb/otg.h> | 29 | #include <linux/usb/otg.h> |
35 | 30 | ||
36 | #include <linux/mtd/physmap.h> | 31 | #include <linux/mtd/physmap.h> |
37 | #include <linux/mfd/mc13892.h> | ||
38 | #include <linux/regulator/machine.h> | ||
39 | 32 | ||
40 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
41 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
42 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
43 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
44 | #include <asm/memblock.h> | ||
45 | 37 | ||
46 | #include <video/platform_lcd.h> | 38 | #include <mach/hardware.h> |
39 | #include <mach/common.h> | ||
40 | #include <mach/iomux-mx35.h> | ||
41 | #include <mach/irqs.h> | ||
42 | #include <mach/3ds_debugboard.h> | ||
47 | 43 | ||
48 | #include <media/soc_camera.h> | ||
49 | |||
50 | #include "3ds_debugboard.h" | ||
51 | #include "common.h" | ||
52 | #include "devices-imx35.h" | 44 | #include "devices-imx35.h" |
53 | #include "hardware.h" | ||
54 | #include "iomux-mx35.h" | ||
55 | |||
56 | #define GPIO_MC9S08DZ60_GPS_ENABLE 0 | ||
57 | #define GPIO_MC9S08DZ60_HDD_ENABLE 4 | ||
58 | #define GPIO_MC9S08DZ60_WIFI_ENABLE 5 | ||
59 | #define GPIO_MC9S08DZ60_LCD_ENABLE 6 | ||
60 | #define GPIO_MC9S08DZ60_SPEAKER_ENABLE 8 | ||
61 | |||
62 | static const struct fb_videomode fb_modedb[] = { | ||
63 | { | ||
64 | /* 800x480 @ 55 Hz */ | ||
65 | .name = "Ceramate-CLAA070VC01", | ||
66 | .refresh = 55, | ||
67 | .xres = 800, | ||
68 | .yres = 480, | ||
69 | .pixclock = 40000, | ||
70 | .left_margin = 40, | ||
71 | .right_margin = 40, | ||
72 | .upper_margin = 5, | ||
73 | .lower_margin = 5, | ||
74 | .hsync_len = 20, | ||
75 | .vsync_len = 10, | ||
76 | .sync = FB_SYNC_OE_ACT_HIGH, | ||
77 | .vmode = FB_VMODE_NONINTERLACED, | ||
78 | .flag = 0, | ||
79 | }, | ||
80 | }; | ||
81 | |||
82 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | ||
83 | .name = "Ceramate-CLAA070VC01", | ||
84 | .mode = fb_modedb, | ||
85 | .num_modes = ARRAY_SIZE(fb_modedb), | ||
86 | }; | ||
87 | |||
88 | static struct i2c_board_info __initdata i2c_devices_3ds[] = { | ||
89 | { | ||
90 | I2C_BOARD_INFO("mc9s08dz60", 0x69), | ||
91 | }, | ||
92 | }; | ||
93 | |||
94 | static int lcd_power_gpio = -ENXIO; | ||
95 | |||
96 | static int mc9s08dz60_gpiochip_match(struct gpio_chip *chip, void *data) | ||
97 | { | ||
98 | return !strcmp(chip->label, data); | ||
99 | } | ||
100 | 45 | ||
101 | static void mx35_3ds_lcd_set_power( | 46 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 1)) |
102 | struct plat_lcd_data *pd, unsigned int power) | ||
103 | { | ||
104 | struct gpio_chip *chip; | ||
105 | |||
106 | if (!gpio_is_valid(lcd_power_gpio)) { | ||
107 | chip = gpiochip_find( | ||
108 | "mc9s08dz60", mc9s08dz60_gpiochip_match); | ||
109 | if (chip) { | ||
110 | lcd_power_gpio = | ||
111 | chip->base + GPIO_MC9S08DZ60_LCD_ENABLE; | ||
112 | if (gpio_request(lcd_power_gpio, "lcd_power") < 0) { | ||
113 | pr_err("error: gpio already requested!\n"); | ||
114 | lcd_power_gpio = -ENXIO; | ||
115 | } | ||
116 | } else { | ||
117 | pr_err("error: didn't find mc9s08dz60 gpio chip\n"); | ||
118 | } | ||
119 | } | ||
120 | |||
121 | if (gpio_is_valid(lcd_power_gpio)) | ||
122 | gpio_set_value_cansleep(lcd_power_gpio, power); | ||
123 | } | ||
124 | |||
125 | static struct plat_lcd_data mx35_3ds_lcd_data = { | ||
126 | .set_power = mx35_3ds_lcd_set_power, | ||
127 | }; | ||
128 | |||
129 | static struct platform_device mx35_3ds_lcd = { | ||
130 | .name = "platform-lcd", | ||
131 | .dev.platform_data = &mx35_3ds_lcd_data, | ||
132 | }; | ||
133 | 47 | ||
134 | static const struct imxuart_platform_data uart_pdata __initconst = { | 48 | static const struct imxuart_platform_data uart_pdata __initconst = { |
135 | .flags = IMXUART_HAVE_RTSCTS, | 49 | .flags = IMXUART_HAVE_RTSCTS, |
@@ -206,297 +120,8 @@ static iomux_v3_cfg_t mx35pdk_pads[] = { | |||
206 | /* I2C1 */ | 120 | /* I2C1 */ |
207 | MX35_PAD_I2C1_CLK__I2C1_SCL, | 121 | MX35_PAD_I2C1_CLK__I2C1_SCL, |
208 | MX35_PAD_I2C1_DAT__I2C1_SDA, | 122 | MX35_PAD_I2C1_DAT__I2C1_SDA, |
209 | /* Display */ | ||
210 | MX35_PAD_LD0__IPU_DISPB_DAT_0, | ||
211 | MX35_PAD_LD1__IPU_DISPB_DAT_1, | ||
212 | MX35_PAD_LD2__IPU_DISPB_DAT_2, | ||
213 | MX35_PAD_LD3__IPU_DISPB_DAT_3, | ||
214 | MX35_PAD_LD4__IPU_DISPB_DAT_4, | ||
215 | MX35_PAD_LD5__IPU_DISPB_DAT_5, | ||
216 | MX35_PAD_LD6__IPU_DISPB_DAT_6, | ||
217 | MX35_PAD_LD7__IPU_DISPB_DAT_7, | ||
218 | MX35_PAD_LD8__IPU_DISPB_DAT_8, | ||
219 | MX35_PAD_LD9__IPU_DISPB_DAT_9, | ||
220 | MX35_PAD_LD10__IPU_DISPB_DAT_10, | ||
221 | MX35_PAD_LD11__IPU_DISPB_DAT_11, | ||
222 | MX35_PAD_LD12__IPU_DISPB_DAT_12, | ||
223 | MX35_PAD_LD13__IPU_DISPB_DAT_13, | ||
224 | MX35_PAD_LD14__IPU_DISPB_DAT_14, | ||
225 | MX35_PAD_LD15__IPU_DISPB_DAT_15, | ||
226 | MX35_PAD_LD16__IPU_DISPB_DAT_16, | ||
227 | MX35_PAD_LD17__IPU_DISPB_DAT_17, | ||
228 | MX35_PAD_D3_HSYNC__IPU_DISPB_D3_HSYNC, | ||
229 | MX35_PAD_D3_FPSHIFT__IPU_DISPB_D3_CLK, | ||
230 | MX35_PAD_D3_DRDY__IPU_DISPB_D3_DRDY, | ||
231 | MX35_PAD_CONTRAST__IPU_DISPB_CONTR, | ||
232 | MX35_PAD_D3_VSYNC__IPU_DISPB_D3_VSYNC, | ||
233 | MX35_PAD_D3_REV__IPU_DISPB_D3_REV, | ||
234 | MX35_PAD_D3_CLS__IPU_DISPB_D3_CLS, | ||
235 | /* CSI */ | ||
236 | MX35_PAD_TX1__IPU_CSI_D_6, | ||
237 | MX35_PAD_TX0__IPU_CSI_D_7, | ||
238 | MX35_PAD_CSI_D8__IPU_CSI_D_8, | ||
239 | MX35_PAD_CSI_D9__IPU_CSI_D_9, | ||
240 | MX35_PAD_CSI_D10__IPU_CSI_D_10, | ||
241 | MX35_PAD_CSI_D11__IPU_CSI_D_11, | ||
242 | MX35_PAD_CSI_D12__IPU_CSI_D_12, | ||
243 | MX35_PAD_CSI_D13__IPU_CSI_D_13, | ||
244 | MX35_PAD_CSI_D14__IPU_CSI_D_14, | ||
245 | MX35_PAD_CSI_D15__IPU_CSI_D_15, | ||
246 | MX35_PAD_CSI_HSYNC__IPU_CSI_HSYNC, | ||
247 | MX35_PAD_CSI_MCLK__IPU_CSI_MCLK, | ||
248 | MX35_PAD_CSI_PIXCLK__IPU_CSI_PIXCLK, | ||
249 | MX35_PAD_CSI_VSYNC__IPU_CSI_VSYNC, | ||
250 | /*PMIC IRQ*/ | ||
251 | MX35_PAD_GPIO2_0__GPIO2_0, | ||
252 | }; | ||
253 | |||
254 | /* | ||
255 | * Camera support | ||
256 | */ | ||
257 | static phys_addr_t mx3_camera_base __initdata; | ||
258 | #define MX35_3DS_CAMERA_BUF_SIZE SZ_8M | ||
259 | |||
260 | static const struct mx3_camera_pdata mx35_3ds_camera_pdata __initconst = { | ||
261 | .flags = MX3_CAMERA_DATAWIDTH_8, | ||
262 | .mclk_10khz = 2000, | ||
263 | }; | ||
264 | |||
265 | static int __init imx35_3ds_init_camera(void) | ||
266 | { | ||
267 | int dma, ret = -ENOMEM; | ||
268 | struct platform_device *pdev = | ||
269 | imx35_alloc_mx3_camera(&mx35_3ds_camera_pdata); | ||
270 | |||
271 | if (IS_ERR(pdev)) | ||
272 | return PTR_ERR(pdev); | ||
273 | |||
274 | if (!mx3_camera_base) | ||
275 | goto err; | ||
276 | |||
277 | dma = dma_declare_coherent_memory(&pdev->dev, | ||
278 | mx3_camera_base, mx3_camera_base, | ||
279 | MX35_3DS_CAMERA_BUF_SIZE, | ||
280 | DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); | ||
281 | |||
282 | if (!(dma & DMA_MEMORY_MAP)) | ||
283 | goto err; | ||
284 | |||
285 | ret = platform_device_add(pdev); | ||
286 | if (ret) | ||
287 | err: | ||
288 | platform_device_put(pdev); | ||
289 | |||
290 | return ret; | ||
291 | } | ||
292 | |||
293 | static struct i2c_board_info mx35_3ds_i2c_camera = { | ||
294 | I2C_BOARD_INFO("ov2640", 0x30), | ||
295 | }; | ||
296 | |||
297 | static struct soc_camera_link iclink_ov2640 = { | ||
298 | .bus_id = 0, | ||
299 | .board_info = &mx35_3ds_i2c_camera, | ||
300 | .i2c_adapter_id = 0, | ||
301 | .power = NULL, | ||
302 | }; | ||
303 | |||
304 | static struct platform_device mx35_3ds_ov2640 = { | ||
305 | .name = "soc-camera-pdrv", | ||
306 | .id = 0, | ||
307 | .dev = { | ||
308 | .platform_data = &iclink_ov2640, | ||
309 | }, | ||
310 | }; | ||
311 | |||
312 | static struct regulator_consumer_supply sw1_consumers[] = { | ||
313 | { | ||
314 | .supply = "cpu_vcc", | ||
315 | } | ||
316 | }; | ||
317 | |||
318 | static struct regulator_consumer_supply vcam_consumers[] = { | ||
319 | /* sgtl5000 */ | ||
320 | REGULATOR_SUPPLY("VDDA", "0-000a"), | ||
321 | }; | ||
322 | |||
323 | static struct regulator_consumer_supply vaudio_consumers[] = { | ||
324 | REGULATOR_SUPPLY("cmos_vio", "soc-camera-pdrv.0"), | ||
325 | }; | ||
326 | |||
327 | static struct regulator_init_data sw1_init = { | ||
328 | .constraints = { | ||
329 | .name = "SW1", | ||
330 | .min_uV = 600000, | ||
331 | .max_uV = 1375000, | ||
332 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | ||
333 | .valid_modes_mask = 0, | ||
334 | .always_on = 1, | ||
335 | .boot_on = 1, | ||
336 | }, | ||
337 | .num_consumer_supplies = ARRAY_SIZE(sw1_consumers), | ||
338 | .consumer_supplies = sw1_consumers, | ||
339 | }; | ||
340 | |||
341 | static struct regulator_init_data sw2_init = { | ||
342 | .constraints = { | ||
343 | .name = "SW2", | ||
344 | .always_on = 1, | ||
345 | .boot_on = 1, | ||
346 | } | ||
347 | }; | 123 | }; |
348 | 124 | ||
349 | static struct regulator_init_data sw3_init = { | ||
350 | .constraints = { | ||
351 | .name = "SW3", | ||
352 | .always_on = 1, | ||
353 | .boot_on = 1, | ||
354 | } | ||
355 | }; | ||
356 | |||
357 | static struct regulator_init_data sw4_init = { | ||
358 | .constraints = { | ||
359 | .name = "SW4", | ||
360 | .always_on = 1, | ||
361 | .boot_on = 1, | ||
362 | } | ||
363 | }; | ||
364 | |||
365 | static struct regulator_init_data viohi_init = { | ||
366 | .constraints = { | ||
367 | .name = "VIOHI", | ||
368 | .boot_on = 1, | ||
369 | } | ||
370 | }; | ||
371 | |||
372 | static struct regulator_init_data vusb_init = { | ||
373 | .constraints = { | ||
374 | .name = "VUSB", | ||
375 | .boot_on = 1, | ||
376 | } | ||
377 | }; | ||
378 | |||
379 | static struct regulator_init_data vdig_init = { | ||
380 | .constraints = { | ||
381 | .name = "VDIG", | ||
382 | .boot_on = 1, | ||
383 | } | ||
384 | }; | ||
385 | |||
386 | static struct regulator_init_data vpll_init = { | ||
387 | .constraints = { | ||
388 | .name = "VPLL", | ||
389 | .boot_on = 1, | ||
390 | } | ||
391 | }; | ||
392 | |||
393 | static struct regulator_init_data vusb2_init = { | ||
394 | .constraints = { | ||
395 | .name = "VUSB2", | ||
396 | .boot_on = 1, | ||
397 | } | ||
398 | }; | ||
399 | |||
400 | static struct regulator_init_data vvideo_init = { | ||
401 | .constraints = { | ||
402 | .name = "VVIDEO", | ||
403 | .boot_on = 1 | ||
404 | } | ||
405 | }; | ||
406 | |||
407 | static struct regulator_init_data vaudio_init = { | ||
408 | .constraints = { | ||
409 | .name = "VAUDIO", | ||
410 | .min_uV = 2300000, | ||
411 | .max_uV = 3000000, | ||
412 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | ||
413 | .boot_on = 1 | ||
414 | }, | ||
415 | .num_consumer_supplies = ARRAY_SIZE(vaudio_consumers), | ||
416 | .consumer_supplies = vaudio_consumers, | ||
417 | }; | ||
418 | |||
419 | static struct regulator_init_data vcam_init = { | ||
420 | .constraints = { | ||
421 | .name = "VCAM", | ||
422 | .min_uV = 2500000, | ||
423 | .max_uV = 3000000, | ||
424 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | ||
425 | REGULATOR_CHANGE_MODE, | ||
426 | .valid_modes_mask = REGULATOR_MODE_FAST | REGULATOR_MODE_NORMAL, | ||
427 | .boot_on = 1 | ||
428 | }, | ||
429 | .num_consumer_supplies = ARRAY_SIZE(vcam_consumers), | ||
430 | .consumer_supplies = vcam_consumers, | ||
431 | }; | ||
432 | |||
433 | static struct regulator_init_data vgen1_init = { | ||
434 | .constraints = { | ||
435 | .name = "VGEN1", | ||
436 | } | ||
437 | }; | ||
438 | |||
439 | static struct regulator_init_data vgen2_init = { | ||
440 | .constraints = { | ||
441 | .name = "VGEN2", | ||
442 | .boot_on = 1, | ||
443 | } | ||
444 | }; | ||
445 | |||
446 | static struct regulator_init_data vgen3_init = { | ||
447 | .constraints = { | ||
448 | .name = "VGEN3", | ||
449 | } | ||
450 | }; | ||
451 | |||
452 | static struct mc13xxx_regulator_init_data mx35_3ds_regulators[] = { | ||
453 | { .id = MC13892_SW1, .init_data = &sw1_init }, | ||
454 | { .id = MC13892_SW2, .init_data = &sw2_init }, | ||
455 | { .id = MC13892_SW3, .init_data = &sw3_init }, | ||
456 | { .id = MC13892_SW4, .init_data = &sw4_init }, | ||
457 | { .id = MC13892_VIOHI, .init_data = &viohi_init }, | ||
458 | { .id = MC13892_VPLL, .init_data = &vpll_init }, | ||
459 | { .id = MC13892_VDIG, .init_data = &vdig_init }, | ||
460 | { .id = MC13892_VUSB2, .init_data = &vusb2_init }, | ||
461 | { .id = MC13892_VVIDEO, .init_data = &vvideo_init }, | ||
462 | { .id = MC13892_VAUDIO, .init_data = &vaudio_init }, | ||
463 | { .id = MC13892_VCAM, .init_data = &vcam_init }, | ||
464 | { .id = MC13892_VGEN1, .init_data = &vgen1_init }, | ||
465 | { .id = MC13892_VGEN2, .init_data = &vgen2_init }, | ||
466 | { .id = MC13892_VGEN3, .init_data = &vgen3_init }, | ||
467 | { .id = MC13892_VUSB, .init_data = &vusb_init }, | ||
468 | }; | ||
469 | |||
470 | static struct mc13xxx_platform_data mx35_3ds_mc13892_data = { | ||
471 | .flags = MC13XXX_USE_RTC | MC13XXX_USE_TOUCHSCREEN, | ||
472 | .regulators = { | ||
473 | .num_regulators = ARRAY_SIZE(mx35_3ds_regulators), | ||
474 | .regulators = mx35_3ds_regulators, | ||
475 | }, | ||
476 | }; | ||
477 | |||
478 | #define GPIO_PMIC_INT IMX_GPIO_NR(2, 0) | ||
479 | |||
480 | static struct i2c_board_info mx35_3ds_i2c_mc13892 = { | ||
481 | |||
482 | I2C_BOARD_INFO("mc13892", 0x08), | ||
483 | .platform_data = &mx35_3ds_mc13892_data, | ||
484 | /* irq number is run-time assigned */ | ||
485 | }; | ||
486 | |||
487 | static void __init imx35_3ds_init_mc13892(void) | ||
488 | { | ||
489 | int ret = gpio_request_one(GPIO_PMIC_INT, GPIOF_DIR_IN, "pmic irq"); | ||
490 | |||
491 | if (ret) { | ||
492 | pr_err("failed to get pmic irq: %d\n", ret); | ||
493 | return; | ||
494 | } | ||
495 | |||
496 | mx35_3ds_i2c_mc13892.irq = gpio_to_irq(GPIO_PMIC_INT); | ||
497 | i2c_register_board_info(0, &mx35_3ds_i2c_mc13892, 1); | ||
498 | } | ||
499 | |||
500 | static int mx35_3ds_otg_init(struct platform_device *pdev) | 125 | static int mx35_3ds_otg_init(struct platform_device *pdev) |
501 | { | 126 | { |
502 | return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY); | 127 | return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY); |
@@ -530,18 +155,18 @@ static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { | |||
530 | .portsc = MXC_EHCI_MODE_SERIAL, | 155 | .portsc = MXC_EHCI_MODE_SERIAL, |
531 | }; | 156 | }; |
532 | 157 | ||
533 | static bool otg_mode_host __initdata; | 158 | static int otg_mode_host; |
534 | 159 | ||
535 | static int __init mx35_3ds_otg_mode(char *options) | 160 | static int __init mx35_3ds_otg_mode(char *options) |
536 | { | 161 | { |
537 | if (!strcmp(options, "host")) | 162 | if (!strcmp(options, "host")) |
538 | otg_mode_host = true; | 163 | otg_mode_host = 1; |
539 | else if (!strcmp(options, "device")) | 164 | else if (!strcmp(options, "device")) |
540 | otg_mode_host = false; | 165 | otg_mode_host = 0; |
541 | else | 166 | else |
542 | pr_info("otg_mode neither \"host\" nor \"device\". " | 167 | pr_info("otg_mode neither \"host\" nor \"device\". " |
543 | "Defaulting to device\n"); | 168 | "Defaulting to device\n"); |
544 | return 1; | 169 | return 0; |
545 | } | 170 | } |
546 | __setup("otg_mode=", mx35_3ds_otg_mode); | 171 | __setup("otg_mode=", mx35_3ds_otg_mode); |
547 | 172 | ||
@@ -554,15 +179,12 @@ static const struct imxi2c_platform_data mx35_3ds_i2c0_data __initconst = { | |||
554 | */ | 179 | */ |
555 | static void __init mx35_3ds_init(void) | 180 | static void __init mx35_3ds_init(void) |
556 | { | 181 | { |
557 | struct platform_device *imx35_fb_pdev; | ||
558 | |||
559 | imx35_soc_init(); | 182 | imx35_soc_init(); |
560 | 183 | ||
561 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); | 184 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); |
562 | 185 | ||
563 | imx35_add_fec(NULL); | 186 | imx35_add_fec(NULL); |
564 | imx35_add_imx2_wdt(); | 187 | imx35_add_imx2_wdt(NULL); |
565 | imx35_add_mxc_rtc(); | ||
566 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 188 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
567 | 189 | ||
568 | imx35_add_imx_uart0(&uart_pdata); | 190 | imx35_add_imx_uart0(&uart_pdata); |
@@ -578,23 +200,10 @@ static void __init mx35_3ds_init(void) | |||
578 | imx35_add_mxc_nand(&mx35pdk_nand_board_info); | 200 | imx35_add_mxc_nand(&mx35pdk_nand_board_info); |
579 | imx35_add_sdhci_esdhc_imx(0, NULL); | 201 | imx35_add_sdhci_esdhc_imx(0, NULL); |
580 | 202 | ||
581 | if (mxc_expio_init(MX35_CS5_BASE_ADDR, IMX_GPIO_NR(1, 1))) | 203 | if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT)) |
582 | pr_warn("Init of the debugboard failed, all " | 204 | pr_warn("Init of the debugboard failed, all " |
583 | "devices on the debugboard are unusable.\n"); | 205 | "devices on the debugboard are unusable.\n"); |
584 | imx35_add_imx_i2c0(&mx35_3ds_i2c0_data); | 206 | imx35_add_imx_i2c0(&mx35_3ds_i2c0_data); |
585 | |||
586 | i2c_register_board_info( | ||
587 | 0, i2c_devices_3ds, ARRAY_SIZE(i2c_devices_3ds)); | ||
588 | |||
589 | imx35_add_ipu_core(); | ||
590 | platform_device_register(&mx35_3ds_ov2640); | ||
591 | imx35_3ds_init_camera(); | ||
592 | |||
593 | imx35_fb_pdev = imx35_add_mx3_sdc_fb(&mx3fb_pdata); | ||
594 | mx35_3ds_lcd.dev.parent = &imx35_fb_pdev->dev; | ||
595 | platform_device_register(&mx35_3ds_lcd); | ||
596 | |||
597 | imx35_3ds_init_mc13892(); | ||
598 | } | 207 | } |
599 | 208 | ||
600 | static void __init mx35pdk_timer_init(void) | 209 | static void __init mx35pdk_timer_init(void) |
@@ -602,26 +211,16 @@ static void __init mx35pdk_timer_init(void) | |||
602 | mx35_clocks_init(); | 211 | mx35_clocks_init(); |
603 | } | 212 | } |
604 | 213 | ||
605 | static struct sys_timer mx35pdk_timer = { | 214 | struct sys_timer mx35pdk_timer = { |
606 | .init = mx35pdk_timer_init, | 215 | .init = mx35pdk_timer_init, |
607 | }; | 216 | }; |
608 | 217 | ||
609 | static void __init mx35_3ds_reserve(void) | ||
610 | { | ||
611 | /* reserve MX35_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */ | ||
612 | mx3_camera_base = arm_memblock_steal(MX35_3DS_CAMERA_BUF_SIZE, | ||
613 | MX35_3DS_CAMERA_BUF_SIZE); | ||
614 | } | ||
615 | |||
616 | MACHINE_START(MX35_3DS, "Freescale MX35PDK") | 218 | MACHINE_START(MX35_3DS, "Freescale MX35PDK") |
617 | /* Maintainer: Freescale Semiconductor, Inc */ | 219 | /* Maintainer: Freescale Semiconductor, Inc */ |
618 | .atag_offset = 0x100, | 220 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
619 | .map_io = mx35_map_io, | 221 | .map_io = mx35_map_io, |
620 | .init_early = imx35_init_early, | 222 | .init_early = imx35_init_early, |
621 | .init_irq = mx35_init_irq, | 223 | .init_irq = mx35_init_irq, |
622 | .handle_irq = imx35_handle_irq, | ||
623 | .timer = &mx35pdk_timer, | 224 | .timer = &mx35pdk_timer, |
624 | .init_machine = mx35_3ds_init, | 225 | .init_machine = mx35_3ds_init, |
625 | .reserve = mx35_3ds_reserve, | ||
626 | .restart = mxc_restart, | ||
627 | MACHINE_END | 226 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-mx50_rdp.c b/arch/arm/mach-imx/mach-mx50_rdp.c deleted file mode 100644 index 0c1f88a80bd..00000000000 --- a/arch/arm/mach-imx/mach-mx50_rdp.c +++ /dev/null | |||
@@ -1,225 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | |||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | |||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/platform_device.h> | ||
23 | #include <linux/gpio.h> | ||
24 | #include <linux/delay.h> | ||
25 | #include <linux/io.h> | ||
26 | |||
27 | #include <asm/irq.h> | ||
28 | #include <asm/setup.h> | ||
29 | #include <asm/mach-types.h> | ||
30 | #include <asm/mach/arch.h> | ||
31 | #include <asm/mach/time.h> | ||
32 | |||
33 | #include "common.h" | ||
34 | #include "devices-imx50.h" | ||
35 | #include "hardware.h" | ||
36 | #include "iomux-mx50.h" | ||
37 | |||
38 | #define FEC_EN IMX_GPIO_NR(6, 23) | ||
39 | #define FEC_RESET_B IMX_GPIO_NR(4, 12) | ||
40 | |||
41 | static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = { | ||
42 | /* SD1 */ | ||
43 | MX50_PAD_ECSPI2_SS0__GPIO_4_19, | ||
44 | MX50_PAD_EIM_CRE__GPIO_1_27, | ||
45 | MX50_PAD_SD1_CMD__SD1_CMD, | ||
46 | |||
47 | MX50_PAD_SD1_CLK__SD1_CLK, | ||
48 | MX50_PAD_SD1_D0__SD1_D0, | ||
49 | MX50_PAD_SD1_D1__SD1_D1, | ||
50 | MX50_PAD_SD1_D2__SD1_D2, | ||
51 | MX50_PAD_SD1_D3__SD1_D3, | ||
52 | |||
53 | /* SD2 */ | ||
54 | MX50_PAD_SD2_CD__GPIO_5_17, | ||
55 | MX50_PAD_SD2_WP__GPIO_5_16, | ||
56 | MX50_PAD_SD2_CMD__SD2_CMD, | ||
57 | MX50_PAD_SD2_CLK__SD2_CLK, | ||
58 | MX50_PAD_SD2_D0__SD2_D0, | ||
59 | MX50_PAD_SD2_D1__SD2_D1, | ||
60 | MX50_PAD_SD2_D2__SD2_D2, | ||
61 | MX50_PAD_SD2_D3__SD2_D3, | ||
62 | MX50_PAD_SD2_D4__SD2_D4, | ||
63 | MX50_PAD_SD2_D5__SD2_D5, | ||
64 | MX50_PAD_SD2_D6__SD2_D6, | ||
65 | MX50_PAD_SD2_D7__SD2_D7, | ||
66 | |||
67 | /* SD3 */ | ||
68 | MX50_PAD_SD3_CMD__SD3_CMD, | ||
69 | MX50_PAD_SD3_CLK__SD3_CLK, | ||
70 | MX50_PAD_SD3_D0__SD3_D0, | ||
71 | MX50_PAD_SD3_D1__SD3_D1, | ||
72 | MX50_PAD_SD3_D2__SD3_D2, | ||
73 | MX50_PAD_SD3_D3__SD3_D3, | ||
74 | MX50_PAD_SD3_D4__SD3_D4, | ||
75 | MX50_PAD_SD3_D5__SD3_D5, | ||
76 | MX50_PAD_SD3_D6__SD3_D6, | ||
77 | MX50_PAD_SD3_D7__SD3_D7, | ||
78 | |||
79 | /* PWR_INT */ | ||
80 | MX50_PAD_ECSPI2_MISO__GPIO_4_18, | ||
81 | |||
82 | /* UART pad setting */ | ||
83 | MX50_PAD_UART1_TXD__UART1_TXD, | ||
84 | MX50_PAD_UART1_RXD__UART1_RXD, | ||
85 | MX50_PAD_UART1_RTS__UART1_RTS, | ||
86 | MX50_PAD_UART2_TXD__UART2_TXD, | ||
87 | MX50_PAD_UART2_RXD__UART2_RXD, | ||
88 | MX50_PAD_UART2_CTS__UART2_CTS, | ||
89 | MX50_PAD_UART2_RTS__UART2_RTS, | ||
90 | |||
91 | MX50_PAD_I2C1_SCL__I2C1_SCL, | ||
92 | MX50_PAD_I2C1_SDA__I2C1_SDA, | ||
93 | MX50_PAD_I2C2_SCL__I2C2_SCL, | ||
94 | MX50_PAD_I2C2_SDA__I2C2_SDA, | ||
95 | |||
96 | MX50_PAD_EPITO__USBH1_PWR, | ||
97 | /* Need to comment below line if | ||
98 | * one needs to debug owire. | ||
99 | */ | ||
100 | MX50_PAD_OWIRE__USBH1_OC, | ||
101 | /* using gpio to control otg pwr */ | ||
102 | MX50_PAD_PWM2__GPIO_6_25, | ||
103 | MX50_PAD_I2C3_SCL__USBOTG_OC, | ||
104 | |||
105 | MX50_PAD_SSI_RXC__FEC_MDIO, | ||
106 | MX50_PAD_SSI_RXFS__FEC_MDC, | ||
107 | MX50_PAD_DISP_D0__FEC_TXCLK, | ||
108 | MX50_PAD_DISP_D1__FEC_RX_ER, | ||
109 | MX50_PAD_DISP_D2__FEC_RX_DV, | ||
110 | MX50_PAD_DISP_D3__FEC_RXD1, | ||
111 | MX50_PAD_DISP_D4__FEC_RXD0, | ||
112 | MX50_PAD_DISP_D5__FEC_TX_EN, | ||
113 | MX50_PAD_DISP_D6__FEC_TXD1, | ||
114 | MX50_PAD_DISP_D7__FEC_TXD0, | ||
115 | MX50_PAD_I2C3_SDA__GPIO_6_23, | ||
116 | MX50_PAD_ECSPI1_SCLK__GPIO_4_12, | ||
117 | |||
118 | MX50_PAD_CSPI_SS0__CSPI_SS0, | ||
119 | MX50_PAD_ECSPI1_MOSI__CSPI_SS1, | ||
120 | MX50_PAD_CSPI_MOSI__CSPI_MOSI, | ||
121 | MX50_PAD_CSPI_MISO__CSPI_MISO, | ||
122 | |||
123 | /* SGTL500_OSC_EN */ | ||
124 | MX50_PAD_UART1_CTS__GPIO_6_8, | ||
125 | |||
126 | /* SGTL_AMP_SHDN */ | ||
127 | MX50_PAD_UART3_RXD__GPIO_6_15, | ||
128 | |||
129 | /* Keypad */ | ||
130 | MX50_PAD_KEY_COL0__KEY_COL0, | ||
131 | MX50_PAD_KEY_ROW0__KEY_ROW0, | ||
132 | MX50_PAD_KEY_COL1__KEY_COL1, | ||
133 | MX50_PAD_KEY_ROW1__KEY_ROW1, | ||
134 | MX50_PAD_KEY_COL2__KEY_COL2, | ||
135 | MX50_PAD_KEY_ROW2__KEY_ROW2, | ||
136 | MX50_PAD_KEY_COL3__KEY_COL3, | ||
137 | MX50_PAD_KEY_ROW3__KEY_ROW3, | ||
138 | MX50_PAD_EIM_DA0__KEY_COL4, | ||
139 | MX50_PAD_EIM_DA1__KEY_ROW4, | ||
140 | MX50_PAD_EIM_DA2__KEY_COL5, | ||
141 | MX50_PAD_EIM_DA3__KEY_ROW5, | ||
142 | MX50_PAD_EIM_DA4__KEY_COL6, | ||
143 | MX50_PAD_EIM_DA5__KEY_ROW6, | ||
144 | MX50_PAD_EIM_DA6__KEY_COL7, | ||
145 | MX50_PAD_EIM_DA7__KEY_ROW7, | ||
146 | /*EIM pads */ | ||
147 | MX50_PAD_EIM_DA8__GPIO_1_8, | ||
148 | MX50_PAD_EIM_DA9__GPIO_1_9, | ||
149 | MX50_PAD_EIM_DA10__GPIO_1_10, | ||
150 | MX50_PAD_EIM_DA11__GPIO_1_11, | ||
151 | MX50_PAD_EIM_DA12__GPIO_1_12, | ||
152 | MX50_PAD_EIM_DA13__GPIO_1_13, | ||
153 | MX50_PAD_EIM_DA14__GPIO_1_14, | ||
154 | MX50_PAD_EIM_DA15__GPIO_1_15, | ||
155 | MX50_PAD_EIM_CS2__GPIO_1_16, | ||
156 | MX50_PAD_EIM_CS1__GPIO_1_17, | ||
157 | MX50_PAD_EIM_CS0__GPIO_1_18, | ||
158 | MX50_PAD_EIM_EB0__GPIO_1_19, | ||
159 | MX50_PAD_EIM_EB1__GPIO_1_20, | ||
160 | MX50_PAD_EIM_WAIT__GPIO_1_21, | ||
161 | MX50_PAD_EIM_BCLK__GPIO_1_22, | ||
162 | MX50_PAD_EIM_RDY__GPIO_1_23, | ||
163 | MX50_PAD_EIM_OE__GPIO_1_24, | ||
164 | }; | ||
165 | |||
166 | /* Serial ports */ | ||
167 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
168 | .flags = IMXUART_HAVE_RTSCTS, | ||
169 | }; | ||
170 | |||
171 | static const struct fec_platform_data fec_data __initconst = { | ||
172 | .phy = PHY_INTERFACE_MODE_RMII, | ||
173 | }; | ||
174 | |||
175 | static inline void mx50_rdp_fec_reset(void) | ||
176 | { | ||
177 | gpio_request(FEC_EN, "fec-en"); | ||
178 | gpio_direction_output(FEC_EN, 0); | ||
179 | gpio_request(FEC_RESET_B, "fec-reset_b"); | ||
180 | gpio_direction_output(FEC_RESET_B, 0); | ||
181 | msleep(1); | ||
182 | gpio_set_value(FEC_RESET_B, 1); | ||
183 | } | ||
184 | |||
185 | static const struct imxi2c_platform_data i2c_data __initconst = { | ||
186 | .bitrate = 100000, | ||
187 | }; | ||
188 | |||
189 | /* | ||
190 | * Board specific initialization. | ||
191 | */ | ||
192 | static void __init mx50_rdp_board_init(void) | ||
193 | { | ||
194 | imx50_soc_init(); | ||
195 | |||
196 | mxc_iomux_v3_setup_multiple_pads(mx50_rdp_pads, | ||
197 | ARRAY_SIZE(mx50_rdp_pads)); | ||
198 | |||
199 | imx50_add_imx_uart(0, &uart_pdata); | ||
200 | imx50_add_imx_uart(1, &uart_pdata); | ||
201 | mx50_rdp_fec_reset(); | ||
202 | imx50_add_fec(&fec_data); | ||
203 | imx50_add_imx_i2c(0, &i2c_data); | ||
204 | imx50_add_imx_i2c(1, &i2c_data); | ||
205 | imx50_add_imx_i2c(2, &i2c_data); | ||
206 | } | ||
207 | |||
208 | static void __init mx50_rdp_timer_init(void) | ||
209 | { | ||
210 | mx50_clocks_init(32768, 24000000, 22579200); | ||
211 | } | ||
212 | |||
213 | static struct sys_timer mx50_rdp_timer = { | ||
214 | .init = mx50_rdp_timer_init, | ||
215 | }; | ||
216 | |||
217 | MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform") | ||
218 | .map_io = mx50_map_io, | ||
219 | .init_early = imx50_init_early, | ||
220 | .init_irq = mx50_init_irq, | ||
221 | .handle_irq = imx50_handle_irq, | ||
222 | .timer = &mx50_rdp_timer, | ||
223 | .init_machine = mx50_rdp_board_init, | ||
224 | .restart = mxc_restart, | ||
225 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-mx51_3ds.c b/arch/arm/mach-imx/mach-mx51_3ds.c deleted file mode 100644 index abc25bd1107..00000000000 --- a/arch/arm/mach-imx/mach-mx51_3ds.c +++ /dev/null | |||
@@ -1,178 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2010 Jason Wang <jason77.wang@gmail.com> | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/irq.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/spi/spi.h> | ||
16 | #include <linux/gpio.h> | ||
17 | |||
18 | #include <asm/mach-types.h> | ||
19 | #include <asm/mach/arch.h> | ||
20 | #include <asm/mach/time.h> | ||
21 | |||
22 | #include "3ds_debugboard.h" | ||
23 | #include "common.h" | ||
24 | #include "devices-imx51.h" | ||
25 | #include "hardware.h" | ||
26 | #include "iomux-mx51.h" | ||
27 | |||
28 | #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) | ||
29 | |||
30 | static iomux_v3_cfg_t mx51_3ds_pads[] = { | ||
31 | /* UART1 */ | ||
32 | MX51_PAD_UART1_RXD__UART1_RXD, | ||
33 | MX51_PAD_UART1_TXD__UART1_TXD, | ||
34 | MX51_PAD_UART1_RTS__UART1_RTS, | ||
35 | MX51_PAD_UART1_CTS__UART1_CTS, | ||
36 | |||
37 | /* UART2 */ | ||
38 | MX51_PAD_UART2_RXD__UART2_RXD, | ||
39 | MX51_PAD_UART2_TXD__UART2_TXD, | ||
40 | MX51_PAD_EIM_D25__UART2_CTS, | ||
41 | MX51_PAD_EIM_D26__UART2_RTS, | ||
42 | |||
43 | /* UART3 */ | ||
44 | MX51_PAD_UART3_RXD__UART3_RXD, | ||
45 | MX51_PAD_UART3_TXD__UART3_TXD, | ||
46 | MX51_PAD_EIM_D24__UART3_CTS, | ||
47 | MX51_PAD_EIM_D27__UART3_RTS, | ||
48 | |||
49 | /* CPLD PARENT IRQ PIN */ | ||
50 | MX51_PAD_GPIO1_6__GPIO1_6, | ||
51 | |||
52 | /* KPP */ | ||
53 | MX51_PAD_KEY_ROW0__KEY_ROW0, | ||
54 | MX51_PAD_KEY_ROW1__KEY_ROW1, | ||
55 | MX51_PAD_KEY_ROW2__KEY_ROW2, | ||
56 | MX51_PAD_KEY_ROW3__KEY_ROW3, | ||
57 | MX51_PAD_KEY_COL0__KEY_COL0, | ||
58 | MX51_PAD_KEY_COL1__KEY_COL1, | ||
59 | MX51_PAD_KEY_COL2__KEY_COL2, | ||
60 | MX51_PAD_KEY_COL3__KEY_COL3, | ||
61 | MX51_PAD_KEY_COL4__KEY_COL4, | ||
62 | MX51_PAD_KEY_COL5__KEY_COL5, | ||
63 | |||
64 | /* eCSPI2 */ | ||
65 | MX51_PAD_NANDF_RB2__ECSPI2_SCLK, | ||
66 | MX51_PAD_NANDF_RB3__ECSPI2_MISO, | ||
67 | MX51_PAD_NANDF_D15__ECSPI2_MOSI, | ||
68 | MX51_PAD_NANDF_D12__GPIO3_28, | ||
69 | }; | ||
70 | |||
71 | /* Serial ports */ | ||
72 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
73 | .flags = IMXUART_HAVE_RTSCTS, | ||
74 | }; | ||
75 | |||
76 | static int mx51_3ds_board_keymap[] = { | ||
77 | KEY(0, 0, KEY_1), | ||
78 | KEY(0, 1, KEY_2), | ||
79 | KEY(0, 2, KEY_3), | ||
80 | KEY(0, 3, KEY_F1), | ||
81 | KEY(0, 4, KEY_UP), | ||
82 | KEY(0, 5, KEY_F2), | ||
83 | |||
84 | KEY(1, 0, KEY_4), | ||
85 | KEY(1, 1, KEY_5), | ||
86 | KEY(1, 2, KEY_6), | ||
87 | KEY(1, 3, KEY_LEFT), | ||
88 | KEY(1, 4, KEY_SELECT), | ||
89 | KEY(1, 5, KEY_RIGHT), | ||
90 | |||
91 | KEY(2, 0, KEY_7), | ||
92 | KEY(2, 1, KEY_8), | ||
93 | KEY(2, 2, KEY_9), | ||
94 | KEY(2, 3, KEY_F3), | ||
95 | KEY(2, 4, KEY_DOWN), | ||
96 | KEY(2, 5, KEY_F4), | ||
97 | |||
98 | KEY(3, 0, KEY_0), | ||
99 | KEY(3, 1, KEY_OK), | ||
100 | KEY(3, 2, KEY_ESC), | ||
101 | KEY(3, 3, KEY_ENTER), | ||
102 | KEY(3, 4, KEY_MENU), | ||
103 | KEY(3, 5, KEY_BACK) | ||
104 | }; | ||
105 | |||
106 | static const struct matrix_keymap_data mx51_3ds_map_data __initconst = { | ||
107 | .keymap = mx51_3ds_board_keymap, | ||
108 | .keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap), | ||
109 | }; | ||
110 | |||
111 | static int mx51_3ds_spi2_cs[] = { | ||
112 | MXC_SPI_CS(0), | ||
113 | MX51_3DS_ECSPI2_CS, | ||
114 | }; | ||
115 | |||
116 | static const struct spi_imx_master mx51_3ds_ecspi2_pdata __initconst = { | ||
117 | .chipselect = mx51_3ds_spi2_cs, | ||
118 | .num_chipselect = ARRAY_SIZE(mx51_3ds_spi2_cs), | ||
119 | }; | ||
120 | |||
121 | static struct spi_board_info mx51_3ds_spi_nor_device[] = { | ||
122 | { | ||
123 | .modalias = "m25p80", | ||
124 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | ||
125 | .bus_num = 1, | ||
126 | .chip_select = 1, | ||
127 | .mode = SPI_MODE_0, | ||
128 | .platform_data = NULL,}, | ||
129 | }; | ||
130 | |||
131 | /* | ||
132 | * Board specific initialization. | ||
133 | */ | ||
134 | static void __init mx51_3ds_init(void) | ||
135 | { | ||
136 | imx51_soc_init(); | ||
137 | |||
138 | mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads, | ||
139 | ARRAY_SIZE(mx51_3ds_pads)); | ||
140 | |||
141 | imx51_add_imx_uart(0, &uart_pdata); | ||
142 | imx51_add_imx_uart(1, &uart_pdata); | ||
143 | imx51_add_imx_uart(2, &uart_pdata); | ||
144 | |||
145 | imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata); | ||
146 | spi_register_board_info(mx51_3ds_spi_nor_device, | ||
147 | ARRAY_SIZE(mx51_3ds_spi_nor_device)); | ||
148 | |||
149 | if (mxc_expio_init(MX51_CS5_BASE_ADDR, IMX_GPIO_NR(1, 6))) | ||
150 | printk(KERN_WARNING "Init of the debugboard failed, all " | ||
151 | "devices on the board are unusable.\n"); | ||
152 | |||
153 | imx51_add_sdhci_esdhc_imx(0, NULL); | ||
154 | imx51_add_imx_keypad(&mx51_3ds_map_data); | ||
155 | imx51_add_imx2_wdt(0); | ||
156 | } | ||
157 | |||
158 | static void __init mx51_3ds_timer_init(void) | ||
159 | { | ||
160 | mx51_clocks_init(32768, 24000000, 22579200, 0); | ||
161 | } | ||
162 | |||
163 | static struct sys_timer mx51_3ds_timer = { | ||
164 | .init = mx51_3ds_timer_init, | ||
165 | }; | ||
166 | |||
167 | MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board") | ||
168 | /* Maintainer: Freescale Semiconductor, Inc. */ | ||
169 | .atag_offset = 0x100, | ||
170 | .map_io = mx51_map_io, | ||
171 | .init_early = imx51_init_early, | ||
172 | .init_irq = mx51_init_irq, | ||
173 | .handle_irq = imx51_handle_irq, | ||
174 | .timer = &mx51_3ds_timer, | ||
175 | .init_machine = mx51_3ds_init, | ||
176 | .init_late = imx51_init_late, | ||
177 | .restart = mxc_restart, | ||
178 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-mx51_babbage.c b/arch/arm/mach-imx/mach-mx51_babbage.c deleted file mode 100644 index d9a84ca2199..00000000000 --- a/arch/arm/mach-imx/mach-mx51_babbage.c +++ /dev/null | |||
@@ -1,436 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com> | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/i2c.h> | ||
16 | #include <linux/gpio.h> | ||
17 | #include <linux/delay.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <linux/input.h> | ||
20 | #include <linux/spi/flash.h> | ||
21 | #include <linux/spi/spi.h> | ||
22 | |||
23 | #include <asm/setup.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | #include <asm/mach/time.h> | ||
27 | |||
28 | #include "common.h" | ||
29 | #include "devices-imx51.h" | ||
30 | #include "cpu_op-mx51.h" | ||
31 | #include "hardware.h" | ||
32 | #include "iomux-mx51.h" | ||
33 | |||
34 | #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) | ||
35 | #define BABBAGE_USBH1_STP IMX_GPIO_NR(1, 27) | ||
36 | #define BABBAGE_USB_PHY_RESET IMX_GPIO_NR(2, 5) | ||
37 | #define BABBAGE_FEC_PHY_RESET IMX_GPIO_NR(2, 14) | ||
38 | #define BABBAGE_POWER_KEY IMX_GPIO_NR(2, 21) | ||
39 | #define BABBAGE_ECSPI1_CS0 IMX_GPIO_NR(4, 24) | ||
40 | #define BABBAGE_ECSPI1_CS1 IMX_GPIO_NR(4, 25) | ||
41 | #define BABBAGE_SD2_CD IMX_GPIO_NR(1, 6) | ||
42 | #define BABBAGE_SD2_WP IMX_GPIO_NR(1, 5) | ||
43 | |||
44 | /* USB_CTRL_1 */ | ||
45 | #define MX51_USB_CTRL_1_OFFSET 0x10 | ||
46 | #define MX51_USB_CTRL_UH1_EXT_CLK_EN (1 << 25) | ||
47 | |||
48 | #define MX51_USB_PLLDIV_12_MHZ 0x00 | ||
49 | #define MX51_USB_PLL_DIV_19_2_MHZ 0x01 | ||
50 | #define MX51_USB_PLL_DIV_24_MHZ 0x02 | ||
51 | |||
52 | static struct gpio_keys_button babbage_buttons[] = { | ||
53 | { | ||
54 | .gpio = BABBAGE_POWER_KEY, | ||
55 | .code = BTN_0, | ||
56 | .desc = "PWR", | ||
57 | .active_low = 1, | ||
58 | .wakeup = 1, | ||
59 | }, | ||
60 | }; | ||
61 | |||
62 | static const struct gpio_keys_platform_data imx_button_data __initconst = { | ||
63 | .buttons = babbage_buttons, | ||
64 | .nbuttons = ARRAY_SIZE(babbage_buttons), | ||
65 | }; | ||
66 | |||
67 | static iomux_v3_cfg_t mx51babbage_pads[] = { | ||
68 | /* UART1 */ | ||
69 | MX51_PAD_UART1_RXD__UART1_RXD, | ||
70 | MX51_PAD_UART1_TXD__UART1_TXD, | ||
71 | MX51_PAD_UART1_RTS__UART1_RTS, | ||
72 | MX51_PAD_UART1_CTS__UART1_CTS, | ||
73 | |||
74 | /* UART2 */ | ||
75 | MX51_PAD_UART2_RXD__UART2_RXD, | ||
76 | MX51_PAD_UART2_TXD__UART2_TXD, | ||
77 | |||
78 | /* UART3 */ | ||
79 | MX51_PAD_EIM_D25__UART3_RXD, | ||
80 | MX51_PAD_EIM_D26__UART3_TXD, | ||
81 | MX51_PAD_EIM_D27__UART3_RTS, | ||
82 | MX51_PAD_EIM_D24__UART3_CTS, | ||
83 | |||
84 | /* I2C1 */ | ||
85 | MX51_PAD_EIM_D16__I2C1_SDA, | ||
86 | MX51_PAD_EIM_D19__I2C1_SCL, | ||
87 | |||
88 | /* I2C2 */ | ||
89 | MX51_PAD_KEY_COL4__I2C2_SCL, | ||
90 | MX51_PAD_KEY_COL5__I2C2_SDA, | ||
91 | |||
92 | /* HSI2C */ | ||
93 | MX51_PAD_I2C1_CLK__I2C1_CLK, | ||
94 | MX51_PAD_I2C1_DAT__I2C1_DAT, | ||
95 | |||
96 | /* USB HOST1 */ | ||
97 | MX51_PAD_USBH1_CLK__USBH1_CLK, | ||
98 | MX51_PAD_USBH1_DIR__USBH1_DIR, | ||
99 | MX51_PAD_USBH1_NXT__USBH1_NXT, | ||
100 | MX51_PAD_USBH1_DATA0__USBH1_DATA0, | ||
101 | MX51_PAD_USBH1_DATA1__USBH1_DATA1, | ||
102 | MX51_PAD_USBH1_DATA2__USBH1_DATA2, | ||
103 | MX51_PAD_USBH1_DATA3__USBH1_DATA3, | ||
104 | MX51_PAD_USBH1_DATA4__USBH1_DATA4, | ||
105 | MX51_PAD_USBH1_DATA5__USBH1_DATA5, | ||
106 | MX51_PAD_USBH1_DATA6__USBH1_DATA6, | ||
107 | MX51_PAD_USBH1_DATA7__USBH1_DATA7, | ||
108 | |||
109 | /* USB HUB reset line*/ | ||
110 | MX51_PAD_GPIO1_7__GPIO1_7, | ||
111 | |||
112 | /* USB PHY reset line */ | ||
113 | MX51_PAD_EIM_D21__GPIO2_5, | ||
114 | |||
115 | /* FEC */ | ||
116 | MX51_PAD_EIM_EB2__FEC_MDIO, | ||
117 | MX51_PAD_EIM_EB3__FEC_RDATA1, | ||
118 | MX51_PAD_EIM_CS2__FEC_RDATA2, | ||
119 | MX51_PAD_EIM_CS3__FEC_RDATA3, | ||
120 | MX51_PAD_EIM_CS4__FEC_RX_ER, | ||
121 | MX51_PAD_EIM_CS5__FEC_CRS, | ||
122 | MX51_PAD_NANDF_RB2__FEC_COL, | ||
123 | MX51_PAD_NANDF_RB3__FEC_RX_CLK, | ||
124 | MX51_PAD_NANDF_D9__FEC_RDATA0, | ||
125 | MX51_PAD_NANDF_D8__FEC_TDATA0, | ||
126 | MX51_PAD_NANDF_CS2__FEC_TX_ER, | ||
127 | MX51_PAD_NANDF_CS3__FEC_MDC, | ||
128 | MX51_PAD_NANDF_CS4__FEC_TDATA1, | ||
129 | MX51_PAD_NANDF_CS5__FEC_TDATA2, | ||
130 | MX51_PAD_NANDF_CS6__FEC_TDATA3, | ||
131 | MX51_PAD_NANDF_CS7__FEC_TX_EN, | ||
132 | MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK, | ||
133 | |||
134 | /* FEC PHY reset line */ | ||
135 | MX51_PAD_EIM_A20__GPIO2_14, | ||
136 | |||
137 | /* SD 1 */ | ||
138 | MX51_PAD_SD1_CMD__SD1_CMD, | ||
139 | MX51_PAD_SD1_CLK__SD1_CLK, | ||
140 | MX51_PAD_SD1_DATA0__SD1_DATA0, | ||
141 | MX51_PAD_SD1_DATA1__SD1_DATA1, | ||
142 | MX51_PAD_SD1_DATA2__SD1_DATA2, | ||
143 | MX51_PAD_SD1_DATA3__SD1_DATA3, | ||
144 | /* CD/WP from controller */ | ||
145 | MX51_PAD_GPIO1_0__SD1_CD, | ||
146 | MX51_PAD_GPIO1_1__SD1_WP, | ||
147 | |||
148 | /* SD 2 */ | ||
149 | MX51_PAD_SD2_CMD__SD2_CMD, | ||
150 | MX51_PAD_SD2_CLK__SD2_CLK, | ||
151 | MX51_PAD_SD2_DATA0__SD2_DATA0, | ||
152 | MX51_PAD_SD2_DATA1__SD2_DATA1, | ||
153 | MX51_PAD_SD2_DATA2__SD2_DATA2, | ||
154 | MX51_PAD_SD2_DATA3__SD2_DATA3, | ||
155 | /* CD/WP gpio */ | ||
156 | MX51_PAD_GPIO1_6__GPIO1_6, | ||
157 | MX51_PAD_GPIO1_5__GPIO1_5, | ||
158 | |||
159 | /* eCSPI1 */ | ||
160 | MX51_PAD_CSPI1_MISO__ECSPI1_MISO, | ||
161 | MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI, | ||
162 | MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK, | ||
163 | MX51_PAD_CSPI1_SS0__GPIO4_24, | ||
164 | MX51_PAD_CSPI1_SS1__GPIO4_25, | ||
165 | |||
166 | /* Audio */ | ||
167 | MX51_PAD_AUD3_BB_TXD__AUD3_TXD, | ||
168 | MX51_PAD_AUD3_BB_RXD__AUD3_RXD, | ||
169 | MX51_PAD_AUD3_BB_CK__AUD3_TXC, | ||
170 | MX51_PAD_AUD3_BB_FS__AUD3_TXFS, | ||
171 | }; | ||
172 | |||
173 | /* Serial ports */ | ||
174 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
175 | .flags = IMXUART_HAVE_RTSCTS, | ||
176 | }; | ||
177 | |||
178 | static const struct imxi2c_platform_data babbage_i2c_data __initconst = { | ||
179 | .bitrate = 100000, | ||
180 | }; | ||
181 | |||
182 | static const struct imxi2c_platform_data babbage_hsi2c_data __initconst = { | ||
183 | .bitrate = 400000, | ||
184 | }; | ||
185 | |||
186 | static struct gpio mx51_babbage_usbh1_gpios[] = { | ||
187 | { BABBAGE_USBH1_STP, GPIOF_OUT_INIT_LOW, "usbh1_stp" }, | ||
188 | { BABBAGE_USB_PHY_RESET, GPIOF_OUT_INIT_LOW, "usbh1_phy_reset" }, | ||
189 | }; | ||
190 | |||
191 | static int gpio_usbh1_active(void) | ||
192 | { | ||
193 | iomux_v3_cfg_t usbh1stp_gpio = MX51_PAD_USBH1_STP__GPIO1_27; | ||
194 | int ret; | ||
195 | |||
196 | /* Set USBH1_STP to GPIO and toggle it */ | ||
197 | mxc_iomux_v3_setup_pad(usbh1stp_gpio); | ||
198 | ret = gpio_request_array(mx51_babbage_usbh1_gpios, | ||
199 | ARRAY_SIZE(mx51_babbage_usbh1_gpios)); | ||
200 | |||
201 | if (ret) { | ||
202 | pr_debug("failed to get USBH1 pins: %d\n", ret); | ||
203 | return ret; | ||
204 | } | ||
205 | |||
206 | msleep(100); | ||
207 | gpio_set_value(BABBAGE_USBH1_STP, 1); | ||
208 | gpio_set_value(BABBAGE_USB_PHY_RESET, 1); | ||
209 | gpio_free_array(mx51_babbage_usbh1_gpios, | ||
210 | ARRAY_SIZE(mx51_babbage_usbh1_gpios)); | ||
211 | return 0; | ||
212 | } | ||
213 | |||
214 | static inline void babbage_usbhub_reset(void) | ||
215 | { | ||
216 | int ret; | ||
217 | |||
218 | /* Reset USB hub */ | ||
219 | ret = gpio_request_one(BABBAGE_USB_HUB_RESET, | ||
220 | GPIOF_OUT_INIT_LOW, "GPIO1_7"); | ||
221 | if (ret) { | ||
222 | printk(KERN_ERR"failed to get GPIO_USB_HUB_RESET: %d\n", ret); | ||
223 | return; | ||
224 | } | ||
225 | |||
226 | msleep(2); | ||
227 | /* Deassert reset */ | ||
228 | gpio_set_value(BABBAGE_USB_HUB_RESET, 1); | ||
229 | } | ||
230 | |||
231 | static inline void babbage_fec_reset(void) | ||
232 | { | ||
233 | int ret; | ||
234 | |||
235 | /* reset FEC PHY */ | ||
236 | ret = gpio_request_one(BABBAGE_FEC_PHY_RESET, | ||
237 | GPIOF_OUT_INIT_LOW, "fec-phy-reset"); | ||
238 | if (ret) { | ||
239 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | ||
240 | return; | ||
241 | } | ||
242 | msleep(1); | ||
243 | gpio_set_value(BABBAGE_FEC_PHY_RESET, 1); | ||
244 | } | ||
245 | |||
246 | /* This function is board specific as the bit mask for the plldiv will also | ||
247 | be different for other Freescale SoCs, thus a common bitmask is not | ||
248 | possible and cannot get place in /plat-mxc/ehci.c.*/ | ||
249 | static int initialize_otg_port(struct platform_device *pdev) | ||
250 | { | ||
251 | u32 v; | ||
252 | void __iomem *usb_base; | ||
253 | void __iomem *usbother_base; | ||
254 | |||
255 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); | ||
256 | if (!usb_base) | ||
257 | return -ENOMEM; | ||
258 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | ||
259 | |||
260 | /* Set the PHY clock to 19.2MHz */ | ||
261 | v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); | ||
262 | v &= ~MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK; | ||
263 | v |= MX51_USB_PLL_DIV_19_2_MHZ; | ||
264 | __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); | ||
265 | iounmap(usb_base); | ||
266 | |||
267 | mdelay(10); | ||
268 | |||
269 | return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY); | ||
270 | } | ||
271 | |||
272 | static int initialize_usbh1_port(struct platform_device *pdev) | ||
273 | { | ||
274 | u32 v; | ||
275 | void __iomem *usb_base; | ||
276 | void __iomem *usbother_base; | ||
277 | |||
278 | usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K); | ||
279 | if (!usb_base) | ||
280 | return -ENOMEM; | ||
281 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | ||
282 | |||
283 | /* The clock for the USBH1 ULPI port will come externally from the PHY. */ | ||
284 | v = __raw_readl(usbother_base + MX51_USB_CTRL_1_OFFSET); | ||
285 | __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET); | ||
286 | iounmap(usb_base); | ||
287 | |||
288 | mdelay(10); | ||
289 | |||
290 | return mx51_initialize_usb_hw(1, MXC_EHCI_POWER_PINS_ENABLED | | ||
291 | MXC_EHCI_ITC_NO_THRESHOLD); | ||
292 | } | ||
293 | |||
294 | static const struct mxc_usbh_platform_data dr_utmi_config __initconst = { | ||
295 | .init = initialize_otg_port, | ||
296 | .portsc = MXC_EHCI_UTMI_16BIT, | ||
297 | }; | ||
298 | |||
299 | static const struct fsl_usb2_platform_data usb_pdata __initconst = { | ||
300 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
301 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, | ||
302 | }; | ||
303 | |||
304 | static const struct mxc_usbh_platform_data usbh1_config __initconst = { | ||
305 | .init = initialize_usbh1_port, | ||
306 | .portsc = MXC_EHCI_MODE_ULPI, | ||
307 | }; | ||
308 | |||
309 | static bool otg_mode_host __initdata; | ||
310 | |||
311 | static int __init babbage_otg_mode(char *options) | ||
312 | { | ||
313 | if (!strcmp(options, "host")) | ||
314 | otg_mode_host = true; | ||
315 | else if (!strcmp(options, "device")) | ||
316 | otg_mode_host = false; | ||
317 | else | ||
318 | pr_info("otg_mode neither \"host\" nor \"device\". " | ||
319 | "Defaulting to device\n"); | ||
320 | return 1; | ||
321 | } | ||
322 | __setup("otg_mode=", babbage_otg_mode); | ||
323 | |||
324 | static struct spi_board_info mx51_babbage_spi_board_info[] __initdata = { | ||
325 | { | ||
326 | .modalias = "mtd_dataflash", | ||
327 | .max_speed_hz = 25000000, | ||
328 | .bus_num = 0, | ||
329 | .chip_select = 1, | ||
330 | .mode = SPI_MODE_0, | ||
331 | .platform_data = NULL, | ||
332 | }, | ||
333 | }; | ||
334 | |||
335 | static int mx51_babbage_spi_cs[] = { | ||
336 | BABBAGE_ECSPI1_CS0, | ||
337 | BABBAGE_ECSPI1_CS1, | ||
338 | }; | ||
339 | |||
340 | static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = { | ||
341 | .chipselect = mx51_babbage_spi_cs, | ||
342 | .num_chipselect = ARRAY_SIZE(mx51_babbage_spi_cs), | ||
343 | }; | ||
344 | |||
345 | static const struct esdhc_platform_data mx51_babbage_sd1_data __initconst = { | ||
346 | .cd_type = ESDHC_CD_CONTROLLER, | ||
347 | .wp_type = ESDHC_WP_CONTROLLER, | ||
348 | }; | ||
349 | |||
350 | static const struct esdhc_platform_data mx51_babbage_sd2_data __initconst = { | ||
351 | .cd_gpio = BABBAGE_SD2_CD, | ||
352 | .wp_gpio = BABBAGE_SD2_WP, | ||
353 | .cd_type = ESDHC_CD_GPIO, | ||
354 | .wp_type = ESDHC_WP_GPIO, | ||
355 | }; | ||
356 | |||
357 | void __init imx51_babbage_common_init(void) | ||
358 | { | ||
359 | mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads, | ||
360 | ARRAY_SIZE(mx51babbage_pads)); | ||
361 | } | ||
362 | |||
363 | /* | ||
364 | * Board specific initialization. | ||
365 | */ | ||
366 | static void __init mx51_babbage_init(void) | ||
367 | { | ||
368 | iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; | ||
369 | iomux_v3_cfg_t power_key = NEW_PAD_CTRL(MX51_PAD_EIM_A27__GPIO2_21, | ||
370 | PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH); | ||
371 | |||
372 | imx51_soc_init(); | ||
373 | |||
374 | #if defined(CONFIG_CPU_FREQ_IMX) | ||
375 | get_cpu_op = mx51_get_cpu_op; | ||
376 | #endif | ||
377 | imx51_babbage_common_init(); | ||
378 | |||
379 | imx51_add_imx_uart(0, &uart_pdata); | ||
380 | imx51_add_imx_uart(1, NULL); | ||
381 | imx51_add_imx_uart(2, &uart_pdata); | ||
382 | |||
383 | babbage_fec_reset(); | ||
384 | imx51_add_fec(NULL); | ||
385 | |||
386 | /* Set the PAD settings for the pwr key. */ | ||
387 | mxc_iomux_v3_setup_pad(power_key); | ||
388 | imx_add_gpio_keys(&imx_button_data); | ||
389 | |||
390 | imx51_add_imx_i2c(0, &babbage_i2c_data); | ||
391 | imx51_add_imx_i2c(1, &babbage_i2c_data); | ||
392 | imx51_add_hsi2c(&babbage_hsi2c_data); | ||
393 | |||
394 | if (otg_mode_host) | ||
395 | imx51_add_mxc_ehci_otg(&dr_utmi_config); | ||
396 | else { | ||
397 | initialize_otg_port(NULL); | ||
398 | imx51_add_fsl_usb2_udc(&usb_pdata); | ||
399 | } | ||
400 | |||
401 | gpio_usbh1_active(); | ||
402 | imx51_add_mxc_ehci_hs(1, &usbh1_config); | ||
403 | /* setback USBH1_STP to be function */ | ||
404 | mxc_iomux_v3_setup_pad(usbh1stp); | ||
405 | babbage_usbhub_reset(); | ||
406 | |||
407 | imx51_add_sdhci_esdhc_imx(0, &mx51_babbage_sd1_data); | ||
408 | imx51_add_sdhci_esdhc_imx(1, &mx51_babbage_sd2_data); | ||
409 | |||
410 | spi_register_board_info(mx51_babbage_spi_board_info, | ||
411 | ARRAY_SIZE(mx51_babbage_spi_board_info)); | ||
412 | imx51_add_ecspi(0, &mx51_babbage_spi_pdata); | ||
413 | imx51_add_imx2_wdt(0); | ||
414 | } | ||
415 | |||
416 | static void __init mx51_babbage_timer_init(void) | ||
417 | { | ||
418 | mx51_clocks_init(32768, 24000000, 22579200, 0); | ||
419 | } | ||
420 | |||
421 | static struct sys_timer mx51_babbage_timer = { | ||
422 | .init = mx51_babbage_timer_init, | ||
423 | }; | ||
424 | |||
425 | MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board") | ||
426 | /* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */ | ||
427 | .atag_offset = 0x100, | ||
428 | .map_io = mx51_map_io, | ||
429 | .init_early = imx51_init_early, | ||
430 | .init_irq = mx51_init_irq, | ||
431 | .handle_irq = imx51_handle_irq, | ||
432 | .timer = &mx51_babbage_timer, | ||
433 | .init_machine = mx51_babbage_init, | ||
434 | .init_late = imx51_init_late, | ||
435 | .restart = mxc_restart, | ||
436 | MACHINE_END | ||
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c index f4a8c7e108e..c85876fed66 100644 --- a/arch/arm/mach-imx/mach-mxt_td60.c +++ b/arch/arm/mach-imx/mach-mxt_td60.c | |||
@@ -21,17 +21,17 @@ | |||
21 | #include <linux/mtd/physmap.h> | 21 | #include <linux/mtd/physmap.h> |
22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <mach/common.h> | ||
25 | #include <mach/hardware.h> | ||
24 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
27 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
28 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
31 | #include <mach/iomux-mx27.h> | ||
29 | #include <linux/i2c/pca953x.h> | 32 | #include <linux/i2c/pca953x.h> |
30 | 33 | ||
31 | #include "common.h" | ||
32 | #include "devices-imx27.h" | 34 | #include "devices-imx27.h" |
33 | #include "hardware.h" | ||
34 | #include "iomux-mx27.h" | ||
35 | 35 | ||
36 | static const int mxt_td60_pins[] __initconst = { | 36 | static const int mxt_td60_pins[] __initconst = { |
37 | /* UART0 */ | 37 | /* UART0 */ |
@@ -213,13 +213,13 @@ static const struct imx_fb_platform_data mxt_td60_fb_data __initconst = { | |||
213 | static int mxt_td60_sdhc1_init(struct device *dev, irq_handler_t detect_irq, | 213 | static int mxt_td60_sdhc1_init(struct device *dev, irq_handler_t detect_irq, |
214 | void *data) | 214 | void *data) |
215 | { | 215 | { |
216 | return request_irq(gpio_to_irq(IMX_GPIO_NR(6, 8)), detect_irq, | 216 | return request_irq(IRQ_GPIOF(8), detect_irq, IRQF_TRIGGER_FALLING, |
217 | IRQF_TRIGGER_FALLING, "sdhc1-card-detect", data); | 217 | "sdhc1-card-detect", data); |
218 | } | 218 | } |
219 | 219 | ||
220 | static void mxt_td60_sdhc1_exit(struct device *dev, void *data) | 220 | static void mxt_td60_sdhc1_exit(struct device *dev, void *data) |
221 | { | 221 | { |
222 | free_irq(gpio_to_irq(IMX_GPIO_NR(6, 8)), data); | 222 | free_irq(IRQ_GPIOF(8), data); |
223 | } | 223 | } |
224 | 224 | ||
225 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { | 225 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { |
@@ -267,12 +267,10 @@ static struct sys_timer mxt_td60_timer = { | |||
267 | 267 | ||
268 | MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") | 268 | MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") |
269 | /* maintainer: Maxtrack Industrial */ | 269 | /* maintainer: Maxtrack Industrial */ |
270 | .atag_offset = 0x100, | 270 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
271 | .map_io = mx27_map_io, | 271 | .map_io = mx27_map_io, |
272 | .init_early = imx27_init_early, | 272 | .init_early = imx27_init_early, |
273 | .init_irq = mx27_init_irq, | 273 | .init_irq = mx27_init_irq, |
274 | .handle_irq = imx27_handle_irq, | ||
275 | .timer = &mxt_td60_timer, | 274 | .timer = &mxt_td60_timer, |
276 | .init_machine = mxt_td60_board_init, | 275 | .init_machine = mxt_td60_board_init, |
277 | .restart = mxc_restart, | ||
278 | MACHINE_END | 276 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index eee369fa94a..71083aa1603 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -32,13 +32,15 @@ | |||
32 | 32 | ||
33 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
34 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
35 | #include <mach/common.h> | ||
36 | #include <mach/hardware.h> | ||
37 | #include <mach/iomux-mx27.h> | ||
35 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
39 | #include <mach/audmux.h> | ||
40 | #include <mach/irqs.h> | ||
41 | #include <mach/ulpi.h> | ||
36 | 42 | ||
37 | #include "common.h" | ||
38 | #include "devices-imx27.h" | 43 | #include "devices-imx27.h" |
39 | #include "hardware.h" | ||
40 | #include "iomux-mx27.h" | ||
41 | #include "ulpi.h" | ||
42 | 44 | ||
43 | #define OTG_PHY_CS_GPIO (GPIO_PORTB + 23) | 45 | #define OTG_PHY_CS_GPIO (GPIO_PORTB + 23) |
44 | #define USBH2_PHY_CS_GPIO (GPIO_PORTB + 24) | 46 | #define USBH2_PHY_CS_GPIO (GPIO_PORTB + 24) |
@@ -244,7 +246,7 @@ static int pca100_sdhc2_init(struct device *dev, irq_handler_t detect_irq, | |||
244 | { | 246 | { |
245 | int ret; | 247 | int ret; |
246 | 248 | ||
247 | ret = request_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), detect_irq, | 249 | ret = request_irq(IRQ_GPIOC(29), detect_irq, |
248 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | 250 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, |
249 | "imx-mmc-detect", data); | 251 | "imx-mmc-detect", data); |
250 | if (ret) | 252 | if (ret) |
@@ -256,7 +258,7 @@ static int pca100_sdhc2_init(struct device *dev, irq_handler_t detect_irq, | |||
256 | 258 | ||
257 | static void pca100_sdhc2_exit(struct device *dev, void *data) | 259 | static void pca100_sdhc2_exit(struct device *dev, void *data) |
258 | { | 260 | { |
259 | free_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), data); | 261 | free_irq(IRQ_GPIOC(29), data); |
260 | } | 262 | } |
261 | 263 | ||
262 | static const struct imxmmc_platform_data sdhc_pdata __initconst = { | 264 | static const struct imxmmc_platform_data sdhc_pdata __initconst = { |
@@ -297,18 +299,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
297 | .phy_mode = FSL_USB2_PHY_ULPI, | 299 | .phy_mode = FSL_USB2_PHY_ULPI, |
298 | }; | 300 | }; |
299 | 301 | ||
300 | static bool otg_mode_host __initdata; | 302 | static int otg_mode_host; |
301 | 303 | ||
302 | static int __init pca100_otg_mode(char *options) | 304 | static int __init pca100_otg_mode(char *options) |
303 | { | 305 | { |
304 | if (!strcmp(options, "host")) | 306 | if (!strcmp(options, "host")) |
305 | otg_mode_host = true; | 307 | otg_mode_host = 1; |
306 | else if (!strcmp(options, "device")) | 308 | else if (!strcmp(options, "device")) |
307 | otg_mode_host = false; | 309 | otg_mode_host = 0; |
308 | else | 310 | else |
309 | pr_info("otg_mode neither \"host\" nor \"device\". " | 311 | pr_info("otg_mode neither \"host\" nor \"device\". " |
310 | "Defaulting to device\n"); | 312 | "Defaulting to device\n"); |
311 | return 1; | 313 | return 0; |
312 | } | 314 | } |
313 | __setup("otg_mode=", pca100_otg_mode); | 315 | __setup("otg_mode=", pca100_otg_mode); |
314 | 316 | ||
@@ -357,6 +359,18 @@ static void __init pca100_init(void) | |||
357 | 359 | ||
358 | imx27_soc_init(); | 360 | imx27_soc_init(); |
359 | 361 | ||
362 | /* SSI unit */ | ||
363 | mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, | ||
364 | MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */ | ||
365 | MXC_AUDMUX_V1_PCR_TFCSEL(3) | | ||
366 | MXC_AUDMUX_V1_PCR_TCLKDIR | /* clock is output */ | ||
367 | MXC_AUDMUX_V1_PCR_RXDSEL(3)); | ||
368 | mxc_audmux_v1_configure_port(3, | ||
369 | MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */ | ||
370 | MXC_AUDMUX_V1_PCR_TFCSEL(0) | | ||
371 | MXC_AUDMUX_V1_PCR_TFSDIR | | ||
372 | MXC_AUDMUX_V1_PCR_RXDSEL(0)); | ||
373 | |||
360 | ret = mxc_gpio_setup_multiple_pins(pca100_pins, | 374 | ret = mxc_gpio_setup_multiple_pins(pca100_pins, |
361 | ARRAY_SIZE(pca100_pins), "PCA100"); | 375 | ARRAY_SIZE(pca100_pins), "PCA100"); |
362 | if (ret) | 376 | if (ret) |
@@ -407,8 +421,8 @@ static void __init pca100_init(void) | |||
407 | imx27_add_imx_fb(&pca100_fb_data); | 421 | imx27_add_imx_fb(&pca100_fb_data); |
408 | 422 | ||
409 | imx27_add_fec(NULL); | 423 | imx27_add_fec(NULL); |
410 | imx27_add_imx2_wdt(); | 424 | imx27_add_imx2_wdt(NULL); |
411 | imx27_add_mxc_w1(); | 425 | imx27_add_mxc_w1(NULL); |
412 | } | 426 | } |
413 | 427 | ||
414 | static void __init pca100_timer_init(void) | 428 | static void __init pca100_timer_init(void) |
@@ -421,12 +435,10 @@ static struct sys_timer pca100_timer = { | |||
421 | }; | 435 | }; |
422 | 436 | ||
423 | MACHINE_START(PCA100, "phyCARD-i.MX27") | 437 | MACHINE_START(PCA100, "phyCARD-i.MX27") |
424 | .atag_offset = 0x100, | 438 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
425 | .map_io = mx27_map_io, | 439 | .map_io = mx27_map_io, |
426 | .init_early = imx27_init_early, | 440 | .init_early = imx27_init_early, |
427 | .init_irq = mx27_init_irq, | 441 | .init_irq = mx27_init_irq, |
428 | .handle_irq = imx27_handle_irq, | ||
429 | .init_machine = pca100_init, | 442 | .init_machine = pca100_init, |
430 | .timer = &pca100_timer, | 443 | .timer = &pca100_timer, |
431 | .restart = mxc_restart, | ||
432 | MACHINE_END | 444 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index 547fef133f6..f45b7cd72c8 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
@@ -32,8 +32,6 @@ | |||
32 | #include <linux/usb/ulpi.h> | 32 | #include <linux/usb/ulpi.h> |
33 | #include <linux/gfp.h> | 33 | #include <linux/gfp.h> |
34 | #include <linux/memblock.h> | 34 | #include <linux/memblock.h> |
35 | #include <linux/regulator/machine.h> | ||
36 | #include <linux/regulator/fixed.h> | ||
37 | 35 | ||
38 | #include <media/soc_camera.h> | 36 | #include <media/soc_camera.h> |
39 | 37 | ||
@@ -41,14 +39,13 @@ | |||
41 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
42 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
43 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
44 | #include <asm/memblock.h> | 42 | #include <mach/common.h> |
43 | #include <mach/hardware.h> | ||
44 | #include <mach/iomux-mx3.h> | ||
45 | #include <mach/ulpi.h> | ||
45 | 46 | ||
46 | #include "common.h" | ||
47 | #include "devices-imx31.h" | 47 | #include "devices-imx31.h" |
48 | #include "hardware.h" | ||
49 | #include "iomux-mx3.h" | ||
50 | #include "pcm037.h" | 48 | #include "pcm037.h" |
51 | #include "ulpi.h" | ||
52 | 49 | ||
53 | static enum pcm037_board_variant pcm037_instance = PCM037_PCM970; | 50 | static enum pcm037_board_variant pcm037_instance = PCM037_PCM970; |
54 | 51 | ||
@@ -225,7 +222,8 @@ static struct resource smsc911x_resources[] = { | |||
225 | .end = MX31_CS1_BASE_ADDR + 0x300 + SZ_64K - 1, | 222 | .end = MX31_CS1_BASE_ADDR + 0x300 + SZ_64K - 1, |
226 | .flags = IORESOURCE_MEM, | 223 | .flags = IORESOURCE_MEM, |
227 | }, { | 224 | }, { |
228 | /* irq number is run-time assigned */ | 225 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), |
226 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | ||
229 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 227 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
230 | }, | 228 | }, |
231 | }; | 229 | }; |
@@ -370,7 +368,7 @@ static int pcm970_sdhc1_init(struct device *dev, irq_handler_t detect_irq, | |||
370 | gpio_direction_input(SDHC1_GPIO_WP); | 368 | gpio_direction_input(SDHC1_GPIO_WP); |
371 | #endif | 369 | #endif |
372 | 370 | ||
373 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SCK6)), detect_irq, | 371 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_SCK6), detect_irq, |
374 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | 372 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, |
375 | "sdhc-detect", data); | 373 | "sdhc-detect", data); |
376 | if (ret) | 374 | if (ret) |
@@ -390,7 +388,7 @@ err_gpio_free: | |||
390 | 388 | ||
391 | static void pcm970_sdhc1_exit(struct device *dev, void *data) | 389 | static void pcm970_sdhc1_exit(struct device *dev, void *data) |
392 | { | 390 | { |
393 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SCK6)), data); | 391 | free_irq(IOMUX_TO_IRQ(MX31_PIN_SCK6), data); |
394 | gpio_free(SDHC1_GPIO_DET); | 392 | gpio_free(SDHC1_GPIO_DET); |
395 | gpio_free(SDHC1_GPIO_WP); | 393 | gpio_free(SDHC1_GPIO_WP); |
396 | } | 394 | } |
@@ -441,6 +439,10 @@ static struct platform_device *devices[] __initdata = { | |||
441 | &pcm037_mt9v022, | 439 | &pcm037_mt9v022, |
442 | }; | 440 | }; |
443 | 441 | ||
442 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
443 | .irq_base = MXC_IPU_IRQ_START, | ||
444 | }; | ||
445 | |||
444 | static const struct fb_videomode fb_modedb[] = { | 446 | static const struct fb_videomode fb_modedb[] = { |
445 | { | 447 | { |
446 | /* 240x320 @ 60 Hz Sharp */ | 448 | /* 240x320 @ 60 Hz Sharp */ |
@@ -506,7 +508,8 @@ static struct resource pcm970_sja1000_resources[] = { | |||
506 | .end = MX31_CS5_BASE_ADDR + 0x100 - 1, | 508 | .end = MX31_CS5_BASE_ADDR + 0x100 - 1, |
507 | .flags = IORESOURCE_MEM, | 509 | .flags = IORESOURCE_MEM, |
508 | }, { | 510 | }, { |
509 | /* irq number is run-time assigned */ | 511 | .start = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)), |
512 | .end = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)), | ||
510 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | 513 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
511 | }, | 514 | }, |
512 | }; | 515 | }; |
@@ -551,26 +554,21 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
551 | .phy_mode = FSL_USB2_PHY_ULPI, | 554 | .phy_mode = FSL_USB2_PHY_ULPI, |
552 | }; | 555 | }; |
553 | 556 | ||
554 | static bool otg_mode_host __initdata; | 557 | static int otg_mode_host; |
555 | 558 | ||
556 | static int __init pcm037_otg_mode(char *options) | 559 | static int __init pcm037_otg_mode(char *options) |
557 | { | 560 | { |
558 | if (!strcmp(options, "host")) | 561 | if (!strcmp(options, "host")) |
559 | otg_mode_host = true; | 562 | otg_mode_host = 1; |
560 | else if (!strcmp(options, "device")) | 563 | else if (!strcmp(options, "device")) |
561 | otg_mode_host = false; | 564 | otg_mode_host = 0; |
562 | else | 565 | else |
563 | pr_info("otg_mode neither \"host\" nor \"device\". " | 566 | pr_info("otg_mode neither \"host\" nor \"device\". " |
564 | "Defaulting to device\n"); | 567 | "Defaulting to device\n"); |
565 | return 1; | 568 | return 0; |
566 | } | 569 | } |
567 | __setup("otg_mode=", pcm037_otg_mode); | 570 | __setup("otg_mode=", pcm037_otg_mode); |
568 | 571 | ||
569 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
570 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
571 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
572 | }; | ||
573 | |||
574 | /* | 572 | /* |
575 | * Board specific initialization. | 573 | * Board specific initialization. |
576 | */ | 574 | */ |
@@ -580,8 +578,6 @@ static void __init pcm037_init(void) | |||
580 | 578 | ||
581 | imx31_soc_init(); | 579 | imx31_soc_init(); |
582 | 580 | ||
583 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
584 | |||
585 | mxc_iomux_set_gpr(MUX_PGP_UH2, 1); | 581 | mxc_iomux_set_gpr(MUX_PGP_UH2, 1); |
586 | 582 | ||
587 | mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), | 583 | mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), |
@@ -613,13 +609,13 @@ static void __init pcm037_init(void) | |||
613 | 609 | ||
614 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 610 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
615 | 611 | ||
616 | imx31_add_imx2_wdt(); | 612 | imx31_add_imx2_wdt(NULL); |
617 | imx31_add_imx_uart0(&uart_pdata); | 613 | imx31_add_imx_uart0(&uart_pdata); |
618 | /* XXX: should't this have .flags = 0 (i.e. no RTSCTS) on PCM037_EET? */ | 614 | /* XXX: should't this have .flags = 0 (i.e. no RTSCTS) on PCM037_EET? */ |
619 | imx31_add_imx_uart1(&uart_pdata); | 615 | imx31_add_imx_uart1(&uart_pdata); |
620 | imx31_add_imx_uart2(&uart_pdata); | 616 | imx31_add_imx_uart2(&uart_pdata); |
621 | 617 | ||
622 | imx31_add_mxc_w1(); | 618 | imx31_add_mxc_w1(NULL); |
623 | 619 | ||
624 | /* LAN9217 IRQ pin */ | 620 | /* LAN9217 IRQ pin */ |
625 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq"); | 621 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq"); |
@@ -627,10 +623,6 @@ static void __init pcm037_init(void) | |||
627 | pr_warning("could not get LAN irq gpio\n"); | 623 | pr_warning("could not get LAN irq gpio\n"); |
628 | else { | 624 | else { |
629 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | 625 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); |
630 | smsc911x_resources[1].start = | ||
631 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | ||
632 | smsc911x_resources[1].end = | ||
633 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | ||
634 | platform_device_register(&pcm037_eth); | 626 | platform_device_register(&pcm037_eth); |
635 | } | 627 | } |
636 | 628 | ||
@@ -644,7 +636,7 @@ static void __init pcm037_init(void) | |||
644 | 636 | ||
645 | imx31_add_mxc_nand(&pcm037_nand_board_info); | 637 | imx31_add_mxc_nand(&pcm037_nand_board_info); |
646 | imx31_add_mxc_mmc(0, &sdhc_pdata); | 638 | imx31_add_mxc_mmc(0, &sdhc_pdata); |
647 | imx31_add_ipu_core(); | 639 | imx31_add_ipu_core(&mx3_ipu_data); |
648 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | 640 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); |
649 | 641 | ||
650 | /* CSI */ | 642 | /* CSI */ |
@@ -657,10 +649,6 @@ static void __init pcm037_init(void) | |||
657 | 649 | ||
658 | pcm037_init_camera(); | 650 | pcm037_init_camera(); |
659 | 651 | ||
660 | pcm970_sja1000_resources[1].start = | ||
661 | gpio_to_irq(IOMUX_TO_GPIO(IOMUX_PIN(48, 105))); | ||
662 | pcm970_sja1000_resources[1].end = | ||
663 | gpio_to_irq(IOMUX_TO_GPIO(IOMUX_PIN(48, 105))); | ||
664 | platform_device_register(&pcm970_sja1000); | 652 | platform_device_register(&pcm970_sja1000); |
665 | 653 | ||
666 | if (otg_mode_host) { | 654 | if (otg_mode_host) { |
@@ -685,32 +673,26 @@ static void __init pcm037_timer_init(void) | |||
685 | mx31_clocks_init(26000000); | 673 | mx31_clocks_init(26000000); |
686 | } | 674 | } |
687 | 675 | ||
688 | static struct sys_timer pcm037_timer = { | 676 | struct sys_timer pcm037_timer = { |
689 | .init = pcm037_timer_init, | 677 | .init = pcm037_timer_init, |
690 | }; | 678 | }; |
691 | 679 | ||
692 | static void __init pcm037_reserve(void) | 680 | static void __init pcm037_reserve(void) |
693 | { | 681 | { |
694 | /* reserve 4 MiB for mx3-camera */ | 682 | /* reserve 4 MiB for mx3-camera */ |
695 | mx3_camera_base = arm_memblock_steal(MX3_CAMERA_BUF_SIZE, | 683 | mx3_camera_base = memblock_alloc(MX3_CAMERA_BUF_SIZE, |
696 | MX3_CAMERA_BUF_SIZE); | 684 | MX3_CAMERA_BUF_SIZE); |
697 | } | 685 | memblock_free(mx3_camera_base, MX3_CAMERA_BUF_SIZE); |
698 | 686 | memblock_remove(mx3_camera_base, MX3_CAMERA_BUF_SIZE); | |
699 | static void __init pcm037_init_late(void) | ||
700 | { | ||
701 | pcm037_eet_init_devices(); | ||
702 | } | 687 | } |
703 | 688 | ||
704 | MACHINE_START(PCM037, "Phytec Phycore pcm037") | 689 | MACHINE_START(PCM037, "Phytec Phycore pcm037") |
705 | /* Maintainer: Pengutronix */ | 690 | /* Maintainer: Pengutronix */ |
706 | .atag_offset = 0x100, | 691 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
707 | .reserve = pcm037_reserve, | 692 | .reserve = pcm037_reserve, |
708 | .map_io = mx31_map_io, | 693 | .map_io = mx31_map_io, |
709 | .init_early = imx31_init_early, | 694 | .init_early = imx31_init_early, |
710 | .init_irq = mx31_init_irq, | 695 | .init_irq = mx31_init_irq, |
711 | .handle_irq = imx31_handle_irq, | ||
712 | .timer = &pcm037_timer, | 696 | .timer = &pcm037_timer, |
713 | .init_machine = pcm037_init, | 697 | .init_machine = pcm037_init, |
714 | .init_late = pcm037_init_late, | ||
715 | .restart = mxc_restart, | ||
716 | MACHINE_END | 698 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pcm037_eet.c b/arch/arm/mach-imx/mach-pcm037_eet.c index 8fd8255068e..1b7606bef8f 100644 --- a/arch/arm/mach-imx/mach-pcm037_eet.c +++ b/arch/arm/mach-imx/mach-pcm037_eet.c | |||
@@ -11,12 +11,13 @@ | |||
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/spi/spi.h> | 12 | #include <linux/spi/spi.h> |
13 | 13 | ||
14 | #include <mach/common.h> | ||
15 | #include <mach/iomux-mx3.h> | ||
16 | |||
14 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
15 | 18 | ||
16 | #include "pcm037.h" | 19 | #include "pcm037.h" |
17 | #include "common.h" | ||
18 | #include "devices-imx31.h" | 20 | #include "devices-imx31.h" |
19 | #include "iomux-mx3.h" | ||
20 | 21 | ||
21 | static unsigned int pcm037_eet_pins[] = { | 22 | static unsigned int pcm037_eet_pins[] = { |
22 | /* Reserve and hardwire GPIO 57 high - S6E63D6 chipselect */ | 23 | /* Reserve and hardwire GPIO 57 high - S6E63D6 chipselect */ |
@@ -159,9 +160,9 @@ static const struct gpio_keys_platform_data | |||
159 | .rep = 0, /* No auto-repeat */ | 160 | .rep = 0, /* No auto-repeat */ |
160 | }; | 161 | }; |
161 | 162 | ||
162 | int __init pcm037_eet_init_devices(void) | 163 | static int __init eet_init_devices(void) |
163 | { | 164 | { |
164 | if (pcm037_variant() != PCM037_EET) | 165 | if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET) |
165 | return 0; | 166 | return 0; |
166 | 167 | ||
167 | mxc_iomux_setup_multiple_pins(pcm037_eet_pins, | 168 | mxc_iomux_setup_multiple_pins(pcm037_eet_pins, |
@@ -175,3 +176,4 @@ int __init pcm037_eet_init_devices(void) | |||
175 | 176 | ||
176 | return 0; | 177 | return 0; |
177 | } | 178 | } |
179 | late_initcall(eet_init_devices); | ||
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index 4aa0d079860..2d6a64bbac4 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -27,18 +27,18 @@ | |||
27 | #include <linux/mfd/mc13783.h> | 27 | #include <linux/mfd/mc13783.h> |
28 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
29 | #include <linux/irq.h> | 29 | #include <linux/irq.h> |
30 | #include <linux/gpio.h> | ||
31 | 30 | ||
32 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
35 | 34 | ||
36 | #include "board-pcm038.h" | 35 | #include <mach/board-pcm038.h> |
37 | #include "common.h" | 36 | #include <mach/common.h> |
37 | #include <mach/hardware.h> | ||
38 | #include <mach/iomux-mx27.h> | ||
39 | #include <mach/ulpi.h> | ||
40 | |||
38 | #include "devices-imx27.h" | 41 | #include "devices-imx27.h" |
39 | #include "hardware.h" | ||
40 | #include "iomux-mx27.h" | ||
41 | #include "ulpi.h" | ||
42 | 42 | ||
43 | static const int pcm038_pins[] __initconst = { | 43 | static const int pcm038_pins[] __initconst = { |
44 | /* UART1 */ | 44 | /* UART1 */ |
@@ -176,9 +176,7 @@ static struct platform_device *platform_devices[] __initdata = { | |||
176 | * setup other stuffs to access the sram. */ | 176 | * setup other stuffs to access the sram. */ |
177 | static void __init pcm038_init_sram(void) | 177 | static void __init pcm038_init_sram(void) |
178 | { | 178 | { |
179 | __raw_writel(0x0000d843, MX27_IO_ADDRESS(MX27_WEIM_CSCRxU(1))); | 179 | mx27_setup_weimcs(1, 0x0000d843, 0x22252521, 0x22220a00); |
180 | __raw_writel(0x22252521, MX27_IO_ADDRESS(MX27_WEIM_CSCRxL(1))); | ||
181 | __raw_writel(0x22220a00, MX27_IO_ADDRESS(MX27_WEIM_CSCRxA(1))); | ||
182 | } | 180 | } |
183 | 181 | ||
184 | static const struct imxi2c_platform_data pcm038_i2c1_data __initconst = { | 182 | static const struct imxi2c_platform_data pcm038_i2c1_data __initconst = { |
@@ -211,7 +209,7 @@ static const struct spi_imx_master pcm038_spi0_data __initconst = { | |||
211 | 209 | ||
212 | static struct regulator_consumer_supply sdhc1_consumers[] = { | 210 | static struct regulator_consumer_supply sdhc1_consumers[] = { |
213 | { | 211 | { |
214 | .dev_name = "imx21-mmc.1", | 212 | .dev_name = "mxc-mmc.1", |
215 | .supply = "sdhc_vcc", | 213 | .supply = "sdhc_vcc", |
216 | }, | 214 | }, |
217 | }; | 215 | }; |
@@ -233,7 +231,7 @@ static struct regulator_init_data sdhc1_data = { | |||
233 | 231 | ||
234 | static struct regulator_consumer_supply cam_consumers[] = { | 232 | static struct regulator_consumer_supply cam_consumers[] = { |
235 | { | 233 | { |
236 | .dev_name = NULL, | 234 | .dev = NULL, |
237 | .supply = "imx_cam_vcc", | 235 | .supply = "imx_cam_vcc", |
238 | }, | 236 | }, |
239 | }; | 237 | }; |
@@ -268,13 +266,14 @@ static struct mc13xxx_platform_data pcm038_pmic = { | |||
268 | .regulators = pcm038_regulators, | 266 | .regulators = pcm038_regulators, |
269 | .num_regulators = ARRAY_SIZE(pcm038_regulators), | 267 | .num_regulators = ARRAY_SIZE(pcm038_regulators), |
270 | }, | 268 | }, |
271 | .flags = MC13XXX_USE_ADC | MC13XXX_USE_TOUCHSCREEN, | 269 | .flags = MC13783_USE_ADC | MC13783_USE_REGULATOR | |
270 | MC13783_USE_TOUCHSCREEN, | ||
272 | }; | 271 | }; |
273 | 272 | ||
274 | static struct spi_board_info pcm038_spi_board_info[] __initdata = { | 273 | static struct spi_board_info pcm038_spi_board_info[] __initdata = { |
275 | { | 274 | { |
276 | .modalias = "mc13783", | 275 | .modalias = "mc13783", |
277 | /* irq number is run-time assigned */ | 276 | .irq = IRQ_GPIOB(23), |
278 | .max_speed_hz = 300000, | 277 | .max_speed_hz = 300000, |
279 | .bus_num = 0, | 278 | .bus_num = 0, |
280 | .chip_select = 0, | 279 | .chip_select = 0, |
@@ -325,7 +324,6 @@ static void __init pcm038_init(void) | |||
325 | mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN); | 324 | mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN); |
326 | 325 | ||
327 | imx27_add_spi_imx0(&pcm038_spi0_data); | 326 | imx27_add_spi_imx0(&pcm038_spi0_data); |
328 | pcm038_spi_board_info[0].irq = gpio_to_irq(IMX_GPIO_NR(2, 23)); | ||
329 | spi_register_board_info(pcm038_spi_board_info, | 327 | spi_register_board_info(pcm038_spi_board_info, |
330 | ARRAY_SIZE(pcm038_spi_board_info)); | 328 | ARRAY_SIZE(pcm038_spi_board_info)); |
331 | 329 | ||
@@ -333,8 +331,8 @@ static void __init pcm038_init(void) | |||
333 | 331 | ||
334 | imx27_add_fec(NULL); | 332 | imx27_add_fec(NULL); |
335 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 333 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
336 | imx27_add_imx2_wdt(); | 334 | imx27_add_imx2_wdt(NULL); |
337 | imx27_add_mxc_w1(); | 335 | imx27_add_mxc_w1(NULL); |
338 | 336 | ||
339 | #ifdef CONFIG_MACH_PCM970_BASEBOARD | 337 | #ifdef CONFIG_MACH_PCM970_BASEBOARD |
340 | pcm970_baseboard_init(); | 338 | pcm970_baseboard_init(); |
@@ -351,12 +349,10 @@ static struct sys_timer pcm038_timer = { | |||
351 | }; | 349 | }; |
352 | 350 | ||
353 | MACHINE_START(PCM038, "phyCORE-i.MX27") | 351 | MACHINE_START(PCM038, "phyCORE-i.MX27") |
354 | .atag_offset = 0x100, | 352 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
355 | .map_io = mx27_map_io, | 353 | .map_io = mx27_map_io, |
356 | .init_early = imx27_init_early, | 354 | .init_early = imx27_init_early, |
357 | .init_irq = mx27_init_irq, | 355 | .init_irq = mx27_init_irq, |
358 | .handle_irq = imx27_handle_irq, | ||
359 | .timer = &pcm038_timer, | 356 | .timer = &pcm038_timer, |
360 | .init_machine = pcm038_init, | 357 | .init_machine = pcm038_init, |
361 | .restart = mxc_restart, | ||
362 | MACHINE_END | 358 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c index 92445440221..660ec3e80cf 100644 --- a/arch/arm/mach-imx/mach-pcm043.c +++ b/arch/arm/mach-imx/mach-pcm043.c | |||
@@ -33,11 +33,13 @@ | |||
33 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
34 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
35 | 35 | ||
36 | #include "common.h" | 36 | #include <mach/hardware.h> |
37 | #include <mach/common.h> | ||
38 | #include <mach/iomux-mx35.h> | ||
39 | #include <mach/ulpi.h> | ||
40 | #include <mach/audmux.h> | ||
41 | |||
37 | #include "devices-imx35.h" | 42 | #include "devices-imx35.h" |
38 | #include "hardware.h" | ||
39 | #include "iomux-mx35.h" | ||
40 | #include "ulpi.h" | ||
41 | 43 | ||
42 | static const struct fb_videomode fb_modedb[] = { | 44 | static const struct fb_videomode fb_modedb[] = { |
43 | { | 45 | { |
@@ -75,6 +77,10 @@ static const struct fb_videomode fb_modedb[] = { | |||
75 | }, | 77 | }, |
76 | }; | 78 | }; |
77 | 79 | ||
80 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
81 | .irq_base = MXC_IPU_IRQ_START, | ||
82 | }; | ||
83 | |||
78 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | 84 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
79 | .name = "Sharp-LQ035Q7", | 85 | .name = "Sharp-LQ035Q7", |
80 | .mode = fb_modedb, | 86 | .mode = fb_modedb, |
@@ -325,18 +331,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
325 | .phy_mode = FSL_USB2_PHY_UTMI, | 331 | .phy_mode = FSL_USB2_PHY_UTMI, |
326 | }; | 332 | }; |
327 | 333 | ||
328 | static bool otg_mode_host __initdata; | 334 | static int otg_mode_host; |
329 | 335 | ||
330 | static int __init pcm043_otg_mode(char *options) | 336 | static int __init pcm043_otg_mode(char *options) |
331 | { | 337 | { |
332 | if (!strcmp(options, "host")) | 338 | if (!strcmp(options, "host")) |
333 | otg_mode_host = true; | 339 | otg_mode_host = 1; |
334 | else if (!strcmp(options, "device")) | 340 | else if (!strcmp(options, "device")) |
335 | otg_mode_host = false; | 341 | otg_mode_host = 0; |
336 | else | 342 | else |
337 | pr_info("otg_mode neither \"host\" nor \"device\". " | 343 | pr_info("otg_mode neither \"host\" nor \"device\". " |
338 | "Defaulting to device\n"); | 344 | "Defaulting to device\n"); |
339 | return 1; | 345 | return 0; |
340 | } | 346 | } |
341 | __setup("otg_mode=", pcm043_otg_mode); | 347 | __setup("otg_mode=", pcm043_otg_mode); |
342 | 348 | ||
@@ -356,9 +362,21 @@ static void __init pcm043_init(void) | |||
356 | 362 | ||
357 | mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); | 363 | mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); |
358 | 364 | ||
365 | mxc_audmux_v2_configure_port(3, | ||
366 | MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ | ||
367 | MXC_AUDMUX_V2_PTCR_TFSEL(0) | | ||
368 | MXC_AUDMUX_V2_PTCR_TFSDIR, | ||
369 | MXC_AUDMUX_V2_PDCR_RXDSEL(0)); | ||
370 | |||
371 | mxc_audmux_v2_configure_port(0, | ||
372 | MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ | ||
373 | MXC_AUDMUX_V2_PTCR_TCSEL(3) | | ||
374 | MXC_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */ | ||
375 | MXC_AUDMUX_V2_PDCR_RXDSEL(3)); | ||
376 | |||
359 | imx35_add_fec(NULL); | 377 | imx35_add_fec(NULL); |
360 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 378 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
361 | imx35_add_imx2_wdt(); | 379 | imx35_add_imx2_wdt(NULL); |
362 | 380 | ||
363 | imx35_add_imx_uart0(&uart_pdata); | 381 | imx35_add_imx_uart0(&uart_pdata); |
364 | imx35_add_mxc_nand(&pcm037_nand_board_info); | 382 | imx35_add_mxc_nand(&pcm037_nand_board_info); |
@@ -371,7 +389,7 @@ static void __init pcm043_init(void) | |||
371 | 389 | ||
372 | imx35_add_imx_i2c0(&pcm043_i2c0_data); | 390 | imx35_add_imx_i2c0(&pcm043_i2c0_data); |
373 | 391 | ||
374 | imx35_add_ipu_core(); | 392 | imx35_add_ipu_core(&mx3_ipu_data); |
375 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); | 393 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); |
376 | 394 | ||
377 | if (otg_mode_host) { | 395 | if (otg_mode_host) { |
@@ -394,18 +412,16 @@ static void __init pcm043_timer_init(void) | |||
394 | mx35_clocks_init(); | 412 | mx35_clocks_init(); |
395 | } | 413 | } |
396 | 414 | ||
397 | static struct sys_timer pcm043_timer = { | 415 | struct sys_timer pcm043_timer = { |
398 | .init = pcm043_timer_init, | 416 | .init = pcm043_timer_init, |
399 | }; | 417 | }; |
400 | 418 | ||
401 | MACHINE_START(PCM043, "Phytec Phycore pcm043") | 419 | MACHINE_START(PCM043, "Phytec Phycore pcm043") |
402 | /* Maintainer: Pengutronix */ | 420 | /* Maintainer: Pengutronix */ |
403 | .atag_offset = 0x100, | 421 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
404 | .map_io = mx35_map_io, | 422 | .map_io = mx35_map_io, |
405 | .init_early = imx35_init_early, | 423 | .init_early = imx35_init_early, |
406 | .init_irq = mx35_init_irq, | 424 | .init_irq = mx35_init_irq, |
407 | .handle_irq = imx35_handle_irq, | ||
408 | .timer = &pcm043_timer, | 425 | .timer = &pcm043_timer, |
409 | .init_machine = pcm043_init, | 426 | .init_machine = pcm043_init, |
410 | .restart = mxc_restart, | ||
411 | MACHINE_END | 427 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c index 96d9a91f8a3..3626f486498 100644 --- a/arch/arm/mach-imx/mach-qong.c +++ b/arch/arm/mach-imx/mach-qong.c | |||
@@ -21,17 +21,18 @@ | |||
21 | #include <linux/mtd/nand.h> | 21 | #include <linux/mtd/nand.h> |
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | 23 | ||
24 | #include <mach/hardware.h> | ||
25 | #include <mach/irqs.h> | ||
24 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
27 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
30 | #include <mach/common.h> | ||
28 | #include <asm/page.h> | 31 | #include <asm/page.h> |
29 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
33 | #include <mach/iomux-mx3.h> | ||
30 | 34 | ||
31 | #include "common.h" | ||
32 | #include "devices-imx31.h" | 35 | #include "devices-imx31.h" |
33 | #include "hardware.h" | ||
34 | #include "iomux-mx3.h" | ||
35 | 36 | ||
36 | /* FPGA defines */ | 37 | /* FPGA defines */ |
37 | #define QONG_FPGA_VERSION(major, minor, rev) \ | 38 | #define QONG_FPGA_VERSION(major, minor, rev) \ |
@@ -50,6 +51,8 @@ | |||
50 | (QONG_FPGA_BASEADDR + QONG_DNET_ID * QONG_FPGA_PERIPH_SIZE) | 51 | (QONG_FPGA_BASEADDR + QONG_DNET_ID * QONG_FPGA_PERIPH_SIZE) |
51 | #define QONG_DNET_SIZE 0x00001000 | 52 | #define QONG_DNET_SIZE 0x00001000 |
52 | 53 | ||
54 | #define QONG_FPGA_IRQ IOMUX_TO_IRQ(MX31_PIN_DTR_DCE1) | ||
55 | |||
53 | static const struct imxuart_platform_data uart_pdata __initconst = { | 56 | static const struct imxuart_platform_data uart_pdata __initconst = { |
54 | .flags = IMXUART_HAVE_RTSCTS, | 57 | .flags = IMXUART_HAVE_RTSCTS, |
55 | }; | 58 | }; |
@@ -75,7 +78,8 @@ static struct resource dnet_resources[] = { | |||
75 | .end = QONG_DNET_BASEADDR + QONG_DNET_SIZE - 1, | 78 | .end = QONG_DNET_BASEADDR + QONG_DNET_SIZE - 1, |
76 | .flags = IORESOURCE_MEM, | 79 | .flags = IORESOURCE_MEM, |
77 | }, { | 80 | }, { |
78 | /* irq number is run-time assigned */ | 81 | .start = QONG_FPGA_IRQ, |
82 | .end = QONG_FPGA_IRQ, | ||
79 | .flags = IORESOURCE_IRQ, | 83 | .flags = IORESOURCE_IRQ, |
80 | }, | 84 | }, |
81 | }; | 85 | }; |
@@ -91,10 +95,6 @@ static int __init qong_init_dnet(void) | |||
91 | { | 95 | { |
92 | int ret; | 96 | int ret; |
93 | 97 | ||
94 | dnet_resources[1].start = | ||
95 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1)); | ||
96 | dnet_resources[1].end = | ||
97 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1)); | ||
98 | ret = platform_device_register(&dnet_device); | 98 | ret = platform_device_register(&dnet_device); |
99 | return ret; | 99 | return ret; |
100 | } | 100 | } |
@@ -190,10 +190,7 @@ static struct platform_device qong_nand_device = { | |||
190 | static void __init qong_init_nand_mtd(void) | 190 | static void __init qong_init_nand_mtd(void) |
191 | { | 191 | { |
192 | /* init CS */ | 192 | /* init CS */ |
193 | __raw_writel(0x00004f00, MX31_IO_ADDRESS(MX31_WEIM_CSCRxU(3))); | 193 | mx31_setup_weimcs(3, 0x00004f00, 0x20013b31, 0x00020800); |
194 | __raw_writel(0x20013b31, MX31_IO_ADDRESS(MX31_WEIM_CSCRxL(3))); | ||
195 | __raw_writel(0x00020800, MX31_IO_ADDRESS(MX31_WEIM_CSCRxA(3))); | ||
196 | |||
197 | mxc_iomux_set_gpr(MUX_SDCTL_CSD1_SEL, true); | 194 | mxc_iomux_set_gpr(MUX_SDCTL_CSD1_SEL, true); |
198 | 195 | ||
199 | /* enable pin */ | 196 | /* enable pin */ |
@@ -252,7 +249,6 @@ static void __init qong_init(void) | |||
252 | mxc_init_imx_uart(); | 249 | mxc_init_imx_uart(); |
253 | qong_init_nor_mtd(); | 250 | qong_init_nor_mtd(); |
254 | qong_init_fpga(); | 251 | qong_init_fpga(); |
255 | imx31_add_imx2_wdt(); | ||
256 | } | 252 | } |
257 | 253 | ||
258 | static void __init qong_timer_init(void) | 254 | static void __init qong_timer_init(void) |
@@ -266,12 +262,10 @@ static struct sys_timer qong_timer = { | |||
266 | 262 | ||
267 | MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") | 263 | MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") |
268 | /* Maintainer: DENX Software Engineering GmbH */ | 264 | /* Maintainer: DENX Software Engineering GmbH */ |
269 | .atag_offset = 0x100, | 265 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
270 | .map_io = mx31_map_io, | 266 | .map_io = mx31_map_io, |
271 | .init_early = imx31_init_early, | 267 | .init_early = imx31_init_early, |
272 | .init_irq = mx31_init_irq, | 268 | .init_irq = mx31_init_irq, |
273 | .handle_irq = imx31_handle_irq, | ||
274 | .timer = &qong_timer, | 269 | .timer = &qong_timer, |
275 | .init_machine = qong_init, | 270 | .init_machine = qong_init, |
276 | .restart = mxc_restart, | ||
277 | MACHINE_END | 271 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c index fc970409dba..db2d60470e1 100644 --- a/arch/arm/mach-imx/mach-scb9328.c +++ b/arch/arm/mach-imx/mach-scb9328.c | |||
@@ -14,16 +14,17 @@ | |||
14 | #include <linux/mtd/physmap.h> | 14 | #include <linux/mtd/physmap.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/dm9000.h> | 16 | #include <linux/dm9000.h> |
17 | #include <linux/gpio.h> | ||
18 | 17 | ||
19 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
20 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
21 | #include <asm/mach/time.h> | 20 | #include <asm/mach/time.h> |
22 | 21 | ||
23 | #include "common.h" | 22 | #include <mach/common.h> |
23 | #include <mach/hardware.h> | ||
24 | #include <mach/irqs.h> | ||
25 | #include <mach/iomux-mx1.h> | ||
26 | |||
24 | #include "devices-imx1.h" | 27 | #include "devices-imx1.h" |
25 | #include "hardware.h" | ||
26 | #include "iomux-mx1.h" | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * This scb9328 has a 32MiB flash | 30 | * This scb9328 has a 32MiB flash |
@@ -77,7 +78,8 @@ static struct resource dm9000x_resources[] = { | |||
77 | .end = MX1_CS5_PHYS + 5, | 78 | .end = MX1_CS5_PHYS + 5, |
78 | .flags = IORESOURCE_MEM, /* data access */ | 79 | .flags = IORESOURCE_MEM, /* data access */ |
79 | }, { | 80 | }, { |
80 | /* irq number is run-time assigned */ | 81 | .start = IRQ_GPIOC(3), |
82 | .end = IRQ_GPIOC(3), | ||
81 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 83 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
82 | }, | 84 | }, |
83 | }; | 85 | }; |
@@ -121,8 +123,6 @@ static void __init scb9328_init(void) | |||
121 | imx1_add_imx_uart0(&uart_pdata); | 123 | imx1_add_imx_uart0(&uart_pdata); |
122 | 124 | ||
123 | printk(KERN_INFO"Scb9328: Adding devices\n"); | 125 | printk(KERN_INFO"Scb9328: Adding devices\n"); |
124 | dm9000x_resources[2].start = gpio_to_irq(IMX_GPIO_NR(3, 3)); | ||
125 | dm9000x_resources[2].end = gpio_to_irq(IMX_GPIO_NR(3, 3)); | ||
126 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 126 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
127 | } | 127 | } |
128 | 128 | ||
@@ -137,12 +137,10 @@ static struct sys_timer scb9328_timer = { | |||
137 | 137 | ||
138 | MACHINE_START(SCB9328, "Synertronixx scb9328") | 138 | MACHINE_START(SCB9328, "Synertronixx scb9328") |
139 | /* Sascha Hauer */ | 139 | /* Sascha Hauer */ |
140 | .atag_offset = 100, | 140 | .boot_params = 0x08000100, |
141 | .map_io = mx1_map_io, | 141 | .map_io = mx1_map_io, |
142 | .init_early = imx1_init_early, | 142 | .init_early = imx1_init_early, |
143 | .init_irq = mx1_init_irq, | 143 | .init_irq = mx1_init_irq, |
144 | .handle_irq = imx1_handle_irq, | ||
145 | .timer = &scb9328_timer, | 144 | .timer = &scb9328_timer, |
146 | .init_machine = scb9328_init, | 145 | .init_machine = scb9328_init, |
147 | .restart = mxc_restart, | ||
148 | MACHINE_END | 146 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c index 3aecf91e428..7d8e012a633 100644 --- a/arch/arm/mach-imx/mach-vpr200.c +++ b/arch/arm/mach-imx/mach-vpr200.c | |||
@@ -28,14 +28,16 @@ | |||
28 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/time.h> | 29 | #include <asm/mach/time.h> |
30 | 30 | ||
31 | #include <mach/hardware.h> | ||
32 | #include <mach/common.h> | ||
33 | #include <mach/iomux-mx35.h> | ||
34 | #include <mach/irqs.h> | ||
35 | |||
31 | #include <linux/i2c.h> | 36 | #include <linux/i2c.h> |
32 | #include <linux/i2c/at24.h> | 37 | #include <linux/i2c/at24.h> |
33 | #include <linux/mfd/mc13xxx.h> | 38 | #include <linux/mfd/mc13xxx.h> |
34 | 39 | ||
35 | #include "common.h" | ||
36 | #include "devices-imx35.h" | 40 | #include "devices-imx35.h" |
37 | #include "hardware.h" | ||
38 | #include "iomux-mx35.h" | ||
39 | 41 | ||
40 | #define GPIO_LCDPWR IMX_GPIO_NR(1, 2) | 42 | #define GPIO_LCDPWR IMX_GPIO_NR(1, 2) |
41 | #define GPIO_PMIC_INT IMX_GPIO_NR(2, 0) | 43 | #define GPIO_PMIC_INT IMX_GPIO_NR(2, 0) |
@@ -85,6 +87,10 @@ static const struct fb_videomode fb_modedb[] = { | |||
85 | } | 87 | } |
86 | }; | 88 | }; |
87 | 89 | ||
90 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
91 | .irq_base = MXC_IPU_IRQ_START, | ||
92 | }; | ||
93 | |||
88 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | 94 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
89 | .name = "PT0708048", | 95 | .name = "PT0708048", |
90 | .mode = fb_modedb, | 96 | .mode = fb_modedb, |
@@ -156,7 +162,7 @@ static struct i2c_board_info vpr200_i2c_devices[] = { | |||
156 | }, { | 162 | }, { |
157 | I2C_BOARD_INFO("mc13892", 0x08), | 163 | I2C_BOARD_INFO("mc13892", 0x08), |
158 | .platform_data = &vpr200_pmic, | 164 | .platform_data = &vpr200_pmic, |
159 | /* irq number is run-time assigned */ | 165 | .irq = gpio_to_irq(GPIO_PMIC_INT), |
160 | } | 166 | } |
161 | }; | 167 | }; |
162 | 168 | ||
@@ -266,7 +272,7 @@ static void __init vpr200_board_init(void) | |||
266 | mxc_iomux_v3_setup_multiple_pads(vpr200_pads, ARRAY_SIZE(vpr200_pads)); | 272 | mxc_iomux_v3_setup_multiple_pads(vpr200_pads, ARRAY_SIZE(vpr200_pads)); |
267 | 273 | ||
268 | imx35_add_fec(NULL); | 274 | imx35_add_fec(NULL); |
269 | imx35_add_imx2_wdt(); | 275 | imx35_add_imx2_wdt(NULL); |
270 | imx_add_gpio_keys(&vpr200_gpio_keys_data); | 276 | imx_add_gpio_keys(&vpr200_gpio_keys_data); |
271 | 277 | ||
272 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 278 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
@@ -284,7 +290,7 @@ static void __init vpr200_board_init(void) | |||
284 | imx35_add_imx_uart0(NULL); | 290 | imx35_add_imx_uart0(NULL); |
285 | imx35_add_imx_uart2(NULL); | 291 | imx35_add_imx_uart2(NULL); |
286 | 292 | ||
287 | imx35_add_ipu_core(); | 293 | imx35_add_ipu_core(&mx3_ipu_data); |
288 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); | 294 | imx35_add_mx3_sdc_fb(&mx3fb_pdata); |
289 | 295 | ||
290 | imx35_add_fsl_usb2_udc(&otg_device_pdata); | 296 | imx35_add_fsl_usb2_udc(&otg_device_pdata); |
@@ -293,7 +299,6 @@ static void __init vpr200_board_init(void) | |||
293 | imx35_add_mxc_nand(&vpr200_nand_board_info); | 299 | imx35_add_mxc_nand(&vpr200_nand_board_info); |
294 | imx35_add_sdhci_esdhc_imx(0, NULL); | 300 | imx35_add_sdhci_esdhc_imx(0, NULL); |
295 | 301 | ||
296 | vpr200_i2c_devices[1].irq = gpio_to_irq(GPIO_PMIC_INT); | ||
297 | i2c_register_board_info(0, vpr200_i2c_devices, | 302 | i2c_register_board_info(0, vpr200_i2c_devices, |
298 | ARRAY_SIZE(vpr200_i2c_devices)); | 303 | ARRAY_SIZE(vpr200_i2c_devices)); |
299 | 304 | ||
@@ -305,7 +310,7 @@ static void __init vpr200_timer_init(void) | |||
305 | mx35_clocks_init(); | 310 | mx35_clocks_init(); |
306 | } | 311 | } |
307 | 312 | ||
308 | static struct sys_timer vpr200_timer = { | 313 | struct sys_timer vpr200_timer = { |
309 | .init = vpr200_timer_init, | 314 | .init = vpr200_timer_init, |
310 | }; | 315 | }; |
311 | 316 | ||
@@ -314,8 +319,6 @@ MACHINE_START(VPR200, "VPR200") | |||
314 | .map_io = mx35_map_io, | 319 | .map_io = mx35_map_io, |
315 | .init_early = imx35_init_early, | 320 | .init_early = imx35_init_early, |
316 | .init_irq = mx35_init_irq, | 321 | .init_irq = mx35_init_irq, |
317 | .handle_irq = imx35_handle_irq, | ||
318 | .timer = &vpr200_timer, | 322 | .timer = &vpr200_timer, |
319 | .init_machine = vpr200_board_init, | 323 | .init_machine = vpr200_board_init, |
320 | .restart = mxc_restart, | ||
321 | MACHINE_END | 324 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mm-imx1.c b/arch/arm/mach-imx/mm-imx1.c index 7a146671e65..2bded591d5c 100644 --- a/arch/arm/mach-imx/mm-imx1.c +++ b/arch/arm/mach-imx/mm-imx1.c | |||
@@ -18,14 +18,13 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/pinctrl/machine.h> | ||
22 | 21 | ||
23 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
24 | 23 | ||
25 | #include "common.h" | 24 | #include <mach/common.h> |
26 | #include "devices/devices-common.h" | 25 | #include <mach/hardware.h> |
27 | #include "hardware.h" | 26 | #include <mach/irqs.h> |
28 | #include "iomux-v1.h" | 27 | #include <mach/iomux-v1.h> |
29 | 28 | ||
30 | static struct map_desc imx_io_desc[] __initdata = { | 29 | static struct map_desc imx_io_desc[] __initdata = { |
31 | imx_map_entry(MX1, IO, MT_DEVICE), | 30 | imx_map_entry(MX1, IO, MT_DEVICE), |
@@ -59,7 +58,4 @@ void __init imx1_soc_init(void) | |||
59 | MX1_GPIO_INT_PORTC, 0); | 58 | MX1_GPIO_INT_PORTC, 0); |
60 | mxc_register_gpio("imx1-gpio", 3, MX1_GPIO4_BASE_ADDR, SZ_256, | 59 | mxc_register_gpio("imx1-gpio", 3, MX1_GPIO4_BASE_ADDR, SZ_256, |
61 | MX1_GPIO_INT_PORTD, 0); | 60 | MX1_GPIO_INT_PORTD, 0); |
62 | imx_add_imx_dma("imx1-dma", MX1_DMA_BASE_ADDR, | ||
63 | MX1_DMA_INT, MX1_DMA_ERR); | ||
64 | pinctrl_provide_dummies(); | ||
65 | } | 61 | } |
diff --git a/arch/arm/mach-imx/mm-imx21.c b/arch/arm/mach-imx/mm-imx21.c index d8ccd3a8ec5..3f05dfebacc 100644 --- a/arch/arm/mach-imx/mm-imx21.c +++ b/arch/arm/mach-imx/mm-imx21.c | |||
@@ -20,14 +20,13 @@ | |||
20 | 20 | ||
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/pinctrl/machine.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/common.h> | ||
25 | #include <mach/devices-common.h> | ||
24 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
25 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
26 | 28 | #include <mach/irqs.h> | |
27 | #include "common.h" | 29 | #include <mach/iomux-v1.h> |
28 | #include "devices/devices-common.h" | ||
29 | #include "hardware.h" | ||
30 | #include "iomux-v1.h" | ||
31 | 30 | ||
32 | /* MX21 memory map definition */ | 31 | /* MX21 memory map definition */ |
33 | static struct map_desc imx21_io_desc[] __initdata = { | 32 | static struct map_desc imx21_io_desc[] __initdata = { |
@@ -76,14 +75,8 @@ void __init mx21_init_irq(void) | |||
76 | mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR)); | 75 | mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR)); |
77 | } | 76 | } |
78 | 77 | ||
79 | static const struct resource imx21_audmux_res[] __initconst = { | ||
80 | DEFINE_RES_MEM(MX21_AUDMUX_BASE_ADDR, SZ_4K), | ||
81 | }; | ||
82 | |||
83 | void __init imx21_soc_init(void) | 78 | void __init imx21_soc_init(void) |
84 | { | 79 | { |
85 | mxc_device_init(); | ||
86 | |||
87 | mxc_register_gpio("imx21-gpio", 0, MX21_GPIO1_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); | 80 | mxc_register_gpio("imx21-gpio", 0, MX21_GPIO1_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); |
88 | mxc_register_gpio("imx21-gpio", 1, MX21_GPIO2_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); | 81 | mxc_register_gpio("imx21-gpio", 1, MX21_GPIO2_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); |
89 | mxc_register_gpio("imx21-gpio", 2, MX21_GPIO3_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); | 82 | mxc_register_gpio("imx21-gpio", 2, MX21_GPIO3_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); |
@@ -91,9 +84,5 @@ void __init imx21_soc_init(void) | |||
91 | mxc_register_gpio("imx21-gpio", 4, MX21_GPIO5_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); | 84 | mxc_register_gpio("imx21-gpio", 4, MX21_GPIO5_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); |
92 | mxc_register_gpio("imx21-gpio", 5, MX21_GPIO6_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); | 85 | mxc_register_gpio("imx21-gpio", 5, MX21_GPIO6_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0); |
93 | 86 | ||
94 | pinctrl_provide_dummies(); | 87 | imx_add_imx_dma(); |
95 | imx_add_imx_dma("imx21-dma", MX21_DMA_BASE_ADDR, | ||
96 | MX21_INT_DMACH0, 0); /* No ERR irq */ | ||
97 | platform_device_register_simple("imx21-audmux", 0, imx21_audmux_res, | ||
98 | ARRAY_SIZE(imx21_audmux_res)); | ||
99 | } | 88 | } |
diff --git a/arch/arm/mach-imx/mm-imx25.c b/arch/arm/mach-imx/mm-imx25.c index 9357707bb7a..cc4d152bd9b 100644 --- a/arch/arm/mach-imx/mm-imx25.c +++ b/arch/arm/mach-imx/mm-imx25.c | |||
@@ -19,16 +19,16 @@ | |||
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/pinctrl/machine.h> | ||
23 | 22 | ||
24 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
25 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
26 | 25 | ||
27 | #include "common.h" | 26 | #include <mach/common.h> |
28 | #include "devices/devices-common.h" | 27 | #include <mach/devices-common.h> |
29 | #include "hardware.h" | 28 | #include <mach/hardware.h> |
30 | #include "iomux-v3.h" | 29 | #include <mach/mx25.h> |
31 | #include "mx25.h" | 30 | #include <mach/iomux-v3.h> |
31 | #include <mach/irqs.h> | ||
32 | 32 | ||
33 | /* | 33 | /* |
34 | * This table defines static virtual address mappings for I/O regions. | 34 | * This table defines static virtual address mappings for I/O regions. |
@@ -83,24 +83,14 @@ static struct sdma_platform_data imx25_sdma_pdata __initdata = { | |||
83 | .script_addrs = &imx25_sdma_script, | 83 | .script_addrs = &imx25_sdma_script, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static const struct resource imx25_audmux_res[] __initconst = { | ||
87 | DEFINE_RES_MEM(MX25_AUDMUX_BASE_ADDR, SZ_16K), | ||
88 | }; | ||
89 | |||
90 | void __init imx25_soc_init(void) | 86 | void __init imx25_soc_init(void) |
91 | { | 87 | { |
92 | mxc_device_init(); | 88 | /* i.mx25 has the i.mx31 type gpio */ |
93 | 89 | mxc_register_gpio("imx31-gpio", 0, MX25_GPIO1_BASE_ADDR, SZ_16K, MX25_INT_GPIO1, 0); | |
94 | /* i.mx25 has the i.mx35 type gpio */ | 90 | mxc_register_gpio("imx31-gpio", 1, MX25_GPIO2_BASE_ADDR, SZ_16K, MX25_INT_GPIO2, 0); |
95 | mxc_register_gpio("imx35-gpio", 0, MX25_GPIO1_BASE_ADDR, SZ_16K, MX25_INT_GPIO1, 0); | 91 | mxc_register_gpio("imx31-gpio", 2, MX25_GPIO3_BASE_ADDR, SZ_16K, MX25_INT_GPIO3, 0); |
96 | mxc_register_gpio("imx35-gpio", 1, MX25_GPIO2_BASE_ADDR, SZ_16K, MX25_INT_GPIO2, 0); | 92 | mxc_register_gpio("imx31-gpio", 3, MX25_GPIO4_BASE_ADDR, SZ_16K, MX25_INT_GPIO4, 0); |
97 | mxc_register_gpio("imx35-gpio", 2, MX25_GPIO3_BASE_ADDR, SZ_16K, MX25_INT_GPIO3, 0); | ||
98 | mxc_register_gpio("imx35-gpio", 3, MX25_GPIO4_BASE_ADDR, SZ_16K, MX25_INT_GPIO4, 0); | ||
99 | 93 | ||
100 | pinctrl_provide_dummies(); | ||
101 | /* i.mx25 has the i.mx35 type sdma */ | 94 | /* i.mx25 has the i.mx35 type sdma */ |
102 | imx_add_imx_sdma("imx35-sdma", MX25_SDMA_BASE_ADDR, MX25_INT_SDMA, &imx25_sdma_pdata); | 95 | imx_add_imx_sdma("imx35-sdma", MX25_SDMA_BASE_ADDR, MX25_INT_SDMA, &imx25_sdma_pdata); |
103 | /* i.mx25 has the i.mx31 type audmux */ | ||
104 | platform_device_register_simple("imx31-audmux", 0, imx25_audmux_res, | ||
105 | ARRAY_SIZE(imx25_audmux_res)); | ||
106 | } | 96 | } |
diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c index 4f1be65a7b5..96dd1f5ea7b 100644 --- a/arch/arm/mach-imx/mm-imx27.c +++ b/arch/arm/mach-imx/mm-imx27.c | |||
@@ -20,14 +20,13 @@ | |||
20 | 20 | ||
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/pinctrl/machine.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/common.h> | ||
25 | #include <mach/devices-common.h> | ||
24 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
25 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
26 | 28 | #include <mach/irqs.h> | |
27 | #include "common.h" | 29 | #include <mach/iomux-v1.h> |
28 | #include "devices/devices-common.h" | ||
29 | #include "hardware.h" | ||
30 | #include "iomux-v1.h" | ||
31 | 30 | ||
32 | /* MX27 memory map definition */ | 31 | /* MX27 memory map definition */ |
33 | static struct map_desc imx27_io_desc[] __initdata = { | 32 | static struct map_desc imx27_io_desc[] __initdata = { |
@@ -76,14 +75,8 @@ void __init mx27_init_irq(void) | |||
76 | mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); | 75 | mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); |
77 | } | 76 | } |
78 | 77 | ||
79 | static const struct resource imx27_audmux_res[] __initconst = { | ||
80 | DEFINE_RES_MEM(MX27_AUDMUX_BASE_ADDR, SZ_4K), | ||
81 | }; | ||
82 | |||
83 | void __init imx27_soc_init(void) | 78 | void __init imx27_soc_init(void) |
84 | { | 79 | { |
85 | mxc_device_init(); | ||
86 | |||
87 | /* i.mx27 has the i.mx21 type gpio */ | 80 | /* i.mx27 has the i.mx21 type gpio */ |
88 | mxc_register_gpio("imx21-gpio", 0, MX27_GPIO1_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); | 81 | mxc_register_gpio("imx21-gpio", 0, MX27_GPIO1_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); |
89 | mxc_register_gpio("imx21-gpio", 1, MX27_GPIO2_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); | 82 | mxc_register_gpio("imx21-gpio", 1, MX27_GPIO2_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); |
@@ -92,10 +85,5 @@ void __init imx27_soc_init(void) | |||
92 | mxc_register_gpio("imx21-gpio", 4, MX27_GPIO5_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); | 85 | mxc_register_gpio("imx21-gpio", 4, MX27_GPIO5_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); |
93 | mxc_register_gpio("imx21-gpio", 5, MX27_GPIO6_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); | 86 | mxc_register_gpio("imx21-gpio", 5, MX27_GPIO6_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0); |
94 | 87 | ||
95 | pinctrl_provide_dummies(); | 88 | imx_add_imx_dma(); |
96 | imx_add_imx_dma("imx27-dma", MX27_DMA_BASE_ADDR, | ||
97 | MX27_INT_DMACH0, 0); /* No ERR irq */ | ||
98 | /* imx27 has the imx21 type audmux */ | ||
99 | platform_device_register_simple("imx21-audmux", 0, imx27_audmux_res, | ||
100 | ARRAY_SIZE(imx27_audmux_res)); | ||
101 | } | 89 | } |
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c deleted file mode 100644 index cefa047c405..00000000000 --- a/arch/arm/mach-imx/mm-imx3.c +++ /dev/null | |||
@@ -1,298 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999,2000 Arm Limited | ||
3 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
4 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
5 | * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
6 | * - add MX31 specific definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #include <linux/mm.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/err.h> | ||
22 | #include <linux/pinctrl/machine.h> | ||
23 | |||
24 | #include <asm/pgtable.h> | ||
25 | #include <asm/system_misc.h> | ||
26 | #include <asm/hardware/cache-l2x0.h> | ||
27 | #include <asm/mach/map.h> | ||
28 | |||
29 | #include "common.h" | ||
30 | #include "crmregs-imx3.h" | ||
31 | #include "devices/devices-common.h" | ||
32 | #include "hardware.h" | ||
33 | #include "iomux-v3.h" | ||
34 | |||
35 | void __iomem *mx3_ccm_base; | ||
36 | |||
37 | static void imx3_idle(void) | ||
38 | { | ||
39 | unsigned long reg = 0; | ||
40 | |||
41 | mx3_cpu_lp_set(MX3_WAIT); | ||
42 | |||
43 | __asm__ __volatile__( | ||
44 | /* disable I and D cache */ | ||
45 | "mrc p15, 0, %0, c1, c0, 0\n" | ||
46 | "bic %0, %0, #0x00001000\n" | ||
47 | "bic %0, %0, #0x00000004\n" | ||
48 | "mcr p15, 0, %0, c1, c0, 0\n" | ||
49 | /* invalidate I cache */ | ||
50 | "mov %0, #0\n" | ||
51 | "mcr p15, 0, %0, c7, c5, 0\n" | ||
52 | /* clear and invalidate D cache */ | ||
53 | "mov %0, #0\n" | ||
54 | "mcr p15, 0, %0, c7, c14, 0\n" | ||
55 | /* WFI */ | ||
56 | "mov %0, #0\n" | ||
57 | "mcr p15, 0, %0, c7, c0, 4\n" | ||
58 | "nop\n" "nop\n" "nop\n" "nop\n" | ||
59 | "nop\n" "nop\n" "nop\n" | ||
60 | /* enable I and D cache */ | ||
61 | "mrc p15, 0, %0, c1, c0, 0\n" | ||
62 | "orr %0, %0, #0x00001000\n" | ||
63 | "orr %0, %0, #0x00000004\n" | ||
64 | "mcr p15, 0, %0, c1, c0, 0\n" | ||
65 | : "=r" (reg)); | ||
66 | } | ||
67 | |||
68 | static void __iomem *imx3_ioremap_caller(unsigned long phys_addr, size_t size, | ||
69 | unsigned int mtype, void *caller) | ||
70 | { | ||
71 | if (mtype == MT_DEVICE) { | ||
72 | /* | ||
73 | * Access all peripherals below 0x80000000 as nonshared device | ||
74 | * on mx3, but leave l2cc alone. Otherwise cache corruptions | ||
75 | * can occur. | ||
76 | */ | ||
77 | if (phys_addr < 0x80000000 && | ||
78 | !addr_in_module(phys_addr, MX3x_L2CC)) | ||
79 | mtype = MT_DEVICE_NONSHARED; | ||
80 | } | ||
81 | |||
82 | return __arm_ioremap_caller(phys_addr, size, mtype, caller); | ||
83 | } | ||
84 | |||
85 | void __init imx3_init_l2x0(void) | ||
86 | { | ||
87 | #ifdef CONFIG_CACHE_L2X0 | ||
88 | void __iomem *l2x0_base; | ||
89 | void __iomem *clkctl_base; | ||
90 | |||
91 | /* | ||
92 | * First of all, we must repair broken chip settings. There are some | ||
93 | * i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These | ||
94 | * misconfigured CPUs will run amok immediately when the L2 cache gets enabled. | ||
95 | * Workaraound is to setup the correct register setting prior enabling the | ||
96 | * L2 cache. This should not hurt already working CPUs, as they are using the | ||
97 | * same value. | ||
98 | */ | ||
99 | #define L2_MEM_VAL 0x10 | ||
100 | |||
101 | clkctl_base = ioremap(MX35_CLKCTL_BASE_ADDR, 4096); | ||
102 | if (clkctl_base != NULL) { | ||
103 | writel(0x00000515, clkctl_base + L2_MEM_VAL); | ||
104 | iounmap(clkctl_base); | ||
105 | } else { | ||
106 | pr_err("L2 cache: Cannot fix timing. Trying to continue without\n"); | ||
107 | } | ||
108 | |||
109 | l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096); | ||
110 | if (!l2x0_base) { | ||
111 | printk(KERN_ERR "remapping L2 cache area failed\n"); | ||
112 | return; | ||
113 | } | ||
114 | |||
115 | l2x0_init(l2x0_base, 0x00030024, 0x00000000); | ||
116 | #endif | ||
117 | } | ||
118 | |||
119 | #ifdef CONFIG_SOC_IMX31 | ||
120 | static struct map_desc mx31_io_desc[] __initdata = { | ||
121 | imx_map_entry(MX31, X_MEMC, MT_DEVICE), | ||
122 | imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED), | ||
123 | imx_map_entry(MX31, AIPS1, MT_DEVICE_NONSHARED), | ||
124 | imx_map_entry(MX31, AIPS2, MT_DEVICE_NONSHARED), | ||
125 | imx_map_entry(MX31, SPBA0, MT_DEVICE_NONSHARED), | ||
126 | }; | ||
127 | |||
128 | /* | ||
129 | * This function initializes the memory map. It is called during the | ||
130 | * system startup to create static physical to virtual memory mappings | ||
131 | * for the IO modules. | ||
132 | */ | ||
133 | void __init mx31_map_io(void) | ||
134 | { | ||
135 | iotable_init(mx31_io_desc, ARRAY_SIZE(mx31_io_desc)); | ||
136 | } | ||
137 | |||
138 | void __init imx31_init_early(void) | ||
139 | { | ||
140 | mxc_set_cpu_type(MXC_CPU_MX31); | ||
141 | mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); | ||
142 | arch_ioremap_caller = imx3_ioremap_caller; | ||
143 | arm_pm_idle = imx3_idle; | ||
144 | mx3_ccm_base = MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR); | ||
145 | } | ||
146 | |||
147 | void __init mx31_init_irq(void) | ||
148 | { | ||
149 | mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR)); | ||
150 | } | ||
151 | |||
152 | static struct sdma_script_start_addrs imx31_to1_sdma_script __initdata = { | ||
153 | .per_2_per_addr = 1677, | ||
154 | }; | ||
155 | |||
156 | static struct sdma_script_start_addrs imx31_to2_sdma_script __initdata = { | ||
157 | .ap_2_ap_addr = 423, | ||
158 | .ap_2_bp_addr = 829, | ||
159 | .bp_2_ap_addr = 1029, | ||
160 | }; | ||
161 | |||
162 | static struct sdma_platform_data imx31_sdma_pdata __initdata = { | ||
163 | .fw_name = "sdma-imx31-to2.bin", | ||
164 | .script_addrs = &imx31_to2_sdma_script, | ||
165 | }; | ||
166 | |||
167 | static const struct resource imx31_audmux_res[] __initconst = { | ||
168 | DEFINE_RES_MEM(MX31_AUDMUX_BASE_ADDR, SZ_16K), | ||
169 | }; | ||
170 | |||
171 | void __init imx31_soc_init(void) | ||
172 | { | ||
173 | int to_version = mx31_revision() >> 4; | ||
174 | |||
175 | imx3_init_l2x0(); | ||
176 | |||
177 | mxc_device_init(); | ||
178 | |||
179 | mxc_register_gpio("imx31-gpio", 0, MX31_GPIO1_BASE_ADDR, SZ_16K, MX31_INT_GPIO1, 0); | ||
180 | mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0); | ||
181 | mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0); | ||
182 | |||
183 | pinctrl_provide_dummies(); | ||
184 | |||
185 | if (to_version == 1) { | ||
186 | strncpy(imx31_sdma_pdata.fw_name, "sdma-imx31-to1.bin", | ||
187 | strlen(imx31_sdma_pdata.fw_name)); | ||
188 | imx31_sdma_pdata.script_addrs = &imx31_to1_sdma_script; | ||
189 | } | ||
190 | |||
191 | imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata); | ||
192 | |||
193 | imx_set_aips(MX31_IO_ADDRESS(MX31_AIPS1_BASE_ADDR)); | ||
194 | imx_set_aips(MX31_IO_ADDRESS(MX31_AIPS2_BASE_ADDR)); | ||
195 | |||
196 | platform_device_register_simple("imx31-audmux", 0, imx31_audmux_res, | ||
197 | ARRAY_SIZE(imx31_audmux_res)); | ||
198 | } | ||
199 | #endif /* ifdef CONFIG_SOC_IMX31 */ | ||
200 | |||
201 | #ifdef CONFIG_SOC_IMX35 | ||
202 | static struct map_desc mx35_io_desc[] __initdata = { | ||
203 | imx_map_entry(MX35, X_MEMC, MT_DEVICE), | ||
204 | imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED), | ||
205 | imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED), | ||
206 | imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED), | ||
207 | imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED), | ||
208 | }; | ||
209 | |||
210 | void __init mx35_map_io(void) | ||
211 | { | ||
212 | iotable_init(mx35_io_desc, ARRAY_SIZE(mx35_io_desc)); | ||
213 | } | ||
214 | |||
215 | void __init imx35_init_early(void) | ||
216 | { | ||
217 | mxc_set_cpu_type(MXC_CPU_MX35); | ||
218 | mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); | ||
219 | mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); | ||
220 | arm_pm_idle = imx3_idle; | ||
221 | arch_ioremap_caller = imx3_ioremap_caller; | ||
222 | mx3_ccm_base = MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR); | ||
223 | } | ||
224 | |||
225 | void __init mx35_init_irq(void) | ||
226 | { | ||
227 | mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR)); | ||
228 | } | ||
229 | |||
230 | static struct sdma_script_start_addrs imx35_to1_sdma_script __initdata = { | ||
231 | .ap_2_ap_addr = 642, | ||
232 | .uart_2_mcu_addr = 817, | ||
233 | .mcu_2_app_addr = 747, | ||
234 | .uartsh_2_mcu_addr = 1183, | ||
235 | .per_2_shp_addr = 1033, | ||
236 | .mcu_2_shp_addr = 961, | ||
237 | .ata_2_mcu_addr = 1333, | ||
238 | .mcu_2_ata_addr = 1252, | ||
239 | .app_2_mcu_addr = 683, | ||
240 | .shp_2_per_addr = 1111, | ||
241 | .shp_2_mcu_addr = 892, | ||
242 | }; | ||
243 | |||
244 | static struct sdma_script_start_addrs imx35_to2_sdma_script __initdata = { | ||
245 | .ap_2_ap_addr = 729, | ||
246 | .uart_2_mcu_addr = 904, | ||
247 | .per_2_app_addr = 1597, | ||
248 | .mcu_2_app_addr = 834, | ||
249 | .uartsh_2_mcu_addr = 1270, | ||
250 | .per_2_shp_addr = 1120, | ||
251 | .mcu_2_shp_addr = 1048, | ||
252 | .ata_2_mcu_addr = 1429, | ||
253 | .mcu_2_ata_addr = 1339, | ||
254 | .app_2_per_addr = 1531, | ||
255 | .app_2_mcu_addr = 770, | ||
256 | .shp_2_per_addr = 1198, | ||
257 | .shp_2_mcu_addr = 979, | ||
258 | }; | ||
259 | |||
260 | static struct sdma_platform_data imx35_sdma_pdata __initdata = { | ||
261 | .fw_name = "sdma-imx35-to2.bin", | ||
262 | .script_addrs = &imx35_to2_sdma_script, | ||
263 | }; | ||
264 | |||
265 | static const struct resource imx35_audmux_res[] __initconst = { | ||
266 | DEFINE_RES_MEM(MX35_AUDMUX_BASE_ADDR, SZ_16K), | ||
267 | }; | ||
268 | |||
269 | void __init imx35_soc_init(void) | ||
270 | { | ||
271 | int to_version = mx35_revision() >> 4; | ||
272 | |||
273 | imx3_init_l2x0(); | ||
274 | |||
275 | mxc_device_init(); | ||
276 | |||
277 | mxc_register_gpio("imx35-gpio", 0, MX35_GPIO1_BASE_ADDR, SZ_16K, MX35_INT_GPIO1, 0); | ||
278 | mxc_register_gpio("imx35-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0); | ||
279 | mxc_register_gpio("imx35-gpio", 2, MX35_GPIO3_BASE_ADDR, SZ_16K, MX35_INT_GPIO3, 0); | ||
280 | |||
281 | pinctrl_provide_dummies(); | ||
282 | if (to_version == 1) { | ||
283 | strncpy(imx35_sdma_pdata.fw_name, "sdma-imx35-to1.bin", | ||
284 | strlen(imx35_sdma_pdata.fw_name)); | ||
285 | imx35_sdma_pdata.script_addrs = &imx35_to1_sdma_script; | ||
286 | } | ||
287 | |||
288 | imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata); | ||
289 | |||
290 | /* Setup AIPS registers */ | ||
291 | imx_set_aips(MX35_IO_ADDRESS(MX35_AIPS1_BASE_ADDR)); | ||
292 | imx_set_aips(MX35_IO_ADDRESS(MX35_AIPS2_BASE_ADDR)); | ||
293 | |||
294 | /* i.mx35 has the i.mx31 type audmux */ | ||
295 | platform_device_register_simple("imx31-audmux", 0, imx35_audmux_res, | ||
296 | ARRAY_SIZE(imx35_audmux_res)); | ||
297 | } | ||
298 | #endif /* ifdef CONFIG_SOC_IMX35 */ | ||
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c deleted file mode 100644 index 79d71cf23a1..00000000000 --- a/arch/arm/mach-imx/mm-imx5.c +++ /dev/null | |||
@@ -1,209 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
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: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | * | ||
11 | * Create static mapping between physical to virtual memory. | ||
12 | */ | ||
13 | |||
14 | #include <linux/mm.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/clk.h> | ||
17 | #include <linux/pinctrl/machine.h> | ||
18 | |||
19 | #include <asm/mach/map.h> | ||
20 | |||
21 | #include "common.h" | ||
22 | #include "devices/devices-common.h" | ||
23 | #include "hardware.h" | ||
24 | #include "iomux-v3.h" | ||
25 | |||
26 | /* | ||
27 | * Define the MX50 memory map. | ||
28 | */ | ||
29 | static struct map_desc mx50_io_desc[] __initdata = { | ||
30 | imx_map_entry(MX50, TZIC, MT_DEVICE), | ||
31 | imx_map_entry(MX50, SPBA0, MT_DEVICE), | ||
32 | imx_map_entry(MX50, AIPS1, MT_DEVICE), | ||
33 | imx_map_entry(MX50, AIPS2, MT_DEVICE), | ||
34 | }; | ||
35 | |||
36 | /* | ||
37 | * Define the MX51 memory map. | ||
38 | */ | ||
39 | static struct map_desc mx51_io_desc[] __initdata = { | ||
40 | imx_map_entry(MX51, TZIC, MT_DEVICE), | ||
41 | imx_map_entry(MX51, IRAM, MT_DEVICE), | ||
42 | imx_map_entry(MX51, AIPS1, MT_DEVICE), | ||
43 | imx_map_entry(MX51, SPBA0, MT_DEVICE), | ||
44 | imx_map_entry(MX51, AIPS2, MT_DEVICE), | ||
45 | }; | ||
46 | |||
47 | /* | ||
48 | * Define the MX53 memory map. | ||
49 | */ | ||
50 | static struct map_desc mx53_io_desc[] __initdata = { | ||
51 | imx_map_entry(MX53, TZIC, MT_DEVICE), | ||
52 | imx_map_entry(MX53, AIPS1, MT_DEVICE), | ||
53 | imx_map_entry(MX53, SPBA0, MT_DEVICE), | ||
54 | imx_map_entry(MX53, AIPS2, MT_DEVICE), | ||
55 | }; | ||
56 | |||
57 | /* | ||
58 | * This function initializes the memory map. It is called during the | ||
59 | * system startup to create static physical to virtual memory mappings | ||
60 | * for the IO modules. | ||
61 | */ | ||
62 | void __init mx50_map_io(void) | ||
63 | { | ||
64 | iotable_init(mx50_io_desc, ARRAY_SIZE(mx50_io_desc)); | ||
65 | } | ||
66 | |||
67 | void __init mx51_map_io(void) | ||
68 | { | ||
69 | iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc)); | ||
70 | } | ||
71 | |||
72 | void __init mx53_map_io(void) | ||
73 | { | ||
74 | iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc)); | ||
75 | } | ||
76 | |||
77 | void __init imx50_init_early(void) | ||
78 | { | ||
79 | mxc_set_cpu_type(MXC_CPU_MX50); | ||
80 | mxc_iomux_v3_init(MX50_IO_ADDRESS(MX50_IOMUXC_BASE_ADDR)); | ||
81 | mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR)); | ||
82 | } | ||
83 | |||
84 | /* | ||
85 | * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by | ||
86 | * the Freescale marketing division. However this did not remove the | ||
87 | * hardware from the chip which still needs to be configured for proper | ||
88 | * IPU support. | ||
89 | */ | ||
90 | static void __init imx51_ipu_mipi_setup(void) | ||
91 | { | ||
92 | void __iomem *hsc_addr; | ||
93 | hsc_addr = MX51_IO_ADDRESS(MX51_MIPI_HSC_BASE_ADDR); | ||
94 | |||
95 | /* setup MIPI module to legacy mode */ | ||
96 | __raw_writel(0xf00, hsc_addr); | ||
97 | |||
98 | /* CSI mode: reserved; DI control mode: legacy (from Freescale BSP) */ | ||
99 | __raw_writel(__raw_readl(hsc_addr + 0x800) | 0x30ff, | ||
100 | hsc_addr + 0x800); | ||
101 | } | ||
102 | |||
103 | void __init imx51_init_early(void) | ||
104 | { | ||
105 | imx51_ipu_mipi_setup(); | ||
106 | mxc_set_cpu_type(MXC_CPU_MX51); | ||
107 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); | ||
108 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); | ||
109 | } | ||
110 | |||
111 | void __init imx53_init_early(void) | ||
112 | { | ||
113 | mxc_set_cpu_type(MXC_CPU_MX53); | ||
114 | mxc_iomux_v3_init(MX53_IO_ADDRESS(MX53_IOMUXC_BASE_ADDR)); | ||
115 | mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR)); | ||
116 | } | ||
117 | |||
118 | void __init mx50_init_irq(void) | ||
119 | { | ||
120 | tzic_init_irq(MX50_IO_ADDRESS(MX50_TZIC_BASE_ADDR)); | ||
121 | } | ||
122 | |||
123 | void __init mx51_init_irq(void) | ||
124 | { | ||
125 | tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR)); | ||
126 | } | ||
127 | |||
128 | void __init mx53_init_irq(void) | ||
129 | { | ||
130 | tzic_init_irq(MX53_IO_ADDRESS(MX53_TZIC_BASE_ADDR)); | ||
131 | } | ||
132 | |||
133 | static struct sdma_script_start_addrs imx51_sdma_script __initdata = { | ||
134 | .ap_2_ap_addr = 642, | ||
135 | .uart_2_mcu_addr = 817, | ||
136 | .mcu_2_app_addr = 747, | ||
137 | .mcu_2_shp_addr = 961, | ||
138 | .ata_2_mcu_addr = 1473, | ||
139 | .mcu_2_ata_addr = 1392, | ||
140 | .app_2_per_addr = 1033, | ||
141 | .app_2_mcu_addr = 683, | ||
142 | .shp_2_per_addr = 1251, | ||
143 | .shp_2_mcu_addr = 892, | ||
144 | }; | ||
145 | |||
146 | static struct sdma_platform_data imx51_sdma_pdata __initdata = { | ||
147 | .fw_name = "sdma-imx51.bin", | ||
148 | .script_addrs = &imx51_sdma_script, | ||
149 | }; | ||
150 | |||
151 | static const struct resource imx50_audmux_res[] __initconst = { | ||
152 | DEFINE_RES_MEM(MX50_AUDMUX_BASE_ADDR, SZ_16K), | ||
153 | }; | ||
154 | |||
155 | static const struct resource imx51_audmux_res[] __initconst = { | ||
156 | DEFINE_RES_MEM(MX51_AUDMUX_BASE_ADDR, SZ_16K), | ||
157 | }; | ||
158 | |||
159 | void __init imx50_soc_init(void) | ||
160 | { | ||
161 | mxc_device_init(); | ||
162 | |||
163 | /* i.mx50 has the i.mx35 type gpio */ | ||
164 | mxc_register_gpio("imx35-gpio", 0, MX50_GPIO1_BASE_ADDR, SZ_16K, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH); | ||
165 | mxc_register_gpio("imx35-gpio", 1, MX50_GPIO2_BASE_ADDR, SZ_16K, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH); | ||
166 | mxc_register_gpio("imx35-gpio", 2, MX50_GPIO3_BASE_ADDR, SZ_16K, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH); | ||
167 | mxc_register_gpio("imx35-gpio", 3, MX50_GPIO4_BASE_ADDR, SZ_16K, MX50_INT_GPIO4_LOW, MX50_INT_GPIO4_HIGH); | ||
168 | mxc_register_gpio("imx35-gpio", 4, MX50_GPIO5_BASE_ADDR, SZ_16K, MX50_INT_GPIO5_LOW, MX50_INT_GPIO5_HIGH); | ||
169 | mxc_register_gpio("imx35-gpio", 5, MX50_GPIO6_BASE_ADDR, SZ_16K, MX50_INT_GPIO6_LOW, MX50_INT_GPIO6_HIGH); | ||
170 | |||
171 | /* i.mx50 has the i.mx31 type audmux */ | ||
172 | platform_device_register_simple("imx31-audmux", 0, imx50_audmux_res, | ||
173 | ARRAY_SIZE(imx50_audmux_res)); | ||
174 | } | ||
175 | |||
176 | void __init imx51_soc_init(void) | ||
177 | { | ||
178 | mxc_device_init(); | ||
179 | |||
180 | /* i.mx51 has the i.mx35 type gpio */ | ||
181 | mxc_register_gpio("imx35-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, MX51_INT_GPIO1_LOW, MX51_INT_GPIO1_HIGH); | ||
182 | mxc_register_gpio("imx35-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, MX51_INT_GPIO2_LOW, MX51_INT_GPIO2_HIGH); | ||
183 | mxc_register_gpio("imx35-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_INT_GPIO3_LOW, MX51_INT_GPIO3_HIGH); | ||
184 | mxc_register_gpio("imx35-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_INT_GPIO4_LOW, MX51_INT_GPIO4_HIGH); | ||
185 | |||
186 | pinctrl_provide_dummies(); | ||
187 | |||
188 | /* i.mx51 has the i.mx35 type sdma */ | ||
189 | imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata); | ||
190 | |||
191 | /* Setup AIPS registers */ | ||
192 | imx_set_aips(MX51_IO_ADDRESS(MX51_AIPS1_BASE_ADDR)); | ||
193 | imx_set_aips(MX51_IO_ADDRESS(MX51_AIPS2_BASE_ADDR)); | ||
194 | |||
195 | /* i.mx51 has the i.mx31 type audmux */ | ||
196 | platform_device_register_simple("imx31-audmux", 0, imx51_audmux_res, | ||
197 | ARRAY_SIZE(imx51_audmux_res)); | ||
198 | } | ||
199 | |||
200 | void __init imx51_init_late(void) | ||
201 | { | ||
202 | mx51_neon_fixup(); | ||
203 | imx51_pm_init(); | ||
204 | } | ||
205 | |||
206 | void __init imx53_init_late(void) | ||
207 | { | ||
208 | imx53_pm_init(); | ||
209 | } | ||
diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c deleted file mode 100644 index 7a9686ad994..00000000000 --- a/arch/arm/mach-imx/mmdc.c +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/of.h> | ||
17 | #include <linux/of_address.h> | ||
18 | #include <linux/of_device.h> | ||
19 | |||
20 | #define MMDC_MAPSR 0x404 | ||
21 | #define BP_MMDC_MAPSR_PSD 0 | ||
22 | #define BP_MMDC_MAPSR_PSS 4 | ||
23 | |||
24 | static int imx_mmdc_probe(struct platform_device *pdev) | ||
25 | { | ||
26 | struct device_node *np = pdev->dev.of_node; | ||
27 | void __iomem *mmdc_base, *reg; | ||
28 | u32 val; | ||
29 | int timeout = 0x400; | ||
30 | |||
31 | mmdc_base = of_iomap(np, 0); | ||
32 | WARN_ON(!mmdc_base); | ||
33 | |||
34 | reg = mmdc_base + MMDC_MAPSR; | ||
35 | |||
36 | /* Enable automatic power saving */ | ||
37 | val = readl_relaxed(reg); | ||
38 | val &= ~(1 << BP_MMDC_MAPSR_PSD); | ||
39 | writel_relaxed(val, reg); | ||
40 | |||
41 | /* Ensure it's successfully enabled */ | ||
42 | while (!(readl_relaxed(reg) & 1 << BP_MMDC_MAPSR_PSS) && --timeout) | ||
43 | cpu_relax(); | ||
44 | |||
45 | if (unlikely(!timeout)) { | ||
46 | pr_warn("%s: failed to enable automatic power saving\n", | ||
47 | __func__); | ||
48 | return -EBUSY; | ||
49 | } | ||
50 | |||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | static struct of_device_id imx_mmdc_dt_ids[] = { | ||
55 | { .compatible = "fsl,imx6q-mmdc", }, | ||
56 | { /* sentinel */ } | ||
57 | }; | ||
58 | |||
59 | static struct platform_driver imx_mmdc_driver = { | ||
60 | .driver = { | ||
61 | .name = "imx-mmdc", | ||
62 | .owner = THIS_MODULE, | ||
63 | .of_match_table = imx_mmdc_dt_ids, | ||
64 | }, | ||
65 | .probe = imx_mmdc_probe, | ||
66 | }; | ||
67 | |||
68 | static int __init imx_mmdc_init(void) | ||
69 | { | ||
70 | return platform_driver_register(&imx_mmdc_driver); | ||
71 | } | ||
72 | postcore_initcall(imx_mmdc_init); | ||
diff --git a/arch/arm/mach-imx/mx1-camera-fiq-ksym.c b/arch/arm/mach-imx/mx1-camera-fiq-ksym.c index fb38436ca67..b09ee12a4ff 100644 --- a/arch/arm/mach-imx/mx1-camera-fiq-ksym.c +++ b/arch/arm/mach-imx/mx1-camera-fiq-ksym.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | 13 | ||
14 | #include <linux/platform_data/camera-mx1.h> | 14 | #include <mach/mx1_camera.h> |
15 | 15 | ||
16 | /* IMX camera FIQ handler */ | 16 | /* IMX camera FIQ handler */ |
17 | EXPORT_SYMBOL(mx1_camera_sof_fiq_start); | 17 | EXPORT_SYMBOL(mx1_camera_sof_fiq_start); |
diff --git a/arch/arm/mach-imx/mx1.h b/arch/arm/mach-imx/mx1.h deleted file mode 100644 index 45bd31cc34d..00000000000 --- a/arch/arm/mach-imx/mx1.h +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1997,1998 Russell King | ||
3 | * Copyright (C) 1999 ARM Limited | ||
4 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
5 | * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef __MACH_MX1_H__ | ||
13 | #define __MACH_MX1_H__ | ||
14 | |||
15 | /* | ||
16 | * Memory map | ||
17 | */ | ||
18 | #define MX1_IO_BASE_ADDR 0x00200000 | ||
19 | #define MX1_IO_SIZE SZ_1M | ||
20 | |||
21 | #define MX1_CS0_PHYS 0x10000000 | ||
22 | #define MX1_CS0_SIZE 0x02000000 | ||
23 | |||
24 | #define MX1_CS1_PHYS 0x12000000 | ||
25 | #define MX1_CS1_SIZE 0x01000000 | ||
26 | |||
27 | #define MX1_CS2_PHYS 0x13000000 | ||
28 | #define MX1_CS2_SIZE 0x01000000 | ||
29 | |||
30 | #define MX1_CS3_PHYS 0x14000000 | ||
31 | #define MX1_CS3_SIZE 0x01000000 | ||
32 | |||
33 | #define MX1_CS4_PHYS 0x15000000 | ||
34 | #define MX1_CS4_SIZE 0x01000000 | ||
35 | |||
36 | #define MX1_CS5_PHYS 0x16000000 | ||
37 | #define MX1_CS5_SIZE 0x01000000 | ||
38 | |||
39 | /* | ||
40 | * Register BASEs, based on OFFSETs | ||
41 | */ | ||
42 | #define MX1_AIPI1_BASE_ADDR (0x00000 + MX1_IO_BASE_ADDR) | ||
43 | #define MX1_WDT_BASE_ADDR (0x01000 + MX1_IO_BASE_ADDR) | ||
44 | #define MX1_TIM1_BASE_ADDR (0x02000 + MX1_IO_BASE_ADDR) | ||
45 | #define MX1_TIM2_BASE_ADDR (0x03000 + MX1_IO_BASE_ADDR) | ||
46 | #define MX1_RTC_BASE_ADDR (0x04000 + MX1_IO_BASE_ADDR) | ||
47 | #define MX1_LCDC_BASE_ADDR (0x05000 + MX1_IO_BASE_ADDR) | ||
48 | #define MX1_UART1_BASE_ADDR (0x06000 + MX1_IO_BASE_ADDR) | ||
49 | #define MX1_UART2_BASE_ADDR (0x07000 + MX1_IO_BASE_ADDR) | ||
50 | #define MX1_PWM_BASE_ADDR (0x08000 + MX1_IO_BASE_ADDR) | ||
51 | #define MX1_DMA_BASE_ADDR (0x09000 + MX1_IO_BASE_ADDR) | ||
52 | #define MX1_AIPI2_BASE_ADDR (0x10000 + MX1_IO_BASE_ADDR) | ||
53 | #define MX1_SIM_BASE_ADDR (0x11000 + MX1_IO_BASE_ADDR) | ||
54 | #define MX1_USBD_BASE_ADDR (0x12000 + MX1_IO_BASE_ADDR) | ||
55 | #define MX1_CSPI1_BASE_ADDR (0x13000 + MX1_IO_BASE_ADDR) | ||
56 | #define MX1_MMC_BASE_ADDR (0x14000 + MX1_IO_BASE_ADDR) | ||
57 | #define MX1_ASP_BASE_ADDR (0x15000 + MX1_IO_BASE_ADDR) | ||
58 | #define MX1_BTA_BASE_ADDR (0x16000 + MX1_IO_BASE_ADDR) | ||
59 | #define MX1_I2C_BASE_ADDR (0x17000 + MX1_IO_BASE_ADDR) | ||
60 | #define MX1_SSI_BASE_ADDR (0x18000 + MX1_IO_BASE_ADDR) | ||
61 | #define MX1_CSPI2_BASE_ADDR (0x19000 + MX1_IO_BASE_ADDR) | ||
62 | #define MX1_MSHC_BASE_ADDR (0x1A000 + MX1_IO_BASE_ADDR) | ||
63 | #define MX1_CCM_BASE_ADDR (0x1B000 + MX1_IO_BASE_ADDR) | ||
64 | #define MX1_SCM_BASE_ADDR (0x1B804 + MX1_IO_BASE_ADDR) | ||
65 | #define MX1_GPIO_BASE_ADDR (0x1C000 + MX1_IO_BASE_ADDR) | ||
66 | #define MX1_GPIO1_BASE_ADDR (0x1C000 + MX1_IO_BASE_ADDR) | ||
67 | #define MX1_GPIO2_BASE_ADDR (0x1C100 + MX1_IO_BASE_ADDR) | ||
68 | #define MX1_GPIO3_BASE_ADDR (0x1C200 + MX1_IO_BASE_ADDR) | ||
69 | #define MX1_GPIO4_BASE_ADDR (0x1C300 + MX1_IO_BASE_ADDR) | ||
70 | #define MX1_EIM_BASE_ADDR (0x20000 + MX1_IO_BASE_ADDR) | ||
71 | #define MX1_SDRAMC_BASE_ADDR (0x21000 + MX1_IO_BASE_ADDR) | ||
72 | #define MX1_MMA_BASE_ADDR (0x22000 + MX1_IO_BASE_ADDR) | ||
73 | #define MX1_AVIC_BASE_ADDR (0x23000 + MX1_IO_BASE_ADDR) | ||
74 | #define MX1_CSI_BASE_ADDR (0x24000 + MX1_IO_BASE_ADDR) | ||
75 | |||
76 | /* macro to get at IO space when running virtually */ | ||
77 | #define MX1_IO_P2V(x) IMX_IO_P2V(x) | ||
78 | #define MX1_IO_ADDRESS(x) IOMEM(MX1_IO_P2V(x)) | ||
79 | |||
80 | /* fixed interrput numbers */ | ||
81 | #include <asm/irq.h> | ||
82 | #define MX1_INT_SOFTINT (NR_IRQS_LEGACY + 0) | ||
83 | #define MX1_INT_CSI (NR_IRQS_LEGACY + 6) | ||
84 | #define MX1_DSPA_MAC_INT (NR_IRQS_LEGACY + 7) | ||
85 | #define MX1_DSPA_INT (NR_IRQS_LEGACY + 8) | ||
86 | #define MX1_COMP_INT (NR_IRQS_LEGACY + 9) | ||
87 | #define MX1_MSHC_XINT (NR_IRQS_LEGACY + 10) | ||
88 | #define MX1_GPIO_INT_PORTA (NR_IRQS_LEGACY + 11) | ||
89 | #define MX1_GPIO_INT_PORTB (NR_IRQS_LEGACY + 12) | ||
90 | #define MX1_GPIO_INT_PORTC (NR_IRQS_LEGACY + 13) | ||
91 | #define MX1_INT_LCDC (NR_IRQS_LEGACY + 14) | ||
92 | #define MX1_SIM_INT (NR_IRQS_LEGACY + 15) | ||
93 | #define MX1_SIM_DATA_INT (NR_IRQS_LEGACY + 16) | ||
94 | #define MX1_RTC_INT (NR_IRQS_LEGACY + 17) | ||
95 | #define MX1_RTC_SAMINT (NR_IRQS_LEGACY + 18) | ||
96 | #define MX1_INT_UART2PFERR (NR_IRQS_LEGACY + 19) | ||
97 | #define MX1_INT_UART2RTS (NR_IRQS_LEGACY + 20) | ||
98 | #define MX1_INT_UART2DTR (NR_IRQS_LEGACY + 21) | ||
99 | #define MX1_INT_UART2UARTC (NR_IRQS_LEGACY + 22) | ||
100 | #define MX1_INT_UART2TX (NR_IRQS_LEGACY + 23) | ||
101 | #define MX1_INT_UART2RX (NR_IRQS_LEGACY + 24) | ||
102 | #define MX1_INT_UART1PFERR (NR_IRQS_LEGACY + 25) | ||
103 | #define MX1_INT_UART1RTS (NR_IRQS_LEGACY + 26) | ||
104 | #define MX1_INT_UART1DTR (NR_IRQS_LEGACY + 27) | ||
105 | #define MX1_INT_UART1UARTC (NR_IRQS_LEGACY + 28) | ||
106 | #define MX1_INT_UART1TX (NR_IRQS_LEGACY + 29) | ||
107 | #define MX1_INT_UART1RX (NR_IRQS_LEGACY + 30) | ||
108 | #define MX1_VOICE_DAC_INT (NR_IRQS_LEGACY + 31) | ||
109 | #define MX1_VOICE_ADC_INT (NR_IRQS_LEGACY + 32) | ||
110 | #define MX1_PEN_DATA_INT (NR_IRQS_LEGACY + 33) | ||
111 | #define MX1_PWM_INT (NR_IRQS_LEGACY + 34) | ||
112 | #define MX1_SDHC_INT (NR_IRQS_LEGACY + 35) | ||
113 | #define MX1_INT_I2C (NR_IRQS_LEGACY + 39) | ||
114 | #define MX1_INT_CSPI2 (NR_IRQS_LEGACY + 40) | ||
115 | #define MX1_INT_CSPI1 (NR_IRQS_LEGACY + 41) | ||
116 | #define MX1_SSI_TX_INT (NR_IRQS_LEGACY + 42) | ||
117 | #define MX1_SSI_TX_ERR_INT (NR_IRQS_LEGACY + 43) | ||
118 | #define MX1_SSI_RX_INT (NR_IRQS_LEGACY + 44) | ||
119 | #define MX1_SSI_RX_ERR_INT (NR_IRQS_LEGACY + 45) | ||
120 | #define MX1_TOUCH_INT (NR_IRQS_LEGACY + 46) | ||
121 | #define MX1_INT_USBD0 (NR_IRQS_LEGACY + 47) | ||
122 | #define MX1_INT_USBD1 (NR_IRQS_LEGACY + 48) | ||
123 | #define MX1_INT_USBD2 (NR_IRQS_LEGACY + 49) | ||
124 | #define MX1_INT_USBD3 (NR_IRQS_LEGACY + 50) | ||
125 | #define MX1_INT_USBD4 (NR_IRQS_LEGACY + 51) | ||
126 | #define MX1_INT_USBD5 (NR_IRQS_LEGACY + 52) | ||
127 | #define MX1_INT_USBD6 (NR_IRQS_LEGACY + 53) | ||
128 | #define MX1_BTSYS_INT (NR_IRQS_LEGACY + 55) | ||
129 | #define MX1_BTTIM_INT (NR_IRQS_LEGACY + 56) | ||
130 | #define MX1_BTWUI_INT (NR_IRQS_LEGACY + 57) | ||
131 | #define MX1_TIM2_INT (NR_IRQS_LEGACY + 58) | ||
132 | #define MX1_TIM1_INT (NR_IRQS_LEGACY + 59) | ||
133 | #define MX1_DMA_ERR (NR_IRQS_LEGACY + 60) | ||
134 | #define MX1_DMA_INT (NR_IRQS_LEGACY + 61) | ||
135 | #define MX1_GPIO_INT_PORTD (NR_IRQS_LEGACY + 62) | ||
136 | #define MX1_WDT_INT (NR_IRQS_LEGACY + 63) | ||
137 | |||
138 | /* DMA */ | ||
139 | #define MX1_DMA_REQ_UART3_T 2 | ||
140 | #define MX1_DMA_REQ_UART3_R 3 | ||
141 | #define MX1_DMA_REQ_SSI2_T 4 | ||
142 | #define MX1_DMA_REQ_SSI2_R 5 | ||
143 | #define MX1_DMA_REQ_CSI_STAT 6 | ||
144 | #define MX1_DMA_REQ_CSI_R 7 | ||
145 | #define MX1_DMA_REQ_MSHC 8 | ||
146 | #define MX1_DMA_REQ_DSPA_DCT_DOUT 9 | ||
147 | #define MX1_DMA_REQ_DSPA_DCT_DIN 10 | ||
148 | #define MX1_DMA_REQ_DSPA_MAC 11 | ||
149 | #define MX1_DMA_REQ_EXT 12 | ||
150 | #define MX1_DMA_REQ_SDHC 13 | ||
151 | #define MX1_DMA_REQ_SPI1_R 14 | ||
152 | #define MX1_DMA_REQ_SPI1_T 15 | ||
153 | #define MX1_DMA_REQ_SSI_T 16 | ||
154 | #define MX1_DMA_REQ_SSI_R 17 | ||
155 | #define MX1_DMA_REQ_ASP_DAC 18 | ||
156 | #define MX1_DMA_REQ_ASP_ADC 19 | ||
157 | #define MX1_DMA_REQ_USP_EP(x) (20 + (x)) | ||
158 | #define MX1_DMA_REQ_SPI2_R 26 | ||
159 | #define MX1_DMA_REQ_SPI2_T 27 | ||
160 | #define MX1_DMA_REQ_UART2_T 28 | ||
161 | #define MX1_DMA_REQ_UART2_R 29 | ||
162 | #define MX1_DMA_REQ_UART1_T 30 | ||
163 | #define MX1_DMA_REQ_UART1_R 31 | ||
164 | |||
165 | /* | ||
166 | * This doesn't depend on IMX_NEEDS_DEPRECATED_SYMBOLS | ||
167 | * to not break drivers/usb/gadget/imx_udc. Should go | ||
168 | * away after this driver uses the new name. | ||
169 | */ | ||
170 | #define USBD_INT0 MX1_INT_USBD0 | ||
171 | |||
172 | #endif /* ifndef __MACH_MX1_H__ */ | ||
diff --git a/arch/arm/mach-imx/mx21.h b/arch/arm/mach-imx/mx21.h deleted file mode 100644 index 468738aa997..00000000000 --- a/arch/arm/mach-imx/mx21.h +++ /dev/null | |||
@@ -1,189 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de | ||
4 | * Copyright 2009 Holger Schurig, hs4233@mail.mn-solutions.de | ||
5 | * | ||
6 | * This contains i.MX21-specific hardware definitions. For those | ||
7 | * hardware pieces that are common between i.MX21 and i.MX27, have a | ||
8 | * look at mx2x.h. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License | ||
12 | * as published by the Free Software Foundation; either version 2 | ||
13 | * of the License, or (at your option) any later version. | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
22 | * MA 02110-1301, USA. | ||
23 | */ | ||
24 | |||
25 | #ifndef __MACH_MX21_H__ | ||
26 | #define __MACH_MX21_H__ | ||
27 | |||
28 | #define MX21_AIPI_BASE_ADDR 0x10000000 | ||
29 | #define MX21_AIPI_SIZE SZ_1M | ||
30 | #define MX21_DMA_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x01000) | ||
31 | #define MX21_WDOG_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x02000) | ||
32 | #define MX21_GPT1_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x03000) | ||
33 | #define MX21_GPT2_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x04000) | ||
34 | #define MX21_GPT3_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x05000) | ||
35 | #define MX21_PWM_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x06000) | ||
36 | #define MX21_RTC_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x07000) | ||
37 | #define MX21_KPP_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x08000) | ||
38 | #define MX21_OWIRE_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x09000) | ||
39 | #define MX21_UART1_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x0a000) | ||
40 | #define MX21_UART2_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x0b000) | ||
41 | #define MX21_UART3_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x0c000) | ||
42 | #define MX21_UART4_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x0d000) | ||
43 | #define MX21_CSPI1_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x0e000) | ||
44 | #define MX21_CSPI2_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x0f000) | ||
45 | #define MX21_SSI1_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x10000) | ||
46 | #define MX21_SSI2_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x11000) | ||
47 | #define MX21_I2C_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x12000) | ||
48 | #define MX21_SDHC1_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x13000) | ||
49 | #define MX21_SDHC2_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x14000) | ||
50 | #define MX21_GPIO_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x15000) | ||
51 | #define MX21_GPIO1_BASE_ADDR (MX21_GPIO_BASE_ADDR + 0x000) | ||
52 | #define MX21_GPIO2_BASE_ADDR (MX21_GPIO_BASE_ADDR + 0x100) | ||
53 | #define MX21_GPIO3_BASE_ADDR (MX21_GPIO_BASE_ADDR + 0x200) | ||
54 | #define MX21_GPIO4_BASE_ADDR (MX21_GPIO_BASE_ADDR + 0x300) | ||
55 | #define MX21_GPIO5_BASE_ADDR (MX21_GPIO_BASE_ADDR + 0x400) | ||
56 | #define MX21_GPIO6_BASE_ADDR (MX21_GPIO_BASE_ADDR + 0x500) | ||
57 | #define MX21_AUDMUX_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x16000) | ||
58 | #define MX21_CSPI3_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x17000) | ||
59 | #define MX21_LCDC_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x21000) | ||
60 | #define MX21_SLCDC_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x22000) | ||
61 | #define MX21_USBOTG_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x24000) | ||
62 | #define MX21_EMMA_PP_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x26000) | ||
63 | #define MX21_EMMA_PRP_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x26400) | ||
64 | #define MX21_CCM_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x27000) | ||
65 | #define MX21_SYSCTRL_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x27800) | ||
66 | #define MX21_JAM_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x3e000) | ||
67 | #define MX21_MAX_BASE_ADDR (MX21_AIPI_BASE_ADDR + 0x3f000) | ||
68 | |||
69 | #define MX21_AVIC_BASE_ADDR 0x10040000 | ||
70 | |||
71 | #define MX21_SAHB1_BASE_ADDR 0x80000000 | ||
72 | #define MX21_SAHB1_SIZE SZ_1M | ||
73 | #define MX21_CSI_BASE_ADDR (MX2x_SAHB1_BASE_ADDR + 0x0000) | ||
74 | |||
75 | /* Memory regions and CS */ | ||
76 | #define MX21_SDRAM_BASE_ADDR 0xc0000000 | ||
77 | #define MX21_CSD1_BASE_ADDR 0xc4000000 | ||
78 | |||
79 | #define MX21_CS0_BASE_ADDR 0xc8000000 | ||
80 | #define MX21_CS1_BASE_ADDR 0xcc000000 | ||
81 | #define MX21_CS2_BASE_ADDR 0xd0000000 | ||
82 | #define MX21_CS3_BASE_ADDR 0xd1000000 | ||
83 | #define MX21_CS4_BASE_ADDR 0xd2000000 | ||
84 | #define MX21_PCMCIA_MEM_BASE_ADDR 0xd4000000 | ||
85 | #define MX21_CS5_BASE_ADDR 0xdd000000 | ||
86 | |||
87 | /* NAND, SDRAM, WEIM etc controllers */ | ||
88 | #define MX21_X_MEMC_BASE_ADDR 0xdf000000 | ||
89 | #define MX21_X_MEMC_SIZE SZ_256K | ||
90 | |||
91 | #define MX21_SDRAMC_BASE_ADDR (MX21_X_MEMC_BASE_ADDR + 0x0000) | ||
92 | #define MX21_EIM_BASE_ADDR (MX21_X_MEMC_BASE_ADDR + 0x1000) | ||
93 | #define MX21_PCMCIA_CTL_BASE_ADDR (MX21_X_MEMC_BASE_ADDR + 0x2000) | ||
94 | #define MX21_NFC_BASE_ADDR (MX21_X_MEMC_BASE_ADDR + 0x3000) | ||
95 | |||
96 | #define MX21_IRAM_BASE_ADDR 0xffffe800 /* internal ram */ | ||
97 | |||
98 | #define MX21_IO_P2V(x) IMX_IO_P2V(x) | ||
99 | #define MX21_IO_ADDRESS(x) IOMEM(MX21_IO_P2V(x)) | ||
100 | |||
101 | /* fixed interrupt numbers */ | ||
102 | #include <asm/irq.h> | ||
103 | #define MX21_INT_CSPI3 (NR_IRQS_LEGACY + 6) | ||
104 | #define MX21_INT_GPIO (NR_IRQS_LEGACY + 8) | ||
105 | #define MX21_INT_FIRI (NR_IRQS_LEGACY + 9) | ||
106 | #define MX21_INT_SDHC2 (NR_IRQS_LEGACY + 10) | ||
107 | #define MX21_INT_SDHC1 (NR_IRQS_LEGACY + 11) | ||
108 | #define MX21_INT_I2C (NR_IRQS_LEGACY + 12) | ||
109 | #define MX21_INT_SSI2 (NR_IRQS_LEGACY + 13) | ||
110 | #define MX21_INT_SSI1 (NR_IRQS_LEGACY + 14) | ||
111 | #define MX21_INT_CSPI2 (NR_IRQS_LEGACY + 15) | ||
112 | #define MX21_INT_CSPI1 (NR_IRQS_LEGACY + 16) | ||
113 | #define MX21_INT_UART4 (NR_IRQS_LEGACY + 17) | ||
114 | #define MX21_INT_UART3 (NR_IRQS_LEGACY + 18) | ||
115 | #define MX21_INT_UART2 (NR_IRQS_LEGACY + 19) | ||
116 | #define MX21_INT_UART1 (NR_IRQS_LEGACY + 20) | ||
117 | #define MX21_INT_KPP (NR_IRQS_LEGACY + 21) | ||
118 | #define MX21_INT_RTC (NR_IRQS_LEGACY + 22) | ||
119 | #define MX21_INT_PWM (NR_IRQS_LEGACY + 23) | ||
120 | #define MX21_INT_GPT3 (NR_IRQS_LEGACY + 24) | ||
121 | #define MX21_INT_GPT2 (NR_IRQS_LEGACY + 25) | ||
122 | #define MX21_INT_GPT1 (NR_IRQS_LEGACY + 26) | ||
123 | #define MX21_INT_WDOG (NR_IRQS_LEGACY + 27) | ||
124 | #define MX21_INT_PCMCIA (NR_IRQS_LEGACY + 28) | ||
125 | #define MX21_INT_NFC (NR_IRQS_LEGACY + 29) | ||
126 | #define MX21_INT_BMI (NR_IRQS_LEGACY + 30) | ||
127 | #define MX21_INT_CSI (NR_IRQS_LEGACY + 31) | ||
128 | #define MX21_INT_DMACH0 (NR_IRQS_LEGACY + 32) | ||
129 | #define MX21_INT_DMACH1 (NR_IRQS_LEGACY + 33) | ||
130 | #define MX21_INT_DMACH2 (NR_IRQS_LEGACY + 34) | ||
131 | #define MX21_INT_DMACH3 (NR_IRQS_LEGACY + 35) | ||
132 | #define MX21_INT_DMACH4 (NR_IRQS_LEGACY + 36) | ||
133 | #define MX21_INT_DMACH5 (NR_IRQS_LEGACY + 37) | ||
134 | #define MX21_INT_DMACH6 (NR_IRQS_LEGACY + 38) | ||
135 | #define MX21_INT_DMACH7 (NR_IRQS_LEGACY + 39) | ||
136 | #define MX21_INT_DMACH8 (NR_IRQS_LEGACY + 40) | ||
137 | #define MX21_INT_DMACH9 (NR_IRQS_LEGACY + 41) | ||
138 | #define MX21_INT_DMACH10 (NR_IRQS_LEGACY + 42) | ||
139 | #define MX21_INT_DMACH11 (NR_IRQS_LEGACY + 43) | ||
140 | #define MX21_INT_DMACH12 (NR_IRQS_LEGACY + 44) | ||
141 | #define MX21_INT_DMACH13 (NR_IRQS_LEGACY + 45) | ||
142 | #define MX21_INT_DMACH14 (NR_IRQS_LEGACY + 46) | ||
143 | #define MX21_INT_DMACH15 (NR_IRQS_LEGACY + 47) | ||
144 | #define MX21_INT_EMMAENC (NR_IRQS_LEGACY + 49) | ||
145 | #define MX21_INT_EMMADEC (NR_IRQS_LEGACY + 50) | ||
146 | #define MX21_INT_EMMAPRP (NR_IRQS_LEGACY + 51) | ||
147 | #define MX21_INT_EMMAPP (NR_IRQS_LEGACY + 52) | ||
148 | #define MX21_INT_USBWKUP (NR_IRQS_LEGACY + 53) | ||
149 | #define MX21_INT_USBDMA (NR_IRQS_LEGACY + 54) | ||
150 | #define MX21_INT_USBHOST (NR_IRQS_LEGACY + 55) | ||
151 | #define MX21_INT_USBFUNC (NR_IRQS_LEGACY + 56) | ||
152 | #define MX21_INT_USBMNP (NR_IRQS_LEGACY + 57) | ||
153 | #define MX21_INT_USBCTRL (NR_IRQS_LEGACY + 58) | ||
154 | #define MX21_INT_SLCDC (NR_IRQS_LEGACY + 60) | ||
155 | #define MX21_INT_LCDC (NR_IRQS_LEGACY + 61) | ||
156 | |||
157 | /* fixed DMA request numbers */ | ||
158 | #define MX21_DMA_REQ_CSPI3_RX 1 | ||
159 | #define MX21_DMA_REQ_CSPI3_TX 2 | ||
160 | #define MX21_DMA_REQ_EXT 3 | ||
161 | #define MX21_DMA_REQ_FIRI_RX 4 | ||
162 | #define MX21_DMA_REQ_SDHC2 6 | ||
163 | #define MX21_DMA_REQ_SDHC1 7 | ||
164 | #define MX21_DMA_REQ_SSI2_RX0 8 | ||
165 | #define MX21_DMA_REQ_SSI2_TX0 9 | ||
166 | #define MX21_DMA_REQ_SSI2_RX1 10 | ||
167 | #define MX21_DMA_REQ_SSI2_TX1 11 | ||
168 | #define MX21_DMA_REQ_SSI1_RX0 12 | ||
169 | #define MX21_DMA_REQ_SSI1_TX0 13 | ||
170 | #define MX21_DMA_REQ_SSI1_RX1 14 | ||
171 | #define MX21_DMA_REQ_SSI1_TX1 15 | ||
172 | #define MX21_DMA_REQ_CSPI2_RX 16 | ||
173 | #define MX21_DMA_REQ_CSPI2_TX 17 | ||
174 | #define MX21_DMA_REQ_CSPI1_RX 18 | ||
175 | #define MX21_DMA_REQ_CSPI1_TX 19 | ||
176 | #define MX21_DMA_REQ_UART4_RX 20 | ||
177 | #define MX21_DMA_REQ_UART4_TX 21 | ||
178 | #define MX21_DMA_REQ_UART3_RX 22 | ||
179 | #define MX21_DMA_REQ_UART3_TX 23 | ||
180 | #define MX21_DMA_REQ_UART2_RX 24 | ||
181 | #define MX21_DMA_REQ_UART2_TX 25 | ||
182 | #define MX21_DMA_REQ_UART1_RX 26 | ||
183 | #define MX21_DMA_REQ_UART1_TX 27 | ||
184 | #define MX21_DMA_REQ_BMI_TX 28 | ||
185 | #define MX21_DMA_REQ_BMI_RX 29 | ||
186 | #define MX21_DMA_REQ_CSI_STAT 30 | ||
187 | #define MX21_DMA_REQ_CSI_RX 31 | ||
188 | |||
189 | #endif /* ifndef __MACH_MX21_H__ */ | ||
diff --git a/arch/arm/mach-imx/mx25.h b/arch/arm/mach-imx/mx25.h deleted file mode 100644 index ec466400a20..00000000000 --- a/arch/arm/mach-imx/mx25.h +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | #ifndef __MACH_MX25_H__ | ||
2 | #define __MACH_MX25_H__ | ||
3 | |||
4 | #define MX25_AIPS1_BASE_ADDR 0x43f00000 | ||
5 | #define MX25_AIPS1_SIZE SZ_1M | ||
6 | #define MX25_AIPS2_BASE_ADDR 0x53f00000 | ||
7 | #define MX25_AIPS2_SIZE SZ_1M | ||
8 | #define MX25_AVIC_BASE_ADDR 0x68000000 | ||
9 | #define MX25_AVIC_SIZE SZ_1M | ||
10 | |||
11 | #define MX25_I2C1_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x80000) | ||
12 | #define MX25_I2C3_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x84000) | ||
13 | #define MX25_CAN1_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x88000) | ||
14 | #define MX25_CAN2_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x8c000) | ||
15 | #define MX25_I2C2_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x98000) | ||
16 | #define MX25_CSPI1_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0xa4000) | ||
17 | #define MX25_IOMUXC_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0xac000) | ||
18 | |||
19 | #define MX25_CRM_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x80000) | ||
20 | #define MX25_GPT1_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x90000) | ||
21 | #define MX25_GPIO4_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x9c000) | ||
22 | #define MX25_PWM2_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xa0000) | ||
23 | #define MX25_GPIO3_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xa4000) | ||
24 | #define MX25_PWM3_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xa8000) | ||
25 | #define MX25_PWM4_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xc8000) | ||
26 | #define MX25_GPIO1_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xcc000) | ||
27 | #define MX25_GPIO2_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xd0000) | ||
28 | #define MX25_WDOG_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xdc000) | ||
29 | #define MX25_PWM1_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xe0000) | ||
30 | |||
31 | #define MX25_UART1_BASE_ADDR 0x43f90000 | ||
32 | #define MX25_UART2_BASE_ADDR 0x43f94000 | ||
33 | #define MX25_AUDMUX_BASE_ADDR 0x43fb0000 | ||
34 | #define MX25_UART3_BASE_ADDR 0x5000c000 | ||
35 | #define MX25_UART4_BASE_ADDR 0x50008000 | ||
36 | #define MX25_UART5_BASE_ADDR 0x5002c000 | ||
37 | |||
38 | #define MX25_CSPI3_BASE_ADDR 0x50004000 | ||
39 | #define MX25_CSPI2_BASE_ADDR 0x50010000 | ||
40 | #define MX25_FEC_BASE_ADDR 0x50038000 | ||
41 | #define MX25_SSI2_BASE_ADDR 0x50014000 | ||
42 | #define MX25_SSI1_BASE_ADDR 0x50034000 | ||
43 | #define MX25_NFC_BASE_ADDR 0xbb000000 | ||
44 | #define MX25_IIM_BASE_ADDR 0x53ff0000 | ||
45 | #define MX25_DRYICE_BASE_ADDR 0x53ffc000 | ||
46 | #define MX25_ESDHC1_BASE_ADDR 0x53fb4000 | ||
47 | #define MX25_ESDHC2_BASE_ADDR 0x53fb8000 | ||
48 | #define MX25_LCDC_BASE_ADDR 0x53fbc000 | ||
49 | #define MX25_KPP_BASE_ADDR 0x43fa8000 | ||
50 | #define MX25_SDMA_BASE_ADDR 0x53fd4000 | ||
51 | #define MX25_USB_BASE_ADDR 0x53ff4000 | ||
52 | #define MX25_USB_OTG_BASE_ADDR (MX25_USB_BASE_ADDR + 0x0000) | ||
53 | /* | ||
54 | * The reference manual (IMX25RM, Rev. 1, 06/2009) specifies an offset of 0x200 | ||
55 | * for the host controller. Early documentation drafts specified 0x400 and | ||
56 | * Freescale internal sources confirm only the latter value to work. | ||
57 | */ | ||
58 | #define MX25_USB_HS_BASE_ADDR (MX25_USB_BASE_ADDR + 0x0400) | ||
59 | #define MX25_CSI_BASE_ADDR 0x53ff8000 | ||
60 | |||
61 | #define MX25_IO_P2V(x) IMX_IO_P2V(x) | ||
62 | #define MX25_IO_ADDRESS(x) IOMEM(MX25_IO_P2V(x)) | ||
63 | |||
64 | /* | ||
65 | * Interrupt numbers | ||
66 | */ | ||
67 | #include <asm/irq.h> | ||
68 | #define MX25_INT_CSPI3 (NR_IRQS_LEGACY + 0) | ||
69 | #define MX25_INT_I2C1 (NR_IRQS_LEGACY + 3) | ||
70 | #define MX25_INT_I2C2 (NR_IRQS_LEGACY + 4) | ||
71 | #define MX25_INT_UART4 (NR_IRQS_LEGACY + 5) | ||
72 | #define MX25_INT_ESDHC2 (NR_IRQS_LEGACY + 8) | ||
73 | #define MX25_INT_ESDHC1 (NR_IRQS_LEGACY + 9) | ||
74 | #define MX25_INT_I2C3 (NR_IRQS_LEGACY + 10) | ||
75 | #define MX25_INT_SSI2 (NR_IRQS_LEGACY + 11) | ||
76 | #define MX25_INT_SSI1 (NR_IRQS_LEGACY + 12) | ||
77 | #define MX25_INT_CSPI2 (NR_IRQS_LEGACY + 13) | ||
78 | #define MX25_INT_CSPI1 (NR_IRQS_LEGACY + 14) | ||
79 | #define MX25_INT_GPIO3 (NR_IRQS_LEGACY + 16) | ||
80 | #define MX25_INT_CSI (NR_IRQS_LEGACY + 17) | ||
81 | #define MX25_INT_UART3 (NR_IRQS_LEGACY + 18) | ||
82 | #define MX25_INT_GPIO4 (NR_IRQS_LEGACY + 23) | ||
83 | #define MX25_INT_KPP (NR_IRQS_LEGACY + 24) | ||
84 | #define MX25_INT_DRYICE (NR_IRQS_LEGACY + 25) | ||
85 | #define MX25_INT_PWM1 (NR_IRQS_LEGACY + 26) | ||
86 | #define MX25_INT_UART2 (NR_IRQS_LEGACY + 32) | ||
87 | #define MX25_INT_NFC (NR_IRQS_LEGACY + 33) | ||
88 | #define MX25_INT_SDMA (NR_IRQS_LEGACY + 34) | ||
89 | #define MX25_INT_USB_HS (NR_IRQS_LEGACY + 35) | ||
90 | #define MX25_INT_PWM2 (NR_IRQS_LEGACY + 36) | ||
91 | #define MX25_INT_USB_OTG (NR_IRQS_LEGACY + 37) | ||
92 | #define MX25_INT_LCDC (NR_IRQS_LEGACY + 39) | ||
93 | #define MX25_INT_UART5 (NR_IRQS_LEGACY + 40) | ||
94 | #define MX25_INT_PWM3 (NR_IRQS_LEGACY + 41) | ||
95 | #define MX25_INT_PWM4 (NR_IRQS_LEGACY + 42) | ||
96 | #define MX25_INT_CAN1 (NR_IRQS_LEGACY + 43) | ||
97 | #define MX25_INT_CAN2 (NR_IRQS_LEGACY + 44) | ||
98 | #define MX25_INT_UART1 (NR_IRQS_LEGACY + 45) | ||
99 | #define MX25_INT_GPIO2 (NR_IRQS_LEGACY + 51) | ||
100 | #define MX25_INT_GPIO1 (NR_IRQS_LEGACY + 52) | ||
101 | #define MX25_INT_GPT1 (NR_IRQS_LEGACY + 54) | ||
102 | #define MX25_INT_FEC (NR_IRQS_LEGACY + 57) | ||
103 | |||
104 | #define MX25_DMA_REQ_SSI2_RX1 22 | ||
105 | #define MX25_DMA_REQ_SSI2_TX1 23 | ||
106 | #define MX25_DMA_REQ_SSI2_RX0 24 | ||
107 | #define MX25_DMA_REQ_SSI2_TX0 25 | ||
108 | #define MX25_DMA_REQ_SSI1_RX1 26 | ||
109 | #define MX25_DMA_REQ_SSI1_TX1 27 | ||
110 | #define MX25_DMA_REQ_SSI1_RX0 28 | ||
111 | #define MX25_DMA_REQ_SSI1_TX0 29 | ||
112 | |||
113 | #ifndef __ASSEMBLY__ | ||
114 | extern int mx25_revision(void); | ||
115 | #endif | ||
116 | |||
117 | #endif /* ifndef __MACH_MX25_H__ */ | ||
diff --git a/arch/arm/mach-imx/mx27.h b/arch/arm/mach-imx/mx27.h deleted file mode 100644 index e074616d54c..00000000000 --- a/arch/arm/mach-imx/mx27.h +++ /dev/null | |||
@@ -1,238 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de | ||
4 | * | ||
5 | * This contains i.MX27-specific hardware definitions. For those | ||
6 | * hardware pieces that are common between i.MX21 and i.MX27, have a | ||
7 | * look at mx2x.h. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version 2 | ||
12 | * of the License, or (at your option) any later version. | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
21 | * MA 02110-1301, USA. | ||
22 | */ | ||
23 | |||
24 | #ifndef __MACH_MX27_H__ | ||
25 | #define __MACH_MX27_H__ | ||
26 | |||
27 | #define MX27_AIPI_BASE_ADDR 0x10000000 | ||
28 | #define MX27_AIPI_SIZE SZ_1M | ||
29 | #define MX27_DMA_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x01000) | ||
30 | #define MX27_WDOG_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x02000) | ||
31 | #define MX27_GPT1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x03000) | ||
32 | #define MX27_GPT2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x04000) | ||
33 | #define MX27_GPT3_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x05000) | ||
34 | #define MX27_PWM_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x06000) | ||
35 | #define MX27_RTC_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x07000) | ||
36 | #define MX27_KPP_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x08000) | ||
37 | #define MX27_OWIRE_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x09000) | ||
38 | #define MX27_UART1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x0a000) | ||
39 | #define MX27_UART2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x0b000) | ||
40 | #define MX27_UART3_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x0c000) | ||
41 | #define MX27_UART4_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x0d000) | ||
42 | #define MX27_CSPI1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x0e000) | ||
43 | #define MX27_CSPI2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x0f000) | ||
44 | #define MX27_SSI1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x10000) | ||
45 | #define MX27_SSI2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x11000) | ||
46 | #define MX27_I2C1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x12000) | ||
47 | #define MX27_SDHC1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x13000) | ||
48 | #define MX27_SDHC2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x14000) | ||
49 | #define MX27_GPIO_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x15000) | ||
50 | #define MX27_GPIO1_BASE_ADDR (MX27_GPIO_BASE_ADDR + 0x000) | ||
51 | #define MX27_GPIO2_BASE_ADDR (MX27_GPIO_BASE_ADDR + 0x100) | ||
52 | #define MX27_GPIO3_BASE_ADDR (MX27_GPIO_BASE_ADDR + 0x200) | ||
53 | #define MX27_GPIO4_BASE_ADDR (MX27_GPIO_BASE_ADDR + 0x300) | ||
54 | #define MX27_GPIO5_BASE_ADDR (MX27_GPIO_BASE_ADDR + 0x400) | ||
55 | #define MX27_GPIO6_BASE_ADDR (MX27_GPIO_BASE_ADDR + 0x500) | ||
56 | #define MX27_AUDMUX_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x16000) | ||
57 | #define MX27_CSPI3_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x17000) | ||
58 | #define MX27_MSHC_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x18000) | ||
59 | #define MX27_GPT4_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x19000) | ||
60 | #define MX27_GPT5_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x1a000) | ||
61 | #define MX27_UART5_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x1b000) | ||
62 | #define MX27_UART6_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x1c000) | ||
63 | #define MX27_I2C2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x1d000) | ||
64 | #define MX27_SDHC3_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x1e000) | ||
65 | #define MX27_GPT6_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x1f000) | ||
66 | #define MX27_LCDC_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x21000) | ||
67 | #define MX27_SLCDC_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x22000) | ||
68 | #define MX27_VPU_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x23000) | ||
69 | #define MX27_USB_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x24000) | ||
70 | #define MX27_USB_OTG_BASE_ADDR (MX27_USB_BASE_ADDR + 0x0000) | ||
71 | #define MX27_USB_HS1_BASE_ADDR (MX27_USB_BASE_ADDR + 0x0200) | ||
72 | #define MX27_USB_HS2_BASE_ADDR (MX27_USB_BASE_ADDR + 0x0400) | ||
73 | #define MX27_SAHARA_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x25000) | ||
74 | #define MX27_EMMAPP_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x26000) | ||
75 | #define MX27_EMMAPRP_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x26400) | ||
76 | #define MX27_CCM_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x27000) | ||
77 | #define MX27_SYSCTRL_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x27800) | ||
78 | #define MX27_IIM_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x28000) | ||
79 | #define MX27_RTIC_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x2a000) | ||
80 | #define MX27_FEC_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x2b000) | ||
81 | #define MX27_SCC_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x2c000) | ||
82 | #define MX27_ETB_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x3b000) | ||
83 | #define MX27_ETB_RAM_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x3c000) | ||
84 | #define MX27_JAM_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x3e000) | ||
85 | #define MX27_MAX_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x3f000) | ||
86 | |||
87 | #define MX27_AVIC_BASE_ADDR 0x10040000 | ||
88 | |||
89 | /* ROM patch */ | ||
90 | #define MX27_ROMP_BASE_ADDR 0x10041000 | ||
91 | |||
92 | #define MX27_SAHB1_BASE_ADDR 0x80000000 | ||
93 | #define MX27_SAHB1_SIZE SZ_1M | ||
94 | #define MX27_CSI_BASE_ADDR (MX27_SAHB1_BASE_ADDR + 0x0000) | ||
95 | #define MX27_ATA_BASE_ADDR (MX27_SAHB1_BASE_ADDR + 0x1000) | ||
96 | |||
97 | /* Memory regions and CS */ | ||
98 | #define MX27_SDRAM_BASE_ADDR 0xa0000000 | ||
99 | #define MX27_CSD1_BASE_ADDR 0xb0000000 | ||
100 | |||
101 | #define MX27_CS0_BASE_ADDR 0xc0000000 | ||
102 | #define MX27_CS1_BASE_ADDR 0xc8000000 | ||
103 | #define MX27_CS2_BASE_ADDR 0xd0000000 | ||
104 | #define MX27_CS3_BASE_ADDR 0xd2000000 | ||
105 | #define MX27_CS4_BASE_ADDR 0xd4000000 | ||
106 | #define MX27_CS5_BASE_ADDR 0xd6000000 | ||
107 | |||
108 | /* NAND, SDRAM, WEIM, M3IF, EMI controllers */ | ||
109 | #define MX27_X_MEMC_BASE_ADDR 0xd8000000 | ||
110 | #define MX27_X_MEMC_SIZE SZ_1M | ||
111 | #define MX27_NFC_BASE_ADDR (MX27_X_MEMC_BASE_ADDR) | ||
112 | #define MX27_SDRAMC_BASE_ADDR (MX27_X_MEMC_BASE_ADDR + 0x1000) | ||
113 | #define MX27_WEIM_BASE_ADDR (MX27_X_MEMC_BASE_ADDR + 0x2000) | ||
114 | #define MX27_M3IF_BASE_ADDR (MX27_X_MEMC_BASE_ADDR + 0x3000) | ||
115 | #define MX27_PCMCIA_CTL_BASE_ADDR (MX27_X_MEMC_BASE_ADDR + 0x4000) | ||
116 | |||
117 | #define MX27_WEIM_CSCRx_BASE_ADDR(cs) (MX27_WEIM_BASE_ADDR + (cs) * 0x10) | ||
118 | #define MX27_WEIM_CSCRxU(cs) (MX27_WEIM_CSCRx_BASE_ADDR(cs)) | ||
119 | #define MX27_WEIM_CSCRxL(cs) (MX27_WEIM_CSCRx_BASE_ADDR(cs) + 0x4) | ||
120 | #define MX27_WEIM_CSCRxA(cs) (MX27_WEIM_CSCRx_BASE_ADDR(cs) + 0x8) | ||
121 | |||
122 | #define MX27_PCMCIA_MEM_BASE_ADDR 0xdc000000 | ||
123 | |||
124 | /* IRAM */ | ||
125 | #define MX27_IRAM_BASE_ADDR 0xffff4c00 /* internal ram */ | ||
126 | |||
127 | #define MX27_IO_P2V(x) IMX_IO_P2V(x) | ||
128 | #define MX27_IO_ADDRESS(x) IOMEM(MX27_IO_P2V(x)) | ||
129 | |||
130 | /* fixed interrupt numbers */ | ||
131 | #include <asm/irq.h> | ||
132 | #define MX27_INT_I2C2 (NR_IRQS_LEGACY + 1) | ||
133 | #define MX27_INT_GPT6 (NR_IRQS_LEGACY + 2) | ||
134 | #define MX27_INT_GPT5 (NR_IRQS_LEGACY + 3) | ||
135 | #define MX27_INT_GPT4 (NR_IRQS_LEGACY + 4) | ||
136 | #define MX27_INT_RTIC (NR_IRQS_LEGACY + 5) | ||
137 | #define MX27_INT_CSPI3 (NR_IRQS_LEGACY + 6) | ||
138 | #define MX27_INT_SDHC (NR_IRQS_LEGACY + 7) | ||
139 | #define MX27_INT_GPIO (NR_IRQS_LEGACY + 8) | ||
140 | #define MX27_INT_SDHC3 (NR_IRQS_LEGACY + 9) | ||
141 | #define MX27_INT_SDHC2 (NR_IRQS_LEGACY + 10) | ||
142 | #define MX27_INT_SDHC1 (NR_IRQS_LEGACY + 11) | ||
143 | #define MX27_INT_I2C1 (NR_IRQS_LEGACY + 12) | ||
144 | #define MX27_INT_SSI2 (NR_IRQS_LEGACY + 13) | ||
145 | #define MX27_INT_SSI1 (NR_IRQS_LEGACY + 14) | ||
146 | #define MX27_INT_CSPI2 (NR_IRQS_LEGACY + 15) | ||
147 | #define MX27_INT_CSPI1 (NR_IRQS_LEGACY + 16) | ||
148 | #define MX27_INT_UART4 (NR_IRQS_LEGACY + 17) | ||
149 | #define MX27_INT_UART3 (NR_IRQS_LEGACY + 18) | ||
150 | #define MX27_INT_UART2 (NR_IRQS_LEGACY + 19) | ||
151 | #define MX27_INT_UART1 (NR_IRQS_LEGACY + 20) | ||
152 | #define MX27_INT_KPP (NR_IRQS_LEGACY + 21) | ||
153 | #define MX27_INT_RTC (NR_IRQS_LEGACY + 22) | ||
154 | #define MX27_INT_PWM (NR_IRQS_LEGACY + 23) | ||
155 | #define MX27_INT_GPT3 (NR_IRQS_LEGACY + 24) | ||
156 | #define MX27_INT_GPT2 (NR_IRQS_LEGACY + 25) | ||
157 | #define MX27_INT_GPT1 (NR_IRQS_LEGACY + 26) | ||
158 | #define MX27_INT_WDOG (NR_IRQS_LEGACY + 27) | ||
159 | #define MX27_INT_PCMCIA (NR_IRQS_LEGACY + 28) | ||
160 | #define MX27_INT_NFC (NR_IRQS_LEGACY + 29) | ||
161 | #define MX27_INT_ATA (NR_IRQS_LEGACY + 30) | ||
162 | #define MX27_INT_CSI (NR_IRQS_LEGACY + 31) | ||
163 | #define MX27_INT_DMACH0 (NR_IRQS_LEGACY + 32) | ||
164 | #define MX27_INT_DMACH1 (NR_IRQS_LEGACY + 33) | ||
165 | #define MX27_INT_DMACH2 (NR_IRQS_LEGACY + 34) | ||
166 | #define MX27_INT_DMACH3 (NR_IRQS_LEGACY + 35) | ||
167 | #define MX27_INT_DMACH4 (NR_IRQS_LEGACY + 36) | ||
168 | #define MX27_INT_DMACH5 (NR_IRQS_LEGACY + 37) | ||
169 | #define MX27_INT_DMACH6 (NR_IRQS_LEGACY + 38) | ||
170 | #define MX27_INT_DMACH7 (NR_IRQS_LEGACY + 39) | ||
171 | #define MX27_INT_DMACH8 (NR_IRQS_LEGACY + 40) | ||
172 | #define MX27_INT_DMACH9 (NR_IRQS_LEGACY + 41) | ||
173 | #define MX27_INT_DMACH10 (NR_IRQS_LEGACY + 42) | ||
174 | #define MX27_INT_DMACH11 (NR_IRQS_LEGACY + 43) | ||
175 | #define MX27_INT_DMACH12 (NR_IRQS_LEGACY + 44) | ||
176 | #define MX27_INT_DMACH13 (NR_IRQS_LEGACY + 45) | ||
177 | #define MX27_INT_DMACH14 (NR_IRQS_LEGACY + 46) | ||
178 | #define MX27_INT_DMACH15 (NR_IRQS_LEGACY + 47) | ||
179 | #define MX27_INT_UART6 (NR_IRQS_LEGACY + 48) | ||
180 | #define MX27_INT_UART5 (NR_IRQS_LEGACY + 49) | ||
181 | #define MX27_INT_FEC (NR_IRQS_LEGACY + 50) | ||
182 | #define MX27_INT_EMMAPRP (NR_IRQS_LEGACY + 51) | ||
183 | #define MX27_INT_EMMAPP (NR_IRQS_LEGACY + 52) | ||
184 | #define MX27_INT_VPU (NR_IRQS_LEGACY + 53) | ||
185 | #define MX27_INT_USB_HS1 (NR_IRQS_LEGACY + 54) | ||
186 | #define MX27_INT_USB_HS2 (NR_IRQS_LEGACY + 55) | ||
187 | #define MX27_INT_USB_OTG (NR_IRQS_LEGACY + 56) | ||
188 | #define MX27_INT_SCC_SMN (NR_IRQS_LEGACY + 57) | ||
189 | #define MX27_INT_SCC_SCM (NR_IRQS_LEGACY + 58) | ||
190 | #define MX27_INT_SAHARA (NR_IRQS_LEGACY + 59) | ||
191 | #define MX27_INT_SLCDC (NR_IRQS_LEGACY + 60) | ||
192 | #define MX27_INT_LCDC (NR_IRQS_LEGACY + 61) | ||
193 | #define MX27_INT_IIM (NR_IRQS_LEGACY + 62) | ||
194 | #define MX27_INT_CCM (NR_IRQS_LEGACY + 63) | ||
195 | |||
196 | /* fixed DMA request numbers */ | ||
197 | #define MX27_DMA_REQ_CSPI3_RX 1 | ||
198 | #define MX27_DMA_REQ_CSPI3_TX 2 | ||
199 | #define MX27_DMA_REQ_EXT 3 | ||
200 | #define MX27_DMA_REQ_MSHC 4 | ||
201 | #define MX27_DMA_REQ_SDHC2 6 | ||
202 | #define MX27_DMA_REQ_SDHC1 7 | ||
203 | #define MX27_DMA_REQ_SSI2_RX0 8 | ||
204 | #define MX27_DMA_REQ_SSI2_TX0 9 | ||
205 | #define MX27_DMA_REQ_SSI2_RX1 10 | ||
206 | #define MX27_DMA_REQ_SSI2_TX1 11 | ||
207 | #define MX27_DMA_REQ_SSI1_RX0 12 | ||
208 | #define MX27_DMA_REQ_SSI1_TX0 13 | ||
209 | #define MX27_DMA_REQ_SSI1_RX1 14 | ||
210 | #define MX27_DMA_REQ_SSI1_TX1 15 | ||
211 | #define MX27_DMA_REQ_CSPI2_RX 16 | ||
212 | #define MX27_DMA_REQ_CSPI2_TX 17 | ||
213 | #define MX27_DMA_REQ_CSPI1_RX 18 | ||
214 | #define MX27_DMA_REQ_CSPI1_TX 19 | ||
215 | #define MX27_DMA_REQ_UART4_RX 20 | ||
216 | #define MX27_DMA_REQ_UART4_TX 21 | ||
217 | #define MX27_DMA_REQ_UART3_RX 22 | ||
218 | #define MX27_DMA_REQ_UART3_TX 23 | ||
219 | #define MX27_DMA_REQ_UART2_RX 24 | ||
220 | #define MX27_DMA_REQ_UART2_TX 25 | ||
221 | #define MX27_DMA_REQ_UART1_RX 26 | ||
222 | #define MX27_DMA_REQ_UART1_TX 27 | ||
223 | #define MX27_DMA_REQ_ATA_TX 28 | ||
224 | #define MX27_DMA_REQ_ATA_RCV 29 | ||
225 | #define MX27_DMA_REQ_CSI_STAT 30 | ||
226 | #define MX27_DMA_REQ_CSI_RX 31 | ||
227 | #define MX27_DMA_REQ_UART5_TX 32 | ||
228 | #define MX27_DMA_REQ_UART5_RX 33 | ||
229 | #define MX27_DMA_REQ_UART6_TX 34 | ||
230 | #define MX27_DMA_REQ_UART6_RX 35 | ||
231 | #define MX27_DMA_REQ_SDHC3 36 | ||
232 | #define MX27_DMA_REQ_NFC 37 | ||
233 | |||
234 | #ifndef __ASSEMBLY__ | ||
235 | extern int mx27_revision(void); | ||
236 | #endif | ||
237 | |||
238 | #endif /* ifndef __MACH_MX27_H__ */ | ||
diff --git a/arch/arm/mach-imx/mx2x.h b/arch/arm/mach-imx/mx2x.h deleted file mode 100644 index 11642f5b224..00000000000 --- a/arch/arm/mach-imx/mx2x.h +++ /dev/null | |||
@@ -1,145 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de | ||
4 | * | ||
5 | * This contains hardware definitions that are common between i.MX21 and | ||
6 | * i.MX27. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version 2 | ||
11 | * of the License, or (at your option) any later version. | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
20 | * MA 02110-1301, USA. | ||
21 | */ | ||
22 | |||
23 | #ifndef __MACH_MX2x_H__ | ||
24 | #define __MACH_MX2x_H__ | ||
25 | |||
26 | /* The following addresses are common between i.MX21 and i.MX27 */ | ||
27 | |||
28 | /* Register offsets */ | ||
29 | #define MX2x_AIPI_BASE_ADDR 0x10000000 | ||
30 | #define MX2x_AIPI_SIZE SZ_1M | ||
31 | #define MX2x_DMA_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x01000) | ||
32 | #define MX2x_WDOG_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x02000) | ||
33 | #define MX2x_GPT1_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x03000) | ||
34 | #define MX2x_GPT2_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x04000) | ||
35 | #define MX2x_GPT3_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x05000) | ||
36 | #define MX2x_PWM_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x06000) | ||
37 | #define MX2x_RTC_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x07000) | ||
38 | #define MX2x_KPP_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x08000) | ||
39 | #define MX2x_OWIRE_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x09000) | ||
40 | #define MX2x_UART1_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x0a000) | ||
41 | #define MX2x_UART2_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x0b000) | ||
42 | #define MX2x_UART3_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x0c000) | ||
43 | #define MX2x_UART4_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x0d000) | ||
44 | #define MX2x_CSPI1_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x0e000) | ||
45 | #define MX2x_CSPI2_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x0f000) | ||
46 | #define MX2x_SSI1_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x10000) | ||
47 | #define MX2x_SSI2_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x11000) | ||
48 | #define MX2x_I2C_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x12000) | ||
49 | #define MX2x_SDHC1_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x13000) | ||
50 | #define MX2x_SDHC2_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x14000) | ||
51 | #define MX2x_GPIO_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x15000) | ||
52 | #define MX2x_AUDMUX_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x16000) | ||
53 | #define MX2x_CSPI3_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x17000) | ||
54 | #define MX2x_LCDC_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x21000) | ||
55 | #define MX2x_SLCDC_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x22000) | ||
56 | #define MX2x_USBOTG_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x24000) | ||
57 | #define MX2x_EMMA_PP_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x26000) | ||
58 | #define MX2x_EMMA_PRP_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x26400) | ||
59 | #define MX2x_CCM_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x27000) | ||
60 | #define MX2x_SYSCTRL_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x27800) | ||
61 | #define MX2x_JAM_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x3e000) | ||
62 | #define MX2x_MAX_BASE_ADDR (MX2x_AIPI_BASE_ADDR + 0x3f000) | ||
63 | |||
64 | #define MX2x_AVIC_BASE_ADDR 0x10040000 | ||
65 | |||
66 | #define MX2x_SAHB1_BASE_ADDR 0x80000000 | ||
67 | #define MX2x_SAHB1_SIZE SZ_1M | ||
68 | #define MX2x_CSI_BASE_ADDR (MX2x_SAHB1_BASE_ADDR + 0x0000) | ||
69 | |||
70 | /* fixed interrupt numbers */ | ||
71 | #include <asm/irq.h> | ||
72 | #define MX2x_INT_CSPI3 (NR_IRQS_LEGACY + 6) | ||
73 | #define MX2x_INT_GPIO (NR_IRQS_LEGACY + 8) | ||
74 | #define MX2x_INT_SDHC2 (NR_IRQS_LEGACY + 10) | ||
75 | #define MX2x_INT_SDHC1 (NR_IRQS_LEGACY + 11) | ||
76 | #define MX2x_INT_I2C (NR_IRQS_LEGACY + 12) | ||
77 | #define MX2x_INT_SSI2 (NR_IRQS_LEGACY + 13) | ||
78 | #define MX2x_INT_SSI1 (NR_IRQS_LEGACY + 14) | ||
79 | #define MX2x_INT_CSPI2 (NR_IRQS_LEGACY + 15) | ||
80 | #define MX2x_INT_CSPI1 (NR_IRQS_LEGACY + 16) | ||
81 | #define MX2x_INT_UART4 (NR_IRQS_LEGACY + 17) | ||
82 | #define MX2x_INT_UART3 (NR_IRQS_LEGACY + 18) | ||
83 | #define MX2x_INT_UART2 (NR_IRQS_LEGACY + 19) | ||
84 | #define MX2x_INT_UART1 (NR_IRQS_LEGACY + 20) | ||
85 | #define MX2x_INT_KPP (NR_IRQS_LEGACY + 21) | ||
86 | #define MX2x_INT_RTC (NR_IRQS_LEGACY + 22) | ||
87 | #define MX2x_INT_PWM (NR_IRQS_LEGACY + 23) | ||
88 | #define MX2x_INT_GPT3 (NR_IRQS_LEGACY + 24) | ||
89 | #define MX2x_INT_GPT2 (NR_IRQS_LEGACY + 25) | ||
90 | #define MX2x_INT_GPT1 (NR_IRQS_LEGACY + 26) | ||
91 | #define MX2x_INT_WDOG (NR_IRQS_LEGACY + 27) | ||
92 | #define MX2x_INT_PCMCIA (NR_IRQS_LEGACY + 28) | ||
93 | #define MX2x_INT_NANDFC (NR_IRQS_LEGACY + 29) | ||
94 | #define MX2x_INT_CSI (NR_IRQS_LEGACY + 31) | ||
95 | #define MX2x_INT_DMACH0 (NR_IRQS_LEGACY + 32) | ||
96 | #define MX2x_INT_DMACH1 (NR_IRQS_LEGACY + 33) | ||
97 | #define MX2x_INT_DMACH2 (NR_IRQS_LEGACY + 34) | ||
98 | #define MX2x_INT_DMACH3 (NR_IRQS_LEGACY + 35) | ||
99 | #define MX2x_INT_DMACH4 (NR_IRQS_LEGACY + 36) | ||
100 | #define MX2x_INT_DMACH5 (NR_IRQS_LEGACY + 37) | ||
101 | #define MX2x_INT_DMACH6 (NR_IRQS_LEGACY + 38) | ||
102 | #define MX2x_INT_DMACH7 (NR_IRQS_LEGACY + 39) | ||
103 | #define MX2x_INT_DMACH8 (NR_IRQS_LEGACY + 40) | ||
104 | #define MX2x_INT_DMACH9 (NR_IRQS_LEGACY + 41) | ||
105 | #define MX2x_INT_DMACH10 (NR_IRQS_LEGACY + 42) | ||
106 | #define MX2x_INT_DMACH11 (NR_IRQS_LEGACY + 43) | ||
107 | #define MX2x_INT_DMACH12 (NR_IRQS_LEGACY + 44) | ||
108 | #define MX2x_INT_DMACH13 (NR_IRQS_LEGACY + 45) | ||
109 | #define MX2x_INT_DMACH14 (NR_IRQS_LEGACY + 46) | ||
110 | #define MX2x_INT_DMACH15 (NR_IRQS_LEGACY + 47) | ||
111 | #define MX2x_INT_EMMAPRP (NR_IRQS_LEGACY + 51) | ||
112 | #define MX2x_INT_EMMAPP (NR_IRQS_LEGACY + 52) | ||
113 | #define MX2x_INT_SLCDC (NR_IRQS_LEGACY + 60) | ||
114 | #define MX2x_INT_LCDC (NR_IRQS_LEGACY + 61) | ||
115 | |||
116 | /* fixed DMA request numbers */ | ||
117 | #define MX2x_DMA_REQ_CSPI3_RX 1 | ||
118 | #define MX2x_DMA_REQ_CSPI3_TX 2 | ||
119 | #define MX2x_DMA_REQ_EXT 3 | ||
120 | #define MX2x_DMA_REQ_SDHC2 6 | ||
121 | #define MX2x_DMA_REQ_SDHC1 7 | ||
122 | #define MX2x_DMA_REQ_SSI2_RX0 8 | ||
123 | #define MX2x_DMA_REQ_SSI2_TX0 9 | ||
124 | #define MX2x_DMA_REQ_SSI2_RX1 10 | ||
125 | #define MX2x_DMA_REQ_SSI2_TX1 11 | ||
126 | #define MX2x_DMA_REQ_SSI1_RX0 12 | ||
127 | #define MX2x_DMA_REQ_SSI1_TX0 13 | ||
128 | #define MX2x_DMA_REQ_SSI1_RX1 14 | ||
129 | #define MX2x_DMA_REQ_SSI1_TX1 15 | ||
130 | #define MX2x_DMA_REQ_CSPI2_RX 16 | ||
131 | #define MX2x_DMA_REQ_CSPI2_TX 17 | ||
132 | #define MX2x_DMA_REQ_CSPI1_RX 18 | ||
133 | #define MX2x_DMA_REQ_CSPI1_TX 19 | ||
134 | #define MX2x_DMA_REQ_UART4_RX 20 | ||
135 | #define MX2x_DMA_REQ_UART4_TX 21 | ||
136 | #define MX2x_DMA_REQ_UART3_RX 22 | ||
137 | #define MX2x_DMA_REQ_UART3_TX 23 | ||
138 | #define MX2x_DMA_REQ_UART2_RX 24 | ||
139 | #define MX2x_DMA_REQ_UART2_TX 25 | ||
140 | #define MX2x_DMA_REQ_UART1_RX 26 | ||
141 | #define MX2x_DMA_REQ_UART1_TX 27 | ||
142 | #define MX2x_DMA_REQ_CSI_STAT 30 | ||
143 | #define MX2x_DMA_REQ_CSI_RX 31 | ||
144 | |||
145 | #endif /* ifndef __MACH_MX2x_H__ */ | ||
diff --git a/arch/arm/mach-imx/mx31.h b/arch/arm/mach-imx/mx31.h deleted file mode 100644 index ee9b1f9215d..00000000000 --- a/arch/arm/mach-imx/mx31.h +++ /dev/null | |||
@@ -1,196 +0,0 @@ | |||
1 | #ifndef __MACH_MX31_H__ | ||
2 | #define __MACH_MX31_H__ | ||
3 | |||
4 | /* | ||
5 | * IRAM | ||
6 | */ | ||
7 | #define MX31_IRAM_BASE_ADDR 0x1ffc0000 /* internal ram */ | ||
8 | #define MX31_IRAM_SIZE SZ_16K | ||
9 | |||
10 | #define MX31_L2CC_BASE_ADDR 0x30000000 | ||
11 | #define MX31_L2CC_SIZE SZ_1M | ||
12 | |||
13 | #define MX31_AIPS1_BASE_ADDR 0x43f00000 | ||
14 | #define MX31_AIPS1_SIZE SZ_1M | ||
15 | #define MX31_MAX_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x04000) | ||
16 | #define MX31_EVTMON_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x08000) | ||
17 | #define MX31_CLKCTL_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x0c000) | ||
18 | #define MX31_ETB_SLOT4_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x10000) | ||
19 | #define MX31_ETB_SLOT5_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x14000) | ||
20 | #define MX31_ECT_CTIO_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x18000) | ||
21 | #define MX31_I2C1_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x80000) | ||
22 | #define MX31_I2C3_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x84000) | ||
23 | #define MX31_USB_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x88000) | ||
24 | #define MX31_USB_OTG_BASE_ADDR (MX31_USB_BASE_ADDR + 0x0000) | ||
25 | #define MX31_USB_HS1_BASE_ADDR (MX31_USB_BASE_ADDR + 0x0200) | ||
26 | #define MX31_USB_HS2_BASE_ADDR (MX31_USB_BASE_ADDR + 0x0400) | ||
27 | #define MX31_ATA_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x8c000) | ||
28 | #define MX31_UART1_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x90000) | ||
29 | #define MX31_UART2_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x94000) | ||
30 | #define MX31_I2C2_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x98000) | ||
31 | #define MX31_OWIRE_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x9c000) | ||
32 | #define MX31_SSI1_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0xa0000) | ||
33 | #define MX31_CSPI1_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0xa4000) | ||
34 | #define MX31_KPP_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0xa8000) | ||
35 | #define MX31_IOMUXC_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0xac000) | ||
36 | #define MX31_UART4_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0xb0000) | ||
37 | #define MX31_UART5_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0xb4000) | ||
38 | #define MX31_ECT_IP1_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0xb8000) | ||
39 | #define MX31_ECT_IP2_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0xbc000) | ||
40 | |||
41 | #define MX31_SPBA0_BASE_ADDR 0x50000000 | ||
42 | #define MX31_SPBA0_SIZE SZ_1M | ||
43 | #define MX31_SDHC1_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x04000) | ||
44 | #define MX31_SDHC2_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x08000) | ||
45 | #define MX31_UART3_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x0c000) | ||
46 | #define MX31_CSPI2_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x10000) | ||
47 | #define MX31_SSI2_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x14000) | ||
48 | #define MX31_SIM1_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x18000) | ||
49 | #define MX31_IIM_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x1c000) | ||
50 | #define MX31_ATA_DMA_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x20000) | ||
51 | #define MX31_MSHC1_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x24000) | ||
52 | #define MX31_SPBA_CTRL_BASE_ADDR (MX31_SPBA0_BASE_ADDR + 0x3c000) | ||
53 | |||
54 | #define MX31_AIPS2_BASE_ADDR 0x53f00000 | ||
55 | #define MX31_AIPS2_SIZE SZ_1M | ||
56 | #define MX31_CCM_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0x80000) | ||
57 | #define MX31_CSPI3_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0x84000) | ||
58 | #define MX31_FIRI_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0x8c000) | ||
59 | #define MX31_GPT1_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0x90000) | ||
60 | #define MX31_EPIT1_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0x94000) | ||
61 | #define MX31_EPIT2_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0x98000) | ||
62 | #define MX31_GPIO3_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xa4000) | ||
63 | #define MX31_SCC_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xac000) | ||
64 | #define MX31_SCM_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xae000) | ||
65 | #define MX31_SMN_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xaf000) | ||
66 | #define MX31_RNGA_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xb0000) | ||
67 | #define MX31_IPU_CTRL_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xc0000) | ||
68 | #define MX31_AUDMUX_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xc4000) | ||
69 | #define MX31_MPEG4_ENC_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xc8000) | ||
70 | #define MX31_GPIO1_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xcc000) | ||
71 | #define MX31_GPIO2_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xd0000) | ||
72 | #define MX31_SDMA_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xd4000) | ||
73 | #define MX31_RTC_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xd8000) | ||
74 | #define MX31_WDOG_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xdc000) | ||
75 | #define MX31_PWM_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xe0000) | ||
76 | #define MX31_RTIC_BASE_ADDR (MX31_AIPS2_BASE_ADDR + 0xec000) | ||
77 | |||
78 | #define MX31_ROMP_BASE_ADDR 0x60000000 | ||
79 | #define MX31_ROMP_BASE_ADDR_VIRT IOMEM(0xfc500000) | ||
80 | #define MX31_ROMP_SIZE SZ_1M | ||
81 | |||
82 | #define MX31_AVIC_BASE_ADDR 0x68000000 | ||
83 | #define MX31_AVIC_SIZE SZ_1M | ||
84 | |||
85 | #define MX31_IPU_MEM_BASE_ADDR 0x70000000 | ||
86 | #define MX31_CSD0_BASE_ADDR 0x80000000 | ||
87 | #define MX31_CSD1_BASE_ADDR 0x90000000 | ||
88 | |||
89 | #define MX31_CS0_BASE_ADDR 0xa0000000 | ||
90 | #define MX31_CS1_BASE_ADDR 0xa8000000 | ||
91 | #define MX31_CS2_BASE_ADDR 0xb0000000 | ||
92 | #define MX31_CS3_BASE_ADDR 0xb2000000 | ||
93 | |||
94 | #define MX31_CS4_BASE_ADDR 0xb4000000 | ||
95 | #define MX31_CS4_BASE_ADDR_VIRT IOMEM(0xf6000000) | ||
96 | #define MX31_CS4_SIZE SZ_32M | ||
97 | |||
98 | #define MX31_CS5_BASE_ADDR 0xb6000000 | ||
99 | #define MX31_CS5_BASE_ADDR_VIRT IOMEM(0xf8000000) | ||
100 | #define MX31_CS5_SIZE SZ_32M | ||
101 | |||
102 | #define MX31_X_MEMC_BASE_ADDR 0xb8000000 | ||
103 | #define MX31_X_MEMC_SIZE SZ_64K | ||
104 | #define MX31_NFC_BASE_ADDR (MX31_X_MEMC_BASE_ADDR + 0x0000) | ||
105 | #define MX31_ESDCTL_BASE_ADDR (MX31_X_MEMC_BASE_ADDR + 0x1000) | ||
106 | #define MX31_WEIM_BASE_ADDR (MX31_X_MEMC_BASE_ADDR + 0x2000) | ||
107 | #define MX31_M3IF_BASE_ADDR (MX31_X_MEMC_BASE_ADDR + 0x3000) | ||
108 | #define MX31_EMI_CTL_BASE_ADDR (MX31_X_MEMC_BASE_ADDR + 0x4000) | ||
109 | #define MX31_PCMCIA_CTL_BASE_ADDR MX31_EMI_CTL_BASE_ADDR | ||
110 | |||
111 | #define MX31_WEIM_CSCRx_BASE_ADDR(cs) (MX31_WEIM_BASE_ADDR + (cs) * 0x10) | ||
112 | #define MX31_WEIM_CSCRxU(cs) (MX31_WEIM_CSCRx_BASE_ADDR(cs)) | ||
113 | #define MX31_WEIM_CSCRxL(cs) (MX31_WEIM_CSCRx_BASE_ADDR(cs) + 0x4) | ||
114 | #define MX31_WEIM_CSCRxA(cs) (MX31_WEIM_CSCRx_BASE_ADDR(cs) + 0x8) | ||
115 | |||
116 | #define MX31_PCMCIA_MEM_BASE_ADDR 0xbc000000 | ||
117 | |||
118 | #define MX31_IO_P2V(x) IMX_IO_P2V(x) | ||
119 | #define MX31_IO_ADDRESS(x) IOMEM(MX31_IO_P2V(x)) | ||
120 | |||
121 | /* | ||
122 | * Interrupt numbers | ||
123 | */ | ||
124 | #include <asm/irq.h> | ||
125 | #define MX31_INT_I2C3 (NR_IRQS_LEGACY + 3) | ||
126 | #define MX31_INT_I2C2 (NR_IRQS_LEGACY + 4) | ||
127 | #define MX31_INT_MPEG4_ENCODER (NR_IRQS_LEGACY + 5) | ||
128 | #define MX31_INT_RTIC (NR_IRQS_LEGACY + 6) | ||
129 | #define MX31_INT_FIRI (NR_IRQS_LEGACY + 7) | ||
130 | #define MX31_INT_SDHC2 (NR_IRQS_LEGACY + 8) | ||
131 | #define MX31_INT_SDHC1 (NR_IRQS_LEGACY + 9) | ||
132 | #define MX31_INT_I2C1 (NR_IRQS_LEGACY + 10) | ||
133 | #define MX31_INT_SSI2 (NR_IRQS_LEGACY + 11) | ||
134 | #define MX31_INT_SSI1 (NR_IRQS_LEGACY + 12) | ||
135 | #define MX31_INT_CSPI2 (NR_IRQS_LEGACY + 13) | ||
136 | #define MX31_INT_CSPI1 (NR_IRQS_LEGACY + 14) | ||
137 | #define MX31_INT_ATA (NR_IRQS_LEGACY + 15) | ||
138 | #define MX31_INT_MBX (NR_IRQS_LEGACY + 16) | ||
139 | #define MX31_INT_CSPI3 (NR_IRQS_LEGACY + 17) | ||
140 | #define MX31_INT_UART3 (NR_IRQS_LEGACY + 18) | ||
141 | #define MX31_INT_IIM (NR_IRQS_LEGACY + 19) | ||
142 | #define MX31_INT_SIM2 (NR_IRQS_LEGACY + 20) | ||
143 | #define MX31_INT_SIM1 (NR_IRQS_LEGACY + 21) | ||
144 | #define MX31_INT_RNGA (NR_IRQS_LEGACY + 22) | ||
145 | #define MX31_INT_EVTMON (NR_IRQS_LEGACY + 23) | ||
146 | #define MX31_INT_KPP (NR_IRQS_LEGACY + 24) | ||
147 | #define MX31_INT_RTC (NR_IRQS_LEGACY + 25) | ||
148 | #define MX31_INT_PWM (NR_IRQS_LEGACY + 26) | ||
149 | #define MX31_INT_EPIT2 (NR_IRQS_LEGACY + 27) | ||
150 | #define MX31_INT_EPIT1 (NR_IRQS_LEGACY + 28) | ||
151 | #define MX31_INT_GPT (NR_IRQS_LEGACY + 29) | ||
152 | #define MX31_INT_POWER_FAIL (NR_IRQS_LEGACY + 30) | ||
153 | #define MX31_INT_CCM_DVFS (NR_IRQS_LEGACY + 31) | ||
154 | #define MX31_INT_UART2 (NR_IRQS_LEGACY + 32) | ||
155 | #define MX31_INT_NFC (NR_IRQS_LEGACY + 33) | ||
156 | #define MX31_INT_SDMA (NR_IRQS_LEGACY + 34) | ||
157 | #define MX31_INT_USB_HS1 (NR_IRQS_LEGACY + 35) | ||
158 | #define MX31_INT_USB_HS2 (NR_IRQS_LEGACY + 36) | ||
159 | #define MX31_INT_USB_OTG (NR_IRQS_LEGACY + 37) | ||
160 | #define MX31_INT_MSHC1 (NR_IRQS_LEGACY + 39) | ||
161 | #define MX31_INT_MSHC2 (NR_IRQS_LEGACY + 40) | ||
162 | #define MX31_INT_IPU_ERR (NR_IRQS_LEGACY + 41) | ||
163 | #define MX31_INT_IPU_SYN (NR_IRQS_LEGACY + 42) | ||
164 | #define MX31_INT_UART1 (NR_IRQS_LEGACY + 45) | ||
165 | #define MX31_INT_UART4 (NR_IRQS_LEGACY + 46) | ||
166 | #define MX31_INT_UART5 (NR_IRQS_LEGACY + 47) | ||
167 | #define MX31_INT_ECT (NR_IRQS_LEGACY + 48) | ||
168 | #define MX31_INT_SCC_SCM (NR_IRQS_LEGACY + 49) | ||
169 | #define MX31_INT_SCC_SMN (NR_IRQS_LEGACY + 50) | ||
170 | #define MX31_INT_GPIO2 (NR_IRQS_LEGACY + 51) | ||
171 | #define MX31_INT_GPIO1 (NR_IRQS_LEGACY + 52) | ||
172 | #define MX31_INT_CCM (NR_IRQS_LEGACY + 53) | ||
173 | #define MX31_INT_PCMCIA (NR_IRQS_LEGACY + 54) | ||
174 | #define MX31_INT_WDOG (NR_IRQS_LEGACY + 55) | ||
175 | #define MX31_INT_GPIO3 (NR_IRQS_LEGACY + 56) | ||
176 | #define MX31_INT_EXT_POWER (NR_IRQS_LEGACY + 58) | ||
177 | #define MX31_INT_EXT_TEMPER (NR_IRQS_LEGACY + 59) | ||
178 | #define MX31_INT_EXT_SENSOR60 (NR_IRQS_LEGACY + 60) | ||
179 | #define MX31_INT_EXT_SENSOR61 (NR_IRQS_LEGACY + 61) | ||
180 | #define MX31_INT_EXT_WDOG (NR_IRQS_LEGACY + 62) | ||
181 | #define MX31_INT_EXT_TV (NR_IRQS_LEGACY + 63) | ||
182 | |||
183 | #define MX31_DMA_REQ_SDHC1 20 | ||
184 | #define MX31_DMA_REQ_SDHC2 21 | ||
185 | #define MX31_DMA_REQ_SSI2_RX1 22 | ||
186 | #define MX31_DMA_REQ_SSI2_TX1 23 | ||
187 | #define MX31_DMA_REQ_SSI2_RX0 24 | ||
188 | #define MX31_DMA_REQ_SSI2_TX0 25 | ||
189 | #define MX31_DMA_REQ_SSI1_RX1 26 | ||
190 | #define MX31_DMA_REQ_SSI1_TX1 27 | ||
191 | #define MX31_DMA_REQ_SSI1_RX0 28 | ||
192 | #define MX31_DMA_REQ_SSI1_TX0 29 | ||
193 | |||
194 | #define MX31_PROD_SIGNATURE 0x1 /* For MX31 */ | ||
195 | |||
196 | #endif /* ifndef __MACH_MX31_H__ */ | ||
diff --git a/arch/arm/mach-imx/mx31lilly-db.c b/arch/arm/mach-imx/mx31lilly-db.c index d4361b80c5f..7d26f766a4e 100644 --- a/arch/arm/mach-imx/mx31lilly-db.c +++ b/arch/arm/mach-imx/mx31lilly-db.c | |||
@@ -30,11 +30,12 @@ | |||
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
32 | 32 | ||
33 | #include "board-mx31lilly.h" | 33 | #include <mach/hardware.h> |
34 | #include "common.h" | 34 | #include <mach/common.h> |
35 | #include <mach/iomux-mx3.h> | ||
36 | #include <mach/board-mx31lilly.h> | ||
37 | |||
35 | #include "devices-imx31.h" | 38 | #include "devices-imx31.h" |
36 | #include "hardware.h" | ||
37 | #include "iomux-mx3.h" | ||
38 | 39 | ||
39 | /* | 40 | /* |
40 | * This file contains board-specific initialization routines for the | 41 | * This file contains board-specific initialization routines for the |
@@ -129,8 +130,7 @@ static int mxc_mmc1_init(struct device *dev, | |||
129 | gpio_direction_input(gpio_det); | 130 | gpio_direction_input(gpio_det); |
130 | gpio_direction_input(gpio_wp); | 131 | gpio_direction_input(gpio_wp); |
131 | 132 | ||
132 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)), | 133 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), detect_irq, |
133 | detect_irq, | ||
134 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | 134 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, |
135 | "MMC detect", data); | 135 | "MMC detect", data); |
136 | if (ret) | 136 | if (ret) |
@@ -151,7 +151,7 @@ static void mxc_mmc1_exit(struct device *dev, void *data) | |||
151 | { | 151 | { |
152 | gpio_free(gpio_det); | 152 | gpio_free(gpio_det); |
153 | gpio_free(gpio_wp); | 153 | gpio_free(gpio_wp); |
154 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)), data); | 154 | free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), data); |
155 | } | 155 | } |
156 | 156 | ||
157 | static const struct imxmmc_platform_data mmc_pdata __initconst = { | 157 | static const struct imxmmc_platform_data mmc_pdata __initconst = { |
@@ -161,6 +161,10 @@ static const struct imxmmc_platform_data mmc_pdata __initconst = { | |||
161 | }; | 161 | }; |
162 | 162 | ||
163 | /* Framebuffer support */ | 163 | /* Framebuffer support */ |
164 | static const struct ipu_platform_data ipu_data __initconst = { | ||
165 | .irq_base = MXC_IPU_IRQ_START, | ||
166 | }; | ||
167 | |||
164 | static const struct fb_videomode fb_modedb = { | 168 | static const struct fb_videomode fb_modedb = { |
165 | /* 640x480 TFT panel (IPS-056T) */ | 169 | /* 640x480 TFT panel (IPS-056T) */ |
166 | .name = "CRT-VGA", | 170 | .name = "CRT-VGA", |
@@ -194,7 +198,7 @@ static void __init mx31lilly_init_fb(void) | |||
194 | return; | 198 | return; |
195 | } | 199 | } |
196 | 200 | ||
197 | imx31_add_ipu_core(); | 201 | imx31_add_ipu_core(&ipu_data); |
198 | imx31_add_mx3_sdc_fb(&fb_pdata); | 202 | imx31_add_mx3_sdc_fb(&fb_pdata); |
199 | gpio_direction_output(LCD_VCC_EN_GPIO, 1); | 203 | gpio_direction_output(LCD_VCC_EN_GPIO, 1); |
200 | } | 204 | } |
diff --git a/arch/arm/mach-imx/mx31lite-db.c b/arch/arm/mach-imx/mx31lite-db.c index 5a160b7e4fc..bf0fb87946b 100644 --- a/arch/arm/mach-imx/mx31lite-db.c +++ b/arch/arm/mach-imx/mx31lite-db.c | |||
@@ -31,11 +31,12 @@ | |||
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
33 | 33 | ||
34 | #include "board-mx31lite.h" | 34 | #include <mach/hardware.h> |
35 | #include "common.h" | 35 | #include <mach/common.h> |
36 | #include <mach/iomux-mx3.h> | ||
37 | #include <mach/board-mx31lite.h> | ||
38 | |||
36 | #include "devices-imx31.h" | 39 | #include "devices-imx31.h" |
37 | #include "hardware.h" | ||
38 | #include "iomux-mx3.h" | ||
39 | 40 | ||
40 | /* | 41 | /* |
41 | * This file contains board-specific initialization routines for the | 42 | * This file contains board-specific initialization routines for the |
@@ -115,8 +116,7 @@ static int mxc_mmc1_init(struct device *dev, | |||
115 | gpio_direction_input(gpio_det); | 116 | gpio_direction_input(gpio_det); |
116 | gpio_direction_input(gpio_wp); | 117 | gpio_direction_input(gpio_wp); |
117 | 118 | ||
118 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1)), | 119 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_DCD_DCE1), detect_irq, |
119 | detect_irq, | ||
120 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | 120 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
121 | "MMC detect", data); | 121 | "MMC detect", data); |
122 | if (ret) | 122 | if (ret) |
@@ -137,7 +137,7 @@ static void mxc_mmc1_exit(struct device *dev, void *data) | |||
137 | { | 137 | { |
138 | gpio_free(gpio_det); | 138 | gpio_free(gpio_det); |
139 | gpio_free(gpio_wp); | 139 | gpio_free(gpio_wp); |
140 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1)), data); | 140 | free_irq(IOMUX_TO_IRQ(MX31_PIN_DCD_DCE1), data); |
141 | } | 141 | } |
142 | 142 | ||
143 | static const struct imxmmc_platform_data mmc_pdata __initconst = { | 143 | static const struct imxmmc_platform_data mmc_pdata __initconst = { |
@@ -191,6 +191,6 @@ void __init mx31lite_db_init(void) | |||
191 | imx31_add_mxc_mmc(0, &mmc_pdata); | 191 | imx31_add_mxc_mmc(0, &mmc_pdata); |
192 | imx31_add_spi_imx0(&spi0_pdata); | 192 | imx31_add_spi_imx0(&spi0_pdata); |
193 | gpio_led_register_device(-1, &litekit_led_platform_data); | 193 | gpio_led_register_device(-1, &litekit_led_platform_data); |
194 | imx31_add_imx2_wdt(); | 194 | imx31_add_imx2_wdt(NULL); |
195 | imx31_add_mxc_rtc(); | 195 | imx31_add_mxc_rtc(NULL); |
196 | } | 196 | } |
diff --git a/arch/arm/mach-imx/mx31moboard-devboard.c b/arch/arm/mach-imx/mx31moboard-devboard.c index 52d5b157472..0aa25364360 100644 --- a/arch/arm/mach-imx/mx31moboard-devboard.c +++ b/arch/arm/mach-imx/mx31moboard-devboard.c | |||
@@ -22,11 +22,12 @@ | |||
22 | 22 | ||
23 | #include <linux/usb/otg.h> | 23 | #include <linux/usb/otg.h> |
24 | 24 | ||
25 | #include "common.h" | 25 | #include <mach/common.h> |
26 | #include <mach/iomux-mx3.h> | ||
27 | #include <mach/hardware.h> | ||
28 | #include <mach/ulpi.h> | ||
29 | |||
26 | #include "devices-imx31.h" | 30 | #include "devices-imx31.h" |
27 | #include "hardware.h" | ||
28 | #include "iomux-mx3.h" | ||
29 | #include "ulpi.h" | ||
30 | 31 | ||
31 | static unsigned int devboard_pins[] = { | 32 | static unsigned int devboard_pins[] = { |
32 | /* UART1 */ | 33 | /* UART1 */ |
@@ -157,7 +158,7 @@ static int devboard_usbh1_hw_init(struct platform_device *pdev) | |||
157 | #define USBH1_VBUSEN_B IOMUX_TO_GPIO(MX31_PIN_NFRE_B) | 158 | #define USBH1_VBUSEN_B IOMUX_TO_GPIO(MX31_PIN_NFRE_B) |
158 | #define USBH1_MODE IOMUX_TO_GPIO(MX31_PIN_NFALE) | 159 | #define USBH1_MODE IOMUX_TO_GPIO(MX31_PIN_NFALE) |
159 | 160 | ||
160 | static int devboard_isp1105_init(struct usb_phy *otg) | 161 | static int devboard_isp1105_init(struct otg_transceiver *otg) |
161 | { | 162 | { |
162 | int ret = gpio_request(USBH1_MODE, "usbh1-mode"); | 163 | int ret = gpio_request(USBH1_MODE, "usbh1-mode"); |
163 | if (ret) | 164 | if (ret) |
@@ -176,7 +177,7 @@ static int devboard_isp1105_init(struct usb_phy *otg) | |||
176 | } | 177 | } |
177 | 178 | ||
178 | 179 | ||
179 | static int devboard_isp1105_set_vbus(struct usb_otg *otg, bool on) | 180 | static int devboard_isp1105_set_vbus(struct otg_transceiver *otg, bool on) |
180 | { | 181 | { |
181 | if (on) | 182 | if (on) |
182 | gpio_set_value(USBH1_VBUSEN_B, 0); | 183 | gpio_set_value(USBH1_VBUSEN_B, 0); |
@@ -193,24 +194,18 @@ static struct mxc_usbh_platform_data usbh1_pdata __initdata = { | |||
193 | 194 | ||
194 | static int __init devboard_usbh1_init(void) | 195 | static int __init devboard_usbh1_init(void) |
195 | { | 196 | { |
196 | struct usb_phy *phy; | 197 | struct otg_transceiver *otg; |
197 | struct platform_device *pdev; | 198 | struct platform_device *pdev; |
198 | 199 | ||
199 | phy = kzalloc(sizeof(*phy), GFP_KERNEL); | 200 | otg = kzalloc(sizeof(*otg), GFP_KERNEL); |
200 | if (!phy) | 201 | if (!otg) |
201 | return -ENOMEM; | ||
202 | |||
203 | phy->otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL); | ||
204 | if (!phy->otg) { | ||
205 | kfree(phy); | ||
206 | return -ENOMEM; | 202 | return -ENOMEM; |
207 | } | ||
208 | 203 | ||
209 | phy->label = "ISP1105"; | 204 | otg->label = "ISP1105"; |
210 | phy->init = devboard_isp1105_init; | 205 | otg->init = devboard_isp1105_init; |
211 | phy->otg->set_vbus = devboard_isp1105_set_vbus; | 206 | otg->set_vbus = devboard_isp1105_set_vbus; |
212 | 207 | ||
213 | usbh1_pdata.otg = phy; | 208 | usbh1_pdata.otg = otg; |
214 | 209 | ||
215 | pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); | 210 | pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); |
216 | if (IS_ERR(pdev)) | 211 | if (IS_ERR(pdev)) |
diff --git a/arch/arm/mach-imx/mx31moboard-marxbot.c b/arch/arm/mach-imx/mx31moboard-marxbot.c index a4f43e90f3c..bb639cbda4e 100644 --- a/arch/arm/mach-imx/mx31moboard-marxbot.c +++ b/arch/arm/mach-imx/mx31moboard-marxbot.c | |||
@@ -24,13 +24,14 @@ | |||
24 | 24 | ||
25 | #include <linux/usb/otg.h> | 25 | #include <linux/usb/otg.h> |
26 | 26 | ||
27 | #include <mach/common.h> | ||
28 | #include <mach/hardware.h> | ||
29 | #include <mach/iomux-mx3.h> | ||
30 | #include <mach/ulpi.h> | ||
31 | |||
27 | #include <media/soc_camera.h> | 32 | #include <media/soc_camera.h> |
28 | 33 | ||
29 | #include "common.h" | ||
30 | #include "devices-imx31.h" | 34 | #include "devices-imx31.h" |
31 | #include "hardware.h" | ||
32 | #include "iomux-mx3.h" | ||
33 | #include "ulpi.h" | ||
34 | 35 | ||
35 | static unsigned int marxbot_pins[] = { | 36 | static unsigned int marxbot_pins[] = { |
36 | /* SDHC2 */ | 37 | /* SDHC2 */ |
@@ -271,7 +272,7 @@ static int marxbot_usbh1_hw_init(struct platform_device *pdev) | |||
271 | #define USBH1_VBUSEN_B IOMUX_TO_GPIO(MX31_PIN_NFRE_B) | 272 | #define USBH1_VBUSEN_B IOMUX_TO_GPIO(MX31_PIN_NFRE_B) |
272 | #define USBH1_MODE IOMUX_TO_GPIO(MX31_PIN_NFALE) | 273 | #define USBH1_MODE IOMUX_TO_GPIO(MX31_PIN_NFALE) |
273 | 274 | ||
274 | static int marxbot_isp1105_init(struct usb_phy *otg) | 275 | static int marxbot_isp1105_init(struct otg_transceiver *otg) |
275 | { | 276 | { |
276 | int ret = gpio_request(USBH1_MODE, "usbh1-mode"); | 277 | int ret = gpio_request(USBH1_MODE, "usbh1-mode"); |
277 | if (ret) | 278 | if (ret) |
@@ -290,7 +291,7 @@ static int marxbot_isp1105_init(struct usb_phy *otg) | |||
290 | } | 291 | } |
291 | 292 | ||
292 | 293 | ||
293 | static int marxbot_isp1105_set_vbus(struct usb_otg *otg, bool on) | 294 | static int marxbot_isp1105_set_vbus(struct otg_transceiver *otg, bool on) |
294 | { | 295 | { |
295 | if (on) | 296 | if (on) |
296 | gpio_set_value(USBH1_VBUSEN_B, 0); | 297 | gpio_set_value(USBH1_VBUSEN_B, 0); |
@@ -307,24 +308,18 @@ static struct mxc_usbh_platform_data usbh1_pdata __initdata = { | |||
307 | 308 | ||
308 | static int __init marxbot_usbh1_init(void) | 309 | static int __init marxbot_usbh1_init(void) |
309 | { | 310 | { |
310 | struct usb_phy *phy; | 311 | struct otg_transceiver *otg; |
311 | struct platform_device *pdev; | 312 | struct platform_device *pdev; |
312 | 313 | ||
313 | phy = kzalloc(sizeof(*phy), GFP_KERNEL); | 314 | otg = kzalloc(sizeof(*otg), GFP_KERNEL); |
314 | if (!phy) | 315 | if (!otg) |
315 | return -ENOMEM; | ||
316 | |||
317 | phy->otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL); | ||
318 | if (!phy->otg) { | ||
319 | kfree(phy); | ||
320 | return -ENOMEM; | 316 | return -ENOMEM; |
321 | } | ||
322 | 317 | ||
323 | phy->label = "ISP1105"; | 318 | otg->label = "ISP1105"; |
324 | phy->init = marxbot_isp1105_init; | 319 | otg->init = marxbot_isp1105_init; |
325 | phy->otg->set_vbus = marxbot_isp1105_set_vbus; | 320 | otg->set_vbus = marxbot_isp1105_set_vbus; |
326 | 321 | ||
327 | usbh1_pdata.otg = phy; | 322 | usbh1_pdata.otg = otg; |
328 | 323 | ||
329 | pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); | 324 | pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); |
330 | if (IS_ERR(pdev)) | 325 | if (IS_ERR(pdev)) |
diff --git a/arch/arm/mach-imx/mx31moboard-smartbot.c b/arch/arm/mach-imx/mx31moboard-smartbot.c index 04ae45dbfaa..fabb801e799 100644 --- a/arch/arm/mach-imx/mx31moboard-smartbot.c +++ b/arch/arm/mach-imx/mx31moboard-smartbot.c | |||
@@ -23,14 +23,15 @@ | |||
23 | #include <linux/usb/otg.h> | 23 | #include <linux/usb/otg.h> |
24 | #include <linux/usb/ulpi.h> | 24 | #include <linux/usb/ulpi.h> |
25 | 25 | ||
26 | #include <mach/common.h> | ||
27 | #include <mach/hardware.h> | ||
28 | #include <mach/iomux-mx3.h> | ||
29 | #include <mach/board-mx31moboard.h> | ||
30 | #include <mach/ulpi.h> | ||
31 | |||
26 | #include <media/soc_camera.h> | 32 | #include <media/soc_camera.h> |
27 | 33 | ||
28 | #include "board-mx31moboard.h" | ||
29 | #include "common.h" | ||
30 | #include "devices-imx31.h" | 34 | #include "devices-imx31.h" |
31 | #include "hardware.h" | ||
32 | #include "iomux-mx3.h" | ||
33 | #include "ulpi.h" | ||
34 | 35 | ||
35 | static unsigned int smartbot_pins[] = { | 36 | static unsigned int smartbot_pins[] = { |
36 | /* UART1 */ | 37 | /* UART1 */ |
diff --git a/arch/arm/mach-imx/mx35.h b/arch/arm/mach-imx/mx35.h deleted file mode 100644 index 2af5d3a699c..00000000000 --- a/arch/arm/mach-imx/mx35.h +++ /dev/null | |||
@@ -1,190 +0,0 @@ | |||
1 | #ifndef __MACH_MX35_H__ | ||
2 | #define __MACH_MX35_H__ | ||
3 | |||
4 | /* | ||
5 | * IRAM | ||
6 | */ | ||
7 | #define MX35_IRAM_BASE_ADDR 0x10000000 /* internal ram */ | ||
8 | #define MX35_IRAM_SIZE SZ_128K | ||
9 | |||
10 | #define MX35_L2CC_BASE_ADDR 0x30000000 | ||
11 | #define MX35_L2CC_SIZE SZ_1M | ||
12 | |||
13 | #define MX35_AIPS1_BASE_ADDR 0x43f00000 | ||
14 | #define MX35_AIPS1_SIZE SZ_1M | ||
15 | #define MX35_MAX_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x04000) | ||
16 | #define MX35_EVTMON_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x08000) | ||
17 | #define MX35_CLKCTL_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x0c000) | ||
18 | #define MX35_ETB_SLOT4_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x10000) | ||
19 | #define MX35_ETB_SLOT5_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x14000) | ||
20 | #define MX35_ECT_CTIO_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x18000) | ||
21 | #define MX35_I2C1_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x80000) | ||
22 | #define MX35_I2C3_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x84000) | ||
23 | #define MX35_UART1_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x90000) | ||
24 | #define MX35_UART2_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x94000) | ||
25 | #define MX35_I2C2_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x98000) | ||
26 | #define MX35_OWIRE_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x9c000) | ||
27 | #define MX35_SSI1_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0xa0000) | ||
28 | #define MX35_CSPI1_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0xa4000) | ||
29 | #define MX35_KPP_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0xa8000) | ||
30 | #define MX35_IOMUXC_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0xac000) | ||
31 | #define MX35_ECT_IP1_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0xb8000) | ||
32 | #define MX35_ECT_IP2_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0xbc000) | ||
33 | |||
34 | #define MX35_SPBA0_BASE_ADDR 0x50000000 | ||
35 | #define MX35_SPBA0_SIZE SZ_1M | ||
36 | #define MX35_UART3_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x0c000) | ||
37 | #define MX35_CSPI2_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x10000) | ||
38 | #define MX35_SSI2_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x14000) | ||
39 | #define MX35_ATA_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x20000) | ||
40 | #define MX35_MSHC1_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x24000) | ||
41 | #define MX35_FEC_BASE_ADDR 0x50038000 | ||
42 | #define MX35_SPBA_CTRL_BASE_ADDR (MX35_SPBA0_BASE_ADDR + 0x3c000) | ||
43 | |||
44 | #define MX35_AIPS2_BASE_ADDR 0x53f00000 | ||
45 | #define MX35_AIPS2_SIZE SZ_1M | ||
46 | #define MX35_CCM_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0x80000) | ||
47 | #define MX35_GPT1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0x90000) | ||
48 | #define MX35_EPIT1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0x94000) | ||
49 | #define MX35_EPIT2_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0x98000) | ||
50 | #define MX35_GPIO3_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xa4000) | ||
51 | #define MX35_SCC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xac000) | ||
52 | #define MX35_RNGA_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xb0000) | ||
53 | #define MX35_ESDHC1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xb4000) | ||
54 | #define MX35_ESDHC2_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xb8000) | ||
55 | #define MX35_ESDHC3_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xbc000) | ||
56 | #define MX35_IPU_CTRL_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xc0000) | ||
57 | #define MX35_AUDMUX_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xc4000) | ||
58 | #define MX35_GPIO1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xcc000) | ||
59 | #define MX35_GPIO2_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xd0000) | ||
60 | #define MX35_SDMA_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xd4000) | ||
61 | #define MX35_RTC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xd8000) | ||
62 | #define MX35_WDOG_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xdc000) | ||
63 | #define MX35_PWM_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe0000) | ||
64 | #define MX35_CAN1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe4000) | ||
65 | #define MX35_CAN2_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe8000) | ||
66 | #define MX35_RTIC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xec000) | ||
67 | #define MX35_IIM_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xf0000) | ||
68 | #define MX35_USB_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xf4000) | ||
69 | #define MX35_USB_OTG_BASE_ADDR (MX35_USB_BASE_ADDR + 0x0000) | ||
70 | /* | ||
71 | * The Reference Manual (IMX35RM, Rev. 2, 3/2009) claims an offset of 0x200 for | ||
72 | * HS. When host support was implemented only a preliminary document was | ||
73 | * available, which told 0x400. This works fine. | ||
74 | */ | ||
75 | #define MX35_USB_HS_BASE_ADDR (MX35_USB_BASE_ADDR + 0x0400) | ||
76 | |||
77 | #define MX35_ROMP_BASE_ADDR 0x60000000 | ||
78 | #define MX35_ROMP_SIZE SZ_1M | ||
79 | |||
80 | #define MX35_AVIC_BASE_ADDR 0x68000000 | ||
81 | #define MX35_AVIC_SIZE SZ_1M | ||
82 | |||
83 | /* | ||
84 | * Memory regions and CS | ||
85 | */ | ||
86 | #define MX35_IPU_MEM_BASE_ADDR 0x70000000 | ||
87 | #define MX35_CSD0_BASE_ADDR 0x80000000 | ||
88 | #define MX35_CSD1_BASE_ADDR 0x90000000 | ||
89 | |||
90 | #define MX35_CS0_BASE_ADDR 0xa0000000 | ||
91 | #define MX35_CS1_BASE_ADDR 0xa8000000 | ||
92 | #define MX35_CS2_BASE_ADDR 0xb0000000 | ||
93 | #define MX35_CS3_BASE_ADDR 0xb2000000 | ||
94 | |||
95 | #define MX35_CS4_BASE_ADDR 0xb4000000 | ||
96 | #define MX35_CS4_BASE_ADDR_VIRT 0xf6000000 | ||
97 | #define MX35_CS4_SIZE SZ_32M | ||
98 | |||
99 | #define MX35_CS5_BASE_ADDR 0xb6000000 | ||
100 | #define MX35_CS5_BASE_ADDR_VIRT 0xf8000000 | ||
101 | #define MX35_CS5_SIZE SZ_32M | ||
102 | |||
103 | /* | ||
104 | * NAND, SDRAM, WEIM, M3IF, EMI controllers | ||
105 | */ | ||
106 | #define MX35_X_MEMC_BASE_ADDR 0xb8000000 | ||
107 | #define MX35_X_MEMC_SIZE SZ_64K | ||
108 | #define MX35_ESDCTL_BASE_ADDR (MX35_X_MEMC_BASE_ADDR + 0x1000) | ||
109 | #define MX35_WEIM_BASE_ADDR (MX35_X_MEMC_BASE_ADDR + 0x2000) | ||
110 | #define MX35_M3IF_BASE_ADDR (MX35_X_MEMC_BASE_ADDR + 0x3000) | ||
111 | #define MX35_EMI_CTL_BASE_ADDR (MX35_X_MEMC_BASE_ADDR + 0x4000) | ||
112 | #define MX35_PCMCIA_CTL_BASE_ADDR MX35_EMI_CTL_BASE_ADDR | ||
113 | |||
114 | #define MX35_NFC_BASE_ADDR 0xbb000000 | ||
115 | #define MX35_PCMCIA_MEM_BASE_ADDR 0xbc000000 | ||
116 | |||
117 | #define MX35_IO_P2V(x) IMX_IO_P2V(x) | ||
118 | #define MX35_IO_ADDRESS(x) IOMEM(MX35_IO_P2V(x)) | ||
119 | |||
120 | /* | ||
121 | * Interrupt numbers | ||
122 | */ | ||
123 | #include <asm/irq.h> | ||
124 | #define MX35_INT_OWIRE (NR_IRQS_LEGACY + 2) | ||
125 | #define MX35_INT_I2C3 (NR_IRQS_LEGACY + 3) | ||
126 | #define MX35_INT_I2C2 (NR_IRQS_LEGACY + 4) | ||
127 | #define MX35_INT_RTIC (NR_IRQS_LEGACY + 6) | ||
128 | #define MX35_INT_ESDHC1 (NR_IRQS_LEGACY + 7) | ||
129 | #define MX35_INT_ESDHC2 (NR_IRQS_LEGACY + 8) | ||
130 | #define MX35_INT_ESDHC3 (NR_IRQS_LEGACY + 9) | ||
131 | #define MX35_INT_I2C1 (NR_IRQS_LEGACY + 10) | ||
132 | #define MX35_INT_SSI1 (NR_IRQS_LEGACY + 11) | ||
133 | #define MX35_INT_SSI2 (NR_IRQS_LEGACY + 12) | ||
134 | #define MX35_INT_CSPI2 (NR_IRQS_LEGACY + 13) | ||
135 | #define MX35_INT_CSPI1 (NR_IRQS_LEGACY + 14) | ||
136 | #define MX35_INT_ATA (NR_IRQS_LEGACY + 15) | ||
137 | #define MX35_INT_GPU2D (NR_IRQS_LEGACY + 16) | ||
138 | #define MX35_INT_ASRC (NR_IRQS_LEGACY + 17) | ||
139 | #define MX35_INT_UART3 (NR_IRQS_LEGACY + 18) | ||
140 | #define MX35_INT_IIM (NR_IRQS_LEGACY + 19) | ||
141 | #define MX35_INT_RNGA (NR_IRQS_LEGACY + 22) | ||
142 | #define MX35_INT_EVTMON (NR_IRQS_LEGACY + 23) | ||
143 | #define MX35_INT_KPP (NR_IRQS_LEGACY + 24) | ||
144 | #define MX35_INT_RTC (NR_IRQS_LEGACY + 25) | ||
145 | #define MX35_INT_PWM (NR_IRQS_LEGACY + 26) | ||
146 | #define MX35_INT_EPIT2 (NR_IRQS_LEGACY + 27) | ||
147 | #define MX35_INT_EPIT1 (NR_IRQS_LEGACY + 28) | ||
148 | #define MX35_INT_GPT (NR_IRQS_LEGACY + 29) | ||
149 | #define MX35_INT_POWER_FAIL (NR_IRQS_LEGACY + 30) | ||
150 | #define MX35_INT_UART2 (NR_IRQS_LEGACY + 32) | ||
151 | #define MX35_INT_NFC (NR_IRQS_LEGACY + 33) | ||
152 | #define MX35_INT_SDMA (NR_IRQS_LEGACY + 34) | ||
153 | #define MX35_INT_USB_HS (NR_IRQS_LEGACY + 35) | ||
154 | #define MX35_INT_USB_OTG (NR_IRQS_LEGACY + 37) | ||
155 | #define MX35_INT_MSHC1 (NR_IRQS_LEGACY + 39) | ||
156 | #define MX35_INT_ESAI (NR_IRQS_LEGACY + 40) | ||
157 | #define MX35_INT_IPU_ERR (NR_IRQS_LEGACY + 41) | ||
158 | #define MX35_INT_IPU_SYN (NR_IRQS_LEGACY + 42) | ||
159 | #define MX35_INT_CAN1 (NR_IRQS_LEGACY + 43) | ||
160 | #define MX35_INT_CAN2 (NR_IRQS_LEGACY + 44) | ||
161 | #define MX35_INT_UART1 (NR_IRQS_LEGACY + 45) | ||
162 | #define MX35_INT_MLB (NR_IRQS_LEGACY + 46) | ||
163 | #define MX35_INT_SPDIF (NR_IRQS_LEGACY + 47) | ||
164 | #define MX35_INT_ECT (NR_IRQS_LEGACY + 48) | ||
165 | #define MX35_INT_SCC_SCM (NR_IRQS_LEGACY + 49) | ||
166 | #define MX35_INT_SCC_SMN (NR_IRQS_LEGACY + 50) | ||
167 | #define MX35_INT_GPIO2 (NR_IRQS_LEGACY + 51) | ||
168 | #define MX35_INT_GPIO1 (NR_IRQS_LEGACY + 52) | ||
169 | #define MX35_INT_WDOG (NR_IRQS_LEGACY + 55) | ||
170 | #define MX35_INT_GPIO3 (NR_IRQS_LEGACY + 56) | ||
171 | #define MX35_INT_FEC (NR_IRQS_LEGACY + 57) | ||
172 | #define MX35_INT_EXT_POWER (NR_IRQS_LEGACY + 58) | ||
173 | #define MX35_INT_EXT_TEMPER (NR_IRQS_LEGACY + 59) | ||
174 | #define MX35_INT_EXT_SENSOR60 (NR_IRQS_LEGACY + 60) | ||
175 | #define MX35_INT_EXT_SENSOR61 (NR_IRQS_LEGACY + 61) | ||
176 | #define MX35_INT_EXT_WDOG (NR_IRQS_LEGACY + 62) | ||
177 | #define MX35_INT_EXT_TV (NR_IRQS_LEGACY + 63) | ||
178 | |||
179 | #define MX35_DMA_REQ_SSI2_RX1 22 | ||
180 | #define MX35_DMA_REQ_SSI2_TX1 23 | ||
181 | #define MX35_DMA_REQ_SSI2_RX0 24 | ||
182 | #define MX35_DMA_REQ_SSI2_TX0 25 | ||
183 | #define MX35_DMA_REQ_SSI1_RX1 26 | ||
184 | #define MX35_DMA_REQ_SSI1_TX1 27 | ||
185 | #define MX35_DMA_REQ_SSI1_RX0 28 | ||
186 | #define MX35_DMA_REQ_SSI1_TX0 29 | ||
187 | |||
188 | #define MX35_PROD_SIGNATURE 0x1 /* For MX31 */ | ||
189 | |||
190 | #endif /* ifndef __MACH_MX35_H__ */ | ||
diff --git a/arch/arm/mach-imx/mx3x.h b/arch/arm/mach-imx/mx3x.h deleted file mode 100644 index 96fb4fbc8ad..00000000000 --- a/arch/arm/mach-imx/mx3x.h +++ /dev/null | |||
@@ -1,195 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __MACH_MX3x_H__ | ||
12 | #define __MACH_MX3x_H__ | ||
13 | |||
14 | /* | ||
15 | * MX31 memory map: | ||
16 | * | ||
17 | * Virt Phys Size What | ||
18 | * --------------------------------------------------------------------------- | ||
19 | * FC000000 43F00000 1M AIPS 1 | ||
20 | * FC100000 50000000 1M SPBA | ||
21 | * FC200000 53F00000 1M AIPS 2 | ||
22 | * FC500000 60000000 128M ROMPATCH | ||
23 | * FC400000 68000000 128M AVIC | ||
24 | * 70000000 256M IPU (MAX M2) | ||
25 | * 80000000 256M CSD0 SDRAM/DDR | ||
26 | * 90000000 256M CSD1 SDRAM/DDR | ||
27 | * A0000000 128M CS0 Flash | ||
28 | * A8000000 128M CS1 Flash | ||
29 | * B0000000 32M CS2 | ||
30 | * B2000000 32M CS3 | ||
31 | * F4000000 B4000000 32M CS4 | ||
32 | * B6000000 32M CS5 | ||
33 | * FC320000 B8000000 64K NAND, SDRAM, WEIM, M3IF, EMI controllers | ||
34 | * C0000000 64M PCMCIA/CF | ||
35 | */ | ||
36 | |||
37 | /* | ||
38 | * L2CC | ||
39 | */ | ||
40 | #define MX3x_L2CC_BASE_ADDR 0x30000000 | ||
41 | #define MX3x_L2CC_SIZE SZ_1M | ||
42 | |||
43 | /* | ||
44 | * AIPS 1 | ||
45 | */ | ||
46 | #define MX3x_AIPS1_BASE_ADDR 0x43f00000 | ||
47 | #define MX3x_AIPS1_SIZE SZ_1M | ||
48 | #define MX3x_MAX_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0x04000) | ||
49 | #define MX3x_EVTMON_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0x08000) | ||
50 | #define MX3x_CLKCTL_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0x0c000) | ||
51 | #define MX3x_ETB_SLOT4_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0x10000) | ||
52 | #define MX3x_ETB_SLOT5_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0x14000) | ||
53 | #define MX3x_ECT_CTIO_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0x18000) | ||
54 | #define MX3x_I2C_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0x80000) | ||
55 | #define MX3x_I2C3_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0x84000) | ||
56 | #define MX3x_UART1_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0x90000) | ||
57 | #define MX3x_UART2_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0x94000) | ||
58 | #define MX3x_I2C2_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0x98000) | ||
59 | #define MX3x_OWIRE_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0x9c000) | ||
60 | #define MX3x_SSI1_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0xa0000) | ||
61 | #define MX3x_CSPI1_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0xa4000) | ||
62 | #define MX3x_KPP_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0xa8000) | ||
63 | #define MX3x_IOMUXC_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0xac000) | ||
64 | #define MX3x_ECT_IP1_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0xb8000) | ||
65 | #define MX3x_ECT_IP2_BASE_ADDR (MX3x_AIPS1_BASE_ADDR + 0xbc000) | ||
66 | |||
67 | /* | ||
68 | * SPBA global module enabled #0 | ||
69 | */ | ||
70 | #define MX3x_SPBA0_BASE_ADDR 0x50000000 | ||
71 | #define MX3x_SPBA0_SIZE SZ_1M | ||
72 | #define MX3x_UART3_BASE_ADDR (MX3x_SPBA0_BASE_ADDR + 0x0c000) | ||
73 | #define MX3x_CSPI2_BASE_ADDR (MX3x_SPBA0_BASE_ADDR + 0x10000) | ||
74 | #define MX3x_SSI2_BASE_ADDR (MX3x_SPBA0_BASE_ADDR + 0x14000) | ||
75 | #define MX3x_ATA_DMA_BASE_ADDR (MX3x_SPBA0_BASE_ADDR + 0x20000) | ||
76 | #define MX3x_MSHC1_BASE_ADDR (MX3x_SPBA0_BASE_ADDR + 0x24000) | ||
77 | #define MX3x_SPBA_CTRL_BASE_ADDR (MX3x_SPBA0_BASE_ADDR + 0x3c000) | ||
78 | |||
79 | /* | ||
80 | * AIPS 2 | ||
81 | */ | ||
82 | #define MX3x_AIPS2_BASE_ADDR 0x53f00000 | ||
83 | #define MX3x_AIPS2_SIZE SZ_1M | ||
84 | #define MX3x_CCM_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0x80000) | ||
85 | #define MX3x_GPT1_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0x90000) | ||
86 | #define MX3x_EPIT1_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0x94000) | ||
87 | #define MX3x_EPIT2_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0x98000) | ||
88 | #define MX3x_GPIO3_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0xa4000) | ||
89 | #define MX3x_SCC_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0xac000) | ||
90 | #define MX3x_RNGA_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0xb0000) | ||
91 | #define MX3x_IPU_CTRL_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0xc0000) | ||
92 | #define MX3x_AUDMUX_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0xc4000) | ||
93 | #define MX3x_GPIO1_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0xcc000) | ||
94 | #define MX3x_GPIO2_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0xd0000) | ||
95 | #define MX3x_SDMA_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0xd4000) | ||
96 | #define MX3x_RTC_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0xd8000) | ||
97 | #define MX3x_WDOG_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0xdc000) | ||
98 | #define MX3x_PWM_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0xe0000) | ||
99 | #define MX3x_RTIC_BASE_ADDR (MX3x_AIPS2_BASE_ADDR + 0xec000) | ||
100 | |||
101 | /* | ||
102 | * ROMP and AVIC | ||
103 | */ | ||
104 | #define MX3x_ROMP_BASE_ADDR 0x60000000 | ||
105 | #define MX3x_ROMP_SIZE SZ_1M | ||
106 | |||
107 | #define MX3x_AVIC_BASE_ADDR 0x68000000 | ||
108 | #define MX3x_AVIC_SIZE SZ_1M | ||
109 | |||
110 | /* | ||
111 | * Memory regions and CS | ||
112 | */ | ||
113 | #define MX3x_IPU_MEM_BASE_ADDR 0x70000000 | ||
114 | #define MX3x_CSD0_BASE_ADDR 0x80000000 | ||
115 | #define MX3x_CSD1_BASE_ADDR 0x90000000 | ||
116 | |||
117 | #define MX3x_CS0_BASE_ADDR 0xa0000000 | ||
118 | #define MX3x_CS1_BASE_ADDR 0xa8000000 | ||
119 | #define MX3x_CS2_BASE_ADDR 0xb0000000 | ||
120 | #define MX3x_CS3_BASE_ADDR 0xb2000000 | ||
121 | |||
122 | #define MX3x_CS4_BASE_ADDR 0xb4000000 | ||
123 | #define MX3x_CS4_BASE_ADDR_VIRT 0xf6000000 | ||
124 | #define MX3x_CS4_SIZE SZ_32M | ||
125 | |||
126 | #define MX3x_CS5_BASE_ADDR 0xb6000000 | ||
127 | #define MX3x_CS5_BASE_ADDR_VIRT 0xf8000000 | ||
128 | #define MX3x_CS5_SIZE SZ_32M | ||
129 | |||
130 | /* | ||
131 | * NAND, SDRAM, WEIM, M3IF, EMI controllers | ||
132 | */ | ||
133 | #define MX3x_X_MEMC_BASE_ADDR 0xb8000000 | ||
134 | #define MX3x_X_MEMC_SIZE SZ_64K | ||
135 | #define MX3x_ESDCTL_BASE_ADDR (MX3x_X_MEMC_BASE_ADDR + 0x1000) | ||
136 | #define MX3x_WEIM_BASE_ADDR (MX3x_X_MEMC_BASE_ADDR + 0x2000) | ||
137 | #define MX3x_M3IF_BASE_ADDR (MX3x_X_MEMC_BASE_ADDR + 0x3000) | ||
138 | #define MX3x_EMI_CTL_BASE_ADDR (MX3x_X_MEMC_BASE_ADDR + 0x4000) | ||
139 | #define MX3x_PCMCIA_CTL_BASE_ADDR MX3x_EMI_CTL_BASE_ADDR | ||
140 | |||
141 | #define MX3x_PCMCIA_MEM_BASE_ADDR 0xbc000000 | ||
142 | |||
143 | /* | ||
144 | * Interrupt numbers | ||
145 | */ | ||
146 | #include <asm/irq.h> | ||
147 | #define MX3x_INT_I2C3 (NR_IRQS_LEGACY + 3) | ||
148 | #define MX3x_INT_I2C2 (NR_IRQS_LEGACY + 4) | ||
149 | #define MX3x_INT_RTIC (NR_IRQS_LEGACY + 6) | ||
150 | #define MX3x_INT_I2C (NR_IRQS_LEGACY + 10) | ||
151 | #define MX3x_INT_CSPI2 (NR_IRQS_LEGACY + 13) | ||
152 | #define MX3x_INT_CSPI1 (NR_IRQS_LEGACY + 14) | ||
153 | #define MX3x_INT_ATA (NR_IRQS_LEGACY + 15) | ||
154 | #define MX3x_INT_UART3 (NR_IRQS_LEGACY + 18) | ||
155 | #define MX3x_INT_IIM (NR_IRQS_LEGACY + 19) | ||
156 | #define MX3x_INT_RNGA (NR_IRQS_LEGACY + 22) | ||
157 | #define MX3x_INT_EVTMON (NR_IRQS_LEGACY + 23) | ||
158 | #define MX3x_INT_KPP (NR_IRQS_LEGACY + 24) | ||
159 | #define MX3x_INT_RTC (NR_IRQS_LEGACY + 25) | ||
160 | #define MX3x_INT_PWM (NR_IRQS_LEGACY + 26) | ||
161 | #define MX3x_INT_EPIT2 (NR_IRQS_LEGACY + 27) | ||
162 | #define MX3x_INT_EPIT1 (NR_IRQS_LEGACY + 28) | ||
163 | #define MX3x_INT_GPT (NR_IRQS_LEGACY + 29) | ||
164 | #define MX3x_INT_POWER_FAIL (NR_IRQS_LEGACY + 30) | ||
165 | #define MX3x_INT_UART2 (NR_IRQS_LEGACY + 32) | ||
166 | #define MX3x_INT_NANDFC (NR_IRQS_LEGACY + 33) | ||
167 | #define MX3x_INT_SDMA (NR_IRQS_LEGACY + 34) | ||
168 | #define MX3x_INT_MSHC1 (NR_IRQS_LEGACY + 39) | ||
169 | #define MX3x_INT_IPU_ERR (NR_IRQS_LEGACY + 41) | ||
170 | #define MX3x_INT_IPU_SYN (NR_IRQS_LEGACY + 42) | ||
171 | #define MX3x_INT_UART1 (NR_IRQS_LEGACY + 45) | ||
172 | #define MX3x_INT_ECT (NR_IRQS_LEGACY + 48) | ||
173 | #define MX3x_INT_SCC_SCM (NR_IRQS_LEGACY + 49) | ||
174 | #define MX3x_INT_SCC_SMN (NR_IRQS_LEGACY + 50) | ||
175 | #define MX3x_INT_GPIO2 (NR_IRQS_LEGACY + 51) | ||
176 | #define MX3x_INT_GPIO1 (NR_IRQS_LEGACY + 52) | ||
177 | #define MX3x_INT_WDOG (NR_IRQS_LEGACY + 55) | ||
178 | #define MX3x_INT_GPIO3 (NR_IRQS_LEGACY + 56) | ||
179 | #define MX3x_INT_EXT_POWER (NR_IRQS_LEGACY + 58) | ||
180 | #define MX3x_INT_EXT_TEMPER (NR_IRQS_LEGACY + 59) | ||
181 | #define MX3x_INT_EXT_SENSOR60 (NR_IRQS_LEGACY + 60) | ||
182 | #define MX3x_INT_EXT_SENSOR61 (NR_IRQS_LEGACY + 61) | ||
183 | #define MX3x_INT_EXT_WDOG (NR_IRQS_LEGACY + 62) | ||
184 | #define MX3x_INT_EXT_TV (NR_IRQS_LEGACY + 63) | ||
185 | |||
186 | #define MX3x_PROD_SIGNATURE 0x1 /* For MX31 */ | ||
187 | |||
188 | /* Mandatory defines used globally */ | ||
189 | |||
190 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) | ||
191 | extern int mx35_revision(void); | ||
192 | extern int mx31_revision(void); | ||
193 | #endif | ||
194 | |||
195 | #endif /* ifndef __MACH_MX3x_H__ */ | ||
diff --git a/arch/arm/mach-imx/mx50.h b/arch/arm/mach-imx/mx50.h deleted file mode 100644 index 09ac19c1570..00000000000 --- a/arch/arm/mach-imx/mx50.h +++ /dev/null | |||
@@ -1,290 +0,0 @@ | |||
1 | #ifndef __MACH_MX50_H__ | ||
2 | #define __MACH_MX50_H__ | ||
3 | |||
4 | /* | ||
5 | * IROM | ||
6 | */ | ||
7 | #define MX50_IROM_BASE_ADDR 0x0 | ||
8 | #define MX50_IROM_SIZE SZ_64K | ||
9 | |||
10 | /* TZIC */ | ||
11 | #define MX50_TZIC_BASE_ADDR 0x0fffc000 | ||
12 | #define MX50_TZIC_SIZE SZ_16K | ||
13 | |||
14 | /* | ||
15 | * IRAM | ||
16 | */ | ||
17 | #define MX50_IRAM_BASE_ADDR 0xf8000000 /* internal ram */ | ||
18 | #define MX50_IRAM_PARTITIONS 16 | ||
19 | #define MX50_IRAM_SIZE (MX50_IRAM_PARTITIONS * SZ_8K) /* 128KB */ | ||
20 | |||
21 | /* | ||
22 | * Databahn | ||
23 | */ | ||
24 | #define MX50_DATABAHN_BASE_ADDR 0x14000000 | ||
25 | |||
26 | /* | ||
27 | * Graphics Memory of GPU | ||
28 | */ | ||
29 | #define MX50_GPU2D_BASE_ADDR 0x20000000 | ||
30 | |||
31 | #define MX50_DEBUG_BASE_ADDR 0x40000000 | ||
32 | #define MX50_DEBUG_SIZE SZ_1M | ||
33 | #define MX50_ETB_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00001000) | ||
34 | #define MX50_ETM_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00002000) | ||
35 | #define MX50_TPIU_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00003000) | ||
36 | #define MX50_CTI0_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00004000) | ||
37 | #define MX50_CTI1_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00005000) | ||
38 | #define MX50_CTI2_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00006000) | ||
39 | #define MX50_CTI3_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00007000) | ||
40 | #define MX50_CORTEX_DBG_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00008000) | ||
41 | |||
42 | #define MX50_APBHDMA_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01000000) | ||
43 | #define MX50_OCOTP_CTRL_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01002000) | ||
44 | #define MX50_DIGCTL_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01004000) | ||
45 | #define MX50_GPMI_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01006000) | ||
46 | #define MX50_BCH_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01008000) | ||
47 | #define MX50_ELCDIF_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x0100a000) | ||
48 | #define MX50_EPXP_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x0100c000) | ||
49 | #define MX50_DCP_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x0100e000) | ||
50 | #define MX50_EPDC_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01010000) | ||
51 | #define MX50_QOSC_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01012000) | ||
52 | #define MX50_PERFMON_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01014000) | ||
53 | #define MX50_SSP_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01016000) | ||
54 | #define MX50_ANATOP_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01018000) | ||
55 | #define MX50_NIC_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x08000000) | ||
56 | |||
57 | /* | ||
58 | * SPBA global module enabled #0 | ||
59 | */ | ||
60 | #define MX50_SPBA0_BASE_ADDR 0x50000000 | ||
61 | #define MX50_SPBA0_SIZE SZ_1M | ||
62 | |||
63 | #define MX50_MMC_SDHC1_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x00004000) | ||
64 | #define MX50_MMC_SDHC2_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x00008000) | ||
65 | #define MX50_UART3_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x0000c000) | ||
66 | #define MX50_CSPI1_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x00010000) | ||
67 | #define MX50_SSI2_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x00014000) | ||
68 | #define MX50_MMC_SDHC3_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x00020000) | ||
69 | #define MX50_MMC_SDHC4_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x00024000) | ||
70 | |||
71 | /* | ||
72 | * AIPS 1 | ||
73 | */ | ||
74 | #define MX50_AIPS1_BASE_ADDR 0x53f00000 | ||
75 | #define MX50_AIPS1_SIZE SZ_1M | ||
76 | |||
77 | #define MX50_OTG_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x00080000) | ||
78 | #define MX50_GPIO1_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x00084000) | ||
79 | #define MX50_GPIO2_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x00088000) | ||
80 | #define MX50_GPIO3_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x0008c000) | ||
81 | #define MX50_GPIO4_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x00090000) | ||
82 | #define MX50_KPP_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x00094000) | ||
83 | #define MX50_WDOG_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x00098000) | ||
84 | #define MX50_GPT1_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000a0000) | ||
85 | #define MX50_SRTC_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000a4000) | ||
86 | #define MX50_IOMUXC_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000a8000) | ||
87 | #define MX50_EPIT1_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000ac000) | ||
88 | #define MX50_PWM1_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000b4000) | ||
89 | #define MX50_PWM2_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000b8000) | ||
90 | #define MX50_UART1_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000bc000) | ||
91 | #define MX50_UART2_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000c0000) | ||
92 | #define MX50_SRC_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000d0000) | ||
93 | #define MX50_CCM_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000d4000) | ||
94 | #define MX50_GPC_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000d8000) | ||
95 | #define MX50_GPIO5_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000dc000) | ||
96 | #define MX50_GPIO6_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000e0000) | ||
97 | #define MX50_I2C3_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000ec000) | ||
98 | #define MX50_UART4_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000f0000) | ||
99 | |||
100 | #define MX50_MSHC_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000f4000) | ||
101 | #define MX50_RNGB_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000f8000) | ||
102 | |||
103 | /* | ||
104 | * AIPS 2 | ||
105 | */ | ||
106 | #define MX50_AIPS2_BASE_ADDR 0x63f00000 | ||
107 | #define MX50_AIPS2_SIZE SZ_1M | ||
108 | |||
109 | #define MX50_PLL1_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x00080000) | ||
110 | #define MX50_PLL2_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x00084000) | ||
111 | #define MX50_PLL3_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x00088000) | ||
112 | #define MX50_UART5_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x00090000) | ||
113 | #define MX50_AHBMAX_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x00094000) | ||
114 | #define MX50_ARM_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000a0000) | ||
115 | #define MX50_OWIRE_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000a4000) | ||
116 | #define MX50_CSPI2_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000ac000) | ||
117 | #define MX50_SDMA_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000b0000) | ||
118 | #define MX50_ROMCP_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000b8000) | ||
119 | #define MX50_CSPI3_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000c0000) | ||
120 | #define MX50_I2C2_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000c4000) | ||
121 | #define MX50_I2C1_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000c8000) | ||
122 | #define MX50_SSI1_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000cc000) | ||
123 | #define MX50_AUDMUX_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000d0000) | ||
124 | #define MX50_WEIM_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000d8000) | ||
125 | #define MX50_FEC_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000ec000) | ||
126 | |||
127 | /* | ||
128 | * Memory regions and CS | ||
129 | */ | ||
130 | #define MX50_CSD0_BASE_ADDR 0x70000000 | ||
131 | #define MX50_CSD1_BASE_ADDR 0xb0000000 | ||
132 | #define MX50_CS0_BASE_ADDR 0xf0000000 | ||
133 | |||
134 | #define MX50_IO_P2V(x) IMX_IO_P2V(x) | ||
135 | #define MX50_IO_ADDRESS(x) IOMEM(MX50_IO_P2V(x)) | ||
136 | |||
137 | /* | ||
138 | * defines for SPBA modules | ||
139 | */ | ||
140 | #define MX50_SPBA_SDHC1 0x04 | ||
141 | #define MX50_SPBA_SDHC2 0x08 | ||
142 | #define MX50_SPBA_UART3 0x0c | ||
143 | #define MX50_SPBA_CSPI1 0x10 | ||
144 | #define MX50_SPBA_SSI2 0x14 | ||
145 | #define MX50_SPBA_SDHC3 0x20 | ||
146 | #define MX50_SPBA_SDHC4 0x24 | ||
147 | #define MX50_SPBA_SPDIF 0x28 | ||
148 | #define MX50_SPBA_ATA 0x30 | ||
149 | #define MX50_SPBA_SLIM 0x34 | ||
150 | #define MX50_SPBA_HSI2C 0x38 | ||
151 | #define MX50_SPBA_CTRL 0x3c | ||
152 | |||
153 | /* | ||
154 | * DMA request assignments | ||
155 | */ | ||
156 | #define MX50_DMA_REQ_GPC 1 | ||
157 | #define MX50_DMA_REQ_ATA_UART4_RX 2 | ||
158 | #define MX50_DMA_REQ_ATA_UART4_TX 3 | ||
159 | #define MX50_DMA_REQ_CSPI1_RX 6 | ||
160 | #define MX50_DMA_REQ_CSPI1_TX 7 | ||
161 | #define MX50_DMA_REQ_CSPI2_RX 8 | ||
162 | #define MX50_DMA_REQ_CSPI2_TX 9 | ||
163 | #define MX50_DMA_REQ_I2C3_SDHC3 10 | ||
164 | #define MX50_DMA_REQ_SDHC4 11 | ||
165 | #define MX50_DMA_REQ_UART2_FIRI_RX 12 | ||
166 | #define MX50_DMA_REQ_UART2_FIRI_TX 13 | ||
167 | #define MX50_DMA_REQ_EXT0 14 | ||
168 | #define MX50_DMA_REQ_EXT1 15 | ||
169 | #define MX50_DMA_REQ_UART5_RX 16 | ||
170 | #define MX50_DMA_REQ_UART5_TX 17 | ||
171 | #define MX50_DMA_REQ_UART1_RX 18 | ||
172 | #define MX50_DMA_REQ_UART1_TX 19 | ||
173 | #define MX50_DMA_REQ_I2C1_SDHC1 20 | ||
174 | #define MX50_DMA_REQ_I2C2_SDHC2 21 | ||
175 | #define MX50_DMA_REQ_SSI2_RX2 22 | ||
176 | #define MX50_DMA_REQ_SSI2_TX2 23 | ||
177 | #define MX50_DMA_REQ_SSI2_RX1 24 | ||
178 | #define MX50_DMA_REQ_SSI2_TX1 25 | ||
179 | #define MX50_DMA_REQ_SSI1_RX2 26 | ||
180 | #define MX50_DMA_REQ_SSI1_TX2 27 | ||
181 | #define MX50_DMA_REQ_SSI1_RX1 28 | ||
182 | #define MX50_DMA_REQ_SSI1_TX1 29 | ||
183 | #define MX50_DMA_REQ_CSPI_RX 38 | ||
184 | #define MX50_DMA_REQ_CSPI_TX 39 | ||
185 | #define MX50_DMA_REQ_UART3_RX 42 | ||
186 | #define MX50_DMA_REQ_UART3_TX 43 | ||
187 | |||
188 | /* | ||
189 | * Interrupt numbers | ||
190 | */ | ||
191 | #include <asm/irq.h> | ||
192 | #define MX50_INT_MMC_SDHC1 (NR_IRQS_LEGACY + 1) | ||
193 | #define MX50_INT_MMC_SDHC2 (NR_IRQS_LEGACY + 2) | ||
194 | #define MX50_INT_MMC_SDHC3 (NR_IRQS_LEGACY + 3) | ||
195 | #define MX50_INT_MMC_SDHC4 (NR_IRQS_LEGACY + 4) | ||
196 | #define MX50_INT_DAP (NR_IRQS_LEGACY + 5) | ||
197 | #define MX50_INT_SDMA (NR_IRQS_LEGACY + 6) | ||
198 | #define MX50_INT_IOMUX (NR_IRQS_LEGACY + 7) | ||
199 | #define MX50_INT_UART4 (NR_IRQS_LEGACY + 13) | ||
200 | #define MX50_INT_USB_H1 (NR_IRQS_LEGACY + 14) | ||
201 | #define MX50_INT_USB_OTG (NR_IRQS_LEGACY + 18) | ||
202 | #define MX50_INT_DATABAHN (NR_IRQS_LEGACY + 19) | ||
203 | #define MX50_INT_ELCDIF (NR_IRQS_LEGACY + 20) | ||
204 | #define MX50_INT_EPXP (NR_IRQS_LEGACY + 21) | ||
205 | #define MX50_INT_SRTC_NTZ (NR_IRQS_LEGACY + 24) | ||
206 | #define MX50_INT_SRTC_TZ (NR_IRQS_LEGACY + 25) | ||
207 | #define MX50_INT_EPDC (NR_IRQS_LEGACY + 27) | ||
208 | #define MX50_INT_NIC (NR_IRQS_LEGACY + 28) | ||
209 | #define MX50_INT_SSI1 (NR_IRQS_LEGACY + 29) | ||
210 | #define MX50_INT_SSI2 (NR_IRQS_LEGACY + 30) | ||
211 | #define MX50_INT_UART1 (NR_IRQS_LEGACY + 31) | ||
212 | #define MX50_INT_UART2 (NR_IRQS_LEGACY + 32) | ||
213 | #define MX50_INT_UART3 (NR_IRQS_LEGACY + 33) | ||
214 | #define MX50_INT_RESV34 (NR_IRQS_LEGACY + 34) | ||
215 | #define MX50_INT_RESV35 (NR_IRQS_LEGACY + 35) | ||
216 | #define MX50_INT_CSPI1 (NR_IRQS_LEGACY + 36) | ||
217 | #define MX50_INT_CSPI2 (NR_IRQS_LEGACY + 37) | ||
218 | #define MX50_INT_CSPI (NR_IRQS_LEGACY + 38) | ||
219 | #define MX50_INT_GPT (NR_IRQS_LEGACY + 39) | ||
220 | #define MX50_INT_EPIT1 (NR_IRQS_LEGACY + 40) | ||
221 | #define MX50_INT_GPIO1_INT7 (NR_IRQS_LEGACY + 42) | ||
222 | #define MX50_INT_GPIO1_INT6 (NR_IRQS_LEGACY + 43) | ||
223 | #define MX50_INT_GPIO1_INT5 (NR_IRQS_LEGACY + 44) | ||
224 | #define MX50_INT_GPIO1_INT4 (NR_IRQS_LEGACY + 45) | ||
225 | #define MX50_INT_GPIO1_INT3 (NR_IRQS_LEGACY + 46) | ||
226 | #define MX50_INT_GPIO1_INT2 (NR_IRQS_LEGACY + 47) | ||
227 | #define MX50_INT_GPIO1_INT1 (NR_IRQS_LEGACY + 48) | ||
228 | #define MX50_INT_GPIO1_INT0 (NR_IRQS_LEGACY + 49) | ||
229 | #define MX50_INT_GPIO1_LOW (NR_IRQS_LEGACY + 50) | ||
230 | #define MX50_INT_GPIO1_HIGH (NR_IRQS_LEGACY + 51) | ||
231 | #define MX50_INT_GPIO2_LOW (NR_IRQS_LEGACY + 52) | ||
232 | #define MX50_INT_GPIO2_HIGH (NR_IRQS_LEGACY + 53) | ||
233 | #define MX50_INT_GPIO3_LOW (NR_IRQS_LEGACY + 54) | ||
234 | #define MX50_INT_GPIO3_HIGH (NR_IRQS_LEGACY + 55) | ||
235 | #define MX50_INT_GPIO4_LOW (NR_IRQS_LEGACY + 56) | ||
236 | #define MX50_INT_GPIO4_HIGH (NR_IRQS_LEGACY + 57) | ||
237 | #define MX50_INT_WDOG1 (NR_IRQS_LEGACY + 58) | ||
238 | #define MX50_INT_KPP (NR_IRQS_LEGACY + 60) | ||
239 | #define MX50_INT_PWM1 (NR_IRQS_LEGACY + 61) | ||
240 | #define MX50_INT_I2C1 (NR_IRQS_LEGACY + 62) | ||
241 | #define MX50_INT_I2C2 (NR_IRQS_LEGACY + 63) | ||
242 | #define MX50_INT_I2C3 (NR_IRQS_LEGACY + 64) | ||
243 | #define MX50_INT_RESV65 (NR_IRQS_LEGACY + 65) | ||
244 | #define MX50_INT_DCDC (NR_IRQS_LEGACY + 66) | ||
245 | #define MX50_INT_THERMAL_ALARM (NR_IRQS_LEGACY + 67) | ||
246 | #define MX50_INT_ANA3 (NR_IRQS_LEGACY + 68) | ||
247 | #define MX50_INT_ANA4 (NR_IRQS_LEGACY + 69) | ||
248 | #define MX50_INT_CCM1 (NR_IRQS_LEGACY + 71) | ||
249 | #define MX50_INT_CCM2 (NR_IRQS_LEGACY + 72) | ||
250 | #define MX50_INT_GPC1 (NR_IRQS_LEGACY + 73) | ||
251 | #define MX50_INT_GPC2 (NR_IRQS_LEGACY + 74) | ||
252 | #define MX50_INT_SRC (NR_IRQS_LEGACY + 75) | ||
253 | #define MX50_INT_NM (NR_IRQS_LEGACY + 76) | ||
254 | #define MX50_INT_PMU (NR_IRQS_LEGACY + 77) | ||
255 | #define MX50_INT_CTI_IRQ (NR_IRQS_LEGACY + 78) | ||
256 | #define MX50_INT_CTI1_TG0 (NR_IRQS_LEGACY + 79) | ||
257 | #define MX50_INT_CTI1_TG1 (NR_IRQS_LEGACY + 80) | ||
258 | #define MX50_INT_GPU2_IRQ (NR_IRQS_LEGACY + 84) | ||
259 | #define MX50_INT_GPU2_BUSY (NR_IRQS_LEGACY + 85) | ||
260 | #define MX50_INT_UART5 (NR_IRQS_LEGACY + 86) | ||
261 | #define MX50_INT_FEC (NR_IRQS_LEGACY + 87) | ||
262 | #define MX50_INT_OWIRE (NR_IRQS_LEGACY + 88) | ||
263 | #define MX50_INT_CTI1_TG2 (NR_IRQS_LEGACY + 89) | ||
264 | #define MX50_INT_SJC (NR_IRQS_LEGACY + 90) | ||
265 | #define MX50_INT_DCP_CHAN1_3 (NR_IRQS_LEGACY + 91) | ||
266 | #define MX50_INT_DCP_CHAN0 (NR_IRQS_LEGACY + 92) | ||
267 | #define MX50_INT_PWM2 (NR_IRQS_LEGACY + 94) | ||
268 | #define MX50_INT_RNGB (NR_IRQS_LEGACY + 97) | ||
269 | #define MX50_INT_CTI1_TG3 (NR_IRQS_LEGACY + 98) | ||
270 | #define MX50_INT_RAWNAND_BCH (NR_IRQS_LEGACY + 100) | ||
271 | #define MX50_INT_RAWNAND_GPMI (NR_IRQS_LEGACY + 102) | ||
272 | #define MX50_INT_GPIO5_LOW (NR_IRQS_LEGACY + 103) | ||
273 | #define MX50_INT_GPIO5_HIGH (NR_IRQS_LEGACY + 104) | ||
274 | #define MX50_INT_GPIO6_LOW (NR_IRQS_LEGACY + 105) | ||
275 | #define MX50_INT_GPIO6_HIGH (NR_IRQS_LEGACY + 106) | ||
276 | #define MX50_INT_MSHC (NR_IRQS_LEGACY + 109) | ||
277 | #define MX50_INT_APBHDMA_CHAN0 (NR_IRQS_LEGACY + 110) | ||
278 | #define MX50_INT_APBHDMA_CHAN1 (NR_IRQS_LEGACY + 111) | ||
279 | #define MX50_INT_APBHDMA_CHAN2 (NR_IRQS_LEGACY + 112) | ||
280 | #define MX50_INT_APBHDMA_CHAN3 (NR_IRQS_LEGACY + 113) | ||
281 | #define MX50_INT_APBHDMA_CHAN4 (NR_IRQS_LEGACY + 114) | ||
282 | #define MX50_INT_APBHDMA_CHAN5 (NR_IRQS_LEGACY + 115) | ||
283 | #define MX50_INT_APBHDMA_CHAN6 (NR_IRQS_LEGACY + 116) | ||
284 | #define MX50_INT_APBHDMA_CHAN7 (NR_IRQS_LEGACY + 117) | ||
285 | |||
286 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) | ||
287 | extern int mx50_revision(void); | ||
288 | #endif | ||
289 | |||
290 | #endif /* ifndef __MACH_MX50_H__ */ | ||
diff --git a/arch/arm/mach-imx/mx51.h b/arch/arm/mach-imx/mx51.h deleted file mode 100644 index af844f76261..00000000000 --- a/arch/arm/mach-imx/mx51.h +++ /dev/null | |||
@@ -1,346 +0,0 @@ | |||
1 | #ifndef __MACH_MX51_H__ | ||
2 | #define __MACH_MX51_H__ | ||
3 | |||
4 | /* | ||
5 | * IROM | ||
6 | */ | ||
7 | #define MX51_IROM_BASE_ADDR 0x0 | ||
8 | #define MX51_IROM_SIZE SZ_64K | ||
9 | |||
10 | /* | ||
11 | * IRAM | ||
12 | */ | ||
13 | #define MX51_IRAM_BASE_ADDR 0x1ffe0000 /* internal ram */ | ||
14 | #define MX51_IRAM_PARTITIONS 16 | ||
15 | #define MX51_IRAM_SIZE (MX51_IRAM_PARTITIONS * SZ_8K) /* 128KB */ | ||
16 | |||
17 | #define MX51_GPU_BASE_ADDR 0x20000000 | ||
18 | #define MX51_GPU_CTRL_BASE_ADDR 0x30000000 | ||
19 | #define MX51_IPU_CTRL_BASE_ADDR 0x40000000 | ||
20 | |||
21 | /* | ||
22 | * SPBA global module enabled #0 | ||
23 | */ | ||
24 | #define MX51_SPBA0_BASE_ADDR 0x70000000 | ||
25 | #define MX51_SPBA0_SIZE SZ_1M | ||
26 | |||
27 | #define MX51_ESDHC1_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x04000) | ||
28 | #define MX51_ESDHC2_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x08000) | ||
29 | #define MX51_UART3_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x0c000) | ||
30 | #define MX51_ECSPI1_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x10000) | ||
31 | #define MX51_SSI2_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x14000) | ||
32 | #define MX51_ESDHC3_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x20000) | ||
33 | #define MX51_ESDHC4_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x24000) | ||
34 | #define MX51_SPDIF_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x28000) | ||
35 | #define MX51_ATA_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x30000) | ||
36 | #define MX51_SLIM_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x34000) | ||
37 | #define MX51_HSI2C_DMA_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x38000) | ||
38 | #define MX51_SPBA_CTRL_BASE_ADDR (MX51_SPBA0_BASE_ADDR + 0x3c000) | ||
39 | |||
40 | /* | ||
41 | * AIPS 1 | ||
42 | */ | ||
43 | #define MX51_AIPS1_BASE_ADDR 0x73f00000 | ||
44 | #define MX51_AIPS1_SIZE SZ_1M | ||
45 | |||
46 | #define MX51_USB_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x80000) | ||
47 | #define MX51_USB_OTG_BASE_ADDR (MX51_USB_BASE_ADDR + 0x0000) | ||
48 | #define MX51_USB_HS1_BASE_ADDR (MX51_USB_BASE_ADDR + 0x0200) | ||
49 | #define MX51_USB_HS2_BASE_ADDR (MX51_USB_BASE_ADDR + 0x0400) | ||
50 | #define MX51_GPIO1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x84000) | ||
51 | #define MX51_GPIO2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x88000) | ||
52 | #define MX51_GPIO3_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x8c000) | ||
53 | #define MX51_GPIO4_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x90000) | ||
54 | #define MX51_KPP_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x94000) | ||
55 | #define MX51_WDOG1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x98000) | ||
56 | #define MX51_WDOG2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0x9c000) | ||
57 | #define MX51_GPT1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xa0000) | ||
58 | #define MX51_SRTC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xa4000) | ||
59 | #define MX51_IOMUXC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xa8000) | ||
60 | #define MX51_EPIT1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xac000) | ||
61 | #define MX51_EPIT2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xb0000) | ||
62 | #define MX51_PWM1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xb4000) | ||
63 | #define MX51_PWM2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xb8000) | ||
64 | #define MX51_UART1_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xbc000) | ||
65 | #define MX51_UART2_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xc0000) | ||
66 | #define MX51_SRC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xd0000) | ||
67 | #define MX51_CCM_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xd4000) | ||
68 | #define MX51_GPC_BASE_ADDR (MX51_AIPS1_BASE_ADDR + 0xd8000) | ||
69 | |||
70 | /* | ||
71 | * AIPS 2 | ||
72 | */ | ||
73 | #define MX51_AIPS2_BASE_ADDR 0x83f00000 | ||
74 | #define MX51_AIPS2_SIZE SZ_1M | ||
75 | |||
76 | #define MX51_PLL1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x80000) | ||
77 | #define MX51_PLL2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x84000) | ||
78 | #define MX51_PLL3_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x88000) | ||
79 | #define MX51_AHBMAX_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x94000) | ||
80 | #define MX51_IIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x98000) | ||
81 | #define MX51_CSU_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0x9c000) | ||
82 | #define MX51_ARM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xa0000) | ||
83 | #define MX51_OWIRE_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xa4000) | ||
84 | #define MX51_FIRI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xa8000) | ||
85 | #define MX51_ECSPI2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xac000) | ||
86 | #define MX51_SDMA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xb0000) | ||
87 | #define MX51_SCC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xb4000) | ||
88 | #define MX51_ROMCP_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xb8000) | ||
89 | #define MX51_RTIC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xbc000) | ||
90 | #define MX51_CSPI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xc0000) | ||
91 | #define MX51_I2C2_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xc4000) | ||
92 | #define MX51_I2C1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xc8000) | ||
93 | #define MX51_SSI1_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xcc000) | ||
94 | #define MX51_AUDMUX_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xd0000) | ||
95 | #define MX51_M4IF_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xd8000) | ||
96 | #define MX51_ESDCTL_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xd9000) | ||
97 | #define MX51_WEIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xda000) | ||
98 | #define MX51_NFC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xdb000) | ||
99 | #define MX51_EMI_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xdbf00) | ||
100 | #define MX51_MIPI_HSC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xdc000) | ||
101 | #define MX51_ATA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xe0000) | ||
102 | #define MX51_SIM_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xe4000) | ||
103 | #define MX51_SSI3_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xe8000) | ||
104 | #define MX51_FEC_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xec000) | ||
105 | #define MX51_TVE_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xf0000) | ||
106 | #define MX51_VPU_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xf4000) | ||
107 | #define MX51_SAHARA_BASE_ADDR (MX51_AIPS2_BASE_ADDR + 0xf8000) | ||
108 | |||
109 | #define MX51_CSD0_BASE_ADDR 0x90000000 | ||
110 | #define MX51_CSD1_BASE_ADDR 0xa0000000 | ||
111 | #define MX51_CS0_BASE_ADDR 0xb0000000 | ||
112 | #define MX51_CS1_BASE_ADDR 0xb8000000 | ||
113 | #define MX51_CS2_BASE_ADDR 0xc0000000 | ||
114 | #define MX51_CS3_BASE_ADDR 0xc8000000 | ||
115 | #define MX51_CS4_BASE_ADDR 0xcc000000 | ||
116 | #define MX51_CS5_BASE_ADDR 0xce000000 | ||
117 | |||
118 | /* | ||
119 | * NFC | ||
120 | */ | ||
121 | #define MX51_NFC_AXI_BASE_ADDR 0xcfff0000 /* NAND flash AXI */ | ||
122 | #define MX51_NFC_AXI_SIZE SZ_64K | ||
123 | |||
124 | #define MX51_GPU2D_BASE_ADDR 0xd0000000 | ||
125 | #define MX51_TZIC_BASE_ADDR 0xe0000000 | ||
126 | #define MX51_TZIC_SIZE SZ_16K | ||
127 | |||
128 | #define MX51_IO_P2V(x) IMX_IO_P2V(x) | ||
129 | #define MX51_IO_ADDRESS(x) IOMEM(MX51_IO_P2V(x)) | ||
130 | |||
131 | /* | ||
132 | * defines for SPBA modules | ||
133 | */ | ||
134 | #define MX51_SPBA_SDHC1 0x04 | ||
135 | #define MX51_SPBA_SDHC2 0x08 | ||
136 | #define MX51_SPBA_UART3 0x0c | ||
137 | #define MX51_SPBA_CSPI1 0x10 | ||
138 | #define MX51_SPBA_SSI2 0x14 | ||
139 | #define MX51_SPBA_SDHC3 0x20 | ||
140 | #define MX51_SPBA_SDHC4 0x24 | ||
141 | #define MX51_SPBA_SPDIF 0x28 | ||
142 | #define MX51_SPBA_ATA 0x30 | ||
143 | #define MX51_SPBA_SLIM 0x34 | ||
144 | #define MX51_SPBA_HSI2C 0x38 | ||
145 | #define MX51_SPBA_CTRL 0x3c | ||
146 | |||
147 | /* | ||
148 | * Defines for modules using static and dynamic DMA channels | ||
149 | */ | ||
150 | #define MX51_MXC_DMA_CHANNEL_IRAM 30 | ||
151 | #define MX51_MXC_DMA_CHANNEL_SPDIF_TX MXC_DMA_DYNAMIC_CHANNEL | ||
152 | #define MX51_MXC_DMA_CHANNEL_UART1_RX MXC_DMA_DYNAMIC_CHANNEL | ||
153 | #define MX51_MXC_DMA_CHANNEL_UART1_TX MXC_DMA_DYNAMIC_CHANNEL | ||
154 | #define MX51_MXC_DMA_CHANNEL_UART2_RX MXC_DMA_DYNAMIC_CHANNEL | ||
155 | #define MX51_MXC_DMA_CHANNEL_UART2_TX MXC_DMA_DYNAMIC_CHANNEL | ||
156 | #define MX51_MXC_DMA_CHANNEL_UART3_RX MXC_DMA_DYNAMIC_CHANNEL | ||
157 | #define MX51_MXC_DMA_CHANNEL_UART3_TX MXC_DMA_DYNAMIC_CHANNEL | ||
158 | #define MX51_MXC_DMA_CHANNEL_MMC1 MXC_DMA_DYNAMIC_CHANNEL | ||
159 | #define MX51_MXC_DMA_CHANNEL_MMC2 MXC_DMA_DYNAMIC_CHANNEL | ||
160 | #define MX51_MXC_DMA_CHANNEL_SSI1_RX MXC_DMA_DYNAMIC_CHANNEL | ||
161 | #define MX51_MXC_DMA_CHANNEL_SSI1_TX MXC_DMA_DYNAMIC_CHANNEL | ||
162 | #define MX51_MXC_DMA_CHANNEL_SSI2_RX MXC_DMA_DYNAMIC_CHANNEL | ||
163 | #ifdef CONFIG_SDMA_IRAM | ||
164 | #define MX51_MXC_DMA_CHANNEL_SSI2_TX (MX51_MXC_DMA_CHANNEL_IRAM + 1) | ||
165 | #else /*CONFIG_SDMA_IRAM */ | ||
166 | #define MX51_MXC_DMA_CHANNEL_SSI2_TX MXC_DMA_DYNAMIC_CHANNEL | ||
167 | #endif /*CONFIG_SDMA_IRAM */ | ||
168 | #define MX51_MXC_DMA_CHANNEL_CSPI1_RX MXC_DMA_DYNAMIC_CHANNEL | ||
169 | #define MX51_MXC_DMA_CHANNEL_CSPI1_TX MXC_DMA_DYNAMIC_CHANNEL | ||
170 | #define MX51_MXC_DMA_CHANNEL_CSPI2_RX MXC_DMA_DYNAMIC_CHANNEL | ||
171 | #define MX51_MXC_DMA_CHANNEL_CSPI2_TX MXC_DMA_DYNAMIC_CHANNEL | ||
172 | #define MX51_MXC_DMA_CHANNEL_CSPI3_RX MXC_DMA_DYNAMIC_CHANNEL | ||
173 | #define MX51_MXC_DMA_CHANNEL_CSPI3_TX MXC_DMA_DYNAMIC_CHANNEL | ||
174 | #define MX51_MXC_DMA_CHANNEL_ATA_RX MXC_DMA_DYNAMIC_CHANNEL | ||
175 | #define MX51_MXC_DMA_CHANNEL_ATA_TX MXC_DMA_DYNAMIC_CHANNEL | ||
176 | #define MX51_MXC_DMA_CHANNEL_MEMORY MXC_DMA_DYNAMIC_CHANNEL | ||
177 | |||
178 | #define MX51_IS_MEM_DEVICE_NONSHARED(x) 0 | ||
179 | |||
180 | /* | ||
181 | * DMA request assignments | ||
182 | */ | ||
183 | #define MX51_DMA_REQ_VPU 0 | ||
184 | #define MX51_DMA_REQ_GPC 1 | ||
185 | #define MX51_DMA_REQ_ATA_RX 2 | ||
186 | #define MX51_DMA_REQ_ATA_TX 3 | ||
187 | #define MX51_DMA_REQ_ATA_TX_END 4 | ||
188 | #define MX51_DMA_REQ_SLIM_B 5 | ||
189 | #define MX51_DMA_REQ_CSPI1_RX 6 | ||
190 | #define MX51_DMA_REQ_CSPI1_TX 7 | ||
191 | #define MX51_DMA_REQ_CSPI2_RX 8 | ||
192 | #define MX51_DMA_REQ_CSPI2_TX 9 | ||
193 | #define MX51_DMA_REQ_HS_I2C_TX 10 | ||
194 | #define MX51_DMA_REQ_HS_I2C_RX 11 | ||
195 | #define MX51_DMA_REQ_FIRI_RX 12 | ||
196 | #define MX51_DMA_REQ_FIRI_TX 13 | ||
197 | #define MX51_DMA_REQ_EXTREQ1 14 | ||
198 | #define MX51_DMA_REQ_GPU 15 | ||
199 | #define MX51_DMA_REQ_UART2_RX 16 | ||
200 | #define MX51_DMA_REQ_UART2_TX 17 | ||
201 | #define MX51_DMA_REQ_UART1_RX 18 | ||
202 | #define MX51_DMA_REQ_UART1_TX 19 | ||
203 | #define MX51_DMA_REQ_SDHC1 20 | ||
204 | #define MX51_DMA_REQ_SDHC2 21 | ||
205 | #define MX51_DMA_REQ_SSI2_RX1 22 | ||
206 | #define MX51_DMA_REQ_SSI2_TX1 23 | ||
207 | #define MX51_DMA_REQ_SSI2_RX0 24 | ||
208 | #define MX51_DMA_REQ_SSI2_TX0 25 | ||
209 | #define MX51_DMA_REQ_SSI1_RX1 26 | ||
210 | #define MX51_DMA_REQ_SSI1_TX1 27 | ||
211 | #define MX51_DMA_REQ_SSI1_RX0 28 | ||
212 | #define MX51_DMA_REQ_SSI1_TX0 29 | ||
213 | #define MX51_DMA_REQ_EMI_RD 30 | ||
214 | #define MX51_DMA_REQ_CTI2_0 31 | ||
215 | #define MX51_DMA_REQ_EMI_WR 32 | ||
216 | #define MX51_DMA_REQ_CTI2_1 33 | ||
217 | #define MX51_DMA_REQ_EPIT2 34 | ||
218 | #define MX51_DMA_REQ_SSI3_RX1 35 | ||
219 | #define MX51_DMA_REQ_IPU 36 | ||
220 | #define MX51_DMA_REQ_SSI3_TX1 37 | ||
221 | #define MX51_DMA_REQ_CSPI_RX 38 | ||
222 | #define MX51_DMA_REQ_CSPI_TX 39 | ||
223 | #define MX51_DMA_REQ_SDHC3 40 | ||
224 | #define MX51_DMA_REQ_SDHC4 41 | ||
225 | #define MX51_DMA_REQ_SLIM_B_TX 42 | ||
226 | #define MX51_DMA_REQ_UART3_RX 43 | ||
227 | #define MX51_DMA_REQ_UART3_TX 44 | ||
228 | #define MX51_DMA_REQ_SPDIF 45 | ||
229 | #define MX51_DMA_REQ_SSI3_RX0 46 | ||
230 | #define MX51_DMA_REQ_SSI3_TX0 47 | ||
231 | |||
232 | /* | ||
233 | * Interrupt numbers | ||
234 | */ | ||
235 | #include <asm/irq.h> | ||
236 | #define MX51_INT_BASE (NR_IRQS_LEGACY + 0) | ||
237 | #define MX51_INT_RESV0 (NR_IRQS_LEGACY + 0) | ||
238 | #define MX51_INT_ESDHC1 (NR_IRQS_LEGACY + 1) | ||
239 | #define MX51_INT_ESDHC2 (NR_IRQS_LEGACY + 2) | ||
240 | #define MX51_INT_ESDHC3 (NR_IRQS_LEGACY + 3) | ||
241 | #define MX51_INT_ESDHC4 (NR_IRQS_LEGACY + 4) | ||
242 | #define MX51_INT_RESV5 (NR_IRQS_LEGACY + 5) | ||
243 | #define MX51_INT_SDMA (NR_IRQS_LEGACY + 6) | ||
244 | #define MX51_INT_IOMUX (NR_IRQS_LEGACY + 7) | ||
245 | #define MX51_INT_NFC (NR_IRQS_LEGACY + 8) | ||
246 | #define MX51_INT_VPU (NR_IRQS_LEGACY + 9) | ||
247 | #define MX51_INT_IPU_ERR (NR_IRQS_LEGACY + 10) | ||
248 | #define MX51_INT_IPU_SYN (NR_IRQS_LEGACY + 11) | ||
249 | #define MX51_INT_GPU (NR_IRQS_LEGACY + 12) | ||
250 | #define MX51_INT_RESV13 (NR_IRQS_LEGACY + 13) | ||
251 | #define MX51_INT_USB_HS1 (NR_IRQS_LEGACY + 14) | ||
252 | #define MX51_INT_EMI (NR_IRQS_LEGACY + 15) | ||
253 | #define MX51_INT_USB_HS2 (NR_IRQS_LEGACY + 16) | ||
254 | #define MX51_INT_USB_HS3 (NR_IRQS_LEGACY + 17) | ||
255 | #define MX51_INT_USB_OTG (NR_IRQS_LEGACY + 18) | ||
256 | #define MX51_INT_SAHARA_H0 (NR_IRQS_LEGACY + 19) | ||
257 | #define MX51_INT_SAHARA_H1 (NR_IRQS_LEGACY + 20) | ||
258 | #define MX51_INT_SCC_SMN (NR_IRQS_LEGACY + 21) | ||
259 | #define MX51_INT_SCC_STZ (NR_IRQS_LEGACY + 22) | ||
260 | #define MX51_INT_SCC_SCM (NR_IRQS_LEGACY + 23) | ||
261 | #define MX51_INT_SRTC_NTZ (NR_IRQS_LEGACY + 24) | ||
262 | #define MX51_INT_SRTC_TZ (NR_IRQS_LEGACY + 25) | ||
263 | #define MX51_INT_RTIC (NR_IRQS_LEGACY + 26) | ||
264 | #define MX51_INT_CSU (NR_IRQS_LEGACY + 27) | ||
265 | #define MX51_INT_SLIM_B (NR_IRQS_LEGACY + 28) | ||
266 | #define MX51_INT_SSI1 (NR_IRQS_LEGACY + 29) | ||
267 | #define MX51_INT_SSI2 (NR_IRQS_LEGACY + 30) | ||
268 | #define MX51_INT_UART1 (NR_IRQS_LEGACY + 31) | ||
269 | #define MX51_INT_UART2 (NR_IRQS_LEGACY + 32) | ||
270 | #define MX51_INT_UART3 (NR_IRQS_LEGACY + 33) | ||
271 | #define MX51_INT_RESV34 (NR_IRQS_LEGACY + 34) | ||
272 | #define MX51_INT_RESV35 (NR_IRQS_LEGACY + 35) | ||
273 | #define MX51_INT_ECSPI1 (NR_IRQS_LEGACY + 36) | ||
274 | #define MX51_INT_ECSPI2 (NR_IRQS_LEGACY + 37) | ||
275 | #define MX51_INT_CSPI (NR_IRQS_LEGACY + 38) | ||
276 | #define MX51_INT_GPT (NR_IRQS_LEGACY + 39) | ||
277 | #define MX51_INT_EPIT1 (NR_IRQS_LEGACY + 40) | ||
278 | #define MX51_INT_EPIT2 (NR_IRQS_LEGACY + 41) | ||
279 | #define MX51_INT_GPIO1_INT7 (NR_IRQS_LEGACY + 42) | ||
280 | #define MX51_INT_GPIO1_INT6 (NR_IRQS_LEGACY + 43) | ||
281 | #define MX51_INT_GPIO1_INT5 (NR_IRQS_LEGACY + 44) | ||
282 | #define MX51_INT_GPIO1_INT4 (NR_IRQS_LEGACY + 45) | ||
283 | #define MX51_INT_GPIO1_INT3 (NR_IRQS_LEGACY + 46) | ||
284 | #define MX51_INT_GPIO1_INT2 (NR_IRQS_LEGACY + 47) | ||
285 | #define MX51_INT_GPIO1_INT1 (NR_IRQS_LEGACY + 48) | ||
286 | #define MX51_INT_GPIO1_INT0 (NR_IRQS_LEGACY + 49) | ||
287 | #define MX51_INT_GPIO1_LOW (NR_IRQS_LEGACY + 50) | ||
288 | #define MX51_INT_GPIO1_HIGH (NR_IRQS_LEGACY + 51) | ||
289 | #define MX51_INT_GPIO2_LOW (NR_IRQS_LEGACY + 52) | ||
290 | #define MX51_INT_GPIO2_HIGH (NR_IRQS_LEGACY + 53) | ||
291 | #define MX51_INT_GPIO3_LOW (NR_IRQS_LEGACY + 54) | ||
292 | #define MX51_INT_GPIO3_HIGH (NR_IRQS_LEGACY + 55) | ||
293 | #define MX51_INT_GPIO4_LOW (NR_IRQS_LEGACY + 56) | ||
294 | #define MX51_INT_GPIO4_HIGH (NR_IRQS_LEGACY + 57) | ||
295 | #define MX51_INT_WDOG1 (NR_IRQS_LEGACY + 58) | ||
296 | #define MX51_INT_WDOG2 (NR_IRQS_LEGACY + 59) | ||
297 | #define MX51_INT_KPP (NR_IRQS_LEGACY + 60) | ||
298 | #define MX51_INT_PWM1 (NR_IRQS_LEGACY + 61) | ||
299 | #define MX51_INT_I2C1 (NR_IRQS_LEGACY + 62) | ||
300 | #define MX51_INT_I2C2 (NR_IRQS_LEGACY + 63) | ||
301 | #define MX51_INT_HS_I2C (NR_IRQS_LEGACY + 64) | ||
302 | #define MX51_INT_RESV65 (NR_IRQS_LEGACY + 65) | ||
303 | #define MX51_INT_RESV66 (NR_IRQS_LEGACY + 66) | ||
304 | #define MX51_INT_SIM_IPB (NR_IRQS_LEGACY + 67) | ||
305 | #define MX51_INT_SIM_DAT (NR_IRQS_LEGACY + 68) | ||
306 | #define MX51_INT_IIM (NR_IRQS_LEGACY + 69) | ||
307 | #define MX51_INT_ATA (NR_IRQS_LEGACY + 70) | ||
308 | #define MX51_INT_CCM1 (NR_IRQS_LEGACY + 71) | ||
309 | #define MX51_INT_CCM2 (NR_IRQS_LEGACY + 72) | ||
310 | #define MX51_INT_GPC1 (NR_IRQS_LEGACY + 73) | ||
311 | #define MX51_INT_GPC2 (NR_IRQS_LEGACY + 74) | ||
312 | #define MX51_INT_SRC (NR_IRQS_LEGACY + 75) | ||
313 | #define MX51_INT_NM (NR_IRQS_LEGACY + 76) | ||
314 | #define MX51_INT_PMU (NR_IRQS_LEGACY + 77) | ||
315 | #define MX51_INT_CTI_IRQ (NR_IRQS_LEGACY + 78) | ||
316 | #define MX51_INT_CTI1_TG0 (NR_IRQS_LEGACY + 79) | ||
317 | #define MX51_INT_CTI1_TG1 (NR_IRQS_LEGACY + 80) | ||
318 | #define MX51_INT_MCG_ERR (NR_IRQS_LEGACY + 81) | ||
319 | #define MX51_INT_MCG_TMR (NR_IRQS_LEGACY + 82) | ||
320 | #define MX51_INT_MCG_FUNC (NR_IRQS_LEGACY + 83) | ||
321 | #define MX51_INT_GPU2_IRQ (NR_IRQS_LEGACY + 84) | ||
322 | #define MX51_INT_GPU2_BUSY (NR_IRQS_LEGACY + 85) | ||
323 | #define MX51_INT_RESV86 (NR_IRQS_LEGACY + 86) | ||
324 | #define MX51_INT_FEC (NR_IRQS_LEGACY + 87) | ||
325 | #define MX51_INT_OWIRE (NR_IRQS_LEGACY + 88) | ||
326 | #define MX51_INT_CTI1_TG2 (NR_IRQS_LEGACY + 89) | ||
327 | #define MX51_INT_SJC (NR_IRQS_LEGACY + 90) | ||
328 | #define MX51_INT_SPDIF (NR_IRQS_LEGACY + 91) | ||
329 | #define MX51_INT_TVE (NR_IRQS_LEGACY + 92) | ||
330 | #define MX51_INT_FIRI (NR_IRQS_LEGACY + 93) | ||
331 | #define MX51_INT_PWM2 (NR_IRQS_LEGACY + 94) | ||
332 | #define MX51_INT_SLIM_EXP (NR_IRQS_LEGACY + 95) | ||
333 | #define MX51_INT_SSI3 (NR_IRQS_LEGACY + 96) | ||
334 | #define MX51_INT_EMI_BOOT (NR_IRQS_LEGACY + 97) | ||
335 | #define MX51_INT_CTI1_TG3 (NR_IRQS_LEGACY + 98) | ||
336 | #define MX51_INT_SMC_RX (NR_IRQS_LEGACY + 99) | ||
337 | #define MX51_INT_VPU_IDLE (NR_IRQS_LEGACY + 100) | ||
338 | #define MX51_INT_EMI_NFC (NR_IRQS_LEGACY + 101) | ||
339 | #define MX51_INT_GPU_IDLE (NR_IRQS_LEGACY + 102) | ||
340 | |||
341 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) | ||
342 | extern int mx51_revision(void); | ||
343 | extern void mx51_display_revision(void); | ||
344 | #endif | ||
345 | |||
346 | #endif /* ifndef __MACH_MX51_H__ */ | ||
diff --git a/arch/arm/mach-imx/mx53.h b/arch/arm/mach-imx/mx53.h deleted file mode 100644 index f829d1c2250..00000000000 --- a/arch/arm/mach-imx/mx53.h +++ /dev/null | |||
@@ -1,342 +0,0 @@ | |||
1 | #ifndef __MACH_MX53_H__ | ||
2 | #define __MACH_MX53_H__ | ||
3 | |||
4 | /* | ||
5 | * IROM | ||
6 | */ | ||
7 | #define MX53_IROM_BASE_ADDR 0x0 | ||
8 | #define MX53_IROM_SIZE SZ_64K | ||
9 | |||
10 | /* TZIC */ | ||
11 | #define MX53_TZIC_BASE_ADDR 0x0FFFC000 | ||
12 | #define MX53_TZIC_SIZE SZ_16K | ||
13 | |||
14 | /* | ||
15 | * AHCI SATA | ||
16 | */ | ||
17 | #define MX53_SATA_BASE_ADDR 0x10000000 | ||
18 | |||
19 | /* | ||
20 | * NFC | ||
21 | */ | ||
22 | #define MX53_NFC_AXI_BASE_ADDR 0xF7FF0000 /* NAND flash AXI */ | ||
23 | #define MX53_NFC_AXI_SIZE SZ_64K | ||
24 | |||
25 | /* | ||
26 | * IRAM | ||
27 | */ | ||
28 | #define MX53_IRAM_BASE_ADDR 0xF8000000 /* internal ram */ | ||
29 | #define MX53_IRAM_PARTITIONS 16 | ||
30 | #define MX53_IRAM_SIZE (MX53_IRAM_PARTITIONS * SZ_8K) /* 128KB */ | ||
31 | |||
32 | /* | ||
33 | * Graphics Memory of GPU | ||
34 | */ | ||
35 | #define MX53_IPU_CTRL_BASE_ADDR 0x18000000 | ||
36 | #define MX53_GPU2D_BASE_ADDR 0x20000000 | ||
37 | #define MX53_GPU_BASE_ADDR 0x30000000 | ||
38 | #define MX53_GPU_GMEM_BASE_ADDR 0xF8020000 | ||
39 | |||
40 | #define MX53_DEBUG_BASE_ADDR 0x40000000 | ||
41 | #define MX53_DEBUG_SIZE SZ_1M | ||
42 | #define MX53_ETB_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00001000) | ||
43 | #define MX53_ETM_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00002000) | ||
44 | #define MX53_TPIU_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00003000) | ||
45 | #define MX53_CTI0_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00004000) | ||
46 | #define MX53_CTI1_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00005000) | ||
47 | #define MX53_CTI2_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00006000) | ||
48 | #define MX53_CTI3_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00007000) | ||
49 | #define MX53_CORTEX_DBG_BASE_ADDR (MX53_DEBUG_BASE_ADDR + 0x00008000) | ||
50 | |||
51 | /* | ||
52 | * SPBA global module enabled #0 | ||
53 | */ | ||
54 | #define MX53_SPBA0_BASE_ADDR 0x50000000 | ||
55 | #define MX53_SPBA0_SIZE SZ_1M | ||
56 | |||
57 | #define MX53_ESDHC1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00004000) | ||
58 | #define MX53_ESDHC2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00008000) | ||
59 | #define MX53_UART3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0000C000) | ||
60 | #define MX53_ECSPI1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00010000) | ||
61 | #define MX53_SSI2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00014000) | ||
62 | #define MX53_ESDHC3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00020000) | ||
63 | #define MX53_ESDHC4_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00024000) | ||
64 | #define MX53_SPDIF_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00028000) | ||
65 | #define MX53_ASRC_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0002C000) | ||
66 | #define MX53_ATA_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00030000) | ||
67 | #define MX53_SLIM_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00034000) | ||
68 | #define MX53_HSI2C_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00038000) | ||
69 | #define MX53_SPBA_CTRL_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0003C000) | ||
70 | |||
71 | /* | ||
72 | * AIPS 1 | ||
73 | */ | ||
74 | #define MX53_AIPS1_BASE_ADDR 0x53F00000 | ||
75 | #define MX53_AIPS1_SIZE SZ_1M | ||
76 | |||
77 | #define MX53_OTG_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x00080000) | ||
78 | #define MX53_GPIO1_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x00084000) | ||
79 | #define MX53_GPIO2_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x00088000) | ||
80 | #define MX53_GPIO3_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x0008C000) | ||
81 | #define MX53_GPIO4_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x00090000) | ||
82 | #define MX53_KPP_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x00094000) | ||
83 | #define MX53_WDOG1_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x00098000) | ||
84 | #define MX53_WDOG2_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x0009C000) | ||
85 | #define MX53_GPT1_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000A0000) | ||
86 | #define MX53_SRTC_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000A4000) | ||
87 | #define MX53_IOMUXC_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000A8000) | ||
88 | #define MX53_EPIT1_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000AC000) | ||
89 | #define MX53_EPIT2_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000B0000) | ||
90 | #define MX53_PWM1_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000B4000) | ||
91 | #define MX53_PWM2_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000B8000) | ||
92 | #define MX53_UART1_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000BC000) | ||
93 | #define MX53_UART2_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000C0000) | ||
94 | #define MX53_SRC_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000D0000) | ||
95 | #define MX53_CCM_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000D4000) | ||
96 | #define MX53_GPC_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000D8000) | ||
97 | #define MX53_GPIO5_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000DC000) | ||
98 | #define MX53_GPIO6_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000E0000) | ||
99 | #define MX53_GPIO7_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000E4000) | ||
100 | #define MX53_ATA_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000E8000) | ||
101 | #define MX53_I2C3_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000EC000) | ||
102 | #define MX53_UART4_BASE_ADDR (MX53_AIPS1_BASE_ADDR + 0x000F0000) | ||
103 | |||
104 | /* | ||
105 | * AIPS 2 | ||
106 | */ | ||
107 | #define MX53_AIPS2_BASE_ADDR 0x63F00000 | ||
108 | #define MX53_AIPS2_SIZE SZ_1M | ||
109 | |||
110 | #define MX53_PLL1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x00080000) | ||
111 | #define MX53_PLL2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x00084000) | ||
112 | #define MX53_PLL3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x00088000) | ||
113 | #define MX53_PLL4_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x0008C000) | ||
114 | #define MX53_UART5_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x00090000) | ||
115 | #define MX53_AHBMAX_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x00094000) | ||
116 | #define MX53_IIM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x00098000) | ||
117 | #define MX53_CSU_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x0009C000) | ||
118 | #define MX53_ARM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A0000) | ||
119 | #define MX53_OWIRE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A4000) | ||
120 | #define MX53_FIRI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A8000) | ||
121 | #define MX53_ECSPI2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000AC000) | ||
122 | #define MX53_SDMA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B0000) | ||
123 | #define MX53_SCC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B4000) | ||
124 | #define MX53_ROMCP_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B8000) | ||
125 | #define MX53_RTIC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000BC000) | ||
126 | #define MX53_CSPI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C0000) | ||
127 | #define MX53_I2C2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C4000) | ||
128 | #define MX53_I2C1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C8000) | ||
129 | #define MX53_SSI1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000CC000) | ||
130 | #define MX53_AUDMUX_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000D0000) | ||
131 | #define MX53_RTC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000D4000) | ||
132 | #define MX53_M4IF_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000D8000) | ||
133 | #define MX53_ESDCTL_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000D9000) | ||
134 | #define MX53_WEIM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DA000) | ||
135 | #define MX53_NFC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DB000) | ||
136 | #define MX53_EMI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DBF00) | ||
137 | #define MX53_MIPI_HSC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DC000) | ||
138 | #define MX53_MLB_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E4000) | ||
139 | #define MX53_SSI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E8000) | ||
140 | #define MX53_FEC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000EC000) | ||
141 | #define MX53_TVE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F0000) | ||
142 | #define MX53_VPU_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F4000) | ||
143 | #define MX53_SAHARA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F8000) | ||
144 | #define MX53_PTP_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000FC000) | ||
145 | |||
146 | /* | ||
147 | * Memory regions and CS | ||
148 | */ | ||
149 | #define MX53_CSD0_BASE_ADDR 0x70000000 | ||
150 | #define MX53_CSD1_BASE_ADDR 0xB0000000 | ||
151 | #define MX53_CS0_BASE_ADDR 0xF0000000 | ||
152 | #define MX53_CS1_32MB_BASE_ADDR 0xF2000000 | ||
153 | #define MX53_CS1_64MB_BASE_ADDR 0xF4000000 | ||
154 | #define MX53_CS2_64MB_BASE_ADDR 0xF4000000 | ||
155 | #define MX53_CS2_96MB_BASE_ADDR 0xF6000000 | ||
156 | #define MX53_CS3_BASE_ADDR 0xF6000000 | ||
157 | |||
158 | #define MX53_IO_P2V(x) IMX_IO_P2V(x) | ||
159 | #define MX53_IO_ADDRESS(x) IOMEM(MX53_IO_P2V(x)) | ||
160 | |||
161 | /* | ||
162 | * defines for SPBA modules | ||
163 | */ | ||
164 | #define MX53_SPBA_SDHC1 0x04 | ||
165 | #define MX53_SPBA_SDHC2 0x08 | ||
166 | #define MX53_SPBA_UART3 0x0C | ||
167 | #define MX53_SPBA_CSPI1 0x10 | ||
168 | #define MX53_SPBA_SSI2 0x14 | ||
169 | #define MX53_SPBA_SDHC3 0x20 | ||
170 | #define MX53_SPBA_SDHC4 0x24 | ||
171 | #define MX53_SPBA_SPDIF 0x28 | ||
172 | #define MX53_SPBA_ATA 0x30 | ||
173 | #define MX53_SPBA_SLIM 0x34 | ||
174 | #define MX53_SPBA_HSI2C 0x38 | ||
175 | #define MX53_SPBA_CTRL 0x3C | ||
176 | |||
177 | /* | ||
178 | * DMA request assignments | ||
179 | */ | ||
180 | #define MX53_DMA_REQ_SSI3_TX0 47 | ||
181 | #define MX53_DMA_REQ_SSI3_RX0 46 | ||
182 | #define MX53_DMA_REQ_SSI3_TX1 45 | ||
183 | #define MX53_DMA_REQ_SSI3_RX1 44 | ||
184 | #define MX53_DMA_REQ_UART3_TX 43 | ||
185 | #define MX53_DMA_REQ_UART3_RX 42 | ||
186 | #define MX53_DMA_REQ_ESAI_TX 41 | ||
187 | #define MX53_DMA_REQ_ESAI_RX 40 | ||
188 | #define MX53_DMA_REQ_CSPI_TX 39 | ||
189 | #define MX53_DMA_REQ_CSPI_RX 38 | ||
190 | #define MX53_DMA_REQ_ASRC_DMA6 37 | ||
191 | #define MX53_DMA_REQ_ASRC_DMA5 36 | ||
192 | #define MX53_DMA_REQ_ASRC_DMA4 35 | ||
193 | #define MX53_DMA_REQ_ASRC_DMA3 34 | ||
194 | #define MX53_DMA_REQ_ASRC_DMA2 33 | ||
195 | #define MX53_DMA_REQ_ASRC_DMA1 32 | ||
196 | #define MX53_DMA_REQ_EMI_WR 31 | ||
197 | #define MX53_DMA_REQ_EMI_RD 30 | ||
198 | #define MX53_DMA_REQ_SSI1_TX0 29 | ||
199 | #define MX53_DMA_REQ_SSI1_RX0 28 | ||
200 | #define MX53_DMA_REQ_SSI1_TX1 27 | ||
201 | #define MX53_DMA_REQ_SSI1_RX1 26 | ||
202 | #define MX53_DMA_REQ_SSI2_TX0 25 | ||
203 | #define MX53_DMA_REQ_SSI2_RX0 24 | ||
204 | #define MX53_DMA_REQ_SSI2_TX1 23 | ||
205 | #define MX53_DMA_REQ_SSI2_RX1 22 | ||
206 | #define MX53_DMA_REQ_I2C2_SDHC2 21 | ||
207 | #define MX53_DMA_REQ_I2C1_SDHC1 20 | ||
208 | #define MX53_DMA_REQ_UART1_TX 19 | ||
209 | #define MX53_DMA_REQ_UART1_RX 18 | ||
210 | #define MX53_DMA_REQ_UART5_TX 17 | ||
211 | #define MX53_DMA_REQ_UART5_RX 16 | ||
212 | #define MX53_DMA_REQ_SPDIF_TX 15 | ||
213 | #define MX53_DMA_REQ_SPDIF_RX 14 | ||
214 | #define MX53_DMA_REQ_UART2_FIRI_TX 13 | ||
215 | #define MX53_DMA_REQ_UART2_FIRI_RX 12 | ||
216 | #define MX53_DMA_REQ_SDHC4 11 | ||
217 | #define MX53_DMA_REQ_I2C3_SDHC3 10 | ||
218 | #define MX53_DMA_REQ_CSPI2_TX 9 | ||
219 | #define MX53_DMA_REQ_CSPI2_RX 8 | ||
220 | #define MX53_DMA_REQ_CSPI1_TX 7 | ||
221 | #define MX53_DMA_REQ_CSPI1_RX 6 | ||
222 | #define MX53_DMA_REQ_IPU 5 | ||
223 | #define MX53_DMA_REQ_ATA_TX_END 4 | ||
224 | #define MX53_DMA_REQ_ATA_UART4_TX 3 | ||
225 | #define MX53_DMA_REQ_ATA_UART4_RX 2 | ||
226 | #define MX53_DMA_REQ_GPC 1 | ||
227 | #define MX53_DMA_REQ_VPU 0 | ||
228 | |||
229 | /* | ||
230 | * Interrupt numbers | ||
231 | */ | ||
232 | #include <asm/irq.h> | ||
233 | #define MX53_INT_RESV0 (NR_IRQS_LEGACY + 0) | ||
234 | #define MX53_INT_ESDHC1 (NR_IRQS_LEGACY + 1) | ||
235 | #define MX53_INT_ESDHC2 (NR_IRQS_LEGACY + 2) | ||
236 | #define MX53_INT_ESDHC3 (NR_IRQS_LEGACY + 3) | ||
237 | #define MX53_INT_ESDHC4 (NR_IRQS_LEGACY + 4) | ||
238 | #define MX53_INT_DAP (NR_IRQS_LEGACY + 5) | ||
239 | #define MX53_INT_SDMA (NR_IRQS_LEGACY + 6) | ||
240 | #define MX53_INT_IOMUX (NR_IRQS_LEGACY + 7) | ||
241 | #define MX53_INT_NFC (NR_IRQS_LEGACY + 8) | ||
242 | #define MX53_INT_VPU (NR_IRQS_LEGACY + 9) | ||
243 | #define MX53_INT_IPU_ERR (NR_IRQS_LEGACY + 10) | ||
244 | #define MX53_INT_IPU_SYN (NR_IRQS_LEGACY + 11) | ||
245 | #define MX53_INT_GPU (NR_IRQS_LEGACY + 12) | ||
246 | #define MX53_INT_UART4 (NR_IRQS_LEGACY + 13) | ||
247 | #define MX53_INT_USB_H1 (NR_IRQS_LEGACY + 14) | ||
248 | #define MX53_INT_EMI (NR_IRQS_LEGACY + 15) | ||
249 | #define MX53_INT_USB_H2 (NR_IRQS_LEGACY + 16) | ||
250 | #define MX53_INT_USB_H3 (NR_IRQS_LEGACY + 17) | ||
251 | #define MX53_INT_USB_OTG (NR_IRQS_LEGACY + 18) | ||
252 | #define MX53_INT_SAHARA_H0 (NR_IRQS_LEGACY + 19) | ||
253 | #define MX53_INT_SAHARA_H1 (NR_IRQS_LEGACY + 20) | ||
254 | #define MX53_INT_SCC_SMN (NR_IRQS_LEGACY + 21) | ||
255 | #define MX53_INT_SCC_STZ (NR_IRQS_LEGACY + 22) | ||
256 | #define MX53_INT_SCC_SCM (NR_IRQS_LEGACY + 23) | ||
257 | #define MX53_INT_SRTC_NTZ (NR_IRQS_LEGACY + 24) | ||
258 | #define MX53_INT_SRTC_TZ (NR_IRQS_LEGACY + 25) | ||
259 | #define MX53_INT_RTIC (NR_IRQS_LEGACY + 26) | ||
260 | #define MX53_INT_CSU (NR_IRQS_LEGACY + 27) | ||
261 | #define MX53_INT_SATA (NR_IRQS_LEGACY + 28) | ||
262 | #define MX53_INT_SSI1 (NR_IRQS_LEGACY + 29) | ||
263 | #define MX53_INT_SSI2 (NR_IRQS_LEGACY + 30) | ||
264 | #define MX53_INT_UART1 (NR_IRQS_LEGACY + 31) | ||
265 | #define MX53_INT_UART2 (NR_IRQS_LEGACY + 32) | ||
266 | #define MX53_INT_UART3 (NR_IRQS_LEGACY + 33) | ||
267 | #define MX53_INT_RTC (NR_IRQS_LEGACY + 34) | ||
268 | #define MX53_INT_PTP (NR_IRQS_LEGACY + 35) | ||
269 | #define MX53_INT_ECSPI1 (NR_IRQS_LEGACY + 36) | ||
270 | #define MX53_INT_ECSPI2 (NR_IRQS_LEGACY + 37) | ||
271 | #define MX53_INT_CSPI (NR_IRQS_LEGACY + 38) | ||
272 | #define MX53_INT_GPT (NR_IRQS_LEGACY + 39) | ||
273 | #define MX53_INT_EPIT1 (NR_IRQS_LEGACY + 40) | ||
274 | #define MX53_INT_EPIT2 (NR_IRQS_LEGACY + 41) | ||
275 | #define MX53_INT_GPIO1_INT7 (NR_IRQS_LEGACY + 42) | ||
276 | #define MX53_INT_GPIO1_INT6 (NR_IRQS_LEGACY + 43) | ||
277 | #define MX53_INT_GPIO1_INT5 (NR_IRQS_LEGACY + 44) | ||
278 | #define MX53_INT_GPIO1_INT4 (NR_IRQS_LEGACY + 45) | ||
279 | #define MX53_INT_GPIO1_INT3 (NR_IRQS_LEGACY + 46) | ||
280 | #define MX53_INT_GPIO1_INT2 (NR_IRQS_LEGACY + 47) | ||
281 | #define MX53_INT_GPIO1_INT1 (NR_IRQS_LEGACY + 48) | ||
282 | #define MX53_INT_GPIO1_INT0 (NR_IRQS_LEGACY + 49) | ||
283 | #define MX53_INT_GPIO1_LOW (NR_IRQS_LEGACY + 50) | ||
284 | #define MX53_INT_GPIO1_HIGH (NR_IRQS_LEGACY + 51) | ||
285 | #define MX53_INT_GPIO2_LOW (NR_IRQS_LEGACY + 52) | ||
286 | #define MX53_INT_GPIO2_HIGH (NR_IRQS_LEGACY + 53) | ||
287 | #define MX53_INT_GPIO3_LOW (NR_IRQS_LEGACY + 54) | ||
288 | #define MX53_INT_GPIO3_HIGH (NR_IRQS_LEGACY + 55) | ||
289 | #define MX53_INT_GPIO4_LOW (NR_IRQS_LEGACY + 56) | ||
290 | #define MX53_INT_GPIO4_HIGH (NR_IRQS_LEGACY + 57) | ||
291 | #define MX53_INT_WDOG1 (NR_IRQS_LEGACY + 58) | ||
292 | #define MX53_INT_WDOG2 (NR_IRQS_LEGACY + 59) | ||
293 | #define MX53_INT_KPP (NR_IRQS_LEGACY + 60) | ||
294 | #define MX53_INT_PWM1 (NR_IRQS_LEGACY + 61) | ||
295 | #define MX53_INT_I2C1 (NR_IRQS_LEGACY + 62) | ||
296 | #define MX53_INT_I2C2 (NR_IRQS_LEGACY + 63) | ||
297 | #define MX53_INT_I2C3 (NR_IRQS_LEGACY + 64) | ||
298 | #define MX53_INT_MLB (NR_IRQS_LEGACY + 65) | ||
299 | #define MX53_INT_ASRC (NR_IRQS_LEGACY + 66) | ||
300 | #define MX53_INT_SPDIF (NR_IRQS_LEGACY + 67) | ||
301 | #define MX53_INT_SIM_DAT (NR_IRQS_LEGACY + 68) | ||
302 | #define MX53_INT_IIM (NR_IRQS_LEGACY + 69) | ||
303 | #define MX53_INT_ATA (NR_IRQS_LEGACY + 70) | ||
304 | #define MX53_INT_CCM1 (NR_IRQS_LEGACY + 71) | ||
305 | #define MX53_INT_CCM2 (NR_IRQS_LEGACY + 72) | ||
306 | #define MX53_INT_GPC1 (NR_IRQS_LEGACY + 73) | ||
307 | #define MX53_INT_GPC2 (NR_IRQS_LEGACY + 74) | ||
308 | #define MX53_INT_SRC (NR_IRQS_LEGACY + 75) | ||
309 | #define MX53_INT_NM (NR_IRQS_LEGACY + 76) | ||
310 | #define MX53_INT_PMU (NR_IRQS_LEGACY + 77) | ||
311 | #define MX53_INT_CTI_IRQ (NR_IRQS_LEGACY + 78) | ||
312 | #define MX53_INT_CTI1_TG0 (NR_IRQS_LEGACY + 79) | ||
313 | #define MX53_INT_CTI1_TG1 (NR_IRQS_LEGACY + 80) | ||
314 | #define MX53_INT_ESAI (NR_IRQS_LEGACY + 81) | ||
315 | #define MX53_INT_CAN1 (NR_IRQS_LEGACY + 82) | ||
316 | #define MX53_INT_CAN2 (NR_IRQS_LEGACY + 83) | ||
317 | #define MX53_INT_GPU2_IRQ (NR_IRQS_LEGACY + 84) | ||
318 | #define MX53_INT_GPU2_BUSY (NR_IRQS_LEGACY + 85) | ||
319 | #define MX53_INT_UART5 (NR_IRQS_LEGACY + 86) | ||
320 | #define MX53_INT_FEC (NR_IRQS_LEGACY + 87) | ||
321 | #define MX53_INT_OWIRE (NR_IRQS_LEGACY + 88) | ||
322 | #define MX53_INT_CTI1_TG2 (NR_IRQS_LEGACY + 89) | ||
323 | #define MX53_INT_SJC (NR_IRQS_LEGACY + 90) | ||
324 | #define MX53_INT_TVE (NR_IRQS_LEGACY + 92) | ||
325 | #define MX53_INT_FIRI (NR_IRQS_LEGACY + 93) | ||
326 | #define MX53_INT_PWM2 (NR_IRQS_LEGACY + 94) | ||
327 | #define MX53_INT_SLIM_EXP (NR_IRQS_LEGACY + 95) | ||
328 | #define MX53_INT_SSI3 (NR_IRQS_LEGACY + 96) | ||
329 | #define MX53_INT_EMI_BOOT (NR_IRQS_LEGACY + 97) | ||
330 | #define MX53_INT_CTI1_TG3 (NR_IRQS_LEGACY + 98) | ||
331 | #define MX53_INT_SMC_RX (NR_IRQS_LEGACY + 99) | ||
332 | #define MX53_INT_VPU_IDLE (NR_IRQS_LEGACY + 100) | ||
333 | #define MX53_INT_EMI_NFC (NR_IRQS_LEGACY + 101) | ||
334 | #define MX53_INT_GPU_IDLE (NR_IRQS_LEGACY + 102) | ||
335 | #define MX53_INT_GPIO5_LOW (NR_IRQS_LEGACY + 103) | ||
336 | #define MX53_INT_GPIO5_HIGH (NR_IRQS_LEGACY + 104) | ||
337 | #define MX53_INT_GPIO6_LOW (NR_IRQS_LEGACY + 105) | ||
338 | #define MX53_INT_GPIO6_HIGH (NR_IRQS_LEGACY + 106) | ||
339 | #define MX53_INT_GPIO7_LOW (NR_IRQS_LEGACY + 107) | ||
340 | #define MX53_INT_GPIO7_HIGH (NR_IRQS_LEGACY + 108) | ||
341 | |||
342 | #endif /* ifndef __MACH_MX53_H__ */ | ||
diff --git a/arch/arm/mach-imx/mx6q.h b/arch/arm/mach-imx/mx6q.h deleted file mode 100644 index 19d3f54db5a..00000000000 --- a/arch/arm/mach-imx/mx6q.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #ifndef __MACH_MX6Q_H__ | ||
14 | #define __MACH_MX6Q_H__ | ||
15 | |||
16 | #define MX6Q_IO_P2V(x) IMX_IO_P2V(x) | ||
17 | #define MX6Q_IO_ADDRESS(x) IOMEM(MX6Q_IO_P2V(x)) | ||
18 | |||
19 | /* | ||
20 | * The following are the blocks that need to be statically mapped. | ||
21 | * For other blocks, the base address really should be retrieved from | ||
22 | * device tree. | ||
23 | */ | ||
24 | #define MX6Q_SCU_BASE_ADDR 0x00a00000 | ||
25 | #define MX6Q_SCU_SIZE 0x1000 | ||
26 | #define MX6Q_CCM_BASE_ADDR 0x020c4000 | ||
27 | #define MX6Q_CCM_SIZE 0x4000 | ||
28 | #define MX6Q_ANATOP_BASE_ADDR 0x020c8000 | ||
29 | #define MX6Q_ANATOP_SIZE 0x1000 | ||
30 | |||
31 | #endif /* __MACH_MX6Q_H__ */ | ||
diff --git a/arch/arm/mach-imx/mxc.h b/arch/arm/mach-imx/mxc.h deleted file mode 100644 index d78298366a9..00000000000 --- a/arch/arm/mach-imx/mxc.h +++ /dev/null | |||
@@ -1,179 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007, 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_MXC_H__ | ||
21 | #define __ASM_ARCH_MXC_H__ | ||
22 | |||
23 | #include <linux/types.h> | ||
24 | |||
25 | #ifndef __ASM_ARCH_MXC_HARDWARE_H__ | ||
26 | #error "Do not include directly." | ||
27 | #endif | ||
28 | |||
29 | #define MXC_CPU_MX1 1 | ||
30 | #define MXC_CPU_MX21 21 | ||
31 | #define MXC_CPU_MX25 25 | ||
32 | #define MXC_CPU_MX27 27 | ||
33 | #define MXC_CPU_MX31 31 | ||
34 | #define MXC_CPU_MX35 35 | ||
35 | #define MXC_CPU_MX50 50 | ||
36 | #define MXC_CPU_MX51 51 | ||
37 | #define MXC_CPU_MX53 53 | ||
38 | |||
39 | #define IMX_CHIP_REVISION_1_0 0x10 | ||
40 | #define IMX_CHIP_REVISION_1_1 0x11 | ||
41 | #define IMX_CHIP_REVISION_1_2 0x12 | ||
42 | #define IMX_CHIP_REVISION_1_3 0x13 | ||
43 | #define IMX_CHIP_REVISION_2_0 0x20 | ||
44 | #define IMX_CHIP_REVISION_2_1 0x21 | ||
45 | #define IMX_CHIP_REVISION_2_2 0x22 | ||
46 | #define IMX_CHIP_REVISION_2_3 0x23 | ||
47 | #define IMX_CHIP_REVISION_3_0 0x30 | ||
48 | #define IMX_CHIP_REVISION_3_1 0x31 | ||
49 | #define IMX_CHIP_REVISION_3_2 0x32 | ||
50 | #define IMX_CHIP_REVISION_3_3 0x33 | ||
51 | #define IMX_CHIP_REVISION_UNKNOWN 0xff | ||
52 | |||
53 | #ifndef __ASSEMBLY__ | ||
54 | extern unsigned int __mxc_cpu_type; | ||
55 | #endif | ||
56 | |||
57 | #ifdef CONFIG_SOC_IMX1 | ||
58 | # ifdef mxc_cpu_type | ||
59 | # undef mxc_cpu_type | ||
60 | # define mxc_cpu_type __mxc_cpu_type | ||
61 | # else | ||
62 | # define mxc_cpu_type MXC_CPU_MX1 | ||
63 | # endif | ||
64 | # define cpu_is_mx1() (mxc_cpu_type == MXC_CPU_MX1) | ||
65 | #else | ||
66 | # define cpu_is_mx1() (0) | ||
67 | #endif | ||
68 | |||
69 | #ifdef CONFIG_SOC_IMX21 | ||
70 | # ifdef mxc_cpu_type | ||
71 | # undef mxc_cpu_type | ||
72 | # define mxc_cpu_type __mxc_cpu_type | ||
73 | # else | ||
74 | # define mxc_cpu_type MXC_CPU_MX21 | ||
75 | # endif | ||
76 | # define cpu_is_mx21() (mxc_cpu_type == MXC_CPU_MX21) | ||
77 | #else | ||
78 | # define cpu_is_mx21() (0) | ||
79 | #endif | ||
80 | |||
81 | #ifdef CONFIG_SOC_IMX25 | ||
82 | # ifdef mxc_cpu_type | ||
83 | # undef mxc_cpu_type | ||
84 | # define mxc_cpu_type __mxc_cpu_type | ||
85 | # else | ||
86 | # define mxc_cpu_type MXC_CPU_MX25 | ||
87 | # endif | ||
88 | # define cpu_is_mx25() (mxc_cpu_type == MXC_CPU_MX25) | ||
89 | #else | ||
90 | # define cpu_is_mx25() (0) | ||
91 | #endif | ||
92 | |||
93 | #ifdef CONFIG_SOC_IMX27 | ||
94 | # ifdef mxc_cpu_type | ||
95 | # undef mxc_cpu_type | ||
96 | # define mxc_cpu_type __mxc_cpu_type | ||
97 | # else | ||
98 | # define mxc_cpu_type MXC_CPU_MX27 | ||
99 | # endif | ||
100 | # define cpu_is_mx27() (mxc_cpu_type == MXC_CPU_MX27) | ||
101 | #else | ||
102 | # define cpu_is_mx27() (0) | ||
103 | #endif | ||
104 | |||
105 | #ifdef CONFIG_SOC_IMX31 | ||
106 | # ifdef mxc_cpu_type | ||
107 | # undef mxc_cpu_type | ||
108 | # define mxc_cpu_type __mxc_cpu_type | ||
109 | # else | ||
110 | # define mxc_cpu_type MXC_CPU_MX31 | ||
111 | # endif | ||
112 | # define cpu_is_mx31() (mxc_cpu_type == MXC_CPU_MX31) | ||
113 | #else | ||
114 | # define cpu_is_mx31() (0) | ||
115 | #endif | ||
116 | |||
117 | #ifdef CONFIG_SOC_IMX35 | ||
118 | # ifdef mxc_cpu_type | ||
119 | # undef mxc_cpu_type | ||
120 | # define mxc_cpu_type __mxc_cpu_type | ||
121 | # else | ||
122 | # define mxc_cpu_type MXC_CPU_MX35 | ||
123 | # endif | ||
124 | # define cpu_is_mx35() (mxc_cpu_type == MXC_CPU_MX35) | ||
125 | #else | ||
126 | # define cpu_is_mx35() (0) | ||
127 | #endif | ||
128 | |||
129 | #ifdef CONFIG_SOC_IMX50 | ||
130 | # ifdef mxc_cpu_type | ||
131 | # undef mxc_cpu_type | ||
132 | # define mxc_cpu_type __mxc_cpu_type | ||
133 | # else | ||
134 | # define mxc_cpu_type MXC_CPU_MX50 | ||
135 | # endif | ||
136 | # define cpu_is_mx50() (mxc_cpu_type == MXC_CPU_MX50) | ||
137 | #else | ||
138 | # define cpu_is_mx50() (0) | ||
139 | #endif | ||
140 | |||
141 | #ifdef CONFIG_SOC_IMX51 | ||
142 | # ifdef mxc_cpu_type | ||
143 | # undef mxc_cpu_type | ||
144 | # define mxc_cpu_type __mxc_cpu_type | ||
145 | # else | ||
146 | # define mxc_cpu_type MXC_CPU_MX51 | ||
147 | # endif | ||
148 | # define cpu_is_mx51() (mxc_cpu_type == MXC_CPU_MX51) | ||
149 | #else | ||
150 | # define cpu_is_mx51() (0) | ||
151 | #endif | ||
152 | |||
153 | #ifdef CONFIG_SOC_IMX53 | ||
154 | # ifdef mxc_cpu_type | ||
155 | # undef mxc_cpu_type | ||
156 | # define mxc_cpu_type __mxc_cpu_type | ||
157 | # else | ||
158 | # define mxc_cpu_type MXC_CPU_MX53 | ||
159 | # endif | ||
160 | # define cpu_is_mx53() (mxc_cpu_type == MXC_CPU_MX53) | ||
161 | #else | ||
162 | # define cpu_is_mx53() (0) | ||
163 | #endif | ||
164 | |||
165 | #ifndef __ASSEMBLY__ | ||
166 | |||
167 | struct cpu_op { | ||
168 | u32 cpu_rate; | ||
169 | }; | ||
170 | |||
171 | int tzic_enable_wake(void); | ||
172 | |||
173 | extern struct cpu_op *(*get_cpu_op)(int *op); | ||
174 | #endif | ||
175 | |||
176 | #define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35()) | ||
177 | #define cpu_is_mx2() (cpu_is_mx21() || cpu_is_mx27()) | ||
178 | |||
179 | #endif /* __ASM_ARCH_MXC_H__ */ | ||
diff --git a/arch/arm/mach-imx/pcm037.h b/arch/arm/mach-imx/pcm037.h index 7d167690e17..d6929721a5f 100644 --- a/arch/arm/mach-imx/pcm037.h +++ b/arch/arm/mach-imx/pcm037.h | |||
@@ -8,10 +8,4 @@ enum pcm037_board_variant { | |||
8 | 8 | ||
9 | extern enum pcm037_board_variant pcm037_variant(void); | 9 | extern enum pcm037_board_variant pcm037_variant(void); |
10 | 10 | ||
11 | #ifdef CONFIG_MACH_PCM037_EET | ||
12 | int pcm037_eet_init_devices(void); | ||
13 | #else | ||
14 | static inline int pcm037_eet_init_devices(void) { return 0; } | ||
15 | #endif | ||
16 | |||
17 | #endif | 11 | #endif |
diff --git a/arch/arm/mach-imx/pcm970-baseboard.c b/arch/arm/mach-imx/pcm970-baseboard.c index 51c60823408..99afbc3f43a 100644 --- a/arch/arm/mach-imx/pcm970-baseboard.c +++ b/arch/arm/mach-imx/pcm970-baseboard.c | |||
@@ -23,10 +23,11 @@ | |||
23 | 23 | ||
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | 25 | ||
26 | #include "common.h" | 26 | #include <mach/common.h> |
27 | #include <mach/iomux-mx27.h> | ||
28 | #include <mach/hardware.h> | ||
29 | |||
27 | #include "devices-imx27.h" | 30 | #include "devices-imx27.h" |
28 | #include "hardware.h" | ||
29 | #include "iomux-mx27.h" | ||
30 | 31 | ||
31 | static const int pcm970_pins[] __initconst = { | 32 | static const int pcm970_pins[] __initconst = { |
32 | /* SDHC */ | 33 | /* SDHC */ |
@@ -94,14 +95,14 @@ static int pcm970_sdhc2_init(struct device *dev, irq_handler_t detect_irq, void | |||
94 | { | 95 | { |
95 | int ret; | 96 | int ret; |
96 | 97 | ||
97 | ret = request_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), detect_irq, | 98 | ret = request_irq(IRQ_GPIOC(29), detect_irq, IRQF_TRIGGER_FALLING, |
98 | IRQF_TRIGGER_FALLING, "imx-mmc-detect", data); | 99 | "imx-mmc-detect", data); |
99 | if (ret) | 100 | if (ret) |
100 | return ret; | 101 | return ret; |
101 | 102 | ||
102 | ret = gpio_request(GPIO_PORTC + 28, "imx-mmc-ro"); | 103 | ret = gpio_request(GPIO_PORTC + 28, "imx-mmc-ro"); |
103 | if (ret) { | 104 | if (ret) { |
104 | free_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), data); | 105 | free_irq(IRQ_GPIOC(29), data); |
105 | return ret; | 106 | return ret; |
106 | } | 107 | } |
107 | 108 | ||
@@ -112,7 +113,7 @@ static int pcm970_sdhc2_init(struct device *dev, irq_handler_t detect_irq, void | |||
112 | 113 | ||
113 | static void pcm970_sdhc2_exit(struct device *dev, void *data) | 114 | static void pcm970_sdhc2_exit(struct device *dev, void *data) |
114 | { | 115 | { |
115 | free_irq(gpio_to_irq(IMX_GPIO_NR(3, 29)), data); | 116 | free_irq(IRQ_GPIOC(29), data); |
116 | gpio_free(GPIO_PORTC + 28); | 117 | gpio_free(GPIO_PORTC + 28); |
117 | } | 118 | } |
118 | 119 | ||
@@ -191,7 +192,8 @@ static struct resource pcm970_sja1000_resources[] = { | |||
191 | .end = MX27_CS4_BASE_ADDR + 0x100 - 1, | 192 | .end = MX27_CS4_BASE_ADDR + 0x100 - 1, |
192 | .flags = IORESOURCE_MEM, | 193 | .flags = IORESOURCE_MEM, |
193 | }, { | 194 | }, { |
194 | /* irq number is run-time assigned */ | 195 | .start = IRQ_GPIOE(19), |
196 | .end = IRQ_GPIOE(19), | ||
195 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | 197 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
196 | }, | 198 | }, |
197 | }; | 199 | }; |
@@ -225,7 +227,5 @@ void __init pcm970_baseboard_init(void) | |||
225 | imx27_add_imx_fb(&pcm038_fb_data); | 227 | imx27_add_imx_fb(&pcm038_fb_data); |
226 | mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN); | 228 | mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN); |
227 | imx27_add_mxc_mmc(1, &sdhc_pdata); | 229 | imx27_add_mxc_mmc(1, &sdhc_pdata); |
228 | pcm970_sja1000_resources[1].start = gpio_to_irq(IMX_GPIO_NR(5, 19)); | ||
229 | pcm970_sja1000_resources[1].end = gpio_to_irq(IMX_GPIO_NR(5, 19)); | ||
230 | platform_device_register(&pcm970_sja1000); | 230 | platform_device_register(&pcm970_sja1000); |
231 | } | 231 | } |
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c deleted file mode 100644 index 3777b805b76..00000000000 --- a/arch/arm/mach-imx/platsmp.c +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/smp.h> | ||
15 | #include <asm/page.h> | ||
16 | #include <asm/smp_scu.h> | ||
17 | #include <asm/hardware/gic.h> | ||
18 | #include <asm/mach/map.h> | ||
19 | |||
20 | #include "common.h" | ||
21 | #include "hardware.h" | ||
22 | |||
23 | static void __iomem *scu_base; | ||
24 | |||
25 | static struct map_desc scu_io_desc __initdata = { | ||
26 | /* .virtual and .pfn are run-time assigned */ | ||
27 | .length = SZ_4K, | ||
28 | .type = MT_DEVICE, | ||
29 | }; | ||
30 | |||
31 | void __init imx_scu_map_io(void) | ||
32 | { | ||
33 | unsigned long base; | ||
34 | |||
35 | /* Get SCU base */ | ||
36 | asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (base)); | ||
37 | |||
38 | scu_io_desc.virtual = IMX_IO_P2V(base); | ||
39 | scu_io_desc.pfn = __phys_to_pfn(base); | ||
40 | iotable_init(&scu_io_desc, 1); | ||
41 | |||
42 | scu_base = IMX_IO_ADDRESS(base); | ||
43 | } | ||
44 | |||
45 | static void __cpuinit imx_secondary_init(unsigned int cpu) | ||
46 | { | ||
47 | /* | ||
48 | * if any interrupts are already enabled for the primary | ||
49 | * core (e.g. timer irq), then they will not have been enabled | ||
50 | * for us: do so | ||
51 | */ | ||
52 | gic_secondary_init(0); | ||
53 | } | ||
54 | |||
55 | static int __cpuinit imx_boot_secondary(unsigned int cpu, struct task_struct *idle) | ||
56 | { | ||
57 | imx_set_cpu_jump(cpu, v7_secondary_startup); | ||
58 | imx_enable_cpu(cpu, true); | ||
59 | return 0; | ||
60 | } | ||
61 | |||
62 | /* | ||
63 | * Initialise the CPU possible map early - this describes the CPUs | ||
64 | * which may be present or become present in the system. | ||
65 | */ | ||
66 | static void __init imx_smp_init_cpus(void) | ||
67 | { | ||
68 | int i, ncores; | ||
69 | |||
70 | ncores = scu_get_core_count(scu_base); | ||
71 | |||
72 | for (i = 0; i < ncores; i++) | ||
73 | set_cpu_possible(i, true); | ||
74 | |||
75 | set_smp_cross_call(gic_raise_softirq); | ||
76 | } | ||
77 | |||
78 | void imx_smp_prepare(void) | ||
79 | { | ||
80 | scu_enable(scu_base); | ||
81 | } | ||
82 | |||
83 | static void __init imx_smp_prepare_cpus(unsigned int max_cpus) | ||
84 | { | ||
85 | imx_smp_prepare(); | ||
86 | } | ||
87 | |||
88 | struct smp_operations imx_smp_ops __initdata = { | ||
89 | .smp_init_cpus = imx_smp_init_cpus, | ||
90 | .smp_prepare_cpus = imx_smp_prepare_cpus, | ||
91 | .smp_secondary_init = imx_secondary_init, | ||
92 | .smp_boot_secondary = imx_boot_secondary, | ||
93 | #ifdef CONFIG_HOTPLUG_CPU | ||
94 | .cpu_die = imx_cpu_die, | ||
95 | #endif | ||
96 | }; | ||
diff --git a/arch/arm/mach-imx/pm-imx27.c b/arch/arm/mach-imx/pm-imx27.c index 56d02d064fb..acf17691d2c 100644 --- a/arch/arm/mach-imx/pm-imx27.c +++ b/arch/arm/mach-imx/pm-imx27.c | |||
@@ -10,8 +10,8 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/suspend.h> | 11 | #include <linux/suspend.h> |
12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
13 | 13 | #include <mach/system.h> | |
14 | #include "hardware.h" | 14 | #include <mach/mx27.h> |
15 | 15 | ||
16 | static int mx27_suspend_enter(suspend_state_t state) | 16 | static int mx27_suspend_enter(suspend_state_t state) |
17 | { | 17 | { |
@@ -23,7 +23,7 @@ static int mx27_suspend_enter(suspend_state_t state) | |||
23 | cscr &= 0xFFFFFFFC; | 23 | cscr &= 0xFFFFFFFC; |
24 | __raw_writel(cscr, MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR)); | 24 | __raw_writel(cscr, MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR)); |
25 | /* Executes WFI */ | 25 | /* Executes WFI */ |
26 | cpu_do_idle(); | 26 | arch_idle(); |
27 | break; | 27 | break; |
28 | 28 | ||
29 | default: | 29 | default: |
diff --git a/arch/arm/mach-imx/pm-imx3.c b/arch/arm/mach-imx/pm-imx3.c deleted file mode 100644 index 6a07006ff0f..00000000000 --- a/arch/arm/mach-imx/pm-imx3.c +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
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: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | #include <linux/io.h> | ||
12 | |||
13 | #include "common.h" | ||
14 | #include "crmregs-imx3.h" | ||
15 | #include "devices/devices-common.h" | ||
16 | #include "hardware.h" | ||
17 | |||
18 | /* | ||
19 | * Set cpu low power mode before WFI instruction. This function is called | ||
20 | * mx3 because it can be used for mx31 and mx35. | ||
21 | * Currently only WAIT_MODE is supported. | ||
22 | */ | ||
23 | void mx3_cpu_lp_set(enum mx3_cpu_pwr_mode mode) | ||
24 | { | ||
25 | int reg = __raw_readl(mx3_ccm_base + MXC_CCM_CCMR); | ||
26 | reg &= ~MXC_CCM_CCMR_LPM_MASK; | ||
27 | |||
28 | switch (mode) { | ||
29 | case MX3_WAIT: | ||
30 | if (cpu_is_mx35()) | ||
31 | reg |= MXC_CCM_CCMR_LPM_WAIT_MX35; | ||
32 | __raw_writel(reg, mx3_ccm_base + MXC_CCM_CCMR); | ||
33 | break; | ||
34 | default: | ||
35 | pr_err("Unknown cpu power mode: %d\n", mode); | ||
36 | return; | ||
37 | } | ||
38 | } | ||
diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c deleted file mode 100644 index 2e063c2deb9..00000000000 --- a/arch/arm/mach-imx/pm-imx5.c +++ /dev/null | |||
@@ -1,213 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
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: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | #include <linux/suspend.h> | ||
12 | #include <linux/clk.h> | ||
13 | #include <linux/io.h> | ||
14 | #include <linux/err.h> | ||
15 | #include <linux/export.h> | ||
16 | #include <asm/cacheflush.h> | ||
17 | #include <asm/system_misc.h> | ||
18 | #include <asm/tlbflush.h> | ||
19 | |||
20 | #include "common.h" | ||
21 | #include "cpuidle.h" | ||
22 | #include "crm-regs-imx5.h" | ||
23 | #include "hardware.h" | ||
24 | |||
25 | /* | ||
26 | * The WAIT_UNCLOCKED_POWER_OFF state only requires <= 500ns to exit. | ||
27 | * This is also the lowest power state possible without affecting | ||
28 | * non-cpu parts of the system. For these reasons, imx5 should default | ||
29 | * to always using this state for cpu idling. The PM_SUSPEND_STANDBY also | ||
30 | * uses this state and needs to take no action when registers remain confgiured | ||
31 | * for this state. | ||
32 | */ | ||
33 | #define IMX5_DEFAULT_CPU_IDLE_STATE WAIT_UNCLOCKED_POWER_OFF | ||
34 | |||
35 | /* | ||
36 | * set cpu low power mode before WFI instruction. This function is called | ||
37 | * mx5 because it can be used for mx50, mx51, and mx53. | ||
38 | */ | ||
39 | static void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode) | ||
40 | { | ||
41 | u32 plat_lpc, arm_srpgcr, ccm_clpcr; | ||
42 | u32 empgc0, empgc1; | ||
43 | int stop_mode = 0; | ||
44 | |||
45 | /* always allow platform to issue a deep sleep mode request */ | ||
46 | plat_lpc = __raw_readl(MXC_CORTEXA8_PLAT_LPC) & | ||
47 | ~(MXC_CORTEXA8_PLAT_LPC_DSM); | ||
48 | ccm_clpcr = __raw_readl(MXC_CCM_CLPCR) & ~(MXC_CCM_CLPCR_LPM_MASK); | ||
49 | arm_srpgcr = __raw_readl(MXC_SRPG_ARM_SRPGCR) & ~(MXC_SRPGCR_PCR); | ||
50 | empgc0 = __raw_readl(MXC_SRPG_EMPGC0_SRPGCR) & ~(MXC_SRPGCR_PCR); | ||
51 | empgc1 = __raw_readl(MXC_SRPG_EMPGC1_SRPGCR) & ~(MXC_SRPGCR_PCR); | ||
52 | |||
53 | switch (mode) { | ||
54 | case WAIT_CLOCKED: | ||
55 | break; | ||
56 | case WAIT_UNCLOCKED: | ||
57 | ccm_clpcr |= 0x1 << MXC_CCM_CLPCR_LPM_OFFSET; | ||
58 | break; | ||
59 | case WAIT_UNCLOCKED_POWER_OFF: | ||
60 | case STOP_POWER_OFF: | ||
61 | plat_lpc |= MXC_CORTEXA8_PLAT_LPC_DSM | ||
62 | | MXC_CORTEXA8_PLAT_LPC_DBG_DSM; | ||
63 | if (mode == WAIT_UNCLOCKED_POWER_OFF) { | ||
64 | ccm_clpcr |= 0x1 << MXC_CCM_CLPCR_LPM_OFFSET; | ||
65 | ccm_clpcr &= ~MXC_CCM_CLPCR_VSTBY; | ||
66 | ccm_clpcr &= ~MXC_CCM_CLPCR_SBYOS; | ||
67 | stop_mode = 0; | ||
68 | } else { | ||
69 | ccm_clpcr |= 0x2 << MXC_CCM_CLPCR_LPM_OFFSET; | ||
70 | ccm_clpcr |= 0x3 << MXC_CCM_CLPCR_STBY_COUNT_OFFSET; | ||
71 | ccm_clpcr |= MXC_CCM_CLPCR_VSTBY; | ||
72 | ccm_clpcr |= MXC_CCM_CLPCR_SBYOS; | ||
73 | stop_mode = 1; | ||
74 | } | ||
75 | arm_srpgcr |= MXC_SRPGCR_PCR; | ||
76 | break; | ||
77 | case STOP_POWER_ON: | ||
78 | ccm_clpcr |= 0x2 << MXC_CCM_CLPCR_LPM_OFFSET; | ||
79 | break; | ||
80 | default: | ||
81 | printk(KERN_WARNING "UNKNOWN cpu power mode: %d\n", mode); | ||
82 | return; | ||
83 | } | ||
84 | |||
85 | __raw_writel(plat_lpc, MXC_CORTEXA8_PLAT_LPC); | ||
86 | __raw_writel(ccm_clpcr, MXC_CCM_CLPCR); | ||
87 | __raw_writel(arm_srpgcr, MXC_SRPG_ARM_SRPGCR); | ||
88 | |||
89 | /* Enable NEON SRPG for all but MX50TO1.0. */ | ||
90 | if (mx50_revision() != IMX_CHIP_REVISION_1_0) | ||
91 | __raw_writel(arm_srpgcr, MXC_SRPG_NEON_SRPGCR); | ||
92 | |||
93 | if (stop_mode) { | ||
94 | empgc0 |= MXC_SRPGCR_PCR; | ||
95 | empgc1 |= MXC_SRPGCR_PCR; | ||
96 | |||
97 | __raw_writel(empgc0, MXC_SRPG_EMPGC0_SRPGCR); | ||
98 | __raw_writel(empgc1, MXC_SRPG_EMPGC1_SRPGCR); | ||
99 | } | ||
100 | } | ||
101 | |||
102 | static int mx5_suspend_enter(suspend_state_t state) | ||
103 | { | ||
104 | switch (state) { | ||
105 | case PM_SUSPEND_MEM: | ||
106 | mx5_cpu_lp_set(STOP_POWER_OFF); | ||
107 | break; | ||
108 | case PM_SUSPEND_STANDBY: | ||
109 | /* DEFAULT_IDLE_STATE already configured */ | ||
110 | break; | ||
111 | default: | ||
112 | return -EINVAL; | ||
113 | } | ||
114 | |||
115 | if (state == PM_SUSPEND_MEM) { | ||
116 | local_flush_tlb_all(); | ||
117 | flush_cache_all(); | ||
118 | |||
119 | /*clear the EMPGC0/1 bits */ | ||
120 | __raw_writel(0, MXC_SRPG_EMPGC0_SRPGCR); | ||
121 | __raw_writel(0, MXC_SRPG_EMPGC1_SRPGCR); | ||
122 | } | ||
123 | cpu_do_idle(); | ||
124 | |||
125 | /* return registers to default idle state */ | ||
126 | mx5_cpu_lp_set(IMX5_DEFAULT_CPU_IDLE_STATE); | ||
127 | return 0; | ||
128 | } | ||
129 | |||
130 | static int mx5_pm_valid(suspend_state_t state) | ||
131 | { | ||
132 | return (state > PM_SUSPEND_ON && state <= PM_SUSPEND_MAX); | ||
133 | } | ||
134 | |||
135 | static const struct platform_suspend_ops mx5_suspend_ops = { | ||
136 | .valid = mx5_pm_valid, | ||
137 | .enter = mx5_suspend_enter, | ||
138 | }; | ||
139 | |||
140 | static inline int imx5_cpu_do_idle(void) | ||
141 | { | ||
142 | int ret = tzic_enable_wake(); | ||
143 | |||
144 | if (likely(!ret)) | ||
145 | cpu_do_idle(); | ||
146 | |||
147 | return ret; | ||
148 | } | ||
149 | |||
150 | static void imx5_pm_idle(void) | ||
151 | { | ||
152 | imx5_cpu_do_idle(); | ||
153 | } | ||
154 | |||
155 | static int imx5_cpuidle_enter(struct cpuidle_device *dev, | ||
156 | struct cpuidle_driver *drv, int idx) | ||
157 | { | ||
158 | int ret; | ||
159 | |||
160 | ret = imx5_cpu_do_idle(); | ||
161 | if (ret < 0) | ||
162 | return ret; | ||
163 | |||
164 | return idx; | ||
165 | } | ||
166 | |||
167 | static struct cpuidle_driver imx5_cpuidle_driver = { | ||
168 | .name = "imx5_cpuidle", | ||
169 | .owner = THIS_MODULE, | ||
170 | .en_core_tk_irqen = 1, | ||
171 | .states[0] = { | ||
172 | .enter = imx5_cpuidle_enter, | ||
173 | .exit_latency = 2, | ||
174 | .target_residency = 1, | ||
175 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
176 | .name = "IMX5 SRPG", | ||
177 | .desc = "CPU state retained,powered off", | ||
178 | }, | ||
179 | .state_count = 1, | ||
180 | }; | ||
181 | |||
182 | static int __init imx5_pm_common_init(void) | ||
183 | { | ||
184 | int ret; | ||
185 | struct clk *gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs"); | ||
186 | |||
187 | if (IS_ERR(gpc_dvfs_clk)) | ||
188 | return PTR_ERR(gpc_dvfs_clk); | ||
189 | |||
190 | ret = clk_prepare_enable(gpc_dvfs_clk); | ||
191 | if (ret) | ||
192 | return ret; | ||
193 | |||
194 | arm_pm_idle = imx5_pm_idle; | ||
195 | |||
196 | /* Set the registers to the default cpu idle state. */ | ||
197 | mx5_cpu_lp_set(IMX5_DEFAULT_CPU_IDLE_STATE); | ||
198 | |||
199 | imx_cpuidle_init(&imx5_cpuidle_driver); | ||
200 | return 0; | ||
201 | } | ||
202 | |||
203 | void __init imx51_pm_init(void) | ||
204 | { | ||
205 | int ret = imx5_pm_common_init(); | ||
206 | if (!ret) | ||
207 | suspend_set_ops(&mx5_suspend_ops); | ||
208 | } | ||
209 | |||
210 | void __init imx53_pm_init(void) | ||
211 | { | ||
212 | imx5_pm_common_init(); | ||
213 | } | ||
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c deleted file mode 100644 index a17543da602..00000000000 --- a/arch/arm/mach-imx/pm-imx6q.c +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/of.h> | ||
16 | #include <linux/suspend.h> | ||
17 | #include <asm/cacheflush.h> | ||
18 | #include <asm/proc-fns.h> | ||
19 | #include <asm/suspend.h> | ||
20 | #include <asm/hardware/cache-l2x0.h> | ||
21 | |||
22 | #include "common.h" | ||
23 | #include "hardware.h" | ||
24 | |||
25 | extern unsigned long phys_l2x0_saved_regs; | ||
26 | |||
27 | static int imx6q_suspend_finish(unsigned long val) | ||
28 | { | ||
29 | cpu_do_idle(); | ||
30 | return 0; | ||
31 | } | ||
32 | |||
33 | static int imx6q_pm_enter(suspend_state_t state) | ||
34 | { | ||
35 | switch (state) { | ||
36 | case PM_SUSPEND_MEM: | ||
37 | imx6q_set_lpm(STOP_POWER_OFF); | ||
38 | imx_gpc_pre_suspend(); | ||
39 | imx_set_cpu_jump(0, v7_cpu_resume); | ||
40 | /* Zzz ... */ | ||
41 | cpu_suspend(0, imx6q_suspend_finish); | ||
42 | imx_smp_prepare(); | ||
43 | imx_gpc_post_resume(); | ||
44 | break; | ||
45 | default: | ||
46 | return -EINVAL; | ||
47 | } | ||
48 | |||
49 | return 0; | ||
50 | } | ||
51 | |||
52 | static const struct platform_suspend_ops imx6q_pm_ops = { | ||
53 | .enter = imx6q_pm_enter, | ||
54 | .valid = suspend_valid_only_mem, | ||
55 | }; | ||
56 | |||
57 | void __init imx6q_pm_init(void) | ||
58 | { | ||
59 | /* | ||
60 | * The l2x0 core code provides an infrastucture to save and restore | ||
61 | * l2x0 registers across suspend/resume cycle. But because imx6q | ||
62 | * retains L2 content during suspend and needs to resume L2 before | ||
63 | * MMU is enabled, it can only utilize register saving support and | ||
64 | * have to take care of restoring on its own. So we save physical | ||
65 | * address of the data structure used by l2x0 core to save registers, | ||
66 | * and later restore the necessary ones in imx6q resume entry. | ||
67 | */ | ||
68 | #ifdef CONFIG_CACHE_L2X0 | ||
69 | phys_l2x0_saved_regs = __pa(&l2x0_saved_regs); | ||
70 | #endif | ||
71 | |||
72 | suspend_set_ops(&imx6q_pm_ops); | ||
73 | } | ||
diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c deleted file mode 100644 index e15f1555c59..00000000000 --- a/arch/arm/mach-imx/src.c +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/of.h> | ||
16 | #include <linux/of_address.h> | ||
17 | #include <linux/smp.h> | ||
18 | #include <asm/smp_plat.h> | ||
19 | |||
20 | #define SRC_SCR 0x000 | ||
21 | #define SRC_GPR1 0x020 | ||
22 | #define BP_SRC_SCR_WARM_RESET_ENABLE 0 | ||
23 | #define BP_SRC_SCR_CORE1_RST 14 | ||
24 | #define BP_SRC_SCR_CORE1_ENABLE 22 | ||
25 | |||
26 | static void __iomem *src_base; | ||
27 | |||
28 | void imx_enable_cpu(int cpu, bool enable) | ||
29 | { | ||
30 | u32 mask, val; | ||
31 | |||
32 | cpu = cpu_logical_map(cpu); | ||
33 | mask = 1 << (BP_SRC_SCR_CORE1_ENABLE + cpu - 1); | ||
34 | val = readl_relaxed(src_base + SRC_SCR); | ||
35 | val = enable ? val | mask : val & ~mask; | ||
36 | writel_relaxed(val, src_base + SRC_SCR); | ||
37 | } | ||
38 | |||
39 | void imx_set_cpu_jump(int cpu, void *jump_addr) | ||
40 | { | ||
41 | cpu = cpu_logical_map(cpu); | ||
42 | writel_relaxed(virt_to_phys(jump_addr), | ||
43 | src_base + SRC_GPR1 + cpu * 8); | ||
44 | } | ||
45 | |||
46 | void imx_src_prepare_restart(void) | ||
47 | { | ||
48 | u32 val; | ||
49 | |||
50 | /* clear enable bits of secondary cores */ | ||
51 | val = readl_relaxed(src_base + SRC_SCR); | ||
52 | val &= ~(0x7 << BP_SRC_SCR_CORE1_ENABLE); | ||
53 | writel_relaxed(val, src_base + SRC_SCR); | ||
54 | |||
55 | /* clear persistent entry register of primary core */ | ||
56 | writel_relaxed(0, src_base + SRC_GPR1); | ||
57 | } | ||
58 | |||
59 | void __init imx_src_init(void) | ||
60 | { | ||
61 | struct device_node *np; | ||
62 | u32 val; | ||
63 | |||
64 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-src"); | ||
65 | src_base = of_iomap(np, 0); | ||
66 | WARN_ON(!src_base); | ||
67 | |||
68 | /* | ||
69 | * force warm reset sources to generate cold reset | ||
70 | * for a more reliable restart | ||
71 | */ | ||
72 | val = readl_relaxed(src_base + SRC_SCR); | ||
73 | val &= ~(1 << BP_SRC_SCR_WARM_RESET_ENABLE); | ||
74 | writel_relaxed(val, src_base + SRC_SCR); | ||
75 | } | ||
diff --git a/arch/arm/mach-imx/ssi-fiq-ksym.c b/arch/arm/mach-imx/ssi-fiq-ksym.c deleted file mode 100644 index 792090f9a03..00000000000 --- a/arch/arm/mach-imx/ssi-fiq-ksym.c +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * Exported ksyms for the SSI FIQ handler | ||
3 | * | ||
4 | * Copyright (C) 2009, Sascha Hauer <s.hauer@pengutronix.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/module.h> | ||
12 | |||
13 | #include <linux/platform_data/asoc-imx-ssi.h> | ||
14 | |||
15 | EXPORT_SYMBOL(imx_ssi_fiq_tx_buffer); | ||
16 | EXPORT_SYMBOL(imx_ssi_fiq_rx_buffer); | ||
17 | EXPORT_SYMBOL(imx_ssi_fiq_start); | ||
18 | EXPORT_SYMBOL(imx_ssi_fiq_end); | ||
19 | EXPORT_SYMBOL(imx_ssi_fiq_base); | ||
20 | |||
diff --git a/arch/arm/mach-imx/ssi-fiq.S b/arch/arm/mach-imx/ssi-fiq.S deleted file mode 100644 index a8b93c5f29b..00000000000 --- a/arch/arm/mach-imx/ssi-fiq.S +++ /dev/null | |||
@@ -1,147 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Sascha Hauer <s.hauer@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #include <linux/linkage.h> | ||
10 | #include <asm/assembler.h> | ||
11 | |||
12 | /* | ||
13 | * r8 = bit 0-15: tx offset, bit 16-31: tx buffer size | ||
14 | * r9 = bit 0-15: rx offset, bit 16-31: rx buffer size | ||
15 | */ | ||
16 | |||
17 | #define SSI_STX0 0x00 | ||
18 | #define SSI_SRX0 0x08 | ||
19 | #define SSI_SISR 0x14 | ||
20 | #define SSI_SIER 0x18 | ||
21 | #define SSI_SACNT 0x38 | ||
22 | |||
23 | #define SSI_SACNT_AC97EN (1 << 0) | ||
24 | |||
25 | #define SSI_SIER_TFE0_EN (1 << 0) | ||
26 | #define SSI_SISR_TFE0 (1 << 0) | ||
27 | #define SSI_SISR_RFF0 (1 << 2) | ||
28 | #define SSI_SIER_RFF0_EN (1 << 2) | ||
29 | |||
30 | .text | ||
31 | .global imx_ssi_fiq_start | ||
32 | .global imx_ssi_fiq_end | ||
33 | .global imx_ssi_fiq_base | ||
34 | .global imx_ssi_fiq_rx_buffer | ||
35 | .global imx_ssi_fiq_tx_buffer | ||
36 | |||
37 | /* | ||
38 | * imx_ssi_fiq_start is _intentionally_ not marked as a function symbol | ||
39 | * using ENDPROC(). imx_ssi_fiq_start and imx_ssi_fiq_end are used to | ||
40 | * mark the function body so that it can be copied to the FIQ vector in | ||
41 | * the vectors page. imx_ssi_fiq_start should only be called as the result | ||
42 | * of an FIQ: calling it directly will not work. | ||
43 | */ | ||
44 | imx_ssi_fiq_start: | ||
45 | ldr r12, .L_imx_ssi_fiq_base | ||
46 | |||
47 | /* TX */ | ||
48 | ldr r13, .L_imx_ssi_fiq_tx_buffer | ||
49 | |||
50 | /* shall we send? */ | ||
51 | ldr r11, [r12, #SSI_SIER] | ||
52 | tst r11, #SSI_SIER_TFE0_EN | ||
53 | beq 1f | ||
54 | |||
55 | /* TX FIFO empty? */ | ||
56 | ldr r11, [r12, #SSI_SISR] | ||
57 | tst r11, #SSI_SISR_TFE0 | ||
58 | beq 1f | ||
59 | |||
60 | mov r10, #0x10000 | ||
61 | sub r10, #1 | ||
62 | and r10, r10, r8 /* r10: current buffer offset */ | ||
63 | |||
64 | add r13, r13, r10 | ||
65 | |||
66 | ldrh r11, [r13] | ||
67 | strh r11, [r12, #SSI_STX0] | ||
68 | |||
69 | ldrh r11, [r13, #2] | ||
70 | strh r11, [r12, #SSI_STX0] | ||
71 | |||
72 | ldrh r11, [r13, #4] | ||
73 | strh r11, [r12, #SSI_STX0] | ||
74 | |||
75 | ldrh r11, [r13, #6] | ||
76 | strh r11, [r12, #SSI_STX0] | ||
77 | |||
78 | add r10, #8 | ||
79 | lsr r11, r8, #16 /* r11: buffer size */ | ||
80 | cmp r10, r11 | ||
81 | lslgt r8, r11, #16 | ||
82 | addle r8, #8 | ||
83 | 1: | ||
84 | /* RX */ | ||
85 | |||
86 | /* shall we receive? */ | ||
87 | ldr r11, [r12, #SSI_SIER] | ||
88 | tst r11, #SSI_SIER_RFF0_EN | ||
89 | beq 1f | ||
90 | |||
91 | /* RX FIFO full? */ | ||
92 | ldr r11, [r12, #SSI_SISR] | ||
93 | tst r11, #SSI_SISR_RFF0 | ||
94 | beq 1f | ||
95 | |||
96 | ldr r13, .L_imx_ssi_fiq_rx_buffer | ||
97 | |||
98 | mov r10, #0x10000 | ||
99 | sub r10, #1 | ||
100 | and r10, r10, r9 /* r10: current buffer offset */ | ||
101 | |||
102 | add r13, r13, r10 | ||
103 | |||
104 | ldr r11, [r12, #SSI_SACNT] | ||
105 | tst r11, #SSI_SACNT_AC97EN | ||
106 | |||
107 | ldr r11, [r12, #SSI_SRX0] | ||
108 | strh r11, [r13] | ||
109 | |||
110 | ldr r11, [r12, #SSI_SRX0] | ||
111 | strh r11, [r13, #2] | ||
112 | |||
113 | /* dummy read to skip slot 12 */ | ||
114 | ldrne r11, [r12, #SSI_SRX0] | ||
115 | |||
116 | ldr r11, [r12, #SSI_SRX0] | ||
117 | strh r11, [r13, #4] | ||
118 | |||
119 | ldr r11, [r12, #SSI_SRX0] | ||
120 | strh r11, [r13, #6] | ||
121 | |||
122 | /* dummy read to skip slot 12 */ | ||
123 | ldrne r11, [r12, #SSI_SRX0] | ||
124 | |||
125 | add r10, #8 | ||
126 | lsr r11, r9, #16 /* r11: buffer size */ | ||
127 | cmp r10, r11 | ||
128 | lslgt r9, r11, #16 | ||
129 | addle r9, #8 | ||
130 | |||
131 | 1: | ||
132 | @ return from FIQ | ||
133 | subs pc, lr, #4 | ||
134 | |||
135 | .align | ||
136 | .L_imx_ssi_fiq_base: | ||
137 | imx_ssi_fiq_base: | ||
138 | .word 0x0 | ||
139 | .L_imx_ssi_fiq_rx_buffer: | ||
140 | imx_ssi_fiq_rx_buffer: | ||
141 | .word 0x0 | ||
142 | .L_imx_ssi_fiq_tx_buffer: | ||
143 | imx_ssi_fiq_tx_buffer: | ||
144 | .word 0x0 | ||
145 | .L_imx_ssi_fiq_end: | ||
146 | imx_ssi_fiq_end: | ||
147 | |||
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c deleted file mode 100644 index 695e0d73bf8..00000000000 --- a/arch/arm/mach-imx/system.c +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999 ARM Limited | ||
3 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
4 | * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
5 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de | ||
6 | * Copyright 2009 Ilya Yanok, Emcraft Systems Ltd, yanok@emcraft.com | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/clk.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/err.h> | ||
23 | #include <linux/delay.h> | ||
24 | |||
25 | #include <asm/system_misc.h> | ||
26 | #include <asm/proc-fns.h> | ||
27 | #include <asm/mach-types.h> | ||
28 | |||
29 | #include "common.h" | ||
30 | #include "hardware.h" | ||
31 | |||
32 | static void __iomem *wdog_base; | ||
33 | |||
34 | /* | ||
35 | * Reset the system. It is called by machine_restart(). | ||
36 | */ | ||
37 | void mxc_restart(char mode, const char *cmd) | ||
38 | { | ||
39 | unsigned int wcr_enable; | ||
40 | |||
41 | if (cpu_is_mx1()) { | ||
42 | wcr_enable = (1 << 0); | ||
43 | } else { | ||
44 | struct clk *clk; | ||
45 | |||
46 | clk = clk_get_sys("imx2-wdt.0", NULL); | ||
47 | if (!IS_ERR(clk)) | ||
48 | clk_prepare_enable(clk); | ||
49 | wcr_enable = (1 << 2); | ||
50 | } | ||
51 | |||
52 | /* Assert SRS signal */ | ||
53 | __raw_writew(wcr_enable, wdog_base); | ||
54 | |||
55 | /* wait for reset to assert... */ | ||
56 | mdelay(500); | ||
57 | |||
58 | printk(KERN_ERR "Watchdog reset failed to assert reset\n"); | ||
59 | |||
60 | /* delay to allow the serial port to show the message */ | ||
61 | mdelay(50); | ||
62 | |||
63 | /* we'll take a jump through zero as a poor second */ | ||
64 | soft_restart(0); | ||
65 | } | ||
66 | |||
67 | void mxc_arch_reset_init(void __iomem *base) | ||
68 | { | ||
69 | wdog_base = base; | ||
70 | } | ||
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c deleted file mode 100644 index f017302f6d0..00000000000 --- a/arch/arm/mach-imx/time.c +++ /dev/null | |||
@@ -1,326 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/plat-mxc/time.c | ||
3 | * | ||
4 | * Copyright (C) 2000-2001 Deep Blue Solutions | ||
5 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
6 | * Copyright (C) 2006-2007 Pavel Pisa (ppisa@pikron.com) | ||
7 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version 2 | ||
12 | * of the License, or (at your option) any later version. | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
21 | * MA 02110-1301, USA. | ||
22 | */ | ||
23 | |||
24 | #include <linux/interrupt.h> | ||
25 | #include <linux/irq.h> | ||
26 | #include <linux/clockchips.h> | ||
27 | #include <linux/clk.h> | ||
28 | #include <linux/err.h> | ||
29 | |||
30 | #include <asm/sched_clock.h> | ||
31 | #include <asm/mach/time.h> | ||
32 | |||
33 | #include "common.h" | ||
34 | #include "hardware.h" | ||
35 | |||
36 | /* | ||
37 | * There are 2 versions of the timer hardware on Freescale MXC hardware. | ||
38 | * Version 1: MX1/MXL, MX21, MX27. | ||
39 | * Version 2: MX25, MX31, MX35, MX37, MX51 | ||
40 | */ | ||
41 | |||
42 | /* defines common for all i.MX */ | ||
43 | #define MXC_TCTL 0x00 | ||
44 | #define MXC_TCTL_TEN (1 << 0) /* Enable module */ | ||
45 | #define MXC_TPRER 0x04 | ||
46 | |||
47 | /* MX1, MX21, MX27 */ | ||
48 | #define MX1_2_TCTL_CLK_PCLK1 (1 << 1) | ||
49 | #define MX1_2_TCTL_IRQEN (1 << 4) | ||
50 | #define MX1_2_TCTL_FRR (1 << 8) | ||
51 | #define MX1_2_TCMP 0x08 | ||
52 | #define MX1_2_TCN 0x10 | ||
53 | #define MX1_2_TSTAT 0x14 | ||
54 | |||
55 | /* MX21, MX27 */ | ||
56 | #define MX2_TSTAT_CAPT (1 << 1) | ||
57 | #define MX2_TSTAT_COMP (1 << 0) | ||
58 | |||
59 | /* MX31, MX35, MX25, MX5 */ | ||
60 | #define V2_TCTL_WAITEN (1 << 3) /* Wait enable mode */ | ||
61 | #define V2_TCTL_CLK_IPG (1 << 6) | ||
62 | #define V2_TCTL_CLK_PER (2 << 6) | ||
63 | #define V2_TCTL_FRR (1 << 9) | ||
64 | #define V2_IR 0x0c | ||
65 | #define V2_TSTAT 0x08 | ||
66 | #define V2_TSTAT_OF1 (1 << 0) | ||
67 | #define V2_TCN 0x24 | ||
68 | #define V2_TCMP 0x10 | ||
69 | |||
70 | #define timer_is_v1() (cpu_is_mx1() || cpu_is_mx21() || cpu_is_mx27()) | ||
71 | #define timer_is_v2() (!timer_is_v1()) | ||
72 | |||
73 | static struct clock_event_device clockevent_mxc; | ||
74 | static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; | ||
75 | |||
76 | static void __iomem *timer_base; | ||
77 | |||
78 | static inline void gpt_irq_disable(void) | ||
79 | { | ||
80 | unsigned int tmp; | ||
81 | |||
82 | if (timer_is_v2()) | ||
83 | __raw_writel(0, timer_base + V2_IR); | ||
84 | else { | ||
85 | tmp = __raw_readl(timer_base + MXC_TCTL); | ||
86 | __raw_writel(tmp & ~MX1_2_TCTL_IRQEN, timer_base + MXC_TCTL); | ||
87 | } | ||
88 | } | ||
89 | |||
90 | static inline void gpt_irq_enable(void) | ||
91 | { | ||
92 | if (timer_is_v2()) | ||
93 | __raw_writel(1<<0, timer_base + V2_IR); | ||
94 | else { | ||
95 | __raw_writel(__raw_readl(timer_base + MXC_TCTL) | MX1_2_TCTL_IRQEN, | ||
96 | timer_base + MXC_TCTL); | ||
97 | } | ||
98 | } | ||
99 | |||
100 | static void gpt_irq_acknowledge(void) | ||
101 | { | ||
102 | if (timer_is_v1()) { | ||
103 | if (cpu_is_mx1()) | ||
104 | __raw_writel(0, timer_base + MX1_2_TSTAT); | ||
105 | else | ||
106 | __raw_writel(MX2_TSTAT_CAPT | MX2_TSTAT_COMP, | ||
107 | timer_base + MX1_2_TSTAT); | ||
108 | } else if (timer_is_v2()) | ||
109 | __raw_writel(V2_TSTAT_OF1, timer_base + V2_TSTAT); | ||
110 | } | ||
111 | |||
112 | static void __iomem *sched_clock_reg; | ||
113 | |||
114 | static u32 notrace mxc_read_sched_clock(void) | ||
115 | { | ||
116 | return sched_clock_reg ? __raw_readl(sched_clock_reg) : 0; | ||
117 | } | ||
118 | |||
119 | static int __init mxc_clocksource_init(struct clk *timer_clk) | ||
120 | { | ||
121 | unsigned int c = clk_get_rate(timer_clk); | ||
122 | void __iomem *reg = timer_base + (timer_is_v2() ? V2_TCN : MX1_2_TCN); | ||
123 | |||
124 | sched_clock_reg = reg; | ||
125 | |||
126 | setup_sched_clock(mxc_read_sched_clock, 32, c); | ||
127 | return clocksource_mmio_init(reg, "mxc_timer1", c, 200, 32, | ||
128 | clocksource_mmio_readl_up); | ||
129 | } | ||
130 | |||
131 | /* clock event */ | ||
132 | |||
133 | static int mx1_2_set_next_event(unsigned long evt, | ||
134 | struct clock_event_device *unused) | ||
135 | { | ||
136 | unsigned long tcmp; | ||
137 | |||
138 | tcmp = __raw_readl(timer_base + MX1_2_TCN) + evt; | ||
139 | |||
140 | __raw_writel(tcmp, timer_base + MX1_2_TCMP); | ||
141 | |||
142 | return (int)(tcmp - __raw_readl(timer_base + MX1_2_TCN)) < 0 ? | ||
143 | -ETIME : 0; | ||
144 | } | ||
145 | |||
146 | static int v2_set_next_event(unsigned long evt, | ||
147 | struct clock_event_device *unused) | ||
148 | { | ||
149 | unsigned long tcmp; | ||
150 | |||
151 | tcmp = __raw_readl(timer_base + V2_TCN) + evt; | ||
152 | |||
153 | __raw_writel(tcmp, timer_base + V2_TCMP); | ||
154 | |||
155 | return (int)(tcmp - __raw_readl(timer_base + V2_TCN)) < 0 ? | ||
156 | -ETIME : 0; | ||
157 | } | ||
158 | |||
159 | #ifdef DEBUG | ||
160 | static const char *clock_event_mode_label[] = { | ||
161 | [CLOCK_EVT_MODE_PERIODIC] = "CLOCK_EVT_MODE_PERIODIC", | ||
162 | [CLOCK_EVT_MODE_ONESHOT] = "CLOCK_EVT_MODE_ONESHOT", | ||
163 | [CLOCK_EVT_MODE_SHUTDOWN] = "CLOCK_EVT_MODE_SHUTDOWN", | ||
164 | [CLOCK_EVT_MODE_UNUSED] = "CLOCK_EVT_MODE_UNUSED", | ||
165 | [CLOCK_EVT_MODE_RESUME] = "CLOCK_EVT_MODE_RESUME", | ||
166 | }; | ||
167 | #endif /* DEBUG */ | ||
168 | |||
169 | static void mxc_set_mode(enum clock_event_mode mode, | ||
170 | struct clock_event_device *evt) | ||
171 | { | ||
172 | unsigned long flags; | ||
173 | |||
174 | /* | ||
175 | * The timer interrupt generation is disabled at least | ||
176 | * for enough time to call mxc_set_next_event() | ||
177 | */ | ||
178 | local_irq_save(flags); | ||
179 | |||
180 | /* Disable interrupt in GPT module */ | ||
181 | gpt_irq_disable(); | ||
182 | |||
183 | if (mode != clockevent_mode) { | ||
184 | /* Set event time into far-far future */ | ||
185 | if (timer_is_v2()) | ||
186 | __raw_writel(__raw_readl(timer_base + V2_TCN) - 3, | ||
187 | timer_base + V2_TCMP); | ||
188 | else | ||
189 | __raw_writel(__raw_readl(timer_base + MX1_2_TCN) - 3, | ||
190 | timer_base + MX1_2_TCMP); | ||
191 | |||
192 | /* Clear pending interrupt */ | ||
193 | gpt_irq_acknowledge(); | ||
194 | } | ||
195 | |||
196 | #ifdef DEBUG | ||
197 | printk(KERN_INFO "mxc_set_mode: changing mode from %s to %s\n", | ||
198 | clock_event_mode_label[clockevent_mode], | ||
199 | clock_event_mode_label[mode]); | ||
200 | #endif /* DEBUG */ | ||
201 | |||
202 | /* Remember timer mode */ | ||
203 | clockevent_mode = mode; | ||
204 | local_irq_restore(flags); | ||
205 | |||
206 | switch (mode) { | ||
207 | case CLOCK_EVT_MODE_PERIODIC: | ||
208 | printk(KERN_ERR"mxc_set_mode: Periodic mode is not " | ||
209 | "supported for i.MX\n"); | ||
210 | break; | ||
211 | case CLOCK_EVT_MODE_ONESHOT: | ||
212 | /* | ||
213 | * Do not put overhead of interrupt enable/disable into | ||
214 | * mxc_set_next_event(), the core has about 4 minutes | ||
215 | * to call mxc_set_next_event() or shutdown clock after | ||
216 | * mode switching | ||
217 | */ | ||
218 | local_irq_save(flags); | ||
219 | gpt_irq_enable(); | ||
220 | local_irq_restore(flags); | ||
221 | break; | ||
222 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
223 | case CLOCK_EVT_MODE_UNUSED: | ||
224 | case CLOCK_EVT_MODE_RESUME: | ||
225 | /* Left event sources disabled, no more interrupts appear */ | ||
226 | break; | ||
227 | } | ||
228 | } | ||
229 | |||
230 | /* | ||
231 | * IRQ handler for the timer | ||
232 | */ | ||
233 | static irqreturn_t mxc_timer_interrupt(int irq, void *dev_id) | ||
234 | { | ||
235 | struct clock_event_device *evt = &clockevent_mxc; | ||
236 | uint32_t tstat; | ||
237 | |||
238 | if (timer_is_v2()) | ||
239 | tstat = __raw_readl(timer_base + V2_TSTAT); | ||
240 | else | ||
241 | tstat = __raw_readl(timer_base + MX1_2_TSTAT); | ||
242 | |||
243 | gpt_irq_acknowledge(); | ||
244 | |||
245 | evt->event_handler(evt); | ||
246 | |||
247 | return IRQ_HANDLED; | ||
248 | } | ||
249 | |||
250 | static struct irqaction mxc_timer_irq = { | ||
251 | .name = "i.MX Timer Tick", | ||
252 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
253 | .handler = mxc_timer_interrupt, | ||
254 | }; | ||
255 | |||
256 | static struct clock_event_device clockevent_mxc = { | ||
257 | .name = "mxc_timer1", | ||
258 | .features = CLOCK_EVT_FEAT_ONESHOT, | ||
259 | .shift = 32, | ||
260 | .set_mode = mxc_set_mode, | ||
261 | .set_next_event = mx1_2_set_next_event, | ||
262 | .rating = 200, | ||
263 | }; | ||
264 | |||
265 | static int __init mxc_clockevent_init(struct clk *timer_clk) | ||
266 | { | ||
267 | unsigned int c = clk_get_rate(timer_clk); | ||
268 | |||
269 | if (timer_is_v2()) | ||
270 | clockevent_mxc.set_next_event = v2_set_next_event; | ||
271 | |||
272 | clockevent_mxc.mult = div_sc(c, NSEC_PER_SEC, | ||
273 | clockevent_mxc.shift); | ||
274 | clockevent_mxc.max_delta_ns = | ||
275 | clockevent_delta2ns(0xfffffffe, &clockevent_mxc); | ||
276 | clockevent_mxc.min_delta_ns = | ||
277 | clockevent_delta2ns(0xff, &clockevent_mxc); | ||
278 | |||
279 | clockevent_mxc.cpumask = cpumask_of(0); | ||
280 | |||
281 | clockevents_register_device(&clockevent_mxc); | ||
282 | |||
283 | return 0; | ||
284 | } | ||
285 | |||
286 | void __init mxc_timer_init(void __iomem *base, int irq) | ||
287 | { | ||
288 | uint32_t tctl_val; | ||
289 | struct clk *timer_clk; | ||
290 | struct clk *timer_ipg_clk; | ||
291 | |||
292 | timer_clk = clk_get_sys("imx-gpt.0", "per"); | ||
293 | if (IS_ERR(timer_clk)) { | ||
294 | pr_err("i.MX timer: unable to get clk\n"); | ||
295 | return; | ||
296 | } | ||
297 | |||
298 | timer_ipg_clk = clk_get_sys("imx-gpt.0", "ipg"); | ||
299 | if (!IS_ERR(timer_ipg_clk)) | ||
300 | clk_prepare_enable(timer_ipg_clk); | ||
301 | |||
302 | clk_prepare_enable(timer_clk); | ||
303 | |||
304 | timer_base = base; | ||
305 | |||
306 | /* | ||
307 | * Initialise to a known state (all timers off, and timing reset) | ||
308 | */ | ||
309 | |||
310 | __raw_writel(0, timer_base + MXC_TCTL); | ||
311 | __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */ | ||
312 | |||
313 | if (timer_is_v2()) | ||
314 | tctl_val = V2_TCTL_CLK_PER | V2_TCTL_FRR | V2_TCTL_WAITEN | MXC_TCTL_TEN; | ||
315 | else | ||
316 | tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN; | ||
317 | |||
318 | __raw_writel(tctl_val, timer_base + MXC_TCTL); | ||
319 | |||
320 | /* init and register the timer to the framework */ | ||
321 | mxc_clocksource_init(timer_clk); | ||
322 | mxc_clockevent_init(timer_clk); | ||
323 | |||
324 | /* Make irqs happen */ | ||
325 | setup_irq(irq, &mxc_timer_irq); | ||
326 | } | ||
diff --git a/arch/arm/mach-imx/tzic.c b/arch/arm/mach-imx/tzic.c deleted file mode 100644 index 9721161f208..00000000000 --- a/arch/arm/mach-imx/tzic.c +++ /dev/null | |||
@@ -1,222 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C)2004-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
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: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #include <linux/module.h> | ||
13 | #include <linux/moduleparam.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/device.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/irqdomain.h> | ||
19 | #include <linux/of.h> | ||
20 | |||
21 | #include <asm/mach/irq.h> | ||
22 | #include <asm/exception.h> | ||
23 | |||
24 | #include "common.h" | ||
25 | #include "hardware.h" | ||
26 | #include "irq-common.h" | ||
27 | |||
28 | /* | ||
29 | ***************************************** | ||
30 | * TZIC Registers * | ||
31 | ***************************************** | ||
32 | */ | ||
33 | |||
34 | #define TZIC_INTCNTL 0x0000 /* Control register */ | ||
35 | #define TZIC_INTTYPE 0x0004 /* Controller Type register */ | ||
36 | #define TZIC_IMPID 0x0008 /* Distributor Implementer Identification */ | ||
37 | #define TZIC_PRIOMASK 0x000C /* Priority Mask Reg */ | ||
38 | #define TZIC_SYNCCTRL 0x0010 /* Synchronizer Control register */ | ||
39 | #define TZIC_DSMINT 0x0014 /* DSM interrupt Holdoffregister */ | ||
40 | #define TZIC_INTSEC0(i) (0x0080 + ((i) << 2)) /* Interrupt Security Reg 0 */ | ||
41 | #define TZIC_ENSET0(i) (0x0100 + ((i) << 2)) /* Enable Set Reg 0 */ | ||
42 | #define TZIC_ENCLEAR0(i) (0x0180 + ((i) << 2)) /* Enable Clear Reg 0 */ | ||
43 | #define TZIC_SRCSET0 0x0200 /* Source Set Register 0 */ | ||
44 | #define TZIC_SRCCLAR0 0x0280 /* Source Clear Register 0 */ | ||
45 | #define TZIC_PRIORITY0 0x0400 /* Priority Register 0 */ | ||
46 | #define TZIC_PND0 0x0D00 /* Pending Register 0 */ | ||
47 | #define TZIC_HIPND(i) (0x0D80+ ((i) << 2)) /* High Priority Pending Register */ | ||
48 | #define TZIC_WAKEUP0(i) (0x0E00 + ((i) << 2)) /* Wakeup Config Register */ | ||
49 | #define TZIC_SWINT 0x0F00 /* Software Interrupt Rigger Register */ | ||
50 | #define TZIC_ID0 0x0FD0 /* Indentification Register 0 */ | ||
51 | |||
52 | void __iomem *tzic_base; /* Used as irq controller base in entry-macro.S */ | ||
53 | static struct irq_domain *domain; | ||
54 | |||
55 | #define TZIC_NUM_IRQS 128 | ||
56 | |||
57 | #ifdef CONFIG_FIQ | ||
58 | static int tzic_set_irq_fiq(unsigned int irq, unsigned int type) | ||
59 | { | ||
60 | unsigned int index, mask, value; | ||
61 | |||
62 | index = irq >> 5; | ||
63 | if (unlikely(index >= 4)) | ||
64 | return -EINVAL; | ||
65 | mask = 1U << (irq & 0x1F); | ||
66 | |||
67 | value = __raw_readl(tzic_base + TZIC_INTSEC0(index)) | mask; | ||
68 | if (type) | ||
69 | value &= ~mask; | ||
70 | __raw_writel(value, tzic_base + TZIC_INTSEC0(index)); | ||
71 | |||
72 | return 0; | ||
73 | } | ||
74 | #else | ||
75 | #define tzic_set_irq_fiq NULL | ||
76 | #endif | ||
77 | |||
78 | #ifdef CONFIG_PM | ||
79 | static void tzic_irq_suspend(struct irq_data *d) | ||
80 | { | ||
81 | struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); | ||
82 | int idx = d->hwirq >> 5; | ||
83 | |||
84 | __raw_writel(gc->wake_active, tzic_base + TZIC_WAKEUP0(idx)); | ||
85 | } | ||
86 | |||
87 | static void tzic_irq_resume(struct irq_data *d) | ||
88 | { | ||
89 | int idx = d->hwirq >> 5; | ||
90 | |||
91 | __raw_writel(__raw_readl(tzic_base + TZIC_ENSET0(idx)), | ||
92 | tzic_base + TZIC_WAKEUP0(idx)); | ||
93 | } | ||
94 | |||
95 | #else | ||
96 | #define tzic_irq_suspend NULL | ||
97 | #define tzic_irq_resume NULL | ||
98 | #endif | ||
99 | |||
100 | static struct mxc_extra_irq tzic_extra_irq = { | ||
101 | #ifdef CONFIG_FIQ | ||
102 | .set_irq_fiq = tzic_set_irq_fiq, | ||
103 | #endif | ||
104 | }; | ||
105 | |||
106 | static __init void tzic_init_gc(int idx, unsigned int irq_start) | ||
107 | { | ||
108 | struct irq_chip_generic *gc; | ||
109 | struct irq_chip_type *ct; | ||
110 | |||
111 | gc = irq_alloc_generic_chip("tzic", 1, irq_start, tzic_base, | ||
112 | handle_level_irq); | ||
113 | gc->private = &tzic_extra_irq; | ||
114 | gc->wake_enabled = IRQ_MSK(32); | ||
115 | |||
116 | ct = gc->chip_types; | ||
117 | ct->chip.irq_mask = irq_gc_mask_disable_reg; | ||
118 | ct->chip.irq_unmask = irq_gc_unmask_enable_reg; | ||
119 | ct->chip.irq_set_wake = irq_gc_set_wake; | ||
120 | ct->chip.irq_suspend = tzic_irq_suspend; | ||
121 | ct->chip.irq_resume = tzic_irq_resume; | ||
122 | ct->regs.disable = TZIC_ENCLEAR0(idx); | ||
123 | ct->regs.enable = TZIC_ENSET0(idx); | ||
124 | |||
125 | irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0); | ||
126 | } | ||
127 | |||
128 | asmlinkage void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs) | ||
129 | { | ||
130 | u32 stat; | ||
131 | int i, irqofs, handled; | ||
132 | |||
133 | do { | ||
134 | handled = 0; | ||
135 | |||
136 | for (i = 0; i < 4; i++) { | ||
137 | stat = __raw_readl(tzic_base + TZIC_HIPND(i)) & | ||
138 | __raw_readl(tzic_base + TZIC_INTSEC0(i)); | ||
139 | |||
140 | while (stat) { | ||
141 | handled = 1; | ||
142 | irqofs = fls(stat) - 1; | ||
143 | handle_IRQ(irq_find_mapping(domain, | ||
144 | irqofs + i * 32), regs); | ||
145 | stat &= ~(1 << irqofs); | ||
146 | } | ||
147 | } | ||
148 | } while (handled); | ||
149 | } | ||
150 | |||
151 | /* | ||
152 | * This function initializes the TZIC hardware and disables all the | ||
153 | * interrupts. It registers the interrupt enable and disable functions | ||
154 | * to the kernel for each interrupt source. | ||
155 | */ | ||
156 | void __init tzic_init_irq(void __iomem *irqbase) | ||
157 | { | ||
158 | struct device_node *np; | ||
159 | int irq_base; | ||
160 | int i; | ||
161 | |||
162 | tzic_base = irqbase; | ||
163 | /* put the TZIC into the reset value with | ||
164 | * all interrupts disabled | ||
165 | */ | ||
166 | i = __raw_readl(tzic_base + TZIC_INTCNTL); | ||
167 | |||
168 | __raw_writel(0x80010001, tzic_base + TZIC_INTCNTL); | ||
169 | __raw_writel(0x1f, tzic_base + TZIC_PRIOMASK); | ||
170 | __raw_writel(0x02, tzic_base + TZIC_SYNCCTRL); | ||
171 | |||
172 | for (i = 0; i < 4; i++) | ||
173 | __raw_writel(0xFFFFFFFF, tzic_base + TZIC_INTSEC0(i)); | ||
174 | |||
175 | /* disable all interrupts */ | ||
176 | for (i = 0; i < 4; i++) | ||
177 | __raw_writel(0xFFFFFFFF, tzic_base + TZIC_ENCLEAR0(i)); | ||
178 | |||
179 | /* all IRQ no FIQ Warning :: No selection */ | ||
180 | |||
181 | irq_base = irq_alloc_descs(-1, 0, TZIC_NUM_IRQS, numa_node_id()); | ||
182 | WARN_ON(irq_base < 0); | ||
183 | |||
184 | np = of_find_compatible_node(NULL, NULL, "fsl,tzic"); | ||
185 | domain = irq_domain_add_legacy(np, TZIC_NUM_IRQS, irq_base, 0, | ||
186 | &irq_domain_simple_ops, NULL); | ||
187 | WARN_ON(!domain); | ||
188 | |||
189 | for (i = 0; i < 4; i++, irq_base += 32) | ||
190 | tzic_init_gc(i, irq_base); | ||
191 | |||
192 | #ifdef CONFIG_FIQ | ||
193 | /* Initialize FIQ */ | ||
194 | init_FIQ(FIQ_START); | ||
195 | #endif | ||
196 | |||
197 | pr_info("TrustZone Interrupt Controller (TZIC) initialized\n"); | ||
198 | } | ||
199 | |||
200 | /** | ||
201 | * tzic_enable_wake() - enable wakeup interrupt | ||
202 | * | ||
203 | * @return 0 if successful; non-zero otherwise | ||
204 | * | ||
205 | * This function provides an interrupt synchronization point that is required | ||
206 | * by tzic enabled platforms before entering imx specific low power modes (ie, | ||
207 | * those low power modes beyond the WAIT_CLOCKED basic ARM WFI only mode). | ||
208 | */ | ||
209 | int tzic_enable_wake(void) | ||
210 | { | ||
211 | unsigned int i; | ||
212 | |||
213 | __raw_writel(1, tzic_base + TZIC_DSMINT); | ||
214 | if (unlikely(__raw_readl(tzic_base + TZIC_DSMINT) == 0)) | ||
215 | return -EAGAIN; | ||
216 | |||
217 | for (i = 0; i < 4; i++) | ||
218 | __raw_writel(__raw_readl(tzic_base + TZIC_ENSET0(i)), | ||
219 | tzic_base + TZIC_WAKEUP0(i)); | ||
220 | |||
221 | return 0; | ||
222 | } | ||
diff --git a/arch/arm/mach-imx/ulpi.c b/arch/arm/mach-imx/ulpi.c deleted file mode 100644 index 0f051957d10..00000000000 --- a/arch/arm/mach-imx/ulpi.c +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> | ||
3 | * Copyright 2009 Daniel Mack <daniel@caiaq.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #include <linux/module.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/io.h> | ||
23 | #include <linux/delay.h> | ||
24 | #include <linux/usb/otg.h> | ||
25 | #include <linux/usb/ulpi.h> | ||
26 | |||
27 | #include "ulpi.h" | ||
28 | |||
29 | /* ULPIVIEW register bits */ | ||
30 | #define ULPIVW_WU (1 << 31) /* Wakeup */ | ||
31 | #define ULPIVW_RUN (1 << 30) /* read/write run */ | ||
32 | #define ULPIVW_WRITE (1 << 29) /* 0 = read 1 = write */ | ||
33 | #define ULPIVW_SS (1 << 27) /* SyncState */ | ||
34 | #define ULPIVW_PORT_MASK 0x07 /* Port field */ | ||
35 | #define ULPIVW_PORT_SHIFT 24 | ||
36 | #define ULPIVW_ADDR_MASK 0xff /* data address field */ | ||
37 | #define ULPIVW_ADDR_SHIFT 16 | ||
38 | #define ULPIVW_RDATA_MASK 0xff /* read data field */ | ||
39 | #define ULPIVW_RDATA_SHIFT 8 | ||
40 | #define ULPIVW_WDATA_MASK 0xff /* write data field */ | ||
41 | #define ULPIVW_WDATA_SHIFT 0 | ||
42 | |||
43 | static int ulpi_poll(void __iomem *view, u32 bit) | ||
44 | { | ||
45 | int timeout = 10000; | ||
46 | |||
47 | while (timeout--) { | ||
48 | u32 data = __raw_readl(view); | ||
49 | |||
50 | if (!(data & bit)) | ||
51 | return 0; | ||
52 | |||
53 | cpu_relax(); | ||
54 | }; | ||
55 | |||
56 | printk(KERN_WARNING "timeout polling for ULPI device\n"); | ||
57 | |||
58 | return -ETIMEDOUT; | ||
59 | } | ||
60 | |||
61 | static int ulpi_read(struct usb_phy *otg, u32 reg) | ||
62 | { | ||
63 | int ret; | ||
64 | void __iomem *view = otg->io_priv; | ||
65 | |||
66 | /* make sure interface is running */ | ||
67 | if (!(__raw_readl(view) & ULPIVW_SS)) { | ||
68 | __raw_writel(ULPIVW_WU, view); | ||
69 | |||
70 | /* wait for wakeup */ | ||
71 | ret = ulpi_poll(view, ULPIVW_WU); | ||
72 | if (ret) | ||
73 | return ret; | ||
74 | } | ||
75 | |||
76 | /* read the register */ | ||
77 | __raw_writel((ULPIVW_RUN | (reg << ULPIVW_ADDR_SHIFT)), view); | ||
78 | |||
79 | /* wait for completion */ | ||
80 | ret = ulpi_poll(view, ULPIVW_RUN); | ||
81 | if (ret) | ||
82 | return ret; | ||
83 | |||
84 | return (__raw_readl(view) >> ULPIVW_RDATA_SHIFT) & ULPIVW_RDATA_MASK; | ||
85 | } | ||
86 | |||
87 | static int ulpi_write(struct usb_phy *otg, u32 val, u32 reg) | ||
88 | { | ||
89 | int ret; | ||
90 | void __iomem *view = otg->io_priv; | ||
91 | |||
92 | /* make sure the interface is running */ | ||
93 | if (!(__raw_readl(view) & ULPIVW_SS)) { | ||
94 | __raw_writel(ULPIVW_WU, view); | ||
95 | /* wait for wakeup */ | ||
96 | ret = ulpi_poll(view, ULPIVW_WU); | ||
97 | if (ret) | ||
98 | return ret; | ||
99 | } | ||
100 | |||
101 | __raw_writel((ULPIVW_RUN | ULPIVW_WRITE | | ||
102 | (reg << ULPIVW_ADDR_SHIFT) | | ||
103 | ((val & ULPIVW_WDATA_MASK) << ULPIVW_WDATA_SHIFT)), view); | ||
104 | |||
105 | /* wait for completion */ | ||
106 | return ulpi_poll(view, ULPIVW_RUN); | ||
107 | } | ||
108 | |||
109 | struct usb_phy_io_ops mxc_ulpi_access_ops = { | ||
110 | .read = ulpi_read, | ||
111 | .write = ulpi_write, | ||
112 | }; | ||
113 | EXPORT_SYMBOL_GPL(mxc_ulpi_access_ops); | ||
114 | |||
115 | struct usb_phy *imx_otg_ulpi_create(unsigned int flags) | ||
116 | { | ||
117 | return otg_ulpi_create(&mxc_ulpi_access_ops, flags); | ||
118 | } | ||
diff --git a/arch/arm/mach-imx/ulpi.h b/arch/arm/mach-imx/ulpi.h deleted file mode 100644 index 42bdaca6d7d..00000000000 --- a/arch/arm/mach-imx/ulpi.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifndef __MACH_ULPI_H | ||
2 | #define __MACH_ULPI_H | ||
3 | |||
4 | #ifdef CONFIG_USB_ULPI | ||
5 | struct usb_phy *imx_otg_ulpi_create(unsigned int flags); | ||
6 | #else | ||
7 | static inline struct usb_phy *imx_otg_ulpi_create(unsigned int flags) | ||
8 | { | ||
9 | return NULL; | ||
10 | } | ||
11 | #endif | ||
12 | |||
13 | extern struct usb_phy_io_ops mxc_ulpi_access_ops; | ||
14 | |||
15 | #endif /* __MACH_ULPI_H */ | ||
16 | |||