Commit Graph

803 Commits

Author SHA1 Message Date
Heinrich Schuchardt
c3772ca1e3 efi_loader: macro efi_size_in_pages()
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-02 21:59:37 +01:00
Simon Glass
5e2f039107 efi: Rename bootefi_test_finish() to bootefi_run_finish()
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-02 21:59:37 +01:00
Simon Glass
f4f0f7cb6e efi: Create a function to set up for running EFI code
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-02 21:59:37 +01:00
Simon Glass
d9717eae31 efi: Split out test init/uninit into functions
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-02 21:59:37 +01:00
Simon Glass
2ab7ef74cd efi: Check for failure to create objects in selftest
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-02 21:59:37 +01:00
Heinrich Schuchardt
23fd84b3ec efi_loader: carving out memory reservations
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-02 21:59:37 +01:00
Heinrich Schuchardt
4574d1b3d1 efi_loader: memory reservation for fdt
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 17ff6f02f5 ("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-02 21:59:37 +01:00
Heinrich Schuchardt
e1fec152fe efi_loader: fix typos
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-02 21:59:37 +01:00
AKASHI Takahiro
f1589ffb33 efi_loader: add efi_dp_from_name()
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-02 21:59:36 +01:00
Heinrich Schuchardt
d39646a38b efi_loader: rename parent to header
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-02 21:59:36 +01:00
Heinrich Schuchardt
faea104105 efi_loader: typedef struct efi_object *efi_handle_t
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-12-02 21:59:36 +01:00
Simon Glass
abdc7b8a2d tpm: Convert to use a device parameter
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-29 09:30:06 -07:00
Heiko Schocher
8244127db9 cmd, fdt: add subcommand "get" to fdt header
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-29 09:30:05 -07:00
Frank Wunderlich
f7bb20a53e add default-option to bootmenu
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-26 16:29:49 -05:00
Simon Glass
b0edea3c27 spl: Add support for passing handoff info to U-Boot proper
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-26 08:25:37 -05:00
Simon Glass
d66ddafaf9 sandbox: Add a new 'sb' command
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-26 08:25:36 -05:00
Simon Glass
6d07d63d2f sandbox: Drop the deprecated 'sb' command
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-26 08:25:35 -05:00
Hiroyuki Yokoyama
b1a7e79949 cmd: fdt: Fix fdt address information after the movement
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-20 19:14:22 -07:00
Fabrice Gasnier
61927d286d cmd: adc: add an option to scan some or all available channels
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-20 12:35:34 -05:00
Fabrice Gasnier
c56fc49a60 cmd: adc: print single conversion also in uV
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-20 12:35:34 -05:00
Fabrice Gasnier
1c84d904a5 cmd: adc: add info on channel mask
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-20 12:35:34 -05:00
Patrice Chotard
d5a8313905 cmd: pinmux: Add pinmux command
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-16 16:51:56 -05:00
Heinrich Schuchardt
95187bb7cb cmd/bdinfo: correct output of numerical values
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-16 13:34:34 -05:00
Tuomas Tynkkynen
78e12901f3 virtio: cmd: Add virtio command for virtio devices
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-14 09:16:27 -08:00
Bin Meng
d0851c8937 blk: Call part_init() in the post_probe() method
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-14 09:16:27 -08:00
Boris Brezillon
86dfa556d9 cmd: ubi: Remove useless call to mtdparts_init()
Commit c58fb2cdb3 ("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: c58fb2cdb3 ("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-13 18:53:10 +05:30
Boris Brezillon
03303fb715 mtd: Make {MTDIDS, MTDPARTS}_DEFAULT visible when MTD_PARTITIONS is selected
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>
2018-11-13 18:53:10 +05:30
Patrick Delaunay
be6eb23931 cmd: remove CONFIG_SOURCE support in Makefile
This line is no more needed and can be removed.

Only CONFIG_CMD_SOURCE is defined in Kconfig and
used in defconfig files.

CONFIG_SOURCE if not defined in source code and
"config SOURCE" is not present in any Kconfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-11-01 10:02:43 -04:00
Keerthy
1a25d9071b cmd: remoteproc: Fix the base of strtoul for ID conversion from 3 to 10
Currently the base is 3 fix it 10 so that IDs follow decimal system.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvulta@ti.com>
2018-11-01 10:02:43 -04:00
Hector Palacios
fb265a74cf cmd: mii: don't check address for 'device' subcommand
All mii operations require a valid PHY address except the 'device'
command, which expects the PHY name rather than the address.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-10-24 14:45:36 -05:00
Tom Rini
e3beca3a2f Patch queue for efi - 2018-10-17
A few bug fixes for the 2018.11 release:
 
   - Fix block seeking on 32bit
   - Fix execution with DEBUG set
   - Fix a few Coverity found bugs
   - Fix warnings
 
 Heinrich Schuchardt (13):
       efi_loader: fix relocation on x86_64
       efi_loader: correct signature of GetPosition, SetPosition
       efi_loader: execute efi_save_gd() first
       efi_loader: efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, ...)
       efi_loader: error handling in read_console()
       efi_loader: return type efi_console_register()
       efi_loader: superfluous statement in is_dir()
       efi_loader: memory leak in efi_set_variable()
       efi_loader: remove lcd.h from efi_net.c
       arm: do not include efi_loader.h twice
       efi_loader: fix typo in efi_boottime.c
       efi_selftest: creating new handle in controller test
       efi_loader: efi_dp_get_next_instance() superfluous statement
 
 Tom Rini (2):
       efi_loader: Fix warning in efi_load_image()
       fs: fat: Fix warning in normalize_longname()
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJbxuNeAAoJECszeR4D/txgI0gP/j26hOIDGYqrzm043Y8eA21b
 +R5TkqgvrNF8eu0Zfgl2Wf9WqqYuTDaNVFbyOQDmppb9brhqeKtsimBNFJhWNa42
 5hoEh8lWuOU3rTpvF2PQikNMwTjtVuOyf09UdBrmCYf2QB5s3UznyKLqzKTSvqYS
 zmwptfgpCIPhXfAxfPb9UmVpFrmnTaVuDDOmtDlSW8PdggI8EEASS7KTYRR1oJ3w
 nBybxnyCIJY71t7Rttf5zjDvr2avXzliEUe5PaWekjKab5IUr2V6C2Eeq+zWfKn4
 xTYXdzpcVpJKJ+PMWFot0gr46SizqwytWC0vYmlKjXT8ZJvkxhFkdFPSwJa+ihZC
 WKDQwF20VZBL46HOPJ1AvEp8G3weMGONgyYoiy8uyHXkxYxKDGAs8qBo2qM+vZEb
 dg/DBk5u9z+deJQn3SW7QwF8AuIWLhpXrXQRQ35ZhGwJck9I34Bxdm/s667J0J57
 fEU6s4r41ZT7X4V9CEjSRh5UTv1N3acA0Y5GUMUpEf4zrocRn1XpOMZRVF9s0lqs
 gZJdZ44hSRn0RxrzdyUim239nEU2iPZoCB3xggSBCyUxPtZJnOIKkTEtXGs4KEW3
 Cvuc4EXS6jfIhqInuAEThFTk/rhHLpbfXd4fGA6cN/Q18Ad0txSqEs09lNXilrgq
 VW7JkaqIsvSjwkuPgO0B
 =CIpq
 -----END PGP SIGNATURE-----

Merge tag 'signed-efi-2018.11' of git://github.com/agraf/u-boot

Patch queue for efi - 2018-10-17

A few bug fixes for the 2018.11 release:

  - Fix block seeking on 32bit
  - Fix execution with DEBUG set
  - Fix a few Coverity found bugs
  - Fix warnings

Heinrich Schuchardt (13):
      efi_loader: fix relocation on x86_64
      efi_loader: correct signature of GetPosition, SetPosition
      efi_loader: execute efi_save_gd() first
      efi_loader: efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, ...)
      efi_loader: error handling in read_console()
      efi_loader: return type efi_console_register()
      efi_loader: superfluous statement in is_dir()
      efi_loader: memory leak in efi_set_variable()
      efi_loader: remove lcd.h from efi_net.c
      arm: do not include efi_loader.h twice
      efi_loader: fix typo in efi_boottime.c
      efi_selftest: creating new handle in controller test
      efi_loader: efi_dp_get_next_instance() superfluous statement

Tom Rini (2):
      efi_loader: Fix warning in efi_load_image()
      fs: fat: Fix warning in normalize_longname()
2018-10-17 07:20:52 -04:00
Michal Simek
b92055064e cmd: kgdb: Enable kgdb only for PPC
Only PPC supports this option that's why there should be proper
dependency setup via Kconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-10-16 16:53:25 +02:00
Heinrich Schuchardt
1e1e1c27c5 efi_loader: execute efi_save_gd() first
If DEBUG is defined we may be calling EFI_CALL already during the
initialization of the EFI subsystem. We must make sure efi_save_gd() has
already been called at that moment.

Anyway it is better to have this call in one location instead of three.

This fixes an illegal memory access occurring since 4e6b5d6503
("efi_loader: create root node") with DEBUG = 1.

Fixes: 4e6b5d6503 ("efi_loader: create root node")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2018-10-16 15:53:15 +02:00
Tom Rini
3d5ced9e22 Test improvements to tidy up output and drop duplicate tests
Sandbox SPL/TPL support
 Various dm-related improvements
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAlu9RL4RHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreYd8gf+NYAGhpiEZZ5vc3DB4Xdn2okgakbbg0QQ
 /b0Lr9xQsKgZthK0rvPlH2dXxf+ViAm1iHTy8KBCFi0SHNder48Zui9uTrX0NRq8
 pLZGyJPXPYbiyc4pQTEJpTth4iShcphRVio0no4sLpNQqO4aQrialSLa9fnwd9Ra
 1l9mF91aaYw6cG+/ejg3UR1LfsDdQ5bjubt0Fw0wGX9UvQOAz5gz5+a17wrz6+Gx
 L0gzvyfbuLUhbWB36DXikrL14DAFys2uV9aHJ5zEd53l+F7ZHWsupCO0OtN66cV7
 KpPKoYG7vhLqBXKpyrW20T+BPeSyDKmDQE6wbpECmEDOvKzvW67O/w==
 =Bfjm
 -----END PGP SIGNATURE-----

