From: Jaehoon Chung <jh80.chung@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 3/9] DWMMC: Initialise dwmci and resolve EMMC read write issues
Date: Wed, 02 Jan 2013 14:12:21 +0900 [thread overview]
Message-ID: <50E3C1B5.9060705@samsung.com> (raw)
In-Reply-To: <1356951500-22490-4-git-send-email-amarendra.xt@samsung.com>
On 12/31/2012 07:58 PM, Amar wrote:
> This patch enumerates dwmci and set auto stop command during
> dwmci initialisation.
> EMMC read/write is not happening in current implementation
> due to improper fifo size computation. Hence Modified the fifo size
> computation to resolve EMMC read write issues.
What issue for read/write?
>
> Changes from V1:
> 1)Created the macros RX_WMARK_SHIFT and RX_WMARK_MASK in header file.
>
> Changes from V2:
> 1)Updation of commit message and resubmition of proper patch set.
>
> Signed-off-by: Amar <amarendra.xt@samsung.com>
> ---
> drivers/mmc/dw_mmc.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
> index 4070d4e..d8fa1a2 100644
> --- a/drivers/mmc/dw_mmc.c
> +++ b/drivers/mmc/dw_mmc.c
> @@ -136,6 +136,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
> return TIMEOUT;
> }
> timeout--;
> + mdelay(1);
Why add the mdelay(1)? Could you explain to me?
> }
>
> dwmci_writel(host, DWMCI_RINTSTS, DWMCI_INTMSK_ALL);
> @@ -314,7 +315,7 @@ static void dwmci_set_ios(struct mmc *mmc)
> static int dwmci_init(struct mmc *mmc)
> {
> struct dwmci_host *host = (struct dwmci_host *)mmc->priv;
> - u32 fifo_size, fifoth_val;
> + u32 fifo_size, fifoth_val, ier;
>
> dwmci_writel(host, DWMCI_PWREN, 1);
>
> @@ -323,6 +324,14 @@ static int dwmci_init(struct mmc *mmc)
> return -1;
> }
>
> + /* Enumerate at 400KHz */
> + dwmci_setup_bus(host, mmc->f_min);
> +
> + /* Set auto stop command */
> + ier = dwmci_readl(host, DWMCI_CTRL);
> + ier |= (1<<10);
Use the define..ex) define DWMCI_CTRL_AUTO_STOP_CMD BIT(10)
> + dwmci_writel(host, DWMCI_CTRL, ier);
If set to auto stop command, then you didn't see any problem?
Best Regards,
Jaehoon Chung
> +
> dwmci_writel(host, DWMCI_RINTSTS, 0xFFFFFFFF);
> dwmci_writel(host, DWMCI_INTMASK, 0);
>
> @@ -332,10 +341,11 @@ static int dwmci_init(struct mmc *mmc)
> dwmci_writel(host, DWMCI_BMOD, 1);
>
> fifo_size = dwmci_readl(host, DWMCI_FIFOTH);
> + fifo_size = ((fifo_size & RX_WMARK_MASK) >> RX_WMARK_SHIFT) + 1;
> if (host->fifoth_val)
> fifoth_val = host->fifoth_val;
> else
> - fifoth_val = MSIZE(0x2) | RX_WMARK(fifo_size/2 -1) |
> + fifoth_val = MSIZE(0x2) | RX_WMARK(fifo_size/2 - 1) |
> TX_WMARK(fifo_size/2);
> dwmci_writel(host, DWMCI_FIFOTH, fifoth_val);
>
>
next prev parent reply other threads:[~2013-01-02 5:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-31 10:58 [U-Boot] [PATCH V3 0/9] EXYNOS5: Enable DWMMC, add FDT support for DWMMC and Amar
2012-12-31 10:58 ` [U-Boot] [PATCH V3 1/9] FDT: Add compatible string for DWMMC Amar
2012-12-31 12:35 ` Kyungmin Park
2012-12-31 10:58 ` [U-Boot] [PATCH V3 2/9] EXYNOS5: FDT: Add DWMMC device node data Amar
2012-12-31 10:58 ` [U-Boot] [PATCH V3 3/9] DWMMC: Initialise dwmci and resolve EMMC read write issues Amar
2013-01-02 5:12 ` Jaehoon Chung [this message]
2013-01-03 7:45 ` Amarendra Reddy
2012-12-31 10:58 ` [U-Boot] [PATCH V3 4/9] EXYNOS5: DWMMC: Added FDT support for DWMMC Amar
2013-01-02 5:20 ` Jaehoon Chung
2013-01-03 4:32 ` Amarendra Reddy
2013-01-03 6:48 ` Jaehoon Chung
2012-12-31 10:58 ` [U-Boot] [PATCH V3 5/9] EXYNOS5: DWMMC: API to set mmc clock divisor Amar
2013-01-02 3:31 ` Jaehoon Chung
2013-01-03 6:24 ` Amarendra Reddy
2013-01-03 6:45 ` Jaehoon Chung
2013-01-03 11:16 ` Amarendra Reddy
2013-01-03 14:34 ` Amarendra Reddy
2012-12-31 10:58 ` [U-Boot] [PATCH V3 6/9] SMDK5250: Initialise and Enable DWMMC, support FDT and non-FDT Amar
2012-12-31 10:58 ` [U-Boot] [PATCH V3 7/9] MMC: APIs to support resize of EMMC boot partition Amar
2012-12-31 10:58 ` [U-Boot] [PATCH V3 8/9] SMDK5250: Enable EMMC booting Amar
2012-12-31 10:58 ` [U-Boot] [PATCH V3 9/9] COMMON: MMC: Command to support EMMC booting and to Amar
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=50E3C1B5.9060705@samsung.com \
--to=jh80.chung@samsung.com \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox