ARM: ep93xx: move network platform data to separate header
authorArnd Bergmann <arnd@arndb.de>
Mon, 15 Apr 2019 20:17:09 +0000 (22:17 +0200)
committerOlof Johansson <olof@lixom.net>
Mon, 29 Apr 2019 06:08:15 +0000 (23:08 -0700)
The header file is the only thing preventing us from building the
driver in a cross-platform configuration, so move the structure
we are interested in to the global platform_data location
and enable compile testing.

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
arch/arm/mach-ep93xx/include/mach/platform.h
drivers/net/ethernet/cirrus/Kconfig
drivers/net/ethernet/cirrus/ep93xx_eth.c
include/linux/platform_data/eth-ep93xx.h [new file with mode: 0644]

index 6c41c79..43446f3 100644 (file)
@@ -5,6 +5,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/platform_data/eth-ep93xx.h>
 #include <linux/reboot.h>
 
 struct device;
@@ -15,12 +16,6 @@ struct ep93xxfb_mach_info;
 struct ep93xx_keypad_platform_data;
 struct ep93xx_spi_info;
 
-struct ep93xx_eth_data
-{
-       unsigned char   dev_addr[6];
-       unsigned char   phy_id;
-};
-
 void ep93xx_map_io(void);
 void ep93xx_init_irq(void);
 
index e9a0213..6238e69 100644 (file)
@@ -41,7 +41,7 @@ config CS89x0_PLATFORM
 
 config EP93XX_ETH
        tristate "EP93xx Ethernet support"
-       depends on ARM && ARCH_EP93XX
+       depends on (ARM && ARCH_EP93XX) || COMPILE_TEST
        select MII
        help
          This is a driver for the ethernet hardware included in EP93xx CPUs.
index 13dfdfc..a6da987 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/io.h>
 #include <linux/slab.h>
 
-#include <mach/hardware.h>
+#include <linux/platform_data/eth-ep93xx.h>
 
 #define DRV_MODULE_NAME                "ep93xx-eth"
 #define DRV_MODULE_VERSION     "0.1"
diff --git a/include/linux/platform_data/eth-ep93xx.h b/include/linux/platform_data/eth-ep93xx.h
new file mode 100644 (file)
index 0000000..8eef637
--- /dev/null
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_PLATFORM_DATA_ETH_EP93XX
+#define _LINUX_PLATFORM_DATA_ETH_EP93XX
+
+struct ep93xx_eth_data {
+       unsigned char   dev_addr[6];
+       unsigned char   phy_id;
+};
+
+#endif