Skip to content

Commit 587ca76

Browse files
author
Haavard Skinnemoen
committed
[AVR32] Initialize phy_mask for both macb devices
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 <[email protected]>
1 parent 3da86ee commit 587ca76

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

arch/avr32/boards/atstk1000/atstk1002.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,19 @@ struct eth_addr {
3333
};
3434

3535
static struct eth_addr __initdata hw_addr[2];
36-
static struct eth_platform_data __initdata eth_data[2];
36+
static struct eth_platform_data __initdata eth_data[2] = {
37+
{
38+
/*
39+
* The MDIO pullups on STK1000 are a bit too weak for
40+
* the autodetection to work properly, so we have to
41+
* mask out everything but the correct address.
42+
*/
43+
.phy_mask = ~(1U << 16),
44+
},
45+
{
46+
.phy_mask = ~(1U << 17),
47+
},
48+
};
3749

3850
#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
3951
static struct spi_board_info spi0_board_info[] __initdata = {

0 commit comments

Comments
 (0)