diff options
Diffstat (limited to 'drivers/ata/sata_promise.c')
-rw-r--r-- | drivers/ata/sata_promise.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c index cf9ed8c39301..2339813ce9f6 100644 --- a/drivers/ata/sata_promise.c +++ b/drivers/ata/sata_promise.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #include "sata_promise.h" | 45 | #include "sata_promise.h" |
46 | 46 | ||
47 | #define DRV_NAME "sata_promise" | 47 | #define DRV_NAME "sata_promise" |
48 | #define DRV_VERSION "1.05" | 48 | #define DRV_VERSION "2.00" |
49 | 49 | ||
50 | 50 | ||
51 | enum { | 51 | enum { |
@@ -218,6 +218,7 @@ static const struct ata_port_operations pdc_pata_ops = { | |||
218 | .freeze = pdc_freeze, | 218 | .freeze = pdc_freeze, |
219 | .thaw = pdc_thaw, | 219 | .thaw = pdc_thaw, |
220 | .error_handler = pdc_error_handler, | 220 | .error_handler = pdc_error_handler, |
221 | .post_internal_cmd = pdc_post_internal_cmd, | ||
221 | .data_xfer = ata_data_xfer, | 222 | .data_xfer = ata_data_xfer, |
222 | .irq_handler = pdc_interrupt, | 223 | .irq_handler = pdc_interrupt, |
223 | .irq_clear = pdc_irq_clear, | 224 | .irq_clear = pdc_irq_clear, |
@@ -776,7 +777,8 @@ static int pdc_old_check_atapi_dma(struct ata_queued_cmd *qc) | |||
776 | return pdc_check_atapi_dma(qc); | 777 | return pdc_check_atapi_dma(qc); |
777 | } | 778 | } |
778 | 779 | ||
779 | static void pdc_ata_setup_port(struct ata_ioports *port, void __iomem *base) | 780 | static void pdc_ata_setup_port(struct ata_ioports *port, void __iomem *base, |
781 | void __iomem *scr_addr) | ||
780 | { | 782 | { |
781 | port->cmd_addr = base; | 783 | port->cmd_addr = base; |
782 | port->data_addr = base; | 784 | port->data_addr = base; |
@@ -791,6 +793,7 @@ static void pdc_ata_setup_port(struct ata_ioports *port, void __iomem *base) | |||
791 | port->status_addr = base + 0x1c; | 793 | port->status_addr = base + 0x1c; |
792 | port->altstatus_addr = | 794 | port->altstatus_addr = |
793 | port->ctl_addr = base + 0x38; | 795 | port->ctl_addr = base + 0x38; |
796 | port->scr_addr = scr_addr; | ||
794 | } | 797 | } |
795 | 798 | ||
796 | 799 | ||
@@ -903,11 +906,8 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
903 | 906 | ||
904 | base = probe_ent->iomap[PDC_MMIO_BAR]; | 907 | base = probe_ent->iomap[PDC_MMIO_BAR]; |
905 | 908 | ||
906 | pdc_ata_setup_port(&probe_ent->port[0], base + 0x200); | 909 | pdc_ata_setup_port(&probe_ent->port[0], base + 0x200, base + 0x400); |
907 | pdc_ata_setup_port(&probe_ent->port[1], base + 0x280); | 910 | pdc_ata_setup_port(&probe_ent->port[1], base + 0x280, base + 0x500); |
908 | |||
909 | probe_ent->port[0].scr_addr = base + 0x400; | ||
910 | probe_ent->port[1].scr_addr = base + 0x500; | ||
911 | 911 | ||
912 | /* notice 4-port boards */ | 912 | /* notice 4-port boards */ |
913 | switch (board_idx) { | 913 | switch (board_idx) { |
@@ -916,12 +916,8 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
916 | /* Fall through */ | 916 | /* Fall through */ |
917 | case board_20319: | 917 | case board_20319: |
918 | probe_ent->n_ports = 4; | 918 | probe_ent->n_ports = 4; |
919 | 919 | pdc_ata_setup_port(&probe_ent->port[2], base + 0x300, base + 0x600); | |
920 | pdc_ata_setup_port(&probe_ent->port[2], base + 0x300); | 920 | pdc_ata_setup_port(&probe_ent->port[3], base + 0x380, base + 0x700); |
921 | pdc_ata_setup_port(&probe_ent->port[3], base + 0x380); | ||
922 | |||
923 | probe_ent->port[2].scr_addr = base + 0x600; | ||
924 | probe_ent->port[3].scr_addr = base + 0x700; | ||
925 | break; | 921 | break; |
926 | case board_2057x: | 922 | case board_2057x: |
927 | hp->flags |= PDC_FLAG_GEN_II; | 923 | hp->flags |= PDC_FLAG_GEN_II; |
@@ -931,7 +927,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
931 | tmp = readb(base + PDC_FLASH_CTL+1); | 927 | tmp = readb(base + PDC_FLASH_CTL+1); |
932 | if (!(tmp & 0x80)) { | 928 | if (!(tmp & 0x80)) { |
933 | probe_ent->n_ports = 3; | 929 | probe_ent->n_ports = 3; |
934 | pdc_ata_setup_port(&probe_ent->port[2], base + 0x300); | 930 | pdc_ata_setup_port(&probe_ent->port[2], base + 0x300, NULL); |
935 | hp->port_flags[2] = ATA_FLAG_SLAVE_POSS; | 931 | hp->port_flags[2] = ATA_FLAG_SLAVE_POSS; |
936 | printk(KERN_INFO DRV_NAME " PATA port found\n"); | 932 | printk(KERN_INFO DRV_NAME " PATA port found\n"); |
937 | } else | 933 | } else |
@@ -941,12 +937,8 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
941 | break; | 937 | break; |
942 | case board_20619: | 938 | case board_20619: |
943 | probe_ent->n_ports = 4; | 939 | probe_ent->n_ports = 4; |
944 | 940 | pdc_ata_setup_port(&probe_ent->port[2], base + 0x300, NULL); | |
945 | pdc_ata_setup_port(&probe_ent->port[2], base + 0x300); | 941 | pdc_ata_setup_port(&probe_ent->port[3], base + 0x380, NULL); |
946 | pdc_ata_setup_port(&probe_ent->port[3], base + 0x380); | ||
947 | |||
948 | probe_ent->port[2].scr_addr = base + 0x600; | ||
949 | probe_ent->port[3].scr_addr = base + 0x700; | ||
950 | break; | 942 | break; |
951 | default: | 943 | default: |
952 | BUG(); | 944 | BUG(); |