Merge branch 'master' of git://git.denx.de/u-boot-sh
authorTom Rini <trini@konsulko.com>
Thu, 26 Jul 2018 15:43:23 +0000 (11:43 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 26 Jul 2018 15:43:23 +0000 (11:43 -0400)
60 files changed:
.mailmap
Documentation/devicetree/bindings/phy/no-op.txt [deleted file]
Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.txt [deleted file]
Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.txt [deleted file]
Makefile
arch/arm/Kconfig
arch/arm/mach-uniphier/Kconfig
arch/arm/mach-uniphier/Makefile
arch/arm/mach-uniphier/board_late_init.c
arch/arm/mach-uniphier/dram_init.c
arch/arm/mach-uniphier/fdt-fixup.c [new file with mode: 0644]
board/CarMediaLab/flea3/flea3.c
board/compulab/cm_fx6/cm_fx6.c
board/freescale/bsc9131rdb/bsc9131rdb.c
board/freescale/bsc9132qds/bsc9132qds.c
board/gateworks/gw_ventana/gw_ventana.c
board/isee/igep003x/board.c
board/isee/igep00x0/igep00x0.c
board/logicpd/am3517evm/MAINTAINERS
board/toradex/colibri_imx7/colibri_imx7.c
board/toradex/colibri_vf/colibri_vf.c
cmd/Kconfig
cmd/mtdparts.c
common/Kconfig
common/Makefile
common/avb_verify.c
common/fdt_support.c
common/spl/spl_ymodem.c
configs/am3517_evm_defconfig
configs/omap3_beagle_defconfig
configs/uniphier_ld4_sld8_defconfig
configs/uniphier_v7_defconfig
configs/uniphier_v8_defconfig
doc/README.avb2
doc/README.uniphier
doc/device-tree-bindings/phy/no-op.txt [new file with mode: 0644]
doc/device-tree-bindings/phy/phy-stm32-usbphyc.txt [new file with mode: 0644]
doc/device-tree-bindings/rtc/brcm,brcmstb-waketimer.txt [new file with mode: 0644]
drivers/mtd/nand/denali.c
drivers/rtc/date.c
include/configs/B4860QDS.h
include/configs/C29XPCIE.h
include/configs/P1010RDB.h
include/configs/P1022DS.h
include/configs/T102xQDS.h
include/configs/T102xRDB.h
include/configs/T104xRDB.h
include/configs/T208xQDS.h
include/configs/T208xRDB.h
include/configs/T4240RDB.h
include/configs/p1_p2_rdb_pc.h
include/configs/stih410-b2260.h
include/configs/t4qds.h
include/configs/uniphier.h
include/fdt_support.h
include/linux/mtd/mtd.h
lib/hashtable.c
scripts/config_whitelist.txt
scripts/kconfig/confdata.c
tools/fit_image.c

index bd7267241a8effa4479227739d15d55f69c413c2..d29703058dbefe92afd65a2bdda4813dc97a5414 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -34,3 +34,4 @@ Wolfgang Denk <wdenk>
 York Sun <yorksun@freescale.com>
 York Sun <york.sun@nxp.com>
 Ćukasz Majewski <l.majewski@samsung.com>
+Mirza <Taimoor_Mirza@mentor.com>
diff --git a/Documentation/devicetree/bindings/phy/no-op.txt b/Documentation/devicetree/bindings/phy/no-op.txt
deleted file mode 100644 (file)
index a338112..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-NOP PHY driver
-
-This driver is used to stub PHY operations in a driver (USB, SATA).
-This is useful when the 'client' driver (USB, SATA, ...) uses the PHY framework
-and there is no actual PHY harwdare to drive.
-
-Required properties:
-- compatible     : must contain "nop-phy"
-- #phy-cells     : must contain <0>
-
-Example:
-
-nop_phy {
-       compatible = "nop-phy";
-       #phy-cells = <0>;
-};
diff --git a/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.txt b/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.txt
deleted file mode 100644 (file)
index 725ae71..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-STMicroelectronics STM32 USB HS PHY controller
-
-The STM32 USBPHYC block contains a dual port High Speed UTMI+ PHY and a UTMI
-switch. It controls PHY configuration and status, and the UTMI+ switch that
-selects either OTG or HOST controller for the second PHY port. It also sets
-PLL configuration.
-
-USBPHYC
-      |_ PLL
-      |
-      |_ PHY port#1 _________________ HOST controller
-      |                    _                 |
-      |                  / 1|________________|
-      |_ PHY port#2 ----|   |________________
-      |                  \_0|                |
-      |_ UTMI switch_______|          OTG controller
-
-
-Phy provider node
-=================
-
-Required properties:
-- compatible: must be "st,stm32mp1-usbphyc"
-- reg: address and length of the usb phy control register set
-- clocks: phandle + clock specifier for the PLL phy clock
-- #address-cells: number of address cells for phys sub-nodes, must be <1>
-- #size-cells: number of size cells for phys sub-nodes, must be <0>
-
-Optional properties:
-- assigned-clocks: phandle + clock specifier for the PLL phy clock
-- assigned-clock-parents: the PLL phy clock parent
-- resets: phandle + reset specifier
-
-Required nodes: one sub-node per port the controller provides.
-
-Phy sub-nodes
-==============
-
-Required properties:
-- reg: phy port index
-- phy-supply: phandle to the regulator providing 3V3 power to the PHY,
-             see phy-bindings.txt in the same directory.
-- vdda1v1-supply: phandle to the regulator providing 1V1 power to the PHY
-- vdda1v8-supply: phandle to the regulator providing 1V8 power to the PHY
-- #phy-cells: see phy-bindings.txt in the same directory, must be <0> for PHY
-  port#1 and must be <1> for PHY port#2, to select USB controller
-
-
-Example:
-               usbphyc: usb-phy@5a006000 {
-                       compatible = "st,stm32mp1-usbphyc";
-                       reg = <0x5a006000 0x1000>;
-                       clocks = <&rcc_clk USBPHY_K>;
-                       resets = <&rcc_rst USBPHY_R>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       usbphyc_port0: usb-phy@0 {
-                               reg = <0>;
-                               phy-supply = <&vdd_usb>;
-                               vdda1v1-supply = <&reg11>;
-                               vdda1v8-supply = <&reg18>
-                               #phy-cells = <0>;
-                       };
-
-                       usbphyc_port1: usb-phy@1 {
-                               reg = <1>;
-                               phy-supply = <&vdd_usb>;
-                               vdda1v1-supply = <&reg11>;
-                               vdda1v8-supply = <&reg18>
-                               #phy-cells = <1>;
-                       };
-               };
diff --git a/Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.txt b/Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.txt
deleted file mode 100644 (file)
index 1d990bc..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-Broadcom STB wake-up Timer
-
-The Broadcom STB wake-up timer provides a 27Mhz resolution timer, with the
-ability to wake up the system from low-power suspend/standby modes.
-
-Required properties:
-- compatible     : should contain "brcm,brcmstb-waketimer"
-- reg            : the register start and length for the WKTMR block
-- interrupts     : The TIMER interrupt
-- interrupt-parent: The phandle to the Always-On (AON) Power Management (PM) L2
-                    interrupt controller node
-- clocks        : The phandle to the UPG fixed clock (27Mhz domain)
-
-Example:
-
-waketimer@f0411580 {
-       compatible = "brcm,brcmstb-waketimer";
-       reg = <0xf0411580 0x14>;
-       interrupts = <0x3>;
-       interrupt-parent = <&aon_pm_l2_intc>;
-       clocks = <&upg_fixed>;
-};
index d1246e063f8570b7c398e320f7874824a4c5b06a..79cbad22db82502725a23845f0dd8cf4693e5d53 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1603,7 +1603,7 @@ clean: rm-files := $(CLEAN_FILES)
 
 clean-dirs     := $(foreach f,$(u-boot-alldirs),$(if $(wildcard $(srctree)/$f/Makefile),$f))
 
-clean-dirs      := $(addprefix _clean_, $(clean-dirs) doc/DocBook)
+clean-dirs      := $(addprefix _clean_, $(clean-dirs))
 
 PHONY += $(clean-dirs) clean archclean
 $(clean-dirs):
@@ -1685,7 +1685,7 @@ help:
        @echo  '  coccicheck      - Execute static code analysis with Coccinelle'
        @echo  ''
        @echo  'Documentation targets:'
-       @$(MAKE) -f $(srctree)/doc/DocBook/Makefile dochelp
+       @$(MAKE) -f $(srctree)/Documentation/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'
index 376851ef7aa94e42eb2b5c7fcc25d1275f1ce7a4..3d9b9dc83f0cf9dba38b1f85b5397a4533adba6c 100644 (file)
@@ -1223,6 +1223,7 @@ config ARCH_UNIPHIER
        select DM_RESET
        select DM_SERIAL
        select DM_USB
+       select OF_BOARD_SETUP
        select OF_CONTROL
        select OF_LIBFDT
        select PINCTRL
@@ -1233,6 +1234,7 @@ config ARCH_UNIPHIER
        select SPL_OF_CONTROL if SPL
        select SPL_PINCTRL if SPL
        select SUPPORT_SPL
+       imply DISTRO_DEFAULTS
        imply FAT_WRITE
        help
          Support for UniPhier SoC family developed by Socionext Inc.
index 91bea776e6cb546a7225ab85497ae9c1361f6681..c1993740864c49b0b5ee98903f701143a7e1efb1 100644 (file)
@@ -68,7 +68,6 @@ config ARCH_UNIPHIER_LD11
 config ARCH_UNIPHIER_LD20
        bool "Enable UniPhier LD20 SoC support"
        depends on ARCH_UNIPHIER_V8_MULTI
-       select OF_BOARD_SETUP
        default y
 
 config ARCH_UNIPHIER_PXS3
index 269c51b85322bdb861517a4080defb4a46954554..d0c39d427379103df3a5eb6aeec9dbb5e2ffee77 100644 (file)
@@ -21,6 +21,7 @@ endif
 obj-$(CONFIG_MICRO_SUPPORT_CARD) += sbc/ micro-support-card.o
 obj-y += pinctrl-glue.o
 obj-$(CONFIG_MMC) += mmc-first-dev.o
+obj-y += fdt-fixup.o
 
 endif
 
index 6a995728d4bc3d66d31e4e950a0639ee838d3df0..8ffb9a8d3c2c05683d2537f402025e522009c7c4 100644 (file)
@@ -66,20 +66,20 @@ int board_late_init(void)
        switch (uniphier_boot_device_raw()) {
        case BOOT_DEVICE_MMC1:
                printf("eMMC Boot");
-               env_set("bootmode", "emmcboot");
+               env_set("bootcmd", "run bootcmd_mmc0; run distro_bootcmd");
                break;
        case BOOT_DEVICE_NAND:
                printf("NAND Boot");
-               env_set("bootmode", "nandboot");
+               env_set("bootcmd", "run bootcmd_ubifs0; run distro_bootcmd");
                nand_denali_wp_disable();
                break;
        case BOOT_DEVICE_NOR:
                printf("NOR Boot");
-               env_set("bootmode", "norboot");
+               env_set("bootcmd", "run tftpboot; run distro_bootcmd");
                break;
        case BOOT_DEVICE_USB:
                printf("USB Boot");
-               env_set("bootmode", "usbboot");
+               env_set("bootcmd", "run bootcmd_usb0; run distro_bootcmd");
                break;
        default:
                printf("Unknown");
index 2eb4836256e23a6256d7fb75311e8b31b363cff3..7e7c1d98db4088f1c513646d07f43344e340c8ae 100644 (file)
@@ -6,8 +6,6 @@
  */
 
 #include <common.h>
-#include <fdt_support.h>
-#include <fdtdec.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/printk.h>
@@ -264,36 +262,3 @@ int dram_init_banksize(void)
 
        return 0;
 }
-
-#ifdef CONFIG_OF_BOARD_SETUP
-/*
- * The DRAM PHY requires 64 byte scratch area in each DRAM channel
- * for its dynamic PHY training feature.
- */
-int ft_board_setup(void *fdt, bd_t *bd)
-{
-       unsigned long rsv_addr;
-       const unsigned long rsv_size = 64;
-       int i, ret;
-
-       if (uniphier_get_soc_id() != UNIPHIER_LD20_ID)
-               return 0;
-
-       for (i = 0; i < ARRAY_SIZE(gd->bd->bi_dram); i++) {
-               if (!gd->bd->bi_dram[i].size)
-                       continue;
-
-               rsv_addr = gd->bd->bi_dram[i].start + gd->bd->bi_dram[i].size;
-               rsv_addr -= rsv_size;
-
-               ret = fdt_add_mem_rsv(fdt, rsv_addr, rsv_size);
-               if (ret)
-                       return -ENOSPC;
-
-               pr_notice("   Reserved memory region for DRAM PHY training: addr=%lx size=%lx\n",
-                         rsv_addr, rsv_size);
-       }
-
-       return 0;
-}
-#endif
diff --git a/arch/arm/mach-uniphier/fdt-fixup.c b/arch/arm/mach-uniphier/fdt-fixup.c
new file mode 100644 (file)
index 0000000..6f3c29d
--- /dev/null
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2016-2018 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
+ */
+
+#include <common.h>
+#include <fdt_support.h>
+#include <fdtdec.h>
+#include <jffs2/load_kernel.h>
+#include <mtd_node.h>
+#include <linux/kernel.h>
+#include <linux/printk.h>
+
+#include "soc-info.h"
+
+/*
+ * The DRAM PHY requires 64 byte scratch area in each DRAM channel
+ * for its dynamic PHY training feature.
+ */
+static int uniphier_ld20_fdt_mem_rsv(void *fdt, bd_t *bd)
+{
+       unsigned long rsv_addr;
+       const unsigned long rsv_size = 64;
+       int i, ret;
+
+       if (!IS_ENABLED(CONFIG_ARCH_UNIPHIER_LD20) ||
+           uniphier_get_soc_id() != UNIPHIER_LD20_ID)
+               return 0;
+
+       for (i = 0; i < ARRAY_SIZE(bd->bi_dram); i++) {
+               if (!bd->bi_dram[i].size)
+                       continue;
+
+               rsv_addr = bd->bi_dram[i].start + bd->bi_dram[i].size;
+               rsv_addr -= rsv_size;
+
+               ret = fdt_add_mem_rsv(fdt, rsv_addr, rsv_size);
+               if (ret)
+                       return -ENOSPC;
+
+               pr_notice("   Reserved memory region for DRAM PHY training: addr=%lx size=%lx\n",
+                         rsv_addr, rsv_size);
+       }
+
+       return 0;
+}
+
+int ft_board_setup(void *fdt, bd_t *bd)
+{
+       static const struct node_info nodes[] = {
+               { "socionext,uniphier-denali-nand-v5a", MTD_DEV_TYPE_NAND },
+               { "socionext,uniphier-denali-nand-v5b", MTD_DEV_TYPE_NAND },
+       };
+       int ret;
+
+       fdt_fixup_mtdparts(fdt, nodes, ARRAY_SIZE(nodes));
+
+       ret = uniphier_ld20_fdt_mem_rsv(fdt, bd);
+       if (ret)
+               return ret;
+
+       return 0;
+}
index c0f33b806ee9282a8ee5920db64e85ebec45c2ba..9eec1b7838123e54529bf25a0663d140d91211e8 100644 (file)
@@ -205,7 +205,7 @@ u32 get_board_rev(void)
  */
 int ft_board_setup(void *blob, bd_t *bd)
 {
-       struct node_info nodes[] = {
+       static const struct node_info nodes[] = {
                { "physmap-flash.0", MTD_DEV_TYPE_NOR, },  /* NOR flash */
                { "mxc_nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */
        };
index c114cdccbb59efda21bbeb26be2ac68b949ac78e..d42f57d4b7014b3bd6550af186504f2c580585d2 100644 (file)
@@ -519,7 +519,7 @@ int cm_fx6_setup_ecspi(void) { return 0; }
 #ifdef CONFIG_OF_BOARD_SETUP
 #define USDHC3_PATH    "/soc/aips-bus@02100000/usdhc@02198000/"
 
-struct node_info nodes[] = {
+static const struct node_info nodes[] = {
        /*
         * Both entries target the same flash chip. The st,m25p compatible
         * is used in the vendor device trees, while upstream uses (the
index 367152fa5f0af44dcc422320d7cc333ab3862240..9d9c83f7167e8bca4cafef6bc11dc24e13216cbf 100644 (file)
@@ -53,7 +53,7 @@ int checkboard(void)
 
 #if defined(CONFIG_OF_BOARD_SETUP)
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
-struct node_info nodes[] = {
+static const struct node_info nodes[] = {
        { "fsl,ifc-nand",               MTD_DEV_TYPE_NAND, },
 };
 #endif
index 6885668ff93a2cf1e6033f72afbe007eeba14d9a..36a55285e8110a8a871a1fafe41896279e66a05e 100644 (file)
@@ -357,7 +357,7 @@ void fdt_del_node_compat(void *blob, const char *compatible)
 
 #if defined(CONFIG_OF_BOARD_SETUP)
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
-struct node_info nodes[] = {
+static const struct node_info nodes[] = {
        { "cfi-flash",                  MTD_DEV_TYPE_NOR,  },
        { "fsl,ifc-nand",               MTD_DEV_TYPE_NAND, },
 };
index b86924ebe2c7215621c923e1dc53b648fdd56b4f..c4ec97435f4e7a44a68b1235dc9a6f4958749f78 100644 (file)
@@ -1114,7 +1114,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 {
        struct ventana_board_info *info = &ventana_info;
        struct ventana_eeprom_config *cfg;
-       struct node_info nodes[] = {
+       static const struct node_info nodes[] = {
                { "sst,w25q256",          MTD_DEV_TYPE_NOR, },  /* SPI flash */
                { "fsl,imx6q-gpmi-nand",  MTD_DEV_TYPE_NAND, }, /* NAND flash */
        };
index cc55bcc81adfc636f06587d436f02061dce41b31..965a009a9f53311baebc945c11e7624c2a355ad5 100644 (file)
@@ -211,7 +211,7 @@ int board_late_init(void)
 int ft_board_setup(void *blob, bd_t *bd)
 {
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
-       static struct node_info nodes[] = {
+       static const struct node_info nodes[] = {
                { "ti,omap2-nand", MTD_DEV_TYPE_NAND, },
        };
 
index 45a414c153abb2fceade1af7c15e9648537b525c..367af82d4a16a59deeae7bd509ffda35f2b45592 100644 (file)
@@ -157,7 +157,7 @@ static int ft_enable_by_compatible(void *blob, char *compat, int enable)
 int ft_board_setup(void *blob, bd_t *bd)
 {
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
-       static struct node_info nodes[] = {
+       static const struct node_info nodes[] = {
                { "ti,omap2-nand", MTD_DEV_TYPE_NAND, },
                { "ti,omap2-onenand", MTD_DEV_TYPE_ONENAND, },
        };
index 7f03ac12eed4a078ff11d5ffdba0d074bd2582c8..198023fb15c45b062775c907c601aef8806cc802 100644 (file)
@@ -1,5 +1,5 @@
 AM3517EVM BOARD
-M:     Vaibhav Hiremath <hvaibhav@ti.com>
+M:     Adam Ford <aford173@gmail.com>
 S:     Maintained
 F:     board/logicpd/am3517evm/
 F:     include/configs/am3517_evm.h
index f9f488db1ceb60bb06e2a63407fbec0b3d53f618..2210095d7a5c20aecce71413e1367d9128fac74e 100644 (file)
@@ -389,7 +389,7 @@ int checkboard(void)
 int ft_board_setup(void *blob, bd_t *bd)
 {
 #if defined(CONFIG_FDT_FIXUP_PARTITIONS)
-       static struct node_info nodes[] = {
+       static const struct node_info nodes[] = {
                { "fsl,imx7d-gpmi-nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */
                { "fsl,imx6q-gpmi-nand", MTD_DEV_TYPE_NAND, },
        };
index 83c35030077674b86949108f655f2d1bdfa95b99..4db1757469f8053e376e00427c667050bcb92671 100644 (file)
@@ -580,7 +580,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 {
        int ret = 0;
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
-       static struct node_info nodes[] = {
+       static const struct node_info nodes[] = {
                { "fsl,vf610-nfc", MTD_DEV_TYPE_NAND, }, /* NAND flash */
        };
 
index c5a7a3c3346bad53a510b316f937e20b6da48390..0cf530d923f0e5466b7e74b23ca46a5864043686 100644 (file)
@@ -1779,7 +1779,7 @@ config CMD_TRACE
 
 config CMD_AVB
        bool "avb - Android Verified Boot 2.0 operations"
-       depends on LIBAVB
+       depends on AVB_VERIFY
        default n
        help
          Enables a "avb" command to perform verification of partitions using
index c4010091338fe30e9531917b9622fa2686214123..0da3afd75ff03877fa8c5753c6c3887ac0296251 100644 (file)
@@ -690,7 +690,7 @@ static int part_parse(const char *const partdef, const char **ret, struct part_i
                part->auto_name = 0;
        } else {
                /* auto generated name in form of size@offset */
-               sprintf(part->name, "0x%08llx@0x%08llx", size, offset);
+               snprintf(part->name, name_len, "0x%08llx@0x%08llx", size, offset);
                part->auto_name = 1;
        }
 
index dc2e1c23dd819c31beacbf114559ebc2283726c2..9f6a1622d1e1db53552f212924e32857d785a6a8 100644 (file)
@@ -637,6 +637,16 @@ config HASH
          and the algorithms it supports are defined in common/hash.c. See
          also CMD_HASH for command-line access.
 
+config AVB_VERIFY
+       bool "Build Android Verified Boot operations"
+       depends on LIBAVB && FASTBOOT
+       help
+         This option enables compilation of bootloader-dependent operations,
+         used by Android Verified Boot 2.0 library (libavb). Includes:
+           * Helpers to process strings in order to build OS bootargs.
+           * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c.
+           * Helpers to alloc/init/free avb ops.
+
 endmenu
 
 menu "Update support"
index 66584f8f48be554a2afe662433d8e05503724982..7100541ece0011ad9184375ba02ee646b39e9139 100644 (file)
@@ -121,4 +121,4 @@ obj-$(CONFIG_$(SPL_)LOG_CONSOLE) += log_console.o
 obj-y += s_record.o
 obj-y += xyzModem.o
 
-obj-$(CONFIG_LIBAVB) += avb_verify.o
+obj-$(CONFIG_AVB_VERIFY) += avb_verify.o
index f9a00f8871c0c13c7b35a9ff6e6f0999cfddfa7e..20e35ade30293151d3bff00a3e4829e204423286 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <avb_verify.h>
+#include <blk.h>
 #include <fastboot.h>
 #include <image.h>
 #include <malloc.h>
@@ -288,8 +289,8 @@ static unsigned long mmc_read_and_flush(struct mmc_part *part,
                tmp_buf = buffer;
        }
 
-       blks = part->mmc->block_dev.block_read(part->mmc_blk,
-                               start, sectors, tmp_buf);
+       blks = blk_dread(part->mmc_blk,
+                        start, sectors, tmp_buf);
        /* flush cache after read */
        flush_cache((ulong)tmp_buf, sectors * part->info.blksz);
 
@@ -327,8 +328,8 @@ static unsigned long mmc_write(struct mmc_part *part, lbaint_t start,
                tmp_buf = buffer;
        }
 
-       return part->mmc->block_dev.block_write(part->mmc_blk,
-                               start, sectors, tmp_buf);
+       return blk_dwrite(part->mmc_blk,
+                         start, sectors, tmp_buf);
 }
 
 static struct mmc_part *get_partition(AvbOps *ops, const char *partition)
index 812eca8173ba91c2f14cc698600ba1d069a07cf1..3b31f3d7d521dc8f9c34835bf0707e02bdf1b0bb 100644 (file)
@@ -893,9 +893,9 @@ err_prop:
  *
  *     fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
  */
-void fdt_fixup_mtdparts(void *blob, void *node_info, int node_info_size)
+void fdt_fixup_mtdparts(void *blob, const struct node_info *node_info,
+                       int node_info_size)
 {
-       struct node_info *ni = node_info;
        struct mtd_device *dev;
        int i, idx;
        int noff;
@@ -905,12 +905,13 @@ void fdt_fixup_mtdparts(void *blob, void *node_info, int node_info_size)
 
        for (i = 0; i < node_info_size; i++) {
                idx = 0;
-               noff = fdt_node_offset_by_compatible(blob, -1, ni[i].compat);
+               noff = fdt_node_offset_by_compatible(blob, -1,
+                                                    node_info[i].compat);
                while (noff != -FDT_ERR_NOTFOUND) {
                        debug("%s: %s, mtd dev type %d\n",
                                fdt_get_name(blob, noff, 0),
-                               ni[i].compat, ni[i].type);
-                       dev = device_find(ni[i].type, idx++);
+                               node_info[i].compat, node_info[i].type);
+                       dev = device_find(node_info[i].type, idx++);
                        if (dev) {
                                if (fdt_node_set_part_info(blob, noff, dev))
                                        return; /* return on error */
@@ -918,7 +919,7 @@ void fdt_fixup_mtdparts(void *blob, void *node_info, int node_info_size)
 
                        /* Jump to next flash node */
                        noff = fdt_node_offset_by_compatible(blob, noff,
-                                                            ni[i].compat);
+                                                            node_info[i].compat);
                }
        }
 }
index 35f8f80013a8b02821c22bd95eb1cd32c0d45aae..3b1bd71bda0cdc0ca3c30ed5204e5708d882e9b7 100644 (file)
@@ -12,7 +12,6 @@
 #include <spl.h>
 #include <xyzModem.h>
 #include <asm/u-boot.h>
-#include <asm/utils.h>
 #include <linux/libfdt.h>
 
 #define BUF_SIZE 1024
index 3b8e2900ebe6da27567c7914f155b44e4c0e8d6c..41ab3fd373490197496adf89859115b8bf5cb2c4 100644 (file)
@@ -18,6 +18,9 @@ CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_MTD_SUPPORT=y
 CONFIG_SYS_PROMPT="AM3517_EVM # "
 # CONFIG_CMD_IMI is not set
+CONFIG_CMD_SPL=y
+CONFIG_CMD_SPL_NAND_OFS=0xaa0000
+CONFIG_CMD_SPL_WRITE_SIZE=0x20000
 # CONFIG_CMD_EEPROM is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_GPT is not set
@@ -37,6 +40,8 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
+CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
+CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000
 CONFIG_SPL_NAND_SIMPLE=y
 CONFIG_CONS_INDEX=3
 CONFIG_SYS_NS16550=y
index a37a38f881c62cbfaf503c622037ee67f2c409c3..1e1a391d7fe630d251c5223461bb4c47424a43e0 100644 (file)
@@ -32,8 +32,6 @@ CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(spl),1920k(u-boot),128k(u-boot-env),128k(dtb),6m(kernel),-(rootfs)"
 CONFIG_CMD_UBI=y
 # CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
-CONFIG_SPL_PARTITION_UUIDS=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SPL_DM=y
@@ -79,4 +77,3 @@ CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_FAT_WRITE=y
 CONFIG_BCH=y
 CONFIG_SPL_OF_LIBFDT=y
-# CONFIG_EFI_LOADER is not set
index 610035a8af17f6bad00ce602af0ba926384bc564..7dfc88fdbb31f49bd45730581eb9141e99b580ba 100644 (file)
@@ -31,6 +31,9 @@ CONFIG_CMD_TIME=y
 # CONFIG_CMD_MISC is not set
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nand0=uniphier-nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=uniphier-nand.0:1m(firmware),-(UBI)"
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_NET_RANDOM_ETHADDR=y
@@ -39,7 +42,7 @@ CONFIG_MISC=y
 CONFIG_I2C_EEPROM=y
 CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10
 CONFIG_MMC_UNIPHIER=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD_PARTITIONS=y
 CONFIG_NAND=y
 CONFIG_NAND_DENALI_DT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
@@ -53,3 +56,4 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_GENERIC=y
 CONFIG_USB_STORAGE=y
 CONFIG_PANIC_HANG=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
index 8dae587e01dd32e70762465ccfabde5a1f6be322..ccd80c00f835ac7668abf166d2d829933ff891b8 100644 (file)
@@ -30,6 +30,9 @@ CONFIG_CMD_TIME=y
 # CONFIG_CMD_MISC is not set
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nand0=uniphier-nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=uniphier-nand.0:1m(firmware),-(UBI)"
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_NET_RANDOM_ETHADDR=y
@@ -38,7 +41,7 @@ CONFIG_MISC=y
 CONFIG_I2C_EEPROM=y
 CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10
 CONFIG_MMC_UNIPHIER=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD_PARTITIONS=y
 CONFIG_NAND=y
 CONFIG_NAND_DENALI_DT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
@@ -54,3 +57,4 @@ CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_UNIPHIER=y
 CONFIG_USB_STORAGE=y
 CONFIG_PANIC_HANG=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
index 235d1f52220134aed780619a554cc412d9705cbe..67ebde7a10151342ad42887a394be28a053ad5ae 100644 (file)
@@ -26,6 +26,9 @@ CONFIG_CMD_TIME=y
 # CONFIG_CMD_MISC is not set
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_MTDIDS_DEFAULT="nand0=uniphier-nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=uniphier-nand.0:1m(firmware),-(UBI)"
+CONFIG_CMD_UBI=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_GPIO_UNIPHIER=y
 CONFIG_MISC=y
@@ -36,7 +39,6 @@ CONFIG_MMC_UNIPHIER=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_CADENCE=y
-CONFIG_MTD_DEVICE=y
 CONFIG_NAND=y
 CONFIG_NAND_DENALI_DT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
@@ -54,3 +56,4 @@ CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_UNIPHIER=y
 CONFIG_USB_STORAGE=y
 CONFIG_PANIC_HANG=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
index 67784b529e4713e8fa92782412e3061c492a444c..120279fedbe235fe781c898221e3a9df7a0a9747 100644 (file)
@@ -58,6 +58,7 @@ Slot verification result: ERROR_IO
 -----------------------------------
 The following options must be enabled:
 CONFIG_LIBAVB=y
+CONFIG_AVB_VERIFY=y
 CONFIG_CMD_AVB=y
 
 
index 990806ab793be96d02e19e05f312c260f32b0aad..badfacd66aa5cfbe786a175d35ed1ff03d2edf36 100644 (file)
@@ -332,6 +332,61 @@ for kernel, DTB, and Init ramdisk.
 If they are not displayed, the Verified Boot is not working.
 
 
+Deployment for Distro Boot
+--------------------------
+
+UniPhier SoC family boot the kernel in a generic manner as described in
+doc/README.distro .
+
+To boot the kernel, you need to deploy necesssary components to a file
+system on one of your block devices (eMMC, NAND, USB drive, etc.).
+
+The components depend on the kernel image format.
+
+[1] Bare images
+
+  - kernel
+  - init ramdisk
+  - device tree blob
+  - boot configuration file (extlinux.conf)
+
+Here is an exmple of the configuration file.
+
+-------------------->8--------------------
+menu title UniPhier Boot Options.
+
+timeout 50
+default UniPhier
+
+label UniPhier
+      kernel ../Image
+      initrd ../rootfs.cpio.gz
+      fdtdir ..
+-------------------->8--------------------
+
+Then, write 'Image', 'rootfs.cpio.gz', 'uniphier-ld20-ref.dtb' (DTB depends on
+your board), and 'extlinux/extlinux.conf' to the file system.
+
+[2] FIT
+
+  - FIT blob
+  - boot configuration file (extlinux.conf)
+
+-------------------->8--------------------
+menu title UniPhier Boot Options.
+
+timeout 50
+default UniPhier
+
+label UniPhier
+      kernel ../fitImage
+-------------------->8--------------------
+
+Since the init ramdisk and DTB are contained in the FIT blob,
+you do not need to describe them in the configuration file.
+Write 'fitImage' and 'extlinux/extlinux.conf' to the file system.
+
+
 UniPhier specific commands
 --------------------------
 
diff --git a/doc/device-tree-bindings/phy/no-op.txt b/doc/device-tree-bindings/phy/no-op.txt
new file mode 100644 (file)
index 0000000..a338112
--- /dev/null
@@ -0,0 +1,16 @@
+NOP PHY driver
+
+This driver is used to stub PHY operations in a driver (USB, SATA).
+This is useful when the 'client' driver (USB, SATA, ...) uses the PHY framework
+and there is no actual PHY harwdare to drive.
+
+Required properties:
+- compatible     : must contain "nop-phy"
+- #phy-cells     : must contain <0>
+
+Example:
+
+nop_phy {
+       compatible = "nop-phy";
+       #phy-cells = <0>;
+};
diff --git a/doc/device-tree-bindings/phy/phy-stm32-usbphyc.txt b/doc/device-tree-bindings/phy/phy-stm32-usbphyc.txt
new file mode 100644 (file)
index 0000000..725ae71
--- /dev/null
@@ -0,0 +1,73 @@
+STMicroelectronics STM32 USB HS PHY controller
+
+The STM32 USBPHYC block contains a dual port High Speed UTMI+ PHY and a UTMI
+switch. It controls PHY configuration and status, and the UTMI+ switch that
+selects either OTG or HOST controller for the second PHY port. It also sets
+PLL configuration.
+
+USBPHYC
+      |_ PLL
+      |
+      |_ PHY port#1 _________________ HOST controller
+      |                    _                 |
+      |                  / 1|________________|
+      |_ PHY port#2 ----|   |________________
+      |                  \_0|                |
+      |_ UTMI switch_______|          OTG controller
+
+
+Phy provider node
+=================
+
+Required properties:
+- compatible: must be "st,stm32mp1-usbphyc"
+- reg: address and length of the usb phy control register set
+- clocks: phandle + clock specifier for the PLL phy clock
+- #address-cells: number of address cells for phys sub-nodes, must be <1>
+- #size-cells: number of size cells for phys sub-nodes, must be <0>
+
+Optional properties:
+- assigned-clocks: phandle + clock specifier for the PLL phy clock
+- assigned-clock-parents: the PLL phy clock parent
+- resets: phandle + reset specifier
+
+Required nodes: one sub-node per port the controller provides.
+
+Phy sub-nodes
+==============
+
+Required properties:
+- reg: phy port index
+- phy-supply: phandle to the regulator providing 3V3 power to the PHY,
+             see phy-bindings.txt in the same directory.
+- vdda1v1-supply: phandle to the regulator providing 1V1 power to the PHY
+- vdda1v8-supply: phandle to the regulator providing 1V8 power to the PHY
+- #phy-cells: see phy-bindings.txt in the same directory, must be <0> for PHY
+  port#1 and must be <1> for PHY port#2, to select USB controller
+
+
+Example:
+               usbphyc: usb-phy@5a006000 {
+                       compatible = "st,stm32mp1-usbphyc";
+                       reg = <0x5a006000 0x1000>;
+                       clocks = <&rcc_clk USBPHY_K>;
+                       resets = <&rcc_rst USBPHY_R>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       usbphyc_port0: usb-phy@0 {
+                               reg = <0>;
+                               phy-supply = <&vdd_usb>;
+                               vdda1v1-supply = <&reg11>;
+                               vdda1v8-supply = <&reg18>
+                               #phy-cells = <0>;
+                       };
+
+                       usbphyc_port1: usb-phy@1 {
+                               reg = <1>;
+                               phy-supply = <&vdd_usb>;
+                               vdda1v1-supply = <&reg11>;
+                               vdda1v8-supply = <&reg18>
+                               #phy-cells = <1>;
+                       };
+               };
diff --git a/doc/device-tree-bindings/rtc/brcm,brcmstb-waketimer.txt b/doc/device-tree-bindings/rtc/brcm,brcmstb-waketimer.txt
new file mode 100644 (file)
index 0000000..1d990bc
--- /dev/null
@@ -0,0 +1,22 @@
+Broadcom STB wake-up Timer
+
+The Broadcom STB wake-up timer provides a 27Mhz resolution timer, with the
+ability to wake up the system from low-power suspend/standby modes.
+
+Required properties:
+- compatible     : should contain "brcm,brcmstb-waketimer"
+- reg            : the register start and length for the WKTMR block
+- interrupts     : The TIMER interrupt
+- interrupt-parent: The phandle to the Always-On (AON) Power Management (PM) L2
+                    interrupt controller node
+- clocks        : The phandle to the UPG fixed clock (27Mhz domain)
+
+Example:
+
+waketimer@f0411580 {
+       compatible = "brcm,brcmstb-waketimer";
+       reg = <0xf0411580 0x14>;
+       interrupts = <0x3>;
+       interrupt-parent = <&aon_pm_l2_intc>;
+       clocks = <&upg_fixed>;
+};
index 6266c8aa925476fe24cb9c173ab972e79c3922f7..7302c370038722eb7e02bf8b3492ad09c4ca2c19 100644 (file)
@@ -1270,7 +1270,7 @@ int denali_init(struct denali_nand_info *denali)
                denali->dma_avail = 1;
 
        if (denali->dma_avail) {
-               chip->buf_align = 16;
+               chip->buf_align = ARCH_DMA_MINALIGN;
                if (denali->caps & DENALI_CAP_DMA_64BIT)
                        denali->setup_dma = denali_setup_dma64;
                else
index f2568cf8864dd296d4a91a9d766b467aa8e5288a..c57317d2c267824b4c4a7f39a62e6918da98bd90 100644 (file)
@@ -9,7 +9,8 @@
 #include <errno.h>
 #include <rtc.h>
 
-#if defined(CONFIG_CMD_DATE) || defined(CONFIG_TIMESTAMP)
+#if defined(CONFIG_CMD_DATE) || defined(CONFIG_DM_RTC) || \
+                               defined(CONFIG_TIMESTAMP)
 
 #define FEBRUARY               2
 #define        STARTOFTIME             1970
index 9aa082bf6059e62781558a70f19bf6f539a75fc8..723d18ee2381803a68c7ae0050b45df8ed3446da 100644 (file)
@@ -178,7 +178,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SPL_RELOC_MALLOC_ADDR   (CONFIG_SPL_GD_ADDR + 12 * 1024)
 #define CONFIG_SPL_RELOC_MALLOC_SIZE   (30 << 10)
 #define CONFIG_SPL_RELOC_STACK         (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE    (22 << 10)
 
 #ifdef CONFIG_PHYS_64BIT
 #define CONFIG_SYS_DCSRBAR             0xf0000000
index 0ae43fa3559b379059b610b2ac0f13a7154e4885..4de25a3d06518a7b895518db504c2e16923a7a6b 100644 (file)
 #define CONFIG_SYS_INIT_L2_END (CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
 #define CONFIG_SPL_RELOC_TEXT_BASE     0xf8f81000
 #define CONFIG_SPL_RELOC_STACK         (CONFIG_SYS_INIT_L2_ADDR + 128 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE    (32 << 10)
 #define CONFIG_SPL_RELOC_MALLOC_ADDR   (CONFIG_SYS_INIT_L2_ADDR + 160 * 1024)
 #define CONFIG_SPL_RELOC_MALLOC_SIZE   (96 << 10)
 #define CONFIG_SPL_GD_ADDR             (CONFIG_SYS_INIT_L2_ADDR + 112 * 1024)
index 61ab0cca9872a651635177b8e5b6835b275704f2..6024cce1af8397c7be3297aeeb475bbc004c65cd 100644 (file)
@@ -497,7 +497,6 @@ extern unsigned long get_sdram_size(void);
 #define CONFIG_SYS_INIT_L2_END (CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
 #define CONFIG_SPL_RELOC_TEXT_BASE     0xD0001000
 #define CONFIG_SPL_RELOC_STACK         (CONFIG_SYS_INIT_L2_ADDR + 112 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE    (16 << 10)
 #define CONFIG_SPL_RELOC_MALLOC_ADDR   (CONFIG_SYS_INIT_L2_ADDR + 128 * 1024)
 #define CONFIG_SPL_RELOC_MALLOC_SIZE   (128 << 10)
 #define CONFIG_SPL_GD_ADDR             (CONFIG_SYS_INIT_L2_ADDR + 96 * 1024)
index 7c0afb42b9b13a4d2ed9501f9ff155fdcf01c260..3110cb1ce4bbc0f637a351553587051e8459f2c0 100644 (file)
 #define CONFIG_SYS_INIT_L2_END (CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
 #define CONFIG_SPL_RELOC_TEXT_BASE     0xf8f81000
 #define CONFIG_SPL_RELOC_STACK         (CONFIG_SYS_INIT_L2_ADDR + 116 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE    (32 << 10)
 #define CONFIG_SPL_RELOC_MALLOC_ADDR   (CONFIG_SYS_INIT_L2_ADDR + 148 * 1024)
 #define CONFIG_SPL_RELOC_MALLOC_SIZE   (108 << 10)
 #define CONFIG_SPL_GD_ADDR             (CONFIG_SYS_INIT_L2_ADDR + 112 * 1024)
index c91781f645dad11a14ce92e64f5348c6d37ede43..b65477e3967b35a6be3401ccc62d1cabfad57917 100644 (file)
@@ -200,7 +200,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SPL_RELOC_MALLOC_ADDR   (CONFIG_SPL_GD_ADDR + 12 * 1024)
 #define CONFIG_SPL_RELOC_MALLOC_SIZE   (30 << 10)
 #define CONFIG_SPL_RELOC_STACK         (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE    (22 << 10)
 
 #ifdef CONFIG_PHYS_64BIT
 #define CONFIG_SYS_DCSRBAR             0xf0000000
index fc35d6646b78c22a7b42c59d2ba89a5dd898ff0c..b04a72662c5841095073ca9d473ed067d1cfb620 100644 (file)
@@ -223,7 +223,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SPL_RELOC_MALLOC_ADDR   (CONFIG_SPL_GD_ADDR + 12 * 1024)
 #define CONFIG_SPL_RELOC_MALLOC_SIZE   (30 << 10)
 #define CONFIG_SPL_RELOC_STACK         (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE    (22 << 10)
 
 #ifdef CONFIG_PHYS_64BIT
 #define CONFIG_SYS_DCSRBAR             0xf0000000
index 4d2e969ca22885603eed9b3472900b90254e2a17..c8bec69542b3b7cb0f0cf073b66d3a6e240f66b0 100644 (file)
@@ -236,7 +236,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_sd_rcw.cfg
 #define CONFIG_SPL_RELOC_MALLOC_ADDR   (CONFIG_SPL_GD_ADDR + 12 * 1024)
 #define CONFIG_SPL_RELOC_MALLOC_SIZE   (30 << 10)
 #define CONFIG_SPL_RELOC_STACK         (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE    (22 << 10)
 
 #define CONFIG_SYS_DCSRBAR             0xf0000000
 #define CONFIG_SYS_DCSRBAR_PHYS                0xf00000000ull
index b0a1a0a925f12defef2479e12207ac9ef5faca03..cf63e7117f91e548c81488480d36fc7a136fb270 100644 (file)
@@ -180,7 +180,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SPL_RELOC_MALLOC_ADDR   (CONFIG_SPL_GD_ADDR + 12 * 1024)
 #define CONFIG_SPL_RELOC_MALLOC_SIZE   (50 << 10)
 #define CONFIG_SPL_RELOC_STACK         (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE    (22 << 10)
 
 #define CONFIG_SYS_DCSRBAR     0xf0000000
 #define CONFIG_SYS_DCSRBAR_PHYS        0xf00000000ull
index 9179858ec48e8be8910506e0458ec4e89aa84311..ba3aafe1e2d72410eb23919daa291a9523c61622 100644 (file)
@@ -165,7 +165,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SPL_RELOC_MALLOC_ADDR   (CONFIG_SPL_GD_ADDR + 12 * 1024)
 #define CONFIG_SPL_RELOC_MALLOC_SIZE   (50 << 10)
 #define CONFIG_SPL_RELOC_STACK         (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE    (22 << 10)
 
 #define CONFIG_SYS_DCSRBAR     0xf0000000
 #define CONFIG_SYS_DCSRBAR_PHYS        0xf00000000ull
index 2399a5a05878cfc94958070e385fc7b12e627f95..5bc63d207b297eeeace3f43b874faeee051543e0 100644 (file)
 #define CONFIG_SPL_RELOC_MALLOC_ADDR   (CONFIG_SPL_GD_ADDR + 12 * 1024)
 #define CONFIG_SPL_RELOC_MALLOC_SIZE   (50 << 10)
 #define CONFIG_SPL_RELOC_STACK         (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE    (22 << 10)
 
 #define CONFIG_SYS_DCSRBAR             0xf0000000
 #define CONFIG_SYS_DCSRBAR_PHYS                0xf00000000ull
index 0b9ab72e40b254221279d950fbf88d31f202a2e6..32104c2ad49d9605501ca98a3fbfdfe7b8918567 100644 (file)
 #define CONFIG_SPL_RELOC_TEXT_BASE     0xf8f81000
 #define CONFIG_SPL_GD_ADDR             (CONFIG_SYS_INIT_L2_ADDR + 112 * 1024)
 #define CONFIG_SPL_RELOC_STACK         (CONFIG_SYS_INIT_L2_ADDR + 116 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE    (32 << 10)
 #define CONFIG_SPL_RELOC_MALLOC_ADDR   (CONFIG_SYS_INIT_L2_ADDR + 148 * 1024)
 #if defined(CONFIG_TARGET_P2020RDB)
 #define CONFIG_SPL_RELOC_MALLOC_SIZE   (364 << 10)
index d8bf3b6580e34b6c15eca3f4272d83324cce1c7c..9ce31f44631196f717fd06c5ed6e563dd78c886d 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/sizes.h>
+
 /* ram memory-related information */
 #define CONFIG_NR_DRAM_BANKS           1
 #define PHYS_SDRAM_1                   0x40000000
@@ -19,6 +21,7 @@
 /* Environment */
 
 #define CONFIG_LOADADDR                        CONFIG_SYS_LOAD_ADDR
+#define CONFIG_SYS_BOOTM_LEN           SZ_16M
 
 #define BOOT_TARGET_DEVICES(func) \
        func(MMC, mmc, 0) \
index 92f8111bd42c86446675ff287c935fddf08f1ba7..b65b6334f883a565f29bd62e6f42af803d295a84 100644 (file)
@@ -60,7 +60,6 @@
 #define CONFIG_SPL_RELOC_MALLOC_ADDR   (CONFIG_SPL_GD_ADDR + 12 * 1024)
 #define CONFIG_SPL_RELOC_MALLOC_SIZE   (50 << 10)
 #define CONFIG_SPL_RELOC_STACK         (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE    (22 << 10)
 
 #define CONFIG_SYS_DCSRBAR             0xf0000000
 #define CONFIG_SYS_DCSRBAR_PHYS                0xf00000000ull
index 31dfd234940aefe021ca2af8b4c13092f79b62ba..43add0e5a2a6c6c40008856160f9ffa236157ed6 100644 (file)
 #ifndef __CONFIG_UNIPHIER_COMMON_H__
 #define __CONFIG_UNIPHIER_COMMON_H__
 
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_bootcmd.h>
+
+#ifdef CONFIG_CMD_MMC
+#define BOOT_TARGET_DEVICE_MMC(func)   func(MMC, mmc, 0) func(MMC, mmc, 1)
+#else
+#define BOOT_TARGET_DEVICE_MMC(func)
+#endif
+
+#ifdef CONFIG_CMD_UBIFS
+#define BOOT_TARGET_DEVICE_UBIFS(func) func(UBIFS, ubifs, 0)
+#else
+#define BOOT_TARGET_DEVICE_UBIFS(func)
+#endif
+
+#ifdef CONFIG_CMD_USB
+#define BOOT_TARGET_DEVICE_USB(func)   func(USB, usb, 0)
+#else
+#define BOOT_TARGET_DEVICE_USB(func)
+#endif
+
+#define BOOT_TARGET_DEVICES(func)      \
+       BOOT_TARGET_DEVICE_MMC(func)    \
+       BOOT_TARGET_DEVICE_UBIFS(func)  \
+       BOOT_TARGET_DEVICE_USB(func)
+#else
+#define BOOTENV
+#endif
+
 #define CONFIG_ARMV7_PSCI_1_0
 
 /*-----------------------------------------------------------------------
        "third_image=u-boot.bin\0"
 #endif
 
-#define CONFIG_BOOTCOMMAND             "run $bootmode"
-
 #define CONFIG_ROOTPATH                        "/nfs/root/path"
 #define CONFIG_NFSBOOTCOMMAND                                          \
        "setenv bootargs $bootargs root=/dev/nfs rw "                   \
 #ifdef CONFIG_FIT
 #define CONFIG_BOOTFILE                        "fitImage"
 #define LINUXBOOT_ENV_SETTINGS \
-       "fit_addr=0x00100000\0" \
-       "fit_addr_r=0x85100000\0" \
-       "fit_size=0x00f00000\0" \
-       "norboot=setexpr fit_addr $nor_base + $fit_addr &&" \
-               "bootm $fit_addr\0" \
-       "nandboot=nand read $fit_addr_r $fit_addr $fit_size &&" \
-               "bootm $fit_addr_r\0" \
-       "tftpboot=tftpboot $fit_addr_r $bootfile &&" \
-               "bootm $fit_addr_r\0" \
+       "kernel_addr_r=0x85100000\0" \
+       "tftpboot=tftpboot $kernel_addr_r $bootfile &&" \
+               "bootm $kernel_addr_r\0" \
        "__nfsboot=run tftpboot\0"
 #else
 #ifdef CONFIG_ARM64
-#define CONFIG_BOOTFILE                        "Image.gz"
+#define CONFIG_BOOTFILE                        "Image"
 #define LINUXBOOT_CMD                  "booti"
-#define KERNEL_ADDR_LOAD               "kernel_addr_load=0x85200000\0"
 #define KERNEL_ADDR_R                  "kernel_addr_r=0x82080000\0"
 #else
 #define CONFIG_BOOTFILE                        "zImage"
 #define LINUXBOOT_CMD                  "bootz"
-#define KERNEL_ADDR_LOAD               "kernel_addr_load=0x80208000\0"
 #define KERNEL_ADDR_R                  "kernel_addr_r=0x80208000\0"
 #endif
 #define LINUXBOOT_ENV_SETTINGS \
-       "fdt_addr=0x00100000\0" \
        "fdt_addr_r=0x85100000\0" \
-       "fdt_size=0x00008000\0" \
-       "kernel_addr=0x00200000\0" \
-       KERNEL_ADDR_LOAD \
        KERNEL_ADDR_R \
-       "kernel_size=0x00e00000\0" \
-       "ramdisk_addr=0x01000000\0" \
        "ramdisk_addr_r=0x86000000\0" \
-       "ramdisk_size=0x00800000\0" \
-       "ramdisk_file=rootfs.cpio.uboot\0" \
+       "ramdisk_file=rootfs.cpio.gz\0" \
        "boot_common=setexpr bootm_low $kernel_addr_r '&' fe000000 && " \
-               "if test $kernel_addr_load = $kernel_addr_r; then " \
-                       "true; " \
-               "else " \
-                       "unzip $kernel_addr_load $kernel_addr_r; " \
-               "fi && " \
                LINUXBOOT_CMD " $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0" \
-       "norboot=setexpr kernel_addr_nor $nor_base + $kernel_addr && " \
-               "setexpr kernel_size_div4 $kernel_size / 4 && " \
-               "cp $kernel_addr_nor $kernel_addr_load $kernel_size_div4 && " \
-               "setexpr ramdisk_addr_nor $nor_base + $ramdisk_addr && " \
-               "setexpr ramdisk_size_div4 $ramdisk_size / 4 && " \
-               "cp $ramdisk_addr_nor $ramdisk_addr_r $ramdisk_size_div4 && " \
-               "setexpr fdt_addr_nor $nor_base + $fdt_addr && " \
-               "setexpr fdt_size_div4 $fdt_size / 4 && " \
-               "cp $fdt_addr_nor $fdt_addr_r $fdt_size_div4 && " \
-               "run boot_common\0" \
-       "nandboot=nand read $kernel_addr_load $kernel_addr $kernel_size && " \
-               "nand read $ramdisk_addr_r $ramdisk_addr $ramdisk_size &&" \
-               "nand read $fdt_addr_r $fdt_addr $fdt_size &&" \
-               "run boot_common\0" \
-       "tftpboot=tftpboot $kernel_addr_load $bootfile && " \
-               "tftpboot $ramdisk_addr_r $ramdisk_file &&" \
+       "tftpboot=tftpboot $kernel_addr_r $bootfile && " \
                "tftpboot $fdt_addr_r $fdtfile &&" \
+               "tftpboot $ramdisk_addr_r $ramdisk_file &&" \
+               "setenv ramdisk_addr_r $ramdisk_addr_r:$filesize &&" \
                "run boot_common\0" \
        "__nfsboot=tftpboot $kernel_addr_load $bootfile && " \
                "tftpboot $fdt_addr_r $fdtfile &&" \
 #define        CONFIG_EXTRA_ENV_SETTINGS                               \
        "netdev=eth0\0"                                         \
        "initrd_high=0xffffffffffffffff\0"                      \
+       "scriptaddr=0x85000000\0"                               \
        "nor_base=0x42000000\0"                                 \
        "sramupdate=setexpr tmp_addr $nor_base + 0x50000 &&"    \
                "tftpboot $tmp_addr $second_image && " \
                "tftpboot $third_image && " \
                "usb write $loadaddr 100 f00\0" \
        BOOT_IMAGES \
-       LINUXBOOT_ENV_SETTINGS
+       LINUXBOOT_ENV_SETTINGS \
+       BOOTENV
 
 #define CONFIG_SYS_BOOTMAPSZ                   0x20000000
 
index a9a0078af6635cc1969d389f0262d67a44474290..27fe564f0b6b497c21b4e628ecf155454014dac2 100644 (file)
@@ -205,11 +205,16 @@ int fdt_increase_size(void *fdt, int add_len);
 
 int fdt_fixup_nor_flash_size(void *blob);
 
+struct node_info;
 #if defined(CONFIG_FDT_FIXUP_PARTITIONS)
-void fdt_fixup_mtdparts(void *fdt, void *node_info, int node_info_size);
+void fdt_fixup_mtdparts(void *fdt, const struct node_info *node_info,
+                       int node_info_size);
 #else
-static inline void fdt_fixup_mtdparts(void *fdt, void *node_info,
-                                       int node_info_size) {}
+static inline void fdt_fixup_mtdparts(void *fdt,
+                                     const struct node_info *node_info,
+                                     int node_info_size)
+{
+}
 #endif
 
 void fdt_del_node_and_alias(void *blob, const char *alias);
index 0c41140465e2fb3760786a3d6347bd610a1ec33d..823e535b82a1686a4d4e1941a079f5d436e570fd 100644 (file)
@@ -75,10 +75,6 @@ struct mtd_erase_region_info {
  *             mode = MTD_OPS_PLACE_OOB or MTD_OPS_RAW)
  * @datbuf:    data buffer - if NULL only oob data are read/written
  * @oobbuf:    oob data buffer
- *
- * Note, it is allowed to read more than one OOB area at one go, but not write.
- * The interface assumes that the OOB write requests program only one page's
- * OOB area.
  */
 struct mtd_oob_ops {
        unsigned int    mode;
index ffaa5b6e4be782834f0c9842fe8a7f8085cbc153..1c48692b69ede8b1045d7a8deb4706ba0d1ad84a 100644 (file)
@@ -622,7 +622,7 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag,
 
                        list[n++] = ep;
 
-                       totlen += strlen(ep->key) + 2;
+                       totlen += strlen(ep->key);
 
                        if (sep == '\0') {
                                totlen += strlen(ep->data);
@@ -662,7 +662,7 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag,
                        return (-1);
                }
        } else {
-               size = totlen + 1;
+               size = totlen;
        }
 
        /* Check if the user provided a buffer */
index 80c7f3cf98ec48b646e09561715f42fae2a5611a..1aebe174218dafe1cc0967a0c0ffd1dd177b393f 100644 (file)
@@ -1942,7 +1942,6 @@ CONFIG_SPL_PPAACT_ADDR
 CONFIG_SPL_RELOC_MALLOC_ADDR
 CONFIG_SPL_RELOC_MALLOC_SIZE
 CONFIG_SPL_RELOC_STACK
-CONFIG_SPL_RELOC_STACK_SIZE
 CONFIG_SPL_RELOC_TEXT_BASE
 CONFIG_SPL_SATA_BOOT_DEVICE
 CONFIG_SPL_SIZE
index e4cbb87d760bfffb2935a95a4fc4da0b2495cb8c..a04bb26304fc71675bd6e77f2765705daa55ea29 100644 (file)
@@ -743,7 +743,7 @@ int conf_write(const char *name)
        struct menu *menu;
        const char *basename;
        const char *str;
-       char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1];
+       char dirname[PATH_MAX+1], tmpname[PATH_MAX+22], newname[PATH_MAX+8];
        char *env;
 
        dirname[0] = 0;
index 3c265357ae733a4e0063b3bed0414a15696b5ab6..4b626354fb3f1e235af40a3c1110de5830236ae8 100644 (file)
@@ -202,21 +202,22 @@ static int fit_write_images(struct image_tool_params *params, char *fdt)
        typename = genimg_get_type_short_name(params->fit_image_type);
        snprintf(str, sizeof(str), "%s-1", typename);
        fdt_begin_node(fdt, str);
-       fdt_property_string(fdt, "description", params->imagename);
-       fdt_property_string(fdt, "type", typename);
-       fdt_property_string(fdt, "arch",
+       fdt_property_string(fdt, FIT_DESC_PROP, params->imagename);
+       fdt_property_string(fdt, FIT_TYPE_PROP, typename);
+       fdt_property_string(fdt, FIT_ARCH_PROP,
                            genimg_get_arch_short_name(params->arch));
-       fdt_property_string(fdt, "os", genimg_get_os_short_name(params->os));
-       fdt_property_string(fdt, "compression",
+       fdt_property_string(fdt, FIT_OS_PROP,
+                           genimg_get_os_short_name(params->os));
+       fdt_property_string(fdt, FIT_COMP_PROP,
                            genimg_get_comp_short_name(params->comp));
-       fdt_property_u32(fdt, "load", params->addr);
-       fdt_property_u32(fdt, "entry", params->ep);
+       fdt_property_u32(fdt, FIT_LOAD_PROP, params->addr);
+       fdt_property_u32(fdt, FIT_ENTRY_PROP, params->ep);
 
        /*
         * Put data last since it is large. SPL may only load the first part
         * of the DT, so this way it can access all the above fields.
         */
-       ret = fdt_property_file(params, fdt, "data", params->datafile);
+       ret = fdt_property_file(params, fdt, FIT_DATA_PROP, params->datafile);
        if (ret)
                return ret;
        fdt_end_node(fdt);
@@ -230,14 +231,15 @@ static int fit_write_images(struct image_tool_params *params, char *fdt)
                fdt_begin_node(fdt, str);
 
                get_basename(str, sizeof(str), cont->fname);
-               fdt_property_string(fdt, "description", str);
-               ret = fdt_property_file(params, fdt, "data", cont->fname);
+               fdt_property_string(fdt, FIT_DESC_PROP, str);
+               ret = fdt_property_file(params, fdt, FIT_DATA_PROP,
+                                       cont->fname);
                if (ret)
                        return ret;
-               fdt_property_string(fdt, "type", typename);
-               fdt_property_string(fdt, "arch",
+               fdt_property_string(fdt, FIT_TYPE_PROP, typename);
+               fdt_property_string(fdt, FIT_ARCH_PROP,
                                    genimg_get_arch_short_name(params->arch));
-               fdt_property_string(fdt, "compression",
+               fdt_property_string(fdt, FIT_COMP_PROP,
                                    genimg_get_comp_short_name(IH_COMP_NONE));
                fdt_end_node(fdt);
        }
@@ -246,10 +248,12 @@ static int fit_write_images(struct image_tool_params *params, char *fdt)
        if (params->fit_ramdisk) {
                fdt_begin_node(fdt, FIT_RAMDISK_PROP "-1");
 
-               fdt_property_string(fdt, "type", FIT_RAMDISK_PROP);
-               fdt_property_string(fdt, "os", genimg_get_os_short_name(params->os));
+               fdt_property_string(fdt, FIT_TYPE_PROP, FIT_RAMDISK_PROP);
+               fdt_property_string(fdt, FIT_OS_PROP,
+                                   genimg_get_os_short_name(params->os));
 
-               ret = fdt_property_file(params, fdt, "data", params->fit_ramdisk);
+               ret = fdt_property_file(params, fdt, FIT_DATA_PROP,
+                                       params->fit_ramdisk);
                if (ret)
                        return ret;
 
@@ -278,7 +282,7 @@ static void fit_write_configs(struct image_tool_params *params, char *fdt)
        int upto;
 
        fdt_begin_node(fdt, "configurations");
-       fdt_property_string(fdt, "default", "conf-1");
+       fdt_property_string(fdt, FIT_DEFAULT_PROP, "conf-1");
 
        upto = 0;
        for (cont = params->content_head; cont; cont = cont->next) {
@@ -289,7 +293,7 @@ static void fit_write_configs(struct image_tool_params *params, char *fdt)
                fdt_begin_node(fdt, str);
 
                get_basename(str, sizeof(str), cont->fname);
-               fdt_property_string(fdt, "description", str);
+               fdt_property_string(fdt, FIT_DESC_PROP, str);
 
                typename = genimg_get_type_short_name(params->fit_image_type);
                snprintf(str, sizeof(str), "%s-1", typename);
@@ -329,7 +333,7 @@ static int fit_build_fdt(struct image_tool_params *params, char *fdt, int size)
                return ret;
        fdt_finish_reservemap(fdt);
        fdt_begin_node(fdt, "");
-       fdt_property_strf(fdt, "description",
+       fdt_property_strf(fdt, FIT_DESC_PROP,
                          "%s image with one or more FDT blobs",
                          genimg_get_type_name(params->fit_image_type));
        fdt_property_strf(fdt, "creator", "U-Boot mkimage %s", PLAIN_VERSION);
@@ -441,25 +445,26 @@ static int fit_extract_data(struct image_tool_params *params, const char *fname)
                const char *data;
                int len;
 
-               data = fdt_getprop(fdt, node, "data", &len);
+               data = fdt_getprop(fdt, node, FIT_DATA_PROP, &len);
                if (!data)
                        continue;
                memcpy(buf + buf_ptr, data, len);
                debug("Extracting data size %x\n", len);
 
-               ret = fdt_delprop(fdt, node, "data");
+               ret = fdt_delprop(fdt, node, FIT_DATA_PROP);
                if (ret) {
                        ret = -EPERM;
                        goto err_munmap;
                }
                if (params->external_offset > 0) {
                        /* An external offset positions the data absolutely. */
-                       fdt_setprop_u32(fdt, node, "data-position",
+                       fdt_setprop_u32(fdt, node, FIT_DATA_POSITION_PROP,
                                        params->external_offset + buf_ptr);
                } else {
-                       fdt_setprop_u32(fdt, node, "data-offset", buf_ptr);
+                       fdt_setprop_u32(fdt, node, FIT_DATA_OFFSET_PROP,
+                                       buf_ptr);
                }
-               fdt_setprop_u32(fdt, node, "data-size", len);
+               fdt_setprop_u32(fdt, node, FIT_DATA_SIZE_PROP, len);
 
                buf_ptr += (len + 3) & ~3;
        }