nand: Import, fix and clean up IPQ8064 NAND support from U-boot

This patch copies U-Boot's code and headers used to implement NAND support
on IPQ 806x. It then fixes and cleans up the IPQ8064 NAND support. It deletes
a significant amount of code from the original version and adds a
depthcharge-style interface.

BUG=chromium:403432
TEST=With the following patches, NAND initializes properly and reads can
correctly take place from erased NAND.
BRANCH=none

Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
Change-Id: I52d01d945700aedaadabdc3f923e06cd77811e59
Reviewed-on: https://chromium-review.googlesource.com/222311
Reviewed-by: Julius Werner <jwerner@chromium.org>
5 files changed