diff --git a/Makefile b/Makefile index 41740d791..8fe179ada 100644 --- a/Makefile +++ b/Makefile @@ -43,15 +43,10 @@ include $(BOARD_DIR)/Makefile.mk SRC += $(foreach src, $(board-y), $(BOARD_DIR)/$(src)) SRC += $(foreach src, $(keyboard-y), $(KEYBOARD_DIR)/$(src)) -# The board will define the embedded controller -# Include the embedded controller's source -EC_DIR=src/ec/$(EC) -INCLUDE += $(EC_DIR)/Makefile.mk -CFLAGS+=-I$(EC_DIR)/include -include $(EC_DIR)/Makefile.mk -SRC += $(foreach src, $(ec-y), $(EC_DIR)/$(src)) - -# The EC will define the architecture +# The board will define the SoC +include src/soc/Makefile.mk + +# The SoC will define the architecture # Include the architecture's source ARCH_DIR=src/arch/$(ARCH) INCLUDE += $(ARCH_DIR)/Makefile.mk diff --git a/src/app/main/battery.c b/src/app/main/battery.c index 9a56bb1f0..3b96e3468 100644 --- a/src/app/main/battery.c +++ b/src/app/main/battery.c @@ -15,7 +15,7 @@ uint16_t battery_charger_input_current = CHARGER_INPUT_CURRENT; #define BATTERY_END_DEFAULT 100 // Flash address to save charging thresholds to -static const uint32_t BAT_CFG_ADDR = CONFIG_EC_FLASH_SIZE - (2 * 1024); +static const uint32_t BAT_CFG_ADDR = CONFIG_SOC_FLASH_SIZE - (2 * 1024); static const uint16_t BAT_CFG_MAGIC = 0x4254; struct battery_config { diff --git a/src/app/main/dgpu.c b/src/app/main/dgpu.c index 85b749e33..fddf98088 100644 --- a/src/app/main/dgpu.c +++ b/src/app/main/dgpu.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include int16_t dgpu_temp = 0; diff --git a/src/app/main/espi.c b/src/app/main/espi.c index 70351c4a1..6aa310df9 100644 --- a/src/app/main/espi.c +++ b/src/app/main/espi.c @@ -6,9 +6,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include <8051.h> #include diff --git a/src/app/main/fan.c b/src/app/main/fan.c index 7adb04602..a62056e80 100644 --- a/src/app/main/fan.c +++ b/src/app/main/fan.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #if CONFIG_PLATFORM_INTEL #include diff --git a/src/app/main/flash/main.c b/src/app/main/flash/main.c index ff4649767..58f3341e1 100644 --- a/src/app/main/flash/main.c +++ b/src/app/main/flash/main.c @@ -46,7 +46,7 @@ void flash_write_enable(void); void flash_entry(uint32_t addr, uint8_t *data, uint32_t length, uint8_t command) __reentrant __critical { // Only allow access from 64 KiB to the end of flash. - if ((addr < 0x10000) || (length > 0x10000) || ((addr + length) > CONFIG_EC_FLASH_SIZE)) + if ((addr < 0x10000) || (length > 0x10000) || ((addr + length) > CONFIG_SOC_FLASH_SIZE)) return; if (command == FLASH_COMMAND_READ) { diff --git a/src/app/main/flash/wrapper.c b/src/app/main/flash/wrapper.c index bc90cc4c3..5546e2b1b 100644 --- a/src/app/main/flash/wrapper.c +++ b/src/app/main/flash/wrapper.c @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (C) 2020 Evan Lojewski #include -#include +#include #include "include/flash/entry.h" #include #include diff --git a/src/app/main/include/app/ecpm.h b/src/app/main/include/app/ecpm.h index 7a1e99534..bdcaa59cd 100644 --- a/src/app/main/include/app/ecpm.h +++ b/src/app/main/include/app/ecpm.h @@ -3,7 +3,7 @@ #ifndef _APP_ECPM_H #define _APP_ECPM_H -#include +#include void ecpm_init(void); diff --git a/src/app/main/include/app/espi.h b/src/app/main/include/app/espi.h index 30e51ab18..778ed4b2d 100644 --- a/src/app/main/include/app/espi.h +++ b/src/app/main/include/app/espi.h @@ -5,7 +5,7 @@ #include -#include +#include extern bool espi_host_reset; diff --git a/src/app/main/include/app/gctrl.h b/src/app/main/include/app/gctrl.h index 98f457135..cc37c6ddf 100644 --- a/src/app/main/include/app/gctrl.h +++ b/src/app/main/include/app/gctrl.h @@ -3,7 +3,7 @@ #ifndef _APP_GCTRL_H #define _APP_GCTRL_H -#include +#include void gctrl_init(void); diff --git a/src/app/main/include/app/kbc.h b/src/app/main/include/app/kbc.h index 0ba0b7d3d..1c83d00cd 100644 --- a/src/app/main/include/app/kbc.h +++ b/src/app/main/include/app/kbc.h @@ -5,7 +5,7 @@ #include -#include +#include extern uint8_t kbc_leds; diff --git a/src/app/main/include/app/kbscan.h b/src/app/main/include/app/kbscan.h index 55db29d23..5e2a83517 100644 --- a/src/app/main/include/app/kbscan.h +++ b/src/app/main/include/app/kbscan.h @@ -6,7 +6,7 @@ #include #include -#include +#include // EC config reset key combo: Fn+Esc extern bool kbscan_fn_held; diff --git a/src/app/main/include/app/peci.h b/src/app/main/include/app/peci.h index 87217cf5c..99882e0f4 100644 --- a/src/app/main/include/app/peci.h +++ b/src/app/main/include/app/peci.h @@ -3,7 +3,7 @@ #ifndef _APP_PECI_H #define _APP_PECI_H -#include +#include #include extern bool peci_on; diff --git a/src/app/main/include/app/pmc.h b/src/app/main/include/app/pmc.h index cb45b1762..4987c98b8 100644 --- a/src/app/main/include/app/pmc.h +++ b/src/app/main/include/app/pmc.h @@ -3,7 +3,7 @@ #ifndef _APP_PMC_H #define _APP_PMC_H -#include +#include void pmc_init(void); bool pmc_sci(struct Pmc *const pmc, uint8_t sci); diff --git a/src/app/main/include/app/ps2.h b/src/app/main/include/app/ps2.h index 3287d8c33..9a04d8e0b 100644 --- a/src/app/main/include/app/ps2.h +++ b/src/app/main/include/app/ps2.h @@ -3,7 +3,7 @@ #ifndef _APP_PS2_H #define _APP_PS2_H -#include +#include void ps2_init(void); diff --git a/src/app/main/include/app/smbus.h b/src/app/main/include/app/smbus.h index d3c735c29..c12c66c85 100644 --- a/src/app/main/include/app/smbus.h +++ b/src/app/main/include/app/smbus.h @@ -3,7 +3,7 @@ #ifndef _APP_SMBUS_H #define _APP_SMBUS_H -#include +#include void smbus_init(void); int16_t smbus_read(uint8_t address, uint8_t command, uint16_t *const data); diff --git a/src/app/main/kbc.c b/src/app/main/kbc.c index 3ad324d25..c8edffcc8 100644 --- a/src/app/main/kbc.c +++ b/src/app/main/kbc.c @@ -5,8 +5,8 @@ #include #include #include -#include -#include +#include +#include void kbc_init(void) { // Disable interrupts diff --git a/src/app/main/kbled/bonw14.c b/src/app/main/kbled/bonw14.c index 6383cf901..899ee1578 100644 --- a/src/app/main/kbled/bonw14.c +++ b/src/app/main/kbled/bonw14.c @@ -2,9 +2,9 @@ #include #include -#include -#include -#include +#include +#include +#include void kbled_init(void) { kbled_kind = KBLED_RGB; diff --git a/src/app/main/kbled/rgb_i2c.c b/src/app/main/kbled/rgb_i2c.c index 50c888a26..1f4d004e7 100644 --- a/src/app/main/kbled/rgb_i2c.c +++ b/src/app/main/kbled/rgb_i2c.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include #define kbled_i2c_get(A, D, L) i2c_get(&KBLED_I2C, 0x68, A, D, L) #define kbled_i2c_set(A, D, L) i2c_set(&KBLED_I2C, 0x68, A, D, L) diff --git a/src/app/main/kbled/rgb_pwm.c b/src/app/main/kbled/rgb_pwm.c index 691ebbfa2..4119bfd21 100644 --- a/src/app/main/kbled/rgb_pwm.c +++ b/src/app/main/kbled/rgb_pwm.c @@ -2,7 +2,7 @@ #include #include -#include +#include void kbled_init(void) { if (!gpio_get(&RGBKB_DET_N)) { diff --git a/src/app/main/kbled/white_dac.c b/src/app/main/kbled/white_dac.c index d309da1a9..630cf4c21 100644 --- a/src/app/main/kbled/white_dac.c +++ b/src/app/main/kbled/white_dac.c @@ -2,7 +2,7 @@ #include #include -#include +#include #if !defined(KBLED_DAC) #error "KBLED_DAC must be defined" diff --git a/src/app/main/keymap.c b/src/app/main/keymap.c index 134274139..d10acec38 100644 --- a/src/app/main/keymap.c +++ b/src/app/main/keymap.c @@ -8,7 +8,7 @@ bool keymap_fnlock = false; uint16_t __xdata DYNAMIC_KEYMAP[KM_LAY][KM_OUT][KM_IN]; // Config is in the last sector of flash -const uint32_t CONFIG_ADDR = CONFIG_EC_FLASH_SIZE - 1024; +const uint32_t CONFIG_ADDR = CONFIG_SOC_FLASH_SIZE - 1024; // Signature is the size of the keymap const uint16_t CONFIG_SIGNATURE = sizeof(DYNAMIC_KEYMAP); diff --git a/src/app/main/main.c b/src/app/main/main.c index d5aaf4fd9..4b43e0740 100644 --- a/src/app/main/main.c +++ b/src/app/main/main.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #if CONFIG_PLATFORM_INTEL #include @@ -58,7 +58,7 @@ uint8_t main_cycle = 0; void init(void) { // Must happen first arch_init(); - ec_init(); + soc_init(); gctrl_init(); gpio_init(); diff --git a/src/app/main/parallel.c b/src/app/main/parallel.c index f45a2ed34..3b2cc13e7 100644 --- a/src/app/main/parallel.c +++ b/src/app/main/parallel.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include diff --git a/src/app/main/peci.c b/src/app/main/peci.c index 2ab233099..4b53224c2 100644 --- a/src/app/main/peci.c +++ b/src/app/main/peci.c @@ -11,8 +11,8 @@ #include #include #include -#include -#include +#include +#include bool peci_on = false; int16_t peci_temp = 0; diff --git a/src/app/main/pmc.c b/src/app/main/pmc.c index a77cf0b29..6b2493cef 100644 --- a/src/app/main/pmc.c +++ b/src/app/main/pmc.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include void pmc_init(void) { *(PMC_1.control) = 0x41; diff --git a/src/app/main/pnp.c b/src/app/main/pnp.c index 6135544e4..cf46b882c 100644 --- a/src/app/main/pnp.c +++ b/src/app/main/pnp.c @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include volatile uint8_t __xdata __at(0x1200) IHIOA; diff --git a/src/app/main/power/intel.c b/src/app/main/power/intel.c index 6af2614f8..91ae9ce19 100644 --- a/src/app/main/power/intel.c +++ b/src/app/main/power/intel.c @@ -21,8 +21,8 @@ #include #if CONFIG_BUS_ESPI -#include #include +#include #endif #if CONFIG_SECURITY diff --git a/src/app/main/pwm.c b/src/app/main/pwm.c index 21beab02a..05592ea86 100644 --- a/src/app/main/pwm.c +++ b/src/app/main/pwm.c @@ -1,8 +1,8 @@ // SPDX-License-Identifier: GPL-3.0-only #include -#include #include +#include void pwm_init(void) { // Set T0CHSEL to TACH0A and T1CHSEL to TACH1A @@ -30,7 +30,7 @@ void pwm_init(void) { FAN2_PWM = 0; #endif -#if CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +#if CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E // Reload counters when they reach 0 instead of immediately PWMLCCR = 0xFF; #endif diff --git a/src/app/main/scratch.c b/src/app/main/scratch.c index 4d89686e5..f3b2b1260 100644 --- a/src/app/main/scratch.c +++ b/src/app/main/scratch.c @@ -4,8 +4,8 @@ #include #include #include -#include -#include +#include +#include #include <8051.h> #include diff --git a/src/app/main/smbus.c b/src/app/main/smbus.c index ddfa8a416..af5762d00 100644 --- a/src/app/main/smbus.c +++ b/src/app/main/smbus.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only #include -#include +#include void smbus_init(void) { // 9.2 MHz * 4.7 us = 43.24 diff --git a/src/app/main/smfi.c b/src/app/main/smfi.c index 4ec73ffec..d38bdab02 100644 --- a/src/app/main/smfi.c +++ b/src/app/main/smfi.c @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/src/app/main/stdio.c b/src/app/main/stdio.c index c19225827..923fd7901 100644 --- a/src/app/main/stdio.c +++ b/src/app/main/stdio.c @@ -9,7 +9,7 @@ #endif #ifdef I2C_DEBUGGER -#include +#include #endif #ifdef PARALLEL_DEBUG diff --git a/src/app/main/usbpd/tps65987.c b/src/app/main/usbpd/tps65987.c index 5260408e7..ff86bdd89 100644 --- a/src/app/main/usbpd/tps65987.c +++ b/src/app/main/usbpd/tps65987.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #define USBPD_ADDRESS 0x20 diff --git a/src/arch/8051/toolchain.mk b/src/arch/8051/toolchain.mk index 5880bae1d..de8178133 100644 --- a/src/arch/8051/toolchain.mk +++ b/src/arch/8051/toolchain.mk @@ -36,7 +36,7 @@ sim: $(BUILD)/ec.rom $(BUILD)/ec.rom: $(BUILD)/ec.ihx @echo " OBJCOPY $(subst $(BUILD)/,,$@)" mkdir -p $(@D) - objcopy -I ihex -O binary --gap-fill=0xFF --pad-to=$(CONFIG_EC_FLASH_SIZE) $< $@ + objcopy -I ihex -O binary --gap-fill=0xFF --pad-to=$(CONFIG_SOC_FLASH_SIZE) $< $@ # Link object files into Intel Hex file $(BUILD)/ec.ihx: $(OBJ) diff --git a/src/board/system76/addw1/Makefile.mk b/src/board/system76/addw1/Makefile.mk index 69b85e81b..e5a820ae3 100644 --- a/src/board/system76/addw1/Makefile.mk +++ b/src/board/system76/addw1/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT8587E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT8587E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/addw1/include/board/gpio.h b/src/board/system76/addw1/include/board/gpio.h index cc927aefc..9949396b4 100644 --- a/src/board/system76/addw1/include/board/gpio.h +++ b/src/board/system76/addw1/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/addw2/Makefile.mk b/src/board/system76/addw2/Makefile.mk index b3dbb4935..2ed57e6ff 100644 --- a/src/board/system76/addw2/Makefile.mk +++ b/src/board/system76/addw2/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/addw2/board.c b/src/board/system76/addw2/board.c index a589086ae..7479e5e0e 100644 --- a/src/board/system76/addw2/board.c +++ b/src/board/system76/addw2/board.c @@ -3,7 +3,7 @@ #include #include #include -#include +#include void board_init(void) { // Allow backlight to be turned on @@ -17,7 +17,7 @@ void board_init(void) { } void board_event(void) { - ec_read_post_codes(); + soc_read_post_codes(); // Set keyboard LEDs static uint8_t last_kbc_leds = 0; diff --git a/src/board/system76/addw2/include/board/gpio.h b/src/board/system76/addw2/include/board/gpio.h index 8f47d07c1..b09314284 100644 --- a/src/board/system76/addw2/include/board/gpio.h +++ b/src/board/system76/addw2/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/addw3/Makefile.mk b/src/board/system76/addw3/Makefile.mk index 118bae85b..94ab1720a 100644 --- a/src/board/system76/addw3/Makefile.mk +++ b/src/board/system76/addw3/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/addw3/board.c b/src/board/system76/addw3/board.c index c5d50815f..bed868c2e 100644 --- a/src/board/system76/addw3/board.c +++ b/src/board/system76/addw3/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/addw3/include/board/gpio.h b/src/board/system76/addw3/include/board/gpio.h index 3f02badbf..a8c89722d 100644 --- a/src/board/system76/addw3/include/board/gpio.h +++ b/src/board/system76/addw3/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/addw4/Makefile.mk b/src/board/system76/addw4/Makefile.mk index 1ddd87e0b..c6fd36c7c 100644 --- a/src/board/system76/addw4/Makefile.mk +++ b/src/board/system76/addw4/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_256K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_256K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/addw4/board.c b/src/board/system76/addw4/board.c index d2ea8e909..f71b265b4 100644 --- a/src/board/system76/addw4/board.c +++ b/src/board/system76/addw4/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/addw4/include/board/gpio.h b/src/board/system76/addw4/include/board/gpio.h index 946cdc65f..fef88b04d 100644 --- a/src/board/system76/addw4/include/board/gpio.h +++ b/src/board/system76/addw4/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/bonw14/Makefile.mk b/src/board/system76/bonw14/Makefile.mk index 2353dbd1a..e1efb331f 100644 --- a/src/board/system76/bonw14/Makefile.mk +++ b/src/board/system76/bonw14/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/bonw14/board.c b/src/board/system76/bonw14/board.c index 0baacc16b..27a32a8c7 100644 --- a/src/board/system76/bonw14/board.c +++ b/src/board/system76/bonw14/board.c @@ -2,7 +2,7 @@ #include #include -#include +#include void board_init(void) { // Allow CPU to boot @@ -20,5 +20,5 @@ void board_init(void) { } void board_event(void) { - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/bonw14/include/board/gpio.h b/src/board/system76/bonw14/include/board/gpio.h index fd96a717c..40caba40a 100644 --- a/src/board/system76/bonw14/include/board/gpio.h +++ b/src/board/system76/bonw14/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/bonw15-b/Makefile.mk b/src/board/system76/bonw15-b/Makefile.mk index d1da7b8bf..43cf6bc66 100644 --- a/src/board/system76/bonw15-b/Makefile.mk +++ b/src/board/system76/bonw15-b/Makefile.mk @@ -6,9 +6,8 @@ board-y += ../bonw15/gpio.c # FIXME: Handle this better CFLAGS += -I$(BOARD_DIR)/../bonw15/include -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_256K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_256K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/bonw15/Makefile.mk b/src/board/system76/bonw15/Makefile.mk index 3fa519475..047ca5335 100644 --- a/src/board/system76/bonw15/Makefile.mk +++ b/src/board/system76/bonw15/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/bonw15/board.c b/src/board/system76/bonw15/board.c index d2ea8e909..f71b265b4 100644 --- a/src/board/system76/bonw15/board.c +++ b/src/board/system76/bonw15/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/bonw15/include/board/gpio.h b/src/board/system76/bonw15/include/board/gpio.h index 7d18438a1..898a4bc6d 100644 --- a/src/board/system76/bonw15/include/board/gpio.h +++ b/src/board/system76/bonw15/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/darp10-b/Makefile.mk b/src/board/system76/darp10-b/Makefile.mk index df9a11686..2a894160d 100644 --- a/src/board/system76/darp10-b/Makefile.mk +++ b/src/board/system76/darp10-b/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_256K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_256K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/darp10-b/board.c b/src/board/system76/darp10-b/board.c index 934866b55..cef4fdef1 100644 --- a/src/board/system76/darp10-b/board.c +++ b/src/board/system76/darp10-b/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -19,5 +19,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/darp10-b/include/board/gpio.h b/src/board/system76/darp10-b/include/board/gpio.h index 826c111f3..30bb52d46 100644 --- a/src/board/system76/darp10-b/include/board/gpio.h +++ b/src/board/system76/darp10-b/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/darp10/Makefile.mk b/src/board/system76/darp10/Makefile.mk index 9dc8c28cb..efe950064 100644 --- a/src/board/system76/darp10/Makefile.mk +++ b/src/board/system76/darp10/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_256K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_256K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/darp10/board.c b/src/board/system76/darp10/board.c index 934866b55..cef4fdef1 100644 --- a/src/board/system76/darp10/board.c +++ b/src/board/system76/darp10/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -19,5 +19,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/darp10/include/board/gpio.h b/src/board/system76/darp10/include/board/gpio.h index 826c111f3..30bb52d46 100644 --- a/src/board/system76/darp10/include/board/gpio.h +++ b/src/board/system76/darp10/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/darp11-b/Makefile.mk b/src/board/system76/darp11-b/Makefile.mk index df9a11686..2a894160d 100644 --- a/src/board/system76/darp11-b/Makefile.mk +++ b/src/board/system76/darp11-b/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_256K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_256K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/darp11-b/board.c b/src/board/system76/darp11-b/board.c index 934866b55..cef4fdef1 100644 --- a/src/board/system76/darp11-b/board.c +++ b/src/board/system76/darp11-b/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -19,5 +19,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/darp11-b/include/board/gpio.h b/src/board/system76/darp11-b/include/board/gpio.h index 826c111f3..30bb52d46 100644 --- a/src/board/system76/darp11-b/include/board/gpio.h +++ b/src/board/system76/darp11-b/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/darp11/Makefile.mk b/src/board/system76/darp11/Makefile.mk index 9dc8c28cb..efe950064 100644 --- a/src/board/system76/darp11/Makefile.mk +++ b/src/board/system76/darp11/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_256K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_256K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/darp11/board.c b/src/board/system76/darp11/board.c index 934866b55..cef4fdef1 100644 --- a/src/board/system76/darp11/board.c +++ b/src/board/system76/darp11/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -19,5 +19,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/darp11/include/board/gpio.h b/src/board/system76/darp11/include/board/gpio.h index 826c111f3..30bb52d46 100644 --- a/src/board/system76/darp11/include/board/gpio.h +++ b/src/board/system76/darp11/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/darp5/Makefile.mk b/src/board/system76/darp5/Makefile.mk index 771338933..e782d7c62 100644 --- a/src/board/system76/darp5/Makefile.mk +++ b/src/board/system76/darp5/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT8587E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT8587E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/darp5/include/board/gpio.h b/src/board/system76/darp5/include/board/gpio.h index 0f05e0733..7e821bde4 100644 --- a/src/board/system76/darp5/include/board/gpio.h +++ b/src/board/system76/darp5/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/darp6/Makefile.mk b/src/board/system76/darp6/Makefile.mk index c373f529a..0aca194d4 100644 --- a/src/board/system76/darp6/Makefile.mk +++ b/src/board/system76/darp6/Makefile.mk @@ -6,9 +6,8 @@ board-y += ../darp5/gpio.c # FIXME: Handle this better CFLAGS += -I$(BOARD_DIR)/../darp5/include -EC = ite -CONFIG_EC_ITE_IT8587E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT8587E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/darp7/Makefile.mk b/src/board/system76/darp7/Makefile.mk index 758c610ad..81cb00779 100644 --- a/src/board/system76/darp7/Makefile.mk +++ b/src/board/system76/darp7/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/darp7/board.c b/src/board/system76/darp7/board.c index 1e0a5f891..d9c3bfe2d 100644 --- a/src/board/system76/darp7/board.c +++ b/src/board/system76/darp7/board.c @@ -3,7 +3,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -24,5 +24,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/darp7/include/board/gpio.h b/src/board/system76/darp7/include/board/gpio.h index ed1927f2c..49c64352f 100644 --- a/src/board/system76/darp7/include/board/gpio.h +++ b/src/board/system76/darp7/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/darp8/Makefile.mk b/src/board/system76/darp8/Makefile.mk index 5579a0d5a..2d7658284 100644 --- a/src/board/system76/darp8/Makefile.mk +++ b/src/board/system76/darp8/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/darp8/board.c b/src/board/system76/darp8/board.c index 3315c9284..21656a7f4 100644 --- a/src/board/system76/darp8/board.c +++ b/src/board/system76/darp8/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -26,5 +26,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/darp8/include/board/gpio.h b/src/board/system76/darp8/include/board/gpio.h index 4dab0ecac..2307e7890 100644 --- a/src/board/system76/darp8/include/board/gpio.h +++ b/src/board/system76/darp8/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/darp9/Makefile.mk b/src/board/system76/darp9/Makefile.mk index b70db80d1..3bba8c894 100644 --- a/src/board/system76/darp9/Makefile.mk +++ b/src/board/system76/darp9/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/darp9/board.c b/src/board/system76/darp9/board.c index 490ec7a98..70c251135 100644 --- a/src/board/system76/darp9/board.c +++ b/src/board/system76/darp9/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -25,5 +25,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/darp9/include/board/gpio.h b/src/board/system76/darp9/include/board/gpio.h index 462001c85..6397488eb 100644 --- a/src/board/system76/darp9/include/board/gpio.h +++ b/src/board/system76/darp9/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/galp3-c/Makefile.mk b/src/board/system76/galp3-c/Makefile.mk index 2353c9aae..e9c03822a 100644 --- a/src/board/system76/galp3-c/Makefile.mk +++ b/src/board/system76/galp3-c/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT8587E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT8587E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/galp3-c/include/board/gpio.h b/src/board/system76/galp3-c/include/board/gpio.h index f9aea4566..e45efc2f5 100644 --- a/src/board/system76/galp3-c/include/board/gpio.h +++ b/src/board/system76/galp3-c/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/galp4/Makefile.mk b/src/board/system76/galp4/Makefile.mk index 8681dce40..1cb9729d4 100644 --- a/src/board/system76/galp4/Makefile.mk +++ b/src/board/system76/galp4/Makefile.mk @@ -6,9 +6,8 @@ board-y += ../galp3-c/gpio.c # FIXME: Handle this better CFLAGS += -I$(BOARD_DIR)/../galp3-c/include -EC = ite -CONFIG_EC_ITE_IT8587E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT8587E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/galp5/Makefile.mk b/src/board/system76/galp5/Makefile.mk index c06f60fa1..a0bdb3965 100644 --- a/src/board/system76/galp5/Makefile.mk +++ b/src/board/system76/galp5/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/galp5/board.c b/src/board/system76/galp5/board.c index 200175f4f..3d1fc099c 100644 --- a/src/board/system76/galp5/board.c +++ b/src/board/system76/galp5/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -28,5 +28,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/galp5/include/board/gpio.h b/src/board/system76/galp5/include/board/gpio.h index 1b9b4fcc6..fc9b4ed46 100644 --- a/src/board/system76/galp5/include/board/gpio.h +++ b/src/board/system76/galp5/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/galp6/Makefile.mk b/src/board/system76/galp6/Makefile.mk index 74a805116..cb531b16e 100644 --- a/src/board/system76/galp6/Makefile.mk +++ b/src/board/system76/galp6/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/galp6/board.c b/src/board/system76/galp6/board.c index f23b3318d..061dca279 100644 --- a/src/board/system76/galp6/board.c +++ b/src/board/system76/galp6/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -24,5 +24,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/galp6/include/board/gpio.h b/src/board/system76/galp6/include/board/gpio.h index 1d13ace95..baed36c42 100644 --- a/src/board/system76/galp6/include/board/gpio.h +++ b/src/board/system76/galp6/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/galp7/Makefile.mk b/src/board/system76/galp7/Makefile.mk index c75bbb075..bc41878e3 100644 --- a/src/board/system76/galp7/Makefile.mk +++ b/src/board/system76/galp7/Makefile.mk @@ -6,9 +6,8 @@ board-y += ../galp6/gpio.c # FIXME: Handle this better CFLAGS += -I$(BOARD_DIR)/../galp6/include -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/gaze15/Makefile.mk b/src/board/system76/gaze15/Makefile.mk index 4bfeeafef..730329694 100644 --- a/src/board/system76/gaze15/Makefile.mk +++ b/src/board/system76/gaze15/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/gaze15/board.c b/src/board/system76/gaze15/board.c index f21483604..f8737db11 100644 --- a/src/board/system76/gaze15/board.c +++ b/src/board/system76/gaze15/board.c @@ -2,7 +2,7 @@ #include #include -#include +#include void board_init(void) { // Allow backlight to be turned on @@ -16,5 +16,5 @@ void board_init(void) { } void board_event(void) { - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/gaze15/include/board/gpio.h b/src/board/system76/gaze15/include/board/gpio.h index 834887709..2c7082c4d 100644 --- a/src/board/system76/gaze15/include/board/gpio.h +++ b/src/board/system76/gaze15/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/gaze16-3050/Makefile.mk b/src/board/system76/gaze16-3050/Makefile.mk index 148fb1130..b5f59b6bd 100644 --- a/src/board/system76/gaze16-3050/Makefile.mk +++ b/src/board/system76/gaze16-3050/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/gaze16-3050/board.c b/src/board/system76/gaze16-3050/board.c index d2ea8e909..f71b265b4 100644 --- a/src/board/system76/gaze16-3050/board.c +++ b/src/board/system76/gaze16-3050/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/gaze16-3050/include/board/gpio.h b/src/board/system76/gaze16-3050/include/board/gpio.h index c48cf7b66..d6aced1aa 100644 --- a/src/board/system76/gaze16-3050/include/board/gpio.h +++ b/src/board/system76/gaze16-3050/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/gaze16-3060-b/Makefile.mk b/src/board/system76/gaze16-3060-b/Makefile.mk index 6f5fa5790..9698e461c 100644 --- a/src/board/system76/gaze16-3060-b/Makefile.mk +++ b/src/board/system76/gaze16-3060-b/Makefile.mk @@ -6,9 +6,8 @@ board-y += ../gaze16-3060/gpio.c # FIXME: Handle this better CFLAGS += -I$(BOARD_DIR)/../gaze16-3060/include -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/gaze16-3060/Makefile.mk b/src/board/system76/gaze16-3060/Makefile.mk index 1db875caa..189d515d2 100644 --- a/src/board/system76/gaze16-3060/Makefile.mk +++ b/src/board/system76/gaze16-3060/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/gaze16-3060/board.c b/src/board/system76/gaze16-3060/board.c index d2ea8e909..f71b265b4 100644 --- a/src/board/system76/gaze16-3060/board.c +++ b/src/board/system76/gaze16-3060/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/gaze16-3060/include/board/gpio.h b/src/board/system76/gaze16-3060/include/board/gpio.h index 16be45539..6ba6b0018 100644 --- a/src/board/system76/gaze16-3060/include/board/gpio.h +++ b/src/board/system76/gaze16-3060/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/gaze17-3050/Makefile.mk b/src/board/system76/gaze17-3050/Makefile.mk index 865958057..f870c7a27 100644 --- a/src/board/system76/gaze17-3050/Makefile.mk +++ b/src/board/system76/gaze17-3050/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/gaze17-3050/board.c b/src/board/system76/gaze17-3050/board.c index d2ea8e909..f71b265b4 100644 --- a/src/board/system76/gaze17-3050/board.c +++ b/src/board/system76/gaze17-3050/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/gaze17-3050/include/board/gpio.h b/src/board/system76/gaze17-3050/include/board/gpio.h index aea68a70a..d71cec057 100644 --- a/src/board/system76/gaze17-3050/include/board/gpio.h +++ b/src/board/system76/gaze17-3050/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/gaze17-3060-b/Makefile.mk b/src/board/system76/gaze17-3060-b/Makefile.mk index 8d36d7920..6c5b015f6 100644 --- a/src/board/system76/gaze17-3060-b/Makefile.mk +++ b/src/board/system76/gaze17-3060-b/Makefile.mk @@ -6,9 +6,8 @@ board-y += ../gaze17-3060/gpio.c # FIXME: Handle this better CFLAGS += -I$(BOARD_DIR)/../gaze17-3060/include -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/gaze17-3060/Makefile.mk b/src/board/system76/gaze17-3060/Makefile.mk index 3d5e39cd2..ef97cac96 100644 --- a/src/board/system76/gaze17-3060/Makefile.mk +++ b/src/board/system76/gaze17-3060/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/gaze17-3060/board.c b/src/board/system76/gaze17-3060/board.c index d2ea8e909..f71b265b4 100644 --- a/src/board/system76/gaze17-3060/board.c +++ b/src/board/system76/gaze17-3060/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/gaze17-3060/include/board/gpio.h b/src/board/system76/gaze17-3060/include/board/gpio.h index aea68a70a..d71cec057 100644 --- a/src/board/system76/gaze17-3060/include/board/gpio.h +++ b/src/board/system76/gaze17-3060/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/gaze18/Makefile.mk b/src/board/system76/gaze18/Makefile.mk index fe1fb1b76..7f0c9af68 100644 --- a/src/board/system76/gaze18/Makefile.mk +++ b/src/board/system76/gaze18/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/gaze18/board.c b/src/board/system76/gaze18/board.c index d2ea8e909..f71b265b4 100644 --- a/src/board/system76/gaze18/board.c +++ b/src/board/system76/gaze18/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/gaze18/include/board/gpio.h b/src/board/system76/gaze18/include/board/gpio.h index 32506041d..32bae2944 100644 --- a/src/board/system76/gaze18/include/board/gpio.h +++ b/src/board/system76/gaze18/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/gaze20/Makefile.mk b/src/board/system76/gaze20/Makefile.mk index 5a70b0683..8056915ee 100644 --- a/src/board/system76/gaze20/Makefile.mk +++ b/src/board/system76/gaze20/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_256K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_256K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/gaze20/board.c b/src/board/system76/gaze20/board.c index d2ea8e909..f71b265b4 100644 --- a/src/board/system76/gaze20/board.c +++ b/src/board/system76/gaze20/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/gaze20/include/board/gpio.h b/src/board/system76/gaze20/include/board/gpio.h index 13625f3bc..3d853bcfc 100644 --- a/src/board/system76/gaze20/include/board/gpio.h +++ b/src/board/system76/gaze20/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/lemp10/Makefile.mk b/src/board/system76/lemp10/Makefile.mk index 0161d9487..7ca1011ca 100644 --- a/src/board/system76/lemp10/Makefile.mk +++ b/src/board/system76/lemp10/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/lemp10/board.c b/src/board/system76/lemp10/board.c index e8583d3eb..196f0d66c 100644 --- a/src/board/system76/lemp10/board.c +++ b/src/board/system76/lemp10/board.c @@ -3,7 +3,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -25,5 +25,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/lemp10/include/board/gpio.h b/src/board/system76/lemp10/include/board/gpio.h index 9affd2ff1..cb067d306 100644 --- a/src/board/system76/lemp10/include/board/gpio.h +++ b/src/board/system76/lemp10/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/lemp11/Makefile.mk b/src/board/system76/lemp11/Makefile.mk index 13b9b7926..4e40453ec 100644 --- a/src/board/system76/lemp11/Makefile.mk +++ b/src/board/system76/lemp11/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/lemp11/board.c b/src/board/system76/lemp11/board.c index d77595570..1a837e2db 100644 --- a/src/board/system76/lemp11/board.c +++ b/src/board/system76/lemp11/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -27,5 +27,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/lemp11/include/board/gpio.h b/src/board/system76/lemp11/include/board/gpio.h index 72b003712..e178c1705 100644 --- a/src/board/system76/lemp11/include/board/gpio.h +++ b/src/board/system76/lemp11/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/lemp12/Makefile.mk b/src/board/system76/lemp12/Makefile.mk index c187c961d..d7c4eccd9 100644 --- a/src/board/system76/lemp12/Makefile.mk +++ b/src/board/system76/lemp12/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/lemp12/board.c b/src/board/system76/lemp12/board.c index 247b0abce..0d018dd3b 100644 --- a/src/board/system76/lemp12/board.c +++ b/src/board/system76/lemp12/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -27,7 +27,7 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); // Hack to drain LDO_3V3 capacitors if (!gpio_get(&XLP_OUT)) { diff --git a/src/board/system76/lemp12/include/board/gpio.h b/src/board/system76/lemp12/include/board/gpio.h index 21a4314c9..b9eb54f16 100644 --- a/src/board/system76/lemp12/include/board/gpio.h +++ b/src/board/system76/lemp12/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/lemp13-b/Makefile.mk b/src/board/system76/lemp13-b/Makefile.mk index f204af49b..f9c10ecf4 100644 --- a/src/board/system76/lemp13-b/Makefile.mk +++ b/src/board/system76/lemp13-b/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_256K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_256K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/lemp13-b/board.c b/src/board/system76/lemp13-b/board.c index d2ea8e909..f71b265b4 100644 --- a/src/board/system76/lemp13-b/board.c +++ b/src/board/system76/lemp13-b/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/lemp13-b/include/board/gpio.h b/src/board/system76/lemp13-b/include/board/gpio.h index 7c46600bf..4595aecfa 100644 --- a/src/board/system76/lemp13-b/include/board/gpio.h +++ b/src/board/system76/lemp13-b/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/lemp13/Makefile.mk b/src/board/system76/lemp13/Makefile.mk index aaffff81e..3e90d89b8 100644 --- a/src/board/system76/lemp13/Makefile.mk +++ b/src/board/system76/lemp13/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_256K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_256K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/lemp13/board.c b/src/board/system76/lemp13/board.c index d2ea8e909..f71b265b4 100644 --- a/src/board/system76/lemp13/board.c +++ b/src/board/system76/lemp13/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/lemp13/include/board/gpio.h b/src/board/system76/lemp13/include/board/gpio.h index 7c46600bf..4595aecfa 100644 --- a/src/board/system76/lemp13/include/board/gpio.h +++ b/src/board/system76/lemp13/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/lemp9/Makefile.mk b/src/board/system76/lemp9/Makefile.mk index ca127494a..32a549ed4 100644 --- a/src/board/system76/lemp9/Makefile.mk +++ b/src/board/system76/lemp9/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/lemp9/include/board/gpio.h b/src/board/system76/lemp9/include/board/gpio.h index 2405eefa4..bf9983ef9 100644 --- a/src/board/system76/lemp9/include/board/gpio.h +++ b/src/board/system76/lemp9/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/oryp10/Makefile.mk b/src/board/system76/oryp10/Makefile.mk index 795850244..8041d63c2 100644 --- a/src/board/system76/oryp10/Makefile.mk +++ b/src/board/system76/oryp10/Makefile.mk @@ -6,9 +6,8 @@ board-y += ../oryp9/gpio.c # FIXME: Handle this better CFLAGS += -I$(BOARD_DIR)/../oryp9/include -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/oryp11/Makefile.mk b/src/board/system76/oryp11/Makefile.mk index 3f7c7bea2..4fdf5ca84 100644 --- a/src/board/system76/oryp11/Makefile.mk +++ b/src/board/system76/oryp11/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/oryp11/board.c b/src/board/system76/oryp11/board.c index d2ea8e909..f71b265b4 100644 --- a/src/board/system76/oryp11/board.c +++ b/src/board/system76/oryp11/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/oryp11/include/board/gpio.h b/src/board/system76/oryp11/include/board/gpio.h index cc4081e25..05d2eda4e 100644 --- a/src/board/system76/oryp11/include/board/gpio.h +++ b/src/board/system76/oryp11/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/oryp12/Makefile.mk b/src/board/system76/oryp12/Makefile.mk index 672c5dd8a..54478f21c 100644 --- a/src/board/system76/oryp12/Makefile.mk +++ b/src/board/system76/oryp12/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_256K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_256K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/oryp12/board.c b/src/board/system76/oryp12/board.c index d2ea8e909..f71b265b4 100644 --- a/src/board/system76/oryp12/board.c +++ b/src/board/system76/oryp12/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -21,5 +21,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/oryp12/include/board/gpio.h b/src/board/system76/oryp12/include/board/gpio.h index 2c2070856..8f7b4a4b1 100644 --- a/src/board/system76/oryp12/include/board/gpio.h +++ b/src/board/system76/oryp12/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/oryp5/Makefile.mk b/src/board/system76/oryp5/Makefile.mk index 980d9aa4e..4e7d93813 100644 --- a/src/board/system76/oryp5/Makefile.mk +++ b/src/board/system76/oryp5/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT8587E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT8587E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/oryp5/include/board/gpio.h b/src/board/system76/oryp5/include/board/gpio.h index 4cf22ca49..695012d5a 100644 --- a/src/board/system76/oryp5/include/board/gpio.h +++ b/src/board/system76/oryp5/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/oryp6/Makefile.mk b/src/board/system76/oryp6/Makefile.mk index 08d276c36..2d9fa3225 100644 --- a/src/board/system76/oryp6/Makefile.mk +++ b/src/board/system76/oryp6/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/oryp6/board.c b/src/board/system76/oryp6/board.c index 0baacc16b..27a32a8c7 100644 --- a/src/board/system76/oryp6/board.c +++ b/src/board/system76/oryp6/board.c @@ -2,7 +2,7 @@ #include #include -#include +#include void board_init(void) { // Allow CPU to boot @@ -20,5 +20,5 @@ void board_init(void) { } void board_event(void) { - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/oryp6/include/board/gpio.h b/src/board/system76/oryp6/include/board/gpio.h index 19c8c812e..f56371a8f 100644 --- a/src/board/system76/oryp6/include/board/gpio.h +++ b/src/board/system76/oryp6/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/oryp7/Makefile.mk b/src/board/system76/oryp7/Makefile.mk index 08d276c36..2d9fa3225 100644 --- a/src/board/system76/oryp7/Makefile.mk +++ b/src/board/system76/oryp7/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/oryp7/board.c b/src/board/system76/oryp7/board.c index 0baacc16b..27a32a8c7 100644 --- a/src/board/system76/oryp7/board.c +++ b/src/board/system76/oryp7/board.c @@ -2,7 +2,7 @@ #include #include -#include +#include void board_init(void) { // Allow CPU to boot @@ -20,5 +20,5 @@ void board_init(void) { } void board_event(void) { - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/oryp7/include/board/gpio.h b/src/board/system76/oryp7/include/board/gpio.h index b5fe6025b..1da1757de 100644 --- a/src/board/system76/oryp7/include/board/gpio.h +++ b/src/board/system76/oryp7/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/oryp8/Makefile.mk b/src/board/system76/oryp8/Makefile.mk index 33754ed9a..f75d02d34 100644 --- a/src/board/system76/oryp8/Makefile.mk +++ b/src/board/system76/oryp8/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/oryp8/board.c b/src/board/system76/oryp8/board.c index 96f709237..a2226c648 100644 --- a/src/board/system76/oryp8/board.c +++ b/src/board/system76/oryp8/board.c @@ -3,7 +3,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -17,5 +17,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/oryp8/include/board/gpio.h b/src/board/system76/oryp8/include/board/gpio.h index 42fc4feb5..df4805e7b 100644 --- a/src/board/system76/oryp8/include/board/gpio.h +++ b/src/board/system76/oryp8/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/oryp9/Makefile.mk b/src/board/system76/oryp9/Makefile.mk index 7e77ed34d..ab58a8533 100644 --- a/src/board/system76/oryp9/Makefile.mk +++ b/src/board/system76/oryp9/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/oryp9/board.c b/src/board/system76/oryp9/board.c index 4741765b4..b7281ef98 100644 --- a/src/board/system76/oryp9/board.c +++ b/src/board/system76/oryp9/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -23,5 +23,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/oryp9/include/board/gpio.h b/src/board/system76/oryp9/include/board/gpio.h index d5ec25567..cfff5242d 100644 --- a/src/board/system76/oryp9/include/board/gpio.h +++ b/src/board/system76/oryp9/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/board/system76/serw13/Makefile.mk b/src/board/system76/serw13/Makefile.mk index 716673974..c1868ccdb 100644 --- a/src/board/system76/serw13/Makefile.mk +++ b/src/board/system76/serw13/Makefile.mk @@ -3,9 +3,8 @@ board-y += board.c board-y += gpio.c -EC = ite -CONFIG_EC_ITE_IT5570E = y -CONFIG_EC_FLASH_SIZE_128K = y +CONFIG_SOC_ITE_IT5570E = y +CONFIG_SOC_FLASH_SIZE_128K = y # Intel-based host CONFIG_PLATFORM_INTEL = y diff --git a/src/board/system76/serw13/board.c b/src/board/system76/serw13/board.c index 4741765b4..b7281ef98 100644 --- a/src/board/system76/serw13/board.c +++ b/src/board/system76/serw13/board.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include void board_init(void) { espi_init(); @@ -23,5 +23,5 @@ void board_init(void) { void board_event(void) { espi_event(); - ec_read_post_codes(); + soc_read_post_codes(); } diff --git a/src/board/system76/serw13/include/board/gpio.h b/src/board/system76/serw13/include/board/gpio.h index 676060b81..071194834 100644 --- a/src/board/system76/serw13/include/board/gpio.h +++ b/src/board/system76/serw13/include/board/gpio.h @@ -3,7 +3,7 @@ #ifndef _BOARD_GPIO_H #define _BOARD_GPIO_H -#include +#include void gpio_init(void); diff --git a/src/ec/ite/Makefile.mk b/src/ec/ite/Makefile.mk deleted file mode 100644 index ce6b20411..000000000 --- a/src/ec/ite/Makefile.mk +++ /dev/null @@ -1,49 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-only - -ec-y += ec.c -ec-$(CONFIG_BUS_ESPI) += espi.c -ec-y += gpio.c -ec-y += i2c.c -ec-y += intc.c -ec-y += kbc.c -ec-y += pmc.c -ec-y += ps2.c -ec-y += signature.c -ec-y += wuc.c - -# Chip clock frequency: 9.2 MHz -CFLAGS += -DCONFIG_CLOCK_FREQ_KHZ=9200 - -ifeq ($(CONFIG_EC_ITE_IT8587E), y) -CFLAGS+=-DCONFIG_EC_ITE_IT8587E=1 -# SRAM is 4096 bytes, but SRAM at address 2048 is used for scratch ROM -SRAM_SIZE=2048 -else ifeq ($(CONFIG_EC_ITE_IT5570E), y) -CFLAGS+=-DCONFIG_EC_ITE_IT5570E=1 -# SRAM is 6144 bytes, only 4096 bytes are mapped at address 0. Region at -# 0x0E00-0x1000 is used for AP communication. So this is brought down to 2048, -# which matches IT8587E limits -SRAM_SIZE=2048 -else ifeq ($(CONFIG_EC_ITE_IT5571E), y) -# The IT5571E is effectively the same as the IT5570E. -CFLAGS+=-DCONFIG_EC_ITE_IT5571E=1 -SRAM_SIZE=2048 -else -$(error Unsupported EC) -endif - -ARCH=8051 - -# 64 KB is the max without banking -CODE_SIZE=65536 - -# Chip flash size -ifeq ($(CONFIG_EC_FLASH_SIZE_128K),y) -CONFIG_EC_FLASH_SIZE = 131072 -else ifeq ($(CONFIG_EC_FLASH_SIZE_256K),y) -CONFIG_EC_FLASH_SIZE = 262144 -else -$(error flash size not specified) -endif - -CFLAGS += -DCONFIG_EC_FLASH_SIZE=$(CONFIG_EC_FLASH_SIZE) diff --git a/src/ec/ite/include/ec/ec.h b/src/ec/ite/include/ec/ec.h deleted file mode 100644 index 9b95a2021..000000000 --- a/src/ec/ite/include/ec/ec.h +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -#ifndef _EC_EC_H -#define _EC_EC_H - -void ec_init(void); -void ec_read_post_codes(void); - -#endif // _EC_EC_H diff --git a/src/soc/Makefile.mk b/src/soc/Makefile.mk new file mode 100644 index 000000000..77ac86b91 --- /dev/null +++ b/src/soc/Makefile.mk @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-3.0-only + +ifeq ($(CONFIG_SOC_ITE_IT8587E)$(CONFIG_SOC_ITE_IT5570E)$(CONFIG_SOC_ITE_5571E),y) +CONFIG_SOC_VENDOR = ite +endif + +ifeq ($(CONFIG_SOC_VENDOR),) +$(error SoC selection misconfigured) +endif + +SOC_DIR = src/soc/$(CONFIG_SOC_VENDOR) + +INCLUDE += $(SOC_DIR)/Makefile.mk +CFLAGS += -I$(SOC_DIR)/include +include $(SOC_DIR)/Makefile.mk +SRC += $(foreach src,$(soc-y),$(SOC_DIR)/$(src)) diff --git a/src/soc/ite/Makefile.mk b/src/soc/ite/Makefile.mk new file mode 100644 index 000000000..b01a31d47 --- /dev/null +++ b/src/soc/ite/Makefile.mk @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: GPL-3.0-only + +soc-y += soc.c +soc-$(CONFIG_BUS_ESPI) += espi.c +soc-y += gpio.c +soc-y += i2c.c +soc-y += intc.c +soc-y += kbc.c +soc-y += pmc.c +soc-y += ps2.c +soc-y += signature.c +soc-y += wuc.c + +# Chip clock frequency: 9.2 MHz +CFLAGS += -DCONFIG_CLOCK_FREQ_KHZ=9200 + +ifeq ($(CONFIG_SOC_ITE_IT8587E), y) +CFLAGS+=-DCONFIG_SOC_ITE_IT8587E=1 +# SRAM is 4096 bytes, but SRAM at address 2048 is used for scratch ROM +SRAM_SIZE=2048 +else ifeq ($(CONFIG_SOC_ITE_IT5570E), y) +CFLAGS+=-DCONFIG_SOC_ITE_IT5570E=1 +# SRAM is 6144 bytes, only 4096 bytes are mapped at address 0. Region at +# 0x0E00-0x1000 is used for AP communication. So this is brought down to 2048, +# which matches IT8587E limits +SRAM_SIZE=2048 +else ifeq ($(CONFIG_SOC_ITE_IT5571E), y) +# The IT5571E is effectively the same as the IT5570E. +CFLAGS+=-DCONFIG_SOC_ITE_IT5571E=1 +SRAM_SIZE=2048 +else +$(error Unsupported SoC) +endif + +ARCH=8051 + +# 64 KB is the max without banking +CODE_SIZE=65536 + +# Chip flash size +ifeq ($(CONFIG_SOC_FLASH_SIZE_128K),y) +CONFIG_SOC_FLASH_SIZE = 131072 +else ifeq ($(CONFIG_SOC_FLASH_SIZE_256K),y) +CONFIG_SOC_FLASH_SIZE = 262144 +else +$(error flash size not specified) +endif + +CFLAGS += -DCONFIG_SOC_FLASH_SIZE=$(CONFIG_SOC_FLASH_SIZE) diff --git a/src/ec/ite/espi.c b/src/soc/ite/espi.c similarity index 94% rename from src/ec/ite/espi.c rename to src/soc/ite/espi.c index 448e92707..8e941ed6b 100644 --- a/src/ec/ite/espi.c +++ b/src/soc/ite/espi.c @@ -1,8 +1,8 @@ // SPDX-License-Identifier: GPL-3.0-only -#include +#include -#if CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +#if CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E // Not all wires are defined or implemented // Index 2 - AP to EC @@ -68,4 +68,4 @@ void vw_set(struct VirtualWire *const vw, enum VirtualWireState state) __critica *vw->index = index; } -#endif // CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +#endif // CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E diff --git a/src/ec/ite/gpio.c b/src/soc/ite/gpio.c similarity index 98% rename from src/ec/ite/gpio.c rename to src/soc/ite/gpio.c index 8eaee9842..80b0b0b6e 100644 --- a/src/ec/ite/gpio.c +++ b/src/soc/ite/gpio.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only -#include +#include #include bool gpio_get(const struct Gpio *const gpio) { diff --git a/src/ec/ite/i2c.c b/src/soc/ite/i2c.c similarity index 98% rename from src/ec/ite/i2c.c rename to src/soc/ite/i2c.c index c164e9954..d99128369 100644 --- a/src/ec/ite/i2c.c +++ b/src/soc/ite/i2c.c @@ -1,9 +1,8 @@ // SPDX-License-Identifier: GPL-3.0-only -#include - #include -#include +#include +#include //TODO: find best value #define I2C_TIMEOUT 10000 @@ -32,7 +31,7 @@ struct I2C __code I2C_1 = { .trasla = TRASLAB, }; -#if CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +#if CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E struct I2C __code I2C_4 = { .hosta = HOSTAE, .hoctl = HOCTLE, diff --git a/src/ec/ite/include/ec/bram.h b/src/soc/ite/include/soc/bram.h similarity index 64% rename from src/ec/ite/include/ec/bram.h rename to src/soc/ite/include/soc/bram.h index 5e63f368b..f2d7b35f9 100644 --- a/src/ec/ite/include/ec/bram.h +++ b/src/soc/ite/include/soc/bram.h @@ -1,10 +1,10 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_BRAM_H -#define _EC_BRAM_H +#ifndef _SOC_BRAM_H +#define _SOC_BRAM_H #include volatile uint8_t __xdata __at(0x2200) BRAM[192]; -#endif // _EC_BRAM_H +#endif // _SOC_BRAM_H diff --git a/src/ec/ite/include/ec/dac.h b/src/soc/ite/include/soc/dac.h similarity index 83% rename from src/ec/ite/include/ec/dac.h rename to src/soc/ite/include/soc/dac.h index f79d90400..d1517c87d 100644 --- a/src/ec/ite/include/ec/dac.h +++ b/src/soc/ite/include/soc/dac.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_DAC_H -#define _EC_DAC_H +#ifndef _SOC_DAC_H +#define _SOC_DAC_H #include @@ -11,4 +11,4 @@ volatile uint8_t __xdata __at(0x1A05) DACDAT3; volatile uint8_t __xdata __at(0x1A06) DACDAT4; volatile uint8_t __xdata __at(0x1A07) DACDAT5; -#endif // _EC_DAC_H +#endif // _SOC_DAC_H diff --git a/src/ec/ite/include/ec/ecpm.h b/src/soc/ite/include/soc/ecpm.h similarity index 87% rename from src/ec/ite/include/ec/ecpm.h rename to src/soc/ite/include/soc/ecpm.h index 605c8337d..a7e72c6fb 100644 --- a/src/ec/ite/include/ec/ecpm.h +++ b/src/soc/ite/include/soc/ecpm.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_ECPM_H -#define _EC_ECPM_H +#ifndef _SOC_ECPM_H +#define _SOC_ECPM_H #include @@ -14,4 +14,4 @@ volatile uint8_t __xdata __at(0x1E06) PLLFREQ; volatile uint8_t __xdata __at(0x1E08) PLLCSS; volatile uint8_t __xdata __at(0x1E09) CGCTRL4; -#endif // _EC_ECPM_H +#endif // _SOC_ECPM_H diff --git a/src/ec/ite/include/ec/espi.h b/src/soc/ite/include/soc/espi.h similarity index 98% rename from src/ec/ite/include/ec/espi.h rename to src/soc/ite/include/soc/espi.h index cc276f83c..4c7d4a9b2 100644 --- a/src/ec/ite/include/ec/espi.h +++ b/src/soc/ite/include/soc/espi.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_ESPI_H -#define _EC_ESPI_H +#ifndef _SOC_ESPI_H +#define _SOC_ESPI_H #include @@ -182,4 +182,4 @@ volatile uint8_t __xdata __at(0x3400) UDB[80]; // PUT_FLASH_NP data bytes (64) volatile uint8_t __xdata __at(0x3480) PUTFLASHNPDB[64]; -#endif // _EC_ESPI_H +#endif // _SOC_ESPI_H diff --git a/src/ec/ite/include/ec/etwd.h b/src/soc/ite/include/soc/etwd.h similarity index 84% rename from src/ec/ite/include/ec/etwd.h rename to src/soc/ite/include/soc/etwd.h index 12eac7ce4..d9a167b18 100644 --- a/src/ec/ite/include/ec/etwd.h +++ b/src/soc/ite/include/soc/etwd.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_ECWD_H -#define _EC_ECWD_H +#ifndef _SOC_ECWD_H +#define _SOC_ECWD_H #include @@ -12,4 +12,4 @@ volatile uint8_t __xdata __at(0x1F06) EWDCNTLLR; volatile uint8_t __xdata __at(0x1F07) EWDKEYR; volatile uint8_t __xdata __at(0x1F09) EWDCNTLHR; -#endif // _EC_ECWD_H +#endif // _SOC_ECWD_H diff --git a/src/ec/ite/include/ec/gctrl.h b/src/soc/ite/include/soc/gctrl.h similarity index 74% rename from src/ec/ite/include/ec/gctrl.h rename to src/soc/ite/include/soc/gctrl.h index ee0504a42..b39f2a6e0 100644 --- a/src/ec/ite/include/ec/gctrl.h +++ b/src/soc/ite/include/soc/gctrl.h @@ -1,17 +1,17 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_GCTRL_H -#define _EC_GCTRL_H +#ifndef _SOC_GCTRL_H +#define _SOC_GCTRL_H #include volatile uint8_t __xdata __at(0x2006) RSTS; volatile uint8_t __xdata __at(0x200A) BADRSEL; volatile uint8_t __xdata __at(0x200D) SPCTRL1; -#if CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +#if CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E volatile uint8_t __xdata __at(0x2030) P80H81HS; volatile uint8_t __xdata __at(0x2031) P80HD; volatile uint8_t __xdata __at(0x2032) P81HD; #endif -#endif // _EC_GCTRL_H +#endif // _SOC_GCTRL_H diff --git a/src/ec/ite/include/ec/gpio.h b/src/soc/ite/include/soc/gpio.h similarity index 97% rename from src/ec/ite/include/ec/gpio.h rename to src/soc/ite/include/soc/gpio.h index 9167c2ad7..a3c5233ae 100644 --- a/src/ec/ite/include/ec/gpio.h +++ b/src/soc/ite/include/soc/gpio.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_GPIO_H -#define _EC_GPIO_H +#ifndef _SOC_GPIO_H +#define _SOC_GPIO_H #include @@ -59,7 +59,7 @@ volatile uint8_t __xdata __at(0x16FE) GCR15; volatile uint8_t __xdata __at(0x16E0) GCR16; volatile uint8_t __xdata __at(0x16E1) GCR17; volatile uint8_t __xdata __at(0x16E2) GCR18; -#if CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +#if CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E volatile uint8_t __xdata __at(0x16E4) GCR19; volatile uint8_t __xdata __at(0x16E5) GCR20; volatile uint8_t __xdata __at(0x16E6) GCR21; @@ -119,7 +119,7 @@ volatile uint8_t __xdata __at(0x161B) GPCRB3; volatile uint8_t __xdata __at(0x161C) GPCRB4; volatile uint8_t __xdata __at(0x161D) GPCRB5; volatile uint8_t __xdata __at(0x161E) GPCRB6; -#if CONFIG_EC_ITE_IT5571E || CONFIG_EC_ITE_IT8587E +#if CONFIG_SOC_ITE_IT5571E || CONFIG_SOC_ITE_IT8587E volatile uint8_t __xdata __at(0x161F) GPCRB7; #endif @@ -175,7 +175,7 @@ volatile uint8_t __xdata __at(0x164B) GPCRH3; volatile uint8_t __xdata __at(0x164C) GPCRH4; volatile uint8_t __xdata __at(0x164D) GPCRH5; volatile uint8_t __xdata __at(0x164E) GPCRH6; -#if CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +#if CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E volatile uint8_t __xdata __at(0x164F) GPCRH7; #endif @@ -205,4 +205,4 @@ volatile uint8_t __xdata __at(0x16A4) GPCRM4; volatile uint8_t __xdata __at(0x16A5) GPCRM5; volatile uint8_t __xdata __at(0x16A6) GPCRM6; -#endif // _EC_GPIO_H +#endif // _SOC_GPIO_H diff --git a/src/ec/ite/include/ec/i2c.h b/src/soc/ite/include/soc/i2c.h similarity index 66% rename from src/ec/ite/include/ec/i2c.h rename to src/soc/ite/include/soc/i2c.h index 024cf40e0..58ac8be1a 100644 --- a/src/ec/ite/include/ec/i2c.h +++ b/src/soc/ite/include/soc/i2c.h @@ -1,16 +1,16 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_I2C_H -#define _EC_I2C_H +#ifndef _SOC_I2C_H +#define _SOC_I2C_H #include extern struct I2C __code I2C_0; extern struct I2C __code I2C_1; -#if CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +#if CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E extern struct I2C __code I2C_4; #endif void i2c_reset(struct I2C *const i2c, bool kill); -#endif // _EC_I2C_H +#endif // _SOC_I2C_H diff --git a/src/ec/ite/include/ec/intc.h b/src/soc/ite/include/soc/intc.h similarity index 97% rename from src/ec/ite/include/ec/intc.h rename to src/soc/ite/include/soc/intc.h index 99fc81aa2..5b985eb74 100644 --- a/src/ec/ite/include/ec/intc.h +++ b/src/soc/ite/include/soc/intc.h @@ -7,8 +7,8 @@ // IELMR: Interrupt Edge/Level-Triggered Mode Register // IPOLR: Interrupt Polarity Register -#ifndef _EC_INTC_H -#define _EC_INTC_H +#ifndef _SOC_INTC_H +#define _SOC_INTC_H #include @@ -107,7 +107,7 @@ volatile uint8_t __xdata __at(0x114D) IER18; volatile uint8_t __xdata __at(0x114E) IELMR18; volatile uint8_t __xdata __at(0x114F) IPOLR18; -#if CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +#if CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E volatile uint8_t __xdata __at(0x1150) ISR19; volatile uint8_t __xdata __at(0x1151) IER19; volatile uint8_t __xdata __at(0x1152) IELMR19; @@ -138,4 +138,4 @@ void intc_enable(uint8_t nr); void intc_disable(uint8_t nr); void intc_clear(uint8_t nr); -#endif // _EC_INTC_H +#endif // _SOC_INTC_H diff --git a/src/ec/ite/include/ec/kbc.h b/src/soc/ite/include/soc/kbc.h similarity index 94% rename from src/ec/ite/include/ec/kbc.h rename to src/soc/ite/include/soc/kbc.h index 0fbc254e1..251d51823 100644 --- a/src/ec/ite/include/ec/kbc.h +++ b/src/soc/ite/include/soc/kbc.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_KBC_H -#define _EC_KBC_H +#ifndef _SOC_KBC_H +#define _SOC_KBC_H #include @@ -41,4 +41,4 @@ volatile uint8_t __xdata __at(0x1306) KBHIKDOR; volatile uint8_t __xdata __at(0x1308) KBHIMDOR; volatile uint8_t __xdata __at(0x130A) KBHIDIR; -#endif // _EC_KBC_H +#endif // _SOC_KBC_H diff --git a/src/ec/ite/include/ec/kbscan.h b/src/soc/ite/include/soc/kbscan.h similarity index 96% rename from src/ec/ite/include/ec/kbscan.h rename to src/soc/ite/include/soc/kbscan.h index 180dc1354..f66c5af81 100644 --- a/src/ec/ite/include/ec/kbscan.h +++ b/src/soc/ite/include/soc/kbscan.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_KBSCAN_H -#define _EC_KBSCAN_H +#ifndef _SOC_KBSCAN_H +#define _SOC_KBSCAN_H #include @@ -46,4 +46,4 @@ volatile uint8_t __xdata __at(0x1D23) SDC2R; volatile uint8_t __xdata __at(0x1D24) SDC3R; volatile uint8_t __xdata __at(0x1D25) SDSR; -#endif // _EC_KBSCAN_H +#endif // _SOC_KBSCAN_H diff --git a/src/ec/ite/include/ec/peci.h b/src/soc/ite/include/soc/peci.h similarity index 91% rename from src/ec/ite/include/ec/peci.h rename to src/soc/ite/include/soc/peci.h index 6ad701d4a..797813664 100644 --- a/src/ec/ite/include/ec/peci.h +++ b/src/soc/ite/include/soc/peci.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_PECI_H -#define _EC_PECI_H +#ifndef _SOC_PECI_H +#define _SOC_PECI_H #include @@ -17,4 +17,4 @@ static volatile uint8_t __xdata __at(0x3008) HOCTL2R; static volatile uint8_t __xdata __at(0x3009) RWFCSV; static volatile uint8_t __xdata __at(0x300E) PADCTLR; -#endif // _EC_PECI_H +#endif // _SOC_PECI_H diff --git a/src/ec/ite/include/ec/pmc.h b/src/soc/ite/include/soc/pmc.h similarity index 97% rename from src/ec/ite/include/ec/pmc.h rename to src/soc/ite/include/soc/pmc.h index c43f1d036..c1f8b5193 100644 --- a/src/ec/ite/include/ec/pmc.h +++ b/src/soc/ite/include/soc/pmc.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_PMC_H -#define _EC_PMC_H +#ifndef _SOC_PMC_H +#define _SOC_PMC_H #include @@ -76,4 +76,4 @@ volatile uint8_t __xdata __at(0x1543) PM5CTL; volatile uint8_t __xdata __at(0x1544) PM5IC; volatile uint8_t __xdata __at(0x1545) PM5IE; -#endif // _EC_PMC_H +#endif // _SOC_PMC_H diff --git a/src/ec/ite/include/ec/ps2.h b/src/soc/ite/include/soc/ps2.h similarity index 94% rename from src/ec/ite/include/ec/ps2.h rename to src/soc/ite/include/soc/ps2.h index e8feeb924..e28cb2961 100644 --- a/src/ec/ite/include/ec/ps2.h +++ b/src/soc/ite/include/soc/ps2.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_PS2_H -#define _EC_PS2_H +#ifndef _SOC_PS2_H +#define _SOC_PS2_H #include @@ -40,4 +40,4 @@ volatile uint8_t __xdata __at(0x170C) PSDAT1; volatile uint8_t __xdata __at(0x170D) PSDAT2; volatile uint8_t __xdata __at(0x170E) PSDAT3; -#endif // _EC_PS2_H +#endif // _SOC_PS2_H diff --git a/src/ec/ite/include/ec/pwm.h b/src/soc/ite/include/soc/pwm.h similarity index 95% rename from src/ec/ite/include/ec/pwm.h rename to src/soc/ite/include/soc/pwm.h index 89ded7b22..ef6a77bb2 100644 --- a/src/ec/ite/include/ec/pwm.h +++ b/src/soc/ite/include/soc/pwm.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_PWM_H -#define _EC_PWM_H +#ifndef _SOC_PWM_H +#define _SOC_PWM_H #include @@ -62,9 +62,9 @@ volatile uint8_t __xdata __at(0x1823) ZTIER; // Tachometer switch control register volatile uint8_t __xdata __at(0x1848) TSWCTLR; -#if CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +#if CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E // PWM Load Counter Control Register volatile uint8_t __xdata __at(0x185A) PWMLCCR; #endif -#endif // _EC_PWM_H +#endif // _SOC_PWM_H diff --git a/src/ec/ite/include/ec/scratch.h b/src/soc/ite/include/soc/scratch.h similarity index 82% rename from src/ec/ite/include/ec/scratch.h rename to src/soc/ite/include/soc/scratch.h index 566c3fc34..9548ccb16 100644 --- a/src/ec/ite/include/ec/scratch.h +++ b/src/soc/ite/include/soc/scratch.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_SCRATCH_H -#define _EC_SCRATCH_H +#ifndef _SOC_SCRATCH_H +#define _SOC_SCRATCH_H #include @@ -9,14 +9,14 @@ volatile uint8_t __xdata __at(0x1040) SCAR0L; volatile uint8_t __xdata __at(0x1041) SCAR0M; volatile uint8_t __xdata __at(0x1042) SCAR0H; -#if CONFIG_EC_ITE_IT8587E +#if CONFIG_SOC_ITE_IT8587E // SCAR1 is in xram at 0x800-0xC00 volatile uint8_t __xdata __at(0x1043) SCAR1L; volatile uint8_t __xdata __at(0x1044) SCAR1M; volatile uint8_t __xdata __at(0x1045) SCAR1H; #endif -#if CONFIG_EC_ITE_IT8587E +#if CONFIG_SOC_ITE_IT8587E #define SCARL SCAR1L #define SCARM SCAR1M #define SCARH SCAR1H @@ -26,4 +26,4 @@ volatile uint8_t __xdata __at(0x1045) SCAR1H; #define SCARH SCAR0H #endif -#endif // _EC_SCRATCH_H +#endif // _SOC_SCRATCH_H diff --git a/src/ec/ite/include/ec/smbus.h b/src/soc/ite/include/soc/smbus.h similarity index 97% rename from src/ec/ite/include/ec/smbus.h rename to src/soc/ite/include/soc/smbus.h index 586af4ad3..6e874a1cb 100644 --- a/src/ec/ite/include/ec/smbus.h +++ b/src/soc/ite/include/soc/smbus.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only -#ifndef _EC_SMBUS_H -#define _EC_SMBUS_H +#ifndef _SOC_SMBUS_H +#define _SOC_SMBUS_H #include @@ -95,7 +95,7 @@ volatile uint8_t __xdata __at(0x1C44) RESLADR2B; // SMCLK timing setting for channel B volatile uint8_t __xdata __at(0x1C41) SCLKTSB; -#if CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +#if CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E // Host status for channel E volatile uint8_t __xdata __at(0x1CA0) HOSTAE; // Host control for channel E @@ -129,4 +129,4 @@ volatile uint8_t __xdata __at(0x1C26) SMB25MS; volatile uint8_t __xdata __at(0x1C27) SMB45P3USL; volatile uint8_t __xdata __at(0x1C28) SMB45P3USH; -#endif // _EC_SMBUS_H +#endif // _SOC_SMBUS_H diff --git a/src/soc/ite/include/soc/soc.h b/src/soc/ite/include/soc/soc.h new file mode 100644 index 000000000..3a283e3b8 --- /dev/null +++ b/src/soc/ite/include/soc/soc.h @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-3.0-only + +#ifndef _SOC_SOC_H +#define _SOC_SOC_H + +void soc_init(void); +void soc_read_post_codes(void); + +#endif // _SOC_SOC_H diff --git a/src/ec/ite/include/ec/wuc.h b/src/soc/ite/include/soc/wuc.h similarity index 96% rename from src/ec/ite/include/ec/wuc.h rename to src/soc/ite/include/soc/wuc.h index 43a79b3de..679e8b4c7 100644 --- a/src/ec/ite/include/ec/wuc.h +++ b/src/soc/ite/include/soc/wuc.h @@ -6,8 +6,8 @@ // WUESR: Wake-Up Edge Sense Register // WUENR: Wake-Up Enable Register -#ifndef _EC_WUC_H -#define _EC_WUC_H +#ifndef _SOC_WUC_H +#define _SOC_WUC_H #include @@ -65,4 +65,4 @@ void wuc_enable(uint8_t nr, enum WucEdgeMode detect); void wuc_disable(uint8_t nr); void wuc_clear(uint8_t nr); -#endif // _EC_WUC_H +#endif // _SOC_WUC_H diff --git a/src/ec/ite/intc.c b/src/soc/ite/intc.c similarity index 95% rename from src/ec/ite/intc.c rename to src/soc/ite/intc.c index 54651eecb..4256cc1bd 100644 --- a/src/ec/ite/intc.c +++ b/src/soc/ite/intc.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only -#include +#include #include struct IrqGroup { @@ -37,7 +37,7 @@ static const struct IrqGroup irqs[] = { IRQ_GROUP(16), IRQ_GROUP(17), IRQ_GROUP(18), -#if CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +#if CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E IRQ_GROUP(19), IRQ_GROUP(20), IRQ_GROUP(21), diff --git a/src/ec/ite/kbc.c b/src/soc/ite/kbc.c similarity index 98% rename from src/ec/ite/kbc.c rename to src/soc/ite/kbc.c index 5fd634926..a6e1a0f3a 100644 --- a/src/ec/ite/kbc.c +++ b/src/soc/ite/kbc.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only +#include #include -#include struct Kbc __code KBC = { .control = &KBHICR, diff --git a/src/ec/ite/pmc.c b/src/soc/ite/pmc.c similarity index 97% rename from src/ec/ite/pmc.c rename to src/soc/ite/pmc.c index 6b213290f..304507a27 100644 --- a/src/ec/ite/pmc.c +++ b/src/soc/ite/pmc.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only -#include +#include #define PMC(NUM) { \ .status = &PM ## NUM ## STS, \ diff --git a/src/ec/ite/ps2.c b/src/soc/ite/ps2.c similarity index 95% rename from src/ec/ite/ps2.c rename to src/soc/ite/ps2.c index ada30ae25..653208077 100644 --- a/src/ec/ite/ps2.c +++ b/src/soc/ite/ps2.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only -#include +#include #define PS2(NUM) { \ .control = &PSCTL ## NUM, \ diff --git a/src/ec/ite/signature.c b/src/soc/ite/signature.c similarity index 95% rename from src/ec/ite/signature.c rename to src/soc/ite/signature.c index 767f53263..44a7caa78 100644 --- a/src/ec/ite/signature.c +++ b/src/soc/ite/signature.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only -#include +#include #if CONFIG_BUS_ESPI // eSPI signature (byte 7 = 0xA4) diff --git a/src/ec/ite/ec.c b/src/soc/ite/soc.c similarity index 70% rename from src/ec/ite/ec.c rename to src/soc/ite/soc.c index 4553e97b4..ebf142ef5 100644 --- a/src/ec/ite/ec.c +++ b/src/soc/ite/soc.c @@ -1,12 +1,12 @@ // SPDX-License-Identifier: GPL-3.0-only -#include -#include +#include +#include #include #include -void ec_init(void) { -#if CONFIG_EC_ITE_IT8587E +void soc_init(void) { +#if CONFIG_SOC_ITE_IT8587E RSTS = (0b10U << 6) | BIT(2); #else RSTS = (0b01U << 6) | BIT(2); @@ -16,8 +16,8 @@ void ec_init(void) { #endif } -void ec_read_post_codes(void) { -#if CONFIG_EC_ITE_IT5570E || CONFIG_EC_ITE_IT5571E +void soc_read_post_codes(void) { +#if CONFIG_SOC_ITE_IT5570E || CONFIG_SOC_ITE_IT5571E while (P80H81HS & 1) { uint8_t p80h = P80HD; uint8_t p81h = P81HD; diff --git a/src/ec/ite/wuc.c b/src/soc/ite/wuc.c similarity index 98% rename from src/ec/ite/wuc.c rename to src/soc/ite/wuc.c index eb3481428..ee3344d7f 100644 --- a/src/ec/ite/wuc.c +++ b/src/soc/ite/wuc.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only -#include +#include #include #include