summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target/h8300/systems/hitachi-edosk26742
-rw-r--r--target/linux/config/Config.in.ethernet4
-rw-r--r--target/linux/patches/4.4.302/h8300-net.patch81
3 files changed, 86 insertions, 1 deletions
diff --git a/target/h8300/systems/hitachi-edosk2674 b/target/h8300/systems/hitachi-edosk2674
index 7a53d4368..10eac7cea 100644
--- a/target/h8300/systems/hitachi-edosk2674
+++ b/target/h8300/systems/hitachi-edosk2674
@@ -3,6 +3,8 @@ config ADK_TARGET_SYSTEM_HITACHI_EDOSK2674
select ADK_TARGET_CPU_H8S
select ADK_TARGET_PACKAGE_TXZ
select ADK_TARGET_WITH_SERIAL
+ select ADK_TARGET_WITH_NET
+ select ADK_TARGET_WITH_NETDEVICE
select ADK_TARGET_KERNEL_UIMAGEBIN
select ADK_HOST_BUILD_U_BOOT_H8300
help
diff --git a/target/linux/config/Config.in.ethernet b/target/linux/config/Config.in.ethernet
index 9a98c8ef1..91821e260 100644
--- a/target/linux/config/Config.in.ethernet
+++ b/target/linux/config/Config.in.ethernet
@@ -246,9 +246,11 @@ config ADK_LINUX_KERNEL_SMC91X
select ADK_LINUX_KERNEL_NET_VENDOR_SMSC
select ADK_LINUX_KERNEL_GPIOLIB
depends on ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB || \
- ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE
+ ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE || \
+ ADK_TARGET_SYSTEM_HITACHI_EDOSK2674
default y if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB
default y if ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE
+ default y if ADK_TARGET_SYSTEM_HITACHI_EDOSK2674
default n
help
SMC91X ethernet driver
diff --git a/target/linux/patches/4.4.302/h8300-net.patch b/target/linux/patches/4.4.302/h8300-net.patch
new file mode 100644
index 000000000..788ae7db8
--- /dev/null
+++ b/target/linux/patches/4.4.302/h8300-net.patch
@@ -0,0 +1,81 @@
+diff -Nur linux-4.4.302.orig/arch/h8300/boot/dts/edosk2674.dts linux-4.4.302/arch/h8300/boot/dts/edosk2674.dts
+--- linux-4.4.302.orig/arch/h8300/boot/dts/edosk2674.dts 2022-02-03 09:27:54.000000000 +0100
++++ linux-4.4.302/arch/h8300/boot/dts/edosk2674.dts 2022-02-14 05:05:26.253691787 +0100
+@@ -6,7 +6,7 @@
+ interrupt-parent = <&h8intc>;
+
+ chosen {
+- bootargs = "console=ttySC2,38400";
++ bootargs = "console=ttySC2,38400 root=/dev/nfs ip=dhcp";
+ stdout-path = &sci2;
+ };
+ aliases {
+@@ -104,4 +104,9 @@
+ clocks = <&fclk>;
+ clock-names = "sci_ick";
+ };
++ ethernet: ethernet@f80000 {
++ compatible = "smsc,lan91c94";
++ reg = <0xf80000 0xfbffff>;
++ interrupts = <16 0>;
++ };
+ };
+diff -Nur linux-4.4.302.orig/drivers/net/ethernet/smsc/Kconfig linux-4.4.302/drivers/net/ethernet/smsc/Kconfig
+--- linux-4.4.302.orig/drivers/net/ethernet/smsc/Kconfig 2022-02-03 09:27:54.000000000 +0100
++++ linux-4.4.302/drivers/net/ethernet/smsc/Kconfig 2022-02-14 04:21:54.546112552 +0100
+@@ -7,7 +7,7 @@
+ default y
+ depends on ARM || ARM64 || ATARI_ETHERNAT || BLACKFIN || COLDFIRE || \
+ ISA || M32R || MAC || MIPS || MN10300 || NIOS2 || PCI || \
+- PCMCIA || SUPERH || XTENSA
++ PCMCIA || SUPERH || XTENSA || H8300
+ ---help---
+ If you have a network (Ethernet) card belonging to this class, say Y.
+
+@@ -36,9 +36,8 @@
+ tristate "SMC 91C9x/91C1xxx support"
+ select CRC32
+ select MII
+- depends on !OF || GPIOLIB
+ depends on ARM || ARM64 || ATARI_ETHERNAT || BLACKFIN || COLDFIRE || \
+- M32R || MIPS || MN10300 || NIOS2 || SUPERH || XTENSA
++ M32R || MIPS || MN10300 || NIOS2 || SUPERH || XTENSA || H8300
+ ---help---
+ This is a driver for SMC's 91x series of Ethernet chipsets,
+ including the SMC91C94 and the SMC91C111. Say Y if you want it
+diff -Nur linux-4.4.302.orig/drivers/net/ethernet/smsc/smc91x.c linux-4.4.302/drivers/net/ethernet/smsc/smc91x.c
+--- linux-4.4.302.orig/drivers/net/ethernet/smsc/smc91x.c 2022-02-03 09:27:54.000000000 +0100
++++ linux-4.4.302/drivers/net/ethernet/smsc/smc91x.c 2022-02-14 05:31:18.727485106 +0100
+@@ -61,7 +61,7 @@
+
+ /* Debugging level */
+ #ifndef SMC_DEBUG
+-#define SMC_DEBUG 0
++#define SMC_DEBUG 1
+ #endif
+
+
+@@ -2204,6 +2204,7 @@
+ };
+ MODULE_DEVICE_TABLE(of, smc91x_match);
+
++#if defined(CONFIG_GPIOLIB)
+ /**
+ * of_try_set_control_gpio - configure a gpio if it exists
+ */
+@@ -2228,6 +2229,15 @@
+
+ return 0;
+ }
++#else
++static int try_toggle_control_gpio(struct device *dev,
++ struct gpio_desc **desc,
++ const char *name, int index,
++ int value, unsigned int nsdelay)
++{
++ return 0;
++}
++#endif
+ #endif
+
+ /*