aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-05-03 16:18:51 -0600
committerTom Rini <trini@konsulko.com>2024-05-03 16:18:51 -0600
commit2f1e76bcfee75b9f99ade63002c05ffaaec86afb (patch)
treebc6c0d474b9247257218c30cbad03967a33b5817
parentc92d48f8b2909d08584f17612a23d959467f14b8 (diff)
parent3c15780f2d2689b7e892f203393d89d7aef8ac38 (diff)
downloadu-boot-2f1e76bcfee75b9f99ade63002c05ffaaec86afb.zip
u-boot-2f1e76bcfee75b9f99ade63002c05ffaaec86afb.tar.gz
u-boot-2f1e76bcfee75b9f99ade63002c05ffaaec86afb.tar.bz2
Merge branch '2024-05-02-assorted-updates'
- Typo fixes, gpt command fix, a few npcm fixes, fix a reported Coverity issue and increase the malloc pool on am62x_evm_r5 to fix some use cases.
-rw-r--r--MAINTAINERS3
-rw-r--r--board/nuvoton/arbel_evb/arbel_evb.c14
-rw-r--r--board/nuvoton/poleg_evb/poleg_evb.c27
-rw-r--r--cmd/gpt.c4
-rw-r--r--configs/am62x_evm_r5_defconfig1
-rw-r--r--drivers/spi/npcm_pspi.c10
-rw-r--r--include/configs/arbel.h2
-rw-r--r--include/configs/poleg.h4
-rw-r--r--include/event.h2
-rw-r--r--net/bootp.c2
-rw-r--r--tools/binman/btool/mkimage.py2
-rw-r--r--tools/buildman/test.py2
12 files changed, 52 insertions, 21 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 921ce05..7a3b4d3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -224,7 +224,6 @@ ARM BROADCOM BCMBCA
M: Anand Gore <anand.gore@broadcom.com>
M: William Zhang <william.zhang@broadcom.com>
M: Kursad Oney <kursad.oney@broadcom.com>
-M: Joel Peshkin <joel.peshkin@broadcom.com>
M: Philippe Reynes <philippe.reynes@softathome.com>
S: Maintained
F: arch/arm/mach-bcmbca/
@@ -1568,7 +1567,7 @@ F: cmd/sqfs.c
F: test/py/tests/test_fs/test_squashfs/
STACKPROTECTOR
-M: Joel Peshkin <joel.peshkin@broadcom.com>
+M: William Zhang <william.zhang@broadcom.com>
S: Maintained
F: common/stackprot.c
F: cmd/stackprot_test.c
diff --git a/board/nuvoton/arbel_evb/arbel_evb.c b/board/nuvoton/arbel_evb/arbel_evb.c
index 8fc56c1..53c931c 100644
--- a/board/nuvoton/arbel_evb/arbel_evb.c
+++ b/board/nuvoton/arbel_evb/arbel_evb.c
@@ -27,6 +27,15 @@ int board_init(void)
return 0;
}
+phys_size_t get_effective_memsize(void)
+{
+ /* Use bank0 only */
+ if (gd->ram_size > DRAM_2GB_SIZE)
+ return DRAM_2GB_SIZE;
+
+ return gd->ram_size;
+}
+
int dram_init(void)
{
struct npcm_gcr *gcr = (struct npcm_gcr *)NPCM_GCR_BA;
@@ -70,21 +79,16 @@ int dram_init_banksize(void)
gd->bd->bi_dram[1].start = DRAM_4GB_SIZE;
gd->bd->bi_dram[1].size = DRAM_2GB_SIZE -
(DRAM_4GB_SIZE - DRAM_4GB_ECC_SIZE);
- /* use bank0 only */
- gd->ram_size = DRAM_2GB_SIZE;
break;
case DRAM_4GB_SIZE:
gd->bd->bi_dram[0].size = DRAM_2GB_SIZE;
gd->bd->bi_dram[1].start = DRAM_4GB_SIZE;
gd->bd->bi_dram[1].size = DRAM_2GB_SIZE;
- /* use bank0 only */
- gd->ram_size = DRAM_2GB_SIZE;
break;
default:
gd->bd->bi_dram[0].size = DRAM_1GB_SIZE;
gd->bd->bi_dram[1].start = 0;
gd->bd->bi_dram[1].size = 0;
- gd->ram_size = DRAM_1GB_SIZE;
break;
}
diff --git a/board/nuvoton/poleg_evb/poleg_evb.c b/board/nuvoton/poleg_evb/poleg_evb.c
index 7421911..e69bca9 100644
--- a/board/nuvoton/poleg_evb/poleg_evb.c
+++ b/board/nuvoton/poleg_evb/poleg_evb.c
@@ -21,7 +21,6 @@ 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;
@@ -47,17 +46,31 @@ int dram_init(void)
break;
}
- if (gd->ram_size > 0) {
- sprintf(value, "%ldM", (gd->ram_size / 0x100000));
- env_set("mem", value);
- }
-
return 0;
}
int last_stage_init(void)
{
- board_set_console();
+
+ char value[32];
+ struct udevice *dev = gd->cur_serial_dev;
+
+ if (gd->ram_size > 0) {
+ sprintf(value, "%ldM", (gd->ram_size / 0x100000));
+ env_set("mem", value);
+ }
+
+ if (dev && (dev->seq_ >= 0)) {
+ void *addr;
+ addr = dev_read_addr_ptr(dev);
+ if (addr) {
+ sprintf(value, "uart8250,mmio32,0x%x", (u32)addr);
+ env_set("earlycon", value);
+ }
+ sprintf(value, "ttyS%d,115200n8", dev->seq_);
+ env_set("console", value);
+ board_set_console();
+ }
return 0;
}
diff --git a/cmd/gpt.c b/cmd/gpt.c
index d7e9652..7aaf188 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -643,6 +643,10 @@ static int gpt_default(struct blk_desc *blk_dev_desc, const char *str_part)
free(str_disk_guid);
free(partitions);
+ /* initialize partition table */
+ if (blk_enabled())
+ part_init(blk_dev_desc);
+
return ret;
}
diff --git a/configs/am62x_evm_r5_defconfig b/configs/am62x_evm_r5_defconfig
index 4b2e57b..6482414 100644
--- a/configs/am62x_evm_r5_defconfig
+++ b/configs/am62x_evm_r5_defconfig
@@ -26,6 +26,7 @@ CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
CONFIG_SPL_BSS_START_ADDR=0x43c3b000
CONFIG_SPL_BSS_MAX_SIZE=0x3000
CONFIG_SPL_STACK_R=y
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x200000
CONFIG_SPL_SIZE_LIMIT=0x3A7F0
CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x3500
CONFIG_SPL_FS_FAT=y
diff --git a/drivers/spi/npcm_pspi.c b/drivers/spi/npcm_pspi.c
index eb14185..c944130 100644
--- a/drivers/spi/npcm_pspi.c
+++ b/drivers/spi/npcm_pspi.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <spi.h>
#include <clk.h>
+#include <reset.h>
#include <asm/gpio.h>
#include <linux/iopoll.h>
@@ -194,6 +195,7 @@ static int npcm_pspi_probe(struct udevice *bus)
{
struct npcm_pspi_priv *priv = dev_get_priv(bus);
int node = dev_of_offset(bus);
+ struct reset_ctl reset;
int ret;
ret = clk_get_by_index(bus, 0, &priv->clk);
@@ -205,6 +207,14 @@ static int npcm_pspi_probe(struct udevice *bus)
gpio_request_by_name_nodev(offset_to_ofnode(node), "cs-gpios", 0,
&priv->cs_gpio, GPIOD_IS_OUT| GPIOD_ACTIVE_LOW);
+ /* Reset HW */
+ ret = reset_get_by_index(bus, 0, &reset);
+ if (!ret) {
+ reset_assert(&reset);
+ udelay(5);
+ reset_deassert(&reset);
+ }
+
return 0;
}
diff --git a/include/configs/arbel.h b/include/configs/arbel.h
index 576ee37..d8ccc45 100644
--- a/include/configs/arbel.h
+++ b/include/configs/arbel.h
@@ -7,7 +7,7 @@
#define __CONFIG_ARBEL_H
#define CFG_SYS_SDRAM_BASE 0x0
-#define CFG_SYS_BOOTMAPSZ (128 << 20)
+#define CFG_SYS_BOOTMAPSZ (192 << 20)
#define CFG_SYS_BOOTM_LEN (20 << 20)
#define CFG_SYS_INIT_RAM_ADDR CFG_SYS_SDRAM_BASE
#define CFG_SYS_INIT_RAM_SIZE 0x8000
diff --git a/include/configs/poleg.h b/include/configs/poleg.h
index 2a2d85c..14ead16 100644
--- a/include/configs/poleg.h
+++ b/include/configs/poleg.h
@@ -30,9 +30,9 @@
"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" \
+ "earlycon=uart8250,mmio32,0xf0001000\0" \
"common_bootargs=setenv bootargs earlycon=${earlycon} root=/dev/ram " \
- "console=${console} mem=${mem} ramdisk_size=48000 basemac=${ethaddr}\0" \
+ "console=${console} mem=${mem} ramdisk_size=48000 basemac=${ethaddr} oops=panic panic=20\0" \
"sd_prog=fatload mmc 0 10000000 image-bmc; cp.b 10000000 80000000 ${filesize}\0" \
"sd_run=fatload mmc 0 10000000 image-bmc; bootm 10200000\0" \
"\0"
diff --git a/include/event.h b/include/event.h
index a8f046d..fb353ad 100644
--- a/include/event.h
+++ b/include/event.h
@@ -316,7 +316,7 @@ static inline const char *event_spy_id(struct evspy_info *spy)
__used ll_entry_declare(struct evspy_info, _type ## _3_ ## _func, \
evspy_info) = _ESPY_REC(_type, _func)
-/* Simple spy with no function arguemnts */
+/* Simple spy with no function arguments */
#define EVENT_SPY_SIMPLE(_type, _func) \
__used ll_entry_declare(struct evspy_info_simple, \
_type ## _3_ ## _func, \
diff --git a/net/bootp.c b/net/bootp.c
index c15472f..86c5680 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -886,7 +886,7 @@ static void dhcp_process_options(uchar *popt, uchar *end)
case 40: /* NIS Domain name */
if (net_nis_domain[0] == 0) {
size = truncate_sz("NIS Domain Name",
- sizeof(net_nis_domain), size);
+ sizeof(net_nis_domain), oplen);
memcpy(&net_nis_domain, popt + 2, size);
net_nis_domain[size] = 0;
}
diff --git a/tools/binman/btool/mkimage.py b/tools/binman/btool/mkimage.py
index d5b407c..39a4c8c 100644
--- a/tools/binman/btool/mkimage.py
+++ b/tools/binman/btool/mkimage.py
@@ -11,7 +11,7 @@ class Bintoolmkimage(bintool.Bintool):
"""Image generation for U-Boot
This bintool supports running `mkimage` with some basic parameters as
- neeed by binman.
+ needed by binman.
Normally binman uses the mkimage built by U-Boot. But when run outside the
U-Boot build system, binman can use the version installed in your system.
diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index bdd3d84..f92add7 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -195,7 +195,7 @@ class TestBuild(unittest.TestCase):
Args:
echo_lines: True to echo lines to the terminal to aid test
development
- kwdisplay_args: Dict of arguemnts to pass to
+ kwdisplay_args: Dict of arguments to pass to
Builder.SetDisplayOptions()
Returns: