diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-alpha/ide.h | 31 | ||||
| -rw-r--r-- | include/asm-arm/ide.h | 27 | ||||
| -rw-r--r-- | include/asm-cris/ide.h | 27 | ||||
| -rw-r--r-- | include/asm-i386/ide.h | 33 | ||||
| -rw-r--r-- | include/asm-ia64/ide.h | 33 | ||||
| -rw-r--r-- | include/asm-m68k/ide.h | 119 | ||||
| -rw-r--r-- | include/asm-mips/ide.h | 131 | ||||
| -rw-r--r-- | include/asm-mips64/ide.h | 82 | ||||
| -rw-r--r-- | include/asm-parisc/ide.h | 31 | ||||
| -rw-r--r-- | include/asm-ppc/ide.h | 36 | ||||
| -rw-r--r-- | include/asm-ppc64/ide.h | 30 | ||||
| -rw-r--r-- | include/asm-s390/ide.h | 27 | ||||
| -rw-r--r-- | include/asm-s390x/ide.h | 31 | ||||
| -rw-r--r-- | include/asm-sh/ide.h | 31 | ||||
| -rw-r--r-- | include/asm-sparc/ide.h | 105 | ||||
| -rw-r--r-- | include/asm-sparc64/ide.h | 105 | ||||
| -rw-r--r-- | include/asm-x86_64/ide.h | 33 | ||||
| -rw-r--r-- | include/linux/hdreg.h | 1 | ||||
| -rw-r--r-- | include/linux/ide.h | 51 | ||||
| -rw-r--r-- | include/linux/pci_ids.h | 2 |
20 files changed, 84 insertions, 882 deletions
diff --git a/include/asm-alpha/ide.h b/include/asm-alpha/ide.h index 13f07b71e36d..4167b025a5b6 100644 --- a/include/asm-alpha/ide.h +++ b/include/asm-alpha/ide.h @@ -70,7 +70,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; @@ -79,37 +79,10 @@ 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 all : 8; /* all of the bits together */ - struct { - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit0 : 1; - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned reserved456 : 3; - unsigned HOB : 1; /* 48-bit address ordering */ - } b; -} control_t; - -/* - * The following are not needed for the non-m68k ports - */ #define ide_ack_intr(hwif) (1) -#define ide_fix_driveid(id) do {} while (0) #define ide_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) diff --git a/include/asm-arm/ide.h b/include/asm-arm/ide.h index 512ced14d390..82ed11237b3f 100644 --- a/include/asm-arm/ide.h +++ b/include/asm-arm/ide.h @@ -21,34 +21,7 @@ #include <asm/arch/ide.h> -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit0 : 1; - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned reserved456 : 3; - unsigned HOB : 1; /* 48-bit address ordering */ - } b; -} control_t; - -/* - * The following are not needed for the non-m68k ports - */ #define ide_ack_intr(hwif) (1) -#define ide_fix_driveid(id) do {} while (0) #define ide_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) diff --git a/include/asm-cris/ide.h b/include/asm-cris/ide.h index 232340f25638..3020c195706c 100644 --- a/include/asm-cris/ide.h +++ b/include/asm-cris/ide.h @@ -88,29 +88,6 @@ static __inline__ void ide_init_default_hwifs(void) } } -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit0 : 1; - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned reserved456 : 3; - unsigned HOB : 1; /* 48-bit address ordering */ - } b; -} control_t; - /* some configuration options we don't need */ #undef SUPPORT_VLB_SYNC @@ -119,11 +96,7 @@ typedef union { #undef SUPPORT_SLOW_DATA_PORTS #define SUPPORT_SLOW_DATA_PORTS 0 -/* - * The following are not needed for the non-m68k ports - */ #define ide_ack_intr(hwif) (1) -#define ide_fix_driveid(id) do {} while (0) #define ide_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h index 5975cd2e8f4c..f1a0bc9ccb04 100644 --- a/include/asm-i386/ide.h +++ b/include/asm-i386/ide.h @@ -16,7 +16,7 @@ #include <linux/config.h> #ifndef MAX_HWIFS -# ifdef CONFIG_BLK_DEV_IDEPCI +# ifdef CONFIG_PCI #define MAX_HWIFS 10 # else #define MAX_HWIFS 6 @@ -74,7 +74,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; @@ -83,37 +83,10 @@ 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 all : 8; /* all of the bits together */ - struct { - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit0 : 1; - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned reserved456 : 3; - unsigned HOB : 1; /* 48-bit address ordering */ - } b; -} control_t; - -/* - * The following are not needed for the non-m68k ports - */ #define ide_ack_intr(hwif) (1) -#define ide_fix_driveid(id) do {} while (0) #define ide_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h index 8f89d2536178..6be45989f7a3 100644 --- a/include/asm-ia64/ide.h +++ b/include/asm-ia64/ide.h @@ -18,7 +18,7 @@ #include <linux/irq.h> #ifndef MAX_HWIFS -# ifdef CONFIG_BLK_DEV_IDEPCI +# ifdef CONFIG_PCI #define MAX_HWIFS 10 # else #define MAX_HWIFS 6 @@ -80,7 +80,7 @@ ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port static __inline__ void ide_init_default_hwifs (void) { -#ifndef CONFIG_BLK_DEV_IDEPCI +#ifndef CONFIG_PCI hw_regs_t hw; int index; @@ -89,37 +89,10 @@ 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 all : 8; /* all of the bits together */ - struct { - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit0 : 1; - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned reserved456 : 3; - unsigned HOB : 1; /* 48-bit address ordering */ - } b; -} control_t; - -/* - * The following are not needed for the non-m68k ports - */ #define ide_ack_intr(hwif) (1) -#define ide_fix_driveid(id) do {} while (0) #define ide_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) diff --git a/include/asm-m68k/ide.h b/include/asm-m68k/ide.h index b1448998ef2a..500b42dbd9ba 100644 --- a/include/asm-m68k/ide.h +++ b/include/asm-m68k/ide.h @@ -80,29 +80,6 @@ static __inline__ void ide_init_default_hwifs(void) { } -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit7 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit5 : 1; /* always 1 */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned head : 4; /* always zeros here */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned HOB : 1; /* 48-bit address ordering */ - unsigned reserved456 : 3; - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned bit0 : 1; - } b; -} control_t; - #undef SUPPORT_SLOW_DATA_PORTS #define SUPPORT_SLOW_DATA_PORTS 0 @@ -155,7 +132,6 @@ typedef union { #define outsl(data_reg, buffer, wcount) outsw(data_reg, buffer, (wcount)<<1) - #if defined(CONFIG_ATARI) || defined(CONFIG_Q40) #define insl_swapw(data_reg, buffer, wcount) \ @@ -169,101 +145,6 @@ typedef union { #endif /* CONFIG_ATARI || CONFIG_Q40 */ -#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)) - -/* Q40 and Atari have byteswapped IDE bus and since many interesting - * values in the identification string are text, chars and words they - * happened to be almost correct without swapping.. However *_capacity - * is needed for drives over 8 GB. RZ */ -#if defined(CONFIG_Q40) || defined(CONFIG_ATARI) -#define M68K_IDE_SWAPW (MACH_IS_Q40 || MACH_IS_ATARI) -#endif - -#if defined(CONFIG_AMIGA) || defined (CONFIG_MAC) || defined(M68K_IDE_SWAPW) -static u_short driveid_types[] = { - D_SHORT(10), /* config - vendor2 */ - D_TEXT(20), /* serial_no */ - D_SHORT(3), /* buf_type, buf_size - 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 - reserved */ -}; - -#define num_driveid_types (sizeof(driveid_types)/sizeof(*driveid_types)) -#endif /* CONFIG_AMIGA */ - -static __inline__ void ide_fix_driveid(struct hd_driveid *id) -{ -#if defined(CONFIG_AMIGA) || defined (CONFIG_MAC) || defined(M68K_IDE_SWAPW) - u_char *p = (u_char *)id; - int i, j, cnt; - u_char t; - - if (!MACH_IS_AMIGA && !MACH_IS_MAC && !MACH_IS_Q40 && !MACH_IS_ATARI) - return; -#ifdef M68K_IDE_SWAPW - if (M68K_IDE_SWAPW) /* fix bus byteorder first */ - for (i=0; i < 512; i+=2) { - t = p[i]; p[i] = p[i+1]; p[i+1] = t; - } -#endif - 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; - } - } -#endif /* CONFIG_AMIGA */ -} - static __inline__ void ide_release_lock (int *ide_lock) { #ifdef CONFIG_ATARI diff --git a/include/asm-mips/ide.h b/include/asm-mips/ide.h index ceea721f0c4f..5fa87ce4a5c4 100644 --- a/include/asm-mips/ide.h +++ b/include/asm-mips/ide.h @@ -17,7 +17,7 @@ #include <asm/io.h> #ifndef MAX_HWIFS -# ifdef CONFIG_BLK_DEV_IDEPCI +# ifdef CONFIG_PCI #define MAX_HWIFS 10 # else #define MAX_HWIFS 6 @@ -53,7 +53,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; @@ -62,137 +62,12 @@ 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 */ -} - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { -#ifdef __MIPSEB__ - unsigned bit7 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit5 : 1; /* always 1 */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned head : 4; /* always zeros here */ -#else - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ -#endif - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { -#ifdef __MIPSEB__ - unsigned HOB : 1; /* 48-bit address ordering */ - unsigned reserved456 : 3; - unsigned SRST : 1; /* host soft reset bit */ - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned bit0 : 1; -#else - unsigned bit0 : 1; - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned reserved456 : 3; - unsigned HOB : 1; /* 48-bit address ordering */ #endif - } b; -} control_t; +} #undef SUPPORT_VLB_SYNC #define SUPPORT_VLB_SYNC 0 -#if defined(__MIPSEB__) - -#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; - }; - } -} - -#else /* defined(CONFIG_SWAP_IO_SPACE) && defined(__MIPSEB__) */ - -#define ide_fix_driveid(id) do {} while (0) - -#endif - -/* - * The following are not needed for the non-m68k ports - */ #define ide_ack_intr(hwif) (1) #define ide_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) diff --git a/include/asm-mips64/ide.h b/include/asm-mips64/ide.h index 77f810275297..1a001d4f8ac9 100644 --- a/include/asm-mips64/ide.h +++ b/include/asm-mips64/ide.h @@ -20,10 +20,10 @@ #include <linux/config.h> #ifndef MAX_HWIFS -# ifdef CONFIG_BLK_DEV_IDEPCI -#define MAX_HWIFS 10 +# ifdef CONFIG_PCI +# define MAX_HWIFS 10 # else -#define MAX_HWIFS 6 +# define MAX_HWIFS 6 # endif #endif @@ -56,7 +56,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; @@ -65,82 +65,10 @@ 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 */ -} - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit0 : 1; - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned reserved456 : 3; - unsigned HOB : 1; /* 48-bit address ordering */ - } b; -} control_t; - -#if defined(CONFIG_SWAP_IO_SPACE) && defined(__MIPSEB__) - -#ifdef insl -#undef insl -#endif -#ifdef outsl -#undef outsl -#endif -#ifdef insw -#undef insw -#endif -#ifdef outsw -#undef outsw #endif +} -#define insw(p,a,c) \ -do { \ - unsigned short *ptr = (unsigned short *)(a); \ - unsigned int i = (c); \ - while (i--) \ - *ptr++ = inw(p); \ -} while (0) -#define insl(p,a,c) \ -do { \ - unsigned long *ptr = (unsigned long *)(a); \ - unsigned int i = (c); \ - while (i--) \ - *ptr++ = inl(p); \ -} while (0) -#define outsw(p,a,c) \ -do { \ - unsigned short *ptr = (unsigned short *)(a); \ - unsigned int i = (c); \ - while (i--) \ - outw(*ptr++, (p)); \ -} while (0) -#define outsl(p,a,c) { \ - unsigned long *ptr = (unsigned long *)(a); \ - unsigned int i = (c); \ - while (i--) \ - outl(*ptr++, (p)); \ -} while (0) - -#endif /* defined(CONFIG_SWAP_IO_SPACE) && defined(__MIPSEB__) */ - -/* - * The following are not needed for the non-m68k ports - */ #define ide_ack_intr(hwif) (1) -#define ide_fix_driveid(id) do {} while (0) #define ide_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) diff --git a/include/asm-parisc/ide.h b/include/asm-parisc/ide.h index 84f153038e97..640a4a2682cf 100644 --- a/include/asm-parisc/ide.h +++ b/include/asm-parisc/ide.h @@ -69,7 +69,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; @@ -78,37 +78,10 @@ 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 all : 8; /* all of the bits together */ - struct { - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit0 : 1; - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned reserved456 : 3; - unsigned HOB : 1; /* 48-bit address ordering */ - } b; -} control_t; - -/* - * The following are not needed for the non-m68k ports - */ #define ide_ack_intr(hwif) (1) -#define ide_fix_driveid(id) do {} while (0) #define ide_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) diff --git a/include/asm-ppc/ide.h b/include/asm-ppc/ide.h index 6cbaac5177c1..a91a609cf2ba 100644 --- a/include/asm-ppc/ide.h +++ b/include/asm-ppc/ide.h @@ -30,8 +30,6 @@ #include <linux/ioport.h> #include <asm/io.h> -extern void ppc_generic_ide_fix_driveid(struct hd_driveid *id); - struct ide_machdep_calls { int (*default_irq)(ide_ioreg_t base); ide_ioreg_t (*default_io_base)(int index); @@ -43,9 +41,6 @@ struct ide_machdep_calls { extern struct ide_machdep_calls ppc_ide_md; -void ppc_generic_ide_fix_driveid(struct hd_driveid *id); -#define ide_fix_driveid(id) ppc_generic_ide_fix_driveid((id)) - #undef SUPPORT_SLOW_DATA_PORTS #define SUPPORT_SLOW_DATA_PORTS 0 #undef SUPPORT_VLB_SYNC @@ -96,7 +91,7 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, static __inline__ void ide_init_default_hwifs(void) { -#ifndef CONFIG_BLK_DEV_IDEPCI +#ifndef CONFIG_PCI hw_regs_t hw; int index; ide_ioreg_t base; @@ -109,36 +104,9 @@ static __inline__ void ide_init_default_hwifs(void) hw.irq = ide_default_irq(base); ide_register_hw(&hw, NULL); } -#endif /* CONFIG_BLK_DEV_IDEPCI */ +#endif } -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit7 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit5 : 1; /* always 1 */ - unsigned unit : 1; /* drive select number, 0/1 */ - unsigned head : 4; /* always zeros here */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned HOB : 1; /* 48-bit address ordering */ - unsigned reserved456 : 3; - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned bit0 : 1; - } b; -} control_t; - -/* - * The following are not needed for the non-m68k ports - * unless direct IDE on 8xx - */ #if (defined CONFIG_APUS || defined CONFIG_BLK_DEV_MPC8xx_IDE ) #define ide_ack_intr(hwif) (hwif->hw.ack_intr ? hwif->hw.ack_intr(hwif) : 1) #else diff --git a/include/asm-ppc64/ide.h b/include/asm-ppc64/ide.h index 57a98f4a2e4e..d013e70b10ec 100644 --- a/include/asm-ppc64/ide.h +++ b/include/asm-ppc64/ide.h @@ -24,9 +24,6 @@ #define ide__sti() __sti() -void ppc64_ide_fix_driveid(struct hd_driveid *id); -#define ide_fix_driveid(id) ppc64_ide_fix_driveid((id)) - static __inline__ int ide_default_irq(ide_ioreg_t base) { return 0; } static __inline__ ide_ioreg_t ide_default_io_base(int index) { return 0; } @@ -53,33 +50,6 @@ static __inline__ void ide_init_default_hwifs(void) { } -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ - } b; -} select_t; - -/* XXX is this correct? - Anton */ -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned HOB : 1; /* 48-bit address ordering */ - unsigned reserved456 : 3; - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned bit0 : 1; - } b; -} control_t; - -/* - * The following are not needed for the non-m68k ports - */ #define ide_ack_intr(hwif) (1) #define ide_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) diff --git a/include/asm-s390/ide.h b/include/asm-s390/ide.h index 90d4cc836c93..baa9c84a7dfd 100644 --- a/include/asm-s390/ide.h +++ b/include/asm-s390/ide.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/ide.h + * linux/include/asm-s390/ide.h * * Copyright (C) 1994-1996 Linus Torvalds & authors */ @@ -17,29 +17,6 @@ #define ide__sti() do {} while (0) -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit0 : 1; - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned reserved456 : 3; - unsigned HOB : 1; /* 48-bit address ordering */ - } b; -} control_t; - /* * The following are not needed for the non-m68k ports */ @@ -57,4 +34,4 @@ typedef union { #endif /* __KERNEL__ */ -#endif /* __ASMARM_IDE_H */ +#endif /* __ASMS390_IDE_H */ diff --git a/include/asm-s390x/ide.h b/include/asm-s390x/ide.h index 90d4cc836c93..cdb028ae939e 100644 --- a/include/asm-s390x/ide.h +++ b/include/asm-s390x/ide.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/ide.h + * linux/include/asm-s390/ide.h * * Copyright (C) 1994-1996 Linus Torvalds & authors */ @@ -17,34 +17,7 @@ #define ide__sti() do {} while (0) -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit0 : 1; - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned reserved456 : 3; - unsigned HOB : 1; /* 48-bit address ordering */ - } b; -} control_t; - -/* - * The following are not needed for the non-m68k ports - */ #define ide_ack_intr(hwif) (1) -#define ide_fix_driveid(id) do {} while (0) #define ide_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) @@ -57,4 +30,4 @@ typedef union { #endif /* __KERNEL__ */ -#endif /* __ASMARM_IDE_H */ +#endif /* __ASMS390_IDE_H */ diff --git a/include/asm-sh/ide.h b/include/asm-sh/ide.h index 4bbf386260ef..527e3b77422c 100644 --- a/include/asm-sh/ide.h +++ b/include/asm-sh/ide.h @@ -95,7 +95,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; @@ -104,37 +104,10 @@ 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 all : 8; /* all of the bits together */ - struct { - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit0 : 1; - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned reserved456 : 3; - unsigned HOB : 1; /* 48-bit address ordering */ - } b; -} control_t; - -/* - * The following are not needed for the non-m68k ports - */ #define ide_ack_intr(hwif) (1) -#define ide_fix_driveid(id) do {} while (0) #define ide_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) 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) diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h index b77c185fd58d..b97fdb93b4db 100644 --- a/include/asm-sparc64/ide.h +++ b/include/asm-sparc64/ide.h @@ -57,7 +57,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; @@ -66,32 +66,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 @@ -204,84 +181,6 @@ static __inline__ void ide_outsw(unsigned long port, #endif } -#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_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) diff --git a/include/asm-x86_64/ide.h b/include/asm-x86_64/ide.h index 5975cd2e8f4c..f1a0bc9ccb04 100644 --- a/include/asm-x86_64/ide.h +++ b/include/asm-x86_64/ide.h @@ -16,7 +16,7 @@ #include <linux/config.h> #ifndef MAX_HWIFS -# ifdef CONFIG_BLK_DEV_IDEPCI +# ifdef CONFIG_PCI #define MAX_HWIFS 10 # else #define MAX_HWIFS 6 @@ -74,7 +74,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; @@ -83,37 +83,10 @@ 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 all : 8; /* all of the bits together */ - struct { - unsigned head : 4; /* always zeros here */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned bit5 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit7 : 1; /* always 1 */ - } b; -} select_t; - -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit0 : 1; - unsigned nIEN : 1; /* device INTRQ to host */ - unsigned SRST : 1; /* host soft reset bit */ - unsigned bit3 : 1; /* ATA-2 thingy */ - unsigned reserved456 : 3; - unsigned HOB : 1; /* 48-bit address ordering */ - } b; -} control_t; - -/* - * The following are not needed for the non-m68k ports - */ #define ide_ack_intr(hwif) (1) -#define ide_fix_driveid(id) do {} while (0) #define ide_release_lock(lock) do {} while (0) #define ide_get_lock(lock, hdlr, data) do {} while (0) diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index b52c37382b16..e54151f54697 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h @@ -334,6 +334,7 @@ enum { /* structure returned by HDIO_GET_IDENTITY, * as per ANSI NCITS ATA6 rev.1b spec */ +/* if you change something here remember to update ide_fix_driveid() */ struct hd_driveid { unsigned short config; /* lots of obsolete bit flags */ unsigned short cyls; /* Obsolete, "physical" cyls */ diff --git a/include/linux/ide.h b/include/linux/ide.h index e72a11095f44..67b584ce779e 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -15,6 +15,7 @@ #include <linux/devfs_fs_kernel.h> #include <linux/interrupt.h> #include <linux/bitops.h> +#include <asm/byteorder.h> #include <asm/hdreg.h> /* @@ -265,6 +266,50 @@ void ide_setup_ports(hw_regs_t *hw, struct ide_settings_s; +typedef union { + unsigned all : 8; /* all of the bits together */ + struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) + unsigned head : 4; /* always zeros here */ + unsigned unit : 1; /* drive select number: 0/1 */ + unsigned bit5 : 1; /* always 1 */ + unsigned lba : 1; /* using LBA instead of CHS */ + unsigned bit7 : 1; /* always 1 */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned bit7 : 1; + unsigned lba : 1; + unsigned bit5 : 1; + unsigned unit : 1; + unsigned head : 4; +#else +#error "Please fix <asm/byteorder.h>" +#endif + } b; +} select_t; + +typedef union { + unsigned all : 8; /* all of the bits together */ + struct { +#if defined(__LITTLE_ENDIAN_BITFIELD) + unsigned bit0 : 1; + unsigned nIEN : 1; /* device INTRQ to host */ + unsigned SRST : 1; /* host soft reset bit */ + unsigned bit3 : 1; /* ATA-2 thingy */ + unsigned reserved456 : 3; + unsigned HOB : 1; /* 48-bit address ordering */ +#elif defined(__BIG_ENDIAN_BITFIELD) + unsigned HOB : 1; + unsigned reserved456 : 3; + unsigned bit3 : 1; + unsigned SRST : 1; + unsigned nIEN : 1; + unsigned bit0 : 1; +#else +#error "Please fix <asm/byteorder.h>" +#endif + } b; +} control_t; + /* * ATA/ATAPI device structure : */ @@ -386,7 +431,7 @@ struct ata_channel { ide_ioreg_t io_ports[IDE_NR_PORTS]; /* task file registers */ hw_regs_t hw; /* Hardware info */ -#ifdef CONFIG_BLK_DEV_IDEPCI +#ifdef CONFIG_PCI struct pci_dev *pci_dev; /* for pci chipsets */ #endif struct ata_device drives[MAX_DRIVES]; /* drive info */ @@ -589,7 +634,6 @@ void destroy_proc_ide_drives(struct ata_channel *); void create_proc_ide_interfaces(void); void ide_add_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p, void *data); void ide_remove_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p); -read_proc_t proc_ide_read_capacity; read_proc_t proc_ide_read_geometry; /* @@ -797,6 +841,7 @@ extern int ide_cmd_ioctl(struct ata_device *drive, unsigned long arg); void ide_delay_50ms(void); extern byte ide_auto_reduce_xfer(struct ata_device *); +extern void ide_fix_driveid(struct hd_driveid *id); extern int ide_driveid_update(struct ata_device *); extern int ide_ata66_check(struct ata_device *, struct ata_taskfile *); extern int ide_config_drive_speed(struct ata_device *, byte); @@ -854,7 +899,7 @@ extern struct ata_device *ide_scan_devices(byte, const char *, struct ata_operat extern int ide_register_subdriver(struct ata_device *, struct ata_operations *); extern int ide_unregister_subdriver(struct ata_device *drive); -#ifdef CONFIG_BLK_DEV_IDEPCI +#ifdef CONFIG_PCI # define ON_BOARD 1 # define NEVER_BOARD 0 # ifdef CONFIG_BLK_DEV_OFFBOARD diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index b9017295eb1e..bebaee7edb52 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -932,6 +932,8 @@ #define PCI_VENDOR_ID_TTI 0x1103 #define PCI_DEVICE_ID_TTI_HPT343 0x0003 #define PCI_DEVICE_ID_TTI_HPT366 0x0004 +#define PCI_DEVICE_ID_TTI_HPT372 0x0005 +#define PCI_DEVICE_ID_TTI_HPT374 0x0008 #define PCI_VENDOR_ID_VIA 0x1106 #define PCI_DEVICE_ID_VIA_8363_0 0x0305 |
