netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] ARM: ep93xx: move network platform data to separate header
@ 2019-04-15 19:25 Arnd Bergmann
  2019-04-15 19:31 ` Alexander Sverdlin
  2019-04-23 10:39 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2019-04-15 19:25 UTC (permalink / raw)
  To: Hartley Sweeten, Alexander Sverdlin
  Cc: Linus Walleij, Arnd Bergmann, David S. Miller, Jakub Kicinski,
	David Ahern, linux-arm-kernel, linux-kernel, netdev

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-ep93xx/include/mach/platform.h |  7 +------
 drivers/net/ethernet/cirrus/Kconfig          |  2 +-
 drivers/net/ethernet/cirrus/ep93xx_eth.c     |  2 +-
 include/linux/platform_data/eth-ep93xx.h     | 10 ++++++++++
 4 files changed, 13 insertions(+), 8 deletions(-)
 create mode 100644 include/linux/platform_data/eth-ep93xx.h

diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
index 6c41c794bed5..43446f33c2be 100644
--- a/arch/arm/mach-ep93xx/include/mach/platform.h
+++ b/arch/arm/mach-ep93xx/include/mach/platform.h
@@ -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);
 
diff --git a/drivers/net/ethernet/cirrus/Kconfig b/drivers/net/ethernet/cirrus/Kconfig
index e9a0213b08c4..6238e6951336 100644
--- a/drivers/net/ethernet/cirrus/Kconfig
+++ b/drivers/net/ethernet/cirrus/Kconfig
@@ -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.
diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c
index 13dfdfca49fc..a6da9873570b 100644
--- a/drivers/net/ethernet/cirrus/ep93xx_eth.c
+++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c
@@ -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
index 000000000000..8eef637a804d
--- /dev/null
+++ b/include/linux/platform_data/eth-ep93xx.h
@@ -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
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/4] ARM: ep93xx: move network platform data to separate header
  2019-04-15 19:25 [PATCH 1/4] ARM: ep93xx: move network platform data to separate header Arnd Bergmann
@ 2019-04-15 19:31 ` Alexander Sverdlin
  2019-04-23 10:39 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Sverdlin @ 2019-04-15 19:31 UTC (permalink / raw)
  To: Arnd Bergmann, Hartley Sweeten
  Cc: Linus Walleij, David S. Miller, Jakub Kicinski, David Ahern,
	linux-arm-kernel, linux-kernel, netdev

Hi Arnd,

On 15/04/2019 21:25, Arnd Bergmann wrote:
> 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>

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-ep93xx/include/mach/platform.h |  7 +------
>  drivers/net/ethernet/cirrus/Kconfig          |  2 +-
>  drivers/net/ethernet/cirrus/ep93xx_eth.c     |  2 +-
>  include/linux/platform_data/eth-ep93xx.h     | 10 ++++++++++
>  4 files changed, 13 insertions(+), 8 deletions(-)
>  create mode 100644 include/linux/platform_data/eth-ep93xx.h
> 
> diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
> index 6c41c794bed5..43446f33c2be 100644
> --- a/arch/arm/mach-ep93xx/include/mach/platform.h
> +++ b/arch/arm/mach-ep93xx/include/mach/platform.h
> @@ -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);
>  
> diff --git a/drivers/net/ethernet/cirrus/Kconfig b/drivers/net/ethernet/cirrus/Kconfig
> index e9a0213b08c4..6238e6951336 100644
> --- a/drivers/net/ethernet/cirrus/Kconfig
> +++ b/drivers/net/ethernet/cirrus/Kconfig
> @@ -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.
> diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c
> index 13dfdfca49fc..a6da9873570b 100644
> --- a/drivers/net/ethernet/cirrus/ep93xx_eth.c
> +++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c
> @@ -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
> index 000000000000..8eef637a804d
> --- /dev/null
> +++ b/include/linux/platform_data/eth-ep93xx.h
> @@ -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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/4] ARM: ep93xx: move network platform data to separate header
  2019-04-15 19:25 [PATCH 1/4] ARM: ep93xx: move network platform data to separate header Arnd Bergmann
  2019-04-15 19:31 ` Alexander Sverdlin
@ 2019-04-23 10:39 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2019-04-23 10:39 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Hartley Sweeten, Alexander Sverdlin, David S. Miller,
	Jakub Kicinski, David Ahern, Linux ARM,
	linux-kernel@vger.kernel.org, netdev

On Mon, Apr 15, 2019 at 9:27 PM Arnd Bergmann <arnd@arndb.de> wrote:

> 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.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

My EP93xx board is not working right now but looks good to me.
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-23 10:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-15 19:25 [PATCH 1/4] ARM: ep93xx: move network platform data to separate header Arnd Bergmann
2019-04-15 19:31 ` Alexander Sverdlin
2019-04-23 10:39 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).