OSDN Git Service

MIPS: generic: Allow generating FIT image for Marduk board
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Fri, 23 Jul 2021 02:25:35 +0000 (10:25 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 12 Aug 2021 14:01:49 +0000 (16:01 +0200)
Marduk is based on IMG pistachio SoC. The platform is using
MIPS UHI booting protocol and does have a proper devicetree
implement, thus it could be a part of generic kernel.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/boot/dts/Makefile
arch/mips/boot/dts/img/Makefile
arch/mips/generic/Kconfig
arch/mips/generic/Platform
arch/mips/generic/board-marduk.its.S [new file with mode: 0644]

index 60bd7d2..1883011 100644 (file)
@@ -2,6 +2,7 @@
 subdir-$(CONFIG_BMIPS_GENERIC)         += brcm
 subdir-$(CONFIG_CAVIUM_OCTEON_SOC)     += cavium-octeon
 subdir-$(CONFIG_MACH_PISTACHIO)                += img
+subdir-$(CONFIG_FIT_IMAGE_FDT_MARDUK)   += img
 subdir-$(CONFIG_FIT_IMAGE_FDT_BOSTON)  += img
 subdir-$(CONFIG_MACH_INGENIC)          += ingenic
 subdir-$(CONFIG_LANTIQ)                        += lantiq
index 441a3c1..24f6bbe 100644 (file)
@@ -1,5 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_FIT_IMAGE_FDT_BOSTON)     += boston.dtb
 
+dtb-$(CONFIG_FIT_IMAGE_FDT_MARDUK)     += pistachio_marduk.dtb
+
 dtb-$(CONFIG_MACH_PISTACHIO)   += pistachio_marduk.dtb
 obj-$(CONFIG_MACH_PISTACHIO)   += pistachio_marduk.dtb.o
index 657dd93..7dc5b38 100644 (file)
@@ -58,6 +58,12 @@ config FIT_IMAGE_FDT_BOSTON
          enable this if you wish to boot on a MIPS Boston board, as it is
          expected by the bootloader.
 
+config FIT_IMAGE_FDT_MARDUK
+       bool "Include FDT for IMG Pistachio Marduk (CI40) boards"
+       help
+         Enable this to include the FDT for the IMG Pistachio Marduk (CI40)
+         from Imagination Technologies in the FIT kernel image.
+
 config FIT_IMAGE_FDT_NI169445
        bool "Include FDT for NI 169445"
        help
index b871af1..e1abc11 100644 (file)
@@ -24,3 +24,4 @@ its-$(CONFIG_FIT_IMAGE_FDT_LUTON)     += board-luton.its.S
 its-$(CONFIG_FIT_IMAGE_FDT_JAGUAR2)    += board-jaguar2.its.S
 its-$(CONFIG_FIT_IMAGE_FDT_SERVAL)     += board-serval.its.S
 its-$(CONFIG_FIT_IMAGE_FDT_XILFPGA)    += board-xilfpga.its.S
+its-$(CONFIG_FIT_IMAGE_FDT_MARDUK)     += board-marduk.its.S
diff --git a/arch/mips/generic/board-marduk.its.S b/arch/mips/generic/board-marduk.its.S
new file mode 100644 (file)
index 0000000..4f63379
--- /dev/null
@@ -0,0 +1,22 @@
+/ {
+       images {
+               fdt-marduk {
+                       description = "img,pistachio-marduk Device Tree";
+                       data = /incbin/("boot/dts/img/pistachio_marduk.dtb");
+                       type = "flat_dt";
+                       arch = "mips";
+                       compression = "none";
+                       hash {
+                               algo = "sha1";
+                       };
+               };
+       };
+
+       configurations {
+               conf-marduk {
+                       description = "Marduk Linux kernel";
+                       kernel = "kernel";
+                       fdt = "fdt-marduk";
+               };
+       };
+};