[PATCH] glamo-mci: drop unused IRQ polling code

Lars-Peter Clausen lars at metafoo.de
Thu Jun 10 19:13:27 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thibaut Girka wrote:
> host->irq_works is always true, so, the IRQ polling function in
> glamo-mci.c never gets called. Furthermore, according to Lars, it
> was only here for very early prototypes of the glamo chip. So,
> there should be no issue in dropping it.
Thanks, applied :)
> --- drivers/mfd/glamo/glamo-mci.c |   43
> ----------------------------------------- 1 files changed, 0
> insertions(+), 43 deletions(-)
>
> diff --git a/drivers/mfd/glamo/glamo-mci.c
> b/drivers/mfd/glamo/glamo-mci.c index 74e784e..1d3f9af 100644 ---
> a/drivers/mfd/glamo/glamo-mci.c +++ b/drivers/mfd/glamo/glamo-mci.c
>  @@ -578,43 +578,6 @@ static int glamo_mci_prepare_pio(struct
> glamo_mci_host *host, return 0; }
>
> -static int glamo_mci_irq_poll(struct glamo_mci_host *host, -
> struct mmc_command *cmd) -{ -    int timeout = 1000000; -    uint16_t
> status; -    /* -     * if the glamo INT# line isn't wired (*cough* it
> can happen) -     * I'm afraid we have to spin on the IRQ status bit
> and "be -     * our own INT# line" -     */ -    /* -     * we have
faith we
> will get an "interrupt"... -     * but something insane like suspend
> problems can mean -     * we spin here forever, so we timeout after a
> LONG time -     */ -    do { -        status = glamo_reg_read(host,
> GLAMO_REG_IRQ_STATUS); -    } while ((--timeout) && !(status &
> GLAMO_IRQ_MMC)); - -    if (timeout <= 0) { -        if
(cmd->data->error) -
> cmd->data->error = -ETIMEDOUT; -        dev_err(&host->pdev->dev,
> "Payload timeout\n"); -        return -ETIMEDOUT; -    } -    /* ack this
> interrupt source */ -    writew(GLAMO_IRQ_MMC, host->core->base + -
> GLAMO_REG_IRQ_CLEAR); - -    /* yay we are an interrupt controller! --
> call the ISR -     * it will stop clock to card -     */ -
> glamo_mci_irq(host->irq, host); - -    return 0; -} - static void
> glamo_mci_send_request(struct mmc_host *mmc, struct mmc_request
> *mrq) { @@ -644,12 +607,6 @@ static void
> glamo_mci_send_request(struct mmc_host *mmc, if (!cmd->data ||
> cmd->error) goto done;
>
> - -    if (!host->core->irq_works) { -        if (glamo_mci_irq_poll(host,
> mrq->cmd)) -            goto done; -    } - /* * Otherwise can can use the
> interrupt as async completion -- * if there is read data coming, or
> we wait for write data to complete,

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkwRHTYACgkQBX4mSR26RiO9DgCfRLLAg5NiywgG3PRwpcbBzBdL
V2sAn3kOEL/18bNrwlCnTYMki5taAWQA
=ssIO
-----END PGP SIGNATURE-----




More information about the openmoko-kernel mailing list