Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84e0cdb0 authored by Jamie Iles's avatar Jamie Iles
Browse files

macb: unify at91 and avr32 platform data



Both at91 and avr32 defines its own platform data structure for
the macb driver and both share common structures though at91
includes a currently unused phy_irq_pin.  Create a common
macb_platform_data for macb that both at91 and avr32 can use.  In
future we can use this to support other architectures that use the
same IP block with the macb driver.

v2: rename eth_platform_data to macb_platform_data and allow at91_ether
to share the platform data with macb.

Signed-off-by: default avatarJamie Iles <jamie@jamieiles.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
parent 461845db
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ void __init at91_add_device_usba(struct usba_platform_data *data) {}

#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
static u64 eth_dmamask = DMA_BIT_MASK(32);
static struct at91_eth_data eth_data;
static struct macb_platform_data eth_data;

static struct resource eth_resources[] = {
	[0] = {
@@ -227,7 +227,7 @@ static struct platform_device at91cap9_eth_device = {
	.num_resources	= ARRAY_SIZE(eth_resources),
};

void __init at91_add_device_eth(struct at91_eth_data *data)
void __init at91_add_device_eth(struct macb_platform_data *data)
{
	if (!data)
		return;
@@ -264,7 +264,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data)
	platform_device_register(&at91cap9_eth_device);
}
#else
void __init at91_add_device_eth(struct at91_eth_data *data) {}
void __init at91_add_device_eth(struct macb_platform_data *data) {}
#endif


+3 −3
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}

#if defined(CONFIG_ARM_AT91_ETHER) || defined(CONFIG_ARM_AT91_ETHER_MODULE)
static u64 eth_dmamask = DMA_BIT_MASK(32);
static struct at91_eth_data eth_data;
static struct macb_platform_data eth_data;

static struct resource eth_resources[] = {
	[0] = {
@@ -162,7 +162,7 @@ static struct platform_device at91rm9200_eth_device = {
	.num_resources	= ARRAY_SIZE(eth_resources),
};

void __init at91_add_device_eth(struct at91_eth_data *data)
void __init at91_add_device_eth(struct macb_platform_data *data)
{
	if (!data)
		return;
@@ -199,7 +199,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data)
	platform_device_register(&at91rm9200_eth_device);
}
#else
void __init at91_add_device_eth(struct at91_eth_data *data) {}
void __init at91_add_device_eth(struct macb_platform_data *data) {}
#endif


+3 −3
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}

#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
static u64 eth_dmamask = DMA_BIT_MASK(32);
static struct at91_eth_data eth_data;
static struct macb_platform_data eth_data;

static struct resource eth_resources[] = {
	[0] = {
@@ -163,7 +163,7 @@ static struct platform_device at91sam9260_eth_device = {
	.num_resources	= ARRAY_SIZE(eth_resources),
};

void __init at91_add_device_eth(struct at91_eth_data *data)
void __init at91_add_device_eth(struct macb_platform_data *data)
{
	if (!data)
		return;
@@ -200,7 +200,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data)
	platform_device_register(&at91sam9260_eth_device);
}
#else
void __init at91_add_device_eth(struct at91_eth_data *data) {}
void __init at91_add_device_eth(struct macb_platform_data *data) {}
#endif


+3 −3
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}

#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
static u64 eth_dmamask = DMA_BIT_MASK(32);
static struct at91_eth_data eth_data;
static struct macb_platform_data eth_data;

static struct resource eth_resources[] = {
	[0] = {
@@ -171,7 +171,7 @@ static struct platform_device at91sam9263_eth_device = {
	.num_resources	= ARRAY_SIZE(eth_resources),
};

void __init at91_add_device_eth(struct at91_eth_data *data)
void __init at91_add_device_eth(struct macb_platform_data *data)
{
	if (!data)
		return;
@@ -208,7 +208,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data)
	platform_device_register(&at91sam9263_eth_device);
}
#else
void __init at91_add_device_eth(struct at91_eth_data *data) {}
void __init at91_add_device_eth(struct macb_platform_data *data) {}
#endif


+3 −3
Original line number Diff line number Diff line
@@ -284,7 +284,7 @@ void __init at91_add_device_usba(struct usba_platform_data *data) {}

#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
static u64 eth_dmamask = DMA_BIT_MASK(32);
static struct at91_eth_data eth_data;
static struct macb_platform_data eth_data;

static struct resource eth_resources[] = {
	[0] = {
@@ -311,7 +311,7 @@ static struct platform_device at91sam9g45_eth_device = {
	.num_resources	= ARRAY_SIZE(eth_resources),
};

void __init at91_add_device_eth(struct at91_eth_data *data)
void __init at91_add_device_eth(struct macb_platform_data *data)
{
	if (!data)
		return;
@@ -348,7 +348,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data)
	platform_device_register(&at91sam9g45_eth_device);
}
#else
void __init at91_add_device_eth(struct at91_eth_data *data) {}
void __init at91_add_device_eth(struct macb_platform_data *data) {}
#endif


Loading