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

From: [email-masked] (Ivaylo Dimitrov)
Date: Fri, 1 Jan 2016 13:29:00 +0200

Hi Tony,

On 21.05.2015 00:21, Tony Lindgren wrote:
> 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-masked]>
> Cc: Paul Walmsley <[email-masked]>
> Cc: Roger Quadros <[email-masked]>
> Signed-off-by: Tony Lindgren <[email-masked]>
> ---
>   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