chromeos: Make vbnv_flash driver safe for CAR usage

This modifies the vbnv_flash driver to make it safe for use
in cache-as-ram by handling the global variables safely.

To make this cleaner all of the variables were moved into
one structure and referenced from there.

TEST=build and boot on chell using following patches to
test backup and restore of vbnv_cmos into flash

Change-Id: I3a17fa51cfd754455502ac2e5f181dae35967f2a
Signed-off-by: Patrick Georgi <>
Original-Commit-Id: 48876561fa4fb61e1ec8f92596c5610d97135201
Original-Change-Id: Id9fda8467edcc55e5ed760ddab197ab97d1f3d25
Original-Signed-off-by: Duncan Laurie <>
Original-Reviewed-by: Aaron Durbin <>
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <>
1 file changed