[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Aspeed PATCH v47 18/19] hw/sd/sdcard: Add boot config support
From: |
Philippe Mathieu-Daudé |
Subject: |
[Aspeed PATCH v47 18/19] hw/sd/sdcard: Add boot config support |
Date: |
Tue, 9 Jul 2024 17:25:55 +0200 |
From: Joel Stanley <joel@jms.id.au>
With this correctly set we can use the enable bit to detect if
partition support is enabled.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
Also squash?
---
hw/sd/sd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 291497468f..6aa83251f7 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1047,6 +1047,12 @@ static uint32_t emmc_bootpart_offset(SDState *sd)
{
unsigned int access = sd->ext_csd[EXT_CSD_PART_CONFIG]
& EXT_CSD_PART_CONFIG_ACC_MASK;
+ unsigned int enable = sd->ext_csd[EXT_CSD_PART_CONFIG]
+ & EXT_CSD_PART_CONFIG_EN_MASK;
+
+ if (!enable) {
+ return 0;
+ }
switch (access) {
case EXT_CSD_PART_CONFIG_ACC_DEFAULT:
--
2.41.0
- Re: [PATCH v47 11/19] hw/sd/sdcard: Add eMMC 'boot-size' property, (continued)
- [PATCH v47 12/19] hw/sd/sdcard: Simplify EXT_CSD values for spec v4.3, Philippe Mathieu-Daudé, 2024/07/09
- [PATCH v47 13/19] hw/sd/sdcard: Migrate ExtCSD 'modes' register, Philippe Mathieu-Daudé, 2024/07/09
- [PATCH v47 14/19] hw/sd/sdcard: Add mmc SWITCH function support (CMD6), Philippe Mathieu-Daudé, 2024/07/09
- [PATCH v47 15/19] hw/sd/sdcard: Implement eMMC 'boot-mode', Philippe Mathieu-Daudé, 2024/07/09
- [Aspeed PATCH v47 16/19] hw/sd/sdcard: Support boot area in emmc image, Philippe Mathieu-Daudé, 2024/07/09
- [Aspeed PATCH v47 17/19] hw/sd/sdcard: Subtract bootarea size from blk, Philippe Mathieu-Daudé, 2024/07/09
- [Aspeed PATCH v47 18/19] hw/sd/sdcard: Add boot config support,
Philippe Mathieu-Daudé <=
- [PATCH v47 19/19] hw/sd/sdcard: Enable TYPE_EMMC card model, Philippe Mathieu-Daudé, 2024/07/09
- Re: [PATCH v47 00/19] hw/sd/sdcard: Add eMMC support, Cédric Le Goater, 2024/07/09