diff --git a/src/mainboard/lenovo/x220/Makefile.mk b/src/mainboard/lenovo/x220/Makefile.mk index 7e59707915..8629040434 100644 --- a/src/mainboard/lenovo/x220/Makefile.mk +++ b/src/mainboard/lenovo/x220/Makefile.mk @@ -3,6 +3,8 @@ bootblock-y += variants/$(VARIANT_DIR)/gpio.c romstage-y += variants/$(VARIANT_DIR)/gpio.c +ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c + ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads bootblock-y += early_init.c romstage-y += early_init.c diff --git a/src/mainboard/lenovo/x220/cfr.c b/src/mainboard/lenovo/x220/cfr.c new file mode 100644 index 0000000000..6d43c17856 --- /dev/null +++ b/src/mainboard/lenovo/x220/cfr.c @@ -0,0 +1,58 @@ + +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include +#include +#include +#include +#include + +static struct sm_obj_form ec = { + .ui_name = "Embedded Controller", + .obj_list = (const struct sm_object *[]) { + &bluetooth, + &usb_always_on, + &wlan, + &wwan, + &pm_beeps, + &battery_beep, + &fn_ctrl_swap, + &sticky_fn, + &f1_to_f12_as_primary, + &touchpad, + &trackpoint, + NULL + }, +}; + +static struct sm_obj_form system = { + .ui_name = "System", + .obj_list = (const struct sm_object *[]) { + &gfx_uma_size, + &me_state, + &nmi, + &sata_mode, + NULL + }, +}; + +static struct sm_obj_form power = { + .ui_name = "Power", + .obj_list = (const struct sm_object *[]) { + &power_on_after_fail, + NULL + }, +}; + +static struct sm_obj_form *sm_root[] = { + &system, + &power, + &ec, + NULL +}; + +void mb_cfr_setup_menu(struct lb_cfr *cfr_root) +{ + cfr_write_setup_menu(cfr_root, sm_root); +}