From 91fa9d7696ef88e580caa1f762e72bd9e3e18a18 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 23 Sep 2016 16:38:27 -0500 Subject: mainboards,ec: provide common declaration for mainboard_ec_init() Add a header file to provide common declarations that the mainboards can use regarding EC init. BUG=chrome-os-partner:56677 Change-Id: Iaa0b37eff4de644e969a18364713b90b7f27fa1c Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/16734 Reviewed-by: Duncan Laurie Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) --- src/ec/ec.h | 24 ++++++++++++++++++++++++ src/mainboard/google/auron/ec.h | 5 +---- src/mainboard/google/auron_paine/ec.h | 5 +---- src/mainboard/google/chell/ec.h | 5 +---- src/mainboard/google/cyan/ec.h | 5 +---- src/mainboard/google/enguarde/ec.h | 5 +---- src/mainboard/google/falco/ec.h | 5 +---- src/mainboard/google/glados/ec.h | 5 +---- src/mainboard/google/lars/ec.h | 5 +---- src/mainboard/google/ninja/ec.h | 5 +---- src/mainboard/google/peppy/ec.h | 5 +---- src/mainboard/google/rambi/ec.h | 5 +---- src/mainboard/google/reef/bootblock.c | 3 +-- src/mainboard/google/reef/ec.c | 3 +-- src/mainboard/google/reef/mainboard.c | 3 +-- src/mainboard/google/samus/ec.h | 5 +---- src/mainboard/intel/kunimitsu/ec.h | 5 +---- src/mainboard/intel/strago/ec.h | 5 +---- 18 files changed, 41 insertions(+), 62 deletions(-) create mode 100644 src/ec/ec.h (limited to 'src') 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 #include #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 #include #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 #include #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 #include /* 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 #include /* 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 #include #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 #include #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 #include #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 #include /* 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 #include #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 #include /* 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 #include +#include #include #include #include -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 #include +#include #include #include #include #include -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 #include #include +#include #include #include #include @@ -25,8 +26,6 @@ #include #include -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 #include #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 #include #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 #include /* 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 -- cgit v1.2.3