public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] cfi_flash: Add prototypes of overridable functions
@ 2013-06-06  7:54 Masahiro Yamada
  2013-06-06 10:02 ` Wolfgang Denk
  2013-07-25 14:50 ` Stefan Roese
  0 siblings, 2 replies; 6+ messages in thread
From: Masahiro Yamada @ 2013-06-06  7:54 UTC (permalink / raw)
  To: u-boot

This commit adds some prototypes into include/mtd/cfi_flash.h.
These functions are defined with a weak attribute in
drivers/mtd/cfi_flash.c.
This means they can be overrided by board-specific ones
if necessary.

When defining such functions under board/ directory or
somewhere, cfi_flash.h should be included.
This makes sure that board-specfic cfi functions
are defined in a correct prototype.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---
 include/mtd/cfi_flash.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/mtd/cfi_flash.h b/include/mtd/cfi_flash.h
index b644b91..f97cf66 100644
--- a/include/mtd/cfi_flash.h
+++ b/include/mtd/cfi_flash.h
@@ -184,5 +184,19 @@ extern int cfi_flash_num_flash_banks;
 
 void flash_write_cmd(flash_info_t * info, flash_sect_t sect,
 		     uint offset, u32 cmd);
+phys_addr_t cfi_flash_bank_addr(int i);
+unsigned long cfi_flash_bank_size(int i);
+void flash_cmd_reset(flash_info_t *info);
+
+#ifdef CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
+void flash_write8(u8 value, void *addr);
+void flash_write16(u16 value, void *addr);
+void flash_write32(u32 value, void *addr);
+void flash_write64(u64 value, void *addr);
+u8 flash_read8(void *addr);
+u16 flash_read16(void *addr);
+u32 flash_read32(void *addr);
+u64 flash_read64(void *addr);
+#endif
 
 #endif /* __CFI_FLASH_H__ */
-- 
1.8.1.2

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

end of thread, other threads:[~2013-07-30  8:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-06  7:54 [U-Boot] [PATCH] cfi_flash: Add prototypes of overridable functions Masahiro Yamada
2013-06-06 10:02 ` Wolfgang Denk
2013-06-06 11:02   ` Masahiro Yamada
2013-07-25 14:50 ` Stefan Roese
2013-07-30  5:36   ` Masahiro Yamada
2013-07-30  8:33     ` Stefan Roese

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