coreboot
Threads by month
- ----- 2025 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
September 2011
- 40 participants
- 224 discussions

Patch set updated for coreboot: 30421ca w83627hf: ASL include containing virtual device tree of the SuperIO
by Christoph Grenz Sept. 19, 2011
by Christoph Grenz Sept. 19, 2011
Sept. 19, 2011
Christoph Grenz (christophg+cb(a)grenz-bonn.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/223
-gerrit
commit 30421ca1099dc9639d367a314528e80fd1e8ace6
Author: Christoph Grenz <christophg+cb(a)grenz-bonn.de>
Date: Sun Sep 18 22:53:18 2011 +0200
w83627hf: ASL include containing virtual device tree of the SuperIO
Add a ACPI Source Language snippet to superio/w83627hf which maps the
SuperIO and most of the logical devices to PnP devices, exposing
configuration options and chip power management to the OS.
Written using the Winbond W83627HF/F datasheet.
.
Patch rebased to remove dependencies.
Change-Id: I1108d29b341ef78fe7f1e574f98b680aada39daf
Signed-off-by: Christoph Grenz <christophg+cb(a)grenz-bonn.de>
---
src/superio/winbond/w83627hf/devtree.asl | 1507 ++++++++++++++++++++++++++++++
1 files changed, 1507 insertions(+), 0 deletions(-)
diff --git a/src/superio/winbond/w83627hf/devtree.asl b/src/superio/winbond/w83627hf/devtree.asl
new file mode 100644
index 0000000..912f299
--- /dev/null
+++ b/src/superio/winbond/w83627hf/devtree.asl
@@ -0,0 +1,1507 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2011 Christoph Grenz <christophg+cb(a)grenz-bonn.de>
+ *
+ * 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
+ */
+
+/*
+ * include this file into a mainboards DSDT and it will expose the W83627HF
+ * SuperIO and its functionality in the _SB device tree.
+ *
+ * Devices are marked as nonexistant if they got 0x00000000 as I/O base address
+ * (compatibilty with legacy bios, which disables logical devices that way)
+ *
+ * It allows the change of IO ports, IRQs and DMA settings on most logical
+ * devices, disabling and reenabling logical devices and controlling power
+ * saving mode on logical devices or the whole chip.
+ *
+ * Notes:
+ * - ECP mode of parallel port not implemented, DMA settings of parallel port
+ * will be reset on DSDT init
+ * - Hardware monitor is only shown as "Motherboard Resource", shows no real
+ * functionality
+ *
+ * Controllable through preprocessor macros:
+ * NO_W83627HF_FDC: don't expose the floppy disk controller
+ * NO_W83627HF_FDC_ENUM: don't try to enumerate the connected floppy drives
+ * NO_W83627HF_PPORT: don't expose the parallel port
+ * NO_W83627HF_UARTA: don't expose the first serial port
+ * NO_W83627HF_UARTB: don't expose the second serial port (already hidden
+ * if UARTB is configured as IRDA port by firmware)
+ * NO_W83627HF_IRDA: don't expose the IRDA port (already hidden if UARTB is
+ * configured as serial port by firmware)
+ * NO_W83627HF_CIR: don't expose the Consumer Infrared functionality
+ * NO_W83627HF_KBC: don't expose the keyboard controller
+ * NO_W83627HF_PS2M: don't expose the PS/2 mouse functionality of the
+ * keyboard controller
+ * NO_W83627HF_GAME: don't expose the game port
+ * NO_W83627HF_MIDI: don't expose the MIDI port
+ * NO_W83627HF_HWMON: don't expose the hardware monitor as
+ * PnP "Motherboard Ressource"
+ */
+DefinitionBlock ("dsdt.aml", "DSDT", 1, "VIAK8T", "AWRDACPI", 0x00001000)
+{
+
+Scope (\_SB)
+{
+
+ Device(SIO) {
+ Name (_HID, EisaId("PNP0A05"))
+ Name (_STR, Unicode("Winbond W83627HF SuperIO"))
+ Name (_UID, "w83627hf")
+
+ /* Mutex for accesses to the configuration ports (prolog and epilog commands are used, so synchronization is useful) */
+ Mutex(CRMX, 1)
+
+ /* SuperIO configuration ports */
+ OperationRegion (CREG, SystemIO, 0x2E, 0x02)
+ Field (CREG, ByteAcc, NoLock, Preserve)
+ {
+ ADDR, 8,
+ DATA, 8
+ }
+ IndexField (CREG, DATA, ByteAcc, NoLock, Preserve)
+ {
+ Offset (0x02),
+ RST, 1, /* Soft reset */
+ , 7,
+ Offset (0x07),
+ LDN, 8, /* Logical device selector */
+ Offset (0x20),
+ DID, 8, /* Device ID */
+ DREV, 8, /* Device Revision */
+ POWC, 8,
+ FDPW, 1, /* FDC Power Down */
+ , 2,
+ PRPW, 1, /* PRT Power Down */
+ UAPW, 1, /* UART A Power Down */
+ UBPW, 1, /* UART B Power Down */
+ HWPW, 1, /* HWM Power Down */
+ , 1,
+ IPD, 1, /* Immediate Chip Power Down */
+ , 7,
+ PNPS, 1, /* PnP Address Select Register Default Value Mode */
+ , 1,
+ KBCR, 1, /* KBC enabled after system reset (read-only) */
+ , 3,
+ CLKS, 1, /* Clock select */
+ AQ16, 1, /* 16bit Address Qualification */
+ FDCT, 1, /* Tristate FDC (?) */
+ , 2,
+ PRTT, 1, /* Tristate parallel port (?) */
+ URAT, 1, /* Tristate UART A (?) */
+ URBT, 1, /* Tristate UART B (?) */
+ , 2,
+ URAI, 1, /* UART A Legacy IRQ Select Disable */
+ URBI, 1, /* UART B Legacy IRQ Select Disable */
+ PRTI, 1, /* Parallel Port Legacy IRQ/DRQ Select Disable */
+ FDCI, 1, /* FDC Legacy IRQ/DRQ Select Disable */
+ , 1,
+ LCKC, 1, /* Lock Configuration Registers */
+ Offset (0x29),
+ IO3S, 8, /* GPIO3 pin selection register */
+ ACTR, 1, /* Logical device activation */
+ ACT1, 1, /* Logical part activation 1 (mostly unused) */
+ ACT2, 1, /* Logical part activation 2 (mostly unused) */
+ , 5,
+ Offset (0x60),
+ IO1H, 8, /* First I/O port base - high byte */
+ IO1L, 8, /* First I/O port base - low byte */
+ IO2H, 8, /* Second I/O port base - high byte */
+ IO2L, 8, /* Second I/O port base - low byte */
+ Offset (0x70),
+ IRQ0, 8, /* First IRQ */
+ Offset (0x72),
+ IRQ1, 8, /* First IRQ */
+ Offset (0x74),
+ DMA0, 8, /* DMA */
+ Offset (0xE0),
+ /* CRE0-CRE4: function logical device dependant, seems to be reserved for ACPI settings */
+ CRE0, 8,
+ CRE1, 8,
+ CRE2, 8,
+ CRE3, 8,
+ CRE4, 8,
+ Offset (0xF0),
+ /* OPT1-OPTA aka CRF0-CRF9: function logical device dependant */
+ OPT1, 8,
+ OPT2, 8,
+ OPT3, 8,
+ OPT4, 8,
+ OPT5, 8,
+ OPT6, 8,
+ OPT7, 8,
+ OPT8, 8,
+ OPT9, 8,
+ OPTA, 8
+ }
+
+ Name (_CRS, ResourceTemplate () {
+ IO (Decode16, 0x002E, 0x002E, 0x02, 0x01) /* Announce the used I/O ports to the OS */
+ IO (Decode16, 0x004E, 0x004E, 0x01, 0x01) /* this port is used in some configurations, so announce it to be sure */
+ })
+
+ /* Enter configuration mode (and aquire mutex)
+ Method must be run before accesssing the configuration region.
+ */
+ Method (ENCM)
+ {
+ Acquire (CRMX, 0xFFFF)
+ Store (0x87, ADDR)
+ Store (0x87, ADDR)
+ }
+
+ /* Exit configuration mode (and release mutex)
+ Method must be run after accessing the configuration region.
+ */
+ Method (EXCM)
+ {
+ Release (CRMX)
+ Store (0xAA, ADDR)
+ }
+
+ /* PM: indicate IPD (Immediate Power Down) bit state as D0/D2 */
+ Method (_PSC) {
+ ENCM ()
+ Store (IPD, Local0)
+ EXCM ()
+ If (Local0) { Return (2) }
+ Else { Return (0) }
+ }
+
+ /* PM: Switch to D0 by setting IPD low */
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, IPD)
+ EXCM ()
+ }
+
+ /* PM: Switch to D2 by setting IPD high */
+ Method (_PS2) {
+ ENCM ()
+ Store (One, IPD)
+ EXCM ()
+ }
+
+ #ifndef NO_W83627HF_FDC
+ /* =================== Floppy Disk Controller ================ */
+ Device (FDC0) {
+ Name (_HID, EisaId ("PNP0700"))
+ Name (_STR, Unicode ("W83627HF Floppy Disk Controller"))
+ Name (_UID, "w83627hf-fdc")
+
+ #ifndef NO_W83627HF_FDC_ENUM
+ /* Initialization method: Should be run once on boot
+ If FDC is active, enumerate all connected devices */
+ Method (_INI) {
+ ENCM ()
+ Store (0x00, LDN)
+ Store (ACTR, Local0)
+ Store (IO1H, Local1)
+ Store (IO1L, Local2)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or(Local1, Local2, Local1)
+ If (Local0) {
+ /* Try probing drives and save result in _FDE */
+ PROB(Local1)
+ }
+ }
+ #endif
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x00, LDN)
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_PSC) {
+ Store(^^_PSC (), Local0)
+ If (Local0) { Return (Local0) }
+ ENCM ()
+ Store (FDPW, Local0)
+ EXCM ()
+ If (Local0) { Return (1) }
+ Else { Return (0) }
+ }
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, FDPW)
+ EXCM ()
+ }
+ Method (_PS1) {
+ ENCM ()
+ Store (One, FDPW)
+ EXCM ()
+ }
+ Name (_PR0, Package () { ^^ })
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x00, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x06, IO0)
+ IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
+ IRQNoFlags () {6}
+ DMA (Compatibility, NotBusMaster, Transfer8) {2}
+ })
+ ENCM ()
+ Store (0x00, LDN)
+ Store(IO1H, Local0)
+ Store(IO1L, Local1)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFnNoPri ()
+ {
+ IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
+ IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
+ IRQNoFlags () {6}
+ DMA (Compatibility, NotBusMaster, Transfer8) {2}
+ }
+ EndDependentFn ()
+ })
+
+ #ifndef NO_W83627HF_FDC_ENUM
+ Name(_FDE, Buffer(){0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})
+ #endif
+
+ Method (PROB, 1) {
+ #ifndef NO_W83627HF_FDC_ENUM
+ /* Try probing drives and save result in _FDE */
+ OperationRegion (FIO1, SystemIO, Arg0, 0x06)
+ Field (FIO1, ByteAcc, NoLock, Preserve)
+ {
+ Offset(0x02),
+ SELE, 2,
+ RSTL, 1,
+ IDMA, 1,
+ ACT1, 1,
+ ACT2, 1,
+ ACT3, 1,
+ ACT4, 1,
+ Offset(0x04),
+ BSY1, 1,
+ BSY2, 1,
+ BSY3, 1,
+ BSY4, 1,
+ BUSY, 1,
+ NDMA, 1,
+ IODI, 1,
+ RDY, 1,
+ DATA, 8,
+ }
+ OperationRegion (FIO2, SystemIO, 0x3F7, 0x01)
+
+ CreateByteField (_FDE, 3, FD1)
+ CreateByteField (_FDE, 7, FD2)
+ CreateByteField (_FDE, 11, FD3)
+ CreateByteField (_FDE, 15, FD4)
+
+ Store(One, ACT1)
+ Store(0, SELE)
+ Sleep(0x64)
+ If (FIO2) { Store (One, FD1) }
+
+ Store(Zero, ACT1)
+ Store(One, ACT2)
+ Store(1, SELE)
+ Sleep(0x64)
+ If (FIO2) { Store (One, FD2) }
+
+ Store(Zero, ACT2)
+ Store(One, ACT3)
+ Store(2, SELE)
+ Sleep(0x64)
+ If (FIO2) { Store (One, FD3) }
+
+ Store(Zero, ACT3)
+ Store(One, ACT4)
+ Store(3, SELE)
+ Sleep(0x64)
+ If (FIO2) { Store (One, FD4) }
+ Store(Zero, ACT4)
+ Store(Zero, SELE)
+ #endif
+ }
+
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 1, 6, IO0)
+ IO (Decode16, 0, 0, 1, 1, IO1)
+ IRQNoFlags (IRQ0) {}
+ DMA (Compatibility, NotBusMaster, Transfer8, DMA0) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateWordField (Arg0, IO1._MIN, IOA1)
+ CreateByteField (Arg0, IRQ0._INT, IRQL)
+ CreateByteField (Arg0, DMA0._DMA, DMCH)
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ ENCM ()
+ Store (0, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ Store (One, ACTR)
+ EXCM ()
+
+ /* Try probing drives and save result in _FDE */
+ PROB(IOA0)
+ }
+ }
+ #endif
+
+ #ifndef NO_W83627HF_PPORT
+ /* ======================== Parallel Port ======================== */
+ /* Currently no ECP support */
+ Device (PAR0) {
+ Name (_HID, EisaId ("PNP0400"))
+ Name (_DDN, "LPT1")
+ Name (_UID, "w83627hf-pport")
+
+ Method (MODE, 1) {
+ And(Arg0, 0x07, Local0)
+ ENCM ()
+ Store (0x01, LDN)
+ And(OPT1, 0x3, Local1)
+ Or(Local1, Local0, OPT1)
+ EXCM()
+ }
+
+ Method (_INI)
+ {
+ /* Deactivate DMA, even if set by BIOS */
+ ENCM ()
+ Store (0x01, LDN)
+ Store (0x04, DMA0)
+ EXCM ()
+ }
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x01, LDN)
+ And(OPT1, 0x3, Local1)
+ If (ACTR) {
+ If (LNotEqual(Local1, 2)) {
+ Store (0x0D, Local0)
+ } Else {
+ Store (0x0D, Local0)
+ }
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_PSC) {
+ Store(^^_PSC (), Local0)
+ If (Local0) { Return (Local0) }
+ ENCM ()
+ Store (PRPW, Local0)
+ EXCM ()
+ If (Local0) { Return (1) }
+ Else { Return (0) }
+ }
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, PRPW)
+ EXCM ()
+ }
+ Method (_PS1) {
+ ENCM ()
+ Store (One, PRPW)
+ EXCM ()
+ }
+ Name (_PR0, Package () { ^^ })
+
+ Method (_DIS) {
+ ENCM ()
+ Store (0x01, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate ()
+ {
+ IO (Decode16, 0x0000, 0x0000, 0x04, 0x08, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (CRS, IO0._MIN, IOP0)
+ CreateWordField (CRS, IO0._MAX, IOR0)
+ CreateByteField (CRS, IO0._ALN, IOAL)
+ CreateByteField (CRS, IO0._LEN, IOLE)
+ CreateWordField (CRS, IRQX._INT, IRQW)
+
+ ENCM ()
+ Store (0x01, LDN)
+ Store (IO1L, Local0)
+ Store (IO1H, Local1)
+ Store (OPT1, Local2)
+ Store (IRQ0, Local5)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or (Local1, Local0, Local1)
+
+ And(Local2, 0x3, Local3)
+ And(Local2, 0x4, Local4)
+ If (Local4) {
+ Store(0x04, IOAL)
+ }
+
+ Store(Local1, IOP0)
+ Store(Local1, IOR0)
+
+ If (LEqual (Local0, 0xBC))
+ {
+ Store (0x04, IOLE)
+ }
+ Else
+ {
+ Store (0x08, IOLE)
+ }
+
+ Store (One, Local0)
+ ShiftLeft (Local0, Local5, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,1)
+ {
+ IO (Decode16, 0x0378, 0x0378, 0x04, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,1)
+ {
+ IO (Decode16, 0x0278, 0x0278, 0x04, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,1)
+ {
+ IO (Decode16, 0x03BC, 0x03BC, 0x04, 0x04)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,0)
+ {
+ IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,0)
+ {
+ IO (Decode16, 0x0278, 0x0278, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (2,0)
+ {
+ IO (Decode16, 0x0100, 0x0FFC, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (2,1)
+ {
+ IO (Decode16, 0x0100, 0x0FFC, 0x04, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ EndDependentFn ()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 4, 4, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateWordField (Arg0, IO0._MIN, IOA1)
+ CreateByteField (Arg0, IO0._ALN, IOAL)
+ CreateByteField (Arg0, IO0._LEN, IOLE)
+ CreateWordField (Arg0, IRQX._INT, IRQL)
+
+ If (LEqual(IOAL, 4)) {
+ Store(0x0, Local2)
+ } else {
+ Store(0x1, Local2)
+ }
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ ENCM ()
+ Store (0x01, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ /*Mode*/
+ Store (OPT1, Local3)
+ And (Local3, 0xF8, Local3)
+ Or (Local2, Local3, OPT1)
+ /*DMA off*/
+ Store (0x04, DMA0)
+ /*IRQ*/
+ FindSetLeftBit (IRQL, Local3)
+ Subtract (Local3, 0x01, Local3)
+ Store (Local3, IRQ0)
+ /*Activate*/
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #endif
+
+ #ifndef NO_W83627HF_UARTA
+ /* =========================== UART A ============================ */
+ Device (SER0) {
+ Name (_HID, EisaId ("PNP0501"))
+ Name (_UID, "w83627hf-uarta")
+ Name (_DDN, "COM1")
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x02, LDN)
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_PSC) {
+ Store(^^_PSC (), Local0)
+ If (Local0) { Return (Local0) }
+ ENCM ()
+ Store (UAPW, Local0)
+ EXCM ()
+ If (Local0) { Return (1) }
+ Else { Return (0) }
+ }
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, UAPW)
+ EXCM ()
+ }
+ Method (_PS1) {
+ ENCM ()
+ Store (One, UAPW)
+ EXCM ()
+ }
+ Name (_PR0, Package () { ^^ })
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x02, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x08, IO0)
+ IRQNoFlags (IRQX) {6}
+ })
+ ENCM ()
+ Store (0x02, LDN)
+ Store(IO1H, Local1)
+ Store(IO1L, Local0)
+ Store(IRQ0, Local2)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x02F8, 0x02F8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (1,0) {
+ IO (Decode16, 0x03E8, 0x03E8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (1,0) {
+ IO (Decode16, 0x02E8, 0x02E8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (2,0) {
+ IO (Decode16, 0x0100, 0x0FF8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ EndDependentFn()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 1, 6, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateByteField (Arg0, IRQX._INT, IRQL)
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ FindSetLeftBit (IRQL, Local3)
+ Subtract (Local3, 0x01, Local3)
+
+ ENCM ()
+ Store (2, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ Store (Local3, IRQ0)
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #endif
+
+ #ifndef NO_W83627HF_UARTB
+ /* =========================== UART B ============================ */
+ Device (SER1) {
+ Name (_HID, EisaId ("PNP0501"))
+ Name (_UID, "w83627hf-uartb")
+ Name (_DDN, "COM2")
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x03, LDN)
+ If (LNot(And(OPT2, 0x30)))
+ {
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_PSC) {
+ Store(^^_PSC (), Local0)
+ If (Local0) { Return (Local0) }
+ ENCM ()
+ Store (UBPW, Local0)
+ EXCM ()
+ If (Local0) { Return (1) }
+ Else { Return (0) }
+ }
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, UBPW)
+ EXCM ()
+ }
+ Method (_PS1) {
+ ENCM ()
+ Store (One, UBPW)
+ EXCM ()
+ }
+ Name (_PR0, Package () { ^^ })
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x03, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x08, IO0)
+ IRQNoFlags (IRQX) {6}
+ })
+ ENCM ()
+ Store (0x03, LDN)
+ Store(IO1H, Local1)
+ Store(IO1L, Local0)
+ Store(IRQ0, Local2)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x02F8, 0x02F8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (1,0) {
+ IO (Decode16, 0x03E8, 0x03E8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (1,0) {
+ IO (Decode16, 0x02E8, 0x02E8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (2,0) {
+ IO (Decode16, 0x0100, 0x0FF8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ EndDependentFn()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 1, 8, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateByteField (Arg0, IRQX._INT, IRQL)
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ FindSetLeftBit (IRQL, Local3)
+ Subtract (Local3, 0x01, Local3)
+
+ ENCM ()
+ Store (3, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ Store (Local3, IRQ0)
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #endif
+
+ #ifndef NO_W83627HF_IRDA
+ /* ======================== UART B (IRDA) ======================== */
+ Device (IRDA) {
+ Name (_HID, EisaId ("PNP0510"))
+ Name (_UID, "w83627hf-irda")
+ Name (_STR, Unicode("IrDA Port"))
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x03, LDN)
+ If (And(OPT2, 0x30))
+ {
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_PSC) {
+ Store(^^_PSC (), Local0)
+ If (Local0) { Return (Local0) }
+ ENCM ()
+ Store (UBPW, Local0)
+ EXCM ()
+ If (Local0) { Return (1) }
+ Else { Return (0) }
+ }
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, UBPW)
+ EXCM ()
+ }
+ Method (_PS1) {
+ ENCM ()
+ Store (One, UBPW)
+ EXCM ()
+ }
+ Name (_PR0, Package () { ^^ })
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x03, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x08, IO0)
+ IRQNoFlags (IRQX) {6}
+ })
+ ENCM ()
+ Store (0x03, LDN)
+ Store(IO1H, Local1)
+ Store(IO1L, Local0)
+ Store(IRQ0, Local2)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x02F8, 0x02F8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (1,0) {
+ IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x03E8, 0x03E8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x02E8, 0x02E8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (2,0) {
+ IO (Decode16, 0x0100, 0x0FF8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ EndDependentFn()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 1, 8, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateByteField (Arg0, IRQX._INT, IRQL)
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ FindSetLeftBit (IRQL, Local3)
+ Subtract (Local3, 0x01, Local3)
+
+ ENCM ()
+ Store (3, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ Store (Local3, IRQ0)
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #endif
+
+ #ifndef NO_W83627HF_CIR
+ /* ========================= Consumer IR ========================= */
+ Device (CIR0) {
+ Name (_HID, EisaId ("WEC1022")) /* Should be the correct one */
+ Name (_UID, "w83627hf-cir")
+ Name (_STR, Unicode("Winbond Consumer Infrared Transceiver"))
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x06, LDN)
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x06, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x08, IO0)
+ IRQNoFlags (IRQX) {6}
+ })
+ ENCM ()
+ Store (0x03, LDN)
+ Store(IO1H, Local1)
+ Store(IO1L, Local0)
+ Store(IRQ0, Local2)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x0100, 0x0FF8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ EndDependentFn()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 1, 8, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateByteField (Arg0, IRQX._INT, IRQL)
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ FindSetLeftBit (IRQL, Local3)
+ Subtract (Local3, 0x01, Local3)
+
+ ENCM ()
+ Store (6, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ Store (Local3, IRQ0)
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #endif
+
+ #ifndef NO_W83627HF_KBC
+ /* ===================== Keyboard Controller ===================== */
+ Device (KBD0) {
+ Name (_HID, EisaId ("PNP0303"))
+ Name (_CID, 0x0B03D041)
+ Name (_UID, "w83627hf-kbc")
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x05, LDN)
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (Lor(LOr (IO1H, IO1L), LOr (IO2H, IO2L)))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x05, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ Notify(PS2M, 1)
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO0)
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO1)
+ IRQNoFlags (IRQX) {}
+ })
+ ENCM ()
+ Store (0x05, LDN)
+ Store(IO1H, Local0)
+ Store(IO1L, Local1)
+ Store(IO2H, Local2)
+ Store(IO2L, Local3)
+ Store(IRQ0, Local4)
+ EXCM ()
+ ShiftLeft(Local0, 8, Local0)
+ Or (Local1, Local0, Local0)
+
+ ShiftLeft(Local2, 8, Local2)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ CreateWordField (CRS, IO1._MIN, I1MI)
+ Store (Local2, I1MI)
+ CreateWordField (CRS, IO1._MAX, I1MA)
+ Store (Local2, I1MA)
+
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local5)
+ ShiftLeft (Local5, Local4, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x0060, 0x0060, 0x01, 0x01)
+ IO (Decode16, 0x0064, 0x0064, 0x01, 0x01)
+ IRQNoFlags () {1}
+ }
+ EndDependentFn()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 1, 1, IO0)
+ IO (Decode16, 0, 0, 1, 1, IO1)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateWordField (Arg0, IO1._MIN, IOA1)
+ CreateByteField (Arg0, IRQX._INT, IRQL)
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ Divide(IOA1, 256, Local2, Local3)
+ ShiftRight(Local1, 8, Local1)
+
+ FindSetLeftBit (IRQL, Local4)
+ Subtract (Local4, 0x01, Local4)
+
+ ENCM ()
+ Store (5, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ Store (Local3, IO2H)
+ Store (Local2, IO2L)
+ Store (Local3, IRQ0)
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #ifndef NO_W83627HF_PS2M
+ Device (PS2M) {
+ Name (_HID, EisaId ("PNP0F13"))
+ Name (_UID, "w83627hf-ps2m")
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x05, LDN)
+ If (LAnd(ACTR, IRQ1) ) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (Lor(LOr (IO1H, IO1L), LOr (IO2H, IO2L)))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x05, LDN)
+ Store (Zero, IRQ1)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IRQNoFlags (IRQX) {}
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO0)
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO1)
+ })
+ ENCM ()
+ Store (0x05, LDN)
+ Store(IO1H, Local0)
+ Store(IO1L, Local1)
+ Store(IO2H, Local2)
+ Store(IO2L, Local3)
+ Store(IRQ1, Local4)
+ EXCM ()
+ ShiftLeft(Local0, 8, Local0)
+ Or (Local1, Local0, Local0)
+
+ ShiftLeft(Local2, 8, Local2)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ CreateWordField (CRS, IO1._MIN, I1MI)
+ Store (Local2, I1MI)
+ CreateWordField (CRS, IO1._MAX, I1MA)
+ Store (Local2, I1MA)
+
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local5)
+ ShiftLeft (Local5, Local4, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,0) {
+ IRQNoFlags () {12}
+ }
+ StartDependentFn (2,0) {
+ IRQNoFlags () {1,3,4,5,6,7,9,10,11,12}
+ }
+ EndDependentFn()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IRQNoFlags (IRQX) {}
+ })
+ CreateByteField (Arg0, IRQX._INT, IRQL)
+
+ FindSetLeftBit (IRQL, Local0)
+ Subtract (Local0, 0x01, Local0)
+
+ ENCM ()
+ Store (5, LDN)
+ Store (Local0, IRQ1)
+ /* Only activates if KBD is active */
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #endif
+ #endif
+
+ #ifndef NO_W83627HF_GAME
+ /* ========================== Game Port ========================== */
+ Device (GAME) {
+ Name (_HID, EisaId ("PNPB02F"))
+ Name (_STR, Unicode ("Joystick/Game Port"))
+ Name (_UID, "w83627hf-game")
+
+ Method (_STA) {
+ ENCM ()
+ Store(0, Local0)
+ Store (0x07, LDN)
+ If (LOr(IO1L, IO1H)) {
+ If (LOr(ACTR, ACT1)) {
+ Store (0x0F, Local0)
+ }
+ Else {
+ Store (0x0D, Local0)
+ }
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ ENCM ()
+ Store (0x07, LDN)
+ Store(IO1H, Local0)
+ Store(IO1L, Local1)
+ Store(IRQ0, Local2)
+ EXCM ()
+ ShiftLeft(Local0, 8, Local0)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ If (Local2) {
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+ }
+
+ Return (CRS)
+ }
+
+ }
+ #endif
+
+ #ifndef NO_W83627HF_MIDI
+ /* ========================== MIDI Port ========================== */
+ Device (MIDI) {
+ Name (_HID, EisaId ("PNPB006"))
+ Name (_STR, Unicode ("MPU-401 Compatible MIDI Port"))
+ Name (_UID, "w83627hf-midi")
+
+ Method (_STA) {
+ ENCM ()
+ Store(0, Local0)
+ Store (0x07, LDN)
+ If (LOr(IO2L, IO2H)) {
+ If (LOr(ACTR, ACT2)) {
+ Store (0x0F, Local0)
+ }
+ Else {
+ Store (0x0D, Local0)
+ }
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x02, 0x02, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ ENCM ()
+ Store (0x07, LDN)
+ Store(IO2H, Local0)
+ Store(IO2L, Local1)
+ Store(IRQ1, Local2)
+ EXCM ()
+ ShiftLeft(Local0, 8, Local0)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ If (Local2) {
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+ }
+
+ Return (CRS)
+ }
+
+ }
+ #endif
+
+ /* ==== Suspend LED control if it is connected to the SuperIO ==== */
+ Method (SLED, 1) {
+ ENCM ()
+ Store (9, LDN)
+ Store(OPT4, Local0)
+ And(Local0, 63, Local0)
+ Or(Local0, ShiftLeft(And(Arg0, 0x03), 6), OPT4)
+ EXCM ()
+ }
+
+ /* ===== Power LED control if it is connected to the SuperIO ===== */
+ Method (PLED, 1) {
+ ENCM ()
+ Store (8, LDN)
+ Store(OPT4, Local0)
+ And(Local0, 63, Local0)
+ Or(Local0, ShiftLeft(And(Arg0, 0x03), 6), OPT4)
+ EXCM ()
+ }
+
+ #ifndef NO_W83627HF_HWMON
+ /* ====================== Hardware Monitor ======================= */
+ Device (HMON) {
+ Name (_HID, EisaId ("PNP0C02")) // TODO: find better matching ID
+ Name (_STR, Unicode("W83627 Hardware Monitor"))
+ Name (_UID, "w83627hf-hwmon")
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x0B, LDN)
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_PSC) {
+ Store(^^_PSC (), Local0)
+ If (Local0) { Return (Local0) }
+ ENCM ()
+ Store (HWPW, Local0)
+ EXCM ()
+ If (Local0) { Return (1) }
+ Else { Return (0) }
+ }
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, HWPW)
+ EXCM ()
+ }
+ Method (_PS1) {
+ ENCM ()
+ Store (One, HWPW)
+ EXCM ()
+ }
+ Name (_PR0, Package () { ^^ })
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x08, 0x02, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ ENCM ()
+ Store (0x0B, LDN)
+ Store(IO1H, Local0)
+ Store(IO1L, Local1)
+ Store(IRQ1, Local2)
+ EXCM ()
+ ShiftLeft(Local0, 8, Local0)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ If (Local2) {
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+ }
+ Return (CRS)
+ }
+ }
+ #endif
+ }
+}
+}
\ No newline at end of file
1
0

New patch to review for coreboot: ae7b350 amdk8: ASL include for K8 temperature sensor support in ACPI
by Christoph Grenz Sept. 18, 2011
by Christoph Grenz Sept. 18, 2011
Sept. 18, 2011
Christoph Grenz (christophg+cb(a)grenz-bonn.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/222
-gerrit
commit ae7b350b69ad6f93a530784615230e036178a4a7
Author: Christoph Grenz <christophg+cb(a)grenz-bonn.de>
Date: Sun Sep 18 23:20:55 2011 +0200
amdk8: ASL include for K8 temperature sensor support in ACPI
Add a ACPI Source Language snippet which if included as
shown in the comments in the file, exposes the 4 possible
temperature sensors in the CPU as ACPI thermal zones.
Change-Id: I94dd773108e348a0fdb9d2f8d6cfe415d5fa0339
Signed-off-by: Christoph Grenz <christophg+cb(a)grenz-bonn.de>
---
src/northbridge/amd/amdk8/thermal_mixin.asl | 282 +++++++++++++++++++++++++++
1 files changed, 282 insertions(+), 0 deletions(-)
diff --git a/src/northbridge/amd/amdk8/thermal_mixin.asl b/src/northbridge/amd/amdk8/thermal_mixin.asl
new file mode 100644
index 0000000..3424cb5
--- /dev/null
+++ b/src/northbridge/amd/amdk8/thermal_mixin.asl
@@ -0,0 +1,282 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2011 Christoph Grenz <christophg+cb(a)grenz-bonn.de>
+ *
+ * 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
+ */
+
+/*
+ * include this file into a mainboards DSDT inside the PCI device
+ * "K8 Miscellaneous Control" and it will expose the temperature
+ * sensors of the processor as thermal zones.
+ *
+ * If, for example, the K8 Misc. Control device is on 0:18.3, include the
+ * following inside the PCI0 device:
+ *
+ * Device(K8MC) {
+ * Name (_ADR, 0x00180003)
+ * #include northbridge/amd/amdk8/thermal_mixin.asl
+ * }
+ *
+ * Note: as only the current temperature and the trip temperature for
+ * "Software Thermal Control" are available in the PCI registers, but the
+ * linux driver for thermal zones needs a critical temperature value, a
+ * reasonable critical temperature is calculated by simply adding 6°C to
+ * the trip temperature.
+ */
+
+#ifndef K8TEMP_CRITICAL_ADD
+# define K8TEMP_CRITICAL_ADD 6
+#endif
+
+OperationRegion(K8TR, PCI_Config, 0xE4, 0x4)
+Field(K8TR, DWordAcc, NoLock, Preserve) {
+ , 1,
+ THTP, 1, /* Temperature sensor trip occured */
+ CORE, 1, /* Select Core */
+ TTS0, 1, /* Temperature sensor trip on CPU1 (or single core CPU0) */
+ TTS1, 1, /* Temperature sensor trip on CPU0 */
+ TTEN, 1, /* Temperature sensor trip enabled */
+ PLAC, 1, /* Select Sensor */
+ , 1,
+ DOFF, 6, /* Diode offset (signed 6bit-Integer) in °C */
+ TFRC, 2, /* Temperature fractions */
+ TVAL, 8, /* Temperature value in °C biased by -49 */
+ TJOF, 5,
+ , 2,
+ SWTT, 1, /* Induce a thermtrip event (for diagnostic purposes) */
+}
+
+OperationRegion(K8ST, PCI_Config, 0x70, 0x1)
+Field(K8ST, ByteAcc, NoLock, Preserve) {
+ TMAX, 5, /* Maximum temperature for software thermal control, in °C, biased by 52 */
+}
+
+Method(K8PT, 2) {
+ Divide(Multiply(Arg1, 5), 2, , Local0)
+ Return (Add(Multiply(Add(Arg0, 224),10), Local0))
+}
+
+Method(K8PO, 1) {
+ If (And(Arg0, 0x20))
+ {
+ Return (Multiply(Subtract(Xor(Arg0, 0x3F), 1), 10))
+ }
+ Else {
+ Return (Multiply(Arg0, 10))
+ }
+}
+
+ThermalZone (K8T0) {
+ Name(_HID, EisaId("PNP0C11"))
+ Name(_UID, "k8-0")
+ Name(_STR, Unicode("K8 compatible CPU Core 1 Thermal Sensor 1"))
+
+ Method(_STA) {
+ Store(CORE, Local0)
+ Store(PLAC, Local1)
+
+ Store(Zero, CORE)
+ Store(Zero, PLAC)
+ If (LOr(PLAC, CORE)) {
+ Store(Local0, CORE)
+ Store(Local1, PLAC)
+ Return (0x00)
+ }
+
+ If (LOr(LNot(TVAL), LEqual(TVAL, 0xFF))) {
+ Return (0x00)
+ }
+
+ Store(Local0, CORE)
+ Store(Local1, PLAC)
+ Return (0x0F)
+ }
+
+ Method(_TMP) {
+ Store(CORE, Local0)
+ Store(PLAC, Local1)
+
+ Store(Zero, CORE)
+ Store(Zero, PLAC)
+
+ Store (K8PT(TVAL, TFRC), Local2)
+ Add (K8PO(DOFF), Local2, Local2)
+ Store(Local0, CORE)
+ Store(Local1, PLAC)
+
+ Return (Local2)
+ }
+
+ Method(_CRT) {
+ Add(TMAX, 325, Local0)
+ Add(Local0, K8TEMP_CRITICAL_ADD, Local0)
+ Return (Multiply(Local0, 10))
+ }
+}
+
+ThermalZone (K8T1) {
+ Name(_HID, EisaId("PNP0C11"))
+ Name(_UID, "k8-1")
+ Name(_STR, Unicode("K8 compatible CPU Core 1 Thermal Sensor 2"))
+
+ Name(_TZD, Package () {\_PR.CPU0})
+
+ Method(_STA) {
+ Store(CORE, Local0)
+ Store(PLAC, Local1)
+
+ Store(Zero, CORE)
+ Store(Zero, PLAC)
+ If (LOr(PLAC, CORE)) {
+ Store(Local0, CORE)
+ Store(Local1, PLAC)
+ Return (0x00)
+ }
+
+ Store(One, PLAC)
+ If (LOr(LNot(TVAL), LEqual(TVAL, 0xFF))) {
+ Return (0x00)
+ }
+
+ Store(Local0, CORE)
+ Store(Local1, PLAC)
+ Return (0x0F)
+ }
+
+ Method(_TMP) {
+ Store(CORE, Local0)
+ Store(PLAC, Local1)
+
+ Store(Zero, CORE)
+ Store(One, PLAC)
+
+ Store (K8PT(TVAL, TFRC), Local2)
+ Add (K8PO(DOFF), Local2, Local2)
+ Store(Local0, CORE)
+ Store(Local1, PLAC)
+
+ Return (Local2)
+ }
+
+ Method(_CRT) {
+ Add(TMAX, 325, Local0)
+ Add(Local0, K8TEMP_CRITICAL_ADD, Local0)
+ Return (Multiply(Local0, 10))
+ }
+}
+
+ThermalZone (K8T2) {
+ Name(_HID, EisaId("PNP0C11"))
+ Name(_UID, "k8-2")
+ Name(_STR, Unicode("K8 compatible CPU Core 2 Thermal Sensor 1"))
+
+ Name(_TZD, Package () {\_PR.CPU0})
+
+ Method(_STA) {
+ Store(CORE, Local0)
+ Store(PLAC, Local1)
+
+ Store(Zero, CORE)
+ Store(Zero, PLAC)
+ If (LOr(PLAC, CORE)) {
+ Store(Local0, CORE)
+ Store(Local1, PLAC)
+ Return (0x00)
+ }
+
+ Store(One, CORE)
+ If (LOr(LNot(TVAL), LEqual(TVAL, 0xFF))) {
+ Return (0x00)
+ }
+
+ Store(Local0, CORE)
+ Store(Local1, PLAC)
+ Return (0x0F)
+ }
+
+ Method(_TMP) {
+ Store(CORE, Local0)
+ Store(PLAC, Local1)
+
+ Store(One, CORE)
+ Store(Zero, PLAC)
+
+ Store (K8PT(TVAL, TFRC), Local2)
+ Add (K8PO(DOFF), Local2, Local2)
+ Store(Local0, CORE)
+ Store(Local1, PLAC)
+
+ Return (Local2)
+ }
+
+ Method(_CRT) {
+ Add(TMAX, 325, Local0)
+ Add(Local0, K8TEMP_CRITICAL_ADD, Local0)
+ Return (Multiply(Local0, 10))
+ }
+}
+
+ThermalZone (K8T3) {
+ Name(_HID, EisaId("PNP0C11"))
+ Name(_UID, "k8-3")
+ Name(_STR, Unicode("K8 compatible CPU Core 2 Thermal Sensor 2"))
+
+ Name(_TZD, Package () {\_PR.CPU0})
+
+ Method(_STA) {
+ Store(CORE, Local0)
+ Store(PLAC, Local1)
+
+ Store(Zero, CORE)
+ Store(Zero, PLAC)
+ If (LOr(PLAC, CORE)) {
+ Store(Local0, CORE)
+ Store(Local1, PLAC)
+ Return (0x00)
+ }
+
+ Store(One, CORE)
+ Store(One, PLAC)
+ If (LOr(LNot(TVAL), LEqual(TVAL, 0xFF))) {
+ Return (0x00)
+ }
+
+ Store(Local0, CORE)
+ Store(Local1, PLAC)
+ Return (0x0F)
+ }
+
+ Method(_TMP) {
+ Store(CORE, Local0)
+ Store(PLAC, Local1)
+
+ Store(One, CORE)
+ Store(One, PLAC)
+
+ Store (K8PT(TVAL, TFRC), Local2)
+ Add (K8PO(DOFF), Local2, Local2)
+ Store(Local0, CORE)
+ Store(Local1, PLAC)
+
+ Return (Local2)
+ }
+
+ Method(_CRT) {
+ Add(TMAX, 325, Local0)
+ Add(Local0, K8TEMP_CRITICAL_ADD, Local0)
+ Return (Multiply(Local0, 10))
+ }
+}
\ No newline at end of file
1
0

New patch to review for coreboot: e8d1f6d w83627hf: ASL include containing virtual device tree of the SuperIO
by Christoph Grenz Sept. 18, 2011
by Christoph Grenz Sept. 18, 2011
Sept. 18, 2011
Christoph Grenz (christophg+cb(a)grenz-bonn.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/223
-gerrit
commit e8d1f6d4f6fe3f0faf5736fd9682f1b59b494784
Author: Christoph Grenz <christophg+cb(a)grenz-bonn.de>
Date: Sun Sep 18 22:53:18 2011 +0200
w83627hf: ASL include containing virtual device tree of the SuperIO
Add a ACPI Source Language snippet to superio/w83627hf which maps the
SuperIO and most of the logical devices to PnP devices, exposing
configuration options and chip power management to the OS.
Written using the Winbond W83627HF/F datasheet.
Change-Id: I1108d29b341ef78fe7f1e574f98b680aada39daf
Signed-off-by: Christoph Grenz <christophg+cb(a)grenz-bonn.de>
---
src/superio/winbond/w83627hf/devtree.asl | 1507 ++++++++++++++++++++++++++++++
1 files changed, 1507 insertions(+), 0 deletions(-)
diff --git a/src/superio/winbond/w83627hf/devtree.asl b/src/superio/winbond/w83627hf/devtree.asl
new file mode 100644
index 0000000..912f299
--- /dev/null
+++ b/src/superio/winbond/w83627hf/devtree.asl
@@ -0,0 +1,1507 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2011 Christoph Grenz <christophg+cb(a)grenz-bonn.de>
+ *
+ * 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
+ */
+
+/*
+ * include this file into a mainboards DSDT and it will expose the W83627HF
+ * SuperIO and its functionality in the _SB device tree.
+ *
+ * Devices are marked as nonexistant if they got 0x00000000 as I/O base address
+ * (compatibilty with legacy bios, which disables logical devices that way)
+ *
+ * It allows the change of IO ports, IRQs and DMA settings on most logical
+ * devices, disabling and reenabling logical devices and controlling power
+ * saving mode on logical devices or the whole chip.
+ *
+ * Notes:
+ * - ECP mode of parallel port not implemented, DMA settings of parallel port
+ * will be reset on DSDT init
+ * - Hardware monitor is only shown as "Motherboard Resource", shows no real
+ * functionality
+ *
+ * Controllable through preprocessor macros:
+ * NO_W83627HF_FDC: don't expose the floppy disk controller
+ * NO_W83627HF_FDC_ENUM: don't try to enumerate the connected floppy drives
+ * NO_W83627HF_PPORT: don't expose the parallel port
+ * NO_W83627HF_UARTA: don't expose the first serial port
+ * NO_W83627HF_UARTB: don't expose the second serial port (already hidden
+ * if UARTB is configured as IRDA port by firmware)
+ * NO_W83627HF_IRDA: don't expose the IRDA port (already hidden if UARTB is
+ * configured as serial port by firmware)
+ * NO_W83627HF_CIR: don't expose the Consumer Infrared functionality
+ * NO_W83627HF_KBC: don't expose the keyboard controller
+ * NO_W83627HF_PS2M: don't expose the PS/2 mouse functionality of the
+ * keyboard controller
+ * NO_W83627HF_GAME: don't expose the game port
+ * NO_W83627HF_MIDI: don't expose the MIDI port
+ * NO_W83627HF_HWMON: don't expose the hardware monitor as
+ * PnP "Motherboard Ressource"
+ */
+DefinitionBlock ("dsdt.aml", "DSDT", 1, "VIAK8T", "AWRDACPI", 0x00001000)
+{
+
+Scope (\_SB)
+{
+
+ Device(SIO) {
+ Name (_HID, EisaId("PNP0A05"))
+ Name (_STR, Unicode("Winbond W83627HF SuperIO"))
+ Name (_UID, "w83627hf")
+
+ /* Mutex for accesses to the configuration ports (prolog and epilog commands are used, so synchronization is useful) */
+ Mutex(CRMX, 1)
+
+ /* SuperIO configuration ports */
+ OperationRegion (CREG, SystemIO, 0x2E, 0x02)
+ Field (CREG, ByteAcc, NoLock, Preserve)
+ {
+ ADDR, 8,
+ DATA, 8
+ }
+ IndexField (CREG, DATA, ByteAcc, NoLock, Preserve)
+ {
+ Offset (0x02),
+ RST, 1, /* Soft reset */
+ , 7,
+ Offset (0x07),
+ LDN, 8, /* Logical device selector */
+ Offset (0x20),
+ DID, 8, /* Device ID */
+ DREV, 8, /* Device Revision */
+ POWC, 8,
+ FDPW, 1, /* FDC Power Down */
+ , 2,
+ PRPW, 1, /* PRT Power Down */
+ UAPW, 1, /* UART A Power Down */
+ UBPW, 1, /* UART B Power Down */
+ HWPW, 1, /* HWM Power Down */
+ , 1,
+ IPD, 1, /* Immediate Chip Power Down */
+ , 7,
+ PNPS, 1, /* PnP Address Select Register Default Value Mode */
+ , 1,
+ KBCR, 1, /* KBC enabled after system reset (read-only) */
+ , 3,
+ CLKS, 1, /* Clock select */
+ AQ16, 1, /* 16bit Address Qualification */
+ FDCT, 1, /* Tristate FDC (?) */
+ , 2,
+ PRTT, 1, /* Tristate parallel port (?) */
+ URAT, 1, /* Tristate UART A (?) */
+ URBT, 1, /* Tristate UART B (?) */
+ , 2,
+ URAI, 1, /* UART A Legacy IRQ Select Disable */
+ URBI, 1, /* UART B Legacy IRQ Select Disable */
+ PRTI, 1, /* Parallel Port Legacy IRQ/DRQ Select Disable */
+ FDCI, 1, /* FDC Legacy IRQ/DRQ Select Disable */
+ , 1,
+ LCKC, 1, /* Lock Configuration Registers */
+ Offset (0x29),
+ IO3S, 8, /* GPIO3 pin selection register */
+ ACTR, 1, /* Logical device activation */
+ ACT1, 1, /* Logical part activation 1 (mostly unused) */
+ ACT2, 1, /* Logical part activation 2 (mostly unused) */
+ , 5,
+ Offset (0x60),
+ IO1H, 8, /* First I/O port base - high byte */
+ IO1L, 8, /* First I/O port base - low byte */
+ IO2H, 8, /* Second I/O port base - high byte */
+ IO2L, 8, /* Second I/O port base - low byte */
+ Offset (0x70),
+ IRQ0, 8, /* First IRQ */
+ Offset (0x72),
+ IRQ1, 8, /* First IRQ */
+ Offset (0x74),
+ DMA0, 8, /* DMA */
+ Offset (0xE0),
+ /* CRE0-CRE4: function logical device dependant, seems to be reserved for ACPI settings */
+ CRE0, 8,
+ CRE1, 8,
+ CRE2, 8,
+ CRE3, 8,
+ CRE4, 8,
+ Offset (0xF0),
+ /* OPT1-OPTA aka CRF0-CRF9: function logical device dependant */
+ OPT1, 8,
+ OPT2, 8,
+ OPT3, 8,
+ OPT4, 8,
+ OPT5, 8,
+ OPT6, 8,
+ OPT7, 8,
+ OPT8, 8,
+ OPT9, 8,
+ OPTA, 8
+ }
+
+ Name (_CRS, ResourceTemplate () {
+ IO (Decode16, 0x002E, 0x002E, 0x02, 0x01) /* Announce the used I/O ports to the OS */
+ IO (Decode16, 0x004E, 0x004E, 0x01, 0x01) /* this port is used in some configurations, so announce it to be sure */
+ })
+
+ /* Enter configuration mode (and aquire mutex)
+ Method must be run before accesssing the configuration region.
+ */
+ Method (ENCM)
+ {
+ Acquire (CRMX, 0xFFFF)
+ Store (0x87, ADDR)
+ Store (0x87, ADDR)
+ }
+
+ /* Exit configuration mode (and release mutex)
+ Method must be run after accessing the configuration region.
+ */
+ Method (EXCM)
+ {
+ Release (CRMX)
+ Store (0xAA, ADDR)
+ }
+
+ /* PM: indicate IPD (Immediate Power Down) bit state as D0/D2 */
+ Method (_PSC) {
+ ENCM ()
+ Store (IPD, Local0)
+ EXCM ()
+ If (Local0) { Return (2) }
+ Else { Return (0) }
+ }
+
+ /* PM: Switch to D0 by setting IPD low */
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, IPD)
+ EXCM ()
+ }
+
+ /* PM: Switch to D2 by setting IPD high */
+ Method (_PS2) {
+ ENCM ()
+ Store (One, IPD)
+ EXCM ()
+ }
+
+ #ifndef NO_W83627HF_FDC
+ /* =================== Floppy Disk Controller ================ */
+ Device (FDC0) {
+ Name (_HID, EisaId ("PNP0700"))
+ Name (_STR, Unicode ("W83627HF Floppy Disk Controller"))
+ Name (_UID, "w83627hf-fdc")
+
+ #ifndef NO_W83627HF_FDC_ENUM
+ /* Initialization method: Should be run once on boot
+ If FDC is active, enumerate all connected devices */
+ Method (_INI) {
+ ENCM ()
+ Store (0x00, LDN)
+ Store (ACTR, Local0)
+ Store (IO1H, Local1)
+ Store (IO1L, Local2)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or(Local1, Local2, Local1)
+ If (Local0) {
+ /* Try probing drives and save result in _FDE */
+ PROB(Local1)
+ }
+ }
+ #endif
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x00, LDN)
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_PSC) {
+ Store(^^_PSC (), Local0)
+ If (Local0) { Return (Local0) }
+ ENCM ()
+ Store (FDPW, Local0)
+ EXCM ()
+ If (Local0) { Return (1) }
+ Else { Return (0) }
+ }
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, FDPW)
+ EXCM ()
+ }
+ Method (_PS1) {
+ ENCM ()
+ Store (One, FDPW)
+ EXCM ()
+ }
+ Name (_PR0, Package () { ^^ })
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x00, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x06, IO0)
+ IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
+ IRQNoFlags () {6}
+ DMA (Compatibility, NotBusMaster, Transfer8) {2}
+ })
+ ENCM ()
+ Store (0x00, LDN)
+ Store(IO1H, Local0)
+ Store(IO1L, Local1)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFnNoPri ()
+ {
+ IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
+ IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
+ IRQNoFlags () {6}
+ DMA (Compatibility, NotBusMaster, Transfer8) {2}
+ }
+ EndDependentFn ()
+ })
+
+ #ifndef NO_W83627HF_FDC_ENUM
+ Name(_FDE, Buffer(){0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})
+ #endif
+
+ Method (PROB, 1) {
+ #ifndef NO_W83627HF_FDC_ENUM
+ /* Try probing drives and save result in _FDE */
+ OperationRegion (FIO1, SystemIO, Arg0, 0x06)
+ Field (FIO1, ByteAcc, NoLock, Preserve)
+ {
+ Offset(0x02),
+ SELE, 2,
+ RSTL, 1,
+ IDMA, 1,
+ ACT1, 1,
+ ACT2, 1,
+ ACT3, 1,
+ ACT4, 1,
+ Offset(0x04),
+ BSY1, 1,
+ BSY2, 1,
+ BSY3, 1,
+ BSY4, 1,
+ BUSY, 1,
+ NDMA, 1,
+ IODI, 1,
+ RDY, 1,
+ DATA, 8,
+ }
+ OperationRegion (FIO2, SystemIO, 0x3F7, 0x01)
+
+ CreateByteField (_FDE, 3, FD1)
+ CreateByteField (_FDE, 7, FD2)
+ CreateByteField (_FDE, 11, FD3)
+ CreateByteField (_FDE, 15, FD4)
+
+ Store(One, ACT1)
+ Store(0, SELE)
+ Sleep(0x64)
+ If (FIO2) { Store (One, FD1) }
+
+ Store(Zero, ACT1)
+ Store(One, ACT2)
+ Store(1, SELE)
+ Sleep(0x64)
+ If (FIO2) { Store (One, FD2) }
+
+ Store(Zero, ACT2)
+ Store(One, ACT3)
+ Store(2, SELE)
+ Sleep(0x64)
+ If (FIO2) { Store (One, FD3) }
+
+ Store(Zero, ACT3)
+ Store(One, ACT4)
+ Store(3, SELE)
+ Sleep(0x64)
+ If (FIO2) { Store (One, FD4) }
+ Store(Zero, ACT4)
+ Store(Zero, SELE)
+ #endif
+ }
+
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 1, 6, IO0)
+ IO (Decode16, 0, 0, 1, 1, IO1)
+ IRQNoFlags (IRQ0) {}
+ DMA (Compatibility, NotBusMaster, Transfer8, DMA0) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateWordField (Arg0, IO1._MIN, IOA1)
+ CreateByteField (Arg0, IRQ0._INT, IRQL)
+ CreateByteField (Arg0, DMA0._DMA, DMCH)
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ ENCM ()
+ Store (0, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ Store (One, ACTR)
+ EXCM ()
+
+ /* Try probing drives and save result in _FDE */
+ PROB(IOA0)
+ }
+ }
+ #endif
+
+ #ifndef NO_W83627HF_PPORT
+ /* ======================== Parallel Port ======================== */
+ /* Currently no ECP support */
+ Device (PAR0) {
+ Name (_HID, EisaId ("PNP0400"))
+ Name (_DDN, "LPT1")
+ Name (_UID, "w83627hf-pport")
+
+ Method (MODE, 1) {
+ And(Arg0, 0x07, Local0)
+ ENCM ()
+ Store (0x01, LDN)
+ And(OPT1, 0x3, Local1)
+ Or(Local1, Local0, OPT1)
+ EXCM()
+ }
+
+ Method (_INI)
+ {
+ /* Deactivate DMA, even if set by BIOS */
+ ENCM ()
+ Store (0x01, LDN)
+ Store (0x04, DMA0)
+ EXCM ()
+ }
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x01, LDN)
+ And(OPT1, 0x3, Local1)
+ If (ACTR) {
+ If (LNotEqual(Local1, 2)) {
+ Store (0x0D, Local0)
+ } Else {
+ Store (0x0D, Local0)
+ }
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_PSC) {
+ Store(^^_PSC (), Local0)
+ If (Local0) { Return (Local0) }
+ ENCM ()
+ Store (PRPW, Local0)
+ EXCM ()
+ If (Local0) { Return (1) }
+ Else { Return (0) }
+ }
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, PRPW)
+ EXCM ()
+ }
+ Method (_PS1) {
+ ENCM ()
+ Store (One, PRPW)
+ EXCM ()
+ }
+ Name (_PR0, Package () { ^^ })
+
+ Method (_DIS) {
+ ENCM ()
+ Store (0x01, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate ()
+ {
+ IO (Decode16, 0x0000, 0x0000, 0x04, 0x08, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (CRS, IO0._MIN, IOP0)
+ CreateWordField (CRS, IO0._MAX, IOR0)
+ CreateByteField (CRS, IO0._ALN, IOAL)
+ CreateByteField (CRS, IO0._LEN, IOLE)
+ CreateWordField (CRS, IRQX._INT, IRQW)
+
+ ENCM ()
+ Store (0x01, LDN)
+ Store (IO1L, Local0)
+ Store (IO1H, Local1)
+ Store (OPT1, Local2)
+ Store (IRQ0, Local5)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or (Local1, Local0, Local1)
+
+ And(Local2, 0x3, Local3)
+ And(Local2, 0x4, Local4)
+ If (Local4) {
+ Store(0x04, IOAL)
+ }
+
+ Store(Local1, IOP0)
+ Store(Local1, IOR0)
+
+ If (LEqual (Local0, 0xBC))
+ {
+ Store (0x04, IOLE)
+ }
+ Else
+ {
+ Store (0x08, IOLE)
+ }
+
+ Store (One, Local0)
+ ShiftLeft (Local0, Local5, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,1)
+ {
+ IO (Decode16, 0x0378, 0x0378, 0x04, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,1)
+ {
+ IO (Decode16, 0x0278, 0x0278, 0x04, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,1)
+ {
+ IO (Decode16, 0x03BC, 0x03BC, 0x04, 0x04)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,0)
+ {
+ IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,0)
+ {
+ IO (Decode16, 0x0278, 0x0278, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (2,0)
+ {
+ IO (Decode16, 0x0100, 0x0FFC, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (2,1)
+ {
+ IO (Decode16, 0x0100, 0x0FFC, 0x04, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ EndDependentFn ()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 4, 4, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateWordField (Arg0, IO0._MIN, IOA1)
+ CreateByteField (Arg0, IO0._ALN, IOAL)
+ CreateByteField (Arg0, IO0._LEN, IOLE)
+ CreateWordField (Arg0, IRQX._INT, IRQL)
+
+ If (LEqual(IOAL, 4)) {
+ Store(0x0, Local2)
+ } else {
+ Store(0x1, Local2)
+ }
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ ENCM ()
+ Store (0x01, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ /*Mode*/
+ Store (OPT1, Local3)
+ And (Local3, 0xF8, Local3)
+ Or (Local2, Local3, OPT1)
+ /*DMA off*/
+ Store (0x04, DMA0)
+ /*IRQ*/
+ FindSetLeftBit (IRQL, Local3)
+ Subtract (Local3, 0x01, Local3)
+ Store (Local3, IRQ0)
+ /*Activate*/
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #endif
+
+ #ifndef NO_W83627HF_UARTA
+ /* =========================== UART A ============================ */
+ Device (SER0) {
+ Name (_HID, EisaId ("PNP0501"))
+ Name (_UID, "w83627hf-uarta")
+ Name (_DDN, "COM1")
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x02, LDN)
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_PSC) {
+ Store(^^_PSC (), Local0)
+ If (Local0) { Return (Local0) }
+ ENCM ()
+ Store (UAPW, Local0)
+ EXCM ()
+ If (Local0) { Return (1) }
+ Else { Return (0) }
+ }
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, UAPW)
+ EXCM ()
+ }
+ Method (_PS1) {
+ ENCM ()
+ Store (One, UAPW)
+ EXCM ()
+ }
+ Name (_PR0, Package () { ^^ })
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x02, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x08, IO0)
+ IRQNoFlags (IRQX) {6}
+ })
+ ENCM ()
+ Store (0x02, LDN)
+ Store(IO1H, Local1)
+ Store(IO1L, Local0)
+ Store(IRQ0, Local2)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x02F8, 0x02F8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (1,0) {
+ IO (Decode16, 0x03E8, 0x03E8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (1,0) {
+ IO (Decode16, 0x02E8, 0x02E8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (2,0) {
+ IO (Decode16, 0x0100, 0x0FF8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ EndDependentFn()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 1, 6, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateByteField (Arg0, IRQX._INT, IRQL)
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ FindSetLeftBit (IRQL, Local3)
+ Subtract (Local3, 0x01, Local3)
+
+ ENCM ()
+ Store (2, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ Store (Local3, IRQ0)
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #endif
+
+ #ifndef NO_W83627HF_UARTB
+ /* =========================== UART B ============================ */
+ Device (SER1) {
+ Name (_HID, EisaId ("PNP0501"))
+ Name (_UID, "w83627hf-uartb")
+ Name (_DDN, "COM2")
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x03, LDN)
+ If (LNot(And(OPT2, 0x30)))
+ {
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_PSC) {
+ Store(^^_PSC (), Local0)
+ If (Local0) { Return (Local0) }
+ ENCM ()
+ Store (UBPW, Local0)
+ EXCM ()
+ If (Local0) { Return (1) }
+ Else { Return (0) }
+ }
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, UBPW)
+ EXCM ()
+ }
+ Method (_PS1) {
+ ENCM ()
+ Store (One, UBPW)
+ EXCM ()
+ }
+ Name (_PR0, Package () { ^^ })
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x03, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x08, IO0)
+ IRQNoFlags (IRQX) {6}
+ })
+ ENCM ()
+ Store (0x03, LDN)
+ Store(IO1H, Local1)
+ Store(IO1L, Local0)
+ Store(IRQ0, Local2)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x02F8, 0x02F8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (1,0) {
+ IO (Decode16, 0x03E8, 0x03E8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (1,0) {
+ IO (Decode16, 0x02E8, 0x02E8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (2,0) {
+ IO (Decode16, 0x0100, 0x0FF8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ EndDependentFn()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 1, 8, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateByteField (Arg0, IRQX._INT, IRQL)
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ FindSetLeftBit (IRQL, Local3)
+ Subtract (Local3, 0x01, Local3)
+
+ ENCM ()
+ Store (3, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ Store (Local3, IRQ0)
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #endif
+
+ #ifndef NO_W83627HF_IRDA
+ /* ======================== UART B (IRDA) ======================== */
+ Device (IRDA) {
+ Name (_HID, EisaId ("PNP0510"))
+ Name (_UID, "w83627hf-irda")
+ Name (_STR, Unicode("IrDA Port"))
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x03, LDN)
+ If (And(OPT2, 0x30))
+ {
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_PSC) {
+ Store(^^_PSC (), Local0)
+ If (Local0) { Return (Local0) }
+ ENCM ()
+ Store (UBPW, Local0)
+ EXCM ()
+ If (Local0) { Return (1) }
+ Else { Return (0) }
+ }
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, UBPW)
+ EXCM ()
+ }
+ Method (_PS1) {
+ ENCM ()
+ Store (One, UBPW)
+ EXCM ()
+ }
+ Name (_PR0, Package () { ^^ })
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x03, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x08, IO0)
+ IRQNoFlags (IRQX) {6}
+ })
+ ENCM ()
+ Store (0x03, LDN)
+ Store(IO1H, Local1)
+ Store(IO1L, Local0)
+ Store(IRQ0, Local2)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x02F8, 0x02F8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (1,0) {
+ IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x03E8, 0x03E8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x02E8, 0x02E8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ StartDependentFn (2,0) {
+ IO (Decode16, 0x0100, 0x0FF8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ EndDependentFn()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 1, 8, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateByteField (Arg0, IRQX._INT, IRQL)
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ FindSetLeftBit (IRQL, Local3)
+ Subtract (Local3, 0x01, Local3)
+
+ ENCM ()
+ Store (3, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ Store (Local3, IRQ0)
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #endif
+
+ #ifndef NO_W83627HF_CIR
+ /* ========================= Consumer IR ========================= */
+ Device (CIR0) {
+ Name (_HID, EisaId ("WEC1022")) /* Should be the correct one */
+ Name (_UID, "w83627hf-cir")
+ Name (_STR, Unicode("Winbond Consumer Infrared Transceiver"))
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x06, LDN)
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x06, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x08, IO0)
+ IRQNoFlags (IRQX) {6}
+ })
+ ENCM ()
+ Store (0x03, LDN)
+ Store(IO1H, Local1)
+ Store(IO1L, Local0)
+ Store(IRQ0, Local2)
+ EXCM ()
+ ShiftLeft(Local1, 8, Local1)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x0100, 0x0FF8, 0x08, 0x08)
+ IRQNoFlags () {3,4,5,7,9,10,11,12}
+ }
+ EndDependentFn()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 1, 8, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateByteField (Arg0, IRQX._INT, IRQL)
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ FindSetLeftBit (IRQL, Local3)
+ Subtract (Local3, 0x01, Local3)
+
+ ENCM ()
+ Store (6, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ Store (Local3, IRQ0)
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #endif
+
+ #ifndef NO_W83627HF_KBC
+ /* ===================== Keyboard Controller ===================== */
+ Device (KBD0) {
+ Name (_HID, EisaId ("PNP0303"))
+ Name (_CID, 0x0B03D041)
+ Name (_UID, "w83627hf-kbc")
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x05, LDN)
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (Lor(LOr (IO1H, IO1L), LOr (IO2H, IO2L)))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x05, LDN)
+ Store (Zero, ACTR)
+ EXCM ()
+ Notify(PS2M, 1)
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO0)
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO1)
+ IRQNoFlags (IRQX) {}
+ })
+ ENCM ()
+ Store (0x05, LDN)
+ Store(IO1H, Local0)
+ Store(IO1L, Local1)
+ Store(IO2H, Local2)
+ Store(IO2L, Local3)
+ Store(IRQ0, Local4)
+ EXCM ()
+ ShiftLeft(Local0, 8, Local0)
+ Or (Local1, Local0, Local0)
+
+ ShiftLeft(Local2, 8, Local2)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ CreateWordField (CRS, IO1._MIN, I1MI)
+ Store (Local2, I1MI)
+ CreateWordField (CRS, IO1._MAX, I1MA)
+ Store (Local2, I1MA)
+
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local5)
+ ShiftLeft (Local5, Local4, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,0) {
+ IO (Decode16, 0x0060, 0x0060, 0x01, 0x01)
+ IO (Decode16, 0x0064, 0x0064, 0x01, 0x01)
+ IRQNoFlags () {1}
+ }
+ EndDependentFn()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IO (Decode16, 0, 0, 1, 1, IO0)
+ IO (Decode16, 0, 0, 1, 1, IO1)
+ IRQNoFlags (IRQX) {}
+ })
+ CreateWordField (Arg0, IO0._MIN, IOA0)
+ CreateWordField (Arg0, IO1._MIN, IOA1)
+ CreateByteField (Arg0, IRQX._INT, IRQL)
+
+ Divide(IOA0, 256, Local0, Local1)
+ ShiftRight(Local1, 8, Local1)
+
+ Divide(IOA1, 256, Local2, Local3)
+ ShiftRight(Local1, 8, Local1)
+
+ FindSetLeftBit (IRQL, Local4)
+ Subtract (Local4, 0x01, Local4)
+
+ ENCM ()
+ Store (5, LDN)
+ Store (Local1, IO1H)
+ Store (Local0, IO1L)
+ Store (Local3, IO2H)
+ Store (Local2, IO2L)
+ Store (Local3, IRQ0)
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #ifndef NO_W83627HF_PS2M
+ Device (PS2M) {
+ Name (_HID, EisaId ("PNP0F13"))
+ Name (_UID, "w83627hf-ps2m")
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x05, LDN)
+ If (LAnd(ACTR, IRQ1) ) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (Lor(LOr (IO1H, IO1L), LOr (IO2H, IO2L)))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_DIS)
+ {
+ ENCM ()
+ Store (0x05, LDN)
+ Store (Zero, IRQ1)
+ EXCM ()
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IRQNoFlags (IRQX) {}
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO0)
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO1)
+ })
+ ENCM ()
+ Store (0x05, LDN)
+ Store(IO1H, Local0)
+ Store(IO1L, Local1)
+ Store(IO2H, Local2)
+ Store(IO2L, Local3)
+ Store(IRQ1, Local4)
+ EXCM ()
+ ShiftLeft(Local0, 8, Local0)
+ Or (Local1, Local0, Local0)
+
+ ShiftLeft(Local2, 8, Local2)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ CreateWordField (CRS, IO1._MIN, I1MI)
+ Store (Local2, I1MI)
+ CreateWordField (CRS, IO1._MAX, I1MA)
+ Store (Local2, I1MA)
+
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local5)
+ ShiftLeft (Local5, Local4, IRQW)
+
+ Return (CRS)
+ }
+
+ Name (_PRS, ResourceTemplate ()
+ {
+ StartDependentFn (0,0) {
+ IRQNoFlags () {12}
+ }
+ StartDependentFn (2,0) {
+ IRQNoFlags () {1,3,4,5,6,7,9,10,11,12}
+ }
+ EndDependentFn()
+ })
+
+ Method (_SRS, 1, Serialized)
+ {
+ Name (TMPL, ResourceTemplate () {
+ IRQNoFlags (IRQX) {}
+ })
+ CreateByteField (Arg0, IRQX._INT, IRQL)
+
+ FindSetLeftBit (IRQL, Local0)
+ Subtract (Local0, 0x01, Local0)
+
+ ENCM ()
+ Store (5, LDN)
+ Store (Local0, IRQ1)
+ /* Only activates if KBD is active */
+ Store (One, ACTR)
+ EXCM ()
+ }
+ }
+ #endif
+ #endif
+
+ #ifndef NO_W83627HF_GAME
+ /* ========================== Game Port ========================== */
+ Device (GAME) {
+ Name (_HID, EisaId ("PNPB02F"))
+ Name (_STR, Unicode ("Joystick/Game Port"))
+ Name (_UID, "w83627hf-game")
+
+ Method (_STA) {
+ ENCM ()
+ Store(0, Local0)
+ Store (0x07, LDN)
+ If (LOr(IO1L, IO1H)) {
+ If (LOr(ACTR, ACT1)) {
+ Store (0x0F, Local0)
+ }
+ Else {
+ Store (0x0D, Local0)
+ }
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ ENCM ()
+ Store (0x07, LDN)
+ Store(IO1H, Local0)
+ Store(IO1L, Local1)
+ Store(IRQ0, Local2)
+ EXCM ()
+ ShiftLeft(Local0, 8, Local0)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ If (Local2) {
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+ }
+
+ Return (CRS)
+ }
+
+ }
+ #endif
+
+ #ifndef NO_W83627HF_MIDI
+ /* ========================== MIDI Port ========================== */
+ Device (MIDI) {
+ Name (_HID, EisaId ("PNPB006"))
+ Name (_STR, Unicode ("MPU-401 Compatible MIDI Port"))
+ Name (_UID, "w83627hf-midi")
+
+ Method (_STA) {
+ ENCM ()
+ Store(0, Local0)
+ Store (0x07, LDN)
+ If (LOr(IO2L, IO2H)) {
+ If (LOr(ACTR, ACT2)) {
+ Store (0x0F, Local0)
+ }
+ Else {
+ Store (0x0D, Local0)
+ }
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x02, 0x02, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ ENCM ()
+ Store (0x07, LDN)
+ Store(IO2H, Local0)
+ Store(IO2L, Local1)
+ Store(IRQ1, Local2)
+ EXCM ()
+ ShiftLeft(Local0, 8, Local0)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ If (Local2) {
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+ }
+
+ Return (CRS)
+ }
+
+ }
+ #endif
+
+ /* ==== Suspend LED control if it is connected to the SuperIO ==== */
+ Method (SLED, 1) {
+ ENCM ()
+ Store (9, LDN)
+ Store(OPT4, Local0)
+ And(Local0, 63, Local0)
+ Or(Local0, ShiftLeft(And(Arg0, 0x03), 6), OPT4)
+ EXCM ()
+ }
+
+ /* ===== Power LED control if it is connected to the SuperIO ===== */
+ Method (PLED, 1) {
+ ENCM ()
+ Store (8, LDN)
+ Store(OPT4, Local0)
+ And(Local0, 63, Local0)
+ Or(Local0, ShiftLeft(And(Arg0, 0x03), 6), OPT4)
+ EXCM ()
+ }
+
+ #ifndef NO_W83627HF_HWMON
+ /* ====================== Hardware Monitor ======================= */
+ Device (HMON) {
+ Name (_HID, EisaId ("PNP0C02")) // TODO: find better matching ID
+ Name (_STR, Unicode("W83627 Hardware Monitor"))
+ Name (_UID, "w83627hf-hwmon")
+
+ Method (_STA)
+ {
+ Store (0x00, Local0)
+ ENCM ()
+ Store (0x0B, LDN)
+ If (ACTR) {
+ Store (0x0F, Local0)
+ }
+ ElseIf (LOr (IO1H, IO1L))
+ {
+ Store (0x0D, Local0)
+ }
+ EXCM ()
+ Return (Local0)
+ }
+
+ Method (_PSC) {
+ Store(^^_PSC (), Local0)
+ If (Local0) { Return (Local0) }
+ ENCM ()
+ Store (HWPW, Local0)
+ EXCM ()
+ If (Local0) { Return (1) }
+ Else { Return (0) }
+ }
+ Method (_PS0) {
+ ENCM ()
+ Store (Zero, HWPW)
+ EXCM ()
+ }
+ Method (_PS1) {
+ ENCM ()
+ Store (One, HWPW)
+ EXCM ()
+ }
+ Name (_PR0, Package () { ^^ })
+
+ Method (_CRS)
+ {
+ Name (CRS, ResourceTemplate () {
+ IO (Decode16, 0x0000, 0x0000, 0x08, 0x02, IO0)
+ IRQNoFlags (IRQX) {}
+ })
+ ENCM ()
+ Store (0x0B, LDN)
+ Store(IO1H, Local0)
+ Store(IO1L, Local1)
+ Store(IRQ1, Local2)
+ EXCM ()
+ ShiftLeft(Local0, 8, Local0)
+ Or (Local1, Local0, Local0)
+
+ CreateWordField (CRS, IO0._MIN, IMIN)
+ Store (Local0, IMIN)
+ CreateWordField (CRS, IO0._MAX, IMAX)
+ Store (Local0, IMAX)
+
+ If (Local2) {
+ CreateWordField (CRS, IRQX._INT, IRQW)
+ Store (One, Local3)
+ ShiftLeft (Local3, Local2, IRQW)
+ }
+ Return (CRS)
+ }
+ }
+ #endif
+ }
+}
+}
\ No newline at end of file
1
0

