![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <boot_device.h>
Go to the source code of this file.
Data Structures | |
struct | exynos_spi |
Macros | |
#define | EXYNOS_SPI_MAX_FREQ 50000000 |
#define | SPI_TIMEOUT_MS 10 |
#define | SF_READ_DATA_CMD 0x3 |
#define | SPI_CH_HS_EN (1 << 6) |
#define | SPI_CH_RST (1 << 5) |
#define | SPI_SLAVE_MODE (1 << 4) |
#define | SPI_CH_CPOL_L (1 << 3) |
#define | SPI_CH_CPHA_B (1 << 2) |
#define | SPI_RX_CH_ON (1 << 1) |
#define | SPI_TX_CH_ON (1 << 0) |
#define | SPI_MODE_CH_WIDTH_WORD (0x2 << 29) |
#define | SPI_MODE_BUS_WIDTH_WORD (0x2 << 17) |
#define | SPI_SLAVE_SIG_INACT (1 << 0) |
#define | SPI_ST_TX_DONE (1 << 25) |
#define | SPI_FIFO_LVL_MASK 0x1ff |
#define | SPI_TX_LVL_OFFSET 6 |
#define | SPI_RX_LVL_OFFSET 15 |
#define | SPI_CLK_BYPASS (0 << 0) |
#define | SPI_FB_DELAY_90 (1 << 0) |
#define | SPI_FB_DELAY_180 (2 << 0) |
#define | SPI_FB_DELAY_270 (3 << 0) |
#define | SPI_PACKET_CNT_EN (1 << 16) |
#define | SPI_TX_SWAP_EN (1 << 0) |
#define | SPI_TX_BYTE_SWAP (1 << 2) |
#define | SPI_TX_HWORD_SWAP (1 << 3) |
#define | SPI_TX_BYTE_SWAP (1 << 2) |
#define | SPI_RX_SWAP_EN (1 << 4) |
#define | SPI_RX_BYTE_SWAP (1 << 6) |
#define | SPI_RX_HWORD_SWAP (1 << 7) |
Functions | |
check_member (exynos_spi, fb_clk, 0x2c) | |
int | exynos_spi_open (struct exynos_spi *regs) |
int | exynos_spi_read (struct exynos_spi *regs, void *dest, u32 len, u32 off) |
int | exynos_spi_close (struct exynos_spi *regs) |
void | exynos_init_spi_boot_device (void) |
const struct region_device * | exynos_spi_boot_device (void) |
check_member | ( | exynos_spi | , |
fb_clk | , | ||
0x2c | |||
) |
Definition at line 167 of file spi.c.
References boot_slave_regs, and EXYNOS5_SPI1_BASE.
Referenced by boot_device_init().
const struct region_device* exynos_spi_boot_device | ( | void | ) |
Definition at line 172 of file spi.c.
References mdev, and mmap_helper_region_device::rdev.
Referenced by boot_device_ro().
int exynos_spi_close | ( | struct exynos_spi * | regs | ) |
Definition at line 114 of file spi.c.
References clrbits32, clrsetbits32, SPI_CH_HS_EN, SPI_CH_RST, SPI_MODE_BUS_WIDTH_WORD, SPI_MODE_CH_WIDTH_WORD, SPI_RX_CH_ON, SPI_TX_CH_ON, and write32().
Referenced by exynos_spi_readat().
int exynos_spi_open | ( | struct exynos_spi * | regs | ) |
Definition at line 64 of file spi.c.
References clrbits32, setbits32, SPI_CH_CPOL_L, SPI_CH_HS_EN, SPI_CH_RST, SPI_FB_DELAY_180, SPI_MODE_BUS_WIDTH_WORD, SPI_MODE_CH_WIDTH_WORD, SPI_PACKET_CNT_EN, SPI_RX_BYTE_SWAP, SPI_RX_CH_ON, SPI_RX_HWORD_SWAP, SPI_RX_SWAP_EN, SPI_TX_CH_ON, and write32().
Referenced by exynos_spi_readat().
int exynos_spi_read | ( | struct exynos_spi * | regs, |
void * | dest, | ||
u32 | len, | ||
u32 | off | ||
) |
Definition at line 92 of file spi.c.
References clrbits32, exynos_spi_rx_tx(), MIN, read32(), setbits32, SF_READ_DATA_CMD, SPI_SLAVE_SIG_INACT, SPI_ST_TX_DONE, and write32().
Referenced by exynos_spi_readat().