aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-dma.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2008-02-01 17:09:30 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:30 -0500
commitecf32796395ed0e27667e7f735946d6dc60e1765 (patch)
tree0cafd743bd39148b85470c8fb6398b30dbce7ffd /drivers/ide/ide-dma.c
parent4e5a68aeb6b513ee0adda11642e10e528b7721c0 (diff)
ide: ide_setup_dma() assumes 8 ports
According to http://marc.info/?l=linux-ide&m=114346138611631, the drivers must always register 8 DMA ports with ide_setup_dma(), so its last argument is not needed. While at it, kill some useless parens in that function... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r--drivers/ide/ide-dma.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 8d668a80adb3..51c86bc241ac 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -889,19 +889,19 @@ static int ide_allocate_dma_engine(ide_hwif_t *hwif)
889 return 1; 889 return 1;
890} 890}
891 891
892static int ide_mapped_mmio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int ports) 892static int ide_mapped_mmio_dma(ide_hwif_t *hwif, unsigned long base)
893{ 893{
894 printk(KERN_INFO " %s: MMIO-DMA ", hwif->name); 894 printk(KERN_INFO " %s: MMIO-DMA ", hwif->name);
895 895
896 return 0; 896 return 0;
897} 897}
898 898
899static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int ports) 899static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base)
900{ 900{
901 printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx", 901 printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx",
902 hwif->name, base, base + ports - 1); 902 hwif->name, base, base + 7);
903 903
904 if (!request_region(base, ports, hwif->name)) { 904 if (!request_region(base, 8, hwif->name)) {
905 printk(" -- Error, ports in use.\n"); 905 printk(" -- Error, ports in use.\n");
906 return 1; 906 return 1;
907 } 907 }
@@ -913,7 +913,7 @@ static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int port
913 if (!request_region(hwif->extra_base, 913 if (!request_region(hwif->extra_base,
914 hwif->cds->extra, hwif->cds->name)) { 914 hwif->cds->extra, hwif->cds->name)) {
915 printk(" -- Error, extra ports in use.\n"); 915 printk(" -- Error, extra ports in use.\n");
916 release_region(base, ports); 916 release_region(base, 8);
917 return 1; 917 return 1;
918 } 918 }
919 hwif->extra_ports = hwif->cds->extra; 919 hwif->extra_ports = hwif->cds->extra;
@@ -923,19 +923,19 @@ static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int port
923 return 0; 923 return 0;
924} 924}
925 925
926static int ide_dma_iobase(ide_hwif_t *hwif, unsigned long base, unsigned int ports) 926static int ide_dma_iobase(ide_hwif_t *hwif, unsigned long base)
927{ 927{
928 if (hwif->mmio) 928 if (hwif->mmio)
929 return ide_mapped_mmio_dma(hwif, base,ports); 929 return ide_mapped_mmio_dma(hwif, base);
930 930
931 return ide_iomio_dma(hwif, base, ports); 931 return ide_iomio_dma(hwif, base);
932} 932}
933 933
934void ide_setup_dma(ide_hwif_t *hwif, unsigned long base, unsigned num_ports) 934void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
935{ 935{
936 u8 dma_stat; 936 u8 dma_stat;
937 937
938 if (ide_dma_iobase(hwif, base, num_ports)) 938 if (ide_dma_iobase(hwif, base))
939 return; 939 return;
940 940
941 if (ide_allocate_dma_engine(hwif)) { 941 if (ide_allocate_dma_engine(hwif)) {
@@ -945,16 +945,16 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base, unsigned num_ports)
945 945
946 hwif->dma_base = base; 946 hwif->dma_base = base;
947 947
948 if (!(hwif->dma_command)) 948 if (!hwif->dma_command)
949 hwif->dma_command = hwif->dma_base; 949 hwif->dma_command = hwif->dma_base + 0;
950 if (!(hwif->dma_vendor1)) 950 if (!hwif->dma_vendor1)
951 hwif->dma_vendor1 = (hwif->dma_base + 1); 951 hwif->dma_vendor1 = hwif->dma_base + 1;
952 if (!(hwif->dma_status)) 952 if (!hwif->dma_status)
953 hwif->dma_status = (hwif->dma_base + 2); 953 hwif->dma_status = hwif->dma_base + 2;
954 if (!(hwif->dma_vendor3)) 954 if (!hwif->dma_vendor3)
955 hwif->dma_vendor3 = (hwif->dma_base + 3); 955 hwif->dma_vendor3 = hwif->dma_base + 3;
956 if (!(hwif->dma_prdtable)) 956 if (!hwif->dma_prdtable)
957 hwif->dma_prdtable = (hwif->dma_base + 4); 957 hwif->dma_prdtable = hwif->dma_base + 4;
958 958
959 if (!hwif->dma_host_set) 959 if (!hwif->dma_host_set)
960 hwif->dma_host_set = &ide_dma_host_set; 960 hwif->dma_host_set = &ide_dma_host_set;