]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 4119/1: AT91: Fix build of AT91SAM9260
authorAndrew Victor <andrew@sanpeople.com>
Thu, 1 Feb 2007 08:22:23 +0000 (09:22 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 8 Feb 2007 14:50:53 +0000 (14:50 +0000)
Fix build failure of AT91SAM9260.

The AT91RM9200 ethernet driver (at91_ether.c) stores platform data in a
"struct at91_eth_data" structure, but the AT91SAM9260 (and AT91SAM9263)
ethernet driver (macb.c) [developed on the AVR32 architecture] expects a
"struct eth_platform_data".

Since the platform data of the two drivers is very similar, we continue
to use the "struct at91_eth_data" for all AT91 processors but add a
    #define eth_platform_data      at91_eth_data
in board.h to keep the MACB driver happy.

Original patch by Jan Altenberg.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-at91rm9200/at91sam9260_devices.c
arch/arm/mach-at91rm9200/board-sam9260ek.c
include/asm-arm/arch-at91rm9200/board.h

index f42d3a40ec3cbd08a4c1757152b2dbe6bc4a7882..f338f78eb94391d1737fd6961bdadf2b3fee5fd1 100644 (file)
@@ -128,7 +128,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
 
 #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
 static u64 eth_dmamask = 0xffffffffUL;
-static struct eth_platform_data eth_data;
+static struct at91_eth_data eth_data;
 
 static struct resource eth_resources[] = {
        [0] = {
@@ -155,7 +155,7 @@ static struct platform_device at91sam9260_eth_device = {
        .num_resources  = ARRAY_SIZE(eth_resources),
 };
 
-void __init at91_add_device_eth(struct eth_platform_data *data)
+void __init at91_add_device_eth(struct at91_eth_data *data)
 {
        if (!data)
                return;
@@ -192,7 +192,7 @@ void __init at91_add_device_eth(struct eth_platform_data *data)
        platform_device_register(&at91sam9260_eth_device);
 }
 #else
-void __init at91_add_device_eth(struct eth_platform_data *data) {}
+void __init at91_add_device_eth(struct at91_eth_data *data) {}
 #endif
 
 
index da5d58ac870b59446be5015210d15df512e16c4e..37c7a7d195c36aa390efbab0e0aaa77cbf7ee4c7 100644 (file)
@@ -118,7 +118,7 @@ static struct spi_board_info ek_spi_devices[] = {
 /*
  * MACB Ethernet device
  */
-static struct __initdata eth_platform_data ek_macb_data = {
+static struct __initdata at91_eth_data ek_macb_data = {
        .phy_irq_pin    = AT91_PIN_PA7,
        .is_rmii        = 1,
 };
index 768e0fc6aa2f2d6b08250ec67f3346f5b5d5a4d6..f3a974ba3b5148af9dd954552b714d47e04aa80a 100644 (file)
@@ -69,6 +69,10 @@ struct at91_eth_data {
 };
 extern void __init at91_add_device_eth(struct at91_eth_data *data);
 
+#if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263)
+#define eth_platform_data      at91_eth_data
+#endif
+
  /* USB Host */
 struct at91_usbh_data {
        u8              ports;          /* number of ports on root hub */