summaryrefslogtreecommitdiff
path: root/firmware/drivers/power.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/power.c')
-rw-r--r--firmware/drivers/power.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c
index de62c7aa96..2d6c1c815c 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -74,7 +74,13 @@ void power_init(void)
74 spdif_power_enable(false); 74 spdif_power_enable(false);
75#endif 75#endif
76#else 76#else
77#ifdef HAVE_POWEROFF_ON_PB5
78 PBCR2 &= ~0x0c00; /* GPIO for PB5 */
79 or_b(0x20, &PBIORL);
80 or_b(0x20, &PBDRL); /* hold power */
81#endif
77#ifdef HAVE_CHARGE_CTRL 82#ifdef HAVE_CHARGE_CTRL
83 PBCR2 &= ~0x0c00; /* GPIO for PB5 */
78 or_b(0x20, &PBIORL); /* Set charging control bit to output */ 84 or_b(0x20, &PBIORL); /* Set charging control bit to output */
79 charger_enable(false); /* Default to charger OFF */ 85 charger_enable(false); /* Default to charger OFF */
80#endif 86#endif