<p>Aamir Bohra has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/c/coreboot/+/30291">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mb/google/hatch: Clean up gpio definitions in hatch variant<br><br>This implementation cleans up gpio configuration functions<br>and limit definition to baseboard only for now, until variant<br>specfic overides are needed.<br><br>Change-Id: I563f6b97812b32d6e3d99e3df512dc112da78aea<br>Signed-off-by: Aamir Bohra <aamir.bohra@intel.com><br>---<br>M src/mainboard/google/hatch/ramstage.c<br>M src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h<br>D src/mainboard/google/hatch/variants/hatch/Makefile.inc<br>D src/mainboard/google/hatch/variants/hatch/gpio.c<br>4 files changed, 2 insertions(+), 63 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/30291/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/mainboard/google/hatch/ramstage.c b/src/mainboard/google/hatch/ramstage.c</span><br><span>index 1ac6a29..d139eff 100644</span><br><span>--- a/src/mainboard/google/hatch/ramstage.c</span><br><span>+++ b/src/mainboard/google/hatch/ramstage.c</span><br><span>@@ -24,7 +24,7 @@</span><br><span>  const struct pad_config *gpio_table;</span><br><span>         size_t num_gpios;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   gpio_table = variant_base_gpio_table(&num_gpios);</span><br><span style="color: hsl(120, 100%, 40%);">+ gpio_table = variant_gpio_table(&num_gpios);</span><br><span>     gpio_configure_pads(gpio_table, num_gpios);</span><br><span> }</span><br><span> </span><br><span>diff --git a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h</span><br><span>index 18f90488..90a52c0 100644</span><br><span>--- a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h</span><br><span>+++ b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h</span><br><span>@@ -22,10 +22,8 @@</span><br><span> </span><br><span> /* The next set of functions return the gpio table and fill in the number of</span><br><span>  * entries for each table. */</span><br><span style="color: hsl(0, 100%, 40%);">-const struct pad_config *variant_base_gpio_table(size_t *num);</span><br><span style="color: hsl(0, 100%, 40%);">-const struct pad_config *variant_override_gpio_table(size_t *num);</span><br><span style="color: hsl(120, 100%, 40%);">+const struct pad_config *variant_gpio_table(size_t *num);</span><br><span> const struct pad_config *variant_early_gpio_table(size_t *num);</span><br><span style="color: hsl(0, 100%, 40%);">-const struct pad_config *variant_sleep_gpio_table(size_t *num, int slp_typ);</span><br><span> </span><br><span> /* Return memory SKU for the board. */</span><br><span> size_t variant_memory_sku(void);</span><br><span>@@ -33,8 +31,4 @@</span><br><span> /* Return ChromeOS gpio table and fill in number of entries. */</span><br><span> const struct cros_gpio *variant_cros_gpios(size_t *num);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/* Modify devictree settings during ramstage. */</span><br><span style="color: hsl(0, 100%, 40%);">-struct device;</span><br><span style="color: hsl(0, 100%, 40%);">-void variant_update_devtree(struct device *dev);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> #endif /* BASEBOARD_VARIANTS_H */</span><br><span>diff --git a/src/mainboard/google/hatch/variants/hatch/Makefile.inc b/src/mainboard/google/hatch/variants/hatch/Makefile.inc</span><br><span>deleted file mode 100644</span><br><span>index d4d8537..0000000</span><br><span>--- a/src/mainboard/google/hatch/variants/hatch/Makefile.inc</span><br><span>+++ /dev/null</span><br><span>@@ -1,17 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-##</span><br><span style="color: hsl(0, 100%, 40%);">-## This file is part of the coreboot project.</span><br><span style="color: hsl(0, 100%, 40%);">-##</span><br><span style="color: hsl(0, 100%, 40%);">-## Copyright 2018 Google LLC</span><br><span style="color: hsl(0, 100%, 40%);">-##</span><br><span style="color: hsl(0, 100%, 40%);">-## This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">-## it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">-## the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(0, 100%, 40%);">-##</span><br><span style="color: hsl(0, 100%, 40%);">-## This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(0, 100%, 40%);">-## but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(0, 100%, 40%);">-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(0, 100%, 40%);">-## GNU General Public License for more details.</span><br><span style="color: hsl(0, 100%, 40%);">-##</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-bootblock-y += gpio.c</span><br><span style="color: hsl(0, 100%, 40%);">-ramstage-y += gpio.c</span><br><span>diff --git a/src/mainboard/google/hatch/variants/hatch/gpio.c b/src/mainboard/google/hatch/variants/hatch/gpio.c</span><br><span>deleted file mode 100644</span><br><span>index 24535f5..0000000</span><br><span>--- a/src/mainboard/google/hatch/variants/hatch/gpio.c</span><br><span>+++ /dev/null</span><br><span>@@ -1,38 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-/*</span><br><span style="color: hsl(0, 100%, 40%);">- * This file is part of the coreboot project.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Copyright 2018 Google LLC</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">- * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">- * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(0, 100%, 40%);">- * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(0, 100%, 40%);">- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the</span><br><span style="color: hsl(0, 100%, 40%);">- * GNU General Public License for more details.</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#include <baseboard/gpio.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <baseboard/variants.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <commonlib/helpers.h></span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/* Pad configuration in ramstage */</span><br><span style="color: hsl(0, 100%, 40%);">-static const struct pad_config gpio_table[] = {</span><br><span style="color: hsl(0, 100%, 40%);">-};</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/* Early pad configuration in bootblock */</span><br><span style="color: hsl(0, 100%, 40%);">-static const struct pad_config early_gpio_table[] = {</span><br><span style="color: hsl(0, 100%, 40%);">-};</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-const struct pad_config *variant_base_gpio_table(size_t *num)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-       *num = ARRAY_SIZE(gpio_table);</span><br><span style="color: hsl(0, 100%, 40%);">-  return gpio_table;</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-const struct pad_config *variant_early_gpio_table(size_t *num)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-      *num = ARRAY_SIZE(early_gpio_table);</span><br><span style="color: hsl(0, 100%, 40%);">-    return early_gpio_table;</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/c/coreboot/+/30291">change 30291</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/c/coreboot/+/30291"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I563f6b97812b32d6e3d99e3df512dc112da78aea </div>
<div style="display:none"> Gerrit-Change-Number: 30291 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Aamir Bohra <aamir.bohra@intel.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>