All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot]  framework for serial flash
@ 2009-11-11  6:34 ashish priyadarshi
  2009-11-11 21:32 ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: ashish priyadarshi @ 2009-11-11  6:34 UTC (permalink / raw)
  To: u-boot

Hello

We have a special "Serial flash controller" which was put into the standard
flash
framework of uboot (common/cmd_flash.c). Commands like 'cp', 'erase' could
be
used for operation over serial flash.

Now we have to use parallel flash (CFI), hence it is required to handle
"Serial flash controller" in another manner as both are exporting
'write_buff' leading
to a conflict.

Since we felt "Serial flash controller" resembles SPI flash framework, and
hence
decided to move it there. Problem is that this "Serial flash controller" is
also not
fitting in SPI framework because of its nature.

How to handle such situations, is there any other framework or we need to
introduce
our own commands? We are using "u-boot-2009.08".

Thanks
Ashish

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] framework for serial flash
  2009-11-11  6:34 [U-Boot] framework for serial flash ashish priyadarshi
@ 2009-11-11 21:32 ` Wolfgang Denk
  2009-11-12  4:46   ` ashish priyadarshi
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2009-11-11 21:32 UTC (permalink / raw)
  To: u-boot

Dear ashish priyadarshi,

In message <fb24d2790911102234x4d210e10mdd9d551541120dc0@mail.gmail.com> you wrote:
>
> We have a special "Serial flash controller" which was put into the standard
> flash
> framework of uboot (common/cmd_flash.c). Commands like 'cp', 'erase' could
> be
> used for operation over serial flash.

What do you mean by "Serial flash controller"? Some storage device
similar to NAND or SPI Flash? This would not fit, then.

> Since we felt "Serial flash controller" resembles SPI flash framework, and
> hence
> decided to move it there. Problem is that this "Serial flash controller" is
> also not
> fitting in SPI framework because of its nature.

So you already learned that your serial flash is not a type of memory,
but a storage device. You cannot use the memory interface as used for
NOR flash for it.

> How to handle such situations, is there any other framework or we need to
> introduce
> our own commands? We are using "u-boot-2009.08".

That's difficult to impossible to answer - you don't provide any
information what exact sort of device you have or why it would (not)
fit into the SPI flash code.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I've seen it. It's rubbish."          - Marvin the Paranoid Android

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] framework for serial flash
  2009-11-11 21:32 ` Wolfgang Denk
@ 2009-11-12  4:46   ` ashish priyadarshi
  0 siblings, 0 replies; 3+ messages in thread
From: ashish priyadarshi @ 2009-11-12  4:46 UTC (permalink / raw)
  To: u-boot

Hello Wolfgang

Thanks for your reply.

The device composes of a Serial NOR flash (STmicro M25P64) and Serial Memory

Controller Interface (SMI). All operations such as Read-ID, read-data,
write-data, and
erase can be controlled by SMI. Like for Read-ID, first command is written
into the TX
register of SMI and then 3 bytes of flash-ID can be read back from Rx
regsiter of SMI.

SMI differs from a normal SPI controller in this way that it manages a lot
of things
on its own. For example to  read FLASH id we need to tell SMI beforehand how
many
bytes it has to read in response to this command.
The SPI Flash interface however splits this in two seperate xfer calls where
command
is sent first and then response is read.
regards
Ashish

On Thu, Nov 12, 2009 at 3:02 AM, Wolfgang Denk <wd@denx.de> wrote:

> Dear ashish priyadarshi,
>
> In message <fb24d2790911102234x4d210e10mdd9d551541120dc0@mail.gmail.com>
> you wrote:
> >
> > We have a special "Serial flash controller" which was put into the
> standard
> > flash
> > framework of uboot (common/cmd_flash.c). Commands like 'cp', 'erase'
> could
> > be
> > used for operation over serial flash.
>
> What do you mean by "Serial flash controller"? Some storage device
> similar to NAND or SPI Flash? This would not fit, then.
>
> > Since we felt "Serial flash controller" resembles SPI flash framework,
> and
> > hence
> > decided to move it there. Problem is that this "Serial flash controller"
> is
> > also not
> > fitting in SPI framework because of its nature.
>
> So you already learned that your serial flash is not a type of memory,
> but a storage device. You cannot use the memory interface as used for
> NOR flash for it.
>
> > How to handle such situations, is there any other framework or we need to
> > introduce
> > our own commands? We are using "u-boot-2009.08".
>
> That's difficult to impossible to answer - you don't provide any
> information what exact sort of device you have or why it would (not)
> fit into the SPI flash code.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> "I've seen it. It's rubbish."          - Marvin the Paranoid Android
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-12  4:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-11  6:34 [U-Boot] framework for serial flash ashish priyadarshi
2009-11-11 21:32 ` Wolfgang Denk
2009-11-12  4:46   ` ashish priyadarshi

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.