usb: gadget: Allow PID and serial_num update on DT-targets

DIAG passes PID and serial number information to bootloader
which is used by bootloader during enumeration in DLOAD mode.
This is required to allow phone to enumerate in DLOAD using the
same COM port as used by DIAG before phone entered DLOAD mode.

For this purpose, on non DT-targets, driver uses function pointer
passed via platform data. But on DT-targets allow android driver
to directly update PID and serial number at the shared memory's
address specified via DT node. Since, this shared memory may not
support unaligned accesses, hence, write DLOAD struct using 32 bit
accesses only.

Change-Id: Ie26cfb88735bea62a20634120c3a766fbf10d950
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
5 files changed