~ubuntu-branches/ubuntu/vivid/qemu/vivid

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu/linaro/0003-sd-Allow-sd_init-callers-to-specify-whether-card-is-.patch

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2014-02-25 22:31:43 UTC
  • mfrom: (1.8.5)
  • Revision ID: package-import@ubuntu.com-20140225223143-odhqxfc60wxrjl15
Tags: 2.0.0~rc1+dfsg-0ubuntu1
* Merge 2.0.0-rc1
* debian/rules: consolidate ppc filter entries.
* Move qemu-system-arch64 into qemu-system-arm
* debian/patches/define-trusty-machine-type.patch: define a trusty machine
  type, currently the same as pc-i440fx-2.0, to put is in a better position
  to enable live migrations from trusty onward.  (LP: #1294823)
* debian/control: build-dep on libfdt >= 1.4.0  (LP: #1295072)
* Merge latest upstream git to commit dc9528f
* Debian/rules:
  - remove -enable-uname-release=2.6.32
  - don't make the aarch64 target Ubuntu-specific.
* Remove patches which are now upstream:
  - fix-smb-security-share.patch
  - slirp-smb-redirect-port-445-too.patch 
  - linux-user-Implement-sendmmsg-syscall.patch (better version is upstream)
  - signal-added-a-wrapper-for-sigprocmask-function.patch
  - ubuntu/signal-sigsegv-protection-on-do_sigprocmask.patch
  - ubuntu/Don-t-block-SIGSEGV-at-more-places.patch
  - ubuntu/ppc-force-cpu-threads-count-to-be-power-of-2.patch
* add link for /usr/share/qemu/bios-256k.bin
* Remove all linaro patches.
* Remove all arm64/ patches.  Many but not all are upstream.
* Remove CVE-2013-4377.patch which is upstream.
* debian/control-in: don't make qemu-system-aarch64 ubuntu-specific

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From 4db17b380b240cf51601e99a85977b2b18221ba3 Mon Sep 17 00:00:00 2001
2
 
From: =?UTF-8?q?Juha=20Riihim=C3=A4ki?= <juha.riihimaki@nokia.com>
3
 
Date: Mon, 18 Feb 2013 16:58:23 +0000
4
 
Subject: [PATCH 03/70] sd: Allow sd_init callers to specify whether card is
5
 
 MMC or SD
6
 
 
7
 
Add a parameter to sd_init() which allows the caller to specify
8
 
whether the card is MMC or SD.
9
 
 
10
 
TODO: maybe we should have an sd_init() and an mmc_init()
11
 
instead?
12
 
 
13
 
TODO: these mmc patches need to be integrated with the ones
14
 
Vincent Palatin proposed.
15
 
---
16
 
 hw/sd/milkymist-memcard.c | 2 +-
17
 
 hw/sd/omap_mmc.c          | 4 ++--
18
 
 hw/sd/pl181.c             | 2 +-
19
 
 hw/sd/pxa2xx_mmci.c       | 2 +-
20
 
 hw/sd/sd.c                | 2 +-
21
 
 hw/sd/sdhci.c             | 2 +-
22
 
 hw/sd/ssi-sd.c            | 5 +----
23
 
 include/hw/sd.h           | 2 +-
24
 
 8 files changed, 9 insertions(+), 12 deletions(-)
25
 
 
26
 
diff --git a/hw/sd/milkymist-memcard.c b/hw/sd/milkymist-memcard.c
27
 
index d1168c9..6522eca 100644
28
 
--- a/hw/sd/milkymist-memcard.c
29
 
+++ b/hw/sd/milkymist-memcard.c
30
 
@@ -254,7 +254,7 @@ static int milkymist_memcard_init(SysBusDevice *dev)
31
 
     DriveInfo *dinfo;
32
 
 
33
 
     dinfo = drive_get_next(IF_SD);
34
 
-    s->card = sd_init(dinfo ? dinfo->bdrv : NULL, false);
35
 
+    s->card = sd_init(dinfo ? dinfo->bdrv : NULL, false, false);
36
 
     if (s->card == NULL) {
37
 
         return -1;
38
 
     }
39
 
diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c
40
 
index 937a478..ca26d21 100644
41
 
--- a/hw/sd/omap_mmc.c
42
 
+++ b/hw/sd/omap_mmc.c
43
 
@@ -592,7 +592,7 @@ struct omap_mmc_s *omap_mmc_init(hwaddr base,
44
 
     memory_region_add_subregion(sysmem, base, &s->iomem);
45
 
 
46
 
     /* Instantiate the storage */
47
 
-    s->card = sd_init(bd, false);
48
 
+    s->card = sd_init(bd, false, false);
49
 
     if (s->card == NULL) {
50
 
         exit(1);
51
 
     }
52
 
@@ -620,7 +620,7 @@ struct omap_mmc_s *omap2_mmc_init(struct omap_target_agent_s *ta,
53
 
     omap_l4_attach(ta, 0, &s->iomem);
54
 
 
55
 
     /* Instantiate the storage */
56
 
-    s->card = sd_init(bd, false);
57
 
+    s->card = sd_init(bd, false, false);
58
 
     if (s->card == NULL) {
59
 
         exit(1);
60
 
     }
61
 
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
62
 
index c35896d..d22f6e2 100644
63
 
--- a/hw/sd/pl181.c
64
 
+++ b/hw/sd/pl181.c
65
 
@@ -490,7 +490,7 @@ static int pl181_init(SysBusDevice *sbd)
66
 
     sysbus_init_irq(sbd, &s->irq[1]);
67
 
     qdev_init_gpio_out(dev, s->cardstatus, 2);
68
 
     dinfo = drive_get_next(IF_SD);
69
 
-    s->card = sd_init(dinfo ? dinfo->bdrv : NULL, false);
70
 
+    s->card = sd_init(dinfo ? dinfo->bdrv : NULL, false, false);
71
 
     if (s->card == NULL) {
72
 
         return -1;
73
 
     }
74
 
diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c
75
 
index b9d8b1a..85eb86d 100644
76
 
--- a/hw/sd/pxa2xx_mmci.c
77
 
+++ b/hw/sd/pxa2xx_mmci.c
78
 
@@ -538,7 +538,7 @@ PXA2xxMMCIState *pxa2xx_mmci_init(MemoryRegion *sysmem,
79
 
     memory_region_add_subregion(sysmem, base, &s->iomem);
80
 
 
81
 
     /* Instantiate the actual storage */
82
 
-    s->card = sd_init(bd, false);
83
 
+    s->card = sd_init(bd, false, false);
84
 
     if (s->card == NULL) {
85
 
         exit(1);
86
 
     }
87
 
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
88
 
index 617ae51..ce7f57f 100644
89
 
--- a/hw/sd/sd.c
90
 
+++ b/hw/sd/sd.c
91
 
@@ -488,7 +488,7 @@ static const VMStateDescription sd_vmstate = {
92
 
    whether card should be in SSI or MMC/SD mode.  It is also up to the
93
 
    board to ensure that ssi transfers only occur when the chip select
94
 
    is asserted.  */
95
 
-SDState *sd_init(BlockDriverState *bs, bool is_spi)
96
 
+SDState *sd_init(BlockDriverState *bs, bool is_spi, bool is_mmc)
97
 
 {
98
 
     SDState *sd;
99
 
 
100
 
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
101
 
index 0906a1d..6b5172d 100644
102
 
--- a/hw/sd/sdhci.c
103
 
+++ b/hw/sd/sdhci.c
104
 
@@ -1165,7 +1165,7 @@ static void sdhci_initfn(Object *obj)
105
 
     DriveInfo *di;
106
 
 
107
 
     di = drive_get_next(IF_SD);
108
 
-    s->card = sd_init(di ? di->bdrv : NULL, false);
109
 
+    s->card = sd_init(di ? di->bdrv : NULL, false, false);
110
 
     if (s->card == NULL) {
111
 
         exit(1);
112
 
     }
113
 
diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
114
 
index 1bb56c4..f11e02e 100644
115
 
--- a/hw/sd/ssi-sd.c
116
 
+++ b/hw/sd/ssi-sd.c
117
 
@@ -245,10 +245,7 @@ static int ssi_sd_init(SSISlave *dev)
118
 
 
119
 
     s->mode = SSI_SD_CMD;
120
 
     dinfo = drive_get_next(IF_SD);
121
 
-    s->sd = sd_init(dinfo ? dinfo->bdrv : NULL, true);
122
 
-    if (s->sd == NULL) {
123
 
-        return -1;
124
 
-    }
125
 
+    s->sd = sd_init(dinfo ? dinfo->bdrv : NULL, true, false);
126
 
     register_savevm(&dev->qdev, "ssi_sd", -1, 1, ssi_sd_save, ssi_sd_load, s);
127
 
     return 0;
128
 
 }
129
 
diff --git a/include/hw/sd.h b/include/hw/sd.h
130
 
index 4ef822f..562eaa2 100644
131
 
--- a/include/hw/sd.h
132
 
+++ b/include/hw/sd.h
133
 
@@ -68,7 +68,7 @@ typedef struct {
134
 
 
135
 
 typedef struct SDState SDState;
136
 
 
137
 
-SDState *sd_init(BlockDriverState *bs, bool is_spi);
138
 
+SDState *sd_init(BlockDriverState *bs, bool is_spi, bool is_mmc);
139
 
 void sd_reset(SDState *sd);
140
 
 int sd_do_command(SDState *sd, SDRequest *req,
141
 
                   uint8_t *response);
142
 
1.8.5.2
143