From: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
To: Han Xu <han.xu@nxp.com>, Boris Brezillon <boris.brezillon@bootlin.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: GPMI IMX6ull timeout on dma
Date: Thu, 4 Oct 2018 16:36:20 +0200 [thread overview]
Message-ID: <CAOf5uwmZkjF1Xp8vekBYnuBZZJhYk+n+=K7QW_8MAJJ6gw5xWw@mail.gmail.com> (raw)
In-Reply-To: <CAOf5uwku9Nx5-5h77yCtYwNxKHfZSfD+Dk3Fe41Ry45Lf+MdNw@mail.gmail.com>
Hi
I add now this code but nand seems incosistent
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
index c2597c8107a0..b1598dc5013f 100644
--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
@@ -466,11 +466,9 @@ void prepare_data_dma(struct gpmi_nand_data
*this, enum dma_data_direction dr)
this->direct_dma_map_ok = false;
}
-/* This will be called after the DMA operation is finished. */
-static void dma_irq_callback(void *param)
+static void dma_unmap_request(void *param)
{
struct gpmi_nand_data *this = param;
- struct completion *dma_c = &this->dma_done;
switch (this->dma_type) {
case DMA_FOR_COMMAND:
@@ -492,11 +490,18 @@ static void dma_irq_callback(void *param)
case DMA_FOR_WRITE_ECC_PAGE:
/* We have to wait the BCH interrupt to finish. */
break;
-
default:
dev_err(this->dev, "in wrong DMA operation.\n");
}
+}
+
+/* This will be called after the DMA operation is finished. */
+static void dma_irq_callback(void *param)
+{
+ struct gpmi_nand_data *this = param;
+ struct completion *dma_c = &this->dma_done;
+ dma_unmap_request(param);
complete(dma_c);
}
Michael
On Tue, Oct 2, 2018 at 3:22 PM Michael Nazzareno Trimarchi
<michael@amarulasolutions.com> wrote:
>
> Hi all
>
> I have a strange problem on booting an imx6ull system. The problem is
> not systematic and seems that it depends on how bootloader is using
> the nand on first stage boot. BTW kernel can not always pass to go to
> edo time 5 (even 4). If I power off and power on the unit the nand
> work properly.
>
> [ 0.000000] Booting Linux on physical CPU 0x0
> [ 0.000000] Linux version 4.17.0-rc1 (michael@panicking) (gcc
> version 6.4.0 (Buildroot 2018.02-rc2-00006-g39101b7)) #2 SMP Tue Oct 2
> 08:24:58 CEST 2018
>
> [ 1.612357] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
> [ 1.618905] nand: Micron MT29F2G08ABAEAH4
> [ 1.623126] nand: 256 MiB, SLC, erase size: 128 KiB, page size:
> 2048, OOB size: 64
> [ 2.651940] gpmi-nand 1806000.gpmi-nand: DMA timeout, last DMA :2
> [ 2.658146] gpmi-nand 1806000.gpmi-nand: Show GPMI registers :
> [ 2.664203] gpmi-nand 1806000.gpmi-nand: offset 0x000 : 0x20830002
> [ 2.670474] gpmi-nand 1806000.gpmi-nand: offset 0x010 : 0x00000000
> [ 2.676849] gpmi-nand 1806000.gpmi-nand: offset 0x020 : 0x00000000
> [ 2.683217] gpmi-nand 1806000.gpmi-nand: offset 0x030 : 0x00000000
> [ 2.689482] gpmi-nand 1806000.gpmi-nand: offset 0x040 : 0x00000000
> [ 2.695840] gpmi-nand 1806000.gpmi-nand: offset 0x050 : 0x00000000
> [ 2.702202] gpmi-nand 1806000.gpmi-nand: offset 0x060 : 0x01c6800c
> [ 2.708470] gpmi-nand 1806000.gpmi-nand: offset 0x070 : 0x00010101
> [ 2.714826] gpmi-nand 1806000.gpmi-nand: offset 0x080 : 0xe0000000
> [ 2.721093] gpmi-nand 1806000.gpmi-nand: offset 0x090 : 0x23023336
> [ 2.727450] gpmi-nand 1806000.gpmi-nand: offset 0x0a0 : 0x000001ee
> [ 2.733812] gpmi-nand 1806000.gpmi-nand: offset 0x0b0 : 0xff000001
> [ 2.740078] gpmi-nand 1806000.gpmi-nand: offset 0x0c0 : 0x00000000
> [ 2.746437] gpmi-nand 1806000.gpmi-nand: offset 0x0d0 : 0x05020000
> [ 2.752794] gpmi-nand 1806000.gpmi-nand: Show BCH registers :
> [ 2.758626] gpmi-nand 1806000.gpmi-nand: offset 0x000 : 0x00000100
> [ 2.764982] gpmi-nand 1806000.gpmi-nand: offset 0x010 : 0x00000010
> [ 2.771247] gpmi-nand 1806000.gpmi-nand: offset 0x020 : 0x00000000
> [ 2.777604] gpmi-nand 1806000.gpmi-nand: offset 0x030 : 0x00000000
> [ 2.783961] gpmi-nand 1806000.gpmi-nand: offset 0x040 : 0x00000000
> [ 2.790226] gpmi-nand 1806000.gpmi-nand: offset 0x050 : 0x00000000
> [ 2.796582] gpmi-nand 1806000.gpmi-nand: offset 0x060 : 0x00000000
> [ 2.802942] gpmi-nand 1806000.gpmi-nand: offset 0x070 : 0x00000000
> [ 2.809208] gpmi-nand 1806000.gpmi-nand: offset 0x080 : 0x030a2080
> [ 2.815564] gpmi-nand 1806000.gpmi-nand: offset 0x090 : 0x083e2080
> [ 2.821924] gpmi-nand 1806000.gpmi-nand: offset 0x0a0 : 0x070a4080
> [ 2.828191] gpmi-nand 1806000.gpmi-nand: offset 0x0b0 : 0x10da4080
> [ 2.834546] gpmi-nand 1806000.gpmi-nand: offset 0x0c0 : 0x070a4080
> [ 2.840813] gpmi-nand 1806000.gpmi-nand: offset 0x0d0 : 0x10da4080
> [ 2.847170] gpmi-nand 1806000.gpmi-nand: offset 0x0e0 : 0x070a4080
> [ 2.853527] gpmi-nand 1806000.gpmi-nand: offset 0x0f0 : 0x10da4080
> [ 2.859794] gpmi-nand 1806000.gpmi-nand: offset 0x100 : 0x00000000
> [ 2.866153] gpmi-nand 1806000.gpmi-nand: offset 0x110 : 0x00000000
> [ 2.872513] gpmi-nand 1806000.gpmi-nand: offset 0x120 : 0x00000000
> [ 2.878779] gpmi-nand 1806000.gpmi-nand: offset 0x130 : 0x00000000
> [ 2.885135] gpmi-nand 1806000.gpmi-nand: offset 0x140 : 0x00000000
> [ 2.891401] gpmi-nand 1806000.gpmi-nand: offset 0x150 : 0x20484342
> [ 2.897759] gpmi-nand 1806000.gpmi-nand: offset 0x160 : 0x01000000
> [ 2.904117] gpmi-nand 1806000.gpmi-nand: offset 0x170 : 0x00000000
> [ 2.910400] gpmi-nand 1806000.gpmi-nand: BCH Geometry :
> [ 2.910400] GF length : 13
> [ 2.910400] ECC Strength : 8
> [ 2.910400] Page Size in Bytes : 2110
> [ 2.910400] Metadata Size in Bytes : 10
> [ 2.910400] ECC Chunk Size in Bytes: 512
> [ 2.910400] ECC Chunk Count : 4
> [ 2.910400] Payload Size in Bytes : 2048
> [ 2.910400] Auxiliary Size in Bytes: 16
> [ 2.910400] Auxiliary Status Offset: 12
> [ 2.910400] Block Mark Byte Offset : 1999
> [ 2.910400] Block Mark Bit Offset : 0
> [ 2.958231] gpmi-nand 1806000.gpmi-nand: Chip: 0, Error -110
>
> What bootloader do is just attach the ubi and then boot the image
>
> ubi0: attaching mtd1
> ubi0: scanning is finished
> ubi0: attached mtd1 (name "mtd=5", size 231 MiB)
> ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
> ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
> ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
> ubi0: good PEBs: 1844, bad PEBs: 4, corrupted PEBs: 0
> ubi0: user volume: 4, internal volumes: 1, max. volumes count: 128
> ubi0: max/mean erase counter: 4/2, WL threshold: 4096, image sequence number: 0
> ubi0: available PEBs: 2, total reserved PEBs: 1842, PEBs reserved for
> bad PEB handling: 36
> Read 0 bytes from volume kernel to 82800000
> No size specified -> Using max size (16887808)
> ## Loading kernel from FIT Image at 82800000 ...
> Using 'conf@2' configuration
> Verifying Hash Integrity ... OK
> Trying 'kernel@1' kernel subimage
> Description: kernel
> Type: Kernel Image
> Compression: uncompressed
> Data Start: 0x828000ac
> Data Size: 6685920 Bytes = 6.4 MiB
> Architecture: ARM
> OS: Linux
> Load Address: 0x80008000
> Entry Point: 0x80008000
> Hash algo: sha1
> Hash value: 4646b0eea535d8ea9e2f7167bdeedc7668b2a948
> Verifying Hash Integrity ... sha1+ OK
> ## Loading fdt from FIT Image at 82800000 ...
> Using 'conf@2' configuration
> Trying 'fdt@2' fdt subimage
> Description: imx6ull-bammi.dtb
> Type: Flat Device Tree
> Compression: uncompressed
> Data Start: 0x82e67730
> Data Size: 28667 Bytes = 28 KiB
> Architecture: ARM
> Hash algo: sha1
> Hash value: 1cf147576a30eb901a6306172f9385d6a6b65753
> Verifying Hash Integrity ... sha1+ OK
> Booting using the fdt blob at 0x82e67730
> Loading Kernel Image ... OK
> Using Device Tree in place at 82e67730, end 82e7172a
> Using Device Tree in place at 82e67730, end 82e7472a
>
> Any idea?
>
> Michael
--
| Michael Nazzareno Trimarchi Amarula Solutions BV |
| COO - Founder Cruquiuskade 47 |
| +31(0)851119172 Amsterdam 1018 AM NL |
| [`as] http://www.amarulasolutions.com |
next prev parent reply other threads:[~2018-10-04 14:36 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 13:22 GPMI IMX6ull timeout on dma Michael Nazzareno Trimarchi
2018-10-04 14:36 ` Michael Nazzareno Trimarchi [this message]
2018-10-05 10:32 ` FIX " Michael Nazzareno Trimarchi
2018-10-29 9:40 ` Miquel Raynal
2018-10-29 9:43 ` Michael Nazzareno Trimarchi
2018-10-29 9:53 ` Miquel Raynal
2021-01-27 17:01 ` Michael Nazzareno Trimarchi
2021-01-27 19:12 ` Miquel Raynal
2021-01-27 19:43 ` Michael Nazzareno Trimarchi
2021-01-27 19:50 ` Miquel Raynal
2019-07-29 6:41 GPMI iMX6ull timeout on DMA Greg Ungerer
2019-07-29 8:36 ` Miquel Raynal
2019-07-29 8:42 ` Michael Nazzareno Trimarchi
2019-07-29 12:18 ` Greg Ungerer
2019-07-29 12:20 ` Michael Nazzareno Trimarchi
2019-07-29 12:33 ` Greg Ungerer
2019-07-29 12:47 ` Miquel Raynal
2019-07-29 12:49 ` Michael Nazzareno Trimarchi
2019-07-29 12:55 ` Miquel Raynal
2019-07-29 13:00 ` Michael Nazzareno Trimarchi
2019-07-29 13:22 ` Miquel Raynal
2019-07-29 20:00 ` Michael Nazzareno Trimarchi
2019-07-29 21:02 ` Miquel Raynal
2019-07-30 0:28 ` Greg Ungerer
2019-07-30 0:41 ` Greg Ungerer
2019-07-30 6:06 ` Greg Ungerer
2019-07-30 8:38 ` Miquel Raynal
2019-07-30 8:58 ` Boris Brezillon
2019-07-31 2:05 ` Greg Ungerer
2019-07-31 6:28 ` Boris Brezillon
2019-08-02 7:19 ` Greg Ungerer
2019-08-02 12:34 ` Greg Ungerer
2019-08-02 12:51 ` Boris Brezillon
2019-08-05 5:51 ` Greg Ungerer
2019-08-07 16:05 ` Miquel Raynal
2019-08-08 0:43 ` Greg Ungerer
2019-08-08 16:36 ` Boris Brezillon
2019-08-09 5:20 ` Greg Ungerer
2019-08-09 6:23 ` Boris Brezillon
2019-08-09 6:55 ` Greg Ungerer
2019-08-09 7:32 ` Boris Brezillon
2019-08-09 13:57 ` Greg Ungerer
2019-08-09 13:59 ` Boris Brezillon
2019-08-12 2:50 ` Greg Ungerer
2019-08-12 4:04 ` Greg Ungerer
2019-08-12 7:31 ` Boris Brezillon
2019-08-13 0:50 ` Greg Ungerer
2021-01-28 9:45 ` Michael Nazzareno Trimarchi
2021-01-28 10:26 ` Miquel Raynal
2021-01-28 10:35 ` Michael Nazzareno Trimarchi
2021-01-28 11:55 ` Michael Nazzareno Trimarchi
2021-01-29 12:43 ` Greg Ungerer
2021-01-30 9:41 ` Michael Nazzareno Trimarchi
2021-02-01 14:13 ` Miquel Raynal
2021-02-01 14:32 ` Michael Nazzareno Trimarchi
2021-02-01 15:08 ` Michael Nazzareno Trimarchi
2021-02-01 15:14 ` Miquel Raynal
2021-02-01 15:17 ` Michael Nazzareno Trimarchi
2021-10-15 20:05 ` Michael Trimarchi
2021-10-15 20:12 ` Michael Nazzareno Trimarchi
2021-10-18 7:19 ` Miquel Raynal
2021-10-18 7:33 ` Michael Nazzareno Trimarchi
2021-10-18 7:43 ` Miquel Raynal
2021-10-04 5:54 ` Christian Eggers
2021-10-04 6:27 ` Michael Nazzareno Trimarchi
2021-10-04 15:33 ` Miquel Raynal
2021-10-04 16:06 ` Han Xu
2021-10-05 6:02 ` Christian Eggers
2021-10-08 9:55 ` Christian Eggers
2021-10-08 12:08 ` Stefan Riedmüller
2021-10-08 12:27 ` Miquel Raynal
2021-10-08 13:11 ` Christian Eggers
2021-10-08 13:29 ` Miquel Raynal
2021-10-08 13:36 ` Miquel Raynal
2021-10-08 13:49 ` Christian Eggers
2021-10-08 16:07 ` Miquel Raynal
2021-10-09 5:53 ` Michael Nazzareno Trimarchi
2021-10-11 6:46 ` Miquel Raynal
2021-10-09 6:26 ` Christian Eggers
2021-10-13 6:15 ` Christian Eggers
2021-10-08 13:13 ` Christian Eggers
2021-10-08 13:30 ` Miquel Raynal
2021-10-09 6:33 ` Christian Eggers
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='CAOf5uwmZkjF1Xp8vekBYnuBZZJhYk+n+=K7QW_8MAJJ6gw5xWw@mail.gmail.com' \
--to=michael@amarulasolutions.com \
--cc=boris.brezillon@bootlin.com \
--cc=han.xu@nxp.com \
--cc=linux-mtd@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).