diff options
-rw-r--r-- | arch/arm/mach-at91/board-csb337.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/cadence/Kconfig | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/cadence/at91_ether.c | 5 | ||||
-rw-r--r-- | include/linux/platform_data/macb.h | 1 |
4 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c index 3e37437a7a61..aa9b320bad59 100644 --- a/arch/arm/mach-at91/board-csb337.c +++ b/arch/arm/mach-at91/board-csb337.c | |||
@@ -53,6 +53,8 @@ static void __init csb337_init_early(void) | |||
53 | static struct macb_platform_data __initdata csb337_eth_data = { | 53 | static struct macb_platform_data __initdata csb337_eth_data = { |
54 | .phy_irq_pin = AT91_PIN_PC2, | 54 | .phy_irq_pin = AT91_PIN_PC2, |
55 | .is_rmii = 0, | 55 | .is_rmii = 0, |
56 | /* The CSB337 bootloader stores the MAC the wrong-way around */ | ||
57 | .rev_eth_addr = 1, | ||
56 | }; | 58 | }; |
57 | 59 | ||
58 | static struct at91_usbh_data __initdata csb337_usbh_data = { | 60 | static struct at91_usbh_data __initdata csb337_usbh_data = { |
diff --git a/drivers/net/ethernet/cadence/Kconfig b/drivers/net/ethernet/cadence/Kconfig index f6d0956485f1..40172d1ca605 100644 --- a/drivers/net/ethernet/cadence/Kconfig +++ b/drivers/net/ethernet/cadence/Kconfig | |||
@@ -21,7 +21,6 @@ if NET_CADENCE | |||
21 | 21 | ||
22 | config ARM_AT91_ETHER | 22 | config ARM_AT91_ETHER |
23 | tristate "AT91RM9200 Ethernet support" | 23 | tristate "AT91RM9200 Ethernet support" |
24 | depends on ARM && ARCH_AT91RM9200 | ||
25 | select NET_CORE | 24 | select NET_CORE |
26 | select MACB | 25 | select MACB |
27 | ---help--- | 26 | ---help--- |
diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c index 375d272d1a5f..b92815aabc65 100644 --- a/drivers/net/ethernet/cadence/at91_ether.c +++ b/drivers/net/ethernet/cadence/at91_ether.c | |||
@@ -32,8 +32,6 @@ | |||
32 | #include <linux/phy.h> | 32 | #include <linux/phy.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | 34 | ||
35 | #include <asm/mach-types.h> | ||
36 | |||
37 | #include "macb.h" | 35 | #include "macb.h" |
38 | 36 | ||
39 | #define DRV_NAME "at91_ether" | 37 | #define DRV_NAME "at91_ether" |
@@ -61,9 +59,10 @@ | |||
61 | 59 | ||
62 | static short __init unpack_mac_address(struct net_device *dev, unsigned int hi, unsigned int lo) | 60 | static short __init unpack_mac_address(struct net_device *dev, unsigned int hi, unsigned int lo) |
63 | { | 61 | { |
62 | struct macb *lp = netdev_priv(dev); | ||
64 | char addr[6]; | 63 | char addr[6]; |
65 | 64 | ||
66 | if (machine_is_csb337()) { | 65 | if (lp->board_data.rev_eth_addr) { |
67 | addr[5] = (lo & 0xff); /* The CSB337 bootloader stores the MAC the wrong-way around */ | 66 | addr[5] = (lo & 0xff); /* The CSB337 bootloader stores the MAC the wrong-way around */ |
68 | addr[4] = (lo & 0xff00) >> 8; | 67 | addr[4] = (lo & 0xff00) >> 8; |
69 | addr[3] = (lo & 0xff0000) >> 16; | 68 | addr[3] = (lo & 0xff0000) >> 16; |
diff --git a/include/linux/platform_data/macb.h b/include/linux/platform_data/macb.h index b081c7245ec8..044a124bfbbc 100644 --- a/include/linux/platform_data/macb.h +++ b/include/linux/platform_data/macb.h | |||
@@ -12,6 +12,7 @@ struct macb_platform_data { | |||
12 | u32 phy_mask; | 12 | u32 phy_mask; |
13 | int phy_irq_pin; /* PHY IRQ */ | 13 | int phy_irq_pin; /* PHY IRQ */ |
14 | u8 is_rmii; /* using RMII interface? */ | 14 | u8 is_rmii; /* using RMII interface? */ |
15 | u8 rev_eth_addr; /* reverse Ethernet address byte order */ | ||
15 | }; | 16 | }; |
16 | 17 | ||
17 | #endif /* __MACB_PDATA_H__ */ | 18 | #endif /* __MACB_PDATA_H__ */ |