Implementing NAND driver on a PrimeCell SMC PL350 series
Ricard Wanderlof
ricard.wanderlof at axis.com
Sat Jan 12 06:19:09 EST 2013
On Sat, 12 Jan 2013, Daniel Tang wrote:
> I didn't know high level functions could be overridden. Most of the
> drivers I looked through didn't override the 'nand_command' function for
> example, so I wasn't aware it was possible.
A long time ago, the functions in nand_base.c were marked with things like
"REPLACABLE" or somesuch to show that they could be replaced with
user-defined functions.
I guess you have to read through things like nand_scan_defaults() e.g.
/* check, if a user supplied command function given */
if (chip->cmdfunc == NULL)
chip->cmdfunc = nand_command;
etc to get an idea of what to replace.
Of course, if the existing driver framwork is not flexible enough for
your needs, patches are always welcome.
> As per your advice, I also read through some of the other NAND drivers.
> Although they didn't have anything similar to what I need, I have a good
> idea of where to head.
Ok, good!
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
More information about the linux-mtd
mailing list