Merge tag 'efi-2019-07-rc5-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
authorTom Rini <trini@konsulko.com>
Fri, 21 Jun 2019 18:12:28 +0000 (14:12 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 21 Jun 2019 18:12:28 +0000 (14:12 -0400)
Pull request for UEFI sub-system for v2019.07-rc5 (3)

This pull request provides error fixes for the graphical output protocol,
the text output protocol, and the extended text input protocol.

Setting the boot device for the bootefi command is now not only supported
by the 'load' command but also for the file system specific commands like
'fatload'.

182 files changed:
.travis.yml
Documentation/Makefile [deleted file]
Documentation/conf.py [deleted file]
Documentation/devicetree/bindings/arm/l2c2x0.txt [deleted file]
Documentation/devicetree/bindings/axi/gdsys,ihs_axi.txt [deleted file]
Documentation/devicetree/bindings/board/gdsys,board_gazerbeam.txt [deleted file]
Documentation/devicetree/bindings/clk/fsl,mpc83xx-clk.txt [deleted file]
Documentation/devicetree/bindings/cpu/fsl,mpc83xx.txt [deleted file]
Documentation/devicetree/bindings/misc/fsl,mpc83xx-serdes.txt [deleted file]
Documentation/devicetree/bindings/misc/gdsys,io-endpoint.txt [deleted file]
Documentation/devicetree/bindings/misc/gdsys,iocon_fpga.txt [deleted file]
Documentation/devicetree/bindings/misc/gdsys,iocpu_fpga.txt [deleted file]
Documentation/devicetree/bindings/misc/gdsys,soc.txt [deleted file]
Documentation/devicetree/bindings/ram/fsl,mpc83xx-mem-controller.txt [deleted file]
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt [deleted file]
Documentation/devicetree/bindings/timer/fsl,mpc83xx-timer.txt [deleted file]
Documentation/efi.rst [deleted file]
Documentation/index.rst [deleted file]
Documentation/linker_lists.rst [deleted file]
Documentation/media/Makefile [deleted file]
Documentation/media/linker_lists.h.rst.exceptions [deleted file]
Documentation/serial.rst [deleted file]
Documentation/sphinx-static/theme_overrides.css [deleted file]
Documentation/sphinx/cdomain.py [deleted file]
Documentation/sphinx/kernel_include.py [deleted file]
Documentation/sphinx/kerneldoc.py [deleted file]
Documentation/sphinx/kfigure.py [deleted file]
Documentation/sphinx/load_config.py [deleted file]
Documentation/sphinx/parse-headers.pl [deleted file]
Documentation/sphinx/requirements.txt [deleted file]
Documentation/sphinx/rstFlatTable.py [deleted file]
MAINTAINERS
Makefile
arch/arm/cpu/armv8/start.S
arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi
arch/powerpc/cpu/mpc85xx/Kconfig
arch/powerpc/cpu/mpc85xx/pci.c
arch/powerpc/dts/t2080.dtsi
arch/powerpc/include/asm/config_mpc85xx.h
board/Arcturus/ucp1020/cmd_arc.c
board/Arcturus/ucp1020/ucp1020.c
board/Arcturus/ucp1020/ucp1020.h
board/armltd/vexpress64/pcie.c
board/bosch/guardian/MAINTAINERS
board/freescale/t208xqds/pci.c
board/xilinx/zynqmp/MAINTAINERS
cmd/led.c
common/image-sig.c
configs/MPC8349EMDS_SDRAM_defconfig
configs/MPC8349EMDS_defconfig
configs/T2080QDS_NAND_defconfig
configs/T2080QDS_SDCARD_defconfig
configs/T2080QDS_SECURE_BOOT_defconfig
configs/T2080QDS_SPIFLASH_defconfig
configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
configs/T2080QDS_defconfig
configs/UCP1020_defconfig
configs/am335x_pdu001_defconfig
configs/apalis-imx8qm_defconfig
configs/apalis_imx6_defconfig
configs/bayleybay_defconfig
configs/cherryhill_defconfig
configs/chromebook_link64_defconfig
configs/chromebook_link_defconfig
configs/chromebook_samus_defconfig
configs/chromebook_samus_tpl_defconfig
configs/chromebox_panther_defconfig
configs/colibri-imx6ull_defconfig
configs/colibri-imx8qxp_defconfig
configs/colibri_imx6_defconfig
configs/colibri_imx7_defconfig
configs/colibri_imx7_emmc_defconfig
configs/colibri_t20_defconfig
configs/conga-qeval20-qa3-e3845-internal-uart_defconfig
configs/conga-qeval20-qa3-e3845_defconfig
configs/cougarcanyon2_defconfig
configs/crownbay_defconfig
configs/dfi-bt700-q7x-151_defconfig
configs/dh_imx6_defconfig
configs/efi-x86_app_defconfig
configs/galileo_defconfig
configs/imx6dl_icore_nand_defconfig
configs/imx6dl_mamoj_defconfig
configs/imx6q_icore_nand_defconfig
configs/imx6qdl_icore_mipi_defconfig
configs/imx6qdl_icore_mmc_defconfig
configs/imx6qdl_icore_rqs_defconfig
configs/imx6ul_geam_mmc_defconfig
configs/imx6ul_isiot_emmc_defconfig
configs/imx8mq_evk_defconfig
configs/imx8qm_mek_defconfig
configs/microchip_mpfs_icicle_defconfig
configs/minnowmax_defconfig
configs/mx6sabresd_defconfig
configs/nanopi-neo4-rk3399_defconfig
configs/novena_defconfig
configs/opos6uldev_defconfig
configs/p2371-2180_defconfig
configs/p2771-0000-000_defconfig
configs/p2771-0000-500_defconfig
configs/phycore_pcl063_ull_defconfig
configs/qemu-x86_64_defconfig
configs/qemu-x86_defconfig
configs/rock-pi-4-rk3399_defconfig
configs/rockpro64-rk3399_defconfig
configs/sandbox64_defconfig
configs/sandbox_defconfig
configs/sandbox_flattree_defconfig
configs/sandbox_noblk_defconfig
configs/sandbox_spl_defconfig
configs/som-db5800-som-6867_defconfig
configs/stm32mp15_trusted_defconfig
configs/theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig
configs/theadorable-x86-conga-qa3-e3845_defconfig
configs/theadorable-x86-dfi-bt700_defconfig
configs/tinker-rk3288_defconfig
configs/u200_defconfig
disk/part.c
doc/Makefile [new file with mode: 0644]
doc/conf.py [new file with mode: 0644]
doc/device-tree-bindings/arm/l2c2x0.txt [new file with mode: 0644]
doc/device-tree-bindings/axi/gdsys,ihs_axi.txt [new file with mode: 0644]
doc/device-tree-bindings/board/gdsys,board_gazerbeam.txt [new file with mode: 0644]
doc/device-tree-bindings/clock/fsl,mpc83xx-clk.txt [new file with mode: 0644]
doc/device-tree-bindings/cpu/fsl,mpc83xx.txt [new file with mode: 0644]
doc/device-tree-bindings/misc/misc/fsl,mpc83xx-serdes.txt [new file with mode: 0644]
doc/device-tree-bindings/misc/misc/gdsys,io-endpoint.txt [new file with mode: 0644]
doc/device-tree-bindings/misc/misc/gdsys,iocon_fpga.txt [new file with mode: 0644]
doc/device-tree-bindings/misc/misc/gdsys,iocpu_fpga.txt [new file with mode: 0644]
doc/device-tree-bindings/misc/misc/gdsys,soc.txt [new file with mode: 0644]
doc/device-tree-bindings/ram/fsl,mpc83xx-mem-controller.txt [new file with mode: 0644]
doc/device-tree-bindings/reserved-memory/reserved-memory.txt [new file with mode: 0644]
doc/device-tree-bindings/timer/fsl,mpc83xx-timer.txt [new file with mode: 0644]
doc/efi.rst [new file with mode: 0644]
doc/index.rst [new file with mode: 0644]
doc/linker_lists.rst [new file with mode: 0644]
doc/media/Makefile [new file with mode: 0644]
doc/media/linker_lists.h.rst.exceptions [new file with mode: 0644]
doc/serial.rst [new file with mode: 0644]
doc/sphinx-static/theme_overrides.css [new file with mode: 0644]
doc/sphinx/cdomain.py [new file with mode: 0644]
doc/sphinx/kernel_include.py [new file with mode: 0755]
doc/sphinx/kerneldoc.py [new file with mode: 0644]
doc/sphinx/kfigure.py [new file with mode: 0644]
doc/sphinx/load_config.py [new file with mode: 0644]
doc/sphinx/parse-headers.pl [new file with mode: 0755]
doc/sphinx/requirements.txt [new file with mode: 0644]
doc/sphinx/rstFlatTable.py [new file with mode: 0755]
drivers/mmc/mmc.c
drivers/pci/Kconfig
drivers/pci/Makefile
drivers/pci/pci_auto_common.c
drivers/pci/pcie_fsl.c [new file with mode: 0644]
drivers/pci/pcie_fsl.h [new file with mode: 0644]
drivers/pci/pcie_fsl_fixup.c [new file with mode: 0644]
drivers/usb/gadget/dwc2_udc_otg.c
drivers/watchdog/ast_wdt.c
drivers/watchdog/mtk_wdt.c
include/config_distro_bootcmd.h
include/configs/BSC9132QDS.h
include/configs/C29XPCIE.h
include/configs/MPC8536DS.h
include/configs/MPC8544DS.h
include/configs/MPC8548CDS.h
include/configs/MPC8568MDS.h
include/configs/MPC8569MDS.h
include/configs/MPC8572DS.h
include/configs/P1010RDB.h
include/configs/P1022DS.h
include/configs/P1023RDB.h
include/configs/T208xQDS.h
include/configs/T208xRDB.h
include/configs/UCP1020.h
include/configs/controlcenterd.h
include/configs/p1_p2_rdb_pc.h
include/configs/p1_twr.h
include/configs/sbc8548.h
include/configs/xpedite537x.h
include/configs/xpedite550x.h
lib/Makefile
scripts/config_whitelist.txt
tools/env/fw_env.c

index 8bd49ef1a5680a5dd7e253d380ac6074119e1ae0..e4e7e653f6d1ed6afad1a8c46c204979e4ba44e7 100644 (file)
@@ -183,6 +183,9 @@ matrix:
     - name: "buildman NXP AArch64 LS101x"
       env:
         - BUILDMAN="freescale&aarch64&ls101"
+    - name: "buildman NXP AArch64 LS102x"
+      env:
+        - BUILDMAN="freescale&aarch64&ls102"
     - name: "buildman NXP AArch64 LS104x"
       env:
         - BUILDMAN="freescale&aarch64&ls104"
@@ -192,6 +195,9 @@ matrix:
     - name: "buildman NXP AArch64 LS20xx"
       env:
         - BUILDMAN="freescale&aarch64&&ls20"
+    - name: "buildman NXP AArch64 LX216x"
+      env:
+        - BUILDMAN="freescale&aarch64&lx216"
     - name: "buildman i.MX6 (non-NXP)"
       env:
         - BUILDMAN="mx6 -x freescale,toradex,boundary,engicam"
diff --git a/Documentation/Makefile b/Documentation/Makefile
deleted file mode 100644 (file)
index 2ca77ad..0000000
+++ /dev/null
@@ -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'
diff --git a/Documentation/conf.py b/Documentation/conf.py
deleted file mode 100644 (file)
index 168c313..0000000
+++ /dev/null
@@ -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())
diff --git a/Documentation/devicetree/bindings/arm/l2c2x0.txt b/Documentation/devicetree/bindings/arm/l2c2x0.txt
deleted file mode 100644 (file)
index fbe6cb2..0000000
+++ /dev/null
@@ -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.
diff --git a/Documentation/devicetree/bindings/axi/gdsys,ihs_axi.txt b/Documentation/devicetree/bindings/axi/gdsys,ihs_axi.txt
deleted file mode 100644 (file)
index 110788f..0000000
+++ /dev/null
@@ -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 {
-        ...
-       };
-};
diff --git a/Documentation/devicetree/bindings/board/gdsys,board_gazerbeam.txt b/Documentation/devicetree/bindings/board/gdsys,board_gazerbeam.txt
deleted file mode 100644 (file)
index 28c1080..0000000
+++ /dev/null
@@ -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>;
-};
diff --git a/Documentation/devicetree/bindings/clk/fsl,mpc83xx-clk.txt b/Documentation/devicetree/bindings/clk/fsl,mpc83xx-clk.txt
deleted file mode 100644 (file)
index 8313da8..0000000
+++ /dev/null
@@ -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>;
-};
diff --git a/Documentation/devicetree/bindings/cpu/fsl,mpc83xx.txt b/Documentation/devicetree/bindings/cpu/fsl,mpc83xx.txt
deleted file mode 100644 (file)
index ac563d9..0000000
+++ /dev/null
@@ -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>;
-       };
-};
diff --git a/Documentation/devicetree/bindings/misc/fsl,mpc83xx-serdes.txt b/Documentation/devicetree/bindings/misc/fsl,mpc83xx-serdes.txt
deleted file mode 100644 (file)
index 64a9b5b..0000000
+++ /dev/null
@@ -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;
-};
diff --git a/Documentation/devicetree/bindings/misc/gdsys,io-endpoint.txt b/Documentation/devicetree/bindings/misc/gdsys,io-endpoint.txt
deleted file mode 100644 (file)
index db2ff8c..0000000
+++ /dev/null
@@ -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>;
-};
diff --git a/Documentation/devicetree/bindings/misc/gdsys,iocon_fpga.txt b/Documentation/devicetree/bindings/misc/gdsys,iocon_fpga.txt
deleted file mode 100644 (file)
index acd466f..0000000
+++ /dev/null
@@ -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>;
-};
diff --git a/Documentation/devicetree/bindings/misc/gdsys,iocpu_fpga.txt b/Documentation/devicetree/bindings/misc/gdsys,iocpu_fpga.txt
deleted file mode 100644 (file)
index 819db22..0000000
+++ /dev/null
@@ -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>;
-};
diff --git a/Documentation/devicetree/bindings/misc/gdsys,soc.txt b/Documentation/devicetree/bindings/misc/gdsys,soc.txt
deleted file mode 100644 (file)
index 278e935..0000000
+++ /dev/null
@@ -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>;
-};
diff --git a/Documentation/devicetree/bindings/ram/fsl,mpc83xx-mem-controller.txt b/Documentation/devicetree/bindings/ram/fsl,mpc83xx-mem-controller.txt
deleted file mode 100644 (file)
index da01fe9..0000000
+++ /dev/null
@@ -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>;
-       };
-};
diff --git a/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt b/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
deleted file mode 100644 (file)
index bac4afa..0000000
+++ /dev/null
@@ -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>;
-               /* ... */
-       };
-};
diff --git a/Documentation/devicetree/bindings/timer/fsl,mpc83xx-timer.txt b/Documentation/devicetree/bindings/timer/fsl,mpc83xx-timer.txt
deleted file mode 100644 (file)
index 608d241..0000000
+++ /dev/null
@@ -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>;
-};
diff --git a/Documentation/efi.rst b/Documentation/efi.rst
deleted file mode 100644 (file)
index 5337a55..0000000
+++ /dev/null
@@ -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:
diff --git a/Documentation/index.rst b/Documentation/index.rst
deleted file mode 100644 (file)
index 0353c10..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-.. SPDX-License-Identifier: GPL-2.0+
-
-#######################
-U-Boot Developer Manual
-#######################
-
-.. toctree::
-
-   efi
-   linker_lists
-   serial
diff --git a/Documentation/linker_lists.rst b/Documentation/linker_lists.rst
deleted file mode 100644 (file)
index 72f514e..0000000
+++ /dev/null
@@ -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:
diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile
deleted file mode 100644 (file)
index 0efd18a..0000000
+++ /dev/null
@@ -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 $@
diff --git a/Documentation/media/linker_lists.h.rst.exceptions b/Documentation/media/linker_lists.h.rst.exceptions
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/Documentation/serial.rst b/Documentation/serial.rst
deleted file mode 100644 (file)
index ed34e59..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.. SPDX-License-Identifier: GPL-2.0+
-
-Serial system
-=============
-
-.. kernel-doc:: drivers/serial/serial.c
-   :internal:
diff --git a/Documentation/sphinx-static/theme_overrides.css b/Documentation/sphinx-static/theme_overrides.css
deleted file mode 100644 (file)
index 522b6d4..0000000
+++ /dev/null
@@ -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;
-    }
-}
diff --git a/Documentation/sphinx/cdomain.py b/Documentation/sphinx/cdomain.py
deleted file mode 100644 (file)
index cf13ff3..0000000
+++ /dev/null
@@ -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,
-    }
diff --git a/Documentation/sphinx/kernel_include.py b/Documentation/sphinx/kernel_include.py
deleted file mode 100755 (executable)
index f523aa6..0000000
+++ /dev/null
@@ -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 []
diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py
deleted file mode 100644 (file)
index fbedcc3..0000000
+++ /dev/null
@@ -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
-    )
diff --git a/Documentation/sphinx/kfigure.py b/Documentation/sphinx/kfigure.py
deleted file mode 100644 (file)
index b97228d..0000000
+++ /dev/null
@@ -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
diff --git a/Documentation/sphinx/load_config.py b/Documentation/sphinx/load_config.py
deleted file mode 100644 (file)
index 301a21a..0000000
+++ /dev/null
@@ -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)
diff --git a/Documentation/sphinx/parse-headers.pl b/Documentation/sphinx/parse-headers.pl
deleted file mode 100755 (executable)
index d410f47..0000000
+++ /dev/null
@@ -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
diff --git a/Documentation/sphinx/requirements.txt b/Documentation/sphinx/requirements.txt
deleted file mode 100644 (file)
index 742be3e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-docutils==0.12
-Sphinx==1.4.9
-sphinx_rtd_theme
diff --git a/Documentation/sphinx/rstFlatTable.py b/Documentation/sphinx/rstFlatTable.py
deleted file mode 100755 (executable)
index 25feb0d..0000000
+++ /dev/null
@@ -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[:]
index 8e26eda2c887ced64677fbbad73d62b378996e4b..bea3122f2b61f86dd7cf1b23a86112669d660c55 100644 (file)
@@ -55,7 +55,7 @@ M:    Alexey Brodkin <alexey.brodkin@synopsys.com>
 M:     Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
 S:     Maintained
 L:     uboot-snps-arc@synopsys.com
-T:     git git://git.denx.de/u-boot-arc.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-arc.git
 F:     arch/arc/
 F:     board/synopsys/
 
@@ -84,7 +84,7 @@ 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
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-arm.git
 F:     arch/arm/
 F:     cmd/arm/
 
@@ -92,14 +92,14 @@ 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
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-socfpga.git
 F:     arch/arm/mach-socfpga/
 
 ARM AMLOGIC SOC SUPPORT
 M:     Neil Armstrong <narmstrong@baylibre.com>
 S:     Maintained
 L:     u-boot-amlogic@groups.io
-T:     git git://git.denx.de/u-boot-amlogic.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic.git
 F:     arch/arm/mach-meson/
 F:     arch/arm/include/asm/arch-meson/
 F:     drivers/clk/meson/
@@ -153,7 +153,7 @@ M:  Stefano Babic <sbabic@denx.de>
 M:     Fabio Estevam <festevam@gmail.com>
 R:     NXP i.MX U-Boot Team <uboot-imx@nxp.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-imx.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-imx.git
 F:     arch/arm/cpu/arm1136/mx*/
 F:     arch/arm/cpu/arm926ejs/mx*/
 F:     arch/arm/cpu/armv7/vf610/
@@ -174,7 +174,7 @@ F:  arch/arm/include/asm/arch-hi6220/
 ARM MARVELL KIRKWOOD ARMADA-XP ARMADA-38X ARMADA-37XX ARMADA-7K/8K
 M:     Stefan Roese <sr@denx.de>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-marvell.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-marvell.git
 F:     arch/arm/mach-kirkwood/
 F:     arch/arm/mach-mvebu/
 F:     drivers/ata/ahci_mvebu.c
@@ -188,7 +188,7 @@ F:  drivers/watchdog/orion_wdt.c
 ARM MARVELL PXA
 M:     Marek Vasut <marex@denx.de>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-pxa.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-pxa.git
 F:     arch/arm/cpu/pxa/
 F:     arch/arm/include/asm/arch-pxa/
 
@@ -217,7 +217,7 @@ 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
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-atmel.git
 F:     arch/arm/mach-at91/
 F:     board/atmel/
 
@@ -234,7 +234,7 @@ 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
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-sh.git
 F:     arch/arm/mach-rmobile/
 
 ARM ROCKCHIP
@@ -242,7 +242,7 @@ 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
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip.git
 F:     arch/arm/include/asm/arch-rockchip/
 F:     arch/arm/mach-rockchip/
 F:     board/rockchip/
