Michael Niewöhner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48299 )
Change subject: mb/siemens/chili: Move mainboard/gpio.h to variant/gpio.h ......................................................................
mb/siemens/chili: Move mainboard/gpio.h to variant/gpio.h
Move mainboard/gpio.h to variant/gpio.h and rename its methods to make clear that these methods are implemented on variant level.
Change-Id: Ib4e7ec948ca4d019ad82ebc5abe39fc408281cf4 Signed-off-by: Felix Singer felixsinger@posteo.net Reviewed-on: https://review.coreboot.org/c/coreboot/+/48299 Reviewed-by: Michael Niewöhner foss@mniewoehner.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- D src/mainboard/siemens/chili/include/mainboard/gpio.h A src/mainboard/siemens/chili/include/variant/gpio.h M src/mainboard/siemens/chili/romstage.c M src/mainboard/siemens/chili/variants/base/gpio.c M src/mainboard/siemens/chili/variants/chili/gpio.c 5 files changed, 14 insertions(+), 14 deletions(-)
Approvals: build bot (Jenkins): Verified Michael Niewöhner: Looks good to me, approved
diff --git a/src/mainboard/siemens/chili/include/mainboard/gpio.h b/src/mainboard/siemens/chili/include/mainboard/gpio.h deleted file mode 100644 index ef2a21c..0000000 --- a/src/mainboard/siemens/chili/include/mainboard/gpio.h +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef MAINBOARD_GPIO_H -#define MAINBOARD_GPIO_H - -void mainboard_configure_gpios(void); - -#endif diff --git a/src/mainboard/siemens/chili/include/variant/gpio.h b/src/mainboard/siemens/chili/include/variant/gpio.h new file mode 100644 index 0000000..4258325 --- /dev/null +++ b/src/mainboard/siemens/chili/include/variant/gpio.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef VARIANT_GPIO_H +#define VARIANT_GPIO_H + +void variant_configure_gpios(void); + +#endif diff --git a/src/mainboard/siemens/chili/romstage.c b/src/mainboard/siemens/chili/romstage.c index 7453fa5..06927b0 100644 --- a/src/mainboard/siemens/chili/romstage.c +++ b/src/mainboard/siemens/chili/romstage.c @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <mainboard/gpio.h> #include <option.h> #include <soc/cnl_memcfg_init.h> #include <soc/gpio.h> #include <soc/romstage.h> #include <variant.h> +#include <variant/gpio.h>
void mainboard_memory_init_params(FSPM_UPD *memupd) { @@ -31,7 +31,7 @@
variant_romstage_params(memupd);
- mainboard_configure_gpios(); + variant_configure_gpios(); }
__weak void variant_romstage_params(FSPM_UPD *const mupd) diff --git a/src/mainboard/siemens/chili/variants/base/gpio.c b/src/mainboard/siemens/chili/variants/base/gpio.c index 9d459cc..8264917 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 <soc/gpio.h> -#include <mainboard/gpio.h> +#include <variant/gpio.h>
static const struct pad_config gpio_table[] = { /* GPP_A14 GPIO */ PAD_NC(GPP_A14, NONE), @@ -122,7 +122,7 @@ /* GPP_J11 A4WP_PRESENT */ PAD_CFG_NF(GPP_J11, NONE, DEEP, NF1), };
-void mainboard_configure_gpios(void) +void variant_configure_gpios(void) { gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table)); } diff --git a/src/mainboard/siemens/chili/variants/chili/gpio.c b/src/mainboard/siemens/chili/variants/chili/gpio.c index a259547..285103b 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 <soc/gpio.h> -#include <mainboard/gpio.h> +#include <variant/gpio.h>
static const struct pad_config gpio_table[] = { /* GPP_A14 GPIO 0x0000002644000300 */ PAD_NC(GPP_A14, NONE), @@ -121,7 +121,7 @@ /* GPP_J11 A4WP_PRESENT 0x0000003944000700 */ PAD_CFG_NF(GPP_J11, NONE, DEEP, NF1), };
-void mainboard_configure_gpios(void) +void variant_configure_gpios(void) { gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table)); }