diff options
-rw-r--r-- | src/soc/intel/apollolake/include/soc/spi.h | 2 | ||||
-rw-r--r-- | src/soc/intel/apollolake/spi.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/include/soc/spi.h b/src/soc/intel/apollolake/include/soc/spi.h index 1414a84686..f67110f125 100644 --- a/src/soc/intel/apollolake/include/soc/spi.h +++ b/src/soc/intel/apollolake/include/soc/spi.h @@ -75,4 +75,6 @@ */ int spi_read_status(uint8_t *status); +/* Read SPI controller register. */ +uint32_t spi_ctrlr_reg_read(uint16_t reg); #endif diff --git a/src/soc/intel/apollolake/spi.c b/src/soc/intel/apollolake/spi.c index 879b3a34a9..282ed013a6 100644 --- a/src/soc/intel/apollolake/spi.c +++ b/src/soc/intel/apollolake/spi.c @@ -70,6 +70,12 @@ static uint32_t _spi_ctrlr_reg_read(struct spi_ctx *ctx, uint16_t reg) return read32((void *)addr); } +uint32_t spi_ctrlr_reg_read(uint16_t reg) +{ + BOILERPLATE_CREATE_CTX(ctx); + return _spi_ctrlr_reg_read(ctx, reg); +} + /* Write to register in the SPI controller. 'reg' is the register offset. */ static void _spi_ctrlr_reg_write(struct spi_ctx *ctx, uint16_t reg, uint32_t val) |