mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
Merge tag 'u-boot-stm32-20231110' of https://source.denx.de/u-boot/custodians/u-boot-stm
_ Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled _ Fix issue following DT sync with kernel 6.3 for stm32mp15xx-ev1 and DHSOM SoM _ Enable TCP, IPv6, wget on DH STM32MP15 DHSOM _ Limit u-boot.itb size to 0x160000 bytes on DH STM32MP15 DHSOM _ Read auth stats and boot_partition from tamp
This commit is contained in:
commit
3b913c1482
8 changed files with 69 additions and 19 deletions
|
@ -135,20 +135,28 @@
|
|||
|
||||
&qspi_bk1_pins_a {
|
||||
bootph-pre-ram;
|
||||
pins1 {
|
||||
pins {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
pins2 {
|
||||
};
|
||||
|
||||
&qspi_cs1_pins_a {
|
||||
bootph-pre-ram;
|
||||
pins {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
};
|
||||
|
||||
&qspi_bk2_pins_a {
|
||||
bootph-pre-ram;
|
||||
pins1 {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
pins2 {
|
||||
pins {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
};
|
||||
|
||||
&qspi_cs2_pins_a {
|
||||
bootph-pre-ram;
|
||||
pins {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -134,20 +134,14 @@
|
|||
|
||||
&qspi_bk1_pins_a {
|
||||
bootph-pre-ram;
|
||||
pins1 {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
pins2 {
|
||||
pins {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
};
|
||||
|
||||
&qspi_bk2_pins_a {
|
||||
&qspi_cs1_pins_a {
|
||||
bootph-pre-ram;
|
||||
pins1 {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
pins2 {
|
||||
pins {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -98,10 +98,14 @@
|
|||
|
||||
&qspi_bk1_pins_a {
|
||||
bootph-pre-ram;
|
||||
pins1 {
|
||||
pins {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
pins2 {
|
||||
};
|
||||
|
||||
&qspi_cs1_pins_a {
|
||||
bootph-pre-ram;
|
||||
pins {
|
||||
bootph-pre-ram;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -40,6 +40,13 @@ u32 get_bootmode(void)
|
|||
TAMP_BOOT_MODE_SHIFT;
|
||||
}
|
||||
|
||||
u32 get_bootauth(void)
|
||||
{
|
||||
/* read boot auth status and partition from TAMP backup register */
|
||||
return (readl(TAMP_BOOT_CONTEXT) & TAMP_BOOT_AUTH_MASK) >>
|
||||
TAMP_BOOT_AUTH_SHIFT;
|
||||
}
|
||||
|
||||
/*
|
||||
* weak function overidde: set the DDR/SYSRAM executable before to enable the
|
||||
* MMU and configure DACR, for early early_enable_caches (SPL or pre-reloc)
|
||||
|
@ -91,10 +98,10 @@ static void early_enable_caches(void)
|
|||
if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
|
||||
return;
|
||||
|
||||
if (!(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))) {
|
||||
#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
|
||||
gd->arch.tlb_size = PGTABLE_SIZE;
|
||||
gd->arch.tlb_addr = (unsigned long)&early_tlb;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* enable MMU (default configuration) */
|
||||
dcache_enable();
|
||||
|
@ -371,8 +378,24 @@ __weak void stm32mp_misc_init(void)
|
|||
{
|
||||
}
|
||||
|
||||
static int setup_boot_auth_info(void)
|
||||
{
|
||||
char buf[10];
|
||||
u32 bootauth = get_bootauth();
|
||||
|
||||
snprintf(buf, sizeof(buf), "%d", bootauth >> 4);
|
||||
env_set("boot_auth", buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%d", bootauth &
|
||||
(u32)TAMP_BOOT_PARTITION_MASK);
|
||||
env_set("boot_part", buf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int arch_misc_init(void)
|
||||
{
|
||||
setup_boot_auth_info();
|
||||
setup_boot_mode();
|
||||
setup_mac_address();
|
||||
setup_serial_number();
|
||||
|
|
|
@ -139,8 +139,12 @@ enum boot_device {
|
|||
|
||||
#define TAMP_BOOT_MODE_MASK GENMASK(15, 8)
|
||||
#define TAMP_BOOT_MODE_SHIFT 8
|
||||
#define TAMP_BOOT_AUTH_MASK GENMASK(23, 16)
|
||||
#define TAMP_BOOT_AUTH_SHIFT 16
|
||||
#define TAMP_BOOT_DEVICE_MASK GENMASK(7, 4)
|
||||
#define TAMP_BOOT_INSTANCE_MASK GENMASK(3, 0)
|
||||
#define TAMP_BOOT_AUTH_ST_MASK GENMASK(7, 4)
|
||||
#define TAMP_BOOT_PARTITION_MASK GENMASK(3, 0)
|
||||
#define TAMP_BOOT_FORCED_MASK GENMASK(7, 0)
|
||||
|
||||
enum forced_boot_mode {
|
||||
|
|
|
@ -66,6 +66,9 @@ void get_soc_name(char name[SOC_NAME_SIZE]);
|
|||
/* return boot mode */
|
||||
u32 get_bootmode(void);
|
||||
|
||||
/* return auth status and partition */
|
||||
u32 get_bootauth(void);
|
||||
|
||||
int get_eth_nb(void);
|
||||
int setup_mac_address(void);
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@ CONFIG_SPL_SPI=y
|
|||
CONFIG_SYS_LOAD_ADDR=0xc2000000
|
||||
CONFIG_SYS_MEMTEST_START=0xc0000000
|
||||
CONFIG_SYS_MEMTEST_END=0xc4000000
|
||||
CONFIG_HAS_BOARD_SIZE_LIMIT=y
|
||||
CONFIG_BOARD_SIZE_LIMIT=1441792
|
||||
CONFIG_FIT=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_SPL_LOAD_FIT_ADDRESS=0xc1000000
|
||||
|
@ -76,7 +78,10 @@ CONFIG_CMD_REMOTEPROC=y
|
|||
CONFIG_CMD_SPI=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
CONFIG_CMD_DHCP6=y
|
||||
CONFIG_CMD_TFTPPUT=y
|
||||
CONFIG_SYS_DISABLE_AUTOLOAD=y
|
||||
CONFIG_CMD_WGET=y
|
||||
CONFIG_CMD_BOOTCOUNT=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_TIME=y
|
||||
|
@ -101,6 +106,8 @@ CONFIG_IP_DEFRAG=y
|
|||
CONFIG_TFTP_TSIZE=y
|
||||
CONFIG_USE_SERVERIP=y
|
||||
CONFIG_SERVERIP="192.168.1.1"
|
||||
CONFIG_PROT_TCP_SACK=y
|
||||
CONFIG_IPV6=y
|
||||
CONFIG_STM32_ADC=y
|
||||
CONFIG_SPL_BLOCK_CACHE=y
|
||||
CONFIG_BOOTCOUNT_LIMIT=y
|
||||
|
|
|
@ -23,6 +23,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
|||
CONFIG_SPL_SPI=y
|
||||
# CONFIG_ARMV7_VIRT is not set
|
||||
CONFIG_SYS_LOAD_ADDR=0xc2000000
|
||||
CONFIG_HAS_BOARD_SIZE_LIMIT=y
|
||||
CONFIG_BOARD_SIZE_LIMIT=1441792
|
||||
CONFIG_FIT=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_SPL_LOAD_FIT_ADDRESS=0xc1000000
|
||||
|
@ -74,7 +76,10 @@ CONFIG_CMD_REMOTEPROC=y
|
|||
CONFIG_CMD_SPI=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
CONFIG_CMD_DHCP6=y
|
||||
CONFIG_CMD_TFTPPUT=y
|
||||
CONFIG_SYS_DISABLE_AUTOLOAD=y
|
||||
CONFIG_CMD_WGET=y
|
||||
CONFIG_CMD_BOOTCOUNT=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_TIME=y
|
||||
|
@ -99,6 +104,8 @@ CONFIG_IP_DEFRAG=y
|
|||
CONFIG_TFTP_TSIZE=y
|
||||
CONFIG_USE_SERVERIP=y
|
||||
CONFIG_SERVERIP="192.168.1.1"
|
||||
CONFIG_PROT_TCP_SACK=y
|
||||
CONFIG_IPV6=y
|
||||
CONFIG_STM32_ADC=y
|
||||
CONFIG_SPL_BLOCK_CACHE=y
|
||||
CONFIG_BOOTCOUNT_LIMIT=y
|
||||
|
|
Loading…
Reference in a new issue