Skip to content

Commit

Permalink
Merge tag 'v2021.07-rc5' into next
Browse files Browse the repository at this point in the history
Prepare v2021.07-rc5

# gpg: Signature made Mon 28 Jun 2021 03:39:36 PM EDT
# gpg:                using RSA key 1A3C7F70E08FAB1707809BBF147C39FF9634B72C
# gpg: Good signature from "Thomas Rini <[email protected]>" [ultimate]

# Conflicts:
#	configs/am64x_evm_r5_defconfig
  • Loading branch information
trini committed Jun 28, 2021
2 parents 67edf25 + 3ef4572 commit 6d0453d
Show file tree
Hide file tree
Showing 1,245 changed files with 10,273 additions and 2,858 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
vmImage: $(windows_vm)
steps:
- powershell: |
(New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2020-07-20/msys2-base-x86_64-20200720.sfx.exe", "sfx.exe")
(New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2021-06-04/msys2-base-x86_64-20210604.sfx.exe", "sfx.exe")
displayName: 'Install MSYS2'
- script: |
sfx.exe -y -o%CD:~0,2%\
Expand Down
21 changes: 21 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,7 @@ F: arch/mips/dts/mrvl,cn73xx.dtsi

MMC
M: Peng Fan <[email protected]>
M: Jaehoon Chung <[email protected]>
S: Maintained
T: git https://source.denx.de/u-boot/custodians/u-boot-mmc.git
F: drivers/mmc/
Expand Down Expand Up @@ -913,12 +914,32 @@ S: Maintained
T: git https://source.denx.de/u-boot/custodians/u-boot-nios.git
F: arch/nios2/

NVMe
M: Bin Meng <[email protected]>
S: Maintained
F: drivers/nvme/
F: cmd/nvme.c
F: include/nvme.h
F: doc/develop/driver-model/nvme.rst

ONENAND
#M: Lukasz Majewski <[email protected]>
S: Orphaned (Since 2017-01)
T: git https://source.denx.de/u-boot/custodians/u-boot-onenand.git
F: drivers/mtd/onenand/

OUT4-IMX6ULL-NANO BOARD
M: Oleh Kravchenko <[email protected]>
S: Maintained
T: git https://github.com/Oleh-Kravchenko/u-boot-out4.git
F: arch/arm/dts/ev-imx280-nano-x-mb.dts
F: arch/arm/dts/o4-imx-nano.dts
F: arch/arm/dts/o4-imx6ull-nano.dtsi
F: board/out4
F: configs/ev-imx280-nano-x-mb_defconfig
F: configs/o4-imx6ull-nano_defconfig
F: include/configs/o4-imx6ull-nano.h

PATMAN
M: Simon Glass <[email protected]>
S: Maintained
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
VERSION = 2021
PATCHLEVEL = 07
SUBLEVEL =
EXTRAVERSION = -rc4
EXTRAVERSION = -rc5
NAME =

# *DOCUMENTATION*
Expand Down Expand Up @@ -2279,7 +2279,7 @@ endif
$(build)=$(build-dir) $(@:.ko=.o)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost

quiet_cmd_genenv = GENENV $@
quiet_cmd_genenv = GENENV $@
cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ env/common.o; \
sed --in-place -e 's/\x00/\x0A/g' $@

Expand Down
2 changes: 0 additions & 2 deletions arch/arc/include/asm/global_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#ifndef __ASM_ARC_GLOBAL_DATA_H
#define __ASM_ARC_GLOBAL_DATA_H

#include <config.h>

#ifndef __ASSEMBLY__
/* Architecture-specific global data */
struct arch_global_data {
Expand Down
19 changes: 19 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,24 @@ config TARGET_PG_WCOM_SELI8
SELI8 is a QorIQ LS1021a based service unit card used
in XMC20 and FOX615 product families.

config TARGET_PG_WCOM_EXPU1
bool "Support Hitachi-Powergrids EXPU1 service unit card"
select ARCH_LS1021A
select ARCH_SUPPORT_PSCI
select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
select CPU_V7A
select CPU_V7_HAS_NONSEC
select CPU_V7_HAS_VIRT
select SYS_FSL_DDR
select FSL_DDR_INTERACTIVE
select VENDOR_KM
imply SCSI
help
Support for Hitachi-Powergrids EXPU1 service unit card.
EXPU1 is a QorIQ LS1021a based service unit card used
in XMC20 and FOX615 product families.

config TARGET_LS1021ATSN
bool "Support ls1021atsn"
select ARCH_LS1021A
Expand Down Expand Up @@ -2008,6 +2026,7 @@ source "board/hisilicon/poplar/Kconfig"
source "board/isee/igep003x/Kconfig"
source "board/kontron/sl28/Kconfig"
source "board/myir/mys_6ulx/Kconfig"
source "board/seeed/npi_imx6ull/Kconfig"
source "board/spear/spear300/Kconfig"
source "board/spear/spear310/Kconfig"
source "board/spear/spear320/Kconfig"
Expand Down
12 changes: 8 additions & 4 deletions arch/arm/cpu/armv8/fsl-layerscape/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ config ARCH_LX2162A
select SYS_FSL_DDR_VER_50
select SYS_FSL_EC1
select SYS_FSL_EC2
select SYS_FSL_ERRATUM_A050106
select SYS_FSL_ERRATUM_A050204
select SYS_FSL_ERRATUM_A011334
select SYS_FSL_ESDHC_UNRELIABLE_PULSE_DETECTION_WORKAROUND
select SYS_FSL_HAS_RGMII
select SYS_FSL_HAS_SEC
select SYS_FSL_HAS_CCN508
Expand Down Expand Up @@ -253,7 +255,9 @@ config ARCH_LX2160A
select SYS_FSL_DDR_VER_50
select SYS_FSL_EC1
select SYS_FSL_EC2
select SYS_FSL_ERRATUM_A050106
select SYS_FSL_ERRATUM_A050204
select SYS_FSL_ERRATUM_A011334
select SYS_FSL_ESDHC_UNRELIABLE_PULSE_DETECTION_WORKAROUND
select SYS_FSL_HAS_RGMII
select SYS_FSL_HAS_SEC
select SYS_FSL_HAS_CCN508
Expand Down Expand Up @@ -371,8 +375,8 @@ config SYS_FSL_ERRATUM_A009008
config SYS_FSL_ERRATUM_A009798
bool "Workaround for USB PHY erratum A009798"

config SYS_FSL_ERRATUM_A050106
bool "Workaround for USB PHY erratum A050106"
config SYS_FSL_ERRATUM_A050204
bool "Workaround for USB PHY erratum A050204"
help
USB3.0 Receiver needs to enable fixed equalization
for each of PHY instances in an SOC. This is similar
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/armv8/fsl-layerscape/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ int cpu_eth_init(struct bd_info *bis)
return error;
}

static inline int check_psci(void)
int check_psci(void)
{
unsigned int psci_ver;

Expand Down
1 change: 1 addition & 0 deletions arch/arm/cpu/armv8/fsl-layerscape/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
int fsl_qoriq_core_to_cluster(unsigned int core);
u32 initiator_type(u32 cluster, int init_id);
u32 cpu_mask(void);
int check_psci(void);
150 changes: 149 additions & 1 deletion arch/arm/cpu/armv8/fsl-layerscape/fdt.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2014-2015 Freescale Semiconductor, Inc.
* Copyright 2020 NXP
* Copyright 2020-2021 NXP
*/

#include <common.h>
Expand Down Expand Up @@ -478,6 +478,151 @@ static bool crypto_is_disabled(unsigned int svr)
return false;
}

#ifdef CONFIG_FSL_PFE
void pfe_set_firmware_in_fdt(void *blob, int pfenode, void *pfw, char *pename,
unsigned int len)
{
int rc, fwnode;
unsigned int phandle;
char subnode_str[32], prop_str[32], phandle_str[32], s[64];

sprintf(subnode_str, "pfe-%s-firmware", pename);
sprintf(prop_str, "fsl,pfe-%s-firmware", pename);
sprintf(phandle_str, "fsl,%s-firmware", pename);

/*Add PE FW to fdt.*/
/* Increase the size of the fdt to make room for the node. */
rc = fdt_increase_size(blob, len);
if (rc < 0) {
printf("Unable to make room for %s firmware: %s\n", pename,
fdt_strerror(rc));
return;
}

/* Create the firmware node. */
fwnode = fdt_add_subnode(blob, pfenode, subnode_str);
if (fwnode < 0) {
fdt_get_path(blob, pfenode, s, sizeof(s));
printf("Could not add firmware node to %s: %s\n", s,
fdt_strerror(fwnode));
return;
}

rc = fdt_setprop_string(blob, fwnode, "compatible", prop_str);
if (rc < 0) {
fdt_get_path(blob, fwnode, s, sizeof(s));
printf("Could not add compatible property to node %s: %s\n", s,
fdt_strerror(rc));
return;
}

rc = fdt_setprop_u32(blob, fwnode, "length", len);
if (rc < 0) {
fdt_get_path(blob, fwnode, s, sizeof(s));
printf("Could not add compatible property to node %s: %s\n", s,
fdt_strerror(rc));
return;
}

/*create phandle and set the property*/
phandle = fdt_create_phandle(blob, fwnode);
if (!phandle) {
fdt_get_path(blob, fwnode, s, sizeof(s));
printf("Could not add phandle property to node %s: %s\n", s,
fdt_strerror(rc));
return;
}

rc = fdt_setprop(blob, fwnode, phandle_str, pfw, len);
if (rc < 0) {
fdt_get_path(blob, fwnode, s, sizeof(s));
printf("Could not add firmware property to node %s: %s\n", s,
fdt_strerror(rc));
return;
}
}

void fdt_fixup_pfe_firmware(void *blob)
{
int pfenode;
unsigned int len_class = 0, len_tmu = 0, len_util = 0;
const char *p;
void *pclassfw, *ptmufw, *putilfw;

/* The first PFE we find, will contain the actual firmware. */
pfenode = fdt_node_offset_by_compatible(blob, -1, "fsl,pfe");
if (pfenode < 0)
/* Exit silently if there are no PFE devices */
return;

/* If we already have a firmware node, then also exit silently. */
if (fdt_node_offset_by_compatible(blob, -1,
"fsl,pfe-class-firmware") > 0)
return;

/* If the environment variable is not set, then exit silently */
p = env_get("class_elf_firmware");
if (!p)
return;

pclassfw = (void *)simple_strtoul(p, NULL, 16);
if (!pclassfw)
return;

p = env_get("class_elf_size");
if (!p)
return;
len_class = simple_strtoul(p, NULL, 16);

/* If the environment variable is not set, then exit silently */
p = env_get("tmu_elf_firmware");
if (!p)
return;

ptmufw = (void *)simple_strtoul(p, NULL, 16);
if (!ptmufw)
return;

p = env_get("tmu_elf_size");
if (!p)
return;
len_tmu = simple_strtoul(p, NULL, 16);

if (len_class == 0 || len_tmu == 0) {
printf("PFE FW corrupted. CLASS FW size %d, TMU FW size %d\n",
len_class, len_tmu);
return;
}

/*Add CLASS FW to fdt.*/
pfe_set_firmware_in_fdt(blob, pfenode, pclassfw, "class", len_class);

/*Add TMU FW to fdt.*/
pfe_set_firmware_in_fdt(blob, pfenode, ptmufw, "tmu", len_tmu);

/* Util PE firmware is handled separately as it is not a usual case*/
p = env_get("util_elf_firmware");
if (!p)
return;

putilfw = (void *)simple_strtoul(p, NULL, 16);
if (!putilfw)
return;

p = env_get("util_elf_size");
if (!p)
return;
len_util = simple_strtoul(p, NULL, 16);

if (len_util) {
printf("PFE Util PE firmware is not added to FDT.\n");
return;
}

pfe_set_firmware_in_fdt(blob, pfenode, putilfw, "util", len_util);
}
#endif

void ft_cpu_setup(void *blob, struct bd_info *bd)
{
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
Expand Down Expand Up @@ -534,6 +679,9 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
#ifdef CONFIG_SYS_DPAA_FMAN
fdt_fixup_fman_firmware(blob);
#endif
#ifdef CONFIG_FSL_PFE
fdt_fixup_pfe_firmware(blob);
#endif
#ifndef CONFIG_ARCH_LS1012A
fsl_fdt_disable_usb(blob);
#endif
Expand Down
49 changes: 34 additions & 15 deletions arch/arm/cpu/armv8/fsl-layerscape/mp.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
#include <asm/cache.h>
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/ptrace.h>
#include <asm/system.h>
#include <asm/arch/mp.h>
#include <asm/arch/soc.h>
#include <linux/delay.h>
#include <linux/psci.h>
#include "cpu.h"
#include <asm/arch-fsl-layerscape/soc.h>
#include <efi_loader.h>
Expand Down Expand Up @@ -301,24 +303,41 @@ int cpu_release(u32 nr, int argc, char *const argv[])
u64 *table = get_spin_tbl_addr();
int pos;

pos = core_to_pos(nr);
if (pos <= 0)
return -1;

table += pos * WORDS_PER_SPIN_TABLE_ENTRY;
boot_addr = simple_strtoull(argv[0], NULL, 16);
table[SPIN_TABLE_ELEM_ENTRY_ADDR_IDX] = boot_addr;
flush_dcache_range((unsigned long)table,

if (check_psci()) {
/* SPIN Table is used */
pos = core_to_pos(nr);
if (pos <= 0)
return -1;

table += pos * WORDS_PER_SPIN_TABLE_ENTRY;
table[SPIN_TABLE_ELEM_ENTRY_ADDR_IDX] = boot_addr;
flush_dcache_range((unsigned long)table,
(unsigned long)table + SPIN_TABLE_ELEM_SIZE);
asm volatile("dsb st");
asm volatile("dsb st");

/*
* The secondary CPUs polling the spin-table above for a non-zero
* value. To save power "wfe" is called. Thus call "sev" here to
* wake the CPUs and let them check the spin-table again (see
* slave_cpu loop in lowlevel.S)
*/
asm volatile("sev");
/*
* The secondary CPUs polling the spin-table above for a non-zero
* value. To save power "wfe" is called. Thus call "sev" here to
* wake the CPUs and let them check the spin-table again (see
* slave_cpu loop in lowlevel.S)
*/
asm volatile("sev");
} else {
/* Use PSCI to kick the core */
struct pt_regs regs;

printf("begin to kick cpu core #%d to address %llx\n",
nr, boot_addr);
regs.regs[0] = PSCI_0_2_FN64_CPU_ON;
regs.regs[1] = nr;
regs.regs[2] = boot_addr;
regs.regs[3] = 0;
smc_call(&regs);
if (regs.regs[0])
return -1;
}

return 0;
}
Loading

0 comments on commit 6d0453d

Please sign in to comment.