| /kernel/linux/linux-4.19/drivers/pci/ |
| D | access.c | 1 // SPDX-License-Identifier: GPL-2.0 11 * This interrupt-safe spinlock protects all accesses to PCI 19 * alignment, do locking and call the low-level functions pointed to 20 * by pci_dev->ops. 35 #define PCI_OP_READ(size, type, len) \ argument 37 (struct pci_bus *bus, unsigned int devfn, int pos, type *value) \ 44 res = bus->ops->read(bus, devfn, pos, len, &data); \ 45 *value = (type)data; \ 50 #define PCI_OP_WRITE(size, type, len) \ argument 52 (struct pci_bus *bus, unsigned int devfn, int pos, type value) \ [all …]
|
| D | setup-bus.c | 1 // SPDX-License-Identifier: GPL-2.0 11 * PCI-PCI bridges cleanup, sorted resource allocation. 46 list_del(&dev_res->list); in free_list() 52 * add_to_list() - add a new resource tracker to the list 68 return -ENOMEM; in add_to_list() 70 tmp->res = res; in add_to_list() 71 tmp->dev = dev; in add_to_list() 72 tmp->start = res->start; in add_to_list() 73 tmp->end = res->end; in add_to_list() 74 tmp->flags = res->flags; in add_to_list() [all …]
|
| /kernel/linux/linux-5.10/drivers/bus/ |
| D | mips_cdmm.c | 2 * Bus driver for MIPS Common Device Memory Map (CDMM). 4 * Copyright (C) 2014-2015 Imagination Technologies Ltd. 45 /* Bus operations */ 53 for (; table->type; ++table) { in mips_cdmm_lookup() 54 ret = (dev->type == table->type); in mips_cdmm_lookup() 67 return mips_cdmm_lookup(cdrv->id_table, cdev) != NULL; in mips_cdmm_match() 75 retval = add_uevent_var(env, "CDMM_CPU=%u", cdev->cpu); in mips_cdmm_uevent() 79 retval = add_uevent_var(env, "CDMM_TYPE=0x%02x", cdev->type); in mips_cdmm_uevent() 83 retval = add_uevent_var(env, "CDMM_REV=%u", cdev->rev); in mips_cdmm_uevent() 87 retval = add_uevent_var(env, "MODALIAS=mipscdmm:t%02X", cdev->type); in mips_cdmm_uevent() [all …]
|
| /kernel/linux/linux-4.19/drivers/bus/ |
| D | mips_cdmm.c | 2 * Bus driver for MIPS Common Device Memory Map (CDMM). 4 * Copyright (C) 2014-2015 Imagination Technologies Ltd. 43 /* Bus operations */ 51 for (; table->type; ++table) { in mips_cdmm_lookup() 52 ret = (dev->type == table->type); in mips_cdmm_lookup() 65 return mips_cdmm_lookup(cdrv->id_table, cdev) != NULL; in mips_cdmm_match() 73 retval = add_uevent_var(env, "CDMM_CPU=%u", cdev->cpu); in mips_cdmm_uevent() 77 retval = add_uevent_var(env, "CDMM_TYPE=0x%02x", cdev->type); in mips_cdmm_uevent() 81 retval = add_uevent_var(env, "CDMM_REV=%u", cdev->rev); in mips_cdmm_uevent() 85 retval = add_uevent_var(env, "MODALIAS=mipscdmm:t%02X", cdev->type); in mips_cdmm_uevent() [all …]
|
| /kernel/linux/linux-5.10/include/linux/device/ |
| D | bus.h | 1 // SPDX-License-Identifier: GPL-2.0 3 * bus.h - the bus-specific portions of the driver model 5 * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org> 6 * Copyright (c) 2004-2009 Greg Kroah-Hartman <gregkh@suse.de> 7 * Copyright (c) 2008-2009 Novell Inc. 8 * Copyright (c) 2012-2019 Greg Kroah-Hartman <gregkh@linuxfoundation.org> 9 * Copyright (c) 2012-2019 Linux Foundation 11 * See Documentation/driver-api/driver-model/ for more information. 25 * struct bus_type - The bus type of the device 27 * @name: The name of the bus. [all …]
|
| /kernel/linux/linux-5.10/drivers/pci/ |
| D | access.c | 1 // SPDX-License-Identifier: GPL-2.0 11 * This interrupt-safe spinlock protects all accesses to PCI 19 * alignment, do locking and call the low-level functions pointed to 20 * by pci_dev->ops. 35 #define PCI_OP_READ(size, type, len) \ argument 37 (struct pci_bus *bus, unsigned int devfn, int pos, type *value) \ 44 res = bus->ops->read(bus, devfn, pos, len, &data); \ 45 *value = (type)data; \ 50 #define PCI_OP_WRITE(size, type, len) \ argument 52 (struct pci_bus *bus, unsigned int devfn, int pos, type value) \ [all …]
|
| D | setup-bus.c | 1 // SPDX-License-Identifier: GPL-2.0 11 * PCI-PCI bridges cleanup, sorted resource allocation. 47 list_del(&dev_res->list); in free_list() 53 * add_to_list() - Add a new resource tracker to the list 68 return -ENOMEM; in add_to_list() 70 tmp->res = res; in add_to_list() 71 tmp->dev = dev; in add_to_list() 72 tmp->start = res->start; in add_to_list() 73 tmp->end = res->end; in add_to_list() 74 tmp->flags = res->flags; in add_to_list() [all …]
|
| /kernel/linux/linux-4.19/sound/hda/ext/ |
| D | hdac_ext_stream.c | 2 * hdac-ext-stream.c - HD-audio extended stream operations. 27 * snd_hdac_ext_stream_init - initialize each stream (aka device) 28 * @bus: HD-audio core bus 29 * @stream: HD-audio ext core stream object to initialize 37 void snd_hdac_ext_stream_init(struct hdac_bus *bus, in snd_hdac_ext_stream_init() argument 41 if (bus->ppcap) { in snd_hdac_ext_stream_init() 42 stream->pphc_addr = bus->ppcap + AZX_PPHC_BASE + in snd_hdac_ext_stream_init() 45 stream->pplc_addr = bus->ppcap + AZX_PPLC_BASE + in snd_hdac_ext_stream_init() 46 AZX_PPLC_MULTI * bus->num_streams + in snd_hdac_ext_stream_init() 50 if (bus->spbcap) { in snd_hdac_ext_stream_init() [all …]
|
| /kernel/linux/linux-5.10/sound/hda/ext/ |
| D | hdac_ext_stream.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * hdac-ext-stream.c - HD-audio extended stream operations. 19 * snd_hdac_ext_stream_init - initialize each stream (aka device) 20 * @bus: HD-audio core bus 21 * @stream: HD-audio ext core stream object to initialize 29 void snd_hdac_ext_stream_init(struct hdac_bus *bus, in snd_hdac_ext_stream_init() argument 33 if (bus->ppcap) { in snd_hdac_ext_stream_init() 34 stream->pphc_addr = bus->ppcap + AZX_PPHC_BASE + in snd_hdac_ext_stream_init() 37 stream->pplc_addr = bus->ppcap + AZX_PPLC_BASE + in snd_hdac_ext_stream_init() 38 AZX_PPLC_MULTI * bus->num_streams + in snd_hdac_ext_stream_init() [all …]
|
| D | hdac_ext_bus.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * hdac-ext-bus.c - HD-audio extended core bus functions. 5 * Copyright (C) 2014-2015 Intel Corp 21 * snd_hdac_ext_bus_init - initialize a HD-audio extended bus 22 * @bus: the pointer to HDAC bus object 24 * @ops: bus verb operators 29 int snd_hdac_ext_bus_init(struct hdac_bus *bus, struct device *dev, in snd_hdac_ext_bus_init() argument 35 ret = snd_hdac_bus_init(bus, dev, ops); in snd_hdac_ext_bus_init() 39 bus->ext_ops = ext_ops; in snd_hdac_ext_bus_init() 41 * Currently only one bus is supported, if there is device with more in snd_hdac_ext_bus_init() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/ |
| D | base.c | 26 #include "bus.h" 40 list_for_each_entry(pad, &i2c->pad, head) { in nvkm_i2c_pad_find() 41 if (pad->id == id) in nvkm_i2c_pad_find() 51 struct nvkm_bios *bios = i2c->subdev.device->bios; in nvkm_i2c_bus_find() 52 struct nvkm_i2c_bus *bus; in nvkm_i2c_bus_find() local 68 list_for_each_entry(bus, &i2c->bus, head) { in nvkm_i2c_bus_find() 69 if (bus->id == id) in nvkm_i2c_bus_find() 70 return bus; in nvkm_i2c_bus_find() 81 list_for_each_entry(aux, &i2c->aux, head) { in nvkm_i2c_aux_find() 82 if (aux->id == id) in nvkm_i2c_aux_find() [all …]
|
| /kernel/linux/linux-4.19/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/ |
| D | base.c | 26 #include "bus.h" 40 list_for_each_entry(pad, &i2c->pad, head) { in nvkm_i2c_pad_find() 41 if (pad->id == id) in nvkm_i2c_pad_find() 51 struct nvkm_bios *bios = i2c->subdev.device->bios; in nvkm_i2c_bus_find() 52 struct nvkm_i2c_bus *bus; in nvkm_i2c_bus_find() local 68 list_for_each_entry(bus, &i2c->bus, head) { in nvkm_i2c_bus_find() 69 if (bus->id == id) in nvkm_i2c_bus_find() 70 return bus; in nvkm_i2c_bus_find() 81 list_for_each_entry(aux, &i2c->aux, head) { in nvkm_i2c_aux_find() 82 if (aux->id == id) in nvkm_i2c_aux_find() [all …]
|
| /kernel/linux/linux-5.10/arch/mips/pci/ |
| D | ops-bcm63xx.c | 15 #include "pci-bcm63xx.h" 64 static int bcm63xx_setup_cfg_access(int type, unsigned int busn, in bcm63xx_setup_cfg_access() argument 90 /* type 0 cycle for local bus, type 1 cycle for anything else */ in bcm63xx_setup_cfg_access() 91 if (type != 0) { in bcm63xx_setup_cfg_access() 92 /* FIXME: how to specify bus ??? */ in bcm63xx_setup_cfg_access() 100 static int bcm63xx_do_cfg_read(int type, unsigned int busn, in bcm63xx_do_cfg_read() argument 109 if (bcm63xx_setup_cfg_access(type, busn, devfn, where)) in bcm63xx_do_cfg_read() 121 static int bcm63xx_do_cfg_write(int type, unsigned int busn, in bcm63xx_do_cfg_write() argument 130 if (bcm63xx_setup_cfg_access(type, busn, devfn, where)) in bcm63xx_do_cfg_write() 147 static int bcm63xx_pci_read(struct pci_bus *bus, unsigned int devfn, in bcm63xx_pci_read() argument [all …]
|
| /kernel/linux/linux-4.19/arch/mips/pci/ |
| D | ops-bcm63xx.c | 15 #include "pci-bcm63xx.h" 64 static int bcm63xx_setup_cfg_access(int type, unsigned int busn, in bcm63xx_setup_cfg_access() argument 90 /* type 0 cycle for local bus, type 1 cycle for anything else */ in bcm63xx_setup_cfg_access() 91 if (type != 0) { in bcm63xx_setup_cfg_access() 92 /* FIXME: how to specify bus ??? */ in bcm63xx_setup_cfg_access() 100 static int bcm63xx_do_cfg_read(int type, unsigned int busn, in bcm63xx_do_cfg_read() argument 109 if (bcm63xx_setup_cfg_access(type, busn, devfn, where)) in bcm63xx_do_cfg_read() 121 static int bcm63xx_do_cfg_write(int type, unsigned int busn, in bcm63xx_do_cfg_write() argument 130 if (bcm63xx_setup_cfg_access(type, busn, devfn, where)) in bcm63xx_do_cfg_write() 147 static int bcm63xx_pci_read(struct pci_bus *bus, unsigned int devfn, in bcm63xx_pci_read() argument [all …]
|
| /kernel/linux/linux-5.10/Documentation/driver-api/driver-model/ |
| D | porting.rst | 12 Please refer to `Documentation/driver-api/driver-model/*.rst` for definitions of 16 at the bus driver layer. This was intentional, to minimize the 18 of bus drivers. 21 be embedded in larger, bus-specific objects. Fields in these generic 22 objects can replace fields in the bus-specific objects. 28 # mount -t sysfs sysfs /sys 36 Step 1: Registering the bus driver. 39 - Define a struct bus_type for the bus driver:: 46 - Register the bus type. 48 This should be done in the initialization function for the bus type, [all …]
|
| D | bus.rst | 2 Bus Types 9 int bus_register(struct bus_type * bus); 15 Each bus type in the kernel (PCI, USB, etc) should declare one static 16 object of this type. They must initialize the name field, and may 32 When a bus driver is initialized, it calls bus_register. This 33 initializes the rest of the fields in the bus object and inserts it 34 into a global list of bus types. Once the bus object is registered, 35 the fields in it are usable by the bus driver. 45 them are inherently bus-specific. Drivers typically declare an array 46 of device IDs of devices they support that reside in a bus-specific [all …]
|
| /kernel/linux/linux-4.19/Documentation/driver-model/ |
| D | porting.txt | 11 Please refer to Documentation/driver-model/*.txt for definitions of 15 at the bus driver layer. This was intentional, to minimize the 17 of bus drivers. 20 be embedded in larger, bus-specific objects. Fields in these generic 21 objects can replace fields in the bus-specific objects. 27 # mount -t sysfs sysfs /sys 35 Step 1: Registering the bus driver. 38 - Define a struct bus_type for the bus driver. 45 - Register the bus type. 46 This should be done in the initialization function for the bus type, [all …]
|
| D | bus.txt | 2 Bus Types 8 int bus_register(struct bus_type * bus); 14 Each bus type in the kernel (PCI, USB, etc) should declare one static 15 object of this type. They must initialize the name field, and may 31 When a bus driver is initialized, it calls bus_register. This 32 initializes the rest of the fields in the bus object and inserts it 33 into a global list of bus types. Once the bus object is registered, 34 the fields in it are usable by the bus driver. 44 them are inherently bus-specific. Drivers typically declare an array 45 of device IDs of devices they support that reside in a bus-specific [all …]
|
| /kernel/linux/linux-4.19/arch/powerpc/kernel/ |
| D | pci_of_scan.c | 19 #include <asm/pci-bridge.h> 23 * get_int_prop - Decode a u32 from a device tree property 37 * pci_parse_of_flags - Parse the flags cell of a device tree PCI address 57 * do a config space read, it will be force-enabled if needed in pci_parse_of_flags() 69 * of_pci_parse_addrs - Parse PCI addresses assigned in the device tree node 73 * This function parses the 'assigned-addresses' property of a PCI devices' 87 addrs = of_get_property(node, "assigned-addresses", &proplen); in of_pci_parse_addrs() 96 for (; proplen >= 20; proplen -= 20, addrs += 5) { in of_pci_parse_addrs() 110 res = &dev->resource[(i - PCI_BASE_ADDRESS_0) >> 2]; in of_pci_parse_addrs() 111 } else if (i == dev->rom_base_reg) { in of_pci_parse_addrs() [all …]
|
| /kernel/linux/linux-5.10/arch/arm/boot/dts/ |
| D | aspeed-bmc-opp-tacoma.dts | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 /dts-v1/; 5 #include "aspeed-g6.dtsi" 6 #include <dt-bindings/gpio/aspeed-gpio.h> 7 #include <dt-bindings/i2c/i2c.h> 8 #include <dt-bindings/leds/leds-pca955x.h> 12 compatible = "ibm,tacoma-bmc", "aspeed,ast2600"; 15 stdout-path = &uart5; 24 reserved-memory { 25 #address-cells = <1>; [all …]
|
| /kernel/linux/linux-4.19/arch/mips/include/asm/ |
| D | io.h | 7 * Copyright (C) 1994 - 2000, 06 Ralf Baechle 26 #include <asm/cpu-features.h> 27 #include <asm-generic/iomap.h> 29 #include <asm/pgtable-bits.h> 34 #include <mangle-port.h> 43 * operations are working on may or may not have been swapped by the bus 53 /* ioswab[bwlq], __mem_ioswab[bwlq] are defined in mangle-port.h */ 73 * Thanks to James van Artsdalen for a better timing-fix than 77 * On the other hand, I'd like to be sure of a non-existent port: 100 * virt_to_phys - map virtual addresses to physical [all …]
|
| /kernel/linux/linux-5.10/arch/mips/include/asm/ |
| D | io.h | 7 * Copyright (C) 1994 - 2000, 06 Ralf Baechle 27 #include <asm/cpu-features.h> 28 #include <asm-generic/iomap.h> 30 #include <asm/pgtable-bits.h> 33 #include <mangle-port.h> 37 * operations are working on may or may not have been swapped by the bus 52 /* ioswab[bwlq], __mem_ioswab[bwlq] are defined in mangle-port.h */ 81 * Enforce in-order execution of data I/O. In the MIPS architecture 82 * these are equivalent to corresponding platform-specific memory 92 * virt_to_phys - map virtual addresses to physical [all …]
|
| /kernel/linux/linux-5.10/drivers/i2c/busses/ |
| D | i2c-powermac.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 26 * SMBUS-type transfer entrypoint 36 struct pmac_i2c_bus *bus = i2c_get_adapdata(adap); in i2c_powermac_smbus_xfer() local 62 buf = &data->byte; in i2c_powermac_smbus_xfer() 67 local[0] = data->word & 0xff; in i2c_powermac_smbus_xfer() 68 local[1] = (data->word >> 8) & 0xff; in i2c_powermac_smbus_xfer() 78 * anywhere near a pmac i2c bus anyway ... in i2c_powermac_smbus_xfer() 86 buf = data->block; in i2c_powermac_smbus_xfer() 87 len = data->block[0] + 1; in i2c_powermac_smbus_xfer() 90 buf = &data->block[1]; in i2c_powermac_smbus_xfer() [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/dma/ |
| D | adi,axi-dmac.txt | 1 Analog Devices AXI-DMAC DMA controller 4 - compatible: Must be "adi,axi-dmac-1.00.a". 5 - reg: Specification for the controllers memory mapped register map. 6 - interrupts: Specification for the controllers interrupt. 7 - clocks: Phandle and specifier to the controllers AXI interface clock 8 - #dma-cells: Must be 1. 10 Required sub-nodes: 11 - adi,channels: This sub-node must contain a sub-node for each DMA channel. For 12 the channel sub-nodes the following bindings apply. They must match the 15 Required properties for adi,channels sub-node: [all …]
|
| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/dma/ |
| D | adi,axi-dmac.txt | 1 Analog Device AXI-DMAC DMA controller 4 - compatible: Must be "adi,axi-dmac-1.00.a". 5 - reg: Specification for the controllers memory mapped register map. 6 - interrupts: Specification for the controllers interrupt. 7 - clocks: Phandle and specifier to the controllers AXI interface clock 8 - #dma-cells: Must be 1. 10 Required sub-nodes: 11 - adi,channels: This sub-node must contain a sub-node for each DMA channel. For 12 the channel sub-nodes the following bindings apply. They must match the 15 Required properties for adi,channels sub-node: [all …]
|