mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 10:04:26 +00:00
refactor(mmc): replace magic value with new PART_CFG_BOOT_PARTITION_NO_ACCESS
Disabling access to the boot partition reverts the MMC to read from the user area. Add a macro to make this clearer. Suggested-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Change-Id: I34a5a987980bb4690d08d255f465b11a4697ed5a
This commit is contained in:
parent
f85041a657
commit
01c5dd5e59
2 changed files with 2 additions and 1 deletions
|
@ -778,7 +778,7 @@ int mmc_part_switch_user(void)
|
|||
{
|
||||
int ret;
|
||||
|
||||
ret = mmc_part_switch(0);
|
||||
ret = mmc_part_switch(PART_CFG_BOOT_PARTITION_NO_ACCESS);
|
||||
if (ret < 0) {
|
||||
ERROR("Failed to switch to user partition, %d\n", ret);
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
#define EXT_CSD_PART_CONFIG_ACC_MASK GENMASK(2, 0)
|
||||
#define PART_CFG_BOOT_PARTITION1_ENABLE (U(1) << 3)
|
||||
#define PART_CFG_BOOT_PARTITION1_ACCESS (U(1) << 0)
|
||||
#define PART_CFG_BOOT_PARTITION_NO_ACCESS U(0)
|
||||
#define PART_CFG_BOOT_PART_EN_MASK GENMASK(5, 3)
|
||||
#define PART_CFG_BOOT_PART_EN_SHIFT 3
|
||||
#define PART_CFG_CURRENT_BOOT_PARTITION(x) (((x) & PART_CFG_BOOT_PART_EN_MASK) >> \
|
||||
|
|
Loading…
Add table
Reference in a new issue