특정 board(ex: smdk2410 / aesop2440)등의 board specific flash code(flash_init /flash_print_info /flash_erase /write_buff )
들은 제가 알기로는 "/board/board명/flash.c"에 있는 것으로 알고 있습니다.
그런데, /drivers/cfi_flash.c와 /tools/updater/flash_hw.c 에도 flash관련 code들이 있네요...
구체적인 함수명으로 찾아 보면, 아래의 <검색결과>와 같습니다.
/board/board명/flash.c에 있는 flash관련 함수와
/drivers/cfi_flash.c와 /tools/updater/flash_hw.c에 있는 flash관련 함수의
차이점(사용 용도등...)은 무엇인지요 ?
========================<검색결과>==========================================
---- flash_init Matches (6 in 6 files) ----
Cfi_flash.c (drivers):unsigned long flash_init (void)
Flash.c (boardsmdk2410):ulong flash_init(void)
Flash.h (include):extern unsigned long flash_init (void);
Flash_hw.c (toolsupdater):unsigned long flash_init (void)
---- flash_print_info Matches (8 in 6 files) ----
Cfi_flash.c (drivers):void flash_print_info (flash_info_t * info)
Flash.c (boardsmdk2410):void flash_print_info (flash_info_t *info)
Flash.h (include):extern void flash_print_info (flash_info_t *);
Flash_hw.c (toolsupdater):void flash_print_info (flash_info_t *info)
---- flash_erase Matches (12 in 6 files) ----
Cfi_flash.c (drivers):int flash_erase (flash_info_t * info, int s_first, int s_last)
Flash.c (boardsmdk2410):int flash_erase (flash_info_t *info, int s_first, int s_last)
Flash.h (include):extern int flash_erase (flash_info_t *, int, int);
Flash_hw.c (toolsupdater):int flash_erase (flash_info_t *info, int s_first, int s_last)
---- write_buff Matches (6 in 6 files) ----
Cfi_flash.c (drivers):int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
Flash.c (boardsmdk2410):int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
Flash.h (include):extern int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt);
Flash_hw.c (toolsupdater):int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
---- flash_real_protect Matches (15 in 6 files) ----
Cfi_flash.c (drivers):int flash_real_protect (flash_info_t * info, long sector, int prot)
Flash.h (include):extern int flash_real_protect(flash_info_t *info, long sector, int prot);
===================================================================================
2440 보드는 보통 NOR이랑 NAND가 둘다 붙는데, 두 플래시 코드가 들립니당.