From e6163467a34b8a77da55202fd3cf079947f93841 Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Tue, 26 Dec 2023 21:46:12 +0600 Subject: [PATCH 1/8] test_net: print out net list Printing net list is useful in CI log files. Signed-off-by: Maxim Uvarov Reviewed-by: Simon Glass --- test/py/tests/test_net.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/py/tests/test_net.py b/test/py/tests/test_net.py index b2241ae6a4..cd5b791a6a 100644 --- a/test/py/tests/test_net.py +++ b/test/py/tests/test_net.py @@ -96,6 +96,8 @@ def test_net_pre_commands(u_boot_console): if init_pci: u_boot_console.run_command('pci enum') + u_boot_console.run_command('net list') + @pytest.mark.buildconfigspec('cmd_dhcp') def test_net_dhcp(u_boot_console): """Test the dhcp command. From f5ead4c5fb14eedc788fc594af3b34a1fc7fb37e Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Tue, 26 Dec 2023 21:46:13 +0600 Subject: [PATCH 2/8] net/smc911x: fix return from smc911x_send return value of smc911x_send is ignored, but on sucesseful send we need return 0 and or error -ETIMEOUT, not opposite. Signed-off-by: Maxim Uvarov Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- drivers/net/smc911x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 5c5ad8b84a..616b7ce174 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -403,7 +403,7 @@ static int smc911x_send(struct udevice *dev, void *packet, int length) ret = smc911x_send_common(priv, packet, length); - return ret ? 0 : -ETIMEDOUT; + return ret ? -ETIMEDOUT : 0; } static int smc911x_recv(struct udevice *dev, int flags, uchar **packetp) From f3384d7fbbd9065798958553f52506a6c9e80d24 Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Tue, 26 Dec 2023 21:46:14 +0600 Subject: [PATCH 3/8] sandbox: eth-raw-os: successful return code is 0 all network drivers return 0 on the successful transmission. Signed-off-by: Maxim Uvarov Reviewed-by: Simon Glass --- arch/sandbox/cpu/eth-raw-os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sandbox/cpu/eth-raw-os.c b/arch/sandbox/cpu/eth-raw-os.c index e59b96be5f..92c35aed95 100644 --- a/arch/sandbox/cpu/eth-raw-os.c +++ b/arch/sandbox/cpu/eth-raw-os.c @@ -256,7 +256,7 @@ int sandbox_eth_raw_os_send(void *packet, int length, strerror(errno)); return -errno; } - return retval; + return 0; } int sandbox_eth_raw_os_recv(void *packet, int *length, From c64a1e43acb80fce6705c57e9be4e036a97767a3 Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Tue, 26 Dec 2023 21:46:15 +0600 Subject: [PATCH 4/8] driver/net/rtl8139: remove debug print debug print delays reset of the driver. Finally I see bunch of "rx error FFFF" errors in the screen. CI can not handle many prints. While network works fine there Reproduced with: make CROSS_COMPILE=sh2-linux- r2dplus_defconfig all qemu-system-sh4 -M r2d -nographic -serial null \ -serial mon:stdio -net user,tftp=`pwd` \ -net nic,model=rtl8139 -kernel ./u-boot.bin Signed-off-by: Maxim Uvarov Reviewed-by: Simon Glass --- drivers/net/rtl8139.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c index 106bc1c7ae..d8f24ec81a 100644 --- a/drivers/net/rtl8139.c +++ b/drivers/net/rtl8139.c @@ -453,7 +453,7 @@ static int rtl8139_recv_common(struct rtl8139_priv *priv, unsigned char *rxdata, RTL_STS_RXBADALIGN)) || (rx_size < ETH_ZLEN) || (rx_size > ETH_FRAME_LEN + 4)) { - printf("rx error %hX\n", rx_status); + debug("rx error %hX\n", rx_status); /* this clears all interrupts still pending */ rtl8139_reset(priv); return 0; From 9c77cffabd7c08411e9e4ae0a4ed1206f9c2e9c5 Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Tue, 26 Dec 2023 21:46:16 +0600 Subject: [PATCH 5/8] mach-socfpga: do not overlap defines with lwip Fix compilation issue with overlapping lwip and march defines. Signed-off-by: Maxim Uvarov Reviewed-by: Simon Glass --- arch/arm/mach-socfpga/include/mach/handoff_soc64.h | 6 ------ arch/arm/mach-socfpga/wrap_handoff_soc64.c | 9 +++++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-socfpga/include/mach/handoff_soc64.h b/arch/arm/mach-socfpga/include/mach/handoff_soc64.h index 902fc6bfb5..9b85e5865b 100644 --- a/arch/arm/mach-socfpga/include/mach/handoff_soc64.h +++ b/arch/arm/mach-socfpga/include/mach/handoff_soc64.h @@ -78,12 +78,6 @@ #ifndef __ASSEMBLY__ #include -enum endianness { - LITTLE_ENDIAN = 0, - BIG_ENDIAN, - UNKNOWN_ENDIANNESS -}; - int socfpga_get_handoff_size(void *handoff_address); int socfpga_handoff_read(void *handoff_address, void *table, u32 table_len); #endif diff --git a/arch/arm/mach-socfpga/wrap_handoff_soc64.c b/arch/arm/mach-socfpga/wrap_handoff_soc64.c index e7cb5ea89c..df0701ec85 100644 --- a/arch/arm/mach-socfpga/wrap_handoff_soc64.c +++ b/arch/arm/mach-socfpga/wrap_handoff_soc64.c @@ -10,6 +10,15 @@ #include #include "log.h" +#ifndef __ASSEMBLY__ +#include +enum endianness { + LITTLE_ENDIAN = 0, + BIG_ENDIAN, + UNKNOWN_ENDIANNESS +}; +#endif + static enum endianness check_endianness(u32 handoff) { switch (handoff) { From 0c6d645d3fd23055d2af1ef9e5e0d838a74cd9d6 Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Tue, 26 Dec 2023 21:46:17 +0600 Subject: [PATCH 6/8] bcm_ns3: use device specific naming for variables Use device specific naming for variables so as to not overlap with common function names. Signed-off-by: Maxim Uvarov Reviewed-by: Tom Rini Reviewed-by: Peter Robinson --- include/configs/bcm_ns3.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/configs/bcm_ns3.h b/include/configs/bcm_ns3.h index 47de4bc201..7c6e0725a6 100644 --- a/include/configs/bcm_ns3.h +++ b/include/configs/bcm_ns3.h @@ -45,11 +45,11 @@ #define PCIE_ARGS "pcie_args=pci=pcie_bus_safe pcie_ports=native vfio_pci.disable_idle_d3=1\0" #ifdef CONFIG_BCM_SF2_ETH -#define ETH_ADDR "ethaddr=00:0A:F7:95:65:A4\0" +#define BCM_ETH_ADDR "ethaddr=00:0A:F7:95:65:A4\0" #define NET_ARGS "bgmac_platform.ethaddr=${ethaddr} " \ "ip=${ipaddr}::${gatewayip}:${netmask}::${ethif}:off" #else -#define ETH_ADDR +#define BMC_ETH_ADDR #define NET_ARGS #endif @@ -749,7 +749,7 @@ OS_LOG_LEVEL \ EXTRA_ARGS \ PCIE_ARGS \ - ETH_ADDR \ + BMC_ETH_ADDR \ RESERVED_MEM \ SETBOOTARGS \ UPDATEME_FLASH_PARAMS \ From 6c84e71258935e1491fd95c9f8151f43b0676fa2 Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Tue, 26 Dec 2023 21:46:18 +0600 Subject: [PATCH 7/8] omap3: use device specific naming for mem_init Use device specific naming for functions so as to not overlap with common function names. Signed-off-by: Maxim Uvarov Reviewed-by: Tom Rini --- arch/arm/include/asm/arch-omap3/mem.h | 2 +- arch/arm/mach-omap2/omap3/board.c | 2 +- arch/arm/mach-omap2/omap3/emif4.c | 4 ++-- arch/arm/mach-omap2/omap3/sdrc.c | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/include/asm/arch-omap3/mem.h b/arch/arm/include/asm/arch-omap3/mem.h index 569779c55e..fce3568eca 100644 --- a/arch/arm/include/asm/arch-omap3/mem.h +++ b/arch/arm/include/asm/arch-omap3/mem.h @@ -475,7 +475,7 @@ enum { #ifndef __ASSEMBLY__ /* Function prototypes */ -void mem_init(void); +void omap3_mem_init(void); u32 is_mem_sdr(void); u32 mem_ok(u32 cs); diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c index 8b70251457..c76a95dd5d 100644 --- a/arch/arm/mach-omap2/omap3/board.c +++ b/arch/arm/mach-omap2/omap3/board.c @@ -216,7 +216,7 @@ void s_init(void) void board_init_f(ulong dummy) { early_system_init(); - mem_init(); + omap3_mem_init(); /* * Save the boot parameters passed from romcode. * We cannot delay the saving further than this, diff --git a/arch/arm/mach-omap2/omap3/emif4.c b/arch/arm/mach-omap2/omap3/emif4.c index 7e5a281922..4fbfb387ab 100644 --- a/arch/arm/mach-omap2/omap3/emif4.c +++ b/arch/arm/mach-omap2/omap3/emif4.c @@ -159,10 +159,10 @@ int dram_init_banksize(void) } /* - * mem_init() - + * omap3_mem_init() - * - Initialize memory subsystem */ -void mem_init(void) +void omap3_mem_init(void) { do_emif4_init(); } diff --git a/arch/arm/mach-omap2/omap3/sdrc.c b/arch/arm/mach-omap2/omap3/sdrc.c index 5d43e7c9cf..4d27d82c78 100644 --- a/arch/arm/mach-omap2/omap3/sdrc.c +++ b/arch/arm/mach-omap2/omap3/sdrc.c @@ -4,7 +4,7 @@ * * This file has been created after exctracting and consolidating * the SDRC related content from mem.c and board.c, also created - * generic init function (mem_init). + * generic init function (omap3_mem_init). * * Copyright (C) 2004-2010 * Texas Instruments Incorporated - https://www.ti.com/ @@ -232,11 +232,11 @@ int dram_init_banksize(void) } /* - * mem_init - + * omap3_mem_init - * - Init the sdrc chip, * - Selects CS0 and CS1, */ -void mem_init(void) +void omap3_mem_init(void) { /* only init up first bank here */ do_sdrc_init(CS0, EARLY_INIT); From d914487f8ffbb466086b3d6259e4b05f73147cf6 Mon Sep 17 00:00:00 2001 From: Maxim Uvarov Date: Tue, 26 Dec 2023 21:46:19 +0600 Subject: [PATCH 8/8] Makefile: add dtbs to clean CI test checks that generated dtb has to be cleaned up. Use the same clean procedure as Linux top level Makefile has. Signed-off-by: Maxim Uvarov Reviewed-by: Tom Rini --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 220411a293..b443831a93 100644 --- a/Makefile +++ b/Makefile @@ -2195,6 +2195,8 @@ clean: $(clean-dirs) @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ -o -name '*.ko.*' -o -name '*.su' -o -name '*.pyc' \ + -o -name '*.dtb' -o -name '*.dtbo' \ + -o -name '*.dtb.S' -o -name '*.dtbo.S' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ -o -name '*.lex.c' -o -name '*.tab.[ch]' \ -o -name '*.asn1.[ch]' \