summaryrefslogtreecommitdiff
path: root/packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff
diff options
context:
space:
mode:
Diffstat (limited to 'packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff')
-rw-r--r--packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff324
1 files changed, 2 insertions, 322 deletions
diff --git a/packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff b/packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff
index 589446c2e9..6d1ca1c75e 100644
--- a/packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff
+++ b/packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff
@@ -2500,8 +2500,8 @@ diff -Nur linux-old/Documentation/Configure.help linux/Documentation/Configure.h
+#
+CONFIG_USBD_AU1X00_BUS=m
+CONFIG_USBD_AU1X00_SCLOCK=400
-+CONFIG_AU1000_USB_DEVICE=y
-+CONFIG_AU1X00_USB_DEVICE=y
++# CONFIG_AU1000_USB_DEVICE is not set
++# CONFIG_AU1X00_USB_DEVICE is not set
+# CONFIG_USBD_BI_REGISTER_TRACE is not set
+
+#
@@ -2605,326 +2605,6 @@ diff -Nur linux-old/Documentation/Configure.help linux/Documentation/Configure.h
MODULE_AUTHOR("Dan Malek, Embedded Edge, LLC.");
MODULE_DESCRIPTION("SMBus adapter Alchemy pb1550");
---- linux/drivers/net/au1000_eth.c~00-mtx-2.diff 2006-06-10 14:01:44.602796000 +0200
-+++ linux/drivers/net/au1000_eth.c 2006-06-10 13:56:07.353719250 +0200
-@@ -6,7 +6,9 @@
- * Copyright 2002 TimeSys Corp.
- * Author: MontaVista Software, Inc.
- * ppopov@mvista.com or source@mvista.com
-- *
-+ * Bjoern Riemer 2004
-+ * riemer@fokus.fraunhofer.de or riemer@riemer-nt.de
-+ * // fixed the link beat detection with ioctls (SIOCGMIIPHY)
- * ########################################################################
- *
- * This program is free software; you can distribute it and/or modify it
-@@ -83,7 +85,7 @@
- static int au1000_set_config(struct net_device *dev, struct ifmap *map);
- static void set_rx_mode(struct net_device *);
- static struct net_device_stats *au1000_get_stats(struct net_device *);
--static inline void update_tx_stats(struct net_device *, u32, u32);
-+static inline void update_tx_stats(struct net_device *, u32);
- static inline void update_rx_stats(struct net_device *, u32);
- static void au1000_timer(unsigned long);
- static int au1000_ioctl(struct net_device *, struct ifreq *, int);
-@@ -656,6 +658,7 @@
- ks8995m_status,
- };
-
-+
- #ifdef CONFIG_MIPS_BOSPORUS
- struct phy_ops stub_ops = {
- stub_init,
-@@ -674,6 +677,7 @@
- {"Broadcom BCM5201 10/100 BaseT PHY",0x0040,0x6212, &bcm_5201_ops,0},
- {"Broadcom BCM5221 10/100 BaseT PHY",0x0040,0x61e4, &bcm_5201_ops,0},
- {"Broadcom BCM5222 10/100 BaseT PHY",0x0040,0x6322, &bcm_5201_ops,1},
-+ {"Broadcom BCM5241 10/100 BaseT PHY",0x0143,0xBC31, &bcm_5201_ops,1},
- {"AMD 79C901 HomePNA PHY",0x0000,0x35c8, &am79c901_ops,0},
- {"AMD 79C874 10/100 BaseT PHY",0x0022,0x561b, &am79c874_ops,0},
- {"LSI 80227 10/100 BaseT PHY",0x0016,0xf840, &lsi_80227_ops,0},
-@@ -810,28 +814,39 @@
- int phy_found=0;
- #endif
-
-+#if 0
-+ if (aup && aup->mii)
-+ aup->mii->chip_info = NULL;
-+#endif
-+
-+
- /* search for total of 32 possible mii phy addresses */
- for (phy_addr = 0; phy_addr < 32; phy_addr++) {
- u16 mii_status;
- u16 phy_id0, phy_id1;
- int i;
-
-- #ifdef CONFIG_BCM5222_DUAL_PHY
-+#ifdef CONFIG_BCM5222_DUAL_PHY
- /* Mask the already found phy, try next one */
- if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) {
- if (au_macs[0]->phy_addr == phy_addr)
- continue;
- }
-- #endif
-+#endif
-
- mii_status = mdio_read(dev, phy_addr, MII_STATUS);
- if (mii_status == 0xffff || mii_status == 0x0000)
- /* the mii is not accessable, try next one */
- continue;
-
-+
- phy_id0 = mdio_read(dev, phy_addr, MII_PHY_ID0);
- phy_id1 = mdio_read(dev, phy_addr, MII_PHY_ID1);
-
-+ /*printk ("mii_probe: found PHY at address 0x%X : %04X/%04X\n", phy_addr,
-+ phy_id0, phy_id1
-+ ); */
-+
- /* search our mii table for the current mii */
- for (i = 0; mii_chip_table[i].phy_id1; i++) {
- if (phy_id0 == mii_chip_table[i].phy_id0 &&
-@@ -853,7 +868,7 @@
- // values and set indicators. We need to do
- // this now since mdio_{read,write} need the
- // control and data register addresses.
-- #ifdef CONFIG_BCM5222_DUAL_PHY
-+#ifdef CONFIG_BCM5222_DUAL_PHY
- if ( mii_chip_table[i].dual_phy) {
-
- /* assume both phys are controlled
-@@ -867,11 +882,13 @@
- aup->mii->mii_data_reg = (u32 *)
- &au_macs[0]->mac->mii_data;
- }
-- #endif
-+#endif
- goto found;
- }
- }
- }
-+ return -1;
-+
- found:
-
- #ifdef CONFIG_MIPS_BOSPORUS
-@@ -1027,24 +1044,26 @@
- struct au1000_private *aup = (struct au1000_private *) dev->priv;
-
- if (au1000_debug > 4)
-- printk(KERN_INFO "%s: reset mac, aup %x\n",
-- dev->name, (unsigned)aup);
-+ printk(KERN_INFO "%s: reset mac, aup %x, macid %d\n",
-+ dev->name, (unsigned)aup, aup->mac_id);
-+
-+ return;
-
- spin_lock_irqsave(&aup->lock, flags);
- del_timer(&aup->timer);
- hard_stop(dev);
-- #ifdef CONFIG_BCM5222_DUAL_PHY
-+#ifdef CONFIG_BCM5222_DUAL_PHY
- if (aup->mac_id != 0) {
-- #endif
-+#endif
- /* If BCM5222, we can't leave MAC0 in reset because then
- * we can't access the dual phy for ETH1 */
- *aup->enable = MAC_EN_CLOCK_ENABLE;
- au_sync_delay(2);
- *aup->enable = 0;
- au_sync_delay(2);
-- #ifdef CONFIG_BCM5222_DUAL_PHY
-+#ifdef CONFIG_BCM5222_DUAL_PHY
- }
-- #endif
-+#endif
- aup->tx_full = 0;
- for (i = 0; i < NUM_RX_DMA; i++) {
- /* reset control bits */
-@@ -1140,17 +1159,39 @@
- iflist[1].macen_addr = AU1550_MAC1_ENABLE;
- iflist[0].irq = AU1550_MAC0_DMA_INT;
- iflist[1].irq = AU1550_MAC1_DMA_INT;
-+ /*printk ("***** Au1550 Ethernet *****\n");*/
- break;
- #endif
- default:
- num_ifs = 0;
- }
-+
-+ {
-+ unsigned long pf = au_readl(SYS_PINFUNC);
-+ pf &= ~1;
-+
-+ au_writel (pf, SYS_PINFUNC);
-+ au_writel (0x10000, SYS_OUTPUTSET);
-+
-+ }
-+
-+
-+
- for(i = 0; i < num_ifs; i++) {
-+ /*printk ("*** calling au1000_probe(0x%08lX, %d, %d)\n", iflist[i].base_addr, iflist[i].irq, i);*/
- dev = au1000_probe(iflist[i].base_addr, iflist[i].irq, i);
-+ /*printk ("*** left au1000_probe\n");*/
-+
- iflist[i].dev = dev;
-+
-+ /*printk ("*** 1\n");*/
-+
- if (dev)
- found_one++;
- }
-+
-+ printk("Au1x Ethernet found %d ethernet devices\n", found_one);
-+
- if (!found_one)
- return -ENODEV;
- return 0;
-@@ -1194,6 +1235,7 @@
- /* Allocate the data buffers */
- aup->vaddr = (u32)dma_alloc(MAX_BUF_SIZE *
- (NUM_TX_BUFFS+NUM_RX_BUFFS), &aup->dma_addr);
-+
- if (!aup->vaddr) {
- kfree(dev);
- release_region(ioaddr, MAC_IOSIZE);
-@@ -1227,6 +1269,7 @@
- setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR);
- aup->mac_id = 0;
- au_macs[0] = aup;
-+
- }
- else
- if (ioaddr == iflist[1].base_addr)
-@@ -1257,6 +1300,8 @@
- printk(KERN_ERR "%s: out of memory\n", dev->name);
- goto err_out;
- }
-+
-+ aup->mii->chip_info = NULL;
- aup->mii->mii_control_reg = 0;
- aup->mii->mii_data_reg = 0;
-
-@@ -1284,6 +1329,7 @@
- aup->rx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr;
- aup->rx_db_inuse[i] = pDB;
- }
-+
- for (i = 0; i < NUM_TX_DMA; i++) {
- pDB = GetFreeDB(aup);
- if (!pDB) {
-@@ -1383,12 +1429,17 @@
- aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed);
- control = MAC_DISABLE_RX_OWN | MAC_RX_ENABLE | MAC_TX_ENABLE;
- #ifndef CONFIG_CPU_LITTLE_ENDIAN
-+ /*riemer: fix for startup without cable */
-+ if (!link)
-+ dev->flags &= ~IFF_RUNNING;
-+
- control |= MAC_BIG_ENDIAN;
- #endif
- if (link && (dev->if_port == IF_PORT_100BASEFX)) {
- control |= MAC_FULL_DUPLEX;
- }
- aup->mac->control = control;
-+ aup->mac->vlan1_tag = 0x8100; /* activate vlan support */
- au_sync();
-
- spin_unlock_irqrestore(&aup->lock, flags);
-@@ -1541,14 +1592,11 @@
-
-
- static inline void
--update_tx_stats(struct net_device *dev, u32 status, u32 pkt_len)
-+update_tx_stats(struct net_device *dev, u32 status)
- {
- struct au1000_private *aup = (struct au1000_private *) dev->priv;
- struct net_device_stats *ps = &aup->stats;
-
-- ps->tx_packets++;
-- ps->tx_bytes += pkt_len;
--
- if (status & TX_FRAME_ABORTED) {
- if (dev->if_port == IF_PORT_100BASEFX) {
- if (status & (TX_JAB_TIMEOUT | TX_UNDERRUN)) {
-@@ -1581,7 +1629,7 @@
- ptxd = aup->tx_dma_ring[aup->tx_tail];
-
- while (ptxd->buff_stat & TX_T_DONE) {
-- update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff);
-+ update_tx_stats(dev, ptxd->status);
- ptxd->buff_stat &= ~TX_T_DONE;
- ptxd->len = 0;
- au_sync();
-@@ -1603,6 +1651,7 @@
- static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
- {
- struct au1000_private *aup = (struct au1000_private *) dev->priv;
-+ struct net_device_stats *ps = &aup->stats;
- volatile tx_dma_t *ptxd;
- u32 buff_stat;
- db_dest_t *pDB;
-@@ -1622,7 +1671,7 @@
- return 1;
- }
- else if (buff_stat & TX_T_DONE) {
-- update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff);
-+ update_tx_stats(dev, ptxd->status);
- ptxd->len = 0;
- }
-
-@@ -1642,6 +1691,9 @@
- else
- ptxd->len = skb->len;
-
-+ ps->tx_packets++;
-+ ps->tx_bytes += ptxd->len;
-+
- ptxd->buff_stat = pDB->dma_addr | TX_DMA_ENABLE;
- au_sync();
- dev_kfree_skb(skb);
-@@ -1840,17 +1892,35 @@
-
- static int au1000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
- {
-- //u16 *data = (u16 *)&rq->ifr_data;
-+/*
-+// This structure is used in all SIOCxMIIxxx ioctl calls
-+struct mii_ioctl_data {
-+ 0 u16 phy_id;
-+ 1 u16 reg_num;
-+ 2 u16 val_in;
-+ 3 u16 val_out;
-+};*/
-+ u16 *data = (u16 *)&rq->ifr_data;
-+ struct au1000_private *aup = (struct au1000_private *) dev->priv;
-+ //struct mii_ioctl_data *data = (struct mii_ioctl_data *) & rq->ifr_data;
-
- /* fixme */
- switch(cmd) {
- case SIOCDEVPRIVATE: /* Get the address of the PHY in use. */
-- //data[0] = PHY_ADDRESS;
-+ case SIOCGMIIPHY:
-+ if (!netif_running(dev))
-+ return -EINVAL;
-+ data[0] = aup->phy_addr;
- case SIOCDEVPRIVATE+1: /* Read the specified MII register. */
-- //data[3] = mdio_read(ioaddr, data[0], data[1]);
-+ case SIOCGMIIREG:
-+ data[3] = mdio_read(dev, data[0], data[1]);
-+ //data->val_out = mdio_read(dev,data->phy_id,data->reg_num);
- return 0;
- case SIOCDEVPRIVATE+2: /* Write the specified MII register */
-- //mdio_write(ioaddr, data[0], data[1], data[2]);
-+ case SIOCSMIIREG:
-+ if (!capable(CAP_NET_ADMIN))
-+ return -EPERM;
-+ mdio_write(dev, data[0], data[1],data[2]);
- return 0;
- default:
- return -EOPNOTSUPP;
--- linux-old/drivers/sound/au1550_psc.c 2004-09-19 00:07:37.000000000 +0200
+++ linux/drivers/sound/au1550_psc.c 2006-04-30 20:35:58.000000000 +0200
@@ -55,14 +55,15 @@