* grub-core/kern/mips/loongson/init.c (grub_reboot): Reboot Fuloong.
* include/grub/cs5536.h (GRUB_CS5536_MSR_DIVIL_RESET): New definition.
This commit is contained in:
parent
d94497eaca
commit
f87abff538
3 changed files with 27 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-08-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/kern/mips/loongson/init.c (grub_reboot): Reboot Fuloong.
|
||||
* include/grub/cs5536.h (GRUB_CS5536_MSR_DIVIL_RESET): New definition.
|
||||
|
||||
2011-08-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/Makefile.core.def (kernel): Add video/radeon_fuloong2e.c on
|
||||
|
|
|
@ -269,8 +269,27 @@ grub_exit (void)
|
|||
void
|
||||
grub_reboot (void)
|
||||
{
|
||||
grub_write_ec (GRUB_MACHINE_EC_COMMAND_REBOOT);
|
||||
|
||||
switch (grub_arch_machine)
|
||||
{
|
||||
case GRUB_ARCH_MACHINE_FULOONG2E:
|
||||
grub_outb (grub_inb (0xbfe00104) & ~4, 0xbfe00104);
|
||||
grub_outb (grub_inb (0xbfe00104) | 4, 0xbfe00104);
|
||||
break;
|
||||
case GRUB_ARCH_MACHINE_FULOONG2F:
|
||||
{
|
||||
grub_pci_device_t dev;
|
||||
if (!grub_cs5536_find (&dev))
|
||||
break;
|
||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_RESET,
|
||||
grub_cs5536_read_msr (dev,
|
||||
GRUB_CS5536_MSR_DIVIL_RESET)
|
||||
| 1);
|
||||
break;
|
||||
}
|
||||
case GRUB_ARCH_MACHINE_YEELOONG:
|
||||
grub_write_ec (GRUB_MACHINE_EC_COMMAND_REBOOT);
|
||||
break;
|
||||
}
|
||||
grub_millisleep (1500);
|
||||
|
||||
grub_printf ("Reboot failed\n");
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define GRUB_CS5536_MSR_DIVIL_LEG_IO_F_REMAP 0x04000000
|
||||
#define GRUB_CS5536_MSR_DIVIL_LEG_IO_UART1_COM1 0x00070000
|
||||
#define GRUB_CS5536_MSR_DIVIL_LEG_IO_UART2_COM3 0x00500000
|
||||
#define GRUB_CS5536_MSR_DIVIL_RESET 0x80000017
|
||||
#define GRUB_CS5536_MSR_DIVIL_IRQ_MAPPER_PRIMARY_MASK 0x80000024
|
||||
#define GRUB_CS5536_MSR_DIVIL_IRQ_MAPPER_LPC_MASK 0x80000025
|
||||
#define GRUB_CS5536_DIVIL_LPC_INTERRUPTS 0x1002
|
||||
|
|
Loading…
Reference in a new issue