| /drivers/mtd/ |
| A D | mtdpart.c | 570 slave = kzalloc(sizeof(*slave), GFP_KERNEL); in allocate_partition() 677 if (master->size - slave->offset >= slave->size) { in allocate_partition() 678 slave->size = master->size - slave->offset in allocate_partition() 689 slave->size = master->size - slave->offset; in allocate_partition() 692 (unsigned long long)(slave->offset + slave->size), slave->name); in allocate_partition() 703 if (slave->offset + slave->size > master->size) { in allocate_partition() 704 slave->size = master->size - slave->offset; in allocate_partition() 711 u64 end = slave->offset + slave->size; in allocate_partition() 734 mtd_mod_by_eb(slave->offset, slave)) { in allocate_partition() 743 mtd_mod_by_eb(slave->size, slave)) { in allocate_partition() [all …]
|
| /drivers/spi/ |
| A D | spi-uclass.c | 60 speed = slave->max_hz; in dm_spi_claim_bus() 61 mode = slave->mode; in dm_spi_claim_bus() 165 dev_dbg(slave->dev, in spi_write_then_read() 171 dev_dbg(slave->dev, in spi_write_then_read() 214 slave->dev = dev; in spi_child_pre_probe() 355 slave->dev = dev; in spi_get_bus_and_cs() 371 *devp = slave; in spi_get_bus_and_cs() 443 slave->dev = dev; in _spi_get_bus_and_cs() 474 *devp = slave; in _spi_get_bus_and_cs() 501 &slave); in spi_setup_slave() [all …]
|
| A D | spi-mem-nodm.c | 12 int spi_mem_exec_op(struct spi_slave *slave, in spi_mem_exec_op() argument 34 ret = spi_claim_bus(slave); in spi_mem_exec_op() 63 ret = spi_xfer(slave, op->data.nbytes * 8, tx_buf, in spi_mem_exec_op() 69 spi_release_bus(slave); in spi_mem_exec_op() 88 int spi_mem_adjust_op_size(struct spi_slave *slave, in spi_mem_adjust_op_size() argument 94 if (slave->max_write_size && len > slave->max_write_size) in spi_mem_adjust_op_size() 98 if (slave->max_read_size) in spi_mem_adjust_op_size() 100 slave->max_read_size); in spi_mem_adjust_op_size() 101 } else if (slave->max_write_size) { in spi_mem_adjust_op_size() 103 slave->max_write_size - len); in spi_mem_adjust_op_size() [all …]
|
| A D | spi-mem.c | 116 u32 mode = slave->mode; in spi_check_buswidth_req() 260 if (!spi_mem_supports_op(slave, op)) in spi_mem_exec_op() 263 ret = spi_claim_bus(slave); in spi_mem_exec_op() 304 spi_release_bus(slave); in spi_mem_exec_op() 371 ret = spi_sync(slave, &msg); in spi_mem_exec_op() 433 spi_release_bus(slave); in spi_mem_exec_op() 479 if (slave->max_write_size && len > slave->max_write_size) in spi_mem_adjust_op_size() 483 if (slave->max_read_size) in spi_mem_adjust_op_size() 485 slave->max_read_size); in spi_mem_adjust_op_size() 486 } else if (slave->max_write_size) { in spi_mem_adjust_op_size() [all …]
|
| A D | spi.c | 10 int spi_set_wordlen(struct spi_slave *slave, unsigned int wordlen) in spi_set_wordlen() argument 17 slave->wordlen = wordlen; in spi_set_wordlen() 29 struct spi_slave *slave; in spi_do_alloc_slave() local 32 slave = (struct spi_slave *)(ptr + offset); in spi_do_alloc_slave() 33 slave->bus = bus; in spi_do_alloc_slave() 34 slave->cs = cs; in spi_do_alloc_slave() 35 slave->wordlen = SPI_DEFAULT_WORDLEN; in spi_do_alloc_slave()
|
| A D | sh_qspi.c | 73 struct spi_slave slave; member 230 return container_of(slave, struct sh_qspi_slave, slave); in to_sh_qspi() 238 void spi_cs_activate(struct spi_slave *slave) in spi_cs_activate() argument 240 struct sh_qspi_slave *ss = to_sh_qspi(slave); in spi_cs_activate() 245 void spi_cs_deactivate(struct spi_slave *slave) in spi_cs_deactivate() argument 247 struct sh_qspi_slave *ss = to_sh_qspi(slave); in spi_cs_deactivate() 271 return &ss->slave; in spi_setup_slave() 274 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 281 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument 286 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument [all …]
|
| A D | fsl_espi.c | 26 struct spi_slave slave; member 93 void fsl_spi_cs_deactivate(struct spi_slave *slave) in fsl_spi_cs_deactivate() argument 176 struct spi_slave *slave = &fsl->slave; in espi_xfer() local 202 fsl_spi_cs_deactivate(slave); in espi_xfer() 242 fsl_spi_cs_activate(slave, cs); in espi_xfer() 285 fsl_spi_cs_deactivate(slave); in espi_xfer() 400 return &fsl->slave; in spi_setup_slave() 403 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 410 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument 414 espi_claim_bus(fsl, slave->cs); in spi_claim_bus() [all …]
|
| A D | spi-mxic.c | 348 return spi_mem_default_supports_op(slave, op); in mxic_spi_mem_supports_op() 355 struct udevice *bus = slave->dev->parent; in mxic_spi_mem_exec_op() 361 if (slave->mode & (SPI_TX_OCTAL | SPI_RX_OCTAL)) in mxic_spi_mem_exec_op() 476 if (((slave->mode & SPI_TX_QUAD) && in mxic_spi_xfer() 477 !(slave->mode & SPI_RX_QUAD)) || in mxic_spi_xfer() 478 ((slave->mode & SPI_TX_DUAL) && in mxic_spi_xfer() 479 !(slave->mode & SPI_RX_DUAL))) in mxic_spi_xfer() 484 if (slave->mode & SPI_TX_QUAD) in mxic_spi_xfer() 486 else if (slave->mode & SPI_TX_DUAL) in mxic_spi_xfer() 489 if (slave->mode & SPI_RX_QUAD) in mxic_spi_xfer() [all …]
|
| A D | zynq_qspi.c | 202 struct spi_slave *slave = dev_get_parent_priv(bus); in zynq_qspi_child_pre_probe() local 205 priv->max_hz = slave->max_hz; in zynq_qspi_child_pre_probe() 206 slave->multi_cs_cap = true; in zynq_qspi_child_pre_probe() 753 struct udevice *bus = slave->dev->parent; in zynq_qspi_exec_op() 760 if ((slave->flags & QSPI_SELECT_LOWER_CS) && in zynq_qspi_exec_op() 761 (slave->flags & QSPI_SELECT_UPPER_CS)) in zynq_qspi_exec_op() 763 if (slave->flags & SPI_XFER_STACKED) in zynq_qspi_exec_op() 790 if (slave->flags & SPI_XFER_U_PAGE) in zynq_qspi_exec_op() 816 slave->flags &= ~SPI_XFER_LOWER; in zynq_qspi_exec_op() 817 spi_release_bus(slave); in zynq_qspi_exec_op() [all …]
|
| A D | sandbox_spi.c | 44 struct udevice *bus, struct udevice *slave, in sandbox_spi_get_emul() argument 64 static int sandbox_spi_xfer(struct udevice *slave, unsigned int bitlen, in sandbox_spi_xfer() argument 67 struct udevice *bus = slave->parent; in sandbox_spi_xfer() 86 cs = spi_chip_select(slave); in sandbox_spi_xfer() 93 ret = sandbox_spi_get_emul(state, bus, slave, &emul); in sandbox_spi_xfer()
|
| A D | mtk_spim.c | 176 struct udevice *bus = dev_get_parent(slave->dev); in mtk_spim_hw_init() 181 cpha = slave->mode & SPI_CPHA ? 1 : 0; in mtk_spim_hw_init() 182 cpol = slave->mode & SPI_CPOL ? 1 : 0; in mtk_spim_hw_init() 206 if (slave->mode & SPI_LOOP) in mtk_spim_hw_init() 222 if (slave->mode & SPI_LSB_FIRST) { in mtk_spim_hw_init() 236 if (slave->mode & SPI_CS_HIGH) in mtk_spim_hw_init() 359 struct udevice *bus = dev_get_parent(slave->dev); in mtk_spim_supports_op() 362 if (!spi_mem_default_supports_op(slave, op)) in mtk_spim_supports_op() 458 mtk_spim_hw_init(slave); in mtk_spim_exec_op() 459 mtk_spim_prepare_transfer(priv, slave->max_hz); in mtk_spim_exec_op() [all …]
|
| A D | octeon_spi.c | 84 struct dm_spi_slave_plat *slave = dev_get_parent_plat(dev); in octeon_spi_set_mpicfg() local 88 uint max_speed = slave->max_hz; in octeon_spi_set_mpicfg() 96 debug("\n slave params %d %d %d\n", slave->cs[0], in octeon_spi_set_mpicfg() 97 slave->max_hz, slave->mode); in octeon_spi_set_mpicfg() 98 cpha = !!(slave->mode & SPI_CPHA); in octeon_spi_set_mpicfg() 99 cpol = !!(slave->mode & SPI_CPOL); in octeon_spi_set_mpicfg() 102 FIELD_PREP(MPI_CFG_CSHI, !!(slave->mode & SPI_CS_HIGH)) | in octeon_spi_set_mpicfg() 103 FIELD_PREP(MPI_CFG_LSBFIRST, !!(slave->mode & SPI_LSB_FIRST)) | in octeon_spi_set_mpicfg() 104 FIELD_PREP(MPI_CFG_WIREOR, !!(slave->mode & SPI_3WIRE)) | in octeon_spi_set_mpicfg() 421 static bool octeon_spi_supports_op(struct spi_slave *slave, in octeon_spi_supports_op() argument [all …]
|
| A D | pic32_spi.c | 199 static int pic32_spi_claim_bus(struct udevice *slave) in pic32_spi_claim_bus() argument 201 struct pic32_spi_priv *priv = dev_get_priv(slave->parent); in pic32_spi_claim_bus() 209 static int pic32_spi_release_bus(struct udevice *slave) in pic32_spi_release_bus() argument 211 struct pic32_spi_priv *priv = dev_get_priv(slave->parent); in pic32_spi_release_bus() 235 static int pic32_spi_xfer(struct udevice *slave, unsigned int bitlen, in pic32_spi_xfer() argument 240 struct udevice *bus = slave->parent; in pic32_spi_xfer() 247 slave_plat = dev_get_parent_plat(slave); in pic32_spi_xfer() 339 static int pic32_spi_set_wordlen(struct udevice *slave, unsigned int wordlen) in pic32_spi_set_wordlen() argument 341 struct pic32_spi_priv *priv = dev_get_priv(slave->parent); in pic32_spi_set_wordlen()
|
| A D | mxc_spi.c | 112 struct spi_slave slave; member 130 static inline struct mxc_spi_slave *to_mxc_spi_slave(struct spi_slave *slave) in to_mxc_spi_slave() argument 132 return container_of(slave, struct mxc_spi_slave, slave); in to_mxc_spi_slave() 488 struct mxc_spi_slave *mxcs = to_mxc_spi_slave(slave); in spi_xfer() 556 return &mxcs->slave; in spi_setup_slave() 559 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 561 struct mxc_spi_slave *mxcs = to_mxc_spi_slave(slave); in spi_free_slave() 566 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument 568 struct mxc_spi_slave *mxcs = to_mxc_spi_slave(slave); in spi_claim_bus() 570 return mxc_spi_claim_bus_internal(mxcs, slave->cs); in spi_claim_bus() [all …]
|
| A D | gxp_spi.c | 32 struct spi_slave slave; member 58 struct spi_slave *slave = dev_get_parent_priv(dev); in gxp_spi_xfer() local 145 if (len > slave->max_write_size) { in gxp_spi_xfer() 146 printf("SF: write length is too big(>%d)\n", slave->max_write_size); in gxp_spi_xfer() 274 struct spi_slave *slave = dev_get_parent_priv(dev); in gxp_spi_child_pre_probe() local 276 slave->max_write_size = GXP_SPILDAT_SIZE; in gxp_spi_child_pre_probe()
|
| A D | ich.c | 254 struct udevice *bus = dev_get_parent(slave->dev); in ich_spi_exec_op_swseq() 521 struct udevice *bus = dev_get_parent(slave->dev); in ich_spi_exec_op_hwseq() 598 ret = ich_spi_exec_op_hwseq(slave, op); in ich_spi_exec_op() 600 ret = ich_spi_exec_op_swseq(slave, op); in ich_spi_exec_op() 733 if (slave->max_read_size) { in ich_spi_adjust_size() 735 slave->max_read_size); in ich_spi_adjust_size() 737 } else if (slave->max_write_size) { in ich_spi_adjust_size() 739 slave->max_write_size); in ich_spi_adjust_size() 925 slave->max_read_size = priv->databytes; in ich_spi_child_pre_probe() 926 slave->max_write_size = priv->databytes; in ich_spi_child_pre_probe() [all …]
|
| /drivers/power/ |
| A D | power_spi.c | 16 static struct spi_slave *slave; variable 23 if (!slave) { in pmic_reg() 24 slave = spi_setup_slave(p->bus, p->hw.spi.cs, p->hw.spi.clk, in pmic_reg() 27 if (!slave) in pmic_reg() 34 if (spi_claim_bus(slave)) in pmic_reg() 41 if (spi_xfer(slave, pmic_spi_bitlen, &tmp, &pmic_rx, in pmic_reg() 48 if (spi_xfer(slave, pmic_spi_bitlen, &tmp, &pmic_rx, in pmic_reg() 53 spi_release_bus(slave); in pmic_reg() 59 spi_release_bus(slave); in pmic_reg()
|
| /drivers/misc/ |
| A D | cros_ec_spi.c | 25 struct spi_slave *slave = dev_get_parent_priv(dev->dev); in cros_ec_spi_packet() local 31 if (spi_claim_bus(slave)) { in cros_ec_spi_packet() 36 rv = spi_xfer(slave, out_bytes * 8, dev->dout, NULL, SPI_XFER_BEGIN); in cros_ec_spi_packet() 41 rv = spi_xfer(slave, 8, NULL, &byte, 0); in cros_ec_spi_packet() 52 rv = spi_xfer(slave, in_bytes * 8, NULL, dev->din, 0); in cros_ec_spi_packet() 54 spi_xfer(slave, 0, NULL, NULL, SPI_XFER_END); in cros_ec_spi_packet() 55 spi_release_bus(slave); in cros_ec_spi_packet() 85 struct spi_slave *slave = dev_get_parent_priv(dev->dev); in cros_ec_spi_command() local 118 if (spi_claim_bus(slave)) { in cros_ec_spi_command() 139 rv = spi_xfer(slave, max(len, in_bytes) * 8, out, p, in cros_ec_spi_command() [all …]
|
| /drivers/net/ti/ |
| A D | cpsw.c | 193 slave = (priv)->slaves + ((priv)->data)->active_slave; if (slave) 195 for (slave = (priv)->slaves; slave != (priv)->slaves + \ 822 slave->data = data; in cpsw_slave_setup() 834 slave->data->phy_addr, in cpsw_phy_init() 836 slave->data->phy_if); in cpsw_phy_init() 847 slave->slave_num + 1, slave->data->max_speed); in cpsw_phy_init() 994 mask = GMII_SEL_MODE_MASK << (slave * 2) | BIT(slave + 6); in cpsw_gmii_sel_am3352() 995 mode <<= slave * 2; in cpsw_gmii_sel_am3352() 998 if (slave == 0) in cpsw_gmii_sel_am3352() 1005 if (slave == 0) in cpsw_gmii_sel_am3352() [all …]
|
| A D | keystone_net.c | 626 if (ofnode_read_u32(slave, "slave-port", &slave_no)) in ks2_bind_one_slave() 631 *gbe_0 = slave; in ks2_bind_one_slave() 648 ofnode interfaces, sec_slave, slave; in ks2_eth_bind_slaves() local 652 ofnode_for_each_subnode(slave, interfaces) { in ks2_eth_bind_slaves() 653 ret = ks2_bind_one_slave(dev, slave, gbe_0); in ks2_eth_bind_slaves() 659 ofnode_for_each_subnode(slave, sec_slave) { in ks2_eth_bind_slaves() 660 ret = ks2_bind_one_slave(dev, slave, NULL); in ks2_eth_bind_slaves() 691 phy = ofnode_get_phy_node(slave); in ks2_eth_parse_slave_interface() 710 priv->phy_if = ofnode_read_phy_mode(slave); in ks2_eth_parse_slave_interface() 735 slave = dev_ofnode(dev); in ks2_sl_eth_of_to_plat() [all …]
|
| /drivers/fpga/ |
| A D | stratixv.c | 17 struct spi_slave *slave; in program_write() local 24 slave = spi_setup_slave(spi_bus, spi_dev, 27777777, SPI_MODE_3); in program_write() 25 if (!slave) in program_write() 28 if (spi_claim_bus(slave)) in program_write() 31 ret = spi_xfer(slave, rbf_size * 8, rbf_data, (void *)rbf_data, in program_write() 34 spi_release_bus(slave); in program_write()
|
| /drivers/mtd/spi/ |
| A D | sf-uclass.c | 53 struct spi_slave *slave; in spi_flash_probe() local 67 "jedec_spi_nor", str, &bus, &slave)) in spi_flash_probe() 70 return dev_get_uclass_priv(slave->dev); in spi_flash_probe() 76 struct spi_slave *slave; in spi_flash_probe_bus_cs() local 80 ret = spi_get_bus_and_cs(busnum, cs, &bus, &slave); in spi_flash_probe_bus_cs() 84 *devp = slave->dev; in spi_flash_probe_bus_cs()
|
| /drivers/tpm/ |
| A D | tpm2_tis_spi.c | 68 struct spi_slave *slave = dev_get_parent_priv(dev); in tpm_tis_spi_xfer() local 79 ret = spi_claim_bus(slave); in tpm_tis_spi_xfer() 93 ret = spi_xfer(slave, 4 * 8, tx_buf, rx_buf, SPI_XFER_BEGIN); in tpm_tis_spi_xfer() 106 ret = spi_xfer(slave, 1 * 8, NULL, rx_buf, 0); in tpm_tis_spi_xfer() 132 ret = spi_xfer(slave, transfer_len * 8, in tpm_tis_spi_xfer() 154 spi_xfer(slave, 0, NULL, NULL, SPI_XFER_END); in tpm_tis_spi_xfer() 156 spi_release_bus(slave); in tpm_tis_spi_xfer()
|
| /drivers/mtd/nand/spi/ |
| A D | core.c | 65 ret = spi_mem_exec_op(spinand->slave, &op); in spinand_read_reg_op() 79 return spi_mem_exec_op(spinand->slave, &op); in spinand_write_reg_op() 180 struct udevice *dev = spinand->slave->dev; in spinand_init_cfg_cache() 947 struct spi_slave *slave = spinand->slave; in spinand_setup_slave() local 948 struct udevice *bus = slave->dev->parent; in spinand_setup_slave() 1045 dev_err(spinand->slave->dev, in spinand_detect() 1050 dev_info(spinand->slave->dev, in spinand_detect() 1052 dev_info(spinand->slave->dev, in spinand_detect() 1131 dev_err(spinand->slave->dev, in spinand_init() 1247 spinand->slave = slave; in spinand_probe() [all …]
|
| /drivers/usb/gadget/ |
| A D | max3420_udc.c | 136 struct spi_slave *slave; member 149 struct spi_slave *slave = udc->slave; in spi_ack_ctrl() local 158 struct spi_slave *slave = udc->slave; in spi_rd8_ack() local 179 struct spi_slave *slave = udc->slave; in spi_wr8_ack() local 197 struct spi_slave *slave = udc->slave; in spi_rd_buf() local 204 spi_xfer(slave, len * 8, NULL, buf, SPI_XFER_END); in spi_rd_buf() 209 struct spi_slave *slave = udc->slave; in spi_wr_buf() local 216 spi_xfer(slave, len * 8, buf, NULL, SPI_XFER_END); in spi_wr_buf() 805 spi_claim_bus(udc->slave); in max3420_setup_spi() 826 NULL, &spid, &udc->slave); in max3420_udc_probe() [all …]
|