2 * This file is part of the coreboot project.
4 * Copyright (C) 2009 coresystems GmbH
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
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.
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,
27 Name(_HID, EisaId("PNP0C0A"))
30 Name(_PCL, Package(){ _SB })
32 Name(PBIF, Package() {
47 Name(PBST, Package() { 0x01, 0x16, 0x64, 0x2b5c })
52 If(\_SB.PCI0.LPCB.EC0.ECON) {
53 If(\_SB.PCI0.LPCB.EC0.P62S) {
66 If(\_SB.PCI0.LPCB.EC0.ECON) {
67 If(\_SB.PCI0.LPCB.EC0.P62S) {
81 If(\_SB.PCI0.LPCB.EC0.ECON) {
88 /* Update Battery Info */
91 Store (0x78, Index(PBIF, 1))
92 Store (0x64, Index(PBIF, 2))
93 Store (0x2b5c, Index(PBIF, 4))
94 Store ("Bat1", Index(PBIF, 9))
95 Store ("001", Index(PBIF, 10))
96 Store ("LION", Index(PBIF, 11))
97 Store ("Panasonic", Index(PBIF, 12))
102 Store(\_SB.PCI0.LPCB.EC0.QEVT, Local0)
108 Store (RDW(0x0d), Local0)
109 If (LNotEqual(Local0, 0xeeee)) {
110 If (LLessEqual(Local0, 0x64)) {
118 Store (Local0, Index(PBST, 2))
119 Store (DerefOf(Index(PBIF, 4)), Index(PBST, 3))
123 If (LLess(Local0, 0x64)) {
127 If (LLessEqual(Local0, 0x5)) {
134 Store (Local1, Index(PBST, 0))
135 If (\_SB.PCI0.LPCB.EC0.P63S) {
136 Store (0x16, Index(PBST, 1))
138 Store (0x0b, Index(PBST, 1))
142 // Invalidate Battery Info
145 Store (0xffffffff, Index(PBIF, 1))
146 Store (0xffffffff, Index(PBIF, 2))
147 Store (0xffffffff, Index(PBIF, 4))
148 Store ("Bad", Index(PBIF, 9))
149 Store ("Bad", Index(PBIF, 10))
150 Store ("Bad", Index(PBIF, 11))
151 Store ("Bad", Index(PBIF, 12))
157 Store (0x0, Index(PBST, 0))
158 Store (0xffffffff, Index(PBST, 1))
159 Store (0xffffffff, Index(PBST, 2))
160 Store (0xffffffff, Index(PBST, 3))
167 Name(_HID, EisaId("PNP0C0A"))
170 Name(_PCL, Package(){ _SB })
172 Name(PBIF, Package() {
187 Name(PBST, Package() { 0x01, 0x16, 0x64, 0x2b5c })
192 If(\_SB.PCI0.LPCB.EC0.ECON) {
193 If(\_SB.PCI0.LPCB.EC0.P63S) {
206 If(\_SB.PCI0.LPCB.EC0.ECON) {
207 If(\_SB.PCI0.LPCB.EC0.P63S) {
221 If(\_SB.PCI0.LPCB.EC0.ECON) {
228 /* Update Battery Info */
231 Store (0x78, Index(PBIF, 1))
232 Store (0x64, Index(PBIF, 2))
233 Store (0x2b5c, Index(PBIF, 4))
234 Store ("Bat2", Index(PBIF, 9))
235 Store ("002", Index(PBIF, 10))
236 Store ("LION", Index(PBIF, 11))
237 Store ("Panasonic", Index(PBIF, 12))
242 Store(\_SB.PCI0.LPCB.EC0.QEVT, Local0)
248 Store (RDW(0x0d), Local0)
249 If (LNotEqual(Local0, 0xeeee)) {
250 If (LLessEqual(Local0, 0x64)) {
258 Store (Local0, Index(PBST, 2))
259 Store (DerefOf(Index(PBIF, 4)), Index(PBST, 3))
263 If (LLess(Local0, 0x64)) {
267 If (LLessEqual(Local0, 0x5)) {
274 Store (Local1, Index(PBST, 0))
275 If (\_SB.PCI0.LPCB.EC0.P62S) {
276 Store (0x16, Index(PBST, 1))
278 Store (0x0b, Index(PBST, 1))
282 // Invalidate Battery Info
285 Store (0xffffffff, Index(PBIF, 1))
286 Store (0xffffffff, Index(PBIF, 2))
287 Store (0xffffffff, Index(PBIF, 4))
288 Store ("Bad", Index(PBIF, 9))
289 Store ("Bad", Index(PBIF, 10))
290 Store ("Bad", Index(PBIF, 11))
291 Store ("Bad", Index(PBIF, 12))
297 Store (0x0, Index(PBST, 0))
298 Store (0xffffffff, Index(PBST, 1))
299 Store (0xffffffff, Index(PBST, 2))
300 Store (0xffffffff, Index(PBST, 3))
306 Store (0x16, \_SB.PCI0.LPCB.EC0.SMAD)
307 Store (Arg0, \_SB.PCI0.LPCB.EC0.SMCM)
308 Store (0x09, \_SB.PCI0.LPCB.EC0.SMPR)
309 While (LNotEqual(\_SB.PCI0.LPCB.EC0.SMPR, 0x00)) {
313 Return (\_SB.PCI0.LPCB.EC0.SMW0)
318 Name (_HID, "ACPI0003")
321 If (\_SB.PCI0.LPCB.EC0.ECON) {
322 Store (\_SB.PCI0.LPCB.EC0.P60S, Local0)