Skip to contentSkip to conversation

mmc: sdhci-iproc: Use defines instead of magic numbers

PATCH New Stefan Wahren 4 participants 6 messages Jul 2, 2016 – Jul 6, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover mmc: sdhci-iproc: Use defines instead of magic numbers

Hi,

this small patch series should make the sdhci-iproc platform data easier to read. Since i don't have the adequate hardware it's only compile tested.

Stefan

Stefan Wahren (2):
mmc: sdhci: add define for suspend/resume capability
mmc: sdhci-iproc: Use defines instead of magic numbers

 drivers/mmc/host/sdhci-iproc.c |   13 +++++++++++--
 drivers/mmc/host/sdhci.h       |    1 +
 2 files changed, 12 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 mmc: sdhci: add define for suspend/resume capability

This patch adds the missing define for the suspend/resume capability (according to SD Host Controller spec).

---
 drivers/mmc/host/sdhci.h |    1 +
 1 file changed, 1 insertion(+)
drivers/mmc/host/sdhci.h +1 -0
index 609f87c..42584f0 100644
@@ -186,6 +186,7 @@
 #define  SDHCI_CAN_DO_ADMA1	0x00100000
 #define  SDHCI_CAN_DO_HISPD	0x00200000
 #define  SDHCI_CAN_DO_SDMA	0x00400000
+#define  SDHCI_CAN_DO_SUSPEND	0x00800000
 #define  SDHCI_CAN_VDD_330	0x01000000
 #define  SDHCI_CAN_VDD_300	0x02000000
 #define  SDHCI_CAN_VDD_180	0x04000000
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/2 mmc: sdhci-iproc: Use defines instead of magic numbers

In reply to Stefan Wahren

The capabilities in iproc platform data are magic numbers. So replace them with the proper capability defines to make it readable.

---
 drivers/mmc/host/sdhci-iproc.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci-iproc.c +11 -2
index 1110f73..53abecc 100644
@@ -164,8 +164,17 @@ static const struct sdhci_pltfm_data sdhci_iproc_pltfm_data = {
 
 static const struct sdhci_iproc_data iproc_data = {
 	.pdata = &sdhci_iproc_pltfm_data,
-	.caps = 0x05E90000,
-	.caps1 = 0x00000064,
+	.caps = ((0x1 << SDHCI_MAX_BLOCK_SHIFT)
+			& SDHCI_MAX_BLOCK_MASK) |
+		SDHCI_CAN_VDD_330 |
+		SDHCI_CAN_VDD_180 |
+		SDHCI_CAN_DO_SUSPEND |
+		SDHCI_CAN_DO_HISPD |
+		SDHCI_CAN_DO_ADMA2 |
+		SDHCI_CAN_DO_SDMA,
+	.caps1 = SDHCI_DRIVER_TYPE_C |
+		 SDHCI_DRIVER_TYPE_D |
+		 SDHCI_SUPPORT_DDR50,
 	.mmc_caps = MMC_CAP_1_8V_DDR,
 };
 
Signature · 1 line
1.7.9.5
#3 lore raw

cover mmc: sdhci-iproc: Use defines instead of magic numbers

In reply to Stefan Wahren

Hi Stefan,

Quoted 7 lines · Stefan Wahren

Hi,

this small patch series should make the sdhci-iproc platform data easier to read. Since i don't have the adequate hardware it's only compile tested.

Stefan

Quoted 8 lines

Stefan Wahren (2):
mmc: sdhci: add define for suspend/resume capability
mmc: sdhci-iproc: Use defines instead of magic numbers

  drivers/mmc/host/sdhci-iproc.c |   13 +++++++++++--
  drivers/mmc/host/sdhci.h       |    1 +
  2 files changed, 12 insertions(+), 2 deletions(-)

Patch series looks fine.

maintainer
#4 lore raw

cover mmc: sdhci-iproc: Use defines instead of magic numbers

Quoted 14 lines · Scott Branden

Hi Stefan,

Quoted 11 lines · Stefan Wahren

Hi,

this small patch series should make the sdhci-iproc platform data easier to read. Since i don't have the adequate hardware it's only compile tested.

Stefan

Stefan Wahren (2):
mmc: sdhci: add define for suspend/resume capability
mmc: sdhci-iproc: Use defines instead of magic numbers

Quoted 7 lines
Quoted 4 lines
  drivers/mmc/host/sdhci-iproc.c |   13 +++++++++++--
  drivers/mmc/host/sdhci.h       |    1 +
  2 files changed, 12 insertions(+), 2 deletions(-)

Patch series looks fine.

Applied
#5 lore raw

cover mmc: sdhci-iproc: Use defines instead of magic numbers

In reply to Stefan Wahren
Quoted 11 lines · Stefan Wahren

Hi,

this small patch series should make the sdhci-iproc platform data easier to read. Since i don't have the adequate hardware it's only compile tested.

Stefan

Stefan Wahren (2):
mmc: sdhci: add define for suspend/resume capability
mmc: sdhci-iproc: Use defines instead of magic numbers

Quoted 7 lines
 drivers/mmc/host/sdhci-iproc.c |   13 +++++++++++--
 drivers/mmc/host/sdhci.h       |    1 +
 2 files changed, 12 insertions(+), 2 deletions(-)

--
1.7.9.5

Thanks, applied for next!

Kind regards
Uffe