#ifndef _IDE_H#define _IDE_H/* * linux/include/linux/ide.h * * Copyright (C) 1994-2002 Linus Torvalds & authors */#include<linux/init.h>#include<linux/ioport.h>#include<linux/hdreg.h>#include<linux/blkdev.h>#include<linux/proc_fs.h>#include<linux/interrupt.h>#include<linux/bitops.h>#include<linux/bio.h>#include<linux/device.h>#include<linux/pci.h>#include<linux/completion.h>#ifdef CONFIG_BLK_DEV_IDEACPI#include<acpi/acpi.h>#endif#include<asm/byteorder.h>#include<asm/system.h>#include<asm/io.h>#include<asm/mutex.h>#if defined(CONFIG_CRIS) || defined(CONFIG_FRV)# define SUPPORT_VLB_SYNC 0#else# define SUPPORT_VLB_SYNC 1#endif/* * Used to indicate "no IRQ", should be a value that cannot be an IRQ * number. */#define IDE_NO_IRQ (-1)typedefunsignedcharbyte;/* used everywhere *//* * Probably not wise to fiddle with these */#define ERROR_MAX 8 /* Max read/write errors per sector */#define ERROR_RESET 3 /* Reset controller every 4th retry */#define ERROR_RECAL 1 /* Recalibrate every 2nd retry *//* * state flags */#define DMA_PIO_RETRY 1 /* retrying in PIO */#define HWIF(drive) ((ide_hwif_t *)((drive)->hwif))#define HWGROUP(drive) ((ide_hwgroup_t *)(HWIF(drive)->hwgroup))/* * Definitions for accessing IDE controller registers */#define IDE_NR_PORTS (10)structide_io_ports{unsignedlongdata_addr;union{unsignedlongerror_addr;/* read: error */unsignedlongfeature_addr;/* write: feature */};unsignedlongnsect_addr;unsignedlonglbal_addr;unsignedlonglbam_addr;unsignedlonglbah_addr;unsigned