firmware/lib/ec_sync_all: Refactor the EC SW Sync flow

Perform all the operations regarding EC AUX FW update once the EC update
is applied and EC has jumped to the updated image. This way the
information regarding the devices that require EC AUX FW update can be
probed and obtained from EC consistently.

BUG=b:128820536,b:119046668
BRANCH=None
TEST=Ensure that the device boots to ChromeOS. Ensure that the Aux FW
update is handled after EC update is applied and jumped to the updated
EC image.

Casta:
sync_one_ec: jumping to EC-RW
send_packet: CrosEC result code 12
EC returned from reboot after 53061us
ps8751.0: vendor 0x1da0 product 0x8751 device 0x0001 fw_rev 0x39
ps8751.1: vendor 0x1da0 product 0x8751 device 0x0001 fw_rev 0x39

Bobba:
sync_one_ec: jumping to EC-RW
send_packet: CrosEC result code 12
EC returned from reboot after 52271us
ps8751.1: vendor 0x1da0 product 0x8751 device 0x0001 fw_rev 0x39

Ampton:
sync_one_ec: jumping to EC-RW
EC returned from reboot after 43019us
vb2_developer_ui: Entering
vboot_draw_screen: screen=0x101 locale=0

Change-Id: I28956543dfe1e059e15212dceada8bc517c0e7fc
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1592472
Commit-Ready: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1672054
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
1 file changed