[coreboot-gerrit] Patch set updated for coreboot: intel/apollolake: Add helper routine for spi reg read
Furquan Shaikh (furquan@google.com)
gerrit at coreboot.org
Tue Jun 21 03:28:24 CEST 2016
Furquan Shaikh (furquan at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15268
-gerrit
commit 10f42b67046555e9a1c11052371206ae95ef5420
Author: Furquan Shaikh <furquan at google.com>
Date: Sun Jun 19 23:20:08 2016 -0700
intel/apollolake: Add helper routine for spi reg read
BUG=chrome-os-partner:54563
Change-Id: I56bc6b5292aec676103a436048abee8577edd961
Signed-off-by: Furquan Shaikh <furquan at google.com>
---
src/soc/intel/apollolake/include/soc/spi.h | 2 ++
src/soc/intel/apollolake/spi.c | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/src/soc/intel/apollolake/include/soc/spi.h b/src/soc/intel/apollolake/include/soc/spi.h
index 1414a84..f67110f 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 879b3a3..83bd457 100644
--- a/src/soc/intel/apollolake/spi.c
+++ b/src/soc/intel/apollolake/spi.c
@@ -70,6 +70,13 @@ 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)
More information about the coreboot-gerrit
mailing list