summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)Author
2017-12-08MLK-17086 bootm: Add authentication to optee imageYe Li
When IMX_OPTEE is enabled for secure boot, update bootm to authenticate the optee image and the kernel zImage before booting into optee. Signed-off-by: Ye Li <ye.li@nxp.com>
2017-11-30MLK-17044-3 booti: Add kernel image authentication for secure bootYe Li
When secure boot is enabled, add authenticate_image in booti to authenticate kernel image. Signed-off-by: Ye Li <ye.li@nxp.com>
2017-11-03cmd: spl: Fix compiling warningYork Sun
Fix warning "cast from pointer to integer of different size". Signed-off-by: York Sun <york.sun@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com> (cherry picked from commit d1f2ee7021dc4a89f43e25f289747a27da0e930f)
2017-11-03cmd: mmc: display the mode name and current bus speed in the mmc infoJean-Jacques Hiblot
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>
2017-11-03MLK-14930-1 cmd: sata: Fix sata init and stop issueYe Li
When sata stop is executed, the sata_curr_device is not reset to -1, so any following sata commands will not initialize the sata again and cause problem. Additional, in sata init implementation, the sata_curr_device should be updated, otherwise sata will be initialized again when doing other sata commands like read/write/info/part/device. Signed-off-by: Ye Li <ye.li@nxp.com>
2017-05-18MA-9375 [Android IMX] uboot: enable BCB and bootctrlzhang sanshan
* Add API to read\write MISC partition. * get the boot mode from BCB command when boot up. * get the boot up tactics from bootctrl. Change-Id: Icbba6340e10983dddc1b04804ecc012a3a3c57d0 Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
2017-04-05MLK-13130: configs: mx6qarm2: android lpddr2 pop supportAdrian Alonso
Add Android support for mx6qarm2 lpddr2 pop target Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com> (cherry picked from commit 6356f2b420f3571493755f6b3a307a66a539b60c)
2017-04-05MLK-12527-2 android: Add FSL android fastboot supportYe Li
Integrate the FSL android fastboot features into community's fastboot. 1. Use USB gadget g_dnl driver 2. Integrate the FSL SD/SATA/NAND flash operations, since the GPT and EFI partitions are not support by i.MX. 3. Add FDT support to community's android image. 4. Add a new boot command "boota" for android image boot. The boota implements to load ramdisk and fdt to their loading addresses specified in boot.img header, while bootm won't do it for android image. 5. Support the authentication of boot.img at the "load_addr" for both SD and NAND. 6. We use new configuration CONFIG_FSL_FASTBOOT for Freescale's fastboot with relevant header file "fsl_fastboot.h". While disabling the configuration, the community fastboot is used. 7. Overwrite the cmdline in boot.img by using bootargs saved in local environment. 8. Add recovery and reboot-bootloader support. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 23d63ff185929fff5e392efc853d69b606ba081a)
2017-04-05MLK-12500-1 HAB: Add kernel image authentication in image loadingYe Li
To support the trust boot chain, we integrate the authentication into the kernel image loading process. The kernel image will be verified at its load address. So when signing the kernel image, we need to use this load address which may change on different platforms. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 3c118b8d6bbe1a25ca8c8bafeb528309f16fc73d)
2017-02-12flash: complete CONFIG_SYS_NO_FLASH move with renamingMasahiro Yamada
We repeated partial moves for CONFIG_SYS_NO_FLASH, but this is not completed. Finish this work by the tool. During this move, let's rename it to CONFIG_MTD_NOR_FLASH. Actually, we have more instances of "#ifndef CONFIG_SYS_NO_FLASH" than those of "#ifdef CONFIG_SYS_NO_FLASH". Flipping the logic will make the code more readable. Besides, negative meaning symbols do not fit in obj-$(CONFIG_...) style Makefiles. This commit was created as follows: [1] Edit "default n" to "default y" in the config entry in common/Kconfig. [2] Run "tools/moveconfig.py -y -r HEAD SYS_NO_FLASH" [3] Rename the instances in defconfigs by the following: find . -path './configs/*_defconfig' | xargs sed -i \ -e '/CONFIG_SYS_NO_FLASH=y/d' \ -e 's/# CONFIG_SYS_NO_FLASH is not set/CONFIG_MTD_NOR_FLASH=y/' [4] Change the conditionals by the following: find . -name '*.[ch]' | xargs sed -i \ -e 's/ifndef CONFIG_SYS_NO_FLASH/ifdef CONFIG_MTD_NOR_FLASH/' \ -e 's/ifdef CONFIG_SYS_NO_FLASH/ifndef CONFIG_MTD_NOR_FLASH/' \ -e 's/!defined(CONFIG_SYS_NO_FLASH)/defined(CONFIG_MTD_NOR_FLASH)/' \ -e 's/defined(CONFIG_SYS_NO_FLASH)/!defined(CONFIG_MTD_NOR_FLASH)/' [5] Modify the following manually - Rename the rest of instances - Remove the description from README - Create the new Kconfig entry in drivers/mtd/Kconfig - Remove the old Kconfig entry from common/Kconfig - Remove the garbage comments from include/configs/*.h Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-02-08cmd: move CONFIG_CMD_UNZIP and CONFIG_CMD_ZIP to KconfigMasahiro Yamada
CONFIG_CMD_ZIP is not defined by any board. I am moving CONFIG_CMD_UNZIP to defconfig files except UniPhier SoC family. I am the maintainer of UniPhier platform, so I know "select CMD_UNZIP" is better for this platform. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Ryan Harkin <ryan.harkin@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
2017-02-08cmd: bootm: fix build when CONFIG_CMD_IMLS_NANDGrygorii Strashko
Now when CONFIG_CMD_IMLS_NAND is enabled the u-boot build will fail, because nand_read_skip_bad() function has been changed to accept more parameters, hence fix it. CC cmd/bootm.o cmd/bootm.c: In function 'nand_imls_legacyimage': cmd/bootm.c:390:8: error: too few arguments to function 'nand_read_skip_bad' ret = nand_read_skip_bad(mtd, off, &len, imgdata); ^ In file included from cmd/bootm.c:18:0: include/nand.h:101:5: note: declared here int nand_read_skip_bad(struct mtd_info *mtd, loff_t offset, size_t *length, ^ LD drivers/block/built-in.o Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-08cmd: rework "license" commandMasahiro Yamada
The previous commit ("add a new command to show .config contents") improves the basic infrastructure of "embed a compressed file into the U-Boot image, and print it by a command". The same pattern for the "license" command. This commit reworks the command to improve the following: [1] Improve log style Kbuild style log GZIP cmd/license_data.gz CHK cmd/license_data_gz.h UPD cmd/license_data_gz.h CHK cmd/license_data_size.h UPD cmd/license_data_size.h instead of the bare Make log: cat ./Licenses/gpl-2.0.txt | gzip -9 -c | \ tools/bin2header license_gzip > ./include/license.h [2] Collect related code into the "cmd" directory Prior to this commit, the license.h was created by tools/Makefile, placed under the "include" directory, included from cmd/license.c, and deleted by the top-level Makefile. It is not a good idea to scatter related code. [3] Drop the fixed-malloc size LICENSE_MAX Just allocate the minimum required size of buffer because we know the size of the original gpl-2.0.txt. [4] Fix more issues Terminate the buffer with zero to prevent puts() from over-running. Add "static" to do_license. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-08cmd: add a new command "config" to show .config contentsMasahiro Yamada
This feature is inspired by /proc/config.gz of Linux. In Linux, if CONFIG_IKCONFIG is enabled, the ".config" file contents are embedded in the kernel image. If CONFIG_IKCONFIG_PROC is also enabled, the ".config" contents are exposed to /proc/config.gz. Users can do "zcat /proc/config.gz" to check which config options are enabled on the running kernel image. The idea is almost the same here; if CONFIG_CMD_CONFIG is enabled, the ".config" contents are compressed and saved in the U-Boot image, then printed by the new command "config". The usage is quite simple. Enable CONFIG_CMD_CONFIG, then run > config from the command line interface. The ".config" contents will be printed on the console. This feature increases the U-Boot image size by about 4KB (this is mostly due to the gzip-compressed .config file). By default, it is enabled only for Sandbox because we do not care about the memory footprint on it. Of course, this feature is architecture agnostic, so you can enable it on any board if the image size increase is acceptable for you. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-01lib: tpm: Add command to flush resourcesMario Six
This patch adds a function to the TPM library, which allows U-Boot to flush resources, e.g. keys, from the TPM. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Stefan Roese <sr@denx.de>
2017-01-28booti: Set images.os.archScott Wood
Commit ec6617c39741adc6c549 ("armv8: Support loading 32-bit OS in AArch32 execution state") broke SMP boot by assuming that an image is 32-bit if the arch field in the spin table != IH_ARCH_DEFAULT (i.e. IH_ARCH_ARM64), even if the arch field also does not match IH_ARCH_ARM, even though nothing actually set the arch field in the spin table. Commit e2c18e40b111470f ("armv8: fsl-layerscape: SMP support for loading 32-bit OS") fixed this for bootm by setting the arch field of the spin table based on images.os.arch, but booti remaineed broken because it did not set images.os.arch. Fixes: ec6617c39741adc6c549 ("armv8: Support loading 32-bit OS in AArch32 execution state") Fixes: e2c18e40b111 ("armv8: fsl-layerscape: SMP support for loading 32-bit OS") Cc: Alison Wang <alison.wang@nxp.com> Cc: Chenhui Zhao <chenhui.zhao@nxp.com> Cc: York Sun <york.sun@nxp.com> Cc: Stuart Yoder <stuart.yoder@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-01-28cmd, disk: convert CONFIG_PARTITION_UUIDS, CMD_PART and CMD_GPTPatrick Delaunay
We convert CONFIG_PARTITION_UUIDS to Kconfig first. But in order to cleanly update all of the config files we must also update CMD_PART and CMD_GPT to also be in Kconfig in order to avoid complex logic elsewhere to update all of the config files. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-01-28disk: convert CONFIG_EFI_PARTITION to KconfigPatrick Delaunay
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
2017-01-28disk: convert CONFIG_ISO_PARTITION to KconfigPatrick Delaunay
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
2017-01-28disk: convert CONFIG_DOS_PARTITION to KconfigPatrick Delaunay
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
2017-01-26Merge git://www.denx.de/git/u-boot-marvellTom Rini
2017-01-26cmd: ubi: allow '-' to specify maximum volume sizeLadislav Michl
Currently maximum volume size can be specified only if no other arguments are used. Use '-' placeholder as volume size to allow maximum volume size to be specified together with volume id and type. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
2017-01-25arm64: mvebu: Update bubt command MMC block device accessKonstantin Porotchkin
Update the MMC block device access code in bubt command implementation according to the latest MMC driver changes. Change-Id: Ie852ceefa0b040ffe1362bdb7815fcea9b2d923b Signed-off-by: Konstantin Porotchkin <kostap@marvell.com> Cc: Stefan Roese <sr@denx.de> Cc: Nadav Haklai <nadavh@marvell.com> Cc: Neta Zur Hershkovits <neta@marvell.com> Cc: Omri Itach <omrii@marvell.com> Cc: Igal Liberman <igall@marvell.com> Cc: Haim Boot <hayim@marvell.com> Cc: Hanna Hawa <hannah@marvell.com>
2017-01-24bootz/booti: relocate ramdisk if CONFIG_SYS_BOOT_RAMDISK_HIGH setCédric Schieli
In commit c2e7e72, the ramdisk relocation code was moved from image_setup_linux to do_bootm, leaving the bootz and booti cases broken. This patch fixes both by adding the BOOTM_STATE_RAMDISK state in their call to do_bootm_states if CONFIG_SYS_BOOT_RAMDISK_HIGH is set. Signed-off-by: Cédric Schieli <cschieli@gmail.com> Reviewed-by: Rick Altherr <raltherr@google.com> Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-21status_led: Kconfig migrationUri Mashiach
Move all of the status LED feature to drivers/led/Kconfig. The LED status definitions were moved from the board configuration files to the defconfig files. TBD: Move all of the definitions in the include/status_led.h to the relevant board's defconfig files. Tested boards: CL-SOM-AM57x, CM-T335 Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
2017-01-20bootm: qnx: Disable data cache before booting QNX imageEmmanuel Vadot
Instead of disabling the data cache in the bootelf command, disabling it in the do_bootm_qnxelf function. Some ELF binary might want the cache enabled. Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
2017-01-20cmd/host: add missing \n in help textSébastien Szymanski
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2017-01-20bootm: relocate ramdisk if CONFIG_SYS_BOOT_RAMDISK_HIGH setRick Altherr
In 35fc84f, bootm was refactored so plain 'bootm' and 'bootm <subcommand>' shared a common implementation. The 'bootm ramdisk' command implementation is now part of the common implementation but not invoke by plain 'bootm' since the original implementation never did ramdisk relocation. Instead, ramdisk relocation happened in image_setup_linux() which is typically called during the OS portion of 'bootm'. On ARM, parameters to the Linux kernel can either be passed by FDT or ATAGS. When using FDT, image_setup_linux() is called which also triggers ramdisk relocation. When using ATAGS, image_setup_linux() is _not_ called because it mostly does FDT setup. Instead of calling image_setup_linux() in both FDT and ATAGS cases, include BOOTM_STATE_RAMDISK in the requested states during a plain 'bootm' if CONFIG_SYS_BOOT_RAMDISK_HIGH is set and remove the ramdisk relocation from image_setup_linux(). This causes ramdisk relocation to happen on any system where CONFIG_SYS_BOOT_RAMDISK_HIGH regardless of the OS being booted. Also remove IMAGE_ENABLE_RAMDISK_HIGH as it was only used by the now-removed code from image_setup_linux(). Signed-off-by: Rick Altherr <raltherr@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joel Stanley <joel@jms.id.au>
2017-01-19Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini
2017-01-18armv8: aarch64: Fix the warning about x1-x3 nonzero issueAlison Wang
For 64-bit kernel, there is a warning about x1-x3 nonzero in violation of boot protocol. To fix this issue, input argument 4 is added for armv8_switch_to_el2 and armv8_switch_to_el1. The input argument 4 will be set to the right value, such as zero. Signed-off-by: Alison Wang <alison.wang@nxp.com> Reviewed-by: Alexander Graf <agraf@suse.de> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Tested-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: York Sun <york.sun@nxp.com>
2017-01-17usb: storage: Show number of storage devices detected for DM_USBMichal Simek
By enabling DM_USB information about number of storage devices was lost. Get this information back simply by printing number of devices detected via BLK uclass. For example: scanning bus 0 for devices... 7 USB Device(s) found scanning usb for storage devices... 3 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-14cmd: sata: fix init command return valueGary Bisson
Since commit aa6ab905b2, sata_initialize returns -1 if init_sata or scan_sata fails. But this return value becomes the do_sata return value which is equivalent to CMD_RET_USAGE. In case one issues 'sata init' and that the hardware fails to initialize, there's no need to display the command usage. Instead the command shoud just return the CMD_RET_FAILURE value. Fixes: aa6ab905b2 (sata: fix sata command can not being executed bug) Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com> Reviewed-by: Eric Nelson <eric@nelint.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-01-14cmd/fdt: Make fdt get value endian-safe for single-cell propertiesAndreas Färber
On a Raspberry Pi 2 disagreements on cell endianness can be observed: U-Boot> fdt print /soc/gpio@7e200000 phandle phandle = <0x0000000d> U-Boot> fdt get value myvar /soc/gpio@7e200000 phandle; printenv myvar myvar=0x0D000000 Fix this by always treating the pointer as BE and converting it in fdt_value_setenv(), like its counterpart fdt_parse_prop() already does. Consistently use fdt32_t, fdt32_to_cpu() and cpu_to_fdt32(). Fixes: bc80295 ("fdt: Add get commands to fdt") Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Gerald Van Baren <gvb@unssw.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Simon Glass <sjg@chromium.org>
2017-01-13cmd: fdt: Print error message when fdt application failsStefan Agner
There are lots of reason why a FDT application might fail, the error code might give an indication. Let the error code translate in a error string so users can try to understand what went wrong. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-01-12cmd: mem: Use memcpy for 'cp' commandFabio Estevam
Simplify the 'cp' command implementation by using the memcpy() function, which brings the additional benefit of performance gain for those who have CONFIG_USE_ARCH_MEMCPY selected. Tested on a mx6qsabreauto board where a 5x gain in performance is seen when reading 10MB from the parallel NOR memory. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-01-10fpga: Use enum for bitstream command typesMichal Simek
Using enum simplify handling of different bitstream command types. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-12-27cmd: net: fix function name in commentBaruch Siach
In commit 7044c6bb6 (net: cosmetic: Clean up DHCP variables and functions) BootpCopyNetParams() was renamed to store_net_params(). Update the reference in comment. Cc: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2016-12-27cmd/Kconfig: Fix typo in CMD_MEMORY help textFabio Estevam
Fix "Memory" and "initialize" typos in the CMD_MEMORY help text. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-12-12Merge git://www.denx.de/git/u-boot-marvellTom Rini
2016-12-12arm64: mvebu: Add bubt command for flash image burnKonstantin Porotchkin
Add support for mvebu bubt command for flash image load, check and burn on boot device. Signed-off-by: Konstantin Porotchkin <kostap@marvell.com> Reviewed-by: Stefan Roese <sr@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Nadav Haklai <nadavh@marvell.com> Cc: Neta Zur Hershkovits <neta@marvell.com> Cc: Omri Itach <omrii@marvell.com> Cc: Igal Liberman <igall@marvell.com> Cc: Haim Boot <hayim@marvell.com> Cc: Hanna Hawa <hannah@marvell.com> Signed-off-by: Stefan Roese <sr@denx.de>
2016-12-09cmd: pci: add option to parse and display BAR informationYehuda Yitschak
Currently the PCI command only allows to see the BAR register values but not the size and actual base address. This little extension parses the BAR registers and displays the base, size and type of each BAR. Signed-off-by: Yehuda Yitschak <yehuday@marvell.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-03Merge branch 'master' of git://www.denx.de/git/u-boot-dmTom Rini
2016-12-03cmd: move CMD_PXE to KconfigYann E. MORIN
Currently, CMD_PXE is forcibly enabled in config_distro_defaults.h, so that general purpose distributions can rely on it being defined. This header is included, under conditions or not, by various archs or famillies of archs / SoCs. However, it is very possible that boards based on those SoCs will not have a physical ethernet connector at all, even if the have a MAC; for example, the Nanopi Neo AIR (sunxi H3) does not. It is also possible that network booting is absolutely not necessary for a device. However, it is not possible to disable the PXE command, as it is forcibly enabled and is non-configurable. But it turns out we already have a config option to build a distro-ready image, in the name of DISTRO_DEFAULTS. Move CMD_PXE out of the hard-coded config_distro_defaults.h into a Kconfig option, that gets selected by DISTRO_DEFAULTS when it is set. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Joe Hershberger <joe.hershberger@ni.com> [trini: Make it select MENU, run moveconfig.py] Signed-off-by: Tom Rini <trini@konsulko.com>
2016-12-03cmd: Convert CMD_BOOTMENUTom Rini
Also convert MENU while we're in here. Signed-off-by: Tom Rini <trini@konsulko.com>
2016-12-02cmd: crosec: Move cros_ec_decode_region helper to cmd/cros_ec.cMoritz Fischer
The cros_ec_decode_region() function is only used in combination with the crosec cmds. Move the function to the correct place. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Cc: Simon Glass <sjg@chromium.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: u-boot@lists.denx.de Acked-by: Simon Glass <sjg@chromium.org>
2016-12-02cmd/fdt: fix uncallable systemsetup commandFabien Parent
The function that is processing the 'fdt' parameters is one big if-else if. In order to be able to type command faster only the first few letter are checked to know which block of code to execute. For systemsetup, the block of code that was executed was always the wrong one and ended up in a failure. } else if (argv[1][0] == 's') { process "fdt set" command } else if (strncmp(argv[1], "sys", 3) == 0) { process "fdt systemsetup" command. } When typing "fdt systemsetup", the code that was executed was the code for "fdt set". This commit fix this issue by moving the "else if" for systemsetup before the else if for "fdt set". This allow us to keep compatibility with any script that make use of "fdt s" to set node values. Signed-off-by: Fabien Parent <fparent@baylibre.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-12-02cmd/tpm_test: Fix misleading code indentationStefan Brüns
GCC 6.2 reasonably complains about the current code: ../cmd/tpm_test.c: In function ‘do_tpmtest’: ../cmd/tpm_test.c:540:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (i = 0; i < argc; i++) ^~~ ../cmd/tpm_test.c:542:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ printf("\n------\n"); ^~~~~~ Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Simon Glass <sjg@chromium.org> Updated to remove C99 variable decl: Signed-off-by: Simon Glass <sjg@chromium.org>
2016-12-02cmd: scsi: Make private functions staticMichal Simek
Two functions should be static because they are not exported to any other file. Warnings were reported by sparse C=1. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02scsi: Change scsi_scan() to be able to return valueMichal Simek
With DM_SCSI this function will return more than one return value to cover errors. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02common: miiphyutil: Work and report phy address in hex in mdio cmdMichal Simek
It is confusing that mdio commands work and report phy id as decimal value when mii is working with hex values. For example: ZynqMP> mdio list gem: 21 - TI DP83867 <--> ethernet@ff0e0000 ZynqMP> mdio read ethernet@ff0e0000 0 Reading from bus gem PHY at address 21: 0 - 0x1140 ZynqMP> mii dump 21 0 Incorrect PHY address. Range should be 0-31 ... ZynqMP> mii dump 15 0. (1140) -- PHY control register -- (8000:0000) 0.15 = 0 reset U-Boot normally takes hex values that's why this patch is changing mdio command to handle hex instead of changing mii command to handle decimal values. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>