boot_stage
if (smc->boot_stage != APPLE_SMC_INITIALIZED)
smc->boot_stage = APPLE_SMC_ERROR_CRASHED;
if (smc->boot_stage == APPLE_SMC_BOOTING) {
smc->boot_stage = APPLE_SMC_ERROR_NO_SHMEM;
smc->boot_stage = APPLE_SMC_INITIALIZED;
smc->boot_stage = APPLE_SMC_BOOTING;
if (smc->boot_stage != APPLE_SMC_INITIALIZED) {
dev_err(dev, "SMC failed to boot successfully, boot stage=%d\n", smc->boot_stage);
if (smc->boot_stage != APPLE_SMC_INITIALIZED)
u8 boot_stage;
boot_stage = (bootstage >> 8) & 0xff;
if (boot_stage > cur_stage)
if (boot_stage < cur_stage) {
if (reboot->nvm.boot_stage &&
nvmem_cell_set_u8(reboot->nvm.boot_stage, BOOT_STAGE_SHUTDOWN) < 0)
struct nvmem_cell *boot_stage;
if (reboot->nvm.boot_stage &&
nvmem_cell_set_u8(reboot->nvm.boot_stage, BOOT_STAGE_KERNEL_STARTED) < 0)
enum apple_smc_boot_stage boot_stage;