Purushotam Kumar <[email protected]> writes:

> Signed-off-by: Purushotam Kumar <[email protected]>

This should be folded into PATCH 1/1 and the description updated accordingly.

Kevin

> ---
>  drivers/mmc/host/davinci_mmc.c |   37 +++++++++++++++----------------------
>  1 files changed, 15 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
> index c631c91..9e04082 100644
> --- a/drivers/mmc/host/davinci_mmc.c
> +++ b/drivers/mmc/host/davinci_mmc.c
> @@ -912,14 +912,26 @@ davinci_abort_data(struct mmc_davinci_host *host, 
> struct mmc_data *data)
>       writel(temp, host->base + DAVINCI_MMCCTL);
>  }
>  
> -static inline int handle_core_command(
> -             struct mmc_davinci_host *host, unsigned int status)
> +static irqreturn_t mmc_davinci_irq(int irq, void *dev_id)
>  {
> +     struct mmc_davinci_host *host = (struct mmc_davinci_host *)dev_id;
> +     unsigned int status, qstatus;
>       int end_command = 0;
>       int end_transfer = 0;
> -     unsigned int qstatus = status;
>       struct mmc_data *data = host->data;
>  
> +     if (host->cmd == NULL && host->data == NULL) {
> +             status = readl(host->base + DAVINCI_MMCST0);
> +             dev_dbg(mmc_dev(host->mmc),
> +                     "Spurious interrupt 0x%04x\n", status);
> +             /* Disable the interrupt from mmcsd */
> +             writel(0, host->base + DAVINCI_MMCIM);
> +             return IRQ_NONE;
> +     }
> +
> +     status = readl(host->base + DAVINCI_MMCST0);
> +     qstatus = status;
> +
>       /* handle FIFO first when using PIO for data.
>        * bytes_left will decrease to zero as I/O progress and status will
>        * read zero over iteration because this controller status
> @@ -1022,25 +1034,6 @@ static inline int handle_core_command(
>               mmc_davinci_cmd_done(host, host->cmd);
>       if (end_transfer)
>               mmc_davinci_xfer_done(host, data);
> -     return 0;
> -}
> -
> -static irqreturn_t mmc_davinci_irq(int irq, void *dev_id)
> -{
> -     struct mmc_davinci_host *host = (struct mmc_davinci_host *)dev_id;
> -     unsigned int status;
> -
> -     if (host->cmd == NULL && host->data == NULL) {
> -             status = readl(host->base + DAVINCI_MMCST0);
> -             dev_dbg(mmc_dev(host->mmc),
> -                     "Spurious interrupt 0x%04x\n", status);
> -             /* Disable the interrupt from mmcsd */
> -             writel(0, host->base + DAVINCI_MMCIM);
> -             return IRQ_NONE;
> -     }
> -
> -     status = readl(host->base + DAVINCI_MMCST0);
> -     handle_core_command(host, status);
>       return IRQ_HANDLED;
>  }
>  
> -- 
> 1.5.6
>
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to