Do you need to call flash_init in both romstage and bootblock?
And could you also mention in the commit message how you tested it.
TEST=Loaded a 20MB image on HiFive unleashed

Thx review. Yes, it needs to be initialized multiple times, because romstage re-initializes the clock, so you need to reconfigure the spi frequency. The test is to write coreboot to the board and reboot.

View Change

To view, visit change 30466. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8cd803369da5526eff90400c15b91bbf6b477c69
Gerrit-Change-Number: 30466
Gerrit-PatchSet: 13
Gerrit-Owner: Xiang Wang <wxjstz@126.com>
Gerrit-Reviewer: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Philipp Hug <philipp@hug.cx>
Gerrit-Reviewer: Shawn C <citypw@gmail.com>
Gerrit-Reviewer: Xiang Wang <wxjstz@126.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Reviewer: ron minnich <rminnich@gmail.com>
Gerrit-Comment-Date: Sat, 26 Jan 2019 17:06:53 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment