diff mbox series

[04/14] sandbox: Move some mac addresses to device tree

Message ID 20220207234212.685316-5-sean.anderson@seco.com
State Changes Requested
Delegated to: Simon Glass
Headers show
Series Add support for NVMEM API | expand

Commit Message

Sean Anderson Feb. 7, 2022, 11:42 p.m. UTC
This prevents some conflicts when running sandbox with -D, since the
"rom" mac address will be random and won't match the environment. We
still need to keep addresses for eth1 and eth6 in the environment,
because dm_test_eth_rotate expects to be able to disable them by
removing their envaddr variables. This can likely be fixed in a future
series by adding a function to cause sandbox eth_opts callback for a
particular mac to fail immediately.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---

 arch/sandbox/dts/test.dts | 3 +++
 board/sandbox/sandbox.env | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Simon Glass Feb. 26, 2022, 6:36 p.m. UTC | #1
On Mon, 7 Feb 2022 at 16:42, Sean Anderson <sean.anderson@seco.com> wrote:
>
> This prevents some conflicts when running sandbox with -D, since the
> "rom" mac address will be random and won't match the environment. We
> still need to keep addresses for eth1 and eth6 in the environment,
> because dm_test_eth_rotate expects to be able to disable them by
> removing their envaddr variables. This can likely be fixed in a future
> series by adding a function to cause sandbox eth_opts callback for a
> particular mac to fail immediately.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> ---
>
>  arch/sandbox/dts/test.dts | 3 +++
>  board/sandbox/sandbox.env | 3 ---
>  2 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 5f3332a417..e111a1f050 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -511,11 +511,13 @@ 
 	eth_5: eth@10003000 {
 		compatible = "sandbox,eth";
 		reg = <0x10003000 0x1000>;
+		mac-address = [ 02 00 11 22 33 46 ];
 	};
 
 	eth_3: sbe5 {
 		compatible = "sandbox,eth";
 		reg = <0x10005000 0x1000>;
+		mac-address = [ 02 00 11 22 33 45 ];
 	};
 
 	eth@10004000 {
@@ -526,6 +528,7 @@ 
 	dsa_eth0: dsa-test-eth {
 		compatible = "sandbox,eth";
 		reg = <0x10006000 0x1000>;
+		mac-address = [ 02 00 11 22 33 48 ];
 	};
 
 	dsa-test {
diff --git a/board/sandbox/sandbox.env b/board/sandbox/sandbox.env
index 3ff42a9cc1..a2c19702d6 100644
--- a/board/sandbox/sandbox.env
+++ b/board/sandbox/sandbox.env
@@ -6,9 +6,6 @@  stdout=serial,vidconsole
 stderr=serial,vidconsole
 
 ethaddr=02:00:11:22:33:44
-eth3addr=02:00:11:22:33:45
-eth4addr=02:00:11:22:33:48
-eth5addr=02:00:11:22:33:46
 eth6addr=02:00:11:22:33:47
 ipaddr=192.0.2.1