@@ -264,7 +264,7 @@ 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
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-samsung.git
 F:     arch/arm/mach-exynos/
 F:     arch/arm/mach-s5pc1xx/
 F:     arch/arm/cpu/armv7/s5p-common/
@@ -289,13 +289,12 @@ F:        arch/arm/include/asm/arch-sti*/
 ARM STM SPEAR
 #M:    Vipin Kumar <vipin.kumar@st.com>
 S:     Orphaned (Since 2016-02)
-T:     git git://git.denx.de/u-boot-stm.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-stm.git
 F:     arch/arm/cpu/arm926ejs/spear/
 F:     arch/arm/include/asm/arch-spear/
 
 ARM STM STM32MP
 M:     Patrick Delaunay <patrick.delaunay@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
@@ -326,7 +325,7 @@ ARM SUNXI
 M:     Jagan Teki <jagan@amarulasolutions.com>
 M:     Maxime Ripard <maxime.ripard@bootlin.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-sunxi.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi.git
 F:     arch/arm/cpu/armv7/sunxi/
 F:     arch/arm/include/asm/arch-sunxi/
 F:     arch/arm/mach-sunxi/
@@ -335,14 +334,14 @@ F:        board/sunxi/
 ARM TEGRA
 M:     Tom Warren <twarren@nvidia.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-tegra.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-tegra.git
 F:     arch/arm/mach-tegra/
 F:     arch/arm/include/asm/arch-tegra*/
 
 ARM TI
 M:     Tom Rini <trini@konsulko.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-ti.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-ti.git
 F:     arch/arm/mach-davinci/
 F:     arch/arm/mach-k3/
 F:     arch/arm/mach-keystone/
@@ -352,7 +351,7 @@ F:  arch/arm/include/asm/ti-common/
 ARM UNIPHIER
 M:     Masahiro Yamada <yamada.masahiro@socionext.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-uniphier.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-uniphier.git
 F:     arch/arm/mach-uniphier/
 F:     configs/uniphier_*_defconfig
 N:     uniphier
@@ -360,7 +359,7 @@ N:  uniphier
 ARM VERSAL
 M:     Michal Simek <michal.simek@xilinx.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-microblaze.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git
 F:     arch/arm/mach-versal/
 
 ARM VERSATILE EXPRESS DRIVERS
@@ -373,7 +372,7 @@ N:  vexpress
 ARM ZYNQ
 M:     Michal Simek <monstr@monstr.eu>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-microblaze.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git
 F:     arch/arm/mach-zynq/
 F:     drivers/clk/clk_zynq.c
 F:     drivers/fpga/zynqpl.c
@@ -397,7 +396,7 @@ N:  zynq
 ARM ZYNQMP
 M:     Michal Simek <michal.simek@xilinx.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-microblaze.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git
 F:     arch/arm/mach-zynqmp/
 F:     drivers/clk/clk_zynqmp.c
 F:     drivers/fpga/zynqpl.c
@@ -423,7 +422,7 @@ N:  zynqmp
 ARM ZYNQMP R5
 M:     Michal Simek <michal.simek@xilinx.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-microblaze.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git
 F:     arch/arm/mach-zynqmp-r5/
 
 BINMAN
@@ -439,7 +438,7 @@ F:  tools/buildman/
 CFI FLASH
 M:     Stefan Roese <sr@denx.de>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-cfi-flash.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-cfi-flash.git
 F:     drivers/mtd/cfi_flash.c
 F:     drivers/mtd/jedec_flash.c
 
@@ -447,13 +446,13 @@ COLDFIRE
 M:     Huan Wang <alison.wang@nxp.com>
 M:     Angelo Dureghello <angelo@sysam.it>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-coldfire.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-coldfire.git
 F:     arch/m68k/
 
 DFU
 M:     Lukasz Majewski <lukma@denx.de>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-dfu.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-dfu.git
 F:     cmd/dfu.c
 F:     cmd/usb_*.c
 F:     common/dfu.c
@@ -465,7 +464,7 @@ F:  drivers/usb/gadget/
 DRIVER MODEL
 M:     Simon Glass <sjg@chromium.org>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-dm.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-dm.git
 F:     drivers/core/
 F:     include/dm/
 F:     test/dm/
@@ -474,10 +473,10 @@ EFI PAYLOAD
 M:     Heinrich Schuchardt <xypron.glpk@gmx.de>
 R:     Alexander Graf <agraf@csgraf.de>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-efi.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-efi.git
 F:     doc/README.uefi
 F:     doc/README.iscsi
-F:     Documentation/efi.rst
+F:     doc/efi.rst
 F:     include/capitalization.h
 F:     include/charset.h
 F:     include/cp1250.h
@@ -497,7 +496,7 @@ F:  tools/file2include.c
 FPGA
 M:     Michal Simek <michal.simek@xilinx.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-microblaze.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git
 F:     drivers/fpga/
 F:     cmd/fpga.c
 F:     include/fpga.h
@@ -505,7 +504,7 @@ F:  include/fpga.h
 FLATTENED DEVICE TREE
 M:     Simon Glass <sjg@chromium.org>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-fdt.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-fdt.git
 F:     lib/fdtdec*
 F:     lib/libfdt/
 F:     include/fdt*
@@ -516,24 +515,24 @@ F:        common/fdt_support.c
 FREEBSD
 M:     Rafal Jaworowski <raj@semihalf.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-freebsd.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-freebsd.git
 
 FREESCALE QORIQ
 M:     Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-fsl-qoriq.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq.git
 F:     drivers/watchdog/sp805_wdt.c
 
 I2C
 M:     Heiko Schocher <hs@denx.de>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-i2c.git
+T:     git https://gitlab.denx.de/u-boot/custodians/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
+T:     git https://gitlab.denx.de/u-boot/u-boot.git
 F:     common/log.c
 F:     cmd/log.c
 F:     test/log/log_test.c
@@ -549,7 +548,7 @@ 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
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git
 F:     arch/microblaze/
 F:     cmd/mfsl.c
 F:     drivers/gpio/xilinx_gpio.c
@@ -564,7 +563,7 @@ N:  xilinx
 MIPS
 M:     Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-mips.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-mips.git
 F:     arch/mips/
 
 MIPS MSCC
@@ -595,38 +594,38 @@ F:        arch/mips/mach-jz47xx/
 MMC
 M:     Peng Fan <peng.fan@nxp.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-mmc.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-mmc.git
 F:     drivers/mmc/
 
 NAND FLASH
 #M:    Scott Wood <oss@buserror.net>
 S:     Orphaned (Since 2018-07)
-T:     git git://git.denx.de/u-boot-nand-flash.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-nand-flash.git
 F:     drivers/mtd/nand/raw/
 
 NDS32
 M:     Macpaul Lin <macpaul@andestech.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-nds32.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-nds32.git
 F:     arch/nds32/
 
 NETWORK
 M:     Joe Hershberger <joe.hershberger@ni.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-net.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-net.git
 F:     drivers/net/
 F:     net/
 
 NIOS
 M:     Thomas Chou <thomas@wytron.com.tw>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-nios.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-nios.git
 F:     arch/nios2/
 
 ONENAND
 #M:    Lukasz Majewski <l.majewski@majess.pl>
 S:     Orphaned (Since 2017-01)
-T:     git git://git.denx.de/u-boot-onenand.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-onenand.git
 F:     drivers/mtd/onenand/
 
 PATMAN
@@ -637,7 +636,7 @@ F:  tools/patman/
 POWER
 M:     Jaehoon Chung <jh80.chung@samsung.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-pmic.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-pmic.git
 F:     drivers/power/
 
 POWERPC
@@ -648,13 +647,13 @@ 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
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-mpc8xx.git
 F:     arch/powerpc/cpu/mpc8xx/
 
 POWERPC MPC83XX
 M:     Mario Six <mario.six@gdsys.cc>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-mpc83xx.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-mpc83xx.git
 F:     drivers/ram/mpc83xx_sdram.c
 F:     include/dt-bindings/memory/mpc83xx-sdram.h
 F:     drivers/sysreset/sysreset_mpc83xx.c
@@ -672,19 +671,19 @@ 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
+T:     git https://gitlab.denx.de/u-boot/custodians/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
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-mpc86xx.git
 F:     arch/powerpc/cpu/mpc86xx/
 
 RISC-V
 M:     Rick Chen <rick@andestech.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-riscv.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-riscv.git
 F:     arch/riscv/
 F:     cmd/riscv/
 F:     tools/prelink-riscv.c
@@ -702,15 +701,16 @@ S:        Maintained
 F:     arch/sandbox/
 
 SH
+M:     Marek Vasut <marek.vasut+renesas@gmail.com>
 M:     Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-sh.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-sh.git
 F:     arch/sh/
 
 SPI
 M:     Jagan Teki <jagan@amarulasolutions.com>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-spi.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-spi.git
 F:     drivers/spi/
 F:     include/spi*
 
@@ -772,25 +772,25 @@ UBI
 M:     Kyungmin Park <kmpark@infradead.org>
 M:     Heiko Schocher <hs@denx.de>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-ubi.git
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-ubi.git
 F:     drivers/mtd/ubi/
 
 USB
 M:     Marek Vasut <marex@denx.de>
 S:     Maintained
-T:     git git://git.denx.de/u-boot-usb.git
+T:     git https://gitlab.denx.de/u-boot/custodians/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
+T:     git https://gitlab.denx.de/u-boot/custodians/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
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-video.git
 F:     drivers/video/
 F:     common/lcd*.c
 F:     include/lcd*.h
@@ -800,7 +800,7 @@ 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
+T:     git https://gitlab.denx.de/u-boot/custodians/u-boot-x86.git
 F:     arch/x86/
 F:     cmd/x86/
 
@@ -814,7 +814,7 @@ M:  Tom Rini <trini@konsulko.com>
 L:     u-boot@lists.denx.de
 Q:     http://patchwork.ozlabs.org/project/uboot/list/
 S:     Maintained
-T:     git git://git.denx.de/u-boot.git
+T:     git https://gitlab.denx.de/u-boot/u-boot.git
 F:     configs/tools-only_defconfig
 F:     *
 F:     */
index 9fba74d3edac29ab80c0a1dc9fd8e7d6b1b962fd..6335834d12e1e36b9ef750b89e9f2aae50bce3d0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -168,7 +168,7 @@ MAKEFLAGS += --no-print-directory
 # Use 'make C=2' to enable checking of *all* source files, regardless
 # of whether they are re-compiled or not.
 #
-# See the file "Documentation/sparse.txt" for more details, including
+# See the file "doc/sparse.txt" for more details, including
 # where to get the "sparse" utility.
 
 ifeq ("$(origin C)", "command line")
@@ -1916,7 +1916,7 @@ help:
        @echo  '  coccicheck      - Execute static code analysis with Coccinelle'
        @echo  ''
        @echo  'Documentation targets:'
-       @$(MAKE) -f $(srctree)/Documentation/Makefile dochelp
+       @$(MAKE) -f $(srctree)/doc/Makefile dochelp
        @echo  ''
        @echo  '  make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
        @echo  '  make V=2   [targets] 2 => give reason for rebuild of target'
@@ -1945,7 +1945,7 @@ DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
               linkcheckdocs dochelp refcheckdocs
 PHONY += $(DOC_TARGETS)
 $(DOC_TARGETS): scripts_basic FORCE
-       $(Q)$(MAKE) $(build)=Documentation $@
+       $(Q)$(MAKE) $(build)=doc $@
 
 endif #ifeq ($(config-targets),1)
 endif #ifeq ($(mixed-targets),1)
index fe52166e28f08f637094dfb714bebe6bc2e529ad..99d126660d8a29bddb25882924cf4d9ba9d491f1 100644 (file)
@@ -18,7 +18,7 @@
 
 .globl _start
 _start:
-#if defined(LINUX_KERNEL_IMAGE_HEADER)
+#if defined(CONFIG_LINUX_KERNEL_IMAGE_HEADER)
 #include <asm/boot0-linux-kernel-header.h>
 #elif defined(CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK)
 /*
index 5b19e44d2fb4627d9448bd61d7ab2ee6ef44ee78..994092a195bb4a5a1890d9b464cd9189b052a10f 100644 (file)
        };
 };
 
-&usbotg_hs {
-       g-tx-fifo-size = <576>;
-};
-
 &v3v3 {
        regulator-always-on;
 };
index aebf168a893514c370a6fd915ffd111f01c34731..7572404625f0dc278f69288ee93246da53267c01 100644 (file)
@@ -533,6 +533,7 @@ config ARCH_BSC9132
        select SYS_FSL_ERRATUM_ESDHC111
        select SYS_FSL_ERRATUM_I2C_A004447
        select SYS_FSL_ERRATUM_IFC_A002769
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -551,6 +552,7 @@ config ARCH_C29X
        select SYS_FSL_DDR_VER_46
        select SYS_FSL_ERRATUM_A005125
        select SYS_FSL_ERRATUM_ESDHC111
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -566,6 +568,7 @@ config ARCH_MPC8536
        select FSL_LAW
        select SYS_FSL_ERRATUM_A004508
        select SYS_FSL_ERRATUM_A005125
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR2
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
@@ -594,6 +597,7 @@ config ARCH_MPC8544
        bool
        select FSL_LAW
        select SYS_FSL_ERRATUM_A005125
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR2
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -609,6 +613,7 @@ config ARCH_MPC8548
        select SYS_FSL_ERRATUM_NMG_LBC103
        select SYS_FSL_ERRATUM_NMG_ETSEC129
        select SYS_FSL_ERRATUM_I2C_A004447
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR2
        select SYS_FSL_HAS_DDR1
        select SYS_FSL_HAS_SEC
@@ -633,6 +638,7 @@ config ARCH_MPC8560
 config ARCH_MPC8568
        bool
        select FSL_LAW
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR2
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -643,6 +649,7 @@ config ARCH_MPC8569
        select FSL_LAW
        select SYS_FSL_ERRATUM_A004508
        select SYS_FSL_ERRATUM_A005125
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -657,6 +664,7 @@ config ARCH_MPC8572
        select SYS_FSL_ERRATUM_A005125
        select SYS_FSL_ERRATUM_DDR_115
        select SYS_FSL_ERRATUM_DDR111_DDR134
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR2
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
@@ -681,6 +689,7 @@ config ARCH_P1010
        select SYS_FSL_ERRATUM_P1010_A003549
        select SYS_FSL_ERRATUM_SEC_A003571
        select SYS_FSL_ERRATUM_IFC_A003399
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -702,6 +711,7 @@ config ARCH_P1011
        select SYS_FSL_ERRATUM_A005125
        select SYS_FSL_ERRATUM_ELBC_A001
        select SYS_FSL_ERRATUM_ESDHC111
+       select FSL_PCIE_DISABLE_ASPM
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -716,6 +726,8 @@ config ARCH_P1020
        select SYS_FSL_ERRATUM_A005125
        select SYS_FSL_ERRATUM_ELBC_A001
        select SYS_FSL_ERRATUM_ESDHC111
+       select FSL_PCIE_DISABLE_ASPM
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -735,6 +747,8 @@ config ARCH_P1021
        select SYS_FSL_ERRATUM_A005125
        select SYS_FSL_ERRATUM_ELBC_A001
        select SYS_FSL_ERRATUM_ESDHC111
+       select FSL_PCIE_DISABLE_ASPM
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -756,6 +770,7 @@ config ARCH_P1022
        select SYS_FSL_ERRATUM_ELBC_A001
        select SYS_FSL_ERRATUM_ESDHC111
        select SYS_FSL_ERRATUM_SATA_A001
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -769,6 +784,7 @@ config ARCH_P1023
        select SYS_FSL_ERRATUM_A004508
        select SYS_FSL_ERRATUM_A005125
        select SYS_FSL_ERRATUM_I2C_A004447
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -782,6 +798,8 @@ config ARCH_P1024
        select SYS_FSL_ERRATUM_A005125
        select SYS_FSL_ERRATUM_ELBC_A001
        select SYS_FSL_ERRATUM_ESDHC111
+       select FSL_PCIE_DISABLE_ASPM
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -802,6 +820,8 @@ config ARCH_P1025
        select SYS_FSL_ERRATUM_A005125
        select SYS_FSL_ERRATUM_ELBC_A001
        select SYS_FSL_ERRATUM_ESDHC111
+       select FSL_PCIE_DISABLE_ASPM
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -819,6 +839,7 @@ config ARCH_P2020
        select SYS_FSL_ERRATUM_A005125
        select SYS_FSL_ERRATUM_ESDHC111
        select SYS_FSL_ERRATUM_ESDHC_A001
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_BE
@@ -1074,6 +1095,7 @@ config ARCH_T2080
        select SYS_FSL_ERRATUM_A007907
        select SYS_FSL_ERRATUM_A009942
        select SYS_FSL_ERRATUM_ESDHC111
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_QORIQ_CHASSIS2
@@ -1096,6 +1118,7 @@ config ARCH_T2081
        select SYS_FSL_ERRATUM_A007212
        select SYS_FSL_ERRATUM_A009942
        select SYS_FSL_ERRATUM_ESDHC111
+       select FSL_PCIE_RESET
        select SYS_FSL_HAS_DDR3
        select SYS_FSL_HAS_SEC
        select SYS_FSL_QORIQ_CHASSIS2
@@ -1429,6 +1452,12 @@ config SYS_P4080_ERRATUM_SERDES_A001
 config SYS_P4080_ERRATUM_SERDES_A005
        bool
 
+config FSL_PCIE_DISABLE_ASPM
+       bool
+
+config FSL_PCIE_RESET
+       bool
+
 config SYS_FSL_QORIQ_CHASSIS1
        bool
 
index 90ccc3427c7bda313369c70570a279d125387fbe..1d0213a513cdb5797cb4679d6b1f055f755a9b8f 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/cpm_85xx.h>
 #include <pci.h>
 
-#if !defined(CONFIG_FSL_PCI_INIT)
+#if !defined(CONFIG_FSL_PCI_INIT) && !defined(CONFIG_DM_PCI)
 
 #ifndef CONFIG_SYS_PCI1_MEM_BUS
 #define CONFIG_SYS_PCI1_MEM_BUS CONFIG_SYS_PCI1_MEM_BASE
index d2bebb08b6cd5ae27f3983f8ec5d3f6f0242b802..999fa8cec467c4b3d4a4d75c2cd2a45bc03dacd1 100644 (file)
                        sata-fpdma = <0x0>;
                };
        };
+
+       pcie@ffe240000 {
+               compatible = "fsl,pcie-t2080", "fsl,pcie-fsl-qoriq";
+               reg = <0xf 0xfe240000 0x0 0x4000>;   /* registers */
+               law_trgt_if = <0>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               device_type = "pci";
+               bus-range = <0x0 0xff>;
+               ranges = <0x01000000 0x0 0x00000000 0xf 0xf8000000 0x0 0x00010000   /* downstream I/O */
+                         0x02000000 0x0 0xe0000000 0xc 0x00000000 0x0 0x20000000>; /* non-prefetchable memory */
+       };
+
+       pcie@ffe250000 {
+               compatible = "fsl,pcie-t2080", "fsl,pcie-fsl-qoriq";
+               reg = <0xf 0xfe250000 0x0 0x1000>;   /* registers */
+               law_trgt_if = <1>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               device_type = "pci";
+               bus-range = <0x0 0xff>;
+               ranges = <0x01000000 0x0 0x00000000 0xf 0xf8010000 0x0 0x00010000   /* downstream I/O */
+                         0x02000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x10000000>; /* non-prefetchable memory */
+       };
+
+       pcie@ffe260000 {
+               compatible = "fsl,pcie-t2080", "fsl,pcie-fsl-qoriq";
+               reg = <0xf 0xfe260000 0x0 0x1000>;   /* registers */
+               law_trgt_if = <2>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               device_type = "pci";
+               bus-range = <0x0 0xff>;
+               ranges = <0x01000000 0x0 0x00000000 0xf 0xf8020000 0x0 0x00010000   /* downstream I/O */
+                         0x02000000 0x0 0xe0000000 0xc 0x30000000 0x0 0x10000000>; /* non-prefetchable memory */
+       };
+
+       pcie@ffe270000 {
+               compatible = "fsl,pcie-t2080", "fsl,pcie-fsl-qoriq";
+               reg = <0xf 0xfe270000 0x0 0x1000>;   /* registers */
+               law_trgt_if = <3>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               device_type = "pci";
+               bus-range = <0x0 0xff>;
+               ranges = <0x01000000 0x0 0x00000000 0xf 0xf8030000 0x0 0x00010000   /* downstream I/O */
+                         0x02000000 0x0 0xe0000000 0xc 0x40000000 0x0 0x10000000>; /* non-prefetchable memory */
+       };
 };
index 7c963cdc350834bce041374d4f0e4733e1aa8ced..946e74a93bb302af27a0e19e83d417efaef38bfc 100644 (file)
 /* P1011 is single core version of P1020 */
 #elif defined(CONFIG_ARCH_P1011)
 #define CONFIG_TSECV2
