/openbmc/u-boot/drivers/spi/ |
H A D | mvebu_a3700_spi.c | 33 u32 din; /* 0x1060c */ member 80 const void *dout, void *din) in spi_legacy_shift_byte() argument 93 din_8 = din; in spi_legacy_shift_byte() 110 if (din) { in spi_legacy_shift_byte() 118 *din_8 = (u8)readl(®->din); in spi_legacy_shift_byte() 124 if (din) in spi_legacy_shift_byte() 134 const void *dout, void *din, unsigned long flags) in mvebu_spi_xfer() argument 144 if (dout && din) in mvebu_spi_xfer() 154 if (dout || din) { in mvebu_spi_xfer() 155 ret = spi_legacy_shift_byte(reg, bytelen, dout, din); in mvebu_spi_xfer()
|
H A D | atcspi200_spi.c | 88 u8 *din; member 144 if ((ns->din)&&(ns->cmd_len)) in __atcspi200_spi_start() 146 else if (ns->din) in __atcspi200_spi_start() 155 if(ns->din) in __atcspi200_spi_start() 182 static int __nspi_espi_rx(struct nds_spi_slave *ns, void *din, unsigned int bytes) in __nspi_espi_rx() argument 184 *(u8 *)din = ns->regs->data; in __nspi_espi_rx() 195 void *din = NULL; in __atcspi200_spi_xfer() local 217 ns->din = (u8 *)data_in; in __atcspi200_spi_xfer() 223 ns->din = 0; in __atcspi200_spi_xfer() 237 din = data_in; in __atcspi200_spi_xfer() [all …]
|
H A D | kirkwood_spi.c | 32 const void *dout, void *din, unsigned long flags) in _spi_xfer() argument 37 debug("spi_xfer: dout %p din %p bitlen %u\n", dout, din, bitlen); in _spi_xfer() 69 tmpdin = readl(®->din); in _spi_xfer() 71 din, tmpdin); in _spi_xfer() 73 if (din) { in _spi_xfer() 74 *((u8 *)din) = (u8)tmpdin; in _spi_xfer() 75 din += 1; in _spi_xfer() 236 const void *dout, void *din, unsigned long flags) in spi_xfer() argument 238 return _spi_xfer(spireg, bitlen, dout, din, flags); in spi_xfer() 333 const void *dout, void *din, unsigned long flags) in mvebu_spi_xfer() argument [all …]
|
H A D | mxc_spi.c | 219 const u8 *dout, u8 *din, unsigned long flags) in spi_xchg_single() argument 228 __func__, bitlen, (ulong)dout, (ulong)din); in spi_xchg_single() 309 if (din) { in spi_xchg_single() 310 memcpy(din, &data, cnt); in spi_xchg_single() 311 din += cnt; in spi_xchg_single() 322 if (din) { in spi_xchg_single() 323 memcpy(din, &data, cnt); in spi_xchg_single() 324 din += cnt; in spi_xchg_single() 335 void *din, unsigned long flags) in mxc_spi_xfer_internal() argument 342 u8 *p_inbuf = (u8 *)din; in mxc_spi_xfer_internal() [all …]
|
H A D | sh_qspi.c | 147 const void *dout, void *din, unsigned long flags) in sh_qspi_xfer_common() argument 155 if (dout == NULL && din == NULL) { in sh_qspi_xfer_common() 181 if (din != NULL) in sh_qspi_xfer_common() 182 rdata = din; in sh_qspi_xfer_common() 212 if (din != NULL) in sh_qspi_xfer_common() 289 const void *dout, void *din, unsigned long flags) in spi_xfer() argument 293 return sh_qspi_xfer_common(ss, bitlen, dout, din, flags); in spi_xfer() 301 const void *dout, void *din, unsigned long flags) in sh_qspi_xfer() argument 306 return sh_qspi_xfer_common(ss, bitlen, dout, din, flags); in sh_qspi_xfer()
|
H A D | fsl_espi.c | 207 static int fsl_espi_rx(struct fsl_spi_slave *fsl, void *din, unsigned int bytes) in fsl_espi_rx() argument 230 if (din) in fsl_espi_rx() 231 memcpy(din, buf, bytes); in fsl_espi_rx() 246 void *din = NULL; in spi_xfer() local 301 din = buffer + rx_offset; in spi_xfer() 333 if (fsl_espi_rx(fsl, din, rx_bytes) in spi_xfer() 336 if (din) in spi_xfer() 337 din = (unsigned char *)din in spi_xfer()
|
H A D | cf_spi.c | 103 void *din, ulong flags) in cfspi_xfer() argument 114 spi_rd16 = (u16 *) din; in cfspi_xfer() 117 spi_rd = (u8 *) din; in cfspi_xfer() 136 if (din != NULL) { in cfspi_xfer() 160 if (din != NULL) { in cfspi_xfer() 331 void *din, unsigned long flags) in spi_xfer() argument 333 return cfspi_xfer(slave, bitlen, dout, din, flags); in spi_xfer()
|
H A D | sandbox_spi.c | 53 const void *dout, void *din, unsigned long flags) in sandbox_spi_xfer() argument 92 ret = ops->xfer(emul, bitlen, dout, din, flags); in sandbox_spi_xfer() 96 if (din) { in sandbox_spi_xfer() 98 log_content(" %u:%02x", i, ((u8 *)din)[i]); in sandbox_spi_xfer()
|
H A D | mpc8xxx_spi.c | 75 void *din, unsigned long flags) in spi_xfer() argument 84 slave->bus, slave->cs, *(uint *) dout, *(uint *) din, bitlen); in spi_xfer() 140 *(u32 *) din = (tmpdin << (32 - charSize)); in spi_xfer() 143 din += 4; in spi_xfer()
|
H A D | meson_spifc.c | 137 const u8 *dout, u8 *din, int offset, in meson_spifc_txrx() argument 173 if (!ret && din) in meson_spifc_txrx() 174 meson_spifc_drain_buffer(spifc, din + offset, len); in meson_spifc_txrx() 189 const void *dout, void *din, unsigned long flags) in meson_spifc_xfer() argument 198 debug("xfer len %d (%d) dout %p din %p\n", bitlen, blen, dout, din); in meson_spifc_xfer() 204 ret = meson_spifc_txrx(spifc, dout, din, done, len, in meson_spifc_xfer()
|
H A D | davinci_spi.c | 305 unsigned int bitlen, const void *dout, void *din, in __davinci_spi_xfer() argument 329 return davinci_spi_read(ds, len, din, flags); in __davinci_spi_xfer() 330 if (!din) in __davinci_spi_xfer() 333 return davinci_spi_read_write(ds, len, din, dout, flags); in __davinci_spi_xfer() 435 const void *dout, void *din, unsigned long flags) in spi_xfer() argument 441 return __davinci_spi_xfer(ds, bitlen, dout, din, flags); in spi_xfer() 511 const void *dout, void *din, in davinci_spi_xfer() argument 525 return __davinci_spi_xfer(ds, bitlen, dout, din, flags); in davinci_spi_xfer()
|
H A D | mxs_spi.c | 306 const void *dout, void *din, unsigned long flags) in spi_xfer() argument 318 din = (void *)&dummy; in spi_xfer() 325 if (din && dout) in spi_xfer() 328 if (!din && !dout) in spi_xfer() 334 } else if (din) { in spi_xfer() 335 data = (char *)din; in spi_xfer()
|
H A D | tegra210_qspi.c | 211 u8 *din = data_in; in tegra210_qspi_xfer() local 215 __func__, bus->seq, spi_chip_select(dev), dout, din, bitlen); in tegra210_qspi_xfer() 280 if (din != NULL) in tegra210_qspi_xfer() 339 if (din != NULL) { in tegra210_qspi_xfer() 340 memcpy(din, &tmpdin, bytes); in tegra210_qspi_xfer() 341 din += bytes; in tegra210_qspi_xfer()
|
H A D | mtk_qspi.c | 221 const void *dout, void *din, unsigned long flags) in mtk_qspi_transfer() argument 259 if (din) { in mtk_qspi_transfer() 267 return mtk_qspi_read(priv, addr, (u8 *)din, bytes); in mtk_qspi_transfer() 271 priv->rx = (u8 *)din; in mtk_qspi_transfer() 280 const void *dout, void *din, unsigned long flags) in mtk_qspi_xfer() argument 285 return mtk_qspi_transfer(priv, bitlen, dout, din, flags); in mtk_qspi_xfer()
|
H A D | xilinx_spi.c | 209 const void *dout, void *din) in xilinx_spi_startup_block() argument 216 unsigned char *rxp = din; in xilinx_spi_startup_block() 231 txp = din; in xilinx_spi_startup_block() 242 const void *dout, void *din, unsigned long flags) in xilinx_spi_xfer() argument 251 unsigned char *rxp = din; in xilinx_spi_xfer() 279 xilinx_spi_startup_block(dev, bytes, dout, din); in xilinx_spi_xfer()
|
H A D | bcm63xx_spi.c | 195 const void *dout, void *din, unsigned long flags) in bcm63xx_spi_xfer() argument 209 if (din) { in bcm63xx_spi_xfer() 243 if (dout && !din) { in bcm63xx_spi_xfer() 249 if (dout && din && (flags & SPI_XFER_ONCE)) { in bcm63xx_spi_xfer() 294 if (din) in bcm63xx_spi_xfer() 295 memcpy_fromio(din, priv->base + regs[SPI_RX], in bcm63xx_spi_xfer()
|
/openbmc/linux/drivers/infiniband/hw/mlx5/ |
H A D | devx.c | 1107 static void devx_obj_build_destroy_cmd(void *in, void *out, void *din, in devx_obj_build_destroy_cmd() argument 1116 MLX5_SET(general_obj_in_cmd_hdr, din, uid, uid); in devx_obj_build_destroy_cmd() 1120 MLX5_SET(general_obj_in_cmd_hdr, din, opcode, MLX5_CMD_OP_DESTROY_GENERAL_OBJECT); in devx_obj_build_destroy_cmd() 1121 MLX5_SET(general_obj_in_cmd_hdr, din, obj_id, *obj_id); in devx_obj_build_destroy_cmd() 1122 MLX5_SET(general_obj_in_cmd_hdr, din, obj_type, in devx_obj_build_destroy_cmd() 1127 MLX5_SET(destroy_umem_in, din, opcode, in devx_obj_build_destroy_cmd() 1129 MLX5_SET(destroy_umem_in, din, umem_id, *obj_id); in devx_obj_build_destroy_cmd() 1132 MLX5_SET(destroy_mkey_in, din, opcode, in devx_obj_build_destroy_cmd() 1134 MLX5_SET(destroy_mkey_in, din, mkey_index, *obj_id); in devx_obj_build_destroy_cmd() 1137 MLX5_SET(destroy_cq_in, din, opcode, MLX5_CMD_OP_DESTROY_CQ); in devx_obj_build_destroy_cmd() [all …]
|
/openbmc/linux/drivers/platform/chrome/ |
H A D | cros_ec_spi.c | 157 if (buf - ec_dev->din + n > ec_dev->din_size) in receive_n_bytes() 204 ec_dev->din, in cros_ec_spi_receive_packet() 209 ptr = ec_dev->din; in cros_ec_spi_receive_packet() 213 ptr - ec_dev->din); in cros_ec_spi_receive_packet() 237 memmove(ec_dev->din, ptr, todo); in cros_ec_spi_receive_packet() 238 ptr = ec_dev->din + todo; in cros_ec_spi_receive_packet() 252 response = (struct ec_host_response *)ec_dev->din; in cros_ec_spi_receive_packet() 268 todo, need_len, ptr - ec_dev->din); in cros_ec_spi_receive_packet() 278 dev_dbg(ec_dev->dev, "loop done, ptr=%zd\n", ptr - ec_dev->din); in cros_ec_spi_receive_packet() 312 ec_dev->din, in cros_ec_spi_receive_response() [all …]
|
/openbmc/u-boot/drivers/misc/ |
H A D | cros_ec_i2c.c | 58 (struct ec_host_response_i2c *)dev->din; in cros_ec_i2c_packet() 77 i2c_msg[1].buf = dev->din; in cros_ec_i2c_packet() 104 memmove(dev->din, &ec_response_i2c->ec_response, in_bytes); in cros_ec_i2c_packet() 133 if (in_bytes > sizeof(dev->din)) { in cros_ec_i2c_command() 157 in_ptr = dev->din + sizeof(int64_t); in cros_ec_i2c_command() 198 if (len + 3 > sizeof(dev->din)) { in cros_ec_i2c_command() 213 *dinp = dev->din + sizeof(int64_t); in cros_ec_i2c_command()
|
H A D | cros_ec_spi.c | 51 rv = spi_xfer(slave, in_bytes * 8, NULL, dev->din, 0); in cros_ec_spi_packet() 101 if (in_bytes > sizeof(dev->din)) { in cros_ec_spi_command() 115 memset(dev->din, '\0', in_bytes); in cros_ec_spi_command() 135 p = dev->din + sizeof(int64_t) - 2; in cros_ec_spi_command()
|
/openbmc/u-boot/include/ |
H A D | spi.h | 249 void *din, unsigned long flags); 304 unsigned char din[2]; in spi_w8r8() local 310 ret = spi_xfer(slave, 16, dout, din, SPI_XFER_BEGIN | SPI_XFER_END); in spi_w8r8() 311 return ret < 0 ? ret : din[1]; in spi_w8r8() 398 void *din, unsigned long flags); 476 const void *dout, void *din, unsigned long flags); 633 const void *dout, void *din, unsigned long flags);
|
/openbmc/u-boot/test/dm/ |
H A D | spi.c | 103 unsigned char din[5]; in dm_test_spi_xfer() local 108 ut_assertok(spi_xfer(slave, 40, dout, din, in dm_test_spi_xfer() 110 ut_asserteq(0xff, din[0]); in dm_test_spi_xfer() 111 ut_asserteq(0x20, din[1]); in dm_test_spi_xfer() 112 ut_asserteq(0x20, din[2]); in dm_test_spi_xfer() 113 ut_asserteq(0x15, din[3]); in dm_test_spi_xfer()
|
/openbmc/u-boot/board/work-microwave/work_92105/ |
H A D | work_92105_display.c | 112 uint8_t dout[2], din[2]; in max6957aax_read() local 123 din[0] = 0; in max6957aax_read() 124 din[1] = 0; in max6957aax_read() 127 spi_xfer(slave, 16, din, din, SPI_XFER_BEGIN | SPI_XFER_END); in max6957aax_read() 130 return din[1]; in max6957aax_read()
|
/openbmc/linux/drivers/siox/ |
H A D | siox-bus-gpio.c | 18 struct gpio_desc *din; member 53 if (gpiod_get_value_cansleep(ddata->din)) in siox_gpio_pushpull() 103 ddata->din = devm_gpiod_get(dev, "din", GPIOD_IN); in siox_gpio_probe() 104 if (IS_ERR(ddata->din)) { in siox_gpio_probe() 105 ret = dev_err_probe(dev, PTR_ERR(ddata->din), in siox_gpio_probe()
|
/openbmc/u-boot/board/CZ.NIC/turris_mox/ |
H A D | turris_mox.c | 190 u8 din[MAX_MOX_MODULES], dout[MAX_MOX_MODULES]; in mox_get_topology() local 203 memset(din, 0, MAX_MOX_MODULES); in mox_get_topology() 206 ret = mox_do_spi(din, dout, MAX_MOX_MODULES); in mox_get_topology() 210 if (din[0] == 0x10) in mox_get_topology() 212 else if (din[0] == 0x00) in mox_get_topology() 217 for (i = 1; i < MAX_MOX_MODULES && din[i] != 0xff; ++i) in mox_get_topology() 218 topology[i - 1] = din[i] & 0xf; in mox_get_topology()
|