* How to port brcmnand Linux driver? [not found] <122759075.350079920.1474446203319.JavaMail.root@zimbra32-e6.priv.proxad.net> @ 2016-09-21 8:40 ` Eric Le Bihan 2016-09-21 9:05 ` Sascha Hauer 0 siblings, 1 reply; 3+ messages in thread From: Eric Le Bihan @ 2016-09-21 8:40 UTC (permalink / raw) To: barebox 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? In general, when adding such driver, should the functions unsupported by barebox (irq handling, memory barriers, etc) be stubbed or removed? Best regards, -- ELB _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to port brcmnand Linux driver? 2016-09-21 8:40 ` How to port brcmnand Linux driver? Eric Le Bihan @ 2016-09-21 9:05 ` Sascha Hauer 2016-09-21 15:09 ` Eric Le Bihan 0 siblings, 1 reply; 3+ messages in thread From: Sascha Hauer @ 2016-09-21 9:05 UTC (permalink / raw) To: Eric Le Bihan; +Cc: barebox 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 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to port brcmnand Linux driver? 2016-09-21 9:05 ` Sascha Hauer @ 2016-09-21 15:09 ` Eric Le Bihan 0 siblings, 0 replies; 3+ messages in thread From: Eric Le Bihan @ 2016-09-21 15:09 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox > On Wed, Sep 21, 2016 at 10:40:43AM +0200, Eric Le Bihan wrote: > > > > 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. OK. I've noticed that the use of mtd_set_ooblayout() was introduced in Linux 4.7. So I'll port brcmnand from 4.6, thus avoiding quite a few changes in the OOB/ECC management. Thanks for your advices. Best regards, -- ELB _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-21 15:09 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <122759075.350079920.1474446203319.JavaMail.root@zimbra32-e6.priv.proxad.net> 2016-09-21 8:40 ` How to port brcmnand Linux driver? Eric Le Bihan 2016-09-21 9:05 ` Sascha Hauer 2016-09-21 15:09 ` Eric Le Bihan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox