From afbf750f42b717c724e652b3c55b5c5777b8c38e Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 10 Jul 2012 17:03:46 +0100 Subject: [PATCH] --- yaml --- r: 316311 b: refs/heads/master c: 2b4d39fc2a80e271ac8d44fccd02277a4b63c557 h: refs/heads/master i: 316309: db26ae887168982a93eb87d820c53a9bb1deb2ef 316307: f0470ae1408939c386008c3c456e48b152f6934a 316303: 1623d088e4902dcf525dc61080e5b8c20a47c371 v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/arizona.c | 6 +++--- trunk/sound/soc/codecs/arizona.h | 1 + trunk/sound/soc/codecs/wm5102.c | 3 +++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 32d47878a0e7..4101a1b10b8d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a1f34af0ec35e3131d65e0ae4cec6b048cba3e88 +refs/heads/master: 2b4d39fc2a80e271ac8d44fccd02277a4b63c557 diff --git a/trunk/sound/soc/codecs/arizona.c b/trunk/sound/soc/codecs/arizona.c index f3680c374347..5c9cacaf2d52 100644 --- a/trunk/sound/soc/codecs/arizona.c +++ b/trunk/sound/soc/codecs/arizona.c @@ -734,9 +734,9 @@ static int arizona_calc_fll(struct arizona_fll *fll, /* Apply the division for our remaining calculations */ Fref /= div; - /* Fvco should be 90-100MHz; don't check the upper bound */ + /* Fvco should be over the targt; don't check the upper bound */ div = 1; - while (Fout * div < 90000000) { + while (Fout * div < 90000000 * fll->vco_mult) { div++; if (div > 7) { arizona_fll_err(fll, "No FLL_OUTDIV for Fout=%uHz\n", @@ -744,7 +744,7 @@ static int arizona_calc_fll(struct arizona_fll *fll, return -EINVAL; } } - target = Fout * div; + target = Fout * div / fll->vco_mult; cfg->outdiv = div; arizona_fll_dbg(fll, "Fvco=%dHz\n", target); diff --git a/trunk/sound/soc/codecs/arizona.h b/trunk/sound/soc/codecs/arizona.h index b894b64e8f5c..59caca8865e8 100644 --- a/trunk/sound/soc/codecs/arizona.h +++ b/trunk/sound/soc/codecs/arizona.h @@ -141,6 +141,7 @@ struct arizona_fll { struct arizona *arizona; int id; unsigned int base; + unsigned int vco_mult; struct completion lock; struct completion ok; diff --git a/trunk/sound/soc/codecs/wm5102.c b/trunk/sound/soc/codecs/wm5102.c index 7a6a11a323ff..6537f16d383e 100644 --- a/trunk/sound/soc/codecs/wm5102.c +++ b/trunk/sound/soc/codecs/wm5102.c @@ -853,6 +853,9 @@ static int __devinit wm5102_probe(struct platform_device *pdev) wm5102->core.arizona = arizona; + for (i = 0; i < ARRAY_SIZE(wm5102->fll); i++) + wm5102->fll[i].vco_mult = 1; + arizona_init_fll(arizona, 1, ARIZONA_FLL1_CONTROL_1 - 1, ARIZONA_IRQ_FLL1_LOCK, ARIZONA_IRQ_FLL1_CLOCK_OK, &wm5102->fll[0]);