Home
last modified time | relevance | path

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

123456

/u-boot/drivers/rtc/
A Dm41t94.c20 static struct spi_slave *slave; variable
41 if (!slave) { in rtc_set()
45 if (!slave) in rtc_set()
48 spi_claim_bus(slave); in rtc_set()
64 spi_release_bus(slave); in rtc_set()
73 if (!slave) { in rtc_get()
77 if (!slave) in rtc_get()
80 spi_claim_bus(slave); in rtc_get()
83 ret = spi_w8r8(slave, M41T94_REG_HT); in rtc_get()
104 hour = spi_w8r8(slave, M41T94_REG_HOURS); in rtc_get()
[all …]
A Dds1306.c294 if (!slave) { in rtc_get()
297 if (!slave) in rtc_get()
301 if (spi_claim_bus(slave)) in rtc_get()
312 spi_release_bus(slave); in rtc_get()
357 if (!slave) { in rtc_set()
360 if (!slave) in rtc_set()
364 if (spi_claim_bus(slave)) in rtc_set()
379 spi_release_bus(slave); in rtc_set()
388 if (!slave) { in rtc_reset()
391 if (!slave) in rtc_reset()
[all …]
/u-boot/drivers/mtd/
A Dmtdpart.c581 slave = kzalloc(sizeof(*slave), GFP_KERNEL); in allocate_partition()
688 if (master->size - slave->offset >= slave->size) { in allocate_partition()
689 slave->size = master->size - slave->offset in allocate_partition()
700 slave->size = master->size - slave->offset; in allocate_partition()
703 (unsigned long long)(slave->offset + slave->size), slave->name); in allocate_partition()
714 if (slave->offset + slave->size > master->size) { in allocate_partition()
715 slave->size = master->size - slave->offset; in allocate_partition()
722 u64 end = slave->offset + slave->size; in allocate_partition()
745 mtd_mod_by_eb(slave->offset, slave)) { in allocate_partition()
754 mtd_mod_by_eb(slave->size, slave)) { in allocate_partition()
[all …]
/u-boot/drivers/video/
A Dlg4573.c27 ret = spi_xfer(slave, 16, &buf16, NULL, in lb043wv_spi_write_u16()
201 ret = spi_claim_bus(slave); in lg4573_spi_startup()
206 lb043wv_power_settings(slave); in lg4573_spi_startup()
207 lb043wv_gamma_settings(slave); in lg4573_spi_startup()
208 lb043wv_display_on(slave); in lg4573_spi_startup()
210 spi_release_bus(slave); in lg4573_spi_startup()
217 struct spi_slave *slave; in do_lgset() local
227 slave = dev_get_parent_priv(dev); in do_lgset()
228 if (!slave) { in do_lgset()
232 lg4573_spi_startup(slave); in do_lgset()
[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
163 if (!slave) { in atmel_df_pow2()
168 if (spi_claim_bus(slave)) { in atmel_df_pow2()
169 spi_free_slave(slave); in atmel_df_pow2()
173 if (flash_check(slave)) { in atmel_df_pow2()
178 status = flash_status(slave); in atmel_df_pow2()
195 if (flash_set_pow2(slave)) { in atmel_df_pow2()
206 spi_release_bus(slave); in atmel_df_pow2()
[all …]
/u-boot/drivers/spi/
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-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()
56 ret = spi_xfer(slave, op_len * 8, op_buf, NULL, flag); 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()
96 if (op->data.dir == SPI_MEM_DATA_IN && slave->max_read_size) in spi_mem_adjust_op_size()
98 slave->max_read_size); in spi_mem_adjust_op_size()
99 else if (slave->max_write_size) in spi_mem_adjust_op_size()
[all …]
A Dspi-uclass.c60 speed = slave->max_hz; in dm_spi_claim_bus()
61 mode = slave->mode; in dm_spi_claim_bus()
150 dev_dbg(slave->dev, in spi_write_then_read()
156 dev_dbg(slave->dev, in spi_write_then_read()
221 slave->dev = dev; in spi_child_pre_probe()
224 slave->mode = plat->mode; in spi_child_pre_probe()
339 struct spi_slave *slave; in spi_get_bus_and_cs() local
392 slave->dev = dev; in spi_get_bus_and_cs()
409 *devp = slave; in spi_get_bus_and_cs()
434 &slave); in spi_setup_slave()
[all …]
A Dspi-mem.c115 u32 mode = slave->mode; in spi_check_buswidth_req()
223 if (!spi_mem_supports_op(slave, op)) in spi_mem_exec_op()
226 ret = spi_claim_bus(slave); in spi_mem_exec_op()
251 ret = ops->mem_ops->exec_op(slave, op); in spi_mem_exec_op()
267 spi_release_bus(slave); in spi_mem_exec_op()
335 ret = spi_sync(slave, &msg); in spi_mem_exec_op()
397 spi_release_bus(slave); in spi_mem_exec_op()
444 if (slave->max_write_size && len > slave->max_write_size) in spi_mem_adjust_op_size()
448 if (slave->max_read_size) in spi_mem_adjust_op_size()
450 slave->max_read_size); in spi_mem_adjust_op_size()
[all …]
A Dsh_qspi.c72 struct spi_slave slave; member
229 return container_of(slave, struct sh_qspi_slave, slave); in to_sh_qspi()
237 void spi_cs_activate(struct spi_slave *slave) in spi_cs_activate() argument
239 struct sh_qspi_slave *ss = to_sh_qspi(slave); in spi_cs_activate()
244 void spi_cs_deactivate(struct spi_slave *slave) in spi_cs_deactivate() argument
246 struct sh_qspi_slave *ss = to_sh_qspi(slave); in spi_cs_deactivate()
270 return &ss->slave; in spi_setup_slave()
273 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument
280 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument
285 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.c49 struct udevice *bus, struct udevice *slave, in sandbox_spi_get_emul() argument
69 static int sandbox_spi_xfer(struct udevice *slave, unsigned int bitlen, in sandbox_spi_xfer() argument
72 struct udevice *bus = slave->parent; in sandbox_spi_xfer()
91 cs = spi_chip_select(slave); in sandbox_spi_xfer()
98 ret = sandbox_spi_get_emul(state, bus, slave, &emul); in sandbox_spi_xfer()
/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);
356 void spi_set_speed(struct spi_slave *slave, uint hz);
549 int (*xfer)(struct udevice *slave, unsigned int bitlen,
600 int spi_chip_select(struct udevice *slave);
[all …]
A Dspi-mem.h180 int (*adjust_op_size)(struct spi_slave *slave, struct spi_mem_op *op);
181 bool (*supports_op)(struct spi_slave *slave,
183 int (*exec_op)(struct spi_slave *slave,
237 int spi_mem_adjust_op_size(struct spi_slave *slave, struct spi_mem_op *op);
239 bool spi_mem_supports_op(struct spi_slave *slave, const struct spi_mem_op *op);
241 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.c197 slave = (priv)->slaves + ((priv)->data)->active_slave; if (slave)
199 for (slave = (priv)->slaves; slave != (priv)->slaves + \
835 slave->data = data; in cpsw_slave_setup()
847 slave->data->phy_addr, in cpsw_phy_init()
849 slave->data->phy_if); in cpsw_phy_init()
861 slave->slave_num + 1, slave->data->max_speed); in cpsw_phy_init()
1092 mask = GMII_SEL_MODE_MASK << (slave * 2) | BIT(slave + 6); in cpsw_gmii_sel_am3352()
1093 mode <<= slave * 2; in cpsw_gmii_sel_am3352()
1096 if (slave == 0) in cpsw_gmii_sel_am3352()
1103 if (slave == 0) in cpsw_gmii_sel_am3352()
[all …]
/u-boot/test/dm/
A Dspi.c24 struct spi_slave *slave; in dm_test_spi_find() local
50 NULL, 0, &bus, &slave)); in dm_test_spi_find()
61 &slave)); in dm_test_spi_find()
71 "jedec_spi_nor", "name", &bus, &slave)); in dm_test_spi_find()
74 ut_asserteq_ptr(info.dev, slave->dev); in dm_test_spi_find()
80 "jedec_spi_nor", "name", &bus, &slave)); in dm_test_spi_find()
179 struct spi_slave *slave; in dm_test_spi_xfer() local
186 &bus, &slave)); in dm_test_spi_xfer()
187 ut_assertok(spi_claim_bus(slave)); in dm_test_spi_xfer()
188 ut_assertok(spi_xfer(slave, 40, dout, din, in dm_test_spi_xfer()
[all …]
/u-boot/board/gdsys/common/
A Dmclink.c63 int mclink_send(u8 slave, u16 addr, u16 data) in mclink_send() argument
77 FPGA_SET_REG(0, mc_tx_cmd, (slave & 0x03) << 14); in mclink_send()
98 int mclink_receive(u8 slave, u16 addr, u16 *data) in mclink_receive() argument
108 ((slave & 0x03) << 14) | (1 << 12) | (1 << 0)); in mclink_receive()
123 if ((rx_cmd_status >> 14) != slave) { in mclink_receive()
125 rx_cmd_status >> 14, slave); in mclink_receive()
A Dmclink.h11 int mclink_send(u8 slave, u16 addr, u16 data);
12 int mclink_receive(u8 slave, u16 addr, u16 *data);
/u-boot/board/work-microwave/work_92105/
A Dwork_92105_display.c85 static struct spi_slave *slave; variable
99 spi_xfer(slave, 16, dout, dout, SPI_XFER_BEGIN | SPI_XFER_END); in max6957aax_write()
122 spi_xfer(slave, 16, dout, dout, SPI_XFER_BEGIN | SPI_XFER_END); in max6957aax_read()
130 spi_xfer(slave, 16, din, din, SPI_XFER_BEGIN | SPI_XFER_END); in max6957aax_read()
218 slave = spi_setup_slave(0, 0, 500000, 0); in work_92105_display_init()
220 if (!slave) { in work_92105_display_init()
225 claim_err = spi_claim_bus(slave); in work_92105_display_init()
/u-boot/arch/arm/dts/
A Dkeystone-k2e-netcp.dtsi140 slave-port = <0>;
145 slave-port = <1>;
151 secondary-slave-ports {
153 slave-port = <2>;
157 slave-port = <3>;
161 slave-port = <4>;
165 slave-port = <5>;
169 slave-port = <6>;
173 slave-port = <7>;
/u-boot/arch/arm/cpu/armv7/ls102xa/
A Dsoc.c186 out_le32(&cci->slave[0].snoop_ctrl, in arch_soc_init()
188 out_le32(&cci->slave[1].snoop_ctrl, in arch_soc_init()
190 out_le32(&cci->slave[2].snoop_ctrl, in arch_soc_init()
192 out_le32(&cci->slave[4].snoop_ctrl, in arch_soc_init()
201 out_le32(&cci->slave[1].sha_ord, CCI400_SHAORD_NON_SHAREABLE); in arch_soc_init()
202 out_le32(&cci->slave[2].sha_ord, CCI400_SHAORD_NON_SHAREABLE); in arch_soc_init()

Completed in 35 milliseconds

123456