RE: Fwd: [PATCH v6 12/12] mmc: mmci: Add Qualcomm Id to amba id table

2014-07-17 Thread prakash . burla
tested-by: Prakash Burla prakash.bu...@smartplayin.com
This driver tested on AP806X with mmc Driver.

From:  srinivas.kandaga...@linaro.org
Date: Mon, Jun 2, 2014 at 2:40 PM
Subject: [PATCH v6 12/12] mmc: mmci: Add Qualcomm Id to amba id table
To: Russell King li...@arm.linux.org.uk, Ulf Hansson
ulf.hans...@linaro.org, linux-...@vger.kernel.org
Cc: Chris Ball ch...@printf.net, linux-ker...@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linus.wall...@linaro.org, Srinivas
Kandagatla srinivas.kandaga...@linaro.org


From: Srinivas Kandagatla srinivas.kandaga...@linaro.org

This patch adds a fake Qualcomm ID 0x00051180 to the amba_ids, as Qualcomm
SDCC controller is pl180, but amba id registers read 0x0's.
The plan is to remove SDCC driver totally and use mmci as the main SD
controller driver for Qualcomm SOCs.

Signed-off-by: Srinivas Kandagatla srinivas.kandaga...@linaro.org
---
 drivers/mmc/host/mmci.c | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 08ff8d2..fa851d5 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -190,6 +190,23 @@ static struct variant_data variant_ux500v2 = {
.pwrreg_nopower = true,
 };

+static struct variant_data variant_qcom = {
+   .fifosize   = 16 * 4,
+   .fifohalfsize   = 8 * 4,
+   .clkreg = MCI_CLK_ENABLE,
+   .clkreg_enable  = MCI_QCOM_CLK_FLOWENA |
+ MCI_QCOM_CLK_SELECT_IN_FBCLK,
+   .clkreg_8bit_bus_enable = MCI_QCOM_CLK_WIDEBUS_8,
+   .datactrl_mask_ddrmode  = MCI_QCOM_CLK_SELECT_IN_DDR_MODE,
+   .data_cmd_enable= MCI_QCOM_CSPM_DATCMD,
+   .blksz_datactrl4= true,
+   .datalength_bits= 24,
+   .pwrreg_powerup = MCI_PWR_UP,
+   .f_max  = 20800,
+   .explicit_mclk_control  = true,
+   .qcom_fifo  = true,
+};
+
 static int mmci_card_busy(struct mmc_host *mmc)
 {
struct mmci_host *host = mmc_priv(mmc);
@@ -1831,6 +1848,12 @@ static struct amba_id mmci_ids[] = {
.mask   = 0xf0ff,
.data   = variant_ux500v2,
},
+   /* Qualcomm variants */
+   {
+   .id = 0x00051180,
+   .mask   = 0x000f,
+   .data   = variant_qcom,
+   },
{ 0, 0 },
 };

--
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v6 12/12] mmc: mmci: Add Qualcomm Id to amba id table

2014-06-11 Thread Linus Walleij
On Mon, Jun 2, 2014 at 11:10 AM,  srinivas.kandaga...@linaro.org wrote:

 From: Srinivas Kandagatla srinivas.kandaga...@linaro.org

 This patch adds a fake Qualcomm ID 0x00051180 to the amba_ids, as Qualcomm
 SDCC controller is pl180, but amba id registers read 0x0's.
 The plan is to remove SDCC driver totally and use mmci as the main SD
 controller driver for Qualcomm SOCs.

 Signed-off-by: Srinivas Kandagatla srinivas.kandaga...@linaro.org

Reviewed-by: Linus Walleij linus.wall...@linaro.org

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v6 12/12] mmc: mmci: Add Qualcomm Id to amba id table

2014-06-02 Thread srinivas . kandagatla
From: Srinivas Kandagatla srinivas.kandaga...@linaro.org

This patch adds a fake Qualcomm ID 0x00051180 to the amba_ids, as Qualcomm
SDCC controller is pl180, but amba id registers read 0x0's.
The plan is to remove SDCC driver totally and use mmci as the main SD
controller driver for Qualcomm SOCs.

Signed-off-by: Srinivas Kandagatla srinivas.kandaga...@linaro.org
---
 drivers/mmc/host/mmci.c | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 08ff8d2..fa851d5 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -190,6 +190,23 @@ static struct variant_data variant_ux500v2 = {
.pwrreg_nopower = true,
 };
 
+static struct variant_data variant_qcom = {
+   .fifosize   = 16 * 4,
+   .fifohalfsize   = 8 * 4,
+   .clkreg = MCI_CLK_ENABLE,
+   .clkreg_enable  = MCI_QCOM_CLK_FLOWENA |
+ MCI_QCOM_CLK_SELECT_IN_FBCLK,
+   .clkreg_8bit_bus_enable = MCI_QCOM_CLK_WIDEBUS_8,
+   .datactrl_mask_ddrmode  = MCI_QCOM_CLK_SELECT_IN_DDR_MODE,
+   .data_cmd_enable= MCI_QCOM_CSPM_DATCMD,
+   .blksz_datactrl4= true,
+   .datalength_bits= 24,
+   .pwrreg_powerup = MCI_PWR_UP,
+   .f_max  = 20800,
+   .explicit_mclk_control  = true,
+   .qcom_fifo  = true,
+};
+
 static int mmci_card_busy(struct mmc_host *mmc)
 {
struct mmci_host *host = mmc_priv(mmc);
@@ -1831,6 +1848,12 @@ static struct amba_id mmci_ids[] = {
.mask   = 0xf0ff,
.data   = variant_ux500v2,
},
+   /* Qualcomm variants */
+   {
+   .id = 0x00051180,
+   .mask   = 0x000f,
+   .data   = variant_qcom,
+   },
{ 0, 0 },
 };
 
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html