From af97d33ec426b9414133fd82d958cf9ab52a390f Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Mon, 8 Feb 2010 15:46:37 +0000 Subject: Clean up ACPI: - unify all iasl related rules into the toplevel Makefile - build a filesystem standard for ACPI files and use it - pass ACPI sources through cpp, so constants can be shared between C and ACPI more easily - use cpp's #include instead of ACPI's Include() so cpp gets the whole picture Signed-off-by: Patrick Georgi Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5094 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/via/epia-m/Makefile.inc | 7 - src/mainboard/via/epia-n/Makefile.inc | 7 - src/mainboard/via/epia-n/acpi/irq_links.asl | 571 ++++++++++++++++++++++ src/mainboard/via/epia-n/acpi/pata_methods.asl | 132 +++++ src/mainboard/via/epia-n/acpi/pci_init.asl | 30 ++ src/mainboard/via/epia-n/acpi/sb_physical.asl | 548 +++++++++++++++++++++ src/mainboard/via/epia-n/dsdt.asl | 6 +- src/mainboard/via/epia-n/irq_links.asl | 571 ---------------------- src/mainboard/via/epia-n/pata_methods.asl | 132 ----- src/mainboard/via/epia-n/pci_init.asl | 30 -- src/mainboard/via/epia-n/sb_physical.asl | 548 --------------------- src/mainboard/via/epia/Makefile.inc | 7 - src/mainboard/via/vt8454c/Makefile.inc | 7 - src/mainboard/via/vt8454c/acpi/irq-p2p-bridge.asl | 88 ++++ src/mainboard/via/vt8454c/acpi/irq.asl | 143 ++++++ src/mainboard/via/vt8454c/dsdt.asl | 341 +++++++++++++ src/mainboard/via/vt8454c/dsdt.dsl | 341 ------------- src/mainboard/via/vt8454c/irq-p2p-bridge.dsl | 88 ---- src/mainboard/via/vt8454c/irq.dsl | 143 ------ 19 files changed, 1856 insertions(+), 1884 deletions(-) create mode 100644 src/mainboard/via/epia-n/acpi/irq_links.asl create mode 100644 src/mainboard/via/epia-n/acpi/pata_methods.asl create mode 100644 src/mainboard/via/epia-n/acpi/pci_init.asl create mode 100644 src/mainboard/via/epia-n/acpi/sb_physical.asl delete mode 100644 src/mainboard/via/epia-n/irq_links.asl delete mode 100644 src/mainboard/via/epia-n/pata_methods.asl delete mode 100644 src/mainboard/via/epia-n/pci_init.asl delete mode 100644 src/mainboard/via/epia-n/sb_physical.asl create mode 100644 src/mainboard/via/vt8454c/acpi/irq-p2p-bridge.asl create mode 100644 src/mainboard/via/vt8454c/acpi/irq.asl create mode 100644 src/mainboard/via/vt8454c/dsdt.asl delete mode 100644 src/mainboard/via/vt8454c/dsdt.dsl delete mode 100644 src/mainboard/via/vt8454c/irq-p2p-bridge.dsl delete mode 100644 src/mainboard/via/vt8454c/irq.dsl (limited to 'src/mainboard/via') diff --git a/src/mainboard/via/epia-m/Makefile.inc b/src/mainboard/via/epia-m/Makefile.inc index 3c82c8513d..c7f0675063 100644 --- a/src/mainboard/via/epia-m/Makefile.inc +++ b/src/mainboard/via/epia-m/Makefile.inc @@ -46,13 +46,6 @@ crt0s += $(src)/cpu/x86/mmx_disable.inc ifdef POST_EVALUATION -$(obj)/mainboard/$(MAINBOARDDIR)/dsdt.o: $(obj)/dsdt.c - $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c $< -o $@ - -$(obj)/dsdt.c: $(src)/mainboard/$(MAINBOARDDIR)/dsdt.asl - iasl -p dsdt -tc $(src)/mainboard/$(MAINBOARDDIR)/dsdt.asl - mv dsdt.hex $@ - $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(obj)/option_table.h $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c -S $(src)/mainboard/$(MAINBOARDDIR)/romstage.c -o $@ perl -e 's/\.rodata/.rom.data/g' -pi $@ diff --git a/src/mainboard/via/epia-n/Makefile.inc b/src/mainboard/via/epia-n/Makefile.inc index f8d0e6fd9c..76d5ec5cdd 100644 --- a/src/mainboard/via/epia-n/Makefile.inc +++ b/src/mainboard/via/epia-n/Makefile.inc @@ -43,13 +43,6 @@ crt0s += $(src)/cpu/x86/mmx_disable.inc ifdef POST_EVALUATION -$(obj)/mainboard/$(MAINBOARDDIR)/dsdt.o: $(obj)/dsdt.c - $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c $< -o $@ - -$(obj)/dsdt.c: $(src)/mainboard/$(MAINBOARDDIR)/dsdt.asl - iasl -p dsdt -tc $(src)/mainboard/$(MAINBOARDDIR)/dsdt.asl - mv dsdt.hex $@ - $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(obj)/option_table.h $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c -S $(src)/mainboard/$(MAINBOARDDIR)/romstage.c -o $@ perl -e 's/\.rodata/.rom.data/g' -pi $@ diff --git a/src/mainboard/via/epia-n/acpi/irq_links.asl b/src/mainboard/via/epia-n/acpi/irq_links.asl new file mode 100644 index 0000000000..fc93e760b5 --- /dev/null +++ b/src/mainboard/via/epia-n/acpi/irq_links.asl @@ -0,0 +1,571 @@ +/* + * Minimalist ACPI DSDT table for EPIA-N / NL + * Basic description of PCI Interrupt Assignments. + * This is expected to be included into _SB.PCI0 namespace + * (C) Copyright 2009 Jon Harrison + * + */ + + /* PCI PnP Routing Links */ + + /* Define how interrupt Link A is plumbed in */ + Device (LNKA) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x01) + /* Status - always return ready */ + Method (_STA, 0, NotSerialized) + { + /* See If Coreboot has allocated INTA# */ + And (PIRA, 0xF0, Local0) + If (LEqual (Local0, 0x00)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + + Method (_PRS, 0, NotSerialized) + { + Name (BUFA, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {3,4,6,7,10,11,12} + }) + Return (BUFA) + } + + Method (_CRS, 0, NotSerialized) + { + Name (BUFA, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, _Y07) + {} + }) + /* Read the Binary Encoded Field and Map this */ + /* onto the bitwise _INT field in the IRQ descriptor */ + /* See ACPI Spec for detail of _IRQ Descriptor */ + CreateByteField (BUFA, \_SB.PCI0.LNKA._CRS._Y07._INT, IRA1) + CreateByteField (BUFA, 0x02, IRA2) + Store (0x00, Local3) + Store (0x00, Local4) + And (PIRA, 0xF0, Local1) + ShiftRight (Local1, 0x04, Local1) + If (LNotEqual (Local1, 0x00)) + { + If (LGreater (Local1, 0x07)) + { + Subtract (Local1, 0x08, Local2) + ShiftLeft (One, Local2, Local4) + } + Else + { + If (LGreater (Local1, 0x00)) + { + ShiftLeft (One, Local1, Local3) + } + } + + Store (Local3, IRA1) + Store (Local4, IRA2) + } + Return (BUFA) + } + + /* Set Resources - dummy function to keep Linux ACPI happy + * Linux is more than happy not to tinker with irq + * assignments as long as the CRS and STA functions + * return good values + */ + Method (_SRS, 1, NotSerialized) {} + /* Disable - Set PnP Routing Reg to 0 */ + Method (_DIS, 0, NotSerialized ) + { + And (PIRA, 0x0F, PIRA) + } + } // End of LNKA + + Device (LNKB) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x02) + Method (_STA, 0, NotSerialized) + { + /* See If Coreboot has allocated INTB# */ + And (PIBC, 0x0F, Local0) + If (LEqual (Local0, 0x00)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + + Method (_PRS, 0, NotSerialized) + { + Name (BUFB, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {3,4,6,7,10,11,12} + }) + Return (BUFB) + } + + Method (_CRS, 0, NotSerialized) + { + Name (BUFB, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, _Y08) + {} + }) + /* Read the Binary Encoded Field and Map this */ + /* onto the bitwise _INT field in the IRQ descriptor */ + /* See ACPI Spec for detail of _IRQ Descriptor */ + CreateByteField (BUFB, \_SB.PCI0.LNKB._CRS._Y08._INT, IRB1) + CreateByteField (BUFB, 0x02, IRB2) + Store (0x00, Local3) + Store (0x00, Local4) + And (PIBC, 0x0F, Local1) + If (LNotEqual (Local1, 0x00)) + { + If (LGreater (Local1, 0x07)) + { + Subtract (Local1, 0x08, Local2) + ShiftLeft (One, Local2, Local4) + } + Else + { + If (LGreater (Local1, 0x00)) + { + ShiftLeft (One, Local1, Local3) + } + } + + Store (Local3, IRB1) + Store (Local4, IRB2) + } + Return (BUFB) + } + + /* Set Resources - dummy function to keep Linux ACPI happy + * Linux is more than happy not to tinker with irq + * assignments as long as the CRS and STA functions + * return good values + */ + Method (_SRS, 1, NotSerialized) {} + /* Disable - Set PnP Routing Reg to 0 */ + Method (_DIS, 0, NotSerialized ) + { + And (PIBC, 0xF0, PIBC) + } + + } // End of LNKB + + Device (LNKC) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x03) + Method (_STA, 0, NotSerialized) + { + /* See If Coreboot has allocated INTC# */ + And (PIBC, 0xF0, Local0) + If (LEqual (Local0, 0x00)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + + Method (_PRS, 0, NotSerialized) + { + Name (BUFC, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {3,4,6,7,10,11,12} + }) + Return (BUFC) + } + + Method (_CRS, 0, NotSerialized) + { + Name (BUFC, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, _Y09) + {} + }) + /* Read the Binary Encoded Field and Map this */ + /* onto the bitwise _INT field in the IRQ descriptor */ + /* See ACPI Spec for detail of _IRQ Descriptor */ + CreateByteField (BUFC, \_SB.PCI0.LNKC._CRS._Y09._INT, IRC1) + CreateByteField (BUFC, 0x02, IRC2) + Store (0x00, Local3) + Store (0x00, Local4) + And (PIBC, 0xF0, Local1) + ShiftRight (Local1, 0x04, Local1) + If (LNotEqual (Local1, 0x00)) + { + If (LGreater (Local1, 0x07)) + { + Subtract (Local1, 0x08, Local2) + ShiftLeft (One, Local2, Local4) + } + Else + { + If (LGreater (Local1, 0x00)) + { + ShiftLeft (One, Local1, Local3) + } + } + + Store (Local3, IRC1) + Store (Local4, IRC2) + } + Return (BUFC) + } + + /* Set Resources - dummy function to keep Linux ACPI happy + * Linux is more than happy not to tinker with irq + * assignments as long as the CRS and STA functions + * return good values + */ + Method (_SRS, 1, NotSerialized) {} + /* Disable - Set PnP Routing Reg to 0 */ + Method (_DIS, 0, NotSerialized ) + { + And (PIBC, 0x0F, PIBC) + } + +} // End of LNKC + +Device (LNKD) +{ + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x04) + Method (_STA, 0, NotSerialized) + { + /* See If Coreboot has allocated INTD# */ + And (PIRD, 0xF0, Local0) + If (LEqual (Local0, 0x00)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + + Method (_PRS, 0, NotSerialized) + { + Name (BUFD, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, ) + {3,4,6,7,10,11,12} + }) + Return (BUFD) + } + + Method (_CRS, 0, NotSerialized) + { + Name (BUFD, ResourceTemplate () + { + IRQ (Level, ActiveLow, Shared, _Y0A) + {} + }) + /* Read the Binary Encoded Field and Map this */ + /* onto the bitwise _INT field in the IRQ descriptor */ + /* See ACPI Spec for detail of _IRQ Descriptor */ + CreateByteField (BUFD, \_SB.PCI0.LNKD._CRS._Y0A._INT, IRD1) + CreateByteField (BUFD, 0x02, IRD2) + Store (0x00, Local3) + Store (0x00, Local4) + And (PIRD, 0xF0, Local1) + ShiftRight (Local1, 0x04, Local1) + If (LNotEqual (Local1, 0x00)) + { + If (LGreater (Local1, 0x07)) + { + Subtract (Local1, 0x08, Local2) + ShiftLeft (One, Local2, Local4) + } + Else + { + If (LGreater (Local1, 0x00)) + { + ShiftLeft (One, Local1, Local3) + } + } + + Store (Local3, IRD1) + Store (Local4, IRD2) + } + Return (BUFD) + } + + /* Set Resources - dummy function to keep Linux ACPI happy + * Linux is more than happy not to tinker with irq + * assignments as long as the CRS and STA functions + * return good values + */ + Method (_SRS, 1, NotSerialized) {} + /* Disable - Set PnP Routing Reg to 0 */ + Method (_DIS, 0, NotSerialized ) + { + And (PIRD, 0x0F, PIRD) + } + +} // End of LNKD + + +/* APIC IRQ Links */ + +Device (ATAI) +{ + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x05) + Method (_STA, 0, NotSerialized) + { + /* ATFL == 0x02 if SATA Enabled */ + If (LNotEqual (ATFL, 0x02)) + { + /* Double Check By Reading SATA VID */ + /* Otherwise Compatibility Mode */ + If (LNotEqual (\_SB.PCI0.SATA.VID, 0x1106)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + Else + { + /* Serial ATA Enabled Check if PATA is in */ + /* Compatibility Mode */ + If (LEqual (\_SB.PCI0.PATA.ENAT, 0x0A)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + } + + Method (_PRS, 0, NotSerialized) + { + Name (ATAN, ResourceTemplate () + { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, ) + { + 0x00000014, + } + }) + Return (ATAN) + } + + Method (_CRS, 0, NotSerialized) + { + Name (ATAB, ResourceTemplate () + { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, _Y10) + { + 0x00000000, + } + }) + CreateByteField (ATAB, \_SB.PCI0.ATAI._CRS._Y10._INT, IRAI) + Store (0x14, IRAI) + Return (ATAB) + + } + + /* Set Resources - dummy function to keep Linux ACPI happy + * Linux is more than happy not to tinker with irq + * assignments as long as the CRS and STA functions + * return good values + */ + Method (_SRS, 1, NotSerialized) {} + /* Disable - dummy function to keep Linux ACPI happy */ + Method (_DIS, 0, NotSerialized ) {} + +} // End of ATA Interface Link + + +Device (USBI) +{ + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x0A) + Method (_STA, 0, NotSerialized) + { + /* Check that at least one of the USB */ + /* functions is enabled */ + And (IDEB, 0x37, Local0) + If (LEqual (Local0, 0x37)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + + Method (_PRS, 0, NotSerialized) + { + Name (USBB, ResourceTemplate () + { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, ) + { + 0x00000015, + } + }) + + Return(USBB) + } + + Method (_CRS, 0, NotSerialized) + { + Name (USBB, ResourceTemplate () + { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, _Y12) + { + 0x00000000, + } + }) + CreateByteField (USBB, \_SB.PCI0.USBI._CRS._Y12._INT, IRBI) + Store (0x15, IRBI) + Return (USBB) + } + + + /* Set Resources - dummy function to keep Linux ACPI happy + * Linux is more than happy not to tinker with irq + * assignments as long as the CRS and STA functions + * return good values + */ + Method (_SRS, 1, NotSerialized) {} + /* Disable - dummy function to keep Linux ACPI happy */ + Method (_DIS, 0, NotSerialized ) {} +} + +Device (VT8I) +{ + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x0B) + Method (_STA, 0, NotSerialized) + { + /* Check Whether Sound and/or Modem are Activated */ + If (LEqual (EAMC, 0x03)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + + Method (_PRS, 0, NotSerialized) + { + Name (A97C, ResourceTemplate () + { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, ) + { + 0x00000016, + } + }) + Return (A97C) + } + + Method (_CRS, 0, NotSerialized) + { + Name (A97B, ResourceTemplate () + { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, _Y14) + { + 0x00000000, + } + }) + CreateByteField (A97B, \_SB.PCI0.VT8I._CRS._Y14._INT, IRCI) + Store (0x16, IRCI) + Return (A97B) + } + + /* Set Resources - dummy function to keep Linux ACPI happy + * Linux is more than happy not to tinker with irq + * assignments as long as the CRS and STA functions + * return good values + */ + Method (_SRS, 1, NotSerialized) {} + /* Disable - dummy function to keep Linux ACPI happy */ + Method (_DIS, 0, NotSerialized ) {} + +} + + +Device (NICI) +{ + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x0C) + Method (_STA, 0, NotSerialized) + { + /* Check if LAN Function is Enabled */ + /* Note that LAN Enable Polarity is different */ + /* from other functions in VT8237R !? */ + If (LEqual (ELAN, 0x00)) + { + Return (0x09) + } + Else + { + Return (0x0B) + } + } + + Method (_PRS, 0, NotSerialized) + { + Name (NICB, ResourceTemplate () + { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, ) + { + 0x00000017, + } + }) + Return (NICB) + } + + Method (_CRS, 0, NotSerialized) + { + Name (NICD, ResourceTemplate () + { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, _Y16) + { + 0x00000000, + } + }) + CreateByteField (NICD, \_SB.PCI0.NICI._CRS._Y16._INT, IRDI) + Store (0x17, IRDI) + Return (NICD) + } + + /* Set Resources - dummy function to keep Linux ACPI happy + * Linux is more than happy not to tinker with irq + * assignments as long as the CRS and STA functions + * return good values + */ + Method (_SRS, 1, NotSerialized) {} + /* Disable - dummy function to keep Linux ACPI happy */ + Method (_DIS, 0, NotSerialized ) {} + + +} diff --git a/src/mainboard/via/epia-n/acpi/pata_methods.asl b/src/mainboard/via/epia-n/acpi/pata_methods.asl new file mode 100644 index 0000000000..68d505868e --- /dev/null +++ b/src/mainboard/via/epia-n/acpi/pata_methods.asl @@ -0,0 +1,132 @@ +/* + * Minimalist ACPI DSDT table for EPIA-N / NL + * Basic description of some hardware resources to allow + * interrupt assignments to be done. This is expected to be included + * into the PATA Device definition in ab_physical.asl + * (C) Copyright 2009 Jon Harrison + * + */ + +Name (TIM0, Package (0x07) +{ + Package (0x05) + { + 0x78, 0xB4, 0xF0, 0x017F, 0x0258 + }, + + Package (0x05) + { + 0x20, 0x22, 0x33, 0x47, 0x5D + }, + + Package (0x05) + { + 0x04, 0x03, 0x02, 0x01, 0x00 + }, + + Package (0x04) + { + 0x02, 0x01, 0x00, 0x00 + }, + + Package (0x07) + { + 0x78, 0x50, 0x3C, 0x2D, 0x1E, 0x14, 0x0F + }, + + Package (0x0F) + { + 0x06, 0x05, 0x04, 0x04, 0x03, 0x03, 0x02, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,0x00 + }, + + Package (0x07) + { + 0x0E, 0x08, 0x06, 0x04, 0x02, 0x01, 0x00 + } +}) + + +/* This method sets up the PATA Timing Control*/ +/* Note that a lot of this is done in the */ +/* Coreboot VT8237R Init code, but this is */ +/* already getting very cluttered with board */ +/* specific code. Using ACPI will allow this */ +/* to be de-cluttered a bit (so long as we're */ +/* running a ACPI Capable OS !!!) */ + +Method (PMEX, 0, Serialized) +{ + If (REGF) + { + /* Check if these regs are still at defaults */ + /* Board specific timing improvement if not */ + /* Already changed */ + If (LEqual (PMPT, 0xA8)) + { + Store (0x5D, PMPT) + } + + If (LEqual (PSPT, 0xA8)) + { + Store (0x5D, PSPT) + } + + If (LEqual (SMPT, 0xA8)) + { + Store (0x5D, SMPT) + } + + If (LEqual (SSPT, 0xA8)) + { + Store (0x5D, SSPT) + } + + } +} + +/* This Method Provides the method that is used to */ +/* Reset ATA Drives to POST reset condition */ +Method (GTF, 4, Serialized) +{ + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF + }, Local1) + Store (Buffer (0x07) + { + 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF + }, Local2) + CreateByteField (Local1, 0x01, MODE) + CreateByteField (Local2, 0x01, UMOD) + CreateByteField (Local1, 0x05, PCHA) + CreateByteField (Local2, 0x05, UCHA) + And (Arg0, 0x03, Local3) + If (LEqual (And (Local3, 0x01), 0x01)) + { + Store (0xB0, PCHA) + Store (0xB0, UCHA) + } + + If (Arg1) + { + Store (DerefOf (Index (DerefOf (Index (TIM0, 0x05)), Arg2)), + UMOD) + Or (UMOD, 0x40, UMOD) + } + Else + { + Store (Match (DerefOf (Index (TIM0, 0x01)), MEQ, Arg3, MTR, + 0x00, 0x00), Local0) + Or (0x20, DerefOf (Index (DerefOf (Index (TIM0, 0x03)), Local0 + )), UMOD) + } + + Store (Match (DerefOf (Index (TIM0, 0x01)), MEQ, Arg3, MTR, + 0x00, 0x00), Local0) + Or (0x08, DerefOf (Index (DerefOf (Index (TIM0, 0x02)), Local0 + )), MODE) + Concatenate (Local1, Local2, Local6) + Return (Local6) +} + diff --git a/src/mainboard/via/epia-n/acpi/pci_init.asl b/src/mainboard/via/epia-n/acpi/pci_init.asl new file mode 100644 index 0000000000..3169a03d50 --- /dev/null +++ b/src/mainboard/via/epia-n/acpi/pci_init.asl @@ -0,0 +1,30 @@ +/* + * Minimalist ACPI DSDT table for EPIA-N / NL + * Basic description of PCI Interrupt Assignments. + * This is expected to be included into _SB.PCI0 namespace + * (C) Copyright 2009 Jon Harrison + * + */ + +/* This file provides a PCI Bus Initialisation Method that sets + * some flags for use in the interrupt link assignment + */ + +Method (\_SB.PCI0._INI, 0, NotSerialized) +{ + + /* Checking for ATA Interface Enabled */ + Store (0x00, ATFL) + If (LEqual (EIDE, 0x01)) + { + Store (0x02, ATFL) + } + Else + { + If (LNotEqual (\_SB.PCI0.PATA.VID, 0x1106)) + { + Store (0x01, ATFL) + } + } + +} diff --git a/src/mainboard/via/epia-n/acpi/sb_physical.asl b/src/mainboard/via/epia-n/acpi/sb_physical.asl new file mode 100644 index 0000000000..7dd7b1d7e8 --- /dev/null +++ b/src/mainboard/via/epia-n/acpi/sb_physical.asl @@ -0,0 +1,548 @@ +/* + * Minimalist ACPI DSDT table for EPIA-N / NL + * Basic description of some hardware resources to allow + * interrupt assignments to be done. This is expected to be included + * into _SB.PCI0 namespace + * (C) Copyright 2009 Jon Harrison + * + */ + + +/* Basic description of the VT8237R LPC Interface + * PCI Configuration Space + */ + +Device (VT8R) +{ + Name (_ADR, 0x00110000) + OperationRegion (USBC, PCI_Config, 0x50, 0x02) + Scope (\) + { + Field (\_SB.PCI0.VT8R.USBC, ByteAcc, NoLock, Preserve) + { + IDEB, 8 + } + } + + OperationRegion (VTSB, PCI_Config, 0x00, 0xE8) + Scope (\) + { + Field (\_SB.PCI0.VT8R.VTSB, ByteAcc, NoLock, Preserve) + { + Offset (0x02), + DEID, 16, + Offset (0x2C), + ID2C, 8, + ID2D, 8, + ID2E, 8, + ID2F, 8, + Offset (0x44), + PIRE, 4, + PIRF, 4, + PIRG, 4, + PIRH, 4, + POLE, 1, + POLF, 1, + POLG, 1, + POLH, 1, + ENR8, 1, + Offset (0x50), + ESB4, 1, + ESB3, 1, + ESB2, 1, + EIDE, 1, + EUSB, 1, + ESB1, 1, + EAMC, 2, + EKBC, 1, + KBCC, 1, + EPS2, 1, + ERTC, 1, + ELAN, 1, + , 2, + USBD, 1, + SIRQ, 8, + Offset (0x55), + PIRA, 8, + PIBC, 8, + PIRD, 8, + Offset (0x75), + BSAT, 1, + Offset (0x94), + PWC1, 2, + GPO1, 1, + GPO2, 1, + GPO3, 1, + PLLD, 1 + } + } +} + +/* Basic Description of Serial ATA Interface */ +Device (SATA) +{ + Name (_ADR, 0x000F0000) + Method (_STA, 0, NotSerialized) + { + If (LNotEqual (\_SB.PCI0.SATA.VID, 0x1106)) + { + Return (0x00) + } + Else + { + If (LEqual (\_SB.PCI0.SATA.CMDR, 0x00)) + { + Return (0x0D) + } + Else + { + Return (0x0F) + } + } + } + + OperationRegion (SAPR, PCI_Config, 0x00, 0xC2) + Field (SAPR, ByteAcc, NoLock, Preserve) + { + VID, 16, + Offset (0x04), + CMDR, 3, + Offset (0x3C), + IDEI, 8, + Offset (0x49), + , 6, + EPHY, 1 + } +} + +/* Basic Description of Parallel ATA Interface */ +/* An some initialisation of the interface */ +Device (PATA) +{ + Name (_ADR, 0x000F0001) + Name (REGF, 0x01) + Method (_STA, 0, NotSerialized) + { + If (LNotEqual (\_SB.PCI0.PATA.VID, 0x1106)) + { + Return (0x00) + } + Else + { + PMEX () + /* Check if the Interface is Enabled */ + If (LEqual (\_SB.PCI0.PATA.CMDR, 0x00)) + { + Return (0x0D) + } + Else + { + Return (0x0F) + } + } + } + + /* ACPI Spec says to check that regions are accessible */ + /* before trying to access them */ + Method (_REG, 2, NotSerialized) + { + /* Arg0 = Operating Region (0x02 == PCI_Config) */ + If (LEqual (Arg0, 0x02)) + { + /* Arg1 = Handler Connection Mode (0x01 == Connect) */ + Store (Arg1, REGF) + } + } + + #include "pata_methods.asl" + + + OperationRegion (PAPR, PCI_Config, 0x00, 0xC2) + Field (PAPR, ByteAcc, NoLock, Preserve) + { + VID, 16, + Offset (0x04), + CMDR, 3, + Offset (0x09), + ENAT, 4, + Offset (0x3C), + IDEI, 8, + Offset (0x40), + ESCH, 1, + EPCH, 1, + Offset (0x48), + SSPT, 8, + SMPT, 8, + PSPT, 8, + PMPT, 8, + Offset (0x50), + SSUT, 4, + SSCT, 1, + SSUE, 3, + SMUT, 4, + SMCT, 1, + SMUE, 3, + PSUT, 4, + PSCT, 1, + PSUE, 3, + PMUT, 4, + PMCT, 1, + PMUE, 3 + } + + + Device (CHN0) + { + Name (_ADR, 0x00) + Method (_STA, 0, NotSerialized) + { + If (LNotEqual (\_SB.PCI0.PATA.EPCH, 0x01)) + { + Return (0x00) + } + Else + { + Return (0x0F) + } + } + + Device (DRV0) + { + Name (_ADR, 0x00) + Method (_GTF, 0, NotSerialized) + { + Return (GTF (0x00, PMUE, PMUT, PMPT)) + } + } + + Device (DRV1) + { + Name (_ADR, 0x01) + Method (_GTF, 0, NotSerialized) + { + Return (GTF (0x01, PSUE, PSUT, PSPT)) + } + } + } + + Device (CHN1) + { + Name (_ADR, 0x01) + Method (_STA, 0, NotSerialized) + { + If (LNotEqual (ATFL, 0x02)) + { + If (LEqual (\_SB.PCI0.SATA.EPHY, 0x01)) + { + Return (0x00) + } + Else + { + If (LNotEqual (\_SB.PCI0.PATA.ESCH, 0x01)) + { + Return (0x00) + } + Else + { + Return (0x0F) + } + } + } + Else + { + If (LEqual (ATFL, 0x02)) + { + If (LNotEqual (\_SB.PCI0.PATA.ESCH, 0x01)) + { + Return (0x00) + } + Else + { + Return (0x0F) + } + } + Else + { + Return(0x00) + } + } + } + + Device (DRV0) + { + Name (_ADR, 0x00) + Method (_GTF, 0, NotSerialized) + { + Return (GTF (0x02, SMUE, SMUT, SMPT)) + } + } + + Device (DRV1) + { + Name (_ADR, 0x01) + Method (_GTF, 0, NotSerialized) + { + Return (GTF (0x03, SSUE, SSUT, SSPT)) + } + } + } +} // End of PATA Device + + +/* Implement Basic USB Presence detect and */ +/* Power Management Event mask */ +Device (USB0) +{ + Name (_ADR, 0x00100000) + Name (_PRW, Package (0x02) + { + 0x0E, + 0x03 + }) + + OperationRegion (U2F0, PCI_Config, 0x00, 0xC2) + Field (U2F0, ByteAcc, NoLock, Preserve) + { + VID, 16, + Offset (0x04), + CMDR, 3, + Offset (0x3C), + U0IR, 4, + Offset (0x84), + ECDX, 2 + } + + Method (_STA, 0, NotSerialized) + { + If (LNotEqual (\_SB.PCI0.USB0.VID, 0x1106)) + { + Return (0x00) + } + Else + { + If (LEqual (\_SB.PCI0.USB0.CMDR, 0x00)) + { + Return (0x0D) + } + Else + { + Return (0x0F) + } + } + } +} + +Device (USB1) +{ + Name (_ADR, 0x00100001) + Name (_PRW, Package (0x02) + { + 0x0E, + 0x03 + }) + + OperationRegion (U2F1, PCI_Config, 0x00, 0xC2) + Field (U2F1, ByteAcc, NoLock, Preserve) + { + VID, 16, + Offset (0x04), + CMDR, 3, + Offset (0x3C), + U1IR, 4, + Offset (0x84), + ECDX, 2 + } + + Method (_STA, 0, NotSerialized) + { + If (LNotEqual (\_SB.PCI0.USB1.VID, 0x1106)) + { + Return (0x00) + } + Else + { + If (LEqual (\_SB.PCI0.USB1.CMDR, 0x00)) + { + Return (0x0D) + } + Else + { + Return (0x0F) + } + } + } +} + +Device (USB2) +{ + Name (_ADR, 0x00100002) + Name (_PRW, Package (0x02) + { + 0x0E, + 0x03 + }) + + OperationRegion (U2F2, PCI_Config, 0x00, 0xC2) + Field (U2F2, ByteAcc, NoLock, Preserve) + { + VID, 16, + Offset (0x04), + CMDR, 3, + Offset (0x3C), + U2IR, 4, + Offset (0x84), + ECDX, 2 + } + + Method (_STA, 0, NotSerialized) + { + If (LNotEqual (\_SB.PCI0.USB2.VID, 0x1106)) + { + Return (0x00) + } + Else + { + If (LEqual (\_SB.PCI0.USB2.CMDR, 0x00)) + { + Return (0x0D) + } + Else + { + Return (0x0F) + } + } + } +} + +Device (USB3) +{ + Name (_ADR, 0x00100003) + Name (_PRW, Package (0x02) + { + 0x0E, + 0x03 + }) + + OperationRegion (U2F3, PCI_Config, 0x00, 0xC2) + Field (U2F3, ByteAcc, NoLock, Preserve) + { + VID, 16, + Offset (0x04), + CMDR, 3, + Offset (0x3C), + U3IR, 4, + Offset (0x84), + ECDX, 2 + } + + Method (_STA, 0, NotSerialized) + { + If (LNotEqual (\_SB.PCI0.USB3.VID, 0x1106)) + { + Return (0x00) + } + Else + { + If (LEqual (\_SB.PCI0.USB3.CMDR, 0x00)) + { + Return (0x0D) + } + Else + { + Return (0x0F) + } + } + } +} + +Device (USB4) +{ + Name (_ADR, 0x00100004) + Name (_PRW, Package (0x02) + { + 0x0E, + 0x03 + }) + + OperationRegion (U2F4, PCI_Config, 0x00, 0xC2) + Field (U2F4, ByteAcc, NoLock, Preserve) + { + VID, 16, + Offset (0x04), + CMDR, 3, + Offset (0x3C), + U4IR, 4, + Offset (0x84), + ECDX, 2 + } + + Method (_STA, 0, NotSerialized) + { + If (LNotEqual (\_SB.PCI0.USB4.VID, 0x1106)) + { + Return (0x00) + } + Else + { + If (LEqual (\_SB.PCI0.USB4.CMDR, 0x00)) + { + Return (0x0D) + } + Else + { + Return (0x0F) + } + } + } +} + +/* Basic Definition of Ethernet Interface */ +Device (NIC0) +{ + Name (_ADR, 0x00120000) + Name (_PRW, Package (0x02) + { + 0x03, + 0x05 + }) + + OperationRegion (NIC0, PCI_Config, 0x00, 0xC2) + Field (NIC0, ByteAcc, NoLock, Preserve) + { + VID, 16, + Offset (0x04), + CMDR, 3, + Offset (0x3C), + NIIR, 4, + } + + Method (_STA, 0, NotSerialized) + { + If (LNotEqual (\_SB.PCI0.NIC0.VID, 0x1106)) + { + Return (0x00) + } + Else + { + If (LEqual (\_SB.PCI0.NIC0.CMDR, 0x00)) + { + Return (0x0D) + } + Else + { + Return (0x0F) + } + } + } +} + +/* Very Basic Definition of Sound Controller */ +Device (AC97) +{ + Name (_ADR, 0x00110005) + Name (_PRW, Package (0x02) + { + 0x0D, + 0x05 + }) +} diff --git a/src/mainboard/via/epia-n/dsdt.asl b/src/mainboard/via/epia-n/dsdt.asl index 50d18131fd..90731501ed 100644 --- a/src/mainboard/via/epia-n/dsdt.asl +++ b/src/mainboard/via/epia-n/dsdt.asl @@ -88,7 +88,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 1, "CBT-V2", "CBT-DSDT", 1) }) /* PCI Devices Included Here */ - Include("sb_physical.asl") + #include "acpi/sb_physical.asl" /* Legacy PNP Devices Defined Here */ @@ -343,8 +343,8 @@ DefinitionBlock ("dsdt.aml", "DSDT", 1, "CBT-V2", "CBT-DSDT", 1) }) } - Include("irq_links.asl") - Include("pci_init.asl") + #include "acpi/irq_links.asl" + #include "acpi/pci_init.asl" } //End of PCI0 diff --git a/src/mainboard/via/epia-n/irq_links.asl b/src/mainboard/via/epia-n/irq_links.asl deleted file mode 100644 index fc93e760b5..0000000000 --- a/src/mainboard/via/epia-n/irq_links.asl +++ /dev/null @@ -1,571 +0,0 @@ -/* - * Minimalist ACPI DSDT table for EPIA-N / NL - * Basic description of PCI Interrupt Assignments. - * This is expected to be included into _SB.PCI0 namespace - * (C) Copyright 2009 Jon Harrison - * - */ - - /* PCI PnP Routing Links */ - - /* Define how interrupt Link A is plumbed in */ - Device (LNKA) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x01) - /* Status - always return ready */ - Method (_STA, 0, NotSerialized) - { - /* See If Coreboot has allocated INTA# */ - And (PIRA, 0xF0, Local0) - If (LEqual (Local0, 0x00)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - - Method (_PRS, 0, NotSerialized) - { - Name (BUFA, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {3,4,6,7,10,11,12} - }) - Return (BUFA) - } - - Method (_CRS, 0, NotSerialized) - { - Name (BUFA, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, _Y07) - {} - }) - /* Read the Binary Encoded Field and Map this */ - /* onto the bitwise _INT field in the IRQ descriptor */ - /* See ACPI Spec for detail of _IRQ Descriptor */ - CreateByteField (BUFA, \_SB.PCI0.LNKA._CRS._Y07._INT, IRA1) - CreateByteField (BUFA, 0x02, IRA2) - Store (0x00, Local3) - Store (0x00, Local4) - And (PIRA, 0xF0, Local1) - ShiftRight (Local1, 0x04, Local1) - If (LNotEqual (Local1, 0x00)) - { - If (LGreater (Local1, 0x07)) - { - Subtract (Local1, 0x08, Local2) - ShiftLeft (One, Local2, Local4) - } - Else - { - If (LGreater (Local1, 0x00)) - { - ShiftLeft (One, Local1, Local3) - } - } - - Store (Local3, IRA1) - Store (Local4, IRA2) - } - Return (BUFA) - } - - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized) {} - /* Disable - Set PnP Routing Reg to 0 */ - Method (_DIS, 0, NotSerialized ) - { - And (PIRA, 0x0F, PIRA) - } - } // End of LNKA - - Device (LNKB) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x02) - Method (_STA, 0, NotSerialized) - { - /* See If Coreboot has allocated INTB# */ - And (PIBC, 0x0F, Local0) - If (LEqual (Local0, 0x00)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - - Method (_PRS, 0, NotSerialized) - { - Name (BUFB, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {3,4,6,7,10,11,12} - }) - Return (BUFB) - } - - Method (_CRS, 0, NotSerialized) - { - Name (BUFB, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, _Y08) - {} - }) - /* Read the Binary Encoded Field and Map this */ - /* onto the bitwise _INT field in the IRQ descriptor */ - /* See ACPI Spec for detail of _IRQ Descriptor */ - CreateByteField (BUFB, \_SB.PCI0.LNKB._CRS._Y08._INT, IRB1) - CreateByteField (BUFB, 0x02, IRB2) - Store (0x00, Local3) - Store (0x00, Local4) - And (PIBC, 0x0F, Local1) - If (LNotEqual (Local1, 0x00)) - { - If (LGreater (Local1, 0x07)) - { - Subtract (Local1, 0x08, Local2) - ShiftLeft (One, Local2, Local4) - } - Else - { - If (LGreater (Local1, 0x00)) - { - ShiftLeft (One, Local1, Local3) - } - } - - Store (Local3, IRB1) - Store (Local4, IRB2) - } - Return (BUFB) - } - - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized) {} - /* Disable - Set PnP Routing Reg to 0 */ - Method (_DIS, 0, NotSerialized ) - { - And (PIBC, 0xF0, PIBC) - } - - } // End of LNKB - - Device (LNKC) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x03) - Method (_STA, 0, NotSerialized) - { - /* See If Coreboot has allocated INTC# */ - And (PIBC, 0xF0, Local0) - If (LEqual (Local0, 0x00)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - - Method (_PRS, 0, NotSerialized) - { - Name (BUFC, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {3,4,6,7,10,11,12} - }) - Return (BUFC) - } - - Method (_CRS, 0, NotSerialized) - { - Name (BUFC, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, _Y09) - {} - }) - /* Read the Binary Encoded Field and Map this */ - /* onto the bitwise _INT field in the IRQ descriptor */ - /* See ACPI Spec for detail of _IRQ Descriptor */ - CreateByteField (BUFC, \_SB.PCI0.LNKC._CRS._Y09._INT, IRC1) - CreateByteField (BUFC, 0x02, IRC2) - Store (0x00, Local3) - Store (0x00, Local4) - And (PIBC, 0xF0, Local1) - ShiftRight (Local1, 0x04, Local1) - If (LNotEqual (Local1, 0x00)) - { - If (LGreater (Local1, 0x07)) - { - Subtract (Local1, 0x08, Local2) - ShiftLeft (One, Local2, Local4) - } - Else - { - If (LGreater (Local1, 0x00)) - { - ShiftLeft (One, Local1, Local3) - } - } - - Store (Local3, IRC1) - Store (Local4, IRC2) - } - Return (BUFC) - } - - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized) {} - /* Disable - Set PnP Routing Reg to 0 */ - Method (_DIS, 0, NotSerialized ) - { - And (PIBC, 0x0F, PIBC) - } - -} // End of LNKC - -Device (LNKD) -{ - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x04) - Method (_STA, 0, NotSerialized) - { - /* See If Coreboot has allocated INTD# */ - And (PIRD, 0xF0, Local0) - If (LEqual (Local0, 0x00)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - - Method (_PRS, 0, NotSerialized) - { - Name (BUFD, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, ) - {3,4,6,7,10,11,12} - }) - Return (BUFD) - } - - Method (_CRS, 0, NotSerialized) - { - Name (BUFD, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared, _Y0A) - {} - }) - /* Read the Binary Encoded Field and Map this */ - /* onto the bitwise _INT field in the IRQ descriptor */ - /* See ACPI Spec for detail of _IRQ Descriptor */ - CreateByteField (BUFD, \_SB.PCI0.LNKD._CRS._Y0A._INT, IRD1) - CreateByteField (BUFD, 0x02, IRD2) - Store (0x00, Local3) - Store (0x00, Local4) - And (PIRD, 0xF0, Local1) - ShiftRight (Local1, 0x04, Local1) - If (LNotEqual (Local1, 0x00)) - { - If (LGreater (Local1, 0x07)) - { - Subtract (Local1, 0x08, Local2) - ShiftLeft (One, Local2, Local4) - } - Else - { - If (LGreater (Local1, 0x00)) - { - ShiftLeft (One, Local1, Local3) - } - } - - Store (Local3, IRD1) - Store (Local4, IRD2) - } - Return (BUFD) - } - - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized) {} - /* Disable - Set PnP Routing Reg to 0 */ - Method (_DIS, 0, NotSerialized ) - { - And (PIRD, 0x0F, PIRD) - } - -} // End of LNKD - - -/* APIC IRQ Links */ - -Device (ATAI) -{ - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x05) - Method (_STA, 0, NotSerialized) - { - /* ATFL == 0x02 if SATA Enabled */ - If (LNotEqual (ATFL, 0x02)) - { - /* Double Check By Reading SATA VID */ - /* Otherwise Compatibility Mode */ - If (LNotEqual (\_SB.PCI0.SATA.VID, 0x1106)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - Else - { - /* Serial ATA Enabled Check if PATA is in */ - /* Compatibility Mode */ - If (LEqual (\_SB.PCI0.PATA.ENAT, 0x0A)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - } - - Method (_PRS, 0, NotSerialized) - { - Name (ATAN, ResourceTemplate () - { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, ) - { - 0x00000014, - } - }) - Return (ATAN) - } - - Method (_CRS, 0, NotSerialized) - { - Name (ATAB, ResourceTemplate () - { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, _Y10) - { - 0x00000000, - } - }) - CreateByteField (ATAB, \_SB.PCI0.ATAI._CRS._Y10._INT, IRAI) - Store (0x14, IRAI) - Return (ATAB) - - } - - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized) {} - /* Disable - dummy function to keep Linux ACPI happy */ - Method (_DIS, 0, NotSerialized ) {} - -} // End of ATA Interface Link - - -Device (USBI) -{ - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x0A) - Method (_STA, 0, NotSerialized) - { - /* Check that at least one of the USB */ - /* functions is enabled */ - And (IDEB, 0x37, Local0) - If (LEqual (Local0, 0x37)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - - Method (_PRS, 0, NotSerialized) - { - Name (USBB, ResourceTemplate () - { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, ) - { - 0x00000015, - } - }) - - Return(USBB) - } - - Method (_CRS, 0, NotSerialized) - { - Name (USBB, ResourceTemplate () - { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, _Y12) - { - 0x00000000, - } - }) - CreateByteField (USBB, \_SB.PCI0.USBI._CRS._Y12._INT, IRBI) - Store (0x15, IRBI) - Return (USBB) - } - - - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized) {} - /* Disable - dummy function to keep Linux ACPI happy */ - Method (_DIS, 0, NotSerialized ) {} -} - -Device (VT8I) -{ - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x0B) - Method (_STA, 0, NotSerialized) - { - /* Check Whether Sound and/or Modem are Activated */ - If (LEqual (EAMC, 0x03)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - - Method (_PRS, 0, NotSerialized) - { - Name (A97C, ResourceTemplate () - { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, ) - { - 0x00000016, - } - }) - Return (A97C) - } - - Method (_CRS, 0, NotSerialized) - { - Name (A97B, ResourceTemplate () - { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, _Y14) - { - 0x00000000, - } - }) - CreateByteField (A97B, \_SB.PCI0.VT8I._CRS._Y14._INT, IRCI) - Store (0x16, IRCI) - Return (A97B) - } - - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized) {} - /* Disable - dummy function to keep Linux ACPI happy */ - Method (_DIS, 0, NotSerialized ) {} - -} - - -Device (NICI) -{ - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x0C) - Method (_STA, 0, NotSerialized) - { - /* Check if LAN Function is Enabled */ - /* Note that LAN Enable Polarity is different */ - /* from other functions in VT8237R !? */ - If (LEqual (ELAN, 0x00)) - { - Return (0x09) - } - Else - { - Return (0x0B) - } - } - - Method (_PRS, 0, NotSerialized) - { - Name (NICB, ResourceTemplate () - { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, ) - { - 0x00000017, - } - }) - Return (NICB) - } - - Method (_CRS, 0, NotSerialized) - { - Name (NICD, ResourceTemplate () - { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, _Y16) - { - 0x00000000, - } - }) - CreateByteField (NICD, \_SB.PCI0.NICI._CRS._Y16._INT, IRDI) - Store (0x17, IRDI) - Return (NICD) - } - - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized) {} - /* Disable - dummy function to keep Linux ACPI happy */ - Method (_DIS, 0, NotSerialized ) {} - - -} diff --git a/src/mainboard/via/epia-n/pata_methods.asl b/src/mainboard/via/epia-n/pata_methods.asl deleted file mode 100644 index 68d505868e..0000000000 --- a/src/mainboard/via/epia-n/pata_methods.asl +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Minimalist ACPI DSDT table for EPIA-N / NL - * Basic description of some hardware resources to allow - * interrupt assignments to be done. This is expected to be included - * into the PATA Device definition in ab_physical.asl - * (C) Copyright 2009 Jon Harrison - * - */ - -Name (TIM0, Package (0x07) -{ - Package (0x05) - { - 0x78, 0xB4, 0xF0, 0x017F, 0x0258 - }, - - Package (0x05) - { - 0x20, 0x22, 0x33, 0x47, 0x5D - }, - - Package (0x05) - { - 0x04, 0x03, 0x02, 0x01, 0x00 - }, - - Package (0x04) - { - 0x02, 0x01, 0x00, 0x00 - }, - - Package (0x07) - { - 0x78, 0x50, 0x3C, 0x2D, 0x1E, 0x14, 0x0F - }, - - Package (0x0F) - { - 0x06, 0x05, 0x04, 0x04, 0x03, 0x03, 0x02, 0x02, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,0x00 - }, - - Package (0x07) - { - 0x0E, 0x08, 0x06, 0x04, 0x02, 0x01, 0x00 - } -}) - - -/* This method sets up the PATA Timing Control*/ -/* Note that a lot of this is done in the */ -/* Coreboot VT8237R Init code, but this is */ -/* already getting very cluttered with board */ -/* specific code. Using ACPI will allow this */ -/* to be de-cluttered a bit (so long as we're */ -/* running a ACPI Capable OS !!!) */ - -Method (PMEX, 0, Serialized) -{ - If (REGF) - { - /* Check if these regs are still at defaults */ - /* Board specific timing improvement if not */ - /* Already changed */ - If (LEqual (PMPT, 0xA8)) - { - Store (0x5D, PMPT) - } - - If (LEqual (PSPT, 0xA8)) - { - Store (0x5D, PSPT) - } - - If (LEqual (SMPT, 0xA8)) - { - Store (0x5D, SMPT) - } - - If (LEqual (SSPT, 0xA8)) - { - Store (0x5D, SSPT) - } - - } -} - -/* This Method Provides the method that is used to */ -/* Reset ATA Drives to POST reset condition */ -Method (GTF, 4, Serialized) -{ - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF - }, Local1) - Store (Buffer (0x07) - { - 0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF - }, Local2) - CreateByteField (Local1, 0x01, MODE) - CreateByteField (Local2, 0x01, UMOD) - CreateByteField (Local1, 0x05, PCHA) - CreateByteField (Local2, 0x05, UCHA) - And (Arg0, 0x03, Local3) - If (LEqual (And (Local3, 0x01), 0x01)) - { - Store (0xB0, PCHA) - Store (0xB0, UCHA) - } - - If (Arg1) - { - Store (DerefOf (Index (DerefOf (Index (TIM0, 0x05)), Arg2)), - UMOD) - Or (UMOD, 0x40, UMOD) - } - Else - { - Store (Match (DerefOf (Index (TIM0, 0x01)), MEQ, Arg3, MTR, - 0x00, 0x00), Local0) - Or (0x20, DerefOf (Index (DerefOf (Index (TIM0, 0x03)), Local0 - )), UMOD) - } - - Store (Match (DerefOf (Index (TIM0, 0x01)), MEQ, Arg3, MTR, - 0x00, 0x00), Local0) - Or (0x08, DerefOf (Index (DerefOf (Index (TIM0, 0x02)), Local0 - )), MODE) - Concatenate (Local1, Local2, Local6) - Return (Local6) -} - diff --git a/src/mainboard/via/epia-n/pci_init.asl b/src/mainboard/via/epia-n/pci_init.asl deleted file mode 100644 index 3169a03d50..0000000000 --- a/src/mainboard/via/epia-n/pci_init.asl +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Minimalist ACPI DSDT table for EPIA-N / NL - * Basic description of PCI Interrupt Assignments. - * This is expected to be included into _SB.PCI0 namespace - * (C) Copyright 2009 Jon Harrison - * - */ - -/* This file provides a PCI Bus Initialisation Method that sets - * some flags for use in the interrupt link assignment - */ - -Method (\_SB.PCI0._INI, 0, NotSerialized) -{ - - /* Checking for ATA Interface Enabled */ - Store (0x00, ATFL) - If (LEqual (EIDE, 0x01)) - { - Store (0x02, ATFL) - } - Else - { - If (LNotEqual (\_SB.PCI0.PATA.VID, 0x1106)) - { - Store (0x01, ATFL) - } - } - -} diff --git a/src/mainboard/via/epia-n/sb_physical.asl b/src/mainboard/via/epia-n/sb_physical.asl deleted file mode 100644 index c59feb64f0..0000000000 --- a/src/mainboard/via/epia-n/sb_physical.asl +++ /dev/null @@ -1,548 +0,0 @@ -/* - * Minimalist ACPI DSDT table for EPIA-N / NL - * Basic description of some hardware resources to allow - * interrupt assignments to be done. This is expected to be included - * into _SB.PCI0 namespace - * (C) Copyright 2009 Jon Harrison - * - */ - - -/* Basic description of the VT8237R LPC Interface - * PCI Configuration Space - */ - -Device (VT8R) -{ - Name (_ADR, 0x00110000) - OperationRegion (USBC, PCI_Config, 0x50, 0x02) - Scope (\) - { - Field (\_SB.PCI0.VT8R.USBC, ByteAcc, NoLock, Preserve) - { - IDEB, 8 - } - } - - OperationRegion (VTSB, PCI_Config, 0x00, 0xE8) - Scope (\) - { - Field (\_SB.PCI0.VT8R.VTSB, ByteAcc, NoLock, Preserve) - { - Offset (0x02), - DEID, 16, - Offset (0x2C), - ID2C, 8, - ID2D, 8, - ID2E, 8, - ID2F, 8, - Offset (0x44), - PIRE, 4, - PIRF, 4, - PIRG, 4, - PIRH, 4, - POLE, 1, - POLF, 1, - POLG, 1, - POLH, 1, - ENR8, 1, - Offset (0x50), - ESB4, 1, - ESB3, 1, - ESB2, 1, - EIDE, 1, - EUSB, 1, - ESB1, 1, - EAMC, 2, - EKBC, 1, - KBCC, 1, - EPS2, 1, - ERTC, 1, - ELAN, 1, - , 2, - USBD, 1, - SIRQ, 8, - Offset (0x55), - PIRA, 8, - PIBC, 8, - PIRD, 8, - Offset (0x75), - BSAT, 1, - Offset (0x94), - PWC1, 2, - GPO1, 1, - GPO2, 1, - GPO3, 1, - PLLD, 1 - } - } -} - -/* Basic Description of Serial ATA Interface */ -Device (SATA) -{ - Name (_ADR, 0x000F0000) - Method (_STA, 0, NotSerialized) - { - If (LNotEqual (\_SB.PCI0.SATA.VID, 0x1106)) - { - Return (0x00) - } - Else - { - If (LEqual (\_SB.PCI0.SATA.CMDR, 0x00)) - { - Return (0x0D) - } - Else - { - Return (0x0F) - } - } - } - - OperationRegion (SAPR, PCI_Config, 0x00, 0xC2) - Field (SAPR, ByteAcc, NoLock, Preserve) - { - VID, 16, - Offset (0x04), - CMDR, 3, - Offset (0x3C), - IDEI, 8, - Offset (0x49), - , 6, - EPHY, 1 - } -} - -/* Basic Description of Parallel ATA Interface */ -/* An some initialisation of the interface */ -Device (PATA) -{ - Name (_ADR, 0x000F0001) - Name (REGF, 0x01) - Method (_STA, 0, NotSerialized) - { - If (LNotEqual (\_SB.PCI0.PATA.VID, 0x1106)) - { - Return (0x00) - } - Else - { - PMEX () - /* Check if the Interface is Enabled */ - If (LEqual (\_SB.PCI0.PATA.CMDR, 0x00)) - { - Return (0x0D) - } - Else - { - Return (0x0F) - } - } - } - - /* ACPI Spec says to check that regions are accessible */ - /* before trying to access them */ - Method (_REG, 2, NotSerialized) - { - /* Arg0 = Operating Region (0x02 == PCI_Config) */ - If (LEqual (Arg0, 0x02)) - { - /* Arg1 = Handler Connection Mode (0x01 == Connect) */ - Store (Arg1, REGF) - } - } - - Include("pata_methods.asl") - - - OperationRegion (PAPR, PCI_Config, 0x00, 0xC2) - Field (PAPR, ByteAcc, NoLock, Preserve) - { - VID, 16, - Offset (0x04), - CMDR, 3, - Offset (0x09), - ENAT, 4, - Offset (0x3C), - IDEI, 8, - Offset (0x40), - ESCH, 1, - EPCH, 1, - Offset (0x48), - SSPT, 8, - SMPT, 8, - PSPT, 8, - PMPT, 8, - Offset (0x50), - SSUT, 4, - SSCT, 1, - SSUE, 3, - SMUT, 4, - SMCT, 1, - SMUE, 3, - PSUT, 4, - PSCT, 1, - PSUE, 3, - PMUT, 4, - PMCT, 1, - PMUE, 3 - } - - - Device (CHN0) - { - Name (_ADR, 0x00) - Method (_STA, 0, NotSerialized) - { - If (LNotEqual (\_SB.PCI0.PATA.EPCH, 0x01)) - { - Return (0x00) - } - Else - { - Return (0x0F) - } - } - - Device (DRV0) - { - Name (_ADR, 0x00) - Method (_GTF, 0, NotSerialized) - { - Return (GTF (0x00, PMUE, PMUT, PMPT)) - } - } - - Device (DRV1) - { - Name (_ADR, 0x01) - Method (_GTF, 0, NotSerialized) - { - Return (GTF (0x01, PSUE, PSUT, PSPT)) - } - } - } - - Device (CHN1) - { - Name (_ADR, 0x01) - Method (_STA, 0, NotSerialized) - { - If (LNotEqual (ATFL, 0x02)) - { - If (LEqual (\_SB.PCI0.SATA.EPHY, 0x01)) - { - Return (0x00) - } - Else - { - If (LNotEqual (\_SB.PCI0.PATA.ESCH, 0x01)) - { - Return (0x00) - } - Else - { - Return (0x0F) - } - } - } - Else - { - If (LEqual (ATFL, 0x02)) - { - If (LNotEqual (\_SB.PCI0.PATA.ESCH, 0x01)) - { - Return (0x00) - } - Else - { - Return (0x0F) - } - } - Else - { - Return(0x00) - } - } - } - - Device (DRV0) - { - Name (_ADR, 0x00) - Method (_GTF, 0, NotSerialized) - { - Return (GTF (0x02, SMUE, SMUT, SMPT)) - } - } - - Device (DRV1) - { - Name (_ADR, 0x01) - Method (_GTF, 0, NotSerialized) - { - Return (GTF (0x03, SSUE, SSUT, SSPT)) - } - } - } -} // End of PATA Device - - -/* Implement Basic USB Presence detect and */ -/* Power Management Event mask */ -Device (USB0) -{ - Name (_ADR, 0x00100000) - Name (_PRW, Package (0x02) - { - 0x0E, - 0x03 - }) - - OperationRegion (U2F0, PCI_Config, 0x00, 0xC2) - Field (U2F0, ByteAcc, NoLock, Preserve) - { - VID, 16, - Offset (0x04), - CMDR, 3, - Offset (0x3C), - U0IR, 4, - Offset (0x84), - ECDX, 2 - } - - Method (_STA, 0, NotSerialized) - { - If (LNotEqual (\_SB.PCI0.USB0.VID, 0x1106)) - { - Return (0x00) - } - Else - { - If (LEqual (\_SB.PCI0.USB0.CMDR, 0x00)) - { - Return (0x0D) - } - Else - { - Return (0x0F) - } - } - } -} - -Device (USB1) -{ - Name (_ADR, 0x00100001) - Name (_PRW, Package (0x02) - { - 0x0E, - 0x03 - }) - - OperationRegion (U2F1, PCI_Config, 0x00, 0xC2) - Field (U2F1, ByteAcc, NoLock, Preserve) - { - VID, 16, - Offset (0x04), - CMDR, 3, - Offset (0x3C), - U1IR, 4, - Offset (0x84), - ECDX, 2 - } - - Method (_STA, 0, NotSerialized) - { - If (LNotEqual (\_SB.PCI0.USB1.VID, 0x1106)) - { - Return (0x00) - } - Else - { - If (LEqual (\_SB.PCI0.USB1.CMDR, 0x00)) - { - Return (0x0D) - } - Else - { - Return (0x0F) - } - } - } -} - -Device (USB2) -{ - Name (_ADR, 0x00100002) - Name (_PRW, Package (0x02) - { - 0x0E, - 0x03 - }) - - OperationRegion (U2F2, PCI_Config, 0x00, 0xC2) - Field (U2F2, ByteAcc, NoLock, Preserve) - { - VID, 16, - Offset (0x04), - CMDR, 3, - Offset (0x3C), - U2IR, 4, - Offset (0x84), - ECDX, 2 - } - - Method (_STA, 0, NotSerialized) - { - If (LNotEqual (\_SB.PCI0.USB2.VID, 0x1106)) - { - Return (0x00) - } - Else - { - If (LEqual (\_SB.PCI0.USB2.CMDR, 0x00)) - { - Return (0x0D) - } - Else - { - Return (0x0F) - } - } - } -} - -Device (USB3) -{ - Name (_ADR, 0x00100003) - Name (_PRW, Package (0x02) - { - 0x0E, - 0x03 - }) - - OperationRegion (U2F3, PCI_Config, 0x00, 0xC2) - Field (U2F3, ByteAcc, NoLock, Preserve) - { - VID, 16, - Offset (0x04), - CMDR, 3, - Offset (0x3C), - U3IR, 4, - Offset (0x84), - ECDX, 2 - } - - Method (_STA, 0, NotSerialized) - { - If (LNotEqual (\_SB.PCI0.USB3.VID, 0x1106)) - { - Return (0x00) - } - Else - { - If (LEqual (\_SB.PCI0.USB3.CMDR, 0x00)) - { - Return (0x0D) - } - Else - { - Return (0x0F) - } - } - } -} - -Device (USB4) -{ - Name (_ADR, 0x00100004) - Name (_PRW, Package (0x02) - { - 0x0E, - 0x03 - }) - - OperationRegion (U2F4, PCI_Config, 0x00, 0xC2) - Field (U2F4, ByteAcc, NoLock, Preserve) - { - VID, 16, - Offset (0x04), - CMDR, 3, - Offset (0x3C), - U4IR, 4, - Offset (0x84), - ECDX, 2 - } - - Method (_STA, 0, NotSerialized) - { - If (LNotEqual (\_SB.PCI0.USB4.VID, 0x1106)) - { - Return (0x00) - } - Else - { - If (LEqual (\_SB.PCI0.USB4.CMDR, 0x00)) - { - Return (0x0D) - } - Else - { - Return (0x0F) - } - } - } -} - -/* Basic Definition of Ethernet Interface */ -Device (NIC0) -{ - Name (_ADR, 0x00120000) - Name (_PRW, Package (0x02) - { - 0x03, - 0x05 - }) - - OperationRegion (NIC0, PCI_Config, 0x00, 0xC2) - Field (NIC0, ByteAcc, NoLock, Preserve) - { - VID, 16, - Offset (0x04), - CMDR, 3, - Offset (0x3C), - NIIR, 4, - } - - Method (_STA, 0, NotSerialized) - { - If (LNotEqual (\_SB.PCI0.NIC0.VID, 0x1106)) - { - Return (0x00) - } - Else - { - If (LEqual (\_SB.PCI0.NIC0.CMDR, 0x00)) - { - Return (0x0D) - } - Else - { - Return (0x0F) - } - } - } -} - -/* Very Basic Definition of Sound Controller */ -Device (AC97) -{ - Name (_ADR, 0x00110005) - Name (_PRW, Package (0x02) - { - 0x0D, - 0x05 - }) -} diff --git a/src/mainboard/via/epia/Makefile.inc b/src/mainboard/via/epia/Makefile.inc index 4be56312fd..336cad6342 100644 --- a/src/mainboard/via/epia/Makefile.inc +++ b/src/mainboard/via/epia/Makefile.inc @@ -39,13 +39,6 @@ crt0s += $(src)/cpu/x86/mmx_disable.inc ifdef POST_EVALUATION -$(obj)/mainboard/$(MAINBOARDDIR)/dsdt.o: $(obj)/dsdt.c - $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c $< -o $@ - -$(obj)/dsdt.c: $(src)/mainboard/$(MAINBOARDDIR)/dsdt.asl - iasl -p dsdt -tc $(src)/mainboard/$(MAINBOARDDIR)/dsdt.asl - mv dsdt.hex $@ - $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(obj)/option_table.h $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c -S $(src)/mainboard/$(MAINBOARDDIR)/romstage.c -o $@ perl -e 's/\.rodata/.rom.data/g' -pi $@ diff --git a/src/mainboard/via/vt8454c/Makefile.inc b/src/mainboard/via/vt8454c/Makefile.inc index 8f321c2e4b..19b68fa861 100644 --- a/src/mainboard/via/vt8454c/Makefile.inc +++ b/src/mainboard/via/vt8454c/Makefile.inc @@ -42,13 +42,6 @@ ldscripts += $(src)/arch/i386/lib/failover.lds ifdef POST_EVALUATION -$(obj)/mainboard/$(MAINBOARDDIR)/dsdt.c: $(src)/mainboard/$(MAINBOARDDIR)/dsdt.dsl - iasl -p dsdt -tc $< - mv dsdt.hex $@ - -$(obj)/mainboard/$(MAINBOARDDIR)/dsdt.o: $(obj)/mainboard/$(MAINBOARDDIR)/dsdt.c - $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c $< -o $@ - $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(obj)/option_table.h $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c -S $(src)/mainboard/$(MAINBOARDDIR)/romstage.c -o $@ perl -e 's/\.rodata/.rom.data/g' -pi $@ diff --git a/src/mainboard/via/vt8454c/acpi/irq-p2p-bridge.asl b/src/mainboard/via/vt8454c/acpi/irq-p2p-bridge.asl new file mode 100644 index 0000000000..4a294bcbaa --- /dev/null +++ b/src/mainboard/via/vt8454c/acpi/irq-p2p-bridge.asl @@ -0,0 +1,88 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2007-2009 coresystems GmbH + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 of + * the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +Name (PICM, Package () { + // _ADR PIN SRC IDX + + Package () { 0x0003FFFF, 0x00, LNKA, 0x00 }, + Package () { 0x0003FFFF, 0x01, LNKB, 0x00 }, + Package () { 0x0003FFFF, 0x02, LNKC, 0x00 }, + Package () { 0x0003FFFF, 0x03, LNKD, 0x00 }, + + Package () { 0x0004FFFF, 0x00, LNKB, 0x00 }, + Package () { 0x0004FFFF, 0x01, LNKC, 0x00 }, + Package () { 0x0004FFFF, 0x02, LNKD, 0x00 }, + Package () { 0x0004FFFF, 0x03, LNKA, 0x00 }, + + Package () { 0x0005FFFF, 0x00, LNKC, 0x00 }, + Package () { 0x0005FFFF, 0x01, LNKD, 0x00 }, + Package () { 0x0005FFFF, 0x02, LNKA, 0x00 }, + Package () { 0x0005FFFF, 0x03, LNKB, 0x00 }, + + Package () { 0x0006FFFF, 0x00, LNKD, 0x00 }, + Package () { 0x0006FFFF, 0x01, LNKA, 0x00 }, + Package () { 0x0006FFFF, 0x02, LNKB, 0x00 }, + Package () { 0x0006FFFF, 0x03, LNKC, 0x00 }, + + Package () { 0x0007FFFF, 0x00, LNKA, 0x00 }, + Package () { 0x0007FFFF, 0x01, LNKB, 0x00 }, + Package () { 0x0007FFFF, 0x02, LNKC, 0x00 }, + Package () { 0x0007FFFF, 0x03, LNKD, 0x00 }, + + Package () { 0x0008FFFF, 0x00, LNKB, 0x00 }, + Package () { 0x0008FFFF, 0x01, LNKC, 0x00 }, + Package () { 0x0008FFFF, 0x02, LNKD, 0x00 }, + Package () { 0x0008FFFF, 0x03, LNKA, 0x00 }, +}) + +Name (APIC, Package () { + Package () { 0x0003FFFF, 0x00, 0x00, 0x10 }, + Package () { 0x0003FFFF, 0x01, 0x00, 0x11 }, + Package () { 0x0003FFFF, 0x02, 0x00, 0x12 }, + Package () { 0x0003FFFF, 0x03, 0x00, 0x13 }, + + Package () { 0x0004FFFF, 0x00, 0x00, 0x11 }, + Package () { 0x0004FFFF, 0x01, 0x00, 0x12 }, + Package () { 0x0004FFFF, 0x02, 0x00, 0x13 }, + Package () { 0x0004FFFF, 0x03, 0x00, 0x10 }, + + Package () { 0x0005FFFF, 0x00, 0x00, 0x12 }, + Package () { 0x0005FFFF, 0x01, 0x00, 0x13 }, + Package () { 0x0005FFFF, 0x02, 0x00, 0x10 }, + Package () { 0x0005FFFF, 0x03, 0x00, 0x11 }, + + Package () { 0x0006FFFF, 0x00, 0x00, 0x13 }, + Package () { 0x0006FFFF, 0x01, 0x00, 0x10 }, + Package () { 0x0006FFFF, 0x02, 0x00, 0x11 }, + Package () { 0x0006FFFF, 0x03, 0x00, 0x12 }, + + Package () { 0x0007FFFF, 0x00, 0x00, 0x10 }, + Package () { 0x0007FFFF, 0x01, 0x00, 0x11 }, + Package () { 0x0007FFFF, 0x02, 0x00, 0x12 }, + Package () { 0x0007FFFF, 0x03, 0x00, 0x13 }, + + Package () { 0x0008FFFF, 0x00, 0x00, 0x11 }, + Package () { 0x0008FFFF, 0x01, 0x00, 0x12 }, + Package () { 0x0008FFFF, 0x02, 0x00, 0x13 }, + Package () { 0x0008FFFF, 0x03, 0x00, 0x10 }, +}) + + diff --git a/src/mainboard/via/vt8454c/acpi/irq.asl b/src/mainboard/via/vt8454c/acpi/irq.asl new file mode 100644 index 0000000000..63e64e61c0 --- /dev/null +++ b/src/mainboard/via/vt8454c/acpi/irq.asl @@ -0,0 +1,143 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2007-2009 coresystems GmbH + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 of + * the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +Name (PICM, Package () { + // _ADR PIN SRC IDX + + Package () { 0x0001FFFF, 0x00, LNKA, 0x00 }, + Package () { 0x0001FFFF, 0x01, LNKB, 0x00 }, + Package () { 0x0001FFFF, 0x02, LNKC, 0x00 }, + Package () { 0x0001FFFF, 0x03, LNKD, 0x00 }, + + Package () { 0x0008FFFF, 0x00, LNKB, 0x00 }, + Package () { 0x0008FFFF, 0x01, LNKC, 0x00 }, + Package () { 0x0008FFFF, 0x02, LNKD, 0x00 }, + Package () { 0x0008FFFF, 0x03, LNKA, 0x00 }, + + Package () { 0x0009FFFF, 0x00, LNKC, 0x00 }, + Package () { 0x0009FFFF, 0x01, LNKD, 0x00 }, + Package () { 0x0009FFFF, 0x02, LNKA, 0x00 }, + Package () { 0x0009FFFF, 0x03, LNKB, 0x00 }, + + Package () { 0x000AFFFF, 0x00, LNKD, 0x00 }, + Package () { 0x000AFFFF, 0x01, LNKA, 0x00 }, + Package () { 0x000AFFFF, 0x02, LNKB, 0x00 }, + Package () { 0x000AFFFF, 0x03, LNKC, 0x00 }, + + Package () { 0x000BFFFF, 0x00, LNKD, 0x00 }, + Package () { 0x000BFFFF, 0x01, LNKA, 0x00 }, + Package () { 0x000BFFFF, 0x02, LNKB, 0x00 }, + Package () { 0x000BFFFF, 0x03, LNKC, 0x00 }, + + Package () { 0x000CFFFF, 0x00, LNKA, 0x00 }, + Package () { 0x000CFFFF, 0x01, LNKB, 0x00 }, + Package () { 0x000CFFFF, 0x02, LNKC, 0x00 }, + Package () { 0x000CFFFF, 0x03, LNKD, 0x00 }, + + Package () { 0x000DFFFF, 0x00, LNKA, 0x00 }, + Package () { 0x000DFFFF, 0x01, LNKB, 0x00 }, + Package () { 0x000DFFFF, 0x02, LNKC, 0x00 }, + Package () { 0x000DFFFF, 0x03, LNKD, 0x00 }, + + Package () { 0x000FFFFF, 0x00, LNKA, 0x00 }, + Package () { 0x000FFFFF, 0x01, LNKB, 0x00 }, + Package () { 0x000FFFFF, 0x02, LNKC, 0x00 }, + Package () { 0x000FFFFF, 0x03, LNKD, 0x00 }, + + /* USB controller */ + Package () { 0x0010FFFF, 0x00, LNKA, 0x00 }, + Package () { 0x0010FFFF, 0x01, LNKB, 0x00 }, + Package () { 0x0010FFFF, 0x02, LNKC, 0x00 }, + Package () { 0x0010FFFF, 0x03, LNKD, 0x00 }, + + Package () { 0x0011FFFF, 0x00, LNKA, 0x00 }, + Package () { 0x0011FFFF, 0x01, LNKB, 0x00 }, + Package () { 0x0011FFFF, 0x02, LNKC, 0x00 }, + Package () { 0x0011FFFF, 0x03, LNKD, 0x00 }, + + Package () { 0x0012FFFF, 0x00, LNKA, 0x00 }, + Package () { 0x0012FFFF, 0x01, LNKB, 0x00 }, + Package () { 0x0012FFFF, 0x02, LNKC, 0x00 }, + Package () { 0x0012FFFF, 0x03, LNKD, 0x00 } +}) + +Name (APIC, Package () { + Package () { 0x0001FFFF, 0x00, 0x00, 0x10 }, + Package () { 0x0001FFFF, 0x01, 0x00, 0x11 }, + Package () { 0x0001FFFF, 0x02, 0x00, 0x12 }, + Package () { 0x0001FFFF, 0x03, 0x00, 0x13 }, + + Package () { 0x0008FFFF, 0x00, 0x00, 0x11 }, + Package () { 0x0008FFFF, 0x01, 0x00, 0x12 }, + Package () { 0x0008FFFF, 0x02, 0x00, 0x13 }, + Package () { 0x0008FFFF, 0x03, 0x00, 0x10 }, + + Package () { 0x0009FFFF, 0x00, 0x00, 0x12 }, + Package () { 0x0009FFFF, 0x01, 0x00, 0x13 }, + Package () { 0x0009FFFF, 0x02, 0x00, 0x10 }, + Package () { 0x0009FFFF, 0x03, 0x00, 0x11 }, + + Package () { 0x000AFFFF, 0x00, 0x00, 0x13 }, + Package () { 0x000AFFFF, 0x01, 0x00, 0x10 }, + Package () { 0x000AFFFF, 0x02, 0x00, 0x11 }, + Package () { 0x000AFFFF, 0x03, 0x00, 0x12 }, + + Package () { 0x000BFFFF, 0x00, 0x00, 0x13 }, + Package () { 0x000BFFFF, 0x01, 0x00, 0x10 }, + Package () { 0x000BFFFF, 0x02, 0x00, 0x11 }, + Package () { 0x000BFFFF, 0x03, 0x00, 0x12 }, + + Package () { 0x000CFFFF, 0x00, 0x00, 0x10 }, + Package () { 0x000CFFFF, 0x01, 0x00, 0x11 }, + Package () { 0x000CFFFF, 0x02, 0x00, 0x12 }, + Package () { 0x000CFFFF, 0x03, 0x00, 0x13 }, + + Package () { 0x000DFFFF, 0x00, 0x00, 0x10 }, + Package () { 0x000DFFFF, 0x01, 0x00, 0x11 }, + Package () { 0x000DFFFF, 0x02, 0x00, 0x12 }, + Package () { 0x000DFFFF, 0x03, 0x00, 0x13 }, + + Package () { 0x000FFFFF, 0x00, LNKA, 0x00 }, + Package () { 0x000FFFFF, 0x01, LNKA, 0x00 }, + Package () { 0x000FFFFF, 0x02, LNKA, 0x00 }, + Package () { 0x000FFFFF, 0x03, LNKA, 0x00 }, + + /* USB controller. Hardwired in internal + APIC mode, see PM pg. 137, + "miscellaneous controls", footnote to + "IDE interrupt select" */ + Package () { 0x0010FFFF, 0x00, 0x00, 0x14 }, + Package () { 0x0010FFFF, 0x01, 0x00, 0x16 }, + Package () { 0x0010FFFF, 0x02, 0x00, 0x15 }, + Package () { 0x0010FFFF, 0x03, 0x00, 0x17 }, + + Package () { 0x0011FFFF, 0x00, LNKA, 0x00 }, + Package () { 0x0011FFFF, 0x01, LNKB, 0x00 }, + Package () { 0x0011FFFF, 0x02, LNKC, 0x00 }, + Package () { 0x0011FFFF, 0x03, LNKD, 0x00 }, + + Package () { 0x0012FFFF, 0x00, LNKD, 0x00 }, + Package () { 0x0012FFFF, 0x01, LNKD, 0x00 }, + Package () { 0x0012FFFF, 0x02, LNKD, 0x00 }, + Package () { 0x0012FFFF, 0x03, LNKD, 0x00 }, +}) + + diff --git a/src/mainboard/via/vt8454c/dsdt.asl b/src/mainboard/via/vt8454c/dsdt.asl new file mode 100644 index 0000000000..ada6c95690 --- /dev/null +++ b/src/mainboard/via/vt8454c/dsdt.asl @@ -0,0 +1,341 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2004 Nick Barker + * Copyright (C) 2007-2009 coresystems GmbH + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 of + * the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +DefinitionBlock ("dsdt.aml", "DSDT", 1, "CX700 ", "COREBOOT", 0x00000001) +{ + /* + * Define the main processor + */ + Scope (\_PR) + { + Processor (\_PR.CPU0, 0x00, 0x00000410, 0x06) {} + } + + /* For now only define 2 power states: + * - S0 which is fully on + * - S5 which is soft off + * any others would involve declaring the wake up methods + */ + Name (\_S0, Package () {0x00, 0x00, 0x00, 0x00 }) + Name (\_S5, Package () {0x02, 0x02, 0x00, 0x00 }) + + Scope (\) { + Name (PICF , 0) // Global flag indicating whether to use PIC or APIC mode + Method ( _PIC,1) // The OS is calling this + { + Store( Arg0 , PICF) + } + } // end of \ scope + + /* Root of the bus hierarchy */ + Scope (\_SB) + { + /* Define how interrupt Link A is plumbed in */ + Device (LNKA) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x01) + + /* Status - always return ready */ + Method (_STA, 0, NotSerialized) + { + Return (0x0B) + } + + /* Current Resources - return irq set up in BIOS */ + Method (_CRS, 0, NotSerialized) + { + Name (CRSP, ResourceTemplate () { + IRQ (Level, ActiveLow, Shared) {11} + }) + Name (CRSA, ResourceTemplate () { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {16} + }) + + If (LNot (PICF)) { + Return (CRSP) + } Else { + Return (CRSA) + } + } + /* Possible Resources - return the range of irqs + * we are using for PCI - only here to keep Linux ACPI + * happy + */ + Method (_PRS, 0, NotSerialized) + { + Name (PRSP, ResourceTemplate () { + IRQ (Level, ActiveLow, Shared) {3,4,6,7,10,11,12} + }) + Name (PRSA, ResourceTemplate () { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {16,17,18,19,20,21,22,23} + }) + + If (LNot (PICF)) { + Return (PRSP) + } Else { + Return (PRSA) + } + + } + /* Set Resources - dummy function to keep Linux ACPI happy + * Linux is more than happy not to tinker with irq + * assignments as long as the CRS and STA functions + * return good values + */ + Method (_SRS, 1, NotSerialized ) {} + /* Disable - dummy function to keep Linux ACPI happy */ + Method (_DIS, 0, NotSerialized ) {} + + } // End of LNKA + + /* Define how interrupt Link B is plumbed in */ + Device (LNKB) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x02) + + /* Status - always return ready */ + Method (_STA, 0, NotSerialized) + { + Return (0x0B) + } + + /* Current Resources - return irq set up in BIOS */ + Method (_CRS, 0, NotSerialized) + { + Name (CRSP, ResourceTemplate () { + IRQ (Level, ActiveLow, Shared) {11} + }) + Name (CRSA, ResourceTemplate () { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {17} + }) + + If (LNot (PICF)) { + Return (CRSP) + } Else { + Return (CRSA) + } + } + /* Possible Resources - return the range of irqs + * we are using for PCI - only here to keep Linux ACPI + * happy + */ + Method (_PRS, 0, NotSerialized) + { + Name (PRSP, ResourceTemplate () { + IRQ (Level, ActiveLow, Shared) {3,4,6,7,10,11,12} + }) + Name (PRSA, ResourceTemplate () { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {16,17,18,19,20,21,22,23} + }) + + If (LNot (PICF)) { + Return (PRSP) + } Else { + Return (PRSA) + } + + } + + /* Set Resources - dummy function to keep Linux ACPI happy + * Linux is more than happy not to tinker with irq + * assignments as long as the CRS and STA functions + * return good values + */ + Method (_SRS, 1, NotSerialized ) {} + /* Disable - dummy function to keep Linux ACPI happy */ + Method (_DIS, 0, NotSerialized ) {} + + } // End of LNKB + + /* Define how interrupt Link C is plumbed in */ + Device (LNKC) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x03) + + /* Status - always return ready */ + Method (_STA, 0, NotSerialized) + { + Return (0x0B) + } + + /* Current Resources - return irq set up in BIOS */ + Method (_CRS, 0, NotSerialized) + { + Name (CRSP, ResourceTemplate () { + IRQ (Level, ActiveLow, Shared) {10} + }) + Name (CRSA, ResourceTemplate () { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {18} + }) + + If (LNot (PICF)) { + Return (CRSP) + } Else { + Return (CRSA) + } + } + /* Possible Resources - return the range of irqs + * we are using for PCI - only here to keep Linux ACPI + * happy + */ + Method (_PRS, 0, NotSerialized) + { + Name (PRSP, ResourceTemplate () { + IRQ (Level, ActiveLow, Shared) {3,4,6,7,10,11,12} + }) + Name (PRSA, ResourceTemplate () { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {16,17,18,19,20,21,22,23} + }) + + If (LNot (PICF)) { + Return (PRSP) + } Else { + Return (PRSA) + } + + } + + /* Set Resources - dummy function to keep Linux ACPI happy + * Linux is more than happy not to tinker with irq + * assignments as long as the CRS and STA functions + * return good values + */ + Method (_SRS, 1, NotSerialized ) {} + /* Disable - dummy function to keep Linux ACPI happy */ + Method (_DIS, 0, NotSerialized ) {} + + } // End of LNKC + + /* Define how interrupt Link D is plumbed in */ + Device (LNKD) + { + Name (_HID, EisaId ("PNP0C0F")) + Name (_UID, 0x04) + + /* Status - always return ready */ + Method (_STA, 0, NotSerialized) + { + Return (0x0B) + } + + /* Current Resources - return irq set up in BIOS */ + Method (_CRS, 0, NotSerialized) + { + Name (CRSP, ResourceTemplate () { + IRQ (Level, ActiveLow, Shared) {10} + }) + Name (CRSA, ResourceTemplate () { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {19} + }) + + If (LNot (PICF)) { + Return (CRSP) + } Else { + Return (CRSA) + } + } + /* Possible Resources - return the range of irqs + * we are using for PCI - only here to keep Linux ACPI + * happy + */ + Method (_PRS, 0, NotSerialized) + { + Name (PRSP, ResourceTemplate () { + IRQ (Level, ActiveLow, Shared) {3,4,6,7,10,11,12} + }) + Name (PRSA, ResourceTemplate () { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {16,17,18,19,20,21,22,23} + }) + + If (LNot (PICF)) { + Return (PRSP) + } Else { + Return (PRSA) + } + + } + + /* Set Resources - dummy function to keep Linux ACPI happy + * Linux is more than happy not to tinker with irq + * assignments as long as the CRS and STA functions + * return good values + */ + Method (_SRS, 1, NotSerialized ) {} + /* Disable - dummy function to keep Linux ACPI happy */ + Method (_DIS, 0, NotSerialized ) {} + + } // End of LNKD + + /* PCI Root Bridge */ + Device (PCI0) + { + Name (_HID, EisaId ("PNP0A08")) + Name (_CID, EisaId ("PNP0A03")) + Name (_ADR, 0x00) + Name (_UID, 0x00) + Name (_BBN, 0x00) + + // Mainboard specific IRQ routing + #include "acpi/irq.asl" + + /* PCI Routing Table */ + Method (_PRT, 0, NotSerialized) + { + If (LNot (PICF)) + { + Return (PICM) + } + Else + { + Return (APIC) + } + } + + Device (P2PB) /* PCI to PCI bridge */ + { + Name (_ADR, 0x00130001) + + #include "acpi/irq-p2p-bridge.asl" + Method (_PRT, 0, NotSerialized) + { + If (LNot (PICF)) + { + Return (PICM) + } + Else + { + Return (APIC) + } + } + /* Status - always return ready */ + Method (_STA, 0, NotSerialized) + { + Return (0x0F) + } + } + } // End of PCI0 + } // End of _SB +} // End of Definition Block + diff --git a/src/mainboard/via/vt8454c/dsdt.dsl b/src/mainboard/via/vt8454c/dsdt.dsl deleted file mode 100644 index 150fbcf5f9..0000000000 --- a/src/mainboard/via/vt8454c/dsdt.dsl +++ /dev/null @@ -1,341 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2004 Nick Barker - * Copyright (C) 2007-2009 coresystems GmbH - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; version 2 of - * the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -DefinitionBlock ("dsdt.aml", "DSDT", 1, "CX700 ", "COREBOOT", 0x00000001) -{ - /* - * Define the main processor - */ - Scope (\_PR) - { - Processor (\_PR.CPU0, 0x00, 0x00000410, 0x06) {} - } - - /* For now only define 2 power states: - * - S0 which is fully on - * - S5 which is soft off - * any others would involve declaring the wake up methods - */ - Name (\_S0, Package () {0x00, 0x00, 0x00, 0x00 }) - Name (\_S5, Package () {0x02, 0x02, 0x00, 0x00 }) - - Scope (\) { - Name (PICF , 0) // Global flag indicating whether to use PIC or APIC mode - Method ( _PIC,1) // The OS is calling this - { - Store( Arg0 , PICF) - } - } // end of \ scope - - /* Root of the bus hierarchy */ - Scope (\_SB) - { - /* Define how interrupt Link A is plumbed in */ - Device (LNKA) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x01) - - /* Status - always return ready */ - Method (_STA, 0, NotSerialized) - { - Return (0x0B) - } - - /* Current Resources - return irq set up in BIOS */ - Method (_CRS, 0, NotSerialized) - { - Name (CRSP, ResourceTemplate () { - IRQ (Level, ActiveLow, Shared) {11} - }) - Name (CRSA, ResourceTemplate () { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {16} - }) - - If (LNot (PICF)) { - Return (CRSP) - } Else { - Return (CRSA) - } - } - /* Possible Resources - return the range of irqs - * we are using for PCI - only here to keep Linux ACPI - * happy - */ - Method (_PRS, 0, NotSerialized) - { - Name (PRSP, ResourceTemplate () { - IRQ (Level, ActiveLow, Shared) {3,4,6,7,10,11,12} - }) - Name (PRSA, ResourceTemplate () { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {16,17,18,19,20,21,22,23} - }) - - If (LNot (PICF)) { - Return (PRSP) - } Else { - Return (PRSA) - } - - } - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized ) {} - /* Disable - dummy function to keep Linux ACPI happy */ - Method (_DIS, 0, NotSerialized ) {} - - } // End of LNKA - - /* Define how interrupt Link B is plumbed in */ - Device (LNKB) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x02) - - /* Status - always return ready */ - Method (_STA, 0, NotSerialized) - { - Return (0x0B) - } - - /* Current Resources - return irq set up in BIOS */ - Method (_CRS, 0, NotSerialized) - { - Name (CRSP, ResourceTemplate () { - IRQ (Level, ActiveLow, Shared) {11} - }) - Name (CRSA, ResourceTemplate () { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {17} - }) - - If (LNot (PICF)) { - Return (CRSP) - } Else { - Return (CRSA) - } - } - /* Possible Resources - return the range of irqs - * we are using for PCI - only here to keep Linux ACPI - * happy - */ - Method (_PRS, 0, NotSerialized) - { - Name (PRSP, ResourceTemplate () { - IRQ (Level, ActiveLow, Shared) {3,4,6,7,10,11,12} - }) - Name (PRSA, ResourceTemplate () { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {16,17,18,19,20,21,22,23} - }) - - If (LNot (PICF)) { - Return (PRSP) - } Else { - Return (PRSA) - } - - } - - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized ) {} - /* Disable - dummy function to keep Linux ACPI happy */ - Method (_DIS, 0, NotSerialized ) {} - - } // End of LNKB - - /* Define how interrupt Link C is plumbed in */ - Device (LNKC) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x03) - - /* Status - always return ready */ - Method (_STA, 0, NotSerialized) - { - Return (0x0B) - } - - /* Current Resources - return irq set up in BIOS */ - Method (_CRS, 0, NotSerialized) - { - Name (CRSP, ResourceTemplate () { - IRQ (Level, ActiveLow, Shared) {10} - }) - Name (CRSA, ResourceTemplate () { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {18} - }) - - If (LNot (PICF)) { - Return (CRSP) - } Else { - Return (CRSA) - } - } - /* Possible Resources - return the range of irqs - * we are using for PCI - only here to keep Linux ACPI - * happy - */ - Method (_PRS, 0, NotSerialized) - { - Name (PRSP, ResourceTemplate () { - IRQ (Level, ActiveLow, Shared) {3,4,6,7,10,11,12} - }) - Name (PRSA, ResourceTemplate () { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {16,17,18,19,20,21,22,23} - }) - - If (LNot (PICF)) { - Return (PRSP) - } Else { - Return (PRSA) - } - - } - - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized ) {} - /* Disable - dummy function to keep Linux ACPI happy */ - Method (_DIS, 0, NotSerialized ) {} - - } // End of LNKC - - /* Define how interrupt Link D is plumbed in */ - Device (LNKD) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x04) - - /* Status - always return ready */ - Method (_STA, 0, NotSerialized) - { - Return (0x0B) - } - - /* Current Resources - return irq set up in BIOS */ - Method (_CRS, 0, NotSerialized) - { - Name (CRSP, ResourceTemplate () { - IRQ (Level, ActiveLow, Shared) {10} - }) - Name (CRSA, ResourceTemplate () { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {19} - }) - - If (LNot (PICF)) { - Return (CRSP) - } Else { - Return (CRSA) - } - } - /* Possible Resources - return the range of irqs - * we are using for PCI - only here to keep Linux ACPI - * happy - */ - Method (_PRS, 0, NotSerialized) - { - Name (PRSP, ResourceTemplate () { - IRQ (Level, ActiveLow, Shared) {3,4,6,7,10,11,12} - }) - Name (PRSA, ResourceTemplate () { - Interrupt (ResourceConsumer, Level, ActiveLow, Shared) {16,17,18,19,20,21,22,23} - }) - - If (LNot (PICF)) { - Return (PRSP) - } Else { - Return (PRSA) - } - - } - - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized ) {} - /* Disable - dummy function to keep Linux ACPI happy */ - Method (_DIS, 0, NotSerialized ) {} - - } // End of LNKD - - /* PCI Root Bridge */ - Device (PCI0) - { - Name (_HID, EisaId ("PNP0A08")) - Name (_CID, EisaId ("PNP0A03")) - Name (_ADR, 0x00) - Name (_UID, 0x00) - Name (_BBN, 0x00) - - // Mainboard specific IRQ routing - Include ("irq.dsl") - - /* PCI Routing Table */ - Method (_PRT, 0, NotSerialized) - { - If (LNot (PICF)) - { - Return (PICM) - } - Else - { - Return (APIC) - } - } - - Device (P2PB) /* PCI to PCI bridge */ - { - Name (_ADR, 0x00130001) - - Include ("irq-p2p-bridge.dsl") - Method (_PRT, 0, NotSerialized) - { - If (LNot (PICF)) - { - Return (PICM) - } - Else - { - Return (APIC) - } - } - /* Status - always return ready */ - Method (_STA, 0, NotSerialized) - { - Return (0x0F) - } - } - } // End of PCI0 - } // End of _SB -} // End of Definition Block - diff --git a/src/mainboard/via/vt8454c/irq-p2p-bridge.dsl b/src/mainboard/via/vt8454c/irq-p2p-bridge.dsl deleted file mode 100644 index 4a294bcbaa..0000000000 --- a/src/mainboard/via/vt8454c/irq-p2p-bridge.dsl +++ /dev/null @@ -1,88 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2007-2009 coresystems GmbH - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; version 2 of - * the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -Name (PICM, Package () { - // _ADR PIN SRC IDX - - Package () { 0x0003FFFF, 0x00, LNKA, 0x00 }, - Package () { 0x0003FFFF, 0x01, LNKB, 0x00 }, - Package () { 0x0003FFFF, 0x02, LNKC, 0x00 }, - Package () { 0x0003FFFF, 0x03, LNKD, 0x00 }, - - Package () { 0x0004FFFF, 0x00, LNKB, 0x00 }, - Package () { 0x0004FFFF, 0x01, LNKC, 0x00 }, - Package () { 0x0004FFFF, 0x02, LNKD, 0x00 }, - Package () { 0x0004FFFF, 0x03, LNKA, 0x00 }, - - Package () { 0x0005FFFF, 0x00, LNKC, 0x00 }, - Package () { 0x0005FFFF, 0x01, LNKD, 0x00 }, - Package () { 0x0005FFFF, 0x02, LNKA, 0x00 }, - Package () { 0x0005FFFF, 0x03, LNKB, 0x00 }, - - Package () { 0x0006FFFF, 0x00, LNKD, 0x00 }, - Package () { 0x0006FFFF, 0x01, LNKA, 0x00 }, - Package () { 0x0006FFFF, 0x02, LNKB, 0x00 }, - Package () { 0x0006FFFF, 0x03, LNKC, 0x00 }, - - Package () { 0x0007FFFF, 0x00, LNKA, 0x00 }, - Package () { 0x0007FFFF, 0x01, LNKB, 0x00 }, - Package () { 0x0007FFFF, 0x02, LNKC, 0x00 }, - Package () { 0x0007FFFF, 0x03, LNKD, 0x00 }, - - Package () { 0x0008FFFF, 0x00, LNKB, 0x00 }, - Package () { 0x0008FFFF, 0x01, LNKC, 0x00 }, - Package () { 0x0008FFFF, 0x02, LNKD, 0x00 }, - Package () { 0x0008FFFF, 0x03, LNKA, 0x00 }, -}) - -Name (APIC, Package () { - Package () { 0x0003FFFF, 0x00, 0x00, 0x10 }, - Package () { 0x0003FFFF, 0x01, 0x00, 0x11 }, - Package () { 0x0003FFFF, 0x02, 0x00, 0x12 }, - Package () { 0x0003FFFF, 0x03, 0x00, 0x13 }, - - Package () { 0x0004FFFF, 0x00, 0x00, 0x11 }, - Package () { 0x0004FFFF, 0x01, 0x00, 0x12 }, - Package () { 0x0004FFFF, 0x02, 0x00, 0x13 }, - Package () { 0x0004FFFF, 0x03, 0x00, 0x10 }, - - Package () { 0x0005FFFF, 0x00, 0x00, 0x12 }, - Package () { 0x0005FFFF, 0x01, 0x00, 0x13 }, - Package () { 0x0005FFFF, 0x02, 0x00, 0x10 }, - Package () { 0x0005FFFF, 0x03, 0x00, 0x11 }, - - Package () { 0x0006FFFF, 0x00, 0x00, 0x13 }, - Package () { 0x0006FFFF, 0x01, 0x00, 0x10 }, - Package () { 0x0006FFFF, 0x02, 0x00, 0x11 }, - Package () { 0x0006FFFF, 0x03, 0x00, 0x12 }, - - Package () { 0x0007FFFF, 0x00, 0x00, 0x10 }, - Package () { 0x0007FFFF, 0x01, 0x00, 0x11 }, - Package () { 0x0007FFFF, 0x02, 0x00, 0x12 }, - Package () { 0x0007FFFF, 0x03, 0x00, 0x13 }, - - Package () { 0x0008FFFF, 0x00, 0x00, 0x11 }, - Package () { 0x0008FFFF, 0x01, 0x00, 0x12 }, - Package () { 0x0008FFFF, 0x02, 0x00, 0x13 }, - Package () { 0x0008FFFF, 0x03, 0x00, 0x10 }, -}) - - diff --git a/src/mainboard/via/vt8454c/irq.dsl b/src/mainboard/via/vt8454c/irq.dsl deleted file mode 100644 index 63e64e61c0..0000000000 --- a/src/mainboard/via/vt8454c/irq.dsl +++ /dev/null @@ -1,143 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2007-2009 coresystems GmbH - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; version 2 of - * the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - * MA 02110-1301 USA - */ - -Name (PICM, Package () { - // _ADR PIN SRC IDX - - Package () { 0x0001FFFF, 0x00, LNKA, 0x00 }, - Package () { 0x0001FFFF, 0x01, LNKB, 0x00 }, - Package () { 0x0001FFFF, 0x02, LNKC, 0x00 }, - Package () { 0x0001FFFF, 0x03, LNKD, 0x00 }, - - Package () { 0x0008FFFF, 0x00, LNKB, 0x00 }, - Package () { 0x0008FFFF, 0x01, LNKC, 0x00 }, - Package () { 0x0008FFFF, 0x02, LNKD, 0x00 }, - Package () { 0x0008FFFF, 0x03, LNKA, 0x00 }, - - Package () { 0x0009FFFF, 0x00, LNKC, 0x00 }, - Package () { 0x0009FFFF, 0x01, LNKD, 0x00 }, - Package () { 0x0009FFFF, 0x02, LNKA, 0x00 }, - Package () { 0x0009FFFF, 0x03, LNKB, 0x00 }, - - Package () { 0x000AFFFF, 0x00, LNKD, 0x00 }, - Package () { 0x000AFFFF, 0x01, LNKA, 0x00 }, - Package () { 0x000AFFFF, 0x02, LNKB, 0x00 }, - Package () { 0x000AFFFF, 0x03, LNKC, 0x00 }, - - Package () { 0x000BFFFF, 0x00, LNKD, 0x00 }, - Package () { 0x000BFFFF, 0x01, LNKA, 0x00 }, - Package () { 0x000BFFFF, 0x02, LNKB, 0x00 }, - Package () { 0x000BFFFF, 0x03, LNKC, 0x00 }, - - Package () { 0x000CFFFF, 0x00, LNKA, 0x00 }, - Package () { 0x000CFFFF, 0x01, LNKB, 0x00 }, - Package () { 0x000CFFFF, 0x02, LNKC, 0x00 }, - Package () { 0x000CFFFF, 0x03, LNKD, 0x00 }, - - Package () { 0x000DFFFF, 0x00, LNKA, 0x00 }, - Package () { 0x000DFFFF, 0x01, LNKB, 0x00 }, - Package () { 0x000DFFFF, 0x02, LNKC, 0x00 }, - Package () { 0x000DFFFF, 0x03, LNKD, 0x00 }, - - Package () { 0x000FFFFF, 0x00, LNKA, 0x00 }, - Package () { 0x000FFFFF, 0x01, LNKB, 0x00 }, - Package () { 0x000FFFFF, 0x02, LNKC, 0x00 }, - Package () { 0x000FFFFF, 0x03, LNKD, 0x00 }, - - /* USB controller */ - Package () { 0x0010FFFF, 0x00, LNKA, 0x00 }, - Package () { 0x0010FFFF, 0x01, LNKB, 0x00 }, - Package () { 0x0010FFFF, 0x02, LNKC, 0x00 }, - Package () { 0x0010FFFF, 0x03, LNKD, 0x00 }, - - Package () { 0x0011FFFF, 0x00, LNKA, 0x00 }, - Package () { 0x0011FFFF, 0x01, LNKB, 0x00 }, - Package () { 0x0011FFFF, 0x02, LNKC, 0x00 }, - Package () { 0x0011FFFF, 0x03, LNKD, 0x00 }, - - Package () { 0x0012FFFF, 0x00, LNKA, 0x00 }, - Package () { 0x0012FFFF, 0x01, LNKB, 0x00 }, - Package () { 0x0012FFFF, 0x02, LNKC, 0x00 }, - Package () { 0x0012FFFF, 0x03, LNKD, 0x00 } -}) - -Name (APIC, Package () { - Package () { 0x0001FFFF, 0x00, 0x00, 0x10 }, - Package () { 0x0001FFFF, 0x01, 0x00, 0x11 }, - Package () { 0x0001FFFF, 0x02, 0x00, 0x12 }, - Package () { 0x0001FFFF, 0x03, 0x00, 0x13 }, - - Package () { 0x0008FFFF, 0x00, 0x00, 0x11 }, - Package () { 0x0008FFFF, 0x01, 0x00, 0x12 }, - Package () { 0x0008FFFF, 0x02, 0x00, 0x13 }, - Package () { 0x0008FFFF, 0x03, 0x00, 0x10 }, - - Package () { 0x0009FFFF, 0x00, 0x00, 0x12 }, - Package () { 0x0009FFFF, 0x01, 0x00, 0x13 }, - Package () { 0x0009FFFF, 0x02, 0x00, 0x10 }, - Package () { 0x0009FFFF, 0x03, 0x00, 0x11 }, - - Package () { 0x000AFFFF, 0x00, 0x00, 0x13 }, - Package () { 0x000AFFFF, 0x01, 0x00, 0x10 }, - Package () { 0x000AFFFF, 0x02, 0x00, 0x11 }, - Package () { 0x000AFFFF, 0x03, 0x00, 0x12 }, - - Package () { 0x000BFFFF, 0x00, 0x00, 0x13 }, - Package () { 0x000BFFFF, 0x01, 0x00, 0x10 }, - Package () { 0x000BFFFF, 0x02, 0x00, 0x11 }, - Package () { 0x000BFFFF, 0x03, 0x00, 0x12 }, - - Package () { 0x000CFFFF, 0x00, 0x00, 0x10 }, - Package () { 0x000CFFFF, 0x01, 0x00, 0x11 }, - Package () { 0x000CFFFF, 0x02, 0x00, 0x12 }, - Package () { 0x000CFFFF, 0x03, 0x00, 0x13 }, - - Package () { 0x000DFFFF, 0x00, 0x00, 0x10 }, - Package () { 0x000DFFFF, 0x01, 0x00, 0x11 }, - Package () { 0x000DFFFF, 0x02, 0x00, 0x12 }, - Package () { 0x000DFFFF, 0x03, 0x00, 0x13 }, - - Package () { 0x000FFFFF, 0x00, LNKA, 0x00 }, - Package () { 0x000FFFFF, 0x01, LNKA, 0x00 }, - Package () { 0x000FFFFF, 0x02, LNKA, 0x00 }, - Package () { 0x000FFFFF, 0x03, LNKA, 0x00 }, - - /* USB controller. Hardwired in internal - APIC mode, see PM pg. 137, - "miscellaneous controls", footnote to - "IDE interrupt select" */ - Package () { 0x0010FFFF, 0x00, 0x00, 0x14 }, - Package () { 0x0010FFFF, 0x01, 0x00, 0x16 }, - Package () { 0x0010FFFF, 0x02, 0x00, 0x15 }, - Package () { 0x0010FFFF, 0x03, 0x00, 0x17 }, - - Package () { 0x0011FFFF, 0x00, LNKA, 0x00 }, - Package () { 0x0011FFFF, 0x01, LNKB, 0x00 }, - Package () { 0x0011FFFF, 0x02, LNKC, 0x00 }, - Package () { 0x0011FFFF, 0x03, LNKD, 0x00 }, - - Package () { 0x0012FFFF, 0x00, LNKD, 0x00 }, - Package () { 0x0012FFFF, 0x01, LNKD, 0x00 }, - Package () { 0x0012FFFF, 0x02, LNKD, 0x00 }, - Package () { 0x0012FFFF, 0x03, LNKD, 0x00 }, -}) - - -- cgit v1.2.3