-#define CONFIG_FSL_PCIE_DISABLE_ASPM
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 
 #elif defined(CONFIG_ARCH_P1020)
 #define CONFIG_TSECV2
-#define CONFIG_FSL_PCIE_DISABLE_ASPM
 #ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 #endif
 
 #elif defined(CONFIG_ARCH_P1021)
 #define CONFIG_TSECV2
-#define CONFIG_FSL_PCIE_DISABLE_ASPM
 #define QE_MURAM_SIZE                  0x6000UL
 #define MAX_QE_RISC                    1
 #define QE_NUM_OF_SNUM                 28
 /* P1024 is lower end variant of P1020 */
 #elif defined(CONFIG_ARCH_P1024)
 #define CONFIG_TSECV2
-#define CONFIG_FSL_PCIE_DISABLE_ASPM
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
 
 /* P1025 is lower end variant of P1021 */
 #elif defined(CONFIG_ARCH_P1025)
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        1
 #define CONFIG_TSECV2
-#define CONFIG_FSL_PCIE_DISABLE_ASPM
 #define QE_MURAM_SIZE                  0x6000UL
 #define MAX_QE_RISC                    1
 #define QE_NUM_OF_SNUM                 28
index 9579d52ffde34844057e69d81945c897fd2de870..7a510c61fb015c5d9c08a149f247b4e1e6e2e0bd 100644 (file)
@@ -2,8 +2,8 @@
 /*
  * Command for accessing Arcturus factory environment.
  *
- * Copyright 2013-2015 Arcturus Networks Inc.
- *           http://www.arcturusnetworks.com/products/ucp1020/
+ * Copyright 2013-2019 Arcturus Networks Inc.
+ *           https://www.arcturusnetworks.com/products/
  *           by Oleksandr G Zhadan et al.
  *
  */
 #include <div64.h>
 #include <malloc.h>
 #include <spi_flash.h>
-
+#include <mmc.h>
+#include <version.h>
+#include <environment.h>
 #include <asm/io.h>
 
-#define MAX_SERIAL_SIZE 15
-#define MAX_HWADDR_SIZE 17
-
-#define FIRM_ADDR1 (0x200 - sizeof(smac))
-#define FIRM_ADDR2 (0x400 - sizeof(smac))
-#define FIRM_ADDR3 (CONFIG_ENV_SECT_SIZE + 0x200 - sizeof(smac))
-#define FIRM_ADDR4 (CONFIG_ENV_SECT_SIZE + 0x400 - sizeof(smac))
-
-static struct spi_flash *flash;
-char smac[4][18];
+static ulong fwenv_addr[MAX_FWENV_ADDR];
+const char mystrerr[] = "ERROR: Failed to save factory info";
 
 static int ishwaddr(char *hwaddr)
 {
@@ -38,156 +32,349 @@ static int ishwaddr(char *hwaddr)
        return -1;
 }
 
-static int set_arc_product(int argc, char *const argv[])
+#if (FWENV_TYPE == FWENV_MMC)
+
+static char smac[29][18] __attribute__ ((aligned(0x200)));     /* 1 MMC block is 512 bytes */
+
+int set_mmc_arc_product(int argc, char *const argv[])
 {
-       int err = 0;
-       char *mystrerr = "ERROR: Failed to save factory info in spi location";
+       struct mmc *mmc;
+       u32 blk, cnt, n;
+       int i, err = 1;
+       void *addr;
+       const u8 mmc_dev_num = CONFIG_SYS_MMC_ENV_DEV;
+
+       mmc = find_mmc_device(mmc_dev_num);
+       if (!mmc) {
+               printf("No SD/MMC/eMMC card found\n");
+               return 0;
+       }
+       if (mmc_init(mmc)) {
+               printf("%s(%d) init failed\n", IS_SD(mmc) ? "SD" : "MMC",
+                      mmc_dev_num);
+               return 0;
+       }
+       if (mmc_getwp(mmc) == 1) {
+               printf("Error: card is write protected!\n");
+               return CMD_RET_FAILURE;
+       }
 
-       if (argc != 5)
-               return -1;
+       /* Save factory defaults */
+       addr = (void *)smac;
+       cnt = 1;                /* One 512 bytes block */
+
+       for (i = 0; i < MAX_FWENV_ADDR; i++)
+               if (fwenv_addr[i] != -1) {
+                       blk = fwenv_addr[i] / 512;
+                       n = blk_dwrite(mmc_get_blk_desc(mmc), blk, cnt, addr);
+                       if (n != cnt)
+                               printf("%s: %s [%d]\n", __func__, mystrerr, i);
+                       else
+                               err = 0;
+               }
+       if (err)
+               return -2;
 
-       /* Check serial number */
-       if (strlen(argv[1]) != MAX_SERIAL_SIZE)
-               return -1;
+       return err;
+}
 
-       /* Check HWaddrs */
-       if (ishwaddr(argv[2]) || ishwaddr(argv[3]) || ishwaddr(argv[4]))
-               return -1;
+static int read_mmc_arc_info(void)
+{
+       struct mmc *mmc;
+       u32 blk, cnt, n;
+       int i;
+       void *addr;
+       const u8 mmc_dev_num = CONFIG_SYS_MMC_ENV_DEV;
+
+       mmc = find_mmc_device(mmc_dev_num);
+       if (!mmc) {
+               printf("No SD/MMC/eMMC card found\n");
+               return 0;
+       }
+       if (mmc_init(mmc)) {
+               printf("%s(%d) init failed\n", IS_SD(mmc) ? "SD" : "MMC",
+                      mmc_dev_num);
+               return 0;
+       }
 
-       strcpy(smac[3], argv[1]);
-       strcpy(smac[2], argv[2]);
-       strcpy(smac[1], argv[3]);
-       strcpy(smac[0], argv[4]);
+       addr = (void *)smac;
+       cnt = 1;                /* One 512 bytes block */
 
-       flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS,
-                               CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE);
+       for (i = 0; i < MAX_FWENV_ADDR; i++)
+               if (fwenv_addr[i] != -1) {
+                       blk = fwenv_addr[i] / 512;
+                       n = blk_dread(mmc_get_blk_desc(mmc), blk, cnt, addr);
+                       flush_cache((ulong) addr, 512);
+                       if (n == cnt)
+                               return (i + 1);
+               }
+       return 0;
+}
+#endif
 
-       /*
-        * Save factory defaults
-        */
+#if (FWENV_TYPE == FWENV_SPI_FLASH)
 
-       if (spi_flash_write(flash, FIRM_ADDR1, sizeof(smac), smac)) {
-               printf("%s: %s [1]\n", __func__, mystrerr);
-               err++;
-       }
-       if (spi_flash_write(flash, FIRM_ADDR2, sizeof(smac), smac)) {
-               printf("%s: %s [2]\n", __func__, mystrerr);
-               err++;
-       }
+static struct spi_flash *flash;
+static char smac[4][18];
 
-       if (spi_flash_write(flash, FIRM_ADDR3, sizeof(smac), smac)) {
-               printf("%s: %s [3]\n", __func__, mystrerr);
-               err++;
-       }
+int set_spi_arc_product(int argc, char *const argv[])
+{
+       int i, err = 1;
 
-       if (spi_flash_write(flash, FIRM_ADDR4, sizeof(smac), smac)) {
-               printf("%s: %s [4]\n", __func__, mystrerr);
-               err++;
+       flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS,
+                               CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE);
+       if (!flash) {
+               printf("Failed to initialize SPI flash at %u:%u\n",
+                      CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS);
+               return -1;
        }
 
-       if (err == 4) {
-               printf("%s: %s [ALL]\n", __func__, mystrerr);
+       /* Save factory defaults */
+       for (i = 0; i < MAX_FWENV_ADDR; i++)
+               if (fwenv_addr[i] != -1)
+                       if (spi_flash_write
+                           (flash, fwenv_addr[i], sizeof(smac), smac))
+                               printf("%s: %s [%d]\n", __func__, mystrerr, i);
+                       else
+                               err = 0;
+       if (err)
                return -2;
-       }
 
-       return 0;
+       return err;
 }
 
-int get_arc_info(void)
+static int read_spi_arc_info(void)
 {
-       int location = 1;
-       char *myerr = "ERROR: Failed to read all 4 factory info spi locations";
+       int i;
 
        flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS,
                                CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE);
+       if (!flash) {
+               printf("Failed to initialize SPI flash at %u:%u\n",
+                      CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS);
+               return 0;
+       }
+       for (i = 0; i < MAX_FWENV_ADDR; i++)
+               if (fwenv_addr[i] != -1)
+                       if (!spi_flash_read
+                           (flash, fwenv_addr[i], sizeof(smac), smac))
+                               return (i + 1);
+       return 0;
+}
+#endif
+
+#if (FWENV_TYPE == FWENV_NOR_FLASH)
 
