1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952 |
- /**
- * @file csl_srioAux.h
- *
- * @brief
- * This is the SRIO Auxilary Header File which exposes the various
- * CSL Functional Layer API's to configure the SRIO Module.
- *
- * \par
- * ============================================================================
- * @n (C) Copyright 2008-2011, Texas Instruments, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of Texas Instruments Incorporated nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
- #ifndef CSL_SRIOAUX_H_
- #define CSL_SRIOAUX_H_
- #include <ti/csl/soc.h>
- #include <ti/csl/csl_srio.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- /** @addtogroup CSL_SRIO_FUNCTION
- @{ */
- /** ============================================================================
- * @n@b CSL_SRIO_GetPID
- *
- * @b Description
- * @n This function reads the peripheral ID register which identifies the
- * peripheral number for the peripheral.
- *
- * @b Arguments
- @verbatim
- revInfo Peripheral Revision populated by this API
- classInfo Peripheral class populated by this API
- typeInfo Peripheral Type populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PID
- *
- * @b Example
- * @verbatim
- Uint32 pid;
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the SRIO Peripheral Identification.
- CSL_SRIO_GetPID (hSrio, &pid);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetPID
- (
- CSL_SrioHandle hSrio,
- Uint32* pid
- )
- {
- *pid = hSrio->RIO_PID;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_EnablePeripheral
- *
- * @b Description
- * @n This function sets the PEREN bit in the Peripheral Control register and
- * if not set this will prevent the peripheral from participating in any
- * transmit transactions and will disable all incoming requests. This should
- * be the last enable bit when bringing the device out of reset.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PCR_PEREN=1
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Enable the SRIO peripheral.
- CSL_SRIO_EnablePeripheral (hSrio);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_EnablePeripheral (CSL_SrioHandle hSrio)
- {
- CSL_FINS(hSrio->RIO_PCR, SRIO_RIO_PCR_PEREN, 1);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_DisablePeripheral
- *
- * @b Description
- * @n This function resets the PEREN bit in the Peripheral Control register
- * and disables the SRIO peripheral.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PCR_PEREN=0
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Disable the SRIO peripheral.
- CSL_SRIO_DisablePeripheral (hSrio);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_DisablePeripheral (CSL_SrioHandle hSrio)
- {
- CSL_FINS(hSrio->RIO_PCR, SRIO_RIO_PCR_PEREN, 0);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetMAUSwappingMode
- *
- * @b Description
- * @n This function sets the Little Endian Swapping Mode for the Memory Access
- * Unit.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- mode Little Endian Swapping Mode for the MAU.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL_MAU_LEND_SWAP_MODE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Ensure that the Memory Access Unit operates in mode A
- CSL_SRIO_SetMAUSwappingMode (hSrio, 0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetMAUSwappingMode (CSL_SrioHandle hSrio, Uint8 mode)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_MAU_LEND_SWAP_MODE, mode);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetMAUSwappingMode
- *
- * @b Description
- * @n This function gets the Little Endian Swapping Mode for the Memory Access
- * Unit.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- mode Little Endian Swapping Mode for the MAU populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL_MAU_LEND_SWAP_MODE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 mode;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the Memory Access Unit Swapping Mode.
- CSL_SRIO_GetMAUSwappingMode (hSrio, &mode);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetMAUSwappingMode (CSL_SrioHandle hSrio, Uint8* mode)
- {
- *mode = CSL_FEXT(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_MAU_LEND_SWAP_MODE);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetLSUSwappingMode
- *
- * @b Description
- * @n This function sets the Little Endian Swapping Mode for the Load Store
- * Unit
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- mode Little Endian Swapping Mode for the LSU.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL_LSU_LEND_SWAP_MODE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Ensure that the LSU operates in mode A
- CSL_SRIO_SetLSUSwappingMode (hSrio, 0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetLSUSwappingMode (CSL_SrioHandle hSrio, Uint8 mode)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_LSU_LEND_SWAP_MODE, mode);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetLSUSwappingMode
- *
- * @b Description
- * @n This function gets the Little Endian Swapping Mode for the Load Store
- * Unit.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- mode Little Endian Swapping Mode for the LSU populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL_LSU_LEND_SWAP_MODE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 mode;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the LSU Swapping Mode.
- CSL_SRIO_GetLSUSwappingMode (hSrio, &mode);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetLSUSwappingMode (CSL_SrioHandle hSrio, Uint8* mode)
- {
- *mode = CSL_FEXT(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_LSU_LEND_SWAP_MODE);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_EnablePromiscuous
- *
- * @b Description
- * @n This function enables the LOG_TGT_ID_DIS bit which ensures that the SRIO
- * packets are accepted at the logical layer even if there is no match with
- * the destination identifier.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL_LOG_TGT_ID_DIS=1
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Operate the peripheral in PROMISCUOUS mode.
- CSL_SRIO_EnablePromiscuous (hSrio);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_EnablePromiscuous (CSL_SrioHandle hSrio)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_LOG_TGT_ID_DIS, 1);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_DisablePromiscuous
- *
- * @b Description
- * @n This function disables the LOG_TGT_ID_DIS bit which ensures that the SRIO
- * packets are accepted at the logical layer only if there is a match with the
- * specific destination identifier.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL_LOG_TGT_ID_DIS=0
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Operate the peripheral in non-PROMISC mode.
- CSL_SRIO_DisablePromiscuous (hSrio);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_DisablePromiscuous (CSL_SrioHandle hSrio)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_LOG_TGT_ID_DIS, 0);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_IsPromiscuous
- *
- * @b Description
- * @n This function returns the status of the peripheral as TRUE if the device
- * is operating in PROMISCUOUS mode else FALSE.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n TRUE - Device is in PROMISCUOUS Mode.
- * @n FALSE - Device is in NON-PROMISCUOUS Mode.
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL_LOG_TGT_ID_DIS
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Check if we are operating in PROMISCUOUS mode or not?
- if (CSL_SRIO_IsPromiscuous (hSrio) == TRUE)
- {
- // Device is in PROMISCUOUS Mode.
- }
- else
- {
- // Device is in Non-PROMISCUOUS Mode.
- }
- ...
- @endverbatim
- * =============================================================================
- */
- static inline Bool CSL_SRIO_IsPromiscuous (CSL_SrioHandle hSrio)
- {
- if (CSL_FEXT(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_LOG_TGT_ID_DIS) == 1)
- return TRUE;
- return FALSE;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetAMUSwappingMode
- *
- * @b Description
- * @n This function sets the Little Endian Swapping Mode for the AMU
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- mode Little Endian Swapping Mode for the AMU
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL_AMU_LEND_SWAP_MODE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Ensure that the AMU operates in mode A
- CSL_SRIO_SetAMUSwappingMode (hSrio, 0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetAMUSwappingMode (CSL_SrioHandle hSrio, Uint8 mode)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_AMU_LEND_SWAP_MODE, mode);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetAMUSwappingMode
- *
- * @b Description
- * @n This function gets the Little Endian Swapping Mode for the AMU
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- mode Little Endian Swapping Mode for the AMU populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL_AMU_LEND_SWAP_MODE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 mode;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the AMU Swapping Mode.
- CSL_SRIO_GetAMUSwappingMode (hSrio, &mode);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetAMUSwappingMode (CSL_SrioHandle hSrio, Uint8* mode)
- {
- *mode = CSL_FEXT(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_AMU_LEND_SWAP_MODE);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetBootComplete
- *
- * @b Description
- * @n This function sets the boot complete flag as specified.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- bootCompleteFlag Boot Complete Flag to be set in the register.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL_BOOT_COMPLETE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Set the Boot Complete Flag to 1
- CSL_SRIO_SetBootComplete (hSrio, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetBootComplete (CSL_SrioHandle hSrio, Uint8 bootCompleteFlag)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_BOOT_COMPLETE, bootCompleteFlag);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetBootComplete
- *
- * @b Description
- * @n This function gets the boot complete flag.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- bootCompleteFlag Boot Complete Flag populated by this API.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL_BOOT_COMPLETE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 bootCompleteFlag;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the Boot Complete Flag
- bootCompleteFlag = CSL_SRIO_GetBootComplete (hSrio);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetBootComplete (CSL_SrioHandle hSrio, Uint8* bootCompleteFlag)
- {
- *bootCompleteFlag = CSL_FEXT(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_BOOT_COMPLETE);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetTXURXUSwappingMode
- *
- * @b Description
- * @n This function sets the Little Endian Swapping Mode for the TXU and RXU
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- mode Little Endian Swapping Mode for the TXU and RXU.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL_TXU_RXU_LEND_SWAP_MODE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Ensure that the TXU and RXU operates in mode A
- CSL_SRIO_SetTXURXUSwappingMode (hSrio, 0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetTXURXUSwappingMode (CSL_SrioHandle hSrio, Uint8 mode)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_TXU_RXU_LEND_SWAP_MODE, mode);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetTXURXUSwappingMode
- *
- * @b Description
- * @n This function gets the Little Endian Swapping Mode for the Memory Access
- * Unit.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- mode Little Endian Swapping Mode for the TXU and RXU populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL_TXU_RXU_LEND_SWAP_MODE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 mode;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the TXU and RXU Swapping Mode.
- CSL_SRIO_GetTXURXUSwappingMode (hSrio, &mode);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetTXURXUSwappingMode (CSL_SrioHandle hSrio, Uint8* mode)
- {
- *mode = CSL_FEXT(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_TXU_RXU_LEND_SWAP_MODE);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_EnableAutomaticPriorityPromotion
- *
- * @b Description
- * @n This function enables the automatic promotion of response priority by
- * RXU and MAU.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL_PROMOTE_DIS=0
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Enable Automatic Priority Promotion.
- CSL_SRIO_EnableAutomaticPriorityPromotion (hSrio);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_EnableAutomaticPriorityPromotion (CSL_SrioHandle hSrio)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_PROMOTE_DIS, 0);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_DisableAutomaticPriorityPromotion
- *
- * @b Description
- * @n This function disables the automatic promotion of response priority by
- * RXU and MAU.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL_PROMOTE_DIS=1
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Disable Automatic Priority Promotion.
- CSL_SRIO_DisableAutomaticPriorityPromotion (hSrio);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_DisableAutomaticPriorityPromotion (CSL_SrioHandle hSrio)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_PROMOTE_DIS, 1);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_IsAutomaticPriorityPromotionEnabled
- *
- * @b Description
- * @n This function check if the automatic promotion of response priority by
- * RXU and MAU is enabled or not?
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n TRUE - Automatic Priority Promotion is enabled
- * @n FALSE - Automatic Priority Promotion is disabled
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL_PROMOTE_DIS
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Check if Automatic Priority Promotion.
- if (CSL_SRIO_IsAutomaticPriorityPromotionEnabled (hSrio) == TRUE)
- {
- // Automatic Priority Promotion is enabled.
- }
- else
- {
- // Automatic Priority Promotion is disabled.
- }
- ...
- @endverbatim
- * =============================================================================
- */
- static inline Bool CSL_SRIO_IsAutomaticPriorityPromotionEnabled (CSL_SrioHandle hSrio)
- {
- if (CSL_FEXT(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_PROMOTE_DIS) == 0)
- return TRUE;
- return FALSE;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetTxCreditThreshold
- *
- * @b Description
- * @n This function sets the transmit credit threshold for priority packets
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- priority Priority of the Transmit Buffers
- credit Credit Threshold for the priority which is to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL_TX_PRI2_WM;SRIO_RIO_PER_SET_CNTL_TX_PRI1_WM;
- * SRIO_RIO_PER_SET_CNTL_TX_PRI0_WM
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Set the Transmit Credit Threshold as 8 for priority 2
- CSL_SRIO_SetTxCreditThreshold (hSrio, 2, 8);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetTxCreditThreshold (CSL_SrioHandle hSrio,Uint8 priority,Uint8 credit)
- {
- if (priority == 2)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_TX_PRI2_WM, credit);
- }
- else if (priority == 1)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_TX_PRI1_WM, credit);
- }
- else if (priority == 0)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_TX_PRI0_WM, credit);
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetTxCreditThreshold
- *
- * @b Description
- * @n This function gets the transmit credit threshold for priority packets
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- priority Priority of the Transmit Buffers
- credit Credit Threshold for the priority which is populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL_TX_PRI2_WM;SRIO_RIO_PER_SET_CNTL_TX_PRI1_WM;
- * SRIO_RIO_PER_SET_CNTL_TX_PRI0_WM
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 credit;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the Transmit Credit Threshold for priority 2
- CSL_SRIO_GetTxCreditThreshold (hSrio, 2, &credit);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetTxCreditThreshold (CSL_SrioHandle hSrio,Uint8 priority,Uint8* credit)
- {
- if (priority == 2)
- {
- *credit = CSL_FEXT(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_TX_PRI2_WM);
- }
- else if (priority == 1)
- {
- *credit = CSL_FEXT(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_TX_PRI1_WM);
- }
- else if (priority == 0)
- {
- *credit = CSL_FEXT(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_TX_PRI0_WM);
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetTransactionPriority
- *
- * @b Description
- * @n This function sets the DSP System transaction priority. 0 implies
- * Highest Priority while 7 implies lowest.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- priority Priority to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL_CBA_TRANS_PRI
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Set the transaction priority to be HIGHEST
- CSL_SRIO_SetTransactionPriority (hSrio, 0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetTransactionPriority (CSL_SrioHandle hSrio,Uint8 priority)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_CBA_TRANS_PRI, priority);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetTransactionPriority
- *
- * @b Description
- * @n This function gets the DSP System transaction priority.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- priority Priority to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL_CBA_TRANS_PRI
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 priority;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the transaction priority
- CSL_SRIO_GetTransactionPriority (hSrio, &priority);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetTransactionPriority (CSL_SrioHandle hSrio,Uint8 *priority)
- {
- *priority = CSL_FEXT(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_CBA_TRANS_PRI);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetPrescalarSelect
- *
- * @b Description
- * @n This function sets the prescalar select for SRIO
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- prescalarSelect Prescalar Select which is to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL_PRESCALER_SELECT
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Set the SRIO Prescalar select to operate in the range of 44.7 to 89.5
- CSL_SRIO_SetPrescalarSelect (hSrio, 0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetPrescalarSelect (CSL_SrioHandle hSrio, Uint8 prescalarSelect)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_PRESCALER_SELECT, prescalarSelect);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetPrescalarSelect
- *
- * @b Description
- * @n This function gets the prescalar select for SRIO
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- prescalarSelect Prescalar Select which is to be retrieved.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL_PRESCALER_SELECT
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 prescalarSelect;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the SRIO Prescalar select.
- CSL_SRIO_GetPrescalarSelect (hSrio, &prescalarSelect);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetPrescalarSelect (CSL_SrioHandle hSrio, Uint8* prescalarSelect)
- {
- *prescalarSelect = CSL_FEXT(hSrio->RIO_PER_SET_CNTL, SRIO_RIO_PER_SET_CNTL_PRESCALER_SELECT);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetResponseCRF
- *
- * @b Description
- * @n This function sets the CRF value in the response
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- value CRF value to be set in the response.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL1_CRF
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Set the Response CRF to be always set to 1
- CSL_SRIO_SetResponseCRF (hSrio, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetResponseCRF (CSL_SrioHandle hSrio, Uint8 value)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL1, SRIO_RIO_PER_SET_CNTL1_CRF, value);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetResponseCRF
- *
- * @b Description
- * @n This function gets the CRF value in the response
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- value CRF value populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL1_CRF
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 crfValue;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the Response CRF
- CSL_SRIO_GetResponseCRF (hSrio, &crfValue);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetResponseCRF (CSL_SrioHandle hSrio, Uint8* value)
- {
- *value = CSL_FEXT(hSrio->RIO_PER_SET_CNTL1, SRIO_RIO_PER_SET_CNTL1_CRF);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetRXUWatermark
- *
- * @b Description
- * @n This function sets the RXU Watermark value.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- value 0/1 to disable/enable RXU context assignment based on
- priority.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL1_RXU_WATERMARK
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Set the RXU Watermark to to 1
- CSL_SRIO_SetRXUWatermark (hSrio, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetRXUWatermark (CSL_SrioHandle hSrio, Uint8 value)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL1, SRIO_RIO_PER_SET_CNTL1_RXU_WATERMARK, value);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetRXUWatermark
- *
- * @b Description
- * @n This function gets the RXU Watermark setting
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- value RXU Watermark setting read
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL1_RXU_WATERMARK
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 value;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the RXU Watermark
- CSL_SRIO_GetRXUWatermark (hSrio, &value);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetRXUWatermark (CSL_SrioHandle hSrio, Uint8* value)
- {
- *value = CSL_FEXT(hSrio->RIO_PER_SET_CNTL1, SRIO_RIO_PER_SET_CNTL1_RXU_WATERMARK);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetSysClkSel
- *
- * @b Description
- * @n This function sets the SYS_CLK source
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- value SYS_CLK source to configure
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL1_SYS_CLK_SEL
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Set the SYS_CLK source to 1
- CSL_SRIO_SetSysClkSel (hSrio, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetSysClkSel (CSL_SrioHandle hSrio, Uint8 value)
- {
- CSL_FINS(hSrio->RIO_PER_SET_CNTL1, SRIO_RIO_PER_SET_CNTL1_SYS_CLK_SEL, value);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetSysClkSel
- *
- * @b Description
- * @n This function retrieves the SYS_CLK source for the port.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- value SYS_CLK source read
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL1_SYS_CLK_SEL
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 value;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the SYS_CLK source
- CSL_SRIO_GetSysClkSel (hSrio, &value);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetSysClkSel (CSL_SrioHandle hSrio, Uint8* value)
- {
- *value = CSL_FEXT(hSrio->RIO_PER_SET_CNTL1, SRIO_RIO_PER_SET_CNTL1_SYS_CLK_SEL);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetLoopbackMode
- *
- * @b Description
- * @n This function sets the port to operate in loopback mode.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- portNum Port Number for which loopback mode must be enabled
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL1_LOOPBACK
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Set the Port 0 to work in loopback mode.
- CSL_SRIO_SetLoopbackMode (hSrio, 0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetLoopbackMode (CSL_SrioHandle hSrio,Uint8 portNum)
- {
- CSL_FINSR (hSrio->RIO_PER_SET_CNTL1,
- CSL_SRIO_RIO_PER_SET_CNTL1_LOOPBACK_SHIFT + portNum, CSL_SRIO_RIO_PER_SET_CNTL1_LOOPBACK_SHIFT + portNum,
- 1);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetNormalMode
- *
- * @b Description
- * @n This function sets the port to operate in Normal mode.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- portNum Port Number for which normal mode must be enabled
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL1_LOOPBACK
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Set the port 0 to work in normal mode.
- CSL_SRIO_SetNormalMode (hSrio, 0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetNormalMode (CSL_SrioHandle hSrio,Uint8 portNum)
- {
- CSL_FINSR (hSrio->RIO_PER_SET_CNTL1,
- CSL_SRIO_RIO_PER_SET_CNTL1_LOOPBACK_SHIFT + portNum, CSL_SRIO_RIO_PER_SET_CNTL1_LOOPBACK_SHIFT + portNum,
- 0);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_IsLoopbackMode
- *
- * @b Description
- * @n This function checks if the port specified is operating in loopback
- * mode or not?
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- portNum Port Number for which mode settings must be retrieved
- @endverbatim
- *
- * <b> Return Value </b>
- * @n TRUE - Port is operating in loopback mode
- * @n FALSE - Port is operating in Normal Mode.
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL1_LOOPBACK
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Set the port 0 to work in normal mode.
- if (CSL_SRIO_IsLoopbackMode(hSrio, 0) == TRUE)
- {
- // Port 0 is operating in loopback mode.
- }
- else
- {
- // Port 0 is operating in normal mode.
- }
- ...
- @endverbatim
- * =============================================================================
- */
- static inline Bool CSL_SRIO_IsLoopbackMode (CSL_SrioHandle hSrio,Uint8 portNum)
- {
- if (CSL_FEXTR (hSrio->RIO_PER_SET_CNTL1,
- CSL_SRIO_RIO_PER_SET_CNTL1_LOOPBACK_SHIFT + portNum, CSL_SRIO_RIO_PER_SET_CNTL1_LOOPBACK_SHIFT + portNum) == 1)
- {
- return TRUE;
- }
- return FALSE;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_EnableCOS
- *
- * @b Description
- * @n This function enables Class of Service
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL1_COS_EN=1
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Enable Class of Service
- CSL_SRIO_EnableCOS (hSrio);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_EnableCOS (CSL_SrioHandle hSrio)
- {
- CSL_FINS (hSrio->RIO_PER_SET_CNTL1, SRIO_RIO_PER_SET_CNTL1_COS_EN, 1);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_DisableCOS
- *
- * @b Description
- * @n This function disables Class of Service for the device.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PER_SET_CNTL1_COS_EN=0
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Disable COS.
- CSL_SRIO_DisableCOS (hSrio);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_DisableCOS (CSL_SrioHandle hSrio)
- {
- CSL_FINS (hSrio->RIO_PER_SET_CNTL1, SRIO_RIO_PER_SET_CNTL1_COS_EN, 0);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_IsCOSEnabled
- *
- * @b Description
- * @n This function checks if COS has been enabled or not for the device?
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n TRUE - COS is enabled
- * @n FALSE - COS is disabled.
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PER_SET_CNTL1_COS_EN
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Check if COS is enabled
- if (CSL_SRIO_IsCOSEnabled (hSrio) == TRUE)
- {
- // COS is ENABLED
- }
- else
- {
- // COS is DISABLED
- }
- ...
- @endverbatim
- * =============================================================================
- */
- static inline Bool CSL_SRIO_IsCOSEnabled (CSL_SrioHandle hSrio)
- {
- if (CSL_FEXT(hSrio->RIO_PER_SET_CNTL1, SRIO_RIO_PER_SET_CNTL1_COS_EN) == 1)
- return TRUE;
- return FALSE;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GlobalEnable
- *
- * @b Description
- * @n This function globally enables the SRIO peripheral and all blocks.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_GBL_EN_EN=1
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Globally Enable the SRIO peripheral.
- CSL_SRIO_GlobalEnable (hSrio);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GlobalEnable (CSL_SrioHandle hSrio)
- {
- CSL_FINS (hSrio->RIO_GBL_EN, SRIO_RIO_GBL_EN_EN, 1);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GlobalDisable
- *
- * @b Description
- * @n This function globally disables the SRIO peripheral and all blocks.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_GBL_EN_EN=0
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Globally Disable the SRIO peripheral.
- CSL_SRIO_GlobalDisable (hSrio);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GlobalDisable (CSL_SrioHandle hSrio)
- {
- CSL_FINS (hSrio->RIO_GBL_EN, SRIO_RIO_GBL_EN_EN, 0);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_IsSRIOEnabled
- *
- * @b Description
- * @n This function checks if the SRIO peripheral has been globally enabled or
- * not?
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- @endverbatim
- *
- * <b> Return Value </b>
- * @n TRUE - SRIO Peripheral is enabled
- * @n FALSE - SRIO Peripheral is disabled.
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_GBL_EN_STAT_GBL_EN_STAT
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Ensure that the SRIO Peripheral is enabled or disabled.
- if (CSL_SRIO_IsSRIOEnabled (hSrio) == TRUE)
- {
- // SRIO Peripheral is ENABLED
- }
- else
- {
- // SRIO Peripheral is DISABLED
- }
- ...
- @endverbatim
- * =============================================================================
- */
- static inline Bool CSL_SRIO_IsSRIOEnabled (CSL_SrioHandle hSrio)
- {
- if (CSL_FEXT(hSrio->RIO_GBL_EN_STAT, SRIO_RIO_GBL_EN_STAT_GBL_EN_STAT) == 1)
- return TRUE;
- return FALSE;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_EnableBlock
- *
- * @b Description
- * @n This function enables the specific block in the SRIO peripheral.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- blockNum Block Number to be enabled.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_BLK_EN_EN=1
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Enable the SRIO block for LSU .
- CSL_SRIO_GlobalEnable (hSrio, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_EnableBlock (CSL_SrioHandle hSrio, Uint16 blockNumber)
- {
- CSL_FINS (hSrio->BLOCK_ENABLE_STATUS[blockNumber].RIO_BLK_EN, SRIO_RIO_BLK_EN_EN, 1);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_DisableBlock
- *
- * @b Description
- * @n This function disables the specific block in the SRIO peripheral.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- blockNum Block Number to be disabled.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_BLK_EN_EN=0
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Disable the SRIO Block 1 for LSU.
- CSL_SRIO_DisableBlock (hSrio, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_DisableBlock (CSL_SrioHandle hSrio, Uint16 blockNumber)
- {
- CSL_FINS (hSrio->BLOCK_ENABLE_STATUS[blockNumber].RIO_BLK_EN, SRIO_RIO_BLK_EN_EN, 0);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_IsSRIOBlockEnabled
- *
- * @b Description
- * @n This function checks if the SRIO block is enabled or disabled?
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- blockNumber SRIO Block Number to be checked.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n TRUE - SRIO Block is enabled
- * @n FALSE - SRIO Block is disabled.
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_BLK_EN_STAT_EN_STATUS
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Ensure that the SRIO Block 1 for LSU is enabled or not?
- if (CSL_SRIO_IsSRIOBlockEnabled (hSrio, 1) == TRUE)
- {
- // SRIO Block 1 for LSU is ENABLED
- }
- else
- {
- // SRIO Block 1 for LSU is DISABLED
- }
- ...
- @endverbatim
- * =============================================================================
- */
- static inline Bool CSL_SRIO_IsSRIOBlockEnabled (CSL_SrioHandle hSrio, Uint16 blockNumber)
- {
- return (Bool)CSL_FEXT(hSrio->BLOCK_ENABLE_STATUS[blockNumber].RIO_BLK_EN_STAT,
- SRIO_RIO_BLK_EN_STAT_EN_STATUS);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetDeviceID
- *
- * @b Description
- * @n This function sets the DEVICE ID Register. There are multiple device
- * ID registers which can exist in the system. The index parameter is used
- * to indicate which register is to be configured.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index Index of the Device ID register to be configured (0-Based)
- NodeId8bit 8 Bit Device Identifier to be configured
- NodeId16bit 16 Bit Device Identifier to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_MULTIID_REG_8B_NODEID,SRIO_RIO_MULTIID_REG_16B_NODEID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Configure the First Device ID register with a 16 bit identifer as 0xDEAD
- // and no 8 bit identifier.
- CSL_SRIO_SetDeviceID (hSrio, 0, 0x0, 0xDEAD);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetDeviceID
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- Uint8 NodeId8bit,
- Uint16 NodeId16bit
- )
- {
- /* Set the 8bit and 16bit device identifiers. */
- hSrio->RIO_MULTIID_REG[index] =
- CSL_FMK(SRIO_RIO_MULTIID_REG_8B_NODEID, NodeId8bit) |
- CSL_FMK(SRIO_RIO_MULTIID_REG_16B_NODEID, NodeId16bit);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetDeviceID
- *
- * @b Description
- * @n This function gets the DEVICE ID Register. There are multiple device
- * ID registers which can exist in the system. The index parameter is used
- * to indicate which register is to be retreived.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index Index of the Device ID register to be configured (0-Based)
- NodeId8bit 8 Bit Device Identifier to be populated by this API
- NodeId16bit 16 Bit Device Identifier to be populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_MULTIID_REG_8B_NODEID,SRIO_RIO_MULTIID_REG_16B_NODEID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 NodeId8bit;
- Uint16 NodeId16bit;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the Device ID register contents
- CSL_SRIO_GetDeviceID (hSrio, 0, &NodeId8bit, &NodeId16bit);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetDeviceID
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- Uint8* NodeId8bit,
- Uint16* NodeId16bit
- )
- {
- Uint32 value;
- /* Get the value from the register */
- value = hSrio->RIO_MULTIID_REG[index];
- /* Populate the 8bit and 16bit device identifiers. */
- *NodeId8bit = CSL_FEXT(value, SRIO_RIO_MULTIID_REG_8B_NODEID);
- *NodeId16bit = CSL_FEXT(value, SRIO_RIO_MULTIID_REG_16B_NODEID);
- return;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetPacketForwarding
- *
- * @b Description
- * @n The function sets the packet forwarding for the SRIO peripheral. There
- * exist multiple packet forwarding registers and the parameter index is to used
- * to select which register is to be configured.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index Index of the Packet forwarding register to be configured (0-Based)
- low16bitDeviceID Lower bound 16bit Device Identifier which can use this
- up16bitDeviceID Upper bound 16bit Device Identifier which can use this
- low8bitDeviceID Lower bound 8bit Device Identifier which can use this
- up8bitDeviceID Upper bound 8bit Device Identifier which can use this
- outPort Outgoing SRIO port to be used.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_PF_16B_CNTL_DEVID_16B_UP, SRIO_RIO_PF_16B_CNTL_DEVID_16B_LO,
- * SRIO_RIO_PF_8B_CNTL_DEVID_8B_LO,SRIO_RIO_PF_8B_CNTL_DEVID_8B_UP,
- * SRIO_RIO_PF_8B_CNTL_OUT_PORT
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Create a packet forwarding entry for device ID 0xBEEF to be forwarded
- // to port 1; we dont care about the 8-bit identifiers hence these are
- // set to reset values.
- CSL_SRIO_SetPacketForwarding (hSrio, 0, 0xBEEF, 0xBEEF, 0xFF, 0xFF, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetPacketForwarding
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- Uint16 low16bitDeviceID,
- Uint16 up16bitDeviceID,
- Uint8 low8bitDeviceID,
- Uint8 up8bitDeviceID,
- Uint8 outPort
- )
- {
- hSrio->PF_CNTL[index].RIO_PF_16B_CNTL =
- CSL_FMK(SRIO_RIO_PF_16B_CNTL_DEVID_16B_UP, up16bitDeviceID) |
- CSL_FMK(SRIO_RIO_PF_16B_CNTL_DEVID_16B_LO, low16bitDeviceID);
- hSrio->PF_CNTL[index].RIO_PF_8B_CNTL =
- CSL_FMK(SRIO_RIO_PF_8B_CNTL_OUT_PORT, outPort) |
- CSL_FMK(SRIO_RIO_PF_8B_CNTL_DEVID_8B_UP, up8bitDeviceID) |
- CSL_FMK(SRIO_RIO_PF_8B_CNTL_DEVID_8B_LO, low8bitDeviceID);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetPacketForwarding
- *
- * @b Description
- * @n The function gets the packet forwarding for the SRIO peripheral. There
- * exist multiple packet forwarding registers and the parameter index is to used
- * to select which register is to be retreived.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index Index of the Packet forwarding register to be configured (0-Based)
- low16bitDeviceID Lower bound 16bit Device Identifier populated by this API
- up16bitDeviceID Upper bound 16bit Device Identifier populated by this API
- low8bitDeviceID Lower bound 8bit Device Identifier populated by this API
- up8bitDeviceID Upper bound 8bit Device Identifier populated by this API
- outPort Outgoing SRIO port populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_PF_16B_CNTL_DEVID_16B_LO, SRIO_RIO_PF_16B_CNTL_DEVID_16B_UP,
- * SRIO_RIO_PF_8B_CNTL_DEVID_8B_LO,SRIO_RIO_PF_8B_CNTL_DEVID_8B_UP,
- * SRIO_RIO_PF_8B_CNTL_OUT_PORT
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint16 low16bitDeviceID;
- Uint16 up16bitDeviceID;
- Uint8 low8bitDeviceID;
- Uint8 up8bitDeviceID;
- Uint8 outPort;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the packet forwarding entry 0.
- CSL_SRIO_GetPacketForwarding (hSrio, 0, &low16bitDeviceID, &up16bitDeviceID,
- &low8bitDeviceID, &up8bitDeviceID, &outPort);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetPacketForwarding
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- Uint16* low16bitDeviceID,
- Uint16* up16bitDeviceID,
- Uint8* low8bitDeviceID,
- Uint8* up8bitDeviceID,
- Uint8* outPort
- )
- {
- Uint32 value = hSrio->PF_CNTL[index].RIO_PF_16B_CNTL;
- *up16bitDeviceID = CSL_FEXT(value, SRIO_RIO_PF_16B_CNTL_DEVID_16B_UP);
- *low16bitDeviceID = CSL_FEXT(value, SRIO_RIO_PF_16B_CNTL_DEVID_16B_LO);
- value = hSrio->PF_CNTL[index].RIO_PF_8B_CNTL;
- *outPort = CSL_FEXT(value, SRIO_RIO_PF_8B_CNTL_OUT_PORT);
- *up8bitDeviceID = CSL_FEXT(value, SRIO_RIO_PF_8B_CNTL_DEVID_8B_UP);
- *low8bitDeviceID = CSL_FEXT(value, SRIO_RIO_PF_8B_CNTL_DEVID_8B_LO);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetDoorbellPendingInterrupt
- *
- * @b Description
- * @n The function reads the DOORBELL status register to determine if there
- * are any pending door bell interrupts or not?
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- port SRIO Port (Zero Based) for which the doorbell status is required.
- doorbellStatus Door Bell Status populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_DOORBELL_ICSR_RIO_DOORBELL
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint16 doorbellStatus;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the status of doorbell interrupts for port 0
- CSL_SRIO_GetDoorbellPendingInterrupt (hSrio, 0, &doorbellStatus);
- if (doorbellStatus != 0)
- {
- // Door bell Interrupts were pending and need to be serviced.
- }
- else
- {
- // There are no door bell interrupts pending.
- }
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetDoorbellPendingInterrupt
- (
- CSL_SrioHandle hSrio,
- Uint8 port,
- Uint16* doorbellStatus
- )
- {
- *doorbellStatus = CSL_FEXT(hSrio->DOORBELL_ICSR_ICCR[port].RIO_DOORBELL_ICSR,
- SRIO_RIO_DOORBELL_ICSR_RIO_DOORBELL);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_ClearDoorbellPendingInterrupt
- *
- * @b Description
- * @n The function clears a specific door bell interrupt in the specified door
- * bell interrupt register.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- port SRIO Port (Zero Based) for which the doorbell status is required.
- doorbellInterrupt Door Bell Interrupt to be cleared.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_DOORBELL_ICCR
- *
- * @b Affects
- * @n SRIO_RIO_DOORBELL_ICSR_RIO_DOORBELL=0
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint16 doorbellStatus;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the status of doorbell interrupts for port 0
- CSL_SRIO_GetDoorbellPendingInterrupt (hSrio, 0, &doorbellStatus);
- if (doorbellStatus != 0)
- {
- // Door bell Interrupts were pending and need to be serviced.
- ...
- // Clear the Door Bell Pending Interrupts.
- CSL_SRIO_ClearDoorbellPendingInterrupt (hSrio, 0, doorbellStatus);
- }
- else
- {
- // There are no door bell interrupts pending.
- }
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_ClearDoorbellPendingInterrupt
- (
- CSL_SrioHandle hSrio,
- Uint8 port,
- Uint16 doorbellInterrupt
- )
- {
- /* Clear all the specified doorbell interrupts. */
- hSrio->DOORBELL_ICSR_ICCR[port].RIO_DOORBELL_ICCR = doorbellInterrupt;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetLSUPendingInterrupt
- *
- * @b Description
- * @n The function returns the LSU pending interrupt status.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsuStatus1 LSU Pending Status populated by this API
- lsuStatus2 LSU Pending Status populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_LSU_ICSR
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 lsuStatus1;
- Uint32 lsuStatus2;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Check the LSU Pending Interrupt Status.
- CSL_SRIO_GetLSUPendingInterrupt (hSrio, &lsuStatus1, &lsuStatus2);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetLSUPendingInterrupt
- (
- CSL_SrioHandle hSrio,
- Uint32* lsuStatus1,
- Uint32* lsuStatus2
- )
- {
- *lsuStatus1 = hSrio->LSU_ICSR_ICCR[0].RIO_LSU_ICSR;
- *lsuStatus2 = hSrio->LSU_ICSR_ICCR[1].RIO_LSU_ICSR;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_ClearLSUPendingInterrupt
- *
- * @b Description
- * @n The function clears the LSU pending interrupt
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsuInterrupt1 LSU Interrupt to be cleared.
- lsuInterrupt2 LSU Interrupt to be cleared.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_ICCR
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 lsuStatus1;
- Uint32 lsuStatus2;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Check the LSU Pending Interrupt Status.
- CSL_SRIO_GetLSUPendingInterrupt (hSrio, &lsuStatus1, &lsuStatus2);
- ...
- // Clear the pending interrupts.
- CSL_SRIO_ClearLSUPendingInterrupt (hSrio, lsuStatus1, lsuStatus);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_ClearLSUPendingInterrupt
- (
- CSL_SrioHandle hSrio,
- Uint32 lsuInterrupt1,
- Uint32 lsuInterrupt2
- )
- {
- hSrio->LSU_ICSR_ICCR[0].RIO_LSU_ICCR = lsuInterrupt1;
- hSrio->LSU_ICSR_ICCR[1].RIO_LSU_ICCR = lsuInterrupt2;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_ClearLSU0PendingInterrupt
- *
- * @b Description
- * @n The function clears the LSU0 pending interrupt
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsuInterrupt LSU Interrupt to be cleared.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_ICCR
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Clear the ICS0 indicating that the SRCID0 Transaction was successfully complete.
- CSL_SRIO_ClearLSU0PendingInterrupt (hSrio, 0x1);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_ClearLSU0PendingInterrupt
- (
- CSL_SrioHandle hSrio,
- Uint32 lsuInterrupt
- )
- {
- hSrio->LSU_ICSR_ICCR[0].RIO_LSU_ICCR = lsuInterrupt;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetErrorPendingInterrupt
- *
- * @b Description
- * @n The function returns the interrupt status of any error interrupts
- * which are pending.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- errStatus Error Pending Status populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_ERR_RST_EVNT_ICSR_MCAST_INT_RECEIVED,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_PORT_WRITE_IN_RECEIVED,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_LLERR_CAPTURE,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_PORT0_ERR,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_PORT1_ERR,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_PORT2_ERR,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_PORT3_ERR,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_DEVICE_RST_INT
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 errStatus;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get any pending errors
- CSL_SRIO_GetErrorPendingInterrupt (hSrio, &errStatus);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetErrorPendingInterrupt
- (
- CSL_SrioHandle hSrio,
- Uint32* errStatus
- )
- {
- /* All the errors are present in the lower order 17 bits. */
- *errStatus = CSL_FEXTR(hSrio->RIO_ERR_RST_EVNT_ICSR, 16, 0);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_ClearErrorPendingInterrupt
- *
- * @b Description
- * @n The function clears the pending error interrupts
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- errStatus Error Status to be cleared.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_ERR_RST_EVNT_ICCR_MCAST_INT_RECEIVED,
- * SRIO_RIO_ERR_RST_EVNT_ICCR_PORT_WRITE_IN_REQUEST_RECEIVED,
- * SRIO_RIO_ERR_RST_EVNT_ICCR_LOGICAL_LAYER_ERROR_MANAGEMENT_EVENT_CAPTURE,
- * SRIO_RIO_ERR_RST_EVNT_ICCR_PORT0_ERROR,
- * SRIO_RIO_ERR_RST_EVNT_ICCR_PORT1_ERROR,
- * SRIO_RIO_ERR_RST_EVNT_ICCR_PORT2_ERROR,
- * SRIO_RIO_ERR_RST_EVNT_ICCR_PORT3_ERROR,
- * SRIO_RIO_ERR_RST_EVNT_ICCR_DEVICE_RST_INT
- *
- * @b Affects
- * @n SRIO_RIO_ERR_RST_EVNT_ICSR_MCAST_INT_RECEIVED=0,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_PORT_WRITE_IN_RECEIVED=0,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_LLERR_CAPTURE=0,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_PORT0_ERR=0,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_PORT1_ERR=0,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_PORT2_ERR=0,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_PORT3_ERR=0,
- * SRIO_RIO_ERR_RST_EVNT_ICSR_DEVICE_RST_INT=0
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 errStatus;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get any pending error status.
- CSL_SRIO_GetErrorPendingInterrupt (hSrio,&errStatus);
- if (errStatus != 0)
- {
- // Pending error interrupts detected.
- ...
- // Clear the pending interrupts.
- CSL_SRIO_ClearErrorPendingInterrupt (hSrio, errStatus);
- }
- else
- {
- // No pending error status
- }
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_ClearErrorPendingInterrupt
- (
- CSL_SrioHandle hSrio,
- Uint32 errStatus
- )
- {
- CSL_FINSR(hSrio->RIO_ERR_RST_EVNT_ICCR, 16, 0, errStatus);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetAMUPendingInterrupt
- *
- * @b Description
- * @n The function returns the interrupt status of any AMU interrupts.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- amuIntrStatus AMU Interrupt Pending Status populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_AMU_ICSR_CPRIVID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint16 amuIntrStatus;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the pending AMU interrupt status
- CSL_SRIO_GetAMUPendingInterrupt (hSrio, &amuIntrStatus);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetAMUPendingInterrupt
- (
- CSL_SrioHandle hSrio,
- Uint16* amuIntrStatus
- )
- {
- *amuIntrStatus = CSL_FEXT(hSrio->RIO_AMU_ICSR, SRIO_RIO_AMU_ICSR_CPRIVID);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_ClearAMUPendingInterrupt
- *
- * @b Description
- * @n The function clears the AMU pending interrupts.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- amuIntrStatus AMU pending interrupt status to be cleared.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_AMU_ICCR_CPRIVID
- *
- * @b Affects
- * @n SRIO_RIO_AMU_ICSR_CPRIVID=0
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint16 amuIntrStatus;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the pending AMU interrupt status
- CSL_SRIO_GetAMUPendingInterrupt (hSrio, &amuIntrStatus);
- if (amuIntrStatus != 0)
- {
- // Pending AMU interrupts detected.
- ...
- // Clear the pending interrupts.
- CSL_SRIO_ClearAMUPendingInterrupt (hSrio, amuIntrStatus);
- }
- else
- {
- // No AMU interrupts were pending.
- }
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_ClearAMUPendingInterrupt
- (
- CSL_SrioHandle hSrio,
- Uint16 amuIntrStatus
- )
- {
- CSL_FINS(hSrio->RIO_AMU_ICCR, SRIO_RIO_AMU_ICCR_CPRIVID, amuIntrStatus);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_RouteDoorbellInterrupts
- *
- * @b Description
- * @n The function routes the doorbell interrupts for the specified doorbell
- * register to a specific destination.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- regNum Doorbell Register Number
- doorBellBit Doorbell bit which is to be routed
- destination Destination to which the interrupt bit is routed.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_DOORBELL_ICRR1_ICR0,SRIO_RIO_DOORBELL_ICRR1_ICR1,
- * SRIO_RIO_DOORBELL_ICRR1_ICR2,SRIO_RIO_DOORBELL_ICRR1_ICR3,
- * SRIO_RIO_DOORBELL_ICRR1_ICR4,SRIO_RIO_DOORBELL_ICRR1_ICR5,
- * SRIO_RIO_DOORBELL_ICRR1_ICR6,SRIO_RIO_DOORBELL_ICRR1_ICR7;
- * @n SRIO_RIO_DOORBELL_ICRR2_ICR8,SRIO_RIO_DOORBELL_ICRR2_ICR9,
- * SRIO_RIO_DOORBELL_ICRR2_ICR10,SRIO_RIO_DOORBELL_ICRR2_ICR11,
- * SRIO_RIO_DOORBELL_ICRR2_ICR12,SRIO_RIO_DOORBELL_ICRR2_ICR13,
- * SRIO_RIO_DOORBELL_ICRR2_ICR14,SRIO_RIO_DOORBELL_ICRR2_ICR15
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Route the Doorbell bits 1 for Doorbell 2 to destination 2
- CSL_SRIO_RouteDoorbellInterrupts (hSrio, 2, 1, 2);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_RouteDoorbellInterrupts
- (
- CSL_SrioHandle hSrio,
- Uint8 regNum,
- Uint8 doorBellBit,
- Uint8 destination
- )
- {
- if (doorBellBit < 8)
- {
- /* This handles interrupts requests between 0 and 7 */
- CSL_FINSR (hSrio->DOORBELL_ICRR[regNum].RIO_DOORBELL_ICRR1,
- ((doorBellBit << 2) + 3), (doorBellBit << 2), destination);
- }
- else
- {
- /* This handles interrupts requests between 8 and 15 */
- doorBellBit = doorBellBit - 8;
- CSL_FINSR (hSrio->DOORBELL_ICRR[regNum].RIO_DOORBELL_ICRR2,
- ((doorBellBit << 2) + 3), (doorBellBit << 2), destination);
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_RouteLSUInterrupts
- *
- * @b Description
- * @n The function routes the LSU interrupts to a specific destination.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsuIntrReq LSU Interrupt request which is to be routed
- destination Destination to which the interrupt bit is routed.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_LSU_ICRR
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Route the LSU Interrupts 1 to destination 6
- CSL_SRIO_RouteLSUInterrupts (hSrio, 1, 6);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_RouteLSUInterrupts
- (
- CSL_SrioHandle hSrio,
- Uint8 lsuIntrReq,
- Uint8 destination
- )
- {
- if (lsuIntrReq < 8)
- {
- /* This handles interrupts requests between 0 and 7 */
- CSL_FINSR(hSrio->RIO_LSU0_MODULE_ICRR[0], ((lsuIntrReq << 2) + 3), (lsuIntrReq << 2), destination);
- }
- else if (lsuIntrReq < 16)
- {
- /* This handles interrupts requests between 8 and 15 */
- lsuIntrReq = lsuIntrReq - 8;
- CSL_FINSR(hSrio->RIO_LSU0_MODULE_ICRR[1], ((lsuIntrReq << 2) + 3), (lsuIntrReq << 2), destination);
- }
- else if (lsuIntrReq < 24)
- {
- /* This handles interrupts requests between 16 and 23 */
- lsuIntrReq = lsuIntrReq - 16;
- CSL_FINSR(hSrio->RIO_LSU0_MODULE_ICRR[2], ((lsuIntrReq << 2) + 3), (lsuIntrReq << 2), destination);
- }
- else
- {
- /* This handles interrupts requests between 24 and 31 */
- lsuIntrReq = lsuIntrReq - 24;
- CSL_FINSR(hSrio->RIO_LSU0_MODULE_ICRR[3], ((lsuIntrReq << 2) + 3), (lsuIntrReq << 2), destination);
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_RouteErrorInterrupts
- *
- * @b Description
- * @n The function routes the error interrupts to a specific destination.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- errIntrReq Error Interrupt request which is to be routed
- destination Destination to which the interrupt bit is routed.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_ERR_RST_EVNT_ICRR_ICR0;SRIO_RIO_ERR_RST_EVNT_ICRR_ICR1;
- * SRIO_RIO_ERR_RST_EVNT_ICRR_ICR2;
- * @n SRIO_RIO_ERR_RST_EVNT_ICRR2_ICR8;SRIO_RIO_ERR_RST_EVNT_ICRR2_ICR9;
- * SRIO_RIO_ERR_RST_EVNT_ICRR2_ICR10;SRIO_RIO_ERR_RST_EVNT_ICRR2_ICR11;
- * @n SRIO_RIO_ERR_RST_EVNT_ICRR3_ICR16
- *
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Route the Error Interrupts 1 to destination 6
- CSL_SRIO_RouteErrorInterrupts (hSrio, 1, 6);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_RouteErrorInterrupts
- (
- CSL_SrioHandle hSrio,
- Uint8 errIntrReq,
- Uint8 destination
- )
- {
- if (errIntrReq < 3)
- {
- /* This handles interrupts requests between 0 and 2 */
- CSL_FINSR(hSrio->RIO_ERR_RST_EVNT_ICRR, ((errIntrReq << 2) + 3), (errIntrReq << 2), destination);
- }
- else if (errIntrReq < 12)
- {
- /* This handles interrupts requests between 8 and 15; note that 3 to 7 are not used. */
- errIntrReq = errIntrReq - 8;
- CSL_FINSR(hSrio->RIO_ERR_RST_EVNT_ICRR2, ((errIntrReq << 2) + 3), (errIntrReq << 2), destination);
- }
- else
- {
- /* This handles interrupts request 16; all else is reserved.*/
- errIntrReq = errIntrReq - 16;
- CSL_FINSR(hSrio->RIO_ERR_RST_EVNT_ICRR3, ((errIntrReq << 2) + 3), (errIntrReq << 2), destination);
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_RouteAMUInterrupts
- *
- * @b Description
- * @n The function routes the AMU interrupts to a specific destination.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- amuIntr AMU Interrupt request which is to be routed
- destination Destination to which the interrupt bit is routed.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_AMU_ICRR1_ICR0;SRIO_RIO_AMU_ICRR1_ICR1;SRIO_RIO_AMU_ICRR1_ICR2;
- * SRIO_RIO_AMU_ICRR1_ICR3;SRIO_RIO_AMU_ICRR1_ICR4;SRIO_RIO_AMU_ICRR1_ICR5;
- * SRIO_RIO_AMU_ICRR1_ICR6;SRIO_RIO_AMU_ICRR1_ICR7;
- * SRIO_RIO_AMU_ICRR2_ICR8;SRIO_RIO_AMU_ICRR2_ICR9;SRIO_RIO_AMU_ICRR2_ICR10;
- * SRIO_RIO_AMU_ICRR2_ICR11;SRIO_RIO_AMU_ICRR2_ICR12;SRIO_RIO_AMU_ICRR2_ICR13;
- * SRIO_RIO_AMU_ICRR2_ICR14;SRIO_RIO_AMU_ICRR2_ICR15
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Route the AMU Interrupts 1 to destination 6
- CSL_SRIO_RouteAMUInterrupts (hSrio, 1, 6);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_RouteAMUInterrupts
- (
- CSL_SrioHandle hSrio,
- Uint8 amuIntr,
- Uint8 destination
- )
- {
- if (amuIntr < 8)
- {
- /* This handles AMU interrupts requests between 0 and 7 */
- CSL_FINSR(hSrio->RIO_AMU_ICRR1, ((amuIntr << 2) + 3), (amuIntr << 2), destination);
- }
- else
- {
- /* This handles AMU interrupts requests between 8 and 15.*/
- amuIntr = amuIntr - 8;
- CSL_FINSR(hSrio->RIO_AMU_ICRR2, ((amuIntr << 2) + 3), (amuIntr << 2), destination);
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetDoorbellRoute
- *
- * @b Description
- * @n The function gets the doorbell routing information.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- route Routing Information populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_INTERRUPT_CTL_DBLL_ROUTE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 routeInfo;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the Doorbell routing information
- CSL_SRIO_GetDoorbellRoute (hSrio, &routeInfo);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetDoorbellRoute
- (
- CSL_SrioHandle hSrio,
- Uint8* routeInfo
- )
- {
- *routeInfo = CSL_FEXT(hSrio->RIO_INTERRUPT_CTL, SRIO_RIO_INTERRUPT_CTL_DBLL_ROUTE);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetDoorbellRoute
- *
- * @b Description
- * @n The function sets the doorbell routing information.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- route Routing Information to be configured
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_INTERRUPT_CTL_DBLL_ROUTE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 routeInfo;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Set the Doorbell routing information to use dedicated interrupts.
- CSL_SRIO_SetDoorbellRoute (hSrio, 0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetDoorbellRoute
- (
- CSL_SrioHandle hSrio,
- Uint8 routeInfo
- )
- {
- hSrio->RIO_INTERRUPT_CTL = CSL_FMK(SRIO_RIO_INTERRUPT_CTL_DBLL_ROUTE, routeInfo);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetInterruptStatusDecode
- *
- * @b Description
- * @n The function gets the interrupt status for a specified interrupt
- * destination
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- intrDst Interrupt Destination for which the status is required.
- status Decode Status populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_INTDST_DECODE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 status;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the Interrupt Status for destination 0
- CSL_SRIO_GetInterruptStatusDecode (hSrio, 0, &status);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetInterruptStatusDecode
- (
- CSL_SrioHandle hSrio,
- Uint8 intrDst,
- Uint32* status
- )
- {
- *status = hSrio->RIO_INTDST_DECODE[intrDst];
- }
- /** ============================================================================
- * @n@b CSL_SRIO_EnableInterruptPacing
- *
- * @b Description
- * @n The function enables interrupt pacing for the specific destination.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- destination Destination Address for which interrupt pacing is enabled.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;
- * SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;SRIO_IO_INTDST_RATE_DIS_RATEN_DIS=0;
- * SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;
- * SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=0;
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 rate;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Enable Interrupt Pacing for Destination 4.
- CSL_SRIO_EnableInterruptPacing (hSrio, 4);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_EnableInterruptPacing
- (
- CSL_SrioHandle hSrio,
- Uint8 destination
- )
- {
- CSL_FINSR(hSrio->RIO_INTDST_RATE_DIS, destination, destination, 0);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_DisableInterruptPacing
- *
- * @b Description
- * @n The function disables interrupt pacing for the specific destination.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- destination Destination Address for which interrupt pacing is disabled.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;
- * SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;
- * SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;
- * SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1;SRIO_RIO_INTDST_RATE_DIS_RATEN_DIS=1
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 rate;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Disable Interrupt Pacing for Destination 5.
- CSL_SRIO_DisableInterruptPacing (hSrio, 5);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_DisableInterruptPacing
- (
- CSL_SrioHandle hSrio,
- Uint8 destination
- )
- {
- CSL_FINSR(hSrio->RIO_INTDST_RATE_DIS, destination, destination, 1);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetInterruptRate
- *
- * @b Description
- * @n The function sets the rate for each interrupt destination.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- destination Destination Address for which the status is read.
- rate Interrupt Rate to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_INTDST_RATE_CNT_COUNT_DOWN_VALUE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Enable Interrupt Pacing for Destination 2.
- CSL_SRIO_EnableInterruptPacing (hSrio, 2);
-
- // Set the slowest Interrupt Rate for destination 2.
- CSL_SRIO_SetInterruptRate (hSrio, 2, 0xFFFFFFFF);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetInterruptPacing
- (
- CSL_SrioHandle hSrio,
- Uint8 destination,
- Uint32 rate
- )
- {
- hSrio->RIO_INTDST_RATE_CNT[destination] = rate;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetInterruptPacing
- *
- * @b Description
- * @n The function gets the rate for each interrupt destination.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- destination Destination Address for which the status is read.
- rate Interrupt Rate to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_INTDST_RATE_CNT_COUNT_DOWN_VALUE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 rate;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Enable Interrupt Pacing for Destination 4.
- CSL_SRIO_EnableInterruptPacing (hSrio, 4);
- ...
- // Get the Interrupt rate for destination 4
- CSL_SRIO_GetInterruptRate (hSrio, 4, &rate);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetInterruptRate
- (
- CSL_SrioHandle hSrio,
- Uint8 destination,
- Uint32* rate
- )
- {
- *rate = hSrio->RIO_INTDST_RATE_CNT[destination];
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetType11PSInfo
- *
- * @b Description
- * @n The function creates the type11 protocol specific information.
- *
- * @b Arguments
- @verbatim
- psInfo - 8 bytes of PS information populated by this API
- dstID - Destination Identifier.
- srcId - Source Identifier.
- mbox - Mail Box
- ltr - Letter
- tt - Identifies if 8 bit or 16 bit identifiers are to be used.
- ssize - Standard Message Payload Size
- retryCount - Total Number of retries allowed for this message.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 psInfo[2];
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
-
- // Create the Protocol Specific Information.
- CSL_SRIO_SetType11PSInfo(psInfo, 0xDEAD, 0xBEED, 0x1, 0x2, 0x1, 0xe, 0x0);
- // Set the PS Information into the Buffer Descriptor.
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetType11PSInfo
- (
- Uint32 psInfo[2],
- Uint16 dstId,
- Uint16 srcId,
- Uint8 mbox,
- Uint8 letter,
- Uint8 tt,
- Uint8 ssize,
- Uint8 retryCount
- )
- {
- psInfo[0] = CSL_FMKR(31, 16, srcId) |
- CSL_FMKR(15, 0, dstId);
- psInfo[1] = CSL_FMKR(5, 0, mbox) |
- CSL_FMKR(8, 6, letter) |
- CSL_FMKR(10, 9, tt) |
- CSL_FMKR(20, 17, ssize) |
- CSL_FMKR(26, 21, retryCount);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_ExtractType11PSInfo
- *
- * @b Description
- * @n The function extracts the type11 fields from the Protocol Specific
- * information.
- *
- * @b Arguments
- @verbatim
- psInfo - 8 bytes of PS information from the descriptor
- dstID - Destination Identifier populated by the API
- srcId - Source Identifier populated by the API
- mbox - Mail Box populated by the API
- ltr - Letter populated by the API
- tt - Identifies if 8 bit or 16 bit identifiers are being used.
- pri - Message Priority populated by the API
- cc - Completion Code populated by the API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 psInfo[2];
- Uint16 dstId;
- Uint16 srcId;
- Uint8 mbox;
- Uint8 letter;
- Uint8 tt;
- Uint8 pri;
- Uint8 cc;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the PS Information from the buffer descriptor.
- ...
- // Populate the Type11 fields from the PS Information.
- CSL_SRIO_ExtractType11PSInfo(psInfo, &dstId, &srcId, &mbox, &letter, &tt, &pri, &cc);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_ExtractType11PSInfo
- (
- Uint32 psInfo[2],
- Uint16* dstId,
- Uint16* srcId,
- Uint8* mbox,
- Uint8* letter,
- Uint8* tt,
- Uint8* pri,
- Uint8* cc
- )
- {
- *srcId = CSL_FEXTR(psInfo[0], 31, 16);
- *dstId = CSL_FEXTR(psInfo[0], 15, 0);
- *mbox = CSL_FEXTR(psInfo[1], 5, 0);
- *letter = CSL_FEXTR(psInfo[1], 8, 6);
- *tt = CSL_FEXTR(psInfo[1], 10, 9);
- *pri = CSL_FEXTR(psInfo[1], 14, 11);
- *cc = CSL_FEXTR(psInfo[1], 16, 15);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_MapMessageToQueue
- *
- * @b Description
- * @n The function maps a specific RIO message to the specific queue
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index Index of the MAP register
- message Message Information which is compared with incoming
- packet.
- queueId Destination Queue to which the message is sent
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_RXU_MAP_L_SRCID,SRIO_RIO_RXU_MAP_L_MBX,SRIO_RIO_RXU_MAP_L_LTR
- * SRIO_RIO_RXU_MAP_L_MBX_MASK,SRIO_RIO_RXU_MAP_L_LTR_MASK,
- * @n SRIO_RIO_RXU_MAP_H_SEG_MAP,SRIO_RIO_RXU_MAP_H_SRC_PROM,SRIO_RIO_RXU_MAP_H_TT,
- * SRIO_RIO_RXU_MAP_H_DEST_PROM,SRIO_RIO_RXU_MAP_H_DEST_ID,
- * @n SRIO_RIO_RXU_MAP_QID_DEST_QID,SRIO_RIO_RXU_MAP_QID_FLOWID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- SRIO_MESSAGE message;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
-
- message.srcID = 0xBEEF;
- message.mbx = 0;
- message.ltr = 0;
- message.mbxMask = 0;
- message.ltrMask = 0;
- message.segMap = 0; // Single Segment
- message.srcProm = 1; // Full Access to the Queue for any Source ID
- message.tt = 1; // Match 16bits for Source ID.
- message.dstProm = 0; // Access to the Queue for the specified Destination ID
- message.dstId = 0xDEAD;// The destination ID which indicates us.
- message.flowId = 0x0;
-
- // Map the above message to Queue 4. This is the first mapping which is being done
- CSL_SRIO_MapMessageToQueue (hSrio, 0, &message, 4);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_MapMessageToQueue
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- SRIO_MESSAGE* ptrMessage,
- Uint16 queueId
- )
- {
- /* Initialize the RXU MAPL register. */
- hSrio->RXU_MAP[index].RIO_RXU_MAP_L =
- CSL_FMK(SRIO_RIO_RXU_MAP_L_SRCID, ptrMessage->srcId) |
- CSL_FMK(SRIO_RIO_RXU_MAP_L_MBX, ptrMessage->mbx) |
- CSL_FMK(SRIO_RIO_RXU_MAP_L_LTR, ptrMessage->ltr) |
- CSL_FMK(SRIO_RIO_RXU_MAP_L_MBX_MASK, ptrMessage->mbxMask) |
- CSL_FMK(SRIO_RIO_RXU_MAP_L_LTR_MASK, ptrMessage->ltrMask);
- /* Initialize the RXU MAPH register. */
- hSrio->RXU_MAP[index].RIO_RXU_MAP_H =
- CSL_FMK(SRIO_RIO_RXU_MAP_H_SEG_MAP, ptrMessage->segMap) |
- CSL_FMK(SRIO_RIO_RXU_MAP_H_SRC_PROM, ptrMessage->srcProm) |
- CSL_FMK(SRIO_RIO_RXU_MAP_H_TT, ptrMessage->tt) |
- CSL_FMK(SRIO_RIO_RXU_MAP_H_DEST_PROM, ptrMessage->dstProm) |
- CSL_FMK(SRIO_RIO_RXU_MAP_H_DEST_ID, ptrMessage->dstId);
- /* Initialize the RXU QID register. */
- hSrio->RXU_MAP[index].RIO_RXU_MAP_QID =
- CSL_FMK(SRIO_RIO_RXU_MAP_QID_DEST_QID, queueId) |
- CSL_FMK(SRIO_RIO_RXU_MAP_QID_FLOWID, ptrMessage->flowId);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetMessageToQueueMapping
- *
- * @b Description
- * @n The function gets information about the SRIO Message and Queue to which
- * it is mapped by reading the specified MAP 'index' register.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index Index of the MAP register
- message Message Information populated by this API
- queueId Destination Queue to which the message is mapped
- populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_RXU_MAP_L_SRCID,SRIO_RIO_RXU_MAP_L_MBX,SRIO_RIO_RXU_MAP_L_LTR
- * SRIO_RIO_RXU_MAP_L_MBX_MASK,SRIO_RIO_RXU_MAP_L_LTR_MASK,
- * @n SRIO_RIO_RXU_MAP_H_SEG_MAP,SRIO_RIO_RXU_MAP_H_SRC_PROM,SRIO_RIO_RXU_MAP_H_TT,
- * SRIO_RIO_RXU_MAP_H_DEST_PROM,SRIO_RIO_RXU_MAP_H_DEST_ID,
- * @n SRIO_RIO_RXU_MAP_QID_DEST_QID,SRIO_RIO_RXU_MAP_QID_FLOWID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- SRIO_MESSAGE message;
- Uint16 queueId;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the mapping information for the 'first' mapping.
- CSL_SRIO_GetMessageToQueueMapping (hSrio, 0, &message, &queueId);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetMessageToQueueMapping
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- SRIO_MESSAGE* ptrMessage,
- Uint16* queueId
- )
- {
- Uint32 value;
- /* Get the RXU MAPL register. */
- value = hSrio->RXU_MAP[index].RIO_RXU_MAP_L;
- ptrMessage->srcId = CSL_FEXT(value, SRIO_RIO_RXU_MAP_L_SRCID);
- ptrMessage->mbx = CSL_FEXT(value, SRIO_RIO_RXU_MAP_L_MBX);
- ptrMessage->ltr = CSL_FEXT(value, SRIO_RIO_RXU_MAP_L_LTR);
- ptrMessage->mbxMask = CSL_FEXT(value, SRIO_RIO_RXU_MAP_L_MBX_MASK);
- ptrMessage->ltrMask = CSL_FEXT(value, SRIO_RIO_RXU_MAP_L_LTR_MASK);
- /* Get the RXU MAPH register. */
- value = hSrio->RXU_MAP[index].RIO_RXU_MAP_H;
- ptrMessage->segMap = CSL_FEXT(value, SRIO_RIO_RXU_MAP_H_SEG_MAP);
- ptrMessage->srcProm = CSL_FEXT(value, SRIO_RIO_RXU_MAP_H_SRC_PROM);
- ptrMessage->tt = CSL_FEXT(value, SRIO_RIO_RXU_MAP_H_TT);
- ptrMessage->dstProm = CSL_FEXT(value, SRIO_RIO_RXU_MAP_H_DEST_PROM);
- ptrMessage->dstId = CSL_FEXT(value, SRIO_RIO_RXU_MAP_H_DEST_ID);
- /* Get the RXU QID register. */
- value = hSrio->RXU_MAP[index].RIO_RXU_MAP_QID;
- *queueId = CSL_FEXT(value, SRIO_RIO_RXU_MAP_QID_DEST_QID);
- ptrMessage->flowId = CSL_FEXT(value, SRIO_RIO_RXU_MAP_QID_FLOWID);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetType9PSInfo
- *
- * @b Description
- * @n The function creates the type9 protocol specific information.
- *
- * @b Arguments
- @verbatim
- psInfo - 8 bytes of PS information populated by this API
- dstID - Destination Identifier.
- srcId - Source Identifier.
- cos - Class of Service
- cosMask - Class of Service Mask
- tt - Identifies if 8 bit or 16 bit identifiers are to be used.
- streamId - Stream ID for the transaction
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 psInfo[2];
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
-
- // Create the Protocol Specific Information.
- CSL_SRIO_SetType9PSInfo(psInfo, 0xDEAD, 0xBEED, 0x4, 0x1, 0x1, 0xABCD);
- // Set the PS Information into the Buffer Descriptor.
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetType9PSInfo
- (
- Uint32 psInfo[2],
- Uint16 dstId,
- Uint16 srcId,
- Uint8 cos,
- Uint8 cosMask,
- Uint8 tt,
- Uint16 streamId
- )
- {
- psInfo[0] = CSL_FMKR(31, 16, srcId) |
- CSL_FMKR(15, 0, dstId);
- psInfo[1] = CSL_FMKR(7, 0, cos) |
- CSL_FMKR(8, 8, cosMask) |
- CSL_FMKR(10, 9, tt) |
- CSL_FMKR(31, 16, streamId);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_ExtractType9PSInfo
- *
- * @b Description
- * @n The function extracts the type9 protocol specific information.
- *
- * @b Arguments
- @verbatim
- psInfo - 8 bytes of PS information
- dstID - Destination Identifier populated by this API
- srcId - Source Identifier populated by this API
- cos - Class of Service populated by this API
- cc - Completion Code populated by this API
- tt - Identifies if 8 bit or 16 bit identifiers are to be used.
- pri - Message Priority populated by this API
- streamId - Stream Id populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 psInfo[2];
- Uint16 dstId;
- Uint16 srcId;
- Uint8 cos;
- Uint8 cc;
- Uint8 tt;
- Uint8 pri;
- Uint16 streamId;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- // Get the PS Information into the Buffer Descriptor.
- ...
- // Extract the Type9 fields from the PS Information.
- CSL_SRIO_ExtractType9PSInfo(psInfo, &dstId, &srcId, &cos, &cc, &tt, &pri, &streamId);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_ExtractType9PSInfo
- (
- Uint32 psInfo[2],
- Uint16* dstId,
- Uint16* srcId,
- Uint8* cos,
- Uint8* cc,
- Uint8* tt,
- Uint8* pri,
- Uint16* streamId
- )
- {
- *srcId = CSL_FEXTR(psInfo[0], 31, 16);
- *dstId = CSL_FEXTR(psInfo[0], 15, 0);
- *cos = CSL_FEXTR(psInfo[1], 7, 0);
- *cc = CSL_FEXTR(psInfo[1], 9, 8);
- *tt = CSL_FEXTR(psInfo[1], 10, 10);
- *pri = CSL_FEXTR(psInfo[1], 14, 11);
- *streamId = CSL_FEXTR(psInfo[1], 31, 16);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_MapType9MessageToQueue
- *
- * @b Description
- * @n The function maps the specific TYPE9 message to the queue
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index Index of the MAP register
- message Type9-Message Information
- queueId Destination Queue
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_RXU_TYPE9_MAP0_SRCID,SRIO_RIO_RXU_TYPE9_MAP0_COS,
- * SRIO_RIO_RXU_TYPE9_MAP0_COS_MASK,
- * @n SRIO_RIO_RXU_TYPE9_MAP1_SRC_PROM,SRIO_RIO_RXU_TYPE9_MAP1_TT,
- * SRIO_RIO_RXU_TYPE9_MAP1_DEST_PROM,SRIO_RIO_RXU_TYPE9_MAP1_DEST_ID,
- * @n SRIO_RIO_RXU_TYPE9_MAP2_STRM_ID,SRIO_RIO_RXU_TYPE9_MAP2_STRM_MASK,
- * @n SRIO_RIO_RXU_MAP_QID_DEST_QID,SRIO_RIO_RXU_MAP_QID_FLOWID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- SRIO_TYPE9_MESSAGE message;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- message.srcId = 0xBEEF;
- message.cos = 0;
- message.cosMask = 0;
- message.srcProm = 0;
- message.tt = 1; // Match 16bits for Source ID.
- message.dstProm = 0;
- message.dstId = 0xDEAD;
- message.streamId = 0;
- message.streamMask = 0;
- message.flowId = 0;
-
- // Map the above message to Queue 5. This is the first mapping which is being done
- CSL_SRIO_MapType9MessageToQueue (hSrio, 0, &message, 5);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_MapType9MessageToQueue
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- SRIO_TYPE9_MESSAGE* ptrMessage,
- Uint16 queueId
- )
- {
- /* Initialize the RXU TYPE9 MAP0 register. */
- hSrio->RXU_TYPE9_MAP[index].RIO_RXU_TYPE9_MAP0 =
- CSL_FMK(SRIO_RIO_RXU_TYPE9_MAP0_SRCID, ptrMessage->srcId) |
- CSL_FMK(SRIO_RIO_RXU_TYPE9_MAP0_COS, ptrMessage->cos) |
- CSL_FMK(SRIO_RIO_RXU_TYPE9_MAP0_COS_MASK, ptrMessage->cosMask);
- /* Initialize the RXU TYPE9 MAP1 register. */
- hSrio->RXU_TYPE9_MAP[index].RIO_RXU_TYPE9_MAP1 =
- CSL_FMK(SRIO_RIO_RXU_TYPE9_MAP1_SRC_PROM, ptrMessage->srcProm) |
- CSL_FMK(SRIO_RIO_RXU_TYPE9_MAP1_TT, ptrMessage->tt) |
- CSL_FMK(SRIO_RIO_RXU_TYPE9_MAP1_DEST_PROM,ptrMessage->dstProm) |
- CSL_FMK(SRIO_RIO_RXU_TYPE9_MAP1_DEST_ID, ptrMessage->dstId);
- /* Initialize the RXU TYPE9 MAP2 register. */
- hSrio->RXU_TYPE9_MAP[index].RIO_RXU_TYPE9_MAP2 =
- CSL_FMK(SRIO_RIO_RXU_TYPE9_MAP2_STRM_ID, ptrMessage->streamId) |
- CSL_FMK(SRIO_RIO_RXU_TYPE9_MAP2_STRM_MASK,ptrMessage->streamMask);
- /* Initialize the RXU QID register: The specification states that this is shared between Type9 and Type11 */
- hSrio->RXU_MAP[index].RIO_RXU_MAP_QID =
- CSL_FMK(SRIO_RIO_RXU_MAP_QID_DEST_QID, queueId) |
- CSL_FMK(SRIO_RIO_RXU_MAP_QID_FLOWID, ptrMessage->flowId);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetType9MessageToQueueMapping
- *
- * @b Description
- * @n The function gets information about the SRIO TYPE9 Message and Queue
- * to which it is mapped by reading the specified MAP 'index' register.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index Index of the MAP register
- message Type9-Message Information populated by this API
- queueId Destination Queue populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_RXU_TYPE9_MAP0_SRCID,SRIO_RIO_RXU_TYPE9_MAP0_COS,
- * SRIO_RIO_RXU_TYPE9_MAP0_COS_MASK,
- * @n SRIO_RIO_RXU_TYPE9_MAP1_SRC_PROM,SRIO_RIO_RXU_TYPE9_MAP1_TT,
- * SRIO_RIO_RXU_TYPE9_MAP1_DEST_PROM,SRIO_RIO_RXU_TYPE9_MAP1_DEST_ID,
- * @n SRIO_RIO_RXU_TYPE9_MAP2_STRM_ID,SRIO_RIO_RXU_TYPE9_MAP2_STRM_MASK,
- * @n SRIO_RIO_RXU_MAP_QID_DEST_QID,SRIO_RIO_RXU_MAP_QID_FLOWID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- SRIO_TYPE9_MESSAGE message;
- Uint16 queueId;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the first mapping information.
- CSL_SRIO_GetType9MessageToQueueMapping (hSrio, 0, &message, &queueId);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetType9MessageToQueueMapping
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- SRIO_TYPE9_MESSAGE* ptrMessage,
- Uint16* queueId
- )
- {
- Uint32 value;
- /* Get the RXU TYPE9 MAP0 register. */
- value = hSrio->RXU_TYPE9_MAP[index].RIO_RXU_TYPE9_MAP0;
- ptrMessage->srcId = CSL_FEXT(value, SRIO_RIO_RXU_TYPE9_MAP0_SRCID);
- ptrMessage->cos = CSL_FEXT(value, SRIO_RIO_RXU_TYPE9_MAP0_COS);
- ptrMessage->cosMask = CSL_FEXT(value, SRIO_RIO_RXU_TYPE9_MAP0_COS_MASK);
- /* Get the RXU TYPE9 MAP1 register. */
- value = hSrio->RXU_TYPE9_MAP[index].RIO_RXU_TYPE9_MAP1;
- ptrMessage->srcProm = CSL_FEXT(value, SRIO_RIO_RXU_TYPE9_MAP1_SRC_PROM);
- ptrMessage->tt = CSL_FEXT(value, SRIO_RIO_RXU_TYPE9_MAP1_TT);
- ptrMessage->dstProm = CSL_FEXT(value, SRIO_RIO_RXU_TYPE9_MAP1_DEST_PROM);
- ptrMessage->dstId = CSL_FEXT(value, SRIO_RIO_RXU_TYPE9_MAP1_DEST_ID);
- /* Get the RXU TYPE9 MAP2 register. */
- value = hSrio->RXU_TYPE9_MAP[index].RIO_RXU_TYPE9_MAP2;
- ptrMessage->streamId = CSL_FEXT(value, SRIO_RIO_RXU_TYPE9_MAP2_STRM_ID);
- ptrMessage->streamMask = CSL_FEXT(value, SRIO_RIO_RXU_TYPE9_MAP2_STRM_MASK);
- /* Get the RXU QID register: This is shared between the Type9 and Type11 */
- value = hSrio->RXU_MAP[index].RIO_RXU_MAP_QID;
- *queueId = CSL_FEXT(value, SRIO_RIO_RXU_MAP_QID_DEST_QID);
- ptrMessage->flowId = CSL_FEXT(value, SRIO_RIO_RXU_MAP_QID_FLOWID);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_MapAMUPrivIdToSourceId
- *
- * @b Description
- * @n The function maps the AMU Priv ID to a specific Source ID.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- privId AMU Priv ID which is being mapped
- srcId Source ID to which the priv ID is being mapped to.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_AMU_SRCID_MAP_CPRIVID0_8;SRIO_RIO_AMU_SRCID_MAP_CPRIVID1_9;
- * @n SRIO_RIO_AMU_SRCID_MAP_CPRIVID2_10;SRIO_RIO_AMU_SRCID_MAP_CPRIVID3_11;
- * @n SRIO_RIO_AMU_SRCID_MAP_CPRIVID4_12;SRIO_RIO_AMU_SRCID_MAP_CPRIVID5_13;
- * @n SRIO_RIO_AMU_SRCID_MAP_CPRIVID6_14;SRIO_RIO_AMU_SRCID_MAP_CPRIVID7_15;
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Map the PRIV-ID 1 to Source ID 3
- CSL_SRIO_MapAMUPrivIdToSourceId (hSrio, 1, 5);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_MapAMUPrivIdToSourceId
- (
- CSL_SrioHandle hSrio,
- Uint8 privId,
- Uint8 srcId
- )
- {
- if (privId < 8)
- {
- CSL_FINSR (hSrio->RIO_AMU_SRCID_MAP[0], (privId << 2) + 3, (privId << 2), srcId);
- }
- else
- {
- privId = privId - 8;
- CSL_FINSR (hSrio->RIO_AMU_SRCID_MAP[1], (privId << 2) + 3, (privId << 2), srcId);
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetAMUPrivIdToSourceIdMapping
- *
- * @b Description
- * @n The function gets the mapping of a specific AMU privID to source Id
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- privId AMU Priv ID for which the mapping is required.
- srcId Source ID to which the priv ID has been mapped to
- populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_AMU_SRCID_MAP_CPRIVID0_8;SRIO_RIO_AMU_SRCID_MAP_CPRIVID1_9;
- * @n SRIO_RIO_AMU_SRCID_MAP_CPRIVID2_10;SRIO_RIO_AMU_SRCID_MAP_CPRIVID3_11;
- * @n SRIO_RIO_AMU_SRCID_MAP_CPRIVID4_12;SRIO_RIO_AMU_SRCID_MAP_CPRIVID5_13;
- * @n SRIO_RIO_AMU_SRCID_MAP_CPRIVID6_14;SRIO_RIO_AMU_SRCID_MAP_CPRIVID7_15;
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 srcId;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the mapping for Priv ID 1
- CSL_SRIO_GetAMUPrivIdToSourceIdMapping (hSrio, 1, &srcId);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetAMUPrivIdToSourceIdMapping
- (
- CSL_SrioHandle hSrio,
- Uint8 privId,
- Uint8* srcId
- )
- {
- if (privId < 8)
- {
- *srcId = CSL_FEXTR (hSrio->RIO_AMU_SRCID_MAP[0], (privId << 2) + 3, (privId << 2));
- }
- else
- {
- privId = privId - 8;
- *srcId = CSL_FEXTR (hSrio->RIO_AMU_SRCID_MAP[1], (privId << 2) + 3, (privId << 2));
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_MapVBUSPriorityToRIO
- *
- * @b Description
- * @n The function maps the VBUS Priority to RIO Priority.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- vbusPriority VBUS Priority which is to be mapped
- priority RIO Priority to be mapped to.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI0;SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI1;
- * @n SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI2;SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI3;
- * @n SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI4;SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI5;
- * @n SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI6;SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI7
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Map the VBUS Priority 0 to CRITICAL Flow High Priority i.e. 7
- CSL_SRIO_MapVBUSPriorityToRIO (hSrio, 0, 7);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_MapVBUSPriorityToRIO
- (
- CSL_SrioHandle hSrio,
- Uint8 vbusPriority,
- Uint8 priority
- )
- {
- CSL_FINSR (hSrio->RIO_AMU_PRIORITY_MAP, (vbusPriority << 2) + 3, (vbusPriority << 2), priority);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetVBUSPriorityToRIOMapping
- *
- * @b Description
- * @n The function gets the mapping between the VBUS Priority to RIO Priority.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- vbusPriority VBUS Priority for which the mapping is required.
- priority Priority level populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI0;SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI1;
- * @n SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI2;SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI3;
- * @n SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI4;SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI5;
- * @n SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI6;SRIO_RIO_AMU_PRIORITY_MAP_DMA_PRI7
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 priority;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the RIO Priority Level for VBUS Priority 0
- CSL_SRIO_GetVBUSPriorityToRIOMapping (hSrio, 0, &priority);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetVBUSPriorityToRIOMapping
- (
- CSL_SrioHandle hSrio,
- Uint8 vbusPriority,
- Uint8* priority
- )
- {
- *priority = CSL_FEXTR (hSrio->RIO_AMU_PRIORITY_MAP, (vbusPriority << 2) + 3, (vbusPriority << 2));
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetAMUErrorCaptureInfo
- *
- * @b Description
- * @n The function is used to get access to the AMU Error capture information.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- transAddress Transaction Address which caused the error.
- privId Priv ID which caused the error
- mstID Master ID which caused the error.
- doorbellInfo Doorbell Info
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_AMU_CAPT0_MAP,SRIO_RIO_AMU_CAPT1_MAP_CPRIVID,
- * SRIO_RIO_AMU_CAPT1_MAP_CMSTID,SRIO_RIO_AMU_CAPT1_MAP_DOORBELL_INFO
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 transAddress;
- Uint8 privId;
- Uint8 mstID;
- Uint16 doorbellInfo;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the AMU Error Capture Information
- CSL_SRIO_GetAMUErrorCaptureInfo (hSrio, &transAddress, &privId, &mstID, &doorbellInfo);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetAMUErrorCaptureInfo
- (
- CSL_SrioHandle hSrio,
- Uint32* transAddress,
- Uint8* privId,
- Uint8* mstID,
- Uint16* doorbellInfo
- )
- {
- *transAddress = hSrio->RIO_AMU_CAPT0_MAP;
- *privId = CSL_FEXT (hSrio->RIO_AMU_CAPT1_MAP, SRIO_RIO_AMU_CAPT1_MAP_CPRIVID);
- *mstID = CSL_FEXT (hSrio->RIO_AMU_CAPT1_MAP, SRIO_RIO_AMU_CAPT1_MAP_CMSTID);
- *doorbellInfo = CSL_FEXT (hSrio->RIO_AMU_CAPT1_MAP, SRIO_RIO_AMU_CAPT1_MAP_DOORBELL_INFO);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetAMUWindow
- *
- * @b Description
- * @n The function configures the specific AMU Window register
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index AMU Window to be configured
- amuWindow AMU Window Properties to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_AMU_WINDOW_REG0_XAMBS,SRIO_RIO_AMU_WINDOW_REG0_PANE_COUNT,
- * SRIO_RIO_AMU_WINDOW_REG0_PANE_SIZE,SRIO_RIO_AMU_WINDOW_REG0_WINDOW_SIZE,
- * SRIO_RIO_AMU_WINDOW_REG1,SRIO_RIO_AMU_WINDOW_REG2
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- SRIO_AMU_WINDOW amuWindow;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Configure the AMU Window Properties for AMU Window 1
- CSL_SRIO_SetAMUWindow (hSrio, 1, &amuWindow);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetAMUWindow
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- SRIO_AMU_WINDOW* amuWindow
- )
- {
- /* Configure the Window0 Register. */
- hSrio->AMU_WINDOW[index].RIO_AMU_WINDOW_REG0 =
- CSL_FMK (SRIO_RIO_AMU_WINDOW_REG0_XAMBS, amuWindow->xambs) |
- CSL_FMK (SRIO_RIO_AMU_WINDOW_REG0_PANE_COUNT, amuWindow->paneCount) |
- CSL_FMK (SRIO_RIO_AMU_WINDOW_REG0_PANE_SIZE, amuWindow->paneSize) |
- CSL_FMK (SRIO_RIO_AMU_WINDOW_REG0_WINDOW_SIZE,amuWindow->winSize);
- /* Configure the WINDOW1 and WINDOW2 registers. */
- hSrio->AMU_WINDOW[index].RIO_AMU_WINDOW_REG1 = amuWindow->rapidIOMsb;
- hSrio->AMU_WINDOW[index].RIO_AMU_WINDOW_REG2 = amuWindow->rapidIOLsb;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetAMUWindow
- *
- * @b Description
- * @n The function gets the specific AMU Window register
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index AMU Window Index
- amuWindow AMU Window Properties populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_AMU_WINDOW_REG0_XAMBS,SRIO_RIO_AMU_WINDOW_REG0_PANE_COUNT,
- * SRIO_RIO_AMU_WINDOW_REG0_PANE_SIZE,SRIO_RIO_AMU_WINDOW_REG0_WINDOW_SIZE,
- * SRIO_RIO_AMU_WINDOW_REG1,SRIO_RIO_AMU_WINDOW_REG2
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- SRIO_AMU_WINDOW amuWindow;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the AMU Window Properties for AMU Window 1
- CSL_SRIO_GetAMUWindow (hSrio, 1, &amuWindow);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetAMUWindow
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- SRIO_AMU_WINDOW* amuWindow
- )
- {
- Uint32 value = hSrio->AMU_WINDOW[index].RIO_AMU_WINDOW_REG0;
- /* Get the Window0 Register. */
- amuWindow->xambs = CSL_FEXT (value, SRIO_RIO_AMU_WINDOW_REG0_XAMBS);
- amuWindow->paneCount = CSL_FEXT (value, SRIO_RIO_AMU_WINDOW_REG0_PANE_COUNT);
- amuWindow->paneSize = CSL_FEXT (value, SRIO_RIO_AMU_WINDOW_REG0_PANE_SIZE);
- amuWindow->winSize = CSL_FEXT (value, SRIO_RIO_AMU_WINDOW_REG0_WINDOW_SIZE);
- /* Get the WINDOW1 and WINDOW2 registers. */
- amuWindow->rapidIOMsb = hSrio->AMU_WINDOW[index].RIO_AMU_WINDOW_REG1;
- amuWindow->rapidIOLsb = hSrio->AMU_WINDOW[index].RIO_AMU_WINDOW_REG2;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetAMUPane
- *
- * @b Description
- * @n The function configures the specific AMU Pane
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index AMU Pane to be configured
- amuPane AMU Pane Properties to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_AMU_WINDOW_PANE_CMD_ENC,SRIO_RIO_AMU_WINDOW_PANE_PORT_ID,
- * SRIO_RIO_AMU_WINDOW_PANE_ID_SIZE,SRIO_RIO_AMU_WINDOW_PANE_DESTID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- SRIO_AMU_PANE amuPane;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Configure the AMU Pane Properties for AMU Pane 1
- CSL_SRIO_SetAMUPane (hSrio, 1, &amuPane);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetAMUPane
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- SRIO_AMU_PANE* amuPane
- )
- {
- /* Configure the Pane Register. */
- hSrio->RIO_AMU_WINDOW_PANE[index] =
- CSL_FMK (SRIO_RIO_AMU_WINDOW_PANE_CMD_ENC,amuPane->cmdEnc) |
- CSL_FMK (SRIO_RIO_AMU_WINDOW_PANE_PORT_ID,amuPane->portId) |
- CSL_FMK (SRIO_RIO_AMU_WINDOW_PANE_ID_SIZE,amuPane->idSize) |
- CSL_FMK (SRIO_RIO_AMU_WINDOW_PANE_DESTID, amuPane->dstID);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetAMUPane
- *
- * @b Description
- * @n The function gets the specific AMU Pane properties
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index AMU Pane Index
- amuPane AMU Pane Properties populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_AMU_WINDOW_PANE_CMD_ENC,SRIO_RIO_AMU_WINDOW_PANE_PORT_ID,
- * SRIO_RIO_AMU_WINDOW_PANE_ID_SIZE,SRIO_RIO_AMU_WINDOW_PANE_DESTID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- SRIO_AMU_PANE amuPane;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the AMU Pane Properties for AMU Pane 2
- CSL_SRIO_GetAMUPane (hSrio, 2, &amuPane);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetAMUPane
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- SRIO_AMU_PANE* amuPane
- )
- {
- Uint32 value = hSrio->RIO_AMU_WINDOW_PANE[index];
- /* Get the Pane properties. */
- amuPane->cmdEnc = CSL_FEXT (value, SRIO_RIO_AMU_WINDOW_PANE_CMD_ENC);
- amuPane->portId = CSL_FEXT (value, SRIO_RIO_AMU_WINDOW_PANE_PORT_ID);
- amuPane->idSize = CSL_FEXT (value, SRIO_RIO_AMU_WINDOW_PANE_ID_SIZE);
- amuPane->dstID = CSL_FEXT (value, SRIO_RIO_AMU_WINDOW_PANE_DESTID);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetAMUFlowMask
- *
- * @b Description
- * @n The function configures the AMU Flow Mask
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- flowMask Flow Mask to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_AMU_FLOW_MASKS0_AMU_FLOW_MASK
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Configure the AMU Flow Mask
- CSL_SRIO_SetAMUFlowMask (hSrio, 0x0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetAMUFlowMask
- (
- CSL_SrioHandle hSrio,
- Uint16 flowMask
- )
- {
- hSrio->RIO_AMU_FLOW_MASKS0 = CSL_FMK(SRIO_RIO_AMU_FLOW_MASKS0_AMU_FLOW_MASK, flowMask);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetAMUFlowMask
- *
- * @b Description
- * @n The function gets the AMU Flow Mask
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- flowMask Flow Mask to be populated by this API.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_AMU_FLOW_MASKS0_AMU_FLOW_MASK
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 flowMask;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the AMU Flow Mask
- CSL_SRIO_GetAMUFlowMask (hSrio, &flowMask);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetAMUFlowMask
- (
- CSL_SrioHandle hSrio,
- Uint16* flowMask
- )
- {
- *flowMask = CSL_FEXT(hSrio->RIO_AMU_FLOW_MASKS0, SRIO_RIO_AMU_FLOW_MASKS0_AMU_FLOW_MASK);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetLSUTransfer
- *
- * @b Description
- * @n The function sets the specified LSU for a DIO Transfer.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Number which is to be used for the transfer.
- lsuTransfer LSU Transfer Information
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_REG0_RIO_ADDRESS_MSB,
- * @n SRIO_RIO_LSU_REG1_RIO_ADDRESS_LSB,
- * @n SRIO_RIO_LSU_REG2_DSP_ADDRESS,
- * @n SRIO_RIO_LSU_REG3_BYTE_COUNT,SRIO_RIO_LSU_REG3_DRBLL_VALUE,
- * @n SRIO_RIO_LSU_REG4_INT_REQ,SRIO_RIO_LSU_REG4_SUP_GINT,SRIO_RIO_LSU_REG4_XAMBS,
- * @n SRIO_RIO_LSU_REG4_PRIORITY,SRIO_RIO_LSU_REG4_OUTPORTID,SRIO_RIO_LSU_REG4_ID_SIZE,
- * @n SRIO_RIO_LSU_REG4_SRCID_MAP,SRIO_RIO_LSU_REG4_DESTID,
- * @n SRIO_RIO_LSU_REG5_TTYPE,SRIO_RIO_LSU_REG5_FTYPE,SRIO_RIO_LSU_REG5_HOP_COUNT,
- * SRIO_RIO_LSU_REG5_DRBLL_INFO
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- SRIO_LSU_TRANSFER lsuTransfer;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Populate the Transfer Information.
- lsuTransfer.rapidIOMSB = 0x0;
- lsuTransfer.rapidIOLSB = (Uint32)&tx_buffer[0];
- lsuTransfer.dspAddress = (Uint32)&rx_buffer[0];
- lsuTransfer.bytecount = 256;
- lsuTransfer.doorbellValid = 0;
- lsuTransfer.intrRequest = 1;
- lsuTransfer.supInt = 0;
- lsuTransfer.xambs = 0;
- lsuTransfer.priority = 2;
- lsuTransfer.outPortID = 1;
- lsuTransfer.idSize = 1;
- lsuTransfer.srcIDMap = 0;
- lsuTransfer.dstID = 0xDEAD;
- lsuTransfer.ttype = 4;
- lsuTransfer.ftype = 5;
- lsuTransfer.hopCount = 0;
- lsuTransfer.doorbellInfo = 0;
- // Send the transfer on LSU 1
- CSL_SRIO_SetLSUTransfer (hSrio, 1, &lsuTransfer);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetLSUTransfer
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- SRIO_LSU_TRANSFER* lsuTransfer
- )
- {
- /* Configure the Source and Destination Address. */
- hSrio->LSU_CMD[lsu].RIO_LSU_REG0 = lsuTransfer->rapidIOMSB;
- hSrio->LSU_CMD[lsu].RIO_LSU_REG1 = lsuTransfer->rapidIOLSB;
- hSrio->LSU_CMD[lsu].RIO_LSU_REG2 = lsuTransfer->dspAddress;
- /* Configure the number of bytes which need to be transferred. */
- hSrio->LSU_CMD[lsu].RIO_LSU_REG3 =
- CSL_FMK (SRIO_RIO_LSU_REG3_BYTE_COUNT, lsuTransfer->bytecount) |
- CSL_FMK (SRIO_RIO_LSU_REG3_DRBLL_VALUE,lsuTransfer->doorbellValid);
- /* Configure outgoing port ID, Priority and other RIO parameters. */
- hSrio->LSU_CMD[lsu].RIO_LSU_REG4 =
- CSL_FMK(SRIO_RIO_LSU_REG4_INT_REQ, lsuTransfer->intrRequest) |
- CSL_FMK(SRIO_RIO_LSU_REG4_SRCID_MAP, lsuTransfer->srcIDMap) |
- CSL_FMK(SRIO_RIO_LSU_REG4_SUP_GINT, lsuTransfer->supInt) |
- CSL_FMK(SRIO_RIO_LSU_REG4_DESTID, lsuTransfer->dstID) |
- CSL_FMK(SRIO_RIO_LSU_REG4_ID_SIZE, lsuTransfer->idSize) |
- CSL_FMK(SRIO_RIO_LSU_REG4_XAMBS, lsuTransfer->xambs) |
- CSL_FMK(SRIO_RIO_LSU_REG4_PRIORITY, lsuTransfer->priority) |
- CSL_FMK(SRIO_RIO_LSU_REG4_OUTPORTID, lsuTransfer->outPortID);
- /* Configure the type of request, doorbell information etc. */
- hSrio->LSU_CMD[lsu].RIO_LSU_REG5 =
- CSL_FMK(SRIO_RIO_LSU_REG5_TTYPE, lsuTransfer->ttype) |
- CSL_FMK(SRIO_RIO_LSU_REG5_FTYPE, lsuTransfer->ftype) |
- CSL_FMK(SRIO_RIO_LSU_REG5_HOP_COUNT, lsuTransfer->hopCount) |
- CSL_FMK(SRIO_RIO_LSU_REG5_DRBLL_INFO, lsuTransfer->doorbellInfo);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetLSUReg0
- *
- * @b Description
- * @n The function configures the REG0 of the specified LSU
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Number
- rapidIOMSB Address to be configured in the REG0
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_REG0_RIO_ADDRESS_MSB
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Configure REG0 of LSU 0
- CSL_SRIO_SetLSUReg0(hSrio, 0, 0x0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetLSUReg0
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- Uint32 rapidIOMSB
- )
- {
- hSrio->LSU_CMD[lsu].RIO_LSU_REG0 = rapidIOMSB;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetLSUReg1
- *
- * @b Description
- * @n The function configures the REG1 of the specified LSU
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Number
- rapidIOLSB Address to be configured in the REG1
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_REG1_RIO_ADDRESS_LSB
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Configure REG1 of LSU 0
- CSL_SRIO_SetLSUReg1(hSrio, 0, 0x0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetLSUReg1
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- Uint32 rapidIOLSB
- )
- {
- hSrio->LSU_CMD[lsu].RIO_LSU_REG1 = rapidIOLSB;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetLSUReg2
- *
- * @b Description
- * @n The function configures the REG2 of the specified LSU
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Number
- dspAddress Address to be configured in the REG2
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_REG2_DSP_ADDRESS
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Configure REG2 of LSU 0
- CSL_SRIO_SetLSUReg2(hSrio, 0, &myBuffer);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetLSUReg2
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- Uint32 dspAddress
- )
- {
- hSrio->LSU_CMD[lsu].RIO_LSU_REG2 = dspAddress;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetLSUReg3
- *
- * @b Description
- * @n The function configures the REG3 of the specified LSU
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Number
- byteCount Byte Count
- doorbellValid Doorbell valid flag
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_REG3_BYTE_COUNT,SRIO_RIO_LSU_REG3_DRBLL_VALUE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Configure REG3 of LSU 0
- CSL_SRIO_SetLSUReg3(hSrio, 0, 100, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetLSUReg3
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- Uint32 byteCount,
- Uint8 doorbellValid
- )
- {
- hSrio->LSU_CMD[lsu].RIO_LSU_REG3 =
- CSL_FMK (SRIO_RIO_LSU_REG3_BYTE_COUNT, byteCount) |
- CSL_FMK (SRIO_RIO_LSU_REG3_DRBLL_VALUE,doorbellValid);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetLSUReg4
- *
- * @b Description
- * @n The function configures the REG4 of the specified LSU
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Number
- byteCount Byte Count
- doorbellValid Doorbell valid flag
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_REG4_DESTID, SRIO_RIO_LSU_REG4_SRCID_MAP, SRIO_RIO_LSU_REG4_ID_SIZE,
- * @n SRIO_RIO_LSU_REG4_OUTPORTID, SRIO_RIO_LSU_REG4_PRIORITY, SRIO_RIO_LSU_REG4_XAMBS,
- * @n SRIO_RIO_LSU_REG4_SUP_GINT, SRIO_RIO_LSU_REG4_INT_REQ
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Configure REG4 of LSU 0
- CSL_SRIO_SetLSUReg4(hSrio, 0, 0xBEEF, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetLSUReg4
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- Uint16 dstId,
- Uint8 srcIdMap,
- Uint8 idSize,
- Uint8 outPortId,
- Uint8 priority,
- Uint8 xambs,
- Uint8 supGoodInt,
- Uint8 intRequest
- )
- {
- hSrio->LSU_CMD[lsu].RIO_LSU_REG4 =
- CSL_FMK(SRIO_RIO_LSU_REG4_INT_REQ, intRequest) |
- CSL_FMK(SRIO_RIO_LSU_REG4_SRCID_MAP, srcIdMap) |
- CSL_FMK(SRIO_RIO_LSU_REG4_SUP_GINT, supGoodInt) |
- CSL_FMK(SRIO_RIO_LSU_REG4_DESTID, dstId) |
- CSL_FMK(SRIO_RIO_LSU_REG4_ID_SIZE, idSize) |
- CSL_FMK(SRIO_RIO_LSU_REG4_XAMBS, xambs) |
- CSL_FMK(SRIO_RIO_LSU_REG4_PRIORITY, priority) |
- CSL_FMK(SRIO_RIO_LSU_REG4_OUTPORTID, outPortId);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetLSUReg5
- *
- * @b Description
- * @n The function configures the REG5 of the specified LSU
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Number
- ttype TTYPE value
- ftype FTYPE value
- hopCount Hop Count
- doorBellInfo Doorbell Information
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_REG5_TTYPE, SRIO_RIO_LSU_REG5_FTYPE,
- * @n SRIO_RIO_LSU_REG5_HOP_COUNT, SRIO_RIO_LSU_REG5_DRBLL_INFO
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Configure REG5 of LSU 0
- CSL_SRIO_SetLSUReg5(hSrio, 0, 4, 5, 1, 0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetLSUReg5
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- Uint8 ttype,
- Uint8 ftype,
- Uint8 hopCount,
- Uint16 doorbellInfo
- )
- {
- hSrio->LSU_CMD[lsu].RIO_LSU_REG5 =
- CSL_FMK(SRIO_RIO_LSU_REG5_TTYPE, ttype) |
- CSL_FMK(SRIO_RIO_LSU_REG5_FTYPE, ftype) |
- CSL_FMK(SRIO_RIO_LSU_REG5_HOP_COUNT, hopCount) |
- CSL_FMK(SRIO_RIO_LSU_REG5_DRBLL_INFO, doorbellInfo);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_IsLSUFull
- *
- * @b Description
- * @n The function checks if the specific LSU is BUSY or not?
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Number which is to checked
- @endverbatim
- *
- * <b> Return Value </b>
- * @n TRUE - All the LSU Shadow Registers are being used
- * @n FALSE - There is space in the LSU Shadow Registers
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_LSU_REG6_FULL
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- SRIO_LSU_TRANSFER lsuTransfer;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Wait around till there is space to write
- while (1)
- {
- if (CSL_SRIO_IsLSUFull (hSrio, 1) == FALSE)
- break;
- }
-
- // Populate the Transfer Information.
- lsuTransfer.rapidIOMSB = 0x0;
- lsuTransfer.rapidIOLSB = (Uint32)&tx_buffer[0];
- lsuTransfer.dspAddress = (Uint32)&rx_buffer[0];
- lsuTransfer.bytecount = 256;
- lsuTransfer.doorbellValid = 0;
- lsuTransfer.intrRequest = 1;
- lsuTransfer.supInt = 0;
- lsuTransfer.xambs = 0;
- lsuTransfer.priority = 2;
- lsuTransfer.outPortID = 1;
- lsuTransfer.idSize = 1;
- lsuTransfer.srcIDMap = 0;
- lsuTransfer.dstID = 0xDEAD;
- lsuTransfer.ttype = 4;
- lsuTransfer.ftype = 5;
- lsuTransfer.hopCount = 0;
- lsuTransfer.doorbellInfo = 0;
- // Send the transfer on LSU 1
- CSL_SRIO_SetLSUTransfer (hSrio, 1, &lsuTransfer);
- @endverbatim
- * =============================================================================
- */
- static inline Bool CSL_SRIO_IsLSUFull
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu
- )
- {
- if (CSL_FEXT(hSrio->LSU_CMD[lsu].RIO_LSU_REG6, SRIO_RIO_LSU_REG6_FULL) == 1)
- return TRUE;
- return FALSE;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_IsLSUBusy
- *
- * @b Description
- * @n The function checks if the specific LSU is BUSY or not?
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Number which is to checked
- @endverbatim
- *
- * <b> Return Value </b>
- * @n TRUE - LSU is Busy
- * @n FALSE - LSU is Free
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_LSU_REG6_BUSY
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- SRIO_LSU_TRANSFER lsuTransfer;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Populate the Transfer Information.
- lsuTransfer.rapidIOMSB = 0x0;
- lsuTransfer.rapidIOLSB = (Uint32)&tx_buffer[0];
- lsuTransfer.dspAddress = (Uint32)&rx_buffer[0];
- lsuTransfer.bytecount = 256;
- lsuTransfer.doorbellValid = 0;
- lsuTransfer.intrRequest = 1;
- lsuTransfer.supInt = 0;
- lsuTransfer.xambs = 0;
- lsuTransfer.priority = 2;
- lsuTransfer.outPortID = 1;
- lsuTransfer.idSize = 1;
- lsuTransfer.srcIDMap = 0;
- lsuTransfer.dstID = 0xDEAD;
- lsuTransfer.ttype = 4;
- lsuTransfer.ftype = 5;
- lsuTransfer.hopCount = 0;
- lsuTransfer.doorbellInfo = 0;
- // Send the transfer on LSU 1
- CSL_SRIO_SetLSUTransfer (hSrio, 1, &lsuTransfer);
- // Wait around till the transfer is completed.
- while (1)
- {
- if (CSL_SRIO_IsLSUBusy (hSrio, 1) == FALSE)
- break;
- }
- // Control comes here indicating that the transfer was completed.
- ...
- @endverbatim
- * =============================================================================
- */
- static inline Bool CSL_SRIO_IsLSUBusy
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu
- )
- {
- if (CSL_FEXT(hSrio->LSU_CMD[lsu].RIO_LSU_REG6, SRIO_RIO_LSU_REG6_BUSY) == 1)
- return TRUE;
- return FALSE;
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetLSUContextTransaction
- *
- * @b Description
- * @n The function gets the LSU Context bit which can be used by the
- * transaction to identify if the context of the completion code is with
- * respect to the current transaction or not
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Index
- context Context Information populated by this API
- transID Transaction ID populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_LSU_REG6_LCB,SRIO_RIO_LSU_REG6_LTID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 context;
- Uint8 transID;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the LSU Context and Transaction Information.
- CSL_SRIO_GetLSUContextTransaction (hSrio, &context, &transID);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetLSUContextTransaction
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- Uint8* context,
- Uint8* transID
- )
- {
- Uint32 value = hSrio->LSU_CMD[lsu].RIO_LSU_REG6;
- /* Populate the context and transaction identifier. */
- *context = CSL_FEXT (value, SRIO_RIO_LSU_REG6_LCB);
- *transID = CSL_FEXT (value, SRIO_RIO_LSU_REG6_LTID);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_CancelLSUTransaction
- *
- * @b Description
- * @n The function is used to cancel an LSU Transaction previously submitted.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Index
- privID Priv ID of the original transaction submitter.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_REG6_CBUSY = 1,
- * @n SRIO_RIO_LSU_REG6_PRIVID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Cancel the LSU Transaction for LSU 0 for PRIV-ID 1
- CSL_SRIO_CancelLSUTransaction (hSrio, 0, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_CancelLSUTransaction
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- Uint8 privID
- )
- {
- hSrio->LSU_CMD[lsu].RIO_LSU_REG6 =
- CSL_FMK(SRIO_RIO_LSU_REG6_CBUSY, 1) |
- CSL_FMK(SRIO_RIO_LSU_REG6_PRIVID, privID);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_RestartLSUTransaction
- *
- * @b Description
- * @n The function is used to restart an LSU Transaction which had been halted
- * due to an error condition.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Index which needs to be restarted
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_REG6_RESTART=1
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Restart the LSU transaction 1
- CSL_SRIO_RestartLSUTransaction (hSrio, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_RestartLSUTransaction
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu
- )
- {
- hSrio->LSU_CMD[lsu].RIO_LSU_REG6 = CSL_FMK (SRIO_RIO_LSU_REG6_RESTART, 1);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_FlushLSUTransaction
- *
- * @b Description
- * @n The function is used to flush an LSU Transaction previously submitted
- * and which matches the SRCID specified here.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Index which needs to be flushed
- srcIDMap Source ID
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_REG6_SCRID_MAP, SRIO_RIO_LSU_REG6_FLUSH=1
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Flush the LSU transaction on LSU 1 with SRC ID 0x0
- CSL_SRIO_FlushLSUTransaction (hSrio, 1, 0x0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_FlushLSUTransaction
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- Uint8 srcIDMap
- )
- {
- CSL_FINS (hSrio->LSU_CMD[lsu].RIO_LSU_REG6, SRIO_RIO_LSU_REG6_SCRID_MAP, srcIDMap);
- CSL_FINS (hSrio->LSU_CMD[lsu].RIO_LSU_REG6, SRIO_RIO_LSU_REG6_FLUSH, 1);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetLSUShadowRegs
- *
- * @b Description
- * @n The function is used to configure the number of LSU Shadow Registers.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- shadowGrp0 Number of Shadow Registers associated with LSU0-3
- shadowGrp1 Number of Shadow Registers associated with LSU4-7
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_SETUP_REG0_SHADOW_GRP0, SRIO_RIO_LSU_SETUP_REG0_SHADOW_GRP1
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Set the LSU Shadow Regs as 4 for LSU 0-3 and 4 for LSU 4-7
- CSL_SRIO_SetLSUShadowRegs (hSrio, 0x0, 0x0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetLSUShadowRegs
- (
- CSL_SrioHandle hSrio,
- Uint32 shadowGrp0,
- Uint32 shadowGrp1
- )
- {
- hSrio->RIO_LSU_SETUP_REG0 = CSL_FMK(SRIO_RIO_LSU_SETUP_REG0_SHADOW_GRP0, shadowGrp0) |
- CSL_FMK(SRIO_RIO_LSU_SETUP_REG0_SHADOW_GRP1, shadowGrp1);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetLSUShadowRegs
- *
- * @b Description
- * @n The function is used to get the number of shadow registers associated
- * with each LSU.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Index for which the count is required
- count Number of Shadow Registers associated with the specified LSU
- populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_LSU_SETUP_REG0_LSU0_CNT;SRIO_RIO_LSU_SETUP_REG0_LSU1_CNT;
- * SRIO_RIO_LSU_SETUP_REG0_LSU2_CNT;SRIO_RIO_LSU_SETUP_REG0_LSU3_CNT;
- * SRIO_RIO_LSU_SETUP_REG0_LSU4_CNT;SRIO_RIO_LSU_SETUP_REG0_LSU5_CNT;
- * SRIO_RIO_LSU_SETUP_REG0_LSU6_CNT;SRIO_RIO_LSU_SETUP_REG0_LSU7_CNT
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 count;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the number of shadow register for LSU 1
- CSL_SRIO_GetLSUShadowRegs (hSrio, 1, &count);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetLSUShadowRegs
- (
- CSL_SrioHandle hSrio,
- Uint8 index,
- Uint8* count
- )
- {
- if (index == 0)
- *count = CSL_FEXT (hSrio->RIO_LSU_SETUP_REG0, SRIO_RIO_LSU_SETUP_REG0_LSU0_CNT);
- else if (index == 1)
- *count = CSL_FEXT (hSrio->RIO_LSU_SETUP_REG0, SRIO_RIO_LSU_SETUP_REG0_LSU1_CNT);
- else if (index == 2)
- *count = CSL_FEXT (hSrio->RIO_LSU_SETUP_REG0, SRIO_RIO_LSU_SETUP_REG0_LSU2_CNT);
- else if (index == 3)
- *count = CSL_FEXT (hSrio->RIO_LSU_SETUP_REG0, SRIO_RIO_LSU_SETUP_REG0_LSU3_CNT);
- else if (index == 4)
- *count = CSL_FEXT (hSrio->RIO_LSU_SETUP_REG0, SRIO_RIO_LSU_SETUP_REG0_LSU4_CNT);
- else if (index == 5)
- *count = CSL_FEXT (hSrio->RIO_LSU_SETUP_REG0, SRIO_RIO_LSU_SETUP_REG0_LSU5_CNT);
- else if (index == 6)
- *count = CSL_FEXT (hSrio->RIO_LSU_SETUP_REG0, SRIO_RIO_LSU_SETUP_REG0_LSU6_CNT);
- else if (index == 7)
- *count = CSL_FEXT (hSrio->RIO_LSU_SETUP_REG0, SRIO_RIO_LSU_SETUP_REG0_LSU7_CNT);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_EnableSrcIDInterrupts
- *
- * @b Description
- * @n The function is used to enable the LSU interrupts to based on the SRCID
- * and not on the LSU specific interrupt bit.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index LSU Index to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=0;SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=0;
- * @n SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=0;SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=0;
- * @n SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=06;SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=0;
- * @n SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=0
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Enable Source ID interrupts for LSU 1
- CSL_SRIO_EnableSrcIDInterrupts (hSrio, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_EnableSrcIDInterrupts
- (
- CSL_SrioHandle hSrio,
- Uint8 index
- )
- {
- if (index == 0)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 0, 0, 0);
- else if (index == 1)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 1, 1, 0);
- else if (index == 2)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 2, 2, 0);
- else if (index == 3)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 3, 3, 0);
- else if (index == 4)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 4, 4, 0);
- else if (index == 5)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 5, 5, 0);
- else if (index == 6)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 6, 6, 0);
- else if (index == 7)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 7, 7, 0);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_DisableSrcIDInterrupts
- *
- * @b Description
- * @n The function is used to enable the LSU interrupts to based on the LSU
- * specific interrupt bit and not on the SRCID.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- index LSU Index to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=1;SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=2;
- * @n SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=4;SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=8;
- * @n SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=16;SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=32;
- * @n SRIO_RIO_LSU_SETUP_REG1_LSU_EDMA=64
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Disable SRC ID interrupts for LSU 2
- CSL_SRIO_DisableSrcIDInterrupts (hSrio, 2);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_DisableSrcIDInterrupts
- (
- CSL_SrioHandle hSrio,
- Uint8 index
- )
- {
- if (index == 0)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 0, 0, 1);
- else if (index == 1)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 1, 1, 1);
- else if (index == 2)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 2, 2, 1);
- else if (index == 3)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 3, 3, 1);
- else if (index == 4)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 4, 4, 1);
- else if (index == 5)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 5, 5, 1);
- else if (index == 6)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 6, 6, 1);
- else if (index == 7)
- CSL_FINSR (hSrio->RIO_LSU_SETUP_REG1, 7, 7, 1);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetTimeoutCnt
- *
- * @b Description
- * @n The function is used to set the number of timecode changes after an error
- * condition before the current LSU transaction is discarded and a new
- * transaction is loaded from the shadow register.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- timeoutCnt Time out count to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_SETUP_REG1_TIMEOUT_CNT
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Set the Timeout Count to be 1
- CSL_SRIO_SetTimeoutCnt (hSrio, 2);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetTimeoutCnt
- (
- CSL_SrioHandle hSrio,
- Uint8 timeoutCnt
- )
- {
- CSL_FINS (hSrio->RIO_LSU_SETUP_REG1, SRIO_RIO_LSU_SETUP_REG1_TIMEOUT_CNT, timeoutCnt);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetTimeoutCnt
- *
- * @b Description
- * @n The function is used to get the number of timecode changes after an error
- * condition before the current LSU transaction is discarded and a new
- * transaction is loaded from the shadow register.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- timeoutCnt Time out count to be populated by this API.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_LSU_SETUP_REG1_TIMEOUT_CNT
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 timeoutCnt;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the Timeout Count
- CSL_SRIO_GetTimeoutCnt (hSrio, &timeoutCnt);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetTimeoutCnt
- (
- CSL_SrioHandle hSrio,
- Uint8* timeoutCnt
- )
- {
- *timeoutCnt = CSL_FEXT (hSrio->RIO_LSU_SETUP_REG1, SRIO_RIO_LSU_SETUP_REG1_TIMEOUT_CNT);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetLSUCompletionCode
- *
- * @b Description
- * @n The function gets the completion code for a previous executed transfer.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Number which is to checked
- transId Transaction ID for which the completion code is
- required.
- compCode Completion Code populated by this API
- contextBit Context Bit populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_LSU_STAT_REG
-
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 context;
- Uint8 transID;
- SRIO_LSU_TRANSFER lsuTransfer;
- Uint8 compCode;
- Uint8 contextBit;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the LSU Context and Transaction Information.
- CSL_SRIO_GetLSUContextTransaction (hSrio, &context, &transID);
- ...
- // Send the transfer on LSU 1
- CSL_SRIO_SetLSUTransfer (hSrio, 1, &lsuTransfer);
- // Wait around till the transfer is completed.
- while (1)
- {
- if (CSL_SRIO_IsLSUBusy (hSrio, 1) == FALSE)
- break;
- }
- // Get the completion code.
- CSL_SRIO_GetLSUCompletionCode (hSrio, 1, transID, &compCode, &contextBit);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetLSUCompletionCode
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- Uint8 transID,
- Uint8* compCode,
- Uint8* contextBit
- )
- {
- Uint8 lsuRegIndex;
- /* Check the LSU for which the completion code is required. */
- if ((lsu == 0) || (lsu == 4))
- {
- /* LSU0 or LSU4: Determine which register index we need to access.
- * For LSU0 the register index is 0 and 1; but for LSU4 the register index is 3 and 4 */
- if (lsu == 0)
- lsuRegIndex = 0;
- else
- lsuRegIndex = 3;
- /* There are 9 pending LSU Transaction ID for this. */
- if (transID < 8)
- {
- /* Transaction ID 0-7 are handled here. */
- *compCode = CSL_FEXTR(hSrio->LSU_STAT_REG[lsuRegIndex], ((transID << 2) + 3), ((transID << 2) + 1));
- *contextBit = CSL_FEXTR(hSrio->LSU_STAT_REG[lsuRegIndex], (transID << 2), (transID << 2));
- }
- else
- {
- /* Transaction ID 8 is handled here. */
- *compCode = CSL_FEXTR(hSrio->LSU_STAT_REG[lsuRegIndex+1], 3, 1);
- *contextBit = CSL_FEXTR(hSrio->LSU_STAT_REG[lsuRegIndex+1], 0, 0);
- }
- }
- else if ((lsu == 1) || (lsu == 5))
- {
- /* LSU1 or LSU5: Determine which register index we need to access.
- * For LSU1 the register index is 1; but for LSU5 the register index is 4 */
- if (lsu == 1)
- lsuRegIndex = 1;
- else
- lsuRegIndex = 4;
- /* There are 6 pending LSU Transaction ID for this. */
- *compCode = CSL_FEXTR(hSrio->LSU_STAT_REG[lsuRegIndex], ((transID << 2) + 7), ((transID << 2) + 5));
- *contextBit = CSL_FEXTR(hSrio->LSU_STAT_REG[lsuRegIndex], ((transID << 2) + 4), ((transID << 2) + 4));
- }
- else if ((lsu == 2) || (lsu == 6))
- {
- /* LSU2 or LSU6: Determine which register index we need to access.
- * For LSU2 the register index is 1 and 2; but for LSU5 the register index is 4 and 5 */
- if (lsu == 2)
- lsuRegIndex = 1;
- else
- lsuRegIndex = 4;
- /* There are 5 pending LSU Transaction ID for this. */
- if (transID == 0)
- {
- /* Transaction ID 0 is handled here. */
- *compCode = CSL_FEXTR(hSrio->LSU_STAT_REG[lsuRegIndex], 31, 29);
- *contextBit = CSL_FEXTR(hSrio->LSU_STAT_REG[lsuRegIndex], 28, 28);
- }
- else
- {
- /* Transaction ID 1-4 are handled here. */
- *compCode = CSL_FEXTR(hSrio->LSU_STAT_REG[lsuRegIndex+1], ((transID << 2) - 1), ((transID << 2) - 3));
- *contextBit = CSL_FEXTR(hSrio->LSU_STAT_REG[lsuRegIndex+1], ((transID << 2) - 4), ((transID << 2) - 4));
- }
- }
- else if ((lsu == 3) || (lsu == 7))
- {
- /* LSU3 or LSU7: Determine which register index we need to access.
- * For LSU3 the register index is 2; but for LSU5 the register index is 5 */
- if (lsu == 3)
- lsuRegIndex = 2;
- else
- lsuRegIndex = 5;
- /* There are 4 pending LSU Transaction ID for this. */
- *compCode = CSL_FEXTR(hSrio->LSU_STAT_REG[lsuRegIndex], ((transID << 2) + 19), ((transID << 2) + 17));
- *contextBit = CSL_FEXTR(hSrio->LSU_STAT_REG[lsuRegIndex], ((transID << 2) + 16), ((transID << 2) + 16));
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetLSUFlowMask
- *
- * @b Description
- * @n The function is used to set the LSU Flow Masks
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Number for which flow mask is to be configured
- flowMask Flow Mask to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_LSU_FLOW_MASKS_LSU_EVEN_FLOW_MASK;SRIO_RIO_LSU_FLOW_MASKS_LSU_ODD_FLOW_MASK
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Set the LSU Flow Mask for LSU 0 to use Flow 1
- CSL_SRIO_SetLSUFlowMask (hSrio, 0, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetLSUFlowMask
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- Uint16 flowMask
- )
- {
- switch (lsu)
- {
- case 0:
- {
- CSL_FINSR(hSrio->RIO_LSU_FLOW_MASKS[0], 15, 0, flowMask);
- break;
- }
- case 1:
- {
- CSL_FINSR(hSrio->RIO_LSU_FLOW_MASKS[0], 31, 16,flowMask);
- break;
- }
- case 2:
- {
- CSL_FINSR(hSrio->RIO_LSU_FLOW_MASKS[1], 15, 0, flowMask);
- break;
- }
- case 3:
- {
- CSL_FINSR(hSrio->RIO_LSU_FLOW_MASKS[1], 31, 16,flowMask);
- break;
- }
- case 4:
- {
- CSL_FINSR(hSrio->RIO_LSU_FLOW_MASKS[2], 15, 0, flowMask);
- break;
- }
- case 5:
- {
- CSL_FINSR(hSrio->RIO_LSU_FLOW_MASKS[2], 31, 16,flowMask);
- break;
- }
- case 6:
- {
- CSL_FINSR(hSrio->RIO_LSU_FLOW_MASKS[3], 15, 0, flowMask);
- break;
- }
- case 7:
- {
- CSL_FINSR(hSrio->RIO_LSU_FLOW_MASKS[3], 31, 16,flowMask);
- break;
- }
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetLSUFlowMask
- *
- * @b Description
- * @n The function is used to get the LSU Flow Masks
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- lsu LSU Number for which flow mask is to be retreived.
- flowMask Flow Mask to be populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_LSU_FLOW_MASKS_LSU_FLOW_MASK
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint16 flowMask;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the LSU Flow Mask for LSU 0
- CSL_SRIO_GetLSUFlowMask (hSrio, 0, &flowMask);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetLSUFlowMask
- (
- CSL_SrioHandle hSrio,
- Uint8 lsu,
- Uint16* flowMask
- )
- {
- switch (lsu)
- {
- case 0:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_LSU_FLOW_MASKS[0], 15, 0);
- break;
- }
- case 1:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_LSU_FLOW_MASKS[0], 31, 16);
- break;
- }
- case 2:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_LSU_FLOW_MASKS[1], 15, 0);
- break;
- }
- case 3:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_LSU_FLOW_MASKS[1], 31, 16);
- break;
- }
- case 4:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_LSU_FLOW_MASKS[2], 15, 0);
- break;
- }
- case 5:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_LSU_FLOW_MASKS[2], 31, 16);
- break;
- }
- case 6:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_LSU_FLOW_MASKS[3], 15, 0);
- break;
- }
- case 7:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_LSU_FLOW_MASKS[3], 31, 16);
- break;
- }
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetSupervisorPerms
- *
- * @b Description
- * @n The function is used to set the supervisor permissions
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- supervisor16ID 16 bit Supervisor ID
- supervisor8ID 8 bit Supervisor ID
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_SUPERVISOR_ID_16B_SUPRVSR_ID,SRIO_RIO_SUPERVISOR_ID_8B_SUPRVSR_ID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Set the Supervisor Permissions for Source ID 0xBEEF
- CSL_SRIO_SetSupervisorPerms (hSrio, 0xBEEF, 0x0);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetSupervisorPerms
- (
- CSL_SrioHandle hSrio,
- Uint16 supervisor16ID,
- Uint8 supervisor8ID
- )
- {
- hSrio->RIO_SUPERVISOR_ID = CSL_FMK(SRIO_RIO_SUPERVISOR_ID_16B_SUPRVSR_ID,supervisor16ID) |
- CSL_FMK(SRIO_RIO_SUPERVISOR_ID_8B_SUPRVSR_ID, supervisor8ID);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetSupervisorPerms
- *
- * @b Description
- * @n The function is used to get the supervisor source ID.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- supervisor16ID 16 bit Supervisor ID populated by this API
- supervisor8ID 8 bit Supervisor ID populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_SUPERVISOR_ID_16B_SUPRVSR_ID,SRIO_RIO_SUPERVISOR_ID_8B_SUPRVSR_ID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 super8ID;
- Uint16 super16ID;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the Supervisor Permissions.
- CSL_SRIO_GetSupervisorPerms (hSrio, &super16ID, &super8ID);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetSupervisorPerms
- (
- CSL_SrioHandle hSrio,
- Uint16* supervisor16ID,
- Uint8* supervisor8ID
- )
- {
- *supervisor16ID = CSL_FEXT (hSrio->RIO_SUPERVISOR_ID, SRIO_RIO_SUPERVISOR_ID_16B_SUPRVSR_ID);
- *supervisor8ID = CSL_FEXT (hSrio->RIO_SUPERVISOR_ID, SRIO_RIO_SUPERVISOR_ID_8B_SUPRVSR_ID);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetFlowControl
- *
- * @b Description
- * @n The function is used to set the RIO flow control.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- flowControlIdx Flow Control Index which is to be configured.
- tt Flag which defines 16 bit or 8 bit identifiers. Set to
- 1 for 16 bit identifiers 0 for 8 bit.
- dstID Destination ID matching the flow
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_FLOW_CNTL_TT, SRIO_RIO_FLOW_CNTL_FLOW_CNTL_ID
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Set the SRIO Flow Control 0 for Destination ID 0xBEEF
- // since the destination ID is 16 bit we set the TT flag as 1
- CSL_SRIO_SetFlowControl (hSrio, 0, 1, 0xBEEF);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetFlowControl
- (
- CSL_SrioHandle hSrio,
- Uint8 flowControlIdx,
- Uint8 tt,
- Uint16 dstID
- )
- {
- hSrio->RIO_FLOW_CNTL[flowControlIdx] = CSL_FMK(SRIO_RIO_FLOW_CNTL_FLOW_CNTL_ID,dstID) |
- CSL_FMK(SRIO_RIO_FLOW_CNTL_TT, tt);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetFlowControl
- *
- * @b Description
- * @n The function is used to get the RIO flow control.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- flowControlIdx Flow Control Index for which the configuration is required.
- tt Flag which defines 16 bit or 8 bit identifiers populated by
- the API
- dstID Destination ID matching the flow populated by the API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_FLOW_CNTL_FLOW_CNTL_ID,SRIO_RIO_FLOW_CNTL_TT
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 tt;
- Uint16 dstID;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the SRIO Flow Control 0
- CSL_SRIO_GetFlowControl (hSrio, 0, &tt, &dstID);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetFlowControl
- (
- CSL_SrioHandle hSrio,
- Uint8 flowControlIdx,
- Uint8* tt,
- Uint16* dstID
- )
- {
- Uint32 value = hSrio->RIO_FLOW_CNTL[flowControlIdx];
- /* Extract the fields from the RIO Flow Control */
- *dstID = CSL_FEXT(value, SRIO_RIO_FLOW_CNTL_FLOW_CNTL_ID);
- *tt = CSL_FEXT(value, SRIO_RIO_FLOW_CNTL_TT);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetTxCPPIFlowMask
- *
- * @b Description
- * @n The function is used to set the Transmit CPPI Flow Masks
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- txCPPI Transmit CPPI Flow Index
- flowMask Flow Mask to be configured.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_TX_CPPI_FLOW_MASKS_TX_QUEUE_EVEN_FLOW_MASK;
- * @n SRIO_RIO_TX_CPPI_FLOW_MASKS_TX_QUEUE_ODD_FLOW_MASK
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Set the Transmit CPPI Flow Mask for 0 to use Flow 1
- CSL_SRIO_SetTxCPPIFlowMask (hSrio, 0, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetTxCPPIFlowMask
- (
- CSL_SrioHandle hSrio,
- Uint8 txCPPI,
- Uint16 flowMask
- )
- {
- switch (txCPPI)
- {
- case 0:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[0], 15, 0, flowMask);
- break;
- }
- case 1:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[0], 31, 16, flowMask);
- break;
- }
- case 2:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[1], 15, 0, flowMask);
- break;
- }
- case 3:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[1], 31, 16, flowMask);
- break;
- }
- case 4:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[2], 15, 0, flowMask);
- break;
- }
- case 5:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[2], 31, 16, flowMask);
- break;
- }
- case 6:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[3], 15, 0, flowMask);
- break;
- }
- case 7:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[3], 31, 16, flowMask);
- break;
- }
- case 8:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[4], 15, 0, flowMask);
- break;
- }
- case 9:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[4], 31, 16, flowMask);
- break;
- }
- case 10:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[5], 15, 0, flowMask);
- break;
- }
- case 11:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[5], 31, 16, flowMask);
- break;
- }
- case 12:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[6], 15, 0, flowMask);
- break;
- }
- case 13:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[6], 31, 16, flowMask);
- break;
- }
- case 14:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[7], 15, 0, flowMask);
- break;
- }
- case 15:
- {
- CSL_FINSR(hSrio->RIO_TX_CPPI_FLOW_MASKS[7], 31, 16, flowMask);
- break;
- }
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetTxCPPIFlowMask
- *
- * @b Description
- * @n The function is used to get the Transmit CPPI Flow Masks
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- txCPPI Transmit CPPI Flow Index
- flowMask Flow Mask to be populated by this API.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_TX_CPPI_FLOW_MASKS_TX_QUEUE_FLOW_MASK
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint16 flowMask;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the Transmit CPPI Flow Mask for 0 to use Flow 1
- CSL_SRIO_GetTxCPPIFlowMask (hSrio, 0, &flowMask);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetTxCPPIFlowMask
- (
- CSL_SrioHandle hSrio,
- Uint8 txCPPI,
- Uint16* flowMask
- )
- {
- switch (txCPPI)
- {
- case 0:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[0], 15, 0);
- break;
- }
- case 1:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[0], 31, 16);
- break;
- }
- case 2:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[1], 15, 0);
- break;
- }
- case 3:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[1], 31, 16);
- break;
- }
- case 4:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[2], 15, 0);
- break;
- }
- case 5:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[2], 31, 16);
- break;
- }
- case 6:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[3], 15, 0);
- break;
- }
- case 7:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[3], 31, 16);
- break;
- }
- case 8:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[4], 15, 0);
- break;
- }
- case 9:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[4], 31, 16);
- break;
- }
- case 10:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[5], 15, 0);
- break;
- }
- case 11:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[5], 31, 16);
- break;
- }
- case 12:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[6], 15, 0);
- break;
- }
- case 13:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[6], 31, 16);
- break;
- }
- case 14:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[7], 15, 0);
- break;
- }
- case 15:
- {
- *flowMask = CSL_FEXTR(hSrio->RIO_TX_CPPI_FLOW_MASKS[7], 31, 16);
- break;
- }
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetTxQueueSchedInfo
- *
- * @b Description
- * @n The function is used to set the port and scheduler information for a
- * specific transmit queue.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- txQueue Transmit Queue Index for which information is configured.
- portNum Port Number to which the queue is mapped.
- crf Critical Resource Flow Value
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE0_INFO,SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE1_INFO,SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE2_INFO;
- * SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE0_INFO,SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE1_INFO,SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE2_INFO;
- * SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE0_INFO,SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE1_INFO,SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE2_INFO;
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
-
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Set the Tx Queue 0 Scheduler Information
- // - The Queue needs to be mapped to SRIO Port 1
- // - The Queue sets the CRF Bit.
- CSL_SRIO_SetTxQueueSchedInfo (hSrio, 0, 1, 1);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetTxQueueSchedInfo
- (
- CSL_SrioHandle hSrio,
- Uint8 txQueue,
- Uint8 portNum,
- Uint8 crf
- )
- {
- if (txQueue < 4)
- {
- /* Transmit Queue 0, 1, 2 and 3 are handed in RIO_TX_QUEUE_SCH_INFO[0] */
- CSL_FINSR(hSrio->RIO_TX_QUEUE_SCH_INFO[0], (txQueue << 3), (txQueue << 3), crf);
- CSL_FINSR(hSrio->RIO_TX_QUEUE_SCH_INFO[0], (txQueue << 3) + 7, (txQueue << 3) + 4, portNum);
- }
- else if (txQueue < 8)
- {
- /* Transmit Queue 4, 5, 6 and 7 are handed in RIO_TX_QUEUE_SCH_INFO[1] */
- txQueue = txQueue - 4;
- CSL_FINSR(hSrio->RIO_TX_QUEUE_SCH_INFO[1], (txQueue << 3), (txQueue << 3), crf);
- CSL_FINSR(hSrio->RIO_TX_QUEUE_SCH_INFO[1], (txQueue << 3) + 7, (txQueue << 3) + 4, portNum);
- }
- else if (txQueue < 12)
- {
- /* Transmit Queue 8, 9, 10 and 11 are handed in RIO_TX_QUEUE_SCH_INFO[2] */
- txQueue = txQueue - 8;
- CSL_FINSR(hSrio->RIO_TX_QUEUE_SCH_INFO[2], (txQueue << 3), (txQueue << 3), crf);
- CSL_FINSR(hSrio->RIO_TX_QUEUE_SCH_INFO[2], (txQueue << 3) + 7, (txQueue << 3) + 4, portNum);
- }
- else if (txQueue < 16)
- {
- /* Transmit Queue 12, 13, 14 and 15 are handed in RIO_TX_QUEUE_SCH_INFO[2] */
- txQueue = txQueue - 12;
- CSL_FINSR(hSrio->RIO_TX_QUEUE_SCH_INFO[3], (txQueue << 3), (txQueue << 3), crf);
- CSL_FINSR(hSrio->RIO_TX_QUEUE_SCH_INFO[3], (txQueue << 3) + 7, (txQueue << 3) + 4, portNum);
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetTxQueueSchedInfo
- *
- * @b Description
- * @n The function is used to get the port and scheduler information for a
- * specific transmit queue.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- txQueue Transmit Queue Index for which information is configured.
- portNum Port Number to which the queue is mapped populated by this API
- priority Priority of the Transmit Queue populated by this API
- crf Critical Resource Flow Value populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE0_INFO,SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE1_INFO,SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE2_INFO;
- * SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE0_INFO,SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE1_INFO,SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE2_INFO;
- * SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE0_INFO,SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE1_INFO,SRIO_RIO_TX_QUEUE_SCH_INFO_QUEUE2_INFO;
- *
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint8 portNum;
- Uint8 priority;
- Uint8 crf;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the Tx Queue 1 Information.
- CSL_SRIO_GetTxQueueSchedInfo (hSrio, 1, &portNum, &priority, &crf);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetTxQueueSchedInfo
- (
- CSL_SrioHandle hSrio,
- Uint8 txQueue,
- Uint8* portNum,
- Uint8* priority,
- Uint8* crf
- )
- {
- Uint32 value;
- if (txQueue < 4)
- {
- /* Transmit Queue 0, 1, 2 and 3 are handed in RIO_TX_QUEUE_SCH_INFO[0] */
- value = hSrio->RIO_TX_QUEUE_SCH_INFO[0];
- *crf = CSL_FEXTR(value, (txQueue << 3), (txQueue << 3));
- *priority = CSL_FEXTR(value, (txQueue << 3) + 2, (txQueue << 3) + 1);
- *portNum = CSL_FEXTR(value, (txQueue << 3) + 7, (txQueue << 3) + 4);
- }
- else if (txQueue < 8)
- {
- /* Transmit Queue 4, 5, 6 and 7 are handed in RIO_TX_QUEUE_SCH_INFO[1] */
- txQueue = txQueue - 4;
- value = hSrio->RIO_TX_QUEUE_SCH_INFO[1];
- *crf = CSL_FEXTR(value, (txQueue << 3), (txQueue << 3));
- *priority = CSL_FEXTR(value, (txQueue << 3) + 2, (txQueue << 3) + 1);
- *portNum = CSL_FEXTR(value, (txQueue << 3) + 7, (txQueue << 3) + 4);
- }
- else if (txQueue < 12)
- {
- /* Transmit Queue 8, 9, 10 and 11 are handed in RIO_TX_QUEUE_SCH_INFO[2] */
- txQueue = txQueue - 8;
- value = hSrio->RIO_TX_QUEUE_SCH_INFO[2];
- *crf = CSL_FEXTR(value, (txQueue << 3), (txQueue << 3));
- *priority = CSL_FEXTR(value, (txQueue << 3) + 2, (txQueue << 3) + 1);
- *portNum = CSL_FEXTR(value, (txQueue << 3) + 7, (txQueue << 3) + 4);
- }
- else if (txQueue < 16)
- {
- /* Transmit Queue 12, 13, 14 and 15 are handed in RIO_TX_QUEUE_SCH_INFO[3] */
- txQueue = txQueue - 12;
- value = hSrio->RIO_TX_QUEUE_SCH_INFO[3];
- *crf = CSL_FEXTR(value, (txQueue << 3), (txQueue << 3));
- *priority = CSL_FEXTR(value, (txQueue << 3) + 2, (txQueue << 3) + 1);
- *portNum = CSL_FEXTR(value, (txQueue << 3) + 7, (txQueue << 3) + 4);
- }
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetTxGarbageCollectionInfo
- *
- * @b Description
- * @n The function sets the Transmit Garbage collection information.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- qidLength Length mismatch between size in the UDI to be configured.
- qidTimeout Timeout on receiving the segments to be configured.
- qidRetry Excessive retries to be configured
- qidTransErr Transaction Error to be configured
- qidProg Programming Error queue to be configured
- qidSsize Queue ID Ssize to be configured
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_RIO_GARBAGE_COLL_QID0_GARBAGE_QID_LEN,
- * @n SRIO_RIO_GARBAGE_COLL_QID0_GARBAGE_QID_TOUT,
- * @n SRIO_RIO_GARBAGE_COLL_QID1_GARBAGE_QID_RETRY,
- * @n SRIO_RIO_GARBAGE_COLL_QID1_GARBAGE_QID_TRANS_ERR,
- * @n SRIO_RIO_GARBAGE_COLL_QID2_GARBAGE_QID_PROG,
- * @n SRIO_RIO_GARBAGE_COLL_QID2_GARBAGE_QID_SSIZE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Set the Transmit Garbage Collection Information.
- CSL_SRIO_SetTxGarbageCollectionInfo (hSrio, 2, 3, 4, 5, 6, 10);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetTxGarbageCollectionInfo
- (
- CSL_SrioHandle hSrio,
- Uint16 qidLength,
- Uint16 qidTimeout,
- Uint16 qidRetry,
- Uint16 qidTransErr,
- Uint16 qidProg,
- Uint16 qidSsize
- )
- {
- hSrio->RIO_GARBAGE_COLL_QID0 =
- CSL_FMK (SRIO_RIO_GARBAGE_COLL_QID0_GARBAGE_QID_LEN, qidLength) |
- CSL_FMK (SRIO_RIO_GARBAGE_COLL_QID0_GARBAGE_QID_TOUT, qidTimeout);
- hSrio->RIO_GARBAGE_COLL_QID1 =
- CSL_FMK (SRIO_RIO_GARBAGE_COLL_QID1_GARBAGE_QID_RETRY, qidRetry) |
- CSL_FMK (SRIO_RIO_GARBAGE_COLL_QID1_GARBAGE_QID_TRANS_ERR, qidTransErr);
- hSrio->RIO_GARBAGE_COLL_QID2 =
- CSL_FMK (SRIO_RIO_GARBAGE_COLL_QID2_GARBAGE_QID_PROG, qidProg) |
- CSL_FMK (SRIO_RIO_GARBAGE_COLL_QID2_GARBAGE_QID_SSIZE, qidSsize);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetTxGarbageCollectionInfo
- *
- * @b Description
- * @n The function gets the Transmit Garbage collection information. Descriptors
- * are placed into the Garbage collection queue when there is an error
- * response detected.
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- qidLength Length mismatch between size in the UDI
- packet and receieved payload populated by this API
- qidTimeout Timeout on receiving the segments populated by this API
- qidRetry Excessive retries populated by this API
- qidTransErr Transaction Error populated by this API
- qidProg Programming error queue read
- qidSsize Queue ID Ssize populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_RIO_GARBAGE_COLL_QID0_GARBAGE_QID_LEN,
- * @n SRIO_RIO_GARBAGE_COLL_QID0_GARBAGE_QID_TOUT,
- * @n SRIO_RIO_GARBAGE_COLL_QID1_GARBAGE_QID_RETRY,
- * @n SRIO_RIO_GARBAGE_COLL_QID1_GARBAGE_QID_TRANS_ERR,
- * @n SRIO_RIO_GARBAGE_COLL_QID2_GARBAGE_QID_PROG,
- * @n SRIO_RIO_GARBAGE_COLL_QID2_GARBAGE_QID_SSIZE
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint16 qidLength;
- Uint16 qidTimeout;
- Uint16 qidRetry;
- Uint16 qidTransErr;
- Uint16 qidProg;
- Uint16 qidSsize;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the Transmit Garbage Collection Information.
- CSL_SRIO_GetTxGarbageCollectionInfo (hSrio, &qidLength, &qidTimeout,
- &qidRetry, &qidTransErr, &qidProg, &qidSsize);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetTxGarbageCollectionInfo
- (
- CSL_SrioHandle hSrio,
- Uint16* qidLength,
- Uint16* qidTimeout,
- Uint16* qidRetry,
- Uint16* qidTransErr,
- Uint16* qidProg,
- Uint16* qidSsize
- )
- {
- *qidLength = CSL_FEXT (hSrio->RIO_GARBAGE_COLL_QID0, SRIO_RIO_GARBAGE_COLL_QID0_GARBAGE_QID_LEN);
- *qidTimeout = CSL_FEXT (hSrio->RIO_GARBAGE_COLL_QID0, SRIO_RIO_GARBAGE_COLL_QID0_GARBAGE_QID_TOUT);
- *qidRetry = CSL_FEXT (hSrio->RIO_GARBAGE_COLL_QID1, SRIO_RIO_GARBAGE_COLL_QID1_GARBAGE_QID_RETRY);
- *qidTransErr= CSL_FEXT (hSrio->RIO_GARBAGE_COLL_QID1, SRIO_RIO_GARBAGE_COLL_QID1_GARBAGE_QID_TRANS_ERR);
- *qidProg = CSL_FEXT (hSrio->RIO_GARBAGE_COLL_QID2, SRIO_RIO_GARBAGE_COLL_QID2_GARBAGE_QID_PROG);
- *qidSsize = CSL_FEXT (hSrio->RIO_GARBAGE_COLL_QID2, SRIO_RIO_GARBAGE_COLL_QID2_GARBAGE_QID_SSIZE);
- }
- /** ============================================================================
- * @n@b CSL_SRIO_GetQMBaseAddress
- *
- * @b Description
- * @n The function gets the QM base address
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- qmIndex Index of the Queue Manager whose base address is needed
- qmBaseAddress QM Base Address populated by this API
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n SRIO_QM_BASE_ADDRESS_REG
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- Uint32 qmBaseAddress;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Get the QM Base Address information for 0
- CSL_SRIO_GetQMBaseAddress(hSrio, 0, &qmBaseAddress);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_GetQMBaseAddress
- (
- CSL_SrioHandle hSrio,
- Uint8 qmIndex,
- Uint32* qmBaseAddress
- )
- {
- *qmBaseAddress = hSrio->QM_BASE_ADDRESS_REG[qmIndex];
- }
- /** ============================================================================
- * @n@b CSL_SRIO_SetQMBaseAddress
- *
- * @b Description
- * @n The function sets the QM base address
- *
- * @b Arguments
- @verbatim
- hSrio Handle of the SRIO device
- qmIndex Index of the Queue Manager whose base address is to be set
- qmBaseAddress QM Base Address to be configured
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n CSL_SRIO_Open() must be called
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n SRIO_QM_BASE_ADDRESS_REG
- *
- * @b Example
- * @verbatim
- CSL_SrioHandle hSrio;
- // Open the CSL SRIO Module 0
- hSrio = CSL_SRIO_Open (0);
- ...
- // Set the QM Base Address information for 0
- CSL_SRIO_SetQMBaseAddress(hSrio, 0, 0x10800000);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_SRIO_SetQMBaseAddress
- (
- CSL_SrioHandle hSrio,
- Uint8 qmIndex,
- Uint32 qmBaseAddress
- )
- {
- hSrio->QM_BASE_ADDRESS_REG[qmIndex] = qmBaseAddress;
- }
- /**
- @}
- */
- #ifdef __cplusplus
- }
- #endif
- #endif /* CSL_SRIOAUX_H_ */
|