Skip to contentSkip to conversation

New true IDE compact flash driver starting point?

DISCUSSION Dick Hollenbeck 4 participants 7 messages Jan 8, 2009 – Jan 9, 2009

lore
Share & tools
lore
#0 lore raw

On a new ARM9 board with memory mapped interface to a compact flash socket, I need to implement an IDE or ATA driver that will support TRUE IDE mode.

Am using kernel version 2.6.26

What is the best starting point, i.e. example driver in the tree?

Please respond to my personal email address also as I do not subscribe.

TIA

#1 lore raw
Quoted 7 lines · Dick Hollenbeck

On a new ARM9 board with memory mapped interface to a compact flash socket, I need to implement an IDE or ATA driver that will support TRUE IDE mode.

Am using kernel version 2.6.26

What is the best starting point, i.e. example driver in the tree?

You should not need to write a new driver, but rather use the existing drivers/ata/pata_platform.c driver by registering the MMIO registers and IRQ number as a platform device.

	Arnd <><
#2 lore raw
Quoted 6 lines · Arnd Bergmann
Quoted 4 lines · Dick Hollenbeck

On a new ARM9 board with memory mapped interface to a compact flash socket, I need to implement an IDE or ATA driver that will support TRUE IDE mode.

Am using kernel version 2.6.26

Quoted 9 lines
Quoted 2 lines

What is the best starting point, i.e. example driver in the tree?

You should not need to write a new driver, but rather use the existing drivers/ata/pata_platform.c driver by registering the MMIO registers and IRQ number as a platform device.

	Arnd <><

Thank you Arnd!

Is there some example code in the tree to do this?

I've done something similar to this for 8250 serial ports, but I am having a difficult time finding out how to do this with pata_platform.c

Thanks,

Dick Hollenbeck

#3 lore raw
Quoted 3 lines · Dick Hollenbeck

I've done something similar to this for 8250 serial ports, but I am having a difficult time finding out how to do this with pata_platform.c

Just grep for pata_platform_info to find example code.

	Arnd <><
#4 lore raw
Quoted 10 lines · Arnd Bergmann
Quoted 3 lines · Dick Hollenbeck

I've done something similar to this for 8250 serial ports, but I am having a difficult time finding out how to do this with pata_platform.c

Just grep for pata_platform_info to find example code.

	Arnd <><

Thanks again Arnd. I did that yesterday and got it working last night! The only thing I have questions about are:

1) Since this is for a quasi realtime application, is there any advantage to using the interrupt line regarding how the CPU spends its idle time waiting for the flash? (I have an interrupt line I can use.) Currently I am not sending in the IRQ resource, resource array length of 2, not 3.

2) I am getting this message during boot up: "Driver 'sd' needs updating - please use bus_type methods". Again this is kernel 2.6.26. It seems like this can be safely ignored, but if its easy to get rid of that I would be happy to back port a patch.

I really appreciate your help.

Dick Hollenbeck

#5 lore raw
Quoted 5 lines

1) Since this is for a quasi realtime application, is there any advantage to using the interrupt line regarding how the CPU spends its idle time waiting for the flash? (I have an interrupt line I can use.) Currently I am not sending in the IRQ resource, resource array length of 2, not 3.

For real time you may actually be better with the IRQless polling behaviour as the driver and ATA library currently stands.

#6 lore raw
In reply to Dick Hollenbeck
Quoted 9 lines · Dick Hollenbeck

On a new ARM9 board with memory mapped interface to a compact flash socket, I need to implement an IDE or ATA driver that will support TRUE IDE mode.

Am using kernel version 2.6.26

What is the best starting point, i.e. example driver in the tree?

Please respond to my personal email address also as I do not subscribe.

Not that it is a piece of art, but this is my implementation of a similar driver that I am trying to get merged.

http://marc.info/?l=linux-ide&m=122895233817240&w=4

David Daney