mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
cmd: mmc: provide boot area protection command
Provide command 'mmc wp' to power on write protect boot areas on eMMC devices. The B_PWR_WP_EN bit in the extended CSD register BOOT_WP is set. The boot area are write protected until the next power cycle occurs. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
committed by
Peng Fan
parent
d5210e4589
commit
0469d84636
@@ -907,6 +907,15 @@ struct blk_desc *mmc_get_blk_desc(struct mmc *mmc);
|
||||
*/
|
||||
int mmc_send_ext_csd(struct mmc *mmc, u8 *ext_csd);
|
||||
|
||||
/**
|
||||
* mmc_boot_wp() - power on write protect boot partitions
|
||||
*
|
||||
* The boot partitions are write protected until the next power cycle.
|
||||
*
|
||||
* Return: 0 for success
|
||||
*/
|
||||
int mmc_boot_wp(struct mmc *mmc);
|
||||
|
||||
static inline enum dma_data_direction mmc_get_dma_dir(struct mmc_data *data)
|
||||
{
|
||||
return data->flags & MMC_DATA_WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
|
||||
|
Reference in New Issue
Block a user