Skip to contentSkip to conversation

x86: baytrail: acpi: Add full reset bit to the reset register value in FADT

PATCH New Bin Meng 2 participants 3 messages Aug 29, 2017 – Sep 1, 2017 x86

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 x86: baytrail: acpi: Add full reset bit to the reset register value in FADT

It was noticed a few times, that the reboot from Linux (reboot command) is different from the reboot (reset command) under U-Boot. The U-Boot version does seem to reset the board more deeply (PCI cards etc) than the Linux reboot.

This is actually caused by missing full reset bit in the reset register value in the ACPI FADT table.

---

 arch/x86/cpu/baytrail/acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/cpu/baytrail/acpi.c +1 -1
index cbefdf8..7aac634 100644
@@ -73,7 +73,7 @@ void acpi_create_fadt(struct acpi_fadt *fadt, struct acpi_facs *facs,
 	fadt->reset_reg.access_size = ACPI_ACCESS_SIZE_BYTE_ACCESS;
 	fadt->reset_reg.addrl = IO_PORT_RESET;
 	fadt->reset_reg.addrh = 0;
-	fadt->reset_value = SYS_RST | RST_CPU;
+	fadt->reset_value = SYS_RST | RST_CPU | FULL_RST;
 
 	fadt->x_firmware_ctl_l = (u32)facs;
 	fadt->x_firmware_ctl_h = 0;
Signature · 1 line
2.9.2
#1 lore raw

PATCH 1/1 x86: baytrail: acpi: Add full reset bit to the reset register value in FADT

Quoted 21 lines · Bin Meng

It was noticed a few times, that the reboot from Linux (reboot command) is different from the reboot (reset command) under U-Boot. The U-Boot version does seem to reset the board more deeply (PCI cards etc) than the Linux reboot.

This is actually caused by missing full reset bit in the reset register value in the ACPI FADT table.

---

  arch/x86/cpu/baytrail/acpi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/cpu/baytrail/acpi.c +0 -0
index cbefdf8..7aac634 100644

arch/x86/cpu/baytrail/acpi.c void acpi_create_fadt(struct acpi_fadt *fadt, struct acpi_facs *facs, · line 79

Quoted 8 lines
arch/x86/cpu/baytrail/acpi.c +1 -1
@@ -73,7 +73,7 @@ void acpi_create_fadt(struct acpi_fadt *fadt, struct acpi_facs *facs,
  	fadt->reset_reg.access_size = ACPI_ACCESS_SIZE_BYTE_ACCESS;
  	fadt->reset_reg.addrl = IO_PORT_RESET;
  	fadt->reset_reg.addrh = 0;
-	fadt->reset_value = SYS_RST | RST_CPU;
+	fadt->reset_value = SYS_RST | RST_CPU | FULL_RST;
 
  	fadt->x_firmware_ctl_l = (u32)facs;
  	fadt->x_firmware_ctl_h = 0;

Very nice Bin, this does exactly what I was missing. :)

Thanks,
Stefan

author
#2 lore raw

PATCH 1/1 x86: baytrail: acpi: Add full reset bit to the reset register value in FADT

Quoted 34 lines · Stefan Roese
Quoted 22 lines · Bin Meng

It was noticed a few times, that the reboot from Linux (reboot command) is different from the reboot (reset command) under U-Boot. The U-Boot version does seem to reset the board more deeply (PCI cards etc) than the Linux reboot.

This is actually caused by missing full reset bit in the reset register value in the ACPI FADT table.

---

  arch/x86/cpu/baytrail/acpi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/cpu/baytrail/acpi.c +0 -0
index cbefdf8..7aac634 100644

arch/x86/cpu/baytrail/acpi.c void acpi_create_fadt(struct acpi_fadt *fadt, struct · line 79

Quoted 8 lines
arch/x86/cpu/baytrail/acpi.c +1 -1
@@ -73,7 +73,7 @@ void acpi_create_fadt(struct acpi_fadt *fadt, struct
 acpi_facs *facs,
        fadt->reset_reg.access_size = ACPI_ACCESS_SIZE_BYTE_ACCESS;
        fadt->reset_reg.addrl = IO_PORT_RESET;
        fadt->reset_reg.addrh = 0;
-       fadt->reset_value = SYS_RST | RST_CPU;
+       fadt->reset_value = SYS_RST | RST_CPU | FULL_RST;
        fadt->x_firmware_ctl_l = (u32)facs;
        fadt->x_firmware_ctl_h = 0;

Very nice Bin, this does exactly what I was missing. :)

Quoted 2 lines

applied to u-boot-x86, thanks!