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/pdc_adma.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/pdc_adma.c')
-rw-r--r-- | drivers/ata/pdc_adma.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c index 61d2aa697b4d..912211ada816 100644 --- a/drivers/ata/pdc_adma.c +++ b/drivers/ata/pdc_adma.c | |||
@@ -127,7 +127,7 @@ static int adma_ata_init_one (struct pci_dev *pdev, | |||
127 | static irqreturn_t adma_intr (int irq, void *dev_instance, | 127 | static irqreturn_t adma_intr (int irq, void *dev_instance, |
128 | struct pt_regs *regs); | 128 | struct pt_regs *regs); |
129 | static int adma_port_start(struct ata_port *ap); | 129 | static int adma_port_start(struct ata_port *ap); |
130 | static void adma_host_stop(struct ata_host_set *host_set); | 130 | static void adma_host_stop(struct ata_host *host); |
131 | static void adma_port_stop(struct ata_port *ap); | 131 | static void adma_port_stop(struct ata_port *ap); |
132 | static void adma_phy_reset(struct ata_port *ap); | 132 | static void adma_phy_reset(struct ata_port *ap); |
133 | static void adma_qc_prep(struct ata_queued_cmd *qc); | 133 | static void adma_qc_prep(struct ata_queued_cmd *qc); |
@@ -182,7 +182,7 @@ static struct ata_port_info adma_port_info[] = { | |||
182 | /* board_1841_idx */ | 182 | /* board_1841_idx */ |
183 | { | 183 | { |
184 | .sht = &adma_ata_sht, | 184 | .sht = &adma_ata_sht, |
185 | .host_flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | | 185 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | |
186 | ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | | 186 | ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | |
187 | ATA_FLAG_PIO_POLLING, | 187 | ATA_FLAG_PIO_POLLING, |
188 | .pio_mask = 0x10, /* pio4 */ | 188 | .pio_mask = 0x10, /* pio4 */ |
@@ -237,7 +237,7 @@ static void adma_reset_engine(void __iomem *chan) | |||
237 | static void adma_reinit_engine(struct ata_port *ap) | 237 | static void adma_reinit_engine(struct ata_port *ap) |
238 | { | 238 | { |
239 | struct adma_port_priv *pp = ap->private_data; | 239 | struct adma_port_priv *pp = ap->private_data; |
240 | void __iomem *mmio_base = ap->host_set->mmio_base; | 240 | void __iomem *mmio_base = ap->host->mmio_base; |
241 | void __iomem *chan = ADMA_REGS(mmio_base, ap->port_no); | 241 | void __iomem *chan = ADMA_REGS(mmio_base, ap->port_no); |
242 | 242 | ||
243 | /* mask/clear ATA interrupts */ | 243 | /* mask/clear ATA interrupts */ |
@@ -265,7 +265,7 @@ static void adma_reinit_engine(struct ata_port *ap) | |||
265 | 265 | ||
266 | static inline void adma_enter_reg_mode(struct ata_port *ap) | 266 | static inline void adma_enter_reg_mode(struct ata_port *ap) |
267 | { | 267 | { |
268 | void __iomem *chan = ADMA_REGS(ap->host_set->mmio_base, ap->port_no); | 268 | void __iomem *chan = ADMA_REGS(ap->host->mmio_base, ap->port_no); |
269 | 269 | ||
270 | writew(aPIOMD4, chan + ADMA_CONTROL); | 270 | writew(aPIOMD4, chan + ADMA_CONTROL); |
271 | readb(chan + ADMA_STATUS); /* flush */ | 271 | readb(chan + ADMA_STATUS); /* flush */ |
@@ -412,7 +412,7 @@ static void adma_qc_prep(struct ata_queued_cmd *qc) | |||
412 | static inline void adma_packet_start(struct ata_queued_cmd *qc) | 412 | static inline void adma_packet_start(struct ata_queued_cmd *qc) |
413 | { | 413 | { |
414 | struct ata_port *ap = qc->ap; | 414 | struct ata_port *ap = qc->ap; |
415 | void __iomem *chan = ADMA_REGS(ap->host_set->mmio_base, ap->port_no); | 415 | void __iomem *chan = ADMA_REGS(ap->host->mmio_base, ap->port_no); |
416 | 416 | ||
417 | VPRINTK("ENTER, ap %p\n", ap); | 417 | VPRINTK("ENTER, ap %p\n", ap); |
418 | 418 | ||
@@ -442,13 +442,13 @@ static unsigned int adma_qc_issue(struct ata_queued_cmd *qc) | |||
442 | return ata_qc_issue_prot(qc); | 442 | return ata_qc_issue_prot(qc); |
443 | } | 443 | } |
444 | 444 | ||
445 | static inline unsigned int adma_intr_pkt(struct ata_host_set *host_set) | 445 | static inline unsigned int adma_intr_pkt(struct ata_host *host) |
446 | { | 446 | { |
447 | unsigned int handled = 0, port_no; | 447 | unsigned int handled = 0, port_no; |
448 | u8 __iomem *mmio_base = host_set->mmio_base; | 448 | u8 __iomem *mmio_base = host->mmio_base; |
449 | 449 | ||
450 | for (port_no = 0; port_no < host_set->n_ports; ++port_no) { | 450 | for (port_no = 0; port_no < host->n_ports; ++port_no) { |
451 | struct ata_port *ap = host_set->ports[port_no]; | 451 | struct ata_port *ap = host->ports[port_no]; |
452 | struct adma_port_priv *pp; | 452 | struct adma_port_priv *pp; |
453 | struct ata_queued_cmd *qc; | 453 | struct ata_queued_cmd *qc; |
454 | void __iomem *chan = ADMA_REGS(mmio_base, port_no); | 454 | void __iomem *chan = ADMA_REGS(mmio_base, port_no); |
@@ -476,13 +476,13 @@ static inline unsigned int adma_intr_pkt(struct ata_host_set *host_set) | |||
476 | return handled; | 476 | return handled; |
477 | } | 477 | } |
478 | 478 | ||
479 | static inline unsigned int adma_intr_mmio(struct ata_host_set *host_set) | 479 | static inline unsigned int adma_intr_mmio(struct ata_host *host) |
480 | { | 480 | { |
481 | unsigned int handled = 0, port_no; | 481 | unsigned int handled = 0, port_no; |
482 | 482 | ||
483 | for (port_no = 0; port_no < host_set->n_ports; ++port_no) { | 483 | for (port_no = 0; port_no < host->n_ports; ++port_no) { |
484 | struct ata_port *ap; | 484 | struct ata_port *ap; |
485 | ap = host_set->ports[port_no]; | 485 | ap = host->ports[port_no]; |
486 | if (ap && (!(ap->flags & ATA_FLAG_DISABLED))) { | 486 | if (ap && (!(ap->flags & ATA_FLAG_DISABLED))) { |
487 | struct ata_queued_cmd *qc; | 487 | struct ata_queued_cmd *qc; |
488 | struct adma_port_priv *pp = ap->private_data; | 488 | struct adma_port_priv *pp = ap->private_data; |
@@ -511,14 +511,14 @@ static inline unsigned int adma_intr_mmio(struct ata_host_set *host_set) | |||
511 | 511 | ||
512 | static irqreturn_t adma_intr(int irq, void *dev_instance, struct pt_regs *regs) | 512 | static irqreturn_t adma_intr(int irq, void *dev_instance, struct pt_regs *regs) |
513 | { | 513 | { |
514 | struct ata_host_set *host_set = dev_instance; | 514 | struct ata_host *host = dev_instance; |
515 | unsigned int handled = 0; | 515 | unsigned int handled = 0; |
516 | 516 | ||
517 | VPRINTK("ENTER\n"); | 517 | VPRINTK("ENTER\n"); |
518 | 518 | ||
519 | spin_lock(&host_set->lock); | 519 | spin_lock(&host->lock); |
520 | handled = adma_intr_pkt(host_set) | adma_intr_mmio(host_set); | 520 | handled = adma_intr_pkt(host) | adma_intr_mmio(host); |
521 | spin_unlock(&host_set->lock); | 521 | spin_unlock(&host->lock); |
522 | 522 | ||
523 | VPRINTK("EXIT\n"); | 523 | VPRINTK("EXIT\n"); |
524 | 524 | ||
@@ -544,7 +544,7 @@ static void adma_ata_setup_port(struct ata_ioports *port, unsigned long base) | |||
544 | 544 | ||
545 | static int adma_port_start(struct ata_port *ap) | 545 | static int adma_port_start(struct ata_port *ap) |
546 | { | 546 | { |
547 | struct device *dev = ap->host_set->dev; | 547 | struct device *dev = ap->host->dev; |
548 | struct adma_port_priv *pp; | 548 | struct adma_port_priv *pp; |
549 | int rc; | 549 | int rc; |
550 | 550 | ||
@@ -582,10 +582,10 @@ err_out: | |||
582 | 582 | ||
583 | static void adma_port_stop(struct ata_port *ap) | 583 | static void adma_port_stop(struct ata_port *ap) |
584 | { | 584 | { |
585 | struct device *dev = ap->host_set->dev; | 585 | struct device *dev = ap->host->dev; |
586 | struct adma_port_priv *pp = ap->private_data; | 586 | struct adma_port_priv *pp = ap->private_data; |
587 | 587 | ||
588 | adma_reset_engine(ADMA_REGS(ap->host_set->mmio_base, ap->port_no)); | 588 | adma_reset_engine(ADMA_REGS(ap->host->mmio_base, ap->port_no)); |
589 | if (pp != NULL) { | 589 | if (pp != NULL) { |
590 | ap->private_data = NULL; | 590 | ap->private_data = NULL; |
591 | if (pp->pkt != NULL) | 591 | if (pp->pkt != NULL) |
@@ -596,14 +596,14 @@ static void adma_port_stop(struct ata_port *ap) | |||
596 | ata_port_stop(ap); | 596 | ata_port_stop(ap); |
597 | } | 597 | } |
598 | 598 | ||
599 | static void adma_host_stop(struct ata_host_set *host_set) | 599 | static void adma_host_stop(struct ata_host *host) |
600 | { | 600 | { |
601 | unsigned int port_no; | 601 | unsigned int port_no; |
602 | 602 | ||
603 | for (port_no = 0; port_no < ADMA_PORTS; ++port_no) | 603 | for (port_no = 0; port_no < ADMA_PORTS; ++port_no) |
604 | adma_reset_engine(ADMA_REGS(host_set->mmio_base, port_no)); | 604 | adma_reset_engine(ADMA_REGS(host->mmio_base, port_no)); |
605 | 605 | ||
606 | ata_pci_host_stop(host_set); | 606 | ata_pci_host_stop(host); |
607 | } | 607 | } |
608 | 608 | ||
609 | static void adma_host_init(unsigned int chip_id, | 609 | static void adma_host_init(unsigned int chip_id, |
@@ -684,7 +684,7 @@ static int adma_ata_init_one(struct pci_dev *pdev, | |||
684 | INIT_LIST_HEAD(&probe_ent->node); | 684 | INIT_LIST_HEAD(&probe_ent->node); |
685 | 685 | ||
686 | probe_ent->sht = adma_port_info[board_idx].sht; | 686 | probe_ent->sht = adma_port_info[board_idx].sht; |
687 | probe_ent->host_flags = adma_port_info[board_idx].host_flags; | 687 | probe_ent->port_flags = adma_port_info[board_idx].flags; |
688 | probe_ent->pio_mask = adma_port_info[board_idx].pio_mask; | 688 | probe_ent->pio_mask = adma_port_info[board_idx].pio_mask; |
689 | probe_ent->mwdma_mask = adma_port_info[board_idx].mwdma_mask; | 689 | probe_ent->mwdma_mask = adma_port_info[board_idx].mwdma_mask; |
690 | probe_ent->udma_mask = adma_port_info[board_idx].udma_mask; | 690 | probe_ent->udma_mask = adma_port_info[board_idx].udma_mask; |