summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-05 03:05:54 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-05 03:05:54 -0800
commitb90f37ea8e369cbffdc24e57707a19a1272564f4 (patch)
treea9b64de144632babfcb9e1a6303f831caeef5e42 /include/linux
parentf7776d21737de8d2c77f6eeb4b0fb1f4c32855cc (diff)
parentdb01db102a3f12c83dc79bc378d4f81e425c4716 (diff)
Merge bk://bart.bkbits.net/ide-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ata.h8
-rw-r--r--include/linux/hdreg.h23
-rw-r--r--include/linux/ide.h31
3 files changed, 13 insertions, 49 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 52c5fc6bb4ac..a4ac28db33cf 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -33,8 +33,6 @@ enum {
ATA_MAX_DEVICES = 2, /* per bus/port */
ATA_MAX_PRD = 256, /* we could make these 256/256 */
ATA_SECT_SIZE = 512,
- ATA_SECT_SIZE_MASK = (ATA_SECT_SIZE - 1),
- ATA_SECT_DWORDS = ATA_SECT_SIZE / sizeof(u32),
ATA_ID_WORDS = 256,
ATA_ID_PROD_OFS = 27,
@@ -143,6 +141,12 @@ enum {
XFER_PIO_1 = 0x09,
XFER_PIO_0 = 0x08,
+ /* legacy IDE 'stuff' */
+ XFER_SW_DMA_2 = 0x12,
+ XFER_SW_DMA_1 = 0x11,
+ XFER_SW_DMA_0 = 0x10,
+ XFER_PIO_SLOW = 0x00,
+
/* ATAPI stuff */
ATAPI_PKT_DMA = (1 << 0),
ATAPI_DMADIR = (1 << 2), /* ATAPI data dir:
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h
index 54ad63b1d02c..c94de12a5ee1 100644
--- a/include/linux/hdreg.h
+++ b/include/linux/hdreg.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_HDREG_H
#define _LINUX_HDREG_H
+#include <linux/ata.h>
+
/*
* This file contains some defines for the AT-hd-controller.
* Various sources.
@@ -328,27 +330,6 @@ typedef struct hd_drive_hob_hdr {
/* WIN_SETFEATURES sub-commands */
#define SETFEATURES_EN_8BIT 0x01 /* Enable 8-Bit Transfers */
#define SETFEATURES_EN_WCACHE 0x02 /* Enable write cache */
-#define SETFEATURES_XFER 0x03 /* Set transfer mode */
-# define XFER_UDMA_7 0x47 /* 0100|0111 */
-# define XFER_UDMA_6 0x46 /* 0100|0110 */
-# define XFER_UDMA_5 0x45 /* 0100|0101 */
-# define XFER_UDMA_4 0x44 /* 0100|0100 */
-# define XFER_UDMA_3 0x43 /* 0100|0011 */
-# define XFER_UDMA_2 0x42 /* 0100|0010 */
-# define XFER_UDMA_1 0x41 /* 0100|0001 */
-# define XFER_UDMA_0 0x40 /* 0100|0000 */
-# define XFER_MW_DMA_2 0x22 /* 0010|0010 */
-# define XFER_MW_DMA_1 0x21 /* 0010|0001 */
-# define XFER_MW_DMA_0 0x20 /* 0010|0000 */
-# define XFER_SW_DMA_2 0x12 /* 0001|0010 */
-# define XFER_SW_DMA_1 0x11 /* 0001|0001 */
-# define XFER_SW_DMA_0 0x10 /* 0001|0000 */
-# define XFER_PIO_4 0x0C /* 0000|1100 */
-# define XFER_PIO_3 0x0B /* 0000|1011 */
-# define XFER_PIO_2 0x0A /* 0000|1010 */
-# define XFER_PIO_1 0x09 /* 0000|1001 */
-# define XFER_PIO_0 0x08 /* 0000|1000 */
-# define XFER_PIO_SLOW 0x00 /* 0000|0000 */
#define SETFEATURES_DIS_DEFECT 0x04 /* Disable Defect Management */
#define SETFEATURES_EN_APM 0x05 /* Enable advanced power management */
#define SETFEATURES_EN_SAME_R 0x22 /* for a region ATA-1 */
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 3d9bc0542b7d..ec81a19ec550 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -39,7 +39,6 @@
*
* REALLY_SLOW_IO can be defined in ide.c and ide-cd.c, if necessary
*/
-#define REALLY_FAST_IO /* define if ide ports are perfect */
#define INITIAL_MULT_COUNT 0 /* off=0; on=2,4,8,16,32, etc.. */
#ifndef SUPPORT_SLOW_DATA_PORTS /* 1 to support slow data ports */
@@ -64,18 +63,6 @@
#define IDE_NO_IRQ (-1)
/*
- * IDE_DRIVE_CMD is used to implement many features of the hdparm utility
- */
-#define IDE_DRIVE_CMD 99 /* (magic) undef to reduce kernel size*/
-
-#define IDE_DRIVE_TASK 98
-
-/*
- * IDE_DRIVE_TASKFILE is used to implement many features needed for raw tasks
- */
-#define IDE_DRIVE_TASKFILE 97
-
-/*
* "No user-serviceable parts" beyond this point :)
*****************************************************************************/
@@ -101,13 +88,6 @@ typedef unsigned char byte; /* used everywhere */
#define DMA_PIO_RETRY 1 /* retrying in PIO */
-/*
- * Ensure that various configuration flags have compatible settings
- */
-#ifdef REALLY_SLOW_IO
-#undef REALLY_FAST_IO
-#endif
-
#define HWIF(drive) ((ide_hwif_t *)((drive)->hwif))
#define HWGROUP(drive) ((ide_hwgroup_t *)(HWIF(drive)->hwgroup))
@@ -197,10 +177,7 @@ typedef unsigned char byte; /* used everywhere */
/*
* Some more useful definitions
*/
-#define IDE_MAJOR_NAME "hd" /* the same for all i/f; see also genhd.c */
-#define MAJOR_NAME IDE_MAJOR_NAME
#define PARTN_BITS 6 /* number of minor dev bits for partitions */
-#define PARTN_MASK ((1<<PARTN_BITS)-1) /* a useful bit mask */
#define MAX_DRIVES 2 /* per interface; 2 assumed by lots of code */
#define SECTOR_SIZE 512
#define SECTOR_WORDS (SECTOR_SIZE / 4) /* number of 32bit words per sector */
@@ -256,16 +233,14 @@ typedef struct hw_regs_s {
int irq; /* our irq number */
int dma; /* our dma entry */
ide_ack_intr_t *ack_intr; /* acknowledge interrupt */
- void *priv; /* interface specific data */
hwif_chipset_t chipset;
- unsigned long sata_scr[SATA_NR_PORTS];
- unsigned long sata_misc[SATA_NR_PORTS];
} hw_regs_t;
/*
* Register new hardware with ide
*/
int ide_register_hw(hw_regs_t *hw, struct hwif_s **hwifp);
+int ide_register_hw_with_fixup(hw_regs_t *, struct hwif_s **, void (*)(struct hwif_s *));
/*
* Set up hw_regs_t structure before calling ide_register_hw (optional)
@@ -1453,6 +1428,7 @@ typedef struct ide_pci_device_s {
void (*init_iops)(ide_hwif_t *);
void (*init_hwif)(ide_hwif_t *);
void (*init_dma)(ide_hwif_t *, unsigned long);
+ void (*fixup)(ide_hwif_t *);
u8 channels;
u8 autodma;
ide_pci_enablebit_t enablebits[2];
@@ -1513,6 +1489,9 @@ extern int ide_hwif_request_regions(ide_hwif_t *hwif);
extern void ide_hwif_release_regions(ide_hwif_t* hwif);
extern void ide_unregister (unsigned int index);
+void ide_undecoded_slave(ide_hwif_t *);
+
+int probe_hwif_init_with_fixup(ide_hwif_t *, void (*)(ide_hwif_t *));
extern int probe_hwif_init(ide_hwif_t *);
static inline void *ide_get_hwifdata (ide_hwif_t * hwif)