summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/prm_common.c
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2014-10-27 08:39:25 -0700
committerTony Lindgren <tony@atomide.com>2014-10-27 08:39:25 -0700
commit1bc28b3472dc44e6282b464fdb851adcea859be7 (patch)
tree5fde189dae3b918c15780bfb3ac27633401fc2f6 /arch/arm/mach-omap2/prm_common.c
parent37fb59d7e0b471f3aacd26bfdbb64a4dc71f189b (diff)
downloadlinux-1bc28b3472dc44e6282b464fdb851adcea859be7.tar.bz2
ARM: OMAP2+: PRM: add generic API for checking hardreset status
PRM driver now has a generic API for checking hardreset status. SoC specific support functions are registered through the prm_ll_data. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Tested-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/prm_common.c')
-rw-r--r--arch/arm/mach-omap2/prm_common.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index 912d99c4d75d..ce0434a16ad6 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -467,6 +467,26 @@ int omap_prm_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 prm_mod,
}
/**
+ * omap_prm_is_hardreset_asserted - check the hardreset status for an IP block
+ * @shift: register bit shift corresponding to the reset line
+ * @part: PRM partition
+ * @prm_mod: PRM submodule base or instance offset
+ * @offset: register offset
+ *
+ * Checks if a hardware reset line for an IP block is enabled or not.
+ */
+int omap_prm_is_hardreset_asserted(u8 shift, u8 part, s16 prm_mod, u16 offset)
+{
+ if (!prm_ll_data->is_hardreset_asserted) {
+ WARN_ONCE(1, "prm: %s: no mapping function defined\n",
+ __func__);
+ return -EINVAL;
+ }
+
+ return prm_ll_data->is_hardreset_asserted(shift, part, prm_mod, offset);
+}
+
+/**
* prm_register - register per-SoC low-level data with the PRM
* @pld: low-level per-SoC OMAP PRM data & function pointers to register
*