summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAgeLines
...
* | efi_loader: Move to normal debug infrastructureAlexander Graf2016-06-06-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | We introduced special "DEBUG_EFI" defines when the efi loader support was new. After giving it a bit of thought, turns out we really didn't have to - the normal #define DEBUG infrastructure works well enough for efi loader as well. So this patch switches to the common debug() and #define DEBUG way of printing debug information. Signed-off-by: Alexander Graf <agraf@suse.de>
* | efi_loader: Add exit supportAlexander Graf2016-06-06-0/+6
|/ | | | | | | | | | | Some times you may want to exit an EFI payload again, for example to default boot into a PXE installation and decide that you would rather want to boot from the local disk instead. This patch adds exit functionality to the EFI implementation, allowing EFI payloads to exit. Signed-off-by: Alexander Graf <agraf@suse.de>
* mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_dataScott Wood2016-06-03-2/+2
| | | | | | | | | These functions are part of the Linux 4.6 sync. They are being added before the main sync patch in order to make it easier to address the issue across all NAND drivers (many/most of which do not closely track their Linux counterparts) separately from other merge issues. Signed-off-by: Scott Wood <oss@buserror.net>
* nand: Embed mtd_info in struct nand_chipScott Wood2016-06-03-24/+24
| | | | | | | | | | | | nand_info[] is now an array of pointers, with the actual mtd_info instance embedded in struct nand_chip. This is in preparation for syncing the NAND code with Linux 4.6, which makes the same change to struct nand_chip. It's in a separate commit due to the large amount of changes required to accommodate the change to nand_info[]. Signed-off-by: Scott Wood <oss@buserror.net>
* mtd: nand: Remove nand_info_t typedefScott Wood2016-06-03-99/+98
| | | | | | | This typedef serves no purpose other than causing confusion with struct nand_chip. Signed-off-by: Scott Wood <oss@buserror.net>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-05-27-62/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | For odroid-c2 (arch-meson) for now disable designware eth as meson now needs to do some harder GPIO work. Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: lib/efi_loader/efi_disk.c Modified: configs/odroid-c2_defconfig
| * mmc: Drop dead mmc code for non-generic MMCSimon Glass2016-05-26-62/+0
| | | | | | | | | | | | | | All boards that use MMC define CONFIG_GENERIC_MMC now, so we can drop this old code. Signed-off-by: Simon Glass <sjg@chromium.org>
* | efi_loader: Add network access supportAlexander Graf2016-05-27-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | We can now successfully boot EFI applications from disk, but users may want to also run them from a PXE setup. This patch implements rudimentary network support, allowing a payload to send and receive network packets. With this patch, I was able to successfully run grub2 with network access inside of QEMU's -M xlnx-ep108. Signed-off-by: Alexander Graf <agraf@suse.de>
* | cmd: replace the cast of the memory access to a fixed bit type in itestKunihiko Hayashi2016-05-27-3/+3
| | | | | | | | | | | | | | | | | | | | | | This patch fixes a bug that long word(.l) memory access in 'itest' command reads the 8bytes of the actual memory on 64-bit architecture. The cast to the memory pointer should use a fixed bit type. Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* | cmd: disk: Fix unused variable warningMarek Vasut2016-05-27-1/+2
|/ | | | | | | | | | | | | | | | | | | If serial support is not compiled into U-Boot, which may be the case for some SPL builds, the following warning will be generated in disk.c: cmd/disk.c: In function 'common_diskboot': cmd/disk.c:16:6: warning: variable 'dev' set but not used [-Wunused-but-set-variable] int dev, part; ^ The warning is a result of printf() calls being optimized away, and thus the whole dev variable becomes indeed unused. Mark the variable as __maybe_unused . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* arm64: fix arm64 Linux boot image header field sizesAndre Przywara2016-05-25-3/+6
| | | | | | | | | | | | | The arm64 Linux boot protocol [1] describes the fields in the Image header as being 64-bit little endian values. So fix the endianess conversion to use 64-bit sized operations, for both image_size and text_offset. Also we use a local variable for the image_size to avoid both writing to the header and also accessing it after we actually unmapped it. Signed-off-by: Andre Przywara <andre.przywara@arm.com> [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/booting.txt
* Merge branch 'master' of git://git.denx.de/u-boot-x86Tom Rini2016-05-23-0/+202
|\
| * cmd: qfw: do not depend on x86Miao Yan2016-05-23-1/+0
| | | | | | | | | | | | | | | | | | The qfw command interface used to depend on X86, this patch removes this restriction so it can be built for sandbox for testing. For normal usage, it can only be used with CONFIG_QEMU. Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * cmd: qfw: do not require default macros when building qfw commandMiao Yan2016-05-23-0/+13
| | | | | | | | | | | | | | | | | | | | | | The qfw command interface makes use of CONFIG_LOADADDR and CONFIG_RAMDISKADDR to setup kernel. But not all boards have these macros, which causes build problem on those platforms. This patch fixes this issue. Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * cmd: qfw: rename qemu_fw_cfg.[c|h] to qfw.[c|h]Miao Yan2016-05-23-3/+3
| | | | | | | | | | | | | | Make file names consistent with CONFIG_QFW and CONFIG_CMD_QFW Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * x86: qemu: split qfw command interface and qfw coreMiao Yan2016-05-23-173/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch splits qfw command interface and qfw core function into two files, and introduces a new Kconfig option (CONFIG_QFW) for qfw core. Now when qfw command interface is enabled, it will automatically select qfw core. This patch also makes the ACPI table generation select CONFIG_QFW. Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * cmd: qfw: make fwcfg_present and fwcfg_dma_present publicMiao Yan2016-05-23-17/+20
| | | | | | | | | | | | | | | | This patch is part of the qfw refactor work. This patch makes qemu_fwcfg_present() and qemu_fwcfg_dma_present() public functions. Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * cmd: qfw: remove qemu_fwcfg_free_files()Miao Yan2016-05-23-12/+0
| | | | | | | | | | | | | | | | | | | | | | This patch is part of the qfw refactor work. The qemu_fwcfg_free_files() function is only used in error handling in ACPI table generation, let's not make this a core function and move it to the right place. Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * cmd: qfw: add API to iterate firmware listMiao Yan2016-05-23-3/+22
| | | | | | | | | | | | | | | | This patch is part of the refactor work of qfw. It adds 3 APIs to qfw core to iterate firmware list. Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * x86: qemu: Move qfw command over to cmd and add Kconfig entryTom Rini2016-05-23-0/+351
| | | | | | | | | | | | | | | | | | | | - Move the command portion of arch/x86/cpu/qemu/fw_cfg.c into cmd/qemu_fw_cfg.c - Move arch/x86/include/asm/fw_cfg.h to include/qemu_fw_cfg.h - Rename ACPI table portion to arch/x86/cpu/qemu/acpi_table.c Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-mipsTom Rini2016-05-23-0/+2
|\ \
| * | mips: Report reloc information in bdinfoTim Chick2016-05-21-0/+2
| |/ | | | | | | Signed-off-by: Tim Chick <tim.chick@mediatek.com>
* | eeprom: merge cmdline parsing of eeprom commandsNikita Kiryanov2016-05-20-64/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge the parsing of layout aware and layout unaware eeprom commands into one parsing function. With this change, layout aware commands now follow the eeprom read and eeprom write conventions of making i2c bus and i2c address parameters optional. Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
* | eeprom: use eeprom_execute_command for all eeprom functionsNikita Kiryanov2016-05-20-21/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update eeprom_execute_command() and related code to accommodate both layout aware and layout unaware functions. No functional changes. Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> [trini: Make eeprom_execute_command have ulong for i2c_addr] Signed-off-by: Tom Rini <trini@konsulko.com>
* | eeprom: refactor i2c bus and devaddr parsingNikita Kiryanov2016-05-20-26/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce parse_i2c_bus_addr() to generalize the parsing of i2c bus number and i2c device address. This is done in preparation for merging layout aware and layout unaware command parsing into one function. No functional changes. Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
* | cmd: eeprom: add support for layout aware commandsNikita Kiryanov2016-05-20-1/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the (optional) eeprom print and eeprom update commands. These commands are eeprom layout aware: * The eeprom print command prints the contents of the eeprom in a human readable way (eeprom layout fields, and data formatted to be fit for human consumption). * The eeprom update command allows user to update eeprom fields by specifying the field name, and providing the new data in a human readable format (same format as displayed by the eeprom print command). * Both commands can either auto detect the layout, or be told which layout to use. New CONFIG options: CONFIG_CMD_EEPROM_LAYOUT - enables commands. CONFIG_EEPROM_LAYOUT_HELP_STRING - tells user what layout names are supported Feature API: __weak int parse_layout_version(char *str) - override to provide your own layout name parsing __weak void __eeprom_layout_assign(struct eeprom_layout *layout, int layout_version); - override to setup the layout metadata based on the version __weak int eeprom_layout_detect(unsigned char *data) - override to provide your own algorithm for detecting layout version eeprom_field.c - contains various printing and updating functions for common types of eeprom fields. Can be used for defining custom layouts. Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
* | cmd: eeprom: add bus switching support for all i2c driversNikita Kiryanov2016-05-20-1/+1
|/ | | | | | | | | | | | | The i2c_init function is always provided when CONFIG_SYS_I2C is defined. No need to limit ourselves to just one supported I2C driver (soft_i2c). Update the #ifdef conditions to support bus switching for all I2C drivers. Cc: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
* dm: mmc: Move the device list into a separate fileSimon Glass2016-05-17-4/+4
| | | | | | | | | At present the MMC subsystem maintains its own list of MMC devices. This cannot work with driver model, which needs to maintain this itself. Move the list code into a separate 'legacy' file. The core MMC code remains, and will be shared with the driver-model implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: mmc: Use the new select_hwpart() APISimon Glass2016-05-17-3/+5
| | | | | | Avoid calling directly into the MMC code - use the new API call instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: mmc: Drop the get_dev() functionSimon Glass2016-05-17-1/+1
| | | | | | This function is implemented by the legacy block functions now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: usb: Drop the get_dev() functionSimon Glass2016-05-17-6/+10
| | | | | | This function is implemented by the legacy block functions now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: Separate the non-command code into its own fileSimon Glass2016-05-17-118/+20
| | | | | | | | | | | | | | | | At present the SATA command code includes both the command-processing code and the core SATA functions and data structures. Separate the latter into its own file, adding functions as needed to avoid the command code accessing data structures directly. With this commit: - All CONFIG option are referenced from the non-command code - The concept of a 'current SATA device' is confined to the command code This will make it easier to convert this code to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: ide: Separate the non-command code into its own fileSimon Glass2016-05-17-1276/+21
| | | | | | | | | | | | | | | | At present the IDE command code includes both the command-processing code and the core IDE functions and data structures. Separate the latter into its own file, adding functions as needed to avoid the command code accessing data structures directly. With this commit: - Most CONFIG option are referenced from the non-command code - The concept of a 'current IDE device' is confined to the command code This will make it easier to convert this code to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: scsi: Separate the non-command code into its own fileSimon Glass2016-05-17-603/+29
| | | | | | | | | | | | | | | | | At present the SCSI command code includes both the command-processing code and the core SCSI functions and data structures. Separate the latter into its own file, adding functions as needed to avoid the command code accessing data structures directly. This functions use the new legacy block functions. With this commit: - There is no CONFIG option referenced from the command code - The concept of a 'current SCSI device' is confined to the command code This will make it easier to convert this code to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: scsi: Rename CONFIG_CMD_SCSI to CONFIG_SCSISimon Glass2016-05-17-3/+3
| | | | | | | | This option currently enables both the command and the SCSI functionality. Rename the existing option to CONFIG_SCSI since most of the code relates to the feature. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: Fix code style problems in cmd/sata.cSimon Glass2016-05-17-5/+7
| | | | | | | This file has a few coding style problems. Fix these to make future updates easier. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: ide: Remove the forward declarationsSimon Glass2016-05-17-714/+682
| | | | | | | Reorder the code to avoid needing forward declarations. Fix up code style as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: ide: Correct various code style problemsSimon Glass2016-05-17-28/+29
| | | | | | Adjust common/ide.c so that it passes most checkpatch.pl checks. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: scsi: Fix up code styleSimon Glass2016-05-17-233/+226
| | | | | | Update the code style of this file so that it passes checkpatch.pl. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: scsi: Remove the forward declarationsSimon Glass2016-05-17-332/+310
| | | | | | Reorder the code to avoid needing forward declarations. Signed-off-by: Simon Glass <sjg@chromium.org>
* Fix various typos, scattered over the code.Robert P. J. Day2016-05-05-2/+2
| | | | | | | | | | | | | Spelling corrections for (among other things): * environment * override * variable * ftd (should be "fdt", for flattened device tree) * embedded * FTDI * emulation * controller
* mmc: Fix error in RPMB codeMarek Vasut2016-05-05-1/+1
| | | | | | | | | | | | | | Since we do not build any board with CONFIG_SUPPORT_EMMC_RPMB , this piece of code evaded conversion. Fix the following compiler error: cmd/mmc.c: In function 'do_mmcrpmb': cmd/mmc.c:316:32: error: 'struct blk_desc' has no member named 'part_num' original_part = mmc->block_dev.part_num; ^ Signed-off-by: Marek Vasut <marex@denx.de> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Cc: Tom Rini <trini@konsulko.com>
* i2c/eeprom: Always define I2C_RXTX_LENMario Six2016-05-03-0/+4
| | | | | | | | | | | I2C_RXTX_LEN from include/i2c.h is not defined if CONFIG_DM_I2C is enabled. This leads to a compilation error on boards that enable both CONFIG_CMD_EEPROM and CONFIG_DM_I2C. To avoid this, we define I2C_RXTX_LEN in cmd/eeprom.c if it is not already defined. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* Fix spelling of "occurred".Vagrant Cascadian2016-05-02-4/+4
| | | | | Signed-off-by: Vagrant Cascadian <vagrant@debian.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd: Kconfig: Add a Kconfig options for a few CMDDinh Nguyen2016-04-25-0/+70
| | | | | | | | | | | | | | | | | | | | | | Add the following CMD options to Kconfig: CMD_BOOTZ CMD_ASKENV CMD_GREPENV CMD_USB_MASS_STORAGE CMD_FAT CMD_MII CMD_CACHE CMD_DFU CMD_EXT2 CMD_EXT4 CMD_EXT4_WRITE CMD_FS_GENERIC CMD_MMC Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> [trini: Don't make CMD_USB_MASS_STORAGE nor CMD_DFU depend on CMD_USB] Signed-off-by: Tom Rini <trini@konsulko.com>
* configs: Re-sync almost all of cmd/KconfigTom Rini2016-04-25-1/+1
| | | | | | | | This syncs up the current cmd/Kconfig and include/configs/ files with the only exception being CMD_NAND. Due to how we have used this historically we need to take further care here when converting. Signed-off-by: Tom Rini <trini@konsulko.com>
* cmd/usb_mass_storage.c: Rework ums_init() ret logic slightlyTom Rini2016-04-20-13/+5
| | | | | | | | | | | | Previously, ret could be used uninitialized if blk_get_device_part_str() failed. Default to ret being set to -1 so that we always return an err up if we have a problem and then invert the logic on testing ums_count as when that is non-zero is the time we can return 0. Cc: John Tobias <john.tobias.ph@gmail.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2016-04-20-10/+29
|\ | | | | | | | | | | | | | | | | | | Conflicts: configs/bcm28155_ap_defconfig configs/dra72_evm_defconfig configs/dra74_evm_defconfig configs/ma5d4evk_defconfig Signed-off-by: Tom Rini <trini@konsulko.com>
| * usb: ums - expose selected partition/sJohn Tobias2016-04-20-10/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By applying this patch, it will give us some flexibility to expose a selected partition/s. e.g: 1. To expose several partitions ums 0 mmc 0:1,0:6 2. To expose the all partitions ums 0 mmc 0:0 3. To expose multiple partititions on several devices ums 0 mmc 0:1,1:6 4. It support legacy format ums 0 mmc 0 Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
* | efi_loader: Pass fdt address directly to bootefi cmdAlexander Graf2016-04-18-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bootefi cmd today fetches its device tree pointer from either the location appointed by "fdt addr" with a fallback to the U-Boot control fdt. This integration is unusual for U-Boot and diverges from the way we usually handle parameters to boot commands. So let's pass the fdt directly into the bootefi command instead and move the control fdt logic into the distro boot script. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Andreas Färber <afaerber@suse.de>