diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2014-09-08 19:55:00 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2014-09-08 19:55:00 +0000 |
commit | 2f47b07c14e4f9e6182a0943ccbc85a7c28997bd (patch) | |
tree | 1bfb09f11d21b7ee3c4a6114f097b1afa75f8d05 /target/linux/gemini/patches/121-arm-gemini-add-ethernet-device.patch | |
parent | af2aa0ba4c9744e83775ceba44df3bd3146d203e (diff) | |
download | master-187ad058-2f47b07c14e4f9e6182a0943ccbc85a7c28997bd.tar.gz master-187ad058-2f47b07c14e4f9e6182a0943ccbc85a7c28997bd.tar.bz2 master-187ad058-2f47b07c14e4f9e6182a0943ccbc85a7c28997bd.zip |
gemini: drop kernel 3.9 support
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42451 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/gemini/patches/121-arm-gemini-add-ethernet-device.patch')
-rw-r--r-- | target/linux/gemini/patches/121-arm-gemini-add-ethernet-device.patch | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/target/linux/gemini/patches/121-arm-gemini-add-ethernet-device.patch b/target/linux/gemini/patches/121-arm-gemini-add-ethernet-device.patch deleted file mode 100644 index d6def9b687..0000000000 --- a/target/linux/gemini/patches/121-arm-gemini-add-ethernet-device.patch +++ /dev/null @@ -1,82 +0,0 @@ ---- a/arch/arm/mach-gemini/common.h -+++ b/arch/arm/mach-gemini/common.h -@@ -13,6 +13,7 @@ - #define __GEMINI_COMMON_H__ - - struct mtd_partition; -+struct gemini_gmac_platform_data; - - extern void gemini_map_io(void); - extern void gemini_init_irq(void); -@@ -26,6 +27,7 @@ extern int platform_register_pflash(unsi - struct mtd_partition *parts, - unsigned int nr_parts); - extern int platform_register_watchdog(void); -+extern int platform_register_ethernet(struct gemini_gmac_platform_data *pdata); - - extern void gemini_restart(char mode, const char *cmd); - ---- a/arch/arm/mach-gemini/devices.c -+++ b/arch/arm/mach-gemini/devices.c -@@ -17,6 +17,7 @@ - #include <mach/irqs.h> - #include <mach/hardware.h> - #include <mach/global_reg.h> -+#include <mach/gmac.h> - #include "common.h" - - static struct plat_serial8250_port serial_platform_data[] = { -@@ -134,3 +135,53 @@ int __init platform_register_watchdog(vo - { - return platform_device_register(&wdt_device); - } -+ -+static struct resource gmac_resources[] = { -+ { -+ .start = 0x60000000, -+ .end = 0x6000ffff, -+ .flags = IORESOURCE_MEM, -+ }, -+ { -+ .start = IRQ_GMAC0, -+ .end = IRQ_GMAC0, -+ .flags = IORESOURCE_IRQ, -+ }, -+ { -+ .start = IRQ_GMAC1, -+ .end = IRQ_GMAC1, -+ .flags = IORESOURCE_IRQ, -+ }, -+}; -+ -+static u64 gmac_dmamask = 0xffffffffUL; -+ -+static struct platform_device ethernet_device = { -+ .name = "gemini-gmac", -+ .id = 0, -+ .dev = { -+ .dma_mask = &gmac_dmamask, -+ .coherent_dma_mask = DMA_BIT_MASK(32), -+ }, -+ .num_resources = ARRAY_SIZE(gmac_resources), -+ .resource = gmac_resources, -+}; -+ -+int __init platform_register_ethernet(struct gemini_gmac_platform_data *pdata) -+{ -+ unsigned int reg; -+ -+ reg = __raw_readl(IO_ADDRESS(GEMINI_GLOBAL_BASE) + GLOBAL_MISC_CTRL); -+ reg &= ~(GMAC_GMII | GMAC_1_ENABLE); -+ -+ if (pdata->bus_id[1]) -+ reg |= GMAC_1_ENABLE; -+ else if (pdata->interface[0] == PHY_INTERFACE_MODE_GMII) -+ reg |= GMAC_GMII; -+ -+ __raw_writel(reg, IO_ADDRESS(GEMINI_GLOBAL_BASE) + GLOBAL_MISC_CTRL); -+ -+ ethernet_device.dev.platform_data = pdata; -+ -+ return platform_device_register(ðernet_device); -+} |