From: Greg Kroah-Hartman Date: Wed, 20 Jun 2012 16:06:13 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.0.36~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df9b21328e371980e44c9928255a000564dc0f73;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: asoc-wm8904-fix-gpio-and-micbias-initialisation-for-regmap-conversion.patch hwrng-atmel-rng-fix-data-valid-check.patch --- 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 index 00000000000..79edd77136a --- /dev/null +++ b/queue-3.4/asoc-wm8904-fix-gpio-and-micbias-initialisation-for-regmap-conversion.patch @@ -0,0 +1,53 @@ +From 433897f7408b556f7dfbb98c94deea02e634d2a7 Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Sat, 9 Jun 2012 11:38:12 +0800 +Subject: ASoC: wm8904: Fix GPIO and MICBIAS initialisation for regmap conversion + +From: Mark Brown + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..0939070fc44 --- /dev/null +++ b/queue-3.4/hwrng-atmel-rng-fix-data-valid-check.patch @@ -0,0 +1,70 @@ +From c475c06f4bb689d6ad87d7512e036d6dface3160 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Tue, 12 Jun 2012 08:27:04 +0800 +Subject: hwrng: atmel-rng - fix data valid check + +From: Peter Korsgaard + +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 +Reported-by: George Pontis +Acked-by: Nicolas Ferre +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + 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 diff --git a/queue-3.4/series b/queue-3.4/series index a5004c2a96c..8e8656cb7e3 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -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