summaryrefslogtreecommitdiff
path: root/src/soc/intel/baytrail/iosf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/baytrail/iosf.c')
-rw-r--r--src/soc/intel/baytrail/iosf.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/soc/intel/baytrail/iosf.c b/src/soc/intel/baytrail/iosf.c
index 5a8331057e..21060eee1a 100644
--- a/src/soc/intel/baytrail/iosf.c
+++ b/src/soc/intel/baytrail/iosf.c
@@ -15,7 +15,7 @@ static inline uint32_t read_iosf_reg(int reg)
}
/* Common sequences for all the port accesses. */
-static uint32_t iosf_read_port(uint32_t cr, int reg)
+uint32_t iosf_read_port(uint32_t cr, int reg)
{
cr |= IOSF_REG(reg) | IOSF_BYTE_EN;
write_iosf_reg(MCRX_REG, IOSF_REG_UPPER(reg));
@@ -23,7 +23,7 @@ static uint32_t iosf_read_port(uint32_t cr, int reg)
return read_iosf_reg(MDR_REG);
}
-static void iosf_write_port(uint32_t cr, int reg, uint32_t val)
+void iosf_write_port(uint32_t cr, int reg, uint32_t val)
{
cr |= IOSF_REG(reg) | IOSF_BYTE_EN;
write_iosf_reg(MDR_REG, val);
@@ -68,6 +68,16 @@ void iosf_dunit_write(int reg, uint32_t val)
iosf_write_port(IOSF_WRITE(SYSMEMC), reg, val);
}
+uint32_t iosf_cunit_read(int reg)
+{
+ return iosf_read_port(IOSF_READ(CUNIT), reg);
+}
+
+void iosf_cunit_write(int reg, uint32_t val)
+{
+ iosf_write_port(IOSF_WRITE(CUNIT), reg, val);
+}
+
uint32_t iosf_punit_read(int reg)
{
return iosf_read_port(IOSF_READ(PMC), reg);