12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745 |
- /*****************************************************************************
- Copyright(c) 2013 FCI Inc. All Rights Reserved
- File name : fc8300_bb.c
- Description : source of baseband driver
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- History :
- ----------------------------------------------------------------------
- *******************************************************************************/
- #include <linux/delay.h>
- #include "fci_types.h"
- #include "fci_oal.h"
- #include "fci_hal.h"
- #include "fci_tun.h"
- #include "fc8300_regs.h"
- #define SCAN_CHK_PERIOD 1 /* 1 ms */
- static enum BROADCAST_TYPE broadcast_type;
- extern unsigned int bbm_xtal_freq;
- static u32 fc8300_get_current_clk(HANDLE handle, DEVICEID devid)
- {
- u32 pre_sel, post_sel, multi;
- u16 pll_set = 0;
- bbm_word_read(handle, devid, BBM_PLL1_PRE_POST_SELECTION, &pll_set);
- multi = ((pll_set & 0xff00) >> 8) + 2;
- pre_sel = pll_set & 0x000f;
- post_sel = (pll_set & 0x00f0) >> 4;
- return ((bbm_xtal_freq >> pre_sel) * multi) >> post_sel;
- }
- static u32 fc8300_get_core_clk(HANDLE handle, DEVICEID devid,
- enum BROADCAST_TYPE broadcast, u32 freq)
- {
- u32 clk;
- #if (BBM_BAND_WIDTH == 6)
- if (bbm_xtal_freq == 16000) {
- clk = 100000;
- }
- else if (bbm_xtal_freq == 16384) {
- clk = 98304;
- }
- else if (bbm_xtal_freq == 18000) {
- clk = 99000;
- }
- else if (bbm_xtal_freq == 19200) {
- clk = 100800;
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBT_CATV_1SEG:
- switch (freq) {
- case 503143:
- case 605143:
- case 707143:
- clk = 110400;
- }
- break;
- case ISDBTMM_1SEG:
- case ISDBTSB_1SEG:
- case ISDBTSB_3SEG:
- break;
- case ISDBT_13SEG:
- case ISDBT_CATV_13SEG:
- switch (freq) {
- case 503143:
- case 605143:
- case 707143:
- clk = 110400;
- }
- break;
- case ISDBTMM_13SEG:
- break;
- }
- }
- else if (bbm_xtal_freq == 24000) {
- clk = 99000;
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBTMM_1SEG:
- case ISDBTSB_1SEG:
- case ISDBT_CATV_1SEG:
- case ISDBTSB_3SEG:
- break;
- case ISDBT_13SEG:
- case ISDBT_CATV_13SEG:
- switch (freq) {
- case 497143:
- case 593143:
- case 695143:
- clk = 120000;
- }
- break;
- case ISDBTMM_13SEG:
- break;
- }
- }
- else if (bbm_xtal_freq == 24576) {
- clk = 98304;
- }
- else if (bbm_xtal_freq == 26000) {
- clk = 100750;
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBT_CATV_1SEG:
- switch (freq) {
- case 479143:
- case 503143:
- case 521143:
- case 569143:
- case 605143:
- case 653143:
- case 707143:
- case 731143:
- case 755143:
- case 773143:
- case 809143:
- clk = 107250;
- }
- break;
- case ISDBTMM_1SEG:
- case ISDBTSB_1SEG:
- case ISDBTSB_3SEG:
- break;
- case ISDBT_13SEG:
- case ISDBT_CATV_13SEG:
- switch (freq) {
- case 479143:
- case 503143:
- case 521143:
- case 569143:
- case 605143:
- case 653143:
- case 707143:
- case 731143:
- case 755143:
- case 773143:
- case 803143:
- case 809143:
- clk = 107250;
- }
- break;
- case ISDBTMM_13SEG:
- break;
- }
- }
- else if (bbm_xtal_freq == 27000) {
- clk = 97875;
- }
- else if (bbm_xtal_freq == 27120) {
- clk = 98310;
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBT_CATV_1SEG:
- switch (freq) {
- case 491143:
- case 587143:
- case 689143:
- clk = 101700;
- }
- break;
- case ISDBTMM_1SEG:
- switch (freq) {
- case 221142:
- case 221143:
- case 221144:
- clk = 101700;
- }
- break;
- case ISDBTSB_1SEG:
- case ISDBTSB_3SEG:
- break;
- case ISDBT_13SEG:
- case ISDBT_CATV_13SEG:
- switch (freq) {
- case 491143:
- case 587143:
- case 689143:
- clk = 101700;
- }
- break;
- case ISDBTMM_13SEG:
- break;
- }
- }
- else if (bbm_xtal_freq == 32000) {
- clk = 100000;
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBT_CATV_1SEG:
- switch (freq) {
- case 683143:
- clk = 104000;
- }
- break;
- case ISDBTMM_1SEG:
- case ISDBTSB_1SEG:
- case ISDBTSB_3SEG:
- break;
- case ISDBT_13SEG:
- switch (freq) {
- case 599143:
- case 701143:
- clk = 116000;
- }
- break;
- case ISDBT_CATV_13SEG:
- switch (freq) {
- case 99143:
- case 153143:
- case 201143:
- case 231143:
- case 249143:
- case 297143:
- case 303143:
- case 351143:
- case 399143:
- case 497143:
- case 503143:
- case 533143:
- case 551143:
- case 599143:
- case 635143:
- case 653143:
- case 749143:
- case 767143:
- clk = 108000;
- break;
- case 647143:
- case 665143:
- case 683143:
- clk = 112000;
- break;
- }
- break;
- case ISDBTMM_13SEG:
- break;
- }
- }
- else if (bbm_xtal_freq == 37200) {
- clk = 97650;
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBT_CATV_1SEG:
- switch (freq) {
- case 659143:
- clk = 111600;
- }
- break;
- case ISDBTMM_1SEG:
- switch (freq) {
- case 219856:
- case 219857:
- case 219858:
- clk = 111600;
- }
- break;
- case ISDBTSB_1SEG:
- case ISDBTSB_3SEG:
- break;
- case ISDBT_13SEG:
- case ISDBT_CATV_13SEG:
- switch (freq) {
- case 587143:
- case 683143:
- clk = 111600;
- }
- break;
- case ISDBTMM_13SEG:
- break;
- }
- }
- else if (bbm_xtal_freq == 37400) {
- clk = 98175;
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBT_CATV_1SEG:
- switch (freq) {
- case 491143:
- clk = 102850;
- }
- break;
- case ISDBTMM_1SEG:
- case ISDBTSB_1SEG:
- case ISDBTSB_3SEG:
- break;
- case ISDBT_13SEG:
- case ISDBT_CATV_13SEG:
- switch (freq) {
- case 491143:
- case 587143:
- case 683143:
- clk = 102850;
- }
- break;
- case ISDBTMM_13SEG:
- break;
- }
- }
- else { /* (bbm_xtal_freq == 38400) */
- clk = 100800;
- }
- #elif (BBM_BAND_WIDTH == 7)
- if (bbm_xtal_freq == 16000)
- clk = 116000;
- else if (bbm_xtal_freq == 16384)
- clk = 114688;
- else if (bbm_xtal_freq == 18000)
- clk = 117000;
- else if (bbm_xtal_freq == 19200)
- clk = 115200;
- else if (bbm_xtal_freq == 24000)
- clk = 114000;
- else if (bbm_xtal_freq == 24576)
- clk = 116736;
- else if (bbm_xtal_freq == 26000)
- clk = 117000;
- else if (bbm_xtal_freq == 27000)
- clk = 114750;
- else if (bbm_xtal_freq == 27120)
- clk = 115260;
- else if (bbm_xtal_freq == 32000)
- clk = 116000;
- else if (bbm_xtal_freq == 37200)
- clk = 116250;
- else if (bbm_xtal_freq == 37400)
- clk = 116875;
- else /* (bbm_xtal_freq == 38400) */
- clk = 115200;
- #else /* (BBM_BAND_WIDTH == 8) */
- if (bbm_xtal_freq == 16000)
- clk = 132000;
- else if (bbm_xtal_freq == 16384)
- clk = 131072;
- else if (bbm_xtal_freq == 18000)
- clk = 130500;
- else if (bbm_xtal_freq == 19200)
- clk = 134400;
- else if (bbm_xtal_freq == 24000)
- clk = 132000;
- else if (bbm_xtal_freq == 24576)
- clk = 135168;
- else if (bbm_xtal_freq == 26000)
- clk = 136500;
- else if (bbm_xtal_freq == 27000)
- clk = 131625;
- else if (bbm_xtal_freq == 27120)
- clk = 132210;
- else if (bbm_xtal_freq == 32000)
- clk = 132000;
- else if (bbm_xtal_freq == 37200)
- clk = 130200;
- else if (bbm_xtal_freq == 37400)
- clk = 130900;
- else /* (bbm_xtal_freq == 38400) */
- clk = 134400;
- #endif /* #if (BBM_BAND_WIDTH == 6) */
- return clk;
- }
- static s32 fc8300_set_acif_b31_1seg(HANDLE handle, DEVICEID devid, u32 clk)
- {
- #if (BBM_BAND_WIDTH == 6)
- switch (clk) {
- case 100750:
- case 100800:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfcf5f7fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x453c270e);
- break;
- case 105600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfef6f6fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x423a2710);
- break;
- case 110400:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030302);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x00f7f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x40392712);
- break;
- case 115200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xff020302);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x02f8f6fa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x3e382713);
- break;
- case 99000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfaf4f8ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x473e270d);
- break;
- case 102000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02040201);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfdf5f7fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x443c270f);
- break;
- case 105000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfef6f7fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x423b2710);
- break;
- case 108000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;
- case 98310:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03030200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfaf4f8ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x473e260c);
- break;
- case 101700:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02040201);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfcf5f7fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x443c270f);
- break;
- case 105090:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfef6f7fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x423b2710);
- break;
- case 108480:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;
- case 100000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfbf5f8fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x463d270d);
- break;
- case 104000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfef6f7fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x433b2710);
- break;
- /*case 108000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;*/
- case 112000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030302);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x01f7f6fa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x3f392712);
- break;
- case 97650:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x030301ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf9f4f9ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x483e260b);
- break;
- case 102300:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02040201);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfdf5f7fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x443c270f);
- break;
- case 106950:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;
- case 111600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030302);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x00f7f6fa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x3f392712);
- break;
- case 98175:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03030100);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfaf4f8ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x483e260c);
- break;
- case 102850:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfdf5f7fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x433b270f);
- break;
- case 107250:
- case 107525:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;
- case 112200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030302);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x01f7f6fa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x3f392712);
- break;
- default:
- return BBM_NOK;
- }
- #elif (BBM_BAND_WIDTH == 7)
- switch (clk) {
- case 115200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfaf4f8ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x473e260c);
- break;
- case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfdf5f7fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x433b270f);
- break;
- case 124800:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;
- case 129600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030302);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x00f7f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x40392712);
- break;
- case 114000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03030100);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf9f4f9ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x483e260c);
- break;
- case 117000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfbf5f7fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x453d270e);
- break;
- /*case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfdf5f7fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x433b270f);
- break;*/
- case 126000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;
- case 115260:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfaf4f8ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x473e260c);
- break;
- case 118650:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02040201);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfcf5f7fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x443c270f);
- break;
- case 122040:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfef6f7fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x423b2710);
- break;
- case 125430:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;
- case 116000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfbf5f8fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x463d270d);
- break;
- /*case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfdf5f7fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x433b270f);
- break;*/
- case 124000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x423a2711);
- break;
- case 128000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030302);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x00f7f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x40392712);
- break;
- case 116250:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfbf5f8fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x463d270d);
- break;
- case 120900:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfef6f7fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x433b2710);
- break;
- case 125550:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;
- case 130200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030302);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x00f7f6fa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x3f392712);
- break;
- case 116875:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfbf5f8fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x463d270e);
- break;
- default:
- return BBM_NOK;
- }
- #else /* BBM_BAND_WIDTH == 8) */
- switch (clk) {
- case 134400:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfcf5f7fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x453c270e);
- break;
- case 139200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfef6f7fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x433b2710);
- break;
- case 144000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;
- case 148800:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030302);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x00f7f6fa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x3f392712);
- break;
- case 132000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfaf4f8ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x473e270d);
- break;
- case 138000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfdf6f7fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x433b2710);
- break;
- /*case 144000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;*/
- case 150000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030302);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x01f7f6fa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x3f392712);
- break;
- case 132210:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfbf4f8fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x473d270d);
- break;
- case 135600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02040201);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfcf5f7fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x443c270f);
- break;
- case 142380:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;
- case 149160:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030302);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x01f7f6fa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x3f392712);
- break;
- /*case 132000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfaf4f8ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x473e270d);
- break;*/
- case 136000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02040201);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfdf5f7fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x443c270f);
- break;
- case 140000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfef6f7fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x423b2710);
- break;
- /*case 144000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;*/
- case 130200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x030301ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf9f4f9ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x483e260b);
- break;
- case 134850:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02040200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfcf5f7fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x453c270e);
- break;
- case 139500:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfef6f7fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x423b2710);
- break;
- case 144150:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00ffff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00030301);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfff6f6fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x413a2711);
- break;
- case 130900:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xffff0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03030100);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xfaf4f8ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x483e260c);
- break;
- default:
- return BBM_NOK;
- }
- #endif /* #if (BBM_BAND_WIDTH == 6) */
- return BBM_OK;
- }
- static s32 fc8300_set_acif_1seg(HANDLE handle, DEVICEID devid, u32 clk)
- {
- #if (BBM_BAND_WIDTH == 6)
- switch (clk) {
- case 100750:
- case 100800:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfeff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfcfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120b04ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2624201a);
- break;
- case 105600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0601);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23221f19);
- break;
- case 110400:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfdff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x22211e19);
- break;
- case 115200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfdfeff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00fdfcfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130e0804);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x201f1d19);
- break;
- case 99000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe000101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120a03fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2725211a);
- break;
- case 102000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfcfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130b0500);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2524201a);
- break;
- case 105000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdfe0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0601);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x24221f19);
- break;
- case 108000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23211e19);
- break;
- case 98310:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe000101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120a03fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2725211a);
- break;
- case 101700:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfcfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130b05ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2524201a);
- break;
- case 105090:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdfe0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0601);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x24221f19);
- break;
- case 108480:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x22211e19);
- break;
- case 100000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfeff0101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfcfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120b04ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2625201a);
- break;
- case 104000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdfe0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0500);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x24231f1a);
- break;
- /*case 108000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23211e19);
- break;*/
- case 112000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfdfeff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffdfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0803);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x21201d19);
- break;
- case 97650:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe000101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120a03fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2726211a);
- break;
- case 102300:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfcfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130b0500);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2524201a);
- break;
- case 106950:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0601);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23221e19);
- break;
- case 111600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfdfe00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0803);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x21201d19);
- break;
- case 98175:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe000101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120a03fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2725211a);
- break;
- case 102850:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0500);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x25231f1a);
- break;
- case 107250:
- case 107525:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23221e19);
- break;
- case 112200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfdfeff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffdfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0803);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x21201d19);
- break;
- default:
- return BBM_NOK;
- }
- #elif (BBM_BAND_WIDTH == 7)
- switch (clk) {
- case 115200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe000101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120a03fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2725211a);
- break;
- case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0500);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x25231f1a);
- break;
- case 124800:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0601);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23221e19);
- break;
- case 129600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfdfe00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0803);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x22201d19);
- break;
- case 114000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe000101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120a03fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2726211a);
- break;
- case 117000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfeff0101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfcfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120b04ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2624201a);
- break;
- /*case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0500);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x25231f1a);
- break;*/
- case 126000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23211e19);
- break;
- case 115260:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe000101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120a03fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2725211a);
- break;
- case 118650:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfcfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130b05ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2524201a);
- break;
- case 122040:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdfe0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0601);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x24231f19);
- break;
- case 125430:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23221e19);
- break;
- case 116000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe000101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120a04ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2625201a);
- break;
- /*case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0500);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x25231f1a);
- break;*/
- case 124000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefbfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0601);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23221f19);
- break;
- case 128000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfdff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x22211e19);
- break;
- case 116250:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfeff0101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120b04ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2625201a);
- break;
- case 120900:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdfe0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0500);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x24231f1a);
- break;
- case 125550:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23221e19);
- break;
- case 130200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfdfe00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0803);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x21201d19);
- break;
- case 116875:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfeff0101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfcfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120b04ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2624201a);
- break;
- default:
- return BBM_NOK;
- }
- #else /* BBM_BAND_WIDTH == 8) */
- switch (clk) {
- case 134400:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfeff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfcfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120b04ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2624201a);
- break;
- case 139200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdfe0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0601);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x24231f19);
- break;
- case 144000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23211e19);
- break;
- case 148800:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfdfe00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0803);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x21201d19);
- break;
- case 132000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe000101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120a03fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2725211a);
- break;
- case 138000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0500);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x24231f1a);
- break;
- /*case 144000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23211e19);
- break;*/
- case 150000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfdfeff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffdfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130e0803);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x21201d19);
- break;
- case 132210:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe000101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120a04fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2625211a);
- break;
- case 135600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfcfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130b05ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2524201a);
- break;
- case 142380:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0601);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23221e19);
- break;
- case 149160:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfdfeff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffdfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0803);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x21201d19);
- break;
- /*case 132000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe000101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120a03fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2725211a);
- break;*/
- case 136000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfcfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130b0500);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2524201a);
- break;
- case 140000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdfe0000);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0601);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x24221f19);
- break;
- /*case 144000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23211e19);
- break;*/
- case 130200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe000101);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfbfafbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120a03fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2726211a);
- break;
- case 134850:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdff0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfcfbfbfc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x120b04ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x2524201a);
- break;
- case 139500:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfdfe0001);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfdfbfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130c0601);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x24231f19);
- break;
- case 144150:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23211e19);
- break;
- case 130900:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfcfeff00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefcfbfb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0x130d0702);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x23211e19);
- break;
- default:
- return BBM_NOK;
- }
- #endif /* #if (BBM_BAND_WIDTH == 6) */
- return BBM_OK;
- }
- static s32 fc8300_set_acif_3seg(HANDLE handle, DEVICEID devid, u32 clk)
- {
- #if (BBM_BAND_WIDTH == 6)
- switch (clk) {
- case 100750:
- case 100800:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefb0808);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x604b1cf6);
- break;
- case 105600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fcfc00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef80509);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5c491ffa);
- break;
- case 110400:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x01020100);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x05fffcfe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff50208);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x584721fe);
- break;
- case 115200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xff010200);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0701fdfd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf1f3fe07);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x53452302);
- break;
- case 99000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0200ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffbfe02);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefc0807);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x614b1bf5);
- break;
- case 102000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefa0708);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5f4a1df7);
- break;
- case 105000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020100ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fcfc00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef80609);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ef9);
- break;
- /*case 108000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef60409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4820fc);
- break;*/
- case 98310:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0200ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffbfe02);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefc0907);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x624b1bf5);
- break;
- case 101700:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefa0708);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5f4b1df7);
- break;
- case 105090:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fcfc00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef80609);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d491ef9);
- break;
- case 108480:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fefcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef60309);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4820fc);
- break;
- case 100000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefb0808);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x604b1cf6);
- break;
- case 104000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fcfc00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef90608);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ef8);
- break;
- case 108000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef60409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4820fc);
- break;
- case 112000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00020100);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0600fcfd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf0f40108);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x564722ff);
- break;
- case 97650:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0200ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefbfe02);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefd0907);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x624c1af4);
- break;
- case 102300:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefa0708);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5f4a1df7);
- break;
- case 106950:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef70409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5b491ffb);
- break;
- case 111600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00020100);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x06fffcfd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff40108);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x574722ff);
- break;
- case 98175:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0200ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffbfe02);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefc0907);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x624c1bf5);
- break;
- case 102850:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01fbfc01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef90708);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5e4a1df8);
- break;
- case 107250:
- case 107525:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef70409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4920fb);
- break;
- case 112200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00020100);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0600fcfd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf0f40008);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x564622ff);
- break;
- default:
- return BBM_NOK;
- }
- #elif (BBM_BAND_WIDTH == 7)
- switch (clk) {
- case 115200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0200ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffbfe02);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefc0807);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x614b1bf5);
- break;
- case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01fbfc01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef90708);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5e4a1df8);
- break;
- case 124800:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef70409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5b491ffb);
- break;
- case 129600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x01020100);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x05fffcfe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff50108);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x574722fe);
- break;
- case 114000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0200ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffbfe02);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefd0907);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x624c1af4);
- break;
- case 117000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefb0808);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x604b1cf6);
- break;
- /*case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01fbfc01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef90708);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5e4a1df8);
- break;*/
- case 126000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef60409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4820fc);
- break;
- case 115260:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0200ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffbfe02);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefc0807);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x614b1bf5);
- break;
- case 118650:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefa0708);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5f4b1df7);
- break;
- case 122040:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020100ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fcfc00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef80609);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ef9);
- break;
- case 125430:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef70409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4920fb);
- break;
- case 116000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0200ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffbfd02);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefb0808);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x614b1bf5);
- break;
- /*case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01fbfc01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef90708);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5e4a1df8);
- break;*/
- case 124000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef70509);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5c491ffa);
- break;
- case 128000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x010201ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x05fefcfe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff50208);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x584821fd);
- break;
- case 116250:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefb0808);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x614b1cf6);
- break;
- case 120900:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01fcfc00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef90608);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5e4a1ef8);
- break;
- case 125550:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef70409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4920fb);
- break;
- case 130200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00020100);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x06fffcfd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff40108);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x574722ff);
- break;
- case 116875:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefb0808);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x604b1cf6);
- break;
- default:
- return BBM_NOK;
- }
- #else /* BBM_BAND_WIDTH == 8) */
- switch (clk) {
- case 134400:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefb0808);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x604b1cf6);
- break;
- case 139200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020100ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fcfc00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef80609);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ef9);
- break;
- case 144000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef60409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4820fc);
- break;
- case 148800:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00020100);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x06fffcfd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff40108);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x574722ff);
- break;
- case 132000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0200ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffbfe02);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefc0807);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x614b1bf5);
- break;
- case 138000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01fcfc00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef90608);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5e4a1ef8);
- break;
- /*case 144000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef60409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4820fc);
- break;*/
- case 150000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00020100);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0600fcfd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf0f40008);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x56462200);
- break;
- case 132210:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0200ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffbfd02);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefc0807);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x614b1bf5);
- break;
- case 135600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefa0708);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5f4b1df7);
- break;
- case 142380:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef70509);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5b491ffb);
- break;
- case 149160:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00020100);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x06fffcfd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf0f40108);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x564722ff);
- break;
- /*case 132000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0200ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfffbfe02);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefc0807);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x614b1bf5);
- break;*/
- case 136000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x01fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefa0708);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5f4a1df7);
- break;
- case 140000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020100ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fcfc00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef80609);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ef9);
- break;
- /*case 144000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef60409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4820fc);
- break;*/
- case 130200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0200ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0xfefbfe02);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefd0907);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x624c1af4);
- break;
- case 134850:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0201ffff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x00fbfd01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeefa0708);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x604b1cf7);
- break;
- case 139500:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020100ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fcfc00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef80609);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ef9);
- break;
- case 144150:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef60409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4820fc);
- break;
- case 130900:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020200ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fdfcff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef60409);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4820fc);
- break;
- default:
- return BBM_NOK;
- }
- #endif /* #if (BBM_BAND_WIDTH == 6) */
- return BBM_OK;
- }
- static s32 fc8300_set_acif_13seg(HANDLE handle, DEVICEID devid, u32 clk)
- {
- #if (BBM_BAND_WIDTH == 6)
- switch (clk) {
- case 100750:
- case 100800:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x040400fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fbf9fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf6050b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5b4920fa);
- break;
- case 105600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x010503ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x07fff9fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef3010a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x574722fe);
- break;
- case 110400:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe030402);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0902fbfa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf0f1fe08);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x53452402);
- break;
- case 115200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfc010403);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0905fefa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf2f0fb06);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x50432606);
- break;
- case 99000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0504fffc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fafa00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf7070b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ff9);
- break;
- case 102000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x030501fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x05fcf9fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf5040b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4920fb);
- break;
- case 105000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020503ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x07fef9fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef4020a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x574722fe);
- break;
- case 108000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00040400);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0800fafa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff2ff09);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x55462301);
- break;
- case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfbfe0304);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x090700fb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf4f0f803);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x4d422709);
- break;
- case 98310:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0503fffc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fafa00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf8070b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ef8);
- break;
- case 101700:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x040401fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x05fcf9fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf5050b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4920fb);
- break;
- case 105090:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020503ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x07fef9fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef3020a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x574722fe);
- break;
- case 108480:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xff040401);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0801fafa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff2ff09);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x54462401);
- break;
- case 100000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x040400fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fbf9ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf7060b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5c4a1ffa);
- break;
- case 104000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020502fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x06fdf9fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef4030a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x584821fd);
- break;
- /*case 108000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00040400);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0800fafa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff2ff09);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x55462301);
- break;*/
- case 112000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfd020402);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0903fcfa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf1f1fd07);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x52452504);
- break;
- case 97650:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0503fefc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fafa01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf8080a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5e4a1ef8);
- break;
- case 102300:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x030501fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x05fcf9fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf5040b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4921fc);
- break;
- case 106950:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00040400);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0800fafb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff3000a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x56472300);
- break;
- case 111600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfd020402);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0903fcfa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf1f1fd07);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x52452503);
- break;
- case 116000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfc000404);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0905fefa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf3f0fa05);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x4f432606);
- break;
- case 98175:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0503fffc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fafa00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf8070b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5e4a1ef8);
- break;
- case 102850:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x030501fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x06fdf9fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf5040b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x594821fc);
- break;
- case 107250:
- case 107525:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00040400);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0800fafb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff20009);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x55462300);
- break;
- case 112200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfd020402);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0903fcfa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf1f1fc07);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x52452504);
- break;
- default:
- return BBM_NOK;
- }
- #elif (BBM_BAND_WIDTH == 7)
- switch (clk) {
- case 115200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0504fffc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fafa00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf8070b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ff9);
- break;
- case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x030501fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x06fdf9fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf5040b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x594821fc);
- break;
- case 124800:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00040400);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0800fafb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff30009);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x56472300);
- break;
- case 129600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe030402);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0903fcfa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf0f1fd08);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x52452403);
- break;
- case 114000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0503fefc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fafa01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf8080a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5e4a1ef8);
- break;
- case 117000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x040400fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fbf9ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf6060b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5c4920fa);
- break;
- /*case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x030501fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x06fdf9fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf5040b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x594821fc);
- break;*/
- case 126000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00040400);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0800fafa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff2ff09);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x55462301);
- break;
- case 115260:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0504fffc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fafa00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf7070b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ff9);
- break;
- case 118650:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x040401fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x05fcf9fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf5050b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4920fb);
- break;
- case 122040:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020502fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x07fef9fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef4020a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x584822fe);
- break;
- case 125430:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00040400);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0800fafb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff20009);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x55462300);
- break;
- case 116000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0504fffd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fafaff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf7060b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5c4a1ff9);
- break;
- /*case 120000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x030501fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x06fdf9fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf5040b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x594821fc);
- break;*/
- case 124000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x010403ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x08fffafb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef3010a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x564723ff);
- break;
- case 128000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfe030401);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0902fbfa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf0f2fe08);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x53452402);
- break;
- case 116250:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0404fffd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fbfaff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf7060b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5c4a1ff9);
- break;
- case 120900:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020502fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x06fdf9fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf4030a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x594821fd);
- break;
- case 125550:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00040400);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0800fafb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff20009);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x55462300);
- break;
- case 130200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfd020402);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0903fcfa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf1f1fd07);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x52452503);
- break;
- case 116875:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x040400fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fbf9ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf7060b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5c491ffa);
- break;
- default:
- return BBM_NOK;
- }
- #else /* BBM_BAND_WIDTH == 8) */
- switch (clk) {
- case 134400:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x040400fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fbf9fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf6050b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5b4920fa);
- break;
- case 139200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020502fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x07fef9fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef4020a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x584822fd);
- break;
- case 144000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00040400);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0800fafa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff2ff09);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x55462301);
- break;
- case 148800:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfd020402);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0903fcfa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf1f1fd07);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x52452503);
- break;
- case 132000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0504fffc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fafa00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf7070b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ff9);
- break;
- case 138000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x030502fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x06fdf9fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf4030a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x594821fd);
- break;
- /*case 144000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00040400);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0800fafa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff2ff09);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x55462301);
- break;*/
- case 150000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfd020403);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0903fcfa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf1f1fc07);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x51442504);
- break;
- case 132210:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0504fffc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fafa00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf7070b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ff9);
- break;
- case 135600:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x040401fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x05fcf9fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf5050b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4920fb);
- break;
- case 142380:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00040300);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0800fafb);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff3000a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x56472300);
- break;
- case 149160:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xfd020402);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0903fcfa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xf1f1fd07);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x52452503);
- break;
- /*case 132000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0504fffc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x03fafa00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf7070b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5d4a1ff9);
- break;*/
- case 136000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x030501fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x05fcf9fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf5040b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5a4920fb);
- break;
- case 140000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020503ff);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x07fef9fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef4020a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x574722fe);
- break;
- /*case 144000:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x00040400);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0800fafa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff2ff09);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x55462301);
- break;*/
- case 130200:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0503fefc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fafa01);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf8080a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5e4a1ef8);
- break;
- case 134850:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x040400fd);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x04fbf9fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xedf6050b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5b4920fb);
- break;
- case 139500:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x020502fe);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x07fef9fc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeef4020a);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x584822fe);
- break;
- case 144150:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0xff040400);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x0801fafa);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xeff2ff09);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x55462301);
- break;
- case 130900:
- bbm_long_write(handle, devid, BBM_ACIF_COEF_00, 0x0503fffc);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_04, 0x02fafa00);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_08, 0xecf8070b);
- bbm_long_write(handle, devid, BBM_ACIF_COEF_12, 0x5e4a1ef8);
- break;
- default:
- return BBM_NOK;
- }
- #endif /* #if (BBM_BAND_WIDTH == 6) */
- return BBM_OK;
- }
- static s32 fc8300_set_cal_front_1seg(HANDLE handle, DEVICEID devid, u32 clk)
- {
- #if (BBM_BAND_WIDTH == 6)
- switch (clk) {
- case 97650:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2fd1);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3fead);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x200a999a);
- break;
- case 97875:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2fb5);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3fc53);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x201d8000);
- break;
- case 98175:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2f90);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f935);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x2036b333);
- break;
- case 98304:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2f80);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f7df);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20418937);
- break;
- case 98310:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2f7f);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f7d0);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20420a3d);
- break;
- case 99000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2f2b);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f0bb);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x207c0000);
- break;
- case 100000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2eb2);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3e6a5);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20d00000);
- break;
- case 100750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2e59);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3df36);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x210f0000);
- break;
- case 100800:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2e53);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3deb8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21133333);
- break;
- case 101250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2e1e);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3da51);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21390000);
- break;
- case 101376:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2e10);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d917);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21439581);
- break;
- case 101700:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2dea);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d5f3);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x215ecccd);
- break;
- case 102400:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2d9a);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3cf3d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x2199999a);
- break;
- case 102850:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2d67);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3caf9);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21bf6666);
- break;
- case 103125:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2d48);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3c862);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21d68000);
- break;
- case 104000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2ce6);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3c03c);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x22200000);
- break;
- case 105600:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2c38);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3b1af);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x22a66666);
- break;
- case 107250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2b8a);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3a323);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x23310000);
- break;
- case 107525:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2b6d);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3a0c1);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x2348199a);
- break;
- case 108000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2b3c);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x39cac);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x23700000);
- break;
- case 110400:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2a4c);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x38892);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x2439999a);
- break;
- case 111600:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x29d7);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x37ed8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x249e6666);
- break;
- case 112000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x29b1);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x37ba5);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x24c00000);
- break;
- case 112200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x299e);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x37a0f);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x24d0cccd);
- break;
- default:
- return BBM_NOK;
- }
- #elif (BBM_BAND_WIDTH == 7)
- switch (clk) {
- case 114000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x28f6);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3fe01);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20100000);
- break;
- case 114688:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x28b7);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f7df);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20418937);
- break;
- case 114750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x28b1);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f753);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20460000);
- break;
- case 115200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2889);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f35c);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20666666);
- break;
- case 115260:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2883);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f2d5);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x206ab852);
- break;
- case 115625:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2862);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3efa4);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20850000);
- break;
- case 116000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2841);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3ec62);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20a00000);
- break;
- case 116250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x282b);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3ea39);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20b20000);
- break;
- case 116736:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2800);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3e60d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20d4fdf4);
- break;
- case 116875:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x27f4);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x35674);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x26598000);
- break;
- case 117000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x27e9);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3e3cc);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20e80000);
- break;
- case 118125:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2788);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3da51);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21390000);
- break;
- case 118650:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x275b);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d5f3);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x215ecccd);
- break;
- case 118750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2752);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d520);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21660000);
- break;
- case 118784:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x274f);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d4d8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x216872b0);
- break;
- case 120000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x26e9);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3cae7);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21c00000);
- break;
- case 120900:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x269f);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3c3ad);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x2200cccd);
- break;
- default:
- return BBM_NOK;
- }
- #else /* (BBM_BAND_WIDTH == 8) */
- switch (clk) {
- case 130200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x23dd);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3fead);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x200a999a);
- break;
- case 130500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x23c8);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3fc53);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x201d8000);
- break;
- case 130900:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x23ac);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x2fae8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x2af3999a);
- break;
- case 131072:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x23a0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f7df);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20418937);
- break;
- case 131250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2394);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f67f);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x204cc000);
- break;
- case 131625:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x237a);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f39b);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20646000);
- break;
- case 132000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2360);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f0bb);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x207c0000);
- break;
- case 132210:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2351);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3ef21);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x20893ae1);
- break;
- case 134400:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x22be);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3deb8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21133333);
- break;
- case 134850:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x22a0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3db69);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x212f8ccd);
- break;
- case 135000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2297);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3da51);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21390000);
- break;
- case 135168:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x228c);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d917);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21439581);
- break;
- case 135600:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x226f);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d5f3);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x215ecccd);
- break;
- case 136000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2256);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d310);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21780000);
- break;
- case 136500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2235);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3cf7a);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21978000);
- break;
- case 137500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x21f6);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3c862);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21d68000);
- break;
- case 138000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x21d6);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3c4e0);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x21f60000);
- break;
- case 139200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x218b);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3bc8e);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x2241999a);
- break;
- case 139264:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2188);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3bc1e);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x2245a1cb);
- break;
- case 139500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x2179);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3ba80);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x22548000);
- break;
- case 141312:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x210b);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3ae42);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x22c6a7f0);
- break;
- case 141750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x20f1);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3ab59);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x22e24000);
- break;
- case 143000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x20a7);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3a323);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x23310000);
- break;
- default:
- return BBM_NOK;
- }
- #endif
- return BBM_OK;
- }
- static s32 fc8300_set_cal_front_3seg(HANDLE handle, DEVICEID devid, u32 clk)
- {
- #if (BBM_BAND_WIDTH == 6)
- switch (clk) {
- case 97650:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7dd6);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3fead);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10054ccd);
- break;
- case 97875:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7d8c);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3fc53);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x100ec000);
- break;
- case 98175:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7d2a);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f935);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x101b599a);
- break;
- case 98304:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7d00);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f7df);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1020c49c);
- break;
- case 98310:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7cfe);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f7d0);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1021051f);
- break;
- case 99000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7c1f);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f0bb);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x103e0000);
- break;
- case 100000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7ae1);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3e6a5);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10680000);
- break;
- case 100750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x79f7);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3df36);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10878000);
- break;
- case 100800:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x79e8);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3deb8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1089999a);
- break;
- case 101250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x795d);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3da51);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x109c8000);
- break;
- case 101376:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7936);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d917);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10a1cac1);
- break;
- case 101700:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x78d3);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d5f3);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10af6666);
- break;
- case 102000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7878);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d310);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10bc0000);
- break;
- case 102300:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x781e);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d031);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10c8999a);
- break;
- case 102400:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7800);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3cf3d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10cccccd);
- break;
- case 102850:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x777a);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3caf9);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10dfb333);
- break;
- case 103125:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7728);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3c862);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10eb4000);
- break;
- case 103500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x76ba);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3c4e0);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10fb0000);
- break;
- case 104000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7627);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3c03c);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11100000);
- break;
- case 105600:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x745d);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3b1af);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11533333);
- break;
- case 107250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7293);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3a323);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11988000);
- break;
- case 107525:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x7248);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3a0c1);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11a40ccd);
- break;
- case 108000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x71c7);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x39cac);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11b80000);
- break;
- case 112000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6db7);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x37ba5);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12600000);
- break;
- case 112200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6d85);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x37a0f);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12686666);
- break;
- default:
- return BBM_NOK;
- }
- #elif (BBM_BAND_WIDTH == 7)
- switch (clk) {
- case 114000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6bca);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3fe01);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10080000);
- break;
- case 114688:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6b25);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f7df);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1020c49c);
- break;
- case 114750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6b16);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f753);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10230000);
- break;
- case 115200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6aab);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f35c);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10333333);
- break;
- case 115260:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6a9c);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f2d5);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10355c29);
- break;
- case 115625:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6a46);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3efa4);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10428000);
- break;
- case 116000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x69ee);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3ec62);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10500000);
- break;
- case 116250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x69b4);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3ea39);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10590000);
- break;
- case 116736:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6943);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3e60d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x106a7efa);
- break;
- case 116875:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6923);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x35674);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x132cc000);
- break;
- case 117000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6907);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3e3cc);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10740000);
- break;
- case 118125:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6807);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3da51);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x109c8000);
- break;
- case 118650:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6791);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d5f3);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10af6666);
- break;
- case 118750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x677a);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d520);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10b30000);
- break;
- case 118784:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6773);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d4d8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10b43958);
- break;
- case 119808:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6690);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3cc76);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10d91687);
- break;
- case 120000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6666);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3cae7);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10e00000);
- break;
- case 120250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6630);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3c8e3);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10e90000);
- break;
- case 120900:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x65a3);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3c3ad);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11006666);
- break;
- case 121500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x6523);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3beeb);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11160000);
- break;
- default:
- return BBM_NOK;
- }
- #else /* BBM_BAND_WIDTH == 8) */
- switch (clk) {
- case 130200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x5e61);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3fead);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10054ccd);
- break;
- case 130500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x5e29);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3fc53);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x100ec000);
- break;
- case 130900:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x5de0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x2fae8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1579cccd);
- break;
- case 131072:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x5dc0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f7df);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1020c49c);
- break;
- case 131250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x5d9f);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f67f);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10266000);
- break;
- case 131625:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x5d5b);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f39b);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10323000);
- break;
- case 132000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x5d17);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3f0bb);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x103e0000);
- break;
- case 132210:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x5cf1);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3ef21);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10449d71);
- break;
- case 134400:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x5b6e);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3deb8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1089999a);
- break;
- case 135168:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x5ae9);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3d917);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10a1cac1);
- break;
- case 136500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x5a06);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3cf7a);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10cbc000);
- break;
- case 141312:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x56f5);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3ae42);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x116353f8);
- break;
- case 143000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x55ee);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0x3a323);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11988000);
- break;
- default:
- return BBM_NOK;
- }
- #endif /* #if (BBM_BAND_WIDTH == 6) */
- return BBM_OK;
- }
- static s32 fc8300_set_cal_front_13seg(HANDLE handle, DEVICEID devid, u32 clk)
- {
- #if (BBM_BAND_WIDTH == 6)
- switch (clk) {
- case 97650:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xffab);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10054ccd);
- break;
- case 97875:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xff15);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x100ec000);
- break;
- case 98175:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfe4d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x101b599a);
- break;
- case 98304:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfdf8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1020c49c);
- break;
- case 98310:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfdf4);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1021051f);
- break;
- case 99000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfc2f);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x103e0000);
- break;
- case 100000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf9a9);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10680000);
- break;
- case 100750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf7cd);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10878000);
- break;
- case 100800:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf7ae);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1089999a);
- break;
- case 101250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf694);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x109c8000);
- break;
- case 101376:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf646);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10a1cac1);
- break;
- case 101700:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf57d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10af6666);
- break;
- case 102000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf4c4);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10bc0000);
- break;
- case 102300:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf40c);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10c8999a);
- break;
- case 102400:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf3cf);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10cccccd);
- break;
- case 102850:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf2be);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10dfb333);
- break;
- case 103125:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf218);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10eb4000);
- break;
- case 103500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf138);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10fb0000);
- break;
- case 104000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf00f);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11100000);
- break;
- case 104448:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xef07);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1122d0e5);
- break;
- case 104625:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xeea0);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x112a4000);
- break;
- case 105000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xedc6);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x113a0000);
- break;
- case 105090:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xed92);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x113dc7ae);
- break;
- case 105600:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xec6c);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11533333);
- break;
- case 106250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xeafa);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x116e8000);
- break;
- case 106496:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xea6f);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1178d4fe);
- break;
- case 106950:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe970);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x118be666);
- break;
- case 107250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe8c9);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11988000);
- break;
- case 107525:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe830);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11a40ccd);
- break;
- case 108000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe72b);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11b80000);
- break;
- case 108480:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe625);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11cc28f6);
- break;
- case 109375:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe443);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11f1c000);
- break;
- case 110400:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe224);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x121ccccd);
- break;
- case 110500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe1f0);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12210000);
- break;
- case 110592:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe1c0);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1224dd2f);
- break;
- case 111600:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xdfb6);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x124f3333);
- break;
- case 112000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xdee9);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12600000);
- break;
- case 112200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xde84);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12686666);
- break;
- case 112500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xddec);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12750000);
- break;
- case 114000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xdb00);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12b40000);
- break;
- case 114750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd992);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12d38000);
- break;
- case 115200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd8b8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12e66666);
- break;
- case 116000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd73a);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13080000);
- break;
- case 117000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd563);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13320000);
- break;
- case 118125:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd35a);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13614000);
- break;
- case 118750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd23e);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x137b8000);
- break;
- case 120000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd00d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13b00000);
- break;
- case 120250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xcf9e);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13ba8000);
- break;
- default:
- return BBM_NOK;
- }
- #elif (BBM_BAND_WIDTH == 7)
- switch (clk) {
- case 114000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xff80);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10080000);
- break;
- case 114688:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfdf8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1020c49c);
- break;
- case 114750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfdd5);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10230000);
- break;
- case 115200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfcd7);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10333333);
- break;
- case 115260:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfcb5);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10355c29);
- break;
- case 115625:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfbe9);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10428000);
- break;
- case 116000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfb19);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10500000);
- break;
- case 116250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfa8e);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10590000);
- break;
- case 116736:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf983);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x106a7efa);
- break;
- case 116875:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd59d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x132cc000);
- break;
- case 117000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf8f3);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10740000);
- break;
- case 118125:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf694);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x109c8000);
- break;
- case 118650:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf57d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10af6666);
- break;
- case 118750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf548);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10b30000);
- break;
- case 118784:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf536);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10b43958);
- break;
- case 119808:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf31d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10d91687);
- break;
- case 120000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf2ba);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10e00000);
- break;
- case 120250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf239);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10e90000);
- break;
- case 120900:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf0eb);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11006666);
- break;
- case 121500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xefbb);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11160000);
- break;
- case 121875:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xeefe);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11238000);
- break;
- case 122040:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xeeab);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x112970a4);
- break;
- case 122880:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xed09);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1147ae14);
- break;
- case 123500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xebd9);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x115e0000);
- break;
- case 124000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xeae5);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11700000);
- break;
- case 124800:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe964);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x118ccccd);
- break;
- case 124875:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe940);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x118f8000);
- break;
- case 125000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe904);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11940000);
- break;
- case 125430:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe838);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11a37ae1);
- break;
- case 125550:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe7ff);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11a7cccd);
- break;
- case 126000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe72b);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11b80000);
- break;
- case 126750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe5cd);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11d30000);
- break;
- case 126976:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe564);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11db22d1);
- break;
- case 128000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe38e);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12000000);
- break;
- case 128250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe31d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12090000);
- break;
- case 128820:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe21b);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x121d851f);
- break;
- case 129024:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe1c0);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1224dd2f);
- break;
- case 129600:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe0bf);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1239999a);
- break;
- case 130000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe00e);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12480000);
- break;
- case 130200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xdfb6);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x124f3333);
- break;
- case 130500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xdf32);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x125a0000);
- break;
- case 131072:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xde39);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x126e978d);
- break;
- case 131250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xddec);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12750000);
- break;
- case 131625:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xdd4a);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12828000);
- break;
- case 132000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xdca9);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12900000);
- break;
- case 132210:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xdc4f);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12978f5c);
- break;
- case 134400:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd8b8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12e66666);
- break;
- case 134850:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd7ff);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12f6999a);
- break;
- case 135000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd7c2);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12fc0000);
- break;
- case 135168:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd77d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13020c4a);
- break;
- case 136000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd62c);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13200000);
- break;
- case 136500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd563);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13320000);
- break;
- case 139200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd13f);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13933333);
- break;
- case 139500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd0cc);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x139e0000);
- break;
- case 140000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd00d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13b00000);
- break;
- case 141750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xcd7b);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13ef0000);
- break;
- default:
- return BBM_NOK;
- }
- #else /* BBM_BAND_WIDTH == 8) */
- switch (clk) {
- case 130200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xffab);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10054ccd);
- break;
- case 130500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xff15);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x100ec000);
- break;
- case 130900:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xbeba);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1579cccd);
- break;
- case 131072:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfdf8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1020c49c);
- break;
- case 131250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfda0);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10266000);
- break;
- case 131625:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfce7);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10323000);
- break;
- case 132000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfc2f);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x103e0000);
- break;
- case 132210:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xfbc8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10449d71);
- break;
- case 134400:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf7ae);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1089999a);
- break;
- case 134850:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf6da);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1097c666);
- break;
- case 135000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf694);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x109c8000);
- break;
- case 135168:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf646);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10a1cac1);
- break;
- case 135600:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf57d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10af6666);
- break;
- case 136000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf4c4);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10bc0000);
- break;
- case 136500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf3de);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10cbc000);
- break;
- case 137500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf218);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10eb4000);
- break;
- case 138000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xf138);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x10fb0000);
- break;
- case 139200:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xef24);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1120cccd);
- break;
- case 139264:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xef07);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1122d0e5);
- break;
- case 139500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xeea0);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x112a4000);
- break;
- case 140000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xedc6);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x113a0000);
- break;
- case 141312:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xeb91);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x116353f8);
- break;
- case 141750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xead6);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11712000);
- break;
- case 142380:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe9cc);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1184f852);
- break;
- case 143000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe8c9);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11988000);
- break;
- case 143360:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe833);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11a3d70a);
- break;
- case 143750:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe792);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11b02000);
- break;
- case 144000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe72b);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11b80000);
- break;
- case 144150:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe6ed);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x11bcb99a);
- break;
- case 147456:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe1c0);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1224dd2f);
- break;
- case 148500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xe02a);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1245c000);
- break;
- case 149500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xdeaa);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12654000);
- break;
- case 150000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xddec);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12750000);
- break;
- case 152000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xdb00);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12b40000);
- break;
- case 153000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd992);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12d38000);
- break;
- case 153450:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd8ee);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12e1accd);
- break;
- case 153600:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd8b8);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x12e66666);
- break;
- case 156000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd563);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13320000);
- break;
- case 156250:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd50b);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x1339e000);
- break;
- case 157500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd35a);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13614000);
- break;
- case 158100:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd28d);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13742666);
- break;
- case 158400:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd227);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x137d999a);
- break;
- case 159744:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xd062);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13a7ef9e);
- break;
- case 162000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xcd7b);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13ef0000);
- break;
- case 162500:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xccda);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x13fec000);
- break;
- case 165888:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xc8ab);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x146978d5);
- break;
- case 169000:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xc4f9);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x14cb8000);
- break;
- case 172032:
- bbm_word_write(handle, devid, BBM_LOW_IF_VALUE, 0x0);
- bbm_long_write(handle, devid, BBM_FREQ_COMPEN_VAL0, 0xc180);
- bbm_long_write(handle, devid, BBM_NCO_OFFSET, 0x152b020c);
- break;
- default:
- return BBM_NOK;
- }
- #endif /* #if (BBM_BAND_WIDTH == 6) */
- return BBM_OK;
- }
- static s32 fc8300_set_default_core_clk(HANDLE handle, DEVICEID devid)
- {
- u16 pll_set = 0x1a11;
- #if (BBM_BAND_WIDTH == 6)
- if (bbm_xtal_freq == 16000)
- pll_set = 0x1711;
- else if (bbm_xtal_freq == 16384)
- pll_set = 0x1611;
- else if (bbm_xtal_freq == 18000)
- pll_set = 0x1411;
- else if (bbm_xtal_freq == 19200)
- pll_set = 0x1311;
- else if (bbm_xtal_freq == 24000)
- pll_set = 0x1f12;
- else if (bbm_xtal_freq == 24576)
- pll_set = 0x1e12;
- else if (bbm_xtal_freq == 26000)
- pll_set = 0x1d12;
- else if(bbm_xtal_freq == 27000)
- pll_set = 0x1b12;
- else if (bbm_xtal_freq == 27120)
- pll_set = 0x1b12;
- else if (bbm_xtal_freq == 32000)
- pll_set = 0x1712;
- else if (bbm_xtal_freq == 37200)
- pll_set = 0x1312;
- else if (bbm_xtal_freq == 37400)
- pll_set = 0x1312;
- else if (bbm_xtal_freq == 38400)
- pll_set = 0x1312;
- #elif (BBM_BAND_WIDTH == 7)
- if (bbm_xtal_freq == 16000)
- pll_set = 0x1b11;
- else if(bbm_xtal_freq == 16384)
- pll_set = 0x1a11;
- else if (bbm_xtal_freq == 18000)
- pll_set = 0x1811;
- else if (bbm_xtal_freq == 19200)
- pll_set = 0x1611;
- else if (bbm_xtal_freq == 24000)
- pll_set = 0x2412;
- else if (bbm_xtal_freq == 24576)
- pll_set = 0x2412;
- else if (bbm_xtal_freq == 26000)
- pll_set = 0x2212;
- else if (bbm_xtal_freq == 27000)
- pll_set = 0x2012;
- else if (bbm_xtal_freq == 27120)
- pll_set = 0x2012;
- else if (bbm_xtal_freq == 32000)
- pll_set = 0x1b12;
- else if (bbm_xtal_freq == 37200)
- pll_set = 0x1712;
- else if (bbm_xtal_freq == 37400)
- pll_set = 0x1712;
- else if (bbm_xtal_freq == 38400)
- pll_set = 0x1612;
- #else /* BBM_BAND_WIDTH == 8 */
- if (bbm_xtal_freq == 16000)
- pll_set = 0x1f11;
- else if (bbm_xtal_freq == 16384)
- pll_set = 0x1e11;
- else if (bbm_xtal_freq == 18000)
- pll_set = 0x1b11;
- else if(bbm_xtal_freq == 19200)
- pll_set = 0x1a11;
- else if (bbm_xtal_freq == 24000)
- pll_set = 0x1402;
- else if (bbm_xtal_freq == 24576)
- pll_set = 0x1402;
- else if (bbm_xtal_freq == 26000)
- pll_set = 0x1302;
- else if (bbm_xtal_freq == 27000)
- pll_set = 0x2512;
- else if (bbm_xtal_freq == 27120)
- pll_set = 0x2512;
- else if (bbm_xtal_freq == 32000)
- pll_set = 0x1f12;
- else if(bbm_xtal_freq == 37200)
- pll_set = 0x1a12;
- else if (bbm_xtal_freq == 37400)
- pll_set = 0x1a12;
- else if (bbm_xtal_freq == 38400)
- pll_set = 0x1a12;
- #endif /* BBM_BAND_WIDTH */
- bbm_byte_write(handle, devid, BBM_PLL_SEL, 0x00);
- bbm_byte_write(handle, devid, BBM_PLL1_RESET, 0x01);
- bbm_word_write(handle, devid, BBM_PLL1_PRE_POST_SELECTION, pll_set);
- bbm_byte_write(handle, devid, BBM_PLL1_RESET, 0x00);
- msWait(1);
- bbm_byte_write(handle, devid, BBM_PLL_SEL, 0x01);
- return fc8300_get_current_clk(handle, devid);
- }
- #ifdef BBM_I2C_TSIF
- static s32 fc8300_set_tsif_clk(HANDLE handle, DEVICEID devid)
- {
- bbm_byte_write(handle, devid, BBM_TS_CLK_DIV, 0x00);
- #ifdef BBM_TSIF_CLK_ARBITRARY
- u32 pre_sel, post_sel = 0, multi = 0, div_sel;
- u32 input_freq;
- u32 multi_3, multi_2, multi_1;
- if (bbm_xtal_freq <= 10000)
- pre_sel = 0;
- else if (bbm_xtal_freq <= 20000)
- pre_sel = 1;
- else if (bbm_xtal_freq <= 40000)
- pre_sel = 2;
- else
- pre_sel = 3;
- input_freq = bbm_xtal_freq >> pre_sel;
- multi_3 = (BBM_TSIF_CLK << 3) / input_freq;
- multi_2 = (BBM_TSIF_CLK << 2) / input_freq;
- multi_1 = (BBM_TSIF_CLK << 1) / input_freq;
- if (multi_3 >= 10 && multi_3 <= 40) {
- post_sel = 3;
- multi = multi_3;
- } else if (multi_2 >= 10 && multi_2 <= 40) {
- post_sel = 2;
- multi = multi_2;
- } else if (multi_1 >= 10 && multi_1 <= 40) {
- post_sel = 1;
- multi = multi_1;
- } else { /* post_sel == 0 */
- multi = BBM_TSIF_CLK / input_freq;
- }
- div_sel = multi - 2;
- /*pll_out = (input_freq * multi) >> post_sel;*/
- bbm_byte_write(handle, devid, BBM_PLL2_ENABLE, 0x01);
- bbm_byte_write(handle, devid, BBM_PLL2_PD, 0x00);
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION,
- (post_sel << 4) | pre_sel | (div_sel << 8));
- #else
- bbm_byte_write(handle, devid, BBM_PLL2_ENABLE, 0x01);
- bbm_byte_write(handle, devid, BBM_PLL2_PD, 0x00);
- #if (BBM_TSIF_CLK == 48000)
- if (bbm_xtal_freq == 16000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1621);
- else if (bbm_xtal_freq == 16384)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1521);
- else if (bbm_xtal_freq == 18000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1321);
- else if (bbm_xtal_freq == 19200)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1221);
- else if (bbm_xtal_freq == 24000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1e22);
- else if (bbm_xtal_freq == 24576)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1d22);
- else if (bbm_xtal_freq == 26000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1c22);
- else if (bbm_xtal_freq == 27000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1b22);
- else if (bbm_xtal_freq == 27120)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1a22);
- else if (bbm_xtal_freq == 32000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1622);
- else if (bbm_xtal_freq == 37200)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1322);
- else if (bbm_xtal_freq == 37400)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1322);
- else if (bbm_xtal_freq == 38400)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1222);
- #elif (BBM_TSIF_CLK == 32000)
- if (bbm_xtal_freq == 16000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0e21);
- else if (bbm_xtal_freq == 16384)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0e21);
- else if (bbm_xtal_freq == 18000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0c21);
- else if (bbm_xtal_freq == 19200)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0b21);
- else if (bbm_xtal_freq == 24000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1322);
- else if (bbm_xtal_freq == 24576)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1322);
- else if (bbm_xtal_freq == 26000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1222);
- else if (bbm_xtal_freq == 27000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1122);
- else if (bbm_xtal_freq == 27120)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x1122);
- else if (bbm_xtal_freq == 32000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0e22);
- else if (bbm_xtal_freq == 37200)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0c22);
- else if (bbm_xtal_freq == 37400)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0c22);
- else if (bbm_xtal_freq == 38400)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0b22);
- #else /* (BBM_TSIF_CLK == 26000) */
- if (bbm_xtal_freq == 16000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0b21);
- else if (bbm_xtal_freq == 16384)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0b21);
- else if (bbm_xtal_freq == 18000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0921);
- else if (bbm_xtal_freq == 19200)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0921);
- else if (bbm_xtal_freq == 24000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0f22);
- else if (bbm_xtal_freq == 24576)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0f22);
- else if (bbm_xtal_freq == 26000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0e22);
- else if (bbm_xtal_freq == 27000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0d22);
- else if (bbm_xtal_freq == 27120)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0d22);
- else if (bbm_xtal_freq == 32000)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0b22);
- else if (bbm_xtal_freq == 37200)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0922);
- else if (bbm_xtal_freq == 37400)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0922);
- else if (bbm_xtal_freq == 38400)
- bbm_word_write(handle, devid, BBM_PLL2_PRE_POST_SELECTION, 0x0922);
- #endif /* #if (BBM_TSIF_CLK == 48000) */
- #endif /* #ifdef BBM_TSIF_CLK_ARBITRARY */
- bbm_byte_write(handle, devid, BBM_PLL2_RESET, 0x00);
- return BBM_OK;
- }
- #endif /* #ifdef BBM_I2C_TSIF */
- s32 fc8300_reset(HANDLE handle, DEVICEID devid)
- {
- bbm_byte_write(handle, DIV_BROADCAST, BBM_SW_RESET, 0x7f);
- msWait(2);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_SW_RESET, 0xcf);
- msWait(2);
- bbm_byte_write(handle, DIV_MASTER, BBM_SW_RESET, 0xff);
- msWait(2);
- return BBM_OK;
- }
- s32 fc8300_probe(HANDLE handle, DEVICEID devid)
- {
- u16 ver;
- print_log(0," %s\n",__func__);
-
- bbm_word_read(handle, devid, BBM_CHIP_ID, &ver);
- return (ver == 0x8300) ? BBM_OK : BBM_NOK;
- }
- s32 fc8300_set_core_clk(HANDLE handle, DEVICEID devid,
- enum BROADCAST_TYPE broadcast, u32 freq)
- {
- u32 input_freq, new_pll_clk;
- u32 pre_sel, post_sel = 0, multi = 0, div_sel;
- u32 current_clk, new_clk, pll_set;
- u32 multi_3, multi_2, multi_1;
- s32 res = BBM_OK;
- current_clk = fc8300_get_current_clk(handle, devid);
- new_clk = fc8300_get_core_clk(handle, devid, broadcast, freq);
- if (new_clk == current_clk)
- return BBM_OK;
- if (bbm_xtal_freq <= 10000)
- pre_sel = 0;
- else if (bbm_xtal_freq <= 20000)
- pre_sel = 1;
- else if (bbm_xtal_freq <= 40000)
- pre_sel = 2;
- else
- pre_sel = 3;
- input_freq = bbm_xtal_freq >> pre_sel;
- multi_3 = (new_clk << 3) / input_freq;
- multi_2 = (new_clk << 2) / input_freq;
- multi_1 = (new_clk << 1) / input_freq;
- if (multi_3 >= 10 && multi_3 <= 40) {
- post_sel = 3;
- multi = multi_3;
- } else if (multi_2 >= 10 && multi_2 <= 40) {
- post_sel = 2;
- multi = multi_2;
- } else if (multi_1 >= 10 && multi_1 <= 40) {
- post_sel = 1;
- multi = multi_1;
- } else { /* post_sel == 0 */
- multi = new_clk / input_freq;
- }
- new_pll_clk = (input_freq * multi) >> post_sel;
- if (new_clk != new_pll_clk)
- return BBM_NOK;
- div_sel = multi - 2;
- bbm_byte_write(handle, devid, BBM_PLL_SEL, 0x00);
- bbm_byte_write(handle, devid, BBM_PLL1_RESET, 0x01);
- pll_set = (div_sel << 8) | (post_sel << 4) | pre_sel;
- bbm_word_write(handle, devid, BBM_PLL1_PRE_POST_SELECTION, pll_set);
- bbm_byte_write(handle, devid, BBM_PLL1_RESET, 0x00);
- msWait(1);
- bbm_byte_write(handle, devid, BBM_PLL_SEL, 0x01);
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBTMM_1SEG:
- case ISDBTSB_1SEG:
- case ISDBT_CATV_1SEG:
- res |= fc8300_set_cal_front_1seg(handle, devid, new_clk);
- break;
- case ISDBTSB_3SEG:
- res |= fc8300_set_cal_front_3seg(handle, devid, new_clk);
- break;
- case ISDBT_13SEG:
- case ISDBTMM_13SEG:
- case ISDBT_CATV_13SEG:
- res |= fc8300_set_cal_front_13seg(handle, devid, new_clk);
- break;
- }
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBT_CATV_1SEG:
- res |= fc8300_set_acif_b31_1seg(handle, devid, new_clk);
- break;
- case ISDBTMM_1SEG:
- case ISDBTSB_1SEG:
- res |= fc8300_set_acif_1seg(handle, devid, new_clk);
- break;
- case ISDBTSB_3SEG:
- res |= fc8300_set_acif_3seg(handle, devid, new_clk);
- break;
- case ISDBT_13SEG:
- case ISDBTMM_13SEG:
- case ISDBT_CATV_13SEG:
- res |= fc8300_set_acif_13seg(handle, devid, new_clk);
- break;
- }
- return res;
- }
- s32 fc8300_init(HANDLE handle, DEVICEID devid)
- {
- #if defined(BBM_4_DIVERSITY) /* Don't change following lines */
- bbm_byte_write(handle, DIV_MASTER, BBM_XTAL_OUTBUF_EN, 0x01);
- msWait(1);
- bbm_byte_write(handle, DIV_SLAVE2, BBM_XTAL_OUTBUF_EN, 0x01);
- msWait(1);
- bbm_byte_write(handle, DIV_SLAVE1, BBM_XTAL_OUTBUF_EN, 0x01);
- msWait(1);
- #ifdef BBM_I2C_TSIF
- #ifdef BBM_TS_204
- bbm_byte_write(handle, DIV_MASTER, BBM_TS_SEL, 0xc0);
- #else
- bbm_byte_write(handle, DIV_MASTER, BBM_TS_SEL, 0x80);
- #endif /* #ifdef BBM_TS_204 */
- #endif /* #ifdef BBM_I2C_TSIF */
- #else
- #ifdef BBM_I2C_TSIF
- #ifdef BBM_TS_204
- bbm_byte_write(handle, DIV_MASTER, BBM_TS_SEL, 0xc0);
- #else
- bbm_byte_write(handle, DIV_MASTER, BBM_TS_SEL, 0x80);
- #endif /* #ifdef BBM_TS_204 */
- #endif /* #ifdef BBM_I2C_TSIF */
- #if defined(BBM_2_DIVERSITY)
- bbm_byte_write(handle, DIV_MASTER, BBM_XTAL_OUTBUF_EN, 0x01);
- msWait(1);
- #endif /* #ifdef BBM_2_DIVERSITY */
- #endif
- if (bbm_xtal_freq < 30000)
- bbm_byte_write(handle, DIV_BROADCAST, BBM_FUSELOAD, 0x03);
- else
- bbm_byte_write(handle, DIV_BROADCAST, BBM_FUSELOAD, 0x07);
- msWait(1);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_FUSELOAD, 0x00);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_PLL1_ENABLE, 0x01);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_PLL1_PD, 0x00);
- fc8300_set_default_core_clk(handle, DIV_BROADCAST);
- #ifdef BBM_I2C_TSIF
- fc8300_set_tsif_clk(handle, DIV_MASTER);
- #endif
- #ifdef BBM_2_DIVERSITY
- bbm_byte_write(handle, DIV_MASTER, BBM_DIVERSITY_DEVICE_SEL, 0x01);
- bbm_byte_write(handle, DIV_MASTER, BBM_DIVERSITY_MODE, 0x00);
- bbm_byte_write(handle, DIV_SLAVE0, BBM_DIVERSITY_DEVICE_SEL, 0x02);
- bbm_byte_write(handle, DIV_SLAVE0, BBM_DIVERSITY_MODE, 0x01);
- bbm_byte_write(handle, DIV_SLAVE0, BBM_RESYNC_ENABLE, 0x8f);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_DIVERSITY_EN, 0x21);
- bbm_byte_write(handle, DIV_SLAVE0, BBM_RESTART_BY_TS_EN, 0x00);
- #endif /* BBM_2_DIVERSITY */
- #ifdef BBM_4_DIVERSITY /* I2C+TSIF or I2C+SPI */
- bbm_byte_write(handle, DIV_MASTER, BBM_DIVERSITY_DEVICE_SEL, 0x01);
- bbm_byte_write(handle, DIV_MASTER, BBM_DIVERSITY_MODE, 0x00);
- /* end slave */
- bbm_byte_write(handle, DIV_SLAVE0, BBM_DIVERSITY_DEVICE_SEL, 0x02);
- bbm_byte_write(handle, DIV_SLAVE0, BBM_DIVERSITY_MODE, 0x03);
- bbm_byte_write(handle, DIV_SLAVE0, BBM_RESYNC_ENABLE, 0x8f);
- /* 2nd slave */
- bbm_byte_write(handle, DIV_SLAVE1, BBM_DIVERSITY_DEVICE_SEL, 0x03);
- bbm_byte_write(handle, DIV_SLAVE1, BBM_DIVERSITY_MODE, 0x02);
- bbm_byte_write(handle, DIV_SLAVE1, BBM_RESYNC_ENABLE, 0x8f);
- bbm_word_write(handle, DIV_SLAVE1, BBM_D_SYNC_TIME_OUT_TH, 0x0100);
- /* 1st slave */
- bbm_byte_write(handle, DIV_SLAVE2, BBM_DIVERSITY_DEVICE_SEL, 0x03);
- bbm_byte_write(handle, DIV_SLAVE2, BBM_DIVERSITY_MODE, 0x01);
- bbm_byte_write(handle, DIV_SLAVE2, BBM_RESYNC_ENABLE, 0x8f);
- bbm_word_write(handle, DIV_SLAVE2, BBM_D_SYNC_TIME_OUT_TH, 0x0200);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_DIVERSITY_EN, 0x41);
- bbm_byte_write(handle, DIV_SLAVE0, BBM_RESTART_BY_TS_EN, 0x00);
- bbm_byte_write(handle, DIV_SLAVE1, BBM_RESTART_BY_TS_EN, 0x00);
- bbm_byte_write(handle, DIV_SLAVE2, BBM_RESTART_BY_TS_EN, 0x00);
- #endif /* BBM_4_DIVERSITY */
- fc8300_reset(handle, DIV_BROADCAST);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_ADC_PWRDN, 0x00);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_ADC_RST, 0x00);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_ADC_BIAS, 0x06);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_BB2RF_RFEN, 0x01);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_RF_RST, 0x00);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_RF_POWER_SAVE, 0x00);
- bbm_long_write(handle, DIV_BROADCAST, BBM_MEMORY_RWM0, 0x07777777);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_IQC_EN, 0x71);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_CSF_GAIN_MAX, 0x0a);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_ADC_CTRL, 0x27);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_PSAT_ON_REF_1SEG_QPSK, 0x16);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_PSAT_ON_REF_1SEG_16QAM, 0x16);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_HOLD_RST_EN, 0x06);
- bbm_word_write(handle, DIV_BROADCAST, BBM_REF_DELAY_POST, 0x1900);
- bbm_word_write(handle, DIV_BROADCAST, BBM_REF_AMP, 0x03e0);
- bbm_word_write(handle, DIV_BROADCAST, BBM_AD_GAIN_PERIOD, 0x003f);
- bbm_word_write(handle, DIV_BROADCAST, BBM_FD_RD_LATENCY_1SEG, 0x0620);
- bbm_byte_write(handle, DIV_MASTER, BBM_FD_OUT_MODE, 0x02);
- bbm_byte_write(handle, DIV_MASTER, BBM_DIV_START_MODE, 0x16);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_TS0_START, TS0_BUF_START);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_TS0_END, TS0_BUF_END);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_TS0_THR, TS0_BUF_THR);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_AC_A_START,
- AC_A_BUF_START);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_AC_A_END, AC_A_BUF_END);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_AC_A_THR, AC_A_BUF_THR);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_AC_B_START,
- AC_B_BUF_START);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_AC_B_END, AC_B_BUF_END);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_AC_B_THR, AC_B_BUF_THR);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_AC_C_START,
- AC_C_BUF_START);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_AC_C_END, AC_C_BUF_END);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_AC_C_THR, AC_C_BUF_THR);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_AC_D_START,
- AC_D_BUF_START);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_AC_D_END, AC_D_BUF_END);
- bbm_word_write(handle, DIV_BROADCAST, BBM_BUF_AC_D_THR, AC_D_BUF_THR);
- #ifdef BBM_I2C_SPI
- bbm_byte_write(handle, DIV_MASTER, BBM_BUF_SPIOUT, 0x10);
- #endif
- #ifdef BBM_I2C_PARALLEL_TSIF
- bbm_byte_write(handle, DIV_MASTER, BBM_TS_CTRL, 0x8e);
- #endif
- #ifdef BBM_AUX_INT
- bbm_byte_write(handle, DIV_MASTER, BBM_SYS_MD_INT_EN, 0x7f);
- bbm_byte_write(handle, DIV_MASTER, BBM_AUX_INT_EN, 0xff);
- bbm_byte_write(handle, DIV_MASTER, BBM_FEC_INT_EN, 0x07);
- bbm_byte_write(handle, DIV_MASTER, BBM_BER_AUTO_UP, 0xff);
- bbm_byte_write(handle, DIV_MASTER, BBM_OSS_CFG_EN, 0x01);
- #endif
- #ifdef BBM_NULL_PID_FILTER
- bbm_byte_write(handle, DIV_MASTER, BBM_NULL_PID_FILTERING, 0x01);
- #endif
- #ifdef BBM_FAIL_FRAME
- bbm_byte_write(handle, DIV_MASTER, BBM_FAIL_FRAME_TX, 0x07);
- #endif
- #ifdef BBM_TS_204
- bbm_byte_write(handle, DIV_MASTER, BBM_FEC_CTRL_A, 0x03);
- bbm_byte_write(handle, DIV_MASTER, BBM_FEC_CTRL_B, 0x03);
- bbm_byte_write(handle, DIV_MASTER, BBM_FEC_CTRL_C, 0x03);
- bbm_byte_write(handle, DIV_MASTER, BBM_FEC_CTRL, 0x03);
- #endif
- bbm_byte_write(handle, DIV_BROADCAST, BBM_FAIP_MTD_SR_SHIFT_VALUE, 0x10);
- bbm_byte_write(handle, DIV_BROADCAST, BBM_CIR_THR_23, 0x02);
- #ifdef BBM_INT_LOW_ACTIVE
- bbm_byte_write(handle, DIV_BROADCAST, BBM_INT_POLAR_SEL, 0x00);
- #endif
- #ifdef BBM_SPI_30M
- bbm_byte_write(handle, DIV_BROADCAST, BBM_MD_MISO, 0x1f);
- #endif
- #ifdef BBM_DESCRAMBLER
- bbm_byte_write(handle, DIV_BROADCAST, BBM_BCAS_ENABLE, 0x01);
- #else
- bbm_byte_write(handle, DIV_BROADCAST, BBM_BCAS_ENABLE, 0x00);
- #endif
- bbm_word_write(handle, DIV_BROADCAST, 0x30b6, 0x0500);
- bbm_byte_write(handle, DIV_BROADCAST, 0x30b8, 0x0f);
- bbm_byte_write(handle, DIV_MASTER, BBM_INT_AUTO_CLEAR, 0x01);
- bbm_byte_write(handle, DIV_MASTER, BBM_BUF_ENABLE, 0x01);
- bbm_byte_write(handle, DIV_MASTER, BBM_BUF_INT_ENABLE, 0x01);
- bbm_byte_write(handle, DIV_MASTER, BBM_INT_MASK, 0x01);
- bbm_byte_write(handle, DIV_MASTER, BBM_INT_STS_EN, 0x01);
- return BBM_OK;
- }
- s32 fc8300_deinit(HANDLE handle, DEVICEID devid)
- {
- #ifdef BBM_I2C_TSIF
- bbm_byte_write(handle, DIV_MASTER, BBM_TS_SEL, 0x00);
- msWait(24);
- #endif
- bbm_byte_write(handle, devid, BBM_SW_RESET, 0x00);
- return BBM_OK;
- }
- #if defined(BBM_2_DIVERSITY) || defined(BBM_4_DIVERSITY)
- s32 fc8300_scan_status(HANDLE handle, DEVICEID devid)
- {
- u32 ifagc_timeout = 70;
- u32 ofdm_timeout = 160;
- u32 ffs_lock_timeout = 100;
- u32 cfs_timeout = 120;
- u32 tmcc_timeout = 1050;
- u32 ts_err_free_timeout = 0;
- u32 data = 0;
- u8 a, run;
- u32 i;
- #ifdef BBM_2_DIVERSITY
- u8 done = 0x03;
- #else
- u8 done = 0x0f;
- #endif
- print_log(0,"ISDBT fc8300_scan_status BBM_2_DIVERSITY\n");
- for (i = 0; i < ifagc_timeout; i++) {
- bbm_byte_read(handle, DIV_MASTER, 0x3025, &a);
- if (a & 0x01)
- break;
- bbm_byte_read(handle, DIV_SLAVE0, 0x3025, &a);
- if (a & 0x01)
- break;
- #ifdef BBM_4_DIVERSITY
- bbm_byte_read(handle, DIV_SLAVE1, 0x3025, &a);
- if (a & 0x01)
- break;
- bbm_byte_read(handle, DIV_SLAVE2, 0x3025, &a);
- if (a & 0x01)
- break;
- #endif
- msWait(SCAN_CHK_PERIOD);
- }
- if (i == ifagc_timeout)
- return BBM_NOK;
- for (run = done; i < ofdm_timeout; i++) {
- if (run & 0x01) {
- bbm_byte_read(handle, DIV_MASTER, 0x3025, &a);
- if (a & 0x08) {
- if (a & 0x04)
- break;
- run -= 0x01; /* master done */
- }
- }
- if (run & 0x02) {
- bbm_byte_read(handle, DIV_SLAVE0, 0x3025, &a);
- if (a & 0x08) {
- if (a & 0x04)
- break;
- run -= 0x02; /* slave0 done */
- }
- }
- #ifdef BBM_4_DIVERSITY
- if (run & 0x04) {
- bbm_byte_read(handle, DIV_SLAVE1, 0x3025, &a);
- if (a & 0x08) {
- if (a & 0x04)
- break;
- run -= 0x04; /* slave1 done */
- }
- }
- if (run & 0x08) {
- bbm_byte_read(handle, DIV_SLAVE2, 0x3025, &a);
- if (a & 0x08) {
- if (a & 0x04)
- break;
- run -= 0x08; /* slave2 done */
- }
- }
- #endif
- if (run == 0)
- return BBM_NOK;
- msWait(SCAN_CHK_PERIOD);
- }
- if (i == ofdm_timeout)
- return BBM_NOK;
- for (; i < ffs_lock_timeout; i++) {
- bbm_byte_read(handle, DIV_MASTER, 0x3026, &a);
- if ((a & 0x11) == 0x11)
- break;
- bbm_byte_read(handle, DIV_SLAVE0, 0x3026, &a);
- if ((a & 0x11) == 0x11)
- break;
- #ifdef BBM_4_DIVERSITY
- bbm_byte_read(handle, DIV_SLAVE1, 0x3026, &a);
- if ((a & 0x11) == 0x11)
- break;
- bbm_byte_read(handle, DIV_SLAVE2, 0x3026, &a);
- if ((a & 0x11) == 0x11)
- break;
- #endif
- msWait(SCAN_CHK_PERIOD);
- }
- if (i == ffs_lock_timeout)
- return BBM_NOK;
- for (i = 0, run = done; i < cfs_timeout; i++) {
- if (run & 0x01) {
- bbm_byte_read(handle, DIV_MASTER, 0x3025, &a);
- if (a & 0x40) {
- bbm_byte_read(handle, DIV_MASTER, 0x2023, &a);
- if ((a & 0x01) == 0x00)
- break;
- run -= 0x01; /* master done */
- }
- }
- if (run & 0x02) {
- bbm_byte_read(handle, DIV_SLAVE0, 0x3025, &a);
- if (a & 0x40) {
- bbm_byte_read(handle, DIV_SLAVE0, 0x2023, &a);
- if ((a & 0x01) == 0x00)
- break;
- run -= 0x02; /* slave0 done */
- }
- }
- #ifdef BBM_4_DIVERSITY
- if (run & 0x04) {
- bbm_byte_read(handle, DIV_SLAVE1, 0x3025, &a);
- if (a & 0x40) {
- bbm_byte_read(handle, DIV_SLAVE1, 0x2023, &a);
- if ((a & 0x01) == 0x00)
- break;
- run -= 0x04; /* slave1 done */
- }
- }
- if (run & 0x08) {
- bbm_byte_read(handle, DIV_SLAVE2, 0x3025, &a);
- if (a & 0x40) {
- bbm_byte_read(handle, DIV_SLAVE2, 0x2023, &a);
- if ((a & 0x01) == 0x00)
- break;
- run -= 0x08; /* slave2 done */
- }
- }
- #endif
- if (run == 0)
- return BBM_NOK;
- msWait(SCAN_CHK_PERIOD);
- }
- if (i == cfs_timeout)
- return BBM_NOK;
- for (i = 0; i < tmcc_timeout; i++) {
- bbm_byte_read(handle, DIV_MASTER, 0x3026, &a);
- if (a & 0x02) {
- bbm_long_read(handle, DIV_MASTER, 0x4113, &data);
- break;
- }
- bbm_byte_read(handle, DIV_SLAVE0, 0x3026, &a);
- if (a & 0x02) {
- bbm_long_read(handle, DIV_SLAVE0, 0x4113, &data);
- break;
- }
- #ifdef BBM_4_DIVERSITY
- bbm_byte_read(handle, DIV_SLAVE1, 0x3026, &a);
- if (a & 0x02) {
- bbm_long_read(handle, DIV_SLAVE1, 0x4113, &data);
- break;
- }
- bbm_byte_read(handle, DIV_SLAVE2, 0x3026, &a);
- if (a & 0x02) {
- bbm_long_read(handle, DIV_SLAVE2, 0x4113, &data);
- break;
- }
- #endif
- msWait(SCAN_CHK_PERIOD);
- }
- if (i == tmcc_timeout)
- return BBM_NOK;
- ts_err_free_timeout = 950;
- switch (broadcast_type) {
- case ISDBT_1SEG:
- if ((data & 0x00000008) == 0x00000000)
- return BBM_NOK;
- if ((data & 0x00001c70) == 0x00001840)
- ts_err_free_timeout = 700;
- break;
- case ISDBTMM_1SEG:
- if ((data & 0x00001c70) == 0x00001820)
- ts_err_free_timeout = 700;
- break;
- case ISDBTSB_1SEG:
- break;
- case ISDBTSB_3SEG:
- break;
- case ISDBT_13SEG:
- if ((data & 0x3f8e1c78) == 0x0d0c1848)
- ts_err_free_timeout = 700;
- break;
- case ISDBTMM_13SEG:
- if ((data & 0x3f8e1c78) == 0x0f041828)
- ts_err_free_timeout = 700;
- break;
- case ISDBT_CATV_13SEG:
- if ((data & 0x3f8e1c78) == 0x0d0c1848)
- ts_err_free_timeout = 700;
- break;
- case ISDBT_CATV_1SEG:
- if ((data & 0x00000008) == 0x00000000)
- return BBM_NOK;
- if ((data & 0x00001c70) == 0x00001840)
- ts_err_free_timeout = 700;
- break;
- default:
- break;
- }
- for (i = 0; i < ts_err_free_timeout; i++) {
- bbm_byte_read(handle, DIV_MASTER, 0x50c5, &a);
- if (a)
- break;
- msWait(SCAN_CHK_PERIOD);
- }
- if (i == ts_err_free_timeout)
- return BBM_NOK;
- return BBM_OK;
- }
- #else /* SINGLE */
- s32 fc8300_scan_status(HANDLE handle, DEVICEID devid)
- {
- u32 ifagc_timeout = 70;
- u32 ofdm_timeout = 160;
- u32 ffs_lock_timeout = 100;
- u32 cfs_timeout = 120;
- u32 tmcc_timeout = 1050;
- u32 ts_err_free_timeout = 0;
- u32 data = 0;
- u8 a;
- u32 i;
- pr_info("ISDBT fc8300_scan_status \n");
- for (i = 0; i < ifagc_timeout; i++) {
- bbm_byte_read(handle, DIV_MASTER, 0x3025, &a);
- if (a & 0x01)
- break;
- msWait(SCAN_CHK_PERIOD);
- }
- if (i == ifagc_timeout)
- {
- pr_info("ifagc_timeout returning error\n");
- return BBM_NOK;
- }
- for (; i < ofdm_timeout; i++) {
- bbm_byte_read(handle, DIV_MASTER, 0x3025, &a);
- pr_debug("ofdm loop: a=0x%x\n",a);
- if (a & 0x08)
- break;
- msWait(SCAN_CHK_PERIOD);
- }
- if (i == ofdm_timeout)
- {
- pr_info("ISDBT ofdm_timeout \n");
- return BBM_NOK;
- }
- if (0 == (a & 0x04))
- return BBM_NOK;
- for (; i < ffs_lock_timeout; i++) {
- bbm_byte_read(handle, DIV_MASTER, 0x3026, &a);
- pr_debug("ffs loop: a=0x%x\n",a);
- if ((a & 0x11) == 0x11)
- break;
- msWait(SCAN_CHK_PERIOD);
- }
- if (i == ffs_lock_timeout)
- {
- pr_info("ISDBT ffs_lock_timeout \n");
- return BBM_NOK;
- }
- for (i = 0; i < cfs_timeout; i++) {
- bbm_byte_read(handle, DIV_MASTER, 0x3025, &a);
- pr_debug("cfs loop: a=0x%x\n",a);
- if (a & 0x40)
- break;
- msWait(SCAN_CHK_PERIOD);
- }
- if (i == cfs_timeout)
- {
- pr_info("ISDBT cfs_timeout \n");
- return BBM_NOK;
- }
- bbm_byte_read(handle, DIV_MASTER, 0x2023, &a);
- if (a & 0x01)
- {
- pr_debug("ISDBT a & 0x01 = 1 return BBM_NOK \n");
- return BBM_NOK;
- }
- for (i = 0; i < tmcc_timeout; i++) {
- bbm_byte_read(handle, DIV_MASTER, 0x3026, &a);
- pr_debug("tmcc loop: a=0x%x\n",a);
- if (a & 0x02)
- break;
- msWait(SCAN_CHK_PERIOD);
- }
- if (i == tmcc_timeout)
- {
- pr_info("ISDBT tmcc_timeout \n");
- return BBM_NOK;
- }
- ts_err_free_timeout = 950;
- switch (broadcast_type) {
- case ISDBT_1SEG:
- bbm_word_read(handle, DIV_MASTER, 0x4113, (u16 *) &data);
- print_log(0,"ISDBT_1SEG\n");
- if ((data & 0x0008) == 0x0000)
- return BBM_NOK;
- if ((data & 0x1c70) == 0x1840)
- ts_err_free_timeout = 700;
- break;
- case ISDBTMM_1SEG:
- print_log(0,"ISDBTMM_1SEG\n");
- bbm_word_read(handle, DIV_MASTER, 0x4113, (u16 *) &data);
- if ((data & 0x1c70) == 0x1820)
- ts_err_free_timeout = 700;
- break;
- case ISDBTSB_1SEG:
- break;
- case ISDBTSB_3SEG:
- break;
- case ISDBT_13SEG:
- bbm_long_read(handle, DIV_MASTER, 0x4113, &data);
- if ((data & 0x3f8e1c78) == 0x0d0c1848)
- ts_err_free_timeout = 700;
- break;
- case ISDBTMM_13SEG:
- bbm_long_read(handle, DIV_MASTER, 0x4113, &data);
- if ((data & 0x3f8e1c78) == 0x0f041828)
- ts_err_free_timeout = 700;
- break;
- case ISDBT_CATV_13SEG:
- bbm_long_read(handle, DIV_MASTER, 0x4113, &data);
- if ((data & 0x3f8e1c78) == 0x0d0c1848)
- ts_err_free_timeout = 700;
- break;
- case ISDBT_CATV_1SEG:
- bbm_word_read(handle, DIV_MASTER, 0x4113, (u16 *) &data);
- if ((data & 0x0008) == 0x0000)
- return BBM_NOK;
- if ((data & 0x1c70) == 0x1840)
- ts_err_free_timeout = 700;
- break;
- default:
- break;
- }
- for (i = 0; i < ts_err_free_timeout; i++) {
- bbm_byte_read(handle, DIV_MASTER, 0x50c5, &a);
- pr_debug( "ts-err loop: a=0x%x\n",a);
- if (a)
- break;
- msWait(SCAN_CHK_PERIOD);
- }
- if (i == ts_err_free_timeout)
- {
- pr_info("ISDBT ts_err_free_timeout\n");
- return BBM_NOK;
- }
- return BBM_OK;
- }
- #endif /* #if defined(BBM_2_DIVERSITY) || defined(BBM_4_DIVERSITY) */
- s32 fc8300_set_broadcast_mode(HANDLE handle, DEVICEID devid,
- enum BROADCAST_TYPE broadcast)
- {
- s32 res = BBM_OK;
- u32 clk = fc8300_set_default_core_clk(handle, devid);
- broadcast_type = broadcast;
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBTMM_1SEG:
- case ISDBTSB_1SEG:
- case ISDBT_CATV_1SEG:
- res |= fc8300_set_cal_front_1seg(handle, devid, clk);
- break;
- case ISDBTSB_3SEG:
- res |= fc8300_set_cal_front_3seg(handle, devid, clk);
- break;
- case ISDBT_13SEG:
- case ISDBTMM_13SEG:
- case ISDBT_CATV_13SEG:
- res |= fc8300_set_cal_front_13seg(handle, devid, clk);
- break;
- }
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBT_CATV_1SEG:
- res |= fc8300_set_acif_b31_1seg(handle, devid, clk);
- break;
- case ISDBTMM_1SEG:
- case ISDBTSB_1SEG:
- res |= fc8300_set_acif_1seg(handle, devid, clk);
- break;
- case ISDBTSB_3SEG:
- res |= fc8300_set_acif_3seg(handle, devid, clk);
- break;
- case ISDBT_13SEG:
- case ISDBTMM_13SEG:
- case ISDBT_CATV_13SEG:
- res |= fc8300_set_acif_13seg(handle, devid, clk);
- break;
- }
- /* system mode */
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBT_CATV_1SEG:
- bbm_byte_write(handle, devid, BBM_CLK_CTRL, 0x05);
- bbm_byte_write(handle, devid, BBM_SYSTEM_MODE, 0x01);
- break;
- case ISDBT_13SEG:
- case ISDBT_CATV_13SEG:
- bbm_byte_write(handle, devid, BBM_CLK_CTRL, 0x07);
- bbm_byte_write(handle, devid, BBM_SYSTEM_MODE, 0x00);
- break;
- case ISDBTMM_1SEG:
- bbm_byte_write(handle, devid, BBM_CLK_CTRL, 0x05);
- bbm_byte_write(handle, devid, BBM_SYSTEM_MODE, 0x02);
- break;
- case ISDBTMM_13SEG:
- bbm_byte_write(handle, devid, BBM_CLK_CTRL, 0x07);
- bbm_byte_write(handle, devid, BBM_SYSTEM_MODE, 0x00);
- break;
- case ISDBTSB_1SEG:
- bbm_byte_write(handle, devid, BBM_CLK_CTRL, 0x05);
- bbm_byte_write(handle, devid, BBM_SYSTEM_MODE, 0x02);
- break;
- case ISDBTSB_3SEG:
- bbm_byte_write(handle, devid, BBM_CLK_CTRL, 0x06);
- bbm_byte_write(handle, devid, BBM_SYSTEM_MODE, 0x03);
- break;
- }
- /* pre-run */
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBT_CATV_1SEG:
- bbm_long_write(handle, devid, BBM_MAN_PARTIAL_EN, 0x000c0101);
- bbm_long_write(handle, devid, BBM_MAN_LAYER_A_MOD_TYPE,
- 0x01000301);
- bbm_long_write(handle, devid, BBM_MAN_LAYER_B_CODE_RATE,
- 0x02030002);
- bbm_byte_write(handle, devid, BBM_MAN_LAYER_C_TI_LENGTH, 0x00);
- bbm_word_write(handle, devid, BBM_TDI_PRE_A, 0xc213);
- bbm_byte_write(handle, devid, BBM_TDI_PRE_C, 0x03);
- bbm_byte_write(handle, devid, BBM_FEC_LAYER, 0x01);
- break;
- case ISDBT_13SEG:
- case ISDBT_CATV_13SEG:
- bbm_long_write(handle, devid, BBM_MAN_PARTIAL_EN, 0x000C0101);
- bbm_long_write(handle, devid, BBM_MAN_LAYER_A_MOD_TYPE,
- 0x01000301);
- bbm_long_write(handle, devid, BBM_MAN_LAYER_B_CODE_RATE,
- 0x02030002);
- bbm_byte_write(handle, devid, BBM_MAN_LAYER_C_TI_LENGTH, 0x00);
- bbm_word_write(handle, devid, BBM_TDI_PRE_A, 0xC21B);
- bbm_byte_write(handle, devid, BBM_TDI_PRE_C, 0x03);
- bbm_byte_write(handle, devid, BBM_FEC_LAYER, 0x02);
- break;
- case ISDBTMM_1SEG:
- bbm_long_write(handle, devid, BBM_MAN_PARTIAL_EN, 0x000C0101);
- bbm_long_write(handle, devid, BBM_MAN_LAYER_A_MOD_TYPE,
- 0x00000202);
- bbm_long_write(handle, devid, BBM_MAN_LAYER_B_CODE_RATE,
- 0x03030000);
- bbm_byte_write(handle, devid, BBM_MAN_LAYER_C_TI_LENGTH, 0x00);
- bbm_word_write(handle, devid, BBM_TDI_PRE_A, 0xCB13);
- bbm_byte_write(handle, devid, BBM_TDI_PRE_C, 0x03);
- bbm_byte_write(handle, devid, BBM_FEC_LAYER, 0x01);
- break;
- case ISDBTMM_13SEG:
- bbm_long_write(handle, devid, BBM_MAN_PARTIAL_EN, 0x000C0101);
- bbm_long_write(handle, devid, BBM_MAN_LAYER_A_MOD_TYPE,
- 0x00000202);
- bbm_long_write(handle, devid, BBM_MAN_LAYER_B_CODE_RATE,
- 0x03030000);
- bbm_byte_write(handle, devid, BBM_MAN_LAYER_C_TI_LENGTH, 0x00);
- bbm_word_write(handle, devid, BBM_TDI_PRE_A, 0xCB1B);
- bbm_byte_write(handle, devid, BBM_TDI_PRE_C, 0x03);
- bbm_byte_write(handle, devid, BBM_FEC_LAYER, 0x02);
- break;
- case ISDBTSB_1SEG:
- bbm_long_write(handle, devid, BBM_MAN_PARTIAL_EN, 0x00020101);
- bbm_long_write(handle, devid, BBM_MAN_LAYER_A_MOD_TYPE,
- 0x00000202);
- bbm_long_write(handle, devid, BBM_MAN_LAYER_B_CODE_RATE,
- 0x03030000);
- bbm_byte_write(handle, devid, BBM_MAN_LAYER_C_TI_LENGTH, 0x00);
- bbm_word_write(handle, devid, BBM_TDI_PRE_A, 0x2313);
- bbm_byte_write(handle, devid, BBM_TDI_PRE_C, 0x03);
- bbm_byte_write(handle, devid, BBM_FEC_LAYER, 0x01);
- break;
- case ISDBTSB_3SEG:
- bbm_long_write(handle, devid, BBM_MAN_PARTIAL_EN, 0x00020101);
- bbm_long_write(handle, devid, BBM_MAN_LAYER_A_MOD_TYPE,
- 0x00000202);
- bbm_long_write(handle, devid, BBM_MAN_LAYER_B_CODE_RATE,
- 0x03030000);
- bbm_byte_write(handle, devid, BBM_MAN_LAYER_C_TI_LENGTH, 0x00);
- bbm_word_write(handle, devid, BBM_TDI_PRE_A, 0x2313);
- bbm_byte_write(handle, devid, BBM_TDI_PRE_C, 0x03);
- bbm_byte_write(handle, devid, BBM_FEC_LAYER, 0x02);
- break;
- }
- if (broadcast == ISDBT_13SEG || broadcast == ISDBTMM_13SEG ||
- broadcast == ISDBT_CATV_13SEG)
- bbm_byte_write(handle, devid, BBM_IIFOECFG_EARLYSTOP_THM, 0x18);
- else
- bbm_byte_write(handle, devid, BBM_IIFOECFG_EARLYSTOP_THM, 0x0e);
- switch (broadcast) {
- case ISDBT_1SEG:
- case ISDBTMM_1SEG:
- case ISDBTSB_1SEG:
- case ISDBT_CATV_1SEG:
- bbm_word_write(handle, devid, BBM_MSNR_FREQ_S_POW_MAN_VALUE3,
- 0xb00f);
- break;
- case ISDBTSB_3SEG:
- bbm_word_write(handle, devid, BBM_MSNR_FREQ_S_POW_MAN_VALUE3,
- 0x3030);
- break;
- case ISDBT_13SEG:
- case ISDBTMM_13SEG:
- case ISDBT_CATV_13SEG:
- bbm_word_write(handle, devid, BBM_MSNR_FREQ_S_POW_MAN_VALUE3,
- 0x00c3);
- break;
- }
- switch (broadcast) {
- case ISDBTMM_1SEG:
- case ISDBTMM_13SEG:
- bbm_byte_write(handle, devid, BBM_ECHOC_EN, 0x00);
- break;
- default:
- bbm_byte_write(handle, devid, BBM_ECHOC_EN, 0x01);
- break;
- }
- switch (broadcast) {
- case ISDBT_CATV_13SEG:
- case ISDBT_CATV_1SEG:
- bbm_byte_write(handle, DIV_BROADCAST, BBM_PGA_GAIN_MAX, 0x00);
- break;
- default:
- bbm_byte_write(handle, DIV_BROADCAST, BBM_PGA_GAIN_MAX, 0x0c);
- break;
- }
- return res;
- }
|