X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fmach-at91%2Fboard-dt-sama5.c;h=3ffe46c2bd4c38b8f5a36f0b3f544bf25c32db63;hb=980657d8cdff97343619cf2e3332b8307e9d07ea;hp=8fb9ef5333f17648d8a28aaa0385badc9c0ed65a;hpb=8ab7913675726e5ae23b91221c0b5442d986d44a;p=pandora-kernel.git diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c index 8fb9ef5333f1..3ffe46c2bd4c 100644 --- a/arch/arm/mach-at91/board-dt-sama5.c +++ b/arch/arm/mach-at91/board-dt-sama5.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -26,9 +27,27 @@ #include "generic.h" +static int ksz8081_phy_fixup(struct phy_device *phy) +{ + int value; + + value = phy_read(phy, 0x16); + value &= ~0x20; + phy_write(phy, 0x16, value); + + return 0; +} + static void __init sama5_dt_device_init(void) { + if (of_machine_is_compatible("atmel,sama5d4ek") && + IS_ENABLED(CONFIG_PHYLIB)) { + phy_register_fixup_for_id("fc028000.etherne:00", + ksz8081_phy_fixup); + } + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + at91_sam9x5_pm_init(); } static const char *sama5_dt_board_compat[] __initconst = {