From 5e7d6d5ba4cc58ff5c6f4b28e423054587606896 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 5 Apr 2021 17:38:19 +0100 Subject: [PATCH] uboot-mediatek: update to v2021.04 Remove patches merged upstream and refresh the remaining ones. Runtime tested on * Bananapi BPi-R64 (eMMC and SD Card) * Linksys E8450 (SPI-NAND) * Ubiquiti UniFi 6 LR (SPI-NOR) Signed-off-by: Daniel Golle --- package/boot/uboot-mediatek/Makefile | 4 +-- ...igs-RPi2-Disable-EFI-Grub-workaround.patch | 21 ------------- ...d-increase-the-minimum-bus-frequency.patch | 4 +-- ...ble-compression-of-u-boot-to-reduce-.patch | 2 +- ...-ignore-max-frequency-from-device-tr.patch | 31 ------------------- ...iatek-fix-missing-dev_err-definition.patch | 19 ------------ .../patches/120-use-xz-instead-of-lzma.patch | 2 +- .../patches/220-cmd-env-readmem.patch | 2 +- .../patches/410-add-linksys-e8450.patch | 2 +- 9 files changed, 8 insertions(+), 79 deletions(-) delete mode 100644 package/boot/uboot-mediatek/patches/000-mtk-02-configs-RPi2-Disable-EFI-Grub-workaround.patch delete mode 100644 package/boot/uboot-mediatek/patches/000-mtk-21-mmc-mtk-sd-don-t-ignore-max-frequency-from-device-tr.patch delete mode 100644 package/boot/uboot-mediatek/patches/010-ahci-mediatek-fix-missing-dev_err-definition.patch diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index 1fb67321ed..c71ed67f58 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2021.04-rc3 -PKG_HASH:=7c418e07f6065c8761eb2df890bb524d7109864325d8850ddb0c93eb345734f9 +PKG_VERSION:=2021.04 +PKG_HASH:=0d438b1bb5cceb57a18ea2de4a0d51f7be5b05b98717df05938636e0aadfe11a PKG_BUILD_DEPENDS:=arm-trusted-firmware-tools/host include $(INCLUDE_DIR)/u-boot.mk diff --git a/package/boot/uboot-mediatek/patches/000-mtk-02-configs-RPi2-Disable-EFI-Grub-workaround.patch b/package/boot/uboot-mediatek/patches/000-mtk-02-configs-RPi2-Disable-EFI-Grub-workaround.patch deleted file mode 100644 index 7b54489832..0000000000 --- a/package/boot/uboot-mediatek/patches/000-mtk-02-configs-RPi2-Disable-EFI-Grub-workaround.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 04815ef5a49a9996acacfcb5e18924569f5e1bf5 Mon Sep 17 00:00:00 2001 -From: Matthias Brugger -Date: Tue, 16 Feb 2021 20:54:08 +0100 -Subject: [PATCH 02/21] configs: RPi2: Disable EFI Grub workaround - -The EFI Grub workaround isn't needed with Grub version 2.04 or higher. -This version was published over a year ago, so disable the workaround -to reduce boot time. - -Signed-off-by: Matthias Brugger ---- - configs/rpi_2_defconfig | 1 + - 1 file changed, 1 insertion(+) - ---- a/configs/rpi_2_defconfig -+++ b/configs/rpi_2_defconfig -@@ -42,3 +42,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y - CONFIG_CONSOLE_SCROLL_LINES=10 - CONFIG_PHYS_TO_BUS=y - CONFIG_OF_LIBFDT_OVERLAY=y -+# CONFIG_EFI_GRUB_ARM32_WORKAROUND is not set diff --git a/package/boot/uboot-mediatek/patches/000-mtk-10-mmc-mtk-sd-increase-the-minimum-bus-frequency.patch b/package/boot/uboot-mediatek/patches/000-mtk-10-mmc-mtk-sd-increase-the-minimum-bus-frequency.patch index 658cbc1232..c568ab99e1 100644 --- a/package/boot/uboot-mediatek/patches/000-mtk-10-mmc-mtk-sd-increase-the-minimum-bus-frequency.patch +++ b/package/boot/uboot-mediatek/patches/000-mtk-10-mmc-mtk-sd-increase-the-minimum-bus-frequency.patch @@ -33,6 +33,6 @@ Signed-off-by: Weijie Gao + if (cfg->f_min < MIN_BUS_CLK) + cfg->f_min = MIN_BUS_CLK; + - cfg->f_max = host->src_clk_freq; + if (cfg->f_max < cfg->f_min || cfg->f_max > host->src_clk_freq) + cfg->f_max = host->src_clk_freq; - cfg->b_max = 1024; diff --git a/package/boot/uboot-mediatek/patches/000-mtk-12-board-mt7629-enable-compression-of-u-boot-to-reduce-.patch b/package/boot/uboot-mediatek/patches/000-mtk-12-board-mt7629-enable-compression-of-u-boot-to-reduce-.patch index 3b5545db15..c0dfad03c4 100644 --- a/package/boot/uboot-mediatek/patches/000-mtk-12-board-mt7629-enable-compression-of-u-boot-to-reduce-.patch +++ b/package/boot/uboot-mediatek/patches/000-mtk-12-board-mt7629-enable-compression-of-u-boot-to-reduce-.patch @@ -17,7 +17,7 @@ Signed-off-by: Weijie Gao --- a/Makefile +++ b/Makefile -@@ -1728,6 +1728,9 @@ u-boot-elf.lds: arch/u-boot-elf.lds prep +@@ -1666,6 +1666,9 @@ u-boot-elf.lds: arch/u-boot-elf.lds prep ifeq ($(CONFIG_SPL),y) spl/u-boot-spl-mtk.bin: spl/u-boot-spl diff --git a/package/boot/uboot-mediatek/patches/000-mtk-21-mmc-mtk-sd-don-t-ignore-max-frequency-from-device-tr.patch b/package/boot/uboot-mediatek/patches/000-mtk-21-mmc-mtk-sd-don-t-ignore-max-frequency-from-device-tr.patch deleted file mode 100644 index 37810f9d74..0000000000 --- a/package/boot/uboot-mediatek/patches/000-mtk-21-mmc-mtk-sd-don-t-ignore-max-frequency-from-device-tr.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 4bdab0ea008113dda4e001ab8d6863945000c1b2 Mon Sep 17 00:00:00 2001 -From: Daniel Golle -Date: Thu, 11 Mar 2021 14:58:26 +0000 -Subject: [PATCH 21/21] mmc: mtk-sd: don't ignore max-frequency from device - tree - -commit e58e68d9 ("mmc: mtk-sd: assign plat->cfg.f_max with a correct value") -wrongly assumed that plat->cfg.f_max is always unset at the time -mscd_drv_probe() is run. This is not true in case max-frequency being -defined in device tree, as it is then already set by mmc_of_parser() -in msdc_of_to_plat(). -Only set plat->cfg.f_max to the default maximum value in case it is -not already set to a sane value. - -Signed-off-by: Daniel Golle ---- - drivers/mmc/mtk-sd.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/drivers/mmc/mtk-sd.c -+++ b/drivers/mmc/mtk-sd.c -@@ -1644,7 +1644,8 @@ static int msdc_drv_probe(struct udevice - if (cfg->f_min < MIN_BUS_CLK) - cfg->f_min = MIN_BUS_CLK; - -- cfg->f_max = host->src_clk_freq; -+ if (cfg->f_max < cfg->f_min || cfg->f_max > host->src_clk_freq) -+ cfg->f_max = host->src_clk_freq; - - cfg->b_max = 1024; - cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34; diff --git a/package/boot/uboot-mediatek/patches/010-ahci-mediatek-fix-missing-dev_err-definition.patch b/package/boot/uboot-mediatek/patches/010-ahci-mediatek-fix-missing-dev_err-definition.patch deleted file mode 100644 index 448bf7b865..0000000000 --- a/package/boot/uboot-mediatek/patches/010-ahci-mediatek-fix-missing-dev_err-definition.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 7089c413216f1c0e374d71187030fe41ae4b3071 Mon Sep 17 00:00:00 2001 -From: Frank Wunderlich -Date: Tue, 3 Nov 2020 19:45:30 +0100 -Subject: [PATCH] ahci: mediatek: fix missing dev_err definition - ---- - drivers/ata/mtk_ahci.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/ata/mtk_ahci.c -+++ b/drivers/ata/mtk_ahci.c -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - - #define SYS_CFG 0x14 - #define SYS_CFG_SATA_MSK GENMASK(31, 30) diff --git a/package/boot/uboot-mediatek/patches/120-use-xz-instead-of-lzma.patch b/package/boot/uboot-mediatek/patches/120-use-xz-instead-of-lzma.patch index d33b0b93a0..4dfe506267 100644 --- a/package/boot/uboot-mediatek/patches/120-use-xz-instead-of-lzma.patch +++ b/package/boot/uboot-mediatek/patches/120-use-xz-instead-of-lzma.patch @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -1008,7 +1008,7 @@ quiet_cmd_pad_cat = CAT $@ +@@ -1004,7 +1004,7 @@ quiet_cmd_pad_cat = CAT $@ cmd_pad_cat = $(cmd_objcopy) && $(append) || { rm -f $@; false; } quiet_cmd_lzma = LZMA $@ diff --git a/package/boot/uboot-mediatek/patches/220-cmd-env-readmem.patch b/package/boot/uboot-mediatek/patches/220-cmd-env-readmem.patch index 705b749e71..00143ccaea 100644 --- a/package/boot/uboot-mediatek/patches/220-cmd-env-readmem.patch +++ b/package/boot/uboot-mediatek/patches/220-cmd-env-readmem.patch @@ -1,6 +1,6 @@ --- a/cmd/Kconfig +++ b/cmd/Kconfig -@@ -465,6 +465,12 @@ config CMD_ENV_EXISTS +@@ -472,6 +472,12 @@ config CMD_ENV_EXISTS Check if a variable is defined in the environment for use in shell scripting. diff --git a/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch b/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch index 9fe83725b3..a6eb40f1d2 100644 --- a/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch +++ b/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch @@ -334,7 +334,7 @@ +}; --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -996,6 +996,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ +@@ -1007,6 +1007,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt7622-rfb.dtb \ mt7623a-unielec-u7623-02-emmc.dtb \ mt7622-bananapi-bpi-r64.dtb \ -- 2.30.2