diff options
author | Julius Werner <jwerner@chromium.org> | 2017-12-05 13:39:10 -0800 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2017-12-07 01:18:25 +0000 |
commit | e2f17f782f6a9236259f2c25ac30d35dc24d45bb (patch) | |
tree | 6c788bd8c2543c94abffa298952d974b38c2d0b2 /src/mainboard/google | |
parent | ec477346bfe8f73aac225e9a8c2c5e6438bba593 (diff) |
boardid: Minor clean up and standardization
Merge the different coreboot table strapping ID structures into one
because they're really just all the same, and I want to add more. Make
the signature of the board_id() function return a uint32_t because
that's also what goes in the coreboot table. Add a printk to the generic
code handling strapping IDs in ramstage so that not every individual
mainboard implementation needs its own print. (In turn, remove one such
print from fsp1_1 code because it's in the way of my next patch.)
Change-Id: Ib9563edf07b623a586a4dc168fe357564c5e68b5
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/22741
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/foster/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/gale/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/gru/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/nyan/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/nyan_big/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/nyan_blaze/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/oak/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/purin/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/smaug/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/storm/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/urara/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/veyron/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/veyron_mickey/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/veyron_rialto/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/zoombini/boardid.c | 2 |
15 files changed, 15 insertions, 15 deletions
diff --git a/src/mainboard/google/foster/boardid.c b/src/mainboard/google/foster/boardid.c index 7e99e2a845..ff586958df 100644 --- a/src/mainboard/google/foster/boardid.c +++ b/src/mainboard/google/foster/boardid.c @@ -18,7 +18,7 @@ #include <console/console.h> #include <gpio.h> -uint8_t board_id(void) +uint32_t board_id(void) { return 0; } diff --git a/src/mainboard/google/gale/boardid.c b/src/mainboard/google/gale/boardid.c index c8d42a9fda..96fc936bf3 100644 --- a/src/mainboard/google/gale/boardid.c +++ b/src/mainboard/google/gale/boardid.c @@ -37,7 +37,7 @@ static uint8_t get_board_id(void) return bid; } -uint8_t board_id(void) +uint32_t board_id(void) { if (board_id_value < 0) board_id_value = get_board_id(); diff --git a/src/mainboard/google/gru/boardid.c b/src/mainboard/google/gru/boardid.c index 683ac39fd6..8158124c7f 100644 --- a/src/mainboard/google/gru/boardid.c +++ b/src/mainboard/google/gru/boardid.c @@ -66,7 +66,7 @@ static uint32_t get_index(uint32_t channel, int *cached_id) die("Read impossible value ( > 1023) from 10-bit ADC!"); } -uint8_t board_id(void) +uint32_t board_id(void) { return get_index(1, &cached_board_id); } diff --git a/src/mainboard/google/nyan/boardid.c b/src/mainboard/google/nyan/boardid.c index e833d90d2a..57b75da24d 100644 --- a/src/mainboard/google/nyan/boardid.c +++ b/src/mainboard/google/nyan/boardid.c @@ -17,7 +17,7 @@ #include <console/console.h> #include <gpio.h> -uint8_t board_id(void) +uint32_t board_id(void) { static int id = -1; diff --git a/src/mainboard/google/nyan_big/boardid.c b/src/mainboard/google/nyan_big/boardid.c index ac361e28ec..2a2911c9c5 100644 --- a/src/mainboard/google/nyan_big/boardid.c +++ b/src/mainboard/google/nyan_big/boardid.c @@ -18,7 +18,7 @@ #include <gpio.h> #include <stdlib.h> -uint8_t board_id(void) +uint32_t board_id(void) { static int id = -1; gpio_t gpio[] = {[3] = GPIO(X4), [2] = GPIO(X1), /* X4 is MSB */ diff --git a/src/mainboard/google/nyan_blaze/boardid.c b/src/mainboard/google/nyan_blaze/boardid.c index ac361e28ec..2a2911c9c5 100644 --- a/src/mainboard/google/nyan_blaze/boardid.c +++ b/src/mainboard/google/nyan_blaze/boardid.c @@ -18,7 +18,7 @@ #include <gpio.h> #include <stdlib.h> -uint8_t board_id(void) +uint32_t board_id(void) { static int id = -1; gpio_t gpio[] = {[3] = GPIO(X4), [2] = GPIO(X1), /* X4 is MSB */ diff --git a/src/mainboard/google/oak/boardid.c b/src/mainboard/google/oak/boardid.c index 1136f464f2..91e2df3d88 100644 --- a/src/mainboard/google/oak/boardid.c +++ b/src/mainboard/google/oak/boardid.c @@ -34,7 +34,7 @@ static uint8_t get_board_id(void) return bid; } -uint8_t board_id(void) +uint32_t board_id(void) { if (board_id_value < 0) board_id_value = get_board_id(); diff --git a/src/mainboard/google/purin/boardid.c b/src/mainboard/google/purin/boardid.c index f54d6af9df..901d837e38 100644 --- a/src/mainboard/google/purin/boardid.c +++ b/src/mainboard/google/purin/boardid.c @@ -15,7 +15,7 @@ #include <boardid.h> -uint8_t board_id(void) +uint32_t board_id(void) { return -1; } diff --git a/src/mainboard/google/smaug/boardid.c b/src/mainboard/google/smaug/boardid.c index 265e75a4c3..208a045443 100644 --- a/src/mainboard/google/smaug/boardid.c +++ b/src/mainboard/google/smaug/boardid.c @@ -20,7 +20,7 @@ #include "gpio.h" -uint8_t board_id(void) +uint32_t board_id(void) { static int id = -1; diff --git a/src/mainboard/google/storm/boardid.c b/src/mainboard/google/storm/boardid.c index 295550fe2b..87f6d2a796 100644 --- a/src/mainboard/google/storm/boardid.c +++ b/src/mainboard/google/storm/boardid.c @@ -48,7 +48,7 @@ static uint8_t get_board_id(void) return bid; } -uint8_t board_id(void) +uint32_t board_id(void) { if (board_id_value < 0) board_id_value = get_board_id(); diff --git a/src/mainboard/google/urara/boardid.c b/src/mainboard/google/urara/boardid.c index 5923d3437e..9a6b64eb78 100644 --- a/src/mainboard/google/urara/boardid.c +++ b/src/mainboard/google/urara/boardid.c @@ -89,7 +89,7 @@ const struct board_hw *board_get_hw(void) return 0; } -uint8_t board_id(void) +uint32_t board_id(void) { if (cached_board_id == -1) cached_board_id = retrieve_board_id(); diff --git a/src/mainboard/google/veyron/boardid.c b/src/mainboard/google/veyron/boardid.c index 8bd1d7665b..604b399676 100644 --- a/src/mainboard/google/veyron/boardid.c +++ b/src/mainboard/google/veyron/boardid.c @@ -18,7 +18,7 @@ #include <gpio.h> #include <stdlib.h> -uint8_t board_id(void) +uint32_t board_id(void) { static int id = -1; gpio_t pins[] = {[3] = GPIO(2, A, 7), [2] = GPIO(2, A, 2), diff --git a/src/mainboard/google/veyron_mickey/boardid.c b/src/mainboard/google/veyron_mickey/boardid.c index 47e946e635..3833dbedfc 100644 --- a/src/mainboard/google/veyron_mickey/boardid.c +++ b/src/mainboard/google/veyron_mickey/boardid.c @@ -18,7 +18,7 @@ #include <gpio.h> #include <stdlib.h> -uint8_t board_id(void) +uint32_t board_id(void) { static int id = -1; gpio_t pins[] = {[3] = GPIO(2, A, 7), [2] = GPIO(2, A, 2), diff --git a/src/mainboard/google/veyron_rialto/boardid.c b/src/mainboard/google/veyron_rialto/boardid.c index 47e946e635..3833dbedfc 100644 --- a/src/mainboard/google/veyron_rialto/boardid.c +++ b/src/mainboard/google/veyron_rialto/boardid.c @@ -18,7 +18,7 @@ #include <gpio.h> #include <stdlib.h> -uint8_t board_id(void) +uint32_t board_id(void) { static int id = -1; gpio_t pins[] = {[3] = GPIO(2, A, 7), [2] = GPIO(2, A, 2), diff --git a/src/mainboard/google/zoombini/boardid.c b/src/mainboard/google/zoombini/boardid.c index bd9afdee27..4b05c52190 100644 --- a/src/mainboard/google/zoombini/boardid.c +++ b/src/mainboard/google/zoombini/boardid.c @@ -17,7 +17,7 @@ #include <boardid.h> #include <stddef.h> -uint8_t board_id(void) +uint32_t board_id(void) { MAYBE_STATIC int id = -1; |