Vladimir Serbinenko | 55f3e2f | 2015-05-29 22:07:29 +0200 | [diff] [blame] | 1 | #include <device/device.h> |
| 2 | #include <drivers/intel/gma/int15.h> |
| 3 | #include <southbridge/intel/bd82x6x/pch.h> |
| 4 | #include <ec/acpi/ec.h> |
| 5 | #include <console/console.h> |
| 6 | |
| 7 | static void mainboard_init(device_t dev) |
| 8 | { |
| 9 | RCBA32(0x38c8) = 0x00002005; |
| 10 | RCBA32(0x38c4) = 0x00800000; |
| 11 | RCBA32(0x38c0) = 0x00000007; |
| 12 | /* FIXME: trim this down or remove if necessary */ |
| 13 | { |
| 14 | int i; |
| 15 | const u8 dmp[256] = { |
| 16 | /* 00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 17 | /* 10 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 18 | /* 20 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 19 | /* 30 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 20 | /* 40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 21 | /* 50 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 22 | /* 60 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 23 | /* 70 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 24 | /* 80 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 25 | /* 90 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 26 | /* a0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 27 | /* b0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 28 | /* c0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 29 | /* d0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 30 | /* e0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 31 | /* f0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 32 | }; |
| 33 | |
| 34 | printk(BIOS_DEBUG, "Replaying EC dump ..."); |
| 35 | for (i = 0; i < 256; i++) |
| 36 | ec_write (i, dmp[i]); |
| 37 | printk(BIOS_DEBUG, "done\n"); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | static void mainboard_enable(device_t dev) |
| 42 | { |
| 43 | dev->ops->init = mainboard_init; |
| 44 | |
Vladimir Serbinenko | d57fb2d | 2015-10-10 14:21:36 +0200 | [diff] [blame^] | 45 | install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); |
Vladimir Serbinenko | 55f3e2f | 2015-05-29 22:07:29 +0200 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | struct chip_operations mainboard_ops = { |
| 49 | .enable_dev = mainboard_enable, |
| 50 | }; |