aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-15 15:33:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-15 15:33:40 -0500
commit16c1020362083b320868c0deef492249089c3cd3 (patch)
treeff200df3502e6010745713275d69fd0a07e399cf /arch/arm/plat-mxc
parent65e5d002b5ad220db2bf9557f53de5a98f7dab86 (diff)
parentbbba75606963c82febf7bd2761ea848ac5d1a1bb (diff)
Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm: (161 commits) ARM: pxa: fix building issue of missing physmap.h ARM: mmp: PXA910 drive strength FAST using wrong value ARM: mmp: MMP2 drive strength FAST using wrong value ARM: pxa: fix recursive calls in pxa_low_gpio_chip AT91: Support for gsia18s board AT91: Acme Systems FOX Board G20 board files AT91: board-sam9m10g45ek.c: Remove duplicate inclusion of mach/hardware.h ARM: pxa: fix suspend/resume array index miscalculation ARM: pxa: use cpu_has_ipr() consistently in irq.c ARM: pxa: remove unused variable in clock-pxa3xx.c ARM: pxa: fix warning in zeus.c ARM: sa1111: fix typo in sa1111_retrigger_lowirq() ARM mxs: clkdev related compile fixes ARM i.MX mx31_3ds: Fix MC13783 regulator names ARM: plat-stmp3xxx: irq_data conversion. ARM: plat-spear: irq_data conversion. ARM: plat-orion: irq_data conversion. ARM: plat-omap: irq_data conversion. ARM: plat-nomadik: irq_data conversion. ARM: plat-mxc: irq_data conversion. ... Fix up trivial conflict in arch/arm/plat-omap/gpio.c (Lennert Buytenhek's irq_data conversion clashing with some omap irq updates)
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r--arch/arm/plat-mxc/3ds_debugboard.c28
-rw-r--r--arch/arm/plat-mxc/avic.c14
-rw-r--r--arch/arm/plat-mxc/devices/Kconfig2
-rw-r--r--arch/arm/plat-mxc/devices/platform-fec.c5
-rw-r--r--arch/arm/plat-mxc/devices/platform-imx-i2c.c9
-rw-r--r--arch/arm/plat-mxc/devices/platform-imx-keypad.c5
-rw-r--r--arch/arm/plat-mxc/devices/platform-mxc_pwm.c9
-rw-r--r--arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c12
-rw-r--r--arch/arm/plat-mxc/devices/platform-spi_imx.c12
-rw-r--r--arch/arm/plat-mxc/gpio.c30
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-mx53.h4
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-v3.h1
-rw-r--r--arch/arm/plat-mxc/include/mach/mx51.h6
-rw-r--r--arch/arm/plat-mxc/include/mach/mx53.h28
-rw-r--r--arch/arm/plat-mxc/pwm.c2
-rw-r--r--arch/arm/plat-mxc/tzic.c38
16 files changed, 130 insertions, 75 deletions
diff --git a/arch/arm/plat-mxc/3ds_debugboard.c b/arch/arm/plat-mxc/3ds_debugboard.c
index 639c54a07992..c856fa397606 100644
--- a/arch/arm/plat-mxc/3ds_debugboard.c
+++ b/arch/arm/plat-mxc/3ds_debugboard.c
@@ -60,7 +60,6 @@
60#define EXPIO_INT_BUTTON_B (MXC_BOARD_IRQ_START + 4) 60#define EXPIO_INT_BUTTON_B (MXC_BOARD_IRQ_START + 4)
61 61
62static void __iomem *brd_io; 62static void __iomem *brd_io;
63static void expio_ack_irq(u32 irq);
64 63
65static struct resource smsc911x_resources[] = { 64static struct resource smsc911x_resources[] = {
66 { 65 {
@@ -93,7 +92,8 @@ static void mxc_expio_irq_handler(u32 irq, struct irq_desc *desc)
93 u32 int_valid; 92 u32 int_valid;
94 u32 expio_irq; 93 u32 expio_irq;
95 94
96 desc->chip->mask(irq); /* irq = gpio irq number */ 95 /* irq = gpio irq number */
96 desc->irq_data.chip->irq_mask(&desc->irq_data);
97 97
98 imr_val = __raw_readw(brd_io + INTR_MASK_REG); 98 imr_val = __raw_readw(brd_io + INTR_MASK_REG);
99 int_valid = __raw_readw(brd_io + INTR_STATUS_REG) & ~imr_val; 99 int_valid = __raw_readw(brd_io + INTR_STATUS_REG) & ~imr_val;
@@ -110,37 +110,37 @@ static void mxc_expio_irq_handler(u32 irq, struct irq_desc *desc)
110 d->handle_irq(expio_irq, d); 110 d->handle_irq(expio_irq, d);
111 } 111 }
112 112
113 desc->chip->ack(irq); 113 desc->irq_data.chip->irq_ack(&desc->irq_data);
114 desc->chip->unmask(irq); 114 desc->irq_data.chip->irq_unmask(&desc->irq_data);
115} 115}
116 116
117/* 117/*
118 * Disable an expio pin's interrupt by setting the bit in the imr. 118 * Disable an expio pin's interrupt by setting the bit in the imr.
119 * Irq is an expio virtual irq number 119 * Irq is an expio virtual irq number
120 */ 120 */
121static void expio_mask_irq(u32 irq) 121static void expio_mask_irq(struct irq_data *d)
122{ 122{
123 u16 reg; 123 u16 reg;
124 u32 expio = MXC_IRQ_TO_EXPIO(irq); 124 u32 expio = MXC_IRQ_TO_EXPIO(d->irq);
125 125
126 reg = __raw_readw(brd_io + INTR_MASK_REG); 126 reg = __raw_readw(brd_io + INTR_MASK_REG);
127 reg |= (1 << expio); 127 reg |= (1 << expio);
128 __raw_writew(reg, brd_io + INTR_MASK_REG); 128 __raw_writew(reg, brd_io + INTR_MASK_REG);
129} 129}
130 130
131static void expio_ack_irq(u32 irq) 131static void expio_ack_irq(struct irq_data *d)
132{ 132{
133 u32 expio = MXC_IRQ_TO_EXPIO(irq); 133 u32 expio = MXC_IRQ_TO_EXPIO(d->irq);
134 134
135 __raw_writew(1 << expio, brd_io + INTR_RESET_REG); 135 __raw_writew(1 << expio, brd_io + INTR_RESET_REG);
136 __raw_writew(0, brd_io + INTR_RESET_REG); 136 __raw_writew(0, brd_io + INTR_RESET_REG);
137 expio_mask_irq(irq); 137 expio_mask_irq(d);
138} 138}
139 139
140static void expio_unmask_irq(u32 irq) 140static void expio_unmask_irq(struct irq_data *d)
141{ 141{
142 u16 reg; 142 u16 reg;
143 u32 expio = MXC_IRQ_TO_EXPIO(irq); 143 u32 expio = MXC_IRQ_TO_EXPIO(d->irq);
144 144
145 reg = __raw_readw(brd_io + INTR_MASK_REG); 145 reg = __raw_readw(brd_io + INTR_MASK_REG);
146 reg &= ~(1 << expio); 146 reg &= ~(1 << expio);
@@ -148,9 +148,9 @@ static void expio_unmask_irq(u32 irq)
148} 148}
149 149
150static struct irq_chip expio_irq_chip = { 150static struct irq_chip expio_irq_chip = {
151 .ack = expio_ack_irq, 151 .irq_ack = expio_ack_irq,
152 .mask = expio_mask_irq, 152 .irq_mask = expio_mask_irq,
153 .unmask = expio_unmask_irq, 153 .irq_unmask = expio_unmask_irq,
154}; 154};
155 155
156int __init mxc_expio_init(u32 base, u32 p_irq) 156int __init mxc_expio_init(u32 base, u32 p_irq)
diff --git a/arch/arm/plat-mxc/avic.c b/arch/arm/plat-mxc/avic.c
index 9a4e8a22dd0a..deb284bc7c4b 100644
--- a/arch/arm/plat-mxc/avic.c
+++ b/arch/arm/plat-mxc/avic.c
@@ -89,22 +89,22 @@ static int avic_set_irq_fiq(unsigned int irq, unsigned int type)
89#endif /* CONFIG_FIQ */ 89#endif /* CONFIG_FIQ */
90 90
91/* Disable interrupt number "irq" in the AVIC */ 91/* Disable interrupt number "irq" in the AVIC */
92static void mxc_mask_irq(unsigned int irq) 92static void mxc_mask_irq(struct irq_data *d)
93{ 93{
94 __raw_writel(irq, avic_base + AVIC_INTDISNUM); 94 __raw_writel(d->irq, avic_base + AVIC_INTDISNUM);
95} 95}
96 96
97/* Enable interrupt number "irq" in the AVIC */ 97/* Enable interrupt number "irq" in the AVIC */
98static void mxc_unmask_irq(unsigned int irq) 98static void mxc_unmask_irq(struct irq_data *d)
99{ 99{
100 __raw_writel(irq, avic_base + AVIC_INTENNUM); 100 __raw_writel(d->irq, avic_base + AVIC_INTENNUM);
101} 101}
102 102
103static struct mxc_irq_chip mxc_avic_chip = { 103static struct mxc_irq_chip mxc_avic_chip = {
104 .base = { 104 .base = {
105 .ack = mxc_mask_irq, 105 .irq_ack = mxc_mask_irq,
106 .mask = mxc_mask_irq, 106 .irq_mask = mxc_mask_irq,
107 .unmask = mxc_unmask_irq, 107 .irq_unmask = mxc_unmask_irq,
108 }, 108 },
109#ifdef CONFIG_MXC_IRQ_PRIOR 109#ifdef CONFIG_MXC_IRQ_PRIOR
110 .set_priority = avic_irq_set_priority, 110 .set_priority = avic_irq_set_priority,
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
index 2537166468ac..b9ab1d58b5e7 100644
--- a/arch/arm/plat-mxc/devices/Kconfig
+++ b/arch/arm/plat-mxc/devices/Kconfig
@@ -1,6 +1,6 @@
1config IMX_HAVE_PLATFORM_FEC 1config IMX_HAVE_PLATFORM_FEC
2 bool 2 bool
3 default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51 3 default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51 || SOC_IMX53
4 4
5config IMX_HAVE_PLATFORM_FLEXCAN 5config IMX_HAVE_PLATFORM_FLEXCAN
6 select HAVE_CAN_FLEXCAN if CAN 6 select HAVE_CAN_FLEXCAN if CAN
diff --git a/arch/arm/plat-mxc/devices/platform-fec.c b/arch/arm/plat-mxc/devices/platform-fec.c
index 269ec78aba77..b50c3517d083 100644
--- a/arch/arm/plat-mxc/devices/platform-fec.c
+++ b/arch/arm/plat-mxc/devices/platform-fec.c
@@ -36,6 +36,11 @@ const struct imx_fec_data imx51_fec_data __initconst =
36 imx_fec_data_entry_single(MX51); 36 imx_fec_data_entry_single(MX51);
37#endif 37#endif
38 38
39#ifdef CONFIG_SOC_IMX53
40const struct imx_fec_data imx53_fec_data __initconst =
41 imx_fec_data_entry_single(MX53);
42#endif
43
39struct platform_device *__init imx_add_fec( 44struct platform_device *__init imx_add_fec(
40 const struct imx_fec_data *data, 45 const struct imx_fec_data *data,
41 const struct fec_platform_data *pdata) 46 const struct fec_platform_data *pdata)
diff --git a/arch/arm/plat-mxc/devices/platform-imx-i2c.c b/arch/arm/plat-mxc/devices/platform-imx-i2c.c
index 72ba880c75af..7ba94e1bbda3 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-i2c.c
+++ b/arch/arm/plat-mxc/devices/platform-imx-i2c.c
@@ -78,6 +78,15 @@ const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
78}; 78};
79#endif /* ifdef CONFIG_SOC_IMX51 */ 79#endif /* ifdef CONFIG_SOC_IMX51 */
80 80
81#ifdef CONFIG_SOC_IMX53
82const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = {
83#define imx53_imx_i2c_data_entry(_id, _hwid) \
84 imx_imx_i2c_data_entry(MX53, _id, _hwid, SZ_4K)
85 imx53_imx_i2c_data_entry(0, 1),
86 imx53_imx_i2c_data_entry(1, 2),
87};
88#endif /* ifdef CONFIG_SOC_IMX51 */
89
81struct platform_device *__init imx_add_imx_i2c( 90struct platform_device *__init imx_add_imx_i2c(
82 const struct imx_imx_i2c_data *data, 91 const struct imx_imx_i2c_data *data,
83 const struct imxi2c_platform_data *pdata) 92 const struct imxi2c_platform_data *pdata)
diff --git a/arch/arm/plat-mxc/devices/platform-imx-keypad.c b/arch/arm/plat-mxc/devices/platform-imx-keypad.c
index 40238f0b8643..26366114b021 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-keypad.c
+++ b/arch/arm/plat-mxc/devices/platform-imx-keypad.c
@@ -41,6 +41,11 @@ const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst =
41 imx_imx_keypad_data_entry_single(MX35, SZ_16); 41 imx_imx_keypad_data_entry_single(MX35, SZ_16);
42#endif /* ifdef CONFIG_SOC_IMX35 */ 42#endif /* ifdef CONFIG_SOC_IMX35 */
43 43
44#ifdef CONFIG_SOC_IMX51
45const 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
44struct platform_device *__init imx_add_imx_keypad( 49struct platform_device *__init imx_add_imx_keypad(
45 const struct imx_imx_keypad_data *data, 50 const struct imx_imx_keypad_data *data,
46 const struct matrix_keymap_data *pdata) 51 const struct matrix_keymap_data *pdata)
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_pwm.c b/arch/arm/plat-mxc/devices/platform-mxc_pwm.c
index 3d8ebdba38ee..b0c4ae298111 100644
--- a/arch/arm/plat-mxc/devices/platform-mxc_pwm.c
+++ b/arch/arm/plat-mxc/devices/platform-mxc_pwm.c
@@ -40,6 +40,15 @@ const struct imx_mxc_pwm_data imx27_mxc_pwm_data __initconst =
40 imx_mxc_pwm_data_entry_single(MX27, 0, , SZ_4K); 40 imx_mxc_pwm_data_entry_single(MX27, 0, , SZ_4K);
41#endif /* ifdef CONFIG_SOC_IMX27 */ 41#endif /* ifdef CONFIG_SOC_IMX27 */
42 42
43#ifdef CONFIG_SOC_IMX51
44const 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
43struct platform_device *__init imx_add_mxc_pwm( 52struct platform_device *__init imx_add_mxc_pwm(
44 const struct imx_mxc_pwm_data *data) 53 const struct imx_mxc_pwm_data *data)
45{ 54{
diff --git a/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c b/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c
index b3525648a01d..6b2940b93d94 100644
--- a/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c
+++ b/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c
@@ -53,6 +53,18 @@ imx51_sdhci_esdhc_imx_data[] __initconst = {
53}; 53};
54#endif /* ifdef CONFIG_SOC_IMX51 */ 54#endif /* ifdef CONFIG_SOC_IMX51 */
55 55
56#ifdef CONFIG_SOC_IMX53
57const struct imx_sdhci_esdhc_imx_data
58imx53_sdhci_esdhc_imx_data[] __initconst = {
59#define imx53_sdhci_esdhc_imx_data_entry(_id, _hwid) \
60 imx_sdhci_esdhc_imx_data_entry(MX53, _id, _hwid)
61 imx53_sdhci_esdhc_imx_data_entry(0, 1),
62 imx53_sdhci_esdhc_imx_data_entry(1, 2),
63 imx53_sdhci_esdhc_imx_data_entry(2, 3),
64 imx53_sdhci_esdhc_imx_data_entry(3, 4),
65};
66#endif /* ifdef CONFIG_SOC_IMX53 */
67
56struct platform_device *__init imx_add_sdhci_esdhc_imx( 68struct platform_device *__init imx_add_sdhci_esdhc_imx(
57 const struct imx_sdhci_esdhc_imx_data *data, 69 const struct imx_sdhci_esdhc_imx_data *data,
58 const struct esdhc_platform_data *pdata) 70 const struct esdhc_platform_data *pdata)
diff --git a/arch/arm/plat-mxc/devices/platform-spi_imx.c b/arch/arm/plat-mxc/devices/platform-spi_imx.c
index 8ea49adcdfc1..013c85f20b58 100644
--- a/arch/arm/plat-mxc/devices/platform-spi_imx.c
+++ b/arch/arm/plat-mxc/devices/platform-spi_imx.c
@@ -81,6 +81,18 @@ const struct imx_spi_imx_data imx51_ecspi_data[] __initconst = {
81}; 81};
82#endif /* ifdef CONFIG_SOC_IMX51 */ 82#endif /* ifdef CONFIG_SOC_IMX51 */
83 83
84#ifdef CONFIG_SOC_IMX53
85const struct imx_spi_imx_data imx53_cspi_data __initconst =
86 imx_spi_imx_data_entry_single(MX53, CSPI, "imx53-cspi", 0, , SZ_4K);
87
88const struct imx_spi_imx_data imx53_ecspi_data[] __initconst = {
89#define imx53_ecspi_data_entry(_id, _hwid) \
90 imx_spi_imx_data_entry(MX53, ECSPI, "imx53-ecspi", _id, _hwid, SZ_4K)
91 imx53_ecspi_data_entry(0, 1),
92 imx53_ecspi_data_entry(1, 2),
93};
94#endif /* ifdef CONFIG_SOC_IMX53 */
95
84struct platform_device *__init imx_add_spi_imx( 96struct platform_device *__init imx_add_spi_imx(
85 const struct imx_spi_imx_data *data, 97 const struct imx_spi_imx_data *data,
86 const struct spi_imx_master *pdata) 98 const struct spi_imx_master *pdata)
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c
index bc2c7bc6f10a..d17b3c996b84 100644
--- a/arch/arm/plat-mxc/gpio.c
+++ b/arch/arm/plat-mxc/gpio.c
@@ -63,29 +63,29 @@ static void _set_gpio_irqenable(struct mxc_gpio_port *port, u32 index,
63 __raw_writel(l, port->base + GPIO_IMR); 63 __raw_writel(l, port->base + GPIO_IMR);
64} 64}
65 65
66static void gpio_ack_irq(u32 irq) 66static void gpio_ack_irq(struct irq_data *d)
67{ 67{
68 u32 gpio = irq_to_gpio(irq); 68 u32 gpio = irq_to_gpio(d->irq);
69 _clear_gpio_irqstatus(&mxc_gpio_ports[gpio / 32], gpio & 0x1f); 69 _clear_gpio_irqstatus(&mxc_gpio_ports[gpio / 32], gpio & 0x1f);
70} 70}
71 71
72static void gpio_mask_irq(u32 irq) 72static void gpio_mask_irq(struct irq_data *d)
73{ 73{
74 u32 gpio = irq_to_gpio(irq); 74 u32 gpio = irq_to_gpio(d->irq);
75 _set_gpio_irqenable(&mxc_gpio_ports[gpio / 32], gpio & 0x1f, 0); 75 _set_gpio_irqenable(&mxc_gpio_ports[gpio / 32], gpio & 0x1f, 0);
76} 76}
77 77
78static void gpio_unmask_irq(u32 irq) 78static void gpio_unmask_irq(struct irq_data *d)
79{ 79{
80 u32 gpio = irq_to_gpio(irq); 80 u32 gpio = irq_to_gpio(d->irq);
81 _set_gpio_irqenable(&mxc_gpio_ports[gpio / 32], gpio & 0x1f, 1); 81 _set_gpio_irqenable(&mxc_gpio_ports[gpio / 32], gpio & 0x1f, 1);
82} 82}
83 83
84static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset); 84static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset);
85 85
86static int gpio_set_irq_type(u32 irq, u32 type) 86static int gpio_set_irq_type(struct irq_data *d, u32 type)
87{ 87{
88 u32 gpio = irq_to_gpio(irq); 88 u32 gpio = irq_to_gpio(d->irq);
89 struct mxc_gpio_port *port = &mxc_gpio_ports[gpio / 32]; 89 struct mxc_gpio_port *port = &mxc_gpio_ports[gpio / 32];
90 u32 bit, val; 90 u32 bit, val;
91 int edge; 91 int edge;
@@ -211,9 +211,9 @@ static void mx2_gpio_irq_handler(u32 irq, struct irq_desc *desc)
211 * @param enable enable as wake-up if equal to non-zero 211 * @param enable enable as wake-up if equal to non-zero
212 * @return This function returns 0 on success. 212 * @return This function returns 0 on success.
213 */ 213 */
214static int gpio_set_wake_irq(u32 irq, u32 enable) 214static int gpio_set_wake_irq(struct irq_data *d, u32 enable)
215{ 215{
216 u32 gpio = irq_to_gpio(irq); 216 u32 gpio = irq_to_gpio(d->irq);
217 u32 gpio_idx = gpio & 0x1F; 217 u32 gpio_idx = gpio & 0x1F;
218 struct mxc_gpio_port *port = &mxc_gpio_ports[gpio / 32]; 218 struct mxc_gpio_port *port = &mxc_gpio_ports[gpio / 32];
219 219
@@ -233,11 +233,11 @@ static int gpio_set_wake_irq(u32 irq, u32 enable)
233} 233}
234 234
235static struct irq_chip gpio_irq_chip = { 235static struct irq_chip gpio_irq_chip = {
236 .ack = gpio_ack_irq, 236 .irq_ack = gpio_ack_irq,
237 .mask = gpio_mask_irq, 237 .irq_mask = gpio_mask_irq,
238 .unmask = gpio_unmask_irq, 238 .irq_unmask = gpio_unmask_irq,
239 .set_type = gpio_set_irq_type, 239 .irq_set_type = gpio_set_irq_type,
240 .set_wake = gpio_set_wake_irq, 240 .irq_set_wake = gpio_set_wake_irq,
241}; 241};
242 242
243static void _set_gpio_direction(struct gpio_chip *chip, unsigned offset, 243static void _set_gpio_direction(struct gpio_chip *chip, unsigned offset,
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx53.h b/arch/arm/plat-mxc/include/mach/iomux-mx53.h
index 5deee019c29e..68e11d7ab79d 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx53.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mx53.h
@@ -34,7 +34,6 @@ typedef enum iomux_config {
34 IOMUX_CONFIG_ALT6, 34 IOMUX_CONFIG_ALT6,
35 IOMUX_CONFIG_ALT7, 35 IOMUX_CONFIG_ALT7,
36 IOMUX_CONFIG_GPIO, /* added to help user use GPIO mode */ 36 IOMUX_CONFIG_GPIO, /* added to help user use GPIO mode */
37 IOMUX_CONFIG_SION = 0x1 << 4, /* LOOPBACK:MUX SION bit */
38} iomux_pin_cfg_t; 37} iomux_pin_cfg_t;
39 38
40/* These 2 defines are for pins that may not have a mux register, but could 39/* These 2 defines are for pins that may not have a mux register, but could
@@ -135,6 +134,9 @@ typedef enum iomux_config {
135#define MX53_PAD_EIM_D16__GPIO_3_16 IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) 134#define MX53_PAD_EIM_D16__GPIO_3_16 IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
136#define MX53_PAD_EIM_D17__GPIO_3_17 IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) 135#define MX53_PAD_EIM_D17__GPIO_3_17 IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
137#define MX53_PAD_EIM_D18__GPIO_3_18 IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) 136#define MX53_PAD_EIM_D18__GPIO_3_18 IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
137#define MX53_PAD_EIM_D16__CSPI1_SCLK IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT4, 0x79c, 3, NO_PAD_CTRL)
138#define MX53_PAD_EIM_D17__CSPI1_MISO IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT4, 0x7a0, 3, NO_PAD_CTRL)
139#define MX53_PAD_EIM_D18__CSPI1_MOSI IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT4, 0x7a4, 3, NO_PAD_CTRL)
138#define MX53_PAD_EIM_D19__GPIO_3_19 IOMUX_PAD(0x46C, 0x124,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) 140#define MX53_PAD_EIM_D19__GPIO_3_19 IOMUX_PAD(0x46C, 0x124,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
139#define MX53_PAD_EIM_D20__GPIO_3_20 IOMUX_PAD(0x470, 0x128,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) 141#define MX53_PAD_EIM_D20__GPIO_3_20 IOMUX_PAD(0x470, 0x128,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
140#define MX53_PAD_EIM_D21__GPIO_3_21 IOMUX_PAD(0x474, 0x12C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) 142#define MX53_PAD_EIM_D21__GPIO_3_21 IOMUX_PAD(0x474, 0x12C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h
index 2277b01c855d..82620af1922f 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-v3.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h
@@ -105,6 +105,7 @@ typedef u64 iomux_v3_cfg_t;
105#define PAD_CTL_SRE_FAST (1 << 0) 105#define PAD_CTL_SRE_FAST (1 << 0)
106#define PAD_CTL_SRE_SLOW (0 << 0) 106#define PAD_CTL_SRE_SLOW (0 << 0)
107 107
108#define IOMUX_CONFIG_SION (0x1 << 4)
108 109
109#define MX51_NUM_GPIO_PORT 4 110#define MX51_NUM_GPIO_PORT 4
110 111
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h
index 873807f96d70..1eb339e6c857 100644
--- a/arch/arm/plat-mxc/include/mach/mx51.h
+++ b/arch/arm/plat-mxc/include/mach/mx51.h
@@ -301,8 +301,8 @@
301#define MX51_MXC_INT_GPIO4_HIGH 57 301#define MX51_MXC_INT_GPIO4_HIGH 57
302#define MX51_MXC_INT_WDOG1 58 302#define MX51_MXC_INT_WDOG1 58
303#define MX51_MXC_INT_WDOG2 59 303#define MX51_MXC_INT_WDOG2 59
304#define MX51_MXC_INT_KPP 60 304#define MX51_INT_KPP 60
305#define MX51_MXC_INT_PWM1 61 305#define MX51_INT_PWM1 61
306#define MX51_INT_I2C1 62 306#define MX51_INT_I2C1 62
307#define MX51_INT_I2C2 63 307#define MX51_INT_I2C2 63
308#define MX51_MXC_INT_HS_I2C 64 308#define MX51_MXC_INT_HS_I2C 64
@@ -335,7 +335,7 @@
335#define MX51_MXC_INT_SPDIF 91 335#define MX51_MXC_INT_SPDIF 91
336#define MX51_MXC_INT_TVE 92 336#define MX51_MXC_INT_TVE 92
337#define MX51_MXC_INT_FIRI 93 337#define MX51_MXC_INT_FIRI 93
338#define MX51_MXC_INT_PWM2 94 338#define MX51_INT_PWM2 94
339#define MX51_MXC_INT_SLIM_EXP 95 339#define MX51_MXC_INT_SLIM_EXP 95
340#define MX51_INT_SSI3 96 340#define MX51_INT_SSI3 96
341#define MX51_MXC_INT_EMI_BOOT 97 341#define MX51_MXC_INT_EMI_BOOT 97
diff --git a/arch/arm/plat-mxc/include/mach/mx53.h b/arch/arm/plat-mxc/include/mach/mx53.h
index 9577cdbf7fad..d7a8e52181ea 100644
--- a/arch/arm/plat-mxc/include/mach/mx53.h
+++ b/arch/arm/plat-mxc/include/mach/mx53.h
@@ -53,13 +53,13 @@
53#define MX53_SPBA0_BASE_ADDR 0x50000000 53#define MX53_SPBA0_BASE_ADDR 0x50000000
54#define MX53_SPBA0_SIZE SZ_1M 54#define MX53_SPBA0_SIZE SZ_1M
55 55
56#define MX53_MMC_SDHC1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00004000) 56#define MX53_ESDHC1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00004000)
57#define MX53_MMC_SDHC2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00008000) 57#define MX53_ESDHC2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00008000)
58#define MX53_UART3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0000C000) 58#define MX53_UART3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0000C000)
59#define MX53_CSPI1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00010000) 59#define MX53_ECSPI1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00010000)
60#define MX53_SSI2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00014000) 60#define MX53_SSI2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00014000)
61#define MX53_MMC_SDHC3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00020000) 61#define MX53_ESDHC3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00020000)
62#define MX53_MMC_SDHC4_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00024000) 62#define MX53_ESDHC4_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00024000)
63#define MX53_SPDIF_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00028000) 63#define MX53_SPDIF_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00028000)
64#define MX53_ASRC_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0002C000) 64#define MX53_ASRC_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0002C000)
65#define MX53_ATA_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00030000) 65#define MX53_ATA_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00030000)
@@ -117,12 +117,12 @@
117#define MX53_ARM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A0000) 117#define MX53_ARM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A0000)
118#define MX53_OWIRE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A4000) 118#define MX53_OWIRE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A4000)
119#define MX53_FIRI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A8000) 119#define MX53_FIRI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A8000)
120#define MX53_CSPI2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000AC000) 120#define MX53_ECSPI2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000AC000)
121#define MX53_SDMA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B0000) 121#define MX53_SDMA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B0000)
122#define MX53_SCC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B4000) 122#define MX53_SCC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B4000)
123#define MX53_ROMCP_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B8000) 123#define MX53_ROMCP_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B8000)
124#define MX53_RTIC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000BC000) 124#define MX53_RTIC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000BC000)
125#define MX53_CSPI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C0000) 125#define MX53_CSPI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C0000)
126#define MX53_I2C2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C4000) 126#define MX53_I2C2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C4000)
127#define MX53_I2C1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C8000) 127#define MX53_I2C1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C8000)
128#define MX53_SSI1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000CC000) 128#define MX53_SSI1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000CC000)
@@ -136,7 +136,7 @@
136#define MX53_MIPI_HSC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DC000) 136#define MX53_MIPI_HSC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DC000)
137#define MX53_MLB_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E4000) 137#define MX53_MLB_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E4000)
138#define MX53_SSI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E8000) 138#define MX53_SSI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E8000)
139#define MX53_MXC_FEC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000EC000) 139#define MX53_FEC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000EC000)
140#define MX53_TVE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F0000) 140#define MX53_TVE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F0000)
141#define MX53_VPU_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F4000) 141#define MX53_VPU_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F4000)
142#define MX53_SAHARA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F8000) 142#define MX53_SAHARA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F8000)
@@ -229,10 +229,10 @@
229 * Interrupt numbers 229 * Interrupt numbers
230 */ 230 */
231#define MX53_INT_RESV0 0 231#define MX53_INT_RESV0 0
232#define MX53_INT_MMC_SDHC1 1 232#define MX53_INT_ESDHC1 1
233#define MX53_INT_MMC_SDHC2 2 233#define MX53_INT_ESDHC2 2
234#define MX53_INT_MMC_SDHC3 3 234#define MX53_INT_ESDHC3 3
235#define MX53_INT_MMC_SDHC4 4 235#define MX53_INT_ESDHC4 4
236#define MX53_INT_RESV5 5 236#define MX53_INT_RESV5 5
237#define MX53_INT_SDMA 6 237#define MX53_INT_SDMA 6
238#define MX53_INT_IOMUX 7 238#define MX53_INT_IOMUX 7
@@ -264,8 +264,8 @@
264#define MX53_INT_UART3 33 264#define MX53_INT_UART3 33
265#define MX53_INT_RESV34 34 265#define MX53_INT_RESV34 34
266#define MX53_INT_RESV35 35 266#define MX53_INT_RESV35 35
267#define MX53_INT_CSPI1 36 267#define MX53_INT_ECSPI1 36
268#define MX53_INT_CSPI2 37 268#define MX53_INT_ECSPI2 37
269#define MX53_INT_CSPI 38 269#define MX53_INT_CSPI 38
270#define MX53_INT_GPT 39 270#define MX53_INT_GPT 39
271#define MX53_INT_EPIT1 40 271#define MX53_INT_EPIT1 40
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c
index c36f2630ed93..7a61ef8f471a 100644
--- a/arch/arm/plat-mxc/pwm.c
+++ b/arch/arm/plat-mxc/pwm.c
@@ -57,7 +57,7 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
57 if (pwm == NULL || period_ns == 0 || duty_ns > period_ns) 57 if (pwm == NULL || period_ns == 0 || duty_ns > period_ns)
58 return -EINVAL; 58 return -EINVAL;
59 59
60 if (cpu_is_mx27() || cpu_is_mx3() || cpu_is_mx25()) { 60 if (cpu_is_mx27() || cpu_is_mx3() || cpu_is_mx25() || cpu_is_mx51()) {
61 unsigned long long c; 61 unsigned long long c;
62 unsigned long period_cycles, duty_cycles, prescale; 62 unsigned long period_cycles, duty_cycles, prescale;
63 u32 cr; 63 u32 cr;
diff --git a/arch/arm/plat-mxc/tzic.c b/arch/arm/plat-mxc/tzic.c
index e69ed8a8c203..bc3a6be8a27f 100644
--- a/arch/arm/plat-mxc/tzic.c
+++ b/arch/arm/plat-mxc/tzic.c
@@ -69,50 +69,50 @@ static int tzic_set_irq_fiq(unsigned int irq, unsigned int type)
69#endif 69#endif
70 70
71/** 71/**
72 * tzic_mask_irq() - Disable interrupt number "irq" in the TZIC 72 * tzic_mask_irq() - Disable interrupt source "d" in the TZIC
73 * 73 *
74 * @param irq interrupt source number 74 * @param d interrupt source
75 */ 75 */
76static void tzic_mask_irq(unsigned int irq) 76static void tzic_mask_irq(struct irq_data *d)
77{ 77{
78 int index, off; 78 int index, off;
79 79
80 index = irq >> 5; 80 index = d->irq >> 5;
81 off = irq & 0x1F; 81 off = d->irq & 0x1F;
82 __raw_writel(1 << off, tzic_base + TZIC_ENCLEAR0(index)); 82 __raw_writel(1 << off, tzic_base + TZIC_ENCLEAR0(index));
83} 83}
84 84
85/** 85/**
86 * tzic_unmask_irq() - Enable interrupt number "irq" in the TZIC 86 * tzic_unmask_irq() - Enable interrupt source "d" in the TZIC
87 * 87 *
88 * @param irq interrupt source number 88 * @param d interrupt source
89 */ 89 */
90static void tzic_unmask_irq(unsigned int irq) 90static void tzic_unmask_irq(struct irq_data *d)
91{ 91{
92 int index, off; 92 int index, off;
93 93
94 index = irq >> 5; 94 index = d->irq >> 5;
95 off = irq & 0x1F; 95 off = d->irq & 0x1F;
96 __raw_writel(1 << off, tzic_base + TZIC_ENSET0(index)); 96 __raw_writel(1 << off, tzic_base + TZIC_ENSET0(index));
97} 97}
98 98
99static unsigned int wakeup_intr[4]; 99static unsigned int wakeup_intr[4];
100 100
101/** 101/**
102 * tzic_set_wake_irq() - Set interrupt number "irq" in the TZIC as a wake-up source. 102 * tzic_set_wake_irq() - Set interrupt source "d" in the TZIC as a wake-up source.
103 * 103 *
104 * @param irq interrupt source number 104 * @param d interrupt source
105 * @param enable enable as wake-up if equal to non-zero 105 * @param enable enable as wake-up if equal to non-zero
106 * disble as wake-up if equal to zero 106 * disble as wake-up if equal to zero
107 * 107 *
108 * @return This function returns 0 on success. 108 * @return This function returns 0 on success.
109 */ 109 */
110static int tzic_set_wake_irq(unsigned int irq, unsigned int enable) 110static int tzic_set_wake_irq(struct irq_data *d, unsigned int enable)
111{ 111{
112 unsigned int index, off; 112 unsigned int index, off;
113 113
114 index = irq >> 5; 114 index = d->irq >> 5;
115 off = irq & 0x1F; 115 off = d->irq & 0x1F;
116 116
117 if (index > 3) 117 if (index > 3)
118 return -EINVAL; 118 return -EINVAL;
@@ -128,10 +128,10 @@ static int tzic_set_wake_irq(unsigned int irq, unsigned int enable)
128static struct mxc_irq_chip mxc_tzic_chip = { 128static struct mxc_irq_chip mxc_tzic_chip = {
129 .base = { 129 .base = {
130 .name = "MXC_TZIC", 130 .name = "MXC_TZIC",
131 .ack = tzic_mask_irq, 131 .irq_ack = tzic_mask_irq,
132 .mask = tzic_mask_irq, 132 .irq_mask = tzic_mask_irq,
133 .unmask = tzic_unmask_irq, 133 .irq_unmask = tzic_unmask_irq,
134 .set_wake = tzic_set_wake_irq, 134 .irq_set_wake = tzic_set_wake_irq,
135 }, 135 },
136#ifdef CONFIG_FIQ 136#ifdef CONFIG_FIQ
137 .set_irq_fiq = tzic_set_irq_fiq, 137 .set_irq_fiq = tzic_set_irq_fiq,