Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-27 Thread Wolfgang Denk
Dear Fabio Estevam, In message you wrote: > > So in theory yes, we could have a single board file for all the mx6 > boards out there and make it full of ifdefs all over it to handle all > the hardware variations. Well, actually I do think there is some common code for iMX6 that could / should b

Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-27 Thread Fabio Estevam
On Thu, Mar 27, 2014 at 12:59 PM, Eric Bénard wrote: > Hi Fabio, > > Le Thu, 27 Mar 2014 09:44:02 -0300, > Fabio Estevam a écrit : >> So in theory yes, we could have a single board file for all the mx6 >> boards out there and make it full of ifdefs all over it to handle all >> the hardware variat

Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-27 Thread Eric Bénard
Hi Otavio, Le Thu, 27 Mar 2014 09:50:10 -0300, Otavio Salvador a écrit : > And this does work, as can be seen in Barebox which has it working for > quite some time. > > You can see equivalent patch in > > http://lists.infradead.org/pipermail/barebox/2014-March/018408.html > > It seems U-Boot i

Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-27 Thread Eric Bénard
Hi Fabio, Le Thu, 27 Mar 2014 09:44:02 -0300, Fabio Estevam a écrit : > So in theory yes, we could have a single board file for all the mx6 > boards out there and make it full of ifdefs all over it to handle all > the hardware variations. > here we talk of 2 boards from the same manufacturer whi

Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-27 Thread Otavio Salvador
Em 27/03/2014 09:44, "Fabio Estevam" escreveu: > > On Thu, Mar 27, 2014 at 2:36 AM, Wolfgang Denk wrote: > > Dear Fabio Estevam, > > > > In message < caomzo5d2n1zvo5ogeam1_ewt-0kkamzgvrfpeekh5zymqkl...@mail.gmail.com> you wrote: > >> > >> Me too. I also think the ifdefs may easily cause confusion

Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-27 Thread Fabio Estevam
On Thu, Mar 27, 2014 at 2:36 AM, Wolfgang Denk wrote: > Dear Fabio Estevam, > > In message > you > wrote: >> >> Me too. I also think the ifdefs may easily cause confusion. > > So you suggest we remove all conditional code and use duplication > everywhere? You must be joking... Not everywhere.

Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-27 Thread Eric Bénard
Hi Stefan, Le Thu, 27 Mar 2014 08:05:10 +0100, Stefan Roese a écrit : > Yes, I agree. #ifdef's are ugly. But code duplication is also a problem > as Wolfgang has mentioned. > > Isn't there a way to detect the board type at runtime somehow (via CPU > type or GPIO input, ...)? And then dynamical

Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-27 Thread Stefan Roese
adding my 0.02$ to this discussion... On 26.03.2014 22:31, Eric Bénard wrote: this board is produced by Embest/Element 14 and is based on i.MX6 Dual The following features are tested : - UART2 (console) - eMMC - uSDCard - Ethernet - USB Host (through 2 ports hub) - HDMI output - I2C 1/2 - SPI NO

Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-26 Thread Wolfgang Denk
Dear Fabio Estevam, In message you wrote: > > Me too. I also think the ifdefs may easily cause confusion. So you suggest we remove all conditional code and use duplication everywhere? You must be joking... > For example: if someone sends a patch for Riotboard, he/she may break > Marsboard wit

Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-26 Thread Wolfgang Denk
Dear Otavio, In message you wrote: > > I understand both boards share a lot of code but I think the set of > ifdef makes harder for people to understand the board code. Personally > I prefer v1. Duplication of so much code is really bad. It's always been a maintenance nightmare. The new versi

Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-26 Thread Fabio Estevam
On Wed, Mar 26, 2014 at 11:21 PM, Otavio Salvador wrote: > I understand both boards share a lot of code but I think the set of > ifdef makes harder for people to understand the board code. Personally > I prefer v1. Me too. I also think the ifdefs may easily cause confusion. For example: if some

Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-26 Thread Otavio Salvador
On Wed, Mar 26, 2014 at 6:31 PM, Eric Bénard wrote: > this board is produced by Embest/Element 14 and is based on i.MX6 Dual > The following features are tested : > - UART2 (console) > - eMMC > - uSDCard > - Ethernet > - USB Host (through 2 ports hub) > - HDMI output > - I2C 1/2 > - SPI NOR Flash

[U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-26 Thread Eric Bénard
this board is produced by Embest/Element 14 and is based on i.MX6 Dual The following features are tested : - UART2 (console) - eMMC - uSDCard - Ethernet - USB Host (through 2 ports hub) - HDMI output - I2C 1/2 - SPI NOR Flash Boot on SPI NOR and through USB loader are tested. For more information