aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/lpc.h2
-rw-r--r--include/platform.h9
2 files changed, 10 insertions, 1 deletions
diff --git a/include/lpc.h b/include/lpc.h
index 47d1037..6463c3d 100644
--- a/include/lpc.h
+++ b/include/lpc.h
@@ -46,7 +46,7 @@ static inline int64_t lpc_fw_read32(uint32_t *val, uint32_t addr)
static inline int64_t lpc_fw_write32(uint32_t val, uint32_t addr)
{
- return lpc_write(OPAL_LPC_FW, addr, cpu_to_be64(val), 4);
+ return lpc_write(OPAL_LPC_FW, addr, val, 4);
}
diff --git a/include/platform.h b/include/platform.h
index 689a80b..4a9d758 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -107,6 +107,15 @@ struct platform {
int (*nvram_start_read)(void *dst, uint32_t src,
uint32_t len);
int (*nvram_write)(uint32_t dst, void *src, uint32_t len);
+
+ /*
+ * OCC timeout. This return how long we should wait for the OCC
+ * before timing out. This lets us use a high value on larger FSP
+ * machines and cut it off completely on BML boots and OpenPower
+ * machines without pre-existing OCC firmware. Returns a value in
+ * seconds.
+ */
+ uint32_t (*occ_timeout)(void);
};
extern struct platform __platforms_start;