On Mon, Jul 4, 2011 at 8:07 AM, Seungwon Jeon <[email protected]> wrote:
> Need to call init() function of dw_mci_board.
> It seems to be omitted to call this function.
>
> Signed-off-by: Seungwon Jeon <[email protected]>
> ---
> 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..688d58a 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, &slot->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
Sorry for the delay in replying.
I believe this patch does the correct thing (although for the boards I
have the init function is not defined). The comment I have in some
code here for the init function is:
/*
* Used to setup gpio based card detect interrupt handler
* on a per slot basis, we are using the modules built in
* card detect functionality, so do nothing (must be implemented).
*/
Although with the current GPIO layer irq handling I would have thought
we could setup a GPIO irq in the board setup code and pass the irq
number in directly. So form that point of view it may be better to
remove this init function entirely?
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html