X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/91aaed99249a482583b86f5b255fc6fa9a088b72..fa24781c58c9a807bbd64c47e65add6cae095649:/target/linux/ixp4xx/patches-2.6.26/120-compex_support.patch diff --git a/target/linux/ixp4xx/patches-2.6.26/120-compex_support.patch b/target/linux/ixp4xx/patches-2.6.26/120-compex_support.patch index 0076db289..c4abf7fda 100644 --- a/target/linux/ixp4xx/patches-2.6.26/120-compex_support.patch +++ b/target/linux/ixp4xx/patches-2.6.26/120-compex_support.patch @@ -1,6 +1,21 @@ +From 24025a2dcf1248079dd3019fac6ed955252d277f Mon Sep 17 00:00:00 2001 +From: Imre Kaloz +Date: Mon, 14 Jul 2008 21:56:34 +0200 +Subject: [PATCH] Add support for the Compex WP18 / NP18A boards + +Signed-off-by: Imre Kaloz +--- + arch/arm/mach-ixp4xx/Kconfig | 8 ++ + arch/arm/mach-ixp4xx/Makefile | 2 + + arch/arm/mach-ixp4xx/compex-setup.c | 136 +++++++++++++++++++++++++++++++++++ + arch/arm/mach-ixp4xx/ixdp425-pci.c | 3 +- + arch/arm/tools/mach-types | 2 +- + 5 files changed, 149 insertions(+), 2 deletions(-) + create mode 100644 arch/arm/mach-ixp4xx/compex-setup.c + --- a/arch/arm/mach-ixp4xx/Kconfig +++ b/arch/arm/mach-ixp4xx/Kconfig -@@ -89,6 +89,14 @@ +@@ -89,6 +89,14 @@ config MACH_SIDEWINDER Engineering Sidewinder board. For more information on this platform, see http://www.adiengineering.com @@ -10,14 +25,14 @@ + help + Say 'Y' here if you want your kernel to support Compex' + WP18 or NP18A boards. For more information on this -+ platform, see http://openwrt.org ++ platform, see http://www.compex.com.sg/home/OEM/product_ap.htm + config ARCH_IXDP425 bool "IXDP425" help --- a/arch/arm/mach-ixp4xx/Makefile +++ b/arch/arm/mach-ixp4xx/Makefile -@@ -19,6 +19,7 @@ +@@ -19,6 +19,7 @@ obj-pci-$(CONFIG_MACH_WG302V2) += wg302 obj-pci-$(CONFIG_MACH_FSG) += fsg-pci.o obj-pci-$(CONFIG_MACH_PRONGHORN) += pronghorn-pci.o obj-pci-$(CONFIG_MACH_SIDEWINDER) += sidewinder-pci.o @@ -25,7 +40,7 @@ obj-y += common.o -@@ -36,6 +37,7 @@ +@@ -36,6 +37,7 @@ obj-$(CONFIG_MACH_WG302V2) += wg302v2-se obj-$(CONFIG_MACH_FSG) += fsg-setup.o obj-$(CONFIG_MACH_PRONGHORN) += pronghorn-setup.o obj-$(CONFIG_MACH_SIDEWINDER) += sidewinder-setup.o @@ -35,34 +50,25 @@ obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o --- /dev/null +++ b/arch/arm/mach-ixp4xx/compex-setup.c -@@ -0,0 +1,120 @@ +@@ -0,0 +1,136 @@ +/* + * arch/arm/mach-ixp4xx/compex-setup.c + * -+ * Ccompex WP18 / NP18A board-setup ++ * Compex WP18 / NP18A board-setup + * -+ * Copyright (C) 2007 Imre Kaloz ++ * Copyright (C) 2008 Imre Kaloz + * -+ * based on ixdp425-setup.c: ++ * based on coyote-setup.c: + * Copyright (C) 2003-2005 MontaVista Software, Inc. + * + * Author: Imre Kaloz + */ + +#include -+#include -+#include +#include -+#include +#include -+#include + -+#include -+#include -+#include -+#include +#include -+#include +#include +#include + @@ -128,9 +134,36 @@ + .resource = compex_uart_resources, +}; + ++static struct eth_plat_info compex_plat_eth[] = { ++ { ++ .phy = IXP4XX_ETH_PHY_MAX_ADDR, ++ .phy_mask = 0xf0000, ++ .rxq = 3, ++ .txreadyq = 20, ++ }, { ++ .phy = 3, ++ .rxq = 4, ++ .txreadyq = 21, ++ } ++}; ++ ++static struct platform_device compex_eth[] = { ++ { ++ .name = "ixp4xx_eth", ++ .id = IXP4XX_ETH_NPEB, ++ .dev.platform_data = compex_plat_eth, ++ }, { ++ .name = "ixp4xx_eth", ++ .id = IXP4XX_ETH_NPEC, ++ .dev.platform_data = compex_plat_eth + 1, ++ } ++}; ++ +static struct platform_device *compex_devices[] __initdata = { + &compex_flash, -+ &compex_uart ++ &compex_uart, ++ &compex_eth[0], ++ &compex_eth[1], +}; + +static void __init compex_init(void) @@ -144,7 +177,6 @@ + platform_add_devices(compex_devices, ARRAY_SIZE(compex_devices)); +} + -+#ifdef CONFIG_MACH_COMPEX +MACHINE_START(COMPEX, "Compex WP18 / NP18A") + /* Maintainer: Imre Kaloz */ + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, @@ -155,21 +187,21 @@ + .boot_params = 0x0100, + .init_machine = compex_init, +MACHINE_END -+#endif --- a/arch/arm/mach-ixp4xx/ixdp425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c -@@ -66,7 +66,7 @@ +@@ -66,7 +66,8 @@ struct hw_pci ixdp425_pci __initdata = { int __init ixdp425_pci_init(void) { if (machine_is_ixdp425() || machine_is_ixcdp1100() || - machine_is_ixdp465() || machine_is_kixrp435()) -+ machine_is_ixdp465() || machine_is_kixrp435() || machine_is_compex()) ++ machine_is_ixdp465() || machine_is_kixrp435() || ++ machine_is_compex()) pci_common_init(&ixdp425_pci); return 0; } --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types -@@ -1276,7 +1276,7 @@ +@@ -1276,7 +1276,7 @@ oiab MACH_OIAB OIAB 1269 smdk6400 MACH_SMDK6400 SMDK6400 1270 nokia_n800 MACH_NOKIA_N800 NOKIA_N800 1271 greenphone MACH_GREENPHONE GREENPHONE 1272