[U-Boot] [PATCH] flash: Export flash_sector_size() function.

Export flash_sector_size() function from drivers/mtd/cfi_flash.c.
Signed-off-by: Piotr Ziecik kosmo@semihalf.com --- drivers/mtd/cfi_flash.c | 2 -- include/flash.h | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index c40bf66..4202af4 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -175,8 +175,6 @@ flash_info_t flash_info[CFI_MAX_FLASH_BANKS]; /* FLASH chips info */ #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_8BIT #endif
-typedef unsigned long flash_sect_t; - /* CFI standard query structure */ struct cfi_qry { u8 qry[3]; diff --git a/include/flash.h b/include/flash.h index a6e91b5..8a00c2f 100644 --- a/include/flash.h +++ b/include/flash.h @@ -58,6 +58,8 @@ typedef struct { #endif } flash_info_t;
+typedef unsigned long flash_sect_t; + /* * Values for the width of the port */ @@ -92,6 +94,7 @@ extern int flash_erase (flash_info_t *, int, int); extern int flash_sect_erase (ulong addr_first, ulong addr_last); extern int flash_sect_protect (int flag, ulong addr_first, ulong addr_last); extern int flash_sect_roundb (ulong *addr); +extern unsigned long flash_sector_size(flash_info_t *info, flash_sect_t sect);
/* common/flash.c */ extern void flash_protect (int flag, ulong from, ulong to, flash_info_t *info);

Piotr Ziecik kosmo@semihalf.com wrote:
Export flash_sector_size() function from drivers/mtd/cfi_flash.c.
Signed-off-by: Piotr Ziecik kosmo@semihalf.com
Why?
Haavard

Wednesday 19 November 2008 14:51:01 Haavard Skinnemoen napisał(a):
Export flash_sector_size() function from drivers/mtd/cfi_flash.c.
Why?
This function is used by cfi-mtd driver, which I have posted yesterday with other patches around UBI and MTD (see "[U-Boot] Export CFI Flash to the MTD and support it in UBI").

Piotr Zięcik kosmo@semihalf.com wrote:
Wednesday 19 November 2008 14:51:01 Haavard Skinnemoen napisał(a):
Export flash_sector_size() function from drivers/mtd/cfi_flash.c.
Why?
This function is used by cfi-mtd driver, which I have posted yesterday with other patches around UBI and MTD (see "[U-Boot] Export CFI Flash to the MTD and support it in UBI").
Ok, can you please add that information to the patch description?
Haavard

Export flash_sector_size() function from drivers/mtd/cfi_flash.c, so that it can be used in the upcoming cfi-mtd driver.
Signed-off-by: Piotr Ziecik kosmo@semihalf.com --- V2: Added patch rationale in the description.
drivers/mtd/cfi_flash.c | 2 -- include/flash.h | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index c40bf66..4202af4 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -175,8 +175,6 @@ flash_info_t flash_info[CFI_MAX_FLASH_BANKS]; /* FLASH chips info */ #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_8BIT #endif
-typedef unsigned long flash_sect_t; - /* CFI standard query structure */ struct cfi_qry { u8 qry[3]; diff --git a/include/flash.h b/include/flash.h index a6e91b5..8a00c2f 100644 --- a/include/flash.h +++ b/include/flash.h @@ -58,6 +58,8 @@ typedef struct { #endif } flash_info_t;
+typedef unsigned long flash_sect_t; + /* * Values for the width of the port */ @@ -92,6 +94,7 @@ extern int flash_erase (flash_info_t *, int, int); extern int flash_sect_erase (ulong addr_first, ulong addr_last); extern int flash_sect_protect (int flag, ulong addr_first, ulong addr_last); extern int flash_sect_roundb (ulong *addr); +extern unsigned long flash_sector_size(flash_info_t *info, flash_sect_t sect);
/* common/flash.c */ extern void flash_protect (int flag, ulong from, ulong to, flash_info_t *info);

On Thursday 20 November 2008, Piotr Ziecik wrote:
Export flash_sector_size() function from drivers/mtd/cfi_flash.c, so that it can be used in the upcoming cfi-mtd driver.
Signed-off-by: Piotr Ziecik kosmo@semihalf.com
V2: Added patch rationale in the description.
Applied to u-boot-cfi-flash. Thanks.
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================
participants (4)
-
Haavard Skinnemoen
-
Piotr Ziecik
-
Piotr Zięcik
-
Stefan Roese