ipod6g: Move pmu_is_hibernated() from bootloader to PMU driver, misc fixes

Added better comments about the PMU registers, added pmu_set_cpu_voltage() (still unused).

Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: I0ca21a49ece007c913c1b199952009e4dcae80e5
This commit is contained in:
Vencislav Atanasov 2024-11-27 01:43:40 +02:00 committed by Solomon Peachy
parent 6b348d7f75
commit 9b4bab7e0a
3 changed files with 59 additions and 32 deletions

View file

@ -279,13 +279,6 @@ static int kernel_launch_onb(void)
return rc;
}
static bool pmu_is_hibernated(void)
{
/* OF sets GPIO3 to low when SDRAM is hibernated */
return !(pmu_rd(PCF5063X_REG_GPIO3CFG) & 7) &&
!(pmu_rd(PCF5063X_REG_OOCSHDWN) & PCF5063X_OOCSHDWN_COLDBOOT);
}
/* The boot sequence is executed on power-on or reset. After power-up
* the device could come from a state of hibernation, OF hibernates
* the iPod after an inactive period of ~30 minutes (FW 1.1.2), on