static void chipset_turn_off_power_rails(void) { /* Release the power on pin, if it was asserted */ set_pmic_pwron(0); /* Close the pmic power source immediately */ set_pmic_source(0); /* Keep AP and PMIC in reset the whole time */ set_pmic_warm_reset(1); }
/** * Power on the AP */ static void power_on(void) { int i; set_pmic_source(1); usleep(PMIC_SOURCE_STARTUP_TIME); set_pmic_pwron(1); /* * BUG Workaround(crosbug.com/p/31635): usleep hangs in task when using * big delays. */ for (i = 0; i < PMIC_STARTUP_MS; i++) usleep(1 * MSEC); set_pmic_warm_reset(0); }
/** * Power on the AP */ static void power_on(void) { int i; set_pmic_source(1); usleep(PMIC_SOURCE_STARTUP_TIME); set_pmic_pwron(1); /* * BUG Workaround(crosbug.com/p/31635): usleep hangs in task when using * big delays. */ for (i = 0; i < PMIC_STARTUP_MS; i++) usleep(1 * MSEC); /* Reset the PMIC to make sure it's in a known state. */ set_pmic_reset(1); usleep(PMIC_RESET_HOLD_TIME); set_pmic_reset(0); set_pmic_warm_reset(0); }