Commit e14d3f79282ce7654d2848bb8b8f74a81702fa35

Authored by Marek Vasut
1 parent 9ec7414e29

arm: socfpga: misc: Probe ethernet GMAC from OF

The GMAC can now be probed from OF, so enable DM ethernet and remove the
old ad-hoc designware_initialize() invocation.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>

Showing 5 changed files with 3 additions and 5 deletions Side-by-side Diff

arch/arm/mach-socfpga/misc.c
... ... @@ -82,9 +82,7 @@
82 82 /* Release the EMAC controller from reset */
83 83 socfpga_per_reset(reset, 0);
84 84  
85   - /* initialize and register the emac */
86   - return designware_initialize(CONFIG_EMAC_BASE,
87   - CONFIG_PHY_INTERFACE_MODE);
  85 + return 0;
88 86 }
89 87 #endif
90 88  
configs/socfpga_cyclone5_defconfig
... ... @@ -7,6 +7,7 @@
7 7 # CONFIG_CMD_FLASH is not set
8 8 CONFIG_OF_CONTROL=y
9 9 CONFIG_SPI_FLASH=y
  10 +CONFIG_DM_ETH=y
10 11 CONFIG_NETDEVICES=y
11 12 CONFIG_ETH_DESIGNWARE=y
12 13 CONFIG_SPL_DM=y
configs/socfpga_socrates_defconfig
... ... @@ -7,6 +7,7 @@
7 7 # CONFIG_CMD_FLASH is not set
8 8 CONFIG_OF_CONTROL=y
9 9 CONFIG_SPI_FLASH=y
  10 +CONFIG_DM_ETH=y
10 11 CONFIG_NETDEVICES=y
11 12 CONFIG_ETH_DESIGNWARE=y
12 13 CONFIG_SPL_DM=y
include/configs/socfpga_arria5.h
... ... @@ -49,7 +49,6 @@
49 49 /* Ethernet on SoC (EMAC) */
50 50 #if defined(CONFIG_CMD_NET)
51 51 #define CONFIG_EMAC_BASE SOCFPGA_EMAC1_ADDRESS
52   -#define CONFIG_PHY_INTERFACE_MODE PHY_INTERFACE_MODE_RGMII
53 52  
54 53 /* PHY */
55 54 #define CONFIG_PHY_MICREL
include/configs/socfpga_cyclone5.h
... ... @@ -49,7 +49,6 @@
49 49 /* Ethernet on SoC (EMAC) */
50 50 #if defined(CONFIG_CMD_NET)
51 51 #define CONFIG_EMAC_BASE SOCFPGA_EMAC1_ADDRESS
52   -#define CONFIG_PHY_INTERFACE_MODE PHY_INTERFACE_MODE_RGMII
53 52  
54 53 /* PHY */
55 54 #define CONFIG_PHY_MICREL