summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-02-25 18:00:54 +0000
committerkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-02-25 18:00:54 +0000
commit4fbe51943d0c7db5febb819a34adaaab95289d2f (patch)
tree014f2c779e0dcb3a71ba1058504537ff5a2ee27b
parentd370da1e11e992d61ffb741b48aebfeb4ddd2230 (diff)
[target/gemini]: register gmac, too
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25712 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/gemini/patches/003-missing_from_upstream.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/target/linux/gemini/patches/003-missing_from_upstream.patch b/target/linux/gemini/patches/003-missing_from_upstream.patch
new file mode 100644
index 000000000..6eef4f85c
--- /dev/null
+++ b/target/linux/gemini/patches/003-missing_from_upstream.patch
@@ -0,0 +1,86 @@
+--- 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,
+@@ -131,6 +151,8 @@
+ wbd111_num_partitions);
+ platform_device_register(&wbd111_leds_device);
+ platform_device_register(&wbd111_keys_device);
++ platform_device_register(&wbd111_phy_device);
++ platform_register_ethernet(&gmac_data);
+ }
+
+ MACHINE_START(WBD111, "Wiliboard WBD-111")
+--- 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] = "0:01",
++ .interface[0] = PHY_INTERFACE_MODE_MII,
++ .bus_id[1] = "0:03",
++ .interface[1] = PHY_INTERFACE_MODE_MII,
++};
++
+ static struct gpio_keys_button wbd222_keys[] = {
+ {
+ .code = KEY_SETUP,
+@@ -131,6 +153,10 @@
+ wbd222_num_partitions);
+ platform_device_register(&wbd222_leds_device);
+ platform_device_register(&wbd222_keys_device);
++ platform_device_register(&wbd222_phy_device);
++ platform_register_ethernet(&gmac_data);
++ platform_register_usb(0);
++ platform_register_usb(1);
+ }
+
+ MACHINE_START(WBD222, "Wiliboard WBD-222")