Add Yeeloong 3A reboot and halt.

This commit is contained in:
Vladimir Serbinenko 2013-12-17 22:53:18 +01:00
parent 184c61ddce
commit 25a7863d77
3 changed files with 17 additions and 0 deletions

View file

@ -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>
Add Radeon Yeeloong 3A support.

View file

@ -288,6 +288,13 @@ grub_halt (void)
& ~GRUB_CPU_YEELOONG_SHUTDOWN_GPIO, GRUB_CPU_LOONGSON_GPIOCFG);
grub_millisleep (1500);
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"));

View file

@ -49,6 +49,12 @@ grub_reboot (void)
case GRUB_ARCH_MACHINE_YEELOONG:
grub_write_ec (GRUB_MACHINE_EC_COMMAND_REBOOT);
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);