[OpenWrt-Devel] [PATCH 1/2] gemini: merge register ethernet patches into one
Roman Yeryomin
leroi.lists at gmail.com
Sat Dec 13 21:20:28 EST 2014
Signed-off-by: Roman Yeryomin <roman at advem.lv>
---
.../121-arm-gemini-nas4220-register-ethernet.patch | 79 --------
.../121-arm-gemini-register-ethernet.patch | 210 +++++++++++++++++++++
.../122-arm-gemini-wbd111-register-ethernet.patch | 41 ----
.../123-arm-gemini-wbd222-register-eth.patch | 43 -----
.../124-arm-gemini-rut100-register-ethernet.patch | 47 -----
5 files changed, 210 insertions(+), 210 deletions(-)
delete mode 100644 target/linux/gemini/patches-3.10/121-arm-gemini-nas4220-register-ethernet.patch
create mode 100644 target/linux/gemini/patches-3.10/121-arm-gemini-register-ethernet.patch
delete mode 100644 target/linux/gemini/patches-3.10/122-arm-gemini-wbd111-register-ethernet.patch
delete mode 100644 target/linux/gemini/patches-3.10/123-arm-gemini-wbd222-register-eth.patch
delete mode 100644 target/linux/gemini/patches-3.10/124-arm-gemini-rut100-register-ethernet.patch
diff --git a/target/linux/gemini/patches-3.10/121-arm-gemini-nas4220-register-ethernet.patch b/target/linux/gemini/patches-3.10/121-arm-gemini-nas4220-register-ethernet.patch
deleted file mode 100644
index db95648..0000000
--- a/target/linux/gemini/patches-3.10/121-arm-gemini-nas4220-register-ethernet.patch
+++ /dev/null
@@ -1,79 +0,0 @@
---- a/arch/arm/mach-gemini/board-nas4220b.c 2011-04-21 13:19:09.878432930 +0200
-+++ b/arch/arm/mach-gemini/board-nas4220b.c 2011-04-21 13:30:37.555082365 +0200
-@@ -28,9 +28,27 @@
-
- #include <mach/hardware.h>
- #include <mach/global_reg.h>
-+#include <mach/gmac.h>
-
- #include "common.h"
-
-+static struct mdio_gpio_platform_data ib4220b_mdio = {
-+ .mdc = 22,
-+ .mdio = 21,
-+ .phy_mask = ~(1 << 1),
-+};
-+
-+static struct platform_device ib4220b_phy_device = {
-+ .name = "mdio-gpio",
-+ .id = 0,
-+ .dev = { .platform_data = &ib4220b_mdio, },
-+};
-+
-+static struct gemini_gmac_platform_data ib4220b_gmac_data = {
-+ .bus_id[0] = "gpio-0:01",
-+ .interface[0] = PHY_INTERFACE_MODE_RGMII,
-+};
-+
- static struct gpio_led ib4220b_leds[] = {
- {
- .name = "nas4220b:orange:hdd",
-@@ -107,9 +125,39 @@
- },
- };
-
-+static void __init ib4220b_gmac_init(void)
-+{
-+ unsigned int val;
-+
-+ val = readl((void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+ GLOBAL_IO_DRIVING_CTRL));
-+ val |= (0x3 << GMAC0_PADS_SHIFT) | (0x3 << GMAC1_PADS_SHIFT);
-+ writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+ GLOBAL_IO_DRIVING_CTRL));
-+
-+ val = (0x0 << GMAC0_RXDV_SKEW_SHIFT) | (0xf << GMAC0_RXC_SKEW_SHIFT) |
-+ (0x7 << GMAC0_TXEN_SKEW_SHIFT) | (0xb << GMAC0_TXC_SKEW_SHIFT) |
-+ (0x0 << GMAC1_RXDV_SKEW_SHIFT) | (0xf << GMAC1_RXC_SKEW_SHIFT) |
-+ (0x7 << GMAC1_TXEN_SKEW_SHIFT) | (0xa << GMAC1_TXC_SKEW_SHIFT);
-+ writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+ GLOBAL_GMAC_CTRL_SKEW_CTRL));
-+
-+ writel(0x77777777, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+ GLOBAL_GMAC0_DATA_SKEW_CTRL));
-+ writel(0x77777777, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+ GLOBAL_GMAC1_DATA_SKEW_CTRL));
-+
-+ val = readl((void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+ GLOBAL_ARBITRATION1_CTRL)) & ~BURST_LENGTH_MASK;
-+ val |= (0x20 << BURST_LENGTH_SHIFT) | GMAC0_HIGH_PRIO | GMAC1_HIGH_PRIO;
-+ writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
-+ GLOBAL_ARBITRATION1_CTRL));
-+}
-+
- static void __init ib4220b_init(void)
- {
- gemini_gpio_init();
-+ ib4220b_gmac_init();
- platform_register_uart();
- platform_register_pflash(SZ_16M, NULL, 0);
- platform_device_register(&ib4220b_led_device);
-@@ -96,6 +144,8 @@
- platform_device_register(&ib4220b_key_device);
- platform_register_rtc();
- platform_register_watchdog();
-+ platform_device_register(&ib4220b_phy_device);
-+ platform_register_ethernet(&ib4220b_gmac_data);
- }
-
- MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")
diff --git a/target/linux/gemini/patches-3.10/121-arm-gemini-register-ethernet.patch b/target/linux/gemini/patches-3.10/121-arm-gemini-register-ethernet.patch
new file mode 100644
index 0000000..d5bab9e
--- /dev/null
+++ b/target/linux/gemini/patches-3.10/121-arm-gemini-register-ethernet.patch
@@ -0,0 +1,210 @@
+--- a/arch/arm/mach-gemini/board-nas4220b.c 2011-04-21 13:19:09.878432930 +0200
++++ b/arch/arm/mach-gemini/board-nas4220b.c 2011-04-21 13:30:37.555082365 +0200
+@@ -28,9 +28,27 @@
+
+ #include <mach/hardware.h>
+ #include <mach/global_reg.h>
++#include <mach/gmac.h>
+
+ #include "common.h"
+
++static struct mdio_gpio_platform_data ib4220b_mdio = {
++ .mdc = 22,
++ .mdio = 21,
++ .phy_mask = ~(1 << 1),
++};
++
++static struct platform_device ib4220b_phy_device = {
++ .name = "mdio-gpio",
++ .id = 0,
++ .dev = { .platform_data = &ib4220b_mdio, },
++};
++
++static struct gemini_gmac_platform_data ib4220b_gmac_data = {
++ .bus_id[0] = "gpio-0:01",
++ .interface[0] = PHY_INTERFACE_MODE_RGMII,
++};
++
+ static struct gpio_led ib4220b_leds[] = {
+ {
+ .name = "nas4220b:orange:hdd",
+@@ -107,9 +125,39 @@
+ },
+ };
+
++static void __init ib4220b_gmac_init(void)
++{
++ unsigned int val;
++
++ val = readl((void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
++ GLOBAL_IO_DRIVING_CTRL));
++ val |= (0x3 << GMAC0_PADS_SHIFT) | (0x3 << GMAC1_PADS_SHIFT);
++ writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
++ GLOBAL_IO_DRIVING_CTRL));
++
++ val = (0x0 << GMAC0_RXDV_SKEW_SHIFT) | (0xf << GMAC0_RXC_SKEW_SHIFT) |
++ (0x7 << GMAC0_TXEN_SKEW_SHIFT) | (0xb << GMAC0_TXC_SKEW_SHIFT) |
++ (0x0 << GMAC1_RXDV_SKEW_SHIFT) | (0xf << GMAC1_RXC_SKEW_SHIFT) |
++ (0x7 << GMAC1_TXEN_SKEW_SHIFT) | (0xa << GMAC1_TXC_SKEW_SHIFT);
++ writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
++ GLOBAL_GMAC_CTRL_SKEW_CTRL));
++
++ writel(0x77777777, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
++ GLOBAL_GMAC0_DATA_SKEW_CTRL));
++ writel(0x77777777, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
++ GLOBAL_GMAC1_DATA_SKEW_CTRL));
++
++ val = readl((void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
++ GLOBAL_ARBITRATION1_CTRL)) & ~BURST_LENGTH_MASK;
++ val |= (0x20 << BURST_LENGTH_SHIFT) | GMAC0_HIGH_PRIO | GMAC1_HIGH_PRIO;
++ writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
++ GLOBAL_ARBITRATION1_CTRL));
++}
++
+ static void __init ib4220b_init(void)
+ {
+ gemini_gpio_init();
++ ib4220b_gmac_init();
+ platform_register_uart();
+ platform_register_pflash(SZ_16M, NULL, 0);
+ platform_device_register(&ib4220b_led_device);
+@@ -96,6 +144,8 @@
+ platform_device_register(&ib4220b_key_device);
+ platform_register_rtc();
+ platform_register_watchdog();
++ platform_device_register(&ib4220b_phy_device);
++ platform_register_ethernet(&ib4220b_gmac_data);
+ }
+
+ MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")
+--- 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] = "gpio-0:01",
++ .interface[0] = PHY_INTERFACE_MODE_MII,
++};
++
+ static struct gpio_keys_button wbd111_keys[] = {
+ {
+ .code = KEY_SETUP,
+@@ -123,6 +143,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")
+--- 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")
+--- a/arch/arm/mach-gemini/board-rut1xx.c
++++ b/arch/arm/mach-gemini/board-rut1xx.c
+@@ -15,13 +15,35 @@
+ #include <linux/input.h>
+ #include <linux/gpio_keys.h>
+ #include <linux/sizes.h>
++#include <linux/mdio-gpio.h>
+
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+ #include <asm/mach/time.h>
+
++#include <mach/gmac.h>
++
+ #include "common.h"
+
++static struct mdio_gpio_platform_data rut1xx_mdio = {
++ .mdc = 22,
++ .mdio = 21,
++ .phy_mask = ~(1 << 1),
++};
++
++static struct platform_device rut1xx_phy_device = {
++ .name = "mdio-gpio",
++ .id = 0,
++ .dev = {
++ .platform_data = &rut1xx_mdio,
++ },
++};
++
++static struct gemini_gmac_platform_data gmac_data = {
++ .bus_id[0] = "gpio-0:01",
++ .interface[0] = PHY_INTERFACE_MODE_MII,
++};
++
+ static struct gpio_keys_button rut1xx_keys[] = {
+ {
+ .code = KEY_SETUP,
+@@ -81,6 +103,8 @@ static void __init rut1xx_init(void)
+ platform_device_register(&rut1xx_keys_device);
+ platform_register_rtc();
+ platform_register_watchdog();
++ platform_device_register(&rut1xx_phy_device);
++ platform_register_ethernet(&gmac_data);
+ }
+
+ MACHINE_START(RUT100, "Teltonika RUT100")
diff --git a/target/linux/gemini/patches-3.10/122-arm-gemini-wbd111-register-ethernet.patch b/target/linux/gemini/patches-3.10/122-arm-gemini-wbd111-register-ethernet.patch
deleted file mode 100644
index 1a02b55..0000000
--- a/target/linux/gemini/patches-3.10/122-arm-gemini-wbd111-register-ethernet.patch
+++ /dev/null
@@ -1,41 +0,0 @@
---- 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] = "gpio-0:01",
-+ .interface[0] = PHY_INTERFACE_MODE_MII,
-+};
-+
- static struct gpio_keys_button wbd111_keys[] = {
- {
- .code = KEY_SETUP,
-@@ -123,6 +143,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")
diff --git a/target/linux/gemini/patches-3.10/123-arm-gemini-wbd222-register-eth.patch b/target/linux/gemini/patches-3.10/123-arm-gemini-wbd222-register-eth.patch
deleted file mode 100644
index 32852da..0000000
--- a/target/linux/gemini/patches-3.10/123-arm-gemini-wbd222-register-eth.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- 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")
diff --git a/target/linux/gemini/patches-3.10/124-arm-gemini-rut100-register-ethernet.patch b/target/linux/gemini/patches-3.10/124-arm-gemini-rut100-register-ethernet.patch
deleted file mode 100644
index e7c55d5..0000000
--- a/target/linux/gemini/patches-3.10/124-arm-gemini-rut100-register-ethernet.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/arch/arm/mach-gemini/board-rut1xx.c
-+++ b/arch/arm/mach-gemini/board-rut1xx.c
-@@ -15,13 +15,35 @@
- #include <linux/input.h>
- #include <linux/gpio_keys.h>
- #include <linux/sizes.h>
-+#include <linux/mdio-gpio.h>
-
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
-
-+#include <mach/gmac.h>
-+
- #include "common.h"
-
-+static struct mdio_gpio_platform_data rut1xx_mdio = {
-+ .mdc = 22,
-+ .mdio = 21,
-+ .phy_mask = ~(1 << 1),
-+};
-+
-+static struct platform_device rut1xx_phy_device = {
-+ .name = "mdio-gpio",
-+ .id = 0,
-+ .dev = {
-+ .platform_data = &rut1xx_mdio,
-+ },
-+};
-+
-+static struct gemini_gmac_platform_data gmac_data = {
-+ .bus_id[0] = "gpio-0:01",
-+ .interface[0] = PHY_INTERFACE_MODE_MII,
-+};
-+
- static struct gpio_keys_button rut1xx_keys[] = {
- {
- .code = KEY_SETUP,
-@@ -81,6 +103,8 @@ static void __init rut1xx_init(void)
- platform_device_register(&rut1xx_keys_device);
- platform_register_rtc();
- platform_register_watchdog();
-+ platform_device_register(&rut1xx_phy_device);
-+ platform_register_ethernet(&gmac_data);
- }
-
- MACHINE_START(RUT100, "Teltonika RUT100")
--
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list