at91: provide pclk and hclk for macb ethernet devices
PATCH 1/2 at91: provide pclk and hclk for macb ethernet devices
AT91 has a "macb_pclk" which is used to control the clock to the Ethernet controller, but this is a different name to the AVR32 devices that use "pclk". Associate the clock with the names "pclk" and "hclk" and the macb driver doesn't need to handle the two architectures differently.
Signed-off-by Jamie Iles <[email protected]>
--- arch/arm/mach-at91/at572d940hf_devices.c | 3 +++ arch/arm/mach-at91/at91cap9_devices.c | 3 +++ arch/arm/mach-at91/at91rm9200_devices.c | 3 +++ arch/arm/mach-at91/at91sam9260_devices.c | 3 +++ arch/arm/mach-at91/at91sam9263_devices.c | 3 +++ arch/arm/mach-at91/at91sam9g45_devices.c | 3 +++ 6 files changed, 18 insertions(+), 0 deletions(-)
arch/arm/mach-at91/at572d940hf_devices.c +3 -0
@@ -192,6 +192,9 @@ void __init at91_add_device_eth(struct eth_platform_data *data)at91_set_A_periph (AT91_PIN_PA13 ,0 );/* EMDIO */ at91_set_A_periph (AT91_PIN_PA14 ,0 );/* EMDC */ +at91_clock_associate ("macb_clk" , &at572d940hf_eth_device.dev,"pclk" ); +at91_clock_associate ("macb_clk" , &at572d940hf_eth_device.dev,"hclk" ); + eth_data = *data;platform_device_register (&at572d940hf_eth_device); }
arch/arm/mach-at91/at91cap9_devices.c +3 -0
@@ -258,6 +258,9 @@ void __init at91_add_device_eth(struct eth_platform_data *data)at91_set_B_periph (AT91_PIN_PC24 ,0 );/* ETXER */ } +at91_clock_associate ("macb_clk" , &at91cap9_eth_device.dev,"pclk" ); +at91_clock_associate ("macb_clk" , &at91cap9_eth_device.dev,"hclk" ); + eth_data = *data;platform_device_register (&at91cap9_eth_device); }
arch/arm/mach-at91/at91rm9200_devices.c +3 -0
@@ -187,6 +187,9 @@ void __init at91_add_device_eth(struct eth_platform_data *data)at91_set_B_periph (AT91_PIN_PB12 ,0 );/* ETX2 */ } +at91_clock_associate ("macb_clk" , &at91rm9200_eth_device.dev,"pclk" ); +at91_clock_associate ("macb_clk" , &at91rm9200_eth_device.dev,"hclk" ); + eth_data = *data;platform_device_register (&at91rm9200_eth_device); }
arch/arm/mach-at91/at91sam9260_devices.c +3 -0
@@ -188,6 +188,9 @@ void __init at91_add_device_eth(struct eth_platform_data *data)at91_set_B_periph (AT91_PIN_PA22 ,0 );/* ETXER */ } +at91_clock_associate ("macb_clk" , &at91sam9260_eth_device.dev,"pclk" ); +at91_clock_associate ("macb_clk" , &at91sam9260_eth_device.dev,"hclk" ); + eth_data = *data;platform_device_register (&at91sam9260_eth_device); }
arch/arm/mach-at91/at91sam9263_devices.c +3 -0
@@ -198,6 +198,9 @@ void __init at91_add_device_eth(struct eth_platform_data *data)at91_set_B_periph (AT91_PIN_PC24 ,0 );/* ETXER */ } +at91_clock_associate ("macb_clk" , &at91sam9263_eth_device.dev,"pclk" ); +at91_clock_associate ("macb_clk" , &at91sam9263_eth_device.dev,"hclk" ); + eth_data = *data;platform_device_register (&at91sam9263_eth_device); }
arch/arm/mach-at91/at91sam9g45_devices.c +3 -0
@@ -343,6 +343,9 @@ void __init at91_add_device_eth(struct eth_platform_data *data)at91_set_B_periph (AT91_PIN_PA27 ,0 );/* ETXER */ } +at91_clock_associate ("macb_clk" , &at91sam9g45_eth_device.dev,"pclk" ); +at91_clock_associate ("macb_clk" , &at91sam9g45_eth_device.dev,"hclk" ); + eth_data = *data;platform_device_register (&at91sam9g45_eth_device); }
Signature · 1 line
1.7.4