Skip to contentSkip to conversation

omap gpmc changes for parsing devices and working debug

PATCH New Tony Lindgren 8 participants 47 messages May 20, 2015 – Feb 5, 2016 1 message not in the archive

Subsystems (8)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

cover omap gpmc changes for parsing devices and working debug

Hi all,

Here are few fixes that allow to hook any devices to GPMC instead of artificially limiting them by name. There are at least FPGAs and USB controllers that I'm aware of.

Then we need disable hwmod reset for GPMC debug, otherwise debug only shows the default memory timings.. Let's do this with a Kconfig option.

Regards,

Tony

Tony Lindgren (2):
memory: omap-gpmc: Fix parsing of devices
memory: omap-gpmc: Add Kconfig option for debug

 arch/arm/mach-omap2/omap_hwmod.h                        |  6 ++++++
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c      | 12 ++----------
 arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c |  3 ++-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c              | 12 ++----------
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c              | 11 ++---------
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c               |  4 ++--
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c              |  2 ++
 drivers/memory/Kconfig                                  |  8 ++++++++
 drivers/memory/omap-gpmc.c                              | 14 ++++----------
 9 files changed, 30 insertions(+), 42 deletions(-)
Signature · 1 line
2.1.4
author maintainer
#1 lore raw

PATCH 1/2 memory: omap-gpmc: Fix parsing of devices

We currently artificially limit the parsing of GPMC connected devices based on the device name. Let's stop doing that, it's confusing as adding devices to .dts files with using normal names like fpga and usb will currently cause them to not probe.

---
 drivers/memory/omap-gpmc.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/memory/omap-gpmc.c +1 -7
index c94ea0d..0e524a1 100644
@@ -2074,14 +2074,8 @@ static int gpmc_probe_dt(struct platform_device *pdev)
 			ret = gpmc_probe_nand_child(pdev, child);
 		else if (of_node_cmp(child->name, "onenand") == 0)
 			ret = gpmc_probe_onenand_child(pdev, child);
-		else if (of_node_cmp(child->name, "ethernet") == 0 ||
-			 of_node_cmp(child->name, "nor") == 0 ||
-			 of_node_cmp(child->name, "uart") == 0)
+		else
 			ret = gpmc_probe_generic_child(pdev, child);
-
-		if (WARN(ret < 0, "%s: probing gpmc child %s failed\n",
-			 __func__, child->full_name))
-			of_node_put(child);
 	}
 
 	return 0;
Signature · 1 line
2.1.4
author maintainer
#2 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

In reply to Tony Lindgren

We support decoding the bootloader values if DEBUG is defined. But we also need to change the struct omap_hwmod flags to have HWMOD_INIT_NO_RESET to avoid the GPMC being reset during the boot. Otherwise just the default timings will be displayed instead of the bootloader configured timings.

This also allows us to clean up the various GPMC related hwmod flags. For debugging, we only need HWMOD_INIT_NO_RESET, and HWMOD_INIT_NO_IDLE is not needed.

Cc Brian Hutchinson <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Roger Quadros <[email protected]>
---
 arch/arm/mach-omap2/omap_hwmod.h                        |  6 ++++++
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c      | 12 ++----------
 arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c |  3 ++-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c              | 12 ++----------
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c              | 11 ++---------
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c               |  4 ++--
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c              |  2 ++
 drivers/memory/Kconfig                                  |  8 ++++++++
 drivers/memory/omap-gpmc.c                              |  6 +++---
 9 files changed, 29 insertions(+), 35 deletions(-)
arch/arm/mach-omap2/omap_hwmod.h +6 -0
index 9611c91..b5d27ec 100644
@@ -109,6 +109,12 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type3;
 
 #define DEBUG_OMAPUART_FLAGS	(HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET)
 
+#ifdef CONFIG_OMAP_GPMC_DEBUG
+#define DEBUG_OMAP_GPMC_HWMOD_FLAGS	HWMOD_INIT_NO_RESET
+#else
+#define DEBUG_OMAP_GPMC_HWMOD_FLAGS	0
+#endif
+
 #if defined(CONFIG_DEBUG_OMAP2UART1)
 #undef DEBUG_OMAP2UART1_FLAGS
 #define DEBUG_OMAP2UART1_FLAGS DEBUG_OMAPUART_FLAGS
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +2 -10
index 8821b9d..6dcfd03 100644
@@ -762,16 +762,8 @@ struct omap_hwmod omap2xxx_gpmc_hwmod = {
 	.name		= "gpmc",
 	.class		= &omap2xxx_gpmc_hwmod_class,
 	.main_clk	= "gpmc_fck",
-	/*
-	 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
-	 * block.  It is not being added due to any known bugs with
-	 * resetting the GPMC IP block, but rather because any timings
-	 * set by the bootloader are not being correctly programmed by
-	 * the kernel from the board file or DT data.
-	 * HWMOD_INIT_NO_RESET should be removed ASAP.
-	 */
-	.flags		= (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
-			   HWMOD_NO_IDLEST),
+	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+	.flags		= HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
 	.prcm		= {
 		.omap2	= {
 			.prcm_reg_id = 3,
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +2 -1
index cabc569..ae0cb67 100644
@@ -668,7 +668,8 @@ struct omap_hwmod am33xx_gpmc_hwmod = {
 	.name		= "gpmc",
 	.class		= &am33xx_gpmc_hwmod_class,
 	.clkdm_name	= "l3s_clkdm",
-	.flags		= (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
+	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+	.flags		= DEBUG_OMAP_GPMC_HWMOD_FLAGS,
 	.main_clk	= "l3s_gclk",
 	.prcm		= {
 		.omap4	= {
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +2 -10
index 4e8e93c..0ca4d3f 100644
@@ -2169,16 +2169,8 @@ static struct omap_hwmod omap3xxx_gpmc_hwmod = {
 	.clkdm_name	= "core_l3_clkdm",
 	.mpu_irqs	= omap3xxx_gpmc_irqs,
 	.main_clk	= "gpmc_fck",
-	/*
-	 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
-	 * block.  It is not being added due to any known bugs with
-	 * resetting the GPMC IP block, but rather because any timings
-	 * set by the bootloader are not being correctly programmed by
-	 * the kernel from the board file or DT data.
-	 * HWMOD_INIT_NO_RESET should be removed ASAP.
-	 */
-	.flags		= (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
-			   HWMOD_NO_IDLEST),
+	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+	.flags		= HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
 };
 
 /*
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +2 -9
index f5e68a7..43eebf2 100644
@@ -1188,15 +1188,8 @@ static struct omap_hwmod omap44xx_gpmc_hwmod = {
 	.name		= "gpmc",
 	.class		= &omap44xx_gpmc_hwmod_class,
 	.clkdm_name	= "l3_2_clkdm",
-	/*
-	 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
-	 * block.  It is not being added due to any known bugs with
-	 * resetting the GPMC IP block, but rather because any timings
-	 * set by the bootloader are not being correctly programmed by
-	 * the kernel from the board file or DT data.
-	 * HWMOD_INIT_NO_RESET should be removed ASAP.
-	 */
-	.flags		= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
+	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+	.flags		= DEBUG_OMAP_GPMC_HWMOD_FLAGS,
 	.prcm = {
 		.omap4 = {
 			.clkctrl_offs = OMAP4_CM_L3_2_GPMC_CLKCTRL_OFFSET,
arch/arm/mach-omap2/omap_hwmod_7xx_data.c +2 -2
index 0e64c2f..a0411f3 100644
@@ -819,8 +819,8 @@ static struct omap_hwmod dra7xx_gpmc_hwmod = {
 	.name		= "gpmc",
 	.class		= &dra7xx_gpmc_hwmod_class,
 	.clkdm_name	= "l3main1_clkdm",
-	.flags		= (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
-			   HWMOD_SWSUP_SIDLE),
+	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+	.flags		= HWMOD_SWSUP_SIDLE | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
 	.main_clk	= "l3_iclk_div",
 	.prcm = {
 		.omap4 = {
arch/arm/mach-omap2/omap_hwmod_81xx_data.c +2 -0
index cab1eb6..c924137 100644
@@ -478,6 +478,8 @@ static struct omap_hwmod dm81xx_gpmc_hwmod = {
 	.clkdm_name	= "alwon_l3s_clkdm",
 	.class		= &dm81xx_gpmc_hwmod_class,
 	.main_clk	= "sysclk6_ck",
+	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+	.flags		= DEBUG_OMAP_GPMC_HWMOD_FLAGS,
 	.prcm = {
 		.omap4 = {
 			.clkctrl_offs = DM816X_CM_ALWON_GPMC_CLKCTRL,
drivers/memory/Kconfig +8 -0
index 868036f..8406c668 100644
@@ -49,6 +49,14 @@ config OMAP_GPMC
 	  interfacing to a variety of asynchronous as well as synchronous
 	  memory drives like NOR, NAND, OneNAND, SRAM.
 
+config OMAP_GPMC_DEBUG
+	bool
+	depends on OMAP_GPMC
+	help
+	  Enables verbose debugging mostly to decode the bootloader provided
+	  timings. Enable this during development to configure devices
+	  connected to the GPMC bus.
+
 config MVEBU_DEVBUS
 	bool "Marvell EBU Device Bus Controller"
 	default y
drivers/memory/omap-gpmc.c +3 -3
index 0e524a1..3a27a84 100644
@@ -403,7 +403,7 @@ static void gpmc_cs_bool_timings(int cs, const struct gpmc_bool_timings *p)
 			   p->cycle2cyclediffcsen);
 }
 
-#ifdef DEBUG
+#ifdef CONFIG_OMAP_GPMC_DEBUG
 /**
  * get_gpmc_timing_reg - read a timing parameter and print DTS settings for it.
  * @cs:      Chip Select Region
@@ -612,7 +612,7 @@ static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit, int max
 	}
 
 	l = gpmc_cs_read_reg(cs, reg);
-#ifdef DEBUG
+#ifdef CONFIG_OMAP_GPMC_DEBUG
 	pr_info(
 		"GPMC CS%d: %-17s: %3d ticks, %3lu ns (was %3i ticks) %3d ns\n",
 	       cs, name, ticks, gpmc_get_clk_period(cs, cd) * ticks / 1000,
@@ -767,7 +767,7 @@ int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t,
 			    GPMC_CONFIG1_CLKACTIVATIONTIME_MAX,
 			    clk_activation, GPMC_CD_FCLK);
 
-#ifdef DEBUG
+#ifdef CONFIG_OMAP_GPMC_DEBUG
 	pr_info("GPMC CS%d CLK period is %lu ns (div %d)\n",
 			cs, (div * gpmc_get_fclk_period()) / 1000, div);
 #endif
Signature · 1 line
2.1.4
maintainer
#3 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 6 lines · Tony Lindgren

We support decoding the bootloader values if DEBUG is defined. But we also need to change the struct omap_hwmod flags to have HWMOD_INIT_NO_RESET to avoid the GPMC being reset during the boot. Otherwise just the default timings will be displayed instead of the bootloader configured timings.

Quoted 8 lines

This also allows us to clean up the various GPMC related hwmod flags. For debugging, we only need HWMOD_INIT_NO_RESET, and HWMOD_INIT_NO_IDLE is not needed.

Cc Brian Hutchinson <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Roger Quadros <[email protected]>

Looks good to me, want me to queue it or do you want to?

- Paul

author maintainer
#4 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 12 lines · Paul Walmsley
Quoted 10 lines · Tony Lindgren

We support decoding the bootloader values if DEBUG is defined. But we also need to change the struct omap_hwmod flags to have HWMOD_INIT_NO_RESET to avoid the GPMC being reset during the boot. Otherwise just the default timings will be displayed instead of the bootloader configured timings.

This also allows us to clean up the various GPMC related hwmod flags. For debugging, we only need HWMOD_INIT_NO_RESET, and HWMOD_INIT_NO_IDLE is not needed.

Quoted 6 lines
Quoted 4 lines
Cc Brian Hutchinson <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Roger Quadros <[email protected]>

Looks good to me, want me to queue it or do you want to?

Feel free to take it if it looks OK to you, I'll just queue the first patch then. Roger may have other GPMC patches coming up, but this should not conflict with them, there's more of a hwmod conflict chance.

Regards,

Tony

maintainer
#5 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 18 lines · Tony Lindgren
Quoted 17 lines · Paul Walmsley
Quoted 14 lines · Tony Lindgren

We support decoding the bootloader values if DEBUG is defined. But we also need to change the struct omap_hwmod flags to have HWMOD_INIT_NO_RESET to avoid the GPMC being reset during the boot. Otherwise just the default timings will be displayed instead of the bootloader configured timings.

This also allows us to clean up the various GPMC related hwmod flags. For debugging, we only need HWMOD_INIT_NO_RESET, and HWMOD_INIT_NO_IDLE is not needed.

Cc Brian Hutchinson <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Roger Quadros <[email protected]>
Quoted 6 lines
Quoted 1 line

Looks good to me, want me to queue it or do you want to?

Feel free to take it if it looks OK to you, I'll just queue the first patch then. Roger may have other GPMC patches coming up, but this should not conflict with them, there's more of a hwmod conflict chance.

OK thanks queued for v4.2.

- Paul

#6 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

In reply to Tony Lindgren

Hi Tony,

Did anyone test this changeset on some AM335x board?

Today I ran into trouble with that because:

The GPMC controller gets reseted on kernel boot due to the missing/removed HWMOD_INIT_NO_RESET flag.

Primary this should not be a big problem, but on my board (maybe on all AM335x) the GPMC doesn't behave as described in TRM. Especially the GPMC_CONFIG register is not reset to 0h after reset, instead it holds the value 0xa00 which is very strange because bit 10-31 are reserved.

Further this 0xa00 means that Bit9 (WAIT1PINPOLARITY) is set, exactly this causes my system to stall on first access the connected NAND flash because it never becomes ready due to the wrong wait pin polarity. Maybe others dont't run into trouble because they may use WAIT0PIN, which one has it's old polarity.

First approach was simply to write 0x0 to the GPMC_CONFIG register during gpmc_probe function.
It solves the problem.

I also tried to issue some SYSRESET through GPMC registers without success, same strange behavior.

What?s your thinking around that?

Best regards,
Hannes

linux-omap-owner at vger.kernel.org schrieb am 20.05.2015 23:21:03:

Quoted 4 lines

Von: Tony Lindgren <[email protected]>
An: linux-omap at vger.kernel.org
Kopie: linux-arm-kernel at lists.infradead.org, Brian Hutchinson <[email protected]>, Paul Walmsley <[email protected]>, Roger Quadros

<[email protected]>

Quoted 14 lines

Datum: 20.05.2015 23:37
Betreff: [PATCH 2/2] memory: omap-gpmc: Add Kconfig option for debug Gesendet von: linux-omap-owner at vger.kernel.org

We support decoding the bootloader values if DEBUG is defined. But we also need to change the struct omap_hwmod flags to have HWMOD_INIT_NO_RESET to avoid the GPMC being reset during the boot. Otherwise just the default timings will be displayed instead of the bootloader configured timings.

This also allows us to clean up the various GPMC related hwmod flags. For debugging, we only need HWMOD_INIT_NO_RESET, and HWMOD_INIT_NO_IDLE is not needed.

Quoted 7 lines
Cc Brian Hutchinson <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Roger Quadros <[email protected]>
---
 arch/arm/mach-omap2/omap_hwmod.h                        |  6 ++++++
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c      | 12 

++----------

Quoted 2 lines
 arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c |  3 ++-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c              | 12 

++----------

Quoted 1 line
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c              | 11 

++---------

Review

Quoted 7 lines
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c               |  4 ++--
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c              |  2 ++
 drivers/memory/Kconfig                                  |  8 ++++++++
 drivers/memory/omap-gpmc.c                              |  6 +++---
 9 files changed, 29 insertions(+), 35 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-omap2/omap_hwmod.h

arch/arm/mach-omap2/omap_hwmod.h extern struct omap_hwmod_sysc_fields

Quoted 4 lines

index 9611c91..b5d27ec 100644

arch/arm/mach-omap2/omap_hwmod.h +0 -0
@@ -109,6 +109,12 @@ extern struct omap_hwmod_sysc_fields 

omap_hwmod_sysc_type3;

arch/arm/mach-omap2/omap_hwmod.h extern struct omap_hwmod_sysc_fields · line 109

Quoted 2 lines
arch/arm/mach-omap2/omap_hwmod.h +0 -0
 #define DEBUG_OMAPUART_FLAGS   (HWMOD_INIT_NO_IDLE | 

HWMOD_INIT_NO_RESET)

Review

Quoted 11 lines
arch/arm/mach-omap2/omap_hwmod.h +6 -0
+#ifdef CONFIG_OMAP_GPMC_DEBUG
+#define DEBUG_OMAP_GPMC_HWMOD_FLAGS   HWMOD_INIT_NO_RESET
+#else
+#define DEBUG_OMAP_GPMC_HWMOD_FLAGS   0
+#endif
+
 #if defined(CONFIG_DEBUG_OMAP2UART1)
 #undef DEBUG_OMAP2UART1_FLAGS
 #define DEBUG_OMAP2UART1_FLAGS DEBUG_OMAPUART_FLAGS
(quoted diff) +0 -0

b/arch/arm/

Review

Quoted 24 lines

mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index 8821b9d..6dcfd03 100644

arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +2 -10
@@ -762,16 +762,8 @@ struct omap_hwmod omap2xxx_gpmc_hwmod = {
    .name      = "gpmc",
    .class      = &omap2xxx_gpmc_hwmod_class,
    .main_clk   = "gpmc_fck",
-   /*
-    * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
-    * block.  It is not being added due to any known bugs with
-    * resetting the GPMC IP block, but rather because any timings
-    * set by the bootloader are not being correctly programmed by
-    * the kernel from the board file or DT data.
-    * HWMOD_INIT_NO_RESET should be removed ASAP.
-    */
-   .flags      = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
-            HWMOD_NO_IDLEST),
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .prcm      = {
       .omap2   = {
          .prcm_reg_id = 3,
(quoted diff) +0 -0

b/arch/

Review

Quoted 15 lines

arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c index cabc569..ae0cb67 100644

arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +2 -1
@@ -668,7 +668,8 @@ struct omap_hwmod am33xx_gpmc_hwmod = {
    .name      = "gpmc",
    .class      = &am33xx_gpmc_hwmod_class,
    .clkdm_name   = "l3s_clkdm",
-   .flags      = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .main_clk   = "l3s_gclk",
    .prcm      = {
       .omap4   = {
(quoted diff) +0 -0

b/arch/arm/mach-omap2/

Review

Quoted 24 lines

omap_hwmod_3xxx_data.c
index 4e8e93c..0ca4d3f 100644

arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +2 -10
@@ -2169,16 +2169,8 @@ static struct omap_hwmod omap3xxx_gpmc_hwmod = {
    .clkdm_name   = "core_l3_clkdm",
    .mpu_irqs   = omap3xxx_gpmc_irqs,
    .main_clk   = "gpmc_fck",
-   /*
-    * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
-    * block.  It is not being added due to any known bugs with
-    * resetting the GPMC IP block, but rather because any timings
-    * set by the bootloader are not being correctly programmed by
-    * the kernel from the board file or DT data.
-    * HWMOD_INIT_NO_RESET should be removed ASAP.
-    */
-   .flags      = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
-            HWMOD_NO_IDLEST),
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
 };
 
 /*
(quoted diff) +0 -0

b/arch/arm/mach-omap2/

Review

Quoted 23 lines

omap_hwmod_44xx_data.c
index f5e68a7..43eebf2 100644

arch/arm/mach-omap2/omap_hwmod_44xx_data.c +2 -9
@@ -1188,15 +1188,8 @@ static struct omap_hwmod omap44xx_gpmc_hwmod = {
    .name      = "gpmc",
    .class      = &omap44xx_gpmc_hwmod_class,
    .clkdm_name   = "l3_2_clkdm",
-   /*
-    * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
-    * block.  It is not being added due to any known bugs with
-    * resetting the GPMC IP block, but rather because any timings
-    * set by the bootloader are not being correctly programmed by
-    * the kernel from the board file or DT data.
-    * HWMOD_INIT_NO_RESET should be removed ASAP.
-    */
-   .flags      = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .prcm = {
       .omap4 = {
          .clkctrl_offs = OMAP4_CM_L3_2_GPMC_CLKCTRL_OFFSET,
(quoted diff) +0 -0

b/arch/arm/mach-omap2/

Review

Quoted 16 lines

omap_hwmod_7xx_data.c
index 0e64c2f..a0411f3 100644

arch/arm/mach-omap2/omap_hwmod_7xx_data.c +2 -2
@@ -819,8 +819,8 @@ static struct omap_hwmod dra7xx_gpmc_hwmod = {
    .name      = "gpmc",
    .class      = &dra7xx_gpmc_hwmod_class,
    .clkdm_name   = "l3main1_clkdm",
-   .flags      = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
-            HWMOD_SWSUP_SIDLE),
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = HWMOD_SWSUP_SIDLE | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .main_clk   = "l3_iclk_div",
    .prcm = {
       .omap4 = {
(quoted diff) +0 -0

b/arch/arm/mach-omap2/

drivers/memory/omap-gpmc.c static void gpmc_cs_bool_timings(int cs, const

Quoted 37 lines

omap_hwmod_81xx_data.c
index cab1eb6..c924137 100644

arch/arm/mach-omap2/omap_hwmod_81xx_data.c +2 -0
@@ -478,6 +478,8 @@ static struct omap_hwmod dm81xx_gpmc_hwmod = {
    .clkdm_name   = "alwon_l3s_clkdm",
    .class      = &dm81xx_gpmc_hwmod_class,
    .main_clk   = "sysclk6_ck",
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .prcm = {
       .omap4 = {
          .clkctrl_offs = DM816X_CM_ALWON_GPMC_CLKCTRL,
drivers/memory/Kconfig +8 -0
index 868036f..8406c668 100644
@@ -49,6 +49,14 @@ config OMAP_GPMC
      interfacing to a variety of asynchronous as well as synchronous
      memory drives like NOR, NAND, OneNAND, SRAM.
 
+config OMAP_GPMC_DEBUG
+   bool
+   depends on OMAP_GPMC
+   help
+     Enables verbose debugging mostly to decode the bootloader provided
+     timings. Enable this during development to configure devices
+     connected to the GPMC bus.
+
 config MVEBU_DEVBUS
    bool "Marvell EBU Device Bus Controller"
    default y
drivers/memory/omap-gpmc.c +0 -0
index 0e524a1..3a27a84 100644
@@ -403,7 +403,7 @@ static void gpmc_cs_bool_timings(int cs, const 

struct

drivers/memory/omap-gpmc.c static void gpmc_cs_bool_timings(int cs, const struct gpmc_bool_timings *p)

Quoted 8 lines
drivers/memory/omap-gpmc.c +1 -1
 gpmc_bool_timings *p)
             p->cycle2cyclediffcsen);
 }
 
-#ifdef DEBUG
+#ifdef CONFIG_OMAP_GPMC_DEBUG
 /**
  * get_gpmc_timing_reg - read a timing parameter and print DTS settings 

for it.

drivers/memory/omap-gpmc.c int gpmc_cs_set_timings(int cs, const struct

Quoted 12 lines

* @cs: Chip Select Region

drivers/memory/omap-gpmc.c +0 -0
@@ -612,7 +612,7 @@ static int set_gpmc_timing_reg(int cs, int reg, int 

st_bit, int end_bit, int max

    }

    l = gpmc_cs_read_reg(cs, reg);
drivers/memory/omap-gpmc.c +1 -1
-#ifdef DEBUG
+#ifdef CONFIG_OMAP_GPMC_DEBUG
    pr_info(
       "GPMC CS%d: %-17s: %3d ticks, %3lu ns (was %3i ticks) %3d ns\n",
           cs, name, ticks, gpmc_get_clk_period(cs, cd) * ticks / 1000,
@@ -767,7 +767,7 @@ int gpmc_cs_set_timings(int cs, const struct 

gpmc_timings *t,

Quoted 15 lines
drivers/memory/omap-gpmc.c +1 -1
              GPMC_CONFIG1_CLKACTIVATIONTIME_MAX,
              clk_activation, GPMC_CD_FCLK);
 
-#ifdef DEBUG
+#ifdef CONFIG_OMAP_GPMC_DEBUG
    pr_info("GPMC CS%d CLK period is %lu ns (div %d)\n",
          cs, (div * gpmc_get_fclk_period()) / 1000, div);
 #endif
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): OFCA2F1DCE.C787A961-ONC1257EAE.001D79BC-C1257EAE.00203AFF@br-automation.com

author maintainer
#8 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Hi,

Quoted 3 lines · Hannes Schmelzer

Hi Tony,

Did anyone test this changeset on some AM335x board?

Apparently not if it does not work or else you somehow have a different configuration for GPMC.

Quoted 4 lines

Today I ran into trouble with that because:

The GPMC controller gets reseted on kernel boot due to the missing/removed HWMOD_INIT_NO_RESET flag.

Oh so you mean it only works on am335x if CONFIG_OMAP_GPMC_DEBUG is set?

Quoted 12 lines

Primary this should not be a big problem, but on my board (maybe on all AM335x) the GPMC doesn't behave as described in TRM. Especially the GPMC_CONFIG register is not reset to 0h after reset, instead it holds the value 0xa00 which is very strange because bit 10-31 are reserved.

Further this 0xa00 means that Bit9 (WAIT1PINPOLARITY) is set, exactly this causes my system to stall on first access the connected NAND flash because it never becomes ready due to the wrong wait pin polarity. Maybe others dont't run into trouble because they may use WAIT0PIN, which one has it's old polarity.

Quoted 3 lines

First approach was simply to write 0x0 to the GPMC_CONFIG register during gpmc_probe function.
It solves the problem.

OK

Quoted 2 lines

I also tried to issue some SYSRESET through GPMC registers without success, same strange behavior.

Interesting, never heard of that one before.

Quoted 1 line

What?s your thinking around that?

We could add a custom hwmod reset function that sets GPMC_CONFIG to 0. Similar to omap_i2c_reset() is set up. Or we could set up a property for the wait pin polarity. Roger, got any better ideas?

Regards,

Tony

#9 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 2 lines

Hi,

Hi,

Quoted 12 lines · Hannes Schmelzer
Quoted 3 lines

Hi Tony,

Did anyone test this changeset on some AM335x board?

Apparently not if it does not work or else you somehow have a different configuration for GPMC.

Quoted 3 lines

Today I ran into trouble with that because:

The GPMC controller gets reseted on kernel boot due to the

missing/removed

Quoted 3 lines
Quoted 1 line

HWMOD_INIT_NO_RESET flag.

Oh so you mean it only works on am335x if CONFIG_OMAP_GPMC_DEBUG is set?

Exactly.

Quoted 5 lines
Quoted 3 lines

I also tried to issue some SYSRESET through GPMC registers without success, same strange behavior.

Interesting, never heard of that one before.

Unfortunately i only have my B&R hardware to test,
maybe somebody else has an am335x board with NAND flash on it and can test.

Quoted 4 lines
Quoted 1 line

What?s your thinking around that?

We could add a custom hwmod reset function that sets GPMC_CONFIG to 0. Similar to omap_i2c_reset() is set up.

This would be possible, but we've to take care that such functions isn't called during the new introduced debug-case.

Quoted 2 lines

Or we could set up a property for
the wait pin polarity. Roger, got any better ideas?

In general, it would be a good idea to introduce a dt-property to control the polarity of the wait pins, since there is allready a property to select the wait pin - this would make the thing complete.

Quoted 3 lines

Regards,
Tony

best regards,
Hannes

#10 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

In reply to a message not in the archive

Hi Hannes,

Quoted 4 lines · Hannes Schmelzer

Hi Tony,

Did anyone test this changeset on some AM335x board?

Quoted 8 lines

Today I ran into trouble with that because:

The GPMC controller gets reseted on kernel boot due to the missing/removed HWMOD_INIT_NO_RESET flag.

Primary this should not be a big problem, but on my board (maybe on all AM335x) the GPMC doesn't behave as described in TRM. Especially the GPMC_CONFIG register is not reset to 0h after reset, instead it holds the value 0xa00 which is very strange because bit 10-31 are reserved.

Further this 0xa00 means that Bit9 (WAIT1PINPOLARITY) is set, exactly this causes my system to stall on first access the connected NAND flash because it never becomes ready due to the wrong wait pin polarity. Maybe others dont't run into trouble because they may use WAIT0PIN, which one has it's old polarity.

So nand ready/busy pin is connected to waitpin1 through an inverter on your board?

On am335x-evm we use waitpin0. Nand ready/busy is directly connected to waitpin0.

For NAND operation read/write wait monitoring must be disabled.
The nand driver uses the WAIT pin purely for Read/Busy signalling.
Unfortunately the existing driver cannot handle anything other than waitpin 0 for nand for DT boot.

I've tried to address this issue here
http://thread.gmane.org/gmane.linux.drivers.devicetree/131076

cheers,
-roger

Quoted 241 lines

First approach was simply to write 0x0 to the GPMC_CONFIG register during gpmc_probe function. It solves the problem.

I also tried to issue some SYSRESET through GPMC registers without success, same strange behavior.

What?s your thinking around that?

Best regards,
Hannes

linux-omap-owner at vger.kernel.org schrieb am 20.05.2015 23:21:03:

Quoted 226 lines

Von: Tony Lindgren <[email protected]>
An: linux-omap at vger.kernel.org
Kopie: linux-arm-kernel at lists.infradead.org, Brian Hutchinson <[email protected]>, Paul Walmsley <[email protected]>, Roger Quadros <[email protected]>
Datum: 20.05.2015 23:37
Betreff: [PATCH 2/2] memory: omap-gpmc: Add Kconfig option for debug Gesendet von: linux-omap-owner at vger.kernel.org

We support decoding the bootloader values if DEBUG is defined. But we also need to change the struct omap_hwmod flags to have HWMOD_INIT_NO_RESET to avoid the GPMC being reset during the boot. Otherwise just the default timings will be displayed instead of the bootloader configured timings.

This also allows us to clean up the various GPMC related hwmod flags. For debugging, we only need HWMOD_INIT_NO_RESET, and HWMOD_INIT_NO_IDLE is not needed.

Cc Brian Hutchinson <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Roger Quadros <[email protected]>
---
 arch/arm/mach-omap2/omap_hwmod.h                        |  6 ++++++
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c      | 12 ++----------
 arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c |  3 ++-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c              | 12 ++----------
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c              | 11 ++---------
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c               |  4 ++--
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c              |  2 ++
 drivers/memory/Kconfig                                  |  8 ++++++++
 drivers/memory/omap-gpmc.c                              |  6 +++---
 9 files changed, 29 insertions(+), 35 deletions(-)
arch/arm/mach-omap2/omap_hwmod.h +6 -0
index 9611c91..b5d27ec 100644
@@ -109,6 +109,12 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type3;
 
 #define DEBUG_OMAPUART_FLAGS   (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET)
 
+#ifdef CONFIG_OMAP_GPMC_DEBUG
+#define DEBUG_OMAP_GPMC_HWMOD_FLAGS   HWMOD_INIT_NO_RESET
+#else
+#define DEBUG_OMAP_GPMC_HWMOD_FLAGS   0
+#endif
+
 #if defined(CONFIG_DEBUG_OMAP2UART1)
 #undef DEBUG_OMAP2UART1_FLAGS
 #define DEBUG_OMAP2UART1_FLAGS DEBUG_OMAPUART_FLAGS
arch/arm/ renamed from arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +0 -0

mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index 8821b9d..6dcfd03 100644

arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +2 -10
@@ -762,16 +762,8 @@ struct omap_hwmod omap2xxx_gpmc_hwmod = {
    .name      = "gpmc",
    .class      = &omap2xxx_gpmc_hwmod_class,
    .main_clk   = "gpmc_fck",
-   /*
-    * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
-    * block.  It is not being added due to any known bugs with
-    * resetting the GPMC IP block, but rather because any timings
-    * set by the bootloader are not being correctly programmed by
-    * the kernel from the board file or DT data.
-    * HWMOD_INIT_NO_RESET should be removed ASAP.
-    */
-   .flags      = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
-            HWMOD_NO_IDLEST),
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .prcm      = {
       .omap2   = {
          .prcm_reg_id = 3,
arch/ renamed from arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +0 -0

arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c index cabc569..ae0cb67 100644

arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +2 -1
@@ -668,7 +668,8 @@ struct omap_hwmod am33xx_gpmc_hwmod = {
    .name      = "gpmc",
    .class      = &am33xx_gpmc_hwmod_class,
    .clkdm_name   = "l3s_clkdm",
-   .flags      = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .main_clk   = "l3s_gclk",
    .prcm      = {
       .omap4   = {
arch/arm/mach-omap2/ renamed from arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0 -0

omap_hwmod_3xxx_data.c
index 4e8e93c..0ca4d3f 100644

arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +2 -10
@@ -2169,16 +2169,8 @@ static struct omap_hwmod omap3xxx_gpmc_hwmod = {
    .clkdm_name   = "core_l3_clkdm",
    .mpu_irqs   = omap3xxx_gpmc_irqs,
    .main_clk   = "gpmc_fck",
-   /*
-    * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
-    * block.  It is not being added due to any known bugs with
-    * resetting the GPMC IP block, but rather because any timings
-    * set by the bootloader are not being correctly programmed by
-    * the kernel from the board file or DT data.
-    * HWMOD_INIT_NO_RESET should be removed ASAP.
-    */
-   .flags      = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
-            HWMOD_NO_IDLEST),
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
 };
 
 /*
arch/arm/mach-omap2/ renamed from arch/arm/mach-omap2/omap_hwmod_44xx_data.c +0 -0

omap_hwmod_44xx_data.c
index f5e68a7..43eebf2 100644

arch/arm/mach-omap2/omap_hwmod_44xx_data.c +2 -9
@@ -1188,15 +1188,8 @@ static struct omap_hwmod omap44xx_gpmc_hwmod = {
    .name      = "gpmc",
    .class      = &omap44xx_gpmc_hwmod_class,
    .clkdm_name   = "l3_2_clkdm",
-   /*
-    * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
-    * block.  It is not being added due to any known bugs with
-    * resetting the GPMC IP block, but rather because any timings
-    * set by the bootloader are not being correctly programmed by
-    * the kernel from the board file or DT data.
-    * HWMOD_INIT_NO_RESET should be removed ASAP.
-    */
-   .flags      = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .prcm = {
       .omap4 = {
          .clkctrl_offs = OMAP4_CM_L3_2_GPMC_CLKCTRL_OFFSET,
arch/arm/mach-omap2/ renamed from arch/arm/mach-omap2/omap_hwmod_7xx_data.c +0 -0

omap_hwmod_7xx_data.c
index 0e64c2f..a0411f3 100644

arch/arm/mach-omap2/omap_hwmod_7xx_data.c +2 -2
@@ -819,8 +819,8 @@ static struct omap_hwmod dra7xx_gpmc_hwmod = {
    .name      = "gpmc",
    .class      = &dra7xx_gpmc_hwmod_class,
    .clkdm_name   = "l3main1_clkdm",
-   .flags      = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
-            HWMOD_SWSUP_SIDLE),
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = HWMOD_SWSUP_SIDLE | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .main_clk   = "l3_iclk_div",
    .prcm = {
       .omap4 = {
arch/arm/mach-omap2/ renamed from arch/arm/mach-omap2/omap_hwmod_81xx_data.c +0 -0

omap_hwmod_81xx_data.c
index cab1eb6..c924137 100644

arch/arm/mach-omap2/omap_hwmod_81xx_data.c +2 -0
@@ -478,6 +478,8 @@ static struct omap_hwmod dm81xx_gpmc_hwmod = {
    .clkdm_name   = "alwon_l3s_clkdm",
    .class      = &dm81xx_gpmc_hwmod_class,
    .main_clk   = "sysclk6_ck",
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .prcm = {
       .omap4 = {
          .clkctrl_offs = DM816X_CM_ALWON_GPMC_CLKCTRL,
drivers/memory/Kconfig +8 -0
index 868036f..8406c668 100644
@@ -49,6 +49,14 @@ config OMAP_GPMC
      interfacing to a variety of asynchronous as well as synchronous
      memory drives like NOR, NAND, OneNAND, SRAM.
 
+config OMAP_GPMC_DEBUG
+   bool
+   depends on OMAP_GPMC
+   help
+     Enables verbose debugging mostly to decode the bootloader provided
+     timings. Enable this during development to configure devices
+     connected to the GPMC bus.
+
 config MVEBU_DEVBUS
    bool "Marvell EBU Device Bus Controller"
    default y
drivers/memory/omap-gpmc.c +1 -1
index 0e524a1..3a27a84 100644
@@ -403,7 +403,7 @@ static void gpmc_cs_bool_timings(int cs, const struct
 gpmc_bool_timings *p)
             p->cycle2cyclediffcsen);
 }
 
-#ifdef DEBUG
+#ifdef CONFIG_OMAP_GPMC_DEBUG
 /**
  * get_gpmc_timing_reg - read a timing parameter and print DTS settings for it.

* @cs: Chip Select Region

drivers/memory/omap-gpmc.c +0 -0
@@ -612,7 +612,7 @@ static int set_gpmc_timing_reg(int cs, int reg, int

st_bit, int end_bit, int max

    }
 
    l = gpmc_cs_read_reg(cs, reg);
drivers/memory/omap-gpmc.c +2 -3
-#ifdef DEBUG
+#ifdef CONFIG_OMAP_GPMC_DEBUG
    pr_info(
       "GPMC CS%d: %-17s: %3d ticks, %3lu ns (was %3i ticks) %3d ns\n",
           cs, name, ticks, gpmc_get_clk_period(cs, cd) * ticks / 1000,
@@ -767,7 +767,7 @@ int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t,
              GPMC_CONFIG1_CLKACTIVATIONTIME_MAX,
              clk_activation, GPMC_CD_FCLK);
 
-#ifdef DEBUG
+#ifdef CONFIG_OMAP_GPMC_DEBUG
    pr_info("GPMC CS%d CLK period is %lu ns (div %d)\n",
          cs, (div * gpmc_get_fclk_period()) / 1000, div);
 #endif
--

2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

#11 lore raw

Antwort: Re: [PATCH 2/2] memory: omap-gpmc: Add Kconfig option for debug

Quoted 1 line

Hi Hannes,

Hi Roger,

Quoted 9 lines · Hannes Schmelzer
Quoted 7 lines

Hi Tony,

Did anyone test this changeset on some AM335x board?

Today I ran into trouble with that because:

The GPMC controller gets reseted on kernel boot due to the

missing/removed

Quoted 3 lines

HWMOD_INIT_NO_RESET flag.

Quoted 2 lines

Primary this should not be a big problem, but on my board (maybe on

all

Quoted 2 lines

AM335x) the GPMC doesn't behave as described in TRM.

Quoted 1 line

Especially the GPMC_CONFIG register is not reset to 0h after reset,

instead

Quoted 1 line

it holds the value 0xa00 which is very strange because bit 10-31 are

reserved.

Quoted 2 lines
Quoted 2 lines

Further this 0xa00 means that Bit9 (WAIT1PINPOLARITY) is set, exactly

this

Quoted 1 line

causes my system to stall on first access the connected NAND flash

because it

Quoted 1 line

never becomes ready due to the wrong wait pin polarity. Maybe others

dont't

Quoted 1 line

run into trouble because they may use WAIT0PIN, which one has it's old

polarity.

Quoted 2 lines

So nand ready/busy pin is connected to waitpin1 through an inverter on

your board?

Quoted 2 lines

On am335x-evm we use waitpin0. Nand ready/busy is directly connected to

waitpin0.

No there is no inverter between flash and AM335x, the READY_nBUSY line is directly connected to waitpin1.
But your sentence brings some good idea to me, i will try to solder some inverter into the READY_nBUSY line on my board and see if the problem appears again.
If i'm right in my theory that the value 0xa00 in GPMC_CONFIG register is the problem, the inverter would solve it.

You're right am335x-evm uses waitpin0, which one is not affected from this "bug".
I have to use waitpin1, because i also have a 2nd ethernet interface connected, and there is waitpin0 uses for collission detect signal from the phy (other pinmux).

Quoted 3 lines

For NAND operation read/write wait monitoring must be disabled. The nand driver uses the WAIT pin purely for Read/Busy signalling. Unfortunately the existing driver cannot handle anything other than

waitpin 0

Quoted 1 line

for nand for DT boot.

for sure ? have a look to omap-gpmc.c at line #90. Here i can see that either can be used.

Quoted 3 lines

I've tried to address this issue here
http://thread.gmane.org/gmane.linux.drivers.devicetree/131076

This is useful if the READY_nBUSY line cannot be connected to the GPMC itself, instead it maybe connected to some other gpio.
But it doesn't solve the problem.

Quoted 3 lines

cheers,
-roger

best regards,
Hannes

#12 lore raw

Antwort: Re: [PATCH 2/2] memory: omap-gpmc: Add Kconfig option for debug

Quoted 35 lines · Hannes Schmelzer
Quoted 1 line

Hi Hannes,

Hi Roger,

Quoted 9 lines · Hannes Schmelzer
Quoted 7 lines

Hi Tony,

Did anyone test this changeset on some AM335x board?

Today I ran into trouble with that because:

The GPMC controller gets reseted on kernel boot due to the

missing/removed

Quoted 3 lines

HWMOD_INIT_NO_RESET flag.

Quoted 2 lines

Primary this should not be a big problem, but on my board (maybe on

all

Quoted 2 lines

AM335x) the GPMC doesn't behave as described in TRM.

Quoted 1 line

Especially the GPMC_CONFIG register is not reset to 0h after reset,

instead

Quoted 1 line

it holds the value 0xa00 which is very strange because bit 10-31 are

reserved.

Quoted 2 lines
Quoted 2 lines

Further this 0xa00 means that Bit9 (WAIT1PINPOLARITY) is set, exactly

this

Quoted 1 line

causes my system to stall on first access the connected NAND flash

because it

Quoted 1 line

never becomes ready due to the wrong wait pin polarity. Maybe others

dont't

Quoted 1 line

run into trouble because they may use WAIT0PIN, which one has it's old

polarity.

Quoted 2 lines

So nand ready/busy pin is connected to waitpin1 through an inverter on

your board?

Quoted 1 line
Quoted 8 lines
Quoted 1 line

On am335x-evm we use waitpin0. Nand ready/busy is directly connected to

waitpin0.

No there is no inverter between flash and AM335x, the READY_nBUSY line is directly connected to waitpin1.
But your sentence brings some good idea to me, i will try to solder some inverter into the READY_nBUSY line on my board and see if the problem appears again.

Please don't do that. We want to maintain the NAND ready/busy# logic as it is.

Quoted 2 lines

If i'm right in my theory that the value 0xa00 in GPMC_CONFIG register is the problem, the inverter would solve it.

You really need to disable read/write monitoring in gpmc-settings.

Quoted 3 lines

You're right am335x-evm uses waitpin0, which one is not affected from this "bug".

Why is it not affected by this bug? The polarities are same for am335x-evm and your board. Only the wait pin is different.

Quoted 11 lines

I have to use waitpin1, because i also have a 2nd ethernet interface connected, and there is waitpin0 uses for collission detect signal from the phy (other pinmux).

Quoted 3 lines

For NAND operation read/write wait monitoring must be disabled. The nand driver uses the WAIT pin purely for Read/Busy signalling. Unfortunately the existing driver cannot handle anything other than

waitpin 0

Quoted 1 line

for nand for DT boot.

for sure ? have a look to omap-gpmc.c at line #90. Here i can see that either can be used.

Which tree are you referring to?

Quoted 7 lines
Quoted 4 lines

I've tried to address this issue here
http://thread.gmane.org/gmane.linux.drivers.devicetree/131076

This is useful if the READY_nBUSY line cannot be connected to the GPMC itself, instead it maybe connected to some other gpio.
But it doesn't solve the problem.

It does. We are adding gpiolib and interrupt controller support for all the wait pins.

cheers,
-roger

#13 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

In reply to a message not in the archive

Hi Hannes,

Quoted 4 lines · Hannes Schmelzer

Hi Tony,

Did anyone test this changeset on some AM335x board?

Quoted 8 lines

Today I ran into trouble with that because:

The GPMC controller gets reseted on kernel boot due to the missing/removed HWMOD_INIT_NO_RESET flag.

Primary this should not be a big problem, but on my board (maybe on all AM335x) the GPMC doesn't behave as described in TRM. Especially the GPMC_CONFIG register is not reset to 0h after reset, instead it holds the value 0xa00 which is very strange because bit 10-31 are reserved.

Further this 0xa00 means that Bit9 (WAIT1PINPOLARITY) is set, exactly this causes my system to stall on first access the connected NAND flash because it never becomes ready due to the wrong wait pin polarity. Maybe others dont't run into trouble because they may use WAIT0PIN, which one has it's old polarity.

So nand ready/busy pin is connected to waitpin1 through an inverter on your board?

On am335x-evm we use waitpin0. Nand ready/busy is directly connected to waitpin0.

For NAND operation read/write wait monitoring must be disabled.
The nand driver uses the WAIT pin purely for Read/Busy signalling.
Unfortunately the existing driver cannot handle anything other than waitpin 0 for nand for DT boot.

I've tried to address this issue here
http://thread.gmane.org/gmane.linux.drivers.devicetree/131076

cheers,
-roger

Quoted 241 lines

First approach was simply to write 0x0 to the GPMC_CONFIG register during gpmc_probe function. It solves the problem.

I also tried to issue some SYSRESET through GPMC registers without success, same strange behavior.

What?s your thinking around that?

Best regards,
Hannes

linux-omap-owner at vger.kernel.org schrieb am 20.05.2015 23:21:03:

Quoted 226 lines

Von: Tony Lindgren <[email protected]>
An: linux-omap at vger.kernel.org
Kopie: linux-arm-kernel at lists.infradead.org, Brian Hutchinson <[email protected]>, Paul Walmsley <[email protected]>, Roger Quadros <[email protected]>
Datum: 20.05.2015 23:37
Betreff: [PATCH 2/2] memory: omap-gpmc: Add Kconfig option for debug Gesendet von: linux-omap-owner at vger.kernel.org

We support decoding the bootloader values if DEBUG is defined. But we also need to change the struct omap_hwmod flags to have HWMOD_INIT_NO_RESET to avoid the GPMC being reset during the boot. Otherwise just the default timings will be displayed instead of the bootloader configured timings.

This also allows us to clean up the various GPMC related hwmod flags. For debugging, we only need HWMOD_INIT_NO_RESET, and HWMOD_INIT_NO_IDLE is not needed.

Cc Brian Hutchinson <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Roger Quadros <[email protected]>
---
 arch/arm/mach-omap2/omap_hwmod.h                        |  6 ++++++
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c      | 12 ++----------
 arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c |  3 ++-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c              | 12 ++----------
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c              | 11 ++---------
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c               |  4 ++--
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c              |  2 ++
 drivers/memory/Kconfig                                  |  8 ++++++++
 drivers/memory/omap-gpmc.c                              |  6 +++---
 9 files changed, 29 insertions(+), 35 deletions(-)
arch/arm/mach-omap2/omap_hwmod.h +6 -0
index 9611c91..b5d27ec 100644
@@ -109,6 +109,12 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type3;
 
 #define DEBUG_OMAPUART_FLAGS   (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET)
 
+#ifdef CONFIG_OMAP_GPMC_DEBUG
+#define DEBUG_OMAP_GPMC_HWMOD_FLAGS   HWMOD_INIT_NO_RESET
+#else
+#define DEBUG_OMAP_GPMC_HWMOD_FLAGS   0
+#endif
+
 #if defined(CONFIG_DEBUG_OMAP2UART1)
 #undef DEBUG_OMAP2UART1_FLAGS
 #define DEBUG_OMAP2UART1_FLAGS DEBUG_OMAPUART_FLAGS
arch/arm/ renamed from arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +0 -0

mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index 8821b9d..6dcfd03 100644

arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +2 -10
@@ -762,16 +762,8 @@ struct omap_hwmod omap2xxx_gpmc_hwmod = {
    .name      = "gpmc",
    .class      = &omap2xxx_gpmc_hwmod_class,
    .main_clk   = "gpmc_fck",
-   /*
-    * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
-    * block.  It is not being added due to any known bugs with
-    * resetting the GPMC IP block, but rather because any timings
-    * set by the bootloader are not being correctly programmed by
-    * the kernel from the board file or DT data.
-    * HWMOD_INIT_NO_RESET should be removed ASAP.
-    */
-   .flags      = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
-            HWMOD_NO_IDLEST),
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .prcm      = {
       .omap2   = {
          .prcm_reg_id = 3,
arch/ renamed from arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +0 -0

arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c index cabc569..ae0cb67 100644

arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +2 -1
@@ -668,7 +668,8 @@ struct omap_hwmod am33xx_gpmc_hwmod = {
    .name      = "gpmc",
    .class      = &am33xx_gpmc_hwmod_class,
    .clkdm_name   = "l3s_clkdm",
-   .flags      = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .main_clk   = "l3s_gclk",
    .prcm      = {
       .omap4   = {
arch/arm/mach-omap2/ renamed from arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0 -0

omap_hwmod_3xxx_data.c
index 4e8e93c..0ca4d3f 100644

arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +2 -10
@@ -2169,16 +2169,8 @@ static struct omap_hwmod omap3xxx_gpmc_hwmod = {
    .clkdm_name   = "core_l3_clkdm",
    .mpu_irqs   = omap3xxx_gpmc_irqs,
    .main_clk   = "gpmc_fck",
-   /*
-    * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
-    * block.  It is not being added due to any known bugs with
-    * resetting the GPMC IP block, but rather because any timings
-    * set by the bootloader are not being correctly programmed by
-    * the kernel from the board file or DT data.
-    * HWMOD_INIT_NO_RESET should be removed ASAP.
-    */
-   .flags      = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
-            HWMOD_NO_IDLEST),
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
 };
 
 /*
arch/arm/mach-omap2/ renamed from arch/arm/mach-omap2/omap_hwmod_44xx_data.c +0 -0

omap_hwmod_44xx_data.c
index f5e68a7..43eebf2 100644

arch/arm/mach-omap2/omap_hwmod_44xx_data.c +2 -9
@@ -1188,15 +1188,8 @@ static struct omap_hwmod omap44xx_gpmc_hwmod = {
    .name      = "gpmc",
    .class      = &omap44xx_gpmc_hwmod_class,
    .clkdm_name   = "l3_2_clkdm",
-   /*
-    * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
-    * block.  It is not being added due to any known bugs with
-    * resetting the GPMC IP block, but rather because any timings
-    * set by the bootloader are not being correctly programmed by
-    * the kernel from the board file or DT data.
-    * HWMOD_INIT_NO_RESET should be removed ASAP.
-    */
-   .flags      = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .prcm = {
       .omap4 = {
          .clkctrl_offs = OMAP4_CM_L3_2_GPMC_CLKCTRL_OFFSET,
arch/arm/mach-omap2/ renamed from arch/arm/mach-omap2/omap_hwmod_7xx_data.c +0 -0

omap_hwmod_7xx_data.c
index 0e64c2f..a0411f3 100644

arch/arm/mach-omap2/omap_hwmod_7xx_data.c +2 -2
@@ -819,8 +819,8 @@ static struct omap_hwmod dra7xx_gpmc_hwmod = {
    .name      = "gpmc",
    .class      = &dra7xx_gpmc_hwmod_class,
    .clkdm_name   = "l3main1_clkdm",
-   .flags      = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
-            HWMOD_SWSUP_SIDLE),
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = HWMOD_SWSUP_SIDLE | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .main_clk   = "l3_iclk_div",
    .prcm = {
       .omap4 = {
arch/arm/mach-omap2/ renamed from arch/arm/mach-omap2/omap_hwmod_81xx_data.c +0 -0

omap_hwmod_81xx_data.c
index cab1eb6..c924137 100644

arch/arm/mach-omap2/omap_hwmod_81xx_data.c +2 -0
@@ -478,6 +478,8 @@ static struct omap_hwmod dm81xx_gpmc_hwmod = {
    .clkdm_name   = "alwon_l3s_clkdm",
    .class      = &dm81xx_gpmc_hwmod_class,
    .main_clk   = "sysclk6_ck",
+   /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
+   .flags      = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
    .prcm = {
       .omap4 = {
          .clkctrl_offs = DM816X_CM_ALWON_GPMC_CLKCTRL,
drivers/memory/Kconfig +8 -0
index 868036f..8406c668 100644
@@ -49,6 +49,14 @@ config OMAP_GPMC
      interfacing to a variety of asynchronous as well as synchronous
      memory drives like NOR, NAND, OneNAND, SRAM.
 
+config OMAP_GPMC_DEBUG
+   bool
+   depends on OMAP_GPMC
+   help
+     Enables verbose debugging mostly to decode the bootloader provided
+     timings. Enable this during development to configure devices
+     connected to the GPMC bus.
+
 config MVEBU_DEVBUS
    bool "Marvell EBU Device Bus Controller"
    default y
drivers/memory/omap-gpmc.c +1 -1
index 0e524a1..3a27a84 100644
@@ -403,7 +403,7 @@ static void gpmc_cs_bool_timings(int cs, const struct
 gpmc_bool_timings *p)
             p->cycle2cyclediffcsen);
 }
 
-#ifdef DEBUG
+#ifdef CONFIG_OMAP_GPMC_DEBUG
 /**
  * get_gpmc_timing_reg - read a timing parameter and print DTS settings for it.

* @cs: Chip Select Region

drivers/memory/omap-gpmc.c +0 -0
@@ -612,7 +612,7 @@ static int set_gpmc_timing_reg(int cs, int reg, int

st_bit, int end_bit, int max

    }
 
    l = gpmc_cs_read_reg(cs, reg);
drivers/memory/omap-gpmc.c +2 -3
-#ifdef DEBUG
+#ifdef CONFIG_OMAP_GPMC_DEBUG
    pr_info(
       "GPMC CS%d: %-17s: %3d ticks, %3lu ns (was %3i ticks) %3d ns\n",
           cs, name, ticks, gpmc_get_clk_period(cs, cd) * ticks / 1000,
@@ -767,7 +767,7 @@ int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t,
              GPMC_CONFIG1_CLKACTIVATIONTIME_MAX,
              clk_activation, GPMC_CD_FCLK);
 
-#ifdef DEBUG
+#ifdef CONFIG_OMAP_GPMC_DEBUG
    pr_info("GPMC CS%d CLK period is %lu ns (div %d)\n",
          cs, (div * gpmc_get_fclk_period()) / 1000, div);
 #endif
--

2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

#14 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

In reply to Tony Lindgren

Hi Tony,

Quoted 14 lines · Tony Lindgren

We support decoding the bootloader values if DEBUG is defined. But we also need to change the struct omap_hwmod flags to have HWMOD_INIT_NO_RESET to avoid the GPMC being reset during the boot. Otherwise just the default timings will be displayed instead of the bootloader configured timings.

This also allows us to clean up the various GPMC related hwmod flags. For debugging, we only need HWMOD_INIT_NO_RESET, and HWMOD_INIT_NO_IDLE is not needed.

Cc Brian Hutchinson <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Roger Quadros <[email protected]>
Quoted 12 lines
---
  arch/arm/mach-omap2/omap_hwmod.h                        |  6 ++++++
  arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c      | 12 ++----------
  arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c |  3 ++-
  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c              | 12 ++----------
  arch/arm/mach-omap2/omap_hwmod_44xx_data.c              | 11 ++---------
  arch/arm/mach-omap2/omap_hwmod_7xx_data.c               |  4 ++--
  arch/arm/mach-omap2/omap_hwmod_81xx_data.c              |  2 ++
  drivers/memory/Kconfig                                  |  8 ++++++++
  drivers/memory/omap-gpmc.c                              |  6 +++---
  9 files changed, 29 insertions(+), 35 deletions(-)

1. Happy new year :)

2. It was a while I tested upstream on N900 but I had some spare time during the holidays to play, so I tried to boot 4.4-rc6 with Maemo 5. To my surprise, after that try, Maemo 5 rootfs, which is located on onenand became irreversibly corrupted. I bisected the tree to the $subject commit and after restoring HWMOD_INIT_NO_RESET in omap3xxx_gpmc_hwmod flags, the problem was solved. It seems that GPMC is either incorrectly or incompletely setup by the kernel, leading to failed onenand reads/writes and whatnot. Unfortunately, what I have here is a release device, so I am unable to capture any logs through the serial port. BTW keep in mind that rootfs corruption happens as soon as a boot is attempted, even after a freshly flashed rootfs.

Please advice on how to proceed.

Regards,
Ivo

author maintainer
#15 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 30 lines · Ivaylo Dimitrov

Hi Tony,

Quoted 14 lines · Tony Lindgren

We support decoding the bootloader values if DEBUG is defined. But we also need to change the struct omap_hwmod flags to have HWMOD_INIT_NO_RESET to avoid the GPMC being reset during the boot. Otherwise just the default timings will be displayed instead of the bootloader configured timings.

This also allows us to clean up the various GPMC related hwmod flags. For debugging, we only need HWMOD_INIT_NO_RESET, and HWMOD_INIT_NO_IDLE is not needed.

Cc Brian Hutchinson <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Roger Quadros <[email protected]>
Quoted 12 lines
---
 arch/arm/mach-omap2/omap_hwmod.h                        |  6 ++++++
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c      | 12 ++----------
 arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c |  3 ++-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c              | 12 ++----------
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c              | 11 ++---------
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c               |  4 ++--
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c              |  2 ++
 drivers/memory/Kconfig                                  |  8 ++++++++
 drivers/memory/omap-gpmc.c                              |  6 +++---
 9 files changed, 29 insertions(+), 35 deletions(-)
Quoted 1 line

1. Happy new year :)

Same to you :)

Quoted 11 lines

2. It was a while I tested upstream on N900 but I had some spare time during the holidays to play, so I tried to boot 4.4-rc6 with Maemo 5. To my surprise, after that try, Maemo 5 rootfs, which is located on onenand became irreversibly corrupted. I bisected the tree to the $subject commit and after restoring HWMOD_INIT_NO_RESET in omap3xxx_gpmc_hwmod flags, the problem was solved. It seems that GPMC is either incorrectly or incompletely setup by the kernel, leading to failed onenand reads/writes and whatnot. Unfortunately, what I have here is a release device, so I am unable to capture any logs through the serial port. BTW keep in mind that rootfs corruption happens as soon as a boot is attempted, even after a freshly flashed rootfs.

Oh crap, sorry to hear that :(

Care to boot with CONFIG_OMAP_GPMC_DEBUG=y and post the gpmc related dmesg output? The dmesg timings with CONFIG_OMAP_GPMC_DEBUG enabled should be compared against omap3-n900.dts gpmc timings. And if you don't see the whole dmesg after booting, you may need to also increase CONFIG_LOG_BUF_SHIFT. Meanwhile, I'll try to also produce it here.

Chances are we have bad or incomplete timings in the n900 :(

Regards,

Tony

#16 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 2 lines · On Monday 04 January 2016 18:02:06 Tony Lindgren wrote:

Care to boot with CONFIG_OMAP_GPMC_DEBUG=y and post the gpmc related dmesg output?

Hi Tony. We do not have serial console for N900 and so when kernel is not fully bootable to userspace we cannot provide dmesg for you :-(

Maybe something with simple initramfs could work, but really if you have serial console for N900 it should be for you lot of easier to get it.

Signature · 9 lines
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160104/a0f5088e/attachment.sig>
author maintainer
#17 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 6 lines · Pali Roh?r
Quoted 2 lines · On Monday 04 January 2016 18:02:06 Tony Lindgren wrote:

Care to boot with CONFIG_OMAP_GPMC_DEBUG=y and post the gpmc related dmesg output?

Hi Tony. We do not have serial console for N900 and so when kernel is not fully bootable to userspace we cannot provide dmesg for you :-(

OK

Quoted 2 lines

Maybe something with simple initramfs could work, but really if you have serial console for N900 it should be for you lot of easier to get it.

Yeah OK will take a look ASAP. Is this happening with both legacy booting and dts based booting?

For testing, CONFIG_INITRAMFS_SOURCE etc allow building initramfs that's appended to the kernel.

Regards,

Tony

#18 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Hi,

Quoted 3 lines · Tony Lindgren
Quoted 3 lines · On Monday 04 January 2016 18:02:06 Tony Lindgren wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Care to boot with CONFIG_OMAP_GPMC_DEBUG=y and post the gpmc related dmesg output?

Here it is, including the pre-gpmc log, keep in mind this is with restored HWMOD_INIT_NO_RESET flag so rootfs is functional and I can get dmesg output from the syslog. Don't know if it is helpful :). Also, this device has Numonyx onenand (HW rev. 2204), unlike most of the others which have Samsung onenand (HW rev. 2101 etc), no idea if it is relevant.

Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Booting Linux on 
physical CPU 0x0
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Initializing cgroup 
subsys cpu
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Linux version 
4.4.0-rc7+ (ivo at ivo-H81M-S2PV) (gcc version 4.7.2 20120701 (prerelease) 
(Linaro GCC 4.7-2012.07) ) #4 PREEMPT Mon Jan 4 20:30:31 EET 2016
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] CPU: ARMv7 Processor 
[411fc083] revision 3 (ARMv7), cr=10c5387d
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] CPU: PIPT / VIPT 
nonaliasing data cache, VIPT nonaliasing instruction cache
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Machine model: Nokia N900
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Memory policy: Data 
cache writeback
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] On node 0 totalpages: 
65280
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] free_area_init_node: 
node 0, pgdat c06776f8, node_mem_map cfcf9000
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]   Normal zone: 512 
pages used for memmap
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]   Normal zone: 0 pages 
reserved
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]   Normal zone: 65280 
pages, LIFO batch:15
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] CPU: All CPU(s) 
started in SVC mode.
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] OMAP3430/3530 ES3.1 
(l2cache iva sgx neon isp )
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] pcpu-alloc: s0 r0 
d32768 u32768 alloc=1*32768
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] pcpu-alloc: [0] 0
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Built 1 zonelists in 
Zone order, mobility grouping on.  Total pages: 64768
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Kernel command line: 
init=/sbin/preinit ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs 
rootflags=bulk_read,no_chk_data_crc rw mtdoops.mtddev=log console=tty0 
console=ttyO2 omapfb_vram=7M omapfb.mode=lcd:848x480-16 nokia-modem.pm=0
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] PID hash table 
entries: 1024 (order: 0, 4096 bytes)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Dentry cache hash 
table entries: 32768 (order: 5, 131072 bytes)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Inode-cache hash table 
entries: 16384 (order: 4, 65536 bytes)
Jan  4 20:42:50 Nokia-N900 cellular: csd[1026]: com.nokia.phone.SIM: 
csd-libsimpb::configure: args=<(null)>
Jan  4 20:42:50 Nokia-N900 cellular: csd[1026]: Succesfully loaded 
plugin <simpb>
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Memory: 
251588K/261120K available (4487K kernel code, 232K rwdata, 1624K rodata, 
244K init, 256K bss, 9532K reserved, 0K cma-reserved, 0K highmem)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Virtual kernel memory 
layout:
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]     vector  : 
0xffff0000 - 0xffff1000   (   4 kB)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]     fixmap  : 
0xffc00000 - 0xfff00000   (3072 kB)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]     vmalloc : 
0xd0800000 - 0xff800000   ( 752 MB)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]     lowmem  : 
0xc0000000 - 0xd0000000   ( 256 MB)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]     pkmap   : 
0xbfe00000 - 0xc0000000   (   2 MB)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]     modules : 
0xbf000000 - 0xbfe00000   (  14 MB)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]       .text : 
0xc0008000 - 0xc0600044   (6113 kB)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]       .init : 
0xc0601000 - 0xc063e000   ( 244 kB)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]       .data : 
0xc063e000 - 0xc0678240   ( 233 kB)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000]        .bss : 
0xc0678240 - 0xc06b8628   ( 257 kB)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] SLUB: HWalign=64, 
Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Preemptible 
hierarchical RCU implementation.
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] ^IBuild-time 
adjustment of leaf fanout to 32.
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] NR_IRQS:16 nr_irqs:16 16
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] IRQ: Found an INTC at 
0xfa200000 (revision 4.0) with 96 interrupts
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] Clocking rate 
(Crystal/Core/MPU): 19.2/332/500 MHz
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] OMAP clockevent 
source: timer1 at 32768 Hz
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000000] clocksource: 
32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 
58327039986419 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000030] sched_clock: 32 bits 
at 32kHz, resolution 30517ns, wraps every 65535999984741ns
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000030] OMAP clocksource: 
32k_counter at 32768 Hz
Jan  4 20:42:50 Nokia-N900 kernel: [    0.000579] Console: colour dummy 
device 80x30
Jan  4 20:42:50 Nokia-N900 kernel: [    0.001922] console [tty0] enabled
Jan  4 20:42:50 Nokia-N900 kernel: [    0.001983] Calibrating delay 
loop... 496.43 BogoMIPS (lpj=2482176)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.048522] pid_max: default: 
32768 minimum: 301
Jan  4 20:42:50 Nokia-N900 kernel: [    0.048675] Security Framework 
initialized
Jan  4 20:42:50 Nokia-N900 kernel: [    0.048797] Mount-cache hash table 
entries: 1024 (order: 0, 4096 bytes)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.048858] Mountpoint-cache hash 
table entries: 1024 (order: 0, 4096 bytes)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.049987] Initializing cgroup 
subsys io
Jan  4 20:42:50 Nokia-N900 kernel: [    0.050079] Initializing cgroup 
subsys freezer
Jan  4 20:42:50 Nokia-N900 kernel: [    0.050201] CPU: Testing write 
buffer coherency: ok
Jan  4 20:42:50 Nokia-N900 kernel: [    0.050842] Setting up static 
identity map for 0x80008200 - 0x80008258
Jan  4 20:42:50 Nokia-N900 kernel: [    0.055541] devtmpfs: initialized
Jan  4 20:42:50 Nokia-N900 kernel: [    0.102020] VFP support v0.3: 
implementor 41 architecture 3 part 30 variant c rev 1
Jan  4 20:42:50 Nokia-N900 kernel: [    0.122650] omap_hwmod: 
mcbsp2_sidetone using broken dt data from mcbsp
Jan  4 20:42:50 Nokia-N900 kernel: [    0.123352] omap_hwmod: 
mcbsp3_sidetone using broken dt data from mcbsp
Jan  4 20:42:50 Nokia-N900 kernel: [    0.163696] clocksource: jiffies: 
mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    0.164520] pinctrl core: 
initialized pinctrl subsystem
Jan  4 20:42:50 Nokia-N900 kernel: [    0.166320] NET: Registered 
protocol family 16
Jan  4 20:42:50 Nokia-N900 kernel: [    0.168090] DMA: preallocated 256 
KiB pool for atomic coherent allocations
Jan  4 20:42:50 Nokia-N900 kernel: [    0.198181] cpuidle: using 
governor ladder
Jan  4 20:42:50 Nokia-N900 kernel: [    0.228118] cpuidle: using 
governor menu
Jan  4 20:42:50 Nokia-N900 kernel: [    0.228942] Reprogramming SDRC 
clock to 332000000 Hz
Jan  4 20:42:50 Nokia-N900 kernel: [    0.236511] OMAP GPIO hardware 
version 2.5
Jan  4 20:42:50 Nokia-N900 kernel: [    0.244018] irq: no irq domain 
found for /ocp/l4 at 48000000/scm at 2000/pinmux at 30 !
Jan  4 20:42:50 Nokia-N900 kernel: [    0.244720] irq: no irq domain 
found for /ocp/l4 at 48000000/scm at 2000/pinmux at 30 !
Jan  4 20:42:50 Nokia-N900 kernel: [    0.259796] omap-gpmc 
6e000000.gpmc: could not find pctldev for node 
/ocp/l4 at 48000000/scm at 2000/pinmux at 30/pinmux_gpmc_pins, deferring probe
Jan  4 20:42:50 Nokia-N900 kernel: [    0.264739] RX-51: Add gpio switches
Jan  4 20:42:50 Nokia-N900 kernel: [    0.264831] RX-51: Enabling ARM 
errata 430973 workaround
Jan  4 20:42:50 Nokia-N900 kernel: [    0.266632] RX-51: Registring 
OMAP3 HWRNG device
Jan  4 20:42:50 Nokia-N900 kernel: [    0.270538] hw-breakpoint: debug 
architecture 0x4 unsupported.
Jan  4 20:42:50 Nokia-N900 kernel: [    0.271789] Reserving DMA channels 
0 and 1 for HS ROM code
Jan  4 20:42:50 Nokia-N900 kernel: [    0.271881] OMAP DMA hardware 
revision 4.0
Jan  4 20:42:50 Nokia-N900 kernel: [    0.293609] omap-dma-engine 
48056000.dma-controller: OMAP DMA engine driver
Jan  4 20:42:50 Nokia-N900 kernel: [    0.299499] omap-iommu 
480bd400.mmu: 480bd400.mmu registered
Jan  4 20:42:50 Nokia-N900 kernel: [    0.300292] usbcore: registered 
new interface driver usbfs
Jan  4 20:42:50 Nokia-N900 kernel: [    0.300476] usbcore: registered 
new interface driver hub
Jan  4 20:42:50 Nokia-N900 kernel: [    0.300689] usbcore: registered 
new device driver usb
Jan  4 20:42:50 Nokia-N900 kernel: [    0.301818] omap_i2c 48070000.i2c: 
could not find pctldev for node 
/ocp/l4 at 48000000/scm at 2000/pinmux at 30/pinmux_i2c1_pins, deferring probe
Jan  4 20:42:50 Nokia-N900 kernel: [    0.301940] omap_i2c 48072000.i2c: 
could not find pctldev for node 
/ocp/l4 at 48000000/scm at 2000/pinmux at 30/pinmux_i2c2_pins, deferring probe
Jan  4 20:42:50 Nokia-N900 kernel: [    0.302093] omap_i2c 48060000.i2c: 
could not find pctldev for node 
/ocp/l4 at 48000000/scm at 2000/pinmux at 30/pinmux_i2c3_pins, deferring probe
Jan  4 20:42:50 Nokia-N900 kernel: [    0.303466] omap-mailbox 
48094000.mailbox: omap mailbox rev 0x40
Jan  4 20:42:50 Nokia-N900 kernel: [    0.304077] Advanced Linux Sound 
Architecture Driver Initialized.
Jan  4 20:42:50 Nokia-N900 kernel: [    0.305694] clocksource: Switched 
to clocksource 32k_counter
Jan  4 20:42:50 Nokia-N900 kernel: [    0.325592] NET: Registered 
protocol family 2
Jan  4 20:42:50 Nokia-N900 kernel: [    0.326934] TCP established hash 
table entries: 2048 (order: 1, 8192 bytes)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.327056] TCP bind hash table 
entries: 2048 (order: 1, 8192 bytes)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.327148] TCP: Hash tables 
configured (established 2048 bind 2048)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.327331] UDP hash table 
entries: 256 (order: 0, 4096 bytes)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.327423] UDP-Lite hash table 
entries: 256 (order: 0, 4096 bytes)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.327697] NET: Registered 
protocol family 1
Jan  4 20:42:50 Nokia-N900 kernel: [    0.332336] futex hash table 
entries: 256 (order: -1, 3072 bytes)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.350402] VFS: Disk quotas 
dquot_6.6.0
Jan  4 20:42:50 Nokia-N900 kernel: [    0.350891] VFS: Dquot-cache hash 
table entries: 1024 (order 0, 4096 bytes)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.353790] squashfs: version 4.0 
(2009/01/31) Phillip Lougher
Jan  4 20:42:50 Nokia-N900 kernel: [    0.356262] io scheduler noop 
registered
Jan  4 20:42:50 Nokia-N900 kernel: [    0.356323] io scheduler deadline 
registered
Jan  4 20:42:50 Nokia-N900 kernel: [    0.356781] io scheduler cfq 
registered (default)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.358276] pinctrl-single 
48002030.pinmux: 284 pins at pa fa002030 size 568
Jan  4 20:42:50 Nokia-N900 kernel: [    0.358734] pinctrl-single 
48002a00.pinmux: 46 pins at pa fa002a00 size 92
Jan  4 20:42:50 Nokia-N900 kernel: [    0.359436] pinctrl-single 
480025d8.pinmux: 18 pins at pa fa0025d8 size 36
Jan  4 20:42:50 Nokia-N900 kernel: [    0.361846] 48050000.dss supply 
vdda_video not found, using dummy regulator
Jan  4 20:42:50 Nokia-N900 kernel: [    0.362213] OMAP DSS rev 2.0
Jan  4 20:42:50 Nokia-N900 kernel: [    0.362579] omapdss_dss 
48050000.dss: bound 48050400.dispc (ops dispc_component_ops)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.362884] omapdss_dss 
48050000.dss: bound 48050c00.encoder (ops venc_component_ops)
Jan  4 20:42:50 Nokia-N900 kernel: [    0.364379] omapfb omapfb: no displays
Jan  4 20:42:50 Nokia-N900 kernel: [    0.364562] omapfb omapfb: failed 
to setup omapfb
Jan  4 20:42:50 Nokia-N900 kernel: [    0.366119] 4806c000.serial: ttyO1 
at MMIO 0x4806c000 (irq = 89, base_baud = 3000000) is a OMAP UART1
Jan  4 20:42:50 Nokia-N900 kernel: [    0.367340] 49020000.serial: ttyO2 
at MMIO 0x49020000 (irq = 90, base_baud = 3000000) is a OMAP UART2
Jan  4 20:42:50 Nokia-N900 kernel: [    1.059082] console [ttyO2] enabled
Jan  4 20:42:50 Nokia-N900 kernel: [    1.064483] omap3_rom_rng: 
initializing
Jan  4 20:42:50 Nokia-N900 kernel: [    1.096862] brd: module loaded
Jan  4 20:42:50 Nokia-N900 kernel: [    1.115020] acx565akm spi1.2: 
omapfb: acx565akm rev ad LCD detected
Jan  4 20:42:50 Nokia-N900 kernel: [    1.126892] HS USB OTG: no 
transceiver configured
Jan  4 20:42:50 Nokia-N900 kernel: [    1.131958] musb-hdrc 
musb-hdrc.0.auto: musb_init_controller failed with status -517
Jan  4 20:42:50 Nokia-N900 kernel: [    1.141479] i2c /dev entries driver
Jan  4 20:42:50 Nokia-N900 kernel: [    1.209594] rx51-audio n900-audio: 
could not get speaker enable gpio
Jan  4 20:42:50 Nokia-N900 kernel: [    1.217315] Initializing XFRM 
netlink socket
Jan  4 20:42:50 Nokia-N900 kernel: [    1.221893] NET: Registered 
protocol family 17
Jan  4 20:42:50 Nokia-N900 kernel: [    1.226837] NET: Registered 
protocol family 15
Jan  4 20:42:50 Nokia-N900 kernel: [    1.231597] NET: Registered 
protocol family 35
Jan  4 20:42:50 Nokia-N900 kernel: [    1.236541] Key type dns_resolver 
registered
Jan  4 20:42:50 Nokia-N900 kernel: [    1.241485] 
omap2_set_init_voltage: unable to find boot up OPP for vdd_mpu_iva
Jan  4 20:42:50 Nokia-N900 kernel: [    1.249176] 
omap2_set_init_voltage: unable to set vdd_mpu_iva
Jan  4 20:42:50 Nokia-N900 kernel: [    1.255218] 
omap2_set_init_voltage: unable to find boot up OPP for vdd_core
Jan  4 20:42:50 Nokia-N900 kernel: [    1.262603] 
omap2_set_init_voltage: unable to set vdd_core
Jan  4 20:42:50 Nokia-N900 kernel: [    1.274322] ThumbEE CPU extension 
supported.
Jan  4 20:42:50 Nokia-N900 kernel: [    1.278991] SmartReflex Class3 
initialized
Jan  4 20:42:50 Nokia-N900 kernel: [    1.283721] Bootup reason: pwr_key
Jan  4 20:42:50 Nokia-N900 kernel: [    1.287414] OMAP GPIO switch 
handler initializing
Jan  4 20:42:50 Nokia-N900 kernel: [    1.293090] gpio-switch: 
gpio_reguest failed for cam_focus 68
Jan  4 20:42:50 Nokia-N900 kernel: [    1.299438] gpio-switch: 
gpio_reguest failed for cam_launch 69
Jan  4 20:42:50 Nokia-N900 kernel: [    1.305847] gpio-switch: 
gpio_reguest failed for cam_shutter 110
Jan  4 20:42:50 Nokia-N900 kernel: [    1.313842] gpio-switch: 
gpio_reguest failed for headphone 177
Jan  4 20:42:50 Nokia-N900 kernel: [    1.320281] gpio-switch: 
gpio_reguest failed for kb_lock 113
Jan  4 20:42:50 Nokia-N900 kernel: [    1.326507] gpio-switch: 
gpio_reguest failed for proximity 89
Jan  4 20:42:50 Nokia-N900 kernel: [    1.332794] gpio-switch: 
gpio_reguest failed for sleep_ind 162
Jan  4 20:42:50 Nokia-N900 kernel: [    1.339172] gpio-switch: 
gpio_reguest failed for slide 71
Jan  4 20:42:50 Nokia-N900 kernel: [    1.344970] slide (GPIO 71) is now 
open
Jan  4 20:42:50 Nokia-N900 kernel: [    1.349090] proximity (GPIO 89) is 
now open
Jan  4 20:42:50 Nokia-N900 kernel: [    1.353485] kb_lock (GPIO 113) is 
now closed
Jan  4 20:42:50 Nokia-N900 kernel: [    1.358032] headphone (GPIO 177) 
is now connected
Jan  4 20:42:50 Nokia-N900 kernel: [    1.363037] cam_shutter (GPIO 110) 
is now closed
Jan  4 20:42:50 Nokia-N900 kernel: [    1.367980] cam_launch (GPIO 69) 
is now active
Jan  4 20:42:50 Nokia-N900 kernel: [    1.372680] cam_focus (GPIO 68) is 
now active
Jan  4 20:42:50 Nokia-N900 kernel: [    1.378692] registered taskstats 
version 1
Jan  4 20:42:50 Nokia-N900 kernel: [    1.385314] omap-gpmc 
6e000000.gpmc: GPMC revision 5.0
Jan  4 20:42:50 Nokia-N900 kernel: [    1.391510] GPMC CS0: cs_on 
      :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.399536] GPMC CS0: cs_rd_off 
      :  14 ticks,  84 ns (was  16 ticks)  84 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.407531] GPMC CS0: cs_wr_off 
      :  12 ticks,  72 ns (was  16 ticks)  72 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.415435] GPMC CS0: adv_on 
      :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.423431] GPMC CS0: adv_rd_off 
      :   3 ticks,  18 ns (was   2 ticks)  18 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.431365] GPMC CS0: adv_wr_off 
      :   3 ticks,  18 ns (was   2 ticks)  18 ns
Jan  4 20:42:50 Nokia-N900 DSME: process '/usr/bin/Xorg -logfile 
/tmp/Xorg.0.log -logverbose 1 -nolisten tcp -noreset -s 0 -core' started 
with pid 1095
Jan  4 20:42:50 Nokia-N900 kernel: [    1.439361] GPMC CS0: oe_on 
      :   5 ticks,  30 ns (was   2 ticks)  30 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.447357] GPMC CS0: oe_off 
      :  14 ticks,  84 ns (was  16 ticks)  84 ns
Jan  4 20:42:50 Nokia-N900 cellular: csd[1026]: Succesfully loaded 
plugin <sms>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.455322] GPMC CS0: we_on 
      :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.463226] GPMC CS0: we_off 
      :   7 ticks,  42 ns (was  16 ticks)  42 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.471160] GPMC CS0: rd_cycle 
      :  18 ticks, 108 ns (was  19 ticks) 108 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.479156] GPMC CS0: wr_cycle 
      :  16 ticks,  96 ns (was  19 ticks)  96 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.487152] GPMC CS0: access 
      :  13 ticks,  78 ns (was  15 ticks)  78 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.495117] GPMC CS0: 
page_burst_access:   0 ticks,   0 ns (was   2 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.503112] GPMC CS0: 
bus_turnaround   :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.511047] GPMC CS0: 
cycle2cycle_delay:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.518981] GPMC CS0: 
wr_data_mux_bus  :   5 ticks,  30 ns (was   5 ticks)  30 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.526916] GPMC CS0: wr_access 
      :   0 ticks,   0 ns (was  15 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.534851] GPMC CS0: 
wait_monitoring  :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.542785] GPMC CS0: 
clk_activation   :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.550720] GPMC CS0 CLK period is 
6 ns (div 1)
Jan  4 20:42:50 Nokia-N900 kernel: [    1.555511] gpmc cs0 after 
gpmc_cs_set_timings:
Jan  4 20:42:50 Nokia-N900 kernel: [    1.560333] cs0 GPMC_CS_CONFIG1: 
0xd1001200
Jan  4 20:42:50 Nokia-N900 kernel: [    1.564758] cs0 GPMC_CS_CONFIG2: 
0x000c0e00
Jan  4 20:42:50 Nokia-N900 kernel: [    1.571014] cs0 GPMC_CS_CONFIG3: 
0x00030300
Jan  4 20:42:50 Nokia-N900 kernel: [    1.575500] cs0 GPMC_CS_CONFIG4: 
0x07000e05
Jan  4 20:42:50 Nokia-N900 kernel: [    1.580047] cs0 GPMC_CS_CONFIG5: 
0x000d1012
Jan  4 20:42:50 Nokia-N900 kernel: [    1.584503] cs0 GPMC_CS_CONFIG6: 
0x80050000
Jan  4 20:42:50 Nokia-N900 kernel: [    1.588958] gpmc cs0 access 
configuration:
Jan  4 20:42:50 Nokia-N900 kernel: [    1.593292] gpmc,mux-add-data = <2>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.597015] gpmc,device-width = <1>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.600738] gpmc,wait-pin = <0>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.604064] gpmc,burst-length = <16>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.607910] gpmc,burst-write = <1>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.611511] gpmc,burst-read = <1>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.615020] gpmc,burst-wrap = <1>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.618591] gpmc cs0 timings 
configuration:
Jan  4 20:42:50 Nokia-N900 kernel: [    1.623016] gpmc,cs-on-ns = <0> /* 
0 ns - 0 ns; 0 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.628875] gpmc,cs-rd-off-ns = 
<84> /* 79 ns - 84 ns; 14 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.635375] gpmc,cs-wr-off-ns = 
<72> /* 67 ns - 72 ns; 12 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.641967] gpmc,adv-on-ns = <0> 
/* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.647857] gpmc,adv-rd-off-ns = 
<18> /* 13 ns - 18 ns; 3 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.654388] gpmc,adv-wr-off-ns = 
<18> /* 13 ns - 18 ns; 3 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.660919] gpmc,oe-on-ns = <30> 
/* 25 ns - 30 ns; 5 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.667053] gpmc,oe-off-ns = <84> 
/* 79 ns - 84 ns; 14 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.673309] gpmc,we-on-ns = <0> /* 
0 ns - 0 ns; 0 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.679107] gpmc,we-off-ns = <42> 
/* 37 ns - 42 ns; 7 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.685272] gpmc,rd-cycle-ns = 
<108> /* 103 ns - 108 ns; 18 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.691986] gpmc,wr-cycle-ns = 
<96> /* 91 ns - 96 ns; 16 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.698455] gpmc,access-ns = <78> 
/* 73 ns - 78 ns; 13 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.704681] 
gpmc,page-burst-access-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.711608] gpmc,bus-turnaround-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.718231] 
gpmc,cycle2cycle-delay-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:50 Nokia-N900 cellular: csd[1026]: Succesfully loaded 
plugin <ss>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.725128] 
gpmc,wait-monitoring-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.731903] gpmc,clk-activation-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.738525] 
gpmc,wr-data-mux-bus-ns = <30> /* 25 ns - 30 ns; 5 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.745544] gpmc,wr-access-ns = 
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.751831] GPMC CS0: cs_on 
      :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.759765] GPMC CS0: cs_rd_off 
      :  16 ticks,  96 ns (was  14 ticks)  96 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.767761] GPMC CS0: cs_wr_off 
      :  16 ticks,  96 ns (was  12 ticks)  96 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.775665] GPMC CS0: adv_on 
      :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.783569] GPMC CS0: adv_rd_off 
      :   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.791534] GPMC CS0: adv_wr_off 
      :   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.799468] GPMC CS0: oe_on 
      :   3 ticks,  18 ns (was   5 ticks)  18 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.807403] GPMC CS0: oe_off 
      :  16 ticks,  96 ns (was  14 ticks)  96 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.815307] GPMC CS0: we_on 
      :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.823242] GPMC CS0: we_off 
      :  16 ticks,  96 ns (was   7 ticks)  96 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.831176] GPMC CS0: rd_cycle 
      :  19 ticks, 114 ns (was  18 ticks) 114 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.839111] GPMC CS0: wr_cycle 
      :  19 ticks, 114 ns (was  16 ticks) 114 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.847106] GPMC CS0: access 
      :  15 ticks,  90 ns (was  13 ticks)  90 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.854980] GPMC CS0: 
page_burst_access:   2 ticks,  12 ns (was   0 ticks)  12 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.862976] GPMC CS0: 
bus_turnaround   :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.870971] GPMC CS0: 
cycle2cycle_delay:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.878906] GPMC CS0: 
wr_data_mux_bus  :   5 ticks,  30 ns (was   5 ticks)  30 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.886840] GPMC CS0: wr_access 
      :  15 ticks,  90 ns (was   0 ticks)  90 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.894744] GPMC CS0: 
wait_monitoring  :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.902740] GPMC CS0: 
clk_activation   :   1 ticks,   6 ns (was   0 ticks)   6 ns
Jan  4 20:42:50 Nokia-N900 kernel: [    1.910675] GPMC CS0 CLK period is 
12 ns (div 2)
Jan  4 20:42:50 Nokia-N900 kernel: [    1.915557] gpmc cs0 after 
gpmc_cs_set_timings:
Jan  4 20:42:50 Nokia-N900 kernel: [    1.920410] cs0 GPMC_CS_CONFIG1: 
0xfb001201
Jan  4 20:42:50 Nokia-N900 kernel: [    1.924835] cs0 GPMC_CS_CONFIG2: 
0x00101000
Jan  4 20:42:50 Nokia-N900 kernel: [    1.929321] cs0 GPMC_CS_CONFIG3: 
0x00020200
Jan  4 20:42:50 Nokia-N900 kernel: [    1.933776] cs0 GPMC_CS_CONFIG4: 
0x10001003
Jan  4 20:42:50 Nokia-N900 kernel: [    1.938262] cs0 GPMC_CS_CONFIG5: 
0x020f1313
Jan  4 20:42:50 Nokia-N900 kernel: [    1.942687] cs0 GPMC_CS_CONFIG6: 
0x8f050000
Jan  4 20:42:50 Nokia-N900 kernel: [    1.947143] gpmc cs0 access 
configuration:
Jan  4 20:42:50 Nokia-N900 kernel: [    1.951477] gpmc,mux-add-data = <2>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.955169] gpmc,device-width = <1>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.958892] gpmc,wait-pin = <0>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.962249] gpmc,burst-length = <16>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.966094] gpmc,sync-write = <1>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.969604] gpmc,burst-write = <1>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.973236] gpmc,gpmc,sync-read = <1>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.977142] gpmc,burst-read = <1>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.980651] gpmc,burst-wrap = <1>
Jan  4 20:42:50 Nokia-N900 kernel: [    1.984161] gpmc cs0 timings 
configuration:
Jan  4 20:42:50 Nokia-N900 kernel: [    1.988616] gpmc,cs-on-ns = <0> /* 
0 ns - 0 ns; 0 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    1.994415] gpmc,cs-rd-off-ns = 
<96> /* 91 ns - 96 ns; 16 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    2.000976] gpmc,cs-wr-off-ns = 
<96> /* 91 ns - 96 ns; 16 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    2.007537] gpmc,adv-on-ns = <0> 
/* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    2.013397] gpmc,adv-rd-off-ns = 
<12> /* 7 ns - 12 ns; 2 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    2.019836] gpmc,adv-wr-off-ns = 
<12> /* 7 ns - 12 ns; 2 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    2.026306] gpmc,oe-on-ns = <18> 
/* 13 ns - 18 ns; 3 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    2.032348] gpmc,oe-off-ns = <96> 
/* 91 ns - 96 ns; 16 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    2.038635] gpmc,we-on-ns = <0> /* 
0 ns - 0 ns; 0 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    2.044464] gpmc,we-off-ns = <96> 
/* 91 ns - 96 ns; 16 ticks */
Jan  4 20:42:50 Nokia-N900 kernel: [    2.050781] gpmc,rd-cycle-ns = 
<114> /* 109 ns - 114 ns; 19 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.057525] gpmc,wr-cycle-ns = 
<114> /* 109 ns - 114 ns; 19 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.064208] gpmc,access-ns = <90> 
/* 85 ns - 90 ns; 15 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.070526] 
gpmc,page-burst-access-ns = <12> /* 7 ns - 12 ns; 2 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.077636] gpmc,bus-turnaround-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.084289] 
gpmc,cycle2cycle-delay-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.091186] 
gpmc,wait-monitoring-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.097930] gpmc,clk-activation-ns 
= <6> /* 1 ns - 6 ns; 1 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.104583] 
gpmc,wr-data-mux-bus-ns = <30> /* 25 ns - 30 ns; 5 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.111633] gpmc,wr-access-ns = 
<90> /* 85 ns - 90 ns; 15 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.118194] omap2-onenand 
omap2-onenand: initializing on CS0, phys base 0x01000000, virtual base 
d0940000, freq 83 MHz
Jan  4 20:42:51 Nokia-N900 kernel: [    2.129486] OneNAND Manufacturer: 
Numonyx (0x20)
Jan  4 20:42:51 Nokia-N900 kernel: [    2.129516] Muxed OneNAND 256MB 
1.8V 16-bit (0x40)
Jan  4 20:42:51 Nokia-N900 kernel: [    2.134582] OneNAND version = 0x0031
Jan  4 20:42:51 Nokia-N900 kernel: [    2.138366] Chip support all block 
unlock
Jan  4 20:42:51 Nokia-N900 kernel: [    2.138366] Chip has 2 plane
Jan  4 20:42:51 Nokia-N900 kernel: [    2.139953] Scanning device for 
bad blocks
Jan  4 20:42:51 Nokia-N900 kernel: [    2.238616] 6 ofpart partitions 
found on MTD device (null)
Jan  4 20:42:51 Nokia-N900 kernel: [    2.244415] Creating 6 MTD 
partitions on "(null)":
Jan  4 20:42:51 Nokia-N900 kernel: [    2.249633] 
0x000000000000-0x000000020000 : "bootloader"
Jan  4 20:42:51 Nokia-N900 kernel: [    2.256164] 
0x000000020000-0x000000080000 : "config"
Jan  4 20:42:51 Nokia-N900 kernel: [    2.262084] 
0x000000080000-0x0000000c0000 : "log"
Jan  4 20:42:51 Nokia-N900 kernel: [    2.270233] mtdoops: ready 33, 
959521135 (no erase)
Jan  4 20:42:51 Nokia-N900 gconfd (root-1094): starting (version 
2.16.0), pid 1094 user 'root'
Jan  4 20:42:51 Nokia-N900 kernel: [    2.270233] mtdoops: Attached to 
MTD device 2
Jan  4 20:42:51 Nokia-N900 kernel: [    2.274871] 
0x0000000c0000-0x0000002c0000 : "kernel"
Jan  4 20:42:51 Nokia-N900 kernel: [    2.280914] 
0x0000002c0000-0x0000004c0000 : "initfs"
Jan  4 20:42:51 Nokia-N900 kernel: [    2.286895] 
0x0000004c0000-0x000010000000 : "rootfs"
Jan  4 20:42:51 Nokia-N900 kernel: [    2.294494] gpmc cs1 before 
gpmc_cs_program_settings:
Jan  4 20:42:51 Nokia-N900 kernel: [    2.299865] cs1 GPMC_CS_CONFIG1: 
0x00001000
Jan  4 20:42:51 Nokia-N900 kernel: [    2.304290] cs1 GPMC_CS_CONFIG2: 
0x00101001
Jan  4 20:42:51 Nokia-N900 kernel: [    2.308776] cs1 GPMC_CS_CONFIG3: 
0x00020201
Jan  4 20:42:51 Nokia-N900 kernel: [    2.313232] cs1 GPMC_CS_CONFIG4: 
0x10031003
Jan  4 20:42:51 Nokia-N900 kernel: [    2.317718] cs1 GPMC_CS_CONFIG5: 
0x010f1111
Jan  4 20:42:51 Nokia-N900 kernel: [    2.322143] cs1 GPMC_CS_CONFIG6: 
0x8f030000
Jan  4 20:42:51 Nokia-N900 kernel: [    2.326599] gpmc cs1 access 
configuration:
Jan  4 20:42:51 Nokia-N900 kernel: [    2.330902] gpmc,mux-add-data = <0>
Jan  4 20:42:51 Nokia-N900 kernel: [    2.334625] gpmc,device-width = <1>
Jan  4 20:42:51 Nokia-N900 kernel: [    2.338348] gpmc,wait-pin = <0>
Jan  4 20:42:51 Nokia-N900 kernel: [    2.341674] gpmc,burst-length = <4>
Jan  4 20:42:51 Nokia-N900 kernel: [    2.345367] gpmc cs1 timings 
configuration:
Jan  4 20:42:51 Nokia-N900 kernel: [    2.349822] gpmc,cs-on-ns = <6> /* 
1 ns - 6 ns; 1 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.355651] gpmc,cs-rd-off-ns = 
<96> /* 91 ns - 96 ns; 16 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.362243] gpmc,cs-wr-off-ns = 
<96> /* 91 ns - 96 ns; 16 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.368804] gpmc,adv-on-ns = <6> 
/* 1 ns - 6 ns; 1 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.374664] gpmc,adv-rd-off-ns = 
<12> /* 7 ns - 12 ns; 2 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.381195] gpmc,adv-wr-off-ns = 
<12> /* 7 ns - 12 ns; 2 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.387695] gpmc,oe-on-ns = <18> 
/* 13 ns - 18 ns; 3 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.393798] gpmc,oe-off-ns = <96> 
/* 91 ns - 96 ns; 16 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.400054] gpmc,we-on-ns = <18> 
/* 13 ns - 18 ns; 3 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.406188] gpmc,we-off-ns = <96> 
/* 91 ns - 96 ns; 16 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.412414] gpmc,rd-cycle-ns = 
<102> /* 97 ns - 102 ns; 17 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.419067] gpmc,wr-cycle-ns = 
<102> /* 97 ns - 102 ns; 17 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.425720] gpmc,access-ns = <90> 
/* 85 ns - 90 ns; 15 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.432006] 
gpmc,page-burst-access-ns = <6> /* 1 ns - 6 ns; 1 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.438964] gpmc,bus-turnaround-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.445556] 
gpmc,cycle2cycle-delay-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.452484] 
gpmc,wait-monitoring-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.459197] gpmc,clk-activation-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.465850] 
gpmc,wr-data-mux-bus-ns = <18> /* 13 ns - 18 ns; 3 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.472869] gpmc,wr-access-ns = 
<90> /* 85 ns - 90 ns; 15 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.479461] GPMC CS1: cs_on 
      :   0 ticks,   0 ns (was   1 ticks)   0 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.487396] GPMC CS1: cs_rd_off 
      :   8 ticks,  48 ns (was  16 ticks)  48 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.495361] GPMC CS1: cs_wr_off 
      :   4 ticks,  24 ns (was  16 ticks)  24 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.503295] GPMC CS1: adv_on 
      :   0 ticks,   0 ns (was   1 ticks)   0 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.511230] GPMC CS1: adv_rd_off 
      :   0 ticks,   0 ns (was   2 ticks)   0 ns
Jan  4 20:42:51 Nokia-N900 waitx[1097]: trying to get X display
Jan  4 20:42:51 Nokia-N900 kernel: [    2.519165] GPMC CS1: adv_wr_off 
      :   0 ticks,   0 ns (was   2 ticks)   0 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.527099] GPMC CS1: oe_on 
      :   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.535003] GPMC CS1: oe_off 
      :   8 ticks,  48 ns (was  16 ticks)  48 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.542999] GPMC CS1: we_on 
      :   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.550933] GPMC CS1: we_off 
      :   3 ticks,  18 ns (was  16 ticks)  18 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.558929] GPMC CS1: rd_cycle 
      :  30 ticks, 180 ns (was  17 ticks) 180 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.566864] GPMC CS1: wr_cycle 
      :  30 ticks, 180 ns (was  17 ticks) 180 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.574768] GPMC CS1: access 
      :   7 ticks,  42 ns (was  15 ticks)  42 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.582733] GPMC CS1: 
page_burst_access:   0 ticks,   0 ns (was   1 ticks)   0 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.590728] GPMC CS1: 
bus_turnaround   :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.598663] GPMC CS1: 
cycle2cycle_delay:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.606658] GPMC CS1: 
wr_data_mux_bus  :   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.614624] GPMC CS1: wr_access 
      :   0 ticks,   0 ns (was  15 ticks)   0 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.622528] GPMC CS1: 
wait_monitoring  :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.630523] GPMC CS1: 
clk_activation   :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  4 20:42:51 Nokia-N900 kernel: [    2.638458] GPMC CS1 CLK period is 
6 ns (div 1)
Jan  4 20:42:51 Nokia-N900 kernel: [    2.643249] gpmc cs1 after 
gpmc_cs_set_timings:
Jan  4 20:42:51 Nokia-N900 kernel: [    2.648040] cs1 GPMC_CS_CONFIG1: 
0x00001000
Jan  4 20:42:51 Nokia-N900 kernel: [    2.652465] cs1 GPMC_CS_CONFIG2: 
0x00040800
Jan  4 20:42:51 Nokia-N900 kernel: [    2.656951] cs1 GPMC_CS_CONFIG3: 
0x00000000
Jan  4 20:42:51 Nokia-N900 kernel: [    2.661376] cs1 GPMC_CS_CONFIG4: 
0x03020802
Jan  4 20:42:51 Nokia-N900 kernel: [    2.665863] cs1 GPMC_CS_CONFIG5: 
0x00071e1e
Jan  4 20:42:51 Nokia-N900 kernel: [    2.670318] cs1 GPMC_CS_CONFIG6: 
0x80020000
Jan  4 20:42:51 Nokia-N900 kernel: [    2.674713] gpmc cs1 access 
configuration:
Jan  4 20:42:51 Nokia-N900 kernel: [    2.679107] gpmc,mux-add-data = <0>
Jan  4 20:42:51 Nokia-N900 kernel: [    2.682769] gpmc,device-width = <1>
Jan  4 20:42:51 Nokia-N900 kernel: [    2.686523] gpmc,wait-pin = <0>
Jan  4 20:42:51 Nokia-N900 kernel: [    2.689880] gpmc,burst-length = <4>
Jan  4 20:42:51 Nokia-N900 kernel: [    2.693572] gpmc cs1 timings 
configuration:
Jan  4 20:42:51 Nokia-N900 kernel: [    2.698059] gpmc,cs-on-ns = <0> /* 
0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.703857] gpmc,cs-rd-off-ns = 
<48> /* 43 ns - 48 ns; 8 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.710296] gpmc,cs-wr-off-ns = 
<24> /* 19 ns - 24 ns; 4 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.716735] gpmc,adv-on-ns = <0> 
/* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.722656] gpmc,adv-rd-off-ns = 
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.728942] gpmc,adv-wr-off-ns = 
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.735168] gpmc,oe-on-ns = <12> 
/* 7 ns - 12 ns; 2 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.741180] gpmc,oe-off-ns = <48> 
/* 43 ns - 48 ns; 8 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.747344] gpmc,we-on-ns = <12> 
/* 7 ns - 12 ns; 2 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.753356] gpmc,we-off-ns = <18> 
/* 13 ns - 18 ns; 3 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.759552] gpmc,rd-cycle-ns = 
<180> /* 175 ns - 180 ns; 30 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.766296] gpmc,wr-cycle-ns = 
<180> /* 175 ns - 180 ns; 30 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.772979] gpmc,access-ns = <42> 
/* 37 ns - 42 ns; 7 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.779144] 
gpmc,page-burst-access-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.786102] gpmc,bus-turnaround-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.792785] 
gpmc,cycle2cycle-delay-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.799743] 
gpmc,wait-monitoring-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.806518] gpmc,clk-activation-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.813110] 
gpmc,wr-data-mux-bus-ns = <12> /* 7 ns - 12 ns; 2 ticks */
Jan  4 20:42:51 Nokia-N900 kernel: [    2.820037] gpmc,wr-access-ns = 

<0> /* 0 ns - 0 ns; 0 ticks */

author maintainer
#19 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 4 lines · Ivaylo Dimitrov

Hi,

Quoted 1 line · Tony Lindgren
Quoted 1 line · On Monday 04 January 2016 18:02:06 Tony Lindgren wrote:
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Care to boot with CONFIG_OMAP_GPMC_DEBUG=y and post the gpmc related dmesg output?

Here it is, including the pre-gpmc log, keep in mind this is with restored HWMOD_INIT_NO_RESET flag so rootfs is functional and I can get dmesg output from the syslog. Don't know if it is helpful :). Also, this device has Numonyx onenand (HW rev. 2204), unlike most of the others which have Samsung onenand (HW rev. 2101 etc), no idea if it is relevant.

Thanks. I got the problem reproduced here too.

[    1.915557] gpmc cs0 after gpmc_cs_set_timings:
[    1.920410] cs0 GPMC_CS_CONFIG1: 0xfb001201

Looks like in the failing case the clock rates are not properly calculated in GPMC and GPMCFCLKDIVIDER is set wrong in GPMC_CS_CONFIG1. Need to look at it more to figure out what's the best way to fix this.

Regards,

Tony

#20 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 19 lines · On Monday 04 January 2016 20:13:56 Tony Lindgren wrote:
Quoted 4 lines · Ivaylo Dimitrov

Hi,

Quoted 1 line · Tony Lindgren
Quoted 1 line · On Monday 04 January 2016 18:02:06 Tony Lindgren wrote:
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Care to boot with CONFIG_OMAP_GPMC_DEBUG=y and post the gpmc related dmesg output?

Here it is, including the pre-gpmc log, keep in mind this is with restored HWMOD_INIT_NO_RESET flag so rootfs is functional and I can get dmesg output from the syslog. Don't know if it is helpful :). Also, this device has Numonyx onenand (HW rev. 2204), unlike most of the others which have Samsung onenand (HW rev. 2101 etc), no idea if it is relevant.

Thanks. I got the problem reproduced here too.

[    1.915557] gpmc cs0 after gpmc_cs_set_timings:
[    1.920410] cs0 GPMC_CS_CONFIG1: 0xfb001201
Quoted 8 lines

Looks like in the failing case the clock rates are not properly calculated in GPMC and GPMCFCLKDIVIDER is set wrong in GPMC_CS_CONFIG1. Need to look at it more to figure out what's the best way to fix this.

Regards,

Tony

Hm... Maybe this problem is in U-Boot too?

Signature · 2 lines
Pali Roh?r
pali.rohar at gmail.com
author maintainer
#21 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 25 lines · Pali Roh?r
Quoted 24 lines · On Monday 04 January 2016 20:13:56 Tony Lindgren wrote:
Quoted 4 lines · Ivaylo Dimitrov

Hi,

Quoted 1 line · Tony Lindgren
Quoted 1 line · On Monday 04 January 2016 18:02:06 Tony Lindgren wrote:
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Care to boot with CONFIG_OMAP_GPMC_DEBUG=y and post the gpmc related dmesg output?

Here it is, including the pre-gpmc log, keep in mind this is with restored HWMOD_INIT_NO_RESET flag so rootfs is functional and I can get dmesg output from the syslog. Don't know if it is helpful :). Also, this device has Numonyx onenand (HW rev. 2204), unlike most of the others which have Samsung onenand (HW rev. 2101 etc), no idea if it is relevant.

Thanks. I got the problem reproduced here too.

[    1.915557] gpmc cs0 after gpmc_cs_set_timings:
[    1.920410] cs0 GPMC_CS_CONFIG1: 0xfb001201

Looks like in the failing case the clock rates are not properly calculated in GPMC and GPMCFCLKDIVIDER is set wrong in GPMC_CS_CONFIG1. Need to look at it more to figure out what's the best way to fix this.

Quoted 5 lines
Quoted 3 lines

Regards,

Tony

Hm... Maybe this problem is in U-Boot too?

Yeah maybe. Looks like we need sync write bit set also for async timings for omap2_onenand_set_async_mode() to work to detect the onenand rate for sync mode :)

Suggested fix below, please test and reply with your Tested-by's if it solves the problem so we may still be able to get this into v4.4.

Regards,

Tony

8< ---------------
From: Tony Lindgren <[email protected]>
Date: Tue, 5 Jan 2016 12:04:20 -0800
Subject: [PATCH] ARM: OMAP2+: Fix onenand rate detection to avoid filesystem
corruption

Commit 63aa945b1013 ("memory: omap-gpmc: Add Kconfig option for debug") unified the GPMC debug for the SoCs with GPMC. The commit also left out the option for HWMOD_INIT_NO_RESET as we now require proper timings for GPMC to be able to remap GPMC devices out of address 0.

Unfortunately on 900, onenand now only partially works with the device tree provided timings. It works enough to get detected but the clock rate supported by the onenand chip gets misdetected. This in turn causes the GPMC timings to be miscalculated and this leads into file system corruption on n900.

Looks like onenand needs CS_CONFIG1 bit 27 WRITETYPE set for for sync write. This is needed also for async timings when we write to onenand with omap2_onenand_set_async_mode(). Without sync write bit set, the async read for the onenand ONENAND_REG_VERSION_ID will return 0xfff.

Let's exit with an error if onenand rate is not detected. And let's remove the extra call to omap2_onenand_set_async_mode() as we only need to do this once at the end of omap2_onenand_setup_async().

arch/arm/mach-omap2/gpmc-onenand.c +9 -5
@@ -149,8 +149,8 @@ static int omap2_onenand_get_freq(struct omap_onenand_platform_data *cfg,
 		freq = 104;
 		break;
 	default:
-		freq = 54;
-		break;
+		pr_err("onenand rate not detected, bad GPMC async timings?\n");
+		freq = 0;
 	}
 
 	return freq;
@@ -271,6 +271,11 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base)
 	struct gpmc_timings t;
 	int ret;
 
+	/*
+	 * Note that we need to keep sync_write set for the call to
+	 * omap2_onenand_set_async_mode() to work to detect the onenand
+	 * supported clock rate for the sync timings.
+	 */
 	if (gpmc_onenand_data->of_node) {
 		gpmc_read_settings_dt(gpmc_onenand_data->of_node,
 				      &onenand_async);
@@ -281,12 +286,9 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base)
 			else
 				gpmc_onenand_data->flags |= ONENAND_SYNC_READ;
 			onenand_async.sync_read = false;
-			onenand_async.sync_write = false;
 		}
 	}
 
-	omap2_onenand_set_async_mode(onenand_base);
-
 	omap2_onenand_calc_async_timings(&t);
 
 	ret = gpmc_cs_program_settings(gpmc_onenand_data->cs, &onenand_async);
@@ -310,6 +312,8 @@ static int omap2_onenand_setup_sync(void __iomem *onenand_base, int *freq_ptr)
 	if (!freq) {
 		/* Very first call freq is not known */
 		freq = omap2_onenand_get_freq(gpmc_onenand_data, onenand_base);
+		if (!freq)
+			return -ENODEV;
 		set_onenand_cfg(onenand_base);
 	}
 
#22 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

arch/arm/mach-omap2/gpmc-onenand.c

Quoted 39 lines · Tony Lindgren

Suggested fix below, please test and reply with your Tested-by's if it solves the problem so we may still be able to get this into v4.4.

Regards,

Tony

8< ---------------
From: Tony Lindgren <[email protected]>
Date: Tue, 5 Jan 2016 12:04:20 -0800
Subject: [PATCH] ARM: OMAP2+: Fix onenand rate detection to avoid filesystem
corruption

Commit 63aa945b1013 ("memory: omap-gpmc: Add Kconfig option for debug") unified the GPMC debug for the SoCs with GPMC. The commit also left out the option for HWMOD_INIT_NO_RESET as we now require proper timings for GPMC to be able to remap GPMC devices out of address 0.

Unfortunately on 900, onenand now only partially works with the device tree provided timings. It works enough to get detected but the clock rate supported by the onenand chip gets misdetected. This in turn causes the GPMC timings to be miscalculated and this leads into file system corruption on n900.

Looks like onenand needs CS_CONFIG1 bit 27 WRITETYPE set for for sync write. This is needed also for async timings when we write to onenand with omap2_onenand_set_async_mode(). Without sync write bit set, the async read for the onenand ONENAND_REG_VERSION_ID will return 0xfff.

Let's exit with an error if onenand rate is not detected. And let's remove the extra call to omap2_onenand_set_async_mode() as we only need to do this once at the end of omap2_onenand_setup_async().

arch/arm/mach-omap2/gpmc-onenand.c +0 -0

Bellow is gpmc dmesg output with that fix. I also disabled CONFIG_OMAP_GPMC_DEBUG and am still able to boot to maemo with no obvious problems.

So, seems that fixes the problem, feel free to add:

Jan  6 10:34:15 Nokia-N900 kernel: [    1.373229] omap-gpmc 
6e000000.gpmc: GPMC revision 5.0
Jan  6 10:34:15 Nokia-N900 kernel: [    1.379425] GPMC CS0: cs_on 
      :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.387481] GPMC CS0: cs_rd_off 
      :  14 ticks,  84 ns (was  16 ticks)  84 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.395507] GPMC CS0: cs_wr_off 
      :  19 ticks, 114 ns (was  16 ticks) 114 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.403472] GPMC CS0: adv_on 
      :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.411407] GPMC CS0: adv_rd_off 
      :   3 ticks,  18 ns (was   2 ticks)  18 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.419342] GPMC CS0: adv_wr_off 
      :   3 ticks,  18 ns (was   2 ticks)  18 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.427276] GPMC CS0: oe_on 
      :   5 ticks,  30 ns (was   2 ticks)  30 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.435211] GPMC CS0: oe_off 
      :  14 ticks,  84 ns (was  16 ticks)  84 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.443115] GPMC CS0: we_on 
      :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.451110] GPMC CS0: we_off 
      :  14 ticks,  84 ns (was  16 ticks)  84 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.459045] GPMC CS0: rd_cycle 
      :  18 ticks, 108 ns (was  19 ticks) 108 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.467041] GPMC CS0: wr_cycle 
      :  17 ticks, 102 ns (was  19 ticks) 102 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.474975] GPMC CS0: access 
      :  13 ticks,  78 ns (was  15 ticks)  78 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.482879] GPMC CS0: 
page_burst_access:   0 ticks,   0 ns (was   2 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.490814] GPMC CS0: 
bus_turnaround   :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.498748] GPMC CS0: 
cycle2cycle_delay:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.506683] GPMC CS0: 
wr_data_mux_bus  :   5 ticks,  30 ns (was   5 ticks)  30 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.514617] GPMC CS0: wr_access 
      :  13 ticks,  78 ns (was  15 ticks)  78 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.522583] GPMC CS0: 
wait_monitoring  :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.530548] GPMC CS0: 
clk_activation   :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.538543] GPMC CS0 CLK period is 
6 ns (div 1)
Jan  6 10:34:15 Nokia-N900 kernel: [    1.543334] gpmc cs0 after 
gpmc_cs_set_timings:
Jan  6 10:34:15 Nokia-N900 kernel: [    1.548126] cs0 GPMC_CS_CONFIG1: 
0xd9001200
Jan  6 10:34:15 Nokia-N900 kernel: [    1.552581] cs0 GPMC_CS_CONFIG2: 
0x00130e00
Jan  6 10:34:15 Nokia-N900 kernel: [    1.558837] cs0 GPMC_CS_CONFIG3: 
0x00030300
Jan  6 10:34:15 Nokia-N900 kernel: [    1.563323] cs0 GPMC_CS_CONFIG4: 
0x0e000e05
Jan  6 10:34:15 Nokia-N900 kernel: [    1.567901] cs0 GPMC_CS_CONFIG5: 
0x000d1112
Jan  6 10:34:15 Nokia-N900 kernel: [    1.572357] cs0 GPMC_CS_CONFIG6: 
0x8d050000
Jan  6 10:34:15 Nokia-N900 kernel: [    1.576812] gpmc cs0 access 
configuration:
Jan  6 10:34:15 Nokia-N900 kernel: [    1.581146] gpmc,mux-add-data = <2>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.584899] gpmc,device-width = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.588592] gpmc,wait-pin = <0>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.591949] gpmc,burst-length = <16>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.595794] gpmc,sync-write = <1>
Jan  6 10:34:15 Nokia-N900 cellular: csd[1017]: Succesfully loaded 
plugin <sms>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.599273] gpmc,burst-write = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.602905] gpmc,burst-read = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.606445] gpmc,burst-wrap = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.609954] gpmc cs0 timings 
configuration:
Jan  6 10:34:15 Nokia-N900 kernel: [    1.614440] gpmc,cs-on-ns = <0> /* 
0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.620269] gpmc,cs-rd-off-ns = 
<84> /* 79 ns - 84 ns; 14 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.626861] gpmc,cs-wr-off-ns = 
<114> /* 109 ns - 114 ns; 19 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.633728] gpmc,adv-on-ns = <0> 
/* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.639617] gpmc,adv-rd-off-ns = 
<18> /* 13 ns - 18 ns; 3 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.646209] gpmc,adv-wr-off-ns = 
<18> /* 13 ns - 18 ns; 3 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.652770] gpmc,oe-on-ns = <30> 
/* 25 ns - 30 ns; 5 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.658935] gpmc,oe-off-ns = <84> 
/* 79 ns - 84 ns; 14 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.665252] gpmc,we-on-ns = <0> /* 
0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.671081] gpmc,we-off-ns = <84> 
/* 79 ns - 84 ns; 14 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.677398] gpmc,rd-cycle-ns = 
<108> /* 103 ns - 108 ns; 18 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.684112] gpmc,wr-cycle-ns = 
<102> /* 97 ns - 102 ns; 17 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.690765] gpmc,access-ns = <78> 
/* 73 ns - 78 ns; 13 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.697082] 
gpmc,page-burst-access-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.704010] gpmc,bus-turnaround-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.710662] 
gpmc,cycle2cycle-delay-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.717620] 
gpmc,wait-monitoring-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.724395] gpmc,clk-activation-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.731048] 
gpmc,wr-data-mux-bus-ns = <30> /* 25 ns - 30 ns; 5 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.738098] gpmc,wr-access-ns = 
<78> /* 73 ns - 78 ns; 13 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.744781] GPMC CS0: cs_on 
      :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.752685] GPMC CS0: cs_rd_off 
      :  16 ticks,  96 ns (was  14 ticks)  96 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.760681] GPMC CS0: cs_wr_off 
      :  16 ticks,  96 ns (was  19 ticks)  96 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.768646] GPMC CS0: adv_on 
      :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.776641] GPMC CS0: adv_rd_off 
      :   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.784576] GPMC CS0: adv_wr_off 
      :   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.792541] GPMC CS0: oe_on 
      :   3 ticks,  18 ns (was   5 ticks)  18 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.800476] GPMC CS0: oe_off 
      :  16 ticks,  96 ns (was  14 ticks)  96 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.808410] GPMC CS0: we_on 
      :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.816345] GPMC CS0: we_off 
      :  16 ticks,  96 ns (was  14 ticks)  96 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.824279] GPMC CS0: rd_cycle 
      :  19 ticks, 114 ns (was  18 ticks) 114 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.832183] GPMC CS0: wr_cycle 
      :  19 ticks, 114 ns (was  17 ticks) 114 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.840087] GPMC CS0: access 
      :  15 ticks,  90 ns (was  13 ticks)  90 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.848083] GPMC CS0: 
page_burst_access:   2 ticks,  12 ns (was   0 ticks)  12 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.856018] GPMC CS0: 
bus_turnaround   :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.864013] GPMC CS0: 
cycle2cycle_delay:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.871917] GPMC CS0: 
wr_data_mux_bus  :   5 ticks,  30 ns (was   5 ticks)  30 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.879821] GPMC CS0: wr_access 
      :  15 ticks,  90 ns (was  13 ticks)  90 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.887817] GPMC CS0: 
wait_monitoring  :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.895812] GPMC CS0: 
clk_activation   :   1 ticks,   6 ns (was   0 ticks)   6 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.903747] GPMC CS0 CLK period is 
12 ns (div 2)
Jan  6 10:34:15 Nokia-N900 kernel: [    1.908599] gpmc cs0 after 
gpmc_cs_set_timings:
Jan  6 10:34:15 Nokia-N900 kernel: [    1.913421] cs0 GPMC_CS_CONFIG1: 
0xfb001201
Jan  6 10:34:15 Nokia-N900 cellular: csd[1017]: Succesfully loaded 
plugin <ss>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.917907] cs0 GPMC_CS_CONFIG2: 
0x00101000
Jan  6 10:34:15 Nokia-N900 kernel: [    1.922332] cs0 GPMC_CS_CONFIG3: 
0x00020200
Jan  6 10:34:15 Nokia-N900 kernel: [    1.926788] cs0 GPMC_CS_CONFIG4: 
0x10001003
Jan  6 10:34:15 Nokia-N900 kernel: [    1.931243] cs0 GPMC_CS_CONFIG5: 
0x020f1313
Jan  6 10:34:15 Nokia-N900 kernel: [    1.935729] cs0 GPMC_CS_CONFIG6: 
0x8f050000
Jan  6 10:34:15 Nokia-N900 kernel: [    1.940124] gpmc cs0 access 
configuration:
Jan  6 10:34:15 Nokia-N900 kernel: [    1.944519] gpmc,mux-add-data = <2>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.948211] gpmc,device-width = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.951934] gpmc,wait-pin = <0>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.955291] gpmc,burst-length = <16>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.959106] gpmc,sync-write = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.962646] gpmc,burst-write = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.966278] gpmc,gpmc,sync-read = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.970184] gpmc,burst-read = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.973724] gpmc,burst-wrap = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.977233] gpmc cs0 timings 
configuration:
Jan  6 10:34:15 Nokia-N900 kernel: [    1.981658] gpmc,cs-on-ns = <0> /* 
0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.987518] gpmc,cs-rd-off-ns = 
<96> /* 91 ns - 96 ns; 16 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.994049] gpmc,cs-wr-off-ns = 
<96> /* 91 ns - 96 ns; 16 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.000610] gpmc,adv-on-ns = <0> 
/* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.006591] gpmc,adv-rd-off-ns = 
<12> /* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.013000] gpmc,adv-wr-off-ns = 
<12> /* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.019500] gpmc,oe-on-ns = <18> 
/* 13 ns - 18 ns; 3 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.025634] gpmc,oe-off-ns = <96> 
/* 91 ns - 96 ns; 16 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.031921] gpmc,we-on-ns = <0> /* 
0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.037780] gpmc,we-off-ns = <96> 
/* 91 ns - 96 ns; 16 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.044067] gpmc,rd-cycle-ns = 
<114> /* 109 ns - 114 ns; 19 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.050811] gpmc,wr-cycle-ns = 
<114> /* 109 ns - 114 ns; 19 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.057586] gpmc,access-ns = <90> 
/* 85 ns - 90 ns; 15 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.063903] 
gpmc,page-burst-access-ns = <12> /* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.071014] gpmc,bus-turnaround-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.077697] 
gpmc,cycle2cycle-delay-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.084625] 
gpmc,wait-monitoring-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.091339] gpmc,clk-activation-ns 
= <6> /* 1 ns - 6 ns; 1 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.098022] 
gpmc,wr-data-mux-bus-ns = <30> /* 25 ns - 30 ns; 5 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.105072] gpmc,wr-access-ns = 
<90> /* 85 ns - 90 ns; 15 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.111602] omap2-onenand 
omap2-onenand: initializing on CS0, phys base 0x01000000, virtual base 
d0940000, freq 83 MHz
Jan  6 10:34:15 Nokia-N900 kernel: [    2.123016] OneNAND Manufacturer: 
Numonyx (0x20)
Jan  6 10:34:15 Nokia-N900 gconfd (root-1080): starting (version 
2.16.0), pid 1080 user 'root'
Jan  6 10:34:16 Nokia-N900 kernel: [    2.123016] Muxed OneNAND 256MB 
1.8V 16-bit (0x40)
Jan  6 10:34:16 Nokia-N900 waitx[1085]: trying to get X display
Jan  6 10:34:16 Nokia-N900 kernel: [    2.128112] OneNAND version = 0x0031
Jan  6 10:34:16 Nokia-N900 kernel: [    2.131896] Chip support all block 
unlock
Jan  6 10:34:16 Nokia-N900 kernel: [    2.131896] Chip has 2 plane
Jan  6 10:34:16 Nokia-N900 kernel: [    2.133483] Scanning device for 
bad blocks
Jan  6 10:34:16 Nokia-N900 kernel: [    2.232177] 6 ofpart partitions 
found on MTD device (null)
Jan  6 10:34:16 Nokia-N900 kernel: [    2.238098] Creating 6 MTD 
partitions on "(null)":
Jan  6 10:34:16 Nokia-N900 kernel: [    2.243164] 
0x000000000000-0x000000020000 : "bootloader"
Jan  6 10:34:16 Nokia-N900 kernel: [    2.249725] 
0x000000020000-0x000000080000 : "config"
Jan  6 10:34:16 Nokia-N900 kernel: [    2.255767] 
0x000000080000-0x0000000c0000 : "log"
Jan  6 10:34:16 Nokia-N900 kernel: [    2.263793] mtdoops: ready 34, 
959521136 (no erase)
Jan  6 10:34:16 Nokia-N900 kernel: [    2.263793] mtdoops: Attached to 
MTD device 2
Jan  6 10:34:16 Nokia-N900 kernel: [    2.268432] 
0x0000000c0000-0x0000002c0000 : "kernel"
Jan  6 10:34:16 Nokia-N900 kernel: [    2.274444] 
0x0000002c0000-0x0000004c0000 : "initfs"
Jan  6 10:34:16 Nokia-N900 kernel: [    2.280364] 
0x0000004c0000-0x000010000000 : "rootfs"
Jan  6 10:34:16 Nokia-N900 kernel: [    2.287963] gpmc cs1 before 
gpmc_cs_program_settings:
Jan  6 10:34:16 Nokia-N900 kernel: [    2.293304] cs1 GPMC_CS_CONFIG1: 
0x00001000
Jan  6 10:34:16 Nokia-N900 kernel: [    2.297790] cs1 GPMC_CS_CONFIG2: 
0x00101001
Jan  6 10:34:16 Nokia-N900 kernel: [    2.302246] cs1 GPMC_CS_CONFIG3: 
0x00020201
Jan  6 10:34:16 Nokia-N900 kernel: [    2.306732] cs1 GPMC_CS_CONFIG4: 
0x10031003
Jan  6 10:34:16 Nokia-N900 kernel: [    2.311126] cs1 GPMC_CS_CONFIG5: 
0x010f1111
Jan  6 10:34:16 Nokia-N900 kernel: [    2.315612] cs1 GPMC_CS_CONFIG6: 
0x8f030000
Jan  6 10:34:16 Nokia-N900 kernel: [    2.320007] gpmc cs1 access 
configuration:
Jan  6 10:34:16 Nokia-N900 kernel: [    2.324401] gpmc,mux-add-data = <0>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.328124] gpmc,device-width = <1>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.331817] gpmc,wait-pin = <0>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.335205] gpmc,burst-length = <4>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.338928] gpmc cs1 timings 
configuration:
Jan  6 10:34:16 Nokia-N900 kernel: [    2.343353] gpmc,cs-on-ns = <6> /* 
1 ns - 6 ns; 1 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.349212] gpmc,cs-rd-off-ns = 
<96> /* 91 ns - 96 ns; 16 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.355773] gpmc,cs-wr-off-ns = 
<96> /* 91 ns - 96 ns; 16 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.362274] gpmc,adv-on-ns = <6> 
/* 1 ns - 6 ns; 1 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.368225] gpmc,adv-rd-off-ns = 
<12> /* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.374664] gpmc,adv-wr-off-ns = 
<12> /* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.381103] gpmc,oe-on-ns = <18> 
/* 13 ns - 18 ns; 3 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.387237] gpmc,oe-off-ns = <96> 
/* 91 ns - 96 ns; 16 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.393463] gpmc,we-on-ns = <18> 
/* 13 ns - 18 ns; 3 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.399597] gpmc,we-off-ns = <96> 
/* 91 ns - 96 ns; 16 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.405914] gpmc,rd-cycle-ns = 
<102> /* 97 ns - 102 ns; 17 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.412536] gpmc,wr-cycle-ns = 
<102> /* 97 ns - 102 ns; 17 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.419219] gpmc,access-ns = <90> 
/* 85 ns - 90 ns; 15 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.425476] 
gpmc,page-burst-access-ns = <6> /* 1 ns - 6 ns; 1 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.432403] gpmc,bus-turnaround-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.439086] 
gpmc,cycle2cycle-delay-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.446044] 
gpmc,wait-monitoring-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.452728] gpmc,clk-activation-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.459442] 
gpmc,wr-data-mux-bus-ns = <18> /* 13 ns - 18 ns; 3 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.466491] gpmc,wr-access-ns = 
<90> /* 85 ns - 90 ns; 15 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.473052] GPMC CS1: cs_on 
      :   0 ticks,   0 ns (was   1 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.481048] GPMC CS1: cs_rd_off 
      :   8 ticks,  48 ns (was  16 ticks)  48 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.489044] GPMC CS1: cs_wr_off 
      :   4 ticks,  24 ns (was  16 ticks)  24 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.496978] GPMC CS1: adv_on 
      :   0 ticks,   0 ns (was   1 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.504943] GPMC CS1: adv_rd_off 
      :   0 ticks,   0 ns (was   2 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.512878] GPMC CS1: adv_wr_off 
      :   0 ticks,   0 ns (was   2 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.520843] GPMC CS1: oe_on 
      :   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.528839] GPMC CS1: oe_off 
      :   8 ticks,  48 ns (was  16 ticks)  48 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.536773] GPMC CS1: we_on 
      :   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.544708] GPMC CS1: we_off 
      :   3 ticks,  18 ns (was  16 ticks)  18 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.552612] GPMC CS1: rd_cycle 
      :  30 ticks, 180 ns (was  17 ticks) 180 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.560607] GPMC CS1: wr_cycle 
      :  30 ticks, 180 ns (was  17 ticks) 180 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.568542] GPMC CS1: access 
      :   7 ticks,  42 ns (was  15 ticks)  42 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.576477] GPMC CS1: 
page_burst_access:   0 ticks,   0 ns (was   1 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.584472] GPMC CS1: 
bus_turnaround   :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.592346] GPMC CS1: 
cycle2cycle_delay:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.600341] GPMC CS1: 
wr_data_mux_bus  :   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.608276] GPMC CS1: wr_access 
      :   0 ticks,   0 ns (was  15 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.616271] GPMC CS1: 
wait_monitoring  :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.624267] GPMC CS1: 
clk_activation   :   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.632171] GPMC CS1 CLK period is 
6 ns (div 1)
Jan  6 10:34:16 Nokia-N900 kernel: [    2.637023] gpmc cs1 after 
gpmc_cs_set_timings:
Jan  6 10:34:16 Nokia-N900 kernel: [    2.641815] cs1 GPMC_CS_CONFIG1: 
0x00001000
Jan  6 10:34:16 Nokia-N900 kernel: [    2.646301] cs1 GPMC_CS_CONFIG2: 
0x00040800
Jan  6 10:34:16 Nokia-N900 kernel: [    2.650726] cs1 GPMC_CS_CONFIG3: 
0x00000000
Jan  6 10:34:16 Nokia-N900 kernel: [    2.655212] cs1 GPMC_CS_CONFIG4: 
0x03020802
Jan  6 10:34:16 Nokia-N900 kernel: [    2.659606] cs1 GPMC_CS_CONFIG5: 
0x00071e1e
Jan  6 10:34:16 Nokia-N900 kernel: [    2.664093] cs1 GPMC_CS_CONFIG6: 
0x80020000
Jan  6 10:34:16 Nokia-N900 kernel: [    2.668548] gpmc cs1 access 
configuration:
Jan  6 10:34:16 Nokia-N900 kernel: [    2.672882] gpmc,mux-add-data = <0>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.676635] gpmc,device-width = <1>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.680328] gpmc,wait-pin = <0>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.683685] gpmc,burst-length = <4>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.687408] gpmc cs1 timings 
configuration:
Jan  6 10:34:16 Nokia-N900 kernel: [    2.691833] gpmc,cs-on-ns = <0> /* 
0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.697692] gpmc,cs-rd-off-ns = 
<48> /* 43 ns - 48 ns; 8 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.704132] gpmc,cs-wr-off-ns = 
<24> /* 19 ns - 24 ns; 4 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.710601] gpmc,adv-on-ns = <0> 
/* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.716552] gpmc,adv-rd-off-ns = 
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.722808] gpmc,adv-wr-off-ns = 
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.729125] gpmc,oe-on-ns = <12> 
/* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.735137] gpmc,oe-off-ns = <48> 
/* 43 ns - 48 ns; 8 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.741333] gpmc,we-on-ns = <12> 
/* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.747375] gpmc,we-off-ns = <18> 
/* 13 ns - 18 ns; 3 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.753509] gpmc,rd-cycle-ns = 
<180> /* 175 ns - 180 ns; 30 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.760284] gpmc,wr-cycle-ns = 
<180> /* 175 ns - 180 ns; 30 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.767059] gpmc,access-ns = <42> 
/* 37 ns - 42 ns; 7 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.773254] 
gpmc,page-burst-access-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.780212] gpmc,bus-turnaround-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.786895] 
gpmc,cycle2cycle-delay-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.793853] 
gpmc,wait-monitoring-ns = <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.800628] gpmc,clk-activation-ns 
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.807312] 
gpmc,wr-data-mux-bus-ns = <12> /* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.814270] gpmc,wr-access-ns = 

<0> /* 0 ns - 0 ns; 0 ticks */

#23 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 47 lines · On Wednesday 06 January 2016 10:55:51 Ivaylo Dimitrov wrote:

arch/arm/mach-omap2/gpmc-onenand.c

Quoted 39 lines · Tony Lindgren

Suggested fix below, please test and reply with your Tested-by's if it solves the problem so we may still be able to get this into v4.4.

Regards,

Tony

8< ---------------
From: Tony Lindgren <[email protected]>
Date: Tue, 5 Jan 2016 12:04:20 -0800
Subject: [PATCH] ARM: OMAP2+: Fix onenand rate detection to avoid filesystem
corruption

Commit 63aa945b1013 ("memory: omap-gpmc: Add Kconfig option for debug") unified the GPMC debug for the SoCs with GPMC. The commit also left out the option for HWMOD_INIT_NO_RESET as we now require proper timings for GPMC to be able to remap GPMC devices out of address 0.

Unfortunately on 900, onenand now only partially works with the device tree provided timings. It works enough to get detected but the clock rate supported by the onenand chip gets misdetected. This in turn causes the GPMC timings to be miscalculated and this leads into file system corruption on n900.

Looks like onenand needs CS_CONFIG1 bit 27 WRITETYPE set for for sync write. This is needed also for async timings when we write to onenand with omap2_onenand_set_async_mode(). Without sync write bit set, the async read for the onenand ONENAND_REG_VERSION_ID will return 0xfff.

Let's exit with an error if onenand rate is not detected. And let's remove the extra call to omap2_onenand_set_async_mode() as we only need to do this once at the end of omap2_onenand_setup_async().

arch/arm/mach-omap2/gpmc-onenand.c +0 -0

Bellow is gpmc dmesg output with that fix. I also disabled CONFIG_OMAP_GPMC_DEBUG and am still able to boot to maemo with no obvious problems.

Quoted 3 lines

So, seems that fixes the problem, feel free to add:

Great! Thank you for fixing and testing this problem!

Quoted 425 lines
Jan  6 10:34:15 Nokia-N900 kernel: [    1.373229] omap-gpmc 6e000000.gpmc:
GPMC revision 5.0
Jan  6 10:34:15 Nokia-N900 kernel: [    1.379425] GPMC CS0: cs_on      :   0
ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.387481] GPMC CS0: cs_rd_off      :
14 ticks,  84 ns (was  16 ticks)  84 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.395507] GPMC CS0: cs_wr_off      :
19 ticks, 114 ns (was  16 ticks) 114 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.403472] GPMC CS0: adv_on      :
0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.411407] GPMC CS0: adv_rd_off
:   3 ticks,  18 ns (was   2 ticks)  18 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.419342] GPMC CS0: adv_wr_off
:   3 ticks,  18 ns (was   2 ticks)  18 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.427276] GPMC CS0: oe_on      :   5
ticks,  30 ns (was   2 ticks)  30 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.435211] GPMC CS0: oe_off      :
14 ticks,  84 ns (was  16 ticks)  84 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.443115] GPMC CS0: we_on      :   0
ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.451110] GPMC CS0: we_off      :
14 ticks,  84 ns (was  16 ticks)  84 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.459045] GPMC CS0: rd_cycle      :
18 ticks, 108 ns (was  19 ticks) 108 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.467041] GPMC CS0: wr_cycle      :
17 ticks, 102 ns (was  19 ticks) 102 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.474975] GPMC CS0: access      :
13 ticks,  78 ns (was  15 ticks)  78 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.482879] GPMC CS0:
page_burst_access:   0 ticks,   0 ns (was   2 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.490814] GPMC CS0: bus_turnaround
:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.498748] GPMC CS0:
cycle2cycle_delay:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.506683] GPMC CS0: wr_data_mux_bus
:   5 ticks,  30 ns (was   5 ticks)  30 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.514617] GPMC CS0: wr_access      :
13 ticks,  78 ns (was  15 ticks)  78 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.522583] GPMC CS0: wait_monitoring
:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.530548] GPMC CS0: clk_activation
:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.538543] GPMC CS0 CLK period is 6
ns (div 1)
Jan  6 10:34:15 Nokia-N900 kernel: [    1.543334] gpmc cs0 after
gpmc_cs_set_timings:
Jan  6 10:34:15 Nokia-N900 kernel: [    1.548126] cs0 GPMC_CS_CONFIG1:
0xd9001200
Jan  6 10:34:15 Nokia-N900 kernel: [    1.552581] cs0 GPMC_CS_CONFIG2:
0x00130e00
Jan  6 10:34:15 Nokia-N900 kernel: [    1.558837] cs0 GPMC_CS_CONFIG3:
0x00030300
Jan  6 10:34:15 Nokia-N900 kernel: [    1.563323] cs0 GPMC_CS_CONFIG4:
0x0e000e05
Jan  6 10:34:15 Nokia-N900 kernel: [    1.567901] cs0 GPMC_CS_CONFIG5:
0x000d1112
Jan  6 10:34:15 Nokia-N900 kernel: [    1.572357] cs0 GPMC_CS_CONFIG6:
0x8d050000
Jan  6 10:34:15 Nokia-N900 kernel: [    1.576812] gpmc cs0 access
configuration:
Jan  6 10:34:15 Nokia-N900 kernel: [    1.581146] gpmc,mux-add-data = <2>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.584899] gpmc,device-width = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.588592] gpmc,wait-pin = <0>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.591949] gpmc,burst-length = <16>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.595794] gpmc,sync-write = <1>
Jan  6 10:34:15 Nokia-N900 cellular: csd[1017]: Succesfully loaded plugin
<sms>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.599273] gpmc,burst-write = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.602905] gpmc,burst-read = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.606445] gpmc,burst-wrap = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.609954] gpmc cs0 timings
configuration:
Jan  6 10:34:15 Nokia-N900 kernel: [    1.614440] gpmc,cs-on-ns = <0> /* 0
ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.620269] gpmc,cs-rd-off-ns = <84>
/* 79 ns - 84 ns; 14 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.626861] gpmc,cs-wr-off-ns = <114>
/* 109 ns - 114 ns; 19 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.633728] gpmc,adv-on-ns = <0> /* 0
ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.639617] gpmc,adv-rd-off-ns = <18>
/* 13 ns - 18 ns; 3 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.646209] gpmc,adv-wr-off-ns = <18>
/* 13 ns - 18 ns; 3 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.652770] gpmc,oe-on-ns = <30> /* 25
ns - 30 ns; 5 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.658935] gpmc,oe-off-ns = <84> /*
79 ns - 84 ns; 14 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.665252] gpmc,we-on-ns = <0> /* 0
ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.671081] gpmc,we-off-ns = <84> /*
79 ns - 84 ns; 14 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.677398] gpmc,rd-cycle-ns = <108>
/* 103 ns - 108 ns; 18 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.684112] gpmc,wr-cycle-ns = <102>
/* 97 ns - 102 ns; 17 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.690765] gpmc,access-ns = <78> /*
73 ns - 78 ns; 13 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.697082] gpmc,page-burst-access-ns
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.704010] gpmc,bus-turnaround-ns =
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.710662] gpmc,cycle2cycle-delay-ns
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.717620] gpmc,wait-monitoring-ns =
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.724395] gpmc,clk-activation-ns =
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.731048] gpmc,wr-data-mux-bus-ns =
<30> /* 25 ns - 30 ns; 5 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.738098] gpmc,wr-access-ns = <78>
/* 73 ns - 78 ns; 13 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.744781] GPMC CS0: cs_on      :   0
ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.752685] GPMC CS0: cs_rd_off      :
16 ticks,  96 ns (was  14 ticks)  96 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.760681] GPMC CS0: cs_wr_off      :
16 ticks,  96 ns (was  19 ticks)  96 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.768646] GPMC CS0: adv_on      :
0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.776641] GPMC CS0: adv_rd_off
:   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.784576] GPMC CS0: adv_wr_off
:   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.792541] GPMC CS0: oe_on      :   3
ticks,  18 ns (was   5 ticks)  18 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.800476] GPMC CS0: oe_off      :
16 ticks,  96 ns (was  14 ticks)  96 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.808410] GPMC CS0: we_on      :   0
ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.816345] GPMC CS0: we_off      :
16 ticks,  96 ns (was  14 ticks)  96 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.824279] GPMC CS0: rd_cycle      :
19 ticks, 114 ns (was  18 ticks) 114 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.832183] GPMC CS0: wr_cycle      :
19 ticks, 114 ns (was  17 ticks) 114 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.840087] GPMC CS0: access      :
15 ticks,  90 ns (was  13 ticks)  90 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.848083] GPMC CS0:
page_burst_access:   2 ticks,  12 ns (was   0 ticks)  12 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.856018] GPMC CS0: bus_turnaround
:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.864013] GPMC CS0:
cycle2cycle_delay:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.871917] GPMC CS0: wr_data_mux_bus
:   5 ticks,  30 ns (was   5 ticks)  30 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.879821] GPMC CS0: wr_access      :
15 ticks,  90 ns (was  13 ticks)  90 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.887817] GPMC CS0: wait_monitoring
:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.895812] GPMC CS0: clk_activation
:   1 ticks,   6 ns (was   0 ticks)   6 ns
Jan  6 10:34:15 Nokia-N900 kernel: [    1.903747] GPMC CS0 CLK period is 12
ns (div 2)
Jan  6 10:34:15 Nokia-N900 kernel: [    1.908599] gpmc cs0 after
gpmc_cs_set_timings:
Jan  6 10:34:15 Nokia-N900 kernel: [    1.913421] cs0 GPMC_CS_CONFIG1:
0xfb001201
Jan  6 10:34:15 Nokia-N900 cellular: csd[1017]: Succesfully loaded plugin
<ss>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.917907] cs0 GPMC_CS_CONFIG2:
0x00101000
Jan  6 10:34:15 Nokia-N900 kernel: [    1.922332] cs0 GPMC_CS_CONFIG3:
0x00020200
Jan  6 10:34:15 Nokia-N900 kernel: [    1.926788] cs0 GPMC_CS_CONFIG4:
0x10001003
Jan  6 10:34:15 Nokia-N900 kernel: [    1.931243] cs0 GPMC_CS_CONFIG5:
0x020f1313
Jan  6 10:34:15 Nokia-N900 kernel: [    1.935729] cs0 GPMC_CS_CONFIG6:
0x8f050000
Jan  6 10:34:15 Nokia-N900 kernel: [    1.940124] gpmc cs0 access
configuration:
Jan  6 10:34:15 Nokia-N900 kernel: [    1.944519] gpmc,mux-add-data = <2>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.948211] gpmc,device-width = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.951934] gpmc,wait-pin = <0>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.955291] gpmc,burst-length = <16>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.959106] gpmc,sync-write = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.962646] gpmc,burst-write = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.966278] gpmc,gpmc,sync-read = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.970184] gpmc,burst-read = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.973724] gpmc,burst-wrap = <1>
Jan  6 10:34:15 Nokia-N900 kernel: [    1.977233] gpmc cs0 timings
configuration:
Jan  6 10:34:15 Nokia-N900 kernel: [    1.981658] gpmc,cs-on-ns = <0> /* 0
ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.987518] gpmc,cs-rd-off-ns = <96>
/* 91 ns - 96 ns; 16 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    1.994049] gpmc,cs-wr-off-ns = <96>
/* 91 ns - 96 ns; 16 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.000610] gpmc,adv-on-ns = <0> /* 0
ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.006591] gpmc,adv-rd-off-ns = <12>
/* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.013000] gpmc,adv-wr-off-ns = <12>
/* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.019500] gpmc,oe-on-ns = <18> /* 13
ns - 18 ns; 3 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.025634] gpmc,oe-off-ns = <96> /*
91 ns - 96 ns; 16 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.031921] gpmc,we-on-ns = <0> /* 0
ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.037780] gpmc,we-off-ns = <96> /*
91 ns - 96 ns; 16 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.044067] gpmc,rd-cycle-ns = <114>
/* 109 ns - 114 ns; 19 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.050811] gpmc,wr-cycle-ns = <114>
/* 109 ns - 114 ns; 19 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.057586] gpmc,access-ns = <90> /*
85 ns - 90 ns; 15 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.063903] gpmc,page-burst-access-ns
= <12> /* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.071014] gpmc,bus-turnaround-ns =
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.077697] gpmc,cycle2cycle-delay-ns
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.084625] gpmc,wait-monitoring-ns =
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.091339] gpmc,clk-activation-ns =
<6> /* 1 ns - 6 ns; 1 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.098022] gpmc,wr-data-mux-bus-ns =
<30> /* 25 ns - 30 ns; 5 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.105072] gpmc,wr-access-ns = <90>
/* 85 ns - 90 ns; 15 ticks */
Jan  6 10:34:15 Nokia-N900 kernel: [    2.111602] omap2-onenand
omap2-onenand: initializing on CS0, phys base 0x01000000, virtual base
d0940000, freq 83 MHz
Jan  6 10:34:15 Nokia-N900 kernel: [    2.123016] OneNAND Manufacturer:
Numonyx (0x20)
Jan  6 10:34:15 Nokia-N900 gconfd (root-1080): starting (version 2.16.0),
pid 1080 user 'root'
Jan  6 10:34:16 Nokia-N900 kernel: [    2.123016] Muxed OneNAND 256MB 1.8V
16-bit (0x40)
Jan  6 10:34:16 Nokia-N900 waitx[1085]: trying to get X display
Jan  6 10:34:16 Nokia-N900 kernel: [    2.128112] OneNAND version = 0x0031
Jan  6 10:34:16 Nokia-N900 kernel: [    2.131896] Chip support all block
unlock
Jan  6 10:34:16 Nokia-N900 kernel: [    2.131896] Chip has 2 plane
Jan  6 10:34:16 Nokia-N900 kernel: [    2.133483] Scanning device for bad
blocks
Jan  6 10:34:16 Nokia-N900 kernel: [    2.232177] 6 ofpart partitions found
on MTD device (null)
Jan  6 10:34:16 Nokia-N900 kernel: [    2.238098] Creating 6 MTD partitions
on "(null)":
Jan  6 10:34:16 Nokia-N900 kernel: [    2.243164]
0x000000000000-0x000000020000 : "bootloader"
Jan  6 10:34:16 Nokia-N900 kernel: [    2.249725]
0x000000020000-0x000000080000 : "config"
Jan  6 10:34:16 Nokia-N900 kernel: [    2.255767]
0x000000080000-0x0000000c0000 : "log"
Jan  6 10:34:16 Nokia-N900 kernel: [    2.263793] mtdoops: ready 34,
959521136 (no erase)
Jan  6 10:34:16 Nokia-N900 kernel: [    2.263793] mtdoops: Attached to MTD
device 2
Jan  6 10:34:16 Nokia-N900 kernel: [    2.268432]
0x0000000c0000-0x0000002c0000 : "kernel"
Jan  6 10:34:16 Nokia-N900 kernel: [    2.274444]
0x0000002c0000-0x0000004c0000 : "initfs"
Jan  6 10:34:16 Nokia-N900 kernel: [    2.280364]
0x0000004c0000-0x000010000000 : "rootfs"
Jan  6 10:34:16 Nokia-N900 kernel: [    2.287963] gpmc cs1 before
gpmc_cs_program_settings:
Jan  6 10:34:16 Nokia-N900 kernel: [    2.293304] cs1 GPMC_CS_CONFIG1:
0x00001000
Jan  6 10:34:16 Nokia-N900 kernel: [    2.297790] cs1 GPMC_CS_CONFIG2:
0x00101001
Jan  6 10:34:16 Nokia-N900 kernel: [    2.302246] cs1 GPMC_CS_CONFIG3:
0x00020201
Jan  6 10:34:16 Nokia-N900 kernel: [    2.306732] cs1 GPMC_CS_CONFIG4:
0x10031003
Jan  6 10:34:16 Nokia-N900 kernel: [    2.311126] cs1 GPMC_CS_CONFIG5:
0x010f1111
Jan  6 10:34:16 Nokia-N900 kernel: [    2.315612] cs1 GPMC_CS_CONFIG6:
0x8f030000
Jan  6 10:34:16 Nokia-N900 kernel: [    2.320007] gpmc cs1 access
configuration:
Jan  6 10:34:16 Nokia-N900 kernel: [    2.324401] gpmc,mux-add-data = <0>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.328124] gpmc,device-width = <1>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.331817] gpmc,wait-pin = <0>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.335205] gpmc,burst-length = <4>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.338928] gpmc cs1 timings
configuration:
Jan  6 10:34:16 Nokia-N900 kernel: [    2.343353] gpmc,cs-on-ns = <6> /* 1
ns - 6 ns; 1 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.349212] gpmc,cs-rd-off-ns = <96>
/* 91 ns - 96 ns; 16 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.355773] gpmc,cs-wr-off-ns = <96>
/* 91 ns - 96 ns; 16 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.362274] gpmc,adv-on-ns = <6> /* 1
ns - 6 ns; 1 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.368225] gpmc,adv-rd-off-ns = <12>
/* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.374664] gpmc,adv-wr-off-ns = <12>
/* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.381103] gpmc,oe-on-ns = <18> /* 13
ns - 18 ns; 3 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.387237] gpmc,oe-off-ns = <96> /*
91 ns - 96 ns; 16 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.393463] gpmc,we-on-ns = <18> /* 13
ns - 18 ns; 3 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.399597] gpmc,we-off-ns = <96> /*
91 ns - 96 ns; 16 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.405914] gpmc,rd-cycle-ns = <102>
/* 97 ns - 102 ns; 17 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.412536] gpmc,wr-cycle-ns = <102>
/* 97 ns - 102 ns; 17 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.419219] gpmc,access-ns = <90> /*
85 ns - 90 ns; 15 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.425476] gpmc,page-burst-access-ns
= <6> /* 1 ns - 6 ns; 1 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.432403] gpmc,bus-turnaround-ns =
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.439086] gpmc,cycle2cycle-delay-ns
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.446044] gpmc,wait-monitoring-ns =
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.452728] gpmc,clk-activation-ns =
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.459442] gpmc,wr-data-mux-bus-ns =
<18> /* 13 ns - 18 ns; 3 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.466491] gpmc,wr-access-ns = <90>
/* 85 ns - 90 ns; 15 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.473052] GPMC CS1: cs_on      :   0
ticks,   0 ns (was   1 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.481048] GPMC CS1: cs_rd_off      :
8 ticks,  48 ns (was  16 ticks)  48 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.489044] GPMC CS1: cs_wr_off      :
4 ticks,  24 ns (was  16 ticks)  24 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.496978] GPMC CS1: adv_on      :
0 ticks,   0 ns (was   1 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.504943] GPMC CS1: adv_rd_off
:   0 ticks,   0 ns (was   2 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.512878] GPMC CS1: adv_wr_off
:   0 ticks,   0 ns (was   2 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.520843] GPMC CS1: oe_on      :   2
ticks,  12 ns (was   3 ticks)  12 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.528839] GPMC CS1: oe_off      :
8 ticks,  48 ns (was  16 ticks)  48 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.536773] GPMC CS1: we_on      :   2
ticks,  12 ns (was   3 ticks)  12 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.544708] GPMC CS1: we_off      :
3 ticks,  18 ns (was  16 ticks)  18 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.552612] GPMC CS1: rd_cycle      :
30 ticks, 180 ns (was  17 ticks) 180 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.560607] GPMC CS1: wr_cycle      :
30 ticks, 180 ns (was  17 ticks) 180 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.568542] GPMC CS1: access      :
7 ticks,  42 ns (was  15 ticks)  42 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.576477] GPMC CS1:
page_burst_access:   0 ticks,   0 ns (was   1 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.584472] GPMC CS1: bus_turnaround
:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.592346] GPMC CS1:
cycle2cycle_delay:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.600341] GPMC CS1: wr_data_mux_bus
:   2 ticks,  12 ns (was   3 ticks)  12 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.608276] GPMC CS1: wr_access      :
0 ticks,   0 ns (was  15 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.616271] GPMC CS1: wait_monitoring
:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.624267] GPMC CS1: clk_activation
:   0 ticks,   0 ns (was   0 ticks)   0 ns
Jan  6 10:34:16 Nokia-N900 kernel: [    2.632171] GPMC CS1 CLK period is 6
ns (div 1)
Jan  6 10:34:16 Nokia-N900 kernel: [    2.637023] gpmc cs1 after
gpmc_cs_set_timings:
Jan  6 10:34:16 Nokia-N900 kernel: [    2.641815] cs1 GPMC_CS_CONFIG1:
0x00001000
Jan  6 10:34:16 Nokia-N900 kernel: [    2.646301] cs1 GPMC_CS_CONFIG2:
0x00040800
Jan  6 10:34:16 Nokia-N900 kernel: [    2.650726] cs1 GPMC_CS_CONFIG3:
0x00000000
Jan  6 10:34:16 Nokia-N900 kernel: [    2.655212] cs1 GPMC_CS_CONFIG4:
0x03020802
Jan  6 10:34:16 Nokia-N900 kernel: [    2.659606] cs1 GPMC_CS_CONFIG5:
0x00071e1e
Jan  6 10:34:16 Nokia-N900 kernel: [    2.664093] cs1 GPMC_CS_CONFIG6:
0x80020000
Jan  6 10:34:16 Nokia-N900 kernel: [    2.668548] gpmc cs1 access
configuration:
Jan  6 10:34:16 Nokia-N900 kernel: [    2.672882] gpmc,mux-add-data = <0>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.676635] gpmc,device-width = <1>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.680328] gpmc,wait-pin = <0>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.683685] gpmc,burst-length = <4>
Jan  6 10:34:16 Nokia-N900 kernel: [    2.687408] gpmc cs1 timings
configuration:
Jan  6 10:34:16 Nokia-N900 kernel: [    2.691833] gpmc,cs-on-ns = <0> /* 0
ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.697692] gpmc,cs-rd-off-ns = <48>
/* 43 ns - 48 ns; 8 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.704132] gpmc,cs-wr-off-ns = <24>
/* 19 ns - 24 ns; 4 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.710601] gpmc,adv-on-ns = <0> /* 0
ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.716552] gpmc,adv-rd-off-ns = <0>
/* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.722808] gpmc,adv-wr-off-ns = <0>
/* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.729125] gpmc,oe-on-ns = <12> /* 7
ns - 12 ns; 2 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.735137] gpmc,oe-off-ns = <48> /*
43 ns - 48 ns; 8 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.741333] gpmc,we-on-ns = <12> /* 7
ns - 12 ns; 2 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.747375] gpmc,we-off-ns = <18> /*
13 ns - 18 ns; 3 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.753509] gpmc,rd-cycle-ns = <180>
/* 175 ns - 180 ns; 30 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.760284] gpmc,wr-cycle-ns = <180>
/* 175 ns - 180 ns; 30 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.767059] gpmc,access-ns = <42> /*
37 ns - 42 ns; 7 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.773254] gpmc,page-burst-access-ns
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.780212] gpmc,bus-turnaround-ns =
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.786895] gpmc,cycle2cycle-delay-ns
= <0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.793853] gpmc,wait-monitoring-ns =
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.800628] gpmc,clk-activation-ns =
<0> /* 0 ns - 0 ns; 0 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.807312] gpmc,wr-data-mux-bus-ns =
<12> /* 7 ns - 12 ns; 2 ticks */
Jan  6 10:34:16 Nokia-N900 kernel: [    2.814270] gpmc,wr-access-ns = <0> /*
Quoted 1 line

0 ns - 0 ns; 0 ticks */

