[PATCH 06/10] ARM: OMAP2+: Show bootloader GPMC timings to allow configuring the .dts file

Roger Quadros rogerq at ti.com
Fri Oct 31 02:24:20 PDT 2014


On 10/30/2014 06:30 PM, Tony Lindgren wrote:
> * Roger Quadros <rogerq at ti.com> [141030 08:05]:
>> On 10/30/2014 04:45 PM, Tony Lindgren wrote:
>>> * Roger Quadros <rogerq at ti.com> [141030 07:21]:
>>>> On 10/30/2014 02:29 AM, Tony Lindgren wrote:
>>>>> +static void gpmc_cs_show_timings(int cs, const char *desc)
>>>>> +{
>>>>> +	gpmc_show_regs(cs, desc);
>>>>> +
>>>>> +	pr_info("gpmc cs%i access configuration:\n", cs);
>>>>> +	GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1,  4,  4, "time-para-granularity");
>>>>> +	GPMC_GET_RAW(GPMC_CS_CONFIG1,  8,  9, "mux-add-data");
>>>>> +	GPMC_GET_RAW(GPMC_CS_CONFIG1, 12, 13, "device-width");
>>>>> +	GPMC_GET_RAW(GPMC_CS_CONFIG1, 16, 17, "wait-pin");
>>>>> +	GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1, 21, 21, "wait-on-write");
>>>>> +	GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1, 22, 22, "wait-on-read");
>>>>> +	GPMC_GET_RAW_SHIFT(GPMC_CS_CONFIG1, 23, 24, 3, "burst-length");
>>>>
>>>> how does this work with shift = 3?
>>>> Possible values of burst length are
>>>> 0 -> 4
>>>> 1 -> 8
>>>> 2 -> 16
>>>
>>> Hmm sounds like a bug..
> 
> The shift does not work here for 0 << 3 naturally :) I've changed
> it to l = (shift << l) where shift is 4 in this case.
>  
>>> In general, if you a chance to test this patch with a few
>>> devices that would be great. Assuming you have working timings
>>> in the bootloader, just remove the gpmc,* entries temporarily
>>> from the .dts file for a device, and see if the values printed
>>> by this patch make sense. I've used this to generate the values
>>> for the 2430sdp smc91x and zoom 8250 but I don't think I've tried
>>> anything with a burst mode so far.
>>
>> OK. I'll give it a spin with u-boot configured devices.
> 
> Great thanks. Updated patch below.
> 
> Regards,
> 
> Tony
> 
> 
> 8< ----------------
> From: Tony Lindgren <tony at atomide.com>
> Date: Wed, 29 Oct 2014 17:16:48 -0700
> Subject: [PATCH] ARM: OMAP2+: Show bootloader GPMC timings to allow configuring the .dts file
> 
> As we still have some devices with GPMC timings missing from the
> .dts files, let's make it a bit easier to use the bootloader
> values and print them out.
> 
> Note that we now need to move the parsing of the device tree provided
> configuration a bit earlier so we can use that for checking if anything
> was configured.
> 
> Cc: Roger Quadros <rogerq at ti.com>
> Signed-off-by: Tony Lindgren <tony at atomide.com>

Acked-by: Roger Quadros <rogerq at ti.com>

I won't be able to test this series this week, but will get back by the next.

cheers,
-roger




More information about the linux-arm-kernel mailing list