New patch to review for coreboot: 2ac1ddc console: support integrated 7-segment displays for POST codes
by Christoph Grenz Sept. 18, 2011
by Christoph Grenz Sept. 18, 2011
Sept. 18, 2011
Christoph Grenz (christophg+cb(a)grenz-bonn.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/221
-gerrit
commit 2ac1ddc502e9b7e50eb07f17e8ce1fe4d98234eb
Author: Christoph Grenz <christophg+cb(a)grenz-bonn.de>
Date: Sun Sep 18 22:54:51 2011 +0200
console: support integrated 7-segment displays for POST codes
Add a configuration option BOARD_POST and for use by mainboard
Kconfig code BOARD_HAS_POST_DEV and MAINBOARD_POST_PORT to
allow printing POST codes on 7-segment displays on some mainboards
which are connected to an I/O port.
For example the Abit AV8 has a POST display on port 0xE8.
Change-Id: I8f8e820f8c75641b35e7249bf622b63a3604b9f3
Signed-off-by: Christoph Grenz <christophg+cb(a)grenz-bonn.de>
---
src/console/Kconfig | 9 +++++++++
src/console/post.c | 3 +++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 02244d7..6f12414 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -333,6 +333,15 @@ config NO_POST
bool "Don't show any POST codes"
default n
+config BOARD_HAS_POST_DEV
+ bool
+ default n
+
+config BOARD_POST
+ bool "Show POST codes on mainboard specific display"
+ depends on !NO_POST && BOARD_HAS_POST_DEV
+ default n
+
config CONSOLE_POST
bool "Show POST codes on the debug console"
depends on !NO_POST
diff --git a/src/console/post.c b/src/console/post.c
index 3872c2d..934136a 100644
--- a/src/console/post.c
+++ b/src/console/post.c
@@ -33,5 +33,8 @@ void post_code(uint8_t value)
print_emerg("\n");
#endif
outb(value, 0x80);
+ #if CONFIG_BOARD_POST
+ outb(value, CONFIG_MAINBOARD_POST_PORT);
+ #endif
#endif
}
1
0

Re: [coreboot] Porting Asus A8V-VM: Problem with initializing the SuperIO
by Rudolf Marek Sept. 18, 2011
by Rudolf Marek Sept. 18, 2011
Sept. 18, 2011
Hi,
Try changing ROMSTRAP if the M2V-MX SE works than it might be this. Go to the
src/southbridge/via/romstrap.inc and change the romstrap to use the K8T890
instead of K8M890. I think both differs only in one byte 0xaa versus 0xff
In other words check if with changed ROMSIP something changes. I guess this is
the only remaining difference between the SerialICE and coreboot.
Let me know if this works for you.
Thanks
Rudolf
2
1

Patch merged into coreboot/master: f87cf03 Persimmon doesn't have HDMI so the GNB HD Audio should be disabled.
by gerrit@coreboot.org Sept. 17, 2011
by gerrit@coreboot.org Sept. 17, 2011
Sept. 17, 2011
the following patch was just integrated into master:
commit f87cf03db257d79a975c6feb9c0e0f533eb1233d
Author: Marc Jones <marcj303(a)gmail.com>
Date: Fri Sep 16 17:06:17 2011 -0600
Persimmon doesn't have HDMI so the GNB HD Audio should be disabled.
Change-Id: Ic960fe09fbed2c8a31c7c9ac2c54f6c88efebed3
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
See http://review.coreboot.org/219 for details.
-gerrit
1
0

