linux_spi: properly convert pointers to kernel's u64.

For arm64 with 32-bit userspace, pointers such as 0xff96ebf8 were
incorrectly getting converted to u64_t 0xffffffffff96ebf8 in the
spi_ioc_transfer struct which was causing ioctl()s to be rejected by
the kernel. With this patch we first cast to uintptr_t (to avoid
warnings on architectures where char * are not 64b wide) and then to
uint64_t which is always big enough and does not produce warnings.

This patch is taken from ChromiumOS'
Change-Id: I5a15b4ca5d9657c3cb1ddccd42eafd91c852dd26

Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>

git-svn-id: svn://flashrom.org/flashrom/trunk@1836 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
ichspi: fix missing set_addr on erases and possible crossings of 256 B boundaries.

Apparently the erase function did never set any address before issuing the
erase commands. How could this ever work?
Also, according to PCH documentation crossing 256 byte boundaries is invalid
and may cause wraparound due to the flash chip's pages. Check for this on
reads as well as writes.

Thanks to Vladimir 'φ-coder/phcoder' Serbinenko for noticing these issues
and providing the initial patch.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>

git-svn-id: svn://flashrom.org/flashrom/trunk@1837 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1