diff options
-rw-r--r-- | src/ec/ec.h | 24 | ||||
-rw-r--r-- | src/mainboard/google/auron/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/google/auron_paine/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/google/chell/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/google/cyan/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/google/enguarde/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/google/falco/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/google/glados/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/google/lars/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/google/ninja/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/google/peppy/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/google/rambi/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/google/reef/bootblock.c | 3 | ||||
-rw-r--r-- | src/mainboard/google/reef/ec.c | 3 | ||||
-rw-r--r-- | src/mainboard/google/reef/mainboard.c | 3 | ||||
-rw-r--r-- | src/mainboard/google/samus/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/intel/kunimitsu/ec.h | 5 | ||||
-rw-r--r-- | src/mainboard/intel/strago/ec.h | 5 |
18 files changed, 41 insertions, 62 deletions
diff --git a/src/ec/ec.h b/src/ec/ec.h new file mode 100644 index 0000000000..ea48f5b382 --- /dev/null +++ b/src/ec/ec.h @@ -0,0 +1,24 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2016 Google Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef EC_EC_H +#define EC_EC_H + +#ifndef __ACPI__ +/* Entry point doing any mainboard specific EC initialization. */ +void mainboard_ec_init(void); +#endif + +#endif diff --git a/src/mainboard/google/auron/ec.h b/src/mainboard/google/auron/ec.h index 5a98ad66cb..7290a9aacd 100644 --- a/src/mainboard/google/auron/ec.h +++ b/src/mainboard/google/auron/ec.h @@ -16,6 +16,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> #define EC_SCI_GPI 36 /* GPIO36 is EC_SCI# */ @@ -55,8 +56,4 @@ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/google/auron_paine/ec.h b/src/mainboard/google/auron_paine/ec.h index 8b7d4e5b9b..9bfb5557a4 100644 --- a/src/mainboard/google/auron_paine/ec.h +++ b/src/mainboard/google/auron_paine/ec.h @@ -16,6 +16,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> #define EC_SCI_GPI 36 /* GPIO36 is EC_SCI# */ @@ -54,8 +55,4 @@ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/google/chell/ec.h b/src/mainboard/google/chell/ec.h index 15d8e6d3e1..ba9a450708 100644 --- a/src/mainboard/google/chell/ec.h +++ b/src/mainboard/google/chell/ec.h @@ -17,6 +17,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> #define MAINBOARD_EC_SCI_EVENTS \ @@ -55,8 +56,4 @@ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)|\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/google/cyan/ec.h b/src/mainboard/google/cyan/ec.h index 483434b52e..4e35ac9597 100644 --- a/src/mainboard/google/cyan/ec.h +++ b/src/mainboard/google/cyan/ec.h @@ -17,6 +17,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> /* GPIO_S0_000 is EC_SCI#, but it is bit 16 in GPE_STS */ @@ -59,8 +60,4 @@ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)|\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/google/enguarde/ec.h b/src/mainboard/google/enguarde/ec.h index 19f60909c7..4a4599c82f 100644 --- a/src/mainboard/google/enguarde/ec.h +++ b/src/mainboard/google/enguarde/ec.h @@ -16,6 +16,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> /* GPIO_S0_000 is EC_SCI#, but it is bit 24 in GPE_STS */ @@ -55,8 +56,4 @@ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/google/falco/ec.h b/src/mainboard/google/falco/ec.h index 8de7065b20..2bd46e3dd8 100644 --- a/src/mainboard/google/falco/ec.h +++ b/src/mainboard/google/falco/ec.h @@ -16,6 +16,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> #define EC_SCI_GPI 36 /* GPIO36 is EC_SCI# */ @@ -53,8 +54,4 @@ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/google/glados/ec.h b/src/mainboard/google/glados/ec.h index 15d8e6d3e1..ba9a450708 100644 --- a/src/mainboard/google/glados/ec.h +++ b/src/mainboard/google/glados/ec.h @@ -17,6 +17,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> #define MAINBOARD_EC_SCI_EVENTS \ @@ -55,8 +56,4 @@ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)|\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/google/lars/ec.h b/src/mainboard/google/lars/ec.h index 15d8e6d3e1..ba9a450708 100644 --- a/src/mainboard/google/lars/ec.h +++ b/src/mainboard/google/lars/ec.h @@ -17,6 +17,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> #define MAINBOARD_EC_SCI_EVENTS \ @@ -55,8 +56,4 @@ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)|\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/google/ninja/ec.h b/src/mainboard/google/ninja/ec.h index 159351bed2..92c131881e 100644 --- a/src/mainboard/google/ninja/ec.h +++ b/src/mainboard/google/ninja/ec.h @@ -16,6 +16,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> /* GPIO_S0_000 is EC_SCI#, but it is bit 24 in GPE_STS */ @@ -55,8 +56,4 @@ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/google/peppy/ec.h b/src/mainboard/google/peppy/ec.h index 89630b2660..22942eed15 100644 --- a/src/mainboard/google/peppy/ec.h +++ b/src/mainboard/google/peppy/ec.h @@ -16,6 +16,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> #define EC_SCI_GPI 36 /* GPIO36 is EC_SCI# */ @@ -51,8 +52,4 @@ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/google/rambi/ec.h b/src/mainboard/google/rambi/ec.h index 391f2daf82..6340b698e9 100644 --- a/src/mainboard/google/rambi/ec.h +++ b/src/mainboard/google/rambi/ec.h @@ -16,6 +16,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> /* GPIO_S0_000 is EC_SCI#, but it is bit 24 in GPE_STS */ @@ -56,8 +57,4 @@ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/google/reef/bootblock.c b/src/mainboard/google/reef/bootblock.c index da66009834..57d20d9058 100644 --- a/src/mainboard/google/reef/bootblock.c +++ b/src/mainboard/google/reef/bootblock.c @@ -15,12 +15,11 @@ #include <baseboard/variants.h> #include <bootblock_common.h> +#include <ec/ec.h> #include <soc/lpc.h> #include <soc/gpio.h> #include <variant/ec.h> -void mainboard_ec_init(void); - void bootblock_mainboard_init(void) { const struct pad_config *pads; diff --git a/src/mainboard/google/reef/ec.c b/src/mainboard/google/reef/ec.c index e1832fdbaf..646216b8e3 100644 --- a/src/mainboard/google/reef/ec.c +++ b/src/mainboard/google/reef/ec.c @@ -15,13 +15,12 @@ #include <arch/acpi.h> #include <console/console.h> +#include <ec/ec.h> #include <ec/google/chromeec/ec.h> #include <rules.h> #include <soc/lpc.h> #include <variant/ec.h> -void mainboard_ec_init(void); - static void ramstage_ec_init(void) { printk(BIOS_ERR, "mainboard: EC init\n"); diff --git a/src/mainboard/google/reef/mainboard.c b/src/mainboard/google/reef/mainboard.c index 016c9ac3c9..3f23a77847 100644 --- a/src/mainboard/google/reef/mainboard.c +++ b/src/mainboard/google/reef/mainboard.c @@ -18,6 +18,7 @@ #include <boardid.h> #include <console/console.h> #include <device/device.h> +#include <ec/ec.h> #include <nhlt.h> #include <soc/gpio.h> #include <soc/nhlt.h> @@ -25,8 +26,6 @@ #include <variant/ec.h> #include <variant/gpio.h> -void mainboard_ec_init(void); - static void mainboard_init(void *chip_info) { int boardid; diff --git a/src/mainboard/google/samus/ec.h b/src/mainboard/google/samus/ec.h index c53aa4bde1..bfcdfb3988 100644 --- a/src/mainboard/google/samus/ec.h +++ b/src/mainboard/google/samus/ec.h @@ -16,6 +16,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> #define EC_SCI_GPI 36 /* GPIO36 is EC_SCI# */ @@ -57,8 +58,4 @@ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/intel/kunimitsu/ec.h b/src/mainboard/intel/kunimitsu/ec.h index 15d8e6d3e1..ba9a450708 100644 --- a/src/mainboard/intel/kunimitsu/ec.h +++ b/src/mainboard/intel/kunimitsu/ec.h @@ -17,6 +17,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> #define MAINBOARD_EC_SCI_EVENTS \ @@ -55,8 +56,4 @@ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)|\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif diff --git a/src/mainboard/intel/strago/ec.h b/src/mainboard/intel/strago/ec.h index 483434b52e..4e35ac9597 100644 --- a/src/mainboard/intel/strago/ec.h +++ b/src/mainboard/intel/strago/ec.h @@ -17,6 +17,7 @@ #ifndef MAINBOARD_EC_H #define MAINBOARD_EC_H +#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> /* GPIO_S0_000 is EC_SCI#, but it is bit 16 in GPE_STS */ @@ -59,8 +60,4 @@ EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN)|\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC)) -#ifndef __ACPI__ -extern void mainboard_ec_init(void); -#endif - #endif |