lkml.org 
[lkml]   [2015]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 5/9] mtd: pxa3xx_nand: add support for the Marvell Berlin nand controller
Date
Boris Brezillon <boris.brezillon@free-electrons.com> writes:

> On Tue, 27 Jan 2015 15:10:12 +0100
> Antoine Tenart <antoine.tenart@free-electrons.com> wrote:
>
>> The nand controller on Marvell Berlin SoC reuse the pxa3xx nand driver
>> as it quite close. The process of sending commands can be compared to
>> the one of the Marvell armada 370: read and write commands are done in
>> chunks.
>>
>> But the Berlin nand controller has some other specificities which
>> require some modifications of the pxa3xx nand driver:
>> - there are no IRQ available so we need to poll the status register: we
>> have to use our own cmdfunc Berlin function, and early on the probing
>> function.
>> - PAGEPROG are very different from the one used in the pxa3xx driver,
>> so we're using a specific process for this one
>> - the SEQIN command is equivalent to a READ0 command
>> - the RNDOUT command must be used to perform a read operation, and the
>> command is not NAND_CMD_RNDOUT
>> - the ERASE1 command is specific (0xd060)
>>
>> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>

Given all the differences, the PIO mode instead of the current interrupt model,
and the berlin specific functions (nand_start, ...), wouldn't it be an idea to :
- extract the common functions to mrvl-nand-lib.c
- the remaining would be in pxa3xx_nand.c
- the new code will be in berlin_nand.c

All these ifs per variant will add complexity to the current driver, won't they
?

Cheers.

--
Robert


\
 
 \ /
  Last update: 2015-02-10 21:01    [W:0.382 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site