| /rk3399_rockchip-uboot/drivers/mtd/ |
| H A D | mtdpart.c | 69 struct mtd_info *slave; in mtd_partitions_used() local 71 list_for_each_entry(slave, &master->partitions, node) { in mtd_partitions_used() 72 if (slave->usecount) in mtd_partitions_used() 535 struct mtd_info *slave, *next; in do_del_mtd_partitions() local 538 list_for_each_entry_safe(slave, next, &master->partitions, node) { in do_del_mtd_partitions() 539 if (mtd_has_partitions(slave)) in do_del_mtd_partitions() 540 del_mtd_partitions(slave); in do_del_mtd_partitions() 542 debug("Deleting %s MTD partition\n", slave->name); in do_del_mtd_partitions() 543 ret = del_mtd_device(slave); in do_del_mtd_partitions() 546 slave->name, ret); in do_del_mtd_partitions() [all …]
|
| /rk3399_rockchip-uboot/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 | 283 static struct spi_slave *slave; variable 296 if (!slave) { in rtc_get() 297 slave = spi_setup_slave(0, CONFIG_SYS_SPI_RTC_DEVID, 600000, in rtc_get() 299 if (!slave) in rtc_get() 303 if (spi_claim_bus(slave)) in rtc_get() 314 spi_release_bus(slave); in rtc_get() 359 if (!slave) { in rtc_set() 360 slave = spi_setup_slave(0, CONFIG_SYS_SPI_RTC_DEVID, 600000, in rtc_set() 362 if (!slave) in rtc_set() 366 if (spi_claim_bus(slave)) in rtc_set() [all …]
|
| /rk3399_rockchip-uboot/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() 132 struct spi_slave *slave; in atmel_df_pow2() local [all …]
|
| /rk3399_rockchip-uboot/drivers/spi/ |
| H A D | soft_spi_legacy.c | 27 struct spi_slave slave; member 31 static inline struct soft_spi_slave *to_soft_spi(struct spi_slave *slave) in to_soft_spi() argument 33 return container_of(slave, struct soft_spi_slave, slave); in to_soft_spi() 63 return &ss->slave; in spi_setup_slave() 66 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 68 struct soft_spi_slave *ss = to_soft_spi(slave); in spi_free_slave() 73 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument 78 struct soft_spi_slave *ss = to_soft_spi(slave); in spi_claim_bus() 92 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument 109 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, in spi_xfer() argument [all …]
|
| H A D | mpc8xxx_spi.c | 27 struct spi_slave *slave; in spi_setup_slave() local 32 slave = spi_alloc_slave_base(bus, cs); in spi_setup_slave() 33 if (!slave) in spi_setup_slave() 41 return slave; in spi_setup_slave() 44 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 46 free(slave); in spi_free_slave() 65 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument 70 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument 75 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, in spi_xfer() argument 85 slave->bus, slave->cs, *(uint *) dout, *(uint *) din, bitlen); in spi_xfer() [all …]
|
| H A D | spi.c | 12 int spi_set_wordlen(struct spi_slave *slave, unsigned int wordlen) in spi_set_wordlen() argument 19 slave->wordlen = wordlen; in spi_set_wordlen() 31 struct spi_slave *slave; in spi_do_alloc_slave() local 34 slave = (struct spi_slave *)(ptr + offset); in spi_do_alloc_slave() 35 slave->bus = bus; in spi_do_alloc_slave() 36 slave->cs = cs; in spi_do_alloc_slave() 37 slave->wordlen = SPI_DEFAULT_WORDLEN; in spi_do_alloc_slave()
|
| H A D | cf_spi.c | 18 struct spi_slave slave; member 42 static inline struct cf_spi_slave *to_cf_spi_slave(struct spi_slave *slave) in to_cf_spi_slave() argument 44 return container_of(slave, struct cf_spi_slave, slave); in to_cf_spi_slave() 103 static int cfspi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, in cfspi_xfer() argument 106 struct cf_spi_slave *cfslave = to_cf_spi_slave(slave); in cfspi_xfer() 124 ctrl = (ctrl & 0xFF000000) | ((1 << slave->cs) << 16); in cfspi_xfer() 233 dspi->ctar[cfslave->slave.bus] & 0x78000000; in cfspi_setup_slave() 248 bus_setup |= (dspi->ctar[cfslave->slave.bus] & 0x78FCFFF0); in cfspi_setup_slave() 251 ((dspi->ctar[cfslave->slave.bus] & 0x78000000) == in cfspi_setup_slave() 276 dspi->ctar[cfslave->slave.bus] = bus_setup; in cfspi_setup_slave() [all …]
|
| H A D | lpc32xx_ssp.c | 41 struct spi_slave slave; member 46 struct spi_slave *slave) in to_lpc32xx_spi_slave() argument 48 return container_of(slave, struct lpc32xx_spi_slave, slave); in to_lpc32xx_spi_slave() 102 return &lslave->slave; in spi_setup_slave() 105 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 107 struct lpc32xx_spi_slave *lslave = to_lpc32xx_spi_slave(slave); in spi_free_slave() 113 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument 119 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, in spi_xfer() argument 122 struct lpc32xx_spi_slave *lslave = to_lpc32xx_spi_slave(slave); in spi_xfer() 141 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument
|
| H A D | ti_qspi.c | 103 struct spi_slave slave; member 322 static inline struct ti_qspi_priv *to_ti_qspi_priv(struct spi_slave *slave) in to_ti_qspi_priv() argument 324 return container_of(slave, struct ti_qspi_priv, slave); in to_ti_qspi_priv() 332 void spi_cs_activate(struct spi_slave *slave) in spi_cs_activate() argument 338 void spi_cs_deactivate(struct spi_slave *slave) in spi_cs_deactivate() argument 340 struct ti_qspi_priv *priv = to_ti_qspi_priv(slave); in spi_cs_deactivate() 354 struct spi_slave *slave = &priv->slave; in ti_spi_setup_spi_register() local 359 slave->mode |= SPI_RX_QUAD; in ti_spi_setup_spi_register() 390 priv->slave.memory_map = (void *)MMAP_START_ADDR_DRA; in spi_setup_slave() 393 priv->slave.memory_map = (void *)MMAP_START_ADDR_AM43x; in spi_setup_slave() [all …]
|
| 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 | spi-uclass.c | 53 struct spi_slave *slave = dev_get_parent_priv(dev); in dm_spi_claim_bus() local 56 speed = slave->max_hz; in dm_spi_claim_bus() 57 mode = slave->mode; in dm_spi_claim_bus() 69 int ret = spi_set_speed_mode(bus, speed, slave->mode); in dm_spi_claim_bus() 118 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument 120 return log_ret(dm_spi_claim_bus(slave->dev)); in spi_claim_bus() 123 void spi_release_bus(struct spi_slave *slave) in spi_release_bus() argument 125 dm_spi_release_bus(slave->dev); in spi_release_bus() 128 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, in spi_xfer() argument 131 return dm_spi_xfer(slave->dev, bitlen, dout, din, flags); in spi_xfer() [all …]
|
| H A D | sh_qspi.c | 71 struct spi_slave slave; member 75 static inline struct sh_qspi_slave *to_sh_qspi(struct spi_slave *slave) in to_sh_qspi() argument 77 return container_of(slave, struct sh_qspi_slave, slave); in to_sh_qspi() 128 void spi_cs_activate(struct spi_slave *slave) in spi_cs_activate() argument 130 struct sh_qspi_slave *ss = to_sh_qspi(slave); in spi_cs_activate() 151 void spi_cs_deactivate(struct spi_slave *slave) in spi_cs_deactivate() argument 153 struct sh_qspi_slave *ss = to_sh_qspi(slave); in spi_cs_deactivate() 183 return &ss->slave; in spi_setup_slave() 186 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 188 struct sh_qspi_slave *spi = to_sh_qspi(slave); in spi_free_slave() [all …]
|
| H A D | mxs_spi.c | 32 struct spi_slave slave; member 38 static inline struct mxs_spi_slave *to_mxs_slave(struct spi_slave *slave) in to_mxs_slave() argument 40 return container_of(slave, struct mxs_spi_slave, slave); in to_mxs_slave() 77 return &mxs_slave->slave; in spi_setup_slave() 84 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 86 struct mxs_spi_slave *mxs_slave = to_mxs_slave(slave); in spi_free_slave() 90 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument 92 struct mxs_spi_slave *mxs_slave = to_mxs_slave(slave); in spi_claim_bus() 98 writel((slave->cs << MXS_SSP_CHIPSELECT_SHIFT) | in spi_claim_bus() 109 mxs_set_ssp_busclock(slave->bus, mxs_slave->max_khz); in spi_claim_bus() [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() 140 bool spi_mem_default_supports_op(struct spi_slave *slave, in spi_mem_default_supports_op() argument 143 if (spi_check_buswidth_req(slave, op->cmd.buswidth, true)) in spi_mem_default_supports_op() 147 spi_check_buswidth_req(slave, op->addr.buswidth, true)) in spi_mem_default_supports_op() 151 spi_check_buswidth_req(slave, op->dummy.buswidth, true)) in spi_mem_default_supports_op() 155 spi_check_buswidth_req(slave, op->data.buswidth, in spi_mem_default_supports_op() 178 bool spi_mem_supports_op(struct spi_slave *slave, in spi_mem_supports_op() argument 181 struct udevice *bus = slave->dev->parent; in spi_mem_supports_op() 185 return ops->mem_ops->supports_op(slave, op); in spi_mem_supports_op() [all …]
|
| H A D | fsl_espi.c | 17 struct spi_slave slave; member 29 #define to_fsl_spi_slave(s) container_of(s, struct fsl_spi_slave, slave) 113 return &fsl->slave; in spi_setup_slave() 116 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 118 struct fsl_spi_slave *fsl = to_fsl_spi_slave(slave); in spi_free_slave() 127 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument 129 struct fsl_spi_slave *fsl = to_fsl_spi_slave(slave); in spi_claim_bus() 132 unsigned int cs = slave->cs; in spi_claim_bus() 137 debug("%s: bus:%i cs:%i\n", __func__, slave->bus, cs); in spi_claim_bus() 178 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 429 return &ds->slave; in spi_setup_slave() 432 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 434 struct davinci_spi_slave *ds = to_davinci_spi(slave); in spi_free_slave() 439 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, in spi_xfer() argument 442 struct davinci_spi_slave *ds = to_davinci_spi(slave); in spi_xfer() [all …]
|
| H A D | kirkwood_spi.c | 109 struct spi_slave *slave; in spi_setup_slave() local 121 slave = spi_alloc_slave_base(bus, cs); in spi_setup_slave() 122 if (!slave) in spi_setup_slave() 144 return slave; in spi_setup_slave() 147 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument 152 free(slave); in spi_free_slave() 159 __attribute__((weak)) int board_spi_claim_bus(struct spi_slave *slave) in board_spi_claim_bus() argument 164 int spi_claim_bus(struct spi_slave *slave) in spi_claim_bus() argument 194 return board_spi_claim_bus(slave); in spi_claim_bus() 197 __attribute__((weak)) void board_spi_release_bus(struct spi_slave *slave) in board_spi_release_bus() argument [all …]
|
| /rk3399_rockchip-uboot/drivers/power/ |
| H A D | power_spi.c | 18 static struct spi_slave *slave; variable 25 if (!slave) { in pmic_reg() 26 slave = spi_setup_slave(p->bus, p->hw.spi.cs, p->hw.spi.clk, in pmic_reg() 29 if (!slave) in pmic_reg() 36 if (spi_claim_bus(slave)) in pmic_reg() 43 if (spi_xfer(slave, pmic_spi_bitlen, &tmp, &pmic_rx, in pmic_reg() 50 if (spi_xfer(slave, pmic_spi_bitlen, &tmp, &pmic_rx, in pmic_reg() 55 spi_release_bus(slave); in pmic_reg() 61 spi_release_bus(slave); in pmic_reg()
|
| /rk3399_rockchip-uboot/drivers/net/ |
| 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 …]
|
| /rk3399_rockchip-uboot/test/dm/ |
| H A D | spi.c | 23 struct spi_slave *slave; in dm_test_spi_find() local 52 NULL, 0, &bus, &slave)); in dm_test_spi_find() 63 &slave)); in dm_test_spi_find() 73 "spi_flash_std", "name", &bus, &slave)); in dm_test_spi_find() 76 ut_asserteq_ptr(info.dev, slave->dev); in dm_test_spi_find() 82 "spi_flash_std", "name", &bus, &slave)); in dm_test_spi_find() 84 ut_asserteq_ptr(info.dev, slave->dev); in dm_test_spi_find() 100 struct spi_slave *slave; in dm_test_spi_xfer() local 107 &bus, &slave)); in dm_test_spi_xfer() 108 ut_assertok(spi_claim_bus(slave)); in dm_test_spi_xfer() [all …]
|
| /rk3399_rockchip-uboot/include/ |
| H A D | spi.h | 169 spi_do_alloc_slave(offsetof(_struct, slave), \ 208 void spi_free_slave(struct spi_slave *slave); 224 int spi_claim_bus(struct spi_slave *slave); 235 void spi_release_bus(struct spi_slave *slave); 247 int spi_set_wordlen(struct spi_slave *slave, unsigned int wordlen); 271 int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, 290 int spi_write_then_read(struct spi_slave *slave, const u8 *opcode, 315 void spi_cs_activate(struct spi_slave *slave); 324 void spi_cs_deactivate(struct spi_slave *slave); 332 void spi_set_speed(struct spi_slave *slave, uint hz); [all …]
|
| /rk3399_rockchip-uboot/drivers/misc/ |
| H A D | cros_ec_spi.c | 27 struct spi_slave *slave = dev_get_parent_priv(dev->dev); in cros_ec_spi_packet() local 33 if (spi_claim_bus(slave)) { in cros_ec_spi_packet() 38 rv = spi_xfer(slave, out_bytes * 8, dev->dout, NULL, SPI_XFER_BEGIN); in cros_ec_spi_packet() 43 rv = spi_xfer(slave, 8, NULL, &byte, 0); in cros_ec_spi_packet() 54 rv = spi_xfer(slave, in_bytes * 8, NULL, dev->din, 0); in cros_ec_spi_packet() 56 spi_xfer(slave, 0, NULL, NULL, SPI_XFER_END); in cros_ec_spi_packet() 57 spi_release_bus(slave); in cros_ec_spi_packet() 87 struct spi_slave *slave = dev_get_parent_priv(dev->dev); in cros_ec_spi_command() local 120 if (spi_claim_bus(slave)) { in cros_ec_spi_command() 141 rv = spi_xfer(slave, max(len, in_bytes) * 8, out, p, in cros_ec_spi_command() [all …]
|
| /rk3399_rockchip-uboot/cmd/ |
| H A D | spi.c | 45 struct spi_slave *slave; in do_spi_xfer() local 57 str, &dev, &slave); in do_spi_xfer() 61 slave = spi_setup_slave(bus, cs, 1000000, mode); in do_spi_xfer() 62 if (!slave) { in do_spi_xfer() 68 ret = spi_claim_bus(slave); in do_spi_xfer() 71 ret = spi_xfer(slave, bitlen, dout, din, in do_spi_xfer() 88 spi_release_bus(slave); in do_spi_xfer() 90 spi_free_slave(slave); in do_spi_xfer()
|
| /rk3399_rockchip-uboot/drivers/fpga/ |
| H A D | stratixv.c | 17 struct spi_slave *slave; in program_write() local 24 slave = spi_setup_slave(spi_bus, spi_dev, 27777777, SPI_MODE_3); in program_write() 25 if (!slave) in program_write() 28 if (spi_claim_bus(slave)) in program_write() 31 ret = spi_xfer(slave, rbf_size * 8, rbf_data, (void *)rbf_data, in program_write() 34 spi_release_bus(slave); in program_write()
|