igd.asl rewrite
[coreboot.git] / src / mainboard / samsung / lumpy / acpi_tables.c
blob0e793480002c95744407f14f877ac0f40b426dad
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2007-2009 coresystems GmbH
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc.
20 #include <types.h>
21 #include <string.h>
22 #include <cbmem.h>
23 #include <console/console.h>
24 #include <arch/acpi.h>
25 #include <arch/ioapic.h>
26 #include <arch/acpigen.h>
27 #include <arch/smp/mpspec.h>
28 #include <device/device.h>
29 #include <device/pci.h>
30 #include <device/pci_ids.h>
31 #include <cpu/x86/msr.h>
32 #include <ec/acpi/ec.h>
33 #if CONFIG_CHROMEOS
34 #include <vendorcode/google/chromeos/gnvs.h>
35 #endif
37 #include "southbridge/intel/bd82x6x/nvs.h"
38 #include "thermal.h"
40 static global_nvs_t *gnvs_;
42 static void acpi_update_thermal_table(global_nvs_t *gnvs)
44 gnvs->f4of = FAN4_THRESHOLD_OFF;
45 gnvs->f4on = FAN4_THRESHOLD_ON;
47 gnvs->f3of = FAN3_THRESHOLD_OFF;
48 gnvs->f3on = FAN3_THRESHOLD_ON;
50 gnvs->f2of = FAN2_THRESHOLD_OFF;
51 gnvs->f2on = FAN2_THRESHOLD_ON;
53 gnvs->f1of = FAN1_THRESHOLD_OFF;
54 gnvs->f1on = FAN1_THRESHOLD_ON;
56 gnvs->f0of = FAN0_THRESHOLD_OFF;
57 gnvs->f0on = FAN0_THRESHOLD_ON;
59 gnvs->tcrt = CRITICAL_TEMPERATURE;
60 gnvs->tpsv = PASSIVE_TEMPERATURE;
61 gnvs->tmax = MAX_TEMPERATURE;
62 gnvs->flvl = 5;
65 void acpi_create_gnvs(global_nvs_t *gnvs)
67 gnvs_ = gnvs;
70 * Disable 3G in suspend by default.
71 * Provide option to enable for http://crosbug.com/p/7925
73 gnvs->s33g = 0;
75 /* Disable USB ports in S3 by default */
76 gnvs->s3u0 = 0;
77 gnvs->s3u1 = 0;
79 /* Disable USB ports in S5 by default */
80 gnvs->s5u0 = 0;
81 gnvs->s5u1 = 0;
84 acpi_update_thermal_table(gnvs);
86 gnvs->chromeos.vbt2 = ec_read(0xcb) ? ACTIVE_ECFW_RW : ACTIVE_ECFW_RO;