uboot-mediatek: unbreak build with binman

swig has been installed on the buildbots a while a ago and
Petr Štetiar got a fix for the pylibfdt error. Use that and re-enable
the builds for mt7620 and mt7621.
Refresh patches while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2022-07-13 11:28:07 +01:00
parent 7659ee1e27
commit e0e74d8a2c
32 changed files with 71 additions and 325 deletions

View file

@ -33,7 +33,6 @@ define U-Boot/mt7620_rfb
BUILD_TARGET:=ramips BUILD_TARGET:=ramips
BUILD_SUBTARGET:=mt7620 BUILD_SUBTARGET:=mt7620
UBOOT_IMAGE:=u-boot-with-spl.bin UBOOT_IMAGE:=u-boot-with-spl.bin
DEPENDS:=@BROKEN
endef endef
define U-Boot/mt7620_mt7530_rfb define U-Boot/mt7620_mt7530_rfb
@ -43,7 +42,6 @@ define U-Boot/mt7620_mt7530_rfb
BUILD_TARGET:=ramips BUILD_TARGET:=ramips
BUILD_SUBTARGET:=mt7620 BUILD_SUBTARGET:=mt7620
UBOOT_IMAGE:=u-boot-with-spl.bin UBOOT_IMAGE:=u-boot-with-spl.bin
DEPENDS:=@BROKEN
endef endef
define U-Boot/mt7621_rfb define U-Boot/mt7621_rfb
@ -53,7 +51,6 @@ define U-Boot/mt7621_rfb
BUILD_TARGET:=ramips BUILD_TARGET:=ramips
BUILD_SUBTARGET:=mt7621 BUILD_SUBTARGET:=mt7621
UBOOT_IMAGE:=u-boot-mt7621.bin UBOOT_IMAGE:=u-boot-mt7621.bin
DEPENDS:=@BROKEN
endef endef
define U-Boot/mt7621_nand_rfb define U-Boot/mt7621_nand_rfb
@ -63,7 +60,6 @@ define U-Boot/mt7621_nand_rfb
BUILD_TARGET:=ramips BUILD_TARGET:=ramips
BUILD_SUBTARGET:=mt7621 BUILD_SUBTARGET:=mt7621
UBOOT_IMAGE:=u-boot-mt7621.bin UBOOT_IMAGE:=u-boot-mt7621.bin
DEPENDS:=@BROKEN
endef endef
define U-Boot/mt7622_rfb1 define U-Boot/mt7622_rfb1

View file

@ -16,9 +16,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
1 file changed, 142 insertions(+) 1 file changed, 142 insertions(+)
create mode 100644 arch/mips/include/asm/mipsmtregs.h 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 --- /dev/null
+++ b/arch/mips/include/asm/mipsmtregs.h +++ b/arch/mips/include/asm/mipsmtregs.h
@@ -0,0 +1,142 @@ @@ -0,0 +1,142 @@
@ -164,6 +161,3 @@ index 0000000000..ba82e2bd97
+#define TCHALT_H (_ULCAST_(1)) +#define TCHALT_H (_ULCAST_(1))
+ +
+#endif +#endif
--
2.36.1

View file

@ -12,8 +12,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
arch/mips/include/asm/cm.h | 67 ++++++++++++++++++++++++++++++++++++++ arch/mips/include/asm/cm.h | 67 ++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+) 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 --- a/arch/mips/include/asm/cm.h
+++ b/arch/mips/include/asm/cm.h +++ b/arch/mips/include/asm/cm.h
@@ -8,9 +8,23 @@ @@ -8,9 +8,23 @@
@ -111,6 +109,3 @@ index 99ddbccd80..5cc8c09621 100644
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <asm/io.h> #include <asm/io.h>
--
2.36.1

View file

@ -13,8 +13,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
arch/mips/cpu/u-boot-spl.lds | 3 +++ arch/mips/cpu/u-boot-spl.lds | 3 +++
1 file changed, 3 insertions(+) 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 --- a/arch/mips/cpu/u-boot-spl.lds
+++ b/arch/mips/cpu/u-boot-spl.lds +++ b/arch/mips/cpu/u-boot-spl.lds
@@ -13,7 +13,9 @@ SECTIONS @@ -13,7 +13,9 @@ SECTIONS
@ -35,6 +33,3 @@ index 28ea4f2a48..f88754ab56 100644
_image_binary_end = .; _image_binary_end = .;
--
2.36.1

View file

@ -19,11 +19,9 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
arch/mips/lib/cache.c | 43 ++++++++++++++++++++++++++++++++++ arch/mips/lib/cache.c | 43 ++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+) 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 --- a/arch/mips/include/asm/system.h
+++ b/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)); : "=&r"(tmp));
} }
@ -48,8 +46,6 @@ index 79e638844b..89a2ac209f 100644
+#endif /* CONFIG_SYS_NONCACHED_MEMORY */ +#endif /* CONFIG_SYS_NONCACHED_MEMORY */
+ +
#endif /* _ASM_SYSTEM_H */ #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 --- a/arch/mips/lib/cache.c
+++ b/arch/mips/lib/cache.c +++ b/arch/mips/lib/cache.c
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
@ -106,6 +102,3 @@ index ec652f0fba..d23b38d6b9 100644
+ return CKSEG1ADDR(next); + return CKSEG1ADDR(next);
+} +}
+#endif /* CONFIG_SYS_NONCACHED_MEMORY */ +#endif /* CONFIG_SYS_NONCACHED_MEMORY */
--
2.36.1

View file

@ -63,9 +63,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
create mode 100644 arch/mips/mach-mtmips/mt7621/tpl/tpl.c create mode 100644 arch/mips/mach-mtmips/mt7621/tpl/tpl.c
create mode 100644 include/configs/mt7621.h 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 --- /dev/null
+++ b/arch/mips/dts/mt7621-u-boot.dtsi +++ b/arch/mips/dts/mt7621-u-boot.dtsi
@@ -0,0 +1,111 @@ @@ -0,0 +1,111 @@
@ -180,9 +177,6 @@ index 0000000000..c5a8aa357f
+ }; + };
+ }; + };
+}; +};
diff --git a/arch/mips/dts/mt7621.dtsi b/arch/mips/dts/mt7621.dtsi
new file mode 100644
index 0000000000..c32b6095e9
--- /dev/null --- /dev/null
+++ b/arch/mips/dts/mt7621.dtsi +++ b/arch/mips/dts/mt7621.dtsi
@@ -0,0 +1,349 @@ @@ -0,0 +1,349 @@
@ -535,8 +529,6 @@ index 0000000000..c32b6095e9
+ #size-cells = <0>; + #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 --- a/arch/mips/mach-mtmips/Kconfig
+++ b/arch/mips/mach-mtmips/Kconfig +++ b/arch/mips/mach-mtmips/Kconfig
@@ -9,6 +9,7 @@ config SYS_MALLOC_F_LEN @@ -9,6 +9,7 @@ config SYS_MALLOC_F_LEN
@ -630,8 +622,6 @@ index 151b004603..d46be503a2 100644
source "arch/mips/mach-mtmips/mt7628/Kconfig" source "arch/mips/mach-mtmips/mt7628/Kconfig"
endmenu 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 --- a/arch/mips/mach-mtmips/Makefile
+++ b/arch/mips/mach-mtmips/Makefile +++ b/arch/mips/mach-mtmips/Makefile
@@ -1,9 +1,13 @@ @@ -1,9 +1,13 @@
@ -648,8 +638,6 @@ index 4909b47ef2..19f1e07033 100644
obj-$(CONFIG_SOC_MT7620) += mt7620/ obj-$(CONFIG_SOC_MT7620) += mt7620/
+obj-$(CONFIG_SOC_MT7621) += mt7621/ +obj-$(CONFIG_SOC_MT7621) += mt7621/
obj-$(CONFIG_SOC_MT7628) += mt7628/ 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 --- a/arch/mips/mach-mtmips/cpu.c
+++ b/arch/mips/mach-mtmips/cpu.c +++ b/arch/mips/mach-mtmips/cpu.c
@@ -16,7 +16,7 @@ DECLARE_GLOBAL_DATA_PTR; @@ -16,7 +16,7 @@ DECLARE_GLOBAL_DATA_PTR;
@ -661,9 +649,6 @@ index a4b5cff61d..f1e9022738 100644
return 0; 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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/Kconfig +++ b/arch/mips/mach-mtmips/mt7621/Kconfig
@@ -0,0 +1,95 @@ @@ -0,0 +1,95 @@
@ -762,9 +747,6 @@ index 0000000000..37d512c68f
+ default "mediatek" if BOARD_MT7621_RFB || BOARD_MT7621_NAND_RFB + default "mediatek" if BOARD_MT7621_RFB || BOARD_MT7621_NAND_RFB
+ +
+endif +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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/Makefile +++ b/arch/mips/mach-mtmips/mt7621/Makefile
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
@ -782,9 +764,6 @@ index 0000000000..bf1b0bb688
+ +
+obj-y += sram_init.o +obj-y += sram_init.o
+endif +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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/init.c +++ b/arch/mips/mach-mtmips/mt7621/init.c
@@ -0,0 +1,246 @@ @@ -0,0 +1,246 @@
@ -1034,9 +1013,6 @@ index 0000000000..d21848ad23
+ while (1) + while (1)
+ writel(SYS_RST, sysc + SYSCTL_RSTCTL_REG); + 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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/mt7621.h +++ b/arch/mips/mach-mtmips/mt7621/mt7621.h
@@ -0,0 +1,229 @@ @@ -0,0 +1,229 @@
@ -1269,9 +1245,6 @@ index 0000000000..916cc993b4
+#endif +#endif
+ +
+#endif /* _MT7621_H_ */ +#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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/serial.c +++ b/arch/mips/mach-mtmips/mt7621/serial.c
@@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
@ -1298,9 +1271,6 @@ index 0000000000..0ccc71dc75
+ clrbits_32(base + SYSCTL_GPIOMODE_REG, UART3_MODE_M); + clrbits_32(base + SYSCTL_GPIOMODE_REG, UART3_MODE_M);
+#endif +#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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/Makefile +++ b/arch/mips/mach-mtmips/mt7621/spl/Makefile
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
@ -1313,9 +1283,6 @@ index 0000000000..ebe54e79b9
+obj-y += serial.o +obj-y += serial.o
+obj-y += launch.o +obj-y += launch.o
+obj-y += launch_ll.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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/cps.c +++ b/arch/mips/mach-mtmips/mt7621/spl/cps.c
@@ -0,0 +1,153 @@ @@ -0,0 +1,153 @@
@ -1472,9 +1439,6 @@ index 0000000000..779e646c12
+ gic_init(); + gic_init();
+ cm_init(cm_base); + 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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/dram.c +++ b/arch/mips/mach-mtmips/mt7621/spl/dram.c
@@ -0,0 +1,153 @@ @@ -0,0 +1,153 @@
@ -1631,9 +1595,6 @@ index 0000000000..100adfb93a
+ new_stage_bin->ddr_pll_cfg = DDR_FREQ_PARAM; + new_stage_bin->ddr_pll_cfg = DDR_FREQ_PARAM;
+ new_stage_bin->baudrate = CONFIG_BAUDRATE; + 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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/dram.h +++ b/arch/mips/mach-mtmips/mt7621/spl/dram.h
@@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
@ -1676,9 +1637,6 @@ index 0000000000..7322c58276
+#endif +#endif
+ +
+#endif /* _MT7621_DRAM_H_ */ +#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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/launch.c +++ b/arch/mips/mach-mtmips/mt7621/spl/launch.c
@@ -0,0 +1,100 @@ @@ -0,0 +1,100 @@
@ -1782,9 +1740,6 @@ index 0000000000..37c20a5f56
+ break; + 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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/launch.h +++ b/arch/mips/mach-mtmips/mt7621/spl/launch.h
@@ -0,0 +1,52 @@ @@ -0,0 +1,52 @@
@ -1840,9 +1795,6 @@ index 0000000000..f34250d605
+#define LAUNCHPERIOD 10000 +#define LAUNCHPERIOD 10000
+ +
+#endif /* _LAUNCH_H_ */ +#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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/launch_ll.S +++ b/arch/mips/mach-mtmips/mt7621/spl/launch_ll.S
@@ -0,0 +1,339 @@ @@ -0,0 +1,339 @@
@ -2185,9 +2137,6 @@ index 0000000000..32d28c7539
+_vpe1_init_done: +_vpe1_init_done:
+ jr ra + jr ra
+ END(boot_vpe1) + 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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/serial.c +++ b/arch/mips/mach-mtmips/mt7621/spl/serial.c
@@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
@ -2215,9 +2164,6 @@ index 0000000000..5cf093a078
+#endif /* CONFIG_CONS_INDEX */ +#endif /* CONFIG_CONS_INDEX */
+#endif /* CONFIG_SPL_SERIAL */ +#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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/spl.c +++ b/arch/mips/mach-mtmips/mt7621/spl/spl.c
@@ -0,0 +1,95 @@ @@ -0,0 +1,95 @@
@ -2316,9 +2262,6 @@ index 0000000000..71d01aa7f5
+ +
+ return addr; + 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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/spl/start.S +++ b/arch/mips/mach-mtmips/mt7621/spl/start.S
@@ -0,0 +1,226 @@ @@ -0,0 +1,226 @@
@ -2548,9 +2491,6 @@ index 0000000000..3cad3567e7
+ move ra, zero + move ra, zero
+ +
+ END(_start) + 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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/sram_init.S +++ b/arch/mips/mach-mtmips/mt7621/sram_init.S
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
@ -2576,9 +2516,6 @@ index 0000000000..03b9eab10b
+ +
+ jr ra + jr ra
+ END(mips_sram_init) + 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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/tpl/Makefile +++ b/arch/mips/mach-mtmips/mt7621/tpl/Makefile
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
@ -2586,9 +2523,6 @@ index 0000000000..471ad74249
+extra-y += start.o +extra-y += start.o
+ +
+obj-y += tpl.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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/tpl/start.S +++ b/arch/mips/mach-mtmips/mt7621/tpl/start.S
@@ -0,0 +1,161 @@ @@ -0,0 +1,161 @@
@ -2753,9 +2687,6 @@ index 0000000000..19b09f7251
+ nop + nop
+ +
+ END(_start) + 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 --- /dev/null
+++ b/arch/mips/mach-mtmips/mt7621/tpl/tpl.c +++ b/arch/mips/mach-mtmips/mt7621/tpl/tpl.c
@@ -0,0 +1,144 @@ @@ -0,0 +1,144 @@
@ -2903,9 +2834,6 @@ index 0000000000..2a828907a3
+ for (;;) + for (;;)
+ ; + ;
+} +}
diff --git a/include/configs/mt7621.h b/include/configs/mt7621.h
new file mode 100644
index 0000000000..dac6aa4afb
--- /dev/null --- /dev/null
+++ b/include/configs/mt7621.h +++ b/include/configs/mt7621.h
@@ -0,0 +1,65 @@ @@ -0,0 +1,65 @@
@ -2974,6 +2902,3 @@ index 0000000000..dac6aa4afb
+#define CONFIG_SYS_UBOOT_BASE 0 +#define CONFIG_SYS_UBOOT_BASE 0
+ +
+#endif /* __CONFIG_MT7621_H */ +#endif /* __CONFIG_MT7621_H */
--
2.36.1

