aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/gemini/patches/123-arm-gemini-wbd222-register-eth.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2013-03-25 14:18:32 +0000
committerImre Kaloz <kaloz@openwrt.org>2013-03-25 14:18:32 +0000
commitb92e7500276a851f091de6e2c953056c9d45d987 (patch)
tree198c0d3a9250198ec4abacf93e2ea6d16ab0c192 /target/linux/gemini/patches/123-arm-gemini-wbd222-register-eth.patch
parentc90078ce8722256aa6e73b352982bd7ab9740a66 (diff)
downloadupstream-b92e7500276a851f091de6e2c953056c9d45d987.tar.gz
upstream-b92e7500276a851f091de6e2c953056c9d45d987.tar.bz2
upstream-b92e7500276a851f091de6e2c953056c9d45d987.zip
upgrade to 3.9-rc4, disable unsupported boards
SVN-Revision: 36128
Diffstat (limited to 'target/linux/gemini/patches/123-arm-gemini-wbd222-register-eth.patch')
-rw-r--r--target/linux/gemini/patches/123-arm-gemini-wbd222-register-eth.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/gemini/patches/123-arm-gemini-wbd222-register-eth.patch b/target/linux/gemini/patches/123-arm-gemini-wbd222-register-eth.patch
new file mode 100644
index 0000000000..32852da283
--- /dev/null
+++ b/target/linux/gemini/patches/123-arm-gemini-wbd222-register-eth.patch
@@ -0,0 +1,43 @@
+--- a/arch/arm/mach-gemini/board-wbd222.c
++++ b/arch/arm/mach-gemini/board-wbd222.c
+@@ -22,9 +22,31 @@
+ #include <asm/mach/arch.h>
+ #include <asm/mach/time.h>
+
++#include <mach/gmac.h>
+
+ #include "common.h"
+
++static struct mdio_gpio_platform_data wbd222_mdio = {
++ .mdc = 22,
++ .mdio = 21,
++ .phy_mask = ~((1 << 1) | (1 << 3)),
++};
++
++static struct platform_device wbd222_phy_device = {
++ .name = "mdio-gpio",
++ .id = 0,
++ .dev = {
++ .platform_data = &wbd222_mdio,
++ },
++};
++
++static struct gemini_gmac_platform_data gmac_data = {
++ .bus_id[0] = "gpio-0:01",
++ .interface[0] = PHY_INTERFACE_MODE_MII,
++ .bus_id[1] = "gpio-0:03",
++ .interface[1] = PHY_INTERFACE_MODE_MII,
++};
++
+ static struct gpio_keys_button wbd222_keys[] = {
+ {
+ .code = KEY_SETUP,
+@@ -123,6 +145,8 @@ static void __init wbd222_init(void)
+ platform_device_register(&wbd222_keys_device);
+ platform_register_rtc();
+ platform_register_watchdog();
++ platform_device_register(&wbd222_phy_device);
++ platform_register_ethernet(&gmac_data);
+ }
+
+ MACHINE_START(WBD222, "Wiliboard WBD-222")