/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ |
H A D | ga100.c | 39 return (chan->cgrp->runl->doorbell << 16) | chan->id; in ga100_chan_doorbell_handle() 45 struct nvkm_runl *runl = chan->cgrp->runl; in ga100_chan_stop() 47 nvkm_wr32(runl->fifo->engine.subdev.device, runl->chan + (chan->id * 4), 0x00000003); in ga100_chan_stop() 53 struct nvkm_runl *runl = chan->cgrp->runl; in ga100_chan_start() 54 struct nvkm_device *device = runl->fifo->engine.subdev.device; in ga100_chan_start() local 57 nvkm_wr32(device, runl->chan + (chan->id * 4), 0x00000002); in ga100_chan_start() 58 nvkm_wr32(device, runl->addr + 0x0090, (gfid << 16) | chan->id); /* INTERNAL_DOORBELL. */ in ga100_chan_start() 64 struct nvkm_runl *runl = chan->cgrp->runl; in ga100_chan_unbind() 66 nvkm_wr32(runl->fifo->engine.subdev.device, runl->chan + (chan->id * 4), 0xffffffff); in ga100_chan_unbind() 74 nvkm_kmap(chan->inst); in ga100_chan_ramfc_write() [all …]
|
/linux/lib/ |
H A D | devres.c | 1 // SPDX-License-Identifier: GPL-2.0 3 #include <linux/device.h> 19 void devm_ioremap_release(struct device *dev, void *res) in devm_ioremap_release() 24 static int devm_ioremap_match(struct device *dev, void *res, void *match_data) in devm_ioremap_match() 29 static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset, in __devm_ioremap() 33 void __iomem **ptr, *addr = NULL; in __devm_ioremap() 42 addr = ioremap(offset, size); in __devm_ioremap() 45 addr in __devm_ioremap() 30 void __iomem **ptr, *addr = NULL; __devm_ioremap() local 113 devm_iounmap(struct device * dev,void __iomem * addr) devm_iounmap() argument 279 void __iomem **ptr, *addr; devm_ioport_map() local 305 devm_ioport_unmap(struct device * dev,void __iomem * addr) devm_ioport_unmap() argument [all...] |
/linux/drivers/net/phy/ |
H A D | mdio_bus.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 #include <linux/device.h> 40 #include "mdio-boardinfo.h" 45 mdiodev->reset_gpio = gpiod_get_optional(&mdiodev->dev, in mdiobus_register_gpiod() 47 if (IS_ERR(mdiodev->reset_gpio)) in mdiobus_register_gpiod() 48 return PTR_ERR(mdiodev->reset_gpio); in mdiobus_register_gpiod() 50 if (mdiodev->reset_gpio) in mdiobus_register_gpiod() 51 gpiod_set_consumer_name(mdiodev->reset_gpio, "PHY reset"); in mdiobus_register_gpiod() 60 reset = reset_control_get_optional_exclusive(&mdiodev->dev, "phy"); in mdiobus_register_reset() 64 mdiodev->reset_ctrl = reset; in mdiobus_register_reset() [all …]
|
/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 …]
|
/linux/include/trace/events/ |
H A D | habanalabs.h | 1 /* SPDX-License-Identifier: GPL-2.0 3 * Copyright 2022-2023 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_add [all...] |
/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 …]
|
/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, const 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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/linux/drivers/gpio/ |
H A D | gpio-f7188x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * GPIO driver for Fintek and Nuvoton Super-I/O chips 5 * Copyright (C) 2010-2013 LaCie 10 #define DRVNAME "gpio-f7188x" 21 * Super-I/O registers 23 #define SIO_LDSEL 0x07 /* Logical device select */ 24 #define SIO_DEVID 0x20 /* Device ID (2 bytes) */ 26 #define SIO_UNLOCK_KEY 0x87 /* Key to enable Super-I/O */ 27 #define SIO_LOCK_KEY 0xAA /* Key to disable Super-I/O */ 32 #define SIO_FINTEK_DEVREV 0x22 /* Fintek Device revision */ [all …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/linux/kernel/dma/ |
H A D | mapping.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * arch-independent dma-mapping routines 10 #include <linux/dma-map-ops.h> 13 #include <linux/iommu-dma.h> 40 static void dmam_release(struct device *dev, void *res) in dmam_release() 44 dma_free_attrs(dev, this->size, this->vaddr, this->dma_handle, in dmam_release() 45 this->attrs); in dmam_release() 48 static int dmam_match(struct device *dev, void *res, void *match_data) in dmam_match() 52 if (this->vaddr == match->vaddr) { in dmam_match() 53 WARN_ON(this->size != match->size || in dmam_match() [all …]
|
/linux/include/linux/ |
H A D | virtio_pci_modern.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 9 * struct virtio_pci_modern_device - info for modern PCI virtio 10 * @pci_dev: Ptr to the PCI device struct 12 * @device: Device-specific data (non-legacy mode) 13 * @notify_base: Base of vq notifications (non-legacy mode) 16 * @notify_len: So we can sanity-check accesses 17 * @device_len: So we can sanity-check accesses 18 * @notify_map_cap: Capability for when we need to map notifications per-vq 20 * (non-legacy mode). 22 * @id: Device and vendor id [all …]
|
/linux/net/ethernet/ |
H A D | eth.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * Ethernet-type device handling. 14 * Florian La Roche, <rzsfl@rz.uni-sb.de> 34 * Andrew Morton : 26Feb01: kill ether_setup() - use netdev_boot_setup(). 46 #include <linux/nvmem-consume 279 struct sockaddr *addr = p; eth_prepare_mac_addr_change() local 296 struct sockaddr *addr = p; eth_commit_mac_addr_change() local 389 sysfs_format_mac(char * buf,const unsigned char * addr,int len) sysfs_format_mac() argument 491 unsigned char *addr; eth_platform_get_mac_address() local 518 u8 addr[ETH_ALEN] __aligned(2); platform_get_ethdev_address() local 565 fwnode_get_mac_addr(struct fwnode_handle * fwnode,const char * name,char * addr) fwnode_get_mac_addr() argument 600 fwnode_get_mac_address(struct fwnode_handle * fwnode,char * addr) fwnode_get_mac_address() argument 616 device_get_mac_address(struct device * dev,char * addr) device_get_mac_address() argument 632 u8 addr[ETH_ALEN]; device_get_ethdev_address() local [all...] |
/linux/include/linux/mmc/ |
H A D | sdio_func.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 5 * Copyright 2007-2008 Pierre Ossman 11 #include <linux/device.h> 35 struct mmc_card *card; /* the card this device belongs to */ 36 struct device dev; /* the device */ 42 unsigned short device; /* device id */ member 62 #define sdio_func_present(f) ((f)->state & SDIO_STATE_PRESENT) 64 #define sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT) 66 #define sdio_func_id(f) (dev_name(&(f)->dev)) 68 #define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) [all …]
|
/linux/arch/mips/kvm/ |
H A D | loongson_ipi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Loongson-3 Virtual IPI interrupt support. 54 gpa_t addr, int len, void *val) in loongson_vipi_read() argument 56 uint32_t core = (addr >> 8) & 3; in loongson_vipi_read() 57 uint32_t node = (addr >> 44) & 3; in loongson_vipi_read() 59 uint64_t offset = addr & 0xff; in loongson_vipi_read() 61 struct ipi_state *s = &(ipi->ipistate[id]); in loongson_vipi_read() 63 BUG_ON(offset & (len - 1)); in loongson_vipi_read() 67 *(uint64_t *)val = s->status; in loongson_vipi_read() 71 *(uint64_t *)val = s->en; in loongson_vipi_read() [all …]
|
/linux/drivers/usb/gadget/udc/ |
H A D | udc-xilinx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 8 * Copyright (C) 2010 - 2014 Xilinx, Inc. 10 * Some parts of this driver code is based on the driver for at91-series 16 #include <linux/device.h> 17 #include <linux/dma-mapping.h> 27 /* Register offsets for the USB device.*/ 40 #define XUSB_DMA_DDAR_ADDR_OFFSET 0x020C /* DMA destination Addr Reg */ 82 /* USB device specific global configuration constants.*/ 109 * struct xusb_req - Xilinx USB device request structure 111 * @queue: usb device request queue [all …]
|