Merge tag 'dm-9oct18' of git://git.denx.de/u-boot-dm

Test improvements to tidy up output and drop duplicate tests
Sandbox SPL/TPL support
Various dm-related improvements
2018-10-10 13:35:17 -04:00
Nicholas Faustini
2c76d311a4 fdt: add call to ft_board_setup_ex() for ks2 boards
When updating the board FDT, some of the operations
are performed by ft_board_setup_ex() and should be
executed also by the fdt command.

Signed-off-by: Nicholas Faustini <nicholas.faustini@azcomtech.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2018-10-10 13:32:41 -04:00
Simon Glass
a12ef7e26a cros_ec: Update cros_ec_read_hash() to specify the image
Allow selection of which EC image to hash.

Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-09 04:40:27 -06:00
Simon Glass
590cee8315 x86: Update mtrr functions to allow leaving cache alone
At present the mtrr functions disable the cache before making changes and
enable it again afterwards. This is fine in U-Boot, but does not work if
running in CAR (such as we are in SPL).

Update the functions so that the caller can request that caches be left
alone.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2018-10-09 04:40:27 -06:00
Simon Glass
6f1c0430e8 cros: Update ec_commands to latest version
This file has changed quite a bit in the last 5 years as the capabilities
of the ECs have grown. Sync it up with the copy in coreboot commit
b9141f2215.

