diff options
author | Piotr Ziecik <kosmo@semihalf.com> | 2008-11-17 15:57:58 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2008-11-24 11:05:25 +0100 |
commit | 91809ed51d8327a8dbbf29aa98a091154c282171 (patch) | |
tree | e57f9ab8c520575ffabf40626bb7249c0e4c4708 /include/flash.h | |
parent | 6ea808efdf9aa5d9067fbfac32acde8539129ed2 (diff) |
cfi-mtd: Add cfi-mtd driver.
Add cfi-mtd driver, which exports CFI flash to MTD layer.
This allows CFI flash devices to be used from MTD layer.
Building of the new driver is controlled by CONFIG_FLASH_CFI_MTD
option. Initialization is done by calling cfi_mtd_init() from
flash_init().
Signed-off-by: Piotr Ziecik <kosmo@semihalf.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include/flash.h')
-rw-r--r-- | include/flash.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/flash.h b/include/flash.h index 05fa57240be..6e2981c5aef 100644 --- a/include/flash.h +++ b/include/flash.h @@ -86,6 +86,9 @@ typedef unsigned long flash_sect_t; /* convert between bit value and numeric value */ #define CFI_FLASH_SHIFT_WIDTH 3 + +/* cfi-mtd device name */ +#define CFI_MTD_DEV_NAME "cfi-mtd" /* Prototypes */ extern unsigned long flash_init (void); @@ -103,6 +106,11 @@ extern int flash_write (char *, ulong, ulong); extern flash_info_t *addr2info (ulong); extern int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt); +/* drivers/mtd/cfi_mtd.c */ +#ifdef CONFIG_FLASH_CFI_MTD +extern int cfi_mtd_init(void); +#endif + /* board/?/flash.c */ #if defined(CONFIG_SYS_FLASH_PROTECTION) extern int flash_real_protect(flash_info_t *info, long sector, int prot); |