[coreboot-gerrit] Change in ...coreboot[master]: mb/google/hatch: Clean up gpio definitions in hatch variant

Aamir Bohra (Code Review) gerrit at coreboot.org
Tue Dec 18 12:34:32 CET 2018


Aamir Bohra has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30291


Change subject: mb/google/hatch: Clean up gpio definitions in hatch variant
......................................................................

mb/google/hatch: Clean up gpio definitions in hatch variant

This implementation cleans up gpio configuration functions
and limit definition to baseboard only for now, until variant
specfic overides are needed.

Change-Id: I563f6b97812b32d6e3d99e3df512dc112da78aea
Signed-off-by: Aamir Bohra <aamir.bohra at intel.com>
---
M src/mainboard/google/hatch/ramstage.c
M src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h
D src/mainboard/google/hatch/variants/hatch/Makefile.inc
D src/mainboard/google/hatch/variants/hatch/gpio.c
4 files changed, 2 insertions(+), 63 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/30291/1

diff --git a/src/mainboard/google/hatch/ramstage.c b/src/mainboard/google/hatch/ramstage.c
index 1ac6a29..d139eff 100644
--- a/src/mainboard/google/hatch/ramstage.c
+++ b/src/mainboard/google/hatch/ramstage.c
@@ -24,7 +24,7 @@
 	const struct pad_config *gpio_table;
 	size_t num_gpios;
 
-	gpio_table = variant_base_gpio_table(&num_gpios);
+	gpio_table = variant_gpio_table(&num_gpios);
 	gpio_configure_pads(gpio_table, num_gpios);
 }
 
diff --git a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h
index 18f90488..90a52c0 100644
--- a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h
@@ -22,10 +22,8 @@
 
 /* The next set of functions return the gpio table and fill in the number of
  * entries for each table. */
-const struct pad_config *variant_base_gpio_table(size_t *num);
-const struct pad_config *variant_override_gpio_table(size_t *num);
+const struct pad_config *variant_gpio_table(size_t *num);
 const struct pad_config *variant_early_gpio_table(size_t *num);
-const struct pad_config *variant_sleep_gpio_table(size_t *num, int slp_typ);
 
 /* Return memory SKU for the board. */
 size_t variant_memory_sku(void);
@@ -33,8 +31,4 @@
 /* Return ChromeOS gpio table and fill in number of entries. */
 const struct cros_gpio *variant_cros_gpios(size_t *num);
 
-/* Modify devictree settings during ramstage. */
-struct device;
-void variant_update_devtree(struct device *dev);
-
 #endif /* BASEBOARD_VARIANTS_H */
diff --git a/src/mainboard/google/hatch/variants/hatch/Makefile.inc b/src/mainboard/google/hatch/variants/hatch/Makefile.inc
deleted file mode 100644
index d4d8537..0000000
--- a/src/mainboard/google/hatch/variants/hatch/Makefile.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-##
-## This file is part of the coreboot project.
-##
-## Copyright 2018 Google LLC
-##
-## 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.
-##
-
-bootblock-y += gpio.c
-ramstage-y += gpio.c
diff --git a/src/mainboard/google/hatch/variants/hatch/gpio.c b/src/mainboard/google/hatch/variants/hatch/gpio.c
deleted file mode 100644
index 24535f5..0000000
--- a/src/mainboard/google/hatch/variants/hatch/gpio.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2018 Google LLC
- *
- * 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.
- */
-
-#include <baseboard/gpio.h>
-#include <baseboard/variants.h>
-#include <commonlib/helpers.h>
-
-/* Pad configuration in ramstage */
-static const struct pad_config gpio_table[] = {
-};
-
-/* Early pad configuration in bootblock */
-static const struct pad_config early_gpio_table[] = {
-};
-
-const struct pad_config *variant_base_gpio_table(size_t *num)
-{
-	*num = ARRAY_SIZE(gpio_table);
-	return gpio_table;
-}
-
-const struct pad_config *variant_early_gpio_table(size_t *num)
-{
-	*num = ARRAY_SIZE(early_gpio_table);
-	return early_gpio_table;
-}

-- 
To view, visit https://review.coreboot.org/c/coreboot/+/30291
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I563f6b97812b32d6e3d99e3df512dc112da78aea
Gerrit-Change-Number: 30291
Gerrit-PatchSet: 1
Gerrit-Owner: Aamir Bohra <aamir.bohra at intel.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181218/fcf895f9/attachment-0001.html>


More information about the coreboot-gerrit mailing list