Compare commits
No commits in common. "master" and "next" have entirely different histories.
@ -2,7 +2,7 @@ variables:
|
|||||||
windows_vm: windows-2019
|
windows_vm: windows-2019
|
||||||
ubuntu_vm: ubuntu-22.04
|
ubuntu_vm: ubuntu-22.04
|
||||||
macos_vm: macOS-12
|
macos_vm: macOS-12
|
||||||
ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20221130-11Jan2023
|
ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20221101-22Nov2022
|
||||||
# Add '-u 0' options for Azure pipelines, otherwise we get "permission
|
# Add '-u 0' options for Azure pipelines, otherwise we get "permission
|
||||||
# denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer",
|
# denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer",
|
||||||
# since our $(ci_runner_image) user is not root.
|
# since our $(ci_runner_image) user is not root.
|
||||||
@ -76,8 +76,8 @@ stages:
|
|||||||
steps:
|
steps:
|
||||||
- script: cppcheck -j$(nproc) --force --quiet --inline-suppr .
|
- script: cppcheck -j$(nproc) --force --quiet --inline-suppr .
|
||||||
|
|
||||||
- job: docs
|
- job: htmldocs
|
||||||
displayName: 'Build documentation'
|
displayName: 'Build HTML documentation'
|
||||||
pool:
|
pool:
|
||||||
vmImage: $(ubuntu_vm)
|
vmImage: $(ubuntu_vm)
|
||||||
container:
|
container:
|
||||||
@ -89,7 +89,6 @@ stages:
|
|||||||
. /tmp/venvhtml/bin/activate
|
. /tmp/venvhtml/bin/activate
|
||||||
pip install -r doc/sphinx/requirements.txt
|
pip install -r doc/sphinx/requirements.txt
|
||||||
make htmldocs
|
make htmldocs
|
||||||
make infodocs
|
|
||||||
|
|
||||||
- job: todo
|
- job: todo
|
||||||
displayName: 'Search for TODO within source tree'
|
displayName: 'Search for TODO within source tree'
|
||||||
@ -429,8 +428,6 @@ stages:
|
|||||||
matrix:
|
matrix:
|
||||||
arc_microblaze_xtensa:
|
arc_microblaze_xtensa:
|
||||||
BUILDMAN: "arc microblaze xtensa"
|
BUILDMAN: "arc microblaze xtensa"
|
||||||
amlogic:
|
|
||||||
BUILDMAN: "amlogic"
|
|
||||||
arm11_arm7_arm920t_arm946es:
|
arm11_arm7_arm920t_arm946es:
|
||||||
BUILDMAN: "arm11 arm7 arm920t arm946es"
|
BUILDMAN: "arm11 arm7 arm920t arm946es"
|
||||||
arm926ejs:
|
arm926ejs:
|
||||||
@ -460,9 +457,9 @@ stages:
|
|||||||
imx6:
|
imx6:
|
||||||
BUILDMAN: "mx6 -x boundary,engicam,freescale,technexion,toradex"
|
BUILDMAN: "mx6 -x boundary,engicam,freescale,technexion,toradex"
|
||||||
imx:
|
imx:
|
||||||
BUILDMAN: "mx -x mx6,imx8,freescale,technexion,toradex"
|
BUILDMAN: "mx -x mx6,freescale,technexion,toradex"
|
||||||
imx8_imx9:
|
imx8:
|
||||||
BUILDMAN: "imx8 imx9"
|
BUILDMAN: "imx8"
|
||||||
keystone2_keystone3:
|
keystone2_keystone3:
|
||||||
BUILDMAN: "k2 k3"
|
BUILDMAN: "k2 k3"
|
||||||
sandbox_asan:
|
sandbox_asan:
|
||||||
@ -516,11 +513,9 @@ stages:
|
|||||||
uniphier:
|
uniphier:
|
||||||
BUILDMAN: "uniphier"
|
BUILDMAN: "uniphier"
|
||||||
aarch64_catch_all:
|
aarch64_catch_all:
|
||||||
BUILDMAN: "aarch64 -x amlogic,bcm,imx8,imx9,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,renesas,sunxi,samsung,socfpga,rk,versal,zynq"
|
BUILDMAN: "aarch64 -x bcm,imx8,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,renesas,sunxi,samsung,socfpga,rk,versal,zynq"
|
||||||
rockchip_32bit:
|
rockchip:
|
||||||
BUILDMAN: "rk -x aarch64"
|
BUILDMAN: "rk"
|
||||||
rockchip_64bit:
|
|
||||||
BUILDMAN: "rk&aarch64"
|
|
||||||
renesas:
|
renesas:
|
||||||
BUILDMAN: "renesas"
|
BUILDMAN: "renesas"
|
||||||
zynq:
|
zynq:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Grab our configured image. The source for this is found
|
# Grab our configured image. The source for this is found
|
||||||
# in the u-boot tree at tools/docker/Dockerfile
|
# in the u-boot tree at tools/docker/Dockerfile
|
||||||
image: trini/u-boot-gitlab-ci-runner:jammy-20221130-11Jan2023
|
image: trini/u-boot-gitlab-ci-runner:jammy-20221101-22Nov2022
|
||||||
|
|
||||||
# We run some tests in different order, to catch some failures quicker.
|
# We run some tests in different order, to catch some failures quicker.
|
||||||
stages:
|
stages:
|
||||||
@ -149,15 +149,14 @@ grep TODO/FIXME/HACK:
|
|||||||
# search for HACK within source tree and ignore HACKKIT board
|
# search for HACK within source tree and ignore HACKKIT board
|
||||||
- grep -r HACK . | grep -v HACKKIT
|
- grep -r HACK . | grep -v HACKKIT
|
||||||
|
|
||||||
# build documentation
|
# build HTML documentation
|
||||||
docs:
|
htmldocs:
|
||||||
stage: testsuites
|
stage: testsuites
|
||||||
script:
|
script:
|
||||||
- virtualenv -p /usr/bin/python3 /tmp/venvhtml
|
- virtualenv -p /usr/bin/python3 /tmp/venvhtml
|
||||||
- . /tmp/venvhtml/bin/activate
|
- . /tmp/venvhtml/bin/activate
|
||||||
- pip install -r doc/sphinx/requirements.txt
|
- pip install -r doc/sphinx/requirements.txt
|
||||||
- make htmldocs
|
- make htmldocs
|
||||||
- make infodocs
|
|
||||||
|
|
||||||
# some statistics about the code base
|
# some statistics about the code base
|
||||||
sloccount:
|
sloccount:
|
||||||
|
5
Kconfig
5
Kconfig
@ -456,12 +456,11 @@ config BUILD_TARGET
|
|||||||
string "Build target special images"
|
string "Build target special images"
|
||||||
default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_ARRIA10
|
default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_ARRIA10
|
||||||
default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_GEN5
|
default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_GEN5
|
||||||
default "u-boot-with-spl.kwb" if ARMADA_32BIT && SPL
|
default "u-boot-with-spl.kwb" if ARCH_MVEBU && SPL
|
||||||
default "u-boot-elf.srec" if RCAR_GEN3
|
default "u-boot-elf.srec" if RCAR_GEN3
|
||||||
default "u-boot.itb" if !BINMAN && SPL_LOAD_FIT && (ARCH_ROCKCHIP || \
|
default "u-boot.itb" if !BINMAN && SPL_LOAD_FIT && (ARCH_ROCKCHIP || \
|
||||||
ARCH_SUNXI || RISCV || ARCH_ZYNQMP)
|
ARCH_SUNXI || RISCV || ARCH_ZYNQMP)
|
||||||
default "u-boot.kwb" if (ARCH_KIRKWOOD || ARMADA_32BIT) && !SPL
|
default "u-boot.kwb" if ARCH_KIRKWOOD
|
||||||
default "u-boot-with-spl.bin" if MPC85xx && !E500MC && !E5500 && !E6500 && SPL
|
|
||||||
default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT
|
default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT
|
||||||
default "u-boot-with-spl.imx" if ARCH_MX6 && SPL
|
default "u-boot-with-spl.imx" if ARCH_MX6 && SPL
|
||||||
help
|
help
|
||||||
|
@ -1198,7 +1198,6 @@ M: Sean Anderson <seanga2@gmail.com>
|
|||||||
S: Maintained
|
S: Maintained
|
||||||
F: doc/api/nvmem.rst
|
F: doc/api/nvmem.rst
|
||||||
F: drivers/misc/nvmem.c
|
F: drivers/misc/nvmem.c
|
||||||
F: drivers/reboot-mode/reboot-mode-nvmem.c
|
|
||||||
F: include/nvmem.h
|
F: include/nvmem.h
|
||||||
|
|
||||||
NXP C45 TJA11XX PHY DRIVER
|
NXP C45 TJA11XX PHY DRIVER
|
||||||
|
4
Makefile
4
Makefile
@ -3,7 +3,7 @@
|
|||||||
VERSION = 2023
|
VERSION = 2023
|
||||||
PATCHLEVEL = 01
|
PATCHLEVEL = 01
|
||||||
SUBLEVEL =
|
SUBLEVEL =
|
||||||
EXTRAVERSION =
|
EXTRAVERSION = -rc4
|
||||||
NAME =
|
NAME =
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
@ -2366,7 +2366,7 @@ tcheck:
|
|||||||
# Documentation targets
|
# Documentation targets
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
|
DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
|
||||||
linkcheckdocs dochelp refcheckdocs texinfodocs infodocs
|
linkcheckdocs dochelp refcheckdocs
|
||||||
PHONY += $(DOC_TARGETS)
|
PHONY += $(DOC_TARGETS)
|
||||||
$(DOC_TARGETS): scripts_basic FORCE
|
$(DOC_TARGETS): scripts_basic FORCE
|
||||||
$(Q)$(MAKE) $(build)=doc $@
|
$(Q)$(MAKE) $(build)=doc $@
|
||||||
|
20
arch/Kconfig
20
arch/Kconfig
@ -384,11 +384,9 @@ config MONITOR_IS_IN_RAM
|
|||||||
bool "U-Boot is loaded in to RAM by a pre-loader"
|
bool "U-Boot is loaded in to RAM by a pre-loader"
|
||||||
depends on M68K || NIOS2
|
depends on M68K || NIOS2
|
||||||
|
|
||||||
menu "Skipping low level initialization functions"
|
|
||||||
depends on ARM || MIPS || RISCV
|
|
||||||
|
|
||||||
config SKIP_LOWLEVEL_INIT
|
config SKIP_LOWLEVEL_INIT
|
||||||
bool "Skip calls to certain low level initialization functions"
|
bool "Skip the calls to certain low level initialization functions"
|
||||||
|
depends on ARM || MIPS || RISCV
|
||||||
help
|
help
|
||||||
If enabled, then certain low level initializations (like setting up
|
If enabled, then certain low level initializations (like setting up
|
||||||
the memory controller) are omitted and/or U-Boot does not relocate
|
the memory controller) are omitted and/or U-Boot does not relocate
|
||||||
@ -398,8 +396,8 @@ config SKIP_LOWLEVEL_INIT
|
|||||||
debugger which performs these initializations itself.
|
debugger which performs these initializations itself.
|
||||||
|
|
||||||
config SPL_SKIP_LOWLEVEL_INIT
|
config SPL_SKIP_LOWLEVEL_INIT
|
||||||
bool "Skip calls to certain low level initialization functions in SPL"
|
bool "Skip the calls to certain low level initialization functions"
|
||||||
depends on SPL
|
depends on SPL && (ARM || MIPS || RISCV)
|
||||||
help
|
help
|
||||||
If enabled, then certain low level initializations (like setting up
|
If enabled, then certain low level initializations (like setting up
|
||||||
the memory controller) are omitted and/or U-Boot does not relocate
|
the memory controller) are omitted and/or U-Boot does not relocate
|
||||||
@ -409,7 +407,7 @@ config SPL_SKIP_LOWLEVEL_INIT
|
|||||||
debugger which performs these initializations itself.
|
debugger which performs these initializations itself.
|
||||||
|
|
||||||
config TPL_SKIP_LOWLEVEL_INIT
|
config TPL_SKIP_LOWLEVEL_INIT
|
||||||
bool "Skip calls to certain low level initialization functions in TPL"
|
bool "Skip the calls to certain low level initialization functions"
|
||||||
depends on SPL && ARM
|
depends on SPL && ARM
|
||||||
help
|
help
|
||||||
If enabled, then certain low level initializations (like setting up
|
If enabled, then certain low level initializations (like setting up
|
||||||
@ -420,7 +418,7 @@ config TPL_SKIP_LOWLEVEL_INIT
|
|||||||
debugger which performs these initializations itself.
|
debugger which performs these initializations itself.
|
||||||
|
|
||||||
config SKIP_LOWLEVEL_INIT_ONLY
|
config SKIP_LOWLEVEL_INIT_ONLY
|
||||||
bool "Skip call to lowlevel_init during early boot ONLY"
|
bool "Skip the call to lowlevel_init during early boot ONLY"
|
||||||
depends on ARM
|
depends on ARM
|
||||||
help
|
help
|
||||||
This allows just the call to lowlevel_init() to be skipped. The
|
This allows just the call to lowlevel_init() to be skipped. The
|
||||||
@ -428,7 +426,7 @@ config SKIP_LOWLEVEL_INIT_ONLY
|
|||||||
performed.
|
performed.
|
||||||
|
|
||||||
config SPL_SKIP_LOWLEVEL_INIT_ONLY
|
config SPL_SKIP_LOWLEVEL_INIT_ONLY
|
||||||
bool "Skip call to lowlevel_init during early SPL boot ONLY"
|
bool "Skip the call to lowlevel_init during early boot ONLY"
|
||||||
depends on SPL && ARM
|
depends on SPL && ARM
|
||||||
help
|
help
|
||||||
This allows just the call to lowlevel_init() to be skipped. The
|
This allows just the call to lowlevel_init() to be skipped. The
|
||||||
@ -436,15 +434,13 @@ config SPL_SKIP_LOWLEVEL_INIT_ONLY
|
|||||||
performed.
|
performed.
|
||||||
|
|
||||||
config TPL_SKIP_LOWLEVEL_INIT_ONLY
|
config TPL_SKIP_LOWLEVEL_INIT_ONLY
|
||||||
bool "Skip call to lowlevel_init during early TPL boot ONLY"
|
bool "Skip the call to lowlevel_init during early boot ONLY"
|
||||||
depends on TPL && ARM
|
depends on TPL && ARM
|
||||||
help
|
help
|
||||||
This allows just the call to lowlevel_init() to be skipped. The
|
This allows just the call to lowlevel_init() to be skipped. The
|
||||||
normal CP15 init (such as enabling the instruction cache) is still
|
normal CP15 init (such as enabling the instruction cache) is still
|
||||||
performed.
|
performed.
|
||||||
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
config SYS_HAS_NONCACHED_MEMORY
|
config SYS_HAS_NONCACHED_MEMORY
|
||||||
bool "Enable reserving a non-cached memory area for drivers"
|
bool "Enable reserving a non-cached memory area for drivers"
|
||||||
depends on (ARM || MIPS) && (RTL8169 || MEDIATEK_ETH)
|
depends on (ARM || MIPS) && (RTL8169 || MEDIATEK_ETH)
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
menu "Functionality shared between NXP SoCs"
|
|
||||||
|
|
||||||
config FSL_TRUST_ARCH_v1
|
config FSL_TRUST_ARCH_v1
|
||||||
bool
|
bool
|
||||||
|
|
||||||
@ -144,6 +142,8 @@ config KEY_REVOCATION
|
|||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
comment "Other functionality shared between NXP SoCs"
|
||||||
|
|
||||||
config DEEP_SLEEP
|
config DEEP_SLEEP
|
||||||
bool "Enable SoC deep sleep feature"
|
bool "Enable SoC deep sleep feature"
|
||||||
depends on ARCH_T1024 || ARCH_T1040 || ARCH_T1042 || ARCH_LS1021A
|
depends on ARCH_T1024 || ARCH_T1040 || ARCH_T1042 || ARCH_LS1021A
|
||||||
@ -271,5 +271,3 @@ config HAS_FSL_DR_USB
|
|||||||
|
|
||||||
config SYS_DPAA_FMAN
|
config SYS_DPAA_FMAN
|
||||||
bool
|
bool
|
||||||
|
|
||||||
endmenu
|
|
||||||
|
@ -126,25 +126,3 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&cpsw3g {
|
|
||||||
reg = <0x0 0x8000000 0x0 0x200000>,
|
|
||||||
<0x0 0x43000200 0x0 0x8>;
|
|
||||||
reg-names = "cpsw_nuss", "mac_efuse";
|
|
||||||
/delete-property/ ranges;
|
|
||||||
u-boot,dm-spl;
|
|
||||||
|
|
||||||
cpsw-phy-sel@04044 {
|
|
||||||
compatible = "ti,am64-phy-gmii-sel";
|
|
||||||
reg = <0x0 0x00104044 0x0 0x8>;
|
|
||||||
u-boot,dm-spl;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&cpsw_port1 {
|
|
||||||
u-boot,dm-spl;
|
|
||||||
};
|
|
||||||
|
|
||||||
&cpsw_port2 {
|
|
||||||
status = "disabled";
|
|
||||||
};
|
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
compatible = "s25fs512s", "jedec,spi-nor";
|
compatible = "s25fs512s", "jedec,spi-nor";
|
||||||
m25p,fast-read;
|
|
||||||
spi-max-frequency = <50000000>;
|
spi-max-frequency = <50000000>;
|
||||||
spi-tx-bus-width = <1>;
|
spi-tx-bus-width = <1>;
|
||||||
spi-rx-bus-width = <1>;
|
spi-rx-bus-width = <1>;
|
||||||
|
@ -212,7 +212,7 @@
|
|||||||
|
|
||||||
&mmc0 {
|
&mmc0 {
|
||||||
pinctrl-0 = <&mmc_pins>;
|
pinctrl-0 = <&mmc_pins>;
|
||||||
pinctrl-1 = <&mmc_pins>;
|
pinctrl-1 = <&mmc_pins_uhs>;
|
||||||
pinctrl-names = "default", "state_uhs";
|
pinctrl-names = "default", "state_uhs";
|
||||||
|
|
||||||
vmmc-supply = <&d3_3v>;
|
vmmc-supply = <&d3_3v>;
|
||||||
@ -253,6 +253,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
mmc_pins: mmc {
|
mmc_pins: mmc {
|
||||||
|
groups = "mmc_data8", "mmc_ctrl", "mmc_ds";
|
||||||
|
function = "mmc";
|
||||||
|
power-source = <3300>;
|
||||||
|
};
|
||||||
|
|
||||||
|
mmc_pins_uhs: mmc_uhs {
|
||||||
groups = "mmc_data8", "mmc_ctrl", "mmc_ds";
|
groups = "mmc_data8", "mmc_ctrl", "mmc_ds";
|
||||||
function = "mmc";
|
function = "mmc";
|
||||||
power-source = <1800>;
|
power-source = <1800>;
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
&rpc {
|
&rpc {
|
||||||
|
compatible = "renesas,rcar-gen3-rpc";
|
||||||
pinctrl-0 = <&qspi_pins>;
|
pinctrl-0 = <&qspi_pins>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
num-cs = <1>;
|
num-cs = <1>;
|
||||||
|
@ -145,8 +145,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x40000000 0x400>;
|
reg = <0x40000000 0x400>;
|
||||||
interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "global";
|
|
||||||
clocks = <&rcc TIM2_K>;
|
clocks = <&rcc TIM2_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
dmas = <&dmamux1 18 0x400 0x1>,
|
dmas = <&dmamux1 18 0x400 0x1>,
|
||||||
@ -180,8 +178,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x40001000 0x400>;
|
reg = <0x40001000 0x400>;
|
||||||
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "global";
|
|
||||||
clocks = <&rcc TIM3_K>;
|
clocks = <&rcc TIM3_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
dmas = <&dmamux1 23 0x400 0x1>,
|
dmas = <&dmamux1 23 0x400 0x1>,
|
||||||
@ -216,8 +212,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x40002000 0x400>;
|
reg = <0x40002000 0x400>;
|
||||||
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "global";
|
|
||||||
clocks = <&rcc TIM4_K>;
|
clocks = <&rcc TIM4_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
dmas = <&dmamux1 29 0x400 0x1>,
|
dmas = <&dmamux1 29 0x400 0x1>,
|
||||||
@ -250,8 +244,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x40003000 0x400>;
|
reg = <0x40003000 0x400>;
|
||||||
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "global";
|
|
||||||
clocks = <&rcc TIM5_K>;
|
clocks = <&rcc TIM5_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
dmas = <&dmamux1 55 0x400 0x1>,
|
dmas = <&dmamux1 55 0x400 0x1>,
|
||||||
@ -286,8 +278,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x40004000 0x400>;
|
reg = <0x40004000 0x400>;
|
||||||
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "global";
|
|
||||||
clocks = <&rcc TIM6_K>;
|
clocks = <&rcc TIM6_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
dmas = <&dmamux1 69 0x400 0x1>;
|
dmas = <&dmamux1 69 0x400 0x1>;
|
||||||
@ -306,8 +296,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x40005000 0x400>;
|
reg = <0x40005000 0x400>;
|
||||||
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "global";
|
|
||||||
clocks = <&rcc TIM7_K>;
|
clocks = <&rcc TIM7_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
dmas = <&dmamux1 70 0x400 0x1>;
|
dmas = <&dmamux1 70 0x400 0x1>;
|
||||||
@ -326,8 +314,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x40006000 0x400>;
|
reg = <0x40006000 0x400>;
|
||||||
interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "global";
|
|
||||||
clocks = <&rcc TIM12_K>;
|
clocks = <&rcc TIM12_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
@ -350,8 +336,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x40007000 0x400>;
|
reg = <0x40007000 0x400>;
|
||||||
interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "global";
|
|
||||||
clocks = <&rcc TIM13_K>;
|
clocks = <&rcc TIM13_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
@ -374,8 +358,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x40008000 0x400>;
|
reg = <0x40008000 0x400>;
|
||||||
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "global";
|
|
||||||
clocks = <&rcc TIM14_K>;
|
clocks = <&rcc TIM14_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
@ -659,11 +641,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x44000000 0x400>;
|
reg = <0x44000000 0x400>;
|
||||||
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
|
|
||||||
<GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
|
|
||||||
<GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
|
|
||||||
<GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "brk", "up", "trg-com", "cc";
|
|
||||||
clocks = <&rcc TIM1_K>;
|
clocks = <&rcc TIM1_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
dmas = <&dmamux1 11 0x400 0x1>,
|
dmas = <&dmamux1 11 0x400 0x1>,
|
||||||
@ -700,11 +677,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x44001000 0x400>;
|
reg = <0x44001000 0x400>;
|
||||||
interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
|
|
||||||
<GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
|
|
||||||
<GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
|
|
||||||
<GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "brk", "up", "trg-com", "cc";
|
|
||||||
clocks = <&rcc TIM8_K>;
|
clocks = <&rcc TIM8_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
dmas = <&dmamux1 47 0x400 0x1>,
|
dmas = <&dmamux1 47 0x400 0x1>,
|
||||||
@ -792,8 +764,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x44006000 0x400>;
|
reg = <0x44006000 0x400>;
|
||||||
interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "global";
|
|
||||||
clocks = <&rcc TIM15_K>;
|
clocks = <&rcc TIM15_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
dmas = <&dmamux1 105 0x400 0x1>,
|
dmas = <&dmamux1 105 0x400 0x1>,
|
||||||
@ -821,8 +791,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x44007000 0x400>;
|
reg = <0x44007000 0x400>;
|
||||||
interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "global";
|
|
||||||
clocks = <&rcc TIM16_K>;
|
clocks = <&rcc TIM16_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
dmas = <&dmamux1 109 0x400 0x1>,
|
dmas = <&dmamux1 109 0x400 0x1>,
|
||||||
@ -847,8 +815,6 @@
|
|||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "st,stm32-timers";
|
compatible = "st,stm32-timers";
|
||||||
reg = <0x44008000 0x400>;
|
reg = <0x44008000 0x400>;
|
||||||
interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-names = "global";
|
|
||||||
clocks = <&rcc TIM17_K>;
|
clocks = <&rcc TIM17_K>;
|
||||||
clock-names = "int";
|
clock-names = "int";
|
||||||
dmas = <&dmamux1 111 0x400 0x1>,
|
dmas = <&dmamux1 111 0x400 0x1>,
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
* Copyright : STMicroelectronics 2022
|
* Copyright : STMicroelectronics 2022
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/clock/stm32mp1-clksrc.h>
|
||||||
#include "stm32mp15-scmi-u-boot.dtsi"
|
#include "stm32mp15-scmi-u-boot.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
* Copyright : STMicroelectronics 2022
|
* Copyright : STMicroelectronics 2022
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/clock/stm32mp1-clksrc.h>
|
||||||
#include "stm32mp15-scmi-u-boot.dtsi"
|
#include "stm32mp15-scmi-u-boot.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
@ -362,14 +362,6 @@
|
|||||||
&usbh_ehci {
|
&usbh_ehci {
|
||||||
phys = <&usbphyc_port0>;
|
phys = <&usbphyc_port0>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
/* onboard HUB */
|
|
||||||
hub@1 {
|
|
||||||
compatible = "usb424,2514";
|
|
||||||
reg = <1>;
|
|
||||||
vdd-supply = <&v3v3>;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbotg_hs {
|
&usbotg_hs {
|
||||||
@ -393,10 +385,6 @@
|
|||||||
st,tune-squelch-level = <3>;
|
st,tune-squelch-level = <3>;
|
||||||
st,tune-hs-rx-offset = <2>;
|
st,tune-hs-rx-offset = <2>;
|
||||||
st,no-lsfs-sc;
|
st,no-lsfs-sc;
|
||||||
connector {
|
|
||||||
compatible = "usb-a-connector";
|
|
||||||
vbus-supply = <&vbus_sw>;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbphyc_port1 {
|
&usbphyc_port1 {
|
||||||
|
@ -390,21 +390,21 @@
|
|||||||
regulator-always-on;
|
regulator-always-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
bst_out: boost {
|
bst_out: boost {
|
||||||
regulator-name = "bst_out";
|
regulator-name = "bst_out";
|
||||||
interrupts = <IT_OCP_BOOST 0>;
|
interrupts = <IT_OCP_BOOST 0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
vbus_otg: pwr_sw1 {
|
vbus_otg: pwr_sw1 {
|
||||||
regulator-name = "vbus_otg";
|
regulator-name = "vbus_otg";
|
||||||
interrupts = <IT_OCP_OTG 0>;
|
interrupts = <IT_OCP_OTG 0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
vbus_sw: pwr_sw2 {
|
vbus_sw: pwr_sw2 {
|
||||||
regulator-name = "vbus_sw";
|
regulator-name = "vbus_sw";
|
||||||
interrupts = <IT_OCP_SWOUT 0>;
|
interrupts = <IT_OCP_SWOUT 0>;
|
||||||
regulator-active-discharge = <1>;
|
regulator-active-discharge = <1>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
onkey {
|
onkey {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#define SW1RST BIT(28)
|
#define SW1RST BIT(28)
|
||||||
#define SW2RST BIT(27)
|
#define SW2RST BIT(27)
|
||||||
#define SW3RST BIT(26)
|
#define SW3RST BIT(26)
|
||||||
#define TIPRST BIT(25)
|
#define SW4RST BIT(25)
|
||||||
#define WD1RST BIT(24)
|
#define WD1RST BIT(24)
|
||||||
#define WD2RST BIT(23)
|
#define WD2RST BIT(23)
|
||||||
#define RST_STS_MASK GENMASK(31, 23)
|
#define RST_STS_MASK GENMASK(31, 23)
|
||||||
|
@ -25,7 +25,7 @@ pe_header:
|
|||||||
.long IMAGE_NT_SIGNATURE /* 'PE' */
|
.long IMAGE_NT_SIGNATURE /* 'PE' */
|
||||||
coff_header:
|
coff_header:
|
||||||
.short IMAGE_FILE_MACHINE_ARM64 /* AArch64 */
|
.short IMAGE_FILE_MACHINE_ARM64 /* AArch64 */
|
||||||
.short 3 /* nr_sections */
|
.short 2 /* nr_sections */
|
||||||
.long 0 /* TimeDateStamp */
|
.long 0 /* TimeDateStamp */
|
||||||
.long 0 /* PointerToSymbolTable */
|
.long 0 /* PointerToSymbolTable */
|
||||||
.long 0 /* NumberOfSymbols */
|
.long 0 /* NumberOfSymbols */
|
||||||
@ -34,13 +34,12 @@ coff_header:
|
|||||||
.short (IMAGE_FILE_EXECUTABLE_IMAGE | \
|
.short (IMAGE_FILE_EXECUTABLE_IMAGE | \
|
||||||
IMAGE_FILE_LINE_NUMS_STRIPPED | \
|
IMAGE_FILE_LINE_NUMS_STRIPPED | \
|
||||||
IMAGE_FILE_LOCAL_SYMS_STRIPPED | \
|
IMAGE_FILE_LOCAL_SYMS_STRIPPED | \
|
||||||
IMAGE_FILE_LARGE_ADDRESS_AWARE | \
|
|
||||||
IMAGE_FILE_DEBUG_STRIPPED)
|
IMAGE_FILE_DEBUG_STRIPPED)
|
||||||
optional_header:
|
optional_header:
|
||||||
.short IMAGE_NT_OPTIONAL_HDR64_MAGIC /* PE32+ format */
|
.short IMAGE_NT_OPTIONAL_HDR64_MAGIC /* PE32+ format */
|
||||||
.byte 0x02 /* MajorLinkerVersion */
|
.byte 0x02 /* MajorLinkerVersion */
|
||||||
.byte 0x14 /* MinorLinkerVersion */
|
.byte 0x14 /* MinorLinkerVersion */
|
||||||
.long _etext - _start /* SizeOfCode */
|
.long _edata - _start /* SizeOfCode */
|
||||||
.long 0 /* SizeOfInitializedData */
|
.long 0 /* SizeOfInitializedData */
|
||||||
.long 0 /* SizeOfUninitializedData */
|
.long 0 /* SizeOfUninitializedData */
|
||||||
.long _start - ImageBase /* AddressOfEntryPoint */
|
.long _start - ImageBase /* AddressOfEntryPoint */
|
||||||
@ -48,7 +47,7 @@ optional_header:
|
|||||||
|
|
||||||
extra_header_fields:
|
extra_header_fields:
|
||||||
.quad 0 /* ImageBase */
|
.quad 0 /* ImageBase */
|
||||||
.long 0x1000 /* SectionAlignment */
|
.long 0x200 /* SectionAlignment */
|
||||||
.long 0x200 /* FileAlignment */
|
.long 0x200 /* FileAlignment */
|
||||||
.short 0 /* MajorOperatingSystemVersion */
|
.short 0 /* MajorOperatingSystemVersion */
|
||||||
.short 0 /* MinorOperatingSystemVersion */
|
.short 0 /* MinorOperatingSystemVersion */
|
||||||
@ -100,46 +99,25 @@ section_table:
|
|||||||
.long 0 /* PointerToLineNumbers */
|
.long 0 /* PointerToLineNumbers */
|
||||||
.short 0 /* NumberOfRelocations */
|
.short 0 /* NumberOfRelocations */
|
||||||
.short 0 /* NumberOfLineNumbers */
|
.short 0 /* NumberOfLineNumbers */
|
||||||
/* Characteristics (section flags) */
|
.long 0x42100040 /* Characteristics (section flags) */
|
||||||
.long (IMAGE_SCN_MEM_READ | \
|
|
||||||
IMAGE_SCN_MEM_DISCARDABLE | \
|
|
||||||
IMAGE_SCN_CNT_INITIALIZED_DATA)
|
|
||||||
|
|
||||||
.ascii ".text"
|
.ascii ".text"
|
||||||
.byte 0
|
.byte 0
|
||||||
.byte 0
|
.byte 0
|
||||||
.byte 0 /* end of 0 padding of section name */
|
.byte 0 /* end of 0 padding of section name */
|
||||||
.long _etext - _start /* VirtualSize */
|
.long _edata - _start /* VirtualSize */
|
||||||
.long _start - ImageBase /* VirtualAddress */
|
.long _start - ImageBase /* VirtualAddress */
|
||||||
.long _etext - _start /* SizeOfRawData */
|
.long _edata - _start /* SizeOfRawData */
|
||||||
.long _start - ImageBase /* PointerToRawData */
|
.long _start - ImageBase /* PointerToRawData */
|
||||||
.long 0 /* PointerToRelocations */
|
|
||||||
.long 0 /* PointerToLineNumbers */
|
|
||||||
.short 0 /* NumberOfRelocations */
|
|
||||||
.short 0 /* NumberOfLineNumbers */
|
|
||||||
/* Characteristics (section flags) */
|
|
||||||
.long (IMAGE_SCN_MEM_READ | \
|
|
||||||
IMAGE_SCN_MEM_EXECUTE | \
|
|
||||||
IMAGE_SCN_CNT_CODE)
|
|
||||||
|
|
||||||
.ascii ".data"
|
.long 0 /* PointerToRelocations (0 for executables) */
|
||||||
.byte 0
|
.long 0 /* PointerToLineNumbers (0 for executables) */
|
||||||
.byte 0
|
.short 0 /* NumberOfRelocations (0 for executables) */
|
||||||
.byte 0 /* end of 0 padding of section name */
|
.short 0 /* NumberOfLineNumbers (0 for executables) */
|
||||||
.long _data_size /* VirtualSize */
|
.long 0xe0500020 /* Characteristics (section flags) */
|
||||||
.long _data - ImageBase /* VirtualAddress */
|
|
||||||
.long _data_size /* SizeOfRawData */
|
|
||||||
.long _data - ImageBase /* PointerToRawData */
|
|
||||||
.long 0 /* PointerToRelocations */
|
|
||||||
.long 0 /* PointerToLineNumbers */
|
|
||||||
.short 0 /* NumberOfRelocations */
|
|
||||||
.short 0 /* NumberOfLineNumbers */
|
|
||||||
/* Characteristics (section flags) */
|
|
||||||
.long (IMAGE_SCN_MEM_WRITE | \
|
|
||||||
IMAGE_SCN_MEM_READ | \
|
|
||||||
IMAGE_SCN_CNT_INITIALIZED_DATA)
|
|
||||||
|
|
||||||
.align 12
|
.align 9
|
||||||
_start:
|
_start:
|
||||||
stp x29, x30, [sp, #-32]!
|
stp x29, x30, [sp, #-32]!
|
||||||
mov x29, sp
|
mov x29, sp
|
||||||
|
@ -7,12 +7,6 @@
|
|||||||
|
|
||||||
OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
|
OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
|
||||||
OUTPUT_ARCH(aarch64)
|
OUTPUT_ARCH(aarch64)
|
||||||
|
|
||||||
PHDRS
|
|
||||||
{
|
|
||||||
data PT_LOAD FLAGS(3); /* SHF_WRITE | SHF_ALLOC */
|
|
||||||
}
|
|
||||||
|
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
@ -24,17 +18,11 @@ SECTIONS
|
|||||||
*(.gnu.linkonce.t.*)
|
*(.gnu.linkonce.t.*)
|
||||||
*(.srodata)
|
*(.srodata)
|
||||||
*(.rodata*)
|
*(.rodata*)
|
||||||
. = ALIGN(16);
|
|
||||||
*(.dynamic);
|
|
||||||
. = ALIGN(512);
|
. = ALIGN(512);
|
||||||
}
|
}
|
||||||
.rela.dyn : { *(.rela.dyn) }
|
|
||||||
.rela.plt : { *(.rela.plt) }
|
|
||||||
.rela.got : { *(.rela.got) }
|
|
||||||
.rela.data : { *(.rela.data) *(.rela.data*) }
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
_text_size = . - _text;
|
_text_size = . - _text;
|
||||||
. = ALIGN(4096);
|
.dynamic : { *(.dynamic) }
|
||||||
.data : {
|
.data : {
|
||||||
_data = .;
|
_data = .;
|
||||||
*(.sdata)
|
*(.sdata)
|
||||||
@ -59,8 +47,12 @@ SECTIONS
|
|||||||
. = ALIGN(512);
|
. = ALIGN(512);
|
||||||
_bss_end = .;
|
_bss_end = .;
|
||||||
_edata = .;
|
_edata = .;
|
||||||
} :data
|
}
|
||||||
_data_size = _edata - _data;
|
.rela.dyn : { *(.rela.dyn) }
|
||||||
|
.rela.plt : { *(.rela.plt) }
|
||||||
|
.rela.got : { *(.rela.got) }
|
||||||
|
.rela.data : { *(.rela.data) *(.rela.data*) }
|
||||||
|
_data_size = . - _etext;
|
||||||
|
|
||||||
. = ALIGN(4096);
|
. = ALIGN(4096);
|
||||||
.dynsym : { *(.dynsym) }
|
.dynsym : { *(.dynsym) }
|
||||||
|
@ -746,16 +746,6 @@ int arch_misc_init(void)
|
|||||||
if (ret)
|
if (ret)
|
||||||
printf("Failed to initialize caam_jr: %d\n", ret);
|
printf("Failed to initialize caam_jr: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_FSL_DCP_RNG)) {
|
|
||||||
struct udevice *dev;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = uclass_get_device_by_driver(UCLASS_RNG, DM_DRIVER_GET(dcp_rng), &dev);
|
|
||||||
if (ret)
|
|
||||||
printf("Failed to initialize dcp rng: %d\n", ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
setup_serial_number();
|
setup_serial_number();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -69,9 +69,7 @@ config SYS_K3_BOOT_PARAM_TABLE_INDEX
|
|||||||
default 0x41cffbfc if SOC_K3_J721E
|
default 0x41cffbfc if SOC_K3_J721E
|
||||||
default 0x41cfdbfc if SOC_K3_J721S2
|
default 0x41cfdbfc if SOC_K3_J721S2
|
||||||
default 0x701bebfc if SOC_K3_AM642
|
default 0x701bebfc if SOC_K3_AM642
|
||||||
default 0x43c3f290 if SOC_K3_AM625
|
default 0x43c3f290 if SOC_K3_AM625 || SOC_K3_AM62A7
|
||||||
default 0x43c3f290 if SOC_K3_AM62A7 && CPU_V7R
|
|
||||||
default 0x7000f290 if SOC_K3_AM62A7 && ARM64
|
|
||||||
help
|
help
|
||||||
Address at which ROM stores the value which determines if SPL
|
Address at which ROM stores the value which determines if SPL
|
||||||
is booted up by primary boot media or secondary boot media.
|
is booted up by primary boot media or secondary boot media.
|
||||||
|
@ -173,20 +173,21 @@ void board_init_f(ulong dummy)
|
|||||||
u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)
|
u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)
|
||||||
{
|
{
|
||||||
u32 devstat = readl(CTRLMMR_MAIN_DEVSTAT);
|
u32 devstat = readl(CTRLMMR_MAIN_DEVSTAT);
|
||||||
u32 bootmode = (devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_MASK) >>
|
|
||||||
MAIN_DEVSTAT_PRIMARY_BOOTMODE_SHIFT;
|
|
||||||
u32 bootmode_cfg = (devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_MASK) >>
|
u32 bootmode_cfg = (devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_MASK) >>
|
||||||
MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_SHIFT;
|
MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_SHIFT;
|
||||||
|
|
||||||
|
switch (boot_device) {
|
||||||
switch (bootmode) {
|
case BOOT_DEVICE_MMC1:
|
||||||
case BOOT_DEVICE_EMMC:
|
if ((bootmode_cfg & MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_MASK) >>
|
||||||
return MMCSD_MODE_EMMCBOOT;
|
MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_SHIFT)
|
||||||
case BOOT_DEVICE_MMC:
|
return MMCSD_MODE_EMMCBOOT;
|
||||||
if (bootmode_cfg & MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_MASK)
|
|
||||||
return MMCSD_MODE_RAW;
|
|
||||||
default:
|
|
||||||
return MMCSD_MODE_FS;
|
return MMCSD_MODE_FS;
|
||||||
|
|
||||||
|
case BOOT_DEVICE_MMC2:
|
||||||
|
return MMCSD_MODE_FS;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return MMCSD_MODE_RAW;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,11 +25,8 @@ static struct rom_extended_boot_data bootdata __section(".data");
|
|||||||
static void store_boot_info_from_rom(void)
|
static void store_boot_info_from_rom(void)
|
||||||
{
|
{
|
||||||
bootindex = *(u32 *)(CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX);
|
bootindex = *(u32 *)(CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX);
|
||||||
|
memcpy(&bootdata, (uintptr_t *)ROM_ENTENDED_BOOT_DATA_INFO,
|
||||||
if (IS_ENABLED(CONFIG_CPU_V7R)) {
|
sizeof(struct rom_extended_boot_data));
|
||||||
memcpy(&bootdata, (uintptr_t *)ROM_ENTENDED_BOOT_DATA_INFO,
|
|
||||||
sizeof(struct rom_extended_boot_data));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ctrl_mmr_unlock(void)
|
static void ctrl_mmr_unlock(void)
|
||||||
@ -126,15 +123,6 @@ void board_init_f(ulong dummy)
|
|||||||
k3_sysfw_loader(true, NULL, NULL);
|
k3_sysfw_loader(true, NULL, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_CPU_V7R)
|
|
||||||
/*
|
|
||||||
* Relocate boot information to OCRAM (after TIFS has opend this
|
|
||||||
* region for us) so the next bootloader stages can keep access to
|
|
||||||
* primary vs backup bootmodes.
|
|
||||||
*/
|
|
||||||
writel(bootindex, K3_BOOT_PARAM_TABLE_INDEX_OCRAM);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Force probe of clk_k3 driver here to ensure basic default clock
|
* Force probe of clk_k3 driver here to ensure basic default clock
|
||||||
* configuration is always done.
|
* configuration is always done.
|
||||||
|
@ -181,7 +181,7 @@ int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr)
|
|||||||
if (!*loadaddr)
|
if (!*loadaddr)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!get_fs_loader(&fsdev)) {
|
if (!uclass_get_device(UCLASS_FS_FIRMWARE_LOADER, 0, &fsdev)) {
|
||||||
size = request_firmware_into_buf(fsdev, name, (void *)*loadaddr,
|
size = request_firmware_into_buf(fsdev, name, (void *)*loadaddr,
|
||||||
0, 0);
|
0, 0);
|
||||||
}
|
}
|
||||||
|
@ -68,22 +68,7 @@
|
|||||||
|
|
||||||
#define ROM_ENTENDED_BOOT_DATA_INFO 0x43c3f1e0
|
#define ROM_ENTENDED_BOOT_DATA_INFO 0x43c3f1e0
|
||||||
|
|
||||||
#define K3_BOOT_PARAM_TABLE_INDEX_OCRAM 0x7000F290
|
/* Use Last 2K as Scratch pad */
|
||||||
|
|
||||||
/*
|
|
||||||
* During the boot process ROM will kill anything that writes to OCSRAM.
|
|
||||||
* This means the wakeup SPL cannot use this region during boot. To
|
|
||||||
* complicate things, TIFS will set a firewall between HSM RAM and the
|
|
||||||
* main domain.
|
|
||||||
*
|
|
||||||
* So, during the wakeup SPL, we will need to store the EEPROM data
|
|
||||||
* somewhere in HSM RAM, and the main domain's SPL will need to store it
|
|
||||||
* somewhere in OCSRAM
|
|
||||||
*/
|
|
||||||
#ifdef CONFIG_CPU_V7R
|
|
||||||
#define TI_SRAM_SCRATCH_BOARD_EEPROM_START 0x43c30000
|
|
||||||
#else
|
|
||||||
#define TI_SRAM_SCRATCH_BOARD_EEPROM_START 0x70000001
|
#define TI_SRAM_SCRATCH_BOARD_EEPROM_START 0x70000001
|
||||||
#endif /* CONFIG_CPU_V7R */
|
|
||||||
|
|
||||||
#endif /* __ASM_ARCH_AM62A_HARDWARE_H */
|
#endif /* __ASM_ARCH_AM62A_HARDWARE_H */
|
||||||
|
@ -214,7 +214,7 @@ int load_firmware(char *name_fw, u32 *loadaddr)
|
|||||||
if (!*loadaddr)
|
if (!*loadaddr)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!get_fs_loader(&fsdev)) {
|
if (!uclass_get_device(UCLASS_FS_FIRMWARE_LOADER, 0, &fsdev)) {
|
||||||
size = request_firmware_into_buf(fsdev, name_fw,
|
size = request_firmware_into_buf(fsdev, name_fw,
|
||||||
(void *)*loadaddr, 0, 0);
|
(void *)*loadaddr, 0, 0);
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ config SYS_SOC
|
|||||||
source "board/logicpd/am3517evm/Kconfig"
|
source "board/logicpd/am3517evm/Kconfig"
|
||||||
source "board/ti/beagle/Kconfig"
|
source "board/ti/beagle/Kconfig"
|
||||||
source "board/timll/devkit8000/Kconfig"
|
source "board/timll/devkit8000/Kconfig"
|
||||||
source "board/ti/omap3evm/Kconfig"
|
source "board/ti/evm/Kconfig"
|
||||||
source "board/isee/igep00x0/Kconfig"
|
source "board/isee/igep00x0/Kconfig"
|
||||||
source "board/logicpd/omap3som/Kconfig"
|
source "board/logicpd/omap3som/Kconfig"
|
||||||
source "board/nokia/rx51/Kconfig"
|
source "board/nokia/rx51/Kconfig"
|
||||||
|
@ -78,23 +78,5 @@ __weak int misc_init_r(void)
|
|||||||
env_set("key_power", "0");
|
env_set("key_power", "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* search for kaslr address, set by primary bootloader by searching first
|
|
||||||
* 0x100 relocated bytes at u-boot's initial load address range
|
|
||||||
*/
|
|
||||||
uintptr_t start = gd->ram_base;
|
|
||||||
uintptr_t end = start + 0x800000;
|
|
||||||
u8 *addr = (u8 *)start;
|
|
||||||
phys_addr_t *relocaddr = (phys_addr_t *)gd->relocaddr;
|
|
||||||
u32 block_size = 0x1000;
|
|
||||||
|
|
||||||
while (memcmp(addr, relocaddr, 0x100) && (uintptr_t)addr < end)
|
|
||||||
addr += block_size;
|
|
||||||
|
|
||||||
if ((uintptr_t)addr >= end)
|
|
||||||
printf("KASLR not found in range 0x%lx - 0x%lx", start, end);
|
|
||||||
else
|
|
||||||
env_set_addr("KASLR", addr);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ fix_newlines_in_macros() {
|
|||||||
|
|
||||||
#filter out only what we need from a10 hps.xml
|
#filter out only what we need from a10 hps.xml
|
||||||
grep_a10_hps_config() {
|
grep_a10_hps_config() {
|
||||||
grep -E "clk_hz|i_clk_mgr|i_io48_pin_mux|AXI_SLAVE|AXI_MASTER"
|
egrep "clk_hz|i_clk_mgr|i_io48_pin_mux|AXI_SLAVE|AXI_MASTER"
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -35,35 +35,35 @@ EOF
|
|||||||
|
|
||||||
echo "/* Clocks */"
|
echo "/* Clocks */"
|
||||||
fix_newlines_in_macros \
|
fix_newlines_in_macros \
|
||||||
${hps_xml} | grep "clk_hz" |
|
${hps_xml} | egrep "clk_hz" |
|
||||||
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
||||||
print "#define" " " toupper($2) " " $4}' |
|
print "#define" " " toupper($2) " " $4}' |
|
||||||
sed 's/\.[0-9]//' |
|
sed 's/\.[0-9]//' |
|
||||||
sed 's/I_CLK_MGR_//' |
|
sed 's/I_CLK_MGR_//' |
|
||||||
sort
|
sort
|
||||||
fix_newlines_in_macros \
|
fix_newlines_in_macros \
|
||||||
${hps_xml} | grep "i_clk_mgr_mainpll" |
|
${hps_xml} | egrep "i_clk_mgr_mainpll" |
|
||||||
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
||||||
print "#define" " " toupper($2) " " $4}' |
|
print "#define" " " toupper($2) " " $4}' |
|
||||||
sed 's/\.[0-9]//' |
|
sed 's/\.[0-9]//' |
|
||||||
sed 's/I_CLK_MGR_//' |
|
sed 's/I_CLK_MGR_//' |
|
||||||
sort
|
sort
|
||||||
fix_newlines_in_macros \
|
fix_newlines_in_macros \
|
||||||
${hps_xml} | grep "i_clk_mgr_perpll" |
|
${hps_xml} | egrep "i_clk_mgr_perpll" |
|
||||||
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
||||||
print "#define" " " toupper($2) " " $4}' |
|
print "#define" " " toupper($2) " " $4}' |
|
||||||
sed 's/\.[0-9]//' |
|
sed 's/\.[0-9]//' |
|
||||||
sed 's/I_CLK_MGR_//' |
|
sed 's/I_CLK_MGR_//' |
|
||||||
sort
|
sort
|
||||||
fix_newlines_in_macros \
|
fix_newlines_in_macros \
|
||||||
${hps_xml} | grep "i_clk_mgr_clkmgr" |
|
${hps_xml} | egrep "i_clk_mgr_clkmgr" |
|
||||||
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
||||||
print "#define" " " toupper($2) " " $4}' |
|
print "#define" " " toupper($2) " " $4}' |
|
||||||
sed 's/\.[0-9]//' |
|
sed 's/\.[0-9]//' |
|
||||||
sed 's/I_CLK_MGR_//' |
|
sed 's/I_CLK_MGR_//' |
|
||||||
sort
|
sort
|
||||||
fix_newlines_in_macros \
|
fix_newlines_in_macros \
|
||||||
${hps_xml} | grep "i_clk_mgr_alteragrp" |
|
${hps_xml} | egrep "i_clk_mgr_alteragrp" |
|
||||||
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
||||||
print "#define" " " toupper($2) " " $4}' |
|
print "#define" " " toupper($2) " " $4}' |
|
||||||
sed 's/\.[0-9]//' |
|
sed 's/\.[0-9]//' |
|
||||||
@ -77,7 +77,7 @@ EOF
|
|||||||
echo
|
echo
|
||||||
echo "/* Pin Mux Configuration */"
|
echo "/* Pin Mux Configuration */"
|
||||||
fix_newlines_in_macros \
|
fix_newlines_in_macros \
|
||||||
${hps_xml} | grep "i_io48_pin_mux" |
|
${hps_xml} | egrep "i_io48_pin_mux" |
|
||||||
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
||||||
print "#define" " " toupper($2) " " $4}' |
|
print "#define" " " toupper($2) " " $4}' |
|
||||||
sed 's/I_IO48_PIN_MUX_//' |
|
sed 's/I_IO48_PIN_MUX_//' |
|
||||||
@ -90,7 +90,7 @@ EOF
|
|||||||
echo
|
echo
|
||||||
echo "/* Bridge Configuration */"
|
echo "/* Bridge Configuration */"
|
||||||
fix_newlines_in_macros \
|
fix_newlines_in_macros \
|
||||||
${hps_xml} | grep -E "AXI_SLAVE|AXI_MASTER" |
|
${hps_xml} | egrep "AXI_SLAVE|AXI_MASTER" |
|
||||||
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
awk -F"'" '{ gsub("\\.","_",$2) ; \
|
||||||
print "#define" " " toupper($2) " " $4}' |
|
print "#define" " " toupper($2) " " $4}' |
|
||||||
sed 's/true/1/' |
|
sed 's/true/1/' |
|
||||||
|
File diff suppressed because one or more lines are too long
@ -11,10 +11,10 @@ obj-y += bsec.o
|
|||||||
obj-$(CONFIG_STM32MP13x) += stm32mp13x.o
|
obj-$(CONFIG_STM32MP13x) += stm32mp13x.o
|
||||||
obj-$(CONFIG_STM32MP15x) += stm32mp15x.o
|
obj-$(CONFIG_STM32MP15x) += stm32mp15x.o
|
||||||
|
|
||||||
obj-$(CONFIG_STM32_ECDSA_VERIFY) += ecdsa_romapi.o
|
|
||||||
ifdef CONFIG_SPL_BUILD
|
ifdef CONFIG_SPL_BUILD
|
||||||
obj-y += spl.o
|
obj-y += spl.o
|
||||||
obj-y += tzc400.o
|
obj-y += tzc400.o
|
||||||
|
obj-$(CONFIG_STM32_ECDSA_VERIFY) += ecdsa_romapi.o
|
||||||
else
|
else
|
||||||
obj-y += cmd_stm32prog/
|
obj-y += cmd_stm32prog/
|
||||||
obj-$(CONFIG_CMD_STM32KEY) += cmd_stm32key.o
|
obj-$(CONFIG_CMD_STM32KEY) += cmd_stm32key.o
|
||||||
|
@ -8,18 +8,33 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <log.h>
|
#include <log.h>
|
||||||
#include <linux/libfdt.h>
|
#include <linux/libfdt.h>
|
||||||
#include <asm/arch/sys_proto.h>
|
|
||||||
#include <asm/sections.h>
|
#include <asm/sections.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force data-section, as .bss will not be valid
|
||||||
|
* when save_boot_params is invoked.
|
||||||
|
*/
|
||||||
|
static unsigned long nt_fw_dtb __section(".data");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Save the FDT address provided by TF-A in r2 at boot time
|
||||||
|
* This function is called from start.S
|
||||||
|
*/
|
||||||
|
void save_boot_params(unsigned long r0, unsigned long r1, unsigned long r2,
|
||||||
|
unsigned long r3)
|
||||||
|
{
|
||||||
|
nt_fw_dtb = r2;
|
||||||
|
|
||||||
|
save_boot_params_ret();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use the saved FDT address provided by TF-A at boot time (NT_FW_CONFIG =
|
* Use the saved FDT address provided by TF-A at boot time (NT_FW_CONFIG =
|
||||||
* Non Trusted Firmware configuration file) when the pointer is valid
|
* Non Trusted Firmware configuration file) when the pointer is valid
|
||||||
*/
|
*/
|
||||||
void *board_fdt_blob_setup(int *err)
|
void *board_fdt_blob_setup(int *err)
|
||||||
{
|
{
|
||||||
unsigned long nt_fw_dtb = get_stm32mp_bl2_dtb();
|
|
||||||
|
|
||||||
log_debug("%s: nt_fw_dtb=%lx\n", __func__, nt_fw_dtb);
|
log_debug("%s: nt_fw_dtb=%lx\n", __func__, nt_fw_dtb);
|
||||||
|
|
||||||
*err = 0;
|
*err = 0;
|
||||||
|
@ -10,11 +10,9 @@
|
|||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <log.h>
|
#include <log.h>
|
||||||
#include <misc.h>
|
#include <misc.h>
|
||||||
#include <tee.h>
|
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch/bsec.h>
|
#include <asm/arch/bsec.h>
|
||||||
#include <asm/arch/stm32mp1_smc.h>
|
#include <asm/arch/stm32mp1_smc.h>
|
||||||
#include <dm/device.h>
|
|
||||||
#include <dm/device_compat.h>
|
#include <dm/device_compat.h>
|
||||||
#include <linux/arm-smccc.h>
|
#include <linux/arm-smccc.h>
|
||||||
#include <linux/iopoll.h>
|
#include <linux/iopoll.h>
|
||||||
@ -65,43 +63,10 @@
|
|||||||
*/
|
*/
|
||||||
#define BSEC_LOCK_PROGRAM 0x04
|
#define BSEC_LOCK_PROGRAM 0x04
|
||||||
|
|
||||||
#define PTA_BSEC_UUID { 0x94cf71ad, 0x80e6, 0x40b5, \
|
|
||||||
{ 0xa7, 0xc6, 0x3d, 0xc5, 0x01, 0xeb, 0x28, 0x03 } }
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read OTP memory
|
* OTP status: bit 0 permanent lock
|
||||||
*
|
|
||||||
* [in] value[0].a OTP start offset in byte
|
|
||||||
* [in] value[0].b Access type (0:shadow, 1:fuse, 2:lock)
|
|
||||||
* [out] memref[1].buffer Output buffer to store read values
|
|
||||||
* [out] memref[1].size Size of OTP to be read
|
|
||||||
*
|
|
||||||
* Return codes:
|
|
||||||
* TEE_SUCCESS - Invoke command success
|
|
||||||
* TEE_ERROR_BAD_PARAMETERS - Incorrect input param
|
|
||||||
* TEE_ERROR_ACCESS_DENIED - OTP not accessible by caller
|
|
||||||
*/
|
*/
|
||||||
#define PTA_BSEC_READ_MEM 0x0
|
#define BSEC_LOCK_PERM BIT(0)
|
||||||
|
|
||||||
/*
|
|
||||||
* Write OTP memory
|
|
||||||
*
|
|
||||||
* [in] value[0].a OTP start offset in byte
|
|
||||||
* [in] value[0].b Access type (0:shadow, 1:fuse, 2:lock)
|
|
||||||
* [in] memref[1].buffer Input buffer to read values
|
|
||||||
* [in] memref[1].size Size of OTP to be written
|
|
||||||
*
|
|
||||||
* Return codes:
|
|
||||||
* TEE_SUCCESS - Invoke command success
|
|
||||||
* TEE_ERROR_BAD_PARAMETERS - Incorrect input param
|
|
||||||
* TEE_ERROR_ACCESS_DENIED - OTP not accessible by caller
|
|
||||||
*/
|
|
||||||
#define PTA_BSEC_WRITE_MEM 0x1
|
|
||||||
|
|
||||||
/* value of PTA_BSEC access type = value[in] b */
|
|
||||||
#define SHADOW_ACCESS 0
|
|
||||||
#define FUSE_ACCESS 1
|
|
||||||
#define LOCK_ACCESS 2
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bsec_lock() - manage lock for each type SR/SP/SW
|
* bsec_lock() - manage lock for each type SR/SP/SW
|
||||||
@ -394,10 +359,6 @@ struct stm32mp_bsec_plat {
|
|||||||
u32 base;
|
u32 base;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct stm32mp_bsec_priv {
|
|
||||||
struct udevice *tee;
|
|
||||||
};
|
|
||||||
|
|
||||||
static int stm32mp_bsec_read_otp(struct udevice *dev, u32 *val, u32 otp)
|
static int stm32mp_bsec_read_otp(struct udevice *dev, u32 *val, u32 otp)
|
||||||
{
|
{
|
||||||
struct stm32mp_bsec_plat *plat;
|
struct stm32mp_bsec_plat *plat;
|
||||||
@ -507,111 +468,18 @@ static int stm32mp_bsec_write_lock(struct udevice *dev, u32 val, u32 otp)
|
|||||||
plat = dev_get_plat(dev);
|
plat = dev_get_plat(dev);
|
||||||
|
|
||||||
return bsec_permanent_lock_otp(dev, plat->base, otp);
|
return bsec_permanent_lock_otp(dev, plat->base, otp);
|
||||||
}
|
|
||||||
|
|
||||||
static int bsec_pta_open_session(struct udevice *tee, u32 *tee_session)
|
return -EINVAL;
|
||||||
{
|
|
||||||
const struct tee_optee_ta_uuid uuid = PTA_BSEC_UUID;
|
|
||||||
struct tee_open_session_arg arg;
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
memset(&arg, 0, sizeof(arg));
|
|
||||||
tee_optee_ta_uuid_to_octets(arg.uuid, &uuid);
|
|
||||||
arg.clnt_login = TEE_LOGIN_REE_KERNEL;
|
|
||||||
rc = tee_open_session(tee, &arg, 0, NULL);
|
|
||||||
if (rc < 0)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
*tee_session = arg.session;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int bsec_optee_open(struct udevice *dev)
|
|
||||||
{
|
|
||||||
struct stm32mp_bsec_priv *priv = dev_get_priv(dev);
|
|
||||||
struct udevice *tee;
|
|
||||||
u32 tee_session;
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
tee = tee_find_device(NULL, NULL, NULL, NULL);
|
|
||||||
if (!tee)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
/* try to open the STM32 BSEC TA */
|
|
||||||
rc = bsec_pta_open_session(tee, &tee_session);
|
|
||||||
if (rc)
|
|
||||||
return rc;
|
|
||||||
|
|
||||||
tee_close_session(tee, tee_session);
|
|
||||||
|
|
||||||
priv->tee = tee;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int bsec_optee_pta(struct udevice *dev, int cmd, int type, int offset,
|
|
||||||
void *buff, ulong size)
|
|
||||||
{
|
|
||||||
struct stm32mp_bsec_priv *priv = dev_get_priv(dev);
|
|
||||||
u32 tee_session;
|
|
||||||
struct tee_invoke_arg arg;
|
|
||||||
struct tee_param param[2];
|
|
||||||
struct tee_shm *fw_shm;
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
rc = bsec_pta_open_session(priv->tee, &tee_session);
|
|
||||||
if (rc)
|
|
||||||
return rc;
|
|
||||||
|
|
||||||
rc = tee_shm_register(priv->tee, buff, size, 0, &fw_shm);
|
|
||||||
if (rc)
|
|
||||||
goto close_session;
|
|
||||||
|
|
||||||
memset(&arg, 0, sizeof(arg));
|
|
||||||
arg.func = cmd;
|
|
||||||
arg.session = tee_session;
|
|
||||||
|
|
||||||
memset(param, 0, sizeof(param));
|
|
||||||
|
|
||||||
param[0].attr = TEE_PARAM_ATTR_TYPE_VALUE_INPUT;
|
|
||||||
param[0].u.value.a = offset;
|
|
||||||
param[0].u.value.b = type;
|
|
||||||
|
|
||||||
if (cmd == PTA_BSEC_WRITE_MEM)
|
|
||||||
param[1].attr = TEE_PARAM_ATTR_TYPE_MEMREF_INPUT;
|
|
||||||
else
|
|
||||||
param[1].attr = TEE_PARAM_ATTR_TYPE_MEMREF_OUTPUT;
|
|
||||||
|
|
||||||
param[1].u.memref.shm = fw_shm;
|
|
||||||
param[1].u.memref.size = size;
|
|
||||||
|
|
||||||
rc = tee_invoke_func(priv->tee, &arg, 2, param);
|
|
||||||
if (rc < 0 || arg.ret != 0) {
|
|
||||||
dev_err(priv->tee,
|
|
||||||
"PTA_BSEC invoke failed TEE err: %x, err:%x\n",
|
|
||||||
arg.ret, rc);
|
|
||||||
if (!rc)
|
|
||||||
rc = -EIO;
|
|
||||||
}
|
|
||||||
|
|
||||||
tee_shm_free(fw_shm);
|
|
||||||
|
|
||||||
close_session:
|
|
||||||
tee_close_session(priv->tee, tee_session);
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int stm32mp_bsec_read(struct udevice *dev, int offset,
|
static int stm32mp_bsec_read(struct udevice *dev, int offset,
|
||||||
void *buf, int size)
|
void *buf, int size)
|
||||||
{
|
{
|
||||||
struct stm32mp_bsec_priv *priv = dev_get_priv(dev);
|
|
||||||
int ret;
|
int ret;
|
||||||
int i;
|
int i;
|
||||||
bool shadow = true, lock = false;
|
bool shadow = true, lock = false;
|
||||||
int nb_otp = size / sizeof(u32);
|
int nb_otp = size / sizeof(u32);
|
||||||
int otp, cmd;
|
int otp;
|
||||||
unsigned int offs = offset;
|
unsigned int offs = offset;
|
||||||
|
|
||||||
if (offs >= STM32_BSEC_LOCK_OFFSET) {
|
if (offs >= STM32_BSEC_LOCK_OFFSET) {
|
||||||
@ -625,19 +493,6 @@ static int stm32mp_bsec_read(struct udevice *dev, int offset,
|
|||||||
if ((offs % 4) || (size % 4))
|
if ((offs % 4) || (size % 4))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_OPTEE) && priv->tee) {
|
|
||||||
cmd = FUSE_ACCESS;
|
|
||||||
if (shadow)
|
|
||||||
cmd = SHADOW_ACCESS;
|
|
||||||
if (lock)
|
|
||||||
cmd = LOCK_ACCESS;
|
|
||||||
ret = bsec_optee_pta(dev, PTA_BSEC_READ_MEM, cmd, offs, buf, size);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
otp = offs / sizeof(u32);
|
otp = offs / sizeof(u32);
|
||||||
|
|
||||||
for (i = otp; i < (otp + nb_otp) && i <= BSEC_OTP_MAX_VALUE; i++) {
|
for (i = otp; i < (otp + nb_otp) && i <= BSEC_OTP_MAX_VALUE; i++) {
|
||||||
@ -662,12 +517,11 @@ static int stm32mp_bsec_read(struct udevice *dev, int offset,
|
|||||||
static int stm32mp_bsec_write(struct udevice *dev, int offset,
|
static int stm32mp_bsec_write(struct udevice *dev, int offset,
|
||||||
const void *buf, int size)
|
const void *buf, int size)
|
||||||
{
|
{
|
||||||
struct stm32mp_bsec_priv *priv = dev_get_priv(dev);
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int i;
|
int i;
|
||||||
bool shadow = true, lock = false;
|
bool shadow = true, lock = false;
|
||||||
int nb_otp = size / sizeof(u32);
|
int nb_otp = size / sizeof(u32);
|
||||||
int otp, cmd;
|
int otp;
|
||||||
unsigned int offs = offset;
|
unsigned int offs = offset;
|
||||||
|
|
||||||
if (offs >= STM32_BSEC_LOCK_OFFSET) {
|
if (offs >= STM32_BSEC_LOCK_OFFSET) {
|
||||||
@ -681,19 +535,6 @@ static int stm32mp_bsec_write(struct udevice *dev, int offset,
|
|||||||
if ((offs % 4) || (size % 4))
|
if ((offs % 4) || (size % 4))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_OPTEE) && priv->tee) {
|
|
||||||
cmd = FUSE_ACCESS;
|
|
||||||
if (shadow)
|
|
||||||
cmd = SHADOW_ACCESS;
|
|
||||||
if (lock)
|
|
||||||
cmd = LOCK_ACCESS;
|
|
||||||
ret = bsec_optee_pta(dev, PTA_BSEC_WRITE_MEM, cmd, offs, (void *)buf, size);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
otp = offs / sizeof(u32);
|
otp = offs / sizeof(u32);
|
||||||
|
|
||||||
for (i = otp; i < otp + nb_otp && i <= BSEC_OTP_MAX_VALUE; i++) {
|
for (i = otp; i < otp + nb_otp && i <= BSEC_OTP_MAX_VALUE; i++) {
|
||||||
@ -742,9 +583,6 @@ static int stm32mp_bsec_probe(struct udevice *dev)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_OPTEE))
|
|
||||||
bsec_optee_open(dev);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* update unlocked shadow for OTP cleared by the rom code
|
* update unlocked shadow for OTP cleared by the rom code
|
||||||
* only executed in SPL, it is done in TF-A for TFABOOT
|
* only executed in SPL, it is done in TF-A for TFABOOT
|
||||||
@ -761,7 +599,6 @@ static int stm32mp_bsec_probe(struct udevice *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct udevice_id stm32mp_bsec_ids[] = {
|
static const struct udevice_id stm32mp_bsec_ids[] = {
|
||||||
{ .compatible = "st,stm32mp13-bsec" },
|
|
||||||
{ .compatible = "st,stm32mp15-bsec" },
|
{ .compatible = "st,stm32mp15-bsec" },
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
@ -771,8 +608,7 @@ U_BOOT_DRIVER(stm32mp_bsec) = {
|
|||||||
.id = UCLASS_MISC,
|
.id = UCLASS_MISC,
|
||||||
.of_match = stm32mp_bsec_ids,
|
.of_match = stm32mp_bsec_ids,
|
||||||
.of_to_plat = stm32mp_bsec_of_to_plat,
|
.of_to_plat = stm32mp_bsec_of_to_plat,
|
||||||
.plat_auto = sizeof(struct stm32mp_bsec_plat),
|
.plat_auto = sizeof(struct stm32mp_bsec_plat),
|
||||||
.priv_auto = sizeof(struct stm32mp_bsec_priv),
|
|
||||||
.ops = &stm32mp_bsec_ops,
|
.ops = &stm32mp_bsec_ops,
|
||||||
.probe = stm32mp_bsec_probe,
|
.probe = stm32mp_bsec_probe,
|
||||||
};
|
};
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include <console.h>
|
#include <console.h>
|
||||||
#include <log.h>
|
#include <log.h>
|
||||||
#include <misc.h>
|
#include <misc.h>
|
||||||
#include <asm/arch/bsec.h>
|
|
||||||
#include <dm/device.h>
|
#include <dm/device.h>
|
||||||
#include <dm/uclass.h>
|
#include <dm/uclass.h>
|
||||||
|
|
||||||
@ -85,6 +84,9 @@ static u32 get_otp_close_mask(void)
|
|||||||
return STM32_OTP_STM32MP15x_CLOSE_MASK;
|
return STM32_OTP_STM32MP15x_CLOSE_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define BSEC_LOCK_ERROR (-1)
|
||||||
|
#define BSEC_LOCK_PERM BIT(0)
|
||||||
|
|
||||||
static int get_misc_dev(struct udevice **dev)
|
static int get_misc_dev(struct udevice **dev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include <dm/device.h>
|
#include <dm/device.h>
|
||||||
#include <dm/uclass.h>
|
#include <dm/uclass.h>
|
||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
#include <spl.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* early TLB into the .data section so that it not get cleared
|
* early TLB into the .data section so that it not get cleared
|
||||||
@ -379,52 +378,3 @@ int arch_misc_init(void)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Without forcing the ".data" section, this would get saved in ".bss". BSS
|
|
||||||
* will be cleared soon after, so it's not suitable.
|
|
||||||
*/
|
|
||||||
static uintptr_t rom_api_table __section(".data");
|
|
||||||
static uintptr_t nt_fw_dtb __section(".data");
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The ROM gives us the API location in r0 when starting. This is only available
|
|
||||||
* during SPL, as there isn't (yet) a mechanism to pass this on to u-boot. Save
|
|
||||||
* the FDT address provided by TF-A in r2 at boot time. This function is called
|
|
||||||
* from start.S
|
|
||||||
*/
|
|
||||||
void save_boot_params(unsigned long r0, unsigned long r1, unsigned long r2,
|
|
||||||
unsigned long r3)
|
|
||||||
{
|
|
||||||
if (IS_ENABLED(CONFIG_STM32_ECDSA_VERIFY))
|
|
||||||
rom_api_table = r0;
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_TFABOOT))
|
|
||||||
nt_fw_dtb = r2;
|
|
||||||
|
|
||||||
save_boot_params_ret();
|
|
||||||
}
|
|
||||||
|
|
||||||
uintptr_t get_stm32mp_rom_api_table(void)
|
|
||||||
{
|
|
||||||
return rom_api_table;
|
|
||||||
}
|
|
||||||
|
|
||||||
uintptr_t get_stm32mp_bl2_dtb(void)
|
|
||||||
{
|
|
||||||
return nt_fw_dtb;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_SPL_BUILD
|
|
||||||
void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
|
|
||||||
{
|
|
||||||
typedef void __noreturn (*image_entry_stm32_t)(u32 romapi);
|
|
||||||
uintptr_t romapi = get_stm32mp_rom_api_table();
|
|
||||||
|
|
||||||
image_entry_stm32_t image_entry =
|
|
||||||
(image_entry_stm32_t)spl_image->entry_point;
|
|
||||||
|
|
||||||
printf("image entry point: 0x%lx\n", spl_image->entry_point);
|
|
||||||
image_entry(romapi);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
@ -51,7 +51,7 @@ phys_size_t board_get_usable_ram_top(phys_size_t total_size)
|
|||||||
|
|
||||||
/* found enough not-reserved memory to relocated U-Boot */
|
/* found enough not-reserved memory to relocated U-Boot */
|
||||||
lmb_init(&lmb);
|
lmb_init(&lmb);
|
||||||
lmb_add(&lmb, gd->ram_base, get_effective_memsize());
|
lmb_add(&lmb, gd->ram_base, gd->ram_size);
|
||||||
boot_fdt_add_mem_rsv_regions(&lmb, (void *)gd->fdt_blob);
|
boot_fdt_add_mem_rsv_regions(&lmb, (void *)gd->fdt_blob);
|
||||||
/* add 8M for reserved memory for display, fdt, gd,... */
|
/* add 8M for reserved memory for display, fdt, gd,... */
|
||||||
size = ALIGN(SZ_8M + CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE),
|
size = ALIGN(SZ_8M + CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE),
|
||||||
|
@ -24,10 +24,26 @@ struct ecdsa_rom_api {
|
|||||||
uint32_t ecc_algo);
|
uint32_t ecc_algo);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Without forcing the ".data" section, this would get saved in ".bss". BSS
|
||||||
|
* will be cleared soon after, so it's not suitable.
|
||||||
|
*/
|
||||||
|
static uintptr_t rom_api_loc __section(".data");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The ROM gives us the API location in r0 when starting. This is only available
|
||||||
|
* during SPL, as there isn't (yet) a mechanism to pass this on to u-boot.
|
||||||
|
*/
|
||||||
|
void save_boot_params(unsigned long r0, unsigned long r1, unsigned long r2,
|
||||||
|
unsigned long r3)
|
||||||
|
{
|
||||||
|
rom_api_loc = r0;
|
||||||
|
save_boot_params_ret();
|
||||||
|
}
|
||||||
|
|
||||||
static void stm32mp_rom_get_ecdsa_functions(struct ecdsa_rom_api *rom)
|
static void stm32mp_rom_get_ecdsa_functions(struct ecdsa_rom_api *rom)
|
||||||
{
|
{
|
||||||
uintptr_t verify_ptr = get_stm32mp_rom_api_table() +
|
uintptr_t verify_ptr = rom_api_loc + ROM_API_OFFSET_ECDSA_VERIFY;
|
||||||
ROM_API_OFFSET_ECDSA_VERIFY;
|
|
||||||
|
|
||||||
rom->ecdsa_verify_signature = *(void **)verify_ptr;
|
rom->ecdsa_verify_signature = *(void **)verify_ptr;
|
||||||
}
|
}
|
||||||
@ -65,10 +81,6 @@ static int romapi_ecdsa_verify(struct udevice *dev,
|
|||||||
memcpy(raw_key + 32, pubkey->y, 32);
|
memcpy(raw_key + 32, pubkey->y, 32);
|
||||||
|
|
||||||
stm32mp_rom_get_ecdsa_functions(&rom);
|
stm32mp_rom_get_ecdsa_functions(&rom);
|
||||||
|
|
||||||
/* Mark BootROM region as executable. */
|
|
||||||
mmu_set_region_dcache_behaviour(0, SZ_2M, DCACHE_DEFAULT_OPTION);
|
|
||||||
|
|
||||||
rom_ret = rom.ecdsa_verify_signature(hash, raw_key, signature, algo);
|
rom_ret = rom.ecdsa_verify_signature(hash, raw_key, signature, algo);
|
||||||
|
|
||||||
return rom_ret == ROM_API_SUCCESS ? 0 : -EPERM;
|
return rom_ret == ROM_API_SUCCESS ? 0 : -EPERM;
|
||||||
|
@ -5,10 +5,3 @@
|
|||||||
|
|
||||||
/* check self hosted debug status = BSEC_DENABLE.DBGSWENABLE */
|
/* check self hosted debug status = BSEC_DENABLE.DBGSWENABLE */
|
||||||
bool bsec_dbgswenable(void);
|
bool bsec_dbgswenable(void);
|
||||||
|
|
||||||
/* Bitfield definition for LOCK status */
|
|
||||||
#define BSEC_LOCK_PERM BIT(30)
|
|
||||||
#define BSEC_LOCK_SHADOW_R BIT(29)
|
|
||||||
#define BSEC_LOCK_SHADOW_W BIT(28)
|
|
||||||
#define BSEC_LOCK_SHADOW_P BIT(27)
|
|
||||||
#define BSEC_LOCK_ERROR BIT(26)
|
|
||||||
|
@ -77,6 +77,3 @@ void stm32mp_misc_init(void);
|
|||||||
|
|
||||||
/* helper function: read data from OTP */
|
/* helper function: read data from OTP */
|
||||||
u32 get_otp(int index, int shift, int mask);
|
u32 get_otp(int index, int shift, int mask);
|
||||||
|
|
||||||
uintptr_t get_stm32mp_rom_api_table(void);
|
|
||||||
uintptr_t get_stm32mp_bl2_dtb(void);
|
|
||||||
|
@ -85,7 +85,6 @@ choice
|
|||||||
config TARGET_SOCRATES
|
config TARGET_SOCRATES
|
||||||
bool "Support socrates"
|
bool "Support socrates"
|
||||||
select ARCH_MPC8544
|
select ARCH_MPC8544
|
||||||
select BINMAN
|
|
||||||
|
|
||||||
config TARGET_P3041DS
|
config TARGET_P3041DS
|
||||||
bool "Support P3041DS"
|
bool "Support P3041DS"
|
||||||
@ -1499,14 +1498,14 @@ config SYS_FSL_USB_DUAL_PHY_ENABLE
|
|||||||
|
|
||||||
config SYS_MPC85XX_NO_RESETVEC
|
config SYS_MPC85XX_NO_RESETVEC
|
||||||
bool "Discard resetvec section and move bootpg section up"
|
bool "Discard resetvec section and move bootpg section up"
|
||||||
depends on MPC85xx && !MPC85XX_HAVE_RESET_VECTOR
|
depends on MPC85xx
|
||||||
help
|
help
|
||||||
If this variable is specified, the section .resetvec is not kept and
|
If this variable is specified, the section .resetvec is not kept and
|
||||||
the section .bootpg is placed in the previous 4k of the .text section.
|
the section .bootpg is placed in the previous 4k of the .text section.
|
||||||
|
|
||||||
config SPL_SYS_MPC85XX_NO_RESETVEC
|
config SPL_SYS_MPC85XX_NO_RESETVEC
|
||||||
bool "Discard resetvec section and move bootpg section up, in SPL"
|
bool "Discard resetvec section and move bootpg section up, in SPL"
|
||||||
depends on MPC85xx && SPL && !MPC85XX_HAVE_RESET_VECTOR
|
depends on MPC85xx && SPL
|
||||||
help
|
help
|
||||||
If this variable is specified, the section .resetvec is not kept and
|
If this variable is specified, the section .resetvec is not kept and
|
||||||
the section .bootpg is placed in the previous 4k of the .text section,
|
the section .bootpg is placed in the previous 4k of the .text section,
|
||||||
@ -1514,7 +1513,7 @@ config SPL_SYS_MPC85XX_NO_RESETVEC
|
|||||||
|
|
||||||
config TPL_SYS_MPC85XX_NO_RESETVEC
|
config TPL_SYS_MPC85XX_NO_RESETVEC
|
||||||
bool "Discard resetvec section and move bootpg section up, in TPL"
|
bool "Discard resetvec section and move bootpg section up, in TPL"
|
||||||
depends on MPC85xx && TPL && !MPC85XX_HAVE_RESET_VECTOR
|
depends on MPC85xx && TPL
|
||||||
help
|
help
|
||||||
If this variable is specified, the section .resetvec is not kept and
|
If this variable is specified, the section .resetvec is not kept and
|
||||||
the section .bootpg is placed in the previous 4k of the .text section,
|
the section .bootpg is placed in the previous 4k of the .text section,
|
||||||
|
@ -3,26 +3,11 @@
|
|||||||
# (C) Copyright 2002,2003 Motorola Inc.
|
# (C) Copyright 2002,2003 Motorola Inc.
|
||||||
# Xianghua Xiao, X.Xiao@motorola.com
|
# Xianghua Xiao, X.Xiao@motorola.com
|
||||||
|
|
||||||
PLATFORM_CPPFLAGS += -msoft-float -mno-string
|
PLATFORM_CPPFLAGS += -Wa,-me500 -msoft-float -mno-string
|
||||||
PLATFORM_RELFLAGS += -msingle-pic-base -fno-jump-tables
|
PLATFORM_RELFLAGS += -msingle-pic-base -fno-jump-tables
|
||||||
|
|
||||||
# No SPE instruction when building u-boot
|
# -mspe=yes is needed to have -mno-spe accepted by a buggy GCC;
|
||||||
# (We use all available options to help semi-broken compilers)
|
|
||||||
# see "[PATCH,rs6000] make -mno-spe work as expected" on
|
# see "[PATCH,rs6000] make -mno-spe work as expected" on
|
||||||
# http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html
|
# http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html
|
||||||
PLATFORM_CPPFLAGS += $(call cc-option,-mno-spe) \
|
PLATFORM_CPPFLAGS += $(call cc-option,-mspe=yes) \
|
||||||
$(call cc-option,-mspe=no)
|
$(call cc-option,-mno-spe)
|
||||||
|
|
||||||
# No AltiVec or VSX instructions when building u-boot
|
|
||||||
PLATFORM_CPPFLAGS += $(call cc-option,-mno-altivec)
|
|
||||||
PLATFORM_CPPFLAGS += $(call cc-option,-mno-vsx)
|
|
||||||
|
|
||||||
ifdef CONFIG_E6500
|
|
||||||
PLATFORM_CPPFLAGS += -mcpu=e6500
|
|
||||||
else ifdef CONFIG_E5500
|
|
||||||
PLATFORM_CPPFLAGS += -mcpu=e5500
|
|
||||||
else ifdef CONFIG_E500MC
|
|
||||||
PLATFORM_CPPFLAGS += -mcpu=e500mc
|
|
||||||
else
|
|
||||||
PLATFORM_CPPFLAGS += -mcpu=8540
|
|
||||||
endif
|
|
||||||
|
@ -16,23 +16,12 @@
|
|||||||
#define LOAD_LONG(reg, idx) ld reg, (idx*SIZE_LONG)(sp)
|
#define LOAD_LONG(reg, idx) ld reg, (idx*SIZE_LONG)(sp)
|
||||||
#define PE_MACHINE IMAGE_FILE_MACHINE_RISCV64
|
#define PE_MACHINE IMAGE_FILE_MACHINE_RISCV64
|
||||||
#define PE_MAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC
|
#define PE_MAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC
|
||||||
#define IMG_CHARACTERISTICS \
|
|
||||||
(IMAGE_FILE_EXECUTABLE_IMAGE | \
|
|
||||||
IMAGE_FILE_LINE_NUMS_STRIPPED | \
|
|
||||||
IMAGE_FILE_LOCAL_SYMS_STRIPPED | \
|
|
||||||
IMAGE_FILE_LARGE_ADDRESS_AWARE | \
|
|
||||||
IMAGE_FILE_DEBUG_STRIPPED)
|
|
||||||
#else
|
#else
|
||||||
#define SIZE_LONG 4
|
#define SIZE_LONG 4
|
||||||
#define SAVE_LONG(reg, idx) sw reg, (idx*SIZE_LONG)(sp)
|
#define SAVE_LONG(reg, idx) sw reg, (idx*SIZE_LONG)(sp)
|
||||||
#define LOAD_LONG(reg, idx) lw reg, (idx*SIZE_LONG)(sp)
|
#define LOAD_LONG(reg, idx) lw reg, (idx*SIZE_LONG)(sp)
|
||||||
#define PE_MACHINE IMAGE_FILE_MACHINE_RISCV32
|
#define PE_MACHINE IMAGE_FILE_MACHINE_RISCV32
|
||||||
#define PE_MAGIC IMAGE_NT_OPTIONAL_HDR32_MAGIC
|
#define PE_MAGIC IMAGE_NT_OPTIONAL_HDR32_MAGIC
|
||||||
#define IMG_CHARACTERISTICS \
|
|
||||||
(IMAGE_FILE_EXECUTABLE_IMAGE | \
|
|
||||||
IMAGE_FILE_LINE_NUMS_STRIPPED | \
|
|
||||||
IMAGE_FILE_LOCAL_SYMS_STRIPPED | \
|
|
||||||
IMAGE_FILE_DEBUG_STRIPPED)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -58,7 +47,11 @@ coff_header:
|
|||||||
.long 0 /* PointerToSymbolTable */
|
.long 0 /* PointerToSymbolTable */
|
||||||
.long 0 /* NumberOfSymbols */
|
.long 0 /* NumberOfSymbols */
|
||||||
.short section_table - optional_header /* SizeOfOptionalHeader */
|
.short section_table - optional_header /* SizeOfOptionalHeader */
|
||||||
.short IMG_CHARACTERISTICS /* Characteristics */
|
/* Characteristics */
|
||||||
|
.short (IMAGE_FILE_EXECUTABLE_IMAGE | \
|
||||||
|
IMAGE_FILE_LINE_NUMS_STRIPPED | \
|
||||||
|
IMAGE_FILE_LOCAL_SYMS_STRIPPED | \
|
||||||
|
IMAGE_FILE_DEBUG_STRIPPED)
|
||||||
optional_header:
|
optional_header:
|
||||||
.short PE_MAGIC /* PE32(+) format */
|
.short PE_MAGIC /* PE32(+) format */
|
||||||
.byte 0x02 /* MajorLinkerVersion */
|
.byte 0x02 /* MajorLinkerVersion */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
config CMD_STBOARD
|
config CMD_STBOARD
|
||||||
bool "stboard - command for OTP board information"
|
bool "stboard - command for OTP board information"
|
||||||
depends on ARCH_STM32MP
|
depends on ARCH_STM32MP
|
||||||
default y if TARGET_ST_STM32MP15x || TARGET_ST_STM32MP13x
|
default y if TARGET_ST_STM32MP15x
|
||||||
help
|
help
|
||||||
This compile the stboard command to
|
This compile the stboard command to
|
||||||
read and write the board in the OTP.
|
read and write the board in the OTP.
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019, STMicroelectronics - All Rights Reserved
|
* Copyright (C) 2019, STMicroelectronics - All Rights Reserved
|
||||||
*
|
*
|
||||||
* the command stboard supports the STMicroelectronics board identification
|
* the st command stboard supports the STMicroelectronics board identification
|
||||||
* saved in OTP_BOARD.
|
* saved in OTP 59.
|
||||||
*
|
*
|
||||||
* The ST product codification have several element
|
* The ST product codification have several element
|
||||||
* - "Commercial Product Name" (CPN): type of product board (DKX, EVX)
|
* - "Commercial Product Name" (CPN): type of product board (DKX, EVX)
|
||||||
@ -18,7 +18,7 @@
|
|||||||
* - Finished Good = EVA32MP157A1$AU1
|
* - Finished Good = EVA32MP157A1$AU1
|
||||||
*
|
*
|
||||||
* Both information are written on board and these information are also saved
|
* Both information are written on board and these information are also saved
|
||||||
* in OTP_BOARD (59 for STM32MP15x or 60 for STM32MP13x), with:
|
* in OTP59, with:
|
||||||
* bit [31:16] (hex) => Board id, MBxxxx
|
* bit [31:16] (hex) => Board id, MBxxxx
|
||||||
* bit [15:12] (dec) => Variant CPN (1....15)
|
* bit [15:12] (dec) => Variant CPN (1....15)
|
||||||
* bit [11:8] (dec) => Revision board (index with A = 1, Z = 26)
|
* bit [11:8] (dec) => Revision board (index with A = 1, Z = 26)
|
||||||
@ -34,7 +34,6 @@
|
|||||||
#include <command.h>
|
#include <command.h>
|
||||||
#include <console.h>
|
#include <console.h>
|
||||||
#include <misc.h>
|
#include <misc.h>
|
||||||
#include <asm/arch/bsec.h>
|
|
||||||
#include <dm/device.h>
|
#include <dm/device.h>
|
||||||
#include <dm/uclass.h>
|
#include <dm/uclass.h>
|
||||||
|
|
||||||
@ -49,7 +48,6 @@ static bool check_stboard(u16 board)
|
|||||||
0x1298,
|
0x1298,
|
||||||
0x1341,
|
0x1341,
|
||||||
0x1497,
|
0x1497,
|
||||||
0x1635,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(st_board_id); i++)
|
for (i = 0; i < ARRAY_SIZE(st_board_id); i++)
|
||||||
@ -111,7 +109,7 @@ static int do_stboard(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||||||
else
|
else
|
||||||
display_stboard(otp);
|
display_stboard(otp);
|
||||||
printf(" OTP %d %s locked !\n", BSEC_OTP_BOARD,
|
printf(" OTP %d %s locked !\n", BSEC_OTP_BOARD,
|
||||||
lock & BSEC_LOCK_PERM ? "" : "NOT");
|
lock == 1 ? "" : "NOT");
|
||||||
return CMD_RET_SUCCESS;
|
return CMD_RET_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +178,7 @@ static int do_stboard(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* write persistent lock */
|
/* write persistent lock */
|
||||||
otp = BSEC_LOCK_PERM;
|
otp = 1;
|
||||||
ret = misc_write(dev, STM32_BSEC_LOCK(BSEC_OTP_BOARD),
|
ret = misc_write(dev, STM32_BSEC_LOCK(BSEC_OTP_BOARD),
|
||||||
&otp, sizeof(otp));
|
&otp, sizeof(otp));
|
||||||
if (ret != sizeof(otp)) {
|
if (ret != sizeof(otp)) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
if TARGET_OMAP3_EVM
|
if TARGET_OMAP3_EVM
|
||||||
|
|
||||||
config SYS_BOARD
|
config SYS_BOARD
|
||||||
default "omap3evm"
|
default "evm"
|
||||||
|
|
||||||
config SYS_VENDOR
|
config SYS_VENDOR
|
||||||
default "ti"
|
default "ti"
|
@ -1,6 +1,6 @@
|
|||||||
EVM BOARD
|
EVM BOARD
|
||||||
M: Derald D. Woods <woods.technical@gmail.com>
|
M: Derald D. Woods <woods.technical@gmail.com>
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: board/ti/omap3evm/
|
F: board/ti/evm/
|
||||||
F: include/configs/omap3_evm.h
|
F: include/configs/omap3_evm.h
|
||||||
F: configs/omap3_evm_defconfig
|
F: configs/omap3_evm_defconfig
|
@ -725,19 +725,16 @@ config RAMBOOT_PBL
|
|||||||
For more details refer to doc/README.pblimage
|
For more details refer to doc/README.pblimage
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Freescale PBL (or predecessor) load location"
|
prompt "Freescale PBL load location"
|
||||||
depends on RAMBOOT_PBL || ((TARGET_P1010RDB_PA || TARGET_P1010RDB_PB \
|
depends on RAMBOOT_PBL || ((TARGET_P1010RDB_PA || TARGET_P1010RDB_PB \
|
||||||
|| TARGET_P1020RDB_PC || TARGET_P1020RDB_PD || TARGET_P2020RDB) \
|
|| TARGET_P1020RDB_PC || TARGET_P1020RDB_PD || TARGET_P2020RDB) \
|
||||||
&& !CMD_NAND)
|
&& !CMD_NAND)
|
||||||
|
|
||||||
config SDCARD
|
config SDCARD
|
||||||
bool "Freescale PBL (or similar) is found on SD card"
|
bool "Freescale PBL is found on SD card"
|
||||||
|
|
||||||
config SPIFLASH
|
config SPIFLASH
|
||||||
bool "Freescale PBL (or similar) is found on SPI flash"
|
bool "Freescale PBL is found on SPI flash"
|
||||||
|
|
||||||
config NO_PBL
|
|
||||||
bool "Freescale PBL (or similar) is not used in this case"
|
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
@ -618,10 +618,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
|
|||||||
* Scenario 2: If there is an fdt_addr specified, pass it along to
|
* Scenario 2: If there is an fdt_addr specified, pass it along to
|
||||||
* bootm, and adjust argc appropriately.
|
* bootm, and adjust argc appropriately.
|
||||||
*
|
*
|
||||||
* Scenario 3: If there is an fdtcontroladdr specified, pass it along to
|
* Scenario 3: fdt blob is not available.
|
||||||
* bootm, and adjust argc appropriately, unless the image type is fitImage.
|
|
||||||
*
|
|
||||||
* Scenario 4: fdt blob is not available.
|
|
||||||
*/
|
*/
|
||||||
bootm_argv[3] = env_get("fdt_addr_r");
|
bootm_argv[3] = env_get("fdt_addr_r");
|
||||||
|
|
||||||
@ -729,18 +726,14 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
|
|||||||
if (!bootm_argv[3])
|
if (!bootm_argv[3])
|
||||||
bootm_argv[3] = env_get("fdt_addr");
|
bootm_argv[3] = env_get("fdt_addr");
|
||||||
|
|
||||||
kernel_addr_r = genimg_get_kernel_addr(kernel_addr);
|
|
||||||
buf = map_sysmem(kernel_addr_r, 0);
|
|
||||||
|
|
||||||
if (!bootm_argv[3] && genimg_get_format(buf) != IMAGE_FORMAT_FIT)
|
|
||||||
bootm_argv[3] = env_get("fdtcontroladdr");
|
|
||||||
|
|
||||||
if (bootm_argv[3]) {
|
if (bootm_argv[3]) {
|
||||||
if (!bootm_argv[2])
|
if (!bootm_argv[2])
|
||||||
bootm_argv[2] = "-";
|
bootm_argv[2] = "-";
|
||||||
bootm_argc = 4;
|
bootm_argc = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kernel_addr_r = genimg_get_kernel_addr(kernel_addr);
|
||||||
|
buf = map_sysmem(kernel_addr_r, 0);
|
||||||
/* Try bootm for legacy and FIT format image */
|
/* Try bootm for legacy and FIT format image */
|
||||||
if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID &&
|
if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID &&
|
||||||
IS_ENABLED(CONFIG_CMD_BOOTM))
|
IS_ENABLED(CONFIG_CMD_BOOTM))
|
||||||
|
@ -1818,7 +1818,7 @@ config SYS_DISABLE_AUTOLOAD
|
|||||||
|
|
||||||
config CMD_WGET
|
config CMD_WGET
|
||||||
bool "wget"
|
bool "wget"
|
||||||
select PROT_TCP
|
select TCP
|
||||||
help
|
help
|
||||||
wget is a simple command to download kernel, or other files,
|
wget is a simple command to download kernel, or other files,
|
||||||
from a http server over TCP.
|
from a http server over TCP.
|
||||||
@ -2539,7 +2539,6 @@ config CMD_MTDPARTS_SHOW_NET_SIZES
|
|||||||
config MTDIDS_DEFAULT
|
config MTDIDS_DEFAULT
|
||||||
string "Default MTD IDs"
|
string "Default MTD IDs"
|
||||||
depends on MTD || SPI_FLASH
|
depends on MTD || SPI_FLASH
|
||||||
depends on !SYS_MTDPARTS_RUNTIME
|
|
||||||
help
|
help
|
||||||
Defines a default MTD IDs list for use with MTD partitions in the
|
Defines a default MTD IDs list for use with MTD partitions in the
|
||||||
Linux MTD command line partitions format.
|
Linux MTD command line partitions format.
|
||||||
@ -2547,7 +2546,6 @@ config MTDIDS_DEFAULT
|
|||||||
config MTDPARTS_DEFAULT
|
config MTDPARTS_DEFAULT
|
||||||
string "Default MTD partition scheme"
|
string "Default MTD partition scheme"
|
||||||
depends on MTD || SPI_FLASH
|
depends on MTD || SPI_FLASH
|
||||||
depends on !SYS_MTDPARTS_RUNTIME
|
|
||||||
help
|
help
|
||||||
Defines a default MTD partitioning scheme in the Linux MTD command
|
Defines a default MTD partitioning scheme in the Linux MTD command
|
||||||
line partitions format
|
line partitions format
|
||||||
|
114
cmd/eficonfig.c
114
cmd/eficonfig.c
@ -1683,7 +1683,7 @@ static efi_status_t eficonfig_show_boot_selection(unsigned int *selected)
|
|||||||
u32 i;
|
u32 i;
|
||||||
u16 *bootorder;
|
u16 *bootorder;
|
||||||
efi_status_t ret;
|
efi_status_t ret;
|
||||||
u16 *var_name16 = NULL;
|
u16 *var_name16 = NULL, *p;
|
||||||
efi_uintn_t num, size, buf_size;
|
efi_uintn_t num, size, buf_size;
|
||||||
struct efimenu *efi_menu;
|
struct efimenu *efi_menu;
|
||||||
struct list_head *pos, *n;
|
struct list_head *pos, *n;
|
||||||
@ -1718,12 +1718,24 @@ static efi_status_t eficonfig_show_boot_selection(unsigned int *selected)
|
|||||||
int index;
|
int index;
|
||||||
efi_guid_t guid;
|
efi_guid_t guid;
|
||||||
|
|
||||||
ret = efi_next_variable_name(&buf_size, &var_name16, &guid);
|
size = buf_size;
|
||||||
|
ret = efi_get_next_variable_name_int(&size, var_name16, &guid);
|
||||||
if (ret == EFI_NOT_FOUND)
|
if (ret == EFI_NOT_FOUND)
|
||||||
break;
|
break;
|
||||||
if (ret != EFI_SUCCESS)
|
if (ret == EFI_BUFFER_TOO_SMALL) {
|
||||||
goto out;
|
buf_size = size;
|
||||||
|
p = realloc(var_name16, buf_size);
|
||||||
|
if (!p) {
|
||||||
|
free(var_name16);
|
||||||
|
return EFI_OUT_OF_RESOURCES;
|
||||||
|
}
|
||||||
|
var_name16 = p;
|
||||||
|
ret = efi_get_next_variable_name_int(&size, var_name16, &guid);
|
||||||
|
}
|
||||||
|
if (ret != EFI_SUCCESS) {
|
||||||
|
free(var_name16);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
if (efi_varname_is_load_option(var_name16, &index)) {
|
if (efi_varname_is_load_option(var_name16, &index)) {
|
||||||
/* If the index is included in the BootOrder, skip it */
|
/* If the index is included in the BootOrder, skip it */
|
||||||
if (search_bootorder(bootorder, num, index, NULL))
|
if (search_bootorder(bootorder, num, index, NULL))
|
||||||
@ -2014,7 +2026,7 @@ static efi_status_t eficonfig_create_change_boot_order_entry(struct efimenu *efi
|
|||||||
u32 i;
|
u32 i;
|
||||||
char *title;
|
char *title;
|
||||||
efi_status_t ret;
|
efi_status_t ret;
|
||||||
u16 *var_name16 = NULL;
|
u16 *var_name16 = NULL, *p;
|
||||||
efi_uintn_t size, buf_size;
|
efi_uintn_t size, buf_size;
|
||||||
|
|
||||||
/* list the load option in the order of BootOrder variable */
|
/* list the load option in the order of BootOrder variable */
|
||||||
@ -2042,9 +2054,19 @@ static efi_status_t eficonfig_create_change_boot_order_entry(struct efimenu *efi
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
size = buf_size;
|
size = buf_size;
|
||||||
ret = efi_next_variable_name(&buf_size, &var_name16, &guid);
|
ret = efi_get_next_variable_name_int(&size, var_name16, &guid);
|
||||||
if (ret == EFI_NOT_FOUND)
|
if (ret == EFI_NOT_FOUND)
|
||||||
break;
|
break;
|
||||||
|
if (ret == EFI_BUFFER_TOO_SMALL) {
|
||||||
|
buf_size = size;
|
||||||
|
p = realloc(var_name16, buf_size);
|
||||||
|
if (!p) {
|
||||||
|
ret = EFI_OUT_OF_RESOURCES;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
var_name16 = p;
|
||||||
|
ret = efi_get_next_variable_name_int(&size, var_name16, &guid);
|
||||||
|
}
|
||||||
if (ret != EFI_SUCCESS)
|
if (ret != EFI_SUCCESS)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@ -2310,15 +2332,14 @@ out:
|
|||||||
efi_status_t eficonfig_delete_invalid_boot_option(struct eficonfig_media_boot_option *opt,
|
efi_status_t eficonfig_delete_invalid_boot_option(struct eficonfig_media_boot_option *opt,
|
||||||
efi_status_t count)
|
efi_status_t count)
|
||||||
{
|
{
|
||||||
|
u32 i;
|
||||||
efi_uintn_t size;
|
efi_uintn_t size;
|
||||||
void *load_option;
|
void *load_option;
|
||||||
u32 i, list_size = 0;
|
|
||||||
struct efi_load_option lo;
|
struct efi_load_option lo;
|
||||||
u16 *var_name16 = NULL;
|
u16 *var_name16 = NULL, *p;
|
||||||
u16 varname[] = u"Boot####";
|
u16 varname[] = u"Boot####";
|
||||||
efi_status_t ret = EFI_SUCCESS;
|
efi_status_t ret = EFI_SUCCESS;
|
||||||
u16 *delete_index_list = NULL, *p;
|
efi_uintn_t varname_size, buf_size;
|
||||||
efi_uintn_t buf_size;
|
|
||||||
|
|
||||||
buf_size = 128;
|
buf_size = 128;
|
||||||
var_name16 = malloc(buf_size);
|
var_name16 = malloc(buf_size);
|
||||||
@ -2331,18 +2352,24 @@ efi_status_t eficonfig_delete_invalid_boot_option(struct eficonfig_media_boot_op
|
|||||||
efi_guid_t guid;
|
efi_guid_t guid;
|
||||||
efi_uintn_t tmp;
|
efi_uintn_t tmp;
|
||||||
|
|
||||||
ret = efi_next_variable_name(&buf_size, &var_name16, &guid);
|
varname_size = buf_size;
|
||||||
if (ret == EFI_NOT_FOUND) {
|
ret = efi_get_next_variable_name_int(&varname_size, var_name16, &guid);
|
||||||
/*
|
if (ret == EFI_NOT_FOUND)
|
||||||
* EFI_NOT_FOUND indicates we retrieved all EFI variables.
|
|
||||||
* This should be treated as success.
|
|
||||||
*/
|
|
||||||
ret = EFI_SUCCESS;
|
|
||||||
break;
|
break;
|
||||||
|
if (ret == EFI_BUFFER_TOO_SMALL) {
|
||||||
|
buf_size = varname_size;
|
||||||
|
p = realloc(var_name16, buf_size);
|
||||||
|
if (!p) {
|
||||||
|
free(var_name16);
|
||||||
|
return EFI_OUT_OF_RESOURCES;
|
||||||
|
}
|
||||||
|
var_name16 = p;
|
||||||
|
ret = efi_get_next_variable_name_int(&varname_size, var_name16, &guid);
|
||||||
|
}
|
||||||
|
if (ret != EFI_SUCCESS) {
|
||||||
|
free(var_name16);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
if (ret != EFI_SUCCESS)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
if (!efi_varname_is_load_option(var_name16, &index))
|
if (!efi_varname_is_load_option(var_name16, &index))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -2356,47 +2383,30 @@ efi_status_t eficonfig_delete_invalid_boot_option(struct eficonfig_media_boot_op
|
|||||||
if (ret != EFI_SUCCESS)
|
if (ret != EFI_SUCCESS)
|
||||||
goto next;
|
goto next;
|
||||||
|
|
||||||
if (size >= sizeof(efi_guid_bootmenu_auto_generated) &&
|
if (size >= sizeof(efi_guid_bootmenu_auto_generated)) {
|
||||||
!guidcmp(lo.optional_data, &efi_guid_bootmenu_auto_generated)) {
|
if (guidcmp(lo.optional_data, &efi_guid_bootmenu_auto_generated) == 0) {
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
if (opt[i].size == tmp &&
|
if (opt[i].size == tmp &&
|
||||||
memcmp(opt[i].lo, load_option, tmp) == 0) {
|
memcmp(opt[i].lo, load_option, tmp) == 0) {
|
||||||
opt[i].exist = true;
|
opt[i].exist = true;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
if (i == count) {
|
||||||
* The entire list of variables must be retrieved by
|
ret = delete_boot_option(i);
|
||||||
* efi_get_next_variable_name_int() before deleting the invalid
|
if (ret != EFI_SUCCESS) {
|
||||||
* boot option, just save the index here.
|
free(load_option);
|
||||||
*/
|
goto out;
|
||||||
if (i == count) {
|
}
|
||||||
p = realloc(delete_index_list, sizeof(u32) *
|
|
||||||
(list_size + 1));
|
|
||||||
if (!p) {
|
|
||||||
ret = EFI_OUT_OF_RESOURCES;
|
|
||||||
goto out;
|
|
||||||
}
|
}
|
||||||
delete_index_list = p;
|
|
||||||
delete_index_list[list_size++] = index;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
next:
|
next:
|
||||||
free(load_option);
|
free(load_option);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* delete all invalid boot options */
|
|
||||||
for (i = 0; i < list_size; i++) {
|
|
||||||
ret = delete_boot_option(delete_index_list[i]);
|
|
||||||
if (ret != EFI_SUCCESS)
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
free(var_name16);
|
|
||||||
free(delete_index_list);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,28 +72,6 @@ static bool file_have_auth_header(void *buf, efi_uintn_t size)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* file_is_null_key() - check the file is an authenticated and signed null key
|
|
||||||
*
|
|
||||||
* @auth: pointer to the file
|
|
||||||
* @size: file size
|
|
||||||
* @null_key: pointer to store the result
|
|
||||||
* Return: status code
|
|
||||||
*/
|
|
||||||
static efi_status_t file_is_null_key(struct efi_variable_authentication_2 *auth,
|
|
||||||
efi_uintn_t size, bool *null_key)
|
|
||||||
{
|
|
||||||
efi_uintn_t auth_size =
|
|
||||||
sizeof(auth->time_stamp) + auth->auth_info.hdr.dwLength;
|
|
||||||
|
|
||||||
if (size < auth_size)
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
|
|
||||||
*null_key = (size == auth_size);
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eficonfig_process_enroll_key() - enroll key into signature database
|
* eficonfig_process_enroll_key() - enroll key into signature database
|
||||||
*
|
*
|
||||||
@ -106,7 +84,6 @@ static efi_status_t eficonfig_process_enroll_key(void *data)
|
|||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
efi_uintn_t size;
|
efi_uintn_t size;
|
||||||
efi_status_t ret;
|
efi_status_t ret;
|
||||||
bool null_key = false;
|
|
||||||
struct efi_file_handle *f = NULL;
|
struct efi_file_handle *f = NULL;
|
||||||
struct efi_device_path *full_dp = NULL;
|
struct efi_device_path *full_dp = NULL;
|
||||||
struct eficonfig_select_file_info file_info;
|
struct eficonfig_select_file_info file_info;
|
||||||
@ -172,24 +149,13 @@ static efi_status_t eficonfig_process_enroll_key(void *data)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = file_is_null_key((struct efi_variable_authentication_2 *)buf,
|
|
||||||
size, &null_key);
|
|
||||||
if (ret != EFI_SUCCESS) {
|
|
||||||
eficonfig_print_msg("ERROR! Invalid file format.");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
attr = EFI_VARIABLE_NON_VOLATILE |
|
attr = EFI_VARIABLE_NON_VOLATILE |
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS |
|
EFI_VARIABLE_BOOTSERVICE_ACCESS |
|
||||||
EFI_VARIABLE_RUNTIME_ACCESS |
|
EFI_VARIABLE_RUNTIME_ACCESS |
|
||||||
EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS;
|
EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS;
|
||||||
|
|
||||||
/*
|
/* PK can enroll only one certificate */
|
||||||
* PK can enroll only one certificate.
|
if (u16_strcmp(data, u"PK")) {
|
||||||
* The signed null key is used to clear KEK, db and dbx.
|
|
||||||
* EFI_VARIABLE_APPEND_WRITE attribute must not be set in these cases.
|
|
||||||
*/
|
|
||||||
if (u16_strcmp(data, u"PK") && !null_key) {
|
|
||||||
efi_uintn_t db_size = 0;
|
efi_uintn_t db_size = 0;
|
||||||
|
|
||||||
/* check the variable exists. If exists, add APPEND_WRITE attribute */
|
/* check the variable exists. If exists, add APPEND_WRITE attribute */
|
||||||
|
@ -591,15 +591,25 @@ static void print_memory_attributes(u64 attributes)
|
|||||||
static int do_efi_show_memmap(struct cmd_tbl *cmdtp, int flag,
|
static int do_efi_show_memmap(struct cmd_tbl *cmdtp, int flag,
|
||||||
int argc, char *const argv[])
|
int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
struct efi_mem_desc *memmap, *map;
|
struct efi_mem_desc *memmap = NULL, *map;
|
||||||
efi_uintn_t map_size;
|
efi_uintn_t map_size = 0;
|
||||||
const char *type;
|
const char *type;
|
||||||
int i;
|
int i;
|
||||||
efi_status_t ret;
|
efi_status_t ret;
|
||||||
|
|
||||||
ret = efi_get_memory_map_alloc(&map_size, &memmap);
|
ret = efi_get_memory_map(&map_size, memmap, NULL, NULL, NULL);
|
||||||
if (ret != EFI_SUCCESS)
|
if (ret == EFI_BUFFER_TOO_SMALL) {
|
||||||
|
map_size += sizeof(struct efi_mem_desc); /* for my own */
|
||||||
|
ret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, map_size,
|
||||||
|
(void *)&memmap);
|
||||||
|
if (ret != EFI_SUCCESS)
|
||||||
|
return CMD_RET_FAILURE;
|
||||||
|
ret = efi_get_memory_map(&map_size, memmap, NULL, NULL, NULL);
|
||||||
|
}
|
||||||
|
if (ret != EFI_SUCCESS) {
|
||||||
|
efi_free_pool(memmap);
|
||||||
return CMD_RET_FAILURE;
|
return CMD_RET_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
printf("Type Start%.*s End%.*s Attributes\n",
|
printf("Type Start%.*s End%.*s Attributes\n",
|
||||||
EFI_PHYS_ADDR_WIDTH - 5, spc, EFI_PHYS_ADDR_WIDTH - 3, spc);
|
EFI_PHYS_ADDR_WIDTH - 5, spc, EFI_PHYS_ADDR_WIDTH - 3, spc);
|
||||||
|
@ -10,13 +10,10 @@
|
|||||||
static int do_exit(struct cmd_tbl *cmdtp, int flag, int argc,
|
static int do_exit(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
char *const argv[])
|
char *const argv[])
|
||||||
{
|
{
|
||||||
int r;
|
|
||||||
|
|
||||||
r = 0;
|
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
r = simple_strtoul(argv[1], NULL, 10);
|
return dectoul(argv[1], NULL);
|
||||||
|
|
||||||
return -r - 2;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
U_BOOT_CMD(
|
U_BOOT_CMD(
|
||||||
|
@ -19,14 +19,8 @@
|
|||||||
static int do_fastboot_udp(int argc, char *const argv[],
|
static int do_fastboot_udp(int argc, char *const argv[],
|
||||||
uintptr_t buf_addr, size_t buf_size)
|
uintptr_t buf_addr, size_t buf_size)
|
||||||
{
|
{
|
||||||
int err;
|
#if CONFIG_IS_ENABLED(UDP_FUNCTION_FASTBOOT)
|
||||||
|
int err = net_loop(FASTBOOT);
|
||||||
if (!CONFIG_IS_ENABLED(UDP_FUNCTION_FASTBOOT)) {
|
|
||||||
pr_err("Fastboot UDP not enabled\n");
|
|
||||||
return CMD_RET_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = net_loop(FASTBOOT);
|
|
||||||
|
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
printf("fastboot udp error: %d\n", err);
|
printf("fastboot udp error: %d\n", err);
|
||||||
@ -34,21 +28,21 @@ static int do_fastboot_udp(int argc, char *const argv[],
|
|||||||
}
|
}
|
||||||
|
|
||||||
return CMD_RET_SUCCESS;
|
return CMD_RET_SUCCESS;
|
||||||
|
#else
|
||||||
|
pr_err("Fastboot UDP not enabled\n");
|
||||||
|
return CMD_RET_FAILURE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_fastboot_usb(int argc, char *const argv[],
|
static int do_fastboot_usb(int argc, char *const argv[],
|
||||||
uintptr_t buf_addr, size_t buf_size)
|
uintptr_t buf_addr, size_t buf_size)
|
||||||
{
|
{
|
||||||
|
#if CONFIG_IS_ENABLED(USB_FUNCTION_FASTBOOT)
|
||||||
int controller_index;
|
int controller_index;
|
||||||
char *usb_controller;
|
char *usb_controller;
|
||||||
char *endp;
|
char *endp;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!CONFIG_IS_ENABLED(USB_FUNCTION_FASTBOOT)) {
|
|
||||||
pr_err("Fastboot USB not enabled\n");
|
|
||||||
return CMD_RET_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
return CMD_RET_USAGE;
|
return CMD_RET_USAGE;
|
||||||
|
|
||||||
@ -94,6 +88,10 @@ exit:
|
|||||||
g_dnl_clear_detach();
|
g_dnl_clear_detach();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
#else
|
||||||
|
pr_err("Fastboot USB not enabled\n");
|
||||||
|
return CMD_RET_FAILURE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_fastboot(struct cmd_tbl *cmdtp, int flag, int argc,
|
static int do_fastboot(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
@ -150,12 +148,17 @@ NXTARG:
|
|||||||
return do_fastboot_usb(argc, argv, buf_addr, buf_size);
|
return do_fastboot_usb(argc, argv, buf_addr, buf_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
U_BOOT_CMD(
|
#ifdef CONFIG_SYS_LONGHELP
|
||||||
fastboot, CONFIG_SYS_MAXARGS, 1, do_fastboot,
|
static char fastboot_help_text[] =
|
||||||
"run as a fastboot usb or udp device",
|
|
||||||
"[-l addr] [-s size] usb <controller> | udp\n"
|
"[-l addr] [-s size] usb <controller> | udp\n"
|
||||||
"\taddr - address of buffer used during data transfers ("
|
"\taddr - address of buffer used during data transfers ("
|
||||||
__stringify(CONFIG_FASTBOOT_BUF_ADDR) ")\n"
|
__stringify(CONFIG_FASTBOOT_BUF_ADDR) ")\n"
|
||||||
"\tsize - size of buffer used during data transfers ("
|
"\tsize - size of buffer used during data transfers ("
|
||||||
__stringify(CONFIG_FASTBOOT_BUF_SIZE) ")"
|
__stringify(CONFIG_FASTBOOT_BUF_SIZE) ")"
|
||||||
|
;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
U_BOOT_CMD(
|
||||||
|
fastboot, CONFIG_SYS_MAXARGS, 1, do_fastboot,
|
||||||
|
"run as a fastboot usb or udp device", fastboot_help_text
|
||||||
);
|
);
|
||||||
|
@ -22,7 +22,7 @@ int mvebu_comphy_rx_training_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||||||
|
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
printf("missing arguments\n");
|
printf("missing arguments\n");
|
||||||
return CMD_RET_USAGE;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cp_index = hextoul(argv[1], NULL);
|
cp_index = hextoul(argv[1], NULL);
|
||||||
|
41
cmd/sound.c
41
cmd/sound.c
@ -39,39 +39,26 @@ static int do_play(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
int msec = 1000;
|
int msec = 1000;
|
||||||
int freq = 400;
|
int freq = 400;
|
||||||
bool first = true;
|
|
||||||
|
if (argc > 1)
|
||||||
|
msec = dectoul(argv[1], NULL);
|
||||||
|
if (argc > 2)
|
||||||
|
freq = dectoul(argv[2], NULL);
|
||||||
|
|
||||||
ret = uclass_first_device_err(UCLASS_SOUND, &dev);
|
ret = uclass_first_device_err(UCLASS_SOUND, &dev);
|
||||||
if (ret)
|
if (!ret)
|
||||||
goto err;
|
|
||||||
--argc;
|
|
||||||
++argv;
|
|
||||||
while (argc || first) {
|
|
||||||
first = false;
|
|
||||||
if (argc) {
|
|
||||||
msec = dectoul(argv[0], NULL);
|
|
||||||
--argc;
|
|
||||||
++argv;
|
|
||||||
}
|
|
||||||
if (argc) {
|
|
||||||
freq = dectoul(argv[0], NULL);
|
|
||||||
--argc;
|
|
||||||
++argv;
|
|
||||||
}
|
|
||||||
ret = sound_beep(dev, msec, freq);
|
ret = sound_beep(dev, msec, freq);
|
||||||
if (ret)
|
if (ret) {
|
||||||
goto err;
|
printf("Sound device failed to play (err=%d)\n", ret);
|
||||||
|
return CMD_RET_FAILURE;
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
|
|
||||||
err:
|
return 0;
|
||||||
printf("Sound device failed to play (err=%d)\n", ret);
|
|
||||||
return CMD_RET_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct cmd_tbl cmd_sound_sub[] = {
|
static struct cmd_tbl cmd_sound_sub[] = {
|
||||||
U_BOOT_CMD_MKENT(init, 0, 1, do_init, "", ""),
|
U_BOOT_CMD_MKENT(init, 0, 1, do_init, "", ""),
|
||||||
U_BOOT_CMD_MKENT(play, INT_MAX, 1, do_play, "", ""),
|
U_BOOT_CMD_MKENT(play, 2, 1, do_play, "", ""),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* process sound command */
|
/* process sound command */
|
||||||
@ -96,10 +83,8 @@ static int do_sound(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
U_BOOT_CMD(
|
U_BOOT_CMD(
|
||||||
sound, INT_MAX, 1, do_sound,
|
sound, 4, 1, do_sound,
|
||||||
"sound sub-system",
|
"sound sub-system",
|
||||||
"init - initialise the sound driver\n"
|
"init - initialise the sound driver\n"
|
||||||
"sound play [[[-q|-s] len [freq]] ...] - play sounds\n"
|
"sound play [len [freq]] - play a sound for len ms at freq Hz\n"
|
||||||
" len - duration in ms\n"
|
|
||||||
" freq - frequency in Hz\n"
|
|
||||||
);
|
);
|
||||||
|
@ -112,9 +112,6 @@ int do_spi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
|||||||
|
|
||||||
if ((flag & CMD_FLAG_REPEAT) == 0)
|
if ((flag & CMD_FLAG_REPEAT) == 0)
|
||||||
{
|
{
|
||||||
if (argc < 2)
|
|
||||||
return CMD_RET_USAGE;
|
|
||||||
|
|
||||||
if (argc >= 2) {
|
if (argc >= 2) {
|
||||||
mode = CONFIG_DEFAULT_SPI_MODE;
|
mode = CONFIG_DEFAULT_SPI_MODE;
|
||||||
bus = dectoul(argv[1], &cp);
|
bus = dectoul(argv[1], &cp);
|
||||||
|
@ -164,16 +164,6 @@ config SILENT_CONSOLE_UPDATE_ON_RELOC
|
|||||||
(e.g. NAND). This option makes the value of the 'silent'
|
(e.g. NAND). This option makes the value of the 'silent'
|
||||||
environment variable take effect at relocation.
|
environment variable take effect at relocation.
|
||||||
|
|
||||||
config SILENT_CONSOLE_UNTIL_ENV
|
|
||||||
bool "Keep console silent until environment is loaded"
|
|
||||||
depends on SILENT_CONSOLE
|
|
||||||
help
|
|
||||||
This option makes sure U-Boot will never use the console unless the
|
|
||||||
environment from flash does not contain the 'silent' variable. If
|
|
||||||
set, the console is kept silent until after the environment was
|
|
||||||
loaded. Use this in combination with PRE_CONSOLE_BUFFER to print out
|
|
||||||
earlier messages after loading the environment when allowed.
|
|
||||||
|
|
||||||
config PRE_CONSOLE_BUFFER
|
config PRE_CONSOLE_BUFFER
|
||||||
bool "Buffer characters before the console is available"
|
bool "Buffer characters before the console is available"
|
||||||
help
|
help
|
||||||
@ -1099,15 +1089,3 @@ config FDT_SIMPLEFB
|
|||||||
|
|
||||||
config IO_TRACE
|
config IO_TRACE
|
||||||
bool
|
bool
|
||||||
|
|
||||||
config USB_HUB_DEBOUNCE_TIMEOUT
|
|
||||||
int "Timeout in milliseconds for USB HUB connection"
|
|
||||||
depends on USB
|
|
||||||
default 1000
|
|
||||||
help
|
|
||||||
Value in milliseconds of the USB connection timeout, the max delay to
|
|
||||||
wait the hub port status to be connected steadily after being powered
|
|
||||||
off and powered on in the usb hub driver.
|
|
||||||
This define allows to increase the HUB_DEBOUNCE_TIMEOUT default
|
|
||||||
value = 1s because some usb device needs around 1.5s to be initialized
|
|
||||||
and a 2s value should solve detection issue on problematic USB keys.
|
|
||||||
|
@ -26,7 +26,6 @@ obj-$(CONFIG_PHYLIB) += miiphyutil.o
|
|||||||
obj-$(CONFIG_USB_HOST) += usb.o usb_hub.o
|
obj-$(CONFIG_USB_HOST) += usb.o usb_hub.o
|
||||||
obj-$(CONFIG_USB_GADGET) += usb.o usb_hub.o
|
obj-$(CONFIG_USB_GADGET) += usb.o usb_hub.o
|
||||||
obj-$(CONFIG_USB_STORAGE) += usb_storage.o
|
obj-$(CONFIG_USB_STORAGE) += usb_storage.o
|
||||||
obj-$(CONFIG_USB_ONBOARD_HUB) += usb_onboard_hub.o
|
|
||||||
|
|
||||||
# others
|
# others
|
||||||
obj-$(CONFIG_CONSOLE_MUX) += iomux.o
|
obj-$(CONFIG_CONSOLE_MUX) += iomux.o
|
||||||
|
@ -422,7 +422,7 @@ static int abortboot(int bootdelay)
|
|||||||
return abort;
|
return abort;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void process_fdt_options(void)
|
static void process_fdt_options(const void *blob)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_TEXT_BASE
|
#ifdef CONFIG_TEXT_BASE
|
||||||
ulong addr;
|
ulong addr;
|
||||||
@ -474,7 +474,7 @@ const char *bootdelay_process(void)
|
|||||||
s = env_get("bootcmd");
|
s = env_get("bootcmd");
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_OF_CONTROL))
|
if (IS_ENABLED(CONFIG_OF_CONTROL))
|
||||||
process_fdt_options();
|
process_fdt_options(gd->fdt_blob);
|
||||||
stored_bootdelay = bootdelay;
|
stored_bootdelay = bootdelay;
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
|
@ -756,6 +756,9 @@ static init_fnc_t init_sequence_r[] = {
|
|||||||
initr_status_led,
|
initr_status_led,
|
||||||
#endif
|
#endif
|
||||||
/* PPC has a udelay(20) here dating from 2002. Why? */
|
/* PPC has a udelay(20) here dating from 2002. Why? */
|
||||||
|
#if defined(CONFIG_GPIO_HOG)
|
||||||
|
gpio_hog_probe_all,
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_BOARD_LATE_INIT
|
#ifdef CONFIG_BOARD_LATE_INIT
|
||||||
board_late_init,
|
board_late_init,
|
||||||
#endif
|
#endif
|
||||||
|
@ -146,7 +146,7 @@ int run_commandf(const char *fmt, ...)
|
|||||||
#if defined(CONFIG_CMD_RUN)
|
#if defined(CONFIG_CMD_RUN)
|
||||||
int do_run(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
int do_run(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
int i, ret;
|
int i;
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
return CMD_RET_USAGE;
|
return CMD_RET_USAGE;
|
||||||
@ -160,9 +160,8 @@ int do_run(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = run_command(arg, flag | CMD_FLAG_ENV);
|
if (run_command(arg, flag | CMD_FLAG_ENV) != 0)
|
||||||
if (ret)
|
return 1;
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1901,7 +1901,7 @@ static int run_list_real(struct pipe *pi)
|
|||||||
last_return_code = -rcode - 2;
|
last_return_code = -rcode - 2;
|
||||||
return -2; /* exit */
|
return -2; /* exit */
|
||||||
}
|
}
|
||||||
last_return_code = rcode;
|
last_return_code=(rcode == 0) ? 0 : 1;
|
||||||
#endif
|
#endif
|
||||||
#ifndef __U_BOOT__
|
#ifndef __U_BOOT__
|
||||||
pi->num_progs = save_num_progs; /* restore number of programs */
|
pi->num_progs = save_num_progs; /* restore number of programs */
|
||||||
@ -3211,15 +3211,7 @@ static int parse_stream_outer(struct in_str *inp, int flag)
|
|||||||
printf("exit not allowed from main input shell.\n");
|
printf("exit not allowed from main input shell.\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/*
|
break;
|
||||||
* DANGER
|
|
||||||
* Return code -2 is special in this context,
|
|
||||||
* it indicates exit from inner pipe instead
|
|
||||||
* of return code itself, the return code is
|
|
||||||
* stored in 'last_return_code' variable!
|
|
||||||
* DANGER
|
|
||||||
*/
|
|
||||||
return -2;
|
|
||||||
}
|
}
|
||||||
if (code == -1)
|
if (code == -1)
|
||||||
flag_repeat = 0;
|
flag_repeat = 0;
|
||||||
@ -3256,9 +3248,9 @@ int parse_string_outer(const char *s, int flag)
|
|||||||
#endif /* __U_BOOT__ */
|
#endif /* __U_BOOT__ */
|
||||||
{
|
{
|
||||||
struct in_str input;
|
struct in_str input;
|
||||||
int rcode;
|
|
||||||
#ifdef __U_BOOT__
|
#ifdef __U_BOOT__
|
||||||
char *p = NULL;
|
char *p = NULL;
|
||||||
|
int rcode;
|
||||||
if (!s)
|
if (!s)
|
||||||
return 1;
|
return 1;
|
||||||
if (!*s)
|
if (!*s)
|
||||||
@ -3270,12 +3262,11 @@ int parse_string_outer(const char *s, int flag)
|
|||||||
setup_string_in_str(&input, p);
|
setup_string_in_str(&input, p);
|
||||||
rcode = parse_stream_outer(&input, flag);
|
rcode = parse_stream_outer(&input, flag);
|
||||||
free(p);
|
free(p);
|
||||||
return rcode == -2 ? last_return_code : rcode;
|
return rcode;
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
setup_string_in_str(&input, s);
|
setup_string_in_str(&input, s);
|
||||||
rcode = parse_stream_outer(&input, flag);
|
return parse_stream_outer(&input, flag);
|
||||||
return rcode == -2 ? last_return_code : rcode;
|
|
||||||
#ifdef __U_BOOT__
|
#ifdef __U_BOOT__
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -3295,7 +3286,7 @@ int parse_file_outer(void)
|
|||||||
setup_file_in_str(&input);
|
setup_file_in_str(&input);
|
||||||
#endif
|
#endif
|
||||||
rcode = parse_stream_outer(&input, FLAG_PARSE_SEMICOLON);
|
rcode = parse_stream_outer(&input, FLAG_PARSE_SEMICOLON);
|
||||||
return rcode == -2 ? last_return_code : rcode;
|
return rcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __U_BOOT__
|
#ifdef __U_BOOT__
|
||||||
|
@ -970,11 +970,6 @@ static bool console_update_silent(void)
|
|||||||
if (!IS_ENABLED(CONFIG_SILENT_CONSOLE))
|
if (!IS_ENABLED(CONFIG_SILENT_CONSOLE))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_SILENT_CONSOLE_UNTIL_ENV) && !(gd->flags & GD_FLG_ENV_READY)) {
|
|
||||||
gd->flags |= GD_FLG_SILENT;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (env_get("silent")) {
|
if (env_get("silent")) {
|
||||||
gd->flags |= GD_FLG_SILENT;
|
gd->flags |= GD_FLG_SILENT;
|
||||||
return false;
|
return false;
|
||||||
|
@ -96,7 +96,6 @@ phys_size_t __weak get_effective_memsize(void)
|
|||||||
{
|
{
|
||||||
phys_size_t ram_size = gd->ram_size;
|
phys_size_t ram_size = gd->ram_size;
|
||||||
|
|
||||||
#ifdef CONFIG_MPC85xx
|
|
||||||
/*
|
/*
|
||||||
* Check for overflow and limit ram size to some representable value.
|
* Check for overflow and limit ram size to some representable value.
|
||||||
* It is required that ram_base + ram_size must be representable by
|
* It is required that ram_base + ram_size must be representable by
|
||||||
@ -106,7 +105,6 @@ phys_size_t __weak get_effective_memsize(void)
|
|||||||
*/
|
*/
|
||||||
if (gd->ram_base + ram_size < gd->ram_base)
|
if (gd->ram_base + ram_size < gd->ram_base)
|
||||||
ram_size = ((phys_size_t)~0xfffULL) - gd->ram_base;
|
ram_size = ((phys_size_t)~0xfffULL) - gd->ram_base;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CFG_MAX_MEM_MAPPED
|
#ifndef CFG_MAX_MEM_MAPPED
|
||||||
return ram_size;
|
return ram_size;
|
||||||
|
@ -1486,7 +1486,6 @@ config SPL_AM33XX_ENABLE_RTC32K_OSC
|
|||||||
config SPL_OPTEE_IMAGE
|
config SPL_OPTEE_IMAGE
|
||||||
bool "Support OP-TEE Trusted OS image in SPL"
|
bool "Support OP-TEE Trusted OS image in SPL"
|
||||||
depends on ARM
|
depends on ARM
|
||||||
depends on SPL_LOAD_FIT || SPL_LOAD_FIT_FULL
|
|
||||||
help
|
help
|
||||||
OP-TEE is an open source Trusted OS which is loaded by SPL.
|
OP-TEE is an open source Trusted OS which is loaded by SPL.
|
||||||
More detail at: https://github.com/OP-TEE/optee_os
|
More detail at: https://github.com/OP-TEE/optee_os
|
||||||
|
@ -786,6 +786,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CONFIG_IS_ENABLED(GPIO_HOG))
|
||||||
|
gpio_hog_probe_all();
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(BOARD_INIT)
|
#if CONFIG_IS_ENABLED(BOARD_INIT)
|
||||||
spl_board_init();
|
spl_board_init();
|
||||||
#endif
|
#endif
|
||||||
|
@ -38,13 +38,12 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
|
|||||||
struct spl_boot_device *bootdev)
|
struct spl_boot_device *bootdev)
|
||||||
{
|
{
|
||||||
struct legacy_img_hdr *header;
|
struct legacy_img_hdr *header;
|
||||||
int ret;
|
|
||||||
|
|
||||||
header = (struct legacy_img_hdr *)CONFIG_SPL_LOAD_FIT_ADDRESS;
|
header = (struct legacy_img_hdr *)CONFIG_SPL_LOAD_FIT_ADDRESS;
|
||||||
|
|
||||||
if (CONFIG_IS_ENABLED(IMAGE_PRE_LOAD)) {
|
if (CONFIG_IS_ENABLED(IMAGE_PRE_LOAD)) {
|
||||||
unsigned long addr = (unsigned long)header;
|
unsigned long addr = (unsigned long)header;
|
||||||
ret = image_pre_load(addr);
|
int ret = image_pre_load(addr);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
@ -65,7 +64,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
|
|||||||
debug("Found FIT\n");
|
debug("Found FIT\n");
|
||||||
load.bl_len = 1;
|
load.bl_len = 1;
|
||||||
load.read = spl_ram_load_read;
|
load.read = spl_ram_load_read;
|
||||||
ret = spl_load_simple_fit(spl_image, &load, 0, header);
|
spl_load_simple_fit(spl_image, &load, 0, header);
|
||||||
} else {
|
} else {
|
||||||
ulong u_boot_pos = spl_get_image_pos();
|
ulong u_boot_pos = spl_get_image_pos();
|
||||||
|
|
||||||
@ -86,10 +85,10 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
|
|||||||
}
|
}
|
||||||
header = (struct legacy_img_hdr *)map_sysmem(u_boot_pos, 0);
|
header = (struct legacy_img_hdr *)map_sysmem(u_boot_pos, 0);
|
||||||
|
|
||||||
ret = spl_parse_image_header(spl_image, bootdev, header);
|
spl_parse_image_header(spl_image, bootdev, header);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
#if CONFIG_IS_ENABLED(RAM_DEVICE)
|
#if CONFIG_IS_ENABLED(RAM_DEVICE)
|
||||||
SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image);
|
SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image);
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#define HUB_SHORT_RESET_TIME 20
|
#define HUB_SHORT_RESET_TIME 20
|
||||||
#define HUB_LONG_RESET_TIME 200
|
#define HUB_LONG_RESET_TIME 200
|
||||||
|
|
||||||
#define HUB_DEBOUNCE_TIMEOUT CONFIG_USB_HUB_DEBOUNCE_TIMEOUT
|
#define HUB_DEBOUNCE_TIMEOUT 1000
|
||||||
|
|
||||||
#define PORT_OVERCURRENT_MAX_SCAN_COUNT 3
|
#define PORT_OVERCURRENT_MAX_SCAN_COUNT 3
|
||||||
|
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
|
||||||
/*
|
|
||||||
* Driver for onboard USB hubs
|
|
||||||
*
|
|
||||||
* Copyright (C) 2022, STMicroelectronics - All Rights Reserved
|
|
||||||
*
|
|
||||||
* Mostly inspired by Linux kernel v6.1 onboard_usb_hub driver
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <common.h>
|
|
||||||
#include <dm.h>
|
|
||||||
#include <dm/device_compat.h>
|
|
||||||
#include <power/regulator.h>
|
|
||||||
|
|
||||||
struct onboard_hub {
|
|
||||||
struct udevice *vdd;
|
|
||||||
};
|
|
||||||
|
|
||||||
static int usb_onboard_hub_probe(struct udevice *dev)
|
|
||||||
{
|
|
||||||
struct onboard_hub *hub = dev_get_priv(dev);
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = device_get_supply_regulator(dev, "vdd-supply", &hub->vdd);
|
|
||||||
if (ret) {
|
|
||||||
dev_err(dev, "can't get vdd-supply: %d\n", ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = regulator_set_enable_if_allowed(hub->vdd, true);
|
|
||||||
if (ret)
|
|
||||||
dev_err(dev, "can't enable vdd-supply: %d\n", ret);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int usb_onboard_hub_remove(struct udevice *dev)
|
|
||||||
{
|
|
||||||
struct onboard_hub *hub = dev_get_priv(dev);
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = regulator_set_enable_if_allowed(hub->vdd, false);
|
|
||||||
if (ret)
|
|
||||||
dev_err(dev, "can't disable vdd-supply: %d\n", ret);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct udevice_id usb_onboard_hub_ids[] = {
|
|
||||||
/* Use generic usbVID,PID dt-bindings (usb-device.yaml) */
|
|
||||||
{ .compatible = "usb424,2514" }, /* USB2514B USB 2.0 */
|
|
||||||
{ }
|
|
||||||
};
|
|
||||||
|
|
||||||
U_BOOT_DRIVER(usb_onboard_hub) = {
|
|
||||||
.name = "usb_onboard_hub",
|
|
||||||
.id = UCLASS_USB_HUB,
|
|
||||||
.probe = usb_onboard_hub_probe,
|
|
||||||
.remove = usb_onboard_hub_remove,
|
|
||||||
.of_match = usb_onboard_hub_ids,
|
|
||||||
.priv_auto = sizeof(struct onboard_hub),
|
|
||||||
};
|
|
@ -51,6 +51,7 @@ CONFIG_TPL_RELOC_MALLOC=y
|
|||||||
CONFIG_TPL_RELOC_MALLOC_ADDR=0xd0034000
|
CONFIG_TPL_RELOC_MALLOC_ADDR=0xd0034000
|
||||||
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
||||||
CONFIG_SPL_NAND_SUPPORT=y
|
CONFIG_SPL_NAND_SUPPORT=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_TPL=y
|
CONFIG_TPL=y
|
||||||
CONFIG_TPL_DRIVERS_MISC=y
|
CONFIG_TPL_DRIVERS_MISC=y
|
||||||
CONFIG_TPL_ENV_SUPPORT=y
|
CONFIG_TPL_ENV_SUPPORT=y
|
||||||
|
@ -11,6 +11,7 @@ CONFIG_TARGET_P1010RDB_PA=y
|
|||||||
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
|
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
|
||||||
CONFIG_L2_CACHE=y
|
CONFIG_L2_CACHE=y
|
||||||
CONFIG_ENABLE_36BIT_PHYS=y
|
CONFIG_ENABLE_36BIT_PHYS=y
|
||||||
|
CONFIG_SYS_MPC85XX_NO_RESETVEC=y
|
||||||
CONFIG_USE_UBOOTPATH=y
|
CONFIG_USE_UBOOTPATH=y
|
||||||
CONFIG_PCIE1=y
|
CONFIG_PCIE1=y
|
||||||
CONFIG_PCIE2=y
|
CONFIG_PCIE2=y
|
||||||
@ -20,7 +21,7 @@ CONFIG_FIT=y
|
|||||||
CONFIG_FIT_VERBOSE=y
|
CONFIG_FIT_VERBOSE=y
|
||||||
CONFIG_OF_BOARD_SETUP=y
|
CONFIG_OF_BOARD_SETUP=y
|
||||||
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
||||||
CONFIG_NO_PBL=y
|
CONFIG_FSL_FIXED_MMC_LOCATION=y
|
||||||
CONFIG_BOOTDELAY=10
|
CONFIG_BOOTDELAY=10
|
||||||
CONFIG_USE_BOOTCOMMAND=y
|
CONFIG_USE_BOOTCOMMAND=y
|
||||||
CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
|
CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
|
||||||
|
@ -48,6 +48,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
CONFIG_CMD_IMLS=y
|
CONFIG_CMD_IMLS=y
|
||||||
|
@ -50,6 +50,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
CONFIG_CMD_IMLS=y
|
CONFIG_CMD_IMLS=y
|
||||||
|
@ -50,6 +50,7 @@ CONFIG_TPL_RELOC_MALLOC=y
|
|||||||
CONFIG_TPL_RELOC_MALLOC_ADDR=0xd0034000
|
CONFIG_TPL_RELOC_MALLOC_ADDR=0xd0034000
|
||||||
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
||||||
CONFIG_SPL_NAND_SUPPORT=y
|
CONFIG_SPL_NAND_SUPPORT=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_TPL=y
|
CONFIG_TPL=y
|
||||||
CONFIG_TPL_DRIVERS_MISC=y
|
CONFIG_TPL_DRIVERS_MISC=y
|
||||||
CONFIG_TPL_ENV_SUPPORT=y
|
CONFIG_TPL_ENV_SUPPORT=y
|
||||||
|
@ -11,6 +11,7 @@ CONFIG_TARGET_P1010RDB_PA=y
|
|||||||
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
|
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
|
||||||
CONFIG_L2_CACHE=y
|
CONFIG_L2_CACHE=y
|
||||||
CONFIG_ENABLE_36BIT_PHYS=y
|
CONFIG_ENABLE_36BIT_PHYS=y
|
||||||
|
CONFIG_SYS_MPC85XX_NO_RESETVEC=y
|
||||||
CONFIG_USE_UBOOTPATH=y
|
CONFIG_USE_UBOOTPATH=y
|
||||||
CONFIG_PCIE1=y
|
CONFIG_PCIE1=y
|
||||||
CONFIG_PCIE2=y
|
CONFIG_PCIE2=y
|
||||||
@ -19,7 +20,7 @@ CONFIG_FIT=y
|
|||||||
CONFIG_FIT_VERBOSE=y
|
CONFIG_FIT_VERBOSE=y
|
||||||
CONFIG_OF_BOARD_SETUP=y
|
CONFIG_OF_BOARD_SETUP=y
|
||||||
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
||||||
CONFIG_NO_PBL=y
|
CONFIG_FSL_FIXED_MMC_LOCATION=y
|
||||||
CONFIG_BOOTDELAY=10
|
CONFIG_BOOTDELAY=10
|
||||||
CONFIG_USE_BOOTCOMMAND=y
|
CONFIG_USE_BOOTCOMMAND=y
|
||||||
CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
|
CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
|
||||||
|
@ -47,6 +47,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
CONFIG_CMD_IMLS=y
|
CONFIG_CMD_IMLS=y
|
||||||
|
@ -49,6 +49,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
CONFIG_CMD_IMLS=y
|
CONFIG_CMD_IMLS=y
|
||||||
|
@ -52,6 +52,7 @@ CONFIG_TPL_RELOC_MALLOC=y
|
|||||||
CONFIG_TPL_RELOC_MALLOC_ADDR=0xd0034000
|
CONFIG_TPL_RELOC_MALLOC_ADDR=0xd0034000
|
||||||
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
||||||
CONFIG_SPL_NAND_SUPPORT=y
|
CONFIG_SPL_NAND_SUPPORT=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_TPL=y
|
CONFIG_TPL=y
|
||||||
CONFIG_TPL_DRIVERS_MISC=y
|
CONFIG_TPL_DRIVERS_MISC=y
|
||||||
CONFIG_TPL_ENV_SUPPORT=y
|
CONFIG_TPL_ENV_SUPPORT=y
|
||||||
|
@ -11,6 +11,7 @@ CONFIG_TARGET_P1010RDB_PB=y
|
|||||||
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
|
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
|
||||||
CONFIG_L2_CACHE=y
|
CONFIG_L2_CACHE=y
|
||||||
CONFIG_ENABLE_36BIT_PHYS=y
|
CONFIG_ENABLE_36BIT_PHYS=y
|
||||||
|
CONFIG_SYS_MPC85XX_NO_RESETVEC=y
|
||||||
CONFIG_USE_UBOOTPATH=y
|
CONFIG_USE_UBOOTPATH=y
|
||||||
CONFIG_PCIE1=y
|
CONFIG_PCIE1=y
|
||||||
CONFIG_PCIE2=y
|
CONFIG_PCIE2=y
|
||||||
@ -20,7 +21,7 @@ CONFIG_FIT=y
|
|||||||
CONFIG_FIT_VERBOSE=y
|
CONFIG_FIT_VERBOSE=y
|
||||||
CONFIG_OF_BOARD_SETUP=y
|
CONFIG_OF_BOARD_SETUP=y
|
||||||
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
||||||
CONFIG_NO_PBL=y
|
CONFIG_FSL_FIXED_MMC_LOCATION=y
|
||||||
CONFIG_BOOTDELAY=10
|
CONFIG_BOOTDELAY=10
|
||||||
CONFIG_USE_BOOTCOMMAND=y
|
CONFIG_USE_BOOTCOMMAND=y
|
||||||
CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
|
CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
|
||||||
|
@ -49,6 +49,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
CONFIG_CMD_IMLS=y
|
CONFIG_CMD_IMLS=y
|
||||||
|
@ -51,6 +51,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
CONFIG_CMD_IMLS=y
|
CONFIG_CMD_IMLS=y
|
||||||
|
@ -51,6 +51,7 @@ CONFIG_TPL_RELOC_MALLOC=y
|
|||||||
CONFIG_TPL_RELOC_MALLOC_ADDR=0xd0034000
|
CONFIG_TPL_RELOC_MALLOC_ADDR=0xd0034000
|
||||||
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
||||||
CONFIG_SPL_NAND_SUPPORT=y
|
CONFIG_SPL_NAND_SUPPORT=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_TPL=y
|
CONFIG_TPL=y
|
||||||
CONFIG_TPL_DRIVERS_MISC=y
|
CONFIG_TPL_DRIVERS_MISC=y
|
||||||
CONFIG_TPL_ENV_SUPPORT=y
|
CONFIG_TPL_ENV_SUPPORT=y
|
||||||
|
@ -11,6 +11,7 @@ CONFIG_TARGET_P1010RDB_PB=y
|
|||||||
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
|
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
|
||||||
CONFIG_L2_CACHE=y
|
CONFIG_L2_CACHE=y
|
||||||
CONFIG_ENABLE_36BIT_PHYS=y
|
CONFIG_ENABLE_36BIT_PHYS=y
|
||||||
|
CONFIG_SYS_MPC85XX_NO_RESETVEC=y
|
||||||
CONFIG_USE_UBOOTPATH=y
|
CONFIG_USE_UBOOTPATH=y
|
||||||
CONFIG_PCIE1=y
|
CONFIG_PCIE1=y
|
||||||
CONFIG_PCIE2=y
|
CONFIG_PCIE2=y
|
||||||
@ -19,7 +20,7 @@ CONFIG_FIT=y
|
|||||||
CONFIG_FIT_VERBOSE=y
|
CONFIG_FIT_VERBOSE=y
|
||||||
CONFIG_OF_BOARD_SETUP=y
|
CONFIG_OF_BOARD_SETUP=y
|
||||||
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
||||||
CONFIG_NO_PBL=y
|
CONFIG_FSL_FIXED_MMC_LOCATION=y
|
||||||
CONFIG_BOOTDELAY=10
|
CONFIG_BOOTDELAY=10
|
||||||
CONFIG_USE_BOOTCOMMAND=y
|
CONFIG_USE_BOOTCOMMAND=y
|
||||||
CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
|
CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
|
||||||
|
@ -48,6 +48,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
CONFIG_CMD_IMLS=y
|
CONFIG_CMD_IMLS=y
|
||||||
|
@ -50,6 +50,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x20000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
CONFIG_CMD_IMLS=y
|
CONFIG_CMD_IMLS=y
|
||||||
|
@ -52,6 +52,7 @@ CONFIG_TPL_RELOC_MALLOC=y
|
|||||||
CONFIG_TPL_RELOC_MALLOC_ADDR=0xf8fb4000
|
CONFIG_TPL_RELOC_MALLOC_ADDR=0xf8fb4000
|
||||||
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
||||||
CONFIG_SPL_NAND_SUPPORT=y
|
CONFIG_SPL_NAND_SUPPORT=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_TPL=y
|
CONFIG_TPL=y
|
||||||
CONFIG_TPL_ENV_SUPPORT=y
|
CONFIG_TPL_ENV_SUPPORT=y
|
||||||
CONFIG_TPL_I2C=y
|
CONFIG_TPL_I2C=y
|
||||||
|
@ -49,6 +49,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x1b000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
# CONFIG_AUTO_COMPLETE is not set
|
# CONFIG_AUTO_COMPLETE is not set
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
|
@ -51,6 +51,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x1b000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
# CONFIG_AUTO_COMPLETE is not set
|
# CONFIG_AUTO_COMPLETE is not set
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
|
@ -12,6 +12,7 @@ CONFIG_TARGET_P1020RDB_PC=y
|
|||||||
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
|
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
|
||||||
CONFIG_L2_CACHE=y
|
CONFIG_L2_CACHE=y
|
||||||
CONFIG_ENABLE_36BIT_PHYS=y
|
CONFIG_ENABLE_36BIT_PHYS=y
|
||||||
|
CONFIG_SYS_MPC85XX_NO_RESETVEC=y
|
||||||
CONFIG_USE_UBOOTPATH=y
|
CONFIG_USE_UBOOTPATH=y
|
||||||
CONFIG_PCIE1=y
|
CONFIG_PCIE1=y
|
||||||
CONFIG_PCIE2=y
|
CONFIG_PCIE2=y
|
||||||
@ -22,7 +23,7 @@ CONFIG_FIT=y
|
|||||||
CONFIG_FIT_VERBOSE=y
|
CONFIG_FIT_VERBOSE=y
|
||||||
CONFIG_OF_BOARD_SETUP=y
|
CONFIG_OF_BOARD_SETUP=y
|
||||||
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
||||||
CONFIG_NO_PBL=y
|
CONFIG_FSL_FIXED_MMC_LOCATION=y
|
||||||
CONFIG_BOOTDELAY=10
|
CONFIG_BOOTDELAY=10
|
||||||
CONFIG_USE_BOOTCOMMAND=y
|
CONFIG_USE_BOOTCOMMAND=y
|
||||||
CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
|
CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
|
||||||
|
@ -51,6 +51,7 @@ CONFIG_TPL_RELOC_MALLOC=y
|
|||||||
CONFIG_TPL_RELOC_MALLOC_ADDR=0xf8fb4000
|
CONFIG_TPL_RELOC_MALLOC_ADDR=0xf8fb4000
|
||||||
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
||||||
CONFIG_SPL_NAND_SUPPORT=y
|
CONFIG_SPL_NAND_SUPPORT=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_TPL=y
|
CONFIG_TPL=y
|
||||||
CONFIG_TPL_ENV_SUPPORT=y
|
CONFIG_TPL_ENV_SUPPORT=y
|
||||||
CONFIG_TPL_I2C=y
|
CONFIG_TPL_I2C=y
|
||||||
|
@ -48,6 +48,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x1b000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
# CONFIG_AUTO_COMPLETE is not set
|
# CONFIG_AUTO_COMPLETE is not set
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
|
@ -50,6 +50,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x1b000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
# CONFIG_AUTO_COMPLETE is not set
|
# CONFIG_AUTO_COMPLETE is not set
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
|
@ -12,6 +12,7 @@ CONFIG_TARGET_P1020RDB_PC=y
|
|||||||
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
|
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
|
||||||
CONFIG_L2_CACHE=y
|
CONFIG_L2_CACHE=y
|
||||||
CONFIG_ENABLE_36BIT_PHYS=y
|
CONFIG_ENABLE_36BIT_PHYS=y
|
||||||
|
CONFIG_SYS_MPC85XX_NO_RESETVEC=y
|
||||||
CONFIG_USE_UBOOTPATH=y
|
CONFIG_USE_UBOOTPATH=y
|
||||||
CONFIG_PCIE1=y
|
CONFIG_PCIE1=y
|
||||||
CONFIG_PCIE2=y
|
CONFIG_PCIE2=y
|
||||||
@ -21,7 +22,7 @@ CONFIG_FIT=y
|
|||||||
CONFIG_FIT_VERBOSE=y
|
CONFIG_FIT_VERBOSE=y
|
||||||
CONFIG_OF_BOARD_SETUP=y
|
CONFIG_OF_BOARD_SETUP=y
|
||||||
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
CONFIG_OF_STDOUT_VIA_ALIAS=y
|
||||||
CONFIG_NO_PBL=y
|
CONFIG_FSL_FIXED_MMC_LOCATION=y
|
||||||
CONFIG_BOOTDELAY=10
|
CONFIG_BOOTDELAY=10
|
||||||
CONFIG_USE_BOOTCOMMAND=y
|
CONFIG_USE_BOOTCOMMAND=y
|
||||||
CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
|
CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
|
||||||
|
@ -51,6 +51,7 @@ CONFIG_TPL_RELOC_MALLOC=y
|
|||||||
CONFIG_TPL_RELOC_MALLOC_ADDR=0xf8fb4000
|
CONFIG_TPL_RELOC_MALLOC_ADDR=0xf8fb4000
|
||||||
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
CONFIG_TPL_RELOC_MALLOC_SIZE=0xc000
|
||||||
CONFIG_SPL_NAND_SUPPORT=y
|
CONFIG_SPL_NAND_SUPPORT=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_TPL=y
|
CONFIG_TPL=y
|
||||||
CONFIG_TPL_ENV_SUPPORT=y
|
CONFIG_TPL_ENV_SUPPORT=y
|
||||||
CONFIG_TPL_I2C=y
|
CONFIG_TPL_I2C=y
|
||||||
|
@ -48,6 +48,7 @@ CONFIG_SPL_RELOC_MALLOC_SIZE=0x1b000
|
|||||||
CONFIG_SPL_ENV_SUPPORT=y
|
CONFIG_SPL_ENV_SUPPORT=y
|
||||||
CONFIG_SPL_I2C=y
|
CONFIG_SPL_I2C=y
|
||||||
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
CONFIG_SPL_MPC8XXX_INIT_DDR=y
|
||||||
|
CONFIG_SPL_TARGET="u-boot-with-spl.bin"
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
# CONFIG_AUTO_COMPLETE is not set
|
# CONFIG_AUTO_COMPLETE is not set
|
||||||
CONFIG_SYS_PBSIZE=276
|
CONFIG_SYS_PBSIZE=276
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user