| /openbmc/u-boot/drivers/mtd/ |
| H A D | mtdpart.c | 68 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() 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() 545 slave->name, ret); in do_del_mtd_partitions() [all …]
|
| /openbmc/u-boot/drivers/rtc/ |
| H A D | m41t94.c | 20 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 …]
|
| H A D | ds1306.c | 280 static struct spi_slave *slave; variable 293 if (!slave) { in rtc_get() 294 slave = spi_setup_slave(0, CONFIG_SYS_SPI_RTC_DEVID, 600000, in rtc_get() 296 if (!slave) in rtc_get() 300 if (spi_claim_bus(slave)) in rtc_get() 311 spi_release_bus(slave); in rtc_get() 356 if (!slave) { in rtc_set() 357 slave = spi_setup_slave(0, CONFIG_SYS_SPI_RTC_DEVID, 600000, in rtc_set() 359 if (!slave) in rtc_set() 363 if (spi_claim_bus(slave)) in rtc_set() [all …]
|
| /openbmc/u-boot/examples/standalone/ |
| H A D | atmel_df_pow2.c | 17 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 D | soft_spi_legacy.c | 26 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() 84 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument 101 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, in spi_xfer() argument [all …]
|
| H A D | mpc8xxx_spi.c | 26 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 84 slave->bus, slave->cs, *(uint *) dout, *(uint *) din, bitlen); in spi_xfer() [all …]
|
| H A D | spi.c | 11 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 D | cf_spi.c | 17 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 D | ti_qspi.c | 102 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 D | lpc32xx_ssp.c | 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() 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 109 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, in spi_xfer() argument 112 struct lpc32xx_spi_slave *lslave = to_lpc32xx_spi_slave(slave); in spi_xfer() 131 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument
|
| H A D | spi-mem-nodm.c | 9 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 D | mxs_spi.c | 31 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 D | spi-uclass.c | 52 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 D | spi-mem.c | 105 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() 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() 179 return ops->mem_ops->supports_op(slave, op); in spi_mem_supports_op() [all …]
|
| H A D | fsl_espi.c | 16 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 …]
|
| H A D | davinci_spi.c | 123 struct spi_slave slave; member 348 static inline struct davinci_spi_slave *to_davinci_spi(struct spi_slave *slave) in to_davinci_spi() argument 350 return container_of(slave, struct davinci_spi_slave, slave); in to_davinci_spi() 381 void spi_cs_activate(struct spi_slave *slave) in spi_cs_activate() argument 386 void spi_cs_deactivate(struct spi_slave *slave) in spi_cs_deactivate() argument 424 return &ds->slave; in spi_setup_slave() 427 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 429 struct davinci_spi_slave *ds = to_davinci_spi(slave); in spi_free_slave() 434 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, in spi_xfer() argument 437 struct davinci_spi_slave *ds = to_davinci_spi(slave); in spi_xfer() [all …]
|
| H A D | sh_qspi.c | 71 struct spi_slave slave; member 226 static inline struct sh_qspi_slave *to_sh_qspi(struct spi_slave *slave) in to_sh_qspi() argument 228 return container_of(slave, struct sh_qspi_slave, slave); in to_sh_qspi() 236 void spi_cs_activate(struct spi_slave *slave) in spi_cs_activate() argument 238 struct sh_qspi_slave *ss = to_sh_qspi(slave); in spi_cs_activate() 243 void spi_cs_deactivate(struct spi_slave *slave) in spi_cs_deactivate() argument 245 struct sh_qspi_slave *ss = to_sh_qspi(slave); in spi_cs_deactivate() 269 return &ss->slave; in spi_setup_slave() 272 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 274 struct sh_qspi_slave *spi = to_sh_qspi(slave); in spi_free_slave() [all …]
|
| /openbmc/u-boot/drivers/power/ |
| H A D | power_spi.c | 17 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/drivers/net/ti/ |
| H A D | cpsw-common.c | 20 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 …]
|
| /openbmc/u-boot/test/dm/ |
| H A D | spi.c | 22 struct spi_slave *slave; in dm_test_spi_find() local 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() 107 ut_assertok(spi_claim_bus(slave)); in dm_test_spi_xfer() [all …]
|
| /openbmc/u-boot/include/ |
| H A D | spi.h | 146 spi_do_alloc_slave(offsetof(_struct, slave), \ 185 void spi_free_slave(struct spi_slave *slave); 201 int spi_claim_bus(struct spi_slave *slave); 212 void spi_release_bus(struct spi_slave *slave); 224 int spi_set_wordlen(struct spi_slave *slave, unsigned int wordlen); 248 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, 272 void spi_cs_activate(struct spi_slave *slave); 281 void spi_cs_deactivate(struct spi_slave *slave); 289 void spi_set_speed(struct spi_slave *slave, uint hz); 301 static inline int spi_w8r8(struct spi_slave *slave, unsigned char byte) in spi_w8r8() argument [all …]
|
| /openbmc/u-boot/drivers/misc/ |
| H A D | cros_ec_spi.c | 24 struct spi_slave *slave = dev_get_parent_priv(dev->dev); in cros_ec_spi_packet() local 30 if (spi_claim_bus(slave)) { in cros_ec_spi_packet() 35 rv = spi_xfer(slave, out_bytes * 8, dev->dout, NULL, SPI_XFER_BEGIN); in cros_ec_spi_packet() 40 rv = spi_xfer(slave, 8, NULL, &byte, 0); in cros_ec_spi_packet() 51 rv = spi_xfer(slave, in_bytes * 8, NULL, dev->din, 0); in cros_ec_spi_packet() 53 spi_xfer(slave, 0, NULL, NULL, SPI_XFER_END); in cros_ec_spi_packet() 54 spi_release_bus(slave); in cros_ec_spi_packet() 84 struct spi_slave *slave = dev_get_parent_priv(dev->dev); in cros_ec_spi_command() local 117 if (spi_claim_bus(slave)) { in cros_ec_spi_command() 138 rv = spi_xfer(slave, max(len, in_bytes) * 8, out, p, in cros_ec_spi_command() [all …]
|
| /openbmc/u-boot/cmd/ |
| H A D | spi.c | 37 struct spi_slave *slave; in do_spi_xfer() local 49 str, &dev, &slave); in do_spi_xfer() 53 slave = spi_setup_slave(bus, cs, 1000000, mode); in do_spi_xfer() 54 if (!slave) { in do_spi_xfer() 60 ret = spi_claim_bus(slave); in do_spi_xfer() 63 ret = spi_xfer(slave, bitlen, dout, din, in do_spi_xfer() 80 spi_release_bus(slave); in do_spi_xfer() 82 spi_free_slave(slave); in do_spi_xfer()
|
| /openbmc/u-boot/drivers/fpga/ |
| H A D | stratixv.c | 16 struct spi_slave *slave; in program_write() local 23 slave = spi_setup_slave(spi_bus, spi_dev, 27777777, SPI_MODE_3); in program_write() 24 if (!slave) in program_write() 27 if (spi_claim_bus(slave)) in program_write() 30 ret = spi_xfer(slave, rbf_size * 8, rbf_data, (void *)rbf_data, in program_write() 33 spi_release_bus(slave); in program_write()
|
| /openbmc/ipmbbridge/ |
| H A D | README.md | 12 "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.
|