Skip to contentSkip to conversation

2.6 kernel & ide_ops

DISCUSSION wlacey 2 participants 2 messages Dec 8, 2004 MIPS

lore
Share & tools
lore

wlacey

author
#0 lore raw

Forgive the stupid question but on the 2.6 kernel I cannot find an ide_ops.h header file and obviously the extern ide_ops structure.

How should one go about specifiying an ide device in a 2.6 kernel

Thanks,
W

#1 lore raw
Quoted 2 lines · wlacey

Forgive the stupid question but on the 2.6 kernel I cannot find an ide_ops.h header file and obviously the extern ide_ops structure.

The ide ops are part of the hwif (hardware interface) object.

Quoted 1 line

How should one go about specifiying an ide device in a 2.6 kernel

Assuming the device has standard behaviour and is just basic legacy IDE then

	ide_hwif_t *hwif;
	hw_reg_t hw;

	memset(hw, 0, sizeof(*hw));
	ide_std_init_ports(&hw, IDE_PORT, CTRL__PORT);
	hw.irq = whatever;
	hw.dma = NO_DMA;

	ide_register_hw(&hw, NULL);

For DMA devices you need either to use the PCI layer functions or register DMA handlers. Take a look at something simple like drivers/ide/pci/triflex.c