mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
1f6049e250
commit
1ec0a37e1c
2 changed files with 9 additions and 5 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue