Wolfgang Denk wrote: [snip]
> But there is also a few other things to consider: keeping the output > terse and efficient; keeping the same look and feel acrross different > boards and platforms, etc. If you add such code to the CFI driver, > users might request that such code also gets added to all those flash > drivers where the CFI driver cannot be used, etc. > > Remember the KISS principle. OK, here is a simulation of what I will create tonight. I think this is both workable, very effective, and meets Wolfgang's constraints. Notes: * The mailer linewraps the " Done", in real life it all fits on an 80 column line (76 columns to be exact). * The "Writing to Flash... " and "Done" strings are not under the CFI flash write routine's domain. With the New Improved[tm] countup, it means that I don't have to modify cmd_mem.c and friends. That is a Good Thing[tm]. * I'm thinking I should simply suppress the countup if there are fewer than say 5 units of programming to do? * ACK on Jon's suggestion for a control #define, but I counterpropose CONFIG_FLASH_SHOW_PROGRESS ("FLASH" instead of "CFI") so that the custom flash people can use it too if they get ambitious. > ./dots 99 Writing to Flash... 0....1....2....3....4....5....6....7....8....9.... Done > ./dots 1 Writing to Flash... 0 Done > ./dots 20 Writing to Flash... 0....1....2....3.... Done > ./dots 16384 Writing to Flash... 0....1....2....3....4....5....6....7....8....9.... Done >> [1] Answer: 60% done, 40% remaining for all the examples. > > You're lucky. To me it seems always to end up with hitting the 90-90 > rule. :-P :-D > Best regards, > Wolfgang Denk Best regards, gvb ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users