summaryrefslogtreecommitdiff
path: root/src/mainboard/google/urara/boardid.c
diff options
context:
space:
mode:
authorIonela Voinescu <ionela.voinescu@imgtec.com>2015-03-09 15:31:38 +0000
committerPatrick Georgi <pgeorgi@google.com>2015-04-22 08:50:10 +0200
commit2fdc61af6eea14450054cb0135bb6ad3f6a14831 (patch)
tree9dbc282650196fff5230d2bc89b931fed5cbf3a1 /src/mainboard/google/urara/boardid.c
parent97ab4250e778d195eba8874f3e9bcbdc830f4dbc (diff)
downloadcoreboot-2fdc61af6eea14450054cb0135bb6ad3f6a14831.tar.xz
google/urara: use board ID information to set up hardware
The hardware initialization is now split in basic initialization (MIPS and system PLL, system clock, SPIM, UART), and initialization of other hardware blocks (USB, I2C, ETH). The second part uses board ID information to select setup that is board specific (currently only I2C interface is selected through board ID). BRANCH=none BUG=chrome-os-partner:37593 TEST=tested on bring up board for both Urara and Concerto; to simulate the use of Concerto (I2C3) DIP SW17 was set to 0. it works with default settings on Urara Change-Id: Ic5bbf28ab42545a4fb2aa6fd30592a02ecc15cb5 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: f2b3db2e7f9fa898214f974ca34ea427196d2e4e Original-Change-Id: Iac9a082ad84444af1d9d9785a2d0cc3205140d15 Original-Signed-off-by: Ionela Voinescu <ionela.voinescu@imgtec.com> Original-Reviewed-on: https://chromium-review.googlesource.com/257401 Original-Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Original-Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://review.coreboot.org/9888 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/google/urara/boardid.c')
-rw-r--r--src/mainboard/google/urara/boardid.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/mainboard/google/urara/boardid.c b/src/mainboard/google/urara/boardid.c
index 02cfa05ee0..a95bc148d0 100644
--- a/src/mainboard/google/urara/boardid.c
+++ b/src/mainboard/google/urara/boardid.c
@@ -34,13 +34,14 @@
const struct bid_map {
const char *board_name;
uint8_t board_id;
+ struct board_hw hardware;
} board_id_map[] = {
- {"urara", URARA_BOARD_ID_BUB},
- {"buranku", URARA_BOARD_ID_BURANKU},
- {"derwent", URARA_BOARD_ID_DERWENT},
- {"jaguar", URARA_BOARD_ID_JAGUAR},
- {"kennet", URARA_BOARD_ID_KENNET},
- {"space", URARA_BOARD_ID_SPACE},
+ {"urara", URARA_BOARD_ID_BUB, {0} },
+ {"buranku", URARA_BOARD_ID_BURANKU, {3} },
+ {"derwent", URARA_BOARD_ID_DERWENT, {3} },
+ {"jaguar", URARA_BOARD_ID_JAGUAR, {3} },
+ {"kennet", URARA_BOARD_ID_KENNET, {3} },
+ {"space", URARA_BOARD_ID_SPACE, {3} },
};
static int cached_board_id = -1;
@@ -91,6 +92,19 @@ static uint8_t retrieve_board_id(void)
return 0;
}
+const struct board_hw *board_get_hw(void)
+{
+ int i;
+ uint8_t bid = board_id();
+
+ for (i = 0; i < ARRAY_SIZE(board_id_map); i++) {
+ if (bid == board_id_map[i].board_id)
+ return &(board_id_map[i].hardware);
+ }
+
+ return 0;
+}
+
uint8_t board_id(void)
{
if (cached_board_id == -1)