public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc: Add the function call for board-specific initialization.
@ 2011-06-30  2:57 Seungwon Jeon
  2011-06-30  6:33 ` Jaehoon Chung
  0 siblings, 1 reply; 6+ messages in thread
From: Seungwon Jeon @ 2011-06-30  2:57 UTC (permalink / raw)
  To: linux-mmc, cjb; +Cc: linux-kernel, Seungwon Jeon

Need to call init() function of dw_mci_board.
It seems to be omitted to call this function.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
---
 drivers/mmc/host/dw_mmc.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index a524416..073c420 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1585,6 +1585,15 @@ static void dw_mci_work_routine_card(struct work_struct *work)
 	}
 }

+static irqreturn_t dw_mci_detect_interrupt(int irq, void *dev_id)
+{
+	struct dw_mci_slot *slot = dev_id;
+
+	queue_work(dw_mci_card_workqueue, &host->card_work);
+
+	return IRQ_HANDLED;
+}
+
 static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 {
 	struct mmc_host *mmc;
@@ -1657,6 +1666,8 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 	} else
 		regulator_enable(host->vmmc);

+	host->pdata->init(id, dw_mci_detect_interrupt, host);
+
 	if (dw_mci_get_cd(mmc))
 		set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
 	else
--
1.7.0.4


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

* Re: [PATCH] mmc: dw_mmc: Add the function call for board-specific initialization.
  2011-06-30  2:57 [PATCH] mmc: dw_mmc: Add the function call for board-specific initialization Seungwon Jeon
@ 2011-06-30  6:33 ` Jaehoon Chung
  2011-06-30  8:04   ` James Hogan
  0 siblings, 1 reply; 6+ messages in thread
From: Jaehoon Chung @ 2011-06-30  6:33 UTC (permalink / raw)
  To: Seungwon Jeon; +Cc: linux-mmc, cjb, linux-kernel

Hi Mr.Jeon

This patch is the compiler error.

didn't find host->card_work..

do you want this
queue_work(dw_mci_card_workqueue, &slot->host->card_work); ?


Regards,
Jaehoon Chung


Seungwon Jeon wrote:
> Need to call init() function of dw_mci_board.
> It seems to be omitted to call this function.
> 
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> ---
>  drivers/mmc/host/dw_mmc.c |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index a524416..073c420 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1585,6 +1585,15 @@ static void dw_mci_work_routine_card(struct work_struct *work)
>  	}
>  }
> 
> +static irqreturn_t dw_mci_detect_interrupt(int irq, void *dev_id)
> +{
> +	struct dw_mci_slot *slot = dev_id;
> +
> +	queue_work(dw_mci_card_workqueue, &host->card_work);
> +
> +	return IRQ_HANDLED;
> +}
> +
>  static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>  {
>  	struct mmc_host *mmc;
> @@ -1657,6 +1666,8 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>  	} else
>  		regulator_enable(host->vmmc);
> 
> +	host->pdata->init(id, dw_mci_detect_interrupt, host);
> +
>  	if (dw_mci_get_cd(mmc))
>  		set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
>  	else
> --
> 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
> 


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

* Re: [PATCH] mmc: dw_mmc: Add the function call for board-specific initialization.
  2011-06-30  6:33 ` Jaehoon Chung
@ 2011-06-30  8:04   ` James Hogan
  2011-06-30  8:20     ` Jaehoon Chung
  0 siblings, 1 reply; 6+ messages in thread
From: James Hogan @ 2011-06-30  8:04 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: Seungwon Jeon, linux-mmc, cjb, linux-kernel

On 30 June 2011 07:33, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> Hi Mr.Jeon
>
> This patch is the compiler error.
>
> didn't find host->card_work..
>
> do you want this
> queue_work(dw_mci_card_workqueue, &slot->host->card_work); ?

I think the patch is based on mmc-next, which has the following commit:
35ba9d8 mmc: dw_mmc: convert card tasklet to workqueue

Cheers
James

>
>
> Regards,
> Jaehoon Chung
>
>
> Seungwon Jeon wrote:
>> Need to call init() function of dw_mci_board.
>> It seems to be omitted to call this function.
>>
>> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
>> ---
>>  drivers/mmc/host/dw_mmc.c |   11 +++++++++++
>>  1 files changed, 11 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
>> index a524416..073c420 100644
>> --- a/drivers/mmc/host/dw_mmc.c
>> +++ b/drivers/mmc/host/dw_mmc.c
>> @@ -1585,6 +1585,15 @@ static void dw_mci_work_routine_card(struct work_struct *work)
>>       }
>>  }
>>
>> +static irqreturn_t dw_mci_detect_interrupt(int irq, void *dev_id)
>> +{
>> +     struct dw_mci_slot *slot = dev_id;
>> +
>> +     queue_work(dw_mci_card_workqueue, &host->card_work);
>> +
>> +     return IRQ_HANDLED;
>> +}
>> +
>>  static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>  {
>>       struct mmc_host *mmc;
>> @@ -1657,6 +1666,8 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>       } else
>>               regulator_enable(host->vmmc);
>>
>> +     host->pdata->init(id, dw_mci_detect_interrupt, host);
>> +
>>       if (dw_mci_get_cd(mmc))
>>               set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
>>       else
>> --
>> 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
>>
>
> --
> 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
>



-- 
James Hogan

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

* Re: [PATCH] mmc: dw_mmc: Add the function call for board-specific initialization.
  2011-06-30  8:04   ` James Hogan
@ 2011-06-30  8:20     ` Jaehoon Chung
  2011-06-30  8:43       ` James Hogan
  0 siblings, 1 reply; 6+ messages in thread
From: Jaehoon Chung @ 2011-06-30  8:20 UTC (permalink / raw)
  To: James Hogan; +Cc: Jaehoon Chung, Seungwon Jeon, linux-mmc, cjb, linux-kernel

Hi James

James Hogan wrote:
> On 30 June 2011 07:33, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>> Hi Mr.Jeon
>>
>> This patch is the compiler error.
>>
>> didn't find host->card_work..
>>
>> do you want this
>> queue_work(dw_mci_card_workqueue, &slot->host->card_work); ?
> 
> I think the patch is based on mmc-next, which has the following commit:
> 35ba9d8 mmc: dw_mmc: convert card tasklet to workqueue

I also tested this patch based on mmc-next.
But my mean is that there is not host structure in dw_mci_detect_interrupt().

drivers/mmc/host/dw_mmc.c: In function 'dw_mci_detect_interrupt':
drivers/mmc/host/dw_mmc.c:1592: error: 'host' undeclared (first use in this function)
drivers/mmc/host/dw_mmc.c:1592: error: (Each undeclared identifier is reported only once
drivers/mmc/host/dw_mmc.c:1592: error: for each function it appears in.)
drivers/mmc/host/dw_mmc.c:1590: warning: unused variable 'slot'
make[3]: *** [drivers/mmc/host/dw_mmc.o] Error 1
make[2]: *** [drivers/mmc/host] Error 2

Did you really compile fine?

Regards,
Jaehoon Chung

> 
> Cheers
> James
> 
>>
>> Regards,
>> Jaehoon Chung
>>
>>
>> Seungwon Jeon wrote:
>>> Need to call init() function of dw_mci_board.
>>> It seems to be omitted to call this function.
>>>
>>> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
>>> ---
>>>  drivers/mmc/host/dw_mmc.c |   11 +++++++++++
>>>  1 files changed, 11 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
>>> index a524416..073c420 100644
>>> --- a/drivers/mmc/host/dw_mmc.c
>>> +++ b/drivers/mmc/host/dw_mmc.c
>>> @@ -1585,6 +1585,15 @@ static void dw_mci_work_routine_card(struct work_struct *work)
>>>       }
>>>  }
>>>
>>> +static irqreturn_t dw_mci_detect_interrupt(int irq, void *dev_id)
>>> +{
>>> +     struct dw_mci_slot *slot = dev_id;
>>> +
>>> +     queue_work(dw_mci_card_workqueue, &host->card_work);
>>> +
>>> +     return IRQ_HANDLED;
>>> +}
>>> +
>>>  static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>>  {
>>>       struct mmc_host *mmc;
>>> @@ -1657,6 +1666,8 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>>       } else
>>>               regulator_enable(host->vmmc);
>>>
>>> +     host->pdata->init(id, dw_mci_detect_interrupt, host);
>>> +
>>>       if (dw_mci_get_cd(mmc))
>>>               set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
>>>       else
>>> --
>>> 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
>>>
>> --
>> 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] 6+ messages in thread

* Re: [PATCH] mmc: dw_mmc: Add the function call for board-specific initialization.
  2011-06-30  8:20     ` Jaehoon Chung
