Lines Matching refs:p
294 struct acpi_resource_dma *p) in pnpacpi_parse_dma_option() argument
299 for (i = 0; i < p->channel_count; i++) in pnpacpi_parse_dma_option()
300 map |= 1 << p->channels[i]; in pnpacpi_parse_dma_option()
302 flags = dma_flags(dev, p->type, p->bus_master, p->transfer); in pnpacpi_parse_dma_option()
308 struct acpi_resource_irq *p) in pnpacpi_parse_irq_option() argument
315 for (i = 0; i < p->interrupt_count; i++) in pnpacpi_parse_irq_option()
316 if (p->interrupts[i]) in pnpacpi_parse_irq_option()
317 __set_bit(p->interrupts[i], map.bits); in pnpacpi_parse_irq_option()
319 flags = acpi_dev_irq_flags(p->triggering, p->polarity, p->shareable, p->wake_capable); in pnpacpi_parse_irq_option()
325 struct acpi_resource_extended_irq *p) in pnpacpi_parse_ext_irq_option() argument
332 for (i = 0; i < p->interrupt_count; i++) { in pnpacpi_parse_ext_irq_option()
333 if (p->interrupts[i]) { in pnpacpi_parse_ext_irq_option()
334 if (p->interrupts[i] < PNP_IRQ_NR) in pnpacpi_parse_ext_irq_option()
335 __set_bit(p->interrupts[i], map.bits); in pnpacpi_parse_ext_irq_option()
339 p->interrupts[i], PNP_IRQ_NR); in pnpacpi_parse_ext_irq_option()
343 flags = acpi_dev_irq_flags(p->triggering, p->polarity, p->shareable, p->wake_capable); in pnpacpi_parse_ext_irq_option()
369 struct acpi_resource_memory24 *p) in pnpacpi_parse_mem24_option() argument
373 if (p->write_protect == ACPI_READ_WRITE_MEMORY) in pnpacpi_parse_mem24_option()
375 pnp_register_mem_resource(dev, option_flags, p->minimum, p->maximum, in pnpacpi_parse_mem24_option()
376 p->alignment, p->address_length, flags); in pnpacpi_parse_mem24_option()
381 struct acpi_resource_memory32 *p) in pnpacpi_parse_mem32_option() argument
385 if (p->write_protect == ACPI_READ_WRITE_MEMORY) in pnpacpi_parse_mem32_option()
387 pnp_register_mem_resource(dev, option_flags, p->minimum, p->maximum, in pnpacpi_parse_mem32_option()
388 p->alignment, p->address_length, flags); in pnpacpi_parse_mem32_option()
393 struct acpi_resource_fixed_memory32 *p) in pnpacpi_parse_fixed_mem32_option() argument
397 if (p->write_protect == ACPI_READ_WRITE_MEMORY) in pnpacpi_parse_fixed_mem32_option()
399 pnp_register_mem_resource(dev, option_flags, p->address, p->address, in pnpacpi_parse_fixed_mem32_option()
400 0, p->address_length, flags); in pnpacpi_parse_fixed_mem32_option()
407 struct acpi_resource_address64 addr, *p = &addr; in pnpacpi_parse_address_option() local
411 status = acpi_resource_to_address64(r, p); in pnpacpi_parse_address_option()
418 if (p->resource_type == ACPI_MEMORY_RANGE) { in pnpacpi_parse_address_option()
419 if (p->info.mem.write_protect == ACPI_READ_WRITE_MEMORY) in pnpacpi_parse_address_option()
421 pnp_register_mem_resource(dev, option_flags, p->address.minimum, in pnpacpi_parse_address_option()
422 p->address.minimum, 0, p->address.address_length, in pnpacpi_parse_address_option()
424 } else if (p->resource_type == ACPI_IO_RANGE) in pnpacpi_parse_address_option()
425 pnp_register_port_resource(dev, option_flags, p->address.minimum, in pnpacpi_parse_address_option()
426 p->address.minimum, 0, p->address.address_length, in pnpacpi_parse_address_option()
434 struct acpi_resource_extended_address64 *p = &r->data.ext_address64; in pnpacpi_parse_ext_address_option() local
437 if (p->resource_type == ACPI_MEMORY_RANGE) { in pnpacpi_parse_ext_address_option()
438 if (p->info.mem.write_protect == ACPI_READ_WRITE_MEMORY) in pnpacpi_parse_ext_address_option()
440 pnp_register_mem_resource(dev, option_flags, p->address.minimum, in pnpacpi_parse_ext_address_option()
441 p->address.minimum, 0, p->address.address_length, in pnpacpi_parse_ext_address_option()
443 } else if (p->resource_type == ACPI_IO_RANGE) in pnpacpi_parse_ext_address_option()
444 pnp_register_port_resource(dev, option_flags, p->address.minimum, in pnpacpi_parse_ext_address_option()
445 p->address.minimum, 0, p->address.address_length, in pnpacpi_parse_ext_address_option()
661 struct resource *p) in pnpacpi_encode_irq() argument
666 if (!pnp_resource_enabled(p)) { in pnpacpi_encode_irq()
669 p ? "disabled" : "missing"); in pnpacpi_encode_irq()
673 decode_irq_flags(dev, p->flags, &triggering, &polarity, &shareable); in pnpacpi_encode_irq()
678 irq->interrupts[0] = p->start; in pnpacpi_encode_irq()
681 (int) p->start, in pnpacpi_encode_irq()
690 struct resource *p) in pnpacpi_encode_ext_irq() argument
695 if (!pnp_resource_enabled(p)) { in pnpacpi_encode_ext_irq()
698 p ? "disabled" : "missing"); in pnpacpi_encode_ext_irq()
702 decode_irq_flags(dev, p->flags, &triggering, &polarity, &shareable); in pnpacpi_encode_ext_irq()
708 extended_irq->interrupts[0] = p->start; in pnpacpi_encode_ext_irq()
710 pnp_dbg(&dev->dev, " encode irq %d %s %s %s\n", (int) p->start, in pnpacpi_encode_ext_irq()
718 struct resource *p) in pnpacpi_encode_dma() argument
722 if (!pnp_resource_enabled(p)) { in pnpacpi_encode_dma()
725 p ? "disabled" : "missing"); in pnpacpi_encode_dma()
730 switch (p->flags & IORESOURCE_DMA_SPEED_MASK) { in pnpacpi_encode_dma()
744 switch (p->flags & IORESOURCE_DMA_TYPE_MASK) { in pnpacpi_encode_dma()
755 dma->bus_master = !!(p->flags & IORESOURCE_DMA_MASTER); in pnpacpi_encode_dma()
757 dma->channels[0] = p->start; in pnpacpi_encode_dma()
761 (int) p->start, dma->type, dma->transfer, dma->bus_master); in pnpacpi_encode_dma()
766 struct resource *p) in pnpacpi_encode_io() argument
770 if (pnp_resource_enabled(p)) { in pnpacpi_encode_io()
772 io->io_decode = (p->flags & IORESOURCE_IO_16BIT_ADDR) ? in pnpacpi_encode_io()
774 io->minimum = p->start; in pnpacpi_encode_io()
775 io->maximum = p->end; in pnpacpi_encode_io()
777 io->address_length = resource_size(p); in pnpacpi_encode_io()
789 struct resource *p) in pnpacpi_encode_fixed_io() argument
793 if (pnp_resource_enabled(p)) { in pnpacpi_encode_fixed_io()
794 fixed_io->address = p->start; in pnpacpi_encode_fixed_io()
795 fixed_io->address_length = resource_size(p); in pnpacpi_encode_fixed_io()
807 struct resource *p) in pnpacpi_encode_mem24() argument
811 if (pnp_resource_enabled(p)) { in pnpacpi_encode_mem24()
813 memory24->write_protect = p->flags & IORESOURCE_MEM_WRITEABLE ? in pnpacpi_encode_mem24()
815 memory24->minimum = p->start; in pnpacpi_encode_mem24()
816 memory24->maximum = p->end; in pnpacpi_encode_mem24()
818 memory24->address_length = resource_size(p); in pnpacpi_encode_mem24()
832 struct resource *p) in pnpacpi_encode_mem32() argument
836 if (pnp_resource_enabled(p)) { in pnpacpi_encode_mem32()
837 memory32->write_protect = p->flags & IORESOURCE_MEM_WRITEABLE ? in pnpacpi_encode_mem32()
839 memory32->minimum = p->start; in pnpacpi_encode_mem32()
840 memory32->maximum = p->end; in pnpacpi_encode_mem32()
842 memory32->address_length = resource_size(p); in pnpacpi_encode_mem32()
856 struct resource *p) in pnpacpi_encode_fixed_mem32() argument
860 if (pnp_resource_enabled(p)) { in pnpacpi_encode_fixed_mem32()
862 p->flags & IORESOURCE_MEM_WRITEABLE ? in pnpacpi_encode_fixed_mem32()
864 fixed_memory32->address = p->start; in pnpacpi_encode_fixed_mem32()
865 fixed_memory32->address_length = resource_size(p); in pnpacpi_encode_fixed_mem32()