aboutsummaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)AuthorFilesLines
2019-01-15cmd: mmc: Invalidate MMC block cache after initMarek Vasut1-0/+6
Make sure the block cache is cleared for the MMC device after it was reinitialized to avoid having any stale data in the cache, like e.g. partition tables or such. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Jaehoon Chung <jh80.chung@samsung.com>
2019-01-15cmd: mmc: Force mmc reinit when no card presentMarek Vasut1-0/+3
In case the card is removed, force-init the MMC to start the internal machinery which deregisters and invalidate the MMC device. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Jaehoon Chung <jh80.chung@samsung.com>
2018-12-31fs: cbfs: Add missing standard CBFS component typesBin Meng1-0/+30
Current CBFS component type list is incomplete. Add missing ones. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-12-31fs: cbfs: Make all CBFS_TYPE_xxx macros consistentBin Meng1-2/+2
At present there are 2 macros that are named as CBFS_COMPONENT_xxx. Change them to CBFS_TYPE_xxx for consistency. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-12-15cmd: Move the "dm" command from test/dm/ to cmd/Tom Rini2-0/+89
The "dm" command under CONFIG_CMD_DM should live under cmd/ rather than test/dm/ so move it. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-12-13dm: sound: Complete migration to driver modelSimon Glass1-12/+0
All users of sound are converted to use driver model. Drop the old code and the CONFIG_DM_SOUND option. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-13dm: sound: Create a uclass for soundSimon Glass1-2/+21
The sound driver pulls together the audio codec and i2s drivers in order to actually make sounds. It supports setup() and play() methods. The sound_find_codec_i2s() function allows locating the linked codec and i2s devices. They can be referred to from uclass-private data. Add a uclass and a test for sound. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-10Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini2-0/+2
- DM_I2C_COMPAT removal for all ti platforms from Jean-Jacques Hiblot - Fix in i2c command help output from Chirstoph Muellner.
2018-12-10Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini5-10/+10
- DWC3 and UDC cleanup
2018-12-10cmd: i2c: Fix help output of i2c command.Christoph Muellner1-0/+1
In case SYS_I2C or DM_I2C are defined, then the "i2c " prefix of the "i2c crc32" command is missing. This patch addresses this, so that users can't get confused by the "crc32" command. Without the patch we get => i2c help i2c - I2C sub-system Usage: i2c bus [muxtype:muxaddr:muxchannel] - show I2C bus info crc32 chip address[.0, .1, .2] count - compute CRC32 checksum i2c dev [dev] - show or set current I2C bus [...] With the patch we get => i2c help i2c - I2C sub-system Usage: i2c bus [muxtype:muxaddr:muxchannel] - show I2C bus info i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum i2c dev [dev] - show or set current I2C bus ... Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2018-12-10cmd: Kconfig: Do not include EEPROM if DM_I2C is used without DM_I2C_COMPATJean-Jacques Hiblot1-0/+1
The implementation of the EEPROM commands does not support the DM I2C API. Prevent compilation breakage by not enabling it if the non-DM API is not available (if DM_I2C is used without DM_I2C_COMPAT) Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2018-12-07usb: gadget: Do not call board_usb_xxx() directly in USB gadget driversJean-Jacques Hiblot5-10/+10
Add 2 functions to wrap the calls to board_usb_init() and board_usb_cleanup(). This is a preparatory work for DM support for UDC drivers (DM_USB_GADGET). Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2018-12-07ensure active menuitem is inside menuFrank Wunderlich1-0/+6
Hi, setting active menuitem currently can be outside of menu which results in invisible selection attached Patch fixes this regards Frank >From 1d9c4cb8b3e2dd9b0a7a6a2d4a21684d0a099dbf Mon Sep 17 00:00:00 2001 From: Frank Wunderlich <frank-w@public-files.de> Date: Sun, 2 Dec 2018 11:23:53 +0100 Subject: [PATCH] ensure active menuitem is inside menu if active menuitem is defined via environment var it can be outside the menu (>=menuitem-count) this patch resets this definition back to 0 Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
2018-12-05Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2-18/+1
- Various MTD fixes from Boris - Zap various unused / legacy paths. - pxa3xx NAND update from Miquel Signed-off-by: Tom Rini <trini@konsulko.com>
2018-12-05Merge tag 'video-updates-for-2019.01-rc2' of git://git.denx.de/u-boot-videoTom Rini4-5/+57
video, bmp and cls command updates
2018-12-04cmd: bmp: manage centered displayPatrick Delaunay1-5/+13
Allow to display BMP at the middle of the screen. 'm' means "middle" as it is done for the splashscreen variable: splashpos=m,m Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-12-04cmd: add clear screen 'cls' commandAnatolij Gustschin3-0/+44
Add common clear screen command for configurations CONFIG_DM_VIDEO, CONFIG_LCD and CONFIG_CFB_CONSOLE. Remove the existing cls command implementation from lcd.c code and activate the command for all boards enabling CONFIG_LCD for compatibility reasons. Signed-off-by: Anatolij Gustschin <agust@denx.de> Tested-by: Patrick.Delaunay <patrick.delaunay@free.fr>
2018-12-03Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini1-108/+136
Patch queue for efi - 2018-12-03 This release is fully packed with lots of glorious improvements in UEFI land again! - Make PE images more standards compliant - Improve sandbox support - Improve correctness - Fix RISC-V execution on virt model - Honor board defined top of ram (fixes a few boards) - Imply DM USB access when distro boot is available - Code cleanups
2018-12-03eeprom: Add device model based I2C support to eeprom commandLukasz Majewski1-3/+21
After this change the 'eeprom' command can be used with DM aware boards. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-12-02efi_loader: create fdt reservation before copyHeinrich Schuchardt1-9/+3
When copying the device we must ensure that the copy does not fall into a memory area reserved by the same. So let's change the sequence: first create memory reservations and then copy the device tree. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: fix memory mapping for sandboxHeinrich Schuchardt1-12/+17
The sandbox is using a virtual address space which is neither the physical address space of the operating system nor the virtual address space in which Linux aplications live. The addresses used insided the flattened device tree use this sandbox virtual address space. The EFI subsystem uses the virtual address space of the operating system and this is where the fdt is stored. Fix all incorrect addresses for the fdt in cmd/bootefi.cmd. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: macro efi_size_in_pages()Heinrich Schuchardt1-9/+6
When allocating EFI memory pages the size in bytes has to be converted to pages. Provide a macro efi_size_in_pages() for this conversion. Use it in the EFI subsystem and correct related comments. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi: Rename bootefi_test_finish() to bootefi_run_finish()Simon Glass1-22/+24
This function can be used from do_bootefi_exec() so that we use mostly the same code for a normal EFI application and an EFI test. Rename the function and use it in both places. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi: Create a function to set up for running EFI codeSimon Glass1-21/+31
There is still duplicated code in efi_loader for tests and normal operation. Add a new bootefi_run_prepare() function which holds common code used to set up U-Boot to run EFI code. Make use of this from the existing bootefi_test_prepare() function, as well as do_bootefi_exec(). Also shorten a few variable names. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi: Split out test init/uninit into functionsSimon Glass1-21/+64
The functions in bootefi are very long because they mix high-level code and control with the low-level implementation. To help with this, create functions which handle preparing for running the test and cleaning up afterwards. Also shorten the awfully long variable names here. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi: Check for failure to create objects in selftestSimon Glass1-0/+5
At present a few error conditions are not checked. Before refactoring this code, add some basic checks. Note that this code still leaks memory in the event of error. This will be tackled after the refactor. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: carving out memory reservationsHeinrich Schuchardt1-1/+10
The "Devicetree Specification 0.2" does not prescribe that memory reservations must be EFI page aligned. So let's not make such an assumption in our code. Do not carve out the pages for the device tree. This memory area is already marked as EFI_RUNTIME_SERVICES_DATA. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: memory reservation for fdtHeinrich Schuchardt1-16/+5
In copy_fdt() we allocate EFI pages for the fdt plus extra 12 KiB as EFI_RUNTIME_SERVICES_DATA. Afterwards in efi_install_fdt() we overwrite part of this memory allocation by marking it as EFI_BOOT_SERVICES_DATA. Remove the code marking the fdt as EFI_BOOT_SERVICES_DATA. Cf. commit 17ff6f02f5ad ("efi_loader: store DT in EFI_RUNTIME_SERVICES_DATA memory") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: fix typosHeinrich Schuchardt1-1/+1
Fix typos in EFI subsystem comments. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: add efi_dp_from_name()AKASHI Takahiro1-34/+8
Factor out efi_set_bootdev() and extract efi_dp_from_name(). This function will be used to set a boot device in efishell command. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: rename parent to headerHeinrich Schuchardt1-6/+6
Rename the component parent of some EFI objects to header. This avoids misunderstandings. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: typedef struct efi_object *efi_handle_tHeinrich Schuchardt1-14/+14
All our handles point to a struct efi_object. So let's define the efi_handle_t accordingly. This helps us to discover coding errors much more easily. This becomes evident by the corrections to the usage of handles in this patch. Rename variable image_handle to image_obj where applicable. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-11-29tpm: Convert to use a device parameterSimon Glass4-189/+364
At present many TPM calls assume there is only one TPM in the system and look up this TPM themselves. This is inconsistent with driver model, which expects all driver methods to have a device parameter. Update the code to correct this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-29cmd, fdt: add subcommand "get" to fdt headerHeiko Schocher1-1/+39
store fdt header member with name <member> in U-Boot Environment variable with name <var>. for example to get the total length of the fdt and store it in filesize, call: fdt header get filesize totalsize For membernames look into fdt header definition at scripts/dtc/libfdt/libfdt.h Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-27spi: Remove unused mpc8xx codeJagan Teki1-14/+1
- spi_init_f - spi_init_r - spi_read - spi_write these spi calls are exclusively for mpc8xx, but the relevant driver is not available so remove it. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2018-11-26add default-option to bootmenuFrank Wunderlich1-0/+5
with this patch the selected Entry in bootmenu can be set by environment-var bootmenu_default=<number> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
2018-11-26spl: Add support for passing handoff info to U-Boot properSimon Glass1-1/+20
There is some basic informaton that SPL normally wants to pass through to U-Boot, such as the SDRAM size and bank information. Mkae use of the new bloblist structure for this. Add a new 'handoff' blob which is set up in SPL and passed to U-Boot proper. Also adda test for sandbox_spl that checks that this works correctly and a new 'sb' command to show the information passed from SPL. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-26sandbox: Add a new 'sb' commandSimon Glass2-0/+47
The old 'sb' command was deprecated in 2015 and replaced with 'host'. It is useful to be able to access some internal sandbox state, particularly for testing. Resurrect the old command and provide a way to print some basic state information (currently just the arguments to sandbox). Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-26sandbox: Drop the deprecated 'sb' commandSimon Glass1-5/+0
The old 'sb' command was deprecated in 2015 and replaced with 'host'. Remove the remaining users and the command, so that the name is available for other purposes. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-22cmd: ubi: Make ubi_detach() staticStefan Roese1-4/+1
Its only called from this file, so make it static. While at it, remove some occurances of multiple blank lines as well. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Boris Brezillon <boris.brezillon@bootlin.com> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-11-20cmd: fdt: Fix fdt address information after the movementHiroyuki Yokoyama1-1/+1
This patch fixes the address information of fdt. wrong case: => fdt addr 0x48000000 => fdt move 0x48000000 0x41000000 0xa000 => fdt addr The address of the fdt is 48000000 Active address in this case is 0x41000000. Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-20cmd: adc: add an option to scan some or all available channelsFabrice Gasnier1-1/+54
Add new option to 'adc' command to do a single scan of: - some channel(s), using mask argument - all channels available on an ADC device (when optional mask is omitted). Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-20cmd: adc: print single conversion also in uVFabrice Gasnier1-2/+7
Use newly introduced adc_raw_to_uV() API to print conversion result both as raw value and micro-volts by default. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-20cmd: adc: add info on channel maskFabrice Gasnier1-1/+5
Enhance adc info command to report also the channel mask. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-16cmd: pinmux: Add pinmux commandPatrice Chotard3-0/+155
pinmux command allows to : - list all pin-controllers available on platforms - select a pin-controller - display the muxing of all pins of the current pin-controller or all pin-controllers depending of given options Signed-off-by: Patrice Chotard <patrice.chotard@st.com> cmd: pinmux: Fix pinmux command if "pinmux status" command is used without having set dev using "pinmux dev", print pinmux usage Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-16cmd/bdinfo: correct output of numerical valuesHeinrich Schuchardt1-2/+2
Display all digits on 64bit systems. Currently we print only the lower 32 bits. Examples of values that can exceed 32 bits are the size and start of memory banks. For fdt_blob use the same output method as for other values. This avoids misalignment. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-11-14virtio: cmd: Add virtio command for virtio devicesTuomas Tynkkynen3-0/+46
Add 'virtio' command in U-Boot command line. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-14blk: Call part_init() in the post_probe() methodBin Meng1-9/+0
part_init() is currently called in every DM BLK driver, either in its bind() or probe() method. However we can use the BLK uclass driver's post_probe() method to do it automatically. Update all DM BLK drivers to adopt this change. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-13cmd: ubi: Remove useless call to mtdparts_init()Boris Brezillon2-6/+0
Commit c58fb2cdb3e4 ("cmd: ubi: clean the partition handling") introduced a call to mtd_probe_devices() in the ubi_attach() path and this function takes care of parsing mtdparts/mtdids and creating/registering the associated mtd partitions. The mtdparts_init() call in the ubi_detach() path is not only unnecessary but can sometimes print error messages even when things work properly (that's the case with SPI NAND devices that have not been probed with 'mtd list'), which is misleading. Remove this call to mtdparts_init() and drop the dependency on CMD_MTDPARTS. Fixes: c58fb2cdb3e4 ("cmd: ubi: clean the partition handling") Reported-by: Stefan Roese <sr@denx.de> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Tested-by: Stefan Roese <sr@denx.de> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-11-13mtd: Make {MTDIDS, MTDPARTS}_DEFAULT visible when MTD_PARTITIONS is selectedBoris Brezillon1-2/+2
gwventana configs are relying on CMD_UBI to select CMD_MTDPARTS, which is then making {MTDIDS,MTDPARTS}_DEFAULT options available. We are about to remove the 'select CMD_MTDPARTS' statement in the CMD_UBI entry, but if we do that without first making sure {MTDIDS,MTDPARTS}_DEFAULT are visible, we end up with a build failure when building gwventana configs. Address that by adding a depends on MTD_PARTITIONS to {MTDIDS,MTDPARTS}_DEFAULT which does the trick since CMD_UBI selects MTD_UBI which in turn selects MTD_PARTITIONS. We also get rid of the depends on CMD_MTD, since CMD_MTD also selects MTD_PARTITIONS. Reported-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Jagan Teki <jagan@openedev.com>