summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRobert Lee <robert.lee@freescale.com>2009-12-02 20:54:38 -0600
committerRobert Lee <robert.lee@freescale.com>2009-12-04 18:47:29 -0600
commitcabe0ffb54399e5fa696507cd248848ec68ed153 (patch)
tree2b482b4e4439102820b2edb8f1a5b0097f00c5b4 /arch
parent9ccdd6f01995bdede051ee802725f7a966cc03bf (diff)
ENGR00118995 iMX23: power supply protection mechanism must be implemented.
iMX23: power supply protection mechanism must be implemented in order to properly protect the SoC from damage or getting into a locked up state. Several chip errata exists which (some are documented and some are not yet documented at the time of this writing). Signed-off-by: Robert Lee <robert.lee@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-stmp378x/pm.c18
-rw-r--r--arch/arm/plat-stmp3xxx/devices.c33
2 files changed, 50 insertions, 1 deletions
diff --git a/arch/arm/mach-stmp378x/pm.c b/arch/arm/mach-stmp378x/pm.c
index a3662c3a5627..32f87ee18a9d 100644
--- a/arch/arm/mach-stmp378x/pm.c
+++ b/arch/arm/mach-stmp378x/pm.c
@@ -123,6 +123,8 @@ static void stmp378x_standby(void)
/* half the fets */
__raw_writel(BM_POWER_MINPWR_HALF_FETS,
REGS_POWER_BASE + HW_POWER_MINPWR_SET);
+ __raw_writel(BM_POWER_MINPWR_DOUBLE_FETS,
+ REGS_POWER_BASE + HW_POWER_MINPWR_CLR);
__raw_writel(BM_POWER_LOOPCTRL_CM_HYST_THRESH,
REGS_POWER_BASE + HW_POWER_LOOPCTRL_CLR);
@@ -130,6 +132,15 @@ static void stmp378x_standby(void)
REGS_POWER_BASE + HW_POWER_LOOPCTRL_CLR);
__raw_writel(BM_POWER_LOOPCTRL_EN_DF_HYST,
REGS_POWER_BASE + HW_POWER_LOOPCTRL_CLR);
+
+
+ stmp3xxx_clearl(BM_POWER_LOOPCTRL_CM_HYST_THRESH,
+ REGS_POWER_BASE + HW_POWER_LOOPCTRL);
+ stmp3xxx_clearl(BM_POWER_LOOPCTRL_EN_CM_HYST,
+ REGS_POWER_BASE + HW_POWER_LOOPCTRL);
+ stmp3xxx_clearl(BM_POWER_LOOPCTRL_EN_DF_HYST,
+ REGS_POWER_BASE + HW_POWER_LOOPCTRL);
+
/* enable PFM */
__raw_writel(BM_POWER_LOOPCTRL_HYST_SIGN,
REGS_POWER_BASE + HW_POWER_LOOPCTRL_SET);
@@ -163,6 +174,13 @@ static void stmp378x_standby(void)
(3 << BP_POWER_LOOPCTRL_EN_RCSCALE),
REGS_POWER_BASE + HW_POWER_LOOPCTRL);
+ /* double the fets */
+ __raw_writel(BM_POWER_MINPWR_HALF_FETS,
+ REGS_POWER_BASE + HW_POWER_MINPWR_CLR);
+ __raw_writel(BM_POWER_MINPWR_DOUBLE_FETS,
+ REGS_POWER_BASE + HW_POWER_MINPWR_SET);
+
+
/* Restore VDDD */
__raw_writel(reg_vddd, REGS_POWER_BASE + HW_POWER_VDDDCTRL);
diff --git a/arch/arm/plat-stmp3xxx/devices.c b/arch/arm/plat-stmp3xxx/devices.c
index e55846559362..c0502ac9f506 100644
--- a/arch/arm/plat-stmp3xxx/devices.c
+++ b/arch/arm/plat-stmp3xxx/devices.c
@@ -484,11 +484,42 @@ struct platform_device stmp3xxx_dcp = {
};
static struct resource battery_resource[] = {
- {
+ {/* 0 */
.flags = IORESOURCE_IRQ,
.start = IRQ_VDD5V,
.end = IRQ_VDD5V,
},
+ {/* 1 */
+ .flags = IORESOURCE_IRQ,
+ .start = IRQ_DCDC4P2_BO,
+ .end = IRQ_DCDC4P2_BO,
+ },
+ {/* 2 */
+ .flags = IORESOURCE_IRQ,
+ .start = IRQ_BATT_BRNOUT,
+ .end = IRQ_BATT_BRNOUT,
+ },
+ {/* 3 */
+ .flags = IORESOURCE_IRQ,
+ .start = IRQ_VDDD_BRNOUT,
+ .end = IRQ_VDDD_BRNOUT,
+ },
+ {/* 4 */
+ .flags = IORESOURCE_IRQ,
+ .start = IRQ_VDD18_BRNOUT,
+ .end = IRQ_VDD18_BRNOUT,
+ },
+ {/* 5 */
+ .flags = IORESOURCE_IRQ,
+ .start = IRQ_VDDIO_BRNOUT,
+ .end = IRQ_VDDIO_BRNOUT,
+ },
+ {/* 6 */
+ .flags = IORESOURCE_IRQ,
+ .start = IRQ_VDD5V_DROOP,
+ .end = IRQ_VDD5V_DROOP,
+ },
+
};
struct platform_device stmp3xxx_battery = {