diff options
| author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-04-23 19:27:02 -0400 |
|---|---|---|
| committer | Dale Farnsworth <dale@farnsworth.org> | 2008-04-29 00:17:07 -0400 |
| commit | fa3959f457109cc7d082b86ea6daae927982815b (patch) | |
| tree | 0e1f7aae6f3340d915f61e1489615972c629621d /arch/ppc/syslib | |
| parent | e31a94ed371c70855eb30b77c490d6d85dd4da26 (diff) | |
mv643xx_eth: get rid of static variables, allow multiple instances
Move mv643xx_eth's static state (ethernet register block base address
and MII management interface spinlock) into a struct hanging off the
shared platform device. This is necessary to support chips that
contain multiple mv643xx_eth silicon blocks.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Diffstat (limited to 'arch/ppc/syslib')
| -rw-r--r-- | arch/ppc/syslib/mv64x60.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c index 90fe904d3614..418f3053de52 100644 --- a/arch/ppc/syslib/mv64x60.c +++ b/arch/ppc/syslib/mv64x60.c | |||
| @@ -341,6 +341,7 @@ static struct resource mv64x60_eth0_resources[] = { | |||
| 341 | }; | 341 | }; |
| 342 | 342 | ||
| 343 | static struct mv643xx_eth_platform_data eth0_pd = { | 343 | static struct mv643xx_eth_platform_data eth0_pd = { |
| 344 | .shared = &mv64x60_eth_shared_device; | ||
| 344 | .port_number = 0, | 345 | .port_number = 0, |
| 345 | }; | 346 | }; |
| 346 | 347 | ||
| @@ -366,6 +367,7 @@ static struct resource mv64x60_eth1_resources[] = { | |||
| 366 | }; | 367 | }; |
| 367 | 368 | ||
| 368 | static struct mv643xx_eth_platform_data eth1_pd = { | 369 | static struct mv643xx_eth_platform_data eth1_pd = { |
| 370 | .shared = &mv64x60_eth_shared_device; | ||
| 369 | .port_number = 1, | 371 | .port_number = 1, |
| 370 | }; | 372 | }; |
| 371 | 373 | ||
| @@ -391,6 +393,7 @@ static struct resource mv64x60_eth2_resources[] = { | |||
| 391 | }; | 393 | }; |
| 392 | 394 | ||
| 393 | static struct mv643xx_eth_platform_data eth2_pd = { | 395 | static struct mv643xx_eth_platform_data eth2_pd = { |
| 396 | .shared = &mv64x60_eth_shared_device; | ||
| 394 | .port_number = 2, | 397 | .port_number = 2, |
| 395 | }; | 398 | }; |
| 396 | 399 | ||