Patch merged into coreboot/master: abf6023 Enable SATA AHCI for faster boot with SeaBIOS.
by gerrit@coreboot.org Sept. 17, 2011
by gerrit@coreboot.org Sept. 17, 2011
Sept. 17, 2011
the following patch was just integrated into master:
commit abf6023240551414875109227f4f3e13465738d9
Author: Marc Jones <marcj303(a)gmail.com>
Date: Fri Sep 16 17:08:01 2011 -0600
Enable SATA AHCI for faster boot with SeaBIOS.
Change-Id: Ibd87422680350c112eabe1bb73b237031c3e9d6b
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
See http://review.coreboot.org/220 for details.
-gerrit
1
0

New patch to review for coreboot: f87cf03 Persimmon doesn't have HDMI so the GNB HD Audio should be disabled.
by Marc Jones Sept. 17, 2011
by Marc Jones Sept. 17, 2011
Sept. 17, 2011
Marc Jones (marcj303(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/219
-gerrit
commit f87cf03db257d79a975c6feb9c0e0f533eb1233d
Author: Marc Jones <marcj303(a)gmail.com>
Date: Fri Sep 16 17:06:17 2011 -0600
Persimmon doesn't have HDMI so the GNB HD Audio should be disabled.
Change-Id: Ic960fe09fbed2c8a31c7c9ac2c54f6c88efebed3
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
---
src/mainboard/amd/persimmon/buildOpts.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/mainboard/amd/persimmon/buildOpts.c b/src/mainboard/amd/persimmon/buildOpts.c
index c6dc43d..8025f4f 100644
--- a/src/mainboard/amd/persimmon/buildOpts.c
+++ b/src/mainboard/amd/persimmon/buildOpts.c
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
+
/**
* @file
*
@@ -55,13 +55,13 @@
#define INSTALL_FT1_SOCKET_SUPPORT TRUE
#define INSTALL_AM3_SOCKET_SUPPORT FALSE
-/*
- * Agesa optional capabilities selection.
+/*
+ * Agesa optional capabilities selection.
* Uncomment and mark FALSE those features you wish to include in the build.
* Comment out or mark TRUE those features you want to REMOVE from the build.
*/
-#define BLDOPT_REMOVE_FAMILY_10_SUPPORT TRUE
+#define BLDOPT_REMOVE_FAMILY_10_SUPPORT TRUE
#define BLDOPT_REMOVE_FAMILY_12_SUPPORT TRUE
#define BLDOPT_REMOVE_FAMILY_14_SUPPORT FALSE
#define BLDOPT_REMOVE_FAMILY_15_SUPPORT TRUE
@@ -102,7 +102,7 @@
#define BLDOPT_REMOVE_HT_ASSIST TRUE
#define BLDOPT_REMOVE_ATM_MODE TRUE
//#define BLDOPT_REMOVE_MSG_BASED_C1E TRUE
-//#define BLDOPT_REMOVE_LOW_POWER_STATE_FOR_PROCHOT TRUE
+//#define BLDOPT_REMOVE_LOW_POWER_STATE_FOR_PROCHOT TRUE
#define BLDOPT_REMOVE_MEM_RESTORE_SUPPORT FALSE
//#define BLDOPT_REMOVE_C6_STATE TRUE
#define BLDOPT_REMOVE_GFX_RECOVERY TRUE
@@ -176,7 +176,7 @@
//#define BLDCFG_SET_HTCRC_SYNC_FLOOD FALSE
//#define BLDCFG_USE_UNIT_ID_CLUMPING FALSE
//#define BLDCFG_SYSTEM_PHYSICAL_SOCKET_MAP 0
-//#define BLDCFG_CFG_GNB_HD_AUDIO TRUE
+#define BLDCFG_CFG_GNB_HD_AUDIO FALSE
//#define BLDCFG_CFG_ABM_SUPPORT FALSE
//#define BLDCFG_CFG_DYNAMIC_REFRESH_RATE 0
//#define BLDCFG_CFG_LCD_BACK_LIGHT_CONTROL 0
@@ -219,10 +219,10 @@
#define BLDCFG_HEAP_DRAM_ADDRESS 0xB0000
#define BLDCFG_CFG_TEMP_PCIE_MMIO_BASE_ADDRESS 0xD0000000
-/*
- * Agesa configuration values selection.
+/*
+ * Agesa configuration values selection.
* Uncomment and specify the value for the configuration options
- * needed by the system.
+ * needed by the system.
*/
#include "AGESA.h"
#include "CommonReturns.h"
1
0

New patch to review for coreboot: abf6023 Enable SATA AHCI for faster boot with SeaBIOS.
by Marc Jones Sept. 17, 2011
by Marc Jones Sept. 17, 2011
Sept. 17, 2011
Marc Jones (marcj303(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/220
-gerrit
commit abf6023240551414875109227f4f3e13465738d9
Author: Marc Jones <marcj303(a)gmail.com>
Date: Fri Sep 16 17:08:01 2011 -0600
Enable SATA AHCI for faster boot with SeaBIOS.
Change-Id: Ibd87422680350c112eabe1bb73b237031c3e9d6b
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
---
src/mainboard/amd/persimmon/platform_cfg.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mainboard/amd/persimmon/platform_cfg.h b/src/mainboard/amd/persimmon/platform_cfg.h
index 3323624..5e3c3f4 100644
--- a/src/mainboard/amd/persimmon/platform_cfg.h
+++ b/src/mainboard/amd/persimmon/platform_cfg.h
@@ -103,7 +103,7 @@
* @breif INCHIP Sata Controller Mode
* NOTE: DO NOT ALLOW SATA & IDE use same mode
*/
-#define SATA_MODE NATIVE_IDE_MODE
+#define SATA_MODE AHCI_MODE
/**
* @breif INCHIP Sata IDE Controller Mode
1
0

Patch merged into coreboot/master: 3376324 Persimmon updates for AMD F14 rev C0
by gerrit@coreboot.org Sept. 16, 2011
by gerrit@coreboot.org Sept. 16, 2011
Sept. 16, 2011
the following patch was just integrated into master:
commit 337632466e167e5dd89a11ca995f3bdddc09d656
Author: efdesign98 <efdesign98(a)gmail.com>
Date: Thu Sep 15 15:24:26 2011 -0600
Persimmon updates for AMD F14 rev C0
These are the changes for the AMD Persimmon mainboard
required to support the update of the AMD Family 14
cpu to rev C0. There are many warning fixes; the agesa-
wrapper.c file has been changed to fix the amdinitlate
and amdlaterunaptask routines, and more.
Change-Id: I6de43379a2819cea5169db5f21d4841f9a4942a7
Signed-off-by: Frank Vibrans <frank.vibrans(a)amd.com>
Signed-off-by: efdesign98 <efdesign98(a)gmail.com>
See http://review.coreboot.org/137 for details.
-gerrit
1
0