[U-Boot] [PATCH v2 16/22] omap4: calculate EMIF register values

Måns Rullgård mans at mansr.com
Sun May 15 22:42:21 CEST 2011


Wolfgang Denk <wd at denx.de> writes:

> Dear Aneesh V,
>
> In message <1305472900-4004-17-git-send-email-aneesh at ti.com> you wrote:
>> Calculate EMIF register values based on AC timing parameters
>> from the SDRAM datasheet and the DDR frequency rather than
>> using the hard-coded values.
>> 
>> For a new board the user doen't have to go through the tedious
>> process of calculating the register values. Instead, just
>> provide the AC timings from the device data sheet as input
>> and the driver will automatically calculate the register values.
>
> Does it make sense to do this in the driver code?  These parameters
> will never change, so why can we not rather perform the computation
> only once, at build time, and feed in the respective parameters to the
> driver?

I agree, there should be no reason for doing this at runtime.  I would
think it possible to do with some C macros.

-- 
Måns Rullgård
mans at mansr.com



More information about the U-Boot mailing list