David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14143
-gerrit
commit c499cad619bfdc7e0b9dc1bacef23b83f5132f38
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Fri Mar 18 20:23:05 2016 -0700
gpio: Add support for extended binary number system
This adds yet another number system. In it, binary representation is
extended to allow floating/high-Z values to count in the result. A
'Z' value at position N will yield a value of 0 at position N and a
value of 1 at position (1 << N << num_gpio).
For example:
000Z => 0b1_0000
100Z => 0b1_1000
The advantage is that the value is simple to compute and translate
to/from hex. The drawback is that the number space is not contiguous.
BRANCH=none
BUG=none
TEST=stubbed out and tested for a 3-wide raw value, see comments
in gerrit for the full table.
Change-Id: I121e0cac9fa84fcbb261d1d84dcb20cfd49e5518
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
---
src/include/gpio.h | 13 +++++++++++++
src/lib/gpio.c | 18 ++++++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/src/include/gpio.h b/src/include/gpio.h
index 4627e44..0acd5b0 100644
--- a/src/include/gpio.h
+++ b/src/include/gpio.h
@@ -42,6 +42,19 @@ int gpio_base2_value(gpio_t gpio[], int num_gpio);
/*
* Read the value presented by the set of GPIOs, when each pin is interpreted
+ * as a base-2 digit (LOW = 0, HIGH = 1). If a pin is in its Z/floating state
+ * the value becomes (1 << pin_num << num_gpio).
+ *
+ * Caveat: This scheme makes the number space discontinuous. The advantage is
+ * that it's simple to compute and translate to/from hex.
+ *
+ * gpio[]: pin positions to read. gpio[0] is less significant than gpio[1].
+ * num_gpio: number of pins to read.
+ */
+int gpio_base2_ext_value(gpio_t gpio[], int num_gpio);
+
+/*
+ * Read the value presented by the set of GPIOs, when each pin is interpreted
* as a base-3 digit (LOW = 0, HIGH = 1, Z/floating = 2).
* Example: X1 = Z, X2 = 1 -> gpio_base3_value({GPIO(X1), GPIO(X2)}) = 5
* BASE3() from <base3.h> can generate numbers to compare the result to.
diff --git a/src/lib/gpio.c b/src/lib/gpio.c
index 2e34595..78a383a 100644
--- a/src/lib/gpio.c
+++ b/src/lib/gpio.c
@@ -35,6 +35,24 @@ int gpio_base2_value(gpio_t gpio[], int num_gpio)
return result;
}
+int gpio_base2_ext_value(gpio_t gpio[], int num_gpio)
+{
+ int temp, index, result = 0;
+
+ for (index = num_gpio - 1; index >= 0; --index) {
+ temp = gpio_get(gpio[index]);
+ printk(BIOS_DEBUG, "%c ", temp == Z ? 'Z' : temp + 0x30);
+
+ if (temp == Z)
+ result += (1 << index << num_gpio);
+ else
+ result += temp * (1 << index);
+ }
+
+ printk(BIOS_DEBUG, "= 0x%x (extended binary number system)\n", result);
+ return result;
+}
+
int _gpio_base3_value(gpio_t gpio[], int num_gpio, int binary_first)
{
/*
the following patch was just integrated into master:
commit cc9963e3f2b6e7282f75b5fcbff24593a4e5e78f
Author: Martin Roth <martinroth(a)google.com>
Date: Wed Mar 16 18:36:35 2016 -0600
google/intel mainboards: Add missing board_info.txt files
The lint script didn't catch that these mainboard directories didn't
have board_info files.
Add all missing board_info.txt files
Change-Id: Ib1d61a3c04e91b22480527885faf60c22093d98a
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/14117
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
Tested-by: build bot (Jenkins)
See https://review.coreboot.org/14117 for details.
-gerrit
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14156
-gerrit
commit e597905e01d2da5dbb29a05877b7940ad1b1e028
Author: Martin Roth <martinroth(a)google.com>
Date: Tue Mar 22 13:05:42 2016 -0600
Makefile: Update jenkins-build-toolchain to run build tests
Add coreboot build tests after running the toolchain build. This
verifies that everything still builds with the new toolchain.
Change-Id: Ifa51db897925c0b77791c83bbcbfd75045c907b5
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/crossgcc/Makefile.inc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/crossgcc/Makefile.inc b/util/crossgcc/Makefile.inc
index dfa1ec8..5be4c10 100644
--- a/util/crossgcc/Makefile.inc
+++ b/util/crossgcc/Makefile.inc
@@ -71,3 +71,5 @@ endif # ifeq ($(COMPILER_OUT_OF_DATE),1)
jenkins-build-toolchain:
$(MAKE) crosstools clang \
BUILDGCC_OPTIONS='-y --nocolor'
+ rm -f .xcompile
+ $(MAKE) what-jenkins-does