~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to debian/patches/linaro-patches/0062-hw-nand-Support-cache-status-bits-and-read-cache-com.patch

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 38e188ea94c0238d9a6d509ad5c758fd132eb3e0 Mon Sep 17 00:00:00 2001
 
2
From: Peter Maydell <peter.maydell@linaro.org>
 
3
Date: Mon, 18 Feb 2013 16:58:34 +0000
 
4
Subject: [PATCH 62/71] hw/nand: Support cache status bits and read cache
 
5
 commands
 
6
MIME-Version: 1.0
 
7
Content-Type: text/plain; charset=UTF-8
 
8
Content-Transfer-Encoding: 8bit
 
9
 
 
10
TODO: check vs spec, are we just ignoring these commands, is
 
11
that correct?
 
12
consider renaming the ready bits
 
13
 
 
14
On reset, set the Ready bits in the status register (both the
 
15
original bit 6 and the new bit 5 used by eg the STM NAND chips).
 
16
 
 
17
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
 
18
[Riku Voipio: Fixes and restructuring patchset]
 
19
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
 
20
[Peter Maydell: More fixes and cleanups for upstream submission]
 
21
Signed-off-by:  Peter Maydell <peter.maydell@linaro.org>
 
22
---
 
23
 hw/block/nand.c | 14 +++++++++++---
 
24
 1 file changed, 11 insertions(+), 3 deletions(-)
 
25
 
 
26
diff --git a/hw/block/nand.c b/hw/block/nand.c
 
27
index a871ce0..b363ddd 100644
 
28
--- a/hw/block/nand.c
 
29
+++ b/hw/block/nand.c
 
30
@@ -28,6 +28,9 @@
 
31
 # define NAND_CMD_READ1                0x01
 
32
 # define NAND_CMD_READ2                0x50
 
33
 # define NAND_CMD_LPREAD2      0x30
 
34
+# define NAND_CMD_READCACHESTART 0x31
 
35
+# define NAND_CMD_READCACHEEXIT  0x34
 
36
+# define NAND_CMD_READCACHELAST  0x3f
 
37
 # define NAND_CMD_NOSERIALREAD2        0x35
 
38
 # define NAND_CMD_RANDOMREAD1  0x05
 
39
 # define NAND_CMD_RANDOMREAD2  0xe0
 
40
@@ -46,7 +49,7 @@
 
41
 # define NAND_IOSTATUS_PLANE1  (1 << 2)
 
42
 # define NAND_IOSTATUS_PLANE2  (1 << 3)
 
43
 # define NAND_IOSTATUS_PLANE3  (1 << 4)
 
44
-# define NAND_IOSTATUS_READY    (1 << 6)
 
45
+# define NAND_IOSTATUS_READY    (3 << 5)
 
46
 # define NAND_IOSTATUS_UNPROTCT        (1 << 7)
 
47
 
 
48
 # define MAX_PAGE              0x800
 
49
@@ -253,6 +256,7 @@ static void nand_command(NANDFlashState *s)
 
50
     unsigned int offset;
 
51
     switch (s->cmd) {
 
52
     case NAND_CMD_READ0:
 
53
+    case NAND_CMD_READCACHEEXIT:
 
54
         s->iolen = 0;
 
55
         break;
 
56
 
 
57
@@ -486,7 +490,10 @@ void nand_setio(DeviceState *dev, uint32_t value)
 
58
 
 
59
     if (!s->ce && s->cle) {
 
60
         if (nand_flash_ids[s->chip_id].options & NAND_SAMSUNG_LP) {
 
61
-            if (s->cmd == NAND_CMD_READ0 && value == NAND_CMD_LPREAD2)
 
62
+            if (s->cmd == NAND_CMD_READ0
 
63
+                && (value == NAND_CMD_LPREAD2
 
64
+                    || value == NAND_CMD_READCACHESTART
 
65
+                    || value == NAND_CMD_READCACHELAST))
 
66
                 return;
 
67
             if (value == NAND_CMD_RANDOMREAD1) {
 
68
                 s->addr &= ~((1 << s->addr_shift) - 1);
 
69
@@ -512,7 +519,8 @@ void nand_setio(DeviceState *dev, uint32_t value)
 
70
                 s->cmd == NAND_CMD_BLOCKERASE2 ||
 
71
                 s->cmd == NAND_CMD_NOSERIALREAD2 ||
 
72
                 s->cmd == NAND_CMD_RANDOMREAD2 ||
 
73
-                s->cmd == NAND_CMD_RESET) {
 
74
+                s->cmd == NAND_CMD_RESET ||
 
75
+                s->cmd == NAND_CMD_READCACHEEXIT) {
 
76
             nand_command(s);
 
77
         }
 
78
 
 
79
-- 
 
80
1.8.3.2
 
81