| 1 |
|
| 2 |
|
| 3 |
#include <arch/io.h> |
| 4 |
#include <device/device.h> |
| 5 |
#include <drivers/intel/gma/int15.h> |
| 6 |
#include <pc80/keyboard.h> |
| 7 |
#include <ec/acpi/ec.h> |
| 8 |
|
| 9 |
static void ec_setup(void) |
| 10 |
{ |
| 11 |
|
| 12 |
ec_write(0xd1, 0x57); |
| 13 |
ec_write(0xd2, 0xc9); |
| 14 |
ec_write(0xd4, 0x64); |
| 15 |
ec_write(0xd5, 0xc9); |
| 16 |
|
| 17 |
send_ec_command(0x04); |
| 18 |
send_ec_command(0xab); |
| 19 |
send_ec_command(0xac); |
| 20 |
send_ec_command(0xad); |
| 21 |
} |
| 22 |
|
| 23 |
static void mainboard_enable(struct device *dev) |
| 24 |
{ |
| 25 |
ec_setup(); |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, (inb(0x60f) & 0x0f) + 1); |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
pc_keyboard_init(NO_AUX_DEVICE); |
| 34 |
} |
| 35 |
|
| 36 |
struct chip_operations mainboard_ops = { |
| 37 |
.enable_dev = mainboard_enable, |
| 38 |
}; |