/linux-4.4.14/drivers/pci/host/ |
H A D | pcie-designware.c | 112 static inline void dw_pcie_readl_rc(struct pcie_port *pp, u32 reg, u32 *val) dw_pcie_readl_rc() argument 114 if (pp->ops->readl_rc) dw_pcie_readl_rc() 115 pp->ops->readl_rc(pp, pp->dbi_base + reg, val); dw_pcie_readl_rc() 117 *val = readl(pp->dbi_base + reg); dw_pcie_readl_rc() 120 static inline void dw_pcie_writel_rc(struct pcie_port *pp, u32 val, u32 reg) dw_pcie_writel_rc() argument 122 if (pp->ops->writel_rc) dw_pcie_writel_rc() 123 pp->ops->writel_rc(pp, val, pp->dbi_base + reg); dw_pcie_writel_rc() 125 writel(val, pp->dbi_base + reg); dw_pcie_writel_rc() 128 static int dw_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, dw_pcie_rd_own_conf() argument 133 if (pp->ops->rd_own_conf) dw_pcie_rd_own_conf() 134 ret = pp->ops->rd_own_conf(pp, where, size, val); dw_pcie_rd_own_conf() 136 ret = dw_pcie_cfg_read(pp->dbi_base + where, size, val); dw_pcie_rd_own_conf() 141 static int dw_pcie_wr_own_conf(struct pcie_port *pp, int where, int size, dw_pcie_wr_own_conf() argument 146 if (pp->ops->wr_own_conf) dw_pcie_wr_own_conf() 147 ret = pp->ops->wr_own_conf(pp, where, size, val); dw_pcie_wr_own_conf() 149 ret = dw_pcie_cfg_write(pp->dbi_base + where, size, val); dw_pcie_wr_own_conf() 154 static void dw_pcie_prog_outbound_atu(struct pcie_port *pp, int index, dw_pcie_prog_outbound_atu() argument 157 dw_pcie_writel_rc(pp, PCIE_ATU_REGION_OUTBOUND | index, dw_pcie_prog_outbound_atu() 159 dw_pcie_writel_rc(pp, lower_32_bits(cpu_addr), PCIE_ATU_LOWER_BASE); dw_pcie_prog_outbound_atu() 160 dw_pcie_writel_rc(pp, upper_32_bits(cpu_addr), PCIE_ATU_UPPER_BASE); dw_pcie_prog_outbound_atu() 161 dw_pcie_writel_rc(pp, lower_32_bits(cpu_addr + size - 1), dw_pcie_prog_outbound_atu() 163 dw_pcie_writel_rc(pp, lower_32_bits(pci_addr), PCIE_ATU_LOWER_TARGET); dw_pcie_prog_outbound_atu() 164 dw_pcie_writel_rc(pp, upper_32_bits(pci_addr), PCIE_ATU_UPPER_TARGET); dw_pcie_prog_outbound_atu() 165 dw_pcie_writel_rc(pp, type, PCIE_ATU_CR1); dw_pcie_prog_outbound_atu() 166 dw_pcie_writel_rc(pp, PCIE_ATU_ENABLE, PCIE_ATU_CR2); dw_pcie_prog_outbound_atu() 178 irqreturn_t dw_handle_msi_irq(struct pcie_port *pp) dw_handle_msi_irq() argument 185 dw_pcie_rd_own_conf(pp, PCIE_MSI_INTR0_STATUS + i * 12, 4, dw_handle_msi_irq() 191 irq = irq_find_mapping(pp->irq_domain, dw_handle_msi_irq() 193 dw_pcie_wr_own_conf(pp, dw_handle_msi_irq() 205 void dw_pcie_msi_init(struct pcie_port *pp) dw_pcie_msi_init() argument 209 pp->msi_data = __get_free_pages(GFP_KERNEL, 0); dw_pcie_msi_init() 210 msi_target = virt_to_phys((void *)pp->msi_data); dw_pcie_msi_init() 213 dw_pcie_wr_own_conf(pp, PCIE_MSI_ADDR_LO, 4, dw_pcie_msi_init() 215 dw_pcie_wr_own_conf(pp, PCIE_MSI_ADDR_HI, 4, dw_pcie_msi_init() 219 static void dw_pcie_msi_clear_irq(struct pcie_port *pp, int irq) dw_pcie_msi_clear_irq() argument 225 dw_pcie_rd_own_conf(pp, PCIE_MSI_INTR0_ENABLE + res, 4, &val); dw_pcie_msi_clear_irq() 227 dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_ENABLE + res, 4, val); dw_pcie_msi_clear_irq() 230 static void clear_irq_range(struct pcie_port *pp, unsigned int irq_base, clear_irq_range() argument 238 if (pp->ops->msi_clear_irq) clear_irq_range() 239 pp->ops->msi_clear_irq(pp, pos + i); clear_irq_range() 241 dw_pcie_msi_clear_irq(pp, pos + i); clear_irq_range() 244 bitmap_release_region(pp->msi_irq_in_use, pos, order_base_2(nvec)); clear_irq_range() 247 static void dw_pcie_msi_set_irq(struct pcie_port *pp, int irq) dw_pcie_msi_set_irq() argument 253 dw_pcie_rd_own_conf(pp, PCIE_MSI_INTR0_ENABLE + res, 4, &val); dw_pcie_msi_set_irq() 255 dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_ENABLE + res, 4, val); dw_pcie_msi_set_irq() 261 struct pcie_port *pp = (struct pcie_port *) msi_desc_to_pci_sysdata(desc); assign_irq() local 263 pos0 = bitmap_find_free_region(pp->msi_irq_in_use, MAX_MSI_IRQS, assign_irq() 268 irq = irq_find_mapping(pp->irq_domain, pos0); assign_irq() 281 clear_irq_range(pp, irq, i, pos0); assign_irq() 285 if (pp->ops->msi_set_irq) assign_irq() 286 pp->ops->msi_set_irq(pp, pos0 + i); assign_irq() 288 dw_pcie_msi_set_irq(pp, pos0 + i); assign_irq() 302 static void dw_msi_setup_msg(struct pcie_port *pp, unsigned int irq, u32 pos) dw_msi_setup_msg() argument 307 if (pp->ops->get_msi_addr) dw_msi_setup_msg() 308 msi_target = pp->ops->get_msi_addr(pp); dw_msi_setup_msg() 310 msi_target = virt_to_phys((void *)pp->msi_data); dw_msi_setup_msg() 315 if (pp->ops->get_msi_data) dw_msi_setup_msg() 316 msg.data = pp->ops->get_msi_data(pp, pos); dw_msi_setup_msg() 327 struct pcie_port *pp = pdev->bus->sysdata; dw_msi_setup_irq() local 336 dw_msi_setup_msg(pp, irq, pos); dw_msi_setup_irq() 347 struct pcie_port *pp = pdev->bus->sysdata; dw_msi_setup_irqs() local 360 dw_msi_setup_msg(pp, irq, pos); dw_msi_setup_irqs() 372 struct pcie_port *pp = (struct pcie_port *) msi_desc_to_pci_sysdata(msi); dw_msi_teardown_irq() local 374 clear_irq_range(pp, irq, 1, data->hwirq); dw_msi_teardown_irq() 383 int dw_pcie_link_up(struct pcie_port *pp) dw_pcie_link_up() argument 385 if (pp->ops->link_up) dw_pcie_link_up() 386 return pp->ops->link_up(pp); dw_pcie_link_up() 404 int dw_pcie_host_init(struct pcie_port *pp) dw_pcie_host_init() argument 406 struct device_node *np = pp->dev->of_node; dw_pcie_host_init() 407 struct platform_device *pdev = to_platform_device(pp->dev); dw_pcie_host_init() 417 pp->cfg0_size = resource_size(cfg_res)/2; dw_pcie_host_init() 418 pp->cfg1_size = resource_size(cfg_res)/2; dw_pcie_host_init() 419 pp->cfg0_base = cfg_res->start; dw_pcie_host_init() 420 pp->cfg1_base = cfg_res->start + pp->cfg0_size; dw_pcie_host_init() 421 } else if (!pp->va_cfg0_base) { dw_pcie_host_init() 422 dev_err(pp->dev, "missing *config* reg space\n"); dw_pcie_host_init() 425 ret = of_pci_get_host_bridge_resources(np, 0, 0xff, &res, &pp->io_base); dw_pcie_host_init() 433 pp->io = win->res; dw_pcie_host_init() 434 pp->io->name = "I/O"; dw_pcie_host_init() 435 pp->io_size = resource_size(pp->io); dw_pcie_host_init() 436 pp->io_bus_addr = pp->io->start - win->offset; dw_pcie_host_init() 437 ret = pci_remap_iospace(pp->io, pp->io_base); dw_pcie_host_init() 439 dev_warn(pp->dev, "error %d: failed to map resource %pR\n", dw_pcie_host_init() 440 ret, pp->io); dw_pcie_host_init() 445 pp->mem = win->res; dw_pcie_host_init() 446 pp->mem->name = "MEM"; dw_pcie_host_init() 447 pp->mem_size = resource_size(pp->mem); dw_pcie_host_init() 448 pp->mem_bus_addr = pp->mem->start - win->offset; dw_pcie_host_init() 451 pp->cfg = win->res; dw_pcie_host_init() 452 pp->cfg0_size = resource_size(pp->cfg)/2; dw_pcie_host_init() 453 pp->cfg1_size = resource_size(pp->cfg)/2; dw_pcie_host_init() 454 pp->cfg0_base = pp->cfg->start; dw_pcie_host_init() 455 pp->cfg1_base = pp->cfg->start + pp->cfg0_size; dw_pcie_host_init() 458 pp->busn = win->res; dw_pcie_host_init() 465 if (!pp->dbi_base) { dw_pcie_host_init() 466 pp->dbi_base = devm_ioremap(pp->dev, pp->cfg->start, dw_pcie_host_init() 467 resource_size(pp->cfg)); dw_pcie_host_init() 468 if (!pp->dbi_base) { dw_pcie_host_init() 469 dev_err(pp->dev, "error with ioremap\n"); dw_pcie_host_init() 474 pp->mem_base = pp->mem->start; dw_pcie_host_init() 476 if (!pp->va_cfg0_base) { dw_pcie_host_init() 477 pp->va_cfg0_base = devm_ioremap(pp->dev, pp->cfg0_base, dw_pcie_host_init() 478 pp->cfg0_size); dw_pcie_host_init() 479 if (!pp->va_cfg0_base) { dw_pcie_host_init() 480 dev_err(pp->dev, "error with ioremap in function\n"); dw_pcie_host_init() 485 if (!pp->va_cfg1_base) { dw_pcie_host_init() 486 pp->va_cfg1_base = devm_ioremap(pp->dev, pp->cfg1_base, dw_pcie_host_init() 487 pp->cfg1_size); dw_pcie_host_init() 488 if (!pp->va_cfg1_base) { dw_pcie_host_init() 489 dev_err(pp->dev, "error with ioremap\n"); dw_pcie_host_init() 494 ret = of_property_read_u32(np, "num-lanes", &pp->lanes); dw_pcie_host_init() 496 pp->lanes = 0; dw_pcie_host_init() 499 if (!pp->ops->msi_host_init) { dw_pcie_host_init() 500 pp->irq_domain = irq_domain_add_linear(pp->dev->of_node, dw_pcie_host_init() 503 if (!pp->irq_domain) { dw_pcie_host_init() 504 dev_err(pp->dev, "irq domain init failed\n"); dw_pcie_host_init() 509 irq_create_mapping(pp->irq_domain, i); dw_pcie_host_init() 511 ret = pp->ops->msi_host_init(pp, &dw_pcie_msi_chip); dw_pcie_host_init() 517 if (pp->ops->host_init) dw_pcie_host_init() 518 pp->ops->host_init(pp); dw_pcie_host_init() 520 if (!pp->ops->rd_other_conf) dw_pcie_host_init() 521 dw_pcie_prog_outbound_atu(pp, PCIE_ATU_REGION_INDEX1, dw_pcie_host_init() 522 PCIE_ATU_TYPE_MEM, pp->mem_base, dw_pcie_host_init() 523 pp->mem_bus_addr, pp->mem_size); dw_pcie_host_init() 525 dw_pcie_wr_own_conf(pp, PCI_BASE_ADDRESS_0, 4, 0); dw_pcie_host_init() 528 dw_pcie_wr_own_conf(pp, PCI_CLASS_DEVICE, 2, PCI_CLASS_BRIDGE_PCI); dw_pcie_host_init() 530 dw_pcie_rd_own_conf(pp, PCIE_LINK_WIDTH_SPEED_CONTROL, 4, &val); dw_pcie_host_init() 532 dw_pcie_wr_own_conf(pp, PCIE_LINK_WIDTH_SPEED_CONTROL, 4, val); dw_pcie_host_init() 534 pp->root_bus_nr = pp->busn->start; dw_pcie_host_init() 536 bus = pci_scan_root_bus_msi(pp->dev, pp->root_bus_nr, dw_pcie_host_init() 537 &dw_pcie_ops, pp, &res, dw_pcie_host_init() 539 dw_pcie_msi_chip.dev = pp->dev; dw_pcie_host_init() 541 bus = pci_scan_root_bus(pp->dev, pp->root_bus_nr, &dw_pcie_ops, dw_pcie_host_init() 542 pp, &res); dw_pcie_host_init() 546 if (pp->ops->scan_bus) dw_pcie_host_init() 547 pp->ops->scan_bus(pp); dw_pcie_host_init() 566 static int dw_pcie_rd_other_conf(struct pcie_port *pp, struct pci_bus *bus, dw_pcie_rd_other_conf() argument 577 if (bus->parent->number == pp->root_bus_nr) { dw_pcie_rd_other_conf() 579 cpu_addr = pp->cfg0_base; dw_pcie_rd_other_conf() 580 cfg_size = pp->cfg0_size; dw_pcie_rd_other_conf() 581 va_cfg_base = pp->va_cfg0_base; dw_pcie_rd_other_conf() 584 cpu_addr = pp->cfg1_base; dw_pcie_rd_other_conf() 585 cfg_size = pp->cfg1_size; dw_pcie_rd_other_conf() 586 va_cfg_base = pp->va_cfg1_base; dw_pcie_rd_other_conf() 589 dw_pcie_prog_outbound_atu(pp, PCIE_ATU_REGION_INDEX0, dw_pcie_rd_other_conf() 593 dw_pcie_prog_outbound_atu(pp, PCIE_ATU_REGION_INDEX0, dw_pcie_rd_other_conf() 594 PCIE_ATU_TYPE_IO, pp->io_base, dw_pcie_rd_other_conf() 595 pp->io_bus_addr, pp->io_size); dw_pcie_rd_other_conf() 600 static int dw_pcie_wr_other_conf(struct pcie_port *pp, struct pci_bus *bus, dw_pcie_wr_other_conf() argument 611 if (bus->parent->number == pp->root_bus_nr) { dw_pcie_wr_other_conf() 613 cpu_addr = pp->cfg0_base; dw_pcie_wr_other_conf() 614 cfg_size = pp->cfg0_size; dw_pcie_wr_other_conf() 615 va_cfg_base = pp->va_cfg0_base; dw_pcie_wr_other_conf() 618 cpu_addr = pp->cfg1_base; dw_pcie_wr_other_conf() 619 cfg_size = pp->cfg1_size; dw_pcie_wr_other_conf() 620 va_cfg_base = pp->va_cfg1_base; dw_pcie_wr_other_conf() 623 dw_pcie_prog_outbound_atu(pp, PCIE_ATU_REGION_INDEX0, dw_pcie_wr_other_conf() 627 dw_pcie_prog_outbound_atu(pp, PCIE_ATU_REGION_INDEX0, dw_pcie_wr_other_conf() 628 PCIE_ATU_TYPE_IO, pp->io_base, dw_pcie_wr_other_conf() 629 pp->io_bus_addr, pp->io_size); dw_pcie_wr_other_conf() 634 static int dw_pcie_valid_config(struct pcie_port *pp, dw_pcie_valid_config() argument 638 if (bus->number != pp->root_bus_nr) { dw_pcie_valid_config() 639 if (!dw_pcie_link_up(pp)) dw_pcie_valid_config() 644 if (bus->number == pp->root_bus_nr && dev > 0) dw_pcie_valid_config() 651 if (bus->primary == pp->root_bus_nr && dev > 0) dw_pcie_valid_config() 660 struct pcie_port *pp = bus->sysdata; dw_pcie_rd_conf() local 663 if (dw_pcie_valid_config(pp, bus, PCI_SLOT(devfn)) == 0) { dw_pcie_rd_conf() 668 if (bus->number != pp->root_bus_nr) dw_pcie_rd_conf() 669 if (pp->ops->rd_other_conf) dw_pcie_rd_conf() 670 ret = pp->ops->rd_other_conf(pp, bus, devfn, dw_pcie_rd_conf() 673 ret = dw_pcie_rd_other_conf(pp, bus, devfn, dw_pcie_rd_conf() 676 ret = dw_pcie_rd_own_conf(pp, where, size, val); dw_pcie_rd_conf() 684 struct pcie_port *pp = bus->sysdata; dw_pcie_wr_conf() local 687 if (dw_pcie_valid_config(pp, bus, PCI_SLOT(devfn)) == 0) dw_pcie_wr_conf() 690 if (bus->number != pp->root_bus_nr) dw_pcie_wr_conf() 691 if (pp->ops->wr_other_conf) dw_pcie_wr_conf() 692 ret = pp->ops->wr_other_conf(pp, bus, devfn, dw_pcie_wr_conf() 695 ret = dw_pcie_wr_other_conf(pp, bus, devfn, dw_pcie_wr_conf() 698 ret = dw_pcie_wr_own_conf(pp, where, size, val); dw_pcie_wr_conf() 708 void dw_pcie_setup_rc(struct pcie_port *pp) dw_pcie_setup_rc() argument 715 dw_pcie_readl_rc(pp, PCIE_PORT_LINK_CONTROL, &val); dw_pcie_setup_rc() 717 switch (pp->lanes) { dw_pcie_setup_rc() 731 dev_err(pp->dev, "num-lanes %u: invalid value\n", pp->lanes); dw_pcie_setup_rc() 734 dw_pcie_writel_rc(pp, val, PCIE_PORT_LINK_CONTROL); dw_pcie_setup_rc() 737 dw_pcie_readl_rc(pp, PCIE_LINK_WIDTH_SPEED_CONTROL, &val); dw_pcie_setup_rc() 739 switch (pp->lanes) { dw_pcie_setup_rc() 753 dw_pcie_writel_rc(pp, val, PCIE_LINK_WIDTH_SPEED_CONTROL); dw_pcie_setup_rc() 756 dw_pcie_writel_rc(pp, 0x00000004, PCI_BASE_ADDRESS_0); dw_pcie_setup_rc() 757 dw_pcie_writel_rc(pp, 0x00000000, PCI_BASE_ADDRESS_1); dw_pcie_setup_rc() 760 dw_pcie_readl_rc(pp, PCI_INTERRUPT_LINE, &val); dw_pcie_setup_rc() 763 dw_pcie_writel_rc(pp, val, PCI_INTERRUPT_LINE); dw_pcie_setup_rc() 766 dw_pcie_readl_rc(pp, PCI_PRIMARY_BUS, &val); dw_pcie_setup_rc() 769 dw_pcie_writel_rc(pp, val, PCI_PRIMARY_BUS); dw_pcie_setup_rc() 772 membase = ((u32)pp->mem_base & 0xfff00000) >> 16; dw_pcie_setup_rc() 773 memlimit = (pp->mem_size + (u32)pp->mem_base) & 0xfff00000; dw_pcie_setup_rc() 775 dw_pcie_writel_rc(pp, val, PCI_MEMORY_BASE); dw_pcie_setup_rc() 778 dw_pcie_readl_rc(pp, PCI_COMMAND, &val); dw_pcie_setup_rc() 782 dw_pcie_writel_rc(pp, val, PCI_COMMAND); dw_pcie_setup_rc()
|
H A D | pcie-designware.h | 55 void (*readl_rc)(struct pcie_port *pp, 57 void (*writel_rc)(struct pcie_port *pp, 59 int (*rd_own_conf)(struct pcie_port *pp, int where, int size, u32 *val); 60 int (*wr_own_conf)(struct pcie_port *pp, int where, int size, u32 val); 61 int (*rd_other_conf)(struct pcie_port *pp, struct pci_bus *bus, 63 int (*wr_other_conf)(struct pcie_port *pp, struct pci_bus *bus, 65 int (*link_up)(struct pcie_port *pp); 66 void (*host_init)(struct pcie_port *pp); 67 void (*msi_set_irq)(struct pcie_port *pp, int irq); 68 void (*msi_clear_irq)(struct pcie_port *pp, int irq); 69 phys_addr_t (*get_msi_addr)(struct pcie_port *pp); 70 u32 (*get_msi_data)(struct pcie_port *pp, int pos); 71 void (*scan_bus)(struct pcie_port *pp); 72 int (*msi_host_init)(struct pcie_port *pp, struct msi_controller *chip); 77 irqreturn_t dw_handle_msi_irq(struct pcie_port *pp); 78 void dw_pcie_msi_init(struct pcie_port *pp); 79 int dw_pcie_link_up(struct pcie_port *pp); 80 void dw_pcie_setup_rc(struct pcie_port *pp); 81 int dw_pcie_host_init(struct pcie_port *pp);
|
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 319 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() 361 if (dw_pcie_link_up(pp)) { exynos_pcie_establish_link() 362 dev_info(pp->dev, "Link up\n"); exynos_pcie_establish_link() 370 dev_info(pp->dev, "PLL Locked: 0x%x\n", val); exynos_pcie_establish_link() 373 exynos_pcie_power_off_phy(pp); exynos_pcie_establish_link() 375 dev_err(pp->dev, "PCIe Link Fail\n"); exynos_pcie_establish_link() 379 static void exynos_pcie_clear_irq_pulse(struct pcie_port *pp) exynos_pcie_clear_irq_pulse() argument 382 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_clear_irq_pulse() 388 static void exynos_pcie_enable_irq_pulse(struct pcie_port *pp) exynos_pcie_enable_irq_pulse() argument 391 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_enable_irq_pulse() 401 struct pcie_port *pp = arg; exynos_pcie_irq_handler() local 403 exynos_pcie_clear_irq_pulse(pp); exynos_pcie_irq_handler() 409 struct pcie_port *pp = arg; exynos_pcie_msi_irq_handler() local 411 return dw_handle_msi_irq(pp); exynos_pcie_msi_irq_handler() 414 static void exynos_pcie_msi_init(struct pcie_port *pp) exynos_pcie_msi_init() argument 417 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_msi_init() 419 dw_pcie_msi_init(pp); exynos_pcie_msi_init() 427 static void exynos_pcie_enable_interrupts(struct pcie_port *pp) exynos_pcie_enable_interrupts() argument 429 exynos_pcie_enable_irq_pulse(pp); exynos_pcie_enable_interrupts() 432 exynos_pcie_msi_init(pp); exynos_pcie_enable_interrupts() 435 static inline void exynos_pcie_readl_rc(struct pcie_port *pp, exynos_pcie_readl_rc() argument 438 exynos_pcie_sideband_dbi_r_mode(pp, true); exynos_pcie_readl_rc() 440 exynos_pcie_sideband_dbi_r_mode(pp, false); exynos_pcie_readl_rc() 443 static inline void exynos_pcie_writel_rc(struct pcie_port *pp, exynos_pcie_writel_rc() argument 446 exynos_pcie_sideband_dbi_w_mode(pp, true); exynos_pcie_writel_rc() 448 exynos_pcie_sideband_dbi_w_mode(pp, false); exynos_pcie_writel_rc() 451 static int exynos_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, exynos_pcie_rd_own_conf() argument 456 exynos_pcie_sideband_dbi_r_mode(pp, true); exynos_pcie_rd_own_conf() 457 ret = dw_pcie_cfg_read(pp->dbi_base + where, size, val); exynos_pcie_rd_own_conf() 458 exynos_pcie_sideband_dbi_r_mode(pp, false); exynos_pcie_rd_own_conf() 462 static int exynos_pcie_wr_own_conf(struct pcie_port *pp, int where, int size, exynos_pcie_wr_own_conf() argument 467 exynos_pcie_sideband_dbi_w_mode(pp, true); exynos_pcie_wr_own_conf() 468 ret = dw_pcie_cfg_write(pp->dbi_base + where, size, val); exynos_pcie_wr_own_conf() 469 exynos_pcie_sideband_dbi_w_mode(pp, false); exynos_pcie_wr_own_conf() 473 static int exynos_pcie_link_up(struct pcie_port *pp) exynos_pcie_link_up() argument 475 struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); exynos_pcie_link_up() 484 static void exynos_pcie_host_init(struct pcie_port *pp) exynos_pcie_host_init() argument 486 exynos_pcie_establish_link(pp); exynos_pcie_host_init() 487 exynos_pcie_enable_interrupts(pp); exynos_pcie_host_init() 499 static int __init exynos_add_pcie_port(struct pcie_port *pp, exynos_add_pcie_port() argument 504 pp->irq = platform_get_irq(pdev, 1); exynos_add_pcie_port() 505 if (!pp->irq) { exynos_add_pcie_port() 509 ret = devm_request_irq(&pdev->dev, pp->irq, exynos_pcie_irq_handler, exynos_add_pcie_port() 510 IRQF_SHARED, "exynos-pcie", pp); exynos_add_pcie_port() 517 pp->msi_irq = platform_get_irq(pdev, 0); exynos_add_pcie_port() 518 if (!pp->msi_irq) { exynos_add_pcie_port() 523 ret = devm_request_irq(&pdev->dev, pp->msi_irq, exynos_add_pcie_port() 526 "exynos-pcie", pp); exynos_add_pcie_port() 533 pp->root_bus_nr = -1; exynos_add_pcie_port() 534 pp->ops = &exynos_pcie_host_ops; exynos_add_pcie_port() 536 ret = dw_pcie_host_init(pp); exynos_add_pcie_port() 548 struct pcie_port *pp; exynos_pcie_probe() local 560 pp = &exynos_pcie->pp; exynos_pcie_probe() 562 pp->dev = &pdev->dev; exynos_pcie_probe() 606 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 149 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, 2, &val); spear13xx_pcie_establish_link() 168 dw_pcie_cfg_write(pp->dbi_base + exp_cap_off + PCI_EXP_DEVCTL, 2, 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, 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, spear13xx_pcie_establish_link() 192 dw_pcie_cfg_write(pp->dbi_base + exp_cap_off + spear13xx_pcie_establish_link() 205 if (dw_pcie_link_up(pp)) { spear13xx_pcie_establish_link() 206 dev_info(pp->dev, "link up\n"); spear13xx_pcie_establish_link() 212 dev_err(pp->dev, "link Fail\n"); spear13xx_pcie_establish_link() 218 struct pcie_port *pp = arg; spear13xx_pcie_irq_handler() local 219 struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pp); spear13xx_pcie_irq_handler() 227 dw_handle_msi_irq(pp); spear13xx_pcie_irq_handler() 235 static void spear13xx_pcie_enable_interrupts(struct pcie_port *pp) spear13xx_pcie_enable_interrupts() argument 237 struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pp); spear13xx_pcie_enable_interrupts() 242 dw_pcie_msi_init(pp); spear13xx_pcie_enable_interrupts() 248 static int spear13xx_pcie_link_up(struct pcie_port *pp) spear13xx_pcie_link_up() argument 250 struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pp); spear13xx_pcie_link_up() 259 static void spear13xx_pcie_host_init(struct pcie_port *pp) spear13xx_pcie_host_init() argument 261 spear13xx_pcie_establish_link(pp); spear13xx_pcie_host_init() 262 spear13xx_pcie_enable_interrupts(pp); spear13xx_pcie_host_init() 270 static int spear13xx_add_pcie_port(struct pcie_port *pp, spear13xx_add_pcie_port() argument 276 pp->irq = platform_get_irq(pdev, 0); spear13xx_add_pcie_port() 277 if (!pp->irq) { spear13xx_add_pcie_port() 281 ret = devm_request_irq(dev, pp->irq, spear13xx_pcie_irq_handler, spear13xx_add_pcie_port() 283 "spear1340-pcie", pp); spear13xx_add_pcie_port() 285 dev_err(dev, "failed to request irq %d\n", pp->irq); spear13xx_add_pcie_port() 289 pp->root_bus_nr = -1; spear13xx_add_pcie_port() 290 pp->ops = &spear13xx_pcie_host_ops; spear13xx_add_pcie_port() 292 ret = dw_pcie_host_init(pp); spear13xx_add_pcie_port() 304 struct pcie_port *pp; spear13xx_pcie_probe() local 337 pp = &spear13xx_pcie->pp; spear13xx_pcie_probe() 339 pp->dev = dev; spear13xx_pcie_probe() 342 pp->dbi_base = devm_ioremap_resource(dev, dbi_base); spear13xx_pcie_probe() 343 if (IS_ERR(pp->dbi_base)) { spear13xx_pcie_probe() 345 ret = PTR_ERR(pp->dbi_base); spear13xx_pcie_probe() 348 spear13xx_pcie->app_base = pp->dbi_base + 0x2000; spear13xx_pcie_probe() 353 ret = spear13xx_add_pcie_port(pp, pdev); spear13xx_pcie_probe()
|
H A D | pci-keystone-dw.c | 59 #define to_keystone_pcie(x) container_of(x, struct keystone_pcie, pp) 68 phys_addr_t ks_dw_pcie_get_msi_addr(struct pcie_port *pp) ks_dw_pcie_get_msi_addr() argument 70 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_get_msi_addr() 77 struct pcie_port *pp = &ks_pcie->pp; ks_dw_pcie_handle_msi_irq() local 90 virq = irq_linear_revmap(pp->irq_domain, vector); ks_dw_pcie_handle_msi_irq() 91 dev_dbg(pp->dev, "irq: bit %d, vector %d, virq %d\n", ks_dw_pcie_handle_msi_irq() 103 struct pcie_port *pp; ks_dw_pcie_msi_irq_ack() local 106 pp = (struct pcie_port *) msi_desc_to_pci_sysdata(msi); ks_dw_pcie_msi_irq_ack() 107 ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_msi_irq_ack() 108 offset = d->irq - irq_linear_revmap(pp->irq_domain, 0); ks_dw_pcie_msi_irq_ack() 116 void ks_dw_pcie_msi_set_irq(struct pcie_port *pp, int irq) ks_dw_pcie_msi_set_irq() argument 119 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_msi_set_irq() 126 void ks_dw_pcie_msi_clear_irq(struct pcie_port *pp, int irq) ks_dw_pcie_msi_clear_irq() argument 129 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_msi_clear_irq() 140 struct pcie_port *pp; ks_dw_pcie_msi_irq_mask() local 144 pp = (struct pcie_port *) msi_desc_to_pci_sysdata(msi); ks_dw_pcie_msi_irq_mask() 145 ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_msi_irq_mask() 146 offset = d->irq - irq_linear_revmap(pp->irq_domain, 0); ks_dw_pcie_msi_irq_mask() 154 ks_dw_pcie_msi_clear_irq(pp, offset); ks_dw_pcie_msi_irq_mask() 161 struct pcie_port *pp; ks_dw_pcie_msi_irq_unmask() local 165 pp = (struct pcie_port *) msi_desc_to_pci_sysdata(msi); ks_dw_pcie_msi_irq_unmask() 166 ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_msi_irq_unmask() 167 offset = d->irq - irq_linear_revmap(pp->irq_domain, 0); ks_dw_pcie_msi_irq_unmask() 175 ks_dw_pcie_msi_set_irq(pp, offset); ks_dw_pcie_msi_irq_unmask() 199 int ks_dw_pcie_msi_host_init(struct pcie_port *pp, struct msi_controller *chip) ks_dw_pcie_msi_host_init() argument 201 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_msi_host_init() 204 pp->irq_domain = irq_domain_add_linear(ks_pcie->msi_intc_np, ks_dw_pcie_msi_host_init() 208 if (!pp->irq_domain) { ks_dw_pcie_msi_host_init() 209 dev_err(pp->dev, "irq domain init failed\n"); ks_dw_pcie_msi_host_init() 214 irq_create_mapping(pp->irq_domain, i); ks_dw_pcie_msi_host_init() 229 struct pcie_port *pp = &ks_pcie->pp; ks_dw_pcie_handle_legacy_irq() local 237 dev_dbg(pp->dev, ": irq: irq_offset %d, virq %d\n", offset, ks_dw_pcie_handle_legacy_irq() 319 struct pcie_port *pp = &ks_pcie->pp; ks_dw_pcie_setup_rc_app_regs() local 320 u32 start = pp->mem->start, end = pp->mem->end; ks_dw_pcie_setup_rc_app_regs() 325 writel(0, pp->dbi_base + PCI_BASE_ADDRESS_0); ks_dw_pcie_setup_rc_app_regs() 326 writel(0, pp->dbi_base + PCI_BASE_ADDRESS_1); ks_dw_pcie_setup_rc_app_regs() 367 struct pcie_port *pp = &ks_pcie->pp; ks_pcie_cfg_setup() local 371 return pp->dbi_base; ks_pcie_cfg_setup() 384 return pp->va_cfg0_base; ks_pcie_cfg_setup() 387 int ks_dw_pcie_rd_other_conf(struct pcie_port *pp, struct pci_bus *bus, ks_dw_pcie_rd_other_conf() argument 390 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_rd_other_conf() 399 int ks_dw_pcie_wr_other_conf(struct pcie_port *pp, struct pci_bus *bus, ks_dw_pcie_wr_other_conf() argument 402 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_wr_other_conf() 416 void ks_dw_pcie_v3_65_scan_bus(struct pcie_port *pp) ks_dw_pcie_v3_65_scan_bus() argument 418 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_dw_pcie_v3_65_scan_bus() 424 writel(1, pp->dbi_base + PCI_BASE_ADDRESS_0); ks_dw_pcie_v3_65_scan_bus() 425 writel(SZ_4K - 1, pp->dbi_base + PCI_BASE_ADDRESS_0); ks_dw_pcie_v3_65_scan_bus() 433 writel(ks_pcie->app.start, pp->dbi_base + PCI_BASE_ADDRESS_0); ks_dw_pcie_v3_65_scan_bus() 439 int ks_dw_pcie_link_up(struct pcie_port *pp) ks_dw_pcie_link_up() argument 441 u32 val = readl(pp->dbi_base + DEBUG0); ks_dw_pcie_link_up() 470 struct pcie_port *pp = &ks_pcie->pp; ks_dw_pcie_host_init() local 471 struct platform_device *pdev = to_platform_device(pp->dev); ks_dw_pcie_host_init() 476 pp->dbi_base = devm_ioremap_resource(pp->dev, res); ks_dw_pcie_host_init() 477 if (IS_ERR(pp->dbi_base)) ks_dw_pcie_host_init() 478 return PTR_ERR(pp->dbi_base); ks_dw_pcie_host_init() 484 pp->va_cfg0_base = pp->dbi_base + SPACE0_REMOTE_CFG_OFFSET; ks_dw_pcie_host_init() 485 pp->va_cfg1_base = pp->va_cfg0_base; ks_dw_pcie_host_init() 489 ks_pcie->va_app_base = devm_ioremap_resource(pp->dev, res); ks_dw_pcie_host_init() 502 dev_err(pp->dev, "Failed to add irq domain for legacy irqs\n"); ks_dw_pcie_host_init() 506 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 phys_addr_t 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 | 72 struct pcie_port pp; member in struct:dra7xx_pcie 75 #define to_dra7xx_pcie(x) container_of((x), struct dra7xx_pcie, pp) 88 static inline u32 dra7xx_pcie_readl_rc(struct pcie_port *pp, u32 offset) dra7xx_pcie_readl_rc() argument 90 return readl(pp->dbi_base + offset); dra7xx_pcie_readl_rc() 93 static inline void dra7xx_pcie_writel_rc(struct pcie_port *pp, u32 offset, dra7xx_pcie_writel_rc() argument 96 writel(value, pp->dbi_base + offset); dra7xx_pcie_writel_rc() 99 static int dra7xx_pcie_link_up(struct pcie_port *pp) dra7xx_pcie_link_up() argument 101 struct dra7xx_pcie *dra7xx = to_dra7xx_pcie(pp); dra7xx_pcie_link_up() 107 static int dra7xx_pcie_establish_link(struct pcie_port *pp) dra7xx_pcie_establish_link() argument 109 struct dra7xx_pcie *dra7xx = to_dra7xx_pcie(pp); dra7xx_pcie_establish_link() 113 if (dw_pcie_link_up(pp)) { dra7xx_pcie_establish_link() 114 dev_err(pp->dev, "link is already up\n"); dra7xx_pcie_establish_link() 123 if (dw_pcie_link_up(pp)) dra7xx_pcie_establish_link() 128 dev_err(pp->dev, "link is not up\n"); dra7xx_pcie_establish_link() 132 static void dra7xx_pcie_enable_interrupts(struct pcie_port *pp) dra7xx_pcie_enable_interrupts() argument 134 struct dra7xx_pcie *dra7xx = to_dra7xx_pcie(pp); dra7xx_pcie_enable_interrupts() 152 static void dra7xx_pcie_host_init(struct pcie_port *pp) dra7xx_pcie_host_init() argument 154 dw_pcie_setup_rc(pp); dra7xx_pcie_host_init() 156 pp->io_base &= DRA7XX_CPU_TO_BUS_ADDR; dra7xx_pcie_host_init() 157 pp->mem_base &= DRA7XX_CPU_TO_BUS_ADDR; dra7xx_pcie_host_init() 158 pp->cfg0_base &= DRA7XX_CPU_TO_BUS_ADDR; dra7xx_pcie_host_init() 159 pp->cfg1_base &= DRA7XX_CPU_TO_BUS_ADDR; dra7xx_pcie_host_init() 161 dra7xx_pcie_establish_link(pp); dra7xx_pcie_host_init() 163 dw_pcie_msi_init(pp); dra7xx_pcie_host_init() 164 dra7xx_pcie_enable_interrupts(pp); dra7xx_pcie_host_init() 185 static int dra7xx_pcie_init_irq_domain(struct pcie_port *pp) dra7xx_pcie_init_irq_domain() argument 187 struct device *dev = pp->dev; dra7xx_pcie_init_irq_domain() 196 pp->irq_domain = irq_domain_add_linear(pcie_intc_node, 4, dra7xx_pcie_init_irq_domain() 197 &intx_domain_ops, pp); dra7xx_pcie_init_irq_domain() 198 if (!pp->irq_domain) { dra7xx_pcie_init_irq_domain() 200 return PTR_ERR(pp->irq_domain); dra7xx_pcie_init_irq_domain() 208 struct pcie_port *pp = arg; dra7xx_pcie_msi_irq_handler() local 209 struct dra7xx_pcie *dra7xx = to_dra7xx_pcie(pp); dra7xx_pcie_msi_irq_handler() 216 dw_handle_msi_irq(pp); dra7xx_pcie_msi_irq_handler() 222 generic_handle_irq(irq_find_mapping(pp->irq_domain, ffs(reg))); dra7xx_pcie_msi_irq_handler() 290 struct pcie_port *pp; dra7xx_add_pcie_port() local 294 pp = &dra7xx->pp; dra7xx_add_pcie_port() 295 pp->dev = dev; dra7xx_add_pcie_port() 296 pp->ops = &dra7xx_pcie_host_ops; dra7xx_add_pcie_port() 298 pp->irq = platform_get_irq(pdev, 1); dra7xx_add_pcie_port() 299 if (pp->irq < 0) { dra7xx_add_pcie_port() 304 ret = devm_request_irq(&pdev->dev, pp->irq, dra7xx_add_pcie_port() 307 "dra7-pcie-msi", pp); dra7xx_add_pcie_port() 314 ret = dra7xx_pcie_init_irq_domain(pp); dra7xx_add_pcie_port() 320 pp->dbi_base = devm_ioremap(dev, res->start, resource_size(res)); dra7xx_add_pcie_port() 321 if (!pp->dbi_base) dra7xx_add_pcie_port() 324 ret = dw_pcie_host_init(pp); dra7xx_add_pcie_port() 458 struct pcie_port *pp = &dra7xx->pp; dra7xx_pcie_remove() local 462 if (pp->irq_domain) dra7xx_pcie_remove() 463 irq_domain_remove(pp->irq_domain); dra7xx_pcie_remove() 478 struct pcie_port *pp = &dra7xx->pp; dra7xx_pcie_suspend() local 482 val = dra7xx_pcie_readl_rc(pp, PCI_COMMAND); dra7xx_pcie_suspend() 484 dra7xx_pcie_writel_rc(pp, PCI_COMMAND, val); dra7xx_pcie_suspend() 492 struct pcie_port *pp = &dra7xx->pp; dra7xx_pcie_resume() local 496 val = dra7xx_pcie_readl_rc(pp, PCI_COMMAND); dra7xx_pcie_resume() 498 dra7xx_pcie_writel_rc(pp, PCI_COMMAND, val); dra7xx_pcie_resume()
|
H A D | pcie-hisi.c | 27 #define to_hisi_pcie(x) container_of(x, struct hisi_pcie, pp) 33 struct pcie_port pp; member in struct:hisi_pcie 48 static int hisi_pcie_cfg_read(struct pcie_port *pp, int where, int size, hisi_pcie_cfg_read() argument 53 struct hisi_pcie *pcie = to_hisi_pcie(pp); hisi_pcie_cfg_read() 73 static int hisi_pcie_cfg_write(struct pcie_port *pp, int where, int size, hisi_pcie_cfg_write() argument 78 struct hisi_pcie *pcie = to_hisi_pcie(pp); hisi_pcie_cfg_write() 99 static int hisi_pcie_link_up(struct pcie_port *pp) hisi_pcie_link_up() argument 102 struct hisi_pcie *hisi_pcie = to_hisi_pcie(pp); hisi_pcie_link_up() 116 static int hisi_add_pcie_port(struct pcie_port *pp, hisi_add_pcie_port() argument 121 struct hisi_pcie *hisi_pcie = to_hisi_pcie(pp); hisi_add_pcie_port() 133 pp->ops = &hisi_pcie_host_ops; hisi_add_pcie_port() 135 ret = dw_pcie_host_init(pp); hisi_add_pcie_port() 147 struct pcie_port *pp; hisi_pcie_probe() local 155 pp = &hisi_pcie->pp; hisi_pcie_probe() 156 pp->dev = &pdev->dev; hisi_pcie_probe() 161 dev_err(pp->dev, "cannot get subctrl base\n"); hisi_pcie_probe() 168 dev_err(pp->dev, "cannot get rc_dbi base\n"); hisi_pcie_probe() 172 hisi_pcie->pp.dbi_base = hisi_pcie->reg_base; hisi_pcie_probe() 174 ret = hisi_add_pcie_port(pp, pdev); hisi_pcie_probe() 180 dev_warn(pp->dev, "only 32-bit config accesses supported; smaller writes may corrupt adjacent RW1C fields\n"); hisi_pcie_probe()
|
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 212 static int imx6_pcie_assert_core_reset(struct pcie_port *pp) imx6_pcie_assert_core_reset() argument 214 struct imx6_pcie *imx6_pcie = to_imx6_pcie(pp); imx6_pcie_assert_core_reset() 233 val = readl(pp->dbi_base + PCIE_PL_PFLR); imx6_pcie_assert_core_reset() 236 writel(val, pp->dbi_base + PCIE_PL_PFLR); imx6_pcie_assert_core_reset() 250 static int imx6_pcie_deassert_core_reset(struct pcie_port *pp) imx6_pcie_deassert_core_reset() argument 252 struct imx6_pcie *imx6_pcie = to_imx6_pcie(pp); imx6_pcie_deassert_core_reset() 257 dev_err(pp->dev, "unable to enable pcie_phy clock\n"); imx6_pcie_deassert_core_reset() 263 dev_err(pp->dev, "unable to enable pcie_bus clock\n"); imx6_pcie_deassert_core_reset() 269 dev_err(pp->dev, "unable to enable pcie clock\n"); imx6_pcie_deassert_core_reset() 306 static void imx6_pcie_init_phy(struct pcie_port *pp) imx6_pcie_init_phy() argument 308 struct imx6_pcie *imx6_pcie = to_imx6_pcie(pp); imx6_pcie_init_phy() 331 static int imx6_pcie_wait_for_link(struct pcie_port *pp) imx6_pcie_wait_for_link() argument 336 if (dw_pcie_link_up(pp)) imx6_pcie_wait_for_link() 341 dev_err(pp->dev, "phy link never came up\n"); imx6_pcie_wait_for_link() 342 dev_dbg(pp->dev, "DEBUG_R0: 0x%08x, DEBUG_R1: 0x%08x\n", imx6_pcie_wait_for_link() 343 readl(pp->dbi_base + PCIE_PHY_DEBUG_R0), imx6_pcie_wait_for_link() 344 readl(pp->dbi_base + PCIE_PHY_DEBUG_R1)); imx6_pcie_wait_for_link() 348 static int imx6_pcie_wait_for_speed_change(struct pcie_port *pp) imx6_pcie_wait_for_speed_change() argument 354 tmp = readl(pp->dbi_base + PCIE_LINK_WIDTH_SPEED_CONTROL); imx6_pcie_wait_for_speed_change() 361 dev_err(pp->dev, "Speed change timeout\n"); imx6_pcie_wait_for_speed_change() 367 struct pcie_port *pp = arg; imx6_pcie_msi_handler() local 369 return dw_handle_msi_irq(pp); imx6_pcie_msi_handler() 372 static int imx6_pcie_establish_link(struct pcie_port *pp) imx6_pcie_establish_link() argument 374 struct imx6_pcie *imx6_pcie = to_imx6_pcie(pp); imx6_pcie_establish_link() 383 tmp = readl(pp->dbi_base + PCIE_RC_LCR); imx6_pcie_establish_link() 386 writel(tmp, pp->dbi_base + PCIE_RC_LCR); imx6_pcie_establish_link() 392 ret = imx6_pcie_wait_for_link(pp); imx6_pcie_establish_link() 397 tmp = readl(pp->dbi_base + PCIE_RC_LCR); imx6_pcie_establish_link() 400 writel(tmp, pp->dbi_base + PCIE_RC_LCR); imx6_pcie_establish_link() 406 tmp = readl(pp->dbi_base + PCIE_LINK_WIDTH_SPEED_CONTROL); imx6_pcie_establish_link() 408 writel(tmp, pp->dbi_base + PCIE_LINK_WIDTH_SPEED_CONTROL); imx6_pcie_establish_link() 410 ret = imx6_pcie_wait_for_speed_change(pp); imx6_pcie_establish_link() 412 dev_err(pp->dev, "Failed to bring link up!\n"); imx6_pcie_establish_link() 417 ret = imx6_pcie_wait_for_link(pp); imx6_pcie_establish_link() 419 dev_err(pp->dev, "Failed to bring link up!\n"); imx6_pcie_establish_link() 423 tmp = readl(pp->dbi_base + PCIE_RC_LCSR); imx6_pcie_establish_link() 424 dev_dbg(pp->dev, "Link up, Gen=%i\n", (tmp >> 16) & 0xf); imx6_pcie_establish_link() 428 static void imx6_pcie_host_init(struct pcie_port *pp) imx6_pcie_host_init() argument 430 imx6_pcie_assert_core_reset(pp); imx6_pcie_host_init() 432 imx6_pcie_init_phy(pp); imx6_pcie_host_init() 434 imx6_pcie_deassert_core_reset(pp); imx6_pcie_host_init() 436 dw_pcie_setup_rc(pp); imx6_pcie_host_init() 438 imx6_pcie_establish_link(pp); imx6_pcie_host_init() 441 dw_pcie_msi_init(pp); imx6_pcie_host_init() 444 static void imx6_pcie_reset_phy(struct pcie_port *pp) imx6_pcie_reset_phy() argument 448 pcie_phy_read(pp->dbi_base, PHY_RX_OVRD_IN_LO, &tmp); imx6_pcie_reset_phy() 451 pcie_phy_write(pp->dbi_base, PHY_RX_OVRD_IN_LO, tmp); imx6_pcie_reset_phy() 455 pcie_phy_read(pp->dbi_base, PHY_RX_OVRD_IN_LO, &tmp); imx6_pcie_reset_phy() 458 pcie_phy_write(pp->dbi_base, PHY_RX_OVRD_IN_LO, tmp); imx6_pcie_reset_phy() 461 static int imx6_pcie_link_up(struct pcie_port *pp) imx6_pcie_link_up() argument 483 rc = readl(pp->dbi_base + PCIE_PHY_DEBUG_R1); imx6_pcie_link_up() 490 dev_dbg(pp->dev, "Link is up, but still in training\n"); imx6_pcie_link_up() 504 pcie_phy_read(pp->dbi_base, PCIE_PHY_RX_ASIC_OUT, &rx_valid); imx6_pcie_link_up() 505 debug_r0 = readl(pp->dbi_base + PCIE_PHY_DEBUG_R0); imx6_pcie_link_up() 513 dev_err(pp->dev, "transition to gen2 is stuck, reset PHY!\n"); imx6_pcie_link_up() 514 dev_dbg(pp->dev, "debug_r0=%08x debug_r1=%08x\n", debug_r0, rc); imx6_pcie_link_up() 516 imx6_pcie_reset_phy(pp); imx6_pcie_link_up() 526 static int __init imx6_add_pcie_port(struct pcie_port *pp, imx6_add_pcie_port() argument 532 pp->msi_irq = platform_get_irq_byname(pdev, "msi"); imx6_add_pcie_port() 533 if (pp->msi_irq <= 0) { imx6_add_pcie_port() 538 ret = devm_request_irq(&pdev->dev, pp->msi_irq, imx6_add_pcie_port() 541 "mx6-pcie-msi", pp); imx6_add_pcie_port() 548 pp->root_bus_nr = -1; imx6_add_pcie_port() 549 pp->ops = &imx6_pcie_host_ops; imx6_add_pcie_port() 551 ret = dw_pcie_host_init(pp); imx6_add_pcie_port() 563 struct pcie_port *pp; imx6_pcie_probe() local 572 pp = &imx6_pcie->pp; imx6_pcie_probe() 573 pp->dev = &pdev->dev; imx6_pcie_probe() 580 pp->dbi_base = devm_ioremap_resource(&pdev->dev, dbi_base); imx6_pcie_probe() 581 if (IS_ERR(pp->dbi_base)) imx6_pcie_probe() 582 return PTR_ERR(pp->dbi_base); imx6_pcie_probe() 625 ret = imx6_add_pcie_port(pp, pdev); imx6_pcie_probe() 638 imx6_pcie_assert_core_reset(&imx6_pcie->pp); imx6_pcie_shutdown()
|
H A D | pci-layerscape.c | 51 struct pcie_port pp; member in struct:ls_pcie 56 #define to_ls_pcie(x) container_of(x, struct ls_pcie, pp) 80 static int ls1021_pcie_link_up(struct pcie_port *pp) ls1021_pcie_link_up() argument 83 struct ls_pcie *pcie = to_ls_pcie(pp); ls1021_pcie_link_up() 97 static void ls1021_pcie_host_init(struct pcie_port *pp) ls1021_pcie_host_init() argument 99 struct ls_pcie *pcie = to_ls_pcie(pp); ls1021_pcie_host_init() 102 pcie->scfg = syscon_regmap_lookup_by_phandle(pp->dev->of_node, ls1021_pcie_host_init() 105 dev_err(pp->dev, "No syscfg phandle specified\n"); ls1021_pcie_host_init() 110 if (of_property_read_u32_array(pp->dev->of_node, ls1021_pcie_host_init() 117 dw_pcie_setup_rc(pp); ls1021_pcie_host_init() 128 static int ls_pcie_link_up(struct pcie_port *pp) ls_pcie_link_up() argument 130 struct ls_pcie *pcie = to_ls_pcie(pp); ls_pcie_link_up() 143 static void ls_pcie_host_init(struct pcie_port *pp) ls_pcie_host_init() argument 145 struct ls_pcie *pcie = to_ls_pcie(pp); ls_pcie_host_init() 153 static int ls_pcie_msi_host_init(struct pcie_port *pp, ls_pcie_msi_host_init() argument 157 struct device_node *np = pp->dev->of_node; ls_pcie_msi_host_init() 167 dev_err(pp->dev, "failed to find msi-parent\n"); ls_pcie_msi_host_init() 210 static int __init ls_add_pcie_port(struct pcie_port *pp, ls_add_pcie_port() argument 214 struct ls_pcie *pcie = to_ls_pcie(pp); ls_add_pcie_port() 216 pp->dev = &pdev->dev; ls_add_pcie_port() 217 pp->dbi_base = pcie->dbi; ls_add_pcie_port() 218 pp->ops = pcie->drvdata->ops; ls_add_pcie_port() 220 ret = dw_pcie_host_init(pp); ls_add_pcie_port() 222 dev_err(pp->dev, "failed to initialize host\n"); ls_add_pcie_port() 257 ret = ls_add_pcie_port(&pcie->pp, pdev); ls_pcie_probe()
|
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() 103 if (dw_pcie_link_up(pp)) ks_pcie_establish_link() 109 dev_err(pp->dev, "phy link never came up\n"); ks_pcie_establish_link() 118 struct pcie_port *pp = &ks_pcie->pp; ks_pcie_msi_irq_handler() local 121 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() 253 static void __init ks_pcie_host_init(struct pcie_port *pp) ks_pcie_host_init() argument 255 struct keystone_pcie *ks_pcie = to_keystone_pcie(pp); ks_pcie_host_init() 262 pp->dbi_base + PCI_IO_BASE); ks_pcie_host_init() 265 writew(ks_pcie->device_id, pp->dbi_base + PCI_DEVICE_ID); ks_pcie_host_init() 268 val = readl(pp->dbi_base + PCIE_CAP_BASE + PCI_EXP_DEVCTL); ks_pcie_host_init() 272 writel(val, pp->dbi_base + PCIE_CAP_BASE + PCI_EXP_DEVCTL); ks_pcie_host_init() 297 struct pcie_port *pp = &ks_pcie->pp; ks_add_pcie_port() local 314 pp->root_bus_nr = -1; ks_add_pcie_port() 315 pp->ops = &keystone_pcie_host_ops; ks_add_pcie_port() 347 struct pcie_port *pp; ks_pcie_probe() local 358 pp = &ks_pcie->pp; ks_pcie_probe() 377 pp->dev = dev; ks_pcie_probe()
|
/linux-4.4.14/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.4.14/drivers/net/ethernet/marvell/ |
H A D | mvneta.c | 339 struct mvneta_port *pp; member in struct:mvneta_pcpu_port 546 static void mvreg_write(struct mvneta_port *pp, u32 offset, u32 data) mvreg_write() argument 548 writel(data, pp->base + offset); mvreg_write() 552 static u32 mvreg_read(struct mvneta_port *pp, u32 offset) mvreg_read() argument 554 return readl(pp->base + offset); mvreg_read() 575 static void mvneta_mib_counters_clear(struct mvneta_port *pp) mvneta_mib_counters_clear() argument 582 dummy = mvreg_read(pp, (MVNETA_MIB_COUNTERS_BASE + i)); mvneta_mib_counters_clear() 583 dummy = mvreg_read(pp, MVNETA_RX_DISCARD_FRAME_COUNT); mvneta_mib_counters_clear() 584 dummy = mvreg_read(pp, MVNETA_OVERRUN_FRAME_COUNT); mvneta_mib_counters_clear() 591 struct mvneta_port *pp = netdev_priv(dev); mvneta_get_stats64() local 602 cpu_stats = per_cpu_ptr(pp->stats, cpu); for_each_possible_cpu() 639 static void mvneta_rxq_non_occup_desc_add(struct mvneta_port *pp, mvneta_rxq_non_occup_desc_add() argument 647 mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id), mvneta_rxq_non_occup_desc_add() 653 mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id), mvneta_rxq_non_occup_desc_add() 658 static int mvneta_rxq_busy_desc_num_get(struct mvneta_port *pp, mvneta_rxq_busy_desc_num_get() argument 663 val = mvreg_read(pp, MVNETA_RXQ_STATUS_REG(rxq->id)); mvneta_rxq_busy_desc_num_get() 670 static void mvneta_rxq_desc_num_update(struct mvneta_port *pp, mvneta_rxq_desc_num_update() argument 679 mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id), val); mvneta_rxq_desc_num_update() 699 mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id), val); mvneta_rxq_desc_num_update() 715 static void mvneta_max_rx_size_set(struct mvneta_port *pp, int max_rx_size) mvneta_max_rx_size_set() argument 719 val = mvreg_read(pp, MVNETA_GMAC_CTRL_0); mvneta_max_rx_size_set() 723 mvreg_write(pp, MVNETA_GMAC_CTRL_0, val); mvneta_max_rx_size_set() 728 static void mvneta_rxq_offset_set(struct mvneta_port *pp, mvneta_rxq_offset_set() argument 734 val = mvreg_read(pp, MVNETA_RXQ_CONFIG_REG(rxq->id)); mvneta_rxq_offset_set() 739 mvreg_write(pp, MVNETA_RXQ_CONFIG_REG(rxq->id), val); mvneta_rxq_offset_set() 746 static void mvneta_txq_pend_desc_add(struct mvneta_port *pp, mvneta_txq_pend_desc_add() argument 756 mvreg_write(pp, MVNETA_TXQ_UPDATE_REG(txq->id), val); mvneta_txq_pend_desc_add() 781 static void mvneta_rxq_buf_size_set(struct mvneta_port *pp, mvneta_rxq_buf_size_set() argument 787 val = mvreg_read(pp, MVNETA_RXQ_SIZE_REG(rxq->id)); mvneta_rxq_buf_size_set() 792 mvreg_write(pp, MVNETA_RXQ_SIZE_REG(rxq->id), val); mvneta_rxq_buf_size_set() 796 static void mvneta_rxq_bm_disable(struct mvneta_port *pp, mvneta_rxq_bm_disable() argument 801 val = mvreg_read(pp, MVNETA_RXQ_CONFIG_REG(rxq->id)); mvneta_rxq_bm_disable() 803 mvreg_write(pp, MVNETA_RXQ_CONFIG_REG(rxq->id), val); mvneta_rxq_bm_disable() 807 static void mvneta_port_up(struct mvneta_port *pp) mvneta_port_up() argument 815 struct mvneta_tx_queue *txq = &pp->txqs[queue]; mvneta_port_up() 819 mvreg_write(pp, MVNETA_TXQ_CMD, q_map); mvneta_port_up() 822 mvreg_write(pp, MVNETA_RXQ_CMD, BIT(rxq_def)); mvneta_port_up() 826 static void mvneta_port_down(struct mvneta_port *pp) mvneta_port_down() argument 832 val = mvreg_read(pp, MVNETA_RXQ_CMD) & MVNETA_RXQ_ENABLE_MASK; mvneta_port_down() 836 mvreg_write(pp, MVNETA_RXQ_CMD, mvneta_port_down() 843 netdev_warn(pp->dev, mvneta_port_down() 850 val = mvreg_read(pp, MVNETA_RXQ_CMD); mvneta_port_down() 856 val = (mvreg_read(pp, MVNETA_TXQ_CMD)) & MVNETA_TXQ_ENABLE_MASK; mvneta_port_down() 859 mvreg_write(pp, MVNETA_TXQ_CMD, mvneta_port_down() 866 netdev_warn(pp->dev, mvneta_port_down() 874 val = mvreg_read(pp, MVNETA_TXQ_CMD); mvneta_port_down() 882 netdev_warn(pp->dev, mvneta_port_down() 889 val = mvreg_read(pp, MVNETA_PORT_STATUS); mvneta_port_down() 897 static void mvneta_port_enable(struct mvneta_port *pp) mvneta_port_enable() argument 902 val = mvreg_read(pp, MVNETA_GMAC_CTRL_0); mvneta_port_enable() 904 mvreg_write(pp, MVNETA_GMAC_CTRL_0, val); mvneta_port_enable() 908 static void mvneta_port_disable(struct mvneta_port *pp) mvneta_port_disable() argument 913 val = mvreg_read(pp, MVNETA_GMAC_CTRL_0); mvneta_port_disable() 915 mvreg_write(pp, MVNETA_GMAC_CTRL_0, val); mvneta_port_disable() 923 static void mvneta_set_ucast_table(struct mvneta_port *pp, int queue) mvneta_set_ucast_table() argument 936 mvreg_write(pp, MVNETA_DA_FILT_UCAST_BASE + offset, val); mvneta_set_ucast_table() 940 static void mvneta_set_special_mcast_table(struct mvneta_port *pp, int queue) mvneta_set_special_mcast_table() argument 953 mvreg_write(pp, MVNETA_DA_FILT_SPEC_MCAST + offset, val); mvneta_set_special_mcast_table() 958 static void mvneta_set_other_mcast_table(struct mvneta_port *pp, int queue) mvneta_set_other_mcast_table() argument 964 memset(pp->mcast_count, 0, sizeof(pp->mcast_count)); mvneta_set_other_mcast_table() 967 memset(pp->mcast_count, 1, sizeof(pp->mcast_count)); mvneta_set_other_mcast_table() 973 mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + offset, val); mvneta_set_other_mcast_table() 985 static void mvneta_defaults_set(struct mvneta_port *pp) mvneta_defaults_set() argument 992 mvreg_write(pp, MVNETA_INTR_NEW_CAUSE, 0); mvneta_defaults_set() 993 mvreg_write(pp, MVNETA_INTR_OLD_CAUSE, 0); mvneta_defaults_set() 994 mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0); mvneta_defaults_set() 997 mvreg_write(pp, MVNETA_INTR_NEW_MASK, 0); mvneta_defaults_set() 998 mvreg_write(pp, MVNETA_INTR_OLD_MASK, 0); mvneta_defaults_set() 999 mvreg_write(pp, MVNETA_INTR_MISC_MASK, 0); mvneta_defaults_set() 1000 mvreg_write(pp, MVNETA_INTR_ENABLE, 0); mvneta_defaults_set() 1003 mvreg_write(pp, MVNETA_MBUS_RETRY, 0x20); mvneta_defaults_set() 1009 mvreg_write(pp, MVNETA_CPU_MAP(cpu), mvneta_defaults_set() 1014 mvreg_write(pp, MVNETA_PORT_RX_RESET, MVNETA_PORT_RX_DMA_RESET); mvneta_defaults_set() 1015 mvreg_write(pp, MVNETA_PORT_TX_RESET, MVNETA_PORT_TX_DMA_RESET); mvneta_defaults_set() 1018 mvreg_write(pp, MVNETA_TXQ_CMD_1, 0); mvneta_defaults_set() 1020 mvreg_write(pp, MVETH_TXQ_TOKEN_COUNT_REG(queue), 0); mvneta_defaults_set() 1021 mvreg_write(pp, MVETH_TXQ_TOKEN_CFG_REG(queue), 0); mvneta_defaults_set() 1024 mvreg_write(pp, MVNETA_PORT_TX_RESET, 0); mvneta_defaults_set() 1025 mvreg_write(pp, MVNETA_PORT_RX_RESET, 0); mvneta_defaults_set() 1029 mvreg_write(pp, MVNETA_ACC_MODE, val); mvneta_defaults_set() 1033 mvreg_write(pp, MVNETA_PORT_CONFIG, val); mvneta_defaults_set() 1036 mvreg_write(pp, MVNETA_PORT_CONFIG_EXTEND, val); mvneta_defaults_set() 1037 mvreg_write(pp, MVNETA_RX_MIN_FRAME_SIZE, 64); mvneta_defaults_set() 1052 mvreg_write(pp, MVNETA_SDMA_CONFIG, val); mvneta_defaults_set() 1057 val = mvreg_read(pp, MVNETA_UNIT_CONTROL); mvneta_defaults_set() 1059 mvreg_write(pp, MVNETA_UNIT_CONTROL, val); mvneta_defaults_set() 1061 if (pp->use_inband_status) { mvneta_defaults_set() 1062 val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG); mvneta_defaults_set() 1069 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); mvneta_defaults_set() 1070 val = mvreg_read(pp, MVNETA_GMAC_CLOCK_DIVIDER); mvneta_defaults_set() 1072 mvreg_write(pp, MVNETA_GMAC_CLOCK_DIVIDER, val); mvneta_defaults_set() 1074 val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG); mvneta_defaults_set() 1078 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); mvneta_defaults_set() 1081 mvneta_set_ucast_table(pp, -1); mvneta_defaults_set() 1082 mvneta_set_special_mcast_table(pp, -1); mvneta_defaults_set() 1083 mvneta_set_other_mcast_table(pp, -1); mvneta_defaults_set() 1086 mvreg_write(pp, MVNETA_INTR_ENABLE, mvneta_defaults_set() 1090 mvneta_mib_counters_clear(pp); mvneta_defaults_set() 1094 static void mvneta_txq_max_tx_size_set(struct mvneta_port *pp, int max_tx_size) mvneta_txq_max_tx_size_set() argument 1105 val = mvreg_read(pp, MVNETA_TX_MTU); mvneta_txq_max_tx_size_set() 1108 mvreg_write(pp, MVNETA_TX_MTU, val); mvneta_txq_max_tx_size_set() 1111 val = mvreg_read(pp, MVNETA_TX_TOKEN_SIZE); mvneta_txq_max_tx_size_set() 1118 mvreg_write(pp, MVNETA_TX_TOKEN_SIZE, val); mvneta_txq_max_tx_size_set() 1121 val = mvreg_read(pp, MVNETA_TXQ_TOKEN_SIZE_REG(queue)); mvneta_txq_max_tx_size_set() 1128 mvreg_write(pp, MVNETA_TXQ_TOKEN_SIZE_REG(queue), val); mvneta_txq_max_tx_size_set() 1134 static void mvneta_set_ucast_addr(struct mvneta_port *pp, u8 last_nibble, mvneta_set_ucast_addr() argument 1150 unicast_reg = mvreg_read(pp, (MVNETA_DA_FILT_UCAST_BASE + tbl_offset)); mvneta_set_ucast_addr() 1160 mvreg_write(pp, (MVNETA_DA_FILT_UCAST_BASE + tbl_offset), unicast_reg); mvneta_set_ucast_addr() 1164 static void mvneta_mac_addr_set(struct mvneta_port *pp, unsigned char *addr, mvneta_mac_addr_set() argument 1175 mvreg_write(pp, MVNETA_MAC_ADDR_LOW, mac_l); mvneta_mac_addr_set() 1176 mvreg_write(pp, MVNETA_MAC_ADDR_HIGH, mac_h); mvneta_mac_addr_set() 1180 mvneta_set_ucast_addr(pp, addr[5], queue); mvneta_mac_addr_set() 1186 static void mvneta_rx_pkts_coal_set(struct mvneta_port *pp, mvneta_rx_pkts_coal_set() argument 1189 mvreg_write(pp, MVNETA_RXQ_THRESHOLD_REG(rxq->id), mvneta_rx_pkts_coal_set() 1197 static void mvneta_rx_time_coal_set(struct mvneta_port *pp, mvneta_rx_time_coal_set() argument 1203 clk_rate = clk_get_rate(pp->clk); mvneta_rx_time_coal_set() 1206 mvreg_write(pp, MVNETA_RXQ_TIME_COAL_REG(rxq->id), val); mvneta_rx_time_coal_set() 1211 static void mvneta_tx_done_pkts_coal_set(struct mvneta_port *pp, mvneta_tx_done_pkts_coal_set() argument 1216 val = mvreg_read(pp, MVNETA_TXQ_SIZE_REG(txq->id)); mvneta_tx_done_pkts_coal_set() 1221 mvreg_write(pp, MVNETA_TXQ_SIZE_REG(txq->id), val); mvneta_tx_done_pkts_coal_set() 1235 static void mvneta_txq_sent_desc_dec(struct mvneta_port *pp, mvneta_txq_sent_desc_dec() argument 1244 mvreg_write(pp, MVNETA_TXQ_UPDATE_REG(txq->id), val); mvneta_txq_sent_desc_dec() 1249 mvreg_write(pp, MVNETA_TXQ_UPDATE_REG(txq->id), val); mvneta_txq_sent_desc_dec() 1253 static int mvneta_txq_sent_desc_num_get(struct mvneta_port *pp, mvneta_txq_sent_desc_num_get() argument 1259 val = mvreg_read(pp, MVNETA_TXQ_STATUS_REG(txq->id)); mvneta_txq_sent_desc_num_get() 1269 static int mvneta_txq_sent_desc_proc(struct mvneta_port *pp, mvneta_txq_sent_desc_proc() argument 1275 sent_desc = mvneta_txq_sent_desc_num_get(pp, txq); mvneta_txq_sent_desc_proc() 1279 mvneta_txq_sent_desc_dec(pp, txq, sent_desc); mvneta_txq_sent_desc_proc() 1314 static void mvneta_rx_error(struct mvneta_port *pp, mvneta_rx_error() argument 1320 netdev_err(pp->dev, mvneta_rx_error() 1328 netdev_err(pp->dev, "bad rx status %08x (crc error), size=%d\n", mvneta_rx_error() 1332 netdev_err(pp->dev, "bad rx status %08x (overrun error), size=%d\n", mvneta_rx_error() 1336 netdev_err(pp->dev, "bad rx status %08x (max frame length error), size=%d\n", mvneta_rx_error() 1340 netdev_err(pp->dev, "bad rx status %08x (resource error), size=%d\n", mvneta_rx_error() 1347 static void mvneta_rx_csum(struct mvneta_port *pp, u32 status, mvneta_rx_csum() argument 1364 static struct mvneta_tx_queue *mvneta_tx_done_policy(struct mvneta_port *pp, mvneta_tx_done_policy() argument 1369 return &pp->txqs[queue]; mvneta_tx_done_policy() 1373 static void mvneta_txq_bufs_free(struct mvneta_port *pp, mvneta_txq_bufs_free() argument 1386 dma_unmap_single(pp->dev->dev.parent, mvneta_txq_bufs_free() 1396 static void mvneta_txq_done(struct mvneta_port *pp, mvneta_txq_done() argument 1399 struct netdev_queue *nq = netdev_get_tx_queue(pp->dev, txq->id); mvneta_txq_done() 1402 tx_done = mvneta_txq_sent_desc_proc(pp, txq); mvneta_txq_done() 1406 mvneta_txq_bufs_free(pp, txq, tx_done); mvneta_txq_done() 1416 static void *mvneta_frag_alloc(const struct mvneta_port *pp) mvneta_frag_alloc() argument 1418 if (likely(pp->frag_size <= PAGE_SIZE)) mvneta_frag_alloc() 1419 return netdev_alloc_frag(pp->frag_size); mvneta_frag_alloc() 1421 return kmalloc(pp->frag_size, GFP_ATOMIC); mvneta_frag_alloc() 1424 static void mvneta_frag_free(const struct mvneta_port *pp, void *data) mvneta_frag_free() argument 1426 if (likely(pp->frag_size <= PAGE_SIZE)) mvneta_frag_free() 1433 static int mvneta_rx_refill(struct mvneta_port *pp, mvneta_rx_refill() argument 1440 data = mvneta_frag_alloc(pp); mvneta_rx_refill() 1444 phys_addr = dma_map_single(pp->dev->dev.parent, data, mvneta_rx_refill() 1445 MVNETA_RX_BUF_SIZE(pp->pkt_size), mvneta_rx_refill() 1447 if (unlikely(dma_mapping_error(pp->dev->dev.parent, phys_addr))) { mvneta_rx_refill() 1448 mvneta_frag_free(pp, data); mvneta_rx_refill() 1457 static u32 mvneta_skb_tx_csum(struct mvneta_port *pp, struct sk_buff *skb) mvneta_skb_tx_csum() argument 1488 static void mvneta_rxq_drop_pkts(struct mvneta_port *pp, mvneta_rxq_drop_pkts() argument 1493 rx_done = mvneta_rxq_busy_desc_num_get(pp, rxq); mvneta_rxq_drop_pkts() 1498 dma_unmap_single(pp->dev->dev.parent, rx_desc->buf_phys_addr, mvneta_rxq_drop_pkts() 1499 MVNETA_RX_BUF_SIZE(pp->pkt_size), DMA_FROM_DEVICE); mvneta_rxq_drop_pkts() 1500 mvneta_frag_free(pp, data); mvneta_rxq_drop_pkts() 1504 mvneta_rxq_desc_num_update(pp, rxq, rx_done, rx_done); mvneta_rxq_drop_pkts() 1508 static int mvneta_rx(struct mvneta_port *pp, int rx_todo, mvneta_rx() argument 1511 struct mvneta_pcpu_port *port = this_cpu_ptr(pp->ports); mvneta_rx() 1512 struct net_device *dev = pp->dev; mvneta_rx() 1518 rx_done = mvneta_rxq_busy_desc_num_get(pp, rxq); mvneta_rx() 1544 mvneta_rx_error(pp, rx_desc); mvneta_rx() 1565 mvneta_rx_csum(pp, rx_status, skb); mvneta_rx() 1576 err = mvneta_rx_refill(pp, rx_desc); mvneta_rx() 1583 skb = build_skb(data, pp->frag_size > PAGE_SIZE ? 0 : pp->frag_size); mvneta_rx() 1589 MVNETA_RX_BUF_SIZE(pp->pkt_size), DMA_FROM_DEVICE); mvneta_rx() 1603 mvneta_rx_csum(pp, rx_status, skb); mvneta_rx() 1609 struct mvneta_pcpu_stats *stats = this_cpu_ptr(pp->stats); mvneta_rx() 1618 mvneta_rxq_desc_num_update(pp, rxq, rx_done, rx_done); mvneta_rx() 1625 struct mvneta_port *pp, struct mvneta_tx_queue *txq) mvneta_tso_put_hdr() 1633 tx_desc->command = mvneta_skb_tx_csum(pp, skb); mvneta_tso_put_hdr() 1677 struct mvneta_port *pp = netdev_priv(dev); mvneta_tx_tso() local 1706 mvneta_tso_put_hdr(skb, pp, txq); mvneta_tx_tso() 1734 dma_unmap_single(pp->dev->dev.parent, mvneta_tx_tso() 1744 static int mvneta_tx_frag_process(struct mvneta_port *pp, struct sk_buff *skb, mvneta_tx_frag_process() argument 1758 dma_map_single(pp->dev->dev.parent, addr, mvneta_tx_frag_process() 1761 if (dma_mapping_error(pp->dev->dev.parent, mvneta_tx_frag_process() 1787 dma_unmap_single(pp->dev->dev.parent, mvneta_tx_frag_process() 1800 struct mvneta_port *pp = netdev_priv(dev); mvneta_tx() local 1802 struct mvneta_tx_queue *txq = &pp->txqs[txq_id]; mvneta_tx() 1821 tx_cmd = mvneta_skb_tx_csum(pp, skb); mvneta_tx() 1848 if (mvneta_tx_frag_process(pp, skb, txq)) { mvneta_tx() 1861 struct mvneta_pcpu_stats *stats = this_cpu_ptr(pp->stats); mvneta_tx() 1865 mvneta_txq_pend_desc_add(pp, txq, frags); mvneta_tx() 1884 static void mvneta_txq_done_force(struct mvneta_port *pp, mvneta_txq_done_force() argument 1890 mvneta_txq_bufs_free(pp, txq, tx_done); mvneta_txq_done_force() 1901 static void mvneta_tx_done_gbe(struct mvneta_port *pp, u32 cause_tx_done) mvneta_tx_done_gbe() argument 1907 txq = mvneta_tx_done_policy(pp, cause_tx_done); mvneta_tx_done_gbe() 1909 nq = netdev_get_tx_queue(pp->dev, txq->id); mvneta_tx_done_gbe() 1913 mvneta_txq_done(pp, txq); mvneta_tx_done_gbe() 1948 static void mvneta_set_special_mcast_addr(struct mvneta_port *pp, mvneta_set_special_mcast_addr() argument 1961 smc_table_reg = mvreg_read(pp, (MVNETA_DA_FILT_SPEC_MCAST mvneta_set_special_mcast_addr() 1971 mvreg_write(pp, MVNETA_DA_FILT_SPEC_MCAST + tbl_offset * 4, mvneta_set_special_mcast_addr() 1983 static void mvneta_set_other_mcast_addr(struct mvneta_port *pp, mvneta_set_other_mcast_addr() argument 1994 omc_table_reg = mvreg_read(pp, MVNETA_DA_FILT_OTH_MCAST + tbl_offset); mvneta_set_other_mcast_addr() 2004 mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + tbl_offset, omc_table_reg); mvneta_set_other_mcast_addr() 2016 static int mvneta_mcast_addr_set(struct mvneta_port *pp, unsigned char *p_addr, mvneta_mcast_addr_set() argument 2022 mvneta_set_special_mcast_addr(pp, p_addr[5], queue); mvneta_mcast_addr_set() 2028 if (pp->mcast_count[crc_result] == 0) { mvneta_mcast_addr_set() 2029 netdev_info(pp->dev, "No valid Mcast for crc8=0x%02x\n", mvneta_mcast_addr_set() 2034 pp->mcast_count[crc_result]--; mvneta_mcast_addr_set() 2035 if (pp->mcast_count[crc_result] != 0) { mvneta_mcast_addr_set() 2036 netdev_info(pp->dev, mvneta_mcast_addr_set() 2038 pp->mcast_count[crc_result], crc_result); mvneta_mcast_addr_set() 2042 pp->mcast_count[crc_result]++; mvneta_mcast_addr_set() 2044 mvneta_set_other_mcast_addr(pp, crc_result, queue); mvneta_mcast_addr_set() 2050 static void mvneta_rx_unicast_promisc_set(struct mvneta_port *pp, mvneta_rx_unicast_promisc_set() argument 2055 port_cfg_reg = mvreg_read(pp, MVNETA_PORT_CONFIG); mvneta_rx_unicast_promisc_set() 2057 val = mvreg_read(pp, MVNETA_TYPE_PRIO); mvneta_rx_unicast_promisc_set() 2064 mvreg_write(pp, MVNETA_MAC_ADDR_LOW, 0xffff); mvneta_rx_unicast_promisc_set() 2065 mvreg_write(pp, MVNETA_MAC_ADDR_HIGH, 0xffffffff); mvneta_rx_unicast_promisc_set() 2072 mvreg_write(pp, MVNETA_PORT_CONFIG, port_cfg_reg); mvneta_rx_unicast_promisc_set() 2073 mvreg_write(pp, MVNETA_TYPE_PRIO, val); mvneta_rx_unicast_promisc_set() 2079 struct mvneta_port *pp = netdev_priv(dev); mvneta_set_rx_mode() local 2084 mvneta_rx_unicast_promisc_set(pp, 1); mvneta_set_rx_mode() 2085 mvneta_set_ucast_table(pp, rxq_def); mvneta_set_rx_mode() 2086 mvneta_set_special_mcast_table(pp, rxq_def); mvneta_set_rx_mode() 2087 mvneta_set_other_mcast_table(pp, rxq_def); mvneta_set_rx_mode() 2090 mvneta_rx_unicast_promisc_set(pp, 0); mvneta_set_rx_mode() 2091 mvneta_set_ucast_table(pp, -1); mvneta_set_rx_mode() 2092 mvneta_mac_addr_set(pp, dev->dev_addr, rxq_def); mvneta_set_rx_mode() 2096 mvneta_set_special_mcast_table(pp, rxq_def); mvneta_set_rx_mode() 2097 mvneta_set_other_mcast_table(pp, rxq_def); mvneta_set_rx_mode() 2100 mvneta_set_special_mcast_table(pp, -1); mvneta_set_rx_mode() 2101 mvneta_set_other_mcast_table(pp, -1); mvneta_set_rx_mode() 2105 mvneta_mcast_addr_set(pp, ha->addr, netdev_for_each_mc_addr() 2118 disable_percpu_irq(port->pp->dev->irq); mvneta_isr() 2124 static int mvneta_fixed_link_update(struct mvneta_port *pp, mvneta_fixed_link_update() argument 2129 u32 gmac_stat = mvreg_read(pp, MVNETA_GMAC_STATUS); mvneta_fixed_link_update() 2157 struct mvneta_port *pp = netdev_priv(napi->dev); mvneta_poll() local 2158 struct mvneta_pcpu_port *port = this_cpu_ptr(pp->ports); mvneta_poll() 2160 if (!netif_running(pp->dev)) { mvneta_poll() 2166 cause_rx_tx = mvreg_read(pp, MVNETA_INTR_NEW_CAUSE); mvneta_poll() 2168 u32 cause_misc = mvreg_read(pp, MVNETA_INTR_MISC_CAUSE); mvneta_poll() 2170 mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0); mvneta_poll() 2171 if (pp->use_inband_status && (cause_misc & mvneta_poll() 2175 mvneta_fixed_link_update(pp, pp->phy_dev); mvneta_poll() 2181 mvneta_tx_done_gbe(pp, (cause_rx_tx & MVNETA_TX_INTR_MASK_ALL)); mvneta_poll() 2189 rx_done = mvneta_rx(pp, budget, &pp->rxqs[rxq_def]); mvneta_poll() 2195 enable_percpu_irq(pp->dev->irq, 0); mvneta_poll() 2203 static int mvneta_rxq_fill(struct mvneta_port *pp, struct mvneta_rx_queue *rxq, mvneta_rxq_fill() argument 2210 if (mvneta_rx_refill(pp, rxq->descs + i) != 0) { mvneta_rxq_fill() 2211 netdev_err(pp->dev, "%s:rxq %d, %d of %d buffs filled\n", mvneta_rxq_fill() 2220 mvneta_rxq_non_occup_desc_add(pp, rxq, i); mvneta_rxq_fill() 2226 static void mvneta_tx_reset(struct mvneta_port *pp) mvneta_tx_reset() argument 2232 mvneta_txq_done_force(pp, &pp->txqs[queue]); mvneta_tx_reset() 2234 mvreg_write(pp, MVNETA_PORT_TX_RESET, MVNETA_PORT_TX_DMA_RESET); mvneta_tx_reset() 2235 mvreg_write(pp, MVNETA_PORT_TX_RESET, 0); mvneta_tx_reset() 2238 static void mvneta_rx_reset(struct mvneta_port *pp) mvneta_rx_reset() argument 2240 mvreg_write(pp, MVNETA_PORT_RX_RESET, MVNETA_PORT_RX_DMA_RESET); mvneta_rx_reset() 2241 mvreg_write(pp, MVNETA_PORT_RX_RESET, 0); mvneta_rx_reset() 2247 static int mvneta_rxq_init(struct mvneta_port *pp, mvneta_rxq_init() argument 2251 rxq->size = pp->rx_ring_size; mvneta_rxq_init() 2254 rxq->descs = dma_alloc_coherent(pp->dev->dev.parent, mvneta_rxq_init() 2266 mvreg_write(pp, MVNETA_RXQ_BASE_ADDR_REG(rxq->id), rxq->descs_phys); mvneta_rxq_init() 2267 mvreg_write(pp, MVNETA_RXQ_SIZE_REG(rxq->id), rxq->size); mvneta_rxq_init() 2270 mvneta_rxq_offset_set(pp, rxq, NET_SKB_PAD); mvneta_rxq_init() 2273 mvneta_rx_pkts_coal_set(pp, rxq, rxq->pkts_coal); mvneta_rxq_init() 2274 mvneta_rx_time_coal_set(pp, rxq, rxq->time_coal); mvneta_rxq_init() 2277 mvneta_rxq_buf_size_set(pp, rxq, MVNETA_RX_BUF_SIZE(pp->pkt_size)); mvneta_rxq_init() 2278 mvneta_rxq_bm_disable(pp, rxq); mvneta_rxq_init() 2279 mvneta_rxq_fill(pp, rxq, rxq->size); mvneta_rxq_init() 2285 static void mvneta_rxq_deinit(struct mvneta_port *pp, mvneta_rxq_deinit() argument 2288 mvneta_rxq_drop_pkts(pp, rxq); mvneta_rxq_deinit() 2291 dma_free_coherent(pp->dev->dev.parent, mvneta_rxq_deinit() 2303 static int mvneta_txq_init(struct mvneta_port *pp, mvneta_txq_init() argument 2306 txq->size = pp->tx_ring_size; mvneta_txq_init() 2317 txq->descs = dma_alloc_coherent(pp->dev->dev.parent, mvneta_txq_init() 2330 mvreg_write(pp, MVETH_TXQ_TOKEN_CFG_REG(txq->id), 0x03ffffff); mvneta_txq_init() 2331 mvreg_write(pp, MVETH_TXQ_TOKEN_COUNT_REG(txq->id), 0x3fffffff); mvneta_txq_init() 2334 mvreg_write(pp, MVNETA_TXQ_BASE_ADDR_REG(txq->id), txq->descs_phys); mvneta_txq_init() 2335 mvreg_write(pp, MVNETA_TXQ_SIZE_REG(txq->id), txq->size); mvneta_txq_init() 2339 dma_free_coherent(pp->dev->dev.parent, mvneta_txq_init() 2346 txq->tso_hdrs = dma_alloc_coherent(pp->dev->dev.parent, mvneta_txq_init() 2351 dma_free_coherent(pp->dev->dev.parent, mvneta_txq_init() 2356 mvneta_tx_done_pkts_coal_set(pp, txq, txq->done_pkts_coal); mvneta_txq_init() 2362 static void mvneta_txq_deinit(struct mvneta_port *pp, mvneta_txq_deinit() argument 2368 dma_free_coherent(pp->dev->dev.parent, mvneta_txq_deinit() 2372 dma_free_coherent(pp->dev->dev.parent, mvneta_txq_deinit() 2382 mvreg_write(pp, MVETH_TXQ_TOKEN_CFG_REG(txq->id), 0); mvneta_txq_deinit() 2383 mvreg_write(pp, MVETH_TXQ_TOKEN_COUNT_REG(txq->id), 0); mvneta_txq_deinit() 2386 mvreg_write(pp, MVNETA_TXQ_BASE_ADDR_REG(txq->id), 0); mvneta_txq_deinit() 2387 mvreg_write(pp, MVNETA_TXQ_SIZE_REG(txq->id), 0); mvneta_txq_deinit() 2391 static void mvneta_cleanup_txqs(struct mvneta_port *pp) mvneta_cleanup_txqs() argument 2396 mvneta_txq_deinit(pp, &pp->txqs[queue]); mvneta_cleanup_txqs() 2400 static void mvneta_cleanup_rxqs(struct mvneta_port *pp) mvneta_cleanup_rxqs() argument 2402 mvneta_rxq_deinit(pp, &pp->rxqs[rxq_def]); mvneta_cleanup_rxqs() 2407 static int mvneta_setup_rxqs(struct mvneta_port *pp) mvneta_setup_rxqs() argument 2409 int err = mvneta_rxq_init(pp, &pp->rxqs[rxq_def]); mvneta_setup_rxqs() 2411 netdev_err(pp->dev, "%s: can't create rxq=%d\n", mvneta_setup_rxqs() 2413 mvneta_cleanup_rxqs(pp); mvneta_setup_rxqs() 2421 static int mvneta_setup_txqs(struct mvneta_port *pp) mvneta_setup_txqs() argument 2426 int err = mvneta_txq_init(pp, &pp->txqs[queue]); mvneta_setup_txqs() 2428 netdev_err(pp->dev, "%s: can't create txq=%d\n", mvneta_setup_txqs() 2430 mvneta_cleanup_txqs(pp); mvneta_setup_txqs() 2438 static void mvneta_start_dev(struct mvneta_port *pp) mvneta_start_dev() argument 2442 mvneta_max_rx_size_set(pp, pp->pkt_size); mvneta_start_dev() 2443 mvneta_txq_max_tx_size_set(pp, pp->pkt_size); mvneta_start_dev() 2446 mvneta_port_enable(pp); mvneta_start_dev() 2450 struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu); for_each_present_cpu() 2456 mvreg_write(pp, MVNETA_INTR_NEW_MASK, 2460 mvreg_write(pp, MVNETA_INTR_MISC_MASK, 2465 phy_start(pp->phy_dev); 2466 netif_tx_start_all_queues(pp->dev); 2469 static void mvneta_stop_dev(struct mvneta_port *pp) mvneta_stop_dev() argument 2473 phy_stop(pp->phy_dev); mvneta_stop_dev() 2476 struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu); for_each_present_cpu() 2481 netif_carrier_off(pp->dev); 2483 mvneta_port_down(pp); 2484 netif_tx_stop_all_queues(pp->dev); 2487 mvneta_port_disable(pp); 2490 mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0); 2491 mvreg_write(pp, MVNETA_INTR_OLD_CAUSE, 0); 2494 mvreg_write(pp, MVNETA_INTR_NEW_MASK, 0); 2495 mvreg_write(pp, MVNETA_INTR_OLD_MASK, 0); 2496 mvreg_write(pp, MVNETA_INTR_MISC_MASK, 0); 2498 mvneta_tx_reset(pp); 2499 mvneta_rx_reset(pp); 2528 struct mvneta_port *pp = netdev_priv(dev); mvneta_change_mtu() local 2545 mvneta_stop_dev(pp); mvneta_change_mtu() 2547 mvneta_cleanup_txqs(pp); mvneta_change_mtu() 2548 mvneta_cleanup_rxqs(pp); mvneta_change_mtu() 2550 pp->pkt_size = MVNETA_RX_PKT_SIZE(dev->mtu); mvneta_change_mtu() 2551 pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) + mvneta_change_mtu() 2554 ret = mvneta_setup_rxqs(pp); mvneta_change_mtu() 2560 ret = mvneta_setup_txqs(pp); mvneta_change_mtu() 2566 mvneta_start_dev(pp); mvneta_change_mtu() 2567 mvneta_port_up(pp); mvneta_change_mtu() 2577 struct mvneta_port *pp = netdev_priv(dev); mvneta_fix_features() local 2579 if (pp->tx_csum_limit && dev->mtu > pp->tx_csum_limit) { mvneta_fix_features() 2583 pp->tx_csum_limit); mvneta_fix_features() 2590 static void mvneta_get_mac_addr(struct mvneta_port *pp, unsigned char *addr) mvneta_get_mac_addr() argument 2594 mac_addr_l = mvreg_read(pp, MVNETA_MAC_ADDR_LOW); mvneta_get_mac_addr() 2595 mac_addr_h = mvreg_read(pp, MVNETA_MAC_ADDR_HIGH); mvneta_get_mac_addr() 2607 struct mvneta_port *pp = netdev_priv(dev); mvneta_set_mac_addr() local 2615 mvneta_mac_addr_set(pp, dev->dev_addr, -1); mvneta_set_mac_addr() 2618 mvneta_mac_addr_set(pp, sockaddr->sa_data, rxq_def); mvneta_set_mac_addr() 2626 struct mvneta_port *pp = netdev_priv(ndev); mvneta_adjust_link() local 2627 struct phy_device *phydev = pp->phy_dev; mvneta_adjust_link() 2631 if ((pp->speed != phydev->speed) || mvneta_adjust_link() 2632 (pp->duplex != phydev->duplex)) { mvneta_adjust_link() 2635 val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG); mvneta_adjust_link() 2648 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); mvneta_adjust_link() 2650 pp->duplex = phydev->duplex; mvneta_adjust_link() 2651 pp->speed = phydev->speed; mvneta_adjust_link() 2655 if (phydev->link != pp->link) { mvneta_adjust_link() 2657 pp->duplex = -1; mvneta_adjust_link() 2658 pp->speed = 0; mvneta_adjust_link() 2661 pp->link = phydev->link; mvneta_adjust_link() 2667 if (!pp->use_inband_status) { mvneta_adjust_link() 2668 u32 val = mvreg_read(pp, mvneta_adjust_link() 2672 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, mvneta_adjust_link() 2675 mvneta_port_up(pp); mvneta_adjust_link() 2677 if (!pp->use_inband_status) { mvneta_adjust_link() 2678 u32 val = mvreg_read(pp, mvneta_adjust_link() 2682 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, mvneta_adjust_link() 2685 mvneta_port_down(pp); mvneta_adjust_link() 2691 static int mvneta_mdio_probe(struct mvneta_port *pp) mvneta_mdio_probe() argument 2695 phy_dev = of_phy_connect(pp->dev, pp->phy_node, mvneta_adjust_link, 0, mvneta_mdio_probe() 2696 pp->phy_interface); mvneta_mdio_probe() 2698 netdev_err(pp->dev, "could not find the PHY\n"); mvneta_mdio_probe() 2705 pp->phy_dev = phy_dev; mvneta_mdio_probe() 2706 pp->link = 0; mvneta_mdio_probe() 2707 pp->duplex = 0; mvneta_mdio_probe() 2708 pp->speed = 0; mvneta_mdio_probe() 2713 static void mvneta_mdio_remove(struct mvneta_port *pp) mvneta_mdio_remove() argument 2715 phy_disconnect(pp->phy_dev); mvneta_mdio_remove() 2716 pp->phy_dev = NULL; mvneta_mdio_remove() 2721 struct mvneta_port *pp = arg; mvneta_percpu_enable() local 2723 enable_percpu_irq(pp->dev->irq, IRQ_TYPE_NONE); mvneta_percpu_enable() 2728 struct mvneta_port *pp = arg; mvneta_percpu_disable() local 2730 disable_percpu_irq(pp->dev->irq); mvneta_percpu_disable() 2733 static void mvneta_percpu_elect(struct mvneta_port *pp) mvneta_percpu_elect() argument 2745 pp, true); for_each_online_cpu() 2749 pp, true); for_each_online_cpu() 2757 struct mvneta_port *pp = container_of(nfb, struct mvneta_port, mvneta_percpu_notifier() local 2760 struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu); mvneta_percpu_notifier() 2765 netif_tx_stop_all_queues(pp->dev); mvneta_percpu_notifier() 2773 per_cpu_ptr(pp->ports, other_cpu); for_each_online_cpu() 2780 mvreg_write(pp, MVNETA_INTR_NEW_MASK, 0); 2781 mvreg_write(pp, MVNETA_INTR_OLD_MASK, 0); 2782 mvreg_write(pp, MVNETA_INTR_MISC_MASK, 0); 2788 mvneta_percpu_elect(pp); 2791 mvreg_write(pp, MVNETA_INTR_NEW_MASK, 2795 mvreg_write(pp, MVNETA_INTR_MISC_MASK, 2799 netif_tx_start_all_queues(pp->dev); 2803 netif_tx_stop_all_queues(pp->dev); 2805 mvreg_write(pp, MVNETA_INTR_NEW_MASK, 0); 2806 mvreg_write(pp, MVNETA_INTR_OLD_MASK, 0); 2807 mvreg_write(pp, MVNETA_INTR_MISC_MASK, 0); 2815 pp, true); 2821 mvneta_percpu_elect(pp); 2823 mvreg_write(pp, MVNETA_INTR_NEW_MASK, 2827 mvreg_write(pp, MVNETA_INTR_MISC_MASK, 2831 netif_tx_start_all_queues(pp->dev); 2840 struct mvneta_port *pp = netdev_priv(dev); mvneta_open() local 2843 pp->pkt_size = MVNETA_RX_PKT_SIZE(pp->dev->mtu); mvneta_open() 2844 pp->frag_size = SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(pp->pkt_size)) + mvneta_open() 2847 ret = mvneta_setup_rxqs(pp); mvneta_open() 2851 ret = mvneta_setup_txqs(pp); mvneta_open() 2856 ret = request_percpu_irq(pp->dev->irq, mvneta_isr, mvneta_open() 2857 MVNETA_DRIVER_NAME, pp->ports); mvneta_open() 2859 netdev_err(pp->dev, "cannot request irq %d\n", pp->dev->irq); mvneta_open() 2869 mvneta_percpu_disable(pp); mvneta_open() 2872 mvneta_percpu_elect(pp); mvneta_open() 2877 register_cpu_notifier(&pp->cpu_notifier); mvneta_open() 2880 netif_carrier_off(pp->dev); mvneta_open() 2882 ret = mvneta_mdio_probe(pp); mvneta_open() 2888 mvneta_start_dev(pp); mvneta_open() 2893 free_percpu_irq(pp->dev->irq, pp->ports); mvneta_open() 2895 mvneta_cleanup_txqs(pp); mvneta_open() 2897 mvneta_cleanup_rxqs(pp); mvneta_open() 2904 struct mvneta_port *pp = netdev_priv(dev); mvneta_stop() local 2907 mvneta_stop_dev(pp); mvneta_stop() 2908 mvneta_mdio_remove(pp); mvneta_stop() 2909 unregister_cpu_notifier(&pp->cpu_notifier); mvneta_stop() 2911 smp_call_function_single(cpu, mvneta_percpu_disable, pp, true); mvneta_stop() 2912 free_percpu_irq(dev->irq, pp->ports); mvneta_stop() 2913 mvneta_cleanup_rxqs(pp); mvneta_stop() 2914 mvneta_cleanup_txqs(pp); mvneta_stop() 2921 struct mvneta_port *pp = netdev_priv(dev); mvneta_ioctl() local 2923 if (!pp->phy_dev) mvneta_ioctl() 2926 return phy_mii_ioctl(pp->phy_dev, ifr, cmd); mvneta_ioctl() 2934 struct mvneta_port *pp = netdev_priv(dev); mvneta_ethtool_get_settings() local 2936 if (!pp->phy_dev) mvneta_ethtool_get_settings() 2939 return phy_ethtool_gset(pp->phy_dev, cmd); mvneta_ethtool_get_settings() 2945 struct mvneta_port *pp = netdev_priv(dev); mvneta_ethtool_set_settings() local 2947 if (!pp->phy_dev) mvneta_ethtool_set_settings() 2950 return phy_ethtool_sset(pp->phy_dev, cmd); mvneta_ethtool_set_settings() 2957 struct mvneta_port *pp = netdev_priv(dev); mvneta_ethtool_set_coalesce() local 2961 struct mvneta_rx_queue *rxq = &pp->rxqs[queue]; mvneta_ethtool_set_coalesce() 2964 mvneta_rx_pkts_coal_set(pp, rxq, rxq->pkts_coal); mvneta_ethtool_set_coalesce() 2965 mvneta_rx_time_coal_set(pp, rxq, rxq->time_coal); mvneta_ethtool_set_coalesce() 2969 struct mvneta_tx_queue *txq = &pp->txqs[queue]; mvneta_ethtool_set_coalesce() 2971 mvneta_tx_done_pkts_coal_set(pp, txq, txq->done_pkts_coal); mvneta_ethtool_set_coalesce() 2981 struct mvneta_port *pp = netdev_priv(dev); mvneta_ethtool_get_coalesce() local 2983 c->rx_coalesce_usecs = pp->rxqs[0].time_coal; mvneta_ethtool_get_coalesce() 2984 c->rx_max_coalesced_frames = pp->rxqs[0].pkts_coal; mvneta_ethtool_get_coalesce() 2986 c->tx_max_coalesced_frames = pp->txqs[0].done_pkts_coal; mvneta_ethtool_get_coalesce() 3006 struct mvneta_port *pp = netdev_priv(netdev); mvneta_ethtool_get_ringparam() local 3010 ring->rx_pending = pp->rx_ring_size; mvneta_ethtool_get_ringparam() 3011 ring->tx_pending = pp->tx_ring_size; mvneta_ethtool_get_ringparam() 3017 struct mvneta_port *pp = netdev_priv(dev); mvneta_ethtool_set_ringparam() local 3021 pp->rx_ring_size = ring->rx_pending < MVNETA_MAX_RXD ? mvneta_ethtool_set_ringparam() 3024 pp->tx_ring_size = clamp_t(u16, ring->tx_pending, mvneta_ethtool_set_ringparam() 3026 if (pp->tx_ring_size != ring->tx_pending) mvneta_ethtool_set_ringparam() 3028 pp->tx_ring_size, ring->tx_pending); mvneta_ethtool_set_ringparam() 3054 static void mvneta_ethtool_update_stats(struct mvneta_port *pp) mvneta_ethtool_update_stats() argument 3057 void __iomem *base = pp->base; mvneta_ethtool_update_stats() 3078 pp->ethtool_stats[i] += val; mvneta_ethtool_update_stats() 3085 struct mvneta_port *pp = netdev_priv(dev); mvneta_ethtool_get_stats() local 3088 mvneta_ethtool_update_stats(pp); mvneta_ethtool_get_stats() 3091 *data++ = pp->ethtool_stats[i]; mvneta_ethtool_get_stats() 3128 static int mvneta_init(struct device *dev, struct mvneta_port *pp) mvneta_init() argument 3133 mvneta_port_disable(pp); mvneta_init() 3136 mvneta_defaults_set(pp); mvneta_init() 3138 pp->txqs = devm_kcalloc(dev, txq_number, sizeof(struct mvneta_tx_queue), mvneta_init() 3140 if (!pp->txqs) mvneta_init() 3145 struct mvneta_tx_queue *txq = &pp->txqs[queue]; mvneta_init() 3147 txq->size = pp->tx_ring_size; mvneta_init() 3151 pp->rxqs = devm_kcalloc(dev, rxq_number, sizeof(struct mvneta_rx_queue), mvneta_init() 3153 if (!pp->rxqs) mvneta_init() 3158 struct mvneta_rx_queue *rxq = &pp->rxqs[queue]; mvneta_init() 3160 rxq->size = pp->rx_ring_size; mvneta_init() 3169 static void mvneta_conf_mbus_windows(struct mvneta_port *pp, mvneta_conf_mbus_windows() argument 3177 mvreg_write(pp, MVNETA_WIN_BASE(i), 0); mvneta_conf_mbus_windows() 3178 mvreg_write(pp, MVNETA_WIN_SIZE(i), 0); mvneta_conf_mbus_windows() 3181 mvreg_write(pp, MVNETA_WIN_REMAP(i), 0); mvneta_conf_mbus_windows() 3189 mvreg_write(pp, MVNETA_WIN_BASE(i), (cs->base & 0xffff0000) | mvneta_conf_mbus_windows() 3192 mvreg_write(pp, MVNETA_WIN_SIZE(i), mvneta_conf_mbus_windows() 3199 mvreg_write(pp, MVNETA_BASE_ADDR_ENABLE, win_enable); mvneta_conf_mbus_windows() 3200 mvreg_write(pp, MVNETA_ACCESS_PROTECT_ENABLE, win_protect); mvneta_conf_mbus_windows() 3204 static int mvneta_port_power_up(struct mvneta_port *pp, int phy_mode) mvneta_port_power_up() argument 3209 mvreg_write(pp, MVNETA_UNIT_INTR_CAUSE, 0); mvneta_port_power_up() 3211 ctrl = mvreg_read(pp, MVNETA_GMAC_CTRL_2); mvneta_port_power_up() 3218 mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_QSGMII_SERDES_PROTO); mvneta_port_power_up() 3222 mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_SGMII_SERDES_PROTO); mvneta_port_power_up() 3233 if (pp->use_inband_status) mvneta_port_power_up() 3238 mvreg_write(pp, MVNETA_GMAC_CTRL_2, ctrl); mvneta_port_power_up() 3240 while ((mvreg_read(pp, MVNETA_GMAC_CTRL_2) & mvneta_port_power_up() 3254 struct mvneta_port *pp; mvneta_probe() local 3308 pp = netdev_priv(dev); mvneta_probe() 3309 pp->phy_node = phy_node; mvneta_probe() 3310 pp->phy_interface = phy_mode; mvneta_probe() 3313 pp->use_inband_status = (err == 0 && mvneta_probe() 3315 pp->cpu_notifier.notifier_call = mvneta_percpu_notifier; mvneta_probe() 3317 pp->clk = devm_clk_get(&pdev->dev, NULL); mvneta_probe() 3318 if (IS_ERR(pp->clk)) { mvneta_probe() 3319 err = PTR_ERR(pp->clk); mvneta_probe() 3323 clk_prepare_enable(pp->clk); mvneta_probe() 3326 pp->base = devm_ioremap_resource(&pdev->dev, res); mvneta_probe() 3327 if (IS_ERR(pp->base)) { mvneta_probe() 3328 err = PTR_ERR(pp->base); mvneta_probe() 3333 pp->ports = alloc_percpu(struct mvneta_pcpu_port); mvneta_probe() 3334 if (!pp->ports) { mvneta_probe() 3340 pp->stats = netdev_alloc_pcpu_stats(struct mvneta_pcpu_stats); mvneta_probe() 3341 if (!pp->stats) { mvneta_probe() 3351 mvneta_get_mac_addr(pp, hw_mac_addr); mvneta_probe() 3375 pp->tx_csum_limit = tx_csum_limit; mvneta_probe() 3377 pp->tx_ring_size = MVNETA_MAX_TXD; mvneta_probe() 3378 pp->rx_ring_size = MVNETA_MAX_RXD; mvneta_probe() 3380 pp->dev = dev; mvneta_probe() 3383 err = mvneta_init(&pdev->dev, pp); mvneta_probe() 3387 err = mvneta_port_power_up(pp, phy_mode); mvneta_probe() 3395 mvneta_conf_mbus_windows(pp, dram_target_info); mvneta_probe() 3398 struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu); for_each_present_cpu() 3401 port->pp = pp; for_each_present_cpu() 3419 platform_set_drvdata(pdev, pp->dev); 3421 if (pp->use_inband_status) { 3424 mvneta_fixed_link_update(pp, phy); 3432 free_percpu(pp->stats); 3434 free_percpu(pp->ports); 3436 clk_disable_unprepare(pp->clk); 3450 struct mvneta_port *pp = netdev_priv(dev); mvneta_remove() local 3453 clk_disable_unprepare(pp->clk); mvneta_remove() 3454 free_percpu(pp->ports); mvneta_remove() 3455 free_percpu(pp->stats); mvneta_remove() 3457 of_node_put(pp->phy_node); mvneta_remove() 1624 mvneta_tso_put_hdr(struct sk_buff *skb, struct mvneta_port *pp, struct mvneta_tx_queue *txq) mvneta_tso_put_hdr() argument
|
/linux-4.4.14/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.4.14/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.4.14/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.4.14/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 722 priv->pp = NULL; uss720_probe() 727 pp = parport_register_port(0, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &parport_uss720_ops); uss720_probe() 728 if (!pp) { uss720_probe() 733 priv->pp = pp; uss720_probe() 734 pp->private_data = priv; uss720_probe() 735 pp->modes = PARPORT_MODE_PCSPP | PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP | PARPORT_MODE_ECP | PARPORT_MODE_COMPAT; uss720_probe() 738 set_1284_register(pp, 7, 0x00, GFP_KERNEL); uss720_probe() 739 set_1284_register(pp, 6, 0x30, GFP_KERNEL); /* PS/2 mode */ uss720_probe() 740 set_1284_register(pp, 2, 0x0c, GFP_KERNEL); uss720_probe() 742 get_1284_register(pp, 0, ®, GFP_KERNEL); uss720_probe() 748 parport_announce_port(pp); uss720_probe() 750 usb_set_intfdata(intf, pp); uss720_probe() 761 struct parport *pp = usb_get_intfdata(intf); uss720_disconnect() local 767 if (pp) { uss720_disconnect() 768 priv = pp->private_data; uss720_disconnect() 771 priv->pp = NULL; uss720_disconnect() 773 parport_remove_port(pp); uss720_disconnect() 774 parport_put_port(pp); uss720_disconnect()
|
/linux-4.4.14/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 netns_ipvs *ipvs, struct ip_vs_protocol *pp) register_ip_vs_proto_netns() argument 68 unsigned int hash = IP_VS_PROTO_HASH(pp->protocol); register_ip_vs_proto_netns() 75 pd->pp = pp; /* For speed issues */ register_ip_vs_proto_netns() 80 if (pp->init_netns != NULL) { register_ip_vs_proto_netns() 81 int ret = pp->init_netns(ipvs, pd); register_ip_vs_proto_netns() 96 static int unregister_ip_vs_protocol(struct ip_vs_protocol *pp) unregister_ip_vs_protocol() argument 99 unsigned int hash = IP_VS_PROTO_HASH(pp->protocol); unregister_ip_vs_protocol() 103 if (*pp_p == pp) { unregister_ip_vs_protocol() 104 *pp_p = pp->next; unregister_ip_vs_protocol() 105 if (pp->exit != NULL) unregister_ip_vs_protocol() 106 pp->exit(pp); unregister_ip_vs_protocol() 121 unsigned int hash = IP_VS_PROTO_HASH(pd->pp->protocol); unregister_ip_vs_proto_netns() 127 if (pd->pp->exit_netns != NULL) unregister_ip_vs_proto_netns() 128 pd->pp->exit_netns(ipvs, pd); unregister_ip_vs_proto_netns() 142 struct ip_vs_protocol *pp; ip_vs_proto_get() local 145 for (pp = ip_vs_proto_table[hash]; pp; pp = pp->next) { ip_vs_proto_get() 146 if (pp->protocol == proto) ip_vs_proto_get() 147 return pp; ip_vs_proto_get() 164 if (pd->pp->protocol == proto) ip_vs_proto_data_get() 182 if (pd->pp->timeout_change) ip_vs_protocol_timeout_change() 183 pd->pp->timeout_change(pd, flags); ip_vs_protocol_timeout_change() 220 struct ip_vs_protocol *pp = ip_vs_proto_get(proto); ip_vs_state_name() local 222 if (pp == NULL || pp->state_name == NULL) ip_vs_state_name() 224 return pp->state_name(state); ip_vs_state_name() 229 ip_vs_tcpudp_debug_packet_v4(struct ip_vs_protocol *pp, ip_vs_tcpudp_debug_packet_v4() argument 256 pr_debug("%s: %s %s\n", msg, pp->name, buf); ip_vs_tcpudp_debug_packet_v4() 261 ip_vs_tcpudp_debug_packet_v6(struct ip_vs_protocol *pp, ip_vs_tcpudp_debug_packet_v6() argument 288 pr_debug("%s: %s %s\n", msg, pp->name, buf); ip_vs_tcpudp_debug_packet_v6() 294 ip_vs_tcpudp_debug_packet(int af, struct ip_vs_protocol *pp, ip_vs_tcpudp_debug_packet() argument 301 ip_vs_tcpudp_debug_packet_v6(pp, skb, offset, msg); ip_vs_tcpudp_debug_packet() 304 ip_vs_tcpudp_debug_packet_v4(pp, skb, offset, msg); ip_vs_tcpudp_debug_packet() 390 struct ip_vs_protocol *pp; ip_vs_protocol_cleanup() local 395 while ((pp = ip_vs_proto_table[i]) != NULL) ip_vs_protocol_cleanup() 396 unregister_ip_vs_protocol(pp); ip_vs_protocol_cleanup()
|
H A D | ip_vs_proto_udp.c | 141 udp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, udp_snat_handler() argument 163 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) udp_snat_handler() 193 skb->ip_summed = (cp->app && pp->csum_check) ? udp_snat_handler() 216 pp->name, udph->check, udp_snat_handler() 224 udp_dnat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, udp_dnat_handler() argument 246 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) udp_dnat_handler() 277 skb->ip_summed = (cp->app && pp->csum_check) ? udp_dnat_handler() 305 udp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp) udp_csum_check() argument 334 IP_VS_DBG_RL_PKT(0, af, pp, skb, 0, udp_csum_check() 345 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() 427 struct ip_vs_protocol *pp = pd->pp; ip_vs_schedule() local 462 IP_VS_DBG_PKT(12, svc->af, pp, skb, iph->off, ip_vs_schedule() 472 cp = pp->conn_in_get(svc->ipvs, svc->af, skb, iph); ip_vs_schedule() 476 IP_VS_DBG_PKT(12, svc->af, pp, skb, iph->off, ip_vs_schedule() 611 ret = cp->packet_xmit(skb, cp, pd->pp, iph); ip_vs_leave() 731 void ip_vs_nat_icmp(struct sk_buff *skb, struct ip_vs_protocol *pp, ip_vs_nat_icmp() argument 769 IP_VS_DBG_PKT(11, AF_INET, pp, skb, (void *)ciph - (void *)iph, ip_vs_nat_icmp() 772 IP_VS_DBG_PKT(11, AF_INET, pp, skb, (void *)ciph - (void *)iph, ip_vs_nat_icmp() 777 void ip_vs_nat_icmp_v6(struct sk_buff *skb, struct ip_vs_protocol *pp, ip_vs_nat_icmp_v6() argument 826 IP_VS_DBG_PKT(11, AF_INET6, pp, skb, ip_vs_nat_icmp_v6() 830 IP_VS_DBG_PKT(11, AF_INET6, pp, skb, ip_vs_nat_icmp_v6() 842 struct ip_vs_protocol *pp, handle_response_icmp() 869 ip_vs_nat_icmp_v6(skb, pp, cp, 1); handle_response_icmp() 872 ip_vs_nat_icmp(skb, pp, cp, 1); handle_response_icmp() 906 struct ip_vs_protocol *pp; ip_vs_out_icmp() local 948 pp = ip_vs_proto_get(cih->protocol); ip_vs_out_icmp() 949 if (!pp) ip_vs_out_icmp() 954 pp->dont_defrag)) ip_vs_out_icmp() 957 IP_VS_DBG_PKT(11, AF_INET, pp, skb, offset, ip_vs_out_icmp() 963 cp = pp->conn_out_get(ipvs, AF_INET, skb, &ciph); ip_vs_out_icmp() 969 pp, ciph.len, ihl, hooknum); ip_vs_out_icmp() 980 struct ip_vs_protocol *pp; ip_vs_out_icmp_v6() local 1014 pp = ip_vs_proto_get(ciph.protocol); ip_vs_out_icmp_v6() 1015 if (!pp) ip_vs_out_icmp_v6() 1019 cp = pp->conn_out_get(ipvs, AF_INET6, skb, &ciph); ip_vs_out_icmp_v6() 1026 pp, offset, sizeof(struct ipv6hdr), ip_vs_out_icmp_v6() 1109 struct ip_vs_protocol *pp = pd->pp; handle_response() local 1111 IP_VS_DBG_PKT(11, af, pp, skb, iph->off, "Outgoing packet"); handle_response() 1117 if (pp->snat_handler && !pp->snat_handler(skb, pp, cp, iph)) handle_response() 1148 IP_VS_DBG_PKT(10, af, pp, skb, iph->off, "After SNAT"); handle_response() 1176 struct ip_vs_protocol *pp; ip_vs_out() local 1226 pp = pd->pp; ip_vs_out() 1232 if (unlikely(ip_is_fragment(ip_hdr(skb)) && !pp->dont_defrag)) { ip_vs_out() 1243 cp = pp->conn_out_get(ipvs, af, skb, &iph); ip_vs_out() 1248 (pp->protocol == IPPROTO_TCP || ip_vs_out() 1249 pp->protocol == IPPROTO_UDP || ip_vs_out() 1250 pp->protocol == IPPROTO_SCTP)) { ip_vs_out() 1288 IP_VS_DBG_PKT(12, af, pp, skb, iph.off, ip_vs_out() 1349 struct ip_vs_protocol *pp = pd->pp; ip_vs_try_to_schedule() local 1357 if (!pp->conn_schedule(ipvs, af, skb, pd, verdict, cpp, iph)) ip_vs_try_to_schedule() 1363 IP_VS_DBG_PKT(12, af, pp, skb, iph->off, ip_vs_try_to_schedule() 1370 IP_VS_DBG_PKT(7, af, pp, skb, iph->off, ip_vs_try_to_schedule() 1395 struct ip_vs_protocol *pp; ip_vs_in_icmp() local 1456 pp = pd->pp; ip_vs_in_icmp() 1460 pp->dont_defrag)) ip_vs_in_icmp() 1463 IP_VS_DBG_PKT(11, AF_INET, pp, skb, offset, ip_vs_in_icmp() 1473 cp = pp->conn_in_get(ipvs, AF_INET, skb, &ciph); ip_vs_in_icmp() 1558 verdict = ip_vs_icmp_xmit(skb, cp, pp, offset, hooknum, &ciph); ip_vs_in_icmp() 1577 struct ip_vs_protocol *pp; ip_vs_in_icmp_v6() local 1616 pp = pd->pp; ip_vs_in_icmp_v6() 1622 IP_VS_DBG_PKT(11, AF_INET6, pp, skb, offset, ip_vs_in_icmp_v6() 1628 cp = pp->conn_in_get(ipvs, AF_INET6, skb, &ciph); ip_vs_in_icmp_v6() 1658 verdict = ip_vs_icmp_xmit_v6(skb, cp, pp, offset, hooknum, &ciph); ip_vs_in_icmp_v6() 1679 struct ip_vs_protocol *pp; ip_vs_in() local 1753 pp = pd->pp; ip_vs_in() 1757 cp = pp->conn_in_get(ipvs, af, skb, &iph); ip_vs_in() 1797 IP_VS_DBG_PKT(11, af, pp, skb, iph.off, "Incoming packet"); ip_vs_in() 1816 ret = cp->packet_xmit(skb, cp, pp, &iph); ip_vs_in() 839 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(ipvs, 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(ipvs, inc); ip_vs_app_inc_release() 141 pp->name, inc->name, ntohs(inc->port)); ip_vs_app_inc_release() 257 struct ip_vs_protocol *pp) ip_vs_bind_app() 259 return pp->app_conn_bind(cp); ip_vs_bind_app() 256 ip_vs_bind_app(struct ip_vs_conn *cp, struct ip_vs_protocol *pp) ip_vs_bind_app() argument
|
H A D | ip_vs_proto_tcp.c | 151 tcp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, tcp_snat_handler() argument 173 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) tcp_snat_handler() 199 skb->ip_summed = (cp->app && pp->csum_check) ? tcp_snat_handler() 221 pp->name, tcph->check, tcp_snat_handler() 229 tcp_dnat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, tcp_dnat_handler() argument 251 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) tcp_dnat_handler() 282 skb->ip_summed = (cp->app && pp->csum_check) ? tcp_dnat_handler() 308 tcp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp) tcp_csum_check() argument 330 IP_VS_DBG_RL_PKT(0, af, pp, skb, 0, tcp_csum_check() 341 IP_VS_DBG_RL_PKT(0, af, pp, skb, 0, tcp_csum_check() 526 pd->pp->name, set_tcp_state()
|
H A D | ip_vs_xmit.c | 613 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_null_xmit() 627 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_bypass_xmit() 659 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_bypass_xmit_v6() 694 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_nat_xmit() 731 IP_VS_DBG_RL_PKT(10, AF_INET, pp, skb, ipvsh->off, ip_vs_nat_xmit() 741 IP_VS_DBG_RL_PKT(1, AF_INET, pp, skb, ipvsh->off, ip_vs_nat_xmit() 755 if (pp->dnat_handler && !pp->dnat_handler(skb, pp, cp, ipvsh)) ip_vs_nat_xmit() 760 IP_VS_DBG_PKT(10, AF_INET, pp, skb, ipvsh->off, "After DNAT"); ip_vs_nat_xmit() 785 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_nat_xmit_v6() 822 IP_VS_DBG_RL_PKT(10, AF_INET6, pp, skb, ipvsh->off, ip_vs_nat_xmit_v6() 833 IP_VS_DBG_RL_PKT(1, AF_INET6, pp, skb, ipvsh->off, ip_vs_nat_xmit_v6() 847 if (pp->dnat_handler && !pp->dnat_handler(skb, pp, cp, ipvsh)) ip_vs_nat_xmit_v6() 851 IP_VS_DBG_PKT(10, AF_INET6, pp, skb, ipvsh->off, "After DNAT"); ip_vs_nat_xmit_v6() 975 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_tunnel_xmit() 1072 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_tunnel_xmit_v6() 1169 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_dr_xmit() 1208 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh) ip_vs_dr_xmit_v6() 1252 struct ip_vs_protocol *pp, int offset, unsigned int hooknum, ip_vs_icmp_xmit() 1267 rc = cp->packet_xmit(skb, cp, pp, iph); ip_vs_icmp_xmit() 1324 ip_vs_nat_icmp(skb, pp, cp, 0); ip_vs_icmp_xmit() 1345 struct ip_vs_protocol *pp, int offset, unsigned int hooknum, ip_vs_icmp_xmit_v6() 1360 rc = cp->packet_xmit(skb, cp, pp, ipvsh); ip_vs_icmp_xmit_v6() 1416 ip_vs_nat_icmp_v6(skb, pp, cp, 0); ip_vs_icmp_xmit_v6() 612 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 626 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 658 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 693 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 784 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 974 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 1071 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 1168 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 1207 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 1251 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 1344 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_sctp.c | 88 sctp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, sctp_snat_handler() argument 108 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) sctp_snat_handler() 135 sctp_dnat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, sctp_dnat_handler() argument 155 if (pp->csum_check && !pp->csum_check(cp->af, skb, pp)) sctp_dnat_handler() 183 sctp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp) sctp_csum_check() argument 205 IP_VS_DBG_RL_PKT(0, af, pp, skb, 0, sctp_csum_check() 441 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.4.14/drivers/ntb/test/ |
H A D | ntb_pingpong.c | 103 struct pp_ctx *pp = (void *)ctx; pp_ping() local 108 spin_lock_irqsave(&pp->db_lock, irqflags); pp_ping() 110 db_mask = ntb_db_valid_mask(pp->ntb); pp_ping() 111 db_bits = ntb_db_read(pp->ntb); pp_ping() 114 dev_dbg(&pp->ntb->dev, pp_ping() 117 ntb_db_clear(pp->ntb, db_bits); pp_ping() 120 db_bits = ((pp->db_bits | db_bits) << 1) & db_mask; pp_ping() 125 spad_rd = ntb_spad_read(pp->ntb, 0); pp_ping() 128 dev_dbg(&pp->ntb->dev, pp_ping() 132 ntb_peer_spad_write(pp->ntb, 0, spad_wr); pp_ping() 133 ntb_peer_db_set(pp->ntb, db_bits); pp_ping() 134 ntb_db_clear_mask(pp->ntb, db_mask); pp_ping() 136 pp->db_bits = 0; pp_ping() 138 spin_unlock_irqrestore(&pp->db_lock, irqflags); pp_ping() 143 struct pp_ctx *pp = ctx; pp_link_event() local 145 if (ntb_link_is_up(pp->ntb, NULL, NULL) == 1) { pp_link_event() 146 dev_dbg(&pp->ntb->dev, "link is up\n"); pp_link_event() 147 pp_ping((unsigned long)pp); pp_link_event() 149 dev_dbg(&pp->ntb->dev, "link is down\n"); pp_link_event() 150 del_timer(&pp->db_timer); pp_link_event() 156 struct pp_ctx *pp = ctx; pp_db_event() local 160 spin_lock_irqsave(&pp->db_lock, irqflags); pp_db_event() 162 db_mask = ntb_db_vector_mask(pp->ntb, vec); pp_db_event() 163 db_bits = db_mask & ntb_db_read(pp->ntb); pp_db_event() 164 ntb_db_set_mask(pp->ntb, db_mask); pp_db_event() 165 ntb_db_clear(pp->ntb, db_bits); pp_db_event() 167 pp->db_bits |= db_bits; pp_db_event() 169 mod_timer(&pp->db_timer, jiffies + pp->db_delay); pp_db_event() 171 dev_dbg(&pp->ntb->dev, pp_db_event() 175 spin_unlock_irqrestore(&pp->db_lock, irqflags); pp_db_event() 186 struct pp_ctx *pp; pp_probe() local 205 pp = kmalloc(sizeof(*pp), GFP_KERNEL); pp_probe() 206 if (!pp) { pp_probe() 211 pp->ntb = ntb; pp_probe() 212 pp->db_bits = 0; pp_probe() 213 spin_lock_init(&pp->db_lock); pp_probe() 214 setup_timer(&pp->db_timer, pp_ping, (unsigned long)pp); pp_probe() 215 pp->db_delay = msecs_to_jiffies(delay_ms); pp_probe() 217 rc = ntb_set_ctx(ntb, pp, &pp_ops); pp_probe() 227 kfree(pp); pp_probe() 235 struct pp_ctx *pp = ntb->ctx; pp_remove() local 238 del_timer_sync(&pp->db_timer); pp_remove() 241 kfree(pp); pp_remove()
|
/linux-4.4.14/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 | 883 struct enic_port_profile *pp; enic_set_vf_mac() local 886 ENIC_PP_BY_INDEX(enic, vf, pp, &err); enic_set_vf_mac() 892 memcpy(pp->vf_mac, mac, ETH_ALEN); enic_set_vf_mac() 911 struct enic_port_profile *pp; enic_set_vf_port() local 914 ENIC_PP_BY_INDEX(enic, vf, pp, &err); enic_set_vf_port() 921 memcpy(&prev_pp, pp, sizeof(*enic->pp)); enic_set_vf_port() 922 memset(pp, 0, sizeof(*enic->pp)); enic_set_vf_port() 924 pp->set |= ENIC_SET_REQUEST; enic_set_vf_port() 925 pp->request = nla_get_u8(port[IFLA_PORT_REQUEST]); enic_set_vf_port() 928 pp->set |= ENIC_SET_NAME; enic_set_vf_port() 929 memcpy(pp->name, nla_data(port[IFLA_PORT_PROFILE]), enic_set_vf_port() 934 pp->set |= ENIC_SET_INSTANCE; enic_set_vf_port() 935 memcpy(pp->instance_uuid, enic_set_vf_port() 940 pp->set |= ENIC_SET_HOST; enic_set_vf_port() 941 memcpy(pp->host_uuid, enic_set_vf_port() 948 memcpy(pp->mac_addr, prev_pp.vf_mac, ETH_ALEN); enic_set_vf_port() 955 vnic_dev_get_mac_addr, pp->mac_addr); enic_set_vf_port() 958 memcpy(pp, &prev_pp, sizeof(*pp)); enic_set_vf_port() 969 memcpy(pp, &prev_pp, sizeof(*pp)); enic_set_vf_port() 971 memset(pp, 0, sizeof(*pp)); enic_set_vf_port() 979 pp->set |= ENIC_PORT_REQUEST_APPLIED; enic_set_vf_port() 982 if (pp->request == PORT_REQUEST_DISASSOCIATE) { enic_set_vf_port() 983 eth_zero_addr(pp->mac_addr); enic_set_vf_port() 990 eth_zero_addr(pp->vf_mac); enic_set_vf_port() 1000 struct enic_port_profile *pp; enic_get_vf_port() local 1003 ENIC_PP_BY_INDEX(enic, vf, pp, &err); enic_get_vf_port() 1007 if (!(pp->set & ENIC_PORT_REQUEST_APPLIED)) enic_get_vf_port() 1010 err = enic_process_get_pp_request(enic, vf, pp->request, &response); enic_get_vf_port() 1014 if (nla_put_u16(skb, IFLA_PORT_REQUEST, pp->request) || enic_get_vf_port() 1016 ((pp->set & ENIC_SET_NAME) && enic_get_vf_port() 1017 nla_put(skb, IFLA_PORT_PROFILE, PORT_PROFILE_MAX, pp->name)) || enic_get_vf_port() 1018 ((pp->set & ENIC_SET_INSTANCE) && enic_get_vf_port() 1020 pp->instance_uuid)) || enic_get_vf_port() 1021 ((pp->set & ENIC_SET_HOST) && enic_get_vf_port() 1022 nla_put(skb, IFLA_PORT_HOST_UUID, PORT_UUID_MAX, pp->host_uuid))) enic_get_vf_port() 2622 enic->pp = kcalloc(num_pps, sizeof(*enic->pp), GFP_KERNEL); enic_probe() 2623 if (!enic->pp) { enic_probe() 2769 kfree(enic->pp); enic_probe() 2809 kfree(enic->pp); enic_remove()
|
H A D | enic.h | 166 struct enic_port_profile *pp; member in struct:enic
|
/linux-4.4.14/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.4.14/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() 35 struct device_node *pp; parse_ofpart_partitions() local 65 for_each_child_of_node(ofpart_node, pp) { for_each_child_of_node() 66 if (!dedicated && node_has_compatible(pp)) for_each_child_of_node() 80 for_each_child_of_node(ofpart_node, pp) { for_each_child_of_node() 85 if (!dedicated && node_has_compatible(pp)) for_each_child_of_node() 88 reg = of_get_property(pp, "reg", &len); for_each_child_of_node() 92 master->name, pp->full_name, for_each_child_of_node() 101 a_cells = of_n_addr_cells(pp); for_each_child_of_node() 102 s_cells = of_n_size_cells(pp); for_each_child_of_node() 105 master->name, pp->full_name, for_each_child_of_node() 113 partname = of_get_property(pp, "label", &len); for_each_child_of_node() 115 partname = of_get_property(pp, "name", &len); for_each_child_of_node() 118 if (of_get_property(pp, "read-only", &len)) for_each_child_of_node() 121 if (of_get_property(pp, "lock", &len)) for_each_child_of_node() 134 master->name, pp->full_name, mtd_node->full_name); 137 of_node_put(pp);
|
/linux-4.4.14/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() 1203 void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag, ahci_fill_cmd_slot() argument 1208 cmd_tbl_dma = pp->cmd_tbl_dma + tag * AHCI_CMD_TBL_SZ; ahci_fill_cmd_slot() 1210 pp->cmd_slot[tag].opts = cpu_to_le32(opts); ahci_fill_cmd_slot() 1211 pp->cmd_slot[tag].status = 0; ahci_fill_cmd_slot() 1212 pp->cmd_slot[tag].tbl_addr = cpu_to_le32(cmd_tbl_dma & 0xffffffff); ahci_fill_cmd_slot() 1213 pp->cmd_slot[tag].tbl_addr_hi = cpu_to_le32((cmd_tbl_dma >> 16) >> 16); ahci_fill_cmd_slot() 1267 struct ahci_port_priv *pp = ap->private_data; ahci_exec_polled_cmd() local 1269 u8 *fis = pp->cmd_tbl; ahci_exec_polled_cmd() 1274 ahci_fill_cmd_slot(pp, 0, cmd_fis_len | flags | (pmp << 12)); ahci_exec_polled_cmd() 1277 if (pp->fbs_enabled && pp->fbs_last_dev != pmp) { ahci_exec_polled_cmd() 1282 pp->fbs_last_dev = pmp; ahci_exec_polled_cmd() 1307 struct ahci_port_priv *pp = ap->private_data; ahci_do_softreset() local 1326 if (!ata_is_host_link(link) && pp->fbs_enabled) { ahci_do_softreset() 1457 struct ahci_port_priv *pp = ap->private_data; ahci_hardreset() local 1459 u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; ahci_hardreset() 1531 struct ahci_port_priv *pp = ap->private_data; ahci_pmp_qc_defer() local 1533 if (!sata_pmp_attached(ap) || pp->fbs_enabled) ahci_pmp_qc_defer() 1542 struct ahci_port_priv *pp = ap->private_data; ahci_qc_prep() local 1553 cmd_tbl = pp->cmd_tbl + qc->tag * AHCI_CMD_TBL_SZ; ahci_qc_prep() 1574 ahci_fill_cmd_slot(pp, qc->tag, opts); ahci_qc_prep() 1579 struct ahci_port_priv *pp = ap->private_data; ahci_fbs_dec_intr() local 1585 BUG_ON(!pp->fbs_enabled); ahci_fbs_dec_intr() 1604 struct ahci_port_priv *pp = ap->private_data; ahci_error_intr() local 1613 if (pp->fbs_enabled) { ahci_error_intr() 1662 u32 *unk = pp->rx_fis + RX_FIS_UNK; ahci_error_intr() 1716 struct ahci_port_priv *pp = ap->private_data; ahci_handle_port_interrupt() local 1757 if (pp->fbs_enabled) ahci_handle_port_interrupt() 1760 const __le32 *f = pp->rx_fis + RX_FIS_SDB; ahci_handle_port_interrupt() 1768 /* pp->active_link is not reliable once FBS is enabled, both ahci_handle_port_interrupt() 1772 if (pp->fbs_enabled) { ahci_handle_port_interrupt() 1778 /* pp->active_link is valid iff any command is in flight */ ahci_handle_port_interrupt() 1779 if (ap->qc_active && pp->active_link->sactive) ahci_handle_port_interrupt() 1810 struct ahci_port_priv *pp = ap->private_data; ahci_port_thread_fn() local 1814 status = atomic_xchg(&pp->intr_status, 0); ahci_port_thread_fn() 1829 struct ahci_port_priv *pp = ap->private_data; ahci_multi_irqs_intr() local 1837 atomic_or(status, &pp->intr_status); ahci_multi_irqs_intr() 1954 struct ahci_port_priv *pp = ap->private_data; ahci_qc_issue() local 1960 pp->active_link = qc->dev->link; ahci_qc_issue() 1965 if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) { ahci_qc_issue() 1970 pp->fbs_last_dev = qc->dev->link->pmp; ahci_qc_issue() 1983 struct ahci_port_priv *pp = qc->ap->private_data; ahci_qc_fill_rtf() local 1984 u8 *rx_fis = pp->rx_fis; ahci_qc_fill_rtf() 1986 if (pp->fbs_enabled) ahci_qc_fill_rtf() 2019 struct ahci_port_priv *pp = ap->private_data; ahci_thaw() local 2027 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); ahci_thaw() 2135 struct ahci_port_priv *pp = ap->private_data; ahci_enable_fbs() local 2140 if (!pp->fbs_supported) ahci_enable_fbs() 2145 pp->fbs_enabled = true; ahci_enable_fbs() 2146 pp->fbs_last_dev = -1; /* initialization */ ahci_enable_fbs() 2158 pp->fbs_enabled = true; ahci_enable_fbs() 2159 pp->fbs_last_dev = -1; /* initialization */ ahci_enable_fbs() 2169 struct ahci_port_priv *pp = ap->private_data; ahci_disable_fbs() local 2174 if (!pp->fbs_supported) ahci_disable_fbs() 2179 pp->fbs_enabled = false; ahci_disable_fbs() 2193 pp->fbs_enabled = false; ahci_disable_fbs() 2202 struct ahci_port_priv *pp = ap->private_data; ahci_pmp_attach() local 2211 pp->intr_mask |= PORT_IRQ_BAD_PMP; ahci_pmp_attach() 2215 * port is marked frozen, the value in pp->intr_mask will be ahci_pmp_attach() 2222 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); ahci_pmp_attach() 2228 struct ahci_port_priv *pp = ap->private_data; ahci_pmp_detach() local 2237 pp->intr_mask &= ~PORT_IRQ_BAD_PMP; ahci_pmp_detach() 2241 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK); ahci_pmp_detach() 2280 struct ahci_port_priv *pp; ahci_port_start() local 2285 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); ahci_port_start() 2286 if (!pp) ahci_port_start() 2290 pp->irq_desc = devm_kzalloc(dev, 8, GFP_KERNEL); ahci_port_start() 2291 if (!pp->irq_desc) { ahci_port_start() 2292 devm_kfree(dev, pp); ahci_port_start() 2295 snprintf(pp->irq_desc, 8, ahci_port_start() 2304 pp->fbs_supported = true; ahci_port_start() 2308 pp->fbs_supported = true; ahci_port_start() 2314 if (pp->fbs_supported) { ahci_port_start() 2331 pp->cmd_slot = mem; ahci_port_start() 2332 pp->cmd_slot_dma = mem_dma; ahci_port_start() 2340 pp->rx_fis = mem; ahci_port_start() 2341 pp->rx_fis_dma = mem_dma; ahci_port_start() 2350 pp->cmd_tbl = mem; ahci_port_start() 2351 pp->cmd_tbl_dma = mem_dma; ahci_port_start() 2357 pp->intr_mask = DEF_PORT_IRQ; ahci_port_start() 2363 spin_lock_init(&pp->lock); ahci_port_start() 2364 ap->lock = &pp->lock; ahci_port_start() 2367 ap->private_data = pp; ahci_port_start() 2495 struct ahci_port_priv *pp = host->ports[i]->private_data; ahci_host_activate_multi_irqs() local 2498 if (!pp) { ahci_host_activate_multi_irqs() 2506 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 | 417 static void sata_fsl_setup_cmd_hdr_entry(struct sata_fsl_port_priv *pp, sata_fsl_setup_cmd_hdr_entry() argument 424 cmd_descriptor_address = pp->cmdentry_paddr + sata_fsl_setup_cmd_hdr_entry() 429 pp->cmdslot[tag].cda = cpu_to_le32(cmd_descriptor_address); sata_fsl_setup_cmd_hdr_entry() 430 pp->cmdslot[tag].prde_fis_len = sata_fsl_setup_cmd_hdr_entry() 432 pp->cmdslot[tag].ttl = cpu_to_le32(data_xfer_len & ~0x03); sata_fsl_setup_cmd_hdr_entry() 433 pp->cmdslot[tag].desc_info = cpu_to_le32(desc_info | (tag & 0x1F)); sata_fsl_setup_cmd_hdr_entry() 436 pp->cmdslot[tag].cda, sata_fsl_setup_cmd_hdr_entry() 437 pp->cmdslot[tag].prde_fis_len, sata_fsl_setup_cmd_hdr_entry() 438 pp->cmdslot[tag].ttl, pp->cmdslot[tag].desc_info); sata_fsl_setup_cmd_hdr_entry() 519 struct sata_fsl_port_priv *pp = ap->private_data; sata_fsl_qc_prep() local 529 cd = (struct command_desc *)pp->cmdentry + tag; sata_fsl_qc_prep() 530 cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; sata_fsl_qc_prep() 557 sata_fsl_setup_cmd_hdr_entry(pp, tag, desc_info, ttl_dwords, sata_fsl_qc_prep() 595 struct sata_fsl_port_priv *pp = qc->ap->private_data; sata_fsl_qc_fill_rtf() local 601 cd = pp->cmdentry + tag; sata_fsl_qc_fill_rtf() 727 struct sata_fsl_port_priv *pp; sata_fsl_port_start() local 734 pp = kzalloc(sizeof(*pp), GFP_KERNEL); sata_fsl_port_start() 735 if (!pp) sata_fsl_port_start() 741 kfree(pp); sata_fsl_port_start() 745 pp->cmdslot = mem; sata_fsl_port_start() 746 pp->cmdslot_paddr = mem_dma; sata_fsl_port_start() 751 pp->cmdentry = mem; sata_fsl_port_start() 752 pp->cmdentry_paddr = mem_dma; sata_fsl_port_start() 754 ap->private_data = pp; sata_fsl_port_start() 757 pp->cmdslot_paddr, pp->cmdentry_paddr); sata_fsl_port_start() 760 iowrite32(pp->cmdslot_paddr & 0xffffffff, hcr_base + CHBA); sata_fsl_port_start() 783 struct sata_fsl_port_priv *pp = ap->private_data; sata_fsl_port_stop() local 801 pp->cmdslot, pp->cmdslot_paddr); sata_fsl_port_stop() 803 kfree(pp); sata_fsl_port_stop() 944 struct sata_fsl_port_priv *pp = ap->private_data; sata_fsl_softreset() local 972 cfis = (u8 *) &pp->cmdentry->cfis; sata_fsl_softreset() 975 sata_fsl_setup_cmd_hdr_entry(pp, 0, sata_fsl_softreset() 1024 sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_RES | CMD_DESC_SNOOP_ENABLE, sata_fsl_softreset() 1593 struct sata_fsl_port_priv *pp = ap->private_data; sata_fsl_resume() local 1602 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 | ahci_qoriq.c | 72 struct ahci_port_priv *pp = ap->private_data; ahci_qoriq_hardreset() local 75 u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; ahci_qoriq_hardreset()
|
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 | 154 struct ahci_port_priv *pp = ap->private_data; xgene_ahci_restart_engine() local 175 if (pp->fbs_supported) { xgene_ahci_restart_engine() 370 struct ahci_port_priv *pp = ap->private_data; xgene_ahci_do_hardreset() local 371 u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; xgene_ahci_do_hardreset()
|
/linux-4.4.14/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.4.14/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.4.14/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.4.14/fs/freevxfs/ |
H A D | vxfs_immed.c | 57 * file that hosts @pp into the pagecache. 66 vxfs_immed_readpage(struct file *fp, struct page *pp) vxfs_immed_readpage() argument 68 struct vxfs_inode_info *vip = VXFS_INO(pp->mapping->host); vxfs_immed_readpage() 69 u_int64_t offset = (u_int64_t)pp->index << PAGE_CACHE_SHIFT; vxfs_immed_readpage() 72 kaddr = kmap(pp); vxfs_immed_readpage() 74 kunmap(pp); vxfs_immed_readpage() 76 flush_dcache_page(pp); vxfs_immed_readpage() 77 SetPageUptodate(pp); vxfs_immed_readpage() 78 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 | 120 struct page *pp; vxfs_find_entry() local 122 pp = vxfs_get_page(ip->i_mapping, page); vxfs_find_entry() 123 if (IS_ERR(pp)) vxfs_find_entry() 125 kaddr = (caddr_t)page_address(pp); vxfs_find_entry() 144 *ppp = pp; vxfs_find_entry() 149 vxfs_put_page(pp); vxfs_find_entry() 171 struct page *pp; vxfs_inode_by_name() local 174 de = vxfs_find_entry(dip, dp, &pp); vxfs_inode_by_name() 177 kunmap(pp); vxfs_inode_by_name() 178 page_cache_release(pp); vxfs_inode_by_name() 264 struct page *pp; vxfs_readdir() local 266 pp = vxfs_get_page(ip->i_mapping, page); vxfs_readdir() 267 if (IS_ERR(pp)) vxfs_readdir() 269 kaddr = (char *)page_address(pp); vxfs_readdir() 295 vxfs_put_page(pp); vxfs_readdir() 301 vxfs_put_page(pp); vxfs_readdir()
|
H A D | vxfs_inode.c | 133 struct page *pp; __vxfs_iget() local 137 pp = vxfs_get_page(ilistp->i_mapping, ino * VXFS_ISIZE / PAGE_SIZE); __vxfs_iget() 139 if (!IS_ERR(pp)) { __vxfs_iget() 142 caddr_t kaddr = (char *)page_address(pp); __vxfs_iget() 151 vxfs_put_page(pp); __vxfs_iget() 155 printk(KERN_WARNING "vxfs: error on page %p\n", pp); __vxfs_iget() 156 return ERR_CAST(pp); __vxfs_iget() 160 vxfs_put_page(pp); __vxfs_iget()
|
/linux-4.4.14/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.4.14/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_and_data(pp->irq, dwapb_irq_handler, 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.4.14/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.4.14/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 285 uasm_i_mfc0(pp, t2, 25, (perf_counter * 2) + 0); /* PerfCtlN */ cps_gen_flush_fsb() 286 uasm_i_mfc0(pp, t3, 25, (perf_counter * 2) + 1); /* PerfCntN */ cps_gen_flush_fsb() 289 uasm_i_addiu(pp, t0, zero, (perf_event << 5) | 0xf); cps_gen_flush_fsb() 290 uasm_i_mtc0(pp, t0, 25, (perf_counter * 2) + 0); /* PerfCtlN */ cps_gen_flush_fsb() 291 uasm_i_ehb(pp); cps_gen_flush_fsb() 292 uasm_i_mtc0(pp, zero, 25, (perf_counter * 2) + 1); /* PerfCntN */ cps_gen_flush_fsb() 293 uasm_i_ehb(pp); cps_gen_flush_fsb() 296 UASM_i_LA(pp, t0, (long)CKSEG0); cps_gen_flush_fsb() 299 uasm_build_label(pl, *pp, lbl); cps_gen_flush_fsb() 303 uasm_i_lw(pp, zero, i * line_size * line_stride, t0); cps_gen_flush_fsb() 310 uasm_i_cache(pp, Hit_Invalidate_D, cps_gen_flush_fsb() 312 uasm_i_cache(pp, Hit_Writeback_Inv_SD, cps_gen_flush_fsb() 317 uasm_i_sync(pp, stype_memory); cps_gen_flush_fsb() 318 uasm_i_ehb(pp); cps_gen_flush_fsb() 321 uasm_i_mfc0(pp, t1, 25, (perf_counter * 2) + 1); /* PerfCntN */ cps_gen_flush_fsb() 324 uasm_il_beqz(pp, pr, t1, lbl); cps_gen_flush_fsb() 325 uasm_i_nop(pp); cps_gen_flush_fsb() 328 uasm_i_mtc0(pp, t2, 25, (perf_counter * 2) + 0); /* PerfCtlN */ cps_gen_flush_fsb() 329 uasm_i_ehb(pp); cps_gen_flush_fsb() 330 uasm_i_mtc0(pp, t3, 25, (perf_counter * 2) + 1); /* PerfCntN */ cps_gen_flush_fsb() 331 uasm_i_ehb(pp); cps_gen_flush_fsb() 336 static void __init cps_gen_set_top_bit(u32 **pp, struct uasm_label **pl, cps_gen_set_top_bit() argument 340 uasm_i_lui(pp, t0, uasm_rel_hi(0x80000000)); cps_gen_set_top_bit() 341 uasm_build_label(pl, *pp, lbl); cps_gen_set_top_bit() 342 uasm_i_ll(pp, t1, 0, r_addr); cps_gen_set_top_bit() 343 uasm_i_or(pp, t1, t1, t0); cps_gen_set_top_bit() 344 uasm_i_sc(pp, t1, 0, r_addr); cps_gen_set_top_bit() 345 uasm_il_beqz(pp, pr, t1, lbl); cps_gen_set_top_bit() 346 uasm_i_nop(pp); cps_gen_set_top_bit()
|
/linux-4.4.14/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.4.14/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() 2347 capidrv_contr **pp, *card; capidrv_delcontr() local 2412 for (pp = &global.contr_list; *pp; pp = &(*pp)->next) { capidrv_delcontr() 2413 if (*pp == card) { capidrv_delcontr() 2414 *pp = (*pp)->next; capidrv_delcontr()
|
/linux-4.4.14/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 | 589 int parport_proc_register(struct parport *pp) parport_proc_register() argument 594 int parport_proc_unregister(struct parport *pp) parport_proc_unregister() argument
|
/linux-4.4.14/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 | 316 #define for_each_property_of_node(dn, pp) \ 317 for (pp = dn->properties; pp != NULL; pp = pp->next)
|
/linux-4.4.14/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() 774 struct property *pp; of_find_node_opts_by_path() local 797 for_each_property_of_node(of_aliases, pp) { for_each_property_of_node() 798 if (strlen(pp->name) == len && !strncmp(pp->name, path, len)) { for_each_property_of_node() 799 np = of_find_node_by_path(pp->value); for_each_property_of_node() 928 struct property *pp; of_find_node_with_property() local 933 for (pp = np->properties; pp; pp = pp->next) { for_each_of_allnodes_from() 934 if (of_prop_cmp(pp->name, prop_name) == 0) { for_each_of_allnodes_from() 1896 struct property *pp; of_alias_scan() local 1917 for_each_property_of_node(of_aliases, pp) { for_each_property_of_node() 1918 const char *start = pp->name; for_each_property_of_node() 1925 if (!strcmp(pp->name, "name") || for_each_property_of_node() 1926 !strcmp(pp->name, "phandle") || for_each_property_of_node() 1927 !strcmp(pp->name, "linux,phandle")) for_each_property_of_node() 1930 np = of_find_node_by_path(pp->value); for_each_property_of_node()
|
H A D | fdt.c | 185 struct property *pp, **prev_pp = NULL; unflatten_dt_node() local 274 pp = unflatten_dt_alloc(&mem, sizeof(struct property), unflatten_dt_node() 292 pp->name = (char *)pname; unflatten_dt_node() 293 pp->length = sz; unflatten_dt_node() 294 pp->value = (__be32 *)p; unflatten_dt_node() 295 *prev_pp = pp; unflatten_dt_node() 296 prev_pp = &pp->next; unflatten_dt_node() 316 pp = unflatten_dt_alloc(&mem, sizeof(struct property) + sz, unflatten_dt_node() 319 pp->name = "name"; unflatten_dt_node() 320 pp->length = sz; unflatten_dt_node() 321 pp->value = pp + 1; unflatten_dt_node() 322 *prev_pp = pp; unflatten_dt_node() 323 prev_pp = &pp->next; unflatten_dt_node() 324 memcpy(pp->value, ps, sz - 1); unflatten_dt_node() 325 ((char *)pp->value)[sz - 1] = 0; unflatten_dt_node() 327 (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.4.14/drivers/input/serio/ |
H A D | parkbd.c | 144 static int parkbd_getport(struct parport *pp) parkbd_getport() argument 152 parkbd_dev = parport_register_dev_model(pp, "parkbd", parkbd_getport() 183 static void parkbd_attach(struct parport *pp) parkbd_attach() argument 185 if (pp->number != parkbd_pp_no) { parkbd_attach() 186 pr_debug("Not using parport%d.\n", pp->number); parkbd_attach() 190 if (parkbd_getport(pp)) parkbd_attach()
|
/linux-4.4.14/tools/perf/util/ |
H A D | probe-event.c | 70 static char *synthesize_perf_probe_point(struct perf_probe_point *pp); 233 static void clear_perf_probe_point(struct perf_probe_point *pp) clear_perf_probe_point() argument 235 free(pp->file); clear_perf_probe_point() 236 free(pp->function); clear_perf_probe_point() 237 free(pp->lazy_line); clear_perf_probe_point() 310 struct perf_probe_point *pp, find_alternative_probe_point() 320 if (!pp->function || pp->file) find_alternative_probe_point() 328 map__for_each_symbol_by_name(map, pp->function, sym) { find_alternative_probe_point() 340 pp->function, address); find_alternative_probe_point() 347 result->offset += pp->offset; find_alternative_probe_point() 348 result->line += pp->line; find_alternative_probe_point() 349 result->retprobe = pp->retprobe; find_alternative_probe_point() 379 struct perf_probe_point pp = { .function = lr->function, get_alternative_line_range() local 389 ret = find_alternative_probe_point(dinfo, &pp, &result, get_alternative_line_range() 397 clear_perf_probe_point(&pp); get_alternative_line_range() 509 struct perf_probe_point *pp, find_perf_probe_point_from_dwarf() 542 (unsigned long)addr, pp); find_perf_probe_point_from_dwarf() 547 pp->retprobe = tp->retprobe; find_perf_probe_point_from_dwarf() 985 struct perf_probe_point *pp __maybe_unused, find_perf_probe_point_from_dwarf() 1151 struct perf_probe_point *pp = &pev->point; parse_perf_probe_point() local 1217 pp->file = tmp; parse_perf_probe_point() 1219 pp->function = tmp; parse_perf_probe_point() 1222 * Keep pp->function even if this is absolute address, parse_perf_probe_point() 1231 pp->abs_address = strtoul(pp->function, &tmp, 0); parse_perf_probe_point() 1244 pp->lazy_line = strdup(arg); parse_perf_probe_point() 1245 if (pp->lazy_line == NULL) parse_perf_probe_point() 1256 pp->line = strtoul(arg, &tmp, 0); parse_perf_probe_point() 1264 pp->offset = strtoul(arg, &tmp, 0); parse_perf_probe_point() 1272 if (pp->file) { parse_perf_probe_point() 1276 pp->file = strdup(arg); parse_perf_probe_point() 1277 if (pp->file == NULL) parse_perf_probe_point() 1282 pp->retprobe = 1; parse_perf_probe_point() 1297 if (pp->lazy_line && pp->line) { parse_perf_probe_point() 1303 if (pp->lazy_line && pp->offset) { parse_perf_probe_point() 1308 if (pp->line && pp->offset) { parse_perf_probe_point() 1313 if (!pp->line && !pp->lazy_line && pp->file && !pp->function) { parse_perf_probe_point() 1319 if (pp->offset && !pp->function) { parse_perf_probe_point() 1324 if (pp->retprobe && !pp->function) { parse_perf_probe_point() 1329 if ((pp->offset || pp->line || pp->lazy_line) && pp->retprobe) { parse_perf_probe_point() 1336 pp->function, pp->file, pp->line, pp->offset, pp->retprobe, parse_perf_probe_point() 1337 pp->lazy_line); parse_perf_probe_point() 1664 static char *synthesize_perf_probe_point(struct perf_probe_point *pp) synthesize_perf_probe_point() argument 1675 if (pp->offset) { synthesize_perf_probe_point() 1676 ret = e_snprintf(offs, 32, "+%lu", pp->offset); synthesize_perf_probe_point() 1680 if (pp->line) { synthesize_perf_probe_point() 1681 ret = e_snprintf(line, 32, ":%d", pp->line); synthesize_perf_probe_point() 1685 if (pp->file) { synthesize_perf_probe_point() 1686 tmp = pp->file; synthesize_perf_probe_point() 1689 tmp = strchr(pp->file + len - 30, '/'); synthesize_perf_probe_point() 1690 tmp = tmp ? tmp + 1 : pp->file + len - 30; synthesize_perf_probe_point() 1697 if (pp->function) synthesize_perf_probe_point() 1698 ret = e_snprintf(buf, MAX_CMDLEN, "%s%s%s%s%s", pp->function, synthesize_perf_probe_point() 1699 offs, pp->retprobe ? "%return" : "", line, synthesize_perf_probe_point() 1883 struct perf_probe_point *pp, find_perf_probe_point_from_map() 1911 pp->retprobe = tp->retprobe; find_perf_probe_point_from_map() 1912 pp->offset = addr - map->unmap_ip(map, sym->start); find_perf_probe_point_from_map() 1913 pp->function = strdup(sym->name); find_perf_probe_point_from_map() 1914 ret = pp->function ? 0 : -ENOMEM; find_perf_probe_point_from_map() 1925 struct perf_probe_point *pp, convert_to_perf_probe_point() 1931 ret = find_perf_probe_point_from_dwarf(tp, pp, is_kprobe); convert_to_perf_probe_point() 1934 ret = find_perf_probe_point_from_map(tp, pp, is_kprobe); convert_to_perf_probe_point() 1941 pp->function = strdup(tp->symbol); convert_to_perf_probe_point() 1942 pp->offset = tp->offset; convert_to_perf_probe_point() 1947 pp->function = strdup(buf); convert_to_perf_probe_point() 1948 pp->offset = 0; convert_to_perf_probe_point() 1950 if (pp->function == NULL) convert_to_perf_probe_point() 1953 pp->retprobe = tp->retprobe; convert_to_perf_probe_point() 2512 struct perf_probe_point *pp = &pev->point; find_probe_trace_events_from_map() local 2533 num_matched_functions = find_probe_functions(map, pp->function, syms); find_probe_trace_events_from_map() 2535 pr_err("Failed to find symbol %s in %s\n", pp->function, find_probe_trace_events_from_map() 2547 if (!pev->uprobes && !pp->retprobe && !pev->target) { find_probe_trace_events_from_map() 2576 if (pp->offset > sym->end - sym->start) { find_probe_trace_events_from_map() 2578 pp->offset, sym->name); find_probe_trace_events_from_map() 2583 tp->address = map->unmap_ip(map, sym->start) + pp->offset; find_probe_trace_events_from_map() 2595 tp->offset = pp->offset; find_probe_trace_events_from_map() 2599 tp->retprobe = pp->retprobe; find_probe_trace_events_from_map() 2647 struct perf_probe_point *pp = &pev->point; try_to_find_absolute_address() local 2676 tp->retprobe = pp->retprobe; try_to_find_absolute_address() 309 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 508 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 1882 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 1924 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 | 895 struct perf_probe_point *pp = &pf->pev->point; probe_point_inline_cb() local 899 if (pp->lazy_line) probe_point_inline_cb() 909 pf->addr += pp->offset; probe_point_inline_cb() 930 struct perf_probe_point *pp = &pf->pev->point; probe_point_search_cb() local 934 !die_match_name(sp_die, pp->function)) probe_point_search_cb() 938 if (pp->file && strtailcmp(pp->file, dwarf_decl_file(sp_die))) probe_point_search_cb() 943 if (pp->line) { /* Function relative line */ probe_point_search_cb() 945 pf->lno += pp->line; probe_point_search_cb() 951 if (pp->lazy_line) probe_point_search_cb() 954 pf->addr += pp->offset; probe_point_search_cb() 963 if (param->retval == -ENOENT && strisglob(pp->function)) probe_point_search_cb() 968 if (strisglob(pp->function) && param->retval >= 0) { probe_point_search_cb() 1020 struct perf_probe_point *pp = &pf->pev->point; debuginfo__find_probes() local 1053 if (pp->function && !strisglob(pp->function)) { debuginfo__find_probes() 1055 .function = pp->function, debuginfo__find_probes() 1056 .file = pp->file, debuginfo__find_probes() 1082 if (pp->file) debuginfo__find_probes() 1083 pf->fname = cu_find_realpath(&pf->cu_die, pp->file); debuginfo__find_probes() 1087 if (!pp->file || pf->fname) { debuginfo__find_probes() 1088 if (pp->function) debuginfo__find_probes() 1090 else if (pp->lazy_line) debuginfo__find_probes() 1093 pf->lno = pp->line; debuginfo__find_probes() 1184 struct perf_probe_point *pp = &pf->pev->point; add_probe_trace_event() local 1199 pp->retprobe, pp->function, &tev->point); add_probe_trace_event() 1339 struct perf_probe_point *pp = &pf->pev->point; add_available_vars() local 1353 pp->retprobe, pp->function, &vl->point); add_available_vars()
|
H A D | callchain.c | 487 struct rb_node *p, **pp; split_add_child() local 505 pp = &p->rb_left; split_add_child() 507 pp = &p->rb_right; split_add_child() 509 rb_link_node(&new->rb_node_in, p, pp); split_add_child()
|
/linux-4.4.14/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.4.14/net/netfilter/ |
H A D | xt_ipvs.c | 55 struct ip_vs_protocol *pp; ipvs_mt() local 80 pp = ip_vs_proto_get(iph.protocol); ipvs_mt() 81 if (unlikely(!pp)) { ipvs_mt() 89 cp = pp->conn_out_get(ipvs, family, skb, &iph); ipvs_mt()
|
/linux-4.4.14/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 | 200 u16 pp; member in struct:__anon11196 228 return pp_table[i].pp; partprod() 249 unsigned char *pp) pm2_mnp() 258 *mm = *nn = *pp = 0; pm2_mnp() 269 *pp = p; pm2_mnp() 278 unsigned char *pp) pm2v_mnp() 286 *mm = *nn = *pp = 0; pm2v_mnp() 295 *pp = p; pm2v_mnp() 248 pm2_mnp(u32 clk, unsigned char *mm, unsigned char *nn, unsigned char *pp) pm2_mnp() argument 277 pm2v_mnp(u32 clk, unsigned char *mm, unsigned char *nn, unsigned char *pp) pm2v_mnp() argument
|
/linux-4.4.14/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.data[0]; rxrpc_preparse() 771 while (*pp) rxrpc_preparse() 772 pp = &(*pp)->next; rxrpc_preparse() 773 *pp = token; rxrpc_preparse()
|
/linux-4.4.14/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() 396 struct net_bridge_port_group __rcu **pp; br_mdb_add_group() local 410 for (pp = &mp->ports; br_mdb_add_group() 411 (p = mlock_dereference(*pp, br)) != NULL; br_mdb_add_group() 412 pp = &p->next) { br_mdb_add_group() 419 p = br_multicast_new_port_group(port, group, *pp, state); br_mdb_add_group() 422 rcu_assign_pointer(*pp, p); br_mdb_add_group() 515 struct net_bridge_port_group __rcu **pp; __br_mdb_del() local 539 for (pp = &mp->ports; __br_mdb_del() 540 (p = mlock_dereference(*pp, br)) != NULL; __br_mdb_del() 541 pp = &p->next) { __br_mdb_del() 549 rcu_assign_pointer(*pp, p->next); __br_mdb_del()
|
H A D | br_multicast.c | 269 struct net_bridge_port_group __rcu **pp; br_multicast_del_pg() local 277 for (pp = &mp->ports; br_multicast_del_pg() 278 (p = mlock_dereference(*pp, br)) != NULL; br_multicast_del_pg() 279 pp = &p->next) { br_multicast_del_pg() 283 rcu_assign_pointer(*pp, p->next); br_multicast_del_pg() 676 struct net_bridge_port_group __rcu **pp; br_multicast_add_group() local 696 for (pp = &mp->ports; br_multicast_add_group() 697 (p = mlock_dereference(*pp, br)) != NULL; br_multicast_add_group() 698 pp = &p->next) { br_multicast_add_group() 705 p = br_multicast_new_port_group(port, group, *pp, MDB_TEMPORARY); br_multicast_add_group() 708 rcu_assign_pointer(*pp, p); br_multicast_add_group() 1269 struct net_bridge_port_group __rcu **pp; br_ip4_multicast_query() local 1323 for (pp = &mp->ports; br_ip4_multicast_query() 1324 (p = mlock_dereference(*pp, br)) != NULL; br_ip4_multicast_query() 1325 pp = &p->next) { br_ip4_multicast_query() 1348 struct net_bridge_port_group __rcu **pp; br_ip6_multicast_query() local 1407 for (pp = &mp->ports; br_ip6_multicast_query() 1408 (p = mlock_dereference(*pp, br)) != NULL; br_ip6_multicast_query() 1409 pp = &p->next) { br_ip6_multicast_query() 1446 struct net_bridge_port_group __rcu **pp; br_multicast_leave_group() local 1448 for (pp = &mp->ports; br_multicast_leave_group() 1449 (p = mlock_dereference(*pp, br)) != NULL; br_multicast_leave_group() 1450 pp = &p->next) { br_multicast_leave_group() 1454 rcu_assign_pointer(*pp, p->next); br_multicast_leave_group()
|
/linux-4.4.14/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.4.14/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.4.14/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 | 605 struct device_node *node, *pp; gpio_keys_get_devtree_pdata() local 632 for_each_child_of_node(node, pp) { for_each_child_of_node() 637 button->gpio = of_get_gpio_flags(pp, 0, &flags); for_each_child_of_node() 651 button->irq = irq_of_parse_and_map(pp, 0); for_each_child_of_node() 658 if (of_property_read_u32(pp, "linux,code", &button->code)) { for_each_child_of_node() 664 button->desc = of_get_property(pp, "label", NULL); for_each_child_of_node() 666 if (of_property_read_u32(pp, "linux,input-type", &button->type)) for_each_child_of_node() 669 button->wakeup = of_property_read_bool(pp, "wakeup-source") || for_each_child_of_node() 671 of_property_read_bool(pp, "gpio-key,wakeup"); for_each_child_of_node() 673 button->can_disable = !!of_get_property(pp, "linux,can-disable", NULL); for_each_child_of_node() 675 if (of_property_read_u32(pp, "debounce-interval", for_each_child_of_node()
|
/linux-4.4.14/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.4.14/drivers/usb/serial/ |
H A D | mos7720.c | 102 struct parport *pp; /* back to containing struct */ member in struct:mos7715_parport 444 static int parport_prologue(struct parport *pp) parport_prologue() argument 449 mos_parport = pp->private_data; parport_prologue() 475 static inline void parport_epilogue(struct parport *pp) parport_epilogue() argument 477 struct mos7715_parport *mos_parport = pp->private_data; parport_epilogue() 483 static void parport_mos7715_write_data(struct parport *pp, unsigned char d) parport_mos7715_write_data() argument 485 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_write_data() 487 if (parport_prologue(pp) < 0) parport_mos7715_write_data() 491 parport_epilogue(pp); parport_mos7715_write_data() 494 static unsigned char parport_mos7715_read_data(struct parport *pp) parport_mos7715_read_data() argument 496 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_read_data() 499 if (parport_prologue(pp) < 0) parport_mos7715_read_data() 502 parport_epilogue(pp); parport_mos7715_read_data() 506 static void parport_mos7715_write_control(struct parport *pp, unsigned char d) parport_mos7715_write_control() argument 508 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_write_control() 511 if (parport_prologue(pp) < 0) parport_mos7715_write_control() 516 parport_epilogue(pp); parport_mos7715_write_control() 519 static unsigned char parport_mos7715_read_control(struct parport *pp) parport_mos7715_read_control() argument 521 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_read_control() 525 mos_parport = pp->private_data; parport_mos7715_read_control() 535 static unsigned char parport_mos7715_frob_control(struct parport *pp, parport_mos7715_frob_control() argument 539 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_frob_control() 544 if (parport_prologue(pp) < 0) parport_mos7715_frob_control() 550 parport_epilogue(pp); parport_mos7715_frob_control() 554 static unsigned char parport_mos7715_read_status(struct parport *pp) parport_mos7715_read_status() argument 557 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_read_status() 560 mos_parport = pp->private_data; parport_mos7715_read_status() 570 static void parport_mos7715_enable_irq(struct parport *pp) parport_mos7715_enable_irq() argument 574 static void parport_mos7715_disable_irq(struct parport *pp) parport_mos7715_disable_irq() argument 578 static void parport_mos7715_data_forward(struct parport *pp) parport_mos7715_data_forward() argument 580 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_data_forward() 582 if (parport_prologue(pp) < 0) parport_mos7715_data_forward() 588 parport_epilogue(pp); parport_mos7715_data_forward() 591 static void parport_mos7715_data_reverse(struct parport *pp) parport_mos7715_data_reverse() argument 593 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_data_reverse() 595 if (parport_prologue(pp) < 0) parport_mos7715_data_reverse() 601 parport_epilogue(pp); parport_mos7715_data_reverse() 612 static void parport_mos7715_save_state(struct parport *pp, parport_mos7715_save_state() argument 618 mos_parport = pp->private_data; parport_mos7715_save_state() 629 static void parport_mos7715_restore_state(struct parport *pp, parport_mos7715_restore_state() argument 635 mos_parport = pp->private_data; parport_mos7715_restore_state() 647 static size_t parport_mos7715_write_compat(struct parport *pp, parport_mos7715_write_compat() argument 652 struct mos7715_parport *mos_parport = pp->private_data; parport_mos7715_write_compat() 655 if (parport_prologue(pp) < 0) parport_mos7715_write_compat() 662 parport_epilogue(pp); parport_mos7715_write_compat() 735 mos_parport->pp = parport_register_port(0, PARPORT_IRQ_NONE, mos7715_parport_init() 738 if (mos_parport->pp == NULL) { mos7715_parport_init() 744 mos_parport->pp->private_data = mos_parport; mos7715_parport_init() 745 mos_parport->pp->modes = PARPORT_MODE_COMPAT | PARPORT_MODE_PCSPP; mos7715_parport_init() 746 mos_parport->pp->dev = &serial->interface->dev; mos7715_parport_init() 747 parport_announce_port(mos_parport->pp); mos7715_parport_init() 1988 mos_parport->pp->private_data = NULL; mos7720_release() 1996 parport_remove_port(mos_parport->pp); mos7720_release()
|
/linux-4.4.14/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.4.14/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.4.14/drivers/input/joystick/ |
H A D | walkera0701.c | 203 static void walkera0701_attach(struct parport *pp) walkera0701_attach() argument 208 if (pp->number != walkera0701_pp_no) { walkera0701_attach() 209 pr_debug("Not using parport%d.\n", pp->number); walkera0701_attach() 213 if (pp->irq == -1) { walkera0701_attach() 215 pp->number); walkera0701_attach() 219 w->parport = pp; walkera0701_attach() 226 w->pardevice = parport_register_dev_model(pp, "walkera0701", walkera0701_attach()
|
H A D | turbografx.c | 160 static void tgfx_attach(struct parport *pp) tgfx_attach() argument 173 if (tgfx_cfg[port_idx].args[0] == pp->number) tgfx_attach() 178 pr_debug("Not using parport%d.\n", pp->number); tgfx_attach() 187 pd = parport_register_dev_model(pp, "turbografx", &tgfx_parport_cb, tgfx_attach() 202 tgfx->parportno = pp->number; tgfx_attach()
|
H A D | db9.c | 557 static void db9_attach(struct parport *pp) db9_attach() argument 572 if (db9_cfg[port_idx].args[DB9_ARG_PARPORT] == pp->number) db9_attach() 577 pr_debug("Not using parport%d.\n", pp->number); db9_attach() 590 if (db9_mode->bidirectional && !(pp->modes & PARPORT_MODE_TRISTATE)) { db9_attach() 598 pd = parport_register_dev_model(pp, "db9", &db9_parport_cb, port_idx); db9_attach() 611 db9->parportno = pp->number; db9_attach()
|
H A D | gamecon.c | 930 static void gc_attach(struct parport *pp) gc_attach() argument 943 if (gc_cfg[port_idx].args[0] == pp->number) gc_attach() 948 pr_debug("Not using parport%d.\n", pp->number); gc_attach() 957 pd = parport_register_dev_model(pp, "gamecon", &gc_parport_cb, gc_attach() 972 gc->parportno = pp->number; gc_attach()
|
/linux-4.4.14/fs/hpfs/ |
H A D | map.c | 268 unsigned p, pp = 0; hpfs_map_dnode() local 286 hpfs_error(s, "bad dirent size in dnode %08x, dirent %03x, last %03x", secno, p, pp); hpfs_map_dnode() 291 hpfs_error(s, "namelen does not match dirent size in dnode %08x, dirent %03x, last %03x", secno, p, pp); hpfs_map_dnode() 297 hpfs_error(s, "bad down pointer in dnode %08x, dirent %03x, last %03x", secno, p, pp); hpfs_map_dnode() 300 pp = p; hpfs_map_dnode() 307 if (d[pp + 30] != 1 || d[pp + 31] != 255) { hpfs_map_dnode()
|
/linux-4.4.14/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.4.14/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()
|
/linux-4.4.14/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.4.14/drivers/nfc/nxp-nci/ |
H A D | i2c.c | 272 struct device_node *pp; nxp_nci_i2c_parse_devtree() local 275 pp = client->dev.of_node; nxp_nci_i2c_parse_devtree() 276 if (!pp) nxp_nci_i2c_parse_devtree() 279 r = of_get_named_gpio(pp, "enable-gpios", 0); nxp_nci_i2c_parse_devtree() 281 r = of_get_named_gpio(pp, "enable-gpios", 0); nxp_nci_i2c_parse_devtree() 288 r = of_get_named_gpio(pp, "firmware-gpios", 0); nxp_nci_i2c_parse_devtree() 290 r = of_get_named_gpio(pp, "firmware-gpios", 0); nxp_nci_i2c_parse_devtree() 297 r = irq_of_parse_and_map(pp, 0); nxp_nci_i2c_parse_devtree()
|
/linux-4.4.14/drivers/nfc/st-nci/ |
H A D | i2c.c | 217 struct device_node *pp; st_nci_i2c_of_request_resources() local 221 pp = client->dev.of_node; st_nci_i2c_of_request_resources() 222 if (!pp) st_nci_i2c_of_request_resources() 226 gpio = of_get_named_gpio(pp, "reset-gpios", 0); st_nci_i2c_of_request_resources() 245 of_property_read_bool(pp, "ese-present"); st_nci_i2c_of_request_resources() 247 of_property_read_bool(pp, "uicc-present"); st_nci_i2c_of_request_resources()
|
H A D | spi.c | 232 struct device_node *pp; st_nci_spi_of_request_resources() local 236 pp = dev->dev.of_node; st_nci_spi_of_request_resources() 237 if (!pp) st_nci_spi_of_request_resources() 241 gpio = of_get_named_gpio(pp, "reset-gpios", 0); st_nci_spi_of_request_resources() 260 of_property_read_bool(pp, "ese-present"); st_nci_spi_of_request_resources() 262 of_property_read_bool(pp, "uicc-present"); st_nci_spi_of_request_resources()
|
/linux-4.4.14/include/net/ |
H A D | ip_vs.h | 250 #define IP_VS_DBG_PKT(level, af, pp, skb, ofs, msg) \ 253 pp->debug_packet(af, pp, skb, ofs, msg); \ 255 #define IP_VS_DBG_RL_PKT(level, af, pp, skb, ofs, msg) \ 259 pp->debug_packet(af, pp, skb, ofs, msg); \ 266 #define IP_VS_DBG_PKT(level, af, pp, skb, ofs, msg) do {} while (0) 267 #define IP_VS_DBG_RL_PKT(level, af, pp, skb, ofs, msg) do {} while (0) 429 void (*init)(struct ip_vs_protocol *pp); 431 void (*exit)(struct ip_vs_protocol *pp); 455 int (*snat_handler)(struct sk_buff *skb, struct ip_vs_protocol *pp, 458 int (*dnat_handler)(struct sk_buff *skb, struct ip_vs_protocol *pp, 462 struct ip_vs_protocol *pp); 476 void (*debug_packet)(int af, struct ip_vs_protocol *pp, 487 struct ip_vs_protocol *pp; member in struct:ip_vs_proto_data 554 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1308 int ip_vs_bind_app(struct ip_vs_conn *cp, struct ip_vs_protocol *pp); 1339 void ip_vs_tcpudp_debug_packet(int af, struct ip_vs_protocol *pp, 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, struct ip_vs_iphdr *iph); 1435 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1437 struct ip_vs_protocol *pp, int offset, 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, struct ip_vs_iphdr *iph); 1449 struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1451 struct ip_vs_protocol *pp, int offset, 1497 void ip_vs_nat_icmp(struct sk_buff *skb, struct ip_vs_protocol *pp, 1501 void ip_vs_nat_icmp_v6(struct sk_buff *skb, struct ip_vs_protocol *pp,
|
/linux-4.4.14/drivers/gpu/drm/gma500/ |
H A D | cdv_intel_dp.c | 382 u32 pp; cdv_intel_edp_panel_vdd_on() local 390 pp = REG_READ(PP_CONTROL); cdv_intel_edp_panel_vdd_on() 392 pp |= EDP_FORCE_VDD; cdv_intel_edp_panel_vdd_on() 393 REG_WRITE(PP_CONTROL, pp); cdv_intel_edp_panel_vdd_on() 401 u32 pp; cdv_intel_edp_panel_vdd_off() local 404 pp = REG_READ(PP_CONTROL); cdv_intel_edp_panel_vdd_off() 406 pp &= ~EDP_FORCE_VDD; cdv_intel_edp_panel_vdd_off() 407 REG_WRITE(PP_CONTROL, pp); cdv_intel_edp_panel_vdd_off() 417 u32 pp, idle_on_mask = PP_ON | PP_SEQUENCE_NONE; cdv_intel_edp_panel_on() local 423 pp = REG_READ(PP_CONTROL); cdv_intel_edp_panel_on() 424 pp &= ~PANEL_UNLOCK_MASK; cdv_intel_edp_panel_on() 426 pp |= (PANEL_UNLOCK_REGS | POWER_TARGET_ON); cdv_intel_edp_panel_on() 427 REG_WRITE(PP_CONTROL, pp); cdv_intel_edp_panel_on() 443 u32 pp, idle_off_mask = PP_ON ; cdv_intel_edp_panel_off() local 448 pp = REG_READ(PP_CONTROL); cdv_intel_edp_panel_off() 450 if ((pp & POWER_TARGET_ON) == 0) cdv_intel_edp_panel_off() 454 pp &= ~PANEL_UNLOCK_MASK; cdv_intel_edp_panel_off() 457 pp &= ~POWER_TARGET_ON; cdv_intel_edp_panel_off() 458 pp &= ~EDP_FORCE_VDD; cdv_intel_edp_panel_off() 459 pp &= ~EDP_BLC_ENABLE; cdv_intel_edp_panel_off() 460 REG_WRITE(PP_CONTROL, pp); cdv_intel_edp_panel_off() 475 u32 pp; cdv_intel_edp_backlight_on() local 485 pp = REG_READ(PP_CONTROL); cdv_intel_edp_backlight_on() 487 pp |= EDP_BLC_ENABLE; cdv_intel_edp_backlight_on() 488 REG_WRITE(PP_CONTROL, pp); cdv_intel_edp_backlight_on() 496 u32 pp; cdv_intel_edp_backlight_off() local 501 pp = REG_READ(PP_CONTROL); cdv_intel_edp_backlight_off() 503 pp &= ~EDP_BLC_ENABLE; cdv_intel_edp_backlight_off() 504 REG_WRITE(PP_CONTROL, pp); cdv_intel_edp_backlight_off()
|
/linux-4.4.14/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 | 931 unsigned long pp, key; kvmppc_hpte_hv_fault() local 957 pp = gr & (HPTE_R_PP0 | HPTE_R_PP); kvmppc_hpte_hv_fault() 963 if (!hpte_read_permission(pp, slb_v & key)) kvmppc_hpte_hv_fault() 967 if (!hpte_write_permission(pp, slb_v & key)) kvmppc_hpte_hv_fault() 970 if (!hpte_read_permission(pp, slb_v & key)) kvmppc_hpte_hv_fault()
|
/linux-4.4.14/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.4.14/drivers/gpu/drm/msm/mdp/mdp5/ |
H A D | mdp5_cfg.c | 80 .pp = { 151 .pp = { 230 .pp = { 370 .pp = { 444 .pp = {
|
H A D | mdp5_cfg.h | 91 struct mdp5_sub_block pp; member in struct:mdp5_cfg_hw
|
/linux-4.4.14/drivers/gpu/drm/exynos/ |
H A D | exynos_drm_gsc.c | 1391 struct drm_exynos_ipp_prop_list *pp = &ippdrv->prop_list; gsc_ippdrv_check_property() local 1436 if ((i == EXYNOS_DRM_OPS_SRC) && (pp->crop)) { for_each_ipp_ops() 1438 if ((pos->h < pp->crop_min.hsize) || for_each_ipp_ops() 1439 (sz->vsize > pp->crop_max.hsize) || for_each_ipp_ops() 1440 (pos->w < pp->crop_min.vsize) || for_each_ipp_ops() 1441 (sz->hsize > pp->crop_max.vsize)) { for_each_ipp_ops() 1446 if ((pos->w < pp->crop_min.hsize) || for_each_ipp_ops() 1447 (sz->hsize > pp->crop_max.hsize) || for_each_ipp_ops() 1448 (pos->h < pp->crop_min.vsize) || for_each_ipp_ops() 1449 (sz->vsize > pp->crop_max.vsize)) { for_each_ipp_ops() 1457 if ((i == EXYNOS_DRM_OPS_DST) && (pp->scale)) { for_each_ipp_ops() 1459 if ((pos->h < pp->scale_min.hsize) || for_each_ipp_ops() 1460 (sz->vsize > pp->scale_max.hsize) || for_each_ipp_ops() 1461 (pos->w < pp->scale_min.vsize) || for_each_ipp_ops() 1462 (sz->hsize > pp->scale_max.vsize)) { for_each_ipp_ops() 1467 if ((pos->w < pp->scale_min.hsize) || for_each_ipp_ops() 1468 (sz->hsize > pp->scale_max.hsize) || for_each_ipp_ops() 1469 (pos->h < pp->scale_min.vsize) || for_each_ipp_ops() 1470 (sz->vsize > pp->scale_max.vsize)) { for_each_ipp_ops()
|
H A D | exynos_drm_fimc.c | 1291 struct drm_exynos_ipp_prop_list *pp = &ippdrv->prop_list; fimc_ippdrv_check_property() local 1336 if ((i == EXYNOS_DRM_OPS_SRC) && (pp->crop)) { for_each_ipp_ops() 1338 if ((pos->h < pp->crop_min.hsize) || for_each_ipp_ops() 1339 (sz->vsize > pp->crop_max.hsize) || for_each_ipp_ops() 1340 (pos->w < pp->crop_min.vsize) || for_each_ipp_ops() 1341 (sz->hsize > pp->crop_max.vsize)) { for_each_ipp_ops() 1346 if ((pos->w < pp->crop_min.hsize) || for_each_ipp_ops() 1347 (sz->hsize > pp->crop_max.hsize) || for_each_ipp_ops() 1348 (pos->h < pp->crop_min.vsize) || for_each_ipp_ops() 1349 (sz->vsize > pp->crop_max.vsize)) { for_each_ipp_ops() 1357 if ((i == EXYNOS_DRM_OPS_DST) && (pp->scale)) { for_each_ipp_ops() 1359 if ((pos->h < pp->scale_min.hsize) || for_each_ipp_ops() 1360 (sz->vsize > pp->scale_max.hsize) || for_each_ipp_ops() 1361 (pos->w < pp->scale_min.vsize) || for_each_ipp_ops() 1362 (sz->hsize > pp->scale_max.vsize)) { for_each_ipp_ops() 1367 if ((pos->w < pp->scale_min.hsize) || for_each_ipp_ops() 1368 (sz->hsize > pp->scale_max.hsize) || for_each_ipp_ops() 1369 (pos->h < pp->scale_min.vsize) || for_each_ipp_ops() 1370 (sz->vsize > pp->scale_max.vsize)) { for_each_ipp_ops()
|
/linux-4.4.14/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.4.14/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.4.14/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.4.14/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.4.14/arch/mips/include/asm/octeon/ |
H A D | cvmx-pow-defs.h | 66 uint64_t pp:16; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_s 70 uint64_t pp:16; 77 uint64_t pp:1; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn30xx 99 uint64_t pp:1; 106 uint64_t pp:2; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn31xx 128 uint64_t pp:2; 135 uint64_t pp:16; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn38xx 159 uint64_t pp:16; 168 uint64_t pp:4; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn52xx 190 uint64_t pp:4; 198 uint64_t pp:12; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn56xx 222 uint64_t pp:12; 232 uint64_t pp:4; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn61xx 250 uint64_t pp:4; 257 uint64_t pp:6; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn63xx 275 uint64_t pp:6; 283 uint64_t pp:10; member in struct:cvmx_pow_bist_stat::cvmx_pow_bist_stat_cn66xx 301 uint64_t pp:10;
|
/linux-4.4.14/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.4.14/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.4.14/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.4.14/drivers/nfc/st21nfca/ |
H A D | i2c.c | 516 struct device_node *pp; st21nfca_hci_i2c_of_request_resources() local 520 pp = client->dev.of_node; st21nfca_hci_i2c_of_request_resources() 521 if (!pp) st21nfca_hci_i2c_of_request_resources() 525 gpio = of_get_named_gpio(pp, "enable-gpios", 0); st21nfca_hci_i2c_of_request_resources() 544 of_property_read_bool(pp, "ese-present"); st21nfca_hci_i2c_of_request_resources() 546 of_property_read_bool(pp, "uicc-present"); st21nfca_hci_i2c_of_request_resources()
|
H A D | dep.c | 61 #define ST21NFCA_PP2LRI(pp) ((pp & 0x30) >> 4)
|
/linux-4.4.14/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.4.14/drivers/staging/rdma/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.4.14/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.4.14/scripts/dtc/ |
H A D | checks.c | 426 struct property **pp, *prop = NULL; check_name_properties() local 428 for (pp = &node->proplist; *pp; pp = &((*pp)->next)) check_name_properties() 429 if (streq((*pp)->name, "name")) { check_name_properties() 430 prop = *pp; check_name_properties() 444 *pp = prop->next; check_name_properties()
|
/linux-4.4.14/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 | 1042 struct tcp_metrics_block __rcu **pp; tcp_metrics_flush_all() local 1044 pp = &hb->chain; tcp_metrics_flush_all() 1045 for (tm = deref_locked(*pp); tm; tm = deref_locked(*pp)) { tcp_metrics_flush_all() 1047 *pp = tm->tcpm_next; tcp_metrics_flush_all() 1050 pp = &tm->tcpm_next; tcp_metrics_flush_all() 1061 struct tcp_metrics_block __rcu **pp; tcp_metrics_nl_cmd_del() local 1082 pp = &hb->chain; tcp_metrics_nl_cmd_del() 1084 for (tm = deref_locked(*pp); tm; tm = deref_locked(*pp)) { tcp_metrics_nl_cmd_del() 1088 *pp = tm->tcpm_next; tcp_metrics_nl_cmd_del() 1092 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 | 185 struct sk_buff **pp = NULL; fou_gro_receive() local 195 pp = ops->callbacks.gro_receive(head, skb); fou_gro_receive() 200 return pp; fou_gro_receive() 256 struct sk_buff **pp = NULL; gue_gro_receive() local 354 pp = ops->callbacks.gro_receive(head, skb); gue_gro_receive() 362 return pp; gue_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.4.14/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.4.14/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.4.14/arch/arm64/kernel/ |
H A D | insn.c | 208 struct aarch64_insn_patch *pp = arg; aarch64_insn_patch_text_cb() local 211 if (atomic_inc_return(&pp->cpu_count) == 1) { aarch64_insn_patch_text_cb() 212 for (i = 0; ret == 0 && i < pp->insn_cnt; i++) aarch64_insn_patch_text_cb() 213 ret = aarch64_insn_patch_text_nosync(pp->text_addrs[i], aarch64_insn_patch_text_cb() 214 pp->new_insns[i]); aarch64_insn_patch_text_cb() 221 atomic_inc(&pp->cpu_count); aarch64_insn_patch_text_cb() 223 while (atomic_read(&pp->cpu_count) <= num_online_cpus()) aarch64_insn_patch_text_cb()
|
/linux-4.4.14/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.4.14/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.4.14/arch/powerpc/platforms/pseries/ |
H A D | setup.c | 301 struct paca_struct *pp; alloc_dispatch_logs() local 311 pp = &paca[cpu]; for_each_possible_cpu() 320 pp->dtl_ridx = 0; for_each_possible_cpu() 321 pp->dispatch_log = dtl; for_each_possible_cpu() 322 pp->dispatch_log_end = dtl + N_DISPATCH_LOG; for_each_possible_cpu() 323 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.4.14/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.4.14/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.4.14/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.4.14/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.4.14/drivers/clk/mvebu/ |
H A D | armada-375.c | 154 { "pp", NULL, 3 },
|
/linux-4.4.14/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.4.14/arch/s390/include/asm/ |
H A D | sysinfo.h | 138 unsigned char pp:2; member in struct:topology_core
|
/linux-4.4.14/drivers/pinctrl/ |
H A D | pinctrl-st.c | 1223 struct property *pp; st_pctl_dt_parse_groups() local 1232 for_each_property_of_node(pins, pp) { for_each_property_of_node() 1234 if (!strcmp(pp->name, "name")) for_each_property_of_node() 1237 if (pp && (pp->length/sizeof(__be32)) >= OF_GPIO_ARGS_MIN) { for_each_property_of_node() 1255 for_each_property_of_node(pins, pp) { for_each_property_of_node() 1256 if (!strcmp(pp->name, "name")) for_each_property_of_node() 1258 nr_props = pp->length/sizeof(u32); for_each_property_of_node() 1259 list = pp->value; for_each_property_of_node() 1265 conf->pin = of_get_named_gpio(pins, pp->name, 0); for_each_property_of_node() 1266 conf->name = pp->name; for_each_property_of_node()
|
/linux-4.4.14/drivers/staging/rdma/hfi1/ |
H A D | mmap.c | 112 struct hfi1_mmap_info *ip, *pp; hfi1_mmap() local 121 list_for_each_entry_safe(ip, pp, &dev->pending_mmaps, hfi1_mmap()
|
/linux-4.4.14/drivers/net/ethernet/aurora/ |
H A D | nb8800.c | 1069 struct ethtool_pauseparam *pp) nb8800_get_pauseparam() 1073 pp->autoneg = priv->pause_aneg; nb8800_get_pauseparam() 1074 pp->rx_pause = priv->pause_rx; nb8800_get_pauseparam() 1075 pp->tx_pause = priv->pause_tx; nb8800_get_pauseparam() 1079 struct ethtool_pauseparam *pp) nb8800_set_pauseparam() 1083 priv->pause_aneg = pp->autoneg; nb8800_set_pauseparam() 1084 priv->pause_rx = pp->rx_pause; nb8800_set_pauseparam() 1085 priv->pause_tx = pp->tx_pause; nb8800_set_pauseparam() 1068 nb8800_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pp) nb8800_get_pauseparam() argument 1078 nb8800_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pp) nb8800_set_pauseparam() argument
|
/linux-4.4.14/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.4.14/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.4.14/drivers/usb/gadget/udc/ |
H A D | atmel_usba_udc.c | 1932 struct device_node *pp; atmel_udc_of_init() local 1948 pp = NULL; atmel_udc_of_init() 1949 while ((pp = of_get_next_child(np, pp))) atmel_udc_of_init() 1961 pp = NULL; atmel_udc_of_init() 1963 while ((pp = of_get_next_child(np, pp))) { atmel_udc_of_init() 1966 ret = of_property_read_u32(pp, "reg", &val); atmel_udc_of_init() 1973 ret = of_property_read_u32(pp, "atmel,fifo-size", &val); atmel_udc_of_init() 1980 ret = of_property_read_u32(pp, "atmel,nb-banks", &val); atmel_udc_of_init() 1987 ep->can_dma = of_property_read_bool(pp, "atmel,can-dma"); atmel_udc_of_init() 1988 ep->can_isoc = of_property_read_bool(pp, "atmel,can-isoc"); atmel_udc_of_init() 1990 ret = of_property_read_string(pp, "name", &name); atmel_udc_of_init()
|
/linux-4.4.14/net/ethernet/ |
H A D | eth.c | 399 struct sk_buff *p, **pp = NULL; eth_gro_receive() local 439 pp = ptype->callbacks.gro_receive(head, skb); eth_gro_receive() 446 return pp; eth_gro_receive()
|
/linux-4.4.14/fs/xfs/libxfs/ |
H A D | xfs_btree.c | 1652 union xfs_btree_ptr *pp, /* ptr to btree block */ xfs_btree_lookup_get_block() 1672 if (bp && XFS_BUF_ADDR(bp) == xfs_btree_ptr_to_daddr(cur, pp)) { xfs_btree_lookup_get_block() 1677 error = xfs_btree_read_buf_block(cur, pp, 0, blkp, &bp); xfs_btree_lookup_get_block() 1722 union xfs_btree_ptr *pp; /* ptr to btree block */ xfs_btree_lookup() local 1735 pp = &ptr; xfs_btree_lookup() 1745 error = xfs_btree_lookup_get_block(cur, level, pp, &block); xfs_btree_lookup() 1815 pp = xfs_btree_ptr_addr(cur, keyno, block); xfs_btree_lookup() 1818 error = xfs_btree_check_ptr(cur, pp, 0, level); xfs_btree_lookup() 2615 union xfs_btree_ptr *pp; /* pointer to block addr */ xfs_btree_new_iroot() local 2631 pp = xfs_btree_ptr_addr(cur, 1, block); xfs_btree_new_iroot() 2634 error = cur->bc_ops->alloc_block(cur, pp, &nptr, stat); xfs_btree_new_iroot() 2672 error = xfs_btree_check_ptr(cur, pp, i, level); xfs_btree_new_iroot() 2677 xfs_btree_copy_ptrs(cur, cpp, pp, xfs_btree_get_numrecs(cblock)); xfs_btree_new_iroot() 2684 xfs_btree_copy_ptrs(cur, pp, &nptr, 1); xfs_btree_new_iroot() 3019 union xfs_btree_ptr *pp; xfs_btree_insrec() local 3022 pp = xfs_btree_ptr_addr(cur, ptr, block); xfs_btree_insrec() 3026 error = xfs_btree_check_ptr(cur, pp, i, level); xfs_btree_insrec() 3033 xfs_btree_shift_ptrs(cur, pp, 1, numrecs - ptr + 1); xfs_btree_insrec() 3043 xfs_btree_copy_ptrs(cur, pp, ptrp, 1); xfs_btree_insrec() 3206 union xfs_btree_ptr *pp; xfs_btree_kill_iroot() local 3271 pp = xfs_btree_ptr_addr(cur, 1, block); xfs_btree_kill_iroot() 3284 xfs_btree_copy_ptrs(cur, pp, cpp, numrecs); xfs_btree_kill_iroot() 3514 union xfs_btree_ptr *pp; xfs_btree_delrec() local 3516 * pp is still set to the first pointer in the block. xfs_btree_delrec() 3519 pp = xfs_btree_ptr_addr(cur, 1, block); xfs_btree_delrec() 3520 error = xfs_btree_kill_root(cur, bp, level, pp); xfs_btree_delrec() 1649 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() 1257 __be64 *pp; /* pointer to block address */ xfs_bmap_read_extents() local 1272 pp = XFS_BMAP_BROOT_PTR_ADDR(mp, block, 1, ifp->if_broot_bytes); xfs_bmap_read_extents() 1273 bno = be64_to_cpu(*pp); xfs_bmap_read_extents() 1289 pp = XFS_BMBT_PTR_ADDR(mp, block, 1, mp->m_bmap_dmxr[1]); xfs_bmap_read_extents() 1290 bno = be64_to_cpu(*pp); xfs_bmap_read_extents()
|
/linux-4.4.14/net/sctp/ |
H A D | socket.c | 6141 struct sctp_bind_bucket *pp; sctp_get_port_local() local 6170 sctp_for_each_hentry(pp, &head->chain) sctp_get_port_local() 6171 if ((pp->port == rover) && sctp_get_port_local() 6172 net_eq(sock_net(sk), pp->net)) sctp_get_port_local() 6194 * port iterator, pp being NULL. sctp_get_port_local() 6198 sctp_for_each_hentry(pp, &head->chain) { sctp_get_port_local() 6199 if ((pp->port == snum) && net_eq(pp->net, sock_net(sk))) sctp_get_port_local() 6203 pp = NULL; sctp_get_port_local() 6206 if (!hlist_empty(&pp->owner)) { sctp_get_port_local() 6208 * available port (pp != NULL) and it is being sctp_get_port_local() 6209 * used by other socket (pp->owner not empty); that other sctp_get_port_local() 6217 if (pp->fastreuse && sk->sk_reuse && sctp_get_port_local() 6222 * (pp->port) [via the pointers bind_next and sctp_get_port_local() 6223 * bind_pprev in the struct sock *sk2 (pp->sk)]. On each one, sctp_get_port_local() 6231 sk_for_each_bound(sk2, &pp->owner) { sctp_get_port_local() 6252 if (!pp && !(pp = sctp_bucket_create(head, sock_net(sk), snum))) sctp_get_port_local() 6259 if (hlist_empty(&pp->owner)) { sctp_get_port_local() 6261 pp->fastreuse = 1; sctp_get_port_local() 6263 pp->fastreuse = 0; sctp_get_port_local() 6264 } else if (pp->fastreuse && sctp_get_port_local() 6266 pp->fastreuse = 0; sctp_get_port_local() 6275 sk_add_bind_node(sk, &pp->owner); sctp_get_port_local() 6276 sctp_sk(sk)->bind_hash = pp; sctp_get_port_local() 6486 struct sctp_bind_bucket *pp; sctp_bucket_create() local 6488 pp = kmem_cache_alloc(sctp_bucket_cachep, GFP_ATOMIC); sctp_bucket_create() 6489 if (pp) { sctp_bucket_create() 6491 pp->port = snum; sctp_bucket_create() 6492 pp->fastreuse = 0; sctp_bucket_create() 6493 INIT_HLIST_HEAD(&pp->owner); sctp_bucket_create() 6494 pp->net = net; sctp_bucket_create() 6495 hlist_add_head(&pp->node, &head->chain); sctp_bucket_create() 6497 return pp; sctp_bucket_create() 6501 static void sctp_bucket_destroy(struct sctp_bind_bucket *pp) sctp_bucket_destroy() argument 6503 if (pp && hlist_empty(&pp->owner)) { sctp_bucket_destroy() 6504 __hlist_del(&pp->node); sctp_bucket_destroy() 6505 kmem_cache_free(sctp_bucket_cachep, pp); sctp_bucket_destroy() 6516 struct sctp_bind_bucket *pp; __sctp_put_port() local 6519 pp = sctp_sk(sk)->bind_hash; __sctp_put_port() 6523 sctp_bucket_destroy(pp); __sctp_put_port() 7237 struct sctp_bind_bucket *pp; /* hash list port iterator */ sctp_sock_migrate() local 7262 pp = sctp_sk(oldsk)->bind_hash; sctp_sock_migrate() 7263 sk_add_bind_node(newsk, &pp->owner); sctp_sock_migrate() 7264 sctp_sk(newsk)->bind_hash = pp; sctp_sock_migrate()
|
/linux-4.4.14/include/linux/sunrpc/ |
H A D | svc.h | 356 struct page **pp = --rqstp->rq_next_page; svc_free_res_pages() local 357 if (*pp) { svc_free_res_pages() 358 put_page(*pp); svc_free_res_pages() 359 *pp = NULL; svc_free_res_pages()
|
/linux-4.4.14/include/sound/ |
H A D | hdaudio_ext.h | 11 * @ppcap: pp capabilities pointer
|
/linux-4.4.14/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.4.14/arch/s390/include/uapi/asm/ |
H A D | kvm.h | 163 __u64 pp; /* program parameter [ARCH0] */ member in struct:kvm_sync_regs
|
/linux-4.4.14/arch/microblaze/include/asm/ |
H A D | mmu.h | 38 unsigned long pp:2; /* Page protection */ member in struct:_PTE
|
/linux-4.4.14/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.4.14/drivers/nfc/pn544/ |
H A D | i2c.c | 946 struct device_node *pp; pn544_hci_i2c_of_request_resources() local 949 pp = client->dev.of_node; pn544_hci_i2c_of_request_resources() 950 if (!pp) { pn544_hci_i2c_of_request_resources() 956 ret = of_get_named_gpio(pp, "enable-gpios", 0); pn544_hci_i2c_of_request_resources() 978 ret = of_get_named_gpio(pp, "firmware-gpios", 0); pn544_hci_i2c_of_request_resources() 1000 ret = irq_of_parse_and_map(pp, 0); pn544_hci_i2c_of_request_resources()
|
/linux-4.4.14/drivers/gpu/drm/i915/ |
H A D | intel_dp.c | 1769 u32 pp; edp_panel_vdd_on() local 1793 pp = ironlake_get_pp_control(intel_dp); edp_panel_vdd_on() 1794 pp |= EDP_FORCE_VDD; edp_panel_vdd_on() 1799 I915_WRITE(pp_ctrl_reg, pp); edp_panel_vdd_on() 1845 u32 pp; edp_panel_vdd_off_sync() local 1858 pp = ironlake_get_pp_control(intel_dp); edp_panel_vdd_off_sync() 1859 pp &= ~EDP_FORCE_VDD; edp_panel_vdd_off_sync() 1864 I915_WRITE(pp_ctrl_reg, pp); edp_panel_vdd_off_sync() 1871 if ((pp & POWER_TARGET_ON) == 0) edp_panel_vdd_off_sync() 1932 u32 pp; edp_panel_on() local 1951 pp = ironlake_get_pp_control(intel_dp); edp_panel_on() 1954 pp &= ~PANEL_POWER_RESET; edp_panel_on() 1955 I915_WRITE(pp_ctrl_reg, pp); edp_panel_on() 1959 pp |= POWER_TARGET_ON; edp_panel_on() 1961 pp |= PANEL_POWER_RESET; edp_panel_on() 1963 I915_WRITE(pp_ctrl_reg, pp); edp_panel_on() 1970 pp |= PANEL_POWER_RESET; /* restore panel reset bit */ edp_panel_on() 1971 I915_WRITE(pp_ctrl_reg, pp); edp_panel_on() 1994 u32 pp; edp_panel_off() local 2008 pp = ironlake_get_pp_control(intel_dp); edp_panel_off() 2011 pp &= ~(POWER_TARGET_ON | PANEL_POWER_RESET | EDP_FORCE_VDD | edp_panel_off() 2018 I915_WRITE(pp_ctrl_reg, pp); edp_panel_off() 2045 u32 pp; _intel_edp_backlight_on() local 2058 pp = ironlake_get_pp_control(intel_dp); _intel_edp_backlight_on() 2059 pp |= EDP_BLC_ENABLE; _intel_edp_backlight_on() 2063 I915_WRITE(pp_ctrl_reg, pp); _intel_edp_backlight_on() 2086 u32 pp; _intel_edp_backlight_off() local 2094 pp = ironlake_get_pp_control(intel_dp); _intel_edp_backlight_off() 2095 pp &= ~EDP_BLC_ENABLE; _intel_edp_backlight_off() 2099 I915_WRITE(pp_ctrl_reg, pp); _intel_edp_backlight_off() 5459 /* Compute the divisor for the pp clock, simply match the Bspec intel_dp_init_panel_power_sequencer_registers()
|
/linux-4.4.14/mm/ |
H A D | migrate.c | 1238 struct page_to_node *pp; do_move_page_to_node_array() local 1246 for (pp = pm; pp->node != MAX_NUMNODES; pp++) { do_move_page_to_node_array() 1251 vma = find_vma(mm, pp->addr); do_move_page_to_node_array() 1252 if (!vma || pp->addr < vma->vm_start || !vma_migratable(vma)) do_move_page_to_node_array() 1256 page = follow_page(vma, pp->addr, do_move_page_to_node_array() 1267 pp->page = page; do_move_page_to_node_array() 1270 if (err == pp->node) do_move_page_to_node_array() 1301 pp->status = err; do_move_page_to_node_array()
|
/linux-4.4.14/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.4.14/arch/s390/kernel/ |
H A D | smp.c | 509 struct ec_creg_mask_parms *pp = info; smp_ctl_bit_callback() local 513 cregs[pp->cr] = (cregs[pp->cr] & pp->andval) | pp->orval; smp_ctl_bit_callback()
|
/linux-4.4.14/net/8021q/ |
H A D | vlan.c | 624 struct sk_buff *p, **pp = NULL; vlan_gro_receive() local 662 pp = ptype->callbacks.gro_receive(head, skb); vlan_gro_receive() 669 return pp; vlan_gro_receive()
|
/linux-4.4.14/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.4.14/sound/soc/sh/rcar/ |
H A D | dma.c | 374 .name = "audmac-pp", 394 * mod / DMAC in / DMAC out / DMAC PP in / DMAC pp out
|
H A D | rsnd.h | 213 struct rsnd_dmapp pp; member in union:rsnd_dma::__anon15572 217 #define rsnd_dma_to_dmapp(dma) (&(dma)->dma.pp)
|
/linux-4.4.14/block/partitions/ |
H A D | aix.c | 285 pr_warn("partition %s (%u pp's found) is " aix_partition()
|
/linux-4.4.14/net/ceph/ |
H A D | debugfs.c | 141 static int osdc_show(struct seq_file *s, void *pp) osdc_show() argument
|
/linux-4.4.14/sound/soc/intel/baytrail/ |
H A D | sst-baytrail-dsp.c | 61 u32 type; /* codec type, pp lib */
|
/linux-4.4.14/arch/powerpc/kernel/ |
H A D | pci-common.c | 1102 struct resource *p, **pp; reparent_resources() local 1105 for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) { reparent_resources() 1113 firstpp = pp; reparent_resources() 1119 res->sibling = *pp; reparent_resources() 1121 *pp = NULL; reparent_resources()
|
/linux-4.4.14/arch/s390/kvm/ |
H A D | kvm-s390.c | 1326 vcpu->arch.sie_block->pp = 0; kvm_s390_vcpu_initial_reset() 1591 r = put_user(vcpu->arch.sie_block->pp, kvm_arch_vcpu_ioctl_get_one_reg() 1642 r = get_user(vcpu->arch.sie_block->pp, kvm_arch_vcpu_ioctl_set_one_reg() 2135 vcpu->arch.sie_block->pp = kvm_run->s.regs.pp; sync_regs() 2157 kvm_run->s.regs.pp = vcpu->arch.sie_block->pp; store_regs()
|
/linux-4.4.14/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.4.14/drivers/scsi/ |
H A D | scsi_debug.c | 3890 struct partition * pp; sdebug_build_parts() local 3915 pp = (struct partition *)(ramp + 0x1be); sdebug_build_parts() 3916 for (k = 0; starts[k + 1]; ++k, ++pp) { sdebug_build_parts() 3919 pp->boot_ind = 0; sdebug_build_parts() 3921 pp->cyl = start_sec / heads_by_sects; sdebug_build_parts() 3922 pp->head = (start_sec - (pp->cyl * heads_by_sects)) sdebug_build_parts() 3924 pp->sector = (start_sec % sdebug_sectors_per) + 1; sdebug_build_parts() 3926 pp->end_cyl = end_sec / heads_by_sects; sdebug_build_parts() 3927 pp->end_head = (end_sec - (pp->end_cyl * heads_by_sects)) sdebug_build_parts() 3929 pp->end_sector = (end_sec % sdebug_sectors_per) + 1; sdebug_build_parts() 3931 pp->start_sect = cpu_to_le32(start_sec); sdebug_build_parts() 3932 pp->nr_sects = cpu_to_le32(end_sec - start_sec + 1); sdebug_build_parts() 3933 pp->sys_ind = 0x83; /* plain Linux partition */ sdebug_build_parts()
|
/linux-4.4.14/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()
|