Compare commits
9 Commits
master
...
exynos9820
Author | SHA1 | Date | |
---|---|---|---|
|
578eea8ba2 | ||
|
60a4dccb0e | ||
|
78d989b26f | ||
|
4355cb40ca | ||
|
a3b713d261 | ||
|
9c37b88499 | ||
|
274f9dd974 | ||
|
595cea2883 | ||
|
8c59a55833 |
@ -1,17 +1,15 @@
|
||||
variables:
|
||||
windows_vm: windows-2019
|
||||
ubuntu_vm: ubuntu-22.04
|
||||
macos_vm: macOS-12
|
||||
ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20221130-11Jan2023
|
||||
ubuntu_vm: ubuntu-18.04
|
||||
macos_vm: macOS-10.15
|
||||
ci_runner_image: trini/u-boot-gitlab-ci-runner:focal-20211006-14Nov2021
|
||||
# Add '-u 0' options for Azure pipelines, otherwise we get "permission
|
||||
# denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer",
|
||||
# since our $(ci_runner_image) user is not root.
|
||||
container_option: -u 0
|
||||
work_dir: /u
|
||||
|
||||
stages:
|
||||
- stage: testsuites
|
||||
jobs:
|
||||
jobs:
|
||||
- job: tools_only_windows
|
||||
displayName: 'Ensure host tools build for Windows'
|
||||
pool:
|
||||
@ -22,15 +20,13 @@ stages:
|
||||
displayName: 'Install MSYS2'
|
||||
- script: |
|
||||
sfx.exe -y -o%CD:~0,2%\
|
||||
%CD:~0,2%\msys64\usr\bin\bash -lc " "
|
||||
%CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Syuu"
|
||||
%CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Syuu"
|
||||
%CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Syyuu"
|
||||
displayName: 'Update MSYS2'
|
||||
- script: |
|
||||
%CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm --needed -Sy make gcc bison flex diffutils openssl-devel libgnutls-devel libutil-linux-devel"
|
||||
%CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm --needed -Sy make gcc bison flex diffutils openssl-devel"
|
||||
displayName: 'Install Toolchain'
|
||||
- script: |
|
||||
echo make tools-only_defconfig tools-only > build-tools.sh
|
||||
echo make tools-only_defconfig tools-only NO_SDL=1 > build-tools.sh
|
||||
%CD:~0,2%\msys64\usr\bin\bash -lc "bash build-tools.sh"
|
||||
displayName: 'Build Host Tools'
|
||||
env:
|
||||
@ -44,28 +40,15 @@ stages:
|
||||
pool:
|
||||
vmImage: $(macos_vm)
|
||||
steps:
|
||||
- script: brew install make ossp-uuid
|
||||
- script: brew install make
|
||||
displayName: Brew install dependencies
|
||||
- script: |
|
||||
gmake tools-only_config tools-only \
|
||||
gmake tools-only_config tools-only NO_SDL=1 \
|
||||
HOSTCFLAGS="-I/usr/local/opt/openssl@1.1/include" \
|
||||
HOSTLDFLAGS="-L/usr/local/opt/openssl@1.1/lib" \
|
||||
-j$(sysctl -n hw.logicalcpu)
|
||||
displayName: 'Perform tools-only build'
|
||||
|
||||
- job: check_for_new_CONFIG_symbols_outside_Kconfig
|
||||
displayName: 'Check for new CONFIG symbols outside Kconfig'
|
||||
pool:
|
||||
vmImage: $(ubuntu_vm)
|
||||
container:
|
||||
image: $(ci_runner_image)
|
||||
options: $(container_option)
|
||||
steps:
|
||||
# If grep succeeds and finds a match the test fails as we should
|
||||
# have no matches.
|
||||
- script: git grep -E '^#[[:blank:]]*(define|undef)[[:blank:]]*CONFIG_'
|
||||
include/configs `find arch -name config.h` && exit 1 || exit 0
|
||||
|
||||
- job: cppcheck
|
||||
displayName: 'Static code analysis with cppcheck'
|
||||
pool:
|
||||
@ -76,8 +59,8 @@ stages:
|
||||
steps:
|
||||
- script: cppcheck -j$(nproc) --force --quiet --inline-suppr .
|
||||
|
||||
- job: docs
|
||||
displayName: 'Build documentation'
|
||||
- job: htmldocs
|
||||
displayName: 'Build HTML documentation'
|
||||
pool:
|
||||
vmImage: $(ubuntu_vm)
|
||||
container:
|
||||
@ -89,7 +72,6 @@ stages:
|
||||
. /tmp/venvhtml/bin/activate
|
||||
pip install -r doc/sphinx/requirements.txt
|
||||
make htmldocs
|
||||
make infodocs
|
||||
|
||||
- job: todo
|
||||
displayName: 'Search for TODO within source tree'
|
||||
@ -122,7 +104,7 @@ stages:
|
||||
options: $(container_option)
|
||||
steps:
|
||||
- script: |
|
||||
./tools/buildman/buildman -R
|
||||
if [ `./tools/genboardscfg.py -f 2>&1 | wc -l` -ne 0 ]; then exit 1; fi
|
||||
|
||||
- job: tools_only
|
||||
displayName: 'Ensure host tools build'
|
||||
@ -152,11 +134,13 @@ stages:
|
||||
vmImage: $(ubuntu_vm)
|
||||
steps:
|
||||
- script: |
|
||||
cat << "EOF" > build.sh
|
||||
cd $(work_dir)
|
||||
cat << EOF > build.sh
|
||||
set -ex
|
||||
cd ${WORK_DIR}
|
||||
EOF
|
||||
cat << "EOF" >> build.sh
|
||||
git config --global user.name "Azure Pipelines"
|
||||
git config --global user.email bmeng.cn@gmail.com
|
||||
git config --global --add safe.directory $(work_dir)
|
||||
export USER=azure
|
||||
virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
. /tmp/venv/bin/activate
|
||||
@ -165,7 +149,6 @@ stages:
|
||||
export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
|
||||
export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
|
||||
./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl
|
||||
set -ex
|
||||
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test
|
||||
./tools/buildman/buildman -t
|
||||
./tools/dtoc/dtoc -t
|
||||
@ -186,34 +169,9 @@ stages:
|
||||
options: $(container_option)
|
||||
steps:
|
||||
- script: |
|
||||
export PATH=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin:$PATH
|
||||
export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH
|
||||
test/nokia_rx51_test.sh
|
||||
|
||||
- job: pylint
|
||||
displayName: Check for any pylint regressions
|
||||
pool:
|
||||
vmImage: $(ubuntu_vm)
|
||||
container:
|
||||
image: $(ci_runner_image)
|
||||
options: $(container_option)
|
||||
steps:
|
||||
- script: |
|
||||
git config --global --add safe.directory $(work_dir)
|
||||
export USER=azure
|
||||
pip install -r test/py/requirements.txt
|
||||
pip install asteval pylint==2.12.2 pyopenssl
|
||||
export PATH=${PATH}:~/.local/bin
|
||||
echo "[MASTER]" >> .pylintrc
|
||||
echo "load-plugins=pylint.extensions.docparams" >> .pylintrc
|
||||
export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
|
||||
./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl
|
||||
set -ex
|
||||
pylint --version
|
||||
export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
|
||||
make pylint_err
|
||||
|
||||
- stage: test_py
|
||||
jobs:
|
||||
- job: test_py
|
||||
displayName: 'test.py'
|
||||
pool:
|
||||
@ -224,31 +182,18 @@ stages:
|
||||
TEST_PY_BD: "sandbox"
|
||||
sandbox_clang:
|
||||
TEST_PY_BD: "sandbox"
|
||||
OVERRIDE: "-O clang-14"
|
||||
sandbox_nolto:
|
||||
TEST_PY_BD: "sandbox"
|
||||
BUILD_ENV: "NO_LTO=1"
|
||||
OVERRIDE: "-O clang-13"
|
||||
sandbox_spl:
|
||||
TEST_PY_BD: "sandbox_spl"
|
||||
TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
|
||||
sandbox_vpl:
|
||||
TEST_PY_BD: "sandbox_vpl"
|
||||
TEST_PY_TEST_SPEC: "test_vpl_help or test_spl"
|
||||
sandbox_noinst:
|
||||
TEST_PY_BD: "sandbox_noinst"
|
||||
TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
|
||||
sandbox_flattree:
|
||||
TEST_PY_BD: "sandbox_flattree"
|
||||
coreboot:
|
||||
TEST_PY_BD: "coreboot"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
evb_ast2500:
|
||||
TEST_PY_BD: "evb-ast2500"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
evb_ast2600:
|
||||
TEST_PY_BD: "evb-ast2600"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
vexpress_ca9x4:
|
||||
TEST_PY_BD: "vexpress_ca9x4"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
@ -339,12 +284,10 @@ stages:
|
||||
export TEST_PY_ID="${TEST_PY_ID}"
|
||||
export TEST_PY_TEST_SPEC="${TEST_PY_TEST_SPEC}"
|
||||
export OVERRIDE="${OVERRIDE}"
|
||||
export BUILD_ENV="${BUILD_ENV}"
|
||||
EOF
|
||||
cat << "EOF" >> test.sh
|
||||
# the below corresponds to .gitlab-ci.yml "before_script"
|
||||
cd ${WORK_DIR}
|
||||
git config --global --add safe.directory ${WORK_DIR}
|
||||
git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks
|
||||
ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
|
||||
ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
|
||||
@ -379,12 +322,6 @@ stages:
|
||||
genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg;
|
||||
cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/;
|
||||
fi
|
||||
if [[ "${TEST_PY_BD}" == "coreboot" ]]; then
|
||||
wget -O - "https://drive.google.com/uc?id=1x6nrtWIyIRPLS2cQBwYTnT2TbOI8UjmM&export=download" |xz -dc >${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom;
|
||||
wget -O - "https://drive.google.com/uc?id=149Cz-5SZXHNKpi9xg6R_5XITWohu348y&export=download" >cbfstool;
|
||||
chmod a+x cbfstool;
|
||||
./cbfstool ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom add-flat-binary -f ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.bin -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000;
|
||||
fi
|
||||
virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
. /tmp/venv/bin/activate
|
||||
pip install -r test/py/requirements.txt
|
||||
@ -417,20 +354,16 @@ stages:
|
||||
# Some tests using libguestfs-tools need the fuse device to run
|
||||
docker run "$@" --device /dev/fuse:/dev/fuse -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/test.sh
|
||||
|
||||
- stage: world_build
|
||||
jobs:
|
||||
- job: build_the_world
|
||||
displayName: 'Build the World'
|
||||
pool:
|
||||
vmImage: $(ubuntu_vm)
|
||||
strategy:
|
||||
# Use almost the same target division in .travis.yml, only merged
|
||||
# 3 small build jobs (arc/microblaze/xtensa) into one.
|
||||
# 4 small build jobs (arc/microblaze/nds32/xtensa) into one.
|
||||
matrix:
|
||||
arc_microblaze_xtensa:
|
||||
BUILDMAN: "arc microblaze xtensa"
|
||||
amlogic:
|
||||
BUILDMAN: "amlogic"
|
||||
arc_microblaze_nds32_xtensa:
|
||||
BUILDMAN: "arc microblaze nds32 xtensa"
|
||||
arm11_arm7_arm920t_arm946es:
|
||||
BUILDMAN: "arm11 arm7 arm920t arm946es"
|
||||
arm926ejs:
|
||||
@ -460,17 +393,11 @@ stages:
|
||||
imx6:
|
||||
BUILDMAN: "mx6 -x boundary,engicam,freescale,technexion,toradex"
|
||||
imx:
|
||||
BUILDMAN: "mx -x mx6,imx8,freescale,technexion,toradex"
|
||||
imx8_imx9:
|
||||
BUILDMAN: "imx8 imx9"
|
||||
BUILDMAN: "mx -x mx6,freescale,technexion,toradex"
|
||||
imx8:
|
||||
BUILDMAN: "imx8"
|
||||
keystone2_keystone3:
|
||||
BUILDMAN: "k2 k3"
|
||||
sandbox_asan:
|
||||
BUILDMAN: "sandbox"
|
||||
OVERRIDE: "-a ASAN"
|
||||
sandbox_clang_asan:
|
||||
BUILDMAN: "sandbox"
|
||||
OVERRIDE: "-O clang-14 -a ASAN"
|
||||
samsung_socfpga:
|
||||
BUILDMAN: "samsung socfpga"
|
||||
sun4i:
|
||||
@ -503,8 +430,20 @@ stages:
|
||||
BUILDMAN: "m68k"
|
||||
mips:
|
||||
BUILDMAN: "mips"
|
||||
powerpc:
|
||||
BUILDMAN: "powerpc"
|
||||
non_fsl_ppc:
|
||||
BUILDMAN: "powerpc -x freescale"
|
||||
mpc85xx_freescale:
|
||||
BUILDMAN: "mpc85xx&freescale -x t208xrdb -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x bsc91*"
|
||||
t208xrdb_corenet_ds:
|
||||
BUILDMAN: "t208xrdb corenet_ds"
|
||||
fsl_ppc:
|
||||
BUILDMAN: "mpc83xx&freescale"
|
||||
t102x:
|
||||
BUILDMAN: "t102*"
|
||||
p1_p2_rdb_pc:
|
||||
BUILDMAN: "p1_p2_rdb_pc"
|
||||
p1010rdb_bsc91:
|
||||
BUILDMAN: "p1010rdb bsc91"
|
||||
siemens:
|
||||
BUILDMAN: "siemens"
|
||||
tegra:
|
||||
@ -516,11 +455,9 @@ stages:
|
||||
uniphier:
|
||||
BUILDMAN: "uniphier"
|
||||
aarch64_catch_all:
|
||||
BUILDMAN: "aarch64 -x amlogic,bcm,imx8,imx9,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,renesas,sunxi,samsung,socfpga,rk,versal,zynq"
|
||||
rockchip_32bit:
|
||||
BUILDMAN: "rk -x aarch64"
|
||||
rockchip_64bit:
|
||||
BUILDMAN: "rk&aarch64"
|
||||
BUILDMAN: "aarch64 -x bcm,imx8,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,renesas,sunxi,samsung,socfpga,rk,versal,zynq"
|
||||
rockchip:
|
||||
BUILDMAN: "rk"
|
||||
renesas:
|
||||
BUILDMAN: "renesas"
|
||||
zynq:
|
||||
@ -536,12 +473,11 @@ stages:
|
||||
cd ${WORK_DIR}
|
||||
# make environment variables available as tests are running inside a container
|
||||
export BUILDMAN="${BUILDMAN}"
|
||||
git config --global --add safe.directory ${WORK_DIR}
|
||||
EOF
|
||||
cat << "EOF" >> build.sh
|
||||
if [[ "${BUILDMAN}" != "" ]]; then
|
||||
ret=0;
|
||||
tools/buildman/buildman -o /tmp -PEWM ${BUILDMAN} ${OVERRIDE} || ret=$?;
|
||||
tools/buildman/buildman -o /tmp -P -E -W ${BUILDMAN} ${OVERRIDE} || ret=$?;
|
||||
if [[ $ret -ne 0 ]]; then
|
||||
tools/buildman/buildman -o /tmp -seP ${BUILDMAN};
|
||||
exit $ret;
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Temporary for false positive in checkpatch
|
||||
--ignore COMPLEX_MACRO
|
||||
|
||||
# For CFG_SYS_I2C_NOPROBES
|
||||
# For CONFIG_SYS_I2C_NOPROBES
|
||||
--ignore MULTISTATEMENT_MACRO_USE_DO_WHILE
|
||||
|
||||
# For simple_strtoul
|
||||
|
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -3,4 +3,3 @@
|
||||
# Denote all files that are truly binary and should not be modified
|
||||
*.bmp binary
|
||||
*.ttf binary
|
||||
*.gz binary
|
||||
|
2
.github/pull_request_template.md
vendored
2
.github/pull_request_template.md
vendored
@ -1,6 +1,6 @@
|
||||
Please do not submit a Pull Request via github. Our project makes use of
|
||||
mailing lists for patch submission and review. For more details please
|
||||
see https://u-boot.readthedocs.io/en/latest/develop/sending_patches.html
|
||||
see https://www.denx.de/wiki/U-Boot/Patches
|
||||
|
||||
The only exception to this is in order to trigger a CI loop on Azure prior
|
||||
to posting of patches.
|
||||
|
9
.gitignore
vendored
9
.gitignore
vendored
@ -10,7 +10,6 @@
|
||||
*.asn1.[ch]
|
||||
*.bin
|
||||
*.cfgout
|
||||
*.cover
|
||||
*.dtb
|
||||
*.dtbo
|
||||
*.dtb.S
|
||||
@ -23,7 +22,6 @@
|
||||
*.lex.c
|
||||
*.lst
|
||||
*.mod.c
|
||||
*.mbx
|
||||
*.o
|
||||
*.o.*
|
||||
*.order
|
||||
@ -97,10 +95,3 @@ GTAGS
|
||||
|
||||
# Python cache
|
||||
__pycache__
|
||||
|
||||
# Python code coverage output (python3-coverage html)
|
||||
/htmlcov/
|
||||
|
||||
# pylint files
|
||||
/pylint.cur
|
||||
/pylint.out/
|
||||
|
105
.gitlab-ci.yml
105
.gitlab-ci.yml
@ -1,8 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
# Grab our configured image. The source for this is found
|
||||
# in the u-boot tree at tools/docker/Dockerfile
|
||||
image: trini/u-boot-gitlab-ci-runner:jammy-20221130-11Jan2023
|
||||
# Grab our configured image. The source for this is found at:
|
||||
# https://source.denx.de/u-boot/gitlab-ci-runner
|
||||
image: trini/u-boot-gitlab-ci-runner:focal-20211006-14Nov2021
|
||||
|
||||
# We run some tests in different order, to catch some failures quicker.
|
||||
stages:
|
||||
@ -14,7 +14,6 @@ stages:
|
||||
stage: test.py
|
||||
before_script:
|
||||
# Clone uboot-test-hooks
|
||||
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
|
||||
- git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks
|
||||
- ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
|
||||
- ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
|
||||
@ -34,7 +33,6 @@ stages:
|
||||
script:
|
||||
# If we've been asked to use clang only do one configuration.
|
||||
- export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD}
|
||||
- echo BUILD_ENV ${BUILD_ENV}
|
||||
- tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e
|
||||
--board ${TEST_PY_BD} ${OVERRIDE}
|
||||
- cp ~/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/
|
||||
@ -54,16 +52,6 @@ stages:
|
||||
genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg;
|
||||
cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/;
|
||||
fi
|
||||
- if [[ "${TEST_PY_BD}" == "coreboot" ]]; then
|
||||
wget -O -
|
||||
"https://drive.google.com/uc?id=1x6nrtWIyIRPLS2cQBwYTnT2TbOI8UjmM&export=download" |
|
||||
xz -dc >${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom;
|
||||
wget -O -
|
||||
"https://drive.google.com/uc?id=149Cz-5SZXHNKpi9xg6R_5XITWohu348y&export=download" >
|
||||
cbfstool;
|
||||
chmod a+x cbfstool;
|
||||
./cbfstool ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom add-flat-binary -f ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.bin -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000;
|
||||
fi
|
||||
- virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
- . /tmp/venv/bin/activate
|
||||
- pip install -r test/py/requirements.txt
|
||||
@ -73,17 +61,12 @@ stages:
|
||||
./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID}
|
||||
${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"}
|
||||
--build-dir "$UBOOT_TRAVIS_BUILD_DIR"
|
||||
# It seems that the files in /tmp go away, so copy out what we need
|
||||
- if [[ "${TEST_PY_BD}" == "coreboot" ]]; then
|
||||
cp -v /tmp/coreboot/*.{html,css} .;
|
||||
fi
|
||||
|
||||
build all 32bit ARM platforms:
|
||||
stage: world build
|
||||
script:
|
||||
- ret=0;
|
||||
git config --global --add safe.directory "${CI_PROJECT_DIR}";
|
||||
./tools/buildman/buildman -o /tmp -PEWM arm -x aarch64 || ret=$?;
|
||||
./tools/buildman/buildman -o /tmp -P -E -W arm -x aarch64 || ret=$?;
|
||||
if [[ $ret -ne 0 ]]; then
|
||||
./tools/buildman/buildman -o /tmp -seP;
|
||||
exit $ret;
|
||||
@ -94,9 +77,9 @@ build all 64bit ARM platforms:
|
||||
script:
|
||||
- virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
- . /tmp/venv/bin/activate
|
||||
- pip install pyelftools
|
||||
- ret=0;
|
||||
git config --global --add safe.directory "${CI_PROJECT_DIR}";
|
||||
./tools/buildman/buildman -o /tmp -PEWM aarch64 || ret=$?;
|
||||
./tools/buildman/buildman -o /tmp -P -E -W aarch64 || ret=$?;
|
||||
if [[ $ret -ne 0 ]]; then
|
||||
./tools/buildman/buildman -o /tmp -seP;
|
||||
exit $ret;
|
||||
@ -106,7 +89,6 @@ build all PowerPC platforms:
|
||||
stage: world build
|
||||
script:
|
||||
- ret=0;
|
||||
git config --global --add safe.directory "${CI_PROJECT_DIR}";
|
||||
./tools/buildman/buildman -o /tmp -P -E -W powerpc || ret=$?;
|
||||
if [[ $ret -ne 0 ]]; then
|
||||
./tools/buildman/buildman -o /tmp -seP;
|
||||
@ -117,22 +99,12 @@ build all other platforms:
|
||||
stage: world build
|
||||
script:
|
||||
- ret=0;
|
||||
git config --global --add safe.directory "${CI_PROJECT_DIR}";
|
||||
./tools/buildman/buildman -o /tmp -PEWM -x arm,powerpc || ret=$?;
|
||||
./tools/buildman/buildman -o /tmp -P -E -W -x arm,powerpc || ret=$?;
|
||||
if [[ $ret -ne 0 ]]; then
|
||||
./tools/buildman/buildman -o /tmp -seP;
|
||||
exit $ret;
|
||||
fi;
|
||||
|
||||
check for new CONFIG symbols outside Kconfig:
|
||||
stage: testsuites
|
||||
script:
|
||||
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
|
||||
# If grep succeeds and finds a match the test fails as we should
|
||||
# have no matches.
|
||||
- git grep -E '^#[[:blank:]]*(define|undef)[[:blank:]]*CONFIG_'
|
||||
include/configs `find arch -name config.h` && exit 1 || exit 0
|
||||
|
||||
# QA jobs for code analytics
|
||||
# static code analysis with cppcheck (we can add --enable=all later)
|
||||
cppcheck:
|
||||
@ -149,15 +121,14 @@ grep TODO/FIXME/HACK:
|
||||
# search for HACK within source tree and ignore HACKKIT board
|
||||
- grep -r HACK . | grep -v HACKKIT
|
||||
|
||||
# build documentation
|
||||
docs:
|
||||
# build HTML documentation
|
||||
htmldocs:
|
||||
stage: testsuites
|
||||
script:
|
||||
- virtualenv -p /usr/bin/python3 /tmp/venvhtml
|
||||
- . /tmp/venvhtml/bin/activate
|
||||
- pip install -r doc/sphinx/requirements.txt
|
||||
- make htmldocs
|
||||
- make infodocs
|
||||
|
||||
# some statistics about the code base
|
||||
sloccount:
|
||||
@ -169,7 +140,7 @@ sloccount:
|
||||
Check for configs without MAINTAINERS entry:
|
||||
stage: testsuites
|
||||
script:
|
||||
- ./tools/buildman/buildman -R
|
||||
- if [ `./tools/genboardscfg.py -f 2>&1 | wc -l` -ne 0 ]; then exit 1; fi
|
||||
|
||||
# Ensure host tools build
|
||||
Build tools-only:
|
||||
@ -188,7 +159,6 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
|
||||
script:
|
||||
- git config --global user.name "GitLab CI Runner";
|
||||
git config --global user.email trini@konsulko.com;
|
||||
git config --global --add safe.directory "${CI_PROJECT_DIR}";
|
||||
export USER=gitlab;
|
||||
virtualenv -p /usr/bin/python3 /tmp/venv;
|
||||
. /tmp/venv/bin/activate;
|
||||
@ -196,10 +166,8 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
|
||||
export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl;
|
||||
export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
|
||||
export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
|
||||
set +e;
|
||||
./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w
|
||||
--board sandbox_spl;
|
||||
set -e;
|
||||
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test;
|
||||
./tools/buildman/buildman -t;
|
||||
./tools/dtoc/dtoc -t;
|
||||
@ -209,28 +177,9 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
|
||||
Run tests for Nokia RX-51 (aka N900):
|
||||
stage: testsuites
|
||||
script:
|
||||
- export PATH=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin:$PATH;
|
||||
- export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH;
|
||||
test/nokia_rx51_test.sh
|
||||
|
||||
# Check for any pylint regressions
|
||||
Run pylint:
|
||||
stage: testsuites
|
||||
script:
|
||||
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
|
||||
- pip install -r test/py/requirements.txt
|
||||
- pip install asteval pylint==2.12.2 pyopenssl
|
||||
- export PATH=${PATH}:~/.local/bin
|
||||
- echo "[MASTER]" >> .pylintrc
|
||||
- echo "load-plugins=pylint.extensions.docparams" >> .pylintrc
|
||||
- export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
|
||||
- set +e
|
||||
- ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w
|
||||
--board sandbox_spl
|
||||
- set -e
|
||||
- pylint --version
|
||||
- export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
|
||||
- make pylint_err
|
||||
|
||||
# Test sandbox with test.py
|
||||
sandbox test.py:
|
||||
variables:
|
||||
@ -240,13 +189,7 @@ sandbox test.py:
|
||||
sandbox with clang test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "sandbox"
|
||||
OVERRIDE: "-O clang-14"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
sandbox without LTO test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "sandbox"
|
||||
BUILD_ENV: "NO_LTO=1"
|
||||
OVERRIDE: "-O clang-13"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
sandbox_spl test.py:
|
||||
@ -261,24 +204,12 @@ sandbox_noinst_test.py:
|
||||
TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
sandbox_vpl test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "sandbox_vpl"
|
||||
TEST_PY_TEST_SPEC: "test_vpl_help or test_spl"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
evb-ast2500 test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "evb-ast2500"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
evb-ast2600 test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "evb-ast2600"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
sandbox_flattree test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "sandbox_flattree"
|
||||
@ -435,15 +366,3 @@ xtfpga test.py:
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
coreboot test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "coreboot"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
artifacts:
|
||||
paths:
|
||||
- "*.html"
|
||||
- "*.css"
|
||||
expire_in: 1 week
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
29
.mailmap
29
.mailmap
@ -20,15 +20,11 @@ Allen Martin <amartin@nvidia.com>
|
||||
Andreas Bießmann <andreas.devel@googlemail.com>
|
||||
Andreas Bießmann <andreas@biessmann.org>
|
||||
Aneesh V <aneesh@ti.com>
|
||||
Anup Patel <anup@brainfault.org> <anup.patel@wdc.com>
|
||||
Atish Patra <atishp@atishpatra.org> <atish.patra@wdc.com>
|
||||
Bin Meng <bmeng.cn@gmail.com> <bin.meng@windriver.com>
|
||||
Boris Brezillon <bbrezillon@kernel.org> <boris.brezillon@bootlin.com>
|
||||
Boris Brezillon <bbrezillon@kernel.org> <boris.brezillon@free-electrons.com>
|
||||
Dirk Behme <dirk.behme@googlemail.com>
|
||||
Fabio Estevam <fabio.estevam@nxp.com>
|
||||
Heinrich Schuchardt <xypron.glpk@gmx.de> <heinrich.schuchardt@canonical.com>
|
||||
Heinrich Schuchardt <xypron.glpk@gmx.de> xypron.glpk@gmx.de <xypron.glpk@gmx.de>
|
||||
Jagan Teki <402jagan@gmail.com>
|
||||
Jagan Teki <jaganna@gmail.com>
|
||||
Jagan Teki <jaganna@xilinx.com>
|
||||
@ -37,19 +33,7 @@ Jagan Teki <jagannadha.sutradharudu-teki@xilinx.com>
|
||||
Jernej Skrabec <jernej.skrabec@gmail.com> <jernej.skrabec@siol.net>
|
||||
Igor Opaniuk <igor.opaniuk@gmail.com> <igor.opaniuk@linaro.org>
|
||||
Igor Opaniuk <igor.opaniuk@gmail.com> <igor.opaniuk@toradex.com>
|
||||
Marek Behún <kabel@kernel.org> <marek.behun@nic.cz>
|
||||
Marek Behún <kabel@kernel.org> Marek Behun <marek.behun@nic.cz>
|
||||
Marek Vasut <marex@denx.de> <marek.vasut+renesas@gmail.com>
|
||||
Marek Vasut <marex@denx.de> <marek.vasut@gmail.com>
|
||||
Marek Vasut <marex@denx.de> <marex at denx.de>
|
||||
Markus Klotzbuecher <mk@denx.de>
|
||||
Masahiro Yamada <yamada.masahiro@socionext.com> <yamada.m@jp.panasonic.com>
|
||||
Masahiro Yamada <yamada.masahiro@socionext.com> <masahiroy@kernel.org>
|
||||
Michal Simek <michal.simek@amd.com> <michal.simek@xilinx.com>
|
||||
Michal Simek <michal.simek@xilinx.com> <monstr@monstr.eu>
|
||||
Michal Simek <michal.simek@xilinx.com> <Monstr@seznam.cz>
|
||||
Michal Simek <michal.simek@xilinx.com> <root@monstr.eu>
|
||||
Neil Armstrong <neil.armstrong@linaro.org> <narmstrong@baylibre.com>
|
||||
Nicolas Saenz Julienne <nsaenz@kernel.org> <nsaenzjulienne@suse.de>
|
||||
Patrice Chotard <patrice.chotard@foss.st.com> <patrice.chotard@st.com>
|
||||
Patrick Delaunay <patrick.delaunay@foss.st.com> <patrick.delaunay@st.com>
|
||||
@ -61,19 +45,10 @@ Ricardo Ribalda <ricardo@ribalda.com> <ricardo.ribalda@gmail.com>
|
||||
Ruchika Gupta <ruchika.gupta@nxp.com> <ruchika.gupta@freescale.com>
|
||||
Sandeep Paulraj <s-paulraj@ti.com>
|
||||
Shaohui Xie <Shaohui.Xie@freescale.com>
|
||||
Stefan Roese <sr@denx.de> <stroese>
|
||||
Stefan Roese <stroese>
|
||||
Stefano Babic <sbabic@denx.de>
|
||||
Tom Rini <trini@konsulko.com> <trini@ti.com>
|
||||
TsiChung Liew <Tsi-Chung.Liew@freescale.com>
|
||||
Wolfgang Denk <wd@denx.de> <wdenk>
|
||||
Wolfgang Denk <wd@denx.de> <wd@pollux.denx.de>
|
||||
Wolfgang Denk <wd@denx.de> <wd@pollux.(none)>
|
||||
Wolfgang Denk <wd@denx.de> <wd@fifi.denx.de>
|
||||
Wolfgang Denk <wd@denx.de> <wd@nyx.denx.de>
|
||||
Wolfgang Denk <wd@denx.de> <wd@atlas.denx.de>
|
||||
Wolfgang Denk <wd@denx.de> <wd@castor.denx.de>
|
||||
Wolfgang Denk <wd@denx.de> <wd@xpert.denx.de>
|
||||
Wolfgang Denk <wd@denx.de> <wd@nyx.(none)>
|
||||
Wolfgang Denk <wdenk>
|
||||
York Sun <yorksun@freescale.com>
|
||||
York Sun <york.sun@nxp.com>
|
||||
Łukasz Majewski <l.majewski@samsung.com>
|
||||
|
@ -5,13 +5,6 @@
|
||||
# Required
|
||||
version: 2
|
||||
|
||||
build:
|
||||
os: "ubuntu-20.04"
|
||||
apt_packages:
|
||||
- python3-six
|
||||
tools:
|
||||
python: "3.9"
|
||||
|
||||
# Build documentation in the docs/ directory with Sphinx
|
||||
sphinx:
|
||||
configuration: doc/conf.py
|
||||
@ -19,6 +12,8 @@ sphinx:
|
||||
# Optionally build your docs in additional formats such as PDF and ePub
|
||||
formats: []
|
||||
|
||||
python:
|
||||
install:
|
||||
- requirements: doc/sphinx/requirements.txt
|
||||
# Optionally set the version of Python and requirements required to build your docs
|
||||
# python:
|
||||
# version: 3.7
|
||||
# install:
|
||||
# - requirements: docs/requirements.txt
|
||||
|
182
Kconfig
182
Kconfig
@ -72,32 +72,15 @@ config CLANG_VERSION
|
||||
int
|
||||
default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
|
||||
|
||||
choice
|
||||
prompt "Optimization level"
|
||||
default CC_OPTIMIZE_FOR_SIZE
|
||||
|
||||
config CC_OPTIMIZE_FOR_SIZE
|
||||
bool "Optimize for size"
|
||||
default y
|
||||
help
|
||||
Enabling this option will pass "-Os" to gcc, resulting in a smaller
|
||||
U-Boot image.
|
||||
Enabling this option will pass "-Os" instead of "-O2" to gcc
|
||||
resulting in a smaller U-Boot image.
|
||||
|
||||
This option is enabled by default for U-Boot.
|
||||
|
||||
config CC_OPTIMIZE_FOR_SPEED
|
||||
bool "Optimize for speed"
|
||||
help
|
||||
Enabling this option will pass "-O2" to gcc, resulting in a faster
|
||||
U-Boot image.
|
||||
|
||||
config CC_OPTIMIZE_FOR_DEBUG
|
||||
bool "Optimize for debugging"
|
||||
help
|
||||
Enabling this option will pass "-Og" to gcc, enabling optimizations
|
||||
which don't interfere with debugging.
|
||||
|
||||
endchoice
|
||||
|
||||
config OPTIMIZE_INLINING
|
||||
bool "Allow compiler to uninline functions marked 'inline' in full U-Boot"
|
||||
help
|
||||
@ -154,22 +137,6 @@ config CC_COVERAGE
|
||||
Enabling this option will pass "--coverage" to gcc to compile
|
||||
and link code instrumented for coverage analysis.
|
||||
|
||||
config ASAN
|
||||
bool "Enable AddressSanitizer"
|
||||
depends on SANDBOX
|
||||
help
|
||||
Enables AddressSanitizer to discover out-of-bounds accesses,
|
||||
use-after-free, double-free and memory leaks.
|
||||
|
||||
config FUZZ
|
||||
bool "Enable fuzzing"
|
||||
depends on CC_IS_CLANG
|
||||
depends on DM_FUZZING_ENGINE
|
||||
select ASAN
|
||||
help
|
||||
Enables the fuzzing infrastructure to generate fuzzing data and run
|
||||
fuzz tests.
|
||||
|
||||
config CC_HAS_ASM_INLINE
|
||||
def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)
|
||||
|
||||
@ -244,38 +211,12 @@ config SYS_BOOT_GET_CMDLINE
|
||||
Enables allocating and saving kernel cmdline in space between
|
||||
"bootm_low" and "bootm_low" + BOOTMAPSZ.
|
||||
|
||||
config SYS_BARGSIZE
|
||||
int "Size of kernel command line buffer in bytes"
|
||||
depends on SYS_BOOT_GET_CMDLINE
|
||||
default 512
|
||||
help
|
||||
Buffer size for Boot Arguments which are passed to the application
|
||||
(usually a Linux kernel) when it is booted
|
||||
|
||||
config SYS_BOOT_GET_KBD
|
||||
bool "Enable kernel board information setup"
|
||||
help
|
||||
Enables allocating and saving a kernel copy of the bd_info in
|
||||
space between "bootm_low" and "bootm_low" + BOOTMAPSZ.
|
||||
|
||||
config HAS_CUSTOM_SYS_INIT_SP_ADDR
|
||||
bool "Use a custom location for the initial stack pointer address"
|
||||
depends on ARC || (ARM && !INIT_SP_RELATIVE) || MIPS || PPC || RISCV
|
||||
default y if TFABOOT
|
||||
help
|
||||
Typically, we use an initial stack pointer address that is calculated
|
||||
by taking the statically defined CFG_SYS_INIT_RAM_ADDR, adding the
|
||||
statically defined CFG_SYS_INIT_RAM_SIZE and then subtracting the
|
||||
build-time constant of GENERATED_GBL_DATA_SIZE. On MIPS a different
|
||||
but statica calculation is performed. However, some platforms will
|
||||
take a different approach. Say Y here to define the address statically
|
||||
instead.
|
||||
|
||||
config CUSTOM_SYS_INIT_SP_ADDR
|
||||
hex "Static location for the initial stack pointer"
|
||||
depends on HAS_CUSTOM_SYS_INIT_SP_ADDR
|
||||
default TEXT_BASE if TFABOOT
|
||||
|
||||
config SYS_MALLOC_F
|
||||
bool "Enable malloc() pool before relocation"
|
||||
default y if DM
|
||||
@ -289,18 +230,13 @@ config SYS_MALLOC_F
|
||||
config SYS_MALLOC_F_LEN
|
||||
hex "Size of malloc() pool before relocation"
|
||||
depends on SYS_MALLOC_F
|
||||
default 0x400 if M68K || PPC || ROCKCHIP_PX30 || ROCKCHIP_RK3036 || \
|
||||
ROCKCHIP_RK3308 || ROCKCHIP_RV1108
|
||||
default 0x600 if ARCH_ZYNQMP_R5 || ARCH_ZYNQMP
|
||||
default 0x800 if ARCH_ZYNQ || ROCKCHIP_RK3128 || ROCKCHIP_RK3188 || \
|
||||
ROCKCHIP_RK322X || X86
|
||||
default 0x1000 if ARCH_MESON || ARCH_BMIPS || ARCH_MTMIPS
|
||||
default 0x1800 if ARCH_TEGRA
|
||||
default 0x4000 if SANDBOX || RISCV || ARCH_APPLE || ROCKCHIP_RK3368 || \
|
||||
ROCKCHIP_RK3399
|
||||
default 0x8000 if RCAR_GEN3
|
||||
default 0x10000 if ARCH_IMX8 || ARCH_IMX8M
|
||||
default 0x2000
|
||||
default 0x1000 if AM33XX
|
||||
default 0x4000 if SANDBOX
|
||||
default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
|
||||
ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5 || \
|
||||
ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \
|
||||
ARCH_LS1046A || ARCH_QEMU || ARCH_SUNXI || ARCH_OWL)
|
||||
default 0x400
|
||||
help
|
||||
Before relocation, memory is very limited on many platforms. Still,
|
||||
we can provide a small malloc() pool if needed. Driver model in
|
||||
@ -309,12 +245,10 @@ config SYS_MALLOC_F_LEN
|
||||
|
||||
config SYS_MALLOC_LEN
|
||||
hex "Define memory for Dynamic allocation"
|
||||
default 0x4000000 if SANDBOX
|
||||
default 0x2000000 if ARCH_ROCKCHIP || ARCH_OMAP2PLUS || ARCH_MESON
|
||||
default 0x4020000 if ARCH_SUNXI && !MACH_SUN8I_V3S
|
||||
default 0x200000 if ARCH_BMIPS || X86
|
||||
default 0x4020000 if SUNXI_MINIMUM_DRAM_MB >= 256
|
||||
default 0x220000 if SUNXI_MINIMUM_DRAM_MB >= 64
|
||||
default 0x120000 if SUNXI_MINIMUM_DRAM_MB >= 32
|
||||
default 0x220000 if ARCH_SUNXI && MACH_SUN8I_V3S
|
||||
default 0x400000
|
||||
help
|
||||
This defines memory to be allocated for Dynamic allocation
|
||||
@ -323,9 +257,7 @@ config SYS_MALLOC_LEN
|
||||
config SPL_SYS_MALLOC_F_LEN
|
||||
hex "Size of malloc() pool in SPL"
|
||||
depends on SYS_MALLOC_F && SPL
|
||||
default 0 if !SPL_FRAMEWORK
|
||||
default 0x2800 if RCAR_GEN3
|
||||
default 0x2000 if IMX8MQ
|
||||
default SYS_MALLOC_F_LEN
|
||||
help
|
||||
In SPL memory is very limited on many platforms. Still,
|
||||
@ -333,7 +265,7 @@ config SPL_SYS_MALLOC_F_LEN
|
||||
particular needs this to operate, so that it can allocate the
|
||||
initial serial device and any others that are needed.
|
||||
|
||||
It is possible to enable CFG_SYS_SPL_MALLOC_START to start a new
|
||||
It is possible to enable CONFIG_SYS_SPL_MALLOC_START to start a new
|
||||
malloc() region in SDRAM once it is inited.
|
||||
|
||||
config TPL_SYS_MALLOC_F_LEN
|
||||
@ -346,31 +278,6 @@ config TPL_SYS_MALLOC_F_LEN
|
||||
particular needs this to operate, so that it can allocate the
|
||||
initial serial device and any others that are needed.
|
||||
|
||||
config VALGRIND
|
||||
bool "Inform valgrind about memory allocations"
|
||||
depends on !RISCV
|
||||
help
|
||||
Valgrind is an instrumentation framework for building dynamic analysis
|
||||
tools. In particular, it may be used to detect memory management bugs
|
||||
in U-Boot. It relies on knowing when heap blocks are allocated in
|
||||
order to give accurate results. This happens automatically for
|
||||
standard allocator functions provided by the host OS. However, this
|
||||
doesn't automatically happen for U-Boot's malloc implementation.
|
||||
|
||||
Enable this option to annotate U-Boot's malloc implementation so that
|
||||
it can be handled accurately by Valgrind. If you aren't planning on
|
||||
using valgrind to debug U-Boot, say 'n'.
|
||||
|
||||
config VPL_SYS_MALLOC_F_LEN
|
||||
hex "Size of malloc() pool in VPL before relocation"
|
||||
depends on SYS_MALLOC_F && VPL
|
||||
default SYS_MALLOC_F_LEN
|
||||
help
|
||||
Before relocation, memory is very limited on many platforms. Still,
|
||||
we can provide a small malloc() pool if needed. Driver model in
|
||||
particular needs this to operate, so that it can allocate the
|
||||
initial serial device and any others that are needed.
|
||||
|
||||
menuconfig EXPERT
|
||||
bool "Configure standard U-Boot features (expert users)"
|
||||
default y
|
||||
@ -445,23 +352,15 @@ config SPL_IMAGE
|
||||
used to generate a combined image with SPL and main U-Boot
|
||||
proper as one single image.
|
||||
|
||||
config REMAKE_ELF
|
||||
bool "Recreate an ELF image from raw U-Boot binary"
|
||||
help
|
||||
Enable this to recreate an ELF image (u-boot.elf) from the raw
|
||||
U-Boot binary (u-boot.bin), which may already have been statically
|
||||
relocated and may already have a device-tree appended to it.
|
||||
|
||||
config BUILD_TARGET
|
||||
string "Build target special images"
|
||||
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.kwb" if ARMADA_32BIT && SPL
|
||||
default "u-boot-spl.kwb" if ARCH_MVEBU && SPL
|
||||
default "u-boot-elf.srec" if RCAR_GEN3
|
||||
default "u-boot.itb" if !BINMAN && SPL_LOAD_FIT && (ARCH_ROCKCHIP || \
|
||||
ARCH_SUNXI || RISCV || ARCH_ZYNQMP)
|
||||
default "u-boot.kwb" if (ARCH_KIRKWOOD || ARMADA_32BIT) && !SPL
|
||||
default "u-boot-with-spl.bin" if MPC85xx && !E500MC && !E5500 && !E6500 && SPL
|
||||
default "u-boot.kwb" if ARCH_KIRKWOOD
|
||||
default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT
|
||||
default "u-boot-with-spl.imx" if ARCH_MX6 && SPL
|
||||
help
|
||||
@ -471,23 +370,6 @@ config BUILD_TARGET
|
||||
special image will be automatically built upon calling
|
||||
make / buildman.
|
||||
|
||||
config HAS_BOARD_SIZE_LIMIT
|
||||
bool "Define a maximum size for the U-Boot image"
|
||||
default y if RCAR_GEN3
|
||||
help
|
||||
In some cases, we need to enforce a hard limit on how big the U-Boot
|
||||
image itself can be.
|
||||
|
||||
config BOARD_SIZE_LIMIT
|
||||
int "Maximum size of the U-Boot image in bytes"
|
||||
default 1048576 if RCAR_GEN3
|
||||
depends on HAS_BOARD_SIZE_LIMIT
|
||||
help
|
||||
Maximum size of the U-Boot image. When defined, the build system
|
||||
checks that the actual size does not exceed it. This does not
|
||||
include SPL nor TPL, on platforms that use that functionality, they
|
||||
have a separate option to restict size.
|
||||
|
||||
config SYS_CUSTOM_LDSCRIPT
|
||||
bool "Use a custom location for the U-Boot linker script"
|
||||
help
|
||||
@ -509,9 +391,8 @@ config SYS_LOAD_ADDR
|
||||
hex "Address in memory to use by default"
|
||||
default 0x01000000 if ARCH_SOCFPGA
|
||||
default 0x02000000 if PPC || X86
|
||||
default 0x81000000 if MACH_SUNIV
|
||||
default 0x22000000 if MACH_SUN9I
|
||||
default 0x42000000 if ARCH_SUNXI
|
||||
default 0x42000000 if ARCH_SUNXI && !MACH_SUN9I
|
||||
default 0x82000000 if ARCH_KEYSTONE || ARCH_OMAP2PLUS || ARCH_K3
|
||||
default 0x82000000 if ARCH_MX6 && (MX6SL || MX6SLL || MX6SX || MX6UL || MX6ULL)
|
||||
default 0x12000000 if ARCH_MX6 && !(MX6SL || MX6SLL || MX6SX || MX6UL || MX6ULL)
|
||||
@ -541,7 +422,7 @@ config PLATFORM_ELFENTRY
|
||||
|
||||
config STACK_SIZE
|
||||
hex "Define max stack size that can be used by U-Boot"
|
||||
default 0x4000000 if ARCH_VERSAL_NET || ARCH_VERSAL || ARCH_ZYNQMP
|
||||
default 0x4000000 if ARCH_VERSAL || ARCH_ZYNQMP
|
||||
default 0x200000 if MICROBLAZE
|
||||
default 0x1000000
|
||||
help
|
||||
@ -549,17 +430,6 @@ config STACK_SIZE
|
||||
by the UEFI sub-system. On some boards initrd_high is calculated as
|
||||
base stack pointer minus this stack size.
|
||||
|
||||
config SYS_MEM_TOP_HIDE
|
||||
hex "Exclude some memory from U-Boot / OS information"
|
||||
default 0x0
|
||||
help
|
||||
If set, this specified memory area will get subtracted from the top
|
||||
(end) of RAM and won't get "touched" at all by U-Boot. By fixing up
|
||||
gd->ram_size the OS / next stage should gets passed the now
|
||||
"corrected" memory size and won't touch it either.
|
||||
WARNING: Please make sure that this value is a multiple of the OS
|
||||
page size.
|
||||
|
||||
config SYS_HAS_SRAM
|
||||
bool
|
||||
default y if TARGET_PIC32MZDASK
|
||||
@ -584,24 +454,6 @@ config SYS_SRAM_SIZE
|
||||
default 0x10000 if TARGET_TRICORDER
|
||||
default 0x0
|
||||
|
||||
config SYS_MONITOR_LEN
|
||||
int "Maximum size in bytes reserved for U-Boot in memory"
|
||||
default 1048576 if X86
|
||||
default 786432 if ARCH_SUNXI
|
||||
default 0
|
||||
help
|
||||
Size of memory reserved for monitor code, used to determine
|
||||
_at_compile_time_ (!) if the environment is embedded within the
|
||||
U-Boot image, or in a separate flash sector, among other uses where
|
||||
we need to set a maximum size of the U-Boot binary itself that will
|
||||
be loaded.
|
||||
|
||||
config MP
|
||||
bool "Support for multiprocessor"
|
||||
help
|
||||
This provides an option to bringup different processors
|
||||
in multiprocessor cases.
|
||||
|
||||
config EXAMPLES
|
||||
bool "Compile API examples"
|
||||
depends on !SANDBOX
|
||||
|
@ -7,13 +7,9 @@ use U-Boot services by means of the jump table provided by U-Boot
|
||||
exactly for this purpose - this is merely considered normal use of
|
||||
U-Boot, and does *not* fall under the heading of "derived work".
|
||||
|
||||
The following files define interfaces to U-Boot:
|
||||
* include/image.h
|
||||
* include/export.h
|
||||
* arch/*/include/asm/u-boot.h
|
||||
* examples/standalone/stubs.c
|
||||
|
||||
Including these (unmodified) files in another file is considered normal
|
||||
use of U-Boot, and does *not* fall under the heading of "derived work".
|
||||
The header files "include/image.h" and "arch/*/include/asm/u-boot.h"
|
||||
define interfaces to U-Boot. Including these (unmodified) header
|
||||
files in another file is considered normal use of U-Boot, and does
|
||||
*not* fall under the heading of "derived work".
|
||||
-- Wolfgang Denk
|
||||
|
||||
|
@ -139,7 +139,6 @@ License identifier syntax
|
||||
|
||||
Full name SPDX Identifier OSI Approved File name URI
|
||||
=======================================================================================================================================
|
||||
bzip2 and libbzip2 License v1.0.6 bzip2-1.0.6 bzip2-1.0.6.txt https://spdx.org/licenses/bzip2-1.0.6.html
|
||||
GNU General Public License v2.0 only GPL-2.0 Y gpl-2.0.txt http://www.gnu.org/licenses/gpl-2.0.txt
|
||||
GNU General Public License v2.0 or later GPL-2.0+ Y gpl-2.0.txt http://www.gnu.org/licenses/gpl-2.0.txt
|
||||
GNU Library General Public License v2 or later LGPL-2.0+ Y lgpl-2.0.txt http://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt
|
||||
|
@ -1,30 +0,0 @@
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product
|
||||
documentation would be appreciated but is not required.
|
||||
|
||||
3. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
|
||||
4. The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
381
MAINTAINERS
381
MAINTAINERS
@ -50,12 +50,6 @@ so much easier [Ed]
|
||||
Maintainers List (try to look for most precise areas first)
|
||||
|
||||
-----------------------------------
|
||||
ACPI:
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
F: cmd/acpi.c
|
||||
F: lib/acpi/
|
||||
|
||||
ANDROID AB
|
||||
M: Igor Opaniuk <igor.opaniuk@gmail.com>
|
||||
R: Sam Protsenko <joe.skb7@gmail.com>
|
||||
@ -121,9 +115,6 @@ F: arch/arm/include/asm/arch-m1/
|
||||
F: arch/arm/mach-apple/
|
||||
F: configs/apple_m1_defconfig
|
||||
F: drivers/iommu/apple_dart.c
|
||||
F: drivers/nvme/nvme_apple.c
|
||||
F: drivers/pinctrl/pinctrl-apple.c
|
||||
F: drivers/watchdog/apple_wdt.c
|
||||
F: include/configs/apple.h
|
||||
|
||||
ARM
|
||||
@ -143,7 +134,7 @@ F: arch/arm/mach-socfpga/
|
||||
F: drivers/sysreset/sysreset_socfpga*
|
||||
|
||||
ARM AMLOGIC SOC SUPPORT
|
||||
M: Neil Armstrong <neil.armstrong@linaro.org>
|
||||
M: Neil Armstrong <narmstrong@baylibre.com>
|
||||
S: Maintained
|
||||
L: u-boot-amlogic@groups.io
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-amlogic.git
|
||||
@ -161,7 +152,6 @@ F: drivers/spi/meson_spifc.c
|
||||
F: drivers/pinctrl/meson/
|
||||
F: drivers/power/domain/meson-gx-pwrc-vpu.c
|
||||
F: drivers/video/meson/
|
||||
F: drivers/watchdog/meson_gxbb_wdt.c
|
||||
F: include/configs/meson64.h
|
||||
F: include/configs/meson64_android.h
|
||||
F: doc/board/amlogic/
|
||||
@ -171,28 +161,16 @@ ARM ASPEED
|
||||
M: Ryan Chen <ryan_chen@aspeedtech.com>
|
||||
M: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
|
||||
R: Aspeed BMC SW team <BMC-SW@aspeedtech.com>
|
||||
R: Joel Stanley <joel@jms.id.au>
|
||||
S: Maintained
|
||||
F: arch/arm/mach-aspeed/
|
||||
F: arch/arm/include/asm/arch-aspeed/
|
||||
F: board/aspeed/
|
||||
F: drivers/clk/aspeed/
|
||||
F: drivers/crypto/aspeed/
|
||||
F: drivers/gpio/gpio-aspeed.c
|
||||
F: drivers/i2c/ast_i2c.[ch]
|
||||
F: drivers/mmc/aspeed_sdhci.c
|
||||
F: drivers/net/aspeed_mdio.c
|
||||
F: drivers/net/ftgmac100.[ch]
|
||||
F: drivers/pinctrl/aspeed/
|
||||
F: drivers/pwm/pwm-aspeed.c
|
||||
F: drivers/ram/aspeed/
|
||||
F: drivers/reset/reset-ast2500.c
|
||||
F: drivers/watchdog/ast_wdt.c
|
||||
N: aspeed
|
||||
|
||||
ARM BROADCOM BCM283X / BCM27XX
|
||||
M: Matthias Brugger <mbrugger@suse.com>
|
||||
M: Peter Robinson <pbrobinson@gmail.com>
|
||||
S: Maintained
|
||||
F: arch/arm/dts/bcm283*
|
||||
F: arch/arm/mach-bcm283x/
|
||||
@ -209,32 +187,6 @@ F: drivers/pinctrl/broadcom/
|
||||
F: configs/rpi_*
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-arm.git
|
||||
|
||||
ARM BROADCOM BCMBCA
|
||||
M: Anand Gore <anand.gore@broadcom.com>
|
||||
M: William Zhang <william.zhang@broadcom.com>
|
||||
M: Kursad Oney <kursad.oney@broadcom.com>
|
||||
M: Joel Peshkin <joel.peshkin@broadcom.com>
|
||||
M: Philippe Reynes <philippe.reynes@softathome.com>
|
||||
S: Maintained
|
||||
F: arch/arm/mach-bcmbca/
|
||||
F: board/broadcom/bcmbca/
|
||||
N: bcmbca
|
||||
N: bcm[9]?47622
|
||||
N: bcm[9]?4908
|
||||
N: bcm[9]?4912
|
||||
N: bcm[9]?63138
|
||||
N: bcm[9]?63146
|
||||
N: bcm[9]?63148
|
||||
N: bcm[9]?63158
|
||||
N: bcm[9]?63178
|
||||
N: bcm[9]?6756
|
||||
N: bcm[9]?6813
|
||||
N: bcm[9]?6846
|
||||
N: bcm[9]?6855
|
||||
N: bcm[9]?6856
|
||||
N: bcm[9]?6858
|
||||
N: bcm[9]?6878
|
||||
|
||||
ARM BROADCOM BCMSTB
|
||||
M: Thomas Fitzsimmons <fitzsim@fitzsim.org>
|
||||
S: Maintained
|
||||
@ -264,6 +216,14 @@ F: drivers/net/cortina_ni.h
|
||||
F: drivers/net/phy/ca_phy.c
|
||||
F: configs/cortina_presidio-asic-pnand_defconfig
|
||||
|
||||
ARM/CZ.NIC TURRIS MOX SUPPORT
|
||||
M: Marek Behun <marek.behun@nic.cz>
|
||||
S: Maintained
|
||||
F: arch/arm/dts/armada-3720-turris-mox.dts
|
||||
F: board/CZ.NIC/
|
||||
F: configs/turris_*_defconfig
|
||||
F: include/configs/turris_*.h
|
||||
|
||||
ARM FREESCALE IMX
|
||||
M: Stefano Babic <sbabic@denx.de>
|
||||
M: Fabio Estevam <festevam@gmail.com>
|
||||
@ -275,12 +235,11 @@ F: arch/arm/cpu/arm926ejs/mx*/
|
||||
F: arch/arm/cpu/armv7/vf610/
|
||||
F: arch/arm/dts/*imx*
|
||||
F: arch/arm/mach-imx/
|
||||
F: arch/arm/include/asm/arch-imx*/
|
||||
F: arch/arm/include/asm/arch-imx/
|
||||
F: arch/arm/include/asm/arch-mx*/
|
||||
F: arch/arm/include/asm/arch-vf610/
|
||||
F: arch/arm/include/asm/mach-imx/
|
||||
F: board/freescale/*mx*/
|
||||
F: drivers/serial/serial_mxc.c
|
||||
|
||||
ARM HISILICON
|
||||
M: Peter Griffin <peter.griffin@linaro.org>
|
||||
@ -290,19 +249,6 @@ F: arch/arm/cpu/armv8/hisilicon
|
||||
F: arch/arm/include/asm/arch-hi6220/
|
||||
F: arch/arm/include/asm/arch-hi3660/
|
||||
|
||||
ARM HPE GXP ARCHITECTURE
|
||||
M: Jean-Marie Verdun <verdun@hpe.com>
|
||||
M: Nick Hawkins <nick.hawkins@hpe.com>
|
||||
S: Maintained
|
||||
F: arch/arm/dts/hpe-bmc*
|
||||
F: arch/arm/dts/hpe-gxp*
|
||||
F: arch/arm/mach-hpe/
|
||||
F: board/hpe/
|
||||
F: configs/gxp_defconfig
|
||||
F: doc/device-tree-bindings/spi/hpe,gxp-spi.yaml
|
||||
F: drivers/timer/gxp-timer.c
|
||||
F: drivers/spi/gxp_spi.c
|
||||
|
||||
ARM IPQ40XX
|
||||
M: Robert Marko <robert.marko@sartura.hr>
|
||||
M: Luka Kovacic <luka.kovacic@sartura.hr>
|
||||
@ -317,11 +263,6 @@ F: drivers/spi/spi-qup.c
|
||||
F: drivers/net/mdio-ipq4019.c
|
||||
F: drivers/rng/msm_rng.c
|
||||
|
||||
ARM LAYERSCAPE SFP
|
||||
M: Sean Anderson <sean.anderson@seco.com>
|
||||
S: Maintained
|
||||
F: drivers/misc/ls2_sfp.c
|
||||
|
||||
ARM MARVELL KIRKWOOD ARMADA-XP ARMADA-38X ARMADA-37XX ARMADA-7K/8K
|
||||
M: Stefan Roese <sr@denx.de>
|
||||
S: Maintained
|
||||
@ -329,35 +270,19 @@ T: git https://source.denx.de/u-boot/custodians/u-boot-marvell.git
|
||||
F: arch/arm/mach-kirkwood/
|
||||
F: arch/arm/mach-mvebu/
|
||||
F: drivers/ata/ahci_mvebu.c
|
||||
F: drivers/clk/mvebu/
|
||||
F: drivers/ddr/marvell/
|
||||
F: drivers/gpio/mvebu_gpio.c
|
||||
F: drivers/i2c/mvtwsi.c
|
||||
F: drivers/mmc/xenon_sdhci.c
|
||||
F: drivers/phy/marvell/
|
||||
F: drivers/pinctrl/mvebu/
|
||||
F: drivers/rtc/armada38x.c
|
||||
F: drivers/spi/kirkwood_spi.c
|
||||
F: drivers/spi/mvebu_a3700_spi.c
|
||||
F: drivers/pci/pcie_dw_mvebu.c
|
||||
F: drivers/watchdog/armada-37xx-wdt.c
|
||||
F: drivers/watchdog/orion_wdt.c
|
||||
F: include/configs/mv-common.h
|
||||
|
||||
ARM MARVELL PCIE CONTROLLER DRIVERS
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
M: Stefan Roese <sr@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-marvell.git
|
||||
F: drivers/pci/pci-aardvark.c
|
||||
F: drivers/pci/pci_mvebu.c
|
||||
F: drivers/pci/pcie_dw_mvebu.c
|
||||
F: drivers/watchdog/orion_wdt.c
|
||||
|
||||
ARM MARVELL SERIAL DRIVERS
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
M: Stefan Roese <sr@denx.de>
|
||||
ARM MARVELL PXA
|
||||
M: Marek Vasut <marex@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-marvell.git
|
||||
F: drivers/serial/serial_mvebu_a3700.c
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-pxa.git
|
||||
F: arch/arm/cpu/pxa/
|
||||
F: arch/arm/include/asm/arch-pxa/
|
||||
|
||||
ARM MEDIATEK
|
||||
M: Ryder Lee <ryder.lee@mediatek.com>
|
||||
@ -372,36 +297,22 @@ F: doc/device-tree-bindings/phy/phy-mtk-*
|
||||
F: doc/device-tree-bindings/usb/mediatek,*
|
||||
F: doc/README.mediatek
|
||||
F: drivers/clk/mediatek/
|
||||
F: drivers/cpu/mtk_cpu.c
|
||||
F: drivers/i2c/mtk_i2c.c
|
||||
F: drivers/mmc/mtk-sd.c
|
||||
F: drivers/phy/phy-mtk-*
|
||||
F: drivers/pinctrl/mediatek/
|
||||
F: drivers/power/domain/mtk-power-domain.c
|
||||
F: drivers/ram/mediatek/
|
||||
F: drivers/spi/mtk_snfi_spi.c
|
||||
F: drivers/spi/mtk_spim.c
|
||||
F: drivers/timer/mtk_timer.c
|
||||
F: drivers/usb/host/xhci-mtk.c
|
||||
F: drivers/usb/mtu3/
|
||||
F: drivers/watchdog/mtk_wdt.c
|
||||
F: drivers/net/mtk_eth.c
|
||||
F: drivers/net/mtk_eth.h
|
||||
F: drivers/reset/reset-mediatek.c
|
||||
F: tools/mtk_image.c
|
||||
F: tools/mtk_image.h
|
||||
F: tools/mtk_nand_headers.c
|
||||
F: tools/mtk_nand_headers.h
|
||||
N: mediatek
|
||||
|
||||
ARM METHODE SUPPORT
|
||||
M: Robert Marko <robert.marko@sartura.hr>
|
||||
S: Maintained
|
||||
F: arch/arm/dts/armada-3720-eDPU*
|
||||
F: arch/arm/dts/armada-3720-uDPU*
|
||||
F: configs/eDPU_defconfig
|
||||
F: configs/uDPU_defconfig
|
||||
|
||||
ARM MICROCHIP/ATMEL AT91
|
||||
M: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
S: Maintained
|
||||
@ -409,21 +320,10 @@ T: git https://source.denx.de/u-boot/custodians/u-boot-atmel.git
|
||||
F: arch/arm/mach-at91/
|
||||
F: board/atmel/
|
||||
F: drivers/cpu/at91_cpu.c
|
||||
F: drivers/memory/atmel-ebi.c
|
||||
F: drivers/misc/microchip_flexcom.c
|
||||
F: drivers/timer/atmel_tcb_timer.c
|
||||
F: include/dt-bindings/mfd/atmel-flexcom.h
|
||||
F: drivers/timer/mchp-pit64b-timer.c
|
||||
|
||||
ARM MSC SM2S IMX8MP SOM
|
||||
M: Martyn Welch <martyn.welch@collabora.com>
|
||||
M: Ian Ray <ian.ray@ge.com>
|
||||
S: Maintained
|
||||
F: arch/arm/dts/imx8mp-msc-sm2s*
|
||||
F: board/msc/sm2s_imx8mp/
|
||||
F: configs/msc_sm2s_imx8mp_defconfig
|
||||
F: include/configs/msc_sm2s_imx8mp.h
|
||||
|
||||
ARM NEXELL S5P4418
|
||||
M: Stefan Bosch <stefan_b@posteo.net>
|
||||
S: Maintained
|
||||
@ -437,7 +337,6 @@ F: drivers/gpio/nx_gpio.c
|
||||
F: drivers/i2c/nx_i2c.c
|
||||
F: drivers/mmc/nexell_dw_mmc_dm.c
|
||||
F: drivers/pinctrl/nexell/
|
||||
F: drivers/serial/serial_s5p4418_pl011.c
|
||||
F: drivers/video/nexell/
|
||||
F: drivers/video/nexell_display.c
|
||||
F: include/configs/s5p4418_nanopi2.h
|
||||
@ -467,9 +366,6 @@ M: Philipp Tomsich <philipp.tomsich@vrull.eu>
|
||||
M: Kever Yang <kever.yang@rock-chips.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-rockchip.git
|
||||
F: arch/arm/dts/rk3*
|
||||
F: arch/arm/dts/rockchip*
|
||||
F: arch/arm/dts/rv1108*
|
||||
F: arch/arm/include/asm/arch-rockchip/
|
||||
F: arch/arm/mach-rockchip/
|
||||
F: board/rockchip/
|
||||
@ -487,7 +383,6 @@ F: tools/rkcommon.h
|
||||
F: tools/rkimage.c
|
||||
F: tools/rksd.c
|
||||
F: tools/rkspi.c
|
||||
N: rockchip
|
||||
|
||||
ARM SAMSUNG
|
||||
M: Minkyu Kang <mk7.kang@samsung.com>
|
||||
@ -497,12 +392,6 @@ F: arch/arm/mach-exynos/
|
||||
F: arch/arm/mach-s5pc1xx/
|
||||
F: arch/arm/cpu/armv7/s5p-common/
|
||||
|
||||
ARM SANCLOUD
|
||||
M: Paul Barker <paul.barker@sancloud.com>
|
||||
R: Marc Murphy <marc.murphy@sancloud.com>
|
||||
S: Supported
|
||||
F: arch/arm/dts/am335x-sancloud*
|
||||
|
||||
ARM SNAPDRAGON
|
||||
M: Ramon Fried <rfried.dev@gmail.com>
|
||||
S: Maintained
|
||||
@ -528,7 +417,7 @@ F: drivers/mmc/sti_sdhci.c
|
||||
F: drivers/reset/sti-reset.c
|
||||
F: drivers/serial/serial_sti_asc.c
|
||||
F: drivers/sysreset/sysreset_sti.c
|
||||
F: drivers/timer/arm_global_timer.c
|
||||
F: drivers/timer/sti-timer.c
|
||||
F: drivers/usb/host/dwc3-sti-glue.c
|
||||
F: include/dwc3-sti-glue.h
|
||||
F: include/dt-bindings/clock/stih407-clks.h
|
||||
@ -544,7 +433,7 @@ S: Maintained
|
||||
F: arch/arm/mach-stm32mp/
|
||||
F: doc/board/st/
|
||||
F: drivers/adc/stm32-adc*
|
||||
F: drivers/clk/stm32/
|
||||
F: drivers/clk/clk_stm32mp1.c
|
||||
F: drivers/gpio/stm32_gpio.c
|
||||
F: drivers/hwspinlock/stm32_hwspinlock.c
|
||||
F: drivers/i2c/stm32f7_i2c.c
|
||||
@ -561,7 +450,6 @@ F: drivers/power/regulator/stpmic1.c
|
||||
F: drivers/ram/stm32mp1/
|
||||
F: drivers/remoteproc/stm32_copro.c
|
||||
F: drivers/reset/stm32-reset.c
|
||||
F: drivers/rng/optee_rng.c
|
||||
F: drivers/rng/stm32mp1_rng.c
|
||||
F: drivers/rtc/stm32_rtc.c
|
||||
F: drivers/serial/serial_stm32.*
|
||||
@ -570,9 +458,10 @@ F: drivers/spi/stm32_spi.c
|
||||
F: drivers/video/stm32/stm32_ltdc.c
|
||||
F: drivers/watchdog/stm32mp_wdt.c
|
||||
F: include/dt-bindings/clock/stm32fx-clock.h
|
||||
F: include/dt-bindings/clock/stm32mp*
|
||||
F: include/dt-bindings/clock/stm32mp1-clks.h
|
||||
F: include/dt-bindings/clock/stm32mp1-clksrc.h
|
||||
F: include/dt-bindings/pinctrl/stm32-pinfunc.h
|
||||
F: include/dt-bindings/reset/stm32mp*
|
||||
F: include/dt-bindings/reset/stm32mp1-resets.h
|
||||
F: include/stm32_rcc.h
|
||||
F: tools/stm32image.c
|
||||
N: stm
|
||||
@ -596,9 +485,7 @@ F: arch/arm/mach-sunxi/
|
||||
F: board/sunxi/
|
||||
F: drivers/clk/sunxi/
|
||||
F: drivers/phy/allwinner/
|
||||
F: drivers/pinctrl/sunxi/
|
||||
F: drivers/video/sunxi/
|
||||
F: tools/sunxi*
|
||||
|
||||
ARM TEGRA
|
||||
M: Tom Warren <twarren@nvidia.com>
|
||||
@ -611,8 +498,6 @@ ARM TI
|
||||
M: Tom Rini <trini@konsulko.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-ti.git
|
||||
F: arch/arm/dts/am57xx*
|
||||
F: arch/arm/dts/dra7*
|
||||
F: arch/arm/mach-davinci/
|
||||
F: arch/arm/mach-k3/
|
||||
F: arch/arm/mach-keystone/
|
||||
@ -632,11 +517,9 @@ F: drivers/phy/omap-usb2-phy.c
|
||||
F: drivers/phy/phy-ti-am654.c
|
||||
F: drivers/phy/ti-pipe3-phy.c
|
||||
F: drivers/ram/k3*
|
||||
F: drivers/remoteproc/ipu_rproc.c
|
||||
F: drivers/remoteproc/k3_system_controller.c
|
||||
F: drivers/remoteproc/pruc_rpoc.c
|
||||
F: drivers/remoteproc/ti*
|
||||
F: drivers/reset/reset-dra7.c
|
||||
F: drivers/reset/reset-ti-sci.c
|
||||
F: drivers/rtc/davinci.c
|
||||
F: drivers/serial/serial_omap.c
|
||||
@ -667,22 +550,13 @@ F: arch/arm/mach-uniphier/
|
||||
F: configs/uniphier_*_defconfig
|
||||
N: uniphier
|
||||
|
||||
ARM VERSAL NET
|
||||
M: Michal Simek <michal.simek@amd.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
F: arch/arm/mach-versal-net/
|
||||
F: drivers/soc/soc_xilinx_versal_net.c
|
||||
N: (?<!uni)versal-net
|
||||
|
||||
ARM VERSAL
|
||||
M: Michal Simek <michal.simek@amd.com>
|
||||
M: Michal Simek <michal.simek@xilinx.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
F: arch/arm/mach-versal/
|
||||
F: drivers/net/xilinx_axi_mrmac.*
|
||||
F: drivers/soc/soc_xilinx_versal.c
|
||||
F: drivers/spi/cadence_ospi_versal.c
|
||||
F: drivers/watchdog/xilinx_wwdt.c
|
||||
N: (?<!uni)versal
|
||||
|
||||
@ -708,10 +582,8 @@ F: drivers/i2c/muxes/pca954x.c
|
||||
F: drivers/i2c/zynq_i2c.c
|
||||
F: drivers/mmc/zynq_sdhci.c
|
||||
F: drivers/mtd/nand/raw/zynq_nand.c
|
||||
F: drivers/net/phy/ethernet_id.c
|
||||
F: drivers/net/phy/xilinx_phy.c
|
||||
F: drivers/net/zynq_gem.c
|
||||
F: drivers/pinctrl/pinctrl-zynqmp.c
|
||||
F: drivers/serial/serial_zynq.c
|
||||
F: drivers/spi/zynq_qspi.c
|
||||
F: drivers/spi/zynq_spi.c
|
||||
@ -722,16 +594,14 @@ F: tools/zynqimage.c
|
||||
N: zynq
|
||||
|
||||
ARM ZYNQMP
|
||||
M: Michal Simek <michal.simek@amd.com>
|
||||
M: Michal Simek <michal.simek@xilinx.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
F: arch/arm/mach-zynqmp/
|
||||
F: drivers/clk/clk_zynqmp.c
|
||||
F: driver/firmware/firmware-zynqmp.c
|
||||
F: drivers/fpga/zynqpl.c
|
||||
F: drivers/gpio/gpio_slg7xl45106.c
|
||||
F: drivers/gpio/zynq_gpio.c
|
||||
F: drivers/gpio/zynqmp_gpio_modepin.c
|
||||
F: drivers/i2c/i2c-cdns.c
|
||||
F: drivers/i2c/muxes/pca954x.c
|
||||
F: drivers/i2c/zynq_i2c.c
|
||||
@ -740,9 +610,6 @@ F: drivers/mmc/zynq_sdhci.c
|
||||
F: drivers/mtd/nand/raw/zynq_nand.c
|
||||
F: drivers/net/phy/xilinx_phy.c
|
||||
F: drivers/net/zynq_gem.c
|
||||
F: drivers/phy/phy-zynqmp.c
|
||||
F: drivers/power/domain/zynqmp-power-domain.c
|
||||
F: drivers/pwm/pwm-cadence-ttc.c
|
||||
F: drivers/serial/serial_zynq.c
|
||||
F: drivers/reset/reset-zynqmp.c
|
||||
F: drivers/rtc/zynqmp_rtc.c
|
||||
@ -750,6 +617,7 @@ F: drivers/soc/soc_xilinx_zynqmp.c
|
||||
F: drivers/spi/zynq_qspi.c
|
||||
F: drivers/spi/zynq_spi.c
|
||||
F: drivers/timer/cadence-ttc.c
|
||||
F: drivers/usb/host/ehci-zynq.c
|
||||
F: drivers/video/seps525.c
|
||||
F: drivers/watchdog/cdns_wdt.c
|
||||
F: include/zynqmppl.h
|
||||
@ -759,7 +627,7 @@ N: ultra96
|
||||
N: zynqmp
|
||||
|
||||
ARM ZYNQMP R5
|
||||
M: Michal Simek <michal.simek@amd.com>
|
||||
M: Michal Simek <michal.simek@xilinx.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
F: arch/arm/mach-zynqmp-r5/
|
||||
@ -771,42 +639,13 @@ S: Maintained
|
||||
F: drivers/pci/pcie_phytium.c
|
||||
F: arch/arm/dts/phytium-durian.dts
|
||||
|
||||
ASPEED FMC SPI DRIVER
|
||||
M: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
|
||||
M: Cédric Le Goater <clg@kaod.org>
|
||||
R: Aspeed BMC SW team <BMC-SW@aspeedtech.com>
|
||||
S: Maintained
|
||||
F: drivers/spi/spi-aspeed-smc.c
|
||||
|
||||
BINMAN
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
M: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
||||
S: Maintained
|
||||
F: tools/binman/
|
||||
|
||||
BOOTDEVICE
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
F: boot/bootdev*.c
|
||||
F: boot/bootflow.c
|
||||
F: boot/bootmeth*.c
|
||||
F: boot/bootstd.c
|
||||
F: cmd/bootdev.c
|
||||
F: cmd/bootflow.c
|
||||
F: doc/develop/bootstd.rst
|
||||
F: doc/usage/bootdev.rst
|
||||
F: doc/usage/bootflow.rst
|
||||
F: doc/usage/bootmeth.rst
|
||||
F: drivers/mmc/mmc_bootdev.c
|
||||
F: include/bootdev.h
|
||||
F: include/bootflow.h
|
||||
F: include/bootmeth.h
|
||||
F: include/bootstd.h
|
||||
F: net/eth_bootdevice.c
|
||||
F: test/boot/
|
||||
|
||||
BTRFS
|
||||
M: Marek Behún <kabel@kernel.org>
|
||||
M: Marek Behun <marek.behun@nic.cz>
|
||||
R: Qu Wenruo <wqu@suse.com>
|
||||
L: linux-btrfs@vger.kernel.org
|
||||
S: Maintained
|
||||
@ -819,11 +658,6 @@ M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
F: tools/buildman/
|
||||
|
||||
CAT
|
||||
M: Roger Knecht <rknecht@pm.me>
|
||||
S: Maintained
|
||||
F: cmd/cat.c
|
||||
|
||||
CFI FLASH
|
||||
M: Stefan Roese <sr@denx.de>
|
||||
S: Maintained
|
||||
@ -847,13 +681,6 @@ T: git https://source.denx.de/u-boot/custodians/u-boot-coldfire.git
|
||||
F: arch/m68k/
|
||||
F: doc/arch/m68k.rst
|
||||
|
||||
CYCLIC
|
||||
M: Stefan Roese <sr@denx.de>
|
||||
S: Maintained
|
||||
F: cmd/cyclic.c
|
||||
F: common/cyclic.c
|
||||
F: include/cyclic.h
|
||||
|
||||
DFU
|
||||
M: Lukasz Majewski <lukma@denx.de>
|
||||
S: Maintained
|
||||
@ -862,6 +689,7 @@ F: cmd/dfu.c
|
||||
F: cmd/usb_*.c
|
||||
F: common/dfu.c
|
||||
F: common/update.c
|
||||
F: common/usb_storage.c
|
||||
F: doc/api/dfu.rst
|
||||
F: doc/usage/dfu.rst
|
||||
F: drivers/dfu/
|
||||
@ -893,17 +721,11 @@ F: test/dm/efi_media.c
|
||||
|
||||
EFI PAYLOAD
|
||||
M: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
M: Ilias Apalodimas <ilias.apalodimas@linaro.org>
|
||||
R: Alexander Graf <agraf@csgraf.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-efi.git
|
||||
F: arch/arm/lib/*_efi.*
|
||||
F: cmd/bootefi.c
|
||||
F: cmd/eficonfig.c
|
||||
F: cmd/efidebug.c
|
||||
F: cmd/nvedit_efi.c
|
||||
F: doc/api/efi.rst
|
||||
F: doc/develop/uefi/*
|
||||
F: doc/mkeficapsule.1
|
||||
F: doc/usage/bootefi.rst
|
||||
F: drivers/rtc/emul_rtc.c
|
||||
F: include/capitalization.h
|
||||
@ -913,7 +735,6 @@ F: include/cp437.h
|
||||
F: include/efi*
|
||||
F: include/pe.h
|
||||
F: include/asm-generic/pe.h
|
||||
F: include/mm_communication.h
|
||||
F: lib/charset.c
|
||||
F: lib/efi*/
|
||||
F: test/lib/efi_*
|
||||
@ -927,6 +748,12 @@ F: tools/efivar.py
|
||||
F: tools/file2include.c
|
||||
F: tools/mkeficapsule.c
|
||||
|
||||
EFI VARIABLES VIA OP-TEE
|
||||
M: Ilias Apalodimas <ilias.apalodimas@linaro.org>
|
||||
S: Maintained
|
||||
F: lib/efi_loader/efi_variable_tee.c
|
||||
F: include/mm_communication.h
|
||||
|
||||
ENVIRONMENT
|
||||
M: Joe Hershberger <joe.hershberger@ni.com>
|
||||
R: Wolfgang Denk <wd@denx.de>
|
||||
@ -937,32 +764,6 @@ F: test/env/
|
||||
F: tools/env*
|
||||
F: tools/mkenvimage.c
|
||||
|
||||
ENVIRONMENT AS TEXT
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
R: Wolfgang Denk <wd@denx.de>
|
||||
S: Maintained
|
||||
F: doc/usage/environment.rst
|
||||
F: scripts/env2string.awk
|
||||
|
||||
EROFS
|
||||
M: Huang Jianan <jnhuang95@gmail.com>
|
||||
L: linux-erofs@lists.ozlabs.org
|
||||
S: Maintained
|
||||
F: cmd/erofs.c
|
||||
F: fs/erofs/
|
||||
F: include/erofs.h
|
||||
F: test/py/tests/test_fs/test_erofs.py
|
||||
|
||||
EVENTS
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
F: cmd/event.c
|
||||
F: common/event.c
|
||||
F: include/event.h
|
||||
F: scripts/event_dump.py
|
||||
F: test/common/event.c
|
||||
F: test/py/tests/test_event_dump.py
|
||||
|
||||
FASTBOOT
|
||||
S: Orphaned
|
||||
F: cmd/fastboot.c
|
||||
@ -976,13 +777,12 @@ F: net/fastboot.c
|
||||
F: test/dm/fastboot.c
|
||||
|
||||
FPGA
|
||||
M: Michal Simek <michal.simek@amd.com>
|
||||
M: Michal Simek <michal.simek@xilinx.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
F: drivers/fpga/
|
||||
F: cmd/fpga.c
|
||||
F: include/fpga.h
|
||||
F: test/dm/fpga.c
|
||||
|
||||
FLATTENED DEVICE TREE
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
@ -1008,12 +808,6 @@ T: git https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq.git
|
||||
F: drivers/watchdog/sp805_wdt.c
|
||||
F: drivers/watchdog/sbsa_gwdt.c
|
||||
|
||||
GATEWORKS_SC
|
||||
M: Tim Harvey <tharvey@gateworks.com>
|
||||
S: Maintained
|
||||
F: drivers/misc/gsc.c
|
||||
F: include/gsc.h
|
||||
|
||||
I2C
|
||||
M: Heiko Schocher <hs@denx.de>
|
||||
S: Maintained
|
||||
@ -1022,7 +816,7 @@ F: drivers/i2c/
|
||||
|
||||
KWBIMAGE / KWBOOT TOOLS
|
||||
M: Pali Rohár <pali@kernel.org>
|
||||
M: Marek Behún <kabel@kernel.org>
|
||||
M: Marek Behún <marek.behun@nic.cz>
|
||||
M: Stefan Roese <sr@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-marvell.git
|
||||
@ -1030,12 +824,6 @@ F: doc/README.kwbimage
|
||||
F: doc/kwboot.1
|
||||
F: tools/kwb*
|
||||
|
||||
LED
|
||||
M: Ivan Vozvakhov <i.vozvakhov@vk.team>
|
||||
S: Supported
|
||||
F: doc/device-tree-bindings/leds/leds-pwm.txt
|
||||
F: drivers/led/led_pwm.c
|
||||
|
||||
LOGGING
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
@ -1067,7 +855,6 @@ F: drivers/net/xilinx_emaclite.c
|
||||
F: drivers/serial/serial_xuartlite.c
|
||||
F: drivers/spi/xilinx_spi.c
|
||||
F: drivers/sysreset/sysreset_gpio.c
|
||||
F: drivers/timer/xilinx-timer.c
|
||||
F: drivers/watchdog/xilinx_tb_wdt.c
|
||||
N: xilinx
|
||||
|
||||
@ -1099,23 +886,15 @@ R: GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>
|
||||
S: Maintained
|
||||
F: arch/mips/mach-mtmips/
|
||||
F: arch/mips/dts/mt7620.dtsi
|
||||
F: arch/mips/dts/mt7621.dtsi
|
||||
F: arch/mips/dts/mt7620-u-boot.dtsi
|
||||
F: arch/mips/dts/mt7621-u-boot.dtsi
|
||||
F: include/configs/mt7620.h
|
||||
F: include/configs/mt7621.h
|
||||
F: include/dt-bindings/clock/mt7620-clk.h
|
||||
F: include/dt-bindings/clock/mt7621-clk.h
|
||||
F: include/dt-bindings/clock/mt7628-clk.h
|
||||
F: include/dt-bindings/reset/mt7620-reset.h
|
||||
F: include/dt-bindings/reset/mt7621-reset.h
|
||||
F: include/dt-bindings/reset/mt7628-reset.h
|
||||
F: drivers/clk/mtmips/
|
||||
F: drivers/pinctrl/mtmips/
|
||||
F: drivers/gpio/mt7620_gpio.c
|
||||
F: drivers/mtd/nand/raw/mt7621_nand.c
|
||||
F: drivers/mtd/nand/raw/mt7621_nand.h
|
||||
F: drivers/mtd/nand/raw/mt7621_nand_spl.c
|
||||
F: drivers/net/mt7620-eth.c
|
||||
F: drivers/phy/mt7620-usb-phy.c
|
||||
F: drivers/reset/reset-mtmips.c
|
||||
@ -1164,12 +943,17 @@ T: git https://source.denx.de/u-boot/custodians/u-boot-mmc.git
|
||||
F: drivers/mmc/
|
||||
|
||||
NAND FLASH
|
||||
M: Dario Binacchi <dario.binacchi@amarulasolutions.com>
|
||||
M: Michael Trimarchi <michael@amarulasolutions.com>
|
||||
S: Maintained
|
||||
#M: Scott Wood <oss@buserror.net>
|
||||
S: Orphaned (Since 2018-07)
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-nand-flash.git
|
||||
F: drivers/mtd/nand/raw/
|
||||
|
||||
NDS32
|
||||
M: Rick Chen <rick@andestech.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-nds32.git
|
||||
F: arch/nds32/
|
||||
|
||||
NETWORK
|
||||
M: Joe Hershberger <joe.hershberger@ni.com>
|
||||
M: Ramon Fried <rfried.dev@gmail.com>
|
||||
@ -1193,14 +977,6 @@ F: cmd/nvme.c
|
||||
F: include/nvme.h
|
||||
F: doc/develop/driver-model/nvme.rst
|
||||
|
||||
NVMEM
|
||||
M: Sean Anderson <seanga2@gmail.com>
|
||||
S: Maintained
|
||||
F: doc/api/nvmem.rst
|
||||
F: drivers/misc/nvmem.c
|
||||
F: drivers/reboot-mode/reboot-mode-nvmem.c
|
||||
F: include/nvmem.h
|
||||
|
||||
NXP C45 TJA11XX PHY DRIVER
|
||||
M: Radu Pirea <radu-nicolae.pirea@oss.nxp.com>
|
||||
S: Maintained
|
||||
@ -1276,7 +1052,7 @@ F: arch/powerpc/cpu/mpc83xx/
|
||||
F: arch/powerpc/include/asm/arch-mpc83xx/
|
||||
|
||||
POWERPC MPC85XX
|
||||
M: Marek Behún <kabel@kernel.org>
|
||||
M: Priyanka Jain <priyanka.jain@nxp.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-mpc85xx.git
|
||||
F: arch/powerpc/cpu/mpc85xx/
|
||||
@ -1294,14 +1070,14 @@ F: drivers/timer/andes_plmt_timer.c
|
||||
F: drivers/timer/sifive_clint_timer.c
|
||||
F: tools/prelink-riscv.c
|
||||
|
||||
RISC-V CANAAN KENDRYTE K210
|
||||
RISC-V KENDRYTE
|
||||
M: Sean Anderson <seanga2@gmail.com>
|
||||
S: Maintained
|
||||
F: doc/device-tree-bindings/mfd/canaan,k210-sysctl.txt
|
||||
F: doc/device-tree-bindings/pinctrl/canaan,k210-fpioa.txt
|
||||
F: drivers/clk/clk_k210.c
|
||||
F: drivers/pinctrl/pinctrl-k210.c
|
||||
F: include/k210/
|
||||
F: doc/device-tree-bindings/mfd/kendryte,k210-sysctl.txt
|
||||
F: doc/device-tree-bindings/pinctrl/kendryte,k210-fpioa.txt
|
||||
F: drivers/clk/clk_kendryte.c
|
||||
F: drivers/pinctrl/pinctrl-kendryte.c
|
||||
F: include/kendryte/
|
||||
|
||||
RNG
|
||||
M: Sughosh Ganu <sughosh.ganu@linaro.org>
|
||||
@ -1327,11 +1103,6 @@ F: arch/sandbox/
|
||||
F: doc/arch/sandbox.rst
|
||||
F: include/dt-bindings/*/sandbox*.h
|
||||
|
||||
SEMIHOSTING
|
||||
R: Sean Anderson <sean.anderson@seco.com>
|
||||
S: Orphaned
|
||||
N: semihosting
|
||||
|
||||
SETEXPR
|
||||
M: Roland Gaudig <roland.gaudig@weidmueller.com>
|
||||
S: Maintained
|
||||
@ -1345,18 +1116,6 @@ S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-sh.git
|
||||
F: arch/sh/
|
||||
|
||||
SL28CLPD
|
||||
M: Michael Walle <michael@walle.cc>
|
||||
S: Maintained
|
||||
F: drivers/gpio/sl28cpld-gpio.c
|
||||
F: drivers/misc/sl28cpld.c
|
||||
F: drivers/watchdog/sl28cpld-wdt.c
|
||||
|
||||
SMCCC TRNG
|
||||
M: Etienne Carriere <etienne.carriere@linaro.org>
|
||||
S: Maintained
|
||||
F: drivers/rng/smccc_trng.c
|
||||
|
||||
SPI
|
||||
M: Jagan Teki <jagan@amarulasolutions.com>
|
||||
S: Maintained
|
||||
@ -1380,7 +1139,7 @@ F: drivers/spmi/
|
||||
F: include/spmi/
|
||||
|
||||
SQUASHFS
|
||||
M: Joao Marcos Costa <jmcosta944@gmail.com>
|
||||
M: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
|
||||
R: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
R: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
S: Maintained
|
||||
@ -1431,7 +1190,6 @@ F: arch/arm/mach-k3/config_secure.mk
|
||||
F: configs/am335x_hs_evm_defconfig
|
||||
F: configs/am335x_hs_evm_uart_defconfig
|
||||
F: configs/am43xx_hs_evm_defconfig
|
||||
F: configs/am43xx_hs_evm_qspi_defconfig
|
||||
F: configs/am57xx_hs_evm_defconfig
|
||||
F: configs/am57xx_hs_evm_usb_defconfig
|
||||
F: configs/dra7xx_hs_evm_defconfig
|
||||
@ -1442,12 +1200,8 @@ F: configs/k2g_hs_evm_defconfig
|
||||
F: configs/k2l_hs_evm_defconfig
|
||||
F: configs/am65x_hs_evm_r5_defconfig
|
||||
F: configs/am65x_hs_evm_a53_defconfig
|
||||
F: configs/j7200_hs_evm_a72_defconfig
|
||||
F: configs/j7200_hs_evm_r5_defconfig
|
||||
F: configs/j721e_hs_evm_a72_defconfig
|
||||
F: configs/j721e_hs_evm_r5_defconfig
|
||||
F: configs/j721s2_hs_evm_a72_defconfig
|
||||
F: configs/j721s2_hs_evm_r5_defconfig
|
||||
F: configs/j721e_hs_evm_a72_defconfig
|
||||
|
||||
TPM DRIVERS
|
||||
M: Ilias Apalodimas <ilias.apalodimas@linaro.org>
|
||||
@ -1490,7 +1244,6 @@ T: git https://source.denx.de/u-boot/custodians/u-boot-usb.git
|
||||
F: drivers/usb/
|
||||
F: common/usb.c
|
||||
F: common/usb_kbd.c
|
||||
F: common/usb_storage.c
|
||||
F: include/usb.h
|
||||
|
||||
USB xHCI
|
||||
@ -1505,6 +1258,8 @@ M: Anatolij Gustschin <agust@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-video.git
|
||||
F: drivers/video/
|
||||
F: common/lcd*.c
|
||||
F: include/lcd*.h
|
||||
F: include/video*.h
|
||||
|
||||
VirtIO
|
||||
@ -1519,14 +1274,6 @@ F: include/virtio*.h
|
||||
F: test/dm/virtio.c
|
||||
F: doc/develop/driver-model/virtio.rst
|
||||
|
||||
WATCHDOG
|
||||
M: Stefan Roese <sr@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-watchdog.git
|
||||
F: cmd/wdt.c
|
||||
F: drivers/watchdog/
|
||||
F: include/watchdog*.h
|
||||
|
||||
X86
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
M: Bin Meng <bmeng.cn@gmail.com>
|
||||
@ -1536,7 +1283,7 @@ F: arch/x86/
|
||||
F: cmd/x86/
|
||||
|
||||
XEN
|
||||
M: Anastasiia Lukianenko <vicooodin@gmail.com>
|
||||
M: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
|
||||
M: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
|
||||
S: Maintained
|
||||
F: arch/arm/cpu/armv8/xen/
|
||||
@ -1556,13 +1303,6 @@ M: Max Filippov <jcmvbkbc@gmail.com>
|
||||
S: Maintained
|
||||
F: arch/xtensa/
|
||||
|
||||
XXD
|
||||
M: Roger Knecht <rknecht@pm.me>
|
||||
S: Maintained
|
||||
F: cmd/xxd.c
|
||||
F: doc/usage/cmd/xxd.rst
|
||||
F: test/py/tests/test_xxd/
|
||||
|
||||
THE REST
|
||||
M: Tom Rini <trini@konsulko.com>
|
||||
L: u-boot@lists.denx.de
|
||||
@ -1572,10 +1312,3 @@ T: git https://source.denx.de/u-boot/u-boot.git
|
||||
F: configs/tools-only_defconfig
|
||||
F: *
|
||||
F: */
|
||||
|
||||
CAAM
|
||||
M: Gaurav Jain <gaurav.jain@nxp.com>
|
||||
S: Maintained
|
||||
F: arch/arm/dts/ls1021a-twr-u-boot.dtsi
|
||||
F: drivers/crypto/fsl/
|
||||
F: include/fsl_sec.h
|
||||
|
409
Makefile
409
Makefile
@ -1,9 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
VERSION = 2023
|
||||
VERSION = 2022
|
||||
PATCHLEVEL = 01
|
||||
SUBLEVEL =
|
||||
EXTRAVERSION =
|
||||
EXTRAVERSION = -rc3
|
||||
NAME =
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@ -21,7 +21,7 @@ include include/host_arch.h
|
||||
ifeq ("", "$(CROSS_COMPILE)")
|
||||
MK_ARCH="${shell uname -m}"
|
||||
else
|
||||
MK_ARCH="${shell echo $(CROSS_COMPILE) | sed -n 's/^[[:space:]]*\([^\/]*\/\)*\([^-]*\)-[^[:space:]]*/\2/p'}"
|
||||
MK_ARCH="${shell echo $(CROSS_COMPILE) | sed -n 's/^\s*\([^\/]*\/\)*\([^-]*\)-\S*/\2/p'}"
|
||||
endif
|
||||
unexport HOST_ARCH
|
||||
ifeq ("x86_64", $(MK_ARCH))
|
||||
@ -30,7 +30,7 @@ else ifneq (,$(findstring $(MK_ARCH), "i386" "i486" "i586" "i686"))
|
||||
export HOST_ARCH=$(HOST_ARCH_X86)
|
||||
else ifneq (,$(findstring $(MK_ARCH), "aarch64" "armv8l"))
|
||||
export HOST_ARCH=$(HOST_ARCH_AARCH64)
|
||||
else ifneq (,$(findstring $(MK_ARCH), "arm" "armv7" "armv7a" "armv7l"))
|
||||
else ifneq (,$(findstring $(MK_ARCH), "arm" "armv7" "armv7l"))
|
||||
export HOST_ARCH=$(HOST_ARCH_ARM)
|
||||
else ifeq ("riscv32", $(MK_ARCH))
|
||||
export HOST_ARCH=$(HOST_ARCH_RISCV32)
|
||||
@ -517,12 +517,10 @@ version_h := include/generated/version_autogenerated.h
|
||||
timestamp_h := include/generated/timestamp_autogenerated.h
|
||||
defaultenv_h := include/generated/defaultenv_autogenerated.h
|
||||
dt_h := include/generated/dt.h
|
||||
env_h := include/generated/environment.h
|
||||
|
||||
no-dot-config-targets := clean clobber mrproper distclean \
|
||||
help %docs check% coccicheck \
|
||||
ubootversion backup tests check pcheck qcheck tcheck \
|
||||
pylint pylint_err
|
||||
ubootversion backup tests check qcheck tcheck
|
||||
|
||||
config-targets := 0
|
||||
mixed-targets := 0
|
||||
@ -643,13 +641,6 @@ export CFLAGS_EFI # Compiler flags to add when building EFI app
|
||||
export CFLAGS_NON_EFI # Compiler flags to remove when building EFI app
|
||||
export EFI_TARGET # binutils target if EFI is natively supported
|
||||
|
||||
export LTO_ENABLE
|
||||
|
||||
# This is y if LTO is enabled for this build. See NO_LTO=1 to disable LTO
|
||||
ifeq ($(NO_LTO),)
|
||||
LTO_ENABLE=$(if $(CONFIG_LTO),y)
|
||||
endif
|
||||
|
||||
# If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
|
||||
# that (or fail if absent). Otherwise, search for a linker script in a
|
||||
# standard location.
|
||||
@ -680,15 +671,6 @@ else
|
||||
include/config/auto.conf: ;
|
||||
endif # $(dot-config)
|
||||
|
||||
ifdef CONFIG_CC_OPTIMIZE_FOR_DEBUG
|
||||
KBUILD_HOSTCFLAGS := -Wall -Wstrict-prototypes -Og -g -fomit-frame-pointer \
|
||||
$(HOST_LFS_CFLAGS) $(HOSTCFLAGS)
|
||||
# Avoid false positives -Wmaybe-uninitialized
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394
|
||||
KBUILD_HOSTCFLAGS += -Wno-maybe-uninitialized
|
||||
KBUILD_HOSTCXXFLAGS := -Og -g $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS)
|
||||
endif
|
||||
|
||||
#
|
||||
# Xtensa linker script cannot be preprocessed with -ansi because of
|
||||
# preprocessor operations on strings that don't make C identifiers.
|
||||
@ -699,32 +681,23 @@ endif
|
||||
|
||||
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||
KBUILD_CFLAGS += -Os
|
||||
endif
|
||||
|
||||
ifdef CONFIG_CC_OPTIMIZE_FOR_SPEED
|
||||
else
|
||||
KBUILD_CFLAGS += -O2
|
||||
endif
|
||||
|
||||
ifdef CONFIG_CC_OPTIMIZE_FOR_DEBUG
|
||||
KBUILD_CFLAGS += -Og -Wno-maybe-uninitialized
|
||||
# Avoid false positives -Wmaybe-uninitialized
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394
|
||||
KBUILD_CFLAGS += -Wno-maybe-uninitialized
|
||||
endif
|
||||
|
||||
LTO_CFLAGS :=
|
||||
LTO_FINAL_LDFLAGS :=
|
||||
export LTO_CFLAGS LTO_FINAL_LDFLAGS
|
||||
ifeq ($(LTO_ENABLE),y)
|
||||
ifdef CONFIG_LTO
|
||||
ifeq ($(cc-name),clang)
|
||||
LTO_CFLAGS += -DLTO_ENABLE -flto
|
||||
LTO_CFLAGS += -flto
|
||||
LTO_FINAL_LDFLAGS += -flto
|
||||
|
||||
AR = $(shell $(CC) -print-prog-name=llvm-ar)
|
||||
NM = $(shell $(CC) -print-prog-name=llvm-nm)
|
||||
else
|
||||
NPROC := $(shell nproc 2>/dev/null || echo 1)
|
||||
LTO_CFLAGS += -DLTO_ENABLE -flto=$(NPROC)
|
||||
LTO_CFLAGS += -flto=$(NPROC)
|
||||
LTO_FINAL_LDFLAGS += -fuse-linker-plugin -flto=$(NPROC)
|
||||
|
||||
# use plugin aware tools
|
||||
@ -761,10 +734,10 @@ KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized)
|
||||
# change __FILE__ to the relative path from the srctree
|
||||
KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
|
||||
|
||||
KBUILD_CFLAGS += -gdwarf-4
|
||||
KBUILD_CFLAGS += -g
|
||||
# $(KBUILD_AFLAGS) sets -g, which causes gcc to pass a suitable -g<format>
|
||||
# option to the assembler.
|
||||
KBUILD_AFLAGS += -gdwarf-4
|
||||
KBUILD_AFLAGS += -g
|
||||
|
||||
# Report stack usage if supported
|
||||
# ARC tools based on GCC 7.1 has an issue with stack usage
|
||||
@ -806,8 +779,6 @@ KBUILD_CPPFLAGS += $(KCPPFLAGS)
|
||||
KBUILD_AFLAGS += $(KAFLAGS)
|
||||
KBUILD_CFLAGS += $(KCFLAGS)
|
||||
|
||||
KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
|
||||
|
||||
KBUILD_HOSTCFLAGS += $(if $(CONFIG_TOOLS_DEBUG),-g)
|
||||
|
||||
# Use UBOOTINCLUDE when you must reference the include/ directory.
|
||||
@ -862,13 +833,12 @@ libs-y += drivers/usb/host/
|
||||
libs-y += drivers/usb/mtu3/
|
||||
libs-y += drivers/usb/musb/
|
||||
libs-y += drivers/usb/musb-new/
|
||||
libs-y += drivers/usb/isp1760/
|
||||
libs-y += drivers/usb/phy/
|
||||
libs-y += drivers/usb/ulpi/
|
||||
ifdef CONFIG_POST
|
||||
libs-y += post/
|
||||
endif
|
||||
libs-$(CONFIG_$(SPL_TPL_)UNIT_TEST) += test/
|
||||
libs-$(CONFIG_UNIT_TEST) += test/
|
||||
libs-$(CONFIG_UT_ENV) += test/env/
|
||||
libs-$(CONFIG_UT_OPTEE) += test/optee/
|
||||
libs-$(CONFIG_UT_OVERLAY) += test/overlay/
|
||||
@ -933,21 +903,17 @@ else
|
||||
TPL_SIZE_CHECK =
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_VPL_SIZE_LIMIT),0x0)
|
||||
VPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_VPL_SIZE_LIMIT))
|
||||
else
|
||||
VPL_SIZE_CHECK =
|
||||
endif
|
||||
|
||||
# Statically apply RELA-style relocations (currently arm64 only)
|
||||
# This is useful for arm64 where static relocation needs to be performed on
|
||||
# the raw binary, but certain simulators only accept an ELF file (but don't
|
||||
# do the relocation).
|
||||
ifneq ($(CONFIG_STATIC_RELA),)
|
||||
# $(2) is u-boot ELF, $(3) is u-boot bin, $(4) is text base
|
||||
# $(1) is u-boot ELF, $(2) is u-boot bin, $(3) is text base
|
||||
quiet_cmd_static_rela = RELOC $@
|
||||
cmd_static_rela = \
|
||||
tools/relocate-rela $(3) $(2)
|
||||
start=$$($(NM) $(2) | grep __rel_dyn_start | cut -f 1 -d ' '); \
|
||||
end=$$($(NM) $(2) | grep __rel_dyn_end | cut -f 1 -d ' '); \
|
||||
tools/relocate-rela $(3) $(4) $$start $$end
|
||||
else
|
||||
quiet_cmd_static_rela =
|
||||
cmd_static_rela =
|
||||
@ -977,10 +943,8 @@ INPUTS-$(CONFIG_SPL_FRAMEWORK) += u-boot.img
|
||||
endif
|
||||
endif
|
||||
INPUTS-$(CONFIG_TPL) += tpl/u-boot-tpl.bin
|
||||
INPUTS-$(CONFIG_VPL) += vpl/u-boot-vpl.bin
|
||||
|
||||
# Allow omitting the .dtb output if it is not normally used
|
||||
INPUTS-$(CONFIG_OF_SEPARATE) += $(if $(CONFIG_OF_OMIT_DTB),dts/dt.dtb,u-boot.dtb)
|
||||
INPUTS-$(CONFIG_OF_SEPARATE) += u-boot.dtb
|
||||
INPUTS-$(CONFIG_BINMAN_STANDALONE_FDT) += u-boot.dtb
|
||||
ifeq ($(CONFIG_SPL_FRAMEWORK),y)
|
||||
INPUTS-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img
|
||||
endif
|
||||
@ -1006,12 +970,22 @@ ifeq ($(CONFIG_INIT_SP_RELATIVE)$(CONFIG_OF_SEPARATE),yy)
|
||||
INPUTS-y += init_sp_bss_offset_check
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_ROCKCHIP)$(CONFIG_SPL),yy)
|
||||
# Binman image dependencies
|
||||
ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
|
||||
INPUTS-y += u-boot-with-dtb.bin
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_ROCKCHIP),y)
|
||||
# On ARM64 this target is produced by binman so we don't need this dep
|
||||
ifeq ($(CONFIG_ARM64),y)
|
||||
INPUTS-y += u-boot.itb
|
||||
ifeq ($(CONFIG_SPL),y)
|
||||
# TODO: Get binman to generate this too
|
||||
INPUTS-y += u-boot-rockchip.bin
|
||||
endif
|
||||
else
|
||||
INPUTS-y += u-boot.img
|
||||
ifeq ($(CONFIG_SPL),y)
|
||||
# Generate these inputs for binman which will create the output files
|
||||
INPUTS-y += idbloader.img u-boot.img
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -1025,12 +999,12 @@ LDFLAGS_u-boot += $(LDFLAGS_FINAL)
|
||||
LDFLAGS_u-boot += $(call ld-option, --no-dynamic-linker)
|
||||
|
||||
# ld.lld support
|
||||
LDFLAGS_u-boot += -z notext $(call ld-option,--apply-dynamic-relocs)
|
||||
LDFLAGS_u-boot += -z notext
|
||||
|
||||
LDFLAGS_u-boot += --build-id=none
|
||||
|
||||
ifeq ($(CONFIG_ARC)$(CONFIG_NIOS2)$(CONFIG_X86)$(CONFIG_XTENSA),)
|
||||
LDFLAGS_u-boot += -Ttext $(CONFIG_TEXT_BASE)
|
||||
LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
|
||||
endif
|
||||
|
||||
# insure the checker run with the right endianness
|
||||
@ -1075,9 +1049,9 @@ cmd_lzma = lzma -c -z -k -9 $< > $@
|
||||
|
||||
cfg: u-boot.cfg
|
||||
|
||||
quiet_cmd_ofcheck = OFCHK $2
|
||||
cmd_ofcheck = $(srctree)/scripts/check-of.sh $2 \
|
||||
$(srctree)/scripts/of_allowlist.txt
|
||||
quiet_cmd_cfgcheck = CFGCHK $2
|
||||
cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
|
||||
$(srctree)/scripts/config_whitelist.txt $(srctree)
|
||||
|
||||
# Concat the value of all the CONFIGs (result is 'y' or 'yy', etc. )
|
||||
got = $(foreach cfg,$(1),$($(cfg)))
|
||||
@ -1100,20 +1074,23 @@ define deprecated
|
||||
echo >&2 "for $(2)). Please update the board to use"; \
|
||||
echo >&2 "$(firstword $(1)) before the $(3) release. Failure to"; \
|
||||
echo >&2 "update by the deadline may result in board removal."; \
|
||||
echo >&2 "See doc/develop/driver-model/migration.rst for more info."; \
|
||||
echo >&2 "See doc/driver-model/migration.rst for more info."; \
|
||||
echo >&2 "===================================================="; \
|
||||
fi; fi
|
||||
|
||||
endef
|
||||
|
||||
# Timestamp file to make sure that binman always runs
|
||||
.binman_stamp: $(INPUTS-y) FORCE
|
||||
PHONY += inputs
|
||||
inputs: $(INPUTS-y)
|
||||
|
||||
all: .binman_stamp inputs
|
||||
ifeq ($(CONFIG_BINMAN),y)
|
||||
$(call if_changed,binman)
|
||||
endif
|
||||
@touch $@
|
||||
|
||||
all: .binman_stamp
|
||||
# Timestamp file to make sure that binman always runs
|
||||
.binman_stamp: FORCE
|
||||
@touch $@
|
||||
|
||||
ifeq ($(CONFIG_DEPRECATED),y)
|
||||
$(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.")
|
||||
@ -1123,7 +1100,7 @@ ifeq ($(CONFIG_OF_EMBED)$(CONFIG_EFI_APP),y)
|
||||
@echo >&2 "CONFIG_OF_EMBED is enabled. This option should only"
|
||||
@echo >&2 "be used for debugging purposes. Please use"
|
||||
@echo >&2 "CONFIG_OF_SEPARATE for boards in mainline."
|
||||
@echo >&2 "See doc/develop/devicetree/control.rst for more info."
|
||||
@echo >&2 "See doc/README.fdt-control for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
ifneq ($(CONFIG_SPL_FIT_GENERATOR),)
|
||||
@ -1132,19 +1109,23 @@ ifneq ($(CONFIG_SPL_FIT_GENERATOR),)
|
||||
@echo >&2 "to binman instead, to avoid the proliferation of"
|
||||
@echo >&2 "arch-specific scripts with no tests."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
ifneq ($(CONFIG_DM),y)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@echo >&2 "This board does not use CONFIG_DM. CONFIG_DM will be"
|
||||
@echo >&2 "compulsory starting with the v2020.01 release."
|
||||
@echo >&2 "Failure to update may result in board removal."
|
||||
@echo >&2 "See doc/driver-model/migration.rst for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
$(call deprecated,CONFIG_WDT,DM watchdog,v2019.10,\
|
||||
$(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG))
|
||||
$(call deprecated,CONFIG_DM_ETH,Ethernet drivers,v2020.07,$(CONFIG_NET))
|
||||
$(call deprecated,CONFIG_DM_I2C,I2C drivers,v2022.04,$(CONFIG_SYS_I2C_LEGACY))
|
||||
@# CFG_SYS_TIMER_RATE has brackets in it for some boards which
|
||||
@# confuses this rule. Use if() to send just a single character which
|
||||
@# is enable to tell 'deprecated' that one of these symbols exists
|
||||
$(call deprecated,CONFIG_TIMER,Timer drivers,v2023.01,$(if $(strip $(CFG_SYS_TIMER_RATE)$(CFG_SYS_TIMER_COUNTER)),x))
|
||||
$(call deprecated,CONFIG_DM_SERIAL,Serial drivers,v2023.04,$(CONFIG_SERIAL))
|
||||
$(call deprecated,CONFIG_DM_SCSI,SCSI drivers,v2023.04,$(CONFIG_SCSI))
|
||||
@# Check that this build does not override OF_HAS_PRIOR_STAGE by
|
||||
@# disabling OF_BOARD.
|
||||
$(call cmd,ofcheck,$(KCONFIG_CONFIG))
|
||||
@# Check that this build does not use CONFIG options that we do not
|
||||
@# know about unless they are in Kconfig. All the existing CONFIG
|
||||
@# options are whitelisted, so new ones should not be added.
|
||||
$(call cmd,cfgcheck,u-boot.cfg)
|
||||
|
||||
PHONY += dtbs
|
||||
dtbs: dts/dt.dtb
|
||||
@ -1198,16 +1179,13 @@ u-boot.bin: u-boot-fit-dtb.bin FORCE
|
||||
u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
|
||||
$(call if_changed,cat)
|
||||
|
||||
else ifeq ($(CONFIG_OF_SEPARATE).$(CONFIG_OF_OMIT_DTB),y.)
|
||||
else ifeq ($(CONFIG_OF_SEPARATE),y)
|
||||
u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
|
||||
$(call if_changed,cat)
|
||||
|
||||
ifneq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy)
|
||||
u-boot.bin: u-boot-dtb.bin FORCE
|
||||
$(call if_changed,copy)
|
||||
endif
|
||||
|
||||
else ifneq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy)
|
||||
else
|
||||
u-boot.bin: u-boot-nodtb.bin FORCE
|
||||
$(call if_changed,copy)
|
||||
endif
|
||||
@ -1255,7 +1233,7 @@ spl/u-boot-spl.srec: spl/u-boot-spl FORCE
|
||||
|
||||
OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \
|
||||
$(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) \
|
||||
$(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),$(if $(CONFIG_OF_SEPARATE),-R .bootpg -R .resetvec))
|
||||
$(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),-R .bootpg -R .resetvec)
|
||||
|
||||
binary_size_check: u-boot-nodtb.bin FORCE
|
||||
@file_size=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \
|
||||
@ -1302,7 +1280,7 @@ shell_cmd = { $(call echo-cmd,$(1)) $(cmd_$(1)); }
|
||||
|
||||
quiet_cmd_objcopy_uboot = OBJCOPY $@
|
||||
ifdef cmd_static_rela
|
||||
cmd_objcopy_uboot = $(cmd_objcopy) && $(call shell_cmd,static_rela,$<,$@,$(CONFIG_TEXT_BASE)) || { rm -f $@; false; }
|
||||
cmd_objcopy_uboot = $(cmd_objcopy) && $(call shell_cmd,static_rela,$<,$@,$(CONFIG_SYS_TEXT_BASE)) || { rm -f $@; false; }
|
||||
else
|
||||
cmd_objcopy_uboot = $(cmd_objcopy)
|
||||
endif
|
||||
@ -1324,16 +1302,12 @@ default_dt := $(if $(DEVICE_TREE),$(DEVICE_TREE),$(CONFIG_DEFAULT_DEVICE_TREE))
|
||||
|
||||
quiet_cmd_binman = BINMAN $@
|
||||
cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
|
||||
$(foreach f,$(BINMAN_TOOLPATHS),--toolpath $(f)) \
|
||||
--toolpath $(objtree)/tools \
|
||||
$(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \
|
||||
build -u -d u-boot.dtb -O . -m \
|
||||
$(if $(BINMAN_ALLOW_MISSING),--allow-missing --ignore-missing) \
|
||||
build -u -d u-boot.dtb -O . -m --allow-missing \
|
||||
-I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
|
||||
-I arch/$(ARCH)/dts -a of-list=$(CONFIG_OF_LIST) \
|
||||
$(foreach f,$(BINMAN_INDIRS),-I $(f)) \
|
||||
-a atf-bl31-path=${BL31} \
|
||||
-a tee-os-path=${TEE} \
|
||||
-a opensbi-path=${OPENSBI} \
|
||||
-a default-dt=$(default_dt) \
|
||||
-a scp-path=$(SCP) \
|
||||
@ -1341,7 +1315,6 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
|
||||
-a tpl-bss-pad=$(if $(CONFIG_TPL_SEPARATE_BSS),,1) \
|
||||
-a spl-dtb=$(CONFIG_SPL_OF_REAL) \
|
||||
-a tpl-dtb=$(CONFIG_TPL_OF_REAL) \
|
||||
-a pre-load-key-path=${PRE_LOAD_KEY_PATH} \
|
||||
$(BINMAN_$(@F))
|
||||
|
||||
OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex
|
||||
@ -1355,8 +1328,8 @@ u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
|
||||
# U-Boot entry point, needed for booting of full-blown U-Boot
|
||||
# from the SPL U-Boot version.
|
||||
#
|
||||
ifndef CFG_SYS_UBOOT_START
|
||||
CFG_SYS_UBOOT_START := $(CONFIG_TEXT_BASE)
|
||||
ifndef CONFIG_SYS_UBOOT_START
|
||||
CONFIG_SYS_UBOOT_START := $(CONFIG_SYS_TEXT_BASE)
|
||||
endif
|
||||
|
||||
# Boards with more complex image requirements can provide an .its source file
|
||||
@ -1381,7 +1354,7 @@ endif
|
||||
|
||||
ifdef CONFIG_SPL_LOAD_FIT
|
||||
MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
|
||||
-a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
|
||||
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
|
||||
-p $(CONFIG_FIT_EXTERNAL_OFFSET) \
|
||||
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
|
||||
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(DEVICE_TREE))) \
|
||||
@ -1389,10 +1362,10 @@ MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
|
||||
$(patsubst %,-b arch/$(ARCH)/dts/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST)))
|
||||
else
|
||||
MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
|
||||
-a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
|
||||
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
|
||||
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
|
||||
MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \
|
||||
-a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
|
||||
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
|
||||
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
|
||||
u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log
|
||||
endif
|
||||
@ -1411,19 +1384,23 @@ KWD_CONFIG_FILE = $(shell \
|
||||
fi)
|
||||
|
||||
MKIMAGEFLAGS_u-boot.kwb = -n $(KWD_CONFIG_FILE) \
|
||||
-T kwbimage -a $(CONFIG_TEXT_BASE) -e $(CONFIG_TEXT_BASE)
|
||||
-T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE)
|
||||
|
||||
MKIMAGEFLAGS_u-boot-with-spl.kwb = -n $(KWD_CONFIG_FILE) \
|
||||
-T kwbimage -a $(CONFIG_TEXT_BASE) -e $(CONFIG_TEXT_BASE) \
|
||||
MKIMAGEFLAGS_u-boot-spl.kwb = -n $(KWD_CONFIG_FILE) \
|
||||
-T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \
|
||||
$(if $(KEYDIR),-k $(KEYDIR))
|
||||
|
||||
MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
|
||||
-R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -A $(ARCH) -T pblimage
|
||||
-R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage
|
||||
|
||||
ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
|
||||
UBOOT_BIN := u-boot-with-dtb.bin
|
||||
else
|
||||
UBOOT_BIN := u-boot.bin
|
||||
endif
|
||||
|
||||
MKIMAGEFLAGS_u-boot-lzma.img = -A $(ARCH) -T standalone -C lzma -O u-boot \
|
||||
-a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
|
||||
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
|
||||
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
|
||||
|
||||
u-boot.bin.lzma: u-boot.bin FORCE
|
||||
@ -1434,7 +1411,7 @@ u-boot-lzma.img: u-boot.bin.lzma FORCE
|
||||
|
||||
u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \
|
||||
$(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin \
|
||||
$(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SANDBOX),dts/dt.dtb) \
|
||||
$(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SANDBOX)$(CONFIG_BINMAN_STANDALONE_FDT),dts/dt.dtb) \
|
||||
,$(UBOOT_BIN)) FORCE
|
||||
$(call if_changed,mkimage)
|
||||
$(BOARD_SIZE_CHECK)
|
||||
@ -1454,9 +1431,8 @@ u-boot.itb: u-boot-nodtb.bin \
|
||||
$(BOARD_SIZE_CHECK)
|
||||
endif
|
||||
|
||||
u-boot-with-spl.kwb: u-boot.bin spl/u-boot-spl.bin FORCE
|
||||
u-boot-spl.kwb: u-boot.bin spl/u-boot-spl.bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
$(BOARD_SIZE_CHECK)
|
||||
|
||||
u-boot.sha1: u-boot.bin
|
||||
tools/ubsha1 u-boot.bin
|
||||
@ -1477,6 +1453,29 @@ OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \
|
||||
u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE
|
||||
$(call if_changed,pad_cat)
|
||||
|
||||
ifeq ($(CONFIG_ARCH_ROCKCHIP),y)
|
||||
|
||||
# TPL + SPL
|
||||
ifeq ($(CONFIG_SPL)$(CONFIG_TPL),yy)
|
||||
MKIMAGEFLAGS_u-boot-tpl-rockchip.bin = -n $(CONFIG_SYS_SOC) -T rksd
|
||||
tpl/u-boot-tpl-rockchip.bin: tpl/u-boot-tpl.bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
idbloader.img: tpl/u-boot-tpl-rockchip.bin spl/u-boot-spl.bin FORCE
|
||||
$(call if_changed,cat)
|
||||
else
|
||||
MKIMAGEFLAGS_idbloader.img = -n $(CONFIG_SYS_SOC) -T rksd
|
||||
idbloader.img: spl/u-boot-spl.bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARM64),y)
|
||||
OBJCOPYFLAGS_u-boot-rockchip.bin = -I binary -O binary \
|
||||
--pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff
|
||||
u-boot-rockchip.bin: idbloader.img u-boot.itb FORCE
|
||||
$(call if_changed,pad_cat)
|
||||
endif # CONFIG_ARM64
|
||||
|
||||
endif # CONFIG_ARCH_ROCKCHIP
|
||||
|
||||
ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy)
|
||||
MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
|
||||
@ -1507,7 +1506,7 @@ tpl/u-boot-with-tpl.bin: tpl/u-boot-tpl.bin u-boot.bin FORCE
|
||||
SPL: spl/u-boot-spl.bin FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
|
||||
|
||||
#ifeq ($(CONFIG_ARCH_IMX8M)$(CONFIG_ARCH_IMX8), y)
|
||||
ifeq ($(CONFIG_ARCH_IMX8M)$(CONFIG_ARCH_IMX8), y)
|
||||
ifeq ($(CONFIG_SPL_LOAD_IMX_CONTAINER), y)
|
||||
u-boot.cnt: u-boot.bin FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
|
||||
@ -1518,12 +1517,13 @@ else
|
||||
ifeq ($(CONFIG_BINMAN),y)
|
||||
flash.bin: spl/u-boot-spl.bin $(INPUTS-y) FORCE
|
||||
$(call if_changed,binman)
|
||||
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
|
||||
else
|
||||
flash.bin: spl/u-boot-spl.bin u-boot.itb FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
|
||||
endif
|
||||
endif
|
||||
#endif
|
||||
endif
|
||||
|
||||
u-boot.uim: u-boot.bin FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
|
||||
@ -1531,7 +1531,7 @@ u-boot.uim: u-boot.bin FORCE
|
||||
u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL $(if $(CONFIG_OF_SEPARATE),u-boot.img,u-boot.uim) FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
|
||||
|
||||
MKIMAGEFLAGS_u-boot.ubl = -n $(UBL_CONFIG) -T ublimage -e $(CONFIG_TEXT_BASE)
|
||||
MKIMAGEFLAGS_u-boot.ubl = -n $(UBL_CONFIG) -T ublimage -e $(CONFIG_SYS_TEXT_BASE)
|
||||
|
||||
u-boot.ubl: u-boot-with-spl.bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
@ -1588,14 +1588,17 @@ u-boot-with-nand-spl.sfp: u-boot-spl-padx4.sfp u-boot.img FORCE
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy)
|
||||
u-boot.bin: u-boot-nodtb.bin u-boot.dtb u-boot-br.bin FORCE
|
||||
ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
|
||||
u-boot-with-dtb.bin: u-boot.bin u-boot.dtb \
|
||||
$(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR), u-boot-br.bin) FORCE
|
||||
$(call if_changed,binman)
|
||||
|
||||
ifeq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR),y)
|
||||
OBJCOPYFLAGS_u-boot-br.bin := -O binary -j .bootpg -j .resetvec
|
||||
u-boot-br.bin: u-boot FORCE
|
||||
$(call if_changed,objcopy)
|
||||
endif
|
||||
endif
|
||||
|
||||
quiet_cmd_ldr = LD $@
|
||||
cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \
|
||||
@ -1652,8 +1655,12 @@ spl/u-boot-spl.pbl: spl/u-boot-spl.bin FORCE
|
||||
ifeq ($(ARCH),arm)
|
||||
UBOOT_BINLOAD := u-boot.img
|
||||
else
|
||||
ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
|
||||
UBOOT_BINLOAD := u-boot-with-dtb.bin
|
||||
else
|
||||
UBOOT_BINLOAD := u-boot.bin
|
||||
endif
|
||||
endif
|
||||
|
||||
OBJCOPYFLAGS_u-boot-with-spl-pbl.bin = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \
|
||||
--gap-fill=0xff
|
||||
@ -1674,9 +1681,8 @@ u-boot-img-spl-at-end.bin: u-boot.img spl/u-boot-spl.bin FORCE
|
||||
|
||||
quiet_cmd_u-boot-elf ?= LD $@
|
||||
cmd_u-boot-elf ?= $(LD) u-boot-elf.o -o $@ \
|
||||
$(if $(CONFIG_SYS_BIG_ENDIAN),-EB,-EL) \
|
||||
-T u-boot-elf.lds --defsym=$(CONFIG_PLATFORM_ELFENTRY)=$(CONFIG_TEXT_BASE) \
|
||||
-Ttext=$(CONFIG_TEXT_BASE)
|
||||
-T u-boot-elf.lds --defsym=$(CONFIG_PLATFORM_ELFENTRY)=$(CONFIG_SYS_TEXT_BASE) \
|
||||
-Ttext=$(CONFIG_SYS_TEXT_BASE)
|
||||
u-boot.elf: u-boot.bin u-boot-elf.lds
|
||||
$(Q)$(OBJCOPY) -I binary $(PLATFORM_ELFFLAGS) $< u-boot-elf.o
|
||||
$(call if_changed,u-boot-elf)
|
||||
@ -1697,7 +1703,7 @@ u-boot-mtk.bin: u-boot-with-spl.bin
|
||||
$(call if_changed,copy)
|
||||
else
|
||||
MKIMAGEFLAGS_u-boot-mtk.bin = -T mtk_image \
|
||||
-a $(CONFIG_TEXT_BASE) -e $(CONFIG_TEXT_BASE) \
|
||||
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \
|
||||
-n "$(patsubst "%",%,$(CONFIG_MTK_BROM_HEADER_INFO))"
|
||||
|
||||
u-boot-mtk.bin: u-boot.bin FORCE
|
||||
@ -1714,7 +1720,7 @@ ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(ARCH)/Makefile.postlink)
|
||||
|
||||
# Generate linker list symbols references to force compiler to not optimize
|
||||
# them away when compiling with LTO
|
||||
ifeq ($(LTO_ENABLE),y)
|
||||
ifdef CONFIG_LTO
|
||||
u-boot-keep-syms-lto := keep-syms-lto.o
|
||||
u-boot-keep-syms-lto_c := $(patsubst %.o,%.c,$(u-boot-keep-syms-lto))
|
||||
|
||||
@ -1736,7 +1742,7 @@ endif
|
||||
|
||||
# Rule to link u-boot
|
||||
# May be overridden by arch/$(ARCH)/config.mk
|
||||
ifeq ($(LTO_ENABLE),y)
|
||||
ifdef CONFIG_LTO
|
||||
quiet_cmd_u-boot__ ?= LTO $@
|
||||
cmd_u-boot__ ?= \
|
||||
$(CC) -nostdlib -nostartfiles \
|
||||
@ -1751,12 +1757,16 @@ quiet_cmd_u-boot__ ?= LTO $@
|
||||
-Wl,-Map,u-boot.map; \
|
||||
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
|
||||
else
|
||||
# Note: Linking efi-x86_app64 causes a segfault in the linker at present
|
||||
# when using x86_64-linux-gnu-ld.bfd
|
||||
# For now, disable --whole-archive which makes things link, although not
|
||||
# correctly
|
||||
quiet_cmd_u-boot__ ?= LD $@
|
||||
cmd_u-boot__ ?= $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_u-boot) -o $@ \
|
||||
-T u-boot.lds $(u-boot-init) \
|
||||
--whole-archive \
|
||||
$(if $(CONFIG_EFI_APP_64BIT),,--whole-archive) \
|
||||
$(u-boot-main) \
|
||||
--no-whole-archive \
|
||||
$(if $(CONFIG_EFI_APP_64BIT),,--no-whole-archive) \
|
||||
$(PLATFORM_LIBS) -Map u-boot.map; \
|
||||
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
|
||||
endif
|
||||
@ -1784,72 +1794,6 @@ quiet_cmd_sym ?= SYM $@
|
||||
u-boot.sym: u-boot FORCE
|
||||
$(call if_changed,sym)
|
||||
|
||||
# Environment processing
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Directory where we expect the .env file, if it exists
|
||||
ENV_DIR := $(srctree)/board/$(BOARDDIR)
|
||||
|
||||
# Basename of .env file, stripping quotes
|
||||
ENV_SOURCE_FILE := $(CONFIG_ENV_SOURCE_FILE:"%"=%)
|
||||
|
||||
# Filename of .env file
|
||||
ENV_FILE_CFG := $(ENV_DIR)/$(ENV_SOURCE_FILE).env
|
||||
|
||||
# Default filename, if CONFIG_ENV_SOURCE_FILE is empty
|
||||
ENV_FILE_BOARD := $(ENV_DIR)/$(CONFIG_SYS_BOARD:"%"=%).env
|
||||
|
||||
# Select between the CONFIG_ENV_SOURCE_FILE and the default one
|
||||
ENV_FILE := $(if $(ENV_SOURCE_FILE),$(ENV_FILE_CFG),$(wildcard $(ENV_FILE_BOARD)))
|
||||
|
||||
# Run the environment text file through the preprocessor, but only if it is
|
||||
# non-empty, to save time and possible build errors if something is wonky with
|
||||
# the board.
|
||||
# If there is no ENV_FILE, produce an empty output file, to prevent a previous
|
||||
# build's file being used in the case of in-tree builds.
|
||||
quiet_cmd_gen_envp = ENVP $@
|
||||
cmd_gen_envp = \
|
||||
if [ -s "$(ENV_FILE)" ]; then \
|
||||
$(CPP) -P $(CFLAGS) -x assembler-with-cpp -D__ASSEMBLY__ \
|
||||
-D__UBOOT_CONFIG__ \
|
||||
-I . -I include -I $(srctree)/include \
|
||||
-include linux/kconfig.h -include include/config.h \
|
||||
-I$(srctree)/arch/$(ARCH)/include \
|
||||
$< -o $@; \
|
||||
else \
|
||||
rm -f $@; \
|
||||
touch $@ ; \
|
||||
fi
|
||||
include/generated/env.in: include/generated/env.txt FORCE
|
||||
$(call cmd,gen_envp)
|
||||
|
||||
# Regenerate the environment if it changes
|
||||
# We use 'wildcard' since the file is not required to exist (at present), in
|
||||
# which case we don't want this dependency, but instead should create an empty
|
||||
# file
|
||||
# This rule is useful since it shows the source file for the environment
|
||||
quiet_cmd_envc = ENVC $@
|
||||
cmd_envc = \
|
||||
if [ -f "$<" ]; then \
|
||||
cat $< > $@; \
|
||||
elif [ -n "$(ENV_SOURCE_FILE)" ]; then \
|
||||
echo "Missing file $(ENV_FILE_CFG)"; \
|
||||
else \
|
||||
touch $@ ; \
|
||||
fi
|
||||
|
||||
include/generated/env.txt: $(wildcard $(ENV_FILE)) FORCE
|
||||
$(call cmd,envc)
|
||||
|
||||
# Write out the resulting environment, converted to a C string
|
||||
quiet_cmd_gen_envt = ENVT $@
|
||||
cmd_gen_envt = \
|
||||
awk -f $(srctree)/scripts/env2string.awk $< >$@
|
||||
$(env_h): include/generated/env.in
|
||||
$(call cmd,gen_envt)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# The actual objects are generated when descending,
|
||||
# make sure no implicit rule kicks in
|
||||
$(sort $(u-boot-init) $(u-boot-main)): $(u-boot-dirs) ;
|
||||
@ -1905,7 +1849,7 @@ endif
|
||||
# prepare2 creates a makefile if using a separate output directory
|
||||
prepare2: prepare3 outputmakefile cfg
|
||||
|
||||
prepare1: prepare2 $(version_h) $(timestamp_h) $(dt_h) $(env_h) \
|
||||
prepare1: prepare2 $(version_h) $(timestamp_h) $(dt_h) \
|
||||
include/config/auto.conf
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
@echo >&2 " Could not find linker script."
|
||||
@ -2061,7 +2005,9 @@ spl/u-boot-spl-dtb.bin: spl/u-boot-spl
|
||||
spl/u-boot-spl-dtb.hex: spl/u-boot-spl
|
||||
@:
|
||||
|
||||
spl/u-boot-spl: tools prepare $(if $(CONFIG_SPL_OF_CONTROL),dts/dt.dtb)
|
||||
spl/u-boot-spl: tools prepare \
|
||||
$(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SPL_OF_PLATDATA),dts/dt.dtb) \
|
||||
$(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_TPL_OF_PLATDATA),dts/dt.dtb)
|
||||
$(Q)$(MAKE) obj=spl -f $(srctree)/scripts/Makefile.spl all
|
||||
|
||||
spl/sunxi-spl.bin: spl/u-boot-spl
|
||||
@ -2076,19 +2022,10 @@ spl/u-boot-spl.sfp: spl/u-boot-spl
|
||||
spl/boot.bin: spl/u-boot-spl
|
||||
@:
|
||||
|
||||
tpl/u-boot-tpl.bin: tpl/u-boot-tpl
|
||||
@:
|
||||
$(TPL_SIZE_CHECK)
|
||||
|
||||
tpl/u-boot-tpl: tools prepare $(if $(CONFIG_TPL_OF_CONTROL),dts/dt.dtb)
|
||||
tpl/u-boot-tpl.bin: tools prepare \
|
||||
$(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SPL_OF_PLATDATA),dts/dt.dtb)
|
||||
$(Q)$(MAKE) obj=tpl -f $(srctree)/scripts/Makefile.spl all
|
||||
|
||||
vpl/u-boot-vpl.bin: vpl/u-boot-vpl
|
||||
@:
|
||||
$(VPL_SIZE_CHECK)
|
||||
|
||||
vpl/u-boot-vpl: tools prepare $(if $(CONFIG_TPL_OF_CONTROL),dts/dt.dtb)
|
||||
$(Q)$(MAKE) obj=vpl -f $(srctree)/scripts/Makefile.spl all
|
||||
$(TPL_SIZE_CHECK)
|
||||
|
||||
TAG_SUBDIRS := $(patsubst %,$(srctree)/%,$(u-boot-dirs) include)
|
||||
|
||||
@ -2167,16 +2104,11 @@ CLEAN_DIRS += $(MODVERDIR) \
|
||||
$(foreach d, spl tpl, $(patsubst %,$d/%, \
|
||||
$(filter-out include, $(shell ls -1 $d 2>/dev/null))))
|
||||
|
||||
CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \
|
||||
include/generated/env.* drivers/video/u_boot_logo.S \
|
||||
tools/version.h u-boot* MLO* SPL System.map fit-dtb.blob* \
|
||||
CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h tools/version.h \
|
||||
u-boot* MLO* SPL System.map fit-dtb.blob* \
|
||||
u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log \
|
||||
lpc32xx-* bl31.c bl31.elf bl31_*.bin image.map tispl.bin* \
|
||||
idbloader.img flash.bin flash.log defconfig keep-syms-lto.c \
|
||||
mkimage-out.spl.mkimage mkimage.spl.mkimage imx-boot.map \
|
||||
itb.fit.fit itb.fit.itb itb.map spl.map mkimage-out.rom.mkimage \
|
||||
mkimage.rom.mkimage rom.map simple-bin.map simple-bin-spi.map \
|
||||
idbloader-spi.img
|
||||
idbloader.img flash.bin flash.log defconfig keep-syms-lto.c
|
||||
|
||||
# Directories & files removed with 'make mrproper'
|
||||
MRPROPER_DIRS += include/config include/generated spl tpl \
|
||||
@ -2211,8 +2143,7 @@ clean: $(clean-dirs)
|
||||
-o -name '*.asn1.[ch]' \
|
||||
-o -name '*.symtypes' -o -name 'modules.order' \
|
||||
-o -name modules.builtin -o -name '.tmp_*.o.*' \
|
||||
-o -name 'dsdt_generated.aml' -o -name 'dsdt_generated.asl.tmp' \
|
||||
-o -name 'dsdt_generated.c' \
|
||||
-o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \
|
||||
-o -name '*.efi' -o -name '*.gcno' -o -name '*.so' \) \
|
||||
-type f -print | xargs rm -f
|
||||
|
||||
@ -2244,54 +2175,6 @@ distclean: mrproper
|
||||
-type f -print | xargs rm -f
|
||||
@rm -f boards.cfg CHANGELOG
|
||||
|
||||
# See doc/develop/python_cq.rst
|
||||
PHONY += pylint pylint_err
|
||||
PYLINT_BASE := scripts/pylint.base
|
||||
PYLINT_CUR := pylint.cur
|
||||
PYLINT_DIFF := pylint.diff
|
||||
pylint:
|
||||
$(Q)echo "Running pylint on all files (summary in $(PYLINT_CUR); output in pylint.out/)"
|
||||
$(Q)mkdir -p pylint.out
|
||||
$(Q)rm -f pylint.out/out*
|
||||
$(Q)find tools test -name "*.py" \
|
||||
| xargs -n1 -P$(shell nproc 2>/dev/null || echo 1) \
|
||||
sh -c 'pylint --reports=y --exit-zero -f parseable --ignore-imports=yes $$@ > pylint.out/$$(echo $$@ | tr / _ | sed s/.py//)' _
|
||||
$(Q)rm -f $(PYLINT_CUR)
|
||||
$(Q)( cd pylint.out; for f in *; do \
|
||||
sed -ne "s/Your code has been rated at \([-0-9.]*\).*/$$f \1/p" $$f; \
|
||||
done ) | sort > $(PYLINT_CUR)
|
||||
$(Q)base=$$(mktemp) cur=$$(mktemp); cut -d' ' -f1 $(PYLINT_BASE) >$$base; \
|
||||
cut -d' ' -f1 $(PYLINT_CUR) >$$cur; \
|
||||
comm -3 $$base $$cur > $(PYLINT_DIFF); \
|
||||
if [ -s $(PYLINT_DIFF) ]; then \
|
||||
echo "Files have been added/removed. Try:\n\tcp $(PYLINT_CUR) $(PYLINT_BASE)"; \
|
||||
echo; \
|
||||
echo "Added files:"; \
|
||||
comm -13 $$base $$cur; \
|
||||
echo; \
|
||||
echo "Removed files:"; \
|
||||
comm -23 $$base $$cur; \
|
||||
false; \
|
||||
else \
|
||||
rm $$base $$cur $(PYLINT_DIFF); \
|
||||
fi
|
||||
$(Q)bad=false; while read base_file base_val <&3 && read cur_file cur_val <&4; do \
|
||||
if awk "BEGIN {exit !($$cur_val < $$base_val)}"; then \
|
||||
echo "$$base_file: Score was $$base_val, now $$cur_val"; \
|
||||
bad=true; fi; \
|
||||
done 3<$(PYLINT_BASE) 4<$(PYLINT_CUR); \
|
||||
if $$bad; then \
|
||||
echo "Some files have regressed, please fix"; \
|
||||
false; \
|
||||
else \
|
||||
echo "No pylint regressions"; \
|
||||
fi
|
||||
|
||||
# Check for errors only
|
||||
pylint_err:
|
||||
$(Q)pylint -E -j 0 --ignore-imports=yes \
|
||||
$(shell find tools test -name "*.py")
|
||||
|
||||
backup:
|
||||
F=`basename $(srctree)` ; cd .. ; \
|
||||
gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
|
||||
@ -2308,10 +2191,8 @@ help:
|
||||
@echo 'Test targets:'
|
||||
@echo ''
|
||||
@echo ' check - Run all automated tests that use sandbox'
|
||||
@echo ' pcheck - Run quick automated tests in parallel'
|
||||
@echo ' qcheck - Run quick automated tests that use sandbox'
|
||||
@echo ' tcheck - Run quick automated tests on tools'
|
||||
@echo ' pylint - Run pylint on all Python files'
|
||||
@echo ''
|
||||
@echo 'Other generic targets:'
|
||||
@echo ' all - Build all necessary images depending on configuration'
|
||||
@ -2354,9 +2235,6 @@ help:
|
||||
tests check:
|
||||
$(srctree)/test/run
|
||||
|
||||
pcheck:
|
||||
$(srctree)/test/run parallel
|
||||
|
||||
qcheck:
|
||||
$(srctree)/test/run quick
|
||||
|
||||
@ -2366,7 +2244,7 @@ tcheck:
|
||||
# Documentation targets
|
||||
# ---------------------------------------------------------------------------
|
||||
DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
|
||||
linkcheckdocs dochelp refcheckdocs texinfodocs infodocs
|
||||
linkcheckdocs dochelp refcheckdocs
|
||||
PHONY += $(DOC_TARGETS)
|
||||
$(DOC_TARGETS): scripts_basic FORCE
|
||||
$(Q)$(MAKE) $(build)=doc $@
|
||||
@ -2433,13 +2311,10 @@ endif
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||
|
||||
quiet_cmd_genenv = GENENV $@
|
||||
cmd_genenv = \
|
||||
$(objtree)/tools/printinitialenv | \
|
||||
sed -e '/^\s*$$/d' | \
|
||||
sort --field-separator== -k1,1 --stable -o $@
|
||||
cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ env/common.o; \
|
||||
sed --in-place -e 's/\x00/\x0A/g' $@
|
||||
|
||||
u-boot-initial-env: $(env_h) FORCE
|
||||
$(Q)$(MAKE) $(build)=tools $(objtree)/tools/printinitialenv
|
||||
u-boot-initial-env: u-boot.bin
|
||||
$(call if_changed,genenv)
|
||||
|
||||
# Consistency checks
|
||||
|
24
api/Kconfig
24
api/Kconfig
@ -5,28 +5,4 @@ config API
|
||||
help
|
||||
This option enables the U-Boot API. See api/README for more information.
|
||||
|
||||
config SYS_MMC_MAX_DEVICE
|
||||
int "Maximum number of MMC devices exposed via the API"
|
||||
depends on API
|
||||
default 1
|
||||
|
||||
endmenu
|
||||
|
||||
config STANDALONE_LOAD_ADDR
|
||||
hex "Address in memory to link standalone applications to"
|
||||
default 0xffffffff80200000 if MIPS && 64BIT
|
||||
default 0x8c000000 if SH
|
||||
default 0x82000000 if ARC
|
||||
default 0x80f00000 if MICROBLAZE
|
||||
default 0x80300000 if ARCH_OMAP2PLUS || FSL_LSCH2 || FSL_LSCH3
|
||||
default 0x80200000 if MIPS && 32BIT
|
||||
default 0x0c100000 if ARM
|
||||
default 0x02000000 if NIOS2
|
||||
default 0x00040000 if PPC || X86
|
||||
default 0x00020000 if M68K
|
||||
default 0x0 if RISCV
|
||||
default SYS_LOAD_ADDR
|
||||
help
|
||||
This option defines a board specific value for the address where
|
||||
standalone program gets loaded, thus overwriting the architecture
|
||||
dependent default settings.
|
||||
|
@ -5,7 +5,14 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <api_public.h>
|
||||
#include <lcd.h>
|
||||
#include <log.h>
|
||||
#include <video_font.h> /* Get font width and height */
|
||||
|
||||
/* lcd.h needs BMP_LOGO_HEIGHT to calculate CONSOLE_ROWS */
|
||||
#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
|
||||
#include <bmp_logo.h>
|
||||
#endif
|
||||
|
||||
/* TODO(clchiou): add support of video device */
|
||||
|
||||
@ -19,6 +26,14 @@ int display_get_info(int type, struct display_info *di)
|
||||
debug("%s: unsupport display device type: %d\n",
|
||||
__FILE__, type);
|
||||
return API_ENODEV;
|
||||
#ifdef CONFIG_LCD
|
||||
case DISPLAY_TYPE_LCD:
|
||||
di->pixel_width = panel_info.vl_col;
|
||||
di->pixel_height = panel_info.vl_row;
|
||||
di->screen_rows = lcd_get_screen_rows();
|
||||
di->screen_cols = lcd_get_screen_columns();
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
di->type = type;
|
||||
@ -29,9 +44,16 @@ int display_draw_bitmap(ulong bitmap, int x, int y)
|
||||
{
|
||||
if (!bitmap)
|
||||
return API_EINVAL;
|
||||
#ifdef CONFIG_LCD
|
||||
return lcd_display_bitmap(bitmap, x, y);
|
||||
#else
|
||||
return API_ENODEV;
|
||||
#endif
|
||||
}
|
||||
|
||||
void display_clear(void)
|
||||
{
|
||||
#ifdef CONFIG_LCD
|
||||
lcd_clear();
|
||||
#endif
|
||||
}
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include <common.h>
|
||||
#include <api_public.h>
|
||||
#include <part.h>
|
||||
#include <scsi.h>
|
||||
|
||||
#if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE)
|
||||
#include <usb.h>
|
||||
@ -44,6 +43,10 @@ struct stor_spec {
|
||||
|
||||
static struct stor_spec specs[ENUM_MAX] = { { 0, 0, 0, 0, NULL }, };
|
||||
|
||||
#ifndef CONFIG_SYS_MMC_MAX_DEVICE
|
||||
#define CONFIG_SYS_MMC_MAX_DEVICE 1
|
||||
#endif
|
||||
|
||||
void dev_stor_init(void)
|
||||
{
|
||||
#if defined(CONFIG_IDE)
|
||||
@ -68,7 +71,7 @@ void dev_stor_init(void)
|
||||
specs[ENUM_SATA].name = "sata";
|
||||
#endif
|
||||
#if defined(CONFIG_SCSI)
|
||||
specs[ENUM_SCSI].max_dev = SCSI_MAX_DEVICE;
|
||||
specs[ENUM_SCSI].max_dev = CONFIG_SYS_SCSI_MAX_DEVICE;
|
||||
specs[ENUM_SCSI].enum_started = 0;
|
||||
specs[ENUM_SCSI].enum_ended = 0;
|
||||
specs[ENUM_SCSI].type = DEV_TYP_STOR | DT_STOR_SCSI;
|
||||
|
141
arch/Kconfig
141
arch/Kconfig
@ -1,13 +1,12 @@
|
||||
config ARCH_MAP_SYSMEM
|
||||
depends on SANDBOX
|
||||
def_bool y
|
||||
|
||||
config CREATE_ARCH_SYMLINK
|
||||
bool
|
||||
|
||||
config HAVE_ARCH_IOREMAP
|
||||
bool
|
||||
|
||||
config NEEDS_MANUAL_RELOC
|
||||
bool
|
||||
|
||||
config SYS_CACHE_SHIFT_4
|
||||
bool
|
||||
|
||||
@ -53,15 +52,12 @@ config ARC
|
||||
select SUPPORT_OF_CONTROL
|
||||
select SYS_CACHE_SHIFT_7
|
||||
select TIMER
|
||||
select SYS_BIG_ENDIAN if CPU_BIG_ENDIAN
|
||||
select SYS_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
|
||||
|
||||
config ARM
|
||||
bool "ARM architecture"
|
||||
select ARCH_SUPPORTS_LTO
|
||||
select CREATE_ARCH_SYMLINK
|
||||
select HAVE_PRIVATE_LIBGCC if !ARM64
|
||||
select SUPPORT_ACPI
|
||||
select SUPPORT_OF_CONTROL
|
||||
|
||||
config M68K
|
||||
@ -75,25 +71,24 @@ config M68K
|
||||
|
||||
config MICROBLAZE
|
||||
bool "MicroBlaze architecture"
|
||||
select NEEDS_MANUAL_RELOC
|
||||
select SUPPORT_OF_CONTROL
|
||||
imply CMD_TIMER
|
||||
imply SPL_REGMAP if SPL
|
||||
imply SPL_TIMER if SPL
|
||||
imply TIMER
|
||||
imply XILINX_TIMER
|
||||
imply CMD_IRQ
|
||||
|
||||
config MIPS
|
||||
bool "MIPS architecture"
|
||||
select HAVE_ARCH_IOREMAP
|
||||
select HAVE_PRIVATE_LIBGCC
|
||||
select SUPPORT_OF_CONTROL
|
||||
select SPL_SEPARATE_BSS if SPL
|
||||
|
||||
config NDS32
|
||||
bool "NDS32 architecture"
|
||||
select SUPPORT_OF_CONTROL
|
||||
|
||||
config NIOS2
|
||||
bool "Nios II architecture"
|
||||
select CPU
|
||||
select DM
|
||||
imply DM_EVENT
|
||||
select OF_CONTROL
|
||||
select SUPPORT_OF_CONTROL
|
||||
imply CMD_DM
|
||||
@ -111,9 +106,8 @@ config RISCV
|
||||
select SUPPORT_OF_CONTROL
|
||||
select OF_CONTROL
|
||||
select DM
|
||||
imply SPL_SEPARATE_BSS if SPL
|
||||
imply DM_SERIAL
|
||||
imply DM_EVENT
|
||||
imply DM_ETH
|
||||
imply DM_MMC
|
||||
imply DM_SPI
|
||||
imply DM_SPI_FLASH
|
||||
@ -136,7 +130,6 @@ config SANDBOX
|
||||
select BZIP2
|
||||
select CMD_POWEROFF
|
||||
select DM
|
||||
select DM_FUZZING_ENGINE
|
||||
select DM_GPIO
|
||||
select DM_I2C
|
||||
select DM_KEYBOARD
|
||||
@ -145,7 +138,7 @@ config SANDBOX
|
||||
select DM_SPI
|
||||
select DM_SPI_FLASH
|
||||
select GZIP_COMPRESSED
|
||||
select IO_TRACE
|
||||
select HAVE_BLOCK_DEVICE
|
||||
select LZO
|
||||
select OF_BOARD_SETUP
|
||||
select PCI_ENDPOINT
|
||||
@ -155,7 +148,6 @@ config SANDBOX
|
||||
select SYS_CACHE_SHIFT_4
|
||||
select IRQ
|
||||
select SUPPORT_EXTENSION_SCAN
|
||||
select SUPPORT_ACPI
|
||||
imply BITREVERSE
|
||||
select BLOBLIST
|
||||
imply LTO
|
||||
@ -166,19 +158,19 @@ config SANDBOX
|
||||
imply CMD_IO
|
||||
imply CMD_IOTRACE
|
||||
imply CMD_LZMADEC
|
||||
imply CMD_SATA
|
||||
imply CMD_SF
|
||||
imply CMD_SF_TEST
|
||||
imply CRC32_VERIFY
|
||||
imply FAT_WRITE
|
||||
imply FIRMWARE
|
||||
imply FUZZING_ENGINE_SANDBOX
|
||||
imply HASH_VERIFY
|
||||
imply LZMA
|
||||
imply SCSI
|
||||
imply TEE
|
||||
imply AVB_VERIFY
|
||||
imply LIBAVB
|
||||
imply CMD_AVB
|
||||
imply PARTITION_TYPE_GUID
|
||||
imply SCP03
|
||||
imply CMD_SCP03
|
||||
imply UDP_FUNCTION_FASTBOOT
|
||||
@ -202,10 +194,6 @@ config SANDBOX
|
||||
imply PHY_FIXED
|
||||
imply DM_DSA
|
||||
imply CMD_EXTENSION
|
||||
imply KEYBOARD
|
||||
imply PHYSMEM
|
||||
imply GENERATE_ACPI_TABLE
|
||||
imply BINMAN
|
||||
|
||||
config SH
|
||||
bool "SuperH architecture"
|
||||
@ -222,7 +210,6 @@ config X86
|
||||
select HAVE_PRIVATE_LIBGCC
|
||||
select OF_CONTROL
|
||||
select PCI
|
||||
select SUPPORT_ACPI
|
||||
select SUPPORT_OF_CONTROL
|
||||
select SYS_CACHE_SHIFT_6
|
||||
select TIMER
|
||||
@ -240,7 +227,7 @@ config X86
|
||||
imply CMD_SF
|
||||
imply CMD_SF_TEST
|
||||
imply CMD_ZBOOT
|
||||
imply DM_EVENT
|
||||
imply DM_ETH
|
||||
imply DM_GPIO
|
||||
imply DM_KEYBOARD
|
||||
imply DM_MMC
|
||||
@ -250,7 +237,7 @@ config X86
|
||||
imply DM_SPI
|
||||
imply DM_SPI_FLASH
|
||||
imply DM_USB
|
||||
imply VIDEO
|
||||
imply DM_VIDEO
|
||||
imply SYSRESET
|
||||
imply SPL_SYSRESET
|
||||
imply SYSRESET_X86
|
||||
@ -258,12 +245,10 @@ config X86
|
||||
imply USB_ETHER_SMSC95XX
|
||||
imply USB_HOST_ETHER
|
||||
imply PCH
|
||||
imply PHYSMEM
|
||||
imply RTC_MC146818
|
||||
imply ACPIGEN if !QEMU && !EFI_APP
|
||||
imply ACPIGEN if !QEMU
|
||||
imply SYSINFO if GENERATE_SMBIOS_TABLE
|
||||
imply SYSINFO_SMBIOS if GENERATE_SMBIOS_TABLE
|
||||
imply TIMESTAMP
|
||||
|
||||
# Thing to enable for when SPL/TPL are enabled: SPL
|
||||
imply SPL_DM
|
||||
@ -365,30 +350,9 @@ config SYS_DISABLE_DCACHE_OPS
|
||||
Note that, its up to the individual architectures to implement
|
||||
this functionality.
|
||||
|
||||
config SYS_IMMR
|
||||
hex "Address for the Internal Memory-Mapped Registers (IMMR) window"
|
||||
depends on PPC || FSL_LSCH2 || FSL_LSCH3 || ARCH_LS1021A
|
||||
default 0xFF000000 if MPC8xx
|
||||
default 0xF0000000 if ARCH_MPC8313
|
||||
default 0xE0000000 if MPC83xx && !ARCH_MPC8313
|
||||
default 0x01000000 if ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3
|
||||
default 0xFFE00000 if ARCH_P1010 || ARCH_P1011 || ARCH_P1020 || \
|
||||
ARCH_P1021 || ARCH_P1024 || ARCH_P1025 || \
|
||||
ARCH_P2020
|
||||
default SYS_CCSRBAR_DEFAULT
|
||||
help
|
||||
Address for the Internal Memory-Mapped Registers (IMMR) window used
|
||||
to configure the features of many Freescale / NXP SoCs.
|
||||
|
||||
config MONITOR_IS_IN_RAM
|
||||
bool "U-Boot is loaded in to RAM by a pre-loader"
|
||||
depends on M68K || NIOS2
|
||||
|
||||
menu "Skipping low level initialization functions"
|
||||
depends on ARM || MIPS || RISCV
|
||||
|
||||
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 || NDS32 || MIPS || RISCV
|
||||
help
|
||||
If enabled, then certain low level initializations (like setting up
|
||||
the memory controller) are omitted and/or U-Boot does not relocate
|
||||
@ -398,8 +362,8 @@ config SKIP_LOWLEVEL_INIT
|
||||
debugger which performs these initializations itself.
|
||||
|
||||
config SPL_SKIP_LOWLEVEL_INIT
|
||||
bool "Skip calls to certain low level initialization functions in SPL"
|
||||
depends on SPL
|
||||
bool "Skip the calls to certain low level initialization functions"
|
||||
depends on SPL && (ARM || NDS32 || MIPS || RISCV)
|
||||
help
|
||||
If enabled, then certain low level initializations (like setting up
|
||||
the memory controller) are omitted and/or U-Boot does not relocate
|
||||
@ -409,7 +373,7 @@ config SPL_SKIP_LOWLEVEL_INIT
|
||||
debugger which performs these initializations itself.
|
||||
|
||||
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
|
||||
help
|
||||
If enabled, then certain low level initializations (like setting up
|
||||
@ -420,7 +384,7 @@ config TPL_SKIP_LOWLEVEL_INIT
|
||||
debugger which performs these initializations itself.
|
||||
|
||||
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
|
||||
help
|
||||
This allows just the call to lowlevel_init() to be skipped. The
|
||||
@ -428,7 +392,7 @@ config SKIP_LOWLEVEL_INIT_ONLY
|
||||
performed.
|
||||
|
||||
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
|
||||
help
|
||||
This allows just the call to lowlevel_init() to be skipped. The
|
||||
@ -436,44 +400,19 @@ config SPL_SKIP_LOWLEVEL_INIT_ONLY
|
||||
performed.
|
||||
|
||||
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
|
||||
help
|
||||
This allows just the call to lowlevel_init() to be skipped. The
|
||||
normal CP15 init (such as enabling the instruction cache) is still
|
||||
performed.
|
||||
|
||||
endmenu
|
||||
|
||||
config SYS_HAS_NONCACHED_MEMORY
|
||||
bool "Enable reserving a non-cached memory area for drivers"
|
||||
depends on (ARM || MIPS) && (RTL8169 || MEDIATEK_ETH)
|
||||
help
|
||||
This is useful for drivers that would otherwise require a lot of
|
||||
explicit cache maintenance. For some drivers it's also impossible to
|
||||
properly maintain the cache. For example if the regions that need to
|
||||
be flushed are not a multiple of the cache-line size, *and* padding
|
||||
cannot be allocated between the regions to align them (i.e. if the
|
||||
HW requires a contiguous array of regions, and the size of each
|
||||
region is not cache-aligned), then a flush of one region may result
|
||||
in overwriting data that hardware has written to another region in
|
||||
the same cache-line. This can happen for example in network drivers
|
||||
where descriptors for buffers are typically smaller than the CPU
|
||||
cache-line (e.g. 16 bytes vs. 32 or 64 bytes).
|
||||
|
||||
config SYS_NONCACHED_MEMORY
|
||||
hex "Size in bytes of the non-cached memory area"
|
||||
depends on SYS_HAS_NONCACHED_MEMORY
|
||||
default 0x100000
|
||||
help
|
||||
Size of non-cached memory area. This area of memory will be typically
|
||||
located right below the malloc() area and mapped uncached in the MMU.
|
||||
|
||||
source "arch/arc/Kconfig"
|
||||
source "arch/arm/Kconfig"
|
||||
source "arch/m68k/Kconfig"
|
||||
source "arch/microblaze/Kconfig"
|
||||
source "arch/mips/Kconfig"
|
||||
source "arch/nds32/Kconfig"
|
||||
source "arch/nios2/Kconfig"
|
||||
source "arch/powerpc/Kconfig"
|
||||
source "arch/sandbox/Kconfig"
|
||||
@ -481,33 +420,3 @@ source "arch/sh/Kconfig"
|
||||
source "arch/x86/Kconfig"
|
||||
source "arch/xtensa/Kconfig"
|
||||
source "arch/riscv/Kconfig"
|
||||
|
||||
if ARM || M68K || PPC
|
||||
|
||||
source "arch/Kconfig.nxp"
|
||||
|
||||
endif
|
||||
|
||||
source "board/keymile/Kconfig"
|
||||
|
||||
if MIPS || MICROBLAZE
|
||||
|
||||
choice
|
||||
prompt "Endianness selection"
|
||||
help
|
||||
Some MIPS boards can be configured for either little or big endian
|
||||
byte order. These modes require different U-Boot images. In general there
|
||||
is one preferred byteorder for a particular system but some systems are
|
||||
just as commonly used in the one or the other endianness.
|
||||
|
||||
config SYS_BIG_ENDIAN
|
||||
bool "Big endian"
|
||||
depends on (SUPPORTS_BIG_ENDIAN && MIPS) || MICROBLAZE
|
||||
|
||||
config SYS_LITTLE_ENDIAN
|
||||
bool "Little endian"
|
||||
depends on (SUPPORTS_LITTLE_ENDIAN && MIPS) || MICROBLAZE
|
||||
|
||||
endchoice
|
||||
|
||||
endif
|
||||
|
275
arch/Kconfig.nxp
275
arch/Kconfig.nxp
@ -1,275 +0,0 @@
|
||||
menu "Functionality shared between NXP SoCs"
|
||||
|
||||
config FSL_TRUST_ARCH_v1
|
||||
bool
|
||||
|
||||
config NXP_ESBC
|
||||
bool "NXP ESBC (secure boot) functionality"
|
||||
select FSL_TRUST_ARCH_v1 if ARCH_P3041 || ARCH_P4080 || \
|
||||
ARCH_P5040 || ARCH_P2041
|
||||
help
|
||||
Enable Freescale Secure Boot feature. Normally selected by defconfig.
|
||||
If unsure, do not change.
|
||||
|
||||
menu "Chain of trust / secure boot options"
|
||||
depends on !FIT_SIGNATURE && NXP_ESBC
|
||||
|
||||
config CHAIN_OF_TRUST
|
||||
select FSL_CAAM
|
||||
select ARCH_MISC_INIT
|
||||
select FSL_ISBC_KEY_EXT if (ARM || FSL_CORENET) && !SYS_RAMBOOT
|
||||
select FSL_SEC_MON
|
||||
select SPL_BOARD_INIT if (ARM && SPL)
|
||||
select SPL_HASH if (ARM && SPL)
|
||||
select SHA_HW_ACCEL
|
||||
select SHA_PROG_HW_ACCEL
|
||||
select ENV_IS_NOWHERE
|
||||
select SYS_CPC_REINIT_F if MPC85xx && !SYS_RAMBOOT
|
||||
select CMD_EXT4 if ARM
|
||||
select CMD_EXT4_WRITE if ARM
|
||||
imply CMD_BLOB
|
||||
imply CMD_HASH if ARM
|
||||
def_bool y
|
||||
|
||||
config CMD_ESBC_VALIDATE
|
||||
bool "Enable the 'esbc_validate' and 'esbc_halt' commands"
|
||||
default y
|
||||
help
|
||||
This option enables two commands used for secure booting:
|
||||
|
||||
esbc_validate - validate signature using RSA verification
|
||||
esbc_halt - put the core in spin loop (Secure Boot Only)
|
||||
|
||||
config ESBC_HDR_LS
|
||||
bool
|
||||
|
||||
config ESBC_ADDR_64BIT
|
||||
def_bool y
|
||||
depends on ESBC_HDR_LS && FSL_LAYERSCAPE
|
||||
help
|
||||
For Layerscape based platforms, ESBC image Address in Header is 64bit.
|
||||
|
||||
config FSL_ISBC_KEY_EXT
|
||||
bool
|
||||
help
|
||||
The key used for verification of next level images is picked up from
|
||||
an Extension Table which has been verified by the ISBC (Internal
|
||||
Secure boot Code) in boot ROM of the SoC. The feature is only
|
||||
applicable in case of NOR boot and is not applicable in case of
|
||||
RAMBOOT (NAND, SD, SPI). For Layerscape, this feature is available
|
||||
for all device if IE Table is copied to XIP memory Also, for
|
||||
Layerscape, ISBC doesn't verify this table.
|
||||
|
||||
config SYS_FSL_SFP_BE
|
||||
def_bool y
|
||||
depends on PPC || FSL_LSCH2 || ARCH_LS1021A
|
||||
|
||||
config SYS_FSL_SFP_LE
|
||||
def_bool y
|
||||
depends on !SYS_FSL_SFP_BE
|
||||
|
||||
choice
|
||||
prompt "SFP IP revision"
|
||||
default SYS_FSL_SFP_VER_3_0 if PPC
|
||||
default SYS_FSL_SFP_VER_3_4
|
||||
|
||||
config SYS_FSL_SFP_VER_3_0
|
||||
bool "SFP version 3.0"
|
||||
|
||||
config SYS_FSL_SFP_VER_3_2
|
||||
bool "SFP version 3.2"
|
||||
|
||||
config SYS_FSL_SFP_VER_3_4
|
||||
bool "SFP version 3.4"
|
||||
|
||||
endchoice
|
||||
|
||||
config SPL_UBOOT_KEY_HASH
|
||||
string "Non-SRK key hash for U-Boot public/private key pair"
|
||||
depends on SPL
|
||||
default ""
|
||||
help
|
||||
Set the key hash for U-Boot here if public/private key pair used to
|
||||
sign U-boot are different from the SRK hash put in the fuse. Example
|
||||
of a key hash is
|
||||
41066b564c6ffcef40ccbc1e0a5d0d519604000c785d97bbefd25e4d288d1c8b.
|
||||
Otherwise leave this empty.
|
||||
|
||||
if PPC
|
||||
|
||||
config BOOTSCRIPT_COPY_RAM
|
||||
bool "Secure boot copies boot script to RAM"
|
||||
help
|
||||
On systems that support chain of trust booting, a number of addresses
|
||||
are required to set variables that are used in the copying and then
|
||||
verification of different parts of the system. If enabled, the subsequent
|
||||
options are for what location to use in each step.
|
||||
|
||||
config BS_ADDR_DEVICE
|
||||
hex "Address in RAM for bs_device"
|
||||
depends on BOOTSCRIPT_COPY_RAM
|
||||
|
||||
config BS_SIZE
|
||||
hex "The size of bs_size which is the amount read from bs_device"
|
||||
depends on BOOTSCRIPT_COPY_RAM
|
||||
|
||||
config BS_ADDR_RAM
|
||||
hex "Address in RAM for bs_ram"
|
||||
depends on BOOTSCRIPT_COPY_RAM
|
||||
|
||||
config BS_HDR_ADDR_DEVICE
|
||||
hex "Address in RAM for bs_hdr_device"
|
||||
depends on BOOTSCRIPT_COPY_RAM
|
||||
|
||||
config BS_HDR_SIZE
|
||||
hex "The size of bs_hdr_size which is the amount read from bs_hdr_device"
|
||||
depends on BOOTSCRIPT_COPY_RAM
|
||||
|
||||
config BS_HDR_ADDR_RAM
|
||||
hex "Address in RAM for bs_hdr_ram"
|
||||
depends on BOOTSCRIPT_COPY_RAM
|
||||
|
||||
config BOOTSCRIPT_HDR_ADDR
|
||||
hex "CONFIG_BOOTSCRIPT_HDR_ADDR"
|
||||
default BS_ADDR_RAM if BOOTSCRIPT_COPY_RAM
|
||||
|
||||
endif
|
||||
|
||||
config SYS_FSL_SRK_LE
|
||||
def_bool y
|
||||
depends on ARM
|
||||
|
||||
config KEY_REVOCATION
|
||||
def_bool y
|
||||
|
||||
endmenu
|
||||
|
||||
config DEEP_SLEEP
|
||||
bool "Enable SoC deep sleep feature"
|
||||
depends on ARCH_T1024 || ARCH_T1040 || ARCH_T1042 || ARCH_LS1021A
|
||||
default y
|
||||
help
|
||||
Indicates this SoC supports deep sleep feature. If deep sleep is
|
||||
supported, core will start to execute uboot when wakes up.
|
||||
|
||||
config LAYERSCAPE_NS_ACCESS
|
||||
bool "Layerscape non-secure access support"
|
||||
depends on ARCH_LS1021A || FSL_LSCH2
|
||||
|
||||
config PCIE1
|
||||
bool "PCIe controller #1"
|
||||
depends on LAYERSCAPE_NS_ACCESS || PPC
|
||||
|
||||
config PCIE2
|
||||
bool "PCIe controller #2"
|
||||
depends on LAYERSCAPE_NS_ACCESS || PPC
|
||||
|
||||
config PCIE3
|
||||
bool "PCIe controller #3"
|
||||
depends on LAYERSCAPE_NS_ACCESS || PPC
|
||||
|
||||
config PCIE4
|
||||
bool "PCIe controller #4"
|
||||
depends on LAYERSCAPE_NS_ACCESS || PPC
|
||||
|
||||
config FSL_USE_PCA9547_MUX
|
||||
bool "Enable PCA9547 I2C Mux on Freescale boards"
|
||||
depends on PPC || ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3
|
||||
help
|
||||
This option enables the PCA9547 I2C mux on Freescale boards.
|
||||
|
||||
config VID
|
||||
bool "Enable Freescale VID"
|
||||
depends on (PPC || ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3) && (I2C || DM_I2C)
|
||||
help
|
||||
This option enables setting core voltage based on individual
|
||||
values saved in SoC fuses.
|
||||
|
||||
config SPL_VID
|
||||
bool "Enable Freescale VID in SPL"
|
||||
depends on (PPC || ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3) && (SPL_I2C || DM_SPL_I2C)
|
||||
help
|
||||
This option enables setting core voltage based on individual
|
||||
values saved in SoC fuses, in SPL.
|
||||
|
||||
if VID || SPL_VID
|
||||
|
||||
config VID_FLS_ENV
|
||||
string "Environment variable for overriding VDD"
|
||||
help
|
||||
This option allows for specifying the environment variable
|
||||
to check to override VDD information.
|
||||
|
||||
config VOL_MONITOR_INA220
|
||||
bool "Enable the INA220 voltage monitor read"
|
||||
help
|
||||
This option enables INA220 voltage monitor read
|
||||
functionality. It is used by the common VID driver.
|
||||
|
||||
config VOL_MONITOR_IR36021_READ
|
||||
bool "Enable the IR36021 voltage monitor read"
|
||||
help
|
||||
This option enables IR36021 voltage monitor read
|
||||
functionality. It is used by the common VID driver.
|
||||
|
||||
config VOL_MONITOR_IR36021_SET
|
||||
bool "Enable the IR36021 voltage monitor set"
|
||||
help
|
||||
This option enables IR36021 voltage monitor set
|
||||
functionality. It is used by the common VID driver.
|
||||
|
||||
config VOL_MONITOR_LTC3882_READ
|
||||
bool "Enable the LTC3882 voltage monitor read"
|
||||
help
|
||||
This option enables LTC3882 voltage monitor read
|
||||
functionality. It is used by the common VID driver.
|
||||
|
||||
config VOL_MONITOR_LTC3882_SET
|
||||
bool "Enable the LTC3882 voltage monitor set"
|
||||
help
|
||||
This option enables LTC3882 voltage monitor set
|
||||
functionality. It is used by the common VID driver.
|
||||
|
||||
config VOL_MONITOR_ISL68233_READ
|
||||
bool "Enable the ISL68233 voltage monitor read"
|
||||
help
|
||||
This option enables ISL68233 voltage monitor read
|
||||
functionality. It is used by the common VID driver.
|
||||
|
||||
config VOL_MONITOR_ISL68233_SET
|
||||
bool "Enable the ISL68233 voltage monitor set"
|
||||
help
|
||||
This option enables ISL68233 voltage monitor set
|
||||
functionality. It is used by the common VID driver.
|
||||
|
||||
endif
|
||||
|
||||
config SYS_FSL_NUM_CC_PLLS
|
||||
int "Number of clock control PLLs"
|
||||
depends on MPC85xx || FSL_LSCH2 || FSL_LSCH3 || ARCH_LS1021A || ARCH_LS1028A
|
||||
default 2 if ARCH_LS1021A || ARCH_LS1028A || FSL_LSCH2
|
||||
default 6 if FSL_LSCH3 || MPC85xx
|
||||
|
||||
config SYS_FSL_ESDHC_BE
|
||||
bool
|
||||
|
||||
config SYS_FSL_IFC_BE
|
||||
bool
|
||||
|
||||
config FSL_QIXIS
|
||||
bool "Enable QIXIS support"
|
||||
depends on PPC || ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3
|
||||
|
||||
config QIXIS_I2C_ACCESS
|
||||
bool "Access to QIXIS is over i2c"
|
||||
depends on FSL_QIXIS
|
||||
default y
|
||||
|
||||
config HAS_FSL_DR_USB
|
||||
def_bool y
|
||||
depends on USB_EHCI_HCD && PPC
|
||||
|
||||
config SYS_DPAA_FMAN
|
||||
bool
|
||||
|
||||
endmenu
|
@ -2,6 +2,12 @@
|
||||
#
|
||||
# Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
|
||||
ifndef CONFIG_CPU_BIG_ENDIAN
|
||||
CONFIG_SYS_LITTLE_ENDIAN = 1
|
||||
else
|
||||
CONFIG_SYS_BIG_ENDIAN = 1
|
||||
endif
|
||||
|
||||
ifdef CONFIG_SYS_LITTLE_ENDIAN
|
||||
KBUILD_LDFLAGS += -EL
|
||||
PLATFORM_CPPFLAGS += -mlittle-endian
|
||||
@ -21,3 +27,6 @@ PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections -fno-common
|
||||
|
||||
# Needed for relocation
|
||||
LDFLAGS_FINAL += -pie --gc-sections
|
||||
|
||||
# Load address for standalone apps
|
||||
CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000
|
||||
|
@ -10,7 +10,7 @@ OUTPUT_ARCH(arc)
|
||||
ENTRY(_start)
|
||||
SECTIONS
|
||||
{
|
||||
. = CONFIG_TEXT_BASE;
|
||||
. = CONFIG_SYS_TEXT_BASE;
|
||||
__image_copy_start = .;
|
||||
. = ALIGN(1024);
|
||||
__ivt_start = .;
|
||||
@ -39,8 +39,8 @@ SECTIONS
|
||||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
__u_boot_list : {
|
||||
KEEP(*(SORT(__u_boot_list*)));
|
||||
.u_boot_list : {
|
||||
KEEP(*(SORT(.u_boot_list*)));
|
||||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
|
@ -8,8 +8,6 @@ dtb-$(CONFIG_TARGET_EMSDP) += emsdp.dtb
|
||||
dtb-$(CONFIG_TARGET_HSDK) += hsdk.dtb hsdk-4xd.dtb
|
||||
dtb-$(CONFIG_TARGET_IOT_DEVKIT) += iot_devkit.dtb
|
||||
|
||||
include $(srctree)/scripts/Makefile.dts
|
||||
|
||||
targets += $(dtb-y)
|
||||
|
||||
DTC_FLAGS += -R 4 -p 0x1000
|
||||
|
@ -6,4 +6,6 @@
|
||||
#ifndef __ASM_ARC_CONFIG_H_
|
||||
#define __ASM_ARC_CONFIG_H_
|
||||
|
||||
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
||||
|
||||
#endif /*__ASM_ARC_CONFIG_H_ */
|
||||
|
@ -22,18 +22,16 @@ static int cleanup_before_linux(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
__weak int board_prep_linux(struct bootm_headers *images) { return 0; }
|
||||
__weak int board_prep_linux(bootm_headers_t *images) { return 0; }
|
||||
|
||||
/* Subcommand: PREP */
|
||||
static int boot_prep_linux(struct bootm_headers *images)
|
||||
static int boot_prep_linux(bootm_headers_t *images)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (CONFIG_IS_ENABLED(LMB)) {
|
||||
ret = image_setup_linux(images);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
ret = image_setup_linux(images);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return board_prep_linux(images);
|
||||
}
|
||||
@ -49,7 +47,7 @@ __weak void board_jump_and_run(ulong entry, int zero, int arch, uint params)
|
||||
}
|
||||
|
||||
/* Subcommand: GO */
|
||||
static void boot_jump_linux(struct bootm_headers *images, int flag)
|
||||
static void boot_jump_linux(bootm_headers_t *images, int flag)
|
||||
{
|
||||
ulong kernel_entry;
|
||||
unsigned int r0, r2;
|
||||
@ -79,7 +77,7 @@ static void boot_jump_linux(struct bootm_headers *images, int flag)
|
||||
board_jump_and_run(kernel_entry, r0, 0, r2);
|
||||
}
|
||||
|
||||
int do_bootm_linux(int flag, int argc, char *argv[], struct bootm_headers *images)
|
||||
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
|
||||
{
|
||||
/* No need for those on ARC */
|
||||
if ((flag & BOOTM_STATE_OS_BD_T) || (flag & BOOTM_STATE_OS_CMDLINE))
|
||||
|
@ -476,9 +476,9 @@ static void __slc_rgn_op(unsigned long paddr, unsigned long sz, const int op)
|
||||
static void arc_ioc_setup(void)
|
||||
{
|
||||
/* IOC Aperture start is equal to DDR start */
|
||||
unsigned int ap_base = CFG_SYS_SDRAM_BASE;
|
||||
unsigned int ap_base = CONFIG_SYS_SDRAM_BASE;
|
||||
/* IOC Aperture size is equal to DDR size */
|
||||
long ap_size = CFG_SYS_SDRAM_SIZE;
|
||||
long ap_size = CONFIG_SYS_SDRAM_SIZE;
|
||||
|
||||
/* Unsupported configuration. See [ NOTE 2 ] for more details. */
|
||||
if (!slc_exists())
|
||||
|
@ -4,7 +4,6 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <clock_legacy.h>
|
||||
#include <init.h>
|
||||
#include <malloc.h>
|
||||
#include <vsprintf.h>
|
||||
@ -19,8 +18,8 @@ int arch_cpu_init(void)
|
||||
{
|
||||
timer_init();
|
||||
|
||||
gd->cpu_clk = get_board_sys_clk();
|
||||
gd->ram_size = CFG_SYS_SDRAM_SIZE;
|
||||
gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
|
||||
gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
|
||||
|
||||
cache_init();
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <config.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/arcregs.h>
|
||||
#include <system-constants.h>
|
||||
|
||||
ENTRY(_start)
|
||||
/* Setup interrupt vector base that matches "__text_start" */
|
||||
@ -87,7 +86,7 @@ ENTRY(_start)
|
||||
#endif
|
||||
|
||||
/* Establish C runtime stack and frame */
|
||||
mov %sp, SYS_INIT_SP_ADDR
|
||||
mov %sp, CONFIG_SYS_INIT_SP_ADDR
|
||||
mov %fp, %sp
|
||||
|
||||
/* Allocate reserved area from current top of stack */
|
||||
|
359
arch/arm/Kconfig
359
arch/arm/Kconfig
@ -8,7 +8,6 @@ config ARM64
|
||||
bool
|
||||
select PHYS_64BIT
|
||||
select SYS_CACHE_SHIFT_6
|
||||
imply SPL_SEPARATE_BSS
|
||||
|
||||
config ARM64_CRC32
|
||||
bool "Enable support for CRC32 instruction"
|
||||
@ -20,23 +19,6 @@ config ARM64_CRC32
|
||||
not be present on all ARMv8.0, but is always present on ARMv8.1 and
|
||||
newer.
|
||||
|
||||
config COUNTER_FREQUENCY
|
||||
int "Timer clock frequency"
|
||||
depends on ARM64 || CPU_V7A
|
||||
default 8000000 if IMX8 || MX7 || MX6UL || MX6ULL
|
||||
default 24000000 if ARCH_SUNXI || ARCH_EXYNOS || ROCKCHIP_RK3128 || \
|
||||
ROCKCHIP_RK3288 || ROCKCHIP_RK322X || ROCKCHIP_RK3036
|
||||
default 25000000 if ARCH_LX2160A || ARCH_LX2162A || ARCH_LS1088A
|
||||
default 100000000 if ARCH_ZYNQMP
|
||||
default 0
|
||||
help
|
||||
For platforms with ARMv8-A and ARMv7-A which features a system
|
||||
counter, those platforms needs software to program the counter
|
||||
frequency. Setup time clock frequency for certain platform.
|
||||
0 means no need to configure the system counter frequency.
|
||||
For platforms needs the frequency set in U-Boot with a
|
||||
pre-defined value, should have the macro defined as a non-zero value.
|
||||
|
||||
config POSITION_INDEPENDENT
|
||||
bool "Generate position-independent pre-relocation code"
|
||||
depends on ARM64 || CPU_V7A
|
||||
@ -75,10 +57,6 @@ config SYS_INIT_SP_BSS_OFFSET
|
||||
that the early malloc region, global data (gd), and early stack usage
|
||||
do not overlap any appended DTB.
|
||||
|
||||
config SPL_SYS_NO_VECTOR_TABLE
|
||||
depends on SPL
|
||||
bool
|
||||
|
||||
config LINUX_KERNEL_IMAGE_HEADER
|
||||
depends on ARM64
|
||||
bool
|
||||
@ -93,7 +71,7 @@ config LNX_KRNL_IMG_TEXT_OFFSET_BASE
|
||||
depends on LINUX_KERNEL_IMAGE_HEADER
|
||||
hex
|
||||
help
|
||||
The value subtracted from CONFIG_TEXT_BASE to calculate the
|
||||
The value subtracted from CONFIG_SYS_TEXT_BASE to calculate the
|
||||
TEXT_OFFSET value written to the Linux kernel image header.
|
||||
|
||||
config GICV2
|
||||
@ -289,7 +267,6 @@ config CPU_ARM926EJS
|
||||
bool
|
||||
select SYS_CACHE_SHIFT_5
|
||||
imply SYS_ARM_MMU
|
||||
imply SPL_SEPARATE_BSS
|
||||
|
||||
config CPU_ARM946ES
|
||||
bool
|
||||
@ -300,7 +277,6 @@ config CPU_ARM1136
|
||||
bool
|
||||
select SYS_CACHE_SHIFT_5
|
||||
imply SYS_ARM_MMU
|
||||
imply SPL_SEPARATE_BSS
|
||||
|
||||
config CPU_ARM1176
|
||||
bool
|
||||
@ -330,6 +306,16 @@ config CPU_V7R
|
||||
select SYS_ARM_MPU
|
||||
select SYS_CACHE_SHIFT_6
|
||||
|
||||
config CPU_PXA
|
||||
bool
|
||||
select SYS_CACHE_SHIFT_5
|
||||
imply SYS_ARM_MMU
|
||||
|
||||
config CPU_SA1100
|
||||
bool
|
||||
select SYS_CACHE_SHIFT_5
|
||||
imply SYS_ARM_MMU
|
||||
|
||||
config SYS_CPU
|
||||
default "arm720t" if CPU_ARM720T
|
||||
default "arm920t" if CPU_ARM920T
|
||||
@ -340,6 +326,8 @@ config SYS_CPU
|
||||
default "armv7" if CPU_V7A
|
||||
default "armv7" if CPU_V7R
|
||||
default "armv7m" if CPU_V7M
|
||||
default "pxa" if CPU_PXA
|
||||
default "sa1100" if CPU_SA1100
|
||||
default "armv8" if ARM64
|
||||
|
||||
config SYS_ARM_ARCH
|
||||
@ -353,11 +341,14 @@ config SYS_ARM_ARCH
|
||||
default 7 if CPU_V7A
|
||||
default 7 if CPU_V7M
|
||||
default 7 if CPU_V7R
|
||||
default 5 if CPU_PXA
|
||||
default 4 if CPU_SA1100
|
||||
default 8 if ARM64
|
||||
|
||||
choice
|
||||
prompt "Select the ARM data write cache policy"
|
||||
default SYS_ARM_CACHE_WRITETHROUGH if TARGET_BCMCYGNUS || RZA1
|
||||
default SYS_ARM_CACHE_WRITETHROUGH if TARGET_BCMCYGNUS || \
|
||||
CPU_PXA || RZA1
|
||||
default SYS_ARM_CACHE_WRITEBACK
|
||||
|
||||
config SYS_ARM_CACHE_WRITEBACK
|
||||
@ -382,12 +373,6 @@ config SYS_ARM_CACHE_WRITEALLOC
|
||||
write is performed.
|
||||
endchoice
|
||||
|
||||
config ARCH_VERY_EARLY_INIT
|
||||
bool
|
||||
|
||||
config SPL_ARCH_VERY_EARLY_INIT
|
||||
bool
|
||||
|
||||
config ARCH_CPU_INIT
|
||||
bool "Enable ARCH_CPU_INIT"
|
||||
help
|
||||
@ -413,6 +398,13 @@ config ARM_SMCCC
|
||||
This should be enabled if U-Boot needs to communicate with system
|
||||
firmware (for example, PSCI) according to SMCCC.
|
||||
|
||||
config SEMIHOSTING
|
||||
bool "support boot from semihosting"
|
||||
help
|
||||
In emulated environments, semihosting is a way for
|
||||
the hosted environment to call out to the emulator to
|
||||
retrieve files from the host machine.
|
||||
|
||||
config SYS_THUMB_BUILD
|
||||
bool "Build U-Boot using the Thumb instruction set"
|
||||
depends on !ARM64
|
||||
@ -442,15 +434,6 @@ config TPL_SYS_THUMB_BUILD
|
||||
density. For ARM architectures that support Thumb2 this flag will
|
||||
result in Thumb2 code generated by GCC.
|
||||
|
||||
config SYS_L2_PL310
|
||||
bool "ARM PL310 L2 cache controller"
|
||||
help
|
||||
Enable support for ARM PL310 L2 cache controller in U-Boot
|
||||
|
||||
config SPL_SYS_L2_PL310
|
||||
bool "ARM PL310 L2 cache controller in SPL"
|
||||
help
|
||||
Enable support for ARM PL310 L2 cache controller in SPL
|
||||
|
||||
config SYS_L2CACHE_OFF
|
||||
bool "L2cache off"
|
||||
@ -465,6 +448,9 @@ config ENABLE_ARM_SOC_BOOT0_HOOK
|
||||
values, then choose this option, and create a file included as
|
||||
<asm/arch/boot0.h> which contains the required assembler code.
|
||||
|
||||
config ARM_CORTEX_CPU_IS_UP
|
||||
bool
|
||||
|
||||
config USE_ARCH_MEMCPY
|
||||
bool "Use an assembly optimized implementation of memcpy"
|
||||
default y if !ARM64
|
||||
@ -553,12 +539,6 @@ config ARM64_SUPPORT_AARCH32
|
||||
help
|
||||
This ARM64 system supports AArch32 execution state.
|
||||
|
||||
config IPROC
|
||||
bool
|
||||
|
||||
config S5P
|
||||
def_bool y if ARCH_EXYNOS || ARCH_S5PC1XX
|
||||
|
||||
choice
|
||||
prompt "Target select"
|
||||
default TARGET_HIKEY
|
||||
@ -584,19 +564,17 @@ config ARCH_KIRKWOOD
|
||||
select BOARD_EARLY_INIT_F
|
||||
select CPU_ARM926EJS
|
||||
select GPIO_EXTRA_HEADER
|
||||
select TIMER
|
||||
|
||||
config ARCH_MVEBU
|
||||
bool "Marvell MVEBU family (Armada XP/375/38x/3700/7K/8K)"
|
||||
select DM
|
||||
select DM_ETH
|
||||
select DM_SERIAL
|
||||
select DM_SPI
|
||||
select DM_SPI_FLASH
|
||||
select GPIO_EXTRA_HEADER
|
||||
select SPL_DM_SPI if SPL
|
||||
select SPL_DM_SPI_FLASH if SPL
|
||||
select SPL_TIMER if SPL
|
||||
select TIMER if !ARM64
|
||||
select OF_CONTROL
|
||||
select OF_SEPARATE
|
||||
select SPI
|
||||
@ -606,8 +584,6 @@ config ARCH_ORION5X
|
||||
bool "Marvell Orion"
|
||||
select CPU_ARM926EJS
|
||||
select GPIO_EXTRA_HEADER
|
||||
select SPL_SEPARATE_BSS if SPL
|
||||
select TIMER
|
||||
|
||||
config TARGET_STV0991
|
||||
bool "Support stv0991"
|
||||
@ -634,6 +610,24 @@ config ARCH_BCM283X
|
||||
imply CMD_DM
|
||||
imply FAT_WRITE
|
||||
|
||||
config ARCH_BCM63158
|
||||
bool "Broadcom BCM63158 family"
|
||||
select DM
|
||||
select OF_CONTROL
|
||||
imply CMD_DM
|
||||
|
||||
config ARCH_BCM68360
|
||||
bool "Broadcom BCM68360 family"
|
||||
select DM
|
||||
select OF_CONTROL
|
||||
imply CMD_DM
|
||||
|
||||
config ARCH_BCM6858
|
||||
bool "Broadcom BCM6858 family"
|
||||
select DM
|
||||
select OF_CONTROL
|
||||
imply CMD_DM
|
||||
|
||||
config ARCH_BCMSTB
|
||||
bool "Broadcom BCM7XXX family"
|
||||
select CPU_V7A
|
||||
@ -641,17 +635,10 @@ config ARCH_BCMSTB
|
||||
select GPIO_EXTRA_HEADER
|
||||
select OF_CONTROL
|
||||
imply CMD_DM
|
||||
imply OF_HAS_PRIOR_STAGE
|
||||
help
|
||||
This enables support for Broadcom ARM-based set-top box
|
||||
chipsets, including the 7445 family of chips.
|
||||
|
||||
config ARCH_BCMBCA
|
||||
bool "Broadcom broadband chip family"
|
||||
select DM
|
||||
select OF_CONTROL
|
||||
imply CMD_DM
|
||||
|
||||
config TARGET_VEXPRESS_CA9X4
|
||||
bool "Support vexpress_ca9x4"
|
||||
select CPU_V7A
|
||||
@ -661,7 +648,6 @@ config TARGET_BCMCYGNUS
|
||||
bool "Support bcmcygnus"
|
||||
select CPU_V7A
|
||||
select GPIO_EXTRA_HEADER
|
||||
select IPROC
|
||||
imply BCM_SF2_ETH
|
||||
imply BCM_SF2_ETH_GMAC
|
||||
imply CMD_HASH
|
||||
@ -693,6 +679,7 @@ config ARCH_EXYNOS
|
||||
select DM
|
||||
select DM_GPIO
|
||||
select DM_I2C
|
||||
select DM_ETH
|
||||
select DM_KEYBOARD
|
||||
select DM_SERIAL
|
||||
select DM_SPI
|
||||
@ -720,13 +707,12 @@ config ARCH_HIGHBANK
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select OF_CONTROL
|
||||
select OF_BOARD
|
||||
select CLK
|
||||
select CLK_CCF
|
||||
select AHCI
|
||||
select DM_ETH
|
||||
select PHYS_64BIT
|
||||
select TIMER
|
||||
select SP804_TIMER
|
||||
imply OF_HAS_PRIOR_STAGE
|
||||
|
||||
config ARCH_INTEGRATOR
|
||||
bool "ARM Ltd. Integrator family"
|
||||
@ -756,6 +742,7 @@ config ARCH_KEYSTONE
|
||||
select CMD_POWEROFF
|
||||
select CPU_V7A
|
||||
select DDR_SPD
|
||||
select GPIO_EXTRA_HEADER
|
||||
select SUPPORT_SPL
|
||||
select SYS_ARCH_TIMER
|
||||
select SYS_THUMB_BUILD
|
||||
@ -778,8 +765,6 @@ config ARCH_OMAP2PLUS
|
||||
select SUPPORT_SPL
|
||||
imply TI_SYSC if DM && OF_CONTROL
|
||||
imply FIT
|
||||
imply DM_EVENT
|
||||
imply SPL_SEPARATE_BSS
|
||||
|
||||
config ARCH_MESON
|
||||
bool "Amlogic Meson"
|
||||
@ -819,29 +804,24 @@ config ARCH_LPC32XX
|
||||
config ARCH_IMX8
|
||||
bool "NXP i.MX8 platform"
|
||||
select ARM64
|
||||
select SYS_FSL_HAS_SEC
|
||||
select SYS_FSL_SEC_COMPAT_4
|
||||
select SYS_FSL_SEC_LE
|
||||
select DM
|
||||
select GPIO_EXTRA_HEADER
|
||||
select MACH_IMX
|
||||
select OF_CONTROL
|
||||
select ENABLE_ARM_SOC_BOOT0_HOOK
|
||||
imply DM_EVENT
|
||||
|
||||
config ARCH_IMX8M
|
||||
bool "NXP i.MX8M platform"
|
||||
select ARM64
|
||||
select GPIO_EXTRA_HEADER
|
||||
select MACH_IMX
|
||||
select SYS_FSL_HAS_SEC
|
||||
select SYS_FSL_HAS_SEC if IMX_HAB
|
||||
select SYS_FSL_SEC_COMPAT_4
|
||||
select SYS_FSL_SEC_LE
|
||||
select SYS_I2C_MXC
|
||||
select DM
|
||||
select SUPPORT_SPL
|
||||
imply CMD_DM
|
||||
imply DM_EVENT
|
||||
|
||||
config ARCH_IMX8ULP
|
||||
bool "NXP i.MX8ULP platform"
|
||||
@ -851,22 +831,7 @@ config ARCH_IMX8ULP
|
||||
select OF_CONTROL
|
||||
select SUPPORT_SPL
|
||||
select GPIO_EXTRA_HEADER
|
||||
select MISC
|
||||
select IMX_SENTINEL
|
||||
imply CMD_DM
|
||||
imply DM_EVENT
|
||||
|
||||
config ARCH_IMX9
|
||||
bool "NXP i.MX9 platform"
|
||||
select ARM64
|
||||
select DM
|
||||
select MACH_IMX
|
||||
select SUPPORT_SPL
|
||||
select GPIO_EXTRA_HEADER
|
||||
select MISC
|
||||
select IMX_SENTINEL
|
||||
imply CMD_DM
|
||||
imply DM_EVENT
|
||||
|
||||
config ARCH_IMXRT
|
||||
bool "NXP i.MXRT platform"
|
||||
@ -902,11 +867,10 @@ config ARCH_MX31
|
||||
|
||||
config ARCH_MX7ULP
|
||||
bool "NXP MX7ULP"
|
||||
select BOARD_POSTCLK_INIT
|
||||
select CPU_V7A
|
||||
select GPIO_EXTRA_HEADER
|
||||
select MACH_IMX
|
||||
select SYS_FSL_HAS_SEC
|
||||
select SYS_FSL_HAS_SEC if IMX_HAB
|
||||
select SYS_FSL_SEC_COMPAT_4
|
||||
select SYS_FSL_SEC_LE
|
||||
select ROM_UNIFIED_SECTIONS
|
||||
@ -919,8 +883,7 @@ config ARCH_MX7
|
||||
select CPU_V7A
|
||||
select GPIO_EXTRA_HEADER
|
||||
select MACH_IMX
|
||||
select MXC_GPT_HCLK
|
||||
select SYS_FSL_HAS_SEC
|
||||
select SYS_FSL_HAS_SEC if IMX_HAB
|
||||
select SYS_FSL_SEC_COMPAT_4
|
||||
select SYS_FSL_SEC_LE
|
||||
imply BOARD_EARLY_INIT_F
|
||||
@ -929,18 +892,19 @@ config ARCH_MX7
|
||||
|
||||
config ARCH_MX6
|
||||
bool "Freescale MX6"
|
||||
select BOARD_POSTCLK_INIT
|
||||
select CPU_V7A
|
||||
select GPIO_EXTRA_HEADER
|
||||
select MACH_IMX
|
||||
select MXC_GPT_HCLK
|
||||
select SYS_FSL_HAS_SEC
|
||||
select SYS_FSL_SEC_COMPAT_4
|
||||
select SYS_FSL_SEC_LE
|
||||
select SYS_L2_PL310 if !SYS_L2CACHE_OFF
|
||||
imply MXC_GPIO
|
||||
imply SYS_THUMB_BUILD
|
||||
imply SPL_SEPARATE_BSS
|
||||
|
||||
if ARCH_MX6
|
||||
config SPL_LDSCRIPT
|
||||
default "arch/arm/mach-omap2/u-boot-spl.lds"
|
||||
endif
|
||||
|
||||
config ARCH_MX5
|
||||
bool "Freescale MX5"
|
||||
@ -956,48 +920,31 @@ config ARCH_NEXELL
|
||||
select DM
|
||||
select GPIO_EXTRA_HEADER
|
||||
|
||||
config ARCH_NPCM
|
||||
bool "Support Nuvoton SoCs"
|
||||
select DM
|
||||
select OF_CONTROL
|
||||
imply CMD_DM
|
||||
|
||||
config ARCH_APPLE
|
||||
bool "Apple SoCs"
|
||||
select ARM64
|
||||
select BLK
|
||||
select CLK
|
||||
select CMD_USB
|
||||
select DM
|
||||
select DM_GPIO
|
||||
select DM_KEYBOARD
|
||||
select DM_MAILBOX
|
||||
select DM_RESET
|
||||
select DM_SERIAL
|
||||
select DM_SPI
|
||||
select DM_USB
|
||||
select VIDEO
|
||||
select DM_VIDEO
|
||||
select IOMMU
|
||||
select LINUX_KERNEL_IMAGE_HEADER
|
||||
select OF_BOARD_SETUP
|
||||
select OF_CONTROL
|
||||
select PINCTRL
|
||||
select OF_BOARD
|
||||
select POSITION_INDEPENDENT
|
||||
select POWER_DOMAIN
|
||||
select REGMAP
|
||||
select SPI
|
||||
select SYSCON
|
||||
select SYSRESET
|
||||
select SYSRESET_WATCHDOG
|
||||
select SYSRESET_WATCHDOG_AUTO
|
||||
select USB
|
||||
imply CMD_DM
|
||||
imply CMD_GPT
|
||||
imply DISTRO_DEFAULTS
|
||||
imply OF_HAS_PRIOR_STAGE
|
||||
|
||||
config ARCH_OWL
|
||||
bool "Actions Semi OWL SoCs"
|
||||
select DM
|
||||
select DM_ETH
|
||||
select DM_SERIAL
|
||||
select GPIO_EXTRA_HEADER
|
||||
select OWL_SERIAL
|
||||
@ -1017,7 +964,6 @@ config ARCH_QEMU
|
||||
imply DM_RNG
|
||||
imply DM_RTC
|
||||
imply RTC_PL031
|
||||
imply OF_HAS_PRIOR_STAGE
|
||||
|
||||
config ARCH_RMOBILE
|
||||
bool "Renesas ARM SoCs"
|
||||
@ -1060,6 +1006,7 @@ config ARCH_SOCFPGA
|
||||
select SPL_DM_SERIAL
|
||||
select SPL_LIBCOMMON_SUPPORT
|
||||
select SPL_LIBGENERIC_SUPPORT
|
||||
select SPL_NAND_SUPPORT if SPL_NAND_DENALI
|
||||
select SPL_OF_CONTROL
|
||||
select SPL_SEPARATE_BSS if TARGET_SOCFPGA_SOC64
|
||||
select SPL_SERIAL
|
||||
@ -1097,10 +1044,9 @@ config ARCH_SUNXI
|
||||
select CMD_USB if DISTRO_DEFAULTS && USB_HOST
|
||||
select CLK
|
||||
select DM
|
||||
select DM_ETH
|
||||
select DM_GPIO
|
||||
select DM_I2C if I2C
|
||||
select DM_SPI if SPI
|
||||
select DM_SPI_FLASH if SPI
|
||||
select DM_KEYBOARD
|
||||
select DM_MMC if MMC
|
||||
select DM_SCSI if SCSI
|
||||
@ -1109,7 +1055,6 @@ config ARCH_SUNXI
|
||||
select OF_BOARD_SETUP
|
||||
select OF_CONTROL
|
||||
select OF_SEPARATE
|
||||
select PINCTRL
|
||||
select SPECIFY_CONSOLE_INDEX
|
||||
select SPL_SEPARATE_BSS if SPL
|
||||
select SPL_STACK_R if SPL
|
||||
@ -1175,30 +1120,20 @@ config ARCH_VERSAL
|
||||
select ARM64
|
||||
select CLK
|
||||
select DM
|
||||
select DM_ETH if NET
|
||||
select DM_MMC if MMC
|
||||
select DM_SERIAL
|
||||
select GICV3
|
||||
select GPIO_EXTRA_HEADER
|
||||
select OF_CONTROL
|
||||
select SOC_DEVICE
|
||||
imply BOARD_LATE_INIT
|
||||
imply ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
|
||||
config ARCH_VERSAL_NET
|
||||
bool "Support Xilinx Versal NET Platform"
|
||||
select ARM64
|
||||
select CLK
|
||||
select DM
|
||||
select DM_MMC if MMC
|
||||
select DM_SERIAL
|
||||
select OF_CONTROL
|
||||
imply BOARD_LATE_INIT
|
||||
imply ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
|
||||
config ARCH_VF610
|
||||
bool "Freescale Vybrid"
|
||||
select CPU_V7A
|
||||
select GPIO_EXTRA_HEADER
|
||||
select IOMUX_SHARE_CONF_REG
|
||||
select MACH_IMX
|
||||
select SYS_FSL_ERRATUM_ESDHC111
|
||||
imply CMD_MTDPARTS
|
||||
@ -1206,16 +1141,16 @@ config ARCH_VF610
|
||||
|
||||
config ARCH_ZYNQ
|
||||
bool "Xilinx Zynq based platform"
|
||||
select ARM_TWD_TIMER
|
||||
select CLK
|
||||
select CLK_ZYNQ
|
||||
select CPU_V7A
|
||||
select DEBUG_UART_BOARD_INIT if SPL && DEBUG_UART
|
||||
select DM
|
||||
select DM_ETH if NET
|
||||
select DM_MMC if MMC
|
||||
select DM_SERIAL
|
||||
select DM_SPI
|
||||
select DM_SPI_FLASH
|
||||
select GPIO_EXTRA_HEADER
|
||||
select OF_CONTROL
|
||||
select SPI
|
||||
select SPL_BOARD_INIT if SPL
|
||||
@ -1225,9 +1160,7 @@ config ARCH_ZYNQ
|
||||
select SPL_DM_SPI_FLASH if SPL
|
||||
select SPL_OF_CONTROL if SPL
|
||||
select SPL_SEPARATE_BSS if SPL
|
||||
select SPL_TIMER if SPL
|
||||
select SUPPORT_SPL
|
||||
select TIMER
|
||||
imply ARCH_EARLY_INIT_R
|
||||
imply BOARD_LATE_INIT
|
||||
imply CMD_CLK
|
||||
@ -1241,8 +1174,10 @@ config ARCH_ZYNQMP_R5
|
||||
select CLK
|
||||
select CPU_V7R
|
||||
select DM
|
||||
select DM_ETH if NET
|
||||
select DM_MMC if MMC
|
||||
select DM_SERIAL
|
||||
select GPIO_EXTRA_HEADER
|
||||
select OF_CONTROL
|
||||
imply CMD_DM
|
||||
imply DM_USB_GADGET
|
||||
@ -1252,14 +1187,15 @@ config ARCH_ZYNQMP
|
||||
select ARM64
|
||||
select CLK
|
||||
select DM
|
||||
select DEBUG_UART_BOARD_INIT if SPL && DEBUG_UART
|
||||
imply DM_MAILBOX
|
||||
select DM_ETH if NET
|
||||
select DM_MAILBOX
|
||||
select DM_MMC if MMC
|
||||
select DM_SERIAL
|
||||
select DM_SPI if SPI
|
||||
select DM_SPI_FLASH if DM_SPI
|
||||
imply FIRMWARE
|
||||
select FIRMWARE
|
||||
select GICV2
|
||||
select GPIO_EXTRA_HEADER
|
||||
select OF_CONTROL
|
||||
select SPL_BOARD_INIT if SPL
|
||||
select SPL_CLK if SPL
|
||||
@ -1267,10 +1203,10 @@ config ARCH_ZYNQMP
|
||||
select SPL_DM_SPI if SPI && SPL_DM
|
||||
select SPL_DM_SPI_FLASH if SPL_DM_SPI
|
||||
select SPL_DM_MAILBOX if SPL
|
||||
imply SPL_FIRMWARE if SPL
|
||||
select SPL_FIRMWARE if SPL
|
||||
select SPL_SEPARATE_BSS if SPL
|
||||
select SUPPORT_SPL
|
||||
imply ZYNQMP_IPI if DM_MAILBOX
|
||||
select ZYNQMP_IPI
|
||||
select SOC_DEVICE
|
||||
imply BOARD_LATE_INIT
|
||||
imply CMD_DM
|
||||
@ -1278,7 +1214,6 @@ config ARCH_ZYNQMP
|
||||
imply FAT_WRITE
|
||||
imply MP
|
||||
imply DM_USB_GADGET
|
||||
imply ZYNQMP_GPIO_MODEPIN if DM_GPIO && USB
|
||||
|
||||
config ARCH_TEGRA
|
||||
bool "NVIDIA Tegra"
|
||||
@ -1286,25 +1221,34 @@ config ARCH_TEGRA
|
||||
imply DISTRO_DEFAULTS
|
||||
imply FAT_WRITE
|
||||
|
||||
config ARCH_VEXPRESS64
|
||||
bool "Support ARMv8 Arm Ltd. VExpress based boards and models"
|
||||
config TARGET_VEXPRESS64_AEMV8A
|
||||
bool "Support vexpress_aemv8a"
|
||||
select ARM64
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select GPIO_EXTRA_HEADER
|
||||
select PL01X_SERIAL
|
||||
select OF_CONTROL
|
||||
select CLK
|
||||
select BLK
|
||||
select MTD_NOR_FLASH if MTD
|
||||
select FLASH_CFI_DRIVER if MTD
|
||||
select ENV_IS_IN_FLASH if MTD
|
||||
imply DISTRO_DEFAULTS
|
||||
|
||||
config TARGET_CORSTONE1000
|
||||
bool "Support Corstone1000 Platform"
|
||||
config TARGET_VEXPRESS64_BASE_FVP
|
||||
bool "Support Versatile Express ARMv8a FVP BASE model"
|
||||
select ARM64
|
||||
select GPIO_EXTRA_HEADER
|
||||
select PL01X_SERIAL
|
||||
select SEMIHOSTING
|
||||
|
||||
config TARGET_VEXPRESS64_JUNO
|
||||
bool "Support Versatile Express Juno Development Platform"
|
||||
select ARM64
|
||||
select GPIO_EXTRA_HEADER
|
||||
select PL01X_SERIAL
|
||||
select DM
|
||||
select OF_CONTROL
|
||||
select OF_BOARD
|
||||
select CLK
|
||||
select DM_SERIAL
|
||||
select ARM_PSCI_FW
|
||||
select PSCI_RESET
|
||||
select DM_ETH
|
||||
select BLK
|
||||
select USB
|
||||
|
||||
config TARGET_TOTAL_COMPUTE
|
||||
bool "Support Total Compute Platform"
|
||||
@ -1603,7 +1547,6 @@ config TARGET_LS1021AQDS
|
||||
select CPU_V7_HAS_NONSEC
|
||||
select CPU_V7_HAS_VIRT
|
||||
select LS1_DEEP_SLEEP
|
||||
select PEN_ADDR_BIG_ENDIAN
|
||||
select SUPPORT_SPL
|
||||
select SYS_FSL_DDR
|
||||
select FSL_DDR_INTERACTIVE
|
||||
@ -1622,7 +1565,6 @@ config TARGET_LS1021ATWR
|
||||
select CPU_V7_HAS_NONSEC
|
||||
select CPU_V7_HAS_VIRT
|
||||
select LS1_DEEP_SLEEP
|
||||
select PEN_ADDR_BIG_ENDIAN
|
||||
select SUPPORT_SPL
|
||||
select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
|
||||
select GPIO_EXTRA_HEADER
|
||||
@ -1687,7 +1629,6 @@ config TARGET_LS1021AIOT
|
||||
select CPU_V7A
|
||||
select CPU_V7_HAS_NONSEC
|
||||
select CPU_V7_HAS_VIRT
|
||||
select PEN_ADDR_BIG_ENDIAN
|
||||
select SUPPORT_SPL
|
||||
select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
|
||||
select GPIO_EXTRA_HEADER
|
||||
@ -1802,6 +1743,7 @@ config TARGET_SL28
|
||||
select DM_I2C
|
||||
select DM_MMC
|
||||
select DM_SPI_FLASH
|
||||
select DM_ETH
|
||||
select DM_MDIO
|
||||
select PCI
|
||||
select DM_RNG
|
||||
@ -1819,25 +1761,16 @@ config TARGET_SL28
|
||||
help
|
||||
Support for Kontron SMARC-sAL28 board.
|
||||
|
||||
config TARGET_TEN64
|
||||
bool "Support ten64"
|
||||
select ARCH_LS1088A
|
||||
select ARCH_MISC_INIT
|
||||
select ARM64
|
||||
select ARMV8_MULTIENTRY
|
||||
select ARCH_SUPPORT_TFABOOT
|
||||
select BOARD_LATE_INIT
|
||||
select SUPPORT_SPL
|
||||
select FSL_DDR_INTERACTIVE if !SD_BOOT
|
||||
config TARGET_COLIBRI_PXA270
|
||||
bool "Support colibri_pxa270"
|
||||
select CPU_PXA
|
||||
select GPIO_EXTRA_HEADER
|
||||
help
|
||||
Support for Traverse Technologies Ten64 board, based
|
||||
on NXP LS1088A.
|
||||
|
||||
config ARCH_UNIPHIER
|
||||
bool "Socionext UniPhier SoCs"
|
||||
select BOARD_LATE_INIT
|
||||
select DM
|
||||
select DM_ETH
|
||||
select DM_GPIO
|
||||
select DM_I2C
|
||||
select DM_MMC
|
||||
@ -1883,7 +1816,7 @@ config ARCH_STM32
|
||||
imply CMD_DM
|
||||
|
||||
config ARCH_STI
|
||||
bool "Support STMicroelectronics SoCs"
|
||||
bool "Support STMicrolectronics SoCs"
|
||||
select BLK
|
||||
select CPU_V7A
|
||||
select DM
|
||||
@ -1911,6 +1844,7 @@ config ARCH_STM32MP
|
||||
select OF_SYSTEM_SETUP
|
||||
select PINCTRL
|
||||
select REGMAP
|
||||
select SUPPORT_SPL
|
||||
select SYSCON
|
||||
select SYSRESET
|
||||
select SYS_THUMB_BUILD
|
||||
@ -1920,7 +1854,6 @@ config ARCH_STM32MP
|
||||
imply OF_LIBFDT_OVERLAY
|
||||
imply ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
imply USE_PREBOOT
|
||||
imply TIMESTAMP
|
||||
help
|
||||
Support for STM32MP SoC family developed by STMicroelectronics,
|
||||
MPUs based on ARM cortex A core
|
||||
@ -1932,7 +1865,7 @@ config ARCH_STM32MP
|
||||
config ARCH_ROCKCHIP
|
||||
bool "Support Rockchip SoCs"
|
||||
select BLK
|
||||
select BINMAN if SPL_OPTEE || SPL
|
||||
select BINMAN if SPL_OPTEE || (SPL && !ARM64)
|
||||
select DM
|
||||
select DM_GPIO
|
||||
select DM_I2C
|
||||
@ -1972,8 +1905,6 @@ config ARCH_OCTEONTX
|
||||
select OF_LIVE
|
||||
select BOARD_LATE_INIT
|
||||
select SYS_CACHE_SHIFT_7
|
||||
select SYS_PCI_64BIT if PCI
|
||||
imply OF_HAS_PRIOR_STAGE
|
||||
|
||||
config ARCH_OCTEONTX2
|
||||
bool "Support OcteonTX2 SoCs"
|
||||
@ -1985,8 +1916,6 @@ config ARCH_OCTEONTX2
|
||||
select OF_LIVE
|
||||
select BOARD_LATE_INIT
|
||||
select SYS_CACHE_SHIFT_7
|
||||
select SYS_PCI_64BIT if PCI
|
||||
imply OF_HAS_PRIOR_STAGE
|
||||
|
||||
config TARGET_THUNDERX_88XX
|
||||
bool "Support ThunderX 88xx"
|
||||
@ -2010,24 +1939,6 @@ config TARGET_DURIAN
|
||||
Support for durian platform.
|
||||
It has 2GB Sdram, uart and pcie.
|
||||
|
||||
config TARGET_POMELO
|
||||
bool "Support Phytium Pomelo Platform"
|
||||
select ARM64
|
||||
select DM
|
||||
select AHCI
|
||||
select SCSI_AHCI
|
||||
select AHCI_PCI
|
||||
select BLK
|
||||
select PCI
|
||||
select DM_PCI
|
||||
select SCSI
|
||||
select DM_SCSI
|
||||
select DM_SERIAL
|
||||
imply CMD_PCI
|
||||
help
|
||||
Support for pomelo platform.
|
||||
It has 8GB Sdram, uart and pcie.
|
||||
|
||||
config TARGET_PRESIDIO_ASIC
|
||||
bool "Support Cortina Presidio ASIC Platform"
|
||||
select ARM64
|
||||
@ -2041,14 +1952,6 @@ config TARGET_XENGUEST_ARM64
|
||||
select LINUX_KERNEL_IMAGE_HEADER
|
||||
select XEN_SERIAL
|
||||
select SSCANF
|
||||
imply OF_HAS_PRIOR_STAGE
|
||||
|
||||
config ARCH_GXP
|
||||
bool "Support HPE GXP SoCs"
|
||||
select DM
|
||||
select OF_CONTROL
|
||||
imply CMD_DM
|
||||
|
||||
endchoice
|
||||
|
||||
config SUPPORT_PASSING_ATAGS
|
||||
@ -2083,7 +1986,6 @@ config SERIAL_TAG
|
||||
|
||||
config STATIC_MACH_TYPE
|
||||
bool "Statically define the Machine ID number"
|
||||
default y if TARGET_DS109 || TARGET_NOKIA_RX51 || TARGET_DS414 || DEFAULT_DEVICE_TREE = "sun7i-a20-icnova-swac"
|
||||
help
|
||||
When booting via ATAGs, enable this option if we know the correct
|
||||
machine ID number to use at compile time. Some systems will be
|
||||
@ -2092,10 +1994,6 @@ config STATIC_MACH_TYPE
|
||||
config MACH_TYPE
|
||||
int "Machine ID number"
|
||||
depends on STATIC_MACH_TYPE
|
||||
default 527 if TARGET_DS109
|
||||
default 1955 if TARGET_NOKIA_RX51
|
||||
default 3036 if TARGET_DS414
|
||||
default 4283 if DEFAULT_DEVICE_TREE = "sun7i-a20-icnova-swac"
|
||||
help
|
||||
When booting via ATAGs, the machine type must be passed as a number.
|
||||
For the full list see https://www.arm.linux.org.uk/developer/machines
|
||||
@ -2125,13 +2023,20 @@ config TI_SECURE_DEVICE
|
||||
authenticated) and the code. See the doc/README.ti-secure
|
||||
file for further details.
|
||||
|
||||
config SYS_KWD_CONFIG
|
||||
string "kwbimage config file path"
|
||||
depends on ARCH_KIRKWOOD || ARCH_MVEBU
|
||||
default "arch/arm/mach-mvebu/kwbimage.cfg"
|
||||
if AM43XX || AM33XX || OMAP54XX || ARCH_KEYSTONE
|
||||
config ISW_ENTRY_ADDR
|
||||
hex "Address in memory or XIP address of bootloader entry point"
|
||||
default 0x402F4000 if AM43XX
|
||||
default 0x402F0400 if AM33XX
|
||||
default 0x40301350 if OMAP54XX
|
||||
help
|
||||
Path within the source directory to the kwbimage.cfg file to use
|
||||
when packaging the U-Boot image for use.
|
||||
After any reset, the boot ROM searches the boot media for a valid
|
||||
boot image. For non-XIP devices, the ROM then copies the image into
|
||||
internal memory. For all boot modes, after the ROM processes the
|
||||
boot image it eventually computes the entry point address depending
|
||||
on the device type (secure/non-secure), boot media (xip/non-xip) and
|
||||
image headers.
|
||||
endif
|
||||
|
||||
source "arch/arm/mach-apple/Kconfig"
|
||||
|
||||
@ -2141,16 +2046,12 @@ source "arch/arm/mach-at91/Kconfig"
|
||||
|
||||
source "arch/arm/mach-bcm283x/Kconfig"
|
||||
|
||||
source "arch/arm/mach-bcmbca/Kconfig"
|
||||
|
||||
source "arch/arm/mach-bcmstb/Kconfig"
|
||||
|
||||
source "arch/arm/mach-davinci/Kconfig"
|
||||
|
||||
source "arch/arm/mach-exynos/Kconfig"
|
||||
|
||||
source "arch/arm/mach-hpe/gxp/Kconfig"
|
||||
|
||||
source "arch/arm/mach-highbank/Kconfig"
|
||||
|
||||
source "arch/arm/mach-integrator/Kconfig"
|
||||
@ -2189,8 +2090,6 @@ source "arch/arm/mach-imx/imx8m/Kconfig"
|
||||
|
||||
source "arch/arm/mach-imx/imx8ulp/Kconfig"
|
||||
|
||||
source "arch/arm/mach-imx/imx9/Kconfig"
|
||||
|
||||
source "arch/arm/mach-imx/imxrt/Kconfig"
|
||||
|
||||
source "arch/arm/mach-imx/mxs/Kconfig"
|
||||
@ -2241,8 +2140,6 @@ source "arch/arm/mach-zynqmp/Kconfig"
|
||||
|
||||
source "arch/arm/mach-versal/Kconfig"
|
||||
|
||||
source "arch/arm/mach-versal-net/Kconfig"
|
||||
|
||||
source "arch/arm/mach-zynqmp-r5/Kconfig"
|
||||
|
||||
source "arch/arm/cpu/armv7/Kconfig"
|
||||
@ -2253,10 +2150,8 @@ source "arch/arm/mach-imx/Kconfig"
|
||||
|
||||
source "arch/arm/mach-nexell/Kconfig"
|
||||
|
||||
source "arch/arm/mach-npcm/Kconfig"
|
||||
|
||||
source "board/armltd/total_compute/Kconfig"
|
||||
source "board/armltd/corstone1000/Kconfig"
|
||||
|
||||
source "board/bosch/shc/Kconfig"
|
||||
source "board/bosch/guardian/Kconfig"
|
||||
source "board/Marvell/octeontx/Kconfig"
|
||||
@ -2264,6 +2159,9 @@ source "board/Marvell/octeontx2/Kconfig"
|
||||
source "board/armltd/vexpress/Kconfig"
|
||||
source "board/armltd/vexpress64/Kconfig"
|
||||
source "board/cortina/presidio-asic/Kconfig"
|
||||
source "board/broadcom/bcm963158/Kconfig"
|
||||
source "board/broadcom/bcm968360bg/Kconfig"
|
||||
source "board/broadcom/bcm968580xref/Kconfig"
|
||||
source "board/broadcom/bcmns3/Kconfig"
|
||||
source "board/cavium/thunderx/Kconfig"
|
||||
source "board/eets/pdu001/Kconfig"
|
||||
@ -2292,19 +2190,22 @@ source "board/hisilicon/poplar/Kconfig"
|
||||
source "board/isee/igep003x/Kconfig"
|
||||
source "board/kontron/sl28/Kconfig"
|
||||
source "board/myir/mys_6ulx/Kconfig"
|
||||
source "board/samsung/common/Kconfig"
|
||||
source "board/siemens/common/Kconfig"
|
||||
source "board/seeed/npi_imx6ull/Kconfig"
|
||||
source "board/socionext/developerbox/Kconfig"
|
||||
source "board/st/stv0991/Kconfig"
|
||||
source "board/tcl/sl50/Kconfig"
|
||||
source "board/traverse/ten64/Kconfig"
|
||||
source "board/toradex/colibri_pxa270/Kconfig"
|
||||
source "board/variscite/dart_6ul/Kconfig"
|
||||
source "board/vscom/baltos/Kconfig"
|
||||
source "board/phytium/durian/Kconfig"
|
||||
source "board/phytium/pomelo/Kconfig"
|
||||
source "board/xen/xenguest_arm64/Kconfig"
|
||||
source "board/keymile/Kconfig"
|
||||
|
||||
source "arch/arm/Kconfig.debug"
|
||||
|
||||
endmenu
|
||||
|
||||
config SPL_LDSCRIPT
|
||||
default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK
|
||||
default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136
|
||||
default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
|
||||
|
@ -10,6 +10,8 @@ arch-$(CONFIG_CPU_ARM720T) =-march=armv4
|
||||
arch-$(CONFIG_CPU_ARM920T) =-march=armv4t
|
||||
arch-$(CONFIG_CPU_ARM926EJS) =-march=armv5te
|
||||
arch-$(CONFIG_CPU_ARM946ES) =-march=armv5te
|
||||
arch-$(CONFIG_CPU_SA1100) =-march=armv4
|
||||
arch-$(CONFIG_CPU_PXA) =
|
||||
arch-$(CONFIG_CPU_ARM1136) =-march=armv5t
|
||||
arch-$(CONFIG_CPU_ARM1176) =-march=armv5t
|
||||
arch-$(CONFIG_CPU_V7A) =$(call cc-option, -march=armv7-a, \
|
||||
@ -38,6 +40,8 @@ tune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi
|
||||
tune-$(CONFIG_CPU_ARM920T) =
|
||||
tune-$(CONFIG_CPU_ARM926EJS) =
|
||||
tune-$(CONFIG_CPU_ARM946ES) =
|
||||
tune-$(CONFIG_CPU_SA1100) =-mtune=strongarm1100
|
||||
tune-$(CONFIG_CPU_PXA) =-mcpu=xscale
|
||||
tune-$(CONFIG_CPU_ARM1136) =
|
||||
tune-$(CONFIG_CPU_ARM1176) =
|
||||
tune-$(CONFIG_CPU_V7A) =-mtune=generic-armv7-a
|
||||
@ -55,11 +59,9 @@ machine-$(CONFIG_ARCH_APPLE) += apple
|
||||
machine-$(CONFIG_ARCH_ASPEED) += aspeed
|
||||
machine-$(CONFIG_ARCH_AT91) += at91
|
||||
machine-$(CONFIG_ARCH_BCM283X) += bcm283x
|
||||
machine-$(CONFIG_ARCH_BCMBCA) += bcmbca
|
||||
machine-$(CONFIG_ARCH_BCMSTB) += bcmstb
|
||||
machine-$(CONFIG_ARCH_DAVINCI) += davinci
|
||||
machine-$(CONFIG_ARCH_EXYNOS) += exynos
|
||||
machine-$(CONFIG_ARCH_GXP) += hpe
|
||||
machine-$(CONFIG_ARCH_HIGHBANK) += highbank
|
||||
machine-$(CONFIG_ARCH_IPQ40XX) += ipq40xx
|
||||
machine-$(CONFIG_ARCH_K3) += k3
|
||||
@ -70,7 +72,6 @@ machine-$(CONFIG_ARCH_MEDIATEK) += mediatek
|
||||
machine-$(CONFIG_ARCH_MESON) += meson
|
||||
machine-$(CONFIG_ARCH_MVEBU) += mvebu
|
||||
machine-$(CONFIG_ARCH_NEXELL) += nexell
|
||||
machine-$(CONFIG_ARCH_NPCM) += npcm
|
||||
machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
|
||||
machine-$(CONFIG_ARCH_ORION5X) += orion5x
|
||||
machine-$(CONFIG_ARCH_OWL) += owl
|
||||
@ -88,13 +89,10 @@ machine-$(CONFIG_ARCH_OCTEONTX) += octeontx
|
||||
machine-$(CONFIG_ARCH_OCTEONTX2) += octeontx2
|
||||
machine-$(CONFIG_ARCH_UNIPHIER) += uniphier
|
||||
machine-$(CONFIG_ARCH_VERSAL) += versal
|
||||
machine-$(CONFIG_ARCH_VERSAL_NET) += versal-net
|
||||
machine-$(CONFIG_ARCH_ZYNQ) += zynq
|
||||
machine-$(CONFIG_ARCH_ZYNQMP) += zynqmp
|
||||
machine-$(CONFIG_ARCH_ZYNQMP_R5) += zynqmp-r5
|
||||
|
||||
machine-$(CONFIG_MACH_IMX) += imx
|
||||
|
||||
machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
|
||||
|
||||
PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
|
||||
@ -104,8 +102,8 @@ libs-y += $(machdirs)
|
||||
head-y := arch/arm/cpu/$(CPU)/start.o
|
||||
|
||||
ifeq ($(CONFIG_SPL_BUILD),y)
|
||||
ifeq ($(CONFIG_SYS_SOC)$(CONFIG_SPL_FRAMEWORK),"mxs")
|
||||
head-y := arch/arm/cpu/arm926ejs/mxs/start.o
|
||||
ifneq ($(CONFIG_SPL_START_S_PATH),)
|
||||
head-y := $(CONFIG_SPL_START_S_PATH:"%"=%)/start.o
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -113,6 +111,16 @@ libs-y += arch/arm/cpu/$(CPU)/
|
||||
libs-y += arch/arm/cpu/
|
||||
libs-y += arch/arm/lib/
|
||||
|
||||
ifeq ($(CONFIG_SPL_BUILD),y)
|
||||
ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(filter $(SOC), mx25 mx5 mx6 mx7 mx35 imx8m imx8 imx8ulp imxrt))
|
||||
libs-y += arch/arm/mach-imx/
|
||||
endif
|
||||
else
|
||||
ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx7 mx7ulp mx31 mx35 mxs imx8m imx8 imx8ulp imxrt vf610))
|
||||
libs-y += arch/arm/mach-imx/
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter $(SOC), kirkwood))
|
||||
libs-y += arch/arm/mach-mvebu/
|
||||
endif
|
||||
|
@ -3,15 +3,23 @@
|
||||
# (C) Copyright 2000-2002
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
|
||||
ifndef CONFIG_STANDALONE_LOAD_ADDR
|
||||
ifneq ($(CONFIG_ARCH_OMAP2PLUS),)
|
||||
CONFIG_STANDALONE_LOAD_ADDR = 0x80300000
|
||||
else
|
||||
CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS_NON_EFI := -fno-pic -ffixed-r9 -ffunction-sections -fdata-sections \
|
||||
-fstack-protector-strong
|
||||
CFLAGS_EFI := -fpic -fshort-wchar
|
||||
|
||||
ifneq ($(LTO_ENABLE)$(CONFIG_USE_PRIVATE_LIBGCC),yy)
|
||||
ifneq ($(CONFIG_LTO)$(CONFIG_USE_PRIVATE_LIBGCC),yy)
|
||||
LDFLAGS_FINAL += --gc-sections
|
||||
endif
|
||||
|
||||
ifneq ($(LTO_ENABLE),y)
|
||||
ifndef CONFIG_LTO
|
||||
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
@ -133,11 +141,11 @@ endif
|
||||
# limit ourselves to the sections we want in the .bin.
|
||||
ifdef CONFIG_ARM64
|
||||
OBJCOPYFLAGS += -j .text -j .secure_text -j .secure_data -j .rodata -j .data \
|
||||
-j __u_boot_list -j .rela.dyn -j .got -j .got.plt \
|
||||
-j .u_boot_list -j .rela.dyn -j .got -j .got.plt \
|
||||
-j .binman_sym_table -j .text_rest
|
||||
else
|
||||
OBJCOPYFLAGS += -j .text -j .secure_text -j .secure_data -j .rodata -j .hash \
|
||||
-j .data -j .got -j .got.plt -j __u_boot_list -j .rel.dyn \
|
||||
-j .data -j .got -j .got.plt -j .u_boot_list -j .rel.dyn \
|
||||
-j .binman_sym_table -j .text_rest
|
||||
endif
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <linux/linkage.h>
|
||||
|
||||
#ifndef CONFIG_SYS_PHY_UBOOT_BASE
|
||||
#define CONFIG_SYS_PHY_UBOOT_BASE CFG_SYS_UBOOT_BASE
|
||||
#define CONFIG_SYS_PHY_UBOOT_BASE CONFIG_SYS_UBOOT_BASE
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -88,7 +88,7 @@ cpu_init_crit:
|
||||
|
||||
/* Prepare to disable the MMU */
|
||||
adr r2, mmu_disable_phys
|
||||
sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - CONFIG_TEXT_BASE)
|
||||
sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - CONFIG_SYS_TEXT_BASE)
|
||||
b mmu_disable
|
||||
|
||||
.align 5
|
||||
|
@ -7,6 +7,7 @@ extra-y = start.o
|
||||
|
||||
obj-y += cpu.o
|
||||
|
||||
obj-$(CONFIG_EP93XX) += ep93xx/
|
||||
obj-$(CONFIG_IMX) += imx/
|
||||
|
||||
# some files can only build in ARM mode
|
||||
|
19
arch/arm/cpu/arm920t/ep93xx/Makefile
Normal file
19
arch/arm/cpu/arm920t/ep93xx/Makefile
Normal file
@ -0,0 +1,19 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# Cirrus Logic EP93xx CPU-specific Makefile
|
||||
#
|
||||
# Copyright (C) 2009 Matthias Kaehlcke <matthias@kaehlcke.net>
|
||||
#
|
||||
# Copyright (C) 2004, 2005
|
||||
# Cory T. Tusar, Videon Central, Inc., <ctusar@videon-central.com>
|
||||
#
|
||||
# Copyright (C) 2006
|
||||
# Dominic Rath <Dominic.Rath@gmx.de>
|
||||
#
|
||||
# Based on an original Makefile, which is
|
||||
#
|
||||
# (C) Copyright 2000, 2001, 2002
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
|
||||
obj-y = cpu.o led.o speed.o timer.o
|
||||
obj-y += lowlevel_init.o
|
37
arch/arm/cpu/arm920t/ep93xx/cpu.c
Normal file
37
arch/arm/cpu/arm920t/ep93xx/cpu.c
Normal file
@ -0,0 +1,37 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Cirrus Logic EP93xx CPU-specific support.
|
||||
*
|
||||
* Copyright (C) 2009 Matthias Kaehlcke <matthias@kaehlcke.net>
|
||||
*
|
||||
* Copyright (C) 2004, 2005
|
||||
* Cory T. Tusar, Videon Central, Inc., <ctusar@videon-central.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <asm/arch/ep93xx.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
/* We reset the CPU by generating a 1-->0 transition on DeviceCfg bit 31. */
|
||||
extern void reset_cpu(void)
|
||||
{
|
||||
struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
|
||||
uint32_t value;
|
||||
|
||||
/* Unlock DeviceCfg and set SWRST */
|
||||
writel(0xAA, &syscon->sysswlock);
|
||||
value = readl(&syscon->devicecfg);
|
||||
value |= SYSCON_DEVICECFG_SWRST;
|
||||
writel(value, &syscon->devicecfg);
|
||||
|
||||
/* Unlock DeviceCfg and clear SWRST */
|
||||
writel(0xAA, &syscon->sysswlock);
|
||||
value = readl(&syscon->devicecfg);
|
||||
value &= ~SYSCON_DEVICECFG_SWRST;
|
||||
writel(value, &syscon->devicecfg);
|
||||
|
||||
/* Dying... */
|
||||
while (1)
|
||||
; /* noop */
|
||||
}
|
85
arch/arm/cpu/arm920t/ep93xx/led.c
Normal file
85
arch/arm/cpu/arm920t/ep93xx/led.c
Normal file
@ -0,0 +1,85 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2010, 2009 Matthias Kaehlcke <matthias@kaehlcke.net>
|
||||
*/
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/ep93xx.h>
|
||||
#include <config.h>
|
||||
#include <status_led.h>
|
||||
|
||||
static uint8_t saved_state[2] = {CONFIG_LED_STATUS_OFF, CONFIG_LED_STATUS_OFF};
|
||||
static uint32_t gpio_pin[2] = {1 << CONFIG_LED_STATUS_GREEN,
|
||||
1 << CONFIG_LED_STATUS_RED};
|
||||
|
||||
static inline void switch_LED_on(uint8_t led)
|
||||
{
|
||||
register struct gpio_regs *gpio = (struct gpio_regs *)GPIO_BASE;
|
||||
|
||||
writel(readl(&gpio->pedr) | gpio_pin[led], &gpio->pedr);
|
||||
saved_state[led] = CONFIG_LED_STATUS_ON;
|
||||
}
|
||||
|
||||
static inline void switch_LED_off(uint8_t led)
|
||||
{
|
||||
register struct gpio_regs *gpio = (struct gpio_regs *)GPIO_BASE;
|
||||
|
||||
writel(readl(&gpio->pedr) & ~gpio_pin[led], &gpio->pedr);
|
||||
saved_state[led] = CONFIG_LED_STATUS_OFF;
|
||||
}
|
||||
|
||||
void red_led_on(void)
|
||||
{
|
||||
switch_LED_on(CONFIG_LED_STATUS_RED);
|
||||
}
|
||||
|
||||
void red_led_off(void)
|
||||
{
|
||||
switch_LED_off(CONFIG_LED_STATUS_RED);
|
||||
}
|
||||
|
||||
void green_led_on(void)
|
||||
{
|
||||
switch_LED_on(CONFIG_LED_STATUS_GREEN);
|
||||
}
|
||||
|
||||
void green_led_off(void)
|
||||
{
|
||||
switch_LED_off(CONFIG_LED_STATUS_GREEN);
|
||||
}
|
||||
|
||||
void __led_init(led_id_t mask, int state)
|
||||
{
|
||||
__led_set(mask, state);
|
||||
}
|
||||
|
||||
void __led_toggle(led_id_t mask)
|
||||
{
|
||||
if (CONFIG_LED_STATUS_RED == mask) {
|
||||
if (CONFIG_LED_STATUS_ON == saved_state[CONFIG_LED_STATUS_RED])
|
||||
red_led_off();
|
||||
else
|
||||
red_led_on();
|
||||
} else if (CONFIG_LED_STATUS_GREEN == mask) {
|
||||
if (CONFIG_LED_STATUS_ON ==
|
||||
saved_state[CONFIG_LED_STATUS_GREEN])
|
||||
green_led_off();
|
||||
else
|
||||
green_led_on();
|
||||
}
|
||||
}
|
||||
|
||||
void __led_set(led_id_t mask, int state)
|
||||
{
|
||||
if (CONFIG_LED_STATUS_RED == mask) {
|
||||
if (CONFIG_LED_STATUS_ON == state)
|
||||
red_led_on();
|
||||
else
|
||||
red_led_off();
|
||||
} else if (CONFIG_LED_STATUS_GREEN == mask) {
|
||||
if (CONFIG_LED_STATUS_ON == state)
|
||||
green_led_on();
|
||||
else
|
||||
green_led_off();
|
||||
}
|
||||
}
|
457
arch/arm/cpu/arm920t/ep93xx/lowlevel_init.S
Normal file
457
arch/arm/cpu/arm920t/ep93xx/lowlevel_init.S
Normal file
@ -0,0 +1,457 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Low-level initialization for EP93xx
|
||||
*
|
||||
* Copyright (C) 2009 Matthias Kaehlcke <matthias@kaehlcke.net>
|
||||
* Copyright (C) 2013
|
||||
* Sergey Kostanabev <sergey.kostanbaev <at> fairwaves.ru>
|
||||
*
|
||||
* Copyright (C) 2006 Dominic Rath <Dominic.Rath@gmx.de>
|
||||
* Copyright (C) 2006 Cirrus Logic Inc.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <asm/arch-ep93xx/ep93xx.h>
|
||||
|
||||
/*
|
||||
/* Configure the SDRAM based on the supplied settings.
|
||||
*
|
||||
* Input: r0 - SDRAM DEVCFG register
|
||||
* r2 - configuration for SDRAM chips
|
||||
* Output: none
|
||||
* Modifies: r3, r4
|
||||
*/
|
||||
ep93xx_sdram_config:
|
||||
/* Program the SDRAM device configuration register. */
|
||||
ldr r3, =SDRAM_BASE
|
||||
#ifdef CONFIG_EDB93XX_SDCS0
|
||||
str r0, [r3, #SDRAM_OFF_DEVCFG0]
|
||||
#endif
|
||||
#ifdef CONFIG_EDB93XX_SDCS1
|
||||
str r0, [r3, #SDRAM_OFF_DEVCFG1]
|
||||
#endif
|
||||
#ifdef CONFIG_EDB93XX_SDCS2
|
||||
str r0, [r3, #SDRAM_OFF_DEVCFG2]
|
||||
#endif
|
||||
#ifdef CONFIG_EDB93XX_SDCS3
|
||||
str r0, [r3, #SDRAM_OFF_DEVCFG3]
|
||||
#endif
|
||||
|
||||
/* Set the Initialize and MRS bits (issue continuous NOP commands
|
||||
* (INIT & MRS set))
|
||||
*/
|
||||
ldr r4, =(EP93XX_SDRAMCTRL_GLOBALCFG_INIT | \
|
||||
EP93XX_SDRAMCTRL_GLOBALCFG_MRS | \
|
||||
EP93XX_SDRAMCTRL_GLOBALCFG_CKE)
|
||||
str r4, [r3, #SDRAM_OFF_GLCONFIG]
|
||||
|
||||
/* Delay for 200us. */
|
||||
mov r4, #0x3000
|
||||
delay1:
|
||||
subs r4, r4, #1
|
||||
bne delay1
|
||||
|
||||
/* Clear the MRS bit to issue a precharge all. */
|
||||
ldr r4, =(EP93XX_SDRAMCTRL_GLOBALCFG_INIT | \
|
||||
EP93XX_SDRAMCTRL_GLOBALCFG_CKE)
|
||||
str r4, [r3, #SDRAM_OFF_GLCONFIG]
|
||||
|
||||
/* Temporarily set the refresh timer to 0x10. Make it really low so
|
||||
* that refresh cycles are generated.
|
||||
*/
|
||||
ldr r4, =0x10
|
||||
str r4, [r3, #SDRAM_OFF_REFRSHTIMR]
|
||||
|
||||
/* Delay for at least 80 SDRAM clock cycles. */
|
||||
mov r4, #80
|
||||
delay2:
|
||||
subs r4, r4, #1
|
||||
bne delay2
|
||||
|
||||
/* Set the refresh timer to the fastest required for any device
|
||||
* that might be used. Set 9.6 ms refresh time.
|
||||
*/
|
||||
ldr r4, =0x01e0
|
||||
str r4, [r3, #SDRAM_OFF_REFRSHTIMR]
|
||||
|
||||
/* Select mode register update mode. */
|
||||
ldr r4, =(EP93XX_SDRAMCTRL_GLOBALCFG_CKE | \
|
||||
EP93XX_SDRAMCTRL_GLOBALCFG_MRS)
|
||||
str r4, [r3, #SDRAM_OFF_GLCONFIG]
|
||||
|
||||
/* Program the mode register on the SDRAM by performing fake read */
|
||||
ldr r4, [r2]
|
||||
|
||||
/* Select normal operating mode. */
|
||||
ldr r4, =EP93XX_SDRAMCTRL_GLOBALCFG_CKE
|
||||
str r4, [r3, #SDRAM_OFF_GLCONFIG]
|
||||
|
||||
/* Return to the caller. */
|
||||
mov pc, lr
|
||||
|
||||
/*
|
||||
* Test to see if the SDRAM has been configured in a usable mode.
|
||||
*
|
||||
* Input: r0 - Test address of SDRAM
|
||||
* Output: r0 - 0 -- Test OK, -1 -- Failed
|
||||
* Modifies: r0-r5
|
||||
*/
|
||||
ep93xx_sdram_test:
|
||||
/* Load the test patterns to be written to SDRAM. */
|
||||
ldr r1, =0xf00dface
|
||||
ldr r2, =0xdeadbeef
|
||||
ldr r3, =0x08675309
|
||||
ldr r4, =0xdeafc0ed
|
||||
|
||||
/* Store the test patterns to SDRAM. */
|
||||
stmia r0, {r1-r4}
|
||||
|
||||
/* Load the test patterns from SDRAM one at a time and compare them
|
||||
* to the actual pattern.
|
||||
*/
|
||||
ldr r5, [r0]
|
||||
cmp r5, r1
|
||||
ldreq r5, [r0, #0x0004]
|
||||
cmpeq r5, r2
|
||||
ldreq r5, [r0, #0x0008]
|
||||
cmpeq r5, r3
|
||||
ldreq r5, [r0, #0x000c]
|
||||
cmpeq r5, r4
|
||||
|
||||
/* Return -1 if a mismatch was encountered, 0 otherwise. */
|
||||
mvnne r0, #0xffffffff
|
||||
moveq r0, #0x00000000
|
||||
|
||||
/* Return to the caller. */
|
||||
mov pc, lr
|
||||
|
||||
/*
|
||||
* Determine the size of the SDRAM. Use data=address for the scan.
|
||||
*
|
||||
* Input: r0 - Start SDRAM address
|
||||
* Return: r0 - Single block size
|
||||
* r1 - Valid block mask
|
||||
* r2 - Total block count
|
||||
* Modifies: r0-r5
|
||||
*/
|
||||
ep93xx_sdram_size:
|
||||
/* Store zero at offset zero. */
|
||||
str r0, [r0]
|
||||
|
||||
/* Start checking for an alias at 1MB into SDRAM. */
|
||||
ldr r1, =0x00100000
|
||||
|
||||
/* Store the offset at the current offset. */
|
||||
check_block_size:
|
||||
str r1, [r0, r1]
|
||||
|
||||
/* Read back from zero. */
|
||||
ldr r2, [r0]
|
||||
|
||||
/* Stop searching of an alias was found. */
|
||||
cmp r1, r2
|
||||
beq found_block_size
|
||||
|
||||
/* Advance to the next power of two boundary. */
|
||||
mov r1, r1, lsl #1
|
||||
|
||||
/* Loop back if the size has not reached 256MB. */
|
||||
cmp r1, #0x10000000
|
||||
bne check_block_size
|
||||
|
||||
/* A full 256MB of memory was found, so return it now. */
|
||||
ldr r0, =0x10000000
|
||||
ldr r1, =0x00000000
|
||||
ldr r2, =0x00000001
|
||||
mov pc, lr
|
||||
|
||||
/* An alias was found. See if the first block is 128MB in size. */
|
||||
found_block_size:
|
||||
cmp r1, #0x08000000
|
||||
|
||||
/* The first block is 128MB, so there is no further memory. Return it
|
||||
* now.
|
||||
*/
|
||||
ldreq r0, =0x08000000
|
||||
ldreq r1, =0x00000000
|
||||
ldreq r2, =0x00000001
|
||||
moveq pc, lr
|
||||
|
||||
/* Save the block size, set the block address bits to zero, and
|
||||
* initialize the block count to one.
|
||||
*/
|
||||
mov r3, r1
|
||||
ldr r4, =0x00000000
|
||||
ldr r5, =0x00000001
|
||||
|
||||
/* Look for additional blocks of memory by searching for non-aliases. */
|
||||
find_blocks:
|
||||
/* Store zero back to address zero. It may be overwritten. */
|
||||
str r0, [r0]
|
||||
|
||||
/* Advance to the next power of two boundary. */
|
||||
mov r1, r1, lsl #1
|
||||
|
||||
/* Store the offset at the current offset. */
|
||||
str r1, [r0, r1]
|
||||
|
||||
/* Read back from zero. */
|
||||
ldr r2, [r0]
|
||||
|
||||
/* See if a non-alias was found. */
|
||||
cmp r1, r2
|
||||
|
||||
/* If a non-alias was found, then or in the block address bit and
|
||||
* multiply the block count by two (since there are two unique
|
||||
* blocks, one with this bit zero and one with it one).
|
||||
*/
|
||||
orrne r4, r4, r1
|
||||
movne r5, r5, lsl #1
|
||||
|
||||
/* Continue searching if there are more address bits to check. */
|
||||
cmp r1, #0x08000000
|
||||
bne find_blocks
|
||||
|
||||
/* Return the block size, address mask, and count. */
|
||||
mov r0, r3
|
||||
mov r1, r4
|
||||
mov r2, r5
|
||||
|
||||
/* Return to the caller. */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
.globl lowlevel_init
|
||||
lowlevel_init:
|
||||
|
||||
mov r6, lr
|
||||
|
||||
/* Make sure caches are off and invalidated. */
|
||||
ldr r0, =0x00000000
|
||||
mcr p15, 0, r0, c1, c0, 0
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
/* Turn off the green LED and turn on the red LED. If the red LED
|
||||
* is left on for too long, the external reset circuit described
|
||||
* by application note AN258 will cause the system to reset.
|
||||
*/
|
||||
ldr r1, =EP93XX_LED_DATA
|
||||
ldr r0, [r1]
|
||||
bic r0, r0, #EP93XX_LED_GREEN_ON
|
||||
orr r0, r0, #EP93XX_LED_RED_ON
|
||||
str r0, [r1]
|
||||
|
||||
/* Undo the silly static memory controller programming performed
|
||||
* by the boot rom.
|
||||
*/
|
||||
ldr r0, =SMC_BASE
|
||||
|
||||
/* Set WST1 and WST2 to 31 HCLK cycles (slowest access) */
|
||||
ldr r1, =0x0000fbe0
|
||||
|
||||
/* Reset EP93XX_OFF_SMCBCR0 */
|
||||
ldr r2, [r0]
|
||||
orr r2, r2, r1
|
||||
str r2, [r0]
|
||||
|
||||
ldr r2, [r0, #EP93XX_OFF_SMCBCR1]
|
||||
orr r2, r2, r1
|
||||
str r2, [r0, #EP93XX_OFF_SMCBCR1]
|
||||
|
||||
ldr r2, [r0, #EP93XX_OFF_SMCBCR2]
|
||||
orr r2, r2, r1
|
||||
str r2, [r0, #EP93XX_OFF_SMCBCR2]
|
||||
|
||||
ldr r2, [r0, #EP93XX_OFF_SMCBCR3]
|
||||
orr r2, r2, r1
|
||||
str r2, [r0, #EP93XX_OFF_SMCBCR3]
|
||||
|
||||
ldr r2, [r0, #EP93XX_OFF_SMCBCR6]
|
||||
orr r2, r2, r1
|
||||
str r2, [r0, #EP93XX_OFF_SMCBCR6]
|
||||
|
||||
ldr r2, [r0, #EP93XX_OFF_SMCBCR7]
|
||||
orr r2, r2, r1
|
||||
str r2, [r0, #EP93XX_OFF_SMCBCR7]
|
||||
|
||||
/* Set the PLL1 and processor clock. */
|
||||
ldr r0, =SYSCON_BASE
|
||||
#ifdef CONFIG_EDB9301
|
||||
/* 332MHz, giving a 166MHz processor clock. */
|
||||
ldr r1, = 0x02b49907
|
||||
#else
|
||||
|
||||
#ifdef CONFIG_EDB93XX_INDUSTRIAL
|
||||
/* 384MHz, giving a 196MHz processor clock. */
|
||||
ldr r1, =0x02a4bb38
|
||||
#else
|
||||
/* 400MHz, giving a 200MHz processor clock. */
|
||||
ldr r1, =0x02a4e39e
|
||||
#endif
|
||||
#endif
|
||||
str r1, [r0, #SYSCON_OFF_CLKSET1]
|
||||
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
/* Need to make sure that SDRAM is configured correctly before
|
||||
* coping the code into it.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_EDB93XX_SDCS0
|
||||
mov r11, #SDRAM_DEVCFG0_BASE
|
||||
#endif
|
||||
#ifdef CONFIG_EDB93XX_SDCS1
|
||||
mov r11, #SDRAM_DEVCFG1_BASE
|
||||
#endif
|
||||
#ifdef CONFIG_EDB93XX_SDCS2
|
||||
mov r11, #SDRAM_DEVCFG2_BASE
|
||||
#endif
|
||||
#ifdef CONFIG_EDB93XX_SDCS3
|
||||
ldr r0, =SYSCON_BASE
|
||||
ldr r0, [r0, #SYSCON_OFF_SYSCFG]
|
||||
ands r0, r0, #SYSCON_SYSCFG_LASDO
|
||||
moveq r11, #SDRAM_DEVCFG3_ASD0_BASE
|
||||
movne r11, #SDRAM_DEVCFG3_ASD1_BASE
|
||||
#endif
|
||||
/* See Table 13-5 in EP93xx datasheet for more info about DRAM
|
||||
* register mapping */
|
||||
|
||||
/* Try a 32-bit wide configuration of SDRAM. */
|
||||
ldr r0, =(EP93XX_SDRAMCTRL_DEVCFG_BANKCOUNT | \
|
||||
EP93XX_SDRAMCTRL_DEVCFG_SROMLL | \
|
||||
EP93XX_SDRAMCTRL_DEVCFG_CASLAT_2 | \
|
||||
EP93XX_SDRAMCTRL_DEVCFG_RASTOCAS_2)
|
||||
|
||||
/* Set burst count: 4 and CAS: 2
|
||||
* Burst mode [A11:A10]; CAS [A16:A14]
|
||||
*/
|
||||
orr r2, r11, #0x00008800
|
||||
bl ep93xx_sdram_config
|
||||
|
||||
/* Test the SDRAM. */
|
||||
mov r0, r11
|
||||
bl ep93xx_sdram_test
|
||||
cmp r0, #0x00000000
|
||||
beq ep93xx_sdram_done
|
||||
|
||||
/* Try a 16-bit wide configuration of SDRAM. */
|
||||
ldr r0, =(EP93XX_SDRAMCTRL_DEVCFG_BANKCOUNT | \
|
||||
EP93XX_SDRAMCTRL_DEVCFG_SROMLL | \
|
||||
EP93XX_SDRAMCTRL_DEVCFG_CASLAT_2 | \
|
||||
EP93XX_SDRAMCTRL_DEVCFG_RASTOCAS_2 | \
|
||||
EP93XX_SDRAMCTRL_DEVCFG_EXTBUSWIDTH)
|
||||
|
||||
/* Set burst count: 8, CAS: 2, sequential burst
|
||||
* Accoring to Table 13-3 for 16bit operations mapping must be shifted.
|
||||
* Burst mode [A10:A9]; CAS [A15:A13]
|
||||
*/
|
||||
orr r2, r11, #0x00004600
|
||||
bl ep93xx_sdram_config
|
||||
|
||||
/* Test the SDRAM. */
|
||||
mov r0, r11
|
||||
bl ep93xx_sdram_test
|
||||
cmp r0, #0x00000000
|
||||
beq ep93xx_sdram_done
|
||||
|
||||
/* Turn off the red LED. */
|
||||
ldr r0, =EP93XX_LED_DATA
|
||||
ldr r1, [r0]
|
||||
bic r1, r1, #EP93XX_LED_RED_ON
|
||||
str r1, [r0]
|
||||
|
||||
/* There is no SDRAM so flash the green LED. */
|
||||
flash_green:
|
||||
orr r1, r1, #EP93XX_LED_GREEN_ON
|
||||
str r1, [r0]
|
||||
ldr r2, =0x00010000
|
||||
flash_green_delay_1:
|
||||
subs r2, r2, #1
|
||||
bne flash_green_delay_1
|
||||
bic r1, r1, #EP93XX_LED_GREEN_ON
|
||||
str r1, [r0]
|
||||
ldr r2, =0x00010000
|
||||
flash_green_delay_2:
|
||||
subs r2, r2, #1
|
||||
bne flash_green_delay_2
|
||||
orr r1, r1, #EP93XX_LED_GREEN_ON
|
||||
str r1, [r0]
|
||||
ldr r2, =0x00010000
|
||||
flash_green_delay_3:
|
||||
subs r2, r2, #1
|
||||
bne flash_green_delay_3
|
||||
bic r1, r1, #EP93XX_LED_GREEN_ON
|
||||
str r1, [r0]
|
||||
ldr r2, =0x00050000
|
||||
flash_green_delay_4:
|
||||
subs r2, r2, #1
|
||||
bne flash_green_delay_4
|
||||
b flash_green
|
||||
|
||||
|
||||
ep93xx_sdram_done:
|
||||
ldr r1, =EP93XX_LED_DATA
|
||||
ldr r0, [r1]
|
||||
bic r0, r0, #EP93XX_LED_RED_ON
|
||||
str r0, [r1]
|
||||
|
||||
/* Determine the size of the SDRAM. */
|
||||
mov r0, r11
|
||||
bl ep93xx_sdram_size
|
||||
|
||||
/* Save the SDRAM characteristics. */
|
||||
mov r8, r0
|
||||
mov r9, r1
|
||||
mov r10, r2
|
||||
|
||||
/* Compute total memory size into r1 */
|
||||
mul r1, r8, r10
|
||||
#ifdef CONFIG_EDB93XX_SDCS0
|
||||
ldr r2, [r0, #SDRAM_OFF_DEVCFG0]
|
||||
#endif
|
||||
#ifdef CONFIG_EDB93XX_SDCS1
|
||||
ldr r2, [r0, #SDRAM_OFF_DEVCFG1]
|
||||
#endif
|
||||
#ifdef CONFIG_EDB93XX_SDCS2
|
||||
ldr r2, [r0, #SDRAM_OFF_DEVCFG2]
|
||||
#endif
|
||||
#ifdef CONFIG_EDB93XX_SDCS3
|
||||
ldr r2, [r0, #SDRAM_OFF_DEVCFG3]
|
||||
#endif
|
||||
|
||||
/* Consider small DRAM size as:
|
||||
* < 32Mb for 32bit bus
|
||||
* < 64Mb for 16bit bus
|
||||
*/
|
||||
tst r2, #EP93XX_SDRAMCTRL_DEVCFG_EXTBUSWIDTH
|
||||
moveq r1, r1, lsr #1
|
||||
cmp r1, #0x02000000
|
||||
|
||||
#if defined(CONFIG_EDB9301)
|
||||
/* Set refresh counter to 20ms for small DRAM size, otherwise 9.6ms */
|
||||
movlt r1, #0x03f0
|
||||
movge r1, #0x01e0
|
||||
#else
|
||||
/* Set refresh counter to 30.7ms for small DRAM size, otherwise 15ms */
|
||||
movlt r1, #0x0600
|
||||
movge r1, #0x2f0
|
||||
#endif
|
||||
str r1, [r0, #SDRAM_OFF_REFRSHTIMR]
|
||||
|
||||
/* Save the memory configuration information. */
|
||||
orr r0, r11, #UBOOT_MEMORYCNF_BANK_SIZE
|
||||
stmia r0, {r8-r11}
|
||||
|
||||
mov lr, r6
|
||||
mov pc, lr
|
95
arch/arm/cpu/arm920t/ep93xx/speed.c
Normal file
95
arch/arm/cpu/arm920t/ep93xx/speed.c
Normal file
@ -0,0 +1,95 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Cirrus Logic EP93xx PLL support.
|
||||
*
|
||||
* Copyright (C) 2009 Matthias Kaehlcke <matthias@kaehlcke.net>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/arch/ep93xx.h>
|
||||
#include <asm/io.h>
|
||||
#include <div64.h>
|
||||
|
||||
/*
|
||||
* CONFIG_SYS_CLK_FREQ should be defined as the input frequency of the PLL.
|
||||
*
|
||||
* get_FCLK(), get_HCLK(), get_PCLK() and get_UCLK() return the clock of
|
||||
* the specified bus in HZ.
|
||||
*/
|
||||
|
||||
/*
|
||||
* return the PLL output frequency
|
||||
*
|
||||
* PLL rate = CONFIG_SYS_CLK_FREQ * (X1FBD + 1) * (X2FBD + 1)
|
||||
* / (X2IPD + 1) / 2^PS
|
||||
*/
|
||||
static ulong get_PLLCLK(uint32_t *pllreg)
|
||||
{
|
||||
uint8_t i;
|
||||
const uint32_t clkset = readl(pllreg);
|
||||
uint64_t rate = CONFIG_SYS_CLK_FREQ;
|
||||
rate *= ((clkset >> SYSCON_CLKSET_PLL_X1FBD1_SHIFT) & 0x1f) + 1;
|
||||
rate *= ((clkset >> SYSCON_CLKSET_PLL_X2FBD2_SHIFT) & 0x3f) + 1;
|
||||
do_div(rate, (clkset & 0x1f) + 1); /* X2IPD */
|
||||
for (i = 0; i < ((clkset >> SYSCON_CLKSET_PLL_PS_SHIFT) & 3); i++)
|
||||
rate >>= 1;
|
||||
|
||||
return (ulong)rate;
|
||||
}
|
||||
|
||||
/* return FCLK frequency */
|
||||
ulong get_FCLK(void)
|
||||
{
|
||||
const uint8_t fclk_divisors[] = { 1, 2, 4, 8, 16, 1, 1, 1 };
|
||||
struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
|
||||
|
||||
const uint32_t clkset1 = readl(&syscon->clkset1);
|
||||
const uint8_t fclk_div =
|
||||
fclk_divisors[(clkset1 >> SYSCON_CLKSET1_FCLK_DIV_SHIFT) & 7];
|
||||
const ulong fclk_rate = get_PLLCLK(&syscon->clkset1) / fclk_div;
|
||||
|
||||
return fclk_rate;
|
||||
}
|
||||
|
||||
/* return HCLK frequency */
|
||||
ulong get_HCLK(void)
|
||||
{
|
||||
const uint8_t hclk_divisors[] = { 1, 2, 4, 5, 6, 8, 16, 32 };
|
||||
struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
|
||||
|
||||
const uint32_t clkset1 = readl(&syscon->clkset1);
|
||||
const uint8_t hclk_div =
|
||||
hclk_divisors[(clkset1 >> SYSCON_CLKSET1_HCLK_DIV_SHIFT) & 7];
|
||||
const ulong hclk_rate = get_PLLCLK(&syscon->clkset1) / hclk_div;
|
||||
|
||||
return hclk_rate;
|
||||
}
|
||||
|
||||
/* return PCLK frequency */
|
||||
ulong get_PCLK(void)
|
||||
{
|
||||
const uint8_t pclk_divisors[] = { 1, 2, 4, 8 };
|
||||
struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
|
||||
|
||||
const uint32_t clkset1 = readl(&syscon->clkset1);
|
||||
const uint8_t pclk_div =
|
||||
pclk_divisors[(clkset1 >> SYSCON_CLKSET1_PCLK_DIV_SHIFT) & 3];
|
||||
const ulong pclk_rate = get_HCLK() / pclk_div;
|
||||
|
||||
return pclk_rate;
|
||||
}
|
||||
|
||||
/* return UCLK frequency */
|
||||
ulong get_UCLK(void)
|
||||
{
|
||||
struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
|
||||
ulong uclk_rate;
|
||||
|
||||
const uint32_t value = readl(&syscon->pwrcnt);
|
||||
if (value & SYSCON_PWRCNT_UART_BAUD)
|
||||
uclk_rate = CONFIG_SYS_CLK_FREQ;
|
||||
else
|
||||
uclk_rate = CONFIG_SYS_CLK_FREQ / 2;
|
||||
|
||||
return uclk_rate;
|
||||
}
|
117
arch/arm/cpu/arm920t/ep93xx/timer.c
Normal file
117
arch/arm/cpu/arm920t/ep93xx/timer.c
Normal file
@ -0,0 +1,117 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Cirrus Logic EP93xx timer support.
|
||||
*
|
||||
* Copyright (C) 2009, 2010 Matthias Kaehlcke <matthias@kaehlcke.net>
|
||||
*
|
||||
* Copyright (C) 2004, 2005
|
||||
* Cory T. Tusar, Videon Central, Inc., <ctusar@videon-central.com>
|
||||
*
|
||||
* Based on the original intr.c Cirrus Logic EP93xx Rev D. interrupt support,
|
||||
* author unknown.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <time.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/arch/ep93xx.h>
|
||||
#include <asm/io.h>
|
||||
#include <div64.h>
|
||||
|
||||
#define TIMER_CLKSEL (1 << 3)
|
||||
#define TIMER_ENABLE (1 << 7)
|
||||
|
||||
#define TIMER_FREQ 508469 /* ticks / second */
|
||||
#define TIMER_MAX_VAL 0xFFFFFFFF
|
||||
|
||||
static struct ep93xx_timer
|
||||
{
|
||||
unsigned long long ticks;
|
||||
unsigned long last_read;
|
||||
} timer;
|
||||
|
||||
static inline unsigned long long usecs_to_ticks(unsigned long usecs)
|
||||
{
|
||||
unsigned long long ticks = (unsigned long long)usecs * TIMER_FREQ;
|
||||
do_div(ticks, 1000 * 1000);
|
||||
|
||||
return ticks;
|
||||
}
|
||||
|
||||
static inline void read_timer(void)
|
||||
{
|
||||
struct timer_regs *timer_regs = (struct timer_regs *)TIMER_BASE;
|
||||
const unsigned long now = TIMER_MAX_VAL - readl(&timer_regs->timer3.value);
|
||||
|
||||
if (now >= timer.last_read)
|
||||
timer.ticks += now - timer.last_read;
|
||||
else
|
||||
/* an overflow occurred */
|
||||
timer.ticks += TIMER_MAX_VAL - timer.last_read + now;
|
||||
|
||||
timer.last_read = now;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the number of ticks (in CONFIG_SYS_HZ resolution)
|
||||
*/
|
||||
unsigned long long get_ticks(void)
|
||||
{
|
||||
unsigned long long sys_ticks;
|
||||
|
||||
read_timer();
|
||||
|
||||
sys_ticks = timer.ticks * CONFIG_SYS_HZ;
|
||||
do_div(sys_ticks, TIMER_FREQ);
|
||||
|
||||
return sys_ticks;
|
||||
}
|
||||
|
||||
unsigned long get_timer(unsigned long base)
|
||||
{
|
||||
return get_ticks() - base;
|
||||
}
|
||||
|
||||
void __udelay(unsigned long usec)
|
||||
{
|
||||
unsigned long long target;
|
||||
|
||||
read_timer();
|
||||
|
||||
target = timer.ticks + usecs_to_ticks(usec);
|
||||
|
||||
while (timer.ticks < target)
|
||||
read_timer();
|
||||
}
|
||||
|
||||
int timer_init(void)
|
||||
{
|
||||
struct timer_regs *timer_regs = (struct timer_regs *)TIMER_BASE;
|
||||
|
||||
/* use timer 3 with 508KHz and free running, not enabled now */
|
||||
writel(TIMER_CLKSEL, &timer_regs->timer3.control);
|
||||
|
||||
/* set initial timer value */
|
||||
writel(TIMER_MAX_VAL, &timer_regs->timer3.load);
|
||||
|
||||
/* Enable the timer */
|
||||
writel(TIMER_ENABLE | TIMER_CLKSEL,
|
||||
&timer_regs->timer3.control);
|
||||
|
||||
/* Reset the timer */
|
||||
read_timer();
|
||||
timer.ticks = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is derived from PowerPC code (timebase clock frequency).
|
||||
* On ARM it returns the number of timer ticks per second.
|
||||
*/
|
||||
unsigned long get_tbclk(void)
|
||||
{
|
||||
return CONFIG_SYS_HZ;
|
||||
}
|
8
arch/arm/cpu/arm920t/imx/Makefile
Normal file
8
arch/arm/cpu/arm920t/imx/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# (C) Copyright 2000-2006
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
|
||||
obj-y += generic.o
|
||||
obj-y += speed.o
|
||||
obj-y += timer.o
|
76
arch/arm/cpu/arm920t/imx/generic.c
Normal file
76
arch/arm/cpu/arm920t/imx/generic.c
Normal file
@ -0,0 +1,76 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* arch/arm/mach-imx/generic.c
|
||||
*
|
||||
* author: Sascha Hauer
|
||||
* Created: april 20th, 2004
|
||||
* Copyright: Synertronixx GmbH
|
||||
*
|
||||
* Common code for i.MX machines
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#ifdef CONFIG_IMX
|
||||
|
||||
#include <asm/arch/imx-regs.h>
|
||||
|
||||
void imx_gpio_mode(int gpio_mode)
|
||||
{
|
||||
unsigned int pin = gpio_mode & GPIO_PIN_MASK;
|
||||
unsigned int port = (gpio_mode & GPIO_PORT_MASK) >> 5;
|
||||
unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >> 10;
|
||||
unsigned int tmp;
|
||||
|
||||
/* Pullup enable */
|
||||
if(gpio_mode & GPIO_PUEN)
|
||||
PUEN(port) |= (1<<pin);
|
||||
else
|
||||
PUEN(port) &= ~(1<<pin);
|
||||
|
||||
/* Data direction */
|
||||
if(gpio_mode & GPIO_OUT)
|
||||
DDIR(port) |= 1<<pin;
|
||||
else
|
||||
DDIR(port) &= ~(1<<pin);
|
||||
|
||||
/* Primary / alternate function */
|
||||
if(gpio_mode & GPIO_AF)
|
||||
GPR(port) |= (1<<pin);
|
||||
else
|
||||
GPR(port) &= ~(1<<pin);
|
||||
|
||||
/* use as gpio? */
|
||||
if( ocr == 3 )
|
||||
GIUS(port) |= (1<<pin);
|
||||
else
|
||||
GIUS(port) &= ~(1<<pin);
|
||||
|
||||
/* Output / input configuration */
|
||||
/* FIXME: I'm not very sure about OCR and ICONF, someone
|
||||
* should have a look over it
|
||||
*/
|
||||
if(pin<16) {
|
||||
tmp = OCR1(port);
|
||||
tmp &= ~( 3<<(pin*2));
|
||||
tmp |= (ocr << (pin*2));
|
||||
OCR1(port) = tmp;
|
||||
|
||||
if( gpio_mode & GPIO_AOUT )
|
||||
ICONFA1(port) &= ~( 3<<(pin*2));
|
||||
if( gpio_mode & GPIO_BOUT )
|
||||
ICONFB1(port) &= ~( 3<<(pin*2));
|
||||
} else {
|
||||
tmp = OCR2(port);
|
||||
tmp &= ~( 3<<((pin-16)*2));
|
||||
tmp |= (ocr << ((pin-16)*2));
|
||||
OCR2(port) = tmp;
|
||||
|
||||
if( gpio_mode & GPIO_AOUT )
|
||||
ICONFA2(port) &= ~( 3<<((pin-16)*2));
|
||||
if( gpio_mode & GPIO_BOUT )
|
||||
ICONFB2(port) &= ~( 3<<((pin-16)*2));
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_IMX */
|
85
arch/arm/cpu/arm920t/imx/speed.c
Normal file
85
arch/arm/cpu/arm920t/imx/speed.c
Normal file
@ -0,0 +1,85 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
*
|
||||
* (c) 2004 Sascha Hauer <sascha@saschahauer.de>
|
||||
*/
|
||||
|
||||
|
||||
#include <common.h>
|
||||
#if defined (CONFIG_IMX)
|
||||
|
||||
#include <asm/arch/imx-regs.h>
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* NOTE: This describes the proper use of this file.
|
||||
*
|
||||
* CONFIG_SYS_CLK_FREQ should be defined as the input frequency of the PLL.
|
||||
* SH FIXME: 16780000 in our case
|
||||
* get_FCLK(), get_HCLK(), get_PCLK() and get_UCLK() return the clock of
|
||||
* the specified bus in HZ.
|
||||
*/
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
ulong get_systemPLLCLK(void)
|
||||
{
|
||||
/* FIXME: We assume System_SEL = 0 here */
|
||||
u32 spctl0 = SPCTL0;
|
||||
u32 mfi = (spctl0 >> 10) & 0xf;
|
||||
u32 mfn = spctl0 & 0x3f;
|
||||
u32 mfd = (spctl0 >> 16) & 0x3f;
|
||||
u32 pd = (spctl0 >> 26) & 0xf;
|
||||
|
||||
mfi = mfi<=5 ? 5 : mfi;
|
||||
|
||||
return (2*(CONFIG_SYSPLL_CLK_FREQ>>10)*( (mfi<<10) + (mfn<<10)/(mfd+1)))/(pd+1);
|
||||
}
|
||||
|
||||
ulong get_mcuPLLCLK(void)
|
||||
{
|
||||
/* FIXME: We assume System_SEL = 0 here */
|
||||
u32 mpctl0 = MPCTL0;
|
||||
u32 mfi = (mpctl0 >> 10) & 0xf;
|
||||
u32 mfn = mpctl0 & 0x3f;
|
||||
u32 mfd = (mpctl0 >> 16) & 0x3f;
|
||||
u32 pd = (mpctl0 >> 26) & 0xf;
|
||||
|
||||
mfi = mfi<=5 ? 5 : mfi;
|
||||
|
||||
return (2*(CONFIG_SYS_CLK_FREQ>>10)*( (mfi<<10) + (mfn<<10)/(mfd+1)))/(pd+1);
|
||||
}
|
||||
|
||||
ulong get_FCLK(void)
|
||||
{
|
||||
return (( CSCR>>15)&1) ? get_mcuPLLCLK()>>1 : get_mcuPLLCLK();
|
||||
}
|
||||
|
||||
/* return HCLK frequency */
|
||||
ulong get_HCLK(void)
|
||||
{
|
||||
u32 bclkdiv = (( CSCR >> 10 ) & 0xf) + 1;
|
||||
printf("bclkdiv: %d\n", bclkdiv);
|
||||
return get_systemPLLCLK() / bclkdiv;
|
||||
}
|
||||
|
||||
/* return BCLK frequency */
|
||||
ulong get_BCLK(void)
|
||||
{
|
||||
return get_HCLK();
|
||||
}
|
||||
|
||||
ulong get_PERCLK1(void)
|
||||
{
|
||||
return get_systemPLLCLK() / (((PCDR) & 0xf)+1);
|
||||
}
|
||||
|
||||
ulong get_PERCLK2(void)
|
||||
{
|
||||
return get_systemPLLCLK() / (((PCDR>>4) & 0xf)+1);
|
||||
}
|
||||
|
||||
ulong get_PERCLK3(void)
|
||||
{
|
||||
return get_systemPLLCLK() / (((PCDR>>16) & 0x7f)+1);
|
||||
}
|
||||
|
||||
#endif /* defined (CONFIG_IMX) */
|
100
arch/arm/cpu/arm920t/imx/timer.c
Normal file
100
arch/arm/cpu/arm920t/imx/timer.c
Normal file
@ -0,0 +1,100 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
||||
* Marius Groeger <mgroeger@sysgo.de>
|
||||
*
|
||||
* (C) Copyright 2002
|
||||
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
||||
* Alex Zuepke <azu@sysgo.de>
|
||||
*
|
||||
* (C) Copyright 2002
|
||||
* Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <time.h>
|
||||
#if defined (CONFIG_IMX)
|
||||
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
int timer_init (void)
|
||||
{
|
||||
int i;
|
||||
/* setup GP Timer 1 */
|
||||
TCTL1 = TCTL_SWR;
|
||||
for ( i=0; i<100; i++) TCTL1 = 0; /* We have no udelay by now */
|
||||
TPRER1 = get_PERCLK1() / 1000000; /* 1 MHz */
|
||||
TCTL1 |= TCTL_FRR | (1<<1); /* Freerun Mode, PERCLK1 input */
|
||||
|
||||
/* Reset the timer */
|
||||
TCTL1 &= ~TCTL_TEN;
|
||||
TCTL1 |= TCTL_TEN; /* Enable timer */
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* timer without interrupts
|
||||
*/
|
||||
static ulong get_timer_masked (void)
|
||||
{
|
||||
return TCN1;
|
||||
}
|
||||
|
||||
ulong get_timer (ulong base)
|
||||
{
|
||||
return get_timer_masked() - base;
|
||||
}
|
||||
|
||||
void __udelay(unsigned long usec)
|
||||
{
|
||||
ulong endtime = get_timer_masked() + usec;
|
||||
signed long diff;
|
||||
|
||||
do {
|
||||
ulong now = get_timer_masked ();
|
||||
diff = endtime - now;
|
||||
} while (diff >= 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is derived from PowerPC code (read timebase as long long).
|
||||
* On ARM it just returns the timer value.
|
||||
*/
|
||||
unsigned long long get_ticks(void)
|
||||
{
|
||||
return get_timer(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is derived from PowerPC code (timebase clock frequency).
|
||||
* On ARM it returns the number of timer ticks per second.
|
||||
*/
|
||||
ulong get_tbclk(void)
|
||||
{
|
||||
return CONFIG_SYS_HZ;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset the cpu by setting up the watchdog timer and let him time out
|
||||
*/
|
||||
void reset_cpu(void)
|
||||
{
|
||||
/* Disable watchdog and set Time-Out field to 0 */
|
||||
WCR = 0x00000000;
|
||||
|
||||
/* Write Service Sequence */
|
||||
WSR = 0x00005555;
|
||||
WSR = 0x0000AAAA;
|
||||
|
||||
/* Enable watchdog */
|
||||
WCR = 0x00000001;
|
||||
|
||||
while (1);
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
#endif /* defined (CONFIG_IMX) */
|
@ -12,9 +12,9 @@ extra-y :=
|
||||
endif
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_MX27) += mx27/
|
||||
obj-$(if $(filter mxs,$(SOC)),y) += mxs/
|
||||
obj-$(if $(filter spear,$(SOC)),y) += spear/
|
||||
obj-$(CONFIG_ARCH_SUNXI) += sunxi/
|
||||
|
||||
# some files can only build in ARM or THUMB2, not THUMB1
|
||||
|
||||
|
@ -21,19 +21,6 @@
|
||||
|
||||
static void cache_flush(void);
|
||||
|
||||
/************************************************************
|
||||
* sdelay() - simple spin loop. Will be constant time as
|
||||
* its generally used in bypass conditions only. This
|
||||
* is necessary until timers are accessible.
|
||||
*
|
||||
* not inline to increase chances its in cache when called
|
||||
*************************************************************/
|
||||
void sdelay(unsigned long loops)
|
||||
{
|
||||
__asm__ volatile ("1:\n" "subs %0, %1, #1\n"
|
||||
"bne 1b":"=r" (loops):"0"(loops));
|
||||
}
|
||||
|
||||
int cleanup_before_linux (void)
|
||||
{
|
||||
/*
|
||||
|
7
arch/arm/cpu/arm926ejs/mx27/Makefile
Normal file
7
arch/arm/cpu/arm926ejs/mx27/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# (C) Copyright 2000-2006
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
|
||||
obj-y += generic.o timer.o reset.o relocate.o
|
378
arch/arm/cpu/arm926ejs/mx27/generic.c
Normal file
378
arch/arm/cpu/arm926ejs/mx27/generic.c
Normal file
@ -0,0 +1,378 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (c) 2008 Eric Jarrige <eric.jarrige@armadeus.org>
|
||||
* Copyright (c) 2009 Ilya Yanok <yanok@emcraft.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <div64.h>
|
||||
#include <net.h>
|
||||
#include <netdev.h>
|
||||
#include <vsprintf.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/arch/clock.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/mach-imx/sys_proto.h>
|
||||
#ifdef CONFIG_MMC_MXC
|
||||
#include <asm/arch/mxcmmc.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* get the system pll clock in Hz
|
||||
*
|
||||
* mfi + mfn / (mfd +1)
|
||||
* f = 2 * f_ref * --------------------
|
||||
* pd + 1
|
||||
*/
|
||||
static unsigned int imx_decode_pll(unsigned int pll, unsigned int f_ref)
|
||||
{
|
||||
unsigned int mfi = (pll >> 10) & 0xf;
|
||||
unsigned int mfn = pll & 0x3ff;
|
||||
unsigned int mfd = (pll >> 16) & 0x3ff;
|
||||
unsigned int pd = (pll >> 26) & 0xf;
|
||||
|
||||
mfi = mfi <= 5 ? 5 : mfi;
|
||||
|
||||
return lldiv(2 * (u64)f_ref * (mfi * (mfd + 1) + mfn),
|
||||
(mfd + 1) * (pd + 1));
|
||||
}
|
||||
|
||||
static ulong clk_in_32k(void)
|
||||
{
|
||||
return 1024 * CONFIG_MX27_CLK32;
|
||||
}
|
||||
|
||||
static ulong clk_in_26m(void)
|
||||
{
|
||||
struct pll_regs *pll = (struct pll_regs *)IMX_PLL_BASE;
|
||||
|
||||
if (readl(&pll->cscr) & CSCR_OSC26M_DIV1P5) {
|
||||
/* divide by 1.5 */
|
||||
return 26000000 * 2 / 3;
|
||||
} else {
|
||||
return 26000000;
|
||||
}
|
||||
}
|
||||
|
||||
static ulong imx_get_mpllclk(void)
|
||||
{
|
||||
struct pll_regs *pll = (struct pll_regs *)IMX_PLL_BASE;
|
||||
ulong cscr = readl(&pll->cscr);
|
||||
ulong fref;
|
||||
|
||||
if (cscr & CSCR_MCU_SEL)
|
||||
fref = clk_in_26m();
|
||||
else
|
||||
fref = clk_in_32k();
|
||||
|
||||
return imx_decode_pll(readl(&pll->mpctl0), fref);
|
||||
}
|
||||
|
||||
static ulong imx_get_armclk(void)
|
||||
{
|
||||
struct pll_regs *pll = (struct pll_regs *)IMX_PLL_BASE;
|
||||
ulong cscr = readl(&pll->cscr);
|
||||
ulong fref = imx_get_mpllclk();
|
||||
ulong div;
|
||||
|
||||
if (!(cscr & CSCR_ARM_SRC_MPLL))
|
||||
fref = lldiv((fref * 2), 3);
|
||||
|
||||
div = ((cscr >> 12) & 0x3) + 1;
|
||||
|
||||
return lldiv(fref, div);
|
||||
}
|
||||
|
||||
static ulong imx_get_ahbclk(void)
|
||||
{
|
||||
struct pll_regs *pll = (struct pll_regs *)IMX_PLL_BASE;
|
||||
ulong cscr = readl(&pll->cscr);
|
||||
ulong fref = imx_get_mpllclk();
|
||||
ulong div;
|
||||
|
||||
div = ((cscr >> 8) & 0x3) + 1;
|
||||
|
||||
return lldiv(fref * 2, 3 * div);
|
||||
}
|
||||
|
||||
static __attribute__((unused)) ulong imx_get_spllclk(void)
|
||||
{
|
||||
struct pll_regs *pll = (struct pll_regs *)IMX_PLL_BASE;
|
||||
ulong cscr = readl(&pll->cscr);
|
||||
ulong fref;
|
||||
|
||||
if (cscr & CSCR_SP_SEL)
|
||||
fref = clk_in_26m();
|
||||
else
|
||||
fref = clk_in_32k();
|
||||
|
||||
return imx_decode_pll(readl(&pll->spctl0), fref);
|
||||
}
|
||||
|
||||
static ulong imx_decode_perclk(ulong div)
|
||||
{
|
||||
return lldiv((imx_get_mpllclk() * 2), (div * 3));
|
||||
}
|
||||
|
||||
static ulong imx_get_perclk1(void)
|
||||
{
|
||||
struct pll_regs *pll = (struct pll_regs *)IMX_PLL_BASE;
|
||||
|
||||
return imx_decode_perclk((readl(&pll->pcdr1) & 0x3f) + 1);
|
||||
}
|
||||
|
||||
static ulong imx_get_perclk2(void)
|
||||
{
|
||||
struct pll_regs *pll = (struct pll_regs *)IMX_PLL_BASE;
|
||||
|
||||
return imx_decode_perclk(((readl(&pll->pcdr1) >> 8) & 0x3f) + 1);
|
||||
}
|
||||
|
||||
static __attribute__((unused)) ulong imx_get_perclk3(void)
|
||||
{
|
||||
struct pll_regs *pll = (struct pll_regs *)IMX_PLL_BASE;
|
||||
|
||||
return imx_decode_perclk(((readl(&pll->pcdr1) >> 16) & 0x3f) + 1);
|
||||
}
|
||||
|
||||
static __attribute__((unused)) ulong imx_get_perclk4(void)
|
||||
{
|
||||
struct pll_regs *pll = (struct pll_regs *)IMX_PLL_BASE;
|
||||
|
||||
return imx_decode_perclk(((readl(&pll->pcdr1) >> 24) & 0x3f) + 1);
|
||||
}
|
||||
|
||||
unsigned int mxc_get_clock(enum mxc_clock clk)
|
||||
{
|
||||
switch (clk) {
|
||||
case MXC_ARM_CLK:
|
||||
return imx_get_armclk();
|
||||
case MXC_I2C_CLK:
|
||||
return imx_get_ahbclk()/2;
|
||||
case MXC_UART_CLK:
|
||||
return imx_get_perclk1();
|
||||
case MXC_FEC_CLK:
|
||||
return imx_get_ahbclk();
|
||||
case MXC_ESDHC_CLK:
|
||||
return imx_get_perclk2();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
u32 get_cpu_rev(void)
|
||||
{
|
||||
return MXC_CPU_MX27 << 12;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DISPLAY_CPUINFO)
|
||||
int print_cpuinfo (void)
|
||||
{
|
||||
char buf[32];
|
||||
|
||||
printf("CPU: Freescale i.MX27 at %s MHz\n\n",
|
||||
strmhz(buf, imx_get_mpllclk()));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int cpu_eth_init(struct bd_info *bis)
|
||||
{
|
||||
#if defined(CONFIG_FEC_MXC)
|
||||
struct pll_regs *pll = (struct pll_regs *)IMX_PLL_BASE;
|
||||
|
||||
/* enable FEC clock */
|
||||
writel(readl(&pll->pccr1) | PCCR1_HCLK_FEC, &pll->pccr1);
|
||||
writel(readl(&pll->pccr0) | PCCR0_FEC_EN, &pll->pccr0);
|
||||
return fecmxc_initialize(bis);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Initializes on-chip MMC controllers.
|
||||
* to override, implement board_mmc_init()
|
||||
*/
|
||||
int cpu_mmc_init(struct bd_info *bis)
|
||||
{
|
||||
#ifdef CONFIG_MMC_MXC
|
||||
return mxc_mmc_init(bis);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void imx_gpio_mode(int gpio_mode)
|
||||
{
|
||||
struct gpio_port_regs *regs = (struct gpio_port_regs *)IMX_GPIO_BASE;
|
||||
unsigned int pin = gpio_mode & GPIO_PIN_MASK;
|
||||
unsigned int port = (gpio_mode & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT;
|
||||
unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >> GPIO_OCR_SHIFT;
|
||||
unsigned int aout = (gpio_mode & GPIO_AOUT_MASK) >> GPIO_AOUT_SHIFT;
|
||||
unsigned int bout = (gpio_mode & GPIO_BOUT_MASK) >> GPIO_BOUT_SHIFT;
|
||||
unsigned int tmp;
|
||||
|
||||
/* Pullup enable */
|
||||
if (gpio_mode & GPIO_PUEN) {
|
||||
writel(readl(®s->port[port].puen) | (1 << pin),
|
||||
®s->port[port].puen);
|
||||
} else {
|
||||
writel(readl(®s->port[port].puen) & ~(1 << pin),
|
||||
®s->port[port].puen);
|
||||
}
|
||||
|
||||
/* Data direction */
|
||||
if (gpio_mode & GPIO_OUT) {
|
||||
writel(readl(®s->port[port].gpio_dir) | 1 << pin,
|
||||
®s->port[port].gpio_dir);
|
||||
} else {
|
||||
writel(readl(®s->port[port].gpio_dir) & ~(1 << pin),
|
||||
®s->port[port].gpio_dir);
|
||||
}
|
||||
|
||||
/* Primary / alternate function */
|
||||
if (gpio_mode & GPIO_AF) {
|
||||
writel(readl(®s->port[port].gpr) | (1 << pin),
|
||||
®s->port[port].gpr);
|
||||
} else {
|
||||
writel(readl(®s->port[port].gpr) & ~(1 << pin),
|
||||
®s->port[port].gpr);
|
||||
}
|
||||
|
||||
/* use as gpio? */
|
||||
if (!(gpio_mode & (GPIO_PF | GPIO_AF))) {
|
||||
writel(readl(®s->port[port].gius) | (1 << pin),
|
||||
®s->port[port].gius);
|
||||
} else {
|
||||
writel(readl(®s->port[port].gius) & ~(1 << pin),
|
||||
®s->port[port].gius);
|
||||
}
|
||||
|
||||
/* Output / input configuration */
|
||||
if (pin < 16) {
|
||||
tmp = readl(®s->port[port].ocr1);
|
||||
tmp &= ~(3 << (pin * 2));
|
||||
tmp |= (ocr << (pin * 2));
|
||||
writel(tmp, ®s->port[port].ocr1);
|
||||
|
||||
writel(readl(®s->port[port].iconfa1) & ~(3 << (pin * 2)),
|
||||
®s->port[port].iconfa1);
|
||||
writel(readl(®s->port[port].iconfa1) | aout << (pin * 2),
|
||||
®s->port[port].iconfa1);
|
||||
writel(readl(®s->port[port].iconfb1) & ~(3 << (pin * 2)),
|
||||
®s->port[port].iconfb1);
|
||||
writel(readl(®s->port[port].iconfb1) | bout << (pin * 2),
|
||||
®s->port[port].iconfb1);
|
||||
} else {
|
||||
pin -= 16;
|
||||
|
||||
tmp = readl(®s->port[port].ocr2);
|
||||
tmp &= ~(3 << (pin * 2));
|
||||
tmp |= (ocr << (pin * 2));
|
||||
writel(tmp, ®s->port[port].ocr2);
|
||||
|
||||
writel(readl(®s->port[port].iconfa2) & ~(3 << (pin * 2)),
|
||||
®s->port[port].iconfa2);
|
||||
writel(readl(®s->port[port].iconfa2) | aout << (pin * 2),
|
||||
®s->port[port].iconfa2);
|
||||
writel(readl(®s->port[port].iconfb2) & ~(3 << (pin * 2)),
|
||||
®s->port[port].iconfb2);
|
||||
writel(readl(®s->port[port].iconfb2) | bout << (pin * 2),
|
||||
®s->port[port].iconfb2);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MXC_UART
|
||||
void mx27_uart1_init_pins(void)
|
||||
{
|
||||
int i;
|
||||
unsigned int mode[] = {
|
||||
PE12_PF_UART1_TXD,
|
||||
PE13_PF_UART1_RXD,
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(mode); i++)
|
||||
imx_gpio_mode(mode[i]);
|
||||
|
||||
}
|
||||
#endif /* CONFIG_MXC_UART */
|
||||
|
||||
#ifdef CONFIG_FEC_MXC
|
||||
void mx27_fec_init_pins(void)
|
||||
{
|
||||
int i;
|
||||
unsigned int mode[] = {
|
||||
PD0_AIN_FEC_TXD0,
|
||||
PD1_AIN_FEC_TXD1,
|
||||
PD2_AIN_FEC_TXD2,
|
||||
PD3_AIN_FEC_TXD3,
|
||||
PD4_AOUT_FEC_RX_ER,
|
||||
PD5_AOUT_FEC_RXD1,
|
||||
PD6_AOUT_FEC_RXD2,
|
||||
PD7_AOUT_FEC_RXD3,
|
||||
PD8_AF_FEC_MDIO,
|
||||
PD9_AIN_FEC_MDC | GPIO_PUEN,
|
||||
PD10_AOUT_FEC_CRS,
|
||||
PD11_AOUT_FEC_TX_CLK,
|
||||
PD12_AOUT_FEC_RXD0,
|
||||
PD13_AOUT_FEC_RX_DV,
|
||||
PD14_AOUT_FEC_CLR,
|
||||
PD15_AOUT_FEC_COL,
|
||||
PD16_AIN_FEC_TX_ER,
|
||||
PF23_AIN_FEC_TX_EN,
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(mode); i++)
|
||||
imx_gpio_mode(mode[i]);
|
||||
}
|
||||
|
||||
void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
|
||||
{
|
||||
int i;
|
||||
struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
|
||||
struct fuse_bank *bank = &iim->bank[0];
|
||||
struct fuse_bank0_regs *fuse =
|
||||
(struct fuse_bank0_regs *)bank->fuse_regs;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
mac[6 - 1 - i] = readl(&fuse->mac_addr[i]) & 0xff;
|
||||
}
|
||||
#endif /* CONFIG_FEC_MXC */
|
||||
|
||||
#ifdef CONFIG_MMC_MXC
|
||||
void mx27_sd1_init_pins(void)
|
||||
{
|
||||
int i;
|
||||
unsigned int mode[] = {
|
||||
PE18_PF_SD1_D0,
|
||||
PE19_PF_SD1_D1,
|
||||
PE20_PF_SD1_D2,
|
||||
PE21_PF_SD1_D3,
|
||||
PE22_PF_SD1_CMD,
|
||||
PE23_PF_SD1_CLK,
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(mode); i++)
|
||||
imx_gpio_mode(mode[i]);
|
||||
|
||||
}
|
||||
|
||||
void mx27_sd2_init_pins(void)
|
||||
{
|
||||
int i;
|
||||
unsigned int mode[] = {
|
||||
PB4_PF_SD2_D0,
|
||||
PB5_PF_SD2_D1,
|
||||
PB6_PF_SD2_D2,
|
||||
PB7_PF_SD2_D3,
|
||||
PB8_PF_SD2_CMD,
|
||||
PB9_PF_SD2_CLK,
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(mode); i++)
|
||||
imx_gpio_mode(mode[i]);
|
||||
|
||||
}
|
||||
#endif /* CONFIG_MMC_MXC */
|
50
arch/arm/cpu/arm926ejs/mx27/relocate.S
Normal file
50
arch/arm/cpu/arm926ejs/mx27/relocate.S
Normal file
@ -0,0 +1,50 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* relocate - i.MX27-specific vector relocation
|
||||
*
|
||||
* Copyright (c) 2013 Albert ARIBAUD <albert.u.boot@aribaud.net>
|
||||
*/
|
||||
|
||||
#include <asm-offsets.h>
|
||||
#include <config.h>
|
||||
#include <linux/linkage.h>
|
||||
|
||||
/*
|
||||
* The i.MX27 SoC is very specific with respect to exceptions: it
|
||||
* does not provide RAM at the high vectors address (0xFFFF0000),
|
||||
* thus only the low address (0x00000000) is useable; but that is
|
||||
* in ROM. Therefore, vectors cannot be changed at all.
|
||||
*
|
||||
* However, these ROM-based vectors actually just perform indirect
|
||||
* calls through pointers located in RAM at SoC-specific addresses,
|
||||
* as follows:
|
||||
*
|
||||
* Offset Exception Use by ROM code
|
||||
* 0x00000000 reset indirect branch to [0x00000014]
|
||||
* 0x00000004 undefined instruction indirect branch to [0xfffffef0]
|
||||
* 0x00000008 software interrupt indirect branch to [0xfffffef4]
|
||||
* 0x0000000c prefetch abort indirect branch to [0xfffffef8]
|
||||
* 0x00000010 data abort indirect branch to [0xfffffefc]
|
||||
* 0x00000014 (reserved in ARMv5) vector to ROM reset: 0xc0000000
|
||||
* 0x00000018 IRQ indirect branch to [0xffffff00]
|
||||
* 0x0000001c FIQ indirect branch to [0xffffff04]
|
||||
*
|
||||
* In order to initialize exceptions on i.MX27, we must copy U-Boot's
|
||||
* indirect (not exception!) vector table into 0xfffffef0..0xffffff04
|
||||
* taking care not to copy vectors number 5 (reserved exception).
|
||||
*/
|
||||
|
||||
.section .text.relocate_vectors,"ax",%progbits
|
||||
|
||||
ENTRY(relocate_vectors)
|
||||
|
||||
ldr r0, [r9, #GD_RELOCADDR] /* r0 = gd->relocaddr */
|
||||
ldr r1, =32 /* size of vector table */
|
||||
add r0, r0, r1 /* skip to indirect table */
|
||||
ldr r1, =0xFFFFFEF0 /* i.MX27 indirect table */
|
||||
ldmia r0!, {r2-r8} /* load indirect vectors 1..7 */
|
||||
stmia r1!, {r2-r5, r7,r8} /* write all but vector 5 */
|
||||
|
||||
bx lr
|
||||
|
||||
ENDPROC(relocate_vectors)
|
41
arch/arm/cpu/arm926ejs/mx27/reset.c
Normal file
41
arch/arm/cpu/arm926ejs/mx27/reset.c
Normal file
@ -0,0 +1,41 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
||||
* Marius Groeger <mgroeger@sysgo.de>
|
||||
*
|
||||
* (C) Copyright 2002
|
||||
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
||||
* Alex Zuepke <azu@sysgo.de>
|
||||
*
|
||||
* (C) Copyright 2002
|
||||
* Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
|
||||
*
|
||||
* (C) Copyright 2009
|
||||
* Ilya Yanok, Emcraft Systems Ltd, <yanok@emcraft.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
|
||||
/*
|
||||
* Reset the cpu by setting up the watchdog timer and let it time out
|
||||
*/
|
||||
void reset_cpu(void)
|
||||
{
|
||||
struct wdog_regs *regs = (struct wdog_regs *)IMX_WDT_BASE;
|
||||
/* Disable watchdog and set Time-Out field to 0 */
|
||||
writew(0x0000, ®s->wcr);
|
||||
|
||||
/* Write Service Sequence */
|
||||
writew(0x5555, ®s->wsr);
|
||||
writew(0xAAAA, ®s->wsr);
|
||||
|
||||
/* Enable watchdog */
|
||||
writew(WCR_WDE, ®s->wcr);
|
||||
|
||||
while (1);
|
||||
/*NOTREACHED*/
|
||||
}
|
166
arch/arm/cpu/arm926ejs/mx27/timer.c
Normal file
166
arch/arm/cpu/arm926ejs/mx27/timer.c
Normal file
@ -0,0 +1,166 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
||||
* Marius Groeger <mgroeger@sysgo.de>
|
||||
*
|
||||
* (C) Copyright 2002
|
||||
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
||||
* Alex Zuepke <azu@sysgo.de>
|
||||
*
|
||||
* (C) Copyright 2002
|
||||
* Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
|
||||
*
|
||||
* (C) Copyright 2009
|
||||
* Ilya Yanok, Emcraft Systems Ltd, <yanok@emcraft.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <div64.h>
|
||||
#include <init.h>
|
||||
#include <time.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
/* General purpose timers bitfields */
|
||||
#define GPTCR_SWR (1 << 15) /* Software reset */
|
||||
#define GPTCR_FRR (1 << 8) /* Freerun / restart */
|
||||
#define GPTCR_CLKSOURCE_32 (4 << 1) /* Clock source */
|
||||
#define GPTCR_TEN 1 /* Timer enable */
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define timestamp (gd->arch.tbl)
|
||||
#define lastinc (gd->arch.lastinc)
|
||||
|
||||
/*
|
||||
* "time" is measured in 1 / CONFIG_SYS_HZ seconds,
|
||||
* "tick" is internal timer period
|
||||
*/
|
||||
#ifdef CONFIG_MX27_TIMER_HIGH_PRECISION
|
||||
/* ~0.4% error - measured with stop-watch on 100s boot-delay */
|
||||
static inline unsigned long long tick_to_time(unsigned long long tick)
|
||||
{
|
||||
tick *= CONFIG_SYS_HZ;
|
||||
do_div(tick, CONFIG_MX27_CLK32);
|
||||
return tick;
|
||||
}
|
||||
|
||||
static inline unsigned long long time_to_tick(unsigned long long time)
|
||||
{
|
||||
time *= CONFIG_MX27_CLK32;
|
||||
do_div(time, CONFIG_SYS_HZ);
|
||||
return time;
|
||||
}
|
||||
|
||||
static inline unsigned long long us_to_tick(unsigned long long us)
|
||||
{
|
||||
us = us * CONFIG_MX27_CLK32 + 999999;
|
||||
do_div(us, 1000000);
|
||||
return us;
|
||||
}
|
||||
#else
|
||||
/* ~2% error */
|
||||
#define TICK_PER_TIME ((CONFIG_MX27_CLK32 + CONFIG_SYS_HZ / 2) / \
|
||||
CONFIG_SYS_HZ)
|
||||
#define US_PER_TICK (1000000 / CONFIG_MX27_CLK32)
|
||||
|
||||
static inline unsigned long long tick_to_time(unsigned long long tick)
|
||||
{
|
||||
do_div(tick, TICK_PER_TIME);
|
||||
return tick;
|
||||
}
|
||||
|
||||
static inline unsigned long long time_to_tick(unsigned long long time)
|
||||
{
|
||||
return time * TICK_PER_TIME;
|
||||
}
|
||||
|
||||
static inline unsigned long long us_to_tick(unsigned long long us)
|
||||
{
|
||||
us += US_PER_TICK - 1;
|
||||
do_div(us, US_PER_TICK);
|
||||
return us;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* nothing really to do with interrupts, just starts up a counter. */
|
||||
/* The 32768Hz 32-bit timer overruns in 131072 seconds */
|
||||
int timer_init(void)
|
||||
{
|
||||
int i;
|
||||
struct gpt_regs *regs = (struct gpt_regs *)IMX_TIM1_BASE;
|
||||
struct pll_regs *pll = (struct pll_regs *)IMX_PLL_BASE;
|
||||
|
||||
/* setup GP Timer 1 */
|
||||
writel(GPTCR_SWR, ®s->gpt_tctl);
|
||||
|
||||
writel(readl(&pll->pccr0) | PCCR0_GPT1_EN, &pll->pccr0);
|
||||
writel(readl(&pll->pccr1) | PCCR1_PERCLK1_EN, &pll->pccr1);
|
||||
|
||||
for (i = 0; i < 100; i++)
|
||||
writel(0, ®s->gpt_tctl); /* We have no udelay by now */
|
||||
writel(0, ®s->gpt_tprer); /* 32Khz */
|
||||
/* Freerun Mode, PERCLK1 input */
|
||||
writel(readl(®s->gpt_tctl) | GPTCR_CLKSOURCE_32 | GPTCR_FRR,
|
||||
®s->gpt_tctl);
|
||||
writel(readl(®s->gpt_tctl) | GPTCR_TEN, ®s->gpt_tctl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long long get_ticks(void)
|
||||
{
|
||||
struct gpt_regs *regs = (struct gpt_regs *)IMX_TIM1_BASE;
|
||||
ulong now = readl(®s->gpt_tcn); /* current tick value */
|
||||
|
||||
if (now >= lastinc) {
|
||||
/*
|
||||
* normal mode (non roll)
|
||||
* move stamp forward with absolut diff ticks
|
||||
*/
|
||||
timestamp += (now - lastinc);
|
||||
} else {
|
||||
/* we have rollover of incrementer */
|
||||
timestamp += (0xFFFFFFFF - lastinc) + now;
|
||||
}
|
||||
lastinc = now;
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
static ulong get_timer_masked(void)
|
||||
{
|
||||
/*
|
||||
* get_ticks() returns a long long (64 bit), it wraps in
|
||||
* 2^64 / CONFIG_MX27_CLK32 = 2^64 / 2^15 = 2^49 ~ 5 * 10^14 (s) ~
|
||||
* 5 * 10^9 days... and get_ticks() * CONFIG_SYS_HZ wraps in
|
||||
* 5 * 10^6 days - long enough.
|
||||
*/
|
||||
return tick_to_time(get_ticks());
|
||||
}
|
||||
|
||||
ulong get_timer(ulong base)
|
||||
{
|
||||
return get_timer_masked() - base;
|
||||
}
|
||||
|
||||
/* delay x useconds AND preserve advance timstamp value */
|
||||
void __udelay(unsigned long usec)
|
||||
{
|
||||
unsigned long long tmp;
|
||||
ulong tmo;
|
||||
|
||||
tmo = us_to_tick(usec);
|
||||
tmp = get_ticks() + tmo; /* get current timestamp */
|
||||
|
||||
while (get_ticks() < tmp) /* loop till event */
|
||||
/*NOP*/;
|
||||
}
|
||||
|
||||
ulong get_tbclk(void)
|
||||
{
|
||||
return CONFIG_MX27_CLK32;
|
||||
}
|
@ -60,14 +60,14 @@ spl/u-boot-spl.ivt: spl/u-boot-spl.bin
|
||||
|
||||
u-boot.ivt: u-boot.bin
|
||||
$(call if_changed,mkalign_mxs)
|
||||
$(call if_changed,mkivt_mxs,$(CONFIG_TEXT_BASE),\
|
||||
$(call if_changed,mkivt_mxs,$(CONFIG_SYS_TEXT_BASE),\
|
||||
0x40001000,0x40001040)
|
||||
|
||||
spl/u-boot-spl.csf: spl/u-boot-spl.ivt spl/u-boot-spl.bin board/$(VENDOR)/$(BOARD)/sign/u-boot-spl.csf
|
||||
$(call if_changed,mkcsfreq_mxs,$(CONFIG_SPL_TEXT_BASE),0x8000)
|
||||
|
||||
u-boot.csf: u-boot.ivt u-boot.bin board/$(VENDOR)/$(BOARD)/sign/u-boot.csf
|
||||
$(call if_changed,mkcsfreq_mxs,$(CONFIG_TEXT_BASE),0x40001000)
|
||||
$(call if_changed,mkcsfreq_mxs,$(CONFIG_SYS_TEXT_BASE),0x40001000)
|
||||
|
||||
%.sig: %.csf
|
||||
$(call if_changed,mkcst_mxs)
|
||||
|
@ -2,5 +2,5 @@ DISPLAYPROGRESS
|
||||
SECTION 0x0 BOOTABLE
|
||||
TAG LAST
|
||||
LOAD 0x1000 spl/u-boot-spl.bin
|
||||
LOAD IVT 0xE000 0x1000
|
||||
CALL HAB 0xE000 0x0
|
||||
LOAD IVT 0x8000 0x1000
|
||||
CALL HAB 0x8000 0x0
|
||||
|
@ -2,8 +2,8 @@ DISPLAYPROGRESS
|
||||
SECTION 0x0 BOOTABLE
|
||||
TAG LAST
|
||||
LOAD 0x1000 spl/u-boot-spl.bin
|
||||
LOAD IVT 0xE000 0x1000
|
||||
CALL HAB 0xE000 0x0
|
||||
LOAD IVT 0x8000 0x1000
|
||||
CALL HAB 0x8000 0x0
|
||||
LOAD 0x40002000 u-boot.bin
|
||||
LOAD IVT 0xE000 0x40002000
|
||||
CALL HAB 0xE000 0x0
|
||||
LOAD IVT 0x8000 0x40002000
|
||||
CALL HAB 0x8000 0x0
|
||||
|
@ -627,11 +627,11 @@ static void mxs_power_enable_4p2(void)
|
||||
|
||||
mxs_power_init_dcdc_4p2_source();
|
||||
|
||||
writel(vddioctrl, &power_regs->hw_power_vddioctrl);
|
||||
writel(vdddctrl, &power_regs->hw_power_vdddctrl);
|
||||
early_delay(20);
|
||||
writel(vddactrl, &power_regs->hw_power_vddactrl);
|
||||
early_delay(20);
|
||||
writel(vdddctrl, &power_regs->hw_power_vdddctrl);
|
||||
writel(vddioctrl, &power_regs->hw_power_vddioctrl);
|
||||
|
||||
/*
|
||||
* Check if FET is enabled on either powerout and if so,
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <asm-offsets.h>
|
||||
#include <config.h>
|
||||
#include <common.h>
|
||||
#include <system-constants.h>
|
||||
|
||||
/*
|
||||
*************************************************************************
|
||||
@ -45,7 +44,7 @@ reset:
|
||||
* it point to the end of OCRAM if the SP is zero.
|
||||
*/
|
||||
cmp sp, #0x00000000
|
||||
ldreq sp, =SYS_INIT_SP_ADDR
|
||||
ldreq sp, =CONFIG_SYS_INIT_SP_ADDR
|
||||
|
||||
/*
|
||||
* Store all registers on old stack pointer, this will allow us later to
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <asm-offsets.h>
|
||||
#include <config.h>
|
||||
#include <common.h>
|
||||
#include <linux/linkage.h>
|
||||
|
||||
/*
|
||||
*************************************************************************
|
||||
@ -33,13 +32,8 @@
|
||||
*/
|
||||
|
||||
.globl reset
|
||||
.globl save_boot_params_ret
|
||||
.type save_boot_params_ret,%function
|
||||
|
||||
reset:
|
||||
/* Allow the board to save important registers */
|
||||
b save_boot_params
|
||||
save_boot_params_ret:
|
||||
/*
|
||||
* set the cpu to SVC32 mode
|
||||
*/
|
||||
@ -95,7 +89,7 @@ flush_dcache:
|
||||
mrc p15, 0, r0, c1, c0, 0
|
||||
bic r0, r0, #0x00000300 /* clear bits 9:8 (---- --RS) */
|
||||
bic r0, r0, #0x00000087 /* clear bits 7, 2:0 (B--- -CAM) */
|
||||
#ifdef CFG_SYS_EXCEPTION_VECTORS_HIGH
|
||||
#ifdef CONFIG_SYS_EXCEPTION_VECTORS_HIGH
|
||||
orr r0, r0, #0x00002000 /* set bit 13 (--V- ----) */
|
||||
#else
|
||||
bic r0, r0, #0x00002000 /* clear bit 13 (--V- ----) */
|
||||
@ -116,16 +110,3 @@ flush_dcache:
|
||||
#endif
|
||||
mov pc, lr /* back to my caller */
|
||||
#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3)
|
||||
* __attribute__((weak));
|
||||
*
|
||||
* Stack pointer is not yet initialized at this moment
|
||||
* Don't save anything to stack even if compiled with -O0
|
||||
*
|
||||
*************************************************************************/
|
||||
WEAK(save_boot_params)
|
||||
b save_boot_params_ret /* back to my caller */
|
||||
ENDPROC(save_boot_params)
|
||||
|
@ -1,5 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
# (C) Copyright 2012 Henrik Nordstrom <henrik@henriknordstrom.net>
|
||||
|
||||
obj-y += fel_utils.o
|
||||
CFLAGS_fel_utils.o := -marm
|
@ -1,6 +0,0 @@
|
||||
# Build a combined spl + u-boot image
|
||||
ifdef CONFIG_SPL
|
||||
ifndef CONFIG_SPL_BUILD
|
||||
ALL-y += u-boot-sunxi-with-spl.bin
|
||||
endif
|
||||
endif
|
@ -1,33 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Utility functions for FEL mode.
|
||||
*
|
||||
* Copyright (c) 2015 Google, Inc
|
||||
*/
|
||||
|
||||
#include <asm-offsets.h>
|
||||
#include <config.h>
|
||||
#include <asm/system.h>
|
||||
#include <linux/linkage.h>
|
||||
|
||||
ENTRY(save_boot_params)
|
||||
ldr r0, =fel_stash
|
||||
str sp, [r0, #0]
|
||||
str lr, [r0, #4]
|
||||
mrs lr, cpsr @ Read CPSR
|
||||
str lr, [r0, #8]
|
||||
mrc p15, 0, lr, c1, c0, 0 @ Read CP15 SCTLR Register
|
||||
str lr, [r0, #12]
|
||||
b save_boot_params_ret
|
||||
ENDPROC(save_boot_params)
|
||||
|
||||
ENTRY(return_to_fel)
|
||||
mov sp, r0
|
||||
mov lr, r1
|
||||
ldr r0, =fel_stash
|
||||
ldr r1, [r0, #12]
|
||||
mcr p15, 0, r1, c1, c0, 0 @ Write CP15 SCTLR register
|
||||
ldr r1, [r0, #8]
|
||||
msr cpsr, r1 @ Write CPSR
|
||||
bx lr
|
||||
ENDPROC(return_to_fel)
|
@ -1,48 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* (C) Copyright 2018
|
||||
* Icenowy Zheng <icenowy@aosc.io>
|
||||
*
|
||||
* Based on arch/arm/cpu/armv7/sunxi/u-boot-spl.lds:
|
||||
*/
|
||||
MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\
|
||||
LENGTH = CONFIG_SPL_MAX_SIZE }
|
||||
MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \
|
||||
LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
|
||||
|
||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(_start)
|
||||
SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
__start = .;
|
||||
*(.vectors)
|
||||
*(.text*)
|
||||
} > .sram
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(.rodata*)) } >.sram
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
|
||||
|
||||
. = ALIGN(4);
|
||||
__u_boot_list : {
|
||||
KEEP(*(SORT(__u_boot_list*)));
|
||||
} > .sram
|
||||
|
||||
. = ALIGN(4);
|
||||
__image_copy_end = .;
|
||||
_end = .;
|
||||
|
||||
.bss :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__bss_start = .;
|
||||
*(.bss*)
|
||||
. = ALIGN(4);
|
||||
__bss_end = .;
|
||||
} > .sdram
|
||||
}
|
@ -27,37 +27,6 @@ config ARMV7_BOOT_SEC_DEFAULT
|
||||
This can be overridden at run-time by setting the bootm_boot_mode env.
|
||||
variable to "sec" or "nonsec".
|
||||
|
||||
config HAS_ARMV7_SECURE_BASE
|
||||
bool "Enable support for a ahardware secure memory area"
|
||||
default y if ARCH_LS1021A || ARCH_MX7 || ARCH_MX7ULP || ARCH_STM32MP \
|
||||
|| MACH_SUN6I || MACH_SUN7I || MACH_SUN8I || TEGRA124
|
||||
|
||||
config ARMV7_SECURE_BASE
|
||||
hex "Base address for secure mode memory"
|
||||
depends on HAS_ARMV7_SECURE_BASE
|
||||
default 0xfff00000 if TEGRA124
|
||||
default 0x2ffc0000 if ARCH_STM32MP
|
||||
default 0x2f000000 if ARCH_MX7ULP
|
||||
default 0x10010000 if ARCH_LS1021A
|
||||
default 0x00900000 if ARCH_MX7
|
||||
default 0x00044000 if MACH_SUN8I
|
||||
default 0x00020000 if MACH_SUN6I || MACH_SUN7I
|
||||
|
||||
config ARMV7_SECURE_RESERVE_SIZE
|
||||
hex
|
||||
depends on TEGRA124 && HAS_ARMV7_SECURE_BASE
|
||||
default 0x100000
|
||||
help
|
||||
Reserve top 1M for secure RAM
|
||||
|
||||
config ARMV7_SECURE_MAX_SIZE
|
||||
hex
|
||||
depends on ARMV7_SECURE_BASE && ARCH_STM32MP || MACH_SUN6I \
|
||||
|| MACH_SUN7I || MACH_SUN8I
|
||||
default 0xbc00 if MACH_SUN8I && !MACH_SUN8I_H3
|
||||
default 0x3c00 if MACH_SUN8I && MACH_SUN8I_H3
|
||||
default 0x10000
|
||||
|
||||
config ARMV7_VIRT
|
||||
bool "Enable support for hardware virtualization" if EXPERT
|
||||
depends on CPU_V7_HAS_VIRT && ARMV7_NONSEC
|
||||
@ -107,9 +76,4 @@ config ARMV7_LPAE
|
||||
Say Y here to use the long descriptor page table format. This is
|
||||
required if U-Boot runs in HYP mode.
|
||||
|
||||
config SPL_ARMV7_SET_CORTEX_SMPEN
|
||||
bool
|
||||
help
|
||||
Enable the ARM Cortex ACTLR.SMP enable bit on SPL startup.
|
||||
|
||||
endif
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifndef CFG_SYS_HZ_CLOCK
|
||||
#ifndef CONFIG_SYS_HZ_CLOCK
|
||||
static inline u32 read_cntfrq(void)
|
||||
{
|
||||
u32 frq;
|
||||
@ -29,8 +29,8 @@ int timer_init(void)
|
||||
gd->arch.tbl = 0;
|
||||
gd->arch.tbu = 0;
|
||||
|
||||
#ifdef CFG_SYS_HZ_CLOCK
|
||||
gd->arch.timer_rate_hz = CFG_SYS_HZ_CLOCK;
|
||||
#ifdef CONFIG_SYS_HZ_CLOCK
|
||||
gd->arch.timer_rate_hz = CONFIG_SYS_HZ_CLOCK;
|
||||
#else
|
||||
gd->arch.timer_rate_hz = read_cntfrq();
|
||||
#endif
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include <asm-offsets.h>
|
||||
#include <config.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <system-constants.h>
|
||||
|
||||
.pushsection .text.s_init, "ax"
|
||||
WEAK(s_init)
|
||||
@ -29,7 +28,7 @@ WEAK(lowlevel_init)
|
||||
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK)
|
||||
ldr sp, =CONFIG_SPL_STACK
|
||||
#else
|
||||
ldr sp, =SYS_INIT_SP_ADDR
|
||||
ldr sp, =CONFIG_SYS_INIT_SP_ADDR
|
||||
#endif
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
#ifdef CONFIG_SPL_DM
|
||||
|
@ -1,21 +1,17 @@
|
||||
config ARCH_LS1021A
|
||||
bool
|
||||
select FSL_DEVICE_DISABLE
|
||||
select FSL_IFC if !QSPI_BOOT && !SD_BOOT_QSPI
|
||||
select LS102XA_STREAM_ID
|
||||
select SYS_FSL_DDR_BE if SYS_FSL_DDR
|
||||
select SYS_FSL_DDR_VER_50 if SYS_FSL_DDR
|
||||
select SYS_FSL_IFC_BE
|
||||
select SYS_FSL_ERRATUM_A008378
|
||||
select SYS_FSL_ERRATUM_A008407
|
||||
select SYS_FSL_ERRATUM_A008850 if SYS_FSL_DDR
|
||||
select SYS_FSL_ERRATUM_A008850
|
||||
select SYS_FSL_ERRATUM_A008997 if USB
|
||||
select SYS_FSL_ERRATUM_A009007 if USB
|
||||
select SYS_FSL_ERRATUM_A009008 if USB
|
||||
select SYS_FSL_ERRATUM_A009663
|
||||
select SYS_FSL_ERRATUM_A009798 if USB
|
||||
select SYS_FSL_ERRATUM_A009942
|
||||
select SYS_FSL_ERRATUM_A010315
|
||||
select SYS_FSL_ESDHC_BE
|
||||
select SYS_FSL_HAS_CCI400
|
||||
select SYS_FSL_HAS_DDR3 if SYS_FSL_DDR
|
||||
select SYS_FSL_HAS_DDR4 if SYS_FSL_DDR
|
||||
@ -32,15 +28,9 @@ config ARCH_LS1021A
|
||||
menu "LS102xA architecture"
|
||||
depends on ARCH_LS1021A
|
||||
|
||||
config FSL_DEVICE_DISABLE
|
||||
bool
|
||||
|
||||
config LS1_DEEP_SLEEP
|
||||
bool "Deep sleep"
|
||||
|
||||
config LS102XA_STREAM_ID
|
||||
bool
|
||||
|
||||
config MAX_CPUS
|
||||
int "Maximum number of CPUs permitted for LS102xA"
|
||||
default 2
|
||||
@ -51,8 +41,11 @@ config MAX_CPUS
|
||||
cores, count the reserved ports. This will allocate enough memory
|
||||
in spin table to properly handle all cores.
|
||||
|
||||
config PEN_ADDR_BIG_ENDIAN
|
||||
bool
|
||||
config NXP_ESBC
|
||||
bool "NXP_ESBC"
|
||||
help
|
||||
Enable Freescale Secure Boot feature. Normally selected
|
||||
by defconfig. If unsure, do not change.
|
||||
|
||||
config SYS_CCI400_OFFSET
|
||||
hex "Offset for CCI400 base"
|
||||
|
@ -13,10 +13,14 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifndef CONFIG_SYS_FSL_NUM_CC_PLLS
|
||||
#define CONFIG_SYS_FSL_NUM_CC_PLLS 2
|
||||
#endif
|
||||
|
||||
void get_sys_info(struct sys_info *sys_info)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_clk *clk = (void *)(CFG_SYS_FSL_LS1_CLK_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_clk *clk = (void *)(CONFIG_SYS_FSL_LS1_CLK_ADDR);
|
||||
unsigned int cpu;
|
||||
const u8 core_cplx_pll[6] = {
|
||||
[0] = 0, /* CC1 PPL / 1 */
|
||||
@ -35,7 +39,7 @@ void get_sys_info(struct sys_info *sys_info)
|
||||
uint i;
|
||||
uint freq_c_pll[CONFIG_SYS_FSL_NUM_CC_PLLS];
|
||||
uint ratio[CONFIG_SYS_FSL_NUM_CC_PLLS];
|
||||
unsigned long sysclk = get_board_sys_clk();
|
||||
unsigned long sysclk = CONFIG_SYS_CLK_FREQ;
|
||||
|
||||
sys_info->freq_systembus = sysclk;
|
||||
#if defined(CONFIG_DYNAMIC_DDR_CLK_FREQ) || defined(CONFIG_STATIC_DDR_CLK_FREQ)
|
||||
|
@ -1,7 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright 2014 Freescale Semiconductor, Inc.
|
||||
* Copyright 2021 NXP
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
@ -21,7 +20,6 @@
|
||||
#include <config.h>
|
||||
#include <fsl_wdog.h>
|
||||
#include <linux/delay.h>
|
||||
#include <dm.h>
|
||||
|
||||
#include "fsl_epu.h"
|
||||
|
||||
@ -168,18 +166,18 @@ static void mmu_setup(void)
|
||||
/* Level 1 has 512 entries */
|
||||
for (i = 0; i < 512; i++) {
|
||||
/* Mapping for PCIe 1 */
|
||||
if (va_start >= CFG_SYS_PCIE1_VIRT_ADDR &&
|
||||
va_start < (CFG_SYS_PCIE1_VIRT_ADDR +
|
||||
CFG_SYS_PCIE_MMAP_SIZE))
|
||||
if (va_start >= CONFIG_SYS_PCIE1_VIRT_ADDR &&
|
||||
va_start < (CONFIG_SYS_PCIE1_VIRT_ADDR +
|
||||
CONFIG_SYS_PCIE_MMAP_SIZE))
|
||||
set_pgsection(level1_table, i,
|
||||
CFG_SYS_PCIE1_PHYS_BASE + va_start,
|
||||
CONFIG_SYS_PCIE1_PHYS_BASE + va_start,
|
||||
MT_DEVICE_MEM);
|
||||
/* Mapping for PCIe 2 */
|
||||
else if (va_start >= CFG_SYS_PCIE2_VIRT_ADDR &&
|
||||
va_start < (CFG_SYS_PCIE2_VIRT_ADDR +
|
||||
CFG_SYS_PCIE_MMAP_SIZE))
|
||||
else if (va_start >= CONFIG_SYS_PCIE2_VIRT_ADDR &&
|
||||
va_start < (CONFIG_SYS_PCIE2_VIRT_ADDR +
|
||||
CONFIG_SYS_PCIE_MMAP_SIZE))
|
||||
set_pgsection(level1_table, i,
|
||||
CFG_SYS_PCIE2_PHYS_BASE + va_start,
|
||||
CONFIG_SYS_PCIE2_PHYS_BASE + va_start,
|
||||
MT_DEVICE_MEM);
|
||||
else
|
||||
set_pgsection(level1_table, i,
|
||||
@ -228,7 +226,7 @@ void enable_caches(void)
|
||||
|
||||
uint get_svr(void)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
|
||||
return in_be32(&gur->svr);
|
||||
}
|
||||
@ -237,7 +235,7 @@ uint get_svr(void)
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
char buf1[32], buf2[32];
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
unsigned int svr, major, minor, ver, i;
|
||||
|
||||
svr = in_be32(&gur->svr);
|
||||
@ -302,12 +300,21 @@ int cpu_mmc_init(struct bd_info *bis)
|
||||
}
|
||||
#endif
|
||||
|
||||
int cpu_eth_init(struct bd_info *bis)
|
||||
{
|
||||
#if defined(CONFIG_TSEC_ENET) && !defined(CONFIG_DM_ETH)
|
||||
tsec_standard_init(bis);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int arch_cpu_init(void)
|
||||
{
|
||||
void *epu_base = (void *)(CFG_SYS_DCSRBAR + EPU_BLOCK_OFFSET);
|
||||
void *epu_base = (void *)(CONFIG_SYS_DCSRBAR + EPU_BLOCK_OFFSET);
|
||||
void *rcpm2_base =
|
||||
(void *)(CFG_SYS_DCSRBAR + DCSR_RCPM2_BLOCK_OFFSET);
|
||||
struct ccsr_scfg *scfg = (void *)CFG_SYS_FSL_SCFG_ADDR;
|
||||
(void *)(CONFIG_SYS_DCSRBAR + DCSR_RCPM2_BLOCK_OFFSET);
|
||||
struct ccsr_scfg *scfg = (void *)CONFIG_SYS_FSL_SCFG_ADDR;
|
||||
u32 state;
|
||||
|
||||
icache_enable();
|
||||
@ -346,7 +353,7 @@ int arch_cpu_init(void)
|
||||
/* Set the address at which the secondary core starts from.*/
|
||||
void smp_set_core_boot_addr(unsigned long addr, int corenr)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
|
||||
out_be32(&gur->scratchrw[0], addr);
|
||||
}
|
||||
@ -354,7 +361,7 @@ void smp_set_core_boot_addr(unsigned long addr, int corenr)
|
||||
/* Release the secondary core from holdoff state and kick it */
|
||||
void smp_kick_all_cpus(void)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
|
||||
out_be32(&gur->brrl, 0x2);
|
||||
|
||||
@ -390,19 +397,3 @@ void arch_preboot_os(void)
|
||||
ctrl &= ~ARCH_TIMER_CTRL_ENABLE;
|
||||
asm("mcr p15, 0, %0, c14, c2, 1" : : "r" (ctrl));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_MISC_INIT
|
||||
int arch_misc_init(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_FSL_CAAM)) {
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
|
||||
if (ret)
|
||||
printf("Failed to initialize caam_jr: %d\n", ret);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -92,7 +92,7 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
|
||||
int off;
|
||||
int val;
|
||||
const char *sysclk_path;
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
unsigned int svr;
|
||||
svr = in_be32(&gur->svr);
|
||||
|
||||
@ -105,7 +105,7 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
|
||||
else {
|
||||
ccsr_sec_t __iomem *sec;
|
||||
|
||||
sec = (void __iomem *)CFG_SYS_FSL_SEC_ADDR;
|
||||
sec = (void __iomem *)CONFIG_SYS_FSL_SEC_ADDR;
|
||||
fdt_fixup_crypto_node(blob, sec_in32(&sec->secvid_ms));
|
||||
}
|
||||
#endif
|
||||
@ -125,15 +125,15 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
|
||||
|
||||
#ifdef CONFIG_SYS_NS16550
|
||||
do_fixup_by_compat_u32(blob, "fsl,16550-FIFO64",
|
||||
"clock-frequency", CFG_SYS_NS16550_CLK, 1);
|
||||
"clock-frequency", CONFIG_SYS_NS16550_CLK, 1);
|
||||
#endif
|
||||
|
||||
sysclk_path = fdt_get_alias(blob, "sysclk");
|
||||
if (sysclk_path)
|
||||
do_fixup_by_path_u32(blob, sysclk_path, "clock-frequency",
|
||||
get_board_sys_clk(), 1);
|
||||
CONFIG_SYS_CLK_FREQ, 1);
|
||||
do_fixup_by_compat_u32(blob, "fsl,qoriq-sysclk-2.0",
|
||||
"clock-frequency", get_board_sys_clk(), 1);
|
||||
"clock-frequency", CONFIG_SYS_CLK_FREQ, 1);
|
||||
|
||||
#if defined(CONFIG_DEEP_SLEEP) && defined(CONFIG_SD_BOOT)
|
||||
#define UBOOT_HEAD_LEN 0x1000
|
||||
@ -146,9 +146,9 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
|
||||
* Since second uboot binary has a head, that space need to be
|
||||
* reserved either(assuming its size is less than 0x1000).
|
||||
*/
|
||||
off = fdt_add_mem_rsv(blob, CONFIG_TEXT_BASE - UBOOT_HEAD_LEN,
|
||||
CONFIG_SYS_MONITOR_LEN +
|
||||
CONFIG_SYS_SPL_MALLOC_SIZE + UBOOT_HEAD_LEN);
|
||||
off = fdt_add_mem_rsv(blob, CONFIG_SYS_TEXT_BASE - UBOOT_HEAD_LEN,
|
||||
CONFIG_SYS_MONITOR_LEN + CONFIG_SYS_SPL_MALLOC_SIZE +
|
||||
UBOOT_HEAD_LEN);
|
||||
if (off < 0)
|
||||
printf("Failed to reserve memory for SD boot deep sleep: %s\n",
|
||||
fdt_strerror(off));
|
||||
@ -183,14 +183,14 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
|
||||
|
||||
#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
|
||||
off = fdt_node_offset_by_compat_reg(blob, FSL_IFC_COMPAT,
|
||||
CFG_SYS_IFC_ADDR);
|
||||
fdt_set_node_status(blob, off, FDT_STATUS_DISABLED);
|
||||
CONFIG_SYS_IFC_ADDR);
|
||||
fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
|
||||
#else
|
||||
off = fdt_node_offset_by_compat_reg(blob, FSL_QSPI_COMPAT,
|
||||
QSPI0_BASE_ADDR);
|
||||
fdt_set_node_status(blob, off, FDT_STATUS_DISABLED);
|
||||
fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
|
||||
off = fdt_node_offset_by_compat_reg(blob, FSL_DSPI_COMPAT,
|
||||
DSPI1_BASE_ADDR);
|
||||
fdt_set_node_status(blob, off, FDT_STATUS_DISABLED);
|
||||
fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
|
||||
#endif
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ int is_serdes_configured(enum srds_prtcl device)
|
||||
|
||||
int serdes_get_first_lane(u32 sd, enum srds_prtcl device)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
u32 cfg = in_be32(&gur->rcwsr[4]);
|
||||
int i;
|
||||
|
||||
@ -74,7 +74,7 @@ int serdes_get_first_lane(u32 sd, enum srds_prtcl device)
|
||||
|
||||
u64 serdes_init(u32 sd, u32 sd_addr, u32 sd_prctl_mask, u32 sd_prctl_shift)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
u64 serdes_prtcl_map = 0;
|
||||
u32 cfg;
|
||||
int lane;
|
||||
@ -103,14 +103,14 @@ void fsl_serdes_init(void)
|
||||
#ifdef CONFIG_SYS_FSL_SRDS_1
|
||||
if (!(serdes1_prtcl_map & (1ULL << NONE)))
|
||||
serdes1_prtcl_map = serdes_init(FSL_SRDS_1,
|
||||
CFG_SYS_FSL_SERDES_ADDR,
|
||||
CONFIG_SYS_FSL_SERDES_ADDR,
|
||||
RCWSR4_SRDS1_PRTCL_MASK,
|
||||
RCWSR4_SRDS1_PRTCL_SHIFT);
|
||||
#endif
|
||||
#ifdef CONFIG_SYS_FSL_SRDS_2
|
||||
if (!(serdes2_prtcl_map & (1ULL << NONE)))
|
||||
serdes2_prtcl_map = serdes_init(FSL_SRDS_2,
|
||||
CFG_SYS_FSL_SERDES_ADDR +
|
||||
CONFIG_SYS_FSL_SERDES_ADDR +
|
||||
FSL_SRDS_2 * 0x1000,
|
||||
RCWSR4_SRDS2_PRTCL_MASK,
|
||||
RCWSR4_SRDS2_PRTCL_SHIFT);
|
||||
|
@ -29,9 +29,9 @@
|
||||
*/
|
||||
static void __secure ls1_save_ddr_head(void)
|
||||
{
|
||||
const char *src = (const char *)CFG_SYS_SDRAM_BASE;
|
||||
const char *src = (const char *)CONFIG_SYS_SDRAM_BASE;
|
||||
char *dest = (char *)(OCRAM_BASE_S_ADDR + OCRAM_S_SIZE - DDR_RESV_LEN);
|
||||
struct ccsr_scfg __iomem *scfg = (void *)CFG_SYS_FSL_SCFG_ADDR;
|
||||
struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_FSL_SCFG_ADDR;
|
||||
int i;
|
||||
|
||||
out_le32(&scfg->sparecr[2], dest);
|
||||
@ -42,7 +42,7 @@ static void __secure ls1_save_ddr_head(void)
|
||||
|
||||
static void __secure ls1_fsm_setup(void)
|
||||
{
|
||||
void *dcsr_epu_base = (void *)(CFG_SYS_DCSRBAR + EPU_BLOCK_OFFSET);
|
||||
void *dcsr_epu_base = (void *)(CONFIG_SYS_DCSRBAR + EPU_BLOCK_OFFSET);
|
||||
void *dcsr_rcpm_base = (void *)SYS_FSL_DCSR_RCPM_ADDR;
|
||||
|
||||
out_be32(dcsr_rcpm_base + DCSR_RCPM_CSTTACR0, 0x00001001);
|
||||
@ -57,8 +57,8 @@ static void __secure ls1_fsm_setup(void)
|
||||
|
||||
static void __secure ls1_deepsleep_irq_cfg(void)
|
||||
{
|
||||
struct ccsr_scfg __iomem *scfg = (void *)CFG_SYS_FSL_SCFG_ADDR;
|
||||
struct ccsr_rcpm __iomem *rcpm = (void *)CFG_SYS_FSL_RCPM_ADDR;
|
||||
struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_FSL_SCFG_ADDR;
|
||||
struct ccsr_rcpm __iomem *rcpm = (void *)CONFIG_SYS_FSL_RCPM_ADDR;
|
||||
u32 ippdexpcr0, ippdexpcr1, pmcintecr = 0;
|
||||
|
||||
/* Mask interrupts from GIC */
|
||||
@ -118,10 +118,10 @@ static void __secure ls1_delay(unsigned int loop)
|
||||
|
||||
static void __secure ls1_start_fsm(void)
|
||||
{
|
||||
void *dcsr_epu_base = (void *)(CFG_SYS_DCSRBAR + EPU_BLOCK_OFFSET);
|
||||
void *dcsr_epu_base = (void *)(CONFIG_SYS_DCSRBAR + EPU_BLOCK_OFFSET);
|
||||
void *ccsr_gic_base = (void *)SYS_FSL_GIC_ADDR;
|
||||
struct ccsr_scfg __iomem *scfg = (void *)CFG_SYS_FSL_SCFG_ADDR;
|
||||
struct ccsr_ddr __iomem *ddr = (void *)CFG_SYS_FSL_DDR_ADDR;
|
||||
struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_FSL_SCFG_ADDR;
|
||||
struct ccsr_ddr __iomem *ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR;
|
||||
|
||||
/* Set HRSTCR */
|
||||
setbits_be32(&scfg->hrstcr, 0x80000000);
|
||||
@ -155,9 +155,9 @@ static void __secure ls1_start_fsm(void)
|
||||
|
||||
static void __secure ls1_deep_sleep(u32 entry_point)
|
||||
{
|
||||
struct ccsr_scfg __iomem *scfg = (void *)CFG_SYS_FSL_SCFG_ADDR;
|
||||
struct ccsr_gur __iomem *gur = (void *)CFG_SYS_FSL_GUTS_ADDR;
|
||||
struct ccsr_rcpm __iomem *rcpm = (void *)CFG_SYS_FSL_RCPM_ADDR;
|
||||
struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_FSL_SCFG_ADDR;
|
||||
struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR;
|
||||
struct ccsr_rcpm __iomem *rcpm = (void *)CONFIG_SYS_FSL_RCPM_ADDR;
|
||||
#ifdef QIXIS_BASE
|
||||
u32 tmp;
|
||||
void *qixis_base = (void *)QIXIS_BASE;
|
||||
@ -213,8 +213,8 @@ static void __secure ls1_deep_sleep(u32 entry_point)
|
||||
#else
|
||||
static void __secure ls1_sleep(void)
|
||||
{
|
||||
struct ccsr_scfg __iomem *scfg = (void *)CFG_SYS_FSL_SCFG_ADDR;
|
||||
struct ccsr_rcpm __iomem *rcpm = (void *)CFG_SYS_FSL_RCPM_ADDR;
|
||||
struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_FSL_SCFG_ADDR;
|
||||
struct ccsr_rcpm __iomem *rcpm = (void *)CONFIG_SYS_FSL_RCPM_ADDR;
|
||||
|
||||
#ifdef QIXIS_BASE
|
||||
u32 tmp;
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
.align 5
|
||||
|
||||
#define ONE_MS (CONFIG_COUNTER_FREQUENCY / 1000)
|
||||
#define ONE_MS (COUNTER_FREQUENCY / 1000)
|
||||
#define RESET_WAIT (30 * ONE_MS)
|
||||
|
||||
.globl psci_version
|
||||
@ -129,8 +129,8 @@ psci_cpu_on:
|
||||
mov r1, r4
|
||||
|
||||
@ Get DCFG base address
|
||||
movw r4, #(CFG_SYS_FSL_GUTS_ADDR & 0xffff)
|
||||
movt r4, #(CFG_SYS_FSL_GUTS_ADDR >> 16)
|
||||
movw r4, #(CONFIG_SYS_FSL_GUTS_ADDR & 0xffff)
|
||||
movt r4, #(CONFIG_SYS_FSL_GUTS_ADDR >> 16)
|
||||
|
||||
@ Detect target CPU state
|
||||
ldr r2, [r4, #DCFG_CCSR_BRR]
|
||||
@ -141,8 +141,8 @@ psci_cpu_on:
|
||||
|
||||
@ Reset target CPU
|
||||
@ Get SCFG base address
|
||||
movw r0, #(CFG_SYS_FSL_SCFG_ADDR & 0xffff)
|
||||
movt r0, #(CFG_SYS_FSL_SCFG_ADDR >> 16)
|
||||
movw r0, #(CONFIG_SYS_FSL_SCFG_ADDR & 0xffff)
|
||||
movt r0, #(CONFIG_SYS_FSL_SCFG_ADDR >> 16)
|
||||
|
||||
@ Enable CORE Soft Reset
|
||||
movw r5, #0
|
||||
@ -216,8 +216,8 @@ psci_affinity_info:
|
||||
mov r1, r4
|
||||
|
||||
@ Get RCPM base address
|
||||
movw r4, #(CFG_SYS_FSL_RCPM_ADDR & 0xffff)
|
||||
movt r4, #(CFG_SYS_FSL_RCPM_ADDR >> 16)
|
||||
movw r4, #(CONFIG_SYS_FSL_RCPM_ADDR & 0xffff)
|
||||
movt r4, #(CONFIG_SYS_FSL_RCPM_ADDR >> 16)
|
||||
|
||||
mov r0, #PSCI_AFFINITY_LEVEL_ON
|
||||
|
||||
@ -236,8 +236,8 @@ out_affinity_info:
|
||||
.globl psci_system_reset
|
||||
psci_system_reset:
|
||||
@ Get DCFG base address
|
||||
movw r1, #(CFG_SYS_FSL_GUTS_ADDR & 0xffff)
|
||||
movt r1, #(CFG_SYS_FSL_GUTS_ADDR >> 16)
|
||||
movw r1, #(CONFIG_SYS_FSL_GUTS_ADDR & 0xffff)
|
||||
movt r1, #(CONFIG_SYS_FSL_GUTS_ADDR >> 16)
|
||||
|
||||
mov r2, #DCFG_CCSR_RSTCR_RESET_REQ
|
||||
rev r2, r2
|
||||
|
@ -12,9 +12,7 @@
|
||||
#include <asm/arch/ls102xa_soc.h>
|
||||
#include <asm/arch/ls102xa_stream_id.h>
|
||||
#include <fsl_csu.h>
|
||||
#ifdef CONFIG_SYS_FSL_ERRATUM_A008850
|
||||
#include <fsl_ddr_sdram.h>
|
||||
#endif
|
||||
|
||||
struct liodn_id_table sec_liodn_tbl[] = {
|
||||
SET_SEC_JR_LIODN_ENTRY(0, 0x10, 0x10),
|
||||
@ -54,7 +52,7 @@ struct smmu_stream_id dev_stream_id[] = {
|
||||
|
||||
unsigned int get_soc_major_rev(void)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
unsigned int svr, major;
|
||||
|
||||
svr = in_be32(&gur->svr);
|
||||
@ -113,7 +111,7 @@ static void erratum_a008850_early(void)
|
||||
/* part 1 of 2 */
|
||||
struct ccsr_cci400 __iomem *cci = (void *)(CONFIG_SYS_IMMR +
|
||||
CONFIG_SYS_CCI400_OFFSET);
|
||||
struct ccsr_ddr __iomem *ddr = (void *)CFG_SYS_FSL_DDR_ADDR;
|
||||
struct ccsr_ddr __iomem *ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR;
|
||||
|
||||
/* disables propagation of barrier transactions to DDRC from CCI400 */
|
||||
out_le32(&cci->ctrl_ord, CCI400_CTRLORD_TERM_BARRIER);
|
||||
@ -129,7 +127,7 @@ void erratum_a008850_post(void)
|
||||
/* part 2 of 2 */
|
||||
struct ccsr_cci400 __iomem *cci = (void *)(CONFIG_SYS_IMMR +
|
||||
CONFIG_SYS_CCI400_OFFSET);
|
||||
struct ccsr_ddr __iomem *ddr = (void *)CFG_SYS_FSL_DDR_ADDR;
|
||||
struct ccsr_ddr __iomem *ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR;
|
||||
u32 tmp;
|
||||
|
||||
/* enable propagation of barrier transactions to DDRC from CCI400 */
|
||||
@ -161,7 +159,7 @@ void erratum_a010315(void)
|
||||
|
||||
int arch_soc_init(void)
|
||||
{
|
||||
struct ccsr_scfg *scfg = (struct ccsr_scfg *)CFG_SYS_FSL_SCFG_ADDR;
|
||||
struct ccsr_scfg *scfg = (struct ccsr_scfg *)CONFIG_SYS_FSL_SCFG_ADDR;
|
||||
struct ccsr_cci400 *cci = (struct ccsr_cci400 *)(CONFIG_SYS_IMMR +
|
||||
CONFIG_SYS_CCI400_OFFSET);
|
||||
unsigned int major;
|
||||
@ -174,6 +172,10 @@ int arch_soc_init(void)
|
||||
out_be32(&scfg->qspi_cfg, SCFG_QSPI_CLKSEL);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VIDEO_FSL_DCU_FB
|
||||
out_be32(&scfg->pixclkcr, SCFG_PIXCLKCR_PXCKEN);
|
||||
#endif
|
||||
|
||||
/* Configure Little endian for SAI, ASRC and SPDIF */
|
||||
out_be32(&scfg->endiancr, SCFG_ENDIANCR_LE);
|
||||
|
||||
|
@ -65,7 +65,7 @@ int timer_init(void)
|
||||
/* Enable System Counter */
|
||||
writel(SYS_COUNTER_CTRL_ENABLE, &sctr->cntcr);
|
||||
|
||||
freq = CONFIG_COUNTER_FREQUENCY;
|
||||
freq = COUNTER_FREQUENCY;
|
||||
asm("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq));
|
||||
|
||||
/* Set PL1 Physical Timer Ctrl */
|
||||
|
@ -112,8 +112,8 @@ ENTRY(_do_nonsec_entry)
|
||||
ENDPROC(_do_nonsec_entry)
|
||||
|
||||
.macro get_cbar_addr addr
|
||||
#ifdef CFG_ARM_GIC_BASE_ADDRESS
|
||||
ldr \addr, =CFG_ARM_GIC_BASE_ADDRESS
|
||||
#ifdef CONFIG_ARM_GIC_BASE_ADDRESS
|
||||
ldr \addr, =CONFIG_ARM_GIC_BASE_ADDRESS
|
||||
#else
|
||||
mrc p15, 4, \addr, c15, c0, 0 @ read CBAR
|
||||
bfc \addr, #0, #15 @ clear reserved bits
|
||||
@ -189,11 +189,11 @@ ENTRY(_nonsec_init)
|
||||
* we do this here instead.
|
||||
* But first check if we have the generic timer.
|
||||
*/
|
||||
#if CONFIG_COUNTER_FREQUENCY
|
||||
#ifdef COUNTER_FREQUENCY
|
||||
mrc p15, 0, r0, c0, c1, 1 @ read ID_PFR1
|
||||
and r0, r0, #CPUID_ARM_GENTIMER_MASK @ mask arch timer bits
|
||||
cmp r0, #(1 << CPUID_ARM_GENTIMER_SHIFT)
|
||||
ldreq r1, =CONFIG_COUNTER_FREQUENCY
|
||||
ldreq r1, =COUNTER_FREQUENCY
|
||||
mcreq p15, 0, r1, c14, c0, 0 @ write CNTFRQ
|
||||
#endif
|
||||
|
||||
@ -205,11 +205,11 @@ ENTRY(_nonsec_init)
|
||||
bx lr
|
||||
ENDPROC(_nonsec_init)
|
||||
|
||||
#ifdef CFG_SMP_PEN_ADDR
|
||||
#ifdef CONFIG_SMP_PEN_ADDR
|
||||
/* void __weak smp_waitloop(unsigned previous_address); */
|
||||
WEAK(smp_waitloop)
|
||||
ENTRY(smp_waitloop)
|
||||
wfi
|
||||
ldr r1, =CFG_SMP_PEN_ADDR @ load start address
|
||||
ldr r1, =CONFIG_SMP_PEN_ADDR @ load start address
|
||||
ldr r1, [r1]
|
||||
#ifdef CONFIG_PEN_ADDR_BIG_ENDIAN
|
||||
rev r1, r1
|
||||
@ -219,6 +219,7 @@ WEAK(smp_waitloop)
|
||||
mov r0, r1
|
||||
b _do_nonsec_entry
|
||||
ENDPROC(smp_waitloop)
|
||||
.weak smp_waitloop
|
||||
#endif
|
||||
|
||||
.popsection
|
||||
|
@ -36,32 +36,34 @@ _psci_vectors:
|
||||
b default_psci_vector @ irq
|
||||
b psci_fiq_enter @ fiq
|
||||
|
||||
WEAK(psci_fiq_enter)
|
||||
ENTRY(psci_fiq_enter)
|
||||
movs pc, lr
|
||||
ENDPROC(psci_fiq_enter)
|
||||
.weak psci_fiq_enter
|
||||
|
||||
WEAK(default_psci_vector)
|
||||
ENTRY(default_psci_vector)
|
||||
movs pc, lr
|
||||
ENDPROC(default_psci_vector)
|
||||
.weak default_psci_vector
|
||||
|
||||
WEAK(psci_version)
|
||||
WEAK(psci_cpu_suspend)
|
||||
WEAK(psci_cpu_off)
|
||||
WEAK(psci_cpu_on)
|
||||
WEAK(psci_affinity_info)
|
||||
WEAK(psci_migrate)
|
||||
WEAK(psci_migrate_info_type)
|
||||
WEAK(psci_migrate_info_up_cpu)
|
||||
WEAK(psci_system_off)
|
||||
WEAK(psci_system_reset)
|
||||
WEAK(psci_features)
|
||||
WEAK(psci_cpu_freeze)
|
||||
WEAK(psci_cpu_default_suspend)
|
||||
WEAK(psci_node_hw_state)
|
||||
WEAK(psci_system_suspend)
|
||||
WEAK(psci_set_suspend_mode)
|
||||
WEAK(psi_stat_residency)
|
||||
WEAK(psci_stat_count)
|
||||
ENTRY(psci_version)
|
||||
ENTRY(psci_cpu_suspend)
|
||||
ENTRY(psci_cpu_off)
|
||||
ENTRY(psci_cpu_on)
|
||||
ENTRY(psci_affinity_info)
|
||||
ENTRY(psci_migrate)
|
||||
ENTRY(psci_migrate_info_type)
|
||||
ENTRY(psci_migrate_info_up_cpu)
|
||||
ENTRY(psci_system_off)
|
||||
ENTRY(psci_system_reset)
|
||||
ENTRY(psci_features)
|
||||
ENTRY(psci_cpu_freeze)
|
||||
ENTRY(psci_cpu_default_suspend)
|
||||
ENTRY(psci_node_hw_state)
|
||||
ENTRY(psci_system_suspend)
|
||||
ENTRY(psci_set_suspend_mode)
|
||||
ENTRY(psi_stat_residency)
|
||||
ENTRY(psci_stat_count)
|
||||
mov r0, #ARM_PSCI_RET_NI @ Return -1 (Not Implemented)
|
||||
mov pc, lr
|
||||
ENDPROC(psci_stat_count)
|
||||
@ -82,6 +84,24 @@ ENDPROC(psci_cpu_on)
|
||||
ENDPROC(psci_cpu_off)
|
||||
ENDPROC(psci_cpu_suspend)
|
||||
ENDPROC(psci_version)
|
||||
.weak psci_version
|
||||
.weak psci_cpu_suspend
|
||||
.weak psci_cpu_off
|
||||
.weak psci_cpu_on
|
||||
.weak psci_affinity_info
|
||||
.weak psci_migrate
|
||||
.weak psci_migrate_info_type
|
||||
.weak psci_migrate_info_up_cpu
|
||||
.weak psci_system_off
|
||||
.weak psci_system_reset
|
||||
.weak psci_features
|
||||
.weak psci_cpu_freeze
|
||||
.weak psci_cpu_default_suspend
|
||||
.weak psci_node_hw_state
|
||||
.weak psci_system_suspend
|
||||
.weak psci_set_suspend_mode
|
||||
.weak psi_stat_residency
|
||||
.weak psci_stat_count
|
||||
|
||||
_psci_table:
|
||||
.word ARM_PSCI_FN_CPU_SUSPEND
|
||||
@ -159,11 +179,12 @@ _smc_psci:
|
||||
movs pc, lr @ Return to the kernel
|
||||
|
||||
@ Requires dense and single-cluster CPU ID space
|
||||
WEAK(psci_get_cpu_id)
|
||||
ENTRY(psci_get_cpu_id)
|
||||
mrc p15, 0, r0, c0, c0, 5 /* read MPIDR */
|
||||
and r0, r0, #0xff /* return CPU ID in cluster */
|
||||
bx lr
|
||||
ENDPROC(psci_get_cpu_id)
|
||||
.weak psci_get_cpu_id
|
||||
|
||||
/* Imported from Linux kernel */
|
||||
ENTRY(psci_v7_flush_dcache_all)
|
||||
@ -215,7 +236,7 @@ finished:
|
||||
bx lr
|
||||
ENDPROC(psci_v7_flush_dcache_all)
|
||||
|
||||
WEAK(psci_disable_smp)
|
||||
ENTRY(psci_disable_smp)
|
||||
mrc p15, 0, r0, c1, c0, 1 @ ACTLR
|
||||
bic r0, r0, #(1 << 6) @ Clear SMP bit
|
||||
mcr p15, 0, r0, c1, c0, 1 @ ACTLR
|
||||
@ -223,14 +244,16 @@ WEAK(psci_disable_smp)
|
||||
dsb
|
||||
bx lr
|
||||
ENDPROC(psci_disable_smp)
|
||||
.weak psci_disable_smp
|
||||
|
||||
WEAK(psci_enable_smp)
|
||||
ENTRY(psci_enable_smp)
|
||||
mrc p15, 0, r0, c1, c0, 1 @ ACTLR
|
||||
orr r0, r0, #(1 << 6) @ Set SMP bit
|
||||
mcr p15, 0, r0, c1, c0, 1 @ ACTLR
|
||||
isb
|
||||
bx lr
|
||||
ENDPROC(psci_enable_smp)
|
||||
.weak psci_enable_smp
|
||||
|
||||
ENTRY(psci_cpu_off_common)
|
||||
push {lr}
|
||||
@ -293,13 +316,15 @@ ENTRY(psci_stack_setup)
|
||||
bx r6
|
||||
ENDPROC(psci_stack_setup)
|
||||
|
||||
WEAK(psci_arch_init)
|
||||
ENTRY(psci_arch_init)
|
||||
mov pc, lr
|
||||
ENDPROC(psci_arch_init)
|
||||
.weak psci_arch_init
|
||||
|
||||
WEAK(psci_arch_cpu_entry)
|
||||
ENTRY(psci_arch_cpu_entry)
|
||||
mov pc, lr
|
||||
ENDPROC(psci_arch_cpu_entry)
|
||||
.weak psci_arch_cpu_entry
|
||||
|
||||
ENTRY(psci_cpu_entry)
|
||||
bl psci_enable_smp
|
||||
|
@ -3,13 +3,14 @@
|
||||
# Copyright (C) 2009 Samsung Electronics
|
||||
# Minkyu Kang <mk7.kang@samsung.com>
|
||||
|
||||
obj-$(CONFIG_PWM_S5P) += pwm.o
|
||||
ifdef CONFIG_ARCH_NEXELL
|
||||
obj-$(CONFIG_PWM_NX) += pwm.o
|
||||
obj-$(CONFIG_S5P4418_ONEWIRE) += pwm.o
|
||||
else
|
||||
obj-y += cpu_info.o
|
||||
ifndef CONFIG_SPL_BUILD
|
||||
obj-y += timer.o
|
||||
obj-y += sromc.o
|
||||
obj-$(CONFIG_PWM) += pwm.o
|
||||
endif
|
||||
endif
|
||||
|
@ -4,7 +4,6 @@
|
||||
* Minkyu Kang <mk7.kang@samsung.com>
|
||||
*/
|
||||
#include <common.h>
|
||||
#include <display_options.h>
|
||||
#include <fdtdec.h>
|
||||
#include <init.h>
|
||||
#include <asm/global_data.h>
|
||||
|
@ -7,11 +7,12 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <errno.h>
|
||||
#include <pwm.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/pwm.h>
|
||||
#include <asm/arch/clk.h>
|
||||
|
||||
int s5p_pwm_enable(int pwm_id)
|
||||
int pwm_enable(int pwm_id)
|
||||
{
|
||||
const struct s5p_timer *pwm =
|
||||
#if defined(CONFIG_ARCH_NEXELL)
|
||||
@ -29,7 +30,7 @@ int s5p_pwm_enable(int pwm_id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void s5p_pwm_disable(int pwm_id)
|
||||
void pwm_disable(int pwm_id)
|
||||
{
|
||||
const struct s5p_timer *pwm =
|
||||
#if defined(CONFIG_ARCH_NEXELL)
|
||||
@ -91,7 +92,7 @@ static unsigned long pwm_calc_tin(int pwm_id, unsigned long freq)
|
||||
|
||||
#define NS_IN_SEC 1000000000UL
|
||||
|
||||
int s5p_pwm_config(int pwm_id, int duty_ns, int period_ns)
|
||||
int pwm_config(int pwm_id, int duty_ns, int period_ns)
|
||||
{
|
||||
const struct s5p_timer *pwm =
|
||||
#if defined(CONFIG_ARCH_NEXELL)
|
||||
@ -156,7 +157,7 @@ int s5p_pwm_config(int pwm_id, int duty_ns, int period_ns)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int s5p_pwm_init(int pwm_id, int div, int invert)
|
||||
int pwm_init(int pwm_id, int div, int invert)
|
||||
{
|
||||
u32 val;
|
||||
const struct s5p_timer *pwm =
|
||||
@ -218,7 +219,7 @@ int s5p_pwm_init(int pwm_id, int div, int invert)
|
||||
val |= TCON_INVERTER(pwm_id);
|
||||
writel(val, &pwm->tcon);
|
||||
|
||||
s5p_pwm_enable(pwm_id);
|
||||
pwm_enable(pwm_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -16,6 +16,10 @@
|
||||
#include <asm/arch/clk.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
/* Use the old PWM interface for now */
|
||||
#undef CONFIG_DM_PWM
|
||||
#include <pwm.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
unsigned long get_current_tick(void);
|
||||
@ -33,7 +37,7 @@ static inline struct s5p_timer *s5p_get_base_timer(void)
|
||||
* This operates at 1MHz and counts downwards. It will wrap about every
|
||||
* hour (2^32 microseconds).
|
||||
*
|
||||
* Return: current value of timer
|
||||
* @return current value of timer
|
||||
*/
|
||||
static unsigned long timer_get_us_down(void)
|
||||
{
|
||||
@ -45,9 +49,9 @@ static unsigned long timer_get_us_down(void)
|
||||
int timer_init(void)
|
||||
{
|
||||
/* PWM Timer 4 */
|
||||
s5p_pwm_init(4, MUX_DIV_4, 0);
|
||||
s5p_pwm_config(4, 100000, 100000);
|
||||
s5p_pwm_enable(4);
|
||||
pwm_init(4, MUX_DIV_4, 0);
|
||||
pwm_config(4, 100000, 100000);
|
||||
pwm_enable(4);
|
||||
|
||||
/* Use this as the current monotonic time in us */
|
||||
gd->arch.timer_reset_value = 0;
|
||||
|
@ -13,8 +13,10 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/nexell.h>
|
||||
#include <asm/arch/clk.h>
|
||||
#include <asm/arch/reset.h>
|
||||
#include <asm/arch/tieoff.h>
|
||||
#include <cpu_func.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@ -43,12 +45,39 @@ static void cpu_soc_init(void)
|
||||
nx_tieoff_set(NX_TIEOFF_CORTEXA9MP_TOP_QUADL2C_L2RET1N_1, 1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PL011_SERIAL
|
||||
static void serial_device_init(void)
|
||||
{
|
||||
char dev[10];
|
||||
int id;
|
||||
|
||||
sprintf(dev, "nx-uart.%d", CONFIG_CONS_INDEX);
|
||||
id = RESET_ID_UART0 + CONFIG_CONS_INDEX;
|
||||
|
||||
struct clk *clk = clk_get((const char *)dev);
|
||||
|
||||
/* reset control: Low active ___|--- */
|
||||
nx_rstcon_setrst(id, RSTCON_ASSERT);
|
||||
udelay(10);
|
||||
nx_rstcon_setrst(id, RSTCON_NEGATE);
|
||||
udelay(10);
|
||||
|
||||
/* set clock */
|
||||
clk_disable(clk);
|
||||
clk_set_rate(clk, CONFIG_PL011_CLOCK);
|
||||
clk_enable(clk);
|
||||
}
|
||||
#endif
|
||||
|
||||
int arch_cpu_init(void)
|
||||
{
|
||||
flush_dcache_all();
|
||||
cpu_soc_init();
|
||||
clk_init();
|
||||
|
||||
if (IS_ENABLED(CONFIG_PL011_SERIAL))
|
||||
serial_device_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <asm/system.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/armv7.h>
|
||||
#include <system-constants.h>
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
@ -98,10 +97,12 @@ switch_to_hypervisor_ret:
|
||||
orr r0, r0, #0xc0 @ disable FIQ and IRQ
|
||||
msr cpsr,r0
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE)
|
||||
/*
|
||||
* Setup vector:
|
||||
* (OMAP4 spl TEXT_BASE is not 32 byte aligned.
|
||||
* Continue to use ROM code vector only in OMAP4 spl)
|
||||
*/
|
||||
#if !(defined(CONFIG_OMAP44XX) && defined(CONFIG_SPL_BUILD))
|
||||
/* Set V=0 in CP15 SCTLR register - for VBAR to point to vector */
|
||||
mrc p15, 0, r0, c1, c0, 0 @ Read CP15 SCTLR Register
|
||||
bic r0, #CR_V @ V = 0
|
||||
@ -151,14 +152,16 @@ ENDPROC(c_runtime_cpu_setup)
|
||||
* Don't save anything to stack even if compiled with -O0
|
||||
*
|
||||
*************************************************************************/
|
||||
WEAK(save_boot_params)
|
||||
ENTRY(save_boot_params)
|
||||
b save_boot_params_ret @ back to my caller
|
||||
ENDPROC(save_boot_params)
|
||||
.weak save_boot_params
|
||||
|
||||
#ifdef CONFIG_ARMV7_LPAE
|
||||
WEAK(switch_to_hypervisor)
|
||||
ENTRY(switch_to_hypervisor)
|
||||
b switch_to_hypervisor_ret
|
||||
ENDPROC(switch_to_hypervisor)
|
||||
.weak switch_to_hypervisor
|
||||
#endif
|
||||
|
||||
/*************************************************************************
|
||||
@ -170,17 +173,6 @@ ENDPROC(switch_to_hypervisor)
|
||||
*
|
||||
*************************************************************************/
|
||||
ENTRY(cpu_init_cp15)
|
||||
|
||||
#if CONFIG_IS_ENABLED(ARMV7_SET_CORTEX_SMPEN)
|
||||
/*
|
||||
* The Arm Cortex-A7 TRM says this bit must be enabled before
|
||||
* "any cache or TLB maintenance operations are performed".
|
||||
*/
|
||||
mrc p15, 0, r0, c1, c0, 1 @ read auxilary control register
|
||||
orr r0, r0, #1 << 6 @ set SMP bit to enable coherency
|
||||
mcr p15, 0, r0, c1, c0, 1 @ write auxilary control register
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Invalidate L1 I/D
|
||||
*/
|
||||
@ -253,7 +245,7 @@ ENTRY(cpu_init_cp15)
|
||||
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK)
|
||||
ldr r0, =(CONFIG_SPL_STACK)
|
||||
#else
|
||||
ldr r0, =(SYS_INIT_SP_ADDR)
|
||||
ldr r0, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
#endif
|
||||
bic r0, r0, #7 /* 8-byte alignment for ABI compliance */
|
||||
mov sp, r0
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* (C) Copyright 2014 STMicroelectronics
|
||||
* (C) Copyright 2014 stmicroelectronics
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
@ -18,7 +18,7 @@ static struct stv0991_cgu_regs *const stv0991_cgu_regs = \
|
||||
(struct stv0991_cgu_regs *) (CGU_BASE_ADDR);
|
||||
|
||||
#define READ_TIMER() (readl(&gpt1_regs_ptr->cnt) & GPT_FREE_RUNNING)
|
||||
#define GPT_RESOLUTION (CFG_SYS_HZ_CLOCK / CONFIG_SYS_HZ)
|
||||
#define GPT_RESOLUTION (CONFIG_SYS_HZ_CLOCK / CONFIG_SYS_HZ)
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@ -67,7 +67,7 @@ void __udelay(unsigned long usec)
|
||||
{
|
||||
ulong tmo;
|
||||
ulong start = get_timer_masked();
|
||||
ulong tenudelcnt = CFG_SYS_HZ_CLOCK / (1000 * 100);
|
||||
ulong tenudelcnt = CONFIG_SYS_HZ_CLOCK / (1000 * 100);
|
||||
ulong rndoff;
|
||||
|
||||
rndoff = (usec % 10) ? 1 : 0;
|
||||
|
@ -5,13 +5,11 @@
|
||||
# Based on some other Makefile
|
||||
# (C) Copyright 2000-2003
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
obj-y += timer.o
|
||||
|
||||
obj-$(CONFIG_MACH_SUN6I) += tzpc.o
|
||||
obj-$(CONFIG_MACH_SUN8I_H3) += tzpc.o
|
||||
|
||||
obj-$(CONFIG_MACH_SUN6I) += sram.o
|
||||
obj-$(CONFIG_MACH_SUN8I) += sram.o
|
||||
|
||||
ifndef CONFIG_SPL_BUILD
|
||||
obj-$(CONFIG_ARMV7_PSCI) += psci.o
|
||||
endif
|
||||
|
@ -57,7 +57,7 @@ static u32 __secure cp15_read_cntp_ctl(void)
|
||||
return val;
|
||||
}
|
||||
|
||||
#define ONE_MS (CONFIG_COUNTER_FREQUENCY / 1000)
|
||||
#define ONE_MS (COUNTER_FREQUENCY / 1000)
|
||||
|
||||
static void __secure __mdelay(u32 ms)
|
||||
{
|
||||
@ -153,7 +153,7 @@ static void __secure sunxi_cpu_set_power(int cpu, bool on)
|
||||
|
||||
sunxi_power_switch((void *)cpucfg + SUN8I_R40_PWR_CLAMP(cpu),
|
||||
(void *)cpucfg + SUN8I_R40_PWROFF,
|
||||
on, cpu);
|
||||
on, 0);
|
||||
}
|
||||
#else /* ! CONFIG_MACH_SUN7I && ! CONFIG_MACH_SUN8I_R40 */
|
||||
static void __secure sunxi_cpu_set_power(int cpu, bool on)
|
||||
|
@ -1,40 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2012 Henrik Nordstrom <henrik@henriknordstrom.net>
|
||||
*
|
||||
* (C) Copyright 2007-2011
|
||||
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
|
||||
* Tom Cubie <tangliang@allwinnertech.com>
|
||||
*
|
||||
* SRAM init for older sunxi SoCs.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
void sunxi_sram_init(void)
|
||||
{
|
||||
/*
|
||||
* Undocumented magic taken from boot0, without this DRAM
|
||||
* access gets messed up (seems cache related).
|
||||
* The boot0 sources describe this as: "config ema for cache sram"
|
||||
* Newer SoCs (A83T, H3 and anything beyond) don't need this anymore.
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_MACH_SUN6I))
|
||||
setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0x1800);
|
||||
|
||||
if (IS_ENABLED(CONFIG_MACH_SUN8I)) {
|
||||
uint version = sunxi_get_sram_id();
|
||||
|
||||
if (IS_ENABLED(CONFIG_MACH_SUN8I_A23)) {
|
||||
if (version == 0x1650)
|
||||
setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0x1800);
|
||||
else /* 0x1661 ? */
|
||||
setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0xc0);
|
||||
} else if (IS_ENABLED(CONFIG_MACH_SUN8I_A33)) {
|
||||
if (version != 0x1667)
|
||||
setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0xc0);
|
||||
}
|
||||
}
|
||||
}
|
116
arch/arm/cpu/armv7/sunxi/timer.c
Normal file
116
arch/arm/cpu/armv7/sunxi/timer.c
Normal file
@ -0,0 +1,116 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2007-2011
|
||||
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
|
||||
* Tom Cubie <tangliang@allwinnertech.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <time.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/timer.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define TIMER_MODE (0x0 << 7) /* continuous mode */
|
||||
#define TIMER_DIV (0x0 << 4) /* pre scale 1 */
|
||||
#define TIMER_SRC (0x1 << 2) /* osc24m */
|
||||
#define TIMER_RELOAD (0x1 << 1) /* reload internal value */
|
||||
#define TIMER_EN (0x1 << 0) /* enable timer */
|
||||
|
||||
#define TIMER_CLOCK (24 * 1000 * 1000)
|
||||
#define COUNT_TO_USEC(x) ((x) / 24)
|
||||
#define USEC_TO_COUNT(x) ((x) * 24)
|
||||
#define TICKS_PER_HZ (TIMER_CLOCK / CONFIG_SYS_HZ)
|
||||
#define TICKS_TO_HZ(x) ((x) / TICKS_PER_HZ)
|
||||
|
||||
#define TIMER_LOAD_VAL 0xffffffff
|
||||
|
||||
#define TIMER_NUM 0 /* we use timer 0 */
|
||||
|
||||
/* read the 32-bit timer */
|
||||
static ulong read_timer(void)
|
||||
{
|
||||
struct sunxi_timer_reg *timers =
|
||||
(struct sunxi_timer_reg *)SUNXI_TIMER_BASE;
|
||||
struct sunxi_timer *timer = &timers->timer[TIMER_NUM];
|
||||
|
||||
/*
|
||||
* The hardware timer counts down, therefore we invert to
|
||||
* produce an incrementing timer.
|
||||
*/
|
||||
return ~readl(&timer->val);
|
||||
}
|
||||
|
||||
/* init timer register */
|
||||
int timer_init(void)
|
||||
{
|
||||
struct sunxi_timer_reg *timers =
|
||||
(struct sunxi_timer_reg *)SUNXI_TIMER_BASE;
|
||||
struct sunxi_timer *timer = &timers->timer[TIMER_NUM];
|
||||
writel(TIMER_LOAD_VAL, &timer->inter);
|
||||
writel(TIMER_MODE | TIMER_DIV | TIMER_SRC | TIMER_RELOAD | TIMER_EN,
|
||||
&timer->ctl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* timer without interrupts */
|
||||
static ulong get_timer_masked(void)
|
||||
{
|
||||
/* current tick value */
|
||||
ulong now = TICKS_TO_HZ(read_timer());
|
||||
|
||||
if (now >= gd->arch.lastinc) /* normal (non rollover) */
|
||||
gd->arch.tbl += (now - gd->arch.lastinc);
|
||||
else {
|
||||
/* rollover */
|
||||
gd->arch.tbl += (TICKS_TO_HZ(TIMER_LOAD_VAL)
|
||||
- gd->arch.lastinc) + now;
|
||||
}
|
||||
gd->arch.lastinc = now;
|
||||
|
||||
return gd->arch.tbl;
|
||||
}
|
||||
|
||||
ulong get_timer(ulong base)
|
||||
{
|
||||
return get_timer_masked() - base;
|
||||
}
|
||||
|
||||
/* delay x useconds */
|
||||
void __udelay(unsigned long usec)
|
||||
{
|
||||
long tmo = USEC_TO_COUNT(usec);
|
||||
ulong now, last = read_timer();
|
||||
|
||||
while (tmo > 0) {
|
||||
now = read_timer();
|
||||
if (now > last) /* normal (non rollover) */
|
||||
tmo -= now - last;
|
||||
else /* rollover */
|
||||
tmo -= TIMER_LOAD_VAL - last + now;
|
||||
last = now;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is derived from PowerPC code (read timebase as long long).
|
||||
* On ARM it just returns the timer value.
|
||||
*/
|
||||
unsigned long long get_ticks(void)
|
||||
{
|
||||
return get_timer(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is derived from PowerPC code (timebase clock frequency).
|
||||
* On ARM it returns the number of timer ticks per second.
|
||||
*/
|
||||
ulong get_tbclk(void)
|
||||
{
|
||||
return CONFIG_SYS_HZ;
|
||||
}
|
@ -38,8 +38,8 @@ SECTIONS
|
||||
.data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
|
||||
|
||||
. = ALIGN(4);
|
||||
__u_boot_list : {
|
||||
KEEP(*(SORT(__u_boot_list*)));
|
||||
.u_boot_list : {
|
||||
KEEP(*(SORT(.u_boot_list*)));
|
||||
} > .sram
|
||||
|
||||
. = ALIGN(4);
|
||||
|
@ -26,8 +26,8 @@ static unsigned int read_id_pfr1(void)
|
||||
|
||||
static unsigned long get_gicd_base_address(void)
|
||||
{
|
||||
#ifdef CFG_ARM_GIC_BASE_ADDRESS
|
||||
return CFG_ARM_GIC_BASE_ADDRESS + GIC_DIST_OFFSET;
|
||||
#ifdef CONFIG_ARM_GIC_BASE_ADDRESS
|
||||
return CONFIG_ARM_GIC_BASE_ADDRESS + GIC_DIST_OFFSET;
|
||||
#else
|
||||
unsigned periphbase;
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include <irq_func.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/armv7m.h>
|
||||
#include <spl.h>
|
||||
|
||||
/*
|
||||
* This is called right before passing control to
|
||||
@ -57,8 +56,3 @@ void reset_cpu(void)
|
||||
| (V7M_SCB->aircr & V7M_AIRCR_PRIGROUP_MSK)
|
||||
| V7M_AIRCR_SYSRESET, &V7M_SCB->aircr);
|
||||
}
|
||||
|
||||
void spl_perform_fixups(struct spl_image_info *spl_image)
|
||||
{
|
||||
spl_image->entry_point |= 0x1;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
* The number of reference clock ticks that correspond to 10ms is normally
|
||||
* defined in the SysTick Calibration register's TENMS field. However, on some
|
||||
* devices this is wrong, so this driver allows the clock rate to be defined
|
||||
* using CFG_SYS_HZ_CLOCK.
|
||||
* using CONFIG_SYS_HZ_CLOCK.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
@ -76,10 +76,10 @@ int timer_init(void)
|
||||
|
||||
/*
|
||||
* If the TENMS field is inexact or wrong, specify the clock rate using
|
||||
* CFG_SYS_HZ_CLOCK.
|
||||
* CONFIG_SYS_HZ_CLOCK.
|
||||
*/
|
||||
#if defined(CFG_SYS_HZ_CLOCK)
|
||||
gd->arch.timer_rate_hz = CFG_SYS_HZ_CLOCK;
|
||||
#if defined(CONFIG_SYS_HZ_CLOCK)
|
||||
gd->arch.timer_rate_hz = CONFIG_SYS_HZ_CLOCK;
|
||||
#else
|
||||
gd->arch.timer_rate_hz = (cal & SYSTICK_CAL_TENMS_MASK) * 100;
|
||||
#endif
|
||||
|
@ -31,12 +31,6 @@ config ARMV8_SET_SMPEN
|
||||
it can be safely enabled when EL2/EL3 initialized SMPEN bit
|
||||
or when CPU implementation doesn't include that register.
|
||||
|
||||
config ARMV8_SWITCH_TO_EL1
|
||||
bool "Enable switching to running in EL1"
|
||||
help
|
||||
In some circumstances we need to switch to running in EL1.
|
||||
Enable this option to have U-Boot switch to EL1.
|
||||
|
||||
config ARMV8_SPIN_TABLE
|
||||
bool "Support spin-table enable method"
|
||||
depends on ARMV8_MULTIENTRY && OF_LIBFDT
|
||||
@ -76,7 +70,6 @@ config ARMV8_SEC_FIRMWARE_SUPPORT
|
||||
|
||||
config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
|
||||
bool "Enable ARMv8 secure monitor firmware framework support for SPL"
|
||||
depends on SPL
|
||||
select SPL_FIT
|
||||
select SPL_OF_LIBFDT
|
||||
help
|
||||
@ -84,7 +77,6 @@ config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
|
||||
|
||||
config SPL_RECOVER_DATA_SECTION
|
||||
bool "save/restore SPL data section"
|
||||
depends on SPL
|
||||
help
|
||||
Say Y here to save SPL data section for cold boot, and restore
|
||||
at warm boot in SPL phase.
|
||||
@ -92,7 +84,6 @@ config SPL_RECOVER_DATA_SECTION
|
||||
config SEC_FIRMWARE_ARMV8_PSCI
|
||||
bool "PSCI implementation in secure monitor firmware"
|
||||
depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT
|
||||
depends on ARMV8_PSCI=n
|
||||
help
|
||||
This config enables the ARMv8 PSCI implementation in secure monitor
|
||||
firmware. This is a private PSCI implementation and different from
|
||||
@ -111,7 +102,7 @@ config PSCI_RESET
|
||||
bool "Use PSCI for reset and shutdown"
|
||||
default y
|
||||
select ARM_SMCCC if OF_CONTROL
|
||||
depends on !ARCH_APPLE && !ARCH_BCM283X && !ARCH_EXYNOS7 && \
|
||||
depends on !ARCH_EXYNOS7 && !ARCH_BCM283X && \
|
||||
!TARGET_LS2080AQDS && \
|
||||
!TARGET_LS2080ARDB && !TARGET_LS2080A_EMU && \
|
||||
!TARGET_LS1088ARDB && !TARGET_LS1088AQDS && \
|
||||
@ -134,9 +125,6 @@ config PSCI_RESET
|
||||
|
||||
Select Y here to make use of PSCI calls for system reset
|
||||
|
||||
config SYS_HAS_ARMV8_SECURE_BASE
|
||||
bool
|
||||
|
||||
config ARMV8_PSCI
|
||||
bool "Enable PSCI support" if EXPERT
|
||||
help
|
||||
@ -164,41 +152,22 @@ config ARMV8_PSCI_CPUS_PER_CLUSTER
|
||||
A value 0 or no definition of it works for single cluster system.
|
||||
System with multi-cluster should difine their own exact value.
|
||||
|
||||
config ARMV8_PSCI_RELOCATE
|
||||
bool "Relocate PSCI code"
|
||||
depends on ARMV8_PSCI
|
||||
depends on SYS_HAS_ARMV8_SECURE_BASE
|
||||
help
|
||||
Relocate PSCI code, for example to a secure memory on the SoC. If not
|
||||
set, the PSCI sections are placed together with the u-boot and the
|
||||
regions will be marked as reserved before linux is started.
|
||||
|
||||
config ARMV8_SECURE_BASE
|
||||
hex "Secure address for PSCI image"
|
||||
depends on ARMV8_PSCI_RELOCATE
|
||||
default 0x18000000 if ARCH_LS1028A
|
||||
help
|
||||
Address for placing the PSCI text, data and stack sections.
|
||||
|
||||
|
||||
config ARMV8_EA_EL3_FIRST
|
||||
bool "External aborts and SError interrupt exception are taken in EL3"
|
||||
help
|
||||
Exception handling at all exception levels for External Abort and
|
||||
SError interrupt exception are taken in EL3.
|
||||
|
||||
menuconfig ARMV8_CRYPTO
|
||||
bool "ARM64 Accelerated Cryptographic Algorithms"
|
||||
if SYS_HAS_ARMV8_SECURE_BASE
|
||||
|
||||
if ARMV8_CRYPTO
|
||||
|
||||
config ARMV8_CE_SHA1
|
||||
bool "SHA-1 digest algorithm (ARMv8 Crypto Extensions)"
|
||||
default y if SHA1
|
||||
|
||||
config ARMV8_CE_SHA256
|
||||
bool "SHA-256 digest algorithm (ARMv8 Crypto Extensions)"
|
||||
default y if SHA256
|
||||
config ARMV8_SECURE_BASE
|
||||
hex "Secure address for PSCI image"
|
||||
depends on ARMV8_PSCI
|
||||
help
|
||||
Address for placing the PSCI text, data and stack sections.
|
||||
If not defined, the PSCI sections are placed together with the u-boot
|
||||
but platform can choose to place PSCI code image separately in other
|
||||
places such as some secure RAM built-in SOC etc.
|
||||
|
||||
endif
|
||||
|
||||
|
@ -42,7 +42,6 @@ obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/
|
||||
obj-$(CONFIG_S32V234) += s32v234/
|
||||
obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
|
||||
obj-$(CONFIG_ARMV8_PSCI) += psci.o
|
||||
obj-$(CONFIG_ARCH_SUNXI) += lowlevel_init.o
|
||||
obj-$(CONFIG_TARGET_BCMNS3) += bcmns3/
|
||||
obj-$(CONFIG_XEN) += xen/
|
||||
obj-$(CONFIG_ARMV8_CE_SHA1) += sha1_ce_glue.o sha1_ce_core.o
|
||||
obj-$(CONFIG_ARMV8_CE_SHA256) += sha256_ce_glue.o sha256_ce_core.o
|
||||
|
@ -39,28 +39,8 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
* off: FFF
|
||||
*/
|
||||
|
||||
static int get_effective_el(void)
|
||||
u64 get_tcr(int el, u64 *pips, u64 *pva_bits)
|
||||
{
|
||||
int el = current_el();
|
||||
|
||||
if (el == 2) {
|
||||
u64 hcr_el2;
|
||||
|
||||
/*
|
||||
* If we are using the EL2&0 translation regime, the TCR_EL2
|
||||
* looks like the EL1 version, even though we are in EL2.
|
||||
*/
|
||||
__asm__ ("mrs %0, HCR_EL2\n" : "=r" (hcr_el2));
|
||||
if (hcr_el2 & BIT(HCR_EL2_E2H_BIT))
|
||||
return 1;
|
||||
}
|
||||
|
||||
return el;
|
||||
}
|
||||
|
||||
u64 get_tcr(u64 *pips, u64 *pva_bits)
|
||||
{
|
||||
int el = get_effective_el();
|
||||
u64 max_addr = 0;
|
||||
u64 ips, va_bits;
|
||||
u64 tcr;
|
||||
@ -135,7 +115,7 @@ static u64 *find_pte(u64 addr, int level)
|
||||
|
||||
debug("addr=%llx level=%d\n", addr, level);
|
||||
|
||||
get_tcr(NULL, &va_bits);
|
||||
get_tcr(0, NULL, &va_bits);
|
||||
if (va_bits < 39)
|
||||
start_level = 1;
|
||||
|
||||
@ -363,7 +343,7 @@ __weak u64 get_page_table_size(void)
|
||||
u64 va_bits;
|
||||
int start_level = 0;
|
||||
|
||||
get_tcr(NULL, &va_bits);
|
||||
get_tcr(0, NULL, &va_bits);
|
||||
if (va_bits < 39)
|
||||
start_level = 1;
|
||||
|
||||
@ -435,7 +415,7 @@ __weak void mmu_setup(void)
|
||||
setup_all_pgtables();
|
||||
|
||||
el = current_el();
|
||||
set_ttbr_tcr_mair(el, gd->arch.tlb_addr, get_tcr(NULL, NULL),
|
||||
set_ttbr_tcr_mair(el, gd->arch.tlb_addr, get_tcr(el, NULL, NULL),
|
||||
MEMORY_ATTRIBUTES);
|
||||
|
||||
/* enable the mmu */
|
||||
@ -503,10 +483,6 @@ void dcache_enable(void)
|
||||
mmu_setup();
|
||||
}
|
||||
|
||||
/* Set up page tables only once (it is done also by mmu_setup()) */
|
||||
if (!gd->arch.tlb_fillptr)
|
||||
setup_all_pgtables();
|
||||
|
||||
set_sctlr(get_sctlr() | CR_C);
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
# (C) Copyright 2002
|
||||
# Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
|
||||
PLATFORM_RELFLAGS += -fno-common -ffixed-x18
|
||||
PLATFORM_RELFLAGS += $(call cc-option,-mbranch-protection=none)
|
||||
|
||||
PF_NO_UNALIGNED := $(call cc-option, -mstrict-align)
|
||||
PLATFORM_CPPFLAGS += $(PF_NO_UNALIGNED)
|
||||
|
@ -8,9 +8,9 @@
|
||||
#include <asm/psci.h>
|
||||
#include <asm/system.h>
|
||||
#include <asm/armv8/sec_firmware.h>
|
||||
#include <linux/libfdt.h>
|
||||
|
||||
__weak int psci_update_dt(void *fdt)
|
||||
#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
|
||||
int psci_update_dt(void *fdt)
|
||||
{
|
||||
/*
|
||||
* If the PSCI in SEC Firmware didn't work, avoid to update the
|
||||
@ -18,10 +18,8 @@ __weak int psci_update_dt(void *fdt)
|
||||
* number to support detecting PSCI dynamically and then switching
|
||||
* the SMP boot method between PSCI and spin-table.
|
||||
*/
|
||||
if (CONFIG_IS_ENABLED(SEC_FIRMWARE_ARMV8_PSCI) &&
|
||||
sec_firmware_support_psci_version() == PSCI_INVALID_VER)
|
||||
if (sec_firmware_support_psci_version() == PSCI_INVALID_VER)
|
||||
return 0;
|
||||
|
||||
fdt_psci(fdt);
|
||||
|
||||
#if defined(CONFIG_ARMV8_PSCI) && !defined(CONFIG_ARMV8_SECURE_BASE)
|
||||
@ -32,3 +30,4 @@ __weak int psci_update_dt(void *fdt)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -79,9 +79,6 @@ static void relocate_secure_section(void)
|
||||
|
||||
void armv8_setup_psci(void)
|
||||
{
|
||||
if (current_el() != 3)
|
||||
return;
|
||||
|
||||
relocate_secure_section();
|
||||
secure_ram_addr(psci_setup_vectors)();
|
||||
secure_ram_addr(psci_arch_init)();
|
||||
|
@ -77,18 +77,14 @@ _save_el_regs:
|
||||
switch_el x11, 3f, 2f, 1f
|
||||
3: mrs x1, esr_el3
|
||||
mrs x2, elr_el3
|
||||
mrs x3, spsr_el3
|
||||
b 0f
|
||||
2: mrs x1, esr_el2
|
||||
mrs x2, elr_el2
|
||||
mrs x3, spsr_el2
|
||||
b 0f
|
||||
1: mrs x1, esr_el1
|
||||
mrs x2, elr_el1
|
||||
mrs x3, spsr_el1
|
||||
0:
|
||||
stp x1, x0, [sp, #-16]!
|
||||
stp x3, x2, [sp, #-16]!
|
||||
stp x2, x0, [sp, #-16]!
|
||||
mov x0, sp
|
||||
ret
|
||||
|
||||
@ -102,7 +98,7 @@ _save_el_regs:
|
||||
* This is the first part of the shared routine called into from all entries.
|
||||
*/
|
||||
exception_exit:
|
||||
ldp xzr, x2, [sp],#16
|
||||
ldp x2, x0, [sp],#16
|
||||
switch_el x11, 3f, 2f, 1f
|
||||
3: msr elr_el3, x2
|
||||
b _restore_regs
|
||||
@ -122,7 +118,6 @@ exception_exit:
|
||||
* This is the second part of the shared routine called into from all entries.
|
||||
*/
|
||||
_restore_regs:
|
||||
ldp xzr, x0, [sp],#16
|
||||
ldp x1, x2, [sp],#16
|
||||
ldp x3, x4, [sp],#16
|
||||
ldp x5, x6, [sp],#16
|
||||
|
@ -21,15 +21,12 @@ config ARCH_LS1012A
|
||||
select SYS_I2C_MXC_I2C1 if !DM_I2C
|
||||
select SYS_I2C_MXC_I2C2 if !DM_I2C
|
||||
imply PANIC_HANG
|
||||
imply TIMESTAMP
|
||||
|
||||
config ARCH_LS1028A
|
||||
bool
|
||||
select ARMV8_SET_SMPEN
|
||||
select ESBC_HDR_LS if CHAIN_OF_TRUST
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH3
|
||||
select FSL_TZASC_400
|
||||
select GICV3
|
||||
select NXP_LSCH3_2
|
||||
select SYS_FSL_HAS_CCI400
|
||||
@ -44,7 +41,6 @@ config ARCH_LS1028A
|
||||
select SYS_FSL_SEC_COMPAT_5
|
||||
select SYS_FSL_SEC_LE
|
||||
select FSL_TZASC_1
|
||||
select FSL_TZPC_BP147
|
||||
select ARCH_EARLY_INIT_R
|
||||
select BOARD_EARLY_INIT_F
|
||||
select SYS_I2C_MXC
|
||||
@ -57,20 +53,17 @@ config ARCH_LS1028A
|
||||
select SYS_FSL_ERRATUM_A011334
|
||||
select SYS_FSL_ESDHC_UNRELIABLE_PULSE_DETECTION_WORKAROUND
|
||||
select RESV_RAM if GIC_V3_ITS
|
||||
select SYS_HAS_ARMV8_SECURE_BASE
|
||||
imply PANIC_HANG
|
||||
|
||||
config ARCH_LS1043A
|
||||
bool
|
||||
select ARMV8_SET_SMPEN
|
||||
select ARM_ERRATA_855873 if !TFABOOT
|
||||
select FSL_IFC if TFABOOT || (!QSPI_BOOT && !SD_BOOT_QSPI && !SD_BOOT)
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH2
|
||||
select GICV2
|
||||
select HAS_FSL_XHCI_USB if USB_HOST
|
||||
select SKIP_LOWLEVEL_INIT
|
||||
select SYS_DPAA_FMAN
|
||||
select SYS_FSL_SRDS_1
|
||||
select SYS_HAS_SERDES
|
||||
select SYS_FSL_DDR
|
||||
@ -78,6 +71,7 @@ config ARCH_LS1043A
|
||||
select SYS_FSL_DDR_VER_50
|
||||
select SYS_FSL_ERRATUM_A008850 if !TFABOOT
|
||||
select SYS_FSL_ERRATUM_A008997
|
||||
select SYS_FSL_ERRATUM_A009007
|
||||
select SYS_FSL_ERRATUM_A009008
|
||||
select SYS_FSL_ERRATUM_A009660 if !TFABOOT
|
||||
select SYS_FSL_ERRATUM_A009663 if !TFABOOT
|
||||
@ -87,7 +81,6 @@ config ARCH_LS1043A
|
||||
select SYS_FSL_ERRATUM_A010539
|
||||
select SYS_FSL_HAS_DDR3
|
||||
select SYS_FSL_HAS_DDR4
|
||||
select SYS_FSL_QMAN_V3 if SYS_DPAA_QBMAN
|
||||
select ARCH_EARLY_INIT_R
|
||||
select BOARD_EARLY_INIT_F
|
||||
select SYS_I2C_MXC
|
||||
@ -95,20 +88,17 @@ config ARCH_LS1043A
|
||||
select SYS_I2C_MXC_I2C2 if !DM_I2C
|
||||
select SYS_I2C_MXC_I2C3 if !DM_I2C
|
||||
select SYS_I2C_MXC_I2C4 if !DM_I2C
|
||||
select SYS_HAS_ARMV8_SECURE_BASE
|
||||
imply CMD_PCI
|
||||
imply ID_EEPROM
|
||||
|
||||
config ARCH_LS1046A
|
||||
bool
|
||||
select ARMV8_SET_SMPEN
|
||||
select FSL_IFC if TFABOOT || (!QSPI_BOOT && !SD_BOOT_QSPI && !SD_BOOT)
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH2
|
||||
select GICV2
|
||||
select HAS_FSL_XHCI_USB if USB_HOST
|
||||
select SKIP_LOWLEVEL_INIT
|
||||
select SYS_DPAA_FMAN
|
||||
select SYS_FSL_SRDS_1
|
||||
select SYS_HAS_SERDES
|
||||
select SYS_FSL_DDR
|
||||
@ -118,6 +108,7 @@ config ARCH_LS1046A
|
||||
select SYS_FSL_ERRATUM_A008511 if !TFABOOT
|
||||
select SYS_FSL_ERRATUM_A008850 if !TFABOOT
|
||||
select SYS_FSL_ERRATUM_A008997
|
||||
select SYS_FSL_ERRATUM_A009007
|
||||
select SYS_FSL_ERRATUM_A009008
|
||||
select SYS_FSL_ERRATUM_A009798
|
||||
select SYS_FSL_ERRATUM_A009801
|
||||
@ -127,7 +118,6 @@ config ARCH_LS1046A
|
||||
select SYS_FSL_ERRATUM_A010539
|
||||
select SYS_FSL_HAS_DDR4
|
||||
select SYS_FSL_SRDS_2
|
||||
select SYS_FSL_QMAN_V3 if SYS_DPAA_QBMAN
|
||||
select ARCH_EARLY_INIT_R
|
||||
select BOARD_EARLY_INIT_F
|
||||
select SYS_I2C_MXC
|
||||
@ -144,8 +134,6 @@ config ARCH_LS1088A
|
||||
bool
|
||||
select ARMV8_SET_SMPEN
|
||||
select ARM_ERRATA_855873 if !TFABOOT
|
||||
select ESBC_HDR_LS if CHAIN_OF_TRUST
|
||||
select FSL_IFC
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH3
|
||||
select GICV3
|
||||
@ -194,11 +182,8 @@ config ARCH_LS2080A
|
||||
select ARM_ERRATA_828024
|
||||
select ARM_ERRATA_829520
|
||||
select ARM_ERRATA_833471
|
||||
select ESBC_HDR_LS if CHAIN_OF_TRUST
|
||||
select FSL_IFC
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH3
|
||||
select SYS_FSL_OTHER_DDR_NUM_CTRLS
|
||||
select GICV3
|
||||
select SKIP_LOWLEVEL_INIT
|
||||
select SYS_FSL_SRDS_1
|
||||
@ -248,12 +233,8 @@ config ARCH_LS2080A
|
||||
config ARCH_LX2162A
|
||||
bool
|
||||
select ARMV8_SET_SMPEN
|
||||
select ESBC_HDR_LS if CHAIN_OF_TRUST
|
||||
select FSL_DDR_BIST
|
||||
select FSL_DDR_INTERACTIVE
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH3
|
||||
select FSL_TZPC_BP147
|
||||
select GICV3
|
||||
select NXP_LSCH3_2
|
||||
select SYS_HAS_SERDES
|
||||
@ -273,7 +254,6 @@ config ARCH_LX2162A
|
||||
select SYS_FSL_HAS_DDR4
|
||||
select SYS_FSL_SEC_COMPAT_5
|
||||
select SYS_FSL_SEC_LE
|
||||
select SYS_PCI_64BIT if PCI
|
||||
select ARCH_EARLY_INIT_R
|
||||
select BOARD_EARLY_INIT_F
|
||||
select SYS_I2C_MXC
|
||||
@ -287,12 +267,8 @@ config ARCH_LX2162A
|
||||
config ARCH_LX2160A
|
||||
bool
|
||||
select ARMV8_SET_SMPEN
|
||||
select ESBC_HDR_LS if CHAIN_OF_TRUST
|
||||
select FSL_DDR_BIST
|
||||
select FSL_DDR_INTERACTIVE
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH3
|
||||
select FSL_TZPC_BP147
|
||||
select GICV3
|
||||
select HAS_FSL_XHCI_USB if USB_HOST
|
||||
select NXP_LSCH3_2
|
||||
@ -314,7 +290,6 @@ config ARCH_LX2160A
|
||||
select SYS_FSL_HAS_DDR4
|
||||
select SYS_FSL_SEC_COMPAT_5
|
||||
select SYS_FSL_SEC_LE
|
||||
select SYS_PCI_64BIT if PCI
|
||||
select ARCH_EARLY_INIT_R
|
||||
select BOARD_EARLY_INIT_F
|
||||
select SYS_I2C_MXC
|
||||
@ -329,11 +304,6 @@ config ARCH_LX2160A
|
||||
config FSL_LSCH2
|
||||
bool
|
||||
select SKIP_LOWLEVEL_INIT
|
||||
select SYS_FSL_CCSR_GUR_BE
|
||||
select SYS_FSL_CCSR_SCFG_BE
|
||||
select SYS_FSL_ESDHC_BE
|
||||
select SYS_FSL_IFC_BE
|
||||
select SYS_FSL_PEX_LUT_BE
|
||||
select SYS_FSL_HAS_CCI400
|
||||
select SYS_FSL_HAS_SEC
|
||||
select SYS_FSL_SEC_COMPAT_5
|
||||
@ -341,46 +311,16 @@ config FSL_LSCH2
|
||||
|
||||
config FSL_LSCH3
|
||||
select ARCH_MISC_INIT
|
||||
select SYS_FSL_CCSR_GUR_LE
|
||||
select SYS_FSL_CCSR_SCFG_LE
|
||||
select SYS_FSL_ESDHC_LE
|
||||
select SYS_FSL_IFC_LE
|
||||
select SYS_FSL_PEX_LUT_LE
|
||||
bool
|
||||
|
||||
config NXP_LSCH3_2
|
||||
bool
|
||||
|
||||
config SYS_FSL_CCSR_GUR_BE
|
||||
bool
|
||||
|
||||
config SYS_FSL_CCSR_SCFG_BE
|
||||
bool
|
||||
|
||||
config SYS_FSL_PEX_LUT_BE
|
||||
bool
|
||||
|
||||
config SYS_FSL_CCSR_GUR_LE
|
||||
bool
|
||||
|
||||
config SYS_FSL_CCSR_SCFG_LE
|
||||
bool
|
||||
|
||||
config SYS_FSL_ESDHC_LE
|
||||
bool
|
||||
|
||||
config SYS_FSL_IFC_LE
|
||||
bool
|
||||
|
||||
config SYS_FSL_PEX_LUT_LE
|
||||
bool
|
||||
|
||||
menu "Layerscape architecture"
|
||||
depends on FSL_LSCH2 || FSL_LSCH3
|
||||
|
||||
config FSL_LAYERSCAPE
|
||||
bool
|
||||
select ARM_SMCCC
|
||||
|
||||
config HAS_FEATURE_GIC64K_ALIGN
|
||||
bool
|
||||
@ -501,6 +441,11 @@ config EMC2305
|
||||
Enable the EMC2305 fan controller for configuration of fan
|
||||
speed.
|
||||
|
||||
config NXP_ESBC
|
||||
bool "NXP_ESBC"
|
||||
help
|
||||
Enable Freescale Secure Boot feature
|
||||
|
||||
config QSPI_AHB_INIT
|
||||
bool "Init the QSPI AHB bus"
|
||||
help
|
||||
@ -543,36 +488,6 @@ config SYS_FSL_HAS_CCN508
|
||||
|
||||
config SYS_FSL_HAS_DP_DDR
|
||||
bool
|
||||
help
|
||||
Defines the SoC has DP-DDR used for DPAA.
|
||||
|
||||
config DP_DDR_CTRL
|
||||
int
|
||||
depends on SYS_FSL_HAS_DP_DDR
|
||||
default 2 if ARCH_LS2080A
|
||||
|
||||
config DP_DDR_DIMM_SLOTS_PER_CTLR
|
||||
int
|
||||
depends on SYS_FSL_HAS_DP_DDR
|
||||
default 1 if ARCH_LS2080A
|
||||
|
||||
config DP_DDR_NUM_CTRLS
|
||||
int
|
||||
depends on SYS_FSL_HAS_DP_DDR
|
||||
default 1 if ARCH_LS2080A
|
||||
|
||||
config SYS_DP_DDR_BASE
|
||||
hex
|
||||
depends on SYS_FSL_HAS_DP_DDR
|
||||
default 0x6000000000 if ARCH_LS2080A
|
||||
|
||||
config SYS_DP_DDR_BASE_PHY
|
||||
int
|
||||
depends on SYS_FSL_HAS_DP_DDR
|
||||
default 0 if ARCH_LS2080A
|
||||
help
|
||||
DDR controller uses this value as the base address for binding.
|
||||
It is mapped to CONFIG_SYS_DP_DDR_BASE for core to access.
|
||||
|
||||
config SYS_FSL_SRDS_1
|
||||
bool
|
||||
@ -602,6 +517,10 @@ endmenu
|
||||
menu "Layerscape clock tree configuration"
|
||||
depends on FSL_LSCH2 || FSL_LSCH3
|
||||
|
||||
config SYS_FSL_CLK
|
||||
bool "Enable clock tree initialization"
|
||||
default y
|
||||
|
||||
config CLUSTER_CLK_FREQ
|
||||
int "Reference clock of core cluster"
|
||||
depends on ARCH_LS1012A
|
||||
@ -746,6 +665,9 @@ config SYS_FSL_HAS_RGMII
|
||||
bool
|
||||
depends on SYS_FSL_EC1 || SYS_FSL_EC2
|
||||
|
||||
config SPL_LDSCRIPT
|
||||
default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARCH_LS1043A || ARCH_LS1046A || ARCH_LS2080A
|
||||
|
||||
config HAS_FSL_XHCI_USB
|
||||
bool
|
||||
help
|
||||
|
@ -1,13 +1,13 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright 2017-2021 NXP
|
||||
* Copyright 2017-2020 NXP
|
||||
* Copyright 2014-2015 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <clock_legacy.h>
|
||||
#include <cpu_func.h>
|
||||
#include <env.h>
|
||||
#include <fsl_ddr_sdram.h>
|
||||
#include <init.h>
|
||||
#include <hang.h>
|
||||
#include <log.h>
|
||||
@ -17,7 +17,6 @@
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
#include <linux/errno.h>
|
||||
#include <asm/system.h>
|
||||
#include <fm_eth.h>
|
||||
@ -36,7 +35,6 @@
|
||||
#endif
|
||||
#include <asm/armv8/sec_firmware.h>
|
||||
#ifdef CONFIG_SYS_FSL_DDR
|
||||
#include <fsl_ddr_sdram.h>
|
||||
#include <fsl_ddr.h>
|
||||
#endif
|
||||
#include <asm/arch/clock.h>
|
||||
@ -50,7 +48,6 @@
|
||||
#endif
|
||||
#endif
|
||||
#include <linux/mii.h>
|
||||
#include <dm.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@ -96,11 +93,11 @@ static struct mm_region early_map[] = {
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
{ CFG_SYS_FSL_OCRAM_BASE, CFG_SYS_FSL_OCRAM_BASE,
|
||||
{ CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE,
|
||||
SYS_FSL_OCRAM_SPACE_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE
|
||||
},
|
||||
{ CFG_SYS_FSL_QSPI_BASE1, CFG_SYS_FSL_QSPI_BASE1,
|
||||
{ CONFIG_SYS_FSL_QSPI_BASE1, CONFIG_SYS_FSL_QSPI_BASE1,
|
||||
CONFIG_SYS_FSL_QSPI_SIZE1,
|
||||
PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE},
|
||||
#ifdef CONFIG_FSL_IFC
|
||||
@ -114,7 +111,7 @@ static struct mm_region early_map[] = {
|
||||
CONFIG_SYS_FSL_IFC_SIZE1 - CONFIG_SYS_FSL_IFC_SIZE1_1,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE
|
||||
},
|
||||
{ CFG_SYS_FLASH_BASE, CONFIG_SYS_FSL_IFC_BASE1,
|
||||
{ CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FSL_IFC_BASE1,
|
||||
CONFIG_SYS_FSL_IFC_SIZE1,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE
|
||||
},
|
||||
@ -130,9 +127,9 @@ static struct mm_region early_map[] = {
|
||||
PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS
|
||||
},
|
||||
#ifdef CONFIG_FSL_IFC
|
||||
/* Map IFC region #2 up to CFG_SYS_FLASH_BASE for NAND boot */
|
||||
/* Map IFC region #2 up to CONFIG_SYS_FLASH_BASE for NAND boot */
|
||||
{ CONFIG_SYS_FSL_IFC_BASE2, CONFIG_SYS_FSL_IFC_BASE2,
|
||||
CFG_SYS_FLASH_BASE - CONFIG_SYS_FSL_IFC_BASE2,
|
||||
CONFIG_SYS_FLASH_BASE - CONFIG_SYS_FSL_IFC_BASE2,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE
|
||||
},
|
||||
#endif
|
||||
@ -159,7 +156,7 @@ static struct mm_region early_map[] = {
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
{ CFG_SYS_FSL_OCRAM_BASE, CFG_SYS_FSL_OCRAM_BASE,
|
||||
{ CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE,
|
||||
SYS_FSL_OCRAM_SPACE_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE
|
||||
},
|
||||
@ -168,7 +165,7 @@ static struct mm_region early_map[] = {
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
{ CFG_SYS_FSL_QSPI_BASE, CFG_SYS_FSL_QSPI_BASE,
|
||||
{ CONFIG_SYS_FSL_QSPI_BASE, CONFIG_SYS_FSL_QSPI_BASE,
|
||||
CONFIG_SYS_FSL_QSPI_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE
|
||||
},
|
||||
@ -204,7 +201,7 @@ static struct mm_region final_map[] = {
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
{ CFG_SYS_FSL_OCRAM_BASE, CFG_SYS_FSL_OCRAM_BASE,
|
||||
{ CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE,
|
||||
SYS_FSL_OCRAM_SPACE_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE
|
||||
},
|
||||
@ -213,12 +210,12 @@ static struct mm_region final_map[] = {
|
||||
PTE_BLOCK_MEMTYPE(MT_NORMAL) |
|
||||
PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS
|
||||
},
|
||||
{ CFG_SYS_FSL_QSPI_BASE1, CFG_SYS_FSL_QSPI_BASE1,
|
||||
{ CONFIG_SYS_FSL_QSPI_BASE1, CONFIG_SYS_FSL_QSPI_BASE1,
|
||||
CONFIG_SYS_FSL_QSPI_SIZE1,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
{ CFG_SYS_FSL_QSPI_BASE2, CFG_SYS_FSL_QSPI_BASE2,
|
||||
{ CONFIG_SYS_FSL_QSPI_BASE2, CONFIG_SYS_FSL_QSPI_BASE2,
|
||||
CONFIG_SYS_FSL_QSPI_SIZE2,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
@ -257,26 +254,26 @@ static struct mm_region final_map[] = {
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
{ CFG_SYS_PCIE1_PHYS_ADDR, CFG_SYS_PCIE1_PHYS_ADDR,
|
||||
CFG_SYS_PCIE1_PHYS_SIZE,
|
||||
{ CONFIG_SYS_PCIE1_PHYS_ADDR, CONFIG_SYS_PCIE1_PHYS_ADDR,
|
||||
CONFIG_SYS_PCIE1_PHYS_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
{ CFG_SYS_PCIE2_PHYS_ADDR, CFG_SYS_PCIE2_PHYS_ADDR,
|
||||
CFG_SYS_PCIE2_PHYS_SIZE,
|
||||
{ CONFIG_SYS_PCIE2_PHYS_ADDR, CONFIG_SYS_PCIE2_PHYS_ADDR,
|
||||
CONFIG_SYS_PCIE2_PHYS_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
#ifdef CFG_SYS_PCIE3_PHYS_ADDR
|
||||
{ CFG_SYS_PCIE3_PHYS_ADDR, CFG_SYS_PCIE3_PHYS_ADDR,
|
||||
CFG_SYS_PCIE3_PHYS_SIZE,
|
||||
#ifdef CONFIG_SYS_PCIE3_PHYS_ADDR
|
||||
{ CONFIG_SYS_PCIE3_PHYS_ADDR, CONFIG_SYS_PCIE3_PHYS_ADDR,
|
||||
CONFIG_SYS_PCIE3_PHYS_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
#endif
|
||||
#ifdef CFG_SYS_PCIE4_PHYS_ADDR
|
||||
{ CFG_SYS_PCIE4_PHYS_ADDR, CFG_SYS_PCIE4_PHYS_ADDR,
|
||||
CFG_SYS_PCIE4_PHYS_SIZE,
|
||||
#ifdef CONFIG_SYS_PCIE4_PHYS_ADDR
|
||||
{ CONFIG_SYS_PCIE4_PHYS_ADDR, CONFIG_SYS_PCIE4_PHYS_ADDR,
|
||||
CONFIG_SYS_PCIE4_PHYS_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
@ -333,7 +330,7 @@ static struct mm_region final_map[] = {
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
{ CFG_SYS_FSL_OCRAM_BASE, CFG_SYS_FSL_OCRAM_BASE,
|
||||
{ CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE,
|
||||
SYS_FSL_OCRAM_SPACE_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE
|
||||
},
|
||||
@ -342,7 +339,7 @@ static struct mm_region final_map[] = {
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
{ CFG_SYS_FSL_QSPI_BASE, CFG_SYS_FSL_QSPI_BASE,
|
||||
{ CONFIG_SYS_FSL_QSPI_BASE, CONFIG_SYS_FSL_QSPI_BASE,
|
||||
CONFIG_SYS_FSL_QSPI_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
@ -368,19 +365,19 @@ static struct mm_region final_map[] = {
|
||||
PTE_BLOCK_MEMTYPE(MT_NORMAL) |
|
||||
PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS
|
||||
},
|
||||
{ CFG_SYS_PCIE1_PHYS_ADDR, CFG_SYS_PCIE1_PHYS_ADDR,
|
||||
CFG_SYS_PCIE1_PHYS_SIZE,
|
||||
{ CONFIG_SYS_PCIE1_PHYS_ADDR, CONFIG_SYS_PCIE1_PHYS_ADDR,
|
||||
CONFIG_SYS_PCIE1_PHYS_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
{ CFG_SYS_PCIE2_PHYS_ADDR, CFG_SYS_PCIE2_PHYS_ADDR,
|
||||
CFG_SYS_PCIE2_PHYS_SIZE,
|
||||
{ CONFIG_SYS_PCIE2_PHYS_ADDR, CONFIG_SYS_PCIE2_PHYS_ADDR,
|
||||
CONFIG_SYS_PCIE2_PHYS_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
#ifdef CFG_SYS_PCIE3_PHYS_ADDR
|
||||
{ CFG_SYS_PCIE3_PHYS_ADDR, CFG_SYS_PCIE3_PHYS_ADDR,
|
||||
CFG_SYS_PCIE3_PHYS_SIZE,
|
||||
#ifdef CONFIG_SYS_PCIE3_PHYS_ADDR
|
||||
{ CONFIG_SYS_PCIE3_PHYS_ADDR, CONFIG_SYS_PCIE3_PHYS_ADDR,
|
||||
CONFIG_SYS_PCIE3_PHYS_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
},
|
||||
@ -391,7 +388,7 @@ static struct mm_region final_map[] = {
|
||||
PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS
|
||||
},
|
||||
#endif
|
||||
#ifdef CFG_SYS_MEM_RESERVE_SECURE
|
||||
#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
|
||||
{}, /* space holder for secure mem */
|
||||
#endif
|
||||
{},
|
||||
@ -401,7 +398,7 @@ struct mm_region *mem_map = early_map;
|
||||
|
||||
void cpu_name(char *name)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
unsigned int i, svr, ver;
|
||||
|
||||
svr = gur_in32(&gur->svr);
|
||||
@ -430,7 +427,7 @@ void cpu_name(char *name)
|
||||
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
|
||||
/*
|
||||
* To start MMU before DDR is available, we create MMU table in SRAM.
|
||||
* The base address of SRAM is CFG_SYS_FSL_OCRAM_BASE. We use three
|
||||
* The base address of SRAM is CONFIG_SYS_FSL_OCRAM_BASE. We use three
|
||||
* levels of translation tables here to cover 40-bit address space.
|
||||
* We use 4KB granule size, with 40 bits physical address, T0SZ=24
|
||||
* Address above EARLY_PGTABLE_SIZE (0x5000) is free for other purpose.
|
||||
@ -443,9 +440,9 @@ static inline void early_mmu_setup(void)
|
||||
|
||||
/* global data is already setup, no allocation yet */
|
||||
if (el == 3)
|
||||
gd->arch.tlb_addr = CFG_SYS_FSL_OCRAM_BASE;
|
||||
gd->arch.tlb_addr = CONFIG_SYS_FSL_OCRAM_BASE;
|
||||
else
|
||||
gd->arch.tlb_addr = CFG_SYS_DDR_SDRAM_BASE;
|
||||
gd->arch.tlb_addr = CONFIG_SYS_DDR_SDRAM_BASE;
|
||||
gd->arch.tlb_fillptr = gd->arch.tlb_addr;
|
||||
gd->arch.tlb_size = EARLY_PGTABLE_SIZE;
|
||||
|
||||
@ -454,7 +451,7 @@ static inline void early_mmu_setup(void)
|
||||
|
||||
/* point TTBR to the new table */
|
||||
set_ttbr_tcr_mair(el, gd->arch.tlb_addr,
|
||||
get_tcr(NULL, NULL) &
|
||||
get_tcr(el, NULL, NULL) &
|
||||
~(TCR_ORGN_MASK | TCR_IRGN_MASK),
|
||||
MEMORY_ATTRIBUTES);
|
||||
|
||||
@ -466,7 +463,7 @@ static void fix_pcie_mmu_map(void)
|
||||
#ifdef CONFIG_ARCH_LS2080A
|
||||
unsigned int i;
|
||||
u32 svr, ver;
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
|
||||
svr = gur_in32(&gur->svr);
|
||||
ver = SVR_SOC_VER(svr);
|
||||
@ -477,25 +474,25 @@ static void fix_pcie_mmu_map(void)
|
||||
(ver == SVR_LS2081A) || (ver == SVR_LS2041A)) {
|
||||
for (i = 0; i < ARRAY_SIZE(final_map); i++) {
|
||||
switch (final_map[i].phys) {
|
||||
case CFG_SYS_PCIE1_PHYS_ADDR:
|
||||
case CONFIG_SYS_PCIE1_PHYS_ADDR:
|
||||
final_map[i].phys = 0x2000000000ULL;
|
||||
final_map[i].virt = 0x2000000000ULL;
|
||||
final_map[i].size = 0x800000000ULL;
|
||||
break;
|
||||
case CFG_SYS_PCIE2_PHYS_ADDR:
|
||||
case CONFIG_SYS_PCIE2_PHYS_ADDR:
|
||||
final_map[i].phys = 0x2800000000ULL;
|
||||
final_map[i].virt = 0x2800000000ULL;
|
||||
final_map[i].size = 0x800000000ULL;
|
||||
break;
|
||||
#ifdef CFG_SYS_PCIE3_PHYS_ADDR
|
||||
case CFG_SYS_PCIE3_PHYS_ADDR:
|
||||
#ifdef CONFIG_SYS_PCIE3_PHYS_ADDR
|
||||
case CONFIG_SYS_PCIE3_PHYS_ADDR:
|
||||
final_map[i].phys = 0x3000000000ULL;
|
||||
final_map[i].virt = 0x3000000000ULL;
|
||||
final_map[i].size = 0x800000000ULL;
|
||||
break;
|
||||
#endif
|
||||
#ifdef CFG_SYS_PCIE4_PHYS_ADDR
|
||||
case CFG_SYS_PCIE4_PHYS_ADDR:
|
||||
#ifdef CONFIG_SYS_PCIE4_PHYS_ADDR
|
||||
case CONFIG_SYS_PCIE4_PHYS_ADDR:
|
||||
final_map[i].phys = 0x3800000000ULL;
|
||||
final_map[i].virt = 0x3800000000ULL;
|
||||
final_map[i].size = 0x800000000ULL;
|
||||
@ -568,7 +565,7 @@ static inline void final_mmu_setup(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CFG_SYS_MEM_RESERVE_SECURE
|
||||
#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
|
||||
if (gd->arch.secure_ram & MEM_RESERVE_SECURE_MAINTAINED) {
|
||||
if (el == 3) {
|
||||
/*
|
||||
@ -580,7 +577,7 @@ static inline void final_mmu_setup(void)
|
||||
gd->arch.tlb_addr = gd->arch.secure_ram & ~0xfff;
|
||||
final_map[index].virt = gd->arch.secure_ram & ~0x3;
|
||||
final_map[index].phys = final_map[index].virt;
|
||||
final_map[index].size = CFG_SYS_MEM_RESERVE_SECURE;
|
||||
final_map[index].size = CONFIG_SYS_MEM_RESERVE_SECURE;
|
||||
final_map[index].attrs = PTE_BLOCK_OUTER_SHARE;
|
||||
gd->arch.secure_ram |= MEM_RESERVE_SECURE_SECURED;
|
||||
tlb_addr_save = gd->arch.tlb_addr;
|
||||
@ -609,7 +606,7 @@ static inline void final_mmu_setup(void)
|
||||
invalidate_icache_all();
|
||||
|
||||
/* point TTBR to the new table */
|
||||
set_ttbr_tcr_mair(el, gd->arch.tlb_addr, get_tcr(NULL, NULL),
|
||||
set_ttbr_tcr_mair(el, gd->arch.tlb_addr, get_tcr(el, NULL, NULL),
|
||||
MEMORY_ATTRIBUTES);
|
||||
|
||||
set_sctlr(get_sctlr() | CR_M);
|
||||
@ -769,19 +766,21 @@ enum boot_src __get_boot_src(u32 porsr1)
|
||||
|
||||
enum boot_src get_boot_src(void)
|
||||
{
|
||||
struct arm_smccc_res res;
|
||||
struct pt_regs regs;
|
||||
u32 porsr1 = 0;
|
||||
|
||||
#if defined(CONFIG_FSL_LSCH3)
|
||||
u32 __iomem *dcfg_ccsr = (u32 __iomem *)DCFG_BASE;
|
||||
#elif defined(CONFIG_FSL_LSCH2)
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
#endif
|
||||
|
||||
if (current_el() == 2) {
|
||||
arm_smccc_smc(SIP_SVC_RCW, 0, 0, 0, 0, 0, 0, 0, &res);
|
||||
if (!res.a0)
|
||||
porsr1 = res.a1;
|
||||
regs.regs[0] = SIP_SVC_RCW;
|
||||
|
||||
smc_call(®s);
|
||||
if (!regs.regs[0])
|
||||
porsr1 = regs.regs[1];
|
||||
}
|
||||
|
||||
if (current_el() == 3 || !porsr1) {
|
||||
@ -818,7 +817,7 @@ int mmc_get_env_dev(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
enum env_location arch_env_get_location(enum env_operation op, int prio)
|
||||
enum env_location env_get_location(enum env_operation op, int prio)
|
||||
{
|
||||
enum boot_src src = get_boot_src();
|
||||
enum env_location env_loc = ENVL_NOWHERE;
|
||||
@ -863,7 +862,7 @@ enum env_location arch_env_get_location(enum env_operation op, int prio)
|
||||
|
||||
u32 initiator_type(u32 cluster, int init_id)
|
||||
{
|
||||
struct ccsr_gur *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
u32 idx = (cluster >> (init_id * 8)) & TP_CLUSTER_INIT_MASK;
|
||||
u32 type = 0;
|
||||
|
||||
@ -876,7 +875,7 @@ u32 initiator_type(u32 cluster, int init_id)
|
||||
|
||||
u32 cpu_pos_mask(void)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
int i = 0;
|
||||
u32 cluster, type, mask = 0;
|
||||
|
||||
@ -897,7 +896,7 @@ u32 cpu_pos_mask(void)
|
||||
|
||||
u32 cpu_mask(void)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
int i = 0, count = 0;
|
||||
u32 cluster, type, mask = 0;
|
||||
|
||||
@ -930,7 +929,7 @@ int cpu_numcores(void)
|
||||
int fsl_qoriq_core_to_cluster(unsigned int core)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur =
|
||||
(void __iomem *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
(void __iomem *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
int i = 0, count = 0;
|
||||
u32 cluster;
|
||||
|
||||
@ -954,7 +953,7 @@ int fsl_qoriq_core_to_cluster(unsigned int core)
|
||||
u32 fsl_qoriq_core_to_type(unsigned int core)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur =
|
||||
(void __iomem *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
(void __iomem *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
int i = 0, count = 0;
|
||||
u32 cluster, type;
|
||||
|
||||
@ -979,7 +978,7 @@ u32 fsl_qoriq_core_to_type(unsigned int core)
|
||||
#ifndef CONFIG_FSL_LSCH3
|
||||
uint get_svr(void)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
|
||||
return gur_in32(&gur->svr);
|
||||
}
|
||||
@ -988,7 +987,7 @@ uint get_svr(void)
|
||||
#ifdef CONFIG_DISPLAY_CPUINFO
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
struct sys_info sysinfo;
|
||||
char buf[32];
|
||||
unsigned int i, core;
|
||||
@ -1057,6 +1056,9 @@ int cpu_eth_init(struct bd_info *bis)
|
||||
|
||||
#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
|
||||
error = fsl_mc_ldpaa_init(bis);
|
||||
#endif
|
||||
#ifdef CONFIG_FMAN_ENET
|
||||
fm_standard_init(bis);
|
||||
#endif
|
||||
return error;
|
||||
}
|
||||
@ -1077,9 +1079,9 @@ static void config_core_prefetch(void)
|
||||
char *buf = NULL;
|
||||
char buffer[HWCONFIG_BUFFER_SIZE];
|
||||
const char *prefetch_arg = NULL;
|
||||
struct arm_smccc_res res;
|
||||
size_t arglen;
|
||||
unsigned int mask;
|
||||
struct pt_regs regs;
|
||||
|
||||
if (env_get_f("hwconfig", buffer, sizeof(buffer)) > 0)
|
||||
buf = buffer;
|
||||
@ -1097,10 +1099,11 @@ static void config_core_prefetch(void)
|
||||
}
|
||||
|
||||
#define SIP_PREFETCH_DISABLE_64 0xC200FF13
|
||||
arm_smccc_smc(SIP_PREFETCH_DISABLE_64, mask, 0, 0, 0, 0, 0, 0,
|
||||
&res);
|
||||
regs.regs[0] = SIP_PREFETCH_DISABLE_64;
|
||||
regs.regs[1] = mask;
|
||||
smc_call(®s);
|
||||
|
||||
if (res.a0)
|
||||
if (regs.regs[0])
|
||||
printf("Prefetch disable config failed for mask ");
|
||||
else
|
||||
printf("Prefetch disable config passed for mask ");
|
||||
@ -1176,9 +1179,9 @@ int arch_early_init_r(void)
|
||||
|
||||
int timer_init(void)
|
||||
{
|
||||
u32 __iomem *cntcr = (u32 *)CFG_SYS_FSL_TIMER_ADDR;
|
||||
u32 __iomem *cntcr = (u32 *)CONFIG_SYS_FSL_TIMER_ADDR;
|
||||
#ifdef CONFIG_FSL_LSCH3
|
||||
u32 __iomem *cltbenr = (u32 *)CFG_SYS_FSL_PMU_CLTBENR;
|
||||
u32 __iomem *cltbenr = (u32 *)CONFIG_SYS_FSL_PMU_CLTBENR;
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_LS2080A) || defined(CONFIG_ARCH_LS1088A) || \
|
||||
defined(CONFIG_ARCH_LS1028A)
|
||||
@ -1226,8 +1229,7 @@ int timer_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SYSRESET)
|
||||
__efi_runtime_data u32 __iomem *rstcr = (u32 *)CFG_SYS_FSL_RST_ADDR;
|
||||
__efi_runtime_data u32 __iomem *rstcr = (u32 *)CONFIG_SYS_FSL_RST_ADDR;
|
||||
|
||||
void __efi_runtime reset_cpu(void)
|
||||
{
|
||||
@ -1246,7 +1248,6 @@ void __efi_runtime reset_cpu(void)
|
||||
scfg_out32(rstcr, val);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_PSCI_RESET)
|
||||
|
||||
@ -1308,22 +1309,22 @@ phys_size_t get_effective_memsize(void)
|
||||
* allocated from first region. If the memory extends to the second
|
||||
* region (or the third region if applicable), Management Complex (MC)
|
||||
* memory should be put into the highest region, i.e. the end of DDR
|
||||
* memory. CFG_MAX_MEM_MAPPED is set to the size of first region so
|
||||
* memory. CONFIG_MAX_MEM_MAPPED is set to the size of first region so
|
||||
* U-Boot doesn't relocate itself into higher address. Should DDR be
|
||||
* configured to skip the first region, this function needs to be
|
||||
* adjusted.
|
||||
*/
|
||||
if (gd->ram_size > CFG_MAX_MEM_MAPPED) {
|
||||
ea_size = CFG_MAX_MEM_MAPPED;
|
||||
if (gd->ram_size > CONFIG_MAX_MEM_MAPPED) {
|
||||
ea_size = CONFIG_MAX_MEM_MAPPED;
|
||||
rem = gd->ram_size - ea_size;
|
||||
} else {
|
||||
ea_size = gd->ram_size;
|
||||
}
|
||||
|
||||
#ifdef CFG_SYS_MEM_RESERVE_SECURE
|
||||
#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
|
||||
/* Check if we have enough space for secure memory */
|
||||
if (ea_size > CFG_SYS_MEM_RESERVE_SECURE)
|
||||
ea_size -= CFG_SYS_MEM_RESERVE_SECURE;
|
||||
if (ea_size > CONFIG_SYS_MEM_RESERVE_SECURE)
|
||||
ea_size -= CONFIG_SYS_MEM_RESERVE_SECURE;
|
||||
else
|
||||
printf("Error: No enough space for secure memory.\n");
|
||||
#endif
|
||||
@ -1342,20 +1343,25 @@ phys_size_t get_effective_memsize(void)
|
||||
#ifdef CONFIG_TFABOOT
|
||||
phys_size_t tfa_get_dram_size(void)
|
||||
{
|
||||
struct arm_smccc_res res;
|
||||
struct pt_regs regs;
|
||||
phys_size_t dram_size = 0;
|
||||
|
||||
arm_smccc_smc(SMC_DRAM_BANK_INFO, -1, 0, 0, 0, 0, 0, 0, &res);
|
||||
if (res.a0)
|
||||
regs.regs[0] = SMC_DRAM_BANK_INFO;
|
||||
regs.regs[1] = -1;
|
||||
|
||||
smc_call(®s);
|
||||
if (regs.regs[0])
|
||||
return 0;
|
||||
|
||||
return res.a1;
|
||||
dram_size = regs.regs[1];
|
||||
return dram_size;
|
||||
}
|
||||
|
||||
static int tfa_dram_init_banksize(void)
|
||||
{
|
||||
int i = 0, ret = 0;
|
||||
struct pt_regs regs;
|
||||
phys_size_t dram_size = tfa_get_dram_size();
|
||||
struct arm_smccc_res res;
|
||||
|
||||
debug("dram_size %llx\n", dram_size);
|
||||
|
||||
@ -1363,15 +1369,19 @@ static int tfa_dram_init_banksize(void)
|
||||
return -EINVAL;
|
||||
|
||||
do {
|
||||
arm_smccc_smc(SMC_DRAM_BANK_INFO, i, 0, 0, 0, 0, 0, 0, &res);
|
||||
if (res.a0) {
|
||||
regs.regs[0] = SMC_DRAM_BANK_INFO;
|
||||
regs.regs[1] = i;
|
||||
|
||||
smc_call(®s);
|
||||
if (regs.regs[0]) {
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
debug("bank[%d]: start %lx, size %lx\n", i, res.a1, res.a2);
|
||||
gd->bd->bi_dram[i].start = res.a1;
|
||||
gd->bd->bi_dram[i].size = res.a2;
|
||||
debug("bank[%d]: start %lx, size %lx\n", i, regs.regs[1],
|
||||
regs.regs[2]);
|
||||
gd->bd->bi_dram[i].start = regs.regs[1];
|
||||
gd->bd->bi_dram[i].size = regs.regs[2];
|
||||
|
||||
dram_size -= gd->bd->bi_dram[i].size;
|
||||
|
||||
@ -1430,7 +1440,7 @@ int dram_init_banksize(void)
|
||||
* gd->arch.secure_ram should be done to avoid running it repeatedly.
|
||||
*/
|
||||
|
||||
#ifdef CFG_SYS_MEM_RESERVE_SECURE
|
||||
#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
|
||||
if (gd->arch.secure_ram & MEM_RESERVE_SECURE_MAINTAINED) {
|
||||
debug("No need to run again, skip %s\n", __func__);
|
||||
|
||||
@ -1438,12 +1448,12 @@ int dram_init_banksize(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE;
|
||||
if (gd->ram_size > CFG_SYS_DDR_BLOCK1_SIZE) {
|
||||
gd->bd->bi_dram[0].size = CFG_SYS_DDR_BLOCK1_SIZE;
|
||||
gd->bd->bi_dram[1].start = CFG_SYS_DDR_BLOCK2_BASE;
|
||||
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
|
||||
if (gd->ram_size > CONFIG_SYS_DDR_BLOCK1_SIZE) {
|
||||
gd->bd->bi_dram[0].size = CONFIG_SYS_DDR_BLOCK1_SIZE;
|
||||
gd->bd->bi_dram[1].start = CONFIG_SYS_DDR_BLOCK2_BASE;
|
||||
gd->bd->bi_dram[1].size = gd->ram_size -
|
||||
CFG_SYS_DDR_BLOCK1_SIZE;
|
||||
CONFIG_SYS_DDR_BLOCK1_SIZE;
|
||||
#ifdef CONFIG_SYS_DDR_BLOCK3_BASE
|
||||
if (gd->bi_dram[1].size > CONFIG_SYS_DDR_BLOCK2_SIZE) {
|
||||
gd->bd->bi_dram[2].start = CONFIG_SYS_DDR_BLOCK3_BASE;
|
||||
@ -1455,17 +1465,17 @@ int dram_init_banksize(void)
|
||||
} else {
|
||||
gd->bd->bi_dram[0].size = gd->ram_size;
|
||||
}
|
||||
#ifdef CFG_SYS_MEM_RESERVE_SECURE
|
||||
#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
|
||||
if (gd->bd->bi_dram[0].size >
|
||||
CFG_SYS_MEM_RESERVE_SECURE) {
|
||||
CONFIG_SYS_MEM_RESERVE_SECURE) {
|
||||
gd->bd->bi_dram[0].size -=
|
||||
CFG_SYS_MEM_RESERVE_SECURE;
|
||||
CONFIG_SYS_MEM_RESERVE_SECURE;
|
||||
gd->arch.secure_ram = gd->bd->bi_dram[0].start +
|
||||
gd->bd->bi_dram[0].size;
|
||||
gd->arch.secure_ram |= MEM_RESERVE_SECURE_MAINTAINED;
|
||||
gd->ram_size -= CFG_SYS_MEM_RESERVE_SECURE;
|
||||
gd->ram_size -= CONFIG_SYS_MEM_RESERVE_SECURE;
|
||||
}
|
||||
#endif /* CFG_SYS_MEM_RESERVE_SECURE */
|
||||
#endif /* CONFIG_SYS_MEM_RESERVE_SECURE */
|
||||
|
||||
#if defined(CONFIG_RESV_RAM) && !defined(CONFIG_SPL_BUILD)
|
||||
/* Assign memory for MC */
|
||||
@ -1517,7 +1527,7 @@ int dram_init_banksize(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CFG_SYS_MEM_RESERVE_SECURE
|
||||
#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
|
||||
debug("%s is called. gd->ram_size is reduced to %lu\n",
|
||||
__func__, (ulong)gd->ram_size);
|
||||
#endif
|
||||
@ -1568,7 +1578,7 @@ void update_early_mmu_table(void)
|
||||
|
||||
if (gd->ram_size <= CONFIG_SYS_FSL_DRAM_SIZE1) {
|
||||
mmu_change_region_attr(
|
||||
CFG_SYS_SDRAM_BASE,
|
||||
CONFIG_SYS_SDRAM_BASE,
|
||||
gd->ram_size,
|
||||
PTE_BLOCK_MEMTYPE(MT_NORMAL) |
|
||||
PTE_BLOCK_OUTER_SHARE |
|
||||
@ -1576,8 +1586,8 @@ void update_early_mmu_table(void)
|
||||
PTE_TYPE_VALID);
|
||||
} else {
|
||||
mmu_change_region_attr(
|
||||
CFG_SYS_SDRAM_BASE,
|
||||
CFG_SYS_DDR_BLOCK1_SIZE,
|
||||
CONFIG_SYS_SDRAM_BASE,
|
||||
CONFIG_SYS_DDR_BLOCK1_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_NORMAL) |
|
||||
PTE_BLOCK_OUTER_SHARE |
|
||||
PTE_BLOCK_NS |
|
||||
@ -1586,10 +1596,10 @@ void update_early_mmu_table(void)
|
||||
#ifndef CONFIG_SYS_DDR_BLOCK2_SIZE
|
||||
#error "Missing CONFIG_SYS_DDR_BLOCK2_SIZE"
|
||||
#endif
|
||||
if (gd->ram_size - CFG_SYS_DDR_BLOCK1_SIZE >
|
||||
if (gd->ram_size - CONFIG_SYS_DDR_BLOCK1_SIZE >
|
||||
CONFIG_SYS_DDR_BLOCK2_SIZE) {
|
||||
mmu_change_region_attr(
|
||||
CFG_SYS_DDR_BLOCK2_BASE,
|
||||
CONFIG_SYS_DDR_BLOCK2_BASE,
|
||||
CONFIG_SYS_DDR_BLOCK2_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_NORMAL) |
|
||||
PTE_BLOCK_OUTER_SHARE |
|
||||
@ -1598,7 +1608,7 @@ void update_early_mmu_table(void)
|
||||
mmu_change_region_attr(
|
||||
CONFIG_SYS_DDR_BLOCK3_BASE,
|
||||
gd->ram_size -
|
||||
CFG_SYS_DDR_BLOCK1_SIZE -
|
||||
CONFIG_SYS_DDR_BLOCK1_SIZE -
|
||||
CONFIG_SYS_DDR_BLOCK2_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_NORMAL) |
|
||||
PTE_BLOCK_OUTER_SHARE |
|
||||
@ -1608,9 +1618,9 @@ void update_early_mmu_table(void)
|
||||
#endif
|
||||
{
|
||||
mmu_change_region_attr(
|
||||
CFG_SYS_DDR_BLOCK2_BASE,
|
||||
CONFIG_SYS_DDR_BLOCK2_BASE,
|
||||
gd->ram_size -
|
||||
CFG_SYS_DDR_BLOCK1_SIZE,
|
||||
CONFIG_SYS_DDR_BLOCK1_SIZE,
|
||||
PTE_BLOCK_MEMTYPE(MT_NORMAL) |
|
||||
PTE_BLOCK_OUTER_SHARE |
|
||||
PTE_BLOCK_NS |
|
||||
@ -1621,13 +1631,11 @@ void update_early_mmu_table(void)
|
||||
|
||||
__weak int dram_init(void)
|
||||
{
|
||||
#ifdef CONFIG_SYS_FSL_DDR
|
||||
fsl_initdram();
|
||||
#if (!defined(CONFIG_SPL) && !defined(CONFIG_TFABOOT)) || \
|
||||
defined(CONFIG_SPL_BUILD)
|
||||
/* This will break-before-make MMU for DDR */
|
||||
update_early_mmu_table();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
@ -1641,14 +1649,6 @@ __weak int serdes_misc_init(void)
|
||||
|
||||
int arch_misc_init(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_FSL_CAAM)) {
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
|
||||
if (ret)
|
||||
printf("Failed to initialize caam_jr: %d\n", ret);
|
||||
}
|
||||
serdes_misc_init();
|
||||
|
||||
return 0;
|
||||
|
@ -116,10 +116,10 @@ Flash Layout
|
||||
Environment Variables
|
||||
=====================
|
||||
mcboottimeout: MC boot timeout in milliseconds. If this variable is not defined
|
||||
the value CFG_SYS_LS_MC_BOOT_TIMEOUT_MS will be assumed.
|
||||
the value CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS will be assumed.
|
||||
|
||||
mcmemsize: MC DRAM block size in hex. If this variable is not defined, the value
|
||||
CFG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE will be assumed.
|
||||
CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE will be assumed.
|
||||
|
||||
mcinitcmd: This environment variable is defined to initiate MC and DPL deployment
|
||||
from the location where it is stored(NOR, NAND, SD, SATA, USB)during
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user