diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-08-24 03:19:22 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-24 03:19:22 -0400 |
commit | cca3974e48607c3775dc73b544a5700b2e37c21a (patch) | |
tree | 0777d6121ba199af0aad196eb5a693510ec8e62e /drivers/ata/sata_qstor.c | |
parent | 54a86bfc3d4601be9c36cd4e8a1bdc580c98fa6a (diff) |
libata: Grand renaming.
The biggest change is that ata_host_set is renamed to ata_host.
* ata_host_set => ata_host
* ata_probe_ent->host_flags => ata_probe_ent->port_flags
* ata_probe_ent->host_set_flags => ata_probe_ent->_host_flags
* ata_host_stats => ata_port_stats
* ata_port->host => ata_port->scsi_host
* ata_port->host_set => ata_port->host
* ata_port_info->host_flags => ata_port_info->flags
* ata_(.*)host_set(.*)\(\) => ata_\1host\2()
The leading underscore in ata_probe_ent->_host_flags is to avoid
reusing ->host_flags for different purpose. Currently, the only user
of the field is libata-bmdma.c and probe_ent itself is scheduled to be
removed.
ata_port->host is reused for different purpose but this field is used
inside libata core proper and of different type.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/sata_qstor.c')
-rw-r--r-- | drivers/ata/sata_qstor.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c index 71bd6712b377..fa29dfe2a7b5 100644 --- a/drivers/ata/sata_qstor.c +++ b/drivers/ata/sata_qstor.c | |||
@@ -116,7 +116,7 @@ static void qs_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); | |||
116 | static int qs_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); | 116 | static int qs_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); |
117 | static irqreturn_t qs_intr (int irq, void *dev_instance, struct pt_regs *regs); | 117 | static irqreturn_t qs_intr (int irq, void *dev_instance, struct pt_regs *regs); |
118 | static int qs_port_start(struct ata_port *ap); | 118 | static int qs_port_start(struct ata_port *ap); |
119 | static void qs_host_stop(struct ata_host_set *host_set); | 119 | static void qs_host_stop(struct ata_host *host); |
120 | static void qs_port_stop(struct ata_port *ap); | 120 | static void qs_port_stop(struct ata_port *ap); |
121 | static void qs_phy_reset(struct ata_port *ap); | 121 | static void qs_phy_reset(struct ata_port *ap); |
122 | static void qs_qc_prep(struct ata_queued_cmd *qc); | 122 | static void qs_qc_prep(struct ata_queued_cmd *qc); |
@@ -174,7 +174,7 @@ static const struct ata_port_info qs_port_info[] = { | |||
174 | /* board_2068_idx */ | 174 | /* board_2068_idx */ |
175 | { | 175 | { |
176 | .sht = &qs_ata_sht, | 176 | .sht = &qs_ata_sht, |
177 | .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | | 177 | .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | |
178 | ATA_FLAG_SATA_RESET | | 178 | ATA_FLAG_SATA_RESET | |
179 | //FIXME ATA_FLAG_SRST | | 179 | //FIXME ATA_FLAG_SRST | |
180 | ATA_FLAG_MMIO | ATA_FLAG_PIO_POLLING, | 180 | ATA_FLAG_MMIO | ATA_FLAG_PIO_POLLING, |
@@ -220,7 +220,7 @@ static void qs_irq_clear(struct ata_port *ap) | |||
220 | 220 | ||
221 | static inline void qs_enter_reg_mode(struct ata_port *ap) | 221 | static inline void qs_enter_reg_mode(struct ata_port *ap) |
222 | { | 222 | { |
223 | u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000); | 223 | u8 __iomem *chan = ap->host->mmio_base + (ap->port_no * 0x4000); |
224 | 224 | ||
225 | writeb(QS_CTR0_REG, chan + QS_CCT_CTR0); | 225 | writeb(QS_CTR0_REG, chan + QS_CCT_CTR0); |
226 | readb(chan + QS_CCT_CTR0); /* flush */ | 226 | readb(chan + QS_CCT_CTR0); /* flush */ |
@@ -228,7 +228,7 @@ static inline void qs_enter_reg_mode(struct ata_port *ap) | |||
228 | 228 | ||
229 | static inline void qs_reset_channel_logic(struct ata_port *ap) | 229 | static inline void qs_reset_channel_logic(struct ata_port *ap) |
230 | { | 230 | { |
231 | u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000); | 231 | u8 __iomem *chan = ap->host->mmio_base + (ap->port_no * 0x4000); |
232 | 232 | ||
233 | writeb(QS_CTR1_RCHN, chan + QS_CCT_CTR1); | 233 | writeb(QS_CTR1_RCHN, chan + QS_CCT_CTR1); |
234 | readb(chan + QS_CCT_CTR0); /* flush */ | 234 | readb(chan + QS_CCT_CTR0); /* flush */ |
@@ -342,7 +342,7 @@ static void qs_qc_prep(struct ata_queued_cmd *qc) | |||
342 | static inline void qs_packet_start(struct ata_queued_cmd *qc) | 342 | static inline void qs_packet_start(struct ata_queued_cmd *qc) |
343 | { | 343 | { |
344 | struct ata_port *ap = qc->ap; | 344 | struct ata_port *ap = qc->ap; |
345 | u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000); | 345 | u8 __iomem *chan = ap->host->mmio_base + (ap->port_no * 0x4000); |
346 | 346 | ||
347 | VPRINTK("ENTER, ap %p\n", ap); | 347 | VPRINTK("ENTER, ap %p\n", ap); |
348 | 348 | ||
@@ -375,11 +375,11 @@ static unsigned int qs_qc_issue(struct ata_queued_cmd *qc) | |||
375 | return ata_qc_issue_prot(qc); | 375 | return ata_qc_issue_prot(qc); |
376 | } | 376 | } |
377 | 377 | ||
378 | static inline unsigned int qs_intr_pkt(struct ata_host_set *host_set) | 378 | static inline unsigned int qs_intr_pkt(struct ata_host *host) |
379 | { | 379 | { |
380 | unsigned int handled = 0; | 380 | unsigned int handled = 0; |
381 | u8 sFFE; | 381 | u8 sFFE; |
382 | u8 __iomem *mmio_base = host_set->mmio_base; | 382 | u8 __iomem *mmio_base = host->mmio_base; |
383 | 383 | ||
384 | do { | 384 | do { |
385 | u32 sff0 = readl(mmio_base + QS_HST_SFF); | 385 | u32 sff0 = readl(mmio_base + QS_HST_SFF); |
@@ -391,7 +391,7 @@ static inline unsigned int qs_intr_pkt(struct ata_host_set *host_set) | |||
391 | u8 sDST = sff0 >> 16; /* dev status */ | 391 | u8 sDST = sff0 >> 16; /* dev status */ |
392 | u8 sHST = sff1 & 0x3f; /* host status */ | 392 | u8 sHST = sff1 & 0x3f; /* host status */ |
393 | unsigned int port_no = (sff1 >> 8) & 0x03; | 393 | unsigned int port_no = (sff1 >> 8) & 0x03; |
394 | struct ata_port *ap = host_set->ports[port_no]; | 394 | struct ata_port *ap = host->ports[port_no]; |
395 | 395 | ||
396 | DPRINTK("SFF=%08x%08x: sCHAN=%u sHST=%d sDST=%02x\n", | 396 | DPRINTK("SFF=%08x%08x: sCHAN=%u sHST=%d sDST=%02x\n", |
397 | sff1, sff0, port_no, sHST, sDST); | 397 | sff1, sff0, port_no, sHST, sDST); |
@@ -421,13 +421,13 @@ static inline unsigned int qs_intr_pkt(struct ata_host_set *host_set) | |||
421 | return handled; | 421 | return handled; |
422 | } | 422 | } |
423 | 423 | ||
424 | static inline unsigned int qs_intr_mmio(struct ata_host_set *host_set) | 424 | static inline unsigned int qs_intr_mmio(struct ata_host *host) |
425 | { | 425 | { |
426 | unsigned int handled = 0, port_no; | 426 | unsigned int handled = 0, port_no; |
427 | 427 | ||
428 | for (port_no = 0; port_no < host_set->n_ports; ++port_no) { | 428 | for (port_no = 0; port_no < host->n_ports; ++port_no) { |
429 | struct ata_port *ap; | 429 | struct ata_port *ap; |
430 | ap = host_set->ports[port_no]; | 430 | ap = host->ports[port_no]; |
431 | if (ap && | 431 | if (ap && |
432 | !(ap->flags & ATA_FLAG_DISABLED)) { | 432 | !(ap->flags & ATA_FLAG_DISABLED)) { |
433 | struct ata_queued_cmd *qc; | 433 | struct ata_queued_cmd *qc; |
@@ -457,14 +457,14 @@ static inline unsigned int qs_intr_mmio(struct ata_host_set *host_set) | |||
457 | 457 | ||
458 | static irqreturn_t qs_intr(int irq, void *dev_instance, struct pt_regs *regs) | 458 | static irqreturn_t qs_intr(int irq, void *dev_instance, struct pt_regs *regs) |
459 | { | 459 | { |
460 | struct ata_host_set *host_set = dev_instance; | 460 | struct ata_host *host = dev_instance; |
461 | unsigned int handled = 0; | 461 | unsigned int handled = 0; |
462 | 462 | ||
463 | VPRINTK("ENTER\n"); | 463 | VPRINTK("ENTER\n"); |
464 | 464 | ||
465 | spin_lock(&host_set->lock); | 465 | spin_lock(&host->lock); |
466 | handled = qs_intr_pkt(host_set) | qs_intr_mmio(host_set); | 466 | handled = qs_intr_pkt(host) | qs_intr_mmio(host); |
467 | spin_unlock(&host_set->lock); | 467 | spin_unlock(&host->lock); |
468 | 468 | ||
469 | VPRINTK("EXIT\n"); | 469 | VPRINTK("EXIT\n"); |
470 | 470 | ||
@@ -491,9 +491,9 @@ static void qs_ata_setup_port(struct ata_ioports *port, unsigned long base) | |||
491 | 491 | ||
492 | static int qs_port_start(struct ata_port *ap) | 492 | static int qs_port_start(struct ata_port *ap) |
493 | { | 493 | { |
494 | struct device *dev = ap->host_set->dev; | 494 | struct device *dev = ap->host->dev; |
495 | struct qs_port_priv *pp; | 495 | struct qs_port_priv *pp; |
496 | void __iomem *mmio_base = ap->host_set->mmio_base; | 496 | void __iomem *mmio_base = ap->host->mmio_base; |
497 | void __iomem *chan = mmio_base + (ap->port_no * 0x4000); | 497 | void __iomem *chan = mmio_base + (ap->port_no * 0x4000); |
498 | u64 addr; | 498 | u64 addr; |
499 | int rc; | 499 | int rc; |
@@ -530,7 +530,7 @@ err_out: | |||
530 | 530 | ||
531 | static void qs_port_stop(struct ata_port *ap) | 531 | static void qs_port_stop(struct ata_port *ap) |
532 | { | 532 | { |
533 | struct device *dev = ap->host_set->dev; | 533 | struct device *dev = ap->host->dev; |
534 | struct qs_port_priv *pp = ap->private_data; | 534 | struct qs_port_priv *pp = ap->private_data; |
535 | 535 | ||
536 | if (pp != NULL) { | 536 | if (pp != NULL) { |
@@ -543,10 +543,10 @@ static void qs_port_stop(struct ata_port *ap) | |||
543 | ata_port_stop(ap); | 543 | ata_port_stop(ap); |
544 | } | 544 | } |
545 | 545 | ||
546 | static void qs_host_stop(struct ata_host_set *host_set) | 546 | static void qs_host_stop(struct ata_host *host) |
547 | { | 547 | { |
548 | void __iomem *mmio_base = host_set->mmio_base; | 548 | void __iomem *mmio_base = host->mmio_base; |
549 | struct pci_dev *pdev = to_pci_dev(host_set->dev); | 549 | struct pci_dev *pdev = to_pci_dev(host->dev); |
550 | 550 | ||
551 | writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */ | 551 | writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */ |
552 | writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */ | 552 | writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */ |
@@ -673,7 +673,7 @@ static int qs_ata_init_one(struct pci_dev *pdev, | |||
673 | INIT_LIST_HEAD(&probe_ent->node); | 673 | INIT_LIST_HEAD(&probe_ent->node); |
674 | 674 | ||
675 | probe_ent->sht = qs_port_info[board_idx].sht; | 675 | probe_ent->sht = qs_port_info[board_idx].sht; |
676 | probe_ent->host_flags = qs_port_info[board_idx].host_flags; | 676 | probe_ent->port_flags = qs_port_info[board_idx].flags; |
677 | probe_ent->pio_mask = qs_port_info[board_idx].pio_mask; | 677 | probe_ent->pio_mask = qs_port_info[board_idx].pio_mask; |
678 | probe_ent->mwdma_mask = qs_port_info[board_idx].mwdma_mask; | 678 | probe_ent->mwdma_mask = qs_port_info[board_idx].mwdma_mask; |
679 | probe_ent->udma_mask = qs_port_info[board_idx].udma_mask; | 679 | probe_ent->udma_mask = qs_port_info[board_idx].udma_mask; |