linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rogerq@ti.com (Roger Quadros)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/10] ARM: OMAP2+: Show bootloader GPMC timings to allow configuring the .dts file
Date: Tue, 4 Nov 2014 15:40:01 +0200	[thread overview]
Message-ID: <5458D731.1010208@ti.com> (raw)
In-Reply-To: <20141030163031.GG2560@atomide.com>

On 10/30/2014 06:30 PM, Tony Lindgren wrote:
> * Roger Quadros <rogerq@ti.com> [141030 08:05]:
>> On 10/30/2014 04:45 PM, Tony Lindgren wrote:
>>> * Roger Quadros <rogerq@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@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@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> 

I don't have any board with smsc or working NOR so I called
gpmc_cs_show_timings() after NAND was setup.

The printed values match closely to the configured values in the DTS.

cheers,
-roger

  parent reply	other threads:[~2014-11-04 13:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30  0:28 [PATCH 00/10] omap gpmc and board clean-up for v3.19 merge window Tony Lindgren
2014-10-30  0:28 ` [PATCH 01/10] ARM: dts: Fix bootloader version dependencies by muxing n900 smc91x pins Tony Lindgren
2014-10-30 11:59   ` Roger Quadros
2014-10-30 15:49     ` Tony Lindgren
2014-11-03  9:30       ` Roger Quadros
2014-10-30  0:29 ` [PATCH 02/10] ARM: dts: Fix wrong GPMC size mappings for omaps Tony Lindgren
2014-10-30 12:05   ` Roger Quadros
2014-10-30  0:29 ` [PATCH 03/10] ARM: dts: Add smc91x GPMC configuration for 2430sdp Tony Lindgren
2014-10-30  0:29 ` [PATCH 04/10] ARM: dts: Add GPMC timings for omap zoom serial port Tony Lindgren
2014-10-30 12:21   ` Roger Quadros
2014-10-30  0:29 ` [PATCH 05/10] ARM: OMAP2+: Fix support for multiple devices on a GPMC chip select Tony Lindgren
2014-10-30 12:26   ` Roger Quadros
2014-10-30  0:29 ` [PATCH 06/10] ARM: OMAP2+: Show bootloader GPMC timings to allow configuring the .dts file Tony Lindgren
2014-10-30 14:19   ` Roger Quadros
2014-10-30 14:45     ` Tony Lindgren
2014-10-30 15:04       ` Roger Quadros
2014-10-30 16:30         ` Tony Lindgren
2014-10-31  9:24           ` Roger Quadros
2014-11-04 13:40           ` Roger Quadros [this message]
2014-11-04 15:49             ` Tony Lindgren
2014-10-30 14:26   ` Roger Quadros
2014-10-30  0:29 ` [PATCH 07/10] ARM: OMAP2+: Require proper GPMC timings for devices Tony Lindgren
2014-10-30 14:27   ` Roger Quadros
2014-10-30  0:29 ` [PATCH 08/10] ARM: OMAP2+: Drop legacy code for gpmc-smc91x.c Tony Lindgren
2014-10-30 14:28   ` Roger Quadros
2014-10-30  0:29 ` [PATCH 09/10] ARM: OMAP2+: Drop board file for ti8168evm Tony Lindgren
2014-10-30  0:29 ` [PATCH 10/10] ARM: omap2plus: Drop board file for 3430sdp Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5458D731.1010208@ti.com \
    --to=rogerq@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).