aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/prm_common.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-12-12 19:10:45 -0500
committerOlof Johansson <olof@lixom.net>2012-12-12 19:10:45 -0500
commit9c7466b217af784280d9fc841bbd559ef3bf33e9 (patch)
treec21ee243e48912201b4041fbf3f9bd9165603bd8 /arch/arm/mach-omap2/prm_common.c
parent4a76411ea3f1da9032e031f8fff8894b97d141b2 (diff)
parent48d224d1efec98b0b78e511150b4f5752beceb7c (diff)
ARM: arm-soc: Merge branch 'next/pm2' into next/pm
Another smaller branch merged into next/pm before pull request. Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-omap2/prm_common.c')
-rw-r--r--arch/arm/mach-omap2/prm_common.c47
1 files changed, 45 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index d2e0798a4c82..228b850e632f 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -24,8 +24,6 @@
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/slab.h> 25#include <linux/slab.h>
26 26
27#include "../plat-omap/common.h"
28
29#include "prm2xxx_3xxx.h" 27#include "prm2xxx_3xxx.h"
30#include "prm2xxx.h" 28#include "prm2xxx.h"
31#include "prm3xxx.h" 29#include "prm3xxx.h"
@@ -367,6 +365,51 @@ u32 prm_read_reset_sources(void)
367} 365}
368 366
369/** 367/**
368 * prm_was_any_context_lost_old - was device context lost? (old API)
369 * @part: PRM partition ID (e.g., OMAP4430_PRM_PARTITION)
370 * @inst: PRM instance offset (e.g., OMAP4430_PRM_MPU_INST)
371 * @idx: CONTEXT register offset
372 *
373 * Return 1 if any bits were set in the *_CONTEXT_* register
374 * identified by (@part, @inst, @idx), which means that some context
375 * was lost for that module; otherwise, return 0. XXX Deprecated;
376 * callers need to use a less-SoC-dependent way to identify hardware
377 * IP blocks.
378 */
379bool prm_was_any_context_lost_old(u8 part, s16 inst, u16 idx)
380{
381 bool ret = true;
382
383 if (prm_ll_data->was_any_context_lost_old)
384 ret = prm_ll_data->was_any_context_lost_old(part, inst, idx);
385 else
386 WARN_ONCE(1, "prm: %s: no mapping function defined\n",
387 __func__);
388
389 return ret;
390}
391
392/**
393 * prm_clear_context_lost_flags_old - clear context loss flags (old API)
394 * @part: PRM partition ID (e.g., OMAP4430_PRM_PARTITION)
395 * @inst: PRM instance offset (e.g., OMAP4430_PRM_MPU_INST)
396 * @idx: CONTEXT register offset
397 *
398 * Clear hardware context loss bits for the module identified by
399 * (@part, @inst, @idx). No return value. XXX Deprecated; callers
400 * need to use a less-SoC-dependent way to identify hardware IP
401 * blocks.
402 */
403void prm_clear_context_loss_flags_old(u8 part, s16 inst, u16 idx)
404{
405 if (prm_ll_data->clear_context_loss_flags_old)
406 prm_ll_data->clear_context_loss_flags_old(part, inst, idx);
407 else
408 WARN_ONCE(1, "prm: %s: no mapping function defined\n",
409 __func__);
410}
411
412/**
370 * prm_register - register per-SoC low-level data with the PRM 413 * prm_register - register per-SoC low-level data with the PRM
371 * @pld: low-level per-SoC OMAP PRM data & function pointers to register 414 * @pld: low-level per-SoC OMAP PRM data & function pointers to register
372 * 415 *