[PATCH v1 0/4] fix type error and add feature to boot to kernel

fix type error and add feature to boot to kernel
Jim Liu (4): ARM: config: Enable config to decompress the FIT image board: nuvoton: add env setting for boot to linux ARM: dts: npcm8xx: fix dts node error misc: nuvoton: fix type error
arch/arm/dts/nuvoton-npcm8xx-u-boot.dtsi | 33 ++++++++++++------------ board/nuvoton/poleg_evb/poleg_evb.c | 7 +++++ configs/poleg_evb_defconfig | 3 +++ drivers/misc/npcm_otp.c | 2 +- include/configs/poleg.h | 2 ++ 5 files changed, 30 insertions(+), 17 deletions(-)

Enable FIT and SHA config to decompress the kernel image
Signed-off-by: Jim Liu JJLIU0@nuvoton.com --- configs/poleg_evb_defconfig | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/configs/poleg_evb_defconfig b/configs/poleg_evb_defconfig index b00fb48a5a..cab589d7aa 100644 --- a/configs/poleg_evb_defconfig +++ b/configs/poleg_evb_defconfig @@ -102,3 +102,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_WDT_NPCM=y CONFIG_LIB_HW_RAND=y CONFIG_SHA_HW_ACCEL=y +CONFIG_FIT=y +CONFIG_SHA256=y +CONFIG_SHA512=y

On Tue, Jun 13, 2023 at 03:45:53PM +0800, Jim Liu wrote:
Enable FIT and SHA config to decompress the kernel image
Signed-off-by: Jim Liu JJLIU0@nuvoton.com
For the series, applied to u-boot/next, thanks!

add console and mem env to boot to linux kernel
Signed-off-by: Jim Liu JJLIU0@nuvoton.com --- board/nuvoton/poleg_evb/poleg_evb.c | 7 +++++++ include/configs/poleg.h | 2 ++ 2 files changed, 9 insertions(+)
diff --git a/board/nuvoton/poleg_evb/poleg_evb.c b/board/nuvoton/poleg_evb/poleg_evb.c index aef142a881..2052af6649 100644 --- a/board/nuvoton/poleg_evb/poleg_evb.c +++ b/board/nuvoton/poleg_evb/poleg_evb.c @@ -6,6 +6,7 @@
#include <common.h> #include <dm.h> +#include <env.h> #include <asm/io.h> #include <asm/arch/gcr.h> #include <asm/mach-types.h> @@ -19,6 +20,7 @@ int board_init(void)
int dram_init(void) { + char value[32]; struct npcm_gcr *gcr = (struct npcm_gcr *)NPCM_GCR_BA;
int ramsize = (readl(&gcr->intcr3) >> 8) & 0x7; @@ -44,5 +46,10 @@ int dram_init(void) break; }
+ if (gd->ram_size > 0) { + sprintf(value, "%ldM", (gd->ram_size / 0x100000)); + env_set("mem", value); + } + return 0; } diff --git a/include/configs/poleg.h b/include/configs/poleg.h index c3f1d3393c..1e96e838be 100644 --- a/include/configs/poleg.h +++ b/include/configs/poleg.h @@ -27,6 +27,8 @@ "eth1addr=00:00:F7:A0:00:FD\0" \ "eth2addr=00:00:F7:A0:00:FE\0" \ "eth3addr=00:00:F7:A0:00:FF\0" \ + "console=ttyS0,115200n8\0" \ + "earlycon=uart8250,mmio32,0xf0000000\0" \ "common_bootargs=setenv bootargs earlycon=${earlycon} root=/dev/ram " \ "console=${console} mem=${mem} ramdisk_size=48000 basemac=${ethaddr}\0" \ "sd_prog=fatload mmc 0 10000000 image-bmc; cp.b 10000000 80000000 ${filesize}\0" \

The SHA and OTP should under the ahb node
Signed-off-by: Jim Liu JJLIU0@nuvoton.com --- arch/arm/dts/nuvoton-npcm8xx-u-boot.dtsi | 33 ++++++++++++------------ 1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/arch/arm/dts/nuvoton-npcm8xx-u-boot.dtsi b/arch/arm/dts/nuvoton-npcm8xx-u-boot.dtsi index be2ad0cf6c..e49e564b79 100644 --- a/arch/arm/dts/nuvoton-npcm8xx-u-boot.dtsi +++ b/arch/arm/dts/nuvoton-npcm8xx-u-boot.dtsi @@ -289,6 +289,23 @@ status = "disable"; };
+ aes: aes@f0858000 { + compatible = "nuvoton,npcm845-aes"; + reg = <0x0 0xf0858000 0x0 0x1000>, + <0x0 0xf0851000 0x0 0x1000>; + status = "disabled"; + clocks = <&clk NPCM8XX_CLK_AHB>; + clock-names = "clk_ahb"; + }; + + sha:sha@f085a000 { + compatible = "nuvoton,npcm845-sha"; + reg = <0x0 0xf085a000 0x0 0x1000>; + status = "disabled"; + clocks = <&clk NPCM8XX_CLK_AHB>; + clock-names = "clk_ahb"; + }; + apb { serial0: serial@0 { compatible = "nuvoton,npcm845-uart"; @@ -417,22 +434,6 @@ status = "disabled"; };
- aes: aes@f0858000 { - compatible = "nuvoton,npcm845-aes"; - reg = <0x0 0xf0858000 0x0 0x1000>, - <0x0 0xf0851000 0x0 0x1000>; - status = "disabled"; - clocks = <&clk NPCM8XX_CLK_AHB>; - clock-names = "clk_ahb"; - }; - - sha:sha@f085a000 { - compatible = "nuvoton,npcm845-sha"; - reg = <0x0 0xf085a000 0x0 0x1000>; - status = "disabled"; - clocks = <&clk NPCM8XX_CLK_AHB>; - clock-names = "clk_ahb"; - }; }; }; pinctrl: pinctrl@f0800000 {

Signed-off-by: Jim Liu JJLIU0@nuvoton.com --- drivers/misc/npcm_otp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/npcm_otp.c b/drivers/misc/npcm_otp.c index 304910888b..08029724c0 100644 --- a/drivers/misc/npcm_otp.c +++ b/drivers/misc/npcm_otp.c @@ -33,7 +33,7 @@ static int npcm_otp_check_inputs(u32 arr, u32 word) if (arr >= NPCM_NUM_OF_SA) { if (IS_ENABLED(CONFIG_ARCH_NPCM8XX)) printf("\nError: npcm8XX otp includs only one bank: 0\n"); - if (IS_ENABLED(CONFIG_ARCH_NPCM7XX)) + if (IS_ENABLED(CONFIG_ARCH_NPCM7xx)) printf("\nError: npcm7XX otp includs only two banks: 0 and 1\n"); return -1; }
participants (2)
-
Jim Liu
-
Tom Rini