forked from leandrof/u-boot
Compare commits
4 Commits
v2022.01-r
...
WIP/25Feb2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b73d114213 | ||
|
|
c0b354ed02 | ||
|
|
01585fbf6b | ||
|
|
4e238b7c1a |
@@ -1,8 +1,8 @@
|
||||
variables:
|
||||
windows_vm: windows-2019
|
||||
windows_vm: vs2017-win2016
|
||||
ubuntu_vm: ubuntu-18.04
|
||||
macos_vm: macOS-10.15
|
||||
ci_runner_image: trini/u-boot-gitlab-ci-runner:focal-20211006-14Nov2021
|
||||
ci_runner_image: trini/u-boot-gitlab-ci-runner:bionic-20200807-02Sep2020
|
||||
# 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.
|
||||
@@ -16,14 +16,14 @@ jobs:
|
||||
vmImage: $(windows_vm)
|
||||
steps:
|
||||
- powershell: |
|
||||
(New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2021-06-04/msys2-base-x86_64-20210604.sfx.exe", "sfx.exe")
|
||||
(New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2020-07-20/msys2-base-x86_64-20200720.sfx.exe", "sfx.exe")
|
||||
displayName: 'Install MSYS2'
|
||||
- script: |
|
||||
sfx.exe -y -o%CD:~0,2%\
|
||||
%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"
|
||||
%CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm --needed -S make gcc bison flex diffutils openssl-devel"
|
||||
displayName: 'Install Toolchain'
|
||||
- script: |
|
||||
echo make tools-only_defconfig tools-only NO_SDL=1 > build-tools.sh
|
||||
@@ -148,7 +148,7 @@ jobs:
|
||||
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}
|
||||
./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl
|
||||
./tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w sandbox_spl
|
||||
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test
|
||||
./tools/buildman/buildman -t
|
||||
./tools/dtoc/dtoc -t
|
||||
@@ -169,7 +169,8 @@ jobs:
|
||||
options: $(container_option)
|
||||
steps:
|
||||
- script: |
|
||||
export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH
|
||||
./tools/buildman/buildman --fetch-arch arm
|
||||
export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH
|
||||
test/nokia_rx51_test.sh
|
||||
|
||||
- job: test_py
|
||||
@@ -182,18 +183,18 @@ jobs:
|
||||
TEST_PY_BD: "sandbox"
|
||||
sandbox_clang:
|
||||
TEST_PY_BD: "sandbox"
|
||||
OVERRIDE: "-O clang-13"
|
||||
OVERRIDE: "-O clang-10"
|
||||
sandbox_spl:
|
||||
TEST_PY_BD: "sandbox_spl"
|
||||
TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff 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"
|
||||
evb_ast2500:
|
||||
TEST_PY_BD: "evb-ast2500"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
vexpress_ca15_tc2:
|
||||
TEST_PY_BD: "vexpress_ca15_tc2"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
vexpress_ca9x4:
|
||||
TEST_PY_BD: "vexpress_ca9x4"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
@@ -207,6 +208,18 @@ jobs:
|
||||
qemu_arm64:
|
||||
TEST_PY_BD: "qemu_arm64"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
qemu_mips:
|
||||
TEST_PY_BD: "qemu_mips"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
qemu_mipsel:
|
||||
TEST_PY_BD: "qemu_mipsel"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
qemu_mips64:
|
||||
TEST_PY_BD: "qemu_mips64"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
qemu_mips64el:
|
||||
TEST_PY_BD: "qemu_mips64el"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
qemu_malta:
|
||||
TEST_PY_BD: "malta"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
@@ -256,12 +269,6 @@ jobs:
|
||||
r2dplus_tulip:
|
||||
TEST_PY_BD: "r2dplus"
|
||||
TEST_PY_ID: "--id tulip_qemu"
|
||||
sifive_unleashed_sdcard:
|
||||
TEST_PY_BD: "sifive_unleashed"
|
||||
TEST_PY_ID: "--id sdcard_qemu"
|
||||
sifive_unleashed_spi-nor:
|
||||
TEST_PY_BD: "sifive_unleashed"
|
||||
TEST_PY_ID: "--id spi-nor_qemu"
|
||||
xilinx_zynq_virt:
|
||||
TEST_PY_BD: "xilinx_zynq_virt"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
@@ -288,18 +295,18 @@ jobs:
|
||||
cat << "EOF" >> test.sh
|
||||
# the below corresponds to .gitlab-ci.yml "before_script"
|
||||
cd ${WORK_DIR}
|
||||
git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks
|
||||
git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks
|
||||
ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
|
||||
ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
|
||||
grub-mkimage --prefix=\"\" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
|
||||
grub-mkimage --prefix=\"\" -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
|
||||
if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then
|
||||
wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ;
|
||||
export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin;
|
||||
wget -O - https://github.com/riscv/opensbi/releases/download/v0.8/opensbi-0.8-rv-bin.tar.xz | tar -C /tmp -xJ;
|
||||
export OPENSBI=/tmp/opensbi-0.8-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin;
|
||||
fi
|
||||
if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]] || [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
|
||||
wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ;
|
||||
export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin;
|
||||
if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]]; then
|
||||
wget -O - https://github.com/riscv/opensbi/releases/download/v0.8/opensbi-0.8-rv-bin.tar.xz | tar -C /tmp -xJ;
|
||||
export OPENSBI=/tmp/opensbi-0.8-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin;
|
||||
fi
|
||||
# the below corresponds to .gitlab-ci.yml "script"
|
||||
cd ${WORK_DIR}
|
||||
@@ -308,20 +315,9 @@ jobs:
|
||||
cp ~/grub_x86.efi ${UBOOT_TRAVIS_BUILD_DIR}/
|
||||
cp ~/grub_x64.efi ${UBOOT_TRAVIS_BUILD_DIR}/
|
||||
cp /opt/grub/grubriscv64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv64.efi
|
||||
cp /opt/grub/grubriscv32.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv32.efi
|
||||
cp /opt/grub/grubaa64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm64.efi
|
||||
cp /opt/grub/grubarm.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm.efi
|
||||
# create sdcard / spi-nor images for sifive unleashed using genimage
|
||||
if [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
|
||||
mkdir -p root;
|
||||
cp ${UBOOT_TRAVIS_BUILD_DIR}/spl/u-boot-spl.bin .;
|
||||
cp ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.itb .;
|
||||
rm -rf tmp;
|
||||
genimage --inputpath . --config board/sifive/unleashed/genimage_sdcard.cfg;
|
||||
cp images/sdcard.img ${UBOOT_TRAVIS_BUILD_DIR}/;
|
||||
rm -rf tmp;
|
||||
genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg;
|
||||
cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/;
|
||||
fi
|
||||
virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
. /tmp/venv/bin/activate
|
||||
pip install -r test/py/requirements.txt
|
||||
@@ -337,22 +333,7 @@ jobs:
|
||||
# as sandbox testing need create files like spi flash images, etc.
|
||||
# (TODO: clean up this in the future)
|
||||
chmod 777 .
|
||||
# Filesystem tests need extra docker args to run
|
||||
set --
|
||||
if [[ "${TEST_PY_BD}" == "sandbox" ]]; then
|
||||
# mount -o loop needs the loop devices
|
||||
if modprobe loop; then
|
||||
for d in $(find /dev -maxdepth 1 -name 'loop*'); do
|
||||
set -- "$@" --device $d:$d
|
||||
done
|
||||
fi
|
||||
# Needed for mount syscall (for guestmount as well)
|
||||
set -- "$@" --cap-add SYS_ADMIN
|
||||
# Default apparmor profile denies mounts
|
||||
set -- "$@" --security-opt apparmor=unconfined
|
||||
fi
|
||||
# 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
|
||||
docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/test.sh
|
||||
|
||||
- job: build_the_world
|
||||
displayName: 'Build the World'
|
||||
@@ -367,7 +348,7 @@ jobs:
|
||||
arm11_arm7_arm920t_arm946es:
|
||||
BUILDMAN: "arm11 arm7 arm920t arm946es"
|
||||
arm926ejs:
|
||||
BUILDMAN: "arm926ejs -x freescale,siemens,at91,kirkwood,omap"
|
||||
BUILDMAN: "arm926ejs -x freescale,siemens,at91,kirkwood,spear,omap"
|
||||
at91_non_armv7:
|
||||
BUILDMAN: "at91 -x armv7"
|
||||
at91_non_arm926ejs:
|
||||
@@ -394,12 +375,12 @@ jobs:
|
||||
BUILDMAN: "mx6 -x boundary,engicam,freescale,technexion,toradex"
|
||||
imx:
|
||||
BUILDMAN: "mx -x mx6,freescale,technexion,toradex"
|
||||
imx8:
|
||||
BUILDMAN: "imx8"
|
||||
keystone2_keystone3:
|
||||
BUILDMAN: "k2 k3"
|
||||
samsung_socfpga:
|
||||
BUILDMAN: "samsung socfpga"
|
||||
spear:
|
||||
BUILDMAN: "spear"
|
||||
sun4i:
|
||||
BUILDMAN: "sun4i"
|
||||
sun5i:
|
||||
@@ -417,7 +398,7 @@ jobs:
|
||||
sun50i:
|
||||
BUILDMAN: "sun50i"
|
||||
arm_catch_all:
|
||||
BUILDMAN: "arm -x arm11,arm7,arm9,aarch64,at91,bcm,freescale,kirkwood,mvebu,renesas,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap,rk,toradex,socfpga,k2,k3,zynq"
|
||||
BUILDMAN: "arm -x arm11,arm7,arm9,aarch64,at91,bcm,freescale,kirkwood,mvebu,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap,rk,toradex,socfpga,k2,k3,zynq"
|
||||
sandbox_x86:
|
||||
BUILDMAN: "sandbox x86"
|
||||
technexion:
|
||||
@@ -433,11 +414,11 @@ jobs:
|
||||
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*"
|
||||
BUILDMAN: "mpc85xx&freescale -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x bsc91*"
|
||||
t208xrdb_corenet_ds:
|
||||
BUILDMAN: "t208xrdb corenet_ds"
|
||||
fsl_ppc:
|
||||
BUILDMAN: "mpc83xx&freescale"
|
||||
BUILDMAN: "t4qds b4860qds mpc83xx&freescale mpc86xx&freescale"
|
||||
t102x:
|
||||
BUILDMAN: "t102*"
|
||||
p1_p2_rdb_pc:
|
||||
@@ -455,11 +436,11 @@ jobs:
|
||||
uniphier:
|
||||
BUILDMAN: "uniphier"
|
||||
aarch64_catch_all:
|
||||
BUILDMAN: "aarch64 -x bcm,imx8,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,renesas,sunxi,samsung,socfpga,rk,versal,zynq"
|
||||
BUILDMAN: "aarch64 -x bcm,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,sunxi,samsung,socfpga,rk,versal,zynq"
|
||||
rockchip:
|
||||
BUILDMAN: "rk"
|
||||
renesas:
|
||||
BUILDMAN: "renesas"
|
||||
sh:
|
||||
BUILDMAN: "sh -x arm"
|
||||
zynq:
|
||||
BUILDMAN: "zynq&armv7"
|
||||
zynqmp_versal:
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
# addresses are __aligned(2)".
|
||||
--ignore PREFER_ETHER_ADDR_COPY
|
||||
|
||||
# ENOSYS is a conventionally used error, even though U-Boot lacks system calls.
|
||||
--ignore ENOSYS
|
||||
|
||||
# A bit shorter of a description is OK with us.
|
||||
--min-conf-desc-length=2
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
--find-maintainer-files --maintainer-path=.
|
||||
@@ -1,8 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
# 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
|
||||
# https://gitlab.denx.de/u-boot/gitlab-ci-runner
|
||||
image: trini/u-boot-gitlab-ci-runner:bionic-20200807-02Sep2020
|
||||
|
||||
# We run some tests in different order, to catch some failures quicker.
|
||||
stages:
|
||||
@@ -14,18 +14,18 @@ stages:
|
||||
stage: test.py
|
||||
before_script:
|
||||
# Clone uboot-test-hooks
|
||||
- git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks
|
||||
- git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks
|
||||
- ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
|
||||
- ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
|
||||
- grub-mkimage --prefix="" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
|
||||
- grub-mkimage --prefix="" -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
|
||||
- if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then
|
||||
wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ;
|
||||
export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin;
|
||||
wget -O - https://github.com/riscv/opensbi/releases/download/v0.8/opensbi-0.8-rv-bin.tar.xz | tar -C /tmp -xJ;
|
||||
export OPENSBI=/tmp/opensbi-0.8-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin;
|
||||
fi
|
||||
- if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]] || [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
|
||||
wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ;
|
||||
export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin;
|
||||
- if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]]; then
|
||||
wget -O - https://github.com/riscv/opensbi/releases/download/v0.8/opensbi-0.8-rv-bin.tar.xz | tar -C /tmp -xJ;
|
||||
export OPENSBI=/tmp/opensbi-0.8-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin;
|
||||
fi
|
||||
|
||||
after_script:
|
||||
@@ -38,20 +38,9 @@ stages:
|
||||
- cp ~/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/
|
||||
- cp ~/grub_x64.efi $UBOOT_TRAVIS_BUILD_DIR/
|
||||
- cp /opt/grub/grubriscv64.efi $UBOOT_TRAVIS_BUILD_DIR/grub_riscv64.efi
|
||||
- cp /opt/grub/grubriscv32.efi $UBOOT_TRAVIS_BUILD_DIR/grub_riscv32.efi
|
||||
- cp /opt/grub/grubaa64.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm64.efi
|
||||
- cp /opt/grub/grubarm.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi
|
||||
# create sdcard / spi-nor images for sifive unleashed using genimage
|
||||
- if [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
|
||||
mkdir -p root;
|
||||
cp ${UBOOT_TRAVIS_BUILD_DIR}/spl/u-boot-spl.bin .;
|
||||
cp ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.itb .;
|
||||
rm -rf tmp;
|
||||
genimage --inputpath . --config board/sifive/unleashed/genimage_sdcard.cfg;
|
||||
cp images/sdcard.img ${UBOOT_TRAVIS_BUILD_DIR}/;
|
||||
rm -rf tmp;
|
||||
genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg;
|
||||
cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/;
|
||||
fi
|
||||
- virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
- . /tmp/venv/bin/activate
|
||||
- pip install -r test/py/requirements.txt
|
||||
@@ -166,8 +155,7 @@ 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}";
|
||||
./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w
|
||||
--board sandbox_spl;
|
||||
./tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w sandbox_spl;
|
||||
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test;
|
||||
./tools/buildman/buildman -t;
|
||||
./tools/dtoc/dtoc -t;
|
||||
@@ -177,7 +165,8 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
|
||||
Run tests for Nokia RX-51 (aka N900):
|
||||
stage: testsuites
|
||||
script:
|
||||
- export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH;
|
||||
- ./tools/buildman/buildman --fetch-arch arm;
|
||||
export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH;
|
||||
test/nokia_rx51_test.sh
|
||||
|
||||
# Test sandbox with test.py
|
||||
@@ -189,7 +178,7 @@ sandbox test.py:
|
||||
sandbox with clang test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "sandbox"
|
||||
OVERRIDE: "-O clang-13"
|
||||
OVERRIDE: "-O clang-10"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
sandbox_spl test.py:
|
||||
@@ -198,12 +187,6 @@ sandbox_spl test.py:
|
||||
TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
sandbox_noinst_test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "sandbox_noinst"
|
||||
TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
evb-ast2500 test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "evb-ast2500"
|
||||
@@ -215,6 +198,12 @@ sandbox_flattree test.py:
|
||||
TEST_PY_BD: "sandbox_flattree"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
vexpress_ca15_tc2 test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "vexpress_ca15_tc2"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
vexpress_ca9x4 test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "vexpress_ca9x4"
|
||||
@@ -240,6 +229,30 @@ qemu_arm64 test.py:
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_mips test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "qemu_mips"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_mipsel test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "qemu_mipsel"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_mips64 test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "qemu_mips64"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_mips64el test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "qemu_mips64el"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_malta test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "malta"
|
||||
@@ -334,18 +347,6 @@ r2dplus_tulip test.py:
|
||||
TEST_PY_ID: "--id tulip_qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
sifive_unleashed_sdcard test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "sifive_unleashed"
|
||||
TEST_PY_ID: "--id sdcard_qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
sifive_unleashed_spi-nor test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "sifive_unleashed"
|
||||
TEST_PY_ID: "--id spi-nor_qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
xilinx_zynq_virt test.py:
|
||||
variables:
|
||||
TEST_PY_BD: "xilinx_zynq_virt"
|
||||
|
||||
3
.mailmap
3
.mailmap
@@ -24,17 +24,14 @@ 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>
|
||||
Jagan Teki <402jagan@gmail.com>
|
||||
Jagan Teki <jaganna@gmail.com>
|
||||
Jagan Teki <jaganna@xilinx.com>
|
||||
Jagan Teki <jagannadh.teki@gmail.com>
|
||||
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>
|
||||
Markus Klotzbuecher <mk@denx.de>
|
||||
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>
|
||||
Paul Burton <paul.burton@mips.com> <paul.burton@imgtec.com>
|
||||
|
||||
2
Kbuild
2
Kbuild
@@ -10,8 +10,6 @@ generic-offsets-file := include/generated/generic-asm-offsets.h
|
||||
always := $(generic-offsets-file)
|
||||
targets := lib/asm-offsets.s
|
||||
|
||||
CFLAGS_REMOVE_asm-offsets.o := $(LTO_CFLAGS)
|
||||
|
||||
$(obj)/$(generic-offsets-file): $(obj)/lib/asm-offsets.s FORCE
|
||||
$(call filechk,offsets,__GENERIC_ASM_OFFSETS_H__)
|
||||
|
||||
|
||||
87
Kconfig
87
Kconfig
@@ -57,21 +57,6 @@ config LOCALVERSION_AUTO
|
||||
|
||||
which is done within the script "scripts/setlocalversion".)
|
||||
|
||||
config CC_IS_GCC
|
||||
def_bool $(success,$(CC) --version | head -n 1 | grep -q gcc)
|
||||
|
||||
config GCC_VERSION
|
||||
int
|
||||
default $(shell,$(srctree)/scripts/gcc-version.sh -p $(CC) | sed 's/^0*//') if CC_IS_GCC
|
||||
default 0
|
||||
|
||||
config CC_IS_CLANG
|
||||
def_bool $(success,$(CC) --version | head -n 1 | grep -q clang)
|
||||
|
||||
config CLANG_VERSION
|
||||
int
|
||||
default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
|
||||
|
||||
config CC_OPTIMIZE_FOR_SIZE
|
||||
bool "Optimize for size"
|
||||
default y
|
||||
@@ -83,6 +68,7 @@ config CC_OPTIMIZE_FOR_SIZE
|
||||
|
||||
config OPTIMIZE_INLINING
|
||||
bool "Allow compiler to uninline functions marked 'inline' in full U-Boot"
|
||||
default n
|
||||
help
|
||||
This option determines if U-Boot forces gcc to inline the functions
|
||||
developers have marked 'inline'. Doing so takes away freedom from gcc to
|
||||
@@ -92,38 +78,17 @@ config OPTIMIZE_INLINING
|
||||
config SPL_OPTIMIZE_INLINING
|
||||
bool "Allow compiler to uninline functions marked 'inline' in SPL"
|
||||
depends on SPL
|
||||
default n
|
||||
help
|
||||
This option determines if U-Boot forces gcc to inline the functions
|
||||
developers have marked 'inline'. Doing so takes away freedom from gcc to
|
||||
do what it thinks is best, which is desirable in some cases for size
|
||||
reasons.
|
||||
|
||||
config ARCH_SUPPORTS_LTO
|
||||
bool
|
||||
|
||||
config LTO
|
||||
bool "Enable Link Time Optimizations"
|
||||
depends on ARCH_SUPPORTS_LTO
|
||||
help
|
||||
This option enables Link Time Optimization (LTO), a mechanism which
|
||||
allows the compiler to optimize between different compilation units.
|
||||
|
||||
This can optimize away dead code paths, resulting in smaller binary
|
||||
size (if CC_OPTIMIZE_FOR_SIZE is enabled).
|
||||
|
||||
This option is not available for every architecture and may
|
||||
introduce bugs.
|
||||
|
||||
Currently, when compiling with GCC, due to a weird bug regarding
|
||||
jobserver, the final linking will not respect make's --jobs argument.
|
||||
Instead all available processors will be used (as reported by the
|
||||
nproc command).
|
||||
|
||||
If unsure, say n.
|
||||
|
||||
config TPL_OPTIMIZE_INLINING
|
||||
bool "Allow compiler to uninline functions marked 'inline' in TPL"
|
||||
depends on TPL
|
||||
default n
|
||||
help
|
||||
This option determines if U-Boot forces gcc to inline the functions
|
||||
developers have marked 'inline'. Doing so takes away freedom from gcc to
|
||||
@@ -245,11 +210,8 @@ config SYS_MALLOC_F_LEN
|
||||
|
||||
config SYS_MALLOC_LEN
|
||||
hex "Define memory for Dynamic allocation"
|
||||
default 0x2000000 if ARCH_ROCKCHIP || ARCH_OMAP2PLUS || ARCH_MESON
|
||||
default 0x4020000 if ARCH_SUNXI && !MACH_SUN8I_V3S
|
||||
default 0x200000 if ARCH_BMIPS || X86
|
||||
default 0x220000 if ARCH_SUNXI && MACH_SUN8I_V3S
|
||||
default 0x400000
|
||||
depends on ARCH_ZYNQ || ARCH_VERSAL || ARCH_STM32MP || ARCH_ROCKCHIP
|
||||
default 0x2000000 if ARCH_ROCKCHIP
|
||||
help
|
||||
This defines memory to be allocated for Dynamic allocation
|
||||
TODO: Use for other architectures
|
||||
@@ -306,6 +268,7 @@ if EXPERT
|
||||
|
||||
config SYS_MALLOC_DEFAULT_TO_INIT
|
||||
bool "Default malloc to init while reserving the memory for it"
|
||||
default n
|
||||
help
|
||||
It may happen that one needs to move the dynamic allocation
|
||||
from one to another memory range, eg. when moving the malloc
|
||||
@@ -341,6 +304,27 @@ config HAS_ROM
|
||||
Enables building of a u-boot.rom target. This collects U-Boot and
|
||||
any necessary binary blobs.
|
||||
|
||||
config ROM_NEEDS_BLOBS
|
||||
bool
|
||||
depends on HAS_ROM
|
||||
help
|
||||
Enable this if building the u-boot.rom target needs binary blobs, and
|
||||
so cannot be done normally. In this case, U-Boot will only build the
|
||||
ROM if the required blobs exist. If not, you will see an warning like:
|
||||
|
||||
Image 'main-section' is missing external blobs and is non-functional:
|
||||
intel-descriptor intel-me intel-refcode intel-vga intel-mrc
|
||||
|
||||
config BUILD_ROM
|
||||
bool "Build U-Boot as BIOS replacement"
|
||||
depends on HAS_ROM
|
||||
default y if !ROM_NEEDS_BLOBS
|
||||
help
|
||||
This option allows to build a ROM version of U-Boot.
|
||||
The build process generally requires several binary blobs
|
||||
which are not shipped in the U-Boot source tree.
|
||||
Please, see doc/arch/x86.rst for details.
|
||||
|
||||
config SPL_IMAGE
|
||||
string "SPL image used in the combined SPL+U-Boot image"
|
||||
default "spl/boot.bin" if ARCH_AT91 && SPL_NAND_SUPPORT
|
||||
@@ -387,20 +371,6 @@ config SYS_LDSCRIPT
|
||||
Path within the source tree to the linker script to use for the
|
||||
main U-Boot binary.
|
||||
|
||||
config SYS_LOAD_ADDR
|
||||
hex "Address in memory to use by default"
|
||||
default 0x01000000 if ARCH_SOCFPGA
|
||||
default 0x02000000 if PPC || X86
|
||||
default 0x22000000 if MACH_SUN9I
|
||||
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)
|
||||
default 0x80800000 if ARCH_MX7
|
||||
default 0x90000000 if FSL_LSCH2 || FSL_LSCH3
|
||||
help
|
||||
Address in memory to use as the default safe load address.
|
||||
|
||||
config ERR_PTR_OFFSET
|
||||
hex
|
||||
default 0x0
|
||||
@@ -435,6 +405,7 @@ config SYS_HAS_SRAM
|
||||
default y if TARGET_PIC32MZDASK
|
||||
default y if TARGET_DEVKIT8000
|
||||
default y if TARGET_TRICORDER
|
||||
default n
|
||||
help
|
||||
Enable this to allow support for the on board SRAM.
|
||||
SRAM base address is controlled by CONFIG_SYS_SRAM_BASE.
|
||||
@@ -466,8 +437,6 @@ endmenu # General setup
|
||||
|
||||
source "api/Kconfig"
|
||||
|
||||
source "boot/Kconfig"
|
||||
|
||||
source "common/Kconfig"
|
||||
|
||||
source "cmd/Kconfig"
|
||||
|
||||
@@ -133,7 +133,7 @@ such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
|
||||
248
MAINTAINERS
248
MAINTAINERS
@@ -75,7 +75,7 @@ M: Alexey Brodkin <alexey.brodkin@synopsys.com>
|
||||
M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
|
||||
S: Maintained
|
||||
L: uboot-snps-arc@synopsys.com
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-arc.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-arc.git
|
||||
F: arch/arc/
|
||||
F: board/synopsys/
|
||||
|
||||
@@ -108,28 +108,19 @@ L: uboot-snps-arc@synopsys.com
|
||||
F: doc/device-tree-bindings/mmc/snps,dw-mmc.txt
|
||||
F: drivers/mmc/snps_dw_mmc.c
|
||||
|
||||
APPLE M1 SOC SUPPORT
|
||||
M: Mark Kettenis <kettenis@openbsd.org>
|
||||
S: Maintained
|
||||
F: arch/arm/include/asm/arch-m1/
|
||||
F: arch/arm/mach-apple/
|
||||
F: configs/apple_m1_defconfig
|
||||
F: drivers/iommu/apple_dart.c
|
||||
F: include/configs/apple.h
|
||||
|
||||
ARM
|
||||
M: Tom Rini <trini@konsulko.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-arm.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-arm.git
|
||||
F: arch/arm/
|
||||
F: cmd/arm/
|
||||
|
||||
ARM ALTERA SOCFPGA
|
||||
M: Marek Vasut <marex@denx.de>
|
||||
M: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
|
||||
M: Tien Fong Chee <tien.fong.chee@intel.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-socfpga.git
|
||||
M: Ley Foon Tan <ley.foon.tan@intel.com>
|
||||
S: Maintainted
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-socfpga.git
|
||||
F: arch/arm/mach-socfpga/
|
||||
F: drivers/sysreset/sysreset_socfpga*
|
||||
|
||||
@@ -137,7 +128,7 @@ ARM AMLOGIC SOC SUPPORT
|
||||
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
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic.git
|
||||
F: arch/arm/mach-meson/
|
||||
F: arch/arm/include/asm/arch-meson/
|
||||
F: drivers/clk/meson/
|
||||
@@ -169,7 +160,7 @@ F: drivers/clk/aspeed/
|
||||
F: drivers/pinctrl/aspeed/
|
||||
N: aspeed
|
||||
|
||||
ARM BROADCOM BCM283X / BCM27XX
|
||||
ARM BROADCOM BCM283X
|
||||
M: Matthias Brugger <mbrugger@suse.com>
|
||||
S: Maintained
|
||||
F: arch/arm/dts/bcm283*
|
||||
@@ -184,8 +175,6 @@ F: drivers/video/bcm2835.c
|
||||
F: include/dm/platform_data/serial_bcm283x_mu.h
|
||||
F: include/dt-bindings/pinctrl/bcm2835.h
|
||||
F: drivers/pinctrl/broadcom/
|
||||
F: configs/rpi_*
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-arm.git
|
||||
|
||||
ARM BROADCOM BCMSTB
|
||||
M: Thomas Fitzsimmons <fitzsim@fitzsim.org>
|
||||
@@ -229,7 +218,7 @@ M: Stefano Babic <sbabic@denx.de>
|
||||
M: Fabio Estevam <festevam@gmail.com>
|
||||
R: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-imx.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-imx.git
|
||||
F: arch/arm/cpu/arm1136/mx*/
|
||||
F: arch/arm/cpu/arm926ejs/mx*/
|
||||
F: arch/arm/cpu/armv7/vf610/
|
||||
@@ -266,7 +255,7 @@ F: drivers/rng/msm_rng.c
|
||||
ARM MARVELL KIRKWOOD ARMADA-XP ARMADA-38X ARMADA-37XX ARMADA-7K/8K
|
||||
M: Stefan Roese <sr@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-marvell.git
|
||||
T: git https://gitlab.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
|
||||
@@ -280,7 +269,7 @@ F: drivers/watchdog/orion_wdt.c
|
||||
ARM MARVELL PXA
|
||||
M: Marek Vasut <marex@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-pxa.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-pxa.git
|
||||
F: arch/arm/cpu/pxa/
|
||||
F: arch/arm/include/asm/arch-pxa/
|
||||
|
||||
@@ -316,12 +305,11 @@ N: mediatek
|
||||
ARM MICROCHIP/ATMEL AT91
|
||||
M: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-atmel.git
|
||||
T: git https://gitlab.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/misc/microchip_flexcom.c
|
||||
F: include/dt-bindings/mfd/atmel-flexcom.h
|
||||
F: drivers/timer/mchp-pit64b-timer.c
|
||||
|
||||
ARM NEXELL S5P4418
|
||||
@@ -357,15 +345,15 @@ ARM RENESAS RMOBILE/R-CAR
|
||||
M: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
||||
M: Marek Vasut <marek.vasut+renesas@gmail.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-sh.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-sh.git
|
||||
F: arch/arm/mach-rmobile/
|
||||
|
||||
ARM ROCKCHIP
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
M: Philipp Tomsich <philipp.tomsich@vrull.eu>
|
||||
M: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
||||
M: Kever Yang <kever.yang@rock-chips.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-rockchip.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip.git
|
||||
F: arch/arm/include/asm/arch-rockchip/
|
||||
F: arch/arm/mach-rockchip/
|
||||
F: board/rockchip/
|
||||
@@ -387,7 +375,7 @@ F: tools/rkspi.c
|
||||
ARM SAMSUNG
|
||||
M: Minkyu Kang <mk7.kang@samsung.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-samsung.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-samsung.git
|
||||
F: arch/arm/mach-exynos/
|
||||
F: arch/arm/mach-s5pc1xx/
|
||||
F: arch/arm/cpu/armv7/s5p-common/
|
||||
@@ -400,15 +388,13 @@ F: drivers/gpio/msm_gpio.c
|
||||
F: drivers/mmc/msm_sdhci.c
|
||||
F: drivers/phy/msm8916-usbh-phy.c
|
||||
F: drivers/serial/serial_msm.c
|
||||
F: drivers/serial/serial_msm_geni.c
|
||||
F: drivers/smem/msm_smem.c
|
||||
F: drivers/spmi/spmi-msm.c
|
||||
F: drivers/usb/host/ehci-msm.c
|
||||
|
||||
ARM STI
|
||||
M: Patrice Chotard <patrice.chotard@foss.st.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-stm.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-stm.git
|
||||
F: arch/arm/mach-sti/
|
||||
F: arch/arm/include/asm/arch-sti*/
|
||||
F: drivers/phy/sti_usb_phy.c
|
||||
@@ -424,11 +410,18 @@ F: include/dt-bindings/clock/stih407-clks.h
|
||||
F: include/dt-bindings/clock/stih410-clks.h
|
||||
F: include/dt-bindings/reset/stih407-resets.h
|
||||
|
||||
ARM STM SPEAR
|
||||
#M: Vipin Kumar <vipin.kumar@st.com>
|
||||
S: Orphaned (Since 2016-02)
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-stm.git
|
||||
F: arch/arm/cpu/arm926ejs/spear/
|
||||
F: arch/arm/include/asm/arch-spear/
|
||||
|
||||
ARM STM STM32MP
|
||||
M: Patrick Delaunay <patrick.delaunay@foss.st.com>
|
||||
M: Patrice Chotard <patrice.chotard@foss.st.com>
|
||||
L: uboot-stm32@st-md-mailman.stormreply.com (moderated for non-subscribers)
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-stm.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-stm.git
|
||||
S: Maintained
|
||||
F: arch/arm/mach-stm32mp/
|
||||
F: doc/board/st/
|
||||
@@ -478,26 +471,23 @@ ARM SUNXI
|
||||
M: Jagan Teki <jagan@amarulasolutions.com>
|
||||
M: Andre Przywara <andre.przywara@arm.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-sunxi.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi.git
|
||||
F: arch/arm/cpu/armv7/sunxi/
|
||||
F: arch/arm/include/asm/arch-sunxi/
|
||||
F: arch/arm/mach-sunxi/
|
||||
F: board/sunxi/
|
||||
F: drivers/clk/sunxi/
|
||||
F: drivers/phy/allwinner/
|
||||
F: drivers/video/sunxi/
|
||||
|
||||
ARM TEGRA
|
||||
M: Tom Warren <twarren@nvidia.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-tegra.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-tegra.git
|
||||
F: arch/arm/mach-tegra/
|
||||
F: arch/arm/include/asm/arch-tegra*/
|
||||
|
||||
ARM TI
|
||||
M: Tom Rini <trini@konsulko.com>
|
||||
M: Lokesh Vutla <lokeshvutla@ti.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-ti.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-ti.git
|
||||
F: arch/arm/mach-davinci/
|
||||
F: arch/arm/mach-k3/
|
||||
F: arch/arm/mach-keystone/
|
||||
@@ -518,7 +508,6 @@ F: drivers/phy/phy-ti-am654.c
|
||||
F: drivers/phy/ti-pipe3-phy.c
|
||||
F: drivers/ram/k3*
|
||||
F: drivers/remoteproc/k3_system_controller.c
|
||||
F: drivers/remoteproc/pruc_rpoc.c
|
||||
F: drivers/remoteproc/ti*
|
||||
F: drivers/reset/reset-ti-sci.c
|
||||
F: drivers/rtc/davinci.c
|
||||
@@ -528,7 +517,6 @@ F: drivers/sysreset/sysreset-ti-sci.c
|
||||
F: drivers/thermal/ti-bandgap.c
|
||||
F: drivers/timer/omap-timer.c
|
||||
F: drivers/watchdog/omap_wdt.c
|
||||
F: include/linux/pruss_driver.h
|
||||
F: include/linux/soc/ti/
|
||||
|
||||
ARM U8500
|
||||
@@ -537,12 +525,7 @@ R: Linus Walleij <linus.walleij@linaro.org>
|
||||
S: Maintained
|
||||
F: arch/arm/dts/ste-*
|
||||
F: arch/arm/mach-u8500/
|
||||
F: drivers/gpio/nmk_gpio.c
|
||||
F: drivers/phy/phy-ab8500-usb.c
|
||||
F: drivers/power/pmic/ab8500.c
|
||||
F: drivers/timer/nomadik-mtu-timer.c
|
||||
F: drivers/usb/musb-new/ux500.c
|
||||
F: drivers/video/mcde_simple.c
|
||||
|
||||
ARM UNIPHIER
|
||||
S: Orphan (Since 2020-09)
|
||||
@@ -553,10 +536,8 @@ N: uniphier
|
||||
ARM VERSAL
|
||||
M: Michal Simek <michal.simek@xilinx.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
T: git https://gitlab.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/watchdog/xilinx_wwdt.c
|
||||
N: (?<!uni)versal
|
||||
|
||||
@@ -570,7 +551,7 @@ N: vexpress
|
||||
ARM ZYNQ
|
||||
M: Michal Simek <monstr@monstr.eu>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
F: arch/arm/mach-zynq/
|
||||
F: doc/board/xilinx/
|
||||
F: doc/device-tree-bindings/video/syncoam,seps525.txt
|
||||
@@ -596,7 +577,7 @@ N: zynq
|
||||
ARM ZYNQMP
|
||||
M: Michal Simek <michal.simek@xilinx.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
T: git https://gitlab.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
|
||||
@@ -611,9 +592,6 @@ F: drivers/mtd/nand/raw/zynq_nand.c
|
||||
F: drivers/net/phy/xilinx_phy.c
|
||||
F: drivers/net/zynq_gem.c
|
||||
F: drivers/serial/serial_zynq.c
|
||||
F: drivers/reset/reset-zynqmp.c
|
||||
F: drivers/rtc/zynqmp_rtc.c
|
||||
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
|
||||
@@ -629,7 +607,7 @@ N: zynqmp
|
||||
ARM ZYNQMP R5
|
||||
M: Michal Simek <michal.simek@xilinx.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
F: arch/arm/mach-zynqmp-r5/
|
||||
|
||||
ARM PHYTIUM
|
||||
@@ -661,14 +639,14 @@ F: tools/buildman/
|
||||
CFI FLASH
|
||||
M: Stefan Roese <sr@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-cfi-flash.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-cfi-flash.git
|
||||
F: drivers/mtd/cfi_flash.c
|
||||
F: drivers/mtd/jedec_flash.c
|
||||
|
||||
CLOCK
|
||||
M: Lukasz Majewski <lukma@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-clk.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-clk.git
|
||||
F: drivers/clk/
|
||||
F: drivers/clk/imx/
|
||||
|
||||
@@ -676,21 +654,20 @@ COLDFIRE
|
||||
M: Huan Wang <alison.wang@nxp.com>
|
||||
M: Angelo Dureghello <angelo@sysam.it>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-coldfire.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-coldfire.git
|
||||
F: arch/m68k/
|
||||
F: doc/arch/m68k.rst
|
||||
|
||||
DFU
|
||||
M: Lukasz Majewski <lukma@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-dfu.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-dfu.git
|
||||
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/
|
||||
F: drivers/usb/gadget/
|
||||
F: include/dfu.h
|
||||
@@ -698,30 +675,19 @@ F: include/dfu.h
|
||||
DRIVER MODEL
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-dm.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-dm.git
|
||||
F: doc/driver-model/
|
||||
F: drivers/core/
|
||||
F: include/dm/
|
||||
F: test/dm/
|
||||
|
||||
EFI APP
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
M: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
S: Maintained
|
||||
W: https://u-boot.readthedocs.io/en/latest/develop/uefi/u-boot_on_efi.html
|
||||
F: board/efi/efi-x86_app
|
||||
F: configs/efi-x86_app*
|
||||
F: doc/develop/uefi/u-boot_on_efi.rst
|
||||
F: lib/efi/efi_app.c
|
||||
F: scripts/build-efi.sh
|
||||
|
||||
EFI PAYLOAD
|
||||
M: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
R: Alexander Graf <agraf@csgraf.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-efi.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-efi.git
|
||||
F: doc/api/efi.rst
|
||||
F: doc/develop/uefi/*
|
||||
F: doc/uefi/*
|
||||
F: doc/usage/bootefi.rst
|
||||
F: drivers/rtc/emul_rtc.c
|
||||
F: include/capitalization.h
|
||||
@@ -742,7 +708,6 @@ F: cmd/efidebug.c
|
||||
F: cmd/nvedit_efi.c
|
||||
F: tools/efivar.py
|
||||
F: tools/file2include.c
|
||||
F: tools/mkeficapsule.c
|
||||
|
||||
EFI VARIABLES VIA OP-TEE
|
||||
M: Ilias Apalodimas <ilias.apalodimas@linaro.org>
|
||||
@@ -763,7 +728,7 @@ F: tools/mkenvimage.c
|
||||
FPGA
|
||||
M: Michal Simek <michal.simek@xilinx.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
F: drivers/fpga/
|
||||
F: cmd/fpga.c
|
||||
F: include/fpga.h
|
||||
@@ -771,47 +736,36 @@ F: include/fpga.h
|
||||
FLATTENED DEVICE TREE
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-fdt.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-fdt.git
|
||||
F: lib/fdtdec*
|
||||
F: lib/libfdt/
|
||||
F: include/fdt*
|
||||
F: include/linux/libfdt*
|
||||
F: cmd/fdt.c
|
||||
F: common/fdt_support.c
|
||||
F: scripts/dtc-version.sh
|
||||
|
||||
FREEBSD
|
||||
M: Rafal Jaworowski <raj@semihalf.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-freebsd.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-freebsd.git
|
||||
|
||||
FREESCALE QORIQ
|
||||
M: Priyanka Jain <priyanka.jain@nxp.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq.git
|
||||
F: drivers/watchdog/sp805_wdt.c
|
||||
F: drivers/watchdog/sbsa_gwdt.c
|
||||
|
||||
I2C
|
||||
M: Heiko Schocher <hs@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-i2c.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-i2c.git
|
||||
F: drivers/i2c/
|
||||
|
||||
KWBIMAGE / KWBOOT TOOLS
|
||||
M: Pali Rohár <pali@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
|
||||
F: doc/README.kwbimage
|
||||
F: doc/kwboot.1
|
||||
F: tools/kwb*
|
||||
|
||||
LOGGING
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/u-boot.git
|
||||
T: git https://gitlab.denx.de/u-boot/u-boot.git
|
||||
F: common/log*
|
||||
F: cmd/log.c
|
||||
F: doc/develop/logging.rst
|
||||
@@ -830,7 +784,7 @@ F: drivers/i2c/i2c-versatile.c
|
||||
MICROBLAZE
|
||||
M: Michal Simek <monstr@monstr.eu>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git
|
||||
F: arch/microblaze/
|
||||
F: cmd/mfsl.c
|
||||
F: drivers/gpio/xilinx_gpio.c
|
||||
@@ -845,7 +799,7 @@ N: xilinx
|
||||
MIPS
|
||||
M: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-mips.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-mips.git
|
||||
F: arch/mips/
|
||||
|
||||
MIPS CORTINA ACCESS CAxxxx
|
||||
@@ -921,28 +875,27 @@ F: arch/mips/dts/mrvl,cn73xx.dtsi
|
||||
|
||||
MMC
|
||||
M: Peng Fan <peng.fan@nxp.com>
|
||||
M: Jaehoon Chung <jh80.chung@samsung.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-mmc.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-mmc.git
|
||||
F: drivers/mmc/
|
||||
|
||||
NAND FLASH
|
||||
#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
|
||||
T: git https://gitlab.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
|
||||
T: git https://gitlab.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>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-net.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-net.git
|
||||
F: drivers/net/
|
||||
F: include/net.h
|
||||
F: net/
|
||||
@@ -950,40 +903,15 @@ F: net/
|
||||
NIOS
|
||||
M: Thomas Chou <thomas@wytron.com.tw>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-nios.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-nios.git
|
||||
F: arch/nios2/
|
||||
|
||||
NVMe
|
||||
M: Bin Meng <bmeng.cn@gmail.com>
|
||||
S: Maintained
|
||||
F: drivers/nvme/
|
||||
F: cmd/nvme.c
|
||||
F: include/nvme.h
|
||||
F: doc/develop/driver-model/nvme.rst
|
||||
|
||||
NXP C45 TJA11XX PHY DRIVER
|
||||
M: Radu Pirea <radu-nicolae.pirea@oss.nxp.com>
|
||||
S: Maintained
|
||||
F: drivers/net/phy/nxp-c45-tja11xx.c
|
||||
|
||||
ONENAND
|
||||
#M: Lukasz Majewski <l.majewski@majess.pl>
|
||||
S: Orphaned (Since 2017-01)
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-onenand.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-onenand.git
|
||||
F: drivers/mtd/onenand/
|
||||
|
||||
OUT4-IMX6ULL-NANO BOARD
|
||||
M: Oleh Kravchenko <oleg@kaa.org.ua>
|
||||
S: Maintained
|
||||
T: git https://github.com/Oleh-Kravchenko/u-boot-out4.git
|
||||
F: arch/arm/dts/ev-imx280-nano-x-mb.dts
|
||||
F: arch/arm/dts/o4-imx-nano.dts
|
||||
F: arch/arm/dts/o4-imx6ull-nano.dtsi
|
||||
F: board/out4
|
||||
F: configs/ev-imx280-nano-x-mb_defconfig
|
||||
F: configs/o4-imx6ull-nano_defconfig
|
||||
F: include/configs/o4-imx6ull-nano.h
|
||||
|
||||
PATMAN
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
@@ -1003,7 +931,7 @@ F: drivers/pci/pci_mpc85xx.c
|
||||
POWER
|
||||
M: Jaehoon Chung <jh80.chung@samsung.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-pmic.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-pmic.git
|
||||
F: drivers/power/
|
||||
|
||||
POWERPC
|
||||
@@ -1012,15 +940,15 @@ S: Maintained
|
||||
F: arch/powerpc/
|
||||
|
||||
POWERPC MPC8XX
|
||||
M: Christophe Leroy <christophe.leroy@csgroup.eu>
|
||||
M: Christophe Leroy <christophe.leroy@c-s.fr>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-mpc8xx.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-mpc8xx.git
|
||||
F: arch/powerpc/cpu/mpc8xx/
|
||||
|
||||
POWERPC MPC83XX
|
||||
M: Mario Six <mario.six@gdsys.cc>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-mpc83xx.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-mpc83xx.git
|
||||
F: drivers/ram/mpc83xx_sdram.c
|
||||
F: include/dt-bindings/memory/mpc83xx-sdram.h
|
||||
F: drivers/sysreset/sysreset_mpc83xx.c
|
||||
@@ -1038,18 +966,22 @@ F: arch/powerpc/include/asm/arch-mpc83xx/
|
||||
POWERPC MPC85XX
|
||||
M: Priyanka Jain <priyanka.jain@nxp.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-mpc85xx.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx.git
|
||||
F: arch/powerpc/cpu/mpc85xx/
|
||||
|
||||
POWERPC MPC86XX
|
||||
M: Priyanka Jain <priyanka.jain@nxp.com>
|
||||
S: Maintained
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-mpc86xx.git
|
||||
F: arch/powerpc/cpu/mpc86xx/
|
||||
|
||||
RISC-V
|
||||
M: Rick Chen <rick@andestech.com>
|
||||
M: Leo <ycliang@andestech.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-riscv.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-riscv.git
|
||||
F: arch/riscv/
|
||||
F: cmd/riscv/
|
||||
F: doc/usage/sbi.rst
|
||||
F: drivers/sysreset/sysreset_sbi.c
|
||||
F: drivers/timer/andes_plmt_timer.c
|
||||
F: drivers/timer/sifive_clint_timer.c
|
||||
F: tools/prelink-riscv.c
|
||||
@@ -1059,8 +991,8 @@ M: Sean Anderson <seanga2@gmail.com>
|
||||
S: Maintained
|
||||
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: drivers/clk/kendryte/
|
||||
F: drivers/pinctrl/kendryte/
|
||||
F: include/kendryte/
|
||||
|
||||
RNG
|
||||
@@ -1087,23 +1019,17 @@ F: arch/sandbox/
|
||||
F: doc/arch/sandbox.rst
|
||||
F: include/dt-bindings/*/sandbox*.h
|
||||
|
||||
SETEXPR
|
||||
M: Roland Gaudig <roland.gaudig@weidmueller.com>
|
||||
S: Maintained
|
||||
F: cmd/printf.c
|
||||
F: doc/usage/setexpr.rst
|
||||
|
||||
SH
|
||||
M: Marek Vasut <marek.vasut+renesas@gmail.com>
|
||||
M: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-sh.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-sh.git
|
||||
F: arch/sh/
|
||||
|
||||
SPI
|
||||
M: Jagan Teki <jagan@amarulasolutions.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-spi.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-spi.git
|
||||
F: drivers/spi/
|
||||
F: include/spi*
|
||||
|
||||
@@ -1132,13 +1058,6 @@ F: include/sqfs.h
|
||||
F: cmd/sqfs.c
|
||||
F: test/py/tests/test_fs/test_squashfs/
|
||||
|
||||
STACKPROTECTOR
|
||||
M: Joel Peshkin <joel.peshkin@broadcom.com>
|
||||
S: Maintained
|
||||
F: common/stackprot.c
|
||||
F: cmd/stackprot_test.c
|
||||
F: test/py/tests/test_stackprotector.py
|
||||
|
||||
TARGET_BCMNS3
|
||||
M: Bharat Gooty <bharat.gooty@broadcom.com>
|
||||
M: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
|
||||
@@ -1187,11 +1106,6 @@ F: configs/am65x_hs_evm_a53_defconfig
|
||||
F: configs/j721e_hs_evm_r5_defconfig
|
||||
F: configs/j721e_hs_evm_a72_defconfig
|
||||
|
||||
TPM DRIVERS
|
||||
M: Ilias Apalodimas <ilias.apalodimas@linaro.org>
|
||||
S: Maintained
|
||||
F: drivers/tpm/
|
||||
|
||||
TQ GROUP
|
||||
#M: Martin Krause <martin.krause@tq-systems.de>
|
||||
S: Orphaned (Since 2016-02)
|
||||
@@ -1213,7 +1127,7 @@ UBI
|
||||
M: Kyungmin Park <kmpark@infradead.org>
|
||||
M: Heiko Schocher <hs@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-ubi.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-ubi.git
|
||||
F: drivers/mtd/ubi/
|
||||
|
||||
UFS
|
||||
@@ -1224,7 +1138,7 @@ F: drivers/ufs/
|
||||
USB
|
||||
M: Marek Vasut <marex@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-usb.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-usb.git
|
||||
F: drivers/usb/
|
||||
F: common/usb.c
|
||||
F: common/usb_kbd.c
|
||||
@@ -1233,36 +1147,24 @@ F: include/usb.h
|
||||
USB xHCI
|
||||
M: Bin Meng <bmeng.cn@gmail.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-usb.git topic-xhci
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-usb.git topic-xhci
|
||||
F: drivers/usb/host/xhci*
|
||||
F: include/usb/xhci.h
|
||||
|
||||
VIDEO
|
||||
M: Anatolij Gustschin <agust@denx.de>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-video.git
|
||||
T: git https://gitlab.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
|
||||
M: Bin Meng <bmeng.cn@gmail.com>
|
||||
S: Maintained
|
||||
F: drivers/virtio/
|
||||
F: cmd/virtio.c
|
||||
F: include/config/virtio/
|
||||
F: include/config/virtio.h
|
||||
F: include/config/cmd/virtio.h
|
||||
F: include/virtio*.h
|
||||
F: test/dm/virtio.c
|
||||
F: doc/develop/driver-model/virtio.rst
|
||||
|
||||
X86
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
M: Bin Meng <bmeng.cn@gmail.com>
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/custodians/u-boot-x86.git
|
||||
T: git https://gitlab.denx.de/u-boot/custodians/u-boot-x86.git
|
||||
F: arch/x86/
|
||||
F: cmd/x86/
|
||||
|
||||
@@ -1292,7 +1194,7 @@ M: Tom Rini <trini@konsulko.com>
|
||||
L: u-boot@lists.denx.de
|
||||
Q: http://patchwork.ozlabs.org/project/uboot/list/
|
||||
S: Maintained
|
||||
T: git https://source.denx.de/u-boot/u-boot.git
|
||||
T: git https://gitlab.denx.de/u-boot/u-boot.git
|
||||
F: configs/tools-only_defconfig
|
||||
F: *
|
||||
F: */
|
||||
|
||||
478
Makefile
478
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
VERSION = 2022
|
||||
PATCHLEVEL = 01
|
||||
VERSION = 2021
|
||||
PATCHLEVEL = 04
|
||||
SUBLEVEL =
|
||||
EXTRAVERSION = -rc2
|
||||
NAME =
|
||||
@@ -12,17 +12,14 @@ NAME =
|
||||
# Comments in this file are targeted only to the developer, do not
|
||||
# expect to learn how to build the kernel reading this file.
|
||||
|
||||
# Do not use make's built-in rules and variables
|
||||
# (this increases performance and avoids hard-to-debug behaviour)
|
||||
MAKEFLAGS += -rR
|
||||
# o Do not use make's built-in rules and variables
|
||||
# (this increases performance and avoids hard-to-debug behaviour);
|
||||
# o Look for make include files relative to root of kernel src
|
||||
MAKEFLAGS += -rR --include-dir=$(CURDIR)
|
||||
|
||||
# Determine target architecture for the sandbox
|
||||
# Determine host architecture
|
||||
include include/host_arch.h
|
||||
ifeq ("", "$(CROSS_COMPILE)")
|
||||
MK_ARCH="${shell uname -m}"
|
||||
else
|
||||
MK_ARCH="${shell echo $(CROSS_COMPILE) | sed -n 's/^\s*\([^\/]*\/\)*\([^-]*\)-\S*/\2/p'}"
|
||||
endif
|
||||
MK_ARCH="${shell uname -m}"
|
||||
unexport HOST_ARCH
|
||||
ifeq ("x86_64", $(MK_ARCH))
|
||||
export HOST_ARCH=$(HOST_ARCH_X86_64)
|
||||
@@ -30,7 +27,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" "armv7l"))
|
||||
else ifeq ("armv7l", $(MK_ARCH))
|
||||
export HOST_ARCH=$(HOST_ARCH_ARM)
|
||||
else ifeq ("riscv32", $(MK_ARCH))
|
||||
export HOST_ARCH=$(HOST_ARCH_RISCV32)
|
||||
@@ -161,13 +158,6 @@ KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
|
||||
$(if $(KBUILD_OUTPUT),, \
|
||||
$(error failed to create output directory "$(saved-output)"))
|
||||
|
||||
# Look for make include files relative to root of kernel src
|
||||
#
|
||||
# This does not become effective immediately because MAKEFLAGS is re-parsed
|
||||
# once after the Makefile is read. It is OK since we are going to invoke
|
||||
# 'sub-make' below.
|
||||
MAKEFLAGS += --include-dir=$(CURDIR)
|
||||
|
||||
PHONY += $(MAKECMDGOALS) sub-make
|
||||
|
||||
$(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
|
||||
@@ -299,7 +289,9 @@ KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
|
||||
# have older compilers as their default, so we make it explicit for
|
||||
# these that our host tools are GNU11 (i.e. C11 w/ GNU extensions).
|
||||
CSTD_FLAG := -std=gnu11
|
||||
ifeq ($(HOSTOS),linux)
|
||||
KBUILD_HOSTCFLAGS += $(CSTD_FLAG)
|
||||
endif
|
||||
|
||||
ifeq ($(HOSTOS),cygwin)
|
||||
KBUILD_HOSTCFLAGS += -ansi
|
||||
@@ -325,14 +317,19 @@ os_x_before = $(shell if [ $(DARWIN_MAJOR_VERSION) -le $(1) -a \
|
||||
$(DARWIN_MINOR_VERSION) -le $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;)
|
||||
|
||||
os_x_after = $(shell if [ $(DARWIN_MAJOR_VERSION) -ge $(1) -a \
|
||||
$(DARWIN_MINOR_VERSION) -ge $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;)
|
||||
$(DARWIN_MINOR_VERSION) -ge $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;)
|
||||
|
||||
# Snow Leopards build environment has no longer restrictions as described above
|
||||
HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc")
|
||||
KBUILD_HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp")
|
||||
KBUILD_HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress")
|
||||
|
||||
# macOS Mojave (10.14.X)
|
||||
# since Lion (10.7) ASLR is on by default, but we use linker generated lists
|
||||
# in some host tools which is a problem then ... so disable ASLR for these
|
||||
# tools
|
||||
KBUILD_HOSTLDFLAGS += $(call os_x_before, 10, 7, "", "-Xlinker -no_pie")
|
||||
|
||||
# macOS Mojave (10.14.X)
|
||||
# Undefined symbols for architecture x86_64: "_PyArg_ParseTuple"
|
||||
KBUILD_HOSTLDFLAGS += $(call os_x_after, 10, 14, "-lpython -dynamclib", "")
|
||||
endif
|
||||
@@ -412,14 +409,8 @@ AWK = awk
|
||||
PERL = perl
|
||||
PYTHON ?= python
|
||||
PYTHON2 = python2
|
||||
PYTHON3 ?= python3
|
||||
|
||||
# The devicetree compiler and pylibfdt are automatically built unless DTC is
|
||||
# provided. If DTC is provided, it is assumed the pylibfdt is available too.
|
||||
DTC_INTREE := $(objtree)/scripts/dtc/dtc
|
||||
DTC ?= $(DTC_INTREE)
|
||||
DTC_MIN_VERSION := 010406
|
||||
|
||||
PYTHON3 = python3
|
||||
DTC ?= $(objtree)/scripts/dtc/dtc
|
||||
CHECK = sparse
|
||||
|
||||
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
|
||||
@@ -502,7 +493,8 @@ PHONY += outputmakefile
|
||||
outputmakefile:
|
||||
ifneq ($(KBUILD_SRC),)
|
||||
$(Q)ln -fsn $(srctree) source
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
|
||||
$(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
|
||||
endif
|
||||
|
||||
# To make sure we do not include .config for any of the *config targets
|
||||
@@ -581,7 +573,7 @@ else
|
||||
# Carefully list dependencies so we do not try to build scripts twice
|
||||
# in parallel
|
||||
PHONY += scripts
|
||||
scripts: scripts_basic scripts_dtc include/config/auto.conf
|
||||
scripts: scripts_basic include/config/auto.conf
|
||||
$(Q)$(MAKE) $(build)=$(@)
|
||||
|
||||
ifeq ($(dot-config),1)
|
||||
@@ -685,49 +677,12 @@ else
|
||||
KBUILD_CFLAGS += -O2
|
||||
endif
|
||||
|
||||
LTO_CFLAGS :=
|
||||
LTO_FINAL_LDFLAGS :=
|
||||
export LTO_CFLAGS LTO_FINAL_LDFLAGS
|
||||
ifdef CONFIG_LTO
|
||||
ifeq ($(cc-name),clang)
|
||||
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 += -flto=$(NPROC)
|
||||
LTO_FINAL_LDFLAGS += -fuse-linker-plugin -flto=$(NPROC)
|
||||
|
||||
# use plugin aware tools
|
||||
AR = $(CROSS_COMPILE)gcc-ar
|
||||
NM = $(CROSS_COMPILE)gcc-nm
|
||||
endif
|
||||
|
||||
CFLAGS_NON_EFI += $(LTO_CFLAGS)
|
||||
|
||||
KBUILD_CFLAGS += $(LTO_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STACKPROTECTOR),y)
|
||||
KBUILD_CFLAGS += $(call cc-option,-fstack-protector-strong)
|
||||
CFLAGS_EFI += $(call cc-option,-fno-stack-protector)
|
||||
else
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
|
||||
endif
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks)
|
||||
|
||||
# disable pointer signed / unsigned warnings in gcc 4.0
|
||||
KBUILD_CFLAGS += -Wno-pointer-sign
|
||||
|
||||
# disable stringop warnings in gcc 8+
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
|
||||
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, zero-length-bounds)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, array-bounds)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-overflow)
|
||||
|
||||
# Enabled with W=2, disabled by default as noisy
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized)
|
||||
|
||||
@@ -751,7 +706,7 @@ endif
|
||||
KBUILD_CFLAGS += $(call cc-option,-Wno-format-nonliteral)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
|
||||
|
||||
ifdef CONFIG_CC_IS_CLANG
|
||||
ifeq ($(cc-name),clang)
|
||||
KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
|
||||
@@ -763,11 +718,12 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
|
||||
# See modpost pattern 2
|
||||
KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
|
||||
KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
|
||||
endif
|
||||
else
|
||||
|
||||
# These warnings generated too much noise in a regular build.
|
||||
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
|
||||
endif
|
||||
|
||||
# Prohibit date/time macros, which would make the build non-deterministic
|
||||
KBUILD_CFLAGS += $(call cc-option,-Werror=date-time)
|
||||
@@ -806,27 +762,36 @@ c_flags := $(KBUILD_CFLAGS) $(cpp_flags)
|
||||
|
||||
HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n)
|
||||
|
||||
libs-$(CONFIG_API) += api/
|
||||
libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
|
||||
libs-y += boot/
|
||||
libs-y += cmd/
|
||||
libs-y += common/
|
||||
libs-$(CONFIG_OF_EMBED) += dts/
|
||||
libs-y += env/
|
||||
libs-y += lib/
|
||||
libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
|
||||
libs-$(CONFIG_OF_EMBED) += dts/
|
||||
libs-y += fs/
|
||||
libs-y += net/
|
||||
libs-y += disk/
|
||||
libs-y += drivers/
|
||||
libs-y += drivers/dma/
|
||||
libs-y += drivers/gpio/
|
||||
libs-y += drivers/i2c/
|
||||
libs-y += drivers/net/
|
||||
libs-y += drivers/net/phy/
|
||||
libs-y += drivers/power/ \
|
||||
drivers/power/domain/ \
|
||||
drivers/power/fuel_gauge/ \
|
||||
drivers/power/mfd/ \
|
||||
drivers/power/pmic/ \
|
||||
drivers/power/battery/ \
|
||||
drivers/power/regulator/
|
||||
libs-y += drivers/spi/
|
||||
libs-$(CONFIG_FMAN_ENET) += drivers/net/fm/
|
||||
libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/
|
||||
libs-$(CONFIG_SYS_FSL_MMDC) += drivers/ddr/fsl/
|
||||
libs-$(CONFIG_$(SPL_)ALTERA_SDRAM) += drivers/ddr/altera/
|
||||
libs-y += drivers/serial/
|
||||
libs-y += drivers/usb/cdns3/
|
||||
libs-y += drivers/usb/dwc3/
|
||||
libs-y += drivers/usb/common/
|
||||
libs-y += drivers/usb/emul/
|
||||
libs-y += drivers/usb/eth/
|
||||
libs-$(CONFIG_USB_DEVICE) += drivers/usb/gadget/
|
||||
libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/
|
||||
libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/udc/
|
||||
libs-y += drivers/usb/host/
|
||||
@@ -835,6 +800,10 @@ libs-y += drivers/usb/musb/
|
||||
libs-y += drivers/usb/musb-new/
|
||||
libs-y += drivers/usb/phy/
|
||||
libs-y += drivers/usb/ulpi/
|
||||
libs-y += cmd/
|
||||
libs-y += common/
|
||||
libs-y += env/
|
||||
libs-$(CONFIG_API) += api/
|
||||
ifdef CONFIG_POST
|
||||
libs-y += post/
|
||||
endif
|
||||
@@ -944,11 +913,10 @@ endif
|
||||
endif
|
||||
INPUTS-$(CONFIG_TPL) += tpl/u-boot-tpl.bin
|
||||
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
|
||||
INPUTS-$(CONFIG_SANDBOX) += u-boot.dtb
|
||||
INPUTS-$(CONFIG_OF_HOSTFILE) += u-boot.dtb
|
||||
ifneq ($(CONFIG_SPL_TARGET),)
|
||||
INPUTS-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%)
|
||||
endif
|
||||
@@ -998,11 +966,6 @@ LDFLAGS_u-boot += $(LDFLAGS_FINAL)
|
||||
# Avoid 'Not enough room for program headers' error on binutils 2.28 onwards.
|
||||
LDFLAGS_u-boot += $(call ld-option, --no-dynamic-linker)
|
||||
|
||||
# ld.lld support
|
||||
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_SYS_TEXT_BASE)
|
||||
endif
|
||||
@@ -1053,33 +1016,6 @@ 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)))
|
||||
|
||||
# expected value 'y for each one
|
||||
expect = $(foreach cfg,$(1),y)
|
||||
|
||||
# Show a deprecation message
|
||||
# Args:
|
||||
# 1: List of CONFIG_DM_... to migrate to (e.g. "CONFIG_DM_MMC CONFIG_BLK")
|
||||
# 2: Name of component (e.g . "Ethernet drivers")
|
||||
# 3: Release deadline (e.g. "v202.07")
|
||||
# 4: Condition to require before checking (e.g. "$(CONFIG_NET)")
|
||||
# Note: Script avoids bash construct, hence the strange double 'if'
|
||||
# (patches welcome!)
|
||||
define deprecated
|
||||
@if [ -n "$(strip $(4))" ]; then if [ "$(got)" != "$(expect)" ]; then \
|
||||
echo >&2 "===================== WARNING ======================"; \
|
||||
echo >&2 "This board does not use $(firstword $(1)) (Driver Model"; \
|
||||
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/driver-model/migration.rst for more info."; \
|
||||
echo >&2 "===================================================="; \
|
||||
fi; fi
|
||||
|
||||
endef
|
||||
|
||||
PHONY += inputs
|
||||
inputs: $(INPUTS-y)
|
||||
|
||||
@@ -1094,21 +1030,11 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_DEPRECATED),y)
|
||||
$(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.")
|
||||
ifeq ($(CONFIG_SPI),y)
|
||||
ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy)
|
||||
$(warning "The relevant config item with associated code will remove in v2019.07 release.")
|
||||
endif
|
||||
ifeq ($(CONFIG_OF_EMBED)$(CONFIG_EFI_APP),y)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@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/README.fdt-control for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
ifneq ($(CONFIG_SPL_FIT_GENERATOR),)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@echo >&2 "This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate"
|
||||
@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 ======================"
|
||||
@@ -1118,10 +1044,114 @@ ifneq ($(CONFIG_DM),y)
|
||||
@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))
|
||||
ifeq ($(CONFIG_MMC),y)
|
||||
ifneq ($(CONFIG_DM_MMC)$(CONFIG_BLK),yy)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@echo >&2 "This board does not use CONFIG_DM_MMC. Please update"
|
||||
@echo >&2 "the board to use CONFIG_DM_MMC before the v2019.04 release."
|
||||
@echo >&2 "Failure to update by the deadline may result in board removal."
|
||||
@echo >&2 "See doc/driver-model/migration.rst for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CONFIG_USB),y)
|
||||
ifneq ($(CONFIG_DM_USB)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@echo >&2 "This board does not use CONFIG_DM_USB. Please update"
|
||||
@echo >&2 "the board to use CONFIG_DM_USB before the v2019.07 release."
|
||||
@echo >&2 "Failure to update by the deadline may result in board removal."
|
||||
@echo >&2 "See doc/driver-model/migration.rst for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CONFIG_MVSATA_IDE),y)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@echo >&2 "This board does use CONFIG_MVSATA_IDE which is not"
|
||||
@echo >&2 "ported to driver-model (DM) yet. Please update the storage"
|
||||
@echo >&2 "controller driver to use CONFIG_AHCI before the v2019.07"
|
||||
@echo >&2 "release."
|
||||
@echo >&2 "Failure to update by the deadline may result in board removal."
|
||||
@echo >&2 "See doc/driver-model/migration.rst for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
ifeq ($(CONFIG_LIBATA),y)
|
||||
ifneq ($(CONFIG_AHCI),y)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@echo >&2 "This board does use CONFIG_LIBATA but has CONFIG_AHCI not"
|
||||
@echo >&2 "enabled. Please update the storage controller driver to use"
|
||||
@echo >&2 "CONFIG_AHCI before the v2019.07 release."
|
||||
@echo >&2 "Failure to update by the deadline may result in board removal."
|
||||
@echo >&2 "See doc/driver-model/migration.rst for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CONFIG_PCI),y)
|
||||
ifneq ($(CONFIG_DM_PCI),y)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@echo >&2 "This board does not use CONFIG_DM_PCI Please update"
|
||||
@echo >&2 "the board to use CONFIG_DM_PCI before the v2019.07 release."
|
||||
@echo >&2 "Failure to update by the deadline may result in board removal."
|
||||
@echo >&2 "See doc/driver-model/migration.rst for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONFIG_LCD)$(CONFIG_VIDEO),)
|
||||
ifneq ($(CONFIG_DM_VIDEO),y)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@echo >&2 "This board does not use CONFIG_DM_VIDEO Please update"
|
||||
@echo >&2 "the board to use CONFIG_DM_VIDEO before the v2019.07 release."
|
||||
@echo >&2 "Failure to update by the deadline may result in board removal."
|
||||
@echo >&2 "See doc/driver-model/migration.rst for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CONFIG_OF_EMBED),y)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@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/README.fdt-control for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
ifeq ($(CONFIG_SPI_FLASH),y)
|
||||
ifneq ($(CONFIG_DM_SPI_FLASH)$(CONFIG_OF_CONTROL),yy)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@echo >&2 "This board does not use CONFIG_DM_SPI_FLASH. Please update"
|
||||
@echo >&2 "the board to use CONFIG_SPI_FLASH before the v2019.07 release."
|
||||
@echo >&2 "Failure to update by the deadline may result in board removal."
|
||||
@echo >&2 "See doc/driver-model/migration.rst for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG),)
|
||||
ifneq ($(CONFIG_WDT),y)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@echo >&2 "This board does not use CONFIG_WDT (DM watchdog support)."
|
||||
@echo >&2 "Please update the board to use CONFIG_WDT before the"
|
||||
@echo >&2 "v2019.10 release."
|
||||
@echo >&2 "Failure to update by the deadline may result in board removal."
|
||||
@echo >&2 "See doc/driver-model/migration.rst for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONFIG_NET),)
|
||||
ifneq ($(CONFIG_DM_ETH),y)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@echo >&2 "This board does not use CONFIG_DM_ETH (Driver Model"
|
||||
@echo >&2 "for Ethernet drivers). Please update the board to use"
|
||||
@echo >&2 "CONFIG_DM_ETH before the v2020.07 release. Failure to"
|
||||
@echo >&2 "update by the deadline may result in board removal."
|
||||
@echo >&2 "See doc/driver-model/migration.rst for more info."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONFIG_SPL_FIT_GENERATOR),)
|
||||
@echo >&2 "===================== WARNING ======================"
|
||||
@echo >&2 "This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate"
|
||||
@echo >&2 "to binman instead, to avoid the proliferation of"
|
||||
@echo >&2 "arch-specific scripts with no tests."
|
||||
@echo >&2 "===================================================="
|
||||
endif
|
||||
@# 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.
|
||||
@@ -1163,8 +1193,6 @@ MKIMAGEFLAGS_fit-dtb.blob = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
|
||||
-a 0 -e 0 -E \
|
||||
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) -d /dev/null
|
||||
|
||||
MKIMAGEFLAGS_fit-dtb.blob += -B 0x8
|
||||
|
||||
ifneq ($(EXT_DTB),)
|
||||
u-boot-fit-dtb.bin: u-boot-nodtb.bin $(EXT_DTB)
|
||||
$(call if_changed,cat)
|
||||
@@ -1235,6 +1263,11 @@ OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \
|
||||
$(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) \
|
||||
$(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),-R .bootpg -R .resetvec)
|
||||
|
||||
OBJCOPYFLAGS_u-boot-spl.hex = $(OBJCOPYFLAGS_u-boot.hex)
|
||||
|
||||
spl/u-boot-spl.hex: spl/u-boot-spl FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
binary_size_check: u-boot-nodtb.bin FORCE
|
||||
@file_size=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \
|
||||
map_size=$(shell cat u-boot.map | \
|
||||
@@ -1297,9 +1330,7 @@ u-boot.ldr: u-boot
|
||||
# binman
|
||||
# ---------------------------------------------------------------------------
|
||||
# Use 'make BINMAN_DEBUG=1' to enable debugging
|
||||
# Use 'make BINMAN_VERBOSE=3' to set vebosity level
|
||||
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) \
|
||||
--toolpath $(objtree)/tools \
|
||||
@@ -1308,13 +1339,8 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
|
||||
-I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
|
||||
-I arch/$(ARCH)/dts -a of-list=$(CONFIG_OF_LIST) \
|
||||
-a atf-bl31-path=${BL31} \
|
||||
-a opensbi-path=${OPENSBI} \
|
||||
-a default-dt=$(default_dt) \
|
||||
-a scp-path=$(SCP) \
|
||||
-a spl-bss-pad=$(if $(CONFIG_SPL_SEPARATE_BSS),,1) \
|
||||
-a tpl-bss-pad=$(if $(CONFIG_TPL_SEPARATE_BSS),,1) \
|
||||
-a spl-dtb=$(CONFIG_SPL_OF_REAL) \
|
||||
-a tpl-dtb=$(CONFIG_TPL_OF_REAL) \
|
||||
$(BINMAN_$(@F))
|
||||
|
||||
OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex
|
||||
@@ -1343,6 +1369,9 @@ $(U_BOOT_ITS): $(subst ",,$(CONFIG_SPL_FIT_SOURCE))
|
||||
else
|
||||
ifneq ($(CONFIG_USE_SPL_FIT_GENERATOR),)
|
||||
U_BOOT_ITS := u-boot.its
|
||||
ifeq ($(CONFIG_SPL_FIT_GENERATOR),"arch/arm/mach-imx/mkimage_fit_atf.sh")
|
||||
U_BOOT_ITS_DEPS += u-boot-nodtb.bin
|
||||
endif
|
||||
ifeq ($(CONFIG_SPL_FIT_GENERATOR),"arch/arm/mach-rockchip/make_fit_atf.py")
|
||||
U_BOOT_ITS_DEPS += u-boot
|
||||
endif
|
||||
@@ -1411,7 +1440,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)$(CONFIG_BINMAN_STANDALONE_FDT),dts/dt.dtb) \
|
||||
$(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_OF_HOSTFILE),dts/dt.dtb) \
|
||||
,$(UBOOT_BIN)) FORCE
|
||||
$(call if_changed,mkimage)
|
||||
$(BOARD_SIZE_CHECK)
|
||||
@@ -1421,17 +1450,16 @@ MKIMAGEFLAGS_u-boot.itb =
|
||||
else
|
||||
MKIMAGEFLAGS_u-boot.itb = -E
|
||||
endif
|
||||
MKIMAGEFLAGS_u-boot.itb += -B 0x8
|
||||
|
||||
ifdef U_BOOT_ITS
|
||||
u-boot.itb: u-boot-nodtb.bin \
|
||||
$(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SANDBOX),dts/dt.dtb) \
|
||||
$(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_OF_HOSTFILE),dts/dt.dtb) \
|
||||
$(U_BOOT_ITS) FORCE
|
||||
$(call if_changed,mkfitimage)
|
||||
$(BOARD_SIZE_CHECK)
|
||||
endif
|
||||
|
||||
u-boot-spl.kwb: u-boot.bin spl/u-boot-spl.bin FORCE
|
||||
u-boot-spl.kwb: u-boot.img spl/u-boot-spl.bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
|
||||
u-boot.sha1: u-boot.bin
|
||||
@@ -1514,21 +1542,12 @@ u-boot.cnt: u-boot.bin FORCE
|
||||
flash.bin: spl/u-boot-spl.bin u-boot.cnt FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
|
||||
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
|
||||
|
||||
u-boot.uim: u-boot.bin FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
|
||||
|
||||
u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL $(if $(CONFIG_OF_SEPARATE),u-boot.img,u-boot.uim) FORCE
|
||||
u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL u-boot.bin FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
|
||||
|
||||
MKIMAGEFLAGS_u-boot.ubl = -n $(UBL_CONFIG) -T ublimage -e $(CONFIG_SYS_TEXT_BASE)
|
||||
@@ -1551,11 +1570,22 @@ u-boot-signed.sb: u-boot.bin spl/u-boot-spl.bin
|
||||
u-boot.sb: u-boot.bin spl/u-boot-spl.bin
|
||||
$(Q)$(MAKE) $(build)=arch/arm/cpu/arm926ejs/mxs u-boot.sb
|
||||
|
||||
# On x600 (SPEAr600) U-Boot is appended to U-Boot SPL.
|
||||
# Both images are created using mkimage (crc etc), so that the ROM
|
||||
# bootloader can check its integrity. Padding needs to be done to the
|
||||
# SPL image (with mkimage header) and not the binary. Otherwise the resulting image
|
||||
# which is loaded/copied by the ROM bootloader to SRAM doesn't fit.
|
||||
# The resulting image containing both U-Boot images is called u-boot.spr
|
||||
MKIMAGEFLAGS_u-boot-spl.img = -A $(ARCH) -T firmware -C none \
|
||||
-a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) -n XLOADER
|
||||
spl/u-boot-spl.img: spl/u-boot-spl.bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
|
||||
OBJCOPYFLAGS_u-boot.spr = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \
|
||||
--gap-fill=0xff
|
||||
u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE
|
||||
$(call if_changed,pad_cat)
|
||||
|
||||
ifneq ($(CONFIG_ARCH_SOCFPGA),)
|
||||
quiet_cmd_gensplx4 = GENSPLX4 $@
|
||||
cmd_gensplx4 = $(OBJCOPY) -I binary -O binary --gap-fill=0x0 \
|
||||
@@ -1698,9 +1728,6 @@ u-boot-elf.lds: arch/u-boot-elf.lds prepare FORCE
|
||||
|
||||
ifeq ($(CONFIG_SPL),y)
|
||||
spl/u-boot-spl-mtk.bin: spl/u-boot-spl
|
||||
|
||||
u-boot-mtk.bin: u-boot-with-spl.bin
|
||||
$(call if_changed,copy)
|
||||
else
|
||||
MKIMAGEFLAGS_u-boot-mtk.bin = -T mtk_image \
|
||||
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \
|
||||
@@ -1718,58 +1745,14 @@ u-boot-swap.bin: u-boot.bin FORCE
|
||||
|
||||
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
|
||||
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))
|
||||
|
||||
quiet_cmd_keep_syms_lto = KSL $@
|
||||
cmd_keep_syms_lto = \
|
||||
$(srctree)/scripts/gen_ll_addressable_symbols.sh $(NM) $^ > $@
|
||||
|
||||
quiet_cmd_keep_syms_lto_cc = KSLCC $@
|
||||
cmd_keep_syms_lto_cc = \
|
||||
$(CC) $(filter-out $(LTO_CFLAGS),$(c_flags)) -c -o $@ $<
|
||||
|
||||
$(u-boot-keep-syms-lto_c): $(u-boot-main)
|
||||
$(call if_changed,keep_syms_lto)
|
||||
$(u-boot-keep-syms-lto): $(u-boot-keep-syms-lto_c)
|
||||
$(call if_changed,keep_syms_lto_cc)
|
||||
else
|
||||
u-boot-keep-syms-lto :=
|
||||
endif
|
||||
|
||||
# Rule to link u-boot
|
||||
# May be overridden by arch/$(ARCH)/config.mk
|
||||
ifdef CONFIG_LTO
|
||||
quiet_cmd_u-boot__ ?= LTO $@
|
||||
cmd_u-boot__ ?= \
|
||||
$(CC) -nostdlib -nostartfiles \
|
||||
$(LTO_FINAL_LDFLAGS) $(c_flags) \
|
||||
$(KBUILD_LDFLAGS:%=-Wl,%) $(LDFLAGS_u-boot:%=-Wl,%) -o $@ \
|
||||
-T u-boot.lds $(u-boot-init) \
|
||||
-Wl,--whole-archive \
|
||||
$(u-boot-main) \
|
||||
$(u-boot-keep-syms-lto) \
|
||||
$(PLATFORM_LIBS) \
|
||||
-Wl,--no-whole-archive \
|
||||
-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) \
|
||||
$(if $(CONFIG_EFI_APP_64BIT),,--whole-archive) \
|
||||
$(u-boot-main) \
|
||||
$(if $(CONFIG_EFI_APP_64BIT),,--no-whole-archive) \
|
||||
$(PLATFORM_LIBS) -Map u-boot.map; \
|
||||
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
|
||||
endif
|
||||
cmd_u-boot__ ?= $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_u-boot) -o $@ \
|
||||
-T u-boot.lds $(u-boot-init) \
|
||||
--start-group $(u-boot-main) --end-group \
|
||||
$(PLATFORM_LIBS) -Map u-boot.map; \
|
||||
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
|
||||
|
||||
quiet_cmd_smap = GEN common/system_map.o
|
||||
cmd_smap = \
|
||||
@@ -1778,7 +1761,7 @@ cmd_smap = \
|
||||
$(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \
|
||||
-c $(srctree)/common/system_map.c -o common/system_map.o
|
||||
|
||||
u-boot: $(u-boot-init) $(u-boot-main) $(u-boot-keep-syms-lto) u-boot.lds FORCE
|
||||
u-boot: $(u-boot-init) $(u-boot-main) u-boot.lds FORCE
|
||||
+$(call if_changed,u-boot__)
|
||||
ifeq ($(CONFIG_KALLSYMS),y)
|
||||
$(call cmd,smap)
|
||||
@@ -1858,8 +1841,6 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_USE_DEFAULT_ENV_FILE),y)
|
||||
prepare1: $(defaultenv_h)
|
||||
|
||||
envtools: $(defaultenv_h)
|
||||
endif
|
||||
|
||||
archprepare: prepare1 scripts_basic
|
||||
@@ -1899,6 +1880,8 @@ define filechk_timestamp.h
|
||||
LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \
|
||||
LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \
|
||||
LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \
|
||||
LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DMI_DATE "%m/%d/%Y"'; \
|
||||
LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_BUILD_DATE 0x%Y%m%d'; \
|
||||
LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_EPOCH %s'; \
|
||||
else \
|
||||
return 42; \
|
||||
@@ -1907,15 +1890,18 @@ define filechk_timestamp.h
|
||||
LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \
|
||||
LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \
|
||||
LC_ALL=C date +'#define U_BOOT_TZ "%z"'; \
|
||||
LC_ALL=C date +'#define U_BOOT_DMI_DATE "%m/%d/%Y"'; \
|
||||
LC_ALL=C date +'#define U_BOOT_BUILD_DATE 0x%Y%m%d'; \
|
||||
LC_ALL=C date +'#define U_BOOT_EPOCH %s'; \
|
||||
fi)
|
||||
endef
|
||||
|
||||
define filechk_defaultenv.h
|
||||
( { grep -v '^#' | grep -v '^$$' || true ; echo '' ; } | \
|
||||
(grep -v '^#' | \
|
||||
grep -v '^$$' | \
|
||||
tr '\n' '\0' | \
|
||||
sed -e 's/\\\x0\s*//g' | \
|
||||
xxd -i ; )
|
||||
xxd -i ; echo ", 0x00" ; )
|
||||
endef
|
||||
|
||||
define filechk_dt.h
|
||||
@@ -1938,55 +1924,6 @@ $(dt_h): $(srctree)/Makefile FORCE
|
||||
$(defaultenv_h): $(CONFIG_DEFAULT_ENV_FILE:"%"=%) FORCE
|
||||
$(call filechk,defaultenv.h)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Devicetree files
|
||||
|
||||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/boot/dts/),)
|
||||
dtstree := arch/$(SRCARCH)/boot/dts
|
||||
endif
|
||||
|
||||
ifneq ($(dtstree),)
|
||||
|
||||
%.dtb: prepare3 scripts_dtc
|
||||
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
|
||||
|
||||
PHONY += dtbs dtbs_install
|
||||
dtbs: prepare3 scripts_dtc
|
||||
$(Q)$(MAKE) $(build)=$(dtstree)
|
||||
|
||||
dtbs_install:
|
||||
$(Q)$(MAKE) $(dtbinst)=$(dtstree)
|
||||
|
||||
ifdef CONFIG_OF_EARLY_FLATTREE
|
||||
all: dtbs
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Check dtc and pylibfdt, if DTC is provided, else build them
|
||||
PHONY += scripts_dtc
|
||||
scripts_dtc: scripts_basic
|
||||
$(Q)if test "$(DTC)" = "$(DTC_INTREE)"; then \
|
||||
$(MAKE) $(build)=scripts/dtc; \
|
||||
else \
|
||||
if ! $(DTC) -v >/dev/null; then \
|
||||
echo '*** Failed to check dtc version: $(DTC)'; \
|
||||
false; \
|
||||
else \
|
||||
if test "$(call dtc-version)" -lt $(DTC_MIN_VERSION); then \
|
||||
echo '*** Your dtc is too old, please upgrade to dtc $(DTC_MIN_VERSION) or newer'; \
|
||||
false; \
|
||||
else \
|
||||
if [ -n "$(CONFIG_PYLIBFDT)" ]; then \
|
||||
if ! echo "import libfdt" | $(PYTHON3) 2>/dev/null; then \
|
||||
echo '*** pylibfdt does not seem to be available with $(PYTHON3)'; \
|
||||
false; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
quiet_cmd_cpp_lds = LDS $@
|
||||
cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) \
|
||||
@@ -1999,12 +1936,6 @@ spl/u-boot-spl.bin: spl/u-boot-spl
|
||||
@:
|
||||
$(SPL_SIZE_CHECK)
|
||||
|
||||
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_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)
|
||||
@@ -2105,19 +2036,17 @@ CLEAN_DIRS += $(MODVERDIR) \
|
||||
$(filter-out include, $(shell ls -1 $d 2>/dev/null))))
|
||||
|
||||
CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h tools/version.h \
|
||||
u-boot* MLO* SPL System.map fit-dtb.blob* \
|
||||
boot* 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
|
||||
idbloader.img flash.bin flash.log defconfig
|
||||
|
||||
# Directories & files removed with 'make mrproper'
|
||||
MRPROPER_DIRS += include/config include/generated spl tpl \
|
||||
.tmp_objdiff doc/output include/asm
|
||||
|
||||
# Remove include/asm symlink created by U-Boot before v2014.01
|
||||
.tmp_objdiff doc/output
|
||||
MRPROPER_FILES += .config .config.old include/autoconf.mk* include/config.h \
|
||||
ctags etags tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
|
||||
drivers/video/fonts/*.S include/asm
|
||||
drivers/video/fonts/*.S
|
||||
|
||||
# clean - Delete most, but leave enough to build external modules
|
||||
#
|
||||
@@ -2249,6 +2178,9 @@ PHONY += $(DOC_TARGETS)
|
||||
$(DOC_TARGETS): scripts_basic FORCE
|
||||
$(Q)$(MAKE) $(build)=doc $@
|
||||
|
||||
endif #ifeq ($(config-targets),1)
|
||||
endif #ifeq ($(mixed-targets),1)
|
||||
|
||||
PHONY += checkstack ubootrelease ubootversion
|
||||
|
||||
checkstack:
|
||||
@@ -2310,7 +2242,7 @@ endif
|
||||
$(build)=$(build-dir) $(@:.ko=.o)
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||
|
||||
quiet_cmd_genenv = GENENV $@
|
||||
quiet_cmd_genenv = GENENV $@
|
||||
cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ env/common.o; \
|
||||
sed --in-place -e 's/\x00/\x0A/g' $@
|
||||
|
||||
@@ -2336,15 +2268,13 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))
|
||||
|
||||
# read all saved command lines
|
||||
|
||||
cmd_files := $(wildcard .*.cmd)
|
||||
cmd_files := $(wildcard .*.cmd $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd))
|
||||
|
||||
ifneq ($(cmd_files),)
|
||||
$(cmd_files): ; # Do not try to update included dependency files
|
||||
include $(cmd_files)
|
||||
endif
|
||||
|
||||
endif #ifeq ($(config-targets),1)
|
||||
endif #ifeq ($(mixed-targets),1)
|
||||
endif # skip-makefile
|
||||
|
||||
PHONY += FORCE
|
||||
|
||||
297
README
297
README
@@ -58,8 +58,8 @@ Where to get source code:
|
||||
=========================
|
||||
|
||||
The U-Boot source code is maintained in the Git repository at
|
||||
https://source.denx.de/u-boot/u-boot.git ; you can browse it online at
|
||||
https://source.denx.de/u-boot/u-boot
|
||||
https://gitlab.denx.de/u-boot/u-boot.git ; you can browse it online at
|
||||
https://gitlab.denx.de/u-boot/u-boot
|
||||
|
||||
The "Tags" links on this page allow you to download tarballs of
|
||||
any version you might be interested in. Official releases are also
|
||||
@@ -128,7 +128,7 @@ Examples:
|
||||
Directory Hierarchy:
|
||||
====================
|
||||
|
||||
/arch Architecture-specific files
|
||||
/arch Architecture specific files
|
||||
/arc Files generic to ARC architecture
|
||||
/arm Files generic to ARM architecture
|
||||
/m68k Files generic to m68k architecture
|
||||
@@ -142,17 +142,16 @@ Directory Hierarchy:
|
||||
/sh Files generic to SH architecture
|
||||
/x86 Files generic to x86 architecture
|
||||
/xtensa Files generic to Xtensa architecture
|
||||
/api Machine/arch-independent API for external apps
|
||||
/board Board-dependent files
|
||||
/boot Support for images and booting
|
||||
/api Machine/arch independent API for external apps
|
||||
/board Board dependent files
|
||||
/cmd U-Boot commands functions
|
||||
/common Misc architecture-independent functions
|
||||
/common Misc architecture independent functions
|
||||
/configs Board default configuration files
|
||||
/disk Code for disk drive partition handling
|
||||
/doc Documentation (a mix of ReST and READMEs)
|
||||
/drivers Device drivers
|
||||
/dts Makefile for building internal U-Boot fdt.
|
||||
/env Environment support
|
||||
/doc Documentation (don't expect too much)
|
||||
/drivers Commonly used device drivers
|
||||
/dts Contains Makefile for building internal U-Boot fdt.
|
||||
/env Environment files
|
||||
/examples Example code for standalone applications, etc.
|
||||
/fs Filesystem code (cramfs, ext2, jffs2, etc.)
|
||||
/include Header Files
|
||||
@@ -162,7 +161,7 @@ Directory Hierarchy:
|
||||
/post Power On Self Test
|
||||
/scripts Various build scripts and Makefiles
|
||||
/test Various unit test files
|
||||
/tools Tools to build and sign FIT images, etc.
|
||||
/tools Tools to build S-Record or U-Boot images, etc.
|
||||
|
||||
Software Configuration:
|
||||
=======================
|
||||
@@ -301,6 +300,7 @@ board_init_r():
|
||||
- loads U-Boot or (in falcon mode) Linux
|
||||
|
||||
|
||||
|
||||
Configuration Options:
|
||||
----------------------
|
||||
|
||||
@@ -423,7 +423,8 @@ The following options need to be configured:
|
||||
|
||||
CONFIG_SYS_FSL_DDR
|
||||
Freescale DDR driver in use. This type of DDR controller is
|
||||
found in mpc83xx, mpc85xx as well as some ARM core SoCs.
|
||||
found in mpc83xx, mpc85xx, mpc86xx as well as some ARM core
|
||||
SoCs.
|
||||
|
||||
CONFIG_SYS_FSL_DDR_ADDR
|
||||
Freescale DDR memory-mapped register base.
|
||||
@@ -465,6 +466,10 @@ The following options need to be configured:
|
||||
Board config to use DDR3L. It can be enabled for SoCs with
|
||||
DDR3L controllers.
|
||||
|
||||
CONFIG_SYS_FSL_DDR4
|
||||
Board config to use DDR4. It can be enabled for SoCs with
|
||||
DDR4 controllers.
|
||||
|
||||
CONFIG_SYS_FSL_IFC_BE
|
||||
Defines the IFC controller register space as Big Endian
|
||||
|
||||
@@ -477,6 +482,15 @@ The following options need to be configured:
|
||||
CONFIG_SYS_FSL_LBC_CLK_DIV
|
||||
Defines divider of platform clock(clock input to eLBC controller).
|
||||
|
||||
CONFIG_SYS_FSL_PBL_PBI
|
||||
It enables addition of RCW (Power on reset configuration) in built image.
|
||||
Please refer doc/README.pblimage for more details
|
||||
|
||||
CONFIG_SYS_FSL_PBL_RCW
|
||||
It adds PBI(pre-boot instructions) commands in u-boot build image.
|
||||
PBI commands can be used to configure SoC before it starts the execution.
|
||||
Please refer doc/README.pblimage for more details
|
||||
|
||||
CONFIG_SYS_FSL_DDR_BE
|
||||
Defines the DDR controller register space as Big Endian
|
||||
|
||||
@@ -586,6 +600,16 @@ The following options need to be configured:
|
||||
crash. This is needed for buggy hardware (uc101) where
|
||||
no pull down resistor is connected to the signal IDE5V_DD7.
|
||||
|
||||
CONFIG_MACH_TYPE [relevant for ARM only][mandatory]
|
||||
|
||||
This setting is mandatory for all boards that have only one
|
||||
machine type and must be used to specify the machine type
|
||||
number as it appears in the ARM machine registry
|
||||
(see https://www.arm.linux.org.uk/developer/machines/).
|
||||
Only boards that have multiple machine types supported
|
||||
in a single configuration file and the machine type is
|
||||
runtime discoverable, do not have to use this setting.
|
||||
|
||||
- vxWorks boot parameters:
|
||||
|
||||
bootvx constructs a valid bootline using the following
|
||||
@@ -606,6 +630,14 @@ The following options need to be configured:
|
||||
controller register space
|
||||
|
||||
- Serial Ports:
|
||||
CONFIG_PL010_SERIAL
|
||||
|
||||
Define this if you want support for Amba PrimeCell PL010 UARTs.
|
||||
|
||||
CONFIG_PL011_SERIAL
|
||||
|
||||
Define this if you want support for Amba PrimeCell PL011 UARTs.
|
||||
|
||||
CONFIG_PL011_CLOCK
|
||||
|
||||
If you have Amba PrimeCell PL011 UARTs, set this variable to
|
||||
@@ -644,6 +676,11 @@ The following options need to be configured:
|
||||
time on others. This setting #define's the initial
|
||||
value of the "loads_echo" environment variable.
|
||||
|
||||
- Kgdb Serial Baudrate: (if CONFIG_CMD_KGDB is defined)
|
||||
CONFIG_KGDB_BAUDRATE
|
||||
Select one of the baudrates listed in
|
||||
CONFIG_SYS_BAUDRATE_TABLE, see below.
|
||||
|
||||
- Removal of commands
|
||||
If no commands are needed to boot, you can disable
|
||||
CONFIG_CMDLINE to remove them. In this case, the command line
|
||||
@@ -670,6 +707,13 @@ The following options need to be configured:
|
||||
U-Boot needs to get its device tree from somewhere. This can
|
||||
be done using one of the three options below:
|
||||
|
||||
CONFIG_OF_EMBED
|
||||
If this variable is defined, U-Boot will embed a device tree
|
||||
binary in its image. This device tree file should be in the
|
||||
board directory and called <soc>-<board>.dts. The binary file
|
||||
is then picked up in board_init_f() and made available through
|
||||
the global data structure as gd->fdt_blob.
|
||||
|
||||
CONFIG_OF_SEPARATE
|
||||
If this variable is defined, U-Boot will build a device tree
|
||||
binary. It will be called u-boot.dtb. Architecture-specific
|
||||
@@ -703,15 +747,6 @@ The following options need to be configured:
|
||||
SoC, then define this variable and provide board
|
||||
specific code for the "hw_watchdog_reset" function.
|
||||
|
||||
CONFIG_SYS_WATCHDOG_FREQ
|
||||
Some platforms automatically call WATCHDOG_RESET()
|
||||
from the timer interrupt handler every
|
||||
CONFIG_SYS_WATCHDOG_FREQ interrupts. If not set by the
|
||||
board configuration file, a default of CONFIG_SYS_HZ/2
|
||||
(i.e. 500) is used. Setting CONFIG_SYS_WATCHDOG_FREQ
|
||||
to 0 disables calling WATCHDOG_RESET() from the timer
|
||||
interrupt.
|
||||
|
||||
- Real-Time Clock:
|
||||
|
||||
When CONFIG_CMD_DATE is selected, the type of the RTC
|
||||
@@ -821,11 +856,18 @@ The following options need to be configured:
|
||||
SCSI devices found during the last scan.
|
||||
|
||||
- NETWORK Support (PCI):
|
||||
CONFIG_E1000
|
||||
Support for Intel 8254x/8257x gigabit chips.
|
||||
|
||||
CONFIG_E1000_SPI
|
||||
Utility code for direct access to the SPI bus on Intel 8257x.
|
||||
This does not do anything useful unless you set at least one
|
||||
of CONFIG_CMD_E1000 or CONFIG_E1000_SPI_GENERIC.
|
||||
|
||||
CONFIG_E1000_SPI_GENERIC
|
||||
Allow generic access to the SPI bus on the Intel 8257x, for
|
||||
example with the "sspi" command.
|
||||
|
||||
CONFIG_NATSEMI
|
||||
Support for National dp83815 chips.
|
||||
|
||||
@@ -833,6 +875,17 @@ The following options need to be configured:
|
||||
Support for National dp8382[01] gigabit chips.
|
||||
|
||||
- NETWORK Support (other):
|
||||
|
||||
CONFIG_DRIVER_AT91EMAC
|
||||
Support for AT91RM9200 EMAC.
|
||||
|
||||
CONFIG_RMII
|
||||
Define this to use reduced MII inteface
|
||||
|
||||
CONFIG_DRIVER_AT91EMAC_QUIET
|
||||
If this defined, the driver is quiet.
|
||||
The driver doen't show link status messages.
|
||||
|
||||
CONFIG_CALXEDA_XGMAC
|
||||
Support for the Calxeda XGMAC device
|
||||
|
||||
@@ -974,6 +1027,10 @@ The following options need to be configured:
|
||||
whether the enumeration has succeded at high speed or full
|
||||
speed.
|
||||
|
||||
CONFIG_SYS_CONSOLE_IS_IN_ENV
|
||||
Define this if you want stdin, stdout &/or stderr to
|
||||
be set to usbtty.
|
||||
|
||||
If you have a USB-IF assigned VendorID then you may wish to
|
||||
define your own vendor specific values either in BoardName.h
|
||||
or directly in usbd_vendor_info.h. If you don't define
|
||||
@@ -1185,6 +1242,11 @@ The following options need to be configured:
|
||||
|
||||
Support drawing of RLE8-compressed bitmaps on the LCD.
|
||||
|
||||
CONFIG_I2C_EDID
|
||||
|
||||
Enables an 'i2c edid' command which can read EDID
|
||||
information over I2C from an attached LCD display.
|
||||
|
||||
- MII/PHY support:
|
||||
CONFIG_PHY_CLOCK_FREQ (ppc4xx)
|
||||
|
||||
@@ -1395,7 +1457,126 @@ The following options need to be configured:
|
||||
In such cases CONFIG_GPIO_LED_INVERTED_TABLE may be defined
|
||||
with a list of GPIO LEDs that have inverted polarity.
|
||||
|
||||
- I2C Support:
|
||||
- I2C Support: CONFIG_SYS_I2C
|
||||
|
||||
This enable the NEW i2c subsystem, and will allow you to use
|
||||
i2c commands at the u-boot command line (as long as you set
|
||||
CONFIG_SYS_I2C_SOFT_SPEED and CONFIG_SYS_I2C_SOFT_SLAVE
|
||||
for defining speed and slave address
|
||||
- activate second bus with I2C_SOFT_DECLARATIONS2 define
|
||||
CONFIG_SYS_I2C_SOFT_SPEED_2 and CONFIG_SYS_I2C_SOFT_SLAVE_2
|
||||
for defining speed and slave address
|
||||
- activate third bus with I2C_SOFT_DECLARATIONS3 define
|
||||
CONFIG_SYS_I2C_SOFT_SPEED_3 and CONFIG_SYS_I2C_SOFT_SLAVE_3
|
||||
for defining speed and slave address
|
||||
- activate fourth bus with I2C_SOFT_DECLARATIONS4 define
|
||||
CONFIG_SYS_I2C_SOFT_SPEED_4 and CONFIG_SYS_I2C_SOFT_SLAVE_4
|
||||
for defining speed and slave address
|
||||
|
||||
- drivers/i2c/fsl_i2c.c:
|
||||
- activate i2c driver with CONFIG_SYS_I2C_FSL
|
||||
define CONFIG_SYS_FSL_I2C_OFFSET for setting the register
|
||||
offset CONFIG_SYS_FSL_I2C_SPEED for the i2c speed and
|
||||
CONFIG_SYS_FSL_I2C_SLAVE for the slave addr of the first
|
||||
bus.
|
||||
- If your board supports a second fsl i2c bus, define
|
||||
CONFIG_SYS_FSL_I2C2_OFFSET for the register offset
|
||||
CONFIG_SYS_FSL_I2C2_SPEED for the speed and
|
||||
CONFIG_SYS_FSL_I2C2_SLAVE for the slave address of the
|
||||
second bus.
|
||||
|
||||
- drivers/i2c/tegra_i2c.c:
|
||||
- activate this driver with CONFIG_SYS_I2C_TEGRA
|
||||
- This driver adds 4 i2c buses with a fix speed from
|
||||
100000 and the slave addr 0!
|
||||
|
||||
- drivers/i2c/ppc4xx_i2c.c
|
||||
- activate this driver with CONFIG_SYS_I2C_PPC4XX
|
||||
- CONFIG_SYS_I2C_PPC4XX_CH0 activate hardware channel 0
|
||||
- CONFIG_SYS_I2C_PPC4XX_CH1 activate hardware channel 1
|
||||
|
||||
- drivers/i2c/i2c_mxc.c
|
||||
- activate this driver with CONFIG_SYS_I2C_MXC
|
||||
- enable bus 1 with CONFIG_SYS_I2C_MXC_I2C1
|
||||
- enable bus 2 with CONFIG_SYS_I2C_MXC_I2C2
|
||||
- enable bus 3 with CONFIG_SYS_I2C_MXC_I2C3
|
||||
- enable bus 4 with CONFIG_SYS_I2C_MXC_I2C4
|
||||
- define speed for bus 1 with CONFIG_SYS_MXC_I2C1_SPEED
|
||||
- define slave for bus 1 with CONFIG_SYS_MXC_I2C1_SLAVE
|
||||
- define speed for bus 2 with CONFIG_SYS_MXC_I2C2_SPEED
|
||||
- define slave for bus 2 with CONFIG_SYS_MXC_I2C2_SLAVE
|
||||
- define speed for bus 3 with CONFIG_SYS_MXC_I2C3_SPEED
|
||||
- define slave for bus 3 with CONFIG_SYS_MXC_I2C3_SLAVE
|
||||
- define speed for bus 4 with CONFIG_SYS_MXC_I2C4_SPEED
|
||||
- define slave for bus 4 with CONFIG_SYS_MXC_I2C4_SLAVE
|
||||
If those defines are not set, default value is 100000
|
||||
for speed, and 0 for slave.
|
||||
|
||||
- drivers/i2c/rcar_i2c.c:
|
||||
- activate this driver with CONFIG_SYS_I2C_RCAR
|
||||
- This driver adds 4 i2c buses
|
||||
|
||||
- drivers/i2c/sh_i2c.c:
|
||||
- activate this driver with CONFIG_SYS_I2C_SH
|
||||
- This driver adds from 2 to 5 i2c buses
|
||||
|
||||
- CONFIG_SYS_I2C_SH_BASE0 for setting the register channel 0
|
||||
- CONFIG_SYS_I2C_SH_SPEED0 for for the speed channel 0
|
||||
- CONFIG_SYS_I2C_SH_BASE1 for setting the register channel 1
|
||||
- CONFIG_SYS_I2C_SH_SPEED1 for for the speed channel 1
|
||||
- CONFIG_SYS_I2C_SH_BASE2 for setting the register channel 2
|
||||
- CONFIG_SYS_I2C_SH_SPEED2 for for the speed channel 2
|
||||
- CONFIG_SYS_I2C_SH_BASE3 for setting the register channel 3
|
||||
- CONFIG_SYS_I2C_SH_SPEED3 for for the speed channel 3
|
||||
- CONFIG_SYS_I2C_SH_BASE4 for setting the register channel 4
|
||||
- CONFIG_SYS_I2C_SH_SPEED4 for for the speed channel 4
|
||||
- CONFIG_SYS_I2C_SH_NUM_CONTROLLERS for number of i2c buses
|
||||
|
||||
- drivers/i2c/omap24xx_i2c.c
|
||||
- activate this driver with CONFIG_SYS_I2C_OMAP24XX
|
||||
- CONFIG_SYS_OMAP24_I2C_SPEED speed channel 0
|
||||
- CONFIG_SYS_OMAP24_I2C_SLAVE slave addr channel 0
|
||||
- CONFIG_SYS_OMAP24_I2C_SPEED1 speed channel 1
|
||||
- CONFIG_SYS_OMAP24_I2C_SLAVE1 slave addr channel 1
|
||||
- CONFIG_SYS_OMAP24_I2C_SPEED2 speed channel 2
|
||||
- CONFIG_SYS_OMAP24_I2C_SLAVE2 slave addr channel 2
|
||||
- CONFIG_SYS_OMAP24_I2C_SPEED3 speed channel 3
|
||||
- CONFIG_SYS_OMAP24_I2C_SLAVE3 slave addr channel 3
|
||||
- CONFIG_SYS_OMAP24_I2C_SPEED4 speed channel 4
|
||||
- CONFIG_SYS_OMAP24_I2C_SLAVE4 slave addr channel 4
|
||||
|
||||
- drivers/i2c/s3c24x0_i2c.c:
|
||||
- activate this driver with CONFIG_SYS_I2C_S3C24X0
|
||||
- This driver adds i2c buses (11 for Exynos5250, Exynos5420
|
||||
9 i2c buses for Exynos4 and 1 for S3C24X0 SoCs from Samsung)
|
||||
with a fix speed from 100000 and the slave addr 0!
|
||||
|
||||
- drivers/i2c/ihs_i2c.c
|
||||
- activate this driver with CONFIG_SYS_I2C_IHS
|
||||
- CONFIG_SYS_I2C_IHS_CH0 activate hardware channel 0
|
||||
- CONFIG_SYS_I2C_IHS_SPEED_0 speed channel 0
|
||||
- CONFIG_SYS_I2C_IHS_SLAVE_0 slave addr channel 0
|
||||
- CONFIG_SYS_I2C_IHS_CH1 activate hardware channel 1
|
||||
- CONFIG_SYS_I2C_IHS_SPEED_1 speed channel 1
|
||||
- CONFIG_SYS_I2C_IHS_SLAVE_1 slave addr channel 1
|
||||
- CONFIG_SYS_I2C_IHS_CH2 activate hardware channel 2
|
||||
- CONFIG_SYS_I2C_IHS_SPEED_2 speed channel 2
|
||||
- CONFIG_SYS_I2C_IHS_SLAVE_2 slave addr channel 2
|
||||
- CONFIG_SYS_I2C_IHS_CH3 activate hardware channel 3
|
||||
- CONFIG_SYS_I2C_IHS_SPEED_3 speed channel 3
|
||||
- CONFIG_SYS_I2C_IHS_SLAVE_3 slave addr channel 3
|
||||
- activate dual channel with CONFIG_SYS_I2C_IHS_DUAL
|
||||
- CONFIG_SYS_I2C_IHS_SPEED_0_1 speed channel 0_1
|
||||
- CONFIG_SYS_I2C_IHS_SLAVE_0_1 slave addr channel 0_1
|
||||
- CONFIG_SYS_I2C_IHS_SPEED_1_1 speed channel 1_1
|
||||
- CONFIG_SYS_I2C_IHS_SLAVE_1_1 slave addr channel 1_1
|
||||
- CONFIG_SYS_I2C_IHS_SPEED_2_1 speed channel 2_1
|
||||
- CONFIG_SYS_I2C_IHS_SLAVE_2_1 slave addr channel 2_1
|
||||
- CONFIG_SYS_I2C_IHS_SPEED_3_1 speed channel 3_1
|
||||
- CONFIG_SYS_I2C_IHS_SLAVE_3_1 slave addr channel 3_1
|
||||
|
||||
additional defines:
|
||||
|
||||
CONFIG_SYS_NUM_I2C_BUSES
|
||||
Hold the number of i2c buses you want to use.
|
||||
|
||||
@@ -1922,6 +2103,9 @@ The following options need to be configured:
|
||||
CONFIG_SPL
|
||||
Enable building of SPL globally.
|
||||
|
||||
CONFIG_SPL_LDSCRIPT
|
||||
LDSCRIPT for linking the SPL binary.
|
||||
|
||||
CONFIG_SPL_MAX_FOOTPRINT
|
||||
Maximum size in memory allocated to the SPL, BSS included.
|
||||
When defined, the linker checks that the actual memory
|
||||
@@ -1976,6 +2160,10 @@ The following options need to be configured:
|
||||
CONFIG_SYS_SPL_MALLOC_SIZE
|
||||
The size of the malloc pool used in SPL.
|
||||
|
||||
CONFIG_SPL_OS_BOOT
|
||||
Enable booting directly to an OS from SPL.
|
||||
See also: doc/README.falcon
|
||||
|
||||
CONFIG_SPL_DISPLAY_PRINT
|
||||
For ARM, enable an optional function to print more information
|
||||
about the running system.
|
||||
@@ -2041,6 +2229,9 @@ The following options need to be configured:
|
||||
Defines the size and behavior of the NAND that SPL uses
|
||||
to read U-Boot
|
||||
|
||||
CONFIG_SYS_NAND_U_BOOT_OFFS
|
||||
Location in NAND to read U-Boot from
|
||||
|
||||
CONFIG_SYS_NAND_U_BOOT_DST
|
||||
Location in memory to load U-Boot to
|
||||
|
||||
@@ -2578,6 +2769,9 @@ Low Level (hardware related) configuration options:
|
||||
CONFIG_SYS_OR3_PRELIM, CONFIG_SYS_BR3_PRELIM:
|
||||
Memory Controller Definitions: BR2/3 and OR2/3 (SDRAM)
|
||||
|
||||
- CONFIG_PCI_INDIRECT_BRIDGE:
|
||||
Enable support for indirect PCI bridges.
|
||||
|
||||
- CONFIG_SYS_SRIO:
|
||||
Chip has SRIO or not
|
||||
|
||||
@@ -2675,6 +2869,22 @@ Low Level (hardware related) configuration options:
|
||||
This only takes effect if the memory commands are activated
|
||||
globally (CONFIG_CMD_MEMORY).
|
||||
|
||||
- CONFIG_SKIP_LOWLEVEL_INIT
|
||||
[ARM, NDS32, MIPS, RISC-V only] If this variable is defined, then certain
|
||||
low level initializations (like setting up the memory
|
||||
controller) are omitted and/or U-Boot does not
|
||||
relocate itself into RAM.
|
||||
|
||||
Normally this variable MUST NOT be defined. The only
|
||||
exception is when U-Boot is loaded (to RAM) by some
|
||||
other boot loader or by a debugger which performs
|
||||
these initializations itself.
|
||||
|
||||
- CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
[ARM926EJ-S only] This allows just the call to lowlevel_init()
|
||||
to be skipped. The normal CP15 init (such as enabling the
|
||||
instruction cache) is still performed.
|
||||
|
||||
- CONFIG_SPL_BUILD
|
||||
Set when the currently-running compilation is for an artifact
|
||||
that will end up in the SPL (as opposed to the TPL or U-Boot
|
||||
@@ -3293,6 +3503,47 @@ The signature of the callback functions is:
|
||||
|
||||
The return value is 0 if the variable change is accepted and 1 otherwise.
|
||||
|
||||
Command Line Parsing:
|
||||
=====================
|
||||
|
||||
There are two different command line parsers available with U-Boot:
|
||||
the old "simple" one, and the much more powerful "hush" shell:
|
||||
|
||||
Old, simple command line parser:
|
||||
--------------------------------
|
||||
|
||||
- supports environment variables (through setenv / saveenv commands)
|
||||
- several commands on one line, separated by ';'
|
||||
- variable substitution using "... ${name} ..." syntax
|
||||
- special characters ('$', ';') can be escaped by prefixing with '\',
|
||||
for example:
|
||||
setenv bootcmd bootm \${address}
|
||||
- You can also escape text by enclosing in single apostrophes, for example:
|
||||
setenv addip 'setenv bootargs $bootargs ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname::off'
|
||||
|
||||
Hush shell:
|
||||
-----------
|
||||
|
||||
- similar to Bourne shell, with control structures like
|
||||
if...then...else...fi, for...do...done; while...do...done,
|
||||
until...do...done, ...
|
||||
- supports environment ("global") variables (through setenv / saveenv
|
||||
commands) and local shell variables (through standard shell syntax
|
||||
"name=value"); only environment variables can be used with "run"
|
||||
command
|
||||
|
||||
General rules:
|
||||
--------------
|
||||
|
||||
(1) If a command line (or an environment variable executed by a "run"
|
||||
command) contains several commands separated by semicolon, and
|
||||
one of these commands fails, then the remaining commands will be
|
||||
executed anyway.
|
||||
|
||||
(2) If you execute several variables with one call to run (i. e.
|
||||
calling run with a list of variables as arguments), any failing
|
||||
command will cause "run" to terminate, i. e. the remaining
|
||||
variables are not executed.
|
||||
|
||||
Note for Redundant Ethernet Interfaces:
|
||||
=======================================
|
||||
|
||||
@@ -2,6 +2,7 @@ menu "API"
|
||||
|
||||
config API
|
||||
bool "Enable U-Boot API"
|
||||
default n
|
||||
help
|
||||
This option enables the U-Boot API. See api/README for more information.
|
||||
|
||||
|
||||
111
arch/Kconfig
111
arch/Kconfig
@@ -7,27 +7,6 @@ config HAVE_ARCH_IOREMAP
|
||||
config NEEDS_MANUAL_RELOC
|
||||
bool
|
||||
|
||||
config SYS_CACHE_SHIFT_4
|
||||
bool
|
||||
|
||||
config SYS_CACHE_SHIFT_5
|
||||
bool
|
||||
|
||||
config SYS_CACHE_SHIFT_6
|
||||
bool
|
||||
|
||||
config SYS_CACHE_SHIFT_7
|
||||
bool
|
||||
|
||||
config SYS_CACHELINE_SIZE
|
||||
int
|
||||
default 128 if SYS_CACHE_SHIFT_7
|
||||
default 64 if SYS_CACHE_SHIFT_6
|
||||
default 32 if SYS_CACHE_SHIFT_5
|
||||
default 16 if SYS_CACHE_SHIFT_4
|
||||
# Fall-back for MIPS
|
||||
default 32 if MIPS
|
||||
|
||||
config LINKER_LIST_ALIGN
|
||||
int
|
||||
default 32 if SANDBOX
|
||||
@@ -50,12 +29,10 @@ config ARC
|
||||
select DM
|
||||
select HAVE_PRIVATE_LIBGCC
|
||||
select SUPPORT_OF_CONTROL
|
||||
select SYS_CACHE_SHIFT_7
|
||||
select TIMER
|
||||
|
||||
config ARM
|
||||
bool "ARM architecture"
|
||||
select ARCH_SUPPORTS_LTO
|
||||
select CREATE_ARCH_SYMLINK
|
||||
select HAVE_PRIVATE_LIBGCC if !ARM64
|
||||
select SUPPORT_OF_CONTROL
|
||||
@@ -66,7 +43,6 @@ config M68K
|
||||
select NEEDS_MANUAL_RELOC
|
||||
select SYS_BOOT_GET_CMDLINE
|
||||
select SYS_BOOT_GET_KBD
|
||||
select SYS_CACHE_SHIFT_4
|
||||
select SUPPORT_OF_CONTROL
|
||||
|
||||
config MICROBLAZE
|
||||
@@ -120,12 +96,11 @@ config RISCV
|
||||
imply SPL_OF_CONTROL
|
||||
imply SPL_LIBCOMMON_SUPPORT
|
||||
imply SPL_LIBGENERIC_SUPPORT
|
||||
imply SPL_SERIAL
|
||||
imply SPL_SERIAL_SUPPORT
|
||||
imply SPL_TIMER
|
||||
|
||||
config SANDBOX
|
||||
bool "Sandbox"
|
||||
select ARCH_SUPPORTS_LTO
|
||||
select BOARD_LATE_INIT
|
||||
select BZIP2
|
||||
select CMD_POWEROFF
|
||||
@@ -145,12 +120,8 @@ config SANDBOX
|
||||
select SPI
|
||||
select SUPPORT_OF_CONTROL
|
||||
select SYSRESET_CMD_POWEROFF
|
||||
select SYS_CACHE_SHIFT_4
|
||||
select IRQ
|
||||
select SUPPORT_EXTENSION_SCAN
|
||||
imply BITREVERSE
|
||||
select BLOBLIST
|
||||
imply LTO
|
||||
imply CMD_DM
|
||||
imply CMD_EXCEPTION
|
||||
imply CMD_GETTIME
|
||||
@@ -171,8 +142,6 @@ config SANDBOX
|
||||
imply AVB_VERIFY
|
||||
imply LIBAVB
|
||||
imply CMD_AVB
|
||||
imply SCP03
|
||||
imply CMD_SCP03
|
||||
imply UDP_FUNCTION_FASTBOOT
|
||||
imply VIRTIO_MMIO
|
||||
imply VIRTIO_PCI
|
||||
@@ -191,9 +160,6 @@ config SANDBOX
|
||||
imply CMD_CLONE
|
||||
imply SILENT_CONSOLE
|
||||
imply BOOTARGS_SUBST
|
||||
imply PHY_FIXED
|
||||
imply DM_DSA
|
||||
imply CMD_EXTENSION
|
||||
|
||||
config SH
|
||||
bool "SuperH architecture"
|
||||
@@ -206,16 +172,15 @@ config X86
|
||||
select SUPPORT_TPL
|
||||
select CREATE_ARCH_SYMLINK
|
||||
select DM
|
||||
select DM_PCI
|
||||
select HAVE_ARCH_IOMAP
|
||||
select HAVE_PRIVATE_LIBGCC
|
||||
select OF_CONTROL
|
||||
select PCI
|
||||
select SUPPORT_OF_CONTROL
|
||||
select SYS_CACHE_SHIFT_6
|
||||
select TIMER
|
||||
select USE_PRIVATE_LIBGCC
|
||||
select X86_TSC_TIMER
|
||||
select IRQ
|
||||
imply HAS_ROM if X86_RESET_VECTOR
|
||||
imply BLK
|
||||
imply CMD_DM
|
||||
@@ -246,6 +211,7 @@ config X86
|
||||
imply USB_HOST_ETHER
|
||||
imply PCH
|
||||
imply RTC_MC146818
|
||||
imply IRQ
|
||||
imply ACPIGEN if !QEMU
|
||||
imply SYSINFO if GENERATE_SMBIOS_TABLE
|
||||
imply SYSINFO_SMBIOS if GENERATE_SMBIOS_TABLE
|
||||
@@ -253,26 +219,26 @@ config X86
|
||||
# Thing to enable for when SPL/TPL are enabled: SPL
|
||||
imply SPL_DM
|
||||
imply SPL_OF_LIBFDT
|
||||
imply SPL_DRIVERS_MISC
|
||||
imply SPL_GPIO
|
||||
imply SPL_DRIVERS_MISC_SUPPORT
|
||||
imply SPL_GPIO_SUPPORT
|
||||
imply SPL_PINCTRL
|
||||
imply SPL_LIBCOMMON_SUPPORT
|
||||
imply SPL_LIBGENERIC_SUPPORT
|
||||
imply SPL_SERIAL
|
||||
imply SPL_SERIAL_SUPPORT
|
||||
imply SPL_SPI_FLASH_SUPPORT
|
||||
imply SPL_SPI
|
||||
imply SPL_SPI_SUPPORT
|
||||
imply SPL_OF_CONTROL
|
||||
imply SPL_TIMER
|
||||
imply SPL_REGMAP
|
||||
imply SPL_SYSCON
|
||||
# TPL
|
||||
imply TPL_DM
|
||||
imply TPL_DRIVERS_MISC
|
||||
imply TPL_GPIO
|
||||
imply TPL_DRIVERS_MISC_SUPPORT
|
||||
imply TPL_GPIO_SUPPORT
|
||||
imply TPL_PINCTRL
|
||||
imply TPL_LIBCOMMON_SUPPORT
|
||||
imply TPL_LIBGENERIC_SUPPORT
|
||||
imply TPL_SERIAL
|
||||
imply TPL_SERIAL_SUPPORT
|
||||
imply TPL_OF_CONTROL
|
||||
imply TPL_TIMER
|
||||
imply TPL_REGMAP
|
||||
@@ -350,63 +316,6 @@ config SYS_DISABLE_DCACHE_OPS
|
||||
Note that, its up to the individual architectures to implement
|
||||
this functionality.
|
||||
|
||||
config SKIP_LOWLEVEL_INIT
|
||||
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
|
||||
itself into RAM.
|
||||
Normally this variable MUST NOT be defined. The only exception is
|
||||
when U-Boot is loaded (to RAM) by some other boot loader or by a
|
||||
debugger which performs these initializations itself.
|
||||
|
||||
config SPL_SKIP_LOWLEVEL_INIT
|
||||
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
|
||||
itself into RAM.
|
||||
Normally this variable MUST NOT be defined. The only exception is
|
||||
when U-Boot is loaded (to RAM) by some other boot loader or by a
|
||||
debugger which performs these initializations itself.
|
||||
|
||||
config TPL_SKIP_LOWLEVEL_INIT
|
||||
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
|
||||
the memory controller) are omitted and/or U-Boot does not relocate
|
||||
itself into RAM.
|
||||
Normally this variable MUST NOT be defined. The only exception is
|
||||
when U-Boot is loaded (to RAM) by some other boot loader or by a
|
||||
debugger which performs these initializations itself.
|
||||
|
||||
config SKIP_LOWLEVEL_INIT_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
|
||||
normal CP15 init (such as enabling the instruction cache) is still
|
||||
performed.
|
||||
|
||||
config SPL_SKIP_LOWLEVEL_INIT_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
|
||||
normal CP15 init (such as enabling the instruction cache) is still
|
||||
performed.
|
||||
|
||||
config TPL_SKIP_LOWLEVEL_INIT_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.
|
||||
|
||||
source "arch/arc/Kconfig"
|
||||
source "arch/arm/Kconfig"
|
||||
source "arch/m68k/Kconfig"
|
||||
|
||||
@@ -104,11 +104,13 @@ endchoice
|
||||
|
||||
config CPU_BIG_ENDIAN
|
||||
bool "Enable Big Endian Mode"
|
||||
default n
|
||||
help
|
||||
Build kernel for Big Endian Mode of ARC CPU
|
||||
|
||||
config SYS_ICACHE_OFF
|
||||
bool "Do not enable icache"
|
||||
default n
|
||||
help
|
||||
Do not enable instruction cache in U-Boot.
|
||||
|
||||
@@ -121,6 +123,7 @@ config SPL_SYS_ICACHE_OFF
|
||||
|
||||
config SYS_DCACHE_OFF
|
||||
bool "Do not enable dcache"
|
||||
default n
|
||||
help
|
||||
Do not enable data cache in U-Boot.
|
||||
|
||||
@@ -133,12 +136,14 @@ config SPL_SYS_DCACHE_OFF
|
||||
|
||||
menuconfig ARC_DBG
|
||||
bool "ARC debugging"
|
||||
default n
|
||||
|
||||
if ARC_DBG
|
||||
|
||||
config ARC_DBG_IOC_ENABLE
|
||||
bool "Enable IO coherency unit"
|
||||
depends on CPU_ARCHS38
|
||||
default n
|
||||
help
|
||||
Enable IO coherency unit to debug problems with caches and
|
||||
DMA peripherals.
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
};
|
||||
|
||||
usbphy: phy {
|
||||
compatible = "usb-nop-xceiv";
|
||||
compatible = "nop-phy";
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
*/
|
||||
#define ARCH_DMA_MINALIGN 128
|
||||
|
||||
/* CONFIG_SYS_CACHELINE_SIZE is used a lot in drivers */
|
||||
#define CONFIG_SYS_CACHELINE_SIZE ARCH_DMA_MINALIGN
|
||||
|
||||
#if defined(ARC_MMU_ABSENT)
|
||||
#define CONFIG_ARC_MMU_VER 0
|
||||
#elif defined(CONFIG_ARC_MMU_V2)
|
||||
|
||||
@@ -8,4 +8,6 @@
|
||||
|
||||
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
||||
|
||||
#define CONFIG_LMB
|
||||
|
||||
#endif /*__ASM_ARC_CONFIG_H_ */
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#ifndef __ASM_ARC_GLOBAL_DATA_H
|
||||
#define __ASM_ARC_GLOBAL_DATA_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/* Architecture-specific global data */
|
||||
struct arch_global_data {
|
||||
|
||||
@@ -8,12 +8,42 @@
|
||||
#include <env.h>
|
||||
#include <image.h>
|
||||
#include <irq_func.h>
|
||||
#include <lmb.h>
|
||||
#include <log.h>
|
||||
#include <asm/cache.h>
|
||||
#include <asm/global_data.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
static ulong get_sp(void)
|
||||
{
|
||||
ulong ret;
|
||||
|
||||
asm("mov %0, sp" : "=r"(ret) : );
|
||||
return ret;
|
||||
}
|
||||
|
||||
void arch_lmb_reserve(struct lmb *lmb)
|
||||
{
|
||||
ulong sp;
|
||||
|
||||
/*
|
||||
* Booting a (Linux) kernel image
|
||||
*
|
||||
* Allocate space for command line and board info - the
|
||||
* address should be as high as possible within the reach of
|
||||
* the kernel (see CONFIG_SYS_BOOTMAPSZ settings), but in unused
|
||||
* memory, which means far enough below the current stack
|
||||
* pointer.
|
||||
*/
|
||||
sp = get_sp();
|
||||
debug("## Current stack ends at 0x%08lx ", sp);
|
||||
|
||||
/* adjust sp by 4K to be safe */
|
||||
sp -= 4096;
|
||||
lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp));
|
||||
}
|
||||
|
||||
static int cleanup_before_linux(void)
|
||||
{
|
||||
disable_interrupts();
|
||||
@@ -63,7 +93,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
|
||||
"(fake run for tracing)" : "");
|
||||
bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
|
||||
|
||||
if (CONFIG_IS_ENABLED(OF_LIBFDT) && images->ft_len) {
|
||||
if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) {
|
||||
r0 = 2;
|
||||
r2 = (unsigned int)images->ft_addr;
|
||||
} else {
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/log2.h>
|
||||
#include <lmb.h>
|
||||
#include <asm/arcregs.h>
|
||||
#include <asm/arc-bcr.h>
|
||||
#include <asm/cache.h>
|
||||
@@ -821,16 +820,3 @@ void sync_n_cleanup_cache_all(void)
|
||||
|
||||
__ic_entire_invalidate();
|
||||
}
|
||||
|
||||
static ulong get_sp(void)
|
||||
{
|
||||
ulong ret;
|
||||
|
||||
asm("mov %0, sp" : "=r"(ret) : );
|
||||
return ret;
|
||||
}
|
||||
|
||||
void arch_lmb_reserve(struct lmb *lmb)
|
||||
{
|
||||
arch_lmb_reserve_generic(lmb, get_sp(), gd->ram_top, 4096);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ typedef int HItype __attribute__ ((mode (HI)));
|
||||
typedef unsigned int UHItype __attribute__ ((mode (HI)));
|
||||
#if MIN_UNITS_PER_WORD > 1
|
||||
/* These typedefs are usually forbidden on dsp's with UNITS_PER_WORD 1. */
|
||||
typedef int SItype __attribute__ ((mode (SI)));
|
||||
typedef int SItype __attribute__ ((mode (SI)));
|
||||
typedef unsigned int USItype __attribute__ ((mode (SI)));
|
||||
#if __SIZEOF_LONG_LONG__ > 4
|
||||
/* These typedefs are usually forbidden on archs with UNITS_PER_WORD 2. */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
|
||||
__weak void reset_cpu(void)
|
||||
__weak void reset_cpu(ulong addr)
|
||||
{
|
||||
/* Stop debug session here */
|
||||
__builtin_arc_brk();
|
||||
@@ -17,7 +17,7 @@ int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
{
|
||||
printf("Resetting the board...\n");
|
||||
|
||||
reset_cpu();
|
||||
reset_cpu(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
527
arch/arm/Kconfig
527
arch/arm/Kconfig
File diff suppressed because it is too large
Load Diff
@@ -18,11 +18,7 @@ arch-$(CONFIG_CPU_V7A) =$(call cc-option, -march=armv7-a, \
|
||||
$(call cc-option, -march=armv7))
|
||||
arch-$(CONFIG_CPU_V7M) =-march=armv7-m
|
||||
arch-$(CONFIG_CPU_V7R) =-march=armv7-r
|
||||
ifeq ($(CONFIG_ARM64_CRC32),y)
|
||||
arch-$(CONFIG_ARM64) =-march=armv8-a+crc
|
||||
else
|
||||
arch-$(CONFIG_ARM64) =-march=armv8-a
|
||||
endif
|
||||
|
||||
# On Tegra systems we must build SPL for the armv4 core on the device
|
||||
# but otherwise we can use the value in CONFIG_SYS_ARM_ARCH
|
||||
@@ -55,7 +51,6 @@ PLATFORM_CPPFLAGS += $(arch-y) $(tune-y)
|
||||
|
||||
# Machine directory name. This list is sorted alphanumerically
|
||||
# by CONFIG_* macro name.
|
||||
machine-$(CONFIG_ARCH_APPLE) += apple
|
||||
machine-$(CONFIG_ARCH_ASPEED) += aspeed
|
||||
machine-$(CONFIG_ARCH_AT91) += at91
|
||||
machine-$(CONFIG_ARCH_BCM283X) += bcm283x
|
||||
@@ -112,11 +107,11 @@ 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))
|
||||
ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_MX35)$(filter $(SOC), mx25 mx5 mx6 mx7 mx35 imx8m imx8 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))
|
||||
ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx7 mx7ulp mx31 mx35 mxs imx8m imx8 imxrt vf610))
|
||||
libs-y += arch/arm/mach-imx/
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -11,21 +11,13 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS_NON_EFI := -fno-pic -ffixed-r9 -ffunction-sections -fdata-sections \
|
||||
-fstack-protector-strong
|
||||
CFLAGS_NON_EFI := -fno-pic -ffixed-r9 -ffunction-sections -fdata-sections
|
||||
CFLAGS_EFI := -fpic -fshort-wchar
|
||||
|
||||
ifneq ($(CONFIG_LTO)$(CONFIG_USE_PRIVATE_LIBGCC),yy)
|
||||
LDFLAGS_FINAL += --gc-sections
|
||||
endif
|
||||
|
||||
ifndef CONFIG_LTO
|
||||
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
PLATFORM_RELFLAGS += -fno-common -ffixed-r9
|
||||
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections \
|
||||
-fno-common -ffixed-r9
|
||||
PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
|
||||
$(call cc-option,-mgeneral-regs-only) \
|
||||
$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
|
||||
|
||||
# LLVM support
|
||||
@@ -159,8 +151,7 @@ ifdef CONFIG_EFI_LOADER
|
||||
OBJCOPYFLAGS += -j .efi_runtime -j .efi_runtime_rel
|
||||
endif
|
||||
|
||||
ifdef CONFIG_MACH_IMX
|
||||
ifneq ($(CONFIG_IMX_CONFIG),"")
|
||||
ifneq ($(CONFIG_IMX_CONFIG),)
|
||||
ifdef CONFIG_SPL
|
||||
ifndef CONFIG_SPL_BUILD
|
||||
INPUTS-y += SPL
|
||||
@@ -176,7 +167,6 @@ ifneq ($(CONFIG_VF610),)
|
||||
INPUTS-y += u-boot.vyb
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
EFI_LDS := elf_arm_efi.lds
|
||||
EFI_CRT0 := crt0_arm_efi.o
|
||||
|
||||
@@ -7,3 +7,4 @@ extra-y = start.o
|
||||
|
||||
obj-y += ../arm11/
|
||||
obj-$(CONFIG_MX31) += mx31/
|
||||
obj-$(CONFIG_MX35) += mx35/
|
||||
|
||||
11
arch/arm/cpu/arm1136/mx35/Makefile
Normal file
11
arch/arm/cpu/arm1136/mx35/Makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# (C) Copyright 2000-2006
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# (C) Copyright 2008-2009 Freescale Semiconductor, Inc.
|
||||
|
||||
obj-y += generic.o
|
||||
obj-y += timer.o
|
||||
obj-y += mx35_sdram.o
|
||||
obj-y += relocate.o
|
||||
530
arch/arm/cpu/arm1136/mx35/generic.c
Normal file
530
arch/arm/cpu/arm1136/mx35/generic.c
Normal file
@@ -0,0 +1,530 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2007
|
||||
* Sascha Hauer, Pengutronix
|
||||
*
|
||||
* (C) Copyright 2008-2010 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <clock_legacy.h>
|
||||
#include <command.h>
|
||||
#include <div64.h>
|
||||
#include <init.h>
|
||||
#include <net.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
#include <linux/errno.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/arch/crm_regs.h>
|
||||
#include <asm/arch/clock.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
#ifdef CONFIG_FSL_ESDHC_IMX
|
||||
#include <fsl_esdhc_imx.h>
|
||||
#endif
|
||||
#include <netdev.h>
|
||||
#include <spl.h>
|
||||
|
||||
#define CLK_CODE(arm, ahb, sel) (((arm) << 16) + ((ahb) << 8) + (sel))
|
||||
#define CLK_CODE_ARM(c) (((c) >> 16) & 0xFF)
|
||||
#define CLK_CODE_AHB(c) (((c) >> 8) & 0xFF)
|
||||
#define CLK_CODE_PATH(c) ((c) & 0xFF)
|
||||
|
||||
#define CCM_GET_DIVIDER(x, m, o) (((x) & (m)) >> (o))
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC_IMX
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
#endif
|
||||
|
||||
static int g_clk_mux_auto[8] = {
|
||||
CLK_CODE(1, 3, 0), CLK_CODE(1, 2, 1), CLK_CODE(2, 1, 1), -1,
|
||||
CLK_CODE(1, 6, 0), CLK_CODE(1, 4, 1), CLK_CODE(2, 2, 1), -1,
|
||||
};
|
||||
|
||||
static int g_clk_mux_consumer[16] = {
|
||||
CLK_CODE(1, 4, 0), CLK_CODE(1, 3, 1), CLK_CODE(1, 3, 1), -1,
|
||||
-1, -1, CLK_CODE(4, 1, 0), CLK_CODE(1, 5, 0),
|
||||
CLK_CODE(1, 8, 1), CLK_CODE(1, 6, 1), CLK_CODE(2, 4, 0), -1,
|
||||
-1, -1, CLK_CODE(4, 2, 0), -1,
|
||||
};
|
||||
|
||||
static int hsp_div_table[3][16] = {
|
||||
{4, 3, 2, -1, -1, -1, 1, 5, 4, 3, 2, -1, -1, -1, 1, -1},
|
||||
{-1, -1, -1, -1, -1, -1, -1, -1, 8, 6, 4, -1, -1, -1, 2, -1},
|
||||
{3, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1},
|
||||
};
|
||||
|
||||
u32 get_cpu_rev(void)
|
||||
{
|
||||
int reg;
|
||||
struct iim_regs *iim =
|
||||
(struct iim_regs *)IIM_BASE_ADDR;
|
||||
reg = readl(&iim->iim_srev);
|
||||
if (!reg) {
|
||||
reg = readw(ROMPATCH_REV);
|
||||
reg <<= 4;
|
||||
} else {
|
||||
reg += CHIP_REV_1_0;
|
||||
}
|
||||
|
||||
return 0x35000 + (reg & 0xFF);
|
||||
}
|
||||
|
||||
static u32 get_arm_div(u32 pdr0, u32 *fi, u32 *fd)
|
||||
{
|
||||
int *pclk_mux;
|
||||
if (pdr0 & MXC_CCM_PDR0_AUTO_CON) {
|
||||
pclk_mux = g_clk_mux_consumer +
|
||||
((pdr0 & MXC_CCM_PDR0_CON_MUX_DIV_MASK) >>
|
||||
MXC_CCM_PDR0_CON_MUX_DIV_OFFSET);
|
||||
} else {
|
||||
pclk_mux = g_clk_mux_auto +
|
||||
((pdr0 & MXC_CCM_PDR0_AUTO_MUX_DIV_MASK) >>
|
||||
MXC_CCM_PDR0_AUTO_MUX_DIV_OFFSET);
|
||||
}
|
||||
|
||||
if ((*pclk_mux) == -1)
|
||||
return -1;
|
||||
|
||||
if (fi && fd) {
|
||||
if (!CLK_CODE_PATH(*pclk_mux)) {
|
||||
*fi = *fd = 1;
|
||||
return CLK_CODE_ARM(*pclk_mux);
|
||||
}
|
||||
if (pdr0 & MXC_CCM_PDR0_AUTO_CON) {
|
||||
*fi = 3;
|
||||
*fd = 4;
|
||||
} else {
|
||||
*fi = 2;
|
||||
*fd = 3;
|
||||
}
|
||||
}
|
||||
return CLK_CODE_ARM(*pclk_mux);
|
||||
}
|
||||
|
||||
static int get_ahb_div(u32 pdr0)
|
||||
{
|
||||
int *pclk_mux;
|
||||
|
||||
pclk_mux = g_clk_mux_consumer +
|
||||
((pdr0 & MXC_CCM_PDR0_CON_MUX_DIV_MASK) >>
|
||||
MXC_CCM_PDR0_CON_MUX_DIV_OFFSET);
|
||||
|
||||
if ((*pclk_mux) == -1)
|
||||
return -1;
|
||||
|
||||
return CLK_CODE_AHB(*pclk_mux);
|
||||
}
|
||||
|
||||
static u32 decode_pll(u32 reg, u32 infreq)
|
||||
{
|
||||
u32 mfi = (reg >> 10) & 0xf;
|
||||
s32 mfn = reg & 0x3ff;
|
||||
u32 mfd = (reg >> 16) & 0x3ff;
|
||||
u32 pd = (reg >> 26) & 0xf;
|
||||
|
||||
mfi = mfi <= 5 ? 5 : mfi;
|
||||
mfn = mfn >= 512 ? mfn - 1024 : mfn;
|
||||
mfd += 1;
|
||||
pd += 1;
|
||||
|
||||
return lldiv(2 * (u64)infreq * (mfi * mfd + mfn),
|
||||
mfd * pd);
|
||||
}
|
||||
|
||||
static u32 get_mcu_main_clk(void)
|
||||
{
|
||||
u32 arm_div = 0, fi = 0, fd = 0;
|
||||
struct ccm_regs *ccm =
|
||||
(struct ccm_regs *)IMX_CCM_BASE;
|
||||
arm_div = get_arm_div(readl(&ccm->pdr0), &fi, &fd);
|
||||
fi *= decode_pll(readl(&ccm->mpctl), MXC_HCLK);
|
||||
return fi / (arm_div * fd);
|
||||
}
|
||||
|
||||
static u32 get_ipg_clk(void)
|
||||
{
|
||||
u32 freq = get_mcu_main_clk();
|
||||
struct ccm_regs *ccm =
|
||||
(struct ccm_regs *)IMX_CCM_BASE;
|
||||
u32 pdr0 = readl(&ccm->pdr0);
|
||||
|
||||
return freq / (get_ahb_div(pdr0) * 2);
|
||||
}
|
||||
|
||||
static u32 get_ipg_per_clk(void)
|
||||
{
|
||||
u32 freq = get_mcu_main_clk();
|
||||
struct ccm_regs *ccm =
|
||||
(struct ccm_regs *)IMX_CCM_BASE;
|
||||
u32 pdr0 = readl(&ccm->pdr0);
|
||||
u32 pdr4 = readl(&ccm->pdr4);
|
||||
u32 div;
|
||||
if (pdr0 & MXC_CCM_PDR0_PER_SEL) {
|
||||
div = CCM_GET_DIVIDER(pdr4,
|
||||
MXC_CCM_PDR4_PER0_PODF_MASK,
|
||||
MXC_CCM_PDR4_PER0_PODF_OFFSET) + 1;
|
||||
} else {
|
||||
div = CCM_GET_DIVIDER(pdr0,
|
||||
MXC_CCM_PDR0_PER_PODF_MASK,
|
||||
MXC_CCM_PDR0_PER_PODF_OFFSET) + 1;
|
||||
div *= get_ahb_div(pdr0);
|
||||
}
|
||||
return freq / div;
|
||||
}
|
||||
|
||||
u32 imx_get_uartclk(void)
|
||||
{
|
||||
u32 freq;
|
||||
struct ccm_regs *ccm =
|
||||
(struct ccm_regs *)IMX_CCM_BASE;
|
||||
u32 pdr4 = readl(&ccm->pdr4);
|
||||
|
||||
if (readl(&ccm->pdr3) & MXC_CCM_PDR3_UART_M_U)
|
||||
freq = get_mcu_main_clk();
|
||||
else
|
||||
freq = decode_pll(readl(&ccm->ppctl), MXC_HCLK);
|
||||
freq /= CCM_GET_DIVIDER(pdr4,
|
||||
MXC_CCM_PDR4_UART_PODF_MASK,
|
||||
MXC_CCM_PDR4_UART_PODF_OFFSET) + 1;
|
||||
return freq;
|
||||
}
|
||||
|
||||
unsigned int mxc_get_main_clock(enum mxc_main_clock clk)
|
||||
{
|
||||
u32 nfc_pdf, hsp_podf;
|
||||
u32 pll, ret_val = 0, usb_podf;
|
||||
struct ccm_regs *ccm =
|
||||
(struct ccm_regs *)IMX_CCM_BASE;
|
||||
|
||||
u32 reg = readl(&ccm->pdr0);
|
||||
u32 reg4 = readl(&ccm->pdr4);
|
||||
|
||||
reg |= 0x1;
|
||||
|
||||
switch (clk) {
|
||||
case CPU_CLK:
|
||||
ret_val = get_mcu_main_clk();
|
||||
break;
|
||||
case AHB_CLK:
|
||||
ret_val = get_mcu_main_clk();
|
||||
break;
|
||||
case HSP_CLK:
|
||||
if (reg & CLKMODE_CONSUMER) {
|
||||
hsp_podf = (reg >> 20) & 0x3;
|
||||
pll = get_mcu_main_clk();
|
||||
hsp_podf = hsp_div_table[hsp_podf][(reg>>16)&0xF];
|
||||
if (hsp_podf > 0) {
|
||||
ret_val = pll / hsp_podf;
|
||||
} else {
|
||||
puts("mismatch HSP with ARM clock setting\n");
|
||||
ret_val = 0;
|
||||
}
|
||||
} else {
|
||||
ret_val = get_mcu_main_clk();
|
||||
}
|
||||
break;
|
||||
case IPG_CLK:
|
||||
ret_val = get_ipg_clk();
|
||||
break;
|
||||
case IPG_PER_CLK:
|
||||
ret_val = get_ipg_per_clk();
|
||||
break;
|
||||
case NFC_CLK:
|
||||
nfc_pdf = (reg4 >> 28) & 0xF;
|
||||
pll = get_mcu_main_clk();
|
||||
/* AHB/nfc_pdf */
|
||||
ret_val = pll / (nfc_pdf + 1);
|
||||
break;
|
||||
case USB_CLK:
|
||||
usb_podf = (reg4 >> 22) & 0x3F;
|
||||
if (reg4 & 0x200)
|
||||
pll = get_mcu_main_clk();
|
||||
else
|
||||
pll = decode_pll(readl(&ccm->ppctl), MXC_HCLK);
|
||||
|
||||
ret_val = pll / (usb_podf + 1);
|
||||
break;
|
||||
default:
|
||||
printf("Unknown clock: %d\n", clk);
|
||||
break;
|
||||
}
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
unsigned int mxc_get_peri_clock(enum mxc_peri_clock clk)
|
||||
{
|
||||
u32 ret_val = 0, pdf, pre_pdf, clk_sel;
|
||||
struct ccm_regs *ccm =
|
||||
(struct ccm_regs *)IMX_CCM_BASE;
|
||||
u32 mpdr2 = readl(&ccm->pdr2);
|
||||
u32 mpdr3 = readl(&ccm->pdr3);
|
||||
u32 mpdr4 = readl(&ccm->pdr4);
|
||||
|
||||
switch (clk) {
|
||||
case UART1_BAUD:
|
||||
case UART2_BAUD:
|
||||
case UART3_BAUD:
|
||||
clk_sel = mpdr3 & (1 << 14);
|
||||
pdf = (mpdr4 >> 10) & 0x3F;
|
||||
ret_val = ((clk_sel != 0) ? mxc_get_main_clock(CPU_CLK) :
|
||||
decode_pll(readl(&ccm->ppctl), MXC_HCLK)) / (pdf + 1);
|
||||
break;
|
||||
case SSI1_BAUD:
|
||||
pre_pdf = (mpdr2 >> 24) & 0x7;
|
||||
pdf = mpdr2 & 0x3F;
|
||||
clk_sel = mpdr2 & (1 << 6);
|
||||
ret_val = ((clk_sel != 0) ? mxc_get_main_clock(CPU_CLK) :
|
||||
decode_pll(readl(&ccm->ppctl), MXC_HCLK)) /
|
||||
((pre_pdf + 1) * (pdf + 1));
|
||||
break;
|
||||
case SSI2_BAUD:
|
||||
pre_pdf = (mpdr2 >> 27) & 0x7;
|
||||
pdf = (mpdr2 >> 8) & 0x3F;
|
||||
clk_sel = mpdr2 & (1 << 6);
|
||||
ret_val = ((clk_sel != 0) ? mxc_get_main_clock(CPU_CLK) :
|
||||
decode_pll(readl(&ccm->ppctl), MXC_HCLK)) /
|
||||
((pre_pdf + 1) * (pdf + 1));
|
||||
break;
|
||||
case CSI_BAUD:
|
||||
clk_sel = mpdr2 & (1 << 7);
|
||||
pdf = (mpdr2 >> 16) & 0x3F;
|
||||
ret_val = ((clk_sel != 0) ? mxc_get_main_clock(CPU_CLK) :
|
||||
decode_pll(readl(&ccm->ppctl), MXC_HCLK)) / (pdf + 1);
|
||||
break;
|
||||
case MSHC_CLK:
|
||||
pre_pdf = readl(&ccm->pdr1);
|
||||
clk_sel = (pre_pdf & 0x80);
|
||||
pdf = (pre_pdf >> 22) & 0x3F;
|
||||
pre_pdf = (pre_pdf >> 28) & 0x7;
|
||||
ret_val = ((clk_sel != 0) ? mxc_get_main_clock(CPU_CLK) :
|
||||
decode_pll(readl(&ccm->ppctl), MXC_HCLK)) /
|
||||
((pre_pdf + 1) * (pdf + 1));
|
||||
break;
|
||||
case ESDHC1_CLK:
|
||||
clk_sel = mpdr3 & 0x40;
|
||||
pdf = mpdr3 & 0x3F;
|
||||
ret_val = ((clk_sel != 0) ? mxc_get_main_clock(CPU_CLK) :
|
||||
decode_pll(readl(&ccm->ppctl), MXC_HCLK)) / (pdf + 1);
|
||||
break;
|
||||
case ESDHC2_CLK:
|
||||
clk_sel = mpdr3 & 0x40;
|
||||
pdf = (mpdr3 >> 8) & 0x3F;
|
||||
ret_val = ((clk_sel != 0) ? mxc_get_main_clock(CPU_CLK) :
|
||||
decode_pll(readl(&ccm->ppctl), MXC_HCLK)) / (pdf + 1);
|
||||
break;
|
||||
case ESDHC3_CLK:
|
||||
clk_sel = mpdr3 & 0x40;
|
||||
pdf = (mpdr3 >> 16) & 0x3F;
|
||||
ret_val = ((clk_sel != 0) ? mxc_get_main_clock(CPU_CLK) :
|
||||
decode_pll(readl(&ccm->ppctl), MXC_HCLK)) / (pdf + 1);
|
||||
break;
|
||||
case SPDIF_CLK:
|
||||
clk_sel = mpdr3 & 0x400000;
|
||||
pre_pdf = (mpdr3 >> 29) & 0x7;
|
||||
pdf = (mpdr3 >> 23) & 0x3F;
|
||||
ret_val = ((clk_sel != 0) ? mxc_get_main_clock(CPU_CLK) :
|
||||
decode_pll(readl(&ccm->ppctl), MXC_HCLK)) /
|
||||
((pre_pdf + 1) * (pdf + 1));
|
||||
break;
|
||||
default:
|
||||
printf("%s(): This clock: %d not supported yet\n",
|
||||
__func__, clk);
|
||||
break;
|
||||
}
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
unsigned int mxc_get_clock(enum mxc_clock clk)
|
||||
{
|
||||
switch (clk) {
|
||||
case MXC_ARM_CLK:
|
||||
return get_mcu_main_clk();
|
||||
case MXC_AHB_CLK:
|
||||
break;
|
||||
case MXC_IPG_CLK:
|
||||
return get_ipg_clk();
|
||||
case MXC_IPG_PERCLK:
|
||||
case MXC_I2C_CLK:
|
||||
return get_ipg_per_clk();
|
||||
case MXC_UART_CLK:
|
||||
return imx_get_uartclk();
|
||||
case MXC_ESDHC1_CLK:
|
||||
return mxc_get_peri_clock(ESDHC1_CLK);
|
||||
case MXC_ESDHC2_CLK:
|
||||
return mxc_get_peri_clock(ESDHC2_CLK);
|
||||
case MXC_ESDHC3_CLK:
|
||||
return mxc_get_peri_clock(ESDHC3_CLK);
|
||||
case MXC_USB_CLK:
|
||||
return mxc_get_main_clock(USB_CLK);
|
||||
case MXC_FEC_CLK:
|
||||
return get_ipg_clk();
|
||||
case MXC_CSPI_CLK:
|
||||
return get_ipg_clk();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FEC_MXC
|
||||
/*
|
||||
* The MX35 has no fuse for MAC, return a NULL MAC
|
||||
*/
|
||||
void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
|
||||
{
|
||||
memset(mac, 0, 6);
|
||||
}
|
||||
|
||||
u32 imx_get_fecclk(void)
|
||||
{
|
||||
return mxc_get_clock(MXC_IPG_CLK);
|
||||
}
|
||||
#endif
|
||||
|
||||
int do_mx35_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
u32 cpufreq = get_mcu_main_clk();
|
||||
printf("mx35 cpu clock: %dMHz\n", cpufreq / 1000000);
|
||||
printf("ipg clock : %dHz\n", get_ipg_clk());
|
||||
printf("ipg per clock : %dHz\n", get_ipg_per_clk());
|
||||
printf("uart clock : %dHz\n", mxc_get_clock(MXC_UART_CLK));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
clocks, CONFIG_SYS_MAXARGS, 1, do_mx35_showclocks,
|
||||
"display clocks",
|
||||
""
|
||||
);
|
||||
|
||||
#if defined(CONFIG_DISPLAY_CPUINFO)
|
||||
static char *get_reset_cause(void)
|
||||
{
|
||||
/* read RCSR register from CCM module */
|
||||
struct ccm_regs *ccm =
|
||||
(struct ccm_regs *)IMX_CCM_BASE;
|
||||
|
||||
u32 cause = readl(&ccm->rcsr) & 0x0F;
|
||||
|
||||
switch (cause) {
|
||||
case 0x0000:
|
||||
return "POR";
|
||||
case 0x0002:
|
||||
return "JTAG";
|
||||
case 0x0004:
|
||||
return "RST";
|
||||
case 0x0008:
|
||||
return "WDOG";
|
||||
default:
|
||||
return "unknown reset";
|
||||
}
|
||||
}
|
||||
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
u32 srev = get_cpu_rev();
|
||||
|
||||
printf("CPU: Freescale i.MX35 rev %d.%d at %d MHz.\n",
|
||||
(srev & 0xF0) >> 4, (srev & 0x0F),
|
||||
get_mcu_main_clk() / 1000000);
|
||||
|
||||
printf("Reset cause: %s\n", get_reset_cause());
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initializes on-chip ethernet controllers.
|
||||
* to override, implement board_eth_init()
|
||||
*/
|
||||
int cpu_eth_init(struct bd_info *bis)
|
||||
{
|
||||
int rc = -ENODEV;
|
||||
|
||||
#if defined(CONFIG_FEC_MXC)
|
||||
rc = fecmxc_initialize(bis);
|
||||
#endif
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC_IMX
|
||||
/*
|
||||
* Initializes on-chip MMC controllers.
|
||||
* to override, implement board_mmc_init()
|
||||
*/
|
||||
int cpu_mmc_init(struct bd_info *bis)
|
||||
{
|
||||
return fsl_esdhc_mmc_init(bis);
|
||||
}
|
||||
#endif
|
||||
|
||||
int get_clocks(void)
|
||||
{
|
||||
#ifdef CONFIG_FSL_ESDHC_IMX
|
||||
#if CONFIG_SYS_FSL_ESDHC_ADDR == MMC_SDHC2_BASE_ADDR
|
||||
gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
|
||||
#elif CONFIG_SYS_FSL_ESDHC_ADDR == MMC_SDHC3_BASE_ADDR
|
||||
gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
|
||||
#else
|
||||
gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC1_CLK);
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define RCSR_MEM_CTL_WEIM 0
|
||||
#define RCSR_MEM_CTL_NAND 1
|
||||
#define RCSR_MEM_CTL_ATA 2
|
||||
#define RCSR_MEM_CTL_EXPANSION 3
|
||||
#define RCSR_MEM_TYPE_NOR 0
|
||||
#define RCSR_MEM_TYPE_ONENAND 2
|
||||
#define RCSR_MEM_TYPE_SD 0
|
||||
#define RCSR_MEM_TYPE_I2C 2
|
||||
#define RCSR_MEM_TYPE_SPI 3
|
||||
|
||||
u32 spl_boot_device(void)
|
||||
{
|
||||
struct ccm_regs *ccm =
|
||||
(struct ccm_regs *)IMX_CCM_BASE;
|
||||
|
||||
u32 rcsr = readl(&ccm->rcsr);
|
||||
u32 mem_type, mem_ctl;
|
||||
|
||||
/* In external mode, no boot device is returned */
|
||||
if ((rcsr >> 10) & 0x03)
|
||||
return BOOT_DEVICE_NONE;
|
||||
|
||||
mem_ctl = (rcsr >> 25) & 0x03;
|
||||
mem_type = (rcsr >> 23) & 0x03;
|
||||
|
||||
switch (mem_ctl) {
|
||||
case RCSR_MEM_CTL_WEIM:
|
||||
switch (mem_type) {
|
||||
case RCSR_MEM_TYPE_NOR:
|
||||
return BOOT_DEVICE_NOR;
|
||||
case RCSR_MEM_TYPE_ONENAND:
|
||||
return BOOT_DEVICE_ONENAND;
|
||||
default:
|
||||
return BOOT_DEVICE_NONE;
|
||||
}
|
||||
case RCSR_MEM_CTL_NAND:
|
||||
return BOOT_DEVICE_NAND;
|
||||
case RCSR_MEM_CTL_EXPANSION:
|
||||
switch (mem_type) {
|
||||
case RCSR_MEM_TYPE_SD:
|
||||
return BOOT_DEVICE_MMC1;
|
||||
case RCSR_MEM_TYPE_I2C:
|
||||
return BOOT_DEVICE_I2C;
|
||||
case RCSR_MEM_TYPE_SPI:
|
||||
return BOOT_DEVICE_SPI;
|
||||
default:
|
||||
return BOOT_DEVICE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
return BOOT_DEVICE_NONE;
|
||||
}
|
||||
120
arch/arm/cpu/arm1136/mx35/mx35_sdram.c
Normal file
120
arch/arm/cpu/arm1136/mx35/mx35_sdram.c
Normal file
@@ -0,0 +1,120 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2012, Stefano Babic <sbabic@denx.de>
|
||||
*/
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <linux/errno.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
|
||||
#define ESDCTL_DDR2_EMR2 0x04000000
|
||||
#define ESDCTL_DDR2_EMR3 0x06000000
|
||||
#define ESDCTL_PRECHARGE 0x00000400
|
||||
#define ESDCTL_DDR2_EN_DLL 0x02000400
|
||||
#define ESDCTL_DDR2_RESET_DLL 0x00000333
|
||||
#define ESDCTL_DDR2_MR 0x00000233
|
||||
#define ESDCTL_DDR2_OCD_DEFAULT 0x02000780
|
||||
|
||||
enum {
|
||||
SMODE_NORMAL = 0,
|
||||
SMODE_PRECHARGE,
|
||||
SMODE_AUTO_REFRESH,
|
||||
SMODE_LOAD_REG,
|
||||
SMODE_MANUAL_REFRESH
|
||||
};
|
||||
|
||||
#define set_mode(x, en, m) (x | (en << 31) | (m << 28))
|
||||
|
||||
static inline void dram_wait(unsigned int count)
|
||||
{
|
||||
volatile unsigned int wait = count;
|
||||
|
||||
while (wait--)
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
void mx3_setup_sdram_bank(u32 start_address, u32 ddr2_config,
|
||||
u32 row, u32 col, u32 dsize, u32 refresh)
|
||||
{
|
||||
struct esdc_regs *esdc = (struct esdc_regs *)ESDCTL_BASE_ADDR;
|
||||
u32 *cfg_reg, *ctl_reg;
|
||||
u32 val;
|
||||
u32 ctlval;
|
||||
|
||||
switch (start_address) {
|
||||
case CSD0_BASE_ADDR:
|
||||
cfg_reg = &esdc->esdcfg0;
|
||||
ctl_reg = &esdc->esdctl0;
|
||||
break;
|
||||
case CSD1_BASE_ADDR:
|
||||
cfg_reg = &esdc->esdcfg1;
|
||||
ctl_reg = &esdc->esdctl1;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
/* The MX35 supports 11 up to 14 rows */
|
||||
if (row < 11 || row > 14 || col < 8 || col > 10)
|
||||
return;
|
||||
ctlval = (row - 11) << 24 | (col - 8) << 20 | (dsize << 16);
|
||||
|
||||
/* Initialize MISC register for DDR2 */
|
||||
val = ESDC_MISC_RST | ESDC_MISC_MDDR_EN | ESDC_MISC_MDDR_DL_RST |
|
||||
ESDC_MISC_DDR_EN | ESDC_MISC_DDR2_EN;
|
||||
writel(val, &esdc->esdmisc);
|
||||
val &= ~(ESDC_MISC_RST | ESDC_MISC_MDDR_DL_RST);
|
||||
writel(val, &esdc->esdmisc);
|
||||
|
||||
/*
|
||||
* according to DDR2 specs, wait a while before
|
||||
* the PRECHARGE_ALL command
|
||||
*/
|
||||
dram_wait(0x20000);
|
||||
|
||||
/* Load DDR2 config and timing */
|
||||
writel(ddr2_config, cfg_reg);
|
||||
|
||||
/* Precharge ALL */
|
||||
writel(set_mode(ctlval, 1, SMODE_PRECHARGE),
|
||||
ctl_reg);
|
||||
writel(0xda, start_address + ESDCTL_PRECHARGE);
|
||||
|
||||
/* Load mode */
|
||||
writel(set_mode(ctlval, 1, SMODE_LOAD_REG),
|
||||
ctl_reg);
|
||||
writeb(0xda, start_address + ESDCTL_DDR2_EMR2); /* EMRS2 */
|
||||
writeb(0xda, start_address + ESDCTL_DDR2_EMR3); /* EMRS3 */
|
||||
writeb(0xda, start_address + ESDCTL_DDR2_EN_DLL); /* Enable DLL */
|
||||
writeb(0xda, start_address + ESDCTL_DDR2_RESET_DLL); /* Reset DLL */
|
||||
|
||||
/* Precharge ALL */
|
||||
writel(set_mode(ctlval, 1, SMODE_PRECHARGE),
|
||||
ctl_reg);
|
||||
writel(0xda, start_address + ESDCTL_PRECHARGE);
|
||||
|
||||
/* Set mode auto refresh : at least two refresh are required */
|
||||
writel(set_mode(ctlval, 1, SMODE_AUTO_REFRESH),
|
||||
ctl_reg);
|
||||
writel(0xda, start_address);
|
||||
writel(0xda, start_address);
|
||||
|
||||
writel(set_mode(ctlval, 1, SMODE_LOAD_REG),
|
||||
ctl_reg);
|
||||
writeb(0xda, start_address + ESDCTL_DDR2_MR);
|
||||
writeb(0xda, start_address + ESDCTL_DDR2_OCD_DEFAULT);
|
||||
|
||||
/* OCD mode exit */
|
||||
writeb(0xda, start_address + ESDCTL_DDR2_EN_DLL); /* Enable DLL */
|
||||
|
||||
/* Set normal mode */
|
||||
writel(set_mode(ctlval, 1, SMODE_NORMAL) | refresh,
|
||||
ctl_reg);
|
||||
|
||||
dram_wait(0x20000);
|
||||
|
||||
/* Do not set delay lines, only for MDDR */
|
||||
}
|
||||
22
arch/arm/cpu/arm1136/mx35/relocate.S
Normal file
22
arch/arm/cpu/arm1136/mx35/relocate.S
Normal file
@@ -0,0 +1,22 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* relocate - i.MX35-specific vector relocation
|
||||
*
|
||||
* Copyright (c) 2013 Albert ARIBAUD <albert.u.boot@aribaud.net>
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
/*
|
||||
* The i.MX35 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, so let's avoid relocating the vectors.
|
||||
*/
|
||||
.section .text.relocate_vectors,"ax",%progbits
|
||||
|
||||
ENTRY(relocate_vectors)
|
||||
|
||||
bx lr
|
||||
|
||||
ENDPROC(relocate_vectors)
|
||||
46
arch/arm/cpu/arm1136/mx35/timer.c
Normal file
46
arch/arm/cpu/arm1136/mx35/timer.c
Normal file
@@ -0,0 +1,46 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2007
|
||||
* Sascha Hauer, Pengutronix
|
||||
*
|
||||
* (C) Copyright 2008-2009 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/arch/crm_regs.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
/* General purpose timers bitfields */
|
||||
#define GPTCR_SWR (1<<15) /* Software reset */
|
||||
#define GPTCR_FRR (1<<9) /* Freerun / restart */
|
||||
#define GPTCR_CLKSOURCE_32 (4<<6) /* Clock source */
|
||||
#define GPTCR_TEN (1) /* Timer enable */
|
||||
|
||||
/*
|
||||
* nothing really to do with interrupts, just starts up a counter.
|
||||
* The 32KHz 32-bit timer overruns in 134217 seconds
|
||||
*/
|
||||
int timer_init(void)
|
||||
{
|
||||
int i;
|
||||
struct gpt_regs *gpt = (struct gpt_regs *)GPT1_BASE_ADDR;
|
||||
struct ccm_regs *ccm = (struct ccm_regs *)CCM_BASE_ADDR;
|
||||
|
||||
/* setup GP Timer 1 */
|
||||
writel(GPTCR_SWR, &gpt->ctrl);
|
||||
|
||||
writel(readl(&ccm->cgr1) | 3 << MXC_CCM_CGR1_GPT_OFFSET, &ccm->cgr1);
|
||||
|
||||
for (i = 0; i < 100; i++)
|
||||
writel(0, &gpt->ctrl); /* We have no udelay by now */
|
||||
writel(0, &gpt->pre); /* prescaler = 1 */
|
||||
/* Freerun Mode, 32KHz input */
|
||||
writel(readl(&gpt->ctrl) | GPTCR_CLKSOURCE_32 | GPTCR_FRR,
|
||||
&gpt->ctrl);
|
||||
writel(readl(&gpt->ctrl) | GPTCR_TEN, &gpt->ctrl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -39,7 +39,7 @@ reset:
|
||||
msr cpsr,r0
|
||||
|
||||
/* the mask ROM code should have PLL and others stable */
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
bl cpu_init_crit
|
||||
#endif
|
||||
|
||||
@@ -62,7 +62,7 @@ c_runtime_cpu_setup:
|
||||
*
|
||||
*************************************************************************
|
||||
*/
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
cpu_init_crit:
|
||||
/*
|
||||
* flush v4 I/D caches
|
||||
@@ -81,7 +81,7 @@ cpu_init_crit:
|
||||
orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache
|
||||
mcr p15, 0, r0, c1, c0, 0
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
/*
|
||||
* Jump to board specific initialization... The Mask ROM will have already initialized
|
||||
* basic memory. Go here to bump up clock rate and handle wake up conditions.
|
||||
@@ -91,4 +91,4 @@ cpu_init_crit:
|
||||
mov lr, ip /* restore link */
|
||||
#endif
|
||||
mov pc, lr /* back to my caller */
|
||||
#endif /* !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
|
||||
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
|
||||
|
||||
@@ -37,8 +37,8 @@ reset:
|
||||
* we do sys-critical inits only at reboot,
|
||||
* not when booting from ram!
|
||||
*/
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \
|
||||
!CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
|
||||
#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \
|
||||
!defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
|
||||
bl cpu_init_crit
|
||||
#endif
|
||||
|
||||
@@ -62,8 +62,8 @@ c_runtime_cpu_setup:
|
||||
*************************************************************************
|
||||
*/
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \
|
||||
!CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
|
||||
#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \
|
||||
!defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
|
||||
cpu_init_crit:
|
||||
|
||||
mov ip, lr
|
||||
@@ -76,4 +76,4 @@ cpu_init_crit:
|
||||
mov lr, ip
|
||||
|
||||
mov pc, lr
|
||||
#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
|
||||
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <asm/io.h>
|
||||
|
||||
/* We reset the CPU by generating a 1-->0 transition on DeviceCfg bit 31. */
|
||||
extern void reset_cpu(void)
|
||||
extern void reset_cpu(ulong addr)
|
||||
{
|
||||
struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
|
||||
uint32_t value;
|
||||
|
||||
@@ -81,7 +81,7 @@ ulong get_tbclk(void)
|
||||
/*
|
||||
* Reset the cpu by setting up the watchdog timer and let him time out
|
||||
*/
|
||||
void reset_cpu(void)
|
||||
void reset_cpu(ulong ignored)
|
||||
{
|
||||
/* Disable watchdog and set Time-Out field to 0 */
|
||||
WCR = 0x00000000;
|
||||
|
||||
@@ -35,11 +35,25 @@ reset:
|
||||
orr r0, r0, #0xd3
|
||||
msr cpsr, r0
|
||||
|
||||
#if defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK)
|
||||
/*
|
||||
* relocate exception table
|
||||
*/
|
||||
ldr r0, =_start
|
||||
ldr r1, =0x0
|
||||
mov r2, #16
|
||||
copyex:
|
||||
subs r2, r2, #1
|
||||
ldr r3, [r0], #4
|
||||
str r3, [r1], #4
|
||||
bne copyex
|
||||
#endif
|
||||
|
||||
/*
|
||||
* we do sys-critical inits only at reboot,
|
||||
* not when booting from ram!
|
||||
*/
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
bl cpu_init_crit
|
||||
#endif
|
||||
|
||||
@@ -64,7 +78,7 @@ c_runtime_cpu_setup:
|
||||
*/
|
||||
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
cpu_init_crit:
|
||||
/*
|
||||
* flush v4 I/D caches
|
||||
@@ -83,7 +97,7 @@ cpu_init_crit:
|
||||
orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache
|
||||
mcr p15, 0, r0, c1, c0, 0
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
/*
|
||||
* before relocating, we have to setup RAM timing
|
||||
* because memory timing is board-dependend, you will
|
||||
@@ -95,4 +109,4 @@ cpu_init_crit:
|
||||
mov lr, ip
|
||||
#endif
|
||||
mov pc, lr
|
||||
#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
|
||||
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
|
||||
|
||||
@@ -12,6 +12,8 @@ extra-y :=
|
||||
endif
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_ARMADA100) += armada100/
|
||||
obj-$(CONFIG_MX25) += mx25/
|
||||
obj-$(CONFIG_MX27) += mx27/
|
||||
obj-$(if $(filter mxs,$(SOC)),y) += mxs/
|
||||
obj-$(if $(filter spear,$(SOC)),y) += spear/
|
||||
@@ -23,8 +25,6 @@ ifndef CONFIG_HAS_THUMB2
|
||||
|
||||
CFLAGS_cpu.o := -marm
|
||||
CFLAGS_cache.o := -marm
|
||||
CFLAGS_REMOVE_cpu.o := $(LTO_CFLAGS)
|
||||
CFLAGS_REMOVE_cache.o := $(LTO_CFLAGS)
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
7
arch/arm/cpu/arm926ejs/armada100/Makefile
Normal file
7
arch/arm/cpu/arm926ejs/armada100/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# (C) Copyright 2010
|
||||
# Marvell Semiconductor <www.marvell.com>
|
||||
# Written-by: Prafulla Wadaskar <prafulla@marvell.com>
|
||||
|
||||
obj-y = cpu.o timer.o dram.o
|
||||
93
arch/arm/cpu/arm926ejs/armada100/cpu.c
Normal file
93
arch/arm/cpu/arm926ejs/armada100/cpu.c
Normal file
@@ -0,0 +1,93 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2010
|
||||
* Marvell Semiconductor <www.marvell.com>
|
||||
* Written-by: Prafulla Wadaskar <prafulla@marvell.com>
|
||||
* Contributor: Mahavir Jain <mjain@marvell.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <init.h>
|
||||
#include <asm/arch/cpu.h>
|
||||
#include <asm/arch/armada100.h>
|
||||
|
||||
#define UARTCLK14745KHZ (APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1))
|
||||
#define SET_MRVL_ID (1<<8)
|
||||
#define L2C_RAM_SEL (1<<4)
|
||||
|
||||
int arch_cpu_init(void)
|
||||
{
|
||||
u32 val;
|
||||
struct armd1cpu_registers *cpuregs =
|
||||
(struct armd1cpu_registers *) ARMD1_CPU_BASE;
|
||||
|
||||
struct armd1apb1_registers *apb1clkres =
|
||||
(struct armd1apb1_registers *) ARMD1_APBC1_BASE;
|
||||
|
||||
struct armd1mpmu_registers *mpmu =
|
||||
(struct armd1mpmu_registers *) ARMD1_MPMU_BASE;
|
||||
|
||||
/* set SEL_MRVL_ID bit in ARMADA100_CPU_CONF register */
|
||||
val = readl(&cpuregs->cpu_conf);
|
||||
val = val | SET_MRVL_ID;
|
||||
writel(val, &cpuregs->cpu_conf);
|
||||
|
||||
/* Enable Clocks for all hardware units */
|
||||
writel(0xFFFFFFFF, &mpmu->acgr);
|
||||
|
||||
/* Turn on AIB and AIB-APB Functional clock */
|
||||
writel(APBC_APBCLK | APBC_FNCLK, &apb1clkres->aib);
|
||||
|
||||
/* ensure L2 cache is not mapped as SRAM */
|
||||
val = readl(&cpuregs->cpu_conf);
|
||||
val = val & ~(L2C_RAM_SEL);
|
||||
writel(val, &cpuregs->cpu_conf);
|
||||
|
||||
/* Enable GPIO clock */
|
||||
writel(APBC_APBCLK, &apb1clkres->gpio);
|
||||
|
||||
#ifdef CONFIG_I2C_MV
|
||||
/* Enable general I2C clock */
|
||||
writel(APBC_RST | APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi0);
|
||||
writel(APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi0);
|
||||
|
||||
/* Enable power I2C clock */
|
||||
writel(APBC_RST | APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi1);
|
||||
writel(APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi1);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Enable Functional and APB clock at 14.7456MHz
|
||||
* for configured UART console
|
||||
*/
|
||||
#if (CONFIG_SYS_NS16550_COM1 == ARMD1_UART3_BASE)
|
||||
writel(UARTCLK14745KHZ, &apb1clkres->uart3);
|
||||
#elif (CONFIG_SYS_NS16550_COM1 == ARMD1_UART2_BASE)
|
||||
writel(UARTCLK14745KHZ, &apb1clkres->uart2);
|
||||
#else
|
||||
writel(UARTCLK14745KHZ, &apb1clkres->uart1);
|
||||
#endif
|
||||
icache_enable();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DISPLAY_CPUINFO)
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
u32 id;
|
||||
struct armd1cpu_registers *cpuregs =
|
||||
(struct armd1cpu_registers *) ARMD1_CPU_BASE;
|
||||
|
||||
id = readl(&cpuregs->chip_id);
|
||||
printf("SoC: Armada 88AP%X-%X\n", (id & 0xFFF), (id >> 0x10));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_I2C_MV
|
||||
void i2c_clk_enable(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
117
arch/arm/cpu/arm926ejs/armada100/dram.c
Normal file
117
arch/arm/cpu/arm926ejs/armada100/dram.c
Normal file
@@ -0,0 +1,117 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2010
|
||||
* Marvell Semiconductor <www.marvell.com>
|
||||
* Written-by: Prafulla Wadaskar <prafulla@marvell.com>,
|
||||
* Contributor: Mahavir Jain <mjain@marvell.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/armada100.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/*
|
||||
* ARMADA100 DRAM controller supports upto 8 banks
|
||||
* for chip select 0 and 1
|
||||
*/
|
||||
|
||||
/*
|
||||
* DDR Memory Control Registers
|
||||
* Refer Datasheet Appendix A.17
|
||||
*/
|
||||
struct armd1ddr_map_registers {
|
||||
u32 cs; /* Memory Address Map Register -CS */
|
||||
u32 pad[3];
|
||||
};
|
||||
|
||||
struct armd1ddr_registers {
|
||||
u8 pad[0x100 - 0x000];
|
||||
struct armd1ddr_map_registers mmap[2];
|
||||
};
|
||||
|
||||
/*
|
||||
* armd1_sdram_base - reads SDRAM Base Address Register
|
||||
*/
|
||||
u32 armd1_sdram_base(int chip_sel)
|
||||
{
|
||||
struct armd1ddr_registers *ddr_regs =
|
||||
(struct armd1ddr_registers *)ARMD1_DRAM_BASE;
|
||||
u32 result = 0;
|
||||
u32 CS_valid = 0x01 & readl(&ddr_regs->mmap[chip_sel].cs);
|
||||
|
||||
if (!CS_valid)
|
||||
return 0;
|
||||
|
||||
result = readl(&ddr_regs->mmap[chip_sel].cs) & 0xFF800000;
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* armd1_sdram_size - reads SDRAM size
|
||||
*/
|
||||
u32 armd1_sdram_size(int chip_sel)
|
||||
{
|
||||
struct armd1ddr_registers *ddr_regs =
|
||||
(struct armd1ddr_registers *)ARMD1_DRAM_BASE;
|
||||
u32 result = 0;
|
||||
u32 CS_valid = 0x01 & readl(&ddr_regs->mmap[chip_sel].cs);
|
||||
|
||||
if (!CS_valid)
|
||||
return 0;
|
||||
|
||||
result = readl(&ddr_regs->mmap[chip_sel].cs);
|
||||
result = (result >> 16) & 0xF;
|
||||
if (result < 0x7) {
|
||||
printf("Unknown DRAM Size\n");
|
||||
return -1;
|
||||
} else {
|
||||
return ((0x8 << (result - 0x7)) * 1024 * 1024);
|
||||
}
|
||||
}
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
gd->ram_size = 0;
|
||||
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
|
||||
gd->bd->bi_dram[i].start = armd1_sdram_base(i);
|
||||
gd->bd->bi_dram[i].size = armd1_sdram_size(i);
|
||||
/*
|
||||
* It is assumed that all memory banks are consecutive
|
||||
* and without gaps.
|
||||
* If the gap is found, ram_size will be reported for
|
||||
* consecutive memory only
|
||||
*/
|
||||
if (gd->bd->bi_dram[i].start != gd->ram_size)
|
||||
break;
|
||||
|
||||
gd->ram_size += gd->bd->bi_dram[i].size;
|
||||
|
||||
}
|
||||
|
||||
for (; i < CONFIG_NR_DRAM_BANKS; i++) {
|
||||
/* If above loop terminated prematurely, we need to set
|
||||
* remaining banks' start address & size as 0. Otherwise other
|
||||
* u-boot functions and Linux kernel gets wrong values which
|
||||
* could result in crash */
|
||||
gd->bd->bi_dram[i].start = 0;
|
||||
gd->bd->bi_dram[i].size = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* If this function is not defined here,
|
||||
* board.c alters dram bank zero configuration defined above.
|
||||
*/
|
||||
int dram_init_banksize(void)
|
||||
{
|
||||
dram_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
198
arch/arm/cpu/arm926ejs/armada100/timer.c
Normal file
198
arch/arm/cpu/arm926ejs/armada100/timer.c
Normal file
@@ -0,0 +1,198 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2010
|
||||
* Marvell Semiconductor <www.marvell.com>
|
||||
* Written-by: Prafulla Wadaskar <prafulla@marvell.com>
|
||||
* Contributor: Mahavir Jain <mjain@marvell.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <init.h>
|
||||
#include <time.h>
|
||||
#include <asm/arch/cpu.h>
|
||||
#include <asm/arch/armada100.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
/*
|
||||
* Timer registers
|
||||
* Refer Section A.6 in Datasheet
|
||||
*/
|
||||
struct armd1tmr_registers {
|
||||
u32 clk_ctrl; /* Timer clk control reg */
|
||||
u32 match[9]; /* Timer match registers */
|
||||
u32 count[3]; /* Timer count registers */
|
||||
u32 status[3];
|
||||
u32 ie[3];
|
||||
u32 preload[3]; /* Timer preload value */
|
||||
u32 preload_ctrl[3];
|
||||
u32 wdt_match_en;
|
||||
u32 wdt_match_r;
|
||||
u32 wdt_val;
|
||||
u32 wdt_sts;
|
||||
u32 icr[3];
|
||||
u32 wdt_icr;
|
||||
u32 cer; /* Timer count enable reg */
|
||||
u32 cmr;
|
||||
u32 ilr[3];
|
||||
u32 wcr;
|
||||
u32 wfar;
|
||||
u32 wsar;
|
||||
u32 cvwr;
|
||||
};
|
||||
|
||||
#define TIMER 0 /* Use TIMER 0 */
|
||||
/* Each timer has 3 match registers */
|
||||
#define MATCH_CMP(x) ((3 * TIMER) + x)
|
||||
#define TIMER_LOAD_VAL 0xffffffff
|
||||
#define COUNT_RD_REQ 0x1
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
/* Using gd->arch.tbu from timestamp and gd->arch.tbl for lastdec */
|
||||
|
||||
/* For preventing risk of instability in reading counter value,
|
||||
* first set read request to register cvwr and then read same
|
||||
* register after it captures counter value.
|
||||
*/
|
||||
ulong read_timer(void)
|
||||
{
|
||||
struct armd1tmr_registers *armd1timers =
|
||||
(struct armd1tmr_registers *) ARMD1_TIMER_BASE;
|
||||
volatile int loop=100;
|
||||
|
||||
writel(COUNT_RD_REQ, &armd1timers->cvwr);
|
||||
while (loop--);
|
||||
return(readl(&armd1timers->cvwr));
|
||||
}
|
||||
|
||||
static ulong get_timer_masked(void)
|
||||
{
|
||||
ulong now = read_timer();
|
||||
|
||||
if (now >= gd->arch.tbl) {
|
||||
/* normal mode */
|
||||
gd->arch.tbu += now - gd->arch.tbl;
|
||||
} else {
|
||||
/* we have an overflow ... */
|
||||
gd->arch.tbu += now + TIMER_LOAD_VAL - gd->arch.tbl;
|
||||
}
|
||||
gd->arch.tbl = now;
|
||||
|
||||
return gd->arch.tbu;
|
||||
}
|
||||
|
||||
ulong get_timer(ulong base)
|
||||
{
|
||||
return ((get_timer_masked() / (CONFIG_SYS_HZ_CLOCK / 1000)) -
|
||||
base);
|
||||
}
|
||||
|
||||
void __udelay(unsigned long usec)
|
||||
{
|
||||
ulong delayticks;
|
||||
ulong endtime;
|
||||
|
||||
delayticks = (usec * (CONFIG_SYS_HZ_CLOCK / 1000000));
|
||||
endtime = get_timer_masked() + delayticks;
|
||||
|
||||
while (get_timer_masked() < endtime);
|
||||
}
|
||||
|
||||
/*
|
||||
* init the Timer
|
||||
*/
|
||||
int timer_init(void)
|
||||
{
|
||||
struct armd1apb1_registers *apb1clkres =
|
||||
(struct armd1apb1_registers *) ARMD1_APBC1_BASE;
|
||||
struct armd1tmr_registers *armd1timers =
|
||||
(struct armd1tmr_registers *) ARMD1_TIMER_BASE;
|
||||
|
||||
/* Enable Timer clock at 3.25 MHZ */
|
||||
writel(APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(3), &apb1clkres->timers);
|
||||
|
||||
/* load value into timer */
|
||||
writel(0x0, &armd1timers->clk_ctrl);
|
||||
/* Use Timer 0 Match Resiger 0 */
|
||||
writel(TIMER_LOAD_VAL, &armd1timers->match[MATCH_CMP(0)]);
|
||||
/* Preload value is 0 */
|
||||
writel(0x0, &armd1timers->preload[TIMER]);
|
||||
/* Enable match comparator 0 for Timer 0 */
|
||||
writel(0x1, &armd1timers->preload_ctrl[TIMER]);
|
||||
|
||||
/* Enable timer 0 */
|
||||
writel(0x1, &armd1timers->cer);
|
||||
/* init the gd->arch.tbu and gd->arch.tbl value */
|
||||
gd->arch.tbl = read_timer();
|
||||
gd->arch.tbu = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define MPMU_APRR_WDTR (1<<4)
|
||||
#define TMR_WFAR 0xbaba /* WDT Register First key */
|
||||
#define TMP_WSAR 0xeb10 /* WDT Register Second key */
|
||||
|
||||
/*
|
||||
* This function uses internal Watchdog Timer
|
||||
* based reset mechanism.
|
||||
* Steps to write watchdog registers (protected access)
|
||||
* 1. Write key value to TMR_WFAR reg.
|
||||
* 2. Write key value to TMP_WSAR reg.
|
||||
* 3. Perform write operation.
|
||||
*/
|
||||
void reset_cpu(unsigned long ignored)
|
||||
{
|
||||
struct armd1mpmu_registers *mpmu =
|
||||
(struct armd1mpmu_registers *) ARMD1_MPMU_BASE;
|
||||
struct armd1tmr_registers *armd1timers =
|
||||
(struct armd1tmr_registers *) ARMD1_TIMER_BASE;
|
||||
u32 val;
|
||||
|
||||
/* negate hardware reset to the WDT after system reset */
|
||||
val = readl(&mpmu->aprr);
|
||||
val = val | MPMU_APRR_WDTR;
|
||||
writel(val, &mpmu->aprr);
|
||||
|
||||
/* reset/enable WDT clock */
|
||||
writel(APBC_APBCLK | APBC_FNCLK | APBC_RST, &mpmu->wdtpcr);
|
||||
readl(&mpmu->wdtpcr);
|
||||
writel(APBC_APBCLK | APBC_FNCLK, &mpmu->wdtpcr);
|
||||
readl(&mpmu->wdtpcr);
|
||||
|
||||
/* clear previous WDT status */
|
||||
writel(TMR_WFAR, &armd1timers->wfar);
|
||||
writel(TMP_WSAR, &armd1timers->wsar);
|
||||
writel(0, &armd1timers->wdt_sts);
|
||||
|
||||
/* set match counter */
|
||||
writel(TMR_WFAR, &armd1timers->wfar);
|
||||
writel(TMP_WSAR, &armd1timers->wsar);
|
||||
writel(0xf, &armd1timers->wdt_match_r);
|
||||
|
||||
/* enable WDT reset */
|
||||
writel(TMR_WFAR, &armd1timers->wfar);
|
||||
writel(TMP_WSAR, &armd1timers->wsar);
|
||||
writel(0x3, &armd1timers->wdt_match_en);
|
||||
|
||||
while(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 (ulong)CONFIG_SYS_HZ;
|
||||
}
|
||||
@@ -89,3 +89,4 @@ void enable_caches(void)
|
||||
dcache_enable();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
7
arch/arm/cpu/arm926ejs/mx25/Makefile
Normal file
7
arch/arm/cpu/arm926ejs/mx25/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
|
||||
274
arch/arm/cpu/arm926ejs/mx25/generic.c
Normal file
274
arch/arm/cpu/arm926ejs/mx25/generic.c
Normal file
@@ -0,0 +1,274 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2009 DENX Software Engineering
|
||||
* Author: John Rigby <jrigby@gmail.com>
|
||||
*
|
||||
* Based on mx27/generic.c:
|
||||
* Copyright (c) 2008 Eric Jarrige <eric.jarrige@armadeus.org>
|
||||
* Copyright (c) 2009 Ilya Yanok <yanok@emcraft.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <clock_legacy.h>
|
||||
#include <div64.h>
|
||||
#include <init.h>
|
||||
#include <net.h>
|
||||
#include <netdev.h>
|
||||
#include <vsprintf.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch-imx/cpu.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/arch/clock.h>
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC_IMX
|
||||
#include <fsl_esdhc_imx.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
#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 >> CCM_PLL_MFI_SHIFT)
|
||||
& CCM_PLL_MFI_MASK;
|
||||
int mfn = (pll >> CCM_PLL_MFN_SHIFT)
|
||||
& CCM_PLL_MFN_MASK;
|
||||
unsigned int mfd = (pll >> CCM_PLL_MFD_SHIFT)
|
||||
& CCM_PLL_MFD_MASK;
|
||||
unsigned int pd = (pll >> CCM_PLL_PD_SHIFT)
|
||||
& CCM_PLL_PD_MASK;
|
||||
|
||||
mfi = mfi <= 5 ? 5 : mfi;
|
||||
mfn = mfn >= 512 ? mfn - 1024 : mfn;
|
||||
mfd += 1;
|
||||
pd += 1;
|
||||
|
||||
return lldiv(2 * (u64) f_ref * (mfi * mfd + mfn),
|
||||
mfd * pd);
|
||||
}
|
||||
|
||||
static ulong imx_get_mpllclk(void)
|
||||
{
|
||||
struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
|
||||
ulong fref = MXC_HCLK;
|
||||
|
||||
return imx_decode_pll(readl(&ccm->mpctl), fref);
|
||||
}
|
||||
|
||||
static ulong imx_get_upllclk(void)
|
||||
{
|
||||
struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
|
||||
ulong fref = MXC_HCLK;
|
||||
|
||||
return imx_decode_pll(readl(&ccm->upctl), fref);
|
||||
}
|
||||
|
||||
static ulong imx_get_armclk(void)
|
||||
{
|
||||
struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
|
||||
ulong cctl = readl(&ccm->cctl);
|
||||
ulong fref = imx_get_mpllclk();
|
||||
ulong div;
|
||||
|
||||
if (cctl & CCM_CCTL_ARM_SRC)
|
||||
fref = lldiv((u64) fref * 3, 4);
|
||||
|
||||
div = ((cctl >> CCM_CCTL_ARM_DIV_SHIFT)
|
||||
& CCM_CCTL_ARM_DIV_MASK) + 1;
|
||||
|
||||
return fref / div;
|
||||
}
|
||||
|
||||
static ulong imx_get_ahbclk(void)
|
||||
{
|
||||
struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
|
||||
ulong cctl = readl(&ccm->cctl);
|
||||
ulong fref = imx_get_armclk();
|
||||
ulong div;
|
||||
|
||||
div = ((cctl >> CCM_CCTL_AHB_DIV_SHIFT)
|
||||
& CCM_CCTL_AHB_DIV_MASK) + 1;
|
||||
|
||||
return fref / div;
|
||||
}
|
||||
|
||||
static ulong imx_get_ipgclk(void)
|
||||
{
|
||||
return imx_get_ahbclk() / 2;
|
||||
}
|
||||
|
||||
static ulong imx_get_perclk(int clk)
|
||||
{
|
||||
struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
|
||||
ulong fref = readl(&ccm->mcr) & (1 << clk) ? imx_get_upllclk() :
|
||||
imx_get_ahbclk();
|
||||
ulong div;
|
||||
|
||||
div = readl(&ccm->pcdr[CCM_PERCLK_REG(clk)]);
|
||||
div = ((div >> CCM_PERCLK_SHIFT(clk)) & CCM_PERCLK_MASK) + 1;
|
||||
|
||||
return fref / div;
|
||||
}
|
||||
|
||||
int imx_set_perclk(enum mxc_clock clk, bool from_upll, unsigned int freq)
|
||||
{
|
||||
struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
|
||||
ulong fref = from_upll ? imx_get_upllclk() : imx_get_ahbclk();
|
||||
ulong div = (fref + freq - 1) / freq;
|
||||
|
||||
if (clk > MXC_UART_CLK || !div || --div > CCM_PERCLK_MASK)
|
||||
return -EINVAL;
|
||||
|
||||
clrsetbits_le32(&ccm->pcdr[CCM_PERCLK_REG(clk)],
|
||||
CCM_PERCLK_MASK << CCM_PERCLK_SHIFT(clk),
|
||||
div << CCM_PERCLK_SHIFT(clk));
|
||||
if (from_upll)
|
||||
setbits_le32(&ccm->mcr, 1 << clk);
|
||||
else
|
||||
clrbits_le32(&ccm->mcr, 1 << clk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned int mxc_get_clock(enum mxc_clock clk)
|
||||
{
|
||||
if (clk >= MXC_CLK_NUM)
|
||||
return -1;
|
||||
switch (clk) {
|
||||
case MXC_ARM_CLK:
|
||||
return imx_get_armclk();
|
||||
case MXC_AHB_CLK:
|
||||
return imx_get_ahbclk();
|
||||
case MXC_IPG_CLK:
|
||||
case MXC_CSPI_CLK:
|
||||
case MXC_FEC_CLK:
|
||||
return imx_get_ipgclk();
|
||||
default:
|
||||
return imx_get_perclk(clk);
|
||||
}
|
||||
}
|
||||
|
||||
u32 get_cpu_rev(void)
|
||||
{
|
||||
u32 srev;
|
||||
u32 system_rev = 0x25000;
|
||||
|
||||
/* read SREV register from IIM module */
|
||||
struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
|
||||
srev = readl(&iim->iim_srev);
|
||||
|
||||
switch (srev) {
|
||||
case 0x00:
|
||||
system_rev |= CHIP_REV_1_0;
|
||||
break;
|
||||
case 0x01:
|
||||
system_rev |= CHIP_REV_1_1;
|
||||
break;
|
||||
case 0x02:
|
||||
system_rev |= CHIP_REV_1_2;
|
||||
break;
|
||||
default:
|
||||
system_rev |= 0x8000;
|
||||
break;
|
||||
}
|
||||
|
||||
return system_rev;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DISPLAY_CPUINFO)
|
||||
static char *get_reset_cause(void)
|
||||
{
|
||||
/* read RCSR register from CCM module */
|
||||
struct ccm_regs *ccm =
|
||||
(struct ccm_regs *)IMX_CCM_BASE;
|
||||
|
||||
u32 cause = readl(&ccm->rcsr) & 0x0f;
|
||||
|
||||
if (cause == 0)
|
||||
return "POR";
|
||||
else if (cause == 1)
|
||||
return "RST";
|
||||
else if ((cause & 2) == 2)
|
||||
return "WDOG";
|
||||
else if ((cause & 4) == 4)
|
||||
return "SW RESET";
|
||||
else if ((cause & 8) == 8)
|
||||
return "JTAG";
|
||||
else
|
||||
return "unknown reset";
|
||||
|
||||
}
|
||||
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
char buf[32];
|
||||
u32 cpurev = get_cpu_rev();
|
||||
|
||||
printf("CPU: Freescale i.MX25 rev%d.%d%s at %s MHz\n",
|
||||
(cpurev & 0xF0) >> 4, (cpurev & 0x0F),
|
||||
((cpurev & 0x8000) ? " unknown" : ""),
|
||||
strmhz(buf, imx_get_armclk()));
|
||||
printf("Reset cause: %s\n", get_reset_cause());
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FEC_MXC)
|
||||
/*
|
||||
* Initializes on-chip ethernet controllers.
|
||||
* to override, implement board_eth_init()
|
||||
*/
|
||||
int cpu_eth_init(struct bd_info *bis)
|
||||
{
|
||||
struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
|
||||
ulong val;
|
||||
|
||||
val = readl(&ccm->cgr0);
|
||||
val |= (1 << 23);
|
||||
writel(val, &ccm->cgr0);
|
||||
return fecmxc_initialize(bis);
|
||||
}
|
||||
#endif
|
||||
|
||||
int get_clocks(void)
|
||||
{
|
||||
#ifdef CONFIG_FSL_ESDHC_IMX
|
||||
#if CONFIG_SYS_FSL_ESDHC_ADDR == IMX_MMC_SDHC2_BASE
|
||||
gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
|
||||
#else
|
||||
gd->arch.sdhc_clk = mxc_get_clock(MXC_ESDHC1_CLK);
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC_IMX
|
||||
/*
|
||||
* Initializes on-chip MMC controllers.
|
||||
* to override, implement board_mmc_init()
|
||||
*/
|
||||
int cpu_mmc_init(struct bd_info *bis)
|
||||
{
|
||||
return fsl_esdhc_mmc_init(bis);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FEC_MXC
|
||||
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[i] = readl(&fuse->mac_addr[i]) & 0xff;
|
||||
}
|
||||
#endif /* CONFIG_FEC_MXC */
|
||||
22
arch/arm/cpu/arm926ejs/mx25/relocate.S
Normal file
22
arch/arm/cpu/arm926ejs/mx25/relocate.S
Normal file
@@ -0,0 +1,22 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* relocate - i.MX25-specific vector relocation
|
||||
*
|
||||
* Copyright (c) 2013 Albert ARIBAUD <albert.u.boot@aribaud.net>
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
/*
|
||||
* The i.MX25 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, so let's avoid relocating the vectors.
|
||||
*/
|
||||
.section .text.relocate_vectors,"ax",%progbits
|
||||
|
||||
ENTRY(relocate_vectors)
|
||||
|
||||
bx lr
|
||||
|
||||
ENDPROC(relocate_vectors)
|
||||
40
arch/arm/cpu/arm926ejs/mx25/reset.c
Normal file
40
arch/arm/cpu/arm926ejs/mx25/reset.c
Normal file
@@ -0,0 +1,40 @@
|
||||
// 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(ulong ignored)
|
||||
{
|
||||
struct wdog_regs *regs = (struct wdog_regs *)IMX_WDT_BASE;
|
||||
/* Disable watchdog and set Time-Out field to 0 */
|
||||
writew(0, ®s->wcr);
|
||||
|
||||
/* Write Service Sequence */
|
||||
writew(WSR_UNLOCK1, ®s->wsr);
|
||||
writew(WSR_UNLOCK2, ®s->wsr);
|
||||
|
||||
/* Enable watchdog */
|
||||
writew(WCR_WDE, ®s->wcr);
|
||||
|
||||
while (1) ;
|
||||
}
|
||||
50
arch/arm/cpu/arm926ejs/mx25/timer.c
Normal file
50
arch/arm/cpu/arm926ejs/mx25/timer.c
Normal file
@@ -0,0 +1,50 @@
|
||||
// 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>
|
||||
*
|
||||
* (C) Copyright 2009 DENX Software Engineering
|
||||
* Author: John Rigby <jrigby@gmail.com>
|
||||
* Add support for MX25
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
/* nothing really to do with interrupts, just starts up a counter. */
|
||||
/* The 32KHz 32-bit timer overruns in 134217 seconds */
|
||||
int timer_init(void)
|
||||
{
|
||||
int i;
|
||||
struct gpt_regs *gpt = (struct gpt_regs *)IMX_GPT1_BASE;
|
||||
struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
|
||||
|
||||
/* setup GP Timer 1 */
|
||||
writel(GPT_CTRL_SWR, &gpt->ctrl);
|
||||
|
||||
writel(readl(&ccm->cgr1) | CCM_CGR1_GPT1, &ccm->cgr1);
|
||||
|
||||
for (i = 0; i < 100; i++)
|
||||
writel(0, &gpt->ctrl); /* We have no udelay by now */
|
||||
writel(0, &gpt->pre); /* prescaler = 1 */
|
||||
/* Freerun Mode, 32KHz input */
|
||||
writel(readl(&gpt->ctrl) | GPT_CTRL_CLKSOURCE_32 | GPT_CTRL_FRR,
|
||||
&gpt->ctrl);
|
||||
writel(readl(&gpt->ctrl) | GPT_CTRL_TEN, &gpt->ctrl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -23,7 +23,7 @@
|
||||
/*
|
||||
* Reset the cpu by setting up the watchdog timer and let it time out
|
||||
*/
|
||||
void reset_cpu(void)
|
||||
void reset_cpu(ulong ignored)
|
||||
{
|
||||
struct wdog_regs *regs = (struct wdog_regs *)IMX_WDT_BASE;
|
||||
/* Disable watchdog and set Time-Out field to 0 */
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <asm/arch/iomux.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
#include <asm/sections.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
@@ -33,9 +32,9 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
/* Lowlevel init isn't used on i.MX28, so just have a dummy here */
|
||||
__weak void lowlevel_init(void) {}
|
||||
|
||||
void reset_cpu(void) __attribute__((noreturn));
|
||||
void reset_cpu(ulong ignored) __attribute__((noreturn));
|
||||
|
||||
void reset_cpu(void)
|
||||
void reset_cpu(ulong ignored)
|
||||
{
|
||||
struct mxs_rtc_regs *rtc_regs =
|
||||
(struct mxs_rtc_regs *)MXS_RTC_BASE;
|
||||
@@ -99,6 +98,7 @@ int arch_cpu_init(void)
|
||||
{
|
||||
struct mxs_clkctrl_regs *clkctrl_regs =
|
||||
(struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
|
||||
extern uint32_t _start;
|
||||
|
||||
mx28_fixup_vt((uint32_t)&_start);
|
||||
|
||||
|
||||
@@ -16,14 +16,13 @@
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
#include <asm/gpio.h>
|
||||
#include <asm/sections.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
#include "mxs_init.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
static gd_t gdata __section(".data");
|
||||
#ifdef CONFIG_SPL_SERIAL
|
||||
#ifdef CONFIG_SPL_SERIAL_SUPPORT
|
||||
static struct bd_info bdata __section(".data");
|
||||
#endif
|
||||
|
||||
@@ -101,6 +100,7 @@ static void mxs_spl_fixup_vectors(void)
|
||||
* thus this fixup. Our vectoring table is PIC, so copying is
|
||||
* fine.
|
||||
*/
|
||||
extern uint32_t _start;
|
||||
|
||||
/* cppcheck-suppress nullPointer */
|
||||
memcpy(0x0, &_start, 0x60);
|
||||
@@ -108,7 +108,7 @@ static void mxs_spl_fixup_vectors(void)
|
||||
|
||||
static void mxs_spl_console_init(void)
|
||||
{
|
||||
#ifdef CONFIG_SPL_SERIAL
|
||||
#ifdef CONFIG_SPL_SERIAL_SUPPORT
|
||||
gd->bd = &bdata;
|
||||
gd->baudrate = CONFIG_BAUDRATE;
|
||||
serial_init();
|
||||
@@ -122,7 +122,7 @@ void mxs_common_spl_init(const uint32_t arg, const uint32_t *resptr,
|
||||
{
|
||||
struct mxs_spl_data *data = MXS_SPL_DATA;
|
||||
uint8_t bootmode = mxs_get_bootmode_index();
|
||||
set_gd(&gdata);
|
||||
gd = &gdata;
|
||||
|
||||
mxs_spl_fixup_vectors();
|
||||
|
||||
|
||||
21
arch/arm/cpu/arm926ejs/spear/Makefile
Normal file
21
arch/arm/cpu/arm926ejs/spear/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# (C) Copyright 2000-2006
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
|
||||
obj-y := cpu.o \
|
||||
reset.o \
|
||||
timer.o
|
||||
|
||||
ifdef CONFIG_SPL_BUILD
|
||||
obj-y += spl.o
|
||||
obj-$(CONFIG_SPEAR600) += spear600.o
|
||||
obj-$(CONFIG_DDR_MT47H64M16) += spr600_mt47h64m16_3_333_cl5_psync.o
|
||||
obj-$(CONFIG_DDR_MT47H32M16) += spr600_mt47h32m16_333_cl5_psync.o
|
||||
obj-$(CONFIG_DDR_MT47H32M16) += spr600_mt47h32m16_37e_166_cl4_sync.o
|
||||
obj-$(CONFIG_DDR_MT47H128M8) += spr600_mt47h128m8_3_266_cl5_async.o
|
||||
else
|
||||
obj-y += spr_misc.o spr_lowlevel_init.o
|
||||
endif
|
||||
|
||||
extra-$(CONFIG_SPL_BUILD) := start.o
|
||||
116
arch/arm/cpu/arm926ejs/spear/cpu.c
Normal file
116
arch/arm/cpu/arm926ejs/spear/cpu.c
Normal file
@@ -0,0 +1,116 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2010
|
||||
* Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <init.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/spr_misc.h>
|
||||
|
||||
int arch_cpu_init(void)
|
||||
{
|
||||
struct misc_regs *const misc_p =
|
||||
(struct misc_regs *)CONFIG_SPEAR_MISCBASE;
|
||||
u32 periph1_clken, periph_clk_cfg;
|
||||
|
||||
periph1_clken = readl(&misc_p->periph1_clken);
|
||||
|
||||
#if defined(CONFIG_SPEAR3XX)
|
||||
periph1_clken |= MISC_GPT2ENB;
|
||||
#elif defined(CONFIG_SPEAR600)
|
||||
periph1_clken |= MISC_GPT3ENB;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PL011_SERIAL)
|
||||
periph1_clken |= MISC_UART0ENB;
|
||||
|
||||
periph_clk_cfg = readl(&misc_p->periph_clk_cfg);
|
||||
periph_clk_cfg &= ~CONFIG_SPEAR_UARTCLKMSK;
|
||||
periph_clk_cfg |= CONFIG_SPEAR_UART48M;
|
||||
writel(periph_clk_cfg, &misc_p->periph_clk_cfg);
|
||||
#endif
|
||||
#if defined(CONFIG_ETH_DESIGNWARE)
|
||||
periph1_clken |= MISC_ETHENB;
|
||||
#endif
|
||||
#if defined(CONFIG_DW_UDC)
|
||||
periph1_clken |= MISC_USBDENB;
|
||||
#endif
|
||||
#if defined(CONFIG_SYS_I2C_DW)
|
||||
periph1_clken |= MISC_I2CENB;
|
||||
#endif
|
||||
#if defined(CONFIG_ST_SMI)
|
||||
periph1_clken |= MISC_SMIENB;
|
||||
#endif
|
||||
#if defined(CONFIG_NAND_FSMC)
|
||||
periph1_clken |= MISC_FSMCENB;
|
||||
#endif
|
||||
#if defined(CONFIG_USB_EHCI_SPEAR)
|
||||
periph1_clken |= PERIPH_USBH1 | PERIPH_USBH2;
|
||||
#endif
|
||||
#if defined(CONFIG_SPEAR_GPIO)
|
||||
periph1_clken |= MISC_GPIO3ENB | MISC_GPIO4ENB;
|
||||
#endif
|
||||
#if defined(CONFIG_PL022_SPI)
|
||||
periph1_clken |= MISC_SSP1ENB | MISC_SSP2ENB | MISC_SSP3ENB;
|
||||
#endif
|
||||
|
||||
writel(periph1_clken, &misc_p->periph1_clken);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DISPLAY_CPUINFO
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
#ifdef CONFIG_SPEAR300
|
||||
printf("CPU: SPEAr300\n");
|
||||
#elif defined(CONFIG_SPEAR310)
|
||||
printf("CPU: SPEAr310\n");
|
||||
#elif defined(CONFIG_SPEAR320)
|
||||
printf("CPU: SPEAr320\n");
|
||||
#elif defined(CONFIG_SPEAR600)
|
||||
printf("CPU: SPEAr600\n");
|
||||
#else
|
||||
#error CPU not supported in spear platform
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_ECC_BCH) && defined(CONFIG_NAND_FSMC)
|
||||
static int do_switch_ecc(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
if (argc != 2)
|
||||
goto usage;
|
||||
|
||||
if (strncmp(argv[1], "hw", 2) == 0) {
|
||||
/* 1-bit HW ECC */
|
||||
printf("Switching to 1-bit HW ECC\n");
|
||||
fsmc_nand_switch_ecc(1);
|
||||
} else if (strncmp(argv[1], "bch4", 2) == 0) {
|
||||
/* 4-bit SW ECC BCH4 */
|
||||
printf("Switching to 4-bit SW ECC (BCH4)\n");
|
||||
fsmc_nand_switch_ecc(4);
|
||||
} else {
|
||||
goto usage;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
usage:
|
||||
printf("Usage: nandecc %s\n", cmdtp->usage);
|
||||
return 1;
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
nandecc, 2, 0, do_switch_ecc,
|
||||
"switch NAND ECC calculation algorithm",
|
||||
"hw|bch4 - Switch between NAND hardware 1-bit HW and"
|
||||
" 4-bit SW BCH\n"
|
||||
);
|
||||
#endif
|
||||
39
arch/arm/cpu/arm926ejs/spear/reset.c
Normal file
39
arch/arm/cpu/arm926ejs/spear/reset.c
Normal file
@@ -0,0 +1,39 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2009
|
||||
* Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/spr_syscntl.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
void reset_cpu(ulong ignored)
|
||||
{
|
||||
struct syscntl_regs *syscntl_regs_p =
|
||||
(struct syscntl_regs *)CONFIG_SPEAR_SYSCNTLBASE;
|
||||
|
||||
printf("System is going to reboot ...\n");
|
||||
|
||||
/*
|
||||
* This 1 second delay will allow the above message
|
||||
* to be printed before reset
|
||||
*/
|
||||
udelay((1000 * 1000));
|
||||
|
||||
/* Going into slow mode before resetting SOC */
|
||||
writel(0x02, &syscntl_regs_p->scctrl);
|
||||
|
||||
/*
|
||||
* Writing any value to the system status register will
|
||||
* reset the SoC
|
||||
*/
|
||||
writel(0x00, &syscntl_regs_p->scsysstat);
|
||||
|
||||
/* system will restart */
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
223
arch/arm/cpu/arm926ejs/spear/spear600.c
Normal file
223
arch/arm/cpu/arm926ejs/spear/spear600.c
Normal file
@@ -0,0 +1,223 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2000-2009
|
||||
* Viresh Kumar, ST Microelectronics, viresh.kumar@st.com
|
||||
* Vipin Kumar, ST Microelectronics, vipin.kumar@st.com
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/spr_misc.h>
|
||||
#include <asm/arch/spr_defs.h>
|
||||
|
||||
void spear_late_init(void)
|
||||
{
|
||||
struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
|
||||
|
||||
writel(0x80000007, &misc_p->arb_icm_ml1);
|
||||
writel(0x80000007, &misc_p->arb_icm_ml2);
|
||||
writel(0x80000007, &misc_p->arb_icm_ml3);
|
||||
writel(0x80000007, &misc_p->arb_icm_ml4);
|
||||
writel(0x80000007, &misc_p->arb_icm_ml5);
|
||||
writel(0x80000007, &misc_p->arb_icm_ml6);
|
||||
writel(0x80000007, &misc_p->arb_icm_ml7);
|
||||
writel(0x80000007, &misc_p->arb_icm_ml8);
|
||||
writel(0x80000007, &misc_p->arb_icm_ml9);
|
||||
}
|
||||
|
||||
static void sel_1v8(void)
|
||||
{
|
||||
struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
|
||||
u32 ddr1v8, ddr2v5;
|
||||
|
||||
ddr2v5 = readl(&misc_p->ddr_2v5_compensation);
|
||||
ddr2v5 &= 0x8080ffc0;
|
||||
ddr2v5 |= 0x78000003;
|
||||
writel(ddr2v5, &misc_p->ddr_2v5_compensation);
|
||||
|
||||
ddr1v8 = readl(&misc_p->ddr_1v8_compensation);
|
||||
ddr1v8 &= 0x8080ffc0;
|
||||
ddr1v8 |= 0x78000010;
|
||||
writel(ddr1v8, &misc_p->ddr_1v8_compensation);
|
||||
|
||||
while (!(readl(&misc_p->ddr_1v8_compensation) & DDR_COMP_ACCURATE))
|
||||
;
|
||||
}
|
||||
|
||||
static void sel_2v5(void)
|
||||
{
|
||||
struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
|
||||
u32 ddr1v8, ddr2v5;
|
||||
|
||||
ddr1v8 = readl(&misc_p->ddr_1v8_compensation);
|
||||
ddr1v8 &= 0x8080ffc0;
|
||||
ddr1v8 |= 0x78000003;
|
||||
writel(ddr1v8, &misc_p->ddr_1v8_compensation);
|
||||
|
||||
ddr2v5 = readl(&misc_p->ddr_2v5_compensation);
|
||||
ddr2v5 &= 0x8080ffc0;
|
||||
ddr2v5 |= 0x78000010;
|
||||
writel(ddr2v5, &misc_p->ddr_2v5_compensation);
|
||||
|
||||
while (!(readl(&misc_p->ddr_2v5_compensation) & DDR_COMP_ACCURATE))
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
* plat_ddr_init:
|
||||
*/
|
||||
void plat_ddr_init(void)
|
||||
{
|
||||
struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
|
||||
u32 ddrpad;
|
||||
u32 core3v3, ddr1v8, ddr2v5;
|
||||
|
||||
/* DDR pad register configurations */
|
||||
ddrpad = readl(&misc_p->ddr_pad);
|
||||
ddrpad &= ~DDR_PAD_CNF_MSK;
|
||||
|
||||
#if (CONFIG_DDR_HCLK)
|
||||
ddrpad |= 0xEAAB;
|
||||
#elif (CONFIG_DDR_2HCLK)
|
||||
ddrpad |= 0xEAAD;
|
||||
#elif (CONFIG_DDR_PLL2)
|
||||
ddrpad |= 0xEAAD;
|
||||
#endif
|
||||
writel(ddrpad, &misc_p->ddr_pad);
|
||||
|
||||
/* Compensation register configurations */
|
||||
core3v3 = readl(&misc_p->core_3v3_compensation);
|
||||
core3v3 &= 0x8080ffe0;
|
||||
core3v3 |= 0x78000002;
|
||||
writel(core3v3, &misc_p->core_3v3_compensation);
|
||||
|
||||
ddr1v8 = readl(&misc_p->ddr_1v8_compensation);
|
||||
ddr1v8 &= 0x8080ffc0;
|
||||
ddr1v8 |= 0x78000004;
|
||||
writel(ddr1v8, &misc_p->ddr_1v8_compensation);
|
||||
|
||||
ddr2v5 = readl(&misc_p->ddr_2v5_compensation);
|
||||
ddr2v5 &= 0x8080ffc0;
|
||||
ddr2v5 |= 0x78000004;
|
||||
writel(ddr2v5, &misc_p->ddr_2v5_compensation);
|
||||
|
||||
if ((readl(&misc_p->ddr_pad) & DDR_PAD_SW_CONF) == DDR_PAD_SW_CONF) {
|
||||
/* Software memory configuration */
|
||||
if (readl(&misc_p->ddr_pad) & DDR_PAD_SSTL_SEL)
|
||||
sel_1v8();
|
||||
else
|
||||
sel_2v5();
|
||||
} else {
|
||||
/* Hardware memory configuration */
|
||||
if (readl(&misc_p->ddr_pad) & DDR_PAD_DRAM_TYPE)
|
||||
sel_1v8();
|
||||
else
|
||||
sel_2v5();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* xxx_boot_selected:
|
||||
*
|
||||
* return true if the particular booting option is selected
|
||||
* return false otherwise
|
||||
*/
|
||||
static u32 read_bootstrap(void)
|
||||
{
|
||||
return (readl(CONFIG_SPEAR_BOOTSTRAPCFG) >> CONFIG_SPEAR_BOOTSTRAPSHFT)
|
||||
& CONFIG_SPEAR_BOOTSTRAPMASK;
|
||||
}
|
||||
|
||||
int snor_boot_selected(void)
|
||||
{
|
||||
u32 bootstrap = read_bootstrap();
|
||||
|
||||
if (SNOR_BOOT_SUPPORTED) {
|
||||
/* Check whether SNOR boot is selected */
|
||||
if ((bootstrap & CONFIG_SPEAR_ONLYSNORBOOT) ==
|
||||
CONFIG_SPEAR_ONLYSNORBOOT)
|
||||
return true;
|
||||
|
||||
if ((bootstrap & CONFIG_SPEAR_NORNANDBOOT) ==
|
||||
CONFIG_SPEAR_NORNAND8BOOT)
|
||||
return true;
|
||||
|
||||
if ((bootstrap & CONFIG_SPEAR_NORNANDBOOT) ==
|
||||
CONFIG_SPEAR_NORNAND16BOOT)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int nand_boot_selected(void)
|
||||
{
|
||||
u32 bootstrap = read_bootstrap();
|
||||
|
||||
if (NAND_BOOT_SUPPORTED) {
|
||||
/* Check whether NAND boot is selected */
|
||||
if ((bootstrap & CONFIG_SPEAR_NORNANDBOOT) ==
|
||||
CONFIG_SPEAR_NORNAND8BOOT)
|
||||
return true;
|
||||
|
||||
if ((bootstrap & CONFIG_SPEAR_NORNANDBOOT) ==
|
||||
CONFIG_SPEAR_NORNAND16BOOT)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int pnor_boot_selected(void)
|
||||
{
|
||||
/* Parallel NOR boot is not selected in any SPEAr600 revision */
|
||||
return false;
|
||||
}
|
||||
|
||||
int usb_boot_selected(void)
|
||||
{
|
||||
u32 bootstrap = read_bootstrap();
|
||||
|
||||
if (USB_BOOT_SUPPORTED) {
|
||||
/* Check whether USB boot is selected */
|
||||
if (!(bootstrap & CONFIG_SPEAR_USBBOOT))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int tftp_boot_selected(void)
|
||||
{
|
||||
/* TFTP boot is not selected in any SPEAr600 revision */
|
||||
return false;
|
||||
}
|
||||
|
||||
int uart_boot_selected(void)
|
||||
{
|
||||
/* UART boot is not selected in any SPEAr600 revision */
|
||||
return false;
|
||||
}
|
||||
|
||||
int spi_boot_selected(void)
|
||||
{
|
||||
/* SPI boot is not selected in any SPEAr600 revision */
|
||||
return false;
|
||||
}
|
||||
|
||||
int i2c_boot_selected(void)
|
||||
{
|
||||
/* I2C boot is not selected in any SPEAr600 revision */
|
||||
return false;
|
||||
}
|
||||
|
||||
int mmc_boot_selected(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void plat_late_init(void)
|
||||
{
|
||||
spear_late_init();
|
||||
}
|
||||
302
arch/arm/cpu/arm926ejs/spear/spl.c
Normal file
302
arch/arm/cpu/arm926ejs/spear/spl.c
Normal file
@@ -0,0 +1,302 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2011
|
||||
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
|
||||
*
|
||||
* Copyright (C) 2012 Stefan Roese <sr@denx.de>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <spl.h>
|
||||
#include <version.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/spr_defs.h>
|
||||
#include <asm/arch/spr_misc.h>
|
||||
#include <asm/arch/spr_syscntl.h>
|
||||
#include <linux/mtd/st_smi.h>
|
||||
|
||||
/* Reserve some space to store the BootROM's stack pointer during SPL operation.
|
||||
* The BSS cannot be used for this purpose because it will be zeroed after
|
||||
* having stored the pointer, so force the location to the data section.
|
||||
*/
|
||||
u32 bootrom_stash_sp __attribute__((section(".data")));
|
||||
|
||||
static void ddr_clock_init(void)
|
||||
{
|
||||
struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
|
||||
u32 clkenb, ddrpll;
|
||||
|
||||
clkenb = readl(&misc_p->periph1_clken);
|
||||
clkenb &= ~PERIPH_MPMCMSK;
|
||||
clkenb |= PERIPH_MPMC_WE;
|
||||
|
||||
/* Intentionally done twice */
|
||||
writel(clkenb, &misc_p->periph1_clken);
|
||||
writel(clkenb, &misc_p->periph1_clken);
|
||||
|
||||
ddrpll = readl(&misc_p->pll_ctr_reg);
|
||||
ddrpll &= ~MEM_CLK_SEL_MSK;
|
||||
#if (CONFIG_DDR_HCLK)
|
||||
ddrpll |= MEM_CLK_HCLK;
|
||||
#elif (CONFIG_DDR_2HCLK)
|
||||
ddrpll |= MEM_CLK_2HCLK;
|
||||
#elif (CONFIG_DDR_PLL2)
|
||||
ddrpll |= MEM_CLK_PLL2;
|
||||
#else
|
||||
#error "please define one of CONFIG_DDR_(HCLK|2HCLK|PLL2)"
|
||||
#endif
|
||||
writel(ddrpll, &misc_p->pll_ctr_reg);
|
||||
|
||||
writel(readl(&misc_p->periph1_clken) | PERIPH_MPMC_EN,
|
||||
&misc_p->periph1_clken);
|
||||
}
|
||||
|
||||
static void mpmc_init_values(void)
|
||||
{
|
||||
u32 i;
|
||||
u32 *mpmc_reg_p = (u32 *)CONFIG_SPEAR_MPMCBASE;
|
||||
u32 *mpmc_val_p = &mpmc_conf_vals[0];
|
||||
|
||||
for (i = 0; i < CONFIG_SPEAR_MPMCREGS; i++, mpmc_reg_p++, mpmc_val_p++)
|
||||
writel(*mpmc_val_p, mpmc_reg_p);
|
||||
|
||||
mpmc_reg_p = (u32 *)CONFIG_SPEAR_MPMCBASE;
|
||||
|
||||
/*
|
||||
* MPMC controller start
|
||||
* MPMC waiting for DLLLOCKREG high
|
||||
*/
|
||||
writel(0x01000100, &mpmc_reg_p[7]);
|
||||
|
||||
while (!(readl(&mpmc_reg_p[3]) & 0x10000))
|
||||
;
|
||||
}
|
||||
|
||||
static void mpmc_init(void)
|
||||
{
|
||||
/* Clock related settings for DDR */
|
||||
ddr_clock_init();
|
||||
|
||||
/*
|
||||
* DDR pad register bits are different for different SoCs
|
||||
* Compensation values are also handled separately
|
||||
*/
|
||||
plat_ddr_init();
|
||||
|
||||
/* Initialize mpmc register values */
|
||||
mpmc_init_values();
|
||||
}
|
||||
|
||||
static void pll_init(void)
|
||||
{
|
||||
struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
|
||||
|
||||
/* Initialize PLLs */
|
||||
writel(FREQ_332, &misc_p->pll1_frq);
|
||||
writel(0x1C0A, &misc_p->pll1_cntl);
|
||||
writel(0x1C0E, &misc_p->pll1_cntl);
|
||||
writel(0x1C06, &misc_p->pll1_cntl);
|
||||
writel(0x1C0E, &misc_p->pll1_cntl);
|
||||
|
||||
writel(FREQ_332, &misc_p->pll2_frq);
|
||||
writel(0x1C0A, &misc_p->pll2_cntl);
|
||||
writel(0x1C0E, &misc_p->pll2_cntl);
|
||||
writel(0x1C06, &misc_p->pll2_cntl);
|
||||
writel(0x1C0E, &misc_p->pll2_cntl);
|
||||
|
||||
/* wait for pll locks */
|
||||
while (!(readl(&misc_p->pll1_cntl) & 0x1))
|
||||
;
|
||||
while (!(readl(&misc_p->pll2_cntl) & 0x1))
|
||||
;
|
||||
}
|
||||
|
||||
static void mac_init(void)
|
||||
{
|
||||
struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
|
||||
|
||||
writel(readl(&misc_p->periph1_clken) & (~PERIPH_GMAC),
|
||||
&misc_p->periph1_clken);
|
||||
|
||||
writel(SYNTH23, &misc_p->gmac_synth_clk);
|
||||
|
||||
switch (get_socrev()) {
|
||||
case SOC_SPEAR600_AA:
|
||||
case SOC_SPEAR600_AB:
|
||||
case SOC_SPEAR600_BA:
|
||||
case SOC_SPEAR600_BB:
|
||||
case SOC_SPEAR600_BC:
|
||||
case SOC_SPEAR600_BD:
|
||||
writel(0x0, &misc_p->gmac_ctr_reg);
|
||||
break;
|
||||
|
||||
case SOC_SPEAR300:
|
||||
case SOC_SPEAR310:
|
||||
case SOC_SPEAR320:
|
||||
writel(0x4, &misc_p->gmac_ctr_reg);
|
||||
break;
|
||||
}
|
||||
|
||||
writel(readl(&misc_p->periph1_clken) | PERIPH_GMAC,
|
||||
&misc_p->periph1_clken);
|
||||
|
||||
writel(readl(&misc_p->periph1_rst) | PERIPH_GMAC,
|
||||
&misc_p->periph1_rst);
|
||||
writel(readl(&misc_p->periph1_rst) & (~PERIPH_GMAC),
|
||||
&misc_p->periph1_rst);
|
||||
}
|
||||
|
||||
static void sys_init(void)
|
||||
{
|
||||
struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
|
||||
struct syscntl_regs *syscntl_p =
|
||||
(struct syscntl_regs *)CONFIG_SPEAR_SYSCNTLBASE;
|
||||
|
||||
/* Set system state to SLOW */
|
||||
writel(SLOW, &syscntl_p->scctrl);
|
||||
writel(PLL_TIM << 3, &syscntl_p->scpllctrl);
|
||||
|
||||
/* Initialize PLLs */
|
||||
pll_init();
|
||||
|
||||
/*
|
||||
* Ethernet configuration
|
||||
* To be done only if the tftp boot is not selected already
|
||||
* Boot code ensures the correct configuration in tftp booting
|
||||
*/
|
||||
if (!tftp_boot_selected())
|
||||
mac_init();
|
||||
|
||||
writel(RTC_DISABLE | PLLTIMEEN, &misc_p->periph_clk_cfg);
|
||||
writel(0x555, &misc_p->amba_clk_cfg);
|
||||
|
||||
writel(NORMAL, &syscntl_p->scctrl);
|
||||
|
||||
/* Wait for system to switch to normal mode */
|
||||
while (((readl(&syscntl_p->scctrl) >> MODE_SHIFT) & MODE_MASK)
|
||||
!= NORMAL)
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
* get_socrev
|
||||
*
|
||||
* Get SoC Revision.
|
||||
* @return SOC_SPEARXXX
|
||||
*/
|
||||
int get_socrev(void)
|
||||
{
|
||||
#if defined(CONFIG_SPEAR600)
|
||||
struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
|
||||
u32 soc_id = readl(&misc_p->soc_core_id);
|
||||
u32 pri_socid = (soc_id >> SOC_PRI_SHFT) & 0xFF;
|
||||
u32 sec_socid = (soc_id >> SOC_SEC_SHFT) & 0xFF;
|
||||
|
||||
if ((pri_socid == 'B') && (sec_socid == 'B'))
|
||||
return SOC_SPEAR600_BB;
|
||||
else if ((pri_socid == 'B') && (sec_socid == 'C'))
|
||||
return SOC_SPEAR600_BC;
|
||||
else if ((pri_socid == 'B') && (sec_socid == 'D'))
|
||||
return SOC_SPEAR600_BD;
|
||||
else if (soc_id == 0)
|
||||
return SOC_SPEAR600_BA;
|
||||
else
|
||||
return SOC_SPEAR_NA;
|
||||
#elif defined(CONFIG_SPEAR300)
|
||||
return SOC_SPEAR300;
|
||||
#elif defined(CONFIG_SPEAR310)
|
||||
return SOC_SPEAR310;
|
||||
#elif defined(CONFIG_SPEAR320)
|
||||
return SOC_SPEAR320;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* SNOR (Serial NOR flash) related functions
|
||||
*/
|
||||
static void snor_init(void)
|
||||
{
|
||||
struct smi_regs *const smicntl =
|
||||
(struct smi_regs * const)CONFIG_SYS_SMI_BASE;
|
||||
|
||||
/* Setting the fast mode values. SMI working at 166/4 = 41.5 MHz */
|
||||
writel(HOLD1 | FAST_MODE | BANK_EN | DSEL_TIME | PRESCAL4,
|
||||
&smicntl->smi_cr1);
|
||||
}
|
||||
|
||||
u32 spl_boot_device(void)
|
||||
{
|
||||
u32 mode = 0;
|
||||
|
||||
if (usb_boot_selected()) {
|
||||
mode = BOOT_DEVICE_BOOTROM;
|
||||
} else if (snor_boot_selected()) {
|
||||
/* SNOR-SMI initialization */
|
||||
snor_init();
|
||||
|
||||
mode = BOOT_DEVICE_NOR;
|
||||
}
|
||||
|
||||
return mode;
|
||||
}
|
||||
|
||||
void board_boot_order(u32 *spl_boot_list)
|
||||
{
|
||||
spl_boot_list[0] = spl_boot_device();
|
||||
|
||||
/*
|
||||
* If the main boot device (eg. NOR) is empty, try to jump back into the
|
||||
* BootROM for USB boot process.
|
||||
*/
|
||||
if (USB_BOOT_SUPPORTED)
|
||||
spl_boot_list[1] = BOOT_DEVICE_BOOTROM;
|
||||
}
|
||||
|
||||
void board_init_f(ulong dummy)
|
||||
{
|
||||
struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
|
||||
|
||||
/* Initialize PLLs */
|
||||
sys_init();
|
||||
|
||||
preloader_console_init();
|
||||
arch_cpu_init();
|
||||
|
||||
/* Enable IPs (release reset) */
|
||||
writel(PERIPH_RST_ALL, &misc_p->periph1_rst);
|
||||
|
||||
/* Initialize MPMC */
|
||||
puts("Configure DDR\n");
|
||||
mpmc_init();
|
||||
spear_late_init();
|
||||
}
|
||||
|
||||
/*
|
||||
* In a few cases (Ethernet, UART or USB boot, we might want to go back into the
|
||||
* BootROM code right after having initialized a few components like the DRAM).
|
||||
* The following function is called from SPL common code (board_init_r).
|
||||
*/
|
||||
int board_return_to_bootrom(struct spl_image_info *spl_image,
|
||||
struct spl_boot_device *bootdev)
|
||||
{
|
||||
/*
|
||||
* Retrieve the BootROM's stack pointer and jump back to the start of
|
||||
* the SPL, where we can easily branch back into the BootROM. Don't do
|
||||
* it right here because SPL might be compiled in Thumb mode while the
|
||||
* BootROM expects ARM mode.
|
||||
*/
|
||||
asm volatile ("ldr r0, =bootrom_stash_sp;"
|
||||
"ldr r0, [r0];"
|
||||
"mov sp, r0;"
|
||||
#if defined(CONFIG_SPL_SYS_THUMB_BUILD)
|
||||
"blx back_to_bootrom;"
|
||||
#else
|
||||
"bl back_to_bootrom;"
|
||||
#endif
|
||||
);
|
||||
|
||||
return 0;
|
||||
}
|
||||
113
arch/arm/cpu/arm926ejs/spear/spr600_mt47h128m8_3_266_cl5_async.c
Normal file
113
arch/arm/cpu/arm926ejs/spear/spr600_mt47h128m8_3_266_cl5_async.c
Normal file
@@ -0,0 +1,113 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2000-2009
|
||||
* Vipin Kumar, ST Microelectronics, vipin.kumar@st.com
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#if (CONFIG_DDR_PLL2)
|
||||
|
||||
const u32 mpmc_conf_vals[CONFIG_SPEAR_MPMCREGS] = {
|
||||
0x00000001,
|
||||
0x00000000,
|
||||
0x01000000,
|
||||
0x00000101,
|
||||
0x00000001,
|
||||
0x01000000,
|
||||
0x00010001,
|
||||
0x00000100,
|
||||
0x00010001,
|
||||
0x00000003,
|
||||
0x01000201,
|
||||
0x06000202,
|
||||
0x06060106,
|
||||
0x03050502,
|
||||
0x03040404,
|
||||
0x02020503,
|
||||
0x02010106,
|
||||
0x03000404,
|
||||
0x02030202,
|
||||
0x03000204,
|
||||
0x0707073f,
|
||||
0x07070707,
|
||||
0x06060607,
|
||||
0x06060606,
|
||||
0x05050506,
|
||||
0x05050505,
|
||||
0x04040405,
|
||||
0x04040404,
|
||||
0x03030304,
|
||||
0x03030303,
|
||||
0x02020203,
|
||||
0x02020202,
|
||||
0x01010102,
|
||||
0x01010101,
|
||||
0x08080a01,
|
||||
0x0000023f,
|
||||
0x00040800,
|
||||
0x00000000,
|
||||
0x00000f02,
|
||||
0x00001b1b,
|
||||
0x7f000000,
|
||||
0x005f0000,
|
||||
0x1c040b6a,
|
||||
0x00640064,
|
||||
0x00640064,
|
||||
0x00640064,
|
||||
0x00000064,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x000007ff,
|
||||
0x00000000,
|
||||
0x47ec00c8,
|
||||
0x00c8001f,
|
||||
0x00000000,
|
||||
0x0000cd98,
|
||||
0x00000000,
|
||||
0x03030100,
|
||||
0x03030303,
|
||||
0x03030303,
|
||||
0x03030303,
|
||||
0x00270000,
|
||||
0x00250027,
|
||||
0x00300000,
|
||||
0x008900b7,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000
|
||||
};
|
||||
#endif
|
||||
118
arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_333_cl5_psync.c
Normal file
118
arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_333_cl5_psync.c
Normal file
@@ -0,0 +1,118 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2000-2009
|
||||
* Vipin Kumar, ST Microelectronics, vipin.kumar@st.com
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#if (CONFIG_DDR_PLL2 || CONFIG_DDR_2HCLK)
|
||||
|
||||
const u32 mpmc_conf_vals[CONFIG_SPEAR_MPMCREGS] = {
|
||||
#if (CONFIG_DDR_PLL2)
|
||||
0x00000001,
|
||||
0x00000000,
|
||||
#elif (CONFIG_DDR_2HCLK)
|
||||
0x02020201,
|
||||
0x02020202,
|
||||
#endif
|
||||
0x01000000,
|
||||
0x00000101,
|
||||
0x00000101,
|
||||
0x01000000,
|
||||
0x00010001,
|
||||
0x00000100,
|
||||
0x01010001,
|
||||
0x00000201,
|
||||
0x01000101,
|
||||
0x06000002,
|
||||
0x06060106,
|
||||
0x03050502,
|
||||
0x03040404,
|
||||
0x02020503,
|
||||
0x02010106,
|
||||
0x03000405,
|
||||
0x03040202,
|
||||
0x04000305,
|
||||
0x0707073f,
|
||||
0x07070707,
|
||||
0x06060607,
|
||||
0x06060606,
|
||||
0x05050506,
|
||||
0x05050505,
|
||||
0x04040405,
|
||||
0x04040404,
|
||||
0x03030304,
|
||||
0x03030303,
|
||||
0x02020203,
|
||||
0x02020202,
|
||||
0x01010102,
|
||||
0x01010101,
|
||||
0x0a0a0a01,
|
||||
0x0000023f,
|
||||
0x00050a00,
|
||||
0x11000000,
|
||||
0x00001302,
|
||||
0x00000A0A,
|
||||
0x72000000,
|
||||
0x00550000,
|
||||
0x2b050e86,
|
||||
0x00640064,
|
||||
0x00640064,
|
||||
0x00640064,
|
||||
0x00000064,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00000a24,
|
||||
0x43C20000,
|
||||
0x5b1c00c8,
|
||||
0x00c8002e,
|
||||
0x00000000,
|
||||
0x0001046b,
|
||||
0x00000000,
|
||||
0x03030100,
|
||||
0x03030303,
|
||||
0x03030303,
|
||||
0x03030303,
|
||||
0x00210000,
|
||||
0x00010021,
|
||||
0x00200000,
|
||||
0x006c0090,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,113 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2000-2009
|
||||
* Vipin Kumar, ST Microelectronics, vipin.kumar@st.com
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#if (CONFIG_DDR_HCLK)
|
||||
|
||||
const u32 mpmc_conf_vals[CONFIG_SPEAR_MPMCREGS] = {
|
||||
0x03030301,
|
||||
0x03030303,
|
||||
0x01000000,
|
||||
0x00000101,
|
||||
0x00000001,
|
||||
0x01000000,
|
||||
0x00010001,
|
||||
0x00000100,
|
||||
0x00010001,
|
||||
0x00000003,
|
||||
0x01000201,
|
||||
0x06000202,
|
||||
0x06060106,
|
||||
0x03050502,
|
||||
0x03040404,
|
||||
0x02020503,
|
||||
0x02010106,
|
||||
0x03000404,
|
||||
0x02020202,
|
||||
0x03000203,
|
||||
0x0707073f,
|
||||
0x07070707,
|
||||
0x06060607,
|
||||
0x06060606,
|
||||
0x05050506,
|
||||
0x05050505,
|
||||
0x04040405,
|
||||
0x04040404,
|
||||
0x03030304,
|
||||
0x03030303,
|
||||
0x02020203,
|
||||
0x02020202,
|
||||
0x01010102,
|
||||
0x01010101,
|
||||
0x08080a01,
|
||||
0x0000023f,
|
||||
0x00030600,
|
||||
0x00000000,
|
||||
0x00000a02,
|
||||
0x00001c1c,
|
||||
0x7f000000,
|
||||
0x005f0000,
|
||||
0x12030743,
|
||||
0x00640064,
|
||||
0x00640064,
|
||||
0x00640064,
|
||||
0x00000064,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x0000050e,
|
||||
0x00000000,
|
||||
0x2d8900c8,
|
||||
0x00c80014,
|
||||
0x00000000,
|
||||
0x00008236,
|
||||
0x00000000,
|
||||
0x03030100,
|
||||
0x03030303,
|
||||
0x03030303,
|
||||
0x03030303,
|
||||
0x00400000,
|
||||
0x003a0040,
|
||||
0x00680000,
|
||||
0x00d80120,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000
|
||||
};
|
||||
#endif
|
||||
127
arch/arm/cpu/arm926ejs/spear/spr600_mt47h64m16_3_333_cl5_psync.c
Normal file
127
arch/arm/cpu/arm926ejs/spear/spr600_mt47h64m16_3_333_cl5_psync.c
Normal file
@@ -0,0 +1,127 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2000-2009
|
||||
* Vipin Kumar, ST Microelectronics, vipin.kumar@st.com
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#if (CONFIG_DDR_PLL2 || CONFIG_DDR_2HCLK)
|
||||
|
||||
const u32 mpmc_conf_vals[CONFIG_SPEAR_MPMCREGS] = {
|
||||
#if (CONFIG_DDR_PLL2)
|
||||
0x00000001,
|
||||
0x00000000,
|
||||
#elif (CONFIG_DDR_2HCLK)
|
||||
0x02020201,
|
||||
0x02020202,
|
||||
#endif
|
||||
0x01000000,
|
||||
0x00000101,
|
||||
0x00000101,
|
||||
0x01000000,
|
||||
0x00010001,
|
||||
0x00000100,
|
||||
0x01010001,
|
||||
0x00000201,
|
||||
0x01000101,
|
||||
0x06000002,
|
||||
0x06060106,
|
||||
0x03050502,
|
||||
0x03040404,
|
||||
0x02020503,
|
||||
#ifdef CONFIG_X600
|
||||
0x02030206,
|
||||
#else
|
||||
0x02010106,
|
||||
#endif
|
||||
0x03000405,
|
||||
0x03040202,
|
||||
0x04000305,
|
||||
0x0707073f,
|
||||
0x07070707,
|
||||
0x06060607,
|
||||
0x06060606,
|
||||
0x05050506,
|
||||
0x05050505,
|
||||
0x04040405,
|
||||
0x04040404,
|
||||
0x03030304,
|
||||
0x03030303,
|
||||
0x02020203,
|
||||
0x02020202,
|
||||
0x01010102,
|
||||
0x01010101,
|
||||
0x0a0a0a01,
|
||||
0x0000023f,
|
||||
0x00050a00,
|
||||
0x11000000,
|
||||
0x00001302,
|
||||
0x00000A0A,
|
||||
#ifdef CONFIG_X600
|
||||
0x7f000000,
|
||||
0x005c0000,
|
||||
#else
|
||||
0x72000000,
|
||||
0x00550000,
|
||||
#endif
|
||||
0x2b050e86,
|
||||
0x00640064,
|
||||
0x00640064,
|
||||
0x00640064,
|
||||
0x00000064,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00200020,
|
||||
0x00000a24,
|
||||
0x43C20000,
|
||||
0x5b1c00c8,
|
||||
0x00c8002e,
|
||||
0x00000000,
|
||||
0x0001046b,
|
||||
0x00000000,
|
||||
0x03030100,
|
||||
0x03030303,
|
||||
0x03030303,
|
||||
0x03030303,
|
||||
0x00210000,
|
||||
0x00010021,
|
||||
0x00200000,
|
||||
0x006c0090,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x003fffff,
|
||||
0x003fffff,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000
|
||||
};
|
||||
#endif
|
||||
173
arch/arm/cpu/arm926ejs/spear/spr_lowlevel_init.S
Normal file
173
arch/arm/cpu/arm926ejs/spear/spr_lowlevel_init.S
Normal file
@@ -0,0 +1,173 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* (C) Copyright 2006
|
||||
* Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/*
|
||||
* platform specific initializations are already done in Xloader
|
||||
* Initializations already done include
|
||||
* DDR, PLLs, IP's clock enable and reset release etc
|
||||
*/
|
||||
.globl lowlevel_init
|
||||
lowlevel_init:
|
||||
mov pc, lr
|
||||
|
||||
/* void setfreq(unsigned int device, unsigned int frequency) */
|
||||
.global setfreq
|
||||
setfreq:
|
||||
stmfd sp!,{r14}
|
||||
stmfd sp!,{r0-r12}
|
||||
|
||||
mov r8,sp
|
||||
ldr sp,SRAM_STACK_V
|
||||
|
||||
/* Saving the function arguements for later use */
|
||||
mov r4,r0
|
||||
mov r5,r1
|
||||
|
||||
/* Putting DDR into self refresh */
|
||||
ldr r0,DDR_07_V
|
||||
ldr r1,[r0]
|
||||
ldr r2,DDR_ACTIVE_V
|
||||
bic r1, r1, r2
|
||||
str r1,[r0]
|
||||
ldr r0,DDR_57_V
|
||||
ldr r1,[r0]
|
||||
ldr r2,CYCLES_MASK_V
|
||||
bic r1, r1, r2
|
||||
ldr r2,REFRESH_CYCLES_V
|
||||
orr r1, r1, r2, lsl #16
|
||||
str r1,[r0]
|
||||
ldr r0,DDR_07_V
|
||||
ldr r1,[r0]
|
||||
ldr r2,SREFRESH_MASK_V
|
||||
orr r1, r1, r2
|
||||
str r1,[r0]
|
||||
|
||||
/* flush pipeline */
|
||||
b flush
|
||||
.align 5
|
||||
flush:
|
||||
/* Delay to ensure self refresh mode */
|
||||
ldr r0,SREFRESH_DELAY_V
|
||||
delay:
|
||||
sub r0,r0,#1
|
||||
cmp r0,#0
|
||||
bne delay
|
||||
|
||||
/* Putting system in slow mode */
|
||||
ldr r0,SCCTRL_V
|
||||
mov r1,#2
|
||||
str r1,[r0]
|
||||
|
||||
/* Changing PLL(1/2) frequency */
|
||||
mov r0,r4
|
||||
mov r1,r5
|
||||
|
||||
cmp r4,#0
|
||||
beq pll1_freq
|
||||
|
||||
/* Change PLL2 (DDR frequency) */
|
||||
ldr r6,PLL2_FREQ_V
|
||||
ldr r7,PLL2_CNTL_V
|
||||
b pll2_freq
|
||||
|
||||
pll1_freq:
|
||||
/* Change PLL1 (CPU frequency) */
|
||||
ldr r6,PLL1_FREQ_V
|
||||
ldr r7,PLL1_CNTL_V
|
||||
|
||||
pll2_freq:
|
||||
mov r0,r6
|
||||
ldr r1,[r0]
|
||||
ldr r2,PLLFREQ_MASK_V
|
||||
bic r1,r1,r2
|
||||
mov r2,r5,lsr#1
|
||||
orr r1,r1,r2,lsl#24
|
||||
str r1,[r0]
|
||||
|
||||
mov r0,r7
|
||||
ldr r1,P1C0A_V
|
||||
str r1,[r0]
|
||||
ldr r1,P1C0E_V
|
||||
str r1,[r0]
|
||||
ldr r1,P1C06_V
|
||||
str r1,[r0]
|
||||
ldr r1,P1C0E_V
|
||||
str r1,[r0]
|
||||
|
||||
lock:
|
||||
ldr r1,[r0]
|
||||
and r1,r1,#1
|
||||
cmp r1,#0
|
||||
beq lock
|
||||
|
||||
/* Putting system back to normal mode */
|
||||
ldr r0,SCCTRL_V
|
||||
mov r1,#4
|
||||
str r1,[r0]
|
||||
|
||||
/* Putting DDR back to normal */
|
||||
ldr r0,DDR_07_V
|
||||
ldr r1,[R0]
|
||||
ldr r2,SREFRESH_MASK_V
|
||||
bic r1, r1, r2
|
||||
str r1,[r0]
|
||||
ldr r2,DDR_ACTIVE_V
|
||||
orr r1, r1, r2
|
||||
str r1,[r0]
|
||||
|
||||
/* Delay to ensure self refresh mode */
|
||||
ldr r0,SREFRESH_DELAY_V
|
||||
1:
|
||||
sub r0,r0,#1
|
||||
cmp r0,#0
|
||||
bne 1b
|
||||
|
||||
mov sp,r8
|
||||
/* Resuming back to code */
|
||||
ldmia sp!,{r0-r12}
|
||||
ldmia sp!,{pc}
|
||||
|
||||
SCCTRL_V:
|
||||
.word 0xfca00000
|
||||
PLL1_FREQ_V:
|
||||
.word 0xfca8000C
|
||||
PLL1_CNTL_V:
|
||||
.word 0xfca80008
|
||||
PLL2_FREQ_V:
|
||||
.word 0xfca80018
|
||||
PLL2_CNTL_V:
|
||||
.word 0xfca80014
|
||||
PLLFREQ_MASK_V:
|
||||
.word 0xff000000
|
||||
P1C0A_V:
|
||||
.word 0x1C0A
|
||||
P1C0E_V:
|
||||
.word 0x1C0E
|
||||
P1C06_V:
|
||||
.word 0x1C06
|
||||
|
||||
SREFRESH_DELAY_V:
|
||||
.word 0x9999
|
||||
SRAM_STACK_V:
|
||||
.word 0xD2800600
|
||||
DDR_07_V:
|
||||
.word 0xfc60001c
|
||||
DDR_ACTIVE_V:
|
||||
.word 0x01000000
|
||||
DDR_57_V:
|
||||
.word 0xfc6000e4
|
||||
CYCLES_MASK_V:
|
||||
.word 0xffff0000
|
||||
REFRESH_CYCLES_V:
|
||||
.word 0xf0f0
|
||||
SREFRESH_MASK_V:
|
||||
.word 0x00010000
|
||||
|
||||
.global setfreq_sz
|
||||
setfreq_sz:
|
||||
.word setfreq_sz - setfreq
|
||||
253
arch/arm/cpu/arm926ejs/spear/spr_misc.c
Normal file
253
arch/arm/cpu/arm926ejs/spear/spr_misc.c
Normal file
@@ -0,0 +1,253 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2009
|
||||
* Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <cpu_func.h>
|
||||
#include <env.h>
|
||||
#include <i2c.h>
|
||||
#include <init.h>
|
||||
#include <net.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <linux/mtd/st_smi.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/spr_emi.h>
|
||||
#include <asm/arch/spr_defs.h>
|
||||
|
||||
#define CPU 0
|
||||
#define DDR 1
|
||||
#define SRAM_REL 0xD2801000
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#if defined(CONFIG_CMD_NET)
|
||||
static int i2c_read_mac(uchar *buffer);
|
||||
#endif
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
/* Store complete RAM size and return */
|
||||
gd->ram_size = get_ram_size(PHYS_SDRAM_1, PHYS_SDRAM_1_MAXSIZE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = gd->ram_size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_early_init_f()
|
||||
{
|
||||
#if defined(CONFIG_ST_SMI)
|
||||
smi_init();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int misc_init_r(void)
|
||||
{
|
||||
#if defined(CONFIG_CMD_NET)
|
||||
uchar mac_id[6];
|
||||
|
||||
if (!eth_env_get_enetaddr("ethaddr", mac_id) && !i2c_read_mac(mac_id))
|
||||
eth_env_set_enetaddr("ethaddr", mac_id);
|
||||
#endif
|
||||
env_set("verify", "n");
|
||||
|
||||
#if defined(CONFIG_SPEAR_USBTTY)
|
||||
env_set("stdin", "usbtty");
|
||||
env_set("stdout", "usbtty");
|
||||
env_set("stderr", "usbtty");
|
||||
|
||||
#ifndef CONFIG_SYS_NO_DCACHE
|
||||
dcache_enable();
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPEAR_EMI
|
||||
struct cust_emi_para {
|
||||
unsigned int tap;
|
||||
unsigned int tsdp;
|
||||
unsigned int tdpw;
|
||||
unsigned int tdpr;
|
||||
unsigned int tdcs;
|
||||
};
|
||||
|
||||
/* EMI timing setting of m28w640hc of linux kernel */
|
||||
const struct cust_emi_para emi_timing_m28w640hc = {
|
||||
.tap = 0x10,
|
||||
.tsdp = 0x05,
|
||||
.tdpw = 0x0a,
|
||||
.tdpr = 0x0a,
|
||||
.tdcs = 0x05,
|
||||
};
|
||||
|
||||
/* EMI timing setting of bootrom */
|
||||
const struct cust_emi_para emi_timing_bootrom = {
|
||||
.tap = 0xf,
|
||||
.tsdp = 0x0,
|
||||
.tdpw = 0xff,
|
||||
.tdpr = 0x111,
|
||||
.tdcs = 0x02,
|
||||
};
|
||||
|
||||
void spear_emi_init(void)
|
||||
{
|
||||
const struct cust_emi_para *p = &emi_timing_m28w640hc;
|
||||
struct emi_regs *emi_regs_p = (struct emi_regs *)CONFIG_SPEAR_EMIBASE;
|
||||
unsigned int cs;
|
||||
unsigned int val, tmp;
|
||||
|
||||
val = readl(CONFIG_SPEAR_RASBASE);
|
||||
|
||||
if (val & EMI_ACKMSK)
|
||||
tmp = 0x3f;
|
||||
else
|
||||
tmp = 0x0;
|
||||
|
||||
writel(tmp, &emi_regs_p->ack);
|
||||
|
||||
for (cs = 0; cs < CONFIG_SYS_MAX_FLASH_BANKS; cs++) {
|
||||
writel(p->tap, &emi_regs_p->bank_regs[cs].tap);
|
||||
writel(p->tsdp, &emi_regs_p->bank_regs[cs].tsdp);
|
||||
writel(p->tdpw, &emi_regs_p->bank_regs[cs].tdpw);
|
||||
writel(p->tdpr, &emi_regs_p->bank_regs[cs].tdpr);
|
||||
writel(p->tdcs, &emi_regs_p->bank_regs[cs].tdcs);
|
||||
writel(EMI_CNTL_ENBBYTERW | ((val & 0x18) >> 3),
|
||||
&emi_regs_p->bank_regs[cs].control);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int spear_board_init(ulong mach_type)
|
||||
{
|
||||
gd->bd->bi_arch_number = mach_type;
|
||||
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = CONFIG_BOOT_PARAMS_ADDR;
|
||||
|
||||
#ifdef CONFIG_SPEAR_EMI
|
||||
spear_emi_init();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CMD_NET)
|
||||
static int i2c_read_mac(uchar *buffer)
|
||||
{
|
||||
u8 buf[2];
|
||||
|
||||
i2c_read(CONFIG_I2C_CHIPADDRESS, MAGIC_OFF, 1, buf, MAGIC_LEN);
|
||||
|
||||
/* Check if mac in i2c memory is valid */
|
||||
if ((buf[0] == MAGIC_BYTE0) && (buf[1] == MAGIC_BYTE1)) {
|
||||
/* Valid mac address is saved in i2c eeprom */
|
||||
i2c_read(CONFIG_I2C_CHIPADDRESS, MAC_OFF, 1, buffer, MAC_LEN);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int write_mac(uchar *mac)
|
||||
{
|
||||
u8 buf[2];
|
||||
|
||||
buf[0] = (u8)MAGIC_BYTE0;
|
||||
buf[1] = (u8)MAGIC_BYTE1;
|
||||
i2c_write(CONFIG_I2C_CHIPADDRESS, MAGIC_OFF, 1, buf, MAGIC_LEN);
|
||||
|
||||
buf[0] = (u8)~MAGIC_BYTE0;
|
||||
buf[1] = (u8)~MAGIC_BYTE1;
|
||||
|
||||
i2c_read(CONFIG_I2C_CHIPADDRESS, MAGIC_OFF, 1, buf, MAGIC_LEN);
|
||||
|
||||
/* check if valid MAC address is saved in I2C EEPROM or not? */
|
||||
if ((buf[0] == MAGIC_BYTE0) && (buf[1] == MAGIC_BYTE1)) {
|
||||
i2c_write(CONFIG_I2C_CHIPADDRESS, MAC_OFF, 1, mac, MAC_LEN);
|
||||
puts("I2C EEPROM written with mac address \n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
puts("I2C EEPROM writing failed\n");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int do_chip_config(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
void (*sram_setfreq) (unsigned int, unsigned int);
|
||||
unsigned int frequency;
|
||||
#if defined(CONFIG_CMD_NET)
|
||||
unsigned char mac[6];
|
||||
#endif
|
||||
|
||||
if ((argc > 3) || (argc < 2))
|
||||
return cmd_usage(cmdtp);
|
||||
|
||||
if ((!strcmp(argv[1], "cpufreq")) || (!strcmp(argv[1], "ddrfreq"))) {
|
||||
|
||||
frequency = simple_strtoul(argv[2], NULL, 0);
|
||||
|
||||
if (frequency > 333) {
|
||||
printf("Frequency is limited to 333MHz\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
sram_setfreq = memcpy((void *)SRAM_REL, setfreq, setfreq_sz);
|
||||
|
||||
if (!strcmp(argv[1], "cpufreq")) {
|
||||
sram_setfreq(CPU, frequency);
|
||||
printf("CPU frequency changed to %u\n", frequency);
|
||||
} else {
|
||||
sram_setfreq(DDR, frequency);
|
||||
printf("DDR frequency changed to %u\n", frequency);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
#if defined(CONFIG_CMD_NET)
|
||||
} else if (!strcmp(argv[1], "ethaddr")) {
|
||||
|
||||
u32 reg;
|
||||
char *e, *s = argv[2];
|
||||
for (reg = 0; reg < 6; ++reg) {
|
||||
mac[reg] = s ? simple_strtoul(s, &e, 16) : 0;
|
||||
if (s)
|
||||
s = (*e) ? e + 1 : e;
|
||||
}
|
||||
write_mac(mac);
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
} else if (!strcmp(argv[1], "print")) {
|
||||
#if defined(CONFIG_CMD_NET)
|
||||
if (!i2c_read_mac(mac)) {
|
||||
printf("Ethaddr (from i2c mem) = %pM\n", mac);
|
||||
} else {
|
||||
printf("Ethaddr (from i2c mem) = Not set\n");
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
return cmd_usage(cmdtp);
|
||||
}
|
||||
|
||||
U_BOOT_CMD(chip_config, 3, 1, do_chip_config,
|
||||
"configure chip",
|
||||
"chip_config cpufreq/ddrfreq frequency\n"
|
||||
#if defined(CONFIG_CMD_NET)
|
||||
"chip_config ethaddr XX:XX:XX:XX:XX:XX\n"
|
||||
#endif
|
||||
"chip_config print");
|
||||
65
arch/arm/cpu/arm926ejs/spear/start.S
Normal file
65
arch/arm/cpu/arm926ejs/spear/start.S
Normal file
@@ -0,0 +1,65 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* armboot - Startup Code for ARM926EJS CPU-core
|
||||
*
|
||||
* Copyright (c) 2003 Texas Instruments
|
||||
*
|
||||
* ----- Adapted for OMAP1610 OMAP730 from ARM925t code ------
|
||||
*
|
||||
* Copyright (c) 2001 Marius Gröger <mag@sysgo.de>
|
||||
* Copyright (c) 2002 Alex Züpke <azu@sysgo.de>
|
||||
* Copyright (c) 2002 Gary Jennejohn <garyj@denx.de>
|
||||
* Copyright (c) 2003 Richard Woodruff <r-woodruff2@ti.com>
|
||||
* Copyright (c) 2003 Kshitij <kshitij@ti.com>
|
||||
*/
|
||||
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/*
|
||||
*************************************************************************
|
||||
*
|
||||
* Startup Code (reset vector)
|
||||
*
|
||||
* The BootROM already initialized its own stack in the [0-0xb00] reserved
|
||||
* range of the SRAM. The SPL (in _main) will update the stack pointer to
|
||||
* its own SRAM area (right before the gd section).
|
||||
*
|
||||
*************************************************************************
|
||||
*/
|
||||
|
||||
.globl reset
|
||||
.globl back_to_bootrom
|
||||
|
||||
reset:
|
||||
/*
|
||||
* SPL has to return back to BootROM in a few cases (eg. Ethernet boot,
|
||||
* UART boot, USB boot): save registers in BootROM's stack and then the
|
||||
* BootROM's stack pointer in the SPL's data section.
|
||||
*/
|
||||
push {r0-r12,lr}
|
||||
ldr r0, =bootrom_stash_sp
|
||||
str sp, [r0]
|
||||
|
||||
/*
|
||||
* Flush v4 I/D caches
|
||||
*/
|
||||
mov r0, #0
|
||||
mcr p15, 0, r0, c7, c7, 0 /* Flush v3/v4 cache */
|
||||
mcr p15, 0, r0, c8, c7, 0 /* Flush v4 TLB */
|
||||
|
||||
/*
|
||||
* Enable instruction cache
|
||||
*/
|
||||
mrc p15, 0, r0, c1, c0, 0
|
||||
orr r0, r0, #0x00001000 /* set bit 12 (I) I-Cache */
|
||||
mcr p15, 0, r0, c1, c0, 0
|
||||
|
||||
/*
|
||||
* Go setup Memory and board specific bits prior to relocation.
|
||||
* This call is not supposed to return.
|
||||
*/
|
||||
b _main /* _main will call board_init_f */
|
||||
|
||||
back_to_bootrom:
|
||||
pop {r0-r12,pc}
|
||||
124
arch/arm/cpu/arm926ejs/spear/timer.c
Normal file
124
arch/arm/cpu/arm926ejs/spear/timer.c
Normal file
@@ -0,0 +1,124 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2009
|
||||
* Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <time.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/spr_gpt.h>
|
||||
#include <asm/arch/spr_misc.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
#define GPT_RESOLUTION (CONFIG_SPEAR_HZ_CLOCK / CONFIG_SPEAR_HZ)
|
||||
#define READ_TIMER() (readl(&gpt_regs_p->count) & GPT_FREE_RUNNING)
|
||||
|
||||
static struct gpt_regs *const gpt_regs_p =
|
||||
(struct gpt_regs *)CONFIG_SPEAR_TIMERBASE;
|
||||
|
||||
static struct misc_regs *const misc_regs_p =
|
||||
(struct misc_regs *)CONFIG_SPEAR_MISCBASE;
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
static ulong get_timer_masked(void);
|
||||
|
||||
#define timestamp gd->arch.tbl
|
||||
#define lastdec gd->arch.lastinc
|
||||
|
||||
int timer_init(void)
|
||||
{
|
||||
u32 synth;
|
||||
|
||||
/* Prescaler setting */
|
||||
#if defined(CONFIG_SPEAR3XX)
|
||||
writel(MISC_PRSC_CFG, &misc_regs_p->prsc2_clk_cfg);
|
||||
synth = MISC_GPT4SYNTH;
|
||||
#elif defined(CONFIG_SPEAR600)
|
||||
writel(MISC_PRSC_CFG, &misc_regs_p->prsc1_clk_cfg);
|
||||
synth = MISC_GPT3SYNTH;
|
||||
#else
|
||||
# error Incorrect config. Can only be SPEAR{600|300|310|320}
|
||||
#endif
|
||||
|
||||
writel(readl(&misc_regs_p->periph_clk_cfg) | synth,
|
||||
&misc_regs_p->periph_clk_cfg);
|
||||
|
||||
/* disable timers */
|
||||
writel(GPT_PRESCALER_1 | GPT_MODE_AUTO_RELOAD, &gpt_regs_p->control);
|
||||
|
||||
/* load value for free running */
|
||||
writel(GPT_FREE_RUNNING, &gpt_regs_p->compare);
|
||||
|
||||
/* auto reload, start timer */
|
||||
writel(readl(&gpt_regs_p->control) | GPT_ENABLE, &gpt_regs_p->control);
|
||||
|
||||
/* Reset the timer */
|
||||
lastdec = READ_TIMER();
|
||||
timestamp = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* timer without interrupts
|
||||
*/
|
||||
ulong get_timer(ulong base)
|
||||
{
|
||||
return (get_timer_masked() / GPT_RESOLUTION) - base;
|
||||
}
|
||||
|
||||
void __udelay(unsigned long usec)
|
||||
{
|
||||
ulong tmo;
|
||||
ulong start = get_timer_masked();
|
||||
ulong tenudelcnt = CONFIG_SPEAR_HZ_CLOCK / (1000 * 100);
|
||||
ulong rndoff;
|
||||
|
||||
rndoff = (usec % 10) ? 1 : 0;
|
||||
|
||||
/* tenudelcnt timer tick gives 10 microsecconds delay */
|
||||
tmo = ((usec / 10) + rndoff) * tenudelcnt;
|
||||
|
||||
while ((ulong) (get_timer_masked() - start) < tmo)
|
||||
;
|
||||
}
|
||||
|
||||
static ulong get_timer_masked(void)
|
||||
{
|
||||
ulong now = READ_TIMER();
|
||||
|
||||
if (now >= lastdec) {
|
||||
/* normal mode */
|
||||
timestamp += now - lastdec;
|
||||
} else {
|
||||
/* we have an overflow ... */
|
||||
timestamp += now + GPT_FREE_RUNNING - lastdec;
|
||||
}
|
||||
lastdec = now;
|
||||
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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_SPEAR_HZ;
|
||||
}
|
||||
54
arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
Normal file
54
arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
Normal file
@@ -0,0 +1,54 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2015 Stefan Roese <sr@denx.de>
|
||||
*
|
||||
* Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
|
||||
* on behalf of DENX Software Engineering GmbH
|
||||
*
|
||||
* January 2004 - Changed to support H4 device
|
||||
* Copyright (c) 2004-2008 Texas Instruments
|
||||
*
|
||||
* (C) Copyright 2002
|
||||
* Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
|
||||
*/
|
||||
|
||||
MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE,\
|
||||
LENGTH = IMAGE_MAX_SIZE }
|
||||
|
||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(_start)
|
||||
SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
__start = .;
|
||||
*(.vectors)
|
||||
CPUDIR/spear/start.o (.text*)
|
||||
*(.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 = .;
|
||||
} > .sram
|
||||
}
|
||||
@@ -46,7 +46,7 @@ reset:
|
||||
* we do sys-critical inits only at reboot,
|
||||
* not when booting from ram!
|
||||
*/
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
bl cpu_init_crit
|
||||
#endif
|
||||
|
||||
@@ -69,7 +69,7 @@ c_runtime_cpu_setup:
|
||||
*
|
||||
*************************************************************************
|
||||
*/
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
cpu_init_crit:
|
||||
/*
|
||||
* flush D cache before disabling it
|
||||
@@ -100,7 +100,7 @@ flush_dcache:
|
||||
#endif
|
||||
mcr p15, 0, r0, c1, c0, 0
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
/*
|
||||
* Go setup Memory and board specific bits prior to relocation.
|
||||
*/
|
||||
@@ -109,4 +109,4 @@ flush_dcache:
|
||||
mov lr, r4 /* restore link */
|
||||
#endif
|
||||
mov pc, lr /* back to my caller */
|
||||
#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
|
||||
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
|
||||
|
||||
@@ -56,7 +56,7 @@ static void cache_flush (void)
|
||||
|
||||
#ifndef CONFIG_ARCH_INTEGRATOR
|
||||
|
||||
__attribute__((noreturn)) void reset_cpu(void)
|
||||
__attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused)))
|
||||
{
|
||||
writew(0x0, 0xfffece10);
|
||||
writew(0x8, 0xfffece10);
|
||||
|
||||
@@ -45,7 +45,7 @@ reset:
|
||||
* we do sys-critical inits only at reboot,
|
||||
* not when booting from ram!
|
||||
*/
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
bl cpu_init_crit
|
||||
#endif
|
||||
|
||||
@@ -70,7 +70,7 @@ c_runtime_cpu_setup:
|
||||
*/
|
||||
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
cpu_init_crit:
|
||||
/*
|
||||
* flush v4 I/D caches
|
||||
@@ -89,7 +89,7 @@ cpu_init_crit:
|
||||
orr r0, r0, #0x00001000 /* set bit 12 (I) I-Cache */
|
||||
mcr p15, 0, r0, c1, c0, 0
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
/*
|
||||
* Go setup Memory and board specific bits prior to relocation.
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,7 @@ obj-$(CONFIG_EFI_LOADER) += sctlr.o
|
||||
obj-$(CONFIG_ARMV7_NONSEC) += exception_level.o
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_$(SPL_)SKIP_LOWLEVEL_INIT),y)
|
||||
ifneq ($(CONFIG_SKIP_LOWLEVEL_INIT),y)
|
||||
obj-y += lowlevel_init.o
|
||||
endif
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define CLKS_SHIFT 20 /* Clock period shift */
|
||||
#define LD_SHIFT 0 /* Reload value shift */
|
||||
|
||||
void reset_cpu(void)
|
||||
void reset_cpu(ulong ignored)
|
||||
{
|
||||
/*
|
||||
* Set WD enable, RST enable,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#define CRMU_MAIL_BOX1 0x03024028
|
||||
#define CRMU_SOFT_RESET_CMD 0xFFFFFFFF
|
||||
|
||||
void reset_cpu(void)
|
||||
void reset_cpu(ulong ignored)
|
||||
{
|
||||
/* Send soft reset command via Mailbox. */
|
||||
writel(CRMU_SOFT_RESET_CMD, CRMU_MAIL_BOX1);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#define CRU_RESET_OFFSET 0x1803F184
|
||||
|
||||
void reset_cpu(void)
|
||||
void reset_cpu(ulong ignored)
|
||||
{
|
||||
/* Reset the cpu by setting software reset request bit */
|
||||
writel(0x1, CRU_RESET_OFFSET);
|
||||
|
||||
@@ -176,6 +176,9 @@ void mmu_page_table_flush(unsigned long start, unsigned long stop)
|
||||
{
|
||||
}
|
||||
|
||||
void arm_init_domains(void)
|
||||
{
|
||||
}
|
||||
#endif /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
|
||||
|
||||
@@ -19,22 +19,19 @@ struct armpll_parameters {
|
||||
};
|
||||
|
||||
struct armpll_parameters armpll_clk_tab[] = {
|
||||
{ 25, 64, 1, 1, 0},
|
||||
{ 100, 64, 1, 1, 2},
|
||||
{ 400, 64, 1, 1, 6},
|
||||
{ 448, 71, 713050, 1, 6},
|
||||
{ 500, 80, 1, 1, 6},
|
||||
{ 560, 89, 629145, 1, 6},
|
||||
{ 600, 96, 1, 1, 6},
|
||||
{ 800, 64, 1, 1, 7},
|
||||
{ 896, 71, 713050, 1, 7},
|
||||
{ 1000, 80, 1, 1, 7},
|
||||
{ 1100, 88, 1, 1, 7},
|
||||
{ 1120, 89, 629145, 1, 7},
|
||||
{ 1200, 96, 1, 1, 7},
|
||||
{ 1300, 104, 1, 1, 7},
|
||||
{ 1350, 108, 1, 1, 7},
|
||||
{ 1400, 112, 1, 1, 7},
|
||||
{ 25, 64, 1, 1, 0},
|
||||
{ 100, 64, 1, 1, 2},
|
||||
{ 400, 64, 1, 1, 6},
|
||||
{ 448, 71, 713050, 1, 6},
|
||||
{ 500, 80, 1, 1, 6},
|
||||
{ 560, 89, 629145, 1, 6},
|
||||
{ 600, 96, 1, 1, 6},
|
||||
{ 800, 64, 1, 1, 7},
|
||||
{ 896, 71, 713050, 1, 7},
|
||||
{ 1000, 80, 1, 1, 7},
|
||||
{ 1100, 88, 1, 1, 7},
|
||||
{ 1120, 89, 629145, 1, 7},
|
||||
{ 1200, 96, 1, 1, 7},
|
||||
};
|
||||
|
||||
uint32_t armpll_config(uint32_t clkmhz)
|
||||
|
||||
@@ -14,7 +14,7 @@ int __weak clk_sdio_enable(void *base, u32 rate, u32 *actual_ratep)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __weak clk_bsc_enable(void *base)
|
||||
int __weak clk_bsc_enable(void *base, u32 rate, u32 *actual_ratep)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ config ARCH_LS1021A
|
||||
select SYS_FSL_SEC_LE
|
||||
select SYS_FSL_SRDS_1
|
||||
select SYS_HAS_SERDES
|
||||
select SYS_I2C_MXC
|
||||
imply CMD_PCI
|
||||
imply SCSI
|
||||
imply SCSI_AHCI
|
||||
|
||||
@@ -42,8 +42,8 @@ void get_sys_info(struct sys_info *sys_info)
|
||||
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)
|
||||
sys_info->freq_ddrbus = get_board_ddr_clk();
|
||||
#ifdef CONFIG_DDR_CLK_FREQ
|
||||
sys_info->freq_ddrbus = CONFIG_DDR_CLK_FREQ;
|
||||
#else
|
||||
sys_info->freq_ddrbus = sysclk;
|
||||
#endif
|
||||
|
||||
@@ -375,7 +375,7 @@ void smp_kick_all_cpus(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
void reset_cpu(void)
|
||||
void reset_cpu(ulong addr)
|
||||
{
|
||||
struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <fsl_immap.h>
|
||||
#include "fsl_epu.h"
|
||||
|
||||
#define __secure __section("._secure.text")
|
||||
#define __secure __attribute__((section("._secure.text")))
|
||||
|
||||
#define CCSR_GICD_CTLR 0x1000
|
||||
#define CCSR_GICC_CTLR 0x2000
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
u32 spl_boot_device(void)
|
||||
{
|
||||
#ifdef CONFIG_SPL_MMC
|
||||
#ifdef CONFIG_SPL_MMC_SUPPORT
|
||||
return BOOT_DEVICE_MMC1;
|
||||
#endif
|
||||
return BOOT_DEVICE_NAND;
|
||||
|
||||
@@ -43,3 +43,4 @@ u32 __secure psci_get_context_id(int cpu)
|
||||
{
|
||||
return psci_context_id[cpu];
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ int print_cpuinfo(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
void reset_cpu(void)
|
||||
void reset_cpu(ulong ignored)
|
||||
{
|
||||
void *clkpwr_reg = (void *)PHY_BASEADDR_CLKPWR;
|
||||
const u32 sw_rst_enb_bitpos = 3;
|
||||
|
||||
@@ -39,42 +39,6 @@ reset:
|
||||
/* Allow the board to save important registers */
|
||||
b save_boot_params
|
||||
save_boot_params_ret:
|
||||
#ifdef CONFIG_POSITION_INDEPENDENT
|
||||
/*
|
||||
* Fix .rela.dyn relocations. This allows U-Boot to loaded to and
|
||||
* executed at a different address than it was linked at.
|
||||
*/
|
||||
pie_fixup:
|
||||
adr r0, reset /* r0 <- Runtime value of reset label */
|
||||
ldr r1, =reset /* r1 <- Linked value of reset label */
|
||||
subs r4, r0, r1 /* r4 <- Runtime-vs-link offset */
|
||||
beq pie_fixup_done
|
||||
|
||||
adr r0, pie_fixup
|
||||
ldr r1, _rel_dyn_start_ofs
|
||||
add r2, r0, r1 /* r2 <- Runtime &__rel_dyn_start */
|
||||
ldr r1, _rel_dyn_end_ofs
|
||||
add r3, r0, r1 /* r3 <- Runtime &__rel_dyn_end */
|
||||
|
||||
pie_fix_loop:
|
||||
ldr r0, [r2] /* r0 <- Link location */
|
||||
ldr r1, [r2, #4] /* r1 <- fixup */
|
||||
cmp r1, #23 /* relative fixup? */
|
||||
bne pie_skip_reloc
|
||||
|
||||
/* relative fix: increase location by offset */
|
||||
add r0, r4
|
||||
ldr r1, [r0]
|
||||
add r1, r4
|
||||
str r1, [r0]
|
||||
str r0, [r2]
|
||||
add r2, #8
|
||||
pie_skip_reloc:
|
||||
cmp r2, r3
|
||||
blo pie_fix_loop
|
||||
pie_fixup_done:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARMV7_LPAE
|
||||
/*
|
||||
* check for Hypervisor support
|
||||
@@ -116,11 +80,11 @@ switch_to_hypervisor_ret:
|
||||
#endif
|
||||
|
||||
/* the mask ROM code should have PLL and others stable */
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
#ifdef CONFIG_CPU_V7A
|
||||
bl cpu_init_cp15
|
||||
#endif
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
bl cpu_init_crit
|
||||
#endif
|
||||
#endif
|
||||
@@ -356,8 +320,8 @@ skip_errata_801819:
|
||||
mov pc, r5 @ back to my caller
|
||||
ENDPROC(cpu_init_cp15)
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \
|
||||
!CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY)
|
||||
#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \
|
||||
!defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
|
||||
/*************************************************************************
|
||||
*
|
||||
* CPU_init_critical registers
|
||||
@@ -376,10 +340,3 @@ ENTRY(cpu_init_crit)
|
||||
b lowlevel_init @ go setup pll,mux,memory
|
||||
ENDPROC(cpu_init_crit)
|
||||
#endif
|
||||
|
||||
#if CONFIG_POSITION_INDEPENDENT
|
||||
_rel_dyn_start_ofs:
|
||||
.word __rel_dyn_start - pie_fixup
|
||||
_rel_dyn_end_ofs:
|
||||
.word __rel_dyn_end - pie_fixup
|
||||
#endif
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/stv0991_wdru.h>
|
||||
#include <linux/delay.h>
|
||||
void reset_cpu(void)
|
||||
void reset_cpu(ulong ignored)
|
||||
{
|
||||
puts("System is going to reboot ...\n");
|
||||
/*
|
||||
|
||||
@@ -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 (CONFIG_SYS_HZ_CLOCK / CONFIG_SYS_HZ)
|
||||
#define GPT_RESOLUTION (CONFIG_STV0991_HZ_CLOCK / CONFIG_STV0991_HZ)
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@@ -67,7 +67,7 @@ void __udelay(unsigned long usec)
|
||||
{
|
||||
ulong tmo;
|
||||
ulong start = get_timer_masked();
|
||||
ulong tenudelcnt = CONFIG_SYS_HZ_CLOCK / (1000 * 100);
|
||||
ulong tenudelcnt = CONFIG_STV0991_HZ_CLOCK / (1000 * 100);
|
||||
ulong rndoff;
|
||||
|
||||
rndoff = (usec % 10) ? 1 : 0;
|
||||
@@ -110,5 +110,5 @@ unsigned long long get_ticks(void)
|
||||
*/
|
||||
ulong get_tbclk(void)
|
||||
{
|
||||
return CONFIG_SYS_HZ;
|
||||
return CONFIG_STV0991_HZ;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ int cleanup_before_linux(void)
|
||||
/*
|
||||
* Perform the low-level reset.
|
||||
*/
|
||||
void reset_cpu(void)
|
||||
void reset_cpu(ulong addr)
|
||||
{
|
||||
/*
|
||||
* Perform reset but keep priority group unchanged.
|
||||
|
||||
@@ -3,6 +3,7 @@ if ARM64
|
||||
config ARMV8_SPL_EXCEPTION_VECTORS
|
||||
bool "Install crash dump exception vectors"
|
||||
depends on SPL
|
||||
default n
|
||||
help
|
||||
The default exception vector table is only used for the crash
|
||||
dump, but still takes quite a lot of space in the image size.
|
||||
@@ -115,7 +116,7 @@ config PSCI_RESET
|
||||
!TARGET_LS1046AFRWY && \
|
||||
!TARGET_LS2081ARDB && !TARGET_LX2160ARDB && \
|
||||
!TARGET_LX2160AQDS && !TARGET_LX2162AQDS && \
|
||||
!ARCH_UNIPHIER
|
||||
!ARCH_UNIPHIER && !TARGET_S32V234EVB
|
||||
help
|
||||
Most armv8 systems have PSCI support enabled in EL3, either through
|
||||
ARM Trusted Firmware or other firmware.
|
||||
@@ -127,6 +128,7 @@ config PSCI_RESET
|
||||
|
||||
config ARMV8_PSCI
|
||||
bool "Enable PSCI support" if EXPERT
|
||||
default n
|
||||
help
|
||||
PSCI is Power State Coordination Interface defined by ARM.
|
||||
The PSCI in U-boot provides a general framework and each platform
|
||||
@@ -154,6 +156,7 @@ config ARMV8_PSCI_CPUS_PER_CLUSTER
|
||||
|
||||
config ARMV8_EA_EL3_FIRST
|
||||
bool "External aborts and SError interrupt exception are taken in EL3"
|
||||
default n
|
||||
help
|
||||
Exception handling at all exception levels for External Abort and
|
||||
SError interrupt exception are taken in EL3.
|
||||
|
||||
@@ -27,11 +27,13 @@ ENTRY(__asm_dcache_level)
|
||||
msr csselr_el1, x12 /* select cache level */
|
||||
isb /* sync change of cssidr_el1 */
|
||||
mrs x6, ccsidr_el1 /* read the new cssidr_el1 */
|
||||
ubfx x2, x6, #0, #3 /* x2 <- log2(cache line size)-4 */
|
||||
ubfx x3, x6, #3, #10 /* x3 <- number of cache ways - 1 */
|
||||
ubfx x4, x6, #13, #15 /* x4 <- number of cache sets - 1 */
|
||||
and x2, x6, #7 /* x2 <- log2(cache line size)-4 */
|
||||
add x2, x2, #4 /* x2 <- log2(cache line size) */
|
||||
mov x3, #0x3ff
|
||||
and x3, x3, x6, lsr #3 /* x3 <- max number of #ways */
|
||||
clz w5, w3 /* bit position of #ways */
|
||||
mov x4, #0x7fff
|
||||
and x4, x4, x6, lsr #13 /* x4 <- max number of #sets */
|
||||
/* x12 <- cache level << 1 */
|
||||
/* x2 <- line length offset */
|
||||
/* x3 <- number of cache ways - 1 */
|
||||
@@ -70,7 +72,8 @@ ENTRY(__asm_dcache_all)
|
||||
mov x1, x0
|
||||
dsb sy
|
||||
mrs x10, clidr_el1 /* read clidr_el1 */
|
||||
ubfx x11, x10, #24, #3 /* x11 <- loc */
|
||||
lsr x11, x10, #24
|
||||
and x11, x11, #0x7 /* x11 <- loc */
|
||||
cbz x11, finished /* if loc is 0, exit */
|
||||
mov x15, lr
|
||||
mov x0, #0 /* start flush at cache level 0 */
|
||||
@@ -80,7 +83,8 @@ ENTRY(__asm_dcache_all)
|
||||
/* x15 <- return address */
|
||||
|
||||
loop_level:
|
||||
add x12, x0, x0, lsl #1 /* x12 <- tripled cache level */
|
||||
lsl x12, x0, #1
|
||||
add x12, x12, x0 /* x0 <- tripled cache level */
|
||||
lsr x12, x10, x12
|
||||
and x12, x12, #7 /* x12 <- cache type */
|
||||
cmp x12, #2
|
||||
@@ -127,7 +131,8 @@ ENDPROC(__asm_invalidate_dcache_all)
|
||||
.pushsection .text.__asm_flush_dcache_range, "ax"
|
||||
ENTRY(__asm_flush_dcache_range)
|
||||
mrs x3, ctr_el0
|
||||
ubfx x3, x3, #16, #4
|
||||
lsr x3, x3, #16
|
||||
and x3, x3, #0xf
|
||||
mov x2, #4
|
||||
lsl x2, x2, x3 /* cache line size */
|
||||
|
||||
@@ -153,7 +158,7 @@ ENDPROC(__asm_flush_dcache_range)
|
||||
.pushsection .text.__asm_invalidate_dcache_range, "ax"
|
||||
ENTRY(__asm_invalidate_dcache_range)
|
||||
mrs x3, ctr_el0
|
||||
ubfx x3, x3, #16, #4
|
||||
ubfm x3, x3, #16, #19
|
||||
mov x2, #4
|
||||
lsl x2, x2, x3 /* cache line size */
|
||||
|
||||
@@ -183,24 +188,27 @@ ENDPROC(__asm_invalidate_icache_all)
|
||||
.popsection
|
||||
|
||||
.pushsection .text.__asm_invalidate_l3_dcache, "ax"
|
||||
WEAK(__asm_invalidate_l3_dcache)
|
||||
ENTRY(__asm_invalidate_l3_dcache)
|
||||
mov x0, #0 /* return status as success */
|
||||
ret
|
||||
ENDPROC(__asm_invalidate_l3_dcache)
|
||||
.weak __asm_invalidate_l3_dcache
|
||||
.popsection
|
||||
|
||||
.pushsection .text.__asm_flush_l3_dcache, "ax"
|
||||
WEAK(__asm_flush_l3_dcache)
|
||||
ENTRY(__asm_flush_l3_dcache)
|
||||
mov x0, #0 /* return status as success */
|
||||
ret
|
||||
ENDPROC(__asm_flush_l3_dcache)
|
||||
.weak __asm_flush_l3_dcache
|
||||
.popsection
|
||||
|
||||
.pushsection .text.__asm_invalidate_l3_icache, "ax"
|
||||
WEAK(__asm_invalidate_l3_icache)
|
||||
ENTRY(__asm_invalidate_l3_icache)
|
||||
mov x0, #0 /* return status as success */
|
||||
ret
|
||||
ENDPROC(__asm_invalidate_l3_icache)
|
||||
.weak __asm_invalidate_l3_icache
|
||||
.popsection
|
||||
|
||||
/*
|
||||
|
||||
@@ -719,11 +719,6 @@ int icache_status(void)
|
||||
return (get_sctlr() & CR_I) != 0;
|
||||
}
|
||||
|
||||
int mmu_status(void)
|
||||
{
|
||||
return (get_sctlr() & CR_M) != 0;
|
||||
}
|
||||
|
||||
void invalidate_icache_all(void)
|
||||
{
|
||||
__asm_invalidate_icache_all();
|
||||
@@ -745,11 +740,6 @@ int icache_status(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mmu_status(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void invalidate_icache_all(void)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -64,18 +64,18 @@ ENTRY(return_to_fel)
|
||||
|
||||
/* AArch32 code to restore the state from fel_stash and return back to FEL. */
|
||||
back_in_32:
|
||||
.word 0xe59f0028 // ldr r0, [pc, #40] ; load fel_stash address
|
||||
.word 0xe5901008 // ldr r1, [r0, #8]
|
||||
.word 0xe129f001 // msr CPSR_fc, r1
|
||||
.word 0xe59f0028 // ldr r0, [pc, #40] ; load fel_stash address
|
||||
.word 0xe5901008 // ldr r1, [r0, #8]
|
||||
.word 0xe129f001 // msr CPSR_fc, r1
|
||||
.word 0xf57ff06f // isb
|
||||
.word 0xe590d000 // ldr sp, [r0]
|
||||
.word 0xe590e004 // ldr lr, [r0, #4]
|
||||
.word 0xe5901010 // ldr r1, [r0, #16]
|
||||
.word 0xee0c1f10 // mcr 15, 0, r1, cr12, cr0, {0} ; VBAR
|
||||
.word 0xe590100c // ldr r1, [r0, #12]
|
||||
.word 0xee011f10 // mcr 15, 0, r1, cr1, cr0, {0} ; SCTLR
|
||||
.word 0xe590d000 // ldr sp, [r0]
|
||||
.word 0xe590e004 // ldr lr, [r0, #4]
|
||||
.word 0xe5901010 // ldr r1, [r0, #16]
|
||||
.word 0xee0c1f10 // mcr 15, 0, r1, cr12, cr0, {0} ; VBAR
|
||||
.word 0xe590100c // ldr r1, [r0, #12]
|
||||
.word 0xee011f10 // mcr 15, 0, r1, cr1, cr0, {0} ; SCTLR
|
||||
.word 0xf57ff06f // isb
|
||||
.word 0xe12fff1e // bx lr ; return to FEL
|
||||
.word 0xe12fff1e // bx lr ; return to FEL
|
||||
fel_stash_addr:
|
||||
.word 0x00000000 // receives fel_stash addr, by AA64 code above
|
||||
ENDPROC(return_to_fel)
|
||||
|
||||
@@ -4,13 +4,11 @@ config ARCH_LS1012A
|
||||
select ARM_ERRATA_855873 if !TFABOOT
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH2
|
||||
select GICV2
|
||||
select SKIP_LOWLEVEL_INIT
|
||||
select SYS_FSL_SRDS_1
|
||||
select SYS_HAS_SERDES
|
||||
select SYS_FSL_DDR_BE
|
||||
select SYS_FSL_MMDC
|
||||
select SYS_FSL_ERRATUM_A010315 if PCIE_LAYERSCAPE
|
||||
select SYS_FSL_ERRATUM_A010315
|
||||
select SYS_FSL_ERRATUM_A009798
|
||||
select SYS_FSL_ERRATUM_A008997
|
||||
select SYS_FSL_ERRATUM_A009007
|
||||
@@ -27,7 +25,6 @@ config ARCH_LS1028A
|
||||
select ARMV8_SET_SMPEN
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH3
|
||||
select GICV3
|
||||
select NXP_LSCH3_2
|
||||
select SYS_FSL_HAS_CCI400
|
||||
select SYS_FSL_SRDS_1
|
||||
@@ -50,8 +47,6 @@ config ARCH_LS1028A
|
||||
select SYS_FSL_ERRATUM_A009663 if !TFABOOT
|
||||
select SYS_FSL_ERRATUM_A009942 if !TFABOOT
|
||||
select SYS_FSL_ERRATUM_A050382
|
||||
select SYS_FSL_ERRATUM_A011334
|
||||
select SYS_FSL_ESDHC_UNRELIABLE_PULSE_DETECTION_WORKAROUND
|
||||
select RESV_RAM if GIC_V3_ITS
|
||||
imply PANIC_HANG
|
||||
|
||||
@@ -61,9 +56,6 @@ config ARCH_LS1043A
|
||||
select ARM_ERRATA_855873 if !TFABOOT
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH2
|
||||
select GICV2
|
||||
select HAS_FSL_XHCI_USB if USB_HOST
|
||||
select SKIP_LOWLEVEL_INIT
|
||||
select SYS_FSL_SRDS_1
|
||||
select SYS_HAS_SERDES
|
||||
select SYS_FSL_DDR
|
||||
@@ -77,7 +69,7 @@ config ARCH_LS1043A
|
||||
select SYS_FSL_ERRATUM_A009663 if !TFABOOT
|
||||
select SYS_FSL_ERRATUM_A009798
|
||||
select SYS_FSL_ERRATUM_A009942 if !TFABOOT
|
||||
select SYS_FSL_ERRATUM_A010315 if PCIE_LAYERSCAPE
|
||||
select SYS_FSL_ERRATUM_A010315
|
||||
select SYS_FSL_ERRATUM_A010539
|
||||
select SYS_FSL_HAS_DDR3
|
||||
select SYS_FSL_HAS_DDR4
|
||||
@@ -89,16 +81,12 @@ config ARCH_LS1043A
|
||||
select SYS_I2C_MXC_I2C3 if !DM_I2C
|
||||
select SYS_I2C_MXC_I2C4 if !DM_I2C
|
||||
imply CMD_PCI
|
||||
imply ID_EEPROM
|
||||
|
||||
config ARCH_LS1046A
|
||||
bool
|
||||
select ARMV8_SET_SMPEN
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH2
|
||||
select GICV2
|
||||
select HAS_FSL_XHCI_USB if USB_HOST
|
||||
select SKIP_LOWLEVEL_INIT
|
||||
select SYS_FSL_SRDS_1
|
||||
select SYS_HAS_SERDES
|
||||
select SYS_FSL_DDR
|
||||
@@ -125,10 +113,8 @@ config ARCH_LS1046A
|
||||
select SYS_I2C_MXC_I2C2 if !DM_I2C
|
||||
select SYS_I2C_MXC_I2C3 if !DM_I2C
|
||||
select SYS_I2C_MXC_I2C4 if !DM_I2C
|
||||
imply ID_EEPROM
|
||||
imply SCSI
|
||||
imply SCSI_AHCI
|
||||
imply SPL_SYS_I2C_LEGACY
|
||||
|
||||
config ARCH_LS1088A
|
||||
bool
|
||||
@@ -136,8 +122,6 @@ config ARCH_LS1088A
|
||||
select ARM_ERRATA_855873 if !TFABOOT
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH3
|
||||
select GICV3
|
||||
select SKIP_LOWLEVEL_INIT
|
||||
select SYS_FSL_SRDS_1
|
||||
select SYS_HAS_SERDES
|
||||
select SYS_FSL_DDR
|
||||
@@ -170,9 +154,7 @@ config ARCH_LS1088A
|
||||
select SYS_I2C_MXC_I2C3 if !TFABOOT
|
||||
select SYS_I2C_MXC_I2C4 if !TFABOOT
|
||||
select RESV_RAM if GIC_V3_ITS
|
||||
imply ID_EEPROM
|
||||
imply SCSI
|
||||
imply SPL_SYS_I2C_LEGACY
|
||||
imply PANIC_HANG
|
||||
|
||||
config ARCH_LS2080A
|
||||
@@ -184,8 +166,6 @@ config ARCH_LS2080A
|
||||
select ARM_ERRATA_833471
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH3
|
||||
select GICV3
|
||||
select SKIP_LOWLEVEL_INIT
|
||||
select SYS_FSL_SRDS_1
|
||||
select SYS_HAS_SERDES
|
||||
select SYS_FSL_DDR
|
||||
@@ -226,16 +206,12 @@ config ARCH_LS2080A
|
||||
select SYS_I2C_MXC_I2C4 if !TFABOOT
|
||||
select RESV_RAM if GIC_V3_ITS
|
||||
imply DISTRO_DEFAULTS
|
||||
imply ID_EEPROM
|
||||
imply PANIC_HANG
|
||||
imply SPL_SYS_I2C_LEGACY
|
||||
|
||||
config ARCH_LX2162A
|
||||
bool
|
||||
select ARMV8_SET_SMPEN
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH3
|
||||
select GICV3
|
||||
select NXP_LSCH3_2
|
||||
select SYS_HAS_SERDES
|
||||
select SYS_FSL_SRDS_1
|
||||
@@ -245,9 +221,7 @@ config ARCH_LX2162A
|
||||
select SYS_FSL_DDR_VER_50
|
||||
select SYS_FSL_EC1
|
||||
select SYS_FSL_EC2
|
||||
select SYS_FSL_ERRATUM_A050204
|
||||
select SYS_FSL_ERRATUM_A011334
|
||||
select SYS_FSL_ESDHC_UNRELIABLE_PULSE_DETECTION_WORKAROUND
|
||||
select SYS_FSL_ERRATUM_A050106
|
||||
select SYS_FSL_HAS_RGMII
|
||||
select SYS_FSL_HAS_SEC
|
||||
select SYS_FSL_HAS_CCN508
|
||||
@@ -262,15 +236,11 @@ config ARCH_LX2162A
|
||||
imply PANIC_HANG
|
||||
imply SCSI
|
||||
imply SCSI_AHCI
|
||||
imply SPL_SYS_I2C_LEGACY
|
||||
|
||||
config ARCH_LX2160A
|
||||
bool
|
||||
select ARMV8_SET_SMPEN
|
||||
select FSL_LAYERSCAPE
|
||||
select FSL_LSCH3
|
||||
select GICV3
|
||||
select HAS_FSL_XHCI_USB if USB_HOST
|
||||
select NXP_LSCH3_2
|
||||
select SYS_HAS_SERDES
|
||||
select SYS_FSL_SRDS_1
|
||||
@@ -281,9 +251,7 @@ config ARCH_LX2160A
|
||||
select SYS_FSL_DDR_VER_50
|
||||
select SYS_FSL_EC1
|
||||
select SYS_FSL_EC2
|
||||
select SYS_FSL_ERRATUM_A050204
|
||||
select SYS_FSL_ERRATUM_A011334
|
||||
select SYS_FSL_ESDHC_UNRELIABLE_PULSE_DETECTION_WORKAROUND
|
||||
select SYS_FSL_ERRATUM_A050106
|
||||
select SYS_FSL_HAS_RGMII
|
||||
select SYS_FSL_HAS_SEC
|
||||
select SYS_FSL_HAS_CCN508
|
||||
@@ -295,15 +263,12 @@ config ARCH_LX2160A
|
||||
select SYS_I2C_MXC
|
||||
select RESV_RAM if GIC_V3_ITS
|
||||
imply DISTRO_DEFAULTS
|
||||
imply ID_EEPROM
|
||||
imply PANIC_HANG
|
||||
imply SCSI
|
||||
imply SCSI_AHCI
|
||||
imply SPL_SYS_I2C_LEGACY
|
||||
|
||||
config FSL_LSCH2
|
||||
bool
|
||||
select SKIP_LOWLEVEL_INIT
|
||||
select SYS_FSL_HAS_CCI400
|
||||
select SYS_FSL_HAS_SEC
|
||||
select SYS_FSL_SEC_COMPAT_5
|
||||
@@ -404,8 +369,8 @@ config SYS_FSL_ERRATUM_A009008
|
||||
config SYS_FSL_ERRATUM_A009798
|
||||
bool "Workaround for USB PHY erratum A009798"
|
||||
|
||||
config SYS_FSL_ERRATUM_A050204
|
||||
bool "Workaround for USB PHY erratum A050204"
|
||||
config SYS_FSL_ERRATUM_A050106
|
||||
bool "Workaround for USB PHY erratum A050106"
|
||||
help
|
||||
USB3.0 Receiver needs to enable fixed equalization
|
||||
for each of PHY instances in an SOC. This is similar
|
||||
@@ -455,6 +420,7 @@ config QSPI_AHB_INIT
|
||||
|
||||
config FSPI_AHB_EN_4BYTE
|
||||
bool "Enable 4-byte Fast Read command for AHB mode"
|
||||
default n
|
||||
help
|
||||
The default setting for FlexSPI AHB bus just supports 3-byte addressing.
|
||||
But some FlexSPI flash sizes are up to 64MBytes.
|
||||
@@ -670,16 +636,7 @@ config SPL_LDSCRIPT
|
||||
|
||||
config HAS_FSL_XHCI_USB
|
||||
bool
|
||||
default y if ARCH_LS1043A || ARCH_LS1046A
|
||||
help
|
||||
For some SoC (such as LS1043A and LS1046A), USB and QE-HDLC multiplex use
|
||||
For some SoC(such as LS1043A and LS1046A), USB and QE-HDLC multiplex use
|
||||
pins, select it when the pins are assigned to USB.
|
||||
|
||||
config SYS_FSL_BOOTROM_BASE
|
||||
hex
|
||||
depends on FSL_LSCH2
|
||||
default 0
|
||||
|
||||
config SYS_FSL_BOOTROM_SIZE
|
||||
hex
|
||||
depends on FSL_LSCH2
|
||||
default 0x1000000
|
||||
|
||||
@@ -1063,7 +1063,7 @@ int cpu_eth_init(struct bd_info *bis)
|
||||
return error;
|
||||
}
|
||||
|
||||
int check_psci(void)
|
||||
static inline int check_psci(void)
|
||||
{
|
||||
unsigned int psci_ver;
|
||||
|
||||
@@ -1147,7 +1147,7 @@ int arch_early_init_r(void)
|
||||
#endif
|
||||
#ifdef CONFIG_SYS_FSL_HAS_RGMII
|
||||
/* some dpmacs in armv8a based freescale layerscape SOCs can be
|
||||
* configured via both serdes(sgmii, 10gbase-r, xlaui etc) bits and via
|
||||
* configured via both serdes(sgmii, xfi, xlaui etc) bits and via
|
||||
* EC*_PMUX(rgmii) bits in RCW.
|
||||
* e.g. dpmac 17 and 18 in LX2160A can be configured as SGMII from
|
||||
* serdes bits and as RGMII via EC1_PMUX/EC2_PMUX bits
|
||||
@@ -1231,7 +1231,7 @@ int timer_init(void)
|
||||
|
||||
__efi_runtime_data u32 __iomem *rstcr = (u32 *)CONFIG_SYS_FSL_RST_ADDR;
|
||||
|
||||
void __efi_runtime reset_cpu(void)
|
||||
void __efi_runtime reset_cpu(ulong addr)
|
||||
{
|
||||
#if defined(CONFIG_ARCH_LX2160A) || defined(CONFIG_ARCH_LX2162A)
|
||||
/* clear the RST_REQ_MSK and SW_RST_REQ */
|
||||
@@ -1260,7 +1260,7 @@ void __efi_runtime EFIAPI efi_reset_system(
|
||||
case EFI_RESET_COLD:
|
||||
case EFI_RESET_WARM:
|
||||
case EFI_RESET_PLATFORM_SPECIFIC:
|
||||
reset_cpu();
|
||||
reset_cpu(0);
|
||||
break;
|
||||
case EFI_RESET_SHUTDOWN:
|
||||
/* Nothing we can do */
|
||||
|
||||
@@ -6,4 +6,3 @@
|
||||
int fsl_qoriq_core_to_cluster(unsigned int core);
|
||||
u32 initiator_type(u32 cluster, int init_id);
|
||||
u32 cpu_mask(void);
|
||||
int check_psci(void);
|
||||
|
||||
@@ -42,22 +42,22 @@ Flash Layout
|
||||
pre-silicon platforms (simulator and emulator):
|
||||
|
||||
-------------------------
|
||||
| FIT Image |
|
||||
| FIT Image |
|
||||
| (linux + DTB + RFS) |
|
||||
------------------------- ----> 0x0120_0000
|
||||
| Debug Server FW |
|
||||
| Debug Server FW |
|
||||
------------------------- ----> 0x00C0_0000
|
||||
| AIOP FW |
|
||||
| AIOP FW |
|
||||
------------------------- ----> 0x0070_0000
|
||||
| MC FW |
|
||||
| MC FW |
|
||||
------------------------- ----> 0x006C_0000
|
||||
| MC DPL Blob |
|
||||
| MC DPL Blob |
|
||||
------------------------- ----> 0x0020_0000
|
||||
| BootLoader + Env|
|
||||
| BootLoader + Env|
|
||||
------------------------- ----> 0x0000_1000
|
||||
| PBI |
|
||||
| PBI |
|
||||
------------------------- ----> 0x0000_0080
|
||||
| RCW |
|
||||
| RCW |
|
||||
------------------------- ----> 0x0000_0000
|
||||
|
||||
32-MB NOR flash layout for pre-silicon platforms (simulator and emulator)
|
||||
@@ -70,45 +70,45 @@ Flash Layout
|
||||
----------------------------------------- ----> 0x5_8790_0000 |
|
||||
| FIT Image (linux + DTB + RFS) (40M) | |
|
||||
----------------------------------------- ----> 0x5_8510_0000 |
|
||||
| PHY firmware (2M) | |
|
||||
| PHY firmware (2M) | |
|
||||
----------------------------------------- ----> 0x5_84F0_0000 | 64K
|
||||
| Debug Server FW (2M) | | Alt
|
||||
----------------------------------------- ----> 0x5_84D0_0000 | Bank
|
||||
| AIOP FW (4M) | |
|
||||
----------------------------------------- ----> 0x5_8490_0000 (vbank4)
|
||||
| MC DPC Blob (1M) | |
|
||||
| MC DPC Blob (1M) | |
|
||||
----------------------------------------- ----> 0x5_8480_0000 |
|
||||
| MC DPL Blob (1M) | |
|
||||
----------------------------------------- ----> 0x5_8470_0000 |
|
||||
| MC FW (4M) | |
|
||||
| MC FW (4M) | |
|
||||
----------------------------------------- ----> 0x5_8430_0000 |
|
||||
| BootLoader Environment (1M) | |
|
||||
| BootLoader Environment (1M) | |
|
||||
----------------------------------------- ----> 0x5_8420_0000 |
|
||||
| BootLoader (1M) | |
|
||||
----------------------------------------- ----> 0x5_8410_0000 |
|
||||
| RCW and PBI (1M) | |
|
||||
| RCW and PBI (1M) | |
|
||||
----------------------------------------- ----> 0x5_8400_0000 ---
|
||||
| .. Unused .. (7M) | |
|
||||
----------------------------------------- ----> 0x5_8390_0000 |
|
||||
| FIT Image (linux + DTB + RFS) (40M) | |
|
||||
----------------------------------------- ----> 0x5_8110_0000 |
|
||||
| PHY firmware (2M) | |
|
||||
| PHY firmware (2M) | |
|
||||
----------------------------------------- ----> 0x5_80F0_0000 | 64K
|
||||
| Debug Server FW (2M) | | Bank
|
||||
----------------------------------------- ----> 0x5_80D0_0000 |
|
||||
| AIOP FW (4M) | |
|
||||
----------------------------------------- ----> 0x5_8090_0000 (vbank0)
|
||||
| MC DPC Blob (1M) | |
|
||||
| MC DPC Blob (1M) | |
|
||||
----------------------------------------- ----> 0x5_8080_0000 |
|
||||
| MC DPL Blob (1M) | |
|
||||
----------------------------------------- ----> 0x5_8070_0000 |
|
||||
| MC FW (4M) | |
|
||||
| MC FW (4M) | |
|
||||
----------------------------------------- ----> 0x5_8030_0000 |
|
||||
| BootLoader Environment (1M) | |
|
||||
| BootLoader Environment (1M) | |
|
||||
----------------------------------------- ----> 0x5_8020_0000 |
|
||||
| BootLoader (1M) | |
|
||||
----------------------------------------- ----> 0x5_8010_0000 |
|
||||
| RCW and PBI (1M) | |
|
||||
| RCW and PBI (1M) | |
|
||||
----------------------------------------- ----> 0x5_8000_0000 ---
|
||||
|
||||
128-MB NOR flash layout for QDS and RDB boards
|
||||
|
||||
@@ -31,7 +31,7 @@ The LS1043A SoC includes the following function and features:
|
||||
- Hardware buffer management for buffer allocation and de-allocation (BMan)
|
||||
- Cryptography acceleration (SEC)
|
||||
- Ethernet interfaces by FMan
|
||||
- Up to 1 x 10GBase-R supporting 10G interface
|
||||
- Up to 1 x XFI supporting 10G interface
|
||||
- Up to 1 x QSGMII
|
||||
- Up to 4 x SGMII supporting 1000Mbps
|
||||
- Up to 2 x SGMII supporting 2500Mbps
|
||||
@@ -190,7 +190,7 @@ The LS1046A SoC includes the following function and features:
|
||||
- Two PLLs per four-lane SerDes
|
||||
- Support for 10G operation
|
||||
- Ethernet interfaces by FMan
|
||||
- Up to 2 x 10GBase-R supporting 10G interface (MAC 9, 10)
|
||||
- Up to 2 x XFI supporting 10G interface (MAC 9, 10)
|
||||
- Up to 1 x QSGMII (MAC 5, 6, 10, 1)
|
||||
- Up to 4 x SGMII supporting 1000Mbps (MAC 5, 6, 9, 10)
|
||||
- Up to 3 x SGMII supporting 2500Mbps (MAC 5, 9, 10)
|
||||
@@ -295,7 +295,7 @@ The LX2160A SoC includes the following function and features:
|
||||
Single WRIOP tile supporting 130Gbps using 18 MACs
|
||||
Support for 10G-SXGMII (aka USXGMII).
|
||||
Support for SGMII (and 1000Base-KX)
|
||||
Support for 10GBase-R (and 10GBase-KR)
|
||||
Support for XFI (and 10GBase-KR)
|
||||
Support for CAUI4 (100G); CAUI2 (50G) and 25G-AUI(25G).
|
||||
Support for XLAUI (and 40GBase-KR4) for 40G.
|
||||
Support for two RGMII parallel interfaces.
|
||||
@@ -400,7 +400,7 @@ The LX2162A SoC includes the following function and features:
|
||||
Ethernet interfaces
|
||||
Support for 10G-SXGMII (aka USXGMII).
|
||||
Support for SGMII (and 1000Base-KX)
|
||||
Support for 10GBase-R (and 10GBase-KR)
|
||||
Support for XFI (and 10GBase-KR)
|
||||
Support for CAUI2 (50G) and 25G-AUI(25G).
|
||||
Support for XLAUI (and 40GBase-KR4) for 40G.
|
||||
Support for two RGMII parallel interfaces.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright 2014-2015 Freescale Semiconductor, Inc.
|
||||
* Copyright 2020-2021 NXP
|
||||
* Copyright 2020 NXP
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
@@ -427,7 +427,7 @@ static void fdt_disable_multimedia(void *blob, unsigned int svr)
|
||||
fdt_status_disabled(blob, off);
|
||||
|
||||
/* Disable GPU node */
|
||||
off = fdt_node_offset_by_compatible(blob, -1, "vivante,gc");
|
||||
off = fdt_node_offset_by_compatible(blob, -1, "fsl,ls1028a-gpu");
|
||||
if (off != -FDT_ERR_NOTFOUND)
|
||||
fdt_status_disabled(blob, off);
|
||||
}
|
||||
@@ -478,151 +478,6 @@ static bool crypto_is_disabled(unsigned int svr)
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FSL_PFE
|
||||
void pfe_set_firmware_in_fdt(void *blob, int pfenode, void *pfw, char *pename,
|
||||
unsigned int len)
|
||||
{
|
||||
int rc, fwnode;
|
||||
unsigned int phandle;
|
||||
char subnode_str[32], prop_str[32], phandle_str[32], s[64];
|
||||
|
||||
sprintf(subnode_str, "pfe-%s-firmware", pename);
|
||||
sprintf(prop_str, "fsl,pfe-%s-firmware", pename);
|
||||
sprintf(phandle_str, "fsl,%s-firmware", pename);
|
||||
|
||||
/*Add PE FW to fdt.*/
|
||||
/* Increase the size of the fdt to make room for the node. */
|
||||
rc = fdt_increase_size(blob, len);
|
||||
if (rc < 0) {
|
||||
printf("Unable to make room for %s firmware: %s\n", pename,
|
||||
fdt_strerror(rc));
|
||||
return;
|
||||
}
|
||||
|
||||
/* Create the firmware node. */
|
||||
fwnode = fdt_add_subnode(blob, pfenode, subnode_str);
|
||||
if (fwnode < 0) {
|
||||
fdt_get_path(blob, pfenode, s, sizeof(s));
|
||||
printf("Could not add firmware node to %s: %s\n", s,
|
||||
fdt_strerror(fwnode));
|
||||
return;
|
||||
}
|
||||
|
||||
rc = fdt_setprop_string(blob, fwnode, "compatible", prop_str);
|
||||
if (rc < 0) {
|
||||
fdt_get_path(blob, fwnode, s, sizeof(s));
|
||||
printf("Could not add compatible property to node %s: %s\n", s,
|
||||
fdt_strerror(rc));
|
||||
return;
|
||||
}
|
||||
|
||||
rc = fdt_setprop_u32(blob, fwnode, "length", len);
|
||||
if (rc < 0) {
|
||||
fdt_get_path(blob, fwnode, s, sizeof(s));
|
||||
printf("Could not add compatible property to node %s: %s\n", s,
|
||||
fdt_strerror(rc));
|
||||
return;
|
||||
}
|
||||
|
||||
/*create phandle and set the property*/
|
||||
phandle = fdt_create_phandle(blob, fwnode);
|
||||
if (!phandle) {
|
||||
fdt_get_path(blob, fwnode, s, sizeof(s));
|
||||
printf("Could not add phandle property to node %s: %s\n", s,
|
||||
fdt_strerror(rc));
|
||||
return;
|
||||
}
|
||||
|
||||
rc = fdt_setprop(blob, fwnode, phandle_str, pfw, len);
|
||||
if (rc < 0) {
|
||||
fdt_get_path(blob, fwnode, s, sizeof(s));
|
||||
printf("Could not add firmware property to node %s: %s\n", s,
|
||||
fdt_strerror(rc));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void fdt_fixup_pfe_firmware(void *blob)
|
||||
{
|
||||
int pfenode;
|
||||
unsigned int len_class = 0, len_tmu = 0, len_util = 0;
|
||||
const char *p;
|
||||
void *pclassfw, *ptmufw, *putilfw;
|
||||
|
||||
/* The first PFE we find, will contain the actual firmware. */
|
||||
pfenode = fdt_node_offset_by_compatible(blob, -1, "fsl,pfe");
|
||||
if (pfenode < 0)
|
||||
/* Exit silently if there are no PFE devices */
|
||||
return;
|
||||
|
||||
/* If we already have a firmware node, then also exit silently. */
|
||||
if (fdt_node_offset_by_compatible(blob, -1,
|
||||
"fsl,pfe-class-firmware") > 0)
|
||||
return;
|
||||
|
||||
/* If the environment variable is not set, then exit silently */
|
||||
p = env_get("class_elf_firmware");
|
||||
if (!p)
|
||||
return;
|
||||
|
||||
pclassfw = (void *)hextoul(p, NULL);
|
||||
if (!pclassfw)
|
||||
return;
|
||||
|
||||
p = env_get("class_elf_size");
|
||||
if (!p)
|
||||
return;
|
||||
len_class = hextoul(p, NULL);
|
||||
|
||||
/* If the environment variable is not set, then exit silently */
|
||||
p = env_get("tmu_elf_firmware");
|
||||
if (!p)
|
||||
return;
|
||||
|
||||
ptmufw = (void *)hextoul(p, NULL);
|
||||
if (!ptmufw)
|
||||
return;
|
||||
|
||||
p = env_get("tmu_elf_size");
|
||||
if (!p)
|
||||
return;
|
||||
len_tmu = hextoul(p, NULL);
|
||||
|
||||
if (len_class == 0 || len_tmu == 0) {
|
||||
printf("PFE FW corrupted. CLASS FW size %d, TMU FW size %d\n",
|
||||
len_class, len_tmu);
|
||||
return;
|
||||
}
|
||||
|
||||
/*Add CLASS FW to fdt.*/
|
||||
pfe_set_firmware_in_fdt(blob, pfenode, pclassfw, "class", len_class);
|
||||
|
||||
/*Add TMU FW to fdt.*/
|
||||
pfe_set_firmware_in_fdt(blob, pfenode, ptmufw, "tmu", len_tmu);
|
||||
|
||||
/* Util PE firmware is handled separately as it is not a usual case*/
|
||||
p = env_get("util_elf_firmware");
|
||||
if (!p)
|
||||
return;
|
||||
|
||||
putilfw = (void *)hextoul(p, NULL);
|
||||
if (!putilfw)
|
||||
return;
|
||||
|
||||
p = env_get("util_elf_size");
|
||||
if (!p)
|
||||
return;
|
||||
len_util = hextoul(p, NULL);
|
||||
|
||||
if (len_util) {
|
||||
printf("PFE Util PE firmware is not added to FDT.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
pfe_set_firmware_in_fdt(blob, pfenode, putilfw, "util", len_util);
|
||||
}
|
||||
#endif
|
||||
|
||||
void ft_cpu_setup(void *blob, struct bd_info *bd)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
@@ -679,9 +534,6 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
|
||||
#ifdef CONFIG_SYS_DPAA_FMAN
|
||||
fdt_fixup_fman_firmware(blob);
|
||||
#endif
|
||||
#ifdef CONFIG_FSL_PFE
|
||||
fdt_fixup_pfe_firmware(blob);
|
||||
#endif
|
||||
#ifndef CONFIG_ARCH_LS1012A
|
||||
fsl_fdt_disable_usb(blob);
|
||||
#endif
|
||||
|
||||
@@ -61,8 +61,8 @@ void get_sys_info(struct sys_info *sys_info)
|
||||
#endif
|
||||
cluster_clk = CONFIG_CLUSTER_CLK_FREQ;
|
||||
|
||||
#if defined(CONFIG_DYNAMIC_DDR_CLK_FREQ) || defined(CONFIG_STATIC_DDR_CLK_FREQ)
|
||||
sys_info->freq_ddrbus = get_board_ddr_clk();
|
||||
#ifdef CONFIG_DDR_CLK_FREQ
|
||||
sys_info->freq_ddrbus = CONFIG_DDR_CLK_FREQ;
|
||||
#else
|
||||
sys_info->freq_ddrbus = sysclk;
|
||||
#endif
|
||||
|
||||
@@ -78,10 +78,10 @@ void get_sys_info(struct sys_info *sys_info)
|
||||
void *offset;
|
||||
|
||||
sys_info->freq_systembus = sysclk;
|
||||
#if defined(CONFIG_DYNAMIC_DDR_CLK_FREQ) || defined(CONFIG_STATIC_DDR_CLK_FREQ)
|
||||
sys_info->freq_ddrbus = get_board_ddr_clk();
|
||||
#ifdef CONFIG_DDR_CLK_FREQ
|
||||
sys_info->freq_ddrbus = CONFIG_DDR_CLK_FREQ;
|
||||
#ifdef CONFIG_SYS_FSL_HAS_DP_DDR
|
||||
sys_info->freq_ddrbus2 = get_board_ddr_clk();
|
||||
sys_info->freq_ddrbus2 = CONFIG_DDR_CLK_FREQ;
|
||||
#endif
|
||||
#else
|
||||
sys_info->freq_ddrbus = sysclk;
|
||||
|
||||
@@ -250,7 +250,7 @@ ENTRY(lowlevel_init)
|
||||
* b. We use only Region0 whose NSAID write/read is EN
|
||||
*
|
||||
* NOTE: As per the CCSR map doc, TZASC 3 and TZASC 4 are just
|
||||
* placeholders.
|
||||
* placeholders.
|
||||
*/
|
||||
|
||||
.macro tzasc_prog, xreg
|
||||
@@ -259,7 +259,7 @@ ENTRY(lowlevel_init)
|
||||
mov x16, #0x10000
|
||||
mul x14, \xreg, x16
|
||||
add x14, x14,x12
|
||||
mov x1, #0x8
|
||||
mov x1, #0x8
|
||||
add x1, x1, x14
|
||||
|
||||
ldr w0, [x1] /* Filter 0 Gate Keeper Register */
|
||||
|
||||
@@ -18,7 +18,7 @@ struct icid_id_table icid_tbl[] = {
|
||||
SET_SATA_ICID(1, "fsl,ls1028a-ahci", FSL_SATA1_STREAM_ID),
|
||||
SET_EDMA_ICID(FSL_EDMA_STREAM_ID),
|
||||
SET_QDMA_ICID("fsl,ls1028a-qdma", FSL_DMA_STREAM_ID),
|
||||
SET_GPU_ICID("vivante,gc", FSL_GPU_STREAM_ID),
|
||||
SET_GPU_ICID("fsl,ls1028a-gpu", FSL_GPU_STREAM_ID),
|
||||
SET_DISPLAY_ICID(FSL_DISPLAY_STREAM_ID),
|
||||
#ifdef CONFIG_FSL_CAAM
|
||||
SET_SEC_JR_ICID_ENTRY(0, FSL_SEC_JR1_STREAM_ID),
|
||||
|
||||
@@ -100,7 +100,7 @@ enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane)
|
||||
if (serdes >= ARRAY_SIZE(serdes_cfg_tbl))
|
||||
return 0;
|
||||
/*
|
||||
* LS1044A/1048A support only one 10GBase-R port
|
||||
* LS1044A/1048A support only one XFI port
|
||||
* Disable MAC1 for LS1044A/1048A
|
||||
*/
|
||||
if (serdes == FSL_SRDS_1 && lane == 2) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user