Searched refs:slave (Results 1 - 25 of 86) sorted by relevance

1234

/u-boot/drivers/spi/
H A Dspi.c11 int spi_set_wordlen(struct spi_slave *slave, unsigned int wordlen) argument
18 slave->wordlen = wordlen;
30 struct spi_slave *slave; local
33 slave = (struct spi_slave *)(ptr + offset);
34 slave->bus = bus;
35 slave->cs = cs;
36 slave->wordlen = SPI_DEFAULT_WORDLEN;
H A Dspi-mem-nodm.c12 int spi_mem_exec_op(struct spi_slave *slave, argument
34 ret = spi_claim_bus(slave);
57 ret = spi_xfer(slave, op_len * 8, op_buf, NULL, flag);
63 ret = spi_xfer(slave, op->data.nbytes * 8, tx_buf,
69 spi_release_bus(slave);
88 int spi_mem_adjust_op_size(struct spi_slave *slave, argument
94 if (slave->max_write_size && len > slave->max_write_size)
98 if (slave->max_read_size)
100 slave
112 spi_check_buswidth_req(struct spi_slave *slave, u8 buswidth, bool tx) argument
147 spi_mem_supports_op(struct spi_slave *slave, const struct spi_mem_op *op) argument
[all...]
H A Dspi-uclass.c58 struct spi_slave *slave = dev_get_parent_priv(dev); local
61 speed = slave->max_hz;
62 mode = slave->mode;
74 int ret = spi_set_speed_mode(bus, speed, slave->mode);
123 int spi_claim_bus(struct spi_slave *slave) argument
125 return log_ret(dm_spi_claim_bus(slave->dev));
128 void spi_release_bus(struct spi_slave *slave) argument
130 dm_spi_release_bus(slave->dev);
133 int spi_set_speed(struct spi_slave *slave, uint hz) argument
138 ops = spi_get_ops(slave
148 spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, void *din, unsigned long flags) argument
154 spi_write_then_read(struct spi_slave *slave, const u8 *opcode, size_t n_opcode, const u8 *txbuf, u8 *rxbuf, size_t n_buf) argument
206 struct spi_slave *slave = dev_get_parent_priv(dev); local
331 struct spi_slave *slave; local
350 struct spi_slave *slave; local
389 struct spi_slave *slave; local
438 struct spi_slave *slave; local
491 struct spi_slave *slave; local
503 spi_free_slave(struct spi_slave *slave) argument
[all...]
H A Dspi-mem.c115 static int spi_check_buswidth_req(struct spi_slave *slave, u8 buswidth, bool tx) argument
117 u32 mode = slave->mode;
150 static bool spi_mem_check_buswidth(struct spi_slave *slave, argument
153 if (spi_check_buswidth_req(slave, op->cmd.buswidth, true))
157 spi_check_buswidth_req(slave, op->addr.buswidth, true))
161 spi_check_buswidth_req(slave, op->dummy.buswidth, true))
165 spi_check_buswidth_req(slave, op->data.buswidth,
172 bool spi_mem_dtr_supports_op(struct spi_slave *slave, argument
192 return spi_mem_check_buswidth(slave, op);
196 bool spi_mem_default_supports_op(struct spi_slave *slave, argument
224 spi_mem_supports_op(struct spi_slave *slave, const struct spi_mem_op *op) argument
249 spi_mem_exec_op(struct spi_slave *slave, const struct spi_mem_op *op) argument
468 spi_mem_adjust_op_size(struct spi_slave *slave, struct spi_mem_op *op) argument
554 spi_mem_dirmap_create(struct spi_slave *slave, const struct spi_mem_dirmap_info *info) argument
636 devm_spi_mem_dirmap_create(struct udevice *dev, struct spi_slave *slave, const struct spi_mem_dirmap_info *info) argument
[all...]
H A Dsh_qspi.c74 struct spi_slave slave; member in struct:sh_qspi_slave
229 static inline struct sh_qspi_slave *to_sh_qspi(struct spi_slave *slave) argument
231 return container_of(slave, struct sh_qspi_slave, slave);
239 void spi_cs_activate(struct spi_slave *slave) argument
241 struct sh_qspi_slave *ss = to_sh_qspi(slave);
246 void spi_cs_deactivate(struct spi_slave *slave) argument
248 struct sh_qspi_slave *ss = to_sh_qspi(slave);
272 return &ss->slave;
275 void spi_free_slave(struct spi_slave *slave) argument
282 spi_claim_bus(struct spi_slave *slave) argument
287 spi_release_bus(struct spi_slave *slave) argument
291 spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, void *din, unsigned long flags) argument
[all...]
H A Dfsl_espi.c26 struct spi_slave slave; member in struct:fsl_spi_slave
40 #define to_fsl_spi_slave(s) container_of(s, struct fsl_spi_slave, slave)
80 void fsl_spi_cs_activate(struct spi_slave *slave, uint cs) argument
82 struct fsl_spi_slave *fsl = to_fsl_spi_slave(slave);
93 void fsl_spi_cs_deactivate(struct spi_slave *slave) argument
95 struct fsl_spi_slave *fsl = to_fsl_spi_slave(slave);
176 struct spi_slave *slave = &fsl->slave; local
202 fsl_spi_cs_deactivate(slave);
242 fsl_spi_cs_activate(slave, c
403 spi_free_slave(struct spi_slave *slave) argument
410 spi_claim_bus(struct spi_slave *slave) argument
419 spi_release_bus(struct spi_slave *slave) argument
426 spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, void *din, unsigned long flags) argument
[all...]
H A Dsandbox_spi.c34 * accordingly for each slave).
45 struct udevice *bus, struct udevice *slave,
65 static int sandbox_spi_xfer(struct udevice *slave, unsigned int bitlen, argument
68 struct udevice *bus = slave->parent;
87 cs = spi_chip_select(slave);
94 ret = sandbox_spi_get_emul(state, bus, slave, &emul);
44 sandbox_spi_get_emul(struct sandbox_state *state, struct udevice *bus, struct udevice *slave, struct udevice **emulp) argument
H A Dmtk_spim.c172 static int mtk_spim_hw_init(struct spi_slave *slave) argument
174 struct udevice *bus = dev_get_parent(slave->dev);
179 cpha = slave->mode & SPI_CPHA ? 1 : 0;
180 cpol = slave->mode & SPI_CPOL ? 1 : 0;
204 if (slave->mode & SPI_LOOP)
220 if (slave->mode & SPI_LSB_FIRST) {
234 if (slave->mode & SPI_CS_HIGH)
354 static bool mtk_spim_supports_op(struct spi_slave *slave, argument
357 struct udevice *bus = dev_get_parent(slave->dev);
407 static int mtk_spim_transfer_wait(struct spi_slave *slave, argument
442 mtk_spim_exec_op(struct spi_slave *slave, const struct spi_mem_op *op) argument
604 mtk_spim_adjust_op_size(struct spi_slave *slave, struct spi_mem_op *op) argument
[all...]
/u-boot/examples/standalone/
H A Datmel_df_pow2.c18 static int flash_cmd(struct spi_slave *slave, uchar cmd, uchar *buf, int len) argument
21 return spi_xfer(slave, 8 * len, buf, buf, SPI_XFER_BEGIN | SPI_XFER_END);
24 static int flash_status(struct spi_slave *slave) argument
27 if (flash_cmd(slave, CMD_STAT, buf, sizeof(buf)))
32 static int flash_set_pow2(struct spi_slave *slave) argument
41 ret = flash_cmd(slave, CMD_CFG, buf, sizeof(buf));
48 ret = flash_status(slave);
55 static int flash_check(struct spi_slave *slave) argument
60 ret = flash_cmd(slave, CMD_ID, buf, sizeof(buf));
131 struct spi_slave *slave; local
[all...]
/u-boot/drivers/power/
H A Dpower_spi.c17 static struct spi_slave *slave; variable in typeref:struct:spi_slave
24 if (!slave) {
25 slave = spi_setup_slave(p->bus, p->hw.spi.cs, p->hw.spi.clk,
28 if (!slave)
35 if (spi_claim_bus(slave))
42 if (spi_xfer(slave, pmic_spi_bitlen, &tmp, &pmic_rx,
49 if (spi_xfer(slave, pmic_spi_bitlen, &tmp, &pmic_rx,
54 spi_release_bus(slave);
60 spi_release_bus(slave);
/u-boot/drivers/mtd/
H A Dmtdpart.c71 struct mtd_info *slave; local
73 list_for_each_entry(slave, &master->partitions, node) {
74 if (slave->usecount)
521 * This function unregisters and destroy all slave MTD objects which are
526 struct mtd_info *slave, *next; local
529 list_for_each_entry_safe(slave, next, &master->partitions, node) {
530 if (mtd_has_partitions(slave))
531 del_mtd_partitions(slave);
533 debug("Deleting %s MTD partition\n", slave->name);
534 ret = del_mtd_device(slave);
566 struct mtd_info *slave; local
827 struct mtd_info *slave, *next; local
861 struct mtd_info *slave; local
904 struct mtd_info *slave; local
[all...]
/u-boot/drivers/fpga/
H A Dstratixv.c18 struct spi_slave *slave; local
25 slave = spi_setup_slave(spi_bus, spi_dev, 27777777, SPI_MODE_3);
26 if (!slave)
29 if (spi_claim_bus(slave))
32 ret = spi_xfer(slave, rbf_size * 8, rbf_data, (void *)rbf_data,
35 spi_release_bus(slave);
/u-boot/drivers/mtd/spi/
H A Dsf-uclass.c54 struct spi_slave *slave; local
68 "jedec_spi_nor", str, &bus, &slave))
71 return dev_get_uclass_priv(slave->dev);
77 struct spi_slave *slave; local
81 ret = spi_get_bus_and_cs(busnum, cs, &bus, &slave);
85 *devp = slave->dev;
/u-boot/cmd/
H A Dspi.c38 struct spi_slave *slave; local
50 str, &dev, &slave);
54 slave = spi_setup_slave(bus, cs, freq, mode);
55 if (!slave) {
61 ret = spi_claim_bus(slave);
64 ret = spi_xfer(slave, bitlen, dout, din,
81 spi_release_bus(slave);
83 spi_free_slave(slave);
/u-boot/drivers/misc/
H A Dcros_ec_spi.c25 struct spi_slave *slave = dev_get_parent_priv(dev->dev); local
31 if (spi_claim_bus(slave)) {
36 rv = spi_xfer(slave, out_bytes * 8, dev->dout, NULL, SPI_XFER_BEGIN);
41 rv = spi_xfer(slave, 8, NULL, &byte, 0);
52 rv = spi_xfer(slave, in_bytes * 8, NULL, dev->din, 0);
54 spi_xfer(slave, 0, NULL, NULL, SPI_XFER_END);
55 spi_release_bus(slave);
85 struct spi_slave *slave = dev_get_parent_priv(dev->dev); local
118 if (spi_claim_bus(slave)) {
139 rv = spi_xfer(slave, ma
[all...]
/u-boot/include/
H A Dspi.h25 #define SPI_SLAVE BIT(6) /* slave mode */
62 * This describes a SPI slave, a child device of the SPI bus. To obtain this
64 * dev_get_parent_plat(slave->dev).
70 * @max_hz: Maximum bus speed that this slave can tolerate
113 * struct spi_slave - Representation of a SPI slave
116 * be accessed using dev_get_parent_priv() on the slave device. The SPI uclass
125 * @dev: SPI slave device
126 * @max_hz: Maximum speed for this slave
127 * @bus: ID of the bus that the slave is attached to. For
130 * @cs: ID of the chip select connected to the slave
368 spi_w8r8(struct spi_slave *slave, unsigned char byte) argument
[all...]
H A Dspi-mem.h176 struct spi_slave *slave; member in struct:spi_mem_dirmap_desc
258 int (*adjust_op_size)(struct spi_slave *slave, struct spi_mem_op *op);
259 bool (*supports_op)(struct spi_slave *slave,
261 int (*exec_op)(struct spi_slave *slave,
321 int spi_mem_adjust_op_size(struct spi_slave *slave, struct spi_mem_op *op);
323 bool spi_mem_supports_op(struct spi_slave *slave, const struct spi_mem_op *op);
324 bool spi_mem_dtr_supports_op(struct spi_slave *slave,
327 bool spi_mem_default_supports_op(struct spi_slave *slave,
330 int spi_mem_exec_op(struct spi_slave *slave, const struct spi_mem_op *op);
H A Dcpsw.h60 int slaves; /* number of slave cpgmac ports */
79 int ti_cm_get_macid_addr(struct udevice *dev, int slave,
83 int cpsw_get_slave_phy_addr(struct udevice *dev, int slave);
/u-boot/drivers/net/ti/
H A Dcpsw.c193 #define for_active_slave(slave, priv) \
194 slave = (priv)->slaves + ((priv)->data)->active_slave; if (slave)
195 #define for_each_slave(slave, priv) \
196 for (slave = (priv)->slaves; slave != (priv)->slaves + \
197 ((priv)->data)->slaves; slave++)
448 static void cpsw_set_slave_mac(struct cpsw_slave *slave, argument
453 writel(mac_hi(pdata->enetaddr), &slave->regs->sa_hi);
454 writel(mac_lo(pdata->enetaddr), &slave
457 cpsw_slave_update_link(struct cpsw_slave *slave, struct cpsw_priv *priv, int *link) argument
508 struct cpsw_slave *slave; local
524 cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv) argument
646 struct cpsw_slave *slave; local
817 cpsw_slave_setup(struct cpsw_slave *slave, int slave_num, struct cpsw_priv *priv) argument
828 cpsw_phy_init(struct cpsw_priv *priv, struct cpsw_slave *slave) argument
882 struct cpsw_slave *slave; local
970 int slave = priv->data->active_slave; local
1024 int slave = priv->data->active_slave; local
1264 cpsw_get_slave_phy_addr(struct udevice *dev, int slave) argument
[all...]
H A Dkeystone_net.c67 /* CPSW Switch slave registers */
78 /* CPSW Switch slave registers */
569 * Register MDIO bus for slave 0 only, other slave have
583 /* Get the MDIO bus from slave 0 device */
623 static int ks2_bind_one_slave(struct udevice *dev, ofnode slave, ofnode *gbe_0) argument
629 if (ofnode_read_u32(slave, "slave-port", &slave_no))
634 *gbe_0 = slave;
640 snprintf(slave_name, 20, "netcp@slave
651 ofnode interfaces, sec_slave, slave; local
671 ks2_eth_parse_slave_interface(ofnode netcp, ofnode slave, struct ks2_eth_priv *priv, struct eth_pdata *pdata) argument
734 ofnode slave, interfaces, gbe, netcp_devices, netcp; local
[all...]
/u-boot/test/dm/
H A Dspi.c24 struct spi_slave *slave; local
32 * this then remove the emulation and the slave device.
49 ut_asserteq(-ENODEV, spi_get_bus_and_cs(busnum, cs, &bus, &slave));
60 &slave));
70 "jedec_spi_nor", "name", &bus, &slave));
73 ut_asserteq_ptr(info.dev, slave->dev);
80 &slave));
102 * @slave_a - first spi slave used for testing
103 * @slave_b - second spi slave used for testing
147 /* Get spi slave o
177 struct spi_slave *slave; local
[all...]
/u-boot/board/cssi/common/
H A Dcommon.c89 struct spi_slave *slave; local
98 "generic_0:0", &eeprom, &slave);
102 ret = spi_claim_bus(slave);
104 ret = spi_xfer(slave, sizeof(dout) << 3, dout, NULL, SPI_XFER_BEGIN);
108 ret = spi_xfer(slave, len << 3, NULL, din, SPI_XFER_END);
112 spi_release_bus(slave);
/u-boot/board/cssi/mcr3000/
H A Dmcr3000.c117 struct spi_slave *slave; local
125 "generic_0:0", &master, &slave);
129 ret = spi_claim_bus(slave);
142 ret = spi_xfer(slave, sizeof(fpga_code) * BITS_PER_BYTE, fpga_code, NULL, 0);
144 spi_release_bus(slave);
/u-boot/drivers/tpm/
H A Dtpm2_tis_spi.c68 struct spi_slave *slave = dev_get_parent_priv(dev); local
79 ret = spi_claim_bus(slave);
93 ret = spi_xfer(slave, 4 * 8, tx_buf, rx_buf, SPI_XFER_BEGIN);
106 ret = spi_xfer(slave, 1 * 8, NULL, rx_buf, 0);
132 ret = spi_xfer(slave, transfer_len * 8,
154 spi_xfer(slave, 0, NULL, NULL, SPI_XFER_END);
156 spi_release_bus(slave);
/u-boot/board/work-microwave/work_92105/
H A Dwork_92105_display.c82 * Define slave as a module-wide local to save passing it around,
86 static struct spi_slave *slave; variable in typeref:struct:spi_slave
100 spi_xfer(slave, 16, dout, dout, SPI_XFER_BEGIN | SPI_XFER_END);
123 spi_xfer(slave, 16, dout, dout, SPI_XFER_BEGIN | SPI_XFER_END);
131 spi_xfer(slave, 16, din, din, SPI_XFER_BEGIN | SPI_XFER_END);
219 slave = spi_setup_slave(0, 0, 500000, 0);
221 if (!slave) {
222 printf("Failed to set up SPI slave\n");
226 claim_err = spi_claim_bus(slave);

Completed in 162 milliseconds

1234