diff options
author | Manu Abraham <abraham.manu@gmail.com> | 2007-10-15 11:08:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 14:53:18 -0500 |
commit | 6efb0ffe09bec45397142da8e1197885f562e7fa (patch) | |
tree | 542c19af62a50acc38a8a7ed8f1521f8b9f360a5 | |
parent | 417dd69de843a2f67a9ff6e21df7de5be5dd8204 (diff) |
V4L/DVB (9421): We must wait for the PLL to stabilize
Thanks to Peter for the in depth explanation
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/ttpci/budget-ci.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index 6b77b123f75c..21f5e2c6b4c0 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c | |||
@@ -1768,6 +1768,29 @@ static void frontend_init(struct budget_ci *budget_ci) | |||
1768 | break; | 1768 | break; |
1769 | 1769 | ||
1770 | case 0x1019: // TT S2-3200 PCI | 1770 | case 0x1019: // TT S2-3200 PCI |
1771 | /* | ||
1772 | * NOTE! on some STB0899 versions, the internal PLL takes a longer time | ||
1773 | * to settle, aka LOCK. On the older revisions of the chip, we don't see | ||
1774 | * this, as a result on the newer chips the entire clock tree, will not | ||
1775 | * be stable after a freshly POWER 'ed up situation. | ||
1776 | * In this case, we should RESET the STB0899 (Active LOW) and wait for | ||
1777 | * PLL stabilization. | ||
1778 | * | ||
1779 | * On the TT S2 3200 and clones, the STB0899 demodulator's RESETB is | ||
1780 | * connected to the SAA7146 GPIO, GPIO2, Pin 142 | ||
1781 | */ | ||
1782 | /* Reset Demodulator */ | ||
1783 | saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO); | ||
1784 | /* Wait for everything to die */ | ||
1785 | msleep(50); | ||
1786 | /* Pull it up out of Reset state */ | ||
1787 | saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI); | ||
1788 | /* Wait for PLL to stabilize */ | ||
1789 | msleep(250); | ||
1790 | /* | ||
1791 | * PLL state should be stable now. Ideally, we should check | ||
1792 | * for PLL LOCK status. But well, never mind! | ||
1793 | */ | ||
1771 | budget_ci->budget.dvb_frontend = dvb_attach(stb0899_attach, &tt3200_config, &budget_ci->budget.i2c_adap); | 1794 | budget_ci->budget.dvb_frontend = dvb_attach(stb0899_attach, &tt3200_config, &budget_ci->budget.i2c_adap); |
1772 | if (budget_ci->budget.dvb_frontend) { | 1795 | if (budget_ci->budget.dvb_frontend) { |
1773 | if (dvb_attach(stb6100_attach, budget_ci->budget.dvb_frontend, &tt3200_stb6100_config, &budget_ci->budget.i2c_adap)) { | 1796 | if (dvb_attach(stb6100_attach, budget_ci->budget.dvb_frontend, &tt3200_stb6100_config, &budget_ci->budget.i2c_adap)) { |