| /OK3568_Linux_fs/kernel/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 …]
|
| /OK3568_Linux_fs/kernel/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 20 const unsigned char *addr, int addr_len, in __hw_addr_create_ex() argument 32 return -ENOMEM; in __hw_addr_create_ex() 33 memcpy(ha->addr, addr, addr_len); in __hw_addr_create_ex() 34 ha->type = addr_type; in __hw_addr_create_ex() 35 ha->refcount = 1; in __hw_addr_create_ex() 36 ha->global_use = global; in __hw_addr_create_ex() 37 ha->synced = sync ? 1 : 0; in __hw_addr_create_ex() [all …]
|
| /OK3568_Linux_fs/kernel/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 >= GM100) in pramin_init() 68 addr = nvkm_rd32(device, 0x021c04); in pramin_init() [all …]
|
| H A D | init.c | 42 nvkm_printk(init->subdev, lvl, info, "0x%08x[%c]: "fmt, \ 43 init->offset, init_exec(init) ? \ 44 '0' + (init->nested - 1) : ' ', ##args); \ 47 if (init->subdev->debug >= NV_DBG_TRACE) \ 61 return (init->execute == 1) || ((init->execute & 5) == 5); in init_exec() 67 if (exec) init->execute &= 0xfd; in init_exec_set() 68 else init->execute |= 0x02; in init_exec_set() 74 init->execute ^= 0x02; in init_exec_inv() 80 if (exec) init->execute |= 0x04; in init_exec_force() 81 else init->execute &= 0xfb; in init_exec_force() [all …]
|
| /OK3568_Linux_fs/kernel/lib/ |
| H A D | devres.c | 1 // SPDX-License-Identifier: GPL-2.0 15 void devm_ioremap_release(struct device *dev, void *res) in devm_ioremap_release() 20 static int devm_ioremap_match(struct device *dev, void *res, void *match_data) in devm_ioremap_match() 25 static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset, in __devm_ioremap() 29 void __iomem **ptr, *addr = NULL; in __devm_ioremap() local 37 addr = ioremap(offset, size); in __devm_ioremap() 40 addr = ioremap_uc(offset, size); in __devm_ioremap() 43 addr = ioremap_wc(offset, size); in __devm_ioremap() 47 if (addr) { in __devm_ioremap() 48 *ptr = addr; in __devm_ioremap() [all …]
|
| /OK3568_Linux_fs/kernel/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() 33 static void spmi_ctrl_release(struct device *dev) in spmi_ctrl_release() 36 ida_simple_remove(&ctrl_ida, ctrl->nr); in spmi_ctrl_release() 44 static int spmi_device_match(struct device *dev, struct device_driver *drv) in spmi_device_match() 49 if (drv->name) in spmi_device_match() 50 return strncmp(dev_name(dev), drv->name, in spmi_device_match() 57 * spmi_device_add() - add a device previously constructed via spmi_device_alloc() [all …]
|
| /OK3568_Linux_fs/kernel/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 …]
|
| /OK3568_Linux_fs/u-boot/include/linux/mtd/ |
| H A D | spinand.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Copyright (c) 2016-2017 Micron Technology, Inc. 14 #include <linux/device.h> 18 #include <linux/spi/spi-mem.h> 22 #include <spi-mem.h> 60 #define SPINAND_BLK_ERASE_OP(addr) \ argument 62 SPI_MEM_OP_ADDR(3, addr, 1), \ 66 #define SPINAND_PAGE_READ_OP(addr) \ argument 68 SPI_MEM_OP_ADDR(3, addr, 1), \ 72 #define SPINAND_PAGE_READ_FROM_CACHE_OP(fast, addr, ndummy, buf, len) \ argument [all …]
|
| /OK3568_Linux_fs/kernel/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 29 #include "tuner-xc2028.h" 30 #include <media/v4l2-common.h> 33 /* ----------------------------------------------------------- */ 45 dev_printk(KERN_DEBUG, &dev->intf->dev, \ 51 * 35ms is the maximum time a SMBUS device could wait when 64 switch (dev->i2c_speed & 0x03) { in em28xx_i2c_timeout() 81 * send up to 4 bytes to the em2800 i2c device 83 static int em2800_i2c_send_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) in em2800_i2c_send_bytes() argument [all …]
|
| /OK3568_Linux_fs/u-boot/include/ |
| H A D | pci.h | 2 * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com> 8 * SPDX-License-Identifier: GPL-2.0+ 18 * Under PCI, each device has 256 bytes of configuration address space, 33 #define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */ 39 #define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */ 55 #define PCI_CLASS_DEVICE 0x0a /* Device class */ 56 #define PCI_CLASS_CODE 0x0b /* Device class code */ 75 /* Base Class 0x12 - 0xFE is reserved */ 78 #define PCI_CLASS_SUB_CODE 0x0a /* Device sub-class code */ 228 /* 0x35-0x3b are reserved */ [all …]
|
| /OK3568_Linux_fs/kernel/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. 64 [RDMA_CM_EVENT_DEVICE_REMOVAL] = "device removal", 71 static void cma_iboe_set_mgid(struct sockaddr *addr, union ib_gid *mgid, 86 if (rdma_ib_or_roce(id->device, id->port_num)) in rdma_reject_msg() 89 if (rdma_protocol_iwarp(id->device, id->port_num)) in rdma_reject_msg() 98 * rdma_is_consumer_reject - return true if the consumer rejected the connect 105 if (rdma_ib_or_roce(id->device, id->port_num)) in rdma_is_consumer_reject() [all …]
|
| /OK3568_Linux_fs/kernel/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 …]
|
| /OK3568_Linux_fs/u-boot/include/dm/ |
| H A D | fdtaddr.h | 8 * SPDX-License-Identifier: GPL-2.0+ 19 * devfdt_get_addr() - Get the reg property of a device 21 * @dev: Pointer to a device 23 * @return addr 28 * devfdt_get_addr_ptr() - Return pointer to the address of the reg property 29 * of a device 31 * @dev: Pointer to a device 33 * @return Pointer to addr, or NULL if there is no such property 38 * devfdt_remap_addr_index() - Return indexed pointer to the memory-mapped 39 * I/O address of the reg property of a device [all …]
|
| /OK3568_Linux_fs/kernel/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 …]
|
| /OK3568_Linux_fs/kernel/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 …]
|
| /OK3568_Linux_fs/kernel/drivers/net/phy/ |
| H A D | mdio_bus.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 #include <linux/device.h> 41 #include "mdio-boardinfo.h" 46 mdiodev->reset_gpio = gpiod_get_optional(&mdiodev->dev, in mdiobus_register_gpiod() 48 if (IS_ERR(mdiodev->reset_gpio)) in mdiobus_register_gpiod() 49 return PTR_ERR(mdiodev->reset_gpio); in mdiobus_register_gpiod() 51 if (mdiodev->reset_gpio) in mdiobus_register_gpiod() 52 gpiod_set_consumer_name(mdiodev->reset_gpio, "PHY reset"); in mdiobus_register_gpiod() 61 reset = reset_control_get_optional_exclusive(&mdiodev->dev, "phy"); in mdiobus_register_reset() 65 mdiodev->reset_ctrl = reset; in mdiobus_register_reset() [all …]
|
| /OK3568_Linux_fs/kernel/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 …]
|
| /OK3568_Linux_fs/kernel/drivers/net/mdio/ |
| H A D | of_mdio.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 * This file provides helper functions for extracting PHY device information 8 * out of the OpenFirmware device tree and using it to populate an mii_bus. 11 #include <linux/device.h> 29 * ethernet-phy-idAAAA.BBBB */ 30 static int of_get_phy_id(struct device_node *device, u32 *phy_id) in of_get_phy_id() argument 36 of_property_for_each_string(device, "compatible", prop, cp) { in of_get_phy_id() 37 if (sscanf(cp, "ethernet-phy-id%4x.%4x", &upper, &lower) == 2) { in of_get_phy_id() 42 return -EINVAL; in of_get_phy_id() 52 if (err == -ENOENT) in of_find_mii_timestamper() [all …]
|
| /OK3568_Linux_fs/kernel/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 42 Addr (7 bits) I2C 7 bit address. Note that this can be expanded as usual to 45 the device. 50 [..] Data sent by I2C device, as opposed to data sent by the host 58 This sends a single bit to the device, at the place of the Rd/Wr bit:: 60 S Addr Rd/Wr [A] P 70 This reads a single byte from a device, without specifying a device [all …]
|
| /OK3568_Linux_fs/kernel/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> 29 static void dmam_release(struct device *dev, void *res) in dmam_release() 33 dma_free_attrs(dev, this->size, this->vaddr, this->dma_handle, in dmam_release() 34 this->attrs); in dmam_release() 37 static int dmam_match(struct device *dev, void *res, void *match_data) in dmam_match() 41 if (this->vaddr == match->vaddr) { in dmam_match() 42 WARN_ON(this->size != match->size || in dmam_match() 43 this->dma_handle != match->dma_handle); in dmam_match() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/s390/net/ |
| H A D | qeth_l3_sys.c | 1 // SPDX-License-Identifier: GPL-2.0 20 enum qeth_prot_versions proto, u8 *addr) in qeth_l3_string_to_ipaddr() argument 24 if ((proto == QETH_PROT_IPV4 && !in4_pton(buf, -1, addr, -1, &end)) || in qeth_l3_string_to_ipaddr() 25 (proto == QETH_PROT_IPV6 && !in6_pton(buf, -1, addr, -1, &end))) in qeth_l3_string_to_ipaddr() 26 return -EINVAL; in qeth_l3_string_to_ipaddr() 33 switch (route->type) { in qeth_l3_dev_route_show() 39 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO) in qeth_l3_dev_route_show() 44 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO) in qeth_l3_dev_route_show() 49 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO) in qeth_l3_dev_route_show() 58 static ssize_t qeth_l3_dev_route4_show(struct device *dev, in qeth_l3_dev_route4_show() [all …]
|
| /OK3568_Linux_fs/kernel/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 15 #include <linux/device.h> 16 #include <linux/dma-mapping.h> 28 /* Register offsets for the USB device.*/ 41 #define XUSB_DMA_DDAR_ADDR_OFFSET 0x020C /* DMA destination Addr Reg */ 83 /* USB device specific global configuration constants.*/ 110 * struct xusb_req - Xilinx USB device request structure 112 * @queue: usb device request queue [all …]
|
| /OK3568_Linux_fs/kernel/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 …]
|
| /OK3568_Linux_fs/kernel/include/trace/events/ |
| H A D | rpcrdma.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 39 __entry->cq_id = cid->ci_queue_id; 40 __entry->completion_id = cid->ci_completion_id; 41 __entry->status = wc->status; 42 if (wc->status) 43 __entry->vendor_err = wc->vendor_err; 45 __entry->vendor_err = 0; 49 __entry->cq_id, __entry->completion_id, 50 rdma_show_wc_status(__entry->status), 51 __entry->status, __entry->vendor_err [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/nouveau/nvkm/engine/pm/ |
| H A D | gf100.c | 131 struct nvkm_device *device = pm->engine.subdev.device; in gf100_perfctr_init() local 132 u32 log = ctr->logic_op; in gf100_perfctr_init() 137 src |= ctr->signal[i] << (i * 8); in gf100_perfctr_init() 139 nvkm_wr32(device, dom->addr + 0x09c, 0x00040002 | (dom->mode << 3)); in gf100_perfctr_init() 140 nvkm_wr32(device, dom->addr + 0x100, 0x00000000); in gf100_perfctr_init() 141 nvkm_wr32(device, dom->addr + 0x040 + (ctr->slot * 0x08), src); in gf100_perfctr_init() 142 nvkm_wr32(device, dom->addr + 0x044 + (ctr->slot * 0x08), log); in gf100_perfctr_init() 149 struct nvkm_device *device = pm->engine.subdev.device; in gf100_perfctr_read() local 151 switch (ctr->slot) { in gf100_perfctr_read() 152 case 0: ctr->ctr = nvkm_rd32(device, dom->addr + 0x08c); break; in gf100_perfctr_read() [all …]
|