netdev
[Top] [All Lists]

mv643xx(5/20): update ppc7d platform for new mv643xx_eth platform data

To: Netdev <netdev@xxxxxxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: mv643xx(5/20): update ppc7d platform for new mv643xx_eth platform data
From: "Dale Farnsworth" <dale@xxxxxxxxxxxxxx>
Date: Mon, 28 Mar 2005 16:45:44 -0700
Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>, Manish Lachwani <mlachwani@xxxxxxxxxx>, Brian Waite <brian@xxxxxxxxxxxxxx>, "Steven J. Hill" <sjhill@xxxxxxxxxxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, James Chapman <jchapman@xxxxxxxxxxx>
In-reply-to: <20050328233807.GA28423@xyzzy>
References: <20050328233807.GA28423@xyzzy>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
This patch updates the ethernet device platform data of Radstone
PPC7D.

Signed-off-by: James Chapman <jchapman@xxxxxxxxxxx>
Acked-by: Dale Farnsworth <dale@xxxxxxxxxxxxxx>

Index: linux-2.6/arch/ppc/platforms/radstone_ppc7d.c
===================================================================
--- linux-2.6.orig/arch/ppc/platforms/radstone_ppc7d.c  2005-03-27 
15:09:33.000000000 +0100
+++ linux-2.6/arch/ppc/platforms/radstone_ppc7d.c       2005-03-27 
15:29:58.000000000 +0100
@@ -41,6 +41,7 @@
 #include <linux/serial_core.h>
 #include <linux/mv643xx.h>
 #include <linux/netdevice.h>
+#include <linux/ethtool.h>
 
 #include <asm/system.h>
 #include <asm/pgtable.h>
@@ -638,21 +639,30 @@
 #endif
 
 #if defined(CONFIG_MV643XX_ETH)
+static struct ethtool_cmd ppc7d_ethtool_cmd[] = {
+       [0] = {
+               .phy_address =  PPC7D_ETH0_PHY_ADDR,
+               .autoneg =      AUTONEG_ENABLE,
+       },
+       [1] = {
+               .phy_address =  PPC7D_ETH1_PHY_ADDR,
+               .autoneg =      AUTONEG_ENABLE,
+       },
+       [2] = {
+               .phy_address =  PPC7D_ETH2_PHY_ADDR,
+               .autoneg =      AUTONEG_ENABLE,
+       }
+};
+
 static void __init ppc7d_fixup_eth_pdata(struct platform_device *pdev)
 {
        struct mv643xx_eth_platform_data *eth_pd;
-       static u16 phy_addr[] = {
-               PPC7D_ETH0_PHY_ADDR,
-               PPC7D_ETH1_PHY_ADDR,
-               PPC7D_ETH2_PHY_ADDR,
-       };
        int i;
 
        eth_pd = pdev->dev.platform_data;
-       eth_pd->force_phy_addr = 1;
-       eth_pd->phy_addr = phy_addr[pdev->id];
        eth_pd->tx_queue_size = PPC7D_ETH_TX_QUEUE_SIZE;
        eth_pd->rx_queue_size = PPC7D_ETH_RX_QUEUE_SIZE;
+       eth_pd->ethtool_cmd = &ppc7d_ethtool_cmd[pdev->id];
 
        /* Adjust IRQ by mv64360_irq_base */
        for (i = 0; i < pdev->num_resources; i++) {
@@ -665,7 +675,6 @@
                                 (int)r->start);
                }
        }
-
 }
 #endif
 

<Prev in Thread] Current Thread [Next in Thread>