public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] cfi: make flash_get_info() non static
@ 2009-02-10  8:53 Heiko Schocher
  2009-02-11 16:04 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Heiko Schocher @ 2009-02-10  8:53 UTC (permalink / raw)
  To: u-boot

If on your board is more than one flash, you must know
the size of every single flash, for example, for updating
the DTS before booting Linux. So make this function
flash_get_info() extern, and you can have all info
about your flashes.

Signed-off-by: Heiko Schocher <hs@denx.de>
---
 drivers/mtd/cfi_flash.c |    2 +-
 include/flash.h         |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 84ff7e8..16e1429 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -273,7 +273,7 @@ u64 flash_read64(void *addr)__attribute__((weak, alias("__flash_read64")));
 /*-----------------------------------------------------------------------
  */
 #if defined(CONFIG_ENV_IS_IN_FLASH) || defined(CONFIG_ENV_ADDR_REDUND) || (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE)
-static flash_info_t *flash_get_info(ulong base)
+flash_info_t *flash_get_info(ulong base)
 {
 	int i;
 	flash_info_t * info = 0;
diff --git a/include/flash.h b/include/flash.h
index 6e2981c..7f4b466 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -124,6 +124,9 @@ extern int jedec_flash_match(flash_info_t *info, ulong base);
 #define CFI_CMDSET_AMD_LEGACY		0xFFF0
 #endif

+#if defined(CONFIG_SYS_FLASH_CFI)
+extern flash_info_t *flash_get_info(ulong base);
+#endif

 /*-----------------------------------------------------------------------
  * return codes from flash_write():
-- 
1.6.0.6

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-11 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-10  8:53 [U-Boot] cfi: make flash_get_info() non static Heiko Schocher
2009-02-11 16:04 ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox