All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksij Rempel <ore@pengutronix.de>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Sascha Hauer <kernel@pengutronix.de>
Subject: Re: nand: denali: issue with 4.13
Date: Tue, 26 Sep 2017 11:36:40 +0200	[thread overview]
Message-ID: <1ef95752-f9eb-14f3-e131-825fb7ffce25@pengutronix.de> (raw)
In-Reply-To: <CAK7LNARgSZkah=NO2CyiynrxjdBue2pGjkhv=rPqYr1-VKFp3Q@mail.gmail.com>

Hi,

On 23.09.2017 19:46, Masahiro Yamada wrote:
> 2017-09-22 16:34 GMT+09:00 Oleksij Rempel <ore@pengutronix.de>:
>> Hi,
>>
>> On Thu, Sep 21, 2017 at 08:00:34PM +0900, Masahiro Yamada wrote:
>>> Hi.
>>>
>>> 2017-09-21 15:44 GMT+09:00 Oleksij Rempel <ore@pengutronix.de>:
>>>> Hi Masahiro,
>>>>
>>>> you are probably the expert of denali nand driver.
>>>> With kernel v4.13 i have following issue, it works on FPGASoC 5CSEBA5U...
>>>> but is now working on FPGASoC 5CSXFC6C6U... both of them have same NAND
>>>> chip, and seems to have similar IP core.
>>>>
>>>> FPGASoC 5CSXFC6C6U...:
>>>> ====================================================================
>>>> [    0.095899] console [ttyS0] disabled
>>>> [    0.095941] ffc02000.serial0: ttyS0 at MMIO 0xffc02000 (irq = 38,
>>>> base_baud = 6250000) is a 16550A
>>>> [    0.702041] console [ttyS0] enabled
>>>> [    0.706986] brd: module loaded
>>>> [    0.716232] loop: module loaded
>>>> [    0.720074] nand: device found, Manufacturer ID: 0x00, Chip ID: 0x2c
>>>
>>>
>>> This line is strange.  It failed to read Manufacturer ID.
>>> The 0x2c should be Manufacturer ID, not Chip ID.
>>>
>>>
>>> I am guessing we need to wait a bit
>>> after the NAND_CMD_READID.
>>>
>>> Please try the following ugly patch.
>>
>> Suddenly this patch makes no difference.
> 
> 
> 
> Does the following make difference?
> 
> 
> @@ -3876,6 +3876,8 @@ static int nand_detect(struct nand_chip *chip,
> struct nand_flash_dev *type)
>          /* Select the device */
>          chip->select_chip(mtd, 0);
> 
> +       udelay(1);
> +
>          /* Send the command for reading device ID */
>          chip->cmdfunc(mtd, NAND_CMD_READID, 0x00, -1);

We did more tests, so now i can confirm that issue was caused but not 
properly configured clock for NAND controller.
After fixing the configuration provided with altera handoff files for 
bootloader, the NAND on Altera 5CSXFC6C6U seems to work properly with 
mainline kernel v4.13.

Masahiro Yamada, thank you for work and time! :)

Regards,
Oleksij

      parent reply	other threads:[~2017-09-26  9:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21  6:44 nand: denali: issue with 4.13 Oleksij Rempel
2017-09-21 11:00 ` Masahiro Yamada
2017-09-22  7:34   ` Oleksij Rempel
2017-09-23 17:46     ` Masahiro Yamada
2017-09-25 10:22       ` Oleksij Rempel
2017-09-26  9:36       ` Oleksij Rempel [this message]

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=1ef95752-f9eb-14f3-e131-825fb7ffce25@pengutronix.de \
    --to=ore@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=yamada.masahiro@socionext.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.