From: Thomas Kleffel <[email protected]>
this patch enables ide_cs to access CF-cards via their common memory
rather than via their IO space.
Signed-off-by: Thomas Kleffel <[email protected]>
---
This patch is against 2.6.17-rc3
The reason why this patch makes sense is that it is pretty easy to build
a CF-Interface out of a simple address/data-bus if you only use common
and attribute memory. Adding the capability to access IO space makes
things more complicated.
If you just want to use CF-Storage cards, access to common and attribute
memory is enough as the IDE registers are available there, as well.
I have submitted a patch to RMK which enables the AT91RM9200's CF
interface to work in that mode.
On Iau, 2006-05-11 at 04:10 +0200, Thomas Kleffel (maintech GmbH) wrote:
> From: Thomas Kleffel <[email protected]>
>
> this patch enables ide_cs to access CF-cards via their common memory
> rather than via their IO space.
One obvious problem. Your patch simply sets io_base to an ioremap value.
The ide_cs code assumes port accesses (eg it does outb() on base + 2).
While outb() may happen to work on ARM on ioremap returns it doesn't on
most platforms.
Alan
From: Thomas Kleffel <[email protected]>
this patch enables ide_cs to access CF-cards via their common memory
rather than via their IO space.
Signed-off-by: Thomas Kleffel <[email protected]>
---
This patch is against 2.6.17-rc3
The reason why this patch makes sense is that it is pretty easy to build
a CF-Interface out of a simple address/data-bus if you only use common
and attribute memory. Adding the capability to access IO space makes
things more complicated.
If you just want to use CF-Storage cards, access to common and attribute
memory is enough as the IDE registers are available there, as well.
I have submitted a patch to RMK which enables the AT91RM9200's CF
interface to work in that mode.
I made some changes based on the feedback from Alan Cox and Iain Barker.
Thomas
On Thu, May 11, 2006 at 04:52:58PM +0100, Alan Cox wrote:
> On Iau, 2006-05-11 at 04:10 +0200, Thomas Kleffel (maintech GmbH) wrote:
> > From: Thomas Kleffel <[email protected]>
> >
> > this patch enables ide_cs to access CF-cards via their common memory
> > rather than via their IO space.
>
> One obvious problem. Your patch simply sets io_base to an ioremap value.
> The ide_cs code assumes port accesses (eg it does outb() on base + 2).
> While outb() may happen to work on ARM on ioremap returns it doesn't on
> most platforms.
And it doesn't even work on all ARM platforms. I wish ARM folk would
recognise the difference between the different address spaces and stop
confusing them.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
From: Thomas Kleffel <[email protected]>
this patch enables ide_cs to access CF-cards via their common memory
rather than via their IO space.
Signed-off-by: Thomas Kleffel <[email protected]>
---
This patch is against 2.6.17-rc3
The reason why this patch makes sense is that it is pretty easy to build
a CF-Interface out of a simple address/data-bus if you only use common
and attribute memory. Adding the capability to access IO space makes
things more complicated.
If you just want to use CF-Storage cards, access to common and attribute
memory is enough as the IDE registers are available there, as well.
I have submitted a patch to RMK which enables the AT91RM9200's CF
interface to work in that mode.
I made some changes based on the feedback from Alan Cox and Iain Barker.
The window size was changed from 16 to 0 (autodetect) on suggestion from
Iain Barker. 16 didn't work with one of his cards.
Thomas
Thomas Kleffel (maintech GmbH) wrote:
>
> +void outb_io(unsigned char value, unsigned long port) {
> + outb(value, port);
> +}
> +
> +void outb_mem(unsigned char value, unsigned long port) {
> + writeb(value, (void __iomem *) port);
> }
[...]
> + if(is_mmio)
> + my_outb = outb_mem;
> + else
> + my_outb = outb_io;
Shouldn't you convert ide_cs to use iowrite8 (and friends) instead of
doing this?
David Vrabel
David Vrabel wrote:
>Thomas Kleffel (maintech GmbH) wrote:
>
>
>>+void outb_io(unsigned char value, unsigned long port) {
>>+ outb(value, port);
>>+}
>>+
>>+void outb_mem(unsigned char value, unsigned long port) {
>>+ writeb(value, (void __iomem *) port);
>> }
>>
>>
>
>[...]
>
>
>
>>+ if(is_mmio)
>>+ my_outb = outb_mem;
>>+ else
>>+ my_outb = outb_io;
>>
>>
>
>
>Shouldn't you convert ide_cs to use iowrite8 (and friends) instead of
>doing this?
>
>
You're right. I didn't know about iowrite8.
I'll post a new revision soon.
Thomas
From: Thomas Kleffel <[email protected]>
this patch enables ide_cs to access CF-cards via their common memory
rather than via their IO space.
Signed-off-by: Thomas Kleffel <[email protected]>
---
This patch is against 2.6.17-rc3
The reason why this patch makes sense is that it is pretty easy to build
a CF-Interface out of a simple address/data-bus if you only use common
and attribute memory. Adding the capability to access IO space makes
things more complicated.
If you just want to use CF-Storage cards, access to common and attribute
memory is enough as the IDE registers are available there, as well.
I have submitted a patch to RMK which enables the AT91RM9200's CF
interface to work in that mode.
I made some changes based on the feedback from Alan Cox and Iain Barker.
The window size was changed from 16 to 0 (autodetect) on suggestion from
Iain Barker. 16 didn't work with one of his cards.
ide_cs was converted from outb to iowrite8 on suggestion from David Vrabel.
Thomas
From: Thomas Kleffel <[email protected]>
this patch enables ide_cs to access CF-cards via their common memory
rather than via their IO space.
Signed-off-by: Thomas Kleffel <[email protected]>
---
This patch is against 2.6.17-rc3
The reason why this patch makes sense is that it is pretty easy to build
a CF-Interface out of a simple address/data-bus if you only use common
and attribute memory. Adding the capability to access IO space makes
things more complicated.
If you just want to use CF-Storage cards, access to common and attribute
memory is enough as the IDE registers are available there, as well.
I have submitted a patch to RMK which enables the AT91RM9200's CF
interface to work in that mode.
I made some changes based on the feedback from Alan Cox and Iain Barker.
The window size was changed from 16 to 0 (autodetect) on suggestion from
Iain Barker. 16 didn't work with one of his cards.
Detection of slave drives works with mmio, now.
Thomas