9
0
Fork 0

ARM: at91: allow to pass the interface id to at91_add_device_eth

On the sam9x5 series we now support 1 or 2 macb.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-03-30 06:58:46 +02:00 committed by Sascha Hauer
parent 15732c1a5a
commit 28bdc0e3da
15 changed files with 19 additions and 19 deletions

View File

@ -114,7 +114,7 @@ static int at91rm9200ek_devices_init(void)
*/
at91_set_gpio_output(AT91_PIN_PA23, 1);
at91_add_device_eth(&ether_pdata);
at91_add_device_eth(0, &ether_pdata);
add_cfi_flash_device(0, AT91_CHIPSELECT_0, 0, 0);
/* USB Host */

View File

@ -254,7 +254,7 @@ static int at91sam9260ek_devices_init(void)
{
ek_add_device_nand();
at91sam9260ek_phy_reset();
at91_add_device_eth(&macb_pdata);
at91_add_device_eth(0, &macb_pdata);
at91_add_device_usbh_ohci(&ek_usbh_data);
at91_add_device_udc(&ek_udc_data);
ek_usb_add_device_mci();

View File

@ -183,7 +183,7 @@ static int at91sam9263ek_devices_init(void)
at91_set_gpio_value(AT91_PIN_PB27, 1); /* 1- enable, 0 - disable */
ek_add_device_nand();
at91_add_device_eth(&macb_pdata);
at91_add_device_eth(0, &macb_pdata);
add_cfi_flash_device(0, AT91_CHIPSELECT_0, 8 * 1024 * 1024, 0);
ek_add_device_mci();
ek_device_add_leds();

View File

@ -175,7 +175,7 @@ mem_initcall(at91sam9m10g45ek_mem_init);
static int at91sam9m10g45ek_devices_init(void)
{
ek_add_device_nand();
at91_add_device_eth(&macb_pdata);
at91_add_device_eth(0, &macb_pdata);
ek_add_device_mci();
ek_device_add_leds();

View File

@ -131,7 +131,7 @@ static int dss11_devices_init(void)
{
dss11_add_device_nand();
dss11_phy_reset();
at91_add_device_eth(&macb_pdata);
at91_add_device_eth(0, &macb_pdata);
at91_add_device_mci(0, &dss11_mci_data);
at91_add_device_usbh_ohci(&dss11_usbh_data);

View File

@ -60,7 +60,7 @@ static int mmccpu_devices_init(void)
at91_set_gpio_output(AT91_PIN_PB27, 1);
at91_set_gpio_value(AT91_PIN_PB27, 1); /* 1- enable, 0 - disable */
at91_add_device_eth(&macb_pdata);
at91_add_device_eth(0, &macb_pdata);
add_cfi_flash_device(0, AT91_CHIPSELECT_0, 0, 0);
devfs_add_partition("nor0", 0x00000, 256 * 1024, PARTITION_FIXED, "self0");

View File

@ -108,7 +108,7 @@ static int pm9263_devices_init(void)
at91_set_gpio_value(AT91_PIN_PB27, 1); /* 1- enable, 0 - disable */
pm_add_device_nand();
at91_add_device_eth(&macb_pdata);
at91_add_device_eth(0, &macb_pdata);
add_cfi_flash_device(0, AT91_CHIPSELECT_0, 4 * 1024 * 1024, 0);
devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self0");

View File

@ -138,7 +138,7 @@ static int pm9g45_devices_init(void)
pm_add_device_nand();
pm9g45_add_device_mci();
pm9g45_phy_init();
at91_add_device_eth(&macb_pdata);
at91_add_device_eth(0, &macb_pdata);
pm9g45_add_device_usbh();
devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");

View File

@ -156,7 +156,7 @@ static void tny_a9260_phy_reset(void)
static void __init ek_add_device_macb(void)
{
tny_a9260_phy_reset();
at91_add_device_eth(&macb_pdata);
at91_add_device_eth(0, &macb_pdata);
}
#else
static void __init ek_add_device_macb(void) {}

View File

@ -320,7 +320,7 @@ static int usb_a9260_devices_init(void)
{
usb_a9260_add_device_nand();
usb_a9260_phy_reset();
at91_add_device_eth(&macb_pdata);
at91_add_device_eth(0, &macb_pdata);
usb_a9260_add_device_mci();
at91_add_device_usbh_ohci(&ek_usbh_data);
ek_add_device_udc();

View File

@ -72,7 +72,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
* -------------------------------------------------------------------- */
#if defined(CONFIG_DRIVER_NET_AT91_ETHER)
void __init at91_add_device_eth(struct at91_ether_platform_data *data)
void __init at91_add_device_eth(int id, struct at91_ether_platform_data *data)
{
if (!data)
return;
@ -104,7 +104,7 @@ void __init at91_add_device_eth(struct at91_ether_platform_data *data)
IORESOURCE_MEM, data);
}
#else
void __init at91_add_device_eth(struct at91_ether_platform_data *data) {}
void __init at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
#endif
/* --------------------------------------------------------------------

View File

@ -67,7 +67,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
#endif
#if defined(CONFIG_DRIVER_NET_MACB)
void at91_add_device_eth(struct at91_ether_platform_data *data)
void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
{
if (!data)
return;
@ -104,7 +104,7 @@ void at91_add_device_eth(struct at91_ether_platform_data *data)
IORESOURCE_MEM, data);
}
#else
void at91_add_device_eth(struct at91_ether_platform_data *data) {}
void at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
#endif
#if defined(CONFIG_NAND_ATMEL)

View File

@ -75,7 +75,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
#endif
#if defined(CONFIG_DRIVER_NET_MACB)
void at91_add_device_eth(struct at91_ether_platform_data *data)
void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
{
if (!data)
return;
@ -106,7 +106,7 @@ void at91_add_device_eth(struct at91_ether_platform_data *data)
IORESOURCE_MEM, data);
}
#else
void at91_add_device_eth(struct at91_ether_platform_data *data) {}
void at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
#endif
#if defined(CONFIG_NAND_ATMEL)

View File

@ -54,7 +54,7 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data) {}
#endif
#if defined(CONFIG_DRIVER_NET_MACB)
void at91_add_device_eth(struct at91_ether_platform_data *data)
void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
{
if (!data)
return;
@ -86,7 +86,7 @@ void at91_add_device_eth(struct at91_ether_platform_data *data)
IORESOURCE_MEM, data);
}
#else
void at91_add_device_eth(struct at91_ether_platform_data *data) {}
void at91_add_device_eth(int id, struct at91_ether_platform_data *data) {}
#endif
#if defined(CONFIG_NAND_ATMEL)

View File

@ -70,7 +70,7 @@ struct at91_ether_platform_data {
int (*get_ethaddr)(struct eth_device*, unsigned char *adr);
};
void at91_add_device_eth(struct at91_ether_platform_data *data);
void at91_add_device_eth(int id, struct at91_ether_platform_data *data);
/* SDRAM */
void at91_add_device_sdram(u32 size);