/u-boot/drivers/mtd/nand/raw/ |
A D | nand_base.c | 833 chip->controller->active = chip; in panic_nand_get_device() 1262 status = chip->waitfunc(mtd, chip); in nand_prog_page_end_op() 1300 status = chip->waitfunc(mtd, chip); in nand_prog_page_op() 1439 status = chip->waitfunc(mtd, chip); in nand_erase_op() 1473 status = chip->waitfunc(mtd, chip); in nand_set_features_op() 2513 int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; in nand_read_oob_syndrome() 2580 int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; in nand_write_oob_syndrome() 3419 status = chip->ecc.write_oob_raw(mtd, chip, page & chip->pagemask); in nand_do_write_oob() 3421 status = chip->ecc.write_oob(mtd, chip, page & chip->pagemask); in nand_do_write_oob() 3756 chip->controller = &chip->hwcontrol; in nand_set_defaults() [all …]
|
A D | mxs_nand_spl.c | 59 if (chip->dev_ready(mtd)) in mxs_nand_command() 76 chip->select_chip(mtd, -1); in mxs_flash_full_ident() 115 chip->onfi_version = 0; in mxs_flash_onfi_ident() 117 if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' || in mxs_flash_onfi_ident() 118 chip->read_byte(mtd) != 'F' || chip->read_byte(mtd) != 'I') { in mxs_flash_onfi_ident() 135 chip->pagemask = (chip->chipsize >> chip->page_shift) - 1; in mxs_flash_onfi_ident() 136 chip->badblockbits = 8; in mxs_flash_onfi_ident() 183 chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); in is_badblock() 222 struct nand_chip *chip; in nand_spl_load_image() local 229 chip = mtd_to_nand(mtd); in nand_spl_load_image() [all …]
|
A D | fsl_upm.c | 73 chip->IO_ADDR_R = chip->IO_ADDR_W = in fun_select_chip() 129 return in_8(chip->IO_ADDR_R); in upm_nand_read_byte() 139 out_8(chip->IO_ADDR_W, buf[i]); in upm_nand_write_buf() 154 buf[i] = in_8(chip->IO_ADDR_R); in upm_nand_read_buf() 172 nand_set_controller_data(chip, fun); in fsl_upm_nand_init() 173 chip->chip_delay = fun->chip_delay; in fsl_upm_nand_init() 174 chip->ecc.mode = NAND_ECC_SOFT; in fsl_upm_nand_init() 175 chip->cmd_ctrl = fun_cmd_ctrl; in fsl_upm_nand_init() 177 chip->select_chip = fun_select_chip; in fsl_upm_nand_init() 180 chip->read_buf = upm_nand_read_buf; in fsl_upm_nand_init() [all …]
|
A D | zynq_nand.c | 450 p = chip->oob_poi; in zynq_nand_read_oob() 488 status = chip->waitfunc(mtd, chip); in zynq_nand_write_oob() 510 p = chip->oob_poi; in zynq_nand_read_page_raw() 558 p = chip->oob_poi; in zynq_nand_write_page_raw() 618 oob_ptr = chip->oob_poi; in zynq_nand_write_page_hwecc() 656 return chip->ecc.write_page_raw(mtd, chip, buf, 1, page); in zynq_nand_write_page_swecc() 708 oob_ptr = chip->oob_poi; in zynq_nand_read_page_hwecc() 722 eccsteps = chip->ecc.steps; in zynq_nand_read_page_hwecc() 755 chip->ecc.read_page_raw(mtd, chip, buf, 1, page); in zynq_nand_read_page_swecc() 763 eccsteps = chip->ecc.steps; in zynq_nand_read_page_swecc() [all …]
|
A D | mxc_nand.c | 392 int eccpitch = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; 461 chip->read_buf(mtd, oob, chip->ecc.prepad); 469 chip->read_buf(mtd, oob, chip->ecc.postpad); 510 chip->read_buf(mtd, oob, chip->ecc.prepad); 523 chip->read_buf(mtd, oob, chip->ecc.postpad); 537 oob = chip->oob_poi + chip->ecc.prepad; 553 int eccpitch = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; 571 status = chip->waitfunc(mtd, chip); 596 chip->write_buf(mtd, oob, chip->ecc.prepad); 604 chip->write_buf(mtd, oob, chip->ecc.postpad); [all …]
|
A D | stm32_fmc2_nand.c | 149 struct nand_chip chip; member 157 return container_of(chip, struct stm32_fmc2_nand, chip); in to_fmc2_nand() 250 stm32_fmc2_nfc_setup(chip); in stm32_fmc2_nfc_select_chip() 508 int eccbytes = chip->ecc.bytes; in stm32_fmc2_nfc_read_page() 548 chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); in stm32_fmc2_nfc_read_page() 756 chip->ecc.bytes = chip->options & NAND_BUSWIDTH_16 ? 4 : 3; in stm32_fmc2_nfc_nand_callbacks_setup() 767 chip->ecc.bytes = chip->options & NAND_BUSWIDTH_16 ? 14 : 13; in stm32_fmc2_nfc_nand_callbacks_setup() 769 chip->ecc.bytes = chip->options & NAND_BUSWIDTH_16 ? 8 : 7; in stm32_fmc2_nfc_nand_callbacks_setup() 887 struct nand_chip *chip = &nand->chip; in stm32_fmc2_nfc_probe() local 970 chip->ecc.mode = NAND_ECC_HW; in stm32_fmc2_nfc_probe() [all …]
|
A D | denali.c | 300 chip->ecc.total); in denali_check_erased_page() 764 status = chip->waitfunc(mtd, chip); in denali_write_oob() 1118 if (chip->ecc.size && chip->ecc.strength) in denali_ecc_setup() 1209 chip->chipsize <<= 1; in denali_multidev_fixup() 1210 chip->page_shift += 1; in denali_multidev_fixup() 1213 chip->chip_shift += 1; in denali_multidev_fixup() 1214 chip->pagemask <<= 1; in denali_multidev_fixup() 1215 chip->ecc.size <<= 1; in denali_multidev_fixup() 1216 chip->ecc.bytes <<= 1; in denali_multidev_fixup() 1288 chip->buf_align = 4; in denali_init() [all …]
|
A D | davinci_nand.c | 59 const u32 *nand = chip->IO_ADDR_R; in nand_davinci_read_buf() 104 const u32 *nand = chip->IO_ADDR_W; in nand_davinci_write_buf() 383 status = chip->ecc.write_page_raw(mtd, chip, buf, in nand_davinci_write_page() 386 status = chip->ecc.write_page(mtd, chip, buf, in nand_davinci_write_page() 396 status = chip->waitfunc(mtd, chip); in nand_davinci_write_page() 426 int i, eccsize = chip->ecc.size; in nand_davinci_read_page_hwecc() 427 int eccbytes = chip->ecc.bytes; in nand_davinci_read_page_hwecc() 428 int eccsteps = chip->ecc.steps; in nand_davinci_read_page_hwecc() 445 chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); in nand_davinci_read_page_hwecc() 455 chip->read_buf(mtd, p, eccsize); in nand_davinci_read_page_hwecc() [all …]
|
A D | vf610_nfc.c | 154 struct nand_chip chip; member 531 if (chip >= 0) { in vf610_nfc_select_chip() 594 int eccsize = chip->ecc.size; in vf610_nfc_read_page() 638 struct nand_chip *chip = &nfc->chip; in vf610_nfc_nand_init() local 666 chip->ecc.size = PAGE_2K; in vf610_nfc_nand_init() 723 chip->ecc.mode = NAND_ECC_HW; in vf610_nfc_nand_init() 725 chip->ecc.size = PAGE_2K; in vf610_nfc_nand_init() 728 chip->ecc.strength = 24; in vf610_nfc_nand_init() 729 chip->ecc.bytes = 45; in vf610_nfc_nand_init() 731 chip->ecc.strength = 32; in vf610_nfc_nand_init() [all …]
|
A D | nand_util.c | 94 if (chip->bbt) { in nand_erase_opts() 95 kfree(chip->bbt); in nand_erase_opts() 97 chip->bbt = NULL; in nand_erase_opts() 225 chip->select_chip(mtd, 0); in nand_lock() 235 chip->cmdfunc(mtd, in nand_lock() 240 status = chip->waitfunc(mtd, chip); in nand_lock() 289 chip->cmdfunc(mtd, NAND_CMD_LOCK_STATUS, -1, page & chip->pagemask); in nand_get_lock_status() 338 chip->cmdfunc(mtd, NAND_CMD_LOCK_STATUS, -1, page & chip->pagemask); in nand_unlock() 366 chip->cmdfunc(mtd, NAND_CMD_UNLOCK1, -1, page & chip->pagemask); in nand_unlock() 379 chip->cmdfunc(mtd, NAND_CMD_UNLOCK2, -1, page & chip->pagemask); in nand_unlock() [all …]
|
A D | cortina_nand.c | 340 if (chip->chipsize < SZ_32M) { in ca_nand_command() 346 (chip->chipsize <= SZ_128M)) { in ca_nand_command() 384 if (chip->chipsize < SZ_32M) { in ca_nand_command() 389 (chip->chipsize <= SZ_128M)) { in ca_nand_command() 598 for (i = 0; i < chip->ecc.total; i++) in ca_do_bch_decode() 627 step = i / chip->ecc.bytes; in ca_do_bch_decode() 651 chip->ecc.size, in ca_do_bch_decode() 652 &chip->buffers->ecccode[i], in ca_do_bch_decode() 653 chip->ecc.bytes, in ca_do_bch_decode() 655 chip->ecc.strength); in ca_do_bch_decode() [all …]
|
/u-boot/drivers/gpio/ |
A D | pca953x.c | 31 uint8_t chip; member 42 static int pca953x_ngpio(uint8_t chip) in pca953x_ngpio() argument 47 if (pca953x_chip_ngpios[i].chip == chip) in pca953x_ngpio() 53 static int pca953x_ngpio(uint8_t chip) in pca953x_ngpio() argument 67 if (pca953x_ngpio(chip) <= 8) { in pca953x_reg_write() 93 if (pca953x_ngpio(chip) <= 8) { in pca953x_reg_read() 135 int pca953x_get_val(uint8_t chip) in pca953x_get_val() argument 149 static int pca953x_info(uint8_t chip) in pca953x_info() argument 153 int nr_gpio = pca953x_ngpio(chip); in pca953x_info() 232 ret = pca953x_info(chip); in do_pca953x() [all …]
|
A D | tca642x.c | 80 if (i2c_read(chip, addr, 1, (u8 *)&valw, 1)) { in tca642x_reg_read() 136 if (tca642x_reg_read(chip, in_reg, &val) < 0) in tca642x_get_val() 171 static int tca642x_info(uchar chip) in tca642x_info() argument 179 if (tca642x_reg_read(chip, in tca642x_info() 188 if (tca642x_reg_read(chip, in tca642x_info() 196 if (tca642x_reg_read(chip, in tca642x_info() 204 if (tca642x_reg_read(chip, in tca642x_info() 273 ret = tca642x_info(chip); in do_tca642x() 280 chip = (uint8_t)ul_arg2; in do_tca642x() 294 val = (tca642x_get_val(chip, gpio_bank) & in do_tca642x() [all …]
|
/u-boot/drivers/net/ |
A D | ftmac110.c | 146 chip->lnkup = 0; in ftmac110_phyqry() 152 if (!chip->lnkup) in ftmac110_phyqry() 251 chip->imr = 0; in ftmac110_reset() 288 if (!chip->lnkup) in ftmac110_send() 298 txd = &chip->txd[chip->txd_idx]; in ftmac110_send() 322 chip->txd_idx = (chip->txd_idx + 1) % CFG_TXDES_NUM; in ftmac110_send() 335 if (!chip->lnkup) in ftmac110_recv() 339 rxd = &chip->rxd[chip->rxd_idx]; in ftmac110_recv() 360 chip->rxd_idx = (chip->rxd_idx + 1) % CFG_RXDES_NUM; in ftmac110_recv() 434 if (!chip->txd) in ftmac110_initialize() [all …]
|
/u-boot/drivers/misc/ |
A D | ds4510.c | 186 static int ds4510_info(uint8_t chip) in ds4510_info() argument 192 printf("DS4510 @ 0x%x:\n\n", chip); in ds4510_info() 211 tmp = ds4510_pullup_read(chip); in ds4510_info() 219 tmp = ds4510_gpio_read(chip); in ds4510_info() 227 tmp = ds4510_gpio_read_val(chip); in ds4510_info() 252 static uint8_t chip = 0x51; in do_ds4510() local 283 chip = ul_arg2; in do_ds4510() 289 tmp = ds4510_gpio_read(chip); in do_ds4510() 298 tmp = ds4510_gpio_read_val(chip); in do_ds4510() 303 tmp = ds4510_pullup_read(chip); in do_ds4510() [all …]
|
/u-boot/drivers/usb/gadget/ |
A D | fotg210.c | 114 chip->addr = 0; in fotg210_reset() 213 struct fotg210_chip *chip = ep->chip; in fotg210_dma() local 442 if (chip->driver->setup(&chip->gadget, req) < 0) in fotg210_setup() 507 struct fotg210_chip *chip = ep->chip; in fotg210_ep_enable() local 551 struct fotg210_chip *chip = ep->chip; in fotg210_ep_disable() local 589 struct fotg210_chip *chip = ep->chip; in fotg210_ep_queue() local 600 if (!chip || chip->state == USB_STATE_SUSPENDED) { in fotg210_ep_queue() 674 struct fotg210_chip *chip = ep->chip; in fotg210_ep_halt() local 727 chip->addr = 0; in pullup() 879 fotg210_recv(chip, fifo_to_ep(chip, id, 0)); in usb_gadget_handle_interrupts() [all …]
|
/u-boot/drivers/tpm/ |
A D | tpm2_tis_spi.c | 203 chip->locality = loc; in tpm_tis_spi_check_locality() 370 if (!chip) in tpm_tis_spi_recv() 414 if (!chip) in tpm_tis_spi_send() 522 if (chip->is_open) in tpm_tis_spi_open() 525 chip->is_open = 1; in tpm_tis_spi_open() 534 if (chip->is_open) { in tpm_tis_spi_close() 536 chip->is_open = 0; in tpm_tis_spi_close() 552 chip->vend_dev >> 16, chip->rid, in tpm_tis_get_desc() 607 chip->locality = 0; in tpm_tis_spi_probe() 636 ret = tpm_tis_spi_read(dev, TPM_RID(chip->locality), &chip->rid, 1); in tpm_tis_spi_probe() [all …]
|
A D | tpm_tis_infineon.c | 80 if ((chip->chip_type == SLB9635) || (chip->chip_type == UNKNOWN)) { in tpm_tis_i2c_read() 205 chip->locality = loc; in tpm_tis_i2c_check_locality() 251 stop = chip->timeout_a; in tpm_tis_i2c_request_locality() 306 stop = chip->timeout_d; in tpm_tis_i2c_get_burstcount() 515 chip->is_open = 1; in tpm_tis_i2c_init() 546 chip->vend_dev = vendor; in tpm_tis_i2c_init() 564 if (chip->is_open) in tpm_tis_i2c_open() 568 chip->is_open = 0; in tpm_tis_i2c_open() 577 if (chip->is_open) { in tpm_tis_i2c_close() 579 chip->is_open = 0; in tpm_tis_i2c_close() [all …]
|
A D | tpm_tis_st33zp24_i2c.c | 138 return chip->locality; in st33zp24_i2c_check_locality() 156 return chip->locality; in st33zp24_i2c_request_locality() 165 stop = chip->timeout_a; in st33zp24_i2c_request_locality() 310 if (!chip) in st33zp24_i2c_recv() 359 if (!chip) in st33zp24_i2c_send() 438 chip->is_open = 1; in st33zp24_i2c_init() 462 if (chip->is_open) in st33zp24_i2c_open() 467 chip->is_open = 0; in st33zp24_i2c_open() 476 if (chip->is_open) { in st33zp24_i2c_close() 478 chip->is_open = 0; in st33zp24_i2c_close() [all …]
|
A D | tpm_tis_st33zp24_spi.c | 268 return chip->locality; in st33zp24_spi_check_locality() 286 return chip->locality; in st33zp24_spi_request_locality() 295 stop = chip->timeout_a; in st33zp24_spi_request_locality() 438 if (!chip) in st33zp24_spi_recv() 487 if (!chip) in st33zp24_spi_send() 567 chip->is_open = 1; in st33zp24_spi_init() 595 if (chip->is_open) in st33zp24_spi_open() 600 chip->is_open = 0; in st33zp24_spi_open() 609 if (chip->is_open) { in st33zp24_spi_close() 611 chip->is_open = 0; in st33zp24_spi_close() [all …]
|
/u-boot/drivers/mmc/ |
A D | ftsdc010_mci.c | 78 if (chip->acmd) { in ftsdc010_send_cmd() 80 chip->acmd = 0; in ftsdc010_send_cmd() 130 chip->acmd = 1; in ftsdc010_send_cmd() 146 chip->rate = chip->sclk / (2 * (div + 1)); in ftsdc010_clkset() 326 chip->wprot = 1; in ftsdc010_get_wp() 397 struct ftsdc010_chip *chip = &priv->chip; in ftsdc010_mmc_of_to_plat() local 402 chip->priv = dev; in ftsdc010_mmc_of_to_plat() 422 chip->regs = chip->ioaddr; in ftsdc010_mmc_of_to_plat() 431 struct ftsdc010_chip *chip = &priv->chip; in ftsdc010_mmc_probe() local 440 chip->priv = dev; in ftsdc010_mmc_probe() [all …]
|
/u-boot/include/linux/mtd/ |
A D | rawnand.h | 33 struct nand_chip *chip, 227 #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) argument 228 #define NAND_HAS_SUBPAGE_READ(chip) ((chip->options & NAND_SUBPAGE_READ)) argument 229 #define NAND_HAS_SUBPAGE_WRITE(chip) !((chip)->options & NAND_NO_SUBPAGE_WRITE) argument 991 return &chip->mtd; in nand_to_mtd() 996 return chip->priv; in nand_get_controller_data() 1001 chip->priv = priv; in nand_set_controller_data() 1200 return chip->onfi_version ? le16_to_cpu(chip->onfi_params.features) : 0; in onfi_feature() 1206 if (!chip->onfi_version) in onfi_get_async_timing_mode() 1214 if (!chip->onfi_version) in onfi_get_sync_timing_mode() [all …]
|
/u-boot/drivers/i2c/ |
A D | i2c_core.c | 102 ret = adap->write(adap, chip, 0, 0, &buf, 1); in i2c_mux_set() 105 __func__, mux_id, chip, channel); in i2c_mux_set() 115 if (i2c_bus_tmp->next_hop[0].chip != 0) { in i2c_mux_set_all() 120 if (i2c_bus_tmp->next_hop[i].chip == 0) in i2c_mux_set_all() 125 i2c_bus_tmp->next_hop[i].chip, in i2c_mux_set_all() 144 if ((i2c_bus_tmp->next_hop[0].chip != 0) && in i2c_mux_disconnect_all() 148 uint8_t chip; in i2c_mux_disconnect_all() local 151 chip = i2c_bus_tmp->next_hop[--i].chip; in i2c_mux_disconnect_all() 152 if (chip == 0) in i2c_mux_disconnect_all() 275 int i2c_probe(uint8_t chip) in i2c_probe() argument [all …]
|
A D | i2c-uclass.c | 62 msg->addr = chip->chip_addr; in i2c_setup_offset() 63 if (chip->chip_addr_offset_mask) in i2c_setup_offset() 65 chip->chip_addr_offset_mask; in i2c_setup_offset() 67 msg->len = chip->offset_len; in i2c_setup_offset() 285 struct dm_i2c_chip *chip; in i2c_bind_driver() local 301 chip->chip_addr = chip_addr; in i2c_bind_driver() 445 chip->flags = flags; in i2c_set_chip_flags() 454 *flagsp = chip->flags; in i2c_get_chip_flags() 474 return chip->offset_len; in i2c_get_chip_offset_len() 626 chip->flags = 0; in i2c_chip_of_to_plat() [all …]
|
/u-boot/test/dm/ |
A D | mux-cmd.c | 24 struct mux_chip *chip; in dm_test_cmd_mux_list() local 33 chip = dev_get_uclass_priv(dev); in dm_test_cmd_mux_list() 34 ut_assertnonnull(chip); in dm_test_cmd_mux_list() 66 mux = &chip->mux[i]; in dm_test_cmd_mux_list() 117 struct mux_chip *chip; in dm_test_cmd_mux_select() local 126 chip = dev_get_uclass_priv(dev); in dm_test_cmd_mux_select() 127 ut_assertnonnull(chip); in dm_test_cmd_mux_select() 131 mux = &chip->mux[i]; in dm_test_cmd_mux_select() 151 struct mux_chip *chip; in dm_test_cmd_mux_deselect() local 161 ut_assertnonnull(chip); in dm_test_cmd_mux_deselect() [all …]
|