diff options
author | Hung-Te Lin <hungte@chromium.org> | 2013-01-30 20:02:02 +0800 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2013-01-30 19:51:23 +0100 |
commit | 7e494050d6ae7626a2eef06fb9bdd1d25e0e74c4 (patch) | |
tree | a79ac7763ab06ee54c02c6bb66d5d4d1d59bdde9 /src/cpu/samsung/exynos5-common/spi.h | |
parent | 6fe0cab205e131525efbfce4f59da344b1e76598 (diff) | |
download | coreboot-7e494050d6ae7626a2eef06fb9bdd1d25e0e74c4.tar.xz |
armv7: Add SPI driver for Exynos.
The SPI flash driver for Exynos chipset.
Verified to boot on snow/armv7.
Change-Id: I7eef67a9c57f825d09f13ea44c2b59b54345fa7b
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: http://review.coreboot.org/2229
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/cpu/samsung/exynos5-common/spi.h')
-rw-r--r-- | src/cpu/samsung/exynos5-common/spi.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cpu/samsung/exynos5-common/spi.h b/src/cpu/samsung/exynos5-common/spi.h index 3f3675921c..e021888614 100644 --- a/src/cpu/samsung/exynos5-common/spi.h +++ b/src/cpu/samsung/exynos5-common/spi.h @@ -22,6 +22,9 @@ #ifndef __ASSEMBLER__ +// This driver serves as a CBFS media source. +#include <cbfs.h> + /* SPI peripheral register map; padded to 64KB */ struct exynos_spi { unsigned int ch_cfg; /* 0x00 */ @@ -85,5 +88,15 @@ struct exynos_spi { #define SPI_RX_BYTE_SWAP (1 << 6) #define SPI_RX_HWORD_SWAP (1 << 7) +/* API */ +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); + +/* Serve as CBFS Media */ +int initialize_exynos_spi_cbfs_media(struct cbfs_media *media, + void *buffer_address, + size_t buffer_size); + #endif /* __ASSEMBLER__ */ #endif |