- avr32-move-ethernet-tag-parsing-to-board-specific.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     AVR32: Move ethernet tag parsing to board-specific code
has been removed from the -mm tree.  Its filename was
     avr32-move-ethernet-tag-parsing-to-board-specific.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
Subject: AVR32: Move ethernet tag parsing to board-specific code
From: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>

By moving the ethernet tag parsing to the board-specific code we avoid the
issue of figuring out which device we're supposed to attach the information
to.  The board specific code knows this because it's where the actual devices
are instantiated.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>
Cc: Jeff Garzik <jeff@xxxxxxxxxx>
Cc: Andrew Victor <andrew@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/avr32/boards/atstk1000/atstk1002.c |   30 ++++++++++++++++------
 arch/avr32/kernel/setup.c               |   24 -----------------
 2 files changed, 22 insertions(+), 32 deletions(-)

diff -puN arch/avr32/boards/atstk1000/atstk1002.c~avr32-move-ethernet-tag-parsing-to-board-specific arch/avr32/boards/atstk1000/atstk1002.c
--- a/arch/avr32/boards/atstk1000/atstk1002.c~avr32-move-ethernet-tag-parsing-to-board-specific
+++ a/arch/avr32/boards/atstk1000/atstk1002.c
@@ -9,8 +9,12 @@
  */
 #include <linux/device.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/types.h>
 #include <linux/spi/spi.h>
 
+#include <asm/setup.h>
 #include <asm/arch/at32ap7000.h>
 #include <asm/arch/board.h>
 #include <asm/arch/init.h>
@@ -25,15 +29,24 @@ static struct spi_board_info spi_board_i
 	},
 };
 
-struct eth_platform_data __initdata eth0_data = {
-	.valid		= 1,
-	.mii_phy_addr	= 0x10,
-	.is_rmii	= 0,
-	.hw_addr	= { 0x6a, 0x87, 0x71, 0x14, 0xcd, 0xcb },
-};
-
+struct eth_platform_data __initdata eth_data[2];
 extern struct lcdc_platform_data atstk1000_fb0_data;
 
+static int __init parse_tag_ethernet(struct tag *tag)
+{
+	int i;
+
+	i = tag->u.ethernet.mac_index;
+	if (i < ARRAY_SIZE(eth_data)) {
+		eth_data[i].mii_phy_addr = tag->u.ethernet.mii_phy_addr;
+		memcpy(&eth_data[i].hw_addr, tag->u.ethernet.hw_address,
+		       sizeof(eth_data[i].hw_addr));
+		eth_data[i].valid = 1;
+	}
+	return 0;
+}
+__tagtable(ATAG_ETHERNET, parse_tag_ethernet);
+
 void __init setup_board(void)
 {
 	at32_map_usart(1, 0);	/* /dev/ttyS0 */
@@ -51,7 +64,8 @@ static int __init atstk1002_init(void)
 	at32_add_device_usart(1);
 	at32_add_device_usart(2);
 
-	at32_add_device_eth(0, &eth0_data);
+	if (eth_data[0].valid)
+		at32_add_device_eth(0, &eth_data[0]);
 
 	spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
 	at32_add_device_spi(0);
diff -puN arch/avr32/kernel/setup.c~avr32-move-ethernet-tag-parsing-to-board-specific arch/avr32/kernel/setup.c
--- a/arch/avr32/kernel/setup.c~avr32-move-ethernet-tag-parsing-to-board-specific
+++ a/arch/avr32/kernel/setup.c
@@ -229,30 +229,6 @@ static int __init parse_tag_rsvd_mem(str
 }
 __tagtable(ATAG_RSVD_MEM, parse_tag_rsvd_mem);
 
-static int __init parse_tag_ethernet(struct tag *tag)
-{
-#if 0
-	const struct platform_device *pdev;
-
-	/*
-	 * We really need a bus type that supports "classes"...this
-	 * will do for now (until we must handle other kinds of
-	 * ethernet controllers)
-	 */
-	pdev = platform_get_device("macb", tag->u.ethernet.mac_index);
-	if (pdev && pdev->dev.platform_data) {
-		struct eth_platform_data *data = pdev->dev.platform_data;
-
-		data->valid = 1;
-		data->mii_phy_addr = tag->u.ethernet.mii_phy_addr;
-		memcpy(data->hw_addr, tag->u.ethernet.hw_address,
-		       sizeof(data->hw_addr));
-	}
-#endif
-	return 0;
-}
-__tagtable(ATAG_ETHERNET, parse_tag_ethernet);
-
 /*
  * Scan the tag table for this tag, and call its parse function. The
  * tag table is built by the linker from all the __tagtable
_

Patches currently in -mm which might be from hskinnemoen@xxxxxxxxx are

fix-x86_64-mm-i386-reloc-kallsyms.patch
avr32-move-ethernet-tag-parsing-to-board-specific.patch
atmel-macb-ethernet-driver.patch
adapt-macb-driver-to-net_device-changes.patch
generic-ioremap_page_range-mips-conversion.patch
generic-ioremap_page_range-parisc-conversion.patch
generic-ioremap_page_range-s390-conversion.patch
generic-ioremap_page_range-sh-conversion.patch
generic-ioremap_page_range-sh64-conversion.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux