Merge branch '2023-04-25-assorted-updates-and-fixes'

- A few TI, mpc8379erdb and vexpress64 updates, some arm64 core updates,
  test cleanups, Xen cleanups, assorted code and Kconfig cleanups (many
  in preparation for using clang on ARM), psci pre-reloc fixes, enable
  PCI bus mastering for ATA devices, and a gpio-uclass bugfix
This commit is contained in:
Tom Rini
2023-04-26 08:24:34 -04:00
35 changed files with 314 additions and 131 deletions

View File

@@ -175,6 +175,8 @@ config CC_HAS_ASM_INLINE
config XEN
bool "Select U-Boot be run as a bootloader for XEN Virtual Machine"
depends on ARM64
select SSCANF
help
Enabling this option will make U-Boot be run as a bootloader
for XEN [1] Virtual Machine.

View File

@@ -437,6 +437,7 @@ KBUILD_LDFLAGS :=
ifeq ($(cc-name),clang)
ifneq ($(CROSS_COMPILE),)
CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%))
LDPPFLAGS += $(CLANG_TARGET)
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
CLANG_PREFIX := --prefix=$(GCC_TOOLCHAIN_DIR)
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
@@ -893,8 +894,10 @@ u-boot-main := $(libs-y)
ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y)
PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a
else
ifndef CONFIG_CC_IS_CLANG
PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc
endif
endif
PLATFORM_LIBS += $(PLATFORM_LIBGCC)
ifdef CONFIG_CC_COVERAGE

View File

@@ -1,13 +1,14 @@
menu "API"
config API
bool "Enable U-Boot API"
depends on CC_IS_GCC
help
This option enables the U-Boot API. See api/README for more information.
menu "API"
depends on API
config SYS_MMC_MAX_DEVICE
int "Maximum number of MMC devices exposed via the API"
depends on API
default 1
config EXAMPLES

View File

@@ -12,7 +12,7 @@ config ARM64
config ARM64_CRC32
bool "Enable support for CRC32 instruction"
depends on ARM64
depends on ARM64 && CC_IS_GCC
default y
help
ARMv8 implements dedicated crc32 instruction for crc32 calculation.
@@ -2044,7 +2044,6 @@ config TARGET_XENGUEST_ARM64
select OF_CONTROL
select LINUX_KERNEL_IMAGE_HEADER
select XEN_SERIAL
select SSCANF
imply OF_HAS_PRIOR_STAGE
config ARCH_GXP

View File

@@ -3,7 +3,13 @@
# (C) Copyright 2000-2002
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
CFLAGS_NON_EFI := -fno-pic -ffixed-r9 -ffunction-sections -fdata-sections \
ifeq ($(CONFIG_ARM64),y)
FIXED_REG := -ffixed-x18
else
FIXED_REG := -ffixed-r9
endif
CFLAGS_NON_EFI := -fno-pic $(FIXED_REG) -ffunction-sections -fdata-sections \
-fstack-protector-strong
CFLAGS_EFI := -fpic -fshort-wchar
@@ -15,7 +21,7 @@ ifneq ($(LTO_ENABLE),y)
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
endif
PLATFORM_RELFLAGS += -fno-common -ffixed-r9
PLATFORM_RELFLAGS += -fno-common $(FIXED_REG)
PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
$(call cc-option,-mgeneral-regs-only) \
$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))

View File

