[coreboot] New patch to review for coreboot: 5b5b3de roda/rk886ex: Correct COMB irq reading / reduce warnings

Patrick Georgi (patrick@georgi-clan.de) gerrit at coreboot.org
Tue Nov 27 10:22:01 CET 2012


Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1923

-gerrit

commit 5b5b3de9984f742f7569d9e2f21be1181e033177
Author: Nico Huber <nico.huber at secunet.com>
Date:   Fri Sep 7 10:40:36 2012 +0200

    roda/rk886ex: Correct COMB irq reading / reduce warnings
    
    The calculation of COMB's irq reading was wrong by the 4-bit shift.
    Also, the asl compiler warned about the splitting in lo/hi bytes which
    seems unnecessary.
    
    Change-Id: Ia5101d5a19f68c2da827d7e37a18922f959604c7
    Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
 src/mainboard/roda/rk886ex/acpi/superio.asl | 57 ++++++++++++-----------------
 1 file changed, 23 insertions(+), 34 deletions(-)

diff --git a/src/mainboard/roda/rk886ex/acpi/superio.asl b/src/mainboard/roda/rk886ex/acpi/superio.asl
index 184ff29..174f2f1 100644
--- a/src/mainboard/roda/rk886ex/acpi/superio.asl
+++ b/src/mainboard/roda/rk886ex/acpi/superio.asl
@@ -130,28 +130,23 @@ Device (SIO1)
 				Return(NONE)
 			}
 
-			CreateByteField(RSRC,
-				\_SB.PCI0.LPCB.SIO1.COMA._CRS._IOA._MIN, IOLO)
-			CreateByteField(RSRC, 0x03, IOHI) // Why?
-			CreateByteField(RSRC,
-				\_SB.PCI0.LPCB.SIO1.COMA._CRS._IOA._MAX, IORL)
-			CreateByteField(RSRC, 0x05, IORH) // Why?
-			CreateByteField(RSRC,
-				\_SB.PCI0.LPCB.SIO1.COMA._CRS._IRA._INT, IRQL)
-
-			Store (READ(0, 0x24, 0xff), Local0)
-			And (Local0, 0xc0, Local1)
-			ShiftRight(Local1, 0x06, Local1)
+			CreateWordField(RSRC,
+				\_SB.PCI0.LPCB.SIO1.COMA._CRS._IOA._MIN, IOMN)
+			CreateWordField(RSRC,
+				\_SB.PCI0.LPCB.SIO1.COMA._CRS._IOA._MAX, IOMX)
+			CreateWordField(RSRC,
+				\_SB.PCI0.LPCB.SIO1.COMA._CRS._IRA._INT, IRQ)
+
+			/* I/O Base */
+			Store (READ(0, 0x24, 0xfe), Local0)
 			ShiftLeft(Local0, 0x02, Local0)
-			Store(Local0, IOLO)
-			Store(Local1, IOHI)
-			Store(IOLO, IORL)
-			Store(IOHI, IORH)
+			Store(Local0, IOMN)
+			Store(Local0, IOMX)
 
 			/* Interrupt */
 			Store(READ(0, 0x28, 0xf0), Local0)
 			ShiftRight(Local0, 4, Local0)
-			ShiftLeft(1, Local0, IRQL)
+			ShiftLeft(1, Local0, IRQ)
 			Return(RSRC)
 		}
 
@@ -289,28 +284,22 @@ Device (SIO1)
 				Return(NONE)
 			}
 
-			CreateByteField(RSRC,
-				\_SB.PCI0.LPCB.SIO1.COMB._CRS._IOB._MIN, IOLO)
-			CreateByteField(RSRC, 0x03, IOHI)
-			CreateByteField(RSRC,
-				\_SB.PCI0.LPCB.SIO1.COMB._CRS._IOB._MAX, IORL)
-			CreateByteField(RSRC, 0x05, IORH)
-			CreateByteField(RSRC,
-				\_SB.PCI0.LPCB.SIO1.COMB._CRS._IRB._INT, IRQL)
+			CreateWordField(RSRC,
+				\_SB.PCI0.LPCB.SIO1.COMA._CRS._IOA._MIN, IOMN)
+			CreateWordField(RSRC,
+				\_SB.PCI0.LPCB.SIO1.COMA._CRS._IOA._MAX, IOMX)
+			CreateWordField(RSRC,
+				\_SB.PCI0.LPCB.SIO1.COMA._CRS._IRA._INT, IRQ)
 
-			Store (READ(0, 0x25, 0xff), Local0)
-			And (Local0, 0xc0, Local1)
-			ShiftRight(Local1, 0x06, Local1)
+			/* I/O Base */
+			Store (READ(0, 0x25, 0xfe), Local0)
 			ShiftLeft(Local0, 0x02, Local0)
-			Store(Local0, IOLO)
-			Store(Local1, IOHI)
-			Store(IOLO, IORL)
-			Store(IOHI, IORH)
+			Store(Local0, IOMN)
+			Store(Local0, IOMX)
 
 			/* Interrupt */
 			Store(READ(0, 0x28, 0x0f), Local0)
-			ShiftRight(Local0, 4, Local0)
-			ShiftLeft(1, Local0, IRQL)
+			ShiftLeft(1, Local0, IRQ)
 			Return(RSRC)
 		}
 




More information about the coreboot mailing list