Discussion:
[PATCHv2 0/3] Remove mach/atmel-mci.h
Alexandre Belloni
2014-10-17 08:26:35 UTC
Permalink
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
Alexandre Belloni
2014-10-17 08:26:38 UTC
Permalink
Use the generic platform_data header file instead of mach/atmel-mci.h

Signed-off-by: Alexandre Belloni <***@free-electrons.com>
---
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
Alexandre Belloni
2014-10-17 08:26:37 UTC
Permalink
Use the generic platform_data header file instead of mach/atmel-mci.h

Signed-off-by: Alexandre Belloni <***@free-electrons.com>
---
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 ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Alexandre Belloni
2014-10-17 08:26:36 UTC
Permalink
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 <***@free-electrons.com>
---
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
Arnd Bergmann
2014-10-19 20:15:51 UTC
Permalink
Post by Alexandre Belloni
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.
- include back linux/atmel-mci.h and really remove mach/atmel-mci.h in at91sam9g45_devices.c
Acked-by: Arnd Bergmann <***@arndb.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Ludovic Desroches
2014-10-20 12:22:45 UTC
Permalink
Post by Alexandre Belloni
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.
- include back linux/atmel-mci.h and really remove mach/atmel-mci.h in at91sam9g45_devices.c
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
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...