make cadence ethernet drivers build on any architecture
Subsystems (6)
cover make cadence ethernet drivers build on any architecture
This series makes the at91_ether and macb driver build-able on any architecture.
Patch 1 removes the HAVE_NET_MACB from the cadence Kconfig and this allow macb to be built on any architecture. The macb driver requires no other modifications.
Patch 3 moves a bootloader quirk for CSB337 from at91_ether into CSB337 board setup. This allow us to remove the last mach include and build this driver on any architecture. It also make it easier to share the address setup between at91_ether and macb.
Patch 4-5 removes the now unused HAVE_NET_MACB config symbol from AT91/AVR32 Kconfig.
Note that patch 3 is not tested on a real CSB337 board. I only tested it on an other AT91RM9200 board to verify the logic that reverses the address byte order works.
The next series will make the at91_ether driver use address setting and statistics from macb. There is also a clean up of print outs plus some comment/style fixes.
Joachim Eastwood (5):
net/cadence: get rid of HAVE_NET_MACB net/at91_ether: select MACB in Kconfig net/at91_ether: move eth addr quirk into csb337 board setup
ARM: AT91: Remove HAVE_NET_MACB
AVR32: Remove HAVE_NET_MACB
arch/arm/mach-at91/Kconfig | 4 ---- arch/arm/mach-at91/board-csb337.c | 35 +++++++++++++++++++++++++++++++ arch/avr32/Kconfig | 1 - drivers/net/ethernet/cadence/Kconfig | 8 +------ drivers/net/ethernet/cadence/Makefile | 2 +- drivers/net/ethernet/cadence/at91_ether.c | 26 ++++++----------------- 6 files changed, 43 insertions(+), 33 deletions(-)
Signature · 1 line
1.7.12.4
PATCH 1/5 net/cadence: get rid of HAVE_NET_MACB
macb is a platform driver and there is nothing that prevents this driver from being built on non-ARM/AVR32 platforms.
--- drivers/net/ethernet/cadence/Kconfig | 5 ----- 1 file changed, 5 deletions(-)
drivers/net/ethernet/cadence/Kconfig +0 -5
@@ -2,13 +2,9 @@ # Atmel device configuration # -config HAVE_NET_MACB - bool - config NET_CADENCE bool "Cadence devices" default y - depends on HAVE_NET_MACB || (ARM && ARCH_AT91RM9200) ---help--- If you have a network (Ethernet) card belonging to this class, say Y. Make sure you know the name of your card. Read the Ethernet-HOWTO,
@@ -34,7 +30,6 @@ config ARM_AT91_ETHER config MACB tristate "Cadence MACB/GEM support" - depends on HAVE_NET_MACB select PHYLIB ---help--- The Cadence MACB ethernet interface is found on many Atmel AT32 and
Signature · 1 line
1.7.12.4
PATCH 2/5 net/at91_ether: select MACB in Kconfig
In reply to Joachim EastwoodNow that HAVE_NET_MACB is gone let's just select MACB to satisfy the dependecies in at91_ether.
PHYLIB will then by selected by MACB.
--- drivers/net/ethernet/cadence/Kconfig | 2 +- drivers/net/ethernet/cadence/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/cadence/Kconfig +1 -1
@@ -23,7 +23,7 @@ config ARM_AT91_ETHER tristate "AT91RM9200 Ethernet support" depends on ARM && ARCH_AT91RM9200 select NET_CORE - select PHYLIB + select MACB ---help--- If you wish to compile a kernel for the AT91RM9200 and enable ethernet support, then you should always answer Y to this.
drivers/net/ethernet/cadence/Makefile +1 -1
@@ -2,5 +2,5 @@ # Makefile for the Atmel network device drivers. # -obj-$(CONFIG_ARM_AT91_ETHER) += at91_ether.o macb.o +obj-$(CONFIG_ARM_AT91_ETHER) += at91_ether.o obj-$(CONFIG_MACB) += macb.o
Signature · 1 line
1.7.12.4
PATCH 3/5 net/at91_ether: move eth addr quirk into csb337 board setup
In reply to Joachim EastwoodMove Ethernet address byte order fix for csb337 into it's board setup.
This will allow us to remove the last mach include from at91_ether and also to share the address setup with the macb driver.
--- arch/arm/mach-at91/board-csb337.c | 35 +++++++++++++++++++++++++++++++ drivers/net/ethernet/cadence/Kconfig | 1 - drivers/net/ethernet/cadence/at91_ether.c | 26 ++++++----------------- 3 files changed, 41 insertions(+), 21 deletions(-)
arch/arm/mach-at91/board-csb337.c +35 -0
@@ -217,6 +217,40 @@ static struct gpio_led csb_leds[] = { } }; +/* +* MicroMonitor (uMon) on the CSB337 store the ethernet address in the +* wrong byte order (and continues to do so, for bug-compatibility). +*/ +#define MACB_SA1B 0x0098 +#define MACB_SA1T 0x009c +static void __init csb337_fix_eth_addr (void ) +{ +void __iomem *emac; +u32 lo, hi, tmp; +int i; + + emac =ioremap (AT91RM9200_BASE_EMAC ,SZ_16K ); +if (!emac) { +printk (KERN_ERR "csb337: unable to fixup Ethernet address\n" ); +return ; + } + +/* Fix byte order on all 4 address registers */ +for (i =0 ; i <4 ; i++) { + lo =readl (emac +MACB_SA1B + i *8 ); + hi =readl (emac +MACB_SA1T + i *8 ); + + tmp = (lo &0xff ) <<8 | (lo &0xff00 ) >>8 ; +writel (tmp, emac +MACB_SA1T + i *8 ); + + tmp = (hi &0xff ) <<8 | (hi &0xff00 ) >>8 + | (lo &0xff0000 ) <<8 + | (lo &0xff000000 ) >>8 ; +writel (tmp, emac +MACB_SA1B + i *8 ); + } + +iounmap (emac); +}static void __init csb337_board_init (void ) {
@@ -225,6 +259,7 @@ static void __init csb337_board_init(void)at91_register_uart (0 ,0 ,0 );at91_add_device_serial ();/* Ethernet */ +csb337_fix_eth_addr ();at91_add_device_eth (&csb337_eth_data);/* USB Host */ at91_add_device_usbh (&csb337_usbh_data);
drivers/net/ethernet/cadence/Kconfig +0 -1
@@ -21,7 +21,6 @@ if NET_CADENCE config ARM_AT91_ETHER tristate "AT91RM9200 Ethernet support" - depends on ARM && ARCH_AT91RM9200 select NET_CORE select MACB ---help---
drivers/net/ethernet/cadence/at91_ether.c +6 -20
@@ -32,8 +32,6 @@#include <linux/phy.h> #include <linux/io.h> -#include <asm/mach-types.h> -#include "macb.h" #define DRV_NAME "at91_ether"
@@ -55,30 +53,18 @@* U-Boot on the AT91RM9200-DK do not do this. * * - Likewise it must store the addresses in the correct byte order. -* MicroMonitor (uMon) on the CSB337 does this incorrectly (and -* continues to do so, for bug-compatibility). */ static short __init unpack_mac_address (struct net_device *dev,unsigned int hi,unsigned int lo) {char addr[6 ]; -if (machine_is_csb337 ()) { - addr[5 ] = (lo &0xff );/* The CSB337 bootloader stores the MAC the wrong-way around */ - addr[4 ] = (lo &0xff00 ) >>8 ; - addr[3 ] = (lo &0xff0000 ) >>16 ; - addr[2 ] = (lo &0xff000000 ) >>24 ; - addr[1 ] = (hi &0xff ); - addr[0 ] = (hi &0xff00 ) >>8 ; - } -else { - addr[0 ] = (lo &0xff ); - addr[1 ] = (lo &0xff00 ) >>8 ; - addr[2 ] = (lo &0xff0000 ) >>16 ; - addr[3 ] = (lo &0xff000000 ) >>24 ; - addr[4 ] = (hi &0xff ); - addr[5 ] = (hi &0xff00 ) >>8 ; - } + addr[0 ] = (lo &0xff ); + addr[1 ] = (lo &0xff00 ) >>8 ; + addr[2 ] = (lo &0xff0000 ) >>16 ; + addr[3 ] = (lo &0xff000000 ) >>24 ; + addr[4 ] = (hi &0xff ); + addr[5 ] = (hi &0xff00 ) >>8 ;if (is_valid_ether_addr (addr)) {memcpy (dev->dev_addr, &addr,6 );
Signature · 1 line
1.7.12.4
PATCH 4/5 ARM: AT91: Remove HAVE_NET_MACB
In reply to Joachim EastwoodHAVE_NET_MACB has already been removed from the driver itself so removed it from mach Kconfig as well.
--- arch/arm/mach-at91/Kconfig | 4 ---- 1 file changed, 4 deletions(-)
arch/arm/mach-at91/Kconfig +0 -4
@@ -45,7 +45,6 @@ config SOC_AT91RM9200 config SOC_AT91SAM9260 bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20" select HAVE_AT91_DBGU0 - select HAVE_NET_MACB select SOC_AT91SAM9 help Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE
@@ -63,7 +62,6 @@ config SOC_AT91SAM9263 bool "AT91SAM9263" select HAVE_AT91_DBGU1 select HAVE_FB_ATMEL - select HAVE_NET_MACB select SOC_AT91SAM9 config SOC_AT91SAM9RL
@@ -76,7 +74,6 @@ config SOC_AT91SAM9G45 bool "AT91SAM9G45 or AT91SAM9M10 families" select HAVE_AT91_DBGU1 select HAVE_FB_ATMEL - select HAVE_NET_MACB select SOC_AT91SAM9 help Select this if you are using one of Atmel's AT91SAM9G45 family SoC.
@@ -86,7 +83,6 @@ config SOC_AT91SAM9X5 bool "AT91SAM9x5 family" select HAVE_AT91_DBGU0 select HAVE_FB_ATMEL - select HAVE_NET_MACB select SOC_AT91SAM9 help Select this if you are using one of Atmel's AT91SAM9x5 family SoC.
Signature · 1 line
1.7.12.4
PATCH 5/5 AVR32: Remove HAVE_NET_MACB
In reply to Joachim EastwoodHAVE_NET_MACB has already been removed from the driver itself so removed it from arch Kconfig as well.
--- arch/avr32/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/avr32/Kconfig +0 -1
@@ -80,7 +80,6 @@ config PLATFORM_AT32AP select ARCH_REQUIRE_GPIOLIB select GENERIC_ALLOCATOR select HAVE_FB_ATMEL - select HAVE_NET_MACB # # CPU types
Signature · 1 line
1.7.12.4
Re: [PATCH 3/5] net/at91_ether: move eth addr quirk into csb337 board setup
In reply to Joachim EastwoodQuoted 5 lines · Joachim Eastwood
Move Ethernet address byte order fix for csb337 into it's board setup.
This will allow us to remove the last mach include from
at91_etherand also to share the address setup with the macb driver.
no the at91rm9200 move to DT this is not compatible with it
you need to pass ths in info via platform_data
and do not touch driver code related stuff in boards
Best Regards,
J.
Quoted 126 lines
Signed-off-by Joachim Eastwood <[email protected]>--- arch/arm/mach-at91/board-csb337.c | 35 +++++++++++++++++++++++++++++++ drivers/net/ethernet/cadence/Kconfig | 1 - drivers/net/ethernet/cadence/at91_ether.c | 26 ++++++----------------- 3 files changed, 41 insertions(+), 21 deletions(-)arch/arm/mach-at91/board-csb337.c +35
-0@@ -217,6 +217,40 @@ static struct gpio_led csb_leds[] = { } }; +/* +* MicroMonitor (uMon) on the CSB337 store the ethernet address in the +* wrong byte order (and continues to do so, for bug-compatibility). +*/ +#define MACB_SA1B 0x0098 +#define MACB_SA1T 0x009c +static void __init csb337_fix_eth_addr (void ) +{ +void __iomem *emac; +u32 lo, hi, tmp; +int i; + + emac =ioremap (AT91RM9200_BASE_EMAC ,SZ_16K ); +if (!emac) { +printk (KERN_ERR "csb337: unable to fixup Ethernet address\n" ); +return ; + } + +/* Fix byte order on all 4 address registers */ +for (i =0 ; i <4 ; i++) { + lo =readl (emac +MACB_SA1B + i *8 ); + hi =readl (emac +MACB_SA1T + i *8 ); + + tmp = (lo &0xff ) <<8 | (lo &0xff00 ) >>8 ; +writel (tmp, emac +MACB_SA1T + i *8 ); + + tmp = (hi &0xff ) <<8 | (hi &0xff00 ) >>8 + | (lo &0xff0000 ) <<8 + | (lo &0xff000000 ) >>8 ; +writel (tmp, emac +MACB_SA1B + i *8 ); + } + +iounmap (emac); +}static void __init csb337_board_init (void ) {@@ -225,6 +259,7 @@ static void __init csb337_board_init(void)at91_register_uart (0 ,0 ,0 );at91_add_device_serial ();/* Ethernet */ +csb337_fix_eth_addr ();at91_add_device_eth (&csb337_eth_data);/* USB Host */ at91_add_device_usbh (&csb337_usbh_data);drivers/net/ethernet/cadence/Kconfig +0
-1@@ -21,7 +21,6 @@ if NET_CADENCE config ARM_AT91_ETHER tristate "AT91RM9200 Ethernet support" - depends on ARM && ARCH_AT91RM9200 select NET_CORE select MACB ---help---drivers/net/ethernet/cadence/at91_ether.c +6
-20@@ -32,8 +32,6 @@#include <linux/phy.h> #include <linux/io.h> -#include <asm/mach-types.h> -#include "macb.h" #define DRV_NAME "at91_ether"@@ -55,30 +53,18 @@* U-Boot on the AT91RM9200-DK do not do this. * * - Likewise it must store the addresses in the correct byte order. -* MicroMonitor (uMon) on the CSB337 does this incorrectly (and -* continues to do so, for bug-compatibility). */ static short __init unpack_mac_address (struct net_device *dev,unsigned int hi,unsigned int lo) {char addr[6 ]; -if (machine_is_csb337 ()) { - addr[5 ] = (lo &0xff );/* The CSB337 bootloader stores the MAC the wrong-way around */ - addr[4 ] = (lo &0xff00 ) >>8 ; - addr[3 ] = (lo &0xff0000 ) >>16 ; - addr[2 ] = (lo &0xff000000 ) >>24 ; - addr[1 ] = (hi &0xff ); - addr[0 ] = (hi &0xff00 ) >>8 ; - } -else { - addr[0 ] = (lo &0xff ); - addr[1 ] = (lo &0xff00 ) >>8 ; - addr[2 ] = (lo &0xff0000 ) >>16 ; - addr[3 ] = (lo &0xff000000 ) >>24 ; - addr[4 ] = (hi &0xff ); - addr[5 ] = (hi &0xff00 ) >>8 ; - } + addr[0 ] = (lo &0xff ); + addr[1 ] = (lo &0xff00 ) >>8 ; + addr[2 ] = (lo &0xff0000 ) >>16 ; + addr[3 ] = (lo &0xff000000 ) >>24 ; + addr[4 ] = (hi &0xff ); + addr[5 ] = (hi &0xff00 ) >>8 ;if (is_valid_ether_addr (addr)) {memcpy (dev->dev_addr, &addr,6 );Signature · 1 line
1.7.12.4
Re: [PATCH 1/5] net/cadence: get rid of HAVE_NET_MACB
In reply to Joachim EastwoodQuoted 2 lines · Joachim Eastwood
macb is a platform driver and there is nothing that prevents this driver from being built on non-ARM/AVR32 platforms.
if you want to drop the HAVE_NET_MACB you need to drop it everywher in one patch
Best Regards,
J.
Quoted 35 lines
Signed-off-by Joachim Eastwood <[email protected]>--- drivers/net/ethernet/cadence/Kconfig | 5 ----- 1 file changed, 5 deletions(-)drivers/net/ethernet/cadence/Kconfig +0
-5@@ -2,13 +2,9 @@ # Atmel device configuration # -config HAVE_NET_MACB - bool - config NET_CADENCE bool "Cadence devices" default y - depends on HAVE_NET_MACB || (ARM && ARCH_AT91RM9200) ---help--- If you have a network (Ethernet) card belonging to this class, say Y. Make sure you know the name of your card. Read the Ethernet-HOWTO,@@ -34,7 +30,6 @@ config ARM_AT91_ETHER config MACB tristate "Cadence MACB/GEM support" - depends on HAVE_NET_MACB select PHYLIB ---help--- The Cadence MACB ethernet interface is found on many Atmel AT32 andSignature · 1 line
1.7.12.4
Re: [PATCH 2/5] net/at91_ether: select MACB in Kconfig
In reply to Joachim EastwoodQuoted 16 lines · Joachim Eastwood
Now that
HAVE_NET_MACBis gone let's just select MACB to satisfy the dependecies inat91_ether.PHYLIB will then by selected by MACB.
Signed-off-by Joachim Eastwood <[email protected]>--- drivers/net/ethernet/cadence/Kconfig | 2 +- drivers/net/ethernet/cadence/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/net/ethernet/cadence/Kconfig +0
-0
drivers/net/ethernet/cadence/Kconfig config ARM_AT91_ETHER · line 26
Quoted 5 lines
drivers/net/ethernet/cadence/Kconfig +1
-1@@ -23,7 +23,7 @@ config ARM_AT91_ETHER tristate "AT91RM9200 Ethernet support" depends on ARM && ARCH_AT91RM9200 select NET_CORE - select PHYLIB + select MACB
no the ether and macb are two diferrent drivers for 2 IPs from cadence
the ehter does not need the macb
Best Regards,
J.
Quoted 17 lines
drivers/net/ethernet/cadence/Kconfig +0
-0---help--- If you wish to compile a kernel for the AT91RM9200 and enable ethernet support, then you should always answer Y to this.drivers/net/ethernet/cadence/Makefile +1
-1@@ -2,5 +2,5 @@ # Makefile for the Atmel network device drivers. # -obj-$(CONFIG_ARM_AT91_ETHER) += at91_ether.o macb.o +obj-$(CONFIG_ARM_AT91_ETHER) += at91_ether.o obj-$(CONFIG_MACB) += macb.oSignature · 1 line
1.7.12.4
Re: [PATCH 3/5] net/at91_ether: move eth addr quirk into csb337 board setup
In reply to Joachim EastwoodQuoted 5 lines · Joachim Eastwood
Move Ethernet address byte order fix for csb337 into it's board setup.
This will allow us to remove the last mach include from
at91_etherand also to share the address setup with the macb driver.
no the current drivers expect mach/board.h, mach/at91rm9200_emac.h, asm/gpio.h
waht you did will not even compile on non at91 platform
Did you even compile it on non at91?
Best Regards,
J.
Quoted 126 lines
Signed-off-by Joachim Eastwood <[email protected]>--- arch/arm/mach-at91/board-csb337.c | 35 +++++++++++++++++++++++++++++++ drivers/net/ethernet/cadence/Kconfig | 1 - drivers/net/ethernet/cadence/at91_ether.c | 26 ++++++----------------- 3 files changed, 41 insertions(+), 21 deletions(-)arch/arm/mach-at91/board-csb337.c +35
-0@@ -217,6 +217,40 @@ static struct gpio_led csb_leds[] = { } }; +/* +* MicroMonitor (uMon) on the CSB337 store the ethernet address in the +* wrong byte order (and continues to do so, for bug-compatibility). +*/ +#define MACB_SA1B 0x0098 +#define MACB_SA1T 0x009c +static void __init csb337_fix_eth_addr (void ) +{ +void __iomem *emac; +u32 lo, hi, tmp; +int i; + + emac =ioremap (AT91RM9200_BASE_EMAC ,SZ_16K ); +if (!emac) { +printk (KERN_ERR "csb337: unable to fixup Ethernet address\n" ); +return ; + } + +/* Fix byte order on all 4 address registers */ +for (i =0 ; i <4 ; i++) { + lo =readl (emac +MACB_SA1B + i *8 ); + hi =readl (emac +MACB_SA1T + i *8 ); + + tmp = (lo &0xff ) <<8 | (lo &0xff00 ) >>8 ; +writel (tmp, emac +MACB_SA1T + i *8 ); + + tmp = (hi &0xff ) <<8 | (hi &0xff00 ) >>8 + | (lo &0xff0000 ) <<8 + | (lo &0xff000000 ) >>8 ; +writel (tmp, emac +MACB_SA1B + i *8 ); + } + +iounmap (emac); +}static void __init csb337_board_init (void ) {@@ -225,6 +259,7 @@ static void __init csb337_board_init(void)at91_register_uart (0 ,0 ,0 );at91_add_device_serial ();/* Ethernet */ +csb337_fix_eth_addr ();at91_add_device_eth (&csb337_eth_data);/* USB Host */ at91_add_device_usbh (&csb337_usbh_data);drivers/net/ethernet/cadence/Kconfig +0
-1@@ -21,7 +21,6 @@ if NET_CADENCE config ARM_AT91_ETHER tristate "AT91RM9200 Ethernet support" - depends on ARM && ARCH_AT91RM9200 select NET_CORE select MACB ---help---drivers/net/ethernet/cadence/at91_ether.c +6
-20@@ -32,8 +32,6 @@#include <linux/phy.h> #include <linux/io.h> -#include <asm/mach-types.h> -#include "macb.h" #define DRV_NAME "at91_ether"@@ -55,30 +53,18 @@* U-Boot on the AT91RM9200-DK do not do this. * * - Likewise it must store the addresses in the correct byte order. -* MicroMonitor (uMon) on the CSB337 does this incorrectly (and -* continues to do so, for bug-compatibility). */ static short __init unpack_mac_address (struct net_device *dev,unsigned int hi,unsigned int lo) {char addr[6 ]; -if (machine_is_csb337 ()) { - addr[5 ] = (lo &0xff );/* The CSB337 bootloader stores the MAC the wrong-way around */ - addr[4 ] = (lo &0xff00 ) >>8 ; - addr[3 ] = (lo &0xff0000 ) >>16 ; - addr[2 ] = (lo &0xff000000 ) >>24 ; - addr[1 ] = (hi &0xff ); - addr[0 ] = (hi &0xff00 ) >>8 ; - } -else { - addr[0 ] = (lo &0xff ); - addr[1 ] = (lo &0xff00 ) >>8 ; - addr[2 ] = (lo &0xff0000 ) >>16 ; - addr[3 ] = (lo &0xff000000 ) >>24 ; - addr[4 ] = (hi &0xff ); - addr[5 ] = (hi &0xff00 ) >>8 ; - } + addr[0 ] = (lo &0xff ); + addr[1 ] = (lo &0xff00 ) >>8 ; + addr[2 ] = (lo &0xff0000 ) >>16 ; + addr[3 ] = (lo &0xff000000 ) >>24 ; + addr[4 ] = (hi &0xff ); + addr[5 ] = (hi &0xff00 ) >>8 ;if (is_valid_ether_addr (addr)) {memcpy (dev->dev_addr, &addr,6 );Signature · 1 line
1.7.12.4
Re: [PATCH 1/5] net/cadence: get rid of HAVE_NET_MACB
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 2 lines · Joachim Eastwood
macb is a platform driver and there is nothing that prevents this driver from being built on non-ARM/AVR32 platforms.
if you want to drop the
HAVE_NET_MACByou need to drop it everywher in one patch
Breaking it up in several patches doesn't seem to cause any build failures and I did this in case the patches were going into different git trees.
regards
Joachim Eastwood
Re: [PATCH 2/5] net/at91_ether: select MACB in Kconfig
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 24 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 16 lines · Joachim Eastwood
Now that
HAVE_NET_MACBis gone let's just select MACB to satisfy the dependecies inat91_ether.PHYLIB will then by selected by MACB.
Signed-off-by Joachim Eastwood <[email protected]>--- drivers/net/ethernet/cadence/Kconfig | 2 +- drivers/net/ethernet/cadence/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/net/ethernet/cadence/Kconfig +0
-0drivers/net/ethernet/cadence/Kconfig config ARM_AT91_ETHER · line 26
Quoted 5 lines
drivers/net/ethernet/cadence/Kconfig +1
-1@@ -23,7 +23,7 @@ config ARM_AT91_ETHER tristate "AT91RM9200 Ethernet support" depends on ARM && ARCH_AT91RM9200 select NET_CORE - select PHYLIB + select MACBno the ether and macb are two diferrent drivers for 2 IPs from cadence
Quoted 1 line
the ehter does not need the macb
The at91_ether in net-next does.
regards
Joachim Eastwood
Re: [PATCH 3/5] net/at91_ether: move eth addr quirk into csb337 board setup
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 5 lines · Joachim Eastwood
Move Ethernet address byte order fix for csb337 into it's board setup.
This will allow us to remove the last mach include from
at91_etherand also to share the address setup with the macb driver.no the current drivers expect
mach/board.h,mach/at91rm9200_emac.h,asm/gpio.hwaht you did will not even compile on non at91 platform
Did you even compile it on non at91?
This is the last mach include in the at91_ether driver in net-next. And, yes, after this patch it complies fine for at least x86_64.
regards
Joachim Eastwood
Re: [PATCH 3/5] net/at91_ether: move eth addr quirk into csb337 board setup
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 5 lines · Joachim Eastwood
Move Ethernet address byte order fix for csb337 into it's board setup.
This will allow us to remove the last mach include from
at91_etherand also to share the address setup with the macb driver.no the at91rm9200 move to DT this is not compatible with it
you need to pass ths in info via
platform_dataand do not touch driver code related stuff in boards
I know the board code is a bit nasty.
If it's unacceptable I'll cook up a flag and pass it by platform_data, something like "reverse_eth_addr". Still it will only ever be used on the csb337 board.
regards
Joachim Eastwood
David Miller
maintainerRe: [PATCH 1/5] net/cadence: get rid of HAVE_NET_MACB
In reply to Joachim EastwoodYou do know that this is going to generate warnings on 64-bit platforms?
I was hoping you would have noticed and corrected this before enabling the driver everywhere, I guess my expectations were way too high :-/
Re: [PATCH 1/5] net/cadence: get rid of HAVE_NET_MACB
Quoted 7 lines · David Miller
You do know that this is going to generate warnings on 64-bit platforms?
I was hoping you would have noticed and corrected this before enabling the driver everywhere, I guess my expectations were way too high :-/
ah, sorry.
Yes, macb seem to generate some integer overflows on ~0UL on 64-bit. I have a patch that turns ~0UL into -1.
I can repost the series with fix included. Do you want me to do that?
regards
Joachim Eastwood
David Miller
maintainerRe: [PATCH 1/5] net/cadence: get rid of HAVE_NET_MACB
From: Joachim Eastwood <[email protected]>
Date: Mon, 22 Oct 2012 08:59:17 +0200
Quoted 9 lines · David Miller
Quoted 7 lines
You do know that this is going to generate warnings on 64-bit platforms?
I was hoping you would have noticed and corrected this before enabling the driver everywhere, I guess my expectations were way too high :-/
Quoted 6 lines
ah, sorry.
Yes, macb seem to generate some integer overflows on ~0UL on 64-bit. I have a patch that turns ~0UL into -1.
I can repost the series with fix included. Do you want me to do that?
Yes, please do.
Thanks.