/openbmc/linux/drivers/staging/media/atomisp/pci/hive_isp_css_include/device_access/ |
H A D | device_access.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 4 Copyright (c) 2010 - 2015, Intel Corporation. 30 * The device base address. This offset must be added 33 * "store" is a transfer to the device 34 * "load" is a transfer from the device 41 * - hrt_address a type that can hold the (sub)system address range 46 * a pointer because a (say) 64-bit host can be simulated in a 32-bit 72 /*! Read an 8-bit value from a device register or memory in the device 74 \param addr[in] Local address 76 \return device[addr] [all …]
|
/openbmc/linux/net/core/ |
H A D | dev_addr_lists.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * net/core/dev_addr_lists.c - Functions for handling net device lists 6 * This file contains functions for working with unicast, multicast and device 24 struct rb_node **ins_point = &list->tree.rb_node, *parent = NULL; in __hw_addr_insert() 31 diff = memcmp(new->addr, ha->addr, addr_len); in __hw_addr_insert() 33 diff = memcmp(&new->type, &ha->type, sizeof(new->type)); in __hw_addr_insert() 37 ins_point = &parent->rb_left; in __hw_addr_insert() 39 ins_point = &parent->rb_right; in __hw_addr_insert() 41 return -EEXIST; in __hw_addr_insert() 44 rb_link_node_rcu(&new->node, parent, ins_point); in __hw_addr_insert() [all …]
|
/openbmc/linux/drivers/peci/ |
H A D | device.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 // Copyright (c) 2018-2021 Intel Corporation 6 #include <linux/peci-cpu.h> 12 * PECI device can be removed using sysfs, but the removal can also happen as 14 * Mutex is used to protect PECI device from being double-deleted. 19 static int peci_get_revision(struct peci_device *device, u8 *revision) in peci_get_revision() argument 24 req = peci_xfer_get_dib(device); in peci_get_revision() 29 * PECI device may be in a state where it is unable to return a proper in peci_get_revision() 37 return -EIO; in peci_get_revision() 47 static int peci_get_cpu_id(struct peci_device *device, u32 *cpu_id) in peci_get_cpu_id() argument [all …]
|
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H A D | shadowramin.c | 33 struct nvkm_device *device = bios->subdev.device; in pramin_read() local 37 *(u32 *)&bios->data[i] = nvkm_rd32(device, 0x700000 + i); in pramin_read() 48 struct nvkm_device *device = priv->bios->subdev.device; in pramin_fini() local 49 nvkm_wr32(device, 0x001700, priv->bar0); in pramin_fini() 57 struct nvkm_subdev *subdev = &bios->subdev; in pramin_init() 58 struct nvkm_device *device = subdev->device; in pramin_init() local 60 u64 addr = 0; in pramin_init() local 63 if (device->card_type < NV_50) in pramin_init() 67 if (device->card_type >= GA100) in pramin_init() 68 addr = device->chipset == 0x170; /*XXX: find the fuse reg for this */ in pramin_init() [all …]
|
/openbmc/phosphor-power/tools/i2c/ |
H A D | i2c_interface.hpp | 19 uint8_t addr, int errorCode = 0) : in I2CException() argument 20 bus(bus), addr(addr), errorCode(errorCode) in I2CException() 23 ss << "I2CException: " << info << ": bus " << bus << ", addr 0x" in I2CException() 24 << std::hex << static_cast<int>(addr); in I2CException() 39 uint8_t addr; member in i2c::I2CException 49 * Closes the I2C interface to the device if necessary. 67 /** @brief Open the I2C interface to the device 75 /** @brief Indicates whether the I2C interface to the device is open 81 /** @brief Close the I2C interface to the device 83 * The interface can later be re-opened by calling open(). [all …]
|
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ |
H A D | ga100.c | 38 return (chan->cgrp->runl->doorbell << 16) | chan->id; in ga100_chan_doorbell_handle() 44 struct nvkm_runl *runl = chan->cgrp->runl; in ga100_chan_stop() 46 nvkm_wr32(runl->fifo->engine.subdev.device, runl->chan + (chan->id * 4), 0x00000003); in ga100_chan_stop() 52 struct nvkm_runl *runl = chan->cgrp->runl; in ga100_chan_start() 53 struct nvkm_device *device = runl->fifo->engine.subdev.device; in ga100_chan_start() local 56 nvkm_wr32(device, runl->chan + (chan->id * 4), 0x00000002); in ga100_chan_start() 57 nvkm_wr32(device, runl->addr + 0x0090, (gfid << 16) | chan->id); /* INTERNAL_DOORBELL. */ in ga100_chan_start() 63 struct nvkm_runl *runl = chan->cgrp->runl; in ga100_chan_unbind() 65 nvkm_wr32(runl->fifo->engine.subdev.device, runl->chan + (chan->id * 4), 0xffffffff); in ga100_chan_unbind() 73 nvkm_kmap(chan->inst); in ga100_chan_ramfc_write() [all …]
|
/openbmc/u-boot/include/dm/ |
H A D | fdtaddr.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 18 * devfdt_get_addr() - Get the reg property of a device 20 * @dev: Pointer to a device 22 * @return addr 27 * devfdt_get_addr_ptr() - Return pointer to the address of the reg property 28 * of a device 30 * @dev: Pointer to a device 32 * @return Pointer to addr, or NULL if there is no such property 37 * devfdt_remap_addr() - Return pointer to the memory-mapped I/O address 38 * of the reg property of a device [all …]
|
/openbmc/linux/include/trace/events/ |
H A D | habanalabs.h | 1 /* SPDX-License-Identifier: GPL-2.0 3 * Copyright 2016-2021 HabanaLabs, Ltd. 17 TP_PROTO(struct device *dev, u64 virt_addr, u64 phys_addr, u32 page_size, bool flush_pte), 31 __entry->virt_addr = virt_addr; 32 __entry->phys_addr = phys_addr; 33 __entry->page_size = page_size; 34 __entry->flush_pte = flush_pte; 39 __entry->virt_addr, 40 __entry->phys_addr, 41 __entry->page_size, [all …]
|
/openbmc/linux/drivers/net/phy/ |
H A D | mdio_bus.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 #include <linux/device.h> 42 #include "mdio-boardinfo.h" 47 mdiodev->reset_gpio = gpiod_get_optional(&mdiodev->dev, in mdiobus_register_gpiod() 49 if (IS_ERR(mdiodev->reset_gpio)) in mdiobus_register_gpiod() 50 return PTR_ERR(mdiodev->reset_gpio); in mdiobus_register_gpiod() 52 if (mdiodev->reset_gpio) in mdiobus_register_gpiod() 53 gpiod_set_consumer_name(mdiodev->reset_gpio, "PHY reset"); in mdiobus_register_gpiod() 62 reset = reset_control_get_optional_exclusive(&mdiodev->dev, "phy"); in mdiobus_register_reset() 66 mdiodev->reset_ctrl = reset; in mdiobus_register_reset() [all …]
|
/openbmc/linux/lib/ |
H A D | devres.c | 1 // SPDX-License-Identifier: GPL-2.0 16 void devm_ioremap_release(struct device *dev, void *res) in devm_ioremap_release() 21 static int devm_ioremap_match(struct device *dev, void *res, void *match_data) in devm_ioremap_match() 26 static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset, in __devm_ioremap() 30 void __iomem **ptr, *addr = NULL; in __devm_ioremap() local 39 addr = ioremap(offset, size); in __devm_ioremap() 42 addr = ioremap_uc(offset, size); in __devm_ioremap() 45 addr = ioremap_wc(offset, size); in __devm_ioremap() 48 addr = ioremap_np(offset, size); in __devm_ioremap() 52 if (addr) { in __devm_ioremap() [all …]
|
/openbmc/linux/drivers/net/ethernet/huawei/hinic/ |
H A D | hinic_hw_if.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 #include <linux/device.h> 20 #define VALID_MSIX_IDX(attr, msix_index) ((msix_index) < (attr)->num_irqs) 27 * hinic_msix_attr_set - set message attribute for msix entry 28 * @hwif: the HW interface of a pci function device 36 * Return 0 - Success, negative - Failure 43 u32 msix_ctrl, addr; in hinic_msix_attr_set() local 45 if (!VALID_MSIX_IDX(&hwif->attr, msix_index)) in hinic_msix_attr_set() 46 return -EINVAL; in hinic_msix_attr_set() 54 addr = HINIC_CSR_MSIX_CTRL_ADDR(msix_index); in hinic_msix_attr_set() [all …]
|
/openbmc/linux/drivers/spmi/ |
H A D | spmi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. 16 #include <dt-bindings/spmi/spmi.h> 23 static void spmi_dev_release(struct device *dev) in spmi_dev_release() 34 static void spmi_ctrl_release(struct device *dev) in spmi_ctrl_release() 38 ida_free(&ctrl_ida, ctrl->nr); in spmi_ctrl_release() 46 static int spmi_device_match(struct device *dev, struct device_driver *drv) in spmi_device_match() 51 if (drv->name) in spmi_device_match() 52 return strncmp(dev_name(dev), drv->name, in spmi_device_match() 59 * spmi_device_add() - add a device previously constructed via spmi_device_alloc() [all …]
|
/openbmc/linux/drivers/net/ethernet/stmicro/stmmac/ |
H A D | stmmac_mdio.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 STMMAC Ethernet Driver -- MDIO bus implementation 6 Copyright (C) 2007-2009 STMicroelectronics Ltd 54 tmp = readl(priv->ioaddr + XGMAC_MDIO_C22P); in stmmac_xgmac2_c45_format() 56 writel(tmp, priv->ioaddr + XGMAC_MDIO_C22P); in stmmac_xgmac2_c45_format() 67 if (priv->synopsys_id < DWXGMAC_CORE_2_20) { in stmmac_xgmac2_c22_format() 68 /* Until ver 2.20 XGMAC does not support C22 addr >= 4. Those in stmmac_xgmac2_c22_format() 71 tmp = readl(priv->ioaddr + XGMAC_MDIO_C22P); in stmmac_xgmac2_c22_format() 76 writel(tmp, priv->ioaddr + XGMAC_MDIO_C22P); in stmmac_xgmac2_c22_format() 81 static int stmmac_xgmac2_mdio_read(struct stmmac_priv *priv, u32 addr, in stmmac_xgmac2_mdio_read() argument [all …]
|
/openbmc/linux/include/linux/mtd/ |
H A D | spinand.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Copyright (c) 2016-2017 Micron Technology, Inc. 13 #include <linux/device.h> 17 #include <linux/spi/spi-mem.h> 53 #define SPINAND_BLK_ERASE_OP(addr) \ argument 55 SPI_MEM_OP_ADDR(3, addr, 1), \ 59 #define SPINAND_PAGE_READ_OP(addr) \ argument 61 SPI_MEM_OP_ADDR(3, addr, 1), \ 65 #define SPINAND_PAGE_READ_FROM_CACHE_OP(fast, addr, ndummy, buf, len) \ argument 67 SPI_MEM_OP_ADDR(2, addr, 1), \ [all …]
|
/openbmc/linux/drivers/net/dsa/mv88e6xxx/ |
H A D | trace.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 11 #include <linux/device.h> 17 TP_PROTO(const struct device *dev, int spid, u16 portvec, 18 const unsigned char *addr, u16 fid), 20 TP_ARGS(dev, spid, portvec, addr, fid), 26 __array(unsigned char, addr, ETH_ALEN) 32 __entry->spid = spid; 33 __entry->portvec = portvec; 34 memcpy(__entry->addr, addr, ETH_ALEN); 35 __entry->fid = fid; [all …]
|
/openbmc/linux/drivers/media/usb/em28xx/ |
H A D | em28xx-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // em28xx-i2c.c - driver for Empia EM2800/EM2820/2840 USB video capture devices 20 #include <media/v4l2-common.h> 23 /* ----------------------------------------------------------- */ 35 dev_printk(KERN_DEBUG, &dev->intf->dev, \ 41 * 35ms is the maximum time a SMBUS device could wait when 54 switch (dev->i2c_speed & 0x03) { in em28xx_i2c_timeout() 71 * send up to 4 bytes to the em2800 i2c device 73 static int em2800_i2c_send_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) in em2800_i2c_send_bytes() argument 80 return -EOPNOTSUPP; in em2800_i2c_send_bytes() [all …]
|
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/ |
H A D | busnv50.c | 31 u32 addr; member 39 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_drive_scl() local 40 if (state) bus->data |= 0x01; in nv50_i2c_bus_drive_scl() 41 else bus->data &= 0xfe; in nv50_i2c_bus_drive_scl() 42 nvkm_wr32(device, bus->addr, bus->data); in nv50_i2c_bus_drive_scl() 49 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_drive_sda() local 50 if (state) bus->data |= 0x02; in nv50_i2c_bus_drive_sda() 51 else bus->data &= 0xfd; in nv50_i2c_bus_drive_sda() 52 nvkm_wr32(device, bus->addr, bus->data); in nv50_i2c_bus_drive_sda() 59 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_sense_scl() local [all …]
|
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/engine/ |
H A D | xtensa.c | 30 struct nvkm_xtensa *xtensa = nvkm_xtensa(oclass->engine); in nvkm_xtensa_oclass_get() 33 while (xtensa->func->sclass[c].oclass) { in nvkm_xtensa_oclass_get() 35 oclass->base = xtensa->func->sclass[index]; in nvkm_xtensa_oclass_get() 47 return nvkm_gpuobj_new(object->engine->subdev.device, 0x10000, align, in nvkm_xtensa_cclass_bind() 60 struct nvkm_subdev *subdev = &xtensa->engine.subdev; in nvkm_xtensa_intr() 61 struct nvkm_device *device = subdev->device; in nvkm_xtensa_intr() local 62 const u32 base = xtensa->addr; in nvkm_xtensa_intr() 63 u32 unk104 = nvkm_rd32(device, base + 0xd04); in nvkm_xtensa_intr() 64 u32 intr = nvkm_rd32(device, base + 0xc20); in nvkm_xtensa_intr() 65 u32 chan = nvkm_rd32(device, base + 0xc28); in nvkm_xtensa_intr() [all …]
|
/openbmc/qemu/hw/core/ |
H A D | sysbus.c | 2 * System (CPU) Bus device support code 25 #include "exec/address-spaces.h" 35 /* Run func() for every sysbus device, traverse the tree for everything else */ 50 find->func(sbdev, find->opaque); in find_sysbus_device() 70 container = container_get(qdev_get_machine(), "/peripheral-anon"); in foreach_dynamic_sysbus_device() 79 k->print_dev = sysbus_dev_print; in system_bus_class_init() 80 k->get_fw_dev_path = sysbus_get_fw_dev_path; in system_bus_class_init() 109 DeviceState *d = DEVICE(dev); in sysbus_get_connected_irq() 117 qdev_connect_gpio_out_named(DEVICE(dev), SYSBUS_DEVICE_GPIO_IRQ, n, irq); in sysbus_connect_irq() 119 if (sbd->connect_irq_notifier) { in sysbus_connect_irq() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/powerpc/fsl/ |
H A D | mpc5200.txt | 1 MPC5200 Device Tree Bindings 2 ---------------------------- 4 (c) 2006-2009 Secret Lab Technologies Ltd 8 ------------------ 9 For mpc5200 on-chip devices, the format for each compatible value is 10 <chip>-<device>[-<mode>]. The OS should be able to match a device driver 11 to the device based solely on the compatible value. If two drivers 21 "fsl,mpc5200-<device>". 27 To express this information as completely as possible, 5200B device trees 29 compatible = "fsl,mpc5200b-<device>","fsl,mpc5200-<device>"; [all …]
|
/openbmc/ipmbbridge/ |
H A D | README.md | 10 "slave-path": "/dev/ipmb-4", 11 "bmc-addr": 32, 12 "remote-addr": 44 16 "slave-path": "/dev/ipmb-9", 17 "bmc-addr": 32, 18 "remote-addr": 96 31 "slave-path": "/dev/ipmb-1", 32 "bmc-addr": 32, 33 "remote-addr": 64, 38 "slave-path": "/dev/ipmb-3", [all …]
|
/openbmc/linux/drivers/cxl/core/ |
H A D | regs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 #include <linux/io-64-nonatomic-lo-hi.h> 4 #include <linux/device.h> 16 * CXL device capabilities are enumerated by PCI DVSEC (Designated 17 * Vendor-specific) and / or descriptors provided by platform firmware. 18 * They can be defined as a set like the device and component registers 19 * mandated by CXL Section 8.1.12.2 Memory Device PCIe Capabilities and 28 * cxl_probe_component_regs() - Detect CXL Component register blocks 29 * @dev: Host device of the @base mapping 34 * See CXL 2.0 8.2.5.5 CXL Device Register Interface [all …]
|
/openbmc/linux/drivers/input/rmi4/ |
H A D | rmi_bus.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Copyright (c) 2011-2016 Synaptics Incorporated 21 * struct rmi_function - represents the implementation of an RMI4 22 * function for a particular device (basically, a driver for that RMI4 function) 25 * @rmi_dev: Pointer to the RMI device associated with this function container 26 * @dev: The device associated with this particular function. 34 * @node: entry in device's list of functions 39 struct device dev; 50 bool rmi_is_function_device(struct device *dev); 56 * struct rmi_function_handler - driver routines for a particular RMI function. [all …]
|
/openbmc/linux/Documentation/i2c/ |
H A D | smbus-protocol.rst | 14 If you write a driver for some I2C device, please try to use the SMBus 15 commands if at all possible (if the device uses only that subset of the 16 I2C protocol). This makes it possible to use the device driver on both 28 transaction function, a device driver should always check (just once) for 44 Addr (7 bits) I2C 7 bit address. Note that this can be expanded to 47 the device. 52 [..] Data sent by I2C device, as opposed to data sent by the host 60 This sends a single bit to the device, at the place of the Rd/Wr bit:: 62 S Addr Rd/Wr [A] P 72 This reads a single byte from a device, without specifying a device [all …]
|
/openbmc/linux/drivers/infiniband/core/ |
H A D | cma.c | 1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB 4 * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. 5 * Copyright (c) 1999-2019, Mellanox Technologies, Inc. All rights reserved. 6 * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. 65 [RDMA_CM_EVENT_DEVICE_REMOVAL] = "device removal", 72 static void cma_iboe_set_mgid(struct sockaddr *addr, union ib_gid *mgid, 87 if (rdma_ib_or_roce(id->device, id->port_num)) in rdma_reject_msg() 90 if (rdma_protocol_iwarp(id->device, id->port_num)) in rdma_reject_msg() 99 * rdma_is_consumer_reject - return true if the consumer rejected the connect 106 if (rdma_ib_or_roce(id->device, id->port_num)) in rdma_is_consumer_reject() [all …]
|