OMAP4: hwmod: Replace RSTCTRL absolute address with offset macros

The RSTCTRL register was accessed using an absolute address.
The usage of hardcoded macros to calculate virtual address from physical
one should be avoided as much as possible.
The usage of an offset will allow future improvement like migration from
the current architecture code toward a module driver.

Update prm_xxx accessors, move definition to the proper header file and
update copyrights.
Change the s16 register offset parameter to u16.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
[paul@pwsan.com: use '_prminst_' in function names that are part of the
 prminst44xx.c file]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
This commit is contained in:
Benoit Cousson 2011-07-10 05:56:31 -06:00 committed by Paul Walmsley
parent 11b10341bd
commit eaac329dfa
7 changed files with 125 additions and 113 deletions

View file

@ -2,6 +2,7 @@
* omap_hwmod macros, structures
*
* Copyright (C) 2009-2011 Nokia Corporation
* Copyright (C) 2011 Texas Instruments, Inc.
* Paul Walmsley
*
* Created in collaboration with (alphabetical order): Benoît Cousson,
@ -361,7 +362,7 @@ struct omap_hwmod_omap2_prcm {
*/
struct omap_hwmod_omap4_prcm {
u16 clkctrl_offs;
void __iomem *rstctrl_reg;
u16 rstctrl_offs;
u8 submodule_wkdep_bit;
};