summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2023-04-18 11:30:37 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2023-04-21 08:29:45 +0200
commite2d068a89d3f7027ba14d9252acd002d90ac267b (patch)
treea9e01519c9d53177aec5703df71987d4c3ce1606 /include
parent3522c6f7472fa894b6c52e083bd70fb98b1711c1 (diff)
downloadbarebox-e2d068a89d3f7027ba14d9252acd002d90ac267b.tar.gz
mci: introduce new dedicated enum mmc_bus_width type
To make it clearer that a bus width of 8 is not equal to integer 8, let's give it a dedicated type. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230418093040.1865982-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/mci.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/mci.h b/include/mci.h
index c385673032..a3f6d619b3 100644
--- a/include/mci.h
+++ b/include/mci.h
@@ -410,16 +410,16 @@ enum mci_timing {
MMC_TIMING_MMC_HS400 = 8,
};
-struct mci_ios {
- unsigned int clock; /* clock rate */
-
- unsigned char bus_width; /* data bus width */
-
-#define MMC_BUS_WIDTH_1 0
-#define MMC_BUS_WIDTH_4 2
-#define MMC_BUS_WIDTH_8 3
+enum mci_bus_width {
+ MMC_BUS_WIDTH_1 = 0,
+ MMC_BUS_WIDTH_4 = 2,
+ MMC_BUS_WIDTH_8 = 3,
+};
- enum mci_timing timing; /* timing specification used */
+struct mci_ios {
+ unsigned int clock; /* clock rate */
+ enum mci_bus_width bus_width; /* data bus width */
+ enum mci_timing timing; /* timing specification used */
};
struct mci;
@@ -434,7 +434,7 @@ struct mci_host {
unsigned f_min; /**< host interface lower limit */
unsigned f_max; /**< host interface upper limit */
unsigned clock; /**< Current clock used to talk to the card */
- unsigned bus_width; /**< used data bus width to the card */
+ enum mci_bus_width bus_width; /**< used data bus width to the card */
enum mci_timing timing; /**< used timing specification to the card */
unsigned max_req_size;
unsigned dsr_val; /**< optional dsr value */