This is the mail archive of the ecos-devel@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: NAND review


Simon Kallweit wrote:
Jonathan Larmour wrote:
that). But I'm also concerned about possibly having too much layering in Rutger's version for small simple implementations.

Well, there is one obvious candidate for being thinned out in my NAND implementation: the ANC layer that hides the presence of multiple controllers and/or chips. Making this optional for the (common) case of one controller and one (or multiple identical) chips will be easy.


This leaves 3 layers:
- common controller code, which takes care of unavoidable nuisances like spare layout, ECC handling, etc;
- controller-specific driver code;
- chip code that does interrogation and bad-block management; this, as often as not, is just the common large-page regular chip implementation, so no chip-specifics. Later in life we will see ONFI chips rule (maybe!) -- no chip-specifics here either.


I dislike the idea of code duplication, and so much is common across controller functionality. Hence the split into common and device-specific code, which enforces an API in-between. I did my best to design this API in a way that is flexible and powerful, but of course I cannot rule out that controllers exist that fit this interface only with a lot of workarounds. Needless to say, I am very much open to suggestions for improvement.

AFAIK, Linux's MTD also has an API between common and specific controller code, but it allows even more pluggability for controllers than my design. I wouldn't be surprised if all common code can be run-time replaced in MTD.

Rutger


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]