
Hi Igor,
My personal opinion is that unless you intend to run the binary on multiple IMX6 variants, there's no need to do expensive checks in runtime, when you can do the same at compile-time. For me it's the same as choosing puts() vs printf() - you know at compile time whether you need to print arguments or not, so same with the USB controller base address - you know in advance that you target a specific CPU variant and not the other ones.
To a certain extent I agree that it would be awesome to have the same code running on all IMX6 variants, but the run-time checks will increase somewhat the binary footprint and U-Boot community has already gone to great efforts to remove unnecessary bloat. My personal assumption is that such generic approach would be more tolerated in the Linux kernel.
Kind regards, Nikolay
On 6/16/2014 1:00 PM, u-boot-request@lists.denx.de wrote:
Message: 30 Date: Mon, 16 Jun 2014 10:05:08 +0300 From: Igor Grinberg grinberg@compulab.co.il Subject: Re: [U-Boot] [PATCH 1/6] usb: ehci: mx6: Add support for i.MX6SL To: Otavio Salvador otavio@ossystems.com.br, U-Boot Mailing List u-boot@lists.denx.de Cc: Marek Vasut marex@denx.de, Fabio Estevam fabio.estevam@freescale.com Message-ID: 539E9724.4020809@compulab.co.il Content-Type: text/plain; charset=ISO-8859-1 Hmmm... Can't this be done dynamically? I mean... you can check the SoC type in runtime, right? And then substitute the correct address in a variable or so... I would really prefer such kind of things done in runtime. -- Regards, Igor.