summary refs log tree commit diff stats
path: root/hw/sd/sdmmc-internal.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2025-09-01 07:56:24 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-09-02 17:58:05 +0200
commite2d7c1a3cdc46d6b2e8afa8db8a7ef4c2740a2fe (patch)
tree6a274d06e6166bf5277b6ff6ad99557d1e5efc7a /hw/sd/sdmmc-internal.h
parent79d472a51015f9c9ab341a5f56b8c450870c006b (diff)
downloadfocaccia-qemu-e2d7c1a3cdc46d6b2e8afa8db8a7ef4c2740a2fe.tar.gz
focaccia-qemu-e2d7c1a3cdc46d6b2e8afa8db8a7ef4c2740a2fe.zip
hw/sd/sdcard: Refactor sd_bootpart_offset
This function provides the offset for any partition in the block image,
not only the boot partitions, therefore rename it. Align the constant
names with the numbering scheme in the standard and use constants for
both boot partitions for consistency reasons. There is also no reason to
return early if boot_part_size is zero because the existing code will
provide the right value in that case as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <66e9b07476aad61820c4f42f4f984cc90752ba5e.1756706188.git.jan.kiszka@siemens.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/sd/sdmmc-internal.h')
-rw-r--r--hw/sd/sdmmc-internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/sd/sdmmc-internal.h b/hw/sd/sdmmc-internal.h
index 91eb5b6b2f..ce6bc4e6ec 100644
--- a/hw/sd/sdmmc-internal.h
+++ b/hw/sd/sdmmc-internal.h
@@ -116,7 +116,8 @@ DECLARE_OBJ_CHECKERS(SDState, SDCardClass, SDMMC_COMMON, TYPE_SDMMC_COMMON)
 
 #define EXT_CSD_PART_CONFIG_ACC_MASK            (0x7)
 #define EXT_CSD_PART_CONFIG_ACC_DEFAULT         (0x0)
-#define EXT_CSD_PART_CONFIG_ACC_BOOT0           (0x1)
+#define EXT_CSD_PART_CONFIG_ACC_BOOT1           (0x1)
+#define EXT_CSD_PART_CONFIG_ACC_BOOT2           (0x2)
 
 #define EXT_CSD_PART_CONFIG_EN_MASK             (0x7 << 3)
 #define EXT_CSD_PART_CONFIG_EN_BOOT0            (0x1 << 3)