--- zzzz-none-000/linux-2.6.39.4/arch/x86/kernel/reboot.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/arch/x86/kernel/reboot.c 2021-11-10 13:23:10.000000000 +0000 @@ -20,6 +20,10 @@ #include #include #include +#ifdef CONFIG_ARCH_GEN3 +#include +#include +#endif #ifdef CONFIG_X86_32 # include @@ -489,7 +493,12 @@ static void native_machine_emergency_restart(void) { int i; +#ifdef CONFIG_ARCH_GEN3 + int id; + intelce_get_soc_info(&id, NULL); +#endif + if (reboot_emergency) emergency_vmx_disable_all(); @@ -504,10 +513,29 @@ case BOOT_KBD: mach_reboot_fixups(); /* for board specific fixups */ + for (i = 0; i < 10; i++) { +/* + * The following code is for Intel Media SOC Gen3 base support. +*/ + #ifdef CONFIG_ARCH_GEN3 +/* + * Intel Media SOC Gen3 uses this specific method to reboot. +*/ + switch (id) { + case CE2600_SOC_DEVICE_ID: + /* Trigger cold boot for "reboot" linux command for CE2600 platform */ + p_unit_reset_soc(); + break; + default: + outb(0x2, 0xcf9); + break; + } + #else kb_wait(); udelay(50); outb(0xfe, 0x64); /* pulse reset low */ + #endif udelay(50); } @@ -629,6 +657,19 @@ static void native_machine_power_off(void) { +/* + * The following code is for Intel Media SOC Gen3 base support. +*/ +#ifdef CONFIG_ARCH_GEN3 +/* + * Intel Media SOC Gen3 uses this specific way to power off. +*/ + machine_shutdown(); + while(1) { + outb(0x4, 0xcf9); + udelay(50); + } +#else if (pm_power_off) { if (!reboot_force) machine_shutdown(); @@ -636,6 +677,7 @@ } /* a fallback in case there is no PM info available */ tboot_shutdown(TB_SHUTDOWN_HALT); +#endif } struct machine_ops machine_ops = {