summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* yaffs2: rework yaffs_new_obj_idHeinrich Schuchardt2017-11-201-7/+6
| | | | | | | | The iterator variable of list_for_each is never NULL. if (1 || A) is always true. Use break if entry found. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* dra7x: fastboot: Increase recovery partition sizePraneeth Bajjuri2017-11-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per current android recommendation https://source.android.com/devices/architecture/kernel/modular-kernels 1. Android recovery mode should contain both SOC and ODM kernel modules in the recovery partition. 2. If a kernel module is required both in recovery and normal boot mode, the module has to be located in recovery and vendor partition seperately. 3. Kernel modules used in recovery mode should be independent of vendor and odm partition 4. Recovery image should contain atleast storage, display, keypad, battery and pmic modules. Due to these requirements, recovery image size has increased to >10MB. This patch is to increase recovery partition size for TI devices so that we dont see such flashing error log: sending 'recovery' (12560 KB)... OKAY [ 0.436s] writing 'recovery'... FAILED (remote: too large for partition) finished. total time: 0.458s Signed-off-by: Praneeth Bajjuri <praneeth@ti.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
* scripts/ld-version.sh: regular expression compile failsHeinrich Schuchardt2017-11-201-2/+5
| | | | | | | | | | | | ld --version | scripts/ld-version.sh fails with awk: scripts/ld-version.sh: line 4: regular expression compile failed (missing '(') .*) So let's refresh the script from Linux kernel v4.14-rc8. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* kconfig/symbol.c: use correct pointer type argument for sizeofHeinrich Schuchardt2017-11-201-1/+1
| | | | | | | | | sym_arr is of type struct symbol **. So in malloc we need sizeof(struct symbol *). The problem was indicated by coccinelle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* Merge git://git.denx.de/u-boot-ubiTom Rini2017-11-202-10/+5
|\
| * ubi: no NULL check needed before kmem_cache_destroyHeinrich Schuchardt2017-11-201-2/+1
| | | | | | | | | | | | | | | | kmem_cache_destroy calls free which checks for NULL. Problem was indicated by coccinelle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * ubifs: no NULL check needed before freeHeinrich Schuchardt2017-11-201-8/+4
| | | | | | | | | | | | | | kfree() calls free. free() checks if the parameter is NULL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | Merge git://git.denx.de/u-boot-i2cTom Rini2017-11-207-0/+286
|\ \
| * | odroid-c2: enable I2CBeniamino Galvani2017-11-203-0/+5
| | | | | | | | | | | | Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
| * | i2c: add Amlogic Meson driverBeniamino Galvani2017-11-204-0/+281
| |/ | | | | | | | | | | | | Add a driver for the I2C controller available on Amlogic Meson SoCs. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
* | Merge git://git.denx.de/u-boot-dmTom Rini2017-11-197-6/+135
|\ \ | |/ |/|
| * dm: core: fix member name in ofnode_union documentationBaruch Siach2017-11-171-1/+1
| | | | | | | | | | | | | | Fixes: 4984de2baaa ("dm: core: Add ofnode to represent device tree nodes") Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Simon Glass <sjg@chromium.org>
| * tpm: add more missing va_end()André Draszik2017-11-171-1/+4
| | | | | | | | | | | | | | | | While commit 36d35345b1f6 ("tpm: add missing va_end") added some missing calls to va_end(), it missed a few places. Signed-off-by: André Draszik <adraszik@tycoint.com> Acked-by: Simon Glass <sjg@chromium.org>
| * tpm: add more useful NV storage permission flagsAndré Draszik2017-11-171-0/+3
| | | | | | | | | | | | | | | | | | TPM_NV_PER_PPREAD: physical presence needed for reading TPM_NV_PER_WRITEDEFINE: persistent write lock by writing size 0 TPM_NV_PER_WRITEALL: write in one go Signed-off-by: André Draszik <adraszik@tycoint.com> Acked-by: Simon Glass <sjg@chromium.org>
| * tpm: add tpm_get_random()André Draszik2017-11-172-0/+55
| | | | | | | | | | | | | | | | | | Add a function to obtain random data from the TPM. Signed-off-by: André Draszik <adraszik@tycoint.com> Added commit message, add cast to min() Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
| * tpm: fix reading of permanent flagsAndré Draszik2017-11-161-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | The offset of the permanent flags structure is in a different place in the response compared to what the code is doing, which gives us a completely useless result. Fix by replacing hand-crafted code with generic parser infrastructure. Signed-off-by: André Draszik <adraszik@tycoint.com> Acked-by: Simon Glass <sjg@chromium.org>
| * SPL: fix printing of image nameAndré Draszik2017-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The maximum length of the name of the image is obviously not sizeof(), which is just the length of a pointer, but IH_NMLEN. fixes: 62cf11c0921a90c6bd62344f4bc069668e6c698c ("SPL: Limit image name print length") Signed-off-by: André Draszik <adraszik@tycoint.com> Acked-by: Simon Glass <sjg@chromium.org>
| * sandbox: Add clrbits/setbits macrosTom Rini2017-11-161-0/+57
| | | | | | | | | | | | | | We borrow the macros for these functions from ARM and remove references to '__raw_'. Signed-off-by: Tom Rini <trini@konsulko.com>
| * dm: core: Correct address cast in dev_read_addr_ptr()Simon Glass2017-11-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This currently causes a warning in sandbox and will not do the right thing: drivers/core/read.c: In function ‘dev_read_addr_ptr’: drivers/core/read.c:64:44: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] return (addr == FDT_ADDR_T_NONE) ? NULL : (void *)addr; Use map_sysmem() which is the correct way to convert an address to a pointer. Fixes: c131c8bca8 (dm: core: add dev_read_addr_ptr()) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
| * cmd/fdt.c align data buffer to avoid unaligned word accessBernhard Messerklinger2017-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the compiler is free to place a char array to any address in memory (in this case the stack), also to a non word aligned address the function "fdt_prop_parse" runs into troubles upon it wants to write some (fdt32_t *) to such a variable (if it has been placed to a none word aligned address). To avoid this we tell the compiler to always align this scratchpad to a word aligned address. Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at> Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Kconfig: Introduce USE_BOOTCOMMAND and migrate BOOTCOMMANDTom Rini2017-11-1760-55/+63
| | | | | | | | | | | | | | | | | | | | | | We first introduce CONFIG_USE_BOOTCOMMAND, similar to CONFIG_USE_BOOTARGS. We then migrate CONFIG_BOOTCOMMAND for most CONFIG_DISTRO_DEFAULT users. In some cases platforms have a complex scheme around this usage, and these have been defered for the moment so that platform maintainers can work on a migration plan. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
* | arm: config: fix default console only to specify the deviceDongjin Kim2017-11-176-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since CONFIG_DEFAULT_CONSOLE is already started with "console=", the console argument in CONFIG_EXTRA_ENV_SETTINGS is expanded to "console=console=ttySAC1,115200n8" and this causes the wrong console device. #define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" ... #define CONFIG_EXTRA_ENV_SETTINGS \ "console=" CONFIG_DEFAULT_CONSOLE Signed-off-by: Dongjin Kim <tobetter@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Add UART base addresses for additional UARTsLandheer-Cieslak, Ronald2017-11-172-1/+18
| | | | | | | | | | | | | | | | UARTs 1 through 5 were missing in the code - added. Also pick the default according to the configuration setting for the console index. Signed-off-by: Ronald Landheer-Cieslak <ronaldlandheercieslak@eaton.com>
* | dm: pci: change bus number register setting compliant with LinuxMinghuan Lian2017-11-173-4/+5
| | | | | | | | | | | | | | | | | | | | This patch is to change U-Boot PCI bus assignement compliant with Linux. It means each PCIe controller's bus number is 0, not the current maximum PCI bus number, when start to scan this controller. Signed-off-by: Minghuan Lian <Minghuan.Lian@nxp.com> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | nios2: 10m50: Add CPU pre-relocation in device treeGan, Yau Wai2017-11-171-0/+1
| | | | | | | | | | | | | | | | | | Tag CPU with dm-pre-reloc to enable driver before relocation. Signed-off-by: Gan, Yau Wai <yau.wai.gan@intel.com> Cc: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de>
* | omap3: omap3_logic: Move pinmuxing to header fileAdam Ford2017-11-172-332/+333
| | | | | | | | | | | | To keep the board file smaller and clean, let's move the pinmux to the header file. Signed-off-by: Adam Ford <aford173@gmail.com>
* | configs: dragonboard410c: Save environment data on eMMCJorge Ramirez-Ortiz2017-11-173-0/+10
| | | | | | | | | | | | Save the environment data at the end of the boot partition on emmc Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
* | env: Save environment at the end of an MMC partitionJorge Ramirez-Ortiz2017-11-172-4/+67
| | | | | | | | | | | | | | Allow the platform to define a partition by name at the end of which the environment data will be located. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
* | serial: nulldev: Implement "pending" function to fix tstc return "true"Wilson Lee2017-11-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In U-boot, serial_tstc was use to determine is there have a character in serial console that pending for read. If there is no "pending" function implemented in serial driver, the serial-uclass will return "true(1)" to indicate there have a character pending to read. Thus, read a character from nulldev serial will result in continuous getting -EAGAIN return which might lead system to hang. This commit is to fix a bug in nulldev serial which implement "pending" function in nulldev serial to always indicate there is no character in console that pending for read. Signed-off-by: Wilson Lee <wilson.lee@ni.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Keng Soon Cheah <keng.soon.cheah@ni.com> Cc: Chen Yee Chew <chen.yee.chew@ni.com> Cc: Bin Meng <bmeng.cn@gmail.com>
* | armv8: update gd after relocateKever Yang2017-11-171-0/+2
| | | | | | | | | | | | | | | | | | We need to update gd in assamble code after relocate, this is a fix to: adc421e arm: move gd handling outside of C code Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* | arm64: support running at addr other than linked toStephen Warren2017-11-175-9/+68
| | | | | | | | | | | | | | | | | | | | | | This is required in the case where U-Boot is typically loaded and run at a particular address, but for some reason the RAM at that location is not available, e.g. due to memory fragmentation loading other boot binaries or firmware, splitting an SMP complex between various different OSs without using e.g. the EL2 second-stage page tables to hide the memory asignments, or due to known ECC failures. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* | test/py: add timestamps to logStephen Warren2017-11-173-0/+44
| | | | | | | | | | | | | | | | | | | | | | It can be useful to record how long tests take; this can help debug slow running test systems or track changes in performance over time. Enhance the test system to record timestamps while running test: - Whenever a new log file section is started. - After U-Boot is started and communication has been established. - After each host or U-Boot command is executed. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* | clk: clk_stm32f7: fix PLL clock division factorPatrice Chotard2017-11-171-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | Fix clock division factor initialization for RCC_PLLCFGR registers. PLLR bits (bit 31-28) in RCC_PLLCFGR must not be cleared, it's a forbidden value. So update RCC_PLLCFGR using clrsetbits_le32() to set only necessary bits fields. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | mmc: arm_pl180_mmci: add .getcd callbackPatrice Chotard2017-11-172-2/+26
| | | | | | | | | | | | Add .getcd callback to check is MMC card is present Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
* | mmc: arm_pl180_mmci: add clock supportPatrice Chotard2017-11-171-2/+14
| | | | | | | | | | | | Allow to get and enable MMC related clock Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
* | mmc: arm_pl180_mmci: add bus_width DT property supportPatrice Chotard2017-11-171-0/+16
| | | | | | | | | | | | Allow to get "bus-width" property from device tree Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
* | mmc: arm_pl180_mmci: adapt driver to DM usagePatrice Chotard2017-11-173-12/+129
| | | | | | | | | | | | | | | | | | | | | | Convert this driver to driver model. This driver is also used by VEXPRESS platforms which doesn't use driver model. Tested on STM32F746 and STM32F769 platforms. Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
* | mmc: arm_pl180_mmci: update arm_pl180_mmci_init() prototypePatrice Chotard2017-11-173-7/+8
| | | | | | | | | | | | | | | | | | Update arm_pl180_mmci_init() prototype by adding struct mmc** param. This is needed before converting this driver to driver model in order to use arm_pl180_mmci_init() in driver model and in none driver model implementation Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
* | omap2: nand: Make NAND_OMAP_GPMC_PREFETCH defaultTom Rini2017-11-171-0/+1
| | | | | | | | | | | | | | | | This option provides better performance and should really always be enabled. Make this be default y. Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* | arm: amlogic: p212: Add support for Ethernet with Internal PHYNeil Armstrong2017-11-173-1/+44
| | | | | | | | | | | | | | This patch adds support for the Internal RMII Ethernet PHY on the Amlogic P212 Reference Board. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
* | arm: meson: Add supplementary ethernet registers definitionsNeil Armstrong2017-11-171-0/+3
| | | | | | | | | | | | | | On Amlogic Meson GXL/GXM, supplementary ethernet configuration registers were added to configure the internal RMII PHY interface. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
* | net: phy: Add Amlogic Meson GXL Internal PHY supportNeil Armstrong2017-11-175-0/+65
| | | | | | | | | | | | | | | | | | The Amlogic Meson GXL/GXM families embeds an internal RMII Ethernet PHY. The PHY acts as a generic PHY but needs a slight configuration right before it's configuration. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
* | lib: libfdt: wrap scripts/dtc/libfdt/* where possibleMasahiro Yamada2017-11-1710-1489/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lib/libfdt/ and scripts/dtc/libfdt have the same copies for the followings 6 files: fdt.c fdt_addresses.c fdt_empty_tree.c fdt_overlay.c fdt_strerr.c fdt_sw.c Make them a wrapper of scripts/dtc/libfdt/*. This is exactly what Linux does to sync libfdt. In order to make is possible, import <linux/libfdt.h> and <linux/libfdt_env.h> from Linux 4.14-rc5. Unfortunately, U-Boot locally modified the following 3 files: fdt_ro.c fdt_wip.c fdt_rw.c The fdt_region.c is U-Boot own file. I did not touch them in order to avoid unpredictable impact. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | linux/types.h: add typedef of uintptr_tMasahiro Yamada2017-11-171-0/+2
| | | | | | | | | | | | | | | | | | | | Add this typedef in the same place as in Linux. This is necessary to refactor libfdt inclusion. U-Boot also defines it in include/compiler.h. Of course it should not do that, but I do not want to open a can of worms. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | tools: use files from scripts/dtc/libfdt where possibleMasahiro Yamada2017-11-177-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this commit, tools/Makefile pulls all libfdt files from lib/libfdt. lib/libfdt/ and scripts/dtc/libfdt have the same copies for the followings 6 files: fdt.c fdt_addresses.c fdt_empty_tree.c fdt_overlay.c fdt_strerr.c fdt_sw.c This commit changes them to #include ones from scripts/dtc/libfdt. Unfortunately, U-Boot locally modified the following 3 files: fdt_ro.c fdt_wip.c fdt_rw.c I did not touch them in order to avoid unpredictable impact. The fdt_region.c is U-Boot own file. This is also borrowed from lib/libfdt/. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | libfdt: change libfdt_internal.h to a wrapper of scripts/dtc/libfdt/*Masahiro Yamada2017-11-171-50/+1
| | | | | | | | | | | | | | | | | | Fortunately, U-Boot did not modify libfdt_internal.h locally. Change it to a wrapper of scripts/dtc/libfdt/fdt.h, which will be periodically synced with the upstream DTC (or kernel). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | libfdt: change fdt.h to a wrapper of scripts/dtc/libfdt/*Masahiro Yamada2017-11-172-68/+1
| | | | | | | | | | | | | | | | | | Fortunately, U-Boot did not modify fdt.h locally. Change it to a wrapper of scripts/dtc/libfdt/fdt.h, which will be periodically synced with the upstream DTC (or kernel). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | pylibfdt: compile pylibfdt only when dtoc/binman is necessaryMasahiro Yamada2017-11-176-29/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, pylibfdt is always compiled if swig is installed on your machine. It is really annoying because most of targets (excepts x86, sunxi, rockchip) do not use dtoc or binman. "checkbinman" and "checkdtoc" are wrong. It is odd that the final build stage checks if we have built necessary tools. If your platform depends on dtoc/binman, you must be able to build pylibfdt. If swig is not installed, it should fail immediately. I added PYLIBFDT, DTOC, BINMAN entries to Kconfig. They should be property select:ed by platforms that need them. Kbuild will descend into scripts/dtc/pylibfdt/ only when CONFIG_PYLIBFDT is enabled. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | pylibfdt: move pylibfdt to scripts/dtc/pylibfdt and refactor makefileMasahiro Yamada2017-11-1710-38/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pylibfdt is used by dtoc (and, indirectly by binman), but there is no reason why it must be generated in the tools/ directory. Recently, U-Boot switched over to the bundled DTC, and the directory structure under scripts/dtc/ now mirrors the upstream DTC project. So, scripts/dtc/pylibfdt is the best location. I also rewrote the Makefile in a cleaner Kbuild style. The scripts from the upstream have been moved as follows: lib/libfdt/pylibfdt/setup.py -> scripts/dtc/pylibfdt/setup.py lib/libfdt/pylibfdt/libfdt.i -> scripts/dtc/pylibfdt/libfdt.i_shipped The .i_shipped is coped to .i during building because the .i must be located in the objtree when we build it out of tree. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | scripts/dtc: Update to upstream version v1.4.5-3-gb1a60033c110Masahiro Yamada2017-11-1710-335/+1642
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the following commits from upstream: b1a6003 tests: Add a test for overlays syntactic sugar 737b2df overlay: Add syntactic sugar version of overlays 497432f checks: Use proper format modifier for size_t 22a65c5 dtc: Bump version to v1.4.5 c575d80 Add fdtoverlay to .gitignore b6a6f94 fdtoverlay: Sanity check blob size 8c1eb15 pylibfdt: Use Python2 explicitly ee3d26f checks: add interrupts property check c1e7738 checks: add gpio binding properties check b3bbac0 checks: add phandle with arg property checks [ sync with Linux commit: 4201d057ea91c3d6efd2db65219bc91fae413bc2 ] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>