Re: ATA devices attached to arbitary busses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> FPGA.  Right now, I'm a bit clueless as to how to get the linux kernel to
> support this.  Could someone please point me in the right direction?  What
> kernel source files should I be looking at?  Is there any documentation?
> Many thanks!

It really depends on the complexity of your controller. If you are just
doing PIO with generic IDE interfacing then its simply a matter of
telling Linux that there is an interface at these addresses with these
port operations and it'll just do the rest for you, except hotplug.

Basically for the standard port layouts.

	hw_regs_t hw;
	ide_hwif_t *hwif;

	memset(&hw, 0, sizeof(hw));
	ide_std_init_ports(&hw, base_port_num, ctrl_port);
	hw.irq = IRQ_LINE;
	hw.dma = NO_DMA;

	index = ide_register_hw(&hw, &hwif);

If the port layout is non standard and you use mmio etc then you need to
set hw up by hand. drivers/ide/legacy/macide.c is a good example of
interfacing a non standard controller.

Alan



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux