From: Roger Quadros <rogerq@ti.com>
To: Yegor Yefremov <yegorslists@googlemail.com>
Cc: Sekhar Nori <nsekhar@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Gupta, Pekon" <pekon@ti.com>
Subject: Re: am335x: system doesn't reboot after flashing NAND
Date: Wed, 4 Jun 2014 13:21:30 +0300 [thread overview]
Message-ID: <538EF32A.4000207@ti.com> (raw)
In-Reply-To: <CAGm1_kv8idiOexSBh32F=3e0OGStvszg-p_5eT0iVcopmja_Bg@mail.gmail.com>
On 06/04/2014 01:07 PM, Yegor Yefremov wrote:
> On Wed, Jun 4, 2014 at 11:49 AM, Roger Quadros <rogerq@ti.com> wrote:
>> On 06/04/2014 12:39 PM, Yegor Yefremov wrote:
>>> On Wed, Jun 4, 2014 at 10:54 AM, Sekhar Nori <nsekhar@ti.com> wrote:
>>>> On Wednesday 04 June 2014 01:55 PM, Yegor Yefremov wrote:
>>>>> On Wed, Jun 4, 2014 at 8:40 AM, Sekhar Nori <nsekhar@ti.com> wrote:
>>>>>> On Tuesday 03 June 2014 04:18 PM, Yegor Yefremov wrote:
>>>>>>> On Tue, Jun 3, 2014 at 9:57 AM, Yegor Yefremov
>>>>>>> <yegorslists@googlemail.com> wrote:
>>>>>>>> Kernel: 3.14, 3.15 (I haven't tried another kernels)
>>>>>>>>
>>>>>>>> As soon as I write something to my NAND flash (via cat image >
>>>>>>>> /dev/mtdblockx or ubiupdatevol) and make reboot or press a reset
>>>>>>>> button, I see only CCCCC and nothing happens before I make a power
>>>>>>>> cycle. Any idea?
>>>>>>>
>>>>>>> Just forgot to mention, that I was actually booting from MMC (mmc1).
>>>>>>> The boot sequence is UART0...XIP...MMC0...NAND.
>>>>>>>
>>>>>>> If I just mount ubifs partition as rootfs and change some files, I
>>>>>>> still can perform reboot and boot from MMC again. The issue seems to
>>>>>>> occur only, if I write to /dev/mtdblock directly. What can affect ROM
>>>>>>> boot so that it doesn't follow the boot sequence?
>>>>>>
>>>>>> Writing to sysboot bits in control_status register will make ROM change
>>>>>> boot sequence. Not sure why NAND driver should be changing these values.
>>>>>> Can you please verify that this register is indeed modified after the
>>>>>> NAND write?
>>>>>
>>>>> Can I read this register from userspace via debugfs? I can't find such
>>>>> entry so far.
>>>>
>>>> If not debugfs you can use devmem2[1] to read from userspace. You need
>>>> to provide physical address of the register.
>>>>
>>>>> I made another test: write to NAND and then make kexec. In this case I
>>>>> can successfully execute "reboot" afterwards.
>>>>
>>>> Okay. We need to monitor how sysboot values are changing between these
>>>> steps.
>>>
>>> devmem from busybox seems to work better. At least it delivers real
>>> values and not 0x0 as devmem2 does. Anyway the value doesn't change
>>> and looks as configured via resistors:
>>>
>>> # devmem 0x44E10040 32
>>> 0x00400304
>>>
>>> I wonder, where can I issue NAND reset from userspace? This is one of
>>> the commands the kernel does during the initialization.
>>
>> I'm not sure about external NAND chip, does it have a RESET via GPIO?
>
> No.
OK. it seems the NAND chip can only be reset via the RESET command.
e.g. from the driver.
nand_chip->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
but still it is unclear what really is the difference between
direct write to /dev/mtdblock vs filesystem write to rootfs.
does doing a sync before the reboot help? Just to make sure there are no
pending operations when the reboot happens.
cheers,
-roger
>
>> However, you can reset the whole GPMC module via the
>> GPMC_SYSCONFIG. You could try to do that in the driver .shutdown path.
>
> devmem 0x50000010 32 0x00000002
>
> doesn't help.
>
>> I'm not sure how this will help the hardreset case as hardware should reset
>> the GPMC module during a hardreset.
>>
>> Note that in the hwmod config, (mach-omap2/omap_hwmod_3xxx_data.c)
>> we set HWMOD_INIT_NO_RESET. it means that the kernel will never reset
>> the GPMC module during boot up to prevent loss of GPMC configuration
>> set up by the bootloader.
>
> O.K.
>
next prev parent reply other threads:[~2014-06-04 10:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 7:57 am335x: system doesn't reboot after flashing NAND Yegor Yefremov
2014-06-03 10:48 ` Yegor Yefremov
2014-06-04 6:40 ` Sekhar Nori
2014-06-04 8:25 ` Yegor Yefremov
2014-06-04 8:48 ` Roger Quadros
2014-06-04 9:41 ` Yegor Yefremov
2014-06-04 10:20 ` Sekhar Nori
2014-06-04 10:30 ` Yegor Yefremov
2014-06-04 10:52 ` Sekhar Nori
2014-06-04 11:49 ` Gupta, Pekon
2014-06-04 12:32 ` Yegor Yefremov
2014-06-04 19:45 ` Yegor Yefremov
2014-06-05 10:02 ` Roger Quadros
2014-06-05 10:07 ` Yegor Yefremov
2014-06-06 9:33 ` Roger Quadros
2014-06-06 9:43 ` jean-philippe francois
2014-07-02 15:45 ` Yegor Yefremov
2014-07-02 21:15 ` Yegor Yefremov
2014-07-03 10:22 ` Sekhar Nori
2014-07-03 8:00 ` Roger Quadros
2014-06-05 10:11 ` Gupta, Pekon
2014-06-05 11:17 ` Gupta, Pekon
2014-06-04 8:54 ` Sekhar Nori
2014-06-04 9:39 ` Yegor Yefremov
2014-06-04 9:49 ` Roger Quadros
2014-06-04 10:07 ` Yegor Yefremov
2014-06-04 10:21 ` Roger Quadros [this message]
2014-06-04 12:08 ` Yegor Yefremov
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=538EF32A.4000207@ti.com \
--to=rogerq@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=pekon@ti.com \
--cc=yegorslists@googlemail.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 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).