diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-16 16:29:55 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-16 16:29:55 -0400 |
commit | 0ae2e178652753ae1797d407755a3505f7c1d2a7 (patch) | |
tree | fa725edcfb4b9752ebf2aa49a3e42e158537d4ed /drivers/ide/pci/generic.c | |
parent | b8b739d3361c16773a30fe5c0360336bbc19f435 (diff) |
ide: remove ->ide_dma_check (take 2)
* Add IDE_HFLAG_TRUST_BIOS_FOR_DMA host flag for host drivers that depend
on BIOS for programming device/controller for DMA. Set it in cy82c693,
generic, ns87415, opti621 and trm290 host drivers.
* Add IDE_HFLAG_VDMA host flag for host drivers using VDMA. Set it in cs5520
host driver.
* Teach ide_tune_dma() about IDE_HFLAG_TRUST_BIOS_FOR_DMA flag.
* Add generic ide_dma_check() helper and remove all open coded ->ide_dma_check
implementations. Fix all places checking for presence of ->ide_dma_check
hook to check for ->ide_dma_on instead.
* Remove no longer needed code from config_drive_for_dma().
* Make ide_tune_dma() static.
v2:
* Fix config_drive_for_dma() return values.
* Fix ide-dma.c build for CONFIG_BLK_DEV_IDEDMA_PCI=n by adding
dummy config_drive_for_dma() inline.
* Fix IDE_HFLAG_TRUST_BIOS_FOR_DMA handling in ide_dma_check().
* Fix init_hwif_it8213() comment.
There should be no functionality changes caused by this patch.
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/generic.c')
-rw-r--r-- | drivers/ide/pci/generic.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index 48caa468b76..e8156c1ba63 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c | |||
@@ -97,77 +97,92 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { | |||
97 | .init_hwif = init_hwif_generic, | 97 | .init_hwif = init_hwif_generic, |
98 | .autodma = AUTODMA, | 98 | .autodma = AUTODMA, |
99 | .bootable = ON_BOARD, | 99 | .bootable = ON_BOARD, |
100 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
100 | },{ /* 1 */ | 101 | },{ /* 1 */ |
101 | .name = "NS87410", | 102 | .name = "NS87410", |
102 | .init_hwif = init_hwif_generic, | 103 | .init_hwif = init_hwif_generic, |
103 | .autodma = AUTODMA, | 104 | .autodma = AUTODMA, |
104 | .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, | 105 | .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, |
105 | .bootable = ON_BOARD, | 106 | .bootable = ON_BOARD, |
107 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
106 | },{ /* 2 */ | 108 | },{ /* 2 */ |
107 | .name = "SAMURAI", | 109 | .name = "SAMURAI", |
108 | .init_hwif = init_hwif_generic, | 110 | .init_hwif = init_hwif_generic, |
109 | .autodma = AUTODMA, | 111 | .autodma = AUTODMA, |
110 | .bootable = ON_BOARD, | 112 | .bootable = ON_BOARD, |
113 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
111 | },{ /* 3 */ | 114 | },{ /* 3 */ |
112 | .name = "HT6565", | 115 | .name = "HT6565", |
113 | .init_hwif = init_hwif_generic, | 116 | .init_hwif = init_hwif_generic, |
114 | .autodma = AUTODMA, | 117 | .autodma = AUTODMA, |
115 | .bootable = ON_BOARD, | 118 | .bootable = ON_BOARD, |
119 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
116 | },{ /* 4 */ | 120 | },{ /* 4 */ |
117 | .name = "UM8673F", | 121 | .name = "UM8673F", |
118 | .init_hwif = init_hwif_generic, | 122 | .init_hwif = init_hwif_generic, |
119 | .autodma = NODMA, | 123 | .autodma = NODMA, |
120 | .bootable = ON_BOARD, | 124 | .bootable = ON_BOARD, |
125 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
121 | },{ /* 5 */ | 126 | },{ /* 5 */ |
122 | .name = "UM8886A", | 127 | .name = "UM8886A", |
123 | .init_hwif = init_hwif_generic, | 128 | .init_hwif = init_hwif_generic, |
124 | .autodma = NODMA, | 129 | .autodma = NODMA, |
125 | .bootable = ON_BOARD, | 130 | .bootable = ON_BOARD, |
131 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
126 | },{ /* 6 */ | 132 | },{ /* 6 */ |
127 | .name = "UM8886BF", | 133 | .name = "UM8886BF", |
128 | .init_hwif = init_hwif_generic, | 134 | .init_hwif = init_hwif_generic, |
129 | .autodma = NODMA, | 135 | .autodma = NODMA, |
130 | .bootable = ON_BOARD, | 136 | .bootable = ON_BOARD, |
137 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
131 | },{ /* 7 */ | 138 | },{ /* 7 */ |
132 | .name = "HINT_IDE", | 139 | .name = "HINT_IDE", |
133 | .init_hwif = init_hwif_generic, | 140 | .init_hwif = init_hwif_generic, |
134 | .autodma = AUTODMA, | 141 | .autodma = AUTODMA, |
135 | .bootable = ON_BOARD, | 142 | .bootable = ON_BOARD, |
143 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
136 | },{ /* 8 */ | 144 | },{ /* 8 */ |
137 | .name = "VIA_IDE", | 145 | .name = "VIA_IDE", |
138 | .init_hwif = init_hwif_generic, | 146 | .init_hwif = init_hwif_generic, |
139 | .autodma = NOAUTODMA, | 147 | .autodma = NOAUTODMA, |
140 | .bootable = ON_BOARD, | 148 | .bootable = ON_BOARD, |
149 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
141 | },{ /* 9 */ | 150 | },{ /* 9 */ |
142 | .name = "OPTI621V", | 151 | .name = "OPTI621V", |
143 | .init_hwif = init_hwif_generic, | 152 | .init_hwif = init_hwif_generic, |
144 | .autodma = NOAUTODMA, | 153 | .autodma = NOAUTODMA, |
145 | .bootable = ON_BOARD, | 154 | .bootable = ON_BOARD, |
155 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
146 | },{ /* 10 */ | 156 | },{ /* 10 */ |
147 | .name = "VIA8237SATA", | 157 | .name = "VIA8237SATA", |
148 | .init_hwif = init_hwif_generic, | 158 | .init_hwif = init_hwif_generic, |
149 | .autodma = AUTODMA, | 159 | .autodma = AUTODMA, |
150 | .bootable = OFF_BOARD, | 160 | .bootable = OFF_BOARD, |
161 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
151 | },{ /* 11 */ | 162 | },{ /* 11 */ |
152 | .name = "Piccolo0102", | 163 | .name = "Piccolo0102", |
153 | .init_hwif = init_hwif_generic, | 164 | .init_hwif = init_hwif_generic, |
154 | .autodma = NOAUTODMA, | 165 | .autodma = NOAUTODMA, |
155 | .bootable = ON_BOARD, | 166 | .bootable = ON_BOARD, |
167 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
156 | },{ /* 12 */ | 168 | },{ /* 12 */ |
157 | .name = "Piccolo0103", | 169 | .name = "Piccolo0103", |
158 | .init_hwif = init_hwif_generic, | 170 | .init_hwif = init_hwif_generic, |
159 | .autodma = NOAUTODMA, | 171 | .autodma = NOAUTODMA, |
160 | .bootable = ON_BOARD, | 172 | .bootable = ON_BOARD, |
173 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
161 | },{ /* 13 */ | 174 | },{ /* 13 */ |
162 | .name = "Piccolo0105", | 175 | .name = "Piccolo0105", |
163 | .init_hwif = init_hwif_generic, | 176 | .init_hwif = init_hwif_generic, |
164 | .autodma = NOAUTODMA, | 177 | .autodma = NOAUTODMA, |
165 | .bootable = ON_BOARD, | 178 | .bootable = ON_BOARD, |
179 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
166 | },{ /* 14 */ | 180 | },{ /* 14 */ |
167 | .name = "Revolution", | 181 | .name = "Revolution", |
168 | .init_hwif = init_hwif_generic, | 182 | .init_hwif = init_hwif_generic, |
169 | .autodma = AUTODMA, | 183 | .autodma = AUTODMA, |
170 | .bootable = OFF_BOARD, | 184 | .bootable = OFF_BOARD, |
185 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
171 | } | 186 | } |
172 | }; | 187 | }; |
173 | 188 | ||