![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <device/mmio.h>
#include <assert.h>
#include <console/console.h>
#include <delay.h>
#include <endian.h>
#include <soc/addressmap.h>
#include <soc/spi.h>
#include <soc/clock.h>
#include <spi-generic.h>
#include <spi_flash.h>
#include <timer.h>
#include <types.h>
Go to the source code of this file.
Data Structures | |
struct | rockchip_spi_slave |
Macros | |
#define | SPI_TIMEOUT_US 1000 |
#define | SPI_SRCCLK_HZ (198*MHz) |
#define | SPI_FIFO_DEPTH 32 |
Variables | |
static struct rockchip_spi_slave | rockchip_spi_slaves [] |
static const struct spi_ctrlr | spi_ctrlr |
const struct spi_ctrlr_buses | spi_ctrlr_bus_map [] |
const size_t | spi_ctrlr_bus_map_count = ARRAY_SIZE(spi_ctrlr_bus_map) |
|
static |
Definition at line 180 of file spi.c.
References BIOS_ERR, buffer_from_fifo32(), MIN, printk, read32(), rockchip_spi_wait_till_not_busy(), RXFLR_LEVEL_MASK, SR_RF_EMPT, SR_TF_FULL, and write32().
|
static |
Definition at line 69 of file spi.c.
References write32().
Referenced by rockchip_spi_init().
|
static |
Definition at line 77 of file spi.c.
References assert, SPI_SRCCLK_HZ, and write32().
Referenced by rockchip_spi_init().
|
static |
Definition at line 146 of file spi.c.
References BIOS_DEBUG, printk, read32(), SPI_TIMEOUT_US, SR_BUSY, stopwatch_expired(), and stopwatch_init_usecs_expire().
Referenced by do_xfer().
|
static |
Definition at line 160 of file spi.c.
References clrsetbits32, SPI_TMOD_MASK, and SPI_TMOD_OFFSET.
Referenced by set_transfer_mode().
|
static |
Definition at line 166 of file spi.c.
References set_tmod(), SPI_TMOD_RO, SPI_TMOD_TO, and SPI_TMOD_TR.
Definition at line 57 of file spi.c.
References rockchip_spi_slave::regs, setbits32, slave, and to_rockchip_spi().
Referenced by spi_ctrlr_claim_bus().
Definition at line 63 of file spi.c.
References clrbits32, rockchip_spi_slave::regs, slave, and to_rockchip_spi().
Referenced by spi_ctrlr_release_bus().
|
static |
Definition at line 135 of file spi.c.
References slave, and spi_cs_activate().
Definition at line 141 of file spi.c.
References slave, and spi_cs_deactivate().
|
static |
Definition at line 51 of file spi.c.
References ARRAY_SIZE, assert, spi_slave::bus, rockchip_spi_slaves, and slave.
Referenced by spi_cs_activate(), and spi_cs_deactivate().
|
static |
Definition at line 1 of file spi.c.
Referenced by rockchip_spi_init(), rockchip_spi_set_sample_delay(), and to_rockchip_spi().
const struct spi_ctrlr_buses spi_ctrlr_bus_map[] |
const size_t spi_ctrlr_bus_map_count = ARRAY_SIZE(spi_ctrlr_bus_map) |