All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: Girish K S <girish.shivananjappa@linaro.org>
Cc: linux-mmc@vger.kernel.org, cjb@laptop.org,
	will.newton@imgtec.com, patches@linaro.org,
	linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH] mmc: dw_mmc: add busmode selection support
Date: Tue, 24 Jul 2012 20:09:05 +0900	[thread overview]
Message-ID: <500E8251.906@samsung.com> (raw)
In-Reply-To: <1343042200-19524-1-git-send-email-girish.shivananjappa@linaro.org>

Hi Girish,

Well..just tested on my board.
this patch didn't work.(eMMC card didn't initialize)
meaning of ios->bus_mode and synosys's bus_mode is same?
How did you test this patch?

Best Regards,
Jaehoon Chung

On 07/23/2012 08:16 PM, Girish K S wrote:
> Synopsis Designware host controller has suppport for open
> drain mode selection. During the mmc card initialization the
> host controller can select the open-drain bit to allow the device
> initialization in the open-drain mode. Once the device enters
> the standby mode this bit can be reset to enter push-pull mode.
> 
> Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
> ---
>  drivers/mmc/host/dw_mmc.c |   14 ++++++++++++++
>  drivers/mmc/host/dw_mmc.h |    1 +
>  2 files changed, 15 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 72dc3cd..da11e5a 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -773,6 +773,18 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
>  	spin_unlock_bh(&host->lock);
>  }
>  
> +static void dw_mci_set_busmode(struct dw_mci_slot *slot)
> +{
> +	struct mmc_ios *ios = &slot->mmc->ios;
> +	u32 reg;
> +
> +	reg = mci_readl(slot->host, CTRL);
> +	if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN)
> +		mci_writel(slot->host, CTRL, reg | SDMMC_CTRL_ENABLE_OD);
> +	else
> +		mci_writel(slot->host, CTRL, reg & ~SDMMC_CTRL_ENABLE_OD);
> +}
> +
>  static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>  {
>  	struct dw_mci_slot *slot = mmc_priv(mmc);
> @@ -818,6 +830,8 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>  	default:
>  		break;
>  	}
> +
> +	dw_mci_set_busmode(slot);
>  }
>  
>  static int dw_mci_get_ro(struct mmc_host *mmc)
> diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
> index 15c27e1..1a53fb2 100644
> --- a/drivers/mmc/host/dw_mmc.h
> +++ b/drivers/mmc/host/dw_mmc.h
> @@ -67,6 +67,7 @@
>  
>  /* Control register defines */
>  #define SDMMC_CTRL_USE_IDMAC		BIT(25)
> +#define SDMMC_CTRL_ENABLE_OD		BIT(24)
>  #define SDMMC_CTRL_CEATA_INT_EN		BIT(11)
>  #define SDMMC_CTRL_SEND_AS_CCSD		BIT(10)
>  #define SDMMC_CTRL_SEND_CCSD		BIT(9)
> 

  reply	other threads:[~2012-07-24 11:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-23 11:16 [PATCH] mmc: dw_mmc: add busmode selection support Girish K S
2012-07-24 11:09 ` Jaehoon Chung [this message]
2012-07-24 11:36   ` Girish K S
2012-07-24 11:43     ` Girish K S
2012-07-24 13:07       ` Jae hoon Chung
2012-07-24 13:09         ` Girish K S
2012-07-24 13:44           ` Jae hoon Chung
2012-07-25 13:22             ` Girish K S
2012-07-26  3:41         ` Girish K S
2012-07-26  6:00           ` Jaehoon Chung
2012-07-26  6:19             ` Girish K S

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=500E8251.906@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=cjb@laptop.org \
    --cc=girish.shivananjappa@linaro.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=will.newton@imgtec.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.