diff options
author | Tom Rini <trini@ti.com> | 2014-10-10 20:59:28 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-10-10 20:59:28 -0400 |
commit | e89d623f099c44b0b166ccf46bce2e6a0b99c984 (patch) | |
tree | da7fb5d7260b477a976519e580264ba1f86a866b /board/atmel/sama5d3xek/sama5d3xek.c | |
parent | ed8271d11c5c7a31eb49f787fa25eece6b82bb9e (diff) | |
parent | 3d420cbd355a5f09e4f113eb10579a264a8ef138 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'board/atmel/sama5d3xek/sama5d3xek.c')
-rw-r--r-- | board/atmel/sama5d3xek/sama5d3xek.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c index f53754bc87..ca4f79ddc1 100644 --- a/board/atmel/sama5d3xek/sama5d3xek.c +++ b/board/atmel/sama5d3xek/sama5d3xek.c @@ -17,6 +17,7 @@ #include <lcd.h> #include <atmel_lcdc.h> #include <atmel_mci.h> +#include <phy.h> #include <micrel.h> #include <net.h> #include <netdev.h> @@ -273,15 +274,25 @@ int dram_init(void) int board_phy_config(struct phy_device *phydev) { - /* rx data delay */ - ksz9021_phy_extended_write(phydev, - MII_KSZ9021_EXT_RGMII_RX_DATA_SKEW, 0x2222); - /* tx data delay */ - ksz9021_phy_extended_write(phydev, - MII_KSZ9021_EXT_RGMII_TX_DATA_SKEW, 0x2222); - /* rx/tx clock delay */ - ksz9021_phy_extended_write(phydev, - MII_KSZ9021_EXT_RGMII_CLOCK_SKEW, 0xf2f4); + /* board specific timings for GMAC */ + if (has_gmac()) { + /* rx data delay */ + ksz9021_phy_extended_write(phydev, + MII_KSZ9021_EXT_RGMII_RX_DATA_SKEW, + 0x2222); + /* tx data delay */ + ksz9021_phy_extended_write(phydev, + MII_KSZ9021_EXT_RGMII_TX_DATA_SKEW, + 0x2222); + /* rx/tx clock delay */ + ksz9021_phy_extended_write(phydev, + MII_KSZ9021_EXT_RGMII_CLOCK_SKEW, + 0xf2f4); + } + + /* always run the PHY's config routine */ + if (phydev->drv->config) + return phydev->drv->config(phydev); return 0; } |