Angel Pons | 0c58dc6 | 2020-04-03 01:21:09 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 2 | |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 3 | #include <device/device.h> |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 4 | #include <northbridge/intel/i945/i945.h> |
Vladimir Serbinenko | a2a906e | 2014-09-01 01:41:37 +0200 | [diff] [blame] | 5 | #include <drivers/intel/gma/int15.h> |
Mono | 62805e6 | 2015-06-07 13:21:59 +0200 | [diff] [blame] | 6 | #include <ec/acpi/ec.h> |
Elyes HAOUAS | bf0970e | 2019-03-21 11:10:03 +0100 | [diff] [blame] | 7 | |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 8 | #define PANEL INT15_5F35_CL_DISPLAY_DEFAULT |
9 | |||||
Elyes HAOUAS | a2e282b | 2018-05-04 19:53:02 +0200 | [diff] [blame] | 10 | static void mainboard_init(struct device *dev) |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 11 | { |
Vladimir Serbinenko | a2a906e | 2014-09-01 01:41:37 +0200 | [diff] [blame] | 12 | install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, PANEL, 3); |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 13 | } |
14 | |||||
Elyes HAOUAS | a2e282b | 2018-05-04 19:53:02 +0200 | [diff] [blame] | 15 | static void mainboard_enable(struct device *dev) |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 16 | { |
17 | dev->ops->init = mainboard_init; | ||||
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 18 | } |
19 | |||||
Mono | 62805e6 | 2015-06-07 13:21:59 +0200 | [diff] [blame] | 20 | static void mainboard_final(void *chip_info) |
21 | { | ||||
22 | ec_set_bit(0x10, 2); /* switch off led */ | ||||
23 | } | ||||
24 | |||||
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 25 | struct chip_operations mainboard_ops = { |
26 | .enable_dev = mainboard_enable, | ||||
Mono | 62805e6 | 2015-06-07 13:21:59 +0200 | [diff] [blame] | 27 | .final = mainboard_final, |
Mono | 9b90824 | 2014-03-02 18:40:36 +0100 | [diff] [blame] | 28 | }; |