aboutsummaryrefslogtreecommitdiff
path: root/hw/occ.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-08-29 06:03:00 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-08-29 06:03:00 +1000
commit308423515ab9a7213fee7f6992eb9f675caef128 (patch)
tree5cd62624c128f3fa5a2ae316f38b1c969c2fcff3 /hw/occ.c
parentc34c4ef8c660e3e439365c8f5c06143ff00bc6bc (diff)
downloadskiboot-308423515ab9a7213fee7f6992eb9f675caef128.zip
skiboot-308423515ab9a7213fee7f6992eb9f675caef128.tar.gz
skiboot-308423515ab9a7213fee7f6992eb9f675caef128.tar.bz2
occ: Make timeout platform dependent
Keep it 0 for open-power platforms where OCC is going to be preloaded, also avoids a annoying 1mn delay on early openpower and bml when there is no OCC firmware to wait for. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hw/occ.c')
-rw-r--r--hw/occ.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/occ.c b/hw/occ.c
index 62a62a8..17fca93 100644
--- a/hw/occ.c
+++ b/hw/occ.c
@@ -72,6 +72,10 @@ static bool wait_for_all_occ_init(void)
struct occ_pstate_table *occ_data;
int tries;
uint64_t start_time, end_time;
+ uint32_t timeout = 0;
+
+ if (platform.occ_timeout)
+ timeout = platform.occ_timeout();
start_time = mftb();
for_each_chip(chip) {
@@ -90,7 +94,7 @@ static bool wait_for_all_occ_init(void)
* homer_base+size before passing memory to host services.
* This ensures occ_data->valid == 0 before OCC load
*/
- tries = 600; /* 60 secs */
+ tries = timeout * 10;
while((occ_data->valid != 1) && tries--) {
time_wait_ms(100);
}