Philips SA9200 fixes: (1) boost in the bootloader like the e200 and c200, (2) use the right GPIOs and inits in the SD driver, and (3) add charger detection.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20323 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Mark Arigo 2009-03-14 02:47:14 +00:00
parent f8877bf42d
commit b642129be4
3 changed files with 46 additions and 6 deletions

View file

@ -56,7 +56,15 @@ void power_off(void)
unsigned int power_input_status(void)
{
return POWER_INPUT_NONE;
unsigned int status = POWER_INPUT_NONE;
/* GPIOF indicates that the connector is present,
GPIOB indicates that there's power there too.
Same status bits for both USB and the charger. */
if (!(GPIOF_INPUT_VAL & 0x80) && !(GPIOB_INPUT_VAL & 0x80))
status = POWER_INPUT_MAIN_CHARGER;
return status;
}
void ide_power_enable(bool on)