summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Convert CONFIG_BOOTP_BOOTPATH et al to KconfigAdam Ford2018-02-231-0/+8
| | | | | | | | | | | | | | | | | | | This converts the following to Kconfig: CONFIG_BOOTP_BOOTPATH CONFIG_BOOTP_DNS CONFIG_BOOTP_GATEWAY CONFIG_BOOTP_HOSTNAME CONFIG_BOOTP_PXE CONFIG_BOOTP_SUBNETMASK CONFIG_CMDLINE_EDITING CONFIG_AUTO_COMPLETE CONFIG_SYS_LONGHELP CONFIG_SUPPORT_RAW_INITRD CONFIG_ENV_VARS_UBOOT_CONFIG Signed-off-by: Adam Ford <aford173@gmail.com> [trini: Re-run the migration] Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge git://git.denx.de/u-boot-usbTom Rini2018-02-232-4/+6
|\
| * dfu: Rename _FUNCTION_DFU to DFU_OVER_Marek Vasut2018-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | Do the following to make the symbol names less confusing. sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \ `git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u` Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Lukasz Majewski <lukma@denx.de>
| * dfu: Fix up the Kconfig messMarek Vasut2018-02-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | Clean up the screaming mess of configuration options that DFU is. It was impossible to configure DFU such that TFTP is enabled and USB is not, this patch fixes that and assures that DFU TFTP and DFU USB can be enabled separatelly and that the correct pieces of code are compiled in. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Lukasz Majewski <lukma@denx.de>
| * usb: gadget: sdp: add missing line breaksAndre Heider2018-02-211-2/+2
| | | | | | | | | | | | | | | | Cosmetic change. Signed-off-by: Andre Heider <a.heider@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Acked-by: Stefan Agner <stefan.agner@toradex.com>
* | fdt: Fixup only valid memory banksThierry Reding2018-02-231-0/+7
|/ | | | | | | | Memory banks with address 0 and size 0 are empty and should not be passed to the OS via device tree. Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* fdt: Fixup only valid memory banksThierry Reding2018-02-181-1/+7
| | | | | | | | Memory banks with address 0 and size 0 are empty and should not be passed to the OS via device tree. Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com>
* fdt: Implement weak arch_fixup_fdt()Alexey Brodkin2018-02-181-0/+5
| | | | | | | | | | | | | | | | | | | Only ARM and in some configs MIPS really implement arch_fixup_fdt(). Others just use the same boilerplate which is not good by itself, but what's worse if we try to build with disabled CONFIG_CMD_BOOTM and enabled CONFIG_OF_LIBFDT we'll hit an unknown symbol which was apparently implemented in arch/xxx/lib/bootm.c. Now with weak arch_fixup_fdt() right in image-fdt.c where it is used we get both items highlighted above fixed. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: York Sun <york.sun@nxp.com> Cc: Stefan Roese <sr@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* configs: Migrate CONFIG_SPL_FRAMEWORKTom Rini2018-02-141-1/+9
| | | | | | | | | | Migrate the option CONFIG_SPL_FRAMEWORK and make this gate most of the current set of options we have in Kconfig. We will need to have some options available for SPL and !SPL_FRAMEWORK so this is important. In a few cases we re-order existing options so that we have less escapes from the SPL_FRAMEWORK guard. Signed-off-by: Tom Rini <trini@konsulko.com>
* fix spelling of 'functions' in 2 places (was 'funtcions')Simon Goldschmidt2018-02-131-1/+1
| | | | Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
* tftp: update: Include missing cfi_flash.h headerMarek Vasut2018-02-131-0/+1
| | | | | | | | Add the missing header, otherwise CONFIG_SYS_MAX_FLASH_BANKS may be undeclared. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com>
* cmd: fitupd: Convert CONFIG_UPDATE_TFTP and co.Marek Vasut2018-02-131-0/+21
| | | | | | | Convert the CONFIG_UPDATE_TFTP and related symbols to Kconfig. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com>
* spl: fit: move fdt_record_loadable out of ARCH_FIXUP_FDT_MEMORY guardPhilipp Tomsich2018-02-131-39/+39
| | | | | | | | | | | | | | | The fdt_record_loadable()-function was wedged between other functions that were guarded by ARCH_FIXUP_FDT_MEMORY. This could lead to linker errors on some configurations. With this change, fdt_record_loadable() is moved out of the ARCH_FIXUP_FDT_MEMORY guard (plus I tried to retain alphabetical ordering for functions by placing it appropriately). References: 9f45aeb ("spl: fit: implement fdt_record_loadable") Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reported-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Michal Simek <michal.simek@xilinx.com>
* spl: eMMC/SD: Provide one __weak spl_boot_mode() functionLukasz Majewski2018-02-071-0/+11
| | | | | | | | | | | | | | | | | The goal of this patch is to clean up the code related to choosing SPL MMC boot mode. The spl_boot_mode() now is called only in spl_mmc_load_image() function, which is only compiled in if CONFIG_SPL_MMC_SUPPORT is enabled. To achieve the goal, all per mach/arch implementations eligible for unification has been replaced with one __weak implementation. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de> Acked-by: Michal Simek <michal.simek@xilinx.com> (For ZynqMP) Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* parse the second area of android imageBin Chen2018-02-071-0/+19
| | | | | | | | | | | | | | | The second area of android image was intended to put a 2nd stage bootloader but in practice were rarely used (in my knowledge). An proposal was made to the AOSP to (re)use the second area as the dtb[1], This patch itself doesn't depend on that proposal being accepted but it won't be that helpful as well if that proposal won't be accepted. But don't do any harm as well. [1] https://android-review.googlesource.com/#/c/417447/ Signed-off-by: Bin Chen <bin.chen@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* log: add category LOGC_EFIHeinrich Schuchardt2018-02-031-0/+1
| | | | | | | | | The EFI implementation does not fit into any of the existing categories. Provide LOGC_EFI so that EFI related message can be filtered. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* log: Add a way to log error-return valuesSimon Glass2018-02-031-0/+13
| | | | | | | | | | | | | | | | | | | | When functions return an error it propagates up the stack to the point where it is reported. Often the error code provides enough information about the root cause of the error that this is obvious what went wrong. However in some cases the error may be hard to trace. For example if a driver uses several devices to perform an operation, it may not be obvious which one failed. Add a log_ret() macro to help with this. This can be used to wrap any error-return value. The logging system will then output a log record when the original error is generated, making it easy to trace the call stack of the error. This macro can significantly impact code size, so its use is controlled by a Kconfig option, which is enabled for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
* log: Update log_console to honour the log formatSimon Glass2018-02-031-1/+26
| | | | | | | At present this just outputs the message. Update it to output whatever the format requests. Signed-off-by: Simon Glass <sjg@chromium.org>
* log: Add control over log formattingSimon Glass2018-02-031-0/+1
| | | | | | | | | It is useful to be able to control the output format of log records on the console. As a starting point, add definitions for controlling which elements of the log record are displayed. Use function and message as the default, since these are the most useful fields. Signed-off-by: Simon Glass <sjg@chromium.org>
* log: Add functions to convert IDs to/from namesSimon Glass2018-02-031-0/+67
| | | | | | | | | | | | | | Category and level both use an enum for their ID values. Add functions to convert these IDs to strings and vice versa. This will allow the log to output the strings instead of the (inscrutable) values. At the same time, add a new 'driver-model' category, to cover core driver-model functions and fix an incorrect value for LOGL_MAX. Tests will be added with the new 'log' subcommands. Signed-off-by: Simon Glass <sjg@chromium.org> (Updated to correct clang warnings)
* spl: include timezone in bannerKlaus Goger2018-01-291-1/+1
| | | | | | | | Include the timezone in the SPL banner so the timestamp matches with that from u-boot proper. Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* flash: Fix spelling of "ERR_TIMOUT"Mario Six2018-01-291-2/+2
| | | | | | | | | checkpatch.pl complains about the spelling of ERR_TIMOUT. Since the error is only used in a handful of files, we rename the error to ERR_TIMEOUT. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
* Merge git://git.denx.de/u-boot-rockchipTom Rini2018-01-281-1/+2
|\
| * spl: atf: pass NULL for bl32_ep pcKever Yang2018-01-281-1/+2
| | | | | | | | | | | | | | | | | | ATF use bl32_ep_info->pc to decide if thre is an available bl32, let's mark it as NULL first. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* | spl: add option to disable SPL banner outputAnatolij Gustschin2018-01-282-0/+9
| | | | | | | | | | | | | | | | | | Selecting this option will reduce SPL boot time by approx. 6 ms (e. g. with 70 bytes long banner string at 115200 baud). Signed-off-by: Anatolij Gustschin <agust@denx.de> Tested-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* | spl: use different BOARD_INIT MACRO for spl and tplKever Yang2018-01-282-1/+8
| | | | | | | | | | | | | | SPL and TPL may not always need spl_board_init() at the same time. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* | common: board_r: Fix style violationsMario Six2018-01-281-13/+14
| | | | | | | | | | | | | | Fix some style violations in the board_r file. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
* | common: board_f: Fix style violationsMario Six2018-01-281-4/+4
| | | | | | | | | | | | | | Fix some style violations in the board_f file. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
* | Initialize SHA buffer size var in passwd_abortMartin Etnestad2018-01-281-1/+1
|/ | | | | | | | | | The call to hash_block in passwd_abort fails with error ENOSPC on some systems. The reason is that the variable which specifies the size of the buffer to contain the computed hash does not get initialized. This patch initializes the variable with the size of the buffer. Signed-off-by: Martin Etnestad <martin.etnestad@appeartv.com>
* Merge branch 'master' of git://git.denx.de/u-boot-coldfireTom Rini2018-01-242-3/+2
|\
| * common/board_f.c: align m68k arch to use CONFIG_DISPLAY_CPUINFOAngelo Dureghello2018-01-232-3/+2
| | | | | | | | | | | | | | | | | | | | Change all coldfire arch files to use CONFIG_DISPLAY_CPUINFO. Signed-off-by: Angelo Dureghello <angelo@sysam.it> Reviewed-by: Tom Rini <trini@konsulko.com> --- Changes for v2: - update common/Kconfig to add M68K to the default y list
* | crypto/fsl: Fix HW accelerated hash commandsBreno Lima2018-01-231-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hash command function were not flushing the dcache before passing data to CAAM/DMA and not invalidating the dcache when getting data back. Due the data cache incoherency, HW accelerated hash commands used to fail with CAAM errors like "Invalid KEY Command". Check if pbuf and pout buffers are properly aligned to the cache line size and flush/invalidate the memory regions to address this issue. This solution is based in a previous work from Clemens Gruber in commit 598e9dccc75d ("crypto/fsl: fix BLOB encapsulation and decapsulation") Reported-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* | common: board_f: vid: Add VID specific API to adjust core voltageRajesh Bhagat2018-01-231-0/+10
|/ | | | | | | | | | | | Adds a VID specific API in init_sequence_f and spl code flow namely init_func_vid which is required to adjust core voltage. VID specific code is required in spl, hence moving flag CONFIG_VID out of spl flags. Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* board_r: remove superfluous #ifdef CONFIG_PRAMHeinrich Schuchardt2018-01-191-2/+0
| | | | | | | | | | | | initr_mem() is already enclosed by #if defined(CONFIG_PRAM) #endif So there is no need to check CONFIG_PRAM again inside the function. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* fix incorrect usage of DT node unit address in commentsAndre Przywara2018-01-152-9/+9
| | | | | | | | | | The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case. Fix all occurences in the tree where node names were mentioned in comments, to not give bad examples to the reader. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
* Merge git://git.denx.de/u-boot-mmcTom Rini2018-01-142-0/+11
|\
| * mmc: add a Kconfig option to enable the support for MMC write operationsJean-Jacques Hiblot2018-01-121-0/+9
| | | | | | | | | | | | | | | | This allows using CONFIG_IS_ENABLED(MMC_WRITE) to compile out code needed only if write support is required. The option is added for u-boot and for SPL Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * common: do not compile common fastboot code when building the SPLJean-Jacques Hiblot2018-01-121-0/+2
| | | | | | | | | | | | This is not required as fastboot can't be started from SPL. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
* | riscv: Modify generic codes to support RISC-VRick Chen2018-01-122-3/+3
|/ | | | | | | | | | Support common commands bdinfo and image format, also modify common generic flow for RISC-V. Signed-off-by: Rick Chen <rick@andestech.com> Signed-off-by: Rick Chen <rickchen36@gmail.com> Signed-off-by: Greentime Hu <green.hu@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* spl: atf: add SPL_ATF_NO_PLATFORM_PARAM optionPhilipp Tomsich2018-01-032-3/+27
| | | | | | | | | | | | | | | | | | | | While we expect to call a pointer to a valid FDT (or NULL) as the platform parameter to an ATF, some ATF versions are not U-Boot aware and have an insufficiently robust (or an overzealour) parameter validation: either way, this may cause a hard-stop with uncooperative ATF versions. This change adds the option to suppress passing a platform parameter and will always pass NULL. Debug output from ATF w/ this option disabled (i.e. default): INFO: plat_param_from_bl2: 0x291450 Debug output from ATF w/ this option enabled: INFO: plat_param_from_bl2: 0 Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* common: Fix-up MAC addr in dts by fetching env variable seriallyPrabhakar Kushwaha2017-12-241-4/+21
| | | | | | | | | | | | | | The MAC addresses get fixed in the device tree for "ethernet" nodes is by using trailing number behind "ethernet" found in "/aliases". It may not be necessary for the "ethernet" nodes to be sequential. There can be gaps in between or any node disabled So provide a support to fetch MAC addr sequentially from env and apply them to "ethernet" nodes in the order they appear in device tree only if "ethernet" is not "disabled" Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* common: image.c: Fix CACHE: Misaligned operation outputHeiko Schocher2017-12-181-1/+2
| | | | | | | | | | | | | | When booting a itb file with a Ramdisk on a imx6 based board, U-Boot drops the warning: Loading Kernel Image ... OK Loading Ramdisk to 4ecf1000, end 4ef8b11f ... \ CACHE: Misaligned operation at range [4ecf1000, 4ef8b11f] Fix it! Signed-off-by: Heiko Schocher <hs@denx.de> Tested-by: Ayoub Zaki <hs@denx.de>
* Merge tag 'xilinx-for-v2018.01-rc2-v2' of ↵Tom Rini2017-12-182-5/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://www.denx.de/git/u-boot-microblaze Xilinx changes for v2018.01-rc2-v2 fpga: - Enable loading bitstream via fit image for !xilinx platforms zynq: - Fix SPL SD boot mode zynqmp: - Not not reset in panic - Do not use simple allocator because of fat changes - Various dt chagnes - modeboot variable setup - Fix fpga loading on automotive devices - Fix coverity issues test: - Fix env test for !hush case - Stephen's patch
| * fpga: allow programming fpga from FIT image for all FPGA driversGoldschmidt Simon2017-12-142-5/+3
| | | | | | | | | | | | | | | | | | | | | | This drops the limit that fpga is only loaded from FIT images for Xilinx. This is done by moving the 'partial' check from 'common/image.c' to 'drivers/fpga/xilinx.c' (the only driver supporting partial images yet) and supplies a weak default implementation in 'drivers/fpga/fpga.c'. Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Tested-by: Michal Simek <michal.simek@xilinx.com> (On zcu102) Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | Merge git://git.denx.de/u-boot-dmTom Rini2017-12-142-6/+29
|\ \ | |/ |/|
| * binman: Add binman support to spl_ram.cSimon Glass2017-12-121-4/+15
| | | | | | | | | | | | | | | | SPL supports reading U-Boot from a RAM location. At present this is hard-coded to the U-Boot text base address. Use binman to allow this to come from the image file, if binman is used. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Add binman symbol support to SPLSimon Glass2017-12-121-2/+14
| | | | | | | | | | | | | | | | Allow SPL to access binman symbols and use this to get the address of U-Boot. This falls back to CONFIG_SYS_TEXT_BASE if the binman symbol is not available. Signed-off-by: Simon Glass <sjg@chromium.org>
* | SPL: Add FIT data-position property supportPeng Fan2017-12-122-2/+34
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | For external data, FIT has a optional property "data-position" which can set the external data to a fixed offset to FIT beginning. Add the support for this property in SPL FIT. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tomas Melin <tomas.melin@vaisala.com> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Cc: "Andrew F. Davis" <afd@ti.com> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: "tomas.melin@vaisala.com" <tomas.melin@vaisala.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Andre Przywara <andre.przywara@arm.com> Cc: York Sun <york.sun@nxp.com> Cc: Lokesh Vutla <lokeshvutla@ti.com> Cc: "Cooper Jr., Franklin" <fcooper@ti.com> Cc: George McCollister <george.mccollister@gmail.com> Cc: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Cc: Jean-Jacques Hiblot <jjhiblot@ti.com> Cc: Rick Altherr <raltherr@google.com> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: York Sun <york.sun@nxp.com>
* log: Plumb logging into the init sequenceSimon Glass2017-12-073-1/+7
| | | | | | | Set up logging both before and after relocation. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* log: Add a test commandSimon Glass2017-12-071-0/+10
| | | | | | Add a command which exercises the logging system. Signed-off-by: Simon Glass <sjg@chromium.org>