tpci200 48 drivers/ipack/carriers/tpci200.c struct tpci200_board *tpci200; tpci200 54 drivers/ipack/carriers/tpci200.c tpci200 = dev_get_drvdata(dev->bus->parent); tpci200 56 drivers/ipack/carriers/tpci200.c if (tpci200 == NULL) { tpci200 68 drivers/ipack/carriers/tpci200.c return tpci200; tpci200 71 drivers/ipack/carriers/tpci200.c static void tpci200_clear_mask(struct tpci200_board *tpci200, tpci200 75 drivers/ipack/carriers/tpci200.c spin_lock_irqsave(&tpci200->regs_lock, flags); tpci200 77 drivers/ipack/carriers/tpci200.c spin_unlock_irqrestore(&tpci200->regs_lock, flags); tpci200 80 drivers/ipack/carriers/tpci200.c static void tpci200_set_mask(struct tpci200_board *tpci200, tpci200 84 drivers/ipack/carriers/tpci200.c spin_lock_irqsave(&tpci200->regs_lock, flags); tpci200 86 drivers/ipack/carriers/tpci200.c spin_unlock_irqrestore(&tpci200->regs_lock, flags); tpci200 89 drivers/ipack/carriers/tpci200.c static void tpci200_unregister(struct tpci200_board *tpci200) tpci200 91 drivers/ipack/carriers/tpci200.c free_irq(tpci200->info->pdev->irq, (void *) tpci200); tpci200 93 drivers/ipack/carriers/tpci200.c pci_iounmap(tpci200->info->pdev, tpci200->info->interface_regs); tpci200 94 drivers/ipack/carriers/tpci200.c pci_iounmap(tpci200->info->pdev, tpci200->info->cfg_regs); tpci200 96 drivers/ipack/carriers/tpci200.c pci_release_region(tpci200->info->pdev, TPCI200_IP_INTERFACE_BAR); tpci200 97 drivers/ipack/carriers/tpci200.c pci_release_region(tpci200->info->pdev, TPCI200_IO_ID_INT_SPACES_BAR); tpci200 98 drivers/ipack/carriers/tpci200.c pci_release_region(tpci200->info->pdev, TPCI200_MEM16_SPACE_BAR); tpci200 99 drivers/ipack/carriers/tpci200.c pci_release_region(tpci200->info->pdev, TPCI200_MEM8_SPACE_BAR); tpci200 100 drivers/ipack/carriers/tpci200.c pci_release_region(tpci200->info->pdev, TPCI200_CFG_MEM_BAR); tpci200 102 drivers/ipack/carriers/tpci200.c pci_disable_device(tpci200->info->pdev); tpci200 103 drivers/ipack/carriers/tpci200.c pci_dev_put(tpci200->info->pdev); tpci200 106 drivers/ipack/carriers/tpci200.c static void tpci200_enable_irq(struct tpci200_board *tpci200, tpci200 109 drivers/ipack/carriers/tpci200.c tpci200_set_mask(tpci200, tpci200 110 drivers/ipack/carriers/tpci200.c &tpci200->info->interface_regs->control[islot], tpci200 114 drivers/ipack/carriers/tpci200.c static void tpci200_disable_irq(struct tpci200_board *tpci200, tpci200 117 drivers/ipack/carriers/tpci200.c tpci200_clear_mask(tpci200, tpci200 118 drivers/ipack/carriers/tpci200.c &tpci200->info->interface_regs->control[islot], tpci200 135 drivers/ipack/carriers/tpci200.c struct tpci200_board *tpci200 = (struct tpci200_board *) dev_id; tpci200 142 drivers/ipack/carriers/tpci200.c status_reg = ioread16(&tpci200->info->interface_regs->status); tpci200 153 drivers/ipack/carriers/tpci200.c slot_irq = rcu_dereference(tpci200->slots[i].irq); tpci200 156 drivers/ipack/carriers/tpci200.c dev_info(&tpci200->info->pdev->dev, tpci200 158 drivers/ipack/carriers/tpci200.c tpci200->number, i); tpci200 159 drivers/ipack/carriers/tpci200.c tpci200_disable_irq(tpci200, i); tpci200 170 drivers/ipack/carriers/tpci200.c struct tpci200_board *tpci200; tpci200 172 drivers/ipack/carriers/tpci200.c tpci200 = check_slot(dev); tpci200 173 drivers/ipack/carriers/tpci200.c if (tpci200 == NULL) tpci200 176 drivers/ipack/carriers/tpci200.c if (mutex_lock_interruptible(&tpci200->mutex)) tpci200 179 drivers/ipack/carriers/tpci200.c if (tpci200->slots[dev->slot].irq == NULL) { tpci200 180 drivers/ipack/carriers/tpci200.c mutex_unlock(&tpci200->mutex); tpci200 184 drivers/ipack/carriers/tpci200.c tpci200_disable_irq(tpci200, dev->slot); tpci200 185 drivers/ipack/carriers/tpci200.c slot_irq = tpci200->slots[dev->slot].irq; tpci200 187 drivers/ipack/carriers/tpci200.c RCU_INIT_POINTER(tpci200->slots[dev->slot].irq, NULL); tpci200 190 drivers/ipack/carriers/tpci200.c mutex_unlock(&tpci200->mutex); tpci200 199 drivers/ipack/carriers/tpci200.c struct tpci200_board *tpci200; tpci200 201 drivers/ipack/carriers/tpci200.c tpci200 = check_slot(dev); tpci200 202 drivers/ipack/carriers/tpci200.c if (tpci200 == NULL) tpci200 205 drivers/ipack/carriers/tpci200.c if (mutex_lock_interruptible(&tpci200->mutex)) tpci200 208 drivers/ipack/carriers/tpci200.c if (tpci200->slots[dev->slot].irq != NULL) { tpci200 236 drivers/ipack/carriers/tpci200.c rcu_assign_pointer(tpci200->slots[dev->slot].irq, slot_irq); tpci200 237 drivers/ipack/carriers/tpci200.c tpci200_enable_irq(tpci200, dev->slot); tpci200 240 drivers/ipack/carriers/tpci200.c mutex_unlock(&tpci200->mutex); tpci200 244 drivers/ipack/carriers/tpci200.c static int tpci200_register(struct tpci200_board *tpci200) tpci200 251 drivers/ipack/carriers/tpci200.c if (pci_enable_device(tpci200->info->pdev) < 0) tpci200 255 drivers/ipack/carriers/tpci200.c res = pci_request_region(tpci200->info->pdev, TPCI200_IP_INTERFACE_BAR, tpci200 258 drivers/ipack/carriers/tpci200.c dev_err(&tpci200->info->pdev->dev, tpci200 260 drivers/ipack/carriers/tpci200.c tpci200->info->pdev->bus->number, tpci200 261 drivers/ipack/carriers/tpci200.c tpci200->info->pdev->devfn); tpci200 266 drivers/ipack/carriers/tpci200.c res = pci_request_region(tpci200->info->pdev, tpci200 270 drivers/ipack/carriers/tpci200.c dev_err(&tpci200->info->pdev->dev, tpci200 272 drivers/ipack/carriers/tpci200.c tpci200->info->pdev->bus->number, tpci200 273 drivers/ipack/carriers/tpci200.c tpci200->info->pdev->devfn); tpci200 278 drivers/ipack/carriers/tpci200.c res = pci_request_region(tpci200->info->pdev, TPCI200_MEM8_SPACE_BAR, tpci200 281 drivers/ipack/carriers/tpci200.c dev_err(&tpci200->info->pdev->dev, tpci200 283 drivers/ipack/carriers/tpci200.c tpci200->info->pdev->bus->number, tpci200 284 drivers/ipack/carriers/tpci200.c tpci200->info->pdev->devfn); tpci200 289 drivers/ipack/carriers/tpci200.c res = pci_request_region(tpci200->info->pdev, TPCI200_MEM16_SPACE_BAR, tpci200 292 drivers/ipack/carriers/tpci200.c dev_err(&tpci200->info->pdev->dev, tpci200 294 drivers/ipack/carriers/tpci200.c tpci200->info->pdev->bus->number, tpci200 295 drivers/ipack/carriers/tpci200.c tpci200->info->pdev->devfn); tpci200 300 drivers/ipack/carriers/tpci200.c tpci200->info->interface_regs = tpci200 301 drivers/ipack/carriers/tpci200.c ioremap_nocache(pci_resource_start(tpci200->info->pdev, tpci200 304 drivers/ipack/carriers/tpci200.c if (!tpci200->info->interface_regs) { tpci200 305 drivers/ipack/carriers/tpci200.c dev_err(&tpci200->info->pdev->dev, tpci200 307 drivers/ipack/carriers/tpci200.c tpci200->info->pdev->bus->number, tpci200 308 drivers/ipack/carriers/tpci200.c tpci200->info->pdev->devfn); tpci200 314 drivers/ipack/carriers/tpci200.c spin_lock_init(&tpci200->regs_lock); tpci200 316 drivers/ipack/carriers/tpci200.c ioidint_base = pci_resource_start(tpci200->info->pdev, tpci200 318 drivers/ipack/carriers/tpci200.c tpci200->mod_mem[IPACK_IO_SPACE] = ioidint_base + TPCI200_IO_SPACE_OFF; tpci200 319 drivers/ipack/carriers/tpci200.c tpci200->mod_mem[IPACK_ID_SPACE] = ioidint_base + TPCI200_ID_SPACE_OFF; tpci200 320 drivers/ipack/carriers/tpci200.c tpci200->mod_mem[IPACK_INT_SPACE] = tpci200 322 drivers/ipack/carriers/tpci200.c tpci200->mod_mem[IPACK_MEM8_SPACE] = tpci200 323 drivers/ipack/carriers/tpci200.c pci_resource_start(tpci200->info->pdev, tpci200 325 drivers/ipack/carriers/tpci200.c tpci200->mod_mem[IPACK_MEM16_SPACE] = tpci200 326 drivers/ipack/carriers/tpci200.c pci_resource_start(tpci200->info->pdev, tpci200 339 drivers/ipack/carriers/tpci200.c writew(slot_ctrl, &tpci200->info->interface_regs->control[i]); tpci200 341 drivers/ipack/carriers/tpci200.c res = request_irq(tpci200->info->pdev->irq, tpci200 343 drivers/ipack/carriers/tpci200.c KBUILD_MODNAME, (void *) tpci200); tpci200 345 drivers/ipack/carriers/tpci200.c dev_err(&tpci200->info->pdev->dev, tpci200 347 drivers/ipack/carriers/tpci200.c tpci200->info->pdev->bus->number, tpci200 348 drivers/ipack/carriers/tpci200.c tpci200->info->pdev->devfn); tpci200 355 drivers/ipack/carriers/tpci200.c pci_release_region(tpci200->info->pdev, TPCI200_MEM8_SPACE_BAR); tpci200 357 drivers/ipack/carriers/tpci200.c pci_release_region(tpci200->info->pdev, TPCI200_IO_ID_INT_SPACES_BAR); tpci200 359 drivers/ipack/carriers/tpci200.c pci_release_region(tpci200->info->pdev, TPCI200_IP_INTERFACE_BAR); tpci200 361 drivers/ipack/carriers/tpci200.c pci_disable_device(tpci200->info->pdev); tpci200 367 drivers/ipack/carriers/tpci200.c struct tpci200_board *tpci200 = check_slot(dev); tpci200 370 drivers/ipack/carriers/tpci200.c if (!tpci200) tpci200 373 drivers/ipack/carriers/tpci200.c addr = &tpci200->info->interface_regs->control[dev->slot]; tpci200 379 drivers/ipack/carriers/tpci200.c struct tpci200_board *tpci200 = check_slot(dev); tpci200 382 drivers/ipack/carriers/tpci200.c if (!tpci200) tpci200 385 drivers/ipack/carriers/tpci200.c addr = &tpci200->info->interface_regs->control[dev->slot]; tpci200 389 drivers/ipack/carriers/tpci200.c tpci200_clear_mask(tpci200, addr, TPCI200_CLK32); tpci200 392 drivers/ipack/carriers/tpci200.c tpci200_set_mask(tpci200, addr, TPCI200_CLK32); tpci200 402 drivers/ipack/carriers/tpci200.c struct tpci200_board *tpci200 = check_slot(dev); tpci200 406 drivers/ipack/carriers/tpci200.c if (!tpci200) tpci200 409 drivers/ipack/carriers/tpci200.c addr = &tpci200->info->interface_regs->status; tpci200 416 drivers/ipack/carriers/tpci200.c struct tpci200_board *tpci200 = check_slot(dev); tpci200 420 drivers/ipack/carriers/tpci200.c if (!tpci200) tpci200 423 drivers/ipack/carriers/tpci200.c addr = &tpci200->info->interface_regs->status; tpci200 431 drivers/ipack/carriers/tpci200.c struct tpci200_board *tpci200 = check_slot(dev); tpci200 435 drivers/ipack/carriers/tpci200.c if (!tpci200) tpci200 438 drivers/ipack/carriers/tpci200.c addr = &tpci200->info->interface_regs->status; tpci200 445 drivers/ipack/carriers/tpci200.c static void tpci200_uninstall(struct tpci200_board *tpci200) tpci200 447 drivers/ipack/carriers/tpci200.c tpci200_unregister(tpci200); tpci200 448 drivers/ipack/carriers/tpci200.c kfree(tpci200->slots); tpci200 461 drivers/ipack/carriers/tpci200.c static int tpci200_install(struct tpci200_board *tpci200) tpci200 465 drivers/ipack/carriers/tpci200.c tpci200->slots = kcalloc(TPCI200_NB_SLOT, sizeof(struct tpci200_slot), tpci200 467 drivers/ipack/carriers/tpci200.c if (tpci200->slots == NULL) tpci200 470 drivers/ipack/carriers/tpci200.c res = tpci200_register(tpci200); tpci200 472 drivers/ipack/carriers/tpci200.c kfree(tpci200->slots); tpci200 473 drivers/ipack/carriers/tpci200.c tpci200->slots = NULL; tpci200 477 drivers/ipack/carriers/tpci200.c mutex_init(&tpci200->mutex); tpci200 486 drivers/ipack/carriers/tpci200.c static int tpci200_create_device(struct tpci200_board *tpci200, int i) tpci200 495 drivers/ipack/carriers/tpci200.c dev->bus = tpci200->info->ipack_bus; tpci200 500 drivers/ipack/carriers/tpci200.c tpci200->mod_mem[space] tpci200 522 drivers/ipack/carriers/tpci200.c struct tpci200_board *tpci200; tpci200 525 drivers/ipack/carriers/tpci200.c tpci200 = kzalloc(sizeof(struct tpci200_board), GFP_KERNEL); tpci200 526 drivers/ipack/carriers/tpci200.c if (!tpci200) tpci200 529 drivers/ipack/carriers/tpci200.c tpci200->info = kzalloc(sizeof(struct tpci200_infos), GFP_KERNEL); tpci200 530 drivers/ipack/carriers/tpci200.c if (!tpci200->info) { tpci200 545 drivers/ipack/carriers/tpci200.c tpci200->info->cfg_regs = ioremap_nocache( tpci200 548 drivers/ipack/carriers/tpci200.c if (!tpci200->info->cfg_regs) { tpci200 557 drivers/ipack/carriers/tpci200.c reg32 = ioread32(tpci200->info->cfg_regs + LAS1_DESC); tpci200 559 drivers/ipack/carriers/tpci200.c iowrite32(reg32, tpci200->info->cfg_regs + LAS1_DESC); tpci200 561 drivers/ipack/carriers/tpci200.c reg32 = ioread32(tpci200->info->cfg_regs + LAS2_DESC); tpci200 563 drivers/ipack/carriers/tpci200.c iowrite32(reg32, tpci200->info->cfg_regs + LAS2_DESC); tpci200 566 drivers/ipack/carriers/tpci200.c tpci200->info->pdev = pdev; tpci200 567 drivers/ipack/carriers/tpci200.c tpci200->info->id_table = (struct pci_device_id *)id; tpci200 570 drivers/ipack/carriers/tpci200.c ret = tpci200_install(tpci200); tpci200 578 drivers/ipack/carriers/tpci200.c tpci200->info->ipack_bus = ipack_bus_register(&pdev->dev, tpci200 582 drivers/ipack/carriers/tpci200.c if (!tpci200->info->ipack_bus) { tpci200 590 drivers/ipack/carriers/tpci200.c tpci200->number = tpci200->info->ipack_bus->bus_nr; tpci200 591 drivers/ipack/carriers/tpci200.c dev_set_drvdata(&pdev->dev, tpci200); tpci200 594 drivers/ipack/carriers/tpci200.c tpci200_create_device(tpci200, i); tpci200 598 drivers/ipack/carriers/tpci200.c tpci200_uninstall(tpci200); tpci200 600 drivers/ipack/carriers/tpci200.c iounmap(tpci200->info->cfg_regs); tpci200 605 drivers/ipack/carriers/tpci200.c kfree(tpci200->info); tpci200 607 drivers/ipack/carriers/tpci200.c kfree(tpci200); tpci200 611 drivers/ipack/carriers/tpci200.c static void __tpci200_pci_remove(struct tpci200_board *tpci200) tpci200 613 drivers/ipack/carriers/tpci200.c ipack_bus_unregister(tpci200->info->ipack_bus); tpci200 614 drivers/ipack/carriers/tpci200.c tpci200_uninstall(tpci200); tpci200 616 drivers/ipack/carriers/tpci200.c kfree(tpci200->info); tpci200 617 drivers/ipack/carriers/tpci200.c kfree(tpci200); tpci200 622 drivers/ipack/carriers/tpci200.c struct tpci200_board *tpci200 = pci_get_drvdata(dev); tpci200 624 drivers/ipack/carriers/tpci200.c __tpci200_pci_remove(tpci200);