diff options
author | Jon Harrison <bothlyn@blueyonder.co.uk> | 2009-08-18 15:12:13 +0000 |
---|---|---|
committer | Myles Watson <mylesgw@gmail.com> | 2009-08-18 15:12:13 +0000 |
commit | 9c2e738653df435afec8a8f212d0c2c69aa9645c (patch) | |
tree | 6762f714beb12c139cc06024bd2a934b59669f45 /src/mainboard/via/epia-n/pata_methods.asl | |
parent | 1825be291f49f892fa8c048974239aa0daa4de56 (diff) |
Add the rest of the files.
Thanks Jon.
Signed-off-by: Jon Harrison <bothlyn@blueyonder.co.uk>
Acked-by: Myles Watson <mylesgw@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4550 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/via/epia-n/pata_methods.asl')
-rw-r--r-- | src/mainboard/via/epia-n/pata_methods.asl | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/src/mainboard/via/epia-n/pata_methods.asl b/src/mainboard/via/epia-n/pata_methods.asl new file mode 100644 index 0000000000..68d505868e --- /dev/null +++ b/src/mainboard/via/epia-n/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 <jon.harrison@blueyonder.co.uk> + * + */ + +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) +} + |