coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <arch/io.h>
4 #include <device/device.h>
6 #include <pc80/keyboard.h>
7 #include <ec/acpi/ec.h>
8 
9 static void ec_setup(void)
10 {
11  /* Thermal limits? Values are from ectool's RAM dump. */
12  ec_write(0xd1, 0x57); /* CPUH */
13  ec_write(0xd2, 0xc9); /* CPUL */
14  ec_write(0xd4, 0x64); /* SYSH */
15  ec_write(0xd5, 0xc9); /* SYSL */
16 
17  send_ec_command(0x04); /* Set_SMI_Enable */
18  send_ec_command(0xab); /* Set_ACPI_Disable */
19  send_ec_command(0xac); /* Clr_SYS_Flag? well, why not? */
20  send_ec_command(0xad); /* Set_Thml_Value */
21 }
22 
23 static void mainboard_enable(struct device *dev)
24 {
25  ec_setup();
26  /* LCD panel type is SIO GPIO40-43.
27  It's controlled by a DIP switch but was always
28  set to 4 while only values of 5 and 6 worked. */
30 
31  /* We have no driver for the embedded controller since the firmware
32  does most of the job. Hence, initialize keyboards here. */
34 }
35 
38 };
struct chip_operations mainboard_ops
Definition: mainboard.c:19
u8 inb(u16 port)
void install_intel_vga_int15_handler(int active_lfp_, int pfit_, int display_, int panel_type_)
Definition: int15.c:101
@ GMA_INT15_BOOT_DISPLAY_DEFAULT
Definition: int15.h:6
@ GMA_INT15_ACTIVE_LFP_INT_LVDS
Definition: int15.h:25
@ GMA_INT15_PANEL_FIT_CENTERING
Definition: int15.h:18
int send_ec_command(u8 command)
Definition: ec.c:13
int ec_write(u8 addr, u8 data)
Definition: ec.c:115
uint8_t pc_keyboard_init(uint8_t probe_aux)
Definition: keyboard.c:229
#define NO_AUX_DEVICE
Definition: keyboard.h:6
static void ec_setup(void)
Definition: mainboard.c:9
static void mainboard_enable(struct device *dev)
Definition: mainboard.c:23
void(* enable_dev)(struct device *dev)
Definition: device.h:24
Definition: device.h:107