Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18266
-gerrit
commit c5ade8e87bbb42eff659ad594fcd24b3c3d140fd Author: Patrick Georgi pgeorgi@google.com Date: Mon Jan 30 17:53:34 2017 +0100
google/veyron*: mark GPIO array non-static
That status isn't needed and making it non-static helps gcc 4.9.2 (or any compiler that insists on "standard C" behaviour with global const initializers)
Change-Id: Ib1fbd5213d262e653f31564b106095b4a28292f6 Signed-off-by: Patrick Georgi pgeorgi@google.com --- src/mainboard/google/veyron/boardid.c | 4 ++-- src/mainboard/google/veyron_mickey/boardid.c | 4 ++-- src/mainboard/google/veyron_rialto/boardid.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mainboard/google/veyron/boardid.c b/src/mainboard/google/veyron/boardid.c index d0456d7..a610471 100644 --- a/src/mainboard/google/veyron/boardid.c +++ b/src/mainboard/google/veyron/boardid.c @@ -21,7 +21,7 @@ uint8_t board_id(void) { static int id = -1; - static gpio_t pins[] = {[3] = GPIO(2, A, 7), [2] = GPIO(2, A, 2), + gpio_t pins[] = {[3] = GPIO(2, A, 7), [2] = GPIO(2, A, 2), [1] = GPIO(2, A, 1), [0] = GPIO(2, A, 0)}; /* GPIO2_A0 is LSB */
if (id < 0) { @@ -35,7 +35,7 @@ uint8_t board_id(void) uint32_t ram_code(void) { uint32_t code; - static gpio_t pins[] = {[3] = GPIO(8, A, 3), [2] = GPIO(8, A, 2), + gpio_t pins[] = {[3] = GPIO(8, A, 3), [2] = GPIO(8, A, 2), [1] = GPIO(8, A, 1), [0] = GPIO(8, A, 0)}; /* GPIO8_A0 is LSB */
code = gpio_base2_value(pins, ARRAY_SIZE(pins)); diff --git a/src/mainboard/google/veyron_mickey/boardid.c b/src/mainboard/google/veyron_mickey/boardid.c index d0456d7..a610471 100644 --- a/src/mainboard/google/veyron_mickey/boardid.c +++ b/src/mainboard/google/veyron_mickey/boardid.c @@ -21,7 +21,7 @@ uint8_t board_id(void) { static int id = -1; - static gpio_t pins[] = {[3] = GPIO(2, A, 7), [2] = GPIO(2, A, 2), + gpio_t pins[] = {[3] = GPIO(2, A, 7), [2] = GPIO(2, A, 2), [1] = GPIO(2, A, 1), [0] = GPIO(2, A, 0)}; /* GPIO2_A0 is LSB */
if (id < 0) { @@ -35,7 +35,7 @@ uint8_t board_id(void) uint32_t ram_code(void) { uint32_t code; - static gpio_t pins[] = {[3] = GPIO(8, A, 3), [2] = GPIO(8, A, 2), + gpio_t pins[] = {[3] = GPIO(8, A, 3), [2] = GPIO(8, A, 2), [1] = GPIO(8, A, 1), [0] = GPIO(8, A, 0)}; /* GPIO8_A0 is LSB */
code = gpio_base2_value(pins, ARRAY_SIZE(pins)); diff --git a/src/mainboard/google/veyron_rialto/boardid.c b/src/mainboard/google/veyron_rialto/boardid.c index d0456d7..a610471 100644 --- a/src/mainboard/google/veyron_rialto/boardid.c +++ b/src/mainboard/google/veyron_rialto/boardid.c @@ -21,7 +21,7 @@ uint8_t board_id(void) { static int id = -1; - static gpio_t pins[] = {[3] = GPIO(2, A, 7), [2] = GPIO(2, A, 2), + gpio_t pins[] = {[3] = GPIO(2, A, 7), [2] = GPIO(2, A, 2), [1] = GPIO(2, A, 1), [0] = GPIO(2, A, 0)}; /* GPIO2_A0 is LSB */
if (id < 0) { @@ -35,7 +35,7 @@ uint8_t board_id(void) uint32_t ram_code(void) { uint32_t code; - static gpio_t pins[] = {[3] = GPIO(8, A, 3), [2] = GPIO(8, A, 2), + gpio_t pins[] = {[3] = GPIO(8, A, 3), [2] = GPIO(8, A, 2), [1] = GPIO(8, A, 1), [0] = GPIO(8, A, 0)}; /* GPIO8_A0 is LSB */
code = gpio_base2_value(pins, ARRAY_SIZE(pins));