From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] MMC: EXYNOS: Added call back function for clock get
Date: Wed, 27 Mar 2013 14:14:59 +0900 [thread overview]
Message-ID: <51528053.8080004@samsung.com> (raw)
In-Reply-To: <1354714297-11568-3-git-send-email-amarendra.xt@samsung.com>
Dear Amar,
On 05/12/12 22:31, Amar wrote:
> This patch defines the call back required by dw mmc driver to get the
> clock value. It also adds function to set the dw mmc clock divider ratio.
>
> Signed-off-by: Amarendra Reddy <amarendra.xt@samsung.com>
> ---
> drivers/mmc/exynos_dw_mmc.c | 14 +++++++++++++-
> 1 files changed, 13 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
> index 72a31b7..7cc8aba 100644
> --- a/drivers/mmc/exynos_dw_mmc.c
> +++ b/drivers/mmc/exynos_dw_mmc.c
> @@ -30,25 +30,37 @@ static void exynos_dwmci_clksel(struct dwmci_host *host)
> {
> u32 val;
> val = DWMCI_SET_SAMPLE_CLK(DWMCI_SHIFT_0) |
> - DWMCI_SET_DRV_CLK(DWMCI_SHIFT_0) | DWMCI_SET_DIV_RATIO(0);
> + DWMCI_SET_DRV_CLK(DWMCI_SHIFT_0) |
> + DWMCI_SET_DIV_RATIO(DWMCI_SHIFT_0);
>
> dwmci_writel(host, DWMCI_CLKSEL, val);
> }
>
> +unsigned int exynos_dwmci_get_clk(int dev_index)
> +{
> + return get_mmc_clk(dev_index);
> +}
> +
> int exynos_dwmci_init(u32 regbase, int bus_width, int index)
> {
> struct dwmci_host *host = NULL;
> + int div = 0;
please add a blank line here.
> host = malloc(sizeof(struct dwmci_host));
> if (!host) {
> printf("dwmci_host malloc fail!\n");
> return 1;
> }
>
> + div = 1;
ditto.
> + /* Set the mmc clock divider ratio & pre-ratio */
> + set_mmc_clk(index, div);
If the div is constant value, then just put 1.
I think.. it's better.
set_mmc_clk(index, 1);
> +
> host->name = EXYNOS_NAME;
> host->ioaddr = (void *)regbase;
> host->buswidth = bus_width;
> host->clksel = exynos_dwmci_clksel;
> host->dev_index = index;
> + host->mmc_clk = exynos_dwmci_get_clk;
>
> add_dwmci(host, 52000000, 400000);
>
>
Thanks,
Minkyu Kang.
next prev parent reply other threads:[~2013-03-27 5:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-05 13:31 [U-Boot] [PATCH 0/4] EXYNOS5: Enable dwmmc Amar
2012-12-05 13:31 ` [U-Boot] [PATCH 1/4] MMC: DWMMC: Modified fifo size computation Amar
2012-12-06 3:59 ` Jaehoon Chung
2012-12-08 19:49 ` Simon Glass
2012-12-10 2:21 ` Jaehoon Chung
2012-12-10 6:09 ` Amarendra Reddy
2013-03-27 5:03 ` Minkyu Kang
2013-03-27 5:18 ` Amarendra Reddy
2013-03-27 5:39 ` Minkyu Kang
2012-12-05 13:31 ` [U-Boot] [PATCH 2/4] MMC: EXYNOS: Added call back function for clock get Amar
2012-12-06 4:03 ` Jaehoon Chung
2013-03-27 5:14 ` Minkyu Kang [this message]
2013-03-27 5:38 ` Amarendra Reddy
2013-03-27 7:40 ` Minkyu Kang
2013-03-27 8:01 ` Amarendra Reddy
2012-12-05 13:31 ` [U-Boot] [PATCH 3/4] EXYNOS: CLOCK: Initialised the local variable Amar
2012-12-06 4:04 ` Jaehoon Chung
2012-12-05 13:31 ` [U-Boot] [PATCH 4/4] SMDK5250: Initialise and enable dwmmc channels Amar
2012-12-06 4:08 ` Jaehoon Chung
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=51528053.8080004@samsung.com \
--to=mk7.kang@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