Just one note. In future, please do not send logs in format flowed emails as space on end of line has special meanings. And output is wrapped randomly and hard to read (like in my quoted text above).

If you are unable to configure email client correctly (turn of format flowed) then rather attach logs as attachment (ideally marked with
Content-Disposition: inline).

See linux/Documentation/email-clients.txt where are very useful hints how to fix buggy email clients.

Signature · 2 lines
Pali Roh?r
pali.rohar at gmail.com
author maintainer
#24 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 42 lines · Pali Roh?r
Quoted 41 lines · On Wednesday 06 January 2016 10:55:51 Ivaylo Dimitrov wrote:

arch/arm/mach-omap2/gpmc-onenand.c

Quoted 35 lines · Tony Lindgren

Suggested fix below, please test and reply with your Tested-by's if it solves the problem so we may still be able to get this into v4.4.

8< ---------------
From: Tony Lindgren <[email protected]>
Date: Tue, 5 Jan 2016 12:04:20 -0800
Subject: [PATCH] ARM: OMAP2+: Fix onenand rate detection to avoid filesystem
corruption

Commit 63aa945b1013 ("memory: omap-gpmc: Add Kconfig option for debug") unified the GPMC debug for the SoCs with GPMC. The commit also left out the option for HWMOD_INIT_NO_RESET as we now require proper timings for GPMC to be able to remap GPMC devices out of address 0.

Unfortunately on 900, onenand now only partially works with the device tree provided timings. It works enough to get detected but the clock rate supported by the onenand chip gets misdetected. This in turn causes the GPMC timings to be miscalculated and this leads into file system corruption on n900.

Looks like onenand needs CS_CONFIG1 bit 27 WRITETYPE set for for sync write. This is needed also for async timings when we write to onenand with omap2_onenand_set_async_mode(). Without sync write bit set, the async read for the onenand ONENAND_REG_VERSION_ID will return 0xfff.

Let's exit with an error if onenand rate is not detected. And let's remove the extra call to omap2_onenand_set_async_mode() as we only need to do this once at the end of omap2_onenand_setup_async().

arch/arm/mach-omap2/gpmc-onenand.c +0 -0

Bellow is gpmc dmesg output with that fix. I also disabled CONFIG_OMAP_GPMC_DEBUG and am still able to boot to maemo with no obvious problems.

Quoted 5 lines
Quoted 3 lines

So, seems that fixes the problem, feel free to add:

Great! Thank you for fixing and testing this problem!

Good to hear it fixes the issue. I'll wait to hear from Aaro before committing.

Regards,

Tony

maintainer
#25 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

In reply to Tony Lindgren

Hi,

Quoted 21 lines · Tony Lindgren

From: Tony Lindgren <[email protected]>
Date: Tue, 5 Jan 2016 12:04:20 -0800
Subject: [PATCH] ARM: OMAP2+: Fix onenand rate detection to avoid filesystem
corruption

Commit 63aa945b1013 ("memory: omap-gpmc: Add Kconfig option for debug") unified the GPMC debug for the SoCs with GPMC. The commit also left out the option for HWMOD_INIT_NO_RESET as we now require proper timings for GPMC to be able to remap GPMC devices out of address 0.

Unfortunately on 900, onenand now only partially works with the device tree provided timings. It works enough to get detected but the clock rate supported by the onenand chip gets misdetected. This in turn causes the GPMC timings to be miscalculated and this leads into file system corruption on n900.

Looks like onenand needs CS_CONFIG1 bit 27 WRITETYPE set for for sync write. This is needed also for async timings when we write to onenand with omap2_onenand_set_async_mode(). Without sync write bit set, the async read for the onenand ONENAND_REG_VERSION_ID will return 0xfff.

Quoted 6 lines

Let's exit with an error if onenand rate is not detected. And let's remove the extra call to omap2_onenand_set_async_mode() as we only need to do this once at the end of omap2_onenand_setup_async().

This fixes also the detection issue on N950. Also tested the patch with N810.

A.

Quoted 47 lines
arch/arm/mach-omap2/gpmc-onenand.c +9 -5
@@ -149,8 +149,8 @@ static int omap2_onenand_get_freq(struct omap_onenand_platform_data *cfg,
 		freq = 104;
 		break;
 	default:
-		freq = 54;
-		break;
+		pr_err("onenand rate not detected, bad GPMC async timings?\n");
+		freq = 0;
 	}
 
 	return freq;
@@ -271,6 +271,11 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base)
 	struct gpmc_timings t;
 	int ret;
 
+	/*
+	 * Note that we need to keep sync_write set for the call to
+	 * omap2_onenand_set_async_mode() to work to detect the onenand
+	 * supported clock rate for the sync timings.
+	 */
 	if (gpmc_onenand_data->of_node) {
 		gpmc_read_settings_dt(gpmc_onenand_data->of_node,
 				      &onenand_async);
@@ -281,12 +286,9 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base)
 			else
 				gpmc_onenand_data->flags |= ONENAND_SYNC_READ;
 			onenand_async.sync_read = false;
-			onenand_async.sync_write = false;
 		}
 	}
 
-	omap2_onenand_set_async_mode(onenand_base);
-
 	omap2_onenand_calc_async_timings(&t);
 
 	ret = gpmc_cs_program_settings(gpmc_onenand_data->cs, &onenand_async);
@@ -310,6 +312,8 @@ static int omap2_onenand_setup_sync(void __iomem *onenand_base, int *freq_ptr)
 	if (!freq) {
 		/* Very first call freq is not known */
 		freq = omap2_onenand_get_freq(gpmc_onenand_data, onenand_base);
+		if (!freq)
+			return -ENODEV;
 		set_onenand_cfg(onenand_base);
 	}
 
#26 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

In reply to Tony Lindgren

Hi,

Quoted 6 lines · Tony Lindgren

Commit 63aa945b1013 ("memory: omap-gpmc: Add Kconfig option for debug") unified the GPMC debug for the SoCs with GPMC. The commit also left out the option for HWMOD_INIT_NO_RESET as we now require proper timings for GPMC to be able to remap GPMC devices out of address 0.

Unfortunately on 900, onenand now only partially works with the device

You may want to change 900 to n900 (maybe even Nokia N900) before actually committing this.

Quoted 10 lines

tree provided timings. It works enough to get detected but the clock rate supported by the onenand chip gets misdetected. This in turn causes the GPMC timings to be miscalculated and this leads into file system corruption on n900.

Looks like onenand needs CS_CONFIG1 bit 27 WRITETYPE set for for sync write. This is needed also for async timings when we write to onenand with omap2_onenand_set_async_mode(). Without sync write bit set, the async read for the onenand ONENAND_REG_VERSION_ID will return 0xfff.

Quoted 6 lines

Let's exit with an error if onenand rate is not detected. And let's remove the extra call to omap2_onenand_set_async_mode() as we only need to do this once at the end of omap2_onenand_setup_async().

-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160106/c87fc87d/attachment-0001.sig>

author maintainer
#27 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 8 lines · Sebastian Reichel

Hi,

Quoted 5 lines · Tony Lindgren

Commit 63aa945b1013 ("memory: omap-gpmc: Add Kconfig option for debug") unified the GPMC debug for the SoCs with GPMC. The commit also left out the option for HWMOD_INIT_NO_RESET as we now require proper timings for GPMC to be able to remap GPMC devices out of address 0.

Quoted 4 lines
Quoted 1 line

Unfortunately on 900, onenand now only partially works with the device

You may want to change 900 to n900 (maybe even Nokia N900) before actually committing this.

Thanks will do.

Tony

#28 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 9 lines · Tony Lindgren
Quoted 8 lines · Sebastian Reichel

Hi,

Quoted 5 lines · Tony Lindgren

Commit 63aa945b1013 ("memory: omap-gpmc: Add Kconfig option for debug") unified the GPMC debug for the SoCs with GPMC. The commit also left out the option for HWMOD_INIT_NO_RESET as we now require proper timings for GPMC to be able to remap GPMC devices out of address 0.

Quoted 10 lines
Quoted 4 lines
Quoted 1 line

Unfortunately on 900, onenand now only partially works with the device

You may want to change 900 to n900 (maybe even Nokia N900) before actually committing this.

Thanks will do.

Tony

Unfortunately, it seems there is more to be fixed. It booted several times to the userspace, but after a couple of shutdowns, rootfs became corrupted again. I flashed, installed linux 4.4, but the same happened after the first shutdown with 4.4:

<5>[    8.159179] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" stops
<3>[    8.184631] UBIFS error (ubi0:0 pid 1): ubifs_read_node: bad node 
type (255 but expected 9)
<3>[    8.197937] UBIFS error (ubi0:0 pid 1): ubifs_read_node: bad node 
at LEB 1934:6936, LEB mapping status 0
<3:[    8.216522] Not a node, first 24 bytes:
<3>[    8.220520] 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff                          ........................
<4>[    8.247772] CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.0-rc7+ #4
<4>[    8.258911] Hardware name: Nokia RX-51 board
<4>[    8.268096] [<c0013a98>] (unwind_backtrace) from Y<c0011db8>] 
(show_stack+0x10/0x14)
<4>[    8.281097] [<c0011db8>] (show_stack) from [<c01aa7b4>] 
(ubifs_read_node+0x29c/0x2d4)
<4>[    8.294097] [<c01aa7b4>] (ubifs_read_node) from [<c01b2ae0>] 
(dbg_old_index_check_init+0x60/0x9c)
<4>[    8.308258] [<c01b2ae0>] (dbg_old_index_check_init) from 
[<c01a6d00>] (ubifs_mount+0xd90/0x15f0)
<4>[    8.322357] [<c01a6d00>] (ubifs_mount) from [<c00df77c>] 
(mount_fs+0x70/0x148)
<4>[    8.334747] [<c00df77c>] (mount_fs) from [<c00f86bc>] 
(vfs_kern_mount+0x4c/0x110)
<4>[    8.347412] [<c00f86bc>] (vfs_kern_mount) from [<c00fb5c4>] 
(do_mount+0xadc/0xc34)
<4>[    8.360168] [<c00fb5c4>] (do_mount) from [<c00fb940>] 
(SyS_mount+0x70/0x9c)
<4>[    8.372253] [<c00fb940>] (SyS_mount) from [<c0602038>] 
(mount_block_root+0xf0/0x28c)
<4>[    8.385162] [<c0602038>] (mount_block_root) from [<c06023b8>] 
(prepare_namespace+0x88/0x1bc)
<4>[    8.398834] [<c06023b8>] (prepare_namespace) from [<c0601df4>] 
(kernel_init_freeable+0x178/0x1c4)
<4>[    8.412963] [<c0601df4>] (kernel_init_freeabme) from [<c04375d8>] 
(kernel_init+0x8/0xe4)
<4>[    8.426300] [<c04375d8>] (kernel_init) from [<c000f098>] 

(ret_from_fork+0x14/0x3c)

P.S.
(Pali, sorry for not having time to read the kernel docs re e-mail clients :) )

author maintainer
#29 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 5 lines · Ivaylo Dimitrov

Unfortunately, it seems there is more to be fixed. It booted several times to the userspace, but after a couple of shutdowns, rootfs became corrupted again. I flashed, installed linux 4.4, but the same happened after the first shutdown with 4.4:

Hmm. Care to verify that your onenand really gets detected at 83 MHz like your earlier logs show? Below is a patch that should show it.

Also, do things now work reliably for you with CONFIG_OMAP_GPMC_DEBUG enabled? Or does that also produce corruption after few reboots?

Regards,

Tony

8< --------------

arch/arm/mach-omap2/gpmc-onenand.c +2 -0
@@ -153,6 +153,8 @@ static int omap2_onenand_get_freq(struct omap_onenand_platform_data *cfg,
 		freq = 0;
 	}
 
+	pr_info("onenand rate detected: %i\n", freq);
+
 	return freq;
 }
 
#30 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Hi,

Quoted 3 lines · Tony Lindgren

Hmm. Care to verify that your onenand really gets detected at 83 MHz like your earlier logs show? Below is a patch that should show it.

before the corruption appeared, I looked a couple of times in syslog and the freq there was 83MHz. Including after I disabled CONFIG_OMAP_GPMC_DEBUG.

Quoted 3 lines

Also, do things now work reliably for you with CONFIG_OMAP_GPMC_DEBUG enabled? Or does that also produce corruption after few reboots?

CONFIG_OMAP_GPMC_DEBUG is disabled, shall I enable it?

arch/arm/mach-omap2/gpmc-onenand.c static int omap2_onenand_get_freq(struct omap_onenand_platform_data *cfg, · line 160

Quoted 11 lines
arch/arm/mach-omap2/gpmc-onenand.c +2 -0
@@ -153,6 +153,8 @@ static int omap2_onenand_get_freq(struct omap_onenand_platform_data *cfg,
  		freq = 0;
  	}
 
+	pr_info("onenand rate detected: %i\n", freq);
+
  	return freq;
  }
 

Where am I supposed to get the output from ^^^ if rootfs become corrupted? The problem appears after poweroff/restart when it is already too late to get the syslog.

BTW, did you compare all the GPMC registers with and without HWMOD_INIT_NO_RESET?

Regards,
Ivo

author maintainer
#31 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 10 lines · Ivaylo Dimitrov

Hi,

Quoted 3 lines · Tony Lindgren

Hmm. Care to verify that your onenand really gets detected at 83 MHz like your earlier logs show? Below is a patch that should show it.

before the corruption appeared, I looked a couple of times in syslog and the freq there was 83MHz. Including after I disabled CONFIG_OMAP_GPMC_DEBUG.

OK well at least that part of the bug is fixed then.

Quoted 4 lines
Quoted 2 lines

Also, do things now work reliably for you with CONFIG_OMAP_GPMC_DEBUG enabled? Or does that also produce corruption after few reboots?

CONFIG_OMAP_GPMC_DEBUG is disabled, shall I enable it?

Yes please.

Quoted 3 lines

Where am I supposed to get the output from ^^^ if rootfs become corrupted? The problem appears after poweroff/restart when it is already too late to get the syslog.

Hmm good point. Can you boot with root on MMC? So far no luck here reproducing the corruption here with my fix applied.

Quoted 2 lines

BTW, did you compare all the GPMC registers with and without HWMOD_INIT_NO_RESET?

Well the timings now for me both with and without GPMC reset are:

cs0 GPMC_CS_CONFIG1: 0xfb001201
cs0 GPMC_CS_CONFIG2: 0x00101000
cs0 GPMC_CS_CONFIG3: 0x00020200
cs0 GPMC_CS_CONFIG4: 0x10001003
cs0 GPMC_CS_CONFIG5: 0x020f1313
cs0 GPMC_CS_CONFIG6: 0x8f050000

These timings also match the current mainline timings without the fix I posted when CONFIG_OMAP_GPMC_DEBUG is enabled.

The nolo set timings I have are:
cs0 GPMC_CS_CONFIG1: 0xfb001201
cs0 GPMC_CS_CONFIG2: 0x00101000
cs0 GPMC_CS_CONFIG3: 0x00020200
cs0 GPMC_CS_CONFIG4: 0x10001002 <- OEONTIME is still different in nolo cs0 GPMC_CS_CONFIG5: 0x020f1313
cs0 GPMC_CS_CONFIG6: 0x8f050000

So there seems to be OEONTIME difference. Once the legacy boot is gone, we can probably remove the OEONTIME calculations and rely on the dts provide values as it seems that currently the dts value is ignored in gpmc_calc_sync_read_timings().

To dump your nolo provided timings, you can add the following line to gpmc_probe_onenand_child() before gpmc_onenand_init:

	gpmc_cs_show_timings(gpmc_onenand_data->cs,
		"before gpmc_cs_program_settings");

Note that will show the wrong GPMC default values after reset unless you have CONFIG_OMAP_GPMC_DEBUG enabled.

Then below is a better debug patch to dump out the values after reset. Note that in that case the above "before" timings must be ignored.

Regards,

Tony

8< --------------------

arch/arm/mach-omap2/gpmc-onenand.c +2 -0
@@ -153,6 +153,8 @@ static int omap2_onenand_get_freq(struct omap_onenand_platform_data *cfg,
 		freq = 0;
 	}
 
+	gpmc_cs_show_timings(cs, "before gpmc_cs_program_settings");
+
 	return freq;
 }
 
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1 -2
@@ -2150,8 +2150,7 @@ static struct omap_hwmod omap3xxx_gpmc_hwmod = {
 	.clkdm_name	= "core_l3_clkdm",
 	.mpu_irqs	= omap3xxx_gpmc_irqs,
 	.main_clk	= "gpmc_fck",
-	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
-	.flags		= HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
+	.flags		= HWMOD_NO_IDLEST,
 };
 
 /*
drivers/memory/omap-gpmc.c +1 -1
@@ -1987,7 +1987,7 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
 	if (ret < 0)
 		goto err;
 
-	gpmc_cs_show_timings(cs, "before gpmc_cs_program_settings");
+	dev_info(&pdev->dev, "GPMC reset, not showing default timings\n");
 	ret = gpmc_cs_program_settings(cs, &gpmc_s);
 	if (ret < 0)
 		goto err;
#32 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Hi,

Quoted 3 lines · Tony Lindgren

OK well at least that part of the bug is fixed then.

Yes, seems so

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Also, do things now work reliably for you with CONFIG_OMAP_GPMC_DEBUG enabled? Or does that also produce corruption after few reboots?

I'll make further experiments as I am a bit lost what and when happens. What is for sure is that corruptions occurs immediately after boot without your patch and with CONFIG_OMAP_GPMC_DEBUG disabled. So maybe there is another problem in ubfs or mtd driver.

Quoted 4 lines
Quoted 2 lines

CONFIG_OMAP_GPMC_DEBUG is disabled, shall I enable it?

Yes please.

Already did, every reflash and install of upstream kernel compatible SW takes me about 3 hours I'd rather spend on something else :). Though it seems that reboot issue happens no matter if CONFIG_OMAP_GPMC_DEBUG is enabled or not.

Quoted 7 lines
Quoted 4 lines

Where am I supposed to get the output from ^^^ if rootfs become corrupted? The problem appears after poweroff/restart when it is already too late to get the syslog.

Hmm good point. Can you boot with root on MMC? So far no luck here reproducing the corruption here with my fix applied.

Will do, when we exhaust the other options. What I am afraid of, is that if I boot from mmc, I won't be able to reproduce the problem, as there will be no pressure on ubifs/mtd/onenand drivers.

Quoted 16 lines
Quoted 3 lines

BTW, did you compare all the GPMC registers with and without HWMOD_INIT_NO_RESET?

Well the timings now for me both with and without GPMC reset are:

cs0 GPMC_CS_CONFIG1: 0xfb001201
cs0 GPMC_CS_CONFIG2: 0x00101000
cs0 GPMC_CS_CONFIG3: 0x00020200
cs0 GPMC_CS_CONFIG4: 0x10001003
cs0 GPMC_CS_CONFIG5: 0x020f1313
cs0 GPMC_CS_CONFIG6: 0x8f050000

These timings also match the current mainline timings without the fix I posted when CONFIG_OMAP_GPMC_DEBUG is enabled.

Quoted 8 lines

The nolo set timings I have are:
cs0 GPMC_CS_CONFIG1: 0xfb001201
cs0 GPMC_CS_CONFIG2: 0x00101000
cs0 GPMC_CS_CONFIG3: 0x00020200
cs0 GPMC_CS_CONFIG4: 0x10001002 <- OEONTIME is still different in nolo cs0 GPMC_CS_CONFIG5: 0x020f1313
cs0 GPMC_CS_CONFIG6: 0x8f050000

Same here

Quoted 11 lines

So there seems to be OEONTIME difference. Once the legacy boot is gone, we can probably remove the OEONTIME calculations and rely on the dts provide values as it seems that currently the dts value is ignored in gpmc_calc_sync_read_timings().

To dump your nolo provided timings, you can add the following line to gpmc_probe_onenand_child() before gpmc_onenand_init:

	gpmc_cs_show_timings(gpmc_onenand_data->cs,
		"before gpmc_cs_program_settings");

The problem is that between NOLO and kernel there is u-boot. And even if I am almost sure it doesn't touch onenand configs, I can't be absolutely sure. So those timings are not 100% reliable IMO, though close to that.

Quoted 39 lines

Note that will show the wrong GPMC default values after reset unless you have CONFIG_OMAP_GPMC_DEBUG enabled.

Then below is a better debug patch to dump out the values after reset. Note that in that case the above "before" timings must be ignored.

Regards,

Tony

8< --------------------

arch/arm/mach-omap2/gpmc-onenand.c +2 -0
@@ -153,6 +153,8 @@ static int omap2_onenand_get_freq(struct omap_onenand_platform_data *cfg,
  		freq = 0;
  	}
 
+	gpmc_cs_show_timings(cs, "before gpmc_cs_program_settings");
+
  	return freq;
  }
 
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1 -2
@@ -2150,8 +2150,7 @@ static struct omap_hwmod omap3xxx_gpmc_hwmod = {
  	.clkdm_name	= "core_l3_clkdm",
  	.mpu_irqs	= omap3xxx_gpmc_irqs,
  	.main_clk	= "gpmc_fck",
-	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
-	.flags		= HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
+	.flags		= HWMOD_NO_IDLEST,
  };
 
  /*

drivers/memory/omap-gpmc.c static int gpmc_probe_generic_child(struct platform_device *pdev, · line 1993

Quoted 8 lines
drivers/memory/omap-gpmc.c +1 -1
@@ -1987,7 +1987,7 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
  	if (ret < 0)
  		goto err;
 
-	gpmc_cs_show_timings(cs, "before gpmc_cs_program_settings");
+	dev_info(&pdev->dev, "GPMC reset, not showing default timings\n");
  	ret = gpmc_cs_program_settings(cs, &gpmc_s);
  	if (ret < 0)
  		goto err;

I'll play a bit more with printing the values with both CONFIG_OMAP_GPMC_DEBUG enabled and disabled and whatever I can think of, including dumping cs0 config from u-boot, nokia kernel and/or REing NOLO onenand init (already did that for N9 DDR timings, shouldn't be that hard for N900 GPMC). Will keep you informed on the progress. In the meanwhile I think your patch should make it as without it onenand is unusable.

Thanks,
Ivo

author maintainer
#33 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 9 lines · Ivaylo Dimitrov
Quoted 2 lines · Tony Lindgren
Quoted 2 lines
Quoted 2 lines

Also, do things now work reliably for you with CONFIG_OMAP_GPMC_DEBUG enabled? Or does that also produce corruption after few reboots?

I'll make further experiments as I am a bit lost what and when happens. What is for sure is that corruptions occurs immediately after boot without your patch and with CONFIG_OMAP_GPMC_DEBUG disabled. So maybe there is another problem in ubfs or mtd driver.

Yes it seems there's some other issue too. Maybe you can run git bisect again and carry the fix along as an extra patch?

Quoted 4 lines

Already did, every reflash and install of upstream kernel compatible SW takes me about 3 hours I'd rather spend on something else :). Though it seems that reboot issue happens no matter if CONFIG_OMAP_GPMC_DEBUG is enabled or not.

OK then it really seems like we do have another bug lurking around. Maybe you can figure out an easier way to reproduce it?

Quoted 3 lines

The problem is that between NOLO and kernel there is u-boot. And even if I am almost sure it doesn't touch onenand configs, I can't be absolutely sure. So those timings are not 100% reliable IMO, though close to that.

Hmm yes I'm only booting with u-boot here as my device sits in my rack.

Quoted 6 lines

I'll play a bit more with printing the values with both CONFIG_OMAP_GPMC_DEBUG enabled and disabled and whatever I can think of, including dumping cs0 config from u-boot, nokia kernel and/or REing NOLO onenand init (already did that for N9 DDR timings, shouldn't be that hard for N900 GPMC). Will keep you informed on the progress. In the meanwhile I think your patch should make it as without it onenand is unusable.

OK will push it out then.

Regards,

Tony

#34 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Hi

Quoted 4 lines · Tony Lindgren

Yes it seems there's some other issue too. Maybe you can run git bisect again and carry the fix along as an extra patch?

No sane way to bisect, I don't really know what triggers the issue. Neither it is triggered regularly. It might happen on the first reboot or on the tenth, or ... And it looks like the problems happens sometimes on oops too. Not to say that it seems I should have fully booted userspace (so there is enough pressure on the ubi/mdt/nand subsystems), which is impossible with upstream without some n900 specific patches :(

Maybe we can get some ideas on what and where to look from ubifs people? Though I don't know whom to cc, feel free to help :)

My best bet aiui, is comparing what nokia omap1 kernel does vs upstream. Or looking at the commit log in ubi/mtd/onenand - who knows, I might get lucky once again the same way as with that phonet oops in __netif_receive_skb_core.

Quoted 2 lines

OK then it really seems like we do have another bug lurking around.

:nod:

Quoted 2 lines

Maybe you can figure out an easier way to reproduce it?

I doubt, but who knows.

Quoted 6 lines
Quoted 3 lines

The problem is that between NOLO and kernel there is u-boot. And even if I am almost sure it doesn't touch onenand configs, I can't be absolutely sure. So those timings are not 100% reliable IMO, though close to that.

Hmm yes I'm only booting with u-boot here as my device sits in my rack.

I booted the device via flasher with initrd from the so-called rescueos
(https://n900.quitesimple.org/rescueOS/rescueOS-1.2/) - it provides shell with tons of useful tools if your device is in bootloop etc. CS0 registers were the same as with u-boot, so it is not that one.

Quoted 3 lines

OK will push it out then.

Thanks,
Ivo

#35 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 1 line · On Friday 08 January 2016 07:13:58 Ivaylo Dimitrov wrote:

And it looks like the problems happens sometimes on oops too.

In linux-n900 tree is enabled mtdoops driver which store oops to specified MTD device. So maybe this access cause it?

Signature · 2 lines
Pali Roh?r
pali.rohar at gmail.com
#36 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Hi,

Quoted 6 lines · Pali Roh?r
Quoted 1 line · On Friday 08 January 2016 07:13:58 Ivaylo Dimitrov wrote:

And it looks like the problems happens sometimes on oops too.

In linux-n900 tree is enabled mtdoops driver which store oops to specified MTD device. So maybe this access cause it?

The key word here is "sometimes". i.e sometimes it hapens on normal reboot, sometimes it happens on oops.

#37 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 4 lines · On Saturday 09 January 2016 02:23:26 Ivaylo Dimitrov wrote:

Hi,

Quoted 1 line · Pali Roh?r

On Friday 08 January 2016 07:13:58 Ivaylo Dimitrov wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

And it looks like the problems happens sometimes on oops too.

In linux-n900 tree is enabled mtdoops driver which store oops to specified MTD device. So maybe this access cause it?

The key word here is "sometimes". i.e sometimes it hapens on normal reboot, sometimes it happens on oops.

So where is problem? In omap-gpmc? mtd? onenand? or ubifs? Or in different component? Do we know at least this?

Signature · 2 lines
Pali Roh?r
pali.rohar at gmail.com
#38 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Hi,

Quoted 11 lines · Pali Roh?r
Quoted 10 lines · On Saturday 09 January 2016 02:23:26 Ivaylo Dimitrov wrote:

Hi,

Quoted 6 lines · Pali Roh?r
Quoted 1 line · On Friday 08 January 2016 07:13:58 Ivaylo Dimitrov wrote:

And it looks like the problems happens sometimes on oops too.

In linux-n900 tree is enabled mtdoops driver which store oops to specified MTD device. So maybe this access cause it?

Quoted 6 lines
Quoted 2 lines

The key word here is "sometimes". i.e sometimes it hapens on normal reboot, sometimes it happens on oops.

So where is problem? In omap-gpmc? mtd? onenand? or ubifs? Or in different component? Do we know at least this?

I think I made some progress on the issue, it seems I have to have *both* e7b11dc7b77bfce0a351230a5feeadc1d0bba997 (e7b11dc7b77bfce0a351230a5feeadc1d0bba997) reverted *and* HWMOD_INIT_NO_RESET restored in omap3xxx_gpmc_hwmod flags to have working onenand.

Tony, shall I hardcode GPMC_CS_CONFIG4 OEONTIME to be the same as NOLO's or it does not make sense?

Regards,
Ivo

author maintainer
#39 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 9 lines · Ivaylo Dimitrov
Quoted 7 lines · Pali Roh?r
Quoted 2 lines · On Saturday 09 January 2016 02:23:26 Ivaylo Dimitrov wrote:

The key word here is "sometimes". i.e sometimes it hapens on normal reboot, sometimes it happens on oops.

So where is problem? In omap-gpmc? mtd? onenand? or ubifs? Or in different component? Do we know at least this?

Quoted 5 lines

I think I made some progress on the issue, it seems I have to have *both* e7b11dc7b77bfce0a351230a5feeadc1d0bba997 (e7b11dc7b77bfce0a351230a5feeadc1d0bba997) reverted *and* HWMOD_INIT_NO_RESET restored in omap3xxx_gpmc_hwmod flags to have working onenand.

That is strange. This is what I get with omap2plus_defconfig and omap-for-v4.5/fixes-rc1 after flashing the rootfs and booting kernel like you suggested on irc:

# dmesg | grep -i -e ubi -e onenand
[    2.502899] omap2-onenand omap2-onenand: initializing on CS0, phys base 0x01000000, virtual base d0940000, freq 83 MHz
[    2.514373] OneNAND Manufacturer: Numonyx (0x20)
[    2.519287] Muxed OneNAND 256MB 1.8V 16-bit (0x40)
[    2.524444] OneNAND version = 0x0031
[    2.671966] 6 ofpart partitions found on MTD device omap2-onenand
[    2.678436] Creating 6 MTD partitions on "omap2-onenand":
[    3.414764] ubi0: attaching mtd5
[    3.668212] ubi0: scanning is finished
[    3.716552] ubi0: attached mtd5 (name "rootfs", size 251 MiB)
[    3.722839] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    3.730194] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    3.737304] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    3.744537] ubi0: good PEBs: 2010, bad PEBs: 0, corrupted PEBs: 0
[    3.751037] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    3.758697] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 0
[    3.767578] ubi0: available PEBs: 0, total reserved PEBs: 2010, PEBs reserved for bad PEB handling: 40
[    3.923980] ubi0: background thread "ubi_bgt0d" started, PID 85
[    3.980529] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 87
[    3.996337] UBIFS (ubi0:0): recovery needed
[    4.079925] UBIFS (ubi0:0): recovery completed
[    4.085876] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    4.093780] UBIFS (ubi0:0): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    4.104339] UBIFS (ubi0:0): FS size: 252241920 bytes (240 MiB, 1955 LEBs), journal size 9033728 bytes (8 MiB, 71 LEBs)
[    4.115722] UBIFS (ubi0:0): reserved for root: 4190434 bytes (4092 KiB)
[    4.122772] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 8F30A88A-F605-4291-9927-00CF3A2AE119, small LPT model
[    4.136077] VFS: Mounted root (ubifs filesystem) on device 0:15.

I copied over the modules to this rootfs too :) But in general onenand seems to behave for me.

Quoted 2 lines

Tony, shall I hardcode GPMC_CS_CONFIG4 OEONTIME to be the same as NOLO's or it does not make sense?

Not sure what is still wrong. But yeah some borderline GPMC timing differences could affect it.

Regards,

Tony

author maintainer
#40 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 48 lines · Tony Lindgren
Quoted 9 lines · Ivaylo Dimitrov
Quoted 7 lines · Pali Roh?r
Quoted 2 lines · On Saturday 09 January 2016 02:23:26 Ivaylo Dimitrov wrote:

The key word here is "sometimes". i.e sometimes it hapens on normal reboot, sometimes it happens on oops.

So where is problem? In omap-gpmc? mtd? onenand? or ubifs? Or in different component? Do we know at least this?

Quoted 5 lines

I think I made some progress on the issue, it seems I have to have *both* e7b11dc7b77bfce0a351230a5feeadc1d0bba997 (e7b11dc7b77bfce0a351230a5feeadc1d0bba997) reverted *and* HWMOD_INIT_NO_RESET restored in omap3xxx_gpmc_hwmod flags to have working onenand.

That is strange. This is what I get with omap2plus_defconfig and omap-for-v4.5/fixes-rc1 after flashing the rootfs and booting kernel like you suggested on irc:

# dmesg | grep -i -e ubi -e onenand
[    2.502899] omap2-onenand omap2-onenand: initializing on CS0, phys base 0x01000000, virtual base d0940000, freq 83 MHz
[    2.514373] OneNAND Manufacturer: Numonyx (0x20)
[    2.519287] Muxed OneNAND 256MB 1.8V 16-bit (0x40)
[    2.524444] OneNAND version = 0x0031
[    2.671966] 6 ofpart partitions found on MTD device omap2-onenand
[    2.678436] Creating 6 MTD partitions on "omap2-onenand":
[    3.414764] ubi0: attaching mtd5
[    3.668212] ubi0: scanning is finished
[    3.716552] ubi0: attached mtd5 (name "rootfs", size 251 MiB)
[    3.722839] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    3.730194] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    3.737304] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    3.744537] ubi0: good PEBs: 2010, bad PEBs: 0, corrupted PEBs: 0
[    3.751037] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    3.758697] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 0
[    3.767578] ubi0: available PEBs: 0, total reserved PEBs: 2010, PEBs reserved for bad PEB handling: 40
[    3.923980] ubi0: background thread "ubi_bgt0d" started, PID 85
[    3.980529] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 87
[    3.996337] UBIFS (ubi0:0): recovery needed
[    4.079925] UBIFS (ubi0:0): recovery completed
[    4.085876] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    4.093780] UBIFS (ubi0:0): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    4.104339] UBIFS (ubi0:0): FS size: 252241920 bytes (240 MiB, 1955 LEBs), journal size 9033728 bytes (8 MiB, 71 LEBs)
[    4.115722] UBIFS (ubi0:0): reserved for root: 4190434 bytes (4092 KiB)
[    4.122772] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 8F30A88A-F605-4291-9927-00CF3A2AE119, small LPT model
[    4.136077] VFS: Mounted root (ubifs filesystem) on device 0:15.
Quoted 2 lines

I copied over the modules to this rootfs too :) But in general onenand seems to behave for me.

And ere are my GPCM timings when booted with GPMC_DEBUG in case they are different somehow for your device.

Regards,

Tony

omap-gpmc 6e000000.gpmc: GPMC revision 5.0
GPMC CS0: cs_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: cs_rd_off : 14 ticks, 84 ns (was 16 ticks) 84 ns
GPMC CS0: cs_wr_off : 19 ticks, 114 ns (was 16 ticks) 114 ns
GPMC CS0: adv_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: adv_rd_off : 3 ticks, 18 ns (was 2 ticks) 18 ns
GPMC CS0: adv_wr_off : 3 ticks, 18 ns (was 2 ticks) 18 ns
GPMC CS0: oe_on : 5 ticks, 30 ns (was 2 ticks) 30 ns
GPMC CS0: oe_off : 14 ticks, 84 ns (was 16 ticks) 84 ns
GPMC CS0: we_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: we_off : 14 ticks, 84 ns (was 16 ticks) 84 ns
GPMC CS0: rd_cycle : 18 ticks, 108 ns (was 19 ticks) 108 ns
GPMC CS0: wr_cycle : 17 ticks, 102 ns (was 19 ticks) 102 ns
GPMC CS0: access : 13 ticks, 78 ns (was 15 ticks) 78 ns
GPMC CS0: page_burst_access: 0 ticks, 0 ns (was 2 ticks) 0 ns
GPMC CS0: bus_turnaround : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: cycle2cycle_delay: 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: wr_data_mux_bus : 5 ticks, 30 ns (was 5 ticks) 30 ns
GPMC CS0: wr_access : 13 ticks, 78 ns (was 15 ticks) 78 ns
GPMC CS0: wait_monitoring : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: clk_activation : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0 CLK period is 6 ns (div 1)
gpmc cs0 after gpmc_cs_set_timings:
cs0 GPMC_CS_CONFIG1: 0xd9001200
cs0 GPMC_CS_CONFIG2: 0x00130e00
cs0 GPMC_CS_CONFIG3: 0x00030300
cs0 GPMC_CS_CONFIG4: 0x0e000e05
cs0 GPMC_CS_CONFIG5: 0x000d1112
cs0 GPMC_CS_CONFIG6: 0x8d050000
gpmc cs0 access configuration:
gpmc,mux-add-data = <2>
gpmc,device-width = <1>
gpmc,wait-pin = <0>
gpmc,burst-length = <16>
gpmc,sync-write = <1>
gpmc,burst-write = <1>
gpmc,burst-read = <1>
gpmc,burst-wrap = <1>
gpmc cs0 timings configuration:
gpmc,cs-on-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,cs-rd-off-ns = <84> /* 79 ns - 84 ns; 14 ticks */
gpmc,cs-wr-off-ns = <114> /* 109 ns - 114 ns; 19 ticks */
gpmc,adv-on-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,adv-rd-off-ns = <18> /* 13 ns - 18 ns; 3 ticks */
gpmc,adv-wr-off-ns = <18> /* 13 ns - 18 ns; 3 ticks */
gpmc,oe-on-ns = <30> /* 25 ns - 30 ns; 5 ticks */
gpmc,oe-off-ns = <84> /* 79 ns - 84 ns; 14 ticks */
gpmc,we-on-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,we-off-ns = <84> /* 79 ns - 84 ns; 14 ticks */
gpmc,rd-cycle-ns = <108> /* 103 ns - 108 ns; 18 ticks */
gpmc,wr-cycle-ns = <102> /* 97 ns - 102 ns; 17 ticks */
gpmc,access-ns = <78> /* 73 ns - 78 ns; 13 ticks */
gpmc,page-burst-access-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,bus-turnaround-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,cycle2cycle-delay-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,wait-monitoring-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,clk-activation-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,wr-data-mux-bus-ns = <30> /* 25 ns - 30 ns; 5 ticks */
gpmc,wr-access-ns = <78> /* 73 ns - 78 ns; 13 ticks */
GPMC CS0: cs_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: cs_rd_off : 16 ticks, 96 ns (was 14 ticks) 96 ns
GPMC CS0: cs_wr_off : 16 ticks, 96 ns (was 19 ticks) 96 ns
GPMC CS0: adv_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: adv_rd_off : 2 ticks, 12 ns (was 3 ticks) 12 ns
GPMC CS0: adv_wr_off : 2 ticks, 12 ns (was 3 ticks) 12 ns
GPMC CS0: oe_on : 3 ticks, 18 ns (was 5 ticks) 18 ns
GPMC CS0: oe_off : 16 ticks, 96 ns (was 14 ticks) 96 ns
GPMC CS0: we_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: we_off : 16 ticks, 96 ns (was 14 ticks) 96 ns
GPMC CS0: rd_cycle : 19 ticks, 114 ns (was 18 ticks) 114 ns
GPMC CS0: wr_cycle : 19 ticks, 114 ns (was 17 ticks) 114 ns
GPMC CS0: access : 15 ticks, 90 ns (was 13 ticks) 90 ns
GPMC CS0: page_burst_access: 2 ticks, 12 ns (was 0 ticks) 12 ns
GPMC CS0: bus_turnaround : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: cycle2cycle_delay: 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: wr_data_mux_bus : 5 ticks, 30 ns (was 5 ticks) 30 ns
GPMC CS0: wr_access : 15 ticks, 90 ns (was 13 ticks) 90 ns
GPMC CS0: wait_monitoring : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: clk_activation : 1 ticks, 6 ns (was 0 ticks) 6 ns
GPMC CS0 CLK period is 12 ns (div 2)
gpmc cs0 after gpmc_cs_set_timings:
cs0 GPMC_CS_CONFIG1: 0xfb001201
cs0 GPMC_CS_CONFIG2: 0x00101000
cs0 GPMC_CS_CONFIG3: 0x00020200
cs0 GPMC_CS_CONFIG4: 0x10001003
cs0 GPMC_CS_CONFIG5: 0x020f1313
cs0 GPMC_CS_CONFIG6: 0x8f050000
gpmc cs0 access configuration:
gpmc,mux-add-data = <2>
gpmc,device-width = <1>
gpmc,wait-pin = <0>
gpmc,burst-length = <16>
gpmc,sync-write = <1>
gpmc,burst-write = <1>
gpmc,gpmc,sync-read = <1>
gpmc,burst-read = <1>
gpmc,burst-wrap = <1>
gpmc cs0 timings configuration:
gpmc,cs-on-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,cs-rd-off-ns = <96> /* 91 ns - 96 ns; 16 ticks */
gpmc,cs-wr-off-ns = <96> /* 91 ns - 96 ns; 16 ticks */
gpmc,adv-on-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,adv-rd-off-ns = <12> /* 7 ns - 12 ns; 2 ticks */
gpmc,adv-wr-off-ns = <12> /* 7 ns - 12 ns; 2 ticks */
gpmc,oe-on-ns = <18> /* 13 ns - 18 ns; 3 ticks */
gpmc,oe-off-ns = <96> /* 91 ns - 96 ns; 16 ticks */
gpmc,we-on-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,we-off-ns = <96> /* 91 ns - 96 ns; 16 ticks */
gpmc,rd-cycle-ns = <114> /* 109 ns - 114 ns; 19 ticks */
gpmc,wr-cycle-ns = <114> /* 109 ns - 114 ns; 19 ticks */
gpmc,access-ns = <90> /* 85 ns - 90 ns; 15 ticks */
gpmc,page-burst-access-ns = <12> /* 7 ns - 12 ns; 2 ticks */
gpmc,bus-turnaround-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,cycle2cycle-delay-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,wait-monitoring-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,clk-activation-ns = <6> /* 1 ns - 6 ns; 1 ticks */
gpmc,wr-data-mux-bus-ns = <30> /* 25 ns - 30 ns; 5 ticks */
gpmc,wr-access-ns = <90> /* 85 ns - 90 ns; 15 ticks */
omap2-onenand omap2-onenand: initializing on CS0, phys base 0x04000000, virtual base d0940000, freq 83 MHz OneNAND Manufacturer: Numonyx (0x20)
Muxed OneNAND 256MB 1.8V 16-bit (0x40)
OneNAND version = 0x0031
Chip support all block unlock
Chip has 2 plane
Scanning device for bad blocks
6 ofpart partitions found on MTD device omap2-onenand
Creating 6 MTD partitions on "omap2-onenand":
0x000000000000-0x000000020000 : "bootloader"
0x000000020000-0x000000080000 : "config"
0x000000080000-0x0000000c0000 : "log"
mtdoops: ready 43, 6188 (no erase)
mtdoops: Attached to MTD device 2
0x0000000c0000-0x0000002c0000 : "kernel"
0x0000002c0000-0x0000004c0000 : "initfs"
0x0000004c0000-0x000010000000 : "rootfs"

