Skip to content

Commit

Permalink
Merge branch '2024-05-02-assorted-updates'
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
trini committed May 3, 2024
2 parents c92d48f + 3c15780 commit 2f1e76b
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 21 deletions.
3 changes: 1 addition & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions board/nuvoton/arbel_evb/arbel_evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
27 changes: 20 additions & 7 deletions board/nuvoton/poleg_evb/poleg_evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
4 changes: 4 additions & 0 deletions cmd/gpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions configs/am62x_evm_r5_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions drivers/spi/npcm_pspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <dm.h>
#include <spi.h>
#include <clk.h>
#include <reset.h>
#include <asm/gpio.h>
#include <linux/iopoll.h>

Expand Down Expand Up @@ -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);
Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion include/configs/arbel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions include/configs/poleg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion include/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand Down
2 changes: 1 addition & 1 deletion net/bootp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/binman/btool/mkimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tools/buildman/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def _SetupTest(self, echo_lines=False, threads=1, **kwdisplay_args):
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:
Expand Down

0 comments on commit 2f1e76b

Please sign in to comment.