BUILD_TARGET:=ramips
BUILD_SUBTARGET:=mt7620
UBOOT_IMAGE:=u-boot-with-spl.bin
- DEPENDS:=@BROKEN
endef
define U-Boot/mt7620_mt7530_rfb
BUILD_TARGET:=ramips
BUILD_SUBTARGET:=mt7620
UBOOT_IMAGE:=u-boot-with-spl.bin
- DEPENDS:=@BROKEN
endef
define U-Boot/mt7621_rfb
BUILD_TARGET:=ramips
BUILD_SUBTARGET:=mt7621
UBOOT_IMAGE:=u-boot-mt7621.bin
- DEPENDS:=@BROKEN
endef
define U-Boot/mt7621_nand_rfb
BUILD_TARGET:=ramips
BUILD_SUBTARGET:=mt7621
UBOOT_IMAGE:=u-boot-mt7621.bin
- DEPENDS:=@BROKEN
endef
define U-Boot/mt7622_rfb1
1 file changed, 142 insertions(+)
create mode 100644 arch/mips/include/asm/mipsmtregs.h
-diff --git a/arch/mips/include/asm/mipsmtregs.h b/arch/mips/include/asm/mipsmtregs.h
-new file mode 100644
-index 0000000000..ba82e2bd97
--- /dev/null
+++ b/arch/mips/include/asm/mipsmtregs.h
@@ -0,0 +1,142 @@
+#define TCHALT_H (_ULCAST_(1))
+
+#endif
---
-2.36.1
-
arch/mips/include/asm/cm.h | 67 ++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
-diff --git a/arch/mips/include/asm/cm.h b/arch/mips/include/asm/cm.h
-index 99ddbccd80..5cc8c09621 100644
--- a/arch/mips/include/asm/cm.h
+++ b/arch/mips/include/asm/cm.h
@@ -8,9 +8,23 @@
#ifndef __ASSEMBLY__
#include <asm/io.h>
---
-2.36.1
-
arch/mips/cpu/u-boot-spl.lds | 3 +++
1 file changed, 3 insertions(+)
-diff --git a/arch/mips/cpu/u-boot-spl.lds b/arch/mips/cpu/u-boot-spl.lds
-index 28ea4f2a48..f88754ab56 100644
--- a/arch/mips/cpu/u-boot-spl.lds
+++ b/arch/mips/cpu/u-boot-spl.lds
@@ -13,7 +13,9 @@ SECTIONS
_image_binary_end = .;
---
-2.36.1
-
arch/mips/lib/cache.c | 43 ++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+)
-diff --git a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h
-index 79e638844b..89a2ac209f 100644
--- a/arch/mips/include/asm/system.h
+++ b/arch/mips/include/asm/system.h
-@@ -282,4 +282,24 @@ static inline void instruction_hazard_barrier(void)
+@@ -282,4 +282,24 @@ static inline void instruction_hazard_ba
: "=&r"(tmp));
}
+#endif /* CONFIG_SYS_NONCACHED_MEMORY */
+
#endif /* _ASM_SYSTEM_H */
-diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c
-index ec652f0fba..d23b38d6b9 100644
--- a/arch/mips/lib/cache.c
+++ b/arch/mips/lib/cache.c
@@ -6,6 +6,7 @@
+ return CKSEG1ADDR(next);
+}
+#endif /* CONFIG_SYS_NONCACHED_MEMORY */
---
-2.36.1
-
create mode 100644 arch/mips/mach-mtmips/mt7621/tpl/tpl.c
create mode 100644 include/configs/mt7621.h
-diff --git a/arch/mips/dts/mt7621-u-boot.dtsi b/arch/mips/dts/mt7621-u-boot.dtsi
-new file mode 100644
-index 0000000000..c5a8aa357f
--- /dev/null
+++ b/arch/mips/dts/mt7621-u-boot.dtsi
@@ -0,0 +1,111 @@
+ };
+ };
+};
-diff --git a/arch/mips/dts/mt7621.dtsi b/arch/mips/dts/mt7621.dtsi
-new file mode 100644
-index 0000000000..c32b6095e9
--- /dev/null
+++ b/arch/mips/dts/mt7621.dtsi
@@ -0,0 +1,349 @@
+ #size-cells = <0>;
+ };
+};
-diff --git a/arch/mips/mach-mtmips/Kconfig b/arch/mips/mach-mtmips/Kconfig
-index 151b004603..d46be503a2 100644
--- a/arch/mips/mach-mtmips/Kconfig
+++ b/arch/mips/mach-mtmips/Kconfig
@@ -9,6 +9,7 @@ config SYS_MALLOC_F_LEN
source "arch/mips/mach-mtmips/mt7628/Kconfig"
endmenu
-diff --git a/arch/mips/mach-mtmips/Makefile b/arch/mips/mach-mtmips/Makefile
-index 4909b47ef2..19f1e07033 100644
--- a/arch/mips/mach-mtmips/Makefile
+++ b/arch/mips/mach-mtmips/Makefile
@@ -1,9 +1,13 @@
obj-$(CONFIG_SOC_MT7620) += mt7620/
+obj-$(CONFIG_SOC_MT7621) += mt7621/
obj-$(CONFIG_SOC_MT7628) += mt7628/
-diff --git a/arch/mips/mach-mtmips/cpu.c b/arch/mips/mach-mtmips/cpu.c
-index a4b5cff61d..f1e9022738 100644
--- a/arch/mips/mach-mtmips/cpu.c
+++ b/arch/mips/mach-mtmips/cpu.c
@@ -16,7 +16,7 @@ DECLARE_GLOBAL_DATA_PTR;
return 0;
}
-diff --git a/arch/mips/mach-mtmips/mt7621/Kconfig b/arch/mips/mach-mtmips/mt7621/Kconfig
-new file mode 100644
-index 0000000000..37d512c68f
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/Kconfig
@@ -0,0 +1,95 @@
+ default "mediatek" if BOARD_MT7621_RFB || BOARD_MT7621_NAND_RFB
+
+endif
-diff --git a/arch/mips/mach-mtmips/mt7621/Makefile b/arch/mips/mach-mtmips/mt7621/Makefile
-new file mode 100644
-index 0000000000..bf1b0bb688
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/Makefile
@@ -0,0 +1,14 @@
+
+obj-y += sram_init.o
+endif
-diff --git a/arch/mips/mach-mtmips/mt7621/init.c b/arch/mips/mach-mtmips/mt7621/init.c
-new file mode 100644
-index 0000000000..d21848ad23
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/init.c
@@ -0,0 +1,246 @@
+ while (1)
+ writel(SYS_RST, sysc + SYSCTL_RSTCTL_REG);
+}
-diff --git a/arch/mips/mach-mtmips/mt7621/mt7621.h b/arch/mips/mach-mtmips/mt7621/mt7621.h
-new file mode 100644
-index 0000000000..916cc993b4
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/mt7621.h
@@ -0,0 +1,229 @@
+#endif
+
+#endif /* _MT7621_H_ */
-diff --git a/arch/mips/mach-mtmips/mt7621/serial.c b/arch/mips/mach-mtmips/mt7621/serial.c
-new file mode 100644
-index 0000000000..0ccc71dc75
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/serial.c
@@ -0,0 +1,23 @@
+ clrbits_32(base + SYSCTL_GPIOMODE_REG, UART3_MODE_M);
+#endif
+}
-diff --git a/arch/mips/mach-mtmips/mt7621/spl/Makefile b/arch/mips/mach-mtmips/mt7621/spl/Makefile
-new file mode 100644
-index 0000000000..ebe54e79b9
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/Makefile
@@ -0,0 +1,9 @@
+obj-y += serial.o
+obj-y += launch.o
+obj-y += launch_ll.o
-diff --git a/arch/mips/mach-mtmips/mt7621/spl/cps.c b/arch/mips/mach-mtmips/mt7621/spl/cps.c
-new file mode 100644
-index 0000000000..779e646c12
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/cps.c
@@ -0,0 +1,153 @@
+ gic_init();
+ cm_init(cm_base);
+}
-diff --git a/arch/mips/mach-mtmips/mt7621/spl/dram.c b/arch/mips/mach-mtmips/mt7621/spl/dram.c
-new file mode 100644
-index 0000000000..100adfb93a
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/dram.c
@@ -0,0 +1,153 @@
+ new_stage_bin->ddr_pll_cfg = DDR_FREQ_PARAM;
+ new_stage_bin->baudrate = CONFIG_BAUDRATE;
+}
-diff --git a/arch/mips/mach-mtmips/mt7621/spl/dram.h b/arch/mips/mach-mtmips/mt7621/spl/dram.h
-new file mode 100644
-index 0000000000..7322c58276
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/dram.h
@@ -0,0 +1,39 @@
+#endif
+
+#endif /* _MT7621_DRAM_H_ */
-diff --git a/arch/mips/mach-mtmips/mt7621/spl/launch.c b/arch/mips/mach-mtmips/mt7621/spl/launch.c
-new file mode 100644
-index 0000000000..37c20a5f56
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/launch.c
@@ -0,0 +1,100 @@
+ break;
+ }
+}
-diff --git a/arch/mips/mach-mtmips/mt7621/spl/launch.h b/arch/mips/mach-mtmips/mt7621/spl/launch.h
-new file mode 100644
-index 0000000000..f34250d605
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/launch.h
@@ -0,0 +1,52 @@
+#define LAUNCHPERIOD 10000
+
+#endif /* _LAUNCH_H_ */
-diff --git a/arch/mips/mach-mtmips/mt7621/spl/launch_ll.S b/arch/mips/mach-mtmips/mt7621/spl/launch_ll.S
-new file mode 100644
-index 0000000000..32d28c7539
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/launch_ll.S
@@ -0,0 +1,339 @@
+_vpe1_init_done:
+ jr ra
+ END(boot_vpe1)
-diff --git a/arch/mips/mach-mtmips/mt7621/spl/serial.c b/arch/mips/mach-mtmips/mt7621/spl/serial.c
-new file mode 100644
-index 0000000000..5cf093a078
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/serial.c
@@ -0,0 +1,24 @@
+#endif /* CONFIG_CONS_INDEX */
+#endif /* CONFIG_SPL_SERIAL */
+}
-diff --git a/arch/mips/mach-mtmips/mt7621/spl/spl.c b/arch/mips/mach-mtmips/mt7621/spl/spl.c
-new file mode 100644
-index 0000000000..71d01aa7f5
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/spl.c
@@ -0,0 +1,95 @@
+
+ return addr;
+}
-diff --git a/arch/mips/mach-mtmips/mt7621/spl/start.S b/arch/mips/mach-mtmips/mt7621/spl/start.S
-new file mode 100644
-index 0000000000..3cad3567e7
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/start.S
@@ -0,0 +1,226 @@
+ move ra, zero
+
+ END(_start)
-diff --git a/arch/mips/mach-mtmips/mt7621/sram_init.S b/arch/mips/mach-mtmips/mt7621/sram_init.S
-new file mode 100644
-index 0000000000..03b9eab10b
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/sram_init.S
@@ -0,0 +1,22 @@
+
+ jr ra
+ END(mips_sram_init)
-diff --git a/arch/mips/mach-mtmips/mt7621/tpl/Makefile b/arch/mips/mach-mtmips/mt7621/tpl/Makefile
-new file mode 100644
-index 0000000000..471ad74249
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/tpl/Makefile
@@ -0,0 +1,4 @@
+extra-y += start.o
+
+obj-y += tpl.o
-diff --git a/arch/mips/mach-mtmips/mt7621/tpl/start.S b/arch/mips/mach-mtmips/mt7621/tpl/start.S
-new file mode 100644
-index 0000000000..19b09f7251
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/tpl/start.S
@@ -0,0 +1,161 @@
+ nop
+
+ END(_start)
-diff --git a/arch/mips/mach-mtmips/mt7621/tpl/tpl.c b/arch/mips/mach-mtmips/mt7621/tpl/tpl.c
-new file mode 100644
-index 0000000000..2a828907a3
--- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/tpl/tpl.c
@@ -0,0 +1,144 @@
+ for (;;)
+ ;
+}
-diff --git a/include/configs/mt7621.h b/include/configs/mt7621.h
-new file mode 100644
-index 0000000000..dac6aa4afb
--- /dev/null
+++ b/include/configs/mt7621.h
@@ -0,0 +1,65 @@
+#define CONFIG_SYS_UBOOT_BASE 0
+
+#endif /* __CONFIG_MT7621_H */
---
-2.36.1
-
create mode 100644 configs/mt7621_nand_rfb_defconfig
create mode 100644 configs/mt7621_rfb_defconfig
-diff --git a/arch/mips/dts/Makefile b/arch/mips/dts/Makefile
-index 95144b24dc..1b179116c9 100644
--- a/arch/mips/dts/Makefile
+++ b/arch/mips/dts/Makefile
-@@ -16,6 +16,8 @@ dtb-$(CONFIG_BOARD_COMTREND_WAP5813N) += comtrend,wap-5813n.dtb
+@@ -16,6 +16,8 @@ dtb-$(CONFIG_BOARD_COMTREND_WAP5813N) +=
dtb-$(CONFIG_BOARD_HUAWEI_HG556A) += huawei,hg556a.dtb
dtb-$(CONFIG_BOARD_MT7620_RFB) += mediatek,mt7620-rfb.dtb
dtb-$(CONFIG_BOARD_MT7620_MT7530_RFB) += mediatek,mt7620-mt7530-rfb.dtb
dtb-$(CONFIG_BOARD_MT7628_RFB) += mediatek,mt7628-rfb.dtb
dtb-$(CONFIG_BOARD_GARDENA_SMART_GATEWAY_MT7688) += gardena-smart-gateway-mt7688.dtb
dtb-$(CONFIG_BOARD_LINKIT_SMART_7688) += linkit-smart-7688.dtb
-diff --git a/arch/mips/dts/mediatek,mt7621-nand-rfb.dts b/arch/mips/dts/mediatek,mt7621-nand-rfb.dts
-new file mode 100644
-index 0000000000..67ba298b0a
--- /dev/null
+++ b/arch/mips/dts/mediatek,mt7621-nand-rfb.dts
@@ -0,0 +1,67 @@
+&u3phy {
+ status = "okay";
+};
-diff --git a/arch/mips/dts/mediatek,mt7621-rfb.dts b/arch/mips/dts/mediatek,mt7621-rfb.dts
-new file mode 100644
-index 0000000000..ff7eaf0f20
--- /dev/null
+++ b/arch/mips/dts/mediatek,mt7621-rfb.dts
@@ -0,0 +1,82 @@
+&u3phy {
+ status = "okay";
+};
-diff --git a/arch/mips/mach-mtmips/mt7621/Kconfig b/arch/mips/mach-mtmips/mt7621/Kconfig
-index 37d512c68f..008a28f991 100644
--- a/arch/mips/mach-mtmips/mt7621/Kconfig
+++ b/arch/mips/mach-mtmips/mt7621/Kconfig
@@ -79,6 +79,26 @@ config MT7621_BOOT_FROM_NAND
endchoice
config SYS_CONFIG_NAME
-diff --git a/board/mediatek/mt7621/MAINTAINERS b/board/mediatek/mt7621/MAINTAINERS
-new file mode 100644
-index 0000000000..f83141cea1
--- /dev/null
+++ b/board/mediatek/mt7621/MAINTAINERS
@@ -0,0 +1,8 @@
+F: configs/mt7621_nand_rfb_defconfig
+F: arch/mips/dts/mediatek,mt7621-rfb.dts
+F: arch/mips/dts/mediatek,mt7621-nand-rfb.dts
-diff --git a/board/mediatek/mt7621/Makefile b/board/mediatek/mt7621/Makefile
-new file mode 100644
-index 0000000000..db129c5aba
--- /dev/null
+++ b/board/mediatek/mt7621/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+
+obj-y += board.o
-diff --git a/board/mediatek/mt7621/board.c b/board/mediatek/mt7621/board.c
-new file mode 100644
-index 0000000000..0496f3f806
--- /dev/null
+++ b/board/mediatek/mt7621/board.c
@@ -0,0 +1,6 @@
+ *
+ * Author: Weijie Gao <weijie.gao@mediatek.com>
+ */
-diff --git a/configs/mt7621_nand_rfb_defconfig b/configs/mt7621_nand_rfb_defconfig
-new file mode 100644
-index 0000000000..fe8543df49
--- /dev/null
+++ b/configs/mt7621_nand_rfb_defconfig
@@ -0,0 +1,85 @@
+CONFIG_LZMA=y
+# CONFIG_GZIP is not set
+CONFIG_SPL_LZMA=y
-diff --git a/configs/mt7621_rfb_defconfig b/configs/mt7621_rfb_defconfig
-new file mode 100644
-index 0000000000..ae62360e63
--- /dev/null
+++ b/configs/mt7621_rfb_defconfig
@@ -0,0 +1,82 @@
+CONFIG_LZMA=y
+# CONFIG_GZIP is not set
+CONFIG_SPL_LZMA=y
---
-2.36.1
-
create mode 100644 doc/board/mediatek/index.rst
create mode 100644 doc/board/mediatek/mt7621.rst
-diff --git a/doc/board/index.rst b/doc/board/index.rst
-index f90a9cad45..01b99f9cf5 100644
--- a/doc/board/index.rst
+++ b/doc/board/index.rst
@@ -23,6 +23,7 @@ Board-specific doc
microchip/index
nokia/index
nxp/index
-diff --git a/doc/board/mediatek/index.rst b/doc/board/mediatek/index.rst
-new file mode 100644
-index 0000000000..38cd8cb5b2
--- /dev/null
+++ b/doc/board/mediatek/index.rst
@@ -0,0 +1,9 @@
+ :maxdepth: 2
+
+ mt7621
-diff --git a/doc/board/mediatek/mt7621.rst b/doc/board/mediatek/mt7621.rst
-new file mode 100644
-index 0000000000..1662255546
--- /dev/null
+++ b/doc/board/mediatek/mt7621.rst
@@ -0,0 +1,48 @@
+ $ make O=build
+
+Burn the u-boot-mt7621.bin to the SPI-NOR or NAND flash.
---
-2.36.1
-
create mode 100644 drivers/clk/mtmips/clk-mt7621.c
create mode 100644 include/dt-bindings/clock/mt7621-clk.h
-diff --git a/drivers/clk/mtmips/Makefile b/drivers/clk/mtmips/Makefile
-index 732e7f2545..ee8b5afe87 100644
--- a/drivers/clk/mtmips/Makefile
+++ b/drivers/clk/mtmips/Makefile
@@ -1,4 +1,5 @@
obj-$(CONFIG_SOC_MT7620) += clk-mt7620.o
+obj-$(CONFIG_SOC_MT7621) += clk-mt7621.o
obj-$(CONFIG_SOC_MT7628) += clk-mt7628.o
-diff --git a/drivers/clk/mtmips/clk-mt7621.c b/drivers/clk/mtmips/clk-mt7621.c
-new file mode 100644
-index 0000000000..03363b70d7
--- /dev/null
+++ b/drivers/clk/mtmips/clk-mt7621.c
@@ -0,0 +1,288 @@
+ .priv_auto = sizeof(struct mt7621_clk_priv),
+ .ops = &mt7621_clk_ops,
+};
-diff --git a/include/dt-bindings/clock/mt7621-clk.h b/include/dt-bindings/clock/mt7621-clk.h
-new file mode 100644
-index 0000000000..978c67951b
--- /dev/null
+++ b/include/dt-bindings/clock/mt7621-clk.h
@@ -0,0 +1,46 @@
+#define MT7621_CLK_DDR 29
+
+#endif /* _DT_BINDINGS_MT7621_CLK_H_ */
---
-2.36.1
-
1 file changed, 38 insertions(+)
create mode 100644 include/dt-bindings/reset/mt7621-reset.h
-diff --git a/include/dt-bindings/reset/mt7621-reset.h b/include/dt-bindings/reset/mt7621-reset.h
-new file mode 100644
-index 0000000000..8e4341f040
--- /dev/null
+++ b/include/dt-bindings/reset/mt7621-reset.h
@@ -0,0 +1,38 @@
+#define RST_SYS 0
+
+#endif /* _DT_BINDINGS_MT7621_RESET_H_ */
---
-2.36.1
-
5 files changed, 330 insertions(+), 2 deletions(-)
create mode 100644 drivers/pinctrl/mtmips/pinctrl-mt7621.c
-diff --git a/drivers/pinctrl/mtmips/Kconfig b/drivers/pinctrl/mtmips/Kconfig
-index 844d5b743f..456f3ea25d 100644
--- a/drivers/pinctrl/mtmips/Kconfig
+++ b/drivers/pinctrl/mtmips/Kconfig
@@ -12,6 +12,15 @@ config PINCTRL_MT7620
config PINCTRL_MT7628
bool "MediaTek MT7628 pin control driver"
select PINCTRL_MTMIPS
-diff --git a/drivers/pinctrl/mtmips/Makefile b/drivers/pinctrl/mtmips/Makefile
-index ba945a89a7..8fece4f5fa 100644
--- a/drivers/pinctrl/mtmips/Makefile
+++ b/drivers/pinctrl/mtmips/Makefile
-@@ -5,4 +5,5 @@ obj-$(CONFIG_PINCTRL_MTMIPS) += pinctrl-mtmips-common.o
+@@ -5,4 +5,5 @@ obj-$(CONFIG_PINCTRL_MTMIPS) += pinctrl-
# SoC Drivers
obj-$(CONFIG_PINCTRL_MT7620) += pinctrl-mt7620.o
+obj-$(CONFIG_PINCTRL_MT7621) += pinctrl-mt7621.o
obj-$(CONFIG_PINCTRL_MT7628) += pinctrl-mt7628.o
-diff --git a/drivers/pinctrl/mtmips/pinctrl-mt7621.c b/drivers/pinctrl/mtmips/pinctrl-mt7621.c
-new file mode 100644
-index 0000000000..3e98a01bad
--- /dev/null
+++ b/drivers/pinctrl/mtmips/pinctrl-mt7621.c
@@ -0,0 +1,306 @@
+ .probe = mt7621_pinctrl_probe,
+ .priv_auto = sizeof(struct mt7621_pinctrl_priv),
+};
-diff --git a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
-index e361916eb2..869b781068 100644
--- a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
+++ b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
@@ -13,8 +13,8 @@
{
u32 val;
-diff --git a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h
-index b51d8f009c..1f1023ef42 100644
--- a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h
+++ b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h
@@ -22,6 +22,10 @@ struct mtmips_pmx_group {
int mtmips_get_functions_count(struct udevice *dev);
const char *mtmips_get_function_name(struct udevice *dev,
unsigned int selector);
---
-2.36.1
-
drivers/usb/host/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
-index 8f77412cc7..8f7bfe1602 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -34,7 +34,7 @@ config USB_XHCI_DWC3_OF_SIMPLE
help
Enables support for the on-chip xHCI controller on MediaTek SoCs.
---
-2.36.1
-
drivers/phy/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
-index c01d9e09b9..1708d4f533 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -266,7 +266,7 @@ config MT76X8_USB_PHY
help
MediaTek T-PHY driver supports usb2.0, usb3.0 ports, PCIe and
SATA, and meanwhile supports two version T-PHY which have
---
-2.36.1
-
drivers/spi/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
-index a1e515cb2b..2923ed8db3 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -240,7 +240,7 @@ config MT7620_SPI
help
Enable the MT7621 SPI driver. This driver can be used to access
the SPI NOR flash on platforms embedding this Ralink / MediaTek
---
-2.36.1
-
drivers/gpio/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
-index d7f37f0471..8f7e630098 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -553,7 +553,7 @@ config MT7620_GPIO
default y
help
Say yes here to support MediaTek MT7621 compatible GPIOs.
---
-2.36.1
-
drivers/watchdog/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
-index c3eb8a8aec..dfb02aa468 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -191,7 +191,7 @@ config WDT_MT7620
help
Select this to enable Ralink / Mediatek watchdog timer,
which can be found on some MediaTek chips.
---
-2.36.1
-
drivers/mmc/mtk-sd.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
-diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c
-index 97182ffd7f..e61e8cf4b9 100644
--- a/drivers/mmc/mtk-sd.c
+++ b/drivers/mmc/mtk-sd.c
-@@ -1761,6 +1761,18 @@ static const struct msdc_compatible mt7620_compat = {
+@@ -1761,6 +1761,18 @@ static const struct msdc_compatible mt76
.default_pad_dly = true,
};
static const struct msdc_compatible mt7622_compat = {
.clk_div_bits = 12,
.pad_tune0 = true,
-@@ -1809,6 +1821,7 @@ static const struct msdc_compatible mt8183_compat = {
+@@ -1809,6 +1821,7 @@ static const struct msdc_compatible mt81
static const struct udevice_id msdc_ids[] = {
{ .compatible = "mediatek,mt7620-mmc", .data = (ulong)&mt7620_compat },
{ .compatible = "mediatek,mt7622-mmc", .data = (ulong)&mt7622_compat },
{ .compatible = "mediatek,mt7623-mmc", .data = (ulong)&mt7623_compat },
{ .compatible = "mediatek,mt8512-mmc", .data = (ulong)&mt8512_compat },
---
-2.36.1
-
drivers/net/mtk_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
-index 666ddeb10d..caa83b7cec 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
-@@ -1419,7 +1419,7 @@ static int mtk_eth_of_to_plat(struct udevice *dev)
+@@ -1419,7 +1419,7 @@ static int mtk_eth_of_to_plat(struct ude
priv->soc = dev_get_driver_data(dev);
/* get corresponding ethsys phandle */
ret = dev_read_phandle_with_args(dev, "mediatek,ethsys", NULL, 0, 0,
---
-2.36.1
-
drivers/net/mtk_eth.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
-diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
-index caa83b7cec..ac1e8abd71 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -159,9 +159,10 @@ struct mtk_eth_priv {
struct mii_dev *mdio_bus;
int (*mii_read)(struct mtk_eth_priv *priv, u8 phy, u8 reg);
int (*mii_write)(struct mtk_eth_priv *priv, u8 phy, u8 reg, u16 val);
-@@ -233,7 +234,12 @@ static void mtk_gmac_rmw(struct mtk_eth_priv *priv, u32 reg, u32 clr, u32 set)
+@@ -233,7 +234,12 @@ static void mtk_gmac_rmw(struct mtk_eth_
static void mtk_ethsys_rmw(struct mtk_eth_priv *priv, u32 reg, u32 clr,
u32 set)
{
}
/* Direct MDIO clause 22/45 access via SoC */
-@@ -1427,15 +1433,9 @@ static int mtk_eth_of_to_plat(struct udevice *dev)
+@@ -1427,15 +1433,9 @@ static int mtk_eth_of_to_plat(struct ude
if (ret)
return ret;
/* Reset controllers */
ret = reset_get_by_name(dev, "fe", &priv->rst_fe);
---
-2.36.1
-
drivers/net/mtk_eth.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
-diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
-index ac1e8abd71..4fe7ee0d36 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -145,7 +145,8 @@ enum mtk_switch {
};
struct mtk_eth_priv {
-@@ -675,12 +676,18 @@ static int mt7530_pad_clk_setup(struct mtk_eth_priv *priv, int mode)
+@@ -675,12 +676,18 @@ static int mt7530_pad_clk_setup(struct m
static int mt7530_setup(struct mtk_eth_priv *priv)
{
u16 phy_addr, phy_val;
/* Modify HWTRAP first to allow direct access to internal PHYs */
mt753x_reg_read(priv, HWTRAP_REG, &val);
-@@ -738,7 +745,8 @@ static int mt7530_setup(struct mtk_eth_priv *priv)
+@@ -738,7 +745,8 @@ static int mt7530_setup(struct mtk_eth_p
/* Lower Tx Driving for TRGMII path */
for (i = 0 ; i < NUM_TRGMII_CTRL ; i++)
mt753x_reg_write(priv, MT7530_TRGMII_TD_ODT(i),
for (i = 0 ; i < NUM_TRGMII_CTRL; i++)
mt753x_reg_rmw(priv, MT7530_TRGMII_RD(i), RD_TAP_M, 16);
-@@ -1540,6 +1548,7 @@ static const struct udevice_id mtk_eth_ids[] = {
+@@ -1540,6 +1548,7 @@ static const struct udevice_id mtk_eth_i
{ .compatible = "mediatek,mt7629-eth", .data = SOC_MT7629 },
{ .compatible = "mediatek,mt7623-eth", .data = SOC_MT7623 },
{ .compatible = "mediatek,mt7622-eth", .data = SOC_MT7622 },
{}
};
---
-2.36.1
-
create mode 100644 drivers/mtd/nand/raw/mt7621_nand.h
create mode 100644 drivers/mtd/nand/raw/mt7621_nand_spl.c
-diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
-index d75f371c95..1663f1941c 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -521,12 +521,25 @@ config TEGRA_NAND
help
Number of data bytes in one page for the NAND chip on the
board, not including the OOB area.
-diff --git a/drivers/mtd/nand/raw/Makefile b/drivers/mtd/nand/raw/Makefile
-index 6ec3581d20..cfc9c0fff0 100644
--- a/drivers/mtd/nand/raw/Makefile
+++ b/drivers/mtd/nand/raw/Makefile
@@ -72,6 +72,7 @@ obj-$(CONFIG_NAND_ZYNQ) += zynq_nand.o
else # minimal SPL drivers
-@@ -80,5 +81,6 @@ obj-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_spl.o
+@@ -80,5 +81,6 @@ obj-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_sp
obj-$(CONFIG_NAND_MXC) += mxc_nand_spl.o
obj-$(CONFIG_NAND_MXS) += mxs_nand_spl.o mxs_nand.o
obj-$(CONFIG_NAND_SUNXI) += sunxi_nand_spl.o
+obj-$(CONFIG_NAND_MT7621) += mt7621_nand_spl.o mt7621_nand.o
endif # drivers
-diff --git a/drivers/mtd/nand/raw/mt7621_nand.c b/drivers/mtd/nand/raw/mt7621_nand.c
-new file mode 100644
-index 0000000000..2fd8934939
--- /dev/null
+++ b/drivers/mtd/nand/raw/mt7621_nand.c
@@ -0,0 +1,1205 @@
+ mt7621_nfc_set_regs(&nfc_dev);
+ mt7621_nfc_init_chip(&nfc_dev);
+}
-diff --git a/drivers/mtd/nand/raw/mt7621_nand.h b/drivers/mtd/nand/raw/mt7621_nand.h
-new file mode 100644
-index 0000000000..af4bc55961
--- /dev/null
+++ b/drivers/mtd/nand/raw/mt7621_nand.h
@@ -0,0 +1,29 @@
+int mt7621_nfc_spl_post_init(struct mt7621_nfc *nfc);
+
+#endif /* _MT7621_NAND_H_ */
-diff --git a/drivers/mtd/nand/raw/mt7621_nand_spl.c b/drivers/mtd/nand/raw/mt7621_nand_spl.c
-new file mode 100644
-index 0000000000..114fc8b7ce
--- /dev/null
+++ b/drivers/mtd/nand/raw/mt7621_nand_spl.c
@@ -0,0 +1,237 @@
+
+ nand_valid = 1;
+}
---
-2.36.1
-
common/spl/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/common/spl/Kconfig b/common/spl/Kconfig
-index 50ff113cab..eee9315e43 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -764,7 +764,7 @@ config SPL_NAND_SIMPLE
bool "Use Base NAND Driver"
help
Include nand_base.c in the SPL.
---
-2.36.1
-
common/spl/spl_legacy.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
-diff --git a/common/spl/spl_legacy.c b/common/spl/spl_legacy.c
-index 2ec7154423..ae8731c782 100644
--- a/common/spl/spl_legacy.c
+++ b/common/spl/spl_legacy.c
-@@ -88,15 +88,29 @@ int spl_load_legacy_img(struct spl_image_info *spl_image,
+@@ -88,15 +88,29 @@ int spl_load_legacy_img(struct spl_image
/* Read header into local struct */
load->read(load, header, sizeof(hdr), &hdr);
load->read(load, dataptr, spl_image->size,
(void *)(unsigned long)spl_image->load_addr);
break;
-@@ -104,6 +118,9 @@ int spl_load_legacy_img(struct spl_image_info *spl_image,
+@@ -104,6 +118,9 @@ int spl_load_legacy_img(struct spl_image
case IH_COMP_LZMA:
lzma_len = LZMA_LEN;
debug("LZMA: Decompressing %08lx to %08lx\n",
dataptr, spl_image->load_addr);
src = malloc(spl_image->size);
---
-2.36.1
-
common/spl/spl_nand.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
-diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
-index 82a10ffa63..7b7579a2df 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
-@@ -56,6 +56,21 @@ static ulong spl_nand_fit_read(struct spl_load_info *load, ulong offs,
+@@ -56,6 +56,21 @@ static ulong spl_nand_fit_read(struct sp
return size / load->bl_len;
}
struct mtd_info * __weak nand_get_mtd(void)
{
return NULL;
-@@ -93,6 +108,18 @@ static int spl_nand_load_element(struct spl_image_info *spl_image,
+@@ -93,6 +108,18 @@ static int spl_nand_load_element(struct
load.bl_len = bl_len;
load.read = spl_nand_fit_read;
return spl_load_imx_container(spl_image, &load, offset / bl_len);
} else {
err = spl_parse_image_header(spl_image, bootdev, header);
if (err)
---
-2.36.1
-
tools/mtk_image.h | 24 ++++++
2 files changed, 206 insertions(+)
-diff --git a/tools/mtk_image.c b/tools/mtk_image.c
-index 418c5fd54b..de5ce4d964 100644
--- a/tools/mtk_image.c
+++ b/tools/mtk_image.c
@@ -6,7 +6,9 @@
static int mtk_image_check_image_types(uint8_t type)
{
if (type == IH_TYPE_MTKIMAGE)
-@@ -283,6 +313,7 @@ static int mtk_brom_parse_imagename(const char *imagename)
+@@ -283,6 +313,7 @@ static int mtk_brom_parse_imagename(cons
static const char *hdr_offs = "";
static const char *nandinfo = "";
static const char *lk = "";
static const char *arm64_param = "";
key = buf;
-@@ -332,6 +363,9 @@ static int mtk_brom_parse_imagename(const char *imagename)
+@@ -332,6 +363,9 @@ static int mtk_brom_parse_imagename(cons
if (!strcmp(key, "lk"))
lk = val;
if (!strcmp(key, "lkname"))
snprintf(lk_name, sizeof(lk_name), "%s", val);
-@@ -352,6 +386,13 @@ static int mtk_brom_parse_imagename(const char *imagename)
+@@ -352,6 +386,13 @@ static int mtk_brom_parse_imagename(cons
return 0;
}
/* parse media type */
for (i = 0; i < ARRAY_SIZE(brom_images); i++) {
if (!strcmp(brom_images[i].name, media)) {
-@@ -419,6 +460,13 @@ static int mtk_image_vrec_header(struct image_tool_params *params,
+@@ -419,6 +460,13 @@ static int mtk_image_vrec_header(struct
return 0;
}
if (hdr_media == BRLYT_TYPE_NAND || hdr_media == BRLYT_TYPE_SNAND)
tparams->header_size = 2 * le16_to_cpu(hdr_nand->pagesize);
else
-@@ -579,9 +627,90 @@ static int mtk_image_verify_nand_header(const uint8_t *ptr, int print)
+@@ -579,9 +627,90 @@ static int mtk_image_verify_nand_header(
return 0;
}
union lk_hdr *lk = (union lk_hdr *)ptr;
/* nothing to verify for LK image header */
-@@ -590,6 +719,9 @@ static int mtk_image_verify_header(unsigned char *ptr, int image_size,
+@@ -590,6 +719,9 @@ static int mtk_image_verify_header(unsig
img_size = image_size;
if (!strcmp((char *)ptr, NAND_BOOT_NAME))
return mtk_image_verify_nand_header(ptr, 0);
else
-@@ -600,6 +732,7 @@ static int mtk_image_verify_header(unsigned char *ptr, int image_size,
+@@ -600,6 +732,7 @@ static int mtk_image_verify_header(unsig
static void mtk_image_print_header(const void *ptr)
{
union lk_hdr *lk = (union lk_hdr *)ptr;
if (le32_to_cpu(lk->magic) == LK_PART_MAGIC) {
-@@ -610,6 +743,11 @@ static void mtk_image_print_header(const void *ptr)
+@@ -610,6 +743,11 @@ static void mtk_image_print_header(const
printf("Image Type: MediaTek BootROM Loadable Image\n");
if (!strcmp((char *)ptr, NAND_BOOT_NAME))
mtk_image_verify_nand_header(ptr, 1);
else
-@@ -773,6 +911,45 @@ static void mtk_image_set_nand_header(void *ptr, off_t filesize,
+@@ -773,6 +911,45 @@ static void mtk_image_set_nand_header(vo
filesize - 2 * le16_to_cpu(hdr_nand->pagesize) - SHA256_SUM_LEN);
}
static void mtk_image_set_header(void *ptr, struct stat *sbuf, int ifd,
struct image_tool_params *params)
{
-@@ -791,6 +968,11 @@ static void mtk_image_set_header(void *ptr, struct stat *sbuf, int ifd,
+@@ -791,6 +968,11 @@ static void mtk_image_set_header(void *p
img_gen = true;
img_size = sbuf->st_size;
if (hdr_media == BRLYT_TYPE_NAND || hdr_media == BRLYT_TYPE_SNAND)
mtk_image_set_nand_header(ptr, sbuf->st_size, params->addr);
else
-diff --git a/tools/mtk_image.h b/tools/mtk_image.h
-index 7dda71ce88..d868545a33 100644
--- a/tools/mtk_image.h
+++ b/tools/mtk_image.h
@@ -200,4 +200,28 @@ union lk_hdr {
+};
+
#endif /* _MTK_IMAGE_H */
---
-2.36.1
-
MAINTAINERS | 8 ++++++++
1 file changed, 8 insertions(+)
-diff --git a/MAINTAINERS b/MAINTAINERS
-index 7f27ff4c20..d8d060bd92 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -1007,15 +1007,23 @@ R: GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>
+@@ -1007,15 +1007,23 @@ R: GSS_MTK_Uboot_upstream <GSS_MTK_Uboot
S: Maintained
F: arch/mips/mach-mtmips/
F: arch/mips/dts/mt7620.dtsi
F: drivers/net/mt7620-eth.c
F: drivers/phy/mt7620-usb-phy.c
F: drivers/reset/reset-mtmips.c
---
-2.36.1
-
+++ /dev/null
-From 12de602dc824bcb821287500fba831225cff5392 Mon Sep 17 00:00:00 2001
-From: David Bauer <mail@david-bauer.net>
-Date: Mon, 13 Jul 2020 23:37:37 +0200
-Subject: [PATCH 11/12] scripts: remove dependency on swig
-
-Don't build the libfdt tool, as it has a dependency on swig (which
-OpenWrt does not ship).
-
-This requires more hacks, as of-platdata generation does not work
-without it.
-
-Signed-off-by: David Bauer <mail@david-bauer.net>
----
- scripts/dtc/Makefile | 2 --
- 1 file changed, 2 deletions(-)
-
---- a/scripts/dtc/Makefile
-+++ b/scripts/dtc/Makefile
-@@ -18,5 +18,3 @@ HOSTCFLAGS_dtc-parser.tab.o := -I$(src)
- # dependencies on generated files need to be listed explicitly
- $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h
-
--# Added for U-Boot
--subdir-$(CONFIG_PYLIBFDT) += pylibfdt
/*
* An iterator function for menu items. callback will be called for each item
* in m, with m, a pointer to the item, and extra being passed to callback. If
-@@ -426,7 +445,7 @@ int menu_destroy(struct menu *m)
+@@ -426,7 +438,7 @@ int menu_destroy(struct menu *m)
}
void bootmenu_autoboot_loop(struct bootmenu_data *menu,
{
int i, c;
-@@ -456,6 +475,19 @@ void bootmenu_autoboot_loop(struct bootm
+@@ -456,6 +468,19 @@ void bootmenu_autoboot_loop(struct bootm
break;
default:
*key = KEY_NONE;
break;
}
-@@ -475,10 +507,16 @@ void bootmenu_autoboot_loop(struct bootm
+@@ -475,10 +500,16 @@ void bootmenu_autoboot_loop(struct bootm
}
void bootmenu_loop(struct bootmenu_data *menu,
if (*esc == 1) {
if (tstc()) {
c = getchar();
-@@ -504,6 +542,14 @@ void bootmenu_loop(struct bootmenu_data
+@@ -504,6 +535,14 @@ void bootmenu_loop(struct bootmenu_data
if (c == '\e') {
*esc = 1;
*key = KEY_NONE;
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
-@@ -432,7 +432,11 @@ static void menu_display_statusline(stru
+@@ -431,7 +431,11 @@ static void menu_display_statusline(stru
printf(ANSI_CURSOR_POSITION, 1, 1);
puts(ANSI_CLEAR_LINE);
printf(ANSI_CURSOR_POSITION, 2, 3);
puts(ANSI_CLEAR_LINE_TO_END);
printf(ANSI_CURSOR_POSITION, 3, 1);
puts(ANSI_CLEAR_LINE);
-@@ -517,6 +521,7 @@ static enum bootmenu_ret bootmenu_show(i
+@@ -516,6 +520,7 @@ static enum bootmenu_ret bootmenu_show(i
return BOOTMENU_RET_FAIL;
}
--- /dev/null
+--- a/Makefile
++++ b/Makefile
+@@ -2063,26 +2063,7 @@ endif
+ # Check dtc and pylibfdt, if DTC is provided, else build them
+ PHONY += scripts_dtc
+ scripts_dtc: scripts_basic
+- $(Q)if test "$(DTC)" = "$(DTC_INTREE)"; then \
+- $(MAKE) $(build)=scripts/dtc; \
+- else \
+- if ! $(DTC) -v >/dev/null; then \
+- echo '*** Failed to check dtc version: $(DTC)'; \
+- false; \
+- else \
+- if test "$(call dtc-version)" -lt $(DTC_MIN_VERSION); then \
+- echo '*** Your dtc is too old, please upgrade to dtc $(DTC_MIN_VERSION) or newer'; \
+- false; \
+- else \
+- if [ -n "$(CONFIG_PYLIBFDT)" ]; then \
+- if ! echo "import libfdt" | $(PYTHON3) 2>/dev/null; then \
+- echo '*** pylibfdt does not seem to be available with $(PYTHON3)'; \
+- false; \
+- fi; \
+- fi; \
+- fi; \
+- fi; \
+- fi
++ $(MAKE) $(build)=scripts/dtc
+
+ # ---------------------------------------------------------------------------
+ quiet_cmd_cpp_lds = LDS $@
#ifdef CONFIG_MMC
static int initr_mmc(void)
{
-@@ -703,6 +719,9 @@ static init_fnc_t init_sequence_r[] = {
+@@ -703,6 +718,9 @@ static init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_CMD_ONENAND
initr_onenand,
#endif
---- a/drivers/mtd/ubi/attach.c 2022-07-11 14:42:58.000000000 +0100
-+++ b/drivers/mtd/ubi/attach.c 2022-06-12 16:04:56.623658788 +0100
-@@ -802,6 +802,13 @@
+--- a/drivers/mtd/ubi/attach.c
++++ b/drivers/mtd/ubi/attach.c
+@@ -802,6 +802,13 @@ out_unlock:
return err;
}
/**
* scan_peb - scan and process UBI headers of a PEB.
* @ubi: UBI device description object
-@@ -832,9 +839,21 @@
+@@ -832,9 +839,21 @@ static int scan_peb(struct ubi_device *u
return 0;
}
switch (err) {
case 0:
break;
---- a/drivers/mtd/ubi/ubi.h 2022-07-11 14:42:58.000000000 +0100
-+++ b/drivers/mtd/ubi/ubi.h 2022-06-12 16:04:56.626992171 +0100
-@@ -745,6 +745,7 @@
+--- a/drivers/mtd/ubi/ubi.h
++++ b/drivers/mtd/ubi/ubi.h
+@@ -745,6 +745,7 @@ struct ubi_attach_info {
int mean_ec;
uint64_t ec_sum;
int ec_count;