[PATCH 02/12] mmci: fix multi block transfers
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Jul 29 09:36:47 EDT 2010
On Thu, Jul 29, 2010 at 02:31:48PM +0100, Colin Tuckley wrote:
> > -----Original Message-----
> > From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-arm-
> > kernel-bounces at lists.infradead.org] On Behalf Of Russell King - ARM
>
> > So this is good news. I've applied the first three patches in this
> > series, but we do need to sort out the card detect situation properly
> > before continuing.
>
> On the subject of card detection. I recently noticed that although it works
> on the PB926 it doesn't on the AB926 despite it being the same kernel
> binary.
No, it doesn't work on Versatile PB926 in mainline (I tried it this morning)
because the card detection (via the ->status callback) is inverted - just
like it was for realview. What happens is you get commands issued to the
card on card removal, and nothing on card insertion.
What I'm proposing is that we get rid of these multiple levels of negation
that we're gaining. The negations only add additional complexity and
confusion over what's the right thing to return at any given point. Lets
stick to one positive logic method throughout the code - 0 means no card,
!0 means card inserted.
That means your original patch needs to be reverted, and we need to change
the 'return !status;' to just 'return status;' in mmci.c's get_cd function
as per my patch.
However, I think this will make GPIO on Realview wrong - iirc, the card
detection bits from PL061 are inverted.
More information about the linux-arm-kernel
mailing list