summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-04-03 11:03:52 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2024-04-04 08:26:50 +0200
commit4eacc5ff7e5fcbc5b44fef7693f39beb8b256e3a (patch)
tree8bb029154042dc11f5f7d6118067d650cdecef55 /include
parentc7d239a3fe1757f090fcaeaa59ba2ee9b634f869 (diff)
downloadbarebox-4eacc5ff7e5fcbc5b44fef7693f39beb8b256e3a.tar.gz
barebox-4eacc5ff7e5fcbc5b44fef7693f39beb8b256e3a.tar.xz
mci: improve packing of struct mci
rca will be at least 4-byte aligned due to being after a 4-byte member. It's only 2 byte long though and followed by another 4 byte member, wasting 2 bytes. Fill those up with the two 1-byte bool members we have. This includes a change of type for high_capacity: This is ok, because only 0 or 1 are ever saved into it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240403090353.2976380-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/mci.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/mci.h b/include/mci.h
index 52bf84ecdb..5781fb8ea3 100644
--- a/include/mci.h
+++ b/include/mci.h
@@ -559,15 +559,14 @@ struct mci {
struct mci_host *host; /**< the host for this card */
struct device dev; /**< the device for our disk (mcix) */
unsigned version;
- bool sdio; /**< card is a SDIO card */
- /** != 0 when a high capacity card is connected (OCR -> OCR_HCS) */
- int high_capacity;
unsigned card_caps; /**< Card's capabilities */
unsigned ocr; /**< card's "operation condition register" */
unsigned scr[2];
unsigned csd[4]; /**< card's "card specific data register" */
unsigned cid[4]; /**< card's "card identification register" */
unsigned short rca; /* FIXME */
+ bool sdio; /**< card is a SDIO card */
+ bool high_capacity; /**< high capacity card is connected (OCR -> OCR_HCS) */
unsigned tran_speed; /**< Maximum transfer speed */
/** currently used data block length for read accesses */
unsigned read_bl_len;