Commit Graph

26 Commits

Author SHA1 Message Date
Jason Zhu b75a3992f5 cmd: mmc: find current device first before find mmc device
Find the current device before find mmc device, otherwise '-1'
will be use as curr_device and error occur. The error log is
"MMC Device -1 not found".

Change-Id: Id6157f73d006f4bbe1c4d105244eb59ca7290c13
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-06-26 10:59:13 +08:00
Jason Zhu b68be486b3 cmd: optee: remove write data to efuse
Preventing customer misoperation causing efuse unused.

Change-Id: Ie0fc3e5d73fb005d73beb0c035580ca13b9b3ba1
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-02-25 09:01:35 +08:00
Hisping Lin df99e5808c cmd: add test case for secure storage
1.mmc testsecurestorage to test secure storage
2.test secure storage in rpmb and test secure storage in
  security partition when use emmc
3.test secure storage in security partition when use nand

Change-Id: Id6f72893c002c5040cb1790051c9685911878df7
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
2019-02-14 19:58:09 +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
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
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
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
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
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
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
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
Kever Yang 4dc80c8732 mmc: use new hwpart API when CONFIG_BLK enabled
When CONFIG_BLK is enabled, the hwpart id is different with legacy
interface, update it to kame driver work with CONFIG_BLK.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2017-07-19 19:13:59 +09:00
Markus Niebel 84c1dfe42f cmd_mmc: fix arg parsing for setdsr subcmd
The handler do_setdsr receives only the dsr parameter,
the action is parsed before.

Error was introduced when restructuring the mmc command
implementation in commit 1fd93c6e7d.

Reported-by: Michael Krummsdorf <Michael.Krummsdorf@tq-group.com>
Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-04-12 18:46:38 +02:00
Tomas Melin cd3d48807d mmc: add bkops-enable command
Add new command that provides possibility to enable the
background operations handshake functionality
(BKOPS_EN, EXT_CSD byte [163]) on eMMC devices.

This is an optional feature of eMMCs, the setting is write-once.
The command must be explicitly taken into use with
CONFIG_CMD_BKOPS_ENABLE.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
2016-12-01 11:09:44 +09:00
Simon Glass 9cf7b1a74c mmc: Drop dead mmc code for non-generic MMC
All boards that use MMC define CONFIG_GENERIC_MMC now, so we can drop this
old code.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-05-26 20:50:29 -06:00
Simon Glass c40fdca6b7 dm: mmc: Move the device list into a separate file
At present the MMC subsystem maintains its own list of MMC devices. This
cannot work with driver model, which needs to maintain this itself. Move the
list code into a separate 'legacy' file. The core MMC code remains, and will
be shared with the driver-model implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-05-17 09:54:43 -06:00
Simon Glass 69f45cd53b dm: mmc: Use the new select_hwpart() API
Avoid calling directly into the MMC code - use the new API call instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-05-17 09:54:43 -06:00
Simon Glass 3c457f4d2e dm: mmc: Drop the get_dev() function
This function is implemented by the legacy block functions now. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-05-17 09:54:43 -06:00
Marek Vasut b955e42bad mmc: Fix error in RPMB code
Since we do not build any board with CONFIG_SUPPORT_EMMC_RPMB , this
piece of code evaded conversion. Fix the following compiler error:

cmd/mmc.c: In function 'do_mmcrpmb':
cmd/mmc.c:316:32: error: 'struct blk_desc' has no member named 'part_num'
  original_part = mmc->block_dev.part_num;
                                ^

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
2016-05-05 21:35:38 -04:00
Eric Nelson bcfde7ffb0 mmc: use block layer in mmc command
Call blk_dread, blk_dwrite, blk_derase to ensure that the block cache is
used if enabled and to remove build breakage when CONFIG_BLK is enabled.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-04-01 17:18:28 -04:00
Simon Glass 3e8bd46950 dm: part: Rename some partition functions
Rename three partition functions so that they start with part_. This makes
it clear what they relate to.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
2016-03-14 15:34:50 -06:00
Simon Glass 4101f68792 dm: Drop the block_dev_desc_t typedef
Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long
and causes 80-column violations, rename it to struct blk_desc.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2016-03-14 15:34:50 -06:00
Simon Glass 2e192b245e Remove the cmd_ prefix from command files
Now that they are in their own directory, we can remove this prefix.
This makes it easier to find a file since the prefix does not get in the
way.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
2016-01-25 10:39:43 -05:00