In order to support multiple control boards make all operations follow
indirections in the device context.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
We're not dereferencing the cdb pointer, so make it void * in order to
support alternative controllers.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Boards implementing a/b partitioning even for fastboot boot might
sometimes expire the counter and fail the boot. By always setting the
active image to 'a' we're catching this case and flipping it back, and
in other cases the operation becomes a nop.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>