From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Krzysztof Halasa <khc@pm.waw.pl>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: Proposal for new generic device API: dma_get_required_mask()
Date: Sat, 19 Jun 2004 21:22:46 +0100 [thread overview]
Message-ID: <20040619212246.B8063@flint.arm.linux.org.uk> (raw)
In-Reply-To: <m3brjg7994.fsf@defiant.pm.waw.pl>; from khc@pm.waw.pl on Sat, Jun 19, 2004 at 01:10:31AM +0200
On Sat, Jun 19, 2004 at 01:10:31AM +0200, Krzysztof Halasa wrote:
> Russell King <rmk+lkml@arm.linux.org.uk> writes:
> > Good idea, except for the fact that we have drivers merged which have
> > real masks like 0x0fefffff. It _really is_ a mask and not a number
> > of bits.
>
> Which drivers do you mean? And which platforms support it?
The SA1111 device and associated sub-device drivers. Basically, Intel
has a "no fix" errata where one of the address bits gets incorrectly
routed to the SDRAM "auto precharge" address bit. This address bit
must be zero, otherwise the SDRAM accesses are messed up.
However, because SDRAM is accessed by "row" and "column" addresses,
the physical address bit which corresponds to the "auto precharge"
signal varies according to the size of SDRAM.
This is what the following table is about:
static u32 sa1111_dma_mask[] = {
~0,
~(1 << 20),
~(1 << 23),
~(1 << 24),
~(1 << 25),
~(1 << 20),
~(1 << 20),
0,
};
for each setting of the SDRAM row/column address multiplexer, we have
to ensure that a certain DMA address bit is zero. Note, however,
that the problem address bit does not correspond to the highest
addressable bit. You may have a 32MB SDRAM but need to ensure that
physical bit 20 is always zero - IOW you can only DMA from even MB
addresses and not odd MB addresses.
Hence, this ends up with DMA masks such as the example in my previous
mail.
And yes, this chip is popular, in use, and this quirk is not difficult
to cleanly work around given our existing API.
Hence why changing from "dma mask" to "number of bits" breaks existing
drivers.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
next prev parent reply other threads:[~2004-06-19 20:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-17 14:08 Proposal for new generic device API: dma_get_required_mask() James Bottomley
2004-06-17 14:51 ` Meelis Roos
2004-06-17 15:28 ` Matthew Wilcox
2004-06-17 20:12 ` James Bottomley
2004-06-18 0:46 ` Krzysztof Halasa
2004-06-18 1:45 ` James Bottomley
2004-06-18 23:07 ` Krzysztof Halasa
2004-06-19 15:00 ` James Bottomley
2004-06-19 23:39 ` Krzysztof Halasa
2004-06-20 16:56 ` James Bottomley
2004-06-18 9:21 ` Russell King
2004-06-18 23:10 ` Krzysztof Halasa
2004-06-19 20:22 ` Russell King [this message]
2004-06-20 0:00 ` Krzysztof Halasa
2004-06-20 19:47 ` Russell King
2004-06-23 19:32 ` Krzysztof Halasa
2004-06-18 5:59 ` Jeremy Higdon
2004-06-18 14:19 ` James Bottomley
-- strict thread matches above, loose matches on Subject: below --
2004-06-17 14:52 Salyzyn, Mark
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=20040619212246.B8063@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=James.Bottomley@steeleye.com \
--cc=khc@pm.waw.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.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