Hi Nikolay,

On 06/16/14 17:33, Nikolay Dimitrov wrote:
> Hi Igor,
> 
> My personal opinion is that unless you intend to run the binary on multiple 
> IMX6 variants,

That is exactly what we do already (code is on the way) and IMO what
we should aim for.

> there's no
> need to do expensive checks in runtime, when you can do the same at 
> compile-time.

Why do you think it is expensive? Any benchmarks?
Also, the solution is what Marek already said, in short:
do the check once and store the result for future use...

> 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.

For me it is just an artificial complication which prevents single binary for
i.MX6 based boards.
Don't get me wrong, I think that in your board code you can choose which
approach you want, whether it will be single or multi binary, but this
is i.MX6 (and possibly future i.MX*) USB code which can be used on many
i.MX6 boards.

> 
> 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.

Again, what are we talking about? A couple of bytes?

> My personal assumption is that such generic
> approach would be more tolerated in the Linux kernel.

For Linux kernel this is the only acceptable way now.


-- 
Regards,
Igor.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to