From: Florian Fainelli Date: Sat, 30 Aug 2008 12:23:18 +0000 (+0000) Subject: Switch ar7 to 2.6.26, thanks sn9 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1fd291063aa3aadafb4dcf6074ede11332a997d0;p=openwrt%2Fstaging%2Fneocturne.git Switch ar7 to 2.6.26, thanks sn9 SVN-Revision: 12436 --- diff --git a/target/linux/ar7/Makefile b/target/linux/ar7/Makefile index 8d48a2addb..4d07238070 100644 --- a/target/linux/ar7/Makefile +++ b/target/linux/ar7/Makefile @@ -11,7 +11,7 @@ BOARD:=ar7 BOARDNAME:=TI AR7 FEATURES:=squashfs jffs2 atm -LINUX_VERSION:=2.6.25.16 +LINUX_VERSION:=2.6.26.3 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/ar7/patches-2.6.26/110-flash.patch b/target/linux/ar7/patches-2.6.26/110-flash.patch new file mode 100644 index 0000000000..39bf83affc --- /dev/null +++ b/target/linux/ar7/patches-2.6.26/110-flash.patch @@ -0,0 +1,40 @@ +diff -ruN linux-2.6.26.3.orig/drivers/mtd/Kconfig linux-2.6.26.3/drivers/mtd/Kconfig +--- linux-2.6.26.3.orig/drivers/mtd/Kconfig 2008-08-27 19:37:48.000000000 -0700 ++++ linux-2.6.26.3/drivers/mtd/Kconfig 2008-08-27 19:39:14.000000000 -0700 +@@ -174,6 +174,12 @@ + ---help--- + TI AR7 partitioning support + ++config MTD_AR7_PARTS ++ tristate "TI AR7 partitioning support" ++ depends on MTD_PARTITIONS ++ ---help--- ++ TI AR7 partitioning support ++ + comment "User Modules And Translation Layers" + + config MTD_CHAR +diff -ruN linux-2.6.26.3.orig/drivers/mtd/Makefile linux-2.6.26.3/drivers/mtd/Makefile +--- linux-2.6.26.3.orig/drivers/mtd/Makefile 2008-08-27 19:37:48.000000000 -0700 ++++ linux-2.6.26.3/drivers/mtd/Makefile 2008-08-27 19:39:14.000000000 -0700 +@@ -13,6 +13,7 @@ + obj-$(CONFIG_MTD_AFS_PARTS) += afs.o + obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o + obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o ++obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o + + # 'Users' - code which presents functionality to userspace. + obj-$(CONFIG_MTD_CHAR) += mtdchar.o +diff -ruN linux-2.6.26.3.orig/drivers/mtd/maps/physmap.c linux-2.6.26.3/drivers/mtd/maps/physmap.c +--- linux-2.6.26.3.orig/drivers/mtd/maps/physmap.c 2008-08-27 19:37:48.000000000 -0700 ++++ linux-2.6.26.3/drivers/mtd/maps/physmap.c 2008-08-27 19:39:14.000000000 -0700 +@@ -87,7 +87,8 @@ + + static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", NULL }; + #ifdef CONFIG_MTD_PARTITIONS +-static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL }; ++static const char *part_probe_types[] = {"cmdlinepart", "RedBoot", ++ "ar7part", NULL }; + #endif + + static int physmap_flash_probe(struct platform_device *dev) diff --git a/target/linux/ar7/patches-2.6.26/150-cpmac_up_and_running.diff b/target/linux/ar7/patches-2.6.26/150-cpmac_up_and_running.diff deleted file mode 100644 index d11bbf2e58..0000000000 --- a/target/linux/ar7/patches-2.6.26/150-cpmac_up_and_running.diff +++ /dev/null @@ -1,47 +0,0 @@ ---- a/arch/mips/ar7/platform.c -+++ b/arch/mips/ar7/platform.c -@@ -33,6 +33,8 @@ - #include - #include - #include -+#include -+#include - - #include - #include -@@ -205,6 +207,13 @@ - .width = 2, - }; - -+/* lets assume this is suitable for both high and low cpmacs links */ -+static struct fixed_phy_status fixed_phy_status __initdata = { -+ .link = 1, -+ .speed = 100, -+ .duplex = 1, -+}; -+ - static struct plat_cpmac_data cpmac_low_data = { - .reset_bit = 17, - .power_bit = 20, -@@ -506,6 +515,10 @@ - } - - if (ar7_has_high_cpmac()) { -+ res = fixed_phy_add(PHY_POLL, cpmac_high.id, &fixed_phy_status); -+ if (res && res != -ENODEV) -+ return res; -+ - cpmac_get_mac(1, cpmac_high_data.dev_addr); - res = platform_device_register(&cpmac_high); - if (res) -@@ -514,6 +527,10 @@ - cpmac_low_data.phy_mask = 0xffffffff; - } - -+ res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status); -+ if (res && res != -ENODEV) -+ return res; -+ - cpmac_get_mac(0, cpmac_low_data.dev_addr); - res = platform_device_register(&cpmac_low); - if (res) diff --git a/target/linux/ar7/patches-2.6.26/900-cpmac_multiqueue.patch b/target/linux/ar7/patches-2.6.26/900-cpmac_multiqueue.patch new file mode 100644 index 0000000000..16e7320465 --- /dev/null +++ b/target/linux/ar7/patches-2.6.26/900-cpmac_multiqueue.patch @@ -0,0 +1,70 @@ +This patch fixes the network driver cpmac.c for compilation with +configuration option CONFIG_NETDEVICES_MULTIQUEUE. + +These compiler warnings are fixed by the patch: +drivers/net/cpmac.c: In function 'cpmac_end_xmit': +drivers/net/cpmac.c:630: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast +drivers/net/cpmac.c:641: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast +drivers/net/cpmac.c: In function 'cpmac_probe': +drivers/net/cpmac.c:1128: warning: unused variable 'i' + +During runtime, the unpatched driver raises a fatal runtime exception. +This is fixed by calling __netif_subqueue_stopped instead +of netif_subqueue_stopped, too. + +Two additional code parts were modified for CONFIG_NETDEVICES_MULTIQUEUE +because other drivers do it in the same way. + + Signed-off-by: Stefan Weil + +--- a/drivers/net/cpmac.c 2008-07-13 23:51:29.000000000 +0200 ++++ b/drivers/net/cpmac.c 2008-08-14 20:48:49.000000000 +0200 +@@ -627,7 +627,7 @@ + dev_kfree_skb_irq(desc->skb); + desc->skb = NULL; + #ifdef CONFIG_NETDEVICES_MULTIQUEUE +- if (netif_subqueue_stopped(dev, queue)) ++ if (__netif_subqueue_stopped(dev, queue)) + netif_wake_subqueue(dev, queue); + #else + if (netif_queue_stopped(dev)) +@@ -638,7 +638,7 @@ + printk(KERN_WARNING + "%s: end_xmit: spurious interrupt\n", dev->name); + #ifdef CONFIG_NETDEVICES_MULTIQUEUE +- if (netif_subqueue_stopped(dev, queue)) ++ if (__netif_subqueue_stopped(dev, queue)) + netif_wake_subqueue(dev, queue); + #else + if (netif_queue_stopped(dev)) +@@ -1124,7 +1124,7 @@ + + static int __devinit cpmac_probe(struct platform_device *pdev) + { +- int rc, phy_id, i; ++ int rc, phy_id; + char *mdio_bus_id = "0"; + struct resource *mem; + struct cpmac_priv *priv; +@@ -1152,7 +1152,11 @@ + } + } + ++#ifdef CONFIG_NETDEVICES_MULTIQUEUE + dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES); ++#else ++ dev = alloc_etherdev(sizeof(*priv)); ++#endif + + if (!dev) { + printk(KERN_ERR "cpmac: Unable to allocate net_device\n"); +@@ -1179,7 +1183,9 @@ + dev->set_multicast_list = cpmac_set_multicast_list; + dev->tx_timeout = cpmac_tx_timeout; + dev->ethtool_ops = &cpmac_ethtool_ops; ++#ifdef CONFIG_NETDEVICES_MULTIQUEUE + dev->features |= NETIF_F_MULTI_QUEUE; ++#endif + + netif_napi_add(dev, &priv->napi, cpmac_poll, 64); +