* [PATCH v2] mmc: dw_mmc: Add second capability field
@ 2011-12-22 9:01 Seungwon Jeon
2011-12-22 10:30 ` Will Newton
2011-12-25 2:37 ` Chris Ball
0 siblings, 2 replies; 3+ messages in thread
From: Seungwon Jeon @ 2011-12-22 9:01 UTC (permalink / raw)
To: linux-mmc; +Cc: 'Chris Ball', linux-samsung-soc, 'James Hogan'
This patch adds caps2 filed for second capability in dw_mmc.
It corresponds with MMC_CAPS2_XXX. And this patch removes the
unnecessary condition statement for assigning caps.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
---
drivers/mmc/host/dw_mmc.c | 6 ++----
include/linux/mmc/dw_mmc.h | 1 +
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 3aaeb08..3f5a77a 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1676,10 +1676,8 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
if (host->pdata->setpower)
host->pdata->setpower(id, 0);
- if (host->pdata->caps)
- mmc->caps = host->pdata->caps;
- else
- mmc->caps = 0;
+ mmc->caps |= host->pdata->caps;
+ mmc->caps2 |= host->pdata->caps2;
if (host->pdata->get_bus_wd)
if (host->pdata->get_bus_wd(slot->id) >= 4)
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 6dc9b80..e8779c6 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -214,6 +214,7 @@ struct dw_mci_board {
unsigned int bus_hz; /* Bus speed */
unsigned int caps; /* Capabilities */
+ unsigned int caps2; /* More capabilities */
/*
* Override fifo depth. If 0, autodetect it from the FIFOTH register,
* but note that this may not be reliable after a bootloader has used
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mmc: dw_mmc: Add second capability field
2011-12-22 9:01 [PATCH v2] mmc: dw_mmc: Add second capability field Seungwon Jeon
@ 2011-12-22 10:30 ` Will Newton
2011-12-25 2:37 ` Chris Ball
1 sibling, 0 replies; 3+ messages in thread
From: Will Newton @ 2011-12-22 10:30 UTC (permalink / raw)
To: Seungwon Jeon; +Cc: linux-mmc, Chris Ball, linux-samsung-soc, James Hogan
On Thu, Dec 22, 2011 at 9:01 AM, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> This patch adds caps2 filed for second capability in dw_mmc.
> It corresponds with MMC_CAPS2_XXX. And this patch removes the
> unnecessary condition statement for assigning caps.
>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> ---
> drivers/mmc/host/dw_mmc.c | 6 ++----
> include/linux/mmc/dw_mmc.h | 1 +
> 2 files changed, 3 insertions(+), 4 deletions(-)
Acked-by: Will Newton <will.newton@imgtec.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mmc: dw_mmc: Add second capability field
2011-12-22 9:01 [PATCH v2] mmc: dw_mmc: Add second capability field Seungwon Jeon
2011-12-22 10:30 ` Will Newton
@ 2011-12-25 2:37 ` Chris Ball
1 sibling, 0 replies; 3+ messages in thread
From: Chris Ball @ 2011-12-25 2:37 UTC (permalink / raw)
To: Seungwon Jeon; +Cc: linux-mmc, linux-samsung-soc, 'James Hogan'
Hi,
On Thu, Dec 22 2011, Seungwon Jeon wrote:
> This patch adds caps2 filed for second capability in dw_mmc.
> It corresponds with MMC_CAPS2_XXX. And this patch removes the
> unnecessary condition statement for assigning caps.
>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> ---
> drivers/mmc/host/dw_mmc.c | 6 ++----
> include/linux/mmc/dw_mmc.h | 1 +
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 3aaeb08..3f5a77a 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1676,10 +1676,8 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
> if (host->pdata->setpower)
> host->pdata->setpower(id, 0);
>
> - if (host->pdata->caps)
> - mmc->caps = host->pdata->caps;
> - else
> - mmc->caps = 0;
> + mmc->caps |= host->pdata->caps;
> + mmc->caps2 |= host->pdata->caps2;
Ah, I replied earlier without having seen this patch. I still prefer
the version I proposed, which doesn't dereference host->pdata->caps{,2}
without testing it first.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-25 2:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-22 9:01 [PATCH v2] mmc: dw_mmc: Add second capability field Seungwon Jeon
2011-12-22 10:30 ` Will Newton
2011-12-25 2:37 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).