Home
last modified time | relevance | path

Searched full:slave (Results 1 – 25 of 476) sorted by relevance

12345678910>>...20

/openbmc/u-boot/include/
H A Dspi.h25 #define SPI_SLAVE BIT(6) /* slave mode */
48 * This describes a SPI slave, a child device of the SPI bus. To obtain this
50 * dev_get_parent_platdata(slave->dev).
56 * @max_hz: Maximum bus speed that this slave can tolerate
68 * struct spi_slave - Representation of a SPI slave
71 * be accessed using dev_get_parent_priv() on the slave device. The SPI uclass
80 * @dev: SPI slave device
81 * @max_hz: Maximum speed for this slave
84 * @bus: ID of the bus that the slave is attached to. For
87 * @cs: ID of the chip select connected to the slave.
[all …]
/openbmc/u-boot/drivers/mtd/
H A Dmtdpart.c68 struct mtd_info *slave; in mtd_partitions_used() local
70 list_for_each_entry(slave, &master->partitions, node) { in mtd_partitions_used()
71 if (slave->usecount) in mtd_partitions_used()
529 * This function unregisters and destroy all slave MTD objects which are
534 struct mtd_info *slave, *next; in do_del_mtd_partitions() local
537 list_for_each_entry_safe(slave, next, &master->partitions, node) { in do_del_mtd_partitions()
538 if (mtd_has_partitions(slave)) in do_del_mtd_partitions()
539 del_mtd_partitions(slave); in do_del_mtd_partitions()
541 debug("Deleting %s MTD partition\n", slave->name); in do_del_mtd_partitions()
542 ret = del_mtd_device(slave); in do_del_mtd_partitions()
[all …]
/openbmc/u-boot/drivers/rtc/
H A Dm41t94.c20 static struct spi_slave *slave; variable
41 if (!slave) { in rtc_set()
42 slave = spi_setup_slave(CONFIG_M41T94_SPI_BUS, in rtc_set()
45 if (!slave) in rtc_set()
48 spi_claim_bus(slave); in rtc_set()
63 ret = spi_xfer(slave, 64, buf, NULL, SPI_XFER_BEGIN | SPI_XFER_END); in rtc_set()
64 spi_release_bus(slave); in rtc_set()
73 if (!slave) { in rtc_get()
74 slave = spi_setup_slave(CONFIG_M41T94_SPI_BUS, in rtc_get()
77 if (!slave) in rtc_get()
[all …]
/openbmc/u-boot/doc/
H A DREADME.srio-pcie-boot-corenet15 a) Master and slave can be SOCs in one board or SOCs in separate boards.
18 c) Only Master has NorFlash for booting, and all the Master's and Slave's
20 d) Slave has its own EEPROM for RCW and PBI.
21 e) Slave's RCW should configure the SerDes for SRIO or PCIE boot port, set
27 | NorFlash|<----->| Master |SRIO or PCIE | Slave |<---->[EEPROM]
37 1. Slave's RCW example for boot from SRIO port 1 and all cores in holdoff.
44 2. Slave's RCW example for boot from PCIE port 1 and all cores in holdoff.
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
[all …]
/openbmc/qemu/include/hw/i2c/
H A Di2c.h8 immediately. It does not support slave devices that need to be able to
9 defer their response (eg. CPU slave interfaces where the data is supplied
22 #define TYPE_I2C_SLAVE "i2c-slave"
29 /* Master to slave. Returns non-zero for a NAK, 0 for success. */
32 /* Master to slave (asynchronous). Receiving slave must call i2c_ack(). */
36 * Slave to master. This cannot fail, the device should always
42 * Notify the slave of a bus state change. For start event,
93 /* Set from slave currently mastering the bus. */
104 * @address: address of the slave
118 * @address: address of the slave
[all …]
/openbmc/u-boot/examples/standalone/
H A Datmel_df_pow2.c17 static int flash_cmd(struct spi_slave *slave, uchar cmd, uchar *buf, int len) in flash_cmd() argument
20 return spi_xfer(slave, 8 * len, buf, buf, SPI_XFER_BEGIN | SPI_XFER_END); in flash_cmd()
23 static int flash_status(struct spi_slave *slave) in flash_status() argument
26 if (flash_cmd(slave, CMD_STAT, buf, sizeof(buf))) in flash_status()
31 static int flash_set_pow2(struct spi_slave *slave) in flash_set_pow2() argument
40 ret = flash_cmd(slave, CMD_CFG, buf, sizeof(buf)); in flash_set_pow2()
47 ret = flash_status(slave); in flash_set_pow2()
54 static int flash_check(struct spi_slave *slave) in flash_check() argument
59 ret = flash_cmd(slave, CMD_ID, buf, sizeof(buf)); in flash_check()
130 struct spi_slave *slave; in atmel_df_pow2() local
[all …]
/openbmc/u-boot/drivers/spi/
H A Dsoft_spi_legacy.c26 struct spi_slave slave; member
30 static inline struct soft_spi_slave *to_soft_spi(struct spi_slave *slave) in to_soft_spi() argument
32 return container_of(slave, struct soft_spi_slave, slave); in to_soft_spi()
55 return &ss->slave; in spi_setup_slave()
58 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument
60 struct soft_spi_slave *ss = to_soft_spi(slave); in spi_free_slave()
65 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument
70 struct soft_spi_slave *ss = to_soft_spi(slave); in spi_claim_bus()
74 * this slave. in spi_claim_bus()
84 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument
[all …]
H A Dlpc32xx_ssp.c38 /* lpc32xx spi slave */
40 struct spi_slave slave; member
45 struct spi_slave *slave) in to_lpc32xx_spi_slave() argument
47 return container_of(slave, struct lpc32xx_spi_slave, slave); in to_lpc32xx_spi_slave()
64 pr_err("slave mode not supported\n"); in spi_setup_slave()
92 return &lslave->slave; in spi_setup_slave()
95 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument
97 struct lpc32xx_spi_slave *lslave = to_lpc32xx_spi_slave(slave); in spi_free_slave()
103 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument
105 /* only one bus and slave so far, always available */ in spi_claim_bus()
[all …]
H A Dspi-uclass.c52 struct spi_slave *slave = dev_get_parent_priv(dev); in dm_spi_claim_bus() local
55 speed = slave->max_hz; in dm_spi_claim_bus()
64 if (speed != slave->speed) { in dm_spi_claim_bus()
65 int ret = spi_set_speed_mode(bus, speed, slave->mode); in dm_spi_claim_bus()
69 slave->speed = speed; in dm_spi_claim_bus()
115 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument
117 return log_ret(dm_spi_claim_bus(slave->dev)); in spi_claim_bus()
120 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument
122 dm_spi_release_bus(slave->dev); in spi_release_bus()
125 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, in spi_xfer() argument
[all …]
H 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()
H A Dspi-mem-nodm.c9 int spi_mem_exec_op(struct spi_slave *slave, in spi_mem_exec_op() argument
31 ret = spi_claim_bus(slave); in spi_mem_exec_op()
54 ret = spi_xfer(slave, op_len * 8, op_buf, NULL, flag); in spi_mem_exec_op()
60 ret = spi_xfer(slave, op->data.nbytes * 8, tx_buf, in spi_mem_exec_op()
66 spi_release_bus(slave); in spi_mem_exec_op()
85 int spi_mem_adjust_op_size(struct spi_slave *slave, in spi_mem_adjust_op_size() argument
91 if (slave->max_write_size && len > slave->max_write_size) in spi_mem_adjust_op_size()
94 if (op->data.dir == SPI_MEM_DATA_IN && slave->max_read_size) in spi_mem_adjust_op_size()
96 slave->max_read_size); in spi_mem_adjust_op_size()
97 else if (slave->max_write_size) in spi_mem_adjust_op_size()
[all …]
H A Dti_qspi.c102 struct spi_slave slave; member
321 static inline struct ti_qspi_priv *to_ti_qspi_priv(struct spi_slave *slave) in to_ti_qspi_priv() argument
323 return container_of(slave, struct ti_qspi_priv, slave); in to_ti_qspi_priv()
331 void spi_cs_activate(struct spi_slave *slave) in spi_cs_activate() argument
337 void spi_cs_deactivate(struct spi_slave *slave) in spi_cs_deactivate() argument
339 struct ti_qspi_priv *priv = to_ti_qspi_priv(slave); in spi_cs_deactivate()
353 struct spi_slave *slave = &priv->slave; in ti_spi_setup_spi_register() local
358 slave->mode |= SPI_RX_QUAD; in ti_spi_setup_spi_register()
389 priv->slave.memory_map = (void *)MMAP_START_ADDR_DRA; in spi_setup_slave()
392 priv->slave.memory_map = (void *)MMAP_START_ADDR_AM43x; in spi_setup_slave()
[all …]
H A Dmpc8xxx_spi.c26 struct spi_slave *slave; in spi_setup_slave() local
31 slave = spi_alloc_slave_base(bus, cs); in spi_setup_slave()
32 if (!slave) in spi_setup_slave()
40 return slave; in spi_setup_slave()
43 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument
45 free(slave); in spi_free_slave()
64 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument
69 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument
74 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, in spi_xfer() argument
83 debug("spi_xfer: slave %u:%u dout %08X din %08X bitlen %u\n", in spi_xfer()
[all …]
H A Dcf_spi.c17 struct spi_slave slave; member
41 static inline struct cf_spi_slave *to_cf_spi_slave(struct spi_slave *slave) in to_cf_spi_slave() argument
43 return container_of(slave, struct cf_spi_slave, slave); in to_cf_spi_slave()
102 static int cfspi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, in cfspi_xfer() argument
105 struct cf_spi_slave *cfslave = to_cf_spi_slave(slave); in cfspi_xfer()
123 ctrl = (ctrl & 0xFF000000) | ((1 << slave->cs) << 16); in cfspi_xfer()
232 dspi->ctar[cfslave->slave.bus] & 0x78000000; in cfspi_setup_slave()
247 bus_setup |= (dspi->ctar[cfslave->slave.bus] & 0x78FCFFF0); in cfspi_setup_slave()
250 ((dspi->ctar[cfslave->slave.bus] & 0x78000000) == in cfspi_setup_slave()
275 dspi->ctar[cfslave->slave.bus] = bus_setup; in cfspi_setup_slave()
[all …]
H A Dspi-mem.c105 static int spi_check_buswidth_req(struct spi_slave *slave, u8 buswidth, bool tx) in spi_check_buswidth_req() argument
107 u32 mode = slave->mode; in spi_check_buswidth_req()
134 bool spi_mem_default_supports_op(struct spi_slave *slave, in spi_mem_default_supports_op() argument
137 if (spi_check_buswidth_req(slave, op->cmd.buswidth, true)) in spi_mem_default_supports_op()
141 spi_check_buswidth_req(slave, op->addr.buswidth, true)) in spi_mem_default_supports_op()
145 spi_check_buswidth_req(slave, op->dummy.buswidth, true)) in spi_mem_default_supports_op()
149 spi_check_buswidth_req(slave, op->data.buswidth, in spi_mem_default_supports_op()
160 * @slave: the SPI device
172 bool spi_mem_supports_op(struct spi_slave *slave, in spi_mem_supports_op() argument
175 struct udevice *bus = slave->dev->parent; in spi_mem_supports_op()
[all …]
H A Dmxs_spi.c31 struct spi_slave slave; member
37 static inline struct mxs_spi_slave *to_mxs_slave(struct spi_slave *slave) in to_mxs_slave() argument
39 return container_of(slave, struct mxs_spi_slave, slave); in to_mxs_slave()
72 return &mxs_slave->slave; in spi_setup_slave()
79 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument
81 struct mxs_spi_slave *mxs_slave = to_mxs_slave(slave); in spi_free_slave()
85 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument
87 struct mxs_spi_slave *mxs_slave = to_mxs_slave(slave); in spi_claim_bus()
93 writel((slave->cs << MXS_SSP_CHIPSELECT_SHIFT) | in spi_claim_bus()
104 mxs_set_ssp_busclock(slave->bus, mxs_slave->max_khz); in spi_claim_bus()
[all …]
H A Dfsl_espi.c16 struct spi_slave slave; member
28 #define to_fsl_spi_slave(s) container_of(s, struct fsl_spi_slave, slave)
112 return &fsl->slave; in spi_setup_slave()
115 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument
117 struct fsl_spi_slave *fsl = to_fsl_spi_slave(slave); in spi_free_slave()
121 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument
123 struct fsl_spi_slave *fsl = to_fsl_spi_slave(slave); in spi_claim_bus()
126 unsigned int cs = slave->cs; in spi_claim_bus()
131 debug("%s: bus:%i cs:%i\n", __func__, slave->bus, cs); in spi_claim_bus()
172 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument
[all …]
/openbmc/u-boot/drivers/power/
H 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()
/openbmc/u-boot/test/dm/
H A Dspi.c22 struct spi_slave *slave; in dm_test_spi_find() local
33 * this then remove the emulation and the slave device. in dm_test_spi_find()
51 NULL, 0, &bus, &slave)); in dm_test_spi_find()
62 &slave)); in dm_test_spi_find()
72 "spi_flash_std", "name", &bus, &slave)); in dm_test_spi_find()
75 ut_asserteq_ptr(info.dev, slave->dev); in dm_test_spi_find()
81 "spi_flash_std", "name", &bus, &slave)); in dm_test_spi_find()
83 ut_asserteq_ptr(info.dev, slave->dev); in dm_test_spi_find()
99 struct spi_slave *slave; in dm_test_spi_xfer() local
106 &bus, &slave)); in dm_test_spi_xfer()
[all …]
/openbmc/ipmbbridge/
H A DREADME.md12 "slave-path": "/dev/ipmb-4",
18 "slave-path": "/dev/ipmb-9",
33 "slave-path": "/dev/ipmb-1",
40 "slave-path": "/dev/ipmb-3",
47 "slave-path": "/dev/ipmb-5",
54 "slave-path": "/dev/ipmb-7",
67 slave-path : The ipmb device path.
/openbmc/u-boot/drivers/i2c/
H A DKconfig235 int "I2C1 Slave"
238 MXC I2C1 Slave
250 int "I2C2 Slave"
253 MXC I2C2 Slave
264 int "I2C3 Slave"
267 MXC I2C3 Slave
278 int "I2C4 Slave"
281 MXC I2C4 Slave
292 int "I2C5 Slave"
295 MXC I2C5 Slave
[all …]
/openbmc/u-boot/drivers/net/ti/
H A Dcpsw-common.c20 int slave, u8 *mac_addr) in davinci_emac_3517_get_macid() argument
43 addr += CTRL_MAC_REG(offset, slave); in davinci_emac_3517_get_macid()
59 static int cpsw_am33xx_cm_get_macid(struct udevice *dev, u16 offset, int slave, in cpsw_am33xx_cm_get_macid() argument
83 addr += CTRL_MAC_REG(offset, slave); in cpsw_am33xx_cm_get_macid()
99 int ti_cm_get_macid(struct udevice *dev, int slave, u8 *mac_addr) in ti_cm_get_macid() argument
102 return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr); in ti_cm_get_macid()
105 return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr); in ti_cm_get_macid()
108 return davinci_emac_3517_get_macid(dev, 0x110, slave, mac_addr); in ti_cm_get_macid()
111 return cpsw_am33xx_cm_get_macid(dev, 0x30, slave, mac_addr); in ti_cm_get_macid()
114 return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr); in ti_cm_get_macid()
[all …]
H A Dcpsw.c211 #define for_active_slave(slave, priv) \ argument
212 slave = (priv)->slaves + (priv)->data.active_slave; if (slave)
213 #define for_each_slave(slave, priv) \ argument
214 for (slave = (priv)->slaves; slave != (priv)->slaves + \
215 (priv)->data.slaves; slave++)
470 static void cpsw_set_slave_mac(struct cpsw_slave *slave, in cpsw_set_slave_mac() argument
476 writel(mac_hi(pdata->enetaddr), &slave->regs->sa_hi); in cpsw_set_slave_mac()
477 writel(mac_lo(pdata->enetaddr), &slave->regs->sa_lo); in cpsw_set_slave_mac()
479 __raw_writel(mac_hi(priv->dev->enetaddr), &slave->regs->sa_hi); in cpsw_set_slave_mac()
480 __raw_writel(mac_lo(priv->dev->enetaddr), &slave->regs->sa_lo); in cpsw_set_slave_mac()
[all …]
H A Dkeystone_net.c64 /* CPSW Switch slave registers */
75 /* CPSW Switch slave registers */
565 * Register MDIO bus for slave 0 only, other slave have in ks2_eth_probe()
578 /* Get the MDIO bus from slave 0 device */ in ks2_eth_probe()
622 int slave; in ks2_eth_bind_slaves() local
627 fdt_for_each_subnode(slave, fdt, interfaces) { in ks2_eth_bind_slaves()
630 slave_no = fdtdec_get_int(fdt, slave, "slave-port", -ENOENT); in ks2_eth_bind_slaves()
636 *gbe_0 = slave; in ks2_eth_bind_slaves()
638 /* Slave devices to be registered */ in ks2_eth_bind_slaves()
640 snprintf(slave_name, 20, "netcp@slave-%d", slave_no); in ks2_eth_bind_slaves()
[all …]
/openbmc/phosphor-logging/test/openpower-pels/
H A Ddevice_callouts_test.cpp333 "fsi-master/fsi0/slave@00:00/00:00:00:0a/fsi-master/fsi1/" in TEST_F()
334 "slave@01:00/01:01:00:06/sbefifo2-dev0/occ-hwmon.2"), in TEST_F()
342 "fsi-master/fsi0/slave@00:00/00:00:00:0a/fsi-master/fsi1/" in TEST_F()
343 "slave@01:00/01:01:00:03/i2c-211/211-0055"), in TEST_F()
352 "fsi0/slave@00:00/00:00:00:0a/fsi-master/fsi1/slave@08:00/" in TEST_F()
369 "fsi-master/fsi0/slave@00:00/00:00:00:0a/fsi-master/fsi1/" in TEST_F()
370 "slave@01:00/01:01:00:03/i2c-211/211-0055"), in TEST_F()
387 "fsi0/slave@00:00/00:00:00:0a/fsi-master/fsi1/slave@08:00/" in TEST_F()
404 "fsi-master/fsi0/slave@00:00/00:00:00:04/spi_master/spi2/" in TEST_F()
412 "fsi-master/fsi0/slave@00:00/00:00:00:0a/fsi-master/fsi1/" in TEST_F()
[all …]

12345678910>>...20