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 v5 3/3] ARM: OMAP2+: onenand: prepare for gpmc driver migration
Date: Thu, 28 Jun 2012 14:00:45 -0500	[thread overview]
Message-ID: <4FECA9DD.8050505@ti.com> (raw)
In-Reply-To: <4FEC89B9.3090404@ti.com>

Hi Tony, Afzal,

On 06/28/2012 11:43 AM, Jon Hunter wrote:
> Hi Tony, Afzal,
> 
> On 06/28/2012 07:32 AM, Tony Lindgren wrote:
>> * Mohammed, Afzal <afzal@ti.com> [120628 02:36]:
>>> Hi Tony,
>>>
>>> On Wed, Jun 27, 2012 at 20:28:45, Tony Lindgren wrote:
>>>
>>>> The last patch in this series causes onenand not to show
>>>> up on my n900. I believe the problem has been there earlier
>>>> too, but I just did not notice it.
>>>
>>> Sorry for the delayed response, could reach workplace a short
>>> while ago only
>>>
>>> Could the diff [1] be tried and check whether it resolves the issue,
>>>
>>> Regards
>>> Afzal
>>>
>>> [1]
>>> diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
>>> index c8a9487..bbae674 100644
>>> --- a/arch/arm/mach-omap2/gpmc-onenand.c
>>> +++ b/arch/arm/mach-omap2/gpmc-onenand.c
>>> @@ -364,6 +364,8 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base)
>>>         struct gpmc_timings t;
>>>         int ret;
>>>
>>> +       omap2_onenand_set_async_mode(onenand_base);
>>> +
>>>         t = omap2_onenand_calc_async_timings();
>>>
>>>         ret = gpmc_set_async_mode(gpmc_onenand_data->cs, &t);
>>
>> Yes that seems to do the trick, thanks! I can fold that into the
>> breaking patch when applying.
> 
> I am not sure what to make of this. Testing Afzal's this series along with the other
> gpmc-prep series [1], onenand is working fine on my 3430sdp and I see ...
> 
> [    2.792510] OneNAND driver initializing
> [    2.797576] omap2-onenand omap2-onenand: initializing on CS2, phys base 0x20000000, virtual base c88c0000, freq 0 MHz

I realised that the above print showing 0 MHz is another clue as to why
the above change is needed for the n900. It is printing 0 MHz because
the OMAP3430 SDP does not support sync read or write. The frequency is
only queried during the configuration of the sync mode timings and not
the async. I had just submitted a 2 patch series to fix this so that is
displays the correct frequency for all boards [1]. If you agree with my
changes may be we can include them in Afzal's series.

However, more importantly with my fix, I now see that the frequency
supporting by the OneNAND on the SDP is 66MHz. On Tony's n900 it shows
83MHz. The timings for async mode are hard-coded in the gpmc-onenand.c
and it does not have different timings for different devices and
different frequencies. Hence, this is probably why the async timings in
the gpmc-onenand.c do not work for the n900.

The problem is that unlike nand, where it is clear which boards were
dependent on the bootloader timings, for onenand it really is not 100%
clear. Some boards support ONENAND_SYNC_READWRITE and so these are not
using the async timings. However, the n8x0 appears only to use sync
read. Does the n900 use the same settings as the n8x0?

Tony, have you tried using any of the mtd kernel tests to verify OneNAND
read/write is working on your n900? For example ...

# insmod mtd_pagetest.ko dev=<mtd-part-num>

_NOTE_ that above test erases the OneNAND! ;-)

Cheers
Jon

[1] http://marc.info/?l=linux-omap&m=134090910321284&w=2

  reply	other threads:[~2012-06-28 19:00 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27  6:33 [PATCH v5 0/3] Prepare for GPMC driver conversion Afzal Mohammed
2012-06-27  6:33 ` [PATCH v5 1/3] ARM: OMAP2+: nand: unify init functions Afzal Mohammed
2012-06-27  6:33 ` [PATCH v5 2/3] ARM: OMAP2+: gpmc: handle additional timings Afzal Mohammed
2012-06-27  6:34 ` [PATCH v5 3/3] ARM: OMAP2+: onenand: prepare for gpmc driver migration Afzal Mohammed
2012-06-27 14:58   ` Tony Lindgren
2012-06-28  9:32     ` Mohammed, Afzal
2012-06-28 12:32       ` Tony Lindgren
2012-06-28 12:33         ` Mohammed, Afzal
2012-06-28 12:44         ` Mohammed, Afzal
2012-07-30  7:36           ` Mohammed, Afzal
2012-06-28 16:43         ` Jon Hunter
2012-06-28 19:00           ` Jon Hunter [this message]
2012-07-02  6:26             ` Tony Lindgren
2012-06-29  6:15           ` Mohammed, Afzal
2012-06-29  6:38             ` Mohammed, Afzal
2012-06-29 14:15             ` Jon Hunter
2012-07-02 10:04               ` Mohammed, Afzal
2012-07-02  6:36           ` Tony Lindgren
2012-07-02  9:43             ` Mohammed, Afzal
2012-07-02 17:29               ` Jon Hunter
2012-07-03  4:35                 ` Mohammed, Afzal
2012-07-03 15:10                   ` Jon Hunter
2012-07-04  5:36                     ` Mohammed, Afzal
2012-07-02 17:25             ` Jon Hunter
2012-07-03  8:17               ` Tony Lindgren
2012-07-03 15:12                 ` Jon Hunter
2012-07-04  7:00                 ` Mohammed, Afzal
2012-07-04  7:51                   ` Tony Lindgren
2012-07-05 10:24                     ` Mohammed, Afzal
2012-07-05 10:55                       ` Tony Lindgren
2012-07-05 11:58                         ` Mohammed, Afzal
2012-07-05 14:49                           ` Tony Lindgren
2012-07-05 14:51                         ` Mohammed, Afzal
2012-07-06 12:05                           ` Tony Lindgren
2012-07-10  6:20                             ` Mohammed, Afzal
2012-07-10  9:45                               ` Tony Lindgren
2012-07-10 10:04                                 ` Mohammed, Afzal
2012-07-10 13:17                                   ` Tony Lindgren
2012-07-10 13:47                                     ` Mohammed, Afzal
2012-07-10 17:15                                       ` Jon Hunter
2012-07-11  6:47                                         ` Tony Lindgren
2012-07-13  4:36                                           ` Mohammed, Afzal
2012-08-06 13:38                                           ` gpmc generic retime function (subject was RE: [PATCH v5 3/3] ARM: OMAP2+: onenand: prepare for gpmc driver migration) Mohammed, Afzal
2012-08-17 15:02                                             ` Jon Hunter
2012-08-21 11:14                                               ` Mohammed, Afzal
2012-06-27 10:08 ` [PATCH v5 0/3] Prepare for GPMC driver conversion 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=4FECA9DD.8050505@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).