Hi there!

This patchset contains only cherry-picked patches from Linus' current
tree. Without these patches, the Genesi Smarttop does not recognize the
onboard SSD-chip. The required driver (pata_imx) is already included in
the ARM verion of the kernel, only the bindings with the board are
missing.

Instead of sending all patches in separate emails, I'm attaching them
numbered and all for easy inclusion in the F15 kernel. I have done
local testing and can happily report that the 2.6.41.6-1 kernel can use
the onboard SSD when appying these patches.

I (and other Fedora ARM owners of a Smarttop) appreciate it if these
patches can be included in a next release. Many thanks,
Niels

---
Arnaud Patard (4):
  imx51: add pata device
  imx51: add pata clock
  imx: efika: Enable pata.
  Fix pata imx resource

Fabio Estevam (1):
  ARM: imx: Add PATA resources for other i.MX processors

Uwe Kleine-König (1):
  ARM: mx5: fix remaining inconsistent names for irqs

 arch/arm/mach-mx5/Kconfig                       |    1 +
 arch/arm/mach-mx5/clock-mx51-mx53.c             |    7 +-
 arch/arm/mach-mx5/devices-imx51.h               |    4 +
 arch/arm/mach-mx5/devices.c                     |   10 +-
 arch/arm/mach-mx5/mm.c                          |    8 +-
 arch/arm/mach-mx5/mx51_efika.c                  |    2 +
 arch/arm/plat-mxc/devices/Kconfig               |    3 +
 arch/arm/plat-mxc/devices/Makefile              |    1 +
 arch/arm/plat-mxc/devices/platform-pata_imx.c   |   59 ++++++++
 arch/arm/plat-mxc/include/mach/devices-common.h |    8 +
 arch/arm/plat-mxc/include/mach/mx35.h           |    2 +-
 arch/arm/plat-mxc/include/mach/mx51.h           |  162 +++++++++++-----------
 12 files changed, 175 insertions(+), 92 deletions(-)
 create mode 100644 arch/arm/plat-mxc/devices/platform-pata_imx.c

>From e48b415ed7422c369e7186cc8edbd4886de0911b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <[email protected]>
Date: Mon, 25 Jul 2011 12:05:09 +0200
Subject: [PATCH 1/6] ARM: mx5: fix remaining inconsistent names for irqs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Uwe Kleine-König <[email protected]>
---
 arch/arm/mach-mx5/clock-mx51-mx53.c   |    2 +-
 arch/arm/mach-mx5/devices.c           |   10 +-
 arch/arm/mach-mx5/mm.c                |    8 +-
 arch/arm/plat-mxc/include/mach/mx51.h |  162 ++++++++++++++++----------------
 4 files changed, 91 insertions(+), 91 deletions(-)

diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c 
b/arch/arm/mach-mx5/clock-mx51-mx53.c
index f7bf996..a3db355 100644
--- a/arch/arm/mach-mx5/clock-mx51-mx53.c
+++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
@@ -1568,7 +1568,7 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned 
long osc,
 
        /* System timer */
        mxc_timer_init(&gpt_clk, MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR),
-               MX51_MXC_INT_GPT);
+               MX51_INT_GPT);
        return 0;
 }
 
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c
index 371ca8c..5fd8f0c 100644
--- a/arch/arm/mach-mx5/devices.c
+++ b/arch/arm/mach-mx5/devices.c
@@ -23,8 +23,8 @@ static struct resource mxc_hsi2c_resources[] = {
                .flags = IORESOURCE_MEM,
        },
        {
-               .start = MX51_MXC_INT_HS_I2C,
-               .end = MX51_MXC_INT_HS_I2C,
+               .start = MX51_INT_HS_I2C,
+               .end = MX51_INT_HS_I2C,
                .flags = IORESOURCE_IRQ,
        },
 };
@@ -45,7 +45,7 @@ static struct resource usbotg_resources[] = {
                .flags = IORESOURCE_MEM,
        },
        {
-               .start = MX51_MXC_INT_USB_OTG,
+               .start = MX51_INT_USB_OTG,
                .flags = IORESOURCE_IRQ,
        },
 };
