summaryrefslogtreecommitdiff
path: root/src/soc/intel/denverton_ns/chip.c
diff options
context:
space:
mode:
authorJulien Viard de Galbert <jviarddegalbert@online.net>2017-11-06 13:19:58 +0100
committerPatrick Georgi <pgeorgi@google.com>2017-11-07 12:32:53 +0000
commitf528195bdf141e84d3121411d2cbe32f5938dd72 (patch)
treecdf9d04eaa51ebae051ca825b8cfdd61ea62c4d9 /src/soc/intel/denverton_ns/chip.c
parent6a8118405821815017d780d953260bc48eb90e6d (diff)
downloadcoreboot-f528195bdf141e84d3121411d2cbe32f5938dd72.tar.xz
soc/intel/denverton_ns: re-factor HSIO configuration
The main goal is to allow configuring the HSIO lines from the mainboard code. Also share the code for both romstage and ramstage. Remove explicit dependency on the harcuvar mainboard. Change-Id: Iec65472207309eae878d14eef5bc644b80fdbb1d Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net> Reviewed-on: https://review.coreboot.org/22309 Reviewed-by: FEI WANG <wangfei.jimei@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/denverton_ns/chip.c')
-rw-r--r--src/soc/intel/denverton_ns/chip.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/soc/intel/denverton_ns/chip.c b/src/soc/intel/denverton_ns/chip.c
index 9547bec275..a43504cb29 100644
--- a/src/soc/intel/denverton_ns/chip.c
+++ b/src/soc/intel/denverton_ns/chip.c
@@ -2,6 +2,7 @@
* This file is part of the coreboot project.
*
* Copyright (C) 2015 - 2017 Intel Corp.
+ * Copyright (C) 2017 Online SAS.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,8 +32,6 @@
#include <soc/ramstage.h>
#include <soc/fiamux.h>
#include <spi-generic.h>
-#include <hsio.h>
-#include <harcuvar_boardid.h>
static void pci_domain_set_resources(device_t dev)
{
@@ -74,7 +73,6 @@ static void soc_silicon_init_params(FSPS_UPD *silupd)
{
size_t num;
uint16_t supported_hsio_lanes;
- uint8_t boardid = board_id();
BL_HSIO_INFORMATION *hsio_config;
BL_FIA_MUX_CONFIG_HOB *fiamux_hob_data = get_fiamux_hob_data();
@@ -82,16 +80,7 @@ static void soc_silicon_init_params(FSPS_UPD *silupd)
supported_hsio_lanes =
(uint16_t)fiamux_hob_data->FiaMuxConfig.SkuNumLanesAllowed;
- switch (boardid) {
- case BoardIdHarcuvar:
- num = ARRAY_SIZE(harcuvar_hsio_config);
- hsio_config = (BL_HSIO_INFORMATION *)harcuvar_hsio_config;
- break;
- default:
- num = 0;
- hsio_config = NULL;
- break;
- }
+ num = mainboard_get_hsio_config(&hsio_config);
if (get_fiamux_hsio_info(supported_hsio_lanes, num, &hsio_config))
die("HSIO Configuration is invalid, please correct it!");