All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] mmc: sdhci-brcmstb: host controller clock enhancements
@ 2022-04-27 18:08 ` Kamal Dasu
  0 siblings, 0 replies; 24+ messages in thread
From: Kamal Dasu @ 2022-04-27 18:08 UTC (permalink / raw)
  To: ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel, Kamal Dasu

This change set contains broadcom settop sdhci controller clock related
improvements.

v2 changes:
 - Removed a redundant fix from patchset 
 - Implemented review comments for brcm,sdhci-brcmstb.yaml and
   sdhci-brcmstb.c for setting max-frequency for optional sdio_freq clock
 - Added Acked-by to two of the patches

Al Cooper (3):
  mmc: sdhci-brcmstb: Re-organize flags
  mmc: sdhci-brcmstb: Enable Clock Gating to save power
  mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0

Kamal Dasu (1):
  dt-bindings: mmc: Add Broadcom optional sdio_freq clock

 .../bindings/mmc/brcm,sdhci-brcmstb.yaml      | 24 ++++-
 drivers/mmc/host/sdhci-brcmstb.c              | 92 +++++++++++++++----
 2 files changed, 94 insertions(+), 22 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v2 0/4] mmc: sdhci-brcmstb: host controller clock enhancements
@ 2022-04-27 18:08 ` Kamal Dasu
  0 siblings, 0 replies; 24+ messages in thread
From: Kamal Dasu @ 2022-04-27 18:08 UTC (permalink / raw)
  To: ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel, Kamal Dasu

This change set contains broadcom settop sdhci controller clock related
improvements.

v2 changes:
 - Removed a redundant fix from patchset 
 - Implemented review comments for brcm,sdhci-brcmstb.yaml and
   sdhci-brcmstb.c for setting max-frequency for optional sdio_freq clock
 - Added Acked-by to two of the patches

Al Cooper (3):
  mmc: sdhci-brcmstb: Re-organize flags
  mmc: sdhci-brcmstb: Enable Clock Gating to save power
  mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0

Kamal Dasu (1):
  dt-bindings: mmc: Add Broadcom optional sdio_freq clock

 .../bindings/mmc/brcm,sdhci-brcmstb.yaml      | 24 ++++-
 drivers/mmc/host/sdhci-brcmstb.c              | 92 +++++++++++++++----
 2 files changed, 94 insertions(+), 22 deletions(-)

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v2 1/4] mmc: sdhci-brcmstb: Re-organize flags
  2022-04-27 18:08 ` Kamal Dasu
@ 2022-04-27 18:08   ` Kamal Dasu
  -1 siblings, 0 replies; 24+ messages in thread
From: Kamal Dasu @ 2022-04-27 18:08 UTC (permalink / raw)
  To: ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel, Kamal Dasu

From: Al Cooper <alcooperx@gmail.com>

Re-organize the flags by basing the bit names on the flag that they
apply to. Also change the "flags" member in the "brcmstb_match_priv"
struct to const.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/mmc/host/sdhci-brcmstb.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
index f24623aac2db..244780481193 100644
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -18,20 +18,22 @@
 #define SDHCI_VENDOR 0x78
 #define  SDHCI_VENDOR_ENHANCED_STRB 0x1
 
-#define BRCMSTB_PRIV_FLAGS_NO_64BIT		BIT(0)
-#define BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT	BIT(1)
+#define BRCMSTB_MATCH_FLAGS_NO_64BIT		BIT(0)
+#define BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT	BIT(1)
+
+#define BRCMSTB_PRIV_FLAGS_HAS_CQE		BIT(0)
 
 #define SDHCI_ARASAN_CQE_BASE_ADDR		0x200
 
 struct sdhci_brcmstb_priv {
 	void __iomem *cfg_regs;
-	bool has_cqe;
+	unsigned int flags;
 };
 
 struct brcmstb_match_priv {
 	void (*hs400es)(struct mmc_host *mmc, struct mmc_ios *ios);
 	struct sdhci_ops *ops;
-	unsigned int flags;
+	const unsigned int flags;
 };
 
 static void sdhci_brcmstb_hs400es(struct mmc_host *mmc, struct mmc_ios *ios)
@@ -134,13 +136,13 @@ static struct sdhci_ops sdhci_brcmstb_ops_7216 = {
 };
 
 static struct brcmstb_match_priv match_priv_7425 = {
-	.flags = BRCMSTB_PRIV_FLAGS_NO_64BIT |
-	BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT,
+	.flags = BRCMSTB_MATCH_FLAGS_NO_64BIT |
+	BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT,
 	.ops = &sdhci_brcmstb_ops,
 };
 
 static struct brcmstb_match_priv match_priv_7445 = {
-	.flags = BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT,
+	.flags = BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT,
 	.ops = &sdhci_brcmstb_ops,
 };
 
@@ -176,7 +178,7 @@ static int sdhci_brcmstb_add_host(struct sdhci_host *host,
 	bool dma64;
 	int ret;
 
-	if (!priv->has_cqe)
+	if ((priv->flags & BRCMSTB_PRIV_FLAGS_HAS_CQE) == 0)
 		return sdhci_add_host(host);
 
 	dev_dbg(mmc_dev(host->mmc), "CQE is enabled\n");
@@ -225,7 +227,6 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 	struct sdhci_brcmstb_priv *priv;
 	struct sdhci_host *host;
 	struct resource *iomem;
-	bool has_cqe = false;
 	struct clk *clk;
 	int res;
 
@@ -244,10 +245,6 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 		return res;
 
 	memset(&brcmstb_pdata, 0, sizeof(brcmstb_pdata));
-	if (device_property_read_bool(&pdev->dev, "supports-cqe")) {
-		has_cqe = true;
-		match_priv->ops->irq = sdhci_brcmstb_cqhci_irq;
-	}
 	brcmstb_pdata.ops = match_priv->ops;
 	host = sdhci_pltfm_init(pdev, &brcmstb_pdata,
 				sizeof(struct sdhci_brcmstb_priv));
@@ -258,7 +255,10 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 
 	pltfm_host = sdhci_priv(host);
 	priv = sdhci_pltfm_priv(pltfm_host);
-	priv->has_cqe = has_cqe;
+	if (device_property_read_bool(&pdev->dev, "supports-cqe")) {
+		priv->flags |= BRCMSTB_PRIV_FLAGS_HAS_CQE;
+		match_priv->ops->irq = sdhci_brcmstb_cqhci_irq;
+	}
 
 	/* Map in the non-standard CFG registers */
 	iomem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
@@ -287,14 +287,14 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 	 * properties through mmc_of_parse().
 	 */
 	host->caps = sdhci_readl(host, SDHCI_CAPABILITIES);
-	if (match_priv->flags & BRCMSTB_PRIV_FLAGS_NO_64BIT)
+	if (match_priv->flags & BRCMSTB_MATCH_FLAGS_NO_64BIT)
 		host->caps &= ~SDHCI_CAN_64BIT;
 	host->caps1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
 	host->caps1 &= ~(SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_SDR104 |
 			 SDHCI_SUPPORT_DDR50);
 	host->quirks |= SDHCI_QUIRK_MISSING_CAPS;
 
-	if (match_priv->flags & BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT)
+	if (match_priv->flags & BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT)
 		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
 
 	res = sdhci_brcmstb_add_host(host, priv);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 1/4] mmc: sdhci-brcmstb: Re-organize flags
@ 2022-04-27 18:08   ` Kamal Dasu
  0 siblings, 0 replies; 24+ messages in thread
From: Kamal Dasu @ 2022-04-27 18:08 UTC (permalink / raw)
  To: ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel, Kamal Dasu

From: Al Cooper <alcooperx@gmail.com>

Re-organize the flags by basing the bit names on the flag that they
apply to. Also change the "flags" member in the "brcmstb_match_priv"
struct to const.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/mmc/host/sdhci-brcmstb.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
index f24623aac2db..244780481193 100644
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -18,20 +18,22 @@
 #define SDHCI_VENDOR 0x78
 #define  SDHCI_VENDOR_ENHANCED_STRB 0x1
 
-#define BRCMSTB_PRIV_FLAGS_NO_64BIT		BIT(0)
-#define BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT	BIT(1)
+#define BRCMSTB_MATCH_FLAGS_NO_64BIT		BIT(0)
+#define BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT	BIT(1)
+
+#define BRCMSTB_PRIV_FLAGS_HAS_CQE		BIT(0)
 
 #define SDHCI_ARASAN_CQE_BASE_ADDR		0x200
 
 struct sdhci_brcmstb_priv {
 	void __iomem *cfg_regs;
-	bool has_cqe;
+	unsigned int flags;
 };
 
 struct brcmstb_match_priv {
 	void (*hs400es)(struct mmc_host *mmc, struct mmc_ios *ios);
 	struct sdhci_ops *ops;
-	unsigned int flags;
+	const unsigned int flags;
 };
 
 static void sdhci_brcmstb_hs400es(struct mmc_host *mmc, struct mmc_ios *ios)
@@ -134,13 +136,13 @@ static struct sdhci_ops sdhci_brcmstb_ops_7216 = {
 };
 
 static struct brcmstb_match_priv match_priv_7425 = {
-	.flags = BRCMSTB_PRIV_FLAGS_NO_64BIT |
-	BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT,
+	.flags = BRCMSTB_MATCH_FLAGS_NO_64BIT |
+	BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT,
 	.ops = &sdhci_brcmstb_ops,
 };
 
 static struct brcmstb_match_priv match_priv_7445 = {
-	.flags = BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT,
+	.flags = BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT,
 	.ops = &sdhci_brcmstb_ops,
 };
 
@@ -176,7 +178,7 @@ static int sdhci_brcmstb_add_host(struct sdhci_host *host,
 	bool dma64;
 	int ret;
 
-	if (!priv->has_cqe)
+	if ((priv->flags & BRCMSTB_PRIV_FLAGS_HAS_CQE) == 0)
 		return sdhci_add_host(host);
 
 	dev_dbg(mmc_dev(host->mmc), "CQE is enabled\n");
@@ -225,7 +227,6 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 	struct sdhci_brcmstb_priv *priv;
 	struct sdhci_host *host;
 	struct resource *iomem;
-	bool has_cqe = false;
 	struct clk *clk;
 	int res;
 
@@ -244,10 +245,6 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 		return res;
 
 	memset(&brcmstb_pdata, 0, sizeof(brcmstb_pdata));
-	if (device_property_read_bool(&pdev->dev, "supports-cqe")) {
-		has_cqe = true;
-		match_priv->ops->irq = sdhci_brcmstb_cqhci_irq;
-	}
 	brcmstb_pdata.ops = match_priv->ops;
 	host = sdhci_pltfm_init(pdev, &brcmstb_pdata,
 				sizeof(struct sdhci_brcmstb_priv));
@@ -258,7 +255,10 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 
 	pltfm_host = sdhci_priv(host);
 	priv = sdhci_pltfm_priv(pltfm_host);
-	priv->has_cqe = has_cqe;
+	if (device_property_read_bool(&pdev->dev, "supports-cqe")) {
+		priv->flags |= BRCMSTB_PRIV_FLAGS_HAS_CQE;
+		match_priv->ops->irq = sdhci_brcmstb_cqhci_irq;
+	}
 
 	/* Map in the non-standard CFG registers */
 	iomem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
@@ -287,14 +287,14 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 	 * properties through mmc_of_parse().
 	 */
 	host->caps = sdhci_readl(host, SDHCI_CAPABILITIES);
-	if (match_priv->flags & BRCMSTB_PRIV_FLAGS_NO_64BIT)
+	if (match_priv->flags & BRCMSTB_MATCH_FLAGS_NO_64BIT)
 		host->caps &= ~SDHCI_CAN_64BIT;
 	host->caps1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
 	host->caps1 &= ~(SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_SDR104 |
 			 SDHCI_SUPPORT_DDR50);
 	host->quirks |= SDHCI_QUIRK_MISSING_CAPS;
 
-	if (match_priv->flags & BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT)
+	if (match_priv->flags & BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT)
 		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
 
 	res = sdhci_brcmstb_add_host(host, priv);
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 2/4] mmc: sdhci-brcmstb: Enable Clock Gating to save power
  2022-04-27 18:08 ` Kamal Dasu
@ 2022-04-27 18:08   ` Kamal Dasu
  -1 siblings, 0 replies; 24+ messages in thread
From: Kamal Dasu @ 2022-04-27 18:08 UTC (permalink / raw)
  To: ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel, Kamal Dasu

From: Al Cooper <alcooperx@gmail.com>

Enabling this feature will allow the controller to stop the bus
clock when the bus is idle. The feature is not part of the standard
and is unique to newer Arasan cores and is enabled with a bit in a
vendor specific register. This feature will only be enabled for
non-removable devices because they don't switch the voltage and
clock gating breaks SD Card volatge switching.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/mmc/host/sdhci-brcmstb.c | 35 +++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
index 244780481193..683d0c685748 100644
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -17,11 +17,14 @@
 
 #define SDHCI_VENDOR 0x78
 #define  SDHCI_VENDOR_ENHANCED_STRB 0x1
+#define  SDHCI_VENDOR_GATE_SDCLK_EN 0x2
 
 #define BRCMSTB_MATCH_FLAGS_NO_64BIT		BIT(0)
 #define BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT	BIT(1)
+#define BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE	BIT(2)
 
 #define BRCMSTB_PRIV_FLAGS_HAS_CQE		BIT(0)
+#define BRCMSTB_PRIV_FLAGS_GATE_CLOCK		BIT(1)
 
 #define SDHCI_ARASAN_CQE_BASE_ADDR		0x200
 
@@ -36,6 +39,27 @@ struct brcmstb_match_priv {
 	const unsigned int flags;
 };
 
+static inline void enable_clock_gating(struct sdhci_host *host)
+{
+	u32 reg;
+
+	reg = sdhci_readl(host, SDHCI_VENDOR);
+	reg |= SDHCI_VENDOR_GATE_SDCLK_EN;
+	sdhci_writel(host, reg, SDHCI_VENDOR);
+}
+
+void brcmstb_reset(struct sdhci_host *host, u8 mask)
+{
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct sdhci_brcmstb_priv *priv = sdhci_pltfm_priv(pltfm_host);
+
+	sdhci_reset(host, mask);
+
+	/* Reset will clear this, so re-enable it */
+	if (priv->flags & BRCMSTB_PRIV_FLAGS_GATE_CLOCK)
+		enable_clock_gating(host);
+}
+
 static void sdhci_brcmstb_hs400es(struct mmc_host *mmc, struct mmc_ios *ios)
 {
 	struct sdhci_host *host = mmc_priv(mmc);
@@ -131,7 +155,7 @@ static struct sdhci_ops sdhci_brcmstb_ops = {
 static struct sdhci_ops sdhci_brcmstb_ops_7216 = {
 	.set_clock = sdhci_brcmstb_set_clock,
 	.set_bus_width = sdhci_set_bus_width,
-	.reset = sdhci_reset,
+	.reset = brcmstb_reset,
 	.set_uhs_signaling = sdhci_brcmstb_set_uhs_signaling,
 };
 
@@ -147,6 +171,7 @@ static struct brcmstb_match_priv match_priv_7445 = {
 };
 
 static const struct brcmstb_match_priv match_priv_7216 = {
+	.flags = BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE,
 	.hs400es = sdhci_brcmstb_hs400es,
 	.ops = &sdhci_brcmstb_ops_7216,
 };
@@ -273,6 +298,14 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 	if (res)
 		goto err;
 
+	/*
+	 * Automatic clock gating does not work for SD cards that may
+	 * voltage switch so only enable it for non-removable devices.
+	 */
+	if ((match_priv->flags & BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE) &&
+	    (host->mmc->caps & MMC_CAP_NONREMOVABLE))
+		priv->flags |= BRCMSTB_PRIV_FLAGS_GATE_CLOCK;
+
 	/*
 	 * If the chip has enhanced strobe and it's enabled, add
 	 * callback
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 2/4] mmc: sdhci-brcmstb: Enable Clock Gating to save power
@ 2022-04-27 18:08   ` Kamal Dasu
  0 siblings, 0 replies; 24+ messages in thread
From: Kamal Dasu @ 2022-04-27 18:08 UTC (permalink / raw)
  To: ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel, Kamal Dasu

From: Al Cooper <alcooperx@gmail.com>

Enabling this feature will allow the controller to stop the bus
clock when the bus is idle. The feature is not part of the standard
and is unique to newer Arasan cores and is enabled with a bit in a
vendor specific register. This feature will only be enabled for
non-removable devices because they don't switch the voltage and
clock gating breaks SD Card volatge switching.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/mmc/host/sdhci-brcmstb.c | 35 +++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
index 244780481193..683d0c685748 100644
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -17,11 +17,14 @@
 
 #define SDHCI_VENDOR 0x78
 #define  SDHCI_VENDOR_ENHANCED_STRB 0x1
+#define  SDHCI_VENDOR_GATE_SDCLK_EN 0x2
 
 #define BRCMSTB_MATCH_FLAGS_NO_64BIT		BIT(0)
 #define BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT	BIT(1)
+#define BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE	BIT(2)
 
 #define BRCMSTB_PRIV_FLAGS_HAS_CQE		BIT(0)
+#define BRCMSTB_PRIV_FLAGS_GATE_CLOCK		BIT(1)
 
 #define SDHCI_ARASAN_CQE_BASE_ADDR		0x200
 
@@ -36,6 +39,27 @@ struct brcmstb_match_priv {
 	const unsigned int flags;
 };
 
