From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Williams Date: Fri, 05 Mar 2004 15:06:22 -0800 Subject: [U-Boot-Users] Re: A Shared flash.c In-Reply-To: <20040305214248.6AC5BC0655@atlas.denx.de> References: <20040305214248.6AC5BC0655@atlas.denx.de> Message-ID: <6922-64489@sneakemail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wd-at-denx.de |u-boot-users| wrote: > In message <26365-62604@sneakemail.com> you wrote: > >>Well gee, it seems like flash_print_info in particular should >>go into the cmd_flash.c file, *inside* the (CONFIG_COMMANDS & CFG_CMD_FLASH) >>section. The flinfo command is the only place it is used. There >>are a few other functions like that, but print_flash_info is the >>most glaring example. > > > Please have a look over the rim. There are other flash drivers which > are just different. OK, that's true about the flash.c file as a whole, but the print_flash_info functions are all board independent, as far as I can see. Just different levels of completeness. There are other similar functions that only peruse the flash_info structures and so are completely board independent, and I was merely thinking in terms of unifying some common code. Again, I see your point WRT flash.c as a whole, but wouldn't it be useful to for example make flash_print_info common? Granted that's a lot of board files implementing the same print_flash_info, so maybe surround a common version with CFG_FLASH_COMMON_PRINT and use that for the few that are staring me in the face. -- Steve Williams "The woods are lovely, dark and deep. steve at XXXXXXXXXX But I have promises to keep, http://www.XXXXXXXXXX and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep."