@@ -165,55 +165,6 @@ int pci_iobar_pfn(struct pci_dev *pdev, int bar, struct vm_area_struct *vma)
165
165
return 0 ;
166
166
}
167
167
168
- /*
169
- * This one is used by /dev/mem and fbdev who have no clue about the
170
- * PCI device, it tries to find the PCI device first and calls the
171
- * above routine
172
- */
173
- pgprot_t pci_phys_mem_access_prot (struct file * file ,
174
- unsigned long pfn ,
175
- unsigned long size ,
176
- pgprot_t prot )
177
- {
178
- struct pci_dev * pdev = NULL ;
179
- struct resource * found = NULL ;
180
- resource_size_t offset = ((resource_size_t )pfn ) << PAGE_SHIFT ;
181
- int i ;
182
-
183
- if (page_is_ram (pfn ))
184
- return prot ;
185
-
186
- prot = pgprot_noncached (prot );
187
- for_each_pci_dev (pdev ) {
188
- for (i = 0 ; i <= PCI_ROM_RESOURCE ; i ++ ) {
189
- struct resource * rp = & pdev -> resource [i ];
190
- int flags = rp -> flags ;
191
-
192
- /* Active and same type? */
193
- if ((flags & IORESOURCE_MEM ) == 0 )
194
- continue ;
195
- /* In the range of this resource? */
196
- if (offset < (rp -> start & PAGE_MASK ) ||
197
- offset > rp -> end )
198
- continue ;
199
- found = rp ;
200
- break ;
201
- }
202
- if (found )
203
- break ;
204
- }
205
- if (found ) {
206
- if (found -> flags & IORESOURCE_PREFETCH )
207
- prot = pgprot_noncached_wc (prot );
208
- pci_dev_put (pdev );
209
- }
210
-
211
- pr_debug ("PCI: Non-PCI map for %llx, prot: %lx\n" ,
212
- (unsigned long long )offset , pgprot_val (prot ));
213
-
214
- return prot ;
215
- }
216
-
217
168
/* This provides legacy IO read access on a bus */
218
169
int pci_legacy_read (struct pci_bus * bus , loff_t port , u32 * val , size_t size )
219
170
{
0 commit comments