summaryrefslogtreecommitdiff
path: root/include/asm-sparc
diff options
context:
space:
mode:
authorMartin Dalecki <dalecki@evision-ventures.com>2002-05-05 20:54:03 -0700
committerJens Axboe <axboe@suse.de>2002-05-05 20:54:03 -0700
commitfb0bbfdafe47104437b7e3c238f2d5d7e2b596dc (patch)
treebceb40657ac84c45b6a50d71bcf0c484cb6fa4b4 /include/asm-sparc
parent45bfe840f66e37f585eb173bb6a52cc296b0dd01 (diff)
[PATCH] 2.5.14 IDE 55
- Update HPT374 driver carried over from 2.4.xx series by Andrew Morton. Resync it with the recent host chip driver changes, or better the introduction of an API at all. - Consolidate the handling of device ID byte order in one place. This was spotted and patched by Bartomiej onierkiewicz. - Eliminate CONFIG_BLK_DEV_IDEPCI - it's duplicating the functionality of the already present and fine CONFIG_PCI flag and if we are a PCI host, we are indeed very likely to need host chip support anyway. - Remove some redundant info about the model and channel number from /proc/ide. Remove the binary entries not helpful to the user, and not used by any program and redundant to corresponding ioctls. - Properly return udma_read and udma_write values in taskfile. - Only initialize XXX_udma to the default handlers if it has not been initialized by the host chip initialization. I have enabled spin lock debugging and can see that on device flush the spin locks get wrong counts... no problems elsewher ethus far. I will re check them next time around.
Diffstat (limited to 'include/asm-sparc')
-rw-r--r--include/asm-sparc/ide.h105
1 files changed, 2 insertions, 103 deletions
diff --git a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h
index 6ac1ae27b431..1ca23951e680 100644
--- a/include/asm-sparc/ide.h
+++ b/include/asm-sparc/ide.h
@@ -61,7 +61,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
*/
static __inline__ void ide_init_default_hwifs(void)
{
-#ifndef CONFIG_BLK_DEV_IDEPCI
+#ifndef CONFIG_PCI
hw_regs_t hw;
int index;
@@ -70,32 +70,9 @@ static __inline__ void ide_init_default_hwifs(void)
hw.irq = ide_default_irq(ide_default_io_base(index));
ide_register_hw(&hw, NULL);
}
-#endif /* CONFIG_BLK_DEV_IDEPCI */
+#endif
}
-typedef union {
- unsigned int all : 8; /* all of the bits together */
- struct {
- unsigned int bit7 : 1;
- unsigned int lba : 1;
- unsigned int bit5 : 1;
- unsigned int unit : 1;
- unsigned int head : 4;
- } b;
-} select_t;
-
-typedef union {
- unsigned int all : 8; /* all of the bits together */
- struct {
- unsigned int HOB : 1; /* 48-bit address ordering */
- unsigned int reserved456: 3;
- unsigned bit3 : 1; /* ATA-2 thingy */
- unsigned int SRST : 1; /* host soft reset bit */
- unsigned int nIEN : 1; /* device INTRQ to host */
- unsigned int bit0 : 1;
- } b;
-} control_t;
-
#undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0
@@ -188,84 +165,6 @@ static __inline__ void ide_outsw(unsigned long port,
/* __flush_dcache_range((unsigned long)src, end); */ /* P3 see hme */
}
-#define T_CHAR (0x0000) /* char: don't touch */
-#define T_SHORT (0x4000) /* short: 12 -> 21 */
-#define T_INT (0x8000) /* int: 1234 -> 4321 */
-#define T_TEXT (0xc000) /* text: 12 -> 21 */
-
-#define T_MASK_TYPE (0xc000)
-#define T_MASK_COUNT (0x3fff)
-
-#define D_CHAR(cnt) (T_CHAR | (cnt))
-#define D_SHORT(cnt) (T_SHORT | (cnt))
-#define D_INT(cnt) (T_INT | (cnt))
-#define D_TEXT(cnt) (T_TEXT | (cnt))
-
-static u_short driveid_types[] = {
- D_SHORT(10), /* config - vendor2 */
- D_TEXT(20), /* serial_no */
- D_SHORT(3), /* buf_type - ecc_bytes */
- D_TEXT(48), /* fw_rev - model */
- D_CHAR(2), /* max_multsect - vendor3 */
- D_SHORT(1), /* dword_io */
- D_CHAR(2), /* vendor4 - capability */
- D_SHORT(1), /* reserved50 */
- D_CHAR(4), /* vendor5 - tDMA */
- D_SHORT(4), /* field_valid - cur_sectors */
- D_INT(1), /* cur_capacity */
- D_CHAR(2), /* multsect - multsect_valid */
- D_INT(1), /* lba_capacity */
- D_SHORT(194) /* dma_1word - reservedyy */
-};
-
-#define num_driveid_types (sizeof(driveid_types)/sizeof(*driveid_types))
-
-static __inline__ void ide_fix_driveid(struct hd_driveid *id)
-{
- u_char *p = (u_char *)id;
- int i, j, cnt;
- u_char t;
-
- for (i = 0; i < num_driveid_types; i++) {
- cnt = driveid_types[i] & T_MASK_COUNT;
- switch (driveid_types[i] & T_MASK_TYPE) {
- case T_CHAR:
- p += cnt;
- break;
- case T_SHORT:
- for (j = 0; j < cnt; j++) {
- t = p[0];
- p[0] = p[1];
- p[1] = t;
- p += 2;
- }
- break;
- case T_INT:
- for (j = 0; j < cnt; j++) {
- t = p[0];
- p[0] = p[3];
- p[3] = t;
- t = p[1];
- p[1] = p[2];
- p[2] = t;
- p += 4;
- }
- break;
- case T_TEXT:
- for (j = 0; j < cnt; j += 2) {
- t = p[0];
- p[0] = p[1];
- p[1] = t;
- p += 2;
- }
- break;
- };
- }
-}
-
-/*
- * The following are not needed for the non-m68k ports
- */
#define ide_ack_intr(hwif) (1)
/* #define ide_ack_intr(hwif) ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1) */
#define ide_release_lock(lock) do {} while (0)