diff options
author | Mike Turquette <mturquette@ti.com> | 2011-06-24 02:34:11 -0500 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2011-06-29 13:30:43 -0700 |
commit | f595bcfe0dc4bbf652fd037f9279ac1fbfbc7148 (patch) | |
tree | 4ef804c6265a84d0ea7392f2e7375658ad434626 /arch/arm | |
parent | 9470a77267c2051711810a61abd0183db4881968 (diff) | |
download | kernel_samsung_tuna-f595bcfe0dc4bbf652fd037f9279ac1fbfbc7148.zip kernel_samsung_tuna-f595bcfe0dc4bbf652fd037f9279ac1fbfbc7148.tar.gz kernel_samsung_tuna-f595bcfe0dc4bbf652fd037f9279ac1fbfbc7148.tar.bz2 |
OMAP3: PM: VP: reuse the vp interrupt status as prm generic
We have multiple interrupt status hidden in the PRM interrupt
status reg. Make this handling generic to allow us to pull out
LDO status such as those for ABB from it using the same data
structure and indexing. We hence rename accordingly.
We also fix a trivial warning as the variable does not need
exporting:
arch/arm/mach-omap2/prm2xxx_3xxx.c:172:22: warning: symbol 'omap3_prm_irqs' was not declared. Should it be static?
[nm@ti.com: modifications]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Mike Turquette <mturquette@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/prm2xxx_3xxx.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prm2xxx_3xxx.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/vp.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/vp3xxx_data.c | 4 |
4 files changed, 18 insertions, 17 deletions
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c index 3b83763..8a20242 100644 --- a/arch/arm/mach-omap2/prm2xxx_3xxx.c +++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c @@ -162,39 +162,39 @@ int omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift, u8 st_shift) /* PRM VP */ /* - * struct omap3_vp - OMAP3 VP register access description. + * struct omap3_prm_irq - OMAP3 PRM IRQ register access description. * @tranxdone_status: VP_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg */ -struct omap3_vp { +struct omap3_prm_irq { u32 tranxdone_status; }; -struct omap3_vp omap3_vp[] = { - [OMAP3_VP_VDD_MPU_ID] = { +static struct omap3_prm_irq omap3_prm_irqs[] = { + [OMAP3_PRM_IRQ_VDD_MPU_ID] = { .tranxdone_status = OMAP3430_VP1_TRANXDONE_ST_MASK, }, - [OMAP3_VP_VDD_CORE_ID] = { + [OMAP3_PRM_IRQ_VDD_CORE_ID] = { .tranxdone_status = OMAP3430_VP2_TRANXDONE_ST_MASK, }, }; #define MAX_VP_ID ARRAY_SIZE(omap3_vp); -u32 omap3_prm_vp_check_txdone(u8 vp_id) +u32 omap3_prm_vp_check_txdone(u8 irq_id) { - struct omap3_vp *vp = &omap3_vp[vp_id]; + struct omap3_prm_irq *irq = &omap3_prm_irqs[irq_id]; u32 irqstatus; irqstatus = omap2_prm_read_mod_reg(OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET); - return irqstatus & vp->tranxdone_status; + return irqstatus & irq->tranxdone_status; } -void omap3_prm_vp_clear_txdone(u8 vp_id) +void omap3_prm_vp_clear_txdone(u8 irq_id) { - struct omap3_vp *vp = &omap3_vp[vp_id]; + struct omap3_prm_irq *irq = &omap3_prm_irqs[irq_id]; - omap2_prm_write_mod_reg(vp->tranxdone_status, + omap2_prm_write_mod_reg(irq->tranxdone_status, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET); } diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.h b/arch/arm/mach-omap2/prm2xxx_3xxx.h index cef533d..d2928ae 100644 --- a/arch/arm/mach-omap2/prm2xxx_3xxx.h +++ b/arch/arm/mach-omap2/prm2xxx_3xxx.h @@ -303,9 +303,12 @@ extern int omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift); extern int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift); extern int omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift, u8 st_shift); +#define OMAP3_PRM_IRQ_VDD_MPU_ID 0 +#define OMAP3_PRM_IRQ_VDD_CORE_ID 1 /* OMAP3-specific VP functions */ -u32 omap3_prm_vp_check_txdone(u8 vp_id); -void omap3_prm_vp_clear_txdone(u8 vp_id); +u32 omap3_prm_vp_check_txdone(u8 irq_id); +void omap3_prm_vp_clear_txdone(u8 irq_id); + /* * OMAP3 access functions for voltage controller (VC) and diff --git a/arch/arm/mach-omap2/vp.h b/arch/arm/mach-omap2/vp.h index f78752b..e1e4d3f 100644 --- a/arch/arm/mach-omap2/vp.h +++ b/arch/arm/mach-omap2/vp.h @@ -24,8 +24,6 @@ struct voltagedomain; /* * Voltage Processor (VP) identifiers */ -#define OMAP3_VP_VDD_MPU_ID 0 -#define OMAP3_VP_VDD_CORE_ID 1 #define OMAP4_VP_VDD_CORE_ID 0 #define OMAP4_VP_VDD_IVA_ID 1 #define OMAP4_VP_VDD_MPU_ID 2 diff --git a/arch/arm/mach-omap2/vp3xxx_data.c b/arch/arm/mach-omap2/vp3xxx_data.c index 260c554..7bd8181 100644 --- a/arch/arm/mach-omap2/vp3xxx_data.c +++ b/arch/arm/mach-omap2/vp3xxx_data.c @@ -57,7 +57,7 @@ static const struct omap_vp_common omap3_vp_common = { }; struct omap_vp_instance omap3_vp_mpu = { - .id = OMAP3_VP_VDD_MPU_ID, + .id = OMAP3_PRM_IRQ_VDD_MPU_ID, .common = &omap3_vp_common, .vpconfig = OMAP3_PRM_VP1_CONFIG_OFFSET, .vstepmin = OMAP3_PRM_VP1_VSTEPMIN_OFFSET, @@ -68,7 +68,7 @@ struct omap_vp_instance omap3_vp_mpu = { }; struct omap_vp_instance omap3_vp_core = { - .id = OMAP3_VP_VDD_CORE_ID, + .id = OMAP3_PRM_IRQ_VDD_CORE_ID, .common = &omap3_vp_common, .vpconfig = OMAP3_PRM_VP2_CONFIG_OFFSET, .vstepmin = OMAP3_PRM_VP2_VSTEPMIN_OFFSET, |