-       if (spi_flash_read(flash, FIRM_ADDR1, sizeof(smac), smac)) {
-               location++;
-               if (spi_flash_read(flash, FIRM_ADDR2, sizeof(smac), smac)) {
-                       location++;
-                       if (spi_flash_read(flash, FIRM_ADDR3, sizeof(smac),
-                                          smac)) {
-                               location++;
-                               if (spi_flash_read(flash, FIRM_ADDR4,
-                                                  sizeof(smac), smac)) {
-                                       printf("%s: %s\n", __func__, myerr);
-                                       return -2;
-                               }
-                       }
+static char smac[4][18];
+
+int set_nor_arc_product(int argc, char *const argv[])
+{
+       int i, err = 1;
+
+       /* Save factory defaults */
+       for (i = 0; i < MAX_FWENV_ADDR; i++)
+               if (fwenv_addr[i] != -1) {
+                       ulong fwenv_end = fwenv_addr[i] + 4;
+
+                       flash_sect_roundb(&fwenv_end);
+                       flash_sect_protect(0, fwenv_addr[i], fwenv_end);
+                       if (flash_write
+                           ((char *)smac, fwenv_addr[i], sizeof(smac)))
+                               printf("%s: %s [%d]\n", __func__, mystrerr, i);
+                       else
+                               err = 0;
+                       flash_sect_protect(1, fwenv_addr[i], fwenv_end);
                }
-       }
-       if (smac[3][0] != 0) {
-               if (location > 1)
-                       printf("Using region %d\n", location);
-               printf("SERIAL: ");
-               if (smac[3][0] == 0xFF) {
-                       printf("\t<not found>\n");
-               } else {
-                       printf("\t%s\n", smac[3]);
-                       env_set("SERIAL", smac[3]);
+       if (err)
+               return -2;
+
+       return err;
+}
+
+static int read_nor_arc_info(void)
+{
+       int i;
+
+       for (i = 0; i < MAX_FWENV_ADDR; i++)
+               if (fwenv_addr[i] != -1) {
+                       memcpy(smac, (void *)fwenv_addr[i], sizeof(smac));
+                       return (i + 1);
                }
+
+       return 0;
+}
+#endif
+
+int set_arc_product(int argc, char *const argv[])
+{
+       if (argc != 5)
+               return -1;
+
+       /* Check serial number */
+       if (strlen(argv[1]) != MAX_SERIAL_SIZE)
+               return -1;
+
+       /* Check HWaddrs */
+       if (ishwaddr(argv[2]) || ishwaddr(argv[3]) || ishwaddr(argv[4]))
+               return -1;
+
+       strcpy(smac[0], argv[1]);
+       strcpy(smac[1], argv[2]);
+       strcpy(smac[2], argv[3]);
+       strcpy(smac[3], argv[4]);
+
+#if (FWENV_TYPE == FWENV_NOR_FLASH)
+       return set_nor_arc_product(argc, argv);
+#endif
+#if (FWENV_TYPE == FWENV_SPI_FLASH)
+       return set_spi_arc_product(argc, argv);
+#endif
+#if (FWENV_TYPE == FWENV_MMC)
+       return set_mmc_arc_product(argc, argv);
+#endif
+       return -2;
+}
+
+static int read_arc_info(void)
+{
+#if (FWENV_TYPE == FWENV_NOR_FLASH)
+       return read_nor_arc_info();
+#endif
+#if (FWENV_TYPE == FWENV_SPI_FLASH)
+       return read_spi_arc_info();
+#endif
+#if (FWENV_TYPE == FWENV_MMC)
+       return read_mmc_arc_info();
+#endif
+       return 0;
+}
+
+static int do_get_arc_info(void)
+{
+       int l = read_arc_info();
+       char *oldserial = env_get("SERIAL");
+       char *oldversion = env_get("VERSION");
+
+       if (oldversion != NULL)
+               if (strcmp(oldversion, U_BOOT_VERSION) != 0)
+                       oldversion = NULL;
+
+       if (l == 0) {
+               printf("%s: failed to read factory info\n", __func__);
+               return -2;
        }
 
-       if (strcmp(smac[2], "00:00:00:00:00:00") == 0)
-               return 0;
+       printf("\rSERIAL:  ");
+       if (smac[0][0] == EMPY_CHAR) {
+               printf("<not found>\n");
+       } else {
+               printf("%s\n", smac[0]);
+               env_set("SERIAL", smac[0]);
+       }
 
-       printf("HWADDR0:");
-       if (smac[2][0] == 0xFF) {
-               printf("\t<not found>\n");
+       if (strcmp(smac[1], "00:00:00:00:00:00") == 0) {
+               env_set("ethaddr", NULL);
+               env_set("eth1addr", NULL);
+               env_set("eth2addr", NULL);
+               goto done;
+       }
+
+       printf("HWADDR0: ");
+       if (smac[1][0] == EMPY_CHAR) {
+               printf("<not found>\n");
        } else {
                char *ret = env_get("ethaddr");
 
-               if (strcmp(ret, __stringify(CONFIG_ETHADDR)) == 0) {
-                       env_set("ethaddr", smac[2]);
-                       printf("\t%s (factory)\n", smac[2]);
+               if (ret == NULL) {
+                       env_set("ethaddr", smac[1]);
+                       printf("%s\n", smac[1]);
+               } else if (strcmp(ret, __stringify(CONFIG_ETHADDR)) == 0) {
+                       env_set("ethaddr", smac[1]);
+                       printf("%s (factory)\n", smac[1]);
                } else {
-                       printf("\t%s\n", ret);
+                       printf("%s\n", ret);
                }
        }
 
-       if (strcmp(smac[1], "00:00:00:00:00:00") == 0) {
-               env_set("eth1addr", smac[2]);
-               env_set("eth2addr", smac[2]);
-               return 0;
+       if (strcmp(smac[2], "00:00:00:00:00:00") == 0) {
+               env_set("eth1addr", NULL);
+               env_set("eth2addr", NULL);
+               goto done;
        }
 
-       printf("HWADDR1:");
-       if (smac[1][0] == 0xFF) {
-               printf("\t<not found>\n");
+       printf("HWADDR1: ");
+       if (smac[2][0] == EMPY_CHAR) {
+               printf("<not found>\n");
        } else {
                char *ret = env_get("eth1addr");
 
-               if (strcmp(ret, __stringify(CONFIG_ETH1ADDR)) == 0) {
-                       env_set("eth1addr", smac[1]);
-                       printf("\t%s (factory)\n", smac[1]);
+               if (ret == NULL) {
+                       env_set("ethaddr", smac[2]);
+                       printf("%s\n", smac[2]);
+               } else if (strcmp(ret, __stringify(CONFIG_ETH1ADDR)) == 0) {
+                       env_set("eth1addr", smac[2]);
+                       printf("%s (factory)\n", smac[2]);
                } else {
-                       printf("\t%s\n", ret);
+                       printf("%s\n", ret);
                }
        }
 
-       if (strcmp(smac[0], "00:00:00:00:00:00") == 0) {
-               env_set("eth2addr", smac[1]);
-               return 0;
+       if (strcmp(smac[3], "00:00:00:00:00:00") == 0) {
+               env_set("eth2addr", NULL);
+               goto done;
        }
 
-       printf("HWADDR2:");
-       if (smac[0][0] == 0xFF) {
-               printf("\t<not found>\n");
+       printf("HWADDR2: ");
+       if (smac[3][0] == EMPY_CHAR) {
+               printf("<not found>\n");
        } else {
                char *ret = env_get("eth2addr");
 
-               if (strcmp(ret, __stringify(CONFIG_ETH2ADDR)) == 0) {
-                       env_set("eth2addr", smac[0]);
-                       printf("\t%s (factory)\n", smac[0]);
+               if (ret == NULL) {
+                       env_set("ethaddr", smac[3]);
+                       printf("%s\n", smac[3]);
+               } else if (strcmp(ret, __stringify(CONFIG_ETH2ADDR)) == 0) {
+                       env_set("eth2addr", smac[3]);
+                       printf("%s (factory)\n", smac[3]);
                } else {
-                       printf("\t%s\n", ret);
+                       printf("%s\n", ret);
                }
        }
+done:
+       if (oldserial == NULL || oldversion == NULL) {
+               if (oldversion == NULL)
+                       env_set("VERSION", U_BOOT_VERSION);
+               env_save();
+       }
 
        return 0;
 }
 
-static int do_arc_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int init_fwenv(void)
+{
+       int i, ret = -1;
+
+       fwenv_addr[0] = FWENV_ADDR1;
+       fwenv_addr[1] = FWENV_ADDR2;
+       fwenv_addr[2] = FWENV_ADDR3;
+       fwenv_addr[3] = FWENV_ADDR4;
+
+       for (i = 0; i < MAX_FWENV_ADDR; i++)
+               if (fwenv_addr[i] != -1)
+                       ret = 0;
+       if (ret)
+               printf("%s: No firmfare info storage address is defined\n",
+                      __func__);
+       return ret;
+}
+
+void get_arc_info(void)
+{
+       if (!init_fwenv())
+               do_get_arc_info();
+}
+
+static int do_arc_cmd(cmd_tbl_t * cmdtp, int flag, int argc, char *const argv[])
 {
        const char *cmd;
        int ret = -1;
@@ -196,15 +383,14 @@ static int do_arc_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
        --argc;
        ++argv;
 
-       if (strcmp(cmd, "product") == 0) {
+       if (init_fwenv())
+               return ret;
+
+       if (strcmp(cmd, "product") == 0)
                ret = set_arc_product(argc, argv);
-               goto done;
-       }
-       if (strcmp(cmd, "info") == 0) {
-               ret = get_arc_info();
-               goto done;
-       }
-done:
+       else if (strcmp(cmd, "info") == 0)
+               ret = do_get_arc_info();
+
        if (ret == -1)
                return CMD_RET_USAGE;
 
index 1a1fcb9be9cf396bb902371c4a8b7f21f6e73002..54fd1782cb1f2714f7775bf34fd902fe596aa50d 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright 2013-2015 Arcturus Networks, Inc.
- *           http://www.arcturusnetworks.com/products/ucp1020/
+ * Copyright 2013-2019 Arcturus Networks, Inc.
+ *           https://www.arcturusnetworks.com/products/ucp1020/
  *           by Oleksandr G Zhadan et al.
  * based on board/freescale/p1_p2_rdb_pc/spl.c
  * original copyright follows:
@@ -108,7 +108,9 @@ int checkboard(void)
 {
        printf("Board: %s\n", CONFIG_BOARDNAME_LOCAL);
        board_gpio_init();
+#ifdef CONFIG_MMC
        printf("SD/MMC: 4-bit Mode\n");
+#endif
 
        return 0;
 }
@@ -193,7 +195,9 @@ int last_stage_init(void)
        static char newkernelargs[256];
        static u8 id1[16];
        static u8 id2;
+#ifdef CONFIG_MMC
        struct mmc *mmc;
+#endif
        char *sval, *kval;
 
        if (i2c_read(CONFIG_SYS_I2C_IDT6V49205B, 7, 1, &id1[0], 2) < 0) {
@@ -215,6 +219,7 @@ int last_stage_init(void)
 
        kval = env_get("kernelargs");
 
+#ifdef CONFIG_MMC
        mmc = find_mmc_device(0);
        if (mmc)
                if (!mmc_init(mmc)) {
@@ -234,6 +239,7 @@ int last_stage_init(void)
                                env_set("kernelargs", mmckargs);
                        }
                }
+#endif
        get_arc_info();
 
        if (kval) {
index cf1ddd718bb010c0cb8454c8e87e146cd0041954..1b527cdb1cf68c2280e1923f541bd5fa15eb5cc4 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2013-2015 Arcturus Networks, Inc.
- *           http://www.arcturusnetworks.com/products/ucp1020/
+ * Copyright 2013-2019 Arcturus Networks, Inc.
+ *           https://www.arcturusnetworks.com/products/ucp1020/
  *           by Oleksandr G Zhadan et al.
  */
 
 
 #define GPIO_WD                GPIO15
 
+#ifdef CONFIG_MMC
 static char *defkargs = "root=/dev/mtdblock1 rootfstype=cramfs ro";
 static char *mmckargs = "root=/dev/mmcblk0p1 rootwait rw";
+#endif
 
 int get_arc_info(void);
 
index 0608a5a88b941cdd362e9f231250a981aebab357..21156a4ca94f7d1520a171bf10cfaf0e22fa36f4 100644 (file)
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) ARM Ltd 2015
  *
  * Author: Liviu Dudau <Liviu.Dudau@arm.com>
- *
- * SPDX-Licence-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
index 8d16ec0202c3ed7bbc9fc71f5cf30a52a8a2667e..2f674d7f839d87d48e23f36946156a142855da74 100644 (file)
@@ -1,5 +1,7 @@
 Guardian BOARD
 M:     Sjoerd Simons <sjoerd.simons@collabora.co.uk>
+M:     Govindaraji Sivanantham <Govindaraji.Sivanantham@in.bosch.com>
+M:     Moses Christopher Bollavarapu <BollavarapuMoses.Christopher@in.bosch.com>
 S:     Maintained
 F:     board/bosch/guardian/
 F:     include/configs/am335x_guardian.h
index c761aea0ac09bb3fd53d577e51dd8e83ed163ec4..ef26f14c461c08e6f3be9f91426582106d8fdf4d 100644 (file)
@@ -11,6 +11,7 @@
 #include <fdt_support.h>
 #include <asm/fsl_serdes.h>
 
+#if !defined(CONFIG_DM_PCI)
 void pci_init_board(void)
 {
        fsl_pcie_init_board(0);
@@ -20,3 +21,4 @@ void pci_of_setup(void *blob, bd_t *bd)
 {
        FT_FSL_PCI_SETUP;
 }
+#endif
index e6fed25152ac31adba1e5cf5c9fe78d1cffa35ea..efc1d356d6d3bba6f5fb3ddc1f675efe0064bcbb 100644 (file)
@@ -2,6 +2,7 @@ XILINX_ZYNQMP BOARDS
 M:     Michal Simek <michal.simek@xilinx.com>
 S:     Maintained
 F:     arch/arm/dts/zynqmp-*
+F:     arch/arm/dts/avnet-ultra96*
 F:     board/xilinx/zynqmp/
 F:     include/configs/xilinx_zynqmp*
 F:     configs/xilinx_zynqmp*
index 403abbc6bcf2666f96b0a28ee2a785d8dfda8545..50ffa509abfeb77423436e52972e51de05fe83fa 100644 (file)
--- a/cmd/led.c
+++ b/cmd/led.c
@@ -137,6 +137,6 @@ U_BOOT_CMD(
        led, 4, 1, do_led,
        "manage LEDs",
        "<led_label> on|off|toggle" BLINK "\tChange LED state\n"
-       "led [<led_label>]\tGet LED state\n"
+       "led <led_label>\tGet LED state\n"
        "led list\t\tshow a list of LEDs"
 );
index 4f6b4ec412c30c11989080e7c3e56a61959d572f..004fbc525b5c0dcac81e6fcf974f52806cdd1898 100644 (file)
@@ -211,7 +211,7 @@ static int fit_image_setup_verify(struct image_sign_info *info,
        info->required_keynode = required_keynode;
        printf("%s:%s", algo_name, info->keyname);
 
-       if (!info->checksum || !info->crypto) {
+       if (!info->checksum || !info->crypto || !info->padding) {
                *err_msgp = "Unknown signature algorithm";
                return -1;
        }
index 9c2182e8ba533d1c89b78134783f596076092c01..ee2de0ad683b076d7946f0ff05774bf5314c8502 100644 (file)
@@ -112,5 +112,4 @@ CONFIG_TSEC_ENET=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
-CONFIG_MPC8XXX_SPI=y
 CONFIG_OF_LIBFDT=y
index 9cd3daab35e4e6841cce92b98644ac8ba010c48b..a446bb9f2c14ff58bd8edfc8d729bfc198b2d56d 100644 (file)
@@ -102,5 +102,4 @@ CONFIG_TSEC_ENET=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
-CONFIG_MPC8XXX_SPI=y
 CONFIG_OF_LIBFDT=y
index f7dfb947689cb6a4930f7da02eda7f2c2e58d326..0db930f733ba99eef78a8f1978d7dc599bbfe58a 100644 (file)
@@ -66,6 +66,9 @@ CONFIG_PHY_AQUANTIA=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
 CONFIG_MII=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NAND=y
 CONFIG_SCSI=y
 CONFIG_DM_SCSI=y
index a89c410c12ec946ec2587d46bce15098de91aa17..f5cca80a6d0e5256b53f233711ecde2fc643eb8e 100644 (file)
@@ -63,6 +63,9 @@ CONFIG_PHY_AQUANTIA=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
 CONFIG_MII=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
 CONFIG_SCSI=y
 CONFIG_DM_SCSI=y
index 6996f856a7e75304f84dc0738c328498b496b7df..dea847925314eb05966bda6bc50db1906717a5ea 100644 (file)
@@ -50,6 +50,9 @@ CONFIG_PHY_AQUANTIA=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
 CONFIG_MII=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
 CONFIG_SCSI=y
 CONFIG_DM_SCSI=y
index 101e23d2506f69564767eb6f05a196c9d0671c8b..60539f43805d912c7be94de23ea018ddcdf9bde8 100644 (file)
@@ -64,6 +64,9 @@ CONFIG_PHY_AQUANTIA=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
 CONFIG_MII=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
 CONFIG_SCSI=y
 CONFIG_DM_SCSI=y
index 1346d5eaac7cf5098b30629f9e4d3eb5591193a0..f4bebee1473a430c163468707b419b2a1c05ed5a 100644 (file)
@@ -43,6 +43,9 @@ CONFIG_PHY_AQUANTIA=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
 CONFIG_MII=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_REMOTE=y
 CONFIG_SCSI=y
 CONFIG_DM_SCSI=y
index bcbd276b022cca17af7f63b511a12a8a498913e1..e22542fd8c90f94a064c501a8ef1fc3db275fca1 100644 (file)
@@ -50,6 +50,9 @@ CONFIG_PHY_AQUANTIA=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
 CONFIG_MII=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
 CONFIG_SCSI=y
 CONFIG_DM_SCSI=y
index 0a676d48c949ca831660b993b4667a0661644a37..128f10fa5d05b882881176922aa6d3f4af7c6bb9 100644 (file)
@@ -19,12 +19,9 @@ CONFIG_AUTOBOOT_STOP_STR="\x1b"
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
-CONFIG_CMD_MMC=y
 # CONFIG_CMD_NAND is not set
-CONFIG_CMD_MMC_SPI=y
-CONFIG_CMD_SF=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_USB=y
+# CONFIG_CMD_PCI is not set
+# CONFIG_CMD_SATA is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
@@ -35,26 +32,18 @@ CONFIG_CMD_CRAMFS=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_FLASH=y
-CONFIG_FSL_ESDHC=y
+# CONFIG_SATA_SIL is not set
+# CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_CFI=y
-CONFIG_SPI_FLASH=y
-CONFIG_SF_DEFAULT_MODE=0
-CONFIG_SF_DEFAULT_SPEED=10000000
-CONFIG_SPI_FLASH_STMICRO=y
-CONFIG_SPI_FLASH_SST=y
-CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PHY_MARVELL=y
 CONFIG_PHY_GIGE=y
 CONFIG_E1000=y
 CONFIG_MII=y
 CONFIG_TSEC_ENET=y
+# CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
-CONFIG_SPI=y
-CONFIG_FSL_ESPI=y
-CONFIG_USB=y
-CONFIG_USB_STORAGE=y
 CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
index 05077c5b735d8676f56cb903501b28f182f20948..a0a4abab4e93eabf9a2f64930e0b67a773b49671 100644 (file)
@@ -17,7 +17,6 @@ CONFIG_BOOTDELAY=1
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_NAND_SUPPORT is not set
 CONFIG_SPL_POWER_SUPPORT=y
-CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_SPL_YMODEM_SUPPORT=y
 CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
@@ -50,5 +49,6 @@ CONFIG_SPL_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_TPS65910=y
 CONFIG_CONS_INDEX=4
+# CONFIG_OMAP_WATCHDOG is not set
 # CONFIG_USE_TINY_PRINTF is not set
 # CONFIG_EFI_LOADER is not set
index 584e54d5356b3c6b63f504b8e792b2fc4375d136..7f6ccc9f540b90d45411985e1ed4afbd3c9fe862 100644 (file)
@@ -54,5 +54,4 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=y
 CONFIG_DM_THERMAL=y
-CONFIG_IMX_SCU_THERMAL=y
 # CONFIG_EFI_LOADER is not set
index 6f36f7b82ed3d400c2c4ff31374c2261518744c3..248922cd56b965acfa3a441ff5dd199a9b476da7 100644 (file)
@@ -1,7 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
index b14786ed3da5654198a8cf7382bce1ad43216ac3..5292ef96eeddc491490cf039f5d49ec424d20f20 100644 (file)
@@ -25,7 +25,6 @@ CONFIG_CMD_CPU=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 8baac6fc70d214d864ca58aa5c298b66c5886103..3cbc949a018752f8a097cdcad15ce18662e40b3b 100644 (file)
@@ -15,7 +15,6 @@ CONFIG_HUSH_PARSER=y
 CONFIG_CMD_CPU=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 4ce6a09483067c22f2062cbf4010d5711bd71be8..67526e87c01a8b6cc0e786bd89db13f56750debd 100644 (file)
@@ -34,7 +34,6 @@ CONFIG_HUSH_PARSER=y
 CONFIG_CMD_CPU=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 8d63c874ccf56a1e5a7cb8a4b67668758600efb0..c3c29d38e52aa9abf45f4da41ee67845c48f338a 100644 (file)
@@ -25,7 +25,6 @@ CONFIG_CMD_CPU=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 91d9fdf96151e068dc205912385471c46998af11..522e60bbb54e27002eaded15b35f82fdf1abfc39 100644 (file)
@@ -28,7 +28,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_PART=y
 CONFIG_CMD_SATA=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 40f6bb9830fe87ca66c398d0c41f51dd4749f828..3b2cbdcd44bae0ecddb3c39ffaa04d84915c4c50 100644 (file)
@@ -38,7 +38,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_PART=y
 CONFIG_CMD_SATA=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 0b0198151bfad1842901ab4eb3ec3399ebd68037..a42d726b715a59a7bf4238605e1c7c85bef6c1d8 100644 (file)
@@ -18,7 +18,6 @@ CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 5c89439f7b3833984761010d90cd15069a2a3a84..1c027299b6b288a8618aaf275c3162a301f3c40f 100644 (file)
@@ -2,7 +2,6 @@ CONFIG_ARM=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x87800000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_COLIBRI_IMX6ULL=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_DISTRO_DEFAULTS=y
index d808bd760888cb3da8233e31d62d02cdd0bbc9ca..8d6c0788f139681308806e3f1f29ea40ee4e0878 100644 (file)
@@ -3,8 +3,8 @@ CONFIG_ARCH_IMX8=y
 CONFIG_SYS_TEXT_BASE=0x80020000
 CONFIG_SYS_MALLOC_F_LEN=0x4000
 CONFIG_TARGET_COLIBRI_IMX8X=y
-CONFIG_DISTRO_DEFAULTS=y
 CONFIG_NR_DRAM_BANKS=3
+CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri-imx8x/colibri-imx8qxp-imximage.cfg"
 CONFIG_LOG=y
@@ -52,5 +52,4 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=y
 CONFIG_DM_THERMAL=y
-CONFIG_IMX_SCU_THERMAL=y
 # CONFIG_EFI_LOADER is not set
index a60d6951c92d5d7753f2073d82606dffdd5b6a4e..56e512d529104494f6f87ff7cdc956cd18130e66 100644 (file)
@@ -1,7 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
@@ -85,7 +84,7 @@ CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_DM_VIDEO=y
+CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT_OVERLAY=y
-CONFIG_SYS_WHITE_ON_BLACK=y
index efbf5f55a321bd08b1516c438cc4d438f13acbbb..e5e4168285ae31e7fefa6b731f1b937d9337cc97 100644 (file)
@@ -2,7 +2,6 @@ CONFIG_ARM=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX7=y
 CONFIG_SYS_TEXT_BASE=0x87800000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SECURE_BOOT=y
 CONFIG_TARGET_COLIBRI_IMX7=y
 CONFIG_NR_DRAM_BANKS=1
@@ -66,8 +65,8 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX7=y
 CONFIG_DM_PMIC=y
 CONFIG_PMIC_RN5T567=y
-CONFIG_DM_USB=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="Toradex"
index 89f43e5fb9f59e14f10d5c8a35bc2852bfbd928d..06902b63114b3c8e9fa7a63924e1a7450fa76c8d 100644 (file)
@@ -2,7 +2,6 @@ CONFIG_ARM=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX7=y
 CONFIG_SYS_TEXT_BASE=0x87800000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SECURE_BOOT=y
 CONFIG_TARGET_COLIBRI_IMX7=y
 CONFIG_TARGET_COLIBRI_IMX7_EMMC=y
@@ -45,6 +44,12 @@ CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_FSL_CAAM=y
 CONFIG_DFU_MMC=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x82000000
+CONFIG_FASTBOOT_BUF_SIZE=0x10000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_DM_MMC=y
@@ -59,22 +64,13 @@ CONFIG_PINCTRL_IMX7=y
 CONFIG_DM_PMIC=y
 CONFIG_PMIC_RN5T567=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="Toradex"
 CONFIG_USB_GADGET_VENDOR_NUM=0x1b67
 CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
-CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT_OVERLAY=y
-CONFIG_DM_USB=y
-CONFIG_FASTBOOT=y
-CONFIG_FASTBOOT_USB_DEV=0
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
-CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
-CONFIG_USB_FUNCTION_FASTBOOT=y
-CONFIG_FASTBOOT_BUF_ADDR=0x82000000
-CONFIG_FASTBOOT_BUF_SIZE=0x10000000
index d6a20ca6426fa6adcd2546a712bee129f6adddc9..170a1b0b27ab2b7968115918c805ea92d2011714 100644 (file)
@@ -67,4 +67,3 @@ CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_TEGRA20=y
 CONFIG_CONSOLE_SCROLL_LINES=10
 CONFIG_OF_LIBFDT_OVERLAY=y
-CONFIG_SYS_WHITE_ON_BLACK=y
index 8bce6b75ef83d8668218383bbef6963264c61edb..338317203ebed66fab563ac40f8aaaf6331641e7 100644 (file)
@@ -31,7 +31,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index b3cf9704d76117cf58d93429cbbee1f4ba01796b..4fdee998bee4760be96a7f7810b2f6ecbbab1cee 100644 (file)
@@ -27,7 +27,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index c11d5f2147b913d019461ff3c77b12ff66b082af..b05da76ef1885be46d9a6c867fc20b2c4c75f5e6 100644 (file)
@@ -18,7 +18,6 @@ CONFIG_CMD_CPU=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 092ab429417e518f7ed759d8cd638cf15670624d..e575040a470d3b425c7846f2b97b3fbafda70849 100644 (file)
@@ -20,7 +20,6 @@ CONFIG_CMD_CPU=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index d8b900f964761fe013a4fa9ad08a851cb8577fda..111011c8548d118849cbe0d3952489f29cff9a53 100644 (file)
@@ -25,7 +25,6 @@ CONFIG_CMD_CPU=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 70f02770406548ec2a7eab74f16dfcdaa59cf1ad..d71bbced01d25d7b26571ff32862a556893d6a04 100644 (file)
@@ -10,8 +10,6 @@ CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_SPL=y
 CONFIG_SYS_BOOTCOUNT_ADDR=0x00900000
-CONFIG_DM_GPIO=y
-CONFIG_DM_MMC=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_AHCI=y
@@ -46,6 +44,8 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6q-dhcom-pdk2"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_DWC_AHSATA=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_MMC=y
 CONFIG_FSL_ESDHC=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
index b4e8921f8cadb505c5740739209be53a39aee1f9..ea3743dd12609dca14ef736d95df18cd8e01e7a9 100644 (file)
@@ -14,7 +14,6 @@ CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_BOOTM is not set
 CONFIG_CMD_PART=y
-# CONFIG_CMD_SF_TEST is not set
 # CONFIG_CMD_NET is not set
 CONFIG_CMD_TIME=y
 CONFIG_CMD_EXT2=y
index db088c0e97f309802a451f1f910712871cb05ba1..ba5a5019636494586434743845ea0daf46274dca 100644 (file)
@@ -18,7 +18,6 @@ CONFIG_CMD_CPU=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index f282064fc7fab6c242df8bb908b097b1a88a70f2..3db70827a18a5519208371621feb5f052bfd0f48 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_MX6Q_ENGICAM=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=1
index 5ad49b38ec1124337775e83c4e61dc9756c73ad5..c27c5ccf696626d83fd40ab7cb657497322e1687 100644 (file)
@@ -1,7 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_SYS_TEXT_BASE=0x17800000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SECURE_BOOT=y
 CONFIG_TARGET_MX6DL_MAMOJ=y
 CONFIG_NR_DRAM_BANKS=1
index d39fd957a3837d2d6e4544589c6de0720ea57168..ad4b930a3902954852c4c68d1c0e29d7db0671aa 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_MX6Q_ENGICAM=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=1
index 8704006ae710bff3757f5c70402a6c58fdf42244..f6fc59ff5e629a7c75164465439be197f044732a 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_MX6Q_ENGICAM=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=1
index b65979967a00501dfdc7fe4035b899e084e111d5..5ab932d0ae36172dc9dec01b1af26fc73de36f53 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_MX6Q_ENGICAM=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=1
index 83b926b699c6579801c7e7ba6fcbe1f383c5b881..4b8998177bf49640023a9ea3ba2ca369bc49cb0f 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_MX6Q_ENGICAM=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=1
index 318628b1a0719a1f83a37ef012c705f12f05ecc9..d5fdc43f48359c36cd15df915622608fd06d7b32 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_MX6UL_ENGICAM=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=1
index 00c9bbd859399b730f6ce0815f8ceff1cda229e4..88b9b49781ed05ef01f36b5a820e93fe82745342 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_MX6UL_ENGICAM=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=1
index bc84a66b5f15040b0cd56a58b8abeaef91962037..f02b5e2084f3e0b219f132deeedfe0731073716a 100644 (file)
@@ -3,7 +3,6 @@ CONFIG_SPL_SYS_ICACHE_OFF=y
 CONFIG_SPL_SYS_DCACHE_OFF=y
 CONFIG_ARCH_IMX8M=y
 CONFIG_SYS_TEXT_BASE=0x40200000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_IMX8MQ_EVK=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
index 1c67b98c5d16928f6de5924d2d1a5faac404ef17..6db0669ef47e591ce28c854c3aedb604c8525064 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_SYS_TEXT_BASE=0x80020000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_IMX8QM_MEK=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
index a375546a7514672acbb96a50fa86fa1efc334270..1f37729063c516506872f18e2c67f5a5906c766f 100644 (file)
@@ -1,8 +1,8 @@
 CONFIG_RISCV=y
+CONFIG_TARGET_MICROCHIP_ICICLE=y
 CONFIG_ARCH_RV64I=y
 CONFIG_NR_CPUS=5
-CONFIG_TARGET_MICROCHIP_ICICLE=y
+CONFIG_FIT=y
 CONFIG_BOOTDELAY=3
 CONFIG_SYS_PROMPT="RISC-V # "
-CONFIG_FIT=y
 CONFIG_OF_PRIOR_STAGE=y
index 16df6ef137b7726ad564ff47d56edb15ab664f1a..446c2f2c034251d26b5aec7feaa97bc990d85db5 100644 (file)
@@ -31,7 +31,6 @@ CONFIG_CMD_CPU=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 89d542fef7bcc30ae5653376e1ff701143d6393b..0739c581a7e90a2b6cef97dc02797d4f5090553f 100644 (file)
@@ -82,16 +82,15 @@ CONFIG_SF_DEFAULT_SPEED=20000000
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
 CONFIG_MII=y
+CONFIG_PCI=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
-CONFIG_PCI=y
 CONFIG_DM_REGULATOR=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
-# CONFIG_SPL_DM_USB is not set
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="FSL"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0525
index 97a94cbc36a3a57f02a2ec11bdd061cb72a1c5b9..5799ab39f4f4ef064bf2f262506e4391da50491c 100644 (file)
@@ -6,16 +6,17 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x4000
 CONFIG_ROCKCHIP_RK3399=y
 CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x50000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEBUG_UART_BASE=0xFF1A0000
 CONFIG_DEBUG_UART_CLOCK=24000000
-CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEBUG_UART=y
-CONFIG_NR_DRAM_BANKS=1
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopi-neo4.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
+CONFIG_TPL=y
 CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
@@ -26,7 +27,6 @@ CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-neo4"
 CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
-CONFIG_TPL=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
index e649ebb549b92de294b35112fc1b1df09f467969..2a7807d3608ba2959a6f21fe3ebea3d0f8ee73d1 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0x17800000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_MX6_DDRCAL=y
 CONFIG_TARGET_KOSAGI_NOVENA=y
 CONFIG_SPL_MMC_SUPPORT=y
index badc4b0236ab7b98c92f77cebf0d1e7c1a2c2c8b..b0ec1208f5e204a6d6b0b6d9f0b590caa2c0fe61 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0x87800000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_OPOS6ULDEV=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
index 2a21ff1dd08c11df01c724899d33abddfa0ce0de..4bd8cd29f36f0c295fed46a715f721c0e9f4bf14 100644 (file)
@@ -4,8 +4,8 @@ CONFIG_SYS_TEXT_BASE=0x80080000
 CONFIG_NR_DRAM_BANKS=2
 CONFIG_TEGRA210=y
 CONFIG_TARGET_P2371_2180=y
-CONFIG_OF_SYSTEM_SETUP=y
 CONFIG_OF_BOARD_SETUP=y
+CONFIG_OF_SYSTEM_SETUP=y
 CONFIG_CONSOLE_MUX=y
 CONFIG_SYS_STDIO_DEREGISTER=y
 CONFIG_SYS_PROMPT="Tegra210 (P2371-2180) # "
index 4ac810db35d559d8bb20acc8a6a545c27c51fb50..808577167e67863a953d6bcf9fb28de379b76377 100644 (file)
@@ -3,8 +3,8 @@ CONFIG_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80080000
 CONFIG_NR_DRAM_BANKS=1026
 CONFIG_TEGRA186=y
-CONFIG_OF_SYSTEM_SETUP=y
 CONFIG_OF_BOARD_SETUP=y
+CONFIG_OF_SYSTEM_SETUP=y
 CONFIG_CONSOLE_MUX=y
 CONFIG_SYS_STDIO_DEREGISTER=y
 CONFIG_SYS_PROMPT="Tegra186 (P2771-0000-000) # "
index 3ca85272a821bbc71bce2d8f0d461dbeb2d6f6f7..b222bfa446acf2188aaeabe3e62a943a52a1f982 100644 (file)
@@ -3,8 +3,8 @@ CONFIG_TEGRA=y
 CONFIG_SYS_TEXT_BASE=0x80080000
 CONFIG_NR_DRAM_BANKS=1026
 CONFIG_TEGRA186=y
-CONFIG_OF_SYSTEM_SETUP=y
 CONFIG_OF_BOARD_SETUP=y
+CONFIG_OF_SYSTEM_SETUP=y
 CONFIG_CONSOLE_MUX=y
 CONFIG_SYS_STDIO_DEREGISTER=y
 CONFIG_SYS_PROMPT="Tegra186 (P2771-0000-500) # "
index 75408a83447c2bf2075a78a40ea0905c583dcdee..5c07b954b60440e3265e2ef425d72da94ab3bc3f 100644 (file)
@@ -6,10 +6,9 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_TARGET_PCL063_ULL=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_NR_DRAM_BANKS=8
 CONFIG_SPL=y
-# CONFIG_CMD_DEKBLOB is not set
 CONFIG_DISTRO_DEFAULTS=y
-CONFIG_NR_DRAM_BANKS=8
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 CONFIG_BOOTDELAY=3
index b1cd5b4f443a68d2f7ff2fb268fd44f805c4170b..d89cd4414432e2e7cb302d1b6fa27fd855c74bd6 100644 (file)
@@ -35,7 +35,6 @@ CONFIG_CMD_CPU=y
 CONFIG_CMD_BOOTEFI_SELFTEST=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_IDE=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 2a36f405f4852a9ed43b4a80415b4713b6d9c42b..898d656ac38739f784209b6d824fcbbfbfe9645c 100644 (file)
@@ -21,7 +21,6 @@ CONFIG_CMD_BOOTEFI_SELFTEST=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_IDE=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 32da77aa39e873018be4b0e09abad925b5a5206d..be670df23ff3a41863d521b4e931036730e85bd8 100644 (file)
@@ -6,16 +6,17 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x4000
 CONFIG_ROCKCHIP_RK3399=y
 CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x50000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEBUG_UART_BASE=0xFF1A0000
 CONFIG_DEBUG_UART_CLOCK=24000000
-CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEBUG_UART=y
-CONFIG_NR_DRAM_BANKS=1
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-pi-4.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
+CONFIG_TPL=y
 CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
@@ -26,7 +27,6 @@ CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4"
 CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
-CONFIG_TPL=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
index 90bcaedbd29d30a3d092f8993beff6dc40d22000..e8fc7ae141497484b0b92d4a39956e22e6eab3ec 100644 (file)
@@ -6,16 +6,17 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x4000
 CONFIG_ROCKCHIP_RK3399=y
 CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x50000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEBUG_UART_BASE=0xFF1A0000
 CONFIG_DEBUG_UART_CLOCK=24000000
-CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEBUG_UART=y
-CONFIG_NR_DRAM_BANKS=1
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
+CONFIG_TPL=y
 CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
@@ -26,7 +27,6 @@ CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-rockpro64"
 CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
-CONFIG_TPL=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
index bfb1eaf0e76db7cf9abf0fe2f735d18a2f5b6e2e..29a9df8ab0a576561e82b863bc4f5b0c0f3b616f 100644 (file)
@@ -41,7 +41,6 @@ CONFIG_CMD_OSD=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_READ=y
 CONFIG_CMD_REMOTEPROC=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_TFTPPUT=y
index 4cffa2c604954f17d513499aeb90f6824f0fe39d..6894262b89f9fe65beaad0ca0b88eec69d062d9d 100644 (file)
@@ -44,7 +44,6 @@ CONFIG_CMD_OSD=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_READ=y
 CONFIG_CMD_REMOTEPROC=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_AXI=y
index dda6832f834a3f2d2f1022cf55865e3704b59990..af335285c9adae4d98e94d9c076072fe8e8ba927 100644 (file)
@@ -33,7 +33,6 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_OSD=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_REMOTEPROC=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_TFTPPUT=y
index ec8726b798625d0ac17389b8e9c238cef5bfa129..da9229fc797fa2b772785fa149a54ca0fa99b7ad 100644 (file)
@@ -37,7 +37,6 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_OSD=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_REMOTEPROC=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_TFTPPUT=y
index 3e0bf5d3b50a75d085bde2326fdbe3b71b11dce6..d355cc3f3b226d1c4e5ca714c8a7c78f67a4ab54 100644 (file)
@@ -45,7 +45,6 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_OSD=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_REMOTEPROC=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_TFTPPUT=y
index 0287314469b79e567f9bec44fcc980cf7f636f10..fe1aa8236bb1a17afbdfdebd124daa94dcd83560 100644 (file)
@@ -26,7 +26,6 @@ CONFIG_CMD_CPU=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
index 66361c87155930bdf9d9318d7faa87370e7ebc66..5fe947782358b86365b1836fbb6661ea65859c27 100644 (file)
@@ -73,7 +73,7 @@ CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
 CONFIG_SPI_FLASH_MTD=y
 CONFIG_DM_ETH=y
-CONFIG_ETH_DESIGNWARE=y
+CONFIG_DWC_ETH_QOS=y
 CONFIG_PHY=y
 CONFIG_PHY_STM32_USBPHYC=y
 CONFIG_PINCONF=y
index f01e53055c68842253caa3698177eb471f5d741f..2653f71f78839b2a41967d2219d63719b5013b7f 100644 (file)
@@ -27,7 +27,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
index a0586145d574351463780aef79e2a8a11361bb2a..ee9189aeaee98aed3ca142d97a59a7eb5f11e4d8 100644 (file)
@@ -26,7 +26,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
index 2f8eaa4402f410c1abaf6a365751bf0bc05d9967..7da1beaa998c0fbd03212d27e5184c9d4f5b1929 100644 (file)
@@ -24,7 +24,6 @@ CONFIG_CMD_CPU=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
index 0e8cf73fe9f02343eb4e8738b02240e0abd4b3fc..27a5fc0dfb0d6cc63e765697ffec204e973f17d7 100644 (file)
@@ -3,10 +3,10 @@ CONFIG_ARCH_ROCKCHIP=y
 CONFIG_SYS_TEXT_BASE=0x00000000
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_ROCKCHIP_RK3288=y
-CONFIG_SPL_SIZE_LIMIT=30720
 CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
 CONFIG_TARGET_TINKER_RK3288=y
 CONFIG_NR_DRAM_BANKS=1
+CONFIG_SPL_SIZE_LIMIT=30720
 CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEBUG_UART_BASE=0xff690000
 CONFIG_DEBUG_UART_CLOCK=24000000
index 2c0999c70733284f7bbf3defa12cabe1d9d29f1e..ced6ca84b60f3ec0c7f222a1917928254d6d377f 100644 (file)
@@ -15,6 +15,8 @@ CONFIG_MISC_INIT_R=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_MMC=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_REGULATOR=y
 CONFIG_OF_CONTROL=y
@@ -27,6 +29,7 @@ CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=8
 CONFIG_DM_ETH=y
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_MESON_G12A_USB_PHY=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_MESON_G12A=y
 CONFIG_DM_REGULATOR=y
@@ -36,21 +39,16 @@ CONFIG_DEBUG_UART_MESON=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_DEBUG_UART_SKIP_INIT=y
 CONFIG_MESON_SERIAL=y
-CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_USB=y
-CONFIG_USB_HOST=y
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_DOWNLOAD=y
-CONFIG_PHY=y
-CONFIG_MESON_G12A_USB_PHY=y
 CONFIG_DM_USB=y
-CONFIG_USB_GADGET_DWC2_OTG=y
-CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_MESON_G12A=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_USB_MASS_STORAGE=y
+CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e
 CONFIG_USB_GADGET_PRODUCT_NUM=0xfada
+CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_OF_LIBFDT_OVERLAY=y
index 862078f3e7c8a296a1357fa112fe42a119ff2bd5..f14bc22b6db669179325e0e1a3549d1a6dca34b7 100644 (file)
@@ -414,11 +414,10 @@ int blk_get_device_by_str(const char *ifname, const char *dev_hwpart_str,
 #ifdef CONFIG_HAVE_BLOCK_DEVICE
        /*
         * Updates the partition table for the specified hw partition.
-        * Does not need to be done for hwpart 0 since it is default and
-        * already loaded.
+        * Always should be done, otherwise hw partition 0 will return stale
+        * data after displaying a non-zero hw partition.
         */
-       if(hwpart != 0)
-               part_init(*dev_desc);
+       part_init(*dev_desc);
 #endif
 
 cleanup:
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644 (file)
index 0000000..5135a96
--- /dev/null
@@ -0,0 +1,124 @@
+# -*- makefile -*-
+# Makefile for Sphinx documentation
+#
+
+subdir-y :=
+
+# You can set these variables from the command line.
+SPHINXBUILD   = sphinx-build
+SPHINXOPTS    =
+SPHINXDIRS    = .
+_SPHINXDIRS   = $(patsubst $(srctree)/doc/%/conf.py,%,$(wildcard $(srctree)/doc/*/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 ./doc/media
+
+quiet_cmd_sphinx = SPHINX  $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
+      cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=doc/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)=doc/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 doc/output'
diff --git a/doc/conf.py b/doc/conf.py
new file mode 100644 (file)
index 0000000..168c313
--- /dev/null
@@ -0,0 +1,528 @@
+# -*- 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())
diff --git a/doc/device-tree-bindings/arm/l2c2x0.txt b/doc/device-tree-bindings/arm/l2c2x0.txt
new file mode 100644 (file)
index 0000000..fbe6cb2
--- /dev/null
@@ -0,0 +1,114 @@
+* 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.
diff --git a/doc/device-tree-bindings/axi/gdsys,ihs_axi.txt b/doc/device-tree-bindings/axi/gdsys,ihs_axi.txt
new file mode 100644 (file)
index 0000000..110788f
--- /dev/null
@@ -0,0 +1,22 @@
+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 {
+        ...
+       };
+};
diff --git a/doc/device-tree-bindings/board/gdsys,board_gazerbeam.txt b/doc/device-tree-bindings/board/gdsys,board_gazerbeam.txt
new file mode 100644 (file)
index 0000000..28c1080
--- /dev/null
@@ -0,0 +1,46 @@
+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>;
+};
diff --git a/doc/device-tree-bindings/clock/fsl,mpc83xx-clk.txt b/doc/device-tree-bindings/clock/fsl,mpc83xx-clk.txt
new file mode 100644 (file)
index 0000000..8313da8
--- /dev/null
@@ -0,0 +1,23 @@
+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>;
+};
diff --git a/doc/device-tree-bindings/cpu/fsl,mpc83xx.txt b/doc/device-tree-bindings/cpu/fsl,mpc83xx.txt
new file mode 100644 (file)
index 0000000..ac563d9
--- /dev/null
@@ -0,0 +1,34 @@
+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>;
+       };
+};
diff --git a/doc/device-tree-bindings/misc/misc/fsl,mpc83xx-serdes.txt b/doc/device-tree-bindings/misc/misc/fsl,mpc83xx-serdes.txt
new file mode 100644 (file)
index 0000000..64a9b5b
--- /dev/null
@@ -0,0 +1,24 @@
+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;
+};
diff --git a/doc/device-tree-bindings/misc/misc/gdsys,io-endpoint.txt b/doc/device-tree-bindings/misc/misc/gdsys,io-endpoint.txt
new file mode 100644 (file)
index 0000000..db2ff8c
--- /dev/null
@@ -0,0 +1,20 @@
+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>;
+};
diff --git a/doc/device-tree-bindings/misc/misc/gdsys,iocon_fpga.txt b/doc/device-tree-bindings/misc/misc/gdsys,iocon_fpga.txt
new file mode 100644 (file)
index 0000000..acd466f
--- /dev/null
@@ -0,0 +1,19 @@
+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>;
+};
diff --git a/doc/device-tree-bindings/misc/misc/gdsys,iocpu_fpga.txt b/doc/device-tree-bindings/misc/misc/gdsys,iocpu_fpga.txt
new file mode 100644 (file)
index 0000000..819db22
--- /dev/null
@@ -0,0 +1,19 @@
+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>;
+};
diff --git a/doc/device-tree-bindings/misc/misc/gdsys,soc.txt b/doc/device-tree-bindings/misc/misc/gdsys,soc.txt
new file mode 100644 (file)
index 0000000..278e935
--- /dev/null
@@ -0,0 +1,16 @@
+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>;
+};
diff --git a/doc/device-tree-bindings/ram/fsl,mpc83xx-mem-controller.txt b/doc/device-tree-bindings/ram/fsl,mpc83xx-mem-controller.txt
new file mode 100644 (file)
index 0000000..da01fe9
--- /dev/null
@@ -0,0 +1,314 @@
+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>;
+       };
+};
diff --git a/doc/device-tree-bindings/reserved-memory/reserved-memory.txt b/doc/device-tree-bindings/reserved-memory/reserved-memory.txt
new file mode 100644 (file)
index 0000000..bac4afa
--- /dev/null
@@ -0,0 +1,136 @@
+*** 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>;
+               /* ... */
+       };
+};
diff --git a/doc/device-tree-bindings/timer/fsl,mpc83xx-timer.txt b/doc/device-tree-bindings/timer/fsl,mpc83xx-timer.txt
new file mode 100644 (file)
index 0000000..608d241
--- /dev/null
@@ -0,0 +1,21 @@
+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>;
+};
diff --git a/doc/efi.rst b/doc/efi.rst
new file mode 100644 (file)
index 0000000..5337a55
--- /dev/null
@@ -0,0 +1,22 @@
+.. 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:
diff --git a/doc/index.rst b/doc/index.rst
new file mode 100644 (file)
index 0000000..0353c10
--- /dev/null
@@ -0,0 +1,11 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+#######################
+U-Boot Developer Manual
+#######################
+
+.. toctree::
+
+   efi
+   linker_lists
+   serial
diff --git a/doc/linker_lists.rst b/doc/linker_lists.rst
new file mode 100644 (file)
index 0000000..72f514e
--- /dev/null
@@ -0,0 +1,100 @@
+.. 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:
diff --git a/doc/media/Makefile b/doc/media/Makefile
new file mode 100644 (file)
index 0000000..b9b43a3
--- /dev/null
@@ -0,0 +1,38 @@
+# Rules to convert a .h file to inline RST documentation
+
+SRC_DIR=$(srctree)/doc/media
+PARSER = $(srctree)/doc/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 $@
diff --git a/doc/media/linker_lists.h.rst.exceptions b/doc/media/linker_lists.h.rst.exceptions
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/doc/serial.rst b/doc/serial.rst
new file mode 100644 (file)
index 0000000..ed34e59
--- /dev/null
@@ -0,0 +1,7 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Serial system
+=============
+
+.. kernel-doc:: drivers/serial/serial.c
+   :internal:
diff --git a/doc/sphinx-static/theme_overrides.css b/doc/sphinx-static/theme_overrides.css
new file mode 100644 (file)
index 0000000..522b6d4
--- /dev/null
@@ -0,0 +1,89 @@
+/* -*- 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;
+    }
+}
diff --git a/doc/sphinx/cdomain.py b/doc/sphinx/cdomain.py
new file mode 100644 (file)
index 0000000..cf13ff3
--- /dev/null
@@ -0,0 +1,165 @@
+# -*- 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,
+    }
diff --git a/doc/sphinx/kernel_include.py b/doc/sphinx/kernel_include.py
new file mode 100755 (executable)
index 0000000..f523aa6
--- /dev/null
@@ -0,0 +1,190 @@
+#!/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 []
diff --git a/doc/sphinx/kerneldoc.py b/doc/sphinx/kerneldoc.py
new file mode 100644 (file)
index 0000000..fbedcc3
--- /dev/null
@@ -0,0 +1,146 @@
+# 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
+    )
diff --git a/doc/sphinx/kfigure.py b/doc/sphinx/kfigure.py
new file mode 100644 (file)
index 0000000..b97228d
--- /dev/null
@@ -0,0 +1,551 @@
+# -*- 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
diff --git a/doc/sphinx/load_config.py b/doc/sphinx/load_config.py
new file mode 100644 (file)
index 0000000..301a21a
--- /dev/null
@@ -0,0 +1,32 @@
+# -*- 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)
diff --git a/doc/sphinx/parse-headers.pl b/doc/sphinx/parse-headers.pl
new file mode 100755 (executable)
index 0000000..d4f3826
--- /dev/null
@@ -0,0 +1,401 @@
+#!/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 doc/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
diff --git a/doc/sphinx/requirements.txt b/doc/sphinx/requirements.txt
new file mode 100644 (file)
index 0000000..742be3e
--- /dev/null
@@ -0,0 +1,3 @@
+docutils==0.12
+Sphinx==1.4.9
+sphinx_rtd_theme
diff --git a/doc/sphinx/rstFlatTable.py b/doc/sphinx/rstFlatTable.py
new file mode 100755 (executable)
index 0000000..f9a4b46
--- /dev/null
@@ -0,0 +1,376 @@
+#!/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
+# (doc/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[:]
index 456c1b4cc92321616141fa0feaebe5ebedb06e67..71b52c6cf2c99d6402eb1531298914334d855eba 100644 (file)
@@ -905,14 +905,14 @@ static int mmc_set_capacity(struct mmc *mmc, int part_num)
        return 0;
 }
 
-#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
+#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
 static int mmc_boot_part_access_chk(struct mmc *mmc, unsigned int part_num)
 {
        int forbidden = 0;
        bool change = false;
 
        if (part_num & PART_ACCESS_MASK)
-               forbidden = MMC_CAP(MMC_HS_200);
+               forbidden = MMC_CAP(MMC_HS_200) | MMC_CAP(MMC_HS_400);
 
        if (MMC_CAP(mmc->selected_mode) & forbidden) {
                pr_debug("selected mode (%s) is forbidden for part %d\n",
index 429bb836a8a041146ec92b338ba566f2d03d9b2e..3fe38f7315eda618eaffd4b98b2a9c3cd3fa90df 100644 (file)
@@ -60,6 +60,14 @@ config PCIE_DW_MVEBU
          Armada-8K SoCs. The PCIe controller on Armada-8K is based on
          DesignWare hardware.
 
+config PCIE_FSL
+       bool "FSL PowerPC PCIe support"
+       depends on DM_PCI
+       help
+         Say Y here if you want to enable PCIe controller support on FSL
+         PowerPC MPC85xx, MPC86xx, B series, P series and T series SoCs.
+         This driver does not support SRIO_PCIE_BOOT feature.
+
 config PCI_RCAR_GEN2
        bool "Renesas RCar Gen2 PCIe driver"
        depends on DM_PCI
index bd392edba179e35ab5f55cbb507156783c5f48c1..b5ebd50c855f5f0d909435b0c1306da6004c18e8 100644 (file)
@@ -31,6 +31,7 @@ obj-$(CONFIG_SH7780_PCI) +=pci_sh7780.o
 obj-$(CONFIG_PCI_TEGRA) += pci_tegra.o
 obj-$(CONFIG_PCI_AARDVARK) += pci-aardvark.o
 obj-$(CONFIG_PCIE_DW_MVEBU) += pcie_dw_mvebu.o
+obj-$(CONFIG_PCIE_FSL) += pcie_fsl.o pcie_fsl_fixup.o
 obj-$(CONFIG_PCIE_LAYERSCAPE) += pcie_layerscape.o
 obj-$(CONFIG_PCIE_LAYERSCAPE) += pcie_layerscape_fixup.o
 obj-$(CONFIG_PCIE_LAYERSCAPE_GEN4) += pcie_layerscape_gen4.o \
index 183787333e9a83e73e94c98baaa976e60685b97f..84908e6154c568a3382381aeda2baeaa3ebef01e 100644 (file)
@@ -21,9 +21,10 @@ void pciauto_region_init(struct pci_region *res)
        /*
         * Avoid allocating PCI resources from address 0 -- this is illegal
         * according to PCI 2.1 and moreover, this is known to cause Linux IDE
-        * drivers to fail. Use a reasonable starting value of 0x1000 instead.
+        * drivers to fail. Use a reasonable starting value of 0x1000 instead
+        * if the bus start address is below 0x1000.
         */
-       res->bus_lower = res->bus_start ? res->bus_start : 0x1000;
+       res->bus_lower = res->bus_start < 0x1000 ? 0x1000 : res->bus_start;
 }
 
 void pciauto_region_align(struct pci_region *res, pci_size_t size)
diff --git a/drivers/pci/pcie_fsl.c b/drivers/pci/pcie_fsl.c
new file mode 100644 (file)
index 0000000..4d61a46
--- /dev/null
@@ -0,0 +1,610 @@
+// SPDX-License-Identifier: GPL-2.0+ OR X11
+/*
+ * Copyright 2019 NXP
+ *
+ * PCIe DM U-Boot driver for Freescale PowerPC SoCs
+ * Author: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <malloc.h>
+#include <mapmem.h>
+#include <pci.h>
+#include <asm/fsl_pci.h>
+#include <asm/fsl_serdes.h>
+#include <asm/io.h>
+#include "pcie_fsl.h"
+
+LIST_HEAD(fsl_pcie_list);
+
+static int fsl_pcie_link_up(struct fsl_pcie *pcie);
+
+static int fsl_pcie_addr_valid(struct fsl_pcie *pcie, pci_dev_t bdf)
+{
+       struct udevice *bus = pcie->bus;
+
+       if (!pcie->enabled)
+               return -ENXIO;
+
+       if (PCI_BUS(bdf) < bus->seq)
+               return -EINVAL;
+
+       if (PCI_BUS(bdf) > bus->seq && (!fsl_pcie_link_up(pcie) || pcie->mode))
+               return -EINVAL;
+
+       if (PCI_BUS(bdf) == bus->seq && (PCI_DEV(bdf) > 0 || PCI_FUNC(bdf) > 0))
+               return -EINVAL;
+
+       if (PCI_BUS(bdf) == (bus->seq + 1) && (PCI_DEV(bdf) > 0))
+               return -EINVAL;
+
+       return 0;
+}
+
+static int fsl_pcie_read_config(struct udevice *bus, pci_dev_t bdf,
+                               uint offset, ulong *valuep,
+                               enum pci_size_t size)
+{
+       struct fsl_pcie *pcie = dev_get_priv(bus);
+       ccsr_fsl_pci_t *regs = pcie->regs;
+       u32 val;
+
+       if (fsl_pcie_addr_valid(pcie, bdf)) {
+               *valuep = pci_get_ff(size);
+               return 0;
+       }
+
+       bdf = bdf - PCI_BDF(bus->seq, 0, 0);
+       val = bdf | (offset & 0xfc) | ((offset & 0xf00) << 16) | 0x80000000;
+       out_be32(&regs->cfg_addr, val);
+
+       sync();
+
+       switch (size) {
+       case PCI_SIZE_8:
+               *valuep = in_8((u8 *)&regs->cfg_data + (offset & 3));
+               break;
+       case PCI_SIZE_16:
+               *valuep = in_le16((u16 *)((u8 *)&regs->cfg_data +
+                         (offset & 2)));
+               break;
+       case PCI_SIZE_32:
+               *valuep = in_le32(&regs->cfg_data);
+               break;
+       }
+
+       return 0;
+}
+
+static int fsl_pcie_write_config(struct udevice *bus, pci_dev_t bdf,
+                                uint offset, ulong value,
+                                enum pci_size_t size)
+{
+       struct fsl_pcie *pcie = dev_get_priv(bus);
+       ccsr_fsl_pci_t *regs = pcie->regs;
+       u32 val;
+       u8 val_8;
+       u16 val_16;
+       u32 val_32;
+
+       if (fsl_pcie_addr_valid(pcie, bdf))
+               return 0;
+
+       bdf = bdf - PCI_BDF(bus->seq, 0, 0);
+       val = bdf | (offset & 0xfc) | ((offset & 0xf00) << 16) | 0x80000000;
+       out_be32(&regs->cfg_addr, val);
+
+       sync();
+
+       switch (size) {
+       case PCI_SIZE_8:
+               val_8 = value;
+               out_8((u8 *)&regs->cfg_data + (offset & 3), val_8);
+               break;
+       case PCI_SIZE_16:
+               val_16 = value;
+               out_le16((u16 *)((u8 *)&regs->cfg_data + (offset & 2)), val_16);
+               break;
+       case PCI_SIZE_32:
+               val_32 = value;
+               out_le32(&regs->cfg_data, val_32);
+               break;
+       }
+
+       return 0;
+}
+
+static int fsl_pcie_hose_read_config(struct fsl_pcie *pcie, uint offset,
+                                    ulong *valuep, enum pci_size_t size)
+{
+       int ret;
+       struct udevice *bus = pcie->bus;
+
+       ret = fsl_pcie_read_config(bus, PCI_BDF(bus->seq, 0, 0),
+                                  offset, valuep, size);
+
+       return ret;
+}
+
+static int fsl_pcie_hose_write_config(struct fsl_pcie *pcie, uint offset,
+                                     ulong value, enum pci_size_t size)
+{
+       struct udevice *bus = pcie->bus;
+
+       return fsl_pcie_write_config(bus, PCI_BDF(bus->seq, 0, 0),
+                                    offset, value, size);
+}
+
+static int fsl_pcie_hose_read_config_byte(struct fsl_pcie *pcie, uint offset,
+                                         u8 *valuep)
+{
+       ulong val;
+       int ret;
+
+       ret = fsl_pcie_hose_read_config(pcie, offset, &val, PCI_SIZE_8);
+       *valuep = val;
+
+       return ret;
+}
+
+static int fsl_pcie_hose_read_config_word(struct fsl_pcie *pcie, uint offset,
+                                         u16 *valuep)
+{
+       ulong val;
+       int ret;
+
+       ret = fsl_pcie_hose_read_config(pcie, offset, &val, PCI_SIZE_16);
+       *valuep = val;
+
+       return ret;
+}
+
+static int fsl_pcie_hose_read_config_dword(struct fsl_pcie *pcie, uint offset,
+                                          u32 *valuep)
+{
+       ulong val;
+       int ret;
+
+       ret = fsl_pcie_hose_read_config(pcie, offset, &val, PCI_SIZE_32);
+       *valuep = val;
+
+       return ret;
+}
+
+static int fsl_pcie_hose_write_config_byte(struct fsl_pcie *pcie, uint offset,
+                                          u8 value)
+{
+       return fsl_pcie_hose_write_config(pcie, offset, value, PCI_SIZE_8);
+}
+
+static int fsl_pcie_hose_write_config_word(struct fsl_pcie *pcie, uint offset,
+                                          u16 value)
+{
+       return fsl_pcie_hose_write_config(pcie, offset, value, PCI_SIZE_16);
+}
+
+static int fsl_pcie_hose_write_config_dword(struct fsl_pcie *pcie, uint offset,
+                                           u32 value)
+{
+       return fsl_pcie_hose_write_config(pcie, offset, value, PCI_SIZE_32);
+}
+
+static int fsl_pcie_link_up(struct fsl_pcie *pcie)
+{
+       ccsr_fsl_pci_t *regs = pcie->regs;
+       u16 ltssm;
+
+       if (pcie->block_rev >= PEX_IP_BLK_REV_3_0) {
+               ltssm = (in_be32(&regs->pex_csr0)
+                       & PEX_CSR0_LTSSM_MASK) >> PEX_CSR0_LTSSM_SHIFT;
+               return ltssm == LTSSM_L0_REV3;
+       }
+
+       fsl_pcie_hose_read_config_word(pcie, PCI_LTSSM, &ltssm);
+
+       return ltssm == LTSSM_L0;
+}
+
+static bool fsl_pcie_is_agent(struct fsl_pcie *pcie)
+{
+       u8 header_type;
+
+       fsl_pcie_hose_read_config_byte(pcie, PCI_HEADER_TYPE, &header_type);
+
+       return (header_type & 0x7f) == PCI_HEADER_TYPE_NORMAL;
+}
+
+static int fsl_pcie_setup_law(struct fsl_pcie *pcie)
+{
+       struct pci_region *io, *mem, *pref;
+
+       pci_get_regions(pcie->bus, &io, &mem, &pref);
+
+       if (mem)
+               set_next_law(mem->phys_start,
+                            law_size_bits(mem->size),
+                            pcie->law_trgt_if);
+
+       if (io)
+               set_next_law(io->phys_start,
+                            law_size_bits(io->size),
+                            pcie->law_trgt_if);
+
+       return 0;
+}
+
+static void fsl_pcie_config_ready(struct fsl_pcie *pcie)
+{
+       ccsr_fsl_pci_t *regs = pcie->regs;
+
+       if (pcie->block_rev >= PEX_IP_BLK_REV_3_0) {
+               setbits_be32(&regs->config, FSL_PCIE_V3_CFG_RDY);
+               return;
+       }
+
+       fsl_pcie_hose_write_config_byte(pcie, FSL_PCIE_CFG_RDY, 0x1);
+}
+
+static int fsl_pcie_setup_outbound_win(struct fsl_pcie *pcie, int idx,
+                                      int type, u64 phys, u64 bus_addr,
+                                      pci_size_t size)
+{
+       ccsr_fsl_pci_t *regs = pcie->regs;
+       pot_t *po = &regs->pot[idx];
+       u32 war, sz;
+
+       if (idx < 0)
+               return -EINVAL;
+
+       out_be32(&po->powbar, phys >> 12);
+       out_be32(&po->potar, bus_addr >> 12);
+#ifdef CONFIG_SYS_PCI_64BIT
+       out_be32(&po->potear, bus_addr >> 44);
+#else
+       out_be32(&po->potear, 0);
+#endif
+
+       sz = (__ilog2_u64((u64)size) - 1);
+       war = POWAR_EN | sz;
+
+       if (type == PCI_REGION_IO)
+               war |= POWAR_IO_READ | POWAR_IO_WRITE;
+       else
+               war |= POWAR_MEM_READ | POWAR_MEM_WRITE;
+
+       out_be32(&po->powar, war);
+
+       return 0;
+}
+
+static int fsl_pcie_setup_inbound_win(struct fsl_pcie *pcie, int idx,
+                                     bool pf, u64 phys, u64 bus_addr,
+                                     pci_size_t size)
+{
+       ccsr_fsl_pci_t *regs = pcie->regs;
+       pit_t *pi = &regs->pit[idx];
+       u32 sz = (__ilog2_u64(size) - 1);
+       u32 flag = PIWAR_LOCAL;
+
+       if (idx < 0)
+               return -EINVAL;
+
+       out_be32(&pi->pitar, phys >> 12);
+       out_be32(&pi->piwbar, bus_addr >> 12);
+
+#ifdef CONFIG_SYS_PCI_64BIT
+       out_be32(&pi->piwbear, bus_addr >> 44);
+#else
+       out_be32(&pi->piwbear, 0);
+#endif
+
+       if (IS_ENABLED(CONFIG_SYS_FSL_ERRATUM_A005434))
+               flag = 0;
+
+       flag |= PIWAR_EN | PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP;
+       if (pf)
+               flag |= PIWAR_PF;
+       out_be32(&pi->piwar, flag | sz);
+
+       return 0;
+}
+
+static int fsl_pcie_setup_outbound_wins(struct fsl_pcie *pcie)
+{
+       struct pci_region *io, *mem, *pref;
+       int idx = 1; /* skip 0 */
+
+       pci_get_regions(pcie->bus, &io, &mem, &pref);
+
+       if (io)
+               /* ATU : OUTBOUND : IO */
+               fsl_pcie_setup_outbound_win(pcie, idx++,
+                                           PCI_REGION_IO,
+                                           io->phys_start,
+                                           io->bus_start,
+                                           io->size);
+
+       if (mem)
+               /* ATU : OUTBOUND : MEM */
+               fsl_pcie_setup_outbound_win(pcie, idx++,
+                                           PCI_REGION_MEM,
+                                           mem->phys_start,
+                                           mem->bus_start,
+                                           mem->size);
+       return 0;
+}
+
+static int fsl_pcie_setup_inbound_wins(struct fsl_pcie *pcie)
+{
+       phys_addr_t phys_start = CONFIG_SYS_PCI_MEMORY_PHYS;
+       pci_addr_t bus_start = CONFIG_SYS_PCI_MEMORY_BUS;
+       u64 sz = min((u64)gd->ram_size, (1ull << 32));
+       pci_size_t pci_sz;
+       int idx;
+
+       if (pcie->block_rev >= PEX_IP_BLK_REV_2_2)
+               idx = 2;
+       else
+               idx = 3;
+
+       pci_sz = 1ull << __ilog2_u64(sz);
+
+       dev_dbg(pcie->bus, "R0 bus_start: %llx phys_start: %llx size: %llx\n",
+               (u64)bus_start, (u64)phys_start, (u64)sz);
+
+       /* if we aren't an exact power of two match, pci_sz is smaller
+        * round it up to the next power of two.  We report the actual
+        * size to pci region tracking.
+        */
+       if (pci_sz != sz)
+               sz = 2ull << __ilog2_u64(sz);
+
+       fsl_pcie_setup_inbound_win(pcie, idx--, true,
+                                  CONFIG_SYS_PCI_MEMORY_PHYS,
+                                  CONFIG_SYS_PCI_MEMORY_BUS, sz);
+#if defined(CONFIG_PHYS_64BIT) && defined(CONFIG_SYS_PCI_64BIT)
+       /*
+        * On 64-bit capable systems, set up a mapping for all of DRAM
+        * in high pci address space.
+        */
+       pci_sz = 1ull << __ilog2_u64(gd->ram_size);
+       /* round up to the next largest power of two */
+       if (gd->ram_size > pci_sz)
+               pci_sz = 1ull << (__ilog2_u64(gd->ram_size) + 1);
+
+       dev_dbg(pcie->bus, "R64 bus_start: %llx phys_start: %llx size: %llx\n",
+               (u64)CONFIG_SYS_PCI64_MEMORY_BUS,
+               (u64)CONFIG_SYS_PCI_MEMORY_PHYS, (u64)pci_sz);
+
+       fsl_pcie_setup_inbound_win(pcie, idx--, true,
+                                  CONFIG_SYS_PCI_MEMORY_PHYS,
+                                  CONFIG_SYS_PCI64_MEMORY_BUS, pci_sz);
+#endif
+
+       return 0;
+}
+
+static int fsl_pcie_init_atmu(struct fsl_pcie *pcie)
+{
+       fsl_pcie_setup_outbound_wins(pcie);
+       fsl_pcie_setup_inbound_wins(pcie);
+
+       return 0;
+}
+
+static int fsl_pcie_init_port(struct fsl_pcie *pcie)
+{
+       ccsr_fsl_pci_t *regs = pcie->regs;
+       u32 val_32;
+       u16 val_16;
+
+       fsl_pcie_init_atmu(pcie);
+
+       if (IS_ENABLED(CONFIG_FSL_PCIE_DISABLE_ASPM)) {
+               val_32 = 0;
+               fsl_pcie_hose_read_config_dword(pcie, PCI_LCR, &val_32);
+               val_32 &= ~0x03;
+               fsl_pcie_hose_write_config_dword(pcie, PCI_LCR, val_32);
+               udelay(1);
+       }
+
+       if (IS_ENABLED(CONFIG_FSL_PCIE_RESET)) {
+               u16 ltssm;
+               int i;
+
+               if (pcie->block_rev >= PEX_IP_BLK_REV_3_0) {
+                       /* assert PCIe reset */
+                       setbits_be32(&regs->pdb_stat, 0x08000000);
+                       (void)in_be32(&regs->pdb_stat);
+                       udelay(1000);
+                       /* clear PCIe reset */
+                       clrbits_be32(&regs->pdb_stat, 0x08000000);
+                       asm("sync;isync");
+                       for (i = 0; i < 100 && !fsl_pcie_link_up(pcie); i++)
+                               udelay(1000);
+               } else {
+                       fsl_pcie_hose_read_config_word(pcie, PCI_LTSSM, &ltssm);
+                       if (ltssm == 1) {
+                               /* assert PCIe reset */
+                               setbits_be32(&regs->pdb_stat, 0x08000000);
+                               (void)in_be32(&regs->pdb_stat);
+                               udelay(100);
+                               /* clear PCIe reset */
+                               clrbits_be32(&regs->pdb_stat, 0x08000000);
+                               asm("sync;isync");
+                               for (i = 0; i < 100 &&
+                                    !fsl_pcie_link_up(pcie); i++)
+                                       udelay(1000);
+                       }
+               }
+       }
+
+       if (IS_ENABLED(CONFIG_SYS_P4080_ERRATUM_PCIE_A003) &&
+           !fsl_pcie_link_up(pcie)) {
+               serdes_corenet_t *srds_regs;
+
+               srds_regs = (void *)CONFIG_SYS_FSL_CORENET_SERDES_ADDR;
+               val_32 = in_be32(&srds_regs->srdspccr0);
+
+               if ((val_32 >> 28) == 3) {
+                       int i;
+
+                       out_be32(&srds_regs->srdspccr0, 2 << 28);
+                       setbits_be32(&regs->pdb_stat, 0x08000000);
+                       in_be32(&regs->pdb_stat);
+                       udelay(100);
+                       clrbits_be32(&regs->pdb_stat, 0x08000000);
+                       asm("sync;isync");
+                       for (i = 0; i < 100 && !fsl_pcie_link_up(pcie); i++)
+                               udelay(1000);
+               }
+       }
+
+       /*
+        * The Read-Only Write Enable bit defaults to 1 instead of 0.
+        * Set to 0 to protect the read-only registers.
+        */
+       if (IS_ENABLED(CONFIG_SYS_FSL_ERRATUM_A007815))
+               clrbits_be32(&regs->dbi_ro_wr_en, 0x01);
+
+       /*
+        * Enable All Error Interrupts except
+        * - Master abort (pci)
+        * - Master PERR (pci)
+        * - ICCA (PCIe)
+        */
+       out_be32(&regs->peer, ~0x20140);
+
+       /* set URR, FER, NFER (but not CER) */
+       fsl_pcie_hose_read_config_dword(pcie, PCI_DCR, &val_32);
+       val_32 |= 0xf000e;
+       fsl_pcie_hose_write_config_dword(pcie, PCI_DCR, val_32);
+
+       /* Clear all error indications */
+       out_be32(&regs->pme_msg_det, 0xffffffff);
+       out_be32(&regs->pme_msg_int_en, 0xffffffff);
+       out_be32(&regs->pedr, 0xffffffff);
+
+       fsl_pcie_hose_read_config_word(pcie, PCI_DSR, &val_16);
+       if (val_16)
+               fsl_pcie_hose_write_config_word(pcie, PCI_DSR, 0xffff);
+
+       fsl_pcie_hose_read_config_word(pcie, PCI_SEC_STATUS, &val_16);
+       if (val_16)
+               fsl_pcie_hose_write_config_word(pcie, PCI_SEC_STATUS, 0xffff);
+
+       return 0;
+}
+
+static int fsl_pcie_fixup_classcode(struct fsl_pcie *pcie)
+{
+       ccsr_fsl_pci_t *regs = pcie->regs;
+       u32 val;
+
+       setbits_be32(&regs->dbi_ro_wr_en, 0x01);
+       fsl_pcie_hose_read_config_dword(pcie, PCI_CLASS_REVISION, &val);
+       val &= 0xff;
+       val |= PCI_CLASS_BRIDGE_PCI << 16;
+       fsl_pcie_hose_write_config_dword(pcie, PCI_CLASS_REVISION, val);
+       clrbits_be32(&regs->dbi_ro_wr_en, 0x01);
+
+       return 0;
+}
+
+static int fsl_pcie_init_rc(struct fsl_pcie *pcie)
+{
+       return fsl_pcie_fixup_classcode(pcie);
+}
+
+static int fsl_pcie_init_ep(struct fsl_pcie *pcie)
+{
+       fsl_pcie_config_ready(pcie);
+
+       return 0;
+}
+
+static int fsl_pcie_probe(struct udevice *dev)
+{
+       struct fsl_pcie *pcie = dev_get_priv(dev);
+       ccsr_fsl_pci_t *regs = pcie->regs;
+       u16 val_16;
+
+       pcie->bus = dev;
+       pcie->block_rev = in_be32(&regs->block_rev1);
+
+       list_add(&pcie->list, &fsl_pcie_list);
+       pcie->enabled = is_serdes_configured(PCIE1 + pcie->idx);
+       if (!pcie->enabled) {
+               printf("PCIe%d: %s disabled\n", pcie->idx, dev->name);
+               return 0;
+       }
+
+       fsl_pcie_setup_law(pcie);
+
+       pcie->mode = fsl_pcie_is_agent(pcie);
+
+       fsl_pcie_init_port(pcie);
+
+       printf("PCIe%d: %s ", pcie->idx, dev->name);
+
+       if (pcie->mode) {
+               printf("Endpoint");
+               fsl_pcie_init_ep(pcie);
+       } else {
+               printf("Root Complex");
+               fsl_pcie_init_rc(pcie);
+       }
+
+       if (!fsl_pcie_link_up(pcie)) {
+               printf(": %s\n", pcie->mode ? "undetermined link" : "no link");
+               return 0;
+       }
+
+       fsl_pcie_hose_read_config_word(pcie, PCI_LSR, &val_16);
+       printf(": x%d gen%d\n", (val_16 & 0x3f0) >> 4, (val_16 & 0xf));
+
+       return 0;
+}
+
+static int fsl_pcie_ofdata_to_platdata(struct udevice *dev)
+{
+       struct fsl_pcie *pcie = dev_get_priv(dev);
+       int ret;
+
+       pcie->regs = dev_remap_addr(dev);
+       if (!pcie->regs) {
+               pr_err("\"reg\" resource not found\n");
+               return -EINVAL;
+       }
+
+       ret = dev_read_u32(dev, "law_trgt_if", &pcie->law_trgt_if);
+       if (ret < 0) {
+               pr_err("\"law_trgt_if\" not found\n");
+               return ret;
+       }
+
+       pcie->idx = (dev_read_addr(dev) - 0xffe240000) / 0x10000;
+
+       return 0;
+}
+
+static const struct dm_pci_ops fsl_pcie_ops = {
+       .read_config    = fsl_pcie_read_config,
+       .write_config   = fsl_pcie_write_config,
+};
+
+static const struct udevice_id fsl_pcie_ids[] = {
+       { .compatible = "fsl,pcie-t2080" },
+       { }
+};
+
+U_BOOT_DRIVER(fsl_pcie) = {
+       .name = "fsl_pcie",
+       .id = UCLASS_PCI,
+       .of_match = fsl_pcie_ids,
+       .ops = &fsl_pcie_ops,
+       .ofdata_to_platdata = fsl_pcie_ofdata_to_platdata,
+       .probe = fsl_pcie_probe,
+       .priv_auto_alloc_size = sizeof(struct fsl_pcie),
+};
diff --git a/drivers/pci/pcie_fsl.h b/drivers/pci/pcie_fsl.h
new file mode 100644 (file)
index 0000000..5eefc31
--- /dev/null
@@ -0,0 +1,56 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2019 NXP
+ *
+ * PCIe DM U-Boot driver for Freescale PowerPC SoCs
+ * Author: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
+ */
+
+#ifndef _PCIE_FSL_H_
+#define _PCIE_FSL_H_
+
+#ifdef CONFIG_SYS_FSL_PCI_VER_3_X
+#define FSL_PCIE_CAP_ID                        0x70
+#else
+#define FSL_PCIE_CAP_ID                        0x4c
+#endif
+/* PCIe Device Control Register */
+#define PCI_DCR                                (FSL_PCIE_CAP_ID + 0x08)
+/* PCIe Device Status Register */
+#define PCI_DSR                                (FSL_PCIE_CAP_ID + 0x0a)
+/* PCIe Link Control Register */
+#define PCI_LCR                                (FSL_PCIE_CAP_ID + 0x10)
+/* PCIe Link Status Register */
+#define PCI_LSR                                (FSL_PCIE_CAP_ID + 0x12)
+
+#ifndef CONFIG_SYS_PCI_MEMORY_BUS
+#define CONFIG_SYS_PCI_MEMORY_BUS      0
+#endif
+
+#ifndef CONFIG_SYS_PCI_MEMORY_PHYS
+#define CONFIG_SYS_PCI_MEMORY_PHYS     0
+#endif
+
+#if defined(CONFIG_SYS_PCI_64BIT) && !defined(CONFIG_SYS_PCI64_MEMORY_BUS)
+#define CONFIG_SYS_PCI64_MEMORY_BUS    (64ull * 1024 * 1024 * 1024)
+#endif
+
+#define PEX_CSR0_LTSSM_MASK            0xFC
+#define PEX_CSR0_LTSSM_SHIFT           2
+#define LTSSM_L0_REV3                  0x11
+#define LTSSM_L0                       0x16
+
+struct fsl_pcie {
+       int idx;
+       struct udevice *bus;
+       void __iomem *regs;
+       u32 law_trgt_if;                /* LAW target ID */
+       u32 block_rev;                  /* IP block revision */
+       bool mode;                      /* RC&EP mode flag */
+       bool enabled;                   /* Enable status */
+       struct list_head list;
+};
+
+extern struct list_head fsl_pcie_list;
+
+#endif /* _PCIE_FSL_H_ */
diff --git a/drivers/pci/pcie_fsl_fixup.c b/drivers/pci/pcie_fsl_fixup.c
new file mode 100644 (file)
index 0000000..cbdc0ef
--- /dev/null
@@ -0,0 +1,50 @@
+// SPDX-License-Identifier: GPL-2.0+ OR X11
+/*
+ * Copyright 2019 NXP
+ *
+ * PCIe Kernel DT fixup of DM U-Boot driver for Freescale PowerPC SoCs
+ * Author: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
+ */
+
+#include <common.h>
+#ifdef CONFIG_OF_BOARD_SETUP
+#include <dm.h>
+#include <fdt_support.h>
+#include <asm/fsl_pci.h>
+#include <linux/libfdt.h>
+#include "pcie_fsl.h"
+
+static void ft_fsl_pcie_setup(void *blob, struct fsl_pcie *pcie)
+{
+       struct pci_controller *hose = dev_get_uclass_priv(pcie->bus);
+       fdt_addr_t regs_addr;
+       int off;
+
+       regs_addr = dev_read_addr(pcie->bus);
+       off = fdt_node_offset_by_compat_reg(blob, FSL_PCIE_COMPAT, regs_addr);
+       if (off < 0) {
+               printf("%s: Fail to find PCIe node@0x%pa\n",
+                      FSL_PCIE_COMPAT, &regs_addr);
+               return;
+       }
+
+       if (!hose || !pcie->enabled)
+               fdt_del_node(blob, off);
+       else
+               fdt_pci_dma_ranges(blob, off, hose);
+}
+
+/* Fixup Kernel DT for PCIe */
+void pci_of_setup(void *blob, bd_t *bd)
+{
+       struct fsl_pcie *pcie;
+
+       list_for_each_entry(pcie, &fsl_pcie_list, list)
+               ft_fsl_pcie_setup(blob, pcie);
+}
+
+#else
+void pci_of_setup(void *blob, bd_t *bd)
+{
+}
+#endif
index 494ab533cca31a3c19b530ed44d2545625e4168d..35f4147840efe1a768405b12d0fd002ce779c0cd 100644 (file)
@@ -1039,8 +1039,10 @@ static int dwc2_udc_otg_ofdata_to_platdata(struct udevice *dev)
        int node = dev_of_offset(dev);
        ulong drvdata;
        void (*set_params)(struct dwc2_plat_otg_data *data);
+       int ret;
 
-       if (usb_get_dr_mode(node) != USB_DR_MODE_PERIPHERAL) {
+       if (usb_get_dr_mode(node) != USB_DR_MODE_PERIPHERAL &&
+           usb_get_dr_mode(node) != USB_DR_MODE_OTG) {
                dev_dbg(dev, "Invalid mode\n");
                return -ENODEV;
        }
@@ -1050,7 +1052,18 @@ static int dwc2_udc_otg_ofdata_to_platdata(struct udevice *dev)
        platdata->rx_fifo_sz = dev_read_u32_default(dev, "g-rx-fifo-size", 0);
        platdata->np_tx_fifo_sz = dev_read_u32_default(dev,
                                                       "g-np-tx-fifo-size", 0);
-       platdata->tx_fifo_sz = dev_read_u32_default(dev, "g-tx-fifo-size", 0);
+
+       platdata->tx_fifo_sz_nb =
+               dev_read_size(dev, "g-tx-fifo-size") / sizeof(u32);
+       if (platdata->tx_fifo_sz_nb > DWC2_MAX_HW_ENDPOINTS)
+               platdata->tx_fifo_sz_nb = DWC2_MAX_HW_ENDPOINTS;
+       if (platdata->tx_fifo_sz_nb) {
+               ret = dev_read_u32_array(dev, "g-tx-fifo-size",
+                                        platdata->tx_fifo_sz_array,
+                                        platdata->tx_fifo_sz_nb);
+               if (ret)
+                       return ret;
+       }
 
        platdata->force_b_session_valid =
                dev_read_bool(dev, "u-boot,force-b-session-valid");
index 523484b1fff945c335d2da11a8b977f93d7e6633..d344d54aee828fdeb2ff72dbe79ec557fc998d52 100644 (file)
@@ -23,6 +23,12 @@ static int ast_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
        ulong driver_data = dev_get_driver_data(dev);
        u32 reset_mode = ast_reset_mode_from_flags(flags);
 
+       /* 32 bits at 1MHz is 4294967ms */
+       timeout = min_t(u64, timeout, 4294967);
+
+       /* WDT counts in ticks of 1MHz clock. 1ms / 1e3 * 1e6 */
+       timeout *= 1000;
+
        clrsetbits_le32(&priv->regs->ctrl,
                        WDT_CTRL_RESET_MASK << WDT_CTRL_RESET_MODE_SHIFT,
                        reset_mode << WDT_CTRL_RESET_MODE_SHIFT);
index 0b501733f27ca587d3cf25535a215d082e622357..a7d4c7a3b85b5e4f06bb17d92604af29a1e5bc20 100644 (file)
@@ -70,18 +70,30 @@ static int mtk_wdt_expire_now(struct udevice *dev, ulong flags)
        return 0;
 }
 
-static void mtk_wdt_set_timeout(struct udevice *dev, unsigned int timeout)
+static void mtk_wdt_set_timeout(struct udevice *dev, unsigned int timeout_ms)
 {
        struct mtk_wdt_priv *priv = dev_get_priv(dev);
 
        /*
-        * One bit is the value of 512 ticks
-        * The clock has 32 KHz
+        * One WDT_LENGTH count is 512 ticks of the wdt clock
+        * Clock runs at 32768 Hz
+        * e.g. 15.625 ms per count (nominal)
+        * We want the ceiling after dividing timeout_ms by 15.625 ms
+        * We add 15624 prior to the divide to implement the ceiling
+        * We prevent over-flow by clamping the timeout_ms value here
+        *  as the maximum WDT_LENGTH counts is 1023 -> 15.984375 sec
+        * We also enforce a minimum of 1 count
+        * Many watchdog peripherals have a self-imposed count of 1
+        *  that is added to the register counts.
+        *  The MediaTek docs lack details to know if this is the case here.
+        *  So we enforce a minimum of 1 to guarantee operation.
         */
-       timeout = WDT_LENGTH_TIMEOUT(timeout << 6) | WDT_LENGTH_KEY;
-       writel(timeout, priv->base + MTK_WDT_LENGTH);
-
-       mtk_wdt_reset(dev);
+       if(timeout_ms > 15984) timeout_ms = 15984;
+       u64 timeout_us = timeout_ms * 1000;
+       u32 timeout_cc = (u32) ( (15624 + timeout_us) / 15625 );
+       if(timeout_cc == 0) timeout_cc = 1;
+       u32 length = WDT_LENGTH_TIMEOUT(timeout_cc) | WDT_LENGTH_KEY;
+       writel(length, priv->base + MTK_WDT_LENGTH);
 }
 
 static int mtk_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
@@ -90,6 +102,8 @@ static int mtk_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
 
        mtk_wdt_set_timeout(dev, timeout);
 
+        mtk_wdt_reset(dev);
+
        /* Enable watchdog reset signal */
        setbits_le32(priv->base + MTK_WDT_MODE,
                     WDT_MODE_EN | WDT_MODE_KEY | WDT_MODE_EXTEN);
index 4993303f4d97d0612a5637eb385e169e2f568aad..26e61ef196906411eb1ccbceff398906a46fad76 100644 (file)
 #endif
 
 #ifdef CONFIG_IDE
-#define BOOTENV_SHARED_IDE     BOOTENV_SHARED_BLKDEV(ide)
+#define BOOTENV_RUN_IDE_INIT "run ide_init; "
+#define BOOTENV_SET_IDE_NEED_INIT "setenv ide_need_init; "
+#define BOOTENV_SHARED_IDE \
+       "ide_init=" \
+               "if ${ide_need_init}; then " \
+                       "setenv ide_need_init false; " \
+                       "ide reset; " \
+               "fi\0" \
+       \
+       "ide_boot=" \
+               BOOTENV_RUN_IDE_INIT \
+               BOOTENV_SHARED_BLKDEV_BODY(ide)
 #define BOOTENV_DEV_IDE                BOOTENV_DEV_BLKDEV
 #define BOOTENV_DEV_NAME_IDE   BOOTENV_DEV_NAME_BLKDEV
 #else
+#define BOOTENV_RUN_IDE_INIT
+#define BOOTENV_SET_IDE_NEED_INIT
 #define BOOTENV_SHARED_IDE
 #define BOOTENV_DEV_IDE \
        BOOT_TARGET_DEVICES_references_IDE_without_CONFIG_IDE
        \
        "distro_bootcmd=" BOOTENV_SET_SCSI_NEED_INIT                      \
                BOOTENV_SET_NVME_NEED_INIT                                \
+               BOOTENV_SET_IDE_NEED_INIT                                 \
                "for target in ${boot_targets}; do "                      \
                        "run bootcmd_${target}; "                         \
                "done\0"
index 1537b45cc1b45e5cab25a494966de93ceeed9391..1c615acb3b3b5bf74f5bad5fd2eff9e47eb4dd01 100644 (file)
@@ -57,7 +57,6 @@
 #define CONFIG_PCIE1                   /* PCIE controller 1 (slot 1) */
 #define CONFIG_FSL_PCI_INIT            /* Use common FSL init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE     /* indirect PCI bridge support */
-#define CONFIG_FSL_PCIE_RESET          /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT           /* enable 64-bit PCI resources */
 
 /*
index e9371a025bcdd22beab109c3784bbd320243a72d..5a1a29bd9ead2a1145a32a2863404a55df1665b3 100644 (file)
@@ -66,7 +66,6 @@
 #define CONFIG_PCIE1                   /* PCIE controller 1 (slot 1) */
 #define CONFIG_FSL_PCI_INIT            /* Use common FSL init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE
-#define CONFIG_FSL_PCIE_RESET          /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT           /* enable 64-bit PCI resources */
 
 /*
index 819129033f686bcd4afa01c6afeef6603e0f4338..7697e8d3e0613b79a7458e3c8d19dded4c2aa138 100644 (file)
@@ -36,7 +36,6 @@
 #define CONFIG_PCIE3           1       /* PCIE controller 3 (ULI bridge) */
 #define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE 1   /* indirect PCI bridge support */
-#define CONFIG_FSL_PCIE_RESET  1       /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
 
 
index 280b873aee5814e8b186d80af77bb50ac50032d3..2cbe8552358ade5b3b2e264cec0e07e72196a706 100644 (file)
@@ -16,7 +16,6 @@
 #define CONFIG_PCIE3           1       /* PCIE controller 3 (ULI bridge) */
 #define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE 1   /* indirect PCI bridge support */
-#define CONFIG_FSL_PCIE_RESET  1       /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
 
 #define CONFIG_ENV_OVERWRITE
index be600becfe8f499f42291c4a15e7fea29bf31e20..b37601c794b9f5174ddbae09fa20f2944063e487 100644 (file)
@@ -20,7 +20,6 @@
 #undef CONFIG_PCI2
 #define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE 1   /* indirect PCI bridge support */
-#define CONFIG_FSL_PCIE_RESET  1       /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
 
 #define CONFIG_ENV_OVERWRITE
index 5515b9232c8be4a68d0a878252fe3bd6dfe05e7e..01ee69c0131b7a53e301b9aab079662732b8b537 100644 (file)
@@ -16,7 +16,6 @@
 #define CONFIG_PCIE1           1       /* PCIE controller */
 #define CONFIG_FSL_PCI_INIT    1       /* use common fsl pci init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE 1   /* indirect PCI bridge support */
-#define CONFIG_FSL_PCIE_RESET  1       /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
 #define CONFIG_ENV_OVERWRITE
 
index 3c6661fc836daaf75cacae5e85893e200f2e5996..de187bf9a4f56e4ed857cde63648e2115a259234 100644 (file)
@@ -15,7 +15,6 @@
 #define CONFIG_PCIE1           1       /* PCIE controller */
 #define CONFIG_FSL_PCI_INIT    1       /* use common fsl pci init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE 1   /* indirect PCI bridge support */
-#define CONFIG_FSL_PCIE_RESET  1       /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
 #define CONFIG_ENV_OVERWRITE
 
index 13fbbb3044b8fbba26a67961c82c8e854daf39e5..e3952f423bfb4aa468abcbf4288a08e9eb64cf84 100644 (file)
@@ -27,7 +27,6 @@
 #define CONFIG_PCIE3           1       /* PCIE controller 3 (ULI bridge) */
 #define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE 1   /* indirect PCI bridge support */
-#define CONFIG_FSL_PCIE_RESET  1       /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
 
 #define CONFIG_ENV_OVERWRITE
index 025aa330835ffc2b6bd02df0023363fc0c674e7c..1152bca03be6491b3e4deb94cedfaef9bb14d16e 100644 (file)
 #define CONFIG_PCIE2                   /* PCIE controller 2 (slot 2) */
 #define CONFIG_FSL_PCI_INIT            /* Use common FSL init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE     /* indirect PCI bridge support */
-#define CONFIG_FSL_PCIE_RESET          /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT           /* enable 64-bit PCI resources */
 
 /*
index 62943a3b0c5849f5ebee328d5941ee8dbd0e6596..4b2eb6525bde05b9eaf5cad167a5f83c4968c437 100644 (file)
@@ -81,7 +81,6 @@
 #define CONFIG_PCIE2                   /* PCIE controller 2 (slot 2) */
 #define CONFIG_PCIE3                   /* PCIE controller 3 (ULI bridge) */
 #define CONFIG_FSL_PCI_INIT            /* Use common FSL init code */
-#define CONFIG_FSL_PCIE_RESET          /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT           /* enable 64-bit PCI resources */
 
 #define CONFIG_ENABLE_36BIT_PHYS
index 7fe34c332ec95606a2ec8cc2353204755d631d55..9535a7bbb2fa8e33c28697e75ac85610fb82e5a2 100644 (file)
@@ -24,7 +24,6 @@
 #define CONFIG_PCIE2           /* PCIE controller 2 (slot 2) */
 #define CONFIG_PCIE3           /* PCIE controller 3 (slot 3) */
 #define CONFIG_FSL_PCI_INIT    /* Use common FSL init code */
-#define CONFIG_FSL_PCIE_RESET  /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT   /* enable 64-bit PCI resources */
 
 #ifndef __ASSEMBLY__
index 98bb3342b9db1729db9cb5c131a105c6c0638ff1..54ec1abd66a2fb2ee6df32ba3d01981a7731fe3a 100644 (file)
@@ -491,50 +491,51 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_PCIE2           /* PCIE controller 2 */
 #define CONFIG_PCIE3           /* PCIE controller 3 */
 #define CONFIG_PCIE4           /* PCIE controller 4 */
-#define CONFIG_FSL_PCIE_RESET   /* pcie reset fix link width 2x-4x*/
-#define CONFIG_FSL_PCI_INIT    /* Use common FSL init code */
 #define CONFIG_SYS_PCI_64BIT   /* enable 64-bit PCI resources */
 /* controller 1, direct to uli, tgtid 3, Base address 20000 */
 #define CONFIG_SYS_PCIE1_MEM_VIRT      0x80000000
-#define CONFIG_SYS_PCIE1_MEM_BUS       0xe0000000
 #define CONFIG_SYS_PCIE1_MEM_PHYS      0xc00000000ull
-#define CONFIG_SYS_PCIE1_MEM_SIZE      0x20000000      /* 512M */
 #define CONFIG_SYS_PCIE1_IO_VIRT       0xf8000000
-#define CONFIG_SYS_PCIE1_IO_BUS                0x00000000
 #define CONFIG_SYS_PCIE1_IO_PHYS       0xff8000000ull
-#define CONFIG_SYS_PCIE1_IO_SIZE       0x00010000      /* 64k */
 
 /* controller 2, Slot 2, tgtid 2, Base address 201000 */
 #define CONFIG_SYS_PCIE2_MEM_VIRT      0xa0000000
-#define CONFIG_SYS_PCIE2_MEM_BUS       0xe0000000
 #define CONFIG_SYS_PCIE2_MEM_PHYS      0xc20000000ull
-#define CONFIG_SYS_PCIE2_MEM_SIZE      0x10000000 /* 256M */
 #define CONFIG_SYS_PCIE2_IO_VIRT       0xf8010000
-#define CONFIG_SYS_PCIE2_IO_BUS                0x00000000
 #define CONFIG_SYS_PCIE2_IO_PHYS       0xff8010000ull
-#define CONFIG_SYS_PCIE2_IO_SIZE       0x00010000      /* 64k */
 
 /* controller 3, Slot 1, tgtid 1, Base address 202000 */
 #define CONFIG_SYS_PCIE3_MEM_VIRT      0xb0000000
-#define CONFIG_SYS_PCIE3_MEM_BUS       0xe0000000
 #define CONFIG_SYS_PCIE3_MEM_PHYS      0xc30000000ull
-#define CONFIG_SYS_PCIE3_MEM_SIZE      0x10000000      /* 256M */
 #define CONFIG_SYS_PCIE3_IO_VIRT       0xf8020000
-#define CONFIG_SYS_PCIE3_IO_BUS                0x00000000
 #define CONFIG_SYS_PCIE3_IO_PHYS       0xff8020000ull
-#define CONFIG_SYS_PCIE3_IO_SIZE       0x00010000      /* 64k */
 
 /* controller 4, Base address 203000 */
 #define CONFIG_SYS_PCIE4_MEM_VIRT       0xc0000000
-#define CONFIG_SYS_PCIE4_MEM_BUS       0xe0000000
 #define CONFIG_SYS_PCIE4_MEM_PHYS      0xc40000000ull
-#define CONFIG_SYS_PCIE4_MEM_SIZE      0x10000000      /* 256M */
-#define CONFIG_SYS_PCIE4_IO_BUS                0x00000000
 #define CONFIG_SYS_PCIE4_IO_PHYS       0xff8030000ull
-#define CONFIG_SYS_PCIE4_IO_SIZE       0x00010000      /* 64k */
 
 #ifdef CONFIG_PCI
+#if !defined(CONFIG_DM_PCI)
+#define CONFIG_FSL_PCI_INIT    /* Use common FSL init code */
+#define CONFIG_SYS_PCIE1_MEM_BUS       0xe0000000
+#define CONFIG_SYS_PCIE1_MEM_SIZE      0x20000000      /* 512M */
+#define CONFIG_SYS_PCIE1_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE1_IO_SIZE       0x00010000      /* 64k */
+#define CONFIG_SYS_PCIE2_MEM_BUS       0xe0000000
+#define CONFIG_SYS_PCIE2_MEM_SIZE      0x10000000 /* 256M */
+#define CONFIG_SYS_PCIE2_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE2_IO_SIZE       0x00010000      /* 64k */
+#define CONFIG_SYS_PCIE3_MEM_BUS       0xe0000000
+#define CONFIG_SYS_PCIE3_MEM_SIZE      0x10000000      /* 256M */
+#define CONFIG_SYS_PCIE3_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE3_IO_SIZE       0x00010000      /* 64k */
+#define CONFIG_SYS_PCIE4_MEM_BUS       0xe0000000
+#define CONFIG_SYS_PCIE4_MEM_SIZE      0x10000000      /* 256M */
+#define CONFIG_SYS_PCIE4_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE4_IO_SIZE       0x00010000      /* 64k */
 #define CONFIG_PCI_INDIRECT_BRIDGE
+#endif
 #define CONFIG_PCI_SCAN_SHOW   /* show pci devices on startup */
 #endif
 
index 4b53e19fd45480e08e9675ad296031433c1215ce..ab92ca3b686337d0a1fceb3333e6f337fdde543d 100644 (file)
@@ -476,7 +476,6 @@ unsigned long get_board_ddr_clk(void);
 
 #ifdef CONFIG_PCI
 #define CONFIG_PCI_INDIRECT_BRIDGE
-#define CONFIG_FSL_PCIE_RESET           /* need PCIe reset errata LSZ ADD */
 #define CONFIG_PCI_SCAN_SHOW   /* show pci devices on startup */
 #endif
 
index b518c222d4365491be6413fb3ab03bcc8625eaab..268a41c82c617057775aa1471f63e156ee628bf2 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2013-2015 Arcturus Networks, Inc.
- *           http://www.arcturusnetworks.com/products/ucp1020/
+ * Copyright 2013-2019 Arcturus Networks, Inc.
+ *           https://www.arcturusnetworks.com/products/ucp1020/
  * based on include/configs/p1_p2_rdb_pc.h
  * original copyright follows:
  * Copyright 2009-2011 Freescale Semiconductor, Inc.
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+/*** Arcturus FirmWare Environment */
+
+#define MAX_SERIAL_SIZE 15
+#define MAX_HWADDR_SIZE 17
+
+#define MAX_FWENV_ADDR 4
+
+#define FWENV_MMC      1
+#define FWENV_SPI_FLASH        2
+#define FWENV_NOR_FLASH        3
+/*
+ #define FWENV_TYPE    FWENV_MMC
+ #define FWENV_TYPE    FWENV_SPI_FLASH
+*/
+#define FWENV_TYPE     FWENV_NOR_FLASH
+
+#if (FWENV_TYPE == FWENV_MMC)
+#ifndef CONFIG_SYS_MMC_ENV_DEV
+#define CONFIG_SYS_MMC_ENV_DEV 1
+#endif
+#define FWENV_ADDR1 -1
+#define FWENV_ADDR2 -1
+#define FWENV_ADDR3 -1
+#define FWENV_ADDR4 -1
+#define EMPY_CHAR 0
+#endif
+
+#if (FWENV_TYPE == FWENV_SPI_FLASH)
+#ifndef CONFIG_SF_DEFAULT_SPEED
+#define CONFIG_SF_DEFAULT_SPEED        1000000
+#endif
+#ifndef CONFIG_SF_DEFAULT_MODE
+#define CONFIG_SF_DEFAULT_MODE SPI_MODE0
+#endif
+#ifndef CONFIG_SF_DEFAULT_CS
+#define CONFIG_SF_DEFAULT_CS   0
+#endif
+#ifndef CONFIG_SF_DEFAULT_BUS
+#define CONFIG_SF_DEFAULT_BUS  0
+#endif
+#define FWENV_ADDR1 (0x200 - sizeof(smac))
+#define FWENV_ADDR2 (0x400 - sizeof(smac))
+#define FWENV_ADDR3 (CONFIG_ENV_SECT_SIZE + 0x200 - sizeof(smac))
+#define FWENV_ADDR4 (CONFIG_ENV_SECT_SIZE + 0x400 - sizeof(smac))
+#define EMPY_CHAR 0xff
+#endif
+
+#if (FWENV_TYPE == FWENV_NOR_FLASH)
+#define FWENV_ADDR1 0xEC080000
+#define FWENV_ADDR2 -1
+#define FWENV_ADDR3 -1
+#define FWENV_ADDR4 -1
+#define EMPY_CHAR 0xff
+#endif
+/***********************************/
+
 #define CONFIG_PCIE1   /* PCIE controller 1 (slot 1) */
 #define CONFIG_PCIE2   /* PCIE controller 2 (slot 2) */
 #define CONFIG_FSL_PCI_INIT    /* Use common FSL init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE     /* indirect PCI bridge support */
-#define CONFIG_FSL_PCIE_RESET  /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT   /* enable 64-bit PCI resources */
 
 #if defined(CONFIG_TARTGET_UCP1020T1)
@@ -38,8 +93,6 @@
 #define CONFIG_NETMASK         255.255.252.0
 #define CONFIG_ETHPRIME                "eTSEC3"
 
-#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
-
 #define CONFIG_SYS_L2_SIZE     (256 << 10)
 
 #endif
 #define CONFIG_BOARDNAME_LOCAL "uCP1020-64EEE512-OU1-XR"
 
 #define CONFIG_TSEC1
-#define CONFIG_TSEC2
 #define CONFIG_TSEC3
 #define CONFIG_HAS_ETH0
 #define CONFIG_HAS_ETH1
 #define CONFIG_NETMASK         255.255.255.0
 #define CONFIG_ETHPRIME                "eTSEC1"
 
-#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+#undef CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 #define CONFIG_SYS_L2_SIZE     (256 << 10)
 
index f1c3522c68cd19e39b0232bf7dedfc3496065496..19223e29472c6d8869230bad7abb54317165952b 100644 (file)
 #define CONFIG_SYS_PCI_64BIT           /* enable 64-bit PCI resources */
 
 #define CONFIG_FSL_PCI_INIT            /* Use common FSL init code */
-#define CONFIG_FSL_PCIE_RESET          /* need PCIe reset errata */
 
 #define CONFIG_SYS_PCIE1_MEM_VIRT      0xc0000000
 #ifdef CONFIG_PHYS_64BIT
index d9312bd14912ba045ea15bfb717cacda2984bb84..e07d2a178ff6c13b91be49be9a28cf3192b5d468 100644 (file)
 #define CONFIG_PCIE2   /* PCIE controller 2 (slot 2) */
 #define CONFIG_FSL_PCI_INIT    /* Use common FSL init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE     /* indirect PCI bridge support */
-#define CONFIG_FSL_PCIE_RESET  /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT   /* enable 64-bit PCI resources */
 
 #define CONFIG_ENV_OVERWRITE
index e42b9b0cb9cc8a7588afd9c03fdecb3acc148281..1e0708a71bdabc7bec402a10d4b962cb8a720d22 100644 (file)
@@ -34,7 +34,6 @@
 #define CONFIG_PCIE2   /* PCIE controller 2 (slot 2) */
 #define CONFIG_FSL_PCI_INIT    /* Use common FSL init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE     /* indirect PCI bridge support */
-#define CONFIG_FSL_PCIE_RESET  /* need PCIe reset errata */
 #define CONFIG_SYS_PCI_64BIT   /* enable 64-bit PCI resources */
 
 #define CONFIG_ENV_OVERWRITE
index 9df8604af712a368d5c4982583b0a42b5b944823..ba613672eb1f7de8fb65d7b216d01234fe09b26d 100644 (file)
@@ -49,7 +49,6 @@
 #define CONFIG_SYS_PCI_64BIT    1      /* enable 64-bit PCI resources */
 #endif
 #ifdef CONFIG_PCIE1
-#define CONFIG_FSL_PCIE_RESET   1      /* need PCIe reset errata */
 #endif
 
 #define CONFIG_ENV_OVERWRITE
index 22dd3c036eb8c67a6f5bf5595fe0d7ae7a1948ab..0a87f226f8d47d0bbcd965b64012ab22137b1ddb 100644 (file)
@@ -22,7 +22,6 @@
 #define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE 1   /* indirect PCI bridge support */
 #define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
-#define CONFIG_FSL_PCIE_RESET  1       /* need PCIe reset errata */
 
 /*
  * Multicore config
index a7c8dc4e3360e5a0dd85eb04c8a8e5ed1d2b8555..03898746091fefa67437663d93d6df57b56a4b9e 100644 (file)
@@ -22,7 +22,6 @@
 #define CONFIG_FSL_PCI_INIT    1       /* Use common FSL init code */
 #define CONFIG_PCI_INDIRECT_BRIDGE 1   /* indirect PCI bridge support */
 #define CONFIG_SYS_PCI_64BIT   1       /* enable 64-bit PCI resources */
-#define CONFIG_FSL_PCIE_RESET  1       /* need PCIe reset errata */
 
 /*
  * Multicore config
index 09c45b812296f592828da669f34e0bee6c860fa0..2fffd68f943cb9e207bc4218e26cc98b5b039e96 100644 (file)
@@ -88,7 +88,7 @@ obj-y += crc32.o
 obj-$(CONFIG_CRC32C) += crc32c.o
 obj-y += ctype.o
 obj-y += div64.o
-obj-$(CONFIG_OF_LIBFDT) += fdtdec.o
+obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdtdec.o fdtdec_common.o
 obj-y += hang.o
 obj-y += linux_compat.o
 obj-y += linux_string.o
index 22de7a4b6caa1b2128bc13b31d5f08ea017e08a7..d252045d80edb350920503c3367e11c3fb2e28de 100644 (file)
@@ -1,6 +1,5 @@
 CONFIG_16BIT
 CONFIG_33
-CONFIG_400MHZ_MODE
 CONFIG_64BIT_PHYS_ADDR
 CONFIG_66
 CONFIG_8349_CLKIN
@@ -238,9 +237,7 @@ CONFIG_CONS_ON_SCC
 CONFIG_CONS_SCIF0
 CONFIG_CONS_SCIF1
 CONFIG_CONS_SCIF2
-CONFIG_CONS_SCIF3
 CONFIG_CONS_SCIF4
-CONFIG_CONS_SCIF5
 CONFIG_CONTROL
 CONFIG_CONTROLCENTERD
 CONFIG_CON_ROT
@@ -268,9 +265,6 @@ CONFIG_CPU_PXA27X
 CONFIG_CPU_PXA300
 CONFIG_CPU_R8000
 CONFIG_CPU_SH7722
-CONFIG_CPU_SH7723
-CONFIG_CPU_SH7734
-CONFIG_CPU_SH7750
 CONFIG_CPU_SH7751
 CONFIG_CPU_SH7752
 CONFIG_CPU_SH7753
@@ -372,7 +366,6 @@ CONFIG_DRIVER_NE2000_BASE
 CONFIG_DRIVER_NE2000_CCR
 CONFIG_DRIVER_NE2000_VAL
 CONFIG_DRIVER_SMC911X_BASE
-CONFIG_DRIVER_TI_EMAC_RMII_NO_NEGOTIATE
 CONFIG_DRIVER_TI_EMAC_USE_RMII
 CONFIG_DSP_CLUSTER_START
 CONFIG_DUOVERO
@@ -614,8 +607,6 @@ CONFIG_FSL_LBC
 CONFIG_FSL_MC9SDZ60
 CONFIG_FSL_MEMAC
 CONFIG_FSL_NGPIXIS
-CONFIG_FSL_PCIE_DISABLE_ASPM
-CONFIG_FSL_PCIE_RESET
 CONFIG_FSL_PCI_INIT
 CONFIG_FSL_PIXIS
 CONFIG_FSL_PMIC_BITLEN
@@ -685,7 +676,6 @@ CONFIG_GICV2
 CONFIG_GLOBAL_DATA_NOT_REG10
 CONFIG_GLOBAL_TIMER
 CONFIG_GMII
-CONFIG_GOOD_SESH4
 CONFIG_GPCNTRL
 CONFIG_GPIO_ENABLE_SPI_FLASH
 CONFIG_GPIO_LED_INVERTED_TABLE
@@ -923,9 +913,6 @@ CONFIG_IO_TRACE
 CONFIG_IPADDR
 CONFIG_IPADDR1
 CONFIG_IPADDR2
-CONFIG_IPAM390_GPIO_BOOTMODE
-CONFIG_IPAM390_GPIO_LED_GREEN
-CONFIG_IPAM390_GPIO_LED_RED
 CONFIG_IPROC
 CONFIG_IRAM_BASE
 CONFIG_IRAM_END
@@ -1072,7 +1059,6 @@ CONFIG_LCD_INFO_BELOW_LOGO
 CONFIG_LCD_IN_PSRAM
 CONFIG_LCD_LOGO
 CONFIG_LCD_MENU
-CONFIG_LCD_ROTATION
 CONFIG_LD9040
 CONFIG_LEGACY
 CONFIG_LEGACY_BOOTCMD_ENV
@@ -1135,7 +1121,6 @@ CONFIG_MACRESET_TIMEOUT
 CONFIG_MALLOC_F_ADDR
 CONFIG_MALTA
 CONFIG_MARCO_MEMSET
-CONFIG_MARUBUN_PCCARD
 CONFIG_MARVELL_GPIO
 CONFIG_MARVELL_MFP
 CONFIG_MASK_AER_AO
@@ -1601,7 +1586,6 @@ CONFIG_SATA1
 CONFIG_SATA2
 CONFIG_SATA_ULI5288
 CONFIG_SCF0403_LCD
-CONFIG_SCIF
 CONFIG_SCIF_A
 CONFIG_SCIF_USE_EXT_CLK
 CONFIG_SCSI_AHCI_PLAT
@@ -1701,7 +1685,6 @@ CONFIG_SMSTP7_ENA
 CONFIG_SMSTP8_ENA
 CONFIG_SMSTP9_ENA
 CONFIG_SOCRATES
-CONFIG_SOC_DM644X
 CONFIG_SOC_K2E
 CONFIG_SOC_K2G
 CONFIG_SOC_K2HK
@@ -1858,7 +1841,6 @@ CONFIG_STRIDER_CON_DP
 CONFIG_STRIDER_CPU
 CONFIG_STRIDER_CPU_DP
 CONFIG_STRIDER_FANS
-CONFIG_STUART
 CONFIG_STV0991
 CONFIG_STV0991_HZ
 CONFIG_STV0991_HZ_CLOCK
@@ -2135,8 +2117,6 @@ CONFIG_SYS_CSPR6
 CONFIG_SYS_CSPR6_EXT
 CONFIG_SYS_CSPR7
 CONFIG_SYS_CSPR7_EXT
-CONFIG_SYS_DA850_CS2CFG
-CONFIG_SYS_DA850_CS3CFG
 CONFIG_SYS_DA850_DDR2_DDRPHYCR
 CONFIG_SYS_DA850_DDR2_PBBPR
 CONFIG_SYS_DA850_DDR2_SDBCR
@@ -3402,7 +3382,6 @@ CONFIG_SYS_NAND_MASK_CLE
 CONFIG_SYS_NAND_MAX_ECCPOS
 CONFIG_SYS_NAND_MAX_OOBFREE
 CONFIG_SYS_NAND_MX7_GPMI_62_ECC_BYTES
-CONFIG_SYS_NAND_NO_SUBPAGE
 CONFIG_SYS_NAND_NO_SUBPAGE_WRITE
 CONFIG_SYS_NAND_ONFI_DETECTION
 CONFIG_SYS_NAND_OR_PRELIM
@@ -4209,9 +4188,6 @@ CONFIG_SYS_VXWORKS_MAC_PTR
 CONFIG_SYS_WATCHDOG_FREQ
 CONFIG_SYS_WATCHDOG_VALUE
 CONFIG_SYS_WDTC_WDMR_VAL
-CONFIG_SYS_WDTTIMERBASE
-CONFIG_SYS_WDT_PERIOD_HIGH
-CONFIG_SYS_WDT_PERIOD_LOW
 CONFIG_SYS_WINDOW1_BASE
 CONFIG_SYS_WRITE_SWAPPED_DATA
 CONFIG_SYS_XHCI_USB1_ADDR
@@ -4222,7 +4198,6 @@ CONFIG_SYS_ZYNQ_QSPI_WAIT
 CONFIG_SYS_ZYNQ_SPI_WAIT
 CONFIG_SYS_i2C_FSL
 CONFIG_TAM3517_SETTINGS
-CONFIG_TAM3517_SW3_SETTINGS
 CONFIG_TCA642X
 CONFIG_TEGRA_BOARD_STRING
 CONFIG_TEGRA_CLOCK_SCALING
@@ -4454,7 +4429,6 @@ CONFIG_X86_REFCODE_ADDR
 CONFIG_X86_REFCODE_RUN_ADDR
 CONFIG_XGI_XG22_BASE
 CONFIG_XILINX_SPI_IDLE_VAL
-CONFIG_XR16L2751
 CONFIG_XSENGINE
 CONFIG_XTFPGA
 CONFIG_YAFFSFS_PROVIDE_VALUES
index cfada0ee1157a9e8acdb612cb7a74281720d3af8..eef12dd2b7579a8a0d2f9fdef1c39446076c42cb 100644 (file)
@@ -1317,7 +1317,7 @@ static int flash_io_write(int fd_current)
                        rc = -1;
                }
 
-               if (target_temp) {
+               if (rc >= 0 && target_temp) {
                        int dir_fd;
 
                        dir_fd = open(dname, O_DIRECTORY | O_RDONLY);