diff options
author | Tejun Heo <htejun@gmail.com> | 2005-08-17 00:09:07 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-17 00:51:50 -0400 |
commit | 4f50c3cbb4b608ae4d8ee73ce273d819d901a83f (patch) | |
tree | cee924a7ae1c571c76a73b8c021d503b3dbe8237 /drivers/scsi/sata_sil24.c | |
parent | 33d015b9f24d143859bb40dbe7bbb4c7805cee7d (diff) |
[PATCH] sil24: replace pp->port w/ ap->ioaddr.cmd_addr
06_sil24_remove-pp-port.patch
As ap->ioaddr.cmd_addr isn't used for PORT_TF anymore, replace
pp->port w/ it as AHCI does.
Signed-off-by: Tejun Heo <htejun@gmail.com>
sata_sil24.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/sata_sil24.c')
-rw-r--r-- | drivers/scsi/sata_sil24.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index 47a7bfc4a6d8..547c29a5613b 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -214,7 +214,6 @@ struct sil24_cmd_block { | |||
214 | * here from the previous interrupt. | 214 | * here from the previous interrupt. |
215 | */ | 215 | */ |
216 | struct sil24_port_priv { | 216 | struct sil24_port_priv { |
217 | void *port; | ||
218 | struct sil24_cmd_block *cmd_block; /* 32 cmd blocks */ | 217 | struct sil24_cmd_block *cmd_block; /* 32 cmd blocks */ |
219 | dma_addr_t cmd_block_dma; /* DMA base addr for them */ | 218 | dma_addr_t cmd_block_dma; /* DMA base addr for them */ |
220 | }; | 219 | }; |
@@ -414,10 +413,11 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) | |||
414 | static int sil24_qc_issue(struct ata_queued_cmd *qc) | 413 | static int sil24_qc_issue(struct ata_queued_cmd *qc) |
415 | { | 414 | { |
416 | struct ata_port *ap = qc->ap; | 415 | struct ata_port *ap = qc->ap; |
416 | void *port = (void *)ap->ioaddr.cmd_addr; | ||
417 | struct sil24_port_priv *pp = ap->private_data; | 417 | struct sil24_port_priv *pp = ap->private_data; |
418 | dma_addr_t paddr = pp->cmd_block_dma + qc->tag * sizeof(*pp->cmd_block); | 418 | dma_addr_t paddr = pp->cmd_block_dma + qc->tag * sizeof(*pp->cmd_block); |
419 | 419 | ||
420 | writel((u32)paddr, pp->port + PORT_CMD_ACTIVATE); | 420 | writel((u32)paddr, port + PORT_CMD_ACTIVATE); |
421 | return 0; | 421 | return 0; |
422 | } | 422 | } |
423 | 423 | ||
@@ -428,8 +428,7 @@ static void sil24_irq_clear(struct ata_port *ap) | |||
428 | 428 | ||
429 | static void sil24_reset_controller(struct ata_port *ap) | 429 | static void sil24_reset_controller(struct ata_port *ap) |
430 | { | 430 | { |
431 | struct sil24_port_priv *pp = ap->private_data; | 431 | void *port = (void *)ap->ioaddr.cmd_addr; |
432 | void *port = pp->port; | ||
433 | int cnt; | 432 | int cnt; |
434 | u32 tmp; | 433 | u32 tmp; |
435 | 434 | ||
@@ -480,8 +479,7 @@ static void sil24_eng_timeout(struct ata_port *ap) | |||
480 | static void sil24_error_intr(struct ata_port *ap, u32 slot_stat) | 479 | static void sil24_error_intr(struct ata_port *ap, u32 slot_stat) |
481 | { | 480 | { |
482 | struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); | 481 | struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); |
483 | struct sil24_port_priv *pp = ap->private_data; | 482 | void *port = (void *)ap->ioaddr.cmd_addr; |
484 | void *port = pp->port; | ||
485 | u32 irq_stat, cmd_err, sstatus, serror; | 483 | u32 irq_stat, cmd_err, sstatus, serror; |
486 | 484 | ||
487 | irq_stat = readl(port + PORT_IRQ_STAT); | 485 | irq_stat = readl(port + PORT_IRQ_STAT); |
@@ -509,8 +507,7 @@ static void sil24_error_intr(struct ata_port *ap, u32 slot_stat) | |||
509 | static inline void sil24_host_intr(struct ata_port *ap) | 507 | static inline void sil24_host_intr(struct ata_port *ap) |
510 | { | 508 | { |
511 | struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); | 509 | struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); |
512 | struct sil24_port_priv *pp = ap->private_data; | 510 | void *port = (void *)ap->ioaddr.cmd_addr; |
513 | void *port = pp->port; | ||
514 | u32 slot_stat; | 511 | u32 slot_stat; |
515 | 512 | ||
516 | slot_stat = readl(port + PORT_SLOT_STAT); | 513 | slot_stat = readl(port + PORT_SLOT_STAT); |
@@ -561,7 +558,6 @@ static irqreturn_t sil24_interrupt(int irq, void *dev_instance, struct pt_regs * | |||
561 | static int sil24_port_start(struct ata_port *ap) | 558 | static int sil24_port_start(struct ata_port *ap) |
562 | { | 559 | { |
563 | struct device *dev = ap->host_set->dev; | 560 | struct device *dev = ap->host_set->dev; |
564 | struct sil24_host_priv *hpriv = ap->host_set->private_data; | ||
565 | struct sil24_port_priv *pp; | 561 | struct sil24_port_priv *pp; |
566 | struct sil24_cmd_block *cb; | 562 | struct sil24_cmd_block *cb; |
567 | size_t cb_size = sizeof(*cb); | 563 | size_t cb_size = sizeof(*cb); |
@@ -579,7 +575,6 @@ static int sil24_port_start(struct ata_port *ap) | |||
579 | } | 575 | } |
580 | memset(cb, 0, cb_size); | 576 | memset(cb, 0, cb_size); |
581 | 577 | ||
582 | pp->port = hpriv->port_base + ap->port_no * PORT_REGS_SIZE; | ||
583 | pp->cmd_block = cb; | 578 | pp->cmd_block = cb; |
584 | pp->cmd_block_dma = cb_dma; | 579 | pp->cmd_block_dma = cb_dma; |
585 | 580 | ||
@@ -700,7 +695,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
700 | u32 tmp; | 695 | u32 tmp; |
701 | int cnt; | 696 | int cnt; |
702 | 697 | ||
703 | probe_ent->port[i].cmd_addr = portu; | 698 | probe_ent->port[i].cmd_addr = portu + PORT_PRB; |
704 | probe_ent->port[i].scr_addr = portu + PORT_SCONTROL; | 699 | probe_ent->port[i].scr_addr = portu + PORT_SCONTROL; |
705 | 700 | ||
706 | ata_std_ports(&probe_ent->port[i]); | 701 | ata_std_ports(&probe_ent->port[i]); |