diff options
author | Tom Rini | 2021-01-05 16:20:26 -0500 |
---|---|---|
committer | Tom Rini | 2021-01-05 16:20:26 -0500 |
commit | 720620e6916ba40b9a173bb07706d2c73f3c23e7 (patch) | |
tree | b085821f1d1137d80e9bb73f405ea0680db338b9 /arch/x86 | |
parent | c86b18074c9d40bfa63cda1068b6dfb810d4377d (diff) | |
parent | 62b07b5173e3d04fabfac42cf1f4779d021f94ad (diff) |
Merge tag 'v2021.01-rc5' into next
Prepare v2021.01-rc5
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/cpu/tangier/Kconfig | 8 | ||||
-rw-r--r-- | arch/x86/cpu/tangier/sdram.c | 43 | ||||
-rw-r--r-- | arch/x86/dts/edison.dts | 14 | ||||
-rw-r--r-- | arch/x86/lib/zimage.c | 15 |
4 files changed, 67 insertions, 13 deletions
diff --git a/arch/x86/cpu/tangier/Kconfig b/arch/x86/cpu/tangier/Kconfig index 571470c74b2..19aaf165d6a 100644 --- a/arch/x86/cpu/tangier/Kconfig +++ b/arch/x86/cpu/tangier/Kconfig @@ -10,9 +10,11 @@ config INTEL_TANGIER imply MMC_SDHCI imply MMC_SDHCI_SDMA imply MMC_SDHCI_TANGIER + imply MISC imply USB + imply USB_XHCI_HCD imply USB_DWC3 - imply BINMAN + imply USB_DWC3_GENERIC if INTEL_TANGIER @@ -27,8 +29,4 @@ config SYS_CAR_SIZE Space in bytes in eSRAM used as Cache-As-RAM (CAR). Note this size must not exceed eSRAM's total size. -config SYS_USB_OTG_BASE - hex - default 0xf9100000 - endif diff --git a/arch/x86/cpu/tangier/sdram.c b/arch/x86/cpu/tangier/sdram.c index df3b9e4ec97..afb08476ed3 100644 --- a/arch/x86/cpu/tangier/sdram.c +++ b/arch/x86/cpu/tangier/sdram.c @@ -196,6 +196,49 @@ unsigned int install_e820_map(unsigned int max_entries, return sfi_setup_e820(max_entries, entries); } +/* + * This function looks for the highest region of memory lower than 2GB which + * has enough space for U-Boot where U-Boot is aligned on a page boundary. It + * overrides the default implementation found elsewhere which simply picks the + * end of RAM, wherever that may be. The location of the stack, the relocation + * address, and how far U-Boot is moved by relocation are set in the global + * data structure. + */ +ulong board_get_usable_ram_top(ulong total_size) +{ + struct sfi_table_simple *sb; + struct sfi_mem_entry *mentry; + ulong dest_addr = 0; + u32 i; + + sb = sfi_search_mmap(); + if (!sb) + panic("No available memory found for relocation"); + + sfi_for_each_mentry(i, sb, mentry) { + unsigned long long start, end; + + if (mentry->type != SFI_MEM_CONV) + continue; + + start = mentry->phys_start; + end = start + (mentry->pages << 12); + + /* Filter memory over 2GB. */ + if (end > 0x7fffffffULL) + end = 0x80000000ULL; + /* Skip this region if it's too small. */ + if (end - start < total_size) + continue; + + /* Use this address if it's the largest so far. */ + if (end > dest_addr) + dest_addr = end; + } + + return dest_addr; +} + int dram_init_banksize(void) { sfi_get_bank_size(); diff --git a/arch/x86/dts/edison.dts b/arch/x86/dts/edison.dts index bc84bc892e7..8d245bffc2f 100644 --- a/arch/x86/dts/edison.dts +++ b/arch/x86/dts/edison.dts @@ -16,7 +16,7 @@ / { model = "Intel Edison"; - compatible = "intel,edison"; + compatible = "intel,edison", "intel,tangier"; aliases { serial0 = &serial0; @@ -105,6 +105,18 @@ reg = <0xff009000 0x1000>; }; + usb: usb@f9100000 { + compatible = "intel,tangier-dwc3"; + #address-cells = <1>; + #size-cells = <1>; + + dwc3: dwc3 { + reg = <0xf9100000 0x100000>; + maximum-speed = "high-speed"; + dr_mode = "peripheral"; + }; + }; + watchdog: wdt@0 { compatible = "intel,tangier-wdt"; }; diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index f154827ec70..708025b2071 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -61,8 +61,8 @@ * BZIMAGE_LOAD_ADDR or ZIMAGE_LOAD_ADDR * @base_ptr: Pointer to the boot parameters, typically at address * DEFAULT_SETUP_BASE - * @cmdline: Address of 'override' command line, or 0 to use the one in the - * setup block + * @cmdline: Environment variable containing the 'override' command line, or + * NULL to use the one in the setup block */ struct zboot_state { ulong bzimage_addr; @@ -71,7 +71,7 @@ struct zboot_state { ulong initrd_size; ulong load_address; struct boot_params *base_ptr; - ulong cmdline; + char *cmdline; } state; enum { @@ -420,7 +420,7 @@ static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc, state.bzimage_addr = 0; } if (argc >= 7) - state.cmdline = simple_strtoul(argv[6], NULL, 16); + state.cmdline = env_get(argv[6]); return 0; } @@ -466,7 +466,7 @@ static int do_zboot_setup(struct cmd_tbl *cmdtp, int flag, int argc, } ret = setup_zimage(base_ptr, (char *)base_ptr + COMMAND_LINE_OFFSET, 0, state.initrd_addr, state.initrd_size, - state.cmdline); + (ulong)state.cmdline); if (ret) { puts("Setting up boot parameters failed ...\n"); return CMD_RET_FAILURE; @@ -757,8 +757,9 @@ U_BOOT_CMDREP_COMPLETE( " initrd size - The size of the initrd image to use, if any.\n" " setup - The address of the kernel setup region, if this\n" " is not at addr\n" - " cmdline - The address of the kernel command line, to\n" - " override U-Boot's normal cmdline generation\n" + " cmdline - Environment variable containing the kernel\n" + " command line, to override U-Boot's normal\n" + " cmdline generation\n" "\n" "Sub-commands to do part of the zboot sequence:\n" "\tstart [addr [arg ...]] - specify arguments\n" |