Commit Graph

650 Commits

Author SHA1 Message Date
Tang Yun ping 3decc73706 cmd: ddr_tool: add ddr test tool code
RK3328/RK3326/PX30: enable CONFIG_OF_LIVE, CONFIG_ROCKCHIP_DMC and
CONFIG_CMD_DDR_TEST_TOOL.
RK1808/RK3399pro npu: enable CONFIG_CMD_DDR_TEST_TOOL.
When enable, it will create a 'ddr_test' command for user in U-Boot shell.

Change-Id: Iaa286e461d53b1caa4bcc069d37a7aad16a3e5e3
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2018-12-27 20:25:50 +08:00
Masahiro Yamada 0e00a84cde UPSTREAM: libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>
Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.

This commit moves the header code:
  include/libfdt.h         -> include/linux/libfdt.h
  include/libfdt_env.h     -> include/linux/libfdt_env.h

and replaces include directives:
  #include <libfdt.h>      -> #include <linux/libfdt.h>
  #include <libfdt_env.h>  -> #include <linux/libfdt_env.h>

Change-Id: I6c0f7e50e8b571106627f25ddac008a62bd2994e
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-12-24 17:20:37 +08:00
Joseph Chen 0eea0d250e dm: add dvfs uclass and wide temperature dvfs support
- add dvfs uclass;
- add dvfs command;
- add a simple wide temperature dvfs driver.

About wide temperature dvfs driver policy, see description in:
drivers/power/dvfs/rockchip_wtemp_dvfs.c

Change-Id: I36a8de6e47f8375bf1795b794c77d96b4571a361
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-10 18:03:51 +08:00
Jason Zhu fc1a55637d rockush: add serialnumber to usb_device_descriptor
Change-Id: I498be22dd73ffa8e8844bd9ceedb294b5bba72ce
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-11-23 11:06:51 +08:00
Joseph Chen ee465021fe android: support boot images packed with rockchip android hdr
For some legacy reasons, rockchip use mkbootimg tool to pack android
images with special pack parameters(SDK version lower than 8.1) to
assign kernel/ramdisk/seconds address and page size.

Android hdr on RK3399 SDK-7.1:
   kernel size:      1299808
   kernel address:   60408000
   ramdisk size:     1e6b80
   ramdisk addrress: 62000000
   second size:      41c00
   second address:   60f00000
   tags address:     60088000
   page size:        4000
   header_version:   0
   os_version:       e041114 (ver: 1.7.2, level: 2017.4)
   name:
   cmdline:          buildvariant=userdebug

The kernel/ramdisk/seconds address base is not from 0x10000000 and
page size is not 0x800!

This patch makes bootflow to compatible with above legacy packing.

Change-Id: I663a0d1386694658c97586706ff21ed887d6a2e7
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-01 08:42:27 +08:00
Kever Yang d61082e9df cmd: part: use MAX_SEARCH_PARTITIONS for part search
Use Macro instead of hard code.

Change-Id: I8a41a762bb16ca77816871b357ededdde0b1c875
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-09-10 11:16:25 +08:00
Tang Yun ping 133266d48d cmd: add memtester code
Enable memtester by config CONFIG_CMD_MEMTESTER=y

Change-Id: I02c873a8b3be5ee3c9a1cf347b7e3e75cb5336f0
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2018-08-10 17:45:13 +08:00
Joseph Chen f81a9e78e7 env: fix env_exist/append/update() words match issue
solve some words match mistakes due to strstr().

Change-Id: I79ca9bc9ed1e9aeb5472e158650890023afa3da3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-08 11:53:05 +08:00
Sam Protsenko 2967d2f74d FROMLIST: cmd: Add dtimg command
dtimg command allows user to work with Android DTB/DTBO image format.
Such as, getting the address of desired DTB/DTBO file, printing the dump
of the image in U-Boot shell, etc.

This command is needed to provide Android boot with new Android DT image
format further.

Change-Id: I2a626f333f604b6f0424aa03feaddab4e8506a3f
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
(am from http://patchwork.ozlabs.org/patch/925871/)
2018-08-06 11:15:19 +08:00
Dingqiang Lin aa16b1f803 cmd: rksfc: change dev if_type
1.In rkflash driver, SPI Nand and SPI Nor are registered as two
different if_type
block dev. They are both the child_dev of sfc;
2.Here we send cmd to "rksfc" to operate it's child-dev spi flash device.

Change-Id: I9314ef9c556f8cfbe023021bd66bebec137a4e71
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-31 14:51:32 +08:00
Kever Yang 2bbf102863 cmd: mmc: do not force init HW in 'mmc dev' cmd
This is a revert to :
a5710920b7 cmd_mmc: make mmc dev always re-probe the HW

For emmc device, we should not re-init the HW with 'mmc dev' cmd,
please use 'mmc rescan' when need HW re-init.

Change-Id: I994d12beb7215db568e7a0ed58be3e36dfda5744
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-07-19 10:18:48 +08:00
Jason Zhu cc527546d3 androidboot: nodify cmd bootavb
1.printf necessary information
2.delete useless function: do_avb_write,
    do_avb_write_ab_metada

Change-Id: I5f932e7774ecf9b383358b3c081369cdc7db0167
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-07-19 09:57:37 +08:00
Jian Qiu 65413a00f9 fastboot: add FASTBOOT_OEM_UNLOCK option
This enables the following fastboot commands:
  fastboot oem unlock
  fastboot oem unlock_accept
  fastboot oem lock
  fastboot getvar oem-unlock

Android 8.1 need the oem unlock status attach to bootargs on boot.

Change-Id: Icc83451336a4dea2cbcf4927287de23bc8e28cb1
Signed-off-by: Jian Qiu <qiujian@rock-chips.com>
2018-07-19 09:56:14 +08:00
Andy Yan 008aee876a boot_android: add runtime compatible for un/compressed kernel image
This patch add auto parse the compress format of kernel image.
Then decompress the compressed kernel image for arm64, as for
arm32 zImage, we only need to load it to a higher memory, then
the kernel will handle the decompress itself.

Test on RK3308 AARCH64 mode (Cortex A35 816 MHZ) boot with eMMC:

------------------------------------------------------------------
Format    |  Size(Byte) | Ratio | Decomp time(ms) | Boot time(ms) |
-------------------------------------------------------------------
Image     | 7720968     |       |                 |     488       |
-------------------------------------------------------------------
Image.lz4 | 4119448     | 53%   |       59        |     455       |
-------------------------------------------------------------------
Image.lzo | 3858322     | 49%   |       141       |     536       |
-------------------------------------------------------------------
Image.gz  | 3529108     | 45%   |       222       |     609       |
-------------------------------------------------------------------
Image.bz2 | 3295914     | 42%   |       2940      |               |
-------------------------------------------------------------------
Image.lzma| 2683750     | 34%   |                 |               |
-------------------------------------------------------------------

Note: the boot time is counted from first ddr init log to first Kernel log.

Change-Id: I73b12ec944fbc8238b0e061a37e2f31aa3093231
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-07-14 11:39:04 +08:00
Joseph Chen 00129fb35e env: add env_update_filter()
provide ignore option to filter unused key words from a
list of new string which is ready to be appended.

Change-Id: I82d61ee21ec658e73549de42ad94ed259582cb7a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-07-09 14:18:03 +08:00
Jason Zhu 6651d4c0fb dev_desc: judge dev_desc whether NULL or not before use it
Change-Id: I9d0e2d207a143a02949fbdff2d9ad39f154e4f3e
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-07-04 09:31:05 +08:00
Dingqiang Lin 300175f79e cmd: rknand: add rockchip spi nand u-boot command support
Change-Id: I8e3e6bab2d419b5fe0ab35c3985d1ff88efc5778
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-06-14 11:06:55 +08:00
Hisping Lin 69285f9ef7 cmd: mmc: remove test vboot hash code
trusty_write_vbootkey_hash will set secure boot flag
when we write vboot key hash success, we should remove it

Change-Id: I7b45739918b10b6847a7f5bf6b7c740f3b802870
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2018-06-06 09:19:41 +08:00
Dingqiang Lin d5f538dc02 cmd: rksfc: add sfc u-boot command
rksfc driver with block interface

Change-Id: I395cf78e939ce9ddbd07a9afad794474f0482542
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-05-11 11:08:38 +08:00
Jason Zhu 3671d25201 cmd: bootrkp: fix check blk_dread return value error
Change-Id: Ib283c2eeb982479914f8c806f7b54bf081f4c9be
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-05-08 16:02:43 +08:00
Kever Yang 6caa033365 rockchip: add rkimgtest cmd to get boot dev
We need to check if the storage(sdmmc) have IDB data so that
we can use it as boot device.

Change-Id: I7373b8f1a6c4c41c1d2cb1c94cd5d20c0780b5db
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-05-08 11:20:43 +08:00
qiujian 9e68721b27 bootargs : read oem unlock status
Read oem unlock status from optee_client api
and attach it to bootargs

Change-Id: Ib8b1a9bc115ec9cb7e5ce09dc50845cfd7c1c81b
Signed-off-by: Qiu Jian <qiujian@rock-chips.com>
2018-04-03 10:30:56 +08:00
qiujian f61a997e29 fastboot: implement oem unlock commands for bootrkp
Read-write oem unlock status from optee client api.

Implement the following fastboot commands:
  fastboot oem unlock
  fastboot oem unlock_accept
  fastboot oem lock
  fastboot getvar oem-unlock

Change-Id: I99edcee7b60c6d9529e6687291d87f22bf97b771
Signed-off-by: Qiu Jian <qiujian@rock-chips.com>
2018-04-03 10:30:56 +08:00
Andy Yan 4715d15e17 cmd: sf: add test count
Change-Id: I06c0783998152ef5d32f95f6813d5dfe315b4cc2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-03-22 08:55:24 +08:00
Andy Yan a3d7c00b32 cmd: boot: add brom cmd to reboot to brom dnl mode
Change-Id: I797491ebe25af1013732aeee87e61e3ba4bc1689
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-03-22 08:55:24 +08:00
qiujian 91c73fb4d1 lib: optee_client:Support attestation
Add methods to read attestation key from the misc partition of
 last 64K, store key and certificate chain data in secure storage.

 When CONFIG_OPTEE_CLIENT is defined,
 uboot support load attestation data.

Change-Id: I8f3bd7096a7856de9e58d294822a818d5fe380ba
Signed-off-by: qiujian <qiujian@rock-chips.com>
2018-03-21 16:38:08 +08:00
Jason Zhu d9d5eb7401 androidboot: add cmd bootavb perm_attr_test
Read and print the perm_attr.

Change-Id: I1e2b73afa1e872eea7abf75d55570b1c8b19c311
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-03-07 08:59:46 +08:00
Jason Zhu 326572ea3b androidboot: fix compile error in arm64
Change-Id: I68bff703ffbf8ef9a65e4d62a5cf1052bc49ac9b
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-03-05 11:34:47 +08:00
Hisping Lin 8159cb4fb4 mmc: fix bug in function do_mmc_testrpmb
Change-Id: I35aebe3aefc512928281e2f17ef020b36befc36e
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2018-02-24 15:41:54 +08:00
Kever Yang 3f251879bf boot_android: fix load address for boot image
The kernel image follows the header(default 0x800) in boot.img, we need to fix
the load address for boot.img so that kernel image can align to 0x80000 as
required by ARM64 kernel booting.

Change-Id: I526ff38bfce2d8fd1571aff817ade11086f196e3
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-02-23 10:28:26 +08:00
Jason Zhu 37a7bc39c0 lib: avb: update and modify the avb library
The commit point is updated to google external/avb/
which commit point is cf8c56208d2d9643804a7f123b196c7ebc9af276.

Change-Id: I5a10a8a45d3e9e2c9d20d9b3d44946073c9a49ff
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-02-10 10:41:04 +08:00
Joseph Chen ac1dc0c37a charge animation: export struct charge_animation_pdata
This is the most flexsible way for all fuel gauge driver to get
fdt config info from charge animation platdata.

Change-Id: I33aa52c34f2c62c10b58003a10e5a8d1d6e5d7d3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-02-09 14:28:54 +08:00
Joseph Chen 3c9ee70130 env: add env_delete()
Change-Id: I3a94942b1670e641c8558c64dabca0155e53e2ea
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-01-31 18:13:53 +08:00
Joseph Chen 046a931055 env: add env_exist()
Change-Id: I153c700ff45a678832b72031787531efadcdb47b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-01-29 17:29:55 +08:00
Joseph Chen 526c692b8e env: add more debug message for env_update() and env_append()
Change-Id: I0d798d91f2bc132accac882ccfeec76d2f6a747e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-01-17 16:28:51 +08:00
Simon Glass 73991b074b log: Add a test command
Add a command which exercises the logging system.

Change-Id: I4eb139b69937c752d7f6fc42dde3f757260b832b
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ef11ed8239bf02b347e7fb9fc6d980aec0c7810a)
2018-01-17 15:27:28 +08:00
Simon Glass 923fc48db4 log: Add a 'log level' command
Add a command for adjusting the log level.

Change-Id: I51e15c61e860f4f0bdb980f1d7aa88c492f55d49
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d5f61f272d5b7b86bf6321512ba6326c7c075e72)
2018-01-17 15:27:28 +08:00
Simon Glass 785b4fbf6c Drop the log buffer
This does not appear to be used by any boards. Before introducing a new
log system, remove this old one.

Change-Id: I798cd4aff50b7136ae9f84362185f9f73b04f710
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c5404b64fb5a35d41f7eff6d12b8ffdb0c851040)
2018-01-17 15:27:28 +08:00
Nobuhiro Iwamatsu 51b432dabb UPSTREAM: cmd: i2c: Fix use sdram sub command with CONFIG_DM_I2C
sdram sub command of i2c command does not support Drivers Model.
This adds Drivers Model support to sdram sub command.

Change-Id: I405d05b9b697715759a68ba71597cd9ae63d9565
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 28df8ed07f2ae936e9af28c146d555ed4d0c122a)
2018-01-17 15:27:28 +08:00
Heinrich Schuchardt 6ff3d5909f UPSTREAM: cmd: blk: remove unreachable code
Remove an unreachable return statement.

Change-Id: I523a83571eade593a08b685519757c1df4ffab25
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 254eedee7f383066b70ac4da01bc792a3256a4b3)
2018-01-17 15:27:28 +08:00
Suneel Garapati 1c7b1b4b19 UPSTREAM: cmd: usb: ignore blk, emulation devices in usb tree/info display
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.

Change-Id: If25ca43b08c0918c44583f71282a07c928e5bf53
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>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit abd7cedb19ab7979467734b3933a39879bd8935a)
2018-01-17 15:27:28 +08:00
Bernhard Messerklinger 853f31c42c UPSTREAM: cmd/fdt.c align data buffer to avoid unaligned word access
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.

Change-Id: I6ea64827a9c245db4ba2a2ff522aaddea647c2f2
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>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 6dfd65f81fd060a85c961a84f85a286e8e96332c)
2018-01-17 15:27:28 +08:00
Tom Rini c9bf1d5a23 UPSTREAM: cmd/pxe.c: Rework bootargs construction to clarify string checks
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")
Change-Id: I6a3d3ea54d6b7e1f3c2aed200b2f706f42d570d4
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 59ee8f83b6e77550d5697fced4899e9b5173981f)
2018-01-17 15:27:28 +08:00
Tuomas Tynkkynen b0ec94428e UPSTREAM: Drop CONFIG_HAS_DATAFLASH
Last user of this option went away in commit:

fdc7718999 ("board: usb_a9263: Update to support DT and DM")

Change-Id: Id05869deccb88c1102700dd5af58a8c249e3e9e2
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c68c03f52badc90951dbf8a054c0e500e04bf365)
2018-01-17 15:27:28 +08:00
Tuomas Tynkkynen 9a544e36a8 UPSTREAM: env: Drop CONFIG_ENV_IS_IN_DATAFLASH
Last user of this option went away in commit:

fdc7718999 ("board: usb_a9263: Update to support DT and DM")

Change-Id: Ie6cec28e4daf26b669f3f35db026427bdb47a5b6
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 7b7341d7f3ee915c89a7f8ab7054e39872057d90)
2018-01-17 15:27:28 +08:00
York Sun f9b2adb5dc UPSTREAM: cmd: spl: fix compiling error when CONFIG_CMD_SPL_WRITE_SIZE not defined
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.

Change-Id: I879971e42fb333e1e0ff4e21ce6b34caf8498aa5
Signed-off-by: York Sun <york.sun@nxp.com>
CC: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b65ac633f52da596cfa573bb4a597e2edd2318c8)
2018-01-17 15:27:28 +08:00
Tom Rini fafa35c559 UPSTREAM: cmd: Make CMD_LZMA / CMD_UNZIP default y if CMD_BOOTI
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.

Change-Id: Ic7958458ddc16c8b78ea40ff56d380d02883d76a
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 99e46dfc6a9176f6f0680c9dfdf33c97d56336ce)
2018-01-17 15:27:28 +08:00
Sam Protsenko 70c6966892 UPSTREAM: scripts: Move Kconfig contents to cmd/Kconfig
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.

Change-Id: Ia60682a7eb9c3379e6e257b07e799b06e304c95f
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 610eec7f0593574c034054ba54fc1c934755e208)
2018-01-17 15:27:28 +08:00
Tom Rini 017aad0449 UPSTREAM: cmd/gpt.c, cmd/nvedit.c, tools/fit_image.c: Rework recent fixes for Coverity
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.

Change-Id: I66fafd0ed8d1c290a7773bba5ece8d11bfc15b50
Reported-by: Coverity (CID: 167366, 167367, 167370)
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit bf52fcdef4aac242b5e6b6b9827acf6d69ce1951)
2018-01-17 15:27:28 +08:00
Tom Rini 8ab67e0d6c UPSTREAM: cmd/time.c: Initialize 'repeatable' variable
We cannot leave this uninitialized, set it to 0.

Change-Id: Ic8f3dd4d7395921bf4269a618aaf92a717dbfe46
Reported-by: Coverity (CID: 144426)
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 146dda391126d4f199c7692f2342efcc34b45ebd)
2018-01-17 15:27:28 +08:00
Tom Rini 7f2f366160 UPSTREAM: cmd/pxe.c: Rework initrd and bootargs handling slightly
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>
Change-Id: I86151e4bde53972d9b6105f3a85db93b114e22d8
Reported-by: Coverity (CID: 131256)
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 48ee0a87bc46a6f863ffd9e0396b7a068dd68c50)
2018-01-17 15:27:28 +08:00
Tom Rini bc846a8c08 UPSTREAM: cmd/nvedit.c: Update input handling to cover overflow cases
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.

Change-Id: I0c4f88803f8525eb6ef0207a6b7fdbec2b43e9ff
Reported-by: Coverity (CID: 165116)
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c667723ffb50b00585b729ee0da7b0e8c93ffa13)
2018-01-17 15:27:28 +08:00
Alison Chaiken cb40c099ea UPSTREAM: GPT: fix memory leaks identified by Coverity
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".

Change-Id: I4ec9881a86c8a50960844e07f69c04a239bc218f
Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
Reported-by: Coverity (CID: 167222, 167235, 167237)
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 18030d04d25d7c08d3deff85881772a520d84d49)
2018-01-17 15:27:28 +08:00
Masahiro Yamada 90aa625c9a treewide: replace with error() with pr_err()
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>

Change-Id: I921807c1770d36a91e692c48ab477558bb2ed0b8
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>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 9b643e312d528f291966c1f30b0d90bf3b1d43dc)
2018-01-17 15:27:28 +08:00
Maxime Ripard 14464b32f6 UPSTREAM: cmd: Move CONFIG_RANDOM_UUID to Kconfig
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>
Change-Id: Ie4c840fb583d1e5c95170e452ccbb04034926119
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 47738acceda5bae52b7c33ce912da6b52244c033)
2018-01-17 15:27:28 +08:00
Heinrich Schuchardt 3152629475 UPSTREAM: GPT: incomplete initialization in allocate_disk_part
memset(newpart, '\0', sizeof(newpart));
only initializes the firest 4 or 8 bytes of *newpart and not the whole
structure disk_part.

We should use sizeof(struct disk_part).

Instead of malloc and memset we can use calloc.

Identified by cppcheck.

Fixes: 09a49930e4 GPT: read partition table from device into a data structure
Change-Id: Ifc937b64f6ac6abc56c0c6bb3d094c2316b9268e
Reported-by: Coverity (CID: 167228)
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit f66bc0e0beeff7fa27c29f740d2f314d63b3346d)
2018-01-16 18:17:07 +08:00
Heinrich Schuchardt 10eca96895 UPSTREAM: efi_loader: bootefi hello should use loadaddr
Command 'bootefi hello' currently uses CONFIG_SYS_LOAD_ADDR
as loading address.

qemu machines have by default 128 MiB RAM.
CONFIG_SYS_LOAD_ADDR for x86 is 0x20000000 (512 MiB).
This causes 'bootefi hello' to fail.

We should use the environment variable loadaddr if available.
It defaults to 0x1000000 (16 MiB) on qemu_x86.

Change-Id: Iff6bfbd6c93f115f7f616c42b6e1c2dc4d61e156
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 51c533fdce75fbdec7de28a05a675a553d209bcb)
2018-01-16 18:16:48 +08:00
Bin Meng ec5e502c14 UPSTREAM: cmd: blk: Use LBAFU in the common block command
There is already a macro LBAFU to aid formatted print with lbaint_t
variables. Let's use it in the common block command codes.

Change-Id: I93256536d5af97877ecf9c4edc36d268b498dd1b
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit e2888a7fa7f8d23396c4b25ea763fe1f38851b3d)
2018-01-16 18:16:48 +08:00
Bin Meng 010034028f UPSTREAM: blk: Remove various places that do flush cache after read
All these places seem to inherit the codes from the MMC driver where
a FIXME was put in the comment. However the correct operation after
read should be cache invalidate, not flush.

The underlying drivers should be responsible for the cache operation.
Remove these codes completely.

Change-Id: I8f04c721432753b34e85b19616a0b42d83a633eb
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: York Sun <york.sun@nxp.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: York Sun <york.sun@nxp.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 723b43daec7ee2ddb600cfcb9b0253d4a71c3915)
2018-01-16 18:16:48 +08:00
Pantelis Antoniou 7c95a4956f UPSTREAM: fdt: Switch to using the verbose overlay application method
The verbose overlay application method prints out more helpful
messages, so switch to it.

Change-Id: Ie8bd31e939e3c12fe547028d0fa3ddc8b254d33d
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 81ecc5d92badfcf1415a6052b5896a62271a94dc)
2018-01-16 18:16:48 +08:00
York Sun 40484c6d8c UPSTREAM: cmd: spl: Fix compiling warning
Fix warning "cast from pointer to integer of different size".

Change-Id: Ib6306c30cdbfc180c5cd452def44eb661cc4fc28
Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d1f2ee7021dc4a89f43e25f289747a27da0e930f)
2018-01-16 18:13:50 +08:00
Kever Yang 7ad0afacd5 rockchip: bootrkp: add log when boot from recovery
Add a log to show boot from recovery.

Change-Id: I8302820558d53e6b239533806305b2dec7c38c0c
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-12 15:40:12 +08:00
Kever Yang 32af749a74 rockchip: bootrkp: update cmd name
Change-Id: If67d534c73b6ea0ba432dceb85f10e6ee4322e16
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2017-12-21 16:50:11 +08:00
Kever Yang 891380b57d cmd: boot_android: support legacy aosp image from rockchip
New cmd usage:
boot_android mmc 0

update boot_android:
- do not need provide argv for misc partition and slot
- If CONFIG_ROCKCHIP_RESOURCE_IMAGE is enabled, try to get dtb from resource
partition.

Change-Id: I7242880f9cde916ca10d677ddac07790c66a07a4
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2017-12-08 18:13:25 +08:00
Kever Yang a0e58cf2cc cmd: bootrkp: add a cmd for rockchip rkimg bootloader
'bootrkp' will find the boot device and find all necessary images.
Basically, these partitions are must:
Kernel.img: kernel Image
Resource.img: kernel dtb and logo
system.img: rootfs

Change-Id: Iba3df2535705fa3ed529377f44f041fa2294ce60
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2017-12-08 18:13:25 +08:00
Joseph Chen 05b73bbbfe cmd: charge: support command parameter
This is maily for debug. the format is:
charge <power on soc> <power on voltage> <screen on voltage>

Change-Id: I821d574a386eb2eddd03ef50f543f96cb05b620e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-12-05 09:34:48 +08:00
Jason Zhu bf17c6275d androidboot: boot the system without a/b avb
Support boot the system in the old mode, and there
is no need to differentiate the _a or _b slot
in the gpt table.

Change-Id: I162e34a9bd0120db051f709faec06daf3bc0aa9c
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2017-11-20 10:32:54 +08:00
Jason Zhu 9aed1a1336 androidboot: add some new info to cmdline
The android things system need some avb info
in the stage of u-boot, like VBH value and so
on.

Change-Id: Ia102931f3b0c912c7e1f34f668d8af0b45fa4a6e
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2017-11-20 10:32:54 +08:00
Frank Wang dd31eefe79 cmd: rockusb: fix upgrade failed when gpt partitions exist
We found rockusb upgraded failed when there had gpt partitions in
system caused by total sectors checking, this change expose all mmc
partitions for rockusb command.

Change-Id: I8847c3c7885d17d47189c55765f97abb4965e8b4
Reported-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-11-14 11:12:42 +08:00
Wenping Zhang 9f7ea89d5d androidboot: add BOOT_RECOVERY support
if user input "reboot recovery" by adb or serial console,
uboot will load recovery ramfs image to run.

Change-Id: Ibad1709ed78938dbf1826446a0de5c822c6ce4e4
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
split boot_android and boot_mode int two commits.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2017-11-14 10:55:57 +08:00
Jason Zhu 82ee22d4d3 androidboot: support recovery and fastboot mode
The system must support recovery and fastboot
mode, so the u-boot must judge the boot command
in the misc partition.

Change-Id: I53c876eeefdc20ebe313a6a73d4cfac443fafa67
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2017-11-14 10:55:56 +08:00
Jason Zhu cf7b148dc2 androidboot: free no use buffer
If excute avb_ab_flow() failed, the free the
no use buffer.

Change-Id: I874f3367eceb35424b069a04a1ec35c37b46e639
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2017-11-14 10:55:56 +08:00
Jason Zhu 708de1435a androidboot: close optee client when start kernel
Change-Id: I4b4626e8e2bc89c711988fe23245fa6e71ac7204
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2017-11-14 10:55:56 +08:00
Hisping Lin e13fd25b91 rockchip: mmc: add test case.
Change-Id: I87e616c0a0f49f426b5e222fcc56cf5a170b3419
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2017-11-14 10:55:54 +08:00
Hisping Lin ae8ec5e139 lib: optee_client: change file name
change OpteeClientTest.c to OpteeClientInterface.c

Change-Id: I68b32a2a4757af655bd4eaa723067f024ff112ef
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2017-11-14 10:55:53 +08:00
Jason Zhu 4397fdfd14 androidboot: modify do_avb_flow
In the fuction do_avb_flow, the return value of
avb_ab_flow() must be judged. If not, the process
can not return to u-boot command line when execute
avb_ab_flow failing.

Change-Id: I925c9c63cee2153d365ea78b286d8958624b106c
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2017-11-14 10:55:53 +08:00
Jason Zhu f0864c7f9d androidboot: init slot_partition
Change-Id: I1be603307523d245ef8961815a0df38786366d0d
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2017-11-14 10:55:51 +08:00
Jason Zhu e8e29e8d8b androidboot: add new android boot cmds with avb.
The android things boot must have avb function,
then we add the fuction in file cmd/boot_android.c.
In boot_android.c, we add bootavb flow v/n to
bootload android system.

The bootavb flow v bootload android system
with avb.And bootavb flow n bootload android
system as usual.

Change-Id: I3064f8a4aebf2b4bfdb0cf6f0458f42438c27027
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2017-11-14 10:55:51 +08:00
Hisping Lin 87b8e6decf mmc: add mmc cmd to test tipc functions
input mmc testrpmb to test store data to rpmb.

Change-Id: I0b8361bd7a22fc7854e1a94ae4ae81972e523b3b
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2017-11-14 10:55:49 +08:00
Alex Deymo 170e9eb9d1 android: Fix off-by-one error when joining strings
When concatenating the strings to form a new command line in the
android bootloader flow, the null-terminator was placed one byte after
the end of the allocated string.

Bug: None
Test: booted a rpi3.
Change-Id: I120e09a77bb1c27980e7ce2b5f9b8961424ed0c3
2017-11-14 10:55:47 +08:00
Alex Deymo 180cc7c601 android: Implement A/B slot select.
The android_bootloader_control struct defined in bootloader_message.h
stored the A/B metadata used to decide which slot should we use to boot
the device. This patch implements the bootloader side of the slot
selection in a new "android_ab_select" command which decides the
current slot and updates the metadata as needed.

Bug: 32707546
Test: Booted a rpi3, updated to the other slot.
Change-Id: I9344ff5b76194160d2b466a50e84f4f423b1a98a
2017-11-14 10:55:46 +08:00
Alex Deymo df7cce4361 boot_android: Drop the "mmc" restriction on the partition name.
part_get_info_by_name() was extended to support more than just mmc/efi
partitions. This patch remove this restriction from the
part_get_info_by_dev_and_name() function.

Bug: 32707546
Test: Booted rpi3.
Change-Id: If6399f7d24e99911b3b14a125a6bc1f472b7eecf
2017-11-14 10:55:46 +08:00
Alex Deymo 8062224026 boot_android: Pass the slot from the command.
In order to support booting from either slot, this patch passes the
slot name from the command line.

Bug: 32707546
Test: Booted rpi3.
Change-Id: I30582bd8b1b95dc0f25b0c6624e7909ee4118bd0
2017-11-14 10:55:46 +08:00
Alex Deymo 06f4a8746e Add "boot_android" command.
The new "boot_android" command simply executes the Android Bootloader
flow. This receives the location (interface, dev, partition) of the
Android "misc" partition which is then used to lookup and infer the
kernel and system images that should be booted.

Bug: 32707546
Test: Booted a rpi3 build with Android Things.
Signed-off-by: Alex Deymo <deymo@google.com>

Change-Id: Ibf3f31e38b159d42db7a0835b99ad7ec260fc2a7
2017-11-14 10:55:46 +08:00
Alex Deymo 76e2a5a6c6 Move Android Image loading logic to image-android.c
This patch moves the Android Image loading logic from the load_android
command to a new android_load_image() function in image-android.c so it
can be re-used from other commands.

Bug: 32707546
Test: Booted the rpi3 with this patch.
Signed-off-by: Alex Deymo <deymo@google.com>
Change-Id: I12d206141ead1b94ebbcc90ee05512a276c7595a
2017-11-14 10:55:46 +08:00
Jocelyn Bohr 965eda410b Add support for fastboot command over UDP
The Raspberry Pi does not support USB device mode, so fastboot over
USB does not work. This patch adds support for and partially
implements the device side fastboot UDP protocol as a U-boot command.
It requires an ip address set and ethernet initialized.

- Modify U-boot fastboot command to do fastboot over UDP
- Add net/fastboot.c, which implements fastboot server functions
- Handle QUERY and INIT fastboot packets
- Add CONFIG_UDP_FUNCION_FASTBOOT to enable fastboot over UDP

Bug: 31887729
Test: Tested with fastboot, responds correctly to query and init
      packets.

Change-Id: I4045abaf7a4455d756b7c1c00215afaa90c70a6e
2017-11-14 10:55:44 +08:00
Alex Deymo 83a51ebaaa Add 'load_android' command to load Android images.
Android kernel images include a header that specifies addresses and
kernel size. This patch adds a command to load these images from
storage without specifying the size or address of them, and parsing
them from the header instead.

Bug: 31636643
Change-Id: I84a9cf82cff78ce2299b1981c4f6f9a5720e4d0d
2017-11-14 10:55:44 +08:00
Kever Yang 81ae24d4d6 fastboot: add buffer addr for RK3066
Change-Id: I0d39e50063ab040d1027d342081bc63a19c9389b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2017-11-07 11:07:18 +08:00
Joseph Chen c0b38c6cdf cmd: add 'charge' cmd support
It calls charge display.

Change-Id: Iced07ec388b48f6849516cc67715b6a50860bc9c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-11-03 11:57:12 +08:00
Frank Wang aa9b1b59c9 cmd: rockusb: add rockusb command support
This patch add a new rockusb command support.

Rockusb command provides a way to upgrade firmware for Rockchip SoC
based devices, its design make use of USB Bulk-Only Transport based
on USB Mass Storage framework.

Change-Id: Idb04c62a8f6fb7ba84641bd4ee00f67920a7cfc8
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-11-03 11:57:11 +08:00
Frank Wang d5c4b898d3 Revert "usb: rockchip: add rockusb command"
Will make use of UMS framework to support rockusb command.

This reverts commit 301fce6(usb: rockchip: add rockusb command).

Change-Id: Iec2ed64212851a85e8570dcfaa5507a5b55c29c5
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-11-03 11:57:10 +08:00
Joseph Chen 533c9f30f7 env: set env_update() parameter 'varvalue' as 'const char *'
Change-Id: I1591fd507363545af5f56a83e0932c317ae7b915
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-23 17:20:42 +08:00
Zhaoyifeng 441217e374 drivers: rknand: add nand flash drivers for Rockchip SoC
This patch add the nand flash support for Rockchip Soc(RK3128, RK3126x,
RK3188, Rk3229 etc).

Change-Id: I35ea09f0714b303b247a97ed13cc6e0e56675a0e
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2017-10-20 08:59:10 +08:00
Joseph Chen 64c74e0b2d env: add env_update()
This add/append/replace the sub value of an environment variable.

Change-Id: I0fcda0a1c631013eb9458a04a09546ba1c643db3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-12 09:41:08 +08:00
Eddie Cai 301fce6d0e usb: rockchip: add rockusb command
this patch add rockusb command. the usage is
rockusb <USB_controller> <devtype> <dev[:part]>
e.g. rockusb 0 mmc 0

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

Changes in v7:
-none

Changes in v6:
-none

Changes in v5:
-none

Changes in v4:
-move USB_FUNCTION_ROCKUSB to drivers/usb/gadget/Kconfig
-modify the dependence

Changes in v3:
-fix comment from Simon and Lukasz
-fix checkpactch error
2017-09-12 16:04:28 +08:00
Ziyuan Xu 3d4726e6b2 cmd: mmc: show the current speed mode
So far mmc framework had support speed mode switch, it good to show the
current speed mode from 'mmc info'.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2017-09-12 16:04:23 +08:00
Ziyuan Xu 3e3ff0ac77 mmc: remove tran_speed from struct mmc
The clock element is updated by mmc_set_clock every time, it denotes the
current transfer speed.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2017-09-12 16:04:22 +08:00
Ziyuan Xu caa21a21f1 mmc: rework ddr mode judgement with timing
Since the card device is set the proper timing after speed mode switch
is completed, host driver can get ddr_mode from timing parameter. So
drop the antiquated ddr_mode.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2017-09-12 16:04:22 +08:00
Bin Meng 584f316f11 cmd: ide: Make the first device the default one
At present the IDE device number is initialized to -1, which means
we cannot type "ide read" command before setting the device number
via "ide device #".

For convenience, let's set the first device as the default one.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-10 12:27:43 -04:00
Hannes Schmelzer cee8c35d1b fdt: fix 'prop (...) not found!' error in 'fdt set' command
This commit brings things back to the well known working state of the
command.
-
With commit 9620d87259
(cmd/fdt: support single value replacement within an array)

there was an error introduced modifying (inserting) a property to a
device-tree node.
fdt_getprop(...) returnes a len with -1 for a non-existing property, but
a memcpy with len -1 isn't a good idea and things went wrong (crash).
-
Some times later Tom did repair this
with commit 99bb38e2cc
(fdt: Check for NULL return from fdt_getprop in 'fdt set')

This repairs the crash but the behaviour of the command isn't like
before, it makes it impossible to insert a property.
-

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Acked-by: Simon Glass <sjg@chromium.org>
2017-09-04 02:10:06 -06:00
Tom Rini 48f6232e58 Kconfig: Migrate all of cmd/fastboot/Kconfig to defconfigs
- Move ANDROID_IMAGE_SUPPORT to top level Kconfig under images as it's
  not strictly part of fastboot.
- Add some defaults for the fastboot buffer location and size
- Migrate all options listed in cmd/fastboot/Kconfig
- Cleanup the README

Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-01 16:18:21 -04:00
Tom Rini 6aee2ab68c Merge git://git.denx.de/u-boot-imx
Signed-off-by: Tom Rini <trini@konsulko.com>

Conflicts:
	configs/imx6qdl_icore_mmc_defconfig
	configs/imx6qdl_icore_rqs_defconfig
2017-09-01 10:40:59 -04:00
Bin Meng fceadc1459 nvme: Adjust the 'nvme' command to use blk_common_cmd()
Instead of having separate code in the 'nvme' command, adjust it to use
the common function.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28 07:17:15 -04:00
Tom Rini c3b572c4e2 cmd/spl.c: Include <libfdt.h> for fdt_totalsize
In order to be able to reliably use fdt_totalsize, we must have
<libfdt.h> included.

Fixes: 767cb74a00 ("cmd: spl: provide address and size of prepared FDT ...")
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-26 21:17:05 -04:00
Tom Rini 8b3cec7da1 mtdparts: Fix uninitialized scalar usage
When reworking this code to fix other issues found by Coverity, I forgot
to ensure tmp_ep was always cleared before use.

Reported-by: Coverity (CID: 166612)
Fixes: bc028345ac ("mtdparts: Fix final outstanding issue reported by Coverity")
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-26 16:59:24 -04:00
Tom Rini bc028345ac mtdparts: Fix final outstanding issue reported by Coverity
As part of fixing the previously reported issues, it was missed that in
the case of mtdparts_init() we need to make sure that tmp_ep is long
enough to contain PARTITION_MAXLEN and a NULL termination.  Then, to be
sure the buffer is NULL terminated, zero the entire buffer rather than
just ensuring the first character is NULL.

Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Reported-by: Coverity (CID: 166329)
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-26 14:56:13 -04:00
Anatolij Gustschin 767cb74a00 cmd: spl: provide address and size of prepared FDT in environment
Writing prepared FDT to persistent storage should be possible in
scripts. Create environment variables containing address and size
of the updated FDT. Scripts can use these variables after running
'spl export fdt ...' command to write the new blob to persistent
storage.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2017-08-26 14:56:12 -04:00
Stefan Agner 2f005695df cmd: add sdp command
Add a new command to start USB Serial Download Protocol (SDP)
state machine.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-08-23 10:41:58 +02:00
Tom Rini d03618d5cb cmd/read.c: Fix checking blk_dread return value
The function blk_dread will return -ENOSYS on failure or on success the
number of blocks read, which must be the number asked to read (otherwise
it failed somewhere).  Correct this check.

Reported-by: Coverity (CID: 166335)
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-20 09:54:30 -04:00
Tom Rini 54f1792c8d mtdparts: Fix various issues reported by Coverity
Now that sandbox is building cmd/mtdparts.c Coverity has looked at the
code and found a number of issues.  In index_partitions() it is possible
that part will be NULL, so re-work the checks and debug statements to
take this into account.  We have a number of string buffers that we
print to in the exact size of, and use string functions on, so we need
to ensure they are large enough to be NULL terminated.  In
device_parse() it is not possible for num_partitions to be 0 (we would
have hit a different error first) so remove logically dead code.
Finally, in parse_mtdparts() if we have an error we need to free the
memory allocated to dev.

Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Reported-by: Coverity (CID: 166334, 166333, 166332, 166329, 166328)
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-20 09:54:29 -04:00
Tom Rini 5619295995 EFI Fixes for 2017.09:
- Fix GOP w/o display
   - Fix LocateHandle
   - Fix exit return value truncation
   - Fix missing EFIAPI in efi_locate_handle (for x86)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJZlq5xAAoJECszeR4D/txgM9MP/3lZ8gUWCb5iNnIUhTwNyTPG
 T2tCvoI90YkNTY67L/J5JtDR8BaW4D+yJTeR+tIxB7BMMeF/UJ+kLPdncNyF082b
 9h6Ht5m47osSuBji0v8G2/wjkzNAIonXdoVFQxKQ9t3WgjvyWlp4sK6wrmGyukQJ
 Pb6cqEo/BH3u9/+xPZvyv9eZErJukfs4GHawzP1olH50mF8yVGUbJT2ctKhk5m3b
 F5gdp0pPsebISjWhoq8CKxQitDH6WG6IsLJTu0htEGjP5qPtXSIQhKMj4zIBSH9U
 paiO0k7DeQyfiKqeenk9zY+X33T/JlVPmLco4osP70pg6bzYdnjPGAuwpEhiL1cN
 QZcNb+liZceik5iWO1bjAoUd4rOKD4snl6kg6qLUiYCNF2oSo5h8Em3oyHiiw6Dw
 ohX840jdtnl3Xuuo0jCtHZoOH5glWCO+HTZTPhdE0K/9s79yPy59v9RqBNRM5LB+
 dH7Zg/50AtebOLqqd35YQdSaV1im80EbdxLaV1yJsMtQw2xucVHJC099oyTDXcSg
 0pzBDYsQia/hDDvum8TVHheHfz0cJi9u+VrjgauTK2GmcYNr1hxSyM0pSFveB3C3
 C9qP/20yI3ZMuECC67SIfYK5E03bI2gHH8/k+fQEqxYgqqr50I7aWYGw2nFZTecC
 sdWxgTolQsjn/xlfFBWY
 =wyGe
 -----END PGP SIGNATURE-----

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

EFI Fixes for 2017.09:
  - Fix GOP w/o display
  - Fix LocateHandle
  - Fix exit return value truncation
  - Fix missing EFIAPI in efi_locate_handle (for x86)
2017-08-18 18:24:58 -04:00
Tom Rini 1fdafb2e3d Merge branch 'master' of git://git.denx.de/u-boot-mmc 2017-08-18 18:24:36 -04:00
Angelo Dureghello bdb6099666 cmd: mmc: add mmc partconf read capability
This patch allows to show the EXT_CSD[179] partition_config
register info, just by specifying the dev param:

  U-Boot> mmc partconf 0
  EXT_CSD[179], PARTITION_CONFIG:
  BOOT_ACK: 0x0
  BOOT_PARTITION_ENABLE: 0x0
  PARTITION_ACCESS: 0x0

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2017-08-17 17:00:11 +09:00
Simon Glass f19f1ecb60 dm: sata: Support driver model with the 'sata' command
Update this command to support driver model. This has a different way of
starting and stopping SATA.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17 16:44:17 +09:00
Simon Glass c16ad675d5 dm: usb: Adjust the 'usb' command to use blk_common_cmd()
Instead of having separate code in the 'usb' command, adjust it to use
the common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-17 16:44:16 +09:00
Simon Glass 09ed0d616d dm: ide: Adjust the 'ide' command to use blk_common_cmd()
Instead of having separate code in the 'ide' command, adjust it to use
the common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-17 16:44:16 +09:00
Simon Glass 1eaadd3423 dm: scsi: Adjust the 'scsi' command to use blk_common_cmd()
Instead of having separate code in the 'scsi' command, adjust it to use
the common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-17 16:44:16 +09:00
Simon Glass e29e71e93a dm: sata: Adjust the 'sata' command to use blk_common_cmd()
Instead of having separate code in the 'sata' command, adjust it to use
the common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-17 16:44:16 +09:00
Simon Glass 4395f66739 dm: blk: Add a generic function for block device commands
Most block devices provide a command (e.g. 'sata', 'scsi', 'ide') and
these commands generally do the same thing. This makes it harder to
maintain this code and keep it consistent.

We now have a block device interface which is either implemented by driver
model (when CONFIG_BLK is enabled) or with a legacy interface. Therefore
it is possible to handle most of what these commands do with generic code.

Add a new generic function to process block-device commands using the
interface type and the current device number for that type.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17 16:44:16 +09:00
Simon Glass 723806cc5b env: Rename some other getenv()-related functions
We are now using an env_ prefix for environment functions. Rename these
other functions as well, for consistency:

   getenv_vlan()
   getenv_bootm_size()
   getenv_bootm_low()
   getenv_bootm_mapsize()
   env_get_default()

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:31:11 -04:00
Simon Glass 35affd7a2f env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr()
Rename this function for consistency with env_get().

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:30:44 -04:00
Simon Glass bfebc8c965 env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()
We are now using an env_ prefix for environment functions. Rename these
for consistency. Also add function comments in common.h.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:30:32 -04:00
Simon Glass 00caae6d47 env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.

Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:30:24 -04:00
Simon Glass 018f530323 env: Rename common functions related to setenv()
We are now using an env_ prefix for environment functions. Rename these
commonly used functions, for consistency. Also add function comments in
common.h.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:23:32 -04:00
Simon Glass 382bee57f1 env: Rename setenv() to env_set()
We are now using an env_ prefix for environment functions. Rename setenv()
for consistency. Also add function comments in common.h.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:22:18 -04:00
Simon Glass 01510091de env: Drop saveenv() in favour of env_save()
Use the env_save() function directly now that there is only one
implementation of saveenv().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Denk <wd@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-15 20:50:30 -04:00
Simon Glass ac358beb85 env: Drop the env_name_spec global
Add a name to the driver and use that instead of the global variable
declared by each driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-15 20:50:28 -04:00
Chris Packham 7b07a20c5e cmd/bdinfo: correct comment in board_detail
This appears to be a simple typo that dates back to the original
implementation of board_detail in commit e79394643b ("common: Update
cmd_bdinfo for PPC").

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2017-08-13 15:17:37 -04:00
Zhikang Zhang 0adc38be3d nvme: Add nvme commands
Add nvme commands in U-Boot command line.

1. "nvme scan" - scan NVMe blk devices
2. "nvme list" - show all available NVMe blk devices
3. "nvme info" - show current or a specific NVMe blk device
4. "nvme device" - show or set current device
5. "nvme part" - print partition table
6. "nvme read" - read data from NVMe blk device
7. "nvme write" - write data to NVMe blk device

Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com>
Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-13 15:17:32 -04:00
xypron.glpk@gmx.de a44bffcc95 efi_loader: use EFI_PAGE_SIZE instead of 4096
We should use constant EFI_PAGE_SIZE instead of 4096 where the
coding relies on 4096 being EFI_PAGE_SIZE.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-08-12 14:06:23 +02:00
Simon Glass 00fd59dd1a README: Drop information about commands
Most of this is duplicated in Kconfig help. Add some of that which is not,
and remove the help from the README.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:54 -04:00
Simon Glass 54feea17d6 Convert CONFIG_CMD_ZFS to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_ZFS

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:53 -04:00
Simon Glass e7a815f32e Convert CONFIG_CMD_ZBOOT to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_ZBOOT

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:53 -04:00
Simon Glass 1aa4e8d0de Convert CONFIG_CMD_UUID to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_UUID

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:52 -04:00
Simon Glass 2a242e3e80 Convert CONFIG_CMD_UNIVERSE to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_UNIVERSE

Since no board uses this, perhaps we should drop this command?

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:52 -04:00
Simon Glass 5605aa8ab6 Convert CONFIG_CMD_TSI148 to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_TSI148

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:51 -04:00
Simon Glass ce058ae5f2 Convert CONFIG_CMD_TRACE to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_TRACE

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:51 -04:00
Simon Glass 7a76431845 Convert CONFIG_CMD_YAFFS2 to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_YAFFS2

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:50 -04:00
Simon Glass 9b92a8d76a Convert CONFIG_CMD_THOR_DOWNLOAD to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_THOR_DOWNLOAD

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:46 -04:00
Simon Glass 3cef3b3185 Convert CONFIG_CMD_TERMINAL to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_TERMINAL

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:42:00 -04:00
Simon Glass 00805d7ad8 Convert CONFIG_CMD_STRINGS to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_STRINGS

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:59 -04:00
Simon Glass ba71be547c Kconfig: Sort the memory commands
These are currently not quite in alphabetical order. Before adding more,
sort them. Not all options have a CMD_ prefix, so ignore that when
sorting.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:59 -04:00
Simon Glass 3a91a25376 Convert CONFIG_CMD_SPL_WRITE_SIZE to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SPL_WRITE_SIZE

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:58 -04:00
Simon Glass 203dc1b3a8 Convert CONFIG_CMD_SPL_NAND_OFS to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SPL_NAND_OFS

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:58 -04:00
Simon Glass 72c3033fd1 Convert CONFIG_CMD_SPL to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SPL

Note that trats does not actually use SPL, so this option can no-longer be
set.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:57 -04:00
Simon Glass 719d36ee36 Convert CONFIG_CMD_SF_TEST to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SF_TEST

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:56 -04:00
Simon Glass efce2442d3 Convert CONFIG_CMD_SDRAM to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SDRAM

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:56 -04:00
Simon Glass 0941f597a2 Convert CONFIG_CMD_SCSI to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SCSI

Also update the Makefile to use CONFIG_CMD_SCSI instead of CONFIG_SCSI to
enable the command, fixing an earlier error.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[trini: Rework to default y if SCSI, drop cl-som-am57x which did not use
CMD_SCSI for real]
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-11 15:41:55 -04:00
Simon Glass 15dc63d646 Convert CONFIG_CMD_SAVES to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SAVES

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:55 -04:00
Simon Glass f8803a99fe Convert CONFIG_CMD_REISER to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_REISER

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:54 -04:00