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/2] ARM: OMAP2: Fix GPMC memory initialisation
Date: Mon, 4 Feb 2013 13:51:03 -0600	[thread overview]
Message-ID: <51101127.8010602@ti.com> (raw)
In-Reply-To: <20130204194725.GR22517@atomide.com>


On 02/04/2013 01:47 PM, Tony Lindgren wrote:
> * Jon Hunter <jon-hunter@ti.com> [130204 11:37]:
>>
>> On 02/04/2013 01:15 PM, Tony Lindgren wrote:
>>> * Jon Hunter <jon-hunter@ti.com> [130204 10:49]:
>>>> On 02/04/2013 11:45 AM, Tony Lindgren wrote:
>>>>>
>>>>> AFAIK SYSBOOT_n values reflect the boot time values of the actual SYSBOOT
>>>>> pins, so using generic pinconf there makes sense. But this of course should
>>>>> be checked.
>>>>
>>>> Not sure I am a fan of that idea. It is possible the pins could be
>>>> re-used as GPIOs after reset. Given that the state at reset is latched
>>>> in a register, it is best just to read the register directly.
>>>
>>> Yes the physical SYSBOOT pins can be reused as GPIO, but that's are already
>>> handled by the padconf and GPIO registers. This is a different register
>>> showing the boot time pin values for some pins. So it makes sense to use
>>> generic pinconf to make the pin values available to the client drivers
>>> as needed.
>>>
>>> The advantage doing it this way is that we don't need to export any omap
>>> custom functions to the drivers from the SCM driver. This way we need zero
>>> platform glue code, and can deal with it directly in the drivers in a
>>> generic way. And all we need to do is just need to map the SoC specific
>>> SYSBOOT pin register in the .dts files.
>>
>> I see what you are saying exporting the state in control_status register
>> via the pinconf. That could work.
>>
>>> It may also make sense to export DEVICETYPE this way. At least early omaps
>>> had the GP vs HS mode configured by pulls on some pins during the boot time.
>>> So those bits too may reflect actual physical pins during the boot time
>>> configured by the efuse settings?
>>
>> I *believe* that was only omap1.
> 
> Yeah but maybe the efuses just configure some pulls for selected pins for
> later omaps?
>  
>>>>>>> Regarding omap_device, we should find a way to keep the dependencies
>>>>>>> between drivers and the bus code down to minimum. So ideally things
>>>>>>> like this would be only done using just the compatible flag. But the
>>>>>>> pdata we cannot remove quite yet.
>>>>>>
>>>>>> Agree. However, there are several drivers today (gpio, dmtimer, mmc,
>>>>>> serial, dss, etc), that make use of a function pointer to
>>>>>> omap_pm_get_dev_context_loss_count() to determine when the peripheral's
>>>>>> state has been lost. When booting with DT this function pointer is not
>>>>>> populated and so with DT we currently have no way to determine this. I
>>>>>> see this as a blocker to migrating completely to DT. Ideally we would
>>>>>> find a way for RPM to handle this and remove the function pointer.
>>>>>> However, right now we still need a generic way to pass this type of
>>>>>> platform data to drivers.
>>>>>
>>>>> Yeah pinconf generic won't help us with the legacy boot.
>>>>
>>>> Right. I view all this sort of thing as system-level device information
>>>> that some drivers may need. It does not seem that we have a good way to
>>>> handle that at the moment. Any ideas?
>>>
>>> I suggest just passing it in in pdata for now for the legacy boot. Then
>>> I suggest we make what we can generic with pinconf in the long run.
>>
>> I don't see why we would want to export a function pointer to
>> omap_pm_get_dev_context_loss_count() with pinconf. Have we got our wires
>> crossed here?
> 
> Yes sorry, too many muxes here. I got this topic mixed up with the sysboot
> pin topic :)
> 
> We really need to find a Linux generic API to query this. Sounds like it
> should be part of runtime PM?

Ideally, yes. I had discussed with Kevin about adding a new state for
"logic state lost" and then if this could be passed to the RPM resume
callback then we could use this. May be I need to bring this up with Tero.

Cheers
Jon

  reply	other threads:[~2013-02-04 19:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 16:38 [PATCH 0/2] ARM: OMAP2+: GPMC Fixes Jon Hunter
2013-02-01 16:38 ` [PATCH 1/2] ARM: OMAP2+: Prevent potential crash if GPMC probe fails Jon Hunter
2013-02-01 22:08   ` Tony Lindgren
2013-02-08 22:56     ` Jon Hunter
2013-02-09 15:55       ` Ezequiel Garcia
2013-02-14 12:04         ` Philip, Avinash
2013-02-16 22:37           ` Grazvydas Ignotas
2013-02-01 16:38 ` [PATCH 2/2] ARM: OMAP2: Fix GPMC memory initialisation Jon Hunter
2013-02-01 21:51   ` Tony Lindgren
2013-02-02  1:22     ` Jon Hunter
2013-02-02 18:11       ` Tony Lindgren
2013-02-04 15:05         ` Jon Hunter
2013-02-04 17:45           ` Tony Lindgren
2013-02-04 18:46             ` Jon Hunter
2013-02-04 19:15               ` Tony Lindgren
2013-02-04 19:33                 ` Jon Hunter
2013-02-04 19:47                   ` Tony Lindgren
2013-02-04 19:51                     ` Jon Hunter [this message]
2013-02-04 22:12     ` Jon Hunter
2013-02-04 22:45       ` Jon Hunter
2013-02-05 23:34         ` Tony Lindgren
2013-02-06  0:22           ` Jon Hunter
2013-02-06 17:28             ` 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=51101127.8010602@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).