linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jon-hunter@ti.com (Jon Hunter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: OMAP2+: onenand: cleanup for gpmc driver conversion
Date: Thu, 14 Jun 2012 12:53:48 -0500	[thread overview]
Message-ID: <4FDA252C.4020708@ti.com> (raw)
In-Reply-To: <C8443D0743D26F4388EA172BF4E2A7A93E9993EF@DBDE01.ent.ti.com>

Hi Afzal,

On 06/14/2012 12:40 AM, Mohammed, Afzal wrote:
> Hi Jon,
> 
> On Wed, Jun 13, 2012 at 22:08:47, Hunter, Jon wrote:
>> On 06/13/2012 12:03 AM, Mohammed, Afzal wrote:
> 
>>> As gpmc_onenand_setup is a callback by onenand driver, we would have
>>> lost the opportunity to configure onenand before driver is probed.
>>
>> Is that a problem? Looks like it is called early in the probe and so I
>> would hope no one is attempting to access the onenand itself before the
>> probe has completed.
> 
> During gpmc driver probe, it will configure all the connected peripherals,
> if configuration details are not present at that point of time, gpmc driver
> will cry out saying that configuration & timings has not been configured,
> (please see holler if no configuration patch). 

Sorry, I am not sure if I am missing something here, but isn't the
chip-select requested during the gpmc probe? If so then we should not be
programming the gpmc registers at all until the chip-select has been
allocated. Hence, after the probe seems more appropriate.

> And I do not see any reason
> why gpmc driver should not be fed with async mode configuration initially,
> as it has to be done always.

It is more of where you are doing it. I am not against putting in async
mode to begin with.

>>
>>> This would cause requirement of double GPMC configuring and we lost
>>> the opportunity to configure GPMC before driver is probed.
>>
>> I am not convinced we need to. Furthermore with your change you do not
>> actually set async mode in the onenand until _set_sync() is called.
> 
> Yes, setting async mode in onenand is done in set_sync function, and it is
> always called by onenand driver indirectly.
> 
> Seems if setting async mode in onenand is taken out of set_sync & placed
> it before set_sync invocation in gpmc_onenand_setup, intention will be
> clear, right ? (even though sequence wise same thing is happening now)

Exactly.

>>
>>> And the first step for onenand configuration is always to set it
>>> to async mode (with the way it is done now), so it seems reasonable
>>> to rely on normal GPMC configuration for async & then do reconfigure
>>> for sync.
>>
>> Yes but as far as I can see, it seems that this is the intent of the
>> onenand_setup() function to perform the necessary initialisation.
> 
> I believe doing it in gpmc_onenand_init is better, due to the reasons
> mentioned above as well as because function name will correspond to what
> it is doing, i.e. initialization

If the chip-select is allocating during the probe, then I don't agree.

>> Have you tested onenand? Do you have a board with onenand?
> 
> Yes, on omap3evm, with help of local patches (as mainline doesn't have
> those). It was mentioned in cover letter of gpmc driver conversion series

Great. Sorry but with 20+ patch spread across 3 series it is not always
easy to find the details. So ideally it should be mentioned in this
cover letter too.

Thanks
Jon

  reply	other threads:[~2012-06-14 17:53 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 14:01 [PATCH 0/3] Prepare for GPMC driver conversion Afzal Mohammed
2012-06-11 14:01 ` [PATCH 1/3] ARM: OMAP2+: nand: unify init functions Afzal Mohammed
2012-06-11 15:43   ` Jon Hunter
2012-06-12  5:50     ` Mohammed, Afzal
2012-06-11 14:01 ` [PATCH 2/3] ARM: OMAP2+: onenand: cleanup for gpmc driver conversion Afzal Mohammed
2012-06-11 18:36   ` Jon Hunter
2012-06-12  6:16     ` Mohammed, Afzal
2012-06-12 17:30       ` Jon Hunter
2012-06-13  5:03         ` Mohammed, Afzal
2012-06-13 16:38           ` Jon Hunter
2012-06-14  5:40             ` Mohammed, Afzal
2012-06-14 17:53               ` Jon Hunter [this message]
2012-06-15  6:52                 ` Mohammed, Afzal
2012-06-11 14:02 ` [PATCH 3/3] ARM: OMAP2+: gpmc: handle additional timings Afzal Mohammed
2012-06-11 18:49   ` Jon Hunter
2012-06-12  6:37     ` Mohammed, Afzal
2012-06-12 17:36       ` Jon Hunter
2012-06-13  4:56         ` Mohammed, Afzal
2012-06-13 11:32           ` Tony Lindgren
2012-06-13 11:54             ` Tony Lindgren
2012-06-13 11:58               ` Mohammed, Afzal
2012-06-14 10:10                 ` Mohammed, Afzal
2012-06-14 10:19                   ` Tony Lindgren
2012-06-14 10:39                     ` Mohammed, Afzal
2012-06-14 11:49                       ` Tony Lindgren
2012-06-14 11:59                         ` Mohammed, Afzal
2012-06-14 12:09                         ` Mohammed, Afzal
2012-06-14 12:21                           ` Mohammed, Afzal
2012-06-14 12:30                             ` Tony Lindgren
2012-06-14 11:52                       ` Tony Lindgren
2012-06-14 11:56                         ` Mohammed, Afzal
2012-06-14 12:29                           ` Tony Lindgren
2012-06-14 12:53                             ` Mohammed, Afzal
2012-06-14 16:53                               ` Tony Lindgren
2012-06-15  5:42                                 ` Mohammed, Afzal
2012-06-15  6:16                                   ` Mohammed, Afzal
2012-06-15 10:45                                     ` Tony Lindgren
2012-06-15 10:49                                       ` Mohammed, Afzal
2012-06-13 12:34             ` Mohammed, Afzal
2012-06-13 12:42               ` Tony Lindgren
2012-06-13 14:04                 ` Mohammed, Afzal
2012-06-14  6:32                   ` Tony Lindgren
2012-06-14  9:29   ` Tony Lindgren
2012-06-14  9:41     ` Mohammed, Afzal
2012-06-14 11:23       ` Tony Lindgren
2012-06-12 10:27 ` [PATCH 0/3] Prepare for GPMC driver conversion Mohammed, Afzal
2012-06-13 11:33   ` Tony Lindgren
2012-06-13 12:40     ` Mohammed, Afzal
2012-06-13 16:46       ` Jon Hunter
2012-06-14  5:58         ` Mohammed, Afzal

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=4FDA252C.4020708@ti.com \
    --to=jon-hunter@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).