Lines Matching +full:pci +full:- +full:based

2  * Linux driver attachment glue for PCI based controllers.
4 * Copyright (c) 2000-2001 Adaptec Inc.
18 * 3. Neither the names of the above-listed copyright holders nor the names
50 /* aic7850 based controllers */
52 /* aic7860 based controllers */
58 /* aic7870 based controllers */
65 /* aic7880 based controllers */
75 /* aic7890 based controllers */
83 /* aic7890 based controllers */
91 /* aic7892 based controllers */
101 /* aic7899 based controllers */
122 MODULE_DEVICE_TABLE(pci, ahc_linux_pci_id_table);
153 dev_printk(KERN_ERR, &pdev->dev, in ahc_linux_pci_dev_resume()
172 if (ahc->platform_data && ahc->platform_data->host) in ahc_linux_pci_dev_remove()
173 scsi_remove_host(ahc->platform_data->host); in ahc_linux_pci_dev_remove()
184 struct pci_dev *pdev = ahc->dev_softc, *master_pdev; in ahc_linux_pci_inherit_flags()
185 unsigned int master_devfn = PCI_DEVFN(PCI_SLOT(pdev->devfn), 0); in ahc_linux_pci_inherit_flags()
187 master_pdev = pci_get_slot(pdev->bus, master_devfn); in ahc_linux_pci_inherit_flags()
191 ahc->flags &= ~AHC_BIOS_ENABLED; in ahc_linux_pci_inherit_flags()
192 ahc->flags |= master->flags & AHC_BIOS_ENABLED; in ahc_linux_pci_inherit_flags()
194 ahc->flags &= ~AHC_PRIMARY_CHANNEL; in ahc_linux_pci_inherit_flags()
195 ahc->flags |= master->flags & AHC_PRIMARY_CHANNEL; in ahc_linux_pci_inherit_flags()
208 ahc_dev_softc_t pci; in ahc_linux_pci_dev_probe() local
212 struct device *dev = &pdev->dev; in ahc_linux_pci_dev_probe()
214 pci = pdev; in ahc_linux_pci_dev_probe()
215 entry = ahc_find_pci_device(pci); in ahc_linux_pci_dev_probe()
217 return (-ENODEV); in ahc_linux_pci_dev_probe()
225 ahc_get_pci_bus(pci), in ahc_linux_pci_dev_probe()
226 ahc_get_pci_slot(pci), in ahc_linux_pci_dev_probe()
227 ahc_get_pci_function(pci)); in ahc_linux_pci_dev_probe()
230 return (-ENOMEM); in ahc_linux_pci_dev_probe()
233 return (-ENOMEM); in ahc_linux_pci_dev_probe()
236 return (-ENODEV); in ahc_linux_pci_dev_probe()
241 && ahc->features & AHC_LARGE_SCBS in ahc_linux_pci_dev_probe()
244 ahc->flags |= AHC_39BIT_ADDRESSING; in ahc_linux_pci_dev_probe()
249 return (-ENODEV); in ahc_linux_pci_dev_probe()
252 ahc->dev_softc = pci; in ahc_linux_pci_dev_probe()
253 ahc->dev = &pci->dev; in ahc_linux_pci_dev_probe()
257 return (-error); in ahc_linux_pci_dev_probe()
261 * Second Function PCI devices need to inherit some in ahc_linux_pci_dev_probe()
264 if ((ahc->features & AHC_MULTI_FUNC) && PCI_FUNC(pdev->devfn) != 0) in ahc_linux_pci_dev_probe()
272 /******************************* PCI Routines *********************************/
274 ahc_pci_read_config(ahc_dev_softc_t pci, int reg, int width) in ahc_pci_read_config() argument
281 pci_read_config_byte(pci, reg, &retval); in ahc_pci_read_config()
287 pci_read_config_word(pci, reg, &retval); in ahc_pci_read_config()
293 pci_read_config_dword(pci, reg, &retval); in ahc_pci_read_config()
304 ahc_pci_write_config(ahc_dev_softc_t pci, int reg, uint32_t value, int width) in ahc_pci_write_config() argument
308 pci_write_config_byte(pci, reg, value); in ahc_pci_write_config()
311 pci_write_config_word(pci, reg, value); in ahc_pci_write_config()
314 pci_write_config_dword(pci, reg, value); in ahc_pci_write_config()
352 *base = pci_resource_start(ahc->dev_softc, 0); in ahc_linux_pci_reserve_io_region()
369 start = pci_resource_start(ahc->dev_softc, 1); in ahc_linux_pci_reserve_mem_region()
397 command = ahc_pci_read_config(ahc->dev_softc, PCIR_COMMAND, 4); in ahc_pci_map_registers()
403 ahc->platform_data->mem_busaddr = base; in ahc_pci_map_registers()
404 ahc->tag = BUS_SPACE_MEMIO; in ahc_pci_map_registers()
405 ahc->bsh.maddr = maddr; in ahc_pci_map_registers()
406 ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND, in ahc_pci_map_registers()
415 printk("aic7xxx: PCI Device %d:%d:%d " in ahc_pci_map_registers()
417 ahc_get_pci_bus(ahc->dev_softc), in ahc_pci_map_registers()
418 ahc_get_pci_slot(ahc->dev_softc), in ahc_pci_map_registers()
419 ahc_get_pci_function(ahc->dev_softc)); in ahc_pci_map_registers()
421 release_mem_region(ahc->platform_data->mem_busaddr, in ahc_pci_map_registers()
423 ahc->bsh.maddr = NULL; in ahc_pci_map_registers()
428 printk("aic7xxx: PCI%d:%d:%d MEM region 0x%llx " in ahc_pci_map_registers()
430 ahc_get_pci_bus(ahc->dev_softc), in ahc_pci_map_registers()
431 ahc_get_pci_slot(ahc->dev_softc), in ahc_pci_map_registers()
432 ahc_get_pci_function(ahc->dev_softc), in ahc_pci_map_registers()
443 ahc->tag = BUS_SPACE_PIO; in ahc_pci_map_registers()
444 ahc->bsh.ioport = (u_long)base; in ahc_pci_map_registers()
447 printk("aic7xxx: PCI%d:%d:%d IO region 0x%llx[0..255] " in ahc_pci_map_registers()
449 ahc_get_pci_bus(ahc->dev_softc), in ahc_pci_map_registers()
450 ahc_get_pci_slot(ahc->dev_softc), in ahc_pci_map_registers()
451 ahc_get_pci_function(ahc->dev_softc), in ahc_pci_map_registers()
455 ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND, command, 4); in ahc_pci_map_registers()
464 error = request_irq(ahc->dev_softc->irq, ahc_linux_isr, in ahc_pci_map_int()
467 ahc->platform_data->irq = ahc->dev_softc->irq; in ahc_pci_map_int()
469 return (-error); in ahc_pci_map_int()