Skip to contentSkip to conversation

net: Add SMC911X driver to Kconfig

PATCH New Adam Ford 1 participant 2 messages Sep 5, 2017 Network drivers

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/2 net: Add SMC911X driver to Kconfig

There are a variety of boards that need some cleanup in their respective include/configs file, but here is a foundation for them to begin their transisiton.

---
 drivers/net/Kconfig | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/net/Kconfig +29 -0
index 5ceea44..bd2a303 100644
@@ -203,6 +203,35 @@ config RTL8169
 	  This driver supports Realtek 8169 series gigabit ethernet family of
 	  PCI/PCIe chipsets/adapters.
 
+config SMC911X
+	bool "SMSC LAN911x and LAN921x controller driver"
+
+if SMC911X
+
+config SMC911X_BASE
+	hex "SMC911X Base Address"
+	default 0
+	help
+	  Define this to hold the physical address
+	  of the device (I/O space)
+
+choice
+	prompt "SMC911X bus width"
+	default SMC911X_16_BIT
+
+config SMC911X_32_BIT
+	bool "Enable 32-bit interface"
+
+config SMC911X_16_BIT
+	bool "Enable 16-bit interface"
+	help
+	  Define this if data bus is 16 bits. If your processor
+	  automatically converts one 32 bit word to two 16 bit
+	  words you may also try CONFIG_SMC911X_32_BIT.
+
+endchoice
+endif #SMC911X
+
 config SUN7I_GMAC
 	bool "Enable Allwinner GMAC Ethernet support"
 	help
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 2/2 arm: omap3_logic: Migrate SMC911X to Kconfig

With SMC911X supported in Kconfig, let's migrate
the Logic PD OMAP3 board.

---
 configs/omap3_logic_defconfig | 4 ++++
 include/configs/omap3_logic.h | 7 -------
 2 files changed, 4 insertions(+), 7 deletions(-)
configs/omap3_logic_defconfig +4 -0
index 8d0a4d4..07abc55 100644
@@ -40,6 +40,10 @@ CONFIG_MMC_OMAP36XX_PINS=y
 CONFIG_NAND=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
 CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000
+CONFIG_NETDEVICES=y
+CONFIG_SMC911X=y
+CONFIG_SMC911X_BASE=0x08000000
+CONFIG_SMC911X_32_BIT=y
 CONFIG_SYS_NS16550=y
 CONFIG_OMAP3_SPI=y
 CONFIG_USB=y
include/configs/omap3_logic.h +0 -7
index a4a40f4..6b7a2d6 100644
@@ -242,13 +242,6 @@
 #define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-/* SMSC922x Ethernet */
-#if defined(CONFIG_CMD_NET)
-#define CONFIG_SMC911X
-#define CONFIG_SMC911X_32_BIT
-#define CONFIG_SMC911X_BASE	0x08000000
-#endif /* (CONFIG_CMD_NET) */
-
 /* Defines for SPL */
 
 /* NAND: SPL falcon mode configs */
Signature · 1 line
2.7.4