linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc: Add support for IMG Pistachio
@ 2014-11-13 18:50 Andrew Bresticker
  2014-11-18 17:28 ` Doug Anderson
  2014-11-19 11:04 ` Ulf Hansson
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Bresticker @ 2014-11-13 18:50 UTC (permalink / raw)
  To: Seungwon Jeon, Jaehoon Chung, Chris Ball, Ulf Hansson
  Cc: Andrew Bresticker, James Hartley, Ezequiel Garcia, Doug Anderson,
	linux-kernel, linux-mmc

Add support for the DW MMC host found on the Imagination Pistachio SoC.
Like the DW MMC hosts found on SOCFPGA and Rockchip SoCs, the DW MMC
host on Pistachio requires the use of SDMMC_CMD_USE_HOLD_REG.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
---
 .../devicetree/bindings/mmc/img-dw-mshc.txt        | 29 ++++++++++++++++++++++
 drivers/mmc/host/dw_mmc-pltfm.c                    |  6 +++++
 2 files changed, 35 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mmc/img-dw-mshc.txt

diff --git a/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt
new file mode 100644
index 0000000..85de99f
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt
@@ -0,0 +1,29 @@
+* Imagination specific extensions to the Synopsys Designware Mobile Storage
+  Host Controller
+
+The Synopsys designware mobile storage host controller is used to interface
+a SoC with storage medium such as eMMC or SD/MMC cards. This file documents
+differences between the core Synopsys dw mshc controller properties described
+by synopsys-dw-mshc.txt and the properties used by the Imagination specific
+extensions to the Synopsys Designware Mobile Storage Host Controller.
+
+Required Properties:
+
+* compatible: should be
+	- "img,pistachio-dw-mshc": for Pistachio SoCs
+
+Example:
+
+	mmc@18142000 {
+		compatible = "img,pistachio-dw-mshc";
+		reg = <0x18142000 0x400>;
+		interrupts = <GIC_SHARED 39 IRQ_TYPE_LEVEL_HIGH>;
+
+		clocks = <&system_clk>, <&sdhost_clk>;
+		clock-names = "biu", "ciu";
+
+		fifo-depth = <0x20>;
+		bus-width = <4>;
+		num-slots = <1>;
+		disable-wp;
+	};
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 8b65721..ec6dbcd 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -35,6 +35,10 @@ static const struct dw_mci_drv_data socfpga_drv_data = {
 	.prepare_command	= dw_mci_pltfm_prepare_command,
 };
 
+static const struct dw_mci_drv_data pistachio_drv_data = {
+	.prepare_command	= dw_mci_pltfm_prepare_command,
+};
+
 int dw_mci_pltfm_register(struct platform_device *pdev,
 			  const struct dw_mci_drv_data *drv_data)
 {
@@ -90,6 +94,8 @@ static const struct of_device_id dw_mci_pltfm_match[] = {
 	{ .compatible = "snps,dw-mshc", },
 	{ .compatible = "altr,socfpga-dw-mshc",
 		.data = &socfpga_drv_data },
+	{ .compatible = "img,pistachio-dw-mshc",
+		.data = &pistachio_drv_data },
 	{},
 };
 MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);
-- 
2.1.0.rc2.206.gedb03e5


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

* Re: [PATCH] mmc: dw_mmc: Add support for IMG Pistachio
  2014-11-13 18:50 [PATCH] mmc: dw_mmc: Add support for IMG Pistachio Andrew Bresticker
@ 2014-11-18 17:28 ` Doug Anderson
  2014-11-19  1:26   ` Jaehoon Chung
  2014-11-19 11:04 ` Ulf Hansson
  1 sibling, 1 reply; 4+ messages in thread
From: Doug Anderson @ 2014-11-18 17:28 UTC (permalink / raw)
  To: Andrew Bresticker
  Cc: Seungwon Jeon, Jaehoon Chung, Chris Ball, Ulf Hansson,
	James Hartley, Ezequiel Garcia, linux-kernel, linux-mmc

Andrew,

On Thu, Nov 13, 2014 at 10:50 AM, Andrew Bresticker
<abrestic@chromium.org> wrote:
> Add support for the DW MMC host found on the Imagination Pistachio SoC.
> Like the DW MMC hosts found on SOCFPGA and Rockchip SoCs, the DW MMC
> host on Pistachio requires the use of SDMMC_CMD_USE_HOLD_REG.
>
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
> ---
>  .../devicetree/bindings/mmc/img-dw-mshc.txt        | 29 ++++++++++++++++++++++
>  drivers/mmc/host/dw_mmc-pltfm.c                    |  6 +++++
>  2 files changed, 35 insertions(+)

This seems quite sane to me.

Reviewed-by: Doug Anderson <dianders@chromium.org>

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

* Re: [PATCH] mmc: dw_mmc: Add support for IMG Pistachio
  2014-11-18 17:28 ` Doug Anderson
@ 2014-11-19  1:26   ` Jaehoon Chung
  0 siblings, 0 replies; 4+ messages in thread
From: Jaehoon Chung @ 2014-11-19  1:26 UTC (permalink / raw)
  To: Doug Anderson, Andrew Bresticker
  Cc: Seungwon Jeon, Chris Ball, Ulf Hansson, James Hartley,
	Ezequiel Garcia, linux-kernel, linux-mmc

On 11/19/2014 02:28 AM, Doug Anderson wrote:
> Andrew,
> 
> On Thu, Nov 13, 2014 at 10:50 AM, Andrew Bresticker
> <abrestic@chromium.org> wrote:
>> Add support for the DW MMC host found on the Imagination Pistachio SoC.
>> Like the DW MMC hosts found on SOCFPGA and Rockchip SoCs, the DW MMC
>> host on Pistachio requires the use of SDMMC_CMD_USE_HOLD_REG.
>>
>> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
>> ---
>>  .../devicetree/bindings/mmc/img-dw-mshc.txt        | 29 ++++++++++++++++++++++
>>  drivers/mmc/host/dw_mmc-pltfm.c                    |  6 +++++
>>  2 files changed, 35 insertions(+)
> 
> This seems quite sane to me.
> 
> Reviewed-by: Doug Anderson <dianders@chromium.org>

Acked-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung
> 


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

* Re: [PATCH] mmc: dw_mmc: Add support for IMG Pistachio
  2014-11-13 18:50 [PATCH] mmc: dw_mmc: Add support for IMG Pistachio Andrew Bresticker
  2014-11-18 17:28 ` Doug Anderson
@ 2014-11-19 11:04 ` Ulf Hansson
  1 sibling, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2014-11-19 11:04 UTC (permalink / raw)
  To: Andrew Bresticker
  Cc: Seungwon Jeon, Jaehoon Chung, Chris Ball, James Hartley,
	Ezequiel Garcia, Doug Anderson, linux-kernel, linux-mmc

On 13 November 2014 19:50, Andrew Bresticker <abrestic@chromium.org> wrote:
> Add support for the DW MMC host found on the Imagination Pistachio SoC.
> Like the DW MMC hosts found on SOCFPGA and Rockchip SoCs, the DW MMC
> host on Pistachio requires the use of SDMMC_CMD_USE_HOLD_REG.
>
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>

Thanks! Applied for next.

Kind regards
Uffe


> ---
>  .../devicetree/bindings/mmc/img-dw-mshc.txt        | 29 ++++++++++++++++++++++
>  drivers/mmc/host/dw_mmc-pltfm.c                    |  6 +++++
>  2 files changed, 35 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mmc/img-dw-mshc.txt
>
> diff --git a/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt
> new file mode 100644
> index 0000000..85de99f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/img-dw-mshc.txt
> @@ -0,0 +1,29 @@
> +* Imagination specific extensions to the Synopsys Designware Mobile Storage
> +  Host Controller
> +
> +The Synopsys designware mobile storage host controller is used to interface
> +a SoC with storage medium such as eMMC or SD/MMC cards. This file documents
> +differences between the core Synopsys dw mshc controller properties described
> +by synopsys-dw-mshc.txt and the properties used by the Imagination specific
> +extensions to the Synopsys Designware Mobile Storage Host Controller.
> +
> +Required Properties:
> +
> +* compatible: should be
> +       - "img,pistachio-dw-mshc": for Pistachio SoCs
> +
> +Example:
> +
> +       mmc@18142000 {
> +               compatible = "img,pistachio-dw-mshc";
> +               reg = <0x18142000 0x400>;
> +               interrupts = <GIC_SHARED 39 IRQ_TYPE_LEVEL_HIGH>;
> +
> +               clocks = <&system_clk>, <&sdhost_clk>;
> +               clock-names = "biu", "ciu";
> +
> +               fifo-depth = <0x20>;
> +               bus-width = <4>;
> +               num-slots = <1>;
> +               disable-wp;
> +       };
> diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
> index 8b65721..ec6dbcd 100644
> --- a/drivers/mmc/host/dw_mmc-pltfm.c
> +++ b/drivers/mmc/host/dw_mmc-pltfm.c
> @@ -35,6 +35,10 @@ static const struct dw_mci_drv_data socfpga_drv_data = {
>         .prepare_command        = dw_mci_pltfm_prepare_command,
>  };
>
> +static const struct dw_mci_drv_data pistachio_drv_data = {
> +       .prepare_command        = dw_mci_pltfm_prepare_command,
> +};
> +
>  int dw_mci_pltfm_register(struct platform_device *pdev,
>                           const struct dw_mci_drv_data *drv_data)
>  {
> @@ -90,6 +94,8 @@ static const struct of_device_id dw_mci_pltfm_match[] = {
>         { .compatible = "snps,dw-mshc", },
>         { .compatible = "altr,socfpga-dw-mshc",
>                 .data = &socfpga_drv_data },
> +       { .compatible = "img,pistachio-dw-mshc",
> +               .data = &pistachio_drv_data },
>         {},
>  };
>  MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);
> --
> 2.1.0.rc2.206.gedb03e5
>

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

end of thread, other threads:[~2014-11-19 11:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-13 18:50 [PATCH] mmc: dw_mmc: Add support for IMG Pistachio Andrew Bresticker
2014-11-18 17:28 ` Doug Anderson
2014-11-19  1:26   ` Jaehoon Chung
2014-11-19 11:04 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).