From b12883fc38adca78800f7a60f3f2f3053635d598 Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Fri, 2 Feb 2024 22:44:29 +0100 Subject: [PATCH 1/5] poplar: add myself as co-maintainer Add myself as co-maintainer for Poplar board, as I'm currently working on it (re-testing releases, addressing issues etc). CC: Jorge Ramirez-Ortiz CC: Shawn Guo Signed-off-by: Igor Opaniuk Acked-by: Shawn Guo Acked-by: Jorge Ramirez-Ortiz --- board/hisilicon/poplar/MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/board/hisilicon/poplar/MAINTAINERS b/board/hisilicon/poplar/MAINTAINERS index bfd4a9be66b..01efc96b0d3 100644 --- a/board/hisilicon/poplar/MAINTAINERS +++ b/board/hisilicon/poplar/MAINTAINERS @@ -1,6 +1,7 @@ Poplar BOARD M: Jorge Ramirez-Ortiz M: Shawn Guo +M: Igor Opaniuk S: Maintained F: board/hisilicon/poplar F: doc/board/hisilicon/poplar.rst From ef473d541d8a5453ce66b3c72f7e5577a7ea6aff Mon Sep 17 00:00:00 2001 From: Roger Quadros Date: Tue, 6 Feb 2024 16:02:51 +0200 Subject: [PATCH 2/5] memory: ti-gpmc: Fix lock up at A53 SPL during NAND boot on AM64-EVM AM64 ES2.0 bootrom seems to enable WAIT0EDGEDETECTION interrupt. This causes a lockup at A53 SPL when accessing NAND controller or ELM registers. A good option would be to softrest GPMC block at probe but this cannot be done for AM64 as SOFTRESET bit is marked as reserved in SYSCONFIG register. Fix the issue by disabling all IRQs at probe. Signed-off-by: Roger Quadros --- drivers/memory/ti-gpmc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/memory/ti-gpmc.c b/drivers/memory/ti-gpmc.c index 0b8674339ec..8877b8f4385 100644 --- a/drivers/memory/ti-gpmc.c +++ b/drivers/memory/ti-gpmc.c @@ -1196,6 +1196,12 @@ static int gpmc_probe(struct udevice *dev) gpmc_cfg = (struct gpmc *)priv->base; gpmc_base = priv->base; + /* + * Disable all IRQs as some bootroms might leave them enabled + * and that will cause a lock-up later + */ + gpmc_write_reg(GPMC_IRQENABLE, 0); + priv->l3_clk = devm_clk_get(dev, "fck"); if (IS_ERR(priv->l3_clk)) return PTR_ERR(priv->l3_clk); From 348ea878508de90fdcc5a051cabe05d190e40e35 Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Wed, 7 Feb 2024 01:01:32 +0100 Subject: [PATCH 3/5] cmd: hash: fix param count check Add correct check for parameter count. This fixes this issue when `hash` cmd is invoked without params: => hash data abort pc : [] lr : [] reloc pc : [<60019204>] lr : [<5afcffa8>] sp : ba6dd9c8 ip : bf7391f0 fp : bf74ec14 r10: 00000001 r9 : ba6dfea0 r8 : bf7ea030 r7 : 00000000 r6 : ba6effa8 r5 : 00000000 r4 : ffffffff r3 : bf7c257c r2 : 00000001 r1 : 00000000 r0 : bf7e6e34 Flags: nZCv IRQs off FIQs on Mode SVC_32 Code: e5934004 e1a0e003 e59f3050 e2444001 (e5f4c001) Resetting CPU ... resetting ... Signed-off-by: Igor Opaniuk --- cmd/hash.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/cmd/hash.c b/cmd/hash.c index e163cd67742..5534a735fa7 100644 --- a/cmd/hash.c +++ b/cmd/hash.c @@ -14,15 +14,22 @@ #include #include +#if IS_ENABLED(CONFIG_HASH_VERIFY) +#define HARGS 6 +#else +#define HARGS 5 +#endif + static int do_hash(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { char *s; int flags = HASH_FLAG_ENV; -#ifdef CONFIG_HASH_VERIFY - if (argc < 4) + if (argc < (HARGS - 1)) return CMD_RET_USAGE; + +#if IS_ENABLED(CONFIG_HASH_VERIFY) if (!strcmp(argv[1], "-v")) { flags |= HASH_FLAG_VERIFY; argc--; @@ -37,18 +44,12 @@ static int do_hash(struct cmd_tbl *cmdtp, int flag, int argc, return hash_command(*argv, flags, cmdtp, flag, argc - 1, argv + 1); } -#ifdef CONFIG_HASH_VERIFY -#define HARGS 6 -#else -#define HARGS 5 -#endif - U_BOOT_CMD( hash, HARGS, 1, do_hash, "compute hash message digest", "algorithm address count [[*]hash_dest]\n" " - compute message digest [save to env var / *address]" -#ifdef CONFIG_HASH_VERIFY +#if IS_ENABLED(CONFIG_HASH_VERIFY) "\nhash -v algorithm address count [*]hash\n" " - verify message digest of memory area to immediate value, \n" " env var or *address" From e761035b64235db8930eb15d2703dc3f43e99224 Mon Sep 17 00:00:00 2001 From: Caleb Connolly Date: Tue, 9 Jan 2024 11:51:09 +0000 Subject: [PATCH 4/5] boot: add support for button commands With the relatively new button API in U-Boot, it's now much easier to model the common usecase of mapping arbitrary actions to different buttons during boot - for example entering fastboot mode, setting some additional kernel cmdline arguments, or booting with a custom recovery ramdisk, to name a few. Historically, this functionality has been implemented in board code, making it fixed for a given U-Boot binary and requiring the code be duplicated and modified for every board. Implement a generic abstraction to run an arbitrary command during boot when a specific button is pressed. The button -> command mapping is configured via environment variables with the following format: button_cmd_N_name=