util/autoport: Make dsdt.asl prettier

Small cosmetic changes which fix aesthetic inaccuracies.

Change-Id: I8fef4bbe12b283cee2ab8d078de950171757bbfe
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/30971
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tristan Corrick <tristan@corrick.kiwi>
This commit is contained in:
Angel Pons 2019-01-16 21:55:55 +01:00 committed by Patrick Georgi
parent 1b252fc37a
commit ca62334d76
1 changed files with 9 additions and 10 deletions

View File

@ -838,13 +838,14 @@ func main() {
for _, define := range DSDTDefines { for _, define := range DSDTDefines {
if define.Comment != "" { if define.Comment != "" {
fmt.Fprintf(dsdt, "\t/* %s. */\n", define.Comment) fmt.Fprintf(dsdt, "\t/* %s. */\n", define.Comment)
} }
dsdt.WriteString("#define " + define.Key + " " + define.Value + "\n") dsdt.WriteString("#define " + define.Key + " " + define.Value + "\n")
} }
dsdt.WriteString( dsdt.WriteString(
`#include <arch/acpi.h> `
#include <arch/acpi.h>
DefinitionBlock( DefinitionBlock(
"dsdt.aml", "dsdt.aml",
"DSDT", "DSDT",
@ -854,31 +855,29 @@ DefinitionBlock(
0x20141018 // OEM revision 0x20141018 // OEM revision
) )
{ {
// Some generic macros /* Some generic macros */
#include "acpi/platform.asl" #include "acpi/platform.asl"
`) `)
for _, x := range DSDTIncludes { for _, x := range DSDTIncludes {
if x.Comment != "" { if x.Comment != "" {
fmt.Fprintf(dsdt, "\t/* %s. */\n", x.Comment) fmt.Fprintf(dsdt, "\t/* %s. */\n", x.Comment)
} }
fmt.Fprintf(dsdt, "\t#include <%s>\n", x.File) fmt.Fprintf(dsdt, "\t#include <%s>\n", x.File)
} }
dsdt.WriteString(` dsdt.WriteString(`
Scope (\_SB) { Device (\_SB.PCI0)
Device (PCI0) {
{
`) `)
for _, x := range DSDTPCI0Includes { for _, x := range DSDTPCI0Includes {
if x.Comment != "" { if x.Comment != "" {
fmt.Fprintf(dsdt, "\t/* %s. */\n", x.Comment) fmt.Fprintf(dsdt, "\t/* %s. */\n", x.Comment)
} }
fmt.Fprintf(dsdt, "\t\t#include <%s>\n", x.File) fmt.Fprintf(dsdt, "\t\t#include <%s>\n", x.File)
} }
dsdt.WriteString( dsdt.WriteString(
` } ` }
}
} }
`) `)