diff mbox

[U-Boot,v2,14/14] net: emaclite: Move emaclite to Kconfig

Message ID 278fb9aed33c537643e638f2dcfcc9ae9316cd6b.1450354163.git.michal.simek@xilinx.com
State Accepted
Delegated to: Michal Simek
Headers show

Commit Message

Michal Simek Dec. 17, 2015, 12:09 p.m. UTC
Add PHYLIB and MII dependencies and enable it by default for Microblaze.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
---

Changes in v2: None

 board/xilinx/microblaze-generic/xparameters.h | 3 ---
 configs/microblaze-generic_defconfig          | 2 +-
 drivers/net/Kconfig                           | 8 ++++++++
 include/configs/microblaze-generic.h          | 3 +--
 4 files changed, 10 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/board/xilinx/microblaze-generic/xparameters.h b/board/xilinx/microblaze-generic/xparameters.h
index 79c87fb61803..4f44427e601c 100644
--- a/board/xilinx/microblaze-generic/xparameters.h
+++ b/board/xilinx/microblaze-generic/xparameters.h
@@ -44,9 +44,6 @@ 
 #define XILINX_SYSACE_HIGHADDR	0x4180ffff
 #define XILINX_SYSACE_MEM_WIDTH	16
 
-/* Ethernet controller is Ethernet_MAC */
-#define XILINX_EMACLITE_BASEADDR       0x40C00000
-
 /* Watchdog IP is wxi_timebase_wdt_0 */
 #define XILINX_WATCHDOG_BASEADDR	0x50000000
 #define XILINX_WATCHDOG_IRQ		1
diff --git a/configs/microblaze-generic_defconfig b/configs/microblaze-generic_defconfig
index 5e815c6bcdcb..1a389615729f 100644
--- a/configs/microblaze-generic_defconfig
+++ b/configs/microblaze-generic_defconfig
@@ -10,6 +10,6 @@  CONFIG_CMD_GPIO=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_EMBED=y
 CONFIG_DM_ETH=y
-CONFIG_PHYLIB=y
+CONFIG_XILINX_EMACLITE=y
 CONFIG_SYS_NS16550=y
 CONFIG_XILINX_UARTLITE=y
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 9dc106cc93b7..43e4f600e7cc 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -109,6 +109,14 @@  config XILINX_AXIEMAC
 	help
 	  This MAC is present in Xilinx Microblaze, Zynq and ZynqMP SoCs.
 
+config XILINX_EMACLITE
+	depends on DM_ETH && (MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP)
+	select PHYLIB
+	select MII
+	bool "Xilinx Ethernetlite"
+	help
+	  This MAC is present in Xilinx Microblaze, Zynq and ZynqMP SoCs.
+
 config ZYNQ_GEM
 	depends on DM_ETH && (ARCH_ZYNQ || ARCH_ZYNQMP)
 	select PHYLIB
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index f1525f506a7d..4d8bf46e69f2 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -42,8 +42,7 @@ 
 
 /* ethernet */
 #undef CONFIG_SYS_ENET
-#if defined(XILINX_EMACLITE_BASEADDR) || defined(CONFIG_OF_CONTROL)
-# define CONFIG_XILINX_EMACLITE	1
+#if defined(CONFIG_XILINX_EMACLITE)
 # define CONFIG_SYS_ENET
 #endif
 #if defined(XILINX_AXIEMAC_BASEADDR)