summaryrefslogtreecommitdiff
path: root/target/linux/gemini/patches-3.3/122-arm-gemini-wbd111-register-ethernet.patch
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-05-13 12:03:59 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-05-13 12:03:59 +0000
commitd0ac4c1f0396906c755fb5cc81a729a611a2ca4d (patch)
treec998c548dde6b0c97290f82c3fe2744917f24fee /target/linux/gemini/patches-3.3/122-arm-gemini-wbd111-register-ethernet.patch
parent9cc9e8b608c51e5901cc1e314f1f4962b6618ee2 (diff)
downloadmtk-20170518-d0ac4c1f0396906c755fb5cc81a729a611a2ca4d.zip
mtk-20170518-d0ac4c1f0396906c755fb5cc81a729a611a2ca4d.tar.gz
mtk-20170518-d0ac4c1f0396906c755fb5cc81a729a611a2ca4d.tar.bz2
gemini: add support for 3.3
SVN-Revision: 31698
Diffstat (limited to 'target/linux/gemini/patches-3.3/122-arm-gemini-wbd111-register-ethernet.patch')
-rw-r--r--target/linux/gemini/patches-3.3/122-arm-gemini-wbd111-register-ethernet.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/gemini/patches-3.3/122-arm-gemini-wbd111-register-ethernet.patch b/target/linux/gemini/patches-3.3/122-arm-gemini-wbd111-register-ethernet.patch
new file mode 100644
index 0000000..da2eefc
--- /dev/null
+++ b/target/linux/gemini/patches-3.3/122-arm-gemini-wbd111-register-ethernet.patch
@@ -0,0 +1,41 @@
+--- a/arch/arm/mach-gemini/board-wbd111.c
++++ b/arch/arm/mach-gemini/board-wbd111.c
+@@ -22,9 +22,29 @@
+ #include <asm/mach/arch.h>
+ #include <asm/mach/time.h>
+
++#include <mach/gmac.h>
+
+ #include "common.h"
+
++static struct mdio_gpio_platform_data wbd111_mdio = {
++ .mdc = 22,
++ .mdio = 21,
++ .phy_mask = ~(1 << 1),
++};
++
++static struct platform_device wbd111_phy_device = {
++ .name = "mdio-gpio",
++ .id = 0,
++ .dev = {
++ .platform_data = &wbd111_mdio,
++ },
++};
++
++static struct gemini_gmac_platform_data gmac_data = {
++ .bus_id[0] = "0:01",
++ .interface[0] = PHY_INTERFACE_MODE_MII,
++};
++
+ static struct gpio_keys_button wbd111_keys[] = {
+ {
+ .code = KEY_SETUP,
+@@ -127,6 +147,8 @@ static void __init wbd111_init(void)
+ platform_device_register(&wbd111_keys_device);
+ platform_register_rtc();
+ platform_register_watchdog();
++ platform_device_register(&wbd111_phy_device);
++ platform_register_ethernet(&gmac_data);
+ }
+
+ MACHINE_START(WBD111, "Wiliboard WBD-111")