diff options
author | Mike Turquette <mturquette@ti.com> | 2011-06-24 03:10:22 -0500 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2011-06-29 13:30:47 -0700 |
commit | f7fff0036aab439aaa16cede3f44917675adeb64 (patch) | |
tree | a38ecf9c7fbc0ac43af44c8a64c482e172bd50ef /arch/arm | |
parent | 26c10fac141599cb38d6bc7d223650683354b42d (diff) | |
download | kernel_samsung_tuna-f7fff0036aab439aaa16cede3f44917675adeb64.zip kernel_samsung_tuna-f7fff0036aab439aaa16cede3f44917675adeb64.tar.gz kernel_samsung_tuna-f7fff0036aab439aaa16cede3f44917675adeb64.tar.bz2 |
OMAP4: PRM: add tranxdone status for ABB
Add ABB tranxdone status access api for ABB.
[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/prm44xx.c | 40 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prm44xx.h | 3 |
2 files changed, 36 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c index 9d0b641..a062b63 100644 --- a/arch/arm/mach-omap2/prm44xx.c +++ b/arch/arm/mach-omap2/prm44xx.c @@ -202,25 +202,30 @@ void omap4_prm_global_warm_sw_reset(void) /* * struct omap4_prm_irq - OMAP4 VP register access description. * @irqstatus_mpu: offset to IRQSTATUS_MPU register for VP - * @tranxdone_status: VP_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg + * @vp_tranxdone_status: VP_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg + * @abb_tranxdone_status: ABB_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg */ struct omap4_prm_irq { u32 irqstatus_mpu; - u32 tranxdone_status; + u32 vp_tranxdone_status; + u32 abb_tranxdone_status; }; static struct omap4_prm_irq omap4_prm_irqs[] = { [OMAP4_PRM_IRQ_VDD_MPU_ID] = { .irqstatus_mpu = OMAP4_PRM_IRQSTATUS_MPU_2_OFFSET, - .tranxdone_status = OMAP4430_VP_MPU_TRANXDONE_ST_MASK, + .vp_tranxdone_status = OMAP4430_VP_MPU_TRANXDONE_ST_MASK, + .abb_tranxdone_status = OMAP4430_ABB_MPU_DONE_ST_MASK }, [OMAP4_PRM_IRQ_VDD_IVA_ID] = { .irqstatus_mpu = OMAP4_PRM_IRQSTATUS_MPU_OFFSET, - .tranxdone_status = OMAP4430_VP_IVA_TRANXDONE_ST_MASK, + .vp_tranxdone_status = OMAP4430_VP_IVA_TRANXDONE_ST_MASK, + .abb_tranxdone_status = OMAP4430_ABB_IVA_DONE_ST_MASK, }, [OMAP4_PRM_IRQ_VDD_CORE_ID] = { .irqstatus_mpu = OMAP4_PRM_IRQSTATUS_MPU_OFFSET, - .tranxdone_status = OMAP4430_VP_CORE_TRANXDONE_ST_MASK, + .vp_tranxdone_status = OMAP4430_VP_CORE_TRANXDONE_ST_MASK, + /* Core has no ABB */ }, }; @@ -232,19 +237,40 @@ u32 omap4_prm_vp_check_txdone(u8 irq_id) irqstatus = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION, OMAP4430_PRM_OCP_SOCKET_INST, irq->irqstatus_mpu); - return irqstatus & irq->tranxdone_status; + return irqstatus & irq->vp_tranxdone_status; } void omap4_prm_vp_clear_txdone(u8 irq_id) { struct omap4_prm_irq *irq = &omap4_prm_irqs[irq_id]; - omap4_prminst_write_inst_reg(irq->tranxdone_status, + omap4_prminst_write_inst_reg(irq->vp_tranxdone_status, OMAP4430_PRM_PARTITION, OMAP4430_PRM_OCP_SOCKET_INST, irq->irqstatus_mpu); }; +u32 omap4_prm_abb_check_txdone(u8 irq_id) +{ + struct omap4_prm_irq *irq = &omap4_prm_irqs[irq_id]; + u32 irqstatus; + + irqstatus = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION, + OMAP4430_PRM_OCP_SOCKET_INST, + irq->irqstatus_mpu); + return irqstatus & irq->abb_tranxdone_status; +} + +void omap4_prm_abb_clear_txdone(u8 irq_id) +{ + struct omap4_prm_irq *irq = &omap4_prm_irqs[irq_id]; + + omap4_prminst_write_inst_reg(irq->abb_tranxdone_status, + OMAP4430_PRM_PARTITION, + OMAP4430_PRM_OCP_SOCKET_INST, + irq->irqstatus_mpu); +} + u32 omap4_prm_vcvp_read(u8 offset) { return omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION, diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h index bd0fc85..3993ed4 100644 --- a/arch/arm/mach-omap2/prm44xx.h +++ b/arch/arm/mach-omap2/prm44xx.h @@ -779,6 +779,9 @@ extern void omap4_prm_global_warm_sw_reset(void); /* OMAP4-specific VP functions */ u32 omap4_prm_vp_check_txdone(u8 irq_id); void omap4_prm_vp_clear_txdone(u8 irq_id); +/* OMAP4-specific ABB functions */ +u32 omap4_prm_abb_check_txdone(u8 irq_id); +void omap4_prm_abb_clear_txdone(u8 irq_id); /* * OMAP4 access functions for voltage controller (VC) and |