View file

@ -32,11 +32,9 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
create mode 100644 configs/mt7621_nand_rfb_defconfig create mode 100644 configs/mt7621_nand_rfb_defconfig
create mode 100644 configs/mt7621_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 --- a/arch/mips/dts/Makefile
+++ b/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_HUAWEI_HG556A) += huawei,hg556a.dtb
dtb-$(CONFIG_BOARD_MT7620_RFB) += mediatek,mt7620-rfb.dtb dtb-$(CONFIG_BOARD_MT7620_RFB) += mediatek,mt7620-rfb.dtb
dtb-$(CONFIG_BOARD_MT7620_MT7530_RFB) += mediatek,mt7620-mt7530-rfb.dtb dtb-$(CONFIG_BOARD_MT7620_MT7530_RFB) += mediatek,mt7620-mt7530-rfb.dtb
@ -45,9 +43,6 @@ index 95144b24dc..1b179116c9 100644
dtb-$(CONFIG_BOARD_MT7628_RFB) += mediatek,mt7628-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_GARDENA_SMART_GATEWAY_MT7688) += gardena-smart-gateway-mt7688.dtb
dtb-$(CONFIG_BOARD_LINKIT_SMART_7688) += linkit-smart-7688.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 --- /dev/null
+++ b/arch/mips/dts/mediatek,mt7621-nand-rfb.dts +++ b/arch/mips/dts/mediatek,mt7621-nand-rfb.dts
@@ -0,0 +1,67 @@ @@ -0,0 +1,67 @@
@ -118,9 +113,6 @@ index 0000000000..67ba298b0a
+&u3phy { +&u3phy {
+ status = "okay"; + 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 --- /dev/null
+++ b/arch/mips/dts/mediatek,mt7621-rfb.dts +++ b/arch/mips/dts/mediatek,mt7621-rfb.dts
@@ -0,0 +1,82 @@ @@ -0,0 +1,82 @@
@ -206,8 +198,6 @@ index 0000000000..ff7eaf0f20
+&u3phy { +&u3phy {
+ status = "okay"; + 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 --- a/arch/mips/mach-mtmips/mt7621/Kconfig
+++ b/arch/mips/mach-mtmips/mt7621/Kconfig +++ b/arch/mips/mach-mtmips/mt7621/Kconfig
@@ -79,6 +79,26 @@ config MT7621_BOOT_FROM_NAND @@ -79,6 +79,26 @@ config MT7621_BOOT_FROM_NAND
@ -237,9 +227,6 @@ index 37d512c68f..008a28f991 100644
endchoice endchoice
config SYS_CONFIG_NAME 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 --- /dev/null
+++ b/board/mediatek/mt7621/MAINTAINERS +++ b/board/mediatek/mt7621/MAINTAINERS
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
@ -251,18 +238,12 @@ index 0000000000..f83141cea1
+F: configs/mt7621_nand_rfb_defconfig +F: configs/mt7621_nand_rfb_defconfig
+F: arch/mips/dts/mediatek,mt7621-rfb.dts +F: arch/mips/dts/mediatek,mt7621-rfb.dts
+F: arch/mips/dts/mediatek,mt7621-nand-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 --- /dev/null
+++ b/board/mediatek/mt7621/Makefile +++ b/board/mediatek/mt7621/Makefile
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0 +# SPDX-License-Identifier: GPL-2.0
+ +
+obj-y += board.o +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 --- /dev/null
+++ b/board/mediatek/mt7621/board.c +++ b/board/mediatek/mt7621/board.c
@@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
@ -272,9 +253,6 @@ index 0000000000..0496f3f806
+ * + *
+ * Author: Weijie Gao <weijie.gao@mediatek.com> + * 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 --- /dev/null
+++ b/configs/mt7621_nand_rfb_defconfig +++ b/configs/mt7621_nand_rfb_defconfig
@@ -0,0 +1,85 @@ @@ -0,0 +1,85 @@
@ -363,9 +341,6 @@ index 0000000000..fe8543df49
+CONFIG_LZMA=y +CONFIG_LZMA=y
+# CONFIG_GZIP is not set +# CONFIG_GZIP is not set
+CONFIG_SPL_LZMA=y +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 --- /dev/null
+++ b/configs/mt7621_rfb_defconfig +++ b/configs/mt7621_rfb_defconfig
@@ -0,0 +1,82 @@ @@ -0,0 +1,82 @@
@ -451,6 +426,3 @@ index 0000000000..ae62360e63
+CONFIG_LZMA=y +CONFIG_LZMA=y
+# CONFIG_GZIP is not set +# CONFIG_GZIP is not set
+CONFIG_SPL_LZMA=y +CONFIG_SPL_LZMA=y
--
2.36.1

View file

@ -18,8 +18,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
create mode 100644 doc/board/mediatek/index.rst create mode 100644 doc/board/mediatek/index.rst
create mode 100644 doc/board/mediatek/mt7621.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 --- a/doc/board/index.rst
+++ b/doc/board/index.rst +++ b/doc/board/index.rst
@@ -23,6 +23,7 @@ Board-specific doc @@ -23,6 +23,7 @@ Board-specific doc
@ -30,9 +28,6 @@ index f90a9cad45..01b99f9cf5 100644
microchip/index microchip/index
nokia/index nokia/index
nxp/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 --- /dev/null
+++ b/doc/board/mediatek/index.rst +++ b/doc/board/mediatek/index.rst
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
@ -45,9 +40,6 @@ index 0000000000..38cd8cb5b2
+ :maxdepth: 2 + :maxdepth: 2
+ +
+ mt7621 + mt7621
diff --git a/doc/board/mediatek/mt7621.rst b/doc/board/mediatek/mt7621.rst
new file mode 100644
index 0000000000..1662255546
--- /dev/null --- /dev/null
+++ b/doc/board/mediatek/mt7621.rst +++ b/doc/board/mediatek/mt7621.rst
@@ -0,0 +1,48 @@ @@ -0,0 +1,48 @@
@ -99,6 +91,3 @@ index 0000000000..1662255546
+ $ make O=build + $ make O=build
+ +
+Burn the u-boot-mt7621.bin to the SPI-NOR or NAND flash. +Burn the u-boot-mt7621.bin to the SPI-NOR or NAND flash.
--
2.36.1

View file

@ -17,8 +17,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
create mode 100644 drivers/clk/mtmips/clk-mt7621.c create mode 100644 drivers/clk/mtmips/clk-mt7621.c
create mode 100644 include/dt-bindings/clock/mt7621-clk.h 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 --- a/drivers/clk/mtmips/Makefile
+++ b/drivers/clk/mtmips/Makefile +++ b/drivers/clk/mtmips/Makefile
@@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
@ -27,9 +25,6 @@ index 732e7f2545..ee8b5afe87 100644
obj-$(CONFIG_SOC_MT7620) += clk-mt7620.o obj-$(CONFIG_SOC_MT7620) += clk-mt7620.o
+obj-$(CONFIG_SOC_MT7621) += clk-mt7621.o +obj-$(CONFIG_SOC_MT7621) += clk-mt7621.o
obj-$(CONFIG_SOC_MT7628) += clk-mt7628.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 --- /dev/null
+++ b/drivers/clk/mtmips/clk-mt7621.c +++ b/drivers/clk/mtmips/clk-mt7621.c
@@ -0,0 +1,288 @@ @@ -0,0 +1,288 @@
@ -321,9 +316,6 @@ index 0000000000..03363b70d7
+ .priv_auto = sizeof(struct mt7621_clk_priv), + .priv_auto = sizeof(struct mt7621_clk_priv),
+ .ops = &mt7621_clk_ops, + .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 --- /dev/null
+++ b/include/dt-bindings/clock/mt7621-clk.h +++ b/include/dt-bindings/clock/mt7621-clk.h
@@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
@ -373,6 +365,3 @@ index 0000000000..978c67951b
+#define MT7621_CLK_DDR 29 +#define MT7621_CLK_DDR 29
+ +
+#endif /* _DT_BINDINGS_MT7621_CLK_H_ */ +#endif /* _DT_BINDINGS_MT7621_CLK_H_ */
--
2.36.1

View file

@ -13,9 +13,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
1 file changed, 38 insertions(+) 1 file changed, 38 insertions(+)
create mode 100644 include/dt-bindings/reset/mt7621-reset.h 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 --- /dev/null
+++ b/include/dt-bindings/reset/mt7621-reset.h +++ b/include/dt-bindings/reset/mt7621-reset.h
@@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
@ -57,6 +54,3 @@ index 0000000000..8e4341f040
+#define RST_SYS 0 +#define RST_SYS 0
+ +
+#endif /* _DT_BINDINGS_MT7621_RESET_H_ */ +#endif /* _DT_BINDINGS_MT7621_RESET_H_ */
--
2.36.1

View file

@ -17,8 +17,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 files changed, 330 insertions(+), 2 deletions(-) 5 files changed, 330 insertions(+), 2 deletions(-)
create mode 100644 drivers/pinctrl/mtmips/pinctrl-mt7621.c 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 --- a/drivers/pinctrl/mtmips/Kconfig
+++ b/drivers/pinctrl/mtmips/Kconfig +++ b/drivers/pinctrl/mtmips/Kconfig
@@ -12,6 +12,15 @@ config PINCTRL_MT7620 @@ -12,6 +12,15 @@ config PINCTRL_MT7620
@ -37,19 +35,14 @@ index 844d5b743f..456f3ea25d 100644
config PINCTRL_MT7628 config PINCTRL_MT7628
bool "MediaTek MT7628 pin control driver" bool "MediaTek MT7628 pin control driver"
select PINCTRL_MTMIPS select PINCTRL_MTMIPS
diff --git a/drivers/pinctrl/mtmips/Makefile b/drivers/pinctrl/mtmips/Makefile
index ba945a89a7..8fece4f5fa 100644
--- a/drivers/pinctrl/mtmips/Makefile --- a/drivers/pinctrl/mtmips/Makefile
+++ b/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 # SoC Drivers
obj-$(CONFIG_PINCTRL_MT7620) += pinctrl-mt7620.o obj-$(CONFIG_PINCTRL_MT7620) += pinctrl-mt7620.o
+obj-$(CONFIG_PINCTRL_MT7621) += pinctrl-mt7621.o +obj-$(CONFIG_PINCTRL_MT7621) += pinctrl-mt7621.o
obj-$(CONFIG_PINCTRL_MT7628) += pinctrl-mt7628.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 --- /dev/null
+++ b/drivers/pinctrl/mtmips/pinctrl-mt7621.c +++ b/drivers/pinctrl/mtmips/pinctrl-mt7621.c
@@ -0,0 +1,306 @@ @@ -0,0 +1,306 @@
@ -359,8 +352,6 @@ index 0000000000..3e98a01bad
+ .probe = mt7621_pinctrl_probe, + .probe = mt7621_pinctrl_probe,
+ .priv_auto = sizeof(struct mt7621_pinctrl_priv), + .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 --- a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
+++ b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c +++ b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
@@ -13,8 +13,8 @@ @@ -13,8 +13,8 @@
@ -374,8 +365,6 @@ index e361916eb2..869b781068 100644
{ {
u32 val; 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 --- a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h
+++ b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h +++ b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.h
@@ -22,6 +22,10 @@ struct mtmips_pmx_group { @@ -22,6 +22,10 @@ struct mtmips_pmx_group {
@ -404,6 +393,3 @@ index b51d8f009c..1f1023ef42 100644
int mtmips_get_functions_count(struct udevice *dev); int mtmips_get_functions_count(struct udevice *dev);
const char *mtmips_get_function_name(struct udevice *dev, const char *mtmips_get_function_name(struct udevice *dev,
unsigned int selector); unsigned int selector);
--
2.36.1

View file

@ -10,8 +10,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/usb/host/Kconfig | 2 +- drivers/usb/host/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 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 --- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig
@@ -34,7 +34,7 @@ config USB_XHCI_DWC3_OF_SIMPLE @@ -34,7 +34,7 @@ config USB_XHCI_DWC3_OF_SIMPLE
@ -23,6 +21,3 @@ index 8f77412cc7..8f7bfe1602 100644
help help
Enables support for the on-chip xHCI controller on MediaTek SoCs. Enables support for the on-chip xHCI controller on MediaTek SoCs.
--
2.36.1

View file

@ -10,8 +10,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/phy/Kconfig | 2 +- drivers/phy/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 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 --- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig
@@ -266,7 +266,7 @@ config MT76X8_USB_PHY @@ -266,7 +266,7 @@ config MT76X8_USB_PHY
@ -23,6 +21,3 @@ index c01d9e09b9..1708d4f533 100644
help help
MediaTek T-PHY driver supports usb2.0, usb3.0 ports, PCIe and MediaTek T-PHY driver supports usb2.0, usb3.0 ports, PCIe and
SATA, and meanwhile supports two version T-PHY which have SATA, and meanwhile supports two version T-PHY which have
--
2.36.1

View file

@ -10,8 +10,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/spi/Kconfig | 2 +- drivers/spi/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 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 --- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig
@@ -240,7 +240,7 @@ config MT7620_SPI @@ -240,7 +240,7 @@ config MT7620_SPI
@ -23,6 +21,3 @@ index a1e515cb2b..2923ed8db3 100644
help help
Enable the MT7621 SPI driver. This driver can be used to access Enable the MT7621 SPI driver. This driver can be used to access
the SPI NOR flash on platforms embedding this Ralink / MediaTek the SPI NOR flash on platforms embedding this Ralink / MediaTek
--
2.36.1

View file

@ -11,8 +11,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/gpio/Kconfig | 2 +- drivers/gpio/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 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 --- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig
@@ -553,7 +553,7 @@ config MT7620_GPIO @@ -553,7 +553,7 @@ config MT7620_GPIO
@ -24,6 +22,3 @@ index d7f37f0471..8f7e630098 100644
default y default y
help help
Say yes here to support MediaTek MT7621 compatible GPIOs. Say yes here to support MediaTek MT7621 compatible GPIOs.
--
2.36.1

View file

@ -11,8 +11,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/watchdog/Kconfig | 2 +- drivers/watchdog/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 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 --- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig
@@ -191,7 +191,7 @@ config WDT_MT7620 @@ -191,7 +191,7 @@ config WDT_MT7620
@ -24,6 +22,3 @@ index c3eb8a8aec..dfb02aa468 100644
help help
Select this to enable Ralink / Mediatek watchdog timer, Select this to enable Ralink / Mediatek watchdog timer,
which can be found on some MediaTek chips. which can be found on some MediaTek chips.
--
2.36.1

View file

@ -11,11 +11,9 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/mmc/mtk-sd.c | 13 +++++++++++++ drivers/mmc/mtk-sd.c | 13 +++++++++++++
1 file changed, 13 insertions(+) 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 --- a/drivers/mmc/mtk-sd.c
+++ b/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, .default_pad_dly = true,
}; };
@ -34,7 +32,7 @@ index 97182ffd7f..e61e8cf4b9 100644
static const struct msdc_compatible mt7622_compat = { static const struct msdc_compatible mt7622_compat = {
.clk_div_bits = 12, .clk_div_bits = 12,
.pad_tune0 = true, .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[] = { static const struct udevice_id msdc_ids[] = {
{ .compatible = "mediatek,mt7620-mmc", .data = (ulong)&mt7620_compat }, { .compatible = "mediatek,mt7620-mmc", .data = (ulong)&mt7620_compat },
@ -42,6 +40,3 @@ index 97182ffd7f..e61e8cf4b9 100644
{ .compatible = "mediatek,mt7622-mmc", .data = (ulong)&mt7622_compat }, { .compatible = "mediatek,mt7622-mmc", .data = (ulong)&mt7622_compat },
{ .compatible = "mediatek,mt7623-mmc", .data = (ulong)&mt7623_compat }, { .compatible = "mediatek,mt7623-mmc", .data = (ulong)&mt7623_compat },
{ .compatible = "mediatek,mt8512-mmc", .data = (ulong)&mt8512_compat }, { .compatible = "mediatek,mt8512-mmc", .data = (ulong)&mt8512_compat },
--
2.36.1

View file

@ -20,11 +20,9 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/net/mtk_eth.c | 2 +- drivers/net/mtk_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 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 --- a/drivers/net/mtk_eth.c
+++ b/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); priv->soc = dev_get_driver_data(dev);
@ -33,6 +31,3 @@ index 666ddeb10d..caa83b7cec 100644
/* get corresponding ethsys phandle */ /* get corresponding ethsys phandle */
ret = dev_read_phandle_with_args(dev, "mediatek,ethsys", NULL, 0, 0, ret = dev_read_phandle_with_args(dev, "mediatek,ethsys", NULL, 0, 0,
--
2.36.1

View file

@ -18,8 +18,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/net/mtk_eth.c | 22 +++++++++++----------- drivers/net/mtk_eth.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-) 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 --- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c +++ b/drivers/net/mtk_eth.c
@@ -159,9 +159,10 @@ struct mtk_eth_priv { @@ -159,9 +159,10 @@ struct mtk_eth_priv {
@ -34,7 +32,7 @@ index caa83b7cec..ac1e8abd71 100644
struct mii_dev *mdio_bus; struct mii_dev *mdio_bus;
int (*mii_read)(struct mtk_eth_priv *priv, u8 phy, u8 reg); 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); 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, static void mtk_ethsys_rmw(struct mtk_eth_priv *priv, u32 reg, u32 clr,
u32 set) u32 set)
{ {
@ -48,7 +46,7 @@ index caa83b7cec..ac1e8abd71 100644
} }
/* Direct MDIO clause 22/45 access via SoC */ /* 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) if (ret)
return ret; return ret;
@ -67,6 +65,3 @@ index caa83b7cec..ac1e8abd71 100644
/* Reset controllers */ /* Reset controllers */
ret = reset_get_by_name(dev, "fe", &priv->rst_fe); ret = reset_get_by_name(dev, "fe", &priv->rst_fe);
--
2.36.1

View file

@ -12,8 +12,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/net/mtk_eth.c | 21 +++++++++++++++------ drivers/net/mtk_eth.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-) 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 --- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c +++ b/drivers/net/mtk_eth.c
@@ -145,7 +145,8 @@ enum mtk_switch { @@ -145,7 +145,8 @@ enum mtk_switch {
@ -26,7 +24,7 @@ index ac1e8abd71..4fe7ee0d36 100644
}; };
struct mtk_eth_priv { 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) static int mt7530_setup(struct mtk_eth_priv *priv)
{ {
u16 phy_addr, phy_val; u16 phy_addr, phy_val;
@ -49,7 +47,7 @@ index ac1e8abd71..4fe7ee0d36 100644
/* Modify HWTRAP first to allow direct access to internal PHYs */ /* Modify HWTRAP first to allow direct access to internal PHYs */
mt753x_reg_read(priv, HWTRAP_REG, &val); 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 */ /* Lower Tx Driving for TRGMII path */
for (i = 0 ; i < NUM_TRGMII_CTRL ; i++) for (i = 0 ; i < NUM_TRGMII_CTRL ; i++)
mt753x_reg_write(priv, MT7530_TRGMII_TD_ODT(i), mt753x_reg_write(priv, MT7530_TRGMII_TD_ODT(i),
@ -59,7 +57,7 @@ index ac1e8abd71..4fe7ee0d36 100644
for (i = 0 ; i < NUM_TRGMII_CTRL; i++) for (i = 0 ; i < NUM_TRGMII_CTRL; i++)
mt753x_reg_rmw(priv, MT7530_TRGMII_RD(i), RD_TAP_M, 16); 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,mt7629-eth", .data = SOC_MT7629 },
{ .compatible = "mediatek,mt7623-eth", .data = SOC_MT7623 }, { .compatible = "mediatek,mt7623-eth", .data = SOC_MT7623 },
{ .compatible = "mediatek,mt7622-eth", .data = SOC_MT7622 }, { .compatible = "mediatek,mt7622-eth", .data = SOC_MT7622 },
@ -67,6 +65,3 @@ index ac1e8abd71..4fe7ee0d36 100644
{} {}
}; };
--
2.36.1

View file

@ -19,8 +19,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
create mode 100644 drivers/mtd/nand/raw/mt7621_nand.h create mode 100644 drivers/mtd/nand/raw/mt7621_nand.h
create mode 100644 drivers/mtd/nand/raw/mt7621_nand_spl.c 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 --- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig
@@ -521,12 +521,25 @@ config TEGRA_NAND @@ -521,12 +521,25 @@ config TEGRA_NAND
@ -59,8 +57,6 @@ index d75f371c95..1663f1941c 100644
help help
Number of data bytes in one page for the NAND chip on the Number of data bytes in one page for the NAND chip on the
board, not including the OOB area. 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 --- a/drivers/mtd/nand/raw/Makefile
+++ b/drivers/mtd/nand/raw/Makefile +++ b/drivers/mtd/nand/raw/Makefile
@@ -72,6 +72,7 @@ obj-$(CONFIG_NAND_ZYNQ) += zynq_nand.o @@ -72,6 +72,7 @@ obj-$(CONFIG_NAND_ZYNQ) += zynq_nand.o
@ -71,16 +67,13 @@ index 6ec3581d20..cfc9c0fff0 100644
else # minimal SPL drivers 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_MXC) += mxc_nand_spl.o
obj-$(CONFIG_NAND_MXS) += mxs_nand_spl.o mxs_nand.o obj-$(CONFIG_NAND_MXS) += mxs_nand_spl.o mxs_nand.o
obj-$(CONFIG_NAND_SUNXI) += sunxi_nand_spl.o obj-$(CONFIG_NAND_SUNXI) += sunxi_nand_spl.o
+obj-$(CONFIG_NAND_MT7621) += mt7621_nand_spl.o mt7621_nand.o +obj-$(CONFIG_NAND_MT7621) += mt7621_nand_spl.o mt7621_nand.o
endif # drivers 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 --- /dev/null
+++ b/drivers/mtd/nand/raw/mt7621_nand.c +++ b/drivers/mtd/nand/raw/mt7621_nand.c
@@ -0,0 +1,1205 @@ @@ -0,0 +1,1205 @@
@ -1289,9 +1282,6 @@ index 0000000000..2fd8934939
+ mt7621_nfc_set_regs(&nfc_dev); + mt7621_nfc_set_regs(&nfc_dev);
+ mt7621_nfc_init_chip(&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 --- /dev/null
+++ b/drivers/mtd/nand/raw/mt7621_nand.h +++ b/drivers/mtd/nand/raw/mt7621_nand.h
@@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
@ -1324,9 +1314,6 @@ index 0000000000..af4bc55961
+int mt7621_nfc_spl_post_init(struct mt7621_nfc *nfc); +int mt7621_nfc_spl_post_init(struct mt7621_nfc *nfc);
+ +
+#endif /* _MT7621_NAND_H_ */ +#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 --- /dev/null
+++ b/drivers/mtd/nand/raw/mt7621_nand_spl.c +++ b/drivers/mtd/nand/raw/mt7621_nand_spl.c
@@ -0,0 +1,237 @@ @@ -0,0 +1,237 @@
@ -1567,6 +1554,3 @@ index 0000000000..114fc8b7ce
+ +
+ nand_valid = 1; + nand_valid = 1;
+} +}
--
2.36.1

View file

@ -11,8 +11,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
common/spl/Kconfig | 2 +- common/spl/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 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 --- a/common/spl/Kconfig
+++ b/common/spl/Kconfig +++ b/common/spl/Kconfig
@@ -764,7 +764,7 @@ config SPL_NAND_SIMPLE @@ -764,7 +764,7 @@ config SPL_NAND_SIMPLE
@ -24,6 +22,3 @@ index 50ff113cab..eee9315e43 100644
bool "Use Base NAND Driver" bool "Use Base NAND Driver"
help help
Include nand_base.c in the SPL. Include nand_base.c in the SPL.
--
2.36.1

View file

@ -18,11 +18,9 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
common/spl/spl_legacy.c | 21 +++++++++++++++++++-- common/spl/spl_legacy.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-) 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 --- a/common/spl/spl_legacy.c
+++ b/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 */ /* Read header into local struct */
load->read(load, header, sizeof(hdr), &hdr); load->read(load, header, sizeof(hdr), &hdr);
@ -54,7 +52,7 @@ index 2ec7154423..ae8731c782 100644
load->read(load, dataptr, spl_image->size, load->read(load, dataptr, spl_image->size,
(void *)(unsigned long)spl_image->load_addr); (void *)(unsigned long)spl_image->load_addr);
break; 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: case IH_COMP_LZMA:
lzma_len = LZMA_LEN; lzma_len = LZMA_LEN;
@ -64,6 +62,3 @@ index 2ec7154423..ae8731c782 100644
debug("LZMA: Decompressing %08lx to %08lx\n", debug("LZMA: Decompressing %08lx to %08lx\n",
dataptr, spl_image->load_addr); dataptr, spl_image->load_addr);
src = malloc(spl_image->size); src = malloc(spl_image->size);
--
2.36.1

View file

@ -14,11 +14,9 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
common/spl/spl_nand.c | 27 +++++++++++++++++++++++++++ common/spl/spl_nand.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+) 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 --- a/common/spl/spl_nand.c
+++ b/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; return size / load->bl_len;
} }
@ -40,7 +38,7 @@ index 82a10ffa63..7b7579a2df 100644
struct mtd_info * __weak nand_get_mtd(void) struct mtd_info * __weak nand_get_mtd(void)
{ {
return NULL; 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.bl_len = bl_len;
load.read = spl_nand_fit_read; load.read = spl_nand_fit_read;
return spl_load_imx_container(spl_image, &load, offset / bl_len); return spl_load_imx_container(spl_image, &load, offset / bl_len);
@ -59,6 +57,3 @@ index 82a10ffa63..7b7579a2df 100644
} else { } else {
err = spl_parse_image_header(spl_image, bootdev, header); err = spl_parse_image_header(spl_image, bootdev, header);
if (err) if (err)
--
2.36.1

View file

@ -17,8 +17,6 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
tools/mtk_image.h | 24 ++++++ tools/mtk_image.h | 24 ++++++
2 files changed, 206 insertions(+) 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 --- a/tools/mtk_image.c
+++ b/tools/mtk_image.c +++ b/tools/mtk_image.c
@@ -6,7 +6,9 @@ @@ -6,7 +6,9 @@
@ -77,7 +75,7 @@ index 418c5fd54b..de5ce4d964 100644
static int mtk_image_check_image_types(uint8_t type) static int mtk_image_check_image_types(uint8_t type)
{ {
if (type == IH_TYPE_MTKIMAGE) 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 *hdr_offs = "";
static const char *nandinfo = ""; static const char *nandinfo = "";
static const char *lk = ""; static const char *lk = "";
@ -85,7 +83,7 @@ index 418c5fd54b..de5ce4d964 100644
static const char *arm64_param = ""; static const char *arm64_param = "";
key = buf; 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")) if (!strcmp(key, "lk"))
lk = val; lk = val;
@ -95,7 +93,7 @@ index 418c5fd54b..de5ce4d964 100644
if (!strcmp(key, "lkname")) if (!strcmp(key, "lkname"))
snprintf(lk_name, sizeof(lk_name), "%s", val); 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; return 0;
} }
@ -109,7 +107,7 @@ index 418c5fd54b..de5ce4d964 100644
/* parse media type */ /* parse media type */
for (i = 0; i < ARRAY_SIZE(brom_images); i++) { for (i = 0; i < ARRAY_SIZE(brom_images); i++) {
if (!strcmp(brom_images[i].name, media)) { 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; return 0;
} }
@ -123,7 +121,7 @@ index 418c5fd54b..de5ce4d964 100644
if (hdr_media == BRLYT_TYPE_NAND || hdr_media == BRLYT_TYPE_SNAND) if (hdr_media == BRLYT_TYPE_NAND || hdr_media == BRLYT_TYPE_SNAND)
tparams->header_size = 2 * le16_to_cpu(hdr_nand->pagesize); tparams->header_size = 2 * le16_to_cpu(hdr_nand->pagesize);
else 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; return 0;
} }
@ -214,7 +212,7 @@ index 418c5fd54b..de5ce4d964 100644
union lk_hdr *lk = (union lk_hdr *)ptr; union lk_hdr *lk = (union lk_hdr *)ptr;
/* nothing to verify for LK image header */ /* 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; img_size = image_size;
@ -224,7 +222,7 @@ index 418c5fd54b..de5ce4d964 100644
if (!strcmp((char *)ptr, NAND_BOOT_NAME)) if (!strcmp((char *)ptr, NAND_BOOT_NAME))
return mtk_image_verify_nand_header(ptr, 0); return mtk_image_verify_nand_header(ptr, 0);
else 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) static void mtk_image_print_header(const void *ptr)
{ {
@ -232,7 +230,7 @@ index 418c5fd54b..de5ce4d964 100644
union lk_hdr *lk = (union lk_hdr *)ptr; union lk_hdr *lk = (union lk_hdr *)ptr;
if (le32_to_cpu(lk->magic) == LK_PART_MAGIC) { 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"); printf("Image Type: MediaTek BootROM Loadable Image\n");
@ -244,7 +242,7 @@ index 418c5fd54b..de5ce4d964 100644
if (!strcmp((char *)ptr, NAND_BOOT_NAME)) if (!strcmp((char *)ptr, NAND_BOOT_NAME))
mtk_image_verify_nand_header(ptr, 1); mtk_image_verify_nand_header(ptr, 1);
else 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); filesize - 2 * le16_to_cpu(hdr_nand->pagesize) - SHA256_SUM_LEN);
} }
@ -290,7 +288,7 @@ index 418c5fd54b..de5ce4d964 100644
static void mtk_image_set_header(void *ptr, struct stat *sbuf, int ifd, static void mtk_image_set_header(void *ptr, struct stat *sbuf, int ifd,
struct image_tool_params *params) 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_gen = true;
img_size = sbuf->st_size; img_size = sbuf->st_size;
@ -302,8 +300,6 @@ index 418c5fd54b..de5ce4d964 100644
if (hdr_media == BRLYT_TYPE_NAND || hdr_media == BRLYT_TYPE_SNAND) if (hdr_media == BRLYT_TYPE_NAND || hdr_media == BRLYT_TYPE_SNAND)
mtk_image_set_nand_header(ptr, sbuf->st_size, params->addr); mtk_image_set_nand_header(ptr, sbuf->st_size, params->addr);
else else
diff --git a/tools/mtk_image.h b/tools/mtk_image.h
index 7dda71ce88..d868545a33 100644
--- a/tools/mtk_image.h --- a/tools/mtk_image.h
+++ b/tools/mtk_image.h +++ b/tools/mtk_image.h
@@ -200,4 +200,28 @@ union lk_hdr { @@ -200,4 +200,28 @@ union lk_hdr {
@ -335,6 +331,3 @@ index 7dda71ce88..d868545a33 100644
+}; +};
+ +
#endif /* _MTK_IMAGE_H */ #endif /* _MTK_IMAGE_H */
--
2.36.1

View file

@ -11,11 +11,9 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
MAINTAINERS | 8 ++++++++ MAINTAINERS | 8 ++++++++
1 file changed, 8 insertions(+) 1 file changed, 8 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 7f27ff4c20..d8d060bd92 100644
--- a/MAINTAINERS --- a/MAINTAINERS
+++ b/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 S: Maintained
F: arch/mips/mach-mtmips/ F: arch/mips/mach-mtmips/
F: arch/mips/dts/mt7620.dtsi F: arch/mips/dts/mt7620.dtsi
@ -39,6 +37,3 @@ index 7f27ff4c20..d8d060bd92 100644
F: drivers/net/mt7620-eth.c F: drivers/net/mt7620-eth.c
F: drivers/phy/mt7620-usb-phy.c F: drivers/phy/mt7620-usb-phy.c
F: drivers/reset/reset-mtmips.c F: drivers/reset/reset-mtmips.c
--
2.36.1

View file

@ -1,24 +0,0 @@
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

View file

@ -122,7 +122,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
/* /*
* An iterator function for menu items. callback will be called for each item * 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 * 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, void bootmenu_autoboot_loop(struct bootmenu_data *menu,
@ -131,7 +131,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
{ {
int i, c; int i, c;
@@ -456,6 +475,19 @@ void bootmenu_autoboot_loop(struct bootm @@ -456,6 +468,19 @@ void bootmenu_autoboot_loop(struct bootm
break; break;
default: default:
*key = KEY_NONE; *key = KEY_NONE;
@ -151,7 +151,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
break; 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, void bootmenu_loop(struct bootmenu_data *menu,
@ -169,7 +169,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
if (*esc == 1) { if (*esc == 1) {
if (tstc()) { if (tstc()) {
c = getchar(); 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') { if (c == '\e') {
*esc = 1; *esc = 1;
*key = KEY_NONE; *key = KEY_NONE;

View file

@ -1,6 +1,6 @@
--- a/cmd/bootmenu.c --- a/cmd/bootmenu.c
+++ b/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); printf(ANSI_CURSOR_POSITION, 1, 1);
puts(ANSI_CLEAR_LINE); puts(ANSI_CLEAR_LINE);
printf(ANSI_CURSOR_POSITION, 2, 3); printf(ANSI_CURSOR_POSITION, 2, 3);
@ -13,7 +13,7 @@
puts(ANSI_CLEAR_LINE_TO_END); puts(ANSI_CLEAR_LINE_TO_END);
printf(ANSI_CURSOR_POSITION, 3, 1); printf(ANSI_CURSOR_POSITION, 3, 1);
puts(ANSI_CLEAR_LINE); 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; return BOOTMENU_RET_FAIL;
} }

View file

@ -0,0 +1,30 @@
--- 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 $@

View file

@ -441,7 +441,7 @@
#ifdef CONFIG_MMC #ifdef CONFIG_MMC
static int initr_mmc(void) 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 #ifdef CONFIG_CMD_ONENAND
initr_onenand, initr_onenand,
#endif #endif

View file

@ -1,6 +1,6 @@
--- a/drivers/mtd/ubi/attach.c 2022-07-11 14:42:58.000000000 +0100 --- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c 2022-06-12 16:04:56.623658788 +0100 +++ b/drivers/mtd/ubi/attach.c
@@ -802,6 +802,13 @@ @@ -802,6 +802,13 @@ out_unlock:
return err; return err;
} }
@ -14,7 +14,7 @@
/** /**
* scan_peb - scan and process UBI headers of a PEB. * scan_peb - scan and process UBI headers of a PEB.
* @ubi: UBI device description object * @ubi: UBI device description object
@@ -832,9 +839,21 @@ @@ -832,9 +839,21 @@ static int scan_peb(struct ubi_device *u
return 0; return 0;
} }
@ -39,9 +39,9 @@
switch (err) { switch (err) {
case 0: case 0:
break; break;
--- a/drivers/mtd/ubi/ubi.h 2022-07-11 14:42:58.000000000 +0100 --- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h 2022-06-12 16:04:56.626992171 +0100 +++ b/drivers/mtd/ubi/ubi.h
@@ -745,6 +745,7 @@ @@ -745,6 +745,7 @@ struct ubi_attach_info {
int mean_ec; int mean_ec;
uint64_t ec_sum; uint64_t ec_sum;
int ec_count; int ec_count;