How to add a new IDE controller chip driver

I have a custom FPGA that implements a simple PATA interface on a PPC440GX. For PIO accesses to the disk, the FPGA simple acts as a "bus translator" converting 440GX External Bus cycles to the appropriate IDE bus cycles. For READ DMA EXT and WRITE DMA EXT commands, the FPGA also provides DMA to UDMA conversion so that the 440GX's internal DMA engine can tranfer the data to/from the disk via the FPGA.

I'm looking through the Linux sources, specifically the drivers/ide directory, and it's not jumping out at me as to how to tape in my FPGA controller so that Linux can use it. I'm especially confused about how I'm going to get the Linux IDE subsystem to use the 440GX's built-in DMA for UDMA transfers since I suspect most standard ATA controllers have their own bus-mastering DMA capabilities. There seems to be a hardware interface context that one assigns chip-specific implementation functions to but I can't find when or where the assignment is done.

Can anyone suggest how I might go about doing this? Are there books specific to writing IDE drivers for Linux? Or do I simply need to spend many hours poking at the code until I figure out how to hack my custom controller into the correct form?


- Mark

Reply to
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.