forked from len0rd/rockbox
Gigabeat S: Implement charging and power control to charge from AC or USB. Hold MENU while plugging USB cable to charge from USB without connecting. Under Windows, plugging USB for charging only but not connecting still needs to be properly handled (driver popup issue) but it will charge when connected normally-- no issue under Linux. Some accomodating changes made to powermgmt.c will soon be made nicer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19547 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c3c15cce88
commit
5667682dd2
18 changed files with 1300 additions and 140 deletions
|
|
@ -32,6 +32,31 @@
|
|||
#include "clkctl-imx31.h"
|
||||
#include "mc13783.h"
|
||||
|
||||
/* Initialize the watchdog timer */
|
||||
void watchdog_init(unsigned int half_seconds)
|
||||
{
|
||||
uint16_t wcr = WDOG_WCR_WTw(half_seconds) | /* Timeout */
|
||||
WDOG_WCR_WOE | /* WDOG output enabled */
|
||||
WDOG_WCR_WDA | /* WDOG assertion - no effect */
|
||||
WDOG_WCR_SRS | /* System reset - no effect */
|
||||
WDOG_WCR_WRE; /* Generate a WDOG signal */
|
||||
|
||||
imx31_clkctl_module_clock_gating(CG_WDOG, CGM_ON_RUN_WAIT);
|
||||
|
||||
WDOG_WCR = wcr;
|
||||
WDOG_WSR = 0x5555;
|
||||
WDOG_WCR = wcr | WDOG_WCR_WDE; /* Enable timer - hardware does
|
||||
not allow a disable now */
|
||||
WDOG_WSR = 0xaaaa;
|
||||
}
|
||||
|
||||
/* Service the watchdog timer */
|
||||
void watchdog_service(void)
|
||||
{
|
||||
WDOG_WSR = 0x5555;
|
||||
WDOG_WSR = 0xaaaa;
|
||||
}
|
||||
|
||||
int system_memory_guard(int newmode)
|
||||
{
|
||||
(void)newmode;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue