aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-imx/devices-imx21.h3
-rw-r--r--arch/arm/mach-imx/devices-imx27.h3
-rw-r--r--arch/arm/mach-mx25/devices-imx25.h3
-rw-r--r--arch/arm/mach-mx3/devices-imx31.h3
-rw-r--r--arch/arm/mach-mx3/devices-imx35.h3
-rw-r--r--arch/arm/plat-mxc/devices/platform-mxc_nand.c64
-rw-r--r--arch/arm/plat-mxc/include/mach/devices-common.h12
-rw-r--r--arch/arm/plat-mxc/include/mach/mx21.h2
-rw-r--r--arch/arm/plat-mxc/include/mach/mx25.h2
-rw-r--r--arch/arm/plat-mxc/include/mach/mx27.h2
-rw-r--r--arch/arm/plat-mxc/include/mach/mx31.h2
-rw-r--r--arch/arm/plat-mxc/include/mach/mx35.h2
12 files changed, 64 insertions, 37 deletions
diff --git a/arch/arm/mach-imx/devices-imx21.h b/arch/arm/mach-imx/devices-imx21.h
index 4795d70314db..d189039749b0 100644
--- a/arch/arm/mach-imx/devices-imx21.h
+++ b/arch/arm/mach-imx/devices-imx21.h
@@ -25,8 +25,9 @@ extern const struct imx_imx_uart_1irq_data imx21_imx_uart_data[] __initconst;
25#define imx21_add_imx_uart2(pdata) imx21_add_imx_uart(2, pdata) 25#define imx21_add_imx_uart2(pdata) imx21_add_imx_uart(2, pdata)
26#define imx21_add_imx_uart3(pdata) imx21_add_imx_uart(3, pdata) 26#define imx21_add_imx_uart3(pdata) imx21_add_imx_uart(3, pdata)
27 27
28extern const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst;
28#define imx21_add_mxc_nand(pdata) \ 29#define imx21_add_mxc_nand(pdata) \
29 imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata) 30 imx_add_mxc_nand(&imx21_mxc_nand_data, pdata)
30 31
31extern const struct imx_spi_imx_data imx21_cspi_data[] __initconst; 32extern const struct imx_spi_imx_data imx21_cspi_data[] __initconst;
32#define imx21_add_cspi(id, pdata) \ 33#define imx21_add_cspi(id, pdata) \
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h
index 176552199abc..e11606b4d31c 100644
--- a/arch/arm/mach-imx/devices-imx27.h
+++ b/arch/arm/mach-imx/devices-imx27.h
@@ -27,8 +27,9 @@ extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst;
27#define imx27_add_imx_uart4(pdata) imx27_add_imx_uart(4, pdata) 27#define imx27_add_imx_uart4(pdata) imx27_add_imx_uart(4, pdata)
28#define imx27_add_imx_uart5(pdata) imx27_add_imx_uart(5, pdata) 28#define imx27_add_imx_uart5(pdata) imx27_add_imx_uart(5, pdata)
29 29
30extern const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst;
30#define imx27_add_mxc_nand(pdata) \ 31#define imx27_add_mxc_nand(pdata) \
31 imx_add_mxc_nand_v1(MX27_NFC_BASE_ADDR, MX27_INT_NANDFC, pdata) 32 imx_add_mxc_nand(&imx27_mxc_nand_data, pdata)
32 33
33extern const struct imx_spi_imx_data imx27_cspi_data[] __initconst; 34extern const struct imx_spi_imx_data imx27_cspi_data[] __initconst;
34#define imx27_add_cspi(id, pdata) \ 35#define imx27_add_cspi(id, pdata) \
diff --git a/arch/arm/mach-mx25/devices-imx25.h b/arch/arm/mach-mx25/devices-imx25.h
index 1dd95721d9f5..eab19c0a9429 100644
--- a/arch/arm/mach-mx25/devices-imx25.h
+++ b/arch/arm/mach-mx25/devices-imx25.h
@@ -34,8 +34,9 @@ extern const struct imx_imx_uart_1irq_data imx25_imx_uart_data[] __initconst;
34#define imx25_add_imx_uart3(pdata) imx25_add_imx_uart(3, pdata) 34#define imx25_add_imx_uart3(pdata) imx25_add_imx_uart(3, pdata)
35#define imx25_add_imx_uart4(pdata) imx25_add_imx_uart(4, pdata) 35#define imx25_add_imx_uart4(pdata) imx25_add_imx_uart(4, pdata)
36 36
37extern const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst;
37#define imx25_add_mxc_nand(pdata) \ 38#define imx25_add_mxc_nand(pdata) \
38 imx_add_mxc_nand_v21(MX25_NFC_BASE_ADDR, MX25_INT_NANDFC, pdata) 39 imx_add_mxc_nand(&imx25_mxc_nand_data, pdata)
39 40
40extern const struct imx_spi_imx_data imx25_spi_imx_data[] __initconst; 41extern const struct imx_spi_imx_data imx25_spi_imx_data[] __initconst;
41#define imx25_add_spi_imx(id, pdata) \ 42#define imx25_add_spi_imx(id, pdata) \
diff --git a/arch/arm/mach-mx3/devices-imx31.h b/arch/arm/mach-mx3/devices-imx31.h
index eea425ff074e..de9598590eba 100644
--- a/arch/arm/mach-mx3/devices-imx31.h
+++ b/arch/arm/mach-mx3/devices-imx31.h
@@ -29,8 +29,9 @@ extern const struct imx_imx_uart_1irq_data imx31_imx_uart_data[] __initconst;
29#define imx31_add_imx_uart3(pdata) imx31_add_imx_uart(3, pdata) 29#define imx31_add_imx_uart3(pdata) imx31_add_imx_uart(3, pdata)
30#define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata) 30#define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata)
31 31
32extern const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst;
32#define imx31_add_mxc_nand(pdata) \ 33#define imx31_add_mxc_nand(pdata) \
33 imx_add_mxc_nand_v1(MX31_NFC_BASE_ADDR, MX31_INT_NANDFC, pdata) 34 imx_add_mxc_nand(&imx31_mxc_nand_data, pdata)
34 35
35extern const struct imx_spi_imx_data imx31_cspi_data[] __initconst; 36extern const struct imx_spi_imx_data imx31_cspi_data[] __initconst;
36#define imx31_add_cspi(id, pdata) \ 37#define imx31_add_cspi(id, pdata) \
diff --git a/arch/arm/mach-mx3/devices-imx35.h b/arch/arm/mach-mx3/devices-imx35.h
index f187d3552738..56404de907f9 100644
--- a/arch/arm/mach-mx3/devices-imx35.h
+++ b/arch/arm/mach-mx3/devices-imx35.h
@@ -32,8 +32,9 @@ extern const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst;
32#define imx35_add_imx_uart1(pdata) imx35_add_imx_uart(1, pdata) 32#define imx35_add_imx_uart1(pdata) imx35_add_imx_uart(1, pdata)
33#define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata) 33#define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata)
34 34
35extern const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst;
35#define imx35_add_mxc_nand(pdata) \ 36#define imx35_add_mxc_nand(pdata) \
36 imx_add_mxc_nand_v21(MX35_NFC_BASE_ADDR, MX35_INT_NANDFC, pdata) 37 imx_add_mxc_nand(&imx35_mxc_nand_data, pdata)
37 38
38extern const struct imx_spi_imx_data imx35_cspi_data[] __initconst; 39extern const struct imx_spi_imx_data imx35_cspi_data[] __initconst;
39#define imx35_add_cspi(id, pdata) \ 40#define imx35_add_cspi(id, pdata) \
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_nand.c b/arch/arm/plat-mxc/devices/platform-mxc_nand.c
index 1c286418d123..6d3a4785f95b 100644
--- a/arch/arm/plat-mxc/devices/platform-mxc_nand.c
+++ b/arch/arm/plat-mxc/devices/platform-mxc_nand.c
@@ -7,38 +7,56 @@
7 * Free Software Foundation. 7 * Free Software Foundation.
8 */ 8 */
9#include <asm/sizes.h> 9#include <asm/sizes.h>
10#include <mach/hardware.h>
10#include <mach/devices-common.h> 11#include <mach/devices-common.h>
11 12
12static struct platform_device *__init imx_add_mxc_nand(resource_size_t iobase, 13#define imx_mxc_nand_data_entry_single(soc, _size) \
13 int irq, const struct mxc_nand_platform_data *pdata, 14 { \
14 resource_size_t iosize) 15 .iobase = soc ## _NFC_BASE_ADDR, \
16 .iosize = _size, \
17 .irq = soc ## _INT_NFC \
18 }
19
20#ifdef CONFIG_SOC_IMX21
21const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst =
22 imx_mxc_nand_data_entry_single(MX21, SZ_4K);
23#endif /* ifdef CONFIG_SOC_IMX21 */
24
25#ifdef CONFIG_ARCH_MX25
26const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst =
27 imx_mxc_nand_data_entry_single(MX25, SZ_8K);
28#endif /* ifdef CONFIG_ARCH_MX25 */
29
30#ifdef CONFIG_SOC_IMX27
31const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst =
32 imx_mxc_nand_data_entry_single(MX27, SZ_4K);
33#endif /* ifdef CONFIG_SOC_IMX27 */
34
35#ifdef CONFIG_ARCH_MX31
36const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst =
37 imx_mxc_nand_data_entry_single(MX31, SZ_4K);
38#endif
39
40#ifdef CONFIG_ARCH_MX35
41const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst =
42 imx_mxc_nand_data_entry_single(MX35, SZ_8K);
43#endif
44
45struct platform_device *__init imx_add_mxc_nand(
46 const struct imx_mxc_nand_data *data,
47 const struct mxc_nand_platform_data *pdata)
15{ 48{
16 static int id = 0;
17
18 struct resource res[] = { 49 struct resource res[] = {
19 { 50 {
20 .start = iobase, 51 .start = data->iobase,
21 .end = iobase + iosize - 1, 52 .end = data->iobase + data->iosize - 1,
22 .flags = IORESOURCE_MEM, 53 .flags = IORESOURCE_MEM,
23 }, { 54 }, {
24 .start = irq, 55 .start = data->irq,
25 .end = irq, 56 .end = data->irq,
26 .flags = IORESOURCE_IRQ, 57 .flags = IORESOURCE_IRQ,
27 }, 58 },
28 }; 59 };
29 60 return imx_add_platform_device("mxc_nand", 0, res, ARRAY_SIZE(res),
30 return imx_add_platform_device("mxc_nand", id++, res, ARRAY_SIZE(res),
31 pdata, sizeof(*pdata)); 61 pdata, sizeof(*pdata));
32} 62}
33
34struct platform_device *__init imx_add_mxc_nand_v1(resource_size_t iobase,
35 int irq, const struct mxc_nand_platform_data *pdata)
36{
37 return imx_add_mxc_nand(iobase, irq, pdata, SZ_4K);
38}
39
40struct platform_device *__init imx_add_mxc_nand_v21(resource_size_t iobase,
41 int irq, const struct mxc_nand_platform_data *pdata)
42{
43 return imx_add_mxc_nand(iobase, irq, pdata, SZ_8K);
44}
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
index 32b8f3674cc9..371336ee9d7f 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -70,10 +70,14 @@ struct platform_device *__init imx_add_imx_uart_1irq(
70 const struct imxuart_platform_data *pdata); 70 const struct imxuart_platform_data *pdata);
71 71
72#include <mach/mxc_nand.h> 72#include <mach/mxc_nand.h>
73struct platform_device *__init imx_add_mxc_nand_v1(resource_size_t iobase, 73struct imx_mxc_nand_data {
74 int irq, const struct mxc_nand_platform_data *pdata); 74 resource_size_t iobase;
75struct platform_device *__init imx_add_mxc_nand_v21(resource_size_t iobase, 75 resource_size_t iosize;
76 int irq, const struct mxc_nand_platform_data *pdata); 76 resource_size_t irq;
77};
78struct platform_device *__init imx_add_mxc_nand(
79 const struct imx_mxc_nand_data *data,
80 const struct mxc_nand_platform_data *pdata);
77 81
78#include <mach/spi.h> 82#include <mach/spi.h>
79struct imx_spi_imx_data { 83struct imx_spi_imx_data {
diff --git a/arch/arm/plat-mxc/include/mach/mx21.h b/arch/arm/plat-mxc/include/mach/mx21.h
index ed98b9c9f389..8bc59720b6e4 100644
--- a/arch/arm/plat-mxc/include/mach/mx21.h
+++ b/arch/arm/plat-mxc/include/mach/mx21.h
@@ -120,7 +120,7 @@
120#define MX21_INT_GPT1 26 120#define MX21_INT_GPT1 26
121#define MX21_INT_WDOG 27 121#define MX21_INT_WDOG 27
122#define MX21_INT_PCMCIA 28 122#define MX21_INT_PCMCIA 28
123#define MX21_INT_NANDFC 29 123#define MX21_INT_NFC 29
124#define MX21_INT_BMI 30 124#define MX21_INT_BMI 30
125#define MX21_INT_CSI 31 125#define MX21_INT_CSI 31
126#define MX21_INT_DMACH0 32 126#define MX21_INT_DMACH0 32
diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h
index 8f809eb084df..a9e1095d7486 100644
--- a/arch/arm/plat-mxc/include/mach/mx25.h
+++ b/arch/arm/plat-mxc/include/mach/mx25.h
@@ -69,7 +69,7 @@
69#define MX25_INT_KPP 24 69#define MX25_INT_KPP 24
70#define MX25_INT_DRYICE 25 70#define MX25_INT_DRYICE 25
71#define MX25_INT_UART2 32 71#define MX25_INT_UART2 32
72#define MX25_INT_NANDFC 33 72#define MX25_INT_NFC 33
73#define MX25_INT_LCDC 39 73#define MX25_INT_LCDC 39
74#define MX25_INT_UART5 40 74#define MX25_INT_UART5 40
75#define MX25_INT_CAN1 43 75#define MX25_INT_CAN1 43
diff --git a/arch/arm/plat-mxc/include/mach/mx27.h b/arch/arm/plat-mxc/include/mach/mx27.h
index a8ab2e02a8ca..2237ba2e5351 100644
--- a/arch/arm/plat-mxc/include/mach/mx27.h
+++ b/arch/arm/plat-mxc/include/mach/mx27.h
@@ -167,7 +167,7 @@ static inline void mx27_setup_weimcs(size_t cs,
167#define MX27_INT_GPT1 26 167#define MX27_INT_GPT1 26
168#define MX27_INT_WDOG 27 168#define MX27_INT_WDOG 27
169#define MX27_INT_PCMCIA 28 169#define MX27_INT_PCMCIA 28
170#define MX27_INT_NANDFC 29 170#define MX27_INT_NFC 29
171#define MX27_INT_ATA 30 171#define MX27_INT_ATA 30
172#define MX27_INT_CSI 31 172#define MX27_INT_CSI 31
173#define MX27_INT_DMACH0 32 173#define MX27_INT_DMACH0 32
diff --git a/arch/arm/plat-mxc/include/mach/mx31.h b/arch/arm/plat-mxc/include/mach/mx31.h
index eb8bbc7eedfa..03e2afabc9fc 100644
--- a/arch/arm/plat-mxc/include/mach/mx31.h
+++ b/arch/arm/plat-mxc/include/mach/mx31.h
@@ -168,7 +168,7 @@ static inline void mx31_setup_weimcs(size_t cs,
168#define MX31_INT_POWER_FAIL 30 168#define MX31_INT_POWER_FAIL 30
169#define MX31_INT_CCM_DVFS 31 169#define MX31_INT_CCM_DVFS 31
170#define MX31_INT_UART2 32 170#define MX31_INT_UART2 32
171#define MX31_INT_NANDFC 33 171#define MX31_INT_NFC 33
172#define MX31_INT_SDMA 34 172#define MX31_INT_SDMA 34
173#define MX31_INT_USB1 35 173#define MX31_INT_USB1 35
174#define MX31_INT_USB2 36 174#define MX31_INT_USB2 36
diff --git a/arch/arm/plat-mxc/include/mach/mx35.h b/arch/arm/plat-mxc/include/mach/mx35.h
index 867b8c0ca105..9f0a1ee126ee 100644
--- a/arch/arm/plat-mxc/include/mach/mx35.h
+++ b/arch/arm/plat-mxc/include/mach/mx35.h
@@ -145,7 +145,7 @@
145#define MX35_INT_GPT 29 145#define MX35_INT_GPT 29
146#define MX35_INT_POWER_FAIL 30 146#define MX35_INT_POWER_FAIL 30
147#define MX35_INT_UART2 32 147#define MX35_INT_UART2 32
148#define MX35_INT_NANDFC 33 148#define MX35_INT_NFC 33
149#define MX35_INT_SDMA 34 149#define MX35_INT_SDMA 34
150#define MX35_INT_USBHS 35 150#define MX35_INT_USBHS 35
151#define MX35_INT_USBOTG 37 151#define MX35_INT_USBOTG 37