diff options
| author | Tony Lindgren <tony@atomide.com> | 2012-10-24 17:05:59 -0700 | 
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2012-10-24 17:05:59 -0700 | 
| commit | 8634155ef41d3a035f2ea0b6c5bed2806f2788bc (patch) | |
| tree | 6334a630abf196685803f17002fbf25d11babe17 /arch/arm/mach-omap2/prm.h | |
| parent | 6d02643d64b4440394ee462ea4b870c8506cd9e7 (diff) | |
| parent | 2bb2a5d30abb0dc99d074877bfad2056142c730b (diff) | |
| download | olio-linux-3.10-8634155ef41d3a035f2ea0b6c5bed2806f2788bc.tar.xz olio-linux-3.10-8634155ef41d3a035f2ea0b6c5bed2806f2788bc.zip  | |
Merge tag 'omap-cleanup-a-for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.8/cleanup-prcm
The first set of OMAP PRM/CM-related cleanup patches for 3.8.
Prepares for the future move of the PRM/CM code to drivers/.  Also
includes some prcm.[ch] cleanup patches from the WDTIMER cleanup
series that don't need external acks.
Basic test logs for this branch on top of v3.7-rc2 are here:
http://www.pwsan.com/omap/testlogs/prcm_cleanup_a_3.8/20121021123719/
But due to the number of unrelated regressions present in v3.7-rc[12],
it's not particularly usable as a testing base.  With reverts, fixes,
and workarounds applied as documented in:
http://www.pwsan.com/omap/testlogs/test_v3.7-rc2/20121020134755/README.txt
the following test logs were obtained:
http://www.pwsan.com/omap/testlogs/prcm_cleanup_a_3.8/20121020231757/
which indicate that the series tests cleanly.
Conflicts:
	arch/arm/mach-omap2/Makefile
	arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
	arch/arm/mach-omap2/pm24xx.c
Diffstat (limited to 'arch/arm/mach-omap2/prm.h')
| -rw-r--r-- | arch/arm/mach-omap2/prm.h | 53 | 
1 files changed, 53 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h index 39d562169d1..c30ab5de8d1 100644 --- a/arch/arm/mach-omap2/prm.h +++ b/arch/arm/mach-omap2/prm.h @@ -52,5 +52,58 @@  #define OMAP_POWERSTATE_SHIFT				0  #define OMAP_POWERSTATE_MASK				(0x3 << 0) +/* + * Standardized OMAP reset source bits + * + * To the extent these happen to match the hardware register bit + * shifts, it's purely coincidental.  Used by omap-wdt.c. + * OMAP_UNKNOWN_RST_SRC_ID_SHIFT is a special value, used whenever + * there are any bits remaining in the global PRM_RSTST register that + * haven't been identified, or when the PRM code for the current SoC + * doesn't know how to interpret the register. + */ +#define OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT			0 +#define OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT			1 +#define OMAP_SECU_VIOL_RST_SRC_ID_SHIFT				2 +#define OMAP_MPU_WD_RST_SRC_ID_SHIFT				3 +#define OMAP_SECU_WD_RST_SRC_ID_SHIFT				4 +#define OMAP_EXTWARM_RST_SRC_ID_SHIFT				5 +#define OMAP_VDD_MPU_VM_RST_SRC_ID_SHIFT			6 +#define OMAP_VDD_IVA_VM_RST_SRC_ID_SHIFT			7 +#define OMAP_VDD_CORE_VM_RST_SRC_ID_SHIFT			8 +#define OMAP_ICEPICK_RST_SRC_ID_SHIFT				9 +#define OMAP_ICECRUSHER_RST_SRC_ID_SHIFT			10 +#define OMAP_C2C_RST_SRC_ID_SHIFT				11 +#define OMAP_UNKNOWN_RST_SRC_ID_SHIFT				12 + +#ifndef __ASSEMBLER__ + +/** + * struct prm_reset_src_map - map register bitshifts to standard bitshifts + * @reg_shift: bitshift in the PRM reset source register + * @std_shift: bitshift equivalent in the standard reset source list + * + * The fields are signed because -1 is used as a terminator. + */ +struct prm_reset_src_map { +	s8 reg_shift; +	s8 std_shift; +}; + +/** + * struct prm_ll_data - fn ptrs to per-SoC PRM function implementations + * @read_reset_sources: ptr to the Soc PRM-specific get_reset_source impl + */ +struct prm_ll_data { +	u32 (*read_reset_sources)(void); +}; + +extern int prm_register(struct prm_ll_data *pld); +extern int prm_unregister(struct prm_ll_data *pld); + +extern u32 prm_read_reset_sources(void); + +#endif +  #endif  |