From 1ec0a37e1cf2add5680b8d7305922c8210c3e2ed Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 12 Sep 2017 19:09:08 +0200 Subject: 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 Signed-off-by: Stefan Roese --- include/flash.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/flash.h') diff --git a/include/flash.h b/include/flash.h index f53fe913496..0eedb1efa89 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 */ -- cgit v1.2.3