summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAgeFilesLines
* mmc: add a Kconfig option to enable the support for MMC write operationsJean-Jacques Hiblot2018-01-121-1/+1
| | | | | | | | 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>
* mmc: make optional the support for eMMC hardware partitioningJean-Jacques Hiblot2018-01-121-0/+4
| | | | | | | Not all boards have an eMMC and not all users have a need for this. Allow to compile it out. By default it is still included. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
* mmc: dump card and host capabilities if debug is enabledJean-Jacques Hiblot2018-01-121-0/+4
| | | | | | | | | This is a useful information while debugging the initialization process or performance issues. Also dump this information with the other mmc info if the verbose option is selected Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
* cmd: mmc: display the mode name and current bus speed in the mmc infoJean-Jacques Hiblot2018-01-121-1/+2
| | | | | | | | Display the mode name when the user execute 'mmc info'. Also instead of displaying tran_speed, display the actual bus speed. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* x86: Move commands from under arch/x86 to cmd/x86/Tom Rini2018-01-084-0/+299
| | | | | | | | | | We only need to compile and link these files when building for full U-Boot. Move them to under cmd/x86/ to make sure they aren't linked in and undiscarded due to u_boot_list_2_cmd_* being included). Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Merge git://git.denx.de/u-boot-sunxiTom Rini2017-12-191-0/+1
|\
| * fastboot: Enable flashing by default on sunxiMaxime Ripard2017-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that more and more devices are built using eMMC, providing a way to easily flash the system without too much hassle seems like a right thing to do. Since fastboot is the most deployed tool to do that these days, we can just rely on it to provide a way to flash the various components in the system (SPL, U-Boot and the system itself) easily, especially since you can upload the U-Boot hosting the fastboot "server" through FEL. Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* | log: Add a test commandSimon Glass2017-12-072-1/+8
| | | | | | | | | | | | Add a command which exercises the logging system. Signed-off-by: Simon Glass <sjg@chromium.org>
* | log: Add a 'log level' commandSimon Glass2017-12-073-0/+63
| | | | | | | | | | | | | | Add a command for adjusting the log level. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | Drop the log bufferSimon Glass2017-12-072-314/+0
| | | | | | | | | | | | | | | | This does not appear to be used by any boards. Before introducing a new log system, remove this old one. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | mtdparts: Correct use of debug()Simon Glass2017-12-071-3/+0
| | | | | | | | | | | | | | | | | | The debug() macro now evaluates its expression so does not need #ifdef protection. In fact the current code causes a warning with the new log implementation. Adjust the code to fix this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | cmd: i2c: Fix use sdram sub command with CONFIG_DM_I2CNobuhiro Iwamatsu2017-12-071-2/+12
| | | | | | | | | | | | | | | | | | sdram sub command of i2c command does not support Drivers Model. This adds Drivers Model support to sdram sub command. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
* | Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2017-12-051-12/+61
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch queue for efi - 2017-12-05 Highlights for this release: - Dynamic EFI object creation (lists instead of static arrays) - EFI selftest improvements - Minor fixes
| * | efi_loader: pass handle of loaded imageHeinrich Schuchardt2017-12-011-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handle of a loaded image is the value of the handle member of the loaded image info object and not the address of the loaded image info. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: Exit in efi_set_bootdev() upon invalid "desc"Stefan Roese2017-12-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to load an image from a non-existent USB key, U-Boot v2017.11 crashes on my x86 platform: => load usb 0:1 03000000 abc General Protection EIP: 0010:[<7b59030d>] EFLAGS: 00010286 Original EIP :[<fff4330d>] ... This used to work in v2017.09. Testing has shown, that this bug was introduced with patch 95c5553e [efi_loader: refactor boot device and loaded_image handling]. This patch now checks if a valid "desc" is returned from blk_get_dev() and only continues when "desc" is available. Resulting in this cmd output (again): => load usb 0:1 03000000 abc ** Bad device usb 0 ** Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: use bootargs as load optionsHeinrich Schuchardt2017-12-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Use environment variable bootargs used as load options for bootefi payloads. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_selftest: correctly cleanup after selftestHeinrich Schuchardt2017-12-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After executing bootefi selftest * restore GD * unlink the load image handle * return 0 or 1 and not a truncated efi_status_t. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_selftest: allow to select a single test for executionHeinrich Schuchardt2017-12-011-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Environment variable efi_selftest is passed as load options to the selftest application. It is used to select a single test to be executed. The load options are an UTF8 string. Yet I decided to keep the name propertiy of the tests as char[] to reduce code size. Special value 'list' displays a list of all available tests. Tests get an on_request property. If this property is set the tests are only executed if explicitly requested. The invocation of efi_selftest is changed to reflect that bootefi selftest with efi_selftest = 'list' will call the Exit bootservice. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_selftest: provide a dummy device pathHeinrich Schuchardt2017-12-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we pass bootefi_device_path and bootefi_image_path as device and image path without initializing them. They may carry values from previous calls to bootefi. With the patch the variables are initialized valid dummy values. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: consistently use efi_status_t in bootefiHeinrich Schuchardt2017-12-011-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Where ulong or unsigned long are used to hold an EFI status code we should consistenly use efi_status_t. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: implement SetWatchdogTimerHeinrich Schuchardt2017-12-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The watchdog is initialized with a 5 minute timeout period. It can be reset by SetWatchdogTimer. It is stopped by ExitBoottimeServices. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* | | mtd: nand: Rename nand.h into rawnand.hMasahiro Yamada2017-12-042-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This header was renamed to rawnand.h in Linux. The following is the corresponding commit in Linux. commit d4092d76a4a4e57b65910899948a83cc8646c5a5 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Fri Aug 4 17:29:10 2017 +0200 mtd: nand: Rename nand.h into rawnand.h We are planning to share more code between different NAND based devices (SPI NAND, OneNAND and raw NANDs), but before doing that we need to move the existing include/linux/mtd/nand.h file into include/linux/mtd/rawnand.h so we can later create a nand.h header containing all common structure and function prototypes. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | cmd: blk: remove unreachable codeHeinrich Schuchardt2017-11-291-2/+0
| | | | | | | | | | | | | | Remove an unreachable return statement. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | cmd: usb: ignore blk, emulation devices in usb tree/info displaySuneel Garapati2017-11-261-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usb tree/info commands iterate over all usb uclass devices recursively. Blk uclass devices based on struct blk_desc are created for mass storage device, treating them as usb uclass devices based on struct usb_device and referencing usb config interface descriptors cause crash. To fix, ignore blk and usb_emul uclass devices in usb_show_info and usb_tree_graph. Also avoid addition of preamble for blk uclass child devices, otherwise tree dump gets messed up. Signed-off-by: Suneel Garapati <suneelglinux@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Merge git://git.denx.de/u-boot-dmTom Rini2017-11-191-1/+1
|\ \ | |/ |/|
| * 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>
* | cmd: mac: Update description of helpPrabhakar Kushwaha2017-11-151-14/+14
|/ | | | | | | | Update help message for "mac" command to reflect correct descriptions and parameters. Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* Kconfig: Migrate MTDIDS_DEFAULT / MTDPARTS_DEFAULTTom Rini2017-11-051-3/+4
| | | | | | | | | | We move all instances of CONFIG_MTDIDS_DEFAULT and CONFIG_MTDPARTS_DEFAULT from the header files to the defconfig files. There's a few cases here where we need to expand upon what was in the header file. Tested-by: Adam Ford <aford173@gmail.com> #omap3_logic Signed-off-by: Tom Rini <trini@konsulko.com>
* cmd: fastboot: Enable FASTBOOT_FLASH_NAND for SUNXI_NAND devicesBenjamin Young2017-10-251-0/+10
| | | | | | | | | | Encountered an issue where fastboot can't write to NAND on a CHIP_pro, the symbol was neither present in the board's config header, nor the Kconfig, this patch puts it in the Kconfig and defaults on when SUNXI_NAND is selected. Signed-off-by: Ben Young <computermouth@crunchbangplusplus.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* cmd: gpt: solve issue for swap and rename commandPatrick Delaunay2017-10-231-6/+6
| | | | | | | | | | | | don't use prettyprint_part_size() in create_gpt_partitions_list() that avoid to align offset and size to 1 MiB and increase precision for start and size. This patch avoid the risk to change partition size and lost data during rename or swap. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Acked-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* cmd/pxe.c: Rework bootargs construction to clarify string checksTom Rini2017-10-161-9/+10
| | | | | | | | | | | | | | | | As the code currently stands, we first check that the length of the given command line, along with ip_str/mac_str along with an additional 1 for the NULL termination will fit within the buffer we have, and if not, we return an error. The way this code was originally written however left Coverity "unhappy" due to using strcat rather than strncat. Switching this to strncat however causes clang to be unhappy that we aren't enforcing the "1" portion within strncat. Rather than further re-work the code to include a "- 1" in this case as well, make the strcat code only be done within the else side of the length test. This keeps both clang and Coverity happy. Fixes: 48ee0a87bc46 ("cmd/pxe.c: Rework initrd and bootargs handling slightly") Signed-off-by: Tom Rini <trini@konsulko.com>
* Drop CONFIG_HAS_DATAFLASHTuomas Tynkkynen2017-10-162-128/+11
| | | | | | | | Last user of this option went away in commit: fdc7718999 ("board: usb_a9263: Update to support DT and DM") Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* env: Drop CONFIG_ENV_IS_IN_DATAFLASHTuomas Tynkkynen2017-10-161-2/+1
| | | | | | | | Last user of this option went away in commit: fdc7718999 ("board: usb_a9263: Update to support DT and DM") Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2017-10-131-0/+23
|\ | | | | | | | | | | | | | | | | | | | | Patch queue for efi - 2017-10-13 This is the second batch of amazing improvements for efi_loader in 2017.11: - New self tests to verify our own code - A few bug fixes - colored text support - event and SNP improvements, should get us close to iPXE working
| * efi_loader: Add mem-mapped for fallbackRob Clark2017-10-121-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | When we don't have a real device/image path, such as 'bootefi hello', construct a mem-mapped device-path. This fixes 'bootefi hello' after devicepath refactoring. Fixes: 95c5553ea2 ("efi_loader: refactor boot device and loaded_image handling") Signed-off-by: Rob Clark <robdclark@gmail.com> Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* | Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini2017-10-121-0/+2
|\ \
| * | cmd: spl: fix compiling error when CONFIG_CMD_SPL_WRITE_SIZE not definedYork Sun2017-10-091-0/+2
| |/ | | | | | | | | | | | | | | | | CONFIG_CMD_SPL_WRITE_SIZE is used for writing parameters to non-volatile storage. So far it is only used for NAND. Fix compiling error when this macro is not used for SD. Signed-off-by: York Sun <york.sun@nxp.com> CC: Anatolij Gustschin <agust@denx.de>
* | cmd: Toggle the default value of CONFIG_CMD_IMLSTuomas Tynkkynen2017-10-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Having this as a 'default y' is rather annoying because it doesn't actually compile unless other options are defined in the board header: ../cmd/bootm.c: In function 'do_imls_nor': ../cmd/bootm.c:330:7: error: 'CONFIG_SYS_MAX_FLASH_BANKS' undeclared (first use in this function); did you mean 'CONFIG_SYS_MAX_FLASH_SECT'? i < CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) { Make it 'default n' so people who develop new boards that start from a blank defconfig have one less compilation failure to debug. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* | cmd: Make CMD_LZMA / CMD_UNZIP default y if CMD_BOOTITom Rini2017-10-081-0/+2
| | | | | | | | | | | | | | | | | | | | In the Linux Kernel on ARM64, the Image.COMPRESSION file is not self-extracting in the way that x86 and ARM images are. So when CMD_BOOTI is enabled we should also default to enabling CMD_UNZIP and CONFIG_LZMA in order for the user to be able to decompress many of the common compressions that will be done to an Image file. Signed-off-by: Tom Rini <trini@konsulko.com>
* | scripts: Move Kconfig contents to cmd/KconfigSam Protsenko2017-10-081-0/+3
| | | | | | | | | | | | | | | | | | On case-insensitive file systems we have collision between scripts/kconfig/ directory and scripts/Kconfig file. This patch moves scripts/Kcofnig contents to cmd/Kconfig to fix that. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | cmd/gpt.c, cmd/nvedit.c, tools/fit_image.c: Rework recent fixes for CoverityTom Rini2017-10-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent changes to these files did not completely fix the previous issues, or introduced different (minor) issues. In cmd/gpt.c we need to dereference str_disk_guid to be sure that malloc worked. In cmd/nvedit.c we need to be careful that we can also fit in that leading space when adding to the string. And in tools/fit_image.c we need to re-work the error handling slightly in fit_import_data() so that we only call munmap() once. We have two error paths here, one where we have an fd to close and one where we do not. Adjust labels to match this. Reported-by: Coverity (CID: 167366, 167367, 167370) Signed-off-by: Tom Rini <trini@konsulko.com>
* | cmd/time.c: Initialize 'repeatable' variableTom Rini2017-10-061-1/+1
| | | | | | | | | | | | | | We cannot leave this uninitialized, set it to 0. Reported-by: Coverity (CID: 144426) Signed-off-by: Tom Rini <trini@konsulko.com>
* | cmd/pxe.c: Rework initrd and bootargs handling slightlyTom Rini2017-10-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the initrd portion of handling our bootm arguments we do not have a sufficiently long enough buffer for some improbable 64bit cases. Expand this buffer to allow for a 64bit address and almost 256MB initrd to be used. Make use of strncpy/strncat when constructing the values here since we know what the worst case valid values are, length wise. Similarly for bootargs themselves, we need to make use of strlen/sizeof and strncpy/strncat to ensure that we don't overflow bootargs itself. Cc: Simon Glass <sjg@chromium.org> Cc: Alexander Graf <agraf@suse.de> Reported-by: Coverity (CID: 131256) Signed-off-by: Tom Rini <trini@konsulko.com>
* | cmd/nvedit.c: Update input handling to cover overflow casesTom Rini2017-10-061-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | When we have multiple messages provided, we need to be sure that we do not exceed the length of our 'message' buffer. In the for loop, make sure that pos is not larger than message. Only copy in at most however much of the message buffer remains. Finally, if we have not reached the end of the message buffer, put in a space and NULL, and if we have, ensure the buffer is now NULL termined. Reported-by: Coverity (CID: 165116) Signed-off-by: Tom Rini <trini@konsulko.com>
* | GPT: fix memory leaks identified by CoverityAlison Chaiken2017-10-061-18/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a common exit for most of the error handling code in do_rename_gpt_parts. Delete the list elements in disk_partitions before calling INIT_LIST_HEAD from get_gpt_info() a second time. The SIZEOF_MISMATCH error is not addressed, since that problem was already fixed by "GPT: incomplete initialization in allocate_disk_part". Signed-off-by: Alison Chaiken <alison@peloton-tech.com> Reported-by: Coverity (CID: 167222, 167235, 167237) Reviewed-by: Tom Rini <trini@konsulko.com>
* | Merge git://git.denx.de/u-boot-sunxiTom Rini2017-10-052-0/+14
|\ \
| * | sunxi: Remove the MMC index hackMaxime Ripard2017-10-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code, if there's both an eMMC and an MMC slot available on the board, will swap the MMC indices based on whether we booted from the eMMC or the MMC. This way, the MMC we're supposed to boot on will always have the index 0. However, this causes various issues, for example when using other components that base their behaviour on the MMC index, such as fastboot. Let's remove that hack, and take the opposite approach. The MMC will always have the same index, but the bootcmd will pick the same device than the one we booted from. This is done through the introduction of the mmc_bootdev environment variable that will be filled by the board code based on the boot device informations we can get from the SoC. In order to not introduce regressions, we also need to adjust the fastboot MMC device and the environment device in order to set it to the eMMC, over the MMC, like it used to be the case. Tested-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
| * | cmd: Move CONFIG_RANDOM_UUID to KconfigMaxime Ripard2017-10-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_RANDOM_UUID is used by the GPT command to generate random UUID when none are provided. Move that option to Kconfig. Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jagan@openedev.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
| * | cmd: fastboot: Rework fastboot dependencyMaxime Ripard2017-10-031-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | Fastboot need a bunch of options to be operating properly, such as the g_dnl gadget, the fastboot command, and some options that make sense. Since fastboot is now part of Kconfig, make sure we have them right. That will also reduce the boilerplate in the defconfigs. Reviewed-by: Ɓukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* | treewide: replace with error() with pr_err()Masahiro Yamada2017-10-047-16/+16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot widely uses error() as a bit noisier variant of printf(). This macro causes name conflict with the following line in include/linux/compiler-gcc.h: # define __compiletime_error(message) __attribute__((error(message))) This prevents us from using __compiletime_error(), and makes it difficult to fully sync BUILD_BUG macros with Linux. (Notice Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().) Let's convert error() into now treewide-available pr_err(). Done with the help of Coccinelle, excluing tools/ directory. The semantic patch I used is as follows: // <smpl> @@@@ -error +pr_err (...) // </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Re-run Coccinelle] Signed-off-by: Tom Rini <trini@konsulko.com>