[meta-arm,v2,9/9] arm-bsp/linux: Enabling lan9115 Ethernet for corstone700-mps3

Submitted by abdellatif.elkhlifi@arm.com on Aug. 13, 2020, 2:52 p.m. | Patch ID: 175305

Details

Message ID 20200813145230.22140-10-abdellatif.elkhlifi@arm.com
State New
Headers show

Commit Message

abdellatif.elkhlifi@arm.com Aug. 13, 2020, 2:52 p.m.
From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>

This commit enables lan9115 Ethernet in the v5.6 kernel
as a machine feature.

Change-Id: Ib8e724a64b24db3048a2b12973824bba9f3eecc4
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
---
 meta-arm-bsp/conf/machine/corstone700-mps3.conf           | 5 +++++
 .../bsp/arm-platforms/corstone700/eth_lan9115.scc         | 4 ++++
 .../bsp/arm-platforms/corstone700/lan9115.cfg             | 1 +
 .../recipes-kernel/linux/linux-stable-corstone700.inc     | 8 ++++++++
 4 files changed, 18 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/corstone700/eth_lan9115.scc
 create mode 100644 meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/corstone700/lan9115.cfg

Patch hide | download patch | download mbox

diff --git a/meta-arm-bsp/conf/machine/corstone700-mps3.conf b/meta-arm-bsp/conf/machine/corstone700-mps3.conf
index 28d7050..88ef5c1 100644
--- a/meta-arm-bsp/conf/machine/corstone700-mps3.conf
+++ b/meta-arm-bsp/conf/machine/corstone700-mps3.conf
@@ -4,4 +4,9 @@ 
 
 require conf/machine/include/corstone700.inc
 
+# default feature used: eth_lan9115
+# add the following line to local.conf to disable the feature:
+# MACHINE_FEATURES_remove = "eth_lan9115"
+MACHINE_FEATURES += "eth_lan9115"
+
 TFA_TARGET_PLATFORM = "fpga"
diff --git a/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/corstone700/eth_lan9115.scc b/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/corstone700/eth_lan9115.scc
new file mode 100644
index 0000000..94cb13e
--- /dev/null
+++ b/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/corstone700/eth_lan9115.scc
@@ -0,0 +1,4 @@ 
+define KFEATURE_DESCRIPTION "Ethernet feature using lan9115"
+
+kconf hardware pnp.cfg
+kconf hardware lan9115.cfg
\ No newline at end of file
diff --git a/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/corstone700/lan9115.cfg b/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/corstone700/lan9115.cfg
new file mode 100644
index 0000000..cd77ec3
--- /dev/null
+++ b/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/corstone700/lan9115.cfg
@@ -0,0 +1 @@ 
+CONFIG_SMSC911X=y
\ No newline at end of file
diff --git a/meta-arm-bsp/recipes-kernel/linux/linux-stable-corstone700.inc b/meta-arm-bsp/recipes-kernel/linux/linux-stable-corstone700.inc
index 63f48df..95a8bab 100644
--- a/meta-arm-bsp/recipes-kernel/linux/linux-stable-corstone700.inc
+++ b/meta-arm-bsp/recipes-kernel/linux/linux-stable-corstone700.inc
@@ -52,3 +52,11 @@  KERNEL_FEATURES_append_corstone700-fvp = " \
                           bsp/arm-platforms/corstone700/eth_lan91c111.scc', \
                          'bsp/arm-platforms/corstone700/xip_cmdline.cfg', \
                           d)}"
+
+KERNEL_FEATURES_append_corstone700-mps3 = " \
+    ${@bb.utils.contains('MACHINE_FEATURES', \
+                         'eth_lan9115', \
+                         'bsp/arm-platforms/corstone700/xip_dhcp_cmdline.cfg \
+                          bsp/arm-platforms/corstone700/eth_lan9115.scc', \
+                         'bsp/arm-platforms/corstone700/xip_cmdline.cfg', \
+                          d)}"