How to port brcmnand Linux driver?
Sascha Hauer
s.hauer at pengutronix.de
Wed Sep 21 02:05:00 PDT 2016
On Wed, Sep 21, 2016 at 10:40:43AM +0200, Eric Le Bihan wrote:
> Hi!
>
> I'm trying to port the brcmnand driver for Broadcom NAND controller from Linux.
> This driver requires an update of the MTD headers in barebox, as they lack
> definitions for functions such as mtd_set_ooblayout().
>
> What is the recommended strategy for this? Should I update the whole set of
> headers and report the barebox specific changes (use of device_d, etc) or only
> add the missing functions?
For the mtd headers we usually only port the functions we need which
worked good enough in the past.
>
> In general, when adding such driver, should the functions unsupported by barebox
> (irq handling, memory barriers, etc) be stubbed or removed?
It's a matter of taste. I usually remove spin_locks and other things
that are not relevant for barebox, but we actually do have stubs for some
stuff. I recommend removing such functions, but in the end it's up to
you.
irq handling is normally an area which must be changed heavily anyway when
porting from Linux to barebox, so I wouldn't try to make it look like in
the Linux driver, just to make potential updates from a newer Linux driver
easier.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list