aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cadence
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2012-10-22 04:45:34 -0400
committerDavid S. Miller <davem@davemloft.net>2012-10-23 02:40:10 -0400
commit0668744f792a737872aa1904010e5fba5f95376b (patch)
treece489d58abb7a6a93e86a72dd524b3a26e7701b3 /drivers/net/ethernet/cadence
parentf4a15e1b293b0de21bab6d9c258f162d9efff9e2 (diff)
net/at91_ether: add pdata flag for reverse Eth addr
This will allow us to remove the last mach include from at91_ether and also make it easier to share address setup with macb. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cadence')
-rw-r--r--drivers/net/ethernet/cadence/Kconfig1
-rw-r--r--drivers/net/ethernet/cadence/at91_ether.c5
2 files changed, 2 insertions, 4 deletions
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
22config ARM_AT91_ETHER 22config 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
62static short __init unpack_mac_address(struct net_device *dev, unsigned int hi, unsigned int lo) 60static 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;