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 <[email protected]>
Acked-by: Nicolas Pitre <[email protected]>
Signed-off-by: Dale Farnsworth <[email protected]>
This commit is contained in:
Lennert Buytenhek 2008-04-24 01:27:02 +02:00 • committed by Dale Farnsworth
commit fa3959f457
6 changed files with 59 additions and 17 deletions

View file

@ -223,7 +223,9 @@ static struct platform_device orion5x_eth = {
void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data)
{
eth_data->shared = &orion5x_eth_shared;
orion5x_eth.dev.platform_data = eth_data;
platform_device_register(&orion5x_eth_shared);
platform_device_register(&orion5x_eth);
}