1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <cpu/x86/smm.h>
5 #include <device/device.h>
6 #include <drivers/intel/gma/int15.h>
8 #include <southbridge/intel/lynxpoint/pch.h>
12 void mainboard_suspend_resume(void)
14 /* Call SMM finalize() handlers before resume */
15 apm_control(APM_CNT_FINALIZE
);
18 static void mainboard_init(struct device
*dev
)
23 static int mainboard_smbios_data(struct device
*dev
, int *handle
,
24 unsigned long *current
)
28 len
+= smbios_write_type41(
30 BOARD_LIGHTSENSOR_NAME
, /* name */
31 BOARD_LIGHTSENSOR_IRQ
, /* instance */
32 BOARD_LIGHTSENSOR_I2C_BUS
, /* segment */
33 BOARD_LIGHTSENSOR_I2C_ADDR
, /* bus */
36 SMBIOS_DEVICE_TYPE_OTHER
); /* device type */
38 len
+= smbios_write_type41(
40 BOARD_TRACKPAD_NAME
, /* name */
41 BOARD_TRACKPAD_IRQ
, /* instance */
42 BOARD_TRACKPAD_I2C_BUS
, /* segment */
43 BOARD_TRACKPAD_I2C_ADDR
, /* bus */
46 SMBIOS_DEVICE_TYPE_OTHER
); /* device type */
48 len
+= smbios_write_type41(
50 BOARD_TOUCHSCREEN_NAME
, /* name */
51 BOARD_TOUCHSCREEN_IRQ
, /* instance */
52 BOARD_TOUCHSCREEN_I2C_BUS
, /* segment */
53 BOARD_TOUCHSCREEN_I2C_ADDR
, /* bus */
56 SMBIOS_DEVICE_TYPE_OTHER
); /* device type */
61 static void mainboard_enable(struct device
*dev
)
63 dev
->ops
->init
= mainboard_init
;
64 dev
->ops
->get_smbios_data
= mainboard_smbios_data
;
65 install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP
, GMA_INT15_PANEL_FIT_CENTERING
, GMA_INT15_BOOT_DISPLAY_DEFAULT
, 0);
68 struct chip_operations mainboard_ops
= {
69 .enable_dev
= mainboard_enable
,