Home
last modified time | relevance | path

Searched refs:slave (Results 1 – 25 of 149) sorted by relevance

123456

/u-boot/drivers/mtd/
A Dmtdpart.c570 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 …]
/u-boot/examples/standalone/
A Datmel_df_pow2.c24 static int flash_status(struct spi_slave *slave) in flash_status() argument
48 ret = flash_status(slave); in flash_set_pow2()
131 struct spi_slave *slave; in atmel_df_pow2() local
164 if (!slave) { in atmel_df_pow2()
169 if (spi_claim_bus(slave)) { in atmel_df_pow2()
170 spi_free_slave(slave); in atmel_df_pow2()
174 if (flash_check(slave)) { in atmel_df_pow2()
179 status = flash_status(slave); in atmel_df_pow2()
196 if (flash_set_pow2(slave)) { in atmel_df_pow2()
207 spi_release_bus(slave); in atmel_df_pow2()
[all …]
/u-boot/drivers/spi/
A Dspi-mem-nodm.c11 int spi_mem_exec_op(struct spi_slave *slave, in spi_mem_exec_op() argument
33 ret = spi_claim_bus(slave); in spi_mem_exec_op()
62 ret = spi_xfer(slave, op->data.nbytes * 8, tx_buf, in spi_mem_exec_op()
68 spi_release_bus(slave); in spi_mem_exec_op()
87 int spi_mem_adjust_op_size(struct spi_slave *slave, in spi_mem_adjust_op_size() argument
93 if (slave->max_write_size && len > slave->max_write_size) in spi_mem_adjust_op_size()
97 if (slave->max_read_size) in spi_mem_adjust_op_size()
99 slave->max_read_size); in spi_mem_adjust_op_size()
100 } else if (slave->max_write_size) { in spi_mem_adjust_op_size()
102 slave->max_write_size - len); in spi_mem_adjust_op_size()
[all …]
A Dspi.c11 int spi_set_wordlen(struct spi_slave *slave, unsigned int wordlen) in spi_set_wordlen() argument
18 slave->wordlen = wordlen; in spi_set_wordlen()
30 struct spi_slave *slave; in spi_do_alloc_slave() local
33 slave = (struct spi_slave *)(ptr + offset); in spi_do_alloc_slave()
34 slave->bus = bus; in spi_do_alloc_slave()
35 slave->cs = cs; in spi_do_alloc_slave()
36 slave->wordlen = SPI_DEFAULT_WORDLEN; in spi_do_alloc_slave()
A Dspi-uclass.c61 speed = slave->max_hz; in dm_spi_claim_bus()
62 mode = slave->mode; in dm_spi_claim_bus()
166 dev_dbg(slave->dev, in spi_write_then_read()
172 dev_dbg(slave->dev, in spi_write_then_read()
247 slave->dev = dev; in spi_child_pre_probe()
388 slave->dev = dev; in spi_get_bus_and_cs()
404 *devp = slave; in spi_get_bus_and_cs()
476 slave->dev = dev; in _spi_get_bus_and_cs()
501 *devp = slave; in _spi_get_bus_and_cs()
528 &slave); in spi_setup_slave()
[all …]
A Dspi-mem.c117 u32 mode = slave->mode; in spi_check_buswidth_req()
261 if (!spi_mem_supports_op(slave, op)) in spi_mem_exec_op()
264 ret = spi_claim_bus(slave); in spi_mem_exec_op()
305 spi_release_bus(slave); in spi_mem_exec_op()
372 ret = spi_sync(slave, &msg); in spi_mem_exec_op()
434 spi_release_bus(slave); in spi_mem_exec_op()
480 if (slave->max_write_size && len > slave->max_write_size) in spi_mem_adjust_op_size()
484 if (slave->max_read_size) in spi_mem_adjust_op_size()
486 slave->max_read_size); in spi_mem_adjust_op_size()
487 } else if (slave->max_write_size) { in spi_mem_adjust_op_size()
[all …]
A Dsh_qspi.c74 struct spi_slave slave; member
231 return container_of(slave, struct sh_qspi_slave, slave); in to_sh_qspi()
239 void spi_cs_activate(struct spi_slave *slave) in spi_cs_activate() argument
241 struct sh_qspi_slave *ss = to_sh_qspi(slave); in spi_cs_activate()
246 void spi_cs_deactivate(struct spi_slave *slave) in spi_cs_deactivate() argument
248 struct sh_qspi_slave *ss = to_sh_qspi(slave); in spi_cs_deactivate()
272 return &ss->slave; in spi_setup_slave()
275 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument
282 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument
287 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument
[all …]
A Dfsl_espi.c26 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 Dsandbox_spi.c45 struct udevice *bus, struct udevice *slave, in sandbox_spi_get_emul() argument
65 static int sandbox_spi_xfer(struct udevice *slave, unsigned int bitlen, in sandbox_spi_xfer() argument
68 struct udevice *bus = slave->parent; in sandbox_spi_xfer()
87 cs = spi_chip_select(slave); in sandbox_spi_xfer()
94 ret = sandbox_spi_get_emul(state, bus, slave, &emul); in sandbox_spi_xfer()
A Dspi-mxic.c349 return spi_mem_default_supports_op(slave, op); in mxic_spi_mem_supports_op()
356 struct udevice *bus = slave->dev->parent; in mxic_spi_mem_exec_op()
362 if (slave->mode & (SPI_TX_OCTAL | SPI_RX_OCTAL)) in mxic_spi_mem_exec_op()
477 if (((slave->mode & SPI_TX_QUAD) && in mxic_spi_xfer()
478 !(slave->mode & SPI_RX_QUAD)) || in mxic_spi_xfer()
479 ((slave->mode & SPI_TX_DUAL) && in mxic_spi_xfer()
480 !(slave->mode & SPI_RX_DUAL))) in mxic_spi_xfer()
485 if (slave->mode & SPI_TX_QUAD) in mxic_spi_xfer()
487 else if (slave->mode & SPI_TX_DUAL) in mxic_spi_xfer()
490 if (slave->mode & SPI_RX_QUAD) in mxic_spi_xfer()
[all …]
/u-boot/drivers/power/
A Dpower_spi.c17 static struct spi_slave *slave; variable
24 if (!slave) { in pmic_reg()
25 slave = spi_setup_slave(p->bus, p->hw.spi.cs, p->hw.spi.clk, in pmic_reg()
28 if (!slave) in pmic_reg()
35 if (spi_claim_bus(slave)) in pmic_reg()
42 if (spi_xfer(slave, pmic_spi_bitlen, &tmp, &pmic_rx, in pmic_reg()
49 if (spi_xfer(slave, pmic_spi_bitlen, &tmp, &pmic_rx, in pmic_reg()
54 spi_release_bus(slave); in pmic_reg()
60 spi_release_bus(slave); in pmic_reg()
/u-boot/include/
A Dspi.h187 spi_do_alloc_slave(offsetof(_struct, slave), \
226 void spi_free_slave(struct spi_slave *slave);
242 int spi_claim_bus(struct spi_slave *slave);
253 void spi_release_bus(struct spi_slave *slave);
308 int spi_write_then_read(struct spi_slave *slave, const u8 *opcode,
338 void spi_cs_activate(struct spi_slave *slave);
347 void spi_cs_deactivate(struct spi_slave *slave);
358 int spi_set_speed(struct spi_slave *slave, uint hz);
551 int (*xfer)(struct udevice *slave, unsigned int bitlen,
619 int spi_chip_select(struct udevice *slave);
[all …]
A Dspi-mem.h174 struct spi_slave *slave; member
256 int (*adjust_op_size)(struct spi_slave *slave, struct spi_mem_op *op);
257 bool (*supports_op)(struct spi_slave *slave,
259 int (*exec_op)(struct spi_slave *slave,
319 int spi_mem_adjust_op_size(struct spi_slave *slave, struct spi_mem_op *op);
321 bool spi_mem_supports_op(struct spi_slave *slave, const struct spi_mem_op *op);
322 bool spi_mem_dtr_supports_op(struct spi_slave *slave,
325 bool spi_mem_default_supports_op(struct spi_slave *slave,
328 int spi_mem_exec_op(struct spi_slave *slave, const struct spi_mem_op *op);
/u-boot/drivers/misc/
A Dcros_ec_spi.c25 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 …]
/u-boot/drivers/fpga/
A Dstratixv.c18 struct spi_slave *slave; in program_write() local
25 slave = spi_setup_slave(spi_bus, spi_dev, 27777777, SPI_MODE_3); in program_write()
26 if (!slave) in program_write()
29 if (spi_claim_bus(slave)) in program_write()
32 ret = spi_xfer(slave, rbf_size * 8, rbf_data, (void *)rbf_data, in program_write()
35 spi_release_bus(slave); in program_write()
/u-boot/cmd/
A Dspi.c38 struct spi_slave *slave; in do_spi_xfer() local
50 str, &dev, &slave); in do_spi_xfer()
54 slave = spi_setup_slave(bus, cs, freq, mode); in do_spi_xfer()
55 if (!slave) { in do_spi_xfer()
61 ret = spi_claim_bus(slave); in do_spi_xfer()
64 ret = spi_xfer(slave, bitlen, dout, din, in do_spi_xfer()
81 spi_release_bus(slave); in do_spi_xfer()
83 spi_free_slave(slave); in do_spi_xfer()
/u-boot/drivers/net/ti/
A Dcpsw.c193 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 Dkeystone_net.c628 if (ofnode_read_u32(slave, "slave-port", &slave_no)) in ks2_bind_one_slave()
633 *gbe_0 = slave; in ks2_bind_one_slave()
650 ofnode interfaces, sec_slave, slave; in ks2_eth_bind_slaves() local
654 ofnode_for_each_subnode(slave, interfaces) { in ks2_eth_bind_slaves()
655 ret = ks2_bind_one_slave(dev, slave, gbe_0); in ks2_eth_bind_slaves()
661 ofnode_for_each_subnode(slave, sec_slave) { in ks2_eth_bind_slaves()
662 ret = ks2_bind_one_slave(dev, slave, NULL); in ks2_eth_bind_slaves()
693 phy = ofnode_get_phy_node(slave); in ks2_eth_parse_slave_interface()
712 priv->phy_if = ofnode_read_phy_mode(slave); in ks2_eth_parse_slave_interface()
737 slave = dev_ofnode(dev); in ks2_sl_eth_of_to_plat()
[all …]
/u-boot/test/dm/
A Dspi.c24 struct spi_slave *slave; in dm_test_spi_find() local
49 ut_asserteq(-ENODEV, spi_get_bus_and_cs(busnum, cs, &bus, &slave)); in dm_test_spi_find()
60 &slave)); in dm_test_spi_find()
70 "jedec_spi_nor", "name", &bus, &slave)); in dm_test_spi_find()
73 ut_asserteq_ptr(info.dev, slave->dev); in dm_test_spi_find()
80 &slave)); in dm_test_spi_find()
177 struct spi_slave *slave; in dm_test_spi_xfer() local
183 ut_assertok(spi_get_bus_and_cs(busnum, cs, &bus, &slave)); in dm_test_spi_xfer()
184 ut_assertok(spi_claim_bus(slave)); in dm_test_spi_xfer()
185 ut_assertok(spi_xfer(slave, 40, dout, din, in dm_test_spi_xfer()
[all …]
/u-boot/drivers/mtd/spi/
A Dsf-uclass.c54 struct spi_slave *slave; in spi_flash_probe() local
68 "jedec_spi_nor", str, &bus, &slave)) in spi_flash_probe()
71 return dev_get_uclass_priv(slave->dev); in spi_flash_probe()
77 struct spi_slave *slave; in spi_flash_probe_bus_cs() local
81 ret = spi_get_bus_and_cs(busnum, cs, &bus, &slave); in spi_flash_probe_bus_cs()
85 *devp = slave->dev; in spi_flash_probe_bus_cs()
/u-boot/board/work-microwave/work_92105/
A Dwork_92105_display.c86 static struct spi_slave *slave; variable
100 spi_xfer(slave, 16, dout, dout, SPI_XFER_BEGIN | SPI_XFER_END); in max6957aax_write()
123 spi_xfer(slave, 16, dout, dout, SPI_XFER_BEGIN | SPI_XFER_END); in max6957aax_read()
131 spi_xfer(slave, 16, din, din, SPI_XFER_BEGIN | SPI_XFER_END); in max6957aax_read()
219 slave = spi_setup_slave(0, 0, 500000, 0); in work_92105_display_init()
221 if (!slave) { in work_92105_display_init()
226 claim_err = spi_claim_bus(slave); in work_92105_display_init()
/u-boot/arch/arm/dts/
A Dkeystone-k2e-netcp.dtsi137 slave-port = <0>;
142 slave-port = <1>;
148 secondary-slave-ports {
150 slave-port = <2>;
154 slave-port = <3>;
158 slave-port = <4>;
162 slave-port = <5>;
166 slave-port = <6>;
170 slave-port = <7>;
/u-boot/board/cssi/common/
A Dcommon.c89 struct spi_slave *slave; in read_eeprom() local
98 "generic_0:0", &eeprom, &slave); in read_eeprom()
102 ret = spi_claim_bus(slave); in read_eeprom()
104 ret = spi_xfer(slave, sizeof(dout) << 3, dout, NULL, SPI_XFER_BEGIN); in read_eeprom()
108 ret = spi_xfer(slave, len << 3, NULL, din, SPI_XFER_END); in read_eeprom()
112 spi_release_bus(slave); in read_eeprom()
/u-boot/arch/arm/cpu/armv7/ls102xa/
A Dsoc.c184 out_le32(&cci->slave[0].snoop_ctrl, in arch_soc_init()
186 out_le32(&cci->slave[1].snoop_ctrl, in arch_soc_init()
188 out_le32(&cci->slave[2].snoop_ctrl, in arch_soc_init()
190 out_le32(&cci->slave[4].snoop_ctrl, in arch_soc_init()
199 out_le32(&cci->slave[1].sha_ord, CCI400_SHAORD_NON_SHAREABLE); in arch_soc_init()
200 out_le32(&cci->slave[2].sha_ord, CCI400_SHAORD_NON_SHAREABLE); in arch_soc_init()
/u-boot/doc/
A DREADME.srio-pcie-boot-corenet15 a) Master and slave can be SOCs in one board or SOCs in separate boards.
52 a) Update RCW for slave with boot from SRIO or PCIE port 1 configuration.
53 b) Program slave's U-Boot image, UCode, and ENV parameters into master's
62 Then, it will finish necessary configurations for slave's boot from
64 e) Master will set inbound SRIO or PCIE windows covered slave's U-Boot
66 f) Master will set an inbound SRIO or PCIE window covered slave's UCode
69 slave's registers for the core's releasing.
70 h) Since all cores of slave in holdoff, slave should be powered on before
72 startup phase of the slave from SRIO or PCIE, it will finish some
96 For slave, U-Boot image should be generated specifically by
[all …]

Completed in 63 milliseconds

123456