
In message 41E590B4.6080700@orkun.us you wrote:
I'll jump in. Initially, each board had its own flash.c. cfi_flash.c came later and some board maintainers switched to it and others did not update their implementation for some reason. If your board can be
One of the reasons is code size and efficiency. For example:
-> MAKEALL OXC Configuring for OXC board... text data bss dec hex filename 126100 8040 35988 170128 29890 u-boot -> ppc_8xx-size board/oxc/flash.o text data bss dec hex filename 2256 84 0 2340 924 board/oxc/flash.o -> MAKEALL uc100 Configuring for uc100 board... text data bss dec hex filename 164164 10260 218452 392876 5feac u-boot -> ppc_8xx-size drivers/cfi_flash.o text data bss dec hex filename 6040 116 0 6156 180c drivers/cfi_flash.o
As you can see, the CFI flash driver is nearly 3 times as big as a customized flash driver.
In some cases there is ample space and this doesn't matter, in other cases things are different.
supported by cfi_flash.c and works well, it is probably not a good idea to develop a custom flash driver.
I disagree if you give this as general advice. You have to know the requirements of the project, and understand what you're doing. Only then you can give intelligent advice.
Best regards,
Wolfgang Denk