+static inline void enable_clock_gating(struct sdhci_host *host)
+{
+	u32 reg;
+
+	reg = sdhci_readl(host, SDHCI_VENDOR);
+	reg |= SDHCI_VENDOR_GATE_SDCLK_EN;
+	sdhci_writel(host, reg, SDHCI_VENDOR);
+}
+
+void brcmstb_reset(struct sdhci_host *host, u8 mask)
+{
+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+	struct sdhci_brcmstb_priv *priv = sdhci_pltfm_priv(pltfm_host);
+
+	sdhci_reset(host, mask);
+
+	/* Reset will clear this, so re-enable it */
+	if (priv->flags & BRCMSTB_PRIV_FLAGS_GATE_CLOCK)
+		enable_clock_gating(host);
+}
+
 static void sdhci_brcmstb_hs400es(struct mmc_host *mmc, struct mmc_ios *ios)
 {
 	struct sdhci_host *host = mmc_priv(mmc);
@@ -131,7 +155,7 @@ static struct sdhci_ops sdhci_brcmstb_ops = {
 static struct sdhci_ops sdhci_brcmstb_ops_7216 = {
 	.set_clock = sdhci_brcmstb_set_clock,
 	.set_bus_width = sdhci_set_bus_width,
-	.reset = sdhci_reset,
+	.reset = brcmstb_reset,
 	.set_uhs_signaling = sdhci_brcmstb_set_uhs_signaling,
 };
 
@@ -147,6 +171,7 @@ static struct brcmstb_match_priv match_priv_7445 = {
 };
 
 static const struct brcmstb_match_priv match_priv_7216 = {
+	.flags = BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE,
 	.hs400es = sdhci_brcmstb_hs400es,
 	.ops = &sdhci_brcmstb_ops_7216,
 };
@@ -273,6 +298,14 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 	if (res)
 		goto err;
 
+	/*
+	 * Automatic clock gating does not work for SD cards that may
+	 * voltage switch so only enable it for non-removable devices.
+	 */
+	if ((match_priv->flags & BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE) &&
+	    (host->mmc->caps & MMC_CAP_NONREMOVABLE))
+		priv->flags |= BRCMSTB_PRIV_FLAGS_GATE_CLOCK;
+
 	/*
 	 * If the chip has enhanced strobe and it's enabled, add
 	 * callback
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 3/4] dt-bindings: mmc: Add Broadcom optional sdio_freq clock
  2022-04-27 18:08 ` Kamal Dasu
@ 2022-04-27 18:08   ` Kamal Dasu
  -1 siblings, 0 replies; 24+ messages in thread
From: Kamal Dasu @ 2022-04-27 18:08 UTC (permalink / raw)
  To: ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel, Kamal Dasu

The 72116B0 has improved SDIO controllers that allow the max clock
rate to be increased from a max of 100MHz to a max of 150MHz.
Optional "sdio_freq" clock is used to drive the bus clock if present
optional property "max-frequency" specifies a base clock frequency
in Hz that overrides the base clock frequency in the CAPS registers.

Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
---
 .../bindings/mmc/brcm,sdhci-brcmstb.yaml      | 24 +++++++++++++++----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml b/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
index dccd5ad96981..bf716c0cf096 100644
--- a/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
+++ b/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
@@ -10,8 +10,6 @@ maintainers:
   - Al Cooper <alcooperx@gmail.com>
   - Florian Fainelli <f.fainelli@gmail.com>
 
-allOf:
-  - $ref: mmc-controller.yaml#
 
 properties:
   compatible:
@@ -42,23 +40,39 @@ properties:
     maxItems: 1
 
   clocks:
-    maxItems: 1
-    description:
-      handle to core clock for the sdhci controller.
+    minItems: 1
+    items:
+      - description: handle to core clock for the sdhci controller
+      - description: improved 150Mhz clock for sdhci controller (Optional clock)
 
   clock-names:
+    minItems: 1
     items:
       - const: sw_sdio
+      - const: sdio_freq # Optional clock
 
   sdhci,auto-cmd12:
     type: boolean
     description: Specifies that controller should use auto CMD12
 
+allOf:
+  - $ref: mmc-controller.yaml#
+  - if:
+      properties:
+        clock-names:
+          contains:
+            const: sdio_freq
+
+  - then:
+      required:
+        - max-frequency
+
 required:
   - compatible
   - reg
   - interrupts
   - clocks
+  - clock-names
 
 unevaluatedProperties: false
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 3/4] dt-bindings: mmc: Add Broadcom optional sdio_freq clock
@ 2022-04-27 18:08   ` Kamal Dasu
  0 siblings, 0 replies; 24+ messages in thread
From: Kamal Dasu @ 2022-04-27 18:08 UTC (permalink / raw)
  To: ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel, Kamal Dasu

The 72116B0 has improved SDIO controllers that allow the max clock
rate to be increased from a max of 100MHz to a max of 150MHz.
Optional "sdio_freq" clock is used to drive the bus clock if present
optional property "max-frequency" specifies a base clock frequency
in Hz that overrides the base clock frequency in the CAPS registers.

Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
---
 .../bindings/mmc/brcm,sdhci-brcmstb.yaml      | 24 +++++++++++++++----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml b/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
index dccd5ad96981..bf716c0cf096 100644
--- a/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
+++ b/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
@@ -10,8 +10,6 @@ maintainers:
   - Al Cooper <alcooperx@gmail.com>
   - Florian Fainelli <f.fainelli@gmail.com>
 
-allOf:
-  - $ref: mmc-controller.yaml#
 
 properties:
   compatible:
@@ -42,23 +40,39 @@ properties:
     maxItems: 1
 
   clocks:
-    maxItems: 1
-    description:
-      handle to core clock for the sdhci controller.
+    minItems: 1
+    items:
+      - description: handle to core clock for the sdhci controller
+      - description: improved 150Mhz clock for sdhci controller (Optional clock)
 
   clock-names:
+    minItems: 1
     items:
       - const: sw_sdio
+      - const: sdio_freq # Optional clock
 
   sdhci,auto-cmd12:
     type: boolean
     description: Specifies that controller should use auto CMD12
 
+allOf:
+  - $ref: mmc-controller.yaml#
+  - if:
+      properties:
+        clock-names:
+          contains:
+            const: sdio_freq
+
+  - then:
+      required:
+        - max-frequency
+
 required:
   - compatible
   - reg
   - interrupts
   - clocks
+  - clock-names
 
 unevaluatedProperties: false
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 4/4] mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0
  2022-04-27 18:08 ` Kamal Dasu
@ 2022-04-27 18:08   ` Kamal Dasu
  -1 siblings, 0 replies; 24+ messages in thread
From: Kamal Dasu @ 2022-04-27 18:08 UTC (permalink / raw)
  To: ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel, Kamal Dasu

From: Al Cooper <alcooperx@gmail.com>

The 72116B0 has improved SDIO controllers that allow the max clock
rate to be increased from a max of 100MHz to a max of 150MHz. The
driver will need to get the clock and increase it's default rate
and override the caps register, that still indicates a max of 100MHz.
The new clock will be named "sdio_freq" in the DT node's "clock-names"
list. The driver will use a DT property, "clock-frequency", to
enable this functionality and will get the actual rate in MHz
from the property to allow various speeds to be requested.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
---
 drivers/mmc/host/sdhci-brcmstb.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
index 683d0c685748..51a23e9f4535 100644
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -250,6 +250,7 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 	struct sdhci_pltfm_host *pltfm_host;
 	const struct of_device_id *match;
 	struct sdhci_brcmstb_priv *priv;
+	u32 base_clock_hz = 0;
 	struct sdhci_host *host;
 	struct resource *iomem;
 	struct clk *clk;
@@ -330,6 +331,30 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 	if (match_priv->flags & BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT)
 		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
 
+	/* Change the base clock frequency if the DT property exists */
+	if (device_property_read_u32(&pdev->dev, "max-frequency",
+				     &base_clock_hz) == 0) {
+		struct clk *master_clk;
+		u32 actual_clock_mhz;
+
+		master_clk = devm_clk_get(&pdev->dev, "sdio_freq");
+		if (IS_ERR(master_clk)) {
+			dev_warn(&pdev->dev,
+				 "Clock for \"sdio_freq\" was not found\n");
+		} else {
+			clk_set_rate(master_clk, base_clock_hz);
+			actual_clock_mhz = clk_get_rate(master_clk) / 1000000;
+
+			host->caps &= ~SDHCI_CLOCK_V3_BASE_MASK;
+			host->caps |=
+				(actual_clock_mhz << SDHCI_CLOCK_BASE_SHIFT);
+			/* Disable presets because they are now incorrect */
+			host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
+			dev_dbg(&pdev->dev,
+				"Base Clock Frequency changed to %dMHz\n",
+				actual_clock_mhz);
+		}
+	}
 	res = sdhci_brcmstb_add_host(host, priv);
 	if (res)
 		goto err;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 4/4] mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0
@ 2022-04-27 18:08   ` Kamal Dasu
  0 siblings, 0 replies; 24+ messages in thread
From: Kamal Dasu @ 2022-04-27 18:08 UTC (permalink / raw)
  To: ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel, Kamal Dasu

From: Al Cooper <alcooperx@gmail.com>

The 72116B0 has improved SDIO controllers that allow the max clock
rate to be increased from a max of 100MHz to a max of 150MHz. The
driver will need to get the clock and increase it's default rate
and override the caps register, that still indicates a max of 100MHz.
The new clock will be named "sdio_freq" in the DT node's "clock-names"
list. The driver will use a DT property, "clock-frequency", to
enable this functionality and will get the actual rate in MHz
from the property to allow various speeds to be requested.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
---
 drivers/mmc/host/sdhci-brcmstb.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
index 683d0c685748..51a23e9f4535 100644
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -250,6 +250,7 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 	struct sdhci_pltfm_host *pltfm_host;
 	const struct of_device_id *match;
 	struct sdhci_brcmstb_priv *priv;
+	u32 base_clock_hz = 0;
 	struct sdhci_host *host;
 	struct resource *iomem;
 	struct clk *clk;
@@ -330,6 +331,30 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
 	if (match_priv->flags & BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT)
 		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
 
+	/* Change the base clock frequency if the DT property exists */
+	if (device_property_read_u32(&pdev->dev, "max-frequency",
+				     &base_clock_hz) == 0) {
+		struct clk *master_clk;
+		u32 actual_clock_mhz;
+
+		master_clk = devm_clk_get(&pdev->dev, "sdio_freq");
+		if (IS_ERR(master_clk)) {
+			dev_warn(&pdev->dev,
+				 "Clock for \"sdio_freq\" was not found\n");
+		} else {
+			clk_set_rate(master_clk, base_clock_hz);
+			actual_clock_mhz = clk_get_rate(master_clk) / 1000000;
+
+			host->caps &= ~SDHCI_CLOCK_V3_BASE_MASK;
+			host->caps |=
+				(actual_clock_mhz << SDHCI_CLOCK_BASE_SHIFT);
+			/* Disable presets because they are now incorrect */
+			host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
+			dev_dbg(&pdev->dev,
+				"Base Clock Frequency changed to %dMHz\n",
+				actual_clock_mhz);
+		}
+	}
 	res = sdhci_brcmstb_add_host(host, priv);
 	if (res)
 		goto err;
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 2/4] mmc: sdhci-brcmstb: Enable Clock Gating to save power
  2022-04-27 18:08   ` Kamal Dasu
@ 2022-04-27 21:39     ` Ulf Hansson
  -1 siblings, 0 replies; 24+ messages in thread
From: Ulf Hansson @ 2022-04-27 21:39 UTC (permalink / raw)
  To: Kamal Dasu
  Cc: robh+dt, krzk+dt, alcooperx, f.fainelli,
	bcm-kernel-feedback-list, adrian.hunter, linux-mmc, devicetree,
	linux-arm-kernel

On Wed, 27 Apr 2022 at 20:09, Kamal Dasu <kdasu.kdev@gmail.com> wrote:
>
> From: Al Cooper <alcooperx@gmail.com>
>
> Enabling this feature will allow the controller to stop the bus
> clock when the bus is idle. The feature is not part of the standard
> and is unique to newer Arasan cores and is enabled with a bit in a
> vendor specific register. This feature will only be enabled for
> non-removable devices because they don't switch the voltage and
> clock gating breaks SD Card volatge switching.

Rather than using a HW specific thing for this, it may be better to
use runtime PM. There are plenty of examples to get inspired from, so
it should be rather easy to implement, I think. More importantly, it
should work for both (e)MMC and SD cards, unless there are some
specific things to manage for this controller.

When it comes to SDIO, some driver simply bumps the runtime PM usage
count (pm_runtime_get_noresume()) to prevent the device from being
runtime suspended. There are ways to work around this, let me know if
you need some guidance around how to fix that too.

That said, I am not entirely opposed to $subject patch, but I wanted
to point out that there are better alternatives.

Kind regards
Uffe

>
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
> Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>  drivers/mmc/host/sdhci-brcmstb.c | 35 +++++++++++++++++++++++++++++++-
>  1 file changed, 34 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
> index 244780481193..683d0c685748 100644
> --- a/drivers/mmc/host/sdhci-brcmstb.c
> +++ b/drivers/mmc/host/sdhci-brcmstb.c
> @@ -17,11 +17,14 @@
>
>  #define SDHCI_VENDOR 0x78
>  #define  SDHCI_VENDOR_ENHANCED_STRB 0x1
> +#define  SDHCI_VENDOR_GATE_SDCLK_EN 0x2
>
>  #define BRCMSTB_MATCH_FLAGS_NO_64BIT           BIT(0)
>  #define BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT     BIT(1)
> +#define BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE     BIT(2)
>
>  #define BRCMSTB_PRIV_FLAGS_HAS_CQE             BIT(0)
> +#define BRCMSTB_PRIV_FLAGS_GATE_CLOCK          BIT(1)
>
>  #define SDHCI_ARASAN_CQE_BASE_ADDR             0x200
>
> @@ -36,6 +39,27 @@ struct brcmstb_match_priv {
>         const unsigned int flags;
>  };
>
> +static inline void enable_clock_gating(struct sdhci_host *host)
> +{
> +       u32 reg;
> +
> +       reg = sdhci_readl(host, SDHCI_VENDOR);
> +       reg |= SDHCI_VENDOR_GATE_SDCLK_EN;
> +       sdhci_writel(host, reg, SDHCI_VENDOR);
> +}
> +
> +void brcmstb_reset(struct sdhci_host *host, u8 mask)
> +{
> +       struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> +       struct sdhci_brcmstb_priv *priv = sdhci_pltfm_priv(pltfm_host);
> +
> +       sdhci_reset(host, mask);
> +
> +       /* Reset will clear this, so re-enable it */
> +       if (priv->flags & BRCMSTB_PRIV_FLAGS_GATE_CLOCK)
> +               enable_clock_gating(host);
> +}
> +
>  static void sdhci_brcmstb_hs400es(struct mmc_host *mmc, struct mmc_ios *ios)
>  {
>         struct sdhci_host *host = mmc_priv(mmc);
> @@ -131,7 +155,7 @@ static struct sdhci_ops sdhci_brcmstb_ops = {
>  static struct sdhci_ops sdhci_brcmstb_ops_7216 = {
>         .set_clock = sdhci_brcmstb_set_clock,
>         .set_bus_width = sdhci_set_bus_width,
> -       .reset = sdhci_reset,
> +       .reset = brcmstb_reset,
>         .set_uhs_signaling = sdhci_brcmstb_set_uhs_signaling,
>  };
>
> @@ -147,6 +171,7 @@ static struct brcmstb_match_priv match_priv_7445 = {
>  };
>
>  static const struct brcmstb_match_priv match_priv_7216 = {
> +       .flags = BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE,
>         .hs400es = sdhci_brcmstb_hs400es,
>         .ops = &sdhci_brcmstb_ops_7216,
>  };
> @@ -273,6 +298,14 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>         if (res)
>                 goto err;
>
> +       /*
> +        * Automatic clock gating does not work for SD cards that may
> +        * voltage switch so only enable it for non-removable devices.
> +        */
> +       if ((match_priv->flags & BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE) &&
> +           (host->mmc->caps & MMC_CAP_NONREMOVABLE))
> +               priv->flags |= BRCMSTB_PRIV_FLAGS_GATE_CLOCK;
> +
>         /*
>          * If the chip has enhanced strobe and it's enabled, add
>          * callback
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 2/4] mmc: sdhci-brcmstb: Enable Clock Gating to save power
@ 2022-04-27 21:39     ` Ulf Hansson
  0 siblings, 0 replies; 24+ messages in thread
From: Ulf Hansson @ 2022-04-27 21:39 UTC (permalink / raw)
  To: Kamal Dasu
  Cc: robh+dt, krzk+dt, alcooperx, f.fainelli,
	bcm-kernel-feedback-list, adrian.hunter, linux-mmc, devicetree,
	linux-arm-kernel

On Wed, 27 Apr 2022 at 20:09, Kamal Dasu <kdasu.kdev@gmail.com> wrote:
>
> From: Al Cooper <alcooperx@gmail.com>
>
> Enabling this feature will allow the controller to stop the bus
> clock when the bus is idle. The feature is not part of the standard
> and is unique to newer Arasan cores and is enabled with a bit in a
> vendor specific register. This feature will only be enabled for
> non-removable devices because they don't switch the voltage and
> clock gating breaks SD Card volatge switching.

Rather than using a HW specific thing for this, it may be better to
use runtime PM. There are plenty of examples to get inspired from, so
it should be rather easy to implement, I think. More importantly, it
should work for both (e)MMC and SD cards, unless there are some
specific things to manage for this controller.

When it comes to SDIO, some driver simply bumps the runtime PM usage
count (pm_runtime_get_noresume()) to prevent the device from being
runtime suspended. There are ways to work around this, let me know if
you need some guidance around how to fix that too.

That said, I am not entirely opposed to $subject patch, but I wanted
to point out that there are better alternatives.

Kind regards
Uffe

>
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
> Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>  drivers/mmc/host/sdhci-brcmstb.c | 35 +++++++++++++++++++++++++++++++-
>  1 file changed, 34 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
> index 244780481193..683d0c685748 100644
> --- a/drivers/mmc/host/sdhci-brcmstb.c
> +++ b/drivers/mmc/host/sdhci-brcmstb.c
> @@ -17,11 +17,14 @@
>
>  #define SDHCI_VENDOR 0x78
>  #define  SDHCI_VENDOR_ENHANCED_STRB 0x1
> +#define  SDHCI_VENDOR_GATE_SDCLK_EN 0x2
>
>  #define BRCMSTB_MATCH_FLAGS_NO_64BIT           BIT(0)
>  #define BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT     BIT(1)
> +#define BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE     BIT(2)
>
>  #define BRCMSTB_PRIV_FLAGS_HAS_CQE             BIT(0)
> +#define BRCMSTB_PRIV_FLAGS_GATE_CLOCK          BIT(1)
>
>  #define SDHCI_ARASAN_CQE_BASE_ADDR             0x200
>
> @@ -36,6 +39,27 @@ struct brcmstb_match_priv {
>         const unsigned int flags;
>  };
>
> +static inline void enable_clock_gating(struct sdhci_host *host)
> +{
> +       u32 reg;
> +
> +       reg = sdhci_readl(host, SDHCI_VENDOR);
> +       reg |= SDHCI_VENDOR_GATE_SDCLK_EN;
> +       sdhci_writel(host, reg, SDHCI_VENDOR);
> +}
> +
> +void brcmstb_reset(struct sdhci_host *host, u8 mask)
> +{
> +       struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> +       struct sdhci_brcmstb_priv *priv = sdhci_pltfm_priv(pltfm_host);
> +
> +       sdhci_reset(host, mask);
> +
> +       /* Reset will clear this, so re-enable it */
> +       if (priv->flags & BRCMSTB_PRIV_FLAGS_GATE_CLOCK)
> +               enable_clock_gating(host);
> +}
> +
>  static void sdhci_brcmstb_hs400es(struct mmc_host *mmc, struct mmc_ios *ios)
>  {
>         struct sdhci_host *host = mmc_priv(mmc);
> @@ -131,7 +155,7 @@ static struct sdhci_ops sdhci_brcmstb_ops = {
>  static struct sdhci_ops sdhci_brcmstb_ops_7216 = {
>         .set_clock = sdhci_brcmstb_set_clock,
>         .set_bus_width = sdhci_set_bus_width,
> -       .reset = sdhci_reset,
> +       .reset = brcmstb_reset,
>         .set_uhs_signaling = sdhci_brcmstb_set_uhs_signaling,
>  };
>
> @@ -147,6 +171,7 @@ static struct brcmstb_match_priv match_priv_7445 = {
>  };
>
>  static const struct brcmstb_match_priv match_priv_7216 = {
> +       .flags = BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE,
>         .hs400es = sdhci_brcmstb_hs400es,
>         .ops = &sdhci_brcmstb_ops_7216,
>  };
> @@ -273,6 +298,14 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>         if (res)
>                 goto err;
>
> +       /*
> +        * Automatic clock gating does not work for SD cards that may
> +        * voltage switch so only enable it for non-removable devices.
> +        */
> +       if ((match_priv->flags & BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE) &&
> +           (host->mmc->caps & MMC_CAP_NONREMOVABLE))
> +               priv->flags |= BRCMSTB_PRIV_FLAGS_GATE_CLOCK;
> +
>         /*
>          * If the chip has enhanced strobe and it's enabled, add
>          * callback
> --
> 2.17.1
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 2/4] mmc: sdhci-brcmstb: Enable Clock Gating to save power
  2022-04-27 21:39     ` Ulf Hansson
@ 2022-04-27 21:43       ` Florian Fainelli
  -1 siblings, 0 replies; 24+ messages in thread
From: Florian Fainelli @ 2022-04-27 21:43 UTC (permalink / raw)
  To: Ulf Hansson, Kamal Dasu
  Cc: robh+dt, krzk+dt, alcooperx, bcm-kernel-feedback-list,
	adrian.hunter, linux-mmc, devicetree, linux-arm-kernel

On 4/27/22 14:39, Ulf Hansson wrote:
> On Wed, 27 Apr 2022 at 20:09, Kamal Dasu <kdasu.kdev@gmail.com> wrote:
>>
>> From: Al Cooper <alcooperx@gmail.com>
>>
>> Enabling this feature will allow the controller to stop the bus
>> clock when the bus is idle. The feature is not part of the standard
>> and is unique to newer Arasan cores and is enabled with a bit in a
>> vendor specific register. This feature will only be enabled for
>> non-removable devices because they don't switch the voltage and
>> clock gating breaks SD Card volatge switching.
> 
> Rather than using a HW specific thing for this, it may be better to
> use runtime PM. There are plenty of examples to get inspired from, so
> it should be rather easy to implement, I think. More importantly, it
> should work for both (e)MMC and SD cards, unless there are some
> specific things to manage for this controller.
> 
> When it comes to SDIO, some driver simply bumps the runtime PM usage
> count (pm_runtime_get_noresume()) to prevent the device from being
> runtime suspended. There are ways to work around this, let me know if
> you need some guidance around how to fix that too.
> 
> That said, I am not entirely opposed to $subject patch, but I wanted
> to point out that there are better alternatives.

This is a good suggestion, I would not consider runtime PM and enabling 
the clock gating as being alternatives to one another, but rather 
complementary.
-- 
Florian

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 2/4] mmc: sdhci-brcmstb: Enable Clock Gating to save power
@ 2022-04-27 21:43       ` Florian Fainelli
  0 siblings, 0 replies; 24+ messages in thread
From: Florian Fainelli @ 2022-04-27 21:43 UTC (permalink / raw)
  To: Ulf Hansson, Kamal Dasu
  Cc: robh+dt, krzk+dt, alcooperx, bcm-kernel-feedback-list,
	adrian.hunter, linux-mmc, devicetree, linux-arm-kernel

On 4/27/22 14:39, Ulf Hansson wrote:
> On Wed, 27 Apr 2022 at 20:09, Kamal Dasu <kdasu.kdev@gmail.com> wrote:
>>
>> From: Al Cooper <alcooperx@gmail.com>
>>
>> Enabling this feature will allow the controller to stop the bus
>> clock when the bus is idle. The feature is not part of the standard
>> and is unique to newer Arasan cores and is enabled with a bit in a
>> vendor specific register. This feature will only be enabled for
>> non-removable devices because they don't switch the voltage and
>> clock gating breaks SD Card volatge switching.
> 
> Rather than using a HW specific thing for this, it may be better to
> use runtime PM. There are plenty of examples to get inspired from, so
> it should be rather easy to implement, I think. More importantly, it
> should work for both (e)MMC and SD cards, unless there are some
> specific things to manage for this controller.
> 
> When it comes to SDIO, some driver simply bumps the runtime PM usage
> count (pm_runtime_get_noresume()) to prevent the device from being
> runtime suspended. There are ways to work around this, let me know if
> you need some guidance around how to fix that too.
> 
> That said, I am not entirely opposed to $subject patch, but I wanted
> to point out that there are better alternatives.

This is a good suggestion, I would not consider runtime PM and enabling 
the clock gating as being alternatives to one another, but rather 
complementary.
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 4/4] mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0
  2022-04-27 18:08   ` Kamal Dasu
@ 2022-04-27 21:49     ` Florian Fainelli
  -1 siblings, 0 replies; 24+ messages in thread
From: Florian Fainelli @ 2022-04-27 21:49 UTC (permalink / raw)
  To: Kamal Dasu, ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: bcm-kernel-feedback-list, adrian.hunter, linux-mmc, devicetree,
	linux-arm-kernel

On 4/27/22 11:08, Kamal Dasu wrote:
> From: Al Cooper <alcooperx@gmail.com>
> 
> The 72116B0 has improved SDIO controllers that allow the max clock
> rate to be increased from a max of 100MHz to a max of 150MHz. The
> driver will need to get the clock and increase it's default rate
> and override the caps register, that still indicates a max of 100MHz.
> The new clock will be named "sdio_freq" in the DT node's "clock-names"
> list. The driver will use a DT property, "clock-frequency", to
> enable this functionality and will get the actual rate in MHz
> from the property to allow various speeds to be requested.
> 
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
> Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
> ---
>   drivers/mmc/host/sdhci-brcmstb.c | 25 +++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
> index 683d0c685748..51a23e9f4535 100644
> --- a/drivers/mmc/host/sdhci-brcmstb.c
> +++ b/drivers/mmc/host/sdhci-brcmstb.c
> @@ -250,6 +250,7 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>   	struct sdhci_pltfm_host *pltfm_host;
>   	const struct of_device_id *match;
>   	struct sdhci_brcmstb_priv *priv;
> +	u32 base_clock_hz = 0;
>   	struct sdhci_host *host;
>   	struct resource *iomem;
>   	struct clk *clk;
> @@ -330,6 +331,30 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>   	if (match_priv->flags & BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT)
>   		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>   
> +	/* Change the base clock frequency if the DT property exists */
> +	if (device_property_read_u32(&pdev->dev, "max-frequency",
> +				     &base_clock_hz) == 0) {
> +		struct clk *master_clk;
> +		u32 actual_clock_mhz;
> +
> +		master_clk = devm_clk_get(&pdev->dev, "sdio_freq");
> +		if (IS_ERR(master_clk)) {
> +			dev_warn(&pdev->dev,
> +				 "Clock for \"sdio_freq\" was not found\n");
> +		} else {
> +			clk_set_rate(master_clk, base_clock_hz);

It seems to me that you should enable the clock before getting its rate, 
otherwise this may not return a valid rate. You might also consider 
reducing the indentation a little bit by using a label.
-- 
Florian

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 4/4] mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0
@ 2022-04-27 21:49     ` Florian Fainelli
  0 siblings, 0 replies; 24+ messages in thread
From: Florian Fainelli @ 2022-04-27 21:49 UTC (permalink / raw)
  To: Kamal Dasu, ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: bcm-kernel-feedback-list, adrian.hunter, linux-mmc, devicetree,
	linux-arm-kernel

On 4/27/22 11:08, Kamal Dasu wrote:
> From: Al Cooper <alcooperx@gmail.com>
> 
> The 72116B0 has improved SDIO controllers that allow the max clock
> rate to be increased from a max of 100MHz to a max of 150MHz. The
> driver will need to get the clock and increase it's default rate
> and override the caps register, that still indicates a max of 100MHz.
> The new clock will be named "sdio_freq" in the DT node's "clock-names"
> list. The driver will use a DT property, "clock-frequency", to
> enable this functionality and will get the actual rate in MHz
> from the property to allow various speeds to be requested.
> 
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
> Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
> ---
>   drivers/mmc/host/sdhci-brcmstb.c | 25 +++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
> index 683d0c685748..51a23e9f4535 100644
> --- a/drivers/mmc/host/sdhci-brcmstb.c
> +++ b/drivers/mmc/host/sdhci-brcmstb.c
> @@ -250,6 +250,7 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>   	struct sdhci_pltfm_host *pltfm_host;
>   	const struct of_device_id *match;
>   	struct sdhci_brcmstb_priv *priv;
> +	u32 base_clock_hz = 0;
>   	struct sdhci_host *host;
>   	struct resource *iomem;
>   	struct clk *clk;
> @@ -330,6 +331,30 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>   	if (match_priv->flags & BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT)
>   		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>   
> +	/* Change the base clock frequency if the DT property exists */
> +	if (device_property_read_u32(&pdev->dev, "max-frequency",
> +				     &base_clock_hz) == 0) {
> +		struct clk *master_clk;
> +		u32 actual_clock_mhz;
> +
> +		master_clk = devm_clk_get(&pdev->dev, "sdio_freq");
> +		if (IS_ERR(master_clk)) {
> +			dev_warn(&pdev->dev,
> +				 "Clock for \"sdio_freq\" was not found\n");
> +		} else {
> +			clk_set_rate(master_clk, base_clock_hz);

It seems to me that you should enable the clock before getting its rate, 
otherwise this may not return a valid rate. You might also consider 
reducing the indentation a little bit by using a label.
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] dt-bindings: mmc: Add Broadcom optional sdio_freq clock
  2022-04-27 18:08   ` Kamal Dasu
@ 2022-04-28  8:12     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-28  8:12 UTC (permalink / raw)
  To: Kamal Dasu, ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel

On 27/04/2022 20:08, Kamal Dasu wrote:

Thank you for your patch. There is something to discuss/improve.

>  
>    clocks:
> -    maxItems: 1
> -    description:
> -      handle to core clock for the sdhci controller.
> +    minItems: 1
> +    items:
> +      - description: handle to core clock for the sdhci controller
> +      - description: improved 150Mhz clock for sdhci controller (Optional clock)
>  
>    clock-names:
> +    minItems: 1
>      items:
>        - const: sw_sdio
> +      - const: sdio_freq # Optional clock
>  
>    sdhci,auto-cmd12:
>      type: boolean
>      description: Specifies that controller should use auto CMD12
>  
> +allOf:
> +  - $ref: mmc-controller.yaml#
> +  - if:
> +      properties:
> +        clock-names:
> +          contains:
> +            const: sdio_freq
> +
> +  - then:

This won't work. Please test your bindings.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] dt-bindings: mmc: Add Broadcom optional sdio_freq clock
@ 2022-04-28  8:12     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-28  8:12 UTC (permalink / raw)
  To: Kamal Dasu, ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel

On 27/04/2022 20:08, Kamal Dasu wrote:

Thank you for your patch. There is something to discuss/improve.

>  
>    clocks:
> -    maxItems: 1
> -    description:
> -      handle to core clock for the sdhci controller.
> +    minItems: 1
> +    items:
> +      - description: handle to core clock for the sdhci controller
> +      - description: improved 150Mhz clock for sdhci controller (Optional clock)
>  
>    clock-names:
> +    minItems: 1
>      items:
>        - const: sw_sdio
> +      - const: sdio_freq # Optional clock
>  
>    sdhci,auto-cmd12:
>      type: boolean
>      description: Specifies that controller should use auto CMD12
>  
> +allOf:
> +  - $ref: mmc-controller.yaml#
> +  - if:
> +      properties:
> +        clock-names:
> +          contains:
> +            const: sdio_freq
> +
> +  - then:

This won't work. Please test your bindings.


Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] dt-bindings: mmc: Add Broadcom optional sdio_freq clock
  2022-04-27 18:08   ` Kamal Dasu
@ 2022-04-28  8:14     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-28  8:14 UTC (permalink / raw)
  To: Kamal Dasu, ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel

On 27/04/2022 20:08, Kamal Dasu wrote:
> The 72116B0 has improved SDIO controllers that allow the max clock
> rate to be increased from a max of 100MHz to a max of 150MHz.
> Optional "sdio_freq" clock is used to drive the bus clock if present
> optional property "max-frequency" specifies a base clock frequency
> in Hz that overrides the base clock frequency in the CAPS registers.
> 
> Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
> ---
>  .../bindings/mmc/brcm,sdhci-brcmstb.yaml      | 24 +++++++++++++++----
>  1 file changed, 19 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml b/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
> index dccd5ad96981..bf716c0cf096 100644
> --- a/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
> +++ b/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
> @@ -10,8 +10,6 @@ maintainers:
>    - Al Cooper <alcooperx@gmail.com>
>    - Florian Fainelli <f.fainelli@gmail.com>
>  
> -allOf:
> -  - $ref: mmc-controller.yaml#
You also leave here too many blank lines.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/4] dt-bindings: mmc: Add Broadcom optional sdio_freq clock
@ 2022-04-28  8:14     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-28  8:14 UTC (permalink / raw)
  To: Kamal Dasu, ulf.hansson, robh+dt, krzk+dt, alcooperx
  Cc: f.fainelli, bcm-kernel-feedback-list, adrian.hunter, linux-mmc,
	devicetree, linux-arm-kernel

On 27/04/2022 20:08, Kamal Dasu wrote:
> The 72116B0 has improved SDIO controllers that allow the max clock
> rate to be increased from a max of 100MHz to a max of 150MHz.
> Optional "sdio_freq" clock is used to drive the bus clock if present
> optional property "max-frequency" specifies a base clock frequency
> in Hz that overrides the base clock frequency in the CAPS registers.
> 
> Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
> ---
>  .../bindings/mmc/brcm,sdhci-brcmstb.yaml      | 24 +++++++++++++++----
>  1 file changed, 19 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml b/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
> index dccd5ad96981..bf716c0cf096 100644
> --- a/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
> +++ b/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
> @@ -10,8 +10,6 @@ maintainers:
>    - Al Cooper <alcooperx@gmail.com>
>    - Florian Fainelli <f.fainelli@gmail.com>
>  
> -allOf:
> -  - $ref: mmc-controller.yaml#
You also leave here too many blank lines.


Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] mmc: sdhci-brcmstb: Re-organize flags
  2022-04-27 18:08   ` Kamal Dasu
@ 2022-05-04 10:37     ` Ulf Hansson
  -1 siblings, 0 replies; 24+ messages in thread
From: Ulf Hansson @ 2022-05-04 10:37 UTC (permalink / raw)
  To: Kamal Dasu
  Cc: robh+dt, krzk+dt, alcooperx, f.fainelli,
	bcm-kernel-feedback-list, adrian.hunter, linux-mmc, devicetree,
	linux-arm-kernel

On Wed, 27 Apr 2022 at 20:09, Kamal Dasu <kdasu.kdev@gmail.com> wrote:
>
> From: Al Cooper <alcooperx@gmail.com>
>
> Re-organize the flags by basing the bit names on the flag that they
> apply to. Also change the "flags" member in the "brcmstb_match_priv"
> struct to const.
>
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
> Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-brcmstb.c | 32 ++++++++++++++++----------------
>  1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
> index f24623aac2db..244780481193 100644
> --- a/drivers/mmc/host/sdhci-brcmstb.c
> +++ b/drivers/mmc/host/sdhci-brcmstb.c
> @@ -18,20 +18,22 @@
>  #define SDHCI_VENDOR 0x78
>  #define  SDHCI_VENDOR_ENHANCED_STRB 0x1
>
> -#define BRCMSTB_PRIV_FLAGS_NO_64BIT            BIT(0)
> -#define BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT      BIT(1)
> +#define BRCMSTB_MATCH_FLAGS_NO_64BIT           BIT(0)
> +#define BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT     BIT(1)
> +
> +#define BRCMSTB_PRIV_FLAGS_HAS_CQE             BIT(0)
>
>  #define SDHCI_ARASAN_CQE_BASE_ADDR             0x200
>
>  struct sdhci_brcmstb_priv {
>         void __iomem *cfg_regs;
> -       bool has_cqe;
> +       unsigned int flags;
>  };
>
>  struct brcmstb_match_priv {
>         void (*hs400es)(struct mmc_host *mmc, struct mmc_ios *ios);
>         struct sdhci_ops *ops;
> -       unsigned int flags;
> +       const unsigned int flags;
>  };
>
>  static void sdhci_brcmstb_hs400es(struct mmc_host *mmc, struct mmc_ios *ios)
> @@ -134,13 +136,13 @@ static struct sdhci_ops sdhci_brcmstb_ops_7216 = {
>  };
>
>  static struct brcmstb_match_priv match_priv_7425 = {
> -       .flags = BRCMSTB_PRIV_FLAGS_NO_64BIT |
> -       BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT,
> +       .flags = BRCMSTB_MATCH_FLAGS_NO_64BIT |
> +       BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT,
>         .ops = &sdhci_brcmstb_ops,
>  };
>
>  static struct brcmstb_match_priv match_priv_7445 = {
> -       .flags = BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT,
> +       .flags = BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT,
>         .ops = &sdhci_brcmstb_ops,
>  };
>
> @@ -176,7 +178,7 @@ static int sdhci_brcmstb_add_host(struct sdhci_host *host,
>         bool dma64;
>         int ret;
>
> -       if (!priv->has_cqe)
> +       if ((priv->flags & BRCMSTB_PRIV_FLAGS_HAS_CQE) == 0)
>                 return sdhci_add_host(host);
>
>         dev_dbg(mmc_dev(host->mmc), "CQE is enabled\n");
> @@ -225,7 +227,6 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>         struct sdhci_brcmstb_priv *priv;
>         struct sdhci_host *host;
>         struct resource *iomem;
> -       bool has_cqe = false;
>         struct clk *clk;
>         int res;
>
> @@ -244,10 +245,6 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>                 return res;
>
>         memset(&brcmstb_pdata, 0, sizeof(brcmstb_pdata));
> -       if (device_property_read_bool(&pdev->dev, "supports-cqe")) {
> -               has_cqe = true;
> -               match_priv->ops->irq = sdhci_brcmstb_cqhci_irq;
> -       }
>         brcmstb_pdata.ops = match_priv->ops;
>         host = sdhci_pltfm_init(pdev, &brcmstb_pdata,
>                                 sizeof(struct sdhci_brcmstb_priv));
> @@ -258,7 +255,10 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>
>         pltfm_host = sdhci_priv(host);
>         priv = sdhci_pltfm_priv(pltfm_host);
> -       priv->has_cqe = has_cqe;
> +       if (device_property_read_bool(&pdev->dev, "supports-cqe")) {
> +               priv->flags |= BRCMSTB_PRIV_FLAGS_HAS_CQE;
> +               match_priv->ops->irq = sdhci_brcmstb_cqhci_irq;
> +       }
>
>         /* Map in the non-standard CFG registers */
>         iomem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> @@ -287,14 +287,14 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>          * properties through mmc_of_parse().
>          */
>         host->caps = sdhci_readl(host, SDHCI_CAPABILITIES);
> -       if (match_priv->flags & BRCMSTB_PRIV_FLAGS_NO_64BIT)
> +       if (match_priv->flags & BRCMSTB_MATCH_FLAGS_NO_64BIT)
>                 host->caps &= ~SDHCI_CAN_64BIT;
>         host->caps1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
>         host->caps1 &= ~(SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_SDR104 |
>                          SDHCI_SUPPORT_DDR50);
>         host->quirks |= SDHCI_QUIRK_MISSING_CAPS;
>
> -       if (match_priv->flags & BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT)
> +       if (match_priv->flags & BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT)
>                 host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>
>         res = sdhci_brcmstb_add_host(host, priv);
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/4] mmc: sdhci-brcmstb: Re-organize flags
@ 2022-05-04 10:37     ` Ulf Hansson
  0 siblings, 0 replies; 24+ messages in thread
From: Ulf Hansson @ 2022-05-04 10:37 UTC (permalink / raw)
  To: Kamal Dasu
  Cc: robh+dt, krzk+dt, alcooperx, f.fainelli,
	bcm-kernel-feedback-list, adrian.hunter, linux-mmc, devicetree,
	linux-arm-kernel

On Wed, 27 Apr 2022 at 20:09, Kamal Dasu <kdasu.kdev@gmail.com> wrote:
>
> From: Al Cooper <alcooperx@gmail.com>
>
> Re-organize the flags by basing the bit names on the flag that they
> apply to. Also change the "flags" member in the "brcmstb_match_priv"
> struct to const.
>
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
> Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-brcmstb.c | 32 ++++++++++++++++----------------
>  1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
> index f24623aac2db..244780481193 100644
> --- a/drivers/mmc/host/sdhci-brcmstb.c
> +++ b/drivers/mmc/host/sdhci-brcmstb.c
> @@ -18,20 +18,22 @@
>  #define SDHCI_VENDOR 0x78
>  #define  SDHCI_VENDOR_ENHANCED_STRB 0x1
>
> -#define BRCMSTB_PRIV_FLAGS_NO_64BIT            BIT(0)
> -#define BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT      BIT(1)
> +#define BRCMSTB_MATCH_FLAGS_NO_64BIT           BIT(0)
> +#define BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT     BIT(1)
> +
> +#define BRCMSTB_PRIV_FLAGS_HAS_CQE             BIT(0)
>
>  #define SDHCI_ARASAN_CQE_BASE_ADDR             0x200
>
>  struct sdhci_brcmstb_priv {
>         void __iomem *cfg_regs;
> -       bool has_cqe;
> +       unsigned int flags;
>  };
>
>  struct brcmstb_match_priv {
>         void (*hs400es)(struct mmc_host *mmc, struct mmc_ios *ios);
>         struct sdhci_ops *ops;
> -       unsigned int flags;
> +       const unsigned int flags;
>  };
>
>  static void sdhci_brcmstb_hs400es(struct mmc_host *mmc, struct mmc_ios *ios)
> @@ -134,13 +136,13 @@ static struct sdhci_ops sdhci_brcmstb_ops_7216 = {
>  };
>
>  static struct brcmstb_match_priv match_priv_7425 = {
> -       .flags = BRCMSTB_PRIV_FLAGS_NO_64BIT |
> -       BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT,
> +       .flags = BRCMSTB_MATCH_FLAGS_NO_64BIT |
> +       BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT,
>         .ops = &sdhci_brcmstb_ops,
>  };
>
>  static struct brcmstb_match_priv match_priv_7445 = {
> -       .flags = BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT,
> +       .flags = BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT,
>         .ops = &sdhci_brcmstb_ops,
>  };
>
> @@ -176,7 +178,7 @@ static int sdhci_brcmstb_add_host(struct sdhci_host *host,
>         bool dma64;
>         int ret;
>
> -       if (!priv->has_cqe)
> +       if ((priv->flags & BRCMSTB_PRIV_FLAGS_HAS_CQE) == 0)
>                 return sdhci_add_host(host);
>
>         dev_dbg(mmc_dev(host->mmc), "CQE is enabled\n");
> @@ -225,7 +227,6 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>         struct sdhci_brcmstb_priv *priv;
>         struct sdhci_host *host;
>         struct resource *iomem;
> -       bool has_cqe = false;
>         struct clk *clk;
>         int res;
>
> @@ -244,10 +245,6 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>                 return res;
>
>         memset(&brcmstb_pdata, 0, sizeof(brcmstb_pdata));
> -       if (device_property_read_bool(&pdev->dev, "supports-cqe")) {
> -               has_cqe = true;
> -               match_priv->ops->irq = sdhci_brcmstb_cqhci_irq;
> -       }
>         brcmstb_pdata.ops = match_priv->ops;
>         host = sdhci_pltfm_init(pdev, &brcmstb_pdata,
>                                 sizeof(struct sdhci_brcmstb_priv));
> @@ -258,7 +255,10 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>
>         pltfm_host = sdhci_priv(host);
>         priv = sdhci_pltfm_priv(pltfm_host);
> -       priv->has_cqe = has_cqe;
> +       if (device_property_read_bool(&pdev->dev, "supports-cqe")) {
> +               priv->flags |= BRCMSTB_PRIV_FLAGS_HAS_CQE;
> +               match_priv->ops->irq = sdhci_brcmstb_cqhci_irq;
> +       }
>
>         /* Map in the non-standard CFG registers */
>         iomem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> @@ -287,14 +287,14 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>          * properties through mmc_of_parse().
>          */
>         host->caps = sdhci_readl(host, SDHCI_CAPABILITIES);
> -       if (match_priv->flags & BRCMSTB_PRIV_FLAGS_NO_64BIT)
> +       if (match_priv->flags & BRCMSTB_MATCH_FLAGS_NO_64BIT)
>                 host->caps &= ~SDHCI_CAN_64BIT;
>         host->caps1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
>         host->caps1 &= ~(SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_SDR104 |
>                          SDHCI_SUPPORT_DDR50);
>         host->quirks |= SDHCI_QUIRK_MISSING_CAPS;
>
> -       if (match_priv->flags & BRCMSTB_PRIV_FLAGS_BROKEN_TIMEOUT)
> +       if (match_priv->flags & BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT)
>                 host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>
>         res = sdhci_brcmstb_add_host(host, priv);
> --
> 2.17.1
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 2/4] mmc: sdhci-brcmstb: Enable Clock Gating to save power
  2022-04-27 18:08   ` Kamal Dasu
@ 2022-05-04 10:37     ` Ulf Hansson
  -1 siblings, 0 replies; 24+ messages in thread
From: Ulf Hansson @ 2022-05-04 10:37 UTC (permalink / raw)
  To: Kamal Dasu
  Cc: robh+dt, krzk+dt, alcooperx, f.fainelli,
	bcm-kernel-feedback-list, adrian.hunter, linux-mmc, devicetree,
	linux-arm-kernel

On Wed, 27 Apr 2022 at 20:09, Kamal Dasu <kdasu.kdev@gmail.com> wrote:
>
> From: Al Cooper <alcooperx@gmail.com>
>
> Enabling this feature will allow the controller to stop the bus
> clock when the bus is idle. The feature is not part of the standard
> and is unique to newer Arasan cores and is enabled with a bit in a
> vendor specific register. This feature will only be enabled for
> non-removable devices because they don't switch the voltage and
> clock gating breaks SD Card volatge switching.
>
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
> Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-brcmstb.c | 35 +++++++++++++++++++++++++++++++-
>  1 file changed, 34 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
> index 244780481193..683d0c685748 100644
> --- a/drivers/mmc/host/sdhci-brcmstb.c
> +++ b/drivers/mmc/host/sdhci-brcmstb.c
> @@ -17,11 +17,14 @@
>
>  #define SDHCI_VENDOR 0x78
>  #define  SDHCI_VENDOR_ENHANCED_STRB 0x1
> +#define  SDHCI_VENDOR_GATE_SDCLK_EN 0x2
>
>  #define BRCMSTB_MATCH_FLAGS_NO_64BIT           BIT(0)
>  #define BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT     BIT(1)
> +#define BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE     BIT(2)
>
>  #define BRCMSTB_PRIV_FLAGS_HAS_CQE             BIT(0)
> +#define BRCMSTB_PRIV_FLAGS_GATE_CLOCK          BIT(1)
>
>  #define SDHCI_ARASAN_CQE_BASE_ADDR             0x200
>
> @@ -36,6 +39,27 @@ struct brcmstb_match_priv {
>         const unsigned int flags;
>  };
>
> +static inline void enable_clock_gating(struct sdhci_host *host)
> +{
> +       u32 reg;
> +
> +       reg = sdhci_readl(host, SDHCI_VENDOR);
> +       reg |= SDHCI_VENDOR_GATE_SDCLK_EN;
> +       sdhci_writel(host, reg, SDHCI_VENDOR);
> +}
> +
> +void brcmstb_reset(struct sdhci_host *host, u8 mask)
> +{
> +       struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> +       struct sdhci_brcmstb_priv *priv = sdhci_pltfm_priv(pltfm_host);
> +
> +       sdhci_reset(host, mask);
> +
> +       /* Reset will clear this, so re-enable it */
> +       if (priv->flags & BRCMSTB_PRIV_FLAGS_GATE_CLOCK)
> +               enable_clock_gating(host);
> +}
> +
>  static void sdhci_brcmstb_hs400es(struct mmc_host *mmc, struct mmc_ios *ios)
>  {
>         struct sdhci_host *host = mmc_priv(mmc);
> @@ -131,7 +155,7 @@ static struct sdhci_ops sdhci_brcmstb_ops = {
>  static struct sdhci_ops sdhci_brcmstb_ops_7216 = {
>         .set_clock = sdhci_brcmstb_set_clock,
>         .set_bus_width = sdhci_set_bus_width,
> -       .reset = sdhci_reset,
> +       .reset = brcmstb_reset,
>         .set_uhs_signaling = sdhci_brcmstb_set_uhs_signaling,
>  };
>
> @@ -147,6 +171,7 @@ static struct brcmstb_match_priv match_priv_7445 = {
>  };
>
>  static const struct brcmstb_match_priv match_priv_7216 = {
> +       .flags = BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE,
>         .hs400es = sdhci_brcmstb_hs400es,
>         .ops = &sdhci_brcmstb_ops_7216,
>  };
> @@ -273,6 +298,14 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>         if (res)
>                 goto err;
>
> +       /*
> +        * Automatic clock gating does not work for SD cards that may
> +        * voltage switch so only enable it for non-removable devices.
> +        */
> +       if ((match_priv->flags & BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE) &&
> +           (host->mmc->caps & MMC_CAP_NONREMOVABLE))
> +               priv->flags |= BRCMSTB_PRIV_FLAGS_GATE_CLOCK;
> +
>         /*
>          * If the chip has enhanced strobe and it's enabled, add
>          * callback
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 2/4] mmc: sdhci-brcmstb: Enable Clock Gating to save power
@ 2022-05-04 10:37     ` Ulf Hansson
  0 siblings, 0 replies; 24+ messages in thread
From: Ulf Hansson @ 2022-05-04 10:37 UTC (permalink / raw)
  To: Kamal Dasu
  Cc: robh+dt, krzk+dt, alcooperx, f.fainelli,
	bcm-kernel-feedback-list, adrian.hunter, linux-mmc, devicetree,
	linux-arm-kernel

On Wed, 27 Apr 2022 at 20:09, Kamal Dasu <kdasu.kdev@gmail.com> wrote:
>
> From: Al Cooper <alcooperx@gmail.com>
>
> Enabling this feature will allow the controller to stop the bus
> clock when the bus is idle. The feature is not part of the standard
> and is unique to newer Arasan cores and is enabled with a bit in a
> vendor specific register. This feature will only be enabled for
> non-removable devices because they don't switch the voltage and
> clock gating breaks SD Card volatge switching.
>
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
> Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-brcmstb.c | 35 +++++++++++++++++++++++++++++++-
>  1 file changed, 34 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
> index 244780481193..683d0c685748 100644
> --- a/drivers/mmc/host/sdhci-brcmstb.c
> +++ b/drivers/mmc/host/sdhci-brcmstb.c
> @@ -17,11 +17,14 @@
>
>  #define SDHCI_VENDOR 0x78
>  #define  SDHCI_VENDOR_ENHANCED_STRB 0x1
> +#define  SDHCI_VENDOR_GATE_SDCLK_EN 0x2
>
>  #define BRCMSTB_MATCH_FLAGS_NO_64BIT           BIT(0)
>  #define BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT     BIT(1)
> +#define BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE     BIT(2)
>
>  #define BRCMSTB_PRIV_FLAGS_HAS_CQE             BIT(0)
> +#define BRCMSTB_PRIV_FLAGS_GATE_CLOCK          BIT(1)
>
>  #define SDHCI_ARASAN_CQE_BASE_ADDR             0x200
>
> @@ -36,6 +39,27 @@ struct brcmstb_match_priv {
>         const unsigned int flags;
>  };
>
> +static inline void enable_clock_gating(struct sdhci_host *host)
> +{
> +       u32 reg;
> +
> +       reg = sdhci_readl(host, SDHCI_VENDOR);
> +       reg |= SDHCI_VENDOR_GATE_SDCLK_EN;
> +       sdhci_writel(host, reg, SDHCI_VENDOR);
> +}
> +
> +void brcmstb_reset(struct sdhci_host *host, u8 mask)
> +{
> +       struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> +       struct sdhci_brcmstb_priv *priv = sdhci_pltfm_priv(pltfm_host);
> +
> +       sdhci_reset(host, mask);
> +
> +       /* Reset will clear this, so re-enable it */
> +       if (priv->flags & BRCMSTB_PRIV_FLAGS_GATE_CLOCK)
> +               enable_clock_gating(host);
> +}
> +
>  static void sdhci_brcmstb_hs400es(struct mmc_host *mmc, struct mmc_ios *ios)
>  {
>         struct sdhci_host *host = mmc_priv(mmc);
> @@ -131,7 +155,7 @@ static struct sdhci_ops sdhci_brcmstb_ops = {
>  static struct sdhci_ops sdhci_brcmstb_ops_7216 = {
>         .set_clock = sdhci_brcmstb_set_clock,
>         .set_bus_width = sdhci_set_bus_width,
> -       .reset = sdhci_reset,
> +       .reset = brcmstb_reset,
>         .set_uhs_signaling = sdhci_brcmstb_set_uhs_signaling,
>  };
>
> @@ -147,6 +171,7 @@ static struct brcmstb_match_priv match_priv_7445 = {
>  };
>
>  static const struct brcmstb_match_priv match_priv_7216 = {
> +       .flags = BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE,
>         .hs400es = sdhci_brcmstb_hs400es,
>         .ops = &sdhci_brcmstb_ops_7216,
>  };
> @@ -273,6 +298,14 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
>         if (res)
>                 goto err;
>
> +       /*
> +        * Automatic clock gating does not work for SD cards that may
> +        * voltage switch so only enable it for non-removable devices.
> +        */
> +       if ((match_priv->flags & BRCMSTB_MATCH_FLAGS_HAS_CLOCK_GATE) &&
> +           (host->mmc->caps & MMC_CAP_NONREMOVABLE))
> +               priv->flags |= BRCMSTB_PRIV_FLAGS_GATE_CLOCK;
> +
>         /*
>          * If the chip has enhanced strobe and it's enabled, add
>          * callback
> --
> 2.17.1
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2022-05-04 10:39 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-27 18:08 [PATCH v2 0/4] mmc: sdhci-brcmstb: host controller clock enhancements Kamal Dasu
2022-04-27 18:08 ` Kamal Dasu
2022-04-27 18:08 ` [PATCH v2 1/4] mmc: sdhci-brcmstb: Re-organize flags Kamal Dasu
2022-04-27 18:08   ` Kamal Dasu
2022-05-04 10:37   ` Ulf Hansson
2022-05-04 10:37     ` Ulf Hansson
2022-04-27 18:08 ` [PATCH v2 2/4] mmc: sdhci-brcmstb: Enable Clock Gating to save power Kamal Dasu
2022-04-27 18:08   ` Kamal Dasu
2022-04-27 21:39   ` Ulf Hansson
2022-04-27 21:39     ` Ulf Hansson
2022-04-27 21:43     ` Florian Fainelli
2022-04-27 21:43       ` Florian Fainelli
2022-05-04 10:37   ` Ulf Hansson
2022-05-04 10:37     ` Ulf Hansson
2022-04-27 18:08 ` [PATCH v2 3/4] dt-bindings: mmc: Add Broadcom optional sdio_freq clock Kamal Dasu
2022-04-27 18:08   ` Kamal Dasu
2022-04-28  8:12   ` Krzysztof Kozlowski
2022-04-28  8:12     ` Krzysztof Kozlowski
2022-04-28  8:14   ` Krzysztof Kozlowski
2022-04-28  8:14     ` Krzysztof Kozlowski
2022-04-27 18:08 ` [PATCH v2 4/4] mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0 Kamal Dasu
2022-04-27 18:08   ` Kamal Dasu
2022-04-27 21:49   ` Florian Fainelli
2022-04-27 21:49     ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.