From e8774933d39fab2cb4eb443f69a583d1fa5bd238 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Tue, 24 Nov 2020 19:27:47 +0000 Subject: mb/siemens/chili: Introduce include folder for header files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use include folder for header files allowing proper includes. Change-Id: I80066fb925b918d040062397e633c5d499a50dbe Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/47973 Reviewed-by: Michael Niewöhner Tested-by: build bot (Jenkins) --- src/mainboard/siemens/chili/Makefile.inc | 2 +- src/mainboard/siemens/chili/ec.c | 3 +-- src/mainboard/siemens/chili/ec.h | 8 -------- src/mainboard/siemens/chili/include/mainboard/ec.h | 8 ++++++++ src/mainboard/siemens/chili/include/variant.h | 12 ++++++++++++ src/mainboard/siemens/chili/mainboard.c | 3 +-- src/mainboard/siemens/chili/romstage.c | 3 +-- src/mainboard/siemens/chili/variant.h | 12 ------------ src/mainboard/siemens/chili/variants/base/gpio.c | 2 +- src/mainboard/siemens/chili/variants/chili/gpio.c | 2 +- src/mainboard/siemens/chili/variants/chili/romstage.c | 3 +-- 11 files changed, 27 insertions(+), 31 deletions(-) delete mode 100644 src/mainboard/siemens/chili/ec.h create mode 100644 src/mainboard/siemens/chili/include/mainboard/ec.h create mode 100644 src/mainboard/siemens/chili/include/variant.h delete mode 100644 src/mainboard/siemens/chili/variant.h (limited to 'src/mainboard/siemens') diff --git a/src/mainboard/siemens/chili/Makefile.inc b/src/mainboard/siemens/chili/Makefile.inc index abeedf3a85..c57c0a50dc 100644 --- a/src/mainboard/siemens/chili/Makefile.inc +++ b/src/mainboard/siemens/chili/Makefile.inc @@ -1,6 +1,6 @@ ## SPDX-License-Identifier: GPL-2.0-only -CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR) +CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include romstage-y += romstage.c diff --git a/src/mainboard/siemens/chili/ec.c b/src/mainboard/siemens/chili/ec.c index bc0eb7d9ff..7d9b6f2495 100644 --- a/src/mainboard/siemens/chili/ec.c +++ b/src/mainboard/siemens/chili/ec.c @@ -4,10 +4,9 @@ #include #include #include +#include #include -#include "ec.h" - #define EC_STATUS 0x50 #define EC_RUNNING (1 << 1) #define EC_DEVICE_CONTROL_1 0x80 diff --git a/src/mainboard/siemens/chili/ec.h b/src/mainboard/siemens/chili/ec.h deleted file mode 100644 index 50d724ff38..0000000000 --- a/src/mainboard/siemens/chili/ec.h +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef _SIEMENS_CHILI_EC_H -#define _SIEMENS_CHILI_EC_H - -void ec_enable_devices(bool enable_usb); - -#endif /* _SIEMENS_CHILI_EC_H */ diff --git a/src/mainboard/siemens/chili/include/mainboard/ec.h b/src/mainboard/siemens/chili/include/mainboard/ec.h new file mode 100644 index 0000000000..50d724ff38 --- /dev/null +++ b/src/mainboard/siemens/chili/include/mainboard/ec.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _SIEMENS_CHILI_EC_H +#define _SIEMENS_CHILI_EC_H + +void ec_enable_devices(bool enable_usb); + +#endif /* _SIEMENS_CHILI_EC_H */ diff --git a/src/mainboard/siemens/chili/include/variant.h b/src/mainboard/siemens/chili/include/variant.h new file mode 100644 index 0000000000..2bbe7d7926 --- /dev/null +++ b/src/mainboard/siemens/chili/include/variant.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _VARIANT_H_ +#define _VARIANT_H_ + +#include + +void variant_romstage_params(FSPM_UPD *); + +const struct pad_config *variant_gpio_table(size_t *num); + +#endif /* _VARIANT_H_ */ diff --git a/src/mainboard/siemens/chili/mainboard.c b/src/mainboard/siemens/chili/mainboard.c index 91395eac07..c1d1a1d941 100644 --- a/src/mainboard/siemens/chili/mainboard.c +++ b/src/mainboard/siemens/chili/mainboard.c @@ -1,8 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include - -#include "ec.h" +#include static void mainboard_dev_init(struct device *dev) { diff --git a/src/mainboard/siemens/chili/romstage.c b/src/mainboard/siemens/chili/romstage.c index c1ec7e4982..a981f50a7b 100644 --- a/src/mainboard/siemens/chili/romstage.c +++ b/src/mainboard/siemens/chili/romstage.c @@ -4,8 +4,7 @@ #include #include #include - -#include "variant.h" +#include static void mainboard_init(void) { diff --git a/src/mainboard/siemens/chili/variant.h b/src/mainboard/siemens/chili/variant.h deleted file mode 100644 index 2bbe7d7926..0000000000 --- a/src/mainboard/siemens/chili/variant.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef _VARIANT_H_ -#define _VARIANT_H_ - -#include - -void variant_romstage_params(FSPM_UPD *); - -const struct pad_config *variant_gpio_table(size_t *num); - -#endif /* _VARIANT_H_ */ diff --git a/src/mainboard/siemens/chili/variants/base/gpio.c b/src/mainboard/siemens/chili/variants/base/gpio.c index 65ea037a3a..61ec27dfa6 100644 --- a/src/mainboard/siemens/chili/variants/base/gpio.c +++ b/src/mainboard/siemens/chili/variants/base/gpio.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include -#include "variant.h" +#include static const struct pad_config gpio_table[] = { /* GPP_A14 GPIO */ PAD_NC(GPP_A14, NONE), diff --git a/src/mainboard/siemens/chili/variants/chili/gpio.c b/src/mainboard/siemens/chili/variants/chili/gpio.c index 4b18e79e29..d7e5ab02b2 100644 --- a/src/mainboard/siemens/chili/variants/chili/gpio.c +++ b/src/mainboard/siemens/chili/variants/chili/gpio.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include -#include "variant.h" +#include static const struct pad_config gpio_table[] = { /* GPP_A14 GPIO 0x0000002644000300 */ PAD_NC(GPP_A14, NONE), diff --git a/src/mainboard/siemens/chili/variants/chili/romstage.c b/src/mainboard/siemens/chili/variants/chili/romstage.c index ebffc8d39d..3a838240ef 100644 --- a/src/mainboard/siemens/chili/variants/chili/romstage.c +++ b/src/mainboard/siemens/chili/variants/chili/romstage.c @@ -3,8 +3,7 @@ #include #include #include - -#include "../../variant.h" +#include void variant_romstage_params(FSPM_UPD *const mupd) { -- cgit v1.2.3