From 244bbd039bc085046f2856f28a7632024379ad2e Mon Sep 17 00:00:00 2001 From: Leonard Anderweit Date: Tue, 9 Jul 2024 22:13:02 +0200 Subject: [PATCH] recipes-bsp: u-boot-starfive_v2021.10: Remove compatibility with visionfive2 The recipe is now only compatible with Star64 so simplify it accordingly. Signed-off-by: Leonard Anderweit --- ...nclude-dm-lists.h-for-device_bind_dr.patch | 32 ------------- ...l8169-Fix-compile-warning-in-rtl8169.patch | 43 ----------------- ...mi-Fix-compiler-warnings-with-gcc-14.patch | 47 ------------------- .../u-boot/u-boot-starfive_v2021.10.bb | 40 +++------------- 4 files changed, 7 insertions(+), 155 deletions(-) delete mode 100644 recipes-bsp/u-boot/u-boot-starfive/0001-cdns3-starfive-Include-dm-lists.h-for-device_bind_dr.patch delete mode 100644 recipes-bsp/u-boot/u-boot-starfive/0002-net-rtl8169-Fix-compile-warning-in-rtl8169.patch delete mode 100644 recipes-bsp/u-boot/u-boot-starfive/0003-video-dw_hdmi-Fix-compiler-warnings-with-gcc-14.patch diff --git a/recipes-bsp/u-boot/u-boot-starfive/0001-cdns3-starfive-Include-dm-lists.h-for-device_bind_dr.patch b/recipes-bsp/u-boot/u-boot-starfive/0001-cdns3-starfive-Include-dm-lists.h-for-device_bind_dr.patch deleted file mode 100644 index aeec87b5..00000000 --- a/recipes-bsp/u-boot/u-boot-starfive/0001-cdns3-starfive-Include-dm-lists.h-for-device_bind_dr.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e81212b6d6ea04bad3eeea9be048d54ee7e0073d Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 27 Jan 2024 14:20:27 -0800 -Subject: [PATCH 1/3] cdns3-starfive: Include dm/lists.h for - device_bind_driver_to_node definition - -GCC-14 will treat implicit function declarations as errors. Therefore -include the required header to fix - -error: implicit declaration of function 'device_bind_driver_to_node' [-Wimplicit-function-declaration] - -Upstream-Status: Submitted [https://github.com/starfive-tech/u-boot/pull/56] -Signed-off-by: Khem Raj ---- - drivers/usb/cdns3/cdns3-starfive.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/usb/cdns3/cdns3-starfive.c b/drivers/usb/cdns3/cdns3-starfive.c -index 631fae21cd..9a48ee6a04 100644 ---- a/drivers/usb/cdns3/cdns3-starfive.c -+++ b/drivers/usb/cdns3/cdns3-starfive.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include - #include - #include --- -2.43.0 - diff --git a/recipes-bsp/u-boot/u-boot-starfive/0002-net-rtl8169-Fix-compile-warning-in-rtl8169.patch b/recipes-bsp/u-boot/u-boot-starfive/0002-net-rtl8169-Fix-compile-warning-in-rtl8169.patch deleted file mode 100644 index 8a066edc..00000000 --- a/recipes-bsp/u-boot/u-boot-starfive/0002-net-rtl8169-Fix-compile-warning-in-rtl8169.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 05b2d90eec08e5d47acd3e807d875b42978ac41a Mon Sep 17 00:00:00 2001 -From: Minda Chen -Date: Thu, 20 Jul 2023 19:37:26 +0800 -Subject: [PATCH 2/3] net: rtl8169: Fix compile warning in rtl8169 - -While compiling rtl8169.c, There are many "make pointer from -integer without a cast" compile warnings. fix them with -adding cast. - -Upstream-Status: Backport [https://github.com/u-boot/u-boot/commit/a6a0d6a19121c722a263714eae4d511bb2580f3c] -Signed-off-by: Minda Chen -Reviewed-by: Ramon Fried -Reviewed-by: Leo Yu-Chi Liang ---- - drivers/net/rtl8169.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c -index 3896760b5f..d94bf81c7b 100644 ---- a/drivers/net/rtl8169.c -+++ b/drivers/net/rtl8169.c -@@ -99,12 +99,12 @@ static int media[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 }; - #define TX_TIMEOUT (6*HZ) - - /* write/read MMIO register. Notice: {read,write}[wl] do the necessary swapping */ --#define RTL_W8(reg, val8) writeb((val8), ioaddr + (reg)) --#define RTL_W16(reg, val16) writew((val16), ioaddr + (reg)) --#define RTL_W32(reg, val32) writel((val32), ioaddr + (reg)) --#define RTL_R8(reg) readb(ioaddr + (reg)) --#define RTL_R16(reg) readw(ioaddr + (reg)) --#define RTL_R32(reg) readl(ioaddr + (reg)) -+#define RTL_W8(reg, val8) writeb((val8), (void *)(ioaddr + (reg))) -+#define RTL_W16(reg, val16) writew((val16), (void *)(ioaddr + (reg))) -+#define RTL_W32(reg, val32) writel((val32), (void *)(ioaddr + (reg))) -+#define RTL_R8(reg) readb((void *)(ioaddr + (reg))) -+#define RTL_R16(reg) readw((void *)(ioaddr + (reg))) -+#define RTL_R32(reg) readl((void *)(ioaddr + (reg))) - - #define bus_to_phys(a) pci_mem_to_phys((pci_dev_t)(unsigned long)dev->priv, \ - (pci_addr_t)(unsigned long)a) --- -2.43.0 - diff --git a/recipes-bsp/u-boot/u-boot-starfive/0003-video-dw_hdmi-Fix-compiler-warnings-with-gcc-14.patch b/recipes-bsp/u-boot/u-boot-starfive/0003-video-dw_hdmi-Fix-compiler-warnings-with-gcc-14.patch deleted file mode 100644 index 92667236..00000000 --- a/recipes-bsp/u-boot/u-boot-starfive/0003-video-dw_hdmi-Fix-compiler-warnings-with-gcc-14.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 912b7473b8b6e533f4fbaa1a7584c5e69be1e231 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 27 Jan 2024 14:48:15 -0800 -Subject: [PATCH 3/3] video: dw_hdmi: Fix compiler warnings with gcc-14 - -GCC-14 find more warnings like -"make pointer from integer without a cast" -fix them by adding a type cast. - -Upstream-Status: Submitted [https://github.com/starfive-tech/u-boot/pull/56] -Signed-off-by: Khem Raj ---- - drivers/video/dw_hdmi.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/video/dw_hdmi.c b/drivers/video/dw_hdmi.c -index c4fbb18294..9294d9a82a 100644 ---- a/drivers/video/dw_hdmi.c -+++ b/drivers/video/dw_hdmi.c -@@ -78,10 +78,10 @@ static void dw_hdmi_write(struct dw_hdmi *hdmi, u8 val, int offset) - { - switch (hdmi->reg_io_width) { - case 1: -- writeb(val, hdmi->ioaddr + offset); -+ writeb(val, (void *)(hdmi->ioaddr + offset)); - break; - case 4: -- writel(val, hdmi->ioaddr + (offset << 2)); -+ writel(val, (void *)(hdmi->ioaddr + (offset << 2))); - break; - default: - debug("reg_io_width has unsupported width!\n"); -@@ -93,9 +93,9 @@ static u8 dw_hdmi_read(struct dw_hdmi *hdmi, int offset) - { - switch (hdmi->reg_io_width) { - case 1: -- return readb(hdmi->ioaddr + offset); -+ return readb((void *)(hdmi->ioaddr + offset)); - case 4: -- return readl(hdmi->ioaddr + (offset << 2)); -+ return readl((void *)(hdmi->ioaddr + (offset << 2))); - default: - debug("reg_io_width has unsupported width!\n"); - break; --- -2.43.0 - diff --git a/recipes-bsp/u-boot/u-boot-starfive_v2021.10.bb b/recipes-bsp/u-boot/u-boot-starfive_v2021.10.bb index 38c63140..22f8e0cb 100644 --- a/recipes-bsp/u-boot/u-boot-starfive_v2021.10.bb +++ b/recipes-bsp/u-boot/u-boot-starfive_v2021.10.bb @@ -7,37 +7,18 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=5a7450c57ffe5ae63fd732446b988025" FILESEXTRAPATHS:prepend := "${THISDIR}/files:" -BRANCH:visionfive2 = "JH7110_VisionFive2_devel" -BRANCH:star64 = "Star64" +BRANCH = "Star64" -SRC_URI = "git://github.com/starfive-tech/u-boot.git;protocol=https;nobranch=1 \ - file://0001-cdns3-starfive-Include-dm-lists.h-for-device_bind_dr.patch \ - file://0002-net-rtl8169-Fix-compile-warning-in-rtl8169.patch \ - file://0003-video-dw_hdmi-Fix-compiler-warnings-with-gcc-14.patch \ +SRC_URI = "git://github.com/Fishwaldo/u-boot.git;protocol=https;branch=${BRANCH} \ file://tftp-mmc-boot.txt \ + file://uEnv-star64.txt \ " -SRC_URI:star64 = "git://github.com/Fishwaldo/u-boot.git;protocol=https;branch=${BRANCH} \ - file://tftp-mmc-boot.txt \ - " - -SRC_URI:append:visionfive2 = " \ - file://uEnv-visionfive2.txt \ -" - -SRC_URI:append:star64 = " \ - file://uEnv-star64.txt \ -" - - -# tag JH7110_VF2_6.1_v5.11.3 -SRCREV:visionfive2 = "223ac8b1e907924d3891b3be1b2f6620b56bff31" -SRCREV:star64 = "c71fa7376f4eaf29e2dc20e5a68418d79201290a" - +SRCREV = "c71fa7376f4eaf29e2dc20e5a68418d79201290a" DEPENDS:append = " u-boot-tools-native" -DEPENDS:append:jh7110 = " jh7110-spl-tool-native" +DEPENDS:append = " jh7110-spl-tool-native" # Overwrite this for your server TFTP_SERVER_IP ?= "127.0.0.1" @@ -48,14 +29,7 @@ do_configure:prepend() { -d ${UNPACKDIR}/tftp-mmc-boot.txt ${B}/${UBOOT_ENV_BINARY} } -do_deploy:append:visionfive2() { - install -m 644 ${UNPACKDIR}/uEnv-visionfive2.txt ${DEPLOYDIR}/vf2_uEnv.txt - spl_tool -c -f ${DEPLOYDIR}/${SPL_IMAGE} - ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_BINARYNAME}.normal.out - ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_SYMLINK}.normal.out -} - -do_deploy:append:star64() { +do_deploy:append() { install -m 644 ${UNPACKDIR}/uEnv-star64.txt ${DEPLOYDIR}/vf2_uEnv.txt spl_tool -c -f ${DEPLOYDIR}/${SPL_IMAGE} ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_BINARYNAME}.normal.out @@ -63,7 +37,7 @@ do_deploy:append:star64() { } -COMPATIBLE_MACHINE = "jh7110" +COMPATIBLE_MACHINE = "star64" TOOLCHAIN = "gcc"