| /kernel/linux/linux-5.10/drivers/pci/ |
| D | of.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * PCI <-> OF mapping helpers 21 if (!dev->bus->dev.of_node) in pci_set_of_node() 23 dev->dev.of_node = of_pci_find_child_device(dev->bus->dev.of_node, in pci_set_of_node() 24 dev->devfn); in pci_set_of_node() 25 if (dev->dev.of_node) in pci_set_of_node() 26 dev->dev.fwnode = &dev->dev.of_node->fwnode; in pci_set_of_node() 31 of_node_put(dev->dev.of_node); in pci_release_of_node() 32 dev->dev.of_node = NULL; in pci_release_of_node() 33 dev->dev.fwnode = NULL; in pci_release_of_node() [all …]
|
| /kernel/linux/linux-4.19/drivers/pci/hotplug/ |
| D | ibmphp_res.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com) 49 newbus->busno = busno; in alloc_error_bus() 51 newbus->busno = curr->bus_num; in alloc_error_bus() 52 list_add_tail(&newbus->bus_list, &gbuses); in alloc_error_bus() 69 rs->busno = curr->bus_num; in alloc_resources() 70 rs->devfunc = curr->dev_fun; in alloc_resources() 71 rs->start = curr->start_addr; in alloc_resources() 72 rs->end = curr->end_addr; in alloc_resources() 73 rs->len = curr->end_addr - curr->start_addr + 1; in alloc_resources() [all …]
|
| /kernel/linux/linux-5.10/drivers/pci/hotplug/ |
| D | ibmphp_res.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com) 49 newbus->busno = busno; in alloc_error_bus() 51 newbus->busno = curr->bus_num; in alloc_error_bus() 52 list_add_tail(&newbus->bus_list, &gbuses); in alloc_error_bus() 69 rs->busno = curr->bus_num; in alloc_resources() 70 rs->devfunc = curr->dev_fun; in alloc_resources() 71 rs->start = curr->start_addr; in alloc_resources() 72 rs->end = curr->end_addr; in alloc_resources() 73 rs->len = curr->end_addr - curr->start_addr + 1; in alloc_resources() [all …]
|
| /kernel/linux/linux-5.10/arch/x86/pci/ |
| D | amd_bus.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #include <linux/range.h> 11 #include <asm/pci-direct.h> 23 u32 bus; member 31 * It only supports K8, Fam10h, Fam11h, and Fam15h_00h-0fh . 48 if (info->node == node && info->link == link) in find_pci_root_info() 58 * to the LDT Bus Number Registers found in the northbridge. 63 unsigned bus; in early_root_info_init() local 73 struct range range[RANGE_NUM]; in early_root_info_init() local 82 return -1; in early_root_info_init() [all …]
|
| /kernel/linux/linux-4.19/arch/x86/pci/ |
| D | amd_bus.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #include <linux/range.h> 11 #include <asm/pci-direct.h> 23 u32 bus; member 31 * It only supports K8, Fam10h, Fam11h, and Fam15h_00h-0fh . 48 if (info->node == node && info->link == link) in find_pci_root_info() 58 * to the LDT Bus Number Registers found in the northbridge. 63 unsigned bus; in early_root_info_init() local 73 struct range range[RANGE_NUM]; in early_root_info_init() local 82 return -1; in early_root_info_init() [all …]
|
| /kernel/linux/linux-5.10/drivers/of/ |
| D | address.c | 1 // SPDX-License-Identifier: GPL-2.0 16 #include <linux/dma-direct.h> /* for bus_dma_region */ 35 while (na--) in of_dump_addr() 43 /* Callbacks for bus specific translators */ 50 u64 (*map)(__be32 *addr, const __be32 *range, 58 * Default translator (generic bus) 70 static u64 of_bus_default_map(__be32 *addr, const __be32 *range, in of_bus_default_map() argument 75 cp = of_read_number(range, na); in of_bus_default_map() 76 s = of_read_number(range + na + pna, ns); in of_bus_default_map() 85 return da - cp; in of_bus_default_map() [all …]
|
| /kernel/linux/linux-4.19/drivers/of/ |
| D | address.c | 1 // SPDX-License-Identifier: GPL-2.0 32 while (na--) in of_dump_addr() 40 /* Callbacks for bus specific translators */ 47 u64 (*map)(__be32 *addr, const __be32 *range, 54 * Default translator (generic bus) 66 static u64 of_bus_default_map(__be32 *addr, const __be32 *range, in of_bus_default_map() argument 71 cp = of_read_number(range, na); in of_bus_default_map() 72 s = of_read_number(range + na + pna, ns); in of_bus_default_map() 81 return da - cp; in of_bus_default_map() 90 addr[na - 2] = cpu_to_be32(a >> 32); in of_bus_default_translate() [all …]
|
| /kernel/linux/linux-4.19/arch/microblaze/pci/ |
| D | pci-common.c | 11 * Common pmac/prep/chrp pci routines. -- Cort 39 #include <asm/pci-bridge.h> 64 phb->global_number = global_phb_number++; in pcibios_alloc_controller() 65 list_add_tail(&phb->list_node, &hose_list); in pcibios_alloc_controller() 67 phb->dn = dev; in pcibios_alloc_controller() 68 phb->is_dynamic = mem_init_done; in pcibios_alloc_controller() 75 list_del(&phb->list_node); in pcibios_free_controller() 78 if (phb->is_dynamic) in pcibios_free_controller() 84 return resource_size(&hose->io_resource); in pcibios_io_size() 96 if (address >= hose->io_base_virt && in pcibios_vaddr_is_ioport() [all …]
|
| /kernel/linux/linux-5.10/arch/microblaze/pci/ |
| D | pci-common.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 * Common pmac/prep/chrp pci routines. -- Cort 35 #include <asm/pci-bridge.h> 60 phb->global_number = global_phb_number++; in pcibios_alloc_controller() 61 list_add_tail(&phb->list_node, &hose_list); in pcibios_alloc_controller() 63 phb->dn = dev; in pcibios_alloc_controller() 64 phb->is_dynamic = mem_init_done; in pcibios_alloc_controller() 71 list_del(&phb->list_node); in pcibios_free_controller() 74 if (phb->is_dynamic) in pcibios_free_controller() 80 return resource_size(&hose->io_resource); in pcibios_io_size() [all …]
|
| /kernel/linux/linux-5.10/arch/mips/pci/ |
| D | pci-legacy.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * Copyright (C) 2003, 04, 11 Ralf Baechle (ralf@linux-mips.org) 6 * written by Ralf Baechle (ralf@linux-mips.org) 18 #include <asm/cpu-info.h> 35 * addresses to be allocated in the 0x000-0x0ff region 39 * the low 10 bits of the IO address. The 0x00-0xff region 41 * bits, so it's ok to allocate at, say, 0x2800-0x28ff, 42 * but we want to try to avoid allocating at 0x2900-0x2bff 43 * which might have be mirrored at 0x0100-0x03ff.. 50 struct pci_controller *hose = dev->sysdata; in pcibios_align_resource() [all …]
|
| /kernel/linux/linux-4.19/drivers/pci/ |
| D | of.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * PCI <-> OF mapping helpers 20 if (!dev->bus->dev.of_node) in pci_set_of_node() 22 dev->dev.of_node = of_pci_find_child_device(dev->bus->dev.of_node, in pci_set_of_node() 23 dev->devfn); in pci_set_of_node() 28 of_node_put(dev->dev.of_node); in pci_release_of_node() 29 dev->dev.of_node = NULL; in pci_release_of_node() 32 void pci_set_bus_of_node(struct pci_bus *bus) in pci_set_bus_of_node() argument 34 if (bus->self == NULL) in pci_set_bus_of_node() 35 bus->dev.of_node = pcibios_get_phb_of_node(bus); in pci_set_bus_of_node() [all …]
|
| /kernel/linux/linux-4.19/arch/mips/pci/ |
| D | pci-legacy.c | 7 * Copyright (C) 2003, 04, 11 Ralf Baechle (ralf@linux-mips.org) 9 * written by Ralf Baechle (ralf@linux-mips.org) 21 #include <asm/cpu-info.h> 38 * addresses to be allocated in the 0x000-0x0ff region 42 * the low 10 bits of the IO address. The 0x00-0xff region 44 * bits, so it's ok to allocate at, say, 0x2800-0x28ff, 45 * but we want to try to avoid allocating at 0x2900-0x2bff 46 * which might have be mirrored at 0x0100-0x03ff.. 53 struct pci_controller *hose = dev->sysdata; in pcibios_align_resource() 54 resource_size_t start = res->start; in pcibios_align_resource() [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/mt7621-pci/ |
| D | mediatek,mt7621-pci.txt | 4 - compatible: "mediatek,mt7621-pci" 5 - device_type: Must be "pci" 6 - reg: Base addresses and lengths of the PCIe subsys and root ports. 7 - bus-range: Range of bus numbers associated with this controller. 8 - #address-cells: Address representation for root ports (must be 3) 9 - pinctrl-names : The pin control state names. 10 - pinctrl-0: The "default" pinctrl state. 11 - #size-cells: Size representation for root ports (must be 2) 12 - ranges: Ranges for the PCI memory and I/O regions. 13 - #interrupt-cells: Must be 1 [all …]
|
| /kernel/linux/linux-4.19/arch/powerpc/kernel/ |
| D | pci-common.c | 11 * Common pmac/prep/chrp pci routines. -- Cort 39 #include <asm/pci-bridge.h> 42 #include <asm/ppc-pci.h> 84 int ret, phb_id = -1; in get_phb_number() 90 * the respective device-tree properties. Firstly, try powernv by in get_phb_number() 91 * reading "ibm,opal-phbid", only present in OPAL environment. in get_phb_number() 93 ret = of_property_read_u64(dn, "ibm,opal-phbid", &prop); in get_phb_number() 100 phb_id = (int)(prop & (MAX_PHBS - 1)); in get_phb_number() 125 phb->global_number = get_phb_number(dev); in pcibios_alloc_controller() 126 list_add_tail(&phb->list_node, &hose_list); in pcibios_alloc_controller() [all …]
|
| /kernel/linux/linux-5.10/arch/powerpc/kernel/ |
| D | pci-common.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 * Common pmac/prep/chrp pci routines. -- Cort 36 #include <asm/pci-bridge.h> 39 #include <asm/ppc-pci.h> 75 int ret, phb_id = -1; in get_phb_number() 81 * the respective device-tree properties. Firstly, try powernv by in get_phb_number() 82 * reading "ibm,opal-phbid", only present in OPAL environment. in get_phb_number() 84 ret = of_property_read_u64(dn, "ibm,opal-phbid", &prop); in get_phb_number() 91 phb_id = (int)(prop & (MAX_PHBS - 1)); in get_phb_number() 116 phb->global_number = get_phb_number(dev); in pcibios_alloc_controller() [all …]
|
| /kernel/linux/linux-5.10/arch/x86/kernel/ |
| D | mmconf-fam10h_64.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <linux/range.h> 13 #include <asm/pci-direct.h> 22 u32 bus; member 37 const struct range *r1 = x1; in cmp_range() 38 const struct range *r2 = x2; in cmp_range() 41 start1 = r1->start >> 32; in cmp_range() 42 start2 = r2->start >> 32; in cmp_range() 44 return start1 - start2; in cmp_range() 48 #define MMCONF_MASK (~(MMCONF_UNIT - 1)) [all …]
|
| /kernel/linux/linux-4.19/arch/x86/kernel/ |
| D | mmconf-fam10h_64.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <linux/range.h> 13 #include <asm/pci-direct.h> 22 u32 bus; member 37 const struct range *r1 = x1; in cmp_range() 38 const struct range *r2 = x2; in cmp_range() 41 start1 = r1->start >> 32; in cmp_range() 42 start2 = r2->start >> 32; in cmp_range() 44 return start1 - start2; in cmp_range() 48 #define MMCONF_MASK (~(MMCONF_UNIT - 1)) [all …]
|
| /kernel/linux/linux-5.10/Documentation/hwmon/ |
| D | tmp513.rst | 1 .. SPDX-License-Identifier: GPL-2.0 22 Eric Tremblay <etremblay@distech-controls.com> 25 ----------- 28 The TMP512 (dual-channel) and TMP513 (triple-channel) are system monitors 29 that include remote sensors, a local temperature sensor, and a high-side current 31 temperatures, on-chip temperatures, and system voltage/power/current 34 The temperatures are measured in degrees Celsius with a range of 35 -40 to + 125 degrees with a resolution of 0.0625 degree C. 39 hysteresis value. The hysteresis is in degrees Celsius with a range of 44 **temp[1-4]_input** [all …]
|
| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/pci/ |
| D | host-generic-pci.txt | 3 Firmware-initialised PCI host controllers and PCI emulations, such as the 4 virtio-pci implementations found in kvmtool and other para-virtualised 17 - compatible : Must be "pci-host-cam-generic" or "pci-host-ecam-generic" 21 - device_type : Must be "pci". 23 - ranges : As described in IEEE Std 1275-1994, but must provide 24 at least a definition of non-prefetchable memory. One 28 - bus-range : Optional property (also described in IEEE Std 1275-1994) 29 to indicate the range of bus numbers for this controller. 32 - #address-cells : Must be 3. 34 - #size-cells : Must be 2. [all …]
|
| /kernel/linux/linux-4.19/drivers/pci/controller/ |
| D | pci-xgene.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * APM X-Gene PCIe Driver 20 #include <linux/pci-acpi.h> 21 #include <linux/pci-ecam.h> 77 return readl(port->csr_base + reg); in xgene_pcie_readl() 82 writel(val, port->csr_base + reg); in xgene_pcie_writel() 90 static inline struct xgene_pcie_port *pcie_bus_to_port(struct pci_bus *bus) in pcie_bus_to_port() argument 95 return (struct xgene_pcie_port *)(bus->sysdata); in pcie_bus_to_port() 97 cfg = bus->sysdata; in pcie_bus_to_port() 98 return (struct xgene_pcie_port *)(cfg->priv); in pcie_bus_to_port() [all …]
|
| D | pci-v3-semi.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Support for V3 Semiconductor PCI Local Bus to PCI Bridge 6 * Based on the code from arch/arm/mach-integrator/pci_v3.c 8 * Copyright (C) 2000-2001 Deep Blue Solutions Ltd 136 /* PCI BASE bits (PCI -> Local Bus) */ 143 /* PCI MAP bits (PCI -> Local bus) */ 152 /* LB_BASE0,1 bits (Local bus -> PCI) */ 174 /* LB_MAP0,1 bits (Local bus -> PCI) */ 187 /* LB_BASE2 bits (Local bus -> PCI IO) */ 194 /* LB_MAP2 bits (Local bus -> PCI IO) */ [all …]
|
| /kernel/linux/linux-5.10/arch/sparc/kernel/ |
| D | of_device_common.c | 1 // SPDX-License-Identifier: GPL-2.0-only 20 if (!op || index >= op->archdata.num_irqs) in irq_of_parse_and_map() 23 return op->archdata.irqs[index]; in irq_of_parse_and_map() 32 if (!op || index >= op->num_resources) in of_address_to_resource() 33 return -EINVAL; in of_address_to_resource() 35 memcpy(r, &op->archdata.resource[index], sizeof(*r)); in of_address_to_resource() 45 if (!op || index >= op->num_resources) in of_iomap() 48 r = &op->archdata.resource[index]; in of_iomap() 50 return of_ioremap(r, 0, resource_size(r), (char *) r->name); in of_iomap() 55 * BUS and propagate to all child platform_device objects. [all …]
|
| /kernel/linux/linux-4.19/arch/sparc/kernel/ |
| D | of_device_common.c | 19 if (!op || index >= op->archdata.num_irqs) in irq_of_parse_and_map() 22 return op->archdata.irqs[index]; in irq_of_parse_and_map() 31 if (!op || index >= op->num_resources) in of_address_to_resource() 32 return -EINVAL; in of_address_to_resource() 34 memcpy(r, &op->archdata.resource[index], sizeof(*r)); in of_address_to_resource() 44 if (!op || index >= op->num_resources) in of_iomap() 47 r = &op->archdata.resource[index]; in of_iomap() 49 return of_ioremap(r, 0, resource_size(r), (char *) r->name); in of_iomap() 54 * BUS and propagate to all child platform_device objects. 56 void of_propagate_archdata(struct platform_device *bus) in of_propagate_archdata() argument [all …]
|
| /kernel/linux/linux-5.10/arch/powerpc/platforms/powernv/ |
| D | pci-cxl.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright 2014-2016 IBM Corp. 7 #include <asm/pnv-pci.h> 14 struct pci_controller *hose = pci_bus_to_host(dev->bus); in pnv_phb_to_cxl_mode() 15 struct pnv_phb *phb = hose->private_data; in pnv_phb_to_cxl_mode() 21 return -ENODEV; in pnv_phb_to_cxl_mode() 25 rc = opal_pci_set_phb_cxl_mode(phb->opal_id, mode, pe->pe_number); in pnv_phb_to_cxl_mode() 27 dev_err(&dev->dev, "Required cxl mode not supported by firmware - update skiboot\n"); in pnv_phb_to_cxl_mode() 29 dev_err(&dev->dev, "opal_pci_set_phb_cxl_mode failed: %i\n", rc); in pnv_phb_to_cxl_mode() 40 struct pci_controller *hose = pci_bus_to_host(dev->bus); in pnv_cxl_alloc_hwirqs() [all …]
|
| /kernel/linux/linux-4.19/arch/powerpc/platforms/powernv/ |
| D | pci-cxl.c | 2 * Copyright 2014-2016 IBM Corp. 11 #include <asm/pnv-pci.h> 18 struct pci_controller *hose = pci_bus_to_host(dev->bus); in pnv_phb_to_cxl_mode() 19 struct pnv_phb *phb = hose->private_data; in pnv_phb_to_cxl_mode() 25 return -ENODEV; in pnv_phb_to_cxl_mode() 29 rc = opal_pci_set_phb_cxl_mode(phb->opal_id, mode, pe->pe_number); in pnv_phb_to_cxl_mode() 31 dev_err(&dev->dev, "Required cxl mode not supported by firmware - update skiboot\n"); in pnv_phb_to_cxl_mode() 33 dev_err(&dev->dev, "opal_pci_set_phb_cxl_mode failed: %i\n", rc); in pnv_phb_to_cxl_mode() 44 struct pci_controller *hose = pci_bus_to_host(dev->bus); in pnv_cxl_alloc_hwirqs() 45 struct pnv_phb *phb = hose->private_data; in pnv_cxl_alloc_hwirqs() [all …]
|