Patchwork [14/15] onenand: Ignore zero writes to boot command space

login
register
mail settings
Submitter Peter Maydell
Date July 29, 2011, 3:35 p.m.
Message ID <1311953728-29084-15-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/107410/
State New
Headers show

Comments

Peter Maydell - July 29, 2011, 3:35 p.m.
From: Juha Riihimäki <juha.riihimaki@nokia.com>

Ignore zero writes to the boot command space; Linux will issue
these in the powerdown/reset sequence.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by:  Peter Maydell <peter.maydell@linaro.org>
---
 hw/onenand.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/onenand.c b/hw/onenand.c
index 9f02736..0edcfe2 100644
--- a/hw/onenand.c
+++ b/hw/onenand.c
@@ -550,6 +550,13 @@  static void onenand_write(void *opaque, target_phys_addr_t addr,
             s->boot[0][2 << s->shift] = s->wpstatus & 0xff;
             break;
 
+        case 0x0000:
+            /* ignore zero writes without error messages,
+             * linux omap2/3 kernel will issue these upon
+             * powerdown/reset sequence.
+             */
+            break;
+
         default:
             fprintf(stderr, "%s: unknown OneNAND boot command %x\n",
                             __FUNCTION__, value);