@ 2011-06-30  8:43       ` James Hogan
  2011-07-01  2:27         ` 전승원
  0 siblings, 1 reply; 6+ messages in thread
From: James Hogan @ 2011-06-30  8:43 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: Seungwon Jeon, linux-mmc, cjb, linux-kernel

Hi,

On 30 June 2011 09:20, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> Hi James
>
> James Hogan wrote:
>> On 30 June 2011 07:33, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>>> Hi Mr.Jeon
>>>
>>> This patch is the compiler error.
>>>
>>> didn't find host->card_work..
>>>
>>> do you want this
>>> queue_work(dw_mci_card_workqueue, &slot->host->card_work); ?
>>
>> I think the patch is based on mmc-next, which has the following commit:
>> 35ba9d8 mmc: dw_mmc: convert card tasklet to workqueue
>
> I also tested this patch based on mmc-next.
> But my mean is that there is not host structure in dw_mci_detect_interrupt().
>
> drivers/mmc/host/dw_mmc.c: In function 'dw_mci_detect_interrupt':
> drivers/mmc/host/dw_mmc.c:1592: error: 'host' undeclared (first use in this function)
> drivers/mmc/host/dw_mmc.c:1592: error: (Each undeclared identifier is reported only once
> drivers/mmc/host/dw_mmc.c:1592: error: for each function it appears in.)
> drivers/mmc/host/dw_mmc.c:1590: warning: unused variable 'slot'
> make[3]: *** [drivers/mmc/host/dw_mmc.o] Error 1
> make[2]: *** [drivers/mmc/host] Error 2

Sorry, I misunderstood. You are correct.

Cheers
James

>
> Did you really compile fine?
>
> Regards,
> Jaehoon Chung
>
>>
>> Cheers
>> James
>>
>>>
>>> Regards,
>>> Jaehoon Chung
>>>
>>>
>>> Seungwon Jeon wrote:
>>>> Need to call init() function of dw_mci_board.
>>>> It seems to be omitted to call this function.
>>>>
>>>> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
>>>> ---
>>>>  drivers/mmc/host/dw_mmc.c |   11 +++++++++++
>>>>  1 files changed, 11 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
>>>> index a524416..073c420 100644
>>>> --- a/drivers/mmc/host/dw_mmc.c
>>>> +++ b/drivers/mmc/host/dw_mmc.c
>>>> @@ -1585,6 +1585,15 @@ static void dw_mci_work_routine_card(struct work_struct *work)
>>>>       }
>>>>  }
>>>>
>>>> +static irqreturn_t dw_mci_detect_interrupt(int irq, void *dev_id)
>>>> +{
>>>> +     struct dw_mci_slot *slot = dev_id;
>>>> +
>>>> +     queue_work(dw_mci_card_workqueue, &host->card_work);
>>>> +
>>>> +     return IRQ_HANDLED;
>>>> +}
>>>> +
>>>>  static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>>>  {
>>>>       struct mmc_host *mmc;
>>>> @@ -1657,6 +1666,8 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>>>       } else
>>>>               regulator_enable(host->vmmc);
>>>>
>>>> +     host->pdata->init(id, dw_mci_detect_interrupt, host);
>>>> +
>>>>       if (dw_mci_get_cd(mmc))
>>>>               set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
>>>>       else
>>>> --
>>>> 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
>>>>
>>> --
>>> 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
>>>
>>
>>
>>
>
>



-- 
James Hogan

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

* RE: [PATCH] mmc: dw_mmc: Add the function call for board-specific initialization.
  2011-06-30  8:43       ` James Hogan
@ 2011-07-01  2:27         ` 전승원
  0 siblings, 0 replies; 6+ messages in thread
From: 전승원 @ 2011-07-01  2:27 UTC (permalink / raw)
  To: 'James Hogan', 'Jaehoon Chung'
  Cc: linux-mmc, cjb, linux-kernel

Hi,
Thank you for comment.

> -----Original Message-----
> From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc-
> owner@vger.kernel.org] On Behalf Of James Hogan
> Sent: Thursday, June 30, 2011 5:43 PM
> To: Jaehoon Chung
> Cc: Seungwon Jeon; linux-mmc@vger.kernel.org; cjb@laptop.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH] mmc: dw_mmc: Add the function call for board-specific
> initialization.
> 
> Hi,
> 
> On 30 June 2011 09:20, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> > Hi James
> >
> > James Hogan wrote:
> >> On 30 June 2011 07:33, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> >>> Hi Mr.Jeon
> >>>
> >>> This patch is the compiler error.
> >>>
> >>> didn't find host->card_work..
> >>>
> >>> do you want this
> >>> queue_work(dw_mci_card_workqueue, &slot->host->card_work); ?
> >>
> >> I think the patch is based on mmc-next, which has the following commit:
> >> 35ba9d8 mmc: dw_mmc: convert card tasklet to workqueue
> >
> > I also tested this patch based on mmc-next.
> > But my mean is that there is not host structure in
> dw_mci_detect_interrupt().
> >
> > drivers/mmc/host/dw_mmc.c: In function 'dw_mci_detect_interrupt':
> > drivers/mmc/host/dw_mmc.c:1592: error: 'host' undeclared (first use in
> this function)
> > drivers/mmc/host/dw_mmc.c:1592: error: (Each undeclared identifier is
> reported only once
> > drivers/mmc/host/dw_mmc.c:1592: error: for each function it appears in.)
> > drivers/mmc/host/dw_mmc.c:1590: warning: unused variable 'slot'
> > make[3]: *** [drivers/mmc/host/dw_mmc.o] Error 1
> > make[2]: *** [drivers/mmc/host] Error 2
> 
> Sorry, I misunderstood. You are correct.


queue_work(dw_mci_card_workqueue, &host->card_work);
'slot' is omitted. (&slot->host->card_work)

Sorry for my mistake.
I'll fix it.

Best regards,
Seungwon.


> Cheers
> James
> 
> >
> > Did you really compile fine?
> >
> > Regards,
> > Jaehoon Chung
> >
> >>
> >> Cheers
> >> James
> >>
> >>>
> >>> Regards,
> >>> Jaehoon Chung
> >>>
> >>>
> >>> Seungwon Jeon wrote:
> >>>> Need to call init() function of dw_mci_board.
> >>>> It seems to be omitted to call this function.
> >>>>
> >>>> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> >>>> ---
> >>>>  drivers/mmc/host/dw_mmc.c |   11 +++++++++++
> >>>>  1 files changed, 11 insertions(+), 0 deletions(-)
> >>>>
> >>>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> >>>> index a524416..073c420 100644
> >>>> --- a/drivers/mmc/host/dw_mmc.c
> >>>> +++ b/drivers/mmc/host/dw_mmc.c
> >>>> @@ -1585,6 +1585,15 @@ static void dw_mci_work_routine_card(struct
> work_struct *work)
> >>>>       }
> >>>>  }
> >>>>
> >>>> +static irqreturn_t dw_mci_detect_interrupt(int irq, void *dev_id)
> >>>> +{
> >>>> +     struct dw_mci_slot *slot = dev_id;
> >>>> +
> >>>> +     queue_work(dw_mci_card_workqueue, &host->card_work);
> >>>> +
> >>>> +     return IRQ_HANDLED;
> >>>> +}
> >>>> +
> >>>>  static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int
> id)
> >>>>  {
> >>>>       struct mmc_host *mmc;
> >>>> @@ -1657,6 +1666,8 @@ static int __init dw_mci_init_slot(struct
> dw_mci *host, unsigned int id)
> >>>>       } else
> >>>>               regulator_enable(host->vmmc);
> >>>>
> >>>> +     host->pdata->init(id, dw_mci_detect_interrupt, host);
> >>>> +
> >>>>       if (dw_mci_get_cd(mmc))
> >>>>               set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
> >>>>       else
> >>>> --
> >>>> 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
> >>>>
> >>> --
> >>> 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
> >>>
> >>
> >>
> >>
> >
> >
> 
> 
> 
> --
> 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] 6+ messages in thread

end of thread, other threads:[~2011-07-01  2:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-30  2:57 [PATCH] mmc: dw_mmc: Add the function call for board-specific initialization Seungwon Jeon
2011-06-30  6:33 ` Jaehoon Chung
2011-06-30  8:04   ` James Hogan
2011-06-30  8:20     ` Jaehoon Chung
2011-06-30  8:43       ` James Hogan
2011-07-01  2:27         ` 전승원

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