Add Yeeloong 3A reboot and halt.
This commit is contained in:
parent
184c61ddce
commit
25a7863d77
3 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2013-12-17 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Add Yeeloong 3A reboot and halt.
|
||||||
|
|
||||||
2013-12-17 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-12-17 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Add Radeon Yeeloong 3A support.
|
Add Radeon Yeeloong 3A support.
|
||||||
|
|
|
@ -288,6 +288,13 @@ grub_halt (void)
|
||||||
& ~GRUB_CPU_YEELOONG_SHUTDOWN_GPIO, GRUB_CPU_LOONGSON_GPIOCFG);
|
& ~GRUB_CPU_YEELOONG_SHUTDOWN_GPIO, GRUB_CPU_LOONGSON_GPIOCFG);
|
||||||
grub_millisleep (1500);
|
grub_millisleep (1500);
|
||||||
break;
|
break;
|
||||||
|
case GRUB_ARCH_MACHINE_YEELOONG_3A:
|
||||||
|
grub_millisleep (1);
|
||||||
|
grub_outb (0x4e, GRUB_MACHINE_PCI_IO_BASE_3A | 0x66);
|
||||||
|
grub_millisleep (1);
|
||||||
|
grub_outb (2, GRUB_MACHINE_PCI_IO_BASE_3A | 0x62);
|
||||||
|
grub_millisleep (5000);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
grub_puts_ (N_("Shutdown failed"));
|
grub_puts_ (N_("Shutdown failed"));
|
||||||
|
|
|
@ -49,6 +49,12 @@ grub_reboot (void)
|
||||||
case GRUB_ARCH_MACHINE_YEELOONG:
|
case GRUB_ARCH_MACHINE_YEELOONG:
|
||||||
grub_write_ec (GRUB_MACHINE_EC_COMMAND_REBOOT);
|
grub_write_ec (GRUB_MACHINE_EC_COMMAND_REBOOT);
|
||||||
break;
|
break;
|
||||||
|
case GRUB_ARCH_MACHINE_YEELOONG_3A:
|
||||||
|
grub_millisleep (1);
|
||||||
|
grub_outb (0x4e, GRUB_MACHINE_PCI_IO_BASE_3A | 0x66);
|
||||||
|
grub_millisleep (1);
|
||||||
|
grub_outb (1, GRUB_MACHINE_PCI_IO_BASE_3A | 0x62);
|
||||||
|
grub_millisleep (5000);
|
||||||
}
|
}
|
||||||
grub_millisleep (1500);
|
grub_millisleep (1500);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue