Merge branch '2023-03-22-assorted-fixes'
- Assorted TI platform fixes, correct location of NXP boot format git
repository, don't try and mount partitions that are too small to be
ext4 as ext4, handle .bin files in .gitattributes, flush out panic
messages for sure, and correct console location on Arm total_compute.
diff --git a/.gitattributes b/.gitattributes
index d5931f0..7a7c416 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,6 +1,7 @@
# Declare files that always have LF line endings on checkout
* text eol=lf
# Denote all files that are truly binary and should not be modified
+*.bin binary
*.bmp binary
*.ttf binary
*.gz binary
diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c
index 95169ba..3e051e3 100644
--- a/arch/arm/lib/reset.c
+++ b/arch/arm/lib/reset.c
@@ -25,6 +25,7 @@
#include <cpu_func.h>
#include <irq_func.h>
#include <linux/delay.h>
+#include <stdio.h>
__weak void reset_misc(void)
{
@@ -33,8 +34,7 @@
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
puts ("resetting ...\n");
-
- mdelay(50); /* wait 50 ms */
+ flush();
disable_interrupts();
diff --git a/arch/arm/mach-k3/include/mach/am62_hardware.h b/arch/arm/mach-k3/include/mach/am62_hardware.h
index 17d3228..db4a32c 100644
--- a/arch/arm/mach-k3/include/mach/am62_hardware.h
+++ b/arch/arm/mach-k3/include/mach/am62_hardware.h
@@ -55,7 +55,6 @@
#define ROM_EXTENDED_BOOT_DATA_INFO 0x43c3f1e0
-/* Use Last 2K as Scratch pad */
-#define TI_SRAM_SCRATCH_BOARD_EEPROM_START 0x70000000
+#define TI_SRAM_SCRATCH_BOARD_EEPROM_START 0x43c30000
#endif /* __ASM_ARCH_AM62_HARDWARE_H */
diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig
index 585bac4..a149f81 100644
--- a/configs/am62x_evm_a53_defconfig
+++ b/configs/am62x_evm_a53_defconfig
@@ -68,7 +68,7 @@
CONFIG_SPL_MMC_SDHCI_ADMA=y
CONFIG_MMC_SDHCI_AM654=y
CONFIG_DM_SPI_FLASH=y
-CONFIG_SF_DEFAULT_MODE=0x3
+CONFIG_SF_DEFAULT_MODE=0x0
CONFIG_SF_DEFAULT_SPEED=25000000
CONFIG_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPI_FLASH_SOFT_RESET=y
diff --git a/configs/am62x_evm_r5_defconfig b/configs/am62x_evm_r5_defconfig
index 4f9ecf2..44a9130 100644
--- a/configs/am62x_evm_r5_defconfig
+++ b/configs/am62x_evm_r5_defconfig
@@ -8,7 +8,7 @@
CONFIG_SOC_K3_AM625=y
CONFIG_TARGET_AM625_R5_EVM=y
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x7000ffff
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x43c3a7f0
CONFIG_ENV_SIZE=0x20000
CONFIG_DM_GPIO=y
CONFIG_SPL_DM_SPI=y
@@ -19,7 +19,9 @@
CONFIG_SPL_SERIAL=y
CONFIG_SPL_DRIVERS_MISC=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
-CONFIG_SPL_SIZE_LIMIT=0x40000
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x7000
+CONFIG_SPL_SIZE_LIMIT=0x3A7F0
+CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x3500
CONFIG_SPL_FS_FAT=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
@@ -28,10 +30,14 @@
CONFIG_SPL_LOAD_FIT_ADDRESS=0x80080000
CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
# CONFIG_DISPLAY_CPUINFO is not set
-CONFIG_SPL_MAX_SIZE=0x58000
+CONFIG_SPL_SIZE_LIMIT_SUBTRACT_GD=y
+CONFIG_SPL_SIZE_LIMIT_SUBTRACT_MALLOC=y
+CONFIG_SPL_MAX_SIZE=0x3B000
+CONFIG_SPL_PAD_TO=0x0
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
-CONFIG_SPL_BSS_START_ADDR=0x43c37800
-CONFIG_SPL_BSS_MAX_SIZE=0x5000
+CONFIG_SPL_BSS_START_ADDR=0x43c3b000
+CONFIG_SPL_BSS_MAX_SIZE=0x3000
+CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y
CONFIG_SPL_SYS_MALLOC_SIMPLE=y
CONFIG_SPL_STACK_R=y
CONFIG_SPL_SEPARATE_BSS=y
diff --git a/doc/README.mpc85xx-sd-spi-boot b/doc/README.mpc85xx-sd-spi-boot
index 329de4e..7608fc3 100644
--- a/doc/README.mpc85xx-sd-spi-boot
+++ b/doc/README.mpc85xx-sd-spi-boot
@@ -14,7 +14,7 @@
========================
you can browse it online at:
-https://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/boot-format
+https://github.com/nxp-qoriq-yocto-sdk/boot-format
Building
========
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index d92b964..05c3a43 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -2150,7 +2150,7 @@
flow_req.rx_psinfo_present = 1;
else
flow_req.rx_psinfo_present = 0;
- flow_req.rx_error_handling = 1;
+ flow_req.rx_error_handling = 0;
ret = tisci_ops->rx_flow_cfg(tisci_rm->tisci, &flow_req);
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index f50de7c..9a9c520 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -2373,6 +2373,10 @@
struct ext2_data *data;
int status;
struct ext_filesystem *fs = get_fs();
+
+ if (part_length < SUPERBLOCK_SIZE)
+ return 0;
+
data = zalloc(SUPERBLOCK_SIZE);
if (!data)
return 0;
diff --git a/include/configs/total_compute.h b/include/configs/total_compute.h
index 436bf62..a8bd8e2 100644
--- a/include/configs/total_compute.h
+++ b/include/configs/total_compute.h
@@ -2,7 +2,7 @@
/*
* Configuration for Total Compute platform. Parts were derived from other ARM
* configurations.
- * (C) Copyright 2020 Arm Limited
+ * (C) Copyright 2020-2023 Arm Limited
* Usama Arif <usama.arif@arm.com>
*/
@@ -11,7 +11,8 @@
/* Link Definitions */
-#define UART0_BASE 0x7ff80000
+/* AP non-secure UART base address */
+#define UART0_BASE 0x2A400000
/* PL011 Serial Configuration */
#define CFG_PL011_CLOCK 7372800
diff --git a/lib/panic.c b/lib/panic.c
index 58382ac..66ae17f 100644
--- a/lib/panic.c
+++ b/lib/panic.c
@@ -15,6 +15,7 @@
#include <command.h>
#endif
#include <linux/delay.h>
+#include <stdio.h>
static void panic_finish(void) __attribute__ ((noreturn));
@@ -24,7 +25,8 @@
#if defined(CONFIG_PANIC_HANG)
hang();
#else
- udelay(100000); /* allow messages to go out */
+ flush(); /* flush the panic message before reset */
+
do_reset(NULL, 0, 0, NULL);
#endif
while (1)