All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zachary Landau <kapheine@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Multiple Flash Devices
Date: Wed, 23 Feb 2005 10:30:30 -0500	[thread overview]
Message-ID: <a04f56da050223073036aa7551@mail.gmail.com> (raw)
In-Reply-To: <c3d0340b0502230017be3ee50@mail.gmail.com>

> > 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 <kapheine@gmail.com>

  reply	other threads:[~2005-02-23 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-21 17:34 [U-Boot-Users] Multiple Flash Devices Zachary Landau
2005-02-23  8:17 ` Shawn Jin
2005-02-23 15:30   ` Zachary Landau [this message]
2005-02-24 22:33     ` Wolfgang Denk
2005-02-24 22:31 ` Wolfgang Denk
2005-02-25  2:20   ` Zachary Landau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a04f56da050223073036aa7551@mail.gmail.com \
    --to=kapheine@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.