public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Porting a new flash driver
@ 2008-03-28 15:17 Markus Schaber
  2008-04-01 11:14 ` Markus Schaber
  0 siblings, 1 reply; 11+ messages in thread
From: Markus Schaber @ 2008-03-28 15:17 UTC (permalink / raw)
  To: eCos general discussion list

Hi,

I have a NAND flash controller hardware that seems not yet supported by
eCos, and example drivers (e. G. for openOCD) and documentation.

The aim is to use a small part of the flash via JFFS2 (and maybe RomFS).

Now I did not find much about flash drivers, block device drivers in
general, and the file systems in the eCos PDF documentation, the only
drivers discussed there seem to be network and serial. Is my assumption
correct that the eCos source is the best documentation here?

And concerning RomFS, it seems that it will only work with memory
mapped flash, but not with our NAND flash which can only be addressed
via the controller (PIO and DMA are possible). Is that correct?

Thanks a lot,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Porting a new flash driver
  2008-03-28 15:17 [ECOS] Porting a new flash driver Markus Schaber
@ 2008-04-01 11:14 ` Markus Schaber
  2008-04-01 11:18   ` Chris Zimman
  0 siblings, 1 reply; 11+ messages in thread
From: Markus Schaber @ 2008-04-01 11:14 UTC (permalink / raw)
  To: ecos-discuss

Hi, all,

Markus Schaber <schabi@logix-tt.com> wrote:

> I have a NAND flash controller hardware that seems not yet supported by
> eCos, and example drivers (e. G. for openOCD) and documentation.
[snip]

As there was no answer to my questions:

Is this list the correct one, or should I send to ecos-devel instead?


Regards,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* RE: [ECOS] Porting a new flash driver
  2008-04-01 11:14 ` Markus Schaber
@ 2008-04-01 11:18   ` Chris Zimman
  2008-04-01 11:23     ` Markus Schaber
  0 siblings, 1 reply; 11+ messages in thread
From: Chris Zimman @ 2008-04-01 11:18 UTC (permalink / raw)
  To: Markus Schaber, ecos-discuss

> > I have a NAND flash controller hardware that seems not yet supported
> by
> > eCos, and example drivers (e. G. for openOCD) and documentation.
> [snip]
> 
> As there was no answer to my questions:
> 
> Is this list the correct one, or should I send to ecos-devel instead?

Hi Markus,

I don't think there is any general infrastructure to support NAND flash at
the moment.  I say that without knowing what you intend on doing with it
though.  I guess if you wanted to make it appear as a block device, you could
just implement it that way.

What is the end goal of the implementation?

--Chris

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Porting a new flash driver
  2008-04-01 11:18   ` Chris Zimman
@ 2008-04-01 11:23     ` Markus Schaber
  2008-04-01 11:30       ` Andrew Lunn
  0 siblings, 1 reply; 11+ messages in thread
From: Markus Schaber @ 2008-04-01 11:23 UTC (permalink / raw)
  To: ecos-discuss

Hi, Chris,

"Chris Zimman" <czimman@bloomberg.com> wrote:

> I don't think there is any general infrastructure to support NAND flash at
> the moment.  I say that without knowing what you intend on doing with it
> though.  I guess if you wanted to make it appear as a block device, you could
> just implement it that way.
> 
> What is the end goal of the implementation?

We want to have jffs2 running on a part (some megabytes / one FIS
partition) of the NAND flash, to store configuration and theming data.

I'm currently reading the sources, and it seems ugly, but doable.

Ugly, because it looks like the flash driver interface consists of some
static functions, so it will be impossible to support different flashes
concurrently. Luckily, we'll only need a single flash unit at the
moment.

Thanks for your answer,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Porting a new flash driver
  2008-04-01 11:23     ` Markus Schaber
@ 2008-04-01 11:30       ` Andrew Lunn
  2008-04-01 15:39         ` Markus Schaber
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2008-04-01 11:30 UTC (permalink / raw)
  To: Markus Schaber; +Cc: ecos-discuss

> Ugly, because it looks like the flash driver interface consists of some
> static functions, so it will be impossible to support different flashes
> concurrently. Luckily, we'll only need a single flash unit at the
> moment.

Take a look at the flash_v2 branch. We hope that in the next few
months to merge this into the trunk.

       Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Porting a new flash driver
  2008-04-01 11:30       ` Andrew Lunn
@ 2008-04-01 15:39         ` Markus Schaber
  2008-04-01 15:55           ` Gary Thomas
  0 siblings, 1 reply; 11+ messages in thread
From: Markus Schaber @ 2008-04-01 15:39 UTC (permalink / raw)
  To: ecos-discuss

Hi, Andrew,

Andrew Lunn <andrew@lunn.ch> wrote:

> > Ugly, because it looks like the flash driver interface consists of some
> > static functions, so it will be impossible to support different flashes
> > concurrently. Luckily, we'll only need a single flash unit at the
> > moment.
> 
> Take a look at the flash_v2 branch. We hope that in the next few
> months to merge this into the trunk.

That sounds interesting, I'll have a look at it. But I'm afraid that,
for now, I'll go the short path.



Regards,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Porting a new flash driver
  2008-04-01 15:39         ` Markus Schaber
@ 2008-04-01 15:55           ` Gary Thomas
  2008-04-01 16:16             ` Markus Schaber
  2008-04-03 11:24             ` Markus Schaber
  0 siblings, 2 replies; 11+ messages in thread
From: Gary Thomas @ 2008-04-01 15:55 UTC (permalink / raw)
  To: Markus Schaber; +Cc: ecos-discuss

Markus Schaber wrote:
> Hi, Andrew,
> 
> Andrew Lunn <andrew@lunn.ch> wrote:
> 
>>> Ugly, because it looks like the flash driver interface consists of some
>>> static functions, so it will be impossible to support different flashes
>>> concurrently. Luckily, we'll only need a single flash unit at the
>>> moment.
>> Take a look at the flash_v2 branch. We hope that in the next few
>> months to merge this into the trunk.
> 
> That sounds interesting, I'll have a look at it. But I'm afraid that,
> for now, I'll go the short path.

Albeit more complex, using the flash_v2 branch is probably your
only choice if you want to run JFFS2 on NAND.  There's quite a lot
of work involved in making this functional (hence why it's not already
in the tree!).  In particular, the JFFS2 code will need to be updated
and there are many NAND specific functions which it expects to be
available which the mainline (flash_v1) does not support.

Alternatively, you could go with the current (flash_v1) setup which
does support NAND devices (somewhat - it's not 100% pretty).  RedBoot
and FIS can be run in this mode, just not JFFS2.

Look at the TAMS MOAB port for an example.

What NAND device(s) are you thinking about using?
What's the target architecture?

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Porting a new flash driver
  2008-04-01 15:55           ` Gary Thomas
@ 2008-04-01 16:16             ` Markus Schaber
  2008-04-03 11:24             ` Markus Schaber
  1 sibling, 0 replies; 11+ messages in thread
From: Markus Schaber @ 2008-04-01 16:16 UTC (permalink / raw)
  To: ecos-discuss

Hi, Gary,

Gary Thomas <gary@mlbassoc.com> wrote:

> Alternatively, you could go with the current (flash_v1) setup which
> does support NAND devices (somewhat - it's not 100% pretty).  RedBoot
> and FIS can be run in this mode, just not JFFS2.

Ah, that's sad. But as there's no other writable file system which runs
on NAND flash, I don't have any other choice, right?

> Look at the TAMS MOAB port for an example.

Thanks for the pointer.
 
> What NAND device(s) are you thinking about using?
> What's the target architecture?

It is the builtin NAND controller in a Centrality (now SIRF) Atlas
II / Atlas III CPU (an Arm9 derivate), on our own board.

We already have running eCos on it, including RedBoot, and most other
drivers we need.

Regards,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Porting a new flash driver
  2008-04-01 15:55           ` Gary Thomas
  2008-04-01 16:16             ` Markus Schaber
@ 2008-04-03 11:24             ` Markus Schaber
  2008-04-03 12:00               ` Andrew Lunn
  1 sibling, 1 reply; 11+ messages in thread
From: Markus Schaber @ 2008-04-03 11:24 UTC (permalink / raw)
  To: ecos-discuss

Hi, Gary,

Gary Thomas <gary@mlbassoc.com> wrote:

> Markus Schaber wrote:
> > Andrew Lunn <andrew@lunn.ch> wrote:
> > 
> >>> Ugly, because it looks like the flash driver interface consists of some
> >>> static functions, so it will be impossible to support different flashes
> >>> concurrently. Luckily, we'll only need a single flash unit at the
> >>> moment.
> >> Take a look at the flash_v2 branch. We hope that in the next few
> >> months to merge this into the trunk.
> > 
> > That sounds interesting, I'll have a look at it. But I'm afraid that,
> > for now, I'll go the short path.
> 
> Albeit more complex, using the flash_v2 branch is probably your
> only choice if you want to run JFFS2 on NAND.  There's quite a lot
> of work involved in making this functional (hence why it's not already
> in the tree!).  In particular, the JFFS2 code will need to be updated
> and there are many NAND specific functions which it expects to be
> available which the mainline (flash_v1) does not support.

It seems that the flash_v2 branch was forked 2003, so there are 5 years
of differences between the branch and the trunk. So I have to step
deeply into the eCos internas to figure out and merge the needed
changes, it seems.

Regards,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Porting a new flash driver
  2008-04-03 11:24             ` Markus Schaber
@ 2008-04-03 12:00               ` Andrew Lunn
  2008-04-03 15:19                 ` Markus Schaber
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2008-04-03 12:00 UTC (permalink / raw)
  To: Markus Schaber; +Cc: ecos-discuss

> It seems that the flash_v2 branch was forked 2003, so there are 5 years
> of differences between the branch and the trunk. So I have to step
> deeply into the eCos internas to figure out and merge the needed
> changes, it seems.

Ask around and search the list. Some people have working tree with the
merge already in place.

    Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Porting a new flash driver
  2008-04-03 12:00               ` Andrew Lunn
@ 2008-04-03 15:19                 ` Markus Schaber
  0 siblings, 0 replies; 11+ messages in thread
From: Markus Schaber @ 2008-04-03 15:19 UTC (permalink / raw)
  To: ecos-discuss

Hi, Andrew,

Andrew Lunn <andrew@lunn.ch> wrote:

> > It seems that the flash_v2 branch was forked 2003, so there are 5 years
> > of differences between the branch and the trunk. So I have to step
> > deeply into the eCos internas to figure out and merge the needed
> > changes, it seems.
> 
> Ask around and search the list. Some people have working tree with the
> merge already in place.

I'll do so, thanks.

An additional problem just arised: Our flash has non-linear addressing
(page skip).

I'll have to see whether JFFS2 can handle this directly, or the driver
has to abstract over it.


Regards,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

end of thread, other threads:[~2008-04-03 14:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-28 15:17 [ECOS] Porting a new flash driver Markus Schaber
2008-04-01 11:14 ` Markus Schaber
2008-04-01 11:18   ` Chris Zimman
2008-04-01 11:23     ` Markus Schaber
2008-04-01 11:30       ` Andrew Lunn
2008-04-01 15:39         ` Markus Schaber
2008-04-01 15:55           ` Gary Thomas
2008-04-01 16:16             ` Markus Schaber
2008-04-03 11:24             ` Markus Schaber
2008-04-03 12:00               ` Andrew Lunn
2008-04-03 15:19                 ` Markus Schaber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).