c2f9dfb4590dcff4b01c60b925bdde6f1ae8bc9a
[coreboot.git] / src / mainboard / lenovo / t60 / acpi / video.asl
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (c) 2011 Sven Schnelle <svens@stackframe.org>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; version 2 of
9  * the License.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
19  * MA 02110-1301 USA
20  */
21
22 Device (DSPC)
23 {
24         Name (_ADR, 0x00020001)
25         OperationRegion (DSPC, PCI_Config, 0x00, 0x100)
26         Field (DSPC, ByteAcc, NoLock, Preserve)
27         {
28                 Offset (0xf4),
29                        BRTC, 8
30         }
31
32         Method(BRTD, 0, NotSerialized)
33         {
34                 Store(BRTC, Local0)
35                 if (LGreater (Local0, 15))
36                 {
37                         Subtract(Local0, 16, Local0)
38                         Store(Local0, BRTC)
39                 }
40         }
41
42         Method(BRTU, 0, NotSerialized)
43         {
44                 Store (BRTC, Local0)
45                 if (LLess(Local0, 0xff))
46                 {
47                         Add (Local0, 16, Local0)
48                         Store(Local0, BRTC)
49                 }
50         }
51 }