]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[AVR32] Initialize phy_mask for both macb devices
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Wed, 18 Jul 2007 18:32:49 +0000 (20:32 +0200)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Wed, 18 Jul 2007 18:47:04 +0000 (20:47 +0200)
The STK1000 uses pullups on the MDIO lines to the PHY, but they are
too weak. This causes the PHY layer to detect PHYs on all possible MII
addresses. Mask out all but the correct address to prevent this from
happening.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
arch/avr32/boards/atstk1000/atstk1002.c

index d88ac111010117a07c5878f9721ec53d56e15933..cb93eabb9c6c4145947df0bda8afaefd0d734340 100644 (file)
@@ -33,7 +33,19 @@ struct eth_addr {
 };
 
 static struct eth_addr __initdata hw_addr[2];
-static struct eth_platform_data __initdata eth_data[2];
+static struct eth_platform_data __initdata eth_data[2] = {
+       {
+               /*
+                * The MDIO pullups on STK1000 are a bit too weak for
+                * the autodetection to work properly, so we have to
+                * mask out everything but the correct address.
+                */
+               .phy_mask       = ~(1U << 16),
+       },
+       {
+               .phy_mask       = ~(1U << 17),
+       },
+};
 
 #ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
 static struct spi_board_info spi0_board_info[] __initdata = {