diff options
author | Dale Farnsworth <dale@farnsworth.org> | 2007-03-03 08:40:28 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-06 06:14:54 -0500 |
commit | 84dd619e4dc3b0b1c40dafd98c90fd950bce7bc5 (patch) | |
tree | 939d601f7abda95e3f4919af2a371873f0c66928 /arch/powerpc/platforms/chrp | |
parent | b2cbbd8e0e8093fbf115ac2669482b016d781c78 (diff) |
mv643xx_eth: Place explicit port number in mv643xx_eth_platform_data
We were using the platform_device.id field to identify which ethernet
port is used for mv643xx_eth device. This is not generally correct.
It will be incorrect, for example, if a hardware platform uses a single
port but not the first port. Here, we add an explicit port_number field
to struct mv643xx_eth_platform_data.
This makes the mv643xx_eth_platform_data structure required, but that
isn't an issue since all users currently provide it already.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'arch/powerpc/platforms/chrp')
-rw-r--r-- | arch/powerpc/platforms/chrp/pegasos_eth.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c index 6ad4b1a72c96..71045677559a 100644 --- a/arch/powerpc/platforms/chrp/pegasos_eth.c +++ b/arch/powerpc/platforms/chrp/pegasos_eth.c | |||
@@ -58,6 +58,7 @@ static struct resource mv643xx_eth0_resources[] = { | |||
58 | 58 | ||
59 | 59 | ||
60 | static struct mv643xx_eth_platform_data eth0_pd = { | 60 | static struct mv643xx_eth_platform_data eth0_pd = { |
61 | .port_number = 0, | ||
61 | .tx_sram_addr = PEGASOS2_SRAM_BASE_ETH0, | 62 | .tx_sram_addr = PEGASOS2_SRAM_BASE_ETH0, |
62 | .tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE, | 63 | .tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE, |
63 | .tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16, | 64 | .tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16, |
@@ -87,6 +88,7 @@ static struct resource mv643xx_eth1_resources[] = { | |||
87 | }; | 88 | }; |
88 | 89 | ||
89 | static struct mv643xx_eth_platform_data eth1_pd = { | 90 | static struct mv643xx_eth_platform_data eth1_pd = { |
91 | .port_number = 1, | ||
90 | .tx_sram_addr = PEGASOS2_SRAM_BASE_ETH1, | 92 | .tx_sram_addr = PEGASOS2_SRAM_BASE_ETH1, |
91 | .tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE, | 93 | .tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE, |
92 | .tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16, | 94 | .tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16, |