pata: ixp4xx: split platform data to its own header
authorArnd Bergmann <arnd@arndb.de>
Sun, 25 Aug 2019 20:14:01 +0000 (22:14 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 17 Jun 2021 13:31:04 +0000 (15:31 +0200)
Portable drivers cannot use mach/platform.h, so move the
structure into its own header. With this, compile testing
can be enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-ixp4xx/avila-setup.c
arch/arm/mach-ixp4xx/include/mach/platform.h
drivers/ata/Kconfig
drivers/ata/pata_ixp4xx_cf.c
include/linux/platform_data/pata_ixp4xx_cf.h [new file with mode: 0644]

index 1981b33..ec1d302 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/tty.h>
 #include <linux/serial_8250.h>
 #include <linux/gpio/machine.h>
+#include <linux/platform_data/pata_ixp4xx_cf.h>
 #include <asm/types.h>
 #include <asm/setup.h>
 #include <asm/memory.h>
index 6d403fe..d8b4df9 100644 (file)
@@ -79,20 +79,6 @@ extern unsigned long ixp4xx_exp_bus_size;
 #define IXP4XX_PERIPHERAL_BUS_CLOCK    (66) /* 66MHzi APB BUS   */ 
 #define IXP4XX_UART_XTAL               14745600
 
-/*
- * This structure provide a means for the board setup code
- * to give information to th pata_ixp4xx driver. It is
- * passed as platform_data.
- */
-struct ixp4xx_pata_data {
-       volatile u32    *cs0_cfg;
-       volatile u32    *cs1_cfg;
-       unsigned long   cs0_bits;
-       unsigned long   cs1_bits;
-       void __iomem    *cs0;
-       void __iomem    *cs1;
-};
-
 /*
  * Frequency of clock used for primary clocksource
  */
index 030cb32..d17c833 100644 (file)
@@ -1058,7 +1058,7 @@ config PATA_ISAPNP
 
 config PATA_IXP4XX_CF
        tristate "IXP4XX Compact Flash support"
-       depends on ARCH_IXP4XX
+       depends on ARCH_IXP4XX || COMPILE_TEST
        help
          This option enables support for a Compact Flash connected on
          the ixp4xx expansion bus. This driver had been written for
index 073c4e2..5881d64 100644 (file)
@@ -17,8 +17,8 @@
 #include <linux/libata.h>
 #include <linux/irq.h>
 #include <linux/platform_device.h>
+#include <linux/platform_data/pata_ixp4xx_cf.h>
 #include <scsi/scsi_host.h>
-#include <mach/hardware.h>
 
 #define DRV_NAME       "pata_ixp4xx_cf"
 #define DRV_VERSION    "0.2"
diff --git a/include/linux/platform_data/pata_ixp4xx_cf.h b/include/linux/platform_data/pata_ixp4xx_cf.h
new file mode 100644 (file)
index 0000000..601ba97
--- /dev/null
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __PLATFORM_DATA_PATA_IXP4XX_H
+#define __PLATFORM_DATA_PATA_IXP4XX_H
+
+#include <linux/types.h>
+
+/*
+ * This structure provide a means for the board setup code
+ * to give information to th pata_ixp4xx driver. It is
+ * passed as platform_data.
+ */
+struct ixp4xx_pata_data {
+       volatile u32    *cs0_cfg;
+       volatile u32    *cs1_cfg;
+       unsigned long   cs0_bits;
+       unsigned long   cs1_bits;
+       void __iomem    *cs0;
+       void __iomem    *cs1;
+};
+
+#endif