The only change is the addition of EC_VBNV_BLOCK_SIZE_V2. This is needed
because U-Boot uses the new v2 vboot API and this is not currently fully
supported by Chromium OS firmware.

Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-09 04:40:27 -06:00
Simon Glass
6e64ec1256 tpm: Add a few new commands for v1
These are needed for the 2018 version of Chromium OS vboot. Add an
implementation for TPM v1, with v2 to come later.

Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-09 04:40:27 -06:00
Simon Glass
6322a7b63f cros: Update cros_ec code to use struct udevice
At present we pass around a private pointer to specify the cros_ec device.
With driver model it makes more sense to pass the device. Update the code
to do this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-09 04:40:27 -06:00
Patrick Delaunay
2023000aed cmd: pxe: add support for FIT config selection
Add a way in configuration files (exlinux.conf for sysboot command)
to select a specific FIT configuration. The configuration is selected
with a string added after the FIT filename in the label "KERNEL" or
"LINUX", using the same format than bootm command:

KERNEL [Filename]#<conf>[#<extra-conf[#...]]

This configuration string, beginning by '#', is directly appended
to bootm argument 1 after <kernel_addr_r>.

bootm [<kernel_addr_r>]#<conf>[#<extra-conf[#...]]

see doc/uImage.FIT/command_syntax_extensions.txt for details

Example :
 KERNEL /fit.itb#cfg1
 KERNEL /fit.itb#cfg2

Configuration can be use also for overlay management :
 KERNEL /fit.itb#cfg1#dtbo1#dtbo3

see doc/uImage.FIT/overlay-fdt-boot.txt for details

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-10-08 14:45:02 -04:00
Jens Wiklander
6d89902d7a cmd: avb: print error message if command fails
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2018-10-07 10:47:38 -04:00
Jens Wiklander
ab2d738239 cmd: avb read_rb: print rb_idx in hexadecimal
Prior to this patch was do_avb_write_rb() reading supplied rb_idx as a
hexadecimal number while do_avb_read_rb() printed the read out rb_idx as
decimal number. For consistency change do_avb_read_rb() to print rb_idx
as a hexadecimal number too.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2018-10-07 10:47:38 -04:00
Bin Meng
058b77a9b8 riscv: cmd: bdinfo: Print the relocation address
Add printing of U-Boot relocation address.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03 17:47:24 +08:00
Bin Meng
8cdc6b58d7 riscv: Remove mach type
Since the mach_id is not used by RISC-V, remove it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2018-10-03 17:47:19 +08:00
Tom Rini
592cd5defd Merge branch 'master' of git://git.denx.de/u-boot-spi
This is the PR for SPI-NAND changes along with few spi changes.

[trini: Re-sync changes for ls1012afrwy_qspi*_defconfig]
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-10-02 17:01:46 -04:00
Miquel Raynal
938db6fe5d cmd: mtdparts: describe as legacy
The 'mtdparts' command is not needed anymore. While the environment
variable is still valid (and useful, along with the 'mtdids' one), the
command has been replaced by 'mtd' which is much more close to the MTD
stack and do not add its own specific glue.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-10-02 22:12:32 +05:30
Miquel Raynal
c58fb2cdb3 cmd: ubi: clean the partition handling
UBI should not mess with MTD partitions, now that the partitions are
handled in a clean way, clean the ubi command and avoid using this
uneeded extra-glue to reference the devices.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-10-02 22:12:32 +05:30
Miquel Raynal
5db66b3aee cmd: mtd: add 'mtd' command
There should not be a 'nand' command, a 'sf' command and certainly not
a new 'spi-nand' command. Write a 'mtd' command instead to manage all
MTD devices/partitions at once. This should be the preferred way to
access any MTD device.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-10-02 22:12:32 +05:30
Tom Rini
d24c1d0f4d Merge git://git.denx.de/u-boot-dm 2018-09-30 18:16:51 -04:00