[U-Boot-Users] flash.c for various boards

Dear Wolfgang
There is a flash.c in every board directory in the sourcetree.But some are almost the same.
I think we should not do it with this style. But I feel the RTC is a clear style. We should write the different flash.c for various flash chips but not for various boards. Do you think so??
A clear source tree directory can make users understand the code quickly.
Thanks a lot.
goldares

In message 20040624024122.9097A21AFF9@ws5-6.us4.outblaze.com you wrote:
There is a flash.c in every board directory in the sourcetree.But some are almost the same.
Yes.
I think we should not do it with this style. But I feel the RTC is a clear style. We should write the different flash.c for various flash chips but not for various boards. Do you think so??
No, I don't.
A clear source tree directory can make users understand the code quickly.
Yes.
There are two reasons for the code being as it is now:
(1) historical: the first implementation of PPCBoot (or maybe even 8xxrom as it was called by then) used a very simple flash driver, just to get things going. As usual, this layout survived.
(2) Code size: In general, the flash drivers in the board directories allow for optimized code that supports exactly the flash configurations that may be present on a specific board, and nothing else.
There is a generic CFI flash driver (drivers/cfi_flash.c) if you want to use it.
This has been discussed many times before. Search the archive. My replay has always been that I will be happy to accept patches to get rid of all the board specific driver code if: - the new code works on all existing (or at least the actively maintained) boards in all existing configuration - the new code does not increase the memory footprint
I am aware that these requirements are very hard to conform to.
Best regards,
Wolfgang Denk
participants (2)
-
gold ares
-
Wolfgang Denk