#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/ata.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>#include <linux/pm.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) || defined(CONFIG_MN10300)# define SUPPORT_VLB_SYNC 0#else# define SUPPORT_VLB_SYNC 1#endif/* * Probably not wise to fiddle with these */#define IDE_DEFAULT_MAX_FAILURES 1#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 *//* Error codes returned in rq->errors to the higher part of the driver. */enum{
IDE_DRV_ERROR_GENERAL =101,
IDE_DRV_ERROR_FILEMARK =102,
IDE_DRV_ERROR_EOD =103,};/* * Definitions for accessing IDE controller registers */#define IDE_NR_PORTS (10)struct ide_io_ports {unsigned long data_addr;union{unsigned long error_addr;/* read: error */unsigned long feature_addr;/* write: feature */};unsigned long nsect_addr;unsigned long lbal_addr;unsigned long lbam_addr;unsigned long lbah_addr;unsigned long device_addr;union{unsigned long status_addr;/* read: status */unsigned long command_addr;/* write: command */};unsigned long ctl_addr;unsigned long irq_addr;};