diff options
author | Tom Rini <trini@konsulko.com> | 2015-03-26 22:13:11 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-03-26 22:13:11 -0400 |
commit | 10af87817a3d924bfbfce0cc323f9785cccdb131 (patch) | |
tree | 2ca16e5060d3e6b968cfed645d0713bf5ab7734a /arch/x86/cpu/quark/quark.c | |
parent | f643d9294f45487f22e8f33d6572530f17eff4e9 (diff) | |
parent | 6f1eba49a558421e3fcb06ab0addc12b9a3804c6 (diff) | |
download | u-boot-imx-10af87817a3d924bfbfce0cc323f9785cccdb131.zip u-boot-imx-10af87817a3d924bfbfce0cc323f9785cccdb131.tar.gz u-boot-imx-10af87817a3d924bfbfce0cc323f9785cccdb131.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-x86
Diffstat (limited to 'arch/x86/cpu/quark/quark.c')
-rw-r--r-- | arch/x86/cpu/quark/quark.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c index dccf7ac..25edcf7 100644 --- a/arch/x86/cpu/quark/quark.c +++ b/arch/x86/cpu/quark/quark.c @@ -6,6 +6,8 @@ #include <common.h> #include <mmc.h> +#include <netdev.h> +#include <phy.h> #include <asm/io.h> #include <asm/pci.h> #include <asm/post.h> @@ -116,3 +118,20 @@ int cpu_mmc_init(bd_t *bis) return pci_mmc_init("Quark SDHCI", mmc_supported, ARRAY_SIZE(mmc_supported)); } + +int cpu_eth_init(bd_t *bis) +{ + u32 base; + int ret0, ret1; + + pci_read_config_dword(QUARK_EMAC0, PCI_BASE_ADDRESS_0, &base); + ret0 = designware_initialize(base, PHY_INTERFACE_MODE_RMII); + + pci_read_config_dword(QUARK_EMAC1, PCI_BASE_ADDRESS_0, &base); + ret1 = designware_initialize(base, PHY_INTERFACE_MODE_RMII); + + if (ret0 < 0 && ret1 < 0) + return -1; + else + return 0; +} |