libqiprog: Define a majority of the qiprog API

Define most functions in the QiProg API. This presents a minimal API for
performing chip IO, although it does not yet handle advanced functions
such as write and erase. Those functions remain undefined for the time
being.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Implement redirection wrappers for defined function

For the QiProg functions which are defined, implement the thin redirection
wrapper (dev->drv->function()).

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Declare structs as __attribute__ ((packed))

Otherwise, some structs will be padded and not have the right size.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Implement qiprog_read_chip_id in the USB host driver

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Implement read/write[8/16/32] in the USB host driver

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usd_dev: Do not return pointers to stack variables

When handling QIPROG_GET_CAPABILITIES, the returned data was on our stack.
This worked fine because further calls just happened to not need that stack
space, but this is wrong. Use a static control buffer for returning data.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_dev: Hook read_id and set_bus to USB control requests

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_dev: Hook write/read[8/16/32] to USB control requests

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
qiprog: Test read_chip_id and read/write[8/16/32]

Call each of those operations on the first QiProg device. This is done
solely for the purpose of testing the VultureProg firmware.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>