From: Jaehoon Chung <jh80.chung@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] dwmmc: make driver usable for non-exynos platforms
Date: Fri, 29 Nov 2013 12:46:23 +0900 [thread overview]
Message-ID: <52980E0F.7030403@samsung.com> (raw)
In-Reply-To: <1385646735-8726-1-git-send-email-abrodkin@synopsys.com>
Hi, Alexey,
I didn't know exactly which version is used this register.
I known this register is used only the exynos series.
I have checked the IP version 2.70a, but CLKSEL(0x9c) wasn't used at general register map.
If I missed the something, let me know.(It's published the upper IP version than 2.70a)
Best Regards,
Jaehoon Chung
On 11/28/2013 10:52 PM, Alexey Brodkin wrote:
> There's no point in having of "dwmmc.h" per architecure - we're talking
> about device driver (DesignWare MMC controller) which is expected to
> work with any CPU it is attached to.
>
> So defines used for DW MMC configuration should be in its own header
> which is avaialble for everybody.
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>
> Cc: Mischa Jonker <mjonker@synopsys.com>
> Cc: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Cc: Andy Fleming <afleming@gmail.com>
> Cc: Alim Akhtar <alim.akhtar@samsung.com>
> Cc: Rajeshwari Shinde <rajeshwari.s@samsung.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
> ---
> arch/arm/include/asm/arch-exynos/dwmmc.h | 22 ----------------------
> drivers/mmc/dw_mmc.c | 1 -
> include/dwmmc.h | 22 ++++++++++++++++++++++
> 3 files changed, 22 insertions(+), 23 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-exynos/dwmmc.h b/arch/arm/include/asm/arch-exynos/dwmmc.h
> index d1c5d4f..da66e25 100644
> --- a/arch/arm/include/asm/arch-exynos/dwmmc.h
> +++ b/arch/arm/include/asm/arch-exynos/dwmmc.h
> @@ -5,28 +5,6 @@
> * SPDX-License-Identifier: GPL-2.0+
> */
>
> -#define DWMCI_CLKSEL 0x09C
> -#define DWMCI_SHIFT_0 0x0
> -#define DWMCI_SHIFT_1 0x1
> -#define DWMCI_SHIFT_2 0x2
> -#define DWMCI_SHIFT_3 0x3
> -#define DWMCI_SET_SAMPLE_CLK(x) (x)
> -#define DWMCI_SET_DRV_CLK(x) ((x) << 16)
> -#define DWMCI_SET_DIV_RATIO(x) ((x) << 24)
> -
> -#define EMMCP_MPSBEGIN0 0x1200
> -#define EMMCP_SEND0 0x1204
> -#define EMMCP_CTRL0 0x120C
> -
> -#define MPSCTRL_SECURE_READ_BIT (0x1<<7)
> -#define MPSCTRL_SECURE_WRITE_BIT (0x1<<6)
> -#define MPSCTRL_NON_SECURE_READ_BIT (0x1<<5)
> -#define MPSCTRL_NON_SECURE_WRITE_BIT (0x1<<4)
> -#define MPSCTRL_USE_FUSE_KEY (0x1<<3)
> -#define MPSCTRL_ECB_MODE (0x1<<2)
> -#define MPSCTRL_ENCRYPTION (0x1<<1)
> -#define MPSCTRL_VALID (0x1<<0)
> -
> #ifdef CONFIG_OF_CONTROL
> int exynos_dwmmc_init(const void *blob);
> #endif
> diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
> index 1e0f72b..2638c3f 100644
> --- a/drivers/mmc/dw_mmc.c
> +++ b/drivers/mmc/dw_mmc.c
> @@ -11,7 +11,6 @@
> #include <mmc.h>
> #include <dwmmc.h>
> #include <asm-generic/errno.h>
> -#include <asm/arch/dwmmc.h>
>
> #define PAGE_SIZE 4096
>
> diff --git a/include/dwmmc.h b/include/dwmmc.h
> index 6c91143..8ea1092 100644
> --- a/include/dwmmc.h
> +++ b/include/dwmmc.h
> @@ -123,6 +123,28 @@
> #define DWMCI_BMOD_IDMAC_FB (1 << 1)
> #define DWMCI_BMOD_IDMAC_EN (1 << 7)
>
> +#define DWMCI_CLKSEL 0x09C
> +#define DWMCI_SHIFT_0 0x0
> +#define DWMCI_SHIFT_1 0x1
> +#define DWMCI_SHIFT_2 0x2
> +#define DWMCI_SHIFT_3 0x3
> +#define DWMCI_SET_SAMPLE_CLK(x) (x)
> +#define DWMCI_SET_DRV_CLK(x) ((x) << 16)
> +#define DWMCI_SET_DIV_RATIO(x) ((x) << 24)
> +
> +#define EMMCP_MPSBEGIN0 0x1200
> +#define EMMCP_SEND0 0x1204
> +#define EMMCP_CTRL0 0x120C
> +
> +#define MPSCTRL_SECURE_READ_BIT (0x1<<7)
> +#define MPSCTRL_SECURE_WRITE_BIT (0x1<<6)
> +#define MPSCTRL_NON_SECURE_READ_BIT (0x1<<5)
> +#define MPSCTRL_NON_SECURE_WRITE_BIT (0x1<<4)
> +#define MPSCTRL_USE_FUSE_KEY (0x1<<3)
> +#define MPSCTRL_ECB_MODE (0x1<<2)
> +#define MPSCTRL_ENCRYPTION (0x1<<1)
> +#define MPSCTRL_VALID (0x1<<0)
> +
> /* quirks */
> #define DWMCI_QUIRK_DISABLE_SMU (1 << 0)
>
>
next prev parent reply other threads:[~2013-11-29 3:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 13:52 [U-Boot] [PATCH] dwmmc: make driver usable for non-exynos platforms Alexey Brodkin
2013-11-29 3:46 ` Jaehoon Chung [this message]
2013-11-29 7:41 ` Alexey Brodkin
2013-11-29 9:57 ` Jaehoon Chung
2013-11-29 10:02 ` Alexey Brodkin
2013-11-29 10:05 ` 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=52980E0F.7030403@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 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.