From: Huang Shijie <b32955@freescale.com>
To: Koen Beel <koen.beel.barco@gmail.com>
Cc: arnd@arndb.de, dedekind1@gmail.com,
"Wolfram Sang" <w.sang@pengutronix.de>,
"Marek Vasut" <marek.vasut@gmail.com>,
linux-mtd@lists.infradead.org,
"Shawn Guo" <shawn.guo@freescale.com>,
shijie8@gmail.com, linux-arm-kernel@lists.infradead.org,
"Lothar Waßmann" <LW@karo-electronics.de>
Subject: Re: [PATCH v8 0/3] add the GPMI controller driver for IMX23/IMX28
Date: Tue, 2 Aug 2011 16:49:06 +0800 [thread overview]
Message-ID: <4E37BA02.5030400@freescale.com> (raw)
In-Reply-To: <CAHMSPgM4K5o_aGK31yyFcGK-hH4WBeqVkA5dZU=FvAiKGmHA9A@mail.gmail.com>
Hi Koen:
I tested the driver in mx23evk board, and I do not find the DMA-timeout
error.
The following is my test environment:
[0] Hardware:
MX23EVK PCB REV C
[1] SW:
kernel:git://git.linaro.org/people/shawnguo/linux-2.6.git mxs-gpmi
.config: my_config , you can find it in my previous email.
cmdline: console=ttyAMA0,115200 root=/dev/mmcblk0p1 rw rootwait
gpmi_debug_init mtdparts=gpmi-nand:20m(boot),-(user)
[2] test shell script:
================================
echo 0x20 > /sys/module/gpmi_nand/parameters/gpmi_debug
flash_eraseall /dev/mtd1
ubiformat /dev/mtd1
flash_eraseall /dev/mtd1
ubiattach /dev/ubi_ctrl -m 1
ubimkvol /dev/ubi0 -N test -m
mount -t ubifs ubi0:test tmp
bonnie++ -d tmp -u 0 -s 2 -r 1
bonnie++ -d tmp -u 0 -s 2 -r 1
bonnie++ -d tmp -u 0 -s 2 -r 1
umount tmp
ubidetach /dev/ubi_ctrl -m 1
================================
[3] conclusion
It runs well in my mx23 board, and no DMA-TIMEOUT occur.
I think there is some conflict in your board.
BTW:
I split the MTD to 20M and (the rest size).
The flash_eraseall works well.
If i do not split the MTD, the flash_eraseall will not work.
I guest overflow occurs in some place.
Best Regards
Huang Shijie
> On Tue, Aug 2, 2011 at 8:37 AM, Huang Shijie<b32955@freescale.com> wrote:
>> Hi,
>>> Hi,
>>>
>>> Don't think it's a hardware issue. After all it is working on the
>>> mx23evk using the Freescale BSP based on 2.6.35.3.
>> I doubt the Freescale BSP has fix the conflict, while the community kernel
>> does not
>> fix it.
>> Anyway, I will do more test on the mx23 board myself.
> Strange indeed. I suspect that the BSP used another way to mark bad blocks.
>
>>
>>
>>> Now I tested using this kernel command line:
>>> mtdparts=gpmi-nand:20m(boot),-(user) gpmi_debug_init
>>> (So I removed the ubi rootfs stuff, see previous mails).
>>>
>>> Its booting fine now without complaining about dma timeouts.
>> ok.
> That's mainly because the ubi stuff is not done at startup.
>
>>> Have tried flash_eraseall /dev/mtd1. Now it's complaining and thinking
>>> all blocks are bad. So a "flash_erase: Skipping bad block at 1db00000"
>>> message for every erase block.
>>> Writing 1 to /sys/devices/platform/imx23-gpmi-nand/ignorebad, makes to
>> This is a very dangerous interface.
> I know but it solved an issue here. Now flash_eraseall seems to be
> working again without that ignorebad turned on (only finds one bad
> erase blcok).
> Again: I suspect that the BSP used another way to mark bad blocks.
>
>>> go a little further giving 'only one' error but I doubt it's working
>>> at all. See attached log file.
>>>
>>> When the trying ubiformat /dev/mtd1 its stopping with a dma timeout.
>> echo 0x20> /sys/devices/platform/imx23-gpmi-nand/gpmi_debug
>>
>> to show the GPMI register when the DMA timeout occurs.
> Don't have this sysfs interface here. I also don't see where it is
> registered in the driver code.
> Anyway I have hardcoded GPMI_DEBUG_CRAZY in gpmi_debug_setup.
>
> log file attached.
>
> Regards,
> Koen
>
>>
>> Best Regards
>> Huang Shijie
>>> Every subsequent action (e.g. using ubiformat or flash_eraseall) using
>>> that dma channel is failing.
>>> I have put a printk in mxs-dma.c around line 387:
>>>
>>> if (mxs_chan->status == DMA_IN_PROGRESS&& !append)
>>> {
>>> pr_err("dma already in progess!\n");
>>> return NULL;
>>> }
>>>
>>> I see that printk also in the log file in attach. Seems like the
>>> mxs-dma is failing at some point and for the rest of the time always
>>> keeps it's status at DMA_IN_PROGRESS
>>>
>>> Any input or feedback is welcome.
>>>
>>> Regards,
>>> Koen
>>>
>>>
>>> On Sun, Jul 31, 2011 at 3:51 PM, Marek Vasut<marek.vasut@gmail.com>
>>> wrote:
>>>> On Friday, July 29, 2011 05:00:48 PM Koen Beel wrote:
>>>>> On Fri, Jul 29, 2011 at 2:41 PM, Lothar Waßmann<LW@karo-electronics.de>
>>>> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Koen Beel writes:
>>>>>>> Hi,
>>>>>>>
>>>>>>> On Fri, Jul 29, 2011 at 9:20 AM, Lothar
>>>>>>> Waßmann<LW@karo-electronics.de>
>>>> wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Koen Beel writes:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I have test on mx23evk board. Still see the same issues.
>>>>>>>>>
>>>>>>>>> On Wed, Jul 27, 2011 at 3:53 AM, Huang Shijie<b32955@freescale.com>
>>>> wrote:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> Thanks for your test.
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> It's not really working for me.
>>>>>>>>>>> I've applied all gpmi-nand driver patches and the dma driver
>>>>>>>>>>> patches.
>>>>>>>>>>>
>>>>>>>>>>> I have added following kernel parameters:
>>>>>>>>>>> mtdparts=gpmi-nand:20m(boot),-(user) ubi.mtd=1 root=ubi0:rootfs0
>>>>>>>>>>> rootfstype=ubifs gpmi_debug_init
>>>>>>>>>>>
>>>>>>>>>>> During boot I get already get DMA timeout:
>>>>>>>>>>> [ 2.560000] [ start_dma_without_bch_irq : 392 ] DMA timeout,
>>>>>>>>>>> last DMA
>>>>>>>>>>>
>>>>>>>>>>> :1
>>>>>>>>>>>
>>>>>>>>>>> [ 3.560000] [ start_dma_with_bch_irq : 427 ] bch timeout!!!
>>>>>>>>>>> ...
>>>>>>>>>>> (see log file in attach line 89)
>>>>>>>>> I still see this DMA timeout when booting.
>>>>>>>>> What kernel parameters do you use? I still use same as above.
>>>>>>>> Do you have an SD card in the system? I'm getting the same error when
>>>>>>>> accessing an SD card. Without SD card I can use the flash without any
>>>>>>>> errors.
>>>>>>> No SD card in the system. At least not on my mx23evk board.
>>>>>>> My real target hardware has a SDIO wifi chip.
>>>>>>>
>>>>>>> Are you also testing on the mx23evk board? Really strange it is not
>>>>>>> reproducible here then.
>>>>>>> Anyone using mx23evk please give:
>>>>>>> - revision number of board (I have tested on rev C1)
>>>>>>> - kernel parameter used (see previous mail for mine)
>>>>>> It's getting ever more strange. I only have problems with concurrent
>>>>>> access to the flash and SD-card when I do file system based accessed
>>>>>> to the SD card.
>>>>>> A 'dd if=/dev/mmcblk0 of=/dev/null' while excessively using the flash
>>>>>> works well, while mounting the SD card and doing an 'ls' produces
>>>>>> immediate BCH DMA timeouts.
>>>>>>
>>>>>> Perhaps someone can make anything out of that.
>>>>> I have checked and the function dma_irq_callback is never called
>>>>> during my tests. This means the DMA transfer does not even works once.
>>>>>
>>>>> Also no clue here ...
>>>> Aren't you getting some undervolt on the powerrail for example ? btw the
>>>> driver
>>>> looks a bit crappy to me, but let's believe it works ;-)
>>>>
>>>>>> Lothar Waßmann
>>>>>> --
>>>>>> ___________________________________________________________
>>>>>>
>>>>>> Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
>>>>>> Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
>>>>>> Geschäftsführer: Matthias Kaussen
>>>>>> Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
>>>>>>
>>>>>> www.karo-electronics.de | info@karo-electronics.de
>>>>>> ___________________________________________________________
>>>>> _______________________________________________
>>>>> linux-arm-kernel mailing list
>>>>> linux-arm-kernel@lists.infradead.org
>>>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>>
WARNING: multiple messages have this Message-ID (diff)
From: b32955@freescale.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 0/3] add the GPMI controller driver for IMX23/IMX28
Date: Tue, 2 Aug 2011 16:49:06 +0800 [thread overview]
Message-ID: <4E37BA02.5030400@freescale.com> (raw)
In-Reply-To: <CAHMSPgM4K5o_aGK31yyFcGK-hH4WBeqVkA5dZU=FvAiKGmHA9A@mail.gmail.com>
Hi Koen:
I tested the driver in mx23evk board, and I do not find the DMA-timeout
error.
The following is my test environment:
[0] Hardware:
MX23EVK PCB REV C
[1] SW:
kernel:git://git.linaro.org/people/shawnguo/linux-2.6.git mxs-gpmi
.config: my_config , you can find it in my previous email.
cmdline: console=ttyAMA0,115200 root=/dev/mmcblk0p1 rw rootwait
gpmi_debug_init mtdparts=gpmi-nand:20m(boot),-(user)
[2] test shell script:
================================
echo 0x20 > /sys/module/gpmi_nand/parameters/gpmi_debug
flash_eraseall /dev/mtd1
ubiformat /dev/mtd1
flash_eraseall /dev/mtd1
ubiattach /dev/ubi_ctrl -m 1
ubimkvol /dev/ubi0 -N test -m
mount -t ubifs ubi0:test tmp
bonnie++ -d tmp -u 0 -s 2 -r 1
bonnie++ -d tmp -u 0 -s 2 -r 1
bonnie++ -d tmp -u 0 -s 2 -r 1
umount tmp
ubidetach /dev/ubi_ctrl -m 1
================================
[3] conclusion
It runs well in my mx23 board, and no DMA-TIMEOUT occur.
I think there is some conflict in your board.
BTW:
I split the MTD to 20M and (the rest size).
The flash_eraseall works well.
If i do not split the MTD, the flash_eraseall will not work.
I guest overflow occurs in some place.
Best Regards
Huang Shijie
> On Tue, Aug 2, 2011 at 8:37 AM, Huang Shijie<b32955@freescale.com> wrote:
>> Hi,
>>> Hi,
>>>
>>> Don't think it's a hardware issue. After all it is working on the
>>> mx23evk using the Freescale BSP based on 2.6.35.3.
>> I doubt the Freescale BSP has fix the conflict, while the community kernel
>> does not
>> fix it.
>> Anyway, I will do more test on the mx23 board myself.
> Strange indeed. I suspect that the BSP used another way to mark bad blocks.
>
>>
>>
>>> Now I tested using this kernel command line:
>>> mtdparts=gpmi-nand:20m(boot),-(user) gpmi_debug_init
>>> (So I removed the ubi rootfs stuff, see previous mails).
>>>
>>> Its booting fine now without complaining about dma timeouts.
>> ok.
> That's mainly because the ubi stuff is not done at startup.
>
>>> Have tried flash_eraseall /dev/mtd1. Now it's complaining and thinking
>>> all blocks are bad. So a "flash_erase: Skipping bad block at 1db00000"
>>> message for every erase block.
>>> Writing 1 to /sys/devices/platform/imx23-gpmi-nand/ignorebad, makes to
>> This is a very dangerous interface.
> I know but it solved an issue here. Now flash_eraseall seems to be
> working again without that ignorebad turned on (only finds one bad
> erase blcok).
> Again: I suspect that the BSP used another way to mark bad blocks.
>
>>> go a little further giving 'only one' error but I doubt it's working
>>> at all. See attached log file.
>>>
>>> When the trying ubiformat /dev/mtd1 its stopping with a dma timeout.
>> echo 0x20> /sys/devices/platform/imx23-gpmi-nand/gpmi_debug
>>
>> to show the GPMI register when the DMA timeout occurs.
> Don't have this sysfs interface here. I also don't see where it is
> registered in the driver code.
> Anyway I have hardcoded GPMI_DEBUG_CRAZY in gpmi_debug_setup.
>
> log file attached.
>
> Regards,
> Koen
>
>>
>> Best Regards
>> Huang Shijie
>>> Every subsequent action (e.g. using ubiformat or flash_eraseall) using
>>> that dma channel is failing.
>>> I have put a printk in mxs-dma.c around line 387:
>>>
>>> if (mxs_chan->status == DMA_IN_PROGRESS&& !append)
>>> {
>>> pr_err("dma already in progess!\n");
>>> return NULL;
>>> }
>>>
>>> I see that printk also in the log file in attach. Seems like the
>>> mxs-dma is failing at some point and for the rest of the time always
>>> keeps it's status at DMA_IN_PROGRESS
>>>
>>> Any input or feedback is welcome.
>>>
>>> Regards,
>>> Koen
>>>
>>>
>>> On Sun, Jul 31, 2011 at 3:51 PM, Marek Vasut<marek.vasut@gmail.com>
>>> wrote:
>>>> On Friday, July 29, 2011 05:00:48 PM Koen Beel wrote:
>>>>> On Fri, Jul 29, 2011 at 2:41 PM, Lothar Wa?mann<LW@karo-electronics.de>
>>>> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Koen Beel writes:
>>>>>>> Hi,
>>>>>>>
>>>>>>> On Fri, Jul 29, 2011 at 9:20 AM, Lothar
>>>>>>> Wa?mann<LW@karo-electronics.de>
>>>> wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Koen Beel writes:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I have test on mx23evk board. Still see the same issues.
>>>>>>>>>
>>>>>>>>> On Wed, Jul 27, 2011 at 3:53 AM, Huang Shijie<b32955@freescale.com>
>>>> wrote:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> Thanks for your test.
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> It's not really working for me.
>>>>>>>>>>> I've applied all gpmi-nand driver patches and the dma driver
>>>>>>>>>>> patches.
>>>>>>>>>>>
>>>>>>>>>>> I have added following kernel parameters:
>>>>>>>>>>> mtdparts=gpmi-nand:20m(boot),-(user) ubi.mtd=1 root=ubi0:rootfs0
>>>>>>>>>>> rootfstype=ubifs gpmi_debug_init
>>>>>>>>>>>
>>>>>>>>>>> During boot I get already get DMA timeout:
>>>>>>>>>>> [ 2.560000] [ start_dma_without_bch_irq : 392 ] DMA timeout,
>>>>>>>>>>> last DMA
>>>>>>>>>>>
>>>>>>>>>>> :1
>>>>>>>>>>>
>>>>>>>>>>> [ 3.560000] [ start_dma_with_bch_irq : 427 ] bch timeout!!!
>>>>>>>>>>> ...
>>>>>>>>>>> (see log file in attach line 89)
>>>>>>>>> I still see this DMA timeout when booting.
>>>>>>>>> What kernel parameters do you use? I still use same as above.
>>>>>>>> Do you have an SD card in the system? I'm getting the same error when
>>>>>>>> accessing an SD card. Without SD card I can use the flash without any
>>>>>>>> errors.
>>>>>>> No SD card in the system. At least not on my mx23evk board.
>>>>>>> My real target hardware has a SDIO wifi chip.
>>>>>>>
>>>>>>> Are you also testing on the mx23evk board? Really strange it is not
>>>>>>> reproducible here then.
>>>>>>> Anyone using mx23evk please give:
>>>>>>> - revision number of board (I have tested on rev C1)
>>>>>>> - kernel parameter used (see previous mail for mine)
>>>>>> It's getting ever more strange. I only have problems with concurrent
>>>>>> access to the flash and SD-card when I do file system based accessed
>>>>>> to the SD card.
>>>>>> A 'dd if=/dev/mmcblk0 of=/dev/null' while excessively using the flash
>>>>>> works well, while mounting the SD card and doing an 'ls' produces
>>>>>> immediate BCH DMA timeouts.
>>>>>>
>>>>>> Perhaps someone can make anything out of that.
>>>>> I have checked and the function dma_irq_callback is never called
>>>>> during my tests. This means the DMA transfer does not even works once.
>>>>>
>>>>> Also no clue here ...
>>>> Aren't you getting some undervolt on the powerrail for example ? btw the
>>>> driver
>>>> looks a bit crappy to me, but let's believe it works ;-)
>>>>
>>>>>> Lothar Wa?mann
>>>>>> --
>>>>>> ___________________________________________________________
>>>>>>
>>>>>> Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
>>>>>> Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
>>>>>> Gesch?ftsf?hrer: Matthias Kaussen
>>>>>> Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
>>>>>>
>>>>>> www.karo-electronics.de | info at karo-electronics.de
>>>>>> ___________________________________________________________
>>>>> _______________________________________________
>>>>> linux-arm-kernel mailing list
>>>>> linux-arm-kernel at lists.infradead.org
>>>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>>
next prev parent reply other threads:[~2011-08-02 8:49 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-21 6:47 [PATCH v8 0/3] add the GPMI controller driver for IMX23/IMX28 Huang Shijie
2011-07-21 6:47 ` Huang Shijie
2011-07-21 6:47 ` [PATCH v8 1/3] MTD : add the common code for GPMI-NAND controller driver Huang Shijie
2011-07-21 6:47 ` Huang Shijie
2011-07-21 6:47 ` [PATCH v8 2/3] MTD : add helper functions library and header files for GPMI NAND driver Huang Shijie
2011-07-21 6:47 ` Huang Shijie
2011-07-21 6:47 ` [PATCH v8 3/3] MTD : add GPMI-NAND driver in the config and Makefile Huang Shijie
2011-07-21 6:47 ` Huang Shijie
2011-07-21 21:50 ` [PATCH v8 0/3] add the GPMI controller driver for IMX23/IMX28 Wolfram Sang
2011-07-21 21:50 ` Wolfram Sang
2011-07-22 3:30 ` Huang Shijie
2011-07-22 3:30 ` Huang Shijie
2011-07-22 5:57 ` Shawn Guo
2011-07-22 5:57 ` Shawn Guo
2011-07-22 8:07 ` Huang Shijie
2011-07-22 8:07 ` Huang Shijie
2011-07-26 14:29 ` Koen Beel
2011-07-26 14:29 ` Koen Beel
2011-07-27 1:53 ` Huang Shijie
2011-07-27 1:53 ` Huang Shijie
2011-07-28 9:38 ` Koen Beel
2011-07-28 9:38 ` Koen Beel
2011-07-29 7:20 ` Lothar Waßmann
2011-07-29 7:20 ` Lothar Waßmann
2011-07-29 7:40 ` Koen Beel
2011-07-29 7:40 ` Koen Beel
2011-07-29 7:49 ` Lothar Waßmann
2011-07-29 7:49 ` Lothar Waßmann
2011-07-29 9:49 ` Huang Shijie
2011-07-29 9:49 ` Huang Shijie
2011-07-29 11:48 ` Koen Beel
2011-07-29 11:48 ` Koen Beel
2011-08-02 6:19 ` Huang Shijie
2011-08-02 6:19 ` Huang Shijie
2011-08-02 7:16 ` Shawn Guo
2011-08-02 7:16 ` Shawn Guo
2011-08-02 8:11 ` Shawn Guo
2011-08-02 8:11 ` Shawn Guo
2011-08-02 8:12 ` Shawn Guo
2011-08-02 8:12 ` Shawn Guo
2011-08-02 8:22 ` Huang Shijie
2011-08-02 8:22 ` Huang Shijie
2011-07-29 12:41 ` Lothar Waßmann
2011-07-29 12:41 ` Lothar Waßmann
2011-07-29 15:00 ` Koen Beel
2011-07-29 15:00 ` Koen Beel
2011-07-31 13:51 ` Marek Vasut
2011-07-31 13:51 ` Marek Vasut
2011-08-01 15:14 ` Koen Beel
2011-08-01 15:14 ` Koen Beel
2011-08-02 6:37 ` Huang Shijie
2011-08-02 6:37 ` Huang Shijie
2011-08-02 7:33 ` Koen Beel
2011-08-02 7:33 ` Koen Beel
2011-08-02 7:44 ` Huang Shijie
2011-08-02 7:44 ` Huang Shijie
2011-08-02 8:55 ` Koen Beel
2011-08-02 8:55 ` Koen Beel
2011-08-02 8:49 ` Huang Shijie [this message]
2011-08-02 8:49 ` Huang Shijie
2011-08-02 9:29 ` Koen Beel
2011-08-02 9:29 ` Koen Beel
2011-08-02 10:37 ` Huang Shijie
2011-08-02 10:37 ` Huang Shijie
2011-08-02 12:32 ` Koen Beel
2011-08-02 12:32 ` Koen Beel
2011-08-02 6:21 ` Huang Shijie
2011-08-02 6:21 ` Huang Shijie
2011-08-03 10:37 ` Wolfram Sang
2011-08-03 10:37 ` Wolfram Sang
2011-08-03 12:00 ` Koen Beel
2011-08-03 12:00 ` Koen Beel
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=4E37BA02.5030400@freescale.com \
--to=b32955@freescale.com \
--cc=LW@karo-electronics.de \
--cc=arnd@arndb.de \
--cc=dedekind1@gmail.com \
--cc=koen.beel.barco@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=shawn.guo@freescale.com \
--cc=shijie8@gmail.com \
--cc=w.sang@pengutronix.de \
/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.