summaryrefslogtreecommitdiff
path: root/src/soc/intel/baytrail/iosf.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2013-11-01 14:19:24 -0500
committerAaron Durbin <adurbin@google.com>2014-03-11 19:54:04 +0100
commit65ad521f8a19ec42c1bafa6777eb927fa55261a2 (patch)
treed66fd55a1ed9a21ddc69aba596329f498ccd35c5 /src/soc/intel/baytrail/iosf.c
parent46ab8cdc680cdafe37532b9ee15d38efa4912c98 (diff)
downloadcoreboot-65ad521f8a19ec42c1bafa6777eb927fa55261a2.tar.xz
baytrail: add ccu iosf access functions
The clock control unit needs to be accessed to configure some of the devices properly. Therefore. provide a way to access the CCU. BUG=chrome-os-partner:23791 BRANCH=None TEST=Built. Change-Id: I30ed06e6aef81ee99c6d7ab3cbe8f83818b8dee5 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/175492 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: http://review.coreboot.org/4927 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/soc/intel/baytrail/iosf.c')
-rw-r--r--src/soc/intel/baytrail/iosf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/soc/intel/baytrail/iosf.c b/src/soc/intel/baytrail/iosf.c
index a7f7a905bc..7e0dacb812 100644
--- a/src/soc/intel/baytrail/iosf.c
+++ b/src/soc/intel/baytrail/iosf.c
@@ -154,3 +154,17 @@ void iosf_lpss_write(int reg, uint32_t val)
IOSF_PORT(IOSF_PORT_LPSS);
return iosf_write_port(cr, reg, val);
}
+
+uint32_t iosf_ccu_read(int reg)
+{
+ uint32_t cr = IOSF_OPCODE(IOSF_OP_READ_CCU) |
+ IOSF_PORT(IOSF_PORT_CCU);
+ return iosf_read_port(cr, reg);
+}
+
+void iosf_ccu_write(int reg, uint32_t val)
+{
+ uint32_t cr = IOSF_OPCODE(IOSF_OP_WRITE_CCU) |
+ IOSF_PORT(IOSF_PORT_CCU);
+ return iosf_write_port(cr, reg, val);
+}