From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zachary Landau Date: Wed, 23 Feb 2005 10:30:30 -0500 Subject: [U-Boot-Users] Multiple Flash Devices In-Reply-To: References: Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > > Is there a good method of setting up two flash devices at once? As > > far as I can tell, all the flash functions (like flash_print_info, for > > example) can only be defined for one type of flash at a time. > > You can use the addresses to differentiate which flash device are > accessed. Keep the same interfaces uboot has already had and just > develop your own functions to do the actual jobs. > > > The other option might be to create my own flash function wrappers > > that call the appropriate flash function based on, for example, the > > address passed into the function. > > That's what I did before on a EP8245 board. This way shields all the > differences. Shawn, In that case, did both flash devices use the same driver? My two flash devices use different drivers. So what I am currently doing is adding a prefix to the different flash driver functions (ie: change CFI's write_buff to cfi_write_buff) and then adding function pointers to each flash bank structure indicating which function to use. This seems to be a decent approach. The main problem is that the flash calls are a bit scattered, and also it will require all flash devices to be changed. But I'll continue with it unless someone has a better solution? -- Zachary P. Landau