summaryrefslogtreecommitdiff
path: root/include/flash.h
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2017-09-12 17:09:08 (GMT)
committerStefan Roese <sr@denx.de>2017-09-26 08:57:53 (GMT)
commit1ec0a37e1cf2add5680b8d7305922c8210c3e2ed (patch)
tree634a3ca0fe61b9dd7cd03f0a58d4c3b41f219a87 /include/flash.h
parent1f6049e2501b5c35c61435dbc05ba96743202674 (diff)
downloadu-boot-1ec0a37e1cf2add5680b8d7305922c8210c3e2ed.tar.xz
mtd: cfi: Zap cfi_flash_base in DM case
Embed the flash base into struct flash_info instead of having ad-hoc static array in the code. This does not only remove static variable, but also allows CFI-like controllers, ie. HyperFlash ones, to use most of the CFI flash code by populating the flash_info with matching base address. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include/flash.h')
-rw-r--r--include/flash.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/flash.h b/include/flash.h
index f53fe91..0eedb1e 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -47,6 +47,10 @@ typedef struct {
#ifdef CONFIG_MTD
struct mtd_info *mtd;
#endif
+#ifdef CONFIG_CFI_FLASH /* DM-specific parts */
+ struct udevice *dev;
+ phys_addr_t base;
+#endif
} flash_info_t;
extern flash_info_t flash_info[]; /* info for FLASH chips */