diff options
author | Alistair Popple <alistair@popple.id.au> | 2016-04-08 14:45:01 +1000 |
---|---|---|
committer | Alistair Popple <alistair@popple.id.au> | 2016-04-08 14:50:17 +1000 |
commit | 5879afc52971c5785792867dcd85dfc771fad274 (patch) | |
tree | bddecf18ab1e4814e792a902fec0fa5162635ccc /libpdbg | |
parent | 8af274e57c509807634228c8089ad4001b639925 (diff) | |
download | pdbg-5879afc52971c5785792867dcd85dfc771fad274.tar.gz pdbg-5879afc52971c5785792867dcd85dfc771fad274.zip |
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 <alistair@popple.id.au>
Diffstat (limited to 'libpdbg')
-rw-r--r-- | libpdbg/bmcfsi.c | 14 |
1 files changed, 11 insertions, 3 deletions
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 } |