From 5fb995902e6758a80444e8abeb75d2e96c7c66f3 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 9 Jun 2009 18:26:30 +0200 Subject: [PATCH] PLL: RV620 PLL shutdowning fix (sometimes we need unused PLL running) This makes RV620PLLnPower follow AtomBIOS method, fixes bug #18016 --- src/rhd_pll.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/rhd_pll.c b/src/rhd_pll.c index 45ab03a..c9efd9a 100644 --- a/src/rhd_pll.c +++ b/src/rhd_pll.c @@ -732,9 +732,13 @@ RV620PLL1Power(struct rhdPLL *PLL, int Power) RHDRegMask(PLL, P1PLL_CNTL, 0x01, 0x01); /* Reset */ usleep(2); - RHDRegMask(PLL, P1PLL_CNTL, 0x02, 0x02); /* Power down */ + /* Sometimes we have to keep unused PLL running, see bug #18016 */ + if ((RHDRegRead(PLL, RV620_EXT1_DIFF_POST_DIV_CNTL) & 0x0100) == 0) + RHDRegMask(PLL, P1PLL_CNTL, 0x02, 0x02); /* Power down */ usleep(200); + RHDRegMask(PLL, P1PLL_CNTL, 0x2000, 0x2000); /* reset anti-glitch */ + return; } } @@ -781,9 +785,13 @@ RV620PLL2Power(struct rhdPLL *PLL, int Power) RHDRegMask(PLL, P2PLL_CNTL, 0x01, 0x01); /* Reset */ usleep(2); - RHDRegMask(PLL, P2PLL_CNTL, 0x02, 0x02); /* Power down */ + /* Sometimes we have to keep unused PLL running, see bug #18016 */ + if ((RHDRegRead(PLL, RV620_EXT2_DIFF_POST_DIV_CNTL) & 0x0100) == 0) + RHDRegMask(PLL, P2PLL_CNTL, 0x02, 0x02); /* Power down */ usleep(200); + RHDRegMask(PLL, P2PLL_CNTL, 0x2000, 0x2000); /* reset anti-glitch */ + return; } } -- 1.6.0.2