![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <assert.h>
#include <commonlib/helpers.h>
#include <spi-generic.h>
#include <stddef.h>
#include <string.h>
Go to the source code of this file.
Functions | |
int | spi_claim_bus (const struct spi_slave *slave) |
void | spi_release_bus (const struct spi_slave *slave) |
static int | spi_xfer_single_op (const struct spi_slave *slave, struct spi_op *op) |
static int | spi_xfer_vector_default (const struct spi_slave *slave, struct spi_op vectors[], size_t count) |
int | spi_xfer_vector (const struct spi_slave *slave, struct spi_op vectors[], size_t count) |
int | spi_xfer (const struct spi_slave *slave, const void *dout, size_t bytesout, void *din, size_t bytesin) |
unsigned int | spi_crop_chunk (const struct spi_slave *slave, unsigned int cmd_len, unsigned int buf_len) |
void __weak | spi_init (void) |
int | spi_setup_slave (unsigned int bus, unsigned int cs, struct spi_slave *slave) |
int spi_claim_bus | ( | const struct spi_slave * | slave | ) |
Definition at line 9 of file spi-generic.c.
References spi_ctrlr::claim_bus, spi_slave::ctrlr, and slave.
Referenced by crosec_spi_io(), do_dual_io_cmd(), do_dual_output_cmd(), do_spi_flash_cmd(), exynos_spi_read(), ich_hwseq_erase(), and spi_sdcard_enable_cs().
unsigned int spi_crop_chunk | ( | const struct spi_slave * | slave, |
unsigned int | cmd_len, | ||
unsigned int | buf_len | ||
) |
Definition at line 79 of file spi-generic.c.
References assert, BIOS_WARNING, spi_slave::ctrlr, spi_ctrlr::flags, spi_ctrlr::max_xfer_size, MIN, printk, slave, SPI_CNTRLR_DEDUCT_CMD_LEN, and SPI_CNTRLR_DEDUCT_OPCODE_LEN.
Referenced by spi_flash_cmd_read(), spi_flash_cmd_write_page_program(), and spiconsole_tx_byte().
Definition at line 117 of file spi-generic.c.
Referenced by boot_device_rw_init(), intel_pch_finalize_smm(), smi_handler(), smm_handler_start(), and spiconsole_init().
Definition at line 17 of file spi-generic.c.
References spi_slave::ctrlr, spi_ctrlr::release_bus, and slave.
Referenced by crosec_spi_io(), do_dual_io_cmd(), do_dual_output_cmd(), do_spi_flash_cmd(), exynos_spi_read(), ich_hwseq_erase(), and spi_sdcard_disable_cs().
Definition at line 122 of file spi-generic.c.
References BIOS_ERR, spi_slave::bus, spi_slave::cs, spi_slave::ctrlr, spi_ctrlr_buses::ctrlr, memset(), NULL, printk, spi_ctrlr::setup, slave, spi_ctrlr_bus_map, and spi_ctrlr_bus_map_count.
Referenced by boot_device_init(), google_chromeec_command(), spi_flash_probe(), spi_sdcard_init(), spiconsole_init(), tis_init(), and verstage_mainboard_init().
int spi_xfer | ( | const struct spi_slave * | slave, |
const void * | dout, | ||
size_t | bytesout, | ||
void * | din, | ||
size_t | bytesin | ||
) |
Definition at line 68 of file spi-generic.c.
References spi_slave::ctrlr, slave, and spi_ctrlr::xfer.
Referenced by crosec_spi_io(), read_bytes(), spi_sdcard_recvbyte(), spi_sdcard_sendbyte(), spi_w8r8(), spiconsole_tx_byte(), and write_bytes().
Definition at line 24 of file spi-generic.c.
References spi_op::bytesin, spi_op::bytesout, spi_slave::ctrlr, spi_op::din, spi_op::dout, slave, SPI_OP_FAILURE, SPI_OP_SUCCESS, spi_op::status, and spi_ctrlr::xfer.
Referenced by spi_xfer_vector_default().
Definition at line 57 of file spi-generic.c.
References count, spi_slave::ctrlr, slave, spi_xfer_vector_default(), and spi_ctrlr::xfer_vector.
Referenced by do_dual_io_cmd(), do_dual_output_cmd(), and do_spi_flash_cmd().
|
static |
Definition at line 42 of file spi-generic.c.
References count, slave, and spi_xfer_single_op().
Referenced by spi_xfer_vector().