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/arm/mach-orion5x | |
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/arm/mach-orion5x')
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 439c7784af02..2bedf71659cb 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -223,7 +223,9 @@ static struct platform_device orion5x_eth = { | |||
223 | 223 | ||
224 | void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) | 224 | void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) |
225 | { | 225 | { |
226 | eth_data->shared = &orion5x_eth_shared; | ||
226 | orion5x_eth.dev.platform_data = eth_data; | 227 | orion5x_eth.dev.platform_data = eth_data; |
228 | |||
227 | platform_device_register(&orion5x_eth_shared); | 229 | platform_device_register(&orion5x_eth_shared); |
228 | platform_device_register(&orion5x_eth); | 230 | platform_device_register(&orion5x_eth); |
229 | } | 231 | } |