void __dead2 sq_system_off(void) { volatile uint32_t *gpio = (uint32_t *)PLAT_SQ_GPIO_BASE; /* set PD[9] high to power off the system */ gpio[5] |= 0x2; /* set output */ gpio[1] |= 0x2; /* set high */ dmbst(); generic_delay_timer_init(); mdelay(1); while (1) { gpio[1] &= ~0x2; /* set low */ dmbst(); mdelay(1); gpio[1] |= 0x2; /* set high */ dmbst(); mdelay(100); } wfi(); ERROR("SQ System Off: operation not handled.\n"); panic(); }
static void scp_boot_message_send(size_t payload_size) { /* Ensure that any write to the BOM payload area is seen by SCP before * we write to the MHU register. If these 2 writes were reordered by * the CPU then SCP would read stale payload data */ dmbst(); /* Send command to SCP */ mhu_secure_message_send(BOM_MHU_SLOT_ID); }