diff options
author | Peter Robinson <pbrobinson@gmail.com> | 2012-06-10 23:41:53 +0100 |
---|---|---|
committer | Peter Robinson <pbrobinson@gmail.com> | 2012-06-10 23:41:53 +0100 |
commit | d0e352027132c139deb8b3e64526ff781e4c64af (patch) | |
tree | c66d807c94a576ed134363e8f6e59486a3d52deb /arm-smsc-support-reading-mac-address-from-device-tree.patch | |
parent | ff66a4e962842bfb5a8628322a7468fc1571db9f (diff) | |
download | kernel-d0e352027132c139deb8b3e64526ff781e4c64af.tar.gz kernel-d0e352027132c139deb8b3e64526ff781e4c64af.tar.xz kernel-d0e352027132c139deb8b3e64526ff781e4c64af.zip |
- Temporarily disable ARM imx kernel due to missing clk patches
- Add patch to fix OMAP build
- Drop DTB mac patches as rejected upstream
- General ARM cleanups
Diffstat (limited to 'arm-smsc-support-reading-mac-address-from-device-tree.patch')
-rw-r--r-- | arm-smsc-support-reading-mac-address-from-device-tree.patch | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/arm-smsc-support-reading-mac-address-from-device-tree.patch b/arm-smsc-support-reading-mac-address-from-device-tree.patch deleted file mode 100644 index a36c68369..000000000 --- a/arm-smsc-support-reading-mac-address-from-device-tree.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 0b608345e114681f66ca0a3cf9d9434728da62ce Mon Sep 17 00:00:00 2001 -From: Ken Cox <ken@coxcampers.net> -Date: Thu, 23 Jun 2011 10:36:43 -0500 -Subject: [PATCH] Support reading mac address from device tree. - -If CONFIG_OF is enabled, we will try to read the mac address from the device tree. This enables us the ability to have a "static" mac address on arm boards such as the pandaboard and beagleboard which generate random mac addresses. ---- - drivers/net/usb/smsc75xx.c | 17 +++++++++++++++++ - drivers/net/usb/smsc95xx.c | 18 +++++++++++++++++- - 2 files changed, 34 insertions(+), 1 deletions(-) - -diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c -index 753ee6e..ac0a200 100644 ---- a/drivers/net/usb/smsc75xx.c -+++ b/drivers/net/usb/smsc75xx.c -@@ -29,6 +29,7 @@ - #include <linux/crc32.h> - #include <linux/usb/usbnet.h> - #include <linux/slab.h> -+#include <linux/of_device.h> - #include "smsc75xx.h" - - #define SMSC_CHIPNAME "smsc75xx" -@@ -658,6 +659,22 @@ static int smsc75xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) - - static void smsc75xx_init_mac_address(struct usbnet *dev) - { -+ void *address; -+#ifdef CONFIG_OF -+ struct device_node *np; -+ -+ /* try the device tree */ -+ np = of_find_node_by_name(NULL, "smsc75xx"); -+ if (np) { -+ address = of_get_property(np, "local-mac-address", NULL); -+ if (address) { -+ memcpy(dev->net->dev_addr, address, ETH_ALEN); -+ netif_dbg(dev, ifup, dev->net, "MAC address read from device tree\n"); -+ return; -+ } -+ } -+#endif -+ - /* try reading mac address from EEPROM */ - if (smsc75xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, - dev->net->dev_addr) == 0) { -diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index bc86f4b..c83942d 100644 ---- a/drivers/net/usb/smsc95xx.c -+++ b/drivers/net/usb/smsc95xx.c -@@ -29,6 +29,7 @@ - #include <linux/crc32.h> - #include <linux/usb/usbnet.h> - #include <linux/slab.h> -+#include <linux/of_device.h> - #include "smsc95xx.h" - - #define SMSC_CHIPNAME "smsc95xx" -@@ -639,6 +640,22 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) - - static void smsc95xx_init_mac_address(struct usbnet *dev) - { -+ void *address; -+#ifdef CONFIG_OF -+ struct device_node *np; -+ -+ /* try the device tree */ -+ np = of_find_node_by_name(NULL, "smsc95xx"); -+ if (np) { -+ address = of_get_property(np, "local-mac-address", NULL); -+ if (address) { -+ memcpy(dev->net->dev_addr, address, ETH_ALEN); -+ netif_dbg(dev, ifup, dev->net, "MAC address read from device tree\n"); -+ return; -+ } -+ } -+#endif -+ - /* try reading mac address from EEPROM */ - if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, - dev->net->dev_addr) == 0) { -@@ -648,7 +665,6 @@ static void smsc95xx_init_mac_address(struct usbnet *dev) - return; - } - } -- - /* no eeprom, or eeprom values are invalid. generate random MAC */ - random_ether_addr(dev->net->dev_addr); - netif_dbg(dev, ifup, dev->net, "MAC address set to random_ether_addr\n"); --- -1.7.2.3 - |