Skip to contentSkip to conversation

flash: Export flash_sector_size() function.

PATCH New Piotr Ziecik 3 participants 6 messages Nov 17, 2008 – Nov 24, 2008 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 flash: Export flash_sector_size() function.

Export flash_sector_size() function from drivers/mtd/cfi_flash.c.

---
 drivers/mtd/cfi_flash.c |    2 --
 include/flash.h         |    3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/mtd/cfi_flash.c +0 -2
index c40bf66..4202af4 100644
@@ -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];
include/flash.h +3 -0
index a6e91b5..8a00c2f 100644
@@ -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);
Signature · 1 line
1.5.6.1
#2 lore raw

PATCH 1/1 flash: Export flash_sector_size() function.

Wednesday 19 November 2008 14:51:01 Haavard Skinnemoen napisa?(a):

Quoted 3 lines
Quoted 1 line

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").

Signature · 2 lines
Regards,
Piotr Ziecik
#3 lore raw

PATCH 1/1 flash: Export flash_sector_size() function.

Quoted 8 lines · Piotr Zi?cik

Wednesday 19 November 2008 14:51:01 Haavard Skinnemoen napisa?(a):

Quoted 3 lines
Quoted 1 line

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

#4 lore raw

PATCH v2 1/1 flash: Export flash_sector_size() function.

Export flash_sector_size() function from drivers/mtd/cfi_flash.c, so that it can be used in the upcoming cfi-mtd driver.

---
V2: Added patch rationale in the description.

 drivers/mtd/cfi_flash.c |    2 --
 include/flash.h         |    3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/mtd/cfi_flash.c +0 -2
index c40bf66..4202af4 100644
@@ -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];
include/flash.h +3 -0
index a6e91b5..8a00c2f 100644
@@ -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);
Signature · 1 line
1.5.6.1
#5 lore raw

PATCH v2 1/1 flash: Export flash_sector_size() function.

Quoted 6 lines · Piotr Ziecik

Export flash_sector_size() function from drivers/mtd/cfi_flash.c, so that it can be used in the upcoming cfi-mtd driver.

---
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 at denx.de
=====================================================================