#41 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 17 lines · Tony Lindgren
Quoted 16 lines · Tony Lindgren
Quoted 14 lines · Ivaylo Dimitrov
Quoted 7 lines · Pali Roh?r
Quoted 2 lines · On Saturday 09 January 2016 02:23:26 Ivaylo Dimitrov wrote:

The key word here is "sometimes". i.e sometimes it hapens on normal reboot, sometimes it happens on oops.

So where is problem? In omap-gpmc? mtd? onenand? or ubifs? Or in different component? Do we know at least this?

I think I made some progress on the issue, it seems I have to have *both* e7b11dc7b77bfce0a351230a5feeadc1d0bba997 (e7b11dc7b77bfce0a351230a5feeadc1d0bba997) reverted *and* HWMOD_INIT_NO_RESET restored in omap3xxx_gpmc_hwmod flags to have working onenand.

Quoted 3 lines
Quoted 3 lines

That is strange. This is what I get with omap2plus_defconfig and omap-for-v4.5/fixes-rc1 after flashing the rootfs and booting kernel like you suggested on irc:

What I forgot to tell on IRC is that you should try to boot stock kernel after booting mainline. Here it spits a lot of ECC errors (I have framebuffer console enabled to see those) and refuses to mount rootfs.

Quoted 6 lines
Quoted 6 lines
# dmesg | grep -i -e ubi -e onenand
[    2.502899] omap2-onenand omap2-onenand: initializing on CS0, phys base 0x01000000, virtual base d0940000, freq 83 MHz
[    2.514373] OneNAND Manufacturer: Numonyx (0x20)
[    2.519287] Muxed OneNAND 256MB 1.8V 16-bit (0x40)
[    2.524444] OneNAND version = 0x0031

Exactly the same chip here.

Quoted 23 lines
Quoted 23 lines
[    2.671966] 6 ofpart partitions found on MTD device omap2-onenand
[    2.678436] Creating 6 MTD partitions on "omap2-onenand":
[    3.414764] ubi0: attaching mtd5
[    3.668212] ubi0: scanning is finished
[    3.716552] ubi0: attached mtd5 (name "rootfs", size 251 MiB)
[    3.722839] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    3.730194] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    3.737304] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    3.744537] ubi0: good PEBs: 2010, bad PEBs: 0, corrupted PEBs: 0
[    3.751037] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    3.758697] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 0
[    3.767578] ubi0: available PEBs: 0, total reserved PEBs: 2010, PEBs reserved for bad PEB handling: 40
[    3.923980] ubi0: background thread "ubi_bgt0d" started, PID 85
[    3.980529] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 87
[    3.996337] UBIFS (ubi0:0): recovery needed
[    4.079925] UBIFS (ubi0:0): recovery completed
[    4.085876] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    4.093780] UBIFS (ubi0:0): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    4.104339] UBIFS (ubi0:0): FS size: 252241920 bytes (240 MiB, 1955 LEBs), journal size 9033728 bytes (8 MiB, 71 LEBs)
[    4.115722] UBIFS (ubi0:0): reserved for root: 4190434 bytes (4092 KiB)
[    4.122772] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 8F30A88A-F605-4291-9927-00CF3A2AE119, small LPT model
[    4.136077] VFS: Mounted root (ubifs filesystem) on device 0:15.
Quoted 3 lines
Quoted 2 lines

I copied over the modules to this rootfs too :) But in general onenand seems to behave for me.

Yes, initially it works, but is corrupted after a reboot or two here.

Quoted 134 lines

And ere are my GPCM timings when booted with GPMC_DEBUG in case they are different somehow for your device.

Regards,

Tony

omap-gpmc 6e000000.gpmc: GPMC revision 5.0
GPMC CS0: cs_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: cs_rd_off : 14 ticks, 84 ns (was 16 ticks) 84 ns
GPMC CS0: cs_wr_off : 19 ticks, 114 ns (was 16 ticks) 114 ns
GPMC CS0: adv_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: adv_rd_off : 3 ticks, 18 ns (was 2 ticks) 18 ns
GPMC CS0: adv_wr_off : 3 ticks, 18 ns (was 2 ticks) 18 ns
GPMC CS0: oe_on : 5 ticks, 30 ns (was 2 ticks) 30 ns
GPMC CS0: oe_off : 14 ticks, 84 ns (was 16 ticks) 84 ns
GPMC CS0: we_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: we_off : 14 ticks, 84 ns (was 16 ticks) 84 ns
GPMC CS0: rd_cycle : 18 ticks, 108 ns (was 19 ticks) 108 ns
GPMC CS0: wr_cycle : 17 ticks, 102 ns (was 19 ticks) 102 ns
GPMC CS0: access : 13 ticks, 78 ns (was 15 ticks) 78 ns
GPMC CS0: page_burst_access: 0 ticks, 0 ns (was 2 ticks) 0 ns
GPMC CS0: bus_turnaround : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: cycle2cycle_delay: 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: wr_data_mux_bus : 5 ticks, 30 ns (was 5 ticks) 30 ns
GPMC CS0: wr_access : 13 ticks, 78 ns (was 15 ticks) 78 ns
GPMC CS0: wait_monitoring : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: clk_activation : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0 CLK period is 6 ns (div 1)
gpmc cs0 after gpmc_cs_set_timings:
cs0 GPMC_CS_CONFIG1: 0xd9001200
cs0 GPMC_CS_CONFIG2: 0x00130e00
cs0 GPMC_CS_CONFIG3: 0x00030300
cs0 GPMC_CS_CONFIG4: 0x0e000e05
cs0 GPMC_CS_CONFIG5: 0x000d1112
cs0 GPMC_CS_CONFIG6: 0x8d050000
gpmc cs0 access configuration:
gpmc,mux-add-data = <2>
gpmc,device-width = <1>
gpmc,wait-pin = <0>
gpmc,burst-length = <16>
gpmc,sync-write = <1>
gpmc,burst-write = <1>
gpmc,burst-read = <1>
gpmc,burst-wrap = <1>
gpmc cs0 timings configuration:
gpmc,cs-on-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,cs-rd-off-ns = <84> /* 79 ns - 84 ns; 14 ticks */
gpmc,cs-wr-off-ns = <114> /* 109 ns - 114 ns; 19 ticks */
gpmc,adv-on-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,adv-rd-off-ns = <18> /* 13 ns - 18 ns; 3 ticks */
gpmc,adv-wr-off-ns = <18> /* 13 ns - 18 ns; 3 ticks */
gpmc,oe-on-ns = <30> /* 25 ns - 30 ns; 5 ticks */
gpmc,oe-off-ns = <84> /* 79 ns - 84 ns; 14 ticks */
gpmc,we-on-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,we-off-ns = <84> /* 79 ns - 84 ns; 14 ticks */
gpmc,rd-cycle-ns = <108> /* 103 ns - 108 ns; 18 ticks */
gpmc,wr-cycle-ns = <102> /* 97 ns - 102 ns; 17 ticks */
gpmc,access-ns = <78> /* 73 ns - 78 ns; 13 ticks */
gpmc,page-burst-access-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,bus-turnaround-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,cycle2cycle-delay-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,wait-monitoring-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,clk-activation-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,wr-data-mux-bus-ns = <30> /* 25 ns - 30 ns; 5 ticks */
gpmc,wr-access-ns = <78> /* 73 ns - 78 ns; 13 ticks */
GPMC CS0: cs_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: cs_rd_off : 16 ticks, 96 ns (was 14 ticks) 96 ns
GPMC CS0: cs_wr_off : 16 ticks, 96 ns (was 19 ticks) 96 ns
GPMC CS0: adv_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: adv_rd_off : 2 ticks, 12 ns (was 3 ticks) 12 ns
GPMC CS0: adv_wr_off : 2 ticks, 12 ns (was 3 ticks) 12 ns
GPMC CS0: oe_on : 3 ticks, 18 ns (was 5 ticks) 18 ns
GPMC CS0: oe_off : 16 ticks, 96 ns (was 14 ticks) 96 ns
GPMC CS0: we_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: we_off : 16 ticks, 96 ns (was 14 ticks) 96 ns
GPMC CS0: rd_cycle : 19 ticks, 114 ns (was 18 ticks) 114 ns
GPMC CS0: wr_cycle : 19 ticks, 114 ns (was 17 ticks) 114 ns
GPMC CS0: access : 15 ticks, 90 ns (was 13 ticks) 90 ns
GPMC CS0: page_burst_access: 2 ticks, 12 ns (was 0 ticks) 12 ns
GPMC CS0: bus_turnaround : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: cycle2cycle_delay: 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: wr_data_mux_bus : 5 ticks, 30 ns (was 5 ticks) 30 ns
GPMC CS0: wr_access : 15 ticks, 90 ns (was 13 ticks) 90 ns
GPMC CS0: wait_monitoring : 0 ticks, 0 ns (was 0 ticks) 0 ns
GPMC CS0: clk_activation : 1 ticks, 6 ns (was 0 ticks) 6 ns
GPMC CS0 CLK period is 12 ns (div 2)
gpmc cs0 after gpmc_cs_set_timings:
cs0 GPMC_CS_CONFIG1: 0xfb001201
cs0 GPMC_CS_CONFIG2: 0x00101000
cs0 GPMC_CS_CONFIG3: 0x00020200
cs0 GPMC_CS_CONFIG4: 0x10001003
cs0 GPMC_CS_CONFIG5: 0x020f1313
cs0 GPMC_CS_CONFIG6: 0x8f050000
gpmc cs0 access configuration:
gpmc,mux-add-data = <2>
gpmc,device-width = <1>
gpmc,wait-pin = <0>
gpmc,burst-length = <16>
gpmc,sync-write = <1>
gpmc,burst-write = <1>
gpmc,gpmc,sync-read = <1>
gpmc,burst-read = <1>
gpmc,burst-wrap = <1>
gpmc cs0 timings configuration:
gpmc,cs-on-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,cs-rd-off-ns = <96> /* 91 ns - 96 ns; 16 ticks */
gpmc,cs-wr-off-ns = <96> /* 91 ns - 96 ns; 16 ticks */
gpmc,adv-on-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,adv-rd-off-ns = <12> /* 7 ns - 12 ns; 2 ticks */
gpmc,adv-wr-off-ns = <12> /* 7 ns - 12 ns; 2 ticks */
gpmc,oe-on-ns = <18> /* 13 ns - 18 ns; 3 ticks */
gpmc,oe-off-ns = <96> /* 91 ns - 96 ns; 16 ticks */
gpmc,we-on-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,we-off-ns = <96> /* 91 ns - 96 ns; 16 ticks */
gpmc,rd-cycle-ns = <114> /* 109 ns - 114 ns; 19 ticks */
gpmc,wr-cycle-ns = <114> /* 109 ns - 114 ns; 19 ticks */
gpmc,access-ns = <90> /* 85 ns - 90 ns; 15 ticks */
gpmc,page-burst-access-ns = <12> /* 7 ns - 12 ns; 2 ticks */
gpmc,bus-turnaround-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,cycle2cycle-delay-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,wait-monitoring-ns = <0> /* 0 ns - 0 ns; 0 ticks */
gpmc,clk-activation-ns = <6> /* 1 ns - 6 ns; 1 ticks */
gpmc,wr-data-mux-bus-ns = <30> /* 25 ns - 30 ns; 5 ticks */
gpmc,wr-access-ns = <90> /* 85 ns - 90 ns; 15 ticks */
omap2-onenand omap2-onenand: initializing on CS0, phys base 0x04000000, virtual base d0940000, freq 83 MHz OneNAND Manufacturer: Numonyx (0x20)
Muxed OneNAND 256MB 1.8V 16-bit (0x40)
OneNAND version = 0x0031
Chip support all block unlock
Chip has 2 plane
Scanning device for bad blocks
6 ofpart partitions found on MTD device omap2-onenand
Creating 6 MTD partitions on "omap2-onenand":

Quoted 9 lines

0x000000000000-0x000000020000 : "bootloader"
0x000000020000-0x000000080000 : "config"
0x000000080000-0x0000000c0000 : "log"
mtdoops: ready 43, 6188 (no erase)
mtdoops: Attached to MTD device 2
0x0000000c0000-0x0000002c0000 : "kernel"
0x0000002c0000-0x0000004c0000 : "initfs"
0x0000004c0000-0x000010000000 : "rootfs"

Exactly the same log here, besides "mtdoops: ready 36, 959521164 (no erase)", no idea what that "959521164" is supposed to mean.

May I ask you to send me the full boot log with omap2plus_defconfig kernel booting mtd5 maemo rootfs, until it restarts and the next boot log with the stock kernel. It could be there is some other driver acting here (g_nokia for example) you don't have enabled in your config.

I will play a bit more with omap2plus_defconfig here in attempt to make it boot, to see if I can recreate the issue.

Also, I looked at the TRM and GPMC has more stuff than timings, like PRFETCH and ECC. Will dump those with and without HWMOD_INIT_NO_RESET to see if there is any difference.

Thanks,
Ivo

#42 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 5 lines · Ivaylo Dimitrov

I will play a bit more with omap2plus_defconfig here in attempt to make it boot, to see if I can recreate the issue.

ok, what I did here is:

- zImage

git clone
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
git checkout omap-for-v4.5/fixes-rc1
make omap2plus_defconfig
make -j4 zImage
make omap3-n900.dtb
cat arch/arm/boot/zImage arch/arm/boot/dts/omap3-n900.dtb > zImage

- flashed maemo rootfs

sudo flasher-3.5 -f -F RX-51_2009SE_20.2010.36-2_PR_COMBINED_MR0_ARM.bin --flash-only=rootfs -R

- booted to maemo and powered the device off

sudo flasher-3.5 -k zImage -l -b"init=/sbin/preinit ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs rootflags=bulk_read,no_chk_data_crc rw mtdoops.mtddev=log omapfb_vram=7M omapfb.mode=lcd:848x480-16 nokia-modem.pm=0"

There was nothing on the screen, but backlight was on. I removed the battery after ~30 seconds.

At this point maemo is no longer bootable. Booting fb-console enabled stock kernel
(http://mohammadag.xceleo.org/public/maemo/kernels/framebuffer/) via flasher3.5:

sudo flasher-3.5 -k zImage-fb-omap1-pr13 -l -b

produces http://46.249.74.23/maemo/onenend/stock/ .

Booting 4.5-rc1 kernel from https://github.com/pali/linux-n900, with HWMOD_INIT_NO_RESET restored and your "onenand fix" patch reverted (so to not introduce additional corruption), via flasher3.5:

sudo flasher-3.5 -k zImage -l -b"init=/sbin/preinit ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs rootflags=bulk_read,no_chk_data_crc rw mtdoops.mtddev=log omapfb_vram=7M omapfb.mode=lcd:848x480-16 nokia-modem.pm=0"

results in http://46.249.74.23/maemo/onenend/linux-n900/ .

note - don't try to play the videos in the browser, download them first instead, at least FF doesn't want to play videos captured by N900 :)

Regards,
Ivo

author maintainer
#43 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 11 lines · Ivaylo Dimitrov

- flashed maemo rootfs

sudo flasher-3.5 -f -F RX-51_2009SE_20.2010.36-2_PR_COMBINED_MR0_ARM.bin --flash-only=rootfs -R

- booted to maemo and powered the device off

sudo flasher-3.5 -k zImage -l -b"init=/sbin/preinit ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs rootflags=bulk_read,no_chk_data_crc rw mtdoops.mtddev=log omapfb_vram=7M omapfb.mode=lcd:848x480-16 nokia-modem.pm=0"

This seems to fix things here for legacy booting and booting the maemo zImage after dts image. Care to give it a try?

Basically onenand after reset is in wrong state, have not looked up the bits yet. Will post a better patch when I get a chance over next few days.

Regards,

Tony

8< -----------

arch/arm/mach-omap2/gpmc-onenand.c +2 -0
@@ -104,6 +104,7 @@ static void set_onenand_cfg(void __iomem *onenand_base)
 	u32 reg;
 
 	reg = readw(onenand_base + ONENAND_REG_SYS_CFG1);
+	reg = 0x06c0;
 	reg &= ~((0x7 << ONENAND_SYS_CFG1_BRL_SHIFT) | (0x7 << 9));
 	reg |=	(latency << ONENAND_SYS_CFG1_BRL_SHIFT) |
 		ONENAND_SYS_CFG1_BL_16;
@@ -289,6 +290,7 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base)
 		}
 	}
 
+	onenand_async.sync_write = true;
 	omap2_onenand_calc_async_timings(&t);
 
 	ret = gpmc_cs_program_settings(gpmc_onenand_data->cs, &onenand_async);
#44 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 10 lines · Tony Lindgren

This seems to fix things here for legacy booting and booting the maemo zImage after dts image. Care to give it a try?

Basically onenand after reset is in wrong state, have not looked up the bits yet. Will post a better patch when I get a chance over next few days.

Regards,

Tony

Yep, that looks to fix the things, I submitted a patch "[PATCH] ARM:
OMAP2+: Fix onenand initialization to avoid filesystem corruption" (it was supposed to be a reply to this mail, but my git-send-mail-fu failed on me as always :) )

Thanks,
Ivo

author maintainer
#45 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

In reply to Ivaylo Dimitrov
Quoted 7 lines · Ivaylo Dimitrov

Hi

Quoted 3 lines · Tony Lindgren

Yes it seems there's some other issue too. Maybe you can run git bisect again and carry the fix along as an extra patch?

Quoted 6 lines

No sane way to bisect, I don't really know what triggers the issue. Neither it is triggered regularly. It might happen on the first reboot or on the tenth, or ... And it looks like the problems happens sometimes on oops too. Not to say that it seems I should have fully booted userspace (so there is enough pressure on the ubi/mdt/nand subsystems), which is impossible with upstream without some n900 specific patches :(

Hmm OK. Can you check if disabling deeper idle states helps?

Just set the UART timeouts to -1. You may also want to disable off mode with echo 0 > /sys/kernel/debug/pm_debug/enable_off_mode.

If it happens during booting, chances are idle is not even hit though.

Quoted 7 lines

Maybe we can get some ideas on what and where to look from ubifs people? Though I don't know whom to cc, feel free to help :)

My best bet aiui, is comparing what nokia omap1 kernel does vs upstream. Or looking at the commit log in ubi/mtd/onenand - who knows, I might get lucky once again the same way as with that phonet oops in __netif_receive_skb_core.

Well maybe we now have error messages that actually make sense?

Quoted 3 lines
Quoted 1 line

OK then it really seems like we do have another bug lurking around.

:nod:

I've sent out the pull request and Arnd pulled the fix into arm-soc so we should have it merged for v4.4 FYI.

Regards,

Tony

#46 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

In reply to Tony Lindgren
Quoted 5 lines · On Thursday 07 January 2016 18:26:20 Tony Lindgren wrote:
Quoted 3 lines

The problem is that between NOLO and kernel there is u-boot. And even if I am almost sure it doesn't touch onenand configs, I can't be absolutely sure. So those timings are not 100% reliable IMO, though close to that.

Hmm yes I'm only booting with u-boot here as my device sits in my rack.

U-boot try to configure N900 device similar like (some older version of) linux kernel. So testing these bugs should be done also directly from NOLO without U-boot.

Btw, if you have usb connection to your device in your rack, you can use 0xFFFF tool (open source) which can send kernel image to NOLO which will boot it without flashing NAND.

https://github.com/pali/0xFFFF

Original Nokia flasher-3.5 could support also serial connection (not only usb), but do not know. I have never used serial connector on my N900, so I do not know and this is reason why also 0xFFFF has no serial support...

Signature · 2 lines
Pali Roh?r
pali.rohar at gmail.com
author maintainer
#47 lore raw

PATCH 2/2 memory: omap-gpmc: Add Kconfig option for debug

Quoted 10 lines · Pali Roh?r
Quoted 5 lines · On Thursday 07 January 2016 18:26:20 Tony Lindgren wrote:
Quoted 3 lines

The problem is that between NOLO and kernel there is u-boot. And even if I am almost sure it doesn't touch onenand configs, I can't be absolutely sure. So those timings are not 100% reliable IMO, though close to that.

Hmm yes I'm only booting with u-boot here as my device sits in my rack.

U-boot try to configure N900 device similar like (some older version of) linux kernel. So testing these bugs should be done also directly from NOLO without U-boot.

OK

Quoted 10 lines

Btw, if you have usb connection to your device in your rack, you can use 0xFFFF tool (open source) which can send kernel image to NOLO which will boot it without flashing NAND.

https://github.com/pali/0xFFFF

Original Nokia flasher-3.5 could support also serial connection (not only usb), but do not know. I have never used serial connector on my N900, so I do not know and this is reason why also 0xFFFF has no serial support...

Yup I'm using 0xFFFF for loading images on 770 and n800 here. Well once I get my rack put together again over next few days..

Regards,

TOny