From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dirk Behme Date: Tue, 11 Sep 2012 07:39:30 +0200 Subject: [U-Boot] [PATCH] mx6qsabresd: Add basic support In-Reply-To: References: <1334158122-15219-1-git-send-email-festevam@gmail.com> <4F86B3D1.3000501@denx.de> Message-ID: <504ECE92.2030702@de.bosch.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11.09.2012 05:56, Fabio Estevam wrote: > Hi Stefano, > > On Thu, Apr 12, 2012 at 7:52 AM, Stefano Babic wrote: > >> This file is identical to imximage.cfg for the mx6qsabrelite board. I >> can imagine this is derived board. Why cannot we implement it as a >> variant of the original one ? We have several example in u-boot, for >> example the efika (MX51), or the TAM3517 (ok, I admit I know this very >> well because I did it...), or imx27-lite /magnesium, or.... > > After a long time, I am returning on adding support to mx6qsabresd. > > I have been comparing mx6qsabrelite against mx6qsabresd and I have > started to do as you suggested: unify the 2 boards into > mx6qsabrelite.c. > > What I realize is that the differences are relevant: UART1 pin muxing, > SDHC ports, SDHC card detect GPIO, USB Host enable port, I2C devices, > Ethernet PHY, etc. > > It seems to me that the code is becoming polluted by all the ifdef's I > need to place in order to handle both boards, and I am starting to > think if it wouldn't be better to follow with the original approach of > adding a board/freescale/mx6qsabresd directory. > > After I finish mx6qsabresd, I also plan to add one more mx6q board, > and this would mean even more ifdefs, which would make the code even > harder to read. > > Please let me know what you think. I don't know all the boards close enough, but if we could somehow find an unique identifier to be able to auto-detect the board type at runtime and read this early in the boot phase, we could try to have one U-Boot binary for different boards which configures itself correctly at runtime. Just an idea ... Best regards Dirk