From: linus.ml.walleij@gmail.com (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmci: fixup broken_blockend variant patch v2
Date: Tue, 18 Jan 2011 16:01:48 +0100 [thread overview]
Message-ID: <AANLkTikjSR_1jmTCdkef2bXgU8-ZU7E-+_pFznfNh8FO@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinFBd9sN01jtHtpTonZN=nvoFFnsYQjHN=4ucSU@mail.gmail.com>
2011/1/17 Rabin Vincent <rabin@rab.in>:
> On Mon, Jan 17, 2011 at 21:26, Linus Walleij
>> The intention is to turn it off for HW which we know is broken,
>> (has broken_blocken set true) which is what happens above.
>
> Right, but don't you already remove the place where it was being set?
>
> | - ? ? ? mask = MCI_IRQENABLE;
> | - ? ? ? /* Don't use the datablockend flag if it's broken */
> | - ? ? ? if (variant->broken_blockend)
> | - ? ? ? ? ? ? ? mask &= ~MCI_DATABLOCKEND;
> | -
> | - ? ? ? writel(mask, host->base + MMCIMASK0);
> | + ? ? ? writel(MCI_IRQENABLE, host->base + MMCIMASK0);
> |
> | ? ? ? ?amba_set_drvdata(dev, mmc);
> |
> | diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h
> | index df06f01..7ac8c4d 100644
> | --- a/drivers/mmc/host/mmci.h
> | +++ b/drivers/mmc/host/mmci.h
> | @@ -137,7 +137,7 @@
> | ?#define MCI_IRQENABLE ?\
> | ? ? ? ?(MCI_CMDCRCFAILMASK|MCI_DATACRCFAILMASK|MCI_CMDTIMEOUTMASK| ? ? \
> | ? ? ? ?MCI_DATATIMEOUTMASK|MCI_TXUNDERRUNMASK|MCI_RXOVERRUNMASK| ? ? ? \
> | - ? ? ? MCI_CMDRESPENDMASK|MCI_CMDSENTMASK|MCI_DATABLOCKENDMASK)
> | + ? ? ? MCI_CMDRESPENDMASK|MCI_CMDSENTMASK)
Um, this shows I should really split the patch, yes MCI_DATABLOCKENDMASK
is removed as set by default, then added back depending on whether the
.broken_blockend flag is set or not.
In the code quoted earlier actually:
writel(datactrl, base + MMCIDATACTRL);
- writel(readl(base + MMCIMASK0)& ~MCI_DATAENDMASK, base + MMCIMASK0);
- mmci_set_mask1(host, irqmask);
+ irqmask0 = readl(base + MMCIMASK0);
+ if (variant->broken_blockend)
+ irqmask0&= ~MCI_DATABLOCKENDMASK;
+ else
+ irqmask0 |= MCI_DATABLOCKENDMASK;
+ irqmask0&= ~MCI_DATAENDMASK;
+ writel(irqmask0, base + MMCIMASK0);
+ mmci_set_mask1(host, irqmask1);
Sorry for the confusion...
Yours,
Linus Walleij
prev parent reply other threads:[~2011-01-18 15:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-17 14:37 [PATCH] mmci: fixup broken_blockend variant patch v2 Linus Walleij
2011-01-17 15:12 ` Rabin Vincent
2011-01-17 16:02 ` Linus Walleij
2011-01-18 12:14 ` Russell King - ARM Linux
2011-01-19 20:34 ` Linus Walleij
2011-01-19 20:51 ` Russell King - ARM Linux
2011-01-19 23:52 ` Linus Walleij
2011-01-21 12:53 ` Linus Walleij
2011-01-23 18:01 ` Russell King - ARM Linux
2011-01-23 21:40 ` Linus Walleij
2011-01-23 23:09 ` Russell King - ARM Linux
2011-01-24 8:18 ` Linus Walleij
2011-01-24 11:21 ` Russell King - ARM Linux
2011-01-24 14:29 ` Linus Walleij
2011-01-27 11:06 ` Russell King - ARM Linux
2011-01-27 14:16 ` Linus Walleij
2011-01-17 15:36 ` Rabin Vincent
2011-01-17 15:56 ` Linus Walleij
2011-01-17 16:56 ` Rabin Vincent
2011-01-18 15:01 ` Linus Walleij [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTikjSR_1jmTCdkef2bXgU8-ZU7E-+_pFznfNh8FO@mail.gmail.com \
--to=linus.ml.walleij@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).