aboutsummaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.ibm.com>2018-05-08 15:41:27 -0500
committerStewart Smith <stewart@linux.ibm.com>2018-05-08 15:41:27 -0500
commit106e77504c53b54e552f6f3b25064ef47c256d0b (patch)
tree8991e015f1639bc7d82b41acdea48ab7921eb2f8 /platforms
parenta18249182fbeb5887b2a9149201b73501d58ef83 (diff)
downloadskiboot-106e77504c53b54e552f6f3b25064ef47c256d0b.zip
skiboot-106e77504c53b54e552f6f3b25064ef47c256d0b.tar.gz
skiboot-106e77504c53b54e552f6f3b25064ef47c256d0b.tar.bz2
p9dsu: timeout for variant detection, default to 2uess
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r--platforms/astbmc/p9dsu.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/platforms/astbmc/p9dsu.c b/platforms/astbmc/p9dsu.c
index 8daeb43..e4fef5e 100644
--- a/platforms/astbmc/p9dsu.c
+++ b/platforms/astbmc/p9dsu.c
@@ -24,6 +24,7 @@
#include <npu-regs.h>
#include <opal-internal.h>
#include <cpu.h>
+#include <timebase.h>
#include "astbmc.h"
@@ -633,6 +634,7 @@ static void p9dsu_init(void)
struct ipmi_msg *ipmi_msg;
u8 riser_id = 0;
const char *p9dsu_variant;
+ int timeout_ms = 2000;
astbmc_init();
/*
@@ -647,14 +649,11 @@ static void p9dsu_init(void)
&riser_id,
smc_riser_req, sizeof(smc_riser_req), 1);
ipmi_queue_msg(ipmi_msg);
- while(riser_id==0) {
- opal_run_pollers();
- cpu_relax();
+ while(riser_id==0 && timeout_ms > 0) {
+ time_wait(10);
+ timeout_ms -= 10;
}
switch (riser_id) {
- default:
- prlog(PR_INFO,"Defaulting to p9dsu1u\n");
- /* fallthrough */
case 0x9:
p9dsu_variant = "supermicro,p9dsu1u";
slot_table_init(p9dsu1u_phb_table);
@@ -663,6 +662,9 @@ static void p9dsu_init(void)
p9dsu_variant = "supermicro,p9dsu2u";
slot_table_init(p9dsu2u_phb_table);
break;
+ default:
+ prlog(PR_ERR,"Defaulting to p9dsuess\n");
+ /* fallthrough */
case 0x1D:
p9dsu_variant = "supermicro,p9dsuess";
slot_table_init(p9dsu2uess_phb_table);