@@ -80,7 +80,7 @@ static struct resource usbh1_resources[] = {
                .flags = IORESOURCE_MEM,
        },
        {
-               .start = MX51_MXC_INT_USB_H1,
+               .start = MX51_INT_USB_H1,
                .flags = IORESOURCE_IRQ,
        },
 };
@@ -103,7 +103,7 @@ static struct resource usbh2_resources[] = {
                .flags = IORESOURCE_MEM,
        },
        {
-               .start = MX51_MXC_INT_USB_H2,
+               .start = MX51_INT_USB_H2,
                .flags = IORESOURCE_IRQ,
        },
 };
diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c
index baea6e5..fcc5c4c 100644
--- a/arch/arm/mach-mx5/mm.c
+++ b/arch/arm/mach-mx5/mm.c
@@ -141,10 +141,10 @@ static struct sdma_platform_data imx53_sdma_pdata 
__initdata = {
 void __init imx51_soc_init(void)
 {
        /* i.mx51 has the i.mx31 type gpio */
-       mxc_register_gpio("imx31-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, 
MX51_MXC_INT_GPIO1_LOW, MX51_MXC_INT_GPIO1_HIGH);
-       mxc_register_gpio("imx31-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, 
MX51_MXC_INT_GPIO2_LOW, MX51_MXC_INT_GPIO2_HIGH);
-       mxc_register_gpio("imx31-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, 
MX51_MXC_INT_GPIO3_LOW, MX51_MXC_INT_GPIO3_HIGH);
-       mxc_register_gpio("imx31-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, 
MX51_MXC_INT_GPIO4_LOW, MX51_MXC_INT_GPIO4_HIGH);
+       mxc_register_gpio("imx31-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, 
MX51_INT_GPIO1_LOW, MX51_INT_GPIO1_HIGH);
+       mxc_register_gpio("imx31-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, 
MX51_INT_GPIO2_LOW, MX51_INT_GPIO2_HIGH);
+       mxc_register_gpio("imx31-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, 
MX51_INT_GPIO3_LOW, MX51_INT_GPIO3_HIGH);
+       mxc_register_gpio("imx31-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, 
MX51_INT_GPIO4_LOW, MX51_INT_GPIO4_HIGH);
 
        /* i.mx51 has the i.mx35 type sdma */
        imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, 
&imx51_sdma_pdata);
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h 
b/arch/arm/plat-mxc/include/mach/mx51.h
index dede19a..d240b6f 100644
--- a/arch/arm/plat-mxc/include/mach/mx51.h
+++ b/arch/arm/plat-mxc/include/mach/mx51.h
@@ -240,110 +240,110 @@
 /*
  * Interrupt numbers
  */
-#define MX51_MXC_INT_BASE              0
-#define MX51_MXC_INT_RESV0             0
+#define MX51_INT_BASE                  0
+#define MX51_INT_RESV0                 0
 #define MX51_INT_ESDHC1                        1
 #define MX51_INT_ESDHC2                        2
 #define MX51_INT_ESDHC3                        3
 #define MX51_INT_ESDHC4                        4
-#define MX51_MXC_INT_RESV5             5
+#define MX51_INT_RESV5                 5
 #define MX51_INT_SDMA                  6
-#define MX51_MXC_INT_IOMUX             7
+#define MX51_INT_IOMUX                 7
 #define MX51_INT_NFC                   8
-#define MX51_MXC_INT_VPU               9
+#define MX51_INT_VPU                   9
 #define MX51_INT_IPU_ERR               10
 #define MX51_INT_IPU_SYN               11
-#define MX51_MXC_INT_GPU               12
-#define MX51_MXC_INT_RESV13            13
-#define MX51_MXC_INT_USB_H1            14
-#define MX51_MXC_INT_EMI               15
-#define MX51_MXC_INT_USB_H2            16
-#define MX51_MXC_INT_USB_H3            17
-#define MX51_MXC_INT_USB_OTG           18
-#define MX51_MXC_INT_SAHARA_H0         19
-#define MX51_MXC_INT_SAHARA_H1         20
-#define MX51_MXC_INT_SCC_SMN           21
-#define MX51_MXC_INT_SCC_STZ           22
-#define MX51_MXC_INT_SCC_SCM           23
-#define MX51_MXC_INT_SRTC_NTZ          24
-#define MX51_MXC_INT_SRTC_TZ           25
-#define MX51_MXC_INT_RTIC              26
-#define MX51_MXC_INT_CSU               27
-#define MX51_MXC_INT_SLIM_B            28
+#define MX51_INT_GPU                   12
+#define MX51_INT_RESV13                        13
+#define MX51_INT_USB_H1                        14
+#define MX51_INT_EMI                   15
+#define MX51_INT_USB_H2                        16
+#define MX51_INT_USB_H3                        17
+#define MX51_INT_USB_OTG               18
+#define MX51_INT_SAHARA_H0             19
+#define MX51_INT_SAHARA_H1             20
+#define MX51_INT_SCC_SMN               21
+#define MX51_INT_SCC_STZ               22
+#define MX51_INT_SCC_SCM               23
+#define MX51_INT_SRTC_NTZ              24
+#define MX51_INT_SRTC_TZ               25
+#define MX51_INT_RTIC                  26
+#define MX51_INT_CSU                   27
+#define MX51_INT_SLIM_B                        28
 #define MX51_INT_SSI1                  29
 #define MX51_INT_SSI2                  30
 #define MX51_INT_UART1                 31
 #define MX51_INT_UART2                 32
 #define MX51_INT_UART3                 33
-#define MX51_MXC_INT_RESV34            34
-#define MX51_MXC_INT_RESV35            35
+#define MX51_INT_RESV34                        34
+#define MX51_INT_RESV35                        35
 #define MX51_INT_ECSPI1                        36
 #define MX51_INT_ECSPI2                        37
 #define MX51_INT_CSPI                  38
-#define MX51_MXC_INT_GPT               39
-#define MX51_MXC_INT_EPIT1             40
-#define MX51_MXC_INT_EPIT2             41
-#define MX51_MXC_INT_GPIO1_INT7                42
-#define MX51_MXC_INT_GPIO1_INT6                43
-#define MX51_MXC_INT_GPIO1_INT5                44
-#define MX51_MXC_INT_GPIO1_INT4                45
-#define MX51_MXC_INT_GPIO1_INT3                46
-#define MX51_MXC_INT_GPIO1_INT2                47
-#define MX51_MXC_INT_GPIO1_INT1                48
-#define MX51_MXC_INT_GPIO1_INT0                49
-#define MX51_MXC_INT_GPIO1_LOW         50
-#define MX51_MXC_INT_GPIO1_HIGH                51
-#define MX51_MXC_INT_GPIO2_LOW         52
-#define MX51_MXC_INT_GPIO2_HIGH                53
-#define MX51_MXC_INT_GPIO3_LOW         54
-#define MX51_MXC_INT_GPIO3_HIGH                55
-#define MX51_MXC_INT_GPIO4_LOW         56
-#define MX51_MXC_INT_GPIO4_HIGH                57
-#define MX51_MXC_INT_WDOG1             58
-#define MX51_MXC_INT_WDOG2             59
+#define MX51_INT_GPT                   39
+#define MX51_INT_EPIT1                 40
+#define MX51_INT_EPIT2                 41
+#define MX51_INT_GPIO1_INT7            42
+#define MX51_INT_GPIO1_INT6            43
+#define MX51_INT_GPIO1_INT5            44
+#define MX51_INT_GPIO1_INT4            45
+#define MX51_INT_GPIO1_INT3            46
+#define MX51_INT_GPIO1_INT2            47
+#define MX51_INT_GPIO1_INT1            48
+#define MX51_INT_GPIO1_INT0            49
+#define MX51_INT_GPIO1_LOW             50
+#define MX51_INT_GPIO1_HIGH            51
+#define MX51_INT_GPIO2_LOW             52
+#define MX51_INT_GPIO2_HIGH            53
+#define MX51_INT_GPIO3_LOW             54
+#define MX51_INT_GPIO3_HIGH            55
+#define MX51_INT_GPIO4_LOW             56
+#define MX51_INT_GPIO4_HIGH            57
+#define MX51_INT_WDOG1                 58
+#define MX51_INT_WDOG2                 59
 #define MX51_INT_KPP                   60
 #define MX51_INT_PWM1                  61
 #define MX51_INT_I2C1                  62
 #define MX51_INT_I2C2                  63
-#define MX51_MXC_INT_HS_I2C            64
-#define MX51_MXC_INT_RESV65            65
-#define MX51_MXC_INT_RESV66            66
-#define MX51_MXC_INT_SIM_IPB           67
-#define MX51_MXC_INT_SIM_DAT           68
-#define MX51_MXC_INT_IIM               69
-#define MX51_MXC_INT_ATA               70
-#define MX51_MXC_INT_CCM1              71
-#define MX51_MXC_INT_CCM2              72
-#define MX51_MXC_INT_GPC1              73
-#define MX51_MXC_INT_GPC2              74
-#define MX51_MXC_INT_SRC               75
-#define MX51_MXC_INT_NM                        76
-#define MX51_MXC_INT_PMU               77
-#define MX51_MXC_INT_CTI_IRQ           78
-#define MX51_MXC_INT_CTI1_TG0          79
-#define MX51_MXC_INT_CTI1_TG1          80
-#define MX51_MXC_INT_MCG_ERR           81
-#define MX51_MXC_INT_MCG_TMR           82
-#define MX51_MXC_INT_MCG_FUNC          83
-#define MX51_MXC_INT_GPU2_IRQ          84
-#define MX51_MXC_INT_GPU2_BUSY         85
-#define MX51_MXC_INT_RESV86            86
+#define MX51_INT_HS_I2C                        64
+#define MX51_INT_RESV65                        65
+#define MX51_INT_RESV66                        66
+#define MX51_INT_SIM_IPB               67
+#define MX51_INT_SIM_DAT               68
+#define MX51_INT_IIM                   69
+#define MX51_INT_ATA                   70
+#define MX51_INT_CCM1                  71
+#define MX51_INT_CCM2                  72
+#define MX51_INT_GPC1                          73
+#define MX51_INT_GPC2                  74
+#define MX51_INT_SRC                   75
+#define MX51_INT_NM                    76
+#define MX51_INT_PMU                   77
+#define MX51_INT_CTI_IRQ               78
+#define MX51_INT_CTI1_TG0              79
+#define MX51_INT_CTI1_TG1              80
+#define MX51_INT_MCG_ERR               81
+#define MX51_INT_MCG_TMR               82
+#define MX51_INT_MCG_FUNC              83
+#define MX51_INT_GPU2_IRQ              84
+#define MX51_INT_GPU2_BUSY             85
+#define MX51_INT_RESV86                        86
 #define MX51_INT_FEC                   87
-#define MX51_MXC_INT_OWIRE             88
-#define MX51_MXC_INT_CTI1_TG2          89
-#define MX51_MXC_INT_SJC               90
-#define MX51_MXC_INT_SPDIF             91
-#define MX51_MXC_INT_TVE               92
-#define MX51_MXC_INT_FIRI              93
+#define MX51_INT_OWIRE                 88
+#define MX51_INT_CTI1_TG2              89
+#define MX51_INT_SJC                   90
+#define MX51_INT_SPDIF                 91
+#define MX51_INT_TVE                   92
+#define MX51_INT_FIRI                  93
 #define MX51_INT_PWM2                  94
-#define MX51_MXC_INT_SLIM_EXP          95
+#define MX51_INT_SLIM_EXP              95
 #define MX51_INT_SSI3                  96
-#define MX51_MXC_INT_EMI_BOOT          97
-#define MX51_MXC_INT_CTI1_TG3          98
-#define MX51_MXC_INT_SMC_RX            99
-#define MX51_MXC_INT_VPU_IDLE          100
-#define MX51_MXC_INT_EMI_NFC           101
-#define MX51_MXC_INT_GPU_IDLE          102
+#define MX51_INT_EMI_BOOT              97
+#define MX51_INT_CTI1_TG3              98
+#define MX51_INT_SMC_RX                        99
+#define MX51_INT_VPU_IDLE              100
+#define MX51_INT_EMI_NFC               101
+#define MX51_INT_GPU_IDLE              102
 
 #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)
 extern int mx51_revision(void);
-- 
1.7.0.1

>From 5622474fee60e10a237d59f1738a84cfc1ace96b Mon Sep 17 00:00:00 2001
From: Arnaud Patard (Rtp) <[email protected]>
Date: Tue, 26 Jul 2011 16:54:25 +0200
Subject: [PATCH 2/6] imx51: add pata device

Declare the pata device found on mx51

Signed-off-by: Arnaud Patard <[email protected]>
Signed-off-by: Sascha Hauer <[email protected]>
---
 arch/arm/mach-mx5/devices-imx51.h               |    4 ++
 arch/arm/plat-mxc/devices/Kconfig               |    3 ++
 arch/arm/plat-mxc/devices/Makefile              |    1 +
 arch/arm/plat-mxc/devices/platform-pata_imx.c   |   38 +++++++++++++++++++++++
 arch/arm/plat-mxc/include/mach/devices-common.h |    7 ++++
 5 files changed, 53 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-mxc/devices/platform-pata_imx.c

diff --git a/arch/arm/mach-mx5/devices-imx51.h 
b/arch/arm/mach-mx5/devices-imx51.h
index e11bc0e..89fe77f 100644
--- a/arch/arm/mach-mx5/devices-imx51.h
+++ b/arch/arm/mach-mx5/devices-imx51.h
@@ -52,3 +52,7 @@ extern const struct imx_mxc_pwm_data imx51_mxc_pwm_data[];
 extern const struct imx_imx_keypad_data imx51_imx_keypad_data;
 #define imx51_add_imx_keypad(pdata)    \
        imx_add_imx_keypad(&imx51_imx_keypad_data, pdata)
+
+extern const struct imx_pata_imx_data imx51_pata_imx_data;
+#define imx51_add_pata_imx() \
+       imx_add_pata_imx(&imx51_pata_imx_data)
diff --git a/arch/arm/plat-mxc/devices/Kconfig 
b/arch/arm/plat-mxc/devices/Kconfig
index bd294ad..c55916c 100644
--- a/arch/arm/plat-mxc/devices/Kconfig
+++ b/arch/arm/plat-mxc/devices/Kconfig
@@ -31,6 +31,9 @@ config IMX_HAVE_PLATFORM_IMX_I2C
 config IMX_HAVE_PLATFORM_IMX_KEYPAD
        bool
 
+config IMX_HAVE_PLATFORM_PATA_IMX
+       bool
+
 config IMX_HAVE_PLATFORM_IMX_SSI
        bool
 
diff --git a/arch/arm/plat-mxc/devices/Makefile 
b/arch/arm/plat-mxc/devices/Makefile
index b41bf97..a093b45 100644
--- a/arch/arm/plat-mxc/devices/Makefile
+++ b/arch/arm/plat-mxc/devices/Makefile
@@ -10,6 +10,7 @@ obj-y += platform-imx-dma.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_FB) += platform-imx-fb.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_KEYPAD) += platform-imx-keypad.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_PATA_IMX) += platform-pata_imx.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o
diff --git a/arch/arm/plat-mxc/devices/platform-pata_imx.c 
b/arch/arm/plat-mxc/devices/platform-pata_imx.c
new file mode 100644
index 0000000..c1cbaf9
--- /dev/null
+++ b/arch/arm/plat-mxc/devices/platform-pata_imx.c
@@ -0,0 +1,38 @@
+/*
+ * This program is free software; you can redistribute it and/or modify it 
under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include <mach/devices-common.h>
+
+#define imx_pata_imx_data_entry_single(soc)                            \
+       {                                                               \
+               .iobase = soc ## _ATA_BASE_ADDR,                        \
+               .irq = soc ## _MXC_INT_ATA,                             \
+       }
+
+#ifdef CONFIG_SOC_IMX51
+const struct imx_pata_imx_data imx51_pata_imx_data __initconst =
+       imx_pata_imx_data_entry_single(MX51);
+#endif /* ifdef CONFIG_SOC_IMX51 */
+
+struct platform_device *__init imx_add_pata_imx(
+               const struct imx_pata_imx_data *data)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobase,
+                       .end = data->iobase + SZ_16K - 1,
+                       .flags = IORESOURCE_MEM,
+               },
+               {
+                       .start = data->irq,
+                       .end = data->irq,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+       return imx_add_platform_device("pata_imx", -1,
+                       res, ARRAY_SIZE(res), NULL, 0);
+}
+
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h 
b/arch/arm/plat-mxc/include/mach/devices-common.h
index 524538a..1b76c67 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -251,6 +251,13 @@ struct platform_device *__init imx_add_mxc_nand(
                const struct imx_mxc_nand_data *data,
                const struct mxc_nand_platform_data *pdata);
 
+struct imx_pata_imx_data {
+       resource_size_t iobase;
+       resource_size_t irq;
+};
+struct platform_device *__init imx_add_pata_imx(
+               const struct imx_pata_imx_data *data);
+
 struct imx_mxc_pwm_data {
        int id;
        resource_size_t iobase;
-- 
1.7.0.1

>From dba70e158041967960fee634a73109b210927ba7 Mon Sep 17 00:00:00 2001
From: Arnaud Patard (Rtp) <[email protected]>
Date: Tue, 26 Jul 2011 16:54:26 +0200
Subject: [PATCH 3/6] imx51: add pata clock

Define the clock used by the imx51 pata device.

Signed-off-by: Arnaud Patard <[email protected]>
Signed-off-by: Sascha Hauer <[email protected]>
---
 arch/arm/mach-mx5/clock-mx51-mx53.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c 
b/arch/arm/mach-mx5/clock-mx51-mx53.c
index a3db355..d01802e 100644
--- a/arch/arm/mach-mx5/clock-mx51-mx53.c
+++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
@@ -1418,6 +1418,10 @@ DEFINE_CLOCK(ipu_di0_clk, 0, MXC_CCM_CCGR6, 
MXC_CCM_CCGRx_CG5_OFFSET,
 DEFINE_CLOCK(ipu_di1_clk, 0, MXC_CCM_CCGR6, MXC_CCM_CCGRx_CG6_OFFSET,
                NULL, NULL, &pll3_sw_clk, NULL);
 
+/* PATA */
+DEFINE_CLOCK(pata_clk, 0, MXC_CCM_CCGR4, MXC_CCM_CCGRx_CG0_OFFSET,
+               NULL, NULL, &ipg_clk, &spba_clk);
+
 #define _REGISTER_CLOCK(d, n, c) \
        { \
                .dev_id = d, \
@@ -1474,6 +1478,7 @@ static struct clk_lookup mx51_lookups[] = {
        _REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk)
        _REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk)
        _REGISTER_CLOCK(NULL, "gpc_dvfs", gpc_dvfs_clk)
+       _REGISTER_CLOCK("pata_imx", NULL, pata_clk)
 };
 
 static struct clk_lookup mx53_lookups[] = {
-- 
1.7.0.1

>From 718cd475926f1dae8100cbd0426cce7984c00651 Mon Sep 17 00:00:00 2001
From: Arnaud Patard (Rtp) <[email protected]>
Date: Tue, 26 Jul 2011 16:54:27 +0200
Subject: [PATCH 4/6] imx: efika: Enable pata.

Enable pata support on efika mx/sb platforms.

Signed-off-by: Arnaud Patard <[email protected]>
Signed-off-by: Sascha Hauer <[email protected]>
---
 arch/arm/mach-mx5/Kconfig      |    1 +
 arch/arm/mach-mx5/mx51_efika.c |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
index b4e7c58..28b94e0 100644
--- a/arch/arm/mach-mx5/Kconfig
+++ b/arch/arm/mach-mx5/Kconfig
@@ -147,6 +147,7 @@ config MX51_EFIKA_COMMON
        bool
        select SOC_IMX51
        select IMX_HAVE_PLATFORM_IMX_UART
+       select IMX_HAVE_PLATFORM_PATA_IMX
        select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
        select IMX_HAVE_PLATFORM_SPI_IMX
        select MXC_ULPI if USB_ULPI
diff --git a/arch/arm/mach-mx5/mx51_efika.c b/arch/arm/mach-mx5/mx51_efika.c
index c920945..0d738fd 100644
--- a/arch/arm/mach-mx5/mx51_efika.c
+++ b/arch/arm/mach-mx5/mx51_efika.c
@@ -627,6 +627,8 @@ void __init efika_board_common_init(void)
                ARRAY_SIZE(mx51_efika_spi_board_info));
        imx51_add_ecspi(0, &mx51_efika_spi_pdata);
 
+       imx51_add_pata_imx();
+
 #if defined(CONFIG_CPU_FREQ_IMX)
        get_cpu_op = mx51_get_cpu_op;
 #endif
-- 
1.7.0.1

>From 58061623ba965ed94c3d297725957303f3082ac4 Mon Sep 17 00:00:00 2001
From: Fabio Estevam <[email protected]>
Date: Tue, 23 Aug 2011 17:18:06 -0300
Subject: [PATCH 5/6] ARM: imx: Add PATA resources for other i.MX processors

MX27/31/35/53 also have PATA block.

Add PATA resources for them.

Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Sascha Hauer <[email protected]>
---
 arch/arm/plat-mxc/devices/platform-pata_imx.c   |   29 +++++++++++++++++++---
 arch/arm/plat-mxc/include/mach/devices-common.h |    1 +
 arch/arm/plat-mxc/include/mach/mx35.h           |    2 +-
 3 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-mxc/devices/platform-pata_imx.c 
b/arch/arm/plat-mxc/devices/platform-pata_imx.c
index c1cbaf9..de33048 100644
--- a/arch/arm/plat-mxc/devices/platform-pata_imx.c
+++ b/arch/arm/plat-mxc/devices/platform-pata_imx.c
@@ -6,24 +6,45 @@
 #include <mach/hardware.h>
 #include <mach/devices-common.h>
 
-#define imx_pata_imx_data_entry_single(soc)                            \
+#define imx_pata_imx_data_entry_single(soc, _size)                     \
        {                                                               \
                .iobase = soc ## _ATA_BASE_ADDR,                        \
-               .irq = soc ## _MXC_INT_ATA,                             \
+               .iosize = _size,                                        \
+               .irq = soc ## _INT_ATA,                                 \
        }
 
+#ifdef CONFIG_SOC_IMX27
+const struct imx_pata_imx_data imx27_pata_imx_data __initconst =
+       imx_pata_imx_data_entry_single(MX27, SZ_4K);
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+#ifdef CONFIG_SOC_IMX31
+const struct imx_pata_imx_data imx31_pata_imx_data __initconst =
+       imx_pata_imx_data_entry_single(MX31, SZ_16K);
+#endif /* ifdef CONFIG_SOC_IMX31 */
+
+#ifdef CONFIG_SOC_IMX35
+const struct imx_pata_imx_data imx35_pata_imx_data __initconst =
+       imx_pata_imx_data_entry_single(MX35, SZ_16K);
+#endif /* ifdef CONFIG_SOC_IMX35 */
+
 #ifdef CONFIG_SOC_IMX51
 const struct imx_pata_imx_data imx51_pata_imx_data __initconst =
-       imx_pata_imx_data_entry_single(MX51);
+       imx_pata_imx_data_entry_single(MX51, SZ_16K);
 #endif /* ifdef CONFIG_SOC_IMX51 */
 
+#ifdef CONFIG_SOC_IMX53
+const struct imx_pata_imx_data imx53_pata_imx_data __initconst =
+       imx_pata_imx_data_entry_single(MX53, SZ_16K);
+#endif /* ifdef CONFIG_SOC_IMX53 */
+
 struct platform_device *__init imx_add_pata_imx(
                const struct imx_pata_imx_data *data)
 {
        struct resource res[] = {
                {
                        .start = data->iobase,
-                       .end = data->iobase + SZ_16K - 1,
+                       .end = data->iobase + data->iobase - 1,
                        .flags = IORESOURCE_MEM,
                },
                {
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h 
b/arch/arm/plat-mxc/include/mach/devices-common.h
index 1b76c67..4cbad45 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -253,6 +253,7 @@ struct platform_device *__init imx_add_mxc_nand(
 
 struct imx_pata_imx_data {
        resource_size_t iobase;
+       resource_size_t iosize;
        resource_size_t irq;
 };
 struct platform_device *__init imx_add_pata_imx(
diff --git a/arch/arm/plat-mxc/include/mach/mx35.h 
b/arch/arm/plat-mxc/include/mach/mx35.h
index d13dbfe..80965a9 100644
--- a/arch/arm/plat-mxc/include/mach/mx35.h
+++ b/arch/arm/plat-mxc/include/mach/mx35.h
@@ -36,7 +36,7 @@
 #define MX35_UART3_BASE_ADDR                   (MX35_SPBA0_BASE_ADDR + 0x0c000)
 #define MX35_CSPI2_BASE_ADDR                   (MX35_SPBA0_BASE_ADDR + 0x10000)
 #define MX35_SSI2_BASE_ADDR                    (MX35_SPBA0_BASE_ADDR + 0x14000)
-#define MX35_ATA_DMA_BASE_ADDR                 (MX35_SPBA0_BASE_ADDR + 0x20000)
+#define MX35_ATA_BASE_ADDR                     (MX35_SPBA0_BASE_ADDR + 0x20000)
 #define MX35_MSHC1_BASE_ADDR                   (MX35_SPBA0_BASE_ADDR + 0x24000)
 #define MX35_FEC_BASE_ADDR             0x50038000
 #define MX35_SPBA_CTRL_BASE_ADDR               (MX35_SPBA0_BASE_ADDR + 0x3c000)
-- 
1.7.0.1

>From 46f2aa511ac6a335e2861a644d977132de718d0a Mon Sep 17 00:00:00 2001
From: Arnaud Patard (Rtp) <[email protected]>
Date: Sat, 27 Aug 2011 15:19:00 +0200
Subject: [PATCH 6/6] Fix pata imx resource

Commit 236c4e8be436380b5354fe0d7facf94688e024ec
"ARM: imx: Add PATA resources for other i.MX processors"
has broken resource declaration of pata_imx device by using iobase instead of
iosize.

Signed-off-by: Arnaud Patard <[email protected]>
Signed-off-by: Sascha Hauer <[email protected]>
---
 arch/arm/plat-mxc/devices/platform-pata_imx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-mxc/devices/platform-pata_imx.c 
b/arch/arm/plat-mxc/devices/platform-pata_imx.c
index de33048..70e2f2a 100644
--- a/arch/arm/plat-mxc/devices/platform-pata_imx.c
+++ b/arch/arm/plat-mxc/devices/platform-pata_imx.c
@@ -44,7 +44,7 @@ struct platform_device *__init imx_add_pata_imx(
        struct resource res[] = {
                {
                        .start = data->iobase,
-                       .end = data->iobase + data->iobase - 1,
+                       .end = data->iobase + data->iosize - 1,
                        .flags = IORESOURCE_MEM,
                },
                {
-- 
1.7.0.1

_______________________________________________
kernel mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/kernel

Reply via email to