public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@mvista.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH/RFC] ARM: OMAP: unlock flash device during boot
Date: Wed, 17 Oct 2007 15:25:26 -0700	[thread overview]
Message-ID: <20071017222526.493688502@mvista.com> (raw)

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@mvista.com>
---
 drivers/mtd/maps/omap_nor.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: linux-2.6.21/drivers/mtd/maps/omap_nor.c
===================================================================
--- linux-2.6.21.orig/drivers/mtd/maps/omap_nor.c
+++ linux-2.6.21/drivers/mtd/maps/omap_nor.c
@@ -108,6 +108,10 @@ static int __devinit omapflash_probe(str
 	}
 	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)
--

             reply	other threads:[~2007-10-17 22:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-17 22:25 Kevin Hilman [this message]
2007-10-17 23:25 ` [PATCH/RFC] ARM: OMAP: unlock flash device during boot Woodruff, Richard
2007-10-18 14:30   ` Kevin Hilman
2007-10-19  1:23     ` Nishanth Menon
2007-10-19 14:07 ` Amit Kucheria
2007-10-31 12:53   ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071017222526.493688502@mvista.com \
    --to=khilman@mvista.com \
    --cc=linux-omap-open-source@linux.omap.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox