public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] MXS NAND: DMA read error
@ 2012-04-17  8:07 Lauri Hintsala
  2012-04-17  8:17 ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Lauri Hintsala @ 2012-04-17  8:07 UTC (permalink / raw)
  To: u-boot

Hello,

I'm trying to compile latest U-Boot to mx28evk (rev D) with NAND 
support. U-Boot boots up but NAND chip is not detected and DMA read 
error is popped up.


Here is console output:

U-Boot 2012.04-rc2-dirty (Apr 17 2012 - 10:58:50)

Freescale i.MX28 family at 454 MHz
DRAM:  128 MiB
NAND:  MXS NAND: DMA read error (-110)
MXS NAND: DMA read error (-110)
MXS NAND: Error sending command
MXS NAND: DMA read error (-110)
MXS NAND: DMA read error (-110)
MXS NAND: Error sending command
MXS NAND: DMA read error (-110)
MXS NAND: DMA read error (-110)
MXS NAND: DMA read error (-110)
MXS NAND: DMA read error (-110)
MXS NAND: DMA read error (-110)
MXS NAND: DMA read error (-110)
MXS NAND: DMA read error (-110)
MXS NAND: DMA read error (-110)
No NAND device found!!!
0 MiB


I did following changes to mainline code. Did I forget something?

diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
index 9c95811..93e54da 100644
--- a/drivers/mtd/nand/mxs_nand.c
+++ b/drivers/mtd/nand/mxs_nand.c
@@ -465,7 +465,7 @@ static void mxs_nand_read_buf(struct mtd_info *mtd, 
uint8_t *buf, int length)
  	/* Execute the DMA chain. */
  	ret = mxs_dma_go(channel);
  	if (ret) {
-		printf("MXS NAND: DMA read error\n");
+		printf("MXS NAND: DMA read error (%d)\n", ret);
  		goto rtn;
  	}

diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 02f3366..a0bd2db 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -148,6 +148,15 @@
  #endif

  /*
+ * NAND
+ */
+#define CONFIG_CMD_NAND
+#define CONFIG_NAND_MXS
+#define CONFIG_SYS_MAX_NAND_DEVICE	1
+#define CONFIG_SYS_NAND_BASE		0x60000000
+#define CONFIG_SYS_NAND_5_ADDR_CYCLE
+
+/*
   * Ethernet on SOC (FEC)
   */
  #ifdef	CONFIG_CMD_NET


BR,
Lauri Hintsala

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] MXS NAND: DMA read error
  2012-04-17  8:07 [U-Boot] MXS NAND: DMA read error Lauri Hintsala
@ 2012-04-17  8:17 ` Marek Vasut
  2012-04-17  8:23   ` Lauri Hintsala
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2012-04-17  8:17 UTC (permalink / raw)
  To: u-boot

Dear Lauri Hintsala,

> Hello,
> 
> I'm trying to compile latest U-Boot to mx28evk (rev D) with NAND
> support. U-Boot boots up but NAND chip is not detected and DMA read
> error is popped up.

MX28 EVK has no NAND, right?

Otherwise, check if you have APBH DMA enabled in your include/configs/mx28evk.h

btw Fabio, can you please ping me on jabber?

> Here is console output:
> 
> U-Boot 2012.04-rc2-dirty (Apr 17 2012 - 10:58:50)
> 
> Freescale i.MX28 family at 454 MHz
> DRAM:  128 MiB
> NAND:  MXS NAND: DMA read error (-110)
> MXS NAND: DMA read error (-110)
> MXS NAND: Error sending command
> MXS NAND: DMA read error (-110)
> MXS NAND: DMA read error (-110)
> MXS NAND: Error sending command
> MXS NAND: DMA read error (-110)
> MXS NAND: DMA read error (-110)
> MXS NAND: DMA read error (-110)
> MXS NAND: DMA read error (-110)
> MXS NAND: DMA read error (-110)
> MXS NAND: DMA read error (-110)
> MXS NAND: DMA read error (-110)
> MXS NAND: DMA read error (-110)
> No NAND device found!!!
> 0 MiB
> 
> 
> I did following changes to mainline code. Did I forget something?
> 
> diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
> index 9c95811..93e54da 100644
> --- a/drivers/mtd/nand/mxs_nand.c
> +++ b/drivers/mtd/nand/mxs_nand.c
> @@ -465,7 +465,7 @@ static void mxs_nand_read_buf(struct mtd_info *mtd,
> uint8_t *buf, int length)
>   	/* Execute the DMA chain. */
>   	ret = mxs_dma_go(channel);
>   	if (ret) {
> -		printf("MXS NAND: DMA read error\n");
> +		printf("MXS NAND: DMA read error (%d)\n", ret);
>   		goto rtn;
>   	}
> 
> diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
> index 02f3366..a0bd2db 100644
> --- a/include/configs/mx28evk.h
> +++ b/include/configs/mx28evk.h
> @@ -148,6 +148,15 @@
>   #endif
> 
>   /*
> + * NAND
> + */
> +#define CONFIG_CMD_NAND
> +#define CONFIG_NAND_MXS
> +#define CONFIG_SYS_MAX_NAND_DEVICE	1
> +#define CONFIG_SYS_NAND_BASE		0x60000000
> +#define CONFIG_SYS_NAND_5_ADDR_CYCLE
> +
> +/*
>    * Ethernet on SOC (FEC)
>    */
>   #ifdef	CONFIG_CMD_NET
> 
> 
> BR,
> Lauri Hintsala

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MXS NAND: DMA read error
  2012-04-17  8:17 ` Marek Vasut
@ 2012-04-17  8:23   ` Lauri Hintsala
  2012-04-17  8:29     ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Lauri Hintsala @ 2012-04-17  8:23 UTC (permalink / raw)
  To: u-boot

Hi Marek,

On 04/17/2012 11:17 AM, Marek Vasut wrote:
>> I'm trying to compile latest U-Boot to mx28evk (rev D) with NAND
>> support. U-Boot boots up but NAND chip is not detected and DMA read
>> error is popped up.
>
> MX28 EVK has no NAND, right?

MX28 EVK has NAND slot and I have installed NAND chip on it. I'm using 
same chip with older pached U-Boot and Linux and chip is working fine 
with them.


> Otherwise, check if you have APBH DMA enabled in your include/configs/mx28evk.h

Config file include/configs/mx28evk.h has following line.

#define CONFIG_APBH_DMA


BR,
Lauri

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MXS NAND: DMA read error
  2012-04-17  8:23   ` Lauri Hintsala
@ 2012-04-17  8:29     ` Marek Vasut
  2012-04-17  8:38       ` Lauri Hintsala
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2012-04-17  8:29 UTC (permalink / raw)
  To: u-boot

Dear Lauri Hintsala,

> Hi Marek,
> 
> On 04/17/2012 11:17 AM, Marek Vasut wrote:
> >> I'm trying to compile latest U-Boot to mx28evk (rev D) with NAND
> >> support. U-Boot boots up but NAND chip is not detected and DMA read
> >> error is popped up.
> > 
> > MX28 EVK has no NAND, right?
> 
> MX28 EVK has NAND slot and I have installed NAND chip on it. I'm using
> same chip with older pached U-Boot and Linux and chip is working fine
> with them.
> 
> > Otherwise, check if you have APBH DMA enabled in your
> > include/configs/mx28evk.h
> 
> Config file include/configs/mx28evk.h has following line.
> 
> #define CONFIG_APBH_DMA
> 

And you have dcache and icache disabled ?

> 
> BR,
> Lauri

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MXS NAND: DMA read error
  2012-04-17  8:29     ` Marek Vasut
@ 2012-04-17  8:38       ` Lauri Hintsala
  2012-04-17  9:05         ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Lauri Hintsala @ 2012-04-17  8:38 UTC (permalink / raw)
  To: u-boot

On 04/17/2012 11:29 AM, Marek Vasut wrote:
>> On 04/17/2012 11:17 AM, Marek Vasut wrote:
>>>> I'm trying to compile latest U-Boot to mx28evk (rev D) with NAND
>>>> support. U-Boot boots up but NAND chip is not detected and DMA read
>>>> error is popped up.
>>>
>>> MX28 EVK has no NAND, right?
>>
>> MX28 EVK has NAND slot and I have installed NAND chip on it. I'm using
>> same chip with older pached U-Boot and Linux and chip is working fine
>> with them.
>>
>>> Otherwise, check if you have APBH DMA enabled in your
>>> include/configs/mx28evk.h
>>
>> Config file include/configs/mx28evk.h has following line.
>>
>> #define CONFIG_APBH_DMA
>>
>
> And you have dcache and icache disabled ?

Yes, they seem to be disabled:

#define CONFIG_SYS_ICACHE_OFF
#define CONFIG_SYS_DCACHE_OFF

I'm using latest U-Boot and default mx28evk.h config:
http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/mx28evk.h;h=02f3366ed263ff66fe3b9b2089ec95ef461a92c0;hb=HEAD

I have added only NAND related lines I sent in first message.

BR,
Lauri

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MXS NAND: DMA read error
  2012-04-17  8:38       ` Lauri Hintsala
@ 2012-04-17  9:05         ` Marek Vasut
  2012-04-17  9:26           ` Lauri Hintsala
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2012-04-17  9:05 UTC (permalink / raw)
  To: u-boot

Dear Lauri Hintsala,

> On 04/17/2012 11:29 AM, Marek Vasut wrote:
> >> On 04/17/2012 11:17 AM, Marek Vasut wrote:
> >>>> I'm trying to compile latest U-Boot to mx28evk (rev D) with NAND
> >>>> support. U-Boot boots up but NAND chip is not detected and DMA read
> >>>> error is popped up.
> >>> 
> >>> MX28 EVK has no NAND, right?
> >> 
> >> MX28 EVK has NAND slot and I have installed NAND chip on it. I'm using
> >> same chip with older pached U-Boot and Linux and chip is working fine
> >> with them.
> >> 
> >>> Otherwise, check if you have APBH DMA enabled in your
> >>> include/configs/mx28evk.h
> >> 
> >> Config file include/configs/mx28evk.h has following line.
> >> 
> >> #define CONFIG_APBH_DMA
> > 
> > And you have dcache and icache disabled ?
> 
> Yes, they seem to be disabled:
> 
> #define CONFIG_SYS_ICACHE_OFF
> #define CONFIG_SYS_DCACHE_OFF
> 
> I'm using latest U-Boot and default mx28evk.h config:
> http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/mx28evk.h;h=02f33
> 66ed263ff66fe3b9b2089ec95ef461a92c0;hb=HEAD
> 
> I have added only NAND related lines I sent in first message.

Lauri, as much as I'd love to help you, MX28EVK is Fabio's board. So let's see 
what he has to say ;-)

> 
> BR,
> Lauri

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MXS NAND: DMA read error
  2012-04-17  9:05         ` Marek Vasut
@ 2012-04-17  9:26           ` Lauri Hintsala
  2012-04-17 10:17             ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Lauri Hintsala @ 2012-04-17  9:26 UTC (permalink / raw)
  To: u-boot

Hi Marek,

On 04/17/2012 12:05 PM, Marek Vasut wrote:
> Lauri, as much as I'd love to help you, MX28EVK is Fabio's board. So let's see
> what he has to say ;-)

I found the solution myself. The issue was caused by the missing 
iomuxing. I'll do the patch...

Thank you for your friendly and fast responses.

BR,
Lauri

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MXS NAND: DMA read error
  2012-04-17  9:26           ` Lauri Hintsala
@ 2012-04-17 10:17             ` Marek Vasut
  0 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2012-04-17 10:17 UTC (permalink / raw)
  To: u-boot

Dear Lauri Hintsala,

> Hi Marek,
> 
> On 04/17/2012 12:05 PM, Marek Vasut wrote:
> > Lauri, as much as I'd love to help you, MX28EVK is Fabio's board. So
> > let's see what he has to say ;-)
> 
> I found the solution myself. The issue was caused by the missing
> iomuxing. I'll do the patch...

Can you please submit a patch?

> Thank you for your friendly and fast responses.

You're welcome ;-)

> BR,
> Lauri

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-04-17 10:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17  8:07 [U-Boot] MXS NAND: DMA read error Lauri Hintsala
2012-04-17  8:17 ` Marek Vasut
2012-04-17  8:23   ` Lauri Hintsala
2012-04-17  8:29     ` Marek Vasut
2012-04-17  8:38       ` Lauri Hintsala
2012-04-17  9:05         ` Marek Vasut
2012-04-17  9:26           ` Lauri Hintsala
2012-04-17 10:17             ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox