summaryrefslogtreecommitdiff
path: root/src/mainboard/google/dedede/variants
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2020-01-06 22:02:01 -0700
committerFurquan Shaikh <furquan@google.com>2020-01-27 04:47:20 +0000
commit85c52c5d97070b2e07d34e3a6c60ef5609b8bf2d (patch)
treee44e7e2b383bfeb1e2807325f3a60a1a981f1b70 /src/mainboard/google/dedede/variants
parentda60958ae37f15b6bc6f976bdf32b26fab573ae0 (diff)
downloadcoreboot-85c52c5d97070b2e07d34e3a6c60ef5609b8bf2d.tar.xz
mb/google/dedede: Add GPIO stubs
Add stubbed out GPIO configuration and perform GPIO initialization during bootblock and ramstage. BUG=b:144768001 TEST=Build Test Change-Id: I1397b6a433e5046650f64f7eb9a84c51eb0c7441 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38278 Reviewed-by: Aamir Bohra <aamir.bohra@intel.com> Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/dedede/variants')
-rw-r--r--src/mainboard/google/dedede/variants/baseboard/Makefile.inc5
-rw-r--r--src/mainboard/google/dedede/variants/baseboard/gpio.c33
-rw-r--r--src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h6
-rw-r--r--src/mainboard/google/dedede/variants/dedede/include/variant/gpio.h14
4 files changed, 58 insertions, 0 deletions
diff --git a/src/mainboard/google/dedede/variants/baseboard/Makefile.inc b/src/mainboard/google/dedede/variants/baseboard/Makefile.inc
new file mode 100644
index 0000000000..7c092e44c2
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/baseboard/Makefile.inc
@@ -0,0 +1,5 @@
+bootblock-y += gpio.c
+
+ramstage-y += gpio.c
+
+smm-y += gpio.c
diff --git a/src/mainboard/google/dedede/variants/baseboard/gpio.c b/src/mainboard/google/dedede/variants/baseboard/gpio.c
new file mode 100644
index 0000000000..c94af6fb7f
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/baseboard/gpio.c
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2020 The coreboot project Authors.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include <baseboard/gpio.h>
+#include <baseboard/variants.h>
+#include <commonlib/helpers.h>
+
+/* Pad configuration in ramstage*/
+static const struct pad_config gpio_table[] = {
+ /* ToDo: Fill gpio configuration */
+};
+
+/* Early pad configuration in bootblock */
+static const struct pad_config early_gpio_table[] = {
+ /* ToDo: Fill early gpio configuration */
+};
+
+const struct pad_config *__weak variant_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(gpio_table);
+ return gpio_table;
+}
+
+const struct pad_config *__weak variant_early_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(early_gpio_table);
+ return early_gpio_table;
+}
diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
index b326ec0468..ebcd594a9b 100644
--- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
@@ -12,4 +12,10 @@
#include <soc/gpio.h>
#include <stdint.h>
+/* The next set of functions return the gpio table and fill in the number of
+ * entries for each table. */
+
+const struct pad_config *variant_gpio_table(size_t *num);
+const struct pad_config *variant_early_gpio_table(size_t *num);
+
#endif /*__BASEBOARD_VARIANTS_H__ */
diff --git a/src/mainboard/google/dedede/variants/dedede/include/variant/gpio.h b/src/mainboard/google/dedede/variants/dedede/include/variant/gpio.h
new file mode 100644
index 0000000000..bf23f6e457
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/dedede/include/variant/gpio.h
@@ -0,0 +1,14 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2020 The coreboot project Authors.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef MAINBOARD_GPIO_H
+#define MAINBOARD_GPIO_H
+
+#include <baseboard/gpio.h>
+
+#endif /* MAINBOARD_GPIO_H */