This will make easier for future boards to reuse the same driver (e.g.
Milk-V Duo 256MB).

Signed-off-by: Hiago De Franco <[email protected]>
---
 board/sophgo/{milkv_duo => common}/ethernet.c | 0
 board/sophgo/{milkv_duo => common}/ethernet.h | 0
 board/sophgo/milkv_duo/MAINTAINERS            | 1 +
 board/sophgo/milkv_duo/Makefile               | 2 +-
 board/sophgo/milkv_duo/board.c                | 2 +-
 5 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/board/sophgo/milkv_duo/ethernet.c b/board/sophgo/common/ethernet.c
similarity index 100%
rename from board/sophgo/milkv_duo/ethernet.c
rename to board/sophgo/common/ethernet.c
diff --git a/board/sophgo/milkv_duo/ethernet.h b/board/sophgo/common/ethernet.h
similarity index 100%
rename from board/sophgo/milkv_duo/ethernet.h
rename to board/sophgo/common/ethernet.h
diff --git a/board/sophgo/milkv_duo/MAINTAINERS 
b/board/sophgo/milkv_duo/MAINTAINERS
index 651a0592f7a..6941dc5b376 100644
--- a/board/sophgo/milkv_duo/MAINTAINERS
+++ b/board/sophgo/milkv_duo/MAINTAINERS
@@ -2,5 +2,6 @@ Milk-V Duo
 M:     Kongyang Liu <[email protected]>
 S:     Maintained
 F:     board/sophgo/milkv_duo/
+F:     board/sophgo/common/
 F:     configs/milkv_duo_defconfig
 F:     doc/board/sophgo/milkv_duo.rst
diff --git a/board/sophgo/milkv_duo/Makefile b/board/sophgo/milkv_duo/Makefile
index 18ada7d72ff..aa321d15687 100644
--- a/board/sophgo/milkv_duo/Makefile
+++ b/board/sophgo/milkv_duo/Makefile
@@ -3,4 +3,4 @@
 # Copyright (c) 2024, Kongyang Liu <[email protected]>
 
 obj-y += board.o
-obj-$(CONFIG_NET_LEGACY) += ethernet.o
+obj-$(CONFIG_NET_LEGACY) += ../common/ethernet.o
diff --git a/board/sophgo/milkv_duo/board.c b/board/sophgo/milkv_duo/board.c
index f0944859b58..34339c42925 100644
--- a/board/sophgo/milkv_duo/board.c
+++ b/board/sophgo/milkv_duo/board.c
@@ -5,7 +5,7 @@
 
 #include <dm/lists.h>
 
-#include "ethernet.h"
+#include "../common/ethernet.h"
 
 int board_init(void)
 {

-- 
2.54.0

Reply via email to