aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h42
1 files changed, 24 insertions, 18 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 367c17084a28..acec99da832d 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -115,10 +115,6 @@ typedef unsigned char byte; /* used everywhere */
115#define SATA_ERROR_OFFSET (1) 115#define SATA_ERROR_OFFSET (1)
116#define SATA_CONTROL_OFFSET (2) 116#define SATA_CONTROL_OFFSET (2)
117 117
118#define SATA_MISC_OFFSET (0)
119#define SATA_PHY_OFFSET (1)
120#define SATA_IEN_OFFSET (2)
121
122/* 118/*
123 * Our Physical Region Descriptor (PRD) table should be large enough 119 * Our Physical Region Descriptor (PRD) table should be large enough
124 * to handle the biggest I/O request we are likely to see. Since requests 120 * to handle the biggest I/O request we are likely to see. Since requests
@@ -173,7 +169,7 @@ enum { ide_unknown, ide_generic, ide_pci,
173 ide_rz1000, ide_trm290, 169 ide_rz1000, ide_trm290,
174 ide_cmd646, ide_cy82c693, ide_4drives, 170 ide_cmd646, ide_cy82c693, ide_4drives,
175 ide_pmac, ide_etrax100, ide_acorn, 171 ide_pmac, ide_etrax100, ide_acorn,
176 ide_au1xxx, ide_forced 172 ide_au1xxx, ide_palm3710, ide_forced
177}; 173};
178 174
179typedef u8 hwif_chipset_t; 175typedef u8 hwif_chipset_t;
@@ -198,17 +194,6 @@ struct ide_drive_s;
198int ide_register_hw(hw_regs_t *, void (*)(struct ide_drive_s *), 194int ide_register_hw(hw_regs_t *, void (*)(struct ide_drive_s *),
199 struct hwif_s **); 195 struct hwif_s **);
200 196
201void ide_setup_ports( hw_regs_t *hw,
202 unsigned long base,
203 int *offsets,
204 unsigned long ctrl,
205 unsigned long intr,
206 ide_ack_intr_t *ack_intr,
207#if 0
208 ide_io_ops_t *iops,
209#endif
210 int irq);
211
212static inline void ide_std_init_ports(hw_regs_t *hw, 197static inline void ide_std_init_ports(hw_regs_t *hw,
213 unsigned long io_addr, 198 unsigned long io_addr,
214 unsigned long ctl_addr) 199 unsigned long ctl_addr)
@@ -473,7 +458,6 @@ typedef struct hwif_s {
473 /* task file registers for pata and sata */ 458 /* task file registers for pata and sata */
474 unsigned long io_ports[IDE_NR_PORTS]; 459 unsigned long io_ports[IDE_NR_PORTS];
475 unsigned long sata_scr[SATA_NR_PORTS]; 460 unsigned long sata_scr[SATA_NR_PORTS];
476 unsigned long sata_misc[SATA_NR_PORTS];
477 461
478 ide_drive_t drives[MAX_DRIVES]; /* drive info */ 462 ide_drive_t drives[MAX_DRIVES]; /* drive info */
479 463
@@ -1014,7 +998,8 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o
1014void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, u8 *); 998void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, u8 *);
1015void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); 999void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *);
1016 1000
1017#ifdef CONFIG_BLK_DEV_IDEDMA_PCI 1001/* FIXME: palm_bk3710 uses BLK_DEV_IDEDMA_PCI without BLK_DEV_IDEPCI! */
1002#if defined(CONFIG_BLK_DEV_IDEPCI) && defined(CONFIG_BLK_DEV_IDEDMA_PCI)
1018void ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *); 1003void ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *);
1019#else 1004#else
1020static inline void ide_hwif_setup_dma(ide_hwif_t *hwif, 1005static inline void ide_hwif_setup_dma(ide_hwif_t *hwif,
@@ -1324,4 +1309,25 @@ static inline void ide_set_irq(ide_drive_t *drive, int on)
1324 drive->hwif->OUTB(drive->ctl | (on ? 0 : 2), IDE_CONTROL_REG); 1309 drive->hwif->OUTB(drive->ctl | (on ? 0 : 2), IDE_CONTROL_REG);
1325} 1310}
1326 1311
1312static inline u8 ide_read_status(ide_drive_t *drive)
1313{
1314 ide_hwif_t *hwif = drive->hwif;
1315
1316 return hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);
1317}
1318
1319static inline u8 ide_read_altstatus(ide_drive_t *drive)
1320{
1321 ide_hwif_t *hwif = drive->hwif;
1322
1323 return hwif->INB(hwif->io_ports[IDE_CONTROL_OFFSET]);
1324}
1325
1326static inline u8 ide_read_error(ide_drive_t *drive)
1327{
1328 ide_hwif_t *hwif = drive->hwif;
1329
1330 return hwif->INB(hwif->io_ports[IDE_ERROR_OFFSET]);
1331}
1332
1327#endif /* _IDE_H */ 1333#endif /* _IDE_H */