Switch ar7 to 2.6.26, thanks sn9
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 30 Aug 2008 12:23:18 +0000 (12:23 +0000)
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 30 Aug 2008 12:23:18 +0000 (12:23 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12436 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/ar7/Makefile
target/linux/ar7/patches-2.6.26/110-flash.patch [new file with mode: 0644]
target/linux/ar7/patches-2.6.26/150-cpmac_up_and_running.diff [deleted file]
target/linux/ar7/patches-2.6.26/900-cpmac_multiqueue.patch [new file with mode: 0644]

index 8d48a2a..4d07238 100644 (file)
@@ -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 (file)
index 0000000..39bf83a
--- /dev/null
@@ -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 (file)
index d11bbf2..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/arch/mips/ar7/platform.c
-+++ b/arch/mips/ar7/platform.c
-@@ -33,6 +33,8 @@
- #include <linux/vlynq.h>
- #include <linux/leds.h>
- #include <linux/string.h>
-+#include <linux/phy.h>
-+#include <linux/phy_fixed.h>
- #include <asm/addrspace.h>
- #include <asm/ar7/ar7.h>
-@@ -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 (file)
index 0000000..16e7320
--- /dev/null
@@ -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 <weil@mail.berlios.de>
+
+--- 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);