From 5879afc52971c5785792867dcd85dfc771fad274 Mon Sep 17 00:00:00 2001 From: Alistair Popple Date: Fri, 8 Apr 2016 14:45:01 +1000 Subject: libpdbg/bmcfsi.c: Fix up cranking of the SBE The self boot engine (SBE) requires clocking when first powering on the system. The tool attempted to do this but it failed to correctly boot a system. This seemed to be due to sending the FSI break sequence afterwards. Instead move the FSI break sequence to the initialisation so that this tool can be used to boot the system. Signed-off-by: Alistair Popple --- libpdbg/bmcfsi.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'libpdbg') diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c index cdc3c0a..4d19b10 100644 --- a/libpdbg/bmcfsi.c +++ b/libpdbg/bmcfsi.c @@ -518,9 +518,17 @@ struct scom_backend *fsi_init(void) void fsi_destroy(struct scom_backend *backend) { - /* Clean up in case we busted the bus */ - fsi_break(); + set_direction_out(FSI_CLK); + set_direction_out(FSI_DAT); + write_gpio(FSI_DAT_EN, 1); - write_gpio(FSI_ENABLE, 1); + /* Crank things - this is needed to use this tool for kicking off system boot */ + write_gpio(FSI_CLK, 1); + write_gpio(FSI_DAT, 1); /* Data standby state */ + clock_cycle(FSI_CLK, 5000); + write_gpio(FSI_DAT_EN, 0); + + write_gpio(FSI_CLK, 0); + write_gpio(FSI_ENABLE, 0); write_gpio(CRONUS_SEL, 0); //Set Cronus control to FSP2 } -- cgit v1.2.1