RE: Watchdog driver issue on OMAP3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Looking deep into this lead me to an interesting point. 

Kevin's unlock flash device patch(commit: a34c2f3) switches the NOR flash into write or programming mode. Due to this, watchdog reset is causing the kernel to freeze. 
Basically the u-boot sitting on the NOR flash is not read/executed because it is unlocked.

We can have a workaround by locking the device back on the completion of jffs2 booting or otherwise Kevin can suggest something else.

The actual patch is below.

    The bootloader may lock the flash device upon booting.  This requires
    the use of 'flash_unlock' on each partition before using them.

    However, when booting from flash the MTD driver is unable to "mark
    space as dirty" since the device is locked.  This results lots of boot
    warnings from the MTD layer.

    The MTD driver for OMAP needs to unlock the device during init so
    booting from flash can work without errors.

    Signed-off-by: Kevin Hilman <khilman@xxxxxxxxxx>
    Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>

diff --git a/drivers/mtd/maps/omap_nor.c b/drivers/mtd/maps/omap_nor.c index a1342a2..d72cc11 100644
--- a/drivers/mtd/maps/omap_nor.c
+++ b/drivers/mtd/maps/omap_nor.c
@@ -108,6 +108,10 @@ static int __devinit omapflash_probe(struct platform_device *pdev)
        }
        info->mtd->owner = THIS_MODULE;

+       /* Unlock the flash device. */
+       if (info->mtd->unlock)
+               info->mtd->unlock(info->mtd, 0, info->mtd->size);
+
 #ifdef CONFIG_MTD_PARTITIONS
        err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0);
        if (err > 0)

Regards
Iqbal 

> -----Original Message-----
> From: linux-omap-open-source-bounces@xxxxxxxxxxxxxx 
> [mailto:linux-omap-open-source-bounces@xxxxxxxxxxxxxx] On 
> Behalf Of Reddy, Teerth
> Sent: Monday, December 17, 2007 5:54 PM
> To: linux-omap@xxxxxxxxxxxxxxx
> Cc: linux-omap-open-source@xxxxxxxxxxxxxx
> Subject: Watchdog driver issue on OMAP3
> 
> 
> 
> Hi
> 
> I am seeing this issue with the watchdog driver on 
> OMAP3430,whenever the watchdog driver is closed the board 
> should reboot but the board freezes after the watchdog 
> timeout and I have to reboot the board manually to get the 
> u-boot back.
> 
> 	Is this an issue with the watchdog driver or is 
> something else causing this? 
> 
> Best Regards,
> Teerth
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@xxxxxxxxxxxxxx
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux