Skip to content

Commit

Permalink
[AVR32] Initialize phy_mask for both macb devices
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Haavard Skinnemoen committed Jul 18, 2007
1 parent 3da86ee commit 587ca76
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion arch/avr32/boards/atstk1000/atstk1002.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 587ca76

Please sign in to comment.