public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* mmc: dw_mmc: Add more capabilities field
@ 2011-12-09  5:49 Seungwon Jeon
  2011-12-09 10:41 ` James Hogan
  0 siblings, 1 reply; 4+ messages in thread
From: Seungwon Jeon @ 2011-12-09  5:49 UTC (permalink / raw)
  To: linux-mmc; +Cc: 'Chris Ball', linux-samsung-soc

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, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 3aaeb08..366df6b 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1681,6 +1681,12 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 	else
 		mmc->caps = 0;
 
+	if (host->pdata->caps2)
+		mmc->caps2 = host->pdata->caps2;
+	else
+		mmc->caps2 = 0;
+
+
 	if (host->pdata->get_bus_wd)
 		if (host->pdata->get_bus_wd(slot->id) >= 4)
 			mmc->caps |= MMC_CAP_4_BIT_DATA;
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] 4+ messages in thread

* Re: mmc: dw_mmc: Add more capabilities field
  2011-12-09  5:49 mmc: dw_mmc: Add more capabilities field Seungwon Jeon
@ 2011-12-09 10:41 ` James Hogan
  2011-12-12 10:55   ` Seungwon Jeon
  0 siblings, 1 reply; 4+ messages in thread
From: James Hogan @ 2011-12-09 10:41 UTC (permalink / raw)
  To: Seungwon Jeon; +Cc: linux-mmc, Chris Ball, linux-samsung-soc

On 9 December 2011 05:49, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>

A commit message would be useful.

> ---
>  drivers/mmc/host/dw_mmc.c  |    6 ++++++
>  include/linux/mmc/dw_mmc.h |    1 +
>  2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 3aaeb08..366df6b 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1681,6 +1681,12 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>        else
>                mmc->caps = 0;
>
> +       if (host->pdata->caps2)
> +               mmc->caps2 = host->pdata->caps2;
> +       else
> +               mmc->caps2 = 0;
> +
> +

There's really no need to check the value here, just copy it over.
Same with the other caps field really.

>        if (host->pdata->get_bus_wd)
>                if (host->pdata->get_bus_wd(slot->id) >= 4)
>                        mmc->caps |= MMC_CAP_4_BIT_DATA;
> 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
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

other than that it looks fine to me.

-- 
James Hogan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: mmc: dw_mmc: Add more capabilities field
  2011-12-09 10:41 ` James Hogan
@ 2011-12-12 10:55   ` Seungwon Jeon
  2011-12-12 13:05     ` James Hogan
  0 siblings, 1 reply; 4+ messages in thread
From: Seungwon Jeon @ 2011-12-12 10:55 UTC (permalink / raw)
  To: 'James Hogan'; +Cc: linux-mmc, 'Chris Ball', linux-samsung-soc

James Hogan wrote:
> On 9 December 2011 05:49, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> > Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> 
> A commit message would be useful.
"This patch adds another capabilities field for MMC_CAPS2_XXX."
Is a commit message disappeared?
> 
> > ---
> >  drivers/mmc/host/dw_mmc.c  |    6 ++++++
> >  include/linux/mmc/dw_mmc.h |    1 +
> >  2 files changed, 7 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> > index 3aaeb08..366df6b 100644
> > --- a/drivers/mmc/host/dw_mmc.c
> > +++ b/drivers/mmc/host/dw_mmc.c
> > @@ -1681,6 +1681,12 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
> >        else
> >                mmc->caps = 0;
> >
> > +       if (host->pdata->caps2)
> > +               mmc->caps2 = host->pdata->caps2;
> > +       else
> > +               mmc->caps2 = 0;
> > +
> > +
> 
> There's really no need to check the value here, just copy it over.
> Same with the other caps field really.
Yes. No need to check.
It would be added rather than be copied.

Thanks,
Seungwon Jeon.
> 
> >        if (host->pdata->get_bus_wd)
> >                if (host->pdata->get_bus_wd(slot->id) >= 4)
> >                        mmc->caps |= MMC_CAP_4_BIT_DATA;
> > 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
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> other than that it looks fine to me.
> 
> --
> James Hogan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mmc: dw_mmc: Add more capabilities field
  2011-12-12 10:55   ` Seungwon Jeon
@ 2011-12-12 13:05     ` James Hogan
  0 siblings, 0 replies; 4+ messages in thread
From: James Hogan @ 2011-12-12 13:05 UTC (permalink / raw)
  To: Seungwon Jeon; +Cc: linux-mmc, Chris Ball, linux-samsung-soc

On 12 December 2011 10:55, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> James Hogan wrote:
>> On 9 December 2011 05:49, Seungwon Jeon <tgih.jun@samsung.com> wrote:
>> > Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
>>
>> A commit message would be useful.
> "This patch adds another capabilities field for MMC_CAPS2_XXX."
> Is a commit message disappeared?

Ah yes, it was visible in the second email. It just wasn't at all
obvious where the caps2 was added, but I eventually found a reference
to it in another similar patch for another driver that explicitly
mentioned the mmc-next tree.

Cheers
James

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-12 13:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-09  5:49 mmc: dw_mmc: Add more capabilities field Seungwon Jeon
2011-12-09 10:41 ` James Hogan
2011-12-12 10:55   ` Seungwon Jeon
2011-12-12 13:05     ` James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox