summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatteo <matteo@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-02-07 18:40:24 +0000
committermatteo <matteo@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-02-07 18:40:24 +0000
commit7ec87f23ff1626dd235c62f6a1c87c14f14b775b (patch)
tree2888721d18d654aeb25a5f08feca8a4fbdca5ed0
parent0906251fe85db8197e8e7ef294f1d9ac6f6f8429 (diff)
[AR7] more 2.6.24 patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10410 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ar7/patches-2.6.24/100-board_support.patch4
-rw-r--r--target/linux/ar7/patches-2.6.24/140-cpmac_fix.patch115
2 files changed, 118 insertions, 1 deletions
diff --git a/target/linux/ar7/patches-2.6.24/100-board_support.patch b/target/linux/ar7/patches-2.6.24/100-board_support.patch
index d23aecf4f..eefeb65a4 100644
--- a/target/linux/ar7/patches-2.6.24/100-board_support.patch
+++ b/target/linux/ar7/patches-2.6.24/100-board_support.patch
@@ -2,7 +2,7 @@ Index: linux-2.6.23-rc6/arch/mips/Kconfig
===================================================================
--- linux-2.6.23-rc6.orig/arch/mips/Kconfig 2007-09-21 16:23:51.000000000 +0800
+++ linux-2.6.23-rc6/arch/mips/Kconfig 2007-09-21 16:24:11.000000000 +0800
-@@ -15,6 +15,22 @@
+@@ -15,6 +15,24 @@
prompt "System type"
default SGI_IP22
@@ -10,6 +10,8 @@ Index: linux-2.6.23-rc6/arch/mips/Kconfig
+ bool "Texas Instruments AR7"
+ select BOOT_ELF32
+ select DMA_NONCOHERENT
++ select CEVT_R4K
++ select CSRC_R4K
+ select IRQ_CPU
+ select NO_EXCEPT_FILL
+ select SWAP_IO_SPACE
diff --git a/target/linux/ar7/patches-2.6.24/140-cpmac_fix.patch b/target/linux/ar7/patches-2.6.24/140-cpmac_fix.patch
new file mode 100644
index 000000000..4957d85a6
--- /dev/null
+++ b/target/linux/ar7/patches-2.6.24/140-cpmac_fix.patch
@@ -0,0 +1,115 @@
+--- linux-2.6.24/drivers/net/Kconfig 2008-02-07 02:29:04.000000000 +0100
++++ linux-2.6.24/drivers/net/Kconfig 2008-02-07 02:29:35.000000000 +0100
+@@ -1830,10 +1830,8 @@
+
+ config CPMAC
+ tristate "TI AR7 CPMAC Ethernet support (EXPERIMENTAL)"
+- depends on NET_ETHERNET && EXPERIMENTAL && AR7
++ depends on NET_ETHERNET && EXPERIMENTAL && AR7 && BROKEN
+ select PHYLIB
+- select FIXED_PHY
+- select FIXED_MII_100_FDX
+ help
+ TI AR7 CPMAC Ethernet support
+
+--- linux-2.6.24/drivers/net/cpmac.c 2008-01-24 23:58:37.000000000 +0100
++++ linux-2.6.24/drivers/net/cpmac.c 2008-02-07 02:32:57.000000000 +0100
+@@ -661,9 +661,6 @@
+ int queue;
+ u32 status;
+
+- if (!dev)
+- return IRQ_NONE;
+-
+ priv = netdev_priv(dev);
+
+ status = cpmac_read(priv->regs, CPMAC_MAC_INT_VECTOR);
+@@ -848,15 +845,6 @@
+ spin_unlock(&priv->lock);
+ }
+
+-static int cpmac_link_update(struct net_device *dev,
+- struct fixed_phy_status *status)
+-{
+- status->link = 1;
+- status->speed = 100;
+- status->duplex = 1;
+- return 0;
+-}
+-
+ static int cpmac_open(struct net_device *dev)
+ {
+ int i, size, res;
+@@ -999,11 +987,11 @@
+ static int __devinit cpmac_probe(struct platform_device *pdev)
+ {
+ int rc, phy_id, i;
++ int mdio_bus_id = cpmac_mii.id;
+ struct resource *mem;
+ struct cpmac_priv *priv;
+ struct net_device *dev;
+ struct plat_cpmac_data *pdata;
+- struct fixed_info *fixed_phy;
+ DECLARE_MAC_BUF(mac);
+
+ pdata = pdev->dev.platform_data;
+@@ -1017,9 +1005,23 @@
+ }
+
+ if (phy_id == PHY_MAX_ADDR) {
+- if (external_switch || dumb_switch)
++ if (external_switch || dumb_switch) {
++ struct fixed_phy_status status = {};
++
++ mdio_bus_id = 0;
++
++ /*
++ * FIXME: this should be in the platform code!
++ * Since there is not platform code at all (that is,
++ * no mainline users of that driver), place it here
++ * for now.
++ */
+ phy_id = 0;
+- else {
++ status.link = 1;
++ status.duplex = 1;
++ status.speed = 100;
++ fixed_phy_add(PHY_POLL, phy_id, &status);
++ } else {
+ printk(KERN_ERR "cpmac: no PHY present\n");
+ return -ENODEV;
+ }
+@@ -1063,32 +1065,8 @@
+ priv->msg_enable = netif_msg_init(debug_level, 0xff);
+ memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
+
+- if (phy_id == 31) {
+- snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, cpmac_mii.id,
+- phy_id);
+- } else {
+- /* Let's try to get a free fixed phy... */
+- for (i = 0; i < MAX_PHY_AMNT; i++) {
+- fixed_phy = fixed_mdio_get_phydev(i);
+- if (!fixed_phy)
+- continue;
+- if (!fixed_phy->phydev->attached_dev) {
+- strncpy(priv->phy_name,
+- fixed_phy->phydev->dev.bus_id,
+- BUS_ID_SIZE);
+- fixed_mdio_set_link_update(fixed_phy->phydev,
+- &cpmac_link_update);
+- goto phy_found;
+- }
+- }
+- if (netif_msg_drv(priv))
+- printk(KERN_ERR "%s: Could not find fixed PHY\n",
+- dev->name);
+- rc = -ENODEV;
+- goto fail;
+- }
++ snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
+
+-phy_found:
+ priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
+ PHY_INTERFACE_MODE_MII);
+ if (IS_ERR(priv->phy)) {