libqiprog: Shorten names of members in curr_addr_range

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Rename curr_addr_range qiprog_device member to addr

The long name made this member difficult to use, as it required several
lines of code even for simple calculations. Shorten it to make it sane.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Add separate read and write pointers to dev->addr

As agreed with Peter, read and write operations should not be
interdependent, and thus they will use distinct pointers. These pointers
should automatically be reset to addr.start after exhausting the range.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Remove set_address() from the API (FTBFS)

set_address() is an artifact of the USB protocol, and after discussing it
with Peter, we agreed to remove it from the API. set_address() will
continue to be part of the usb driver, albeit hidden from the rest of the
world.

set_address() is also removed from the core, but remains as an optional
component of the private driver struct.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Refactor writen/readn to write/read (FTBFS)

As part of eliminating set_address() from the API, the address where to
read or write is now given as an argument to read()/write(), similar to
read/write[8/16/32].

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_master: Mark all functions as static (FTBFS)

The newly introduced read() and write() may conflict with system functions
or functions from other libraries. Mark all functions as static to prevent
any future name collisions.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_master: Fix read() to automatically set address range (FTBFS)

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_master: Fix write() to automatically set address range (FTBFS)

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
qiprog: Update to new API changes (fixes FTBFS)

Drop the use of set_address().
Drop the alignment test. It no longer makes sense that set_address has
been removed.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_dev: Adjust device handlers to use new API

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