summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* x86: ich-spi: Move opcode registers configuration to another routineBin Meng2017-08-241-6/+16
| | | | | | | | | | | At present the ICH SPI opcode registers configuration is done in the ich_spi_remove() routine, a little bit weird but that's how current. Linux MTD driver works. This changes to move the opcode registers configuration to a separate routine ich_spi_config_opcode() which might be called by U-Boot itself as well. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
* x86: ich-spi: Don't read cached lock statusBin Meng2017-08-242-8/+23
| | | | | | | | | | | | | | | | | | | At present the ICH SPI controller driver reads the controller lock status from its register in the probe routine and saves the lock status to a member of priv. Later the driver uses the cached status from priv to judge whether the controller setting is locked and do different setup. But such logic is only valid when there is only the SPI controller driver that touches the SPI hardware. In fact the lock status change can be trigged outside the driver, eg: during the fsp_notify() call when Intel FSP is used. This changes the driver to read the lock status every time when an SPI transfer is initiated instead of reading the cached one. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
* x86: ich-spi: Remove unnecessary assignment in ich_init_controller()Bin Meng2017-08-241-1/+0
| | | | | | | There is no need to do another assignment to ich7_spi. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
* x86: ich-spi: Remove spi_write_protect_region()Bin Meng2017-08-241-50/+0
| | | | | | | This routine is not called anywhere. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
* fastboot: Ensure we treat CONFIG_FASTBOOT_BUF_ADDR as longTom Rini2017-08-221-1/+1
| | | | | | | | | Otherwise: drivers/usb/gadget/f_fastboot.c:564:32: warning: format "%lx" expects argument of type "long unsigned int", but argument 3 has type "unsigned int" [-Wformat=] Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge git://www.denx.de/git/u-boot-marvellTom Rini2017-08-211-1/+1
|\
| * ARM: mvebu: set correct mem_size for db-88f6820-amcChris Packham2017-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | The db-88f6820-amc has four chips with 2Gb density giving a total of 1GB DRAM. Update the board_topology_map to reflect the correct configuration. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
* | Merge git://git.denx.de/u-boot-usbTom Rini2017-08-2112-11/+23
|\ \
| * | doc: license: Add license header to the README.dfutftp fileLukasz Majewski2017-08-211-0/+8
| | | | | | | | | | | | Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * | fb_mmc.c: Correct blk_dread() return value checksTom Rini2017-08-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The function blk_dread will return -ENOSYS on failure or on success the number of blocks read, which must be the number asked to read (otherwise it failed somewhere). Correct this check. Cc: Lukasz Majewski <lukma@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
| * | common/fb_mmc.c: Fix warnings about castsTom Rini2017-08-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When building the flash zImage code on aarch64 we see warnings about pointer size casts. Use uintptr_t instead to correct these. Cc: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-By: Sam Protsenko <semen.protsenko@linaro.org>
| * | fastboot: avoid printing invalid dataJohn Keeping2017-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | There is no guarantee that commands are null-terminated in the USB request buffer, so limit the length of data that is printed. Signed-off-by: John Keeping <john@metanate.com> Tested-by: Steve Rae <steve.rae@raedomain.com>
| * | Fix fastboot boot addressPeter Chubb2017-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fastboot loads an image at CONFIG_FASTBOOT_BUF_ADDR, but currently tells do_bootm() to look for an image at $loadaddr. This breaks if CONFIG_FASTBOOT_BUF_ADDR is different from the current user-set loadaddr. Instead, tell do_bootm() to pick up the image where it was laoded. Signed-off-by: Peter Chubb <peter.chubb@data61.csiro.au> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Steve Rae <steve.rae@raedomain.com>
| * | usb: ehci: Convert CONFIG_USB_EHCI_PCI to KconfigBin Meng2017-08-219-5/+9
| |/ | | | | | | | | | | | | This converts CONFIG_USB_EHCI_PCI to a Kconfig option, and updates all boards that use it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* | Merge git://git.denx.de/u-boot-uniphierTom Rini2017-08-2150-1161/+57
|\ \ | |/ |/| | | | | | | | | - Fix unmet direct dependencies warning - Remove old sLD3 SoC support - Update reset data - Add dr_mode DT property to avoid warning
| * ARM: dts: uniphier: add dr_mode property to dwc3 nodeMasahiro Yamada2017-08-204-0/+7
| | | | | | | | | | | | | | Since commit 576e3cc700c5 ("usb: host: xhci-dwc3: Add dual role mode support from DT"), warning is displayed if dr_mode is not specified. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * reset: uniphier: refactor reset data and add NAND/eMMC reset linesMasahiro Yamada2017-08-201-46/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | - Merge sys_reset data of LD4, Pro4, sLD8 and Pro5 - Merge sys_reset data of LD11 and LD20 - Use primitive UNIPHIER_RESETX() macro because bit assignments for system reset will be changed for every SoC in the future - Add NAND and eMMC resets Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * Revert "ARM: uniphier: fix ROM boot mode for PH1-sLD3"Masahiro Yamada2017-08-201-5/+0
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 82d075e79fa509ffb8ecd8dd2dc216929d6e8289. Commit 82d075e79fa5 ("ARM: uniphier: fix ROM boot mode for PH1-sLD3") was a workaround for sLD3. Now the sLD3 SoC support has been removed. Revert it to allow to simplify the init code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * Revert "ARM: uniphier: move lowlevel debug init code after page table switch"Masahiro Yamada2017-08-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bcc51c1512a3deb6a9fdd37362c6dde32ad3da23. Commit bcc51c1512a3 ("ARM: uniphier: move lowlevel debug init code after page table switch") was intended to support lowlevel debug for sLD3. Now the sLD3 SoC support has been removed. Revert it to allow to enable lowlevel debug earlier. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * ARM: uniphier: remove sLD3 SoC supportMasahiro Yamada2017-08-2044-1105/+30
| | | | | | | | | | | | This SoC is too old. It is difficult to maintain any longer. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * clk: uniphier: fix unmet direct dependencies warningMasahiro Yamada2017-08-202-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit f0776a551764 ("spl: dm: Kconfig: SPL_CLK depends on SPL_DM"), the following warning is displayed: $ make uniphier_v8_defconfig warning: (ARCH_ZYNQ && ARCH_ZYNQMP && STM32F7 && CLK_UNIPHIER) selects SPL_CLK which has unmet direct dependencies (CLK && SPL_DM) While I am here, I am removing the prompt to make it user-unconfigurable option so that "select CLK_UNIPHIER" can be omitted. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | env: Replace all open-coded gd->env_valid values with ENV_ flagsSimon Glass2017-08-206-18/+18
| | | | | | | | | | Some of these were missed in the conversion. Signed-off-by: Simon Glass <sjg@chromium.org>
* | env: Allow env_load() to detect errorsSimon Glass2017-08-201-1/+1
| | | | | | | | | | | | | | Now that we have errors available in the environment driver's load() method, check the return valid. Signed-off-by: Simon Glass <sjg@chromium.org>
* | env: Correct case of no sub-init functionTom Rini2017-08-202-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the change to the environment code to remove the common init stage of pointing to the default environment and setting it as valid, combined with the change to switch gd->env_valid from 0/1/2 to an enum we now must set env_valid to one of the enum values rather than an int. And in this case, not only was setting it to an int wrong, it was now the wrong value. Finally, in the case of ENV_IS_NOWHERE we must still say that our envionrment is invalid after init for things to continue to function. Fixes: 7938822a6b75 ("env: Drop common init() functions") Tested-by: Marek Vasut <marek.vasut@gmail.com> Reported-by: Marek Vasut <marek.vasut@gmail.com> Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> --- Changes in v3: - Actually include changes for env/nowhere.c
* | Fix 'notes' typosAnatolij Gustschin2017-08-202-3/+3
| | | | | | | | | | | | s/notes/nodes Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | env: Sort selection of default choicesAndy Shevchenko2017-08-201-3/+3
| | | | | | | | | | | | It would be easier to catch out which platform is using which default. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* | arm, at91: fix taurus boardHeiko Schocher2017-08-201-0/+1
| | | | | | | | | | | | | | | | | | | | since commit: b529993e0222 "spl: add hierarchical defaults for SPL_LDSCRIPT" taurus board stopped working. Use the ldscript from arch/arm/cpu/u-boot-spl.lds (as before this patch) fixed it. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* | common/board_f.c: remove CONFIG_SYS_GENERIC_GLOBAL_DATAThomas Petazzoni2017-08-203-34/+0
| | | | | | | | | | | | | | | | | | CONFIG_SYS_GENERIC_GLOBAL_DATA is no longer used by any board or platform, so support for it can be dropped. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | ARM: hisilicon: hikey: Fix eMMC with latest ATF & U-BootPeter Griffin2017-08-201-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ATF can leave the MMC IP in a state where U-Boot mmc driver can't enumerate the eMMC. This patch provides a mmc0_reset_clk() function like we already so do sd card controller which resets the IP when entering U-Boot. With this patch applied eMMC partitions are successfully enumerated again. => mmc dev 0 switch to partitions #0, OK mmc0(part 0) is current device => mmc part Partition Map for MMC device 0 -- Partition Type: EFI Part Start LBA End LBA Name Attributes Type GUID Partition GUID 1 0x00000800 0x00000fff "vrl" attrs: 0x0000000000000000 type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 guid: 496847ab-56a1-4cd5-a1ad-47f4acf055c9 2 0x00001000 0x000017ff "vrl_backup" attrs: 0x0000000000000000 type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 guid: 61a36fc1-8efb-4899-84d8-b61642efa723 3 0x00001800 0x00001fff "mcuimage" <snip> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
* | fs/fat: Correct blk_dread() return value checkTom Rini2017-08-201-1/+1
| | | | | | | | | | | | | | | | The function blk_dread will return -ENOSYS on failure or on success the number of blocks read, which must be the number asked to read (otherwise it failed somewhere). Correct this check. Signed-off-by: Tom Rini <trini@konsulko.com>
* | spl: spl_mmc.c Correct blk_dread() return value checkTom Rini2017-08-201-1/+1
| | | | | | | | | | | | | | | | The function blk_dread will return -ENOSYS on failure or on success the number of blocks read, which must be the number asked to read (otherwise it failed somewhere). Correct this check. Signed-off-by: Tom Rini <trini@konsulko.com>
* | cmd/read.c: Fix checking blk_dread return valueTom Rini2017-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The function blk_dread will return -ENOSYS on failure or on success the number of blocks read, which must be the number asked to read (otherwise it failed somewhere). Correct this check. Reported-by: Coverity (CID: 166335) Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* | mtdparts: Fix various issues reported by CoverityTom Rini2017-08-201-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that sandbox is building cmd/mtdparts.c Coverity has looked at the code and found a number of issues. In index_partitions() it is possible that part will be NULL, so re-work the checks and debug statements to take this into account. We have a number of string buffers that we print to in the exact size of, and use string functions on, so we need to ensure they are large enough to be NULL terminated. In device_parse() it is not possible for num_partitions to be 0 (we would have hit a different error first) so remove logically dead code. Finally, in parse_mtdparts() if we have an error we need to free the memory allocated to dev. Cc: Lothar Waßmann <LW@KARO-electronics.de> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Reported-by: Coverity (CID: 166334, 166333, 166332, 166329, 166328) Signed-off-by: Tom Rini <trini@konsulko.com>
* | hash: Compile only hardware or software versions of SHA algorithmsTom Rini2017-08-201-51/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 089df18bfe9d ("lib: move hash CONFIG options to Kconfig") moved CONFIG_SHA1, CONFIG_SHA256, CONFIG_SHA_HW_ACCEL, and CONFIG_SHA_PROG_HW_ACCEL config options to Kconfig. So in the case of SPL, CONFIG_SPL_HASH_SUPPORT enables CONFIG_SHA1 and CONFIG_SHA256 which enables SHA SW library by default. But in the case of platforms with SHA HW library support, SHA SW library becomes redundant and increases size of SPL by approx 18K. Rework the code so that we have named members and only have either software or hardware versions of the algorithm, depending on the relevant config options. Update the comment around hash_algo to reflect this as well. Reported-by: Sumit Garg <sumit.garg@nxp.com> Cc: Sumit Garg <sumit.garg@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Sumit Garg <sumit.garg@nxp.com>
* | Makefile: honor PYTHON configuration properlyClément Bœsch2017-08-203-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | On some systems `python` is `python3` (for instance, Archlinux). The `PYTHON` variable can be used to point to `python2` to have a successful build. The use of `PYTHON` is currently limited in the Makefile and needs to be extended in other places: First, pylibfdt is required to be a Python 2 binding (binman imports pylibfdt and is only compatible Python 2), so its setup.py needs to be called accordingly. An alternative would be to change the libfdt setup.py shebang to python2, but the binding is actually portable. Also, it would break on system where there is no such thing as `python2`. Secondly, the libfdt import checks need to be done against Python 2 as well since the Python 2 compiled modules (in this case _libdft.so) can not be imported from Python 3. Note on the libfdt imports: "@if ! PYTHONPATH=tools $(PYTHON) -c 'import libfdt'; then..." is probably simpler than the currently sub-optimal pipe. Reviewed-by: Jonathan Gray <jsg@jsg.id.au>
* Merge git://git.denx.de/u-boot-videoTom Rini2017-08-191-1/+2
|\
| * lcd: avoid possible NULL dereferencexypron.glpk@gmx.de2017-08-191-1/+2
|/ | | | | | | | | | Do not dereference bmp before the check if it is NULL. The problem was indicated by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2017-08-185-8/+11
|\ | | | | | | | | | | | | | | EFI Fixes for 2017.09: - Fix GOP w/o display - Fix LocateHandle - Fix exit return value truncation - Fix missing EFIAPI in efi_locate_handle (for x86)
| * efi_loader: do not cast return value in EFI_EXITxypron.glpk@gmx.de2017-08-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | UEFI API functions have different return types. Some return a value of type EFI_STATUS other don't. We therefore should not cast the return value of EFI_EXIT to another type than the expression passed to EFI_EXIT. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: use EFI_PAGE_SIZE instead of 4096xypron.glpk@gmx.de2017-08-121-2/+2
| | | | | | | | | | | | | | | | We should use constant EFI_PAGE_SIZE instead of 4096 where the coding relies on 4096 being EFI_PAGE_SIZE. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: use EFI_PAGE_MASK instead of EFI_PAGE_SIZE - 1xypron.glpk@gmx.de2017-08-121-1/+1
| | | | | | | | | | | | | | We should be consistent in the way we calculate page sizes. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: GOP fix for no displayRob Clark2017-08-111-1/+1
| | | | | | | | | | | | | | | | uclass_first_device() returns 0 if there is no device, but error if there is a device that failed to probe. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: LocateHandle should return EFI_NOT_FOUND if none foundRob Clark2017-08-111-1/+4
| | | | | | | | | | | | | | | | | | | | Spotted this debugging OpenBSD's bootloader in qemu. (Wouldn't really fix anything, the problem was not having any disks, but we should probably return the correct error code.) Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: attribute EFIAPI of efi_locate handle()xypron.glpk@gmx.de2017-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | efi_locate_handle is called internally so it should not be marked as EFIAPI. The external function is efi_locate_handle_ext. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-mmcTom Rini2017-08-1867-1036/+1511
|\ \
| * | mmc: Support generic PCI SD host controllerBin Meng2017-08-181-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | This changes pci_mmc driver to use PCI_CLASS_SYSTEM_SDHCI instead of individual vendor id & device id pair to support generic PCI SD host controller. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
| * | cmd: mmc: add mmc partconf read capabilityAngelo Dureghello2017-08-173-10/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to show the EXT_CSD[179] partition_config register info, just by specifying the dev param: U-Boot> mmc partconf 0 EXT_CSD[179], PARTITION_CONFIG: BOOT_ACK: 0x0 BOOT_PARTITION_ENABLE: 0x0 PARTITION_ACCESS: 0x0 Signed-off-by: Angelo Dureghello <angelo@sysam.it> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | dm: mmc: Drop CONFIG_DM_MMC_OPSSimon Glass2017-08-1715-65/+33
| | | | | | | | | | | | | | | | | | | | | All boards which use DM_MMC have now been converted to use DM_MMC_OPS. Drop the option and good riddance. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: mmc: Correct Kconfig condition for SPL_DM_MMC_OPSSimon Glass2017-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | This should depend on SPL_DM_MMC, not SPL_DM. For it and update the only affected board's defconfig. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: imx: Move i.MX devices to use CONFIG_DM_MMC_OPSSimon Glass2017-08-1722-22/+0
| | | | | | | | | | | | | | | | | | | | | Now that the driver supports it, move these boards over to use driver model fully for MMC. Signed-off-by: Simon Glass <sjg@chromium.org>