From 42551478a787dec70d94df22f59c6466f566e07a Mon Sep 17 00:00:00 2001
From: Felix Singer <felixsinger@posteo.net>
Date: Fri, 4 Dec 2020 09:04:14 +0100
Subject: mb/clevo/kbl-u: Move mainboard/gpio.h to variant/gpio.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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: Ibcb6322067285984bad70761fce34cfcb6ed8e0f
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48297
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
 src/mainboard/clevo/kbl-u/bootblock.c                  | 4 ++--
 src/mainboard/clevo/kbl-u/include/mainboard/gpio.h     | 8 --------
 src/mainboard/clevo/kbl-u/include/variant/gpio.h       | 8 ++++++++
 src/mainboard/clevo/kbl-u/ramstage.c                   | 4 ++--
 src/mainboard/clevo/kbl-u/variants/n13xwu/gpio.c       | 4 ++--
 src/mainboard/clevo/kbl-u/variants/n13xwu/gpio_early.c | 4 ++--
 6 files changed, 16 insertions(+), 16 deletions(-)
 delete mode 100644 src/mainboard/clevo/kbl-u/include/mainboard/gpio.h
 create mode 100644 src/mainboard/clevo/kbl-u/include/variant/gpio.h

(limited to 'src')

diff --git a/src/mainboard/clevo/kbl-u/bootblock.c b/src/mainboard/clevo/kbl-u/bootblock.c
index 067c9ecab2..8f085bee98 100644
--- a/src/mainboard/clevo/kbl-u/bootblock.c
+++ b/src/mainboard/clevo/kbl-u/bootblock.c
@@ -1,9 +1,9 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
 #include <bootblock_common.h>
-#include <mainboard/gpio.h>
+#include <variant/gpio.h>
 
 void bootblock_mainboard_early_init(void)
 {
-	mainboard_configure_gpios();
+	variant_configure_gpios();
 }
diff --git a/src/mainboard/clevo/kbl-u/include/mainboard/gpio.h b/src/mainboard/clevo/kbl-u/include/mainboard/gpio.h
deleted file mode 100644
index ef2a21c418..0000000000
--- a/src/mainboard/clevo/kbl-u/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/clevo/kbl-u/include/variant/gpio.h b/src/mainboard/clevo/kbl-u/include/variant/gpio.h
new file mode 100644
index 0000000000..4258325cf9
--- /dev/null
+++ b/src/mainboard/clevo/kbl-u/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/clevo/kbl-u/ramstage.c b/src/mainboard/clevo/kbl-u/ramstage.c
index 9368021e7f..e34d5002bf 100644
--- a/src/mainboard/clevo/kbl-u/ramstage.c
+++ b/src/mainboard/clevo/kbl-u/ramstage.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
 #include <device/device.h>
-#include <mainboard/gpio.h>
+#include <variant/gpio.h>
 
 /*
  * TODO:
@@ -14,7 +14,7 @@
 
 static void init_mainboard(void *chip_info)
 {
-	mainboard_configure_gpios();
+	variant_configure_gpios();
 }
 
 struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/clevo/kbl-u/variants/n13xwu/gpio.c b/src/mainboard/clevo/kbl-u/variants/n13xwu/gpio.c
index e7aadcccfc..4b25993843 100644
--- a/src/mainboard/clevo/kbl-u/variants/n13xwu/gpio.c
+++ b/src/mainboard/clevo/kbl-u/variants/n13xwu/gpio.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <mainboard/gpio.h>
 #include <soc/gpio.h>
+#include <variant/gpio.h>
 
 static const struct pad_config gpio_table[] = {
 	// RCIN#
@@ -497,7 +497,7 @@ static const struct pad_config gpio_table[] = {
 	_PAD_CFG_STRUCT(GPP_G7,		0x44000702,	0x0)
 };
 
-void mainboard_configure_gpios(void)
+void variant_configure_gpios(void)
 {
 	gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
 }
diff --git a/src/mainboard/clevo/kbl-u/variants/n13xwu/gpio_early.c b/src/mainboard/clevo/kbl-u/variants/n13xwu/gpio_early.c
index 00246a42e5..46b9ff0bf0 100644
--- a/src/mainboard/clevo/kbl-u/variants/n13xwu/gpio_early.c
+++ b/src/mainboard/clevo/kbl-u/variants/n13xwu/gpio_early.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#include <mainboard/gpio.h>
 #include <soc/gpio.h>
+#include <variant/gpio.h>
 
 static const struct pad_config early_gpio_table[] = {
 	// UART2_RXD
@@ -11,7 +11,7 @@ static const struct pad_config early_gpio_table[] = {
 	_PAD_CFG_STRUCT(GPP_C21,	0x44000700,	0x0)
 };
 
-void mainboard_configure_gpios(void)
+void variant_configure_gpios(void)
 {
 	gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
 }
-- 
cgit v1.2.3