/linux-4.1.27/drivers/pci/host/ |
H A D | pcie-designware.c | 109 static inline void dw_pcie_readl_rc(struct pcie_port *pp, u32 reg, u32 *val) dw_pcie_readl_rc() argument 111 if (pp->ops->readl_rc) dw_pcie_readl_rc() 112 pp->ops->readl_rc(pp, pp->dbi_base + reg, val); dw_pcie_readl_rc() 114 *val = readl(pp->dbi_base + reg); dw_pcie_readl_rc() 117 static inline void dw_pcie_writel_rc(struct pcie_port *pp, u32 val, u32 reg) dw_pcie_writel_rc() argument 119 if (pp->ops->writel_rc) dw_pcie_writel_rc() 120 pp->ops->writel_rc(pp, val, pp->dbi_base + reg); dw_pcie_writel_rc() 122 writel(val, pp->dbi_base + reg); dw_pcie_writel_rc() 125 static int dw_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, dw_pcie_rd_own_conf() argument 130 if (pp->ops->rd_own_conf) dw_pcie_rd_own_conf() 131 ret = pp->ops->rd_own_conf(pp, where, size, val); dw_pcie_rd_own_conf() 133 ret = dw_pcie_cfg_read(pp->dbi_base + (where & ~0x3), where, dw_pcie_rd_own_conf() 139 static int dw_pcie_wr_own_conf(struct pcie_port *pp, int where, int size, dw_pcie_wr_own_conf() argument 144 if (pp->ops->wr_own_conf) dw_pcie_wr_own_conf() 145 ret = pp->ops->wr_own_conf(pp, where, size, val); dw_pcie_wr_own_conf() 147 ret = dw_pcie_cfg_write(pp->dbi_base + (where & ~0x3), where, dw_pcie_wr_own_conf() 162 irqreturn_t dw_handle_msi_irq(struct pcie_port *pp) dw_handle_msi_irq() argument 169 dw_pcie_rd_own_conf(pp, PCIE_MSI_INTR0_STATUS + i * 12, 4, dw_handle_msi_irq() 175 irq = irq_find_mapping(pp->irq_domain, dw_handle_msi_irq() 177 dw_pcie_wr_own_conf(pp, dw_handle_msi_irq() 189 void dw_pcie_msi_init(struct pcie_port *pp) dw_pcie_msi_init() argument 191 pp->msi_data = __get_free_pages(GFP_KERNEL, 0); dw_pcie_msi_init() 194 dw_pcie_wr_own_conf(pp, PCIE_MSI_ADDR_LO, 4, dw_pcie_msi_init() 195 virt_to_phys((void *)pp->msi_data)); dw_pcie_msi_init() 196 dw_pcie_wr_own_conf(pp, PCIE_MSI_ADDR_HI, 4, 0); dw_pcie_msi_init() 199 static void dw_pcie_msi_clear_irq(struct pcie_port *pp, int irq) dw_pcie_msi_clear_irq() argument 205 dw_pcie_rd_own_conf(pp, PCIE_MSI_INTR0_ENABLE + res, 4, &val); dw_pcie_msi_clear_irq() 207 dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_ENABLE + res, 4, val); dw_pcie_msi_clear_irq() 210 static void clear_irq_range(struct pcie_port *pp, unsigned int irq_base, clear_irq_range() argument 218 if (pp->ops->msi_clear_irq) clear_irq_range() 219 pp->ops->msi_clear_irq(pp, pos + i); clear_irq_range() 221 dw_pcie_msi_clear_irq(pp, pos + i); clear_irq_range() 224 bitmap_release_region(pp->msi_irq_in_use, pos, order_base_2(nvec)); clear_irq_range() 227 static void dw_pcie_msi_set_irq(struct pcie_port *pp, int irq) dw_pcie_msi_set_irq() argument 233 dw_pcie_rd_own_conf(pp, PCIE_MSI_INTR0_ENABLE + res, 4, &val); dw_pcie_msi_set_irq() 235 dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_ENABLE + res, 4, val); dw_pcie_msi_set_irq() 241 struct pcie_port *pp = sys_to_pcie(desc->dev->bus->sysdata); assign_irq() local 243 pos0 = bitmap_find_free_region(pp->msi_irq_in_use, MAX_MSI_IRQS, assign_irq() 248 irq = irq_find_mapping(pp->irq_domain, pos0); assign_irq() 261 clear_irq_range(pp, irq, i, pos0); assign_irq() 265 if (pp->ops->msi_set_irq) assign_irq() 266 pp->ops->msi_set_irq(pp, pos0 + i); assign_irq() 268 dw_pcie_msi_set_irq(pp, pos0 + i); assign_irq() 284 struct pcie_port *pp = sys_to_pcie(pdev->bus->sysdata); dw_msi_setup_irq() local 293 if (pp->ops->get_msi_addr) dw_msi_setup_irq() 294 msg.address_lo = pp->ops->get_msi_addr(pp); dw_msi_setup_irq() 296 msg.address_lo = virt_to_phys((void *)pp->msi_data); dw_msi_setup_irq() 299 if (pp->ops->get_msi_data) dw_msi_setup_irq() 300 msg.data = pp->ops->get_msi_data(pp, pos); dw_msi_setup_irq() 313 struct pcie_port *pp = sys_to_pcie(msi->dev->bus->sysdata); dw_msi_teardown_irq() local 315 clear_irq_range(pp, irq, 1, data->hwirq); dw_msi_teardown_irq() 323 int dw_pcie_link_up(struct pcie_port *pp) dw_pcie_link_up() argument 325 if (pp->ops->link_up) dw_pcie_link_up() 326 return pp->ops->link_up(pp); dw_pcie_link_up() 345 int dw_pcie_host_init(struct pcie_port *pp) dw_pcie_host_init() argument 347 struct device_node *np = pp->dev->of_node; dw_pcie_host_init() 348 struct platform_device *pdev = to_platform_device(pp->dev); dw_pcie_host_init() 364 pp->cfg0_size = resource_size(cfg_res)/2; dw_pcie_host_init() 365 pp->cfg1_size = resource_size(cfg_res)/2; dw_pcie_host_init() 366 pp->cfg0_base = cfg_res->start; dw_pcie_host_init() 367 pp->cfg1_base = cfg_res->start + pp->cfg0_size; dw_pcie_host_init() 372 pp->cfg0_mod_base = of_read_number(addrp, ns); dw_pcie_host_init() 373 pp->cfg1_mod_base = pp->cfg0_mod_base + pp->cfg0_size; dw_pcie_host_init() 375 dev_err(pp->dev, "missing *config* reg space\n"); dw_pcie_host_init() 379 dev_err(pp->dev, "missing ranges property\n"); dw_pcie_host_init() 388 of_pci_range_to_resource(&range, np, &pp->io); dw_pcie_host_init() 389 pp->io.name = "I/O"; dw_pcie_host_init() 390 pp->io.start = max_t(resource_size_t, dw_pcie_host_init() 393 pp->io.end = min_t(resource_size_t, dw_pcie_host_init() 397 pp->io_size = resource_size(&pp->io); dw_pcie_host_init() 398 pp->io_bus_addr = range.pci_addr; dw_pcie_host_init() 399 pp->io_base = range.cpu_addr; dw_pcie_host_init() 402 pp->io_mod_base = of_read_number(parser.range - dw_pcie_host_init() 406 of_pci_range_to_resource(&range, np, &pp->mem); dw_pcie_host_init() 407 pp->mem.name = "MEM"; dw_pcie_host_init() 408 pp->mem_size = resource_size(&pp->mem); dw_pcie_host_init() 409 pp->mem_bus_addr = range.pci_addr; dw_pcie_host_init() 412 pp->mem_mod_base = of_read_number(parser.range - dw_pcie_host_init() 416 of_pci_range_to_resource(&range, np, &pp->cfg); dw_pcie_host_init() 417 pp->cfg0_size = resource_size(&pp->cfg)/2; dw_pcie_host_init() 418 pp->cfg1_size = resource_size(&pp->cfg)/2; dw_pcie_host_init() 419 pp->cfg0_base = pp->cfg.start; dw_pcie_host_init() 420 pp->cfg1_base = pp->cfg.start + pp->cfg0_size; dw_pcie_host_init() 423 pp->cfg0_mod_base = of_read_number(parser.range - dw_pcie_host_init() 425 pp->cfg1_mod_base = pp->cfg0_mod_base + dw_pcie_host_init() 426 pp->cfg0_size; dw_pcie_host_init() 430 ret = of_pci_parse_bus_range(np, &pp->busn); dw_pcie_host_init() 432 pp->busn.name = np->name; dw_pcie_host_init() 433 pp->busn.start = 0; dw_pcie_host_init() 434 pp->busn.end = 0xff; dw_pcie_host_init() 435 pp->busn.flags = IORESOURCE_BUS; dw_pcie_host_init() 436 dev_dbg(pp->dev, "failed to parse bus-range property: %d, using default %pR\n", dw_pcie_host_init() 437 ret, &pp->busn); dw_pcie_host_init() 440 if (!pp->dbi_base) { dw_pcie_host_init() 441 pp->dbi_base = devm_ioremap(pp->dev, pp->cfg.start, dw_pcie_host_init() 442 resource_size(&pp->cfg)); dw_pcie_host_init() 443 if (!pp->dbi_base) { dw_pcie_host_init() 444 dev_err(pp->dev, "error with ioremap\n"); dw_pcie_host_init() 449 pp->mem_base = pp->mem.start; dw_pcie_host_init() 451 if (!pp->va_cfg0_base) { dw_pcie_host_init() 452 pp->va_cfg0_base = devm_ioremap(pp->dev, pp->cfg0_base, dw_pcie_host_init() 453 pp->cfg0_size); dw_pcie_host_init() 454 if (!pp->va_cfg0_base) { dw_pcie_host_init() 455 dev_err(pp->dev, "error with ioremap in function\n"); dw_pcie_host_init() 460 if (!pp->va_cfg1_base) { dw_pcie_host_init() 461 pp->va_cfg1_base = devm_ioremap(pp->dev, pp->cfg1_base, dw_pcie_host_init() 462 pp->cfg1_size); dw_pcie_host_init() 463 if (!pp->va_cfg1_base) { dw_pcie_host_init() 464 dev_err(pp->dev, "error with ioremap\n"); dw_pcie_host_init() 469 if (of_property_read_u32(np, "num-lanes", &pp->lanes)) { dw_pcie_host_init() 470 dev_err(pp->dev, "Failed to parse the number of lanes\n"); dw_pcie_host_init() 475 if (!pp->ops->msi_host_init) { dw_pcie_host_init() 476 pp->irq_domain = irq_domain_add_linear(pp->dev->of_node, dw_pcie_host_init() 479 if (!pp->irq_domain) { dw_pcie_host_init() 480 dev_err(pp->dev, "irq domain init failed\n"); dw_pcie_host_init() 485 irq_create_mapping(pp->irq_domain, i); dw_pcie_host_init() 487 ret = pp->ops->msi_host_init(pp, &dw_pcie_msi_chip); dw_pcie_host_init() 493 if (pp->ops->host_init) dw_pcie_host_init() 494 pp->ops->host_init(pp); dw_pcie_host_init() 496 dw_pcie_wr_own_conf(pp, PCI_BASE_ADDRESS_0, 4, 0); dw_pcie_host_init() 499 dw_pcie_wr_own_conf(pp, PCI_CLASS_DEVICE, 2, PCI_CLASS_BRIDGE_PCI); dw_pcie_host_init() 501 dw_pcie_rd_own_conf(pp, PCIE_LINK_WIDTH_SPEED_CONTROL, 4, &val); dw_pcie_host_init() 503 dw_pcie_wr_own_conf(pp, PCIE_LINK_WIDTH_SPEED_CONTROL, 4, val); dw_pcie_host_init() 506 dw_pcie_msi_chip.dev = pp->dev; dw_pcie_host_init() 511 dw_pci.private_data = (void **)&pp; dw_pcie_host_init() 513 pci_common_init_dev(pp->dev, &dw_pci); dw_pcie_host_init() 518 static void dw_pcie_prog_viewport_cfg0(struct pcie_port *pp, u32 busdev) dw_pcie_prog_viewport_cfg0() argument 521 dw_pcie_writel_rc(pp, PCIE_ATU_REGION_OUTBOUND | PCIE_ATU_REGION_INDEX0, dw_pcie_prog_viewport_cfg0() 523 dw_pcie_writel_rc(pp, pp->cfg0_mod_base, PCIE_ATU_LOWER_BASE); dw_pcie_prog_viewport_cfg0() 524 dw_pcie_writel_rc(pp, (pp->cfg0_mod_base >> 32), PCIE_ATU_UPPER_BASE); dw_pcie_prog_viewport_cfg0() 525 dw_pcie_writel_rc(pp, pp->cfg0_mod_base + pp->cfg0_size - 1, dw_pcie_prog_viewport_cfg0() 527 dw_pcie_writel_rc(pp, busdev, PCIE_ATU_LOWER_TARGET); dw_pcie_prog_viewport_cfg0() 528 dw_pcie_writel_rc(pp, 0, PCIE_ATU_UPPER_TARGET); dw_pcie_prog_viewport_cfg0() 529 dw_pcie_writel_rc(pp, PCIE_ATU_TYPE_CFG0, PCIE_ATU_CR1); dw_pcie_prog_viewport_cfg0() 530 dw_pcie_writel_rc(pp, PCIE_ATU_ENABLE, PCIE_ATU_CR2); dw_pcie_prog_viewport_cfg0() 533 static void dw_pcie_prog_viewport_cfg1(struct pcie_port *pp, u32 busdev) dw_pcie_prog_viewport_cfg1() argument 536 dw_pcie_writel_rc(pp, PCIE_ATU_REGION_OUTBOUND | PCIE_ATU_REGION_INDEX1, dw_pcie_prog_viewport_cfg1() 538 dw_pcie_writel_rc(pp, PCIE_ATU_TYPE_CFG1, PCIE_ATU_CR1); dw_pcie_prog_viewport_cfg1() 539 dw_pcie_writel_rc(pp, pp->cfg1_mod_base, PCIE_ATU_LOWER_BASE); dw_pcie_prog_viewport_cfg1() 540 dw_pcie_writel_rc(pp, (pp->cfg1_mod_base >> 32), PCIE_ATU_UPPER_BASE); dw_pcie_prog_viewport_cfg1() 541 dw_pcie_writel_rc(pp, pp->cfg1_mod_base + pp->cfg1_size - 1, dw_pcie_prog_viewport_cfg1() 543 dw_pcie_writel_rc(pp, busdev, PCIE_ATU_LOWER_TARGET); dw_pcie_prog_viewport_cfg1() 544 dw_pcie_writel_rc(pp, 0, PCIE_ATU_UPPER_TARGET); dw_pcie_prog_viewport_cfg1() 545 dw_pcie_writel_rc(pp, PCIE_ATU_ENABLE, PCIE_ATU_CR2); dw_pcie_prog_viewport_cfg1() 548 static void dw_pcie_prog_viewport_mem_outbound(struct pcie_port *pp) dw_pcie_prog_viewport_mem_outbound() argument 551 dw_pcie_writel_rc(pp, PCIE_ATU_REGION_OUTBOUND | PCIE_ATU_REGION_INDEX0, dw_pcie_prog_viewport_mem_outbound() 553 dw_pcie_writel_rc(pp, PCIE_ATU_TYPE_MEM, PCIE_ATU_CR1); dw_pcie_prog_viewport_mem_outbound() 554 dw_pcie_writel_rc(pp, pp->mem_mod_base, PCIE_ATU_LOWER_BASE); dw_pcie_prog_viewport_mem_outbound() 555 dw_pcie_writel_rc(pp, (pp->mem_mod_base >> 32), PCIE_ATU_UPPER_BASE); dw_pcie_prog_viewport_mem_outbound() 556 dw_pcie_writel_rc(pp, pp->mem_mod_base + pp->mem_size - 1, dw_pcie_prog_viewport_mem_outbound() 558 dw_pcie_writel_rc(pp, pp->mem_bus_addr, PCIE_ATU_LOWER_TARGET); dw_pcie_prog_viewport_mem_outbound() 559 dw_pcie_writel_rc(pp, upper_32_bits(pp->mem_bus_addr), dw_pcie_prog_viewport_mem_outbound() 561 dw_pcie_writel_rc(pp, PCIE_ATU_ENABLE, PCIE_ATU_CR2); dw_pcie_prog_viewport_mem_outbound() 564 static void dw_pcie_prog_viewport_io_outbound(struct pcie_port *pp) dw_pcie_prog_viewport_io_outbound() argument 567 dw_pcie_writel_rc(pp, PCIE_ATU_REGION_OUTBOUND | PCIE_ATU_REGION_INDEX1, dw_pcie_prog_viewport_io_outbound() 569 dw_pcie_writel_rc(pp, PCIE_ATU_TYPE_IO, PCIE_ATU_CR1); dw_pcie_prog_viewport_io_outbound() 570 dw_pcie_writel_rc(pp, pp->io_mod_base, PCIE_ATU_LOWER_BASE); dw_pcie_prog_viewport_io_outbound() 571 dw_pcie_writel_rc(pp, (pp->io_mod_base >> 32), PCIE_ATU_UPPER_BASE); dw_pcie_prog_viewport_io_outbound() 572 dw_pcie_writel_rc(pp, pp->io_mod_base + pp->io_size - 1, dw_pcie_prog_viewport_io_outbound() 574 dw_pcie_writel_rc(pp, pp->io_bus_addr, PCIE_ATU_LOWER_TARGET); dw_pcie_prog_viewport_io_outbound() 575 dw_pcie_writel_rc(pp, upper_32_bits(pp->io_bus_addr), dw_pcie_prog_viewport_io_outbound() 577 dw_pcie_writel_rc(pp, PCIE_ATU_ENABLE, PCIE_ATU_CR2); dw_pcie_prog_viewport_io_outbound() 580 static int dw_pcie_rd_other_conf(struct pcie_port *pp, struct pci_bus *bus, dw_pcie_rd_other_conf() argument 590 if (bus->parent->number == pp->root_bus_nr) { dw_pcie_rd_other_conf() 591 dw_pcie_prog_viewport_cfg0(pp, busdev); dw_pcie_rd_other_conf() 592 ret = dw_pcie_cfg_read(pp->va_cfg0_base + address, where, size, dw_pcie_rd_other_conf() 594 dw_pcie_prog_viewport_mem_outbound(pp); dw_pcie_rd_other_conf() 596 dw_pcie_prog_viewport_cfg1(pp, busdev); dw_pcie_rd_other_conf() 597 ret = dw_pcie_cfg_read(pp->va_cfg1_base + address, where, size, dw_pcie_rd_other_conf() 599 dw_pcie_prog_viewport_io_outbound(pp); dw_pcie_rd_other_conf() 605 static int dw_pcie_wr_other_conf(struct pcie_port *pp, struct pci_bus *bus, dw_pcie_wr_other_conf() argument 615 if (bus->parent->number == pp->root_bus_nr) { dw_pcie_wr_other_conf() 616 dw_pcie_prog_viewport_cfg0(pp, busdev); dw_pcie_wr_other_conf() 617 ret = dw_pcie_cfg_write(pp->va_cfg0_base + address, where, size, dw_pcie_wr_other_conf() 619 dw_pcie_prog_viewport_mem_outbound(pp); dw_pcie_wr_other_conf() 621 dw_pcie_prog_viewport_cfg1(pp, busdev); dw_pcie_wr_other_conf() 622 ret = dw_pcie_cfg_write(pp->va_cfg1_base + address, where, size, dw_pcie_wr_other_conf() 624 dw_pcie_prog_viewport_io_outbound(pp); dw_pcie_wr_other_conf() 630 static int dw_pcie_valid_config(struct pcie_port *pp, dw_pcie_valid_config() argument 634 if (bus->number != pp->root_bus_nr) { dw_pcie_valid_config() 635 if (!dw_pcie_link_up(pp)) dw_pcie_valid_config() 640 if (bus->number == pp->root_bus_nr && dev > 0) dw_pcie_valid_config() 647 if (bus->primary == pp->root_bus_nr && dev > 0) dw_pcie_valid_config() 656 struct pcie_port *pp = sys_to_pcie(bus->sysdata); dw_pcie_rd_conf() local 659 if (dw_pcie_valid_config(pp, bus, PCI_SLOT(devfn)) == 0) { dw_pcie_rd_conf() 664 if (bus->number != pp->root_bus_nr) dw_pcie_rd_conf() 665 if (pp->ops->rd_other_conf) dw_pcie_rd_conf() 666 ret = pp->ops->rd_other_conf(pp, bus, devfn, dw_pcie_rd_conf() 669 ret = dw_pcie_rd_other_conf(pp, bus, devfn, dw_pcie_rd_conf() 672 ret = dw_pcie_rd_own_conf(pp, where, size, val); dw_pcie_rd_conf() 680 struct pcie_port *pp = sys_to_pcie(bus->sysdata); dw_pcie_wr_conf() local 683 if (dw_pcie_valid_config(pp, bus, PCI_SLOT(devfn)) == 0) dw_pcie_wr_conf() 686 if (bus->number != pp->root_bus_nr) dw_pcie_wr_conf() 687 if (pp->ops->wr_other_conf) dw_pcie_wr_conf() 688 ret = pp->ops->wr_other_conf(pp, bus, devfn, dw_pcie_wr_conf() 691 ret = dw_pcie_wr_other_conf(pp, bus, devfn, dw_pcie_wr_conf() 694 ret = dw_pcie_wr_own_conf(pp, where, size, val); dw_pcie_wr_conf() 706 struct pcie_port *pp; dw_pcie_setup() local 708 pp = sys_to_pcie(sys); dw_pcie_setup() 710 if (global_io_offset < SZ_1M && pp->io_size > 0) { dw_pcie_setup() 711 sys->io_offset = global_io_offset - pp->io_bus_addr; dw_pcie_setup() 712 pci_ioremap_io(global_io_offset, pp->io_base); dw_pcie_setup() 714 pci_add_resource_offset(&sys->resources, &pp->io, dw_pcie_setup() 718 sys->mem_offset = pp->mem.start - pp->mem_bus_addr; dw_pcie_setup() 719 pci_add_resource_offset(&sys->resources, &pp->mem, sys->mem_offset); dw_pcie_setup() 720 pci_add_resource(&sys->resources, &pp->busn); dw_pcie_setup() 728 struct pcie_port *pp = sys_to_pcie(sys); dw_pcie_scan_bus() local 730 pp->root_bus_nr = sys->busnr; dw_pcie_scan_bus() 731 bus = pci_create_root_bus(pp->dev, sys->busnr, dw_pcie_scan_bus() 738 if (bus && pp->ops->scan_bus) dw_pcie_scan_bus() 739 pp->ops->scan_bus(pp); dw_pcie_scan_bus() 746 struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata); dw_pcie_map_irq() local 751 irq = pp->irq; dw_pcie_map_irq() 762 void dw_pcie_setup_rc(struct pcie_port *pp) dw_pcie_setup_rc() argument 769 dw_pcie_readl_rc(pp, PCIE_PORT_LINK_CONTROL, &val); dw_pcie_setup_rc() 771 switch (pp->lanes) { dw_pcie_setup_rc() 782 dw_pcie_writel_rc(pp, val, PCIE_PORT_LINK_CONTROL); dw_pcie_setup_rc() 785 dw_pcie_readl_rc(pp, PCIE_LINK_WIDTH_SPEED_CONTROL, &val); dw_pcie_setup_rc() 787 switch (pp->lanes) { dw_pcie_setup_rc() 798 dw_pcie_writel_rc(pp, val, PCIE_LINK_WIDTH_SPEED_CONTROL); dw_pcie_setup_rc() 801 dw_pcie_writel_rc(pp, 0x00000004, PCI_BASE_ADDRESS_0); dw_pcie_setup_rc() 802 dw_pcie_writel_rc(pp, 0x00000000, PCI_BASE_ADDRESS_1); dw_pcie_setup_rc() 805 dw_pcie_readl_rc(pp, PCI_INTERRUPT_LINE, &val); dw_pcie_setup_rc() 808 dw_pcie_writel_rc(pp, val, PCI_INTERRUPT_LINE); dw_pcie_setup_rc() 811 dw_pcie_readl_rc(pp, PCI_PRIMARY_BUS, &val); dw_pcie_setup_rc() 814 dw_pcie_writel_rc(pp, val, PCI_PRIMARY_BUS); dw_pcie_setup_rc() 817 membase = ((u32)pp->mem_base & 0xfff00000) >> 16; dw_pcie_setup_rc() 818 memlimit = (pp->mem_size + (u32)pp->mem_base) & 0xfff00000; dw_pcie_setup_rc() 820 dw_pcie_writel_rc(pp, val, PCI_MEMORY_BASE); dw_pcie_setup_rc() 823 dw_pcie_readl_rc(pp, PCI_COMMAND, &val); dw_pcie_setup_rc() 827 dw_pcie_writel_rc(pp, val, PCI_COMMAND); dw_pcie_setup_rc()
|
H A D | pci-exynos.c | 29 #define to_exynos_pcie(x) container_of(x, struct exynos_pcie, pp) 38 struct pcie_port pp; member in struct:exynos_pcie 135 static void exynos_pcie_sideband_dbi_w_mode(struct pcie_port *pp, bool on) exynos_pcie_sideband_dbi_w_mode() argument 138 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_sideband_dbi_w_mode() 151 static void exynos_pcie_sideband_dbi_r_mode(struct pcie_port *pp, bool on) exynos_pcie_sideband_dbi_r_mode() argument 154 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_sideband_dbi_r_mode() 167 static void exynos_pcie_assert_core_reset(struct pcie_port *pp) exynos_pcie_assert_core_reset() argument 170 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_assert_core_reset() 180 static void exynos_pcie_deassert_core_reset(struct pcie_port *pp) exynos_pcie_deassert_core_reset() argument 183 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_deassert_core_reset() 196 static void exynos_pcie_assert_phy_reset(struct pcie_port *pp) exynos_pcie_assert_phy_reset() argument 198 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_assert_phy_reset() 204 static void exynos_pcie_deassert_phy_reset(struct pcie_port *pp) exynos_pcie_deassert_phy_reset() argument 206 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_deassert_phy_reset() 216 static void exynos_pcie_power_on_phy(struct pcie_port *pp) exynos_pcie_power_on_phy() argument 219 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_power_on_phy() 242 static void exynos_pcie_power_off_phy(struct pcie_port *pp) exynos_pcie_power_off_phy() argument 245 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_power_off_phy() 268 static void exynos_pcie_init_phy(struct pcie_port *pp) exynos_pcie_init_phy() argument 270 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_init_phy() 308 static void exynos_pcie_assert_reset(struct pcie_port *pp) exynos_pcie_assert_reset() argument 310 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_assert_reset() 313 devm_gpio_request_one(pp->dev, exynos_pcie->reset_gpio, exynos_pcie_assert_reset() 317 static int exynos_pcie_establish_link(struct pcie_port *pp) exynos_pcie_establish_link() argument 321 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_establish_link() 323 if (dw_pcie_link_up(pp)) { exynos_pcie_establish_link() 324 dev_err(pp->dev, "Link already up\n"); exynos_pcie_establish_link() 329 exynos_pcie_assert_core_reset(pp); exynos_pcie_establish_link() 330 exynos_pcie_assert_phy_reset(pp); exynos_pcie_establish_link() 333 exynos_pcie_deassert_phy_reset(pp); exynos_pcie_establish_link() 336 exynos_pcie_power_on_phy(pp); exynos_pcie_establish_link() 339 exynos_pcie_init_phy(pp); exynos_pcie_establish_link() 347 exynos_pcie_deassert_core_reset(pp); exynos_pcie_establish_link() 350 dw_pcie_setup_rc(pp); exynos_pcie_establish_link() 353 exynos_pcie_assert_reset(pp); exynos_pcie_establish_link() 360 while (!dw_pcie_link_up(pp)) { exynos_pcie_establish_link() 368 dev_info(pp->dev, "PLL Locked: 0x%x\n", val); exynos_pcie_establish_link() 371 exynos_pcie_power_off_phy(pp); exynos_pcie_establish_link() 373 dev_err(pp->dev, "PCIe Link Fail\n"); exynos_pcie_establish_link() 378 dev_info(pp->dev, "Link up\n"); exynos_pcie_establish_link() 383 static void exynos_pcie_clear_irq_pulse(struct pcie_port *pp) exynos_pcie_clear_irq_pulse() argument 386 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_clear_irq_pulse() 392 static void exynos_pcie_enable_irq_pulse(struct pcie_port *pp) exynos_pcie_enable_irq_pulse() argument 395 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_enable_irq_pulse() 405 struct pcie_port *pp = arg; exynos_pcie_irq_handler() local 407 exynos_pcie_clear_irq_pulse(pp); exynos_pcie_irq_handler() 413 struct pcie_port *pp = arg; exynos_pcie_msi_irq_handler() local 415 return dw_handle_msi_irq(pp); exynos_pcie_msi_irq_handler() 418 static void exynos_pcie_msi_init(struct pcie_port *pp) exynos_pcie_msi_init() argument 421 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_msi_init() 423 dw_pcie_msi_init(pp); exynos_pcie_msi_init() 431 static void exynos_pcie_enable_interrupts(struct pcie_port *pp) exynos_pcie_enable_interrupts() argument 433 exynos_pcie_enable_irq_pulse(pp); exynos_pcie_enable_interrupts() 436 exynos_pcie_msi_init(pp); exynos_pcie_enable_interrupts() 439 static inline void exynos_pcie_readl_rc(struct pcie_port *pp, exynos_pcie_readl_rc() argument 442 exynos_pcie_sideband_dbi_r_mode(pp, true); exynos_pcie_readl_rc() 444 exynos_pcie_sideband_dbi_r_mode(pp, false); exynos_pcie_readl_rc() 447 static inline void exynos_pcie_writel_rc(struct pcie_port *pp, exynos_pcie_writel_rc() argument 450 exynos_pcie_sideband_dbi_w_mode(pp, true); exynos_pcie_writel_rc() 452 exynos_pcie_sideband_dbi_w_mode(pp, false); exynos_pcie_writel_rc() 455 static int exynos_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, exynos_pcie_rd_own_conf() argument 460 exynos_pcie_sideband_dbi_r_mode(pp, true); exynos_pcie_rd_own_conf() 461 ret = dw_pcie_cfg_read(pp->dbi_base + (where & ~0x3), where, size, val); exynos_pcie_rd_own_conf() 462 exynos_pcie_sideband_dbi_r_mode(pp, false); exynos_pcie_rd_own_conf() 466 static int exynos_pcie_wr_own_conf(struct pcie_port *pp, int where, int size, exynos_pcie_wr_own_conf() argument 471 exynos_pcie_sideband_dbi_w_mode(pp, true); exynos_pcie_wr_own_conf() 472 ret = dw_pcie_cfg_write(pp->dbi_base + (where & ~0x3), exynos_pcie_wr_own_conf() 474 exynos_pcie_sideband_dbi_w_mode(pp, false); exynos_pcie_wr_own_conf() 478 static int exynos_pcie_link_up(struct pcie_port *pp) exynos_pcie_link_up() argument 480 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_link_up() 489 static void exynos_pcie_host_init(struct pcie_port *pp) exynos_pcie_host_init() argument 491 exynos_pcie_establish_link(pp); exynos_pcie_host_init() 492 exynos_pcie_enable_interrupts(pp); exynos_pcie_host_init() 504 static int __init exynos_add_pcie_port(struct pcie_port *pp, exynos_add_pcie_port() argument 509 pp->irq = platform_get_irq(pdev, 1); exynos_add_pcie_port() 510 if (!pp->irq) { exynos_add_pcie_port() 514 ret = devm_request_irq(&pdev->dev, pp->irq, exynos_pcie_irq_handler, exynos_add_pcie_port() 515 IRQF_SHARED, "exynos-pcie", pp); exynos_add_pcie_port() 522 pp->msi_irq = platform_get_irq(pdev, 0); exynos_add_pcie_port() 523 if (!pp->msi_irq) { exynos_add_pcie_port() 528 ret = devm_request_irq(&pdev->dev, pp->msi_irq, exynos_add_pcie_port() 531 "exynos-pcie", pp); exynos_add_pcie_port() 538 pp->root_bus_nr = -1; exynos_add_pcie_port() 539 pp->ops = &exynos_pcie_host_ops; exynos_add_pcie_port() 541 ret = dw_pcie_host_init(pp); exynos_add_pcie_port() 553 struct pcie_port *pp; exynos_pcie_probe() local 565 pp = &exynos_pcie->pp; exynos_pcie_probe() 567 pp->dev = &pdev->dev; exynos_pcie_probe() 611 ret = exynos_add_pcie_port(pp, pdev); exynos_pcie_probe()
|
H A D | pcie-spear13xx.c | 32 struct pcie_port pp; member in struct:spear13xx_pcie 144 #define to_spear13xx_pcie(x) container_of(x, struct spear13xx_pcie, pp) 146 static int spear13xx_pcie_establish_link(struct pcie_port *pp) spear13xx_pcie_establish_link() argument 150 struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pp); spear13xx_pcie_establish_link() 154 if (dw_pcie_link_up(pp)) { spear13xx_pcie_establish_link() 155 dev_err(pp->dev, "link already up\n"); spear13xx_pcie_establish_link() 159 dw_pcie_setup_rc(pp); spear13xx_pcie_establish_link() 166 dw_pcie_cfg_read(pp->dbi_base, exp_cap_off + PCI_EXP_DEVCTL, 4, &val); spear13xx_pcie_establish_link() 168 dw_pcie_cfg_write(pp->dbi_base, exp_cap_off + PCI_EXP_DEVCTL, 4, val); spear13xx_pcie_establish_link() 170 dw_pcie_cfg_write(pp->dbi_base, PCI_VENDOR_ID, 2, 0x104A); spear13xx_pcie_establish_link() 171 dw_pcie_cfg_write(pp->dbi_base, PCI_DEVICE_ID, 2, 0xCD80); spear13xx_pcie_establish_link() 178 dw_pcie_cfg_read(pp->dbi_base, exp_cap_off + PCI_EXP_LNKCAP, 4, spear13xx_pcie_establish_link() 183 dw_pcie_cfg_write(pp->dbi_base, exp_cap_off + spear13xx_pcie_establish_link() 187 dw_pcie_cfg_read(pp->dbi_base, exp_cap_off + PCI_EXP_LNKCTL2, 4, spear13xx_pcie_establish_link() 192 dw_pcie_cfg_write(pp->dbi_base, exp_cap_off + spear13xx_pcie_establish_link() 204 while (!dw_pcie_link_up(pp)) { spear13xx_pcie_establish_link() 208 dev_err(pp->dev, "link Fail\n"); spear13xx_pcie_establish_link() 212 dev_info(pp->dev, "link up\n"); spear13xx_pcie_establish_link() 219 struct pcie_port *pp = arg; spear13xx_pcie_irq_handler() local 220 struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pp); spear13xx_pcie_irq_handler() 229 dw_handle_msi_irq(pp); spear13xx_pcie_irq_handler() 237 static void spear13xx_pcie_enable_interrupts(struct pcie_port *pp) spear13xx_pcie_enable_interrupts() argument 239 struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pp); spear13xx_pcie_enable_interrupts() 244 dw_pcie_msi_init(pp); spear13xx_pcie_enable_interrupts() 250 static int spear13xx_pcie_link_up(struct pcie_port *pp) spear13xx_pcie_link_up() argument 252 struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pp); spear13xx_pcie_link_up() 261 static void spear13xx_pcie_host_init(struct pcie_port *pp) spear13xx_pcie_host_init() argument 263 spear13xx_pcie_establish_link(pp); spear13xx_pcie_host_init() 264 spear13xx_pcie_enable_interrupts(pp); spear13xx_pcie_host_init() 272 static int spear13xx_add_pcie_port(struct pcie_port *pp, spear13xx_add_pcie_port() argument 278 pp->irq = platform_get_irq(pdev, 0); spear13xx_add_pcie_port() 279 if (!pp->irq) { spear13xx_add_pcie_port() 283 ret = devm_request_irq(dev, pp->irq, spear13xx_pcie_irq_handler, spear13xx_add_pcie_port() 285 "spear1340-pcie", pp); spear13xx_add_pcie_port() 287 dev_err(dev, "failed to request irq %d\n", pp->irq); spear13xx_add_pcie_port() 291 pp->root_bus_nr = -1; spear13xx_add_pcie_port() 292 pp->ops = &spear13xx_pcie_host_ops; spear13xx_add_pcie_port() 294 ret = dw_pcie_host_init(pp); spear13xx_add_pcie_port() 306 struct pcie_port *pp; spear13xx_pcie_probe() local 339 pp = &spear13xx_pcie->pp; spear13xx_pcie_probe() 341 pp->dev = dev; spear13xx_pcie_probe() 344 pp->dbi_base = devm_ioremap_resource(dev, dbi_base); spear13xx_pcie_probe() 345 if (IS_ERR(pp->dbi_base)) { spear13xx_pcie_probe() 347 ret = PTR_ERR(pp->dbi_base); spear13xx_pcie_probe() 350 spear13xx_pcie->app_base = pp->dbi_base + 0x2000; spear13xx_pcie_probe() 355 ret = spear13xx_add_pcie_port(pp, pdev); spear13xx_pcie_probe()
|
H A D | pcie-designware.h | 59 void (*readl_rc)(struct pcie_port *pp, 61 void (*writel_rc)(struct pcie_port *pp, 63 int (*rd_own_conf)(struct pcie_port *pp, int where, int size, u32 *val); 64 int (*wr_own_conf)(struct pcie_port *pp, int where, int size, u32 val); 65 int (*rd_other_conf)(struct pcie_port *pp, struct pci_bus *bus, 67 int (*wr_other_conf)(struct pcie_port *pp, struct pci_bus *bus, 69 int (*link_up)(struct pcie_port *pp); 70 void (*host_init)(struct pcie_port *pp); 71 void (*msi_set_irq)(struct pcie_port *pp, int irq); 72 void (*msi_clear_irq)(struct pcie_port *pp, int irq); 73 u32 (*get_msi_addr)(struct pcie_port *pp); 74 u32 (*get_msi_data)(struct pcie_port *pp, int pos); 75 void (*scan_bus)(struct pcie_port *pp); 76 int (*msi_host_init)(struct pcie_port *pp, struct msi_controller *chip); 81 irqreturn_t dw_handle_msi_irq(struct pcie_port *pp); 82 void dw_pcie_msi_init(struct pcie_port *pp); 83 int dw_pcie_link_up(struct pcie_port *pp); 84 void dw_pcie_setup_rc(struct pcie_port *pp); 85 int dw_pcie_host_init(struct pcie_port *pp);
|
H A D | pci-imx6.c | 32 #define to_imx6_pcie(x) container_of(x, struct imx6_pcie, pp) 39 struct pcie_port pp; member in struct:imx6_pcie 217 static int imx6_pcie_assert_core_reset(struct pcie_port *pp) imx6_pcie_assert_core_reset() argument 219 struct imx6_pcie *imx6_pcie = to_imx6_pcie(pp); imx6_pcie_assert_core_reset() 238 val = readl(pp->dbi_base + PCIE_PL_PFLR); imx6_pcie_assert_core_reset() 241 writel(val, pp->dbi_base + PCIE_PL_PFLR); imx6_pcie_assert_core_reset() 255 static int imx6_pcie_deassert_core_reset(struct pcie_port *pp) imx6_pcie_deassert_core_reset() argument 257 struct imx6_pcie *imx6_pcie = to_imx6_pcie(pp); imx6_pcie_deassert_core_reset() 262 dev_err(pp->dev, "unable to enable pcie_phy clock\n"); imx6_pcie_deassert_core_reset() 268 dev_err(pp->dev, "unable to enable pcie_bus clock\n"); imx6_pcie_deassert_core_reset() 274 dev_err(pp->dev, "unable to enable pcie clock\n"); imx6_pcie_deassert_core_reset() 311 static void imx6_pcie_init_phy(struct pcie_port *pp) imx6_pcie_init_phy() argument 313 struct imx6_pcie *imx6_pcie = to_imx6_pcie(pp); imx6_pcie_init_phy() 336 static int imx6_pcie_wait_for_link(struct pcie_port *pp) imx6_pcie_wait_for_link() argument 340 while (!dw_pcie_link_up(pp)) { imx6_pcie_wait_for_link() 345 dev_err(pp->dev, "phy link never came up\n"); imx6_pcie_wait_for_link() 346 dev_dbg(pp->dev, "DEBUG_R0: 0x%08x, DEBUG_R1: 0x%08x\n", imx6_pcie_wait_for_link() 347 readl(pp->dbi_base + PCIE_PHY_DEBUG_R0), imx6_pcie_wait_for_link() 348 readl(pp->dbi_base + PCIE_PHY_DEBUG_R1)); imx6_pcie_wait_for_link() 357 struct pcie_port *pp = arg; imx6_pcie_msi_handler() local 359 return dw_handle_msi_irq(pp); imx6_pcie_msi_handler() 362 static int imx6_pcie_start_link(struct pcie_port *pp) imx6_pcie_start_link() argument 364 struct imx6_pcie *imx6_pcie = to_imx6_pcie(pp); imx6_pcie_start_link() 373 tmp = readl(pp->dbi_base + PCIE_RC_LCR); imx6_pcie_start_link() 376 writel(tmp, pp->dbi_base + PCIE_RC_LCR); imx6_pcie_start_link() 382 ret = imx6_pcie_wait_for_link(pp); imx6_pcie_start_link() 387 tmp = readl(pp->dbi_base + PCIE_RC_LCR); imx6_pcie_start_link() 390 writel(tmp, pp->dbi_base + PCIE_RC_LCR); imx6_pcie_start_link() 396 tmp = readl(pp->dbi_base + PCIE_LINK_WIDTH_SPEED_CONTROL); imx6_pcie_start_link() 398 writel(tmp, pp->dbi_base + PCIE_LINK_WIDTH_SPEED_CONTROL); imx6_pcie_start_link() 402 tmp = readl(pp->dbi_base + PCIE_LINK_WIDTH_SPEED_CONTROL); imx6_pcie_start_link() 411 ret = imx6_pcie_wait_for_link(pp); imx6_pcie_start_link() 416 dev_err(pp->dev, "Failed to bring link up!\n"); imx6_pcie_start_link() 418 tmp = readl(pp->dbi_base + 0x80); imx6_pcie_start_link() 419 dev_dbg(pp->dev, "Link up, Gen=%i\n", (tmp >> 16) & 0xf); imx6_pcie_start_link() 425 static void imx6_pcie_host_init(struct pcie_port *pp) imx6_pcie_host_init() argument 427 imx6_pcie_assert_core_reset(pp); imx6_pcie_host_init() 429 imx6_pcie_init_phy(pp); imx6_pcie_host_init() 431 imx6_pcie_deassert_core_reset(pp); imx6_pcie_host_init() 433 dw_pcie_setup_rc(pp); imx6_pcie_host_init() 435 imx6_pcie_start_link(pp); imx6_pcie_host_init() 438 dw_pcie_msi_init(pp); imx6_pcie_host_init() 441 static void imx6_pcie_reset_phy(struct pcie_port *pp) imx6_pcie_reset_phy() argument 445 pcie_phy_read(pp->dbi_base, PHY_RX_OVRD_IN_LO, &temp); imx6_pcie_reset_phy() 448 pcie_phy_write(pp->dbi_base, PHY_RX_OVRD_IN_LO, temp); imx6_pcie_reset_phy() 452 pcie_phy_read(pp->dbi_base, PHY_RX_OVRD_IN_LO, &temp); imx6_pcie_reset_phy() 455 pcie_phy_write(pp->dbi_base, PHY_RX_OVRD_IN_LO, temp); imx6_pcie_reset_phy() 458 static int imx6_pcie_link_up(struct pcie_port *pp) imx6_pcie_link_up() argument 480 rc = readl(pp->dbi_base + PCIE_PHY_DEBUG_R1); imx6_pcie_link_up() 487 dev_dbg(pp->dev, "Link is up, but still in training\n"); imx6_pcie_link_up() 501 pcie_phy_read(pp->dbi_base, PCIE_PHY_RX_ASIC_OUT, &rx_valid); imx6_pcie_link_up() 502 debug_r0 = readl(pp->dbi_base + PCIE_PHY_DEBUG_R0); imx6_pcie_link_up() 510 dev_err(pp->dev, "transition to gen2 is stuck, reset PHY!\n"); imx6_pcie_link_up() 511 dev_dbg(pp->dev, "debug_r0=%08x debug_r1=%08x\n", debug_r0, rc); imx6_pcie_link_up() 513 imx6_pcie_reset_phy(pp); imx6_pcie_link_up() 523 static int __init imx6_add_pcie_port(struct pcie_port *pp, imx6_add_pcie_port() argument 529 pp->msi_irq = platform_get_irq_byname(pdev, "msi"); imx6_add_pcie_port() 530 if (pp->msi_irq <= 0) { imx6_add_pcie_port() 535 ret = devm_request_irq(&pdev->dev, pp->msi_irq, imx6_add_pcie_port() 538 "mx6-pcie-msi", pp); imx6_add_pcie_port() 545 pp->root_bus_nr = -1; imx6_add_pcie_port() 546 pp->ops = &imx6_pcie_host_ops; imx6_add_pcie_port() 548 ret = dw_pcie_host_init(pp); imx6_add_pcie_port() 560 struct pcie_port *pp; imx6_pcie_probe() local 569 pp = &imx6_pcie->pp; imx6_pcie_probe() 570 pp->dev = &pdev->dev; imx6_pcie_probe() 577 pp->dbi_base = devm_ioremap_resource(&pdev->dev, dbi_base); imx6_pcie_probe() 578 if (IS_ERR(pp->dbi_base)) imx6_pcie_probe() 579 return PTR_ERR(pp->dbi_base); imx6_pcie_probe() 622 ret = imx6_add_pcie_port(pp, pdev); imx6_pcie_probe() 635 imx6_pcie_assert_core_reset(&imx6_pcie->pp); imx6_pcie_shutdown()
|
H A D | pci-layerscape.c | 44 struct pcie_port pp; member in struct:ls_pcie 49 #define to_ls_pcie(x) container_of(x, struct ls_pcie, pp) 51 static int ls_pcie_link_up(struct pcie_port *pp) ls_pcie_link_up() argument 54 struct ls_pcie *pcie = to_ls_pcie(pp); ls_pcie_link_up() 65 static void ls_pcie_host_init(struct pcie_port *pp) ls_pcie_host_init() argument 67 struct ls_pcie *pcie = to_ls_pcie(pp); ls_pcie_host_init() 71 dw_pcie_setup_rc(pp); ls_pcie_host_init() 73 while (!ls_pcie_link_up(pp)) { ls_pcie_host_init() 77 dev_err(pp->dev, "phy link never came up\n"); ls_pcie_host_init() 98 struct pcie_port *pp; ls_add_pcie_port() local 101 pp = &pcie->pp; ls_add_pcie_port() 102 pp->dev = pcie->dev; ls_add_pcie_port() 103 pp->dbi_base = pcie->dbi; ls_add_pcie_port() 104 pp->root_bus_nr = -1; ls_add_pcie_port() 105 pp->ops = &ls_pcie_host_ops; ls_add_pcie_port() 107 ret = dw_pcie_host_init(pp); ls_add_pcie_port() 109 dev_err(pp->dev, "failed to initialize host\n"); ls_add_pcie_port()
|
H A D | pci-keystone-dw.c | 59 #define to_keystone_pcie(x) container_of(x, struct keystone_pcie, pp) 73 u32 ks_dw_pcie_get_msi_addr(struct pcie_port *pp) ks_dw_pcie_get_msi_addr() argument 75 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_get_msi_addr() 82 struct pcie_port *pp = &ks_pcie->pp; ks_dw_pcie_handle_msi_irq() local 95 virq = irq_linear_revmap(pp->irq_domain, vector); ks_dw_pcie_handle_msi_irq() 96 dev_dbg(pp->dev, "irq: bit %d, vector %d, virq %d\n", ks_dw_pcie_handle_msi_irq() 109 struct pcie_port *pp; ks_dw_pcie_msi_irq_ack() local 112 pp = sys_to_pcie(msi->dev->bus->sysdata); ks_dw_pcie_msi_irq_ack() 113 ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_msi_irq_ack() 114 offset = irq - irq_linear_revmap(pp->irq_domain, 0); ks_dw_pcie_msi_irq_ack() 122 void ks_dw_pcie_msi_set_irq(struct pcie_port *pp, int irq) ks_dw_pcie_msi_set_irq() argument 125 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_msi_set_irq() 132 void ks_dw_pcie_msi_clear_irq(struct pcie_port *pp, int irq) ks_dw_pcie_msi_clear_irq() argument 135 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_msi_clear_irq() 147 struct pcie_port *pp; ks_dw_pcie_msi_irq_mask() local 151 pp = sys_to_pcie(msi->dev->bus->sysdata); ks_dw_pcie_msi_irq_mask() 152 ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_msi_irq_mask() 153 offset = irq - irq_linear_revmap(pp->irq_domain, 0); ks_dw_pcie_msi_irq_mask() 161 ks_dw_pcie_msi_clear_irq(pp, offset); ks_dw_pcie_msi_irq_mask() 169 struct pcie_port *pp; ks_dw_pcie_msi_irq_unmask() local 173 pp = sys_to_pcie(msi->dev->bus->sysdata); ks_dw_pcie_msi_irq_unmask() 174 ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_msi_irq_unmask() 175 offset = irq - irq_linear_revmap(pp->irq_domain, 0); ks_dw_pcie_msi_irq_unmask() 183 ks_dw_pcie_msi_set_irq(pp, offset); ks_dw_pcie_msi_irq_unmask() 208 int ks_dw_pcie_msi_host_init(struct pcie_port *pp, struct msi_controller *chip) ks_dw_pcie_msi_host_init() argument 210 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_msi_host_init() 213 pp->irq_domain = irq_domain_add_linear(ks_pcie->msi_intc_np, ks_dw_pcie_msi_host_init() 217 if (!pp->irq_domain) { ks_dw_pcie_msi_host_init() 218 dev_err(pp->dev, "irq domain init failed\n"); ks_dw_pcie_msi_host_init() 223 irq_create_mapping(pp->irq_domain, i); ks_dw_pcie_msi_host_init() 238 struct pcie_port *pp = &ks_pcie->pp; ks_dw_pcie_handle_legacy_irq() local 246 dev_dbg(pp->dev, ": irq: irq_offset %d, virq %d\n", offset, ks_dw_pcie_handle_legacy_irq() 329 struct pcie_port *pp = &ks_pcie->pp; ks_dw_pcie_setup_rc_app_regs() local 330 u32 start = pp->mem.start, end = pp->mem.end; ks_dw_pcie_setup_rc_app_regs() 335 writel(0, pp->dbi_base + PCI_BASE_ADDRESS_0); ks_dw_pcie_setup_rc_app_regs() 336 writel(0, pp->dbi_base + PCI_BASE_ADDRESS_1); ks_dw_pcie_setup_rc_app_regs() 377 struct pcie_port *pp = &ks_pcie->pp; ks_pcie_cfg_setup() local 381 return pp->dbi_base; ks_pcie_cfg_setup() 394 return pp->va_cfg0_base; ks_pcie_cfg_setup() 397 int ks_dw_pcie_rd_other_conf(struct pcie_port *pp, struct pci_bus *bus, ks_dw_pcie_rd_other_conf() argument 400 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_rd_other_conf() 409 int ks_dw_pcie_wr_other_conf(struct pcie_port *pp, struct pci_bus *bus, ks_dw_pcie_wr_other_conf() argument 412 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_wr_other_conf() 426 void ks_dw_pcie_v3_65_scan_bus(struct pcie_port *pp) ks_dw_pcie_v3_65_scan_bus() argument 428 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_v3_65_scan_bus() 434 writel(1, pp->dbi_base + PCI_BASE_ADDRESS_0); ks_dw_pcie_v3_65_scan_bus() 435 writel(SZ_4K - 1, pp->dbi_base + PCI_BASE_ADDRESS_0); ks_dw_pcie_v3_65_scan_bus() 443 writel(ks_pcie->app.start, pp->dbi_base + PCI_BASE_ADDRESS_0); ks_dw_pcie_v3_65_scan_bus() 449 int ks_dw_pcie_link_up(struct pcie_port *pp) ks_dw_pcie_link_up() argument 451 u32 val = readl(pp->dbi_base + DEBUG0); ks_dw_pcie_link_up() 480 struct pcie_port *pp = &ks_pcie->pp; ks_dw_pcie_host_init() local 481 struct platform_device *pdev = to_platform_device(pp->dev); ks_dw_pcie_host_init() 486 pp->dbi_base = devm_ioremap_resource(pp->dev, res); ks_dw_pcie_host_init() 487 if (IS_ERR(pp->dbi_base)) ks_dw_pcie_host_init() 488 return PTR_ERR(pp->dbi_base); ks_dw_pcie_host_init() 494 pp->va_cfg0_base = pp->dbi_base + SPACE0_REMOTE_CFG_OFFSET; ks_dw_pcie_host_init() 495 pp->va_cfg1_base = pp->va_cfg0_base; ks_dw_pcie_host_init() 499 ks_pcie->va_app_base = devm_ioremap_resource(pp->dev, res); ks_dw_pcie_host_init() 512 dev_err(pp->dev, "Failed to add irq domain for legacy irqs\n"); ks_dw_pcie_host_init() 516 return dw_pcie_host_init(pp); ks_dw_pcie_host_init()
|
H A D | pci-keystone.h | 21 struct pcie_port pp; member in struct:keystone_pcie 40 u32 ks_dw_pcie_get_msi_addr(struct pcie_port *pp); 47 int ks_dw_pcie_wr_other_conf(struct pcie_port *pp, struct pci_bus *bus, 49 int ks_dw_pcie_rd_other_conf(struct pcie_port *pp, struct pci_bus *bus, 52 int ks_dw_pcie_link_up(struct pcie_port *pp); 54 void ks_dw_pcie_msi_set_irq(struct pcie_port *pp, int irq); 55 void ks_dw_pcie_msi_clear_irq(struct pcie_port *pp, int irq); 56 void ks_dw_pcie_v3_65_scan_bus(struct pcie_port *pp); 57 int ks_dw_pcie_msi_host_init(struct pcie_port *pp,
|
H A D | pci-dra7xx.c | 70 struct pcie_port pp; member in struct:dra7xx_pcie 73 #define to_dra7xx_pcie(x) container_of((x), struct dra7xx_pcie, pp) 86 static int dra7xx_pcie_link_up(struct pcie_port *pp) dra7xx_pcie_link_up() argument 88 struct dra7xx_pcie *dra7xx = to_dra7xx_pcie(pp); dra7xx_pcie_link_up() 94 static int dra7xx_pcie_establish_link(struct pcie_port *pp) dra7xx_pcie_establish_link() argument 98 struct dra7xx_pcie *dra7xx = to_dra7xx_pcie(pp); dra7xx_pcie_establish_link() 100 if (dw_pcie_link_up(pp)) { dra7xx_pcie_establish_link() 101 dev_err(pp->dev, "link is already up\n"); dra7xx_pcie_establish_link() 117 dev_err(pp->dev, "link is not up\n"); dra7xx_pcie_establish_link() 124 static void dra7xx_pcie_enable_interrupts(struct pcie_port *pp) dra7xx_pcie_enable_interrupts() argument 126 struct dra7xx_pcie *dra7xx = to_dra7xx_pcie(pp); dra7xx_pcie_enable_interrupts() 144 static void dra7xx_pcie_host_init(struct pcie_port *pp) dra7xx_pcie_host_init() argument 146 dw_pcie_setup_rc(pp); dra7xx_pcie_host_init() 147 dra7xx_pcie_establish_link(pp); dra7xx_pcie_host_init() 149 dw_pcie_msi_init(pp); dra7xx_pcie_host_init() 150 dra7xx_pcie_enable_interrupts(pp); dra7xx_pcie_host_init() 172 static int dra7xx_pcie_init_irq_domain(struct pcie_port *pp) dra7xx_pcie_init_irq_domain() argument 174 struct device *dev = pp->dev; dra7xx_pcie_init_irq_domain() 183 pp->irq_domain = irq_domain_add_linear(pcie_intc_node, 4, dra7xx_pcie_init_irq_domain() 184 &intx_domain_ops, pp); dra7xx_pcie_init_irq_domain() 185 if (!pp->irq_domain) { dra7xx_pcie_init_irq_domain() 187 return PTR_ERR(pp->irq_domain); dra7xx_pcie_init_irq_domain() 195 struct pcie_port *pp = arg; dra7xx_pcie_msi_irq_handler() local 196 struct dra7xx_pcie *dra7xx = to_dra7xx_pcie(pp); dra7xx_pcie_msi_irq_handler() 203 dw_handle_msi_irq(pp); dra7xx_pcie_msi_irq_handler() 209 generic_handle_irq(irq_find_mapping(pp->irq_domain, ffs(reg))); dra7xx_pcie_msi_irq_handler() 277 struct pcie_port *pp; dra7xx_add_pcie_port() local 281 pp = &dra7xx->pp; dra7xx_add_pcie_port() 282 pp->dev = dev; dra7xx_add_pcie_port() 283 pp->ops = &dra7xx_pcie_host_ops; dra7xx_add_pcie_port() 285 pp->irq = platform_get_irq(pdev, 1); dra7xx_add_pcie_port() 286 if (pp->irq < 0) { dra7xx_add_pcie_port() 291 ret = devm_request_irq(&pdev->dev, pp->irq, dra7xx_add_pcie_port() 294 "dra7-pcie-msi", pp); dra7xx_add_pcie_port() 301 ret = dra7xx_pcie_init_irq_domain(pp); dra7xx_add_pcie_port() 307 pp->dbi_base = devm_ioremap(dev, res->start, resource_size(res)); dra7xx_add_pcie_port() 308 if (!pp->dbi_base) dra7xx_add_pcie_port() 311 ret = dw_pcie_host_init(pp); dra7xx_add_pcie_port() 424 struct pcie_port *pp = &dra7xx->pp; dra7xx_pcie_remove() local 428 if (pp->irq_domain) dra7xx_pcie_remove() 429 irq_domain_remove(pp->irq_domain); dra7xx_pcie_remove()
|
H A D | pci-keystone.c | 46 #define to_keystone_pcie(x) container_of(x, struct keystone_pcie, pp) 90 struct pcie_port *pp = &ks_pcie->pp; ks_pcie_establish_link() local 93 dw_pcie_setup_rc(pp); ks_pcie_establish_link() 95 if (dw_pcie_link_up(pp)) { ks_pcie_establish_link() 96 dev_err(pp->dev, "Link already up\n"); ks_pcie_establish_link() 102 while (!dw_pcie_link_up(pp)) { ks_pcie_establish_link() 108 dev_err(pp->dev, "phy link never came up\n"); ks_pcie_establish_link() 119 struct pcie_port *pp = &ks_pcie->pp; ks_pcie_msi_irq_handler() local 122 dev_dbg(pp->dev, "%s, irq %d\n", __func__, irq); ks_pcie_msi_irq_handler() 145 struct pcie_port *pp = &ks_pcie->pp; ks_pcie_legacy_irq_handler() local 149 dev_dbg(pp->dev, ": Handling legacy irq %d\n", irq); ks_pcie_legacy_irq_handler() 165 struct device *dev = ks_pcie->pp.dev; ks_pcie_get_irq_controller_info() 254 static void __init ks_pcie_host_init(struct pcie_port *pp) ks_pcie_host_init() argument 256 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_pcie_host_init() 263 pp->dbi_base + PCI_IO_BASE); ks_pcie_host_init() 266 writew(ks_pcie->device_id, pp->dbi_base + PCI_DEVICE_ID); ks_pcie_host_init() 269 val = readl(pp->dbi_base + PCIE_CAP_BASE + PCI_EXP_DEVCTL); ks_pcie_host_init() 273 writel(val, pp->dbi_base + PCIE_CAP_BASE + PCI_EXP_DEVCTL); ks_pcie_host_init() 298 struct pcie_port *pp = &ks_pcie->pp; ks_add_pcie_port() local 315 pp->root_bus_nr = -1; ks_add_pcie_port() 316 pp->ops = &keystone_pcie_host_ops; ks_add_pcie_port() 348 struct pcie_port *pp; ks_pcie_probe() local 359 pp = &ks_pcie->pp; ks_pcie_probe() 378 pp->dev = dev; ks_pcie_probe()
|
/linux-4.1.27/arch/arm/mach-dove/ |
H A D | pcie.c | 40 struct pcie_port *pp; dove_pcie_setup() local 45 pp = &pcie_port[nr]; dove_pcie_setup() 46 sys->private_data = pp; dove_pcie_setup() 47 pp->root_bus_nr = sys->busnr; dove_pcie_setup() 52 orion_pcie_set_local_bus_nr(pp->base, sys->busnr); dove_pcie_setup() 54 orion_pcie_setup(pp->base); dove_pcie_setup() 56 if (pp->index == 0) dove_pcie_setup() 64 snprintf(pp->mem_space_name, sizeof(pp->mem_space_name), dove_pcie_setup() 65 "PCIe %d MEM", pp->index); dove_pcie_setup() 66 pp->mem_space_name[sizeof(pp->mem_space_name) - 1] = 0; dove_pcie_setup() 67 pp->res.name = pp->mem_space_name; dove_pcie_setup() 68 if (pp->index == 0) { dove_pcie_setup() 69 pp->res.start = DOVE_PCIE0_MEM_PHYS_BASE; dove_pcie_setup() 70 pp->res.end = pp->res.start + DOVE_PCIE0_MEM_SIZE - 1; dove_pcie_setup() 72 pp->res.start = DOVE_PCIE1_MEM_PHYS_BASE; dove_pcie_setup() 73 pp->res.end = pp->res.start + DOVE_PCIE1_MEM_SIZE - 1; dove_pcie_setup() 75 pp->res.flags = IORESOURCE_MEM; dove_pcie_setup() 76 if (request_resource(&iomem_resource, &pp->res)) dove_pcie_setup() 78 pci_add_resource_offset(&sys->resources, &pp->res, sys->mem_offset); dove_pcie_setup() 83 static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) pcie_valid_config() argument 89 if (bus == pp->root_bus_nr && dev > 1) pcie_valid_config() 99 struct pcie_port *pp = sys->private_data; pcie_rd_conf() local 103 if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) { pcie_rd_conf() 108 spin_lock_irqsave(&pp->conf_lock, flags); pcie_rd_conf() 109 ret = orion_pcie_rd_conf(pp->base, bus, devfn, where, size, val); pcie_rd_conf() 110 spin_unlock_irqrestore(&pp->conf_lock, flags); pcie_rd_conf() 119 struct pcie_port *pp = sys->private_data; pcie_wr_conf() local 123 if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) pcie_wr_conf() 126 spin_lock_irqsave(&pp->conf_lock, flags); pcie_wr_conf() 127 ret = orion_pcie_wr_conf(pp->base, bus, devfn, where, size, val); pcie_wr_conf() 128 spin_unlock_irqrestore(&pp->conf_lock, flags); pcie_wr_conf() 170 struct pcie_port *pp = sys->private_data; dove_pcie_map_irq() local 172 return pp->index ? IRQ_DOVE_PCIE1 : IRQ_DOVE_PCIE0; dove_pcie_map_irq() 187 struct pcie_port *pp = &pcie_port[num_pcie_ports++]; add_pcie_port() local 195 pp->index = index; add_pcie_port() 196 pp->root_bus_nr = -1; add_pcie_port() 197 pp->base = base; add_pcie_port() 198 spin_lock_init(&pp->conf_lock); add_pcie_port() 199 memset(&pp->res, 0, sizeof(pp->res)); add_pcie_port()
|
/linux-4.1.27/arch/arm/mach-mv78xx0/ |
H A D | pcie.c | 78 struct pcie_port *pp = pcie_port + i; mv78xx0_pcie_preinit() local 80 snprintf(pp->mem_space_name, sizeof(pp->mem_space_name), mv78xx0_pcie_preinit() 81 "PCIe %d.%d MEM", pp->maj, pp->min); mv78xx0_pcie_preinit() 82 pp->mem_space_name[sizeof(pp->mem_space_name) - 1] = 0; mv78xx0_pcie_preinit() 83 pp->res.name = pp->mem_space_name; mv78xx0_pcie_preinit() 84 pp->res.flags = IORESOURCE_MEM; mv78xx0_pcie_preinit() 85 pp->res.start = start; mv78xx0_pcie_preinit() 86 pp->res.end = start + size_each - 1; mv78xx0_pcie_preinit() 89 if (request_resource(&iomem_resource, &pp->res)) mv78xx0_pcie_preinit() 92 mvebu_mbus_add_window_by_id(MV78XX0_MBUS_PCIE_MEM_TARGET(pp->maj, pp->min), mv78xx0_pcie_preinit() 93 MV78XX0_MBUS_PCIE_MEM_ATTR(pp->maj, pp->min), mv78xx0_pcie_preinit() 94 pp->res.start, resource_size(&pp->res)); mv78xx0_pcie_preinit() 95 mvebu_mbus_add_window_remap_by_id(MV78XX0_MBUS_PCIE_IO_TARGET(pp->maj, pp->min), mv78xx0_pcie_preinit() 96 MV78XX0_MBUS_PCIE_IO_ATTR(pp->maj, pp->min), mv78xx0_pcie_preinit() 103 struct pcie_port *pp; mv78xx0_pcie_setup() local 108 pp = &pcie_port[nr]; mv78xx0_pcie_setup() 109 sys->private_data = pp; mv78xx0_pcie_setup() 110 pp->root_bus_nr = sys->busnr; mv78xx0_pcie_setup() 115 orion_pcie_set_local_bus_nr(pp->base, sys->busnr); mv78xx0_pcie_setup() 116 orion_pcie_setup(pp->base); mv78xx0_pcie_setup() 120 pci_add_resource_offset(&sys->resources, &pp->res, sys->mem_offset); mv78xx0_pcie_setup() 125 static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) pcie_valid_config() argument 131 if (bus == pp->root_bus_nr && dev > 1) pcie_valid_config() 141 struct pcie_port *pp = sys->private_data; pcie_rd_conf() local 145 if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) { pcie_rd_conf() 150 spin_lock_irqsave(&pp->conf_lock, flags); pcie_rd_conf() 151 ret = orion_pcie_rd_conf(pp->base, bus, devfn, where, size, val); pcie_rd_conf() 152 spin_unlock_irqrestore(&pp->conf_lock, flags); pcie_rd_conf() 161 struct pcie_port *pp = sys->private_data; pcie_wr_conf() local 165 if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) pcie_wr_conf() 168 spin_lock_irqsave(&pp->conf_lock, flags); pcie_wr_conf() 169 ret = orion_pcie_wr_conf(pp->base, bus, devfn, where, size, val); pcie_wr_conf() 170 spin_unlock_irqrestore(&pp->conf_lock, flags); pcie_wr_conf() 213 struct pcie_port *pp = sys->private_data; mv78xx0_pcie_map_irq() local 215 return IRQ_MV78XX0_PCIE_00 + (pp->maj << 2) + pp->min; mv78xx0_pcie_map_irq() 231 struct pcie_port *pp = &pcie_port[num_pcie_ports++]; add_pcie_port() local 235 pp->maj = maj; add_pcie_port() 236 pp->min = min; add_pcie_port() 237 pp->root_bus_nr = -1; add_pcie_port() 238 pp->base = base; add_pcie_port() 239 spin_lock_init(&pp->conf_lock); add_pcie_port() 240 memset(&pp->res, 0, sizeof(pp->res)); add_pcie_port()
|
/linux-4.1.27/drivers/spi/ |
H A D | spi-butterfly.c | 83 struct butterfly *pp = spidev_to_pp(spi); setsck() local 84 u8 bit, byte = pp->lastbyte; setsck() 92 parport_write_data(pp->port, byte); setsck() 93 pp->lastbyte = byte; setsck() 99 struct butterfly *pp = spidev_to_pp(spi); setmosi() local 100 u8 bit, byte = pp->lastbyte; setmosi() 108 parport_write_data(pp->port, byte); setmosi() 109 pp->lastbyte = byte; setmosi() 114 struct butterfly *pp = spidev_to_pp(spi); getmiso() local 121 value = !(parport_read_status(pp->port) & bit); getmiso() 127 struct butterfly *pp = spidev_to_pp(spi); butterfly_chipselect() local 140 parport_frob_control(pp->port, spi_cs_bit, value ? spi_cs_bit : 0); butterfly_chipselect() 197 struct butterfly *pp; butterfly_attach() local 208 master = spi_alloc_master(dev, sizeof(*pp)); butterfly_attach() 213 pp = spi_master_get_devdata(master); butterfly_attach() 224 pp->bitbang.master = master; butterfly_attach() 225 pp->bitbang.chipselect = butterfly_chipselect; butterfly_attach() 226 pp->bitbang.txrx_word[SPI_MODE_0] = butterfly_txrx_word_mode0; butterfly_attach() 231 pp->port = p; butterfly_attach() 234 0 /* FLAGS */, pp); butterfly_attach() 239 pp->pd = pd; butterfly_attach() 251 parport_frob_control(pp->port, spi_cs_bit, 0); butterfly_attach() 256 pp->lastbyte |= vcc_bits; butterfly_attach() 257 parport_write_data(pp->port, pp->lastbyte); butterfly_attach() 261 pp->lastbyte |= butterfly_nreset; butterfly_attach() 262 parport_write_data(pp->port, pp->lastbyte); butterfly_attach() 269 status = spi_bitbang_start(&pp->bitbang); butterfly_attach() 278 pp->info[0].max_speed_hz = 15 * 1000 * 1000; butterfly_attach() 279 strcpy(pp->info[0].modalias, "mtd_dataflash"); butterfly_attach() 280 pp->info[0].platform_data = &flash; butterfly_attach() 281 pp->info[0].chip_select = 1; butterfly_attach() 282 pp->info[0].controller_data = pp; butterfly_attach() 283 pp->dataflash = spi_new_device(pp->bitbang.master, &pp->info[0]); butterfly_attach() 284 if (pp->dataflash) butterfly_attach() 286 dev_name(&pp->dataflash->dev)); butterfly_attach() 289 butterfly = pp; butterfly_attach() 294 parport_write_data(pp->port, 0); butterfly_attach() 296 parport_release(pp->pd); butterfly_attach() 300 (void) spi_master_put(pp->bitbang.master); butterfly_attach() 307 struct butterfly *pp; butterfly_detach() local 315 pp = butterfly; butterfly_detach() 319 spi_bitbang_stop(&pp->bitbang); butterfly_detach() 322 parport_write_data(pp->port, 0); butterfly_detach() 325 parport_release(pp->pd); butterfly_detach() 326 parport_unregister_device(pp->pd); butterfly_detach() 328 (void) spi_master_put(pp->bitbang.master); butterfly_detach()
|
H A D | spi-lm70llp.c | 106 static inline void deassertCS(struct spi_lm70llp *pp) deassertCS() argument 108 u8 data = parport_read_data(pp->port); deassertCS() 111 parport_write_data(pp->port, data | nCS); deassertCS() 114 static inline void assertCS(struct spi_lm70llp *pp) assertCS() argument 116 u8 data = parport_read_data(pp->port); assertCS() 119 parport_write_data(pp->port, data & ~nCS); assertCS() 122 static inline void clkHigh(struct spi_lm70llp *pp) clkHigh() argument 124 u8 data = parport_read_data(pp->port); clkHigh() 125 parport_write_data(pp->port, data | SCLK); clkHigh() 128 static inline void clkLow(struct spi_lm70llp *pp) clkLow() argument 130 u8 data = parport_read_data(pp->port); clkLow() 131 parport_write_data(pp->port, data & ~SCLK); clkLow() 143 struct spi_lm70llp *pp = spidev_to_pp(s); setsck() local 146 clkHigh(pp); setsck() 148 clkLow(pp); setsck() 168 struct spi_lm70llp *pp = spidev_to_pp(s); getmiso() local 169 return ((SIO == (parport_read_status(pp->port) & SIO)) ? 0 : 1 ); getmiso() 177 struct spi_lm70llp *pp = spidev_to_pp(spi); lm70_chipselect() local 180 assertCS(pp); lm70_chipselect() 182 deassertCS(pp); lm70_chipselect() 196 struct spi_lm70llp *pp; spi_lm70llp_attach() local 211 master = spi_alloc_master(p->physport->dev, sizeof *pp); spi_lm70llp_attach() 216 pp = spi_master_get_devdata(master); spi_lm70llp_attach() 221 pp->bitbang.master = master; spi_lm70llp_attach() 222 pp->bitbang.chipselect = lm70_chipselect; spi_lm70llp_attach() 223 pp->bitbang.txrx_word[SPI_MODE_0] = lm70_txrx; spi_lm70llp_attach() 224 pp->bitbang.flags = SPI_3WIRE; spi_lm70llp_attach() 229 pp->port = p; spi_lm70llp_attach() 232 PARPORT_FLAG_EXCL, pp); spi_lm70llp_attach() 237 pp->pd = pd; spi_lm70llp_attach() 246 status = spi_bitbang_start(&pp->bitbang); spi_lm70llp_attach() 260 strcpy(pp->info.modalias, "lm70"); spi_lm70llp_attach() 261 pp->info.max_speed_hz = 6 * 1000 * 1000; spi_lm70llp_attach() 262 pp->info.chip_select = 0; spi_lm70llp_attach() 263 pp->info.mode = SPI_3WIRE | SPI_MODE_0; spi_lm70llp_attach() 266 parport_write_data(pp->port, lm70_INIT); spi_lm70llp_attach() 271 pp->info.controller_data = pp; spi_lm70llp_attach() 272 pp->spidev_lm70 = spi_new_device(pp->bitbang.master, &pp->info); spi_lm70llp_attach() 273 if (pp->spidev_lm70) spi_lm70llp_attach() 274 dev_dbg(&pp->spidev_lm70->dev, "spidev_lm70 at %s\n", spi_lm70llp_attach() 275 dev_name(&pp->spidev_lm70->dev)); spi_lm70llp_attach() 281 pp->spidev_lm70->bits_per_word = 8; spi_lm70llp_attach() 283 lm70llp = pp; spi_lm70llp_attach() 287 spi_bitbang_stop(&pp->bitbang); spi_lm70llp_attach() 290 parport_write_data(pp->port, 0); spi_lm70llp_attach() 292 parport_release(pp->pd); spi_lm70llp_attach() 303 struct spi_lm70llp *pp; spi_lm70llp_detach() local 308 pp = lm70llp; spi_lm70llp_detach() 309 spi_bitbang_stop(&pp->bitbang); spi_lm70llp_detach() 312 parport_write_data(pp->port, 0); spi_lm70llp_detach() 314 parport_release(pp->pd); spi_lm70llp_detach() 315 parport_unregister_device(pp->pd); spi_lm70llp_detach() 317 (void) spi_master_put(pp->bitbang.master); spi_lm70llp_detach()
|
/linux-4.1.27/drivers/char/ |
H A D | ppdev.c | 101 static inline void pp_enable_irq (struct pp_struct *pp) pp_enable_irq() argument 103 struct parport *port = pp->pdev->port; pp_enable_irq() 111 struct pp_struct *pp = file->private_data; pp_read() local 117 if (!(pp->flags & PP_CLAIMED)) { pp_read() 131 pport = pp->pdev->port; pp_read() 134 parport_set_timeout (pp->pdev, pp_read() 137 pp->default_inactivity); pp_read() 147 if (pp->flags & PP_W91284PIC) { pp_read() 150 if (pp->flags & PP_FASTREAD) { pp_read() 179 parport_set_timeout (pp->pdev, pp->default_inactivity); pp_read() 185 pp_enable_irq (pp); pp_read() 193 struct pp_struct *pp = file->private_data; pp_write() local 200 if (!(pp->flags & PP_CLAIMED)) { pp_write() 210 pport = pp->pdev->port; pp_write() 213 parport_set_timeout (pp->pdev, pp_write() 216 pp->default_inactivity); pp_write() 226 if ((pp->flags & PP_FASTWRITE) && (mode == IEEE1284_MODE_EPP)) { pp_write() 236 wrote = parport_write (pp->pdev->port, kbuffer, n); pp_write() 260 parport_set_timeout (pp->pdev, pp->default_inactivity); pp_write() 263 pp_enable_irq (pp); pp_write() 269 struct pp_struct *pp = private; pp_irq() local 271 if (pp->irqresponse) { pp_irq() 272 parport_write_control (pp->pdev->port, pp->irqctl); pp_irq() 273 pp->irqresponse = 0; pp_irq() 276 atomic_inc (&pp->irqc); pp_irq() 277 wake_up_interruptible (&pp->irq_wait); pp_irq() 280 static int register_device (int minor, struct pp_struct *pp) register_device() argument 298 fl = (pp->flags & PP_EXCL) ? PARPORT_FLAG_EXCL : 0; register_device() 300 NULL, pp_irq, fl, pp); register_device() 309 pp->pdev = pdev; register_device() 328 struct pp_struct *pp = file->private_data; pp_do_ioctl() local 339 if (pp->flags & PP_CLAIMED) { pp_do_ioctl() 345 if (!pp->pdev) { pp_do_ioctl() 346 int err = register_device (minor, pp); pp_do_ioctl() 352 ret = parport_claim_or_block (pp->pdev); pp_do_ioctl() 356 pp->flags |= PP_CLAIMED; pp_do_ioctl() 360 pp_enable_irq (pp); pp_do_ioctl() 363 info = &pp->pdev->port->ieee1284; pp_do_ioctl() 364 pp->saved_state.mode = info->mode; pp_do_ioctl() 365 pp->saved_state.phase = info->phase; pp_do_ioctl() 366 info->mode = pp->state.mode; pp_do_ioctl() 367 info->phase = pp->state.phase; pp_do_ioctl() 368 pp->default_inactivity = parport_set_timeout (pp->pdev, 0); pp_do_ioctl() 369 parport_set_timeout (pp->pdev, pp->default_inactivity); pp_do_ioctl() 374 if (pp->pdev) { pp_do_ioctl() 377 if (pp->flags & PP_EXCL) pp_do_ioctl() 386 pp->flags |= PP_EXCL; pp_do_ioctl() 394 pp->state.mode = mode; pp_do_ioctl() 395 pp->state.phase = init_phase (mode); pp_do_ioctl() 397 if (pp->flags & PP_CLAIMED) { pp_do_ioctl() 398 pp->pdev->port->ieee1284.mode = mode; pp_do_ioctl() 399 pp->pdev->port->ieee1284.phase = pp->state.phase; pp_do_ioctl() 408 if (pp->flags & PP_CLAIMED) { pp_do_ioctl() 409 mode = pp->pdev->port->ieee1284.mode; pp_do_ioctl() 411 mode = pp->state.mode; pp_do_ioctl() 425 pp->state.phase = phase; pp_do_ioctl() 427 if (pp->flags & PP_CLAIMED) { pp_do_ioctl() 428 pp->pdev->port->ieee1284.phase = phase; pp_do_ioctl() 437 if (pp->flags & PP_CLAIMED) { pp_do_ioctl() 438 phase = pp->pdev->port->ieee1284.phase; pp_do_ioctl() 440 phase = pp->state.phase; pp_do_ioctl() 469 pp->flags &= ~PP_FLAGMASK; pp_do_ioctl() 470 pp->flags |= (uflags & PP_FLAGMASK); pp_do_ioctl() 477 uflags = pp->flags & PP_FLAGMASK; pp_do_ioctl() 487 if ((pp->flags & PP_CLAIMED) == 0) { pp_do_ioctl() 492 port = pp->pdev->port; pp_do_ioctl() 518 parport_yield_blocking (pp->pdev); pp_do_ioctl() 523 info = &pp->pdev->port->ieee1284; pp_do_ioctl() 524 pp->state.mode = info->mode; pp_do_ioctl() 525 pp->state.phase = info->phase; pp_do_ioctl() 526 info->mode = pp->saved_state.mode; pp_do_ioctl() 527 info->phase = pp->saved_state.phase; pp_do_ioctl() 528 parport_release (pp->pdev); pp_do_ioctl() 529 pp->flags &= ~PP_CLAIMED; pp_do_ioctl() 575 pp_enable_irq (pp); pp_do_ioctl() 584 pp->irqctl = reg; pp_do_ioctl() 585 pp->irqresponse = 1; pp_do_ioctl() 589 ret = atomic_read (&pp->irqc); pp_do_ioctl() 592 atomic_sub (ret, &pp->irqc); pp_do_ioctl() 599 /* Convert to jiffies, place in pp->pdev->timeout */ pp_do_ioctl() 608 pp->pdev->timeout = to_jiffies; pp_do_ioctl() 612 to_jiffies = pp->pdev->timeout; pp_do_ioctl() 641 struct pp_struct *pp; pp_open() local 646 pp = kmalloc (sizeof (struct pp_struct), GFP_KERNEL); pp_open() 647 if (!pp) pp_open() 650 pp->state.mode = IEEE1284_MODE_COMPAT; pp_open() 651 pp->state.phase = init_phase (pp->state.mode); pp_open() 652 pp->flags = 0; pp_open() 653 pp->irqresponse = 0; pp_open() 654 atomic_set (&pp->irqc, 0); pp_open() 655 init_waitqueue_head (&pp->irq_wait); pp_open() 661 pp->pdev = NULL; pp_open() 662 file->private_data = pp; pp_open() 670 struct pp_struct *pp = file->private_data; pp_release() local 674 if (!(pp->flags & PP_CLAIMED) && pp->pdev && pp_release() 675 (pp->state.mode != IEEE1284_MODE_COMPAT)) { pp_release() 679 parport_claim_or_block (pp->pdev); pp_release() 680 pp->flags |= PP_CLAIMED; pp_release() 681 info = &pp->pdev->port->ieee1284; pp_release() 682 pp->saved_state.mode = info->mode; pp_release() 683 pp->saved_state.phase = info->phase; pp_release() 684 info->mode = pp->state.mode; pp_release() 685 info->phase = pp->state.phase; pp_release() 687 } else if ((pp->flags & PP_CLAIMED) && pp->pdev && pp_release() 688 (pp->pdev->port->ieee1284.mode != IEEE1284_MODE_COMPAT)) { pp_release() 692 parport_negotiate (pp->pdev->port, IEEE1284_MODE_COMPAT); pp_release() 697 if (pp->flags & PP_CLAIMED) { pp_release() 700 info = &pp->pdev->port->ieee1284; pp_release() 701 pp->state.mode = info->mode; pp_release() 702 pp->state.phase = info->phase; pp_release() 703 info->mode = pp->saved_state.mode; pp_release() 704 info->phase = pp->saved_state.phase; pp_release() 705 parport_release (pp->pdev); pp_release() 712 if (pp->pdev) { pp_release() 713 const char *name = pp->pdev->name; pp_release() 714 parport_unregister_device (pp->pdev); pp_release() 716 pp->pdev = NULL; pp_release() 720 kfree (pp); pp_release() 728 struct pp_struct *pp = file->private_data; pp_poll() local 731 poll_wait (file, &pp->irq_wait, wait); pp_poll() 732 if (atomic_read (&pp->irqc)) pp_poll()
|
/linux-4.1.27/drivers/net/ethernet/marvell/ |
H A D | mvneta.c | 484 static void mvreg_write(struct mvneta_port *pp, u32 offset, u32 data) mvreg_write() argument 486 writel(data, pp->base + offset); mvreg_write() 490 static u32 mvreg_read(struct mvneta_port *pp, u32 offset) mvreg_read() argument 492 return readl(pp->base + offset); mvreg_read() 513 static void mvneta_mib_counters_clear(struct mvneta_port *pp) mvneta_mib_counters_clear() argument 520 dummy = mvreg_read(pp, (MVNETA_MIB_COUNTERS_BASE + i)); mvneta_mib_counters_clear() 527 struct mvneta_port *pp = netdev_priv(dev); mvneta_get_stats64() local 538 cpu_stats = per_cpu_ptr(pp->stats, cpu); for_each_possible_cpu() 575 static void mvneta_rxq_non_occup_desc_add(struct mvneta_port *pp, mvneta_rxq_non_occup_desc_add() argument 583 mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id), mvneta_rxq_non_occup_desc_add() 589 mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id), mvneta_rxq_non_occup_desc_add() 594 static int mvneta_rxq_busy_desc_num_get(struct mvneta_port *pp, mvneta_rxq_busy_desc_num_get() argument 599 val = mvreg_read(pp, MVNETA_RXQ_STATUS_REG(rxq->id)); mvneta_rxq_busy_desc_num_get() 606 static void mvneta_rxq_desc_num_update(struct mvneta_port *pp, mvneta_rxq_desc_num_update() argument 615 mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id), val); mvneta_rxq_desc_num_update() 635 mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id), val); mvneta_rxq_desc_num_update() 651 static void mvneta_max_rx_size_set(struct mvneta_port *pp, int max_rx_size) mvneta_max_rx_size_set() argument 655 val = mvreg_read(pp, MVNETA_GMAC_CTRL_0); mvneta_max_rx_size_set() 659 mvreg_write(pp, MVNETA_GMAC_CTRL_0, val); mvneta_max_rx_size_set() 664 static void mvneta_rxq_offset_set(struct mvneta_port *pp, mvneta_rxq_offset_set() argument 670 val = mvreg_read(pp, MVNETA_RXQ_CONFIG_REG(rxq->id)); mvneta_rxq_offset_set() 675 mvreg_write(pp, MVNETA_RXQ_CONFIG_REG(rxq->id), val); mvneta_rxq_offset_set() 682 static void mvneta_txq_pend_desc_add(struct mvneta_port *pp, mvneta_txq_pend_desc_add() argument 692 mvreg_write(pp, MVNETA_TXQ_UPDATE_REG(txq->id), val); mvneta_txq_pend_desc_add() 717 static void mvneta_rxq_buf_size_set(struct mvneta_port *pp, mvneta_rxq_buf_size_set() argument 723 val = mvreg_read(pp, MVNETA_RXQ_SIZE_REG(rxq->id)); mvneta_rxq_buf_size_set() 728 mvreg_write(pp, MVNETA_RXQ_SIZE_REG(rxq->id), val); mvneta_rxq_buf_size_set() 732 static void mvneta_rxq_bm_disable(struct mvneta_port *pp, mvneta_rxq_bm_disable() argument 737 val = mvreg_read(pp, MVNETA_RXQ_CONFIG_REG(rxq->id)); mvneta_rxq_bm_disable() 739 mvreg_write(pp, MVNETA_RXQ_CONFIG_REG(rxq->id), val); mvneta_rxq_bm_disable() 743 static void mvneta_port_up(struct mvneta_port *pp) mvneta_port_up() argument 749 mvneta_mib_counters_clear(pp); mvneta_port_up() 752 struct mvneta_tx_queue *txq = &pp->txqs[queue]; mvneta_port_up() 756 mvreg_write(pp, MVNETA_TXQ_CMD, q_map); mvneta_port_up() 761 struct mvneta_rx_queue *rxq = &pp->rxqs[queue]; mvneta_port_up() 766 mvreg_write(pp, MVNETA_RXQ_CMD, q_map); mvneta_port_up() 770 static void mvneta_port_down(struct mvneta_port *pp) mvneta_port_down() argument 776 val = mvreg_read(pp, MVNETA_RXQ_CMD) & MVNETA_RXQ_ENABLE_MASK; mvneta_port_down() 780 mvreg_write(pp, MVNETA_RXQ_CMD, mvneta_port_down() 787 netdev_warn(pp->dev, mvneta_port_down() 794 val = mvreg_read(pp, MVNETA_RXQ_CMD); mvneta_port_down() 800 val = (mvreg_read(pp, MVNETA_TXQ_CMD)) & MVNETA_TXQ_ENABLE_MASK; mvneta_port_down() 803 mvreg_write(pp, MVNETA_TXQ_CMD, mvneta_port_down() 810 netdev_warn(pp->dev, mvneta_port_down() 818 val = mvreg_read(pp, MVNETA_TXQ_CMD); mvneta_port_down() 826 netdev_warn(pp->dev, mvneta_port_down() 833 val = mvreg_read(pp, MVNETA_PORT_STATUS); mvneta_port_down() 841 static void mvneta_port_enable(struct mvneta_port *pp) mvneta_port_enable() argument 846 val = mvreg_read(pp, MVNETA_GMAC_CTRL_0); mvneta_port_enable() 848 mvreg_write(pp, MVNETA_GMAC_CTRL_0, val); mvneta_port_enable() 852 static void mvneta_port_disable(struct mvneta_port *pp) mvneta_port_disable() argument 857 val = mvreg_read(pp, MVNETA_GMAC_CTRL_0); mvneta_port_disable() 859 mvreg_write(pp, MVNETA_GMAC_CTRL_0, val); mvneta_port_disable() 867 static void mvneta_set_ucast_table(struct mvneta_port *pp, int queue) mvneta_set_ucast_table() argument 880 mvreg_write(pp, MVNETA_DA_FILT_UCAST_BASE + offset, val); mvneta_set_ucast_table() 884 static void mvneta_set_special_mcast_table(struct mvneta_port *pp, int queue) mvneta_set_special_mcast_table() argument 897 mvreg_write(pp, MVNETA_DA_FILT_SPEC_MCAST + offset, val); mvneta_set_special_mcast_table() 902 static void mvneta_set_other_mcast_table(struct mvneta_port *pp, int queue) mvneta_set_other_mcast_table() argument 908 memset(pp->mcast_count, 0, sizeof(pp->mcast_count)); mvneta_set_other_mcast_table() 911 memset(pp->mcast_count, 1, sizeof(pp->mcast_count)); mvneta_set_other_mcast_table() 917 mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + offset, val); mvneta_set_other_mcast_table() 929 static void mvneta_defaults_set(struct mvneta_port *pp) mvneta_defaults_set() argument 936 mvreg_write(pp, MVNETA_INTR_NEW_CAUSE, 0); mvneta_defaults_set() 937 mvreg_write(pp, MVNETA_INTR_OLD_CAUSE, 0); mvneta_defaults_set() 938 mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0); mvneta_defaults_set() 941 mvreg_write(pp, MVNETA_INTR_NEW_MASK, 0); mvneta_defaults_set() 942 mvreg_write(pp, MVNETA_INTR_OLD_MASK, 0); mvneta_defaults_set() 943 mvreg_write(pp, MVNETA_INTR_MISC_MASK, 0); mvneta_defaults_set() 944 mvreg_write(pp, MVNETA_INTR_ENABLE, 0); mvneta_defaults_set() 947 mvreg_write(pp, MVNETA_MBUS_RETRY, 0x20); mvneta_defaults_set() 953 mvreg_write(pp, MVNETA_CPU_MAP(cpu), mvneta_defaults_set() 958 mvreg_write(pp, MVNETA_PORT_RX_RESET, MVNETA_PORT_RX_DMA_RESET); mvneta_defaults_set() 959 mvreg_write(pp, MVNETA_PORT_TX_RESET, MVNETA_PORT_TX_DMA_RESET); mvneta_defaults_set() 962 mvreg_write(pp, MVNETA_TXQ_CMD_1, 0); mvneta_defaults_set() 964 mvreg_write(pp, MVETH_TXQ_TOKEN_COUNT_REG(queue), 0); mvneta_defaults_set() 965 mvreg_write(pp, MVETH_TXQ_TOKEN_CFG_REG(queue), 0); mvneta_defaults_set() 968 mvreg_write(pp, MVNETA_PORT_TX_RESET, 0); mvneta_defaults_set() 969 mvreg_write(pp, MVNETA_PORT_RX_RESET, 0); mvneta_defaults_set() 973 mvreg_write(pp, MVNETA_ACC_MODE, val); mvneta_defaults_set() 977 mvreg_write(pp, MVNETA_PORT_CONFIG, val); mvneta_defaults_set() 980 mvreg_write(pp, MVNETA_PORT_CONFIG_EXTEND, val); mvneta_defaults_set() 981 mvreg_write(pp, MVNETA_RX_MIN_FRAME_SIZE, 64); mvneta_defaults_set() 996 mvreg_write(pp, MVNETA_SDMA_CONFIG, val); mvneta_defaults_set() 1001 val = mvreg_read(pp, MVNETA_UNIT_CONTROL); mvneta_defaults_set() 1003 mvreg_write(pp, MVNETA_UNIT_CONTROL, val); mvneta_defaults_set() 1005 if (pp->use_inband_status) { mvneta_defaults_set() 1006 val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG); mvneta_defaults_set() 1013 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); mvneta_defaults_set() 1014 val = mvreg_read(pp, MVNETA_GMAC_CLOCK_DIVIDER); mvneta_defaults_set() 1016 mvreg_write(pp, MVNETA_GMAC_CLOCK_DIVIDER, val); mvneta_defaults_set() 1018 val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG); mvneta_defaults_set() 1022 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); mvneta_defaults_set() 1025 mvneta_set_ucast_table(pp, -1); mvneta_defaults_set() 1026 mvneta_set_special_mcast_table(pp, -1); mvneta_defaults_set() 1027 mvneta_set_other_mcast_table(pp, -1); mvneta_defaults_set() 1030 mvreg_write(pp, MVNETA_INTR_ENABLE, mvneta_defaults_set() 1036 static void mvneta_txq_max_tx_size_set(struct mvneta_port *pp, int max_tx_size) mvneta_txq_max_tx_size_set() argument 1047 val = mvreg_read(pp, MVNETA_TX_MTU); mvneta_txq_max_tx_size_set() 1050 mvreg_write(pp, MVNETA_TX_MTU, val); mvneta_txq_max_tx_size_set() 1053 val = mvreg_read(pp, MVNETA_TX_TOKEN_SIZE); mvneta_txq_max_tx_size_set() 1060 mvreg_write(pp, MVNETA_TX_TOKEN_SIZE, val); mvneta_txq_max_tx_size_set() 1063 val = mvreg_read(pp, MVNETA_TXQ_TOKEN_SIZE_REG(queue)); mvneta_txq_max_tx_size_set() 1070 mvreg_write(pp, MVNETA_TXQ_TOKEN_SIZE_REG(queue), val); mvneta_txq_max_tx_size_set() 1076 static void mvneta_set_ucast_addr(struct mvneta_port *pp, u8 last_nibble, mvneta_set_ucast_addr() argument 1092 unicast_reg = mvreg_read(pp, (MVNETA_DA_FILT_UCAST_BASE + tbl_offset)); mvneta_set_ucast_addr() 1102 mvreg_write(pp, (MVNETA_DA_FILT_UCAST_BASE + tbl_offset), unicast_reg); mvneta_set_ucast_addr() 1106 static void mvneta_mac_addr_set(struct mvneta_port *pp, unsigned char *addr, mvneta_mac_addr_set() argument 1117 mvreg_write(pp, MVNETA_MAC_ADDR_LOW, mac_l); mvneta_mac_addr_set() 1118 mvreg_write(pp, MVNETA_MAC_ADDR_HIGH, mac_h); mvneta_mac_addr_set() 1122 mvneta_set_ucast_addr(pp, addr[5], queue); mvneta_mac_addr_set() 1128 static void mvneta_rx_pkts_coal_set(struct mvneta_port *pp, mvneta_rx_pkts_coal_set() argument 1131 mvreg_write(pp, MVNETA_RXQ_THRESHOLD_REG(rxq->id), mvneta_rx_pkts_coal_set() 1139 static void mvneta_rx_time_coal_set(struct mvneta_port *pp, mvneta_rx_time_coal_set() argument 1145 clk_rate = clk_get_rate(pp->clk); mvneta_rx_time_coal_set() 1148 mvreg_write(pp, MVNETA_RXQ_TIME_COAL_REG(rxq->id), val); mvneta_rx_time_coal_set() 1153 static void mvneta_tx_done_pkts_coal_set(struct mvneta_port *pp, mvneta_tx_done_pkts_coal_set() argument 1158 val = mvreg_read(pp, MVNETA_TXQ_SIZE_REG(txq->id)); mvneta_tx_done_pkts_coal_set() 1163 mvreg_write(pp, MVNETA_TXQ_SIZE_REG(txq->id), val); mvneta_tx_done_pkts_coal_set() 1177 static void mvneta_txq_sent_desc_dec(struct mvneta_port *pp, mvneta_txq_sent_desc_dec() argument 1186 mvreg_write(pp, MVNETA_TXQ_UPDATE_REG(txq->id), val); mvneta_txq_sent_desc_dec() 1191 mvreg_write(pp, MVNETA_TXQ_UPDATE_REG(txq->id), val); mvneta_txq_sent_desc_dec() 1195 static int mvneta_txq_sent_desc_num_get(struct mvneta_port *pp, mvneta_txq_sent_desc_num_get() argument 1201 val = mvreg_read(pp, MVNETA_TXQ_STATUS_REG(txq->id)); mvneta_txq_sent_desc_num_get() 1211 static int mvneta_txq_sent_desc_proc(struct mvneta_port *pp, mvneta_txq_sent_desc_proc() argument 1217 sent_desc = mvneta_txq_sent_desc_num_get(pp, txq); mvneta_txq_sent_desc_proc() 1221 mvneta_txq_sent_desc_dec(pp, txq, sent_desc); mvneta_txq_sent_desc_proc() 1256 static void mvneta_rx_error(struct mvneta_port *pp, mvneta_rx_error() argument 1262 netdev_err(pp->dev, mvneta_rx_error() 1270 netdev_err(pp->dev, "bad rx status %08x (crc error), size=%d\n", mvneta_rx_error() 1274 netdev_err(pp->dev, "bad rx status %08x (overrun error), size=%d\n", mvneta_rx_error() 1278 netdev_err(pp->dev, "bad rx status %08x (max frame length error), size=%d\n", mvneta_rx_error() 1282 netdev_err(pp->dev, "bad rx status %08x (resource error), size=%d\n", mvneta_rx_error() 1289 static void mvneta_rx_csum(struct mvneta_port *pp, u32 status, mvneta_rx_csum() argument 1306 static struct mvneta_tx_queue *mvneta_tx_done_policy(struct mvneta_port *pp, mvneta_tx_done_policy() argument 1311 return &pp->txqs[queue]; mvneta_tx_done_policy() 1315 static void mvneta_txq_bufs_free(struct mvneta_port *pp, mvneta_txq_bufs_free() argument 1328 dma_unmap_single(pp->dev->dev.parent, mvneta_txq_bufs_free() 1338 static void mvneta_txq_done(struct mvneta_port *pp, mvneta_txq_done() argument 1341 struct netdev_queue *nq = netdev_get_tx_queue(pp->dev, txq->id); mvneta_txq_done() 1344 tx_done = mvneta_txq_sent_desc_proc(pp, txq); mvneta_txq_done() 1348 mvneta_txq_bufs_free(pp, txq, tx_done); mvneta_txq_done() 1358 static void *mvneta_frag_alloc(const struct mvneta_port *pp) mvneta_frag_alloc() argument 1360 if (likely(pp->frag_size <= PAGE_SIZE)) mvneta_frag_alloc() 1361 return netdev_alloc_frag(pp->frag_size); mvneta_frag_alloc() 1363 return kmalloc(pp->frag_size, GFP_ATOMIC); mvneta_frag_alloc() 1366 static void mvneta_frag_free(const struct mvneta_port *pp, void *data) mvneta_frag_free() argument 1368 if (likely(pp->frag_size <= PAGE_SIZE)) mvneta_frag_free() 1375 static int mvneta_rx_refill(struct mvneta_port *pp, mvneta_rx_refill() argument 1382 data = mvneta_frag_alloc(pp); mvneta_rx_refill() 1386 phys_addr = dma_map_single(pp->dev->dev.parent, data, mvneta_rx_refill() 1387 MVNETA_RX_BUF_SIZE(pp->pkt_size), mvneta_rx_refill() 1389 if (unlikely(dma_mapping_error(pp->dev->dev.parent, phys_addr))) { mvneta_rx_refill() 1390 mvneta_frag_free(pp, data); mvneta_rx_refill() 1399 static u32 mvneta_skb_tx_csum(struct mvneta_port *pp, struct sk_buff *skb) mvneta_skb_tx_csum() argument 1432 static struct mvneta_rx_queue *mvneta_rx_policy(struct mvneta_port *pp, mvneta_rx_policy() argument 1437 return (queue < 0 || queue >= rxq_number) ? NULL : &pp->rxqs[queue]; mvneta_rx_policy() 1441 static void mvneta_rxq_drop_pkts(struct mvneta_port *pp, mvneta_rxq_drop_pkts() argument 1446 rx_done = mvneta_rxq_busy_desc_num_get(pp, rxq); mvneta_rxq_drop_pkts() 1451 mvneta_frag_free(pp, data); mvneta_rxq_drop_pkts() 1452 dma_unmap_single(pp->dev->dev.parent, rx_desc->buf_phys_addr, mvneta_rxq_drop_pkts() 1453 MVNETA_RX_BUF_SIZE(pp->pkt_size), DMA_FROM_DEVICE); mvneta_rxq_drop_pkts() 1457 mvneta_rxq_desc_num_update(pp, rxq, rx_done, rx_done); mvneta_rxq_drop_pkts() 1461 static int mvneta_rx(struct mvneta_port *pp, int rx_todo, mvneta_rx() argument 1464 struct net_device *dev = pp->dev; mvneta_rx() 1470 rx_done = mvneta_rxq_busy_desc_num_get(pp, rxq); mvneta_rx() 1496 mvneta_rx_error(pp, rx_desc); mvneta_rx() 1517 mvneta_rx_csum(pp, rx_status, skb); mvneta_rx() 1518 napi_gro_receive(&pp->napi, skb); mvneta_rx() 1527 skb = build_skb(data, pp->frag_size > PAGE_SIZE ? 0 : pp->frag_size); mvneta_rx() 1532 MVNETA_RX_BUF_SIZE(pp->pkt_size), DMA_FROM_DEVICE); mvneta_rx() 1543 mvneta_rx_csum(pp, rx_status, skb); mvneta_rx() 1545 napi_gro_receive(&pp->napi, skb); mvneta_rx() 1548 err = mvneta_rx_refill(pp, rx_desc); mvneta_rx() 1557 struct mvneta_pcpu_stats *stats = this_cpu_ptr(pp->stats); mvneta_rx() 1566 mvneta_rxq_desc_num_update(pp, rxq, rx_done, rx_filled); mvneta_rx() 1573 struct mvneta_port *pp, struct mvneta_tx_queue *txq) mvneta_tso_put_hdr() 1581 tx_desc->command = mvneta_skb_tx_csum(pp, skb); mvneta_tso_put_hdr() 1625 struct mvneta_port *pp = netdev_priv(dev); mvneta_tx_tso() local 1654 mvneta_tso_put_hdr(skb, pp, txq); mvneta_tx_tso() 1682 dma_unmap_single(pp->dev->dev.parent, mvneta_tx_tso() 1692 static int mvneta_tx_frag_process(struct mvneta_port *pp, struct sk_buff *skb, mvneta_tx_frag_process() argument 1706 dma_map_single(pp->dev->dev.parent, addr, mvneta_tx_frag_process() 1709 if (dma_mapping_error(pp->dev->dev.parent, mvneta_tx_frag_process() 1735 dma_unmap_single(pp->dev->dev.parent, mvneta_tx_frag_process() 1748 struct mvneta_port *pp = netdev_priv(dev); mvneta_tx() local 1750 struct mvneta_tx_queue *txq = &pp->txqs[txq_id]; mvneta_tx() 1769 tx_cmd = mvneta_skb_tx_csum(pp, skb); mvneta_tx() 1796 if (mvneta_tx_frag_process(pp, skb, txq)) { mvneta_tx() 1809 struct mvneta_pcpu_stats *stats = this_cpu_ptr(pp->stats); mvneta_tx() 1813 mvneta_txq_pend_desc_add(pp, txq, frags); mvneta_tx() 1832 static void mvneta_txq_done_force(struct mvneta_port *pp, mvneta_txq_done_force() argument 1838 mvneta_txq_bufs_free(pp, txq, tx_done); mvneta_txq_done_force() 1849 static void mvneta_tx_done_gbe(struct mvneta_port *pp, u32 cause_tx_done) mvneta_tx_done_gbe() argument 1855 txq = mvneta_tx_done_policy(pp, cause_tx_done); mvneta_tx_done_gbe() 1857 nq = netdev_get_tx_queue(pp->dev, txq->id); mvneta_tx_done_gbe() 1861 mvneta_txq_done(pp, txq); mvneta_tx_done_gbe() 1896 static void mvneta_set_special_mcast_addr(struct mvneta_port *pp, mvneta_set_special_mcast_addr() argument 1909 smc_table_reg = mvreg_read(pp, (MVNETA_DA_FILT_SPEC_MCAST mvneta_set_special_mcast_addr() 1919 mvreg_write(pp, MVNETA_DA_FILT_SPEC_MCAST + tbl_offset * 4, mvneta_set_special_mcast_addr() 1931 static void mvneta_set_other_mcast_addr(struct mvneta_port *pp, mvneta_set_other_mcast_addr() argument 1942 omc_table_reg = mvreg_read(pp, MVNETA_DA_FILT_OTH_MCAST + tbl_offset); mvneta_set_other_mcast_addr() 1952 mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + tbl_offset, omc_table_reg); mvneta_set_other_mcast_addr() 1964 static int mvneta_mcast_addr_set(struct mvneta_port *pp, unsigned char *p_addr, mvneta_mcast_addr_set() argument 1970 mvneta_set_special_mcast_addr(pp, p_addr[5], queue); mvneta_mcast_addr_set() 1976 if (pp->mcast_count[crc_result] == 0) { mvneta_mcast_addr_set() 1977 netdev_info(pp->dev, "No valid Mcast for crc8=0x%02x\n", mvneta_mcast_addr_set() 1982 pp->mcast_count[crc_result]--; mvneta_mcast_addr_set() 1983 if (pp->mcast_count[crc_result] != 0) { mvneta_mcast_addr_set() 1984 netdev_info(pp->dev, mvneta_mcast_addr_set() 1986 pp->mcast_count[crc_result], crc_result); mvneta_mcast_addr_set() 1990 pp->mcast_count[crc_result]++; mvneta_mcast_addr_set() 1992 mvneta_set_other_mcast_addr(pp, crc_result, queue); mvneta_mcast_addr_set() 1998 static void mvneta_rx_unicast_promisc_set(struct mvneta_port *pp, mvneta_rx_unicast_promisc_set() argument 2003 port_cfg_reg = mvreg_read(pp, MVNETA_PORT_CONFIG); mvneta_rx_unicast_promisc_set() 2005 val = mvreg_read(pp, MVNETA_TYPE_PRIO); mvneta_rx_unicast_promisc_set() 2012 mvreg_write(pp, MVNETA_MAC_ADDR_LOW, 0xffff); mvneta_rx_unicast_promisc_set() 2013 mvreg_write(pp, MVNETA_MAC_ADDR_HIGH, 0xffffffff); mvneta_rx_unicast_promisc_set() 2020 mvreg_write(pp, MVNETA_PORT_CONFIG, port_cfg_reg); mvneta_rx_unicast_promisc_set() 2021 mvreg_write(pp, MVNETA_TYPE_PRIO, val); mvneta_rx_unicast_promisc_set() 2027 struct mvneta_port *pp = netdev_priv(dev); mvneta_set_rx_mode() local 2032 mvneta_rx_unicast_promisc_set(pp, 1); mvneta_set_rx_mode() 2033 mvneta_set_ucast_table(pp, rxq_def); mvneta_set_rx_mode() 2034 mvneta_set_special_mcast_table(pp, rxq_def); mvneta_set_rx_mode() 2035 mvneta_set_other_mcast_table(pp, rxq_def); mvneta_set_rx_mode() 2038 mvneta_rx_unicast_promisc_set(pp, 0); mvneta_set_rx_mode() 2039 mvneta_set_ucast_table(pp, -1); mvneta_set_rx_mode() 2040 mvneta_mac_addr_set(pp, dev->dev_addr, rxq_def); mvneta_set_rx_mode() 2044 mvneta_set_special_mcast_table(pp, rxq_def); mvneta_set_rx_mode() 2045 mvneta_set_other_mcast_table(pp, rxq_def); mvneta_set_rx_mode() 2048 mvneta_set_special_mcast_table(pp, -1); mvneta_set_rx_mode() 2049 mvneta_set_other_mcast_table(pp, -1); mvneta_set_rx_mode() 2053 mvneta_mcast_addr_set(pp, ha->addr, netdev_for_each_mc_addr() 2064 struct mvneta_port *pp = (struct mvneta_port *)dev_id; mvneta_isr() local 2067 mvreg_write(pp, MVNETA_INTR_NEW_MASK, 0); mvneta_isr() 2069 napi_schedule(&pp->napi); mvneta_isr() 2074 static int mvneta_fixed_link_update(struct mvneta_port *pp, mvneta_fixed_link_update() argument 2079 u32 gmac_stat = mvreg_read(pp, MVNETA_GMAC_STATUS); mvneta_fixed_link_update() 2108 struct mvneta_port *pp = netdev_priv(napi->dev); mvneta_poll() local 2110 if (!netif_running(pp->dev)) { mvneta_poll() 2116 cause_rx_tx = mvreg_read(pp, MVNETA_INTR_NEW_CAUSE); mvneta_poll() 2118 u32 cause_misc = mvreg_read(pp, MVNETA_INTR_MISC_CAUSE); mvneta_poll() 2120 mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0); mvneta_poll() 2121 if (pp->use_inband_status && (cause_misc & mvneta_poll() 2125 mvneta_fixed_link_update(pp, pp->phy_dev); mvneta_poll() 2131 mvneta_tx_done_gbe(pp, (cause_rx_tx & MVNETA_TX_INTR_MASK_ALL)); mvneta_poll() 2138 cause_rx_tx |= pp->cause_rx_tx; mvneta_poll() 2144 rxq = mvneta_rx_policy(pp, cause_rx_tx); mvneta_poll() 2149 count = mvneta_rx(pp, budget, rxq); mvneta_poll() 2163 rx_done = mvneta_rx(pp, budget, &pp->rxqs[rxq_def]); mvneta_poll() 2171 mvreg_write(pp, MVNETA_INTR_NEW_MASK, mvneta_poll() 2178 pp->cause_rx_tx = cause_rx_tx; mvneta_poll() 2183 static int mvneta_rxq_fill(struct mvneta_port *pp, struct mvneta_rx_queue *rxq, mvneta_rxq_fill() argument 2190 if (mvneta_rx_refill(pp, rxq->descs + i) != 0) { mvneta_rxq_fill() 2191 netdev_err(pp->dev, "%s:rxq %d, %d of %d buffs filled\n", mvneta_rxq_fill() 2200 mvneta_rxq_non_occup_desc_add(pp, rxq, i); mvneta_rxq_fill() 2206 static void mvneta_tx_reset(struct mvneta_port *pp) mvneta_tx_reset() argument 2212 mvneta_txq_done_force(pp, &pp->txqs[queue]); mvneta_tx_reset() 2214 mvreg_write(pp, MVNETA_PORT_TX_RESET, MVNETA_PORT_TX_DMA_RESET); mvneta_tx_reset() 2215 mvreg_write(pp, MVNETA_PORT_TX_RESET, 0); mvneta_tx_reset() 2218 static void mvneta_rx_reset(struct mvneta_port *pp) mvneta_rx_reset() argument 2220 mvreg_write(pp, MVNETA_PORT_RX_RESET, MVNETA_PORT_RX_DMA_RESET); mvneta_rx_reset() 2221 mvreg_write(pp, MVNETA_PORT_RX_RESET, 0); mvneta_rx_reset() 2227 static int mvneta_rxq_init(struct mvneta_port *pp, mvneta_rxq_init() argument 2231 rxq->size = pp->rx_ring_size; mvneta_rxq_init() 2234 rxq->descs = dma_alloc_coherent(pp->dev->dev.parent, mvneta_rxq_init() 2246 mvreg_write(pp, MVNETA_RXQ_BASE_ADDR_REG(rxq->id), rxq->descs_phys); mvneta_rxq_init() 2247 mvreg_write(pp, MVNETA_RXQ_SIZE_REG(rxq->id), rxq->size); mvneta_rxq_init() 2250 mvneta_rxq_offset_set(pp, rxq, NET_SKB_PAD); mvneta_rxq_init() 2253 mvneta_rx_pkts_coal_set(pp, rxq, rxq->pkts_coal); mvneta_rxq_init() 2254 mvneta_rx_time_coal_set(pp, rxq, rxq->time_coal); mvneta_rxq_init() 2257 mvneta_rxq_buf_size_set(pp, rxq, MVNETA_RX_BUF_SIZE(pp->pkt_size)); mvneta_rxq_init() 2258 mvneta_rxq_bm_disable(pp, rxq); mvneta_rxq_init() 2259 mvneta_rxq_fill(pp, rxq, rxq->size); mvneta_rxq_init() 2265 static void mvneta_rxq_deinit(struct mvneta_port *pp, mvneta_rxq_deinit() argument 2268 mvneta_rxq_drop_pkts(pp, rxq); mvneta_rxq_deinit() 2271 dma_free_coherent(pp->dev->dev.parent, mvneta_rxq_deinit() 2283 static int mvneta_txq_init(struct mvneta_port *pp, mvneta_txq_init() argument 2286 txq->size = pp->tx_ring_size; mvneta_txq_init() 2297 txq->descs = dma_alloc_coherent(pp->dev->dev.parent, mvneta_txq_init() 2310 mvreg_write(pp, MVETH_TXQ_TOKEN_CFG_REG(txq->id), 0x03ffffff); mvneta_txq_init() 2311 mvreg_write(pp, MVETH_TXQ_TOKEN_COUNT_REG(txq->id), 0x3fffffff); mvneta_txq_init() 2314 mvreg_write(pp, MVNETA_TXQ_BASE_ADDR_REG(txq->id), txq->descs_phys); mvneta_txq_init() 2315 mvreg_write(pp, MVNETA_TXQ_SIZE_REG(txq->id), txq->size); mvneta_txq_init() 2319 dma_free_coherent(pp->dev->dev.parent, mvneta_txq_init() 2326 txq->tso_hdrs = dma_alloc_coherent(pp->dev->dev.parent, mvneta_txq_init() 2331 dma_free_coherent(pp->dev->dev.parent, mvneta_txq_init() 2336 mvneta_tx_done_pkts_coal_set(pp, txq, txq->done_pkts_coal); mvneta_txq_init() 2342 static void mvneta_txq_deinit(struct mvneta_port *pp, mvneta_txq_deinit() argument 2348 dma_free_coherent(pp->dev->dev.parent, mvneta_txq_deinit() 2352 dma_free_coherent(pp->dev->dev.parent, mvneta_txq_deinit() 2362 mvreg_write(pp, MVETH_TXQ_TOKEN_CFG_REG(txq->id), 0); mvneta_txq_deinit() 2363 mvreg_write(pp, MVETH_TXQ_TOKEN_COUNT_REG(txq->id), 0); mvneta_txq_deinit() 2366 mvreg_write(pp, MVNETA_TXQ_BASE_ADDR_REG(txq->id), 0); mvneta_txq_deinit() 2367 mvreg_write(pp, MVNETA_TXQ_SIZE_REG(txq->id), 0); mvneta_txq_deinit() 2371 static void mvneta_cleanup_txqs(struct mvneta_port *pp) mvneta_cleanup_txqs() argument 2376 mvneta_txq_deinit(pp, &pp->txqs[queue]); mvneta_cleanup_txqs() 2380 static void mvneta_cleanup_rxqs(struct mvneta_port *pp) mvneta_cleanup_rxqs() argument 2385 mvneta_rxq_deinit(pp, &pp->rxqs[queue]); mvneta_cleanup_rxqs() 2390 static int mvneta_setup_rxqs(struct mvneta_port *pp) mvneta_setup_rxqs() argument 2395 int err = mvneta_rxq_init(pp, &pp->rxqs[queue]); mvneta_setup_rxqs() 2397 netdev_err(pp->dev, "%s: can't create rxq=%d\n", mvneta_setup_rxqs() 2399 mvneta_cleanup_rxqs(pp); mvneta_setup_rxqs() 2408 static int mvneta_setup_txqs(struct mvneta_port *pp) mvneta_setup_txqs() argument 2413 int err = mvneta_txq_init(pp, &pp->txqs[queue]); mvneta_setup_txqs() 2415 netdev_err(pp->dev, "%s: can't create txq=%d\n", mvneta_setup_txqs() 2417 mvneta_cleanup_txqs(pp); mvneta_setup_txqs() 2425 static void mvneta_start_dev(struct mvneta_port *pp) mvneta_start_dev() argument 2427 mvneta_max_rx_size_set(pp, pp->pkt_size); mvneta_start_dev() 2428 mvneta_txq_max_tx_size_set(pp, pp->pkt_size); mvneta_start_dev() 2431 mvneta_port_enable(pp); mvneta_start_dev() 2434 napi_enable(&pp->napi); mvneta_start_dev() 2437 mvreg_write(pp, MVNETA_INTR_NEW_MASK, mvneta_start_dev() 2441 mvreg_write(pp, MVNETA_INTR_MISC_MASK, mvneta_start_dev() 2446 phy_start(pp->phy_dev); mvneta_start_dev() 2447 netif_tx_start_all_queues(pp->dev); mvneta_start_dev() 2450 static void mvneta_stop_dev(struct mvneta_port *pp) mvneta_stop_dev() argument 2452 phy_stop(pp->phy_dev); mvneta_stop_dev() 2454 napi_disable(&pp->napi); mvneta_stop_dev() 2456 netif_carrier_off(pp->dev); mvneta_stop_dev() 2458 mvneta_port_down(pp); mvneta_stop_dev() 2459 netif_tx_stop_all_queues(pp->dev); mvneta_stop_dev() 2462 mvneta_port_disable(pp); mvneta_stop_dev() 2465 mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0); mvneta_stop_dev() 2466 mvreg_write(pp, MVNETA_INTR_OLD_CAUSE, 0); mvneta_stop_dev() 2469 mvreg_write(pp, MVNETA_INTR_NEW_MASK, 0); mvneta_stop_dev() 2470 mvreg_write(pp, MVNETA_INTR_OLD_MASK, 0); mvneta_stop_dev() 2471 mvreg_write(pp, MVNETA_INTR_MISC_MASK, 0); mvneta_stop_dev() 2473 mvneta_tx_reset(pp); mvneta_stop_dev() 2474 mvneta_rx_reset(pp); mvneta_stop_dev() 2503 struct mvneta_port *pp = netdev_priv(dev); mvneta_change_mtu() local 2520 mvneta_stop_dev(pp); mvneta_change_mtu() 2522 mvneta_cleanup_txqs(pp); mvneta_change_mtu() 2523 mvneta_cleanup_rxqs(pp); mvneta_change_mtu() 2525 pp->pkt_size = MVNETA_RX_PKT_SIZE(dev->mtu); mvneta_change_mtu() 2526 pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) + mvneta_change_mtu() 2529 ret = mvneta_setup_rxqs(pp); mvneta_change_mtu() 2535 ret = mvneta_setup_txqs(pp); mvneta_change_mtu() 2541 mvneta_start_dev(pp); mvneta_change_mtu() 2542 mvneta_port_up(pp); mvneta_change_mtu() 2552 struct mvneta_port *pp = netdev_priv(dev); mvneta_fix_features() local 2554 if (pp->tx_csum_limit && dev->mtu > pp->tx_csum_limit) { mvneta_fix_features() 2558 pp->tx_csum_limit); mvneta_fix_features() 2565 static void mvneta_get_mac_addr(struct mvneta_port *pp, unsigned char *addr) mvneta_get_mac_addr() argument 2569 mac_addr_l = mvreg_read(pp, MVNETA_MAC_ADDR_LOW); mvneta_get_mac_addr() 2570 mac_addr_h = mvreg_read(pp, MVNETA_MAC_ADDR_HIGH); mvneta_get_mac_addr() 2582 struct mvneta_port *pp = netdev_priv(dev); mvneta_set_mac_addr() local 2590 mvneta_mac_addr_set(pp, dev->dev_addr, -1); mvneta_set_mac_addr() 2593 mvneta_mac_addr_set(pp, sockaddr->sa_data, rxq_def); mvneta_set_mac_addr() 2601 struct mvneta_port *pp = netdev_priv(ndev); mvneta_adjust_link() local 2602 struct phy_device *phydev = pp->phy_dev; mvneta_adjust_link() 2606 if ((pp->speed != phydev->speed) || mvneta_adjust_link() 2607 (pp->duplex != phydev->duplex)) { mvneta_adjust_link() 2610 val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG); mvneta_adjust_link() 2623 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); mvneta_adjust_link() 2625 pp->duplex = phydev->duplex; mvneta_adjust_link() 2626 pp->speed = phydev->speed; mvneta_adjust_link() 2630 if (phydev->link != pp->link) { mvneta_adjust_link() 2632 pp->duplex = -1; mvneta_adjust_link() 2633 pp->speed = 0; mvneta_adjust_link() 2636 pp->link = phydev->link; mvneta_adjust_link() 2642 if (!pp->use_inband_status) { mvneta_adjust_link() 2643 u32 val = mvreg_read(pp, mvneta_adjust_link() 2647 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, mvneta_adjust_link() 2650 mvneta_port_up(pp); mvneta_adjust_link() 2652 if (!pp->use_inband_status) { mvneta_adjust_link() 2653 u32 val = mvreg_read(pp, mvneta_adjust_link() 2657 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, mvneta_adjust_link() 2660 mvneta_port_down(pp); mvneta_adjust_link() 2666 static int mvneta_mdio_probe(struct mvneta_port *pp) mvneta_mdio_probe() argument 2670 phy_dev = of_phy_connect(pp->dev, pp->phy_node, mvneta_adjust_link, 0, mvneta_mdio_probe() 2671 pp->phy_interface); mvneta_mdio_probe() 2673 netdev_err(pp->dev, "could not find the PHY\n"); mvneta_mdio_probe() 2680 pp->phy_dev = phy_dev; mvneta_mdio_probe() 2681 pp->link = 0; mvneta_mdio_probe() 2682 pp->duplex = 0; mvneta_mdio_probe() 2683 pp->speed = 0; mvneta_mdio_probe() 2688 static void mvneta_mdio_remove(struct mvneta_port *pp) mvneta_mdio_remove() argument 2690 phy_disconnect(pp->phy_dev); mvneta_mdio_remove() 2691 pp->phy_dev = NULL; mvneta_mdio_remove() 2696 struct mvneta_port *pp = netdev_priv(dev); mvneta_open() local 2699 pp->pkt_size = MVNETA_RX_PKT_SIZE(pp->dev->mtu); mvneta_open() 2700 pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) + mvneta_open() 2703 ret = mvneta_setup_rxqs(pp); mvneta_open() 2707 ret = mvneta_setup_txqs(pp); mvneta_open() 2712 ret = request_irq(pp->dev->irq, mvneta_isr, 0, mvneta_open() 2713 MVNETA_DRIVER_NAME, pp); mvneta_open() 2715 netdev_err(pp->dev, "cannot request irq %d\n", pp->dev->irq); mvneta_open() 2720 netif_carrier_off(pp->dev); mvneta_open() 2722 ret = mvneta_mdio_probe(pp); mvneta_open() 2728 mvneta_start_dev(pp); mvneta_open() 2733 free_irq(pp->dev->irq, pp); mvneta_open() 2735 mvneta_cleanup_txqs(pp); mvneta_open() 2737 mvneta_cleanup_rxqs(pp); mvneta_open() 2744 struct mvneta_port *pp = netdev_priv(dev); mvneta_stop() local 2746 mvneta_stop_dev(pp); mvneta_stop() 2747 mvneta_mdio_remove(pp); mvneta_stop() 2748 free_irq(dev->irq, pp); mvneta_stop() 2749 mvneta_cleanup_rxqs(pp); mvneta_stop() 2750 mvneta_cleanup_txqs(pp); mvneta_stop() 2757 struct mvneta_port *pp = netdev_priv(dev); mvneta_ioctl() local 2759 if (!pp->phy_dev) mvneta_ioctl() 2762 return phy_mii_ioctl(pp->phy_dev, ifr, cmd); mvneta_ioctl() 2770 struct mvneta_port *pp = netdev_priv(dev); mvneta_ethtool_get_settings() local 2772 if (!pp->phy_dev) mvneta_ethtool_get_settings() 2775 return phy_ethtool_gset(pp->phy_dev, cmd); mvneta_ethtool_get_settings() 2781 struct mvneta_port *pp = netdev_priv(dev); mvneta_ethtool_set_settings() local 2783 if (!pp->phy_dev) mvneta_ethtool_set_settings() 2786 return phy_ethtool_sset(pp->phy_dev, cmd); mvneta_ethtool_set_settings() 2793 struct mvneta_port *pp = netdev_priv(dev); mvneta_ethtool_set_coalesce() local 2797 struct mvneta_rx_queue *rxq = &pp->rxqs[queue]; mvneta_ethtool_set_coalesce() 2800 mvneta_rx_pkts_coal_set(pp, rxq, rxq->pkts_coal); mvneta_ethtool_set_coalesce() 2801 mvneta_rx_time_coal_set(pp, rxq, rxq->time_coal); mvneta_ethtool_set_coalesce() 2805 struct mvneta_tx_queue *txq = &pp->txqs[queue]; mvneta_ethtool_set_coalesce() 2807 mvneta_tx_done_pkts_coal_set(pp, txq, txq->done_pkts_coal); mvneta_ethtool_set_coalesce() 2817 struct mvneta_port *pp = netdev_priv(dev); mvneta_ethtool_get_coalesce() local 2819 c->rx_coalesce_usecs = pp->rxqs[0].time_coal; mvneta_ethtool_get_coalesce() 2820 c->rx_max_coalesced_frames = pp->rxqs[0].pkts_coal; mvneta_ethtool_get_coalesce() 2822 c->tx_max_coalesced_frames = pp->txqs[0].done_pkts_coal; mvneta_ethtool_get_coalesce() 2842 struct mvneta_port *pp = netdev_priv(netdev); mvneta_ethtool_get_ringparam() local 2846 ring->rx_pending = pp->rx_ring_size; mvneta_ethtool_get_ringparam() 2847 ring->tx_pending = pp->tx_ring_size; mvneta_ethtool_get_ringparam() 2853 struct mvneta_port *pp = netdev_priv(dev); mvneta_ethtool_set_ringparam() local 2857 pp->rx_ring_size = ring->rx_pending < MVNETA_MAX_RXD ? mvneta_ethtool_set_ringparam() 2860 pp->tx_ring_size = clamp_t(u16, ring->tx_pending, mvneta_ethtool_set_ringparam() 2862 if (pp->tx_ring_size != ring->tx_pending) mvneta_ethtool_set_ringparam() 2864 pp->tx_ring_size, ring->tx_pending); mvneta_ethtool_set_ringparam() 2902 static int mvneta_init(struct device *dev, struct mvneta_port *pp) mvneta_init() argument 2907 mvneta_port_disable(pp); mvneta_init() 2910 mvneta_defaults_set(pp); mvneta_init() 2912 pp->txqs = devm_kcalloc(dev, txq_number, sizeof(struct mvneta_tx_queue), mvneta_init() 2914 if (!pp->txqs) mvneta_init() 2919 struct mvneta_tx_queue *txq = &pp->txqs[queue]; mvneta_init() 2921 txq->size = pp->tx_ring_size; mvneta_init() 2925 pp->rxqs = devm_kcalloc(dev, rxq_number, sizeof(struct mvneta_rx_queue), mvneta_init() 2927 if (!pp->rxqs) mvneta_init() 2932 struct mvneta_rx_queue *rxq = &pp->rxqs[queue]; mvneta_init() 2934 rxq->size = pp->rx_ring_size; mvneta_init() 2943 static void mvneta_conf_mbus_windows(struct mvneta_port *pp, mvneta_conf_mbus_windows() argument 2951 mvreg_write(pp, MVNETA_WIN_BASE(i), 0); mvneta_conf_mbus_windows() 2952 mvreg_write(pp, MVNETA_WIN_SIZE(i), 0); mvneta_conf_mbus_windows() 2955 mvreg_write(pp, MVNETA_WIN_REMAP(i), 0); mvneta_conf_mbus_windows() 2963 mvreg_write(pp, MVNETA_WIN_BASE(i), (cs->base & 0xffff0000) | mvneta_conf_mbus_windows() 2966 mvreg_write(pp, MVNETA_WIN_SIZE(i), mvneta_conf_mbus_windows() 2973 mvreg_write(pp, MVNETA_BASE_ADDR_ENABLE, win_enable); mvneta_conf_mbus_windows() 2977 static int mvneta_port_power_up(struct mvneta_port *pp, int phy_mode) mvneta_port_power_up() argument 2982 mvreg_write(pp, MVNETA_UNIT_INTR_CAUSE, 0); mvneta_port_power_up() 2984 ctrl = mvreg_read(pp, MVNETA_GMAC_CTRL_2); mvneta_port_power_up() 2991 mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_QSGMII_SERDES_PROTO); mvneta_port_power_up() 2995 mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_SGMII_SERDES_PROTO); mvneta_port_power_up() 3006 if (pp->use_inband_status) mvneta_port_power_up() 3011 mvreg_write(pp, MVNETA_GMAC_CTRL_2, ctrl); mvneta_port_power_up() 3013 while ((mvreg_read(pp, MVNETA_GMAC_CTRL_2) & mvneta_port_power_up() 3027 struct mvneta_port *pp; mvneta_probe() local 3087 pp = netdev_priv(dev); mvneta_probe() 3088 pp->phy_node = phy_node; mvneta_probe() 3089 pp->phy_interface = phy_mode; mvneta_probe() 3092 pp->use_inband_status = (err == 0 && mvneta_probe() 3095 pp->clk = devm_clk_get(&pdev->dev, NULL); mvneta_probe() 3096 if (IS_ERR(pp->clk)) { mvneta_probe() 3097 err = PTR_ERR(pp->clk); mvneta_probe() 3101 clk_prepare_enable(pp->clk); mvneta_probe() 3104 pp->base = devm_ioremap_resource(&pdev->dev, res); mvneta_probe() 3105 if (IS_ERR(pp->base)) { mvneta_probe() 3106 err = PTR_ERR(pp->base); mvneta_probe() 3111 pp->stats = netdev_alloc_pcpu_stats(struct mvneta_pcpu_stats); mvneta_probe() 3112 if (!pp->stats) { mvneta_probe() 3122 mvneta_get_mac_addr(pp, hw_mac_addr); mvneta_probe() 3133 pp->tx_csum_limit = 1600; mvneta_probe() 3135 pp->tx_ring_size = MVNETA_MAX_TXD; mvneta_probe() 3136 pp->rx_ring_size = MVNETA_MAX_RXD; mvneta_probe() 3138 pp->dev = dev; mvneta_probe() 3141 err = mvneta_init(&pdev->dev, pp); mvneta_probe() 3145 err = mvneta_port_power_up(pp, phy_mode); mvneta_probe() 3153 mvneta_conf_mbus_windows(pp, dram_target_info); mvneta_probe() 3155 netif_napi_add(dev, &pp->napi, mvneta_poll, NAPI_POLL_WEIGHT); mvneta_probe() 3172 platform_set_drvdata(pdev, pp->dev); mvneta_probe() 3174 if (pp->use_inband_status) { mvneta_probe() 3177 mvneta_fixed_link_update(pp, phy); mvneta_probe() 3183 free_percpu(pp->stats); mvneta_probe() 3185 clk_disable_unprepare(pp->clk); mvneta_probe() 3199 struct mvneta_port *pp = netdev_priv(dev); mvneta_remove() local 3202 clk_disable_unprepare(pp->clk); mvneta_remove() 3203 free_percpu(pp->stats); mvneta_remove() 3205 of_node_put(pp->phy_node); mvneta_remove() 1572 mvneta_tso_put_hdr(struct sk_buff *skb, struct mvneta_port *pp, struct mvneta_tx_queue *txq) mvneta_tso_put_hdr() argument
|
/linux-4.1.27/drivers/usb/misc/ |
H A D | uss720.c | 65 struct parport *pp; member in struct:parport_uss720_private 114 struct parport *pp; async_complete() local 120 pp = priv->pp; async_complete() 131 if (rq->reg[2] & rq->reg[1] & 0x10 && pp) async_complete() 132 parport_generic_irq(pp); async_complete() 211 static int get_1284_register(struct parport *pp, unsigned char reg, unsigned char *val, gfp_t mem_flags) get_1284_register() argument 220 if (!pp) get_1284_register() 222 priv = pp->private_data; get_1284_register() 247 static int set_1284_register(struct parport *pp, unsigned char reg, unsigned char val, gfp_t mem_flags) set_1284_register() argument 252 if (!pp) set_1284_register() 254 priv = pp->private_data; set_1284_register() 275 static int change_mode(struct parport *pp, int m) change_mode() argument 277 struct parport_uss720_private *priv = pp->private_data; change_mode() 281 if (get_1284_register(pp, 6, ®, GFP_KERNEL)) change_mode() 289 if (change_mode(pp, ECR_PS2)) change_mode() 295 unsigned long expire = jiffies + pp->physport->cad->timeout; change_mode() 301 if (get_1284_register(pp, 6, ®, GFP_KERNEL)) change_mode() 315 if (set_1284_register(pp, 6, m << 5, GFP_KERNEL)) change_mode() 317 if (get_1284_register(pp, 6, ®, GFP_KERNEL)) change_mode() 325 static int clear_epp_timeout(struct parport *pp) clear_epp_timeout() argument 329 if (get_1284_register(pp, 1, &stat, GFP_KERNEL)) clear_epp_timeout() 340 struct parport *pp = (struct parport *)dev_id; 341 struct parport_uss720_private *priv = pp->private_data; 348 parport_generic_irq(pp); 353 static void parport_uss720_write_data(struct parport *pp, unsigned char d) parport_uss720_write_data() argument 355 set_1284_register(pp, 0, d, GFP_KERNEL); parport_uss720_write_data() 358 static unsigned char parport_uss720_read_data(struct parport *pp) parport_uss720_read_data() argument 362 if (get_1284_register(pp, 0, &ret, GFP_KERNEL)) parport_uss720_read_data() 367 static void parport_uss720_write_control(struct parport *pp, unsigned char d) parport_uss720_write_control() argument 369 struct parport_uss720_private *priv = pp->private_data; parport_uss720_write_control() 372 if (set_1284_register(pp, 2, d, GFP_KERNEL)) parport_uss720_write_control() 377 static unsigned char parport_uss720_read_control(struct parport *pp) parport_uss720_read_control() argument 379 struct parport_uss720_private *priv = pp->private_data; parport_uss720_read_control() 383 static unsigned char parport_uss720_frob_control(struct parport *pp, unsigned char mask, unsigned char val) parport_uss720_frob_control() argument 385 struct parport_uss720_private *priv = pp->private_data; parport_uss720_frob_control() 391 if (set_1284_register(pp, 2, d, GFP_KERNEL)) parport_uss720_frob_control() 397 static unsigned char parport_uss720_read_status(struct parport *pp) parport_uss720_read_status() argument 401 if (get_1284_register(pp, 1, &ret, GFP_KERNEL)) parport_uss720_read_status() 406 static void parport_uss720_disable_irq(struct parport *pp) parport_uss720_disable_irq() argument 408 struct parport_uss720_private *priv = pp->private_data; parport_uss720_disable_irq() 412 if (set_1284_register(pp, 2, d, GFP_KERNEL)) parport_uss720_disable_irq() 417 static void parport_uss720_enable_irq(struct parport *pp) parport_uss720_enable_irq() argument 419 struct parport_uss720_private *priv = pp->private_data; parport_uss720_enable_irq() 423 if (set_1284_register(pp, 2, d, GFP_KERNEL)) parport_uss720_enable_irq() 428 static void parport_uss720_data_forward (struct parport *pp) parport_uss720_data_forward() argument 430 struct parport_uss720_private *priv = pp->private_data; parport_uss720_data_forward() 434 if (set_1284_register(pp, 2, d, GFP_KERNEL)) parport_uss720_data_forward() 439 static void parport_uss720_data_reverse (struct parport *pp) parport_uss720_data_reverse() argument 441 struct parport_uss720_private *priv = pp->private_data; parport_uss720_data_reverse() 445 if (set_1284_register(pp, 2, d, GFP_KERNEL)) parport_uss720_data_reverse() 456 static void parport_uss720_save_state(struct parport *pp, struct parport_state *s) parport_uss720_save_state() argument 458 struct parport_uss720_private *priv = pp->private_data; parport_uss720_save_state() 461 if (get_1284_register(pp, 2, NULL, GFP_ATOMIC)) parport_uss720_save_state() 468 static void parport_uss720_restore_state(struct parport *pp, struct parport_state *s) parport_uss720_restore_state() argument 470 struct parport_uss720_private *priv = pp->private_data; parport_uss720_restore_state() 472 set_1284_register(pp, 2, s->u.pc.ctr, GFP_ATOMIC); parport_uss720_restore_state() 473 set_1284_register(pp, 6, s->u.pc.ecr, GFP_ATOMIC); parport_uss720_restore_state() 474 get_1284_register(pp, 2, NULL, GFP_ATOMIC); parport_uss720_restore_state() 479 static size_t parport_uss720_epp_read_data(struct parport *pp, void *buf, size_t length, int flags) parport_uss720_epp_read_data() argument 481 struct parport_uss720_private *priv = pp->private_data; parport_uss720_epp_read_data() 484 if (change_mode(pp, ECR_EPP)) parport_uss720_epp_read_data() 487 if (get_1284_register(pp, 4, (char *)buf, GFP_KERNEL)) parport_uss720_epp_read_data() 491 clear_epp_timeout(pp); parport_uss720_epp_read_data() 495 change_mode(pp, ECR_PS2); parport_uss720_epp_read_data() 499 static size_t parport_uss720_epp_write_data(struct parport *pp, const void *buf, size_t length, int flags) parport_uss720_epp_write_data() argument 502 struct parport_uss720_private *priv = pp->private_data; parport_uss720_epp_write_data() 505 if (change_mode(pp, ECR_EPP)) parport_uss720_epp_write_data() 508 if (set_1284_register(pp, 4, (char *)buf, GFP_KERNEL)) parport_uss720_epp_write_data() 511 if (get_1284_register(pp, 1, NULL, GFP_KERNEL)) parport_uss720_epp_write_data() 514 clear_epp_timeout(pp); parport_uss720_epp_write_data() 518 change_mode(pp, ECR_PS2); parport_uss720_epp_write_data() 521 struct parport_uss720_private *priv = pp->private_data; parport_uss720_epp_write_data() 528 if (change_mode(pp, ECR_EPP)) parport_uss720_epp_write_data() 533 change_mode(pp, ECR_PS2); parport_uss720_epp_write_data() 538 static size_t parport_uss720_epp_read_addr(struct parport *pp, void *buf, size_t length, int flags) parport_uss720_epp_read_addr() argument 540 struct parport_uss720_private *priv = pp->private_data; parport_uss720_epp_read_addr() 543 if (change_mode(pp, ECR_EPP)) parport_uss720_epp_read_addr() 546 if (get_1284_register(pp, 3, (char *)buf, GFP_KERNEL)) parport_uss720_epp_read_addr() 550 clear_epp_timeout(pp); parport_uss720_epp_read_addr() 554 change_mode(pp, ECR_PS2); parport_uss720_epp_read_addr() 558 static size_t parport_uss720_epp_write_addr(struct parport *pp, const void *buf, size_t length, int flags) parport_uss720_epp_write_addr() argument 560 struct parport_uss720_private *priv = pp->private_data; parport_uss720_epp_write_addr() 563 if (change_mode(pp, ECR_EPP)) parport_uss720_epp_write_addr() 566 if (set_1284_register(pp, 3, *(char *)buf, GFP_KERNEL)) parport_uss720_epp_write_addr() 569 if (get_1284_register(pp, 1, NULL, GFP_KERNEL)) parport_uss720_epp_write_addr() 572 clear_epp_timeout(pp); parport_uss720_epp_write_addr() 576 change_mode(pp, ECR_PS2); parport_uss720_epp_write_addr() 580 static size_t parport_uss720_ecp_write_data(struct parport *pp, const void *buffer, size_t len, int flags) parport_uss720_ecp_write_data() argument 582 struct parport_uss720_private *priv = pp->private_data; parport_uss720_ecp_write_data() 589 if (change_mode(pp, ECR_ECP)) parport_uss720_ecp_write_data() 594 change_mode(pp, ECR_PS2); parport_uss720_ecp_write_data() 598 static size_t parport_uss720_ecp_read_data(struct parport *pp, void *buffer, size_t len, int flags) parport_uss720_ecp_read_data() argument 600 struct parport_uss720_private *priv = pp->private_data; parport_uss720_ecp_read_data() 607 if (change_mode(pp, ECR_ECP)) parport_uss720_ecp_read_data() 612 change_mode(pp, ECR_PS2); parport_uss720_ecp_read_data() 616 static size_t parport_uss720_ecp_write_addr(struct parport *pp, const void *buffer, size_t len, int flags) parport_uss720_ecp_write_addr() argument 620 if (change_mode(pp, ECR_ECP)) parport_uss720_ecp_write_addr() 623 if (set_1284_register(pp, 5, *(char *)buffer, GFP_KERNEL)) parport_uss720_ecp_write_addr() 627 change_mode(pp, ECR_PS2); parport_uss720_ecp_write_addr() 631 static size_t parport_uss720_write_compat(struct parport *pp, const void *buffer, size_t len, int flags) parport_uss720_write_compat() argument 633 struct parport_uss720_private *priv = pp->private_data; parport_uss720_write_compat() 640 if (change_mode(pp, ECR_PPF)) parport_uss720_write_compat() 645 change_mode(pp, ECR_PS2); parport_uss720_write_compat() 696 struct parport *pp; uss720_probe() local 721 priv->pp = NULL; uss720_probe() 726 if (!(pp = parport_register_port(0, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &parport_uss720_ops))) { uss720_probe() 731 priv->pp = pp; uss720_probe() 732 pp->private_data = priv; uss720_probe() 733 pp->modes = PARPORT_MODE_PCSPP | PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP | PARPORT_MODE_ECP | PARPORT_MODE_COMPAT; uss720_probe() 736 set_1284_register(pp, 7, 0x00, GFP_KERNEL); uss720_probe() 737 set_1284_register(pp, 6, 0x30, GFP_KERNEL); /* PS/2 mode */ uss720_probe() 738 set_1284_register(pp, 2, 0x0c, GFP_KERNEL); uss720_probe() 740 get_1284_register(pp, 0, ®, GFP_KERNEL); uss720_probe() 746 parport_announce_port(pp); uss720_probe() 748 usb_set_intfdata(intf, pp); uss720_probe() 759 struct parport *pp = usb_get_intfdata(intf); uss720_disconnect() local 765 if (pp) { uss720_disconnect() 766 priv = pp->private_data; uss720_disconnect() 769 priv->pp = NULL; uss720_disconnect() 771 parport_remove_port(pp); uss720_disconnect() 772 parport_put_port(pp); uss720_disconnect()
|
/linux-4.1.27/net/netfilter/ipvs/ |
H A D | ip_vs_proto.c | 49 static int __used __init register_ip_vs_protocol(struct ip_vs_protocol *pp) register_ip_vs_protocol() argument 51 unsigned int hash = IP_VS_PROTO_HASH(pp->protocol); register_ip_vs_protocol() 53 pp->next = ip_vs_proto_table[hash]; register_ip_vs_protocol() 54 ip_vs_proto_table[hash] = pp; register_ip_vs_protocol() 56 if (pp->init != NULL) register_ip_vs_protocol() 57 pp->init(pp); register_ip_vs_protocol() 66 register_ip_vs_proto_netns(struct net *net, struct ip_vs_protocol *pp) register_ip_vs_proto_netns() argument 69 unsigned int hash = IP_VS_PROTO_HASH(pp->protocol); register_ip_vs_proto_netns() 76 pd->pp = pp; /* For speed issues */ register_ip_vs_proto_netns() 81 if (pp->init_netns != NULL) { register_ip_vs_proto_netns() 82 int ret = pp->init_netns(net, pd); register_ip_vs_proto_netns() 97 static int unregister_ip_vs_protocol(struct ip_vs_protocol *pp) unregister_ip_vs_protocol() argument 100 unsigned int hash = IP_VS_PROTO_HASH(pp->protocol); unregister_ip_vs_protocol() 104 if (*pp_p == pp) { unregister_ip_vs_protocol() 105 *pp_p = pp->next; unregister_ip_vs_protocol() 106 if (pp->exit != NULL) unregister_ip_vs_protocol() 107 pp->exit(pp); unregister_ip_vs_protocol() 123 unsigned int hash = IP_VS_PROTO_HASH(pd->pp->protocol); unregister_ip_vs_proto_netns() 129 if (pd->pp->exit_netns != NULL) unregister_ip_vs_proto_netns() 130 pd->pp->exit_netns(net, pd); unregister_ip_vs_proto_netns() 144 struct ip_vs_protocol *pp; ip_vs_proto_get() local 147 for (pp = ip_vs_proto_table[hash]; pp; pp = pp->next) { ip_vs_proto_get() 148 if (pp->protocol == proto) ip_vs_proto_get() 149 return pp; ip_vs_proto_get() 166 if (pd->pp->protocol == proto) __ipvs_proto_data_get() 192 if (pd->pp->timeout_change) ip_vs_protocol_timeout_change() 193 pd->pp->timeout_change(pd, flags); ip_vs_protocol_timeout_change() 230 struct ip_vs_protocol *pp = ip_vs_proto_get(proto); ip_vs_state_name() local 232 if (pp == NULL || pp->state_name == NULL) ip_vs_state_name() 234 return pp->state_name(state); ip_vs_state_name() 239 ip_vs_tcpudp_debug_packet_v4(struct ip_vs_protocol *pp, ip_vs_tcpudp_debug_packet_v4() argument 266 pr_debug("%s: %s %s\n", msg, pp->name, buf); ip_vs_tcpudp_debug_packet_v4() 271 ip_vs_tcpudp_debug_packet_v6(struct ip_vs_protocol *pp, ip_vs_tcpudp_debug_packet_v6() argument 298 pr_debug("%s: %s %s\n", msg, pp->name, buf); ip_vs_tcpudp_debug_packet_v6() 304 ip_vs_tcpudp_debug_packet(int af, struct ip_vs_protocol *pp, ip_vs_tcpudp_debug_packet() argument 311 ip_vs_tcpudp_debug_packet_v6(pp, skb, offset, msg); ip_vs_tcpudp_debug_packet() 314 ip_vs_tcpudp_debug_packet_v4(pp, skb, offset, msg); ip_vs_tcpudp_debug_packet() 401 struct ip_vs_protocol *pp; ip_vs_protocol_cleanup() local 406 while ((pp = ip_vs_proto_table[i]) != NULL) ip_vs_protocol_cleanup() 407 unregister_ip_vs_protocol(pp); ip_vs_protocol_cleanup()
|
H A D | ip_vs_proto_udp.c | 127 udp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, udp_snat_handler() argument 149 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) udp_snat_handler() 179 skb->ip_summed = (cp->app && pp->csum_check) ? udp_snat_handler() 202 pp->name, udph->check, udp_snat_handler() 210 udp_dnat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, udp_dnat_handler() argument 232 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) udp_dnat_handler() 263 skb->ip_summed = (cp->app && pp->csum_check) ? udp_dnat_handler() 291 udp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp) udp_csum_check() argument 320 IP_VS_DBG_RL_PKT(0, af, pp, skb, 0, udp_csum_check() 331 IP_VS_DBG_RL_PKT(0, af, pp, skb, 0, udp_csum_check()
|
H A D | ip_vs_core.c | 207 if (likely(pd->pp->state_transition)) ip_vs_set_state() 208 pd->pp->state_transition(cp, direction, skb, pd); ip_vs_set_state() 417 struct ip_vs_protocol *pp = pd->pp; ip_vs_schedule() local 439 IP_VS_DBG_PKT(12, svc->af, pp, skb, 0, ip_vs_schedule() 448 (cp = pp->conn_in_get(svc->af, skb, iph, 1))) { ip_vs_schedule() 449 IP_VS_DBG_PKT(12, svc->af, pp, skb, 0, ip_vs_schedule() 586 ret = cp->packet_xmit(skb, cp, pd->pp, iph); ip_vs_leave() 708 void ip_vs_nat_icmp(struct sk_buff *skb, struct ip_vs_protocol *pp, ip_vs_nat_icmp() argument 746 IP_VS_DBG_PKT(11, AF_INET, pp, skb, (void *)ciph - (void *)iph, ip_vs_nat_icmp() 749 IP_VS_DBG_PKT(11, AF_INET, pp, skb, (void *)ciph - (void *)iph, ip_vs_nat_icmp() 754 void ip_vs_nat_icmp_v6(struct sk_buff *skb, struct ip_vs_protocol *pp, ip_vs_nat_icmp_v6() argument 803 IP_VS_DBG_PKT(11, AF_INET6, pp, skb, ip_vs_nat_icmp_v6() 807 IP_VS_DBG_PKT(11, AF_INET6, pp, skb, ip_vs_nat_icmp_v6() 819 struct ip_vs_protocol *pp, handle_response_icmp() 846 ip_vs_nat_icmp_v6(skb, pp, cp, 1); handle_response_icmp() 849 ip_vs_nat_icmp(skb, pp, cp, 1); handle_response_icmp() 883 struct ip_vs_protocol *pp; ip_vs_out_icmp() local 925 pp = ip_vs_proto_get(cih->protocol); ip_vs_out_icmp() 926 if (!pp) ip_vs_out_icmp() 931 pp->dont_defrag)) ip_vs_out_icmp() 934 IP_VS_DBG_PKT(11, AF_INET, pp, skb, offset, ip_vs_out_icmp() 940 cp = pp->conn_out_get(AF_INET, skb, &ciph, 1); ip_vs_out_icmp() 946 pp, ciph.len, ihl, hooknum); ip_vs_out_icmp() 957 struct ip_vs_protocol *pp; ip_vs_out_icmp_v6() local 999 pp = ip_vs_proto_get(ciph.protocol); ip_vs_out_icmp_v6() 1000 if (!pp) ip_vs_out_icmp_v6() 1004 cp = pp->conn_out_get(AF_INET6, skb, &ciph, 1); ip_vs_out_icmp_v6() 1011 pp, writable, sizeof(struct ipv6hdr), ip_vs_out_icmp_v6() 1094 struct ip_vs_protocol *pp = pd->pp; handle_response() local 1096 IP_VS_DBG_PKT(11, af, pp, skb, 0, "Outgoing packet"); handle_response() 1102 if (pp->snat_handler && !pp->snat_handler(skb, pp, cp, iph)) handle_response() 1133 IP_VS_DBG_PKT(10, af, pp, skb, 0, "After SNAT"); handle_response() 1162 struct ip_vs_protocol *pp; ip_vs_out() local 1213 pp = pd->pp; ip_vs_out() 1219 if (unlikely(ip_is_fragment(ip_hdr(skb)) && !pp->dont_defrag)) { ip_vs_out() 1230 cp = pp->conn_out_get(af, skb, &iph, 0); ip_vs_out() 1235 (pp->protocol == IPPROTO_TCP || ip_vs_out() 1236 pp->protocol == IPPROTO_UDP || ip_vs_out() 1237 pp->protocol == IPPROTO_SCTP)) { ip_vs_out() 1275 IP_VS_DBG_PKT(12, af, pp, skb, 0, ip_vs_out() 1345 struct ip_vs_protocol *pp; ip_vs_in_icmp() local 1408 pp = pd->pp; ip_vs_in_icmp() 1412 pp->dont_defrag)) ip_vs_in_icmp() 1415 IP_VS_DBG_PKT(11, AF_INET, pp, skb, offset, ip_vs_in_icmp() 1425 cp = pp->conn_in_get(AF_INET, skb, &ciph, ipip ? 0 : 1); ip_vs_in_icmp() 1501 verdict = ip_vs_icmp_xmit(skb, cp, pp, offset, hooknum, &ciph); ip_vs_in_icmp() 1518 struct ip_vs_protocol *pp; ip_vs_in_icmp_v6() local 1566 pp = pd->pp; ip_vs_in_icmp_v6() 1572 IP_VS_DBG_PKT(11, AF_INET6, pp, skb, offs_ciph, ip_vs_in_icmp_v6() 1578 cp = pp->conn_in_get(AF_INET6, skb, &ciph, ip_vs_in_icmp_v6() 1599 verdict = ip_vs_icmp_xmit_v6(skb, cp, pp, writable, hooknum, &ciph); ip_vs_in_icmp_v6() 1617 struct ip_vs_protocol *pp; ip_vs_in() local 1685 pp = pd->pp; ip_vs_in() 1689 cp = pp->conn_in_get(af, skb, &iph, 0); ip_vs_in() 1710 if (!pp->conn_schedule(af, skb, pd, &v, &cp, &iph)) ip_vs_in() 1716 IP_VS_DBG_PKT(12, af, pp, skb, 0, ip_vs_in() 1723 IP_VS_DBG_PKT(7, af, pp, skb, 0, "unhandled fragment"); ip_vs_in() 1728 IP_VS_DBG_PKT(11, af, pp, skb, 0, "Incoming packet"); ip_vs_in() 1746 ret = cp->packet_xmit(skb, cp, pp, &iph); ip_vs_in() 816 handle_response_icmp(int af, struct sk_buff *skb, union nf_inet_addr *snet, __u8 protocol, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, unsigned int offset, unsigned int ihl, unsigned int hooknum) handle_response_icmp() argument
|
H A D | ip_vs_app.c | 81 struct ip_vs_protocol *pp; ip_vs_app_inc_new() local 85 if (!(pp = ip_vs_proto_get(proto))) ip_vs_app_inc_new() 88 if (!pp->unregister_app) ip_vs_app_inc_new() 110 ret = pp->register_app(net, inc); ip_vs_app_inc_new() 116 pp->name, inc->name, ntohs(inc->port)); ip_vs_app_inc_new() 132 struct ip_vs_protocol *pp; ip_vs_app_inc_release() local 134 if (!(pp = ip_vs_proto_get(inc->protocol))) ip_vs_app_inc_release() 137 if (pp->unregister_app) ip_vs_app_inc_release() 138 pp->unregister_app(net, inc); ip_vs_app_inc_release() 141 pp->name, inc->name, ntohs(inc->port)); ip_vs_app_inc_release() 265 struct ip_vs_protocol *pp) ip_vs_bind_app() 267 return pp->app_conn_bind(cp); ip_vs_bind_app() 264 ip_vs_bind_app(struct ip_vs_conn *cp, struct ip_vs_protocol *pp) ip_vs_bind_app() argument
|
H A D | ip_vs_xmit.c | 600 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_null_xmit() 614 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_bypass_xmit() 646 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_bypass_xmit_v6() 678 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_nat_xmit() 715 IP_VS_DBG_RL_PKT(10, AF_INET, pp, skb, 0, ip_vs_nat_xmit() 725 IP_VS_DBG_RL_PKT(1, AF_INET, pp, skb, 0, "ip_vs_nat_xmit(): " ip_vs_nat_xmit() 738 if (pp->dnat_handler && !pp->dnat_handler(skb, pp, cp, ipvsh)) ip_vs_nat_xmit() 743 IP_VS_DBG_PKT(10, AF_INET, pp, skb, 0, "After DNAT"); ip_vs_nat_xmit() 768 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_nat_xmit_v6() 804 IP_VS_DBG_RL_PKT(10, AF_INET6, pp, skb, 0, ip_vs_nat_xmit_v6() 815 IP_VS_DBG_RL_PKT(1, AF_INET6, pp, skb, 0, ip_vs_nat_xmit_v6() 829 if (pp->dnat_handler && !pp->dnat_handler(skb, pp, cp, ipvsh)) ip_vs_nat_xmit_v6() 833 IP_VS_DBG_PKT(10, AF_INET6, pp, skb, 0, "After DNAT"); ip_vs_nat_xmit_v6() 957 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_tunnel_xmit() 1054 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_tunnel_xmit_v6() 1150 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_dr_xmit() 1189 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_dr_xmit_v6() 1231 struct ip_vs_protocol *pp, int offset, unsigned int hooknum, ip_vs_icmp_xmit() 1246 rc = cp->packet_xmit(skb, cp, pp, iph); ip_vs_icmp_xmit() 1303 ip_vs_nat_icmp(skb, pp, cp, 0); ip_vs_icmp_xmit() 1324 struct ip_vs_protocol *pp, int offset, unsigned int hooknum, ip_vs_icmp_xmit_v6() 1339 rc = cp->packet_xmit(skb, cp, pp, ipvsh); ip_vs_icmp_xmit_v6() 1395 ip_vs_nat_icmp_v6(skb, pp, cp, 0); ip_vs_icmp_xmit_v6() 599 ip_vs_null_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_null_xmit() argument 613 ip_vs_bypass_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_bypass_xmit() argument 645 ip_vs_bypass_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_bypass_xmit_v6() argument 677 ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_nat_xmit() argument 767 ip_vs_nat_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_nat_xmit_v6() argument 956 ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_tunnel_xmit() argument 1053 ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_tunnel_xmit_v6() argument 1149 ip_vs_dr_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_dr_xmit() argument 1188 ip_vs_dr_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_dr_xmit_v6() argument 1230 ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, int offset, unsigned int hooknum, struct ip_vs_iphdr *iph) ip_vs_icmp_xmit() argument 1323 ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, int offset, unsigned int hooknum, struct ip_vs_iphdr *ipvsh) ip_vs_icmp_xmit_v6() argument
|
H A D | ip_vs_proto_tcp.c | 131 tcp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, tcp_snat_handler() argument 153 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) tcp_snat_handler() 179 skb->ip_summed = (cp->app && pp->csum_check) ? tcp_snat_handler() 201 pp->name, tcph->check, tcp_snat_handler() 209 tcp_dnat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, tcp_dnat_handler() argument 231 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) tcp_dnat_handler() 262 skb->ip_summed = (cp->app && pp->csum_check) ? tcp_dnat_handler() 288 tcp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp) tcp_csum_check() argument 310 IP_VS_DBG_RL_PKT(0, af, pp, skb, 0, tcp_csum_check() 321 IP_VS_DBG_RL_PKT(0, af, pp, skb, 0, tcp_csum_check() 506 pd->pp->name, set_tcp_state()
|
H A D | ip_vs_proto_sctp.c | 79 sctp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, sctp_snat_handler() argument 99 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) sctp_snat_handler() 126 sctp_dnat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, sctp_dnat_handler() argument 146 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) sctp_dnat_handler() 174 sctp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp) sctp_csum_check() argument 196 IP_VS_DBG_RL_PKT(0, af, pp, skb, 0, sctp_csum_check() 432 pd->pp->name, set_sctp_state()
|
H A D | ip_vs_sync.c | 959 struct ip_vs_protocol *pp; ip_vs_process_message_v0() local 989 pp = ip_vs_proto_get(s->protocol); ip_vs_process_message_v0() 990 if (!pp) { ip_vs_process_message_v0() 995 if (state >= pp->num_states) { ip_vs_process_message_v0() 997 pp->name, state); ip_vs_process_message_v0() 1071 struct ip_vs_protocol *pp; ip_vs_proc_sync_conn() local 1150 pp = ip_vs_proto_get(s->v4.protocol); ip_vs_proc_sync_conn() 1151 if (!pp) { ip_vs_proc_sync_conn() 1157 if (state >= pp->num_states) { ip_vs_proc_sync_conn() 1159 pp->name, state); ip_vs_proc_sync_conn()
|
/linux-4.1.27/drivers/net/ethernet/cisco/enic/ |
H A D | enic_pp.c | 72 struct enic_port_profile *pp; enic_set_port_profile() local 81 ENIC_PP_BY_INDEX(enic, vf, pp, &err); enic_set_port_profile() 85 if (!(pp->set & ENIC_SET_NAME) || !strlen(pp->name)) enic_set_port_profile() 95 strlen(pp->name) + 1, pp->name); enic_set_port_profile() 97 if (!is_zero_ether_addr(pp->mac_addr)) { enic_set_port_profile() 98 client_mac = pp->mac_addr; enic_set_port_profile() 102 netdev_err(netdev, "Cannot find pp mac address " enic_set_port_profile() 117 if (pp->set & ENIC_SET_INSTANCE) { enic_set_port_profile() 118 sprintf(uuid_str, "%pUB", pp->instance_uuid); enic_set_port_profile() 124 if (pp->set & ENIC_SET_HOST) { enic_set_port_profile() 125 sprintf(uuid_str, "%pUB", pp->host_uuid); enic_set_port_profile() 199 struct enic_port_profile *pp; enic_pp_disassociate() local 202 ENIC_PP_BY_INDEX(enic, vf, pp, &err); enic_pp_disassociate() 207 if (!is_zero_ether_addr(pp->mac_addr)) enic_pp_disassociate() 209 pp->mac_addr); enic_pp_disassociate() 220 struct enic_port_profile *pp; enic_pp_preassociate_rr() local 224 ENIC_PP_BY_INDEX(enic, vf, pp, &err); enic_pp_preassociate_rr() 228 if (pp->request != PORT_REQUEST_ASSOCIATE) { enic_pp_preassociate_rr() 246 if (pp->request != PORT_REQUEST_ASSOCIATE) { enic_pp_preassociate_rr() 260 struct enic_port_profile *pp; enic_pp_associate() local 264 ENIC_PP_BY_INDEX(enic, vf, pp, &err); enic_pp_associate() 271 enic_are_pp_different(prev_pp, pp))) { enic_pp_associate() 294 if (!is_zero_ether_addr(pp->mac_addr)) enic_pp_associate() 296 pp->mac_addr); enic_pp_associate() 307 struct enic_port_profile *pp; enic_process_set_pp_request() local 310 ENIC_PP_BY_INDEX(enic, vf, pp, &err); enic_process_set_pp_request() 314 if (pp->request >= enic_pp_handlers_count enic_process_set_pp_request() 315 || !enic_pp_handlers[pp->request]) enic_process_set_pp_request() 318 return enic_pp_handlers[pp->request](enic, vf, prev_pp, restore_pp); enic_process_set_pp_request()
|
H A D | enic_pp.h | 22 #define ENIC_PP_BY_INDEX(enic, vf, pp, err) \ 25 pp = (vf == PORT_SELF_VF) ? enic->pp : enic->pp + vf; \ 27 pp = NULL; \
|
H A D | enic_main.c | 813 struct enic_port_profile *pp; enic_set_vf_mac() local 816 ENIC_PP_BY_INDEX(enic, vf, pp, &err); enic_set_vf_mac() 822 memcpy(pp->vf_mac, mac, ETH_ALEN); enic_set_vf_mac() 841 struct enic_port_profile *pp; enic_set_vf_port() local 844 ENIC_PP_BY_INDEX(enic, vf, pp, &err); enic_set_vf_port() 851 memcpy(&prev_pp, pp, sizeof(*enic->pp)); enic_set_vf_port() 852 memset(pp, 0, sizeof(*enic->pp)); enic_set_vf_port() 854 pp->set |= ENIC_SET_REQUEST; enic_set_vf_port() 855 pp->request = nla_get_u8(port[IFLA_PORT_REQUEST]); enic_set_vf_port() 858 pp->set |= ENIC_SET_NAME; enic_set_vf_port() 859 memcpy(pp->name, nla_data(port[IFLA_PORT_PROFILE]), enic_set_vf_port() 864 pp->set |= ENIC_SET_INSTANCE; enic_set_vf_port() 865 memcpy(pp->instance_uuid, enic_set_vf_port() 870 pp->set |= ENIC_SET_HOST; enic_set_vf_port() 871 memcpy(pp->host_uuid, enic_set_vf_port() 878 memcpy(pp->mac_addr, prev_pp.vf_mac, ETH_ALEN); enic_set_vf_port() 885 vnic_dev_get_mac_addr, pp->mac_addr); enic_set_vf_port() 888 memcpy(pp, &prev_pp, sizeof(*pp)); enic_set_vf_port() 899 memcpy(pp, &prev_pp, sizeof(*pp)); enic_set_vf_port() 901 memset(pp, 0, sizeof(*pp)); enic_set_vf_port() 909 pp->set |= ENIC_PORT_REQUEST_APPLIED; enic_set_vf_port() 912 if (pp->request == PORT_REQUEST_DISASSOCIATE) { enic_set_vf_port() 913 eth_zero_addr(pp->mac_addr); enic_set_vf_port() 920 eth_zero_addr(pp->vf_mac); enic_set_vf_port() 930 struct enic_port_profile *pp; enic_get_vf_port() local 933 ENIC_PP_BY_INDEX(enic, vf, pp, &err); enic_get_vf_port() 937 if (!(pp->set & ENIC_PORT_REQUEST_APPLIED)) enic_get_vf_port() 940 err = enic_process_get_pp_request(enic, vf, pp->request, &response); enic_get_vf_port() 944 if (nla_put_u16(skb, IFLA_PORT_REQUEST, pp->request) || enic_get_vf_port() 946 ((pp->set & ENIC_SET_NAME) && enic_get_vf_port() 947 nla_put(skb, IFLA_PORT_PROFILE, PORT_PROFILE_MAX, pp->name)) || enic_get_vf_port() 948 ((pp->set & ENIC_SET_INSTANCE) && enic_get_vf_port() 950 pp->instance_uuid)) || enic_get_vf_port() 951 ((pp->set & ENIC_SET_HOST) && enic_get_vf_port() 952 nla_put(skb, IFLA_PORT_HOST_UUID, PORT_UUID_MAX, pp->host_uuid))) enic_get_vf_port() 2509 enic->pp = kcalloc(num_pps, sizeof(*enic->pp), GFP_KERNEL); enic_probe() 2510 if (!enic->pp) { enic_probe() 2655 kfree(enic->pp); enic_probe() 2695 kfree(enic->pp); enic_remove()
|
H A D | enic.h | 164 struct enic_port_profile *pp; member in struct:enic
|
/linux-4.1.27/fs/jffs2/ |
H A D | compr_rubin.c | 42 struct pushpull pp; member in struct:rubin_state 47 static inline void init_pushpull(struct pushpull *pp, char *buf, init_pushpull() argument 51 pp->buf = buf; init_pushpull() 52 pp->buflen = buflen; init_pushpull() 53 pp->ofs = ofs; init_pushpull() 54 pp->reserve = reserve; init_pushpull() 57 static inline int pushbit(struct pushpull *pp, int bit, int use_reserved) pushbit() argument 59 if (pp->ofs >= pp->buflen - (use_reserved?0:pp->reserve)) pushbit() 63 pp->buf[pp->ofs >> 3] |= (1<<(7-(pp->ofs & 7))); pushbit() 65 pp->buf[pp->ofs >> 3] &= ~(1<<(7-(pp->ofs & 7))); pushbit() 67 pp->ofs++; pushbit() 72 static inline int pushedbits(struct pushpull *pp) pushedbits() argument 74 return pp->ofs; pushedbits() 77 static inline int pullbit(struct pushpull *pp) pullbit() argument 81 bit = (pp->buf[pp->ofs >> 3] >> (7-(pp->ofs & 7))) & 1; pullbit() 83 pp->ofs++; pullbit() 112 ret = pushbit(&rs->pp, (rs->q & UPPER_BIT_RUBIN) ? 1 : 0, 0); encode() 144 pushbit(&rs->pp, (UPPER_BIT_RUBIN & rs->q) ? 1 : 0, 1); end_rubin() 159 rs->rec_q = rs->rec_q * 2 + (long) (pullbit(&rs->pp))) init_decode() 192 c = pullbit(&rs->pp); __do_decode() 270 init_pushpull(&rs.pp, cpage_out, *dstlen * 8, 0, 32); rubin_do_compress() 287 outpos = (pushedbits(&rs.pp)+7)/8; rubin_do_compress() 376 init_pushpull(&rs.pp, cdata_in, srclen, 0, 0); rubin_do_decompress()
|
/linux-4.1.27/drivers/ata/ |
H A D | sata_nv.c | 607 struct nv_adma_port_priv *pp = ap->private_data; nv_adma_register_mode() local 608 void __iomem *mmio = pp->ctl_block; nv_adma_register_mode() 612 if (pp->flags & NV_ADMA_PORT_REGISTER_MODE) nv_adma_register_mode() 640 pp->flags |= NV_ADMA_PORT_REGISTER_MODE; nv_adma_register_mode() 645 struct nv_adma_port_priv *pp = ap->private_data; nv_adma_mode() local 646 void __iomem *mmio = pp->ctl_block; nv_adma_mode() 650 if (!(pp->flags & NV_ADMA_PORT_REGISTER_MODE)) nv_adma_mode() 653 WARN_ON(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE); nv_adma_mode() 670 pp->flags &= ~NV_ADMA_PORT_REGISTER_MODE; nv_adma_mode() 676 struct nv_adma_port_priv *pp = ap->private_data; nv_adma_slave_config() local 728 pp->flags &= ~NV_ADMA_ATAPI_SETUP_COMPLETE; nv_adma_slave_config() 731 pp->flags |= NV_ADMA_ATAPI_SETUP_COMPLETE; nv_adma_slave_config() 762 dma_set_mask(&pdev->dev, pp->adma_dma_mask); nv_adma_slave_config() 765 pp->adma_dma_mask); nv_adma_slave_config() 768 pp->adma_dma_mask); nv_adma_slave_config() 785 struct nv_adma_port_priv *pp = qc->ap->private_data; nv_adma_check_atapi_dma() local 786 return !(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE); nv_adma_check_atapi_dma() 837 struct nv_adma_port_priv *pp = ap->private_data; nv_adma_check_cpb() local 838 u8 flags = pp->cpb[cpb_num].resp_flags; nv_adma_check_cpb() 914 struct nv_adma_port_priv *pp = ap->private_data; nv_adma_interrupt() local 915 void __iomem *mmio = pp->ctl_block; nv_adma_interrupt() 923 if (pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) { nv_adma_interrupt() 931 if (pp->flags & NV_ADMA_PORT_REGISTER_MODE) { nv_adma_interrupt() 947 gen_ctl = readl(pp->gen_block + NV_ADMA_GEN_CTL); nv_adma_interrupt() 1029 struct nv_adma_port_priv *pp = host->ports[0]->private_data; nv_adma_interrupt() local 1030 writel(notifier_clears[0], pp->notifier_clear_block); nv_adma_interrupt() 1031 pp = host->ports[1]->private_data; nv_adma_interrupt() 1032 writel(notifier_clears[1], pp->notifier_clear_block); nv_adma_interrupt() 1042 struct nv_adma_port_priv *pp = ap->private_data; nv_adma_freeze() local 1043 void __iomem *mmio = pp->ctl_block; nv_adma_freeze() 1048 if (pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) nv_adma_freeze() 1064 struct nv_adma_port_priv *pp = ap->private_data; nv_adma_thaw() local 1065 void __iomem *mmio = pp->ctl_block; nv_adma_thaw() 1070 if (pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) nv_adma_thaw() 1082 struct nv_adma_port_priv *pp = ap->private_data; nv_adma_irq_clear() local 1083 void __iomem *mmio = pp->ctl_block; nv_adma_irq_clear() 1086 if (pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) { nv_adma_irq_clear() 1107 pp = ap->host->ports[0]->private_data; nv_adma_irq_clear() 1108 writel(notifier_clears[0], pp->notifier_clear_block); nv_adma_irq_clear() 1109 pp = ap->host->ports[1]->private_data; nv_adma_irq_clear() 1110 writel(notifier_clears[1], pp->notifier_clear_block); nv_adma_irq_clear() 1115 struct nv_adma_port_priv *pp = qc->ap->private_data; nv_adma_post_internal_cmd() local 1117 if (pp->flags & NV_ADMA_PORT_REGISTER_MODE) nv_adma_post_internal_cmd() 1124 struct nv_adma_port_priv *pp; nv_adma_port_start() local 1148 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); nv_adma_port_start() 1149 if (!pp) nv_adma_port_start() 1154 pp->ctl_block = mmio; nv_adma_port_start() 1155 pp->gen_block = ap->host->iomap[NV_MMIO_BAR] + NV_ADMA_GEN; nv_adma_port_start() 1156 pp->notifier_clear_block = pp->gen_block + nv_adma_port_start() 1166 pp->adma_dma_mask = *dev->dma_mask; nv_adma_port_start() 1179 pp->cpb = mem; nv_adma_port_start() 1180 pp->cpb_dma = mem_dma; nv_adma_port_start() 1191 pp->aprd = mem; nv_adma_port_start() 1192 pp->aprd_dma = mem_dma; nv_adma_port_start() 1194 ap->private_data = pp; nv_adma_port_start() 1200 pp->flags = NV_ADMA_PORT_REGISTER_MODE; nv_adma_port_start() 1222 struct nv_adma_port_priv *pp = ap->private_data; nv_adma_port_stop() local 1223 void __iomem *mmio = pp->ctl_block; nv_adma_port_stop() 1232 struct nv_adma_port_priv *pp = ap->private_data; nv_adma_port_suspend() local 1233 void __iomem *mmio = pp->ctl_block; nv_adma_port_suspend() 1249 struct nv_adma_port_priv *pp = ap->private_data; nv_adma_port_resume() local 1250 void __iomem *mmio = pp->ctl_block; nv_adma_port_resume() 1254 writel(pp->cpb_dma & 0xFFFFFFFF, mmio + NV_ADMA_CPB_BASE_LOW); nv_adma_port_resume() 1255 writel((pp->cpb_dma >> 16) >> 16, mmio + NV_ADMA_CPB_BASE_HIGH); nv_adma_port_resume() 1261 pp->flags |= NV_ADMA_PORT_REGISTER_MODE; nv_adma_port_resume() 1350 struct nv_adma_port_priv *pp = qc->ap->private_data; nv_adma_fill_sg() local 1359 &pp->aprd[NV_ADMA_SGTBL_LEN * qc->tag + (si-5)]; nv_adma_fill_sg() 1363 cpb->next_aprd = cpu_to_le64(((u64)(pp->aprd_dma + NV_ADMA_SGTBL_SZ * qc->tag))); nv_adma_fill_sg() 1370 struct nv_adma_port_priv *pp = qc->ap->private_data; nv_adma_use_reg_mode() local 1374 if ((pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) || nv_adma_use_reg_mode() 1387 struct nv_adma_port_priv *pp = qc->ap->private_data; nv_adma_qc_prep() local 1388 struct nv_adma_cpb *cpb = &pp->cpb[qc->tag]; nv_adma_qc_prep() 1393 BUG_ON(!(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) && nv_adma_qc_prep() 1433 struct nv_adma_port_priv *pp = qc->ap->private_data; nv_adma_qc_issue() local 1434 void __iomem *mmio = pp->ctl_block; nv_adma_qc_issue() 1451 BUG_ON(!(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) && nv_adma_qc_issue() 1462 if (curr_ncq != pp->last_issue_ncq) { nv_adma_qc_issue() 1466 pp->last_issue_ncq = curr_ncq; nv_adma_qc_issue() 1672 struct nv_adma_port_priv *pp = ap->private_data; nv_adma_error_handler() local 1673 if (!(pp->flags & NV_ADMA_PORT_REGISTER_MODE)) { nv_adma_error_handler() 1674 void __iomem *mmio = pp->ctl_block; nv_adma_error_handler() 1681 u32 gen_ctl = readl(pp->gen_block + NV_ADMA_GEN_CTL); nv_adma_error_handler() 1694 struct nv_adma_cpb *cpb = &pp->cpb[i]; nv_adma_error_handler() 1709 pp->cpb[i].ctl_flags &= ~NV_CPB_CTL_CPB_VALID; nv_adma_error_handler() 1728 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_qc_to_dq() local 1729 struct defer_queue *dq = &pp->defer_queue; nv_swncq_qc_to_dq() 1739 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_qc_from_dq() local 1740 struct defer_queue *dq = &pp->defer_queue; nv_swncq_qc_from_dq() 1756 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_fis_reinit() local 1758 pp->dhfis_bits = 0; nv_swncq_fis_reinit() 1759 pp->dmafis_bits = 0; nv_swncq_fis_reinit() 1760 pp->sdbfis_bits = 0; nv_swncq_fis_reinit() 1761 pp->ncq_flags = 0; nv_swncq_fis_reinit() 1766 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_pp_reinit() local 1767 struct defer_queue *dq = &pp->defer_queue; nv_swncq_pp_reinit() 1772 pp->qc_active = 0; nv_swncq_pp_reinit() 1773 pp->last_issue_tag = ATA_TAG_POISON; nv_swncq_pp_reinit() 1779 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_irq_clear() local 1781 writew(fis, pp->irq_block); nv_swncq_irq_clear() 1794 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_ncq_stop() local 1804 pp->qc_active, pp->defer_queue.defer_bits, pp->last_issue_tag, nv_swncq_ncq_stop() 1805 pp->dhfis_bits, pp->dmafis_bits, pp->sdbfis_bits); nv_swncq_ncq_stop() 1811 sactive = readl(pp->sactive_block); nv_swncq_ncq_stop() 1812 done_mask = pp->qc_active ^ sactive; nv_swncq_ncq_stop() 1817 if (pp->qc_active & (1 << i)) nv_swncq_ncq_stop() 1826 (pp->dhfis_bits >> i) & 0x1, nv_swncq_ncq_stop() 1827 (pp->dmafis_bits >> i) & 0x1, nv_swncq_ncq_stop() 1828 (pp->sdbfis_bits >> i) & 0x1, nv_swncq_ncq_stop() 1966 struct nv_swncq_port_priv *pp; nv_swncq_port_start() local 1974 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); nv_swncq_port_start() 1975 if (!pp) nv_swncq_port_start() 1978 pp->prd = dmam_alloc_coherent(dev, ATA_PRD_TBL_SZ * ATA_MAX_QUEUE, nv_swncq_port_start() 1979 &pp->prd_dma, GFP_KERNEL); nv_swncq_port_start() 1980 if (!pp->prd) nv_swncq_port_start() 1982 memset(pp->prd, 0, ATA_PRD_TBL_SZ * ATA_MAX_QUEUE); nv_swncq_port_start() 1984 ap->private_data = pp; nv_swncq_port_start() 1985 pp->sactive_block = ap->ioaddr.scr_addr + 4 * SCR_ACTIVE; nv_swncq_port_start() 1986 pp->irq_block = mmio + NV_INT_STATUS_MCP55 + ap->port_no * 2; nv_swncq_port_start() 1987 pp->tag_block = mmio + NV_NCQ_REG_MCP55 + ap->port_no * 2; nv_swncq_port_start() 2009 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_fill_sg() local 2013 prd = pp->prd + ATA_MAX_PRD * qc->tag; nv_swncq_fill_sg() 2044 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_issue_atacmd() local 2051 writel((1 << qc->tag), pp->sactive_block); nv_swncq_issue_atacmd() 2052 pp->last_issue_tag = qc->tag; nv_swncq_issue_atacmd() 2053 pp->dhfis_bits &= ~(1 << qc->tag); nv_swncq_issue_atacmd() 2054 pp->dmafis_bits &= ~(1 << qc->tag); nv_swncq_issue_atacmd() 2055 pp->qc_active |= (0x1 << qc->tag); nv_swncq_issue_atacmd() 2068 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_qc_issue() local 2075 if (!pp->qc_active) nv_swncq_qc_issue() 2111 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_sdbfis() local 2131 sactive = readl(pp->sactive_block); nv_swncq_sdbfis() 2132 done_mask = pp->qc_active ^ sactive; nv_swncq_sdbfis() 2134 pp->qc_active &= ~done_mask; nv_swncq_sdbfis() 2135 pp->dhfis_bits &= ~done_mask; nv_swncq_sdbfis() 2136 pp->dmafis_bits &= ~done_mask; nv_swncq_sdbfis() 2137 pp->sdbfis_bits |= done_mask; nv_swncq_sdbfis() 2146 if (pp->qc_active & pp->dhfis_bits) nv_swncq_sdbfis() 2149 if ((pp->ncq_flags & ncq_saw_backout) || nv_swncq_sdbfis() 2150 (pp->qc_active ^ pp->dhfis_bits)) nv_swncq_sdbfis() 2159 ap->print_id, ap->qc_active, pp->qc_active, nv_swncq_sdbfis() 2160 pp->defer_queue.defer_bits, pp->dhfis_bits, nv_swncq_sdbfis() 2161 pp->dmafis_bits, pp->last_issue_tag); nv_swncq_sdbfis() 2166 qc = ata_qc_from_tag(ap, pp->last_issue_tag); nv_swncq_sdbfis() 2171 if (pp->defer_queue.defer_bits) { nv_swncq_sdbfis() 2183 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_tag() local 2186 tag = readb(pp->tag_block) >> 2; nv_swncq_tag() 2196 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_dmafis() local 2210 iowrite32(pp->prd_dma + ATA_PRD_TBL_SZ * qc->tag, nv_swncq_dmafis() 2224 struct nv_swncq_port_priv *pp = ap->private_data; nv_swncq_host_interrupt() local 2243 if (!pp->qc_active) nv_swncq_host_interrupt() 2264 pp->ncq_flags |= ncq_saw_backout; nv_swncq_host_interrupt() 2268 pp->ncq_flags |= ncq_saw_sdb; nv_swncq_host_interrupt() 2271 ap->print_id, pp->qc_active, pp->dhfis_bits, nv_swncq_host_interrupt() 2272 pp->dmafis_bits, readl(pp->sactive_block)); nv_swncq_host_interrupt() 2281 pp->dhfis_bits |= (0x1 << pp->last_issue_tag); nv_swncq_host_interrupt() 2282 pp->ncq_flags |= ncq_saw_d2h; nv_swncq_host_interrupt() 2283 if (pp->ncq_flags & (ncq_saw_sdb | ncq_saw_backout)) { nv_swncq_host_interrupt() 2291 !(pp->ncq_flags & ncq_saw_dmas)) { nv_swncq_host_interrupt() 2296 if (pp->defer_queue.defer_bits) { nv_swncq_host_interrupt() 2308 pp->dmafis_bits |= (0x1 << nv_swncq_tag(ap)); nv_swncq_host_interrupt() 2309 pp->ncq_flags |= ncq_saw_dmas; nv_swncq_host_interrupt() 2455 struct nv_adma_port_priv *pp; nv_pci_device_resume() local 2459 pp = host->ports[0]->private_data; nv_pci_device_resume() 2460 if (pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) nv_pci_device_resume() 2466 pp = host->ports[1]->private_data; nv_pci_device_resume() 2467 if (pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) nv_pci_device_resume()
|
H A D | pdc_adma.c | 206 struct adma_port_priv *pp = ap->private_data; adma_reinit_engine() local 220 writel((u32)pp->pkt_dma, chan + ADMA_CPB_NEXT); adma_reinit_engine() 263 struct adma_port_priv *pp = ap->private_data; adma_prereset() local 265 if (pp->state != adma_state_idle) /* healthy paranoia */ adma_prereset() 266 pp->state = adma_state_mmio; adma_prereset() 276 struct adma_port_priv *pp = ap->private_data; adma_fill_sg() local 277 u8 *buf = pp->pkt, *last_buf = NULL; adma_fill_sg() 301 (pFLAGS & pEND) ? 0 : cpu_to_le32(pp->pkt_dma + i + 4); adma_fill_sg() 316 struct adma_port_priv *pp = qc->ap->private_data; adma_qc_prep() local 317 u8 *buf = pp->pkt; adma_qc_prep() 318 u32 pkt_dma = (u32)pp->pkt_dma; adma_qc_prep() 405 struct adma_port_priv *pp = qc->ap->private_data; adma_qc_issue() local 409 pp->state = adma_state_pkt; adma_qc_issue() 421 pp->state = adma_state_mmio; adma_qc_issue() 431 struct adma_port_priv *pp; adma_intr_pkt() local 440 pp = ap->private_data; adma_intr_pkt() 441 if (!pp || pp->state != adma_state_pkt) adma_intr_pkt() 450 if (pp->pkt[0] & cATERR) adma_intr_pkt() 452 else if (pp->pkt[0] != cDONE) adma_intr_pkt() 463 "pkt[0] 0x%02X", pp->pkt[0]); adma_intr_pkt() 481 struct adma_port_priv *pp = ap->private_data; adma_intr_mmio() local 484 if (!pp || pp->state != adma_state_mmio) adma_intr_mmio() 497 pp->state = adma_state_idle; adma_intr_mmio() 553 struct adma_port_priv *pp; adma_port_start() local 556 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); adma_port_start() 557 if (!pp) adma_port_start() 559 pp->pkt = dmam_alloc_coherent(dev, ADMA_PKT_BYTES, &pp->pkt_dma, adma_port_start() 561 if (!pp->pkt) adma_port_start() 564 if ((pp->pkt_dma & 7) != 0) { adma_port_start() 565 printk(KERN_ERR "bad alignment for pp->pkt_dma: %08x\n", adma_port_start() 566 (u32)pp->pkt_dma); adma_port_start() 569 memset(pp->pkt, 0, ADMA_PKT_BYTES); adma_port_start() 570 ap->private_data = pp; adma_port_start()
|
H A D | libahci.c | 622 struct ahci_port_priv *pp = ap->private_data; ahci_start_fis_rx() local 627 writel((pp->cmd_slot_dma >> 16) >> 16, ahci_start_fis_rx() 629 writel(pp->cmd_slot_dma & 0xffffffff, port_mmio + PORT_LST_ADDR); ahci_start_fis_rx() 632 writel((pp->rx_fis_dma >> 16) >> 16, ahci_start_fis_rx() 634 writel(pp->rx_fis_dma & 0xffffffff, port_mmio + PORT_FIS_ADDR); ahci_start_fis_rx() 688 struct ahci_port_priv *pp = ap->private_data; ahci_set_lpm() local 697 pp->intr_mask &= ~PORT_IRQ_PHYRDY; ahci_set_lpm() 698 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); ahci_set_lpm() 739 pp->intr_mask |= PORT_IRQ_PHYRDY; ahci_set_lpm() 740 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); ahci_set_lpm() 771 struct ahci_port_priv *pp = ap->private_data; ahci_start_port() local 787 emp = &pp->em_priv[link->pmp]; ata_for_each_link() 888 struct ahci_port_priv *pp = ap->private_data; ahci_sw_activity() local 889 struct ahci_em_priv *emp = &pp->em_priv[link->pmp]; ahci_sw_activity() 903 struct ahci_port_priv *pp = ap->private_data; ahci_sw_activity_blink() local 904 struct ahci_em_priv *emp = &pp->em_priv[link->pmp]; ahci_sw_activity_blink() 946 struct ahci_port_priv *pp = ap->private_data; ahci_init_sw_activity() local 947 struct ahci_em_priv *emp = &pp->em_priv[link->pmp]; ahci_init_sw_activity() 977 struct ahci_port_priv *pp = ap->private_data; ahci_transmit_led_message() local 988 emp = &pp->em_priv[pmp]; ahci_transmit_led_message() 1033 struct ahci_port_priv *pp = ap->private_data; ahci_led_show() local 1039 emp = &pp->em_priv[link->pmp]; ata_for_each_link() 1050 struct ahci_port_priv *pp = ap->private_data; ahci_led_store() local 1059 emp = &pp->em_priv[pmp]; ahci_led_store() 1077 struct ahci_port_priv *pp = ap->private_data; ahci_activity_store() local 1078 struct ahci_em_priv *emp = &pp->em_priv[link->pmp]; ahci_activity_store() 1108 struct ahci_port_priv *pp = ap->private_data; ahci_activity_show() local 1109 struct ahci_em_priv *emp = &pp->em_priv[link->pmp]; ahci_activity_show() 1197 void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag, ahci_fill_cmd_slot() argument 1202 cmd_tbl_dma = pp->cmd_tbl_dma + tag * AHCI_CMD_TBL_SZ; ahci_fill_cmd_slot() 1204 pp->cmd_slot[tag].opts = cpu_to_le32(opts); ahci_fill_cmd_slot() 1205 pp->cmd_slot[tag].status = 0; ahci_fill_cmd_slot() 1206 pp->cmd_slot[tag].tbl_addr = cpu_to_le32(cmd_tbl_dma & 0xffffffff); ahci_fill_cmd_slot() 1207 pp->cmd_slot[tag].tbl_addr_hi = cpu_to_le32((cmd_tbl_dma >> 16) >> 16); ahci_fill_cmd_slot() 1261 struct ahci_port_priv *pp = ap->private_data; ahci_exec_polled_cmd() local 1263 u8 *fis = pp->cmd_tbl; ahci_exec_polled_cmd() 1268 ahci_fill_cmd_slot(pp, 0, cmd_fis_len | flags | (pmp << 12)); ahci_exec_polled_cmd() 1292 struct ahci_port_priv *pp = ap->private_data; ahci_do_softreset() local 1311 if (!ata_is_host_link(link) && pp->fbs_enabled) { ahci_do_softreset() 1442 struct ahci_port_priv *pp = ap->private_data; ahci_hardreset() local 1444 u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; ahci_hardreset() 1516 struct ahci_port_priv *pp = ap->private_data; ahci_pmp_qc_defer() local 1518 if (!sata_pmp_attached(ap) || pp->fbs_enabled) ahci_pmp_qc_defer() 1527 struct ahci_port_priv *pp = ap->private_data; ahci_qc_prep() local 1538 cmd_tbl = pp->cmd_tbl + qc->tag * AHCI_CMD_TBL_SZ; ahci_qc_prep() 1559 ahci_fill_cmd_slot(pp, qc->tag, opts); ahci_qc_prep() 1564 struct ahci_port_priv *pp = ap->private_data; ahci_fbs_dec_intr() local 1570 BUG_ON(!pp->fbs_enabled); ahci_fbs_dec_intr() 1589 struct ahci_port_priv *pp = ap->private_data; ahci_error_intr() local 1598 if (pp->fbs_enabled) { ahci_error_intr() 1647 u32 *unk = pp->rx_fis + RX_FIS_UNK; ahci_error_intr() 1701 struct ahci_port_priv *pp = ap->private_data; ahci_handle_port_interrupt() local 1742 if (pp->fbs_enabled) ahci_handle_port_interrupt() 1745 const __le32 *f = pp->rx_fis + RX_FIS_SDB; ahci_handle_port_interrupt() 1753 /* pp->active_link is not reliable once FBS is enabled, both ahci_handle_port_interrupt() 1757 if (pp->fbs_enabled) { ahci_handle_port_interrupt() 1763 /* pp->active_link is valid iff any command is in flight */ ahci_handle_port_interrupt() 1764 if (ap->qc_active && pp->active_link->sactive) ahci_handle_port_interrupt() 1795 struct ahci_port_priv *pp = ap->private_data; ahci_port_thread_fn() local 1799 status = atomic_xchg(&pp->intr_status, 0); ahci_port_thread_fn() 1814 struct ahci_port_priv *pp = ap->private_data; ahci_multi_irqs_intr() local 1822 atomic_or(status, &pp->intr_status); ahci_multi_irqs_intr() 1893 struct ahci_port_priv *pp = ap->private_data; ahci_qc_issue() local 1899 pp->active_link = qc->dev->link; ahci_qc_issue() 1904 if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) { ahci_qc_issue() 1909 pp->fbs_last_dev = qc->dev->link->pmp; ahci_qc_issue() 1922 struct ahci_port_priv *pp = qc->ap->private_data; ahci_qc_fill_rtf() local 1923 u8 *rx_fis = pp->rx_fis; ahci_qc_fill_rtf() 1925 if (pp->fbs_enabled) ahci_qc_fill_rtf() 1958 struct ahci_port_priv *pp = ap->private_data; ahci_thaw() local 1966 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); ahci_thaw() 2074 struct ahci_port_priv *pp = ap->private_data; ahci_enable_fbs() local 2079 if (!pp->fbs_supported) ahci_enable_fbs() 2084 pp->fbs_enabled = true; ahci_enable_fbs() 2085 pp->fbs_last_dev = -1; /* initialization */ ahci_enable_fbs() 2097 pp->fbs_enabled = true; ahci_enable_fbs() 2098 pp->fbs_last_dev = -1; /* initialization */ ahci_enable_fbs() 2108 struct ahci_port_priv *pp = ap->private_data; ahci_disable_fbs() local 2113 if (!pp->fbs_supported) ahci_disable_fbs() 2118 pp->fbs_enabled = false; ahci_disable_fbs() 2132 pp->fbs_enabled = false; ahci_disable_fbs() 2141 struct ahci_port_priv *pp = ap->private_data; ahci_pmp_attach() local 2150 pp->intr_mask |= PORT_IRQ_BAD_PMP; ahci_pmp_attach() 2154 * port is marked frozen, the value in pp->intr_mask will be ahci_pmp_attach() 2161 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); ahci_pmp_attach() 2167 struct ahci_port_priv *pp = ap->private_data; ahci_pmp_detach() local 2176 pp->intr_mask &= ~PORT_IRQ_BAD_PMP; ahci_pmp_detach() 2180 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); ahci_pmp_detach() 2219 struct ahci_port_priv *pp; ahci_port_start() local 2224 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); ahci_port_start() 2225 if (!pp) ahci_port_start() 2229 pp->irq_desc = devm_kzalloc(dev, 8, GFP_KERNEL); ahci_port_start() 2230 if (!pp->irq_desc) { ahci_port_start() 2231 devm_kfree(dev, pp); ahci_port_start() 2234 snprintf(pp->irq_desc, 8, ahci_port_start() 2243 pp->fbs_supported = true; ahci_port_start() 2247 pp->fbs_supported = true; ahci_port_start() 2253 if (pp->fbs_supported) { ahci_port_start() 2270 pp->cmd_slot = mem; ahci_port_start() 2271 pp->cmd_slot_dma = mem_dma; ahci_port_start() 2279 pp->rx_fis = mem; ahci_port_start() 2280 pp->rx_fis_dma = mem_dma; ahci_port_start() 2289 pp->cmd_tbl = mem; ahci_port_start() 2290 pp->cmd_tbl_dma = mem_dma; ahci_port_start() 2296 pp->intr_mask = DEF_PORT_IRQ; ahci_port_start() 2302 spin_lock_init(&pp->lock); ahci_port_start() 2303 ap->lock = &pp->lock; ahci_port_start() 2306 ap->private_data = pp; ahci_port_start() 2431 struct ahci_port_priv *pp = host->ports[i]->private_data; ahci_host_activate_multi_irqs() local 2434 if (!pp) { ahci_host_activate_multi_irqs() 2442 pp->irq_desc, host->ports[i]); ahci_host_activate_multi_irqs()
|
H A D | acard-ahci.c | 263 struct ahci_port_priv *pp = ap->private_data; acard_ahci_qc_prep() local 274 cmd_tbl = pp->cmd_tbl + qc->tag * AHCI_CMD_TBL_SZ; acard_ahci_qc_prep() 297 ahci_fill_cmd_slot(pp, qc->tag, opts); acard_ahci_qc_prep() 302 struct ahci_port_priv *pp = qc->ap->private_data; acard_ahci_qc_fill_rtf() local 303 u8 *rx_fis = pp->rx_fis; acard_ahci_qc_fill_rtf() 305 if (pp->fbs_enabled) acard_ahci_qc_fill_rtf() 328 struct ahci_port_priv *pp; acard_ahci_port_start() local 333 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); acard_ahci_port_start() 334 if (!pp) acard_ahci_port_start() 342 pp->fbs_supported = true; acard_ahci_port_start() 346 pp->fbs_supported = true; acard_ahci_port_start() 352 if (pp->fbs_supported) { acard_ahci_port_start() 369 pp->cmd_slot = mem; acard_ahci_port_start() 370 pp->cmd_slot_dma = mem_dma; acard_ahci_port_start() 378 pp->rx_fis = mem; acard_ahci_port_start() 379 pp->rx_fis_dma = mem_dma; acard_ahci_port_start() 388 pp->cmd_tbl = mem; acard_ahci_port_start() 389 pp->cmd_tbl_dma = mem_dma; acard_ahci_port_start() 395 pp->intr_mask = DEF_PORT_IRQ; acard_ahci_port_start() 397 ap->private_data = pp; acard_ahci_port_start()
|
H A D | sata_sx4.c | 302 struct pdc_port_priv *pp; pdc_port_start() local 304 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); pdc_port_start() 305 if (!pp) pdc_port_start() 308 pp->pkt = dmam_alloc_coherent(dev, 128, &pp->pkt_dma, GFP_KERNEL); pdc_port_start() 309 if (!pp->pkt) pdc_port_start() 312 ap->private_data = pp; pdc_port_start() 457 struct pdc_port_priv *pp = ap->private_data; pdc20621_dma_prep() local 462 __le32 *buf = (__le32 *) &pp->dimm_buf[PDC_DIMM_HEADER_SZ]; pdc20621_dma_prep() 486 pdc20621_host_sg(&pp->dimm_buf[0], portno, total_len); pdc20621_dma_prep() 487 pdc20621_host_pkt(&qc->tf, &pp->dimm_buf[0], portno); pdc20621_dma_prep() 489 pdc20621_ata_sg(&pp->dimm_buf[0], portno, total_len); pdc20621_dma_prep() 490 i = pdc20621_ata_pkt(&qc->tf, qc->dev->devno, &pp->dimm_buf[0], portno); pdc20621_dma_prep() 493 i = pdc_prep_lba48(&qc->tf, &pp->dimm_buf[0], i); pdc20621_dma_prep() 495 i = pdc_prep_lba28(&qc->tf, &pp->dimm_buf[0], i); pdc20621_dma_prep() 497 pdc_pkt_footer(&qc->tf, &pp->dimm_buf[0], i); pdc20621_dma_prep() 501 &pp->dimm_buf, PDC_DIMM_HEADER_SZ); pdc20621_dma_prep() 504 &pp->dimm_buf[PDC_DIMM_HEADER_SZ], sgt_len); pdc20621_dma_prep() 517 struct pdc_port_priv *pp = ap->private_data; pdc20621_nodata_prep() local 528 i = pdc20621_ata_pkt(&qc->tf, qc->dev->devno, &pp->dimm_buf[0], portno); pdc20621_nodata_prep() 531 i = pdc_prep_lba48(&qc->tf, &pp->dimm_buf[0], i); pdc20621_nodata_prep() 533 i = pdc_prep_lba28(&qc->tf, &pp->dimm_buf[0], i); pdc20621_nodata_prep() 535 pdc_pkt_footer(&qc->tf, &pp->dimm_buf[0], i); pdc20621_nodata_prep() 539 &pp->dimm_buf, PDC_DIMM_HEADER_SZ); pdc20621_nodata_prep() 586 struct pdc_host_priv *pp = ap->host->private_data; pdc20621_push_hdma() local 587 unsigned int idx = pp->hdma_prod & PDC_HDMA_Q_MASK; pdc20621_push_hdma() 589 if (!pp->doing_hdma) { pdc20621_push_hdma() 591 pp->doing_hdma = 1; pdc20621_push_hdma() 595 pp->hdma[idx].qc = qc; pdc20621_push_hdma() 596 pp->hdma[idx].seq = seq; pdc20621_push_hdma() 597 pp->hdma[idx].pkt_ofs = pkt_ofs; pdc20621_push_hdma() 598 pp->hdma_prod++; pdc20621_push_hdma() 604 struct pdc_host_priv *pp = ap->host->private_data; pdc20621_pop_hdma() local 605 unsigned int idx = pp->hdma_cons & PDC_HDMA_Q_MASK; pdc20621_pop_hdma() 608 if (pp->hdma_prod == pp->hdma_cons) { pdc20621_pop_hdma() 609 pp->doing_hdma = 0; pdc20621_pop_hdma() 613 __pdc20621_push_hdma(pp->hdma[idx].qc, pp->hdma[idx].seq, pdc20621_pop_hdma() 614 pp->hdma[idx].pkt_ofs); pdc20621_pop_hdma() 615 pp->hdma_cons++; pdc20621_pop_hdma()
|
H A D | sata_qstor.c | 190 struct qs_port_priv *pp = ap->private_data; qs_enter_reg_mode() local 192 pp->state = qs_state_mmio; qs_enter_reg_mode() 256 struct qs_port_priv *pp = ap->private_data; qs_fill_sg() local 257 u8 *prd = pp->pkt + QS_CPB_BYTES; qs_fill_sg() 281 struct qs_port_priv *pp = qc->ap->private_data; qs_qc_prep() local 282 u8 dflags = QS_DF_PORD, *buf = pp->pkt; qs_qc_prep() 305 addr = ((u64)pp->pkt_dma) + QS_CPB_BYTES; qs_qc_prep() 331 struct qs_port_priv *pp = qc->ap->private_data; qs_qc_issue() local 335 pp->state = qs_state_pkt; qs_qc_issue() 347 pp->state = qs_state_mmio; qs_qc_issue() 388 struct qs_port_priv *pp = ap->private_data; qs_intr_pkt() local 394 if (!pp || pp->state != qs_state_pkt) qs_intr_pkt() 419 struct qs_port_priv *pp = ap->private_data; qs_intr_mmio() local 438 if (!pp || pp->state != qs_state_mmio) qs_intr_mmio() 484 struct qs_port_priv *pp; qs_port_start() local 489 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); qs_port_start() 490 if (!pp) qs_port_start() 492 pp->pkt = dmam_alloc_coherent(dev, QS_PKT_BYTES, &pp->pkt_dma, qs_port_start() 494 if (!pp->pkt) qs_port_start() 496 memset(pp->pkt, 0, QS_PKT_BYTES); qs_port_start() 497 ap->private_data = pp; qs_port_start() 500 addr = (u64)pp->pkt_dma; qs_port_start()
|
H A D | sata_mv.c | 660 struct mv_port_priv *pp); 958 struct mv_port_priv *pp = ap->private_data; mv_save_cached_regs() local 960 pp->cached.fiscfg = readl(port_mmio + FISCFG); mv_save_cached_regs() 961 pp->cached.ltmode = readl(port_mmio + LTMODE); mv_save_cached_regs() 962 pp->cached.haltcond = readl(port_mmio + EDMA_HALTCOND); mv_save_cached_regs() 963 pp->cached.unknown_rsvd = readl(port_mmio + EDMA_UNKNOWN_RSVD); mv_save_cached_regs() 1003 struct mv_port_priv *pp) mv_set_edma_ptrs() 1010 pp->req_idx &= MV_MAX_Q_DEPTH_MASK; /* paranoia */ mv_set_edma_ptrs() 1011 index = pp->req_idx << EDMA_REQ_Q_PTR_SHIFT; mv_set_edma_ptrs() 1013 WARN_ON(pp->crqb_dma & 0x3ff); mv_set_edma_ptrs() 1014 writel((pp->crqb_dma >> 16) >> 16, port_mmio + EDMA_REQ_Q_BASE_HI); mv_set_edma_ptrs() 1015 writelfl((pp->crqb_dma & EDMA_REQ_Q_BASE_LO_MASK) | index, mv_set_edma_ptrs() 1022 pp->resp_idx &= MV_MAX_Q_DEPTH_MASK; /* paranoia */ mv_set_edma_ptrs() 1023 index = pp->resp_idx << EDMA_RSP_Q_PTR_SHIFT; mv_set_edma_ptrs() 1025 WARN_ON(pp->crpb_dma & 0xff); mv_set_edma_ptrs() 1026 writel((pp->crpb_dma >> 16) >> 16, port_mmio + EDMA_RSP_Q_BASE_HI); mv_set_edma_ptrs() 1028 writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) | index, mv_set_edma_ptrs() 1165 * @pp: port private data 1174 struct mv_port_priv *pp, u8 protocol) mv_start_edma() 1178 if (pp->pp_flags & MV_PP_FLAG_EDMA_EN) { mv_start_edma() 1179 int using_ncq = ((pp->pp_flags & MV_PP_FLAG_NCQ_EN) != 0); mv_start_edma() 1183 if (!(pp->pp_flags & MV_PP_FLAG_EDMA_EN)) { mv_start_edma() 1188 mv_set_edma_ptrs(port_mmio, hpriv, pp); mv_start_edma() 1192 pp->pp_flags |= MV_PP_FLAG_EDMA_EN; mv_start_edma() 1246 struct mv_port_priv *pp = ap->private_data; mv_stop_edma() local 1249 if (!(pp->pp_flags & MV_PP_FLAG_EDMA_EN)) mv_stop_edma() 1251 pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN; mv_stop_edma() 1439 struct mv_port_priv *pp = ap->private_data; mv_qc_defer() local 1445 if (pp->pp_flags & MV_PP_FLAG_DELAYED_EH) mv_qc_defer() 1478 if ((pp->pp_flags & MV_PP_FLAG_EDMA_EN) && mv_qc_defer() 1479 (pp->pp_flags & MV_PP_FLAG_NCQ_EN)) { mv_qc_defer() 1493 struct mv_port_priv *pp = ap->private_data; mv_config_fbs() local 1496 u32 fiscfg, *old_fiscfg = &pp->cached.fiscfg; mv_config_fbs() 1497 u32 ltmode, *old_ltmode = &pp->cached.ltmode; mv_config_fbs() 1498 u32 haltcond, *old_haltcond = &pp->cached.haltcond; mv_config_fbs() 1549 struct mv_port_priv *pp = ap->private_data; mv_bmdma_enable_iie() local 1550 u32 new, *old = &pp->cached.unknown_rsvd; mv_bmdma_enable_iie() 1602 struct mv_port_priv *pp = this_ap->private_data; mv_soc_led_blink_disable() local 1604 if (pp->pp_flags & MV_PP_FLAG_NCQ_EN) mv_soc_led_blink_disable() 1617 struct mv_port_priv *pp = ap->private_data; mv_edma_cfg() local 1623 pp->pp_flags &= mv_edma_cfg() 1648 pp->pp_flags |= MV_PP_FLAG_FBS_EN; mv_edma_cfg() 1672 pp->pp_flags |= MV_PP_FLAG_NCQ_EN; mv_edma_cfg() 1681 struct mv_port_priv *pp = ap->private_data; mv_port_free_dma_mem() local 1684 if (pp->crqb) { mv_port_free_dma_mem() 1685 dma_pool_free(hpriv->crqb_pool, pp->crqb, pp->crqb_dma); mv_port_free_dma_mem() 1686 pp->crqb = NULL; mv_port_free_dma_mem() 1688 if (pp->crpb) { mv_port_free_dma_mem() 1689 dma_pool_free(hpriv->crpb_pool, pp->crpb, pp->crpb_dma); mv_port_free_dma_mem() 1690 pp->crpb = NULL; mv_port_free_dma_mem() 1697 if (pp->sg_tbl[tag]) { mv_port_free_dma_mem() 1700 pp->sg_tbl[tag], mv_port_free_dma_mem() 1701 pp->sg_tbl_dma[tag]); mv_port_free_dma_mem() 1702 pp->sg_tbl[tag] = NULL; mv_port_free_dma_mem() 1721 struct mv_port_priv *pp; mv_port_start() local 1725 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); mv_port_start() 1726 if (!pp) mv_port_start() 1728 ap->private_data = pp; mv_port_start() 1730 pp->crqb = dma_pool_alloc(hpriv->crqb_pool, GFP_KERNEL, &pp->crqb_dma); mv_port_start() 1731 if (!pp->crqb) mv_port_start() 1733 memset(pp->crqb, 0, MV_CRQB_Q_SZ); mv_port_start() 1735 pp->crpb = dma_pool_alloc(hpriv->crpb_pool, GFP_KERNEL, &pp->crpb_dma); mv_port_start() 1736 if (!pp->crpb) mv_port_start() 1738 memset(pp->crpb, 0, MV_CRPB_Q_SZ); mv_port_start() 1749 pp->sg_tbl[tag] = dma_pool_alloc(hpriv->sg_tbl_pool, mv_port_start() 1750 GFP_KERNEL, &pp->sg_tbl_dma[tag]); mv_port_start() 1751 if (!pp->sg_tbl[tag]) mv_port_start() 1754 pp->sg_tbl[tag] = pp->sg_tbl[0]; mv_port_start() 1755 pp->sg_tbl_dma[tag] = pp->sg_tbl_dma[0]; mv_port_start() 1802 struct mv_port_priv *pp = qc->ap->private_data; mv_fill_sg() local 1807 mv_sg = pp->sg_tbl[qc->tag]; mv_fill_sg() 1900 struct mv_port_priv *pp = ap->private_data; mv_bmdma_setup() local 1908 writel((pp->sg_tbl_dma[qc->tag] >> 16) >> 16, mv_bmdma_setup() 1910 writelfl(pp->sg_tbl_dma[qc->tag], mv_bmdma_setup() 2052 struct mv_port_priv *pp = ap->private_data; mv_qc_prep() local 2081 in_index = pp->req_idx; mv_qc_prep() 2083 pp->crqb[in_index].sg_addr = mv_qc_prep() 2084 cpu_to_le32(pp->sg_tbl_dma[qc->tag] & 0xffffffff); mv_qc_prep() 2085 pp->crqb[in_index].sg_addr_hi = mv_qc_prep() 2086 cpu_to_le32((pp->sg_tbl_dma[qc->tag] >> 16) >> 16); mv_qc_prep() 2087 pp->crqb[in_index].ctrl_flags = cpu_to_le16(flags); mv_qc_prep() 2089 cw = &pp->crqb[in_index].ata_cmd[0]; mv_qc_prep() 2153 struct mv_port_priv *pp = ap->private_data; mv_qc_prep_iie() local 2175 in_index = pp->req_idx; mv_qc_prep_iie() 2177 crqb = (struct mv_crqb_iie *) &pp->crqb[in_index]; mv_qc_prep_iie() 2178 crqb->addr = cpu_to_le32(pp->sg_tbl_dma[qc->tag] & 0xffffffff); mv_qc_prep_iie() 2179 crqb->addr_hi = cpu_to_le32((pp->sg_tbl_dma[qc->tag] >> 16) >> 16); mv_qc_prep_iie() 2224 struct mv_port_priv *pp = ap->private_data; mv_sff_check_status() local 2226 if (pp->pp_flags & MV_PP_FLAG_FAKE_ATA_BUSY) { mv_sff_check_status() 2228 pp->pp_flags &= ~MV_PP_FLAG_FAKE_ATA_BUSY; mv_sff_check_status() 2299 struct mv_port_priv *pp = ap->private_data; mv_qc_issue_fis() local 2311 pp->pp_flags |= MV_PP_FLAG_FAKE_ATA_BUSY; mv_qc_issue_fis() 2317 pp->pp_flags |= MV_PP_FLAG_FAKE_ATA_BUSY; mv_qc_issue_fis() 2350 struct mv_port_priv *pp = ap->private_data; mv_qc_issue() local 2354 pp->pp_flags &= ~MV_PP_FLAG_FAKE_ATA_BUSY; /* paranoia */ mv_qc_issue() 2365 mv_start_edma(ap, port_mmio, pp, qc->tf.protocol); mv_qc_issue() 2366 pp->req_idx = (pp->req_idx + 1) & MV_MAX_Q_DEPTH_MASK; mv_qc_issue() 2367 in_index = pp->req_idx << EDMA_REQ_Q_PTR_SHIFT; mv_qc_issue() 2370 writelfl((pp->crqb_dma & EDMA_REQ_Q_BASE_LO_MASK) | in_index, mv_qc_issue() 2436 struct mv_port_priv *pp = ap->private_data; mv_get_active_qc() local 2439 if (pp->pp_flags & MV_PP_FLAG_NCQ_EN) mv_get_active_qc() 2450 struct mv_port_priv *pp = ap->private_data; mv_pmp_error_handler() local 2452 if (pp->pp_flags & MV_PP_FLAG_DELAYED_EH) { mv_pmp_error_handler() 2459 pmp_map = pp->delayed_eh_pmp_map; mv_pmp_error_handler() 2460 pp->pp_flags &= ~MV_PP_FLAG_DELAYED_EH; mv_pmp_error_handler() 2520 struct mv_port_priv *pp = ap->private_data; mv_handle_fbs_ncq_dev_err() local 2532 if (!(pp->pp_flags & MV_PP_FLAG_DELAYED_EH)) { mv_handle_fbs_ncq_dev_err() 2533 pp->pp_flags |= MV_PP_FLAG_DELAYED_EH; mv_handle_fbs_ncq_dev_err() 2534 pp->delayed_eh_pmp_map = 0; mv_handle_fbs_ncq_dev_err() 2536 old_map = pp->delayed_eh_pmp_map; mv_handle_fbs_ncq_dev_err() 2540 pp->delayed_eh_pmp_map = new_map; mv_handle_fbs_ncq_dev_err() 2547 __func__, pp->delayed_eh_pmp_map, mv_handle_fbs_ncq_dev_err() 2552 mv_process_crpb_entries(ap, pp); mv_handle_fbs_ncq_dev_err() 2580 struct mv_port_priv *pp = ap->private_data; mv_handle_dev_err() local 2582 if (!(pp->pp_flags & MV_PP_FLAG_EDMA_EN)) mv_handle_dev_err() 2584 if (!(pp->pp_flags & MV_PP_FLAG_FBS_EN)) mv_handle_dev_err() 2593 if (pp->pp_flags & MV_PP_FLAG_NCQ_EN) { mv_handle_dev_err() 2601 __func__, edma_err_cause, pp->pp_flags); mv_handle_dev_err() 2613 __func__, edma_err_cause, pp->pp_flags); mv_handle_dev_err() 2656 struct mv_port_priv *pp = ap->private_data; mv_err_intr() local 2690 edma_err_cause, pp->pp_flags); mv_err_intr() 2732 pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN; mv_err_intr() 2738 pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN; mv_err_intr() 2814 static void mv_process_crpb_entries(struct ata_port *ap, struct mv_port_priv *pp) mv_process_crpb_entries() argument 2821 int ncq_enabled = (pp->pp_flags & MV_PP_FLAG_NCQ_EN); mv_process_crpb_entries() 2828 while (in_index != pp->resp_idx) { mv_process_crpb_entries() 2830 struct mv_crpb *response = &pp->crpb[pp->resp_idx]; mv_process_crpb_entries() 2832 pp->resp_idx = (pp->resp_idx + 1) & MV_MAX_Q_DEPTH_MASK; mv_process_crpb_entries() 2850 writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) | mv_process_crpb_entries() 2851 (pp->resp_idx << EDMA_RSP_Q_PTR_SHIFT), mv_process_crpb_entries() 2858 struct mv_port_priv *pp; mv_port_intr() local 2866 pp = ap->private_data; mv_port_intr() 2867 edma_was_enabled = (pp->pp_flags & MV_PP_FLAG_EDMA_EN); mv_port_intr() 2872 mv_process_crpb_entries(ap, pp); mv_port_intr() 2873 if (pp->pp_flags & MV_PP_FLAG_DELAYED_EH) mv_port_intr() 3639 struct mv_port_priv *pp = ap->private_data; mv_hardreset() local 3646 pp->pp_flags &= ~MV_PP_FLAG_EDMA_EN; mv_hardreset() 3647 pp->pp_flags &= mv_hardreset() 1001 mv_set_edma_ptrs(void __iomem *port_mmio, struct mv_host_priv *hpriv, struct mv_port_priv *pp) mv_set_edma_ptrs() argument 1173 mv_start_edma(struct ata_port *ap, void __iomem *port_mmio, struct mv_port_priv *pp, u8 protocol) mv_start_edma() argument
|
H A D | sata_inic162x.c | 323 struct inic_port_priv *pp = ap->private_data; inic_host_err_intr() local 324 struct inic_cpb *cpb = &pp->pkt->cpb; inic_host_err_intr() 477 struct inic_port_priv *pp = qc->ap->private_data; inic_qc_prep() local 478 struct inic_pkt *pkt = pp->pkt; inic_qc_prep() 498 cpb->prd = cpu_to_le32(pp->pkt_dma + offsetof(struct inic_pkt, prd)); inic_qc_prep() 521 prd->mad = cpu_to_le32(pp->pkt_dma + inic_qc_prep() 534 pp->cpb_tbl[0] = pp->pkt_dma; inic_qc_prep() 676 struct inic_port_priv *pp = ap->private_data; init_port() local 679 memset(pp->pkt, 0, sizeof(struct inic_pkt)); init_port() 680 memset(pp->cpb_tbl, 0, IDMA_CPB_TBL_SIZE); init_port() 683 writel(pp->cpb_tbl_dma, port_base + PORT_CPB_CPBLAR); init_port() 695 struct inic_port_priv *pp; inic_port_start() local 698 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); inic_port_start() 699 if (!pp) inic_port_start() 701 ap->private_data = pp; inic_port_start() 704 pp->pkt = dmam_alloc_coherent(dev, sizeof(struct inic_pkt), inic_port_start() 705 &pp->pkt_dma, GFP_KERNEL); inic_port_start() 706 if (!pp->pkt) inic_port_start() 709 pp->cpb_tbl = dmam_alloc_coherent(dev, IDMA_CPB_TBL_SIZE, inic_port_start() 710 &pp->cpb_tbl_dma, GFP_KERNEL); inic_port_start() 711 if (!pp->cpb_tbl) inic_port_start()
|
H A D | sata_fsl.c | 416 static void sata_fsl_setup_cmd_hdr_entry(struct sata_fsl_port_priv *pp, sata_fsl_setup_cmd_hdr_entry() argument 423 cmd_descriptor_address = pp->cmdentry_paddr + sata_fsl_setup_cmd_hdr_entry() 428 pp->cmdslot[tag].cda = cpu_to_le32(cmd_descriptor_address); sata_fsl_setup_cmd_hdr_entry() 429 pp->cmdslot[tag].prde_fis_len = sata_fsl_setup_cmd_hdr_entry() 431 pp->cmdslot[tag].ttl = cpu_to_le32(data_xfer_len & ~0x03); sata_fsl_setup_cmd_hdr_entry() 432 pp->cmdslot[tag].desc_info = cpu_to_le32(desc_info | (tag & 0x1F)); sata_fsl_setup_cmd_hdr_entry() 435 pp->cmdslot[tag].cda, sata_fsl_setup_cmd_hdr_entry() 436 pp->cmdslot[tag].prde_fis_len, sata_fsl_setup_cmd_hdr_entry() 437 pp->cmdslot[tag].ttl, pp->cmdslot[tag].desc_info); sata_fsl_setup_cmd_hdr_entry() 518 struct sata_fsl_port_priv *pp = ap->private_data; sata_fsl_qc_prep() local 528 cd = (struct command_desc *)pp->cmdentry + tag; sata_fsl_qc_prep() 529 cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; sata_fsl_qc_prep() 556 sata_fsl_setup_cmd_hdr_entry(pp, tag, desc_info, ttl_dwords, sata_fsl_qc_prep() 594 struct sata_fsl_port_priv *pp = qc->ap->private_data; sata_fsl_qc_fill_rtf() local 600 cd = pp->cmdentry + tag; sata_fsl_qc_fill_rtf() 726 struct sata_fsl_port_priv *pp; sata_fsl_port_start() local 733 pp = kzalloc(sizeof(*pp), GFP_KERNEL); sata_fsl_port_start() 734 if (!pp) sata_fsl_port_start() 740 kfree(pp); sata_fsl_port_start() 744 pp->cmdslot = mem; sata_fsl_port_start() 745 pp->cmdslot_paddr = mem_dma; sata_fsl_port_start() 750 pp->cmdentry = mem; sata_fsl_port_start() 751 pp->cmdentry_paddr = mem_dma; sata_fsl_port_start() 753 ap->private_data = pp; sata_fsl_port_start() 756 pp->cmdslot_paddr, pp->cmdentry_paddr); sata_fsl_port_start() 759 iowrite32(pp->cmdslot_paddr & 0xffffffff, hcr_base + CHBA); sata_fsl_port_start() 782 struct sata_fsl_port_priv *pp = ap->private_data; sata_fsl_port_stop() local 800 pp->cmdslot, pp->cmdslot_paddr); sata_fsl_port_stop() 802 kfree(pp); sata_fsl_port_stop() 943 struct sata_fsl_port_priv *pp = ap->private_data; sata_fsl_softreset() local 971 cfis = (u8 *) &pp->cmdentry->cfis; sata_fsl_softreset() 974 sata_fsl_setup_cmd_hdr_entry(pp, 0, sata_fsl_softreset() 1023 sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_RES | CMD_DESC_SNOOP_ENABLE, sata_fsl_softreset() 1592 struct sata_fsl_port_priv *pp = ap->private_data; sata_fsl_resume() local 1601 iowrite32(pp->cmdslot_paddr & 0xffffffff, hcr_base + CHBA); sata_fsl_resume()
|
H A D | sata_sil24.c | 582 struct sil24_port_priv *pp = ap->private_data; sil24_init_port() local 596 pp->do_port_rst = 1; sil24_init_port() 610 struct sil24_port_priv *pp = ap->private_data; sil24_exec_polled_cmd() local 611 struct sil24_prb *prb = &pp->cmd_block[0].ata.prb; sil24_exec_polled_cmd() 612 dma_addr_t paddr = pp->cmd_block_dma; sil24_exec_polled_cmd() 705 struct sil24_port_priv *pp = ap->private_data; sil24_hardreset() local 715 if (pp->do_port_rst) { sil24_hardreset() 729 pp->do_port_rst = 0; sil24_hardreset() 771 pp->do_port_rst = 1; sil24_hardreset() 846 struct sil24_port_priv *pp = ap->private_data; sil24_qc_prep() local 852 cb = &pp->cmd_block[sil24_tag(qc->tag)]; sil24_qc_prep() 892 struct sil24_port_priv *pp = ap->private_data; sil24_qc_issue() local 898 paddr = pp->cmd_block_dma + tag * sizeof(*pp->cmd_block); sil24_qc_issue() 981 struct sil24_port_priv *pp = ap->private_data; sil24_error_intr() local 1037 pp->do_port_rst = 1; sil24_error_intr() 1181 struct sil24_port_priv *pp = ap->private_data; sil24_error_handler() local 1188 pp->do_port_rst = 0; sil24_error_handler() 1203 struct sil24_port_priv *pp; sil24_port_start() local 1208 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); sil24_port_start() 1209 if (!pp) sil24_port_start() 1217 pp->cmd_block = cb; sil24_port_start() 1218 pp->cmd_block_dma = cb_dma; sil24_port_start() 1220 ap->private_data = pp; sil24_port_start()
|
H A D | sata_promise.c | 334 struct pdc_port_priv *pp; pdc_common_port_start() local 342 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); pdc_common_port_start() 343 if (!pp) pdc_common_port_start() 346 pp->pkt = dmam_alloc_coherent(dev, 128, &pp->pkt_dma, GFP_KERNEL); pdc_common_port_start() 347 if (!pp->pkt) pdc_common_port_start() 350 ap->private_data = pp; pdc_common_port_start() 507 struct pdc_port_priv *pp = ap->private_data; pdc_atapi_pkt() local 508 u8 *buf = pp->pkt; pdc_atapi_pkt() 654 struct pdc_port_priv *pp = qc->ap->private_data; pdc_qc_prep() local 665 qc->dev->devno, pp->pkt); pdc_qc_prep() 667 i = pdc_prep_lba48(&qc->tf, pp->pkt, i); pdc_qc_prep() 669 i = pdc_prep_lba28(&qc->tf, pp->pkt, i); pdc_qc_prep() 670 pdc_pkt_footer(&qc->tf, pp->pkt, i); pdc_qc_prep() 1022 struct pdc_port_priv *pp = ap->private_data; pdc_packet_start() local 1033 pp->pkt[2] = seq; pdc_packet_start() 1035 writel(pp->pkt_dma, ata_mmio + PDC_PKT_SUBMIT); pdc_packet_start()
|
H A D | sata_highbank.c | 145 struct ahci_port_priv *pp = ap->private_data; ecx_transmit_led_message() local 154 emp = &pp->em_priv[pmp]; ecx_transmit_led_message() 404 struct ahci_port_priv *pp = ap->private_data; ahci_highbank_hardreset() local 406 u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; ahci_highbank_hardreset()
|
H A D | ahci_xgene.c | 148 struct ahci_port_priv *pp = ap->private_data; xgene_ahci_restart_engine() local 169 if (pp->fbs_supported) { xgene_ahci_restart_engine() 364 struct ahci_port_priv *pp = ap->private_data; xgene_ahci_do_hardreset() local 365 u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; xgene_ahci_do_hardreset()
|
/linux-4.1.27/arch/m68k/include/asm/ |
H A D | nettel.h | 51 volatile unsigned short *pp; mcf_getppdata() local 52 pp = (volatile unsigned short *) MCFSIM_PADAT; mcf_getppdata() 53 return((unsigned int) *pp); mcf_getppdata() 58 volatile unsigned short *pp; mcf_setppdata() local 59 pp = (volatile unsigned short *) MCFSIM_PADAT; mcf_setppdata() 61 *pp = ppdata; mcf_setppdata()
|
/linux-4.1.27/drivers/mtd/ |
H A D | ofpart.c | 23 static bool node_has_compatible(struct device_node *pp) node_has_compatible() argument 25 return of_get_property(pp, "compatible", NULL); node_has_compatible() 34 struct device_node *pp; parse_ofpart_partitions() local 47 for_each_child_of_node(node, pp) { for_each_child_of_node() 48 if (node_has_compatible(pp)) for_each_child_of_node() 62 for_each_child_of_node(node, pp) { for_each_child_of_node() 67 if (node_has_compatible(pp)) for_each_child_of_node() 70 reg = of_get_property(pp, "reg", &len); for_each_child_of_node() 76 a_cells = of_n_addr_cells(pp); for_each_child_of_node() 77 s_cells = of_n_size_cells(pp); for_each_child_of_node() 81 partname = of_get_property(pp, "label", &len); for_each_child_of_node() 83 partname = of_get_property(pp, "name", &len); for_each_child_of_node() 86 if (of_get_property(pp, "read-only", &len)) for_each_child_of_node() 89 if (of_get_property(pp, "lock", &len)) for_each_child_of_node() 96 of_node_put(pp);
|
/linux-4.1.27/drivers/tty/serial/ |
H A D | altera_uart.c | 106 struct altera_uart *pp = container_of(port, struct altera_uart, port); altera_uart_get_mctrl() local 111 sigs |= (pp->sigs & TIOCM_RTS); altera_uart_get_mctrl() 118 struct altera_uart *pp = container_of(port, struct altera_uart, port); altera_uart_set_mctrl() local 120 pp->sigs = sigs; altera_uart_set_mctrl() 122 pp->imr |= ALTERA_UART_CONTROL_RTS_MSK; altera_uart_set_mctrl() 124 pp->imr &= ~ALTERA_UART_CONTROL_RTS_MSK; altera_uart_set_mctrl() 125 altera_uart_writel(port, pp->imr, ALTERA_UART_CONTROL_REG); altera_uart_set_mctrl() 130 struct altera_uart *pp = container_of(port, struct altera_uart, port); altera_uart_start_tx() local 132 pp->imr |= ALTERA_UART_CONTROL_TRDY_MSK; altera_uart_start_tx() 133 altera_uart_writel(port, pp->imr, ALTERA_UART_CONTROL_REG); altera_uart_start_tx() 138 struct altera_uart *pp = container_of(port, struct altera_uart, port); altera_uart_stop_tx() local 140 pp->imr &= ~ALTERA_UART_CONTROL_TRDY_MSK; altera_uart_stop_tx() 141 altera_uart_writel(port, pp->imr, ALTERA_UART_CONTROL_REG); altera_uart_stop_tx() 146 struct altera_uart *pp = container_of(port, struct altera_uart, port); altera_uart_stop_rx() local 148 pp->imr &= ~ALTERA_UART_CONTROL_RRDY_MSK; altera_uart_stop_rx() 149 altera_uart_writel(port, pp->imr, ALTERA_UART_CONTROL_REG); altera_uart_stop_rx() 154 struct altera_uart *pp = container_of(port, struct altera_uart, port); altera_uart_break_ctl() local 159 pp->imr |= ALTERA_UART_CONTROL_TRBK_MSK; altera_uart_break_ctl() 161 pp->imr &= ~ALTERA_UART_CONTROL_TRBK_MSK; altera_uart_break_ctl() 162 altera_uart_writel(port, pp->imr, ALTERA_UART_CONTROL_REG); altera_uart_break_ctl() 192 static void altera_uart_rx_chars(struct altera_uart *pp) altera_uart_rx_chars() argument 194 struct uart_port *port = &pp->port; altera_uart_rx_chars() 241 static void altera_uart_tx_chars(struct altera_uart *pp) altera_uart_tx_chars() argument 243 struct uart_port *port = &pp->port; altera_uart_tx_chars() 268 pp->imr &= ~ALTERA_UART_CONTROL_TRDY_MSK; altera_uart_tx_chars() 269 altera_uart_writel(port, pp->imr, ALTERA_UART_CONTROL_REG); altera_uart_tx_chars() 276 struct altera_uart *pp = container_of(port, struct altera_uart, port); altera_uart_interrupt() local 279 isr = altera_uart_readl(port, ALTERA_UART_STATUS_REG) & pp->imr; altera_uart_interrupt() 283 altera_uart_rx_chars(pp); altera_uart_interrupt() 285 altera_uart_tx_chars(pp); altera_uart_interrupt() 294 struct altera_uart *pp = container_of(port, struct altera_uart, port); altera_uart_timer() local 297 mod_timer(&pp->tmr, jiffies + uart_poll_timeout(port)); altera_uart_timer() 312 struct altera_uart *pp = container_of(port, struct altera_uart, port); altera_uart_startup() local 317 setup_timer(&pp->tmr, altera_uart_timer, (unsigned long)port); altera_uart_startup() 318 mod_timer(&pp->tmr, jiffies + uart_poll_timeout(port)); altera_uart_startup() 333 pp->imr = ALTERA_UART_CONTROL_RRDY_MSK; altera_uart_startup() 334 writel(pp->imr, port->membase + ALTERA_UART_CONTROL_REG); altera_uart_startup() 343 struct altera_uart *pp = container_of(port, struct altera_uart, port); altera_uart_shutdown() local 349 pp->imr = 0; altera_uart_shutdown() 350 writel(pp->imr, port->membase + ALTERA_UART_CONTROL_REG); altera_uart_shutdown() 357 del_timer_sync(&pp->tmr); altera_uart_shutdown()
|
H A D | altera_jtaguart.c | 83 struct altera_jtaguart *pp = altera_jtaguart_start_tx() local 86 pp->imr |= ALTERA_JTAGUART_CONTROL_WE_MSK; altera_jtaguart_start_tx() 87 writel(pp->imr, port->membase + ALTERA_JTAGUART_CONTROL_REG); altera_jtaguart_start_tx() 92 struct altera_jtaguart *pp = altera_jtaguart_stop_tx() local 95 pp->imr &= ~ALTERA_JTAGUART_CONTROL_WE_MSK; altera_jtaguart_stop_tx() 96 writel(pp->imr, port->membase + ALTERA_JTAGUART_CONTROL_REG); altera_jtaguart_stop_tx() 101 struct altera_jtaguart *pp = altera_jtaguart_stop_rx() local 104 pp->imr &= ~ALTERA_JTAGUART_CONTROL_RE_MSK; altera_jtaguart_stop_rx() 105 writel(pp->imr, port->membase + ALTERA_JTAGUART_CONTROL_REG); altera_jtaguart_stop_rx() 121 static void altera_jtaguart_rx_chars(struct altera_jtaguart *pp) altera_jtaguart_rx_chars() argument 123 struct uart_port *port = &pp->port; altera_jtaguart_rx_chars() 143 static void altera_jtaguart_tx_chars(struct altera_jtaguart *pp) altera_jtaguart_tx_chars() argument 145 struct uart_port *port = &pp->port; altera_jtaguart_tx_chars() 178 pp->imr &= ~ALTERA_JTAGUART_CONTROL_WE_MSK; altera_jtaguart_tx_chars() 179 writel(pp->imr, port->membase + ALTERA_JTAGUART_CONTROL_REG); altera_jtaguart_tx_chars() 186 struct altera_jtaguart *pp = altera_jtaguart_interrupt() local 191 ALTERA_JTAGUART_CONTROL_RI_OFF) & pp->imr; altera_jtaguart_interrupt() 196 altera_jtaguart_rx_chars(pp); altera_jtaguart_interrupt() 198 altera_jtaguart_tx_chars(pp); altera_jtaguart_interrupt() 215 struct altera_jtaguart *pp = altera_jtaguart_startup() local 231 pp->imr = ALTERA_JTAGUART_CONTROL_RE_MSK; altera_jtaguart_startup() 232 writel(pp->imr, port->membase + ALTERA_JTAGUART_CONTROL_REG); altera_jtaguart_startup() 241 struct altera_jtaguart *pp = altera_jtaguart_shutdown() local 248 pp->imr = 0; altera_jtaguart_shutdown() 249 writel(pp->imr, port->membase + ALTERA_JTAGUART_CONTROL_REG); altera_jtaguart_shutdown()
|
H A D | mcf.c | 74 struct mcf_uart *pp = container_of(port, struct mcf_uart, port); mcf_get_mctrl() local 79 sigs |= (pp->sigs & TIOCM_RTS); mcf_get_mctrl() 90 struct mcf_uart *pp = container_of(port, struct mcf_uart, port); mcf_set_mctrl() local 92 pp->sigs = sigs; mcf_set_mctrl() 104 struct mcf_uart *pp = container_of(port, struct mcf_uart, port); mcf_start_tx() local 112 pp->imr |= MCFUART_UIR_TXREADY; mcf_start_tx() 113 writeb(pp->imr, port->membase + MCFUART_UIMR); mcf_start_tx() 120 struct mcf_uart *pp = container_of(port, struct mcf_uart, port); mcf_stop_tx() local 122 pp->imr &= ~MCFUART_UIR_TXREADY; mcf_stop_tx() 123 writeb(pp->imr, port->membase + MCFUART_UIMR); mcf_stop_tx() 130 struct mcf_uart *pp = container_of(port, struct mcf_uart, port); mcf_stop_rx() local 132 pp->imr &= ~MCFUART_UIR_RXREADY; mcf_stop_rx() 133 writeb(pp->imr, port->membase + MCFUART_UIMR); mcf_stop_rx() 154 struct mcf_uart *pp = container_of(port, struct mcf_uart, port); mcf_startup() local 168 pp->imr = MCFUART_UIR_RXREADY; mcf_startup() 169 writeb(pp->imr, port->membase + MCFUART_UIMR); mcf_startup() 180 struct mcf_uart *pp = container_of(port, struct mcf_uart, port); mcf_shutdown() local 186 pp->imr = 0; mcf_shutdown() 187 writeb(pp->imr, port->membase + MCFUART_UIMR); mcf_shutdown() 285 static void mcf_rx_chars(struct mcf_uart *pp) mcf_rx_chars() argument 287 struct uart_port *port = &pp->port; mcf_rx_chars() 333 static void mcf_tx_chars(struct mcf_uart *pp) mcf_tx_chars() argument 335 struct uart_port *port = &pp->port; mcf_tx_chars() 358 pp->imr &= ~MCFUART_UIR_TXREADY; mcf_tx_chars() 359 writeb(pp->imr, port->membase + MCFUART_UIMR); mcf_tx_chars() 372 struct mcf_uart *pp = container_of(port, struct mcf_uart, port); mcf_interrupt() local 376 isr = readb(port->membase + MCFUART_UISR) & pp->imr; mcf_interrupt() 380 mcf_rx_chars(pp); mcf_interrupt() 384 mcf_tx_chars(pp); mcf_interrupt()
|
/linux-4.1.27/drivers/net/hamradio/ |
H A D | baycom_par.c | 199 struct parport *pp = bc->pdev->port; par96_tx() local 212 pp->ops->write_data(pp, val); par96_tx() 213 pp->ops->write_data(pp, val | PAR96_BURST); par96_tx() 223 struct parport *pp = bc->pdev->port; par96_rx() local 230 if (pp->ops->read_status(pp) & PAR96_RXBIT) par96_rx() 235 pp->ops->write_data(pp, PAR97_POWER | PAR96_PTT); par96_rx() 241 pp->ops->write_data(pp, PAR97_POWER | PAR96_PTT | PAR96_BURST); par96_rx() 266 hdlcdrv_setdcd(&bc->hdrv, !!(pp->ops->read_status(pp) & PAR96_DCD)); par96_rx() 314 struct parport *pp; par96_open() local 318 pp = parport_find_base(dev->base_addr); par96_open() 319 if (!pp) { par96_open() 323 if (pp->irq < 0) { par96_open() 324 printk(KERN_ERR "baycom_par: parport at 0x%lx has no irq\n", pp->base); par96_open() 325 parport_put_port(pp); par96_open() 328 if ((~pp->modes) & (PARPORT_MODE_PCSPP | PARPORT_MODE_SAFEININT)) { par96_open() 329 printk(KERN_ERR "baycom_par: parport at 0x%lx cannot be used\n", pp->base); par96_open() 330 parport_put_port(pp); par96_open() 335 bc->pdev = parport_register_device(pp, dev->name, NULL, par96_wakeup, par96_open() 337 parport_put_port(pp); par96_open() 343 printk(KERN_ERR "baycom_par: parport at 0x%lx busy\n", pp->base); par96_open() 347 pp = bc->pdev->port; par96_open() 348 dev->irq = pp->irq; par96_open() 349 pp->ops->data_forward(pp); par96_open() 351 pp->ops->write_data(pp, PAR96_PTT | PAR97_POWER); /* switch off PTT */ par96_open() 352 pp->ops->enable_irq(pp); par96_open() 363 struct parport *pp; par96_close() local 367 pp = bc->pdev->port; par96_close() 369 pp->ops->disable_irq(pp); par96_close() 371 pp->ops->write_data(pp, PAR96_PTT | PAR97_POWER); par96_close()
|
H A D | baycom_epp.c | 433 struct parport *pp = bc->pdev->port; transmit() local 472 if (j != pp->ops->epp_write_data(pp, tmp, j, 0)) transmit() 490 if (i != pp->ops->epp_write_data(pp, bc->hdlctx.bufptr, i, 0)) transmit() 508 if (j != pp->ops->epp_write_data(pp, tmp, j, 0)) transmit() 524 if (j != pp->ops->epp_write_data(pp, tmp, j, 0)) transmit() 564 struct parport *pp = bc->pdev->port; receive() local 578 if (cnt2 != pp->ops->epp_read_data(pp, tmp, cnt2, 0)) { receive() 651 struct parport *pp; epp_bh() local 662 pp = bc->pdev->port; epp_bh() 664 if (pp->ops->epp_read_addr(pp, &stat, 1, 0) != 1) epp_bh() 672 if (pp->ops->epp_write_addr(pp, tmp, 1, 0) != 1) epp_bh() 674 if (pp->ops->epp_read_addr(pp, tmp, 2, 0) != 2) epp_bh() 680 if (pp->ops->epp_write_addr(pp, tmp, 1, 0) != 1) epp_bh() 682 if (pp->ops->epp_read_addr(pp, tmp, 2, 0) != 2) epp_bh() 688 if (pp->ops->epp_write_addr(pp, tmp, 1, 0) != 1) epp_bh() 695 if (pp->ops->epp_read_addr(pp, &stat, 1, 0) != 1) epp_bh() 737 if (pp->ops->epp_read_addr(pp, &stat, 1, 0) != 1) epp_bh() 749 if (pp->ops->epp_read_addr(pp, &stat, 1, 0) != 1) epp_bh() 832 struct parport *pp = parport_find_base(dev->base_addr); epp_open() local 838 if (!pp) { epp_open() 843 if (pp->irq < 0) { epp_open() 844 printk(KERN_ERR "%s: parport at 0x%lx has no irq\n", bc_drvname, pp->base); epp_open() 845 parport_put_port(pp); epp_open() 849 if ((~pp->modes) & (PARPORT_MODE_TRISTATE | PARPORT_MODE_PCSPP | PARPORT_MODE_SAFEININT)) { epp_open() 851 bc_drvname, pp->base); epp_open() 852 parport_put_port(pp); epp_open() 856 bc->pdev = parport_register_device(pp, dev->name, NULL, epp_wakeup, epp_open() 858 parport_put_port(pp); epp_open() 860 printk(KERN_ERR "%s: cannot register parport at 0x%lx\n", bc_drvname, pp->base); epp_open() 864 printk(KERN_ERR "%s: parport at 0x%lx busy\n", bc_drvname, pp->base); epp_open() 868 dev->irq = /*pp->irq*/ 0; epp_open() 876 parport_write_control(pp, LPTCTRL_PROGRAM); /* prepare EPP mode; we aren't using interrupts */ epp_open() 880 if (pp->ops->epp_write_addr(pp, tmp, 2, 0) != 2) epp_open() 886 if (pp->ops->epp_read_addr(pp, &stat, 1, 0) != 1) epp_open() 892 if (pp->ops->epp_read_data(pp, tmp, 128, 0) != 128) epp_open() 894 if (pp->ops->epp_read_data(pp, tmp, 128, 0) != 128) epp_open() 899 if (pp->ops->epp_read_addr(pp, &stat, 1, 0) != 1) epp_open() 903 if (pp->ops->epp_read_data(pp, tmp, 1, 0) != 1) epp_open() 918 if (pp->ops->epp_write_addr(pp, tmp, 1, 0) != 1) epp_open() 936 parport_write_control(pp, 0); /* reset the adapter */ epp_open() 947 struct parport *pp = bc->pdev->port; epp_close() local 954 pp->ops->epp_write_addr(pp, tmp, 1, 0); epp_close() 955 parport_write_control(pp, 0); /* reset the adapter */ epp_close()
|
/linux-4.1.27/fs/freevxfs/ |
H A D | vxfs_immed.c | 91 * file that hosts @pp into the pagecache. 100 vxfs_immed_readpage(struct file *fp, struct page *pp) vxfs_immed_readpage() argument 102 struct vxfs_inode_info *vip = VXFS_INO(pp->mapping->host); vxfs_immed_readpage() 103 u_int64_t offset = (u_int64_t)pp->index << PAGE_CACHE_SHIFT; vxfs_immed_readpage() 106 kaddr = kmap(pp); vxfs_immed_readpage() 108 kunmap(pp); vxfs_immed_readpage() 110 flush_dcache_page(pp); vxfs_immed_readpage() 111 SetPageUptodate(pp); vxfs_immed_readpage() 112 unlock_page(pp); vxfs_immed_readpage()
|
H A D | vxfs_subr.c | 50 vxfs_put_page(struct page *pp) vxfs_put_page() argument 52 kunmap(pp); vxfs_put_page() 53 page_cache_release(pp); vxfs_put_page() 70 struct page * pp; vxfs_get_page() local 72 pp = read_mapping_page(mapping, n, NULL); vxfs_get_page() 74 if (!IS_ERR(pp)) { vxfs_get_page() 75 kmap(pp); vxfs_get_page() 76 /** if (!PageChecked(pp)) **/ vxfs_get_page() 77 /** vxfs_check_page(pp); **/ vxfs_get_page() 78 if (PageError(pp)) vxfs_get_page() 82 return (pp); vxfs_get_page() 85 vxfs_put_page(pp); vxfs_get_page()
|
H A D | vxfs_lookup.c | 127 struct page *pp; vxfs_find_entry() local 129 pp = vxfs_get_page(ip->i_mapping, page); vxfs_find_entry() 130 if (IS_ERR(pp)) vxfs_find_entry() 132 kaddr = (caddr_t)page_address(pp); vxfs_find_entry() 151 *ppp = pp; vxfs_find_entry() 156 vxfs_put_page(pp); vxfs_find_entry() 178 struct page *pp; vxfs_inode_by_name() local 181 de = vxfs_find_entry(dip, dp, &pp); vxfs_inode_by_name() 184 kunmap(pp); vxfs_inode_by_name() 185 page_cache_release(pp); vxfs_inode_by_name() 271 struct page *pp; vxfs_readdir() local 273 pp = vxfs_get_page(ip->i_mapping, page); vxfs_readdir() 274 if (IS_ERR(pp)) vxfs_readdir() 276 kaddr = (char *)page_address(pp); vxfs_readdir() 302 vxfs_put_page(pp); vxfs_readdir() 308 vxfs_put_page(pp); vxfs_readdir()
|
H A D | vxfs_inode.c | 132 struct page *pp; __vxfs_iget() local 136 pp = vxfs_get_page(ilistp->i_mapping, ino * VXFS_ISIZE / PAGE_SIZE); __vxfs_iget() 138 if (!IS_ERR(pp)) { __vxfs_iget() 141 caddr_t kaddr = (char *)page_address(pp); __vxfs_iget() 150 vxfs_put_page(pp); __vxfs_iget() 154 printk(KERN_WARNING "vxfs: error on page %p\n", pp); __vxfs_iget() 155 return ERR_CAST(pp); __vxfs_iget() 159 vxfs_put_page(pp); __vxfs_iget()
|
/linux-4.1.27/drivers/macintosh/ |
H A D | smu.c | 1077 struct smu_private *pp; smu_open() local 1080 pp = kzalloc(sizeof(struct smu_private), GFP_KERNEL); smu_open() 1081 if (pp == 0) smu_open() 1083 spin_lock_init(&pp->lock); smu_open() 1084 pp->mode = smu_file_commands; smu_open() 1085 init_waitqueue_head(&pp->wait); smu_open() 1089 list_add(&pp->list, &smu_clist); smu_open() 1091 file->private_data = pp; smu_open() 1100 struct smu_private *pp = misc; smu_user_cmd_done() local 1102 wake_up_all(&pp->wait); smu_user_cmd_done() 1109 struct smu_private *pp = file->private_data; smu_write() local 1114 if (pp->busy) smu_write() 1119 pp->mode = smu_file_events; smu_write() 1131 else if (pp->mode != smu_file_commands) smu_write() 1136 spin_lock_irqsave(&pp->lock, flags); smu_write() 1137 if (pp->busy) { smu_write() 1138 spin_unlock_irqrestore(&pp->lock, flags); smu_write() 1141 pp->busy = 1; smu_write() 1142 pp->cmd.status = 1; smu_write() 1143 spin_unlock_irqrestore(&pp->lock, flags); smu_write() 1145 if (copy_from_user(pp->buffer, buf + sizeof(hdr), hdr.data_len)) { smu_write() 1146 pp->busy = 0; smu_write() 1150 pp->cmd.cmd = hdr.cmd; smu_write() 1151 pp->cmd.data_len = hdr.data_len; smu_write() 1152 pp->cmd.reply_len = SMU_MAX_DATA; smu_write() 1153 pp->cmd.data_buf = pp->buffer; smu_write() 1154 pp->cmd.reply_buf = pp->buffer; smu_write() 1155 pp->cmd.done = smu_user_cmd_done; smu_write() 1156 pp->cmd.misc = pp; smu_write() 1157 rc = smu_queue_cmd(&pp->cmd); smu_write() 1164 static ssize_t smu_read_command(struct file *file, struct smu_private *pp, smu_read_command() argument 1172 if (!pp->busy) smu_read_command() 1176 spin_lock_irqsave(&pp->lock, flags); smu_read_command() 1177 if (pp->cmd.status == 1) { smu_read_command() 1179 spin_unlock_irqrestore(&pp->lock, flags); smu_read_command() 1182 add_wait_queue(&pp->wait, &wait); smu_read_command() 1186 if (pp->cmd.status != 1) smu_read_command() 1191 spin_unlock_irqrestore(&pp->lock, flags); smu_read_command() 1193 spin_lock_irqsave(&pp->lock, flags); smu_read_command() 1196 remove_wait_queue(&pp->wait, &wait); smu_read_command() 1198 spin_unlock_irqrestore(&pp->lock, flags); smu_read_command() 1201 if (pp->cmd.status != 0) smu_read_command() 1202 pp->cmd.reply_len = 0; smu_read_command() 1203 size = sizeof(hdr) + pp->cmd.reply_len; smu_read_command() 1207 hdr.status = pp->cmd.status; smu_read_command() 1208 hdr.reply_len = pp->cmd.reply_len; smu_read_command() 1212 if (size && copy_to_user(buf + sizeof(hdr), pp->buffer, size)) smu_read_command() 1214 pp->busy = 0; smu_read_command() 1220 static ssize_t smu_read_events(struct file *file, struct smu_private *pp, smu_read_events() argument 1232 struct smu_private *pp = file->private_data; smu_read() local 1234 if (pp->mode == smu_file_commands) smu_read() 1235 return smu_read_command(file, pp, buf, count); smu_read() 1236 if (pp->mode == smu_file_events) smu_read() 1237 return smu_read_events(file, pp, buf, count); smu_read() 1244 struct smu_private *pp = file->private_data; smu_fpoll() local 1248 if (pp == 0) smu_fpoll() 1251 if (pp->mode == smu_file_commands) { smu_fpoll() 1252 poll_wait(file, &pp->wait, wait); smu_fpoll() 1254 spin_lock_irqsave(&pp->lock, flags); smu_fpoll() 1255 if (pp->busy && pp->cmd.status != 1) smu_fpoll() 1257 spin_unlock_irqrestore(&pp->lock, flags); smu_fpoll() 1259 if (pp->mode == smu_file_events) { smu_fpoll() 1267 struct smu_private *pp = file->private_data; smu_release() local 1271 if (pp == 0) smu_release() 1277 spin_lock_irqsave(&pp->lock, flags); smu_release() 1278 pp->mode = smu_file_closing; smu_release() 1279 busy = pp->busy; smu_release() 1282 if (busy && pp->cmd.status == 1) { smu_release() 1285 add_wait_queue(&pp->wait, &wait); smu_release() 1288 if (pp->cmd.status != 1) smu_release() 1290 spin_unlock_irqrestore(&pp->lock, flags); smu_release() 1292 spin_lock_irqsave(&pp->lock, flags); smu_release() 1295 remove_wait_queue(&pp->wait, &wait); smu_release() 1297 spin_unlock_irqrestore(&pp->lock, flags); smu_release() 1300 list_del(&pp->list); smu_release() 1302 kfree(pp); smu_release()
|
H A D | via-pmu.c | 2049 struct pmu_private *pp; pmu_pass_intr() local 2054 if (len > sizeof(pp->rb_buf[0].data)) pmu_pass_intr() 2055 len = sizeof(pp->rb_buf[0].data); pmu_pass_intr() 2058 pp = list_entry(list, struct pmu_private, list); pmu_pass_intr() 2059 spin_lock(&pp->lock); pmu_pass_intr() 2060 i = pp->rb_put + 1; pmu_pass_intr() 2063 if (i != pp->rb_get) { pmu_pass_intr() 2064 struct rb_entry *rp = &pp->rb_buf[pp->rb_put]; pmu_pass_intr() 2067 pp->rb_put = i; pmu_pass_intr() 2068 wake_up_interruptible(&pp->wait); pmu_pass_intr() 2070 spin_unlock(&pp->lock); pmu_pass_intr() 2078 struct pmu_private *pp; pmu_open() local 2081 pp = kmalloc(sizeof(struct pmu_private), GFP_KERNEL); pmu_open() 2082 if (pp == 0) pmu_open() 2084 pp->rb_get = pp->rb_put = 0; pmu_open() 2085 spin_lock_init(&pp->lock); pmu_open() 2086 init_waitqueue_head(&pp->wait); pmu_open() 2090 pp->backlight_locker = 0; pmu_open() 2092 list_add(&pp->list, &all_pmu_pvt); pmu_open() 2094 file->private_data = pp; pmu_open() 2103 struct pmu_private *pp = file->private_data; pmu_read() local 2108 if (count < 1 || pp == 0) pmu_read() 2113 spin_lock_irqsave(&pp->lock, flags); pmu_read() 2114 add_wait_queue(&pp->wait, &wait); pmu_read() 2119 if (pp->rb_get != pp->rb_put) { pmu_read() 2120 int i = pp->rb_get; pmu_read() 2121 struct rb_entry *rp = &pp->rb_buf[i]; pmu_read() 2123 spin_unlock_irqrestore(&pp->lock, flags); pmu_read() 2130 spin_lock_irqsave(&pp->lock, flags); pmu_read() 2131 pp->rb_get = i; pmu_read() 2140 spin_unlock_irqrestore(&pp->lock, flags); pmu_read() 2142 spin_lock_irqsave(&pp->lock, flags); pmu_read() 2145 remove_wait_queue(&pp->wait, &wait); pmu_read() 2146 spin_unlock_irqrestore(&pp->lock, flags); pmu_read() 2161 struct pmu_private *pp = filp->private_data; pmu_fpoll() local 2165 if (pp == 0) pmu_fpoll() 2167 poll_wait(filp, &pp->wait, wait); pmu_fpoll() 2168 spin_lock_irqsave(&pp->lock, flags); pmu_fpoll() 2169 if (pp->rb_get != pp->rb_put) pmu_fpoll() 2171 spin_unlock_irqrestore(&pp->lock, flags); pmu_fpoll() 2178 struct pmu_private *pp = file->private_data; pmu_release() local 2181 if (pp != 0) { pmu_release() 2184 list_del(&pp->list); pmu_release() 2188 if (pp->backlight_locker) pmu_release() 2192 kfree(pp); pmu_release() 2326 struct pmu_private *pp = filp->private_data; pmu_ioctl() local 2328 if (pp->backlight_locker) pmu_ioctl() 2331 pp->backlight_locker = 1; pmu_ioctl()
|
/linux-4.1.27/drivers/gpio/ |
H A D | gpio-dwapb.c | 296 struct dwapb_port_property *pp) dwapb_configure_irqs() 299 struct device_node *node = pp->node; dwapb_configure_irqs() 350 if (!pp->irq_shared) { dwapb_configure_irqs() 351 irq_set_chained_handler(pp->irq, dwapb_irq_handler); dwapb_configure_irqs() 352 irq_set_handler_data(pp->irq, gpio); dwapb_configure_irqs() 358 err = devm_request_irq(gpio->dev, pp->irq, dwapb_configure_irqs() 393 struct dwapb_port_property *pp, dwapb_gpio_add_port() 402 port->idx = pp->idx; dwapb_gpio_add_port() 410 dat = gpio->regs + GPIO_EXT_PORTA + (pp->idx * GPIO_EXT_PORT_SIZE); dwapb_gpio_add_port() 411 set = gpio->regs + GPIO_SWPORTA_DR + (pp->idx * GPIO_SWPORT_DR_SIZE); dwapb_gpio_add_port() 413 (pp->idx * GPIO_SWPORT_DDR_SIZE); dwapb_gpio_add_port() 419 pp->name); dwapb_gpio_add_port() 424 port->bgc.gc.of_node = pp->node; dwapb_gpio_add_port() 426 port->bgc.gc.ngpio = pp->ngpio; dwapb_gpio_add_port() 427 port->bgc.gc.base = pp->gpio_base; dwapb_gpio_add_port() 430 if (pp->idx == 0) dwapb_gpio_add_port() 433 if (pp->irq) dwapb_gpio_add_port() 434 dwapb_configure_irqs(gpio, port, pp); dwapb_gpio_add_port() 439 pp->name); dwapb_gpio_add_port() 460 struct dwapb_port_property *pp; dwapb_gpio_get_pdata_of() local 476 pdata->properties = devm_kcalloc(dev, nports, sizeof(*pp), GFP_KERNEL); dwapb_gpio_get_pdata_of() 484 pp = &pdata->properties[i++]; for_each_child_of_node() 485 pp->node = port_np; for_each_child_of_node() 487 if (of_property_read_u32(port_np, "reg", &pp->idx) || for_each_child_of_node() 488 pp->idx >= DWAPB_MAX_PORTS) { for_each_child_of_node() 495 &pp->ngpio)) { for_each_child_of_node() 498 pp->ngpio = 32; for_each_child_of_node() 505 if (pp->idx == 0 && for_each_child_of_node() 507 pp->irq = irq_of_parse_and_map(port_np, 0); for_each_child_of_node() 508 if (!pp->irq) { for_each_child_of_node() 514 pp->irq_shared = false; for_each_child_of_node() 515 pp->gpio_base = -1; for_each_child_of_node() 516 pp->name = port_np->full_name; for_each_child_of_node() 294 dwapb_configure_irqs(struct dwapb_gpio *gpio, struct dwapb_gpio_port *port, struct dwapb_port_property *pp) dwapb_configure_irqs() argument 392 dwapb_gpio_add_port(struct dwapb_gpio *gpio, struct dwapb_port_property *pp, unsigned int offs) dwapb_gpio_add_port() argument
|
/linux-4.1.27/arch/mips/lantiq/xway/ |
H A D | xrx200_phy_fw.c | 81 struct property *pp; xway_phy_fw_probe() local 88 pp = of_find_property(pdev->dev.of_node, "phys", NULL); xway_phy_fw_probe() 89 if (!pp) xway_phy_fw_probe() 91 phyids = pp->value; xway_phy_fw_probe() 92 for (i = 0; i < pp->length && !ret; i++) xway_phy_fw_probe()
|
/linux-4.1.27/arch/mips/kernel/ |
H A D | pm-cps.c | 201 static void __init cps_gen_cache_routine(u32 **pp, struct uasm_label **pl, cps_gen_cache_routine() argument 215 UASM_i_LA(pp, t0, (long)CKSEG0); cps_gen_cache_routine() 219 uasm_i_addiu(pp, t1, t0, cache_size); cps_gen_cache_routine() 221 UASM_i_LA(pp, t1, (long)(CKSEG0 + cache_size)); cps_gen_cache_routine() 224 uasm_build_label(pl, *pp, lbl); cps_gen_cache_routine() 228 uasm_i_cache(pp, op, i * cache->linesz, t0); cps_gen_cache_routine() 231 uasm_i_addiu(pp, t0, t0, unroll_lines * cache->linesz); cps_gen_cache_routine() 234 uasm_il_bne(pp, pr, t0, t1, lbl); cps_gen_cache_routine() 235 uasm_i_nop(pp); cps_gen_cache_routine() 238 static int __init cps_gen_flush_fsb(u32 **pp, struct uasm_label **pl, cps_gen_flush_fsb() argument 284 uasm_i_mfc0(pp, t2, 25, (perf_counter * 2) + 0); /* PerfCtlN */ cps_gen_flush_fsb() 285 uasm_i_mfc0(pp, t3, 25, (perf_counter * 2) + 1); /* PerfCntN */ cps_gen_flush_fsb() 288 uasm_i_addiu(pp, t0, zero, (perf_event << 5) | 0xf); cps_gen_flush_fsb() 289 uasm_i_mtc0(pp, t0, 25, (perf_counter * 2) + 0); /* PerfCtlN */ cps_gen_flush_fsb() 290 uasm_i_ehb(pp); cps_gen_flush_fsb() 291 uasm_i_mtc0(pp, zero, 25, (perf_counter * 2) + 1); /* PerfCntN */ cps_gen_flush_fsb() 292 uasm_i_ehb(pp); cps_gen_flush_fsb() 295 UASM_i_LA(pp, t0, (long)CKSEG0); cps_gen_flush_fsb() 298 uasm_build_label(pl, *pp, lbl); cps_gen_flush_fsb() 302 uasm_i_lw(pp, zero, i * line_size * line_stride, t0); cps_gen_flush_fsb() 309 uasm_i_cache(pp, Hit_Invalidate_D, cps_gen_flush_fsb() 311 uasm_i_cache(pp, Hit_Writeback_Inv_SD, cps_gen_flush_fsb() 316 uasm_i_sync(pp, stype_memory); cps_gen_flush_fsb() 317 uasm_i_ehb(pp); cps_gen_flush_fsb() 320 uasm_i_mfc0(pp, t1, 25, (perf_counter * 2) + 1); /* PerfCntN */ cps_gen_flush_fsb() 323 uasm_il_beqz(pp, pr, t1, lbl); cps_gen_flush_fsb() 324 uasm_i_nop(pp); cps_gen_flush_fsb() 327 uasm_i_mtc0(pp, t2, 25, (perf_counter * 2) + 0); /* PerfCtlN */ cps_gen_flush_fsb() 328 uasm_i_ehb(pp); cps_gen_flush_fsb() 329 uasm_i_mtc0(pp, t3, 25, (perf_counter * 2) + 1); /* PerfCntN */ cps_gen_flush_fsb() 330 uasm_i_ehb(pp); cps_gen_flush_fsb() 335 static void __init cps_gen_set_top_bit(u32 **pp, struct uasm_label **pl, cps_gen_set_top_bit() argument 339 uasm_i_lui(pp, t0, uasm_rel_hi(0x80000000)); cps_gen_set_top_bit() 340 uasm_build_label(pl, *pp, lbl); cps_gen_set_top_bit() 341 uasm_i_ll(pp, t1, 0, r_addr); cps_gen_set_top_bit() 342 uasm_i_or(pp, t1, t1, t0); cps_gen_set_top_bit() 343 uasm_i_sc(pp, t1, 0, r_addr); cps_gen_set_top_bit() 344 uasm_il_beqz(pp, pr, t1, lbl); cps_gen_set_top_bit() 345 uasm_i_nop(pp); cps_gen_set_top_bit()
|
/linux-4.1.27/arch/sparc/kernel/ |
H A D | of_device_64.c | 281 static int __init use_1to1_mapping(struct device_node *pp) use_1to1_mapping() argument 284 if (of_find_property(pp, "ranges", NULL) != NULL) use_1to1_mapping() 296 if (!strcmp(pp->name, "dma") || use_1to1_mapping() 297 !strcmp(pp->name, "espdma") || use_1to1_mapping() 298 !strcmp(pp->name, "ledma") || use_1to1_mapping() 299 !strcmp(pp->name, "lebuffer")) use_1to1_mapping() 306 if (!strcmp(pp->name, "pci")) use_1to1_mapping() 355 struct device_node *pp = p_op->dev.of_node; build_device_resources() local 367 if (use_1to1_mapping(pp)) { build_device_resources() 377 dp = pp; build_device_resources() 378 pp = dp->parent; build_device_resources() 379 if (!pp) { build_device_resources() 384 pbus = of_match_bus(pp); build_device_resources() 419 apply_interrupt_map(struct device_node *dp, struct device_node *pp, apply_interrupt_map() argument 430 bus = of_match_bus(pp); apply_interrupt_map() 466 if (pp->irq_trans) apply_interrupt_map() 467 return pp; apply_interrupt_map() 479 struct device_node *pp, pci_irq_swizzle() 496 if (pp->irq_trans) { pci_irq_swizzle() 537 struct device_node *pp, *ip; build_one_device_irq() local 563 pp = dp->parent; build_one_device_irq() 565 while (pp) { build_one_device_irq() 569 imap = of_get_property(pp, "interrupt-map", &imlen); build_one_device_irq() 570 imsk = of_get_property(pp, "interrupt-map-mask", NULL); build_one_device_irq() 575 iret = apply_interrupt_map(dp, pp, build_one_device_irq() 582 pp->full_name, this_orig_irq, build_one_device_irq() 593 if (!strcmp(pp->name, "pci")) { build_one_device_irq() 596 irq = pci_irq_swizzle(dp, pp, irq); build_one_device_irq() 601 pp->full_name, this_orig_irq, build_one_device_irq() 606 if (pp->irq_trans) { build_one_device_irq() 607 ip = pp; build_one_device_irq() 611 dp = pp; build_one_device_irq() 612 pp = pp->parent; build_one_device_irq() 478 pci_irq_swizzle(struct device_node *dp, struct device_node *pp, unsigned int irq) pci_irq_swizzle() argument
|
H A D | of_device_32.c | 221 static int __init use_1to1_mapping(struct device_node *pp) use_1to1_mapping() argument 224 if (of_find_property(pp, "ranges", NULL) != NULL) use_1to1_mapping() 233 if (!strcmp(pp->name, "dma") || use_1to1_mapping() 234 !strcmp(pp->name, "espdma") || use_1to1_mapping() 235 !strcmp(pp->name, "ledma") || use_1to1_mapping() 236 !strcmp(pp->name, "lebuffer")) use_1to1_mapping() 277 struct device_node *pp = p_op->dev.of_node; build_device_resources() local 290 if (use_1to1_mapping(pp)) { build_device_resources() 300 dp = pp; build_device_resources() 301 pp = dp->parent; build_device_resources() 302 if (!pp) { build_device_resources() 307 pbus = of_match_bus(pp); build_device_resources()
|
H A D | leon_kernel.c | 308 struct property *pp; leon_init_timers() local 334 pp = of_find_property(rootnp, "systemid", &len); leon_init_timers() 335 if (pp) leon_init_timers() 336 amba_system_id = *(unsigned long *)pp->value; leon_init_timers() 345 pp = of_find_property(np, "reg", &len); leon_init_timers() 346 if (!pp) leon_init_timers() 348 leon3_irqctrl_regs = *(struct leon3_irqctrl_regs_map **)pp->value; leon_init_timers() 361 pp = of_find_property(np, "ampopts", &len); leon_init_timers() 362 if (pp) { leon_init_timers() 363 ampopts = *(int *)pp->value; leon_init_timers() 375 pp = of_find_property(np, "reg", &len); leon_init_timers() 376 if (pp) leon_init_timers() 378 pp->value; leon_init_timers() 379 pp = of_find_property(np, "interrupts", &len); leon_init_timers() 380 if (pp) leon_init_timers() 381 leon3_gptimer_irq = *(unsigned int *)pp->value; leon_init_timers()
|
H A D | process_64.c | 314 struct global_pmu_snapshot *pp; __global_pmu_self() local 320 pp = &global_cpu_snapshot[this_cpu].pmu; __global_pmu_self() 328 pp->pcr[i] = pcr_ops->read_pcr(i); __global_pmu_self() 329 pp->pic[i] = pcr_ops->read_pic(i); __global_pmu_self() 333 static void __global_pmu_poll(struct global_pmu_snapshot *pp) __global_pmu_poll() argument 337 while (!pp->pcr[0] && ++limit < 100) { __global_pmu_poll() 359 struct global_pmu_snapshot *pp = &global_cpu_snapshot[cpu].pmu; for_each_online_cpu() local 361 __global_pmu_poll(pp); for_each_online_cpu() 365 pp->pcr[0], pp->pcr[1], pp->pcr[2], pp->pcr[3], for_each_online_cpu() 366 pp->pic[0], pp->pic[1], pp->pic[2], pp->pic[3]); for_each_online_cpu()
|
H A D | leon_smp.c | 277 struct property *pp; leon_ipi_init() local 285 pp = of_find_property(rootnp, "ipi_num", &len); leon_ipi_init() 286 if (pp && (*(int *)pp->value)) leon_ipi_init() 287 leon_ipi_irq = *(int *)pp->value; leon_ipi_init()
|
/linux-4.1.27/tools/perf/util/ |
H A D | probe-event.c | 73 static char *synthesize_perf_probe_point(struct perf_probe_point *pp); 274 static void clear_perf_probe_point(struct perf_probe_point *pp) clear_perf_probe_point() argument 276 free(pp->file); clear_perf_probe_point() 277 free(pp->function); clear_perf_probe_point() 278 free(pp->lazy_line); clear_perf_probe_point() 296 struct perf_probe_point *pp, find_alternative_probe_point() 306 if (!pp->function || pp->file) find_alternative_probe_point() 314 map__for_each_symbol_by_name(map, pp->function, sym) { find_alternative_probe_point() 326 pp->function, address); find_alternative_probe_point() 333 result->offset += pp->offset; find_alternative_probe_point() 334 result->line += pp->line; find_alternative_probe_point() 335 result->retprobe = pp->retprobe; find_alternative_probe_point() 366 struct perf_probe_point pp = { .function = lr->function, get_alternative_line_range() local 376 ret = find_alternative_probe_point(dinfo, &pp, &result, get_alternative_line_range() 384 clear_perf_probe_point(&pp); get_alternative_line_range() 449 struct perf_probe_point *pp, find_perf_probe_point_from_dwarf() 480 (unsigned long)addr, pp); find_perf_probe_point_from_dwarf() 486 pp->retprobe = tp->retprobe; find_perf_probe_point_from_dwarf() 912 struct perf_probe_point *pp __maybe_unused, find_perf_probe_point_from_dwarf() 1077 struct perf_probe_point *pp = &pev->point; parse_perf_probe_point() local 1122 pp->file = tmp; parse_perf_probe_point() 1124 pp->function = tmp; parse_perf_probe_point() 1131 pp->lazy_line = strdup(arg); parse_perf_probe_point() 1132 if (pp->lazy_line == NULL) parse_perf_probe_point() 1143 pp->line = strtoul(arg, &tmp, 0); parse_perf_probe_point() 1151 pp->offset = strtoul(arg, &tmp, 0); parse_perf_probe_point() 1159 if (pp->file) { parse_perf_probe_point() 1163 pp->file = strdup(arg); parse_perf_probe_point() 1164 if (pp->file == NULL) parse_perf_probe_point() 1169 pp->retprobe = 1; parse_perf_probe_point() 1184 if (pp->lazy_line && pp->line) { parse_perf_probe_point() 1190 if (pp->lazy_line && pp->offset) { parse_perf_probe_point() 1195 if (pp->line && pp->offset) { parse_perf_probe_point() 1200 if (!pp->line && !pp->lazy_line && pp->file && !pp->function) { parse_perf_probe_point() 1206 if (pp->offset && !pp->function) { parse_perf_probe_point() 1211 if (pp->retprobe && !pp->function) { parse_perf_probe_point() 1216 if ((pp->offset || pp->line || pp->lazy_line) && pp->retprobe) { parse_perf_probe_point() 1223 pp->function, pp->file, pp->line, pp->offset, pp->retprobe, parse_perf_probe_point() 1224 pp->lazy_line); parse_perf_probe_point() 1530 static char *synthesize_perf_probe_point(struct perf_probe_point *pp) synthesize_perf_probe_point() argument 1541 if (pp->offset) { synthesize_perf_probe_point() 1542 ret = e_snprintf(offs, 32, "+%lu", pp->offset); synthesize_perf_probe_point() 1546 if (pp->line) { synthesize_perf_probe_point() 1547 ret = e_snprintf(line, 32, ":%d", pp->line); synthesize_perf_probe_point() 1551 if (pp->file) { synthesize_perf_probe_point() 1552 tmp = pp->file; synthesize_perf_probe_point() 1555 tmp = strchr(pp->file + len - 30, '/'); synthesize_perf_probe_point() 1556 tmp = tmp ? tmp + 1 : pp->file + len - 30; synthesize_perf_probe_point() 1563 if (pp->function) synthesize_perf_probe_point() 1564 ret = e_snprintf(buf, MAX_CMDLEN, "%s%s%s%s%s", pp->function, synthesize_perf_probe_point() 1565 offs, pp->retprobe ? "%return" : "", line, synthesize_perf_probe_point() 1734 struct perf_probe_point *pp, find_perf_probe_point_from_map() 1758 pp->retprobe = tp->retprobe; find_perf_probe_point_from_map() 1759 pp->offset = addr - map->unmap_ip(map, sym->start); find_perf_probe_point_from_map() 1760 pp->function = strdup(sym->name); find_perf_probe_point_from_map() 1761 ret = pp->function ? 0 : -ENOMEM; find_perf_probe_point_from_map() 1773 struct perf_probe_point *pp, convert_to_perf_probe_point() 1779 ret = find_perf_probe_point_from_dwarf(tp, pp, is_kprobe); convert_to_perf_probe_point() 1782 ret = find_perf_probe_point_from_map(tp, pp, is_kprobe); convert_to_perf_probe_point() 1789 pp->function = strdup(tp->symbol); convert_to_perf_probe_point() 1790 pp->offset = tp->offset; convert_to_perf_probe_point() 1795 pp->function = strdup(buf); convert_to_perf_probe_point() 1796 pp->offset = 0; convert_to_perf_probe_point() 1798 if (pp->function == NULL) convert_to_perf_probe_point() 1801 pp->retprobe = tp->retprobe; convert_to_perf_probe_point() 2464 struct perf_probe_point *pp = &pev->point; find_probe_trace_events_from_map() local 2479 num_matched_functions = find_probe_functions(map, pp->function); find_probe_trace_events_from_map() 2481 pr_err("Failed to find symbol %s in %s\n", pp->function, find_probe_trace_events_from_map() 2492 if (!pev->uprobes && !pp->retprobe) { find_probe_trace_events_from_map() 2510 map__for_each_symbol_by_name(map, pp->function, sym) { find_probe_trace_events_from_map() 2519 if (pp->offset > sym->end - sym->start) { find_probe_trace_events_from_map() 2521 pp->offset, sym->name); find_probe_trace_events_from_map() 2526 tp->address = map->unmap_ip(map, sym->start) + pp->offset; find_probe_trace_events_from_map() 2532 tp->offset = pp->offset; find_probe_trace_events_from_map() 2534 tp->retprobe = pp->retprobe; find_probe_trace_events_from_map() 295 find_alternative_probe_point(struct debuginfo *dinfo, struct perf_probe_point *pp, struct perf_probe_point *result, const char *target, bool uprobes) find_alternative_probe_point() argument 448 find_perf_probe_point_from_dwarf(struct probe_trace_point *tp, struct perf_probe_point *pp, bool is_kprobe) find_perf_probe_point_from_dwarf() argument 1733 find_perf_probe_point_from_map(struct probe_trace_point *tp, struct perf_probe_point *pp, bool is_kprobe) find_perf_probe_point_from_map() argument 1772 convert_to_perf_probe_point(struct probe_trace_point *tp, struct perf_probe_point *pp, bool is_kprobe) convert_to_perf_probe_point() argument
|
H A D | probe-finder.c | 886 struct perf_probe_point *pp = &pf->pev->point; probe_point_inline_cb() local 890 if (pp->lazy_line) probe_point_inline_cb() 900 pf->addr += pp->offset; probe_point_inline_cb() 921 struct perf_probe_point *pp = &pf->pev->point; probe_point_search_cb() local 925 !die_compare_name(sp_die, pp->function)) probe_point_search_cb() 929 if (pp->file && strtailcmp(pp->file, dwarf_decl_file(sp_die))) probe_point_search_cb() 933 if (pp->line) { /* Function relative line */ probe_point_search_cb() 935 pf->lno += pp->line; probe_point_search_cb() 941 if (pp->lazy_line) probe_point_search_cb() 944 pf->addr += pp->offset; probe_point_search_cb() 1000 struct perf_probe_point *pp = &pf->pev->point; debuginfo__find_probes() local 1033 if (pp->function) { debuginfo__find_probes() 1035 .function = pp->function, debuginfo__find_probes() 1036 .file = pp->file, debuginfo__find_probes() 1062 if (pp->file) debuginfo__find_probes() 1063 pf->fname = cu_find_realpath(&pf->cu_die, pp->file); debuginfo__find_probes() 1067 if (!pp->file || pf->fname) { debuginfo__find_probes() 1068 if (pp->function) debuginfo__find_probes() 1070 else if (pp->lazy_line) debuginfo__find_probes() 1073 pf->lno = pp->line; debuginfo__find_probes()
|
H A D | callchain.c | 538 struct rb_node *p, **pp; split_add_child() local 556 pp = &p->rb_left; split_add_child() 558 pp = &p->rb_right; split_add_child() 560 rb_link_node(&new->rb_node_in, p, pp); split_add_child()
|
/linux-4.1.27/drivers/isdn/capi/ |
H A D | capilib.c | 64 struct capilib_msgidqueue **pp; mq_dequeue() local 65 for (pp = &np->msgidqueue; *pp; pp = &(*pp)->next) { mq_dequeue() 66 if ((*pp)->msgid == msgid) { mq_dequeue() 67 struct capilib_msgidqueue *mq = *pp; mq_dequeue() 68 *pp = mq->next; mq_dequeue()
|
H A D | capidrv.c | 381 capidrv_plci **pp; free_plci() local 383 for (pp = &card->plci_list; *pp; pp = &(*pp)->next) { free_plci() 384 if (*pp == plcip) { free_plci() 385 *pp = (*pp)->next; free_plci() 455 struct capidrv_ncci **pp; free_ncci() local 457 for (pp = &(nccip->plcip->ncci_list); *pp; pp = &(*pp)->next) { free_ncci() 458 if (*pp == nccip) { free_ncci() 459 *pp = (*pp)->next; free_ncci() 470 struct ncci_datahandle_queue *n, **pp; capidrv_add_ack() local 480 for (pp = &nccip->ackqueue; *pp; pp = &(*pp)->next); capidrv_add_ack() 481 *pp = n; capidrv_add_ack() 487 struct ncci_datahandle_queue **pp, *p; capidrv_del_ack() local 490 for (pp = &nccip->ackqueue; *pp; pp = &(*pp)->next) { capidrv_del_ack() 491 if ((*pp)->datahandle == datahandle) { capidrv_del_ack() 492 p = *pp; capidrv_del_ack() 494 *pp = (*pp)->next; capidrv_del_ack() 2349 capidrv_contr **pp, *card; capidrv_delcontr() local 2414 for (pp = &global.contr_list; *pp; pp = &(*pp)->next) { capidrv_delcontr() 2415 if (*pp == card) { capidrv_delcontr() 2416 *pp = (*pp)->next; capidrv_delcontr()
|
/linux-4.1.27/drivers/parport/ |
H A D | parport_mfc3.c | 292 struct pia *pp; parport_mfc3_init() local 303 pp = ZTWO_VADDR(piabase); parport_mfc3_init() 304 pp->crb = 0; parport_mfc3_init() 305 pp->pddrb = 255; /* all data pins output */ parport_mfc3_init() 306 pp->crb = PIA_DDR|32|8; parport_mfc3_init() 307 dummy = pp->pddrb; /* reading clears interrupt */ parport_mfc3_init() 308 pp->cra = 0; parport_mfc3_init() 309 pp->pddra = 0xe0; /* /RESET, /DIR ,/AUTO-FEED output */ parport_mfc3_init() 310 pp->cra = PIA_DDR; parport_mfc3_init() 311 pp->ppra = 0; /* reset printer */ parport_mfc3_init() 313 pp->ppra = 128; parport_mfc3_init() 314 p = parport_register_port((unsigned long)pp, IRQ_AMIGA_PORTS, parport_mfc3_init()
|
H A D | parport_ax88796.c | 276 struct parport *pp = NULL; parport_ax88796_probe() local 317 pp = parport_register_port((unsigned long)dd->base, irq, parport_ax88796_probe() 321 if (pp == NULL) { parport_ax88796_probe() 327 pp->private_data = dd; parport_ax88796_probe() 328 dd->parport = pp; parport_ax88796_probe() 341 IRQF_TRIGGER_FALLING, pdev->name, pp); parport_ax88796_probe() 349 platform_set_drvdata(pdev, pp); parport_ax88796_probe() 352 parport_announce_port(pp); parport_ax88796_probe() 357 parport_remove_port(pp); parport_ax88796_probe() 410 MODULE_ALIAS("platform:ax88796-pp"); 414 .name = "ax88796-pp",
|
H A D | procfs.c | 577 int parport_proc_register(struct parport *pp) parport_proc_register() argument 582 int parport_proc_unregister(struct parport *pp) parport_proc_unregister() argument
|
/linux-4.1.27/include/linux/ |
H A D | quicklist.h | 67 static inline void quicklist_free(int nr, void (*dtor)(void *), void *pp) quicklist_free() argument 69 __quicklist_free(nr, dtor, pp, virt_to_page(pp)); quicklist_free()
|
H A D | if_pppox.h | 83 extern int register_pppox_proto(int proto_num, const struct pppox_proto *pp);
|
H A D | of.h | 315 #define for_each_property_of_node(dn, pp) \ 316 for (pp = dn->properties; pp != NULL; pp = pp->next)
|
H A D | parport.h | 442 extern int parport_proc_register(struct parport *pp); 443 extern int parport_proc_unregister(struct parport *pp);
|
/linux-4.1.27/net/bridge/ |
H A D | br_mdb.c | 66 struct net_bridge_port_group __rcu **pp; br_mdb_fill_info() local 79 for (pp = &mp->ports; br_mdb_fill_info() 80 (p = rcu_dereference(*pp)) != NULL; br_mdb_fill_info() 81 pp = &p->next) { br_mdb_fill_info() 324 struct net_bridge_port_group __rcu **pp; br_mdb_add_group() local 337 for (pp = &mp->ports; br_mdb_add_group() 338 (p = mlock_dereference(*pp, br)) != NULL; br_mdb_add_group() 339 pp = &p->next) { br_mdb_add_group() 346 p = br_multicast_new_port_group(port, group, *pp, state); br_mdb_add_group() 349 rcu_assign_pointer(*pp, p); br_mdb_add_group() 413 struct net_bridge_port_group __rcu **pp; __br_mdb_del() local 443 for (pp = &mp->ports; __br_mdb_del() 444 (p = mlock_dereference(*pp, br)) != NULL; __br_mdb_del() 445 pp = &p->next) { __br_mdb_del() 452 rcu_assign_pointer(*pp, p->next); __br_mdb_del()
|
H A D | br_multicast.c | 257 struct net_bridge_port_group __rcu **pp; br_multicast_del_pg() local 265 for (pp = &mp->ports; br_multicast_del_pg() 266 (p = mlock_dereference(*pp, br)) != NULL; br_multicast_del_pg() 267 pp = &p->next) { br_multicast_del_pg() 271 rcu_assign_pointer(*pp, p->next); br_multicast_del_pg() 662 struct net_bridge_port_group __rcu **pp; br_multicast_add_group() local 682 for (pp = &mp->ports; br_multicast_add_group() 683 (p = mlock_dereference(*pp, br)) != NULL; br_multicast_add_group() 684 pp = &p->next) { br_multicast_add_group() 691 p = br_multicast_new_port_group(port, group, *pp, MDB_TEMPORARY); br_multicast_add_group() 694 rcu_assign_pointer(*pp, p); br_multicast_add_group() 1229 struct net_bridge_port_group __rcu **pp; br_ip4_multicast_query() local 1293 for (pp = &mp->ports; br_ip4_multicast_query() 1294 (p = mlock_dereference(*pp, br)) != NULL; br_ip4_multicast_query() 1295 pp = &p->next) { br_ip4_multicast_query() 1318 struct net_bridge_port_group __rcu **pp; br_ip6_multicast_query() local 1390 for (pp = &mp->ports; br_ip6_multicast_query() 1391 (p = mlock_dereference(*pp, br)) != NULL; br_ip6_multicast_query() 1392 pp = &p->next) { br_ip6_multicast_query() 1455 struct net_bridge_port_group __rcu **pp; br_multicast_leave_group() local 1457 for (pp = &mp->ports; br_multicast_leave_group() 1458 (p = mlock_dereference(*pp, br)) != NULL; br_multicast_leave_group() 1459 pp = &p->next) { br_multicast_leave_group() 1463 rcu_assign_pointer(*pp, p->next); br_multicast_leave_group()
|
/linux-4.1.27/drivers/of/ |
H A D | of_net.c | 43 struct property *pp = of_find_property(np, name, NULL); of_get_mac_addr() local 45 if (pp && pp->length == ETH_ALEN && is_valid_ether_addr(pp->value)) of_get_mac_addr() 46 return pp->value; of_get_mac_addr()
|
H A D | base.c | 111 struct property *pp = container_of(bin_attr, struct property, attr); of_node_property_read() local 112 return memory_read_from_buffer(buf, count, &offset, pp->value, pp->length); of_node_property_read() 135 int __of_add_property_sysfs(struct device_node *np, struct property *pp) __of_add_property_sysfs() argument 140 bool secure = strncmp(pp->name, "security-", 9) == 0; __of_add_property_sysfs() 148 sysfs_bin_attr_init(&pp->attr); __of_add_property_sysfs() 149 pp->attr.attr.name = safe_name(&np->kobj, pp->name); __of_add_property_sysfs() 150 pp->attr.attr.mode = secure ? S_IRUSR : S_IRUGO; __of_add_property_sysfs() 151 pp->attr.size = secure ? 0 : pp->length; __of_add_property_sysfs() 152 pp->attr.read = of_node_property_read; __of_add_property_sysfs() 154 rc = sysfs_create_bin_file(&np->kobj, &pp->attr); __of_add_property_sysfs() 155 WARN(rc, "error adding attribute %s to node %s\n", pp->name, np->full_name); __of_add_property_sysfs() 162 struct property *pp; __of_attach_node_sysfs() local 186 for_each_property_of_node(np, pp) __of_attach_node_sysfs() 187 __of_add_property_sysfs(np, pp); __of_attach_node_sysfs() 216 struct property *pp; __of_find_property() local 221 for (pp = np->properties; pp; pp = pp->next) { __of_find_property() 222 if (of_prop_cmp(pp->name, name) == 0) { __of_find_property() 224 *lenp = pp->length; __of_find_property() 229 return pp; __of_find_property() 236 struct property *pp; of_find_property() local 240 pp = __of_find_property(np, name, lenp); of_find_property() 243 return pp; of_find_property() 293 struct property *pp = __of_find_property(np, name, lenp); __of_get_property() local 295 return pp ? pp->value : NULL; __of_get_property() 305 struct property *pp = of_find_property(np, name, lenp); of_get_property() local 307 return pp ? pp->value : NULL; of_get_property() 777 struct property *pp; of_find_node_opts_by_path() local 800 for_each_property_of_node(of_aliases, pp) { for_each_property_of_node() 801 if (strlen(pp->name) == len && !strncmp(pp->name, path, len)) { for_each_property_of_node() 802 np = of_find_node_by_path(pp->value); for_each_property_of_node() 931 struct property *pp; of_find_node_with_property() local 936 for (pp = np->properties; pp; pp = pp->next) { for_each_of_allnodes_from() 937 if (of_prop_cmp(pp->name, prop_name) == 0) { for_each_of_allnodes_from() 1899 struct property *pp; of_alias_scan() local 1920 for_each_property_of_node(of_aliases, pp) { for_each_property_of_node() 1921 const char *start = pp->name; for_each_property_of_node() 1928 if (!strcmp(pp->name, "name") || for_each_property_of_node() 1929 !strcmp(pp->name, "phandle") || for_each_property_of_node() 1930 !strcmp(pp->name, "linux,phandle")) for_each_property_of_node() 1933 np = of_find_node_by_path(pp->value); for_each_property_of_node()
|
H A D | fdt.c | 181 struct property *pp, **prev_pp = NULL; unflatten_dt_node() local 270 pp = unflatten_dt_alloc(&mem, sizeof(struct property), unflatten_dt_node() 288 pp->name = (char *)pname; unflatten_dt_node() 289 pp->length = sz; unflatten_dt_node() 290 pp->value = (__be32 *)p; unflatten_dt_node() 291 *prev_pp = pp; unflatten_dt_node() 292 prev_pp = &pp->next; unflatten_dt_node() 312 pp = unflatten_dt_alloc(&mem, sizeof(struct property) + sz, unflatten_dt_node() 315 pp->name = "name"; unflatten_dt_node() 316 pp->length = sz; unflatten_dt_node() 317 pp->value = pp + 1; unflatten_dt_node() 318 *prev_pp = pp; unflatten_dt_node() 319 prev_pp = &pp->next; unflatten_dt_node() 320 memcpy(pp->value, ps, sz - 1); unflatten_dt_node() 321 ((char *)pp->value)[sz - 1] = 0; unflatten_dt_node() 323 (char *)pp->value); unflatten_dt_node()
|
H A D | dynamic.c | 46 struct property *pp; __of_detach_node_sysfs() local 57 for_each_property_of_node(np, pp) __of_detach_node_sysfs() 58 sysfs_remove_bin_file(&np->kobj, &pp->attr); __of_detach_node_sysfs() 428 struct property *pp, *new_pp; for_each_property_of_node() local 429 for_each_property_of_node(np, pp) { for_each_property_of_node() 430 new_pp = __of_prop_dup(pp, GFP_KERNEL); for_each_property_of_node()
|
/linux-4.1.27/fs/afs/ |
H A D | server.c | 35 struct rb_node **pp, *p; afs_install_server() local 43 pp = &afs_servers.rb_node; afs_install_server() 45 while (*pp) { afs_install_server() 46 p = *pp; afs_install_server() 50 pp = &(*pp)->rb_left; afs_install_server() 52 pp = &(*pp)->rb_right; afs_install_server() 57 rb_link_node(&server->master_rb, p, pp); afs_install_server()
|
/linux-4.1.27/net/netfilter/ |
H A D | xt_ipvs.c | 54 struct ip_vs_protocol *pp; ipvs_mt() local 79 pp = ip_vs_proto_get(iph.protocol); ipvs_mt() 80 if (unlikely(!pp)) { ipvs_mt() 88 cp = pp->conn_out_get(family, skb, &iph, 1 /* inverse */); ipvs_mt()
|
/linux-4.1.27/drivers/video/fbdev/ |
H A D | offb.c | 542 const __be32 *pp, *addrp, *up; offb_init_nodriver() local 554 pp = of_get_property(dp, "linux,bootx-depth", &len); offb_init_nodriver() 555 if (pp == NULL) offb_init_nodriver() 556 pp = of_get_property(dp, "depth", &len); offb_init_nodriver() 557 if (pp && len == sizeof(u32)) offb_init_nodriver() 558 depth = be32_to_cpup(pp); offb_init_nodriver() 560 pp = of_get_property(dp, "linux,bootx-width", &len); offb_init_nodriver() 561 if (pp == NULL) offb_init_nodriver() 562 pp = of_get_property(dp, "width", &len); offb_init_nodriver() 563 if (pp && len == sizeof(u32)) offb_init_nodriver() 564 width = be32_to_cpup(pp); offb_init_nodriver() 566 pp = of_get_property(dp, "linux,bootx-height", &len); offb_init_nodriver() 567 if (pp == NULL) offb_init_nodriver() 568 pp = of_get_property(dp, "height", &len); offb_init_nodriver() 569 if (pp && len == sizeof(u32)) offb_init_nodriver() 570 height = be32_to_cpup(pp); offb_init_nodriver() 572 pp = of_get_property(dp, "linux,bootx-linebytes", &len); offb_init_nodriver() 573 if (pp == NULL) offb_init_nodriver() 574 pp = of_get_property(dp, "linebytes", &len); offb_init_nodriver() 575 if (pp && len == sizeof(u32) && (*pp != 0xffffffffu)) offb_init_nodriver() 576 pitch = be32_to_cpup(pp); offb_init_nodriver()
|
H A D | pm2fb.c | 207 u16 pp; member in struct:__anon10601 235 return pp_table[i].pp; partprod() 256 unsigned char *pp) pm2_mnp() 265 *mm = *nn = *pp = 0; pm2_mnp() 276 *pp = p; pm2_mnp() 285 unsigned char *pp) pm2v_mnp() 293 *mm = *nn = *pp = 0; pm2v_mnp() 302 *pp = p; pm2v_mnp() 255 pm2_mnp(u32 clk, unsigned char *mm, unsigned char *nn, unsigned char *pp) pm2_mnp() argument 284 pm2v_mnp(u32 clk, unsigned char *mm, unsigned char *nn, unsigned char *pp) pm2v_mnp() argument
|
/linux-4.1.27/net/rxrpc/ |
H A D | ar-connection.c | 76 struct rb_node *p, *parent, **pp; rxrpc_get_bundle() local 117 pp = &trans->bundles.rb_node; rxrpc_get_bundle() 119 while (*pp) { rxrpc_get_bundle() 120 parent = *pp; rxrpc_get_bundle() 124 pp = &(*pp)->rb_left; rxrpc_get_bundle() 126 pp = &(*pp)->rb_right; rxrpc_get_bundle() 135 rb_link_node(&bundle->node, parent, pp); rxrpc_get_bundle() 627 struct rb_node *p, **pp; rxrpc_incoming_connection() local 683 pp = &trans->server_conns.rb_node; rxrpc_incoming_connection() 685 while (*pp) { rxrpc_incoming_connection() 686 p = *pp; rxrpc_incoming_connection() 690 pp = &(*pp)->rb_left; rxrpc_incoming_connection() 692 pp = &(*pp)->rb_right; rxrpc_incoming_connection() 694 pp = &(*pp)->rb_left; rxrpc_incoming_connection() 696 pp = &(*pp)->rb_right; rxrpc_incoming_connection() 704 rb_link_node(&conn->node, p, pp); rxrpc_incoming_connection()
|
H A D | ar-accept.c | 323 struct rb_node *parent, **pp; rxrpc_accept_call() local 338 pp = &rx->calls.rb_node; rxrpc_accept_call() 340 while (*pp) { rxrpc_accept_call() 341 parent = *pp; rxrpc_accept_call() 345 pp = &(*pp)->rb_left; rxrpc_accept_call() 347 pp = &(*pp)->rb_right; rxrpc_accept_call() 378 rb_link_node(&call->sock_node, parent, pp); rxrpc_accept_call()
|
H A D | ar-call.c | 323 struct rb_node *p, *parent, **pp; rxrpc_get_client_call() local 363 pp = &rx->calls.rb_node; rxrpc_get_client_call() 365 while (*pp) { rxrpc_get_client_call() 366 parent = *pp; rxrpc_get_client_call() 370 pp = &(*pp)->rb_left; rxrpc_get_client_call() 372 pp = &(*pp)->rb_right; rxrpc_get_client_call() 382 rb_link_node(&call->sock_node, parent, pp); rxrpc_get_client_call()
|
H A D | ar-key.c | 687 struct rxrpc_key_token *token, **pp; rxrpc_preparse() local 770 pp = (struct rxrpc_key_token **)&prep->payload[0]; rxrpc_preparse() 771 while (*pp) rxrpc_preparse() 772 pp = &(*pp)->next; rxrpc_preparse() 773 *pp = token; rxrpc_preparse()
|
/linux-4.1.27/arch/powerpc/platforms/powermac/ |
H A D | bootx_init.c | 100 struct bootx_dt_prop *pp = bootx_early_getprop() local 103 if (strcmp((char *)((unsigned long)pp->name + base), bootx_early_getprop() 105 return (void *)((unsigned long)pp->value + base); bootx_early_getprop() 107 ppp = &pp->next; bootx_early_getprop() 254 struct bootx_dt_prop *pp = bootx_scan_dt_build_strings() local 257 namep = pp->name ? (char *)(base + pp->name) : NULL; bootx_scan_dt_build_strings() 265 ppp = &pp->next; bootx_scan_dt_build_strings() 313 struct bootx_dt_prop *pp = bootx_scan_dt_build_struct() local 316 namep = pp->name ? (char *)(base + pp->name) : NULL; bootx_scan_dt_build_struct() 326 pp->value ? (void *)(base + pp->value): NULL, bootx_scan_dt_build_struct() 327 pp->length, mem_end); bootx_scan_dt_build_struct() 329 ppp = &pp->next; bootx_scan_dt_build_struct()
|
H A D | setup.c | 108 const char *pp; pmac_show_cpuinfo() local 126 pp = of_get_property(np, "model", NULL); pmac_show_cpuinfo() 127 if (pp != NULL) pmac_show_cpuinfo() 128 seq_printf(m, "%s\n", pp); pmac_show_cpuinfo() 131 pp = of_get_property(np, "compatible", &plen); pmac_show_cpuinfo() 132 if (pp != NULL) { pmac_show_cpuinfo() 135 int l = strlen(pp) + 1; pmac_show_cpuinfo() 136 seq_printf(m, " %s", pp); pmac_show_cpuinfo() 138 pp += l; pmac_show_cpuinfo() 170 pp = of_get_property(np, "ram-type", NULL); pmac_show_cpuinfo() 171 if (pp) pmac_show_cpuinfo() 172 seq_printf(m, " %s", pp); pmac_show_cpuinfo()
|
H A D | pfunc_core.c | 682 struct property *pp; pmf_add_functions() local 687 for (pp = dev->node->properties; pp != 0; pp = pp->next) { pmf_add_functions() 689 if (strncmp(pp->name, PP_PREFIX, plen) != 0) pmf_add_functions() 691 name = pp->name + plen; pmf_add_functions() 692 if (strlen(name) && pp->length >= 12) pmf_add_functions() 694 pp->value, pp->length); pmf_add_functions()
|
/linux-4.1.27/drivers/scsi/sym53c8xx_2/ |
H A D | sym_malloc.c | 295 m_pool_p *pp = &mp0.next; ___del_dma_pool() local 297 while (*pp && *pp != p) ___del_dma_pool() 298 pp = &(*pp)->next; ___del_dma_pool() 299 if (*pp) { ___del_dma_pool() 300 *pp = (*pp)->next; ___del_dma_pool()
|
/linux-4.1.27/drivers/nfc/nxp-nci/ |
H A D | i2c.c | 267 struct device_node *pp; nxp_nci_i2c_parse_devtree() local 270 pp = client->dev.of_node; nxp_nci_i2c_parse_devtree() 271 if (!pp) nxp_nci_i2c_parse_devtree() 274 r = of_get_named_gpio(pp, "enable-gpios", 0); nxp_nci_i2c_parse_devtree() 276 r = of_get_named_gpio(pp, "enable-gpios", 0); nxp_nci_i2c_parse_devtree() 283 r = of_get_named_gpio(pp, "firmware-gpios", 0); nxp_nci_i2c_parse_devtree() 285 r = of_get_named_gpio(pp, "firmware-gpios", 0); nxp_nci_i2c_parse_devtree() 292 r = irq_of_parse_and_map(pp, 0); nxp_nci_i2c_parse_devtree()
|
/linux-4.1.27/drivers/input/keyboard/ |
H A D | sun4i-lradc-keys.c | 161 struct device_node *np, *pp; sun4i_lradc_load_dt_keymap() local 182 for_each_child_of_node(np, pp) { for_each_child_of_node() 186 error = of_property_read_u32(pp, "channel", &channel); for_each_child_of_node() 188 dev_err(dev, "%s: Inval channel prop\n", pp->name); for_each_child_of_node() 192 error = of_property_read_u32(pp, "voltage", &map->voltage); for_each_child_of_node() 194 dev_err(dev, "%s: Inval voltage prop\n", pp->name); for_each_child_of_node() 198 error = of_property_read_u32(pp, "linux,code", &map->keycode); for_each_child_of_node() 200 dev_err(dev, "%s: Inval linux,code prop\n", pp->name); for_each_child_of_node()
|
H A D | gpio_keys.c | 594 struct device_node *node, *pp; gpio_keys_get_devtree_pdata() local 621 for_each_child_of_node(node, pp) { for_each_child_of_node() 626 button->gpio = of_get_gpio_flags(pp, 0, &flags); for_each_child_of_node() 640 button->irq = irq_of_parse_and_map(pp, 0); for_each_child_of_node() 647 if (of_property_read_u32(pp, "linux,code", &button->code)) { for_each_child_of_node() 653 button->desc = of_get_property(pp, "label", NULL); for_each_child_of_node() 655 if (of_property_read_u32(pp, "linux,input-type", &button->type)) for_each_child_of_node() 658 button->wakeup = !!of_get_property(pp, "gpio-key,wakeup", NULL); for_each_child_of_node() 660 button->can_disable = !!of_get_property(pp, "linux,can-disable", NULL); for_each_child_of_node() 662 if (of_property_read_u32(pp, "debounce-interval", for_each_child_of_node()
|
/linux-4.1.27/net/phonet/ |
H A D | af_phonet.c | 42 struct phonet_protocol *pp; phonet_proto_get() local 48 pp = rcu_dereference(proto_tab[protocol]); phonet_proto_get() 49 if (pp && !try_module_get(pp->prot->owner)) phonet_proto_get() 50 pp = NULL; phonet_proto_get() 53 return pp; phonet_proto_get() 56 static inline void phonet_proto_put(struct phonet_protocol *pp) phonet_proto_put() argument 58 module_put(pp->prot->owner); phonet_proto_put() 473 struct phonet_protocol *pp) phonet_proto_register() 480 err = proto_register(pp->prot, 1); phonet_proto_register() 488 rcu_assign_pointer(proto_tab[protocol], pp); phonet_proto_register() 495 void phonet_proto_unregister(unsigned int protocol, struct phonet_protocol *pp) phonet_proto_unregister() argument 498 BUG_ON(proto_tab[protocol] != pp); phonet_proto_unregister() 502 proto_unregister(pp->prot); phonet_proto_unregister() 472 phonet_proto_register(unsigned int protocol, struct phonet_protocol *pp) phonet_proto_register() argument
|
/linux-4.1.27/drivers/input/serio/ |
H A D | parkbd.c | 146 struct parport *pp; parkbd_getport() local 148 pp = parport_find_number(parkbd_pp_no); parkbd_getport() 150 if (pp == NULL) { parkbd_getport() 155 parkbd_dev = parport_register_device(pp, "parkbd", NULL, NULL, parkbd_interrupt, PARPORT_DEV_EXCL, NULL); parkbd_getport() 156 parport_put_port(pp); parkbd_getport()
|
/linux-4.1.27/drivers/usb/serial/ |
H A D | mos7720.c | 102 struct parport *pp; /* back to containing struct */ member in struct:mos7715_parport 443 static int parport_prologue(struct parport *pp) parport_prologue() argument 448 mos_parport = pp->private_data; parport_prologue() 474 static inline void parport_epilogue(struct parport *pp) parport_epilogue() argument 476 struct mos7715_parport *mos_parport = pp->private_data; parport_epilogue() 482 static void parport_mos7715_write_data(struct parport *pp, unsigned char d) parport_mos7715_write_data() argument 484 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_write_data() 486 if (parport_prologue(pp) < 0) parport_mos7715_write_data() 490 parport_epilogue(pp); parport_mos7715_write_data() 493 static unsigned char parport_mos7715_read_data(struct parport *pp) parport_mos7715_read_data() argument 495 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_read_data() 498 if (parport_prologue(pp) < 0) parport_mos7715_read_data() 501 parport_epilogue(pp); parport_mos7715_read_data() 505 static void parport_mos7715_write_control(struct parport *pp, unsigned char d) parport_mos7715_write_control() argument 507 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_write_control() 510 if (parport_prologue(pp) < 0) parport_mos7715_write_control() 515 parport_epilogue(pp); parport_mos7715_write_control() 518 static unsigned char parport_mos7715_read_control(struct parport *pp) parport_mos7715_read_control() argument 520 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_read_control() 524 mos_parport = pp->private_data; parport_mos7715_read_control() 534 static unsigned char parport_mos7715_frob_control(struct parport *pp, parport_mos7715_frob_control() argument 538 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_frob_control() 543 if (parport_prologue(pp) < 0) parport_mos7715_frob_control() 548 parport_epilogue(pp); parport_mos7715_frob_control() 552 static unsigned char parport_mos7715_read_status(struct parport *pp) parport_mos7715_read_status() argument 555 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_read_status() 558 mos_parport = pp->private_data; parport_mos7715_read_status() 568 static void parport_mos7715_enable_irq(struct parport *pp) parport_mos7715_enable_irq() argument 572 static void parport_mos7715_disable_irq(struct parport *pp) parport_mos7715_disable_irq() argument 576 static void parport_mos7715_data_forward(struct parport *pp) parport_mos7715_data_forward() argument 578 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_data_forward() 580 if (parport_prologue(pp) < 0) parport_mos7715_data_forward() 585 parport_epilogue(pp); parport_mos7715_data_forward() 588 static void parport_mos7715_data_reverse(struct parport *pp) parport_mos7715_data_reverse() argument 590 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_data_reverse() 592 if (parport_prologue(pp) < 0) parport_mos7715_data_reverse() 597 parport_epilogue(pp); parport_mos7715_data_reverse() 608 static void parport_mos7715_save_state(struct parport *pp, parport_mos7715_save_state() argument 614 mos_parport = pp->private_data; parport_mos7715_save_state() 625 static void parport_mos7715_restore_state(struct parport *pp, parport_mos7715_restore_state() argument 631 mos_parport = pp->private_data; parport_mos7715_restore_state() 641 static size_t parport_mos7715_write_compat(struct parport *pp, parport_mos7715_write_compat() argument 646 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_write_compat() 649 if (parport_prologue(pp) < 0) parport_mos7715_write_compat() 656 parport_epilogue(pp); parport_mos7715_write_compat() 727 mos_parport->pp = parport_register_port(0, PARPORT_IRQ_NONE, mos7715_parport_init() 730 if (mos_parport->pp == NULL) { mos7715_parport_init() 736 mos_parport->pp->private_data = mos_parport; mos7715_parport_init() 737 mos_parport->pp->modes = PARPORT_MODE_COMPAT | PARPORT_MODE_PCSPP; mos7715_parport_init() 738 mos_parport->pp->dev = &serial->interface->dev; mos7715_parport_init() 739 parport_announce_port(mos_parport->pp); mos7715_parport_init() 1965 mos_parport->pp->private_data = NULL; mos7720_release() 1973 parport_remove_port(mos_parport->pp); mos7720_release()
|
/linux-4.1.27/tools/firewire/ |
H A D | nosy-dump.c | 772 struct phy_packet *pp = (struct phy_packet *) data; print_packet() local 778 switch (pp->common.identifier) { print_packet() 780 if (!pp->phy_config.set_root && !pp->phy_config.set_gap_count) { print_packet() 781 printf("ext phy config: phy_id=%02x", pp->phy_config.root_id); print_packet() 784 if (pp->phy_config.set_root) print_packet() 785 printf(" set_root_id=%02x", pp->phy_config.root_id); print_packet() 786 if (pp->phy_config.set_gap_count) print_packet() 787 printf(" set_gap_count=%d", pp->phy_config.gap_count); print_packet() 792 printf("link-on packet, phy_id=%02x", pp->link_on.phy_id); print_packet() 796 if (pp->self_id.extended) { print_packet() 798 pp->ext_self_id.phy_id, pp->ext_self_id.sequence); print_packet() 804 pp->self_id.phy_id, print_packet() 805 (pp->self_id.link_active ? "active" : "not active"), print_packet() 806 pp->self_id.gap_count, print_packet() 807 speed_names[pp->self_id.phy_speed], print_packet() 808 (pp->self_id.contender ? ", irm contender" : ""), print_packet() 809 (pp->self_id.initiated_reset ? ", initiator" : "")); print_packet()
|
/linux-4.1.27/drivers/isdn/hardware/avm/ |
H A D | b1dma.c | 161 static inline void _put_byte(void **pp, u8 val) _put_byte() argument 163 u8 *s = *pp; _put_byte() 165 *pp = s; _put_byte() 168 static inline void _put_word(void **pp, u32 val) _put_word() argument 170 u8 *s = *pp; _put_word() 175 *pp = s; _put_word() 178 static inline void _put_slice(void **pp, unsigned char *dp, unsigned int len) _put_slice() argument 181 _put_word(pp, i); _put_slice() 183 _put_byte(pp, *dp++); _put_slice() 186 static inline u8 _get_byte(void **pp) _get_byte() argument 188 u8 *s = *pp; _get_byte() 191 *pp = s; _get_byte() 195 static inline u32 _get_word(void **pp) _get_word() argument 197 u8 *s = *pp; _get_word() 203 *pp = s; _get_word() 207 static inline u32 _get_slice(void **pp, unsigned char *dp) _get_slice() argument 211 len = i = _get_word(pp); _get_slice() 212 while (i-- > 0) *dp++ = _get_byte(pp); _get_slice()
|
H A D | c4.c | 239 static inline void _put_byte(void **pp, u8 val) _put_byte() argument 241 u8 *s = *pp; _put_byte() 243 *pp = s; _put_byte() 246 static inline void _put_word(void **pp, u32 val) _put_word() argument 248 u8 *s = *pp; _put_word() 253 *pp = s; _put_word() 256 static inline void _put_slice(void **pp, unsigned char *dp, unsigned int len) _put_slice() argument 259 _put_word(pp, i); _put_slice() 261 _put_byte(pp, *dp++); _put_slice() 264 static inline u8 _get_byte(void **pp) _get_byte() argument 266 u8 *s = *pp; _get_byte() 269 *pp = s; _get_byte() 273 static inline u32 _get_word(void **pp) _get_word() argument 275 u8 *s = *pp; _get_word() 281 *pp = s; _get_word() 285 static inline u32 _get_slice(void **pp, unsigned char *dp) _get_slice() argument 289 len = i = _get_word(pp); _get_slice() 290 while (i-- > 0) *dp++ = _get_byte(pp); _get_slice()
|
/linux-4.1.27/fs/hpfs/ |
H A D | map.c | 242 unsigned p, pp = 0; hpfs_map_dnode() local 260 hpfs_error(s, "bad dirent size in dnode %08x, dirent %03x, last %03x", secno, p, pp); hpfs_map_dnode() 265 hpfs_error(s, "namelen does not match dirent size in dnode %08x, dirent %03x, last %03x", secno, p, pp); hpfs_map_dnode() 271 hpfs_error(s, "bad down pointer in dnode %08x, dirent %03x, last %03x", secno, p, pp); hpfs_map_dnode() 274 pp = p; hpfs_map_dnode() 281 if (d[pp + 30] != 1 || d[pp + 31] != 255) { hpfs_map_dnode()
|
/linux-4.1.27/arch/powerpc/include/asm/ |
H A D | kvm_book3s_64.h | 267 unsigned long pp = ptel & (HPTE_R_PP0 | HPTE_R_PP); hpte_is_writable() local 269 return pp != PP_RXRX && pp != PP_RXXX; hpte_is_writable() 345 static inline bool hpte_read_permission(unsigned long pp, unsigned long key) hpte_read_permission() argument 348 return PP_RWRX <= pp && pp <= PP_RXRX; hpte_read_permission() 352 static inline bool hpte_write_permission(unsigned long pp, unsigned long key) hpte_write_permission() argument 355 return pp == PP_RWRW; hpte_write_permission() 356 return pp <= PP_RWRW; hpte_write_permission()
|
H A D | mmu-hash32.h | 77 unsigned long pp:2; /* Page protection */ member in struct:hash_pte
|
/linux-4.1.27/drivers/scsi/libfc/ |
H A D | fc_rport.c | 1000 } *pp; fc_rport_prli_resp() local 1030 pp = fc_frame_payload_get(fp, sizeof(*pp)); fc_rport_prli_resp() 1031 if (!pp) fc_rport_prli_resp() 1034 resp_code = (pp->spp.spp_flags & FC_SPP_RESP_MASK); fc_rport_prli_resp() 1036 pp->spp.spp_flags); fc_rport_prli_resp() 1037 rdata->spp_type = pp->spp.spp_type; fc_rport_prli_resp() 1045 if (pp->prli.prli_spp_len < sizeof(pp->spp)) fc_rport_prli_resp() 1048 fcp_parm = ntohl(pp->spp.spp_params); fc_rport_prli_resp() 1057 prov->prli(rdata, pp->prli.prli_spp_len, fc_rport_prli_resp() 1058 &pp->spp, &temp_spp); fc_rport_prli_resp() 1095 } *pp; fc_rport_enter_prli() local 1113 fp = fc_frame_alloc(lport, sizeof(*pp)); fc_rport_enter_prli() 1123 pp = fc_frame_payload_get(fp, sizeof(*pp)); fc_rport_enter_prli() 1124 prov->prli(rdata, sizeof(pp->spp), NULL, &pp->spp); fc_rport_enter_prli() 1719 } *pp; fc_rport_recv_prli_req() local 1733 pp = fc_frame_payload_get(rx_fp, sizeof(*pp)); fc_rport_recv_prli_req() 1734 if (!pp) fc_rport_recv_prli_req() 1736 plen = ntohs(pp->prli.prli_len); fc_rport_recv_prli_req() 1741 plen = pp->prli.prli_spp_len; fc_rport_recv_prli_req() 1743 plen > len || len < sizeof(*pp) || plen < 12) fc_rport_recv_prli_req() 1745 rspp = &pp->spp; fc_rport_recv_prli_req() 1753 pp = fc_frame_payload_get(fp, len); fc_rport_recv_prli_req() 1754 WARN_ON(!pp); fc_rport_recv_prli_req() 1755 memset(pp, 0, len); fc_rport_recv_prli_req() 1756 pp->prli.prli_cmd = ELS_LS_ACC; fc_rport_recv_prli_req() 1757 pp->prli.prli_spp_len = plen; fc_rport_recv_prli_req() 1758 pp->prli.prli_len = htons(len); fc_rport_recv_prli_req() 1766 spp = &pp->spp; fc_rport_recv_prli_req() 1838 } *pp; fc_rport_recv_prlo_req() local 1849 pp = fc_frame_payload_get(rx_fp, sizeof(*pp)); fc_rport_recv_prlo_req() 1850 if (!pp) fc_rport_recv_prlo_req() 1852 plen = ntohs(pp->prlo.prlo_len); fc_rport_recv_prlo_req() 1858 rspp = &pp->spp; fc_rport_recv_prlo_req() 1867 pp = fc_frame_payload_get(fp, len); fc_rport_recv_prlo_req() 1868 WARN_ON(!pp); fc_rport_recv_prlo_req() 1869 memset(pp, 0, len); fc_rport_recv_prlo_req() 1870 pp->prlo.prlo_cmd = ELS_LS_ACC; fc_rport_recv_prlo_req() 1871 pp->prlo.prlo_obs = 0x10; fc_rport_recv_prlo_req() 1872 pp->prlo.prlo_len = htons(len); fc_rport_recv_prlo_req() 1873 spp = &pp->spp; fc_rport_recv_prlo_req()
|
H A D | fc_disc.c | 89 struct fc_els_rscn_page *pp; fc_disc_recv_rscn_req() local 107 if (rp->rscn_page_len != sizeof(*pp)) fc_disc_recv_rscn_req() 119 if (len % sizeof(*pp)) fc_disc_recv_rscn_req() 122 for (pp = (void *)(rp + 1); len > 0; len -= sizeof(*pp), pp++) { fc_disc_recv_rscn_req() 123 ev_qual = pp->rscn_page_flags >> ELS_RSCN_EV_QUAL_BIT; fc_disc_recv_rscn_req() 125 fmt = pp->rscn_page_flags >> ELS_RSCN_ADDR_FMT_BIT; fc_disc_recv_rscn_req() 134 "(%6.6x)\n", ntoh24(pp->rscn_fid)); fc_disc_recv_rscn_req() 141 dp->port_id = ntoh24(pp->rscn_fid); fc_disc_recv_rscn_req()
|
H A D | fc_lport.c | 432 void *pp; fc_lport_recv_echo_req() local 439 pp = fc_frame_payload_get(in_fp, len); fc_lport_recv_echo_req() 447 memcpy(dp, pp, len); fc_lport_recv_echo_req() 1975 char *pp; fc_lport_els_request() local 1983 pp = fc_frame_payload_get(fp, len); fc_lport_els_request() 1987 pp, len); fc_lport_els_request()
|
/linux-4.1.27/arch/xtensa/include/asm/ |
H A D | mxregs.h | 21 * 01pp 0...0d..d 16 bits (d) 'ored' as single IPI to processor p
|
/linux-4.1.27/drivers/input/joystick/ |
H A D | turbografx.c | 163 struct parport *pp; tgfx_probe() local 168 pp = parport_find_number(parport); tgfx_probe() 169 if (!pp) { tgfx_probe() 175 pd = parport_register_device(pp, "turbografx", NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL); tgfx_probe() 248 parport_put_port(pp); tgfx_probe() 262 parport_put_port(pp); tgfx_probe()
|
H A D | db9.c | 560 struct parport *pp; db9_probe() local 574 pp = parport_find_number(parport); db9_probe() 575 if (!pp) { db9_probe() 581 if (db9_mode->bidirectional && !(pp->modes & PARPORT_MODE_TRISTATE)) { db9_probe() 587 pd = parport_register_device(pp, "db9", NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL); db9_probe() 647 parport_put_port(pp); db9_probe() 659 parport_put_port(pp); db9_probe()
|
H A D | gamecon.c | 932 struct parport *pp; gc_probe() local 938 pp = parport_find_number(parport); gc_probe() 939 if (!pp) { gc_probe() 945 pd = parport_register_device(pp, "gamecon", NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL); gc_probe() 980 parport_put_port(pp); gc_probe() 992 parport_put_port(pp); gc_probe()
|
/linux-4.1.27/include/net/ |
H A D | ip_vs.h | 257 #define IP_VS_DBG_PKT(level, af, pp, skb, ofs, msg) \ 260 pp->debug_packet(af, pp, skb, ofs, msg); \ 262 #define IP_VS_DBG_RL_PKT(level, af, pp, skb, ofs, msg) \ 266 pp->debug_packet(af, pp, skb, ofs, msg); \ 273 #define IP_VS_DBG_PKT(level, af, pp, skb, ofs, msg) do {} while (0) 274 #define IP_VS_DBG_RL_PKT(level, af, pp, skb, ofs, msg) do {} while (0) 436 void (*init)(struct ip_vs_protocol *pp); 438 void (*exit)(struct ip_vs_protocol *pp); 461 int (*snat_handler)(struct sk_buff *skb, struct ip_vs_protocol *pp, 464 int (*dnat_handler)(struct sk_buff *skb, struct ip_vs_protocol *pp, 468 struct ip_vs_protocol *pp); 482 void (*debug_packet)(int af, struct ip_vs_protocol *pp, 493 struct ip_vs_protocol *pp; member in struct:ip_vs_proto_data 562 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1305 int ip_vs_bind_app(struct ip_vs_conn *cp, struct ip_vs_protocol *pp); 1336 void ip_vs_tcpudp_debug_packet(int af, struct ip_vs_protocol *pp, 1423 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1425 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1427 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1429 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1431 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1433 struct ip_vs_protocol *pp, int offset, 1439 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1441 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1443 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1445 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1447 struct ip_vs_protocol *pp, int offset, 1493 void ip_vs_nat_icmp(struct sk_buff *skb, struct ip_vs_protocol *pp, 1497 void ip_vs_nat_icmp_v6(struct sk_buff *skb, struct ip_vs_protocol *pp,
|
/linux-4.1.27/drivers/gpu/drm/gma500/ |
H A D | cdv_intel_dp.c | 383 u32 pp; cdv_intel_edp_panel_vdd_on() local 391 pp = REG_READ(PP_CONTROL); cdv_intel_edp_panel_vdd_on() 393 pp |= EDP_FORCE_VDD; cdv_intel_edp_panel_vdd_on() 394 REG_WRITE(PP_CONTROL, pp); cdv_intel_edp_panel_vdd_on() 402 u32 pp; cdv_intel_edp_panel_vdd_off() local 405 pp = REG_READ(PP_CONTROL); cdv_intel_edp_panel_vdd_off() 407 pp &= ~EDP_FORCE_VDD; cdv_intel_edp_panel_vdd_off() 408 REG_WRITE(PP_CONTROL, pp); cdv_intel_edp_panel_vdd_off() 418 u32 pp, idle_on_mask = PP_ON | PP_SEQUENCE_NONE; cdv_intel_edp_panel_on() local 424 pp = REG_READ(PP_CONTROL); cdv_intel_edp_panel_on() 425 pp &= ~PANEL_UNLOCK_MASK; cdv_intel_edp_panel_on() 427 pp |= (PANEL_UNLOCK_REGS | POWER_TARGET_ON); cdv_intel_edp_panel_on() 428 REG_WRITE(PP_CONTROL, pp); cdv_intel_edp_panel_on() 444 u32 pp, idle_off_mask = PP_ON ; cdv_intel_edp_panel_off() local 449 pp = REG_READ(PP_CONTROL); cdv_intel_edp_panel_off() 451 if ((pp & POWER_TARGET_ON) == 0) cdv_intel_edp_panel_off() 455 pp &= ~PANEL_UNLOCK_MASK; cdv_intel_edp_panel_off() 458 pp &= ~POWER_TARGET_ON; cdv_intel_edp_panel_off() 459 pp &= ~EDP_FORCE_VDD; cdv_intel_edp_panel_off() 460 pp &= ~EDP_BLC_ENABLE; cdv_intel_edp_panel_off() 461 REG_WRITE(PP_CONTROL, pp); cdv_intel_edp_panel_off() 476 u32 pp; cdv_intel_edp_backlight_on() local 486 pp = REG_READ(PP_CONTROL); cdv_intel_edp_backlight_on() 488 pp |= EDP_BLC_ENABLE; cdv_intel_edp_backlight_on() 489 REG_WRITE(PP_CONTROL, pp); cdv_intel_edp_backlight_on() 497 u32 pp; cdv_intel_edp_backlight_off() local 502 pp = REG_READ(PP_CONTROL); cdv_intel_edp_backlight_off() 504 pp &= ~EDP_BLC_ENABLE; cdv_intel_edp_backlight_off() 505 REG_WRITE(PP_CONTROL, pp); cdv_intel_edp_backlight_off()
|
/linux-4.1.27/arch/powerpc/kvm/ |
H A D | book3s_32_mmu.c | 180 pte->may_read = bat->pp; kvmppc_mmu_book3s_32_xlate_bat() 181 pte->may_write = bat->pp > 1; kvmppc_mmu_book3s_32_xlate_bat() 235 u8 pp; kvmppc_mmu_book3s_32_xlate_pte() local 238 pp = pte1 & 3; kvmppc_mmu_book3s_32_xlate_pte() 242 pp |= 4; kvmppc_mmu_book3s_32_xlate_pte() 247 switch (pp) { kvmppc_mmu_book3s_32_xlate_pte() 261 pte0, pte1, pp); kvmppc_mmu_book3s_32_xlate_pte()
|
H A D | book3s_64_mmu.c | 220 u8 pp, key = 0; kvmppc_mmu_book3s_64_xlate() local 305 pp = (r & HPTE_R_PP) | key; kvmppc_mmu_book3s_64_xlate() 307 pp |= 8; kvmppc_mmu_book3s_64_xlate() 322 switch (pp) { kvmppc_mmu_book3s_64_xlate()
|
H A D | book3s_hv_rm_mmu.c | 798 unsigned long pp, key; kvmppc_hpte_hv_fault() local 824 pp = gr & (HPTE_R_PP0 | HPTE_R_PP); kvmppc_hpte_hv_fault() 830 if (!hpte_read_permission(pp, slb_v & key)) kvmppc_hpte_hv_fault() 834 if (!hpte_write_permission(pp, slb_v & key)) kvmppc_hpte_hv_fault() 837 if (!hpte_read_permission(pp, slb_v & key)) kvmppc_hpte_hv_fault()
|
/linux-4.1.27/arch/powerpc/perf/ |
H A D | power5+-pmu.c | 247 int pmc, altpmc, pp, j; find_alternative_bdecode() local 253 pp = event & PM_PMCSEL_MSK; find_alternative_bdecode() 255 if (bytedecode_alternatives[pmc - 1][j] == pp) { find_alternative_bdecode() 263 if (pmc == 1 && (pp == 0x0d || pp == 0x0e)) find_alternative_bdecode() 265 if (pmc == 3 && (pp == 0x2e || pp == 0x2f)) find_alternative_bdecode() 269 if (pp == 0x10 || pp == 0x28) find_alternative_bdecode()
|
H A D | power5-pmu.c | 255 int pmc, altpmc, pp, j; find_alternative_bdecode() local 261 pp = event & PM_PMCSEL_MSK; find_alternative_bdecode() 263 if (bytedecode_alternatives[pmc - 1][j] == pp) { find_alternative_bdecode()
|
/linux-4.1.27/drivers/gpu/drm/exynos/ |
H A D | exynos_drm_gsc.c | 1377 struct drm_exynos_ipp_prop_list *pp = &ippdrv->prop_list; gsc_ippdrv_check_property() local 1422 if ((i == EXYNOS_DRM_OPS_SRC) && (pp->crop)) { for_each_ipp_ops() 1424 if ((pos->h < pp->crop_min.hsize) || for_each_ipp_ops() 1425 (sz->vsize > pp->crop_max.hsize) || for_each_ipp_ops() 1426 (pos->w < pp->crop_min.vsize) || for_each_ipp_ops() 1427 (sz->hsize > pp->crop_max.vsize)) { for_each_ipp_ops() 1432 if ((pos->w < pp->crop_min.hsize) || for_each_ipp_ops() 1433 (sz->hsize > pp->crop_max.hsize) || for_each_ipp_ops() 1434 (pos->h < pp->crop_min.vsize) || for_each_ipp_ops() 1435 (sz->vsize > pp->crop_max.vsize)) { for_each_ipp_ops() 1443 if ((i == EXYNOS_DRM_OPS_DST) && (pp->scale)) { for_each_ipp_ops() 1445 if ((pos->h < pp->scale_min.hsize) || for_each_ipp_ops() 1446 (sz->vsize > pp->scale_max.hsize) || for_each_ipp_ops() 1447 (pos->w < pp->scale_min.vsize) || for_each_ipp_ops() 1448 (sz->hsize > pp->scale_max.vsize)) { for_each_ipp_ops() 1453 if ((pos->w < pp->scale_min.hsize) || for_each_ipp_ops() 1454 (sz->hsize > pp->scale_max.hsize) || for_each_ipp_ops() 1455 (pos->h < pp->scale_min.vsize) || for_each_ipp_ops() 1456 (sz->vsize > pp->scale_max.vsize)) { for_each_ipp_ops()
|
H A D | exynos_drm_fimc.c | 1308 struct drm_exynos_ipp_prop_list *pp = &ippdrv->prop_list; fimc_ippdrv_check_property() local 1353 if ((i == EXYNOS_DRM_OPS_SRC) && (pp->crop)) { for_each_ipp_ops() 1355 if ((pos->h < pp->crop_min.hsize) || for_each_ipp_ops() 1356 (sz->vsize > pp->crop_max.hsize) || for_each_ipp_ops() 1357 (pos->w < pp->crop_min.vsize) || for_each_ipp_ops() 1358 (sz->hsize > pp->crop_max.vsize)) { for_each_ipp_ops() 1363 if ((pos->w < pp->crop_min.hsize) || for_each_ipp_ops() 1364 (sz->hsize > pp->crop_max.hsize) || for_each_ipp_ops() 1365 (pos->h < pp->crop_min.vsize) || for_each_ipp_ops() 1366 (sz->vsize > pp->crop_max.vsize)) { for_each_ipp_ops() 1374 if ((i == EXYNOS_DRM_OPS_DST) && (pp->scale)) { for_each_ipp_ops() 1376 if ((pos->h < pp->scale_min.hsize) || for_each_ipp_ops() 1377 (sz->vsize > pp->scale_max.hsize) || for_each_ipp_ops() 1378 (pos->w < pp->scale_min.vsize) || for_each_ipp_ops() 1379 (sz->hsize > pp->scale_max.vsize)) { for_each_ipp_ops() 1384 if ((pos->w < pp->scale_min.hsize) || for_each_ipp_ops() 1385 (sz->hsize > pp->scale_max.hsize) || for_each_ipp_ops() 1386 (pos->h < pp->scale_min.vsize) || for_each_ipp_ops() 1387 (sz->vsize > pp->scale_max.vsize)) { for_each_ipp_ops()
|
/linux-4.1.27/drivers/staging/comedi/drivers/ |
H A D | addi_apci_1500.c | 61 unsigned int pp[2]; /* Pattern Polarity */ member in struct:apci1500_private 310 z8536_write(dev, devpriv->pp[pa_trig] & 0xff, Z8536_PA_PP_REG); apci1500_di_inttrig_start() 315 z8536_write(dev, (devpriv->pp[pb_trig] >> 8) & 0xff, Z8536_PB_PP_REG); apci1500_di_inttrig_start() 470 unsigned int pp = devpriv->pp[trig] & old_mask; apci1500_di_cfg_trig() local 488 pp = 0; apci1500_di_cfg_trig() 493 pp |= hi_mask; /* rising-edge channels */ apci1500_di_cfg_trig() 494 pp &= ~lo_mask; /* falling-edge channels */ apci1500_di_cfg_trig() 499 pp |= hi_mask; /* high level channels */ apci1500_di_cfg_trig() 500 pp &= ~lo_mask; /* low level channels */ apci1500_di_cfg_trig() 532 devpriv->pp[trig] = pp; apci1500_di_cfg_trig()
|
/linux-4.1.27/include/scsi/ |
H A D | fc_encode.h | 661 } *pp; fc_prli_fill() local 663 pp = fc_frame_payload_get(fp, sizeof(*pp)); fc_prli_fill() 664 memset(pp, 0, sizeof(*pp)); fc_prli_fill() 665 pp->prli.prli_cmd = ELS_PRLI; fc_prli_fill() 666 pp->prli.prli_spp_len = sizeof(struct fc_els_spp); fc_prli_fill() 667 pp->prli.prli_len = htons(sizeof(*pp)); fc_prli_fill() 668 pp->spp.spp_type = FC_TYPE_FCP; fc_prli_fill() 669 pp->spp.spp_flags = FC_SPP_EST_IMG_PAIR; fc_prli_fill() 670 pp->spp.spp_params = htonl(lport->service_params); fc_prli_fill()
|
H A D | fc_frame.h | 206 void *pp = NULL; fc_frame_payload_get() local 209 pp = fc_frame_header_get(fp) + 1; fc_frame_payload_get() 210 return pp; fc_frame_payload_get()
|
/linux-4.1.27/drivers/net/ppp/ |
H A D | pppox.c | 41 int register_pppox_proto(int proto_num, const struct pppox_proto *pp) register_pppox_proto() argument 47 pppox_protos[proto_num] = pp; register_pppox_proto()
|
/linux-4.1.27/arch/mips/include/asm/octeon/ |
H A D | cvmx-pow-defs.h | 60 uint64_t pp:16; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_s 64 uint64_t pp:16; 71 uint64_t pp:1; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn30xx 93 uint64_t pp:1; 100 uint64_t pp:2; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn31xx 122 uint64_t pp:2; 129 uint64_t pp:16; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn38xx 153 uint64_t pp:16; 162 uint64_t pp:4; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn52xx 184 uint64_t pp:4; 192 uint64_t pp:12; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn56xx 216 uint64_t pp:12; 226 uint64_t pp:4; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn61xx 244 uint64_t pp:4; 251 uint64_t pp:6; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn63xx 269 uint64_t pp:6; 277 uint64_t pp:10; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn66xx 295 uint64_t pp:10;
|
/linux-4.1.27/include/net/phonet/ |
H A D | phonet.h | 111 int phonet_proto_register(unsigned int protocol, struct phonet_protocol *pp); 112 void phonet_proto_unregister(unsigned int protocol, struct phonet_protocol *pp);
|
/linux-4.1.27/drivers/dma/ipu/ |
H A D | ipu_idmac.c | 272 struct chan_param_mem_planar pp; member in union:chan_param_mem 279 params->pp.ubo_l = u_offset & 0x7ff; ipu_ch_param_set_plane_offset() 280 params->pp.ubo_h = u_offset >> 11; ipu_ch_param_set_plane_offset() 281 params->pp.vbo_l = v_offset & 0x1ffff; ipu_ch_param_set_plane_offset() 282 params->pp.vbo_h = v_offset >> 17; ipu_ch_param_set_plane_offset() 292 params->pp.fw = width - 1; ipu_ch_param_set_size() 293 params->pp.fh_l = height - 1; ipu_ch_param_set_size() 294 params->pp.fh_h = (height - 1) >> 8; ipu_ch_param_set_size() 295 params->pp.sl = stride - 1; ipu_ch_param_set_size() 300 params->pp.bpp = 3; ipu_ch_param_set_size() 301 params->pp.pfs = 7; ipu_ch_param_set_size() 302 params->pp.npb = 31; ipu_ch_param_set_size() 303 params->pp.sat = 2; /* SAT = use 32-bit access */ ipu_ch_param_set_size() 307 params->pp.bpp = 0; ipu_ch_param_set_size() 308 params->pp.pfs = 7; ipu_ch_param_set_size() 309 params->pp.npb = 7; ipu_ch_param_set_size() 310 params->pp.sat = 2; /* SAT = use 32-bit access */ ipu_ch_param_set_size() 422 params->pp.nsb = 1; ipu_ch_param_set_size() 428 params->pp.eba0 = buf0; ipu_ch_param_set_buffer() 429 params->pp.eba1 = buf1; ipu_ch_param_set_buffer() 435 params->pp.bam = rotate; ipu_ch_param_set_rotation()
|
/linux-4.1.27/drivers/nfc/st21nfcb/ |
H A D | i2c.c | 230 struct device_node *pp; st21nfcb_nci_i2c_of_request_resources() local 234 pp = client->dev.of_node; st21nfcb_nci_i2c_of_request_resources() 235 if (!pp) st21nfcb_nci_i2c_of_request_resources() 239 gpio = of_get_named_gpio(pp, "reset-gpios", 0); st21nfcb_nci_i2c_of_request_resources()
|
/linux-4.1.27/drivers/char/tpm/st33zp24/ |
H A D | i2c.c | 114 struct device_node *pp; st33zp24_i2c_of_request_resources() local 119 pp = client->dev.of_node; st33zp24_i2c_of_request_resources() 120 if (!pp) { st33zp24_i2c_of_request_resources() 126 gpio = of_get_named_gpio(pp, "lpcpd-gpios", 0); st33zp24_i2c_of_request_resources()
|
H A D | spi.c | 234 struct device_node *pp; tpm_stm_spi_of_request_resources() local 239 pp = dev->dev.of_node; tpm_stm_spi_of_request_resources() 240 if (!pp) { tpm_stm_spi_of_request_resources() 246 gpio = of_get_named_gpio(pp, "lpcpd-gpios", 0); tpm_stm_spi_of_request_resources()
|
/linux-4.1.27/arch/powerpc/lib/ |
H A D | rheap.c | 33 unsigned long *pp; fixup() local 35 pp = (unsigned long *)&l->next; fixup() 36 if (*pp >= s && *pp < e) fixup() 37 *pp += d; fixup() 39 pp = (unsigned long *)&l->prev; fixup() 40 if (*pp >= s && *pp < e) fixup() 41 *pp += d; fixup()
|
/linux-4.1.27/drivers/nfc/st21nfca/ |
H A D | i2c.c | 515 struct device_node *pp; st21nfca_hci_i2c_of_request_resources() local 519 pp = client->dev.of_node; st21nfca_hci_i2c_of_request_resources() 520 if (!pp) st21nfca_hci_i2c_of_request_resources() 524 gpio = of_get_named_gpio(pp, "enable-gpios", 0); st21nfca_hci_i2c_of_request_resources() 543 of_property_read_bool(pp, "ese-present"); st21nfca_hci_i2c_of_request_resources() 545 of_property_read_bool(pp, "uicc-present"); st21nfca_hci_i2c_of_request_resources()
|
H A D | st21nfca_dep.c | 62 #define ST21NFCA_PP2LRI(pp) ((pp & 0x30) >> 4)
|
/linux-4.1.27/fs/fuse/ |
H A D | cuse.c | 201 * @pp: i/o parameter for the current position 206 * *@pp points to packed strings - "key0=val0\0key1=val1\0" which ends 210 * terminated with '\0'. *@pp is updated to point to the next string. 215 static int cuse_parse_one(char **pp, char *end, char **keyp, char **valp) cuse_parse_one() argument 217 char *p = *pp; cuse_parse_one() 247 *pp = p; cuse_parse_one()
|
/linux-4.1.27/drivers/isdn/gigaset/ |
H A D | capi.c | 1337 u8 *pp; do_connect_req() local 1378 pp = cmsg->CalledPartyNumber; do_connect_req() 1379 if (pp == NULL || *pp == 0) { do_connect_req() 1385 l = *pp++; do_connect_req() 1387 switch (*pp) { do_connect_req() 1393 "CONNECT_REQ", "Called party number", *pp); do_connect_req() 1395 pp++; do_connect_req() 1398 if (l >= 2 && pp[0] == '*' && pp[1] == '*') { do_connect_req() 1400 pp += 2; do_connect_req() 1411 snprintf(commands[AT_DIAL], l + 3, "D%.*s\r", l, pp); do_connect_req() 1414 pp = cmsg->CallingPartyNumber; do_connect_req() 1415 if (pp != NULL && *pp > 0) { do_connect_req() 1416 l = *pp++; do_connect_req() 1420 switch (*pp) { do_connect_req() 1427 "CONNECT_REQ", "Calling party number", *pp); do_connect_req() 1429 pp++; do_connect_req() 1439 switch (*pp & 0xfc) { /* ignore Screening indicator */ do_connect_req() 1450 *pp); do_connect_req() 1456 pp++; do_connect_req() 1464 snprintf(commands[AT_MSN], l + 8, "^SMSN=%*s\r", l, pp); do_connect_req()
|
/linux-4.1.27/drivers/infiniband/hw/ipath/ |
H A D | ipath_mmap.c | 94 struct ipath_mmap_info *ip, *pp; ipath_mmap() local 103 list_for_each_entry_safe(ip, pp, &dev->pending_mmaps, ipath_mmap()
|
/linux-4.1.27/drivers/infiniband/hw/qib/ |
H A D | qib_mmap.c | 94 struct qib_mmap_info *ip, *pp; qib_mmap() local 103 list_for_each_entry_safe(ip, pp, &dev->pending_mmaps, qib_mmap()
|
/linux-4.1.27/drivers/gpu/drm/msm/mdp/mdp5/ |
H A D | mdp5_cfg.c | 70 .pp = { 139 .pp = {
|
H A D | mdp5_cfg.h | 79 struct mdp5_sub_block pp; member in struct:mdp5_cfg_hw
|
H A D | mdp5.xml.h | 1152 case 0: return (mdp5_cfg->pp.base[0]); __offset_PP() 1153 case 1: return (mdp5_cfg->pp.base[1]); __offset_PP() 1154 case 2: return (mdp5_cfg->pp.base[2]); __offset_PP() 1155 case 3: return (mdp5_cfg->pp.base[3]); __offset_PP()
|
/linux-4.1.27/scripts/dtc/ |
H A D | checks.c | 425 struct property **pp, *prop = NULL; check_name_properties() local 427 for (pp = &node->proplist; *pp; pp = &((*pp)->next)) check_name_properties() 428 if (streq((*pp)->name, "name")) { check_name_properties() 429 prop = *pp; check_name_properties() 443 *pp = prop->next; check_name_properties()
|
/linux-4.1.27/net/ipv4/ |
H A D | gre_offload.c | 122 struct sk_buff **pp = NULL; gre_gro_receive() local 217 pp = ptype->callbacks.gro_receive(head, skb); gre_gro_receive() 224 return pp; gre_gro_receive()
|
H A D | tcp_metrics.c | 1057 struct tcp_metrics_block __rcu **pp; tcp_metrics_flush_all() local 1059 pp = &hb->chain; tcp_metrics_flush_all() 1060 for (tm = deref_locked(*pp); tm; tm = deref_locked(*pp)) { tcp_metrics_flush_all() 1062 *pp = tm->tcpm_next; tcp_metrics_flush_all() 1065 pp = &tm->tcpm_next; tcp_metrics_flush_all() 1076 struct tcp_metrics_block __rcu **pp; tcp_metrics_nl_cmd_del() local 1097 pp = &hb->chain; tcp_metrics_nl_cmd_del() 1099 for (tm = deref_locked(*pp); tm; tm = deref_locked(*pp)) { tcp_metrics_nl_cmd_del() 1103 *pp = tm->tcpm_next; tcp_metrics_nl_cmd_del() 1107 pp = &tm->tcpm_next; tcp_metrics_nl_cmd_del()
|
H A D | tcp_offload.c | 180 struct sk_buff **pp = NULL; tcp_gro_receive() local 266 pp = head; tcp_gro_receive() 271 return pp; tcp_gro_receive()
|
H A D | fou.c | 181 struct sk_buff **pp = NULL; fou_gro_receive() local 191 pp = ops->callbacks.gro_receive(head, skb); fou_gro_receive() 196 return pp; fou_gro_receive() 260 struct sk_buff **pp = NULL; gue_gro_receive() local 358 pp = ops->callbacks.gro_receive(head, skb); gue_gro_receive() 366 return pp; gue_gro_receive()
|
H A D | geneve.c | 154 struct sk_buff *p, **pp = NULL; geneve_gro_receive() local 206 pp = ptype->callbacks.gro_receive(head, skb); geneve_gro_receive() 213 return pp; geneve_gro_receive()
|
H A D | udp_offload.c | 297 struct sk_buff *p, **pp = NULL; udp_gro_receive() local 342 pp = uo_priv->offload->callbacks.gro_receive(head, skb, udp_gro_receive() 349 return pp; udp_gro_receive()
|
/linux-4.1.27/net/ipv6/ |
H A D | ip6_offload.c | 170 struct sk_buff **pp = NULL; ipv6_gro_receive() local 250 pp = ops->callbacks.gro_receive(head, skb); ipv6_gro_receive() 258 return pp; ipv6_gro_receive()
|
/linux-4.1.27/sound/synth/emux/ |
H A D | soundfont.c | 58 static void init_voice_parm(struct soundfont_voice_parm *pp); 638 init_voice_parm(struct soundfont_voice_parm *pp) init_voice_parm() argument 640 memset(pp, 0, sizeof(*pp)); init_voice_parm() 642 pp->moddelay = 0x8000; init_voice_parm() 643 pp->modatkhld = 0x7f7f; init_voice_parm() 644 pp->moddcysus = 0x7f7f; init_voice_parm() 645 pp->modrelease = 0x807f; init_voice_parm() 647 pp->voldelay = 0x8000; init_voice_parm() 648 pp->volatkhld = 0x7f7f; init_voice_parm() 649 pp->voldcysus = 0x7f7f; init_voice_parm() 650 pp->volrelease = 0x807f; init_voice_parm() 652 pp->lfo1delay = 0x8000; init_voice_parm() 653 pp->lfo2delay = 0x8000; init_voice_parm() 655 pp->cutoff = 0xff; init_voice_parm()
|
/linux-4.1.27/arch/arm64/kernel/ |
H A D | insn.c | 201 struct aarch64_insn_patch *pp = arg; aarch64_insn_patch_text_cb() local 204 if (atomic_inc_return(&pp->cpu_count) == 1) { aarch64_insn_patch_text_cb() 205 for (i = 0; ret == 0 && i < pp->insn_cnt; i++) aarch64_insn_patch_text_cb() 206 ret = aarch64_insn_patch_text_nosync(pp->text_addrs[i], aarch64_insn_patch_text_cb() 207 pp->new_insns[i]); aarch64_insn_patch_text_cb() 214 atomic_inc(&pp->cpu_count); aarch64_insn_patch_text_cb() 216 while (atomic_read(&pp->cpu_count) <= num_online_cpus()) aarch64_insn_patch_text_cb()
|
/linux-4.1.27/arch/powerpc/platforms/pseries/ |
H A D | setup.c | 298 struct paca_struct *pp; alloc_dispatch_logs() local 308 pp = &paca[cpu]; for_each_possible_cpu() 317 pp->dtl_ridx = 0; for_each_possible_cpu() 318 pp->dispatch_log = dtl; for_each_possible_cpu() 319 pp->dispatch_log_end = dtl + N_DISPATCH_LOG; for_each_possible_cpu() 320 pp->dtl_curr = dtl; for_each_possible_cpu()
|
H A D | lpar.c | 69 struct paca_struct *pp; vpa_init() local 108 pp = &paca[cpu]; vpa_init() 109 dtl = pp->dispatch_log; vpa_init() 111 pp->dtl_ridx = 0; vpa_init() 112 pp->dtl_curr = dtl; vpa_init()
|
/linux-4.1.27/fs/exofs/ |
H A D | ore_raid.c | 491 struct page **pp = &_1ps->pages[c]; _read_4_write_first_stripe() local 494 if (*pp) { _read_4_write_first_stripe() 497 _add_to_r4w_first_page(ios, *pp); _read_4_write_first_stripe() 502 *pp = ios->r4w->get_page(ios->private, offset, _read_4_write_first_stripe() 504 if (unlikely(!*pp)) _read_4_write_first_stripe() 508 _add_to_r4w(ios, &read_si, *pp, PAGE_SIZE); _read_4_write_first_stripe()
|
/linux-4.1.27/sound/pci/au88x0/ |
H A D | au88x0_core.c | 1176 int page, p, pp, delta, i; vortex_adbdma_bufshift() local 1198 /* pp: hardware DMA page index. */ vortex_adbdma_bufshift() 1199 pp = dma->period_real + i; vortex_adbdma_bufshift() 1200 if (pp >= 4) vortex_adbdma_bufshift() 1201 pp -= 4; vortex_adbdma_bufshift() 1202 //hwwrite(vortex->mmio, VORTEX_ADBDMA_BUFBASE+(((adbdma << 2)+pp) << 2), dma->table[p].addr); vortex_adbdma_bufshift() 1204 VORTEX_ADBDMA_BUFBASE + (((adbdma << 2) + pp) << 2), vortex_adbdma_bufshift() 1209 (((adbdma << 2) + pp) << 2)); vortex_adbdma_bufshift() 1227 int p, pp, i; vortex_adbdma_resetup() local 1235 /* pp: hardware DMA page index. */ vortex_adbdma_resetup() 1236 pp = dma->period_real + i; vortex_adbdma_resetup() 1238 if (pp >= dma->nr_periods) vortex_adbdma_resetup() 1239 pp -= dma->nr_periods; vortex_adbdma_resetup() 1242 if (pp >= 4) vortex_adbdma_resetup() 1243 pp -= 4; vortex_adbdma_resetup() 1246 VORTEX_ADBDMA_BUFBASE + (((adbdma << 2) + pp) << 2), vortex_adbdma_resetup() 1250 hwread(vortex->mmio, VORTEX_ADBDMA_BUFBASE + (((adbdma << 2)+pp) << 2)); vortex_adbdma_resetup() 1444 int page, p, pp, delta, i; vortex_wtdma_bufshift() local 1467 /* pp: hardware DMA page index. */ vortex_wtdma_bufshift() 1468 pp = dma->period_real + i; vortex_wtdma_bufshift() 1469 if (pp >= 4) vortex_wtdma_bufshift() 1470 pp -= 4; vortex_wtdma_bufshift() 1473 (((wtdma << 2) + pp) << 2), vortex_wtdma_bufshift() 1478 (((wtdma << 2) + pp) << 2)); vortex_wtdma_bufshift()
|
/linux-4.1.27/drivers/isdn/hisax/ |
H A D | isdnl3.c | 279 struct l3_process *np, *pp = NULL; release_l3_process() local 287 if (pp) release_l3_process() 288 pp->next = np->next; release_l3_process() 308 pp = np; release_l3_process()
|
/linux-4.1.27/drivers/net/ethernet/tehuti/ |
H A D | tehuti.h | 98 #define READ_REG(pp, reg) readl(pp->pBdxRegs + reg) 99 #define WRITE_REG(pp, reg, val) writel(val, pp->pBdxRegs + reg)
|
/linux-4.1.27/drivers/clk/mvebu/ |
H A D | armada-375.c | 154 { "pp", NULL, 3 },
|
/linux-4.1.27/drivers/acpi/acpica/ |
H A D | utuuid.c | 61 * Where aa-pp are one byte hex numbers, made up of two hex digits
|
/linux-4.1.27/arch/s390/include/asm/ |
H A D | sysinfo.h | 138 unsigned char pp:2; member in struct:topology_core
|
/linux-4.1.27/lib/ |
H A D | decompress_bunzip2.c | 235 int minLen, maxLen, pp; get_next_block() local 306 pp = 0; get_next_block() 311 hufGroup->permute[pp++] = t; get_next_block() 322 pp = t = 0; get_next_block() 324 pp += temp[i]; get_next_block() 335 limit[i] = (pp << (maxLen - i)) - 1; get_next_block() 336 pp <<= 1; get_next_block() 337 base[i+1] = pp-(t += temp[i]); get_next_block() 341 limit[maxLen] = pp+temp[maxLen]-1; get_next_block()
|
H A D | ts_bm.c | 17 * 20(10), 1977, pp. 762-772.
|
/linux-4.1.27/drivers/gpu/drm/i915/ |
H A D | intel_dp.c | 1693 u32 pp; edp_panel_vdd_on() local 1717 pp = ironlake_get_pp_control(intel_dp); edp_panel_vdd_on() 1718 pp |= EDP_FORCE_VDD; edp_panel_vdd_on() 1723 I915_WRITE(pp_ctrl_reg, pp); edp_panel_vdd_on() 1769 u32 pp; edp_panel_vdd_off_sync() local 1782 pp = ironlake_get_pp_control(intel_dp); edp_panel_vdd_off_sync() 1783 pp &= ~EDP_FORCE_VDD; edp_panel_vdd_off_sync() 1788 I915_WRITE(pp_ctrl_reg, pp); edp_panel_vdd_off_sync() 1795 if ((pp & POWER_TARGET_ON) == 0) edp_panel_vdd_off_sync() 1856 u32 pp; edp_panel_on() local 1875 pp = ironlake_get_pp_control(intel_dp); edp_panel_on() 1878 pp &= ~PANEL_POWER_RESET; edp_panel_on() 1879 I915_WRITE(pp_ctrl_reg, pp); edp_panel_on() 1883 pp |= POWER_TARGET_ON; edp_panel_on() 1885 pp |= PANEL_POWER_RESET; edp_panel_on() 1887 I915_WRITE(pp_ctrl_reg, pp); edp_panel_on() 1894 pp |= PANEL_POWER_RESET; /* restore panel reset bit */ edp_panel_on() 1895 I915_WRITE(pp_ctrl_reg, pp); edp_panel_on() 1918 u32 pp; edp_panel_off() local 1932 pp = ironlake_get_pp_control(intel_dp); edp_panel_off() 1935 pp &= ~(POWER_TARGET_ON | PANEL_POWER_RESET | EDP_FORCE_VDD | edp_panel_off() 1942 I915_WRITE(pp_ctrl_reg, pp); edp_panel_off() 1969 u32 pp; _intel_edp_backlight_on() local 1982 pp = ironlake_get_pp_control(intel_dp); _intel_edp_backlight_on() 1983 pp |= EDP_BLC_ENABLE; _intel_edp_backlight_on() 1987 I915_WRITE(pp_ctrl_reg, pp); _intel_edp_backlight_on() 2010 u32 pp; _intel_edp_backlight_off() local 2018 pp = ironlake_get_pp_control(intel_dp); _intel_edp_backlight_off() 2019 pp &= ~EDP_BLC_ENABLE; _intel_edp_backlight_off() 2023 I915_WRITE(pp_ctrl_reg, pp); _intel_edp_backlight_off() 4810 u32 pp_on, pp_off, pp_div, pp; intel_dp_init_panel_power_sequencer() local 4835 pp = ironlake_get_pp_control(intel_dp); intel_dp_init_panel_power_sequencer() 4836 I915_WRITE(pp_ctrl_reg, pp); intel_dp_init_panel_power_sequencer() 4943 /* Compute the divisor for the pp clock, simply match the Bspec intel_dp_init_panel_power_sequencer_registers()
|
/linux-4.1.27/drivers/pinctrl/ |
H A D | pinctrl-st.c | 1233 struct property *pp; st_pctl_dt_parse_groups() local 1242 for_each_property_of_node(pins, pp) { for_each_property_of_node() 1244 if (!strcmp(pp->name, "name")) for_each_property_of_node() 1247 if (pp && (pp->length/sizeof(__be32)) >= OF_GPIO_ARGS_MIN) { for_each_property_of_node() 1265 for_each_property_of_node(pins, pp) { for_each_property_of_node() 1266 if (!strcmp(pp->name, "name")) for_each_property_of_node() 1268 nr_props = pp->length/sizeof(u32); for_each_property_of_node() 1269 list = pp->value; for_each_property_of_node() 1275 conf->pin = of_get_named_gpio(pins, pp->name, 0); for_each_property_of_node() 1276 conf->name = pp->name; for_each_property_of_node()
|
/linux-4.1.27/net/nfc/ |
H A D | digital_dep.c | 77 u8 pp; member in struct:digital_atr_req 89 u8 pp; member in struct:digital_atr_res 414 payload_bits = DIGITAL_PAYLOAD_PP_TO_BITS(atr_res->pp); digital_in_recv_atr_res() 484 atr_req->pp = DIGITAL_PAYLOAD_BITS_TO_PP(payload_bits); digital_in_send_atr_req() 487 atr_req->pp |= DIGITAL_GB_BIT; digital_in_send_atr_req() 1427 atr_res->pp = DIGITAL_PAYLOAD_BITS_TO_PP(payload_bits); digital_tg_send_atr_res() 1432 atr_res->pp |= DIGITAL_GB_BIT; digital_tg_send_atr_res() 1505 payload_bits = DIGITAL_PAYLOAD_PP_TO_BITS(atr_req->pp); digital_tg_recv_atr_req()
|
/linux-4.1.27/tools/perf/ |
H A D | builtin-mem.c | 44 rec_argv[i++] = "cpu/mem-loads/pp"; __cmd_record() 49 rec_argv[i++] = "cpu/mem-stores/pp"; __cmd_record()
|
H A D | builtin-timechart.c | 242 struct per_pid *p, *pp; pid_fork() local 244 pp = find_create_pid(tchart, ppid); pid_fork() 246 if (pp->current && pp->current->comm && !p->current) pid_fork() 247 pid_set_comm(tchart, pid, pp->current->comm); pid_fork()
|
/linux-4.1.27/drivers/usb/gadget/udc/ |
H A D | atmel_usba_udc.c | 1933 struct device_node *pp; atmel_udc_of_init() local 1949 pp = NULL; atmel_udc_of_init() 1950 while ((pp = of_get_next_child(np, pp))) atmel_udc_of_init() 1962 pp = NULL; atmel_udc_of_init() 1964 while ((pp = of_get_next_child(np, pp))) { atmel_udc_of_init() 1967 ret = of_property_read_u32(pp, "reg", &val); atmel_udc_of_init() 1974 ret = of_property_read_u32(pp, "atmel,fifo-size", &val); atmel_udc_of_init() 1981 ret = of_property_read_u32(pp, "atmel,nb-banks", &val); atmel_udc_of_init() 1988 ep->can_dma = of_property_read_bool(pp, "atmel,can-dma"); atmel_udc_of_init() 1989 ep->can_isoc = of_property_read_bool(pp, "atmel,can-isoc"); atmel_udc_of_init() 1991 ret = of_property_read_string(pp, "name", &name); atmel_udc_of_init()
|
/linux-4.1.27/net/ethernet/ |
H A D | eth.c | 397 struct sk_buff *p, **pp = NULL; eth_gro_receive() local 437 pp = ptype->callbacks.gro_receive(head, skb); eth_gro_receive() 444 return pp; eth_gro_receive()
|
/linux-4.1.27/fs/xfs/libxfs/ |
H A D | xfs_btree.c | 1637 union xfs_btree_ptr *pp, /* ptr to btree block */ xfs_btree_lookup_get_block() 1657 if (bp && XFS_BUF_ADDR(bp) == xfs_btree_ptr_to_daddr(cur, pp)) { xfs_btree_lookup_get_block() 1662 error = xfs_btree_read_buf_block(cur, pp, 0, blkp, &bp); xfs_btree_lookup_get_block() 1707 union xfs_btree_ptr *pp; /* ptr to btree block */ xfs_btree_lookup() local 1720 pp = &ptr; xfs_btree_lookup() 1730 error = xfs_btree_lookup_get_block(cur, level, pp, &block); xfs_btree_lookup() 1800 pp = xfs_btree_ptr_addr(cur, keyno, block); xfs_btree_lookup() 1803 error = xfs_btree_check_ptr(cur, pp, 0, level); xfs_btree_lookup() 2600 union xfs_btree_ptr *pp; /* pointer to block addr */ xfs_btree_new_iroot() local 2616 pp = xfs_btree_ptr_addr(cur, 1, block); xfs_btree_new_iroot() 2619 error = cur->bc_ops->alloc_block(cur, pp, &nptr, stat); xfs_btree_new_iroot() 2657 error = xfs_btree_check_ptr(cur, pp, i, level); xfs_btree_new_iroot() 2662 xfs_btree_copy_ptrs(cur, cpp, pp, xfs_btree_get_numrecs(cblock)); xfs_btree_new_iroot() 2669 xfs_btree_copy_ptrs(cur, pp, &nptr, 1); xfs_btree_new_iroot() 3004 union xfs_btree_ptr *pp; xfs_btree_insrec() local 3007 pp = xfs_btree_ptr_addr(cur, ptr, block); xfs_btree_insrec() 3011 error = xfs_btree_check_ptr(cur, pp, i, level); xfs_btree_insrec() 3018 xfs_btree_shift_ptrs(cur, pp, 1, numrecs - ptr + 1); xfs_btree_insrec() 3028 xfs_btree_copy_ptrs(cur, pp, ptrp, 1); xfs_btree_insrec() 3191 union xfs_btree_ptr *pp; xfs_btree_kill_iroot() local 3256 pp = xfs_btree_ptr_addr(cur, 1, block); xfs_btree_kill_iroot() 3269 xfs_btree_copy_ptrs(cur, pp, cpp, numrecs); xfs_btree_kill_iroot() 3499 union xfs_btree_ptr *pp; xfs_btree_delrec() local 3501 * pp is still set to the first pointer in the block. xfs_btree_delrec() 3504 pp = xfs_btree_ptr_addr(cur, 1, block); xfs_btree_delrec() 3505 error = xfs_btree_kill_root(cur, bp, level, pp); xfs_btree_delrec() 1634 xfs_btree_lookup_get_block( struct xfs_btree_cur *cur, int level, union xfs_btree_ptr *pp, struct xfs_btree_block **blkp) xfs_btree_lookup_get_block() argument
|
H A D | xfs_bmap.c | 286 __be64 *pp, *thispa; /* pointer to block address */ xfs_check_block() local 306 pp = XFS_BMAP_BROOT_PTR_ADDR(mp, block, i, sz); xfs_check_block() 308 pp = XFS_BMBT_PTR_ADDR(mp, block, i, dmxr); xfs_check_block() 315 if (*thispa == *pp) { xfs_check_block() 316 xfs_warn(mp, "%s: thispa(%d) == pp(%d) %Ld", xfs_check_block() 345 __be64 *pp; /* pointer to block address */ xfs_bmap_check_leaf_extents() local 365 pp = XFS_BMAP_BROOT_PTR_ADDR(mp, block, 1, ifp->if_broot_bytes); xfs_bmap_check_leaf_extents() 366 bno = be64_to_cpu(*pp); xfs_bmap_check_leaf_extents() 398 pp = XFS_BMBT_PTR_ADDR(mp, block, 1, mp->m_bmap_dmxr[1]); xfs_bmap_check_leaf_extents() 399 bno = be64_to_cpu(*pp); xfs_bmap_check_leaf_extents() 674 __be64 *pp; /* ptr to block address */ xfs_bmap_btree_to_extents() local 685 pp = XFS_BMAP_BROOT_PTR_ADDR(mp, rblock, 1, ifp->if_broot_bytes); xfs_bmap_btree_to_extents() 686 cbno = be64_to_cpu(*pp); xfs_bmap_btree_to_extents() 741 xfs_bmbt_ptr_t *pp; /* root block address pointer */ xfs_bmap_extents_to_btree() local 845 pp = XFS_BMBT_PTR_ADDR(mp, block, 1, xfs_bmbt_get_maxrecs(cur, xfs_bmap_extents_to_btree() 847 *pp = cpu_to_be64(args.fsbno); xfs_bmap_extents_to_btree() 1258 __be64 *pp; /* pointer to block address */ xfs_bmap_read_extents() local 1273 pp = XFS_BMAP_BROOT_PTR_ADDR(mp, block, 1, ifp->if_broot_bytes); xfs_bmap_read_extents() 1274 bno = be64_to_cpu(*pp); xfs_bmap_read_extents() 1290 pp = XFS_BMBT_PTR_ADDR(mp, block, 1, mp->m_bmap_dmxr[1]); xfs_bmap_read_extents() 1291 bno = be64_to_cpu(*pp); xfs_bmap_read_extents()
|
/linux-4.1.27/net/sctp/ |
H A D | socket.c | 6154 struct sctp_bind_bucket *pp; sctp_get_port_local() local 6183 sctp_for_each_hentry(pp, &head->chain) sctp_get_port_local() 6184 if ((pp->port == rover) && sctp_get_port_local() 6185 net_eq(sock_net(sk), pp->net)) sctp_get_port_local() 6207 * port iterator, pp being NULL. sctp_get_port_local() 6211 sctp_for_each_hentry(pp, &head->chain) { sctp_get_port_local() 6212 if ((pp->port == snum) && net_eq(pp->net, sock_net(sk))) sctp_get_port_local() 6216 pp = NULL; sctp_get_port_local() 6219 if (!hlist_empty(&pp->owner)) { sctp_get_port_local() 6221 * available port (pp != NULL) and it is being sctp_get_port_local() 6222 * used by other socket (pp->owner not empty); that other sctp_get_port_local() 6230 if (pp->fastreuse && sk->sk_reuse && sctp_get_port_local() 6235 * (pp->port) [via the pointers bind_next and sctp_get_port_local() 6236 * bind_pprev in the struct sock *sk2 (pp->sk)]. On each one, sctp_get_port_local() 6244 sk_for_each_bound(sk2, &pp->owner) { sctp_get_port_local() 6265 if (!pp && !(pp = sctp_bucket_create(head, sock_net(sk), snum))) sctp_get_port_local() 6272 if (hlist_empty(&pp->owner)) { sctp_get_port_local() 6274 pp->fastreuse = 1; sctp_get_port_local() 6276 pp->fastreuse = 0; sctp_get_port_local() 6277 } else if (pp->fastreuse && sctp_get_port_local() 6279 pp->fastreuse = 0; sctp_get_port_local() 6288 sk_add_bind_node(sk, &pp->owner); sctp_get_port_local() 6289 sctp_sk(sk)->bind_hash = pp; sctp_get_port_local() 6499 struct sctp_bind_bucket *pp; sctp_bucket_create() local 6501 pp = kmem_cache_alloc(sctp_bucket_cachep, GFP_ATOMIC); sctp_bucket_create() 6502 if (pp) { sctp_bucket_create() 6504 pp->port = snum; sctp_bucket_create() 6505 pp->fastreuse = 0; sctp_bucket_create() 6506 INIT_HLIST_HEAD(&pp->owner); sctp_bucket_create() 6507 pp->net = net; sctp_bucket_create() 6508 hlist_add_head(&pp->node, &head->chain); sctp_bucket_create() 6510 return pp; sctp_bucket_create() 6514 static void sctp_bucket_destroy(struct sctp_bind_bucket *pp) sctp_bucket_destroy() argument 6516 if (pp && hlist_empty(&pp->owner)) { sctp_bucket_destroy() 6517 __hlist_del(&pp->node); sctp_bucket_destroy() 6518 kmem_cache_free(sctp_bucket_cachep, pp); sctp_bucket_destroy() 6529 struct sctp_bind_bucket *pp; __sctp_put_port() local 6532 pp = sctp_sk(sk)->bind_hash; __sctp_put_port() 6536 sctp_bucket_destroy(pp); __sctp_put_port() 7244 struct sctp_bind_bucket *pp; /* hash list port iterator */ sctp_sock_migrate() local 7269 pp = sctp_sk(oldsk)->bind_hash; sctp_sock_migrate() 7270 sk_add_bind_node(newsk, &pp->owner); sctp_sock_migrate() 7271 sctp_sk(newsk)->bind_hash = pp; sctp_sock_migrate()
|
/linux-4.1.27/arch/microblaze/include/asm/ |
H A D | mmu.h | 38 unsigned long pp:2; /* Page protection */ member in struct:_PTE
|
/linux-4.1.27/include/linux/sunrpc/ |
H A D | svc.h | 351 struct page **pp = --rqstp->rq_next_page; svc_free_res_pages() local 352 if (*pp) { svc_free_res_pages() 353 put_page(*pp); svc_free_res_pages() 354 *pp = NULL; svc_free_res_pages()
|
/linux-4.1.27/arch/s390/include/uapi/asm/ |
H A D | kvm.h | 163 __u64 pp; /* program parameter [ARCH0] */ member in struct:kvm_sync_regs
|
/linux-4.1.27/arch/powerpc/mm/ |
H A D | hugetlbpage-hash64.c | 41 * current values of the pp bits in the HPTE prevent access __hash_page_huge()
|
H A D | hash_low_64.S | 199 ld r6,STK_PARAM(R4)(r1) /* Retrieve new pp bits */ 224 ld r6,STK_PARAM(R4)(r1) /* Retrieve new pp bits */ 528 ld r6,STK_PARAM(R4)(r1) /* Retrieve new pp bits */ 557 ld r6,STK_PARAM(R4)(r1) /* Retrieve new pp bits */ 863 ld r6,STK_PARAM(R4)(r1) /* Retrieve new pp bits */ 888 ld r6,STK_PARAM(R4)(r1) /* Retrieve new pp bits */
|
/linux-4.1.27/drivers/mtd/devices/ |
H A D | spear_smi.c | 763 struct device_node *pp = NULL; spear_smi_probe_config_dt() local 780 while ((pp = of_get_next_child(np, pp))) { spear_smi_probe_config_dt() 784 pdata->np[i] = pp; spear_smi_probe_config_dt() 787 addr = of_get_property(pp, "reg", &len); spear_smi_probe_config_dt() 791 if (of_get_property(pp, "st,smi-fast-mode", NULL)) spear_smi_probe_config_dt()
|
/linux-4.1.27/drivers/nfc/pn544/ |
H A D | i2c.c | 967 struct device_node *pp; pn544_hci_i2c_of_request_resources() local 970 pp = client->dev.of_node; pn544_hci_i2c_of_request_resources() 971 if (!pp) { pn544_hci_i2c_of_request_resources() 977 ret = of_get_named_gpio(pp, "enable-gpios", 0); pn544_hci_i2c_of_request_resources() 999 ret = of_get_named_gpio(pp, "firmware-gpios", 0); pn544_hci_i2c_of_request_resources() 1021 ret = irq_of_parse_and_map(pp, 0); pn544_hci_i2c_of_request_resources()
|
/linux-4.1.27/mm/ |
H A D | migrate.c | 1211 struct page_to_node *pp; do_move_page_to_node_array() local 1219 for (pp = pm; pp->node != MAX_NUMNODES; pp++) { do_move_page_to_node_array() 1224 vma = find_vma(mm, pp->addr); do_move_page_to_node_array() 1225 if (!vma || pp->addr < vma->vm_start || !vma_migratable(vma)) do_move_page_to_node_array() 1228 page = follow_page(vma, pp->addr, FOLL_GET|FOLL_SPLIT); do_move_page_to_node_array() 1242 pp->page = page; do_move_page_to_node_array() 1245 if (err == pp->node) do_move_page_to_node_array() 1276 pp->status = err; do_move_page_to_node_array()
|
/linux-4.1.27/arch/microblaze/pci/ |
H A D | pci-common.c | 923 struct resource *p, **pp; reparent_resources() local 926 for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) { reparent_resources() 934 firstpp = pp; reparent_resources() 940 res->sibling = *pp; reparent_resources() 942 *pp = NULL; reparent_resources()
|
/linux-4.1.27/arch/s390/kernel/ |
H A D | smp.c | 502 struct ec_creg_mask_parms *pp = info; smp_ctl_bit_callback() local 506 cregs[pp->cr] = (cregs[pp->cr] & pp->andval) | pp->orval; smp_ctl_bit_callback()
|
H A D | topology.c | 102 smp_cpu_set_polarization(lcpu + i, tl_core->pp); add_cpus_to_mask()
|
/linux-4.1.27/drivers/media/pci/cx18/ |
H A D | cx18-av-audio.c | 45 * the NTSC Standards", Proceedings of the I-R-E, January 1954, pp 79-80 set_audclk_freq() 48 * NTSC Standards", Proceedings of the I-R-E, January 1954, pp 81-83 set_audclk_freq()
|
H A D | cx18-firmware.c | 243 * the NTSC Standards", Proceedings of the I-R-E, January 1954, pp 79-80 cx18_init_power() 246 * NTSC Standards", Proceedings of the I-R-E, January 1954, pp 81-83 cx18_init_power()
|
/linux-4.1.27/sound/soc/sh/rcar/ |
H A D | rsnd.h | 197 struct rsnd_dmapp pp; member in union:rsnd_dma::__anon14698 201 #define rsnd_dma_to_dmapp(dma) (&(dma)->dma.pp)
|
/linux-4.1.27/block/partitions/ |
H A D | aix.c | 285 pr_warn("partition %s (%u pp's found) is " aix_partition()
|
H A D | ldm.c | 621 * @pp: List of the partitions parsed so far 636 static bool ldm_create_data_partitions (struct parsed_partitions *pp, ldm_create_data_partitions() argument 645 BUG_ON (!pp || !ldb); ldm_create_data_partitions() 653 strlcat(pp->pp_buf, " [LDM]", PAGE_SIZE); ldm_create_data_partitions() 663 put_partition (pp, part_num, ldb->ph.logical_disk_start + ldm_create_data_partitions() 668 strlcat(pp->pp_buf, "\n", PAGE_SIZE); ldm_create_data_partitions()
|
/linux-4.1.27/net/ceph/ |
H A D | debugfs.c | 141 static int osdc_show(struct seq_file *s, void *pp) osdc_show() argument
|
/linux-4.1.27/sound/soc/intel/baytrail/ |
H A D | sst-baytrail-dsp.c | 61 u32 type; /* codec type, pp lib */
|
/linux-4.1.27/arch/s390/kvm/ |
H A D | kvm-s390.c | 1256 vcpu->arch.sie_block->pp = 0; kvm_s390_vcpu_initial_reset() 1504 r = put_user(vcpu->arch.sie_block->pp, kvm_arch_vcpu_ioctl_get_one_reg() 1555 r = get_user(vcpu->arch.sie_block->pp, kvm_arch_vcpu_ioctl_set_one_reg() 2032 vcpu->arch.sie_block->pp = kvm_run->s.regs.pp; sync_regs() 2054 kvm_run->s.regs.pp = vcpu->arch.sie_block->pp; store_regs()
|
/linux-4.1.27/arch/powerpc/kernel/ |
H A D | pci-common.c | 1112 struct resource *p, **pp; reparent_resources() local 1115 for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) { reparent_resources() 1123 firstpp = pp; reparent_resources() 1129 res->sibling = *pp; reparent_resources() 1131 *pp = NULL; reparent_resources()
|
/linux-4.1.27/drivers/usb/atm/ |
H A D | ueagle-atm.c | 770 unsigned int i, j, p, pp; check_dsp_e1() local 791 pp = pageoffset; check_dsp_e1() 792 blockcount = FW_GET_BYTE(dsp + pp); check_dsp_e1() 793 pp += 1; check_dsp_e1() 798 if (pp + 4 > len) check_dsp_e1() 801 pp += 2; /* skip blockaddr */ check_dsp_e1() 802 blocksize = get_unaligned_le16(dsp + pp); check_dsp_e1() 803 pp += 2; check_dsp_e1() 806 if (pp + blocksize > len) check_dsp_e1() 809 pp += blocksize; check_dsp_e1()
|
/linux-4.1.27/drivers/scsi/ |
H A D | scsi_debug.c | 3894 struct partition * pp; sdebug_build_parts() local 3920 pp = (struct partition *)(ramp + 0x1be); sdebug_build_parts() 3921 for (k = 0; starts[k + 1]; ++k, ++pp) { sdebug_build_parts() 3924 pp->boot_ind = 0; sdebug_build_parts() 3926 pp->cyl = start_sec / heads_by_sects; sdebug_build_parts() 3927 pp->head = (start_sec - (pp->cyl * heads_by_sects)) sdebug_build_parts() 3929 pp->sector = (start_sec % sdebug_sectors_per) + 1; sdebug_build_parts() 3931 pp->end_cyl = end_sec / heads_by_sects; sdebug_build_parts() 3932 pp->end_head = (end_sec - (pp->end_cyl * heads_by_sects)) sdebug_build_parts() 3934 pp->end_sector = (end_sec % sdebug_sectors_per) + 1; sdebug_build_parts() 3936 pp->start_sect = cpu_to_le32(start_sec); sdebug_build_parts() 3937 pp->nr_sects = cpu_to_le32(end_sec - start_sec + 1); sdebug_build_parts() 3938 pp->sys_ind = 0x83; /* plain Linux partition */ sdebug_build_parts()
|
/linux-4.1.27/arch/ia64/kernel/ |
H A D | perfmon.c | 970 * we cannot use psr.pp/psr.up for this, it is controlled by pfm_mask_monitoring() 1026 /* disable dcr pp */ pfm_restore_monitoring() 1083 /* enable dcr pp */ pfm_restore_monitoring() 3977 * disable dcr pp pfm_stop() 3995 ia64_psr(regs)->pp = 0; pfm_stop() 4058 * set user level psr.pp for the caller pfm_start() 4060 ia64_psr(regs)->pp = 1; pfm_start() 4072 /* enable dcr pp */ pfm_start() 4373 ia64_psr(regs)->up = ia64_psr(regs)->pp = 0; pfm_context_load() 4600 BUG_ON(ia64_psr(regs)->pp); pfm_exit_thread() 5745 ia64_psr(regs)->pp = is_ctxswin ? dcr_pp : 0; pfm_syst_wide_update_task() 6398 ia64_psr(regs)->pp = 0; pfm_alt_save_pmu_state() 6424 ia64_psr(regs)->pp = 0; pfm_alt_restore_pmu_state() 6698 if (info == 0 && ia64_psr(regs)->pp == 0 && (dcr & IA64_DCR_PP) == 0) { dump_pmu_state() 6717 printk("->CPU%d pmc0=0x%lx psr.pp=%d psr.up=%d dcr.pp=%d syst_info=0x%lx user_psr.up=%d user_psr.pp=%d\n", dump_pmu_state() 6725 ia64_psr(regs)->pp); dump_pmu_state() 6728 ia64_psr(regs)->pp = 0; dump_pmu_state()
|
H A D | process.c | 400 * the psr.up/psr.pp bits must be cleared on fork but inherited on execve() copy_thread() 428 * the psr.up/psr.pp bits must be cleared on fork but inherited on execve() copy_thread()
|
/linux-4.1.27/fs/xfs/ |
H A D | xfs_bmap_util.c | 329 __be64 *pp; xfs_bmap_count_tree() local 358 pp = XFS_BMBT_PTR_ADDR(mp, block, 1, mp->m_bmap_dmxr[1]); xfs_bmap_count_tree() 359 bno = be64_to_cpu(*pp); xfs_bmap_count_tree() 405 __be64 *pp; /* pointer to block address */ xfs_bmap_count_blocks() local 423 pp = XFS_BMAP_BROOT_PTR_ADDR(mp, block, 1, ifp->if_broot_bytes); xfs_bmap_count_blocks() 424 bno = be64_to_cpu(*pp); xfs_bmap_count_blocks()
|
/linux-4.1.27/drivers/scsi/fcoe/ |
H A D | fcoe.c | 2462 struct fcoe_percpu_s *pp; fcoe_percpu_clean() local 2467 pp = &per_cpu(fcoe_percpu, cpu); for_each_possible_cpu() 2469 if (!pp->thread || !cpu_online(cpu)) for_each_possible_cpu() 2478 spin_lock_bh(&pp->fcoe_rx_list.lock); for_each_possible_cpu() 2479 __skb_queue_tail(&pp->fcoe_rx_list, skb); for_each_possible_cpu() 2480 if (pp->fcoe_rx_list.qlen == 1) for_each_possible_cpu() 2481 wake_up_process(pp->thread); for_each_possible_cpu() 2482 spin_unlock_bh(&pp->fcoe_rx_list.lock); for_each_possible_cpu()
|
/linux-4.1.27/drivers/isdn/icn/ |
H A D | icn.c | 1028 int pp; icn_writecmd() local 1059 for (p = msg, pp = readb(&cmd_i), i = count; i > 0; i--, p++, pp icn_writecmd() 1062 &dev.shmem->comm_buffers.pcio_buf[pp & 0xff]); icn_writecmd()
|