| /OK3568_Linux_fs/kernel/drivers/net/phy/ |
| H A D | mdio_bus.c | 1 // SPDX-License-Identifier: GPL-2.0+ 2 /* MDIO Bus interface 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/sound/hda/ |
| H A D | hdac_bus.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * HD-audio core bus driver 23 * snd_hdac_bus_init - initialize a HD-audio bas bus 24 * @bus: the pointer to bus object 26 * @ops: bus verb operators 30 int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev, in snd_hdac_bus_init() argument 33 memset(bus, 0, sizeof(*bus)); in snd_hdac_bus_init() 34 bus->dev = dev; in snd_hdac_bus_init() 36 bus->ops = ops; in snd_hdac_bus_init() 38 bus->ops = &default_ops; in snd_hdac_bus_init() [all …]
|
| H A D | hdac_controller.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * HD-audio controller helpers 15 static void azx_clear_corbrp(struct hdac_bus *bus) in azx_clear_corbrp() argument 19 for (timeout = 1000; timeout > 0; timeout--) { in azx_clear_corbrp() 20 if (snd_hdac_chip_readw(bus, CORBRP) & AZX_CORBRP_RST) in azx_clear_corbrp() 25 dev_err(bus->dev, "CORB reset timeout#1, CORBRP = %d\n", in azx_clear_corbrp() 26 snd_hdac_chip_readw(bus, CORBRP)); in azx_clear_corbrp() 28 snd_hdac_chip_writew(bus, CORBRP, 0); in azx_clear_corbrp() 29 for (timeout = 1000; timeout > 0; timeout--) { in azx_clear_corbrp() 30 if (snd_hdac_chip_readw(bus, CORBRP) == 0) in azx_clear_corbrp() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/ |
| H A D | anx9805.c | 28 #include "bus.h" 32 struct nvkm_i2c_bus *bus; member 33 u8 addr; member 39 u8 addr; member 45 struct anx9805_bus *bus = anx9805_bus(base); in anx9805_bus_xfer() local 46 struct anx9805_pad *pad = bus->pad; in anx9805_bus_xfer() 47 struct i2c_adapter *adap = &pad->bus->i2c; in anx9805_bus_xfer() 49 int ret = -ETIMEDOUT; in anx9805_bus_xfer() 53 tmp = nvkm_rdi2cr(adap, pad->addr, 0x07) & ~0x10; in anx9805_bus_xfer() 54 nvkm_wri2cr(adap, pad->addr, 0x07, tmp | 0x10); in anx9805_bus_xfer() [all …]
|
| H A D | busnv50.c | 25 #include "bus.h" 31 u32 addr; member 38 struct nv50_i2c_bus *bus = nv50_i2c_bus(base); in nv50_i2c_bus_drive_scl() local 39 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_drive_scl() 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() 48 struct nv50_i2c_bus *bus = nv50_i2c_bus(base); in nv50_i2c_bus_drive_sda() local 49 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_drive_sda() 50 if (state) bus->data |= 0x02; in nv50_i2c_bus_drive_sda() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/pci/cx25821/ |
| H A D | cx25821-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 22 MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time"); 27 printk(KERN_DEBUG "%s/0: " fmt, dev->name, ##arg); \ 38 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_slave_did_ack() local 39 struct cx25821_dev *dev = bus->dev; in i2c_slave_did_ack() 40 return cx_read(bus->reg_stat) & 0x01; in i2c_slave_did_ack() 45 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_is_busy() local 46 struct cx25821_dev *dev = bus->dev; in i2c_is_busy() 47 return cx_read(bus->reg_stat) & 0x02 ? 1 : 0; in i2c_is_busy() 69 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_sendbytes() local [all …]
|
| /OK3568_Linux_fs/kernel/arch/powerpc/platforms/maple/ |
| H A D | pci.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 19 #include <asm/pci-bridge.h> 22 #include <asm/ppc-pci.h> 23 #include <asm/isa-bridge.h> 37 for (; node != 0;node = node->sibling) { in fixup_one_level_bus_range() 42 /* For PCI<->PCI bridges or CardBus bridges, we go down */ in fixup_one_level_bus_range() 43 class_code = of_get_property(node, "class-code", NULL); in fixup_one_level_bus_range() 47 bus_range = of_get_property(node, "bus-range", &len); in fixup_one_level_bus_range() 52 higher = fixup_one_level_bus_range(node->child, higher); in fixup_one_level_bus_range() 57 /* This routine fixes the "bus-range" property of all bridges in the [all …]
|
| /OK3568_Linux_fs/kernel/drivers/soundwire/ |
| H A D | bus.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2 // Copyright(c) 2015-17 Intel Corporation. 10 #include "bus.h" 15 static int sdw_get_id(struct sdw_bus *bus) in sdw_get_id() argument 22 bus->id = rc; in sdw_get_id() 27 * sdw_bus_master_add() - add a bus Master instance 28 * @bus: bus instance 32 * Initializes the bus instance, read properties and create child 35 int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent, in sdw_bus_master_add() argument 43 return -ENODEV; in sdw_bus_master_add() [all …]
|
| /OK3568_Linux_fs/u-boot/board/gdsys/common/ |
| H A D | phy.c | 5 * SPDX-License-Identifier: GPL-2.0+ 56 * - set RGMII receive timing to "receive clock transition when data stable" 57 * - set RGMII transmit timing to "transmit clock internally delayed" 58 * - set RGMII output impedance target to 78,8 Ohm 59 * - run output impedance calibration 60 * - set autonegotiation advertise to 1000FD only 103 * turn off SGMII auto-negotiation 121 static int process_setupcmd(const char *bus, unsigned char addr, in process_setupcmd() argument 125 u8 reg = setupcmd->reg; in process_setupcmd() 126 u16 data = setupcmd->data; in process_setupcmd() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/pci/controller/ |
| H A D | pci-thunder-ecam.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <linux/pci-ecam.h> 29 static int handle_ea_bar(u32 e0, int bar, struct pci_bus *bus, in handle_ea_bar() argument 32 void __iomem *addr; in handle_ea_bar() local 35 /* Entries are 16-byte aligned; bits[2,3] select word in entry */ in handle_ea_bar() 43 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar() 44 if (!addr) { in handle_ea_bar() 48 v = readl(addr); in handle_ea_bar() 50 v |= 2; /* EA entry-1. Base-L */ in handle_ea_bar() 58 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar() [all …]
|
| /OK3568_Linux_fs/u-boot/common/ |
| H A D | miiphyutil.c | 5 * SPDX-License-Identifier: GPL-2.0+ 9 * This provides a bit-banged interface to the ethernet MII management 51 if (strcmp(dev->name, devname) == 0) in miiphy_get_dev_by_name() 70 struct mii_dev *bus; in mdio_alloc() local 72 bus = malloc(sizeof(*bus)); in mdio_alloc() 73 if (!bus) in mdio_alloc() 74 return bus; in mdio_alloc() 76 memset(bus, 0, sizeof(*bus)); in mdio_alloc() 79 INIT_LIST_HEAD(&bus->link); in mdio_alloc() 81 return bus; in mdio_alloc() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/infiniband/hw/hfi1/ |
| H A D | qsfp.c | 24 * - Redistributions of source code must retain the above copyright 26 * - Redistributions in binary form must reproduce the above copyright 30 * - Neither the name of Intel Corporation nor the names of its 54 /* for the given bus number, return the CSR for reading an i2c line */ 60 /* for the given bus number, return the CSR for writing an i2c line */ 68 struct hfi1_i2c_bus *bus = (struct hfi1_i2c_bus *)data; in hfi1_setsda() local 69 struct hfi1_devdata *dd = bus->controlling_dd; in hfi1_setsda() 73 target_oe = i2c_oe_csr(bus->num); in hfi1_setsda() 92 struct hfi1_i2c_bus *bus = (struct hfi1_i2c_bus *)data; in hfi1_setscl() local 93 struct hfi1_devdata *dd = bus->controlling_dd; in hfi1_setscl() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/of/ |
| H A D | fdt_address.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * FDT Address translation based on u-boot fdt_support.c which in turn was 9 * Copyright 2010-2011 Freescale Semiconductor, Inc. 27 static void __init of_dump_addr(const char *s, const __be32 *addr, int na) in of_dump_addr() argument 30 while(na--) in of_dump_addr() 31 pr_cont(" %08x", *(addr++)); in of_dump_addr() 35 static void __init of_dump_addr(const char *s, const __be32 *addr, int na) { } in of_dump_addr() argument 38 /* Callbacks for bus specific translators */ 42 u64 (*map)(__be32 *addr, const __be32 *range, 44 int (*translate)(__be32 *addr, u64 offset, int na); [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/usb/cx231xx/ |
| H A D | cx231xx-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 cx231xx-i2c.c - driver for Conexant Cx23100/101/102 USB video capture devices 15 #include <linux/i2c-mux.h> 16 #include <media/v4l2-common.h> 20 /* ----------------------------------------------------------- */ 24 MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time"); 41 dev->name, __func__ , ##args); \ 48 return dev->port_3_switch_enabled ? I2C_1_MUX_3 : I2C_1_MUX_1; in get_real_i2c_port() 52 static inline bool is_tuner(struct cx231xx *dev, struct cx231xx_i2c *bus, in is_tuner() argument 55 int i2c_port = get_real_i2c_port(dev, bus->nr); in is_tuner() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/net/pcs/ |
| H A D | pcs-lynx.c | 1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 8 #include <linux/pcs-lynx.h> 36 struct mii_bus *bus = pcs->bus; in lynx_pcs_get_state_usxgmii() local 37 int addr = pcs->addr; in lynx_pcs_get_state_usxgmii() local 40 status = mdiobus_c45_read(bus, addr, MDIO_MMD_VEND2, MII_BMSR); in lynx_pcs_get_state_usxgmii() 44 state->link = !!(status & MDIO_STAT1_LSTATUS); in lynx_pcs_get_state_usxgmii() 45 state->an_complete = !!(status & MDIO_AN_STAT1_COMPLETE); in lynx_pcs_get_state_usxgmii() 46 if (!state->link || !state->an_complete) in lynx_pcs_get_state_usxgmii() 49 lpa = mdiobus_c45_read(bus, addr, MDIO_MMD_VEND2, MII_LPA); in lynx_pcs_get_state_usxgmii() 59 struct mii_bus *bus = pcs->bus; in lynx_pcs_get_state_2500basex() local [all …]
|
| /OK3568_Linux_fs/kernel/arch/sparc/kernel/ |
| H A D | pci_common.c | 1 // SPDX-License-Identifier: GPL-2.0 20 unsigned long bus, in config_out_of_range() argument 24 if (bus < pbm->pci_first_busno || in config_out_of_range() 25 bus > pbm->pci_last_busno) in config_out_of_range() 31 unsigned long bus, in sun4u_config_mkaddr() argument 35 unsigned long rbits = pbm->config_space_reg_bits; in sun4u_config_mkaddr() 37 if (config_out_of_range(pbm, bus, devfn, reg)) in sun4u_config_mkaddr() 40 reg = (reg & ((1 << rbits) - 1)); in sun4u_config_mkaddr() 42 bus <<= rbits + 8; in sun4u_config_mkaddr() 44 return (void *) (pbm->config_space | bus | devfn | reg); in sun4u_config_mkaddr() [all …]
|
| /OK3568_Linux_fs/kernel/sound/i2c/ |
| H A D | i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * (c) 1998 Gerd Knorr <kraxel@cs.tu-berlin.de> 25 static int snd_i2c_bit_probeaddr(struct snd_i2c_bus *bus, 26 unsigned short addr); 34 static int snd_i2c_bus_free(struct snd_i2c_bus *bus) in snd_i2c_bus_free() argument 39 if (snd_BUG_ON(!bus)) in snd_i2c_bus_free() 40 return -EINVAL; in snd_i2c_bus_free() 41 while (!list_empty(&bus->devices)) { in snd_i2c_bus_free() 42 device = snd_i2c_device(bus->devices.next); in snd_i2c_bus_free() 45 if (bus->master) in snd_i2c_bus_free() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/pci/cx23885/ |
| H A D | cx23885-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 15 #include <media/v4l2-common.h> 23 MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time"); 39 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_slave_did_ack() local 40 struct cx23885_dev *dev = bus->dev; in i2c_slave_did_ack() 41 return cx_read(bus->reg_stat) & 0x01; in i2c_slave_did_ack() 46 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_is_busy() local 47 struct cx23885_dev *dev = bus->dev; in i2c_is_busy() 48 return cx_read(bus->reg_stat) & 0x02 ? 1 : 0; in i2c_is_busy() 70 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_sendbytes() local [all …]
|
| /OK3568_Linux_fs/u-boot/include/ |
| H A D | i2c.h | 3 * Copyright (C) 2009 - 2013 Heiko Schocher <hs@denx.de> 9 * SPDX-License-Identifier: GPL-2.0+ 13 * AIRVENT SAM s.p.a - RIMINI(ITALY) 21 * For now there are essentially two parts to this file - driver model 29 DM_I2C_CHIP_10BIT = 1 << 0, /* Use 10-bit addressing */ 36 * struct dm_i2c_chip - information about an i2c chip 38 * An I2C chip is a device on the I2C bus. It sits at a particular address 39 * and normally supports 7-bit or 10-bit addressing. 44 * @chip_addr: Chip address on bus 62 * struct dm_i2c_bus- information about an i2c bus [all …]
|
| /OK3568_Linux_fs/external/rkwifibt/drivers/infineon/ |
| H A D | dhd_pcie.c | 2 * DHD Bus Module for PCIE 6 * Copyright (C) 1999-2017, Broadcom Corporation 27 * <<Broadcom-WL-IPTag/Open:>> 29 * $Id: dhd_pcie.c 702835 2017-06-05 07:19:55Z $ 120 #define DHD_PCIE_SHARED_MEMBER_ADDR(bus, member) \ argument 121 (bus)->shared_addr + OFFSETOF(pciedev_shared_t, member) 124 #define DHD_RING_INFO_MEMBER_ADDR(bus, member) \ argument 125 (bus)->pcie_sh->rings_info_ptr + OFFSETOF(ring_info_t, member) 128 #define DHD_RING_MEM_MEMBER_ADDR(bus, ringid, member) \ argument 129 (bus)->ring_sh[ringid].ring_mem_addr + OFFSETOF(ring_mem_t, member) [all …]
|
| /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/ |
| H A D | dhd_pcie.c | 2 * DHD Bus Module for PCIE 6 * Copyright (C) 1999-2017, Broadcom Corporation 27 * <<Broadcom-WL-IPTag/Open:>> 29 * $Id: dhd_pcie.c 702835 2017-06-05 07:19:55Z $ 120 #define DHD_PCIE_SHARED_MEMBER_ADDR(bus, member) \ argument 121 (bus)->shared_addr + OFFSETOF(pciedev_shared_t, member) 124 #define DHD_RING_INFO_MEMBER_ADDR(bus, member) \ argument 125 (bus)->pcie_sh->rings_info_ptr + OFFSETOF(ring_info_t, member) 128 #define DHD_RING_MEM_MEMBER_ADDR(bus, ringid, member) \ argument 129 (bus)->ring_sh[ringid].ring_mem_addr + OFFSETOF(ring_mem_t, member) [all …]
|
| /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/infineon/bcmdhd/ |
| H A D | dhd_pcie.c | 2 * DHD Bus Module for PCIE 6 * Copyright (C) 1999-2017, Broadcom Corporation 27 * <<Broadcom-WL-IPTag/Open:>> 29 * $Id: dhd_pcie.c 702835 2017-06-05 07:19:55Z $ 120 #define DHD_PCIE_SHARED_MEMBER_ADDR(bus, member) \ argument 121 (bus)->shared_addr + OFFSETOF(pciedev_shared_t, member) 124 #define DHD_RING_INFO_MEMBER_ADDR(bus, member) \ argument 125 (bus)->pcie_sh->rings_info_ptr + OFFSETOF(ring_info_t, member) 128 #define DHD_RING_MEM_MEMBER_ADDR(bus, ringid, member) \ argument 129 (bus)->ring_sh[ringid].ring_mem_addr + OFFSETOF(ring_mem_t, member) [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 /* ----------------------------------------------------------- */ 37 MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time"); 45 dev_printk(KERN_DEBUG, &dev->intf->dev, \ 64 switch (dev->i2c_speed & 0x03) { in em28xx_i2c_timeout() 83 static int em2800_i2c_send_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) in em2800_i2c_send_bytes() argument 90 return -EOPNOTSUPP; in em2800_i2c_send_bytes() [all …]
|
| /OK3568_Linux_fs/kernel/include/sound/ |
| H A D | hdaudio.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * HD-audio core stuff 31 * exported bus type 47 * HD-audio codec base device 52 struct hdac_bus *bus; member 53 unsigned int addr; /* codec address */ member 54 struct list_head list; /* list point for bus codec_list */ 117 int snd_hdac_device_init(struct hdac_device *dev, struct hdac_bus *bus, 118 const char *name, unsigned int addr); 158 * snd_hdac_read_parm - read a codec parameter [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/core/ |
| H A D | of_addr.c | 4 * Modified for U-Boot 7 * SPDX-License-Identifier: GPL-2.0+ 26 static void of_dump_addr(const char *s, const __be32 *addr, int na) in of_dump_addr() argument 29 while (na--) in of_dump_addr() 30 pr_cont(" %08x", be32_to_cpu(*(addr++))); in of_dump_addr() 34 static void of_dump_addr(const char *s, const __be32 *addr, int na) { } in of_dump_addr() argument 37 /* Callbacks for bus specific translators */ 44 u64 (*map)(__be32 *addr, const __be32 *range, int na, int ns, int pna); 45 int (*translate)(__be32 *addr, u64 offset, int na); 46 unsigned int (*get_flags)(const __be32 *addr); [all …]
|