mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-12 22:49:43 +03:00
Compare commits
3 Commits
v2019.07-r
...
v2016.09.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3363c0604 | ||
|
|
44e3dd1402 | ||
|
|
6baa904ad2 |
@@ -25,6 +25,3 @@
|
||||
# Ignore "WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet
|
||||
# addresses are __aligned(2)".
|
||||
--ignore PREFER_ETHER_ADDR_COPY
|
||||
|
||||
# A bit shorter of a description is OK with us.
|
||||
--min-conf-desc-length=2
|
||||
|
||||
3
.github/pull_request_template.md
vendored
3
.github/pull_request_template.md
vendored
@@ -1,3 +0,0 @@
|
||||
Please do not submit a Pull Request via github. Our project makes use of
|
||||
mailing lists for patch submission and review. For more details please
|
||||
see https://www.denx.de/wiki/U-Boot/Patches
|
||||
36
.gitignore
vendored
36
.gitignore
vendored
@@ -3,31 +3,26 @@
|
||||
# subdirectories here. Add them in the ".gitignore" file
|
||||
# in that subdirectory instead.
|
||||
#
|
||||
# Normal rules (sorted alphabetically)
|
||||
# Normal rules
|
||||
#
|
||||
.*
|
||||
*.a
|
||||
*.bin
|
||||
*.cfgout
|
||||
*.dtb
|
||||
*.dtbo
|
||||
*.dtb.S
|
||||
*.elf
|
||||
*.exe
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.i
|
||||
*.lex.c
|
||||
*.lst
|
||||
*.mod.c
|
||||
*.o
|
||||
*.o.*
|
||||
*.order
|
||||
*.patch
|
||||
*.a
|
||||
*.s
|
||||
*.su
|
||||
*.mod.c
|
||||
*.i
|
||||
*.lst
|
||||
*.order
|
||||
*.elf
|
||||
*.swp
|
||||
*.tab.[ch]
|
||||
*.bin
|
||||
*.patch
|
||||
*.cfgtmp
|
||||
|
||||
# host programs on Cygwin
|
||||
*.exe
|
||||
|
||||
# Build tree
|
||||
/build-*
|
||||
@@ -35,13 +30,11 @@
|
||||
#
|
||||
# Top-level generic files
|
||||
#
|
||||
fit-dtb.blob*
|
||||
/MLO*
|
||||
/SPL*
|
||||
/SPL
|
||||
/System.map
|
||||
/u-boot*
|
||||
/boards.cfg
|
||||
/*.log
|
||||
|
||||
#
|
||||
# git files that we don't want to ignore even it they are dot-files
|
||||
@@ -52,6 +45,7 @@ fit-dtb.blob*
|
||||
#
|
||||
# Generated files
|
||||
#
|
||||
/LOG
|
||||
/spl/
|
||||
/tpl/
|
||||
/defconfig
|
||||
|
||||
3
.mailmap
3
.mailmap
@@ -20,7 +20,6 @@ Jagan Teki <jaganna@xilinx.com>
|
||||
Jagan Teki <jagannadh.teki@gmail.com>
|
||||
Jagan Teki <jagannadha.sutradharudu-teki@xilinx.com>
|
||||
Markus Klotzbuecher <mk@denx.de>
|
||||
Paul Burton <paul.burton@mips.com> <paul.burton@imgtec.com>
|
||||
Prabhakar Kushwaha <prabhakar@freescale.com>
|
||||
Rajeshwari Shinde <rajeshwari.s@samsung.com>
|
||||
Ricardo Ribalda <ricardo.ribalda@uam.es>
|
||||
@@ -34,5 +33,3 @@ Wolfgang Denk <wdenk>
|
||||
York Sun <yorksun@freescale.com>
|
||||
York Sun <york.sun@nxp.com>
|
||||
Łukasz Majewski <l.majewski@samsung.com>
|
||||
Lukasz Majewski <lukma@denx.de>
|
||||
Mirza <Taimoor_Mirza@mentor.com>
|
||||
|
||||
545
.travis.yml
545
.travis.yml
@@ -1,18 +1,14 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
# Copyright Roger Meier <r.meier@siemens.com>
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
# build U-Boot on Travis CI - https://travis-ci.org/
|
||||
|
||||
sudo: required
|
||||
dist: trusty
|
||||
sudo: true
|
||||
|
||||
language: c
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-7
|
||||
packages:
|
||||
- cppcheck
|
||||
- sloccount
|
||||
@@ -22,465 +18,172 @@ addons:
|
||||
- libsdl1.2-dev
|
||||
- python
|
||||
- python-virtualenv
|
||||
- swig
|
||||
- libpython-dev
|
||||
- iasl
|
||||
- grub-efi-ia32-bin
|
||||
- grub-efi-amd64-bin
|
||||
- rpm2cpio
|
||||
- wget
|
||||
- device-tree-compiler
|
||||
- lzop
|
||||
- liblz4-tool
|
||||
- libisl15
|
||||
- clang-7
|
||||
- srecord
|
||||
|
||||
cache:
|
||||
- apt
|
||||
|
||||
install:
|
||||
# Clone 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`
|
||||
# install latest device tree compiler
|
||||
- git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
|
||||
- make -j4 -C /tmp/dtc
|
||||
# prepare buildman environment
|
||||
- echo -e "[toolchain]\nroot = /usr" > ~/.buildman
|
||||
- echo -e "arc = /tmp/arc_gnu_2018.09_prebuilt_uclibc_le_archs_linux_install" >> ~/.buildman
|
||||
- echo -e "\n[toolchain-alias]\nsh = sh2\n" >> ~/.buildman
|
||||
- export BUILDMAN_ROOT="root:"
|
||||
- export BUILDMAN_PPC="ppc:"
|
||||
- export BUILDMAN_ARM="arm:"
|
||||
- export BUILDMAN_SANDBOX="sandbox:"
|
||||
- echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman
|
||||
- echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/\n" >> ~/.buildman
|
||||
- echo -e "${BUILDMAN_ARM} /opt/eldk-5.4/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi/\n" >> ~/.buildman
|
||||
- echo -e "${BUILDMAN_SANDBOX} /usr/bin/gcc\n" >> ~/.buildman
|
||||
- export BUILDMAN_ALIAS="x86:"
|
||||
- export BUILDMAN_ALIAS_ARM="arm:"
|
||||
- echo -e "\n\n[toolchain-alias]\n${BUILDMAN_ALIAS} i386\n" >> ~/.buildman
|
||||
- echo -e "${BUILDMAN_ALIAS_ARM} armv5te\n" >> ~/.buildman
|
||||
- cat ~/.buildman
|
||||
- virtualenv /tmp/venv
|
||||
- . /tmp/venv/bin/activate
|
||||
- pip install pytest==2.8.7
|
||||
- pip install python-subunit
|
||||
- grub-mkimage -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
|
||||
- grub-mkimage -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
|
||||
- mkdir ~/grub2-arm
|
||||
- ( cd ~/grub2-arm; wget -O - http://download.opensuse.org/ports/armv7hl/distribution/leap/42.2/repo/oss/suse/armv7hl/grub2-arm-efi-2.02~beta2-87.1.armv7hl.rpm | rpm2cpio | cpio -di )
|
||||
- mkdir ~/grub2-arm64
|
||||
- ( cd ~/grub2-arm64; wget -O - http://download.opensuse.org/ports/aarch64/distribution/leap/42.2/repo/oss/suse/aarch64/grub2-arm64-efi-2.02~beta2-87.1.aarch64.rpm | rpm2cpio | cpio -di )
|
||||
- pip install pytest
|
||||
|
||||
env:
|
||||
global:
|
||||
- PATH=/tmp/qemu-install/bin:/tmp/uboot-test-hooks/bin:/usr/bin:/bin
|
||||
- PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci
|
||||
- PATH=/tmp/dtc:$PATH
|
||||
- BUILD_DIR=build
|
||||
- HOSTCC="cc"
|
||||
- HOSTCXX="c++"
|
||||
- QEMU_VERSION="v3.1.0"
|
||||
|
||||
before_script:
|
||||
# install toolchains based on TOOLCHAIN} variable
|
||||
- if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi
|
||||
- if [[ "${TOOLCHAIN}" == *arm* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/armv5te/eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh ; fi
|
||||
- if [[ "${TOOLCHAIN}" == *arm* ]]; then sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y ; fi
|
||||
- if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
|
||||
- if [[ "${TOOLCHAIN}" == *i386* ]]; then ./tools/buildman/buildman sandbox --fetch-arch i386 ; fi
|
||||
- if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
|
||||
- if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi
|
||||
- if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
|
||||
- if [[ "${TOOLCHAIN}" == *sh* ]]; then ./tools/buildman/buildman --fetch-arch sh2 ; fi
|
||||
- if [[ "${TOOLCHAIN}" == *i386* ]]; then
|
||||
./tools/buildman/buildman --fetch-arch i386;
|
||||
echo -e "\n[toolchain-alias]\nx86 = i386" >> ~/.buildman;
|
||||
fi
|
||||
- if [[ "${TOOLCHAIN}" == arc ]]; then
|
||||
wget https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2018.09-release/arc_gnu_2018.09_prebuilt_uclibc_le_archs_linux_install.tar.gz &&
|
||||
tar -C /tmp -xf arc_gnu_2018.09_prebuilt_uclibc_le_archs_linux_install.tar.gz;
|
||||
fi
|
||||
- if [[ "${TOOLCHAIN}" == "nds32" ]]; then
|
||||
wget https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz &&
|
||||
tar -C /tmp -xf nds32le-linux-glibc-v3-upstream.tar.gz &&
|
||||
echo -e "\n[toolchain-prefix]\nnds32 = /tmp/nds32le-linux-glibc-v3-upstream/bin/nds32le-linux-" >> ~/.buildman;
|
||||
fi
|
||||
- if [[ "${TOOLCHAIN}" == *xtensa* ]]; then
|
||||
wget https://github.com/foss-xtensa/toolchain/releases/download/2018.02/x86_64-2018.02-${TOOLCHAIN}.tar.gz &&
|
||||
tar -C /tmp -xf x86_64-2018.02-${TOOLCHAIN}.tar.gz &&
|
||||
echo -e "\n[toolchain-prefix]\nxtensa = /tmp/2018.02/${TOOLCHAIN}/bin/${TOOLCHAIN}-" >> ~/.buildman;
|
||||
fi
|
||||
# If TOOLCHAIN is unset, we're on some flavour of ARM.
|
||||
- if [[ "${TOOLCHAIN}" == "" ]]; then
|
||||
./tools/buildman/buildman --fetch-arch arm &&
|
||||
./tools/buildman/buildman --fetch-arch aarch64;
|
||||
fi
|
||||
- if [[ "${TOOLCHAIN}" == "powerpc" ]]; then ./tools/buildman/buildman --fetch-arch powerpc; fi
|
||||
- if [[ "${TOOLCHAIN}" == "riscv" ]]; then
|
||||
./tools/buildman/buildman --fetch-arch riscv64;
|
||||
echo -e "\n[toolchain-alias]\nriscv = riscv64" >> ~/.buildman;
|
||||
fi
|
||||
- if [[ "${QEMU_TARGET}" != "" ]]; then
|
||||
git clone git://git.qemu.org/qemu.git /tmp/qemu;
|
||||
pushd /tmp/qemu;
|
||||
git submodule update --init dtc &&
|
||||
git checkout ${QEMU_VERSION} &&
|
||||
./configure --prefix=/tmp/qemu-install --target-list=${QEMU_TARGET} &&
|
||||
make -j4 all install;
|
||||
popd;
|
||||
fi
|
||||
- if [[ "${TOOLCHAIN}" == *ppc* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh ; fi
|
||||
- if [[ "${TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi
|
||||
|
||||
script:
|
||||
# Comments must be outside the command strings below, or the Travis parser
|
||||
# will get confused.
|
||||
#
|
||||
# From buildman, exit code 129 means warnings only. If we've been asked to
|
||||
# use clang only do one configuration.
|
||||
- if [[ "${BUILDMAN}" != "" ]]; then
|
||||
ret=0;
|
||||
tools/buildman/buildman -P -E ${BUILDMAN} ${OVERRIDE}|| ret=$?;
|
||||
if [[ $ret -ne 0 && $ret -ne 129 ]]; then
|
||||
tools/buildman/buildman -sdeP ${BUILDMAN};
|
||||
exit $ret;
|
||||
fi;
|
||||
# the execution sequence for each test
|
||||
- if [[ "${TEST_CMD}" != "" ]]; then
|
||||
${TEST_CMD};
|
||||
fi
|
||||
# "not a_test_which_does_not_exist" is a dummy -k parameter which will
|
||||
# never prevent any test from running. That way, we can always pass
|
||||
# "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom
|
||||
# value.
|
||||
- export UBOOT_TRAVIS_BUILD_DIR=`cd .. && pwd`/.bm-work/${TEST_PY_BD};
|
||||
cp ~/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/;
|
||||
cp ~/grub_x64.efi $UBOOT_TRAVIS_BUILD_DIR/;
|
||||
cp ~/grub2-arm/usr/lib/grub2/arm-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi;
|
||||
cp ~/grub2-arm64/usr/lib/grub2/arm64-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm64.efi;
|
||||
if [[ "${TEST_PY_BD}" != "" ]]; then
|
||||
./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID}
|
||||
-k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}"
|
||||
--build-dir "$UBOOT_TRAVIS_BUILD_DIR";
|
||||
ret=$?;
|
||||
if [[ $ret -ne 0 ]]; then
|
||||
exit $ret;
|
||||
fi;
|
||||
fi;
|
||||
if [[ -n "${TEST_PY_TOOLS}" ]]; then
|
||||
PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
|
||||
PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}"
|
||||
./tools/binman/binman -t &&
|
||||
./tools/patman/patman --test &&
|
||||
./tools/buildman/buildman -t &&
|
||||
PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
|
||||
PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}"
|
||||
./tools/dtoc/dtoc -t;
|
||||
- if [[ "${BUILDMAN}" != "" ]]; then
|
||||
tools/buildman/buildman ${BUILDMAN};
|
||||
fi
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# we need to build by vendor due to 50min time limit for builds
|
||||
# each env setting here is a dedicated build
|
||||
- name: "buildman arc"
|
||||
env:
|
||||
- BUILDMAN="arc"
|
||||
TOOLCHAIN="arc"
|
||||
- name: "buildman arm11 arm7 arm920t arm946es"
|
||||
env:
|
||||
- BUILDMAN="arm11 arm7 arm920t arm946es"
|
||||
- name: "buildman arm926ejs (non-NXP,siemens,at91,kirkwood,spear)"
|
||||
env:
|
||||
- JOB="arm926ejs"
|
||||
BUILDMAN="arm926ejs -x freescale,siemens,at91,kirkwood,spear,omap"
|
||||
- name: "buildman at91 (non arm v7)"
|
||||
env:
|
||||
- BUILDMAN="at91 -x armv7"
|
||||
- name: "buildman at91 (non arm926ejs)"
|
||||
env:
|
||||
- BUILDMAN="at91 -x arm926ejs"
|
||||
- name: "buildman boundary engicam toradex"
|
||||
env:
|
||||
- BUILDMAN="boundary engicam toradex"
|
||||
- name: "buildman NXP ARM32"
|
||||
env:
|
||||
- env:
|
||||
- BUILDMAN="arm1136"
|
||||
TOOLCHAIN="arm"
|
||||
- env:
|
||||
- BUILDMAN="arm1136"
|
||||
TOOLCHAIN="arm"
|
||||
- env:
|
||||
- BUILDMAN="arm1176"
|
||||
TOOLCHAIN="arm"
|
||||
- env:
|
||||
- BUILDMAN="arm720t"
|
||||
TOOLCHAIN="arm"
|
||||
- env:
|
||||
- BUILDMAN="arm920t"
|
||||
TOOLCHAIN="arm"
|
||||
- env:
|
||||
- BUILDMAN="atmel -x avr32"
|
||||
TOOLCHAIN="arm"
|
||||
- env:
|
||||
- BUILDMAN="avr32"
|
||||
TOOLCHAIN="avr32"
|
||||
- env:
|
||||
- BUILDMAN="davinci"
|
||||
TOOLCHAIN="arm"
|
||||
- env:
|
||||
- BUILDMAN="denx"
|
||||
TOOLCHAIN="arm"
|
||||
- env:
|
||||
- BUILDMAN="freescale -x powerpc,m68k,aarch64"
|
||||
- name: "buildman NXP AArch64 LS101x"
|
||||
env:
|
||||
- BUILDMAN="freescale&aarch64&ls101"
|
||||
- name: "buildman NXP AArch64 LS104x"
|
||||
env:
|
||||
- BUILDMAN="freescale&aarch64&ls104"
|
||||
- name: "buildman NXP AArch64 LS108x"
|
||||
env:
|
||||
- BUILDMAN="freescale&aarch64&ls108"
|
||||
- name: "buildman NXP AArch64 LS20xx"
|
||||
env:
|
||||
- BUILDMAN="freescale&aarch64&&ls20"
|
||||
- name: "buildman i.MX6 (non-NXP)"
|
||||
env:
|
||||
- BUILDMAN="mx6 -x freescale,toradex,boundary,engicam"
|
||||
- name: "buildman i.MX (non-NXP,i.MX6,toradex)"
|
||||
env:
|
||||
- BUILDMAN="mx -x freescale,mx6,toradex"
|
||||
- name: "buildman k2"
|
||||
env:
|
||||
- BUILDMAN="k2"
|
||||
- name: "buildman samsung socfpga"
|
||||
env:
|
||||
- BUILDMAN="samsung socfpga"
|
||||
- name: "buildman spear"
|
||||
env:
|
||||
- BUILDMAN="spear"
|
||||
- name: "buildman sun4i"
|
||||
env:
|
||||
- BUILDMAN="sun4i"
|
||||
- name: "buildman sun5i"
|
||||
env:
|
||||
- BUILDMAN="sun5i"
|
||||
- name: "buildman sun6i"
|
||||
env:
|
||||
- BUILDMAN="sun6i"
|
||||
- name: "buildman sun7i"
|
||||
env:
|
||||
- BUILDMAN="sun7i"
|
||||
- name: "buildman sun8i"
|
||||
env:
|
||||
- BUILDMAN="sun8i"
|
||||
- name: "buildman sun9i"
|
||||
env:
|
||||
- BUILDMAN="sun9i"
|
||||
- name: "buildman sun50i"
|
||||
env:
|
||||
- BUILDMAN="sun50i"
|
||||
- name: "buildman catch-all ARM"
|
||||
env:
|
||||
- BUILDMAN="arm -x arm11,arm7,arm9,aarch64,at91,freescale,kirkwood,mvebu,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap,pxa,rockchip,toradex,socfpga,k2,xilinx"
|
||||
- name: "buildman sandbox x86"
|
||||
env:
|
||||
TOOLCHAIN="arm"
|
||||
- env:
|
||||
- BUILDMAN="sandbox x86"
|
||||
TOOLCHAIN="i386"
|
||||
- name: "buildman kirkwood"
|
||||
env:
|
||||
- env:
|
||||
- BUILDMAN="kirkwood"
|
||||
- name: "buildman mvebu"
|
||||
env:
|
||||
- BUILDMAN="mvebu"
|
||||
- name: "buildman PXA (non-toradex)"
|
||||
env:
|
||||
- BUILDMAN="pxa -x toradex"
|
||||
- name: "buildman m68k"
|
||||
env:
|
||||
TOOLCHAIN="arm"
|
||||
- env:
|
||||
- BUILDMAN="m68k"
|
||||
TOOLCHAIN="m68k"
|
||||
- name: "buildman microblaze"
|
||||
env:
|
||||
- BUILDMAN="microblaze"
|
||||
TOOLCHAIN="microblaze"
|
||||
- name: "buildman mips"
|
||||
env:
|
||||
- env:
|
||||
- BUILDMAN="mips"
|
||||
TOOLCHAIN="mips"
|
||||
- name: "buildman non-Freescale PowerPC"
|
||||
env:
|
||||
- BUILDMAN="powerpc -x freescale"
|
||||
TOOLCHAIN="powerpc"
|
||||
- name: "buildman mpc85xx&freescale (excluding many)"
|
||||
env:
|
||||
- BUILDMAN="mpc85xx&freescale -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x bsc91*"
|
||||
TOOLCHAIN="powerpc"
|
||||
- name: "buildman t208xrdb corenet_ds"
|
||||
env:
|
||||
- BUILDMAN="t208xrdb corenet_ds"
|
||||
TOOLCHAIN="powerpc"
|
||||
- name: "buildman Freescale PowerPC"
|
||||
env:
|
||||
- BUILDMAN="t4qds b4860qds mpc83xx&freescale mpc86xx&freescale"
|
||||
TOOLCHAIN="powerpc"
|
||||
- name: "buildman t102*"
|
||||
env:
|
||||
- BUILDMAN="t102*"
|
||||
TOOLCHAIN="powerpc"
|
||||
- name: "buildman p1_p2_rdb_pc"
|
||||
env:
|
||||
- BUILDMAN="p1_p2_rdb_pc"
|
||||
TOOLCHAIN="powerpc"
|
||||
- name: "buildman p1010rdb bsc91"
|
||||
env:
|
||||
- BUILDMAN="p1010rdb bsc91"
|
||||
TOOLCHAIN="powerpc"
|
||||
- name: "buildman siemens"
|
||||
env:
|
||||
- env:
|
||||
- BUILDMAN="mpc512x"
|
||||
TOOLCHAIN="ppc"
|
||||
- env:
|
||||
- BUILDMAN="mpc5xx"
|
||||
TOOLCHAIN="ppc"
|
||||
- env:
|
||||
- BUILDMAN="mpc5xxx"
|
||||
TOOLCHAIN="ppc"
|
||||
- env:
|
||||
- BUILDMAN="mpc8260"
|
||||
TOOLCHAIN="ppc"
|
||||
- env:
|
||||
- BUILDMAN="mpc83xx"
|
||||
TOOLCHAIN="ppc"
|
||||
- env:
|
||||
- BUILDMAN="mpc85xx -x freescale"
|
||||
TOOLCHAIN="ppc"
|
||||
- env:
|
||||
- BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
|
||||
TOOLCHAIN="ppc"
|
||||
- env:
|
||||
- BUILDMAN="t208xrdb t4qds t102*"
|
||||
TOOLCHAIN="ppc"
|
||||
- env:
|
||||
- BUILDMAN="p1_p2_rdb_pc p1010rdb"
|
||||
TOOLCHAIN="ppc"
|
||||
- env:
|
||||
- BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
|
||||
TOOLCHAIN="ppc"
|
||||
- env:
|
||||
- BUILDMAN="mpc86xx"
|
||||
TOOLCHAIN="ppc"
|
||||
- env:
|
||||
- BUILDMAN="mpc8xx"
|
||||
TOOLCHAIN="ppc"
|
||||
- env:
|
||||
- BUILDMAN="siemens"
|
||||
- name: "buildman tegra"
|
||||
env:
|
||||
- BUILDMAN="tegra -x toradex"
|
||||
- name: "buildman am33xx (no siemens)"
|
||||
env:
|
||||
- BUILDMAN="am33xx -x siemens"
|
||||
- name: "buildman omap"
|
||||
env:
|
||||
- BUILDMAN="omap"
|
||||
- name: "buildman uniphier"
|
||||
env:
|
||||
- BUILDMAN="uniphier"
|
||||
- name: "buildman catch-all AArch64"
|
||||
env:
|
||||
- BUILDMAN="aarch64 -x tegra,ls1,ls2,mvebu,uniphier,sunxi,samsung,rockchip,xilinx"
|
||||
- name: "buildman rockchip"
|
||||
env:
|
||||
- BUILDMAN="rockchip"
|
||||
- name: "buildman sh"
|
||||
env:
|
||||
- BUILDMAN="sh -x arm"
|
||||
TOOLCHAIN="sh"
|
||||
- name: "buildman Xilinx (ARM)"
|
||||
env:
|
||||
- BUILDMAN="xilinx -x microblaze"
|
||||
- name: "buildman xtensa"
|
||||
env:
|
||||
- BUILDMAN="xtensa"
|
||||
TOOLCHAIN="xtensa-dc233c-elf"
|
||||
- name: "buildman riscv"
|
||||
env:
|
||||
- BUILDMAN="riscv"
|
||||
TOOLCHAIN="riscv"
|
||||
- name: "buildman nds32"
|
||||
env:
|
||||
- BUILDMAN="nds32"
|
||||
TOOLCHAIN="nds32"
|
||||
TOOLCHAIN="arm"
|
||||
- env:
|
||||
- BUILDMAN="ti"
|
||||
TOOLCHAIN="arm"
|
||||
- env:
|
||||
- BUILDMAN="aarch64"
|
||||
TOOLCHAIN="aarch64"
|
||||
|
||||
# QA jobs for code analytics
|
||||
# static code analysis with cppcheck (we can add --enable=all later)
|
||||
- name: "cppcheck"
|
||||
script:
|
||||
- cppcheck --force --quiet --inline-suppr .
|
||||
- env:
|
||||
- TEST_CMD="cppcheck --force --quiet --inline-suppr ."
|
||||
# search for TODO within source tree
|
||||
- name: "grep TODO"
|
||||
script:
|
||||
- grep -r TODO .
|
||||
- env:
|
||||
- TEST_CMD="grep -r TODO ."
|
||||
# search for FIXME within source tree
|
||||
- name: "grep FIXME HACK"
|
||||
script:
|
||||
- grep -r FIXME .
|
||||
- env:
|
||||
- TEST_CMD="grep -r FIXME ."
|
||||
# search for HACK within source tree and ignore HACKKIT board
|
||||
- env:
|
||||
- TEST_CMD="grep -r HACK . | grep -v HACKKIT"
|
||||
script:
|
||||
- grep -r HACK . | grep -v HACKKIT
|
||||
# some statistics about the code base
|
||||
- name: "sloccount"
|
||||
script:
|
||||
- sloccount .
|
||||
# ensure all configs have MAINTAINERS entries
|
||||
- name: "Check for configs without MAINTAINERS entry"
|
||||
script:
|
||||
- if [ `./tools/genboardscfg.py -f 2>&1 | wc -l` -ne 0 ]; then exit 1; fi
|
||||
# Ensure host tools build
|
||||
- name: "Build tools-only"
|
||||
script:
|
||||
- make tools-only_config tools-only -j$(nproc)
|
||||
|
||||
- env:
|
||||
- TEST_CMD="sloccount ."
|
||||
# test/py
|
||||
- name: "test/py sandbox"
|
||||
env:
|
||||
- TEST_PY_BD="sandbox"
|
||||
BUILDMAN="^sandbox$"
|
||||
TOOLCHAIN="i386"
|
||||
- name: "test/py sandbox with clang"
|
||||
env:
|
||||
- TEST_PY_BD="sandbox"
|
||||
BUILDMAN="^sandbox$"
|
||||
OVERRIDE="clang-7"
|
||||
- name: "test/py sandbox_spl"
|
||||
env:
|
||||
- TEST_PY_BD="sandbox_spl"
|
||||
TEST_PY_TEST_SPEC="test_ofplatdata"
|
||||
BUILDMAN="^sandbox$"
|
||||
TOOLCHAIN="i386"
|
||||
TEST_PY_TOOLS="yes"
|
||||
- name: "test/py sandbox_flattree"
|
||||
env:
|
||||
- TEST_PY_BD="sandbox_flattree"
|
||||
BUILDMAN="^sandbox_flattree$"
|
||||
TOOLCHAIN="i386"
|
||||
- name: "test/py vexpress_ca15_tc2"
|
||||
env:
|
||||
- TEST_PY_BD="vexpress_ca15_tc2"
|
||||
TEST_PY_ID="--id qemu"
|
||||
QEMU_TARGET="arm-softmmu"
|
||||
QEMU_VERSION="v3.0.0"
|
||||
BUILDMAN="^vexpress_ca15_tc2$"
|
||||
- name: "test/py vexpress_ca9x4"
|
||||
env:
|
||||
- TEST_PY_BD="vexpress_ca9x4"
|
||||
TEST_PY_ID="--id qemu"
|
||||
QEMU_TARGET="arm-softmmu"
|
||||
BUILDMAN="^vexpress_ca9x4$"
|
||||
- name: "test/py integratorcp_cm926ejs"
|
||||
env:
|
||||
- TEST_PY_BD="integratorcp_cm926ejs"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
TEST_PY_ID="--id qemu"
|
||||
QEMU_TARGET="arm-softmmu"
|
||||
BUILDMAN="^integratorcp_cm926ejs$"
|
||||
- name: "test/py qemu_arm"
|
||||
env:
|
||||
- TEST_PY_BD="qemu_arm"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
QEMU_TARGET="arm-softmmu"
|
||||
BUILDMAN="^qemu_arm$"
|
||||
- name: "test/py qemu_arm64"
|
||||
env:
|
||||
- TEST_PY_BD="qemu_arm64"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
QEMU_TARGET="aarch64-softmmu"
|
||||
BUILDMAN="^qemu_arm64$"
|
||||
- name: "test/py qemu_mips"
|
||||
env:
|
||||
- TEST_PY_BD="qemu_mips"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
QEMU_TARGET="mips-softmmu"
|
||||
BUILDMAN="^qemu_mips$"
|
||||
TOOLCHAIN="mips"
|
||||
- name: "test/py qemu_mipsel"
|
||||
env:
|
||||
- TEST_PY_BD="qemu_mipsel"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
QEMU_TARGET="mipsel-softmmu"
|
||||
BUILDMAN="^qemu_mipsel$"
|
||||
TOOLCHAIN="mips"
|
||||
- name: "test/py qemu_mips64"
|
||||
env:
|
||||
- TEST_PY_BD="qemu_mips64"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
QEMU_TARGET="mips64-softmmu"
|
||||
BUILDMAN="^qemu_mips64$"
|
||||
TOOLCHAIN="mips"
|
||||
- name: "test/py qemu_mips64el"
|
||||
env:
|
||||
- TEST_PY_BD="qemu_mips64el"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
QEMU_TARGET="mips64el-softmmu"
|
||||
BUILDMAN="^qemu_mips64el$"
|
||||
TOOLCHAIN="mips"
|
||||
- name: "test/py qemu-ppce500"
|
||||
env:
|
||||
- TEST_PY_BD="qemu-ppce500"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
QEMU_TARGET="ppc-softmmu"
|
||||
BUILDMAN="^qemu-ppce500$"
|
||||
TOOLCHAIN="powerpc"
|
||||
- name: "test/py qemu-x86"
|
||||
env:
|
||||
- TEST_PY_BD="qemu-x86"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
QEMU_TARGET="i386-softmmu"
|
||||
BUILDMAN="^qemu-x86$"
|
||||
TOOLCHAIN="i386"
|
||||
BUILD_ROM="yes"
|
||||
- name: "test/py qemu-x86_64"
|
||||
env:
|
||||
- TEST_PY_BD="qemu-x86_64"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
QEMU_TARGET="x86_64-softmmu"
|
||||
BUILDMAN="^qemu-x86_64$"
|
||||
TOOLCHAIN="i386"
|
||||
BUILD_ROM="yes"
|
||||
- name: "test/py zynq_zc702"
|
||||
env:
|
||||
- TEST_PY_BD="zynq_zc702"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
QEMU_TARGET="arm-softmmu"
|
||||
TEST_PY_ID="--id qemu"
|
||||
BUILDMAN="^zynq_zc702$"
|
||||
- name: "test/py xilinx_versal_virt"
|
||||
env:
|
||||
- TEST_PY_BD="xilinx_versal_virt"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
QEMU_TARGET="aarch64-softmmu"
|
||||
TEST_PY_ID="--id qemu"
|
||||
BUILDMAN="^xilinx_versal_virt$"
|
||||
- name: "test/py xtfpga"
|
||||
env:
|
||||
- TEST_PY_BD="xtfpga"
|
||||
TEST_PY_TEST_SPEC="not sleep"
|
||||
QEMU_TARGET="xtensa-softmmu"
|
||||
TEST_PY_ID="--id qemu"
|
||||
BUILDMAN="^xtfpga$"
|
||||
TOOLCHAIN="xtensa-dc233c-elf"
|
||||
- env:
|
||||
- TEST_CMD="./test/py/test.py --bd sandbox --build"
|
||||
|
||||
# TODO make it perfect ;-r
|
||||
|
||||
2
Documentation/.gitignore
vendored
2
Documentation/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
output
|
||||
*.pyc
|
||||
@@ -1,124 +0,0 @@
|
||||
# -*- makefile -*-
|
||||
# Makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
subdir-y :=
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXBUILD = sphinx-build
|
||||
SPHINXOPTS =
|
||||
SPHINXDIRS = .
|
||||
_SPHINXDIRS = $(patsubst $(srctree)/Documentation/%/conf.py,%,$(wildcard $(srctree)/Documentation/*/conf.py))
|
||||
SPHINX_CONF = conf.py
|
||||
PAPER =
|
||||
BUILDDIR = $(obj)/output
|
||||
PDFLATEX = xelatex
|
||||
LATEXOPTS = -interaction=batchmode
|
||||
|
||||
# User-friendly check for sphinx-build
|
||||
HAVE_SPHINX := $(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi)
|
||||
|
||||
ifeq ($(HAVE_SPHINX),0)
|
||||
|
||||
.DEFAULT:
|
||||
$(warning The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable.)
|
||||
@echo
|
||||
@./scripts/sphinx-pre-install
|
||||
@echo " SKIP Sphinx $@ target."
|
||||
|
||||
else # HAVE_SPHINX
|
||||
|
||||
# User-friendly check for pdflatex
|
||||
HAVE_PDFLATEX := $(shell if which $(PDFLATEX) >/dev/null 2>&1; then echo 1; else echo 0; fi)
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
KERNELDOC = $(srctree)/scripts/kernel-doc
|
||||
KERNELDOC_CONF = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC)
|
||||
ALLSPHINXOPTS = $(KERNELDOC_CONF) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)
|
||||
# the i18n builder cannot share the environment and doctrees with the others
|
||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
|
||||
# commands; the 'cmd' from scripts/Kbuild.include is not *loopable*
|
||||
loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit;
|
||||
|
||||
# $2 sphinx builder e.g. "html"
|
||||
# $3 name of the build subfolder / e.g. "media", used as:
|
||||
# * dest folder relative to $(BUILDDIR) and
|
||||
# * cache folder relative to $(BUILDDIR)/.doctrees
|
||||
# $4 dest subfolder e.g. "man" for man pages at media/man
|
||||
# $5 reST source folder relative to $(srctree)/$(src),
|
||||
# e.g. "media" for the linux-tv book-set at ./Documentation/media
|
||||
|
||||
quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
|
||||
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media $2 && \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
|
||||
$(SPHINXBUILD) \
|
||||
-b $2 \
|
||||
-c $(abspath $(srctree)/$(src)) \
|
||||
-d $(abspath $(BUILDDIR)/.doctrees/$3) \
|
||||
-D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \
|
||||
$(ALLSPHINXOPTS) \
|
||||
$(abspath $(srctree)/$(src)/$5) \
|
||||
$(abspath $(BUILDDIR)/$3/$4)
|
||||
|
||||
htmldocs:
|
||||
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
|
||||
|
||||
linkcheckdocs:
|
||||
@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))
|
||||
|
||||
latexdocs:
|
||||
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,latex,$(var),latex,$(var)))
|
||||
|
||||
ifeq ($(HAVE_PDFLATEX),0)
|
||||
|
||||
pdfdocs:
|
||||
$(warning The '$(PDFLATEX)' command was not found. Make sure you have it installed and in PATH to produce PDF output.)
|
||||
@echo " SKIP Sphinx $@ target."
|
||||
|
||||
else # HAVE_PDFLATEX
|
||||
|
||||
pdfdocs: latexdocs
|
||||
$(foreach var,$(SPHINXDIRS), $(MAKE) PDFLATEX=$(PDFLATEX) LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit;)
|
||||
|
||||
endif # HAVE_PDFLATEX
|
||||
|
||||
epubdocs:
|
||||
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,epub,$(var),epub,$(var)))
|
||||
|
||||
xmldocs:
|
||||
@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var)))
|
||||
|
||||
endif # HAVE_SPHINX
|
||||
|
||||
# The following targets are independent of HAVE_SPHINX, and the rules should
|
||||
# work or silently pass without Sphinx.
|
||||
|
||||
refcheckdocs:
|
||||
$(Q)cd $(srctree);scripts/documentation-file-ref-check
|
||||
|
||||
cleandocs:
|
||||
$(Q)rm -rf $(BUILDDIR)
|
||||
$(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media clean
|
||||
|
||||
dochelp:
|
||||
@echo ' Linux kernel internal documentation in different formats from ReST:'
|
||||
@echo ' htmldocs - HTML'
|
||||
@echo ' latexdocs - LaTeX'
|
||||
@echo ' pdfdocs - PDF'
|
||||
@echo ' epubdocs - EPUB'
|
||||
@echo ' xmldocs - XML'
|
||||
@echo ' linkcheckdocs - check for broken external links (will connect to external hosts)'
|
||||
@echo ' refcheckdocs - check for references to non-existing files under Documentation'
|
||||
@echo ' cleandocs - clean all generated files'
|
||||
@echo
|
||||
@echo ' make SPHINXDIRS="s1 s2" [target] Generate only docs of folder s1, s2'
|
||||
@echo ' valid values for SPHINXDIRS are: $(_SPHINXDIRS)'
|
||||
@echo
|
||||
@echo ' make SPHINX_CONF={conf-file} [target] use *additional* sphinx-build'
|
||||
@echo ' configuration. This is e.g. useful to build with nit-picking config.'
|
||||
@echo
|
||||
@echo ' Default location for the generated documents is Documentation/output'
|
||||
@@ -1,528 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# The U-Boot documentation build configuration file, created by
|
||||
# sphinx-quickstart on Fri Feb 12 13:51:46 2016.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys
|
||||
import os
|
||||
import sphinx
|
||||
|
||||
# Get Sphinx version
|
||||
major, minor, patch = sphinx.version_info[:3]
|
||||
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
sys.path.insert(0, os.path.abspath('sphinx'))
|
||||
from load_config import loadConfig
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
needs_sphinx = '1.3'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain', 'kfigure']
|
||||
|
||||
# The name of the math extension changed on Sphinx 1.4
|
||||
if major == 1 and minor > 3:
|
||||
extensions.append("sphinx.ext.imgmath")
|
||||
else:
|
||||
extensions.append("sphinx.ext.pngmath")
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
# source_suffix = ['.rst', '.md']
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = 'Das U-Boot'
|
||||
copyright = 'The U-Boot development community'
|
||||
author = 'The U-Boot development community'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# In a normal build, version and release are are set to KERNELVERSION and
|
||||
# KERNELRELEASE, respectively, from the Makefile via Sphinx command line
|
||||
# arguments.
|
||||
#
|
||||
# The following code tries to extract the information by reading the Makefile,
|
||||
# when Sphinx is run directly (e.g. by Read the Docs).
|
||||
try:
|
||||
makefile_version = None
|
||||
makefile_patchlevel = None
|
||||
for line in open('../Makefile'):
|
||||
key, val = [x.strip() for x in line.split('=', 2)]
|
||||
if key == 'VERSION':
|
||||
makefile_version = val
|
||||
elif key == 'PATCHLEVEL':
|
||||
makefile_patchlevel = val
|
||||
if makefile_version and makefile_patchlevel:
|
||||
break
|
||||
except:
|
||||
pass
|
||||
finally:
|
||||
if makefile_version and makefile_patchlevel:
|
||||
version = release = makefile_version + '.' + makefile_patchlevel
|
||||
else:
|
||||
version = release = "unknown version"
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['output']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||
#keep_warnings = False
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = False
|
||||
|
||||
primary_domain = 'c'
|
||||
highlight_language = 'none'
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
|
||||
# The Read the Docs theme is available from
|
||||
# - https://github.com/snide/sphinx_rtd_theme
|
||||
# - https://pypi.python.org/pypi/sphinx_rtd_theme
|
||||
# - python-sphinx-rtd-theme package (on Debian)
|
||||
try:
|
||||
import sphinx_rtd_theme
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
except ImportError:
|
||||
sys.stderr.write('Warning: The Sphinx \'sphinx_rtd_theme\' HTML theme was not found. Make sure you have the theme installed to produce pretty HTML output. Falling back to the default theme.\n')
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
|
||||
html_static_path = ['sphinx-static']
|
||||
|
||||
html_context = {
|
||||
'css_files': [
|
||||
'_static/theme_overrides.css',
|
||||
],
|
||||
}
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
# directly to the root of the documentation.
|
||||
#html_extra_path = []
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Language to be used for generating the HTML full-text search index.
|
||||
# Sphinx supports the following languages:
|
||||
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
|
||||
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
|
||||
#html_search_language = 'en'
|
||||
|
||||
# A dictionary with options for the search language support, empty by default.
|
||||
# Now only 'ja' uses this config value
|
||||
#html_search_options = {'type': 'default'}
|
||||
|
||||
# The name of a javascript file (relative to the configuration directory) that
|
||||
# implements a search results scorer. If empty, the default will be used.
|
||||
#html_search_scorer = 'scorer.js'
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'TheUBootdoc'
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
'papersize': 'a4paper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
'pointsize': '8pt',
|
||||
|
||||
# Latex figure (float) alignment
|
||||
#'figure_align': 'htbp',
|
||||
|
||||
# Don't mangle with UTF-8 chars
|
||||
'inputenc': '',
|
||||
'utf8extra': '',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
'preamble': '''
|
||||
% Use some font with UTF-8 support with XeLaTeX
|
||||
\\usepackage{fontspec}
|
||||
\\setsansfont{DejaVu Serif}
|
||||
\\setromanfont{DejaVu Sans}
|
||||
\\setmonofont{DejaVu Sans Mono}
|
||||
|
||||
'''
|
||||
}
|
||||
|
||||
# Fix reference escape troubles with Sphinx 1.4.x
|
||||
if major == 1 and minor > 3:
|
||||
latex_elements['preamble'] += '\\renewcommand*{\\DUrole}[2]{ #2 }\n'
|
||||
|
||||
if major == 1 and minor <= 4:
|
||||
latex_elements['preamble'] += '\\usepackage[margin=0.5in, top=1in, bottom=1in]{geometry}'
|
||||
elif major == 1 and (minor > 5 or (minor == 5 and patch >= 3)):
|
||||
latex_elements['sphinxsetup'] = 'hmargin=0.5in, vmargin=1in'
|
||||
latex_elements['preamble'] += '\\fvset{fontsize=auto}\n'
|
||||
|
||||
# Customize notice background colors on Sphinx < 1.6:
|
||||
if major == 1 and minor < 6:
|
||||
latex_elements['preamble'] += '''
|
||||
\\usepackage{ifthen}
|
||||
|
||||
% Put notes in color and let them be inside a table
|
||||
\\definecolor{NoteColor}{RGB}{204,255,255}
|
||||
\\definecolor{WarningColor}{RGB}{255,204,204}
|
||||
\\definecolor{AttentionColor}{RGB}{255,255,204}
|
||||
\\definecolor{ImportantColor}{RGB}{192,255,204}
|
||||
\\definecolor{OtherColor}{RGB}{204,204,204}
|
||||
\\newlength{\\mynoticelength}
|
||||
\\makeatletter\\newenvironment{coloredbox}[1]{%
|
||||
\\setlength{\\fboxrule}{1pt}
|
||||
\\setlength{\\fboxsep}{7pt}
|
||||
\\setlength{\\mynoticelength}{\\linewidth}
|
||||
\\addtolength{\\mynoticelength}{-2\\fboxsep}
|
||||
\\addtolength{\\mynoticelength}{-2\\fboxrule}
|
||||
\\begin{lrbox}{\\@tempboxa}\\begin{minipage}{\\mynoticelength}}{\\end{minipage}\\end{lrbox}%
|
||||
\\ifthenelse%
|
||||
{\\equal{\\py@noticetype}{note}}%
|
||||
{\\colorbox{NoteColor}{\\usebox{\\@tempboxa}}}%
|
||||
{%
|
||||
\\ifthenelse%
|
||||
{\\equal{\\py@noticetype}{warning}}%
|
||||
{\\colorbox{WarningColor}{\\usebox{\\@tempboxa}}}%
|
||||
{%
|
||||
\\ifthenelse%
|
||||
{\\equal{\\py@noticetype}{attention}}%
|
||||
{\\colorbox{AttentionColor}{\\usebox{\\@tempboxa}}}%
|
||||
{%
|
||||
\\ifthenelse%
|
||||
{\\equal{\\py@noticetype}{important}}%
|
||||
{\\colorbox{ImportantColor}{\\usebox{\\@tempboxa}}}%
|
||||
{\\colorbox{OtherColor}{\\usebox{\\@tempboxa}}}%
|
||||
}%
|
||||
}%
|
||||
}%
|
||||
}\\makeatother
|
||||
|
||||
\\makeatletter
|
||||
\\renewenvironment{notice}[2]{%
|
||||
\\def\\py@noticetype{#1}
|
||||
\\begin{coloredbox}{#1}
|
||||
\\bf\\it
|
||||
\\par\\strong{#2}
|
||||
\\csname py@noticestart@#1\\endcsname
|
||||
}
|
||||
{
|
||||
\\csname py@noticeend@\\py@noticetype\\endcsname
|
||||
\\end{coloredbox}
|
||||
}
|
||||
\\makeatother
|
||||
|
||||
'''
|
||||
|
||||
# With Sphinx 1.6, it is possible to change the Bg color directly
|
||||
# by using:
|
||||
# \definecolor{sphinxnoteBgColor}{RGB}{204,255,255}
|
||||
# \definecolor{sphinxwarningBgColor}{RGB}{255,204,204}
|
||||
# \definecolor{sphinxattentionBgColor}{RGB}{255,255,204}
|
||||
# \definecolor{sphinximportantBgColor}{RGB}{192,255,204}
|
||||
#
|
||||
# However, it require to use sphinx heavy box with:
|
||||
#
|
||||
# \renewenvironment{sphinxlightbox} {%
|
||||
# \\begin{sphinxheavybox}
|
||||
# }
|
||||
# \\end{sphinxheavybox}
|
||||
# }
|
||||
#
|
||||
# Unfortunately, the implementation is buggy: if a note is inside a
|
||||
# table, it isn't displayed well. So, for now, let's use boring
|
||||
# black and white notes.
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
# Sorted in alphabetical order
|
||||
latex_documents = [
|
||||
('index', 'u-boot-hacker-manual.tex', 'U-Boot Hacker Manual',
|
||||
'The U-Boot development community', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output ---------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
(master_doc, 'dasuboot', 'The U-Boot Documentation',
|
||||
[author], 1)
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output -------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(master_doc, 'DasUBoot', 'The U-Boot Documentation',
|
||||
author, 'DasUBoot', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
||||
|
||||
|
||||
# -- Options for Epub output ----------------------------------------------
|
||||
|
||||
# Bibliographic Dublin Core info.
|
||||
epub_title = project
|
||||
epub_author = author
|
||||
epub_publisher = author
|
||||
epub_copyright = copyright
|
||||
|
||||
# The basename for the epub file. It defaults to the project name.
|
||||
#epub_basename = project
|
||||
|
||||
# The HTML theme for the epub output. Since the default themes are not
|
||||
# optimized for small screen space, using the same theme for HTML and epub
|
||||
# output is usually not wise. This defaults to 'epub', a theme designed to save
|
||||
# visual space.
|
||||
#epub_theme = 'epub'
|
||||
|
||||
# The language of the text. It defaults to the language option
|
||||
# or 'en' if the language is not set.
|
||||
#epub_language = ''
|
||||
|
||||
# The scheme of the identifier. Typical schemes are ISBN or URL.
|
||||
#epub_scheme = ''
|
||||
|
||||
# The unique identifier of the text. This can be a ISBN number
|
||||
# or the project homepage.
|
||||
#epub_identifier = ''
|
||||
|
||||
# A unique identification for the text.
|
||||
#epub_uid = ''
|
||||
|
||||
# A tuple containing the cover image and cover page html template filenames.
|
||||
#epub_cover = ()
|
||||
|
||||
# A sequence of (type, uri, title) tuples for the guide element of content.opf.
|
||||
#epub_guide = ()
|
||||
|
||||
# HTML files that should be inserted before the pages created by sphinx.
|
||||
# The format is a list of tuples containing the path and title.
|
||||
#epub_pre_files = []
|
||||
|
||||
# HTML files that should be inserted after the pages created by sphinx.
|
||||
# The format is a list of tuples containing the path and title.
|
||||
#epub_post_files = []
|
||||
|
||||
# A list of files that should not be packed into the epub file.
|
||||
epub_exclude_files = ['search.html']
|
||||
|
||||
# The depth of the table of contents in toc.ncx.
|
||||
#epub_tocdepth = 3
|
||||
|
||||
# Allow duplicate toc entries.
|
||||
#epub_tocdup = True
|
||||
|
||||
# Choose between 'default' and 'includehidden'.
|
||||
#epub_tocscope = 'default'
|
||||
|
||||
# Fix unsupported image types using the Pillow.
|
||||
#epub_fix_images = False
|
||||
|
||||
# Scale large images.
|
||||
#epub_max_image_width = 0
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#epub_show_urls = 'inline'
|
||||
|
||||
# If false, no index is generated.
|
||||
#epub_use_index = True
|
||||
|
||||
#=======
|
||||
# rst2pdf
|
||||
#
|
||||
# Grouping the document tree into PDF files. List of tuples
|
||||
# (source start file, target name, title, author, options).
|
||||
#
|
||||
# See the Sphinx chapter of http://ralsina.me/static/manual.pdf
|
||||
#
|
||||
# FIXME: Do not add the index file here; the result will be too big. Adding
|
||||
# multiple PDF files here actually tries to get the cross-referencing right
|
||||
# *between* PDF files.
|
||||
pdf_documents = [
|
||||
('uboot-documentation', u'U-Boot', u'U-Boot', u'J. Random Bozo'),
|
||||
]
|
||||
|
||||
# kernel-doc extension configuration for running Sphinx directly (e.g. by Read
|
||||
# the Docs). In a normal build, these are supplied from the Makefile via command
|
||||
# line arguments.
|
||||
kerneldoc_bin = '../scripts/kernel-doc'
|
||||
kerneldoc_srctree = '..'
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Since loadConfig overwrites settings from the global namespace, it has to be
|
||||
# the last statement in the conf.py file
|
||||
# ------------------------------------------------------------------------------
|
||||
loadConfig(globals())
|
||||
@@ -1,114 +0,0 @@
|
||||
* ARM L2 Cache Controller
|
||||
|
||||
ARM cores often have a separate L2C210/L2C220/L2C310 (also known as PL210/PL220/
|
||||
PL310 and variants) based level 2 cache controller. All these various implementations
|
||||
of the L2 cache controller have compatible programming models (Note 1).
|
||||
Some of the properties that are just prefixed "cache-*" are taken from section
|
||||
3.7.3 of the Devicetree Specification which can be found at:
|
||||
https://www.devicetree.org/specifications/
|
||||
|
||||
The ARM L2 cache representation in the device tree should be done as follows:
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : should be one of:
|
||||
"arm,pl310-cache"
|
||||
"arm,l220-cache"
|
||||
"arm,l210-cache"
|
||||
"bcm,bcm11351-a2-pl310-cache": DEPRECATED by "brcm,bcm11351-a2-pl310-cache"
|
||||
"brcm,bcm11351-a2-pl310-cache": For Broadcom bcm11351 chipset where an
|
||||
offset needs to be added to the address before passing down to the L2
|
||||
cache controller
|
||||
"marvell,aurora-system-cache": Marvell Controller designed to be
|
||||
compatible with the ARM one, with system cache mode (meaning
|
||||
maintenance operations on L1 are broadcasted to the L2 and L2
|
||||
performs the same operation).
|
||||
"marvell,aurora-outer-cache": Marvell Controller designed to be
|
||||
compatible with the ARM one with outer cache mode.
|
||||
"marvell,tauros3-cache": Marvell Tauros3 cache controller, compatible
|
||||
with arm,pl310-cache controller.
|
||||
- cache-unified : Specifies the cache is a unified cache.
|
||||
- cache-level : Should be set to 2 for a level 2 cache.
|
||||
- reg : Physical base address and size of cache controller's memory mapped
|
||||
registers.
|
||||
|
||||
Optional properties:
|
||||
|
||||
- arm,data-latency : Cycles of latency for Data RAM accesses. Specifies 3 cells of
|
||||
read, write and setup latencies. Minimum valid values are 1. Controllers
|
||||
without setup latency control should use a value of 0.
|
||||
- arm,tag-latency : Cycles of latency for Tag RAM accesses. Specifies 3 cells of
|
||||
read, write and setup latencies. Controllers without setup latency control
|
||||
should use 0. Controllers without separate read and write Tag RAM latency
|
||||
values should only use the first cell.
|
||||
- arm,dirty-latency : Cycles of latency for Dirty RAMs. This is a single cell.
|
||||
- arm,filter-ranges : <start length> Starting address and length of window to
|
||||
filter. Addresses in the filter window are directed to the M1 port. Other
|
||||
addresses will go to the M0 port.
|
||||
- arm,io-coherent : indicates that the system is operating in an hardware
|
||||
I/O coherent mode. Valid only when the arm,pl310-cache compatible
|
||||
string is used.
|
||||
- interrupts : 1 combined interrupt.
|
||||
- cache-size : specifies the size in bytes of the cache
|
||||
- cache-sets : specifies the number of associativity sets of the cache
|
||||
- cache-block-size : specifies the size in bytes of a cache block
|
||||
- cache-line-size : specifies the size in bytes of a line in the cache,
|
||||
if this is not specified, the line size is assumed to be equal to the
|
||||
cache block size
|
||||
- cache-id-part: cache id part number to be used if it is not present
|
||||
on hardware
|
||||
- wt-override: If present then L2 is forced to Write through mode
|
||||
- arm,double-linefill : Override double linefill enable setting. Enable if
|
||||
non-zero, disable if zero.
|
||||
- arm,double-linefill-incr : Override double linefill on INCR read. Enable
|
||||
if non-zero, disable if zero.
|
||||
- arm,double-linefill-wrap : Override double linefill on WRAP read. Enable
|
||||
if non-zero, disable if zero.
|
||||
- arm,prefetch-drop : Override prefetch drop enable setting. Enable if non-zero,
|
||||
disable if zero.
|
||||
- arm,prefetch-offset : Override prefetch offset value. Valid values are
|
||||
0-7, 15, 23, and 31.
|
||||
- arm,shared-override : The default behavior of the L220 or PL310 cache
|
||||
controllers with respect to the shareable attribute is to transform "normal
|
||||
memory non-cacheable transactions" into "cacheable no allocate" (for reads)
|
||||
or "write through no write allocate" (for writes).
|
||||
On systems where this may cause DMA buffer corruption, this property must be
|
||||
specified to indicate that such transforms are precluded.
|
||||
- arm,parity-enable : enable parity checking on the L2 cache (L220 or PL310).
|
||||
- arm,parity-disable : disable parity checking on the L2 cache (L220 or PL310).
|
||||
- arm,outer-sync-disable : disable the outer sync operation on the L2 cache.
|
||||
Some core tiles, especially ARM PB11MPCore have a faulty L220 cache that
|
||||
will randomly hang unless outer sync operations are disabled.
|
||||
- prefetch-data : Data prefetch. Value: <0> (forcibly disable), <1>
|
||||
(forcibly enable), property absent (retain settings set by firmware)
|
||||
- prefetch-instr : Instruction prefetch. Value: <0> (forcibly disable),
|
||||
<1> (forcibly enable), property absent (retain settings set by
|
||||
firmware)
|
||||
- arm,dynamic-clock-gating : L2 dynamic clock gating. Value: <0> (forcibly
|
||||
disable), <1> (forcibly enable), property absent (OS specific behavior,
|
||||
preferably retain firmware settings)
|
||||
- arm,standby-mode: L2 standby mode enable. Value <0> (forcibly disable),
|
||||
<1> (forcibly enable), property absent (OS specific behavior,
|
||||
preferably retain firmware settings)
|
||||
- arm,early-bresp-disable : Disable the CA9 optimization Early BRESP (PL310)
|
||||
- arm,full-line-zero-disable : Disable the CA9 optimization Full line of zero
|
||||
write (PL310)
|
||||
|
||||
Example:
|
||||
|
||||
L2: cache-controller {
|
||||
compatible = "arm,pl310-cache";
|
||||
reg = <0xfff12000 0x1000>;
|
||||
arm,data-latency = <1 1 1>;
|
||||
arm,tag-latency = <2 2 2>;
|
||||
arm,filter-ranges = <0x80000000 0x8000000>;
|
||||
cache-unified;
|
||||
cache-level = <2>;
|
||||
interrupts = <45>;
|
||||
};
|
||||
|
||||
Note 1: The description in this document doesn't apply to integrated L2
|
||||
cache controllers as found in e.g. Cortex-A15/A7/A57/A53. These
|
||||
integrated L2 controllers are assumed to be all preconfigured by
|
||||
early secure boot code. Thus no need to deal with their configuration
|
||||
in the kernel at all.
|
||||
@@ -1,22 +0,0 @@
|
||||
gdsys AXI busses of IHS FPGA devices
|
||||
|
||||
Certain gdsys IHS FPGAs offer a interface to their built-in AXI bus with which
|
||||
the connected devices (usually IP cores) can be controlled via software.
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "gdsys,ihs_axi"
|
||||
- reg: describes the address and length of the AXI bus's register map (within
|
||||
the FPGA's register space)
|
||||
|
||||
Example:
|
||||
|
||||
fpga0_axi_video0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "gdsys,ihs_axi";
|
||||
reg = <0x170 0x10>;
|
||||
|
||||
axi_dev_1 {
|
||||
...
|
||||
};
|
||||
};
|
||||
@@ -1,46 +0,0 @@
|
||||
gdsys Gazerbeam board driver
|
||||
|
||||
This driver provides capabilities to access the gdsys Gazerbeam board's device
|
||||
information. Furthermore, phandles to some internal devices are provided for
|
||||
the board files.
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "gdsys,board_gazerbeam"
|
||||
- csb: phandle to the board's coherent system bus (CSB) device node
|
||||
- rxaui[0-3]: phandles to the rxaui control device nodes
|
||||
- fpga[0-1]: phandles to the board's gdsys FPGA device nodes
|
||||
- ioep[0-1]: phandles to the board's IO endpoint device nodes
|
||||
- ver-gpios: GPIO list to read the hardware version from
|
||||
- var-gpios: GPIO list to read the hardware variant information from
|
||||
- reset-gpios: GPIO list for the board's reset GPIOs
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
board {
|
||||
compatible = "gdsys,board_gazerbeam";
|
||||
csb = <&board_soc>;
|
||||
serdes = <&SERDES>;
|
||||
rxaui0 = <&RXAUI0>;
|
||||
rxaui1 = <&RXAUI1>;
|
||||
rxaui2 = <&RXAUI2>;
|
||||
rxaui3 = <&RXAUI3>;
|
||||
fpga0 = <&FPGA0>;
|
||||
fpga1 = <&FPGA1>;
|
||||
ioep0 = <&IOEP0>;
|
||||
ioep1 = <&IOEP1>;
|
||||
|
||||
ver-gpios = <&PPCPCA 12 0
|
||||
&PPCPCA 13 0
|
||||
&PPCPCA 14 0
|
||||
&PPCPCA 15 0>;
|
||||
|
||||
/* MC2/SC-Board */
|
||||
var-gpios-mc2 = <&GPIO_VB0 0 0 /* VAR-MC_SC */
|
||||
&GPIO_VB0 11 0>; /* VAR-CON */
|
||||
/* MC4-Board */
|
||||
var-gpios-mc4 = <&GPIO_VB1 0 0 /* VAR-MC_SC */
|
||||
&GPIO_VB1 11 0>; /* VAR-CON */
|
||||
|
||||
reset-gpios = <&gpio0 1 0 &gpio0 2 1>;
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
MPC83xx system clock devices
|
||||
|
||||
MPC83xx SoCs supply a variety of clocks to drive various components of a
|
||||
system.
|
||||
|
||||
Required properties:
|
||||
- compatible: must be one of "fsl,mpc8308-clk",
|
||||
"fsl,mpc8309-clk",
|
||||
"fsl,mpc8313-clk",
|
||||
"fsl,mpc8315-clk",
|
||||
"fsl,mpc832x-clk",
|
||||
"fsl,mpc8349-clk",
|
||||
"fsl,mpc8360-clk",
|
||||
"fsl,mpc8379-clk"
|
||||
depending on which SoC is employed
|
||||
- #clock-cells: Must be 1
|
||||
|
||||
Example:
|
||||
|
||||
socclocks: clocks {
|
||||
compatible = "fsl,mpc832x-clk";
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
@@ -1,34 +0,0 @@
|
||||
MPC83xx CPU devices
|
||||
|
||||
MPC83xx SoCs contain a e300 core as their main processor.
|
||||
|
||||
Required properties:
|
||||
- compatible: must be one of "fsl,mpc83xx",
|
||||
"fsl,mpc8308",
|
||||
"fsl,mpc8309",
|
||||
"fsl,mpc8313",
|
||||
"fsl,mpc8315",
|
||||
"fsl,mpc832x",
|
||||
"fsl,mpc8349",
|
||||
"fsl,mpc8360",
|
||||
"fsl,mpc8379"
|
||||
- clocks: has to have two entries, which must be the core clock at index 0 and
|
||||
the CSB (Coherent System Bus) clock at index 1. Both are given by a suitable
|
||||
"fsl,mpc83xx-clk" device
|
||||
|
||||
Example:
|
||||
|
||||
socclocks: clocks {
|
||||
compatible = "fsl,mpc8315-clk";
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
cpus {
|
||||
compatible = "cpu_bus";
|
||||
|
||||
PowerPC,8315@0 {
|
||||
compatible = "fsl,mpc8315";
|
||||
clocks = <&socclocks MPC83XX_CLK_CORE
|
||||
&socclocks MPC83XX_CLK_CSB>;
|
||||
};
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
MPC83xx SerDes controller devices
|
||||
|
||||
MPC83xx SoCs contain a built-in SerDes controller that determines which
|
||||
protocols (SATA, PCI Express, SGMII, ...) are used on the system's serdes lines
|
||||
and how the lines are configured.
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "fsl,mpc83xx-serdes"
|
||||
- reg: must point to the serdes controller's register map
|
||||
- proto: selects for which protocol the serdes lines are configured. One of
|
||||
"sata", "pex", "pex-x2", "sgmii"
|
||||
- serdes-clk: determines the frequency the serdes lines are configured for. One
|
||||
of 100, 125, 150.
|
||||
- vdd: determines whether 1.0V core VDD is used or not
|
||||
|
||||
Example:
|
||||
|
||||
SERDES: serdes@e3000 {
|
||||
reg = <0xe3000 0x200>;
|
||||
compatible = "fsl,mpc83xx-serdes";
|
||||
proto = "pex";
|
||||
serdes-clk = <100>;
|
||||
vdd;
|
||||
};
|
||||
@@ -1,20 +0,0 @@
|
||||
gdsys IO endpoint of IHS FPGA devices
|
||||
|
||||
The IO endpoint of IHS FPGA devices is a packet-based transmission interface
|
||||
that allows interconnected gdsys devices to send and receive data over the
|
||||
FPGA's main ethernet connection.
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "gdsys,io-endpoint"
|
||||
- reg: describes the address and length of the endpoint's register map (within
|
||||
the FPGA's register space)
|
||||
|
||||
Example:
|
||||
|
||||
fpga0_ep0 {
|
||||
compatible = "gdsys,io-endpoint";
|
||||
reg = <0x020 0x10
|
||||
0x320 0x10
|
||||
0x340 0x10
|
||||
0x360 0x10>;
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
gdsys IHS FPGA for CON devices
|
||||
|
||||
The gdsys IHS FPGA is the main FPGA on gdsys CON devices. This driver provides
|
||||
support for enabling and starting the FPGA, as well as verifying working bus
|
||||
communication.
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "gdsys,iocon_fpga"
|
||||
- reset-gpios: List of GPIOs controlling the FPGA's reset
|
||||
- done-gpios: List of GPIOs notifying whether the FPGA's reconfiguration is
|
||||
done
|
||||
|
||||
Example:
|
||||
|
||||
FPGA0 {
|
||||
compatible = "gdsys,iocon_fpga";
|
||||
reset-gpios = <&PPCPCA 26 0>;
|
||||
done-gpios = <&GPIO_VB0 19 0>;
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
gdsys IHS FPGA for CPU devices
|
||||
|
||||
The gdsys IHS FPGA is the main FPGA on gdsys CPU devices. This driver provides
|
||||
support for enabling and starting the FPGA, as well as verifying working bus
|
||||
communication.
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "gdsys,iocpu_fpga"
|
||||
- reset-gpios: List of GPIOs controlling the FPGA's reset
|
||||
- done-gpios: List of GPIOs notifying whether the FPGA's reconfiguration is
|
||||
done
|
||||
|
||||
Example:
|
||||
|
||||
FPGA0 {
|
||||
compatible = "gdsys,iocpu_fpga";
|
||||
reset-gpios = <&PPCPCA 26 0>;
|
||||
done-gpios = <&GPIO_VB0 19 0>;
|
||||
};
|
||||
@@ -1,16 +0,0 @@
|
||||
gdsys soc bus driver
|
||||
|
||||
This driver provides a simple interface for the busses associated with gdsys
|
||||
IHS FPGAs. The bus itself contains devices whose register maps are contained
|
||||
within the FPGA's register space.
|
||||
|
||||
Required properties:
|
||||
- fpga: A phandle to the controlling IHS FPGA
|
||||
|
||||
Example:
|
||||
|
||||
FPGA0BUS: fpga0bus {
|
||||
compatible = "gdsys,soc";
|
||||
ranges = <0x0 0xe0600000 0x00004000>;
|
||||
fpga = <&FPGA0>;
|
||||
};
|
||||
@@ -1,314 +0,0 @@
|
||||
MPC83xx RAM controller
|
||||
|
||||
This driver supplies support for the embedded RAM controller on MCP83xx-series
|
||||
SoCs.
|
||||
|
||||
For static configuration mode, each controller node should have child nodes
|
||||
describing the actual RAM modules installed.
|
||||
|
||||
Controller node
|
||||
===============
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be "fsl,mpc83xx-mem-controller"
|
||||
- reg: The address of the RAM controller's register space
|
||||
- #address-cells: Must be 2
|
||||
- #size-cells: Must be 1
|
||||
- driver_software_override: DDR driver software override is enabled (1) or
|
||||
disabled (0)
|
||||
- p_impedance_override: DDR driver software p-impedance override; possible
|
||||
values:
|
||||
* DSO_P_IMPEDANCE_HIGHEST_Z
|
||||
* DSO_P_IMPEDANCE_MUCH_HIGHER_Z
|
||||
* DSO_P_IMPEDANCE_HIGHER_Z
|
||||
* DSO_P_IMPEDANCE_NOMINAL
|
||||
* DSO_P_IMPEDANCE_LOWER_Z
|
||||
- n_impedance_override: DDR driver software n-impedance override; possible
|
||||
values:
|
||||
* DSO_N_IMPEDANCE_HIGHEST_Z
|
||||
* DSO_N_IMPEDANCE_MUCH_HIGHER_Z
|
||||
* DSO_N_IMPEDANCE_HIGHER_Z
|
||||
* DSO_N_IMPEDANCE_NOMINAL
|
||||
* DSO_N_IMPEDANCE_LOWER_Z
|
||||
- odt_termination_value: ODT termination value for I/Os; possible values:
|
||||
* ODT_TERMINATION_75_OHM
|
||||
* ODT_TERMINATION_150_OHM
|
||||
- ddr_type: Selects voltage level for DDR pads; possible
|
||||
values:
|
||||
* DDR_TYPE_DDR2_1_8_VOLT
|
||||
* DDR_TYPE_DDR1_2_5_VOLT
|
||||
- mvref_sel: Determine where MVREF_SEL signal is generated;
|
||||
possible values:
|
||||
* MVREF_SEL_EXTERNAL
|
||||
* MVREF_SEL_INTERNAL_GVDD
|
||||
- m_odr: Disable memory transaction reordering; possible
|
||||
values:
|
||||
* M_ODR_ENABLE
|
||||
* M_ODR_DISABLE
|
||||
- clock_adjust: Clock adjust; possible values:
|
||||
* CLOCK_ADJUST_025
|
||||
* CLOCK_ADJUST_05
|
||||
* CLOCK_ADJUST_075
|
||||
* CLOCK_ADJUST_1
|
||||
- ext_refresh_rec: Extended refresh recovery time; possible values:
|
||||
0, 16, 32, 48, 64, 80, 96, 112
|
||||
- read_to_write: Read-to-write turnaround; possible values:
|
||||
0, 1, 2, 3
|
||||
- write_to_read: Write-to-read turnaround; possible values:
|
||||
0, 1, 2, 3
|
||||
- read_to_read: Read-to-read turnaround; possible values:
|
||||
0, 1, 2, 3
|
||||
- write_to_write: Write-to-write turnaround; possible values:
|
||||
0, 1, 2, 3
|
||||
- active_powerdown_exit: Active powerdown exit timing; possible values:
|
||||
1, 2, 3, 4, 5, 6, 7
|
||||
- precharge_powerdown_exit: Precharge powerdown exit timing; possible values:
|
||||
1, 2, 3, 4, 5, 6, 7
|
||||
- odt_powerdown_exit: ODT powerdown exit timing; possible values:
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8,
|
||||
9, 10, 11, 12, 13, 14, 15
|
||||
- mode_reg_set_cycle: Mode register set cycle time; possible values:
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
|
||||
- precharge_to_activate: Precharge-to-acitvate interval; possible values:
|
||||
1, 2, 3, 4, 5, 6, 7
|
||||
- activate_to_precharge: Activate to precharge interval; possible values:
|
||||
4, 5, 6, 7, 8, 9, 10, 11, 12,
|
||||
13, 14, 15, 16, 17, 18, 19
|
||||
- activate_to_readwrite: Activate to read/write interval for SDRAM;
|
||||
possible values:
|
||||
1, 2, 3, 4, 5, 6, 7
|
||||
- mcas_latency: MCAS latency from READ command; possible values:
|
||||
* CASLAT_20
|
||||
* CASLAT_25
|
||||
* CASLAT_30
|
||||
* CASLAT_35
|
||||
* CASLAT_40
|
||||
* CASLAT_45
|
||||
* CASLAT_50
|
||||
* CASLAT_55
|
||||
* CASLAT_60
|
||||
* CASLAT_65
|
||||
* CASLAT_70
|
||||
* CASLAT_75
|
||||
* CASLAT_80
|
||||
- refresh_recovery: Refresh recovery time; possible values:
|
||||
8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23
|
||||
- last_data_to_precharge: Last data to precharge minimum interval; possible
|
||||
values:
|
||||
1, 2, 3, 4, 5, 6, 7
|
||||
- activate_to_activate: Activate-to-activate interval; possible values:
|
||||
1, 2, 3, 4, 5, 6, 7
|
||||
- last_write_data_to_read: Last write data pair to read command issue
|
||||
interval; possible values:
|
||||
1, 2, 3, 4, 5, 6, 7
|
||||
- additive_latency: Additive latency; possible values:
|
||||
0, 1, 2, 3, 4, 5
|
||||
- mcas_to_preamble_override: MCAS-to-preamble-override; possible values:
|
||||
* READ_LAT
|
||||
* READ_LAT_PLUS_1_4
|
||||
* READ_LAT_PLUS_1_2
|
||||
* READ_LAT_PLUS_3_4
|
||||
* READ_LAT_PLUS_1
|
||||
* READ_LAT_PLUS_5_4
|
||||
* READ_LAT_PLUS_3_2
|
||||
* READ_LAT_PLUS_7_4
|
||||
* READ_LAT_PLUS_2
|
||||
* READ_LAT_PLUS_9_4
|
||||
* READ_LAT_PLUS_5_2
|
||||
* READ_LAT_PLUS_11_4
|
||||
* READ_LAT_PLUS_3
|
||||
* READ_LAT_PLUS_13_4
|
||||
* READ_LAT_PLUS_7_2
|
||||
* READ_LAT_PLUS_15_4
|
||||
* READ_LAT_PLUS_4
|
||||
* READ_LAT_PLUS_17_4
|
||||
* READ_LAT_PLUS_9_2
|
||||
* READ_LAT_PLUS_19_4
|
||||
- write_latency: Write latency; possible values:
|
||||
1, 2, 3, 4, 5, 6, 7
|
||||
- read_to_precharge: Read to precharge; possible values:
|
||||
1, 2, 3, 4
|
||||
- write_cmd_to_write_data: Write command to write data strobe timing
|
||||
adjustment; possible values:
|
||||
* CLOCK_DELAY_0
|
||||
* CLOCK_DELAY_1_4
|
||||
* CLOCK_DELAY_1_2
|
||||
* CLOCK_DELAY_3_4
|
||||
* CLOCK_DELAY_1
|
||||
* CLOCK_DELAY_5_4
|
||||
* CLOCK_DELAY_3_2
|
||||
- minimum_cke_pulse_width: Minimum CKE pulse width; possible values:
|
||||
1, 2, 3, 4
|
||||
- four_activates_window: Window for four activates; possible values:
|
||||
1, 2, 3, 4 8, 9, 10, 11, 12,
|
||||
13, 14, 15, 16, 17, 18, 19
|
||||
- self_refresh: Self refresh (during sleep); possible values:
|
||||
* SREN_DISABLE
|
||||
* SREN_ENABLE
|
||||
- ecc: Support for ECC; possible values:
|
||||
* ECC_DISABLE
|
||||
* ECC_ENABLE
|
||||
- registered_dram: Support for registered DRAM; possible values:
|
||||
* RD_DISABLE
|
||||
* RD_ENABLE
|
||||
- sdram_type: Type of SDRAM device to be used; possible values:
|
||||
* TYPE_DDR1
|
||||
* TYPE_DDR2
|
||||
- dynamic_power_management: Dynamic power management mode; possible values:
|
||||
* DYN_PWR_DISABLE
|
||||
* DYN_PWR_ENABLE
|
||||
- databus_width: DRAM data bus width; possible values
|
||||
* DATA_BUS_WIDTH_16
|
||||
* DATA_BUS_WIDTH_32
|
||||
- nc_auto_precharge: Non-concurrent auto-precharge; possible values:
|
||||
* NCAP_DISABLE
|
||||
* NCAP_ENABLE
|
||||
- timing_2t: 2T timing; possible values:
|
||||
* TIMING_1T
|
||||
* TIMING_2T
|
||||
- bank_interleaving_ctrl: Bank (chip select) interleaving control; possible
|
||||
values:
|
||||
* INTERLEAVE_NONE
|
||||
* INTERLEAVE_1_AND_2
|
||||
- precharge_bit_8: Precharge bin 8; possible values
|
||||
* PRECHARGE_MA_10
|
||||
* PRECHARGE_MA_8
|
||||
- half_strength: Global half-strength override; possible values:
|
||||
* STRENGTH_FULL
|
||||
* STRENGTH_HALF
|
||||
- bypass_initialization: Bypass initialization; possible values:
|
||||
* INITIALIZATION_DONT_BYPASS
|
||||
* INITIALIZATION_BYPASS
|
||||
- force_self_refresh: Force self refresh; possible values:
|
||||
* MODE_NORMAL
|
||||
* MODE_REFRESH
|
||||
- dll_reset: DLL reset; possible values:
|
||||
* DLL_RESET_ENABLE
|
||||
* DLL_RESET_DISABLE
|
||||
- dqs_config: DQS configuration; possible values:
|
||||
* DQS_TRUE
|
||||
- odt_config: ODT configuration; possible values:
|
||||
* ODT_ASSERT_NEVER
|
||||
* ODT_ASSERT_WRITES
|
||||
* ODT_ASSERT_READS
|
||||
* ODT_ASSERT_ALWAYS
|
||||
- posted_refreshes: Number of posted refreshes
|
||||
1, 2, 3, 4, 5, 6, 7, 8
|
||||
- sdmode: Initial value loaded into the DDR SDRAM mode
|
||||
register
|
||||
- esdmode: Initial value loaded into the DDR SDRAM extended
|
||||
mode register
|
||||
- esdmode2: Initial value loaded into the DDR SDRAM extended
|
||||
mode 2 register
|
||||
- esdmode3: Initial value loaded into the DDR SDRAM extended
|
||||
mode 3 register
|
||||
- refresh_interval: Refresh interval; possible values:
|
||||
0 - 65535
|
||||
- precharge_interval: Precharge interval; possible values:
|
||||
0 - 16383
|
||||
|
||||
RAM module node:
|
||||
================
|
||||
|
||||
Required properties:
|
||||
- reg: A triple <cs addr size>, which consists of:
|
||||
* cs - the chipselect used to drive this RAM module
|
||||
* addr - the address where this RAM module's memory is map
|
||||
to in the global memory space
|
||||
* size - the size of the RAM module's memory in bytes
|
||||
- auto_precharge: Chip select auto-precharge; possible values:
|
||||
* AUTO_PRECHARGE_ENABLE
|
||||
* AUTO_PRECHARGE_DISABLE
|
||||
- odt_rd_cfg: ODT for reads configuration; possible values:
|
||||
* ODT_RD_NEVER
|
||||
* ODT_RD_ONLY_CURRENT
|
||||
* ODT_RD_ONLY_OTHER_CS
|
||||
* ODT_RD_ONLY_OTHER_DIMM
|
||||
* ODT_RD_ALL
|
||||
- odt_wr_cfg: ODT for writes configuration; possible values:
|
||||
* ODT_WR_NEVER
|
||||
* ODT_WR_ONLY_CURRENT
|
||||
* ODT_WR_ONLY_OTHER_CS
|
||||
* ODT_WR_ONLY_OTHER_DIMM
|
||||
* ODT_WR_ALL
|
||||
- bank_bits: Number of bank bits for SDRAM on chip select; possible
|
||||
values:
|
||||
2, 3
|
||||
- row_bits: Number of row bits for SDRAM on chip select; possible values:
|
||||
12, 13, 14
|
||||
- col_bits: Number of column bits for SDRAM on chip select; possible
|
||||
values:
|
||||
8, 9, 10, 11
|
||||
|
||||
Example:
|
||||
|
||||
memory@2000 {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
compatible = "fsl,mpc83xx-mem-controller";
|
||||
reg = <0x2000 0x1000>;
|
||||
device_type = "memory";
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
driver_software_override = <DSO_ENABLE>;
|
||||
p_impedance_override = <DSO_P_IMPEDANCE_NOMINAL>;
|
||||
n_impedance_override = <DSO_N_IMPEDANCE_NOMINAL>;
|
||||
odt_termination_value = <ODT_TERMINATION_150_OHM>;
|
||||
ddr_type = <DDR_TYPE_DDR2_1_8_VOLT>;
|
||||
|
||||
clock_adjust = <CLOCK_ADJUST_05>;
|
||||
|
||||
read_to_write = <0>;
|
||||
write_to_read = <0>;
|
||||
read_to_read = <0>;
|
||||
write_to_write = <0>;
|
||||
active_powerdown_exit = <2>;
|
||||
precharge_powerdown_exit = <6>;
|
||||
odt_powerdown_exit = <8>;
|
||||
mode_reg_set_cycle = <2>;
|
||||
|
||||
precharge_to_activate = <2>;
|
||||
activate_to_precharge = <6>;
|
||||
activate_to_readwrite = <2>;
|
||||
mcas_latency = <CASLAT_40>;
|
||||
refresh_recovery = <17>;
|
||||
last_data_to_precharge = <2>;
|
||||
activate_to_activate = <2>;
|
||||
last_write_data_to_read = <2>;
|
||||
|
||||
additive_latency = <0>;
|
||||
mcas_to_preamble_override = <READ_LAT_PLUS_1_2>;
|
||||
write_latency = <3>;
|
||||
read_to_precharge = <2>;
|
||||
write_cmd_to_write_data = <CLOCK_DELAY_1_2>;
|
||||
minimum_cke_pulse_width = <3>;
|
||||
four_activates_window = <5>;
|
||||
|
||||
self_refresh = <SREN_ENABLE>;
|
||||
sdram_type = <TYPE_DDR2>;
|
||||
databus_width = <DATA_BUS_WIDTH_32>;
|
||||
|
||||
force_self_refresh = <MODE_NORMAL>;
|
||||
dll_reset = <DLL_RESET_ENABLE>;
|
||||
dqs_config = <DQS_TRUE>;
|
||||
odt_config = <ODT_ASSERT_READS>;
|
||||
posted_refreshes = <1>;
|
||||
|
||||
refresh_interval = <2084>;
|
||||
precharge_interval = <256>;
|
||||
|
||||
sdmode = <0x0242>;
|
||||
esdmode = <0x0440>;
|
||||
|
||||
ram@0 {
|
||||
reg = <0x0 0x0 0x8000000>;
|
||||
compatible = "nanya,nt5tu64m16hg";
|
||||
|
||||
odt_rd_cfg = <ODT_RD_NEVER>;
|
||||
odt_wr_cfg = <ODT_WR_ONLY_CURRENT>;
|
||||
bank_bits = <3>;
|
||||
row_bits = <13>;
|
||||
col_bits = <10>;
|
||||
};
|
||||
};
|
||||
@@ -1,136 +0,0 @@
|
||||
*** Reserved memory regions ***
|
||||
|
||||
Reserved memory is specified as a node under the /reserved-memory node.
|
||||
The operating system shall exclude reserved memory from normal usage
|
||||
one can create child nodes describing particular reserved (excluded from
|
||||
normal use) memory regions. Such memory regions are usually designed for
|
||||
the special usage by various device drivers.
|
||||
|
||||
Parameters for each memory region can be encoded into the device tree
|
||||
with the following nodes:
|
||||
|
||||
/reserved-memory node
|
||||
---------------------
|
||||
#address-cells, #size-cells (required) - standard definition
|
||||
- Should use the same values as the root node
|
||||
ranges (required) - standard definition
|
||||
- Should be empty
|
||||
|
||||
/reserved-memory/ child nodes
|
||||
-----------------------------
|
||||
Each child of the reserved-memory node specifies one or more regions of
|
||||
reserved memory. Each child node may either use a 'reg' property to
|
||||
specify a specific range of reserved memory, or a 'size' property with
|
||||
optional constraints to request a dynamically allocated block of memory.
|
||||
|
||||
Following the generic-names recommended practice, node names should
|
||||
reflect the purpose of the node (ie. "framebuffer" or "dma-pool"). Unit
|
||||
address (@<address>) should be appended to the name if the node is a
|
||||
static allocation.
|
||||
|
||||
Properties:
|
||||
Requires either a) or b) below.
|
||||
a) static allocation
|
||||
reg (required) - standard definition
|
||||
b) dynamic allocation
|
||||
size (required) - length based on parent's #size-cells
|
||||
- Size in bytes of memory to reserve.
|
||||
alignment (optional) - length based on parent's #size-cells
|
||||
- Address boundary for alignment of allocation.
|
||||
alloc-ranges (optional) - prop-encoded-array (address, length pairs).
|
||||
- Specifies regions of memory that are
|
||||
acceptable to allocate from.
|
||||
|
||||
If both reg and size are present, then the reg property takes precedence
|
||||
and size is ignored.
|
||||
|
||||
Additional properties:
|
||||
compatible (optional) - standard definition
|
||||
- may contain the following strings:
|
||||
- shared-dma-pool: This indicates a region of memory meant to be
|
||||
used as a shared pool of DMA buffers for a set of devices. It can
|
||||
be used by an operating system to instantiate the necessary pool
|
||||
management subsystem if necessary.
|
||||
- vendor specific string in the form <vendor>,[<device>-]<usage>
|
||||
no-map (optional) - empty property
|
||||
- Indicates the operating system must not create a virtual mapping
|
||||
of the region as part of its standard mapping of system memory,
|
||||
nor permit speculative access to it under any circumstances other
|
||||
than under the control of the device driver using the region.
|
||||
reusable (optional) - empty property
|
||||
- The operating system can use the memory in this region with the
|
||||
limitation that the device driver(s) owning the region need to be
|
||||
able to reclaim it back. Typically that means that the operating
|
||||
system can use that region to store volatile or cached data that
|
||||
can be otherwise regenerated or migrated elsewhere.
|
||||
|
||||
Linux implementation note:
|
||||
- If a "linux,cma-default" property is present, then Linux will use the
|
||||
region for the default pool of the contiguous memory allocator.
|
||||
|
||||
- If a "linux,dma-default" property is present, then Linux will use the
|
||||
region for the default pool of the consistent DMA allocator.
|
||||
|
||||
Device node references to reserved memory
|
||||
-----------------------------------------
|
||||
Regions in the /reserved-memory node may be referenced by other device
|
||||
nodes by adding a memory-region property to the device node.
|
||||
|
||||
memory-region (optional) - phandle, specifier pairs to children of /reserved-memory
|
||||
|
||||
Example
|
||||
-------
|
||||
This example defines 3 contiguous regions are defined for Linux kernel:
|
||||
one default of all device drivers (named linux,cma@72000000 and 64MiB in size),
|
||||
one dedicated to the framebuffer device (named framebuffer@78000000, 8MiB), and
|
||||
one for multimedia processing (named multimedia-memory@77000000, 64MiB).
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
memory {
|
||||
reg = <0x40000000 0x40000000>;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
/* global autoconfigured region for contiguous allocations */
|
||||
linux,cma {
|
||||
compatible = "shared-dma-pool";
|
||||
reusable;
|
||||
size = <0x4000000>;
|
||||
alignment = <0x2000>;
|
||||
linux,cma-default;
|
||||
};
|
||||
|
||||
display_reserved: framebuffer@78000000 {
|
||||
reg = <0x78000000 0x800000>;
|
||||
};
|
||||
|
||||
multimedia_reserved: multimedia@77000000 {
|
||||
compatible = "acme,multimedia-memory";
|
||||
reg = <0x77000000 0x4000000>;
|
||||
};
|
||||
};
|
||||
|
||||
/* ... */
|
||||
|
||||
fb0: video@12300000 {
|
||||
memory-region = <&display_reserved>;
|
||||
/* ... */
|
||||
};
|
||||
|
||||
scaler: scaler@12500000 {
|
||||
memory-region = <&multimedia_reserved>;
|
||||
/* ... */
|
||||
};
|
||||
|
||||
codec: codec@12600000 {
|
||||
memory-region = <&multimedia_reserved>;
|
||||
/* ... */
|
||||
};
|
||||
};
|
||||
@@ -1,21 +0,0 @@
|
||||
MPC83xx timer devices
|
||||
|
||||
MPC83xx SoCs offer a decrementer interrupt that can be used to implement delay
|
||||
functionality, and periodically triggered actions.
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "fsl,mpc83xx-timer"
|
||||
- clocks: must be a reference to the system's CSB (coherent system bus) clock,
|
||||
provided by one of the "fsl,mpc83xx-clk" devices
|
||||
|
||||
Example:
|
||||
|
||||
socclocks: clocks {
|
||||
compatible = "fsl,mpc832x-clk";
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
timer {
|
||||
compatible = "fsl,mpc83xx-timer";
|
||||
clocks = <&socclocks MPC83XX_CLK_CSB>;
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
EFI subsystem
|
||||
=============
|
||||
|
||||
Boot services
|
||||
-------------
|
||||
|
||||
.. kernel-doc:: lib/efi_loader/efi_boottime.c
|
||||
:internal:
|
||||
|
||||
Image relocation
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
.. kernel-doc:: lib/efi_loader/efi_image_loader.c
|
||||
:internal:
|
||||
|
||||
Runtime services
|
||||
----------------
|
||||
|
||||
.. kernel-doc:: lib/efi_loader/efi_runtime.c
|
||||
:internal:
|
||||
@@ -1,11 +0,0 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
#######################
|
||||
U-Boot Developer Manual
|
||||
#######################
|
||||
|
||||
.. toctree::
|
||||
|
||||
efi
|
||||
linker_lists
|
||||
serial
|
||||
@@ -1,100 +0,0 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
Linker-Generated Arrays
|
||||
=======================
|
||||
|
||||
A linker list is constructed by grouping together linker input
|
||||
sections, each containing one entry of the list. Each input section
|
||||
contains a constant initialized variable which holds the entry's
|
||||
content. Linker list input sections are constructed from the list
|
||||
and entry names, plus a prefix which allows grouping all lists
|
||||
together. Assuming _list and _entry are the list and entry names,
|
||||
then the corresponding input section name is
|
||||
|
||||
::
|
||||
|
||||
.u_boot_list_ + 2_ + @_list + _2_ + @_entry
|
||||
|
||||
and the C variable name is
|
||||
|
||||
::
|
||||
|
||||
_u_boot_list + _2_ + @_list + _2_ + @_entry
|
||||
|
||||
This ensures uniqueness for both input section and C variable name.
|
||||
|
||||
Note that the names differ only in the first character, "." for the
|
||||
section and "_" for the variable, so that the linker cannot confuse
|
||||
section and symbol names. From now on, both names will be referred
|
||||
to as
|
||||
|
||||
::
|
||||
|
||||
%u_boot_list_ + 2_ + @_list + _2_ + @_entry
|
||||
|
||||
Entry variables need never be referred to directly.
|
||||
|
||||
The naming scheme for input sections allows grouping all linker lists
|
||||
into a single linker output section and grouping all entries for a
|
||||
single list.
|
||||
|
||||
Note the two '_2_' constant components in the names: their presence
|
||||
allows putting a start and end symbols around a list, by mapping
|
||||
these symbols to sections names with components "1" (before) and
|
||||
"3" (after) instead of "2" (within).
|
||||
Start and end symbols for a list can generally be defined as
|
||||
|
||||
::
|
||||
|
||||
%u_boot_list_2_ + @_list + _1_...
|
||||
%u_boot_list_2_ + @_list + _3_...
|
||||
|
||||
Start and end symbols for the whole of the linker lists area can be
|
||||
defined as
|
||||
|
||||
::
|
||||
|
||||
%u_boot_list_1_...
|
||||
%u_boot_list_3_...
|
||||
|
||||
Here is an example of the sorted sections which result from a list
|
||||
"array" made up of three entries : "first", "second" and "third",
|
||||
iterated at least once.
|
||||
|
||||
::
|
||||
|
||||
.u_boot_list_2_array_1
|
||||
.u_boot_list_2_array_2_first
|
||||
.u_boot_list_2_array_2_second
|
||||
.u_boot_list_2_array_2_third
|
||||
.u_boot_list_2_array_3
|
||||
|
||||
If lists must be divided into sublists (e.g. for iterating only on
|
||||
part of a list), one can simply give the list a name of the form
|
||||
'outer_2_inner', where 'outer' is the global list name and 'inner'
|
||||
is the sub-list name. Iterators for the whole list should use the
|
||||
global list name ("outer"); iterators for only a sub-list should use
|
||||
the full sub-list name ("outer_2_inner").
|
||||
|
||||
Here is an example of the sections generated from a global list
|
||||
named "drivers", two sub-lists named "i2c" and "pci", and iterators
|
||||
defined for the whole list and each sub-list:
|
||||
|
||||
::
|
||||
|
||||
%u_boot_list_2_drivers_1
|
||||
%u_boot_list_2_drivers_2_i2c_1
|
||||
%u_boot_list_2_drivers_2_i2c_2_first
|
||||
%u_boot_list_2_drivers_2_i2c_2_first
|
||||
%u_boot_list_2_drivers_2_i2c_2_second
|
||||
%u_boot_list_2_drivers_2_i2c_2_third
|
||||
%u_boot_list_2_drivers_2_i2c_3
|
||||
%u_boot_list_2_drivers_2_pci_1
|
||||
%u_boot_list_2_drivers_2_pci_2_first
|
||||
%u_boot_list_2_drivers_2_pci_2_second
|
||||
%u_boot_list_2_drivers_2_pci_2_third
|
||||
%u_boot_list_2_drivers_2_pci_3
|
||||
%u_boot_list_2_drivers_3
|
||||
|
||||
.. kernel-doc:: include/linker_lists.h
|
||||
:internal:
|
||||
@@ -1,38 +0,0 @@
|
||||
# Rules to convert a .h file to inline RST documentation
|
||||
|
||||
SRC_DIR=$(srctree)/Documentation/media
|
||||
PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl
|
||||
API = $(srctree)/include
|
||||
|
||||
FILES = linker_lists.h.rst
|
||||
|
||||
TARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
|
||||
|
||||
gen_rst = \
|
||||
echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \
|
||||
${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
|
||||
|
||||
quiet_gen_rst = echo ' PARSE $(patsubst $(srctree)/%,%,$<)'; \
|
||||
${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions
|
||||
|
||||
silent_gen_rst = ${gen_rst}
|
||||
|
||||
$(BUILDDIR)/linker_lists.h.rst: ${API}/linker_lists.h ${PARSER} $(SRC_DIR)/linker_lists.h.rst.exceptions
|
||||
@$($(quiet)gen_rst)
|
||||
|
||||
# Media build rules
|
||||
|
||||
.PHONY: all html epub xml latex
|
||||
|
||||
all: $(IMGDOT) $(BUILDDIR) ${TARGETS}
|
||||
html: all
|
||||
epub: all
|
||||
xml: all
|
||||
latex: $(IMGPDF) all
|
||||
linkcheck:
|
||||
|
||||
clean:
|
||||
-rm -f $(DOTTGT) $(IMGTGT) ${TARGETS} 2>/dev/null
|
||||
|
||||
$(BUILDDIR):
|
||||
$(Q)mkdir -p $@
|
||||
@@ -1,7 +0,0 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
Serial system
|
||||
=============
|
||||
|
||||
.. kernel-doc:: drivers/serial/serial.c
|
||||
:internal:
|
||||
@@ -1,89 +0,0 @@
|
||||
/* -*- coding: utf-8; mode: css -*-
|
||||
*
|
||||
* Sphinx HTML theme customization: read the doc
|
||||
*
|
||||
*/
|
||||
|
||||
/* Interim: Code-blocks with line nos - lines and line numbers don't line up.
|
||||
* see: https://github.com/rtfd/sphinx_rtd_theme/issues/419
|
||||
*/
|
||||
|
||||
div[class^="highlight"] pre {
|
||||
line-height: normal;
|
||||
}
|
||||
.rst-content .highlight > pre {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
@media screen {
|
||||
|
||||
/* content column
|
||||
*
|
||||
* RTD theme's default is 800px as max width for the content, but we have
|
||||
* tables with tons of columns, which need the full width of the view-port.
|
||||
*/
|
||||
|
||||
.wy-nav-content{max-width: none; }
|
||||
|
||||
/* table:
|
||||
*
|
||||
* - Sequences of whitespace should collapse into a single whitespace.
|
||||
* - make the overflow auto (scrollbar if needed)
|
||||
* - align caption "left" ("center" is unsuitable on vast tables)
|
||||
*/
|
||||
|
||||
.wy-table-responsive table td { white-space: normal; }
|
||||
.wy-table-responsive { overflow: auto; }
|
||||
.rst-content table.docutils caption { text-align: left; font-size: 100%; }
|
||||
|
||||
/* captions:
|
||||
*
|
||||
* - captions should have 100% (not 85%) font size
|
||||
* - hide the permalink symbol as long as link is not hovered
|
||||
*/
|
||||
|
||||
.toc-title {
|
||||
font-size: 150%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
caption, .wy-table caption, .rst-content table.field-list caption {
|
||||
font-size: 100%;
|
||||
}
|
||||
caption a.headerlink { opacity: 0; }
|
||||
caption a.headerlink:hover { opacity: 1; }
|
||||
|
||||
/* Menu selection and keystrokes */
|
||||
|
||||
span.menuselection {
|
||||
color: blue;
|
||||
font-family: "Courier New", Courier, monospace
|
||||
}
|
||||
|
||||
code.kbd, code.kbd span {
|
||||
color: white;
|
||||
background-color: darkblue;
|
||||
font-weight: bold;
|
||||
font-family: "Courier New", Courier, monospace
|
||||
}
|
||||
|
||||
/* fix bottom margin of lists items */
|
||||
|
||||
.rst-content .section ul li:last-child, .rst-content .section ul li p:last-child {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
/* inline literal: drop the borderbox, padding and red color */
|
||||
|
||||
code, .rst-content tt, .rst-content code {
|
||||
color: inherit;
|
||||
border: none;
|
||||
padding: unset;
|
||||
background: inherit;
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
.rst-content tt.literal,.rst-content tt.literal,.rst-content code.literal {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
@@ -1,165 +0,0 @@
|
||||
# -*- coding: utf-8; mode: python -*-
|
||||
# pylint: disable=W0141,C0113,C0103,C0325
|
||||
u"""
|
||||
cdomain
|
||||
~~~~~~~
|
||||
|
||||
Replacement for the sphinx c-domain.
|
||||
|
||||
:copyright: Copyright (C) 2016 Markus Heiser
|
||||
:license: GPL Version 2, June 1991 see Linux/COPYING for details.
|
||||
|
||||
List of customizations:
|
||||
|
||||
* Moved the *duplicate C object description* warnings for function
|
||||
declarations in the nitpicky mode. See Sphinx documentation for
|
||||
the config values for ``nitpick`` and ``nitpick_ignore``.
|
||||
|
||||
* Add option 'name' to the "c:function:" directive. With option 'name' the
|
||||
ref-name of a function can be modified. E.g.::
|
||||
|
||||
.. c:function:: int ioctl( int fd, int request )
|
||||
:name: VIDIOC_LOG_STATUS
|
||||
|
||||
The func-name (e.g. ioctl) remains in the output but the ref-name changed
|
||||
from 'ioctl' to 'VIDIOC_LOG_STATUS'. The function is referenced by::
|
||||
|
||||
* :c:func:`VIDIOC_LOG_STATUS` or
|
||||
* :any:`VIDIOC_LOG_STATUS` (``:any:`` needs sphinx 1.3)
|
||||
|
||||
* Handle signatures of function-like macros well. Don't try to deduce
|
||||
arguments types of function-like macros.
|
||||
|
||||
"""
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import directives
|
||||
|
||||
import sphinx
|
||||
from sphinx import addnodes
|
||||
from sphinx.domains.c import c_funcptr_sig_re, c_sig_re
|
||||
from sphinx.domains.c import CObject as Base_CObject
|
||||
from sphinx.domains.c import CDomain as Base_CDomain
|
||||
|
||||
__version__ = '1.0'
|
||||
|
||||
# Get Sphinx version
|
||||
major, minor, patch = sphinx.version_info[:3]
|
||||
|
||||
def setup(app):
|
||||
|
||||
app.override_domain(CDomain)
|
||||
|
||||
return dict(
|
||||
version = __version__,
|
||||
parallel_read_safe = True,
|
||||
parallel_write_safe = True
|
||||
)
|
||||
|
||||
class CObject(Base_CObject):
|
||||
|
||||
"""
|
||||
Description of a C language object.
|
||||
"""
|
||||
option_spec = {
|
||||
"name" : directives.unchanged
|
||||
}
|
||||
|
||||
def handle_func_like_macro(self, sig, signode):
|
||||
u"""Handles signatures of function-like macros.
|
||||
|
||||
If the objtype is 'function' and the the signature ``sig`` is a
|
||||
function-like macro, the name of the macro is returned. Otherwise
|
||||
``False`` is returned. """
|
||||
|
||||
if not self.objtype == 'function':
|
||||
return False
|
||||
|
||||
m = c_funcptr_sig_re.match(sig)
|
||||
if m is None:
|
||||
m = c_sig_re.match(sig)
|
||||
if m is None:
|
||||
raise ValueError('no match')
|
||||
|
||||
rettype, fullname, arglist, _const = m.groups()
|
||||
arglist = arglist.strip()
|
||||
if rettype or not arglist:
|
||||
return False
|
||||
|
||||
arglist = arglist.replace('`', '').replace('\\ ', '') # remove markup
|
||||
arglist = [a.strip() for a in arglist.split(",")]
|
||||
|
||||
# has the first argument a type?
|
||||
if len(arglist[0].split(" ")) > 1:
|
||||
return False
|
||||
|
||||
# This is a function-like macro, it's arguments are typeless!
|
||||
signode += addnodes.desc_name(fullname, fullname)
|
||||
paramlist = addnodes.desc_parameterlist()
|
||||
signode += paramlist
|
||||
|
||||
for argname in arglist:
|
||||
param = addnodes.desc_parameter('', '', noemph=True)
|
||||
# separate by non-breaking space in the output
|
||||
param += nodes.emphasis(argname, argname)
|
||||
paramlist += param
|
||||
|
||||
return fullname
|
||||
|
||||
def handle_signature(self, sig, signode):
|
||||
"""Transform a C signature into RST nodes."""
|
||||
|
||||
fullname = self.handle_func_like_macro(sig, signode)
|
||||
if not fullname:
|
||||
fullname = super(CObject, self).handle_signature(sig, signode)
|
||||
|
||||
if "name" in self.options:
|
||||
if self.objtype == 'function':
|
||||
fullname = self.options["name"]
|
||||
else:
|
||||
# FIXME: handle :name: value of other declaration types?
|
||||
pass
|
||||
return fullname
|
||||
|
||||
def add_target_and_index(self, name, sig, signode):
|
||||
# for C API items we add a prefix since names are usually not qualified
|
||||
# by a module name and so easily clash with e.g. section titles
|
||||
targetname = 'c.' + name
|
||||
if targetname not in self.state.document.ids:
|
||||
signode['names'].append(targetname)
|
||||
signode['ids'].append(targetname)
|
||||
signode['first'] = (not self.names)
|
||||
self.state.document.note_explicit_target(signode)
|
||||
inv = self.env.domaindata['c']['objects']
|
||||
if (name in inv and self.env.config.nitpicky):
|
||||
if self.objtype == 'function':
|
||||
if ('c:func', name) not in self.env.config.nitpick_ignore:
|
||||
self.state_machine.reporter.warning(
|
||||
'duplicate C object description of %s, ' % name +
|
||||
'other instance in ' + self.env.doc2path(inv[name][0]),
|
||||
line=self.lineno)
|
||||
inv[name] = (self.env.docname, self.objtype)
|
||||
|
||||
indextext = self.get_index_text(name)
|
||||
if indextext:
|
||||
if major == 1 and minor < 4:
|
||||
# indexnode's tuple changed in 1.4
|
||||
# https://github.com/sphinx-doc/sphinx/commit/e6a5a3a92e938fcd75866b4227db9e0524d58f7c
|
||||
self.indexnode['entries'].append(
|
||||
('single', indextext, targetname, ''))
|
||||
else:
|
||||
self.indexnode['entries'].append(
|
||||
('single', indextext, targetname, '', None))
|
||||
|
||||
class CDomain(Base_CDomain):
|
||||
|
||||
"""C language domain."""
|
||||
name = 'c'
|
||||
label = 'C'
|
||||
directives = {
|
||||
'function': CObject,
|
||||
'member': CObject,
|
||||
'macro': CObject,
|
||||
'type': CObject,
|
||||
'var': CObject,
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8; mode: python -*-
|
||||
# pylint: disable=R0903, C0330, R0914, R0912, E0401
|
||||
|
||||
u"""
|
||||
kernel-include
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Implementation of the ``kernel-include`` reST-directive.
|
||||
|
||||
:copyright: Copyright (C) 2016 Markus Heiser
|
||||
:license: GPL Version 2, June 1991 see linux/COPYING for details.
|
||||
|
||||
The ``kernel-include`` reST-directive is a replacement for the ``include``
|
||||
directive. The ``kernel-include`` directive expand environment variables in
|
||||
the path name and allows to include files from arbitrary locations.
|
||||
|
||||
.. hint::
|
||||
|
||||
Including files from arbitrary locations (e.g. from ``/etc``) is a
|
||||
security risk for builders. This is why the ``include`` directive from
|
||||
docutils *prohibit* pathnames pointing to locations *above* the filesystem
|
||||
tree where the reST document with the include directive is placed.
|
||||
|
||||
Substrings of the form $name or ${name} are replaced by the value of
|
||||
environment variable name. Malformed variable names and references to
|
||||
non-existing variables are left unchanged.
|
||||
"""
|
||||
|
||||
# ==============================================================================
|
||||
# imports
|
||||
# ==============================================================================
|
||||
|
||||
import os.path
|
||||
|
||||
from docutils import io, nodes, statemachine
|
||||
from docutils.utils.error_reporting import SafeString, ErrorString
|
||||
from docutils.parsers.rst import directives
|
||||
from docutils.parsers.rst.directives.body import CodeBlock, NumberLines
|
||||
from docutils.parsers.rst.directives.misc import Include
|
||||
|
||||
__version__ = '1.0'
|
||||
|
||||
# ==============================================================================
|
||||
def setup(app):
|
||||
# ==============================================================================
|
||||
|
||||
app.add_directive("kernel-include", KernelInclude)
|
||||
return dict(
|
||||
version = __version__,
|
||||
parallel_read_safe = True,
|
||||
parallel_write_safe = True
|
||||
)
|
||||
|
||||
# ==============================================================================
|
||||
class KernelInclude(Include):
|
||||
# ==============================================================================
|
||||
|
||||
u"""KernelInclude (``kernel-include``) directive"""
|
||||
|
||||
def run(self):
|
||||
path = os.path.realpath(
|
||||
os.path.expandvars(self.arguments[0]))
|
||||
|
||||
# to get a bit security back, prohibit /etc:
|
||||
if path.startswith(os.sep + "etc"):
|
||||
raise self.severe(
|
||||
'Problems with "%s" directive, prohibited path: %s'
|
||||
% (self.name, path))
|
||||
|
||||
self.arguments[0] = path
|
||||
|
||||
#return super(KernelInclude, self).run() # won't work, see HINTs in _run()
|
||||
return self._run()
|
||||
|
||||
def _run(self):
|
||||
"""Include a file as part of the content of this reST file."""
|
||||
|
||||
# HINT: I had to copy&paste the whole Include.run method. I'am not happy
|
||||
# with this, but due to security reasons, the Include.run method does
|
||||
# not allow absolute or relative pathnames pointing to locations *above*
|
||||
# the filesystem tree where the reST document is placed.
|
||||
|
||||
if not self.state.document.settings.file_insertion_enabled:
|
||||
raise self.warning('"%s" directive disabled.' % self.name)
|
||||
source = self.state_machine.input_lines.source(
|
||||
self.lineno - self.state_machine.input_offset - 1)
|
||||
source_dir = os.path.dirname(os.path.abspath(source))
|
||||
path = directives.path(self.arguments[0])
|
||||
if path.startswith('<') and path.endswith('>'):
|
||||
path = os.path.join(self.standard_include_path, path[1:-1])
|
||||
path = os.path.normpath(os.path.join(source_dir, path))
|
||||
|
||||
# HINT: this is the only line I had to change / commented out:
|
||||
#path = utils.relative_path(None, path)
|
||||
|
||||
path = nodes.reprunicode(path)
|
||||
encoding = self.options.get(
|
||||
'encoding', self.state.document.settings.input_encoding)
|
||||
e_handler=self.state.document.settings.input_encoding_error_handler
|
||||
tab_width = self.options.get(
|
||||
'tab-width', self.state.document.settings.tab_width)
|
||||
try:
|
||||
self.state.document.settings.record_dependencies.add(path)
|
||||
include_file = io.FileInput(source_path=path,
|
||||
encoding=encoding,
|
||||
error_handler=e_handler)
|
||||
except UnicodeEncodeError as error:
|
||||
raise self.severe('Problems with "%s" directive path:\n'
|
||||
'Cannot encode input file path "%s" '
|
||||
'(wrong locale?).' %
|
||||
(self.name, SafeString(path)))
|
||||
except IOError as error:
|
||||
raise self.severe('Problems with "%s" directive path:\n%s.' %
|
||||
(self.name, ErrorString(error)))
|
||||
startline = self.options.get('start-line', None)
|
||||
endline = self.options.get('end-line', None)
|
||||
try:
|
||||
if startline or (endline is not None):
|
||||
lines = include_file.readlines()
|
||||
rawtext = ''.join(lines[startline:endline])
|
||||
else:
|
||||
rawtext = include_file.read()
|
||||
except UnicodeError as error:
|
||||
raise self.severe('Problem with "%s" directive:\n%s' %
|
||||
(self.name, ErrorString(error)))
|
||||
# start-after/end-before: no restrictions on newlines in match-text,
|
||||
# and no restrictions on matching inside lines vs. line boundaries
|
||||
after_text = self.options.get('start-after', None)
|
||||
if after_text:
|
||||
# skip content in rawtext before *and incl.* a matching text
|
||||
after_index = rawtext.find(after_text)
|
||||
if after_index < 0:
|
||||
raise self.severe('Problem with "start-after" option of "%s" '
|
||||
'directive:\nText not found.' % self.name)
|
||||
rawtext = rawtext[after_index + len(after_text):]
|
||||
before_text = self.options.get('end-before', None)
|
||||
if before_text:
|
||||
# skip content in rawtext after *and incl.* a matching text
|
||||
before_index = rawtext.find(before_text)
|
||||
if before_index < 0:
|
||||
raise self.severe('Problem with "end-before" option of "%s" '
|
||||
'directive:\nText not found.' % self.name)
|
||||
rawtext = rawtext[:before_index]
|
||||
|
||||
include_lines = statemachine.string2lines(rawtext, tab_width,
|
||||
convert_whitespace=True)
|
||||
if 'literal' in self.options:
|
||||
# Convert tabs to spaces, if `tab_width` is positive.
|
||||
if tab_width >= 0:
|
||||
text = rawtext.expandtabs(tab_width)
|
||||
else:
|
||||
text = rawtext
|
||||
literal_block = nodes.literal_block(rawtext, source=path,
|
||||
classes=self.options.get('class', []))
|
||||
literal_block.line = 1
|
||||
self.add_name(literal_block)
|
||||
if 'number-lines' in self.options:
|
||||
try:
|
||||
startline = int(self.options['number-lines'] or 1)
|
||||
except ValueError:
|
||||
raise self.error(':number-lines: with non-integer '
|
||||
'start value')
|
||||
endline = startline + len(include_lines)
|
||||
if text.endswith('\n'):
|
||||
text = text[:-1]
|
||||
tokens = NumberLines([([], text)], startline, endline)
|
||||
for classes, value in tokens:
|
||||
if classes:
|
||||
literal_block += nodes.inline(value, value,
|
||||
classes=classes)
|
||||
else:
|
||||
literal_block += nodes.Text(value, value)
|
||||
else:
|
||||
literal_block += nodes.Text(text, text)
|
||||
return [literal_block]
|
||||
if 'code' in self.options:
|
||||
self.options['source'] = path
|
||||
codeblock = CodeBlock(self.name,
|
||||
[self.options.pop('code')], # arguments
|
||||
self.options,
|
||||
include_lines, # content
|
||||
self.lineno,
|
||||
self.content_offset,
|
||||
self.block_text,
|
||||
self.state,
|
||||
self.state_machine)
|
||||
return codeblock.run()
|
||||
self.state_machine.insert_input(include_lines, path)
|
||||
return []
|
||||
@@ -1,146 +0,0 @@
|
||||
# coding=utf-8
|
||||
#
|
||||
# Copyright © 2016 Intel Corporation
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the next
|
||||
# paragraph) shall be included in all copies or substantial portions of the
|
||||
# Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
#
|
||||
# Authors:
|
||||
# Jani Nikula <jani.nikula@intel.com>
|
||||
#
|
||||
# Please make sure this works on both python2 and python3.
|
||||
#
|
||||
|
||||
import codecs
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import re
|
||||
import glob
|
||||
|
||||
from docutils import nodes, statemachine
|
||||
from docutils.statemachine import ViewList
|
||||
from docutils.parsers.rst import directives, Directive
|
||||
from sphinx.ext.autodoc import AutodocReporter
|
||||
|
||||
__version__ = '1.0'
|
||||
|
||||
class KernelDocDirective(Directive):
|
||||
"""Extract kernel-doc comments from the specified file"""
|
||||
required_argument = 1
|
||||
optional_arguments = 4
|
||||
option_spec = {
|
||||
'doc': directives.unchanged_required,
|
||||
'functions': directives.unchanged_required,
|
||||
'export': directives.unchanged,
|
||||
'internal': directives.unchanged,
|
||||
}
|
||||
has_content = False
|
||||
|
||||
def run(self):
|
||||
env = self.state.document.settings.env
|
||||
cmd = [env.config.kerneldoc_bin, '-rst', '-enable-lineno']
|
||||
|
||||
filename = env.config.kerneldoc_srctree + '/' + self.arguments[0]
|
||||
export_file_patterns = []
|
||||
|
||||
# Tell sphinx of the dependency
|
||||
env.note_dependency(os.path.abspath(filename))
|
||||
|
||||
tab_width = self.options.get('tab-width', self.state.document.settings.tab_width)
|
||||
|
||||
# FIXME: make this nicer and more robust against errors
|
||||
if 'export' in self.options:
|
||||
cmd += ['-export']
|
||||
export_file_patterns = str(self.options.get('export')).split()
|
||||
elif 'internal' in self.options:
|
||||
cmd += ['-internal']
|
||||
export_file_patterns = str(self.options.get('internal')).split()
|
||||
elif 'doc' in self.options:
|
||||
cmd += ['-function', str(self.options.get('doc'))]
|
||||
elif 'functions' in self.options:
|
||||
for f in str(self.options.get('functions')).split():
|
||||
cmd += ['-function', f]
|
||||
|
||||
for pattern in export_file_patterns:
|
||||
for f in glob.glob(env.config.kerneldoc_srctree + '/' + pattern):
|
||||
env.note_dependency(os.path.abspath(f))
|
||||
cmd += ['-export-file', f]
|
||||
|
||||
cmd += [filename]
|
||||
|
||||
try:
|
||||
env.app.verbose('calling kernel-doc \'%s\'' % (" ".join(cmd)))
|
||||
|
||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
out, err = p.communicate()
|
||||
|
||||
out, err = codecs.decode(out, 'utf-8'), codecs.decode(err, 'utf-8')
|
||||
|
||||
if p.returncode != 0:
|
||||
sys.stderr.write(err)
|
||||
|
||||
env.app.warn('kernel-doc \'%s\' failed with return code %d' % (" ".join(cmd), p.returncode))
|
||||
return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))]
|
||||
elif env.config.kerneldoc_verbosity > 0:
|
||||
sys.stderr.write(err)
|
||||
|
||||
lines = statemachine.string2lines(out, tab_width, convert_whitespace=True)
|
||||
result = ViewList()
|
||||
|
||||
lineoffset = 0;
|
||||
line_regex = re.compile("^#define LINENO ([0-9]+)$")
|
||||
for line in lines:
|
||||
match = line_regex.search(line)
|
||||
if match:
|
||||
# sphinx counts lines from 0
|
||||
lineoffset = int(match.group(1)) - 1
|
||||
# we must eat our comments since the upset the markup
|
||||
else:
|
||||
result.append(line, filename, lineoffset)
|
||||
lineoffset += 1
|
||||
|
||||
node = nodes.section()
|
||||
buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter
|
||||
self.state.memo.reporter = AutodocReporter(result, self.state.memo.reporter)
|
||||
self.state.memo.title_styles, self.state.memo.section_level = [], 0
|
||||
try:
|
||||
self.state.nested_parse(result, 0, node, match_titles=1)
|
||||
finally:
|
||||
self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = buf
|
||||
|
||||
return node.children
|
||||
|
||||
except Exception as e: # pylint: disable=W0703
|
||||
env.app.warn('kernel-doc \'%s\' processing failed with: %s' %
|
||||
(" ".join(cmd), str(e)))
|
||||
return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))]
|
||||
|
||||
def setup(app):
|
||||
app.add_config_value('kerneldoc_bin', None, 'env')
|
||||
app.add_config_value('kerneldoc_srctree', None, 'env')
|
||||
app.add_config_value('kerneldoc_verbosity', 1, 'env')
|
||||
|
||||
app.add_directive('kernel-doc', KernelDocDirective)
|
||||
|
||||
return dict(
|
||||
version = __version__,
|
||||
parallel_read_safe = True,
|
||||
parallel_write_safe = True
|
||||
)
|
||||
@@ -1,551 +0,0 @@
|
||||
# -*- coding: utf-8; mode: python -*-
|
||||
# pylint: disable=C0103, R0903, R0912, R0915
|
||||
u"""
|
||||
scalable figure and image handling
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Sphinx extension which implements scalable image handling.
|
||||
|
||||
:copyright: Copyright (C) 2016 Markus Heiser
|
||||
:license: GPL Version 2, June 1991 see Linux/COPYING for details.
|
||||
|
||||
The build for image formats depend on image's source format and output's
|
||||
destination format. This extension implement methods to simplify image
|
||||
handling from the author's POV. Directives like ``kernel-figure`` implement
|
||||
methods *to* always get the best output-format even if some tools are not
|
||||
installed. For more details take a look at ``convert_image(...)`` which is
|
||||
the core of all conversions.
|
||||
|
||||
* ``.. kernel-image``: for image handling / a ``.. image::`` replacement
|
||||
|
||||
* ``.. kernel-figure``: for figure handling / a ``.. figure::`` replacement
|
||||
|
||||
* ``.. kernel-render``: for render markup / a concept to embed *render*
|
||||
markups (or languages). Supported markups (see ``RENDER_MARKUP_EXT``)
|
||||
|
||||
- ``DOT``: render embedded Graphviz's **DOC**
|
||||
- ``SVG``: render embedded Scalable Vector Graphics (**SVG**)
|
||||
- ... *developable*
|
||||
|
||||
Used tools:
|
||||
|
||||
* ``dot(1)``: Graphviz (http://www.graphviz.org). If Graphviz is not
|
||||
available, the DOT language is inserted as literal-block.
|
||||
|
||||
* SVG to PDF: To generate PDF, you need at least one of this tools:
|
||||
|
||||
- ``convert(1)``: ImageMagick (https://www.imagemagick.org)
|
||||
|
||||
List of customizations:
|
||||
|
||||
* generate PDF from SVG / used by PDF (LaTeX) builder
|
||||
|
||||
* generate SVG (html-builder) and PDF (latex-builder) from DOT files.
|
||||
DOT: see http://www.graphviz.org/content/dot-language
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
from os import path
|
||||
import subprocess
|
||||
from hashlib import sha1
|
||||
import sys
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.statemachine import ViewList
|
||||
from docutils.parsers.rst import directives
|
||||
from docutils.parsers.rst.directives import images
|
||||
import sphinx
|
||||
|
||||
from sphinx.util.nodes import clean_astext
|
||||
from six import iteritems
|
||||
|
||||
PY3 = sys.version_info[0] == 3
|
||||
|
||||
if PY3:
|
||||
_unicode = str
|
||||
else:
|
||||
_unicode = unicode
|
||||
|
||||
# Get Sphinx version
|
||||
major, minor, patch = sphinx.version_info[:3]
|
||||
if major == 1 and minor > 3:
|
||||
# patches.Figure only landed in Sphinx 1.4
|
||||
from sphinx.directives.patches import Figure # pylint: disable=C0413
|
||||
else:
|
||||
Figure = images.Figure
|
||||
|
||||
__version__ = '1.0.0'
|
||||
|
||||
# simple helper
|
||||
# -------------
|
||||
|
||||
def which(cmd):
|
||||
"""Searches the ``cmd`` in the ``PATH`` environment.
|
||||
|
||||
This *which* searches the PATH for executable ``cmd`` . First match is
|
||||
returned, if nothing is found, ``None` is returned.
|
||||
"""
|
||||
envpath = os.environ.get('PATH', None) or os.defpath
|
||||
for folder in envpath.split(os.pathsep):
|
||||
fname = folder + os.sep + cmd
|
||||
if path.isfile(fname):
|
||||
return fname
|
||||
|
||||
def mkdir(folder, mode=0o775):
|
||||
if not path.isdir(folder):
|
||||
os.makedirs(folder, mode)
|
||||
|
||||
def file2literal(fname):
|
||||
with open(fname, "r") as src:
|
||||
data = src.read()
|
||||
node = nodes.literal_block(data, data)
|
||||
return node
|
||||
|
||||
def isNewer(path1, path2):
|
||||
"""Returns True if ``path1`` is newer than ``path2``
|
||||
|
||||
If ``path1`` exists and is newer than ``path2`` the function returns
|
||||
``True`` is returned otherwise ``False``
|
||||
"""
|
||||
return (path.exists(path1)
|
||||
and os.stat(path1).st_ctime > os.stat(path2).st_ctime)
|
||||
|
||||
def pass_handle(self, node): # pylint: disable=W0613
|
||||
pass
|
||||
|
||||
# setup conversion tools and sphinx extension
|
||||
# -------------------------------------------
|
||||
|
||||
# Graphviz's dot(1) support
|
||||
dot_cmd = None
|
||||
|
||||
# ImageMagick' convert(1) support
|
||||
convert_cmd = None
|
||||
|
||||
|
||||
def setup(app):
|
||||
# check toolchain first
|
||||
app.connect('builder-inited', setupTools)
|
||||
|
||||
# image handling
|
||||
app.add_directive("kernel-image", KernelImage)
|
||||
app.add_node(kernel_image,
|
||||
html = (visit_kernel_image, pass_handle),
|
||||
latex = (visit_kernel_image, pass_handle),
|
||||
texinfo = (visit_kernel_image, pass_handle),
|
||||
text = (visit_kernel_image, pass_handle),
|
||||
man = (visit_kernel_image, pass_handle), )
|
||||
|
||||
# figure handling
|
||||
app.add_directive("kernel-figure", KernelFigure)
|
||||
app.add_node(kernel_figure,
|
||||
html = (visit_kernel_figure, pass_handle),
|
||||
latex = (visit_kernel_figure, pass_handle),
|
||||
texinfo = (visit_kernel_figure, pass_handle),
|
||||
text = (visit_kernel_figure, pass_handle),
|
||||
man = (visit_kernel_figure, pass_handle), )
|
||||
|
||||
# render handling
|
||||
app.add_directive('kernel-render', KernelRender)
|
||||
app.add_node(kernel_render,
|
||||
html = (visit_kernel_render, pass_handle),
|
||||
latex = (visit_kernel_render, pass_handle),
|
||||
texinfo = (visit_kernel_render, pass_handle),
|
||||
text = (visit_kernel_render, pass_handle),
|
||||
man = (visit_kernel_render, pass_handle), )
|
||||
|
||||
app.connect('doctree-read', add_kernel_figure_to_std_domain)
|
||||
|
||||
return dict(
|
||||
version = __version__,
|
||||
parallel_read_safe = True,
|
||||
parallel_write_safe = True
|
||||
)
|
||||
|
||||
|
||||
def setupTools(app):
|
||||
u"""
|
||||
Check available build tools and log some *verbose* messages.
|
||||
|
||||
This function is called once, when the builder is initiated.
|
||||
"""
|
||||
global dot_cmd, convert_cmd # pylint: disable=W0603
|
||||
app.verbose("kfigure: check installed tools ...")
|
||||
|
||||
dot_cmd = which('dot')
|
||||
convert_cmd = which('convert')
|
||||
|
||||
if dot_cmd:
|
||||
app.verbose("use dot(1) from: " + dot_cmd)
|
||||
else:
|
||||
app.warn("dot(1) not found, for better output quality install "
|
||||
"graphviz from http://www.graphviz.org")
|
||||
if convert_cmd:
|
||||
app.verbose("use convert(1) from: " + convert_cmd)
|
||||
else:
|
||||
app.warn(
|
||||
"convert(1) not found, for SVG to PDF conversion install "
|
||||
"ImageMagick (https://www.imagemagick.org)")
|
||||
|
||||
|
||||
# integrate conversion tools
|
||||
# --------------------------
|
||||
|
||||
RENDER_MARKUP_EXT = {
|
||||
# The '.ext' must be handled by convert_image(..) function's *in_ext* input.
|
||||
# <name> : <.ext>
|
||||
'DOT' : '.dot',
|
||||
'SVG' : '.svg'
|
||||
}
|
||||
|
||||
def convert_image(img_node, translator, src_fname=None):
|
||||
"""Convert a image node for the builder.
|
||||
|
||||
Different builder prefer different image formats, e.g. *latex* builder
|
||||
prefer PDF while *html* builder prefer SVG format for images.
|
||||
|
||||
This function handles output image formats in dependence of source the
|
||||
format (of the image) and the translator's output format.
|
||||
"""
|
||||
app = translator.builder.app
|
||||
|
||||
fname, in_ext = path.splitext(path.basename(img_node['uri']))
|
||||
if src_fname is None:
|
||||
src_fname = path.join(translator.builder.srcdir, img_node['uri'])
|
||||
if not path.exists(src_fname):
|
||||
src_fname = path.join(translator.builder.outdir, img_node['uri'])
|
||||
|
||||
dst_fname = None
|
||||
|
||||
# in kernel builds, use 'make SPHINXOPTS=-v' to see verbose messages
|
||||
|
||||
app.verbose('assert best format for: ' + img_node['uri'])
|
||||
|
||||
if in_ext == '.dot':
|
||||
|
||||
if not dot_cmd:
|
||||
app.verbose("dot from graphviz not available / include DOT raw.")
|
||||
img_node.replace_self(file2literal(src_fname))
|
||||
|
||||
elif translator.builder.format == 'latex':
|
||||
dst_fname = path.join(translator.builder.outdir, fname + '.pdf')
|
||||
img_node['uri'] = fname + '.pdf'
|
||||
img_node['candidates'] = {'*': fname + '.pdf'}
|
||||
|
||||
|
||||
elif translator.builder.format == 'html':
|
||||
dst_fname = path.join(
|
||||
translator.builder.outdir,
|
||||
translator.builder.imagedir,
|
||||
fname + '.svg')
|
||||
img_node['uri'] = path.join(
|
||||
translator.builder.imgpath, fname + '.svg')
|
||||
img_node['candidates'] = {
|
||||
'*': path.join(translator.builder.imgpath, fname + '.svg')}
|
||||
|
||||
else:
|
||||
# all other builder formats will include DOT as raw
|
||||
img_node.replace_self(file2literal(src_fname))
|
||||
|
||||
elif in_ext == '.svg':
|
||||
|
||||
if translator.builder.format == 'latex':
|
||||
if convert_cmd is None:
|
||||
app.verbose("no SVG to PDF conversion available / include SVG raw.")
|
||||
img_node.replace_self(file2literal(src_fname))
|
||||
else:
|
||||
dst_fname = path.join(translator.builder.outdir, fname + '.pdf')
|
||||
img_node['uri'] = fname + '.pdf'
|
||||
img_node['candidates'] = {'*': fname + '.pdf'}
|
||||
|
||||
if dst_fname:
|
||||
# the builder needs not to copy one more time, so pop it if exists.
|
||||
translator.builder.images.pop(img_node['uri'], None)
|
||||
_name = dst_fname[len(translator.builder.outdir) + 1:]
|
||||
|
||||
if isNewer(dst_fname, src_fname):
|
||||
app.verbose("convert: {out}/%s already exists and is newer" % _name)
|
||||
|
||||
else:
|
||||
ok = False
|
||||
mkdir(path.dirname(dst_fname))
|
||||
|
||||
if in_ext == '.dot':
|
||||
app.verbose('convert DOT to: {out}/' + _name)
|
||||
ok = dot2format(app, src_fname, dst_fname)
|
||||
|
||||
elif in_ext == '.svg':
|
||||
app.verbose('convert SVG to: {out}/' + _name)
|
||||
ok = svg2pdf(app, src_fname, dst_fname)
|
||||
|
||||
if not ok:
|
||||
img_node.replace_self(file2literal(src_fname))
|
||||
|
||||
|
||||
def dot2format(app, dot_fname, out_fname):
|
||||
"""Converts DOT file to ``out_fname`` using ``dot(1)``.
|
||||
|
||||
* ``dot_fname`` pathname of the input DOT file, including extension ``.dot``
|
||||
* ``out_fname`` pathname of the output file, including format extension
|
||||
|
||||
The *format extension* depends on the ``dot`` command (see ``man dot``
|
||||
option ``-Txxx``). Normally you will use one of the following extensions:
|
||||
|
||||
- ``.ps`` for PostScript,
|
||||
- ``.svg`` or ``svgz`` for Structured Vector Graphics,
|
||||
- ``.fig`` for XFIG graphics and
|
||||
- ``.png`` or ``gif`` for common bitmap graphics.
|
||||
|
||||
"""
|
||||
out_format = path.splitext(out_fname)[1][1:]
|
||||
cmd = [dot_cmd, '-T%s' % out_format, dot_fname]
|
||||
exit_code = 42
|
||||
|
||||
with open(out_fname, "w") as out:
|
||||
exit_code = subprocess.call(cmd, stdout = out)
|
||||
if exit_code != 0:
|
||||
app.warn("Error #%d when calling: %s" % (exit_code, " ".join(cmd)))
|
||||
return bool(exit_code == 0)
|
||||
|
||||
def svg2pdf(app, svg_fname, pdf_fname):
|
||||
"""Converts SVG to PDF with ``convert(1)`` command.
|
||||
|
||||
Uses ``convert(1)`` from ImageMagick (https://www.imagemagick.org) for
|
||||
conversion. Returns ``True`` on success and ``False`` if an error occurred.
|
||||
|
||||
* ``svg_fname`` pathname of the input SVG file with extension (``.svg``)
|
||||
* ``pdf_name`` pathname of the output PDF file with extension (``.pdf``)
|
||||
|
||||
"""
|
||||
cmd = [convert_cmd, svg_fname, pdf_fname]
|
||||
# use stdout and stderr from parent
|
||||
exit_code = subprocess.call(cmd)
|
||||
if exit_code != 0:
|
||||
app.warn("Error #%d when calling: %s" % (exit_code, " ".join(cmd)))
|
||||
return bool(exit_code == 0)
|
||||
|
||||
|
||||
# image handling
|
||||
# ---------------------
|
||||
|
||||
def visit_kernel_image(self, node): # pylint: disable=W0613
|
||||
"""Visitor of the ``kernel_image`` Node.
|
||||
|
||||
Handles the ``image`` child-node with the ``convert_image(...)``.
|
||||
"""
|
||||
img_node = node[0]
|
||||
convert_image(img_node, self)
|
||||
|
||||
class kernel_image(nodes.image):
|
||||
"""Node for ``kernel-image`` directive."""
|
||||
pass
|
||||
|
||||
class KernelImage(images.Image):
|
||||
u"""KernelImage directive
|
||||
|
||||
Earns everything from ``.. image::`` directive, except *remote URI* and
|
||||
*glob* pattern. The KernelImage wraps a image node into a
|
||||
kernel_image node. See ``visit_kernel_image``.
|
||||
"""
|
||||
|
||||
def run(self):
|
||||
uri = self.arguments[0]
|
||||
if uri.endswith('.*') or uri.find('://') != -1:
|
||||
raise self.severe(
|
||||
'Error in "%s: %s": glob pattern and remote images are not allowed'
|
||||
% (self.name, uri))
|
||||
result = images.Image.run(self)
|
||||
if len(result) == 2 or isinstance(result[0], nodes.system_message):
|
||||
return result
|
||||
(image_node,) = result
|
||||
# wrap image node into a kernel_image node / see visitors
|
||||
node = kernel_image('', image_node)
|
||||
return [node]
|
||||
|
||||
# figure handling
|
||||
# ---------------------
|
||||
|
||||
def visit_kernel_figure(self, node): # pylint: disable=W0613
|
||||
"""Visitor of the ``kernel_figure`` Node.
|
||||
|
||||
Handles the ``image`` child-node with the ``convert_image(...)``.
|
||||
"""
|
||||
img_node = node[0][0]
|
||||
convert_image(img_node, self)
|
||||
|
||||
class kernel_figure(nodes.figure):
|
||||
"""Node for ``kernel-figure`` directive."""
|
||||
|
||||
class KernelFigure(Figure):
|
||||
u"""KernelImage directive
|
||||
|
||||
Earns everything from ``.. figure::`` directive, except *remote URI* and
|
||||
*glob* pattern. The KernelFigure wraps a figure node into a kernel_figure
|
||||
node. See ``visit_kernel_figure``.
|
||||
"""
|
||||
|
||||
def run(self):
|
||||
uri = self.arguments[0]
|
||||
if uri.endswith('.*') or uri.find('://') != -1:
|
||||
raise self.severe(
|
||||
'Error in "%s: %s":'
|
||||
' glob pattern and remote images are not allowed'
|
||||
% (self.name, uri))
|
||||
result = Figure.run(self)
|
||||
if len(result) == 2 or isinstance(result[0], nodes.system_message):
|
||||
return result
|
||||
(figure_node,) = result
|
||||
# wrap figure node into a kernel_figure node / see visitors
|
||||
node = kernel_figure('', figure_node)
|
||||
return [node]
|
||||
|
||||
|
||||
# render handling
|
||||
# ---------------------
|
||||
|
||||
def visit_kernel_render(self, node):
|
||||
"""Visitor of the ``kernel_render`` Node.
|
||||
|
||||
If rendering tools available, save the markup of the ``literal_block`` child
|
||||
node into a file and replace the ``literal_block`` node with a new created
|
||||
``image`` node, pointing to the saved markup file. Afterwards, handle the
|
||||
image child-node with the ``convert_image(...)``.
|
||||
"""
|
||||
app = self.builder.app
|
||||
srclang = node.get('srclang')
|
||||
|
||||
app.verbose('visit kernel-render node lang: "%s"' % (srclang))
|
||||
|
||||
tmp_ext = RENDER_MARKUP_EXT.get(srclang, None)
|
||||
if tmp_ext is None:
|
||||
app.warn('kernel-render: "%s" unknown / include raw.' % (srclang))
|
||||
return
|
||||
|
||||
if not dot_cmd and tmp_ext == '.dot':
|
||||
app.verbose("dot from graphviz not available / include raw.")
|
||||
return
|
||||
|
||||
literal_block = node[0]
|
||||
|
||||
code = literal_block.astext()
|
||||
hashobj = code.encode('utf-8') # str(node.attributes)
|
||||
fname = path.join('%s-%s' % (srclang, sha1(hashobj).hexdigest()))
|
||||
|
||||
tmp_fname = path.join(
|
||||
self.builder.outdir, self.builder.imagedir, fname + tmp_ext)
|
||||
|
||||
if not path.isfile(tmp_fname):
|
||||
mkdir(path.dirname(tmp_fname))
|
||||
with open(tmp_fname, "w") as out:
|
||||
out.write(code)
|
||||
|
||||
img_node = nodes.image(node.rawsource, **node.attributes)
|
||||
img_node['uri'] = path.join(self.builder.imgpath, fname + tmp_ext)
|
||||
img_node['candidates'] = {
|
||||
'*': path.join(self.builder.imgpath, fname + tmp_ext)}
|
||||
|
||||
literal_block.replace_self(img_node)
|
||||
convert_image(img_node, self, tmp_fname)
|
||||
|
||||
|
||||
class kernel_render(nodes.General, nodes.Inline, nodes.Element):
|
||||
"""Node for ``kernel-render`` directive."""
|
||||
pass
|
||||
|
||||
class KernelRender(Figure):
|
||||
u"""KernelRender directive
|
||||
|
||||
Render content by external tool. Has all the options known from the
|
||||
*figure* directive, plus option ``caption``. If ``caption`` has a
|
||||
value, a figure node with the *caption* is inserted. If not, a image node is
|
||||
inserted.
|
||||
|
||||
The KernelRender directive wraps the text of the directive into a
|
||||
literal_block node and wraps it into a kernel_render node. See
|
||||
``visit_kernel_render``.
|
||||
"""
|
||||
has_content = True
|
||||
required_arguments = 1
|
||||
optional_arguments = 0
|
||||
final_argument_whitespace = False
|
||||
|
||||
# earn options from 'figure'
|
||||
option_spec = Figure.option_spec.copy()
|
||||
option_spec['caption'] = directives.unchanged
|
||||
|
||||
def run(self):
|
||||
return [self.build_node()]
|
||||
|
||||
def build_node(self):
|
||||
|
||||
srclang = self.arguments[0].strip()
|
||||
if srclang not in RENDER_MARKUP_EXT.keys():
|
||||
return [self.state_machine.reporter.warning(
|
||||
'Unknown source language "%s", use one of: %s.' % (
|
||||
srclang, ",".join(RENDER_MARKUP_EXT.keys())),
|
||||
line=self.lineno)]
|
||||
|
||||
code = '\n'.join(self.content)
|
||||
if not code.strip():
|
||||
return [self.state_machine.reporter.warning(
|
||||
'Ignoring "%s" directive without content.' % (
|
||||
self.name),
|
||||
line=self.lineno)]
|
||||
|
||||
node = kernel_render()
|
||||
node['alt'] = self.options.get('alt','')
|
||||
node['srclang'] = srclang
|
||||
literal_node = nodes.literal_block(code, code)
|
||||
node += literal_node
|
||||
|
||||
caption = self.options.get('caption')
|
||||
if caption:
|
||||
# parse caption's content
|
||||
parsed = nodes.Element()
|
||||
self.state.nested_parse(
|
||||
ViewList([caption], source=''), self.content_offset, parsed)
|
||||
caption_node = nodes.caption(
|
||||
parsed[0].rawsource, '', *parsed[0].children)
|
||||
caption_node.source = parsed[0].source
|
||||
caption_node.line = parsed[0].line
|
||||
|
||||
figure_node = nodes.figure('', node)
|
||||
for k,v in self.options.items():
|
||||
figure_node[k] = v
|
||||
figure_node += caption_node
|
||||
|
||||
node = figure_node
|
||||
|
||||
return node
|
||||
|
||||
def add_kernel_figure_to_std_domain(app, doctree):
|
||||
"""Add kernel-figure anchors to 'std' domain.
|
||||
|
||||
The ``StandardDomain.process_doc(..)`` method does not know how to resolve
|
||||
the caption (label) of ``kernel-figure`` directive (it only knows about
|
||||
standard nodes, e.g. table, figure etc.). Without any additional handling
|
||||
this will result in a 'undefined label' for kernel-figures.
|
||||
|
||||
This handle adds labels of kernel-figure to the 'std' domain labels.
|
||||
"""
|
||||
|
||||
std = app.env.domains["std"]
|
||||
docname = app.env.docname
|
||||
labels = std.data["labels"]
|
||||
|
||||
for name, explicit in iteritems(doctree.nametypes):
|
||||
if not explicit:
|
||||
continue
|
||||
labelid = doctree.nameids[name]
|
||||
if labelid is None:
|
||||
continue
|
||||
node = doctree.ids[labelid]
|
||||
|
||||
if node.tagname == 'kernel_figure':
|
||||
for n in node.next_node():
|
||||
if n.tagname == 'caption':
|
||||
sectname = clean_astext(n)
|
||||
# add label to std domain
|
||||
labels[name] = docname, labelid, sectname
|
||||
break
|
||||
@@ -1,32 +0,0 @@
|
||||
# -*- coding: utf-8; mode: python -*-
|
||||
# pylint: disable=R0903, C0330, R0914, R0912, E0401
|
||||
|
||||
import os
|
||||
import sys
|
||||
from sphinx.util.pycompat import execfile_
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
def loadConfig(namespace):
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
u"""Load an additional configuration file into *namespace*.
|
||||
|
||||
The name of the configuration file is taken from the environment
|
||||
``SPHINX_CONF``. The external configuration file extends (or overwrites) the
|
||||
configuration values from the origin ``conf.py``. With this you are able to
|
||||
maintain *build themes*. """
|
||||
|
||||
config_file = os.environ.get("SPHINX_CONF", None)
|
||||
if (config_file is not None
|
||||
and os.path.normpath(namespace["__file__"]) != os.path.normpath(config_file) ):
|
||||
config_file = os.path.abspath(config_file)
|
||||
|
||||
if os.path.isfile(config_file):
|
||||
sys.stdout.write("load additional sphinx-config: %s\n" % config_file)
|
||||
config = namespace.copy()
|
||||
config['__file__'] = config_file
|
||||
execfile_(config_file, config)
|
||||
del config['__file__']
|
||||
namespace.update(config)
|
||||
else:
|
||||
sys.stderr.write("WARNING: additional sphinx-config not found: %s\n" % config_file)
|
||||
@@ -1,401 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
use strict;
|
||||
use Text::Tabs;
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
|
||||
my $debug;
|
||||
my $help;
|
||||
my $man;
|
||||
|
||||
GetOptions(
|
||||
"debug" => \$debug,
|
||||
'usage|?' => \$help,
|
||||
'help' => \$man
|
||||
) or pod2usage(2);
|
||||
|
||||
pod2usage(1) if $help;
|
||||
pod2usage(-exitstatus => 0, -verbose => 2) if $man;
|
||||
pod2usage(2) if (scalar @ARGV < 2 || scalar @ARGV > 3);
|
||||
|
||||
my ($file_in, $file_out, $file_exceptions) = @ARGV;
|
||||
|
||||
my $data;
|
||||
my %ioctls;
|
||||
my %defines;
|
||||
my %typedefs;
|
||||
my %enums;
|
||||
my %enum_symbols;
|
||||
my %structs;
|
||||
|
||||
require Data::Dumper if ($debug);
|
||||
|
||||
#
|
||||
# read the file and get identifiers
|
||||
#
|
||||
|
||||
my $is_enum = 0;
|
||||
my $is_comment = 0;
|
||||
open IN, $file_in or die "Can't open $file_in";
|
||||
while (<IN>) {
|
||||
$data .= $_;
|
||||
|
||||
my $ln = $_;
|
||||
if (!$is_comment) {
|
||||
$ln =~ s,/\*.*(\*/),,g;
|
||||
|
||||
$is_comment = 1 if ($ln =~ s,/\*.*,,);
|
||||
} else {
|
||||
if ($ln =~ s,^(.*\*/),,) {
|
||||
$is_comment = 0;
|
||||
} else {
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_enum && $ln =~ m/^\s*([_\w][\w\d_]+)\s*[\,=]?/) {
|
||||
my $s = $1;
|
||||
my $n = $1;
|
||||
$n =~ tr/A-Z/a-z/;
|
||||
$n =~ tr/_/-/;
|
||||
|
||||
$enum_symbols{$s} = "\\ :ref:`$s <$n>`\\ ";
|
||||
|
||||
$is_enum = 0 if ($is_enum && m/\}/);
|
||||
next;
|
||||
}
|
||||
$is_enum = 0 if ($is_enum && m/\}/);
|
||||
|
||||
if ($ln =~ m/^\s*#\s*define\s+([_\w][\w\d_]+)\s+_IO/) {
|
||||
my $s = $1;
|
||||
my $n = $1;
|
||||
$n =~ tr/A-Z/a-z/;
|
||||
|
||||
$ioctls{$s} = "\\ :ref:`$s <$n>`\\ ";
|
||||
next;
|
||||
}
|
||||
|
||||
if ($ln =~ m/^\s*#\s*define\s+([_\w][\w\d_]+)\s+/) {
|
||||
my $s = $1;
|
||||
my $n = $1;
|
||||
$n =~ tr/A-Z/a-z/;
|
||||
$n =~ tr/_/-/;
|
||||
|
||||
$defines{$s} = "\\ :ref:`$s <$n>`\\ ";
|
||||
next;
|
||||
}
|
||||
|
||||
if ($ln =~ m/^\s*typedef\s+([_\w][\w\d_]+)\s+(.*)\s+([_\w][\w\d_]+);/) {
|
||||
my $s = $2;
|
||||
my $n = $3;
|
||||
|
||||
$typedefs{$n} = "\\ :c:type:`$n <$s>`\\ ";
|
||||
next;
|
||||
}
|
||||
if ($ln =~ m/^\s*enum\s+([_\w][\w\d_]+)\s+\{/
|
||||
|| $ln =~ m/^\s*enum\s+([_\w][\w\d_]+)$/
|
||||
|| $ln =~ m/^\s*typedef\s*enum\s+([_\w][\w\d_]+)\s+\{/
|
||||
|| $ln =~ m/^\s*typedef\s*enum\s+([_\w][\w\d_]+)$/) {
|
||||
my $s = $1;
|
||||
|
||||
$enums{$s} = "enum :c:type:`$s`\\ ";
|
||||
|
||||
$is_enum = $1;
|
||||
next;
|
||||
}
|
||||
if ($ln =~ m/^\s*struct\s+([_\w][\w\d_]+)\s+\{/
|
||||
|| $ln =~ m/^\s*struct\s+([[_\w][\w\d_]+)$/
|
||||
|| $ln =~ m/^\s*typedef\s*struct\s+([_\w][\w\d_]+)\s+\{/
|
||||
|| $ln =~ m/^\s*typedef\s*struct\s+([[_\w][\w\d_]+)$/
|
||||
) {
|
||||
my $s = $1;
|
||||
|
||||
$structs{$s} = "struct :c:type:`$s`\\ ";
|
||||
next;
|
||||
}
|
||||
}
|
||||
close IN;
|
||||
|
||||
#
|
||||
# Handle multi-line typedefs
|
||||
#
|
||||
|
||||
my @matches = ($data =~ m/typedef\s+struct\s+\S+?\s*\{[^\}]+\}\s*(\S+)\s*\;/g,
|
||||
$data =~ m/typedef\s+enum\s+\S+?\s*\{[^\}]+\}\s*(\S+)\s*\;/g,);
|
||||
foreach my $m (@matches) {
|
||||
my $s = $m;
|
||||
|
||||
$typedefs{$s} = "\\ :c:type:`$s`\\ ";
|
||||
next;
|
||||
}
|
||||
|
||||
#
|
||||
# Handle exceptions, if any
|
||||
#
|
||||
|
||||
my %def_reftype = (
|
||||
"ioctl" => ":ref",
|
||||
"define" => ":ref",
|
||||
"symbol" => ":ref",
|
||||
"typedef" => ":c:type",
|
||||
"enum" => ":c:type",
|
||||
"struct" => ":c:type",
|
||||
);
|
||||
|
||||
if ($file_exceptions) {
|
||||
open IN, $file_exceptions or die "Can't read $file_exceptions";
|
||||
while (<IN>) {
|
||||
next if (m/^\s*$/ || m/^\s*#/);
|
||||
|
||||
# Parsers to ignore a symbol
|
||||
|
||||
if (m/^ignore\s+ioctl\s+(\S+)/) {
|
||||
delete $ioctls{$1} if (exists($ioctls{$1}));
|
||||
next;
|
||||
}
|
||||
if (m/^ignore\s+define\s+(\S+)/) {
|
||||
delete $defines{$1} if (exists($defines{$1}));
|
||||
next;
|
||||
}
|
||||
if (m/^ignore\s+typedef\s+(\S+)/) {
|
||||
delete $typedefs{$1} if (exists($typedefs{$1}));
|
||||
next;
|
||||
}
|
||||
if (m/^ignore\s+enum\s+(\S+)/) {
|
||||
delete $enums{$1} if (exists($enums{$1}));
|
||||
next;
|
||||
}
|
||||
if (m/^ignore\s+struct\s+(\S+)/) {
|
||||
delete $structs{$1} if (exists($structs{$1}));
|
||||
next;
|
||||
}
|
||||
if (m/^ignore\s+symbol\s+(\S+)/) {
|
||||
delete $enum_symbols{$1} if (exists($enum_symbols{$1}));
|
||||
next;
|
||||
}
|
||||
|
||||
# Parsers to replace a symbol
|
||||
my ($type, $old, $new, $reftype);
|
||||
|
||||
if (m/^replace\s+(\S+)\s+(\S+)\s+(\S+)/) {
|
||||
$type = $1;
|
||||
$old = $2;
|
||||
$new = $3;
|
||||
} else {
|
||||
die "Can't parse $file_exceptions: $_";
|
||||
}
|
||||
|
||||
if ($new =~ m/^\:c\:(data|func|macro|type)\:\`(.+)\`/) {
|
||||
$reftype = ":c:$1";
|
||||
$new = $2;
|
||||
} elsif ($new =~ m/\:ref\:\`(.+)\`/) {
|
||||
$reftype = ":ref";
|
||||
$new = $1;
|
||||
} else {
|
||||
$reftype = $def_reftype{$type};
|
||||
}
|
||||
$new = "$reftype:`$old <$new>`";
|
||||
|
||||
if ($type eq "ioctl") {
|
||||
$ioctls{$old} = $new if (exists($ioctls{$old}));
|
||||
next;
|
||||
}
|
||||
if ($type eq "define") {
|
||||
$defines{$old} = $new if (exists($defines{$old}));
|
||||
next;
|
||||
}
|
||||
if ($type eq "symbol") {
|
||||
$enum_symbols{$old} = $new if (exists($enum_symbols{$old}));
|
||||
next;
|
||||
}
|
||||
if ($type eq "typedef") {
|
||||
$typedefs{$old} = $new if (exists($typedefs{$old}));
|
||||
next;
|
||||
}
|
||||
if ($type eq "enum") {
|
||||
$enums{$old} = $new if (exists($enums{$old}));
|
||||
next;
|
||||
}
|
||||
if ($type eq "struct") {
|
||||
$structs{$old} = $new if (exists($structs{$old}));
|
||||
next;
|
||||
}
|
||||
|
||||
die "Can't parse $file_exceptions: $_";
|
||||
}
|
||||
}
|
||||
|
||||
if ($debug) {
|
||||
print Data::Dumper->Dump([\%ioctls], [qw(*ioctls)]) if (%ioctls);
|
||||
print Data::Dumper->Dump([\%typedefs], [qw(*typedefs)]) if (%typedefs);
|
||||
print Data::Dumper->Dump([\%enums], [qw(*enums)]) if (%enums);
|
||||
print Data::Dumper->Dump([\%structs], [qw(*structs)]) if (%structs);
|
||||
print Data::Dumper->Dump([\%defines], [qw(*defines)]) if (%defines);
|
||||
print Data::Dumper->Dump([\%enum_symbols], [qw(*enum_symbols)]) if (%enum_symbols);
|
||||
}
|
||||
|
||||
#
|
||||
# Align block
|
||||
#
|
||||
$data = expand($data);
|
||||
$data = " " . $data;
|
||||
$data =~ s/\n/\n /g;
|
||||
$data =~ s/\n\s+$/\n/g;
|
||||
$data =~ s/\n\s+\n/\n\n/g;
|
||||
|
||||
#
|
||||
# Add escape codes for special characters
|
||||
#
|
||||
$data =~ s,([\_\`\*\<\>\&\\\\:\/\|\%\$\#\{\}\~\^]),\\$1,g;
|
||||
|
||||
$data =~ s,DEPRECATED,**DEPRECATED**,g;
|
||||
|
||||
#
|
||||
# Add references
|
||||
#
|
||||
|
||||
my $start_delim = "[ \n\t\(\=\*\@]";
|
||||
my $end_delim = "(\\s|,|\\\\=|\\\\:|\\;|\\\)|\\}|\\{)";
|
||||
|
||||
foreach my $r (keys %ioctls) {
|
||||
my $s = $ioctls{$r};
|
||||
|
||||
$r =~ s,([\_\`\*\<\>\&\\\\:\/]),\\\\$1,g;
|
||||
|
||||
print "$r -> $s\n" if ($debug);
|
||||
|
||||
$data =~ s/($start_delim)($r)$end_delim/$1$s$3/g;
|
||||
}
|
||||
|
||||
foreach my $r (keys %defines) {
|
||||
my $s = $defines{$r};
|
||||
|
||||
$r =~ s,([\_\`\*\<\>\&\\\\:\/]),\\\\$1,g;
|
||||
|
||||
print "$r -> $s\n" if ($debug);
|
||||
|
||||
$data =~ s/($start_delim)($r)$end_delim/$1$s$3/g;
|
||||
}
|
||||
|
||||
foreach my $r (keys %enum_symbols) {
|
||||
my $s = $enum_symbols{$r};
|
||||
|
||||
$r =~ s,([\_\`\*\<\>\&\\\\:\/]),\\\\$1,g;
|
||||
|
||||
print "$r -> $s\n" if ($debug);
|
||||
|
||||
$data =~ s/($start_delim)($r)$end_delim/$1$s$3/g;
|
||||
}
|
||||
|
||||
foreach my $r (keys %enums) {
|
||||
my $s = $enums{$r};
|
||||
|
||||
$r =~ s,([\_\`\*\<\>\&\\\\:\/]),\\\\$1,g;
|
||||
|
||||
print "$r -> $s\n" if ($debug);
|
||||
|
||||
$data =~ s/enum\s+($r)$end_delim/$s$2/g;
|
||||
}
|
||||
|
||||
foreach my $r (keys %structs) {
|
||||
my $s = $structs{$r};
|
||||
|
||||
$r =~ s,([\_\`\*\<\>\&\\\\:\/]),\\\\$1,g;
|
||||
|
||||
print "$r -> $s\n" if ($debug);
|
||||
|
||||
$data =~ s/struct\s+($r)$end_delim/$s$2/g;
|
||||
}
|
||||
|
||||
foreach my $r (keys %typedefs) {
|
||||
my $s = $typedefs{$r};
|
||||
|
||||
$r =~ s,([\_\`\*\<\>\&\\\\:\/]),\\\\$1,g;
|
||||
|
||||
print "$r -> $s\n" if ($debug);
|
||||
$data =~ s/($start_delim)($r)$end_delim/$1$s$3/g;
|
||||
}
|
||||
|
||||
$data =~ s/\\ ([\n\s])/\1/g;
|
||||
|
||||
#
|
||||
# Generate output file
|
||||
#
|
||||
|
||||
my $title = $file_in;
|
||||
$title =~ s,.*/,,;
|
||||
|
||||
open OUT, "> $file_out" or die "Can't open $file_out";
|
||||
print OUT ".. -*- coding: utf-8; mode: rst -*-\n\n";
|
||||
print OUT "$title\n";
|
||||
print OUT "=" x length($title);
|
||||
print OUT "\n\n.. parsed-literal::\n\n";
|
||||
print OUT $data;
|
||||
close OUT;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
parse_headers.pl - parse a C file, in order to identify functions, structs,
|
||||
enums and defines and create cross-references to a Sphinx book.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<parse_headers.pl> [<options>] <C_FILE> <OUT_FILE> [<EXCEPTIONS_FILE>]
|
||||
|
||||
Where <options> can be: --debug, --help or --man.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--debug>
|
||||
|
||||
Put the script in verbose mode, useful for debugging.
|
||||
|
||||
=item B<--usage>
|
||||
|
||||
Prints a brief help message and exits.
|
||||
|
||||
=item B<--help>
|
||||
|
||||
Prints a more detailed help message and exits.
|
||||
|
||||
=back
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Convert a C header or source file (C_FILE), into a ReStructured Text
|
||||
included via ..parsed-literal block with cross-references for the
|
||||
documentation files that describe the API. It accepts an optional
|
||||
EXCEPTIONS_FILE with describes what elements will be either ignored or
|
||||
be pointed to a non-default reference.
|
||||
|
||||
The output is written at the (OUT_FILE).
|
||||
|
||||
It is capable of identifying defines, functions, structs, typedefs,
|
||||
enums and enum symbols and create cross-references for all of them.
|
||||
It is also capable of distinguish #define used for specifying a Linux
|
||||
ioctl.
|
||||
|
||||
The EXCEPTIONS_FILE contain two rules to allow ignoring a symbol or
|
||||
to replace the default references by a custom one.
|
||||
|
||||
Please read Documentation/doc-guide/parse-headers.rst at the Kernel's
|
||||
tree for more details.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
Report bugs to Mauro Carvalho Chehab <mchehab@kernel.org>
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2016 by Mauro Carvalho Chehab <mchehab+samsung@kernel.org>.
|
||||
|
||||
License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>.
|
||||
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
|
||||
=cut
|
||||
@@ -1,3 +0,0 @@
|
||||
docutils==0.12
|
||||
Sphinx==1.4.9
|
||||
sphinx_rtd_theme
|
||||
@@ -1,376 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8; mode: python -*-
|
||||
# pylint: disable=C0330, R0903, R0912
|
||||
|
||||
u"""
|
||||
flat-table
|
||||
~~~~~~~~~~
|
||||
|
||||
Implementation of the ``flat-table`` reST-directive.
|
||||
|
||||
:copyright: Copyright (C) 2016 Markus Heiser
|
||||
:license: GPL Version 2, June 1991 see linux/COPYING for details.
|
||||
|
||||
The ``flat-table`` (:py:class:`FlatTable`) is a double-stage list similar to
|
||||
the ``list-table`` with some additional features:
|
||||
|
||||
* *column-span*: with the role ``cspan`` a cell can be extended through
|
||||
additional columns
|
||||
|
||||
* *row-span*: with the role ``rspan`` a cell can be extended through
|
||||
additional rows
|
||||
|
||||
* *auto span* rightmost cell of a table row over the missing cells on the
|
||||
right side of that table-row. With Option ``:fill-cells:`` this behavior
|
||||
can changed from *auto span* to *auto fill*, which automaticly inserts
|
||||
(empty) cells instead of spanning the last cell.
|
||||
|
||||
Options:
|
||||
|
||||
* header-rows: [int] count of header rows
|
||||
* stub-columns: [int] count of stub columns
|
||||
* widths: [[int] [int] ... ] widths of columns
|
||||
* fill-cells: instead of autospann missing cells, insert missing cells
|
||||
|
||||
roles:
|
||||
|
||||
* cspan: [int] additionale columns (*morecols*)
|
||||
* rspan: [int] additionale rows (*morerows*)
|
||||
"""
|
||||
|
||||
# ==============================================================================
|
||||
# imports
|
||||
# ==============================================================================
|
||||
|
||||
import sys
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import directives, roles
|
||||
from docutils.parsers.rst.directives.tables import Table
|
||||
from docutils.utils import SystemMessagePropagation
|
||||
|
||||
# ==============================================================================
|
||||
# common globals
|
||||
# ==============================================================================
|
||||
|
||||
# The version numbering follows numbering of the specification
|
||||
# (Documentation/books/kernel-doc-HOWTO).
|
||||
__version__ = '1.0'
|
||||
|
||||
PY3 = sys.version_info[0] == 3
|
||||
PY2 = sys.version_info[0] == 2
|
||||
|
||||
if PY3:
|
||||
# pylint: disable=C0103, W0622
|
||||
unicode = str
|
||||
basestring = str
|
||||
|
||||
# ==============================================================================
|
||||
def setup(app):
|
||||
# ==============================================================================
|
||||
|
||||
app.add_directive("flat-table", FlatTable)
|
||||
roles.register_local_role('cspan', c_span)
|
||||
roles.register_local_role('rspan', r_span)
|
||||
|
||||
return dict(
|
||||
version = __version__,
|
||||
parallel_read_safe = True,
|
||||
parallel_write_safe = True
|
||||
)
|
||||
|
||||
# ==============================================================================
|
||||
def c_span(name, rawtext, text, lineno, inliner, options=None, content=None):
|
||||
# ==============================================================================
|
||||
# pylint: disable=W0613
|
||||
|
||||
options = options if options is not None else {}
|
||||
content = content if content is not None else []
|
||||
nodelist = [colSpan(span=int(text))]
|
||||
msglist = []
|
||||
return nodelist, msglist
|
||||
|
||||
# ==============================================================================
|
||||
def r_span(name, rawtext, text, lineno, inliner, options=None, content=None):
|
||||
# ==============================================================================
|
||||
# pylint: disable=W0613
|
||||
|
||||
options = options if options is not None else {}
|
||||
content = content if content is not None else []
|
||||
nodelist = [rowSpan(span=int(text))]
|
||||
msglist = []
|
||||
return nodelist, msglist
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
class rowSpan(nodes.General, nodes.Element): pass # pylint: disable=C0103,C0321
|
||||
class colSpan(nodes.General, nodes.Element): pass # pylint: disable=C0103,C0321
|
||||
# ==============================================================================
|
||||
|
||||
# ==============================================================================
|
||||
class FlatTable(Table):
|
||||
# ==============================================================================
|
||||
|
||||
u"""FlatTable (``flat-table``) directive"""
|
||||
|
||||
option_spec = {
|
||||
'name': directives.unchanged
|
||||
, 'class': directives.class_option
|
||||
, 'header-rows': directives.nonnegative_int
|
||||
, 'stub-columns': directives.nonnegative_int
|
||||
, 'widths': directives.positive_int_list
|
||||
, 'fill-cells' : directives.flag }
|
||||
|
||||
def run(self):
|
||||
|
||||
if not self.content:
|
||||
error = self.state_machine.reporter.error(
|
||||
'The "%s" directive is empty; content required.' % self.name,
|
||||
nodes.literal_block(self.block_text, self.block_text),
|
||||
line=self.lineno)
|
||||
return [error]
|
||||
|
||||
title, messages = self.make_title()
|
||||
node = nodes.Element() # anonymous container for parsing
|
||||
self.state.nested_parse(self.content, self.content_offset, node)
|
||||
|
||||
tableBuilder = ListTableBuilder(self)
|
||||
tableBuilder.parseFlatTableNode(node)
|
||||
tableNode = tableBuilder.buildTableNode()
|
||||
# SDK.CONSOLE() # print --> tableNode.asdom().toprettyxml()
|
||||
if title:
|
||||
tableNode.insert(0, title)
|
||||
return [tableNode] + messages
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
class ListTableBuilder(object):
|
||||
# ==============================================================================
|
||||
|
||||
u"""Builds a table from a double-stage list"""
|
||||
|
||||
def __init__(self, directive):
|
||||
self.directive = directive
|
||||
self.rows = []
|
||||
self.max_cols = 0
|
||||
|
||||
def buildTableNode(self):
|
||||
|
||||
colwidths = self.directive.get_column_widths(self.max_cols)
|
||||
if isinstance(colwidths, tuple):
|
||||
# Since docutils 0.13, get_column_widths returns a (widths,
|
||||
# colwidths) tuple, where widths is a string (i.e. 'auto').
|
||||
# See https://sourceforge.net/p/docutils/patches/120/.
|
||||
colwidths = colwidths[1]
|
||||
stub_columns = self.directive.options.get('stub-columns', 0)
|
||||
header_rows = self.directive.options.get('header-rows', 0)
|
||||
|
||||
table = nodes.table()
|
||||
tgroup = nodes.tgroup(cols=len(colwidths))
|
||||
table += tgroup
|
||||
|
||||
|
||||
for colwidth in colwidths:
|
||||
colspec = nodes.colspec(colwidth=colwidth)
|
||||
# FIXME: It seems, that the stub method only works well in the
|
||||
# absence of rowspan (observed by the html buidler, the docutils-xml
|
||||
# build seems OK). This is not extraordinary, because there exists
|
||||
# no table directive (except *this* flat-table) which allows to
|
||||
# define coexistent of rowspan and stubs (there was no use-case
|
||||
# before flat-table). This should be reviewed (later).
|
||||
if stub_columns:
|
||||
colspec.attributes['stub'] = 1
|
||||
stub_columns -= 1
|
||||
tgroup += colspec
|
||||
stub_columns = self.directive.options.get('stub-columns', 0)
|
||||
|
||||
if header_rows:
|
||||
thead = nodes.thead()
|
||||
tgroup += thead
|
||||
for row in self.rows[:header_rows]:
|
||||
thead += self.buildTableRowNode(row)
|
||||
|
||||
tbody = nodes.tbody()
|
||||
tgroup += tbody
|
||||
|
||||
for row in self.rows[header_rows:]:
|
||||
tbody += self.buildTableRowNode(row)
|
||||
return table
|
||||
|
||||
def buildTableRowNode(self, row_data, classes=None):
|
||||
classes = [] if classes is None else classes
|
||||
row = nodes.row()
|
||||
for cell in row_data:
|
||||
if cell is None:
|
||||
continue
|
||||
cspan, rspan, cellElements = cell
|
||||
|
||||
attributes = {"classes" : classes}
|
||||
if rspan:
|
||||
attributes['morerows'] = rspan
|
||||
if cspan:
|
||||
attributes['morecols'] = cspan
|
||||
entry = nodes.entry(**attributes)
|
||||
entry.extend(cellElements)
|
||||
row += entry
|
||||
return row
|
||||
|
||||
def raiseError(self, msg):
|
||||
error = self.directive.state_machine.reporter.error(
|
||||
msg
|
||||
, nodes.literal_block(self.directive.block_text
|
||||
, self.directive.block_text)
|
||||
, line = self.directive.lineno )
|
||||
raise SystemMessagePropagation(error)
|
||||
|
||||
def parseFlatTableNode(self, node):
|
||||
u"""parses the node from a :py:class:`FlatTable` directive's body"""
|
||||
|
||||
if len(node) != 1 or not isinstance(node[0], nodes.bullet_list):
|
||||
self.raiseError(
|
||||
'Error parsing content block for the "%s" directive: '
|
||||
'exactly one bullet list expected.' % self.directive.name )
|
||||
|
||||
for rowNum, rowItem in enumerate(node[0]):
|
||||
row = self.parseRowItem(rowItem, rowNum)
|
||||
self.rows.append(row)
|
||||
self.roundOffTableDefinition()
|
||||
|
||||
def roundOffTableDefinition(self):
|
||||
u"""Round off the table definition.
|
||||
|
||||
This method rounds off the table definition in :py:member:`rows`.
|
||||
|
||||
* This method inserts the needed ``None`` values for the missing cells
|
||||
arising from spanning cells over rows and/or columns.
|
||||
|
||||
* recount the :py:member:`max_cols`
|
||||
|
||||
* Autospan or fill (option ``fill-cells``) missing cells on the right
|
||||
side of the table-row
|
||||
"""
|
||||
|
||||
y = 0
|
||||
while y < len(self.rows):
|
||||
x = 0
|
||||
|
||||
while x < len(self.rows[y]):
|
||||
cell = self.rows[y][x]
|
||||
if cell is None:
|
||||
x += 1
|
||||
continue
|
||||
cspan, rspan = cell[:2]
|
||||
# handle colspan in current row
|
||||
for c in range(cspan):
|
||||
try:
|
||||
self.rows[y].insert(x+c+1, None)
|
||||
except: # pylint: disable=W0702
|
||||
# the user sets ambiguous rowspans
|
||||
pass # SDK.CONSOLE()
|
||||
# handle colspan in spanned rows
|
||||
for r in range(rspan):
|
||||
for c in range(cspan + 1):
|
||||
try:
|
||||
self.rows[y+r+1].insert(x+c, None)
|
||||
except: # pylint: disable=W0702
|
||||
# the user sets ambiguous rowspans
|
||||
pass # SDK.CONSOLE()
|
||||
x += 1
|
||||
y += 1
|
||||
|
||||
# Insert the missing cells on the right side. For this, first
|
||||
# re-calculate the max columns.
|
||||
|
||||
for row in self.rows:
|
||||
if self.max_cols < len(row):
|
||||
self.max_cols = len(row)
|
||||
|
||||
# fill with empty cells or cellspan?
|
||||
|
||||
fill_cells = False
|
||||
if 'fill-cells' in self.directive.options:
|
||||
fill_cells = True
|
||||
|
||||
for row in self.rows:
|
||||
x = self.max_cols - len(row)
|
||||
if x and not fill_cells:
|
||||
if row[-1] is None:
|
||||
row.append( ( x - 1, 0, []) )
|
||||
else:
|
||||
cspan, rspan, content = row[-1]
|
||||
row[-1] = (cspan + x, rspan, content)
|
||||
elif x and fill_cells:
|
||||
for i in range(x):
|
||||
row.append( (0, 0, nodes.comment()) )
|
||||
|
||||
def pprint(self):
|
||||
# for debugging
|
||||
retVal = "[ "
|
||||
for row in self.rows:
|
||||
retVal += "[ "
|
||||
for col in row:
|
||||
if col is None:
|
||||
retVal += ('%r' % col)
|
||||
retVal += "\n , "
|
||||
else:
|
||||
content = col[2][0].astext()
|
||||
if len (content) > 30:
|
||||
content = content[:30] + "..."
|
||||
retVal += ('(cspan=%s, rspan=%s, %r)'
|
||||
% (col[0], col[1], content))
|
||||
retVal += "]\n , "
|
||||
retVal = retVal[:-2]
|
||||
retVal += "]\n , "
|
||||
retVal = retVal[:-2]
|
||||
return retVal + "]"
|
||||
|
||||
def parseRowItem(self, rowItem, rowNum):
|
||||
row = []
|
||||
childNo = 0
|
||||
error = False
|
||||
cell = None
|
||||
target = None
|
||||
|
||||
for child in rowItem:
|
||||
if (isinstance(child , nodes.comment)
|
||||
or isinstance(child, nodes.system_message)):
|
||||
pass
|
||||
elif isinstance(child , nodes.target):
|
||||
target = child
|
||||
elif isinstance(child, nodes.bullet_list):
|
||||
childNo += 1
|
||||
cell = child
|
||||
else:
|
||||
error = True
|
||||
break
|
||||
|
||||
if childNo != 1 or error:
|
||||
self.raiseError(
|
||||
'Error parsing content block for the "%s" directive: '
|
||||
'two-level bullet list expected, but row %s does not '
|
||||
'contain a second-level bullet list.'
|
||||
% (self.directive.name, rowNum + 1))
|
||||
|
||||
for cellItem in cell:
|
||||
cspan, rspan, cellElements = self.parseCellItem(cellItem)
|
||||
if target is not None:
|
||||
cellElements.insert(0, target)
|
||||
row.append( (cspan, rspan, cellElements) )
|
||||
return row
|
||||
|
||||
def parseCellItem(self, cellItem):
|
||||
# search and remove cspan, rspan colspec from the first element in
|
||||
# this listItem (field).
|
||||
cspan = rspan = 0
|
||||
if not len(cellItem):
|
||||
return cspan, rspan, []
|
||||
for elem in cellItem[0]:
|
||||
if isinstance(elem, colSpan):
|
||||
cspan = elem.get("span")
|
||||
elem.parent.remove(elem)
|
||||
continue
|
||||
if isinstance(elem, rowSpan):
|
||||
rspan = elem.get("span")
|
||||
elem.parent.remove(elem)
|
||||
continue
|
||||
return cspan, rspan, cellItem[:]
|
||||
441
Kconfig
441
Kconfig
@@ -14,12 +14,6 @@ source "arch/Kconfig"
|
||||
|
||||
menu "General setup"
|
||||
|
||||
config BROKEN
|
||||
bool
|
||||
help
|
||||
This option cannot be enabled. It is used as dependency
|
||||
for broken and incomplete features.
|
||||
|
||||
config LOCALVERSION
|
||||
string "Local version - append to U-Boot release"
|
||||
help
|
||||
@@ -59,74 +53,27 @@ config CC_OPTIMIZE_FOR_SIZE
|
||||
|
||||
This option is enabled by default for U-Boot.
|
||||
|
||||
config CC_COVERAGE
|
||||
bool "Enable code coverage analysis"
|
||||
depends on SANDBOX
|
||||
help
|
||||
Enabling this option will pass "--coverage" to gcc to compile
|
||||
and link code instrumented for coverage analysis.
|
||||
|
||||
config DISTRO_DEFAULTS
|
||||
bool "Select defaults suitable for booting general purpose Linux distributions"
|
||||
select AUTO_COMPLETE
|
||||
select CMDLINE_EDITING
|
||||
select CMD_BOOTI if ARM64
|
||||
default y if ARCH_SUNXI
|
||||
default n
|
||||
select CMD_BOOTZ if ARM && !ARM64
|
||||
select CMD_DHCP if CMD_NET
|
||||
select CMD_ENV_EXISTS
|
||||
select CMD_BOOTI if ARM64
|
||||
select CMD_DHCP
|
||||
select CMD_EXT2
|
||||
select CMD_EXT4
|
||||
select CMD_FAT
|
||||
select CMD_FS_GENERIC
|
||||
select CMD_PART if PARTITIONS
|
||||
select CMD_PING if CMD_NET
|
||||
select CMD_PXE if NET
|
||||
select ENV_VARS_UBOOT_CONFIG
|
||||
select CMD_MII
|
||||
select CMD_PING
|
||||
select HUSH_PARSER
|
||||
select SUPPORT_RAW_INITRD
|
||||
select SYS_LONGHELP
|
||||
imply CMD_MII if NET
|
||||
imply USB_STORAGE
|
||||
imply USE_BOOTCOMMAND
|
||||
help
|
||||
Select this to enable various options and commands which are suitable
|
||||
for building u-boot for booting general purpose Linux distributions.
|
||||
|
||||
config ENV_VARS_UBOOT_CONFIG
|
||||
bool "Add arch, board, vendor and soc variables to default environment"
|
||||
help
|
||||
Define this in order to add variables describing the
|
||||
U-Boot build configuration to the default environment.
|
||||
These will be named arch, cpu, board, vendor, and soc.
|
||||
Enabling this option will cause the following to be defined:
|
||||
- CONFIG_SYS_ARCH
|
||||
- CONFIG_SYS_CPU
|
||||
- CONFIG_SYS_BOARD
|
||||
- CONFIG_SYS_VENDOR
|
||||
- CONFIG_SYS_SOC
|
||||
|
||||
config NR_DRAM_BANKS
|
||||
int "Number of DRAM banks"
|
||||
default 4
|
||||
help
|
||||
This defines the number of DRAM banks.
|
||||
|
||||
config SYS_BOOT_GET_CMDLINE
|
||||
bool "Enable kernel command line setup"
|
||||
help
|
||||
Enables allocating and saving kernel cmdline in space between
|
||||
"bootm_low" and "bootm_low" + BOOTMAPSZ.
|
||||
|
||||
config SYS_BOOT_GET_KBD
|
||||
bool "Enable kernel board information setup"
|
||||
help
|
||||
Enables allocating and saving a kernel copy of the bd_info in
|
||||
space between "bootm_low" and "bootm_low" + BOOTMAPSZ.
|
||||
|
||||
config SYS_MALLOC_F
|
||||
bool "Enable malloc() pool before relocation"
|
||||
default y if DM
|
||||
|
||||
help
|
||||
Before relocation, memory is very limited on many platforms. Still,
|
||||
we can provide a small malloc() pool if needed. Driver model in
|
||||
@@ -136,8 +83,6 @@ config SYS_MALLOC_F
|
||||
config SYS_MALLOC_F_LEN
|
||||
hex "Size of malloc() pool before relocation"
|
||||
depends on SYS_MALLOC_F
|
||||
default 0x1000 if AM33XX
|
||||
default 0x2800 if SANDBOX
|
||||
default 0x400
|
||||
help
|
||||
Before relocation, memory is very limited on many platforms. Still,
|
||||
@@ -145,33 +90,6 @@ config SYS_MALLOC_F_LEN
|
||||
particular needs this to operate, so that it can allocate the
|
||||
initial serial device and any others that are needed.
|
||||
|
||||
config SYS_MALLOC_LEN
|
||||
hex "Define memory for Dynamic allocation"
|
||||
depends on ARCH_ZYNQ || ARCH_VERSAL
|
||||
help
|
||||
This defines memory to be allocated for Dynamic allocation
|
||||
TODO: Use for other architectures
|
||||
|
||||
config SPL_SYS_MALLOC_F_LEN
|
||||
hex "Size of malloc() pool in SPL before relocation"
|
||||
depends on SYS_MALLOC_F
|
||||
default SYS_MALLOC_F_LEN
|
||||
help
|
||||
Before relocation, memory is very limited on many platforms. Still,
|
||||
we can provide a small malloc() pool if needed. Driver model in
|
||||
particular needs this to operate, so that it can allocate the
|
||||
initial serial device and any others that are needed.
|
||||
|
||||
config TPL_SYS_MALLOC_F_LEN
|
||||
hex "Size of malloc() pool in TPL before relocation"
|
||||
depends on SYS_MALLOC_F
|
||||
default SYS_MALLOC_F_LEN
|
||||
help
|
||||
Before relocation, memory is very limited on many platforms. Still,
|
||||
we can provide a small malloc() pool if needed. Driver model in
|
||||
particular needs this to operate, so that it can allocate the
|
||||
initial serial device and any others that are needed.
|
||||
|
||||
menuconfig EXPERT
|
||||
bool "Configure standard U-Boot features (expert users)"
|
||||
default y
|
||||
@@ -206,111 +124,119 @@ config TOOLS_DEBUG
|
||||
it is possible to set breakpoints on particular lines, single-step
|
||||
debug through the source code, etc.
|
||||
|
||||
endif # EXPERT
|
||||
endif
|
||||
|
||||
config PHYS_64BIT
|
||||
bool "64bit physical address support"
|
||||
help
|
||||
Say Y here to support 64bit physical memory address.
|
||||
This can be used not only for 64bit SoCs, but also for
|
||||
large physical address extension on 32bit SoCs.
|
||||
|
||||
config BUILD_ROM
|
||||
bool "Build U-Boot as BIOS replacement"
|
||||
depends on X86
|
||||
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/README.x86 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
|
||||
default "spl/u-boot-spl.bin"
|
||||
help
|
||||
Select the SPL build target that shall be generated by the SPL
|
||||
build process (default spl/u-boot-spl.bin). This image will be
|
||||
used to generate a combined image with SPL and main U-Boot
|
||||
proper as one single image.
|
||||
|
||||
config BUILD_TARGET
|
||||
string "Build target special images"
|
||||
default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_ARRIA10
|
||||
default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_GEN5
|
||||
default "u-boot-spl.kwb" if ARCH_MVEBU && SPL
|
||||
default "u-boot-elf.srec" if RCAR_GEN3
|
||||
default "u-boot.itb" if SPL_LOAD_FIT && ARCH_SUNXI
|
||||
default "u-boot.kwb" if KIRKWOOD
|
||||
default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT
|
||||
help
|
||||
Some SoCs need special image types (e.g. U-Boot binary
|
||||
with a special header) as build targets. By defining
|
||||
CONFIG_BUILD_TARGET in the SoC / board header, this
|
||||
special image will be automatically built upon calling
|
||||
make / buildman.
|
||||
large physical address extention on 32bit SoCs.
|
||||
|
||||
endmenu # General setup
|
||||
|
||||
menu "Boot images"
|
||||
|
||||
config ANDROID_BOOT_IMAGE
|
||||
bool "Enable support for Android Boot Images"
|
||||
default y if FASTBOOT
|
||||
config SUPPORT_SPL
|
||||
bool
|
||||
|
||||
config SUPPORT_TPL
|
||||
bool
|
||||
|
||||
config SPL
|
||||
bool
|
||||
depends on SUPPORT_SPL
|
||||
prompt "Enable SPL"
|
||||
help
|
||||
This enables support for booting images which use the Android
|
||||
image format header.
|
||||
If you want to build SPL as well as the normal image, say Y.
|
||||
|
||||
config SPL_SYS_MALLOC_SIMPLE
|
||||
bool
|
||||
depends on SPL
|
||||
prompt "Only use malloc_simple functions in the SPL"
|
||||
help
|
||||
Say Y here to only use the *_simple malloc functions from
|
||||
malloc_simple.c, rather then using the versions from dlmalloc.c;
|
||||
this will make the SPL binary smaller at the cost of more heap
|
||||
usage as the *_simple malloc functions do not re-use free-ed mem.
|
||||
|
||||
config SPL_STACK_R
|
||||
depends on SPL
|
||||
bool "Enable SDRAM location for SPL stack"
|
||||
help
|
||||
SPL starts off execution in SRAM and thus typically has only a small
|
||||
stack available. Since SPL sets up DRAM while in its board_init_f()
|
||||
function, it is possible for the stack to move there before
|
||||
board_init_r() is reached. This option enables a special SDRAM
|
||||
location for the SPL stack. U-Boot SPL switches to this after
|
||||
board_init_f() completes, and before board_init_r() starts.
|
||||
|
||||
config SPL_STACK_R_ADDR
|
||||
depends on SPL_STACK_R
|
||||
hex "SDRAM location for SPL stack"
|
||||
help
|
||||
Specify the address in SDRAM for the SPL stack. This will be set up
|
||||
before board_init_r() is called.
|
||||
|
||||
config SPL_STACK_R_MALLOC_SIMPLE_LEN
|
||||
depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE
|
||||
hex "Size of malloc_simple heap after switching to DRAM SPL stack"
|
||||
default 0x100000
|
||||
help
|
||||
Specify the amount of the stack to use as memory pool for
|
||||
malloc_simple after switching the stack to DRAM. This may be set
|
||||
to give board_init_r() a larger heap then the initial heap in
|
||||
SRAM which is limited to SYS_MALLOC_F_LEN bytes.
|
||||
|
||||
config SPL_SEPARATE_BSS
|
||||
depends on SPL
|
||||
bool "BSS section is in a different memory region from text"
|
||||
help
|
||||
Some platforms need a large BSS region in SPL and can provide this
|
||||
because RAM is already set up. In this case BSS can be moved to RAM.
|
||||
This option should then be enabled so that the correct device tree
|
||||
location is used. Normally we put the device tree at the end of BSS
|
||||
but with this option enabled, it goes at _image_binary_end.
|
||||
|
||||
config TPL
|
||||
bool
|
||||
depends on SPL && SUPPORT_TPL
|
||||
prompt "Enable TPL"
|
||||
help
|
||||
If you want to build TPL as well as the normal image and SPL, say Y.
|
||||
|
||||
config FIT
|
||||
bool "Support Flattened Image Tree"
|
||||
select MD5
|
||||
select SHA1
|
||||
help
|
||||
This option allows you to boot the new uImage structure,
|
||||
This option allows to boot the new uImage structrure,
|
||||
Flattened Image Tree. FIT is formally a FDT, which can include
|
||||
images of various types (kernel, FDT blob, ramdisk, etc.)
|
||||
in a single blob. To boot this new uImage structure,
|
||||
pass the address of the blob to the "bootm" command.
|
||||
FIT is very flexible, supporting compression, multiple images,
|
||||
multiple configurations, verification through hashing and also
|
||||
verified boot (secure boot using RSA).
|
||||
verified boot (secure boot using RSA). This option enables that
|
||||
feature.
|
||||
|
||||
if FIT
|
||||
config SPL_FIT
|
||||
bool "Support Flattened Image Tree within SPL"
|
||||
depends on FIT
|
||||
depends on SPL
|
||||
|
||||
config FIT_EXTERNAL_OFFSET
|
||||
hex "Text Base"
|
||||
default 0x0
|
||||
help
|
||||
This specifies a data offset in fit image.
|
||||
The offset is from data payload offset to the beginning of
|
||||
fit image header. When specifies a offset, specific data
|
||||
could be put in the hole between data payload and fit image
|
||||
header, such as CSF data on i.MX platform.
|
||||
|
||||
config FIT_ENABLE_SHA256_SUPPORT
|
||||
bool "Support SHA256 checksum of FIT image contents"
|
||||
default y
|
||||
select SHA256
|
||||
help
|
||||
Enable this to support SHA256 checksum of FIT image contents. A
|
||||
SHA256 checksum is a 256-bit (32-byte) hash value used to check that
|
||||
the image contents have not been corrupted. SHA256 is recommended
|
||||
for use in secure applications since (as at 2016) there is no known
|
||||
feasible attack that could produce a 'collision' with differing
|
||||
input data. Use this for the highest security. Note that only the
|
||||
SHA256 variant is supported: SHA512 and others are not currently
|
||||
supported in U-Boot.
|
||||
config FIT_VERBOSE
|
||||
bool "Display verbose messages on FIT boot"
|
||||
depends on FIT
|
||||
|
||||
config FIT_SIGNATURE
|
||||
bool "Enable signature verification of FIT uImages"
|
||||
depends on FIT
|
||||
depends on DM
|
||||
select HASH
|
||||
select RSA
|
||||
help
|
||||
This option enables signature verification of FIT uImages,
|
||||
using a hash signed and verified using RSA. If
|
||||
CONFIG_SHA_PROG_HW_ACCEL is defined, i.e support for progressive
|
||||
hashing is available using hardware, then the RSA library will use
|
||||
hashing is available using hardware, then then RSA library will use
|
||||
it. See doc/uImage.FIT/signature.txt for more details.
|
||||
|
||||
WARNING: When relying on signed FIT images with a required signature
|
||||
@@ -319,34 +245,15 @@ config FIT_SIGNATURE
|
||||
format support in this case, enable it using
|
||||
CONFIG_IMAGE_FORMAT_LEGACY.
|
||||
|
||||
config FIT_SIGNATURE_MAX_SIZE
|
||||
hex "Max size of signed FIT structures"
|
||||
depends on FIT_SIGNATURE
|
||||
default 0x10000000
|
||||
help
|
||||
This option sets a max size in bytes for verified FIT uImages.
|
||||
A sane value of 256MB protects corrupted DTB structures from overlapping
|
||||
device memory. Assure this size does not extend past expected storage
|
||||
space.
|
||||
|
||||
config FIT_ENABLE_RSASSA_PSS_SUPPORT
|
||||
bool "Support rsassa-pss signature scheme of FIT image contents"
|
||||
depends on FIT_SIGNATURE
|
||||
default n
|
||||
help
|
||||
Enable this to support the pss padding algorithm as described
|
||||
in the rfc8017 (https://tools.ietf.org/html/rfc8017).
|
||||
|
||||
config FIT_VERBOSE
|
||||
bool "Show verbose messages when FIT images fail"
|
||||
help
|
||||
Generally a system will have valid FIT images so debug messages
|
||||
are a waste of code space. If you are debugging your images then
|
||||
you can enable this option to get more verbose information about
|
||||
failures.
|
||||
config SPL_FIT_SIGNATURE
|
||||
bool "Enable signature verification of FIT firmware within SPL"
|
||||
depends on SPL_FIT
|
||||
depends on SPL_DM
|
||||
select SPL_RSA
|
||||
|
||||
config FIT_BEST_MATCH
|
||||
bool "Select the best match for the kernel device tree"
|
||||
depends on FIT
|
||||
help
|
||||
When no configuration is explicitly selected, default to the
|
||||
one whose fdt's compatibility field best matches that of
|
||||
@@ -354,107 +261,14 @@ config FIT_BEST_MATCH
|
||||
most specific compatibility entry of U-Boot's fdt's root node.
|
||||
The order of entries in the configuration's fdt is ignored.
|
||||
|
||||
config FIT_IMAGE_POST_PROCESS
|
||||
bool "Enable post-processing of FIT artifacts after loading by U-Boot"
|
||||
depends on TI_SECURE_DEVICE
|
||||
config FIT_VERBOSE
|
||||
bool "Show verbose messages when FIT images fails"
|
||||
depends on FIT
|
||||
help
|
||||
Allows doing any sort of manipulation to blobs after they got extracted
|
||||
from FIT images like stripping off headers or modifying the size of the
|
||||
blob, verification, authentication, decryption etc. in a platform or
|
||||
board specific way. In order to use this feature a platform or board-
|
||||
specific implementation of board_fit_image_post_process() must be
|
||||
provided. Also, anything done during this post-processing step would
|
||||
need to be comprehended in how the images were prepared before being
|
||||
injected into the FIT creation (i.e. the blobs would have been pre-
|
||||
processed before being added to the FIT image).
|
||||
|
||||
if SPL
|
||||
|
||||
config SPL_FIT
|
||||
bool "Support Flattened Image Tree within SPL"
|
||||
depends on SPL
|
||||
select SPL_OF_LIBFDT
|
||||
|
||||
config SPL_FIT_PRINT
|
||||
bool "Support FIT printing within SPL"
|
||||
depends on SPL_FIT
|
||||
help
|
||||
Support printing the content of the fitImage in a verbose manner in SPL.
|
||||
|
||||
config SPL_FIT_SIGNATURE
|
||||
bool "Enable signature verification of FIT firmware within SPL"
|
||||
depends on SPL_DM
|
||||
select SPL_FIT
|
||||
select SPL_RSA
|
||||
|
||||
config SPL_LOAD_FIT
|
||||
bool "Enable SPL loading U-Boot as a FIT"
|
||||
select SPL_FIT
|
||||
help
|
||||
Normally with the SPL framework a legacy image is generated as part
|
||||
of the build. This contains U-Boot along with information as to
|
||||
where it should be loaded. This option instead enables generation
|
||||
of a FIT (Flat Image Tree) which provides more flexibility. In
|
||||
particular it can handle selecting from multiple device tree
|
||||
and passing the correct one to U-Boot.
|
||||
|
||||
config SPL_LOAD_FIT_FULL
|
||||
bool "Enable SPL loading U-Boot as a FIT"
|
||||
select SPL_FIT
|
||||
help
|
||||
Normally with the SPL framework a legacy image is generated as part
|
||||
of the build. This contains U-Boot along with information as to
|
||||
where it should be loaded. This option instead enables generation
|
||||
of a FIT (Flat Image Tree) which provides more flexibility. In
|
||||
particular it can handle selecting from multiple device tree
|
||||
and passing the correct one to U-Boot.
|
||||
|
||||
config SPL_FIT_IMAGE_POST_PROCESS
|
||||
bool "Enable post-processing of FIT artifacts after loading by the SPL"
|
||||
depends on SPL_LOAD_FIT
|
||||
help
|
||||
Allows doing any sort of manipulation to blobs after they got extracted
|
||||
from the U-Boot FIT image like stripping off headers or modifying the
|
||||
size of the blob, verification, authentication, decryption etc. in a
|
||||
platform or board specific way. In order to use this feature a platform
|
||||
or board-specific implementation of board_fit_image_post_process() must
|
||||
be provided. Also, anything done during this post-processing step would
|
||||
need to be comprehended in how the images were prepared before being
|
||||
injected into the FIT creation (i.e. the blobs would have been pre-
|
||||
processed before being added to the FIT image).
|
||||
|
||||
config SPL_FIT_SOURCE
|
||||
string ".its source file for U-Boot FIT image"
|
||||
depends on SPL_FIT
|
||||
help
|
||||
Specifies a (platform specific) FIT source file to generate the
|
||||
U-Boot FIT image. This could specify further image to load and/or
|
||||
execute.
|
||||
|
||||
config SPL_FIT_GENERATOR
|
||||
string ".its file generator script for U-Boot FIT image"
|
||||
depends on SPL_FIT
|
||||
default "board/sunxi/mksunxi_fit_atf.sh" if SPL_LOAD_FIT && ARCH_SUNXI
|
||||
default "arch/arm/mach-rockchip/make_fit_atf.py" if SPL_LOAD_FIT && ARCH_ROCKCHIP
|
||||
help
|
||||
Specifies a (platform specific) script file to generate the FIT
|
||||
source file used to build the U-Boot FIT image file. This gets
|
||||
passed a list of supported device tree file stub names to
|
||||
include in the generated image.
|
||||
|
||||
endif # SPL
|
||||
|
||||
endif # FIT
|
||||
|
||||
config IMAGE_FORMAT_LEGACY
|
||||
bool "Enable support for the legacy image format"
|
||||
default y if !FIT_SIGNATURE
|
||||
help
|
||||
This option enables the legacy image format. It is enabled by
|
||||
default for backward compatibility, unless FIT_SIGNATURE is
|
||||
set where it is disabled so that unsigned images cannot be
|
||||
loaded. If a board needs the legacy image format support in this
|
||||
case, enable it here.
|
||||
Generally a system will have valid FIT images so debug messages
|
||||
are a waste of code space. If you are debugging your images then
|
||||
you can enable this option to get more verbose information about
|
||||
failures.
|
||||
|
||||
config OF_BOARD_SETUP
|
||||
bool "Set up board-specific details in device tree before boot"
|
||||
@@ -499,17 +313,51 @@ config SYS_EXTRA_OPTIONS
|
||||
new boards should not use this option.
|
||||
|
||||
config SYS_TEXT_BASE
|
||||
depends on !NIOS2 && !XTENSA
|
||||
depends on SPARC || ARC || X86 || ARCH_UNIPHIER || ARCH_ZYNQMP || \
|
||||
(M68K && !TARGET_ASTRO_MCF5373L) || MICROBLAZE || MIPS
|
||||
depends on !EFI_APP
|
||||
default 0x80800000 if ARCH_OMAP2PLUS || ARCH_K3
|
||||
default 0x4a000000 if ARCH_SUNXI && !MACH_SUN9I && !MACH_SUN8I_V3S
|
||||
default 0x2a000000 if ARCH_SUNXI && MACH_SUN9I
|
||||
default 0x42e00000 if ARCH_SUNXI && MACH_SUN8I_V3S
|
||||
hex "Text Base"
|
||||
help
|
||||
The address in memory that U-Boot will be running from, initially.
|
||||
TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture
|
||||
|
||||
config SPL_LOAD_FIT
|
||||
bool "Enable SPL loading U-Boot as a FIT"
|
||||
depends on FIT
|
||||
help
|
||||
Normally with the SPL framework a legacy image is generated as part
|
||||
of the build. This contains U-Boot along with information as to
|
||||
where it should be loaded. This option instead enables generation
|
||||
of a FIT (Flat Image Tree) which provides more flexibility. In
|
||||
particular it can handle selecting from multiple device tree
|
||||
and passing the correct one to U-Boot.
|
||||
|
||||
config SPL_FIT_IMAGE_POST_PROCESS
|
||||
bool "Enable post-processing of FIT artifacts after loading by the SPL"
|
||||
depends on SPL_LOAD_FIT && TI_SECURE_DEVICE
|
||||
help
|
||||
Allows doing any sort of manipulation to blobs after they got extracted
|
||||
from the U-Boot FIT image like stripping off headers or modifying the
|
||||
size of the blob, verification, authentication, decryption etc. in a
|
||||
platform or board specific way. In order to use this feature a platform
|
||||
or board-specific implementation of board_fit_image_post_process() must
|
||||
be provided. Also, anything done during this post-processing step would
|
||||
need to be comprehended in how the images were prepared before being
|
||||
injected into the FIT creation (i.e. the blobs would have been pre-
|
||||
processed before being added to the FIT image).
|
||||
|
||||
config FIT_IMAGE_POST_PROCESS
|
||||
bool "Enable post-processing of FIT artifacts after loading by U-Boot"
|
||||
depends on FIT && TI_SECURE_DEVICE
|
||||
help
|
||||
Allows doing any sort of manipulation to blobs after they got extracted
|
||||
from FIT images like stripping off headers or modifying the size of the
|
||||
blob, verification, authentication, decryption etc. in a platform or
|
||||
board specific way. In order to use this feature a platform or board-
|
||||
specific implementation of board_fit_image_post_process() must be
|
||||
provided. Also, anything done during this post-processing step would
|
||||
need to be comprehended in how the images were prepared before being
|
||||
injected into the FIT creation (i.e. the blobs would have been pre-
|
||||
processed before being added to the FIT image).
|
||||
|
||||
config SYS_CLK_FREQ
|
||||
depends on ARC || ARCH_SUNXI
|
||||
@@ -517,8 +365,9 @@ config SYS_CLK_FREQ
|
||||
help
|
||||
TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture
|
||||
|
||||
config ARCH_FIXUP_FDT_MEMORY
|
||||
bool "Enable arch_fixup_memory_banks() call"
|
||||
config ARCH_FIXUP_FDT
|
||||
bool "Enable arch_fixup_fdt() call"
|
||||
depends on ARM || MIPS
|
||||
default y
|
||||
help
|
||||
Enable FDT memory map syncup before OS boot. This feature can be
|
||||
@@ -527,18 +376,12 @@ config ARCH_FIXUP_FDT_MEMORY
|
||||
|
||||
endmenu # Boot images
|
||||
|
||||
source "api/Kconfig"
|
||||
|
||||
source "common/Kconfig"
|
||||
|
||||
source "cmd/Kconfig"
|
||||
|
||||
source "disk/Kconfig"
|
||||
|
||||
source "dts/Kconfig"
|
||||
|
||||
source "env/Kconfig"
|
||||
|
||||
source "net/Kconfig"
|
||||
|
||||
source "drivers/Kconfig"
|
||||
|
||||
102
Licenses/README
102
Licenses/README
@@ -1,5 +1,3 @@
|
||||
SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
U-Boot is Free Software. It is copyrighted by Wolfgang Denk and
|
||||
many others who contributed code (see the actual source code and the
|
||||
git commit messages for details). You can redistribute U-Boot and/or
|
||||
@@ -33,107 +31,27 @@ information, ...) which makes automatic processing a nightmare.
|
||||
|
||||
To make this easier, such license headers in the source files will be
|
||||
replaced with a single line reference to Unique License Identifiers
|
||||
as defined by the Linux Foundation's SPDX project [1].
|
||||
as defined by the Linux Foundation's SPDX project [1]. For example,
|
||||
in a source file the full "GPL v2.0 or later" header text will be
|
||||
replaced by a single line:
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
Ideally, the license terms of all files in the source tree should be
|
||||
defined by such License Identifiers; in no case a file can contain
|
||||
more than one such License Identifier list.
|
||||
|
||||
If a "SPDX-License-Identifier:" line references more than one Unique
|
||||
License Identifier, then this means that the respective file can be
|
||||
used under the terms of either of these licenses, i. e. with
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
||||
SPDX-License-Identifier: GPL-2.0+ BSD-3-Clause
|
||||
|
||||
you can choose between GPL-2.0+ and BSD-3-Clause licensing.
|
||||
|
||||
We use the SPDX Unique License Identifiers here; these are available
|
||||
at [2].
|
||||
|
||||
License identifier syntax
|
||||
-------------------------
|
||||
|
||||
1. Placement:
|
||||
|
||||
The SPDX license identifier in U-Boot files shall be added at the first
|
||||
possible line in a file which can contain a comment. For the majority
|
||||
or files this is the first line, except for scripts which require the
|
||||
'#!PATH_TO_INTERPRETER' in the first line. For those scripts the SPDX
|
||||
identifier goes into the second line.
|
||||
|
||||
|
|
||||
|
||||
2. Style:
|
||||
|
||||
The SPDX license identifier is added in form of a comment. The comment
|
||||
style depends on the file type::
|
||||
|
||||
C source: // SPDX-License-Identifier: <SPDX License Expression>
|
||||
C header: /* SPDX-License-Identifier: <SPDX License Expression> */
|
||||
ASM: /* SPDX-License-Identifier: <SPDX License Expression> */
|
||||
scripts: # SPDX-License-Identifier: <SPDX License Expression>
|
||||
.rst: .. SPDX-License-Identifier: <SPDX License Expression>
|
||||
.dts{i}: // SPDX-License-Identifier: <SPDX License Expression>
|
||||
|
||||
If a specific tool cannot handle the standard comment style, then the
|
||||
appropriate comment mechanism which the tool accepts shall be used. This
|
||||
is the reason for having the "/\* \*/" style comment in C header
|
||||
files. There was build breakage observed with generated .lds files where
|
||||
'ld' failed to parse the C++ comment. This has been fixed by now, but
|
||||
there are still older assembler tools which cannot handle C++ style
|
||||
comments.
|
||||
|
||||
|
|
||||
|
||||
3. Syntax:
|
||||
|
||||
A <SPDX License Expression> is either an SPDX short form license
|
||||
identifier found on the SPDX License List, or the combination of two
|
||||
SPDX short form license identifiers separated by "WITH" when a license
|
||||
exception applies. When multiple licenses apply, an expression consists
|
||||
of keywords "AND", "OR" separating sub-expressions and surrounded by
|
||||
"(", ")" .
|
||||
|
||||
License identifiers for licenses like [L]GPL with the 'or later' option
|
||||
are constructed by using a "+" for indicating the 'or later' option.::
|
||||
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
// SPDX-License-Identifier: LGPL-2.1+
|
||||
|
||||
WITH should be used when there is a modifier to a license needed.
|
||||
For example, the linux kernel UAPI files use the expression::
|
||||
|
||||
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
// SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note
|
||||
|
||||
Other examples using WITH exceptions found in the linux kernel are::
|
||||
|
||||
// SPDX-License-Identifier: GPL-2.0 WITH mif-exception
|
||||
// SPDX-License-Identifier: GPL-2.0+ WITH GCC-exception-2.0
|
||||
|
||||
Exceptions can only be used with particular License identifiers. The
|
||||
valid License identifiers are listed in the tags of the exception text
|
||||
file.
|
||||
|
||||
OR should be used if the file is dual licensed and only one license is
|
||||
to be selected. For example, some dtsi files are available under dual
|
||||
licenses::
|
||||
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
|
||||
Examples from U-Boot for license expressions in dual licensed files::
|
||||
|
||||
// SPDX-License-Identifier: GPL-2.0 OR MIT
|
||||
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
||||
|
||||
AND should be used if the file has multiple licenses whose terms all
|
||||
apply to use the file. For example, if code is inherited from another
|
||||
project and permission has been given to put it in U-Boot, but the
|
||||
original license terms need to remain in effect::
|
||||
|
||||
// SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) AND MIT
|
||||
|
||||
Another other example where both sets of license terms need to be
|
||||
adhered to is::
|
||||
|
||||
// SPDX-License-Identifier: GPL-1.0+ AND LGPL-2.1+
|
||||
|
||||
[1] http://spdx.org/
|
||||
[2] http://spdx.org/licenses/
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
Copyright (c) 2014, Renesas Electronics Corporation
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in binary form, without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
1. Redistribution in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
2. The name of Renesas Electronics Corporation may not be used to endorse or
|
||||
promote products derived from this software without specific prior written
|
||||
permission.
|
||||
3. Reverse engineering, decompilation, or disassembly of this software is
|
||||
not permitted.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS ELECTRONICS CORPORATION DISCLAIMS
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND
|
||||
NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL RENESAS ELECTRONICS
|
||||
CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
593
MAINTAINERS
593
MAINTAINERS
@@ -2,8 +2,6 @@ Descriptions of section entries:
|
||||
|
||||
P: Person (obsolete)
|
||||
M: Mail patches to: FullName <address@domain>
|
||||
R: Designated reviewer: FullName <address@domain>
|
||||
These reviewers should be CCed on patches.
|
||||
L: Mailing list that is relevant to this area
|
||||
W: Web-page with status/info
|
||||
Q: Patchwork web based patch tracking system site
|
||||
@@ -12,8 +10,13 @@ Descriptions of section entries:
|
||||
S: Status, one of the following:
|
||||
Supported: Someone is actually paid to look after this.
|
||||
Maintained: Someone actually looks after it.
|
||||
Odd Fixes: It has a maintainer but they don't have time to do
|
||||
much other than throw the odd patch in. See below..
|
||||
Orphan: No current maintainer [but maybe you could take the
|
||||
role as you write your new code].
|
||||
Obsolete: Old code. Something tagged obsolete generally means
|
||||
it has been replaced by a better system and you
|
||||
should be using that.
|
||||
F: Files and directories with wildcard patterns.
|
||||
A trailing slash includes all files and subdirectory files.
|
||||
F: drivers/net/ all files in and below drivers/net
|
||||
@@ -52,137 +55,69 @@ Maintainers List (try to look for most precise areas first)
|
||||
-----------------------------------
|
||||
ARC
|
||||
M: Alexey Brodkin <alexey.brodkin@synopsys.com>
|
||||
M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
|
||||
S: Maintained
|
||||
L: uboot-snps-arc@synopsys.com
|
||||
T: git git://git.denx.de/u-boot-arc.git
|
||||
F: arch/arc/
|
||||
F: board/synopsys/
|
||||
|
||||
ARC HSDK CGU CLOCK
|
||||
M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
|
||||
S: Maintained
|
||||
L: uboot-snps-arc@synopsys.com
|
||||
F: drivers/clk/clk-hsdk-cgu.c
|
||||
F: include/dt-bindings/clock/snps,hsdk-cgu.h
|
||||
F: doc/device-tree-bindings/clock/snps,hsdk-cgu.txt
|
||||
|
||||
ARC HSDK CREG GPIO
|
||||
M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
|
||||
S: Maintained
|
||||
L: uboot-snps-arc@synopsys.com
|
||||
F: doc/device-tree-bindings/gpio/snps,creg-gpio.txt
|
||||
F: drivers/gpio/hsdk-creg-gpio.c
|
||||
|
||||
ARC SYNOPSYS DW MMC EXTENSIONS
|
||||
M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
|
||||
S: Maintained
|
||||
L: uboot-snps-arc@synopsys.com
|
||||
F: doc/device-tree-bindings/mmc/snps,dw-mmc.txt
|
||||
F: drivers/mmc/snps_dw_mmc.c
|
||||
|
||||
ARM
|
||||
M: Albert Aribaud <albert.u.boot@aribaud.net>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/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>
|
||||
S: Maintainted
|
||||
T: git git://git.denx.de/u-boot-socfpga.git
|
||||
F: arch/arm/mach-socfpga/
|
||||
F: arch/arm/cpu/armv7/socfpga/
|
||||
F: board/altera/socfpga/
|
||||
|
||||
ARM AMLOGIC SOC SUPPORT
|
||||
M: Neil Armstrong <narmstrong@baylibre.com>
|
||||
ARM ATMEL AT91
|
||||
M: Andreas Bießmann <andreas@biessmann.org>
|
||||
S: Maintained
|
||||
L: u-boot-amlogic@groups.io
|
||||
T: git git://git.denx.de/u-boot-amlogic.git
|
||||
F: arch/arm/mach-meson/
|
||||
F: arch/arm/include/asm/arch-meson/
|
||||
F: drivers/clk/meson/
|
||||
F: drivers/serial/serial_meson.c
|
||||
F: drivers/reset/reset-meson.c
|
||||
F: drivers/i2c/meson_i2c.c
|
||||
F: drivers/net/phy/meson-gxl.c
|
||||
F: drivers/adc/meson-saradc.c
|
||||
F: drivers/phy/meson*
|
||||
F: drivers/mmc/meson_gx_mmc.c
|
||||
F: drivers/spi/meson_spifc.c
|
||||
F: drivers/pinctrl/meson/
|
||||
F: drivers/power/domain/meson-gx-pwrc-vpu.c
|
||||
F: drivers/video/meson/
|
||||
F: include/configs/meson64.h
|
||||
N: meson
|
||||
T: git git://git.denx.de/u-boot-atmel.git
|
||||
F: arch/arm/mach-at91/
|
||||
|
||||
ARM BROADCOM BCM283X
|
||||
M: Matthias Brugger <mbrugger@suse.com>
|
||||
M: Stephen Warren <swarren@wwwdotorg.org>
|
||||
S: Maintained
|
||||
F: arch/arm/mach-bcm283x/
|
||||
F: drivers/gpio/bcm2835_gpio.c
|
||||
F: drivers/mmc/bcm2835_sdhci.c
|
||||
F: drivers/mmc/bcm2835_sdhost.c
|
||||
F: drivers/serial/serial_bcm283x_mu.c
|
||||
F: drivers/serial/serial_bcm283x_pl011.c
|
||||
F: drivers/video/bcm2835.c
|
||||
F: include/dm/platform_data/serial_bcm283x_mu.h
|
||||
F: drivers/pinctrl/broadcom/
|
||||
|
||||
ARM BROADCOM BCMSTB
|
||||
M: Thomas Fitzsimmons <fitzsim@fitzsim.org>
|
||||
S: Maintained
|
||||
F: arch/arm/mach-bcmstb/
|
||||
F: board/broadcom/bcmstb/
|
||||
F: configs/bcm7*_defconfig
|
||||
F: doc/README.bcm7xxx
|
||||
F: drivers/mmc/bcmstb_sdhci.c
|
||||
F: drivers/spi/bcmstb_spi.c
|
||||
|
||||
ARM/CZ.NIC TURRIS MOX SUPPORT
|
||||
M: Marek Behun <marek.behun@nic.cz>
|
||||
S: Maintained
|
||||
F: arch/arm/dts/armada-3720-turris-mox.dts
|
||||
F: board/CZ.NIC/
|
||||
F: configs/turris_*_defconfig
|
||||
F: include/configs/turris_*.h
|
||||
|
||||
ARM FREESCALE IMX
|
||||
M: Stefano Babic <sbabic@denx.de>
|
||||
M: Fabio Estevam <festevam@gmail.com>
|
||||
R: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-imx.git
|
||||
F: arch/arm/cpu/arm1136/mx*/
|
||||
F: arch/arm/cpu/arm926ejs/mx*/
|
||||
F: arch/arm/cpu/arm926ejs/imx/
|
||||
F: arch/arm/cpu/armv7/mx*/
|
||||
F: arch/arm/cpu/armv7/vf610/
|
||||
F: arch/arm/mach-imx/
|
||||
F: arch/arm/cpu/imx-common/
|
||||
F: arch/arm/include/asm/arch-imx/
|
||||
F: arch/arm/include/asm/arch-mx*/
|
||||
F: arch/arm/include/asm/arch-vf610/
|
||||
F: arch/arm/include/asm/mach-imx/
|
||||
F: arch/arm/include/asm/imx-common/
|
||||
F: board/freescale/*mx*/
|
||||
|
||||
ARM HISILICON
|
||||
M: Peter Griffin <peter.griffin@linaro.org>
|
||||
S: Maintained
|
||||
F: arch/arm/cpu/armv8/hisilicon
|
||||
F: arch/arm/include/asm/arch-hi6220/
|
||||
F: arm/include/asm/arch-hi6220/
|
||||
|
||||
ARM MARVELL KIRKWOOD ARMADA-XP ARMADA-38X ARMADA-37XX ARMADA-7K/8K
|
||||
ARM MARVELL KIRKWOOD ARMADA-XP ARMADA-38X
|
||||
M: Prafulla Wadaskar <prafulla@marvell.com>
|
||||
M: Luka Perkov <luka.perkov@sartura.hr>
|
||||
M: Stefan Roese <sr@denx.de>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-marvell.git
|
||||
F: arch/arm/mach-kirkwood/
|
||||
F: arch/arm/mach-mvebu/
|
||||
F: drivers/ata/ahci_mvebu.c
|
||||
F: drivers/ddr/marvell/
|
||||
F: drivers/gpio/mvebu_gpio.c
|
||||
F: drivers/spi/kirkwood_spi.c
|
||||
F: drivers/pci/pci_mvebu.c
|
||||
F: drivers/pci/pcie_dw_mvebu.c
|
||||
F: drivers/watchdog/orion_wdt.c
|
||||
|
||||
ARM MARVELL PXA
|
||||
M: Marek Vasut <marex@denx.de>
|
||||
@@ -191,99 +126,32 @@ T: git git://git.denx.de/u-boot-pxa.git
|
||||
F: arch/arm/cpu/pxa/
|
||||
F: arch/arm/include/asm/arch-pxa/
|
||||
|
||||
ARM MEDIATEK
|
||||
M: Ryder Lee <ryder.lee@mediatek.com>
|
||||
M: Weijie Gao <weijie.gao@mediatek.com>
|
||||
S: Maintained
|
||||
F: arch/arm/mach-mediatek/
|
||||
F: arch/arm/include/asm/arch-mediatek/
|
||||
F: board/mediatek/
|
||||
F: doc/README.mediatek
|
||||
F: drivers/clk/mediatek/
|
||||
F: drivers/mmc/mtk-sd.c
|
||||
F: drivers/pinctrl/mediatek/
|
||||
F: drivers/power/domain/mtk-power-domain.c
|
||||
F: drivers/ram/mediatek/
|
||||
F: drivers/spi/mtk_qspi.c
|
||||
F: drivers/timer/mtk_timer.c
|
||||
F: drivers/watchdog/mtk_wdt.c
|
||||
F: drivers/net/mtk_eth.c
|
||||
F: drivers/reset/reset-mediatek.c
|
||||
F: tools/mtk_image.c
|
||||
F: tools/mtk_image.h
|
||||
N: mediatek
|
||||
|
||||
ARM MICROCHIP/ATMEL AT91
|
||||
M: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-atmel.git
|
||||
F: arch/arm/mach-at91/
|
||||
F: board/atmel/
|
||||
|
||||
ARM OWL
|
||||
M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
|
||||
S: Maintained
|
||||
F: arch/arm/include/asm/arch-owl/
|
||||
F: arch/arm/mach-owl/
|
||||
F: board/ucRobotics/
|
||||
F: drivers/clk/owl/
|
||||
F: drivers/serial/serial_owl.c
|
||||
|
||||
ARM RENESAS RMOBILE/R-CAR
|
||||
M: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
||||
M: Marek Vasut <marek.vasut+renesas@gmail.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-sh.git
|
||||
F: arch/arm/mach-rmobile/
|
||||
|
||||
ARM ROCKCHIP
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
M: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
||||
M: Kever Yang <kever.yang@rock-chips.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-rockchip.git
|
||||
F: arch/arm/include/asm/arch-rockchip/
|
||||
F: arch/arm/mach-rockchip/
|
||||
F: board/rockchip/
|
||||
F: drivers/clk/rockchip/
|
||||
F: drivers/gpio/rk_gpio.c
|
||||
F: drivers/misc/rockchip-efuse.c
|
||||
F: drivers/mmc/rockchip_sdhci.c
|
||||
F: drivers/mmc/rockchip_dw_mmc.c
|
||||
F: drivers/pinctrl/rockchip/
|
||||
F: drivers/ram/rockchip/
|
||||
F: drivers/sysreset/sysreset_rockchip.c
|
||||
F: drivers/video/rockchip/
|
||||
F: tools/rkcommon.c
|
||||
F: tools/rkcommon.h
|
||||
F: tools/rkimage.c
|
||||
F: tools/rksd.c
|
||||
F: tools/rkspi.c
|
||||
|
||||
ARM SAMSUNG
|
||||
M: Minkyu Kang <mk7.kang@samsung.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-samsung.git
|
||||
F: arch/arm/cpu/arm920t/s3c24x0/
|
||||
F: arch/arm/mach-exynos/
|
||||
F: arch/arm/mach-s5pc1xx/
|
||||
F: arch/arm/cpu/armv7/s5p-common/
|
||||
F: arch/arm/include/asm/arch-s3c24x0/
|
||||
|
||||
ARM SNAPDRAGON
|
||||
M: Ramon Fried <ramon.fried@gmail.com>
|
||||
M: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
|
||||
S: Maintained
|
||||
F: arch/arm/mach-snapdragon/
|
||||
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/smem/msm_smem.c
|
||||
F: drivers/usb/host/ehci-msm.c
|
||||
|
||||
ARM STI
|
||||
M: Patrice Chotard <patrice.chotard@st.com>
|
||||
S: Maintained
|
||||
F: arch/arm/mach-sti/
|
||||
F: arch/arm/include/asm/arch-sti*/
|
||||
|
||||
ARM STM SPEAR
|
||||
#M: Vipin Kumar <vipin.kumar@st.com>
|
||||
@@ -292,27 +160,6 @@ T: git git://git.denx.de/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@st.com>
|
||||
M: Christophe Kerello <christophe.kerello@st.com>
|
||||
M: Patrice Chotard <patrice.chotard@st.com>
|
||||
L: uboot-stm32@st-md-mailman.stormreply.com (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: arch/arm/mach-stm32mp/
|
||||
F: drivers/clk/clk_stm32mp1.c
|
||||
F: drivers/i2c/stm32f7_i2c.c
|
||||
F: drivers/misc/stm32mp_fuse.c
|
||||
F: drivers/mmc/stm32_sdmmc2.c
|
||||
F: drivers/phy/phy-stm32-usbphyc.c
|
||||
F: drivers/pinctrl/pinctrl_stm32.c
|
||||
F: drivers/power/pmic/stpmic1.c
|
||||
F: drivers/power/regulator/stm32-vrefbuf.c
|
||||
F: drivers/power/regulator/stpmic1.c
|
||||
F: drivers/ram/stm32mp1/
|
||||
F: drivers/misc/stm32_rcc.c
|
||||
F: drivers/reset/stm32-reset.c
|
||||
F: drivers/spi/stm32_qspi.c
|
||||
|
||||
ARM STM STV0991
|
||||
M: Vikas Manocha <vikas.manocha@st.com>
|
||||
S: Maintained
|
||||
@@ -320,14 +167,12 @@ F: arch/arm/cpu/armv7/stv0991/
|
||||
F: arch/arm/include/asm/arch-stv0991/
|
||||
|
||||
ARM SUNXI
|
||||
M: Jagan Teki <jagan@amarulasolutions.com>
|
||||
M: Maxime Ripard <maxime.ripard@bootlin.com>
|
||||
M: Ian Campbell <ijc@hellion.org.uk>
|
||||
M: Hans De Goede <hdegoede@redhat.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/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/
|
||||
|
||||
ARM TEGRA
|
||||
M: Tom Warren <twarren@nvidia.com>
|
||||
@@ -341,8 +186,9 @@ M: Tom Rini <trini@konsulko.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-ti.git
|
||||
F: arch/arm/mach-davinci/
|
||||
F: arch/arm/mach-k3/
|
||||
F: arch/arm/mach-keystone/
|
||||
F: arch/arm/cpu/arm926ejs/omap/
|
||||
F: arch/arm/cpu/armv7/omap*/
|
||||
F: arch/arm/include/asm/arch-omap*/
|
||||
F: arch/arm/include/asm/ti-common/
|
||||
|
||||
@@ -354,79 +200,29 @@ F: arch/arm/mach-uniphier/
|
||||
F: configs/uniphier_*_defconfig
|
||||
N: uniphier
|
||||
|
||||
ARM VERSAL
|
||||
M: Michal Simek <michal.simek@xilinx.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-microblaze.git
|
||||
F: arch/arm/mach-versal/
|
||||
|
||||
ARM VERSATILE EXPRESS DRIVERS
|
||||
M: Liviu Dudau <liviu.dudau@foss.arm.com>
|
||||
S: Maintained
|
||||
T: git git://github.com/ARM-software/u-boot.git
|
||||
F: drivers/misc/vexpress_config.c
|
||||
N: vexpress
|
||||
|
||||
ARM ZYNQ
|
||||
M: Michal Simek <monstr@monstr.eu>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-microblaze.git
|
||||
F: arch/arm/mach-zynq/
|
||||
F: drivers/clk/clk_zynq.c
|
||||
F: drivers/fpga/zynqpl.c
|
||||
F: drivers/gpio/zynq_gpio.c
|
||||
F: drivers/i2c/i2c-cdns.c
|
||||
F: drivers/i2c/muxes/pca954x.c
|
||||
F: drivers/i2c/zynq_i2c.c
|
||||
F: drivers/mmc/zynq_sdhci.c
|
||||
F: drivers/mtd/nand/raw/zynq_nand.c
|
||||
F: drivers/net/phy/xilinx_phy.c
|
||||
F: drivers/net/zynq_gem.c
|
||||
F: drivers/serial/serial_zynq.c
|
||||
F: drivers/spi/zynq_qspi.c
|
||||
F: drivers/spi/zynq_spi.c
|
||||
F: drivers/usb/host/ehci-zynq.c
|
||||
F: drivers/watchdog/cdns_wdt.c
|
||||
F: include/zynqpl.h
|
||||
F: tools/zynqimage.c
|
||||
N: zynq
|
||||
F: arch/arm/cpu/armv7/zynq/
|
||||
F: arch/arm/include/asm/arch-zynq/
|
||||
|
||||
ARM ZYNQMP
|
||||
M: Michal Simek <michal.simek@xilinx.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-microblaze.git
|
||||
F: arch/arm/mach-zynqmp/
|
||||
F: drivers/clk/clk_zynqmp.c
|
||||
F: drivers/fpga/zynqpl.c
|
||||
F: drivers/gpio/zynq_gpio.c
|
||||
F: drivers/i2c/i2c-cdns.c
|
||||
F: drivers/i2c/muxes/pca954x.c
|
||||
F: drivers/i2c/zynq_i2c.c
|
||||
F: drivers/mmc/zynq_sdhci.c
|
||||
F: drivers/mtd/nand/raw/zynq_nand.c
|
||||
F: drivers/net/phy/xilinx_phy.c
|
||||
F: drivers/net/zynq_gem.c
|
||||
F: drivers/serial/serial_zynq.c
|
||||
F: drivers/spi/zynq_qspi.c
|
||||
F: drivers/spi/zynq_spi.c
|
||||
F: drivers/timer/cadence-ttc.c
|
||||
F: drivers/usb/host/ehci-zynq.c
|
||||
F: drivers/watchdog/cdns_wdt.c
|
||||
F: include/zynqmppl.h
|
||||
F: tools/zynqmp*
|
||||
N: ultra96
|
||||
N: zynqmp
|
||||
F: arch/arm/cpu/armv8/zynqmp/
|
||||
F: arch/arm/include/asm/arch-zynqmp/
|
||||
|
||||
ARM ZYNQMP R5
|
||||
M: Michal Simek <michal.simek@xilinx.com>
|
||||
AVR32
|
||||
M: Andreas Bießmann <andreas@biessmann.org>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-microblaze.git
|
||||
F: arch/arm/mach-zynqmp-r5/
|
||||
T: git git://git.denx.de/u-boot-avr32.git
|
||||
F: arch/avr32/
|
||||
|
||||
BINMAN
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
BLACKFIN
|
||||
M: Sonic Zhang <sonic.adi@gmail.com>
|
||||
S: Maintained
|
||||
F: tools/binman/
|
||||
T: git git://git.denx.de/u-boot-blackfin.git
|
||||
F: arch/blackfin/
|
||||
|
||||
BUILDMAN
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
@@ -441,21 +237,16 @@ F: drivers/mtd/cfi_flash.c
|
||||
F: drivers/mtd/jedec_flash.c
|
||||
|
||||
COLDFIRE
|
||||
M: Huan Wang <alison.wang@nxp.com>
|
||||
M: Huan Wang <alison.wang@freescale.com>
|
||||
M: Angelo Dureghello <angelo@sysam.it>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-coldfire.git
|
||||
F: arch/m68k/
|
||||
|
||||
DFU
|
||||
M: Lukasz Majewski <lukma@denx.de>
|
||||
M: Lukasz Majewski <l.majewski@samsung.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/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: drivers/dfu/
|
||||
F: drivers/usb/gadget/
|
||||
|
||||
@@ -468,36 +259,11 @@ F: include/dm/
|
||||
F: test/dm/
|
||||
|
||||
EFI PAYLOAD
|
||||
M: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
R: Alexander Graf <agraf@csgraf.de>
|
||||
M: Alexander Graf <agraf@suse.de>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-efi.git
|
||||
F: doc/README.uefi
|
||||
F: doc/README.iscsi
|
||||
F: Documentation/efi.rst
|
||||
F: include/capitalization.h
|
||||
F: include/charset.h
|
||||
F: include/cp1250.h
|
||||
F: include/cp437.h
|
||||
F: include/efi*
|
||||
F: include/pe.h
|
||||
F: include/asm-generic/pe.h
|
||||
F: lib/charset.c
|
||||
F: lib/efi*/
|
||||
F: test/py/tests/test_efi*
|
||||
F: test/unicode_ut.c
|
||||
F: include/efi_loader.h
|
||||
F: lib/efi_loader/
|
||||
F: cmd/bootefi.c
|
||||
F: cmd/efidebug.c
|
||||
F: cmd/nvedit_efi.c
|
||||
F: tools/file2include.c
|
||||
|
||||
FPGA
|
||||
M: Michal Simek <michal.simek@xilinx.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-microblaze.git
|
||||
F: drivers/fpga/
|
||||
F: cmd/fpga.c
|
||||
F: include/fpga.h
|
||||
|
||||
FLATTENED DEVICE TREE
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
@@ -506,8 +272,8 @@ T: git git://git.denx.de/u-boot-fdt.git
|
||||
F: lib/fdtdec*
|
||||
F: lib/libfdt/
|
||||
F: include/fdt*
|
||||
F: include/linux/libfdt*
|
||||
F: cmd/fdt.c
|
||||
F: include/libfdt*
|
||||
F. common/cmd_fdt.c
|
||||
F: common/fdt_support.c
|
||||
|
||||
FREEBSD
|
||||
@@ -516,7 +282,7 @@ S: Maintained
|
||||
T: git git://git.denx.de/u-boot-freebsd.git
|
||||
|
||||
FREESCALE QORIQ
|
||||
M: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
|
||||
M: York Sun <york.sun@nxp.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-fsl-qoriq.git
|
||||
|
||||
@@ -526,36 +292,11 @@ S: Maintained
|
||||
T: git git://git.denx.de/u-boot-i2c.git
|
||||
F: drivers/i2c/
|
||||
|
||||
LOGGING
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot.git
|
||||
F: common/log.c
|
||||
F: cmd/log.c
|
||||
F: test/log/log_test.c
|
||||
F: test/py/tests/test_log.py
|
||||
|
||||
MALI DISPLAY PROCESSORS
|
||||
M: Liviu Dudau <liviu.dudau@foss.arm.com>
|
||||
S: Supported
|
||||
T: git git://github.com/ARM-software/u-boot.git
|
||||
F: drivers/video/mali_dp.c
|
||||
F: drivers/i2c/i2c-versatile.c
|
||||
|
||||
MICROBLAZE
|
||||
M: Michal Simek <monstr@monstr.eu>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-microblaze.git
|
||||
F: arch/microblaze/
|
||||
F: cmd/mfsl.c
|
||||
F: drivers/gpio/xilinx_gpio.c
|
||||
F: drivers/net/xilinx_axi_emac.c
|
||||
F: drivers/net/xilinx_emaclite.c
|
||||
F: drivers/serial/serial_xuartlite.c
|
||||
F: drivers/spi/xilinx_spi.c
|
||||
F: drivers/sysreset/sysreset_gpio.c
|
||||
F: drivers/watchdog/xilinx_tb_wdt.c
|
||||
N: xilinx
|
||||
|
||||
MIPS
|
||||
M: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
|
||||
@@ -563,48 +304,69 @@ S: Maintained
|
||||
T: git git://git.denx.de/u-boot-mips.git
|
||||
F: arch/mips/
|
||||
|
||||
MIPS MSCC
|
||||
M: Gregory CLEMENT <gregory.clement@bootlin.com>
|
||||
M: Lars Povlsen <lars.povlsen@microchip.com>
|
||||
M: Horatiu Vultur <horatiu.vultur@microchip.com>
|
||||
S: Maintained
|
||||
F: arch/mips/mach-mscc/
|
||||
F: arch/mips/dts/luton*
|
||||
F: arch/mips/dts/mscc*
|
||||
F: arch/mips/dts/ocelot*
|
||||
F: arch/mips/dts/jr2*
|
||||
F: arch/mips/dts/serval*
|
||||
F: board/mscc/
|
||||
F: configs/mscc*
|
||||
F: drivers/gpio/mscc_sgpio.c
|
||||
F: drivers/spi/mscc_bb_spi.c
|
||||
F: include/configs/vcoreiii.h
|
||||
F: include/dt-bindings/mscc/
|
||||
F: drivers/pinctrl/mscc/
|
||||
F: drivers/net/mscc_eswitch/
|
||||
|
||||
MIPS JZ4780
|
||||
M: Ezequiel Garcia <ezequiel@collabora.com>
|
||||
S: Maintained
|
||||
F: arch/mips/mach-jz47xx/
|
||||
|
||||
MMC
|
||||
M: Peng Fan <peng.fan@nxp.com>
|
||||
M: Jaehoon Chung <jh80.chung@samsung.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-mmc.git
|
||||
F: drivers/mmc/
|
||||
|
||||
NAND FLASH
|
||||
#M: Scott Wood <oss@buserror.net>
|
||||
S: Orphaned (Since 2018-07)
|
||||
T: git git://git.denx.de/u-boot-nand-flash.git
|
||||
F: drivers/mtd/nand/raw/
|
||||
|
||||
NDS32
|
||||
M: Macpaul Lin <macpaul@andestech.com>
|
||||
OPENRISC
|
||||
M: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-nds32.git
|
||||
F: arch/nds32/
|
||||
F: arch/openrisc/
|
||||
|
||||
PATMAN
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
F: tools/patman/
|
||||
|
||||
POWERPC
|
||||
M: Wolfgang Denk <wd@denx.de>
|
||||
S: Maintained
|
||||
F: arch/powerpc/
|
||||
|
||||
POWERPC MPC5XXX
|
||||
M: Wolfgang Denk <wd@denx.de>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-mpc5xxx.git
|
||||
F: arch/powerpc/cpu/mpc5*/
|
||||
|
||||
POWERPC MPC8XX
|
||||
M: Wolfgang Denk <wd@denx.de>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-mpc8xx.git
|
||||
F: arch/powerpc/cpu/mpc8xx/
|
||||
|
||||
POWERPC MPC82XX
|
||||
M: Wolfgang Denk <wd@denx.de>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-mpc82xx.git
|
||||
F: arch/powerpc/cpu/mpc82*/
|
||||
|
||||
POWERPC MPC83XX
|
||||
#M: Kim Phillips <kim.phillips@freescale.com>
|
||||
S: Orphaned (Since 2016-02)
|
||||
T: git git://git.denx.de/u-boot-mpc83xx.git
|
||||
F: arch/powerpc/cpu/mpc83xx/
|
||||
F: arch/powerpc/include/asm/arch-mpc83xx/
|
||||
|
||||
POWERPC MPC85XX
|
||||
M: York Sun <york.sun@nxp.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-mpc85xx.git
|
||||
F: arch/powerpc/cpu/mpc85xx/
|
||||
|
||||
POWERPC MPC86XX
|
||||
M: York Sun <york.sun@nxp.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-mpc86xx.git
|
||||
F: arch/powerpc/cpu/mpc86xx/
|
||||
|
||||
POWERPC PPC4XX
|
||||
M: Stefan Roese <sr@denx.de>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-ppc4xx.git
|
||||
F: arch/powerpc/cpu/ppc4xx/
|
||||
|
||||
NETWORK
|
||||
M: Joe Hershberger <joe.hershberger@ni.com>
|
||||
@@ -613,6 +375,18 @@ T: git git://git.denx.de/u-boot-net.git
|
||||
F: drivers/net/
|
||||
F: net/
|
||||
|
||||
NAND FLASH
|
||||
M: Scott Wood <oss@buserror.net>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-nand-flash.git
|
||||
F: drivers/mtd/nand/
|
||||
|
||||
NDS32
|
||||
M: Macpaul Lin <macpaul@andestech.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-nds32.git
|
||||
F: arch/nds32/
|
||||
|
||||
NIOS
|
||||
M: Thomas Chou <thomas@wytron.com.tw>
|
||||
S: Maintained
|
||||
@@ -620,78 +394,11 @@ T: git git://git.denx.de/u-boot-nios.git
|
||||
F: arch/nios2/
|
||||
|
||||
ONENAND
|
||||
#M: Lukasz Majewski <l.majewski@majess.pl>
|
||||
S: Orphaned (Since 2017-01)
|
||||
M: Lukasz Majewski <l.majewski@samsung.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-onenand.git
|
||||
F: drivers/mtd/onenand/
|
||||
|
||||
PATMAN
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
F: tools/patman/
|
||||
|
||||
POWER
|
||||
M: Jaehoon Chung <jh80.chung@samsung.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-pmic.git
|
||||
F: drivers/power/
|
||||
|
||||
POWERPC
|
||||
M: Wolfgang Denk <wd@denx.de>
|
||||
S: Maintained
|
||||
F: arch/powerpc/
|
||||
|
||||
POWERPC MPC8XX
|
||||
M: Christophe Leroy <christophe.leroy@c-s.fr>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-mpc8xx.git
|
||||
F: arch/powerpc/cpu/mpc8xx/
|
||||
|
||||
POWERPC MPC83XX
|
||||
M: Mario Six <mario.six@gdsys.cc>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-mpc83xx.git
|
||||
F: drivers/ram/mpc83xx_sdram.c
|
||||
F: include/dt-bindings/memory/mpc83xx-sdram.h
|
||||
F: drivers/sysreset/sysreset_mpc83xx.c
|
||||
F: drivers/sysreset/sysreset_mpc83xx.h
|
||||
F: drivers/clk/mpc83xx_clk.c
|
||||
F: drivers/clk/mpc83xx_clk.h
|
||||
F: include/dt-bindings/clk/mpc83xx-clk.h
|
||||
F: drivers/timer/mpc83xx_timer.c
|
||||
F: drivers/cpu/mpc83xx_cpu.c
|
||||
F: drivers/cpu/mpc83xx_cpu.h
|
||||
F: drivers/misc/mpc83xx_serdes.c
|
||||
F: arch/powerpc/cpu/mpc83xx/
|
||||
F: arch/powerpc/include/asm/arch-mpc83xx/
|
||||
|
||||
POWERPC MPC85XX
|
||||
M: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-mpc85xx.git
|
||||
F: arch/powerpc/cpu/mpc85xx/
|
||||
|
||||
POWERPC MPC86XX
|
||||
M: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-mpc86xx.git
|
||||
F: arch/powerpc/cpu/mpc86xx/
|
||||
|
||||
RISC-V
|
||||
M: Rick Chen <rick@andestech.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-riscv.git
|
||||
F: arch/riscv/
|
||||
F: cmd/riscv/
|
||||
F: tools/prelink-riscv.c
|
||||
|
||||
ROCKUSB
|
||||
M: Eddie Cai <eddie.cai.linux@gmail.com>
|
||||
S: Maintained
|
||||
F: drivers/usb/gadget/f_rockusb.c
|
||||
F: cmd/rockusb.c
|
||||
F: doc/README.rockusb
|
||||
|
||||
SANDBOX
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
S: Maintained
|
||||
@@ -703,67 +410,31 @@ S: Maintained
|
||||
T: git git://git.denx.de/u-boot-sh.git
|
||||
F: arch/sh/
|
||||
|
||||
SPARC
|
||||
#M: Francois Retief <fgretief@spaceteq.co.za>
|
||||
S: Orphaned (Since 2016-02)
|
||||
T: git git://git.denx.de/u-boot-sparc.git
|
||||
F: arch/sparc/
|
||||
|
||||
SPI
|
||||
M: Jagan Teki <jagan@amarulasolutions.com>
|
||||
M: Jagan Teki <jteki@openedev.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-spi.git
|
||||
F: drivers/mtd/spi/
|
||||
F: drivers/spi/
|
||||
F: include/spi*
|
||||
|
||||
SPI-NOR
|
||||
M: Jagan Teki <jagan@amarulasolutions.com>
|
||||
M: Vignesh R <vigneshr@ti.com>
|
||||
S: Maintained
|
||||
F: drivers/mtd/spi/
|
||||
F: include/spi_flash.h
|
||||
F: include/linux/mtd/cfi.h
|
||||
F: include/linux/mtd/spi-nor.h
|
||||
|
||||
SPMI
|
||||
M: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
|
||||
S: Maintained
|
||||
F: drivers/spmi/
|
||||
F: include/spmi/
|
||||
|
||||
TDA19988 HDMI ENCODER
|
||||
M: Liviu Dudau <liviu.dudau@foss.arm.com>
|
||||
S: Maintained
|
||||
F: drivers/video/tda19988.c
|
||||
|
||||
TI SYSTEM SECURITY
|
||||
M: Andrew F. Davis <afd@ti.com>
|
||||
S: Supported
|
||||
F: arch/arm/mach-omap2/omap5/sec_entry_cpu1.S
|
||||
F: arch/arm/mach-omap2/sec-common.c
|
||||
F: arch/arm/mach-omap2/config_secure.mk
|
||||
F: arch/arm/mach-k3/security.c
|
||||
F: arch/arm/mach-k3/config_secure.mk
|
||||
F: configs/am335x_hs_evm_defconfig
|
||||
F: configs/am335x_hs_evm_uart_defconfig
|
||||
F: configs/am43xx_hs_evm_defconfig
|
||||
F: configs/am57xx_hs_evm_defconfig
|
||||
F: configs/am57xx_hs_evm_usb_defconfig
|
||||
F: configs/dra7xx_hs_evm_defconfig
|
||||
F: configs/dra7xx_hs_evm_usb_defconfig
|
||||
F: configs/k2hk_hs_evm_defconfig
|
||||
F: configs/k2e_hs_evm_defconfig
|
||||
F: configs/k2g_hs_evm_defconfig
|
||||
F: configs/k2l_hs_evm_defconfig
|
||||
F: configs/am65x_hs_evm_r5_defconfig
|
||||
F: configs/am65x_hs_evm_a53_defconfig
|
||||
|
||||
TQ GROUP
|
||||
#M: Martin Krause <martin.krause@tq-systems.de>
|
||||
S: Orphaned (Since 2016-02)
|
||||
T: git git://git.denx.de/u-boot-tq-group.git
|
||||
|
||||
TEE
|
||||
M: Jens Wiklander <jens.wiklander@linaro.org>
|
||||
S: Maintained
|
||||
F: drivers/tee/
|
||||
F: include/tee.h
|
||||
F: include/tee/
|
||||
|
||||
UBI
|
||||
M: Kyungmin Park <kmpark@infradead.org>
|
||||
M: Heiko Schocher <hs@denx.de>
|
||||
@@ -777,28 +448,17 @@ S: Maintained
|
||||
T: git git://git.denx.de/u-boot-usb.git
|
||||
F: drivers/usb/
|
||||
|
||||
USB xHCI
|
||||
M: Bin Meng <bmeng.cn@gmail.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-usb.git topic-xhci
|
||||
F: drivers/usb/host/xhci*
|
||||
|
||||
VIDEO
|
||||
M: Anatolij Gustschin <agust@denx.de>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-video.git
|
||||
F: drivers/video/
|
||||
F: common/lcd*.c
|
||||
F: include/lcd*.h
|
||||
F: include/video*.h
|
||||
|
||||
X86
|
||||
M: Simon Glass <sjg@chromium.org>
|
||||
M: Bin Meng <bmeng.cn@gmail.com>
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot-x86.git
|
||||
F: arch/x86/
|
||||
F: cmd/x86/
|
||||
|
||||
XTENSA
|
||||
M: Max Filippov <jcmvbkbc@gmail.com>
|
||||
@@ -811,6 +471,5 @@ L: u-boot@lists.denx.de
|
||||
Q: http://patchwork.ozlabs.org/project/uboot/list/
|
||||
S: Maintained
|
||||
T: git git://git.denx.de/u-boot.git
|
||||
F: configs/tools-only_defconfig
|
||||
F: *
|
||||
F: */
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
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.
|
||||
|
||||
endmenu
|
||||
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# (C) Copyright 2007 Semihalf
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
obj-y += api.o api_display.o api_net.o api_storage.o
|
||||
obj-$(CONFIG_ARM) += api_platform-arm.o
|
||||
|
||||
71
api/api.c
71
api/api.c
@@ -1,8 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2007 Semihalf
|
||||
*
|
||||
* Written by: Rafal Jaworowski <raj@semihalf.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@@ -457,7 +458,7 @@ static int API_env_get(va_list ap)
|
||||
if ((value = (char **)va_arg(ap, uintptr_t)) == NULL)
|
||||
return API_EINVAL;
|
||||
|
||||
*value = env_get(name);
|
||||
*value = getenv(name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -480,7 +481,7 @@ static int API_env_set(va_list ap)
|
||||
if ((value = (char *)va_arg(ap, uintptr_t)) == NULL)
|
||||
return API_EINVAL;
|
||||
|
||||
env_set(name, value);
|
||||
setenv(name, value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -494,47 +495,45 @@ static int API_env_set(va_list ap)
|
||||
*/
|
||||
static int API_env_enum(va_list ap)
|
||||
{
|
||||
int i, buflen;
|
||||
char *last, **next, *s;
|
||||
ENTRY *match, search;
|
||||
static char *var;
|
||||
int i, n;
|
||||
char *last, **next;
|
||||
|
||||
last = (char *)va_arg(ap, unsigned long);
|
||||
|
||||
if ((next = (char **)va_arg(ap, uintptr_t)) == NULL)
|
||||
return API_EINVAL;
|
||||
|
||||
if (last == NULL) {
|
||||
var = NULL;
|
||||
i = 0;
|
||||
} else {
|
||||
var = strdup(last);
|
||||
s = strchr(var, '=');
|
||||
if (s != NULL)
|
||||
*s = 0;
|
||||
search.key = var;
|
||||
i = hsearch_r(search, FIND, &match, &env_htab, 0);
|
||||
if (i == 0) {
|
||||
i = API_EINVAL;
|
||||
goto done;
|
||||
if (last == NULL)
|
||||
/* start over */
|
||||
*next = ((char *)env_get_addr(0));
|
||||
else {
|
||||
*next = last;
|
||||
|
||||
for (i = 0; env_get_char(i) != '\0'; i = n + 1) {
|
||||
for (n = i; env_get_char(n) != '\0'; ++n) {
|
||||
if (n >= CONFIG_ENV_SIZE) {
|
||||
/* XXX shouldn't we set *next = NULL?? */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (envmatch((uchar *)last, i) < 0)
|
||||
continue;
|
||||
|
||||
/* try to get next name */
|
||||
i = n + 1;
|
||||
if (env_get_char(i) == '\0') {
|
||||
/* no more left */
|
||||
*next = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
*next = ((char *)env_get_addr(i));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* match the next entry after i */
|
||||
i = hmatch_r("", i, &match, &env_htab);
|
||||
if (i == 0)
|
||||
goto done;
|
||||
buflen = strlen(match->key) + strlen(match->data) + 2;
|
||||
var = realloc(var, buflen);
|
||||
snprintf(var, buflen, "%s=%s", match->key, match->data);
|
||||
*next = var;
|
||||
return 0;
|
||||
|
||||
done:
|
||||
free(var);
|
||||
var = NULL;
|
||||
*next = NULL;
|
||||
return i;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -624,7 +623,7 @@ int syscall(int call, int *retval, ...)
|
||||
|
||||
void api_init(void)
|
||||
{
|
||||
struct api_signature *sig;
|
||||
struct api_signature *sig = NULL;
|
||||
|
||||
/* TODO put this into linker set one day... */
|
||||
calls_table[API_RSVD] = NULL;
|
||||
@@ -662,7 +661,7 @@ void api_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
env_set_hex("api_address", (unsigned long)sig);
|
||||
setenv_hex("api_address", (unsigned long)sig);
|
||||
debugf("API sig @ 0x%lX\n", (unsigned long)sig);
|
||||
memcpy(sig->magic, API_SIG_MAGIC, 8);
|
||||
sig->version = API_SIG_VERSION;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (c) 2011 The Chromium OS Authors.
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2007 Semihalf
|
||||
*
|
||||
* Written by: Rafal Jaworowski <raj@semihalf.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@@ -11,6 +12,8 @@
|
||||
#include <linux/types.h>
|
||||
#include <api_public.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define DEBUG
|
||||
#undef DEBUG
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2007 Semihalf
|
||||
*
|
||||
* Written by: Rafal Jaworowski <raj@semihalf.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* This file contains routines that fetch data from ARM-dependent sources
|
||||
* (bd_info etc.)
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2007 Stanislav Galabov <sgalabov@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* This file contains routines that fetch data from bd_info sources
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2007 Semihalf
|
||||
*
|
||||
* Written by: Rafal Jaworowski <raj@semihalf.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* This file contains routines that fetch data from PowerPC-dependent sources
|
||||
* (bd_info etc.)
|
||||
*/
|
||||
@@ -29,8 +30,11 @@ int platform_sys_info(struct sys_info *si)
|
||||
si->clk_bus = gd->bus_clk;
|
||||
si->clk_cpu = gd->cpu_clk;
|
||||
|
||||
#if defined(CONFIG_MPC8xx) || defined(CONFIG_E500) || defined(CONFIG_MPC86xx)
|
||||
#if defined(CONFIG_5xx) || defined(CONFIG_8xx) || defined(CONFIG_MPC8260) || \
|
||||
defined(CONFIG_E500) || defined(CONFIG_MPC86xx)
|
||||
#define bi_bar bi_immr_base
|
||||
#elif defined(CONFIG_MPC5xxx)
|
||||
#define bi_bar bi_mbar_base
|
||||
#elif defined(CONFIG_MPC83xx)
|
||||
#define bi_bar bi_immrbar
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* (C) Copyright 2007 Semihalf
|
||||
*
|
||||
* Written by: Rafal Jaworowski <raj@semihalf.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef _API_PRIVATE_H_
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2007-2008 Semihalf
|
||||
*
|
||||
* Written by: Rafal Jaworowski <raj@semihalf.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@@ -36,19 +37,16 @@ struct stor_spec {
|
||||
int max_dev;
|
||||
int enum_started;
|
||||
int enum_ended;
|
||||
int type; /* "external" type: DT_STOR_{IDE,USB,etc} */
|
||||
int type; /* "external" type: DT_STOR_{IDE,USB,etc} */
|
||||
char *name;
|
||||
};
|
||||
|
||||
static struct stor_spec specs[ENUM_MAX] = { { 0, 0, 0, 0, NULL }, };
|
||||
static struct stor_spec specs[ENUM_MAX] = { { 0, 0, 0, 0, "" }, };
|
||||
|
||||
#ifndef CONFIG_SYS_MMC_MAX_DEVICE
|
||||
#define CONFIG_SYS_MMC_MAX_DEVICE 1
|
||||
#endif
|
||||
|
||||
void dev_stor_init(void)
|
||||
{
|
||||
#if defined(CONFIG_IDE)
|
||||
#if defined(CONFIG_CMD_IDE)
|
||||
specs[ENUM_IDE].max_dev = CONFIG_SYS_IDE_MAXDEVICE;
|
||||
specs[ENUM_IDE].enum_started = 0;
|
||||
specs[ENUM_IDE].enum_ended = 0;
|
||||
@@ -62,7 +60,7 @@ void dev_stor_init(void)
|
||||
specs[ENUM_MMC].type = DEV_TYP_STOR | DT_STOR_MMC;
|
||||
specs[ENUM_MMC].name = "mmc";
|
||||
#endif
|
||||
#if defined(CONFIG_SATA)
|
||||
#if defined(CONFIG_CMD_SATA)
|
||||
specs[ENUM_SATA].max_dev = CONFIG_SYS_SATA_MAX_DEVICE;
|
||||
specs[ENUM_SATA].enum_started = 0;
|
||||
specs[ENUM_SATA].enum_ended = 0;
|
||||
@@ -90,72 +88,88 @@ void dev_stor_init(void)
|
||||
*
|
||||
* type: storage group type - ENUM_IDE, ENUM_SCSI etc.
|
||||
*
|
||||
* first: if 1 the first device in the storage group is returned (if
|
||||
* exists), if 0 the next available device is searched
|
||||
*
|
||||
* more: returns 0/1 depending if there are more devices in this group
|
||||
* available (for future iterations)
|
||||
*
|
||||
* returns: 0/1 depending if device found in this iteration
|
||||
*/
|
||||
static int dev_stor_get(int type, int *more, struct device_info *di)
|
||||
static int dev_stor_get(int type, int first, int *more, struct device_info *di)
|
||||
{
|
||||
struct blk_desc *dd;
|
||||
int found = 0;
|
||||
int found_last = 0;
|
||||
int i = 0;
|
||||
*more = 0;
|
||||
|
||||
/* Wasn't configured for this type, return 0 directly */
|
||||
if (specs[type].name == NULL)
|
||||
return 0;
|
||||
int i;
|
||||
|
||||
if (di->cookie != NULL) {
|
||||
/* Find the last device we've returned */
|
||||
for (i = 0; i < specs[type].max_dev; i++) {
|
||||
struct blk_desc *dd;
|
||||
|
||||
if (first) {
|
||||
di->cookie = (void *)blk_get_dev(specs[type].name, 0);
|
||||
if (di->cookie == NULL)
|
||||
return 0;
|
||||
else
|
||||
found = 1;
|
||||
|
||||
/* provide hint if there are more devices in
|
||||
* this group to enumerate */
|
||||
if (1 < specs[type].max_dev)
|
||||
*more = 1;
|
||||
|
||||
} else {
|
||||
for (i = 0; i < specs[type].max_dev; i++)
|
||||
if (di->cookie ==
|
||||
(void *)blk_get_dev(specs[type].name, i)) {
|
||||
i += 1;
|
||||
found_last = 1;
|
||||
/* previous cookie found -- advance to the
|
||||
* next device, if possible */
|
||||
|
||||
if (++i >= specs[type].max_dev) {
|
||||
/* out of range, no more to enum */
|
||||
di->cookie = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
di->cookie = (void *)blk_get_dev(
|
||||
specs[type].name, i);
|
||||
if (di->cookie == NULL)
|
||||
return 0;
|
||||
else
|
||||
found = 1;
|
||||
|
||||
/* provide hint if there are more devices in
|
||||
* this group to enumerate */
|
||||
if ((i + 1) < specs[type].max_dev)
|
||||
*more = 1;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found_last)
|
||||
i = 0;
|
||||
}
|
||||
|
||||
for (; i < specs[type].max_dev; i++) {
|
||||
di->cookie = (void *)blk_get_dev(specs[type].name, i);
|
||||
|
||||
if (di->cookie != NULL) {
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == specs[type].max_dev)
|
||||
*more = 0;
|
||||
else
|
||||
*more = 1;
|
||||
|
||||
if (found) {
|
||||
di->type = specs[type].type;
|
||||
|
||||
dd = (struct blk_desc *)di->cookie;
|
||||
if (dd->type == DEV_TYPE_UNKNOWN) {
|
||||
debugf("device instance exists, but is not active..");
|
||||
found = 0;
|
||||
} else {
|
||||
di->di_stor.block_count = dd->lba;
|
||||
di->di_stor.block_size = dd->blksz;
|
||||
if (di->cookie != NULL) {
|
||||
dd = (struct blk_desc *)di->cookie;
|
||||
if (dd->type == DEV_TYPE_UNKNOWN) {
|
||||
debugf("device instance exists, but is not active..");
|
||||
found = 0;
|
||||
} else {
|
||||
di->di_stor.block_count = dd->lba;
|
||||
di->di_stor.block_size = dd->blksz;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
} else
|
||||
di->cookie = NULL;
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
|
||||
/* returns: ENUM_IDE, ENUM_USB etc. based on struct blk_desc */
|
||||
|
||||
/*
|
||||
* returns: ENUM_IDE, ENUM_USB etc. based on struct blk_desc
|
||||
*/
|
||||
static int dev_stor_type(struct blk_desc *dd)
|
||||
{
|
||||
int i, j;
|
||||
@@ -169,8 +183,9 @@ static int dev_stor_type(struct blk_desc *dd)
|
||||
}
|
||||
|
||||
|
||||
/* returns: 0/1 whether cookie points to some device in this group */
|
||||
|
||||
/*
|
||||
* returns: 0/1 whether cookie points to some device in this group
|
||||
*/
|
||||
static int dev_is_stor(int type, struct device_info *di)
|
||||
{
|
||||
return (dev_stor_type(di->cookie) == type) ? 1 : 0;
|
||||
@@ -201,16 +216,18 @@ static int dev_enum_stor(int type, struct device_info *di)
|
||||
*/
|
||||
|
||||
if (di->cookie == NULL) {
|
||||
|
||||
debugf("group%d - enum restart\n", type);
|
||||
|
||||
/*
|
||||
* 1. Enumeration (re-)started: take the first available
|
||||
* device, if exists
|
||||
*/
|
||||
found = dev_stor_get(type, &more, di);
|
||||
found = dev_stor_get(type, 1, &more, di);
|
||||
specs[type].enum_started = 1;
|
||||
|
||||
} else if (dev_is_stor(type, di)) {
|
||||
|
||||
debugf("group%d - enum continued for the next device\n", type);
|
||||
|
||||
if (specs[type].enum_ended) {
|
||||
@@ -219,9 +236,10 @@ static int dev_enum_stor(int type, struct device_info *di)
|
||||
}
|
||||
|
||||
/* 2a. Attempt to take a next available device in the group */
|
||||
found = dev_stor_get(type, &more, di);
|
||||
found = dev_stor_get(type, 0, &more, di);
|
||||
|
||||
} else {
|
||||
|
||||
if (specs[type].enum_ended) {
|
||||
debugf("group %d - already enumerated, skipping\n", type);
|
||||
return 0;
|
||||
@@ -233,7 +251,7 @@ static int dev_enum_stor(int type, struct device_info *di)
|
||||
/*
|
||||
* 2b. If enumerating devices in this group did not
|
||||
* happen before, it means the cookie pointed to a
|
||||
* device from some other group (another storage
|
||||
* device frome some other group (another storage
|
||||
* group, or network); in this case try to take the
|
||||
* first available device from our group
|
||||
*/
|
||||
@@ -243,7 +261,7 @@ static int dev_enum_stor(int type, struct device_info *di)
|
||||
* Attempt to take the first device in this group:
|
||||
*'first element' flag is set
|
||||
*/
|
||||
found = dev_stor_get(type, &more, di);
|
||||
found = dev_stor_get(type, 1, &more, di);
|
||||
|
||||
} else {
|
||||
errf("group%d - out of order iteration\n", type);
|
||||
@@ -260,7 +278,7 @@ static int dev_enum_stor(int type, struct device_info *di)
|
||||
|
||||
if (found)
|
||||
debugf("device found, returning cookie 0x%08x\n",
|
||||
(u_int32_t)di->cookie);
|
||||
(u_int32_t)di->cookie);
|
||||
else
|
||||
debugf("no device found\n");
|
||||
|
||||
@@ -281,7 +299,9 @@ int dev_enum_storage(struct device_info *di)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* check: ide, usb, scsi, mmc */
|
||||
/*
|
||||
* check: ide, usb, scsi, mmc
|
||||
*/
|
||||
for (i = ENUM_IDE; i < ENUM_MAX; i ++) {
|
||||
if (dev_enum_stor(i, di))
|
||||
return 1;
|
||||
@@ -338,14 +358,10 @@ lbasize_t dev_read_stor(void *cookie, void *buf, lbasize_t len, lbastart_t start
|
||||
if (!dev_stor_is_valid(type, dd))
|
||||
return 0;
|
||||
|
||||
#ifdef CONFIG_BLK
|
||||
return blk_dread(dd, start, len, buf);
|
||||
#else
|
||||
if ((dd->block_read) == NULL) {
|
||||
debugf("no block_read() for device 0x%08x\n", cookie);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return dd->block_read(dd, start, len, buf);
|
||||
#endif /* defined(CONFIG_BLK) */
|
||||
}
|
||||
|
||||
181
arch/Kconfig
181
arch/Kconfig
@@ -10,12 +10,8 @@ choice
|
||||
|
||||
config ARC
|
||||
bool "ARC architecture"
|
||||
select ARCH_EARLY_INIT_R
|
||||
select ARC_TIMER
|
||||
select CLK
|
||||
select HAVE_PRIVATE_LIBGCC
|
||||
select SUPPORT_OF_CONTROL
|
||||
select TIMER
|
||||
|
||||
config ARM
|
||||
bool "ARM architecture"
|
||||
@@ -23,16 +19,20 @@ config ARM
|
||||
select HAVE_PRIVATE_LIBGCC if !ARM64
|
||||
select SUPPORT_OF_CONTROL
|
||||
|
||||
config AVR32
|
||||
bool "AVR32 architecture"
|
||||
select CREATE_ARCH_SYMLINK
|
||||
|
||||
config BLACKFIN
|
||||
bool "Blackfin architecture"
|
||||
|
||||
config M68K
|
||||
bool "M68000 architecture"
|
||||
select HAVE_PRIVATE_LIBGCC
|
||||
select SYS_BOOT_GET_CMDLINE
|
||||
select SYS_BOOT_GET_KBD
|
||||
|
||||
config MICROBLAZE
|
||||
bool "MicroBlaze architecture"
|
||||
select SUPPORT_OF_CONTROL
|
||||
imply CMD_IRQ
|
||||
|
||||
config MIPS
|
||||
bool "MIPS architecture"
|
||||
@@ -42,160 +42,51 @@ config MIPS
|
||||
|
||||
config NDS32
|
||||
bool "NDS32 architecture"
|
||||
select SUPPORT_OF_CONTROL
|
||||
|
||||
config NIOS2
|
||||
bool "Nios II architecture"
|
||||
select CPU
|
||||
select DM
|
||||
select OF_CONTROL
|
||||
select SUPPORT_OF_CONTROL
|
||||
imply CMD_DM
|
||||
select OF_CONTROL
|
||||
select DM
|
||||
select CPU
|
||||
|
||||
config OPENRISC
|
||||
bool "OpenRISC architecture"
|
||||
|
||||
config PPC
|
||||
bool "PowerPC architecture"
|
||||
select HAVE_PRIVATE_LIBGCC
|
||||
select SUPPORT_OF_CONTROL
|
||||
select SYS_BOOT_GET_CMDLINE
|
||||
select SYS_BOOT_GET_KBD
|
||||
|
||||
config RISCV
|
||||
bool "RISC-V architecture"
|
||||
select CREATE_ARCH_SYMLINK
|
||||
select SUPPORT_OF_CONTROL
|
||||
select OF_CONTROL
|
||||
select DM
|
||||
imply DM_SERIAL
|
||||
imply DM_ETH
|
||||
imply DM_MMC
|
||||
imply DM_SPI
|
||||
imply DM_SPI_FLASH
|
||||
imply BLK
|
||||
imply CLK
|
||||
imply MTD
|
||||
imply TIMER
|
||||
imply CMD_DM
|
||||
|
||||
config SANDBOX
|
||||
bool "Sandbox"
|
||||
select BOARD_LATE_INIT
|
||||
select DM
|
||||
select DM_GPIO
|
||||
select DM_I2C
|
||||
select DM_KEYBOARD
|
||||
select DM_MMC
|
||||
select DM_SERIAL
|
||||
select DM_SPI
|
||||
select DM_SPI_FLASH
|
||||
select HAVE_BLOCK_DEVICE
|
||||
select LZO
|
||||
select SPI
|
||||
select SUPPORT_OF_CONTROL
|
||||
imply BITREVERSE
|
||||
select BLOBLIST
|
||||
imply CMD_DM
|
||||
imply CMD_GETTIME
|
||||
imply CMD_HASH
|
||||
imply CMD_IO
|
||||
imply CMD_IOTRACE
|
||||
imply CMD_LZMADEC
|
||||
imply CMD_SATA
|
||||
imply CMD_SF_TEST
|
||||
imply CRC32_VERIFY
|
||||
imply FAT_WRITE
|
||||
imply FIRMWARE
|
||||
imply HASH_VERIFY
|
||||
imply LZMA
|
||||
imply SCSI
|
||||
imply TEE
|
||||
imply AVB_VERIFY
|
||||
imply LIBAVB
|
||||
imply CMD_AVB
|
||||
imply UDP_FUNCTION_FASTBOOT
|
||||
imply VIRTIO_MMIO
|
||||
imply VIRTIO_PCI
|
||||
imply VIRTIO_SANDBOX
|
||||
imply VIRTIO_BLK
|
||||
imply VIRTIO_NET
|
||||
imply DM_SOUND
|
||||
imply PCH
|
||||
select DM
|
||||
select DM_SPI_FLASH
|
||||
select DM_SERIAL
|
||||
select DM_I2C
|
||||
select DM_SPI
|
||||
select DM_GPIO
|
||||
select DM_MMC
|
||||
|
||||
config SH
|
||||
bool "SuperH architecture"
|
||||
select HAVE_PRIVATE_LIBGCC
|
||||
|
||||
config SPARC
|
||||
bool "SPARC architecture"
|
||||
select CREATE_ARCH_SYMLINK
|
||||
|
||||
config X86
|
||||
bool "x86 architecture"
|
||||
select SUPPORT_SPL
|
||||
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 TIMER
|
||||
select USE_PRIVATE_LIBGCC
|
||||
select X86_TSC_TIMER
|
||||
imply BLK
|
||||
imply CMD_DM
|
||||
imply CMD_FPGA_LOADMK
|
||||
imply CMD_GETTIME
|
||||
imply CMD_IO
|
||||
imply CMD_IRQ
|
||||
imply CMD_PCI
|
||||
imply CMD_SF_TEST
|
||||
imply CMD_ZBOOT
|
||||
imply DM_ETH
|
||||
imply DM_GPIO
|
||||
imply DM_KEYBOARD
|
||||
imply DM_MMC
|
||||
imply DM_RTC
|
||||
imply DM_SCSI
|
||||
imply DM_SERIAL
|
||||
imply DM_SPI
|
||||
imply DM_SPI_FLASH
|
||||
imply DM_USB
|
||||
imply DM_VIDEO
|
||||
imply SYSRESET
|
||||
imply SPL_SYSRESET
|
||||
imply SYSRESET_X86
|
||||
imply USB_ETHER_ASIX
|
||||
imply USB_ETHER_SMSC95XX
|
||||
imply USB_HOST_ETHER
|
||||
imply PCH
|
||||
imply RTC_MC146818
|
||||
|
||||
# Thing to enable for when SPL/TPL are enabled: SPL
|
||||
imply SPL_DM
|
||||
imply SPL_OF_LIBFDT
|
||||
imply SPL_DRIVERS_MISC_SUPPORT
|
||||
imply SPL_GPIO_SUPPORT
|
||||
imply SPL_LIBCOMMON_SUPPORT
|
||||
imply SPL_LIBGENERIC_SUPPORT
|
||||
imply SPL_SERIAL_SUPPORT
|
||||
imply SPL_SPI_FLASH_SUPPORT
|
||||
imply SPL_SPI_SUPPORT
|
||||
imply SPL_OF_CONTROL
|
||||
imply SPL_TIMER
|
||||
imply SPL_REGMAP
|
||||
imply SPL_SYSCON
|
||||
# TPL
|
||||
imply TPL_DM
|
||||
imply TPL_OF_LIBFDT
|
||||
imply TPL_DRIVERS_MISC_SUPPORT
|
||||
imply TPL_GPIO_SUPPORT
|
||||
imply TPL_LIBCOMMON_SUPPORT
|
||||
imply TPL_LIBGENERIC_SUPPORT
|
||||
imply TPL_SERIAL_SUPPORT
|
||||
imply TPL_SPI_FLASH_SUPPORT
|
||||
imply TPL_SPI_SUPPORT
|
||||
imply TPL_OF_CONTROL
|
||||
imply TPL_TIMER
|
||||
imply TPL_REGMAP
|
||||
imply TPL_SYSCON
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select DM_GPIO
|
||||
select DM_SPI
|
||||
select DM_SPI_FLASH
|
||||
|
||||
config XTENSA
|
||||
bool "Xtensa architecture"
|
||||
@@ -260,25 +151,19 @@ config SYS_CONFIG_NAME
|
||||
The header file include/configs/<CONFIG_SYS_CONFIG_NAME>.h
|
||||
should be included from include/config.h.
|
||||
|
||||
config SYS_DISABLE_DCACHE_OPS
|
||||
bool
|
||||
help
|
||||
This option disables dcache flush and dcache invalidation
|
||||
operations. For example, on coherent systems where cache
|
||||
operatios are not required, enable this option to avoid them.
|
||||
Note that, its up to the individual architectures to implement
|
||||
this functionality.
|
||||
|
||||
source "arch/arc/Kconfig"
|
||||
source "arch/arm/Kconfig"
|
||||
source "arch/avr32/Kconfig"
|
||||
source "arch/blackfin/Kconfig"
|
||||
source "arch/m68k/Kconfig"
|
||||
source "arch/microblaze/Kconfig"
|
||||
source "arch/mips/Kconfig"
|
||||
source "arch/nds32/Kconfig"
|
||||
source "arch/nios2/Kconfig"
|
||||
source "arch/openrisc/Kconfig"
|
||||
source "arch/powerpc/Kconfig"
|
||||
source "arch/sandbox/Kconfig"
|
||||
source "arch/sh/Kconfig"
|
||||
source "arch/sparc/Kconfig"
|
||||
source "arch/x86/Kconfig"
|
||||
source "arch/xtensa/Kconfig"
|
||||
source "arch/riscv/Kconfig"
|
||||
|
||||
@@ -31,36 +31,36 @@ choice
|
||||
|
||||
config CPU_ARC750D
|
||||
bool "ARC 750D"
|
||||
depends on ISA_ARCOMPACT
|
||||
select ARC_MMU_V2
|
||||
depends on ISA_ARCOMPACT
|
||||
help
|
||||
Choose this option to build an U-Boot for ARC750D CPU.
|
||||
|
||||
config CPU_ARC770D
|
||||
bool "ARC 770D"
|
||||
depends on ISA_ARCOMPACT
|
||||
select ARC_MMU_V3
|
||||
depends on ISA_ARCOMPACT
|
||||
help
|
||||
Choose this option to build an U-Boot for ARC770D CPU.
|
||||
|
||||
config CPU_ARCEM6
|
||||
bool "ARC EM6"
|
||||
depends on ISA_ARCV2
|
||||
select ARC_MMU_ABSENT
|
||||
depends on ISA_ARCV2
|
||||
help
|
||||
Next Generation ARC Core based on ISA-v2 ISA without MMU.
|
||||
|
||||
config CPU_ARCHS36
|
||||
bool "ARC HS36"
|
||||
depends on ISA_ARCV2
|
||||
select ARC_MMU_ABSENT
|
||||
depends on ISA_ARCV2
|
||||
help
|
||||
Next Generation ARC Core based on ISA-v2 ISA without MMU.
|
||||
|
||||
config CPU_ARCHS38
|
||||
bool "ARC HS38"
|
||||
depends on ISA_ARCV2
|
||||
select ARC_MMU_V4
|
||||
depends on ISA_ARCV2
|
||||
help
|
||||
Next Generation ARC Core based on ISA-v2 ISA with MMU.
|
||||
|
||||
@@ -116,27 +116,9 @@ config SYS_DCACHE_OFF
|
||||
bool "Do not use Data Cache"
|
||||
default n
|
||||
|
||||
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.
|
||||
NOTE: as of today linux will not work properly if this option
|
||||
is enabled in u-boot!
|
||||
|
||||
endif
|
||||
|
||||
choice
|
||||
prompt "Target select"
|
||||
default TARGET_AXS103
|
||||
default TARGET_AXS10X
|
||||
|
||||
config TARGET_TB100
|
||||
bool "Support tb100"
|
||||
@@ -144,32 +126,13 @@ config TARGET_TB100
|
||||
config TARGET_NSIM
|
||||
bool "Support standalone nSIM & Free nSIM"
|
||||
|
||||
config TARGET_AXS101
|
||||
bool "Support Synopsys Designware SDP board AXS101"
|
||||
select BOUNCE_BUFFER if CMD_NAND
|
||||
|
||||
config TARGET_AXS103
|
||||
bool "Support Synopsys Designware SDP board AXS103"
|
||||
select BOUNCE_BUFFER if CMD_NAND
|
||||
|
||||
config TARGET_EMSDP
|
||||
bool "Synopsys EM Software Development Platform"
|
||||
select CPU_ARCEM6
|
||||
|
||||
config TARGET_HSDK
|
||||
bool "Support Synpsys HS DevelopmentKit board"
|
||||
|
||||
config TARGET_IOT_DEVKIT
|
||||
bool "Synopsys Brite IoT Development kit"
|
||||
select CPU_ARCEM6
|
||||
config TARGET_AXS10X
|
||||
bool "Support Synopsys Designware SDP board (AXS101 & AXS103)"
|
||||
|
||||
endchoice
|
||||
|
||||
source "board/abilis/tb100/Kconfig"
|
||||
source "board/synopsys/Kconfig"
|
||||
source "board/synopsys/axs10x/Kconfig"
|
||||
source "board/synopsys/emsdp/Kconfig"
|
||||
source "board/synopsys/hsdk/Kconfig"
|
||||
source "board/synopsys/iot_devkit/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
libs-y += arch/arc/cpu/$(CPU)/
|
||||
libs-y += arch/arc/lib/
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
ifndef CONFIG_CPU_BIG_ENDIAN
|
||||
CONFIG_SYS_LITTLE_ENDIAN = 1
|
||||
@@ -9,29 +11,35 @@ CONFIG_SYS_BIG_ENDIAN = 1
|
||||
endif
|
||||
|
||||
ifdef CONFIG_SYS_LITTLE_ENDIAN
|
||||
ARC_CROSS_COMPILE := arc-linux-
|
||||
PLATFORM_LDFLAGS += -EL
|
||||
PLATFORM_CPPFLAGS += -mlittle-endian
|
||||
endif
|
||||
|
||||
ifdef CONFIG_SYS_BIG_ENDIAN
|
||||
ARC_CROSS_COMPILE := arceb-linux-
|
||||
PLATFORM_LDFLAGS += -EB
|
||||
PLATFORM_CPPFLAGS += -mbig-endian
|
||||
endif
|
||||
|
||||
ifeq ($(CROSS_COMPILE),)
|
||||
CROSS_COMPILE := $(ARC_CROSS_COMPILE)
|
||||
endif
|
||||
|
||||
ifdef CONFIG_ARC_MMU_VER
|
||||
CONFIG_MMU = 1
|
||||
endif
|
||||
|
||||
ifdef CONFIG_CPU_ARC750D
|
||||
PLATFORM_CPPFLAGS += -mcpu=arc700
|
||||
PLATFORM_CPPFLAGS += -marc700
|
||||
endif
|
||||
|
||||
ifdef CONFIG_CPU_ARC770D
|
||||
PLATFORM_CPPFLAGS += -mcpu=arc700 -mlock -mswape
|
||||
PLATFORM_CPPFLAGS += -marc700 -mlock -mswape
|
||||
endif
|
||||
|
||||
ifdef CONFIG_CPU_ARCEM6
|
||||
PLATFORM_CPPFLAGS += -mcpu=arcem
|
||||
PLATFORM_CPPFLAGS += -marcem
|
||||
endif
|
||||
|
||||
ifdef CONFIG_CPU_ARCHS34
|
||||
@@ -42,11 +50,10 @@ ifdef CONFIG_CPU_ARCHS38
|
||||
PLATFORM_CPPFLAGS += -mcpu=archs
|
||||
endif
|
||||
|
||||
PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 -mno-sdata
|
||||
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections -fno-common
|
||||
PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2
|
||||
|
||||
# Needed for relocation
|
||||
LDFLAGS_FINAL += -pie --gc-sections
|
||||
LDFLAGS_FINAL += -pie
|
||||
|
||||
# Load address for standalone apps
|
||||
CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
obj-y += ivt.o
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
.section .ivt, "ax",@progbits
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# Copyright (C) 2013-2015 Synopsys, Inc. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
obj-y += ivt.o
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2015 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
.section .ivt, "a",@progbits
|
||||
|
||||
@@ -1,26 +1,18 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
OUTPUT_FORMAT("elf32-littlearc", "elf32-bigarc", "elf32-littlearc")
|
||||
OUTPUT_FORMAT("elf32-littlearc", "elf32-littlearc", "elf32-littlearc")
|
||||
OUTPUT_ARCH(arc)
|
||||
ENTRY(_start)
|
||||
SECTIONS
|
||||
{
|
||||
. = CONFIG_SYS_TEXT_BASE;
|
||||
__image_copy_start = .;
|
||||
. = ALIGN(1024);
|
||||
__ivt_start = .;
|
||||
.ivt :
|
||||
{
|
||||
KEEP(*(.ivt))
|
||||
}
|
||||
__ivt_end = .;
|
||||
|
||||
. = ALIGN(1024);
|
||||
__text_start = .;
|
||||
.text : {
|
||||
arch/arc/lib/start.o (.text*)
|
||||
@@ -28,6 +20,14 @@ SECTIONS
|
||||
}
|
||||
__text_end = .;
|
||||
|
||||
. = ALIGN(1024);
|
||||
__ivt_start = .;
|
||||
.ivt :
|
||||
{
|
||||
*(.ivt)
|
||||
}
|
||||
__ivt_end = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : {
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
|
||||
1
arch/arc/dts/.gitignore
vendored
Normal file
1
arch/arc/dts/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.dtb
|
||||
@@ -1,12 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
dtb-$(CONFIG_TARGET_AXS101) += axs101.dtb
|
||||
dtb-$(CONFIG_TARGET_AXS103) += axs103.dtb
|
||||
dtb-$(CONFIG_TARGET_AXS10X) += axs10x.dtb
|
||||
dtb-$(CONFIG_TARGET_NSIM) += nsim.dtb
|
||||
dtb-$(CONFIG_TARGET_TB100) += abilis_tb100.dtb
|
||||
dtb-$(CONFIG_TARGET_EMSDP) += emsdp.dtb
|
||||
dtb-$(CONFIG_TARGET_HSDK) += hsdk.dtb
|
||||
dtb-$(CONFIG_TARGET_IOT_DEVKIT) += iot_devkit.dtb
|
||||
|
||||
targets += $(dtb-y)
|
||||
|
||||
|
||||
@@ -1,27 +1,20 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2015 Synopsys, Inc. (www.synopsys.com)
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "skeleton.dtsi"
|
||||
|
||||
/ {
|
||||
model = "abilis,tb100";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
aliases {
|
||||
console = &uart0;
|
||||
};
|
||||
|
||||
cpu_card {
|
||||
core_clk: core_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <500000000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
uart0: serial@ff100000 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0xff100000 0x1000>;
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2017 Synopsys, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
/include/ "skeleton.dtsi"
|
||||
|
||||
/ {
|
||||
cpu_card {
|
||||
core_clk: core_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <750000000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2017 Synopsys, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
/include/ "skeleton.dtsi"
|
||||
|
||||
/ {
|
||||
cpu_card {
|
||||
core_clk: core_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <100000000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2017 Synopsys, Inc. All rights reserved.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "axc001.dtsi"
|
||||
/include/ "axs10x_mb.dtsi"
|
||||
|
||||
|
||||
/ {
|
||||
model = "snps,axs101";
|
||||
|
||||
chosen {
|
||||
stdout-path = &uart0;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2017 Synopsys, Inc. All rights reserved.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "axc003.dtsi"
|
||||
/include/ "axs10x_mb.dtsi"
|
||||
|
||||
|
||||
/ {
|
||||
model = "snps,axs103";
|
||||
|
||||
chosen {
|
||||
stdout-path = &uart0;
|
||||
};
|
||||
};
|
||||
|
||||
57
arch/arc/dts/axs10x.dts
Normal file
57
arch/arc/dts/axs10x.dts
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "skeleton.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
aliases {
|
||||
console = &uart0;
|
||||
};
|
||||
|
||||
clocks {
|
||||
apbclk: apbclk {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <50000000>;
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
uart0: serial0@e0022000 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0xe0022000 0x1000>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
};
|
||||
|
||||
ethernet@e0018000 {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "altr,socfpga-stmmac";
|
||||
reg = < 0xe0018000 0x2000 >;
|
||||
interrupts = < 25 >;
|
||||
interrupt-names = "macirq";
|
||||
phy-mode = "gmii";
|
||||
snps,pbl = < 32 >;
|
||||
clocks = <&apbclk>;
|
||||
clock-names = "stmmaceth";
|
||||
max-speed = <100>;
|
||||
};
|
||||
|
||||
ehci@0xe0040000 {
|
||||
compatible = "generic-ehci";
|
||||
reg = < 0xe0040000 0x100 >;
|
||||
interrupts = < 8 >;
|
||||
};
|
||||
|
||||
ohci@0xe0060000 {
|
||||
compatible = "generic-ohci";
|
||||
reg = < 0xe0060000 0x100 >;
|
||||
interrupts = < 8 >;
|
||||
};
|
||||
};
|
||||
@@ -1,122 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2017 Synopsys, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
spi0 = &spi0;
|
||||
};
|
||||
|
||||
axs10x_mb@e0000000 {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x00000000 0xe0000000 0x10000000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
clocks {
|
||||
compatible = "simple-bus";
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
apbclk: apbclk {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <50000000>;
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
uartclk: uartclk {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <33333333>;
|
||||
#clock-cells = <0>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
mmcclk_ciu: mmcclk-ciu {
|
||||
compatible = "fixed-clock";
|
||||
/*
|
||||
* DW sdio controller has external ciu clock divider
|
||||
* controlled via register in SDIO IP. It divides
|
||||
* sdio_ref_clk (which comes from CGU) by 16 for
|
||||
* default. So default mmcclk clock (which comes
|
||||
* to sdk_in) is 25000000 Hz.
|
||||
*/
|
||||
clock-frequency = <25000000>;
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
mmcclk_biu: mmcclk-biu {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <50000000>;
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
ethernet@18000 {
|
||||
compatible = "altr,socfpga-stmmac";
|
||||
reg = < 0x18000 0x2000 >;
|
||||
phy-mode = "gmii";
|
||||
snps,pbl = < 32 >;
|
||||
clocks = <&apbclk>;
|
||||
clock-names = "stmmaceth";
|
||||
max-speed = <100>;
|
||||
};
|
||||
|
||||
ehci@0x40000 {
|
||||
compatible = "generic-ehci";
|
||||
reg = < 0x40000 0x100 >;
|
||||
};
|
||||
|
||||
ohci@0x60000 {
|
||||
compatible = "generic-ohci";
|
||||
reg = < 0x60000 0x100 >;
|
||||
};
|
||||
|
||||
mmc: mmc@15000 {
|
||||
compatible = "snps,dw-mshc";
|
||||
reg = <0x15000 0x400>;
|
||||
bus-width = <4>;
|
||||
clocks = <&mmcclk_biu>, <&mmcclk_ciu>;
|
||||
clock-names = "biu", "ciu";
|
||||
max-frequency = <25000000>;
|
||||
};
|
||||
|
||||
uart0: serial0@22000 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0x22000 0x100>;
|
||||
clocks = <&uartclk>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
};
|
||||
|
||||
spi0: spi@0 {
|
||||
compatible = "snps,dw-apb-ssi";
|
||||
reg = <0x0 0x100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
spi-max-frequency = <4000000>;
|
||||
clocks = <&apbclk>;
|
||||
clock-names = "spi_clk";
|
||||
cs-gpio = <&cs_gpio 0>;
|
||||
spi_flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <4000000>;
|
||||
};
|
||||
};
|
||||
|
||||
cs_gpio: gpio@11218 {
|
||||
compatible = "snps,creg-gpio";
|
||||
reg = <0x11218 0x4>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <1>;
|
||||
gpio-bank-name = "axs-spi-cs";
|
||||
gpio-count = <1>;
|
||||
gpio-first-shift = <0>;
|
||||
gpio-bit-per-line = <2>;
|
||||
gpio-activate-val = <1>;
|
||||
gpio-deactivate-val = <3>;
|
||||
gpio-default-val = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1,35 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2018 Synopsys, Inc. All rights reserved.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "skeleton.dtsi"
|
||||
|
||||
/ {
|
||||
model = "snps,emsdp";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
aliases {
|
||||
console = &uart0;
|
||||
};
|
||||
|
||||
cpu_card {
|
||||
core_clk: core_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <40000000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
uart0: serial0@f0004000 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
clock-frequency = <100000000>;
|
||||
reg = <0xf0004000 0x1000>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
};
|
||||
};
|
||||
@@ -1,144 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2017 Synopsys, Inc. All rights reserved.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "skeleton.dtsi"
|
||||
#include "dt-bindings/clock/snps,hsdk-cgu.h"
|
||||
|
||||
/ {
|
||||
model = "snps,hsdk";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
aliases {
|
||||
console = &uart0;
|
||||
spi0 = &spi0;
|
||||
};
|
||||
|
||||
cpu_card {
|
||||
core_clk: core_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <500000000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
clk-fmeas {
|
||||
clocks = <&cgu_clk CLK_ARC_PLL>, <&cgu_clk CLK_SYS_PLL>,
|
||||
<&cgu_clk CLK_TUN_PLL>, <&cgu_clk CLK_DDR_PLL>,
|
||||
<&cgu_clk CLK_ARC>, <&cgu_clk CLK_HDMI_PLL>,
|
||||
<&cgu_clk CLK_TUN_TUN>, <&cgu_clk CLK_HDMI>,
|
||||
<&cgu_clk CLK_SYS_APB>, <&cgu_clk CLK_SYS_AXI>,
|
||||
<&cgu_clk CLK_SYS_ETH>, <&cgu_clk CLK_SYS_USB>,
|
||||
<&cgu_clk CLK_SYS_SDIO>, <&cgu_clk CLK_SYS_HDMI>,
|
||||
<&cgu_clk CLK_SYS_GFX_CORE>, <&cgu_clk CLK_SYS_GFX_DMA>,
|
||||
<&cgu_clk CLK_SYS_GFX_CFG>, <&cgu_clk CLK_SYS_DMAC_CORE>,
|
||||
<&cgu_clk CLK_SYS_DMAC_CFG>, <&cgu_clk CLK_SYS_SDIO_REF>,
|
||||
<&cgu_clk CLK_SYS_SPI_REF>, <&cgu_clk CLK_SYS_I2C_REF>,
|
||||
<&cgu_clk CLK_SYS_UART_REF>, <&cgu_clk CLK_SYS_EBI_REF>,
|
||||
<&cgu_clk CLK_TUN_ROM>, <&cgu_clk CLK_TUN_PWM>;
|
||||
clock-names = "cpu-pll", "sys-pll",
|
||||
"tun-pll", "ddr-clk",
|
||||
"cpu-clk", "hdmi-pll",
|
||||
"tun-clk", "hdmi-clk",
|
||||
"apb-clk", "axi-clk",
|
||||
"eth-clk", "usb-clk",
|
||||
"sdio-clk", "hdmi-sys-clk",
|
||||
"gfx-core-clk", "gfx-dma-clk",
|
||||
"gfx-cfg-clk", "dmac-core-clk",
|
||||
"dmac-cfg-clk", "sdio-ref-clk",
|
||||
"spi-clk", "i2c-clk",
|
||||
"uart-clk", "ebi-clk",
|
||||
"rom-clk", "pwm-clk";
|
||||
};
|
||||
|
||||
cgu_clk: cgu-clk@f0000000 {
|
||||
compatible = "snps,hsdk-cgu-clock";
|
||||
reg = <0xf0000000 0x10>, <0xf00014B8 0x4>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
uart0: serial0@f0005000 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0xf0005000 0x1000>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
};
|
||||
|
||||
ethernet@f0008000 {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "altr,socfpga-stmmac";
|
||||
reg = <0xf0008000 0x2000>;
|
||||
phy-mode = "gmii";
|
||||
};
|
||||
|
||||
ehci@0xf0040000 {
|
||||
compatible = "generic-ehci";
|
||||
reg = <0xf0040000 0x100>;
|
||||
};
|
||||
|
||||
ohci@0xf0060000 {
|
||||
compatible = "generic-ohci";
|
||||
reg = <0xf0060000 0x100>;
|
||||
};
|
||||
|
||||
mmcclk_ciu: mmcclk-ciu {
|
||||
compatible = "fixed-clock";
|
||||
/*
|
||||
* DW sdio controller has external ciu clock divider
|
||||
* controlled via register in SDIO IP. Due to its
|
||||
* unexpected default value (it should divide by 1
|
||||
* but it divides by 8) SDIO IP uses wrong clock and
|
||||
* works unstable (see STAR 9001204800)
|
||||
* We switched to the minimum possible value of the
|
||||
* divisor (div-by-2) in HSDK platform code.
|
||||
* So default mmcclk ciu clock is 50000000 Hz.
|
||||
*/
|
||||
clock-frequency = <50000000>;
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
mmc: mmc0@f000a000 {
|
||||
compatible = "snps,dw-mshc";
|
||||
reg = <0xf000a000 0x400>;
|
||||
bus-width = <4>;
|
||||
fifo-depth = <256>;
|
||||
clocks = <&cgu_clk CLK_SYS_SDIO>, <&mmcclk_ciu>;
|
||||
clock-names = "biu", "ciu";
|
||||
max-frequency = <25000000>;
|
||||
};
|
||||
|
||||
spi0: spi@f0020000 {
|
||||
compatible = "snps,dw-apb-ssi";
|
||||
reg = <0xf0020000 0x1000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
spi-max-frequency = <4000000>;
|
||||
clocks = <&cgu_clk CLK_SYS_SPI_REF>;
|
||||
clock-names = "spi_clk";
|
||||
cs-gpio = <&cs_gpio 0>;
|
||||
spi_flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <4000000>;
|
||||
};
|
||||
};
|
||||
|
||||
cs_gpio: gpio@f00014b0 {
|
||||
compatible = "snps,creg-gpio";
|
||||
reg = <0xf00014b0 0x4>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <1>;
|
||||
gpio-bank-name = "hsdk-spi-cs";
|
||||
gpio-count = <1>;
|
||||
gpio-first-shift = <0>;
|
||||
gpio-bit-per-line = <2>;
|
||||
gpio-activate-val = <2>;
|
||||
gpio-deactivate-val = <3>;
|
||||
gpio-default-val = <1>;
|
||||
};
|
||||
};
|
||||
@@ -1,45 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2018 Synopsys, Inc. All rights reserved.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "skeleton.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
aliases {
|
||||
console = &uart0;
|
||||
};
|
||||
|
||||
cpu_card {
|
||||
core_clk: core_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <144000000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
uart0: serial0@80014000 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
clock-frequency = <16000000>;
|
||||
reg = <0x80014000 0x1000>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
};
|
||||
|
||||
usb: usb@f0040000 {
|
||||
compatible = "snps,dwc2";
|
||||
reg = <0xf0040000 0x10000>;
|
||||
phys = <&usbphy>;
|
||||
phy-names = "usb2-phy";
|
||||
};
|
||||
|
||||
usbphy: phy {
|
||||
compatible = "nop-phy";
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
@@ -1,31 +1,24 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com)
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "skeleton.dtsi"
|
||||
|
||||
/ {
|
||||
model = "snps,nsim";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
aliases {
|
||||
console = &arcuart0;
|
||||
};
|
||||
|
||||
cpu_card {
|
||||
core_clk: core_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <70000000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
arcuart0: serial@0xc0fc1000 {
|
||||
compatible = "snps,arc-uart";
|
||||
reg = <0xc0fc1000 0x100>;
|
||||
clock-frequency = <70000000>;
|
||||
clock-frequency = <80000000>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -9,22 +9,5 @@
|
||||
#size-cells = <1>;
|
||||
chosen { };
|
||||
aliases { };
|
||||
|
||||
cpu_card {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
timer@0 {
|
||||
compatible = "snps,arc-timer";
|
||||
clocks = <&core_clk>;
|
||||
reg = <0 1>;
|
||||
};
|
||||
};
|
||||
|
||||
memory@80000000 {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x10000000>; /* 256M */
|
||||
};
|
||||
memory { device_type = "memory"; reg = <0 0>; };
|
||||
};
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* ARC Build Configuration Registers, with encoded hardware config
|
||||
*
|
||||
* Copyright (C) 2018 Synopsys
|
||||
* Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#ifndef __ARC_BCR_H
|
||||
#define __ARC_BCR_H
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <config.h>
|
||||
|
||||
union bcr_di_cache {
|
||||
struct {
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
unsigned int pad:12, line_len:4, sz:4, config:4, ver:8;
|
||||
#else
|
||||
unsigned int ver:8, config:4, sz:4, line_len:4, pad:12;
|
||||
#endif
|
||||
} fields;
|
||||
unsigned int word;
|
||||
};
|
||||
|
||||
union bcr_slc_cfg {
|
||||
struct {
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
unsigned int pad:24, way:2, lsz:2, sz:4;
|
||||
#else
|
||||
unsigned int sz:4, lsz:2, way:2, pad:24;
|
||||
#endif
|
||||
} fields;
|
||||
unsigned int word;
|
||||
};
|
||||
|
||||
union bcr_generic {
|
||||
struct {
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
unsigned int pad:24, ver:8;
|
||||
#else
|
||||
unsigned int ver:8, pad:24;
|
||||
#endif
|
||||
} fields;
|
||||
unsigned int word;
|
||||
};
|
||||
|
||||
union bcr_clust_cfg {
|
||||
struct {
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
unsigned int pad:7, c:1, num_entries:8, num_cores:8, ver:8;
|
||||
#else
|
||||
unsigned int ver:8, num_cores:8, num_entries:8, c:1, pad:7;
|
||||
#endif
|
||||
} fields;
|
||||
unsigned int word;
|
||||
};
|
||||
|
||||
union bcr_mmu_4 {
|
||||
struct {
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
unsigned int ver:8, sasid:1, sz1:4, sz0:4, res:2, pae:1,
|
||||
n_ways:2, n_entry:2, n_super:2, u_itlb:3, u_dtlb:3;
|
||||
#else
|
||||
/* DTLB ITLB JES JE JA */
|
||||
unsigned int u_dtlb:3, u_itlb:3, n_super:2, n_entry:2, n_ways:2,
|
||||
pae:1, res:2, sz0:4, sz1:4, sasid:1, ver:8;
|
||||
#endif
|
||||
} fields;
|
||||
unsigned int word;
|
||||
};
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARC_BCR_H */
|
||||
@@ -1,13 +1,13 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef _ASM_ARC_ARCREGS_H
|
||||
#define _ASM_ARC_ARCREGS_H
|
||||
|
||||
#include <asm/cache.h>
|
||||
#include <config.h>
|
||||
|
||||
/*
|
||||
* ARC architecture has additional address space - auxiliary registers.
|
||||
@@ -16,26 +16,9 @@
|
||||
* access: "lr"/"sr".
|
||||
*/
|
||||
|
||||
/*
|
||||
* Typically 8 least significant bits of Build Configuration Register (BCR)
|
||||
* describe version of the HW block in question. Moreover if decoded version
|
||||
* is 0 this means given HW block is absent - this is especially useful because
|
||||
* we may safely read BRC regardless HW block existence while an attempt to
|
||||
* access any other AUX regs associated with this HW block lead to imediate
|
||||
* "instruction error" exception.
|
||||
*
|
||||
* I.e. before using any cofigurable HW block it's required to make sure it
|
||||
* exists at all, and for that we introduce a special macro below.
|
||||
*/
|
||||
#define ARC_BCR_VERSION_MASK GENMASK(7, 0)
|
||||
#define ARC_FEATURE_EXISTS(bcr) !!(__builtin_arc_lr(bcr) & ARC_BCR_VERSION_MASK)
|
||||
|
||||
#define ARC_AUX_IDENTITY 0x04
|
||||
#define ARC_AUX_STATUS32 0x0a
|
||||
|
||||
/* STATUS32 Bits Positions */
|
||||
#define STATUS_AD_BIT 19 /* Enable unaligned access */
|
||||
|
||||
/* Instruction cache related auxiliary registers */
|
||||
#define ARC_AUX_IC_IVIC 0x10
|
||||
#define ARC_AUX_IC_CTRL 0x11
|
||||
@@ -44,22 +27,12 @@
|
||||
#define ARC_AUX_IC_PTAG 0x1E
|
||||
#endif
|
||||
#define ARC_BCR_IC_BUILD 0x77
|
||||
#define AUX_AUX_CACHE_LIMIT 0x5D
|
||||
#define ARC_AUX_NON_VOLATILE_LIMIT 0x5E
|
||||
|
||||
/* ICCM and DCCM auxiliary registers */
|
||||
#define ARC_AUX_DCCM_BASE 0x18 /* DCCM Base Addr ARCv2 */
|
||||
#define ARC_AUX_ICCM_BASE 0x208 /* ICCM Base Addr ARCv2 */
|
||||
|
||||
/* Timer related auxiliary registers */
|
||||
#define ARC_AUX_TIMER0_CNT 0x21 /* Timer 0 count */
|
||||
#define ARC_AUX_TIMER0_CTRL 0x22 /* Timer 0 control */
|
||||
#define ARC_AUX_TIMER0_LIMIT 0x23 /* Timer 0 limit */
|
||||
|
||||
#define ARC_AUX_TIMER1_CNT 0x100 /* Timer 1 count */
|
||||
#define ARC_AUX_TIMER1_CTRL 0x101 /* Timer 1 control */
|
||||
#define ARC_AUX_TIMER1_LIMIT 0x102 /* Timer 1 limit */
|
||||
|
||||
#define ARC_AUX_INTR_VEC_BASE 0x25
|
||||
|
||||
/* Data cache related auxiliary registers */
|
||||
@@ -80,30 +53,14 @@
|
||||
#define ARC_AUX_SLC_INVALIDATE 0x905
|
||||
#define ARC_AUX_SLC_IVDL 0x910
|
||||
#define ARC_AUX_SLC_FLDL 0x912
|
||||
#define ARC_AUX_SLC_RGN_START 0x914
|
||||
#define ARC_AUX_SLC_RGN_START1 0x915
|
||||
#define ARC_AUX_SLC_RGN_END 0x916
|
||||
#define ARC_AUX_SLC_RGN_END1 0x917
|
||||
#define ARC_BCR_CLUSTER 0xcf
|
||||
|
||||
/* MMU Management regs */
|
||||
#define ARC_AUX_MMU_BCR 0x6f
|
||||
|
||||
/* IO coherency related auxiliary registers */
|
||||
#define ARC_AUX_IO_COH_ENABLE 0x500
|
||||
#define ARC_AUX_IO_COH_PARTIAL 0x501
|
||||
#define ARC_AUX_IO_COH_AP0_BASE 0x508
|
||||
#define ARC_AUX_IO_COH_AP0_SIZE 0x509
|
||||
|
||||
/* XY-memory related */
|
||||
#define ARC_AUX_XY_BUILD 0x79
|
||||
|
||||
/* DSP-extensions related auxiliary registers */
|
||||
#define ARC_AUX_DSP_BUILD 0x7A
|
||||
|
||||
/* ARC Subsystems related auxiliary registers */
|
||||
#define ARC_AUX_SUBSYS_BUILD 0xF0
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/* Accessors for auxiliary registers */
|
||||
#define read_aux_reg(reg) __builtin_arc_lr(reg)
|
||||
@@ -111,19 +68,6 @@
|
||||
/* gcc builtin sr needs reg param to be long immediate */
|
||||
#define write_aux_reg(reg_immed, val) \
|
||||
__builtin_arc_sr((unsigned int)val, reg_immed)
|
||||
|
||||
/* ARCNUM [15:8] - field to identify each core in a multi-core system */
|
||||
#define CPU_ID_GET() ((read_aux_reg(ARC_AUX_IDENTITY) & 0xFF00) >> 8)
|
||||
|
||||
static const inline int is_isa_arcv2(void)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_ISA_ARCV2);
|
||||
}
|
||||
|
||||
static const inline int is_isa_arcompact(void)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_ISA_ARCOMPACT);
|
||||
}
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_ARC_ARCREGS_H */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_BITOPS_H
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_BYTEORDER_H
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_CACHE_H
|
||||
@@ -16,9 +17,6 @@
|
||||
*/
|
||||
#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)
|
||||
@@ -32,13 +30,6 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
void cache_init(void);
|
||||
void flush_n_invalidate_dcache_all(void);
|
||||
void sync_n_cleanup_cache_all(void);
|
||||
|
||||
static const inline int is_ioc_enabled(void)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_ARC_DBG_IOC_ENABLE);
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_CONFIG_H_
|
||||
#define __ASM_ARC_CONFIG_H_
|
||||
|
||||
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
||||
#define CONFIG_ARCH_EARLY_INIT_R
|
||||
|
||||
#define CONFIG_LMB
|
||||
|
||||
|
||||
1
arch/arc/include/asm/errno.h
Normal file
1
arch/arc/include/asm/errno.h
Normal file
@@ -0,0 +1 @@
|
||||
#include <asm-generic/errno.h>
|
||||
@@ -1,20 +1,15 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#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 {
|
||||
int l1_line_sz;
|
||||
#if defined(CONFIG_ISA_ARCV2)
|
||||
int slc_line_sz;
|
||||
#endif
|
||||
};
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include <asm-generic/gpio.h>
|
||||
12
arch/arc/include/asm/init_helpers.h
Normal file
12
arch/arc/include/asm/init_helpers.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2015 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef _ASM_ARC_INIT_HELPERS_H
|
||||
#define _ASM_ARC_INIT_HELPERS_H
|
||||
|
||||
int init_cache_f_r(void);
|
||||
|
||||
#endif /* _ASM_ARC_INIT_HELPERS_H */
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_IO_H
|
||||
@@ -9,7 +10,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#ifdef __ARCHS__
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
|
||||
/*
|
||||
* ARCv2 based HS38 cores are in-order issue, but still weakly ordered
|
||||
@@ -41,14 +42,38 @@
|
||||
#define mb() asm volatile("sync\n" : : : "memory")
|
||||
#endif
|
||||
|
||||
#ifdef __ARCHS__
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
#define __iormb() rmb()
|
||||
#define __iowmb() wmb()
|
||||
#else
|
||||
#define __iormb() asm volatile("" : : : "memory")
|
||||
#define __iowmb() asm volatile("" : : : "memory")
|
||||
#define __iormb() do { } while (0)
|
||||
#define __iowmb() do { } while (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Given a physical address and a length, return a virtual address
|
||||
* that can be used to access the memory range with the caching
|
||||
* properties specified by "flags".
|
||||
*/
|
||||
#define MAP_NOCACHE (0)
|
||||
#define MAP_WRCOMBINE (0)
|
||||
#define MAP_WRBACK (0)
|
||||
#define MAP_WRTHROUGH (0)
|
||||
|
||||
static inline void *
|
||||
map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
|
||||
{
|
||||
return (void *)((unsigned long)paddr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Take down a mapping set up by map_physmem().
|
||||
*/
|
||||
static inline void unmap_physmem(void *vaddr, unsigned long flags)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static inline void sync(void)
|
||||
{
|
||||
/* Not yet implemented */
|
||||
@@ -277,6 +302,9 @@ static inline int __raw_writesl(unsigned int addr, void *data, int longlen)
|
||||
#define setbits_8(addr, set) setbits(8, addr, set)
|
||||
#define clrsetbits_8(addr, clear, set) clrsetbits(8, addr, clear, set)
|
||||
|
||||
#include <asm-generic/io.h>
|
||||
static inline phys_addr_t virt_to_phys(void *vaddr)
|
||||
{
|
||||
return (phys_addr_t)((unsigned long)vaddr);
|
||||
}
|
||||
|
||||
#endif /* __ASM_ARC_IO_H */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2004, 2007-2010, 2011-2015 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_LINKAGE_H
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_POSIX_TYPES_H
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2015 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef _ASM_ARC_PROCESSOR_H
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_PTRACE_H
|
||||
|
||||
16
arch/arc/include/asm/relocate.h
Normal file
16
arch/arc/include/asm/relocate.h
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2015 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef _ASM_ARC_RELOCATE_H
|
||||
#define _ASM_ARC_RELOCATE_H
|
||||
|
||||
#include <common.h>
|
||||
|
||||
int copy_uboot_to_ram(void);
|
||||
int clear_bss(void);
|
||||
int do_elf_reloc_fixups(void);
|
||||
|
||||
#endif /* _ASM_ARC_RELOCATE_H */
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_SECTIONS_H
|
||||
|
||||
@@ -1 +1,27 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_STRING_H
|
||||
#define __ASM_ARC_STRING_H
|
||||
|
||||
#define __HAVE_ARCH_MEMSET
|
||||
#define __HAVE_ARCH_MEMCPY
|
||||
#define __HAVE_ARCH_MEMCMP
|
||||
#define __HAVE_ARCH_STRCHR
|
||||
#define __HAVE_ARCH_STRCPY
|
||||
#define __HAVE_ARCH_STRCMP
|
||||
#define __HAVE_ARCH_STRLEN
|
||||
|
||||
extern void *memset(void *ptr, int, __kernel_size_t);
|
||||
extern void *memcpy(void *, const void *, __kernel_size_t);
|
||||
extern void memzero(void *ptr, __kernel_size_t n);
|
||||
extern int memcmp(const void *, const void *, __kernel_size_t);
|
||||
extern char *strchr(const char *s, int c);
|
||||
extern char *strcpy(char *dest, const char *src);
|
||||
extern int strcmp(const char *cs, const char *ct);
|
||||
extern __kernel_size_t strlen(const char *);
|
||||
|
||||
#endif /* __ASM_ARC_STRING_H */
|
||||
|
||||
@@ -1,15 +1,48 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_TYPES_H
|
||||
#define __ASM_ARC_TYPES_H
|
||||
|
||||
#include <asm-generic/int-ll64.h>
|
||||
|
||||
typedef unsigned short umode_t;
|
||||
|
||||
/*
|
||||
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
|
||||
* header files exported to user space
|
||||
*/
|
||||
|
||||
typedef __signed__ char __s8;
|
||||
typedef unsigned char __u8;
|
||||
|
||||
typedef __signed__ short __s16;
|
||||
typedef unsigned short __u16;
|
||||
|
||||
typedef __signed__ int __s32;
|
||||
typedef unsigned int __u32;
|
||||
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
typedef __signed__ long long __s64;
|
||||
typedef unsigned long long __u64;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* These aren't exported outside the kernel to avoid name space clashes
|
||||
*/
|
||||
typedef signed char s8;
|
||||
typedef unsigned char u8;
|
||||
|
||||
typedef signed short s16;
|
||||
typedef unsigned short u16;
|
||||
|
||||
typedef signed int s32;
|
||||
typedef unsigned int u32;
|
||||
|
||||
typedef signed long long s64;
|
||||
typedef unsigned long long u64;
|
||||
|
||||
#define BITS_PER_LONG 32
|
||||
|
||||
/* Dma addresses are 32-bits wide. */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_U_BOOT_ARC_H__
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARC_U_BOOT_H__
|
||||
#define __ASM_ARC_U_BOOT_H__
|
||||
|
||||
#include <asm-generic/u-boot.h>
|
||||
#include <asm/u-boot-arc.h>
|
||||
|
||||
/* For image.h:image_check_target_arch() */
|
||||
#define IH_ARCH_DEFAULT IH_ARCH_ARC
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
extra-y = start.o
|
||||
head-y := start.o
|
||||
@@ -8,7 +10,15 @@ obj-y += cache.o
|
||||
obj-y += cpu.o
|
||||
obj-y += interrupts.o
|
||||
obj-y += relocate.o
|
||||
obj-y += strchr-700.o
|
||||
obj-y += strcmp.o
|
||||
obj-y += strcpy-700.o
|
||||
obj-y += strlen.o
|
||||
obj-y += memcmp.o
|
||||
obj-y += memcpy-700.o
|
||||
obj-y += memset.o
|
||||
obj-y += reset.o
|
||||
obj-y += timer.o
|
||||
obj-y += ints_low.o
|
||||
obj-y += init_helpers.o
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 1995, 1997, 2007-2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
/* ANSI concatenation macros. */
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <asm/cache.h>
|
||||
#include <common.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
@@ -40,64 +40,54 @@ void arch_lmb_reserve(struct lmb *lmb)
|
||||
static int cleanup_before_linux(void)
|
||||
{
|
||||
disable_interrupts();
|
||||
sync_n_cleanup_cache_all();
|
||||
flush_dcache_all();
|
||||
invalidate_icache_all();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
__weak int board_prep_linux(bootm_headers_t *images) { return 0; }
|
||||
|
||||
/* Subcommand: PREP */
|
||||
static int boot_prep_linux(bootm_headers_t *images)
|
||||
static void boot_prep_linux(bootm_headers_t *images)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = image_setup_linux(images);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return board_prep_linux(images);
|
||||
if (image_setup_linux(images))
|
||||
hang();
|
||||
}
|
||||
|
||||
/* Generic implementation for single core CPU */
|
||||
__weak void board_jump_and_run(ulong entry, int zero, int arch, uint params)
|
||||
{
|
||||
void (*kernel_entry)(int zero, int arch, uint params);
|
||||
|
||||
kernel_entry = (void (*)(int, int, uint))entry;
|
||||
|
||||
kernel_entry(zero, arch, params);
|
||||
}
|
||||
__weak void smp_set_core_boot_addr(unsigned long addr, int corenr) {}
|
||||
__weak void smp_kick_all_cpus(void) {}
|
||||
|
||||
/* Subcommand: GO */
|
||||
static void boot_jump_linux(bootm_headers_t *images, int flag)
|
||||
{
|
||||
ulong kernel_entry;
|
||||
void (*kernel_entry)(int zero, int arch, uint params);
|
||||
unsigned int r0, r2;
|
||||
int fake = (flag & BOOTM_STATE_OS_FAKE_GO);
|
||||
|
||||
kernel_entry = images->ep;
|
||||
kernel_entry = (void (*)(int, int, uint))images->ep;
|
||||
|
||||
debug("## Transferring control to Linux (at address %08lx)...\n",
|
||||
kernel_entry);
|
||||
(ulong) kernel_entry);
|
||||
bootstage_mark(BOOTSTAGE_ID_RUN_OS);
|
||||
|
||||
printf("\nStarting kernel ...%s\n\n", fake ?
|
||||
"(fake run for tracing)" : "");
|
||||
bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
|
||||
|
||||
cleanup_before_linux();
|
||||
|
||||
if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) {
|
||||
r0 = 2;
|
||||
r2 = (unsigned int)images->ft_addr;
|
||||
} else {
|
||||
r0 = 1;
|
||||
r2 = (unsigned int)env_get("bootargs");
|
||||
r2 = (unsigned int)getenv("bootargs");
|
||||
}
|
||||
|
||||
cleanup_before_linux();
|
||||
smp_set_core_boot_addr((unsigned long)kernel_entry, -1);
|
||||
smp_kick_all_cpus();
|
||||
|
||||
if (!fake)
|
||||
board_jump_and_run(kernel_entry, r0, 0, r2);
|
||||
kernel_entry(r0, 0, r2);
|
||||
}
|
||||
|
||||
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
|
||||
@@ -106,13 +96,17 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
|
||||
if ((flag & BOOTM_STATE_OS_BD_T) || (flag & BOOTM_STATE_OS_CMDLINE))
|
||||
return -1;
|
||||
|
||||
if (flag & BOOTM_STATE_OS_PREP)
|
||||
return boot_prep_linux(images);
|
||||
if (flag & BOOTM_STATE_OS_PREP) {
|
||||
boot_prep_linux(images);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (flag & (BOOTM_STATE_OS_GO | BOOTM_STATE_OS_FAKE_GO)) {
|
||||
boot_jump_linux(images, flag);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
boot_prep_linux(images);
|
||||
boot_jump_linux(images, flag);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,536 +1,283 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <common.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/log2.h>
|
||||
#include <asm/arcregs.h>
|
||||
#include <asm/arc-bcr.h>
|
||||
#include <asm/cache.h>
|
||||
|
||||
/*
|
||||
* [ NOTE 1 ]:
|
||||
* Data cache (L1 D$ or SL$) entire invalidate operation or data cache disable
|
||||
* operation may result in unexpected behavior and data loss even if we flush
|
||||
* data cache right before invalidation. That may happens if we store any context
|
||||
* on stack (like we store BLINK register on stack before function call).
|
||||
* BLINK register is the register where return address is automatically saved
|
||||
* when we do function call with instructions like 'bl'.
|
||||
*
|
||||
* There is the real example:
|
||||
* We may hang in the next code as we store any BLINK register on stack in
|
||||
* invalidate_dcache_all() function.
|
||||
*
|
||||
* void flush_dcache_all() {
|
||||
* __dc_entire_op(OP_FLUSH);
|
||||
* // Other code //
|
||||
* }
|
||||
*
|
||||
* void invalidate_dcache_all() {
|
||||
* __dc_entire_op(OP_INV);
|
||||
* // Other code //
|
||||
* }
|
||||
*
|
||||
* void foo(void) {
|
||||
* flush_dcache_all();
|
||||
* invalidate_dcache_all();
|
||||
* }
|
||||
*
|
||||
* Now let's see what really happens during that code execution:
|
||||
*
|
||||
* foo()
|
||||
* |->> call flush_dcache_all
|
||||
* [return address is saved to BLINK register]
|
||||
* [push BLINK] (save to stack) ![point 1]
|
||||
* |->> call __dc_entire_op(OP_FLUSH)
|
||||
* [return address is saved to BLINK register]
|
||||
* [flush L1 D$]
|
||||
* return [jump to BLINK]
|
||||
* <<------
|
||||
* [other flush_dcache_all code]
|
||||
* [pop BLINK] (get from stack)
|
||||
* return [jump to BLINK]
|
||||
* <<------
|
||||
* |->> call invalidate_dcache_all
|
||||
* [return address is saved to BLINK register]
|
||||
* [push BLINK] (save to stack) ![point 2]
|
||||
* |->> call __dc_entire_op(OP_FLUSH)
|
||||
* [return address is saved to BLINK register]
|
||||
* [invalidate L1 D$] ![point 3]
|
||||
* // Oops!!!
|
||||
* // We lose return address from invalidate_dcache_all function:
|
||||
* // we save it to stack and invalidate L1 D$ after that!
|
||||
* return [jump to BLINK]
|
||||
* <<------
|
||||
* [other invalidate_dcache_all code]
|
||||
* [pop BLINK] (get from stack)
|
||||
* // we don't have this data in L1 dcache as we invalidated it in [point 3]
|
||||
* // so we get it from next memory level (for example DDR memory)
|
||||
* // but in the memory we have value which we save in [point 1], which
|
||||
* // is return address from flush_dcache_all function (instead of
|
||||
* // address from current invalidate_dcache_all function which we
|
||||
* // saved in [point 2] !)
|
||||
* return [jump to BLINK]
|
||||
* <<------
|
||||
* // As BLINK points to invalidate_dcache_all, we call it again and
|
||||
* // loop forever.
|
||||
*
|
||||
* Fortunately we may fix that by using flush & invalidation of D$ with a single
|
||||
* one instruction (instead of flush and invalidation instructions pair) and
|
||||
* enabling force function inline with '__attribute__((always_inline))' gcc
|
||||
* attribute to avoid any function call (and BLINK store) between cache flush
|
||||
* and disable.
|
||||
*
|
||||
*
|
||||
* [ NOTE 2 ]:
|
||||
* As of today we only support the following cache configurations on ARC.
|
||||
* Other configurations may exist in HW (for example, since version 3.0 HS
|
||||
* supports SL$ (L2 system level cache) disable) but we don't support it in SW.
|
||||
* Configuration 1:
|
||||
* ______________________
|
||||
* | |
|
||||
* | ARC CPU |
|
||||
* |______________________|
|
||||
* ___|___ ___|___
|
||||
* | | | |
|
||||
* | L1 I$ | | L1 D$ |
|
||||
* |_______| |_______|
|
||||
* on/off on/off
|
||||
* ___|______________|____
|
||||
* | |
|
||||
* | main memory |
|
||||
* |______________________|
|
||||
*
|
||||
* Configuration 2:
|
||||
* ______________________
|
||||
* | |
|
||||
* | ARC CPU |
|
||||
* |______________________|
|
||||
* ___|___ ___|___
|
||||
* | | | |
|
||||
* | L1 I$ | | L1 D$ |
|
||||
* |_______| |_______|
|
||||
* on/off on/off
|
||||
* ___|______________|____
|
||||
* | |
|
||||
* | L2 (SL$) |
|
||||
* |______________________|
|
||||
* always must be on
|
||||
* ___|______________|____
|
||||
* | |
|
||||
* | main memory |
|
||||
* |______________________|
|
||||
*
|
||||
* Configuration 3:
|
||||
* ______________________
|
||||
* | |
|
||||
* | ARC CPU |
|
||||
* |______________________|
|
||||
* ___|___ ___|___
|
||||
* | | | |
|
||||
* | L1 I$ | | L1 D$ |
|
||||
* |_______| |_______|
|
||||
* on/off must be on
|
||||
* ___|______________|____ _______
|
||||
* | | | |
|
||||
* | L2 (SL$) |-----| IOC |
|
||||
* |______________________| |_______|
|
||||
* always must be on on/off
|
||||
* ___|______________|____
|
||||
* | |
|
||||
* | main memory |
|
||||
* |______________________|
|
||||
*/
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/* Bit values in IC_CTRL */
|
||||
#define IC_CTRL_CACHE_DISABLE BIT(0)
|
||||
#define IC_CTRL_CACHE_DISABLE (1 << 0)
|
||||
|
||||
/* Bit values in DC_CTRL */
|
||||
#define DC_CTRL_CACHE_DISABLE BIT(0)
|
||||
#define DC_CTRL_INV_MODE_FLUSH BIT(6)
|
||||
#define DC_CTRL_FLUSH_STATUS BIT(8)
|
||||
#define DC_CTRL_CACHE_DISABLE (1 << 0)
|
||||
#define DC_CTRL_INV_MODE_FLUSH (1 << 6)
|
||||
#define DC_CTRL_FLUSH_STATUS (1 << 8)
|
||||
#define CACHE_VER_NUM_MASK 0xF
|
||||
#define SLC_CTRL_SB (1 << 2)
|
||||
|
||||
#define OP_INV BIT(0)
|
||||
#define OP_FLUSH BIT(1)
|
||||
#define OP_FLUSH_N_INV (OP_FLUSH | OP_INV)
|
||||
|
||||
/* Bit val in SLC_CONTROL */
|
||||
#define SLC_CTRL_DIS 0x001
|
||||
#define SLC_CTRL_IM 0x040
|
||||
#define SLC_CTRL_BUSY 0x100
|
||||
#define SLC_CTRL_RGN_OP_INV 0x200
|
||||
|
||||
#define CACHE_LINE_MASK (~(gd->arch.l1_line_sz - 1))
|
||||
#define OP_INV 0x1
|
||||
#define OP_FLUSH 0x2
|
||||
#define OP_INV_IC 0x3
|
||||
|
||||
/*
|
||||
* We don't want to use '__always_inline' macro here as it can be redefined
|
||||
* to simple 'inline' in some cases which breaks stuff. See [ NOTE 1 ] for more
|
||||
* details about the reasons we need to use always_inline functions.
|
||||
* By default that variable will fall into .bss section.
|
||||
* But .bss section is not relocated and so it will be initilized before
|
||||
* relocation but will be used after being zeroed.
|
||||
*/
|
||||
#define inlined_cachefunc inline __attribute__((always_inline))
|
||||
int l1_line_sz __section(".data");
|
||||
int dcache_exists __section(".data");
|
||||
int icache_exists __section(".data");
|
||||
|
||||
static inlined_cachefunc void __ic_entire_invalidate(void);
|
||||
static inlined_cachefunc void __dc_entire_op(const int cacheop);
|
||||
#define CACHE_LINE_MASK (~(l1_line_sz - 1))
|
||||
|
||||
static inline bool pae_exists(void)
|
||||
{
|
||||
/* TODO: should we compare mmu version from BCR and from CONFIG? */
|
||||
#if (CONFIG_ARC_MMU_VER >= 4)
|
||||
union bcr_mmu_4 mmu4;
|
||||
|
||||
mmu4.word = read_aux_reg(ARC_AUX_MMU_BCR);
|
||||
|
||||
if (mmu4.fields.pae)
|
||||
return true;
|
||||
#endif /* (CONFIG_ARC_MMU_VER >= 4) */
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static inlined_cachefunc bool icache_exists(void)
|
||||
{
|
||||
union bcr_di_cache ibcr;
|
||||
|
||||
ibcr.word = read_aux_reg(ARC_BCR_IC_BUILD);
|
||||
return !!ibcr.fields.ver;
|
||||
}
|
||||
|
||||
static inlined_cachefunc bool icache_enabled(void)
|
||||
{
|
||||
if (!icache_exists())
|
||||
return false;
|
||||
|
||||
return !(read_aux_reg(ARC_AUX_IC_CTRL) & IC_CTRL_CACHE_DISABLE);
|
||||
}
|
||||
|
||||
static inlined_cachefunc bool dcache_exists(void)
|
||||
{
|
||||
union bcr_di_cache dbcr;
|
||||
|
||||
dbcr.word = read_aux_reg(ARC_BCR_DC_BUILD);
|
||||
return !!dbcr.fields.ver;
|
||||
}
|
||||
|
||||
static inlined_cachefunc bool dcache_enabled(void)
|
||||
{
|
||||
if (!dcache_exists())
|
||||
return false;
|
||||
|
||||
return !(read_aux_reg(ARC_AUX_DC_CTRL) & DC_CTRL_CACHE_DISABLE);
|
||||
}
|
||||
|
||||
static inlined_cachefunc bool slc_exists(void)
|
||||
{
|
||||
if (is_isa_arcv2()) {
|
||||
union bcr_generic sbcr;
|
||||
|
||||
sbcr.word = read_aux_reg(ARC_BCR_SLC);
|
||||
return !!sbcr.fields.ver;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static inlined_cachefunc bool slc_data_bypass(void)
|
||||
{
|
||||
/*
|
||||
* If L1 data cache is disabled SL$ is bypassed and all load/store
|
||||
* requests are sent directly to main memory.
|
||||
*/
|
||||
return !dcache_enabled();
|
||||
}
|
||||
|
||||
static inline bool ioc_exists(void)
|
||||
{
|
||||
if (is_isa_arcv2()) {
|
||||
union bcr_clust_cfg cbcr;
|
||||
|
||||
cbcr.word = read_aux_reg(ARC_BCR_CLUSTER);
|
||||
return cbcr.fields.c;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool ioc_enabled(void)
|
||||
{
|
||||
/*
|
||||
* We check only CONFIG option instead of IOC HW state check as IOC
|
||||
* must be disabled by default.
|
||||
*/
|
||||
if (is_ioc_enabled())
|
||||
return ioc_exists();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static inlined_cachefunc void __slc_entire_op(const int op)
|
||||
{
|
||||
unsigned int ctrl;
|
||||
|
||||
if (!slc_exists())
|
||||
return;
|
||||
|
||||
ctrl = read_aux_reg(ARC_AUX_SLC_CTRL);
|
||||
|
||||
if (!(op & OP_FLUSH)) /* i.e. OP_INV */
|
||||
ctrl &= ~SLC_CTRL_IM; /* clear IM: Disable flush before Inv */
|
||||
else
|
||||
ctrl |= SLC_CTRL_IM;
|
||||
|
||||
write_aux_reg(ARC_AUX_SLC_CTRL, ctrl);
|
||||
|
||||
if (op & OP_INV) /* Inv or flush-n-inv use same cmd reg */
|
||||
write_aux_reg(ARC_AUX_SLC_INVALIDATE, 0x1);
|
||||
else
|
||||
write_aux_reg(ARC_AUX_SLC_FLUSH, 0x1);
|
||||
|
||||
/* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */
|
||||
read_aux_reg(ARC_AUX_SLC_CTRL);
|
||||
|
||||
/* Important to wait for flush to complete */
|
||||
while (read_aux_reg(ARC_AUX_SLC_CTRL) & SLC_CTRL_BUSY);
|
||||
}
|
||||
|
||||
static void slc_upper_region_init(void)
|
||||
{
|
||||
/*
|
||||
* ARC_AUX_SLC_RGN_START1 and ARC_AUX_SLC_RGN_END1 register exist
|
||||
* only if PAE exists in current HW. So we had to check pae_exist
|
||||
* before using them.
|
||||
*/
|
||||
if (!pae_exists())
|
||||
return;
|
||||
|
||||
/*
|
||||
* ARC_AUX_SLC_RGN_END1 and ARC_AUX_SLC_RGN_START1 are always == 0
|
||||
* as we don't use PAE40.
|
||||
*/
|
||||
write_aux_reg(ARC_AUX_SLC_RGN_END1, 0);
|
||||
write_aux_reg(ARC_AUX_SLC_RGN_START1, 0);
|
||||
}
|
||||
|
||||
static void __slc_rgn_op(unsigned long paddr, unsigned long sz, const int op)
|
||||
{
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
int slc_line_sz __section(".data");
|
||||
int slc_exists __section(".data");
|
||||
int ioc_exists __section(".data");
|
||||
|
||||
unsigned int ctrl;
|
||||
unsigned long end;
|
||||
|
||||
if (!slc_exists())
|
||||
return;
|
||||
|
||||
/*
|
||||
* The Region Flush operation is specified by CTRL.RGN_OP[11..9]
|
||||
* - b'000 (default) is Flush,
|
||||
* - b'001 is Invalidate if CTRL.IM == 0
|
||||
* - b'001 is Flush-n-Invalidate if CTRL.IM == 1
|
||||
*/
|
||||
ctrl = read_aux_reg(ARC_AUX_SLC_CTRL);
|
||||
|
||||
/* Don't rely on default value of IM bit */
|
||||
if (!(op & OP_FLUSH)) /* i.e. OP_INV */
|
||||
ctrl &= ~SLC_CTRL_IM; /* clear IM: Disable flush before Inv */
|
||||
else
|
||||
ctrl |= SLC_CTRL_IM;
|
||||
|
||||
if (op & OP_INV)
|
||||
ctrl |= SLC_CTRL_RGN_OP_INV; /* Inv or flush-n-inv */
|
||||
else
|
||||
ctrl &= ~SLC_CTRL_RGN_OP_INV;
|
||||
|
||||
write_aux_reg(ARC_AUX_SLC_CTRL, ctrl);
|
||||
|
||||
/*
|
||||
* Lower bits are ignored, no need to clip
|
||||
* END needs to be setup before START (latter triggers the operation)
|
||||
* END can't be same as START, so add (l2_line_sz - 1) to sz
|
||||
*/
|
||||
end = paddr + sz + gd->arch.slc_line_sz - 1;
|
||||
|
||||
/*
|
||||
* Upper addresses (ARC_AUX_SLC_RGN_END1 and ARC_AUX_SLC_RGN_START1)
|
||||
* are always == 0 as we don't use PAE40, so we only setup lower ones
|
||||
* (ARC_AUX_SLC_RGN_END and ARC_AUX_SLC_RGN_START)
|
||||
*/
|
||||
write_aux_reg(ARC_AUX_SLC_RGN_END, end);
|
||||
write_aux_reg(ARC_AUX_SLC_RGN_START, paddr);
|
||||
|
||||
/* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */
|
||||
read_aux_reg(ARC_AUX_SLC_CTRL);
|
||||
|
||||
while (read_aux_reg(ARC_AUX_SLC_CTRL) & SLC_CTRL_BUSY);
|
||||
|
||||
#endif /* CONFIG_ISA_ARCV2 */
|
||||
}
|
||||
|
||||
static void arc_ioc_setup(void)
|
||||
static unsigned int __before_slc_op(const int op)
|
||||
{
|
||||
/* IOC Aperture start is equal to DDR start */
|
||||
unsigned int ap_base = CONFIG_SYS_SDRAM_BASE;
|
||||
/* IOC Aperture size is equal to DDR size */
|
||||
long ap_size = CONFIG_SYS_SDRAM_SIZE;
|
||||
unsigned int reg = reg;
|
||||
|
||||
/* Unsupported configuration. See [ NOTE 2 ] for more details. */
|
||||
if (!slc_exists())
|
||||
panic("Try to enable IOC but SLC is not present");
|
||||
if (op == OP_INV) {
|
||||
/*
|
||||
* IM is set by default and implies Flush-n-inv
|
||||
* Clear it here for vanilla inv
|
||||
*/
|
||||
reg = read_aux_reg(ARC_AUX_SLC_CTRL);
|
||||
write_aux_reg(ARC_AUX_SLC_CTRL, reg & ~DC_CTRL_INV_MODE_FLUSH);
|
||||
}
|
||||
|
||||
/* Unsupported configuration. See [ NOTE 2 ] for more details. */
|
||||
if (!dcache_enabled())
|
||||
panic("Try to enable IOC but L1 D$ is disabled");
|
||||
|
||||
if (!is_power_of_2(ap_size) || ap_size < 4096)
|
||||
panic("IOC Aperture size must be power of 2 and bigger 4Kib");
|
||||
|
||||
/* IOC Aperture start must be aligned to the size of the aperture */
|
||||
if (ap_base % ap_size != 0)
|
||||
panic("IOC Aperture start must be aligned to the size of the aperture");
|
||||
|
||||
flush_n_invalidate_dcache_all();
|
||||
|
||||
/*
|
||||
* IOC Aperture size decoded as 2 ^ (SIZE + 2) KB,
|
||||
* so setting 0x11 implies 512M, 0x12 implies 1G...
|
||||
*/
|
||||
write_aux_reg(ARC_AUX_IO_COH_AP0_SIZE,
|
||||
order_base_2(ap_size / 1024) - 2);
|
||||
|
||||
write_aux_reg(ARC_AUX_IO_COH_AP0_BASE, ap_base >> 12);
|
||||
write_aux_reg(ARC_AUX_IO_COH_PARTIAL, 1);
|
||||
write_aux_reg(ARC_AUX_IO_COH_ENABLE, 1);
|
||||
return reg;
|
||||
}
|
||||
|
||||
static void __after_slc_op(const int op, unsigned int reg)
|
||||
{
|
||||
if (op & OP_FLUSH) /* flush / flush-n-inv both wait */
|
||||
while (read_aux_reg(ARC_AUX_SLC_CTRL) &
|
||||
DC_CTRL_FLUSH_STATUS)
|
||||
;
|
||||
|
||||
/* Switch back to default Invalidate mode */
|
||||
if (op == OP_INV)
|
||||
write_aux_reg(ARC_AUX_SLC_CTRL, reg | DC_CTRL_INV_MODE_FLUSH);
|
||||
}
|
||||
|
||||
static inline void __slc_line_loop(unsigned long paddr, unsigned long sz,
|
||||
const int op)
|
||||
{
|
||||
unsigned int aux_cmd;
|
||||
int num_lines;
|
||||
|
||||
#define SLC_LINE_MASK (~(slc_line_sz - 1))
|
||||
|
||||
aux_cmd = op & OP_INV ? ARC_AUX_SLC_IVDL : ARC_AUX_SLC_FLDL;
|
||||
|
||||
sz += paddr & ~SLC_LINE_MASK;
|
||||
paddr &= SLC_LINE_MASK;
|
||||
|
||||
num_lines = DIV_ROUND_UP(sz, slc_line_sz);
|
||||
|
||||
while (num_lines-- > 0) {
|
||||
write_aux_reg(aux_cmd, paddr);
|
||||
paddr += slc_line_sz;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void __slc_entire_op(const int cacheop)
|
||||
{
|
||||
int aux;
|
||||
unsigned int ctrl_reg = __before_slc_op(cacheop);
|
||||
|
||||
if (cacheop & OP_INV) /* Inv or flush-n-inv use same cmd reg */
|
||||
aux = ARC_AUX_SLC_INVALIDATE;
|
||||
else
|
||||
aux = ARC_AUX_SLC_FLUSH;
|
||||
|
||||
write_aux_reg(aux, 0x1);
|
||||
|
||||
__after_slc_op(cacheop, ctrl_reg);
|
||||
}
|
||||
|
||||
static inline void __slc_line_op(unsigned long paddr, unsigned long sz,
|
||||
const int cacheop)
|
||||
{
|
||||
unsigned int ctrl_reg = __before_slc_op(cacheop);
|
||||
__slc_line_loop(paddr, sz, cacheop);
|
||||
__after_slc_op(cacheop, ctrl_reg);
|
||||
}
|
||||
#else
|
||||
#define __slc_entire_op(cacheop)
|
||||
#define __slc_line_op(paddr, sz, cacheop)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
static void read_decode_cache_bcr_arcv2(void)
|
||||
{
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
union {
|
||||
struct {
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
unsigned int pad:24, way:2, lsz:2, sz:4;
|
||||
#else
|
||||
unsigned int sz:4, lsz:2, way:2, pad:24;
|
||||
#endif
|
||||
} fields;
|
||||
unsigned int word;
|
||||
} slc_cfg;
|
||||
|
||||
union bcr_slc_cfg slc_cfg;
|
||||
union {
|
||||
struct {
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
unsigned int pad:24, ver:8;
|
||||
#else
|
||||
unsigned int ver:8, pad:24;
|
||||
#endif
|
||||
} fields;
|
||||
unsigned int word;
|
||||
} sbcr;
|
||||
|
||||
if (slc_exists()) {
|
||||
sbcr.word = read_aux_reg(ARC_BCR_SLC);
|
||||
if (sbcr.fields.ver) {
|
||||
slc_cfg.word = read_aux_reg(ARC_AUX_SLC_CONFIG);
|
||||
gd->arch.slc_line_sz = (slc_cfg.fields.lsz == 0) ? 128 : 64;
|
||||
|
||||
/*
|
||||
* We don't support configuration where L1 I$ or L1 D$ is
|
||||
* absent but SL$ exists. See [ NOTE 2 ] for more details.
|
||||
*/
|
||||
if (!icache_exists() || !dcache_exists())
|
||||
panic("Unsupported cache configuration: SLC exists but one of L1 caches is absent");
|
||||
slc_exists = 1;
|
||||
slc_line_sz = (slc_cfg.fields.lsz == 0) ? 128 : 64;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ISA_ARCV2 */
|
||||
union {
|
||||
struct bcr_clust_cfg {
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
unsigned int pad:7, c:1, num_entries:8, num_cores:8, ver:8;
|
||||
#else
|
||||
unsigned int ver:8, num_cores:8, num_entries:8, c:1, pad:7;
|
||||
#endif
|
||||
} fields;
|
||||
unsigned int word;
|
||||
} cbcr;
|
||||
|
||||
cbcr.word = read_aux_reg(ARC_BCR_CLUSTER);
|
||||
if (cbcr.fields.c)
|
||||
ioc_exists = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
void read_decode_cache_bcr(void)
|
||||
{
|
||||
int dc_line_sz = 0, ic_line_sz = 0;
|
||||
union bcr_di_cache ibcr, dbcr;
|
||||
|
||||
/*
|
||||
* We don't care much about I$ line length really as there're
|
||||
* no per-line ops on I$ instead we only do full invalidation of it
|
||||
* on occasion of relocation and right before jumping to the OS.
|
||||
* Still we check insane config with zero-encoded line length in
|
||||
* presense of version field in I$ BCR. Just in case.
|
||||
*/
|
||||
union {
|
||||
struct {
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
unsigned int pad:12, line_len:4, sz:4, config:4, ver:8;
|
||||
#else
|
||||
unsigned int ver:8, config:4, sz:4, line_len:4, pad:12;
|
||||
#endif
|
||||
} fields;
|
||||
unsigned int word;
|
||||
} ibcr, dbcr;
|
||||
|
||||
ibcr.word = read_aux_reg(ARC_BCR_IC_BUILD);
|
||||
if (ibcr.fields.ver) {
|
||||
ic_line_sz = 8 << ibcr.fields.line_len;
|
||||
icache_exists = 1;
|
||||
l1_line_sz = ic_line_sz = 8 << ibcr.fields.line_len;
|
||||
if (!ic_line_sz)
|
||||
panic("Instruction exists but line length is 0\n");
|
||||
}
|
||||
|
||||
dbcr.word = read_aux_reg(ARC_BCR_DC_BUILD);
|
||||
if (dbcr.fields.ver) {
|
||||
gd->arch.l1_line_sz = dc_line_sz = 16 << dbcr.fields.line_len;
|
||||
if (dbcr.fields.ver){
|
||||
dcache_exists = 1;
|
||||
l1_line_sz = dc_line_sz = 16 << dbcr.fields.line_len;
|
||||
if (!dc_line_sz)
|
||||
panic("Data cache exists but line length is 0\n");
|
||||
}
|
||||
|
||||
if (ic_line_sz && dc_line_sz && (ic_line_sz != dc_line_sz))
|
||||
panic("Instruction and data cache line lengths differ\n");
|
||||
}
|
||||
|
||||
void cache_init(void)
|
||||
{
|
||||
read_decode_cache_bcr();
|
||||
|
||||
if (is_isa_arcv2())
|
||||
read_decode_cache_bcr_arcv2();
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
read_decode_cache_bcr_arcv2();
|
||||
|
||||
if (is_isa_arcv2() && ioc_enabled())
|
||||
arc_ioc_setup();
|
||||
if (ioc_exists) {
|
||||
flush_dcache_all();
|
||||
invalidate_dcache_all();
|
||||
|
||||
if (is_isa_arcv2() && slc_exists())
|
||||
slc_upper_region_init();
|
||||
/* IO coherency base - 0x8z */
|
||||
write_aux_reg(ARC_AUX_IO_COH_AP0_BASE, 0x80000);
|
||||
/* IO coherency aperture size - 512Mb: 0x8z-0xAz */
|
||||
write_aux_reg(ARC_AUX_IO_COH_AP0_SIZE, 0x11);
|
||||
/* Enable partial writes */
|
||||
write_aux_reg(ARC_AUX_IO_COH_PARTIAL, 1);
|
||||
/* Enable IO coherency */
|
||||
write_aux_reg(ARC_AUX_IO_COH_ENABLE, 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int icache_status(void)
|
||||
{
|
||||
return icache_enabled();
|
||||
if (!icache_exists)
|
||||
return 0;
|
||||
|
||||
if (read_aux_reg(ARC_AUX_IC_CTRL) & IC_CTRL_CACHE_DISABLE)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
void icache_enable(void)
|
||||
{
|
||||
if (icache_exists())
|
||||
if (icache_exists)
|
||||
write_aux_reg(ARC_AUX_IC_CTRL, read_aux_reg(ARC_AUX_IC_CTRL) &
|
||||
~IC_CTRL_CACHE_DISABLE);
|
||||
}
|
||||
|
||||
void icache_disable(void)
|
||||
{
|
||||
if (!icache_exists())
|
||||
return;
|
||||
|
||||
__ic_entire_invalidate();
|
||||
|
||||
write_aux_reg(ARC_AUX_IC_CTRL, read_aux_reg(ARC_AUX_IC_CTRL) |
|
||||
IC_CTRL_CACHE_DISABLE);
|
||||
}
|
||||
|
||||
/* IC supports only invalidation */
|
||||
static inlined_cachefunc void __ic_entire_invalidate(void)
|
||||
{
|
||||
if (!icache_enabled())
|
||||
return;
|
||||
|
||||
/* Any write to IC_IVIC register triggers invalidation of entire I$ */
|
||||
write_aux_reg(ARC_AUX_IC_IVIC, 1);
|
||||
/*
|
||||
* As per ARC HS databook (see chapter 5.3.3.2)
|
||||
* it is required to add 3 NOPs after each write to IC_IVIC.
|
||||
*/
|
||||
__builtin_arc_nop();
|
||||
__builtin_arc_nop();
|
||||
__builtin_arc_nop();
|
||||
read_aux_reg(ARC_AUX_IC_CTRL); /* blocks */
|
||||
if (icache_exists)
|
||||
write_aux_reg(ARC_AUX_IC_CTRL, read_aux_reg(ARC_AUX_IC_CTRL) |
|
||||
IC_CTRL_CACHE_DISABLE);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_SYS_DCACHE_OFF
|
||||
void invalidate_icache_all(void)
|
||||
{
|
||||
__ic_entire_invalidate();
|
||||
|
||||
/*
|
||||
* If SL$ is bypassed for data it is used only for instructions,
|
||||
* so we need to invalidate it too.
|
||||
* TODO: HS 3.0 supports SLC disable so we need to check slc
|
||||
* enable/disable status here.
|
||||
*/
|
||||
if (is_isa_arcv2() && slc_data_bypass())
|
||||
__slc_entire_op(OP_INV);
|
||||
/* Any write to IC_IVIC register triggers invalidation of entire I$ */
|
||||
if (icache_status()) {
|
||||
write_aux_reg(ARC_AUX_IC_IVIC, 1);
|
||||
read_aux_reg(ARC_AUX_IC_CTRL); /* blocks */
|
||||
}
|
||||
}
|
||||
#else
|
||||
void invalidate_icache_all(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
int dcache_status(void)
|
||||
{
|
||||
return dcache_enabled();
|
||||
if (!dcache_exists)
|
||||
return 0;
|
||||
|
||||
if (read_aux_reg(ARC_AUX_DC_CTRL) & DC_CTRL_CACHE_DISABLE)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
void dcache_enable(void)
|
||||
{
|
||||
if (!dcache_exists())
|
||||
if (!dcache_exists)
|
||||
return;
|
||||
|
||||
write_aux_reg(ARC_AUX_DC_CTRL, read_aux_reg(ARC_AUX_DC_CTRL) &
|
||||
@@ -539,77 +286,84 @@ void dcache_enable(void)
|
||||
|
||||
void dcache_disable(void)
|
||||
{
|
||||
if (!dcache_exists())
|
||||
if (!dcache_exists)
|
||||
return;
|
||||
|
||||
__dc_entire_op(OP_FLUSH_N_INV);
|
||||
|
||||
/*
|
||||
* As SLC will be bypassed for data after L1 D$ disable we need to
|
||||
* flush it first before L1 D$ disable. Also we invalidate SLC to
|
||||
* avoid any inconsistent data problems after enabling L1 D$ again with
|
||||
* dcache_enable function.
|
||||
*/
|
||||
if (is_isa_arcv2())
|
||||
__slc_entire_op(OP_FLUSH_N_INV);
|
||||
|
||||
write_aux_reg(ARC_AUX_DC_CTRL, read_aux_reg(ARC_AUX_DC_CTRL) |
|
||||
DC_CTRL_CACHE_DISABLE);
|
||||
}
|
||||
|
||||
/* Common Helper for Line Operations on D-cache */
|
||||
static inline void __dcache_line_loop(unsigned long paddr, unsigned long sz,
|
||||
const int cacheop)
|
||||
#ifndef CONFIG_SYS_DCACHE_OFF
|
||||
/*
|
||||
* Common Helper for Line Operations on {I,D}-Cache
|
||||
*/
|
||||
static inline void __cache_line_loop(unsigned long paddr, unsigned long sz,
|
||||
const int cacheop)
|
||||
{
|
||||
unsigned int aux_cmd;
|
||||
#if (CONFIG_ARC_MMU_VER == 3)
|
||||
unsigned int aux_tag;
|
||||
#endif
|
||||
int num_lines;
|
||||
|
||||
/* d$ cmd: INV (discard or wback-n-discard) OR FLUSH (wback) */
|
||||
aux_cmd = cacheop & OP_INV ? ARC_AUX_DC_IVDL : ARC_AUX_DC_FLDL;
|
||||
if (cacheop == OP_INV_IC) {
|
||||
aux_cmd = ARC_AUX_IC_IVIL;
|
||||
#if (CONFIG_ARC_MMU_VER == 3)
|
||||
aux_tag = ARC_AUX_IC_PTAG;
|
||||
#endif
|
||||
} else {
|
||||
/* d$ cmd: INV (discard or wback-n-discard) OR FLUSH (wback) */
|
||||
aux_cmd = cacheop & OP_INV ? ARC_AUX_DC_IVDL : ARC_AUX_DC_FLDL;
|
||||
#if (CONFIG_ARC_MMU_VER == 3)
|
||||
aux_tag = ARC_AUX_DC_PTAG;
|
||||
#endif
|
||||
}
|
||||
|
||||
sz += paddr & ~CACHE_LINE_MASK;
|
||||
paddr &= CACHE_LINE_MASK;
|
||||
|
||||
num_lines = DIV_ROUND_UP(sz, gd->arch.l1_line_sz);
|
||||
num_lines = DIV_ROUND_UP(sz, l1_line_sz);
|
||||
|
||||
while (num_lines-- > 0) {
|
||||
#if (CONFIG_ARC_MMU_VER == 3)
|
||||
write_aux_reg(ARC_AUX_DC_PTAG, paddr);
|
||||
write_aux_reg(aux_tag, paddr);
|
||||
#endif
|
||||
write_aux_reg(aux_cmd, paddr);
|
||||
paddr += gd->arch.l1_line_sz;
|
||||
paddr += l1_line_sz;
|
||||
}
|
||||
}
|
||||
|
||||
static inlined_cachefunc void __before_dc_op(const int op)
|
||||
static unsigned int __before_dc_op(const int op)
|
||||
{
|
||||
unsigned int ctrl;
|
||||
unsigned int reg;
|
||||
|
||||
ctrl = read_aux_reg(ARC_AUX_DC_CTRL);
|
||||
if (op == OP_INV) {
|
||||
/*
|
||||
* IM is set by default and implies Flush-n-inv
|
||||
* Clear it here for vanilla inv
|
||||
*/
|
||||
reg = read_aux_reg(ARC_AUX_DC_CTRL);
|
||||
write_aux_reg(ARC_AUX_DC_CTRL, reg & ~DC_CTRL_INV_MODE_FLUSH);
|
||||
}
|
||||
|
||||
/* IM bit implies flush-n-inv, instead of vanilla inv */
|
||||
if (op == OP_INV)
|
||||
ctrl &= ~DC_CTRL_INV_MODE_FLUSH;
|
||||
else
|
||||
ctrl |= DC_CTRL_INV_MODE_FLUSH;
|
||||
|
||||
write_aux_reg(ARC_AUX_DC_CTRL, ctrl);
|
||||
return reg;
|
||||
}
|
||||
|
||||
static inlined_cachefunc void __after_dc_op(const int op)
|
||||
static void __after_dc_op(const int op, unsigned int reg)
|
||||
{
|
||||
if (op & OP_FLUSH) /* flush / flush-n-inv both wait */
|
||||
while (read_aux_reg(ARC_AUX_DC_CTRL) & DC_CTRL_FLUSH_STATUS);
|
||||
while (read_aux_reg(ARC_AUX_DC_CTRL) & DC_CTRL_FLUSH_STATUS)
|
||||
;
|
||||
|
||||
/* Switch back to default Invalidate mode */
|
||||
if (op == OP_INV)
|
||||
write_aux_reg(ARC_AUX_DC_CTRL, reg | DC_CTRL_INV_MODE_FLUSH);
|
||||
}
|
||||
|
||||
static inlined_cachefunc void __dc_entire_op(const int cacheop)
|
||||
static inline void __dc_entire_op(const int cacheop)
|
||||
{
|
||||
int aux;
|
||||
|
||||
if (!dcache_enabled())
|
||||
return;
|
||||
|
||||
__before_dc_op(cacheop);
|
||||
unsigned int ctrl_reg = __before_dc_op(cacheop);
|
||||
|
||||
if (cacheop & OP_INV) /* Inv or flush-n-inv use same cmd reg */
|
||||
aux = ARC_AUX_DC_IVDC;
|
||||
@@ -618,54 +372,45 @@ static inlined_cachefunc void __dc_entire_op(const int cacheop)
|
||||
|
||||
write_aux_reg(aux, 0x1);
|
||||
|
||||
__after_dc_op(cacheop);
|
||||
__after_dc_op(cacheop, ctrl_reg);
|
||||
}
|
||||
|
||||
static inline void __dc_line_op(unsigned long paddr, unsigned long sz,
|
||||
const int cacheop)
|
||||
{
|
||||
if (!dcache_enabled())
|
||||
return;
|
||||
|
||||
__before_dc_op(cacheop);
|
||||
__dcache_line_loop(paddr, sz, cacheop);
|
||||
__after_dc_op(cacheop);
|
||||
unsigned int ctrl_reg = __before_dc_op(cacheop);
|
||||
__cache_line_loop(paddr, sz, cacheop);
|
||||
__after_dc_op(cacheop, ctrl_reg);
|
||||
}
|
||||
#else
|
||||
#define __dc_entire_op(cacheop)
|
||||
#define __dc_line_op(paddr, sz, cacheop)
|
||||
#endif /* !CONFIG_SYS_DCACHE_OFF */
|
||||
|
||||
void invalidate_dcache_range(unsigned long start, unsigned long end)
|
||||
{
|
||||
if (start >= end)
|
||||
return;
|
||||
|
||||
/*
|
||||
* ARCv1 -> call __dc_line_op
|
||||
* ARCv2 && L1 D$ disabled -> nothing
|
||||
* ARCv2 && L1 D$ enabled && IOC enabled -> nothing
|
||||
* ARCv2 && L1 D$ enabled && no IOC -> call __dc_line_op; call __slc_rgn_op
|
||||
*/
|
||||
if (!is_isa_arcv2() || !ioc_enabled())
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
if (!ioc_exists)
|
||||
#endif
|
||||
__dc_line_op(start, end - start, OP_INV);
|
||||
|
||||
if (is_isa_arcv2() && !ioc_enabled() && !slc_data_bypass())
|
||||
__slc_rgn_op(start, end - start, OP_INV);
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
if (slc_exists && !ioc_exists)
|
||||
__slc_line_op(start, end - start, OP_INV);
|
||||
#endif
|
||||
}
|
||||
|
||||
void flush_dcache_range(unsigned long start, unsigned long end)
|
||||
{
|
||||
if (start >= end)
|
||||
return;
|
||||
|
||||
/*
|
||||
* ARCv1 -> call __dc_line_op
|
||||
* ARCv2 && L1 D$ disabled -> nothing
|
||||
* ARCv2 && L1 D$ enabled && IOC enabled -> nothing
|
||||
* ARCv2 && L1 D$ enabled && no IOC -> call __dc_line_op; call __slc_rgn_op
|
||||
*/
|
||||
if (!is_isa_arcv2() || !ioc_enabled())
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
if (!ioc_exists)
|
||||
#endif
|
||||
__dc_line_op(start, end - start, OP_FLUSH);
|
||||
|
||||
if (is_isa_arcv2() && !ioc_enabled() && !slc_data_bypass())
|
||||
__slc_rgn_op(start, end - start, OP_FLUSH);
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
if (slc_exists && !ioc_exists)
|
||||
__slc_line_op(start, end - start, OP_FLUSH);
|
||||
#endif
|
||||
}
|
||||
|
||||
void flush_cache(unsigned long start, unsigned long size)
|
||||
@@ -673,47 +418,22 @@ void flush_cache(unsigned long start, unsigned long size)
|
||||
flush_dcache_range(start, start + size);
|
||||
}
|
||||
|
||||
/*
|
||||
* As invalidate_dcache_all() is not used in generic U-Boot code and as we
|
||||
* don't need it in arch/arc code alone (invalidate without flush) we implement
|
||||
* flush_n_invalidate_dcache_all (flush and invalidate in 1 operation) because
|
||||
* it's much safer. See [ NOTE 1 ] for more details.
|
||||
*/
|
||||
void flush_n_invalidate_dcache_all(void)
|
||||
void invalidate_dcache_all(void)
|
||||
{
|
||||
__dc_entire_op(OP_FLUSH_N_INV);
|
||||
__dc_entire_op(OP_INV);
|
||||
|
||||
if (is_isa_arcv2() && !slc_data_bypass())
|
||||
__slc_entire_op(OP_FLUSH_N_INV);
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
if (slc_exists)
|
||||
__slc_entire_op(OP_INV);
|
||||
#endif
|
||||
}
|
||||
|
||||
void flush_dcache_all(void)
|
||||
{
|
||||
__dc_entire_op(OP_FLUSH);
|
||||
|
||||
if (is_isa_arcv2() && !slc_data_bypass())
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
if (slc_exists)
|
||||
__slc_entire_op(OP_FLUSH);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is function to cleanup all caches (and therefore sync I/D caches) which
|
||||
* can be used for cleanup before linux launch or to sync caches during
|
||||
* relocation.
|
||||
*/
|
||||
void sync_n_cleanup_cache_all(void)
|
||||
{
|
||||
__dc_entire_op(OP_FLUSH_N_INV);
|
||||
|
||||
/*
|
||||
* If SL$ is bypassed for data it is used only for instructions,
|
||||
* and we shouldn't flush it. So invalidate it instead of flush_n_inv.
|
||||
*/
|
||||
if (is_isa_arcv2()) {
|
||||
if (slc_data_bypass())
|
||||
__slc_entire_op(OP_INV);
|
||||
else
|
||||
__slc_entire_op(OP_FLUSH_N_INV);
|
||||
}
|
||||
|
||||
__ic_entire_invalidate();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2013-2014, 2018 Synopsys, Inc. All rights reserved.
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <malloc.h>
|
||||
#include <asm/arcregs.h>
|
||||
#include <asm/cache.h>
|
||||
|
||||
@@ -28,201 +28,3 @@ int arch_early_init_r(void)
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This is a dummy function on arc */
|
||||
int dram_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DISPLAY_CPUINFO
|
||||
const char *arc_700_version(int arcver, char *name, int name_len)
|
||||
{
|
||||
const char *arc_ver;
|
||||
|
||||
switch (arcver) {
|
||||
case 0x32:
|
||||
arc_ver = "v4.4-4.5";
|
||||
break;
|
||||
case 0x33:
|
||||
arc_ver = "v4.6-v4.9";
|
||||
break;
|
||||
case 0x34:
|
||||
arc_ver = "v4.10";
|
||||
break;
|
||||
case 0x35:
|
||||
arc_ver = "v4.11";
|
||||
break;
|
||||
default:
|
||||
arc_ver = "unknown version";
|
||||
}
|
||||
|
||||
snprintf(name, name_len, "ARC 700 %s", arc_ver);
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
struct em_template_t {
|
||||
const bool cache;
|
||||
const bool dsp;
|
||||
const bool xymem;
|
||||
const char name[8];
|
||||
};
|
||||
|
||||
static const struct em_template_t em_versions[] = {
|
||||
{false, false, false, "EM4"},
|
||||
{true, false, false, "EM6"},
|
||||
{false, true, false, "EM5D"},
|
||||
{true, true, false, "EM7D"},
|
||||
{false, true, true, "EM9D"},
|
||||
{true, true, true, "EM11D"},
|
||||
};
|
||||
|
||||
const char *arc_em_version(int arcver, char *name, int name_len)
|
||||
{
|
||||
const char *arc_name = "EM";
|
||||
const char *arc_ver;
|
||||
bool cache = ARC_FEATURE_EXISTS(ARC_BCR_IC_BUILD);
|
||||
bool dsp = ARC_FEATURE_EXISTS(ARC_AUX_DSP_BUILD);
|
||||
bool xymem = ARC_FEATURE_EXISTS(ARC_AUX_XY_BUILD);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof(em_versions) / sizeof(struct em_template_t); i++) {
|
||||
if (em_versions[i].cache == cache &&
|
||||
em_versions[i].dsp == dsp &&
|
||||
em_versions[i].xymem == xymem) {
|
||||
arc_name = em_versions[i].name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (arcver) {
|
||||
case 0x41:
|
||||
arc_ver = "v1.1a";
|
||||
break;
|
||||
case 0x42:
|
||||
arc_ver = "v3.0";
|
||||
break;
|
||||
case 0x43:
|
||||
arc_ver = "v4.0";
|
||||
break;
|
||||
case 0x44:
|
||||
arc_ver = "v5.0";
|
||||
break;
|
||||
default:
|
||||
arc_ver = "unknown version";
|
||||
}
|
||||
|
||||
snprintf(name, name_len, "ARC %s %s", arc_name, arc_ver);
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
struct hs_template_t {
|
||||
const bool cache;
|
||||
const bool mmu;
|
||||
const bool dual_issue;
|
||||
const bool dsp;
|
||||
const char name[8];
|
||||
};
|
||||
|
||||
static const struct hs_template_t hs_versions[] = {
|
||||
{false, false, false, false, "HS34"},
|
||||
{true, false, false, false, "HS36"},
|
||||
{true, true, false, false, "HS38"},
|
||||
{false, false, true, false, "HS44"},
|
||||
{true, false, true, false, "HS46"},
|
||||
{true, true, true, false, "HS48"},
|
||||
{false, false, true, true, "HS45D"},
|
||||
{true, false, true, true, "HS47D"},
|
||||
};
|
||||
|
||||
const char *arc_hs_version(int arcver, char *name, int name_len)
|
||||
{
|
||||
const char *arc_name = "HS";
|
||||
const char *arc_ver;
|
||||
bool cache = ARC_FEATURE_EXISTS(ARC_BCR_IC_BUILD);
|
||||
bool dsp = ARC_FEATURE_EXISTS(ARC_AUX_DSP_BUILD);
|
||||
bool mmu = !!read_aux_reg(ARC_AUX_MMU_BCR);
|
||||
bool dual_issue = arcver == 0x54 ? true : false;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof(hs_versions) / sizeof(struct hs_template_t); i++) {
|
||||
if (hs_versions[i].cache == cache &&
|
||||
hs_versions[i].mmu == mmu &&
|
||||
hs_versions[i].dual_issue == dual_issue &&
|
||||
hs_versions[i].dsp == dsp) {
|
||||
arc_name = hs_versions[i].name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (arcver) {
|
||||
case 0x50:
|
||||
arc_ver = "v1.0";
|
||||
break;
|
||||
case 0x51:
|
||||
arc_ver = "v2.0";
|
||||
break;
|
||||
case 0x52:
|
||||
arc_ver = "v2.1c";
|
||||
break;
|
||||
case 0x53:
|
||||
arc_ver = "v3.0";
|
||||
break;
|
||||
case 0x54:
|
||||
arc_ver = "v4.0";
|
||||
break;
|
||||
default:
|
||||
arc_ver = "unknown version";
|
||||
}
|
||||
|
||||
snprintf(name, name_len, "ARC %s %s", arc_name, arc_ver);
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
const char *decode_identity(void)
|
||||
{
|
||||
#define MAX_CPU_NAME_LEN 64
|
||||
|
||||
int arcver = read_aux_reg(ARC_AUX_IDENTITY) & 0xff;
|
||||
char *name = malloc(MAX_CPU_NAME_LEN);
|
||||
|
||||
if (arcver >= 0x50)
|
||||
return arc_hs_version(arcver, name, MAX_CPU_NAME_LEN);
|
||||
else if (arcver >= 0x40)
|
||||
return arc_em_version(arcver, name, MAX_CPU_NAME_LEN);
|
||||
else if (arcver >= 0x30)
|
||||
return arc_700_version(arcver, name, MAX_CPU_NAME_LEN);
|
||||
else
|
||||
return "Unknown ARC core";
|
||||
}
|
||||
|
||||
const char *decode_subsystem(void)
|
||||
{
|
||||
int subsys_type = read_aux_reg(ARC_AUX_SUBSYS_BUILD) & GENMASK(3, 0);
|
||||
|
||||
switch (subsys_type) {
|
||||
case 0: return NULL;
|
||||
case 2: return "ARC Sensor & Control IP Subsystem";
|
||||
case 3: return "ARC Data Fusion IP Subsystem";
|
||||
case 4: return "ARC Secure Subsystem";
|
||||
default: return "Unknown subsystem";
|
||||
};
|
||||
}
|
||||
|
||||
__weak int print_cpuinfo(void)
|
||||
{
|
||||
const char *subsys_name = decode_subsystem();
|
||||
char mhz[8];
|
||||
|
||||
printf("CPU: %s at %s MHz\n", decode_identity(),
|
||||
strmhz(mhz, gd->cpu_clk));
|
||||
|
||||
if (subsys_name)
|
||||
printf("Subsys:%s\n", subsys_name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_DISPLAY_CPUINFO */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user