]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2012 16:06:13 +0000 (09:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2012 16:06:13 +0000 (09:06 -0700)
added patches:
asoc-wm8904-fix-gpio-and-micbias-initialisation-for-regmap-conversion.patch
hwrng-atmel-rng-fix-data-valid-check.patch

queue-3.4/asoc-wm8904-fix-gpio-and-micbias-initialisation-for-regmap-conversion.patch [new file with mode: 0644]
queue-3.4/hwrng-atmel-rng-fix-data-valid-check.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/asoc-wm8904-fix-gpio-and-micbias-initialisation-for-regmap-conversion.patch b/queue-3.4/asoc-wm8904-fix-gpio-and-micbias-initialisation-for-regmap-conversion.patch
new file mode 100644 (file)
index 0000000..79edd77
--- /dev/null
@@ -0,0 +1,53 @@
+From 433897f7408b556f7dfbb98c94deea02e634d2a7 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 9 Jun 2012 11:38:12 +0800
+Subject: ASoC: wm8904: Fix GPIO and MICBIAS initialisation for regmap conversion
+
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+
+commit 433897f7408b556f7dfbb98c94deea02e634d2a7 upstream.
+
+We no longer have a flat ASoC cache so can't peer directly into the array
+any more but should instead use the register I/O functions to update the
+cache.
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/wm8904.c |   13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- a/sound/soc/codecs/wm8904.c
++++ b/sound/soc/codecs/wm8904.c
+@@ -2084,7 +2084,6 @@ static int wm8904_probe(struct snd_soc_c
+ {
+       struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
+       struct wm8904_pdata *pdata = wm8904->pdata;
+-      u16 *reg_cache = codec->reg_cache;
+       int ret, i;
+       codec->cache_sync = 1;
+@@ -2180,14 +2179,18 @@ static int wm8904_probe(struct snd_soc_c
+                       if (!pdata->gpio_cfg[i])
+                               continue;
+-                      reg_cache[WM8904_GPIO_CONTROL_1 + i]
+-                              = pdata->gpio_cfg[i] & 0xffff;
++                      regmap_update_bits(wm8904->regmap,
++                                         WM8904_GPIO_CONTROL_1 + i,
++                                         0xffff,
++                                         pdata->gpio_cfg[i]);
+               }
+               /* Zero is the default value for these anyway */
+               for (i = 0; i < WM8904_MIC_REGS; i++)
+-                      reg_cache[WM8904_MIC_BIAS_CONTROL_0 + i]
+-                              = pdata->mic_cfg[i];
++                      regmap_update_bits(wm8904->regmap,
++                                         WM8904_MIC_BIAS_CONTROL_0 + i,
++                                         0xffff,
++                                         pdata->mic_cfg[i]);
+       }
+       /* Set Class W by default - this will be managed by the Class
diff --git a/queue-3.4/hwrng-atmel-rng-fix-data-valid-check.patch b/queue-3.4/hwrng-atmel-rng-fix-data-valid-check.patch
new file mode 100644 (file)
index 0000000..0939070
--- /dev/null
@@ -0,0 +1,70 @@
+From c475c06f4bb689d6ad87d7512e036d6dface3160 Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <jacmet@sunsite.dk>
+Date: Tue, 12 Jun 2012 08:27:04 +0800
+Subject: hwrng: atmel-rng - fix data valid check
+
+From: Peter Korsgaard <jacmet@sunsite.dk>
+
+commit c475c06f4bb689d6ad87d7512e036d6dface3160 upstream.
+
+Brown paper bag: Data valid is LSB of the ISR (status register), and NOT
+of ODATA (current random data word)!
+
+With this, rngtest is a lot happier. Before:
+
+rngtest 3
+Copyright (c) 2004 by Henrique de Moraes Holschuh
+This is free software; see the source for copying conditions.  There is NO warr.
+
+rngtest: starting FIPS tests...
+rngtest: bits received from input: 20000032
+rngtest: FIPS 140-2 successes: 3
+rngtest: FIPS 140-2 failures: 997
+rngtest: FIPS 140-2(2001-10-10) Monobit: 604
+rngtest: FIPS 140-2(2001-10-10) Poker: 996
+rngtest: FIPS 140-2(2001-10-10) Runs: 36
+rngtest: FIPS 140-2(2001-10-10) Long run: 0
+rngtest: FIPS 140-2(2001-10-10) Continuous run: 117
+rngtest: input channel speed: (min=622.371; avg=23682.481; max=28224.350)Kibitss
+rngtest: FIPS tests speed: (min=12.361; avg=12.718; max=12.861)Mibits/s
+rngtest: Program run time: 2331696 microsecondsx
+
+After:
+rngtest 3
+Copyright (c) 2004 by Henrique de Moraes Holschuh
+This is free software; see the source for copying conditions.  There is NO warr.
+
+rngtest: starting FIPS tests...
+rngtest: bits received from input: 20000032
+rngtest: FIPS 140-2 successes: 999
+rngtest: FIPS 140-2 failures: 1
+rngtest: FIPS 140-2(2001-10-10) Monobit: 0
+rngtest: FIPS 140-2(2001-10-10) Poker: 0
+rngtest: FIPS 140-2(2001-10-10) Runs: 1
+rngtest: FIPS 140-2(2001-10-10) Long run: 0
+rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
+rngtest: input channel speed: (min=777.363; avg=43588.270; max=47870.711)Kibitss
+rngtest: FIPS tests speed: (min=11.943; avg=12.716; max=12.844)Mibits/s
+rngtest: Program run time: 1955282 microseconds
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+Reported-by: George Pontis <GPontis@z9.com>
+Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/char/hw_random/atmel-rng.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/char/hw_random/atmel-rng.c
++++ b/drivers/char/hw_random/atmel-rng.c
+@@ -34,7 +34,7 @@ static int atmel_trng_read(struct hwrng
+       u32 *data = buf;
+       /* data ready? */
+-      if (readl(trng->base + TRNG_ODATA) & 1) {
++      if (readl(trng->base + TRNG_ISR) & 1) {
+               *data = readl(trng->base + TRNG_ODATA);
+               /*
+                 ensure data ready is only set again AFTER the next data
index a5004c2a96c88d9a8a109775a4edae1a265fc911..8e8656cb7e3f74762a2f6ee3be70be710ed60f3a 100644 (file)
@@ -44,3 +44,5 @@ usb-cdc-acm-fix-devices-not-unthrottled-on-open.patch
 usb-serial-sierra-add-support-for-sierra-wireless-aircard-320u-modem.patch
 usb-serial-enforce-usb-driver-and-usb-serial-driver-match.patch
 usb-fix-gathering-of-interface-associations.patch
+asoc-wm8904-fix-gpio-and-micbias-initialisation-for-regmap-conversion.patch
+hwrng-atmel-rng-fix-data-valid-check.patch