Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] mmc: sdhci-of-arasan: Add the support for sdhci-5.1

32 views
Skip to first unread message

Shawn Lin

unread,
Aug 10, 2015, 9:20:06 PM8/10/15
to
This patch adds the quirks and compatible string in sdhci-of-arasan.c
to support sdhci-arasan5.1 version of controller.

Signed-off-by: Shawn Lin <shaw...@rock-chips.com>
---

Documentation/devicetree/bindings/mmc/arasan,sdhci.txt | 2 +-
drivers/mmc/host/sdhci-of-arasan.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
index 7e94903..da541c3 100644
--- a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
+++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
@@ -9,7 +9,7 @@ Device Tree Bindings for the Arasan SDHCI Controller

Required Properties:
- compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' or
- 'arasan,sdhci-4.9a'
+ 'arasan,sdhci-4.9a' or 'arasan,sdhci-5.1'
- reg: From mmc bindings: Register location and length.
- clocks: From clock bindings: Handles to clock inputs.
- clock-names: From clock bindings: Tuple including "clk_xin" and "clk_ahb"
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index ef5a7d2..c9012f5 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -175,6 +175,9 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
if (of_device_is_compatible(pdev->dev.of_node, "arasan,sdhci-4.9a")) {
host->quirks |= SDHCI_QUIRK_NO_HISPD_BIT;
host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23;
+ } else if (of_device_is_compatible(pdev->dev.of_node,
+ "arasan,sdhci-5.1")) {
+ host->quirks |= SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN;
}

sdhci_get_of_property(pdev);
@@ -217,6 +220,7 @@ static int sdhci_arasan_remove(struct platform_device *pdev)

static const struct of_device_id sdhci_arasan_of_match[] = {
{ .compatible = "arasan,sdhci-8.9a" },
+ { .compatible = "arasan,sdhci-5.1" },
{ .compatible = "arasan,sdhci-4.9a" },
{ }
};
--
2.3.7


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Shawn Lin

unread,
Aug 10, 2015, 9:30:06 PM8/10/15
to
On 2015/8/11 9:14, Shawn Lin wrote:
> This patch adds the quirks and compatible string in sdhci-of-arasan.c
> to support sdhci-arasan5.1 version of controller.
>

Sorry for wrong send-email ops, pls ignore this patch :(
Shawn Lin

Shawn Lin

unread,
Aug 10, 2015, 9:40:07 PM8/10/15
to
This patch adds the quirks and compatible string in sdhci-of-arasan.c
to support sdhci-arasan5.1 version of controller. No documented controller
IP version is found in the TRM, so we use ths version of command queueing
engine integrated into this controller by arasan to specify our controller.
2.3.7

Shawn Lin

unread,
Aug 11, 2015, 3:00:06 AM8/11/15
to
On 2015/8/11 13:06, Michal Simek wrote:
> Is this broken Arasan version or just broken capability on your SoC?
>

Hi Michal,
It's just the broken capability on my Soc. I have checked with my ASIC
guy, "base clock frequency for SD clock" in my platform is initialized
to 2h'00 to indicate driver should get it by reading system clock unit.

> Thanks,
> Michal
>
>
>


--
Shawn Lin

Shawn Lin

unread,
Aug 11, 2015, 4:00:05 AM8/11/15
to
This patch adds the compatible string in sdhci-of-arasan.c to
support sdhci-arasan5.1 version of controller. No documented
controller IP version is found in the TRM, so we use ths version
of command queueing engine integrated into this controller by arasan
to specify our controller.

Signed-off-by: Shawn Lin <shaw...@rock-chips.com>

---

Changes in v1:
- Remove redundant SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN for "arasan, sdhci-5.1" since
SDHCI will check "host->max_clk == 0" and let driver get it from host->ops->get_max_clock.

Documentation/devicetree/bindings/mmc/arasan,sdhci.txt | 2 +-
drivers/mmc/host/sdhci-of-arasan.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
index 7e94903..da541c3 100644
--- a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
+++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
@@ -9,7 +9,7 @@ Device Tree Bindings for the Arasan SDHCI Controller

Required Properties:
- compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' or
- 'arasan,sdhci-4.9a'
+ 'arasan,sdhci-4.9a' or 'arasan,sdhci-5.1'
- reg: From mmc bindings: Register location and length.
- clocks: From clock bindings: Handles to clock inputs.
- clock-names: From clock bindings: Tuple including "clk_xin" and "clk_ahb"
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index ef5a7d2..75379cb 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -217,6 +217,7 @@ static int sdhci_arasan_remove(struct platform_device *pdev)

static const struct of_device_id sdhci_arasan_of_match[] = {
{ .compatible = "arasan,sdhci-8.9a" },
+ { .compatible = "arasan,sdhci-5.1" },
{ .compatible = "arasan,sdhci-4.9a" },
{ }
};
--
2.3.7


Shawn Lin

unread,
Aug 11, 2015, 4:10:06 AM8/11/15
to

Shawn Lin

unread,
Aug 17, 2015, 7:50:05 PM8/17/15
to
Hi Ulf,

On 2015/8/12 13:07, Michal Simek wrote:
> +linux-mmc
>
> On 08/11/2015 04:53 PM, Michal Simek wrote:
>> Acked-by: Michal Simek <michal...@xilinx.com>

Could you pull this patch into your repository?

>>
>> Thanks,
>> Michal
>>
>>
>
>
>
>


--
Shawn Lin

Ulf Hansson

unread,
Aug 25, 2015, 8:10:06 AM8/25/15
to
Thanks, applied for next!

Kind regards
Uffe
0 new messages