linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Vipin Kumar <vipin.kumar@st.com>
To: Armando VISCONTI <armando.visconti@st.com>
Cc: Pratyush ANAND <pratyush.anand@st.com>,
	Viresh KUMAR <viresh.kumar@st.com>,
	Vipul Kumar SAMAR <vipulkumar.samar@st.com>,
	Bhupesh SHARMA <bhupesh.sharma@st.com>,
	Sebastian RASMUSSEN <sebastian.rasmussen@stericsson.com>,
	Linus Walleij <linus.ml.walleij@gmail.com>,
	Alessandro Rubini <rubini-list@gnudd.com>,
	Shiraz HASHIM <shiraz.hashim@st.com>,
	Rajeev KUMAR <rajeev-dlh.kumar@st.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Deepak SIKRI <deepak.sikri@st.com>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 27/74] ST SPEAr : NAND interface driver for spear platforms
Date: Fri, 3 Sep 2010 12:41:56 +0530	[thread overview]
Message-ID: <4C809FBC.8020003@st.com> (raw)
In-Reply-To: <4C7F5B9E.8090406@st.com>

On 9/2/2010 1:39 PM, Armando VISCONTI wrote:
> Ciao Linus,
> 
> Linus Walleij wrote:
>> 2010/8/30 Viresh KUMAR <viresh.kumar@st.com>:
>>
>>   
>>> From: Vipin Kumar <vipin.kumar@st.com>
>>>
>>> SPEAr platforms use Flexible Static Memory Controller(FSMC) provided by ST for
>>> interfacing with NAND devices.
>>> This patch adds the support for glue logic for NAND flash on SPEAr boards
>>>     
>>
>> OK...
>>
>>   
>>> (...)
>>>  create mode 100644 arch/arm/plat-spear/include/plat/fsmc.h
>>>  create mode 100644 arch/arm/plat-spear/include/plat/nand.h
>>>  create mode 100644 drivers/mtd/nand/spear_nand.c
>>>     
>>
>> spear_nand.c?
>>
>> Why not fsmc-nand.c or similar if this is the name of the block.
>> We have this in U300, Nomadik NHK8815 and other platforms too,
>> it doesn't have much to do with SPEAr actually...
>>
>> Also, what are the include files doing in plat-spear since we have
>> the same hardware in other platforms? Move them to include/linux/mtd/
>> so we can use them please.
>>
>> I *highly* suspect that this driver duplicates some code found in
>> drivers/mtd/nand/nomadik_nand.c because it's the same silicon.
>>   
> Why nomadik_nand.c?
> Shouldn't the fsmc_nand.c rule apply also in this case?
> 
> 
>> Alessandro can judge on this, but I have a feeling that driver
>> should be replaced by this, more mature driver.
>>   

Hello All,

> Maybe.
> But I suspect that may be few differences in the ECC accelerator inside, 
> in fact.
> 
> In our FSMC previous case it was a Hamming accelerator, and I think this 
> apply
> also for nomadik (maybe). In our sp1300 case it is a BCH with 104 bytes 
> of ECC.

Adding on top of what Armando has already pointed out, FSMC block may 
have different versions and each of them may support different features 
based on its configuration eg. spear device's FSMC block is version8 
and is configured for 13 byte ecc(per 512 bytes data, BCH8 algorithm). 
There are other possibilities eg. BCH4, BCH2 etc which are not used in 
spear devices.

Making it generic would also entail supporting all possible configurations 
through single driver (makes more sense)

Customization was the prime reason for keeping the driver spear 
dependent and naming it as spear_nand.c

Alessandro/Sebastian: Is it OK to add a common driver for all FSMC versions
and customizations

Comments/Suggestions welcome

Regards
Vipin

> 
> This is one of the options when generating the h/w block, so FSMCs may 
> differ.
> If we want to re-use same driver I guess we might change something and 
> accept
> few parameters from the platform.
> 
> Vipin can for sure comment more on this.....
> 
> 
> Rgds,
> Arm
> 

  parent reply	other threads:[~2010-09-03  7:11 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1283161023.git.viresh.kumar@st.com>
2010-08-30 10:43 ` [PATCH 24/74] ST SPEAr: Add smi driver for serial NOR flash Viresh KUMAR
2010-08-30 10:43 ` [PATCH 27/74] ST SPEAr : NAND interface driver for spear platforms Viresh KUMAR
2010-09-01 22:36   ` Linus Walleij
2010-09-02  8:09     ` Armando Visconti
2010-09-02  8:52       ` Armando Visconti
2010-09-02 11:15       ` Linus Walleij
2010-09-02 12:33         ` Armando Visconti
2010-09-03 11:23           ` Alessandro Rubini
2010-09-03 17:26             ` Linus Walleij
2010-09-06  7:25               ` Armando Visconti
2010-09-10  4:21               ` viresh kumar
2010-09-10  8:38                 ` Linus Walleij
2010-09-03  7:11       ` Vipin Kumar [this message]
2010-09-03 11:22         ` Sebastian RASMUSSEN
2010-08-30 10:43 ` [PATCH 28/74] Incrementing the ecc_pos array to contain 128 char Viresh KUMAR
2010-08-30 12:14   ` Artem Bityutskiy
2010-08-31  6:34     ` Vipin Kumar
2010-08-31 23:36       ` Artem Bityutskiy
2010-09-01  4:13         ` Vipin Kumar
2010-09-01 10:45           ` Artem Bityutskiy
2010-09-01 11:04             ` Vipin Kumar
2010-09-01 21:23               ` Ryan Mallon
2010-09-01 21:54                 ` Kevin Cernekee
2010-09-01 22:21                   ` Ryan Mallon
2010-09-01 22:53                     ` Artem Bityutskiy
2010-09-01 23:37                       ` Ryan Mallon
2010-09-01 23:43                         ` Ryan Mallon
2010-09-02  6:33                     ` Brian Norris
2010-09-02  9:49                       ` Artem Bityutskiy
2010-09-01 23:23               ` Artem Bityutskiy
2010-08-30 10:43 ` [PATCH 29/74] Newly erased page read workaround Viresh KUMAR

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=4C809FBC.8020003@st.com \
    --to=vipin.kumar@st.com \
    --cc=armando.visconti@st.com \
    --cc=bhupesh.sharma@st.com \
    --cc=deepak.sikri@st.com \
    --cc=dwmw2@infradead.org \
    --cc=linus.ml.walleij@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=pratyush.anand@st.com \
    --cc=rajeev-dlh.kumar@st.com \
    --cc=rubini-list@gnudd.com \
    --cc=sebastian.rasmussen@stericsson.com \
    --cc=shiraz.hashim@st.com \
    --cc=vipulkumar.samar@st.com \
    --cc=viresh.kumar@st.com \
    /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 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 NNTP newsgroup(s).