summaryrefslogtreecommitdiff
path: root/lib/intel_iosf.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-06-10 21:28:10 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2014-06-13 20:28:21 +0300
commit71874f4a52878caabe5c2ccd499bab41633fa156 (patch)
tree11b3f3ed6b4c1fea8eeee8be9ea9908ac4e976a9 /lib/intel_iosf.c
parenta49906e26616c405d41631d5e1b0be0a366d2c30 (diff)
tools: Add intel_iosf_sb_{read,write} tools
Add generic tools to poke at IOSF sideband. The user needs to manually specify SB port as well as the register. TODO: Maybe add symbolic names for the units? Would avoid having to trawl the docs for the magic hex value. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'lib/intel_iosf.c')
-rw-r--r--lib/intel_iosf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/intel_iosf.c b/lib/intel_iosf.c
index ca206389..2f1ef90c 100644
--- a/lib/intel_iosf.c
+++ b/lib/intel_iosf.c
@@ -173,3 +173,17 @@ void intel_flisdsi_reg_write(uint32_t reg, uint32_t val)
{
vlv_sideband_rw(IOSF_PORT_FLISDSI, SB_CRWRDA_NP, reg, &val);
}
+
+uint32_t intel_iosf_sb_read(uint32_t port, uint32_t reg)
+{
+ uint32_t val;
+
+ vlv_sideband_rw(port, SB_CRRDDA_NP, reg, &val);
+
+ return val;
+}
+
+void intel_iosf_sb_write(uint32_t port, uint32_t reg, uint32_t val)
+{
+ vlv_sideband_rw(port, SB_CRWRDA_NP, reg, &val);
+}