Merge branch '2019-06-20-master-imports'

- Assorted minor fixes
diff --git a/MAINTAINERS b/MAINTAINERS
index ca32d7e..bea3122 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -55,7 +55,7 @@
 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 @@
 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 @@
 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:	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 @@
 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 @@
 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 @@
 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 @@
 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:	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 @@
 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,7 +289,7 @@
 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/
 
@@ -325,7 +325,7 @@
 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/
@@ -334,14 +334,14 @@
 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/
@@ -351,7 +351,7 @@
 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
@@ -359,7 +359,7 @@
 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
@@ -372,7 +372,7 @@
 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
@@ -396,7 +396,7 @@
 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
@@ -422,7 +422,7 @@
 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
@@ -438,7 +438,7 @@
 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
 
@@ -446,13 +446,13 @@
 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
@@ -464,7 +464,7 @@
 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/
@@ -473,10 +473,10 @@
 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
@@ -496,7 +496,7 @@
 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
@@ -504,7 +504,7 @@
 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*
@@ -515,24 +515,24 @@
 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
@@ -548,7 +548,7 @@
 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
@@ -563,7 +563,7 @@
 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
@@ -594,38 +594,38 @@
 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
@@ -636,7 +636,7 @@
 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
@@ -647,13 +647,13 @@
 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
@@ -671,19 +671,19 @@
 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
@@ -701,15 +701,16 @@
 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*
 
@@ -771,25 +772,25 @@
 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
@@ -799,7 +800,7 @@
 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/
 
@@ -813,7 +814,7 @@
 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:	*/
diff --git a/Makefile b/Makefile
index 9fba74d..6335834 100644
--- a/Makefile
+++ b/Makefile
@@ -168,7 +168,7 @@
 # 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 @@
 	@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 @@
 	       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)
diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
index fe52166..99d1266 100644
--- a/arch/arm/cpu/armv8/start.S
+++ b/arch/arm/cpu/armv8/start.S
@@ -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)
 /*
diff --git a/Documentation/Makefile b/doc/Makefile
similarity index 91%
rename from Documentation/Makefile
rename to doc/Makefile
index 2ca77ad..5135a96 100644
--- a/Documentation/Makefile
+++ b/doc/Makefile
@@ -8,7 +8,7 @@
 SPHINXBUILD   = sphinx-build
 SPHINXOPTS    =
 SPHINXDIRS    = .
-_SPHINXDIRS   = $(patsubst $(srctree)/Documentation/%/conf.py,%,$(wildcard $(srctree)/Documentation/*/conf.py))
+_SPHINXDIRS   = $(patsubst $(srctree)/doc/%/conf.py,%,$(wildcard $(srctree)/doc/*/conf.py))
 SPHINX_CONF   = conf.py
 PAPER         =
 BUILDDIR      = $(obj)/output
@@ -49,10 +49,10 @@
 #    * 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
+#    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)=Documentation/media $2 && \
+      cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=doc/media $2 && \
 	PYTHONDONTWRITEBYTECODE=1 \
 	BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
 	$(SPHINXBUILD) \
@@ -102,7 +102,7 @@
 
 cleandocs:
 	$(Q)rm -rf $(BUILDDIR)
-	$(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media clean
+	$(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=doc/media clean
 
 dochelp:
 	@echo  ' Linux kernel internal documentation in different formats from ReST:'
@@ -121,4 +121,4 @@
 	@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'
+	@echo  '  Default location for the generated documents is doc/output'
diff --git a/Documentation/conf.py b/doc/conf.py
similarity index 100%
rename from Documentation/conf.py
rename to doc/conf.py
diff --git a/Documentation/devicetree/bindings/arm/l2c2x0.txt b/doc/device-tree-bindings/arm/l2c2x0.txt
similarity index 100%
rename from Documentation/devicetree/bindings/arm/l2c2x0.txt
rename to doc/device-tree-bindings/arm/l2c2x0.txt
diff --git a/Documentation/devicetree/bindings/axi/gdsys,ihs_axi.txt b/doc/device-tree-bindings/axi/gdsys,ihs_axi.txt
similarity index 100%
rename from Documentation/devicetree/bindings/axi/gdsys,ihs_axi.txt
rename to doc/device-tree-bindings/axi/gdsys,ihs_axi.txt
diff --git a/Documentation/devicetree/bindings/board/gdsys,board_gazerbeam.txt b/doc/device-tree-bindings/board/gdsys,board_gazerbeam.txt
similarity index 100%
rename from Documentation/devicetree/bindings/board/gdsys,board_gazerbeam.txt
rename to doc/device-tree-bindings/board/gdsys,board_gazerbeam.txt
diff --git a/Documentation/devicetree/bindings/clk/fsl,mpc83xx-clk.txt b/doc/device-tree-bindings/clock/fsl,mpc83xx-clk.txt
similarity index 100%
rename from Documentation/devicetree/bindings/clk/fsl,mpc83xx-clk.txt
rename to doc/device-tree-bindings/clock/fsl,mpc83xx-clk.txt
diff --git a/Documentation/devicetree/bindings/cpu/fsl,mpc83xx.txt b/doc/device-tree-bindings/cpu/fsl,mpc83xx.txt
similarity index 100%
rename from Documentation/devicetree/bindings/cpu/fsl,mpc83xx.txt
rename to doc/device-tree-bindings/cpu/fsl,mpc83xx.txt
diff --git a/Documentation/devicetree/bindings/misc/fsl,mpc83xx-serdes.txt b/doc/device-tree-bindings/misc/misc/fsl,mpc83xx-serdes.txt
similarity index 100%
rename from Documentation/devicetree/bindings/misc/fsl,mpc83xx-serdes.txt
rename to doc/device-tree-bindings/misc/misc/fsl,mpc83xx-serdes.txt
diff --git a/Documentation/devicetree/bindings/misc/gdsys,io-endpoint.txt b/doc/device-tree-bindings/misc/misc/gdsys,io-endpoint.txt
similarity index 100%
rename from Documentation/devicetree/bindings/misc/gdsys,io-endpoint.txt
rename to doc/device-tree-bindings/misc/misc/gdsys,io-endpoint.txt
diff --git a/Documentation/devicetree/bindings/misc/gdsys,iocon_fpga.txt b/doc/device-tree-bindings/misc/misc/gdsys,iocon_fpga.txt
similarity index 100%
rename from Documentation/devicetree/bindings/misc/gdsys,iocon_fpga.txt
rename to doc/device-tree-bindings/misc/misc/gdsys,iocon_fpga.txt
diff --git a/Documentation/devicetree/bindings/misc/gdsys,iocpu_fpga.txt b/doc/device-tree-bindings/misc/misc/gdsys,iocpu_fpga.txt
similarity index 100%
rename from Documentation/devicetree/bindings/misc/gdsys,iocpu_fpga.txt
rename to doc/device-tree-bindings/misc/misc/gdsys,iocpu_fpga.txt
diff --git a/Documentation/devicetree/bindings/misc/gdsys,soc.txt b/doc/device-tree-bindings/misc/misc/gdsys,soc.txt
similarity index 100%
rename from Documentation/devicetree/bindings/misc/gdsys,soc.txt
rename to doc/device-tree-bindings/misc/misc/gdsys,soc.txt
diff --git a/Documentation/devicetree/bindings/ram/fsl,mpc83xx-mem-controller.txt b/doc/device-tree-bindings/ram/fsl,mpc83xx-mem-controller.txt
similarity index 100%
rename from Documentation/devicetree/bindings/ram/fsl,mpc83xx-mem-controller.txt
rename to doc/device-tree-bindings/ram/fsl,mpc83xx-mem-controller.txt
diff --git a/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt b/doc/device-tree-bindings/reserved-memory/reserved-memory.txt
similarity index 100%
rename from Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
rename to doc/device-tree-bindings/reserved-memory/reserved-memory.txt
diff --git a/Documentation/devicetree/bindings/timer/fsl,mpc83xx-timer.txt b/doc/device-tree-bindings/timer/fsl,mpc83xx-timer.txt
similarity index 100%
rename from Documentation/devicetree/bindings/timer/fsl,mpc83xx-timer.txt
rename to doc/device-tree-bindings/timer/fsl,mpc83xx-timer.txt
diff --git a/Documentation/efi.rst b/doc/efi.rst
similarity index 100%
rename from Documentation/efi.rst
rename to doc/efi.rst
diff --git a/Documentation/index.rst b/doc/index.rst
similarity index 100%
rename from Documentation/index.rst
rename to doc/index.rst
diff --git a/Documentation/linker_lists.rst b/doc/linker_lists.rst
similarity index 100%
rename from Documentation/linker_lists.rst
rename to doc/linker_lists.rst
diff --git a/Documentation/media/Makefile b/doc/media/Makefile
similarity index 88%
rename from Documentation/media/Makefile
rename to doc/media/Makefile
index 0efd18a..b9b43a3 100644
--- a/Documentation/media/Makefile
+++ b/doc/media/Makefile
@@ -1,7 +1,7 @@
 # Rules to convert a .h file to inline RST documentation
 
-SRC_DIR=$(srctree)/Documentation/media
-PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl
+SRC_DIR=$(srctree)/doc/media
+PARSER = $(srctree)/doc/sphinx/parse-headers.pl
 API = $(srctree)/include
 
 FILES = linker_lists.h.rst
diff --git a/Documentation/media/linker_lists.h.rst.exceptions b/doc/media/linker_lists.h.rst.exceptions
similarity index 100%
rename from Documentation/media/linker_lists.h.rst.exceptions
rename to doc/media/linker_lists.h.rst.exceptions
diff --git a/Documentation/serial.rst b/doc/serial.rst
similarity index 100%
rename from Documentation/serial.rst
rename to doc/serial.rst
diff --git a/Documentation/sphinx-static/theme_overrides.css b/doc/sphinx-static/theme_overrides.css
similarity index 100%
rename from Documentation/sphinx-static/theme_overrides.css
rename to doc/sphinx-static/theme_overrides.css
diff --git a/Documentation/sphinx/cdomain.py b/doc/sphinx/cdomain.py
similarity index 100%
rename from Documentation/sphinx/cdomain.py
rename to doc/sphinx/cdomain.py
diff --git a/Documentation/sphinx/kernel_include.py b/doc/sphinx/kernel_include.py
similarity index 100%
rename from Documentation/sphinx/kernel_include.py
rename to doc/sphinx/kernel_include.py
diff --git a/Documentation/sphinx/kerneldoc.py b/doc/sphinx/kerneldoc.py
similarity index 100%
rename from Documentation/sphinx/kerneldoc.py
rename to doc/sphinx/kerneldoc.py
diff --git a/Documentation/sphinx/kfigure.py b/doc/sphinx/kfigure.py
similarity index 100%
rename from Documentation/sphinx/kfigure.py
rename to doc/sphinx/kfigure.py
diff --git a/Documentation/sphinx/load_config.py b/doc/sphinx/load_config.py
similarity index 100%
rename from Documentation/sphinx/load_config.py
rename to doc/sphinx/load_config.py
diff --git a/Documentation/sphinx/parse-headers.pl b/doc/sphinx/parse-headers.pl
similarity index 98%
rename from Documentation/sphinx/parse-headers.pl
rename to doc/sphinx/parse-headers.pl
index d410f47..d4f3826 100755
--- a/Documentation/sphinx/parse-headers.pl
+++ b/doc/sphinx/parse-headers.pl
@@ -382,7 +382,7 @@
 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
+Please read doc/doc-guide/parse-headers.rst at the Kernel's
 tree for more details.
 
 =head1 BUGS
diff --git a/Documentation/sphinx/requirements.txt b/doc/sphinx/requirements.txt
similarity index 100%
rename from Documentation/sphinx/requirements.txt
rename to doc/sphinx/requirements.txt
diff --git a/Documentation/sphinx/rstFlatTable.py b/doc/sphinx/rstFlatTable.py
similarity index 99%
rename from Documentation/sphinx/rstFlatTable.py
rename to doc/sphinx/rstFlatTable.py
index 25feb0d..f9a4b46 100755
--- a/Documentation/sphinx/rstFlatTable.py
+++ b/doc/sphinx/rstFlatTable.py
@@ -54,7 +54,7 @@
 # ==============================================================================
 
 # The version numbering follows numbering of the specification
-# (Documentation/books/kernel-doc-HOWTO).
+# (doc/books/kernel-doc-HOWTO).
 __version__  = '1.0'
 
 PY3 = sys.version_info[0] == 3
diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c
index 523484b..d344d54 100644
--- a/drivers/watchdog/ast_wdt.c
+++ b/drivers/watchdog/ast_wdt.c
@@ -23,6 +23,12 @@
 	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);
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 0b50173..a7d4c7a 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -70,18 +70,30 @@
 	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 @@
 
 	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);
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index cfada0e..eef12dd 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -1317,7 +1317,7 @@
 			rc = -1;
 		}
 
-		if (target_temp) {
+		if (rc >= 0 && target_temp) {
 			int dir_fd;
 
 			dir_fd = open(dname, O_DIRECTORY | O_RDONLY);