@@ -134,8 +134,8 @@ ENTRY(c_runtime_cpu_setup)
*/
#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
mcr p15, 0, r0, c7, c5, 0 @ invalidate icache
mcr p15, 0, r0, c7, c10, 4 @ DSB
mcr p15, 0, r0, c7, c5, 4 @ ISB
dsb
isb
#endif
bx lr
@@ -188,8 +188,8 @@ ENTRY(cpu_init_cp15)
mcr p15, 0, r0, c8, c7, 0 @ invalidate TLBs
mcr p15, 0, r0, c7, c5, 0 @ invalidate icache
mcr p15, 0, r0, c7, c5, 6 @ invalidate BP array
mcr p15, 0, r0, c7, c10, 4 @ DSB
mcr p15, 0, r0, c7, c5, 4 @ ISB
dsb
isb
/*
* disable MMU stuff and caches

View File

@@ -93,10 +93,16 @@ u64 get_tcr(u64 *pips, u64 *pva_bits)
if (el == 1) {
tcr = TCR_EL1_RSVD | (ips << 32) | TCR_EPD1_DISABLE;
if (gd->arch.has_hafdbs)
tcr |= TCR_EL1_HA | TCR_EL1_HD;
} else if (el == 2) {
tcr = TCR_EL2_RSVD | (ips << 16);
if (gd->arch.has_hafdbs)
tcr |= TCR_EL2_HA | TCR_EL2_HD;
} else {
tcr = TCR_EL3_RSVD | (ips << 16);
if (gd->arch.has_hafdbs)
tcr |= TCR_EL3_HA | TCR_EL3_HD;
}
/* PTWs cacheable, inner/outer WBWA and inner shareable */
@@ -200,6 +206,9 @@ static void __cmo_on_leaves(void (*cmo_fn)(unsigned long, unsigned long),
attrs != PTE_BLOCK_MEMTYPE(MT_NORMAL_NC))
continue;
if (gd->arch.has_hafdbs && (pte & (PTE_RDONLY | PTE_DBM)) != PTE_DBM)
continue;
end = va + BIT(level2shift(level)) - 1;
/* No intersection with RAM? */
@@ -309,7 +318,7 @@ static void map_range(u64 virt, u64 phys, u64 size, int level,
for (i = idx; size; i++) {
u64 next_size, *next_table;
if (level >= 1 &&
if (level >= gd->arch.first_block_level &&
size >= map_size && !(virt & (map_size - 1))) {
if (level == 3)
table[i] = phys | attrs | PTE_TYPE_PAGE;
@@ -348,6 +357,12 @@ static void add_map(struct mm_region *map)
if (va_bits < 39)
level = 1;
if (!gd->arch.first_block_level)
gd->arch.first_block_level = 1;
if (gd->arch.has_hafdbs)
attrs |= PTE_DBM | PTE_RDONLY;
map_range(map->virt, map->phys, map->size, level,
(u64 *)gd->arch.tlb_addr, attrs);
}
@@ -361,7 +376,7 @@ static void count_range(u64 virt, u64 size, int level, int *cntp)
for (i = idx; size; i++) {
u64 next_size;
if (level >= 1 &&
if (level >= gd->arch.first_block_level &&
size >= map_size && !(virt & (map_size - 1))) {
virt += map_size;
size -= map_size;
@@ -399,7 +414,16 @@ static int count_ranges(void)
__weak u64 get_page_table_size(void)
{
u64 one_pt = MAX_PTE_ENTRIES * sizeof(u64);
u64 size;
u64 size, mmfr1;
asm volatile("mrs %0, id_aa64mmfr1_el1" : "=r" (mmfr1));
if ((mmfr1 & 0xf) == 2) {
gd->arch.has_hafdbs = true;
gd->arch.first_block_level = 2;
} else {
gd->arch.has_hafdbs = false;
gd->arch.first_block_level = 1;
}
/* Account for all page tables we would need to cover our memory map */
size = one_pt * count_ranges();

View File

@@ -2,7 +2,6 @@
#
# (C) Copyright 2002
# Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
PLATFORM_RELFLAGS += -fno-common -ffixed-x18
PLATFORM_RELFLAGS += $(call cc-option,-mbranch-protection=none)
PF_NO_UNALIGNED := $(call cc-option, -mstrict-align)

View File

@@ -49,10 +49,13 @@
#define PTE_TYPE_BLOCK (1 << 0)
#define PTE_TYPE_VALID (1 << 0)
#define PTE_TABLE_PXN (1UL << 59)
#define PTE_TABLE_XN (1UL << 60)
#define PTE_TABLE_AP (1UL << 61)
#define PTE_TABLE_NS (1UL << 63)
#define PTE_RDONLY BIT(7)
#define PTE_DBM BIT(51)
#define PTE_TABLE_PXN BIT(59)
#define PTE_TABLE_XN BIT(60)
#define PTE_TABLE_AP BIT(61)
#define PTE_TABLE_NS BIT(63)
/*
* Block
@@ -99,6 +102,15 @@
#define TCR_TG0_16K (2 << 14)
#define TCR_EPD1_DISABLE (1 << 23)
#define TCR_EL1_HA BIT(39)
#define TCR_EL1_HD BIT(40)
#define TCR_EL2_HA BIT(21)
#define TCR_EL2_HD BIT(22)
#define TCR_EL3_HA BIT(21)
#define TCR_EL3_HD BIT(22)
#define TCR_EL1_RSVD (1U << 31)
#define TCR_EL2_RSVD (1U << 31 | 1 << 23)
#define TCR_EL3_RSVD (1U << 31 | 1 << 23)

View File

@@ -52,6 +52,8 @@ struct arch_global_data {
#if defined(CONFIG_ARM64)
unsigned long tlb_fillptr;
unsigned long tlb_emerg;
unsigned int first_block_level;
bool has_hafdbs;
#endif
#endif
#ifdef CFG_SYS_MEM_RESERVE_SECURE

View File

@@ -37,6 +37,40 @@ static void show_efi_loaded_images(struct pt_regs *regs)
efi_print_image_infos((void *)regs->elr);
}
static void dump_far(unsigned long esr)
{
unsigned long el, far;
switch ((esr >> 26) & 0b111111) {
case 0x20:
case 0x21:
case 0x24:
case 0x25:
case 0x22:
case 0x34:
case 0x35:
break;
default:
return;
}
asm("mrs %0, CurrentEl": "=r" (el));
switch (el >> 2) {
case 1:
asm("mrs %0, FAR_EL1": "=r" (far));
break;
case 2:
asm("mrs %0, FAR_EL2": "=r" (far));
break;
default:
/* don't print anything to make output pretty */
return;
}
printf(", far 0x%lx", far);
}
static void dump_instr(struct pt_regs *regs)
{
u32 *addr = (u32 *)(regs->elr & ~3UL);
@@ -165,7 +199,9 @@ void do_sync(struct pt_regs *pt_regs)
smh_emulate_trap(pt_regs))
return;
efi_restore_gd();
printf("\"Synchronous Abort\" handler, esr 0x%08lx\n", pt_regs->esr);
printf("\"Synchronous Abort\" handler, esr 0x%08lx", pt_regs->esr);
dump_far(pt_regs->esr);
printf("\n");
show_regs(pt_regs);
show_efi_loaded_images(pt_regs);
panic("Resetting CPU ...\n");

View File

@@ -22,6 +22,51 @@
#include <mmc.h>
#include <remoteproc.h>
struct fwl_data cbass_hc_cfg0_fwls[] = {
{ "PCIE0_CFG", 2577, 7 },
{ "EMMC8SS0_CFG", 2579, 4 },
{ "USB3SS0_CORE", 2580, 4 },
{ "USB3SS1_CORE", 2581, 1 },
}, cbass_hc2_fwls[] = {
{ "PCIE0", 2547, 24 },
{ "HC2_WIZ16B8M4CT2", 2552, 1 },
}, cbass_rc_cfg0_fwls[] = {
{ "EMMCSD4SS0_CFG", 2400, 4 },
}, infra_cbass0_fwls[] = {
{ "PSC0", 5, 1 },
{ "PLL_CTRL0", 6, 1 },
{ "PLL_MMR0", 8, 26 },
{ "CTRL_MMR0", 9, 16 },
{ "GPIO0", 16, 1 },
}, mcu_cbass0_fwls[] = {
{ "MCU_R5FSS0_CORE0", 1024, 4 },
{ "MCU_R5FSS0_CORE0_CFG", 1025, 3 },
{ "MCU_R5FSS0_CORE1", 1028, 4 },
{ "MCU_R5FSS0_CORE1_CFG", 1029, 1 },
{ "MCU_FSS0_CFG", 1032, 12 },
{ "MCU_FSS0_S1", 1033, 8 },
{ "MCU_FSS0_S0", 1036, 8 },
{ "MCU_PSROM49152X32", 1048, 1 },
{ "MCU_MSRAM128KX64", 1050, 8 },
{ "MCU_MSRAM128KX64_CFG", 1051, 1 },
{ "MCU_TIMER0", 1056, 1 },
{ "MCU_TIMER9", 1065, 1 },
{ "MCU_USART0", 1120, 1 },
{ "MCU_I2C0", 1152, 1 },
{ "MCU_CTRL_MMR0", 1200, 8 },
{ "MCU_PLL_MMR0", 1201, 3 },
{ "MCU_CPSW0", 1220, 2 },
}, wkup_cbass0_fwls[] = {
{ "WKUP_PSC0", 129, 1 },
{ "WKUP_PLL_CTRL0", 130, 1 },
{ "WKUP_CTRL_MMR0", 131, 16 },
{ "WKUP_GPIO0", 132, 1 },
{ "WKUP_I2C0", 144, 1 },
{ "WKUP_USART0", 160, 1 },
}, navss_cbass0_fwls[] = {
{ "NACSS_VIRT0", 6253, 1 },
};
static void ctrl_mmr_unlock(void)
{
/* Unlock all WKUP_CTRL_MMR0 module registers */
@@ -150,6 +195,14 @@ void k3_spl_init(void)
if (ret)
panic("Failed to initialize clk-k3!\n");
}
remove_fwl_configs(cbass_hc_cfg0_fwls, ARRAY_SIZE(cbass_hc_cfg0_fwls));
remove_fwl_configs(cbass_hc2_fwls, ARRAY_SIZE(cbass_hc2_fwls));
remove_fwl_configs(cbass_rc_cfg0_fwls, ARRAY_SIZE(cbass_rc_cfg0_fwls));
remove_fwl_configs(infra_cbass0_fwls, ARRAY_SIZE(infra_cbass0_fwls));
remove_fwl_configs(mcu_cbass0_fwls, ARRAY_SIZE(mcu_cbass0_fwls));
remove_fwl_configs(wkup_cbass0_fwls, ARRAY_SIZE(wkup_cbass0_fwls));
remove_fwl_configs(navss_cbass0_fwls, ARRAY_SIZE(navss_cbass0_fwls));
}
/* Output System Firmware version info */

View File

@@ -15,13 +15,14 @@
#include <asm/arch/clocks_omap3.h>
#include <linux/linkage.h>
.arch_extension sec
/*
* Funtion for making PPA HAL API calls in secure devices
* Input:
* R0 - Service ID
* R1 - paramer list
*/
/* TODO: Re-evaluate the comment at the end regarding armv5 vs armv7 */
ENTRY(do_omap3_emu_romcode_call)
PUSH {r4-r12, lr} @ Save all registers from ROM code!
MOV r12, r0 @ Copy the Secure Service ID in R12
@@ -32,8 +33,7 @@ ENTRY(do_omap3_emu_romcode_call)
MOV r6, #0xFF @ Indicate new Task call
mcr p15, 0, r0, c7, c10, 4 @ DSB
mcr p15, 0, r0, c7, c10, 5 @ DMB
.word 0xe1600071 @ SMC #1 to call PPA service - hand assembled
@ because we use -march=armv5
SMC #1 @ Call PPA service
POP {r4-r12, pc}
ENDPROC(do_omap3_emu_romcode_call)

View File

@@ -13,6 +13,11 @@
#address-cells = <1>;
#size-cells = <1>;
aliases {
serial0 = &serial0;
serial1 = &serial1;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -60,6 +65,28 @@
clock-frequency = <0>;
};
serial0: serial@4500 {
cell-index = <0>;
device_type = "serial";
compatible = "fsl,ns16550", "ns16550";
reg = <0x4500 0x100>;
clock-frequency = <333333000>;
interrupts = <9 0x8>;
interrupt-parent = <&ipic>;
bootph-all;
};
serial1: serial@4600 {
cell-index = <1>;
device_type = "serial";
compatible = "fsl,ns16550", "ns16550";
reg = <0x4600 0x100>;
clock-frequency = <333333000>;
interrupts = <10 0x8>;
interrupt-parent = <&ipic>;
bootph-all;
};
ipic: interrupt-controller@700 {
compatible = "fsl,ipic";
interrupt-controller;

View File

@@ -12,8 +12,13 @@ config SYS_CONFIG_NAME
config VEXPRESS64_BASE_MODEL
bool
select SEMIHOSTING
imply VIRTIO_MMIO
select VIRTIO_BLK if VIRTIO_MMIO
select VIRTIO_NET if VIRTIO_MMIO
select DM_ETH if VIRTIO_NET
imply RTC_PL031
select DM_RTC if RTC_PL031
imply EFI_SET_TIME if DM_RTC
select LINUX_KERNEL_IMAGE_HEADER
select POSITION_INDEPENDENT
@@ -23,7 +28,7 @@ choice
config TARGET_VEXPRESS64_BASE_FVP
bool "Support Versatile Express ARMv8a FVP BASE model"
select VEXPRESS64_BASE_MODEL
select OF_BOARD
imply OF_HAS_PRIOR_STAGE
config TARGET_VEXPRESS64_BASER_FVP
bool "Support Versatile Express ARMv8r64 FVP BASE model"

View File

@@ -48,7 +48,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
env_get("dfu_alt_info"))
return;
memset(buf, 0, sizeof(buf));
memset(buf, 0, DFU_ALT_BUF_LEN);
/*
* Currently dfu_alt_info is needed on Qemu ARM64 for

63
board/ti/am64x/am64x.env Normal file
View File

@@ -0,0 +1,63 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/mmc.env>
#include <environment/ti/k3_dfu.env>
findfdt=
if test $board_name = am64x_gpevm; then
setenv name_fdt k3-am642-evm.dtb; fi;
if test $board_name = am64x_skevm; then
setenv name_fdt k3-am642-sk.dtb; fi;
if test $name_fdt = undefined; then
echo WARNING: Could not determine device tree to use; fi;
name_kern=Image
console=ttyS2,115200n8
args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts}
run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
boot=mmc
mmcdev=1
bootpart=1:2
bootdir=/boot
rd_spec=-
init_mmc=run args_all args_mmc
get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
get_overlay_mmc=
fdt address ${fdtaddr};
fdt resize 0x100000;
for overlay in $name_overlays;
do;
load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} &&
fdt apply ${dtboaddr};
done;
get_kern_mmc=load mmc ${bootpart} ${loadaddr}
${bootdir}/${name_kern}
get_fit_mmc=load mmc ${bootpart} ${addr_fit}
${bootdir}/${name_fit}
partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}
args_usb=run finduuid;setenv bootargs console=${console}
${optargs}
root=PARTUUID=${uuid} rw
rootfstype=${mmcrootfstype}
init_usb=run args_all args_usb
get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
get_overlay_usb=
fdt address ${fdtaddr};
fdt resize 0x100000;
for overlay in $name_overlays;
do;
load usb ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && fdt apply
${dtboaddr};
done;
get_kern_usb=load usb ${bootpart} ${loadaddr}
${bootdir}/${name_kern}
get_fit_usb=load usb ${bootpart} ${addr_fit}
${bootdir}/${name_fit}
usbboot=setenv boot usb;
setenv bootpart 0:2;
usb start;
run findfdt;
run init_usb;
run get_kern_usb;
run get_fdt_usb;
run run_kern;

View File

@@ -328,7 +328,7 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a
bool done_select = !select;
bool done = false;
int rd_noffset;
ulong rd_addr;
ulong rd_addr = 0;
char *buf;
if (CONFIG_IS_ENABLED(FIT)) {

View File

@@ -4,6 +4,8 @@ CONFIG_SYS_MALLOC_LEN=0x80000
CONFIG_ENV_SIZE=0x4000
CONFIG_ENV_SECT_SIZE=0x10000
CONFIG_DEFAULT_DEVICE_TREE="mpc8379erdb"
CONFIG_DEBUG_UART_BASE=0xe0004500
CONFIG_DEBUG_UART_CLOCK=333333000
CONFIG_SYS_CLK_FREQ=66666667
CONFIG_ENV_ADDR=0xFE080000
# CONFIG_SYS_PCI_64BIT is not set
@@ -118,6 +120,7 @@ CONFIG_LCRR_DBYP_PLL_BYPASSED=y
CONFIG_LCRR_CLKDIV_8=y
CONFIG_FSL_SERDES=y
CONFIG_USE_UBOOTPATH=y
CONFIG_DEBUG_UART=y
CONFIG_SYS_MONITOR_LEN=524288
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
@@ -185,7 +188,9 @@ CONFIG_MII=y
CONFIG_VSC7385_ENET=y
CONFIG_TSEC_ENET=y
CONFIG_RTC_DS1374=y
CONFIG_SYS_NS16550_SERIAL=y
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_FSL=y

View File

@@ -0,0 +1,5 @@
CONFIG_ARM=y
CONFIG_ARCH_VEXPRESS64=y
CONFIG_DEFAULT_DEVICE_TREE="arm_fvp"
CONFIG_IDENT_STRING=" arm_fvp"
# CONFIG_DISPLAY_CPUINFO is not set

View File

@@ -1152,7 +1152,12 @@ int ahci_probe_scsi(struct udevice *ahci_dev, ulong base)
int ahci_probe_scsi_pci(struct udevice *ahci_dev)
{
ulong base;
u16 vendor, device;
u16 vendor, device, cmd;
/* Enable bus mastering */
dm_pci_read_config16(ahci_dev, PCI_COMMAND, &cmd);
cmd |= PCI_COMMAND_MASTER;
dm_pci_write_config16(ahci_dev, PCI_COMMAND, cmd);
base = (ulong)dm_pci_map_bar(ahci_dev, PCI_BASE_ADDRESS_5, 0, 0,
PCI_REGION_TYPE, PCI_REGION_MEM);

View File

@@ -319,4 +319,5 @@ U_BOOT_DRIVER(psci) = {
#ifdef CONFIG_ARM_SMCCC_FEATURES
.plat_auto = sizeof(struct psci_plat_data),
#endif
.flags = DM_FLAG_PRE_RELOC,
};

View File

@@ -1219,7 +1219,7 @@ int gpio_request_list_by_name_nodev(ofnode node, const char *list_name,
return count;
err:
gpio_free_list_nodev(desc, count - 1);
gpio_free_list_nodev(desc, count);
return ret;
}

View File

@@ -70,12 +70,12 @@ static const char *get_rev_string(u32 idreg)
switch (soc) {
case JTAG_ID_PARTNO_J721E:
if (rev > ARRAY_SIZE(j721e_rev_string_map))
if (rev >= ARRAY_SIZE(j721e_rev_string_map))
goto bail;
return j721e_rev_string_map[rev];
default:
if (rev > ARRAY_SIZE(typical_rev_string_map))
if (rev >= ARRAY_SIZE(typical_rev_string_map))
goto bail;
return typical_rev_string_map[rev];
};

View File

@@ -9,6 +9,11 @@
#include <linux/errno.h>
#include <linux/psci.h>
__weak int psci_sysreset_get_status(struct udevice *dev, char *buf, int size)
{
return -EOPNOTSUPP;
}
static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)
{
switch (type) {
@@ -28,10 +33,12 @@ static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)
static struct sysreset_ops psci_sysreset_ops = {
.request = psci_sysreset_request,
.get_status = psci_sysreset_get_status,
};
U_BOOT_DRIVER(psci_sysreset) = {
.name = "psci-sysreset",
.id = UCLASS_SYSRESET,
.ops = &psci_sysreset_ops,
.flags = DM_FLAG_PRE_RELOC,
};

View File

@@ -1117,7 +1117,7 @@ static int do_request_sense(struct fsg_common *common, struct fsg_buffhd *bh)
{
struct fsg_lun *curlun = &common->luns[common->lun];
u8 *buf = (u8 *) bh->buf;
u32 sd, sdinfo;
u32 sd, sdinfo = 0;
int valid;
/*
@@ -1145,7 +1145,6 @@ static int do_request_sense(struct fsg_common *common, struct fsg_buffhd *bh)
if (!curlun) { /* Unsupported LUNs are okay */
common->bad_lun_okay = 1;
sd = SS_LOGICAL_UNIT_NOT_SUPPORTED;
sdinfo = 0;
valid = 0;
} else {
sd = curlun->sense_data;

View File

@@ -1,6 +1,6 @@
config PVBLOCK
bool "Xen para-virtualized block device"
depends on DM
depends on DM && XEN
select BLK
help
This driver implements the front-end of the Xen virtual

View File

@@ -264,8 +264,15 @@ void clear_evtchn(uint32_t port)
int xen_init(void)
{
int el = current_el();
debug("%s\n", __func__);
if (el != 1) {
puts("XEN:\tnot running from EL1\n");
return 0;
}
map_shared_info(NULL);
init_events();
init_xenbus();

View File

@@ -468,7 +468,7 @@ static int yaffsfs_alt_dir_path(const YCHAR *path, YCHAR **ret_path)
return 0;
}
LIST_HEAD(yaffsfs_deviceList);
static LIST_HEAD(yaffsfs_deviceList);
/*
* yaffsfs_FindDevice

View File

@@ -140,7 +140,9 @@
/*
* Serial Port
*/
#if !CONFIG_IS_ENABLED(DM_SERIAL) && !CONFIG_IS_ENABLED(DM_CLK)
#define CFG_SYS_NS16550_CLK get_bus_freq(0)
#endif
#define CFG_SYS_BAUDRATE_TABLE \
{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}

View File

@@ -18,91 +18,6 @@
/* DDR Configuration */
#define CFG_SYS_SDRAM_BASE1 0x880000000
#define PARTS_DEFAULT \
/* Linux partitions */ \
"name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0"
/* U-Boot general configuration */
#define EXTRA_ENV_AM642_BOARD_SETTINGS \
"findfdt=" \
"if test $board_name = am64x_gpevm; then " \
"setenv fdtfile k3-am642-evm.dtb; fi; " \
"if test $board_name = am64x_skevm; then " \
"setenv fdtfile k3-am642-sk.dtb; fi;" \
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0" \
"name_kern=Image\0" \
"console=ttyS2,115200n8\0" \
"args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \
"${mtdparts}\0" \
"run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"
/* U-Boot MMC-specific configuration */
#define EXTRA_ENV_AM642_BOARD_SETTINGS_MMC \
"boot=mmc\0" \
"mmcdev=1\0" \
"bootpart=1:2\0" \
"bootdir=/boot\0" \
"rd_spec=-\0" \
"init_mmc=run args_all args_mmc\0" \
"get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
"get_overlay_mmc=" \
"fdt address ${fdtaddr};" \
"fdt resize 0x100000;" \
"for overlay in $name_overlays;" \
"do;" \
"load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \
"fdt apply ${dtboaddr};" \
"done;\0" \
"get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \
"${bootdir}/${name_kern}\0" \
"get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \
"${bootdir}/${name_fit}\0" \
"partitions=" PARTS_DEFAULT
#define EXTRA_ENV_AM642_BOARD_SETTING_USBMSC \
"args_usb=run finduuid;setenv bootargs console=${console} " \
"${optargs} " \
"root=PARTUUID=${uuid} rw " \
"rootfstype=${mmcrootfstype}\0" \
"init_usb=run args_all args_usb\0" \
"get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
"get_overlay_usb=" \
"fdt address ${fdtaddr};" \
"fdt resize 0x100000;" \
"for overlay in $name_overlays;" \
"do;" \
"load usb ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \
"fdt apply ${dtboaddr};" \
"done;\0" \
"get_kern_usb=load usb ${bootpart} ${loadaddr} " \
"${bootdir}/${name_kern}\0" \
"get_fit_usb=load usb ${bootpart} ${addr_fit} " \
"${bootdir}/${name_fit}\0" \
"usbboot=setenv boot usb;" \
"setenv bootpart 0:2;" \
"usb start;" \
"run findfdt;" \
"run init_usb;" \
"run get_kern_usb;" \
"run get_fdt_usb;" \
"run run_kern\0"
#define EXTRA_ENV_DFUARGS \
DFU_ALT_INFO_MMC \
DFU_ALT_INFO_EMMC \
DFU_ALT_INFO_RAM \
DFU_ALT_INFO_OSPI
/* Incorporate settings into the U-Boot environment */
#define CFG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
DEFAULT_MMC_TI_ARGS \
EXTRA_ENV_AM642_BOARD_SETTINGS \
EXTRA_ENV_AM642_BOARD_SETTINGS_MMC \
EXTRA_ENV_DFUARGS \
EXTRA_ENV_AM642_BOARD_SETTING_USBMSC
/* Now for the remaining common defines */
#include <configs/ti_armv7_common.h>

View File

@@ -3,7 +3,9 @@ config POST
help
See doc/README.POST for more details
menuconfig UNIT_TEST
menu "Unit tests"
config UNIT_TEST
bool "Unit tests"
help
Select this to compile in unit tests for various parts of
@@ -107,3 +109,5 @@ source "test/env/Kconfig"
source "test/lib/Kconfig"
source "test/optee/Kconfig"
source "test/overlay/Kconfig"
endmenu

View File

@@ -1,23 +1,24 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright 2022 Google LLC
if SANDBOX
config TEST_KCONFIG
bool "Enable detection of Kconfig macro errors"
depends on SANDBOX
help
This is used to test that the IF_ENABLED_INT() macro causes a build error
if the value is used when the CONFIG Is not enabled.
if the value is used when the CONFIG is not enabled.
if TEST_KCONFIG
config TEST_KCONFIG_ENABLE
bool "Option to enable"
bool "Provide a value for the Kconfig test"
help
This is the option that controls whether the value is present.
config TEST_KCONFIG_VALUE
int "Value associated with the option"
int "Value used in Kconfig test"
depends on TEST_KCONFIG_ENABLE
help
This is the value whgch is present if TEST_KCONFIG_ENABLE is enabled.
This is the value which is present if TEST_KCONFIG_ENABLE is enabled.
endif # SANDBOX
endif # TEST_KCONFIG

View File

@@ -213,7 +213,7 @@ booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
str(exc))
finally:
if mounted:
u_boot_utils.run_and_log(cons, 'sudo umount %s' % mnt)
u_boot_utils.run_and_log(cons, 'sudo umount --lazy %s' % mnt)
if loop:
u_boot_utils.run_and_log(cons, 'sudo losetup -d %s' % loop)
@@ -274,7 +274,7 @@ label Fedora-Workstation-armhfp-31-1.9 (5.3.7-301.fc31.armv7hl)
str(exc))
finally:
if mounted:
u_boot_utils.run_and_log(cons, 'sudo umount %s' % mnt)
u_boot_utils.run_and_log(cons, 'sudo umount --lazy %s' % mnt)
if loop:
u_boot_utils.run_and_log(cons, 'sudo losetup -d %s' % loop)

2
tools/env/README vendored
View File

@@ -59,5 +59,5 @@ this environment instance. On NAND this is used to limit the range
within which bad blocks are skipped, on NOR it is not used.
To prevent losing changes to the environment and to prevent confusing the MTD
drivers, a lock file at /var/lock/fw_printenv.lock is used to serialize access
drivers, a lock file at /run/fw_printenv.lock is used to serialize access
to the environment.