msm: pil: Add start address querying API

Almost every PIL driver needs to parse the elf header to
determine what the entry point is so they can configure hardware.
Instead of forcing every driver to copy the same code, parse the
entry point in the core PIL code and expose an API to get the
address via pil_get_start_addr().

For safety, add a check to make sure the start address lies
within the range of the segments that we load unless a 'quirk' is
filled out indicating we should skip the check.

In addition, make the init_image callback optional to reduce code
even further because most of the init_image callbacks are empty
after this change.

Change-Id: Ib721eefc41278bcf3e0d8faba642cc427e7643ec
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
19 files changed