This patch series removes the uses of mach/atmel-mci.h and the files themselves.
The final goal is to be able to switch AT91 to multiplatform.
The first patch introduces a new platform_data file and uses it in the driver.
The two following patches remove the uses of mach/atmel-mci.h and the header
itself from avR32 and ARM/at91.
Changes in v2:
- include back linux/atmel-mci.h and really remove mach/atmel-mci.h in at91sam9g45_devices.c
Alexandre Belloni (3):
mmc: atmel-mci: move mache header to platform_data
ARM: at91: remove mach/atmel-mci.h
avr32: remove mach/atmel-mci.h
arch/arm/mach-at91/at91sam9g45_devices.c | 2 +-
arch/arm/mach-at91/include/mach/atmel-mci.h | 17 -----------------
arch/avr32/mach-at32ap/at32ap700x.c | 2 +-
arch/avr32/mach-at32ap/include/mach/atmel-mci.h | 17 -----------------
drivers/mmc/host/atmel-mci.c | 2 +-
include/linux/platform_data/mmc-atmel-mci.h | 22 ++++++++++++++++++++++
6 files changed, 25 insertions(+), 37 deletions(-)
delete mode 100644 arch/arm/mach-at91/include/mach/atmel-mci.h
delete mode 100644 arch/avr32/mach-at32ap/include/mach/atmel-mci.h
create mode 100644 include/linux/platform_data/mmc-atmel-mci.h
--
1.9.1
Use the generic platform_data header file instead of mach/atmel-mci.h
Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/avr32/mach-at32ap/at32ap700x.c | 2 +-
arch/avr32/mach-at32ap/include/mach/atmel-mci.h | 17 -----------------
2 files changed, 1 insertion(+), 18 deletions(-)
delete mode 100644 arch/avr32/mach-at32ap/include/mach/atmel-mci.h
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index db85b5ec3351..f8deca560e4d 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -17,7 +17,7 @@
#include <linux/spi/spi.h>
#include <linux/usb/atmel_usba_udc.h>
-#include <mach/atmel-mci.h>
+#include <linux/platform_data/mmc-atmel-mci.h>
#include <linux/atmel-mci.h>
#include <asm/io.h>
diff --git a/arch/avr32/mach-at32ap/include/mach/atmel-mci.h b/arch/avr32/mach-at32ap/include/mach/atmel-mci.h
deleted file mode 100644
index 4bba58561d5c..000000000000
--- a/arch/avr32/mach-at32ap/include/mach/atmel-mci.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef __MACH_ATMEL_MCI_H
-#define __MACH_ATMEL_MCI_H
-
-#include <linux/dw_dmac.h>
-
-/**
- * struct mci_dma_data - DMA data for MCI interface
- */
-struct mci_dma_data {
- struct dw_dma_slave sdata;
-};
-
-/* accessor macros */
-#define slave_data_ptr(s) (&(s)->sdata)
-#define find_slave_dev(s) ((s)->sdata.dma_dev)
-
-#endif /* __MACH_ATMEL_MCI_H */
--
1.9.1
Move the mach header that can come either from arm/mach-at91 or avr32 to
platform_data to be able to switch the AT91 platforms to multiplatform.
Signed-off-by: Alexandre Belloni <[email protected]>
---
drivers/mmc/host/atmel-mci.c | 2 +-
include/linux/platform_data/mmc-atmel-mci.h | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)
create mode 100644 include/linux/platform_data/mmc-atmel-mci.h
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index bb585d940901..b1231835b031 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -29,11 +29,11 @@
#include <linux/stat.h>
#include <linux/types.h>
#include <linux/platform_data/atmel.h>
+#include <linux/platform_data/mmc-atmel-mci.h>
#include <linux/mmc/host.h>
#include <linux/mmc/sdio.h>
-#include <mach/atmel-mci.h>
#include <linux/atmel-mci.h>
#include <linux/atmel_pdc.h>
diff --git a/include/linux/platform_data/mmc-atmel-mci.h b/include/linux/platform_data/mmc-atmel-mci.h
new file mode 100644
index 000000000000..ebe7ae4f72e4
--- /dev/null
+++ b/include/linux/platform_data/mmc-atmel-mci.h
@@ -0,0 +1,22 @@
+#ifndef __MMC_ATMEL_MCI_H
+#define __MMC_ATMEL_MCI_H
+
+#include <linux/platform_data/dma-atmel.h>
+#include <linux/dw_dmac.h>
+
+/**
+ * struct mci_dma_data - DMA data for MCI interface
+ */
+struct mci_dma_data {
+#ifdef CONFIG_ARM
+ struct at_dma_slave sdata;
+#else
+ struct dw_dma_slave sdata;
+#endif
+};
+
+/* accessor macros */
+#define slave_data_ptr(s) (&(s)->sdata)
+#define find_slave_dev(s) ((s)->sdata.dma_dev)
+
+#endif /* __MMC_ATMEL_MCI_H */
--
1.9.1
Use the generic platform_data header file instead of mach/atmel-mci.h
Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/mach-at91/at91sam9g45_devices.c | 2 +-
arch/arm/mach-at91/include/mach/atmel-mci.h | 17 -----------------
2 files changed, 1 insertion(+), 18 deletions(-)
delete mode 100644 arch/arm/mach-at91/include/mach/atmel-mci.h
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 21ab782cc8e9..06ecbafd01ee 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -19,6 +19,7 @@
#include <linux/i2c-gpio.h>
#include <linux/atmel-mci.h>
#include <linux/platform_data/crypto-atmel.h>
+#include <linux/platform_data/mmc-atmel-mci.h>
#include <linux/platform_data/at91_adc.h>
@@ -30,7 +31,6 @@
#include <mach/at91_matrix.h>
#include <mach/at91sam9_smc.h>
#include <linux/platform_data/dma-atmel.h>
-#include <mach/atmel-mci.h>
#include <mach/hardware.h>
#include <media/atmel-isi.h>
diff --git a/arch/arm/mach-at91/include/mach/atmel-mci.h b/arch/arm/mach-at91/include/mach/atmel-mci.h
deleted file mode 100644
index 3069e4135573..000000000000
--- a/arch/arm/mach-at91/include/mach/atmel-mci.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef __MACH_ATMEL_MCI_H
-#define __MACH_ATMEL_MCI_H
-
-#include <linux/platform_data/dma-atmel.h>
-
-/**
- * struct mci_dma_data - DMA data for MCI interface
- */
-struct mci_dma_data {
- struct at_dma_slave sdata;
-};
-
-/* accessor macros */
-#define slave_data_ptr(s) (&(s)->sdata)
-#define find_slave_dev(s) ((s)->sdata.dma_dev)
-
-#endif /* __MACH_ATMEL_MCI_H */
--
1.9.1
On Friday 17 October 2014 10:26:35 Alexandre Belloni wrote:
> This patch series removes the uses of mach/atmel-mci.h and the files themselves.
> The final goal is to be able to switch AT91 to multiplatform.
>
> The first patch introduces a new platform_data file and uses it in the driver.
> The two following patches remove the uses of mach/atmel-mci.h and the header
> itself from avR32 and ARM/at91.
>
> Changes in v2:
> - include back linux/atmel-mci.h and really remove mach/atmel-mci.h in at91sam9g45_devices.c
>
>
Acked-by: Arnd Bergmann <[email protected]>
On Fri, Oct 17, 2014 at 10:26:35AM +0200, Alexandre Belloni wrote:
> This patch series removes the uses of mach/atmel-mci.h and the files themselves.
> The final goal is to be able to switch AT91 to multiplatform.
>
> The first patch introduces a new platform_data file and uses it in the driver.
> The two following patches remove the uses of mach/atmel-mci.h and the header
> itself from avR32 and ARM/at91.
>
> Changes in v2:
> - include back linux/atmel-mci.h and really remove mach/atmel-mci.h in at91sam9g45_devices.c
s/move mache header/move mach header. Otherwise, for the whole series:
Acked-by: Ludovic Desroches <[email protected]>
>
> Alexandre Belloni (3):
> mmc: atmel-mci: move mache header to platform_data
> ARM: at91: remove mach/atmel-mci.h
> avr32: remove mach/atmel-mci.h
>
> arch/arm/mach-at91/at91sam9g45_devices.c | 2 +-
> arch/arm/mach-at91/include/mach/atmel-mci.h | 17 -----------------
> arch/avr32/mach-at32ap/at32ap700x.c | 2 +-
> arch/avr32/mach-at32ap/include/mach/atmel-mci.h | 17 -----------------
> drivers/mmc/host/atmel-mci.c | 2 +-
> include/linux/platform_data/mmc-atmel-mci.h | 22 ++++++++++++++++++++++
> 6 files changed, 25 insertions(+), 37 deletions(-)
> delete mode 100644 arch/arm/mach-at91/include/mach/atmel-mci.h
> delete mode 100644 arch/avr32/mach-at32ap/include/mach/atmel-mci.h
> create mode 100644 include/linux/platform_data/mmc-atmel-mci.h
>
> --
> 1.9.1
>
On 17 October 2014 10:26, Alexandre Belloni
<[email protected]> wrote:
> Move the mach header that can come either from arm/mach-at91 or avr32 to
> platform_data to be able to switch the AT91 platforms to multiplatform.
>
> Signed-off-by: Alexandre Belloni <[email protected]>
Thanks! Applied for next!
Kind regards
Uffe
> ---
> drivers/mmc/host/atmel-mci.c | 2 +-
> include/linux/platform_data/mmc-atmel-mci.h | 22 ++++++++++++++++++++++
> 2 files changed, 23 insertions(+), 1 deletion(-)
> create mode 100644 include/linux/platform_data/mmc-atmel-mci.h
>
> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> index bb585d940901..b1231835b031 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -29,11 +29,11 @@
> #include <linux/stat.h>
> #include <linux/types.h>
> #include <linux/platform_data/atmel.h>
> +#include <linux/platform_data/mmc-atmel-mci.h>
>
> #include <linux/mmc/host.h>
> #include <linux/mmc/sdio.h>
>
> -#include <mach/atmel-mci.h>
> #include <linux/atmel-mci.h>
> #include <linux/atmel_pdc.h>
>
> diff --git a/include/linux/platform_data/mmc-atmel-mci.h b/include/linux/platform_data/mmc-atmel-mci.h
> new file mode 100644
> index 000000000000..ebe7ae4f72e4
> --- /dev/null
> +++ b/include/linux/platform_data/mmc-atmel-mci.h
> @@ -0,0 +1,22 @@
> +#ifndef __MMC_ATMEL_MCI_H
> +#define __MMC_ATMEL_MCI_H
> +
> +#include <linux/platform_data/dma-atmel.h>
> +#include <linux/dw_dmac.h>
> +
> +/**
> + * struct mci_dma_data - DMA data for MCI interface
> + */
> +struct mci_dma_data {
> +#ifdef CONFIG_ARM
> + struct at_dma_slave sdata;
> +#else
> + struct dw_dma_slave sdata;
> +#endif
> +};
> +
> +/* accessor macros */
> +#define slave_data_ptr(s) (&(s)->sdata)
> +#define find_slave_dev(s) ((s)->sdata.dma_dev)
> +
> +#endif /* __MMC_ATMEL_MCI_H */
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
On 17 October 2014 10:26, Alexandre Belloni
<[email protected]> wrote:
> Use the generic platform_data header file instead of mach/atmel-mci.h
>
> Signed-off-by: Alexandre Belloni <[email protected]>
Thanks! Applied for next!
Kind regards
Uffe
> ---
> arch/arm/mach-at91/at91sam9g45_devices.c | 2 +-
> arch/arm/mach-at91/include/mach/atmel-mci.h | 17 -----------------
> 2 files changed, 1 insertion(+), 18 deletions(-)
> delete mode 100644 arch/arm/mach-at91/include/mach/atmel-mci.h
>
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index 21ab782cc8e9..06ecbafd01ee 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -19,6 +19,7 @@
> #include <linux/i2c-gpio.h>
> #include <linux/atmel-mci.h>
> #include <linux/platform_data/crypto-atmel.h>
> +#include <linux/platform_data/mmc-atmel-mci.h>
>
> #include <linux/platform_data/at91_adc.h>
>
> @@ -30,7 +31,6 @@
> #include <mach/at91_matrix.h>
> #include <mach/at91sam9_smc.h>
> #include <linux/platform_data/dma-atmel.h>
> -#include <mach/atmel-mci.h>
> #include <mach/hardware.h>
>
> #include <media/atmel-isi.h>
> diff --git a/arch/arm/mach-at91/include/mach/atmel-mci.h b/arch/arm/mach-at91/include/mach/atmel-mci.h
> deleted file mode 100644
> index 3069e4135573..000000000000
> --- a/arch/arm/mach-at91/include/mach/atmel-mci.h
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -#ifndef __MACH_ATMEL_MCI_H
> -#define __MACH_ATMEL_MCI_H
> -
> -#include <linux/platform_data/dma-atmel.h>
> -
> -/**
> - * struct mci_dma_data - DMA data for MCI interface
> - */
> -struct mci_dma_data {
> - struct at_dma_slave sdata;
> -};
> -
> -/* accessor macros */
> -#define slave_data_ptr(s) (&(s)->sdata)
> -#define find_slave_dev(s) ((s)->sdata.dma_dev)
> -
> -#endif /* __MACH_ATMEL_MCI_H */
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
On 17 October 2014 10:26, Alexandre Belloni
<[email protected]> wrote:
> Use the generic platform_data header file instead of mach/atmel-mci.h
>
> Signed-off-by: Alexandre Belloni <[email protected]>
Thanks! Applied for next!
Do note, this one required me to resolve a conflict for removing the
header file. Please have a look to make sure I haven't broken
something.
Kind regards
Uffe
> ---
> arch/avr32/mach-at32ap/at32ap700x.c | 2 +-
> arch/avr32/mach-at32ap/include/mach/atmel-mci.h | 17 -----------------
> 2 files changed, 1 insertion(+), 18 deletions(-)
> delete mode 100644 arch/avr32/mach-at32ap/include/mach/atmel-mci.h
>
> diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
> index db85b5ec3351..f8deca560e4d 100644
> --- a/arch/avr32/mach-at32ap/at32ap700x.c
> +++ b/arch/avr32/mach-at32ap/at32ap700x.c
> @@ -17,7 +17,7 @@
> #include <linux/spi/spi.h>
> #include <linux/usb/atmel_usba_udc.h>
>
> -#include <mach/atmel-mci.h>
> +#include <linux/platform_data/mmc-atmel-mci.h>
> #include <linux/atmel-mci.h>
>
> #include <asm/io.h>
> diff --git a/arch/avr32/mach-at32ap/include/mach/atmel-mci.h b/arch/avr32/mach-at32ap/include/mach/atmel-mci.h
> deleted file mode 100644
> index 4bba58561d5c..000000000000
> --- a/arch/avr32/mach-at32ap/include/mach/atmel-mci.h
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -#ifndef __MACH_ATMEL_MCI_H
> -#define __MACH_ATMEL_MCI_H
> -
> -#include <linux/dw_dmac.h>
> -
> -/**
> - * struct mci_dma_data - DMA data for MCI interface
> - */
> -struct mci_dma_data {
> - struct dw_dma_slave sdata;
> -};
> -
> -/* accessor macros */
> -#define slave_data_ptr(s) (&(s)->sdata)
> -#define find_slave_dev(s) ((s)->sdata.dma_dev)
> -
> -#endif /* __MACH_ATMEL_MCI_H */
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
On 27 October 2014 15:46, Ulf Hansson <[email protected]> wrote:
> On 17 October 2014 10:26, Alexandre Belloni
> <[email protected]> wrote:
>> Move the mach header that can come either from arm/mach-at91 or avr32 to
>> platform_data to be able to switch the AT91 platforms to multiplatform.
>>
>> Signed-off-by: Alexandre Belloni <[email protected]>
>
> Thanks! Applied for next!
Actually this one caused a compiler error due to a moved header from
the below commit.
3d598f47e804 dmaengine: dw: move dw_dmac.h to where it belongs to
I decided to fix it myself and fold the change into this patch, see below.
>
> Kind regards
> Uffe
>
>> ---
>> drivers/mmc/host/atmel-mci.c | 2 +-
>> include/linux/platform_data/mmc-atmel-mci.h | 22 ++++++++++++++++++++++
>> 2 files changed, 23 insertions(+), 1 deletion(-)
>> create mode 100644 include/linux/platform_data/mmc-atmel-mci.h
>>
>> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
>> index bb585d940901..b1231835b031 100644
>> --- a/drivers/mmc/host/atmel-mci.c
>> +++ b/drivers/mmc/host/atmel-mci.c
>> @@ -29,11 +29,11 @@
>> #include <linux/stat.h>
>> #include <linux/types.h>
>> #include <linux/platform_data/atmel.h>
>> +#include <linux/platform_data/mmc-atmel-mci.h>
>>
>> #include <linux/mmc/host.h>
>> #include <linux/mmc/sdio.h>
>>
>> -#include <mach/atmel-mci.h>
>> #include <linux/atmel-mci.h>
>> #include <linux/atmel_pdc.h>
>>
>> diff --git a/include/linux/platform_data/mmc-atmel-mci.h b/include/linux/platform_data/mmc-atmel-mci.h
>> new file mode 100644
>> index 000000000000..ebe7ae4f72e4
>> --- /dev/null
>> +++ b/include/linux/platform_data/mmc-atmel-mci.h
>> @@ -0,0 +1,22 @@
>> +#ifndef __MMC_ATMEL_MCI_H
>> +#define __MMC_ATMEL_MCI_H
>> +
>> +#include <linux/platform_data/dma-atmel.h>
>> +#include <linux/dw_dmac.h>
Changed to:
<linux/platform_data/dma-dw.h>
>> +
>> +/**
>> + * struct mci_dma_data - DMA data for MCI interface
>> + */
>> +struct mci_dma_data {
>> +#ifdef CONFIG_ARM
>> + struct at_dma_slave sdata;
>> +#else
>> + struct dw_dma_slave sdata;
>> +#endif
>> +};
>> +
>> +/* accessor macros */
>> +#define slave_data_ptr(s) (&(s)->sdata)
>> +#define find_slave_dev(s) ((s)->sdata.dma_dev)
>> +
>> +#endif /* __MMC_ATMEL_MCI_H */
>> --
>> 1.9.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
Hi,
On 27/10/2014 at 16:23:23 +0100, Ulf Hansson wrote :
> On 27 October 2014 15:46, Ulf Hansson <[email protected]> wrote:
> > On 17 October 2014 10:26, Alexandre Belloni
> > <[email protected]> wrote:
> >> Move the mach header that can come either from arm/mach-at91 or avr32 to
> >> platform_data to be able to switch the AT91 platforms to multiplatform.
> >>
> >> Signed-off-by: Alexandre Belloni <[email protected]>
> >
> > Thanks! Applied for next!
>
> Actually this one caused a compiler error due to a moved header from
> the below commit.
>
> 3d598f47e804 dmaengine: dw: move dw_dmac.h to where it belongs to
>
> I decided to fix it myself and fold the change into this patch, see below.
>
what you did seems fine. It was the same commit that conflicted with the
third patch.
Thanks!
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com