forked from len0rd/rockbox
imx233: rework vdd5v shared irq handling
The previous code disabled the irq when there were fired. This seems unreliable for some mysterious reason. Instead simply disable them before enabling the irq. Change-Id: I7ee1aa25dbc41c7dd53aa7c7744aa5e4d70ff2d8 Reviewed-on: http://gerrit.rockbox.org/640 Reviewed-by: benjamin brown <foolshperson@gmail.com> Tested-by: benjamin brown <foolshperson@gmail.com> Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
This commit is contained in:
parent
4aa32fb8f4
commit
78c060b09c
1 changed files with 10 additions and 20 deletions
|
@ -120,26 +120,6 @@ void INT_VDD5V(void)
|
|||
BF_CLR(POWER_CTRL, VDD5V_GT_VDDIO_IRQ);
|
||||
}
|
||||
#endif
|
||||
#if IMX233_SUBTARGET >= 3700
|
||||
/* this IRQ is shared by several sources, disable them */
|
||||
if(BF_RD(POWER_CTRL, PSWITCH_IRQ))
|
||||
{
|
||||
BF_CLR(POWER_CTRL, ENIRQ_PSWITCH);
|
||||
BF_CLR(POWER_CTRL, PSWITCH_IRQ);
|
||||
}
|
||||
#if IMX233_SUBTARGET < 3780
|
||||
if(BF_RD(POWER_CTRL, LINREG_OK_IRQ))
|
||||
{
|
||||
BF_CLR(POWER_CTRL, ENIRQ_LINREG_OK);
|
||||
BF_CLR(POWER_CTRL, LINREG_OK_IRQ);
|
||||
}
|
||||
#endif /* IMX233_SUBTARGET < 3780 */
|
||||
if(BF_RD(POWER_CTRL, DC_OK_IRQ))
|
||||
{
|
||||
BF_CLR(POWER_CTRL, ENIRQ_DC_OK);
|
||||
BF_CLR(POWER_CTRL, DC_OK_IRQ);
|
||||
}
|
||||
#endif /* IMX233_SUBTARGET >= 3700 */
|
||||
}
|
||||
|
||||
void imx233_power_init(void)
|
||||
|
@ -174,7 +154,17 @@ void imx233_power_init(void)
|
|||
else
|
||||
BF_SET(POWER_CTRL, POLARITY_VDD5V_GT_VDDIO);
|
||||
BF_SET(POWER_CTRL, ENIRQ_VDD5V_GT_VDDIO);
|
||||
/* make the vbusvalid detection way is not enabled */
|
||||
BF_CLR(POWER_CTRL, ENIRQ_VBUS_VALID);
|
||||
#endif
|
||||
/* the VDD5V IRQ is shared by several sources, disable them */
|
||||
#if IMX233_SUBTARGET >= 3700
|
||||
BF_CLR(POWER_CTRL, ENIRQ_PSWITCH);
|
||||
BF_CLR(POWER_CTRL, ENIRQ_DC_OK);
|
||||
#if IMX233_SUBTARGET < 3780
|
||||
BF_CLR(POWER_CTRL, ENIRQ_LINREG_OK);
|
||||
#endif /* IMX233_SUBTARGET < 3780 */
|
||||
#endif /* IMX233_SUBTARGET >= 3700 */
|
||||
imx233_icoll_enable_interrupt(INT_SRC_VDD5V, true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue