csl_srioAuxPhyLayer.h 456 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232
  1. /**
  2. * @file csl_srioAuxPhyLayer.h
  3. *
  4. * @brief
  5. * This is the SRIO Auxilary Physical Header File which exposes the various
  6. * CSL Functional Layer API's to configure the SRIO Switch.
  7. *
  8. * \par
  9. * ============================================================================
  10. * @n (C) Copyright 2008-2011, Texas Instruments, Inc.
  11. *
  12. * Redistribution and use in source and binary forms, with or without
  13. * modification, are permitted provided that the following conditions
  14. * are met:
  15. *
  16. * Redistributions of source code must retain the above copyright
  17. * notice, this list of conditions and the following disclaimer.
  18. *
  19. * Redistributions in binary form must reproduce the above copyright
  20. * notice, this list of conditions and the following disclaimer in the
  21. * documentation and/or other materials provided with the
  22. * distribution.
  23. *
  24. * Neither the name of Texas Instruments Incorporated nor the names of
  25. * its contributors may be used to endorse or promote products derived
  26. * from this software without specific prior written permission.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  29. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  30. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  31. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  32. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  33. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  34. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  35. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  36. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  37. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  38. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  39. *
  40. */
  41. #ifndef CSL_SRIO_AUX_PHY_LAYER_H_
  42. #define CSL_SRIO_AUX_PHY_LAYER_H_
  43. #include <ti/csl/soc.h>
  44. #include <ti/csl/csl_srio.h>
  45. #ifdef __cplusplus
  46. extern "C" {
  47. #endif
  48. /** @addtogroup CSL_SRIO_FUNCTION
  49. @{ */
  50. /** ============================================================================
  51. * @n@b CSL_SRIO_GetDeviceInfo
  52. *
  53. * @b Description
  54. * @n The function reads the Device Identifier information.
  55. *
  56. * @b Arguments
  57. @verbatim
  58. hSrio Handle of the SRIO device
  59. deviceId Device Identity populated by this API.
  60. deviceVendorId Device Vendor Identity populated by this API
  61. deviceRev Device Revision populated by this API
  62. @endverbatim
  63. *
  64. * <b> Return Value </b>
  65. * @n None
  66. *
  67. * <b> Pre Condition </b>
  68. * @n CSL_SRIO_Open() must be called
  69. *
  70. * <b> Post Condition </b>
  71. * @n None
  72. *
  73. * @b Reads
  74. * @n SRIO_RIO_DEV_ID_DEV_ID,SRIO_RIO_DEV_ID_DEV_VEN_ID,
  75. * @n SRIO_RIO_DEV_INFO_DEVICE_REV
  76. *
  77. * @b Example
  78. * @verbatim
  79. CSL_SrioHandle hSrio;
  80. Uint16 deviceId;
  81. Uint16 deviceVendorId;
  82. Uint32 deviceRev;
  83. // Open the CSL SRIO Module 0
  84. hSrio = CSL_SRIO_Open (0);
  85. // Read the Device Identity CAR
  86. CSL_SRIO_GetDeviceInfo (hSrio, &deviceId, &deviceVendorId, &deviceRev);
  87. ...
  88. @endverbatim
  89. * =============================================================================
  90. */
  91. static inline void CSL_SRIO_GetDeviceInfo
  92. (
  93. CSL_SrioHandle hSrio,
  94. Uint16* deviceId,
  95. Uint16* deviceVendorId,
  96. Uint32* deviceRev
  97. )
  98. {
  99. Uint32 value = hSrio->RIO_DEV_ID;
  100. *deviceId = CSL_FEXT(value, SRIO_RIO_DEV_ID_DEV_ID);
  101. *deviceVendorId = CSL_FEXT(value, SRIO_RIO_DEV_ID_DEV_VEN_ID);
  102. *deviceRev = CSL_FEXT(hSrio->RIO_DEV_INFO, SRIO_RIO_DEV_INFO_DEVICE_REV);
  103. }
  104. /** ============================================================================
  105. * @n@b CSL_SRIO_SetDeviceInfo
  106. *
  107. * @b Description
  108. * @n The function sets up the Device Identifier information.
  109. *
  110. * @b Arguments
  111. @verbatim
  112. hSrio Handle of the SRIO device
  113. deviceId Device Identity to configure
  114. deviceVendorId Device Vendor Identity to configure
  115. deviceRev Device Revision to configure
  116. @endverbatim
  117. *
  118. * <b> Return Value </b>
  119. * @n None
  120. *
  121. * <b> Pre Condition </b>
  122. * @n CSL_SRIO_Open() must be called
  123. *
  124. * <b> Post Condition </b>
  125. * @n None
  126. *
  127. * @b Writes
  128. * @n SRIO_RIO_DEV_ID_DEV_ID,SRIO_RIO_DEV_ID_DEV_VEN_ID,
  129. * @n SRIO_RIO_DEV_INFO_DEVICE_REV
  130. *
  131. * @b Example
  132. * @verbatim
  133. CSL_SrioHandle hSrio;
  134. Uint16 deviceId;
  135. Uint16 deviceVendorId;
  136. Uint32 deviceRev;
  137. // Open the CSL SRIO Module 0
  138. hSrio = CSL_SRIO_Open (0);
  139. // Read the Device Identity CAR
  140. CSL_SRIO_GetDeviceInfo (hSrio, &deviceId, &deviceVendorId, &deviceRev);
  141. ...
  142. // Setup the device identity info
  143. CSL_SRIO_SetDeviceInfo (hSrio, deviceId, deviceVendorId, deviceRev);
  144. @endverbatim
  145. * =============================================================================
  146. */
  147. static inline void CSL_SRIO_SetDeviceInfo
  148. (
  149. CSL_SrioHandle hSrio,
  150. Uint16 deviceId,
  151. Uint16 deviceVendorId,
  152. Uint32 deviceRev
  153. )
  154. {
  155. hSrio->RIO_DEV_ID = CSL_FMK(SRIO_RIO_DEV_ID_DEV_ID, deviceId) |
  156. CSL_FMK(SRIO_RIO_DEV_ID_DEV_VEN_ID, deviceVendorId);
  157. hSrio->RIO_DEV_INFO = CSL_FMK(SRIO_RIO_DEV_INFO_DEVICE_REV, deviceRev);
  158. }
  159. /** ============================================================================
  160. * @n@b CSL_SRIO_GetAssemblyInfo
  161. *
  162. * @b Description
  163. * @n The function reads the Assembly Identifier information.
  164. *
  165. * @b Arguments
  166. @verbatim
  167. hSrio Handle of the SRIO device
  168. asblyId Assembly Identity populated by this API.
  169. asblyVendorId Assembly Vendor Identity populated by this API
  170. asblyRev Assembly Revision populated by this API
  171. @endverbatim
  172. *
  173. * <b> Return Value </b>
  174. * @n None
  175. *
  176. * <b> Pre Condition </b>
  177. * @n CSL_SRIO_Open() must be called
  178. *
  179. * <b> Post Condition </b>
  180. * @n None
  181. *
  182. * @b Reads
  183. * @n SRIO_RIO_ASBLY_ID_ASBLY_ID,SRIO_RIO_ASBLY_ID_ASBLY_VEN_ID,
  184. * @n SRIO_RIO_ASBLY_INFO_ASBLY_REV,SRIO_RIO_ASBLY_INFO_EXT_FEAT_PTR
  185. *
  186. * @b Example
  187. * @verbatim
  188. CSL_SrioHandle hSrio;
  189. Uint16 asblyId;
  190. Uint16 asblyVendorId;
  191. Uint16 asblyRev;
  192. Uint16 extFeaturePtr;
  193. // Open the CSL SRIO Module 0
  194. hSrio = CSL_SRIO_Open (0);
  195. // Read the Assembly Identity CAR
  196. CSL_SRIO_GetAssemblyInfo (hSrio, &asblyId, &asblyVendorId, &asblyRev, &extFeaturePtr);
  197. ...
  198. @endverbatim
  199. * =============================================================================
  200. */
  201. static inline void CSL_SRIO_GetAssemblyInfo
  202. (
  203. CSL_SrioHandle hSrio,
  204. Uint16* asblyId,
  205. Uint16* asblyVendorId,
  206. Uint16* asblyRev,
  207. Uint16* extFeaturePtr
  208. )
  209. {
  210. Uint32 value;
  211. /* Read the assembly and vendor identifier */
  212. value = hSrio->RIO_ASBLY_ID;
  213. *asblyId = CSL_FEXT(value, SRIO_RIO_ASBLY_ID_ASBLY_ID);
  214. *asblyVendorId = CSL_FEXT(value, SRIO_RIO_ASBLY_ID_ASBLY_VEN_ID);
  215. /* Read the assembly information and external features */
  216. value = hSrio->RIO_ASBLY_INFO;
  217. *asblyRev = CSL_FEXT(value, SRIO_RIO_ASBLY_INFO_ASBLY_REV);
  218. *extFeaturePtr = CSL_FEXT(value, SRIO_RIO_ASBLY_INFO_EXT_FEAT_PTR);
  219. }
  220. /** ============================================================================
  221. * @n@b CSL_SRIO_SetAssemblyInfo
  222. *
  223. * @b Description
  224. * @n The function sets up the Assembly Identifier information.
  225. *
  226. * @b Arguments
  227. @verbatim
  228. hSrio Handle of the SRIO device
  229. asblyId Assembly Identity to configure.
  230. asblyVendorId Assembly Vendor Identity to configure
  231. asblyRev Assembly Revision to configure
  232. @endverbatim
  233. *
  234. * <b> Return Value </b>
  235. * @n None
  236. *
  237. * <b> Pre Condition </b>
  238. * @n CSL_SRIO_Open() must be called
  239. *
  240. * <b> Post Condition </b>
  241. * @n None
  242. *
  243. * @b Writes
  244. * @n SRIO_RIO_ASBLY_ID_ASBLY_ID,SRIO_RIO_ASBLY_ID_ASBLY_VEN_ID,
  245. * @n SRIO_RIO_ASBLY_INFO_ASBLY_REV,SRIO_RIO_ASBLY_INFO_EXT_FEAT_PTR
  246. *
  247. * @b Example
  248. * @verbatim
  249. CSL_SrioHandle hSrio;
  250. Uint16 asblyId;
  251. Uint16 asblyVendorId;
  252. Uint16 asblyRev;
  253. Uint16 extFeaturePtr;
  254. // Open the CSL SRIO Module 0
  255. hSrio = CSL_SRIO_Open (0);
  256. // Read the Assembly Identity CAR
  257. CSL_SRIO_GetAssemblyInfo (hSrio, &asblyId, &asblyVendorId, &asblyRev, &extFeaturePtr);
  258. ...
  259. // Sets up the Assembly Identity info
  260. CSL_SRIO_SetAssemblyInfo (hSrio, asblyId, asblyVendorId, asblyRev, extFeaturePtr);
  261. ...
  262. @endverbatim
  263. * =============================================================================
  264. */
  265. static inline void CSL_SRIO_SetAssemblyInfo
  266. (
  267. CSL_SrioHandle hSrio,
  268. Uint16 asblyId,
  269. Uint16 asblyVendorId,
  270. Uint16 asblyRev,
  271. Uint16 extFeaturePtr
  272. )
  273. {
  274. hSrio->RIO_ASBLY_ID = CSL_FMK(SRIO_RIO_ASBLY_ID_ASBLY_ID, asblyId) |
  275. CSL_FMK(SRIO_RIO_ASBLY_ID_ASBLY_VEN_ID, asblyVendorId);
  276. hSrio->RIO_ASBLY_INFO = CSL_FMK(SRIO_RIO_ASBLY_INFO_ASBLY_REV, asblyRev) |
  277. CSL_FMK(SRIO_RIO_ASBLY_INFO_EXT_FEAT_PTR,extFeaturePtr);
  278. }
  279. /** ============================================================================
  280. * @n@b CSL_SRIO_GetProcessingElementFeatures
  281. *
  282. * @b Description
  283. * @n The function gets the processing element features.
  284. *
  285. * @b Arguments
  286. @verbatim
  287. hSrio Handle of the SRIO device
  288. peFeatures Processing Element Features to be populated by this API
  289. @endverbatim
  290. *
  291. * <b> Return Value </b>
  292. * @n None
  293. *
  294. * <b> Pre Condition </b>
  295. * @n CSL_SRIO_Open() must be called
  296. *
  297. * <b> Post Condition </b>
  298. * @n None
  299. *
  300. * @b Reads
  301. * @n SRIO_RIO_PE_FEAT_BRDG,SRIO_RIO_PE_FEAT_MEM,SRIO_RIO_PE_FEAT_PROC,
  302. * @n SRIO_RIO_PE_FEAT_SW,SRIO_RIO_PE_FEAT_MULT_P,SRIO_RIO_PE_FEAT_FLOW_ARB,
  303. * @n SRIO_RIO_PE_FEAT_MC,SRIO_RIO_PE_FEAT_ERTC,SRIO_RIO_PE_FEAT_SRTC,
  304. * @n SRIO_RIO_PE_FEAT_FLOW_CTRL, SRIO_RIO_PE_FEAT_CRF,
  305. * @n SRIO_RIO_PE_FEAT_CTLS,SRIO_RIO_PE_FEAT_EXT_FEA,SRIO_RIO_PE_FEAT_EXT_AS
  306. *
  307. * @b Example
  308. * @verbatim
  309. CSL_SrioHandle hSrio;
  310. SRIO_PE_FEATURES peFeatures;
  311. // Open the CSL SRIO Module 0
  312. hSrio = CSL_SRIO_Open (0);
  313. // Get the processing element features.
  314. CSL_SRIO_GetProcessingElementFeatures (hSrio, &peFeatures);
  315. ...
  316. @endverbatim
  317. * =============================================================================
  318. */
  319. static inline void CSL_SRIO_GetProcessingElementFeatures
  320. (
  321. CSL_SrioHandle hSrio,
  322. SRIO_PE_FEATURES* ptrPEFeatures
  323. )
  324. {
  325. Uint32 value = hSrio->RIO_PE_FEAT;
  326. /* Populate the structure. */
  327. ptrPEFeatures->isBridge = CSL_FEXT (value, SRIO_RIO_PE_FEAT_BRDG);
  328. ptrPEFeatures->isEndpoint = CSL_FEXT (value, SRIO_RIO_PE_FEAT_MEM);
  329. ptrPEFeatures->isProcessor = CSL_FEXT (value, SRIO_RIO_PE_FEAT_PROC);
  330. ptrPEFeatures->isSwitch = CSL_FEXT (value, SRIO_RIO_PE_FEAT_SW);
  331. ptrPEFeatures->isMultiport = CSL_FEXT (value, SRIO_RIO_PE_FEAT_MULT_P);
  332. ptrPEFeatures->isFlowArbiterationSupported = CSL_FEXT (value, SRIO_RIO_PE_FEAT_FLOW_ARB);
  333. ptrPEFeatures->isMulticastSupported = CSL_FEXT (value, SRIO_RIO_PE_FEAT_MC);
  334. ptrPEFeatures->isExtendedRouteConfigSupported = CSL_FEXT (value, SRIO_RIO_PE_FEAT_ERTC);
  335. ptrPEFeatures->isStandardRouteConfigSupported = CSL_FEXT (value, SRIO_RIO_PE_FEAT_SRTC);
  336. ptrPEFeatures->isFlowControlSupported = CSL_FEXT (value, SRIO_RIO_PE_FEAT_FLOW_CTRL);
  337. ptrPEFeatures->isCRFSupported = CSL_FEXT (value, SRIO_RIO_PE_FEAT_CRF);
  338. ptrPEFeatures->isCTLSSupported = CSL_FEXT (value, SRIO_RIO_PE_FEAT_CTLS);
  339. ptrPEFeatures->isExtendedFeaturePtrValid = CSL_FEXT (value, SRIO_RIO_PE_FEAT_EXT_FEA);
  340. ptrPEFeatures->numAddressBitSupported = CSL_FEXT (value, SRIO_RIO_PE_FEAT_EXT_AS);
  341. }
  342. /** ============================================================================
  343. * @n@b CSL_SRIO_SetProcessingElementFeatures
  344. *
  345. * @b Description
  346. * @n The function sets the processing element features.
  347. *
  348. * @b Arguments
  349. @verbatim
  350. hSrio Handle of the SRIO device
  351. peFeatures Processing Element Features to be configured
  352. @endverbatim
  353. *
  354. * <b> Return Value </b>
  355. * @n None
  356. *
  357. * <b> Pre Condition </b>
  358. * @n CSL_SRIO_Open() must be called
  359. *
  360. * <b> Post Condition </b>
  361. * @n None
  362. *
  363. * @b Writes
  364. * @n SRIO_RIO_PE_FEAT_BRDG,SRIO_RIO_PE_FEAT_MEM,SRIO_RIO_PE_FEAT_PROC,
  365. * @n SRIO_RIO_PE_FEAT_SW,SRIO_RIO_PE_FEAT_MULT_P,SRIO_RIO_PE_FEAT_FLOW_ARB,
  366. * @n SRIO_RIO_PE_FEAT_MC,SRIO_RIO_PE_FEAT_ERTC,SRIO_RIO_PE_FEAT_SRTC,
  367. * @n SRIO_RIO_PE_FEAT_FLOW_CTRL, SRIO_RIO_PE_FEAT_CRF,
  368. * @n SRIO_RIO_PE_FEAT_CTLS,SRIO_RIO_PE_FEAT_EXT_FEA,SRIO_RIO_PE_FEAT_EXT_AS
  369. *
  370. * @b Example
  371. * @verbatim
  372. CSL_SrioHandle hSrio;
  373. SRIO_PE_FEATURES peFeatures;
  374. // Open the CSL SRIO Module 0
  375. hSrio = CSL_SRIO_Open (0);
  376. // Get the processing element features.
  377. CSL_SRIO_GetProcessingElementFeatures (hSrio, &peFeatures);
  378. // Modify the processing element features and make this a BRIDGE
  379. peFeatures.isBridge = 1;
  380. CSL_SRIO_SetProcessingElementFeatures(hSrio, &peFeatures);
  381. ...
  382. @endverbatim
  383. * =============================================================================
  384. */
  385. static inline void CSL_SRIO_SetProcessingElementFeatures
  386. (
  387. CSL_SrioHandle hSrio,
  388. SRIO_PE_FEATURES* ptrPEFeatures
  389. )
  390. {
  391. Uint32 value = 0;
  392. /* Initialize the various fields in the register */
  393. CSL_FINS (value, SRIO_RIO_PE_FEAT_BRDG, ptrPEFeatures->isBridge);
  394. CSL_FINS (value, SRIO_RIO_PE_FEAT_MEM, ptrPEFeatures->isEndpoint);
  395. CSL_FINS (value, SRIO_RIO_PE_FEAT_PROC, ptrPEFeatures->isProcessor);
  396. CSL_FINS (value, SRIO_RIO_PE_FEAT_SW, ptrPEFeatures->isSwitch);
  397. CSL_FINS (value, SRIO_RIO_PE_FEAT_MULT_P, ptrPEFeatures->isMultiport);
  398. CSL_FINS (value, SRIO_RIO_PE_FEAT_FLOW_ARB, ptrPEFeatures->isFlowArbiterationSupported);
  399. CSL_FINS (value, SRIO_RIO_PE_FEAT_MC, ptrPEFeatures->isMulticastSupported);
  400. CSL_FINS (value, SRIO_RIO_PE_FEAT_ERTC, ptrPEFeatures->isExtendedRouteConfigSupported);
  401. CSL_FINS (value, SRIO_RIO_PE_FEAT_SRTC, ptrPEFeatures->isStandardRouteConfigSupported);
  402. CSL_FINS (value, SRIO_RIO_PE_FEAT_FLOW_CTRL,ptrPEFeatures->isFlowControlSupported);
  403. CSL_FINS (value, SRIO_RIO_PE_FEAT_CRF, ptrPEFeatures->isCRFSupported);
  404. CSL_FINS (value, SRIO_RIO_PE_FEAT_CTLS, ptrPEFeatures->isCTLSSupported);
  405. CSL_FINS (value, SRIO_RIO_PE_FEAT_EXT_FEA, ptrPEFeatures->isExtendedFeaturePtrValid);
  406. CSL_FINS (value, SRIO_RIO_PE_FEAT_EXT_AS, ptrPEFeatures->numAddressBitSupported);
  407. hSrio->RIO_PE_FEAT = value;
  408. }
  409. /** ============================================================================
  410. * @n@b CSL_SRIO_GetSwitchPortInfo
  411. *
  412. * @b Description
  413. * @n The function reads the Switch Port information.
  414. *
  415. * @b Arguments
  416. @verbatim
  417. hSrio Handle of the SRIO device
  418. numPorts The total number of ports populated by this API
  419. portNum The port number from which the Maintenance read operation
  420. accessed this register.
  421. @endverbatim
  422. *
  423. * <b> Return Value </b>
  424. * @n None
  425. *
  426. * <b> Pre Condition </b>
  427. * @n CSL_SRIO_Open() must be called
  428. *
  429. * <b> Post Condition </b>
  430. * @n None
  431. *
  432. * @b Reads
  433. * @n SRIO_RIO_SW_PORT_PORT_TOTAL,SRIO_RIO_SW_PORT_PORT_NUM
  434. *
  435. * @b Example
  436. * @verbatim
  437. CSL_SrioHandle hSrio;
  438. Uint8 numPorts;
  439. Uint8 portNum;
  440. // Open the CSL SRIO Module 0
  441. hSrio = CSL_SRIO_Open (0);
  442. // Get the Switch port information
  443. CSL_SRIO_GetSwitchPortInfo (hSrio, &numPorts, &portNum);
  444. ...
  445. @endverbatim
  446. * =============================================================================
  447. */
  448. static inline void CSL_SRIO_GetSwitchPortInfo
  449. (
  450. CSL_SrioHandle hSrio,
  451. Uint8* numPorts,
  452. Uint8* portNum
  453. )
  454. {
  455. *numPorts = CSL_FEXT(hSrio->RIO_SW_PORT, SRIO_RIO_SW_PORT_PORT_TOTAL);
  456. *portNum = CSL_FEXT(hSrio->RIO_SW_PORT, SRIO_RIO_SW_PORT_PORT_NUM);
  457. }
  458. /** ============================================================================
  459. * @n@b CSL_SRIO_GetSourceOperationCAR
  460. *
  461. * @b Description
  462. * @n The function reads the Switch Port Capabilities which are all the logical
  463. * operations that can be issued by the application.
  464. *
  465. * @b Arguments
  466. @verbatim
  467. hSrio Handle of the SRIO device
  468. ptrSrcOp Pointer to the Source CAR Structure populated by this
  469. API
  470. @endverbatim
  471. *
  472. * <b> Return Value </b>
  473. * @n None
  474. *
  475. * <b> Pre Condition </b>
  476. * @n CSL_SRIO_Open() must be called
  477. *
  478. * <b> Post Condition </b>
  479. * @n None
  480. *
  481. * @b Reads
  482. * @n SRIO_RIO_SRC_OP_G_READ, SRIO_RIO_SRC_OP_G_IREAD, SRIO_RIO_SRC_OP_G_READ_OWN,
  483. * @n SRIO_RIO_SRC_OP_G_DC_INVALIDATE, SRIO_RIO_SRC_OP_G_CASTOUT, SRIO_RIO_SRC_OP_G_DC_FLUSH,
  484. * @n SRIO_RIO_SRC_OP_G_IO_READ, SRIO_RIO_SRC_OP_G_IC_INVALIDATE, SRIO_RIO_SRC_OP_G_TLB_INVALIDATE,
  485. * @n SRIO_RIO_SRC_OP_G_TLB_SYNC, SRIO_RIO_SRC_OP_DS_TM, SRIO_RIO_SRC_OP_DS,
  486. * @n SRIO_RIO_SRC_OP_IMPLEMENT_DEF, SRIO_RIO_SRC_OP_READ, SRIO_RIO_SRC_OP_WRITE,
  487. * @n SRIO_RIO_SRC_OP_STRM_WR, SRIO_RIO_SRC_OP_WR_RES, SRIO_RIO_SRC_OP_D_MSG, SRIO_RIO_SRC_OP_DBELL,
  488. * @n SRIO_RIO_SRC_OP_ACSWAP, SRIO_RIO_SRC_OP_ATSWAP, SRIO_RIO_SRC_OP_A_INC, SRIO_RIO_SRC_OP_A_DEC,
  489. * @n SRIO_RIO_SRC_OP_A_SET, SRIO_RIO_SRC_OP_A_CLEAR, SRIO_RIO_SRC_OP_A_SWAP, SRIO_RIO_SRC_OP_PORT_WR,
  490. * @n SRIO_RIO_SRC_OP_IMPLEMENT_DEF2
  491. *
  492. * @b Example
  493. * @verbatim
  494. CSL_SrioHandle hSrio;
  495. SRIO_OP_CAR srcOPCAR;
  496. // Open the CSL SRIO Module 0
  497. hSrio = CSL_SRIO_Open (0);
  498. // Get the Source Operation CAR
  499. CSL_SRIO_GetSourceOperationCAR (hSrio, &srcOPCAR);
  500. ...
  501. @endverbatim
  502. * =============================================================================
  503. */
  504. static inline void CSL_SRIO_GetSourceOperationCAR
  505. (
  506. CSL_SrioHandle hSrio,
  507. SRIO_OP_CAR* ptrSrcOp
  508. )
  509. {
  510. Uint32 value = hSrio->RIO_SRC_OP;
  511. /* Extract the fields from the Source OP */
  512. ptrSrcOp->gsmRead = CSL_FEXT (value, SRIO_RIO_SRC_OP_G_READ);
  513. ptrSrcOp->gsmInstrnRead = CSL_FEXT (value, SRIO_RIO_SRC_OP_G_IREAD);
  514. ptrSrcOp->gsmReadOwn = CSL_FEXT (value, SRIO_RIO_SRC_OP_G_READ_OWN);
  515. ptrSrcOp->gsmDataCacheInvalidate = CSL_FEXT (value, SRIO_RIO_SRC_OP_G_DC_INVALIDATE);
  516. ptrSrcOp->gsmCastout = CSL_FEXT (value, SRIO_RIO_SRC_OP_G_CASTOUT);
  517. ptrSrcOp->gsmDataCacheFlush = CSL_FEXT (value, SRIO_RIO_SRC_OP_G_DC_FLUSH);
  518. ptrSrcOp->gsmIORead = CSL_FEXT (value, SRIO_RIO_SRC_OP_G_IO_READ);
  519. ptrSrcOp->gsmInstrnCacheInvalidate = CSL_FEXT (value, SRIO_RIO_SRC_OP_G_IC_INVALIDATE);
  520. ptrSrcOp->gsmTLBInvalidate = CSL_FEXT (value, SRIO_RIO_SRC_OP_G_TLB_INVALIDATE);
  521. ptrSrcOp->gsmTLBSync = CSL_FEXT (value, SRIO_RIO_SRC_OP_G_TLB_SYNC);
  522. ptrSrcOp->dataStreamingTM = CSL_FEXT (value, SRIO_RIO_SRC_OP_DS_TM);
  523. ptrSrcOp->dataStreamingSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_DS);
  524. ptrSrcOp->implnDefined = CSL_FEXT (value, SRIO_RIO_SRC_OP_IMPLEMENT_DEF);
  525. ptrSrcOp->readSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_READ);
  526. ptrSrcOp->writeSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_WRITE);
  527. ptrSrcOp->streamWriteSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_STRM_WR);
  528. ptrSrcOp->writeResponseSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_WR_RES);
  529. ptrSrcOp->dataMessageSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_D_MSG);
  530. ptrSrcOp->doorbellSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_DBELL);
  531. ptrSrcOp->atomicCompareSwapSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_ACSWAP);
  532. ptrSrcOp->atomicTestSwapSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_ATSWAP);
  533. ptrSrcOp->atomicIncSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_A_INC);
  534. ptrSrcOp->atomicDecSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_A_DEC);
  535. ptrSrcOp->atomicSetSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_A_SET);
  536. ptrSrcOp->atomicClearSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_A_CLEAR);
  537. ptrSrcOp->atomicSwapSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_A_SWAP);
  538. ptrSrcOp->portWriteOperationSupport = CSL_FEXT (value, SRIO_RIO_SRC_OP_PORT_WR);
  539. ptrSrcOp->implnDefined2 = CSL_FEXT (value, SRIO_RIO_SRC_OP_IMPLEMENT_DEF2);
  540. return;
  541. }
  542. /** ============================================================================
  543. * @n@b CSL_SRIO_SetSourceOperationCAR
  544. *
  545. * @b Description
  546. * @n The function sets the Switch Port Capabilities which are all the logical
  547. * operations that can be issued by the application.
  548. *
  549. * @b Arguments
  550. @verbatim
  551. hSrio Handle of the SRIO device
  552. ptrSrcOp Pointer to the Source CAR Structure to be configured
  553. @endverbatim
  554. *
  555. * <b> Return Value </b>
  556. * @n None
  557. *
  558. * <b> Pre Condition </b>
  559. * @n CSL_SRIO_Open() must be called
  560. *
  561. * <b> Post Condition </b>
  562. * @n None
  563. *
  564. * @b Writes
  565. * @n SRIO_RIO_SRC_OP_G_READ, SRIO_RIO_SRC_OP_G_IREAD, SRIO_RIO_SRC_OP_G_READ_OWN,
  566. * @n SRIO_RIO_SRC_OP_G_DC_INVALIDATE, SRIO_RIO_SRC_OP_G_CASTOUT, SRIO_RIO_SRC_OP_G_DC_FLUSH,
  567. * @n SRIO_RIO_SRC_OP_G_IO_READ, SRIO_RIO_SRC_OP_G_IC_INVALIDATE, SRIO_RIO_SRC_OP_G_TLB_INVALIDATE,
  568. * @n SRIO_RIO_SRC_OP_G_TLB_SYNC, SRIO_RIO_SRC_OP_DS_TM, SRIO_RIO_SRC_OP_DS,
  569. * @n SRIO_RIO_SRC_OP_IMPLEMENT_DEF, SRIO_RIO_SRC_OP_READ, SRIO_RIO_SRC_OP_WRITE,
  570. * @n SRIO_RIO_SRC_OP_STRM_WR, SRIO_RIO_SRC_OP_WR_RES, SRIO_RIO_SRC_OP_D_MSG, SRIO_RIO_SRC_OP_DBELL,
  571. * @n SRIO_RIO_SRC_OP_ACSWAP, SRIO_RIO_SRC_OP_ATSWAP, SRIO_RIO_SRC_OP_A_INC, SRIO_RIO_SRC_OP_A_DEC,
  572. * @n SRIO_RIO_SRC_OP_A_SET, SRIO_RIO_SRC_OP_A_CLEAR, SRIO_RIO_SRC_OP_A_SWAP, SRIO_RIO_SRC_OP_PORT_WR,
  573. * @n SRIO_RIO_SRC_OP_IMPLEMENT_DEF2
  574. *
  575. * @b Example
  576. * @verbatim
  577. CSL_SrioHandle hSrio;
  578. SRIO_OP_CAR srcOPCAR;
  579. // Open the CSL SRIO Module 0
  580. hSrio = CSL_SRIO_Open (0);
  581. // Get the Source Operation CAR
  582. CSL_SRIO_GetSourceOperationCAR (hSrio, &srcOPCAR);
  583. // Allow Doorbell support.
  584. srcOPCAR.doorbellSupport = 1;
  585. // Set the Source Operation CAR
  586. CSL_SRIO_SetSourceOperationCAR (hSrio, &srcOPCAR);
  587. ...
  588. @endverbatim
  589. * =============================================================================
  590. */
  591. static inline void CSL_SRIO_SetSourceOperationCAR
  592. (
  593. CSL_SrioHandle hSrio,
  594. SRIO_OP_CAR* ptrSrcOp
  595. )
  596. {
  597. Uint32 value = 0;
  598. /* Populate the fields into the Source OP */
  599. CSL_FINS (value, SRIO_RIO_SRC_OP_G_READ, ptrSrcOp->gsmRead);
  600. CSL_FINS (value, SRIO_RIO_SRC_OP_G_IREAD, ptrSrcOp->gsmInstrnRead);
  601. CSL_FINS (value, SRIO_RIO_SRC_OP_G_READ_OWN, ptrSrcOp->gsmReadOwn);
  602. CSL_FINS (value, SRIO_RIO_SRC_OP_G_DC_INVALIDATE, ptrSrcOp->gsmDataCacheInvalidate);
  603. CSL_FINS (value, SRIO_RIO_SRC_OP_G_CASTOUT, ptrSrcOp->gsmCastout);
  604. CSL_FINS (value, SRIO_RIO_SRC_OP_G_DC_FLUSH, ptrSrcOp->gsmDataCacheFlush);
  605. CSL_FINS (value, SRIO_RIO_SRC_OP_G_IO_READ, ptrSrcOp->gsmIORead);
  606. CSL_FINS (value, SRIO_RIO_SRC_OP_G_IC_INVALIDATE, ptrSrcOp->gsmInstrnCacheInvalidate);
  607. CSL_FINS (value, SRIO_RIO_SRC_OP_G_TLB_INVALIDATE, ptrSrcOp->gsmTLBInvalidate);
  608. CSL_FINS (value, SRIO_RIO_SRC_OP_G_TLB_SYNC, ptrSrcOp->gsmTLBSync);
  609. CSL_FINS (value, SRIO_RIO_SRC_OP_DS_TM, ptrSrcOp->dataStreamingTM);
  610. CSL_FINS (value, SRIO_RIO_SRC_OP_DS, ptrSrcOp->dataStreamingSupport);
  611. CSL_FINS (value, SRIO_RIO_SRC_OP_IMPLEMENT_DEF, ptrSrcOp->implnDefined);
  612. CSL_FINS (value, SRIO_RIO_SRC_OP_READ, ptrSrcOp->readSupport);
  613. CSL_FINS (value, SRIO_RIO_SRC_OP_WRITE, ptrSrcOp->writeSupport);
  614. CSL_FINS (value, SRIO_RIO_SRC_OP_STRM_WR, ptrSrcOp->streamWriteSupport);
  615. CSL_FINS (value, SRIO_RIO_SRC_OP_WR_RES, ptrSrcOp->writeResponseSupport);
  616. CSL_FINS (value, SRIO_RIO_SRC_OP_D_MSG, ptrSrcOp->dataMessageSupport);
  617. CSL_FINS (value, SRIO_RIO_SRC_OP_DBELL, ptrSrcOp->doorbellSupport);
  618. CSL_FINS (value, SRIO_RIO_SRC_OP_ACSWAP, ptrSrcOp->atomicCompareSwapSupport);
  619. CSL_FINS (value, SRIO_RIO_SRC_OP_ATSWAP, ptrSrcOp->atomicTestSwapSupport);
  620. CSL_FINS (value, SRIO_RIO_SRC_OP_A_INC, ptrSrcOp->atomicIncSupport);
  621. CSL_FINS (value, SRIO_RIO_SRC_OP_A_DEC, ptrSrcOp->atomicDecSupport);
  622. CSL_FINS (value, SRIO_RIO_SRC_OP_A_SET, ptrSrcOp->atomicSetSupport);
  623. CSL_FINS (value, SRIO_RIO_SRC_OP_A_CLEAR, ptrSrcOp->atomicClearSupport);
  624. CSL_FINS (value, SRIO_RIO_SRC_OP_A_SWAP, ptrSrcOp->atomicSwapSupport);
  625. CSL_FINS (value, SRIO_RIO_SRC_OP_PORT_WR, ptrSrcOp->portWriteOperationSupport);
  626. CSL_FINS (value, SRIO_RIO_SRC_OP_IMPLEMENT_DEF2, ptrSrcOp->implnDefined2);
  627. hSrio->RIO_SRC_OP = value;
  628. }
  629. /** ============================================================================
  630. * @n@b CSL_SRIO_GetDestOperationCAR
  631. *
  632. * @b Description
  633. * @n The function reads the Switch Port Capabilities which are all the logical
  634. * operations that can be issued by the application.
  635. *
  636. * @b Arguments
  637. @verbatim
  638. hSrio Handle of the SRIO device
  639. ptrDstOp Pointer to the Dest CAR Structure populated by this
  640. API
  641. @endverbatim
  642. *
  643. * <b> Return Value </b>
  644. * @n None
  645. *
  646. * <b> Pre Condition </b>
  647. * @n CSL_SRIO_Open() must be called
  648. *
  649. * <b> Post Condition </b>
  650. * @n None
  651. *
  652. * @b Reads
  653. * @n SRIO_RIO_DEST_OP_G_READ, SRIO_RIO_DEST_OP_G_IREAD, SRIO_RIO_DEST_OP_G_READ_OWN,
  654. * @n SRIO_RIO_DEST_OP_G_DC_INVALIDATE, SRIO_RIO_DEST_OP_G_CASTOUT, SRIO_RIO_DEST_OP_G_DC_FLUSH,
  655. * @n SRIO_RIO_DEST_OP_G_IO_READ, SRIO_RIO_DEST_OP_G_IC_INVALIDATE, SRIO_RIO_DEST_OP_G_TLB_INVALIDATE,
  656. * @n SRIO_RIO_DEST_OP_G_TLB_SYNC, SRIO_RIO_DEST_OP_DS_TM, SRIO_RIO_DEST_OP_DS,
  657. * @n SRIO_RIO_DEST_OP_IMPLEMENT_DEF, SRIO_RIO_DEST_OP_READ, SRIO_RIO_DEST_OP_WRITE,
  658. * @n SRIO_RIO_DEST_OP_STRM_WR, SRIO_RIO_DEST_OP_WR_RES, SRIO_RIO_DEST_OP_D_MSG, SRIO_RIO_DEST_OP_DBELL,
  659. * @n SRIO_RIO_DEST_OP_ACSWAP, SRIO_RIO_DEST_OP_ATSWAP, SRIO_RIO_DEST_OP_A_INC, SRIO_RIO_DEST_OP_A_DEC,
  660. * @n SRIO_RIO_DEST_OP_A_SET, SRIO_RIO_DEST_OP_A_CLEAR, SRIO_RIO_DEST_OP_A_SWAP, SRIO_RIO_DEST_OP_PORT_WR,
  661. * @n SRIO_RIO_DEST_OP_IMPLEMENT_DEF2
  662. *
  663. * @b Example
  664. * @verbatim
  665. CSL_SrioHandle hSrio;
  666. SRIO_OP_CAR dstOPCAR;
  667. // Open the CSL SRIO Module 0
  668. hSrio = CSL_SRIO_Open (0);
  669. // Get the Destination Operation CAR
  670. CSL_SRIO_GetDestOperationCAR (hSrio, &dstOPCAR);
  671. ...
  672. @endverbatim
  673. * =============================================================================
  674. */
  675. static inline void CSL_SRIO_GetDestOperationCAR
  676. (
  677. CSL_SrioHandle hSrio,
  678. SRIO_OP_CAR* ptrDstOp
  679. )
  680. {
  681. Uint32 value = hSrio->RIO_DEST_OP;
  682. /* Extract the fields from the Destination OP */
  683. ptrDstOp->gsmRead = CSL_FEXT (value, SRIO_RIO_DEST_OP_G_READ);
  684. ptrDstOp->gsmInstrnRead = CSL_FEXT (value, SRIO_RIO_DEST_OP_G_IREAD);
  685. ptrDstOp->gsmReadOwn = CSL_FEXT (value, SRIO_RIO_DEST_OP_G_READ_OWN);
  686. ptrDstOp->gsmDataCacheInvalidate = CSL_FEXT (value, SRIO_RIO_DEST_OP_G_DC_INVALIDATE);
  687. ptrDstOp->gsmCastout = CSL_FEXT (value, SRIO_RIO_DEST_OP_G_CASTOUT);
  688. ptrDstOp->gsmDataCacheFlush = CSL_FEXT (value, SRIO_RIO_DEST_OP_G_DC_FLUSH);
  689. ptrDstOp->gsmIORead = CSL_FEXT (value, SRIO_RIO_DEST_OP_G_IO_READ);
  690. ptrDstOp->gsmInstrnCacheInvalidate = CSL_FEXT (value, SRIO_RIO_DEST_OP_G_IC_INVALIDATE);
  691. ptrDstOp->gsmTLBInvalidate = CSL_FEXT (value, SRIO_RIO_DEST_OP_G_TLB_INVALIDATE);
  692. ptrDstOp->gsmTLBSync = CSL_FEXT (value, SRIO_RIO_DEST_OP_G_TLB_SYNC);
  693. ptrDstOp->dataStreamingTM = CSL_FEXT (value, SRIO_RIO_DEST_OP_DS_TM);
  694. ptrDstOp->dataStreamingSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_DS);
  695. ptrDstOp->implnDefined = CSL_FEXT (value, SRIO_RIO_DEST_OP_IMPLEMENT_DEF);
  696. ptrDstOp->readSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_READ);
  697. ptrDstOp->writeSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_WRITE);
  698. ptrDstOp->streamWriteSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_STRM_WR);
  699. ptrDstOp->writeResponseSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_WR_RES);
  700. ptrDstOp->dataMessageSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_D_MSG);
  701. ptrDstOp->doorbellSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_DBELL);
  702. ptrDstOp->atomicCompareSwapSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_ACSWAP);
  703. ptrDstOp->atomicTestSwapSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_ATSWAP);
  704. ptrDstOp->atomicIncSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_A_INC);
  705. ptrDstOp->atomicDecSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_A_DEC);
  706. ptrDstOp->atomicSetSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_A_SET);
  707. ptrDstOp->atomicClearSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_A_CLEAR);
  708. ptrDstOp->atomicSwapSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_A_SWAP);
  709. ptrDstOp->portWriteOperationSupport = CSL_FEXT (value, SRIO_RIO_DEST_OP_PORT_WR);
  710. ptrDstOp->implnDefined2 = CSL_FEXT (value, SRIO_RIO_DEST_OP_IMPLEMENT_DEF2);
  711. }
  712. /** ============================================================================
  713. * @n@b CSL_SRIO_SetDestOperationCAR
  714. *
  715. * @b Description
  716. * @n The function sets the Switch Port Capabilities which are all the logical
  717. * operations that can be issued by the application.
  718. *
  719. * @b Arguments
  720. @verbatim
  721. hSrio Handle of the SRIO device
  722. ptrDstOp Pointer to the Dest CAR Structure to be configured
  723. @endverbatim
  724. *
  725. * <b> Return Value </b>
  726. * @n None
  727. *
  728. * <b> Pre Condition </b>
  729. * @n CSL_SRIO_Open() must be called
  730. *
  731. * <b> Post Condition </b>
  732. * @n None
  733. *
  734. * @b Writes
  735. * @n SRIO_RIO_DEST_OP_G_READ, SRIO_RIO_DEST_OP_G_IREAD, SRIO_RIO_DEST_OP_G_READ_OWN,
  736. * @n SRIO_RIO_DEST_OP_G_DC_INVALIDATE, SRIO_RIO_DEST_OP_G_CASTOUT, SRIO_RIO_DEST_OP_G_DC_FLUSH,
  737. * @n SRIO_RIO_DEST_OP_G_IO_READ, SRIO_RIO_DEST_OP_G_IC_INVALIDATE, SRIO_RIO_DEST_OP_G_TLB_INVALIDATE,
  738. * @n SRIO_RIO_DEST_OP_G_TLB_SYNC, SRIO_RIO_DEST_OP_DS_TM, SRIO_RIO_DEST_OP_DS,
  739. * @n SRIO_RIO_DEST_OP_IMPLEMENT_DEF, SRIO_RIO_DEST_OP_READ, SRIO_RIO_DEST_OP_WRITE,
  740. * @n SRIO_RIO_DEST_OP_STRM_WR, SRIO_RIO_DEST_OP_WR_RES, SRIO_RIO_DEST_OP_D_MSG, SRIO_RIO_DEST_OP_DBELL,
  741. * @n SRIO_RIO_DEST_OP_ACSWAP, SRIO_RIO_DEST_OP_ATSWAP, SRIO_RIO_DEST_OP_A_INC, SRIO_RIO_DEST_OP_A_DEC,
  742. * @n SRIO_RIO_DEST_OP_A_SET, SRIO_RIO_DEST_OP_A_CLEAR, SRIO_RIO_DEST_OP_A_SWAP, SRIO_RIO_DEST_OP_PORT_WR,
  743. * @n SRIO_RIO_DEST_OP_IMPLEMENT_DEF2
  744. *
  745. * @b Example
  746. * @verbatim
  747. CSL_SrioHandle hSrio;
  748. SRIO_OP_CAR dstOPCAR;
  749. // Open the CSL SRIO Module 0
  750. hSrio = CSL_SRIO_Open (0);
  751. // Get the Dest Operation CAR
  752. CSL_SRIO_GetDestOperationCAR (hSrio, &dstOPCAR);
  753. // Allow Doorbell support.
  754. dstOPCAR.doorbellSupport = 1;
  755. // Set the Dest Operation CAR
  756. CSL_SRIO_SetDestOperationCAR (hSrio, &dstOPCAR);
  757. ...
  758. @endverbatim
  759. * =============================================================================
  760. */
  761. static inline void CSL_SRIO_SetDestOperationCAR
  762. (
  763. CSL_SrioHandle hSrio,
  764. SRIO_OP_CAR* ptrDstOp
  765. )
  766. {
  767. Uint32 value = 0;
  768. /* Populate the fields into the Source OP */
  769. CSL_FINS (value, SRIO_RIO_DEST_OP_G_READ, ptrDstOp->gsmRead);
  770. CSL_FINS (value, SRIO_RIO_DEST_OP_G_IREAD, ptrDstOp->gsmInstrnRead);
  771. CSL_FINS (value, SRIO_RIO_DEST_OP_G_READ_OWN, ptrDstOp->gsmReadOwn);
  772. CSL_FINS (value, SRIO_RIO_DEST_OP_G_DC_INVALIDATE, ptrDstOp->gsmDataCacheInvalidate);
  773. CSL_FINS (value, SRIO_RIO_DEST_OP_G_CASTOUT, ptrDstOp->gsmCastout);
  774. CSL_FINS (value, SRIO_RIO_DEST_OP_G_DC_FLUSH, ptrDstOp->gsmDataCacheFlush);
  775. CSL_FINS (value, SRIO_RIO_DEST_OP_G_IO_READ, ptrDstOp->gsmIORead);
  776. CSL_FINS (value, SRIO_RIO_DEST_OP_G_IC_INVALIDATE, ptrDstOp->gsmInstrnCacheInvalidate);
  777. CSL_FINS (value, SRIO_RIO_DEST_OP_G_TLB_INVALIDATE, ptrDstOp->gsmTLBInvalidate);
  778. CSL_FINS (value, SRIO_RIO_DEST_OP_G_TLB_SYNC, ptrDstOp->gsmTLBSync);
  779. CSL_FINS (value, SRIO_RIO_DEST_OP_DS_TM, ptrDstOp->dataStreamingTM);
  780. CSL_FINS (value, SRIO_RIO_DEST_OP_DS, ptrDstOp->dataStreamingSupport);
  781. CSL_FINS (value, SRIO_RIO_DEST_OP_IMPLEMENT_DEF, ptrDstOp->implnDefined);
  782. CSL_FINS (value, SRIO_RIO_DEST_OP_READ, ptrDstOp->readSupport);
  783. CSL_FINS (value, SRIO_RIO_DEST_OP_WRITE, ptrDstOp->writeSupport);
  784. CSL_FINS (value, SRIO_RIO_DEST_OP_STRM_WR, ptrDstOp->streamWriteSupport);
  785. CSL_FINS (value, SRIO_RIO_DEST_OP_WR_RES, ptrDstOp->writeResponseSupport);
  786. CSL_FINS (value, SRIO_RIO_DEST_OP_D_MSG, ptrDstOp->dataMessageSupport);
  787. CSL_FINS (value, SRIO_RIO_DEST_OP_DBELL, ptrDstOp->doorbellSupport);
  788. CSL_FINS (value, SRIO_RIO_DEST_OP_ACSWAP, ptrDstOp->atomicCompareSwapSupport);
  789. CSL_FINS (value, SRIO_RIO_DEST_OP_ATSWAP, ptrDstOp->atomicTestSwapSupport);
  790. CSL_FINS (value, SRIO_RIO_DEST_OP_A_INC, ptrDstOp->atomicIncSupport);
  791. CSL_FINS (value, SRIO_RIO_DEST_OP_A_DEC, ptrDstOp->atomicDecSupport);
  792. CSL_FINS (value, SRIO_RIO_DEST_OP_A_SET, ptrDstOp->atomicSetSupport);
  793. CSL_FINS (value, SRIO_RIO_DEST_OP_A_CLEAR, ptrDstOp->atomicClearSupport);
  794. CSL_FINS (value, SRIO_RIO_DEST_OP_A_SWAP, ptrDstOp->atomicSwapSupport);
  795. CSL_FINS (value, SRIO_RIO_DEST_OP_PORT_WR, ptrDstOp->portWriteOperationSupport);
  796. CSL_FINS (value, SRIO_RIO_DEST_OP_IMPLEMENT_DEF2, ptrDstOp->implnDefined2);
  797. hSrio->RIO_DEST_OP = value;
  798. }
  799. /** ============================================================================
  800. * @n@b CSL_SRIO_GetDataStreamingInfo
  801. *
  802. * @b Description
  803. * @n The function gets the data streaming information
  804. *
  805. * @b Arguments
  806. @verbatim
  807. hSrio Handle of the SRIO device
  808. maxPDU Maximum PDU
  809. segSupport Num of segmentation context
  810. @endverbatim
  811. *
  812. * <b> Return Value </b>
  813. * @n None
  814. *
  815. * <b> Pre Condition </b>
  816. * @n CSL_SRIO_Open() must be called
  817. *
  818. * <b> Post Condition </b>
  819. * @n None
  820. *
  821. * @b Reads
  822. * @n SRIO_RIO_DS_INFO_MAX_PDU, SRIO_RIO_DS_INFO_SEG_SUPPORT
  823. *
  824. * @b Example
  825. * @verbatim
  826. CSL_SrioHandle hSrio;
  827. Uint16 maxPDU;
  828. Uint16 segSupport;
  829. // Open the CSL SRIO Module 0
  830. hSrio = CSL_SRIO_Open (0);
  831. // Get the Data Streaming Information
  832. CSL_SRIO_GetDataStreamingInfo (hSrio, &maxPDU, &segSupport);
  833. ...
  834. @endverbatim
  835. * =============================================================================
  836. */
  837. static inline void CSL_SRIO_GetDataStreamingInfo
  838. (
  839. CSL_SrioHandle hSrio,
  840. Uint16* maxPDU,
  841. Uint16* segSupport
  842. )
  843. {
  844. Uint32 value = hSrio->RIO_DS_INFO;
  845. *maxPDU = CSL_FEXT (value, SRIO_RIO_DS_INFO_MAX_PDU);
  846. *segSupport = CSL_FEXT (value, SRIO_RIO_DS_INFO_SEG_SUPPORT);
  847. }
  848. /** ============================================================================
  849. * @n@b CSL_SRIO_SetDataStreamingInfo
  850. *
  851. * @b Description
  852. * @n The function sets the data streaming information
  853. *
  854. * @b Arguments
  855. @verbatim
  856. hSrio Handle of the SRIO device
  857. maxPDU Maximum PDU
  858. segSupport Num of segmentation context
  859. @endverbatim
  860. *
  861. * <b> Return Value </b>
  862. * @n None
  863. *
  864. * <b> Pre Condition </b>
  865. * @n CSL_SRIO_Open() must be called
  866. *
  867. * <b> Post Condition </b>
  868. * @n None
  869. *
  870. * @b Writes
  871. * @n SRIO_RIO_DS_INFO_MAX_PDU, SRIO_RIO_DS_INFO_SEG_SUPPORT
  872. *
  873. * @b Example
  874. * @verbatim
  875. CSL_SrioHandle hSrio;
  876. Uint16 maxPDU;
  877. Uint16 segSupport;
  878. // Open the CSL SRIO Module 0
  879. hSrio = CSL_SRIO_Open (0);
  880. // Set the Data Streaming Information: 64K bytes and 64K Segmentation Context
  881. CSL_SRIO_SetDataStreamingInfo (hSrio, 0x0, 0x0);
  882. ...
  883. @endverbatim
  884. * =============================================================================
  885. */
  886. static inline void CSL_SRIO_SetDataStreamingInfo
  887. (
  888. CSL_SrioHandle hSrio,
  889. Uint16 maxPDU,
  890. Uint16 segSupport
  891. )
  892. {
  893. hSrio->RIO_DS_INFO = CSL_FMK(SRIO_RIO_DS_INFO_MAX_PDU, maxPDU) |
  894. CSL_FMK(SRIO_RIO_DS_INFO_SEG_SUPPORT, segSupport);
  895. }
  896. /** ============================================================================
  897. * @n@b CSL_SRIO_GetDataStreamingType
  898. *
  899. * @b Description
  900. * @n The function gets the data streaming traffic management type
  901. *
  902. * @b Arguments
  903. @verbatim
  904. hSrio Handle of the SRIO device
  905. type Data Streaming Type populated by this API
  906. @endverbatim
  907. *
  908. * <b> Return Value </b>
  909. * @n None
  910. *
  911. * <b> Pre Condition </b>
  912. * @n CSL_SRIO_Open() must be called
  913. *
  914. * <b> Post Condition </b>
  915. * @n None
  916. *
  917. * @b Reads
  918. * @n SRIO_RIO_DS_LL_CTL_TM_TYPES
  919. *
  920. * @b Example
  921. * @verbatim
  922. CSL_SrioHandle hSrio;
  923. Uint8 type;
  924. // Open the CSL SRIO Module 0
  925. hSrio = CSL_SRIO_Open (0);
  926. // Get the Data Streaming Type
  927. CSL_SRIO_GetDataStreamingType (hSrio, &type);
  928. ...
  929. @endverbatim
  930. * =============================================================================
  931. */
  932. static inline void CSL_SRIO_GetDataStreamingType
  933. (
  934. CSL_SrioHandle hSrio,
  935. Uint8* type
  936. )
  937. {
  938. *type = CSL_FEXT (hSrio->RIO_DS_LL_CTL, SRIO_RIO_DS_LL_CTL_TM_TYPES);
  939. }
  940. /** ============================================================================
  941. * @n@b CSL_SRIO_GetDataStreamingMode
  942. *
  943. * @b Description
  944. * @n The function gets the data streaming traffic management mode of operation
  945. *
  946. * @b Arguments
  947. @verbatim
  948. hSrio Handle of the SRIO device
  949. mode Traffic Management Mode populated by this API
  950. @endverbatim
  951. *
  952. * <b> Return Value </b>
  953. * @n None
  954. *
  955. * <b> Pre Condition </b>
  956. * @n CSL_SRIO_Open() must be called
  957. *
  958. * <b> Post Condition </b>
  959. * @n None
  960. *
  961. * @b Reads
  962. * @n SRIO_RIO_DS_LL_CTL_TM_MODE
  963. *
  964. * @b Example
  965. * @verbatim
  966. CSL_SrioHandle hSrio;
  967. Uint8 mode;
  968. // Open the CSL SRIO Module 0
  969. hSrio = CSL_SRIO_Open (0);
  970. // Get the Data Streaming TM Mode
  971. CSL_SRIO_GetDataStreamingMode (hSrio, &mode);
  972. ...
  973. @endverbatim
  974. * =============================================================================
  975. */
  976. static inline void CSL_SRIO_GetDataStreamingMode
  977. (
  978. CSL_SrioHandle hSrio,
  979. Uint8* mode
  980. )
  981. {
  982. *mode = CSL_FEXT (hSrio->RIO_DS_LL_CTL, SRIO_RIO_DS_LL_CTL_TM_MODE);
  983. }
  984. /** ============================================================================
  985. * @n@b CSL_SRIO_SetDataStreamingMode
  986. *
  987. * @b Description
  988. * @n The function sets the data streaming traffic management mode of operation
  989. *
  990. * @b Arguments
  991. @verbatim
  992. hSrio Handle of the SRIO device
  993. mode Traffic Management Mode to be configured
  994. @endverbatim
  995. *
  996. * <b> Return Value </b>
  997. * @n None
  998. *
  999. * <b> Pre Condition </b>
  1000. * @n CSL_SRIO_Open() must be called
  1001. *
  1002. * <b> Post Condition </b>
  1003. * @n None
  1004. *
  1005. * @b Writes
  1006. * @n SRIO_RIO_DS_LL_CTL_TM_MODE
  1007. *
  1008. * @b Example
  1009. * @verbatim
  1010. CSL_SrioHandle hSrio;
  1011. Uint8 mode;
  1012. // Open the CSL SRIO Module 0
  1013. hSrio = CSL_SRIO_Open (0);
  1014. // Set the Data Streaming TM Mode
  1015. CSL_SRIO_SetDataStreamingMode (hSrio, &mode);
  1016. ...
  1017. @endverbatim
  1018. * =============================================================================
  1019. */
  1020. static inline void CSL_SRIO_SetDataStreamingMode
  1021. (
  1022. CSL_SrioHandle hSrio,
  1023. Uint8 mode
  1024. )
  1025. {
  1026. CSL_FINS (hSrio->RIO_DS_LL_CTL, SRIO_RIO_DS_LL_CTL_TM_MODE, mode);
  1027. }
  1028. /** ============================================================================
  1029. * @n@b CSL_SRIO_GetDataStreamingMTU
  1030. *
  1031. * @b Description
  1032. * @n The function gets the data streaming MTU
  1033. *
  1034. * @b Arguments
  1035. @verbatim
  1036. hSrio Handle of the SRIO device
  1037. mtu MTU populated by this API
  1038. @endverbatim
  1039. *
  1040. * <b> Return Value </b>
  1041. * @n None
  1042. *
  1043. * <b> Pre Condition </b>
  1044. * @n CSL_SRIO_Open() must be called
  1045. *
  1046. * <b> Post Condition </b>
  1047. * @n None
  1048. *
  1049. * @b Reads
  1050. * @n SRIO_RIO_DS_LL_CTL_MTU
  1051. *
  1052. * @b Example
  1053. * @verbatim
  1054. CSL_SrioHandle hSrio;
  1055. Uint8 mtu;
  1056. // Open the CSL SRIO Module 0
  1057. hSrio = CSL_SRIO_Open (0);
  1058. // Get the Data Streaming MTU
  1059. CSL_SRIO_GetDataStreamingMTU (hSrio, &mtu);
  1060. ...
  1061. @endverbatim
  1062. * =============================================================================
  1063. */
  1064. static inline void CSL_SRIO_GetDataStreamingMTU
  1065. (
  1066. CSL_SrioHandle hSrio,
  1067. Uint8* mtu
  1068. )
  1069. {
  1070. *mtu = CSL_FEXT (hSrio->RIO_DS_LL_CTL, SRIO_RIO_DS_LL_CTL_MTU);
  1071. }
  1072. /** ============================================================================
  1073. * @n@b CSL_SRIO_SetDataStreamingMTU
  1074. *
  1075. * @b Description
  1076. * @n The function sets the data streaming MTU
  1077. *
  1078. * @b Arguments
  1079. @verbatim
  1080. hSrio Handle of the SRIO device
  1081. mtu MTU to be configured
  1082. @endverbatim
  1083. *
  1084. * <b> Return Value </b>
  1085. * @n None
  1086. *
  1087. * <b> Pre Condition </b>
  1088. * @n CSL_SRIO_Open() must be called
  1089. *
  1090. * <b> Post Condition </b>
  1091. * @n None
  1092. *
  1093. * @b Writes
  1094. * @n SRIO_RIO_DS_LL_CTL_MTU
  1095. *
  1096. * @b Example
  1097. * @verbatim
  1098. CSL_SrioHandle hSrio;
  1099. // Open the CSL SRIO Module 0
  1100. hSrio = CSL_SRIO_Open (0);
  1101. // Set the Data Streaming MTU
  1102. CSL_SRIO_SetDataStreamingMTU (hSrio, 64);
  1103. ...
  1104. @endverbatim
  1105. * =============================================================================
  1106. */
  1107. static inline void CSL_SRIO_SetDataStreamingMTU
  1108. (
  1109. CSL_SrioHandle hSrio,
  1110. Uint8 mtu
  1111. )
  1112. {
  1113. CSL_FINS (hSrio->RIO_DS_LL_CTL, SRIO_RIO_DS_LL_CTL_MTU, mtu);
  1114. }
  1115. /** ============================================================================
  1116. * @n@b CSL_SRIO_SetPEExtendedAddressingControl
  1117. *
  1118. * @b Description
  1119. * @n The function sets the processing element extended addressing control
  1120. *
  1121. * @b Arguments
  1122. @verbatim
  1123. hSrio Handle of the SRIO device
  1124. controlInfo Extended Addressing Control Information to be configured
  1125. @endverbatim
  1126. *
  1127. * <b> Return Value </b>
  1128. * @n None
  1129. *
  1130. * <b> Pre Condition </b>
  1131. * @n CSL_SRIO_Open() must be called
  1132. *
  1133. * <b> Post Condition </b>
  1134. * @n None
  1135. *
  1136. * @b Writes
  1137. * @n SRIO_RIO_PE_LL_CTL_EXT_ADDR_CTL
  1138. *
  1139. * @b Example
  1140. * @verbatim
  1141. CSL_SrioHandle hSrio;
  1142. // Open the CSL SRIO Module 0
  1143. hSrio = CSL_SRIO_Open (0);
  1144. // Set the Extended Addressing Control Information to operate in 34 bit addresses
  1145. CSL_SRIO_SetPEExtendedAddressingControl (hSrio, 0x1);
  1146. ...
  1147. @endverbatim
  1148. * =============================================================================
  1149. */
  1150. static inline void CSL_SRIO_SetPEExtendedAddressingControl
  1151. (
  1152. CSL_SrioHandle hSrio,
  1153. Uint8 controlInfo
  1154. )
  1155. {
  1156. CSL_FINS (hSrio->RIO_PE_LL_CTL, SRIO_RIO_PE_LL_CTL_EXT_ADDR_CTL, controlInfo);
  1157. }
  1158. /** ============================================================================
  1159. * @n@b CSL_SRIO_GetPEExtendedAddressingControl
  1160. *
  1161. * @b Description
  1162. * @n The function gets the processing element extended addressing control
  1163. *
  1164. * @b Arguments
  1165. @verbatim
  1166. hSrio Handle of the SRIO device
  1167. controlInfo Extended Addressing Control Information populated
  1168. @endverbatim
  1169. *
  1170. * <b> Return Value </b>
  1171. * @n None
  1172. *
  1173. * <b> Pre Condition </b>
  1174. * @n CSL_SRIO_Open() must be called
  1175. *
  1176. * <b> Post Condition </b>
  1177. * @n None
  1178. *
  1179. * @b Reads
  1180. * @n SRIO_RIO_PE_LL_CTL_EXT_ADDR_CTL
  1181. *
  1182. * @b Example
  1183. * @verbatim
  1184. CSL_SrioHandle hSrio;
  1185. Uint8 controlInfo;
  1186. // Open the CSL SRIO Module 0
  1187. hSrio = CSL_SRIO_Open (0);
  1188. // Get the Extended Addressing Control Information
  1189. CSL_SRIO_GetPEExtendedAddressingControl (hSrio, &controlInfo);
  1190. ...
  1191. @endverbatim
  1192. * =============================================================================
  1193. */
  1194. static inline void CSL_SRIO_GetPEExtendedAddressingControl
  1195. (
  1196. CSL_SrioHandle hSrio,
  1197. Uint8* controlInfo
  1198. )
  1199. {
  1200. *controlInfo = CSL_FEXT (hSrio->RIO_PE_LL_CTL, SRIO_RIO_PE_LL_CTL_EXT_ADDR_CTL);
  1201. }
  1202. /** ============================================================================
  1203. * @n@b CSL_SRIO_SetLocalConfig0SpaceInfo
  1204. *
  1205. * @b Description
  1206. * @n The function sets the local configuration space base address0 Information
  1207. *
  1208. * @b Arguments
  1209. @verbatim
  1210. hSrio Handle of the SRIO device
  1211. baseInfo0 Local Configuration Base Address0
  1212. baseInfo1 Local Configuration Base Address1
  1213. @endverbatim
  1214. *
  1215. * <b> Return Value </b>
  1216. * @n None
  1217. *
  1218. * <b> Pre Condition </b>
  1219. * @n CSL_SRIO_Open() must be called
  1220. *
  1221. * <b> Post Condition </b>
  1222. * @n None
  1223. *
  1224. * @b Writes
  1225. * @n SRIO_RIO_LCL_CFG_HBAR_LCSBA0,SRIO_RIO_LCL_CFG_HBAR_LCSBA1
  1226. *
  1227. * @b Example
  1228. * @verbatim
  1229. CSL_SrioHandle hSrio;
  1230. // Open the CSL SRIO Module 0
  1231. hSrio = CSL_SRIO_Open (0);
  1232. // Set the Local configuration information
  1233. CSL_SRIO_SetLocalConfig0SpaceInfo (hSrio, 0x100, 0x200);
  1234. ...
  1235. @endverbatim
  1236. * =============================================================================
  1237. */
  1238. static inline void CSL_SRIO_SetLocalConfig0SpaceInfo
  1239. (
  1240. CSL_SrioHandle hSrio,
  1241. Uint16 baseInfo0,
  1242. Uint16 baseInfo1
  1243. )
  1244. {
  1245. hSrio->RIO_LCL_CFG_HBAR = CSL_FMK (SRIO_RIO_LCL_CFG_HBAR_LCSBA1, baseInfo1) |
  1246. CSL_FMK (SRIO_RIO_LCL_CFG_HBAR_LCSBA0, baseInfo0);
  1247. }
  1248. /** ============================================================================
  1249. * @n@b CSL_SRIO_GetLocalConfig0SpaceInfo
  1250. *
  1251. * @b Description
  1252. * @n The function gets the local configuration space base address0 information
  1253. *
  1254. * @b Arguments
  1255. @verbatim
  1256. hSrio Handle of the SRIO device
  1257. baseInfo0 Local Configuration Base Address0
  1258. baseInfo1 Local Configuration Base Address1
  1259. @endverbatim
  1260. *
  1261. * <b> Return Value </b>
  1262. * @n None
  1263. *
  1264. * <b> Pre Condition </b>
  1265. * @n CSL_SRIO_Open() must be called
  1266. *
  1267. * <b> Post Condition </b>
  1268. * @n None
  1269. *
  1270. * @b Reads
  1271. * @n SRIO_RIO_LCL_CFG_HBAR_LCSBA0,SRIO_RIO_LCL_CFG_HBAR_LCSBA1
  1272. *
  1273. * @b Example
  1274. * @verbatim
  1275. CSL_SrioHandle hSrio;
  1276. Uint16 baseInfo0;
  1277. Uint16 baseInfo1;
  1278. // Open the CSL SRIO Module 0
  1279. hSrio = CSL_SRIO_Open (0);
  1280. // Set the Local configuration information
  1281. CSL_SRIO_GetLocalConfig0SpaceInfo (hSrio, &baseInfo0, &baseInfo1);
  1282. ...
  1283. @endverbatim
  1284. * =============================================================================
  1285. */
  1286. static inline void CSL_SRIO_GetLocalConfig0SpaceInfo
  1287. (
  1288. CSL_SrioHandle hSrio,
  1289. Uint16* baseInfo0,
  1290. Uint16* baseInfo1
  1291. )
  1292. {
  1293. Uint32 value = hSrio->RIO_LCL_CFG_HBAR;
  1294. *baseInfo0 = CSL_FEXT(value, SRIO_RIO_LCL_CFG_HBAR_LCSBA0);
  1295. *baseInfo1 = CSL_FEXT(value, SRIO_RIO_LCL_CFG_HBAR_LCSBA1);
  1296. }
  1297. /** ============================================================================
  1298. * @n@b CSL_SRIO_SetLocalConfig1SpaceInfo
  1299. *
  1300. * @b Description
  1301. * @n The function sets the local configuration space base address1 Information
  1302. *
  1303. * @b Arguments
  1304. @verbatim
  1305. hSrio Handle of the SRIO device
  1306. baseInfo0 Local Configuration Base Address0
  1307. baseInfo1 Local Configuration Base Address1
  1308. @endverbatim
  1309. *
  1310. * <b> Return Value </b>
  1311. * @n None
  1312. *
  1313. * <b> Pre Condition </b>
  1314. * @n CSL_SRIO_Open() must be called
  1315. *
  1316. * <b> Post Condition </b>
  1317. * @n None
  1318. *
  1319. * @b Writes
  1320. * @n SRIO_RIO_LCL_CFG_BAR_LCSBA0,SRIO_RIO_LCL_CFG_BAR_LCSBA1
  1321. *
  1322. * @b Example
  1323. * @verbatim
  1324. CSL_SrioHandle hSrio;
  1325. // Open the CSL SRIO Module 0
  1326. hSrio = CSL_SRIO_Open (0);
  1327. // Set the Local configuration1 information
  1328. CSL_SRIO_SetLocalConfig1SpaceInfo (hSrio, 0x100, 0x200);
  1329. ...
  1330. @endverbatim
  1331. * =============================================================================
  1332. */
  1333. static inline void CSL_SRIO_SetLocalConfig1SpaceInfo
  1334. (
  1335. CSL_SrioHandle hSrio,
  1336. Uint8 baseInfo0,
  1337. Uint32 baseInfo1
  1338. )
  1339. {
  1340. hSrio->RIO_LCL_CFG_BAR = CSL_FMK (SRIO_RIO_LCL_CFG_BAR_LCSBA1, baseInfo1) |
  1341. CSL_FMK (SRIO_RIO_LCL_CFG_BAR_LCSBA0, baseInfo0);
  1342. }
  1343. /** ============================================================================
  1344. * @n@b CSL_SRIO_GetLocalConfig1SpaceInfo
  1345. *
  1346. * @b Description
  1347. * @n The function gets the local configuration space base address1 Information
  1348. *
  1349. * @b Arguments
  1350. @verbatim
  1351. hSrio Handle of the SRIO device
  1352. baseInfo0 Local Configuration Base Address0
  1353. baseInfo1 Local Configuration Base Address1
  1354. @endverbatim
  1355. *
  1356. * <b> Return Value </b>
  1357. * @n None
  1358. *
  1359. * <b> Pre Condition </b>
  1360. * @n CSL_SRIO_Open() must be called
  1361. *
  1362. * <b> Post Condition </b>
  1363. * @n None
  1364. *
  1365. * @b Reads
  1366. * @n SRIO_RIO_LCL_CFG_BAR_LCSBA0,SRIO_RIO_LCL_CFG_BAR_LCSBA1
  1367. *
  1368. * @b Example
  1369. * @verbatim
  1370. CSL_SrioHandle hSrio;
  1371. Uint8 baseInfo0;
  1372. Uint32 baseInfo1;
  1373. // Open the CSL SRIO Module 0
  1374. hSrio = CSL_SRIO_Open (0);
  1375. // Get the Local configuration1 information
  1376. CSL_SRIO_GetLocalConfig1SpaceInfo (hSrio, &baseInfo0, &baseInfo1);
  1377. ...
  1378. @endverbatim
  1379. * =============================================================================
  1380. */
  1381. static inline void CSL_SRIO_GetLocalConfig1SpaceInfo
  1382. (
  1383. CSL_SrioHandle hSrio,
  1384. Uint8* baseInfo0,
  1385. Uint32* baseInfo1
  1386. )
  1387. {
  1388. Uint32 value = hSrio->RIO_LCL_CFG_BAR;
  1389. *baseInfo0 = CSL_FEXT(value, SRIO_RIO_LCL_CFG_BAR_LCSBA0);
  1390. *baseInfo1 = CSL_FEXT(value, SRIO_RIO_LCL_CFG_BAR_LCSBA1);
  1391. }
  1392. /** ============================================================================
  1393. * @n@b CSL_SRIO_SetDeviceIDCSR
  1394. *
  1395. * @b Description
  1396. * @n The function sets the 8bit and 16 device ID in the standard CSR
  1397. *
  1398. * @b Arguments
  1399. @verbatim
  1400. hSrio Handle of the SRIO device
  1401. baseID8Bit 8bit Device Identifier.
  1402. baseID16Bit 16bit Device Identifier.
  1403. @endverbatim
  1404. *
  1405. * <b> Return Value </b>
  1406. * @n None
  1407. *
  1408. * <b> Pre Condition </b>
  1409. * @n CSL_SRIO_Open() must be called
  1410. *
  1411. * <b> Post Condition </b>
  1412. * @n None
  1413. *
  1414. * @b Writes
  1415. * @n SRIO_RIO_BASE_ID_BASE_ID,SRIO_RIO_BASE_ID_LARGE_BASE_ID
  1416. *
  1417. * @b Example
  1418. * @verbatim
  1419. CSL_SrioHandle hSrio;
  1420. // Open the CSL SRIO Module 0
  1421. hSrio = CSL_SRIO_Open (0);
  1422. // Set the Device Identifier CSR
  1423. CSL_SRIO_SetDeviceIDCSR (hSrio, 0x0, 0xDEAD);
  1424. ...
  1425. @endverbatim
  1426. * =============================================================================
  1427. */
  1428. static inline void CSL_SRIO_SetDeviceIDCSR
  1429. (
  1430. CSL_SrioHandle hSrio,
  1431. Uint8 baseID8Bit,
  1432. Uint16 baseID16Bit
  1433. )
  1434. {
  1435. /* Populate the fields into the Device ID CSR */
  1436. hSrio->RIO_BASE_ID = CSL_FMK (SRIO_RIO_BASE_ID_BASE_ID, baseID8Bit) |
  1437. CSL_FMK (SRIO_RIO_BASE_ID_LARGE_BASE_ID, baseID16Bit);
  1438. }
  1439. /** ============================================================================
  1440. * @n@b CSL_SRIO_GetDeviceIDCSR
  1441. *
  1442. * @b Description
  1443. * @n The function gets the 8bit and 16 device ID in the standard CSR
  1444. *
  1445. * @b Arguments
  1446. @verbatim
  1447. hSrio Handle of the SRIO device
  1448. baseID8Bit 8bit Device Identifier populated by this API
  1449. baseID16Bit 16bit Device Identifier populated by this API
  1450. @endverbatim
  1451. *
  1452. * <b> Return Value </b>
  1453. * @n None
  1454. *
  1455. * <b> Pre Condition </b>
  1456. * @n CSL_SRIO_Open() must be called
  1457. *
  1458. * <b> Post Condition </b>
  1459. * @n None
  1460. *
  1461. * @b Reads
  1462. * @n SRIO_RIO_BASE_ID_BASE_ID,SRIO_RIO_BASE_ID_LARGE_BASE_ID
  1463. *
  1464. * @b Example
  1465. * @verbatim
  1466. CSL_SrioHandle hSrio;
  1467. Uint8 baseID8Bit;
  1468. Uint16 baseID16Bit;
  1469. // Open the CSL SRIO Module 0
  1470. hSrio = CSL_SRIO_Open (0);
  1471. // Get the Device Identifier CSR
  1472. CSL_SRIO_GetDeviceIDCSR (hSrio, &baseID8Bit, &baseID16Bit);
  1473. ...
  1474. @endverbatim
  1475. * =============================================================================
  1476. */
  1477. static inline void CSL_SRIO_GetDeviceIDCSR
  1478. (
  1479. CSL_SrioHandle hSrio,
  1480. Uint8* baseID8Bit,
  1481. Uint16* baseID16Bit
  1482. )
  1483. {
  1484. Uint32 value = hSrio->RIO_BASE_ID;
  1485. *baseID8Bit = CSL_FEXT (value, SRIO_RIO_BASE_ID_BASE_ID);
  1486. *baseID16Bit = CSL_FEXT (value, SRIO_RIO_BASE_ID_LARGE_BASE_ID);
  1487. }
  1488. /** ============================================================================
  1489. * @n@b CSL_SRIO_SetHostDeviceID
  1490. *
  1491. * @b Description
  1492. * @n The function sets the host device identifier which is responsible for
  1493. * initializing the processing element.
  1494. *
  1495. * @b Arguments
  1496. @verbatim
  1497. hSrio Handle of the SRIO device
  1498. identifier Device Identifier to be configured.
  1499. @endverbatim
  1500. *
  1501. * <b> Return Value </b>
  1502. * @n None
  1503. *
  1504. * <b> Pre Condition </b>
  1505. * @n CSL_SRIO_Open() must be called
  1506. *
  1507. * <b> Post Condition </b>
  1508. * @n None
  1509. *
  1510. * @b Writes
  1511. * @n SRIO_RIO_HOST_BASE_ID_LOCK_HOST_BASE_ID
  1512. *
  1513. * @b Example
  1514. * @verbatim
  1515. CSL_SrioHandle hSrio;
  1516. // Open the CSL SRIO Module 0
  1517. hSrio = CSL_SRIO_Open (0);
  1518. // Set the Host Device Identifier.
  1519. CSL_SRIO_SetHostDeviceID (hSrio, 0xBEEF);
  1520. ...
  1521. @endverbatim
  1522. * =============================================================================
  1523. */
  1524. static inline void CSL_SRIO_SetHostDeviceID
  1525. (
  1526. CSL_SrioHandle hSrio,
  1527. Uint16 identifier
  1528. )
  1529. {
  1530. /* Populate the fields into the Device ID CSR */
  1531. hSrio->RIO_HOST_BASE_ID_LOCK = CSL_FMK (SRIO_RIO_HOST_BASE_ID_LOCK_HOST_BASE_ID, identifier);
  1532. }
  1533. /** ============================================================================
  1534. * @n@b CSL_SRIO_GetHostDeviceID
  1535. *
  1536. * @b Description
  1537. * @n The function gets the host device identifier which is responsible for
  1538. * initializing the processing element.
  1539. *
  1540. * @b Arguments
  1541. @verbatim
  1542. hSrio Handle of the SRIO device
  1543. identifier Device Identifier to be populated by this API.
  1544. @endverbatim
  1545. *
  1546. * <b> Return Value </b>
  1547. * @n None
  1548. *
  1549. * <b> Pre Condition </b>
  1550. * @n CSL_SRIO_Open() must be called
  1551. *
  1552. * <b> Post Condition </b>
  1553. * @n None
  1554. *
  1555. * @b Reads
  1556. * @n SRIO_RIO_HOST_BASE_ID_LOCK_HOST_BASE_ID
  1557. *
  1558. * @b Example
  1559. * @verbatim
  1560. CSL_SrioHandle hSrio;
  1561. Uint16 deviceID;
  1562. // Open the CSL SRIO Module 0
  1563. hSrio = CSL_SRIO_Open (0);
  1564. // Get the Host Device Identifier.
  1565. CSL_SRIO_GetHostDeviceID (hSrio, &deviceID);
  1566. ...
  1567. @endverbatim
  1568. * =============================================================================
  1569. */
  1570. static inline void CSL_SRIO_GetHostDeviceID
  1571. (
  1572. CSL_SrioHandle hSrio,
  1573. Uint16* identifier
  1574. )
  1575. {
  1576. *identifier = CSL_FEXT (hSrio->RIO_HOST_BASE_ID_LOCK, SRIO_RIO_HOST_BASE_ID_LOCK_HOST_BASE_ID);
  1577. }
  1578. /** ============================================================================
  1579. * @n@b CSL_SRIO_SetCompTagCSR
  1580. *
  1581. * @b Description
  1582. * @n The function sets the component tag CSR
  1583. *
  1584. * @b Arguments
  1585. @verbatim
  1586. hSrio Handle of the SRIO device
  1587. ctag Component Tag to be configured
  1588. @endverbatim
  1589. *
  1590. * <b> Return Value </b>
  1591. * @n None
  1592. *
  1593. * <b> Pre Condition </b>
  1594. * @n CSL_SRIO_Open() must be called
  1595. *
  1596. * <b> Post Condition </b>
  1597. * @n None
  1598. *
  1599. * @b Writes
  1600. * @n SRIO_RIO_COMP_TAG
  1601. *
  1602. * @b Example
  1603. * @verbatim
  1604. CSL_SrioHandle hSrio;
  1605. // Open the CSL SRIO Module 0
  1606. hSrio = CSL_SRIO_Open (0);
  1607. // Set the Component Tag CSR
  1608. CSL_SRIO_SetCompTagCSR (hSrio, 0xBEEF);
  1609. ...
  1610. @endverbatim
  1611. * =============================================================================
  1612. */
  1613. static inline void CSL_SRIO_SetCompTagCSR
  1614. (
  1615. CSL_SrioHandle hSrio,
  1616. Uint32 ctag
  1617. )
  1618. {
  1619. hSrio->RIO_COMP_TAG = ctag;
  1620. }
  1621. /** ============================================================================
  1622. * @n@b CSL_SRIO_GetCompTagCSR
  1623. *
  1624. * @b Description
  1625. * @n The function gets the component tag CSR
  1626. *
  1627. * @b Arguments
  1628. @verbatim
  1629. hSrio Handle of the SRIO device
  1630. ctag Component Tag to be populated by this API
  1631. @endverbatim
  1632. *
  1633. * <b> Return Value </b>
  1634. * @n None
  1635. *
  1636. * <b> Pre Condition </b>
  1637. * @n CSL_SRIO_Open() must be called
  1638. *
  1639. * <b> Post Condition </b>
  1640. * @n None
  1641. *
  1642. * @b Reads
  1643. * @n SRIO_RIO_COMP_TAG
  1644. *
  1645. * @b Example
  1646. * @verbatim
  1647. CSL_SrioHandle hSrio;
  1648. Uint32 tag;
  1649. // Open the CSL SRIO Module 0
  1650. hSrio = CSL_SRIO_Open (0);
  1651. // Get the component TAG CSR
  1652. CSL_SRIO_GetCompTagCSR (hSrio, &tag);
  1653. ...
  1654. @endverbatim
  1655. * =============================================================================
  1656. */
  1657. static inline void CSL_SRIO_GetCompTagCSR
  1658. (
  1659. CSL_SrioHandle hSrio,
  1660. Uint32* ctag
  1661. )
  1662. {
  1663. *ctag = hSrio->RIO_COMP_TAG;
  1664. }
  1665. /** ============================================================================
  1666. * @n@b CSL_SRIO_GetMaintBlockHeaderInfo
  1667. *
  1668. * @b Description
  1669. * @n The function gets the maintainance block header information
  1670. *
  1671. * @b Arguments
  1672. @verbatim
  1673. hSrio Handle of the SRIO device
  1674. extFeatPtr Extended Feature Pointer populated by this API
  1675. extFeatID Extended Feature ID populated by this API
  1676. @endverbatim
  1677. *
  1678. * <b> Return Value </b>
  1679. * @n None
  1680. *
  1681. * <b> Pre Condition </b>
  1682. * @n CSL_SRIO_Open() must be called
  1683. *
  1684. * <b> Post Condition </b>
  1685. * @n None
  1686. *
  1687. * @b Reads
  1688. * @n SRIO_RIO_SP_MB_HEAD_EF_PTR,SRIO_RIO_SP_MB_HEAD_EF_ID
  1689. *
  1690. * @b Example
  1691. * @verbatim
  1692. CSL_SrioHandle hSrio;
  1693. Uint16 extFeatPtr;
  1694. Uint16 extFeatID;
  1695. // Open the CSL SRIO Module 0
  1696. hSrio = CSL_SRIO_Open (0);
  1697. // Get the maintainance block header
  1698. CSL_SRIO_GetMaintBlockHeaderInfo (hSrio, &extFeatPtr, &extFeatID);
  1699. ...
  1700. @endverbatim
  1701. * =============================================================================
  1702. */
  1703. static inline void CSL_SRIO_GetMaintBlockHeaderInfo
  1704. (
  1705. CSL_SrioHandle hSrio,
  1706. Uint16* extFeatPtr,
  1707. Uint16* extFeatID
  1708. )
  1709. {
  1710. Uint32 value = hSrio->RIO_SP_MB_HEAD;
  1711. *extFeatPtr = CSL_FEXT (value, SRIO_RIO_SP_MB_HEAD_EF_PTR);
  1712. *extFeatID = CSL_FEXT (value, SRIO_RIO_SP_MB_HEAD_EF_ID);
  1713. }
  1714. /** ============================================================================
  1715. * @n@b CSL_SRIO_GetPortLinkTimeoutCSR
  1716. *
  1717. * @b Description
  1718. * @n The functions gets the port link timeout. This timeout is for link events
  1719. * such as sending a packet to receiving the corresponding acknowledge, and
  1720. * sending a link-request to receiving the corresponding link-response
  1721. *
  1722. * @b Arguments
  1723. @verbatim
  1724. hSrio Handle of the SRIO device
  1725. timeout Timeout value populated by this API
  1726. @endverbatim
  1727. *
  1728. * <b> Return Value </b>
  1729. * @n None
  1730. *
  1731. * <b> Pre Condition </b>
  1732. * @n CSL_SRIO_Open() must be called
  1733. *
  1734. * <b> Post Condition </b>
  1735. * @n None
  1736. *
  1737. * @b Reads
  1738. * @n SRIO_RIO_SP_LT_CTL_TVAL
  1739. *
  1740. * @b Example
  1741. * @verbatim
  1742. CSL_SrioHandle hSrio;
  1743. Uint32 timeout;
  1744. // Open the CSL SRIO Module 0
  1745. hSrio = CSL_SRIO_Open (0);
  1746. // Get the port link timeout
  1747. CSL_SRIO_GetPortLinkTimeoutCSR (hSrio, &timeout);
  1748. ...
  1749. @endverbatim
  1750. * =============================================================================
  1751. */
  1752. static inline void CSL_SRIO_GetPortLinkTimeoutCSR
  1753. (
  1754. CSL_SrioHandle hSrio,
  1755. Uint32* timeout
  1756. )
  1757. {
  1758. *timeout = CSL_FEXT (hSrio->RIO_SP_LT_CTL, SRIO_RIO_SP_LT_CTL_TVAL);
  1759. }
  1760. /** ============================================================================
  1761. * @n@b CSL_SRIO_SetPortLinkTimeoutCSR
  1762. *
  1763. * @b Description
  1764. * @n The functions sets the port link timeout.
  1765. *
  1766. * @b Arguments
  1767. @verbatim
  1768. hSrio Handle of the SRIO device
  1769. timeout Timeout value to be configured
  1770. @endverbatim
  1771. *
  1772. * <b> Return Value </b>
  1773. * @n None
  1774. *
  1775. * <b> Pre Condition </b>
  1776. * @n CSL_SRIO_Open() must be called
  1777. *
  1778. * <b> Post Condition </b>
  1779. * @n None
  1780. *
  1781. * @b Writes
  1782. * @n SRIO_RIO_SP_LT_CTL_TVAL
  1783. *
  1784. * @b Example
  1785. * @verbatim
  1786. CSL_SrioHandle hSrio;
  1787. Uint32 timeout;
  1788. // Open the CSL SRIO Module 0
  1789. hSrio = CSL_SRIO_Open (0);
  1790. // Set the port link timeout
  1791. CSL_SRIO_SetPortLinkTimeoutCSR (hSrio, 10);
  1792. ...
  1793. @endverbatim
  1794. * =============================================================================
  1795. */
  1796. static inline void CSL_SRIO_SetPortLinkTimeoutCSR
  1797. (
  1798. CSL_SrioHandle hSrio,
  1799. Uint32 timeout
  1800. )
  1801. {
  1802. CSL_FINS (hSrio->RIO_SP_LT_CTL, SRIO_RIO_SP_LT_CTL_TVAL, timeout);
  1803. }
  1804. /** ============================================================================
  1805. * @n@b CSL_SRIO_GetPortResponseTimeoutCSR
  1806. *
  1807. * @b Description
  1808. * @n The functions gets the port response timeout. This timeout is for
  1809. * sending a packet to receiving the corresponding response packet
  1810. *
  1811. * @b Arguments
  1812. @verbatim
  1813. hSrio Handle of the SRIO device
  1814. timeout Timeout value populated by this API
  1815. @endverbatim
  1816. *
  1817. * <b> Return Value </b>
  1818. * @n None
  1819. *
  1820. * <b> Pre Condition </b>
  1821. * @n CSL_SRIO_Open() must be called
  1822. *
  1823. * <b> Post Condition </b>
  1824. * @n None
  1825. *
  1826. * @b Reads
  1827. * @n SRIO_RIO_SP_RT_CTL_TVAL
  1828. *
  1829. * @b Example
  1830. * @verbatim
  1831. CSL_SrioHandle hSrio;
  1832. Uint32 timeout;
  1833. // Open the CSL SRIO Module 0
  1834. hSrio = CSL_SRIO_Open (0);
  1835. // Get the port response timeout
  1836. CSL_SRIO_GetPortResponseTimeoutCSR (hSrio, &timeout);
  1837. ...
  1838. @endverbatim
  1839. * =============================================================================
  1840. */
  1841. static inline void CSL_SRIO_GetPortResponseTimeoutCSR
  1842. (
  1843. CSL_SrioHandle hSrio,
  1844. Uint32* timeout
  1845. )
  1846. {
  1847. *timeout = CSL_FEXT (hSrio->RIO_SP_RT_CTL, SRIO_RIO_SP_RT_CTL_TVAL);
  1848. }
  1849. /** ============================================================================
  1850. * @n@b CSL_SRIO_SetPortResponseTimeoutCSR
  1851. *
  1852. * @b Description
  1853. * @n The functions sets the port response timeout. This timeout is for
  1854. * sending a packet to receiving the corresponding response packet
  1855. *
  1856. * @b Arguments
  1857. @verbatim
  1858. hSrio Handle of the SRIO device
  1859. timeout Timeout value to be configured
  1860. @endverbatim
  1861. *
  1862. * <b> Return Value </b>
  1863. * @n None
  1864. *
  1865. * <b> Pre Condition </b>
  1866. * @n CSL_SRIO_Open() must be called
  1867. *
  1868. * <b> Post Condition </b>
  1869. * @n None
  1870. *
  1871. * @b Writes
  1872. * @n SRIO_RIO_SP_RT_CTL_TVAL
  1873. *
  1874. * @b Example
  1875. * @verbatim
  1876. CSL_SrioHandle hSrio;
  1877. Uint32 timeout;
  1878. // Open the CSL SRIO Module 0
  1879. hSrio = CSL_SRIO_Open (0);
  1880. // Set the port response timeout
  1881. CSL_SRIO_SetPortResponseTimeoutCSR (hSrio, 0xFFFF);
  1882. ...
  1883. @endverbatim
  1884. * =============================================================================
  1885. */
  1886. static inline void CSL_SRIO_SetPortResponseTimeoutCSR
  1887. (
  1888. CSL_SrioHandle hSrio,
  1889. Uint32 timeout
  1890. )
  1891. {
  1892. CSL_FINS (hSrio->RIO_SP_RT_CTL, SRIO_RIO_SP_RT_CTL_TVAL, timeout);
  1893. }
  1894. /** ============================================================================
  1895. * @n@b CSL_SRIO_GetPortGeneralCSR
  1896. *
  1897. * @b Description
  1898. * @n The functions gets the CSR information for all ports.
  1899. *
  1900. * @b Arguments
  1901. @verbatim
  1902. hSrio Handle of the SRIO device
  1903. hostDev Host /Agent or Slave Device populated by this API
  1904. masterEn Master Enable populated by this API
  1905. disc Discovered flag populated by this API
  1906. @endverbatim
  1907. *
  1908. * <b> Return Value </b>
  1909. * @n None
  1910. *
  1911. * <b> Pre Condition </b>
  1912. * @n CSL_SRIO_Open() must be called
  1913. *
  1914. * <b> Post Condition </b>
  1915. * @n None
  1916. *
  1917. * @b Reads
  1918. * @n SRIO_RIO_SP_GEN_CTL_HOST,SRIO_RIO_SP_GEN_CTL_MAST_EN,SRIO_RIO_SP_GEN_CTL_DISC
  1919. *
  1920. * @b Example
  1921. * @verbatim
  1922. CSL_SrioHandle hSrio;
  1923. Uint8 hostDev;
  1924. Uint8 masterEn;
  1925. Uint8 disc;
  1926. // Open the CSL SRIO Module 0
  1927. hSrio = CSL_SRIO_Open (0);
  1928. // Get the port information.
  1929. CSL_SRIO_GetPortGeneralCSR (hSrio, &hostDev, &masterEn, &disc);
  1930. ...
  1931. @endverbatim
  1932. * =============================================================================
  1933. */
  1934. static inline void CSL_SRIO_GetPortGeneralCSR
  1935. (
  1936. CSL_SrioHandle hSrio,
  1937. Uint8* hostDev,
  1938. Uint8* masterEn,
  1939. Uint8* disc
  1940. )
  1941. {
  1942. Uint32 value = hSrio->RIO_SP_GEN_CTL;
  1943. *hostDev = CSL_FEXT (value, SRIO_RIO_SP_GEN_CTL_HOST);
  1944. *masterEn = CSL_FEXT (value, SRIO_RIO_SP_GEN_CTL_MAST_EN);
  1945. *disc = CSL_FEXT (value, SRIO_RIO_SP_GEN_CTL_DISC);
  1946. }
  1947. /** ============================================================================
  1948. * @n@b CSL_SRIO_SetPortGeneralCSR
  1949. *
  1950. * @b Description
  1951. * @n The functions sets the CSR information for all ports.
  1952. *
  1953. * @b Arguments
  1954. @verbatim
  1955. hSrio Handle of the SRIO device
  1956. hostDev Host /Agent or Slave Device to be configured
  1957. masterEn Master Enable to be configured
  1958. disc Discovered flag to be configured
  1959. @endverbatim
  1960. *
  1961. * <b> Return Value </b>
  1962. * @n None
  1963. *
  1964. * <b> Pre Condition </b>
  1965. * @n CSL_SRIO_Open() must be called
  1966. *
  1967. * <b> Post Condition </b>
  1968. * @n None
  1969. *
  1970. * @b Writes
  1971. * @n SRIO_RIO_SP_GEN_CTL_HOST,SRIO_RIO_SP_GEN_CTL_MAST_EN,SRIO_RIO_SP_GEN_CTL_DISC
  1972. *
  1973. * @b Example
  1974. * @verbatim
  1975. CSL_SrioHandle hSrio;
  1976. // Open the CSL SRIO Module 0
  1977. hSrio = CSL_SRIO_Open (0);
  1978. // Set the port information.
  1979. CSL_SRIO_SetPortGeneralCSR (hSrio, 1, 1, 1);
  1980. ...
  1981. @endverbatim
  1982. * =============================================================================
  1983. */
  1984. static inline void CSL_SRIO_SetPortGeneralCSR
  1985. (
  1986. CSL_SrioHandle hSrio,
  1987. Uint8 hostDev,
  1988. Uint8 masterEn,
  1989. Uint8 disc
  1990. )
  1991. {
  1992. hSrio->RIO_SP_GEN_CTL = CSL_FMK(SRIO_RIO_SP_GEN_CTL_HOST, hostDev) |
  1993. CSL_FMK(SRIO_RIO_SP_GEN_CTL_MAST_EN, masterEn) |
  1994. CSL_FMK(SRIO_RIO_SP_GEN_CTL_DISC, disc);
  1995. }
  1996. /** ============================================================================
  1997. * @n@b CSL_SRIO_SendPortLinkMaintRequest
  1998. *
  1999. * @b Description
  2000. * @n The function sends a port link request control symbol on the specified
  2001. * SRIO port.
  2002. *
  2003. * @b Arguments
  2004. @verbatim
  2005. hSrio Handle of the SRIO device
  2006. portNum SRIO Port Number
  2007. cmd Command to be sent in the link-request control symbol.
  2008. The following values hold good:-
  2009. - 0x3 i.e. Reset
  2010. - 0x4 i.e. Input Status
  2011. @endverbatim
  2012. *
  2013. * <b> Return Value </b>
  2014. * @n None
  2015. *
  2016. * <b> Pre Condition </b>
  2017. * @n CSL_SRIO_Open() must be called
  2018. *
  2019. * <b> Post Condition </b>
  2020. * @n None
  2021. *
  2022. * @b Writes
  2023. * @n SRIO_RIO_SP_LM_REQ_CMD
  2024. *
  2025. * @b Example
  2026. * @verbatim
  2027. CSL_SrioHandle hSrio;
  2028. // Open the CSL SRIO Module 0
  2029. hSrio = CSL_SRIO_Open (0);
  2030. // Send a maintainance request on port 1 for reset
  2031. CSL_SRIO_SendPortLinkMaintRequest (hSrio, 1, 3);
  2032. ...
  2033. @endverbatim
  2034. * =============================================================================
  2035. */
  2036. static inline void CSL_SRIO_SendPortLinkMaintRequest
  2037. (
  2038. CSL_SrioHandle hSrio,
  2039. Uint8 portNum,
  2040. Uint8 cmd
  2041. )
  2042. {
  2043. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_LM_REQ, SRIO_RIO_SP_LM_REQ_CMD, cmd);
  2044. }
  2045. /** ============================================================================
  2046. * @n@b CSL_SRIO_IsLinkResponseReceived
  2047. *
  2048. * @b Description
  2049. * @n The function checks if a valid link response has been received to the
  2050. * previously sent link request.
  2051. *
  2052. * @b Arguments
  2053. @verbatim
  2054. hSrio Handle of the SRIO device
  2055. portNum SRIO Port Number
  2056. @endverbatim
  2057. *
  2058. * <b> Return Value </b>
  2059. * @n None
  2060. *
  2061. * <b> Pre Condition </b>
  2062. * @n CSL_SRIO_Open() must be called
  2063. *
  2064. * <b> Post Condition </b>
  2065. * @n None
  2066. *
  2067. * @b Reads
  2068. * @n SRIO_RIO_SP_LM_RESP_RESP_VALID
  2069. *
  2070. * @b Example
  2071. * @verbatim
  2072. CSL_SrioHandle hSrio;
  2073. // Open the CSL SRIO Module 0
  2074. hSrio = CSL_SRIO_Open (0);
  2075. // Is the Link response received or not?
  2076. if (CSL_SRIO_IsLinkResponseReceived (hSrio, 1) == TRUE)
  2077. {
  2078. // Link Response was received.
  2079. }
  2080. else
  2081. {
  2082. // Link Response was NOT received
  2083. }
  2084. ...
  2085. @endverbatim
  2086. * =============================================================================
  2087. */
  2088. static inline Bool CSL_SRIO_IsLinkResponseReceived
  2089. (
  2090. CSL_SrioHandle hSrio,
  2091. Uint8 portNum
  2092. )
  2093. {
  2094. if (CSL_FEXT (hSrio->RIO_SP[portNum].RIO_SP_LM_RESP, SRIO_RIO_SP_LM_RESP_RESP_VALID) == 1)
  2095. return TRUE;
  2096. return FALSE;
  2097. }
  2098. /** ============================================================================
  2099. * @n@b CSL_SRIO_GetLinkResponseStatusInfo
  2100. *
  2101. * @b Description
  2102. * @n The function gets the status information about the link response.
  2103. *
  2104. * @b Arguments
  2105. @verbatim
  2106. hSrio Handle of the SRIO device
  2107. portNum SRIO Port Number
  2108. ackIdStatus AckID status field populated by this API
  2109. linkStatus Link status field populated by this API
  2110. @endverbatim
  2111. *
  2112. * <b> Return Value </b>
  2113. * @n None
  2114. *
  2115. * <b> Pre Condition </b>
  2116. * @n CSL_SRIO_Open() must be called
  2117. *
  2118. * <b> Post Condition </b>
  2119. * @n None
  2120. *
  2121. * @b Reads
  2122. * @n SRIO_RIO_SP_LM_RESP_ACK_ID_STAT,SRIO_RIO_SP_LM_RESP_LINK_STAT
  2123. *
  2124. * @b Example
  2125. * @verbatim
  2126. CSL_SrioHandle hSrio;
  2127. Uint8 ackIdStatus;
  2128. Uint8 linkStatus;
  2129. // Open the CSL SRIO Module 0
  2130. hSrio = CSL_SRIO_Open (0);
  2131. // Is the Link response received or not?
  2132. if (CSL_SRIO_IsLinkResponseReceived (hSrio, 1) == TRUE)
  2133. {
  2134. // Link Response was received.
  2135. CSL_SRIO_GetLinkResponseStatusInfo (hSrio, 1, &ackIdStatus, &linkStatus);
  2136. }
  2137. else
  2138. {
  2139. // Link Response was NOT received.
  2140. }
  2141. ...
  2142. @endverbatim
  2143. * =============================================================================
  2144. */
  2145. static inline void CSL_SRIO_GetLinkResponseStatusInfo
  2146. (
  2147. CSL_SrioHandle hSrio,
  2148. Uint8 portNum,
  2149. Uint8* ackIdStatus,
  2150. Uint8* linkStatus
  2151. )
  2152. {
  2153. Uint32 value = hSrio->RIO_SP[portNum].RIO_SP_LM_RESP;
  2154. *ackIdStatus = CSL_FEXT (value, SRIO_RIO_SP_LM_RESP_ACK_ID_STAT);
  2155. *linkStatus = CSL_FEXT (value, SRIO_RIO_SP_LM_RESP_LINK_STAT);
  2156. }
  2157. /** ============================================================================
  2158. * @n@b CSL_SRIO_ClearOutstandingACK
  2159. *
  2160. * @b Description
  2161. * @n The function is used to clear the outstanding acknowledgment ids and is
  2162. * used for software assisted ackID realignment.
  2163. *
  2164. * @b Arguments
  2165. @verbatim
  2166. hSrio Handle of the SRIO device
  2167. portNum SRIO Port Number
  2168. @endverbatim
  2169. *
  2170. * <b> Return Value </b>
  2171. * @n None
  2172. *
  2173. * <b> Pre Condition </b>
  2174. * @n CSL_SRIO_Open() must be called
  2175. *
  2176. * <b> Post Condition </b>
  2177. * @n None
  2178. *
  2179. * @b Writes
  2180. * @n SRIO_RIO_SP_ACKID_STAT_CLR_OUTSTD_ACKID=1
  2181. *
  2182. * @b Affects
  2183. * @n SRIO_RIO_SP_ACKID_STAT_OUTSTD_ACKID=0
  2184. *
  2185. * @b Example
  2186. * @verbatim
  2187. CSL_SrioHandle hSrio;
  2188. // Open the CSL SRIO Module 0
  2189. hSrio = CSL_SRIO_Open (0);
  2190. // Clear outstanding ackID for SRIO Port 1
  2191. CSL_SRIO_ClearOutstandingACK (hSrio, 1);
  2192. ...
  2193. @endverbatim
  2194. * =============================================================================
  2195. */
  2196. static inline void CSL_SRIO_ClearOutstandingACK
  2197. (
  2198. CSL_SrioHandle hSrio,
  2199. Uint8 portNum
  2200. )
  2201. {
  2202. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_ACKID_STAT, SRIO_RIO_SP_ACKID_STAT_CLR_OUTSTD_ACKID, (Uint32)1);
  2203. }
  2204. /** ============================================================================
  2205. * @n@b CSL_SRIO_GetACKStatus
  2206. *
  2207. * @b Description
  2208. * @n The function is used to get the ACK status.
  2209. *
  2210. * @b Arguments
  2211. @verbatim
  2212. hSrio Handle of the SRIO device
  2213. portNum SRIO Port Number
  2214. inputAckID Input port next expected ACK ID
  2215. outputUnAckID Output port unacknowledged ackID status
  2216. outputAckID Output port next transmitted Acknowledge ID value
  2217. @endverbatim
  2218. *
  2219. * <b> Return Value </b>
  2220. * @n None
  2221. *
  2222. * <b> Pre Condition </b>
  2223. * @n CSL_SRIO_Open() must be called
  2224. *
  2225. * <b> Post Condition </b>
  2226. * @n None
  2227. *
  2228. * @b Reads
  2229. * @n SRIO_RIO_SP_ACKID_STAT_INB_ACKID,SRIO_RIO_SP_ACKID_STAT_OUTSTD_ACKID,SRIO_RIO_SP_ACKID_STAT_OUTB_ACKID
  2230. *
  2231. * @b Example
  2232. * @verbatim
  2233. CSL_SrioHandle hSrio;
  2234. Uint8 inputAckID;
  2235. Uint8 outputUnAckID;
  2236. Uint8 outputAckID;
  2237. // Open the CSL SRIO Module 0
  2238. hSrio = CSL_SRIO_Open (0);
  2239. // Get the ACK Status for Port 1
  2240. CSL_SRIO_GetACKStatus (hSrio, 1, &inputAckID, &outputUnAckID, &outputAckID);
  2241. ...
  2242. @endverbatim
  2243. * =============================================================================
  2244. */
  2245. static inline void CSL_SRIO_GetACKStatus
  2246. (
  2247. CSL_SrioHandle hSrio,
  2248. Uint8 portNum,
  2249. Uint8* inputAckID,
  2250. Uint8* outputUnAckID,
  2251. Uint8* outputAckID
  2252. )
  2253. {
  2254. Uint32 value = hSrio->RIO_SP[portNum].RIO_SP_ACKID_STAT;
  2255. *inputAckID = CSL_FEXT (value, SRIO_RIO_SP_ACKID_STAT_INB_ACKID);
  2256. *outputUnAckID = CSL_FEXT (value, SRIO_RIO_SP_ACKID_STAT_OUTSTD_ACKID);
  2257. *outputAckID = CSL_FEXT (value, SRIO_RIO_SP_ACKID_STAT_OUTB_ACKID);
  2258. }
  2259. /** ============================================================================
  2260. * @n@b CSL_SRIO_SetACKStatus
  2261. *
  2262. * @b Description
  2263. * @n The function is used to set the ACK status.
  2264. *
  2265. * @b Arguments
  2266. @verbatim
  2267. hSrio Handle of the SRIO device
  2268. portNum SRIO Port Number
  2269. inputAckID Input port next expected ACK ID
  2270. outputUnAckID Output port unacknowledged ackID status
  2271. outputAckID Output port next transmitted Acknowledge ID value
  2272. @endverbatim
  2273. *
  2274. * <b> Return Value </b>
  2275. * @n None
  2276. *
  2277. * <b> Pre Condition </b>
  2278. * @n CSL_SRIO_Open() must be called
  2279. *
  2280. * <b> Post Condition </b>
  2281. * @n None
  2282. *
  2283. * @b Writes
  2284. * @n SRIO_RIO_SP_ACKID_STAT_INB_ACKID, SRIO_RIO_SP_ACKID_STAT_OUTB_ACKID
  2285. *
  2286. * @b Example
  2287. * @verbatim
  2288. CSL_SrioHandle hSrio;
  2289. // Open the CSL SRIO Module 0
  2290. hSrio = CSL_SRIO_Open (0);
  2291. // Set the ACK Status for Port 1
  2292. CSL_SRIO_SetACKStatus (hSrio, 1, 100, 205);
  2293. ...
  2294. @endverbatim
  2295. * =============================================================================
  2296. */
  2297. static inline void CSL_SRIO_SetACKStatus
  2298. (
  2299. CSL_SrioHandle hSrio,
  2300. Uint8 portNum,
  2301. Uint8 inputAckID,
  2302. Uint8 outputAckID
  2303. )
  2304. {
  2305. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_ACKID_STAT, SRIO_RIO_SP_ACKID_STAT_INB_ACKID, inputAckID);
  2306. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_ACKID_STAT, SRIO_RIO_SP_ACKID_STAT_OUTB_ACKID, outputAckID);
  2307. }
  2308. /** ============================================================================
  2309. * @n@b CSL_SRIO_GetPortBaudRate
  2310. *
  2311. * @b Description
  2312. * @n The function is used to get the initialized baud rate of the port
  2313. *
  2314. * @b Arguments
  2315. @verbatim
  2316. hSrio Handle of the SRIO device
  2317. portNum SRIO Port Number
  2318. baudSel Baud Rate Selection populated by this API
  2319. @endverbatim
  2320. *
  2321. * <b> Return Value </b>
  2322. * @n None
  2323. *
  2324. * <b> Pre Condition </b>
  2325. * @n CSL_SRIO_Open() must be called
  2326. *
  2327. * <b> Post Condition </b>
  2328. * @n None
  2329. *
  2330. * @b Reads
  2331. * @n SRIO_RIO_SP_CTL2_BAUD_SEL
  2332. *
  2333. * @b Example
  2334. * @verbatim
  2335. CSL_SrioHandle hSrio;
  2336. Uint8 baudSel;
  2337. // Open the CSL SRIO Module 0
  2338. hSrio = CSL_SRIO_Open (0);
  2339. // Get the Port 1 Baud Rate
  2340. CSL_SRIO_GetPortBaudRate (hSrio, 1, &baudSel);
  2341. ...
  2342. @endverbatim
  2343. * =============================================================================
  2344. */
  2345. static inline void CSL_SRIO_GetPortBaudRate
  2346. (
  2347. CSL_SrioHandle hSrio,
  2348. Uint8 portNum,
  2349. Uint8* baudSel
  2350. )
  2351. {
  2352. *baudSel = CSL_FEXT (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_BAUD_SEL);
  2353. }
  2354. /** ============================================================================
  2355. * @n@b CSL_SRIO_IsAutomaticBaudRateDiscoverySupported
  2356. *
  2357. * @b Description
  2358. * @n The function is used to check if automatic baud rate discovery is
  2359. * supported or not?
  2360. *
  2361. * @b Arguments
  2362. @verbatim
  2363. hSrio Handle of the SRIO device
  2364. portNum SRIO Port Number
  2365. @endverbatim
  2366. *
  2367. * <b> Return Value </b>
  2368. * @n None
  2369. *
  2370. * <b> Pre Condition </b>
  2371. * @n CSL_SRIO_Open() must be called
  2372. *
  2373. * <b> Post Condition </b>
  2374. * @n None
  2375. *
  2376. * @b Reads
  2377. * @n SRIO_RIO_SP_CTL2_BAUD_DISC
  2378. *
  2379. * @b Example
  2380. * @verbatim
  2381. CSL_SrioHandle hSrio;
  2382. // Open the CSL SRIO Module 0
  2383. hSrio = CSL_SRIO_Open (0);
  2384. // Is Port1 Automatic Baud Rate Discovery supported
  2385. if (CSL_SRIO_IsAutomaticBaudRateDiscoverySupported (hSrio, 1) == TRUE)
  2386. {
  2387. // Port1 Automatic Baud Rate Discovery supported
  2388. }
  2389. else
  2390. {
  2391. // Port1 Automatic Baud Rate Discovery NOT supported
  2392. }
  2393. ...
  2394. @endverbatim
  2395. * =============================================================================
  2396. */
  2397. static inline Bool CSL_SRIO_IsAutomaticBaudRateDiscoverySupported
  2398. (
  2399. CSL_SrioHandle hSrio,
  2400. Uint8 portNum
  2401. )
  2402. {
  2403. if (CSL_FEXT (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_BAUD_DISC) == 1)
  2404. return TRUE;
  2405. return FALSE;
  2406. }
  2407. /** ============================================================================
  2408. * @n@b CSL_SRIO_Is1_25GBaudSupported
  2409. *
  2410. * @b Description
  2411. * @n The function is used to check if 1.25 GBaud is supported or not?
  2412. *
  2413. * @b Arguments
  2414. @verbatim
  2415. hSrio Handle of the SRIO device
  2416. portNum SRIO Port Number
  2417. @endverbatim
  2418. *
  2419. * <b> Return Value </b>
  2420. * @n TRUE - 1.25GBaud is supported
  2421. * @n FALSE - 1.25GBaud is not supported
  2422. *
  2423. * <b> Pre Condition </b>
  2424. * @n CSL_SRIO_Open() must be called
  2425. *
  2426. * <b> Post Condition </b>
  2427. * @n None
  2428. *
  2429. * @b Reads
  2430. * @n SRIO_RIO_SP_CTL2_GB_1P25
  2431. *
  2432. * @b Example
  2433. * @verbatim
  2434. CSL_SrioHandle hSrio;
  2435. // Open the CSL SRIO Module 0
  2436. hSrio = CSL_SRIO_Open (0);
  2437. // Check if 1.25Gbaud is supported or not?
  2438. if (CSL_SRIO_Is1_25GBaudSupported (hSrio, 1) == TRUE)
  2439. {
  2440. // 1.25Gbaud is supported
  2441. }
  2442. else
  2443. {
  2444. // 1.25Gbaud is not supported
  2445. }
  2446. ...
  2447. @endverbatim
  2448. * =============================================================================
  2449. */
  2450. static inline Bool CSL_SRIO_Is1_25GBaudSupported
  2451. (
  2452. CSL_SrioHandle hSrio,
  2453. Uint8 portNum
  2454. )
  2455. {
  2456. if (CSL_FEXT (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_1P25) == 1)
  2457. return TRUE;
  2458. return FALSE;
  2459. }
  2460. /** ============================================================================
  2461. * @n@b CSL_SRIO_Enable1_25GBaud
  2462. *
  2463. * @b Description
  2464. * @n The function is used to enable 1.25GBaud for the specified port
  2465. *
  2466. * @b Arguments
  2467. @verbatim
  2468. hSrio Handle of the SRIO device
  2469. portNum SRIO Port Number
  2470. @endverbatim
  2471. *
  2472. * <b> Return Value </b>
  2473. * @n None
  2474. *
  2475. * <b> Pre Condition </b>
  2476. * @n CSL_SRIO_Open() must be called
  2477. *
  2478. * <b> Post Condition </b>
  2479. * @n None
  2480. *
  2481. * @b Writes
  2482. * @n SRIO_RIO_SP_CTL2_GB_1P25_EN=1
  2483. *
  2484. * @b Example
  2485. * @verbatim
  2486. CSL_SrioHandle hSrio;
  2487. // Open the CSL SRIO Module 0
  2488. hSrio = CSL_SRIO_Open (0);
  2489. // Enable Port1 1.25G Baud
  2490. CSL_SRIO_Enable1_25GBaud (hSrio, 1);
  2491. ...
  2492. @endverbatim
  2493. * =============================================================================
  2494. */
  2495. static inline void CSL_SRIO_Enable1_25GBaud
  2496. (
  2497. CSL_SrioHandle hSrio,
  2498. Uint8 portNum
  2499. )
  2500. {
  2501. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_1P25_EN, 1);
  2502. }
  2503. /** ============================================================================
  2504. * @n@b CSL_SRIO_Disable1_25GBaud
  2505. *
  2506. * @b Description
  2507. * @n The function is used to enable 1.25GBaud for the specified port
  2508. *
  2509. * @b Arguments
  2510. @verbatim
  2511. hSrio Handle of the SRIO device
  2512. portNum SRIO Port Number
  2513. @endverbatim
  2514. *
  2515. * <b> Return Value </b>
  2516. * @n None
  2517. *
  2518. * <b> Pre Condition </b>
  2519. * @n CSL_SRIO_Open() must be called
  2520. *
  2521. * <b> Post Condition </b>
  2522. * @n None
  2523. *
  2524. * @b Writes
  2525. * @n SRIO_RIO_SP_CTL2_GB_1P25_EN=0
  2526. *
  2527. * @b Example
  2528. * @verbatim
  2529. CSL_SrioHandle hSrio;
  2530. // Open the CSL SRIO Module 0
  2531. hSrio = CSL_SRIO_Open (0);
  2532. // Disable Port1 1.25G Baud
  2533. CSL_SRIO_Disable1_25GBaud (hSrio, 1);
  2534. ...
  2535. @endverbatim
  2536. * =============================================================================
  2537. */
  2538. static inline void CSL_SRIO_Disable1_25GBaud
  2539. (
  2540. CSL_SrioHandle hSrio,
  2541. Uint8 portNum
  2542. )
  2543. {
  2544. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_1P25_EN, 0);
  2545. }
  2546. /** ============================================================================
  2547. * @n@b CSL_SRIO_Is2_5GBaudSupported
  2548. *
  2549. * @b Description
  2550. * @n The function is used to check if 2.5GBaud is supported or not?
  2551. *
  2552. * @b Arguments
  2553. @verbatim
  2554. hSrio Handle of the SRIO device
  2555. portNum SRIO Port Number
  2556. @endverbatim
  2557. *
  2558. * <b> Return Value </b>
  2559. * @n TRUE - 2.5GBaud is supported
  2560. * @n FALSE - 2.5GBaud is not supported
  2561. *
  2562. * <b> Pre Condition </b>
  2563. * @n CSL_SRIO_Open() must be called
  2564. *
  2565. * <b> Post Condition </b>
  2566. * @n None
  2567. *
  2568. * @b Reads
  2569. * @n SRIO_RIO_SP_CTL2_GB_2P5
  2570. *
  2571. * @b Example
  2572. * @verbatim
  2573. CSL_SrioHandle hSrio;
  2574. // Open the CSL SRIO Module 0
  2575. hSrio = CSL_SRIO_Open (0);
  2576. // Check if 2.5Gbaud is supported or not?
  2577. if (CSL_SRIO_Is2_5GBaudSupported (hSrio, 1) == TRUE)
  2578. {
  2579. // 2.5Gbaud is supported
  2580. }
  2581. else
  2582. {
  2583. // 2.5Gbaud is not supported
  2584. }
  2585. ...
  2586. @endverbatim
  2587. * =============================================================================
  2588. */
  2589. static inline Bool CSL_SRIO_Is2_5GBaudSupported
  2590. (
  2591. CSL_SrioHandle hSrio,
  2592. Uint8 portNum
  2593. )
  2594. {
  2595. if (CSL_FEXT (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_2P5) == 1)
  2596. return TRUE;
  2597. return FALSE;
  2598. }
  2599. /** ============================================================================
  2600. * @n@b CSL_SRIO_Enable2_5GBaud
  2601. *
  2602. * @b Description
  2603. * @n The function is used to enable 2.5GBaud for the specified port
  2604. *
  2605. * @b Arguments
  2606. @verbatim
  2607. hSrio Handle of the SRIO device
  2608. portNum SRIO Port Number
  2609. @endverbatim
  2610. *
  2611. * <b> Return Value </b>
  2612. * @n None
  2613. *
  2614. * <b> Pre Condition </b>
  2615. * @n CSL_SRIO_Open() must be called
  2616. *
  2617. * <b> Post Condition </b>
  2618. * @n None
  2619. *
  2620. * @b Writes
  2621. * @n SRIO_RIO_SP_CTL2_GB_2P5_EN=1
  2622. *
  2623. * @b Example
  2624. * @verbatim
  2625. CSL_SrioHandle hSrio;
  2626. // Open the CSL SRIO Module 0
  2627. hSrio = CSL_SRIO_Open (0);
  2628. // Enable Port1 2.5GBaud
  2629. CSL_SRIO_Enable2_5GBaud (hSrio, 1);
  2630. ...
  2631. @endverbatim
  2632. * =============================================================================
  2633. */
  2634. static inline void CSL_SRIO_Enable2_5GBaud
  2635. (
  2636. CSL_SrioHandle hSrio,
  2637. Uint8 portNum
  2638. )
  2639. {
  2640. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_2P5_EN, 1);
  2641. }
  2642. /** ============================================================================
  2643. * @n@b CSL_SRIO_Disable2_5GBaud
  2644. *
  2645. * @b Description
  2646. * @n The function is used to disable 2.5GBaud for the specified port
  2647. *
  2648. * @b Arguments
  2649. @verbatim
  2650. hSrio Handle of the SRIO device
  2651. portNum SRIO Port Number
  2652. @endverbatim
  2653. *
  2654. * <b> Return Value </b>
  2655. * @n None
  2656. *
  2657. * <b> Pre Condition </b>
  2658. * @n CSL_SRIO_Open() must be called
  2659. *
  2660. * <b> Post Condition </b>
  2661. * @n None
  2662. *
  2663. * @b Writes
  2664. * @n SRIO_RIO_SP_CTL2_GB_2P5_EN=0
  2665. *
  2666. * @b Example
  2667. * @verbatim
  2668. CSL_SrioHandle hSrio;
  2669. // Open the CSL SRIO Module 0
  2670. hSrio = CSL_SRIO_Open (0);
  2671. // Disable Port1 2.5GBaud
  2672. CSL_SRIO_Disable2_5GBaud (hSrio, 1);
  2673. ...
  2674. @endverbatim
  2675. * =============================================================================
  2676. */
  2677. static inline void CSL_SRIO_Disable2_5GBaud
  2678. (
  2679. CSL_SrioHandle hSrio,
  2680. Uint8 portNum
  2681. )
  2682. {
  2683. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_2P5_EN, 0);
  2684. }
  2685. /** ============================================================================
  2686. * @n@b CSL_SRIO_Is3_125GBaudSupported
  2687. *
  2688. * @b Description
  2689. * @n The function is used to check if 3.125GBaud is supported or not?
  2690. *
  2691. * @b Arguments
  2692. @verbatim
  2693. hSrio Handle of the SRIO device
  2694. portNum SRIO Port Number
  2695. @endverbatim
  2696. *
  2697. * <b> Return Value </b>
  2698. * @n TRUE - 3.125GBaud is supported
  2699. * @n FALSE - 3.125GBaud is not supported
  2700. *
  2701. * <b> Pre Condition </b>
  2702. * @n CSL_SRIO_Open() must be called
  2703. *
  2704. * <b> Post Condition </b>
  2705. * @n None
  2706. *
  2707. * @b Reads
  2708. * @n SRIO_RIO_SP_CTL2_GB_3P125
  2709. *
  2710. * @b Example
  2711. * @verbatim
  2712. CSL_SrioHandle hSrio;
  2713. // Open the CSL SRIO Module 0
  2714. hSrio = CSL_SRIO_Open (0);
  2715. // Check if 3.125Gbaud is supported or not?
  2716. if (CSL_SRIO_Is3_125GBaudSupported (hSrio, 1) == TRUE)
  2717. {
  2718. // 3.125Gbaud is supported
  2719. }
  2720. else
  2721. {
  2722. // 3.125Gbaud is not supported
  2723. }
  2724. ...
  2725. @endverbatim
  2726. * =============================================================================
  2727. */
  2728. static inline Bool CSL_SRIO_Is3_125GBaudSupported
  2729. (
  2730. CSL_SrioHandle hSrio,
  2731. Uint8 portNum
  2732. )
  2733. {
  2734. if (CSL_FEXT (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_3P125) == 1)
  2735. return TRUE;
  2736. return FALSE;
  2737. }
  2738. /** ============================================================================
  2739. * @n@b CSL_SRIO_Enable3_125GBaud
  2740. *
  2741. * @b Description
  2742. * @n The function is used to enable 3.125GBaud for the specified port
  2743. *
  2744. * @b Arguments
  2745. @verbatim
  2746. hSrio Handle of the SRIO device
  2747. portNum SRIO Port Number
  2748. @endverbatim
  2749. *
  2750. * <b> Return Value </b>
  2751. * @n None
  2752. *
  2753. * <b> Pre Condition </b>
  2754. * @n CSL_SRIO_Open() must be called
  2755. *
  2756. * <b> Post Condition </b>
  2757. * @n None
  2758. *
  2759. * @b Writes
  2760. * @n SRIO_RIO_SP_CTL2_GB_3P125_EN=1
  2761. *
  2762. * @b Example
  2763. * @verbatim
  2764. CSL_SrioHandle hSrio;
  2765. // Open the CSL SRIO Module 0
  2766. hSrio = CSL_SRIO_Open (0);
  2767. // Enable Port1 3.125GBaud
  2768. CSL_SRIO_Enable3_125GBaud (hSrio, 1);
  2769. ...
  2770. @endverbatim
  2771. * =============================================================================
  2772. */
  2773. static inline void CSL_SRIO_Enable3_125GBaud
  2774. (
  2775. CSL_SrioHandle hSrio,
  2776. Uint8 portNum
  2777. )
  2778. {
  2779. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_3P125_EN, 1);
  2780. }
  2781. /** ============================================================================
  2782. * @n@b CSL_SRIO_Disable3_125GBaud
  2783. *
  2784. * @b Description
  2785. * @n The function is used to disable 3.125GBaud for the specified port
  2786. *
  2787. * @b Arguments
  2788. @verbatim
  2789. hSrio Handle of the SRIO device
  2790. portNum SRIO Port Number
  2791. @endverbatim
  2792. *
  2793. * <b> Return Value </b>
  2794. * @n None
  2795. *
  2796. * <b> Pre Condition </b>
  2797. * @n CSL_SRIO_Open() must be called
  2798. *
  2799. * <b> Post Condition </b>
  2800. * @n None
  2801. *
  2802. * @b Writes
  2803. * @n SRIO_RIO_SP_CTL2_GB_3P125_EN=0
  2804. *
  2805. * @b Example
  2806. * @verbatim
  2807. CSL_SrioHandle hSrio;
  2808. // Open the CSL SRIO Module 0
  2809. hSrio = CSL_SRIO_Open (0);
  2810. // Disable Port1 3.125GBaud
  2811. CSL_SRIO_Disable3_125GBaud (hSrio, 1);
  2812. ...
  2813. @endverbatim
  2814. * =============================================================================
  2815. */
  2816. static inline void CSL_SRIO_Disable3_125GBaud
  2817. (
  2818. CSL_SrioHandle hSrio,
  2819. Uint8 portNum
  2820. )
  2821. {
  2822. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_3P125_EN, 0);
  2823. }
  2824. /** ============================================================================
  2825. * @n@b CSL_SRIO_Is5GBaudSupported
  2826. *
  2827. * @b Description
  2828. * @n The function is used to check if 5GBaud is supported or not?
  2829. *
  2830. * @b Arguments
  2831. @verbatim
  2832. hSrio Handle of the SRIO device
  2833. portNum SRIO Port Number
  2834. @endverbatim
  2835. *
  2836. * <b> Return Value </b>
  2837. * @n TRUE - 5GBaud is supported
  2838. * @n FALSE - 5GBaud is not supported
  2839. *
  2840. * <b> Pre Condition </b>
  2841. * @n CSL_SRIO_Open() must be called
  2842. *
  2843. * <b> Post Condition </b>
  2844. * @n None
  2845. *
  2846. * @b Reads
  2847. * @n SRIO_RIO_SP_CTL2_GB_5P0
  2848. *
  2849. * @b Example
  2850. * @verbatim
  2851. CSL_SrioHandle hSrio;
  2852. // Open the CSL SRIO Module 0
  2853. hSrio = CSL_SRIO_Open (0);
  2854. // Check if 5Gbaud is supported or not?
  2855. if (CSL_SRIO_Is5GBaudSupported (hSrio, 1) == TRUE)
  2856. {
  2857. // 5Gbaud is supported
  2858. }
  2859. else
  2860. {
  2861. // 5Gbaud is not supported
  2862. }
  2863. ...
  2864. @endverbatim
  2865. * =============================================================================
  2866. */
  2867. static inline Bool CSL_SRIO_Is5GBaudSupported
  2868. (
  2869. CSL_SrioHandle hSrio,
  2870. Uint8 portNum
  2871. )
  2872. {
  2873. if (CSL_FEXT (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_5P0) == 1)
  2874. return TRUE;
  2875. return FALSE;
  2876. }
  2877. /** ============================================================================
  2878. * @n@b CSL_SRIO_Enable5GBaud
  2879. *
  2880. * @b Description
  2881. * @n The function is used to enable 5GBaud for the specified port
  2882. *
  2883. * @b Arguments
  2884. @verbatim
  2885. hSrio Handle of the SRIO device
  2886. portNum SRIO Port Number
  2887. @endverbatim
  2888. *
  2889. * <b> Return Value </b>
  2890. * @n None
  2891. *
  2892. * <b> Pre Condition </b>
  2893. * @n CSL_SRIO_Open() must be called
  2894. *
  2895. * <b> Post Condition </b>
  2896. * @n None
  2897. *
  2898. * @b Writes
  2899. * @n SRIO_RIO_SP_CTL2_GB_5P0_EN=1
  2900. *
  2901. * @b Example
  2902. * @verbatim
  2903. CSL_SrioHandle hSrio;
  2904. // Open the CSL SRIO Module 0
  2905. hSrio = CSL_SRIO_Open (0);
  2906. // Enable Port1 5GBaud
  2907. CSL_SRIO_Enable5GBaud (hSrio, 1);
  2908. ...
  2909. @endverbatim
  2910. * =============================================================================
  2911. */
  2912. static inline void CSL_SRIO_Enable5GBaud
  2913. (
  2914. CSL_SrioHandle hSrio,
  2915. Uint8 portNum
  2916. )
  2917. {
  2918. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_5P0_EN, 1);
  2919. }
  2920. /** ============================================================================
  2921. * @n@b CSL_SRIO_Disable5GBaud
  2922. *
  2923. * @b Description
  2924. * @n The function is used to disable 5GBaud for the specified port
  2925. *
  2926. * @b Arguments
  2927. @verbatim
  2928. hSrio Handle of the SRIO device
  2929. portNum SRIO Port Number
  2930. @endverbatim
  2931. *
  2932. * <b> Return Value </b>
  2933. * @n None
  2934. *
  2935. * <b> Pre Condition </b>
  2936. * @n CSL_SRIO_Open() must be called
  2937. *
  2938. * <b> Post Condition </b>
  2939. * @n None
  2940. *
  2941. * @b Writes
  2942. * @n SRIO_RIO_SP_CTL2_GB_5P0_EN=0
  2943. *
  2944. * @b Example
  2945. * @verbatim
  2946. CSL_SrioHandle hSrio;
  2947. // Open the CSL SRIO Module 0
  2948. hSrio = CSL_SRIO_Open (0);
  2949. // Disable Port1 5GBaud
  2950. CSL_SRIO_Disable5GBaud (hSrio, 1);
  2951. ...
  2952. @endverbatim
  2953. * =============================================================================
  2954. */
  2955. static inline void CSL_SRIO_Disable5GBaud
  2956. (
  2957. CSL_SrioHandle hSrio,
  2958. Uint8 portNum
  2959. )
  2960. {
  2961. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_5P0_EN, 0);
  2962. }
  2963. /** ============================================================================
  2964. * @n@b CSL_SRIO_Is6_25GBaudSupported
  2965. *
  2966. * @b Description
  2967. * @n The function is used to check if 6_25GBaud is supported or not?
  2968. *
  2969. * @b Arguments
  2970. @verbatim
  2971. hSrio Handle of the SRIO device
  2972. portNum SRIO Port Number
  2973. @endverbatim
  2974. *
  2975. * <b> Return Value </b>
  2976. * @n TRUE - 6_25GBaud is supported
  2977. * @n FALSE - 6_25GBaud is not supported
  2978. *
  2979. * <b> Pre Condition </b>
  2980. * @n CSL_SRIO_Open() must be called
  2981. *
  2982. * <b> Post Condition </b>
  2983. * @n None
  2984. *
  2985. * @b Reads
  2986. * @n SRIO_RIO_SP_CTL2_GB_6P25
  2987. *
  2988. * @b Example
  2989. * @verbatim
  2990. CSL_SrioHandle hSrio;
  2991. // Open the CSL SRIO Module 0
  2992. hSrio = CSL_SRIO_Open (0);
  2993. // Check if 6_25Gbaud is supported or not?
  2994. if (CSL_SRIO_Is6_25GBaudSupported (hSrio, 1) == TRUE)
  2995. {
  2996. // 6_25Gbaud is supported
  2997. }
  2998. else
  2999. {
  3000. // 6_25Gbaud is not supported
  3001. }
  3002. ...
  3003. @endverbatim
  3004. * =============================================================================
  3005. */
  3006. static inline Bool CSL_SRIO_Is6_25GBaudSupported
  3007. (
  3008. CSL_SrioHandle hSrio,
  3009. Uint8 portNum
  3010. )
  3011. {
  3012. if (CSL_FEXT (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_6P25) == 1)
  3013. return TRUE;
  3014. return FALSE;
  3015. }
  3016. /** ============================================================================
  3017. * @n@b CSL_SRIO_Enable6_25GBaud
  3018. *
  3019. * @b Description
  3020. * @n The function is used to enable 6.25GBaud for the specified port
  3021. *
  3022. * @b Arguments
  3023. @verbatim
  3024. hSrio Handle of the SRIO device
  3025. portNum SRIO Port Number
  3026. @endverbatim
  3027. *
  3028. * <b> Return Value </b>
  3029. * @n None
  3030. *
  3031. * <b> Pre Condition </b>
  3032. * @n CSL_SRIO_Open() must be called
  3033. *
  3034. * <b> Post Condition </b>
  3035. * @n None
  3036. *
  3037. * @b Writes
  3038. * @n SRIO_RIO_SP_CTL2_GB_6P25_EN=1
  3039. *
  3040. * @b Example
  3041. * @verbatim
  3042. CSL_SrioHandle hSrio;
  3043. // Open the CSL SRIO Module 0
  3044. hSrio = CSL_SRIO_Open (0);
  3045. // Enable Port1 6.25GBaud
  3046. CSL_SRIO_Enable6_25GBaud (hSrio, 1);
  3047. ...
  3048. @endverbatim
  3049. * =============================================================================
  3050. */
  3051. static inline void CSL_SRIO_Enable6_25GBaud
  3052. (
  3053. CSL_SrioHandle hSrio,
  3054. Uint8 portNum
  3055. )
  3056. {
  3057. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_6P25_EN, 1);
  3058. }
  3059. /** ============================================================================
  3060. * @n@b CSL_SRIO_Disable6_25GBaud
  3061. *
  3062. * @b Description
  3063. * @n The function is used to disable 6.25GBaud for the specified port
  3064. *
  3065. * @b Arguments
  3066. @verbatim
  3067. hSrio Handle of the SRIO device
  3068. portNum SRIO Port Number
  3069. @endverbatim
  3070. *
  3071. * <b> Return Value </b>
  3072. * @n None
  3073. *
  3074. * <b> Pre Condition </b>
  3075. * @n CSL_SRIO_Open() must be called
  3076. *
  3077. * <b> Post Condition </b>
  3078. * @n None
  3079. *
  3080. * @b Writes
  3081. * @n SRIO_RIO_SP_CTL2_GB_6P25_EN=0
  3082. *
  3083. * @b Example
  3084. * @verbatim
  3085. CSL_SrioHandle hSrio;
  3086. // Open the CSL SRIO Module 0
  3087. hSrio = CSL_SRIO_Open (0);
  3088. // Disable Port1 6.25GBaud
  3089. CSL_SRIO_Disable6_25GBaud (hSrio, 1);
  3090. ...
  3091. @endverbatim
  3092. * =============================================================================
  3093. */
  3094. static inline void CSL_SRIO_Disable6_25GBaud
  3095. (
  3096. CSL_SrioHandle hSrio,
  3097. Uint8 portNum
  3098. )
  3099. {
  3100. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_GB_6P25_EN, 0);
  3101. }
  3102. /** ============================================================================
  3103. * @n@b CSL_SRIO_EnableDataScrambling
  3104. *
  3105. * @b Description
  3106. * @n The function is used to enable data scrambling for the specific port
  3107. *
  3108. * @b Arguments
  3109. @verbatim
  3110. hSrio Handle of the SRIO device
  3111. portNum SRIO Port Number
  3112. @endverbatim
  3113. *
  3114. * <b> Return Value </b>
  3115. * @n None
  3116. *
  3117. * <b> Pre Condition </b>
  3118. * @n CSL_SRIO_Open() must be called
  3119. *
  3120. * <b> Post Condition </b>
  3121. * @n None
  3122. *
  3123. * @b Writes
  3124. * @n SRIO_RIO_SP_CTL2_D_SCRM_DIS=1
  3125. *
  3126. * @b Example
  3127. * @verbatim
  3128. CSL_SrioHandle hSrio;
  3129. // Open the CSL SRIO Module 0
  3130. hSrio = CSL_SRIO_Open (0);
  3131. // Enable Port1 Data Scrambling
  3132. CSL_SRIO_EnableDataScrambling (hSrio, 1);
  3133. ...
  3134. @endverbatim
  3135. * =============================================================================
  3136. */
  3137. static inline void CSL_SRIO_EnableDataScrambling
  3138. (
  3139. CSL_SrioHandle hSrio,
  3140. Uint8 portNum
  3141. )
  3142. {
  3143. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_D_SCRM_DIS, 1);
  3144. }
  3145. /** ============================================================================
  3146. * @n@b CSL_SRIO_DisableDataScrambling
  3147. *
  3148. * @b Description
  3149. * @n The function is used to disable data scrambling for the specific port
  3150. *
  3151. * @b Arguments
  3152. @verbatim
  3153. hSrio Handle of the SRIO device
  3154. portNum SRIO Port Number
  3155. @endverbatim
  3156. *
  3157. * <b> Return Value </b>
  3158. * @n None
  3159. *
  3160. * <b> Pre Condition </b>
  3161. * @n CSL_SRIO_Open() must be called
  3162. *
  3163. * <b> Post Condition </b>
  3164. * @n None
  3165. *
  3166. * @b Writes
  3167. * @n SRIO_RIO_SP_CTL2_D_SCRM_DIS=0
  3168. *
  3169. * @b Example
  3170. * @verbatim
  3171. CSL_SrioHandle hSrio;
  3172. // Open the CSL SRIO Module 0
  3173. hSrio = CSL_SRIO_Open (0);
  3174. // Disable Port1 Data Scrambling
  3175. CSL_SRIO_DisableDataScrambling (hSrio, 1);
  3176. ...
  3177. @endverbatim
  3178. * =============================================================================
  3179. */
  3180. static inline void CSL_SRIO_DisableDataScrambling
  3181. (
  3182. CSL_SrioHandle hSrio,
  3183. Uint8 portNum
  3184. )
  3185. {
  3186. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_D_SCRM_DIS, 0);
  3187. }
  3188. /** ============================================================================
  3189. * @n@b CSL_SRIO_IsRemoteTxEmphasisEnabled
  3190. *
  3191. * @b Description
  3192. * @n The function is used to check if the remote transmit emphasis is enabled
  3193. * or not?
  3194. *
  3195. * @b Arguments
  3196. @verbatim
  3197. hSrio Handle of the SRIO device
  3198. portNum SRIO Port Number
  3199. @endverbatim
  3200. *
  3201. * <b> Return Value </b>
  3202. * @n None
  3203. *
  3204. * <b> Pre Condition </b>
  3205. * @n CSL_SRIO_Open() must be called
  3206. *
  3207. * <b> Post Condition </b>
  3208. * @n None
  3209. *
  3210. * @b Reads
  3211. * @n SRIO_RIO_SP_CTL2_RTEC
  3212. *
  3213. * @b Example
  3214. * @verbatim
  3215. CSL_SrioHandle hSrio;
  3216. // Open the CSL SRIO Module 0
  3217. hSrio = CSL_SRIO_Open (0);
  3218. // Check if remote Transmit Emphasis is enabled or not?
  3219. if (CSL_SRIO_IsRemoteTxEmphasisEnabled (hSrio, 1) == TRUE)
  3220. {
  3221. // Remote Transmit Emphasis is enabled
  3222. }
  3223. else
  3224. {
  3225. // Remote Transmit Emphasis is disabled
  3226. }
  3227. ...
  3228. @endverbatim
  3229. * =============================================================================
  3230. */
  3231. static inline Bool CSL_SRIO_IsRemoteTxEmphasisEnabled
  3232. (
  3233. CSL_SrioHandle hSrio,
  3234. Uint8 portNum
  3235. )
  3236. {
  3237. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL2, SRIO_RIO_SP_CTL2_RTEC) == 1)
  3238. return TRUE;
  3239. return FALSE;
  3240. }
  3241. /** ============================================================================
  3242. * @n@b CSL_SRIO_IsOutputPktDropped
  3243. *
  3244. * @b Description
  3245. * @n The function is used to check if the output port has discarded a packet
  3246. * or not?
  3247. *
  3248. * @b Arguments
  3249. @verbatim
  3250. hSrio Handle of the SRIO device
  3251. portNum SRIO Port Number
  3252. @endverbatim
  3253. *
  3254. * <b> Return Value </b>
  3255. * @n None
  3256. *
  3257. * <b> Pre Condition </b>
  3258. * @n CSL_SRIO_Open() must be called
  3259. *
  3260. * <b> Post Condition </b>
  3261. * @n None
  3262. *
  3263. * @b Reads
  3264. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_DROP
  3265. *
  3266. * @b Example
  3267. * @verbatim
  3268. CSL_SrioHandle hSrio;
  3269. // Open the CSL SRIO Module 0
  3270. hSrio = CSL_SRIO_Open (0);
  3271. // Check if Port1 has discarded a packet or not?
  3272. if (CSL_SRIO_IsOutputPktDropped (hSrio, 1) == TRUE)
  3273. {
  3274. // Port1 has discarded the packet
  3275. }
  3276. else
  3277. {
  3278. // Port1 has NOT discarded the packet
  3279. }
  3280. ...
  3281. @endverbatim
  3282. * =============================================================================
  3283. */
  3284. static inline Bool CSL_SRIO_IsOutputPktDropped
  3285. (
  3286. CSL_SrioHandle hSrio,
  3287. Uint8 portNum
  3288. )
  3289. {
  3290. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_OUTPUT_DROP) == 1)
  3291. return TRUE;
  3292. return FALSE;
  3293. }
  3294. /** ============================================================================
  3295. * @n@b CSL_SRIO_ClearOutputPktDropped
  3296. *
  3297. * @b Description
  3298. * @n The function is used to clear the status of the output port after the
  3299. * output port discarded condition has been detected
  3300. *
  3301. * @b Arguments
  3302. @verbatim
  3303. hSrio Handle of the SRIO device
  3304. portNum SRIO Port Number
  3305. @endverbatim
  3306. *
  3307. * <b> Return Value </b>
  3308. * @n None
  3309. *
  3310. * <b> Pre Condition </b>
  3311. * @n CSL_SRIO_Open() must be called
  3312. *
  3313. * <b> Post Condition </b>
  3314. * @n None
  3315. *
  3316. * @b Writes
  3317. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_DROP=1
  3318. *
  3319. * @b Affects
  3320. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_DROP=0
  3321. *
  3322. * @b Example
  3323. * @verbatim
  3324. CSL_SrioHandle hSrio;
  3325. // Open the CSL SRIO Module 0
  3326. hSrio = CSL_SRIO_Open (0);
  3327. // Check if Port1 has discarded a packet or not?
  3328. if (CSL_SRIO_IsOutputPktDropped (hSrio, 1) == TRUE)
  3329. {
  3330. // Port1 has discarded the packet
  3331. ...
  3332. // Clear this error condition
  3333. CSL_SRIO_ClearOutputPktDropped (hSrio, 1);
  3334. }
  3335. else
  3336. {
  3337. // Port1 has NOT discarded the packet
  3338. }
  3339. ...
  3340. @endverbatim
  3341. * =============================================================================
  3342. */
  3343. static inline void CSL_SRIO_ClearOutputPktDropped
  3344. (
  3345. CSL_SrioHandle hSrio,
  3346. Uint8 portNum
  3347. )
  3348. {
  3349. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_OUTPUT_DROP, 1);
  3350. }
  3351. /** ============================================================================
  3352. * @n@b CSL_SRIO_IsOutputFailed
  3353. *
  3354. * @b Description
  3355. * @n The function is used to check if the output port has encountered a failed
  3356. * condition.
  3357. *
  3358. * @b Arguments
  3359. @verbatim
  3360. hSrio Handle of the SRIO device
  3361. portNum SRIO Port Number
  3362. @endverbatim
  3363. *
  3364. * <b> Return Value </b>
  3365. * @n None
  3366. *
  3367. * <b> Pre Condition </b>
  3368. * @n CSL_SRIO_Open() must be called
  3369. *
  3370. * <b> Post Condition </b>
  3371. * @n None
  3372. *
  3373. * @b Reads
  3374. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_FAIL
  3375. *
  3376. * @b Example
  3377. * @verbatim
  3378. CSL_SrioHandle hSrio;
  3379. // Open the CSL SRIO Module 0
  3380. hSrio = CSL_SRIO_Open (0);
  3381. // Check if Port1 has detected an OUTPUT failed condition?
  3382. if (CSL_SRIO_IsOutputFailed (hSrio, 1) == TRUE)
  3383. {
  3384. // Port1 has detected an OUTPUT failed condition
  3385. }
  3386. else
  3387. {
  3388. // Port1 has NOT detected an OUTPUT failed condition
  3389. }
  3390. ...
  3391. @endverbatim
  3392. * =============================================================================
  3393. */
  3394. static inline Bool CSL_SRIO_IsOutputFailed
  3395. (
  3396. CSL_SrioHandle hSrio,
  3397. Uint8 portNum
  3398. )
  3399. {
  3400. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_OUTPUT_FAIL) == 1)
  3401. return TRUE;
  3402. return FALSE;
  3403. }
  3404. /** ============================================================================
  3405. * @n@b CSL_SRIO_ClearOutputFailed
  3406. *
  3407. * @b Description
  3408. * @n The function is used to clear the status of the output port after a
  3409. * failed condition was detected
  3410. *
  3411. * @b Arguments
  3412. @verbatim
  3413. hSrio Handle of the SRIO device
  3414. portNum SRIO Port Number
  3415. @endverbatim
  3416. *
  3417. * <b> Return Value </b>
  3418. * @n None
  3419. *
  3420. * <b> Pre Condition </b>
  3421. * @n CSL_SRIO_Open() must be called
  3422. *
  3423. * <b> Post Condition </b>
  3424. * @n None
  3425. *
  3426. * @b Writes
  3427. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_FAIL=1
  3428. *
  3429. * @b Affects
  3430. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_FAIL=0
  3431. *
  3432. * @b Example
  3433. * @verbatim
  3434. CSL_SrioHandle hSrio;
  3435. // Open the CSL SRIO Module 0
  3436. hSrio = CSL_SRIO_Open (0);
  3437. // Check if Port1 has detected a failed condition or not?
  3438. if (CSL_SRIO_IsOutputFailed (hSrio, 1) == TRUE)
  3439. {
  3440. // Port1 has detected an OUTPUT failed condition
  3441. ...
  3442. // Clear this error condition
  3443. CSL_SRIO_ClearOutputFailed (hSrio, 1);
  3444. }
  3445. else
  3446. {
  3447. // Port1 has NOT detected an OUTPUT failed condition
  3448. }
  3449. ...
  3450. @endverbatim
  3451. * =============================================================================
  3452. */
  3453. static inline void CSL_SRIO_ClearOutputFailed
  3454. (
  3455. CSL_SrioHandle hSrio,
  3456. Uint8 portNum
  3457. )
  3458. {
  3459. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_OUTPUT_FAIL, 1);
  3460. }
  3461. /** ============================================================================
  3462. * @n@b CSL_SRIO_IsOutputDegraded
  3463. *
  3464. * @b Description
  3465. * @n The function is used to check if the output port has encountered a degraded
  3466. * condition or not?
  3467. *
  3468. * @b Arguments
  3469. @verbatim
  3470. hSrio Handle of the SRIO device
  3471. portNum SRIO Port Number
  3472. @endverbatim
  3473. *
  3474. * <b> Return Value </b>
  3475. * @n None
  3476. *
  3477. * <b> Pre Condition </b>
  3478. * @n CSL_SRIO_Open() must be called
  3479. *
  3480. * <b> Post Condition </b>
  3481. * @n None
  3482. *
  3483. * @b Reads
  3484. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_DEGR
  3485. *
  3486. * @b Example
  3487. * @verbatim
  3488. CSL_SrioHandle hSrio;
  3489. // Open the CSL SRIO Module 0
  3490. hSrio = CSL_SRIO_Open (0);
  3491. // Check if Port1 has detected an OUTPUT degraded condition?
  3492. if (CSL_SRIO_IsOutputDegraded (hSrio, 1) == TRUE)
  3493. {
  3494. // Port1 has detected an OUTPUT degraded condition
  3495. }
  3496. else
  3497. {
  3498. // Port1 has NOT detected an OUTPUT degraded condition
  3499. }
  3500. ...
  3501. @endverbatim
  3502. * =============================================================================
  3503. */
  3504. static inline Bool CSL_SRIO_IsOutputDegraded
  3505. (
  3506. CSL_SrioHandle hSrio,
  3507. Uint8 portNum
  3508. )
  3509. {
  3510. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_OUTPUT_DEGR) == 1)
  3511. return TRUE;
  3512. return FALSE;
  3513. }
  3514. /** ============================================================================
  3515. * @n@b CSL_SRIO_ClearOutputDegrade
  3516. *
  3517. * @b Description
  3518. * @n The function is used to clear the status of the output port after a
  3519. * failed condition was detected
  3520. *
  3521. * @b Arguments
  3522. @verbatim
  3523. hSrio Handle of the SRIO device
  3524. portNum SRIO Port Number
  3525. @endverbatim
  3526. *
  3527. * <b> Return Value </b>
  3528. * @n None
  3529. *
  3530. * <b> Pre Condition </b>
  3531. * @n CSL_SRIO_Open() must be called
  3532. *
  3533. * <b> Post Condition </b>
  3534. * @n None
  3535. *
  3536. * @b Writes
  3537. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_DEGR=1
  3538. *
  3539. * @b Affects
  3540. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_DEGR=0
  3541. *
  3542. * @b Example
  3543. * @verbatim
  3544. CSL_SrioHandle hSrio;
  3545. // Open the CSL SRIO Module 0
  3546. hSrio = CSL_SRIO_Open (0);
  3547. // Check if Port1 has detected an OUTPUT degraded condition?
  3548. if (CSL_SRIO_IsOutputDegraded (hSrio, 1) == TRUE)
  3549. {
  3550. // Port1 has detected an OUTPUT degraded condition
  3551. ...
  3552. // Clear this error condition
  3553. CSL_SRIO_ClearOutputDegrade (hSrio, 1);
  3554. }
  3555. else
  3556. {
  3557. // Port1 has NOT detected an OUTPUT degraded condition
  3558. }
  3559. ...
  3560. @endverbatim
  3561. * =============================================================================
  3562. */
  3563. static inline void CSL_SRIO_ClearOutputDegrade
  3564. (
  3565. CSL_SrioHandle hSrio,
  3566. Uint8 portNum
  3567. )
  3568. {
  3569. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_OUTPUT_DEGR, 1);
  3570. }
  3571. /** ============================================================================
  3572. * @n@b CSL_SRIO_IsOutputRetryStopped
  3573. *
  3574. * @b Description
  3575. * @n The function is used to check if the output port has received a packet
  3576. * retry control symbol.
  3577. *
  3578. * @b Arguments
  3579. @verbatim
  3580. hSrio Handle of the SRIO device
  3581. portNum SRIO Port Number
  3582. @endverbatim
  3583. *
  3584. * <b> Return Value </b>
  3585. * @n None
  3586. *
  3587. * <b> Pre Condition </b>
  3588. * @n CSL_SRIO_Open() must be called
  3589. *
  3590. * <b> Post Condition </b>
  3591. * @n None
  3592. *
  3593. * @b Reads
  3594. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_RETRY_STOPPED
  3595. *
  3596. * @b Example
  3597. * @verbatim
  3598. CSL_SrioHandle hSrio;
  3599. // Open the CSL SRIO Module 0
  3600. hSrio = CSL_SRIO_Open (0);
  3601. // Check if Port1 has detected an OUTPUT Retry condition?
  3602. if (CSL_SRIO_IsOutputRetryStopped (hSrio, 1) == TRUE)
  3603. {
  3604. // Port1 has detected an OUTPUT Retry condition
  3605. }
  3606. else
  3607. {
  3608. // Port1 has NOT detected an OUTPUT Retry condition
  3609. }
  3610. ...
  3611. @endverbatim
  3612. * =============================================================================
  3613. */
  3614. static inline Bool CSL_SRIO_IsOutputRetryStopped
  3615. (
  3616. CSL_SrioHandle hSrio,
  3617. Uint8 portNum
  3618. )
  3619. {
  3620. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_OUTPUT_RETRY_STOPPED) == 1)
  3621. return TRUE;
  3622. return FALSE;
  3623. }
  3624. /** ============================================================================
  3625. * @n@b CSL_SRIO_ClearOutputRetry
  3626. *
  3627. * @b Description
  3628. * @n The function is used to clear the status of the output port after the output
  3629. * retry condition was detected.
  3630. *
  3631. * @b Arguments
  3632. @verbatim
  3633. hSrio Handle of the SRIO device
  3634. portNum SRIO Port Number
  3635. @endverbatim
  3636. *
  3637. * <b> Return Value </b>
  3638. * @n None
  3639. *
  3640. * <b> Pre Condition </b>
  3641. * @n CSL_SRIO_Open() must be called
  3642. *
  3643. * <b> Post Condition </b>
  3644. * @n None
  3645. *
  3646. * @b Writes
  3647. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_RETRY=1
  3648. *
  3649. * @b Affects
  3650. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_RETRY_STOPPED=0
  3651. *
  3652. * @b Example
  3653. * @verbatim
  3654. CSL_SrioHandle hSrio;
  3655. // Open the CSL SRIO Module 0
  3656. hSrio = CSL_SRIO_Open (0);
  3657. // Check if Port1 has detected an OUTPUT Retry condition?
  3658. if (CSL_SRIO_IsOutputRetryStopped (hSrio, 1) == TRUE)
  3659. {
  3660. // Port1 has detected an OUTPUT Retry condition
  3661. ...
  3662. // Clear this error condition
  3663. CSL_SRIO_ClearOutputRetry (hSrio, 1);
  3664. }
  3665. else
  3666. {
  3667. // Port1 has NOT detected an OUTPUT Retry condition
  3668. }
  3669. ...
  3670. @endverbatim
  3671. * =============================================================================
  3672. */
  3673. static inline void CSL_SRIO_ClearOutputRetry
  3674. (
  3675. CSL_SrioHandle hSrio,
  3676. Uint8 portNum
  3677. )
  3678. {
  3679. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_OUTPUT_RETRY, 1);
  3680. }
  3681. /** ============================================================================
  3682. * @n@b CSL_SRIO_IsOutputErrorStopped
  3683. *
  3684. * @b Description
  3685. * @n The function is used to check if the output port has detected an error
  3686. * and is in the output error stopped state
  3687. *
  3688. * @b Arguments
  3689. @verbatim
  3690. hSrio Handle of the SRIO device
  3691. portNum SRIO Port Number
  3692. @endverbatim
  3693. *
  3694. * <b> Return Value </b>
  3695. * @n None
  3696. *
  3697. * <b> Pre Condition </b>
  3698. * @n CSL_SRIO_Open() must be called
  3699. *
  3700. * <b> Post Condition </b>
  3701. * @n None
  3702. *
  3703. * @b Reads
  3704. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_ERR_STOPPED
  3705. *
  3706. * @b Example
  3707. * @verbatim
  3708. CSL_SrioHandle hSrio;
  3709. // Open the CSL SRIO Module 0
  3710. hSrio = CSL_SRIO_Open (0);
  3711. // Check if Port1 has detected an OUTPUT Error stopped condition?
  3712. if (CSL_SRIO_IsOutputErrorStopped (hSrio, 1) == TRUE)
  3713. {
  3714. // Port1 has detected an OUTPUT Error stopped condition
  3715. }
  3716. else
  3717. {
  3718. // Port1 has NOT detected an OUTPUT Error stopped condition
  3719. }
  3720. ...
  3721. @endverbatim
  3722. * =============================================================================
  3723. */
  3724. static inline Bool CSL_SRIO_IsOutputErrorStopped
  3725. (
  3726. CSL_SrioHandle hSrio,
  3727. Uint8 portNum
  3728. )
  3729. {
  3730. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_OUTPUT_ERR_STOPPED) == 1)
  3731. return TRUE;
  3732. return FALSE;
  3733. }
  3734. /** ============================================================================
  3735. * @n@b CSL_SRIO_ClearOutputErrorStopped
  3736. *
  3737. * @b Description
  3738. * @n The function is used to clear the status of the output port after the output
  3739. * error stopped condition was detected.
  3740. *
  3741. * @b Arguments
  3742. @verbatim
  3743. hSrio Handle of the SRIO device
  3744. portNum SRIO Port Number
  3745. @endverbatim
  3746. *
  3747. * <b> Return Value </b>
  3748. * @n None
  3749. *
  3750. * <b> Pre Condition </b>
  3751. * @n CSL_SRIO_Open() must be called
  3752. *
  3753. * <b> Post Condition </b>
  3754. * @n None
  3755. *
  3756. * @b Writes
  3757. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_ERR_ENCTR=1
  3758. *
  3759. * @b Affects
  3760. * @n SRIO_RIO_SP_ERR_STAT_OUTPUT_ERR_STOPPED=0
  3761. *
  3762. * @b Example
  3763. * @verbatim
  3764. CSL_SrioHandle hSrio;
  3765. // Open the CSL SRIO Module 0
  3766. hSrio = CSL_SRIO_Open (0);
  3767. // Check if Port1 has detected an OUTPUT Error stopped condition?
  3768. if (CSL_SRIO_IsOutputErrorStopped (hSrio, 1) == TRUE)
  3769. {
  3770. // Port1 has detected an OUTPUT Error stopped condition
  3771. ...
  3772. // Clear this error condition
  3773. CSL_SRIO_ClearOutputErrorStopped (hSrio, 1);
  3774. }
  3775. else
  3776. {
  3777. // Port1 has NOT detected an OUTPUT Error stopped condition
  3778. }
  3779. ...
  3780. @endverbatim
  3781. * =============================================================================
  3782. */
  3783. static inline void CSL_SRIO_ClearOutputErrorStopped
  3784. (
  3785. CSL_SrioHandle hSrio,
  3786. Uint8 portNum
  3787. )
  3788. {
  3789. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_OUTPUT_ERR, 1);
  3790. }
  3791. /** ============================================================================
  3792. * @n@b CSL_SRIO_IsInputErrorStopped
  3793. *
  3794. * @b Description
  3795. * @n The function is used to check if the port has detected an error
  3796. * and is in the input error stopped state
  3797. *
  3798. * @b Arguments
  3799. @verbatim
  3800. hSrio Handle of the SRIO device
  3801. portNum SRIO Port Number
  3802. @endverbatim
  3803. *
  3804. * <b> Return Value </b>
  3805. * @n None
  3806. *
  3807. * <b> Pre Condition </b>
  3808. * @n CSL_SRIO_Open() must be called
  3809. *
  3810. * <b> Post Condition </b>
  3811. * @n None
  3812. *
  3813. * @b Reads
  3814. * @n SRIO_RIO_SP_ERR_STAT_INPUT_ERR_STOPPED
  3815. *
  3816. * @b Example
  3817. * @verbatim
  3818. CSL_SrioHandle hSrio;
  3819. // Open the CSL SRIO Module 0
  3820. hSrio = CSL_SRIO_Open (0);
  3821. // Check if Port1 has detected an INPUT Error stopped condition?
  3822. if (CSL_SRIO_IsInputErrorStopped (hSrio, 1) == TRUE)
  3823. {
  3824. // Port1 has detected an INPUT Error stopped condition
  3825. }
  3826. else
  3827. {
  3828. // Port1 has NOT detected an INPUT Error stopped condition
  3829. }
  3830. ...
  3831. @endverbatim
  3832. * =============================================================================
  3833. */
  3834. static inline Bool CSL_SRIO_IsInputErrorStopped
  3835. (
  3836. CSL_SrioHandle hSrio,
  3837. Uint8 portNum
  3838. )
  3839. {
  3840. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_INPUT_ERR_STOPPED) == 1)
  3841. return TRUE;
  3842. return FALSE;
  3843. }
  3844. /** ============================================================================
  3845. * @n@b CSL_SRIO_ClearInputErrorStopped
  3846. *
  3847. * @b Description
  3848. * @n The function is used to clear the status of the input port after the input
  3849. * error stopped condition was detected.
  3850. *
  3851. * @b Arguments
  3852. @verbatim
  3853. hSrio Handle of the SRIO device
  3854. portNum SRIO Port Number
  3855. @endverbatim
  3856. *
  3857. * <b> Return Value </b>
  3858. * @n None
  3859. *
  3860. * <b> Pre Condition </b>
  3861. * @n CSL_SRIO_Open() must be called
  3862. *
  3863. * <b> Post Condition </b>
  3864. * @n None
  3865. *
  3866. * @b Writes
  3867. * @n SRIO_RIO_SP_ERR_STAT_INPUT_ERR_ENCTR=1
  3868. *
  3869. * @b Affects
  3870. * @n SRIO_RIO_SP_ERR_STAT_INPUT_ERR_STOPPED=0
  3871. *
  3872. * @b Example
  3873. * @verbatim
  3874. CSL_SrioHandle hSrio;
  3875. // Open the CSL SRIO Module 0
  3876. hSrio = CSL_SRIO_Open (0);
  3877. // Check if Port1 has detected an INPUT Error stopped condition?
  3878. if (CSL_SRIO_IsInputErrorStopped (hSrio, 1) == TRUE)
  3879. {
  3880. // Port1 has detected an INPUT Error stopped condition
  3881. ...
  3882. // Clear this error condition
  3883. CSL_SRIO_ClearInputErrorStopped (hSrio, 1);
  3884. }
  3885. else
  3886. {
  3887. // Port1 has NOT detected an INPUT Error stopped condition
  3888. }
  3889. ...
  3890. @endverbatim
  3891. * =============================================================================
  3892. */
  3893. static inline void CSL_SRIO_ClearInputErrorStopped
  3894. (
  3895. CSL_SrioHandle hSrio,
  3896. Uint8 portNum
  3897. )
  3898. {
  3899. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_INPUT_ERR_ENCTR, 1);
  3900. }
  3901. /** ============================================================================
  3902. * @n@b CSL_SRIO_IsPortWritePending
  3903. *
  3904. * @b Description
  3905. * @n The function is used to check if the port has encountered a condition
  3906. * which required it to an issue an I/O logical port-write maintainance
  3907. * request
  3908. *
  3909. * @b Arguments
  3910. @verbatim
  3911. hSrio Handle of the SRIO device
  3912. portNum SRIO Port Number
  3913. @endverbatim
  3914. *
  3915. * <b> Return Value </b>
  3916. * @n None
  3917. *
  3918. * <b> Pre Condition </b>
  3919. * @n CSL_SRIO_Open() must be called
  3920. *
  3921. * <b> Post Condition </b>
  3922. * @n None
  3923. *
  3924. * @b Reads
  3925. * @n SRIO_RIO_SP_ERR_STAT_PORT_WRITE_PEND
  3926. *
  3927. * @b Example
  3928. * @verbatim
  3929. CSL_SrioHandle hSrio;
  3930. // Open the CSL SRIO Module 0
  3931. hSrio = CSL_SRIO_Open (0);
  3932. // Check if Port1 has detected a port write pending condition?
  3933. if (CSL_SRIO_IsPortWritePending (hSrio, 1) == TRUE)
  3934. {
  3935. // Port1 has detected a port write pending condition
  3936. }
  3937. else
  3938. {
  3939. // Port1 has NOT detected a port write pending condition
  3940. }
  3941. ...
  3942. @endverbatim
  3943. * =============================================================================
  3944. */
  3945. static inline Bool CSL_SRIO_IsPortWritePending
  3946. (
  3947. CSL_SrioHandle hSrio,
  3948. Uint8 portNum
  3949. )
  3950. {
  3951. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_PORT_WRITE_PEND) == 1)
  3952. return TRUE;
  3953. return FALSE;
  3954. }
  3955. /** ============================================================================
  3956. * @n@b CSL_SRIO_ClearPortWritePending
  3957. *
  3958. * @b Description
  3959. * @n The function is used to clear the port write pending condition
  3960. *
  3961. * @b Arguments
  3962. @verbatim
  3963. hSrio Handle of the SRIO device
  3964. portNum SRIO Port Number
  3965. @endverbatim
  3966. *
  3967. * <b> Return Value </b>
  3968. * @n None
  3969. *
  3970. * <b> Pre Condition </b>
  3971. * @n CSL_SRIO_Open() must be called
  3972. *
  3973. * <b> Post Condition </b>
  3974. * @n None
  3975. *
  3976. * @b Writes
  3977. * @n SRIO_RIO_SP_ERR_STAT_PORT_WRITE_PEND=1
  3978. *
  3979. * @b Affects
  3980. * @n SRIO_RIO_SP_ERR_STAT_PORT_WRITE_PEND=0
  3981. *
  3982. * @b Example
  3983. * @verbatim
  3984. CSL_SrioHandle hSrio;
  3985. // Open the CSL SRIO Module 0
  3986. hSrio = CSL_SRIO_Open (0);
  3987. // Check if Port1 has detected a port write pending condition?
  3988. if (CSL_SRIO_IsPortWritePending (hSrio, 1) == TRUE)
  3989. {
  3990. // Port1 has detected a port write pending condition
  3991. ...
  3992. // Clear this error condition
  3993. CSL_SRIO_ClearInputErrorStopped (hSrio, 1);
  3994. }
  3995. else
  3996. {
  3997. // Port1 has NOT detected a port write pending condition
  3998. }
  3999. ...
  4000. @endverbatim
  4001. * =============================================================================
  4002. */
  4003. static inline void CSL_SRIO_ClearPortWritePending
  4004. (
  4005. CSL_SrioHandle hSrio,
  4006. Uint8 portNum
  4007. )
  4008. {
  4009. CSL_FINS (hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_PORT_WRITE_PEND, 1);
  4010. }
  4011. /** ============================================================================
  4012. * @n@b CSL_SRIO_IsPortAvailable
  4013. *
  4014. * @b Description
  4015. * @n The function is used to check if the port is available?
  4016. *
  4017. * @b Arguments
  4018. @verbatim
  4019. hSrio Handle of the SRIO device
  4020. portNum SRIO Port Number
  4021. @endverbatim
  4022. *
  4023. * <b> Return Value </b>
  4024. * @n None
  4025. *
  4026. * <b> Pre Condition </b>
  4027. * @n CSL_SRIO_Open() must be called
  4028. *
  4029. * <b> Post Condition </b>
  4030. * @n None
  4031. *
  4032. * @b Reads
  4033. * @n SRIO_RIO_SP_ERR_STAT_PORT_UNAVL
  4034. *
  4035. * @b Example
  4036. * @verbatim
  4037. CSL_SrioHandle hSrio;
  4038. // Open the CSL SRIO Module 0
  4039. hSrio = CSL_SRIO_Open (0);
  4040. // Check if Port1 is available or not?
  4041. if (CSL_SRIO_IsPortAvailable (hSrio, 1) == TRUE)
  4042. {
  4043. // Port1 is available
  4044. }
  4045. else
  4046. {
  4047. // Port1 is not available
  4048. }
  4049. ...
  4050. @endverbatim
  4051. * =============================================================================
  4052. */
  4053. static inline Bool CSL_SRIO_IsPortAvailable
  4054. (
  4055. CSL_SrioHandle hSrio,
  4056. Uint8 portNum
  4057. )
  4058. {
  4059. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_PORT_UNAVL) == 0)
  4060. return TRUE;
  4061. return FALSE;
  4062. }
  4063. /** ============================================================================
  4064. * @n@b CSL_SRIO_IsPortFatalErrorDetected
  4065. *
  4066. * @b Description
  4067. * @n The function is used to check if the port has detected an error from which
  4068. * the hardware was unable to recover (a fatal error).
  4069. *
  4070. * @b Arguments
  4071. @verbatim
  4072. hSrio Handle of the SRIO device
  4073. portNum SRIO Port Number
  4074. @endverbatim
  4075. *
  4076. * <b> Return Value </b>
  4077. * @n TRUE - Port Fatal Error detected
  4078. * @n FALSE - Port Fatal Error not detected
  4079. *
  4080. * <b> Pre Condition </b>
  4081. * @n CSL_SRIO_Open() must be called
  4082. *
  4083. * <b> Post Condition </b>
  4084. * @n None
  4085. *
  4086. * @b Reads
  4087. * @n SRIO_RIO_SP_ERR_STAT_PORT_ERR
  4088. *
  4089. * @b Example
  4090. * @verbatim
  4091. CSL_SrioHandle hSrio;
  4092. // Open the CSL SRIO Module 0
  4093. hSrio = CSL_SRIO_Open (0);
  4094. // Check if Port1 fatal error was detected or not?
  4095. if (CSL_SRIO_IsPortFatalErrorDetected (hSrio, 1) == TRUE)
  4096. {
  4097. // Port1 has FATAL Error
  4098. }
  4099. else
  4100. {
  4101. // Port1 does not have a FATAL Error
  4102. }
  4103. ...
  4104. @endverbatim
  4105. * =============================================================================
  4106. */
  4107. static inline Bool CSL_SRIO_IsPortFatalErrorDetected
  4108. (
  4109. CSL_SrioHandle hSrio,
  4110. Uint8 portNum
  4111. )
  4112. {
  4113. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_PORT_ERR) == 1)
  4114. return TRUE;
  4115. return FALSE;
  4116. }
  4117. /** ============================================================================
  4118. * @n@b CSL_SRIO_IsPortOk
  4119. *
  4120. * @b Description
  4121. * @n The function is used to check if the port is initialized and can be
  4122. * used for exchanging error free control symbols.
  4123. *
  4124. * @b Arguments
  4125. @verbatim
  4126. hSrio Handle of the SRIO device
  4127. portNum SRIO Port Number
  4128. @endverbatim
  4129. *
  4130. * <b> Return Value </b>
  4131. * @n TRUE - Port is operational
  4132. * @n FALSE - Port is NOT operational
  4133. *
  4134. * <b> Pre Condition </b>
  4135. * @n CSL_SRIO_Open() must be called
  4136. *
  4137. * <b> Post Condition </b>
  4138. * @n None
  4139. *
  4140. * @b Reads
  4141. * @n SRIO_RIO_SP_ERR_STAT_PORT_OK
  4142. *
  4143. * @b Example
  4144. * @verbatim
  4145. CSL_SrioHandle hSrio;
  4146. // Open the CSL SRIO Module 0
  4147. hSrio = CSL_SRIO_Open (0);
  4148. // Check if Port1 is ok and operational
  4149. if (CSL_SRIO_IsPortOk (hSrio, 1) == TRUE)
  4150. {
  4151. // Port1 is OK and can be used
  4152. }
  4153. else
  4154. {
  4155. // Port1 is NOT OK and cannot be used
  4156. }
  4157. ...
  4158. @endverbatim
  4159. * =============================================================================
  4160. */
  4161. static inline Bool CSL_SRIO_IsPortOk
  4162. (
  4163. CSL_SrioHandle hSrio,
  4164. Uint8 portNum
  4165. )
  4166. {
  4167. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_PORT_OK) == 1)
  4168. return TRUE;
  4169. return FALSE;
  4170. }
  4171. /** ============================================================================
  4172. * @n@b CSL_SRIO_IsPortInitialized
  4173. *
  4174. * @b Description
  4175. * @n The function is used to check if the port is initialized or not?
  4176. *
  4177. * @b Arguments
  4178. @verbatim
  4179. hSrio Handle of the SRIO device
  4180. portNum SRIO Port Number
  4181. @endverbatim
  4182. *
  4183. * <b> Return Value </b>
  4184. * @n TRUE - Port is initialized
  4185. * @n FALSE - Port is NOT initialized
  4186. *
  4187. * <b> Pre Condition </b>
  4188. * @n CSL_SRIO_Open() must be called
  4189. *
  4190. * <b> Post Condition </b>
  4191. * @n None
  4192. *
  4193. * @b Reads
  4194. * @n SRIO_RIO_SP_ERR_STAT_PORT_UNINIT
  4195. *
  4196. * @b Example
  4197. * @verbatim
  4198. CSL_SrioHandle hSrio;
  4199. // Open the CSL SRIO Module 0
  4200. hSrio = CSL_SRIO_Open (0);
  4201. // Check if Port1 is initialized or not?
  4202. if (CSL_SRIO_IsPortInitialized (hSrio, 1) == TRUE)
  4203. {
  4204. // Port1 is Initialized
  4205. }
  4206. else
  4207. {
  4208. // Port1 is NOT Initialized
  4209. }
  4210. ...
  4211. @endverbatim
  4212. * =============================================================================
  4213. */
  4214. static inline Bool CSL_SRIO_IsPortInitialized
  4215. (
  4216. CSL_SrioHandle hSrio,
  4217. Uint8 portNum
  4218. )
  4219. {
  4220. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_ERR_STAT, SRIO_RIO_SP_ERR_STAT_PORT_UNINIT) == 0)
  4221. return TRUE;
  4222. return FALSE;
  4223. }
  4224. /** ============================================================================
  4225. * @n@b CSL_SRIO_GetSupportedPortWidth
  4226. *
  4227. * @b Description
  4228. * @n The function is used to get the supported port width for a specific port
  4229. * in addition to the 1x mode which is supported by all ports.
  4230. *
  4231. * @b Arguments
  4232. @verbatim
  4233. hSrio Handle of the SRIO device
  4234. portNum SRIO Port Number
  4235. portWidth Port Width populated by this API
  4236. @endverbatim
  4237. *
  4238. * <b> Return Value </b>
  4239. * @n None
  4240. *
  4241. * <b> Pre Condition </b>
  4242. * @n CSL_SRIO_Open() must be called
  4243. *
  4244. * <b> Post Condition </b>
  4245. * @n None
  4246. *
  4247. * @b Reads
  4248. * @n SRIO_RIO_SP_CTL_PORT_WIDTH
  4249. *
  4250. * @b Example
  4251. * @verbatim
  4252. CSL_SrioHandle hSrio;
  4253. Uint8 portWidth;
  4254. // Open the CSL SRIO Module 0
  4255. hSrio = CSL_SRIO_Open (0);
  4256. // Get the supported port width for port1
  4257. CSL_SRIO_GetSupportedPortWidth(hSrio, 1, &portWidth);
  4258. ...
  4259. @endverbatim
  4260. * =============================================================================
  4261. */
  4262. static inline void CSL_SRIO_GetSupportedPortWidth
  4263. (
  4264. CSL_SrioHandle hSrio,
  4265. Uint8 portNum,
  4266. Uint8* portWidth
  4267. )
  4268. {
  4269. *portWidth = CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_PORT_WIDTH);
  4270. }
  4271. /** ============================================================================
  4272. * @n@b CSL_SRIO_GetInitializedPortWidth
  4273. *
  4274. * @b Description
  4275. * @n The function is used to get the width of the port after initialization.
  4276. *
  4277. * @b Arguments
  4278. @verbatim
  4279. hSrio Handle of the SRIO device
  4280. portNum SRIO Port Number
  4281. portWidth Port Width populated by this API
  4282. @endverbatim
  4283. *
  4284. * <b> Return Value </b>
  4285. * @n None
  4286. *
  4287. * <b> Pre Condition </b>
  4288. * @n CSL_SRIO_Open() must be called
  4289. *
  4290. * <b> Post Condition </b>
  4291. * @n None
  4292. *
  4293. * @b Reads
  4294. * @n SRIO_RIO_SP_CTL_INIT_PWIDTH
  4295. *
  4296. * @b Example
  4297. * @verbatim
  4298. CSL_SrioHandle hSrio;
  4299. Uint8 portWidth;
  4300. // Open the CSL SRIO Module 0
  4301. hSrio = CSL_SRIO_Open (0);
  4302. // Get the initialized port width for port1
  4303. CSL_SRIO_GetInitializedPortWidth(hSrio, 1, &portWidth);
  4304. ...
  4305. @endverbatim
  4306. * =============================================================================
  4307. */
  4308. static inline void CSL_SRIO_GetInitializedPortWidth
  4309. (
  4310. CSL_SrioHandle hSrio,
  4311. Uint8 portNum,
  4312. Uint8* portWidth
  4313. )
  4314. {
  4315. *portWidth = CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_INIT_PWIDTH);
  4316. }
  4317. /** ============================================================================
  4318. * @n@b CSL_SRIO_GetSoftwarePortWidth
  4319. *
  4320. * @b Description
  4321. * @n The function is used to get the software port configuration to override
  4322. * the hardware sizes.
  4323. *
  4324. * @b Arguments
  4325. @verbatim
  4326. hSrio Handle of the SRIO device
  4327. portNum SRIO Port Number
  4328. portWidth Port Width populated by this API
  4329. @endverbatim
  4330. *
  4331. * <b> Return Value </b>
  4332. * @n None
  4333. *
  4334. * <b> Pre Condition </b>
  4335. * @n CSL_SRIO_Open() must be called
  4336. *
  4337. * <b> Post Condition </b>
  4338. * @n None
  4339. *
  4340. * @b Reads
  4341. * @n SRIO_RIO_SP_CTL_OVER_PWIDTH
  4342. *
  4343. * @b Example
  4344. * @verbatim
  4345. CSL_SrioHandle hSrio;
  4346. Uint8 portWidth;
  4347. // Open the CSL SRIO Module 0
  4348. hSrio = CSL_SRIO_Open (0);
  4349. // Get the software port width override
  4350. CSL_SRIO_GetSoftwarePortWidth(hSrio, 1, &portWidth);
  4351. ...
  4352. @endverbatim
  4353. * =============================================================================
  4354. */
  4355. static inline void CSL_SRIO_GetSoftwarePortWidth
  4356. (
  4357. CSL_SrioHandle hSrio,
  4358. Uint8 portNum,
  4359. Uint8* portWidth
  4360. )
  4361. {
  4362. *portWidth = CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_OVER_PWIDTH);
  4363. }
  4364. /** ============================================================================
  4365. * @n@b CSL_SRIO_SetSoftwarePortWidth
  4366. *
  4367. * @b Description
  4368. * @n The function is used to set the software port configuration to override
  4369. * the hardware sizes.
  4370. *
  4371. * @b Arguments
  4372. @verbatim
  4373. hSrio Handle of the SRIO device
  4374. portNum SRIO Port Number
  4375. portWidth Port Width to be configured
  4376. @endverbatim
  4377. *
  4378. * <b> Return Value </b>
  4379. * @n None
  4380. *
  4381. * <b> Pre Condition </b>
  4382. * @n CSL_SRIO_Open() must be called
  4383. *
  4384. * <b> Post Condition </b>
  4385. * @n None
  4386. *
  4387. * @b Writes
  4388. * @n SRIO_RIO_SP_CTL_OVER_PWIDTH
  4389. *
  4390. * @b Example
  4391. * @verbatim
  4392. CSL_SrioHandle hSrio;
  4393. // Open the CSL SRIO Module 0
  4394. hSrio = CSL_SRIO_Open (0);
  4395. // Set the software port width override to force 2x mode
  4396. CSL_SRIO_SetSoftwarePortWidth(hSrio, 1, 5);
  4397. ...
  4398. @endverbatim
  4399. * =============================================================================
  4400. */
  4401. static inline void CSL_SRIO_SetSoftwarePortWidth
  4402. (
  4403. CSL_SrioHandle hSrio,
  4404. Uint8 portNum,
  4405. Uint8 portWidth
  4406. )
  4407. {
  4408. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_OVER_PWIDTH, portWidth);
  4409. }
  4410. /** ============================================================================
  4411. * @n@b CSL_SRIO_EnablePort
  4412. *
  4413. * @b Description
  4414. * @n The function is used to enable the specific port
  4415. *
  4416. * @b Arguments
  4417. @verbatim
  4418. hSrio Handle of the SRIO device
  4419. portNum SRIO Port Number
  4420. @endverbatim
  4421. *
  4422. * <b> Return Value </b>
  4423. * @n None
  4424. *
  4425. * <b> Pre Condition </b>
  4426. * @n CSL_SRIO_Open() must be called
  4427. *
  4428. * <b> Post Condition </b>
  4429. * @n None
  4430. *
  4431. * @b Writes
  4432. * @n SRIO_RIO_SP_CTL_PORT_DIS=0
  4433. *
  4434. * @b Example
  4435. * @verbatim
  4436. CSL_SrioHandle hSrio;
  4437. // Open the CSL SRIO Module 0
  4438. hSrio = CSL_SRIO_Open (0);
  4439. // Enable port 1
  4440. CSL_SRIO_EnablePort(hSrio, 1);
  4441. ...
  4442. @endverbatim
  4443. * =============================================================================
  4444. */
  4445. static inline void CSL_SRIO_EnablePort
  4446. (
  4447. CSL_SrioHandle hSrio,
  4448. Uint8 portNum
  4449. )
  4450. {
  4451. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_PORT_DIS, 0);
  4452. }
  4453. /** ============================================================================
  4454. * @n@b CSL_SRIO_DisablePort
  4455. *
  4456. * @b Description
  4457. * @n The function is used to disable the specific port
  4458. *
  4459. * @b Arguments
  4460. @verbatim
  4461. hSrio Handle of the SRIO device
  4462. portNum SRIO Port Number
  4463. @endverbatim
  4464. *
  4465. * <b> Return Value </b>
  4466. * @n None
  4467. *
  4468. * <b> Pre Condition </b>
  4469. * @n CSL_SRIO_Open() must be called
  4470. *
  4471. * <b> Post Condition </b>
  4472. * @n None
  4473. *
  4474. * @b Writes
  4475. * @n SRIO_RIO_SP_CTL_PORT_DIS=1
  4476. *
  4477. * @b Example
  4478. * @verbatim
  4479. CSL_SrioHandle hSrio;
  4480. // Open the CSL SRIO Module 0
  4481. hSrio = CSL_SRIO_Open (0);
  4482. // Disable port 1
  4483. CSL_SRIO_DisablePort(hSrio, 1);
  4484. ...
  4485. @endverbatim
  4486. * =============================================================================
  4487. */
  4488. static inline void CSL_SRIO_DisablePort
  4489. (
  4490. CSL_SrioHandle hSrio,
  4491. Uint8 portNum
  4492. )
  4493. {
  4494. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_PORT_DIS, 1);
  4495. }
  4496. /** ============================================================================
  4497. * @n@b CSL_SRIO_IsPortEnabled
  4498. *
  4499. * @b Description
  4500. * @n The function is used to check if the port is enabled or not?
  4501. *
  4502. * @b Arguments
  4503. @verbatim
  4504. hSrio Handle of the SRIO device
  4505. portNum SRIO Port Number
  4506. @endverbatim
  4507. *
  4508. * <b> Return Value </b>
  4509. * @n TRUE - Port is enabled
  4510. * @n FALSE - Port is disabled
  4511. *
  4512. * <b> Pre Condition </b>
  4513. * @n CSL_SRIO_Open() must be called
  4514. *
  4515. * <b> Post Condition </b>
  4516. * @n None
  4517. *
  4518. * @b Reads
  4519. * @n SRIO_RIO_SP_CTL_PORT_DIS
  4520. *
  4521. * @b Example
  4522. * @verbatim
  4523. CSL_SrioHandle hSrio;
  4524. // Open the CSL SRIO Module 0
  4525. hSrio = CSL_SRIO_Open (0);
  4526. // Check if port 1 is enabled or not?
  4527. if (CSL_SRIO_IsPortEnabled(hSrio, 1) == TRUE)
  4528. {
  4529. // Port1 is enabled
  4530. }
  4531. else
  4532. {
  4533. // Port1 is disabled
  4534. }
  4535. ...
  4536. @endverbatim
  4537. * =============================================================================
  4538. */
  4539. static inline Bool CSL_SRIO_IsPortEnabled
  4540. (
  4541. CSL_SrioHandle hSrio,
  4542. Uint8 portNum
  4543. )
  4544. {
  4545. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_PORT_DIS) == 0)
  4546. return TRUE;
  4547. return FALSE;
  4548. }
  4549. /** ============================================================================
  4550. * @n@b CSL_SRIO_EnableOutputPort
  4551. *
  4552. * @b Description
  4553. * @n The function is used to enable the output port to issue any packets
  4554. *
  4555. * @b Arguments
  4556. @verbatim
  4557. hSrio Handle of the SRIO device
  4558. portNum SRIO Port Number
  4559. @endverbatim
  4560. *
  4561. * <b> Return Value </b>
  4562. * @n None
  4563. *
  4564. * <b> Pre Condition </b>
  4565. * @n CSL_SRIO_Open() must be called
  4566. *
  4567. * <b> Post Condition </b>
  4568. * @n None
  4569. *
  4570. * @b Writes
  4571. * @n SRIO_RIO_SP_CTL_OTP_EN=1
  4572. *
  4573. * @b Example
  4574. * @verbatim
  4575. CSL_SrioHandle hSrio;
  4576. // Open the CSL SRIO Module 0
  4577. hSrio = CSL_SRIO_Open (0);
  4578. // Enable output port 1
  4579. CSL_SRIO_EnableOutputPort(hSrio, 1);
  4580. ...
  4581. @endverbatim
  4582. * =============================================================================
  4583. */
  4584. static inline void CSL_SRIO_EnableOutputPort
  4585. (
  4586. CSL_SrioHandle hSrio,
  4587. Uint8 portNum
  4588. )
  4589. {
  4590. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_OTP_EN, 1);
  4591. }
  4592. /** ============================================================================
  4593. * @n@b CSL_SRIO_DisableOutputPort
  4594. *
  4595. * @b Description
  4596. * @n The function is used to disable the output port and is unable to issue
  4597. * any packets except to route or respond to MAINTENANCE packets.
  4598. *
  4599. * @b Arguments
  4600. @verbatim
  4601. hSrio Handle of the SRIO device
  4602. portNum SRIO Port Number
  4603. @endverbatim
  4604. *
  4605. * <b> Return Value </b>
  4606. * @n None
  4607. *
  4608. * <b> Pre Condition </b>
  4609. * @n CSL_SRIO_Open() must be called
  4610. *
  4611. * <b> Post Condition </b>
  4612. * @n None
  4613. *
  4614. * @b Writes
  4615. * @n SRIO_RIO_SP_CTL_OTP_EN=0
  4616. *
  4617. * @b Example
  4618. * @verbatim
  4619. CSL_SrioHandle hSrio;
  4620. // Open the CSL SRIO Module 0
  4621. hSrio = CSL_SRIO_Open (0);
  4622. // Disable output port 1
  4623. CSL_SRIO_DisableOutputPort(hSrio, 1);
  4624. ...
  4625. @endverbatim
  4626. * =============================================================================
  4627. */
  4628. static inline void CSL_SRIO_DisableOutputPort
  4629. (
  4630. CSL_SrioHandle hSrio,
  4631. Uint8 portNum
  4632. )
  4633. {
  4634. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_OTP_EN, 0);
  4635. }
  4636. /** ============================================================================
  4637. * @n@b CSL_SRIO_IsOutputPortEnabled
  4638. *
  4639. * @b Description
  4640. * @n The function is used to check if the output port is enabled or not?
  4641. *
  4642. * @b Arguments
  4643. @verbatim
  4644. hSrio Handle of the SRIO device
  4645. portNum SRIO Port Number
  4646. @endverbatim
  4647. *
  4648. * <b> Return Value </b>
  4649. * @n TRUE - Output Port is enabled
  4650. * @n FALSE - Output Port is disabled
  4651. *
  4652. * <b> Pre Condition </b>
  4653. * @n CSL_SRIO_Open() must be called
  4654. *
  4655. * <b> Post Condition </b>
  4656. * @n None
  4657. *
  4658. * @b Reads
  4659. * @n SRIO_RIO_SP_CTL_OTP_EN
  4660. *
  4661. * @b Example
  4662. * @verbatim
  4663. CSL_SrioHandle hSrio;
  4664. // Open the CSL SRIO Module 0
  4665. hSrio = CSL_SRIO_Open (0);
  4666. // Check if output port 1 is enabled or not?
  4667. if (CSL_SRIO_IsOutputPortEnabled(hSrio, 1) == TRUE)
  4668. {
  4669. // Output Port1 is enabled
  4670. }
  4671. else
  4672. {
  4673. // Output Port1 is disabled
  4674. }
  4675. ...
  4676. @endverbatim
  4677. * =============================================================================
  4678. */
  4679. static inline Bool CSL_SRIO_IsOutputPortEnabled
  4680. (
  4681. CSL_SrioHandle hSrio,
  4682. Uint8 portNum
  4683. )
  4684. {
  4685. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_OTP_EN) == 1)
  4686. return TRUE;
  4687. return FALSE;
  4688. }
  4689. /** ============================================================================
  4690. * @n@b CSL_SRIO_EnableInputPort
  4691. *
  4692. * @b Description
  4693. * @n The function is used to enable the input port to issue any packets
  4694. *
  4695. * @b Arguments
  4696. @verbatim
  4697. hSrio Handle of the SRIO device
  4698. portNum SRIO Port Number
  4699. @endverbatim
  4700. *
  4701. * <b> Return Value </b>
  4702. * @n None
  4703. *
  4704. * <b> Pre Condition </b>
  4705. * @n CSL_SRIO_Open() must be called
  4706. *
  4707. * <b> Post Condition </b>
  4708. * @n None
  4709. *
  4710. * @b Writes
  4711. * @n SRIO_RIO_SP_CTL_INP_EN=1
  4712. *
  4713. * @b Example
  4714. * @verbatim
  4715. CSL_SrioHandle hSrio;
  4716. // Open the CSL SRIO Module 0
  4717. hSrio = CSL_SRIO_Open (0);
  4718. // Enable input port 1
  4719. CSL_SRIO_EnableInputPort(hSrio, 1);
  4720. ...
  4721. @endverbatim
  4722. * =============================================================================
  4723. */
  4724. static inline void CSL_SRIO_EnableInputPort
  4725. (
  4726. CSL_SrioHandle hSrio,
  4727. Uint8 portNum
  4728. )
  4729. {
  4730. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_INP_EN, 1);
  4731. }
  4732. /** ============================================================================
  4733. * @n@b CSL_SRIO_DisableInputPort
  4734. *
  4735. * @b Description
  4736. * @n The function is used to disable the input port to issue any packets
  4737. *
  4738. * @b Arguments
  4739. @verbatim
  4740. hSrio Handle of the SRIO device
  4741. portNum SRIO Port Number
  4742. @endverbatim
  4743. *
  4744. * <b> Return Value </b>
  4745. * @n None
  4746. *
  4747. * <b> Pre Condition </b>
  4748. * @n CSL_SRIO_Open() must be called
  4749. *
  4750. * <b> Post Condition </b>
  4751. * @n None
  4752. *
  4753. * @b Writes
  4754. * @n SRIO_RIO_SP_CTL_INP_EN=0
  4755. *
  4756. * @b Example
  4757. * @verbatim
  4758. CSL_SrioHandle hSrio;
  4759. // Open the CSL SRIO Module 0
  4760. hSrio = CSL_SRIO_Open (0);
  4761. // Disable input port 1
  4762. CSL_SRIO_DisableInputPort(hSrio, 1);
  4763. ...
  4764. @endverbatim
  4765. * =============================================================================
  4766. */
  4767. static inline void CSL_SRIO_DisableInputPort
  4768. (
  4769. CSL_SrioHandle hSrio,
  4770. Uint8 portNum
  4771. )
  4772. {
  4773. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_INP_EN, 0);
  4774. }
  4775. /** ============================================================================
  4776. * @n@b CSL_SRIO_IsInputPortEnabled
  4777. *
  4778. * @b Description
  4779. * @n The function is used to check if the input port is enabled or not?
  4780. *
  4781. * @b Arguments
  4782. @verbatim
  4783. hSrio Handle of the SRIO device
  4784. portNum SRIO Port Number
  4785. @endverbatim
  4786. *
  4787. * <b> Return Value </b>
  4788. * @n TRUE - Input Port is enabled
  4789. * @n FALSE - Input Port is disabled
  4790. *
  4791. * <b> Pre Condition </b>
  4792. * @n CSL_SRIO_Open() must be called
  4793. *
  4794. * <b> Post Condition </b>
  4795. * @n None
  4796. *
  4797. * @b Reads
  4798. * @n SRIO_RIO_SP_CTL_INP_EN
  4799. *
  4800. * @b Example
  4801. * @verbatim
  4802. CSL_SrioHandle hSrio;
  4803. // Open the CSL SRIO Module 0
  4804. hSrio = CSL_SRIO_Open (0);
  4805. // Check if input port 1 is enabled or not?
  4806. if (CSL_SRIO_IsInputPortEnabled(hSrio, 1) == TRUE)
  4807. {
  4808. // Input Port1 is enabled
  4809. }
  4810. else
  4811. {
  4812. // Input Port1 is disabled
  4813. }
  4814. ...
  4815. @endverbatim
  4816. * =============================================================================
  4817. */
  4818. static inline Bool CSL_SRIO_IsInputPortEnabled
  4819. (
  4820. CSL_SrioHandle hSrio,
  4821. Uint8 portNum
  4822. )
  4823. {
  4824. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_INP_EN) == 1)
  4825. return TRUE;
  4826. return FALSE;
  4827. }
  4828. /** ============================================================================
  4829. * @n@b CSL_SRIO_EnablePortErrorChecking
  4830. *
  4831. * @b Description
  4832. * @n The function is used to enable the error checking
  4833. *
  4834. * @b Arguments
  4835. @verbatim
  4836. hSrio Handle of the SRIO device
  4837. portNum SRIO Port Number
  4838. @endverbatim
  4839. *
  4840. * <b> Return Value </b>
  4841. * @n None
  4842. *
  4843. * <b> Pre Condition </b>
  4844. * @n CSL_SRIO_Open() must be called
  4845. *
  4846. * <b> Post Condition </b>
  4847. * @n None
  4848. *
  4849. * @b Writes
  4850. * @n SRIO_RIO_SP_CTL_ERR_DIS=0
  4851. *
  4852. * @b Example
  4853. * @verbatim
  4854. CSL_SrioHandle hSrio;
  4855. // Open the CSL SRIO Module 0
  4856. hSrio = CSL_SRIO_Open (0);
  4857. // Enable error checking for port 1
  4858. CSL_SRIO_EnablePortErrorChecking(hSrio, 1);
  4859. ...
  4860. @endverbatim
  4861. * =============================================================================
  4862. */
  4863. static inline void CSL_SRIO_EnablePortErrorChecking
  4864. (
  4865. CSL_SrioHandle hSrio,
  4866. Uint8 portNum
  4867. )
  4868. {
  4869. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_ERR_DIS, 0);
  4870. }
  4871. /** ============================================================================
  4872. * @n@b CSL_SRIO_DisablePortErrorChecking
  4873. *
  4874. * @b Description
  4875. * @n The function is used to disable the error checking
  4876. *
  4877. * @b Arguments
  4878. @verbatim
  4879. hSrio Handle of the SRIO device
  4880. portNum SRIO Port Number
  4881. @endverbatim
  4882. *
  4883. * <b> Return Value </b>
  4884. * @n None
  4885. *
  4886. * <b> Pre Condition </b>
  4887. * @n CSL_SRIO_Open() must be called
  4888. *
  4889. * <b> Post Condition </b>
  4890. * @n None
  4891. *
  4892. * @b Writes
  4893. * @n SRIO_RIO_SP_CTL_ERR_DIS=1
  4894. *
  4895. * @b Example
  4896. * @verbatim
  4897. CSL_SrioHandle hSrio;
  4898. // Open the CSL SRIO Module 0
  4899. hSrio = CSL_SRIO_Open (0);
  4900. // Disable error checking for port 1
  4901. CSL_SRIO_DisablePortErrorChecking(hSrio, 1);
  4902. ...
  4903. @endverbatim
  4904. * =============================================================================
  4905. */
  4906. static inline void CSL_SRIO_DisablePortErrorChecking
  4907. (
  4908. CSL_SrioHandle hSrio,
  4909. Uint8 portNum
  4910. )
  4911. {
  4912. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_ERR_DIS, 1);
  4913. }
  4914. /** ============================================================================
  4915. * @n@b CSL_SRIO_IsPortErrorCheckingEnabled
  4916. *
  4917. * @b Description
  4918. * @n The function is used to check if the error checking is enabled or not?
  4919. *
  4920. * @b Arguments
  4921. @verbatim
  4922. hSrio Handle of the SRIO device
  4923. portNum SRIO Port Number
  4924. @endverbatim
  4925. *
  4926. * <b> Return Value </b>
  4927. * @n TRUE - Error Checking is enabled
  4928. * @n FALSE - Error Checking is disabled
  4929. *
  4930. * <b> Pre Condition </b>
  4931. * @n CSL_SRIO_Open() must be called
  4932. *
  4933. * <b> Post Condition </b>
  4934. * @n None
  4935. *
  4936. * @b Reads
  4937. * @n SRIO_RIO_SP_CTL_ERR_DIS
  4938. *
  4939. * @b Example
  4940. * @verbatim
  4941. CSL_SrioHandle hSrio;
  4942. // Open the CSL SRIO Module 0
  4943. hSrio = CSL_SRIO_Open (0);
  4944. // Check if error checking for port 1 is enabled or not?
  4945. if (CSL_SRIO_IsPortErrorCheckingEnabled(hSrio, 1) == TRUE)
  4946. {
  4947. // Port1 error checking is enabled
  4948. }
  4949. else
  4950. {
  4951. // Port1 error checking is disabled
  4952. }
  4953. ...
  4954. @endverbatim
  4955. * =============================================================================
  4956. */
  4957. static inline Bool CSL_SRIO_IsPortErrorCheckingEnabled
  4958. (
  4959. CSL_SrioHandle hSrio,
  4960. Uint8 portNum
  4961. )
  4962. {
  4963. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_ERR_DIS) == 0)
  4964. return TRUE;
  4965. return FALSE;
  4966. }
  4967. /** ============================================================================
  4968. * @n@b CSL_SRIO_GetMulticastEventParticipant
  4969. *
  4970. * @b Description
  4971. * @n The function is used to get the Multicast Event Participant status for the
  4972. * specific port.
  4973. *
  4974. * @b Arguments
  4975. @verbatim
  4976. hSrio Handle of the SRIO device
  4977. portNum SRIO Port Number
  4978. multicastEvent Multicast Event Participant status populated by this API
  4979. @endverbatim
  4980. *
  4981. * <b> Return Value </b>
  4982. * @n None
  4983. *
  4984. * <b> Pre Condition </b>
  4985. * @n CSL_SRIO_Open() must be called
  4986. *
  4987. * <b> Post Condition </b>
  4988. * @n None
  4989. *
  4990. * @b Reads
  4991. * @n SRIO_RIO_SP_CTL_MULT_CS
  4992. *
  4993. * @b Example
  4994. * @verbatim
  4995. CSL_SrioHandle hSrio;
  4996. Uint8 multicastEvent;
  4997. // Open the CSL SRIO Module 0
  4998. hSrio = CSL_SRIO_Open (0);
  4999. // Get the Multicast Event Participant status for Port 1
  5000. CSL_SRIO_GetMulticastEventParticipant(hSrio, 1, &multicastEvent);
  5001. ...
  5002. @endverbatim
  5003. * =============================================================================
  5004. */
  5005. static inline void CSL_SRIO_GetMulticastEventParticipant
  5006. (
  5007. CSL_SrioHandle hSrio,
  5008. Uint8 portNum,
  5009. Uint8* multicastEvent
  5010. )
  5011. {
  5012. *multicastEvent = CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_MULT_CS);
  5013. }
  5014. /** ============================================================================
  5015. * @n@b CSL_SRIO_SetMulticastEventParticipant
  5016. *
  5017. * @b Description
  5018. * @n The function is used to set the Multicast Event Participant status for the
  5019. * specific port.
  5020. *
  5021. * @b Arguments
  5022. @verbatim
  5023. hSrio Handle of the SRIO device
  5024. portNum SRIO Port Number
  5025. multicastEvent Multicast Event Participant status to be configured
  5026. @endverbatim
  5027. *
  5028. * <b> Return Value </b>
  5029. * @n None
  5030. *
  5031. * <b> Pre Condition </b>
  5032. * @n CSL_SRIO_Open() must be called
  5033. *
  5034. * <b> Post Condition </b>
  5035. * @n None
  5036. *
  5037. * @b Writes
  5038. * @n SRIO_RIO_SP_CTL_MULT_CS
  5039. *
  5040. * @b Example
  5041. * @verbatim
  5042. CSL_SrioHandle hSrio;
  5043. // Open the CSL SRIO Module 0
  5044. hSrio = CSL_SRIO_Open (0);
  5045. // Set the Multicast Event Participant status for Port 1
  5046. CSL_SRIO_SetMulticastEventParticipant(hSrio, 1, 1);
  5047. ...
  5048. @endverbatim
  5049. * =============================================================================
  5050. */
  5051. static inline void CSL_SRIO_SetMulticastEventParticipant
  5052. (
  5053. CSL_SrioHandle hSrio,
  5054. Uint8 portNum,
  5055. Uint8 multicastEvent
  5056. )
  5057. {
  5058. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_MULT_CS, multicastEvent);
  5059. }
  5060. /** ============================================================================
  5061. * @n@b CSL_SRIO_EnablePortFlowControl
  5062. *
  5063. * @b Description
  5064. * @n The function is used to enable the port flow control
  5065. *
  5066. * @b Arguments
  5067. @verbatim
  5068. hSrio Handle of the SRIO device
  5069. portNum SRIO Port Number
  5070. @endverbatim
  5071. *
  5072. * <b> Return Value </b>
  5073. * @n None
  5074. *
  5075. * <b> Pre Condition </b>
  5076. * @n CSL_SRIO_Open() must be called
  5077. *
  5078. * <b> Post Condition </b>
  5079. * @n None
  5080. *
  5081. * @b Writes
  5082. * @n SRIO_RIO_SP_CTL_FLOW_CTRL=1
  5083. *
  5084. * @b Example
  5085. * @verbatim
  5086. CSL_SrioHandle hSrio;
  5087. // Open the CSL SRIO Module 0
  5088. hSrio = CSL_SRIO_Open (0);
  5089. // Enable flow control for port 1
  5090. CSL_SRIO_EnablePortFlowControl(hSrio, 1);
  5091. ...
  5092. @endverbatim
  5093. * =============================================================================
  5094. */
  5095. static inline void CSL_SRIO_EnablePortFlowControl
  5096. (
  5097. CSL_SrioHandle hSrio,
  5098. Uint8 portNum
  5099. )
  5100. {
  5101. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_FLOW_CTRL, 1);
  5102. }
  5103. /** ============================================================================
  5104. * @n@b CSL_SRIO_DisablePortFlowControl
  5105. *
  5106. * @b Description
  5107. * @n The function is used to disable the port flow control
  5108. *
  5109. * @b Arguments
  5110. @verbatim
  5111. hSrio Handle of the SRIO device
  5112. portNum SRIO Port Number
  5113. @endverbatim
  5114. *
  5115. * <b> Return Value </b>
  5116. * @n None
  5117. *
  5118. * <b> Pre Condition </b>
  5119. * @n CSL_SRIO_Open() must be called
  5120. *
  5121. * <b> Post Condition </b>
  5122. * @n None
  5123. *
  5124. * @b Writes
  5125. * @n SRIO_RIO_SP_CTL_FLOW_CTRL=0
  5126. *
  5127. * @b Example
  5128. * @verbatim
  5129. CSL_SrioHandle hSrio;
  5130. // Open the CSL SRIO Module 0
  5131. hSrio = CSL_SRIO_Open (0);
  5132. // Disable flow control for port 1
  5133. CSL_SRIO_DisablePortFlowControl(hSrio, 1);
  5134. ...
  5135. @endverbatim
  5136. * =============================================================================
  5137. */
  5138. static inline void CSL_SRIO_DisablePortFlowControl
  5139. (
  5140. CSL_SrioHandle hSrio,
  5141. Uint8 portNum
  5142. )
  5143. {
  5144. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_FLOW_CTRL, 0);
  5145. }
  5146. /** ============================================================================
  5147. * @n@b CSL_SRIO_IsPortFlowControlEnabled
  5148. *
  5149. * @b Description
  5150. * @n The function is used to check if the flow control on the specific port
  5151. * is enabled or not?
  5152. *
  5153. * @b Arguments
  5154. @verbatim
  5155. hSrio Handle of the SRIO device
  5156. portNum SRIO Port Number
  5157. @endverbatim
  5158. *
  5159. * <b> Return Value </b>
  5160. * @n TRUE - Flow Control is enabled
  5161. * @n FALSE - Flow Control is disabled
  5162. *
  5163. * <b> Pre Condition </b>
  5164. * @n CSL_SRIO_Open() must be called
  5165. *
  5166. * <b> Post Condition </b>
  5167. * @n None
  5168. *
  5169. * @b Reads
  5170. * @n SRIO_RIO_SP_CTL_FLOW_CTRL
  5171. *
  5172. * @b Example
  5173. * @verbatim
  5174. CSL_SrioHandle hSrio;
  5175. // Open the CSL SRIO Module 0
  5176. hSrio = CSL_SRIO_Open (0);
  5177. // Check if flow control for port 1 is enabled or not?
  5178. if (CSL_SRIO_IsPortFlowControlEnabled(hSrio, 1) == TRUE)
  5179. {
  5180. // Port1 flow control is enabled
  5181. }
  5182. else
  5183. {
  5184. // Port1 flow control is disabled
  5185. }
  5186. ...
  5187. @endverbatim
  5188. * =============================================================================
  5189. */
  5190. static inline Bool CSL_SRIO_IsPortFlowControlEnabled
  5191. (
  5192. CSL_SrioHandle hSrio,
  5193. Uint8 portNum
  5194. )
  5195. {
  5196. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_FLOW_CTRL) == 1)
  5197. return TRUE;
  5198. return FALSE;
  5199. }
  5200. /** ============================================================================
  5201. * @n@b CSL_SRIO_EnablePortFlowArbiteration
  5202. *
  5203. * @b Description
  5204. * @n The function is used to enable the port flow arbiteration
  5205. *
  5206. * @b Arguments
  5207. @verbatim
  5208. hSrio Handle of the SRIO device
  5209. portNum SRIO Port Number
  5210. @endverbatim
  5211. *
  5212. * <b> Return Value </b>
  5213. * @n None
  5214. *
  5215. * <b> Pre Condition </b>
  5216. * @n CSL_SRIO_Open() must be called
  5217. *
  5218. * <b> Post Condition </b>
  5219. * @n None
  5220. *
  5221. * @b Writes
  5222. * @n SRIO_RIO_SP_CTL_FLOW_ARB=1
  5223. *
  5224. * @b Example
  5225. * @verbatim
  5226. CSL_SrioHandle hSrio;
  5227. // Open the CSL SRIO Module 0
  5228. hSrio = CSL_SRIO_Open (0);
  5229. // Enable flow arbiteration for port 1
  5230. CSL_SRIO_EnablePortFlowArbiteration(hSrio, 1);
  5231. ...
  5232. @endverbatim
  5233. * =============================================================================
  5234. */
  5235. static inline void CSL_SRIO_EnablePortFlowArbiteration
  5236. (
  5237. CSL_SrioHandle hSrio,
  5238. Uint8 portNum
  5239. )
  5240. {
  5241. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_FLOW_ARB, 1);
  5242. }
  5243. /** ============================================================================
  5244. * @n@b CSL_SRIO_DisablePortFlowArbiteration
  5245. *
  5246. * @b Description
  5247. * @n The function is used to disable the port flow arbiteration
  5248. *
  5249. * @b Arguments
  5250. @verbatim
  5251. hSrio Handle of the SRIO device
  5252. portNum SRIO Port Number
  5253. @endverbatim
  5254. *
  5255. * <b> Return Value </b>
  5256. * @n None
  5257. *
  5258. * <b> Pre Condition </b>
  5259. * @n CSL_SRIO_Open() must be called
  5260. *
  5261. * <b> Post Condition </b>
  5262. * @n None
  5263. *
  5264. * @b Writes
  5265. * @n SRIO_RIO_SP_CTL_FLOW_ARB=0
  5266. *
  5267. * @b Example
  5268. * @verbatim
  5269. CSL_SrioHandle hSrio;
  5270. // Open the CSL SRIO Module 0
  5271. hSrio = CSL_SRIO_Open (0);
  5272. // Disable flow arbiteration for port 1
  5273. CSL_SRIO_DisablePortFlowArbiteration(hSrio, 1);
  5274. ...
  5275. @endverbatim
  5276. * =============================================================================
  5277. */
  5278. static inline void CSL_SRIO_DisablePortFlowArbiteration
  5279. (
  5280. CSL_SrioHandle hSrio,
  5281. Uint8 portNum
  5282. )
  5283. {
  5284. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_FLOW_ARB, 0);
  5285. }
  5286. /** ============================================================================
  5287. * @n@b CSL_SRIO_IsPortFlowArbiterationEnabled
  5288. *
  5289. * @b Description
  5290. * @n The function is used to check if the flow arbiteration on the specific port
  5291. * is enabled or not?
  5292. *
  5293. * @b Arguments
  5294. @verbatim
  5295. hSrio Handle of the SRIO device
  5296. portNum SRIO Port Number
  5297. @endverbatim
  5298. *
  5299. * <b> Return Value </b>
  5300. * @n TRUE - Flow Arbiteration is enabled
  5301. * @n FALSE - Flow Arbiteration is disabled
  5302. *
  5303. * <b> Pre Condition </b>
  5304. * @n CSL_SRIO_Open() must be called
  5305. *
  5306. * <b> Post Condition </b>
  5307. * @n None
  5308. *
  5309. * @b Reads
  5310. * @n SRIO_RIO_SP_CTL_FLOW_ARB
  5311. *
  5312. * @b Example
  5313. * @verbatim
  5314. CSL_SrioHandle hSrio;
  5315. // Open the CSL SRIO Module 0
  5316. hSrio = CSL_SRIO_Open (0);
  5317. // Check if flow arbiteration for port 1 is enabled or not?
  5318. if (CSL_SRIO_IsPortFlowArbiterationEnabled(hSrio, 1) == TRUE)
  5319. {
  5320. // Port1 flow arbiteration is enabled
  5321. }
  5322. else
  5323. {
  5324. // Port1 flow arbiteration is disabled
  5325. }
  5326. ...
  5327. @endverbatim
  5328. * =============================================================================
  5329. */
  5330. static inline Bool CSL_SRIO_IsPortFlowArbiterationEnabled
  5331. (
  5332. CSL_SrioHandle hSrio,
  5333. Uint8 portNum
  5334. )
  5335. {
  5336. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_FLOW_ARB) == 1)
  5337. return TRUE;
  5338. return FALSE;
  5339. }
  5340. /** ============================================================================
  5341. * @n@b CSL_SRIO_EnablePortStopFail
  5342. *
  5343. * @b Description
  5344. * @n The function is used to enable the port stop fail
  5345. *
  5346. * @b Arguments
  5347. @verbatim
  5348. hSrio Handle of the SRIO device
  5349. portNum SRIO Port Number
  5350. @endverbatim
  5351. *
  5352. * <b> Return Value </b>
  5353. * @n None
  5354. *
  5355. * <b> Pre Condition </b>
  5356. * @n CSL_SRIO_Open() must be called
  5357. *
  5358. * <b> Post Condition </b>
  5359. * @n None
  5360. *
  5361. * @b Writes
  5362. * @n SRIO_RIO_SP_CTL_STOP_FAIL_EN=1
  5363. *
  5364. * @b Example
  5365. * @verbatim
  5366. CSL_SrioHandle hSrio;
  5367. // Open the CSL SRIO Module 0
  5368. hSrio = CSL_SRIO_Open (0);
  5369. // Enable stop fail for port 1
  5370. CSL_SRIO_EnablePortStopFail(hSrio, 1);
  5371. ...
  5372. @endverbatim
  5373. * =============================================================================
  5374. */
  5375. static inline void CSL_SRIO_EnablePortStopFail
  5376. (
  5377. CSL_SrioHandle hSrio,
  5378. Uint8 portNum
  5379. )
  5380. {
  5381. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_STOP_FAIL_EN, 1);
  5382. }
  5383. /** ============================================================================
  5384. * @n@b CSL_SRIO_DisablePortStopFail
  5385. *
  5386. * @b Description
  5387. * @n The function is used to disable the port stop fail
  5388. *
  5389. * @b Arguments
  5390. @verbatim
  5391. hSrio Handle of the SRIO device
  5392. portNum SRIO Port Number
  5393. @endverbatim
  5394. *
  5395. * <b> Return Value </b>
  5396. * @n None
  5397. *
  5398. * <b> Pre Condition </b>
  5399. * @n CSL_SRIO_Open() must be called
  5400. *
  5401. * <b> Post Condition </b>
  5402. * @n None
  5403. *
  5404. * @b Writes
  5405. * @n SRIO_RIO_SP_CTL_STOP_FAIL_EN=0
  5406. *
  5407. * @b Example
  5408. * @verbatim
  5409. CSL_SrioHandle hSrio;
  5410. // Open the CSL SRIO Module 0
  5411. hSrio = CSL_SRIO_Open (0);
  5412. // Disable stop fail for port 1
  5413. CSL_SRIO_DisablePortStopFail(hSrio, 1);
  5414. ...
  5415. @endverbatim
  5416. * =============================================================================
  5417. */
  5418. static inline void CSL_SRIO_DisablePortStopFail
  5419. (
  5420. CSL_SrioHandle hSrio,
  5421. Uint8 portNum
  5422. )
  5423. {
  5424. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_STOP_FAIL_EN, 0);
  5425. }
  5426. /** ============================================================================
  5427. * @n@b CSL_SRIO_IsPortStopFailEnabled
  5428. *
  5429. * @b Description
  5430. * @n The function is used to check if the port stop failed is enabled or not?
  5431. *
  5432. * @b Arguments
  5433. @verbatim
  5434. hSrio Handle of the SRIO device
  5435. portNum SRIO Port Number
  5436. @endverbatim
  5437. *
  5438. * <b> Return Value </b>
  5439. * @n TRUE - Stop flow is enabled
  5440. * @n FALSE - Stop flow is disabled
  5441. *
  5442. * <b> Pre Condition </b>
  5443. * @n CSL_SRIO_Open() must be called
  5444. *
  5445. * <b> Post Condition </b>
  5446. * @n None
  5447. *
  5448. * @b Reads
  5449. * @n SRIO_RIO_SP_CTL_STOP_FAIL_EN
  5450. *
  5451. * @b Example
  5452. * @verbatim
  5453. CSL_SrioHandle hSrio;
  5454. // Open the CSL SRIO Module 0
  5455. hSrio = CSL_SRIO_Open (0);
  5456. // Check if stop fail for port 1 is enabled or not?
  5457. if (CSL_SRIO_IsPortStopFailEnabled(hSrio, 1) == TRUE)
  5458. {
  5459. // Port1 stop fail is enabled
  5460. }
  5461. else
  5462. {
  5463. // Port1 stop fail is disabled
  5464. }
  5465. ...
  5466. @endverbatim
  5467. * =============================================================================
  5468. */
  5469. static inline Bool CSL_SRIO_IsPortStopFailEnabled
  5470. (
  5471. CSL_SrioHandle hSrio,
  5472. Uint8 portNum
  5473. )
  5474. {
  5475. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_STOP_FAIL_EN) == 1)
  5476. return TRUE;
  5477. return FALSE;
  5478. }
  5479. /** ============================================================================
  5480. * @n@b CSL_SRIO_EnablePortDrop
  5481. *
  5482. * @b Description
  5483. * @n The function is used to enable the port drop
  5484. *
  5485. * @b Arguments
  5486. @verbatim
  5487. hSrio Handle of the SRIO device
  5488. portNum SRIO Port Number
  5489. @endverbatim
  5490. *
  5491. * <b> Return Value </b>
  5492. * @n None
  5493. *
  5494. * <b> Pre Condition </b>
  5495. * @n CSL_SRIO_Open() must be called
  5496. *
  5497. * <b> Post Condition </b>
  5498. * @n None
  5499. *
  5500. * @b Writes
  5501. * @n SRIO_RIO_SP_CTL_DROP_EN=1
  5502. *
  5503. * @b Example
  5504. * @verbatim
  5505. CSL_SrioHandle hSrio;
  5506. // Open the CSL SRIO Module 0
  5507. hSrio = CSL_SRIO_Open (0);
  5508. // Enable drop for port 1
  5509. CSL_SRIO_EnablePortDrop(hSrio, 1);
  5510. ...
  5511. @endverbatim
  5512. * =============================================================================
  5513. */
  5514. static inline void CSL_SRIO_EnablePortDrop
  5515. (
  5516. CSL_SrioHandle hSrio,
  5517. Uint8 portNum
  5518. )
  5519. {
  5520. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_DROP_EN, 1);
  5521. }
  5522. /** ============================================================================
  5523. * @n@b CSL_SRIO_DisablePortDrop
  5524. *
  5525. * @b Description
  5526. * @n The function is used to disable the port drop
  5527. *
  5528. * @b Arguments
  5529. @verbatim
  5530. hSrio Handle of the SRIO device
  5531. portNum SRIO Port Number
  5532. @endverbatim
  5533. *
  5534. * <b> Return Value </b>
  5535. * @n None
  5536. *
  5537. * <b> Pre Condition </b>
  5538. * @n CSL_SRIO_Open() must be called
  5539. *
  5540. * <b> Post Condition </b>
  5541. * @n None
  5542. *
  5543. * @b Writes
  5544. * @n SRIO_RIO_SP_CTL_DROP_EN=0
  5545. *
  5546. * @b Example
  5547. * @verbatim
  5548. CSL_SrioHandle hSrio;
  5549. // Open the CSL SRIO Module 0
  5550. hSrio = CSL_SRIO_Open (0);
  5551. // Disable drop for port 1
  5552. CSL_SRIO_DisablePortDrop(hSrio, 1);
  5553. ...
  5554. @endverbatim
  5555. * =============================================================================
  5556. */
  5557. static inline void CSL_SRIO_DisablePortDrop
  5558. (
  5559. CSL_SrioHandle hSrio,
  5560. Uint8 portNum
  5561. )
  5562. {
  5563. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_DROP_EN, 0);
  5564. }
  5565. /** ============================================================================
  5566. * @n@b CSL_SRIO_IsPortDropEnabled
  5567. *
  5568. * @b Description
  5569. * @n The function is used to check if the port drop is enabled or not?
  5570. *
  5571. * @b Arguments
  5572. @verbatim
  5573. hSrio Handle of the SRIO device
  5574. portNum SRIO Port Number
  5575. @endverbatim
  5576. *
  5577. * <b> Return Value </b>
  5578. * @n TRUE - Port drop is enabled
  5579. * @n FALSE - Port drop is disabled
  5580. *
  5581. * <b> Pre Condition </b>
  5582. * @n CSL_SRIO_Open() must be called
  5583. *
  5584. * <b> Post Condition </b>
  5585. * @n None
  5586. *
  5587. * @b Reads
  5588. * @n SRIO_RIO_SP_CTL_DROP_EN
  5589. *
  5590. * @b Example
  5591. * @verbatim
  5592. CSL_SrioHandle hSrio;
  5593. // Open the CSL SRIO Module 0
  5594. hSrio = CSL_SRIO_Open (0);
  5595. // Check if stop fail for port 1 is enabled or not?
  5596. if (CSL_SRIO_IsPortDropEnabled(hSrio, 1) == TRUE)
  5597. {
  5598. // Port1 drop is enabled
  5599. }
  5600. else
  5601. {
  5602. // Port1 drop is disabled
  5603. }
  5604. ...
  5605. @endverbatim
  5606. * =============================================================================
  5607. */
  5608. static inline Bool CSL_SRIO_IsPortDropEnabled
  5609. (
  5610. CSL_SrioHandle hSrio,
  5611. Uint8 portNum
  5612. )
  5613. {
  5614. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_DROP_EN) == 1)
  5615. return TRUE;
  5616. return FALSE;
  5617. }
  5618. /** ============================================================================
  5619. * @n@b CSL_SRIO_EnablePortLockout
  5620. *
  5621. * @b Description
  5622. * @n The function is used to enable the port lockout
  5623. *
  5624. * @b Arguments
  5625. @verbatim
  5626. hSrio Handle of the SRIO device
  5627. portNum SRIO Port Number
  5628. @endverbatim
  5629. *
  5630. * <b> Return Value </b>
  5631. * @n None
  5632. *
  5633. * <b> Pre Condition </b>
  5634. * @n CSL_SRIO_Open() must be called
  5635. *
  5636. * <b> Post Condition </b>
  5637. * @n None
  5638. *
  5639. * @b Writes
  5640. * @n SRIO_RIO_SP_CTL_PORT_LOCKOUT=1
  5641. *
  5642. * @b Example
  5643. * @verbatim
  5644. CSL_SrioHandle hSrio;
  5645. // Open the CSL SRIO Module 0
  5646. hSrio = CSL_SRIO_Open (0);
  5647. // Enable port lockout for port 1
  5648. CSL_SRIO_EnablePortLockout(hSrio, 1);
  5649. ...
  5650. @endverbatim
  5651. * =============================================================================
  5652. */
  5653. static inline void CSL_SRIO_EnablePortLockout
  5654. (
  5655. CSL_SrioHandle hSrio,
  5656. Uint8 portNum
  5657. )
  5658. {
  5659. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_PORT_LOCKOUT, 1);
  5660. }
  5661. /** ============================================================================
  5662. * @n@b CSL_SRIO_DisablePortLockout
  5663. *
  5664. * @b Description
  5665. * @n The function is used to disable the port lockout
  5666. *
  5667. * @b Arguments
  5668. @verbatim
  5669. hSrio Handle of the SRIO device
  5670. portNum SRIO Port Number
  5671. @endverbatim
  5672. *
  5673. * <b> Return Value </b>
  5674. * @n None
  5675. *
  5676. * <b> Pre Condition </b>
  5677. * @n CSL_SRIO_Open() must be called
  5678. *
  5679. * <b> Post Condition </b>
  5680. * @n None
  5681. *
  5682. * @b Writes
  5683. * @n SRIO_RIO_SP_CTL_PORT_LOCKOUT=0
  5684. *
  5685. * @b Example
  5686. * @verbatim
  5687. CSL_SrioHandle hSrio;
  5688. // Open the CSL SRIO Module 0
  5689. hSrio = CSL_SRIO_Open (0);
  5690. // Disable port lockout for port 1
  5691. CSL_SRIO_DisablePortLockout(hSrio, 1);
  5692. ...
  5693. @endverbatim
  5694. * =============================================================================
  5695. */
  5696. static inline void CSL_SRIO_DisablePortLockout
  5697. (
  5698. CSL_SrioHandle hSrio,
  5699. Uint8 portNum
  5700. )
  5701. {
  5702. CSL_FINS(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_PORT_LOCKOUT, 0);
  5703. }
  5704. /** ============================================================================
  5705. * @n@b CSL_SRIO_IsPortLockedout
  5706. *
  5707. * @b Description
  5708. * @n The function is used to check if the port is locked out or not?
  5709. *
  5710. * @b Arguments
  5711. @verbatim
  5712. hSrio Handle of the SRIO device
  5713. portNum SRIO Port Number
  5714. @endverbatim
  5715. *
  5716. * <b> Return Value </b>
  5717. * @n TRUE - Port is Locked out
  5718. * @n FALSE - Port is NOT Locked out
  5719. *
  5720. * <b> Pre Condition </b>
  5721. * @n CSL_SRIO_Open() must be called
  5722. *
  5723. * <b> Post Condition </b>
  5724. * @n None
  5725. *
  5726. * @b Reads
  5727. * @n SRIO_RIO_SP_CTL_PORT_LOCKOUT
  5728. *
  5729. * @b Example
  5730. * @verbatim
  5731. CSL_SrioHandle hSrio;
  5732. // Open the CSL SRIO Module 0
  5733. hSrio = CSL_SRIO_Open (0);
  5734. // Check if port 1 is locked out or not?
  5735. if (CSL_SRIO_IsPortLockedout(hSrio, 1) == TRUE)
  5736. {
  5737. // Port1 is locked out
  5738. }
  5739. else
  5740. {
  5741. // Port1 is NOT locked out
  5742. }
  5743. ...
  5744. @endverbatim
  5745. * =============================================================================
  5746. */
  5747. static inline Bool CSL_SRIO_IsPortLockedout
  5748. (
  5749. CSL_SrioHandle hSrio,
  5750. Uint8 portNum
  5751. )
  5752. {
  5753. if (CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_PORT_LOCKOUT) == 1)
  5754. return TRUE;
  5755. return FALSE;
  5756. }
  5757. /** ============================================================================
  5758. * @n@b CSL_SRIO_GetPortType
  5759. *
  5760. * @b Description
  5761. * @n The function is used to get the port type.
  5762. *
  5763. * @b Arguments
  5764. @verbatim
  5765. hSrio Handle of the SRIO device
  5766. portNum SRIO Port Number
  5767. portType Port Type populated by this API
  5768. @endverbatim
  5769. *
  5770. * <b> Return Value </b>
  5771. * @n None
  5772. *
  5773. * <b> Pre Condition </b>
  5774. * @n CSL_SRIO_Open() must be called
  5775. *
  5776. * <b> Post Condition </b>
  5777. * @n None
  5778. *
  5779. * @b Reads
  5780. * @n SRIO_RIO_SP_CTL_PTYP
  5781. *
  5782. * @b Example
  5783. * @verbatim
  5784. CSL_SrioHandle hSrio;
  5785. Uint8 portType;
  5786. // Open the CSL SRIO Module 0
  5787. hSrio = CSL_SRIO_Open (0);
  5788. // Disable port lockout for port 1
  5789. CSL_SRIO_GetPortType(hSrio, 1, &portType);
  5790. ...
  5791. @endverbatim
  5792. * =============================================================================
  5793. */
  5794. static inline void CSL_SRIO_GetPortType
  5795. (
  5796. CSL_SrioHandle hSrio,
  5797. Uint8 portNum,
  5798. Uint8* portType
  5799. )
  5800. {
  5801. *portType = CSL_FEXT(hSrio->RIO_SP[portNum].RIO_SP_CTL, SRIO_RIO_SP_CTL_PTYP);
  5802. }
  5803. /** ============================================================================
  5804. * @n@b CSL_SRIO_GetErrorReportBlockHeader
  5805. *
  5806. * @b Description
  5807. * @n The function is used to get the error report block header information
  5808. *
  5809. * @b Arguments
  5810. @verbatim
  5811. hSrio Handle of the SRIO device
  5812. efPtr Extended Feature Pointer populated by this API
  5813. efId Extended Feature ID populated by this API
  5814. @endverbatim
  5815. *
  5816. * <b> Return Value </b>
  5817. * @n None
  5818. *
  5819. * <b> Pre Condition </b>
  5820. * @n CSL_SRIO_Open() must be called
  5821. *
  5822. * <b> Post Condition </b>
  5823. * @n None
  5824. *
  5825. * @b Reads
  5826. * @n SRIO_RIO_ERR_RPT_BH_EF_PTR,SRIO_RIO_ERR_RPT_BH_EF_ID
  5827. *
  5828. * @b Example
  5829. * @verbatim
  5830. CSL_SrioHandle hSrio;
  5831. Uint16 efPtr;
  5832. Uint16 efId;
  5833. // Open the CSL SRIO Module 0
  5834. hSrio = CSL_SRIO_Open (0);
  5835. // Get the Error reporting block header information
  5836. CSL_SRIO_GetErrorReportBlockHeader(hSrio, &efPtr, &efId);
  5837. ...
  5838. @endverbatim
  5839. * =============================================================================
  5840. */
  5841. static inline void CSL_SRIO_GetErrorReportBlockHeader
  5842. (
  5843. CSL_SrioHandle hSrio,
  5844. Uint16* efPtr,
  5845. Uint16* efId
  5846. )
  5847. {
  5848. Uint32 value = hSrio->RIO_ERR_RPT_BH;
  5849. *efPtr = CSL_FEXT(value, SRIO_RIO_ERR_RPT_BH_EF_PTR);
  5850. *efId = CSL_FEXT(value, SRIO_RIO_ERR_RPT_BH_EF_ID);
  5851. }
  5852. /** ============================================================================
  5853. * @n@b CSL_SRIO_GetErrorDetectCSR
  5854. *
  5855. * @b Description
  5856. * @n The function is used to get the error detected CSR information
  5857. *
  5858. * @b Arguments
  5859. @verbatim
  5860. hSrio Handle of the SRIO device
  5861. errDetect Error Detect Information populated by this API
  5862. @endverbatim
  5863. *
  5864. * <b> Return Value </b>
  5865. * @n None
  5866. *
  5867. * <b> Pre Condition </b>
  5868. * @n CSL_SRIO_Open() must be called
  5869. *
  5870. * <b> Post Condition </b>
  5871. * @n None
  5872. *
  5873. * @b Reads
  5874. * @n SRIO_RIO_ERR_DET
  5875. *
  5876. * @b Example
  5877. * @verbatim
  5878. CSL_SrioHandle hSrio;
  5879. Uint32 errDetect;
  5880. // Open the CSL SRIO Module 0
  5881. hSrio = CSL_SRIO_Open (0);
  5882. // Get the error detect information
  5883. CSL_SRIO_GetErrorDetectCSR(hSrio, &errDetect);
  5884. ...
  5885. @endverbatim
  5886. * =============================================================================
  5887. */
  5888. static inline void CSL_SRIO_GetErrorDetectCSR
  5889. (
  5890. CSL_SrioHandle hSrio,
  5891. Uint32* errDetect
  5892. )
  5893. {
  5894. *errDetect = hSrio->RIO_ERR_DET;
  5895. }
  5896. /** ============================================================================
  5897. * @n@b CSL_SRIO_SetErrorDetectCSR
  5898. *
  5899. * @b Description
  5900. * @n The function is used to set the error detected CSR information
  5901. *
  5902. * @b Arguments
  5903. @verbatim
  5904. hSrio Handle of the SRIO device
  5905. errDetect Error Detect Information to be cleared
  5906. @endverbatim
  5907. *
  5908. * <b> Return Value </b>
  5909. * @n None
  5910. *
  5911. * <b> Pre Condition </b>
  5912. * @n CSL_SRIO_Open() must be called
  5913. *
  5914. * <b> Post Condition </b>
  5915. * @n None
  5916. *
  5917. * @b Writes
  5918. * @n SRIO_RIO_ERR_DET
  5919. *
  5920. * @b Example
  5921. * @verbatim
  5922. CSL_SrioHandle hSrio;
  5923. Uint32 errDetect;
  5924. // Open the CSL SRIO Module 0
  5925. hSrio = CSL_SRIO_Open (0);
  5926. // Get the error detect information
  5927. CSL_SRIO_GetErrorDetectCSR(hSrio, &errDetect);
  5928. ...
  5929. // Clear the error detect informatio
  5930. CSL_SRIO_SetErrorDetectCSR(hSrio, errDetect);
  5931. ...
  5932. @endverbatim
  5933. * =============================================================================
  5934. */
  5935. static inline void CSL_SRIO_SetErrorDetectCSR
  5936. (
  5937. CSL_SrioHandle hSrio,
  5938. Uint32 errDetect
  5939. )
  5940. {
  5941. hSrio->RIO_ERR_DET = errDetect;
  5942. }
  5943. /** ============================================================================
  5944. * @n@b CSL_SRIO_GetErrorEnable
  5945. *
  5946. * @b Description
  5947. * @n The function is used to get the error enable status
  5948. *
  5949. * @b Arguments
  5950. @verbatim
  5951. hSrio Handle of the SRIO device
  5952. errEnable Error Enable Status populated by this API
  5953. @endverbatim
  5954. *
  5955. * <b> Return Value </b>
  5956. * @n None
  5957. *
  5958. * <b> Pre Condition </b>
  5959. * @n CSL_SRIO_Open() must be called
  5960. *
  5961. * <b> Post Condition </b>
  5962. * @n None
  5963. *
  5964. * @b Reads
  5965. * @n SRIO_RIO_ERR_EN
  5966. *
  5967. * @b Example
  5968. * @verbatim
  5969. CSL_SrioHandle hSrio;
  5970. Uint32 errEnable;
  5971. // Open the CSL SRIO Module 0
  5972. hSrio = CSL_SRIO_Open (0);
  5973. // Get the error enable status information
  5974. CSL_SRIO_GetErrorEnable(hSrio, &errEnable);
  5975. ...
  5976. @endverbatim
  5977. * =============================================================================
  5978. */
  5979. static inline void CSL_SRIO_GetErrorEnable
  5980. (
  5981. CSL_SrioHandle hSrio,
  5982. Uint32* errEnable
  5983. )
  5984. {
  5985. *errEnable = hSrio->RIO_ERR_EN;
  5986. }
  5987. /** ============================================================================
  5988. * @n@b CSL_SRIO_SetErrorEnable
  5989. *
  5990. * @b Description
  5991. * @n The function is used to set the error enable status
  5992. *
  5993. * @b Arguments
  5994. @verbatim
  5995. hSrio Handle of the SRIO device
  5996. errEnable Error Enable Status populated by this API
  5997. @endverbatim
  5998. *
  5999. * <b> Return Value </b>
  6000. * @n None
  6001. *
  6002. * <b> Pre Condition </b>
  6003. * @n CSL_SRIO_Open() must be called
  6004. *
  6005. * <b> Post Condition </b>
  6006. * @n None
  6007. *
  6008. * @b Writes
  6009. * @n SRIO_RIO_ERR_EN
  6010. *
  6011. * @b Example
  6012. * @verbatim
  6013. CSL_SrioHandle hSrio;
  6014. Uint32 errEnable;
  6015. // Open the CSL SRIO Module 0
  6016. hSrio = CSL_SRIO_Open (0);
  6017. // Get the error enable status information
  6018. CSL_SRIO_GetErrorEnable(hSrio, &errEnable);
  6019. // Ensure that IO Error response is enabled
  6020. errEnable = errEnable | 0x80000000;
  6021. CSL_SRIO_SetErrorEnable(hSrio, errEnable);
  6022. ...
  6023. @endverbatim
  6024. * =============================================================================
  6025. */
  6026. static inline void CSL_SRIO_SetErrorEnable
  6027. (
  6028. CSL_SrioHandle hSrio,
  6029. Uint32 errEnable
  6030. )
  6031. {
  6032. hSrio->RIO_ERR_EN = errEnable;
  6033. }
  6034. /** ============================================================================
  6035. * @n@b CSL_SRIO_GetHighAddressCapture
  6036. *
  6037. * @b Description
  6038. * @n The function is used to get the MSB 32 bits of the address which
  6039. * caused the error
  6040. *
  6041. * @b Arguments
  6042. @verbatim
  6043. hSrio Handle of the SRIO device
  6044. hiAddress High Address populated by this API
  6045. @endverbatim
  6046. *
  6047. * <b> Return Value </b>
  6048. * @n None
  6049. *
  6050. * <b> Pre Condition </b>
  6051. * @n CSL_SRIO_Open() must be called
  6052. *
  6053. * <b> Post Condition </b>
  6054. * @n None
  6055. *
  6056. * @b Reads
  6057. * @n SRIO_RIO_H_ADDR_CAPT
  6058. *
  6059. * @b Example
  6060. * @verbatim
  6061. CSL_SrioHandle hSrio;
  6062. Uint32 hiAddress;
  6063. // Open the CSL SRIO Module 0
  6064. hSrio = CSL_SRIO_Open (0);
  6065. // Get the high address information
  6066. CSL_SRIO_GetHighAddressCapture(hSrio, &hiAddress);
  6067. ...
  6068. @endverbatim
  6069. * =============================================================================
  6070. */
  6071. static inline void CSL_SRIO_GetHighAddressCapture
  6072. (
  6073. CSL_SrioHandle hSrio,
  6074. Uint32* hiAddress
  6075. )
  6076. {
  6077. *hiAddress = hSrio->RIO_H_ADDR_CAPT;
  6078. }
  6079. /** ============================================================================
  6080. * @n@b CSL_SRIO_SetHighAddressCapture
  6081. *
  6082. * @b Description
  6083. * @n The function is used to set the MSB 32 bits of the address which
  6084. * caused the error
  6085. *
  6086. * @b Arguments
  6087. @verbatim
  6088. hSrio Handle of the SRIO device
  6089. hiAddress High Address to be configured
  6090. @endverbatim
  6091. *
  6092. * <b> Return Value </b>
  6093. * @n None
  6094. *
  6095. * <b> Pre Condition </b>
  6096. * @n CSL_SRIO_Open() must be called
  6097. *
  6098. * <b> Post Condition </b>
  6099. * @n None
  6100. *
  6101. * @b Writes
  6102. * @n SRIO_RIO_H_ADDR_CAPT
  6103. *
  6104. * @b Example
  6105. * @verbatim
  6106. CSL_SrioHandle hSrio;
  6107. // Open the CSL SRIO Module 0
  6108. hSrio = CSL_SRIO_Open (0);
  6109. // Clear the High Address Error Capture
  6110. CSL_SRIO_SetHighAddressCapture(hSrio, 0x0);
  6111. ...
  6112. @endverbatim
  6113. * =============================================================================
  6114. */
  6115. static inline void CSL_SRIO_SetHighAddressCapture
  6116. (
  6117. CSL_SrioHandle hSrio,
  6118. Uint32 hiAddress
  6119. )
  6120. {
  6121. hSrio->RIO_H_ADDR_CAPT = hiAddress;
  6122. }
  6123. /** ============================================================================
  6124. * @n@b CSL_SRIO_GetAddressCapture
  6125. *
  6126. * @b Description
  6127. * @n The function is used to get the LSB 29 bits of the address which
  6128. * caused the error and also the extended address bits
  6129. *
  6130. * @b Arguments
  6131. @verbatim
  6132. hSrio Handle of the SRIO device
  6133. address Address populated by this API
  6134. xamsbs Extended Address Information
  6135. @endverbatim
  6136. *
  6137. * <b> Return Value </b>
  6138. * @n None
  6139. *
  6140. * <b> Pre Condition </b>
  6141. * @n CSL_SRIO_Open() must be called
  6142. *
  6143. * <b> Post Condition </b>
  6144. * @n None
  6145. *
  6146. * @b Reads
  6147. * @n SRIO_RIO_ADDR_CAPT_ADDR_LOW,SRIO_RIO_ADDR_CAPT_XAMSBS
  6148. *
  6149. * @b Example
  6150. * @verbatim
  6151. CSL_SrioHandle hSrio;
  6152. Uint32 address;
  6153. Uint8 xamsbs;
  6154. // Open the CSL SRIO Module 0
  6155. hSrio = CSL_SRIO_Open (0);
  6156. // Get the address information which caused the error
  6157. CSL_SRIO_GetAddressCapture(hSrio, &hiAddress, &xamsbs);
  6158. ...
  6159. @endverbatim
  6160. * =============================================================================
  6161. */
  6162. static inline void CSL_SRIO_GetAddressCapture
  6163. (
  6164. CSL_SrioHandle hSrio,
  6165. Uint32* address,
  6166. Uint8* xamsbs
  6167. )
  6168. {
  6169. *address = CSL_FEXT(hSrio->RIO_ADDR_CAPT, SRIO_RIO_ADDR_CAPT_ADDR_LOW);
  6170. *xamsbs = CSL_FEXT(hSrio->RIO_ADDR_CAPT, SRIO_RIO_ADDR_CAPT_XAMSBS);
  6171. }
  6172. /** ============================================================================
  6173. * @n@b CSL_SRIO_SetAddressCapture
  6174. *
  6175. * @b Description
  6176. * @n The function is used to set the LSB 29 bits of the address which
  6177. * caused the error and also the extended address bits
  6178. *
  6179. * @b Arguments
  6180. @verbatim
  6181. hSrio Handle of the SRIO device
  6182. address Address to be configured
  6183. xamsbs Extended Address Information
  6184. @endverbatim
  6185. *
  6186. * <b> Return Value </b>
  6187. * @n None
  6188. *
  6189. * <b> Pre Condition </b>
  6190. * @n CSL_SRIO_Open() must be called
  6191. *
  6192. * <b> Post Condition </b>
  6193. * @n None
  6194. *
  6195. * @b Writes
  6196. * @n SRIO_RIO_ADDR_CAPT_ADDR_LOW,SRIO_RIO_ADDR_CAPT_XAMSBS
  6197. *
  6198. * @b Example
  6199. * @verbatim
  6200. CSL_SrioHandle hSrio;
  6201. // Open the CSL SRIO Module 0
  6202. hSrio = CSL_SRIO_Open (0);
  6203. // Clear address information which caused the error
  6204. CSL_SRIO_SetAddressCapture(hSrio, 0x0, 0x0);
  6205. ...
  6206. @endverbatim
  6207. * =============================================================================
  6208. */
  6209. static inline void CSL_SRIO_SetAddressCapture
  6210. (
  6211. CSL_SrioHandle hSrio,
  6212. Uint32 address,
  6213. Uint8 xamsbs
  6214. )
  6215. {
  6216. hSrio->RIO_ADDR_CAPT = CSL_FMK(SRIO_RIO_ADDR_CAPT_ADDR_LOW, address) |
  6217. CSL_FMK(SRIO_RIO_ADDR_CAPT_XAMSBS, xamsbs);
  6218. }
  6219. /** ============================================================================
  6220. * @n@b CSL_SRIO_GetIDCapture
  6221. *
  6222. * @b Description
  6223. * @n The function is used to get the source and destination id associated
  6224. * with the error
  6225. *
  6226. * @b Arguments
  6227. @verbatim
  6228. hSrio Handle of the SRIO device
  6229. msbdstId MSB Destination ID
  6230. lsbdstID LSB Destination ID
  6231. msbsrcId MSB Source ID
  6232. lsbsrcId LSB Source ID
  6233. @endverbatim
  6234. *
  6235. * <b> Return Value </b>
  6236. * @n None
  6237. *
  6238. * <b> Pre Condition </b>
  6239. * @n CSL_SRIO_Open() must be called
  6240. *
  6241. * <b> Post Condition </b>
  6242. * @n None
  6243. *
  6244. * @b Reads
  6245. * @n SRIO_RIO_ID_CAPT_MSB_DSTID, SRIO_RIO_ID_CAPT_DSTID,
  6246. * @n SRIO_RIO_ID_CAPT_MSB_SRCTID, SRIO_RIO_ID_CAPT_SRCID
  6247. *
  6248. * @b Example
  6249. * @verbatim
  6250. CSL_SrioHandle hSrio;
  6251. Uint8 msbdstId;
  6252. Uint8 lsbdstID;
  6253. Uint8 msbsrcId;
  6254. Uint8 lsbsrcId;
  6255. // Open the CSL SRIO Module 0
  6256. hSrio = CSL_SRIO_Open (0);
  6257. // Get the address capture information which caused the error
  6258. CSL_SRIO_GetIDCapture(hSrio, &msbdstId, &lsbdstID, &msbsrcId, &lsbsrcId);
  6259. ...
  6260. @endverbatim
  6261. * =============================================================================
  6262. */
  6263. static inline void CSL_SRIO_GetIDCapture
  6264. (
  6265. CSL_SrioHandle hSrio,
  6266. Uint8* msbdstId,
  6267. Uint8* lsbdstId,
  6268. Uint8* msbsrcId,
  6269. Uint8* lsbsrcId
  6270. )
  6271. {
  6272. Uint32 value = hSrio->RIO_ID_CAPT;
  6273. *msbdstId = CSL_FEXT (value, SRIO_RIO_ID_CAPT_MSB_DSTID);
  6274. *lsbdstId = CSL_FEXT (value, SRIO_RIO_ID_CAPT_DSTID);
  6275. *msbsrcId = CSL_FEXT (value, SRIO_RIO_ID_CAPT_MSB_SRCTID);
  6276. *lsbsrcId = CSL_FEXT (value, SRIO_RIO_ID_CAPT_SRCID);
  6277. }
  6278. /** ============================================================================
  6279. * @n@b CSL_SRIO_SetIDCapture
  6280. *
  6281. * @b Description
  6282. * @n The function is used to set the source and destination id associated
  6283. * with the error
  6284. *
  6285. * @b Arguments
  6286. @verbatim
  6287. hSrio Handle of the SRIO device
  6288. msbdstId MSB Destination ID
  6289. lsbdstID LSB Destination ID
  6290. msbsrcId MSB Source ID
  6291. lsbsrcId LSB Source ID
  6292. @endverbatim
  6293. *
  6294. * <b> Return Value </b>
  6295. * @n None
  6296. *
  6297. * <b> Pre Condition </b>
  6298. * @n CSL_SRIO_Open() must be called
  6299. *
  6300. * <b> Post Condition </b>
  6301. * @n None
  6302. *
  6303. * @b Writes
  6304. * @n SRIO_RIO_ID_CAPT_MSB_DSTID, SRIO_RIO_ID_CAPT_DSTID,
  6305. * @n SRIO_RIO_ID_CAPT_MSB_SRCTID, SRIO_RIO_ID_CAPT_SRCID
  6306. *
  6307. * @b Example
  6308. * @verbatim
  6309. CSL_SrioHandle hSrio;
  6310. Uint8 msbdstId;
  6311. Uint8 lsbdstID;
  6312. Uint8 msbsrcId;
  6313. Uint8 lsbsrcId;
  6314. // Open the CSL SRIO Module 0
  6315. hSrio = CSL_SRIO_Open (0);
  6316. // Clear the address capture information
  6317. CSL_SRIO_SetIDCapture(hSrio, 0x0, 0x0, 0x0, 0x0);
  6318. ...
  6319. @endverbatim
  6320. * =============================================================================
  6321. */
  6322. static inline void CSL_SRIO_SetIDCapture
  6323. (
  6324. CSL_SrioHandle hSrio,
  6325. Uint8 msbdstId,
  6326. Uint8 lsbdstId,
  6327. Uint8 msbsrcId,
  6328. Uint8 lsbsrcId
  6329. )
  6330. {
  6331. hSrio->RIO_ID_CAPT = CSL_FMK (SRIO_RIO_ID_CAPT_MSB_DSTID, msbdstId) |
  6332. CSL_FMK (SRIO_RIO_ID_CAPT_DSTID, lsbdstId) |
  6333. CSL_FMK (SRIO_RIO_ID_CAPT_MSB_SRCTID,msbsrcId) |
  6334. CSL_FMK (SRIO_RIO_ID_CAPT_SRCID, lsbsrcId);
  6335. }
  6336. /** ============================================================================
  6337. * @n@b CSL_SRIO_GetControlCapture
  6338. *
  6339. * @b Description
  6340. * @n The function is used to get the control information associated with
  6341. * the error
  6342. *
  6343. * @b Arguments
  6344. @verbatim
  6345. hSrio Handle of the SRIO device
  6346. ftype FTPYE associated with the error
  6347. ttype TTPYE associated with the error
  6348. msgInfo Message Information associated with the error
  6349. implSpecific Implementation Specific information
  6350. @endverbatim
  6351. *
  6352. * <b> Return Value </b>
  6353. * @n None
  6354. *
  6355. * <b> Pre Condition </b>
  6356. * @n CSL_SRIO_Open() must be called
  6357. *
  6358. * <b> Post Condition </b>
  6359. * @n None
  6360. *
  6361. * @b Reads
  6362. * @n SRIO_RIO_CTRL_CAPT_FTYPE, SRIO_RIO_CTRL_CAPT_TTYPE,
  6363. * @n SRIO_RIO_CTRL_CAPT_MSG_INFO, SRIO_RIO_CTRL_CAPT_IMP_SPECIFIC
  6364. *
  6365. * @b Example
  6366. * @verbatim
  6367. CSL_SrioHandle hSrio;
  6368. Uint8 ftype;
  6369. Uint8 ttype;
  6370. Uint8 msgInfo;
  6371. Uint16 implSpecific;
  6372. // Open the CSL SRIO Module 0
  6373. hSrio = CSL_SRIO_Open (0);
  6374. // Get the control capture information which caused the error
  6375. CSL_SRIO_GetControlCapture(hSrio, &ftype, &ttype, &msgInfo, &implSpecific);
  6376. ...
  6377. @endverbatim
  6378. * =============================================================================
  6379. */
  6380. static inline void CSL_SRIO_GetControlCapture
  6381. (
  6382. CSL_SrioHandle hSrio,
  6383. Uint8* ftype,
  6384. Uint8* ttype,
  6385. Uint8* msgInfo,
  6386. Uint16* implSpecific
  6387. )
  6388. {
  6389. Uint32 value = hSrio->RIO_CTRL_CAPT;
  6390. *ftype = CSL_FEXT (value, SRIO_RIO_CTRL_CAPT_FTYPE);
  6391. *ttype = CSL_FEXT (value, SRIO_RIO_CTRL_CAPT_TTYPE);
  6392. *msgInfo = CSL_FEXT (value, SRIO_RIO_CTRL_CAPT_MSG_INFO);
  6393. *implSpecific = CSL_FEXT (value, SRIO_RIO_CTRL_CAPT_IMP_SPECIFIC);
  6394. }
  6395. /** ============================================================================
  6396. * @n@b CSL_SRIO_SetControlCapture
  6397. *
  6398. * @b Description
  6399. * @n The function is used to set the control information associated with
  6400. * the error
  6401. *
  6402. * @b Arguments
  6403. @verbatim
  6404. hSrio Handle of the SRIO device
  6405. ftype FTPYE associated with the error
  6406. ttype TTPYE associated with the error
  6407. msgInfo Message Information associated with the error
  6408. implSpecific Implementation Specific information
  6409. @endverbatim
  6410. *
  6411. * <b> Return Value </b>
  6412. * @n None
  6413. *
  6414. * <b> Pre Condition </b>
  6415. * @n CSL_SRIO_Open() must be called
  6416. *
  6417. * <b> Post Condition </b>
  6418. * @n None
  6419. *
  6420. * @b Writes
  6421. * @n SRIO_RIO_CTRL_CAPT_FTYPE, SRIO_RIO_CTRL_CAPT_TTYPE,
  6422. * @n SRIO_RIO_CTRL_CAPT_MSG_INFO, SRIO_RIO_CTRL_CAPT_IMP_SPECIFIC
  6423. *
  6424. * @b Example
  6425. * @verbatim
  6426. CSL_SrioHandle hSrio;
  6427. // Open the CSL SRIO Module 0
  6428. hSrio = CSL_SRIO_Open (0);
  6429. // Clear the control capture information which caused the error
  6430. CSL_SRIO_SetControlCapture(hSrio, 0x0, 0x0, 0x0, 0x0);
  6431. ...
  6432. @endverbatim
  6433. * =============================================================================
  6434. */
  6435. static inline void CSL_SRIO_SetControlCapture
  6436. (
  6437. CSL_SrioHandle hSrio,
  6438. Uint8 ftype,
  6439. Uint8 ttype,
  6440. Uint8 msgInfo,
  6441. Uint16 implSpecific
  6442. )
  6443. {
  6444. hSrio->RIO_CTRL_CAPT = CSL_FMK (SRIO_RIO_CTRL_CAPT_FTYPE, ftype) |
  6445. CSL_FMK (SRIO_RIO_CTRL_CAPT_TTYPE, ttype) |
  6446. CSL_FMK (SRIO_RIO_CTRL_CAPT_MSG_INFO, msgInfo) |
  6447. CSL_FMK (SRIO_RIO_CTRL_CAPT_IMP_SPECIFIC, implSpecific);
  6448. }
  6449. /** ============================================================================
  6450. * @n@b CSL_SRIO_GetPortWriteDeviceId
  6451. *
  6452. * @b Description
  6453. * @n The function is used to get the target device ID to be used when a
  6454. * device generates a Maintenance Port-Write operation to report errors to
  6455. * a system host.
  6456. *
  6457. * @b Arguments
  6458. @verbatim
  6459. hSrio Handle of the SRIO device
  6460. msbTargetId Most significant byte of Port-Write Target device ID
  6461. lsbTargetID Least significant byte of Port-Write Target device ID
  6462. lrgTrans DeviceID size to use for a port-write
  6463. @endverbatim
  6464. *
  6465. * <b> Return Value </b>
  6466. * @n None
  6467. *
  6468. * <b> Pre Condition </b>
  6469. * @n CSL_SRIO_Open() must be called
  6470. *
  6471. * <b> Post Condition </b>
  6472. * @n None
  6473. *
  6474. * @b Reads
  6475. * @n SRIO_RIO_PW_TGT_ID_DEVICEID_MSB,SRIO_RIO_PW_TGT_ID_DEVICEID,
  6476. * @n SRIO_RIO_PW_TGT_ID_ID_LARGE
  6477. *
  6478. * @b Example
  6479. * @verbatim
  6480. CSL_SrioHandle hSrio;
  6481. Uint8 msbTargetId;
  6482. Uint8 lsbTargetID;
  6483. Uint8 lrgTrans;
  6484. // Open the CSL SRIO Module 0
  6485. hSrio = CSL_SRIO_Open (0);
  6486. // Get the Port Write Target Device ID information.
  6487. CSL_SRIO_GetPortWriteDeviceId(hSrio, &msbTargetId, &lsbTargetID, &lrgTrans);
  6488. ...
  6489. @endverbatim
  6490. * =============================================================================
  6491. */
  6492. static inline void CSL_SRIO_GetPortWriteDeviceId
  6493. (
  6494. CSL_SrioHandle hSrio,
  6495. Uint8* msbTargetId,
  6496. Uint8* lsbTargetID,
  6497. Uint8* lrgTrans
  6498. )
  6499. {
  6500. Uint32 value = hSrio->RIO_PW_TGT_ID;
  6501. *msbTargetId = CSL_FEXT(value, SRIO_RIO_PW_TGT_ID_DEVICEID_MSB);
  6502. *lsbTargetID = CSL_FEXT(value, SRIO_RIO_PW_TGT_ID_DEVICEID);
  6503. *lrgTrans = CSL_FEXT(value, SRIO_RIO_PW_TGT_ID_ID_LARGE);
  6504. }
  6505. /** ============================================================================
  6506. * @n@b CSL_SRIO_SetPortWriteDeviceId
  6507. *
  6508. * @b Description
  6509. * @n The function is used to get the target device ID to be used when a
  6510. * device generates a Maintenance Port-Write operation to report errors to
  6511. * a system host.
  6512. *
  6513. * @b Arguments
  6514. @verbatim
  6515. hSrio Handle of the SRIO device
  6516. msbTargetId Most significant byte of Port-Write Target device ID
  6517. lsbTargetID Least significant byte of Port-Write Target device ID
  6518. lrgTrans DeviceID size to use for a port-write
  6519. @endverbatim
  6520. *
  6521. * <b> Return Value </b>
  6522. * @n None
  6523. *
  6524. * <b> Pre Condition </b>
  6525. * @n CSL_SRIO_Open() must be called
  6526. *
  6527. * <b> Post Condition </b>
  6528. * @n None
  6529. *
  6530. * @b Writes
  6531. * @n SRIO_RIO_PW_TGT_ID_DEVICEID_MSB,SRIO_RIO_PW_TGT_ID_DEVICEID,
  6532. * @n SRIO_RIO_PW_TGT_ID_ID_LARGE
  6533. *
  6534. * @b Example
  6535. * @verbatim
  6536. CSL_SrioHandle hSrio;
  6537. // Open the CSL SRIO Module 0
  6538. hSrio = CSL_SRIO_Open (0);
  6539. // Set the Port Write Target Device ID information.
  6540. CSL_SRIO_SetPortWriteDeviceId (hSrio, 0x0, 0x80, 0x0);
  6541. ...
  6542. @endverbatim
  6543. * =============================================================================
  6544. */
  6545. static inline void CSL_SRIO_SetPortWriteDeviceId
  6546. (
  6547. CSL_SrioHandle hSrio,
  6548. Uint8 msbTargetId,
  6549. Uint8 lsbTargetID,
  6550. Uint8 lrgTrans
  6551. )
  6552. {
  6553. hSrio->RIO_PW_TGT_ID = CSL_FMK (SRIO_RIO_PW_TGT_ID_DEVICEID_MSB, msbTargetId) |
  6554. CSL_FMK (SRIO_RIO_PW_TGT_ID_DEVICEID, lsbTargetID) |
  6555. CSL_FMK (SRIO_RIO_PW_TGT_ID_ID_LARGE, lrgTrans);
  6556. }
  6557. /** ============================================================================
  6558. * @n@b CSL_SRIO_GetPortError
  6559. *
  6560. * @b Description
  6561. * @n The function is used to get the physical layer errors that have been
  6562. * detected by the Port hardware
  6563. *
  6564. * @b Arguments
  6565. @verbatim
  6566. hSrio Handle of the SRIO device
  6567. portNum SRIO Port Number
  6568. errStatus Error Status populated by this API
  6569. @endverbatim
  6570. *
  6571. * <b> Return Value </b>
  6572. * @n None
  6573. *
  6574. * <b> Pre Condition </b>
  6575. * @n CSL_SRIO_Open() must be called
  6576. *
  6577. * <b> Post Condition </b>
  6578. * @n None
  6579. *
  6580. * @b Reads
  6581. * @n SRIO_RIO_SP_ERR_DET
  6582. *
  6583. * @b Example
  6584. * @verbatim
  6585. CSL_SrioHandle hSrio;
  6586. Uint32 errStatus;
  6587. // Open the CSL SRIO Module 0
  6588. hSrio = CSL_SRIO_Open (0);
  6589. // Get the Port 1 Error Status
  6590. CSL_SRIO_GetPortError(hSrio, 1, &errStatus);
  6591. if (errStatus != 0)
  6592. {
  6593. // Port Errors detected
  6594. }
  6595. else
  6596. {
  6597. // No Port Errors detected
  6598. }
  6599. ...
  6600. @endverbatim
  6601. * =============================================================================
  6602. */
  6603. static inline void CSL_SRIO_GetPortError
  6604. (
  6605. CSL_SrioHandle hSrio,
  6606. Uint8 portNum,
  6607. Uint32* errStatus
  6608. )
  6609. {
  6610. *errStatus = hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_DET;
  6611. }
  6612. /** ============================================================================
  6613. * @n@b CSL_SRIO_ClearPortError
  6614. *
  6615. * @b Description
  6616. * @n The function is used to clear any port errors which were detected by
  6617. * the port Physical layer.
  6618. *
  6619. * @b Arguments
  6620. @verbatim
  6621. hSrio Handle of the SRIO device
  6622. portNum SRIO Port Number
  6623. @endverbatim
  6624. *
  6625. * <b> Return Value </b>
  6626. * @n None
  6627. *
  6628. * <b> Pre Condition </b>
  6629. * @n CSL_SRIO_Open() must be called
  6630. *
  6631. * <b> Post Condition </b>
  6632. * @n None
  6633. *
  6634. * @b Writes
  6635. * @n SRIO_RIO_SP_ERR_DET=0
  6636. *
  6637. * @b Example
  6638. * @verbatim
  6639. CSL_SrioHandle hSrio;
  6640. // Open the CSL SRIO Module 0
  6641. hSrio = CSL_SRIO_Open (0);
  6642. // Get the Port 1 Error Status
  6643. CSL_SRIO_GetPortError(hSrio, 1, &errStatus);
  6644. if (errStatus != 0)
  6645. {
  6646. // Port Errors detected
  6647. ...
  6648. // Clear port errors.
  6649. CSL_SRIO_ClearPortError (hSrio, 1);
  6650. }
  6651. else
  6652. {
  6653. // No port errors detected
  6654. }
  6655. @endverbatim
  6656. * =============================================================================
  6657. */
  6658. static inline void CSL_SRIO_ClearPortError
  6659. (
  6660. CSL_SrioHandle hSrio,
  6661. Uint8 portNum
  6662. )
  6663. {
  6664. hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_DET = 0x0;
  6665. }
  6666. /** ============================================================================
  6667. * @n@b CSL_SRIO_EnableImpSpecificPortError
  6668. *
  6669. * @b Description
  6670. * @n The function is used to enable the ability for the SRIO port to rate count
  6671. * implementation specific errors.
  6672. *
  6673. * @b Arguments
  6674. @verbatim
  6675. hSrio Handle of the SRIO device
  6676. portNum SRIO Port Number
  6677. @endverbatim
  6678. *
  6679. * <b> Return Value </b>
  6680. * @n None
  6681. *
  6682. * <b> Pre Condition </b>
  6683. * @n CSL_SRIO_Open() must be called
  6684. *
  6685. * <b> Post Condition </b>
  6686. * @n None
  6687. *
  6688. * @b Writes
  6689. * @n SRIO_RIO_SP_RATE_EN_IMP_SPEC_EN=1
  6690. *
  6691. * @b Example
  6692. * @verbatim
  6693. CSL_SrioHandle hSrio;
  6694. // Open the CSL SRIO Module 0
  6695. hSrio = CSL_SRIO_Open (0);
  6696. // Enable the Implementation specific Port 1 Rate counting
  6697. CSL_SRIO_EnableImpSpecificPortError (hSrio, 1);
  6698. ...
  6699. @endverbatim
  6700. * =============================================================================
  6701. */
  6702. static inline void CSL_SRIO_EnableImpSpecificPortError
  6703. (
  6704. CSL_SrioHandle hSrio,
  6705. Uint8 portNum
  6706. )
  6707. {
  6708. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_IMP_SPEC_EN, (Uint32)1);
  6709. }
  6710. /** ============================================================================
  6711. * @n@b CSL_SRIO_DisableImpSpecificPortError
  6712. *
  6713. * @b Description
  6714. * @n The function is used to disable the ability for the SRIO port to rate count
  6715. * implementation specific errors.
  6716. *
  6717. * @b Arguments
  6718. @verbatim
  6719. hSrio Handle of the SRIO device
  6720. portNum SRIO Port Number
  6721. @endverbatim
  6722. *
  6723. * <b> Return Value </b>
  6724. * @n None
  6725. *
  6726. * <b> Pre Condition </b>
  6727. * @n CSL_SRIO_Open() must be called
  6728. *
  6729. * <b> Post Condition </b>
  6730. * @n None
  6731. *
  6732. * @b Writes
  6733. * @n SRIO_RIO_SP_RATE_EN_IMP_SPEC_EN=0
  6734. *
  6735. * @b Example
  6736. * @verbatim
  6737. CSL_SrioHandle hSrio;
  6738. // Open the CSL SRIO Module 0
  6739. hSrio = CSL_SRIO_Open (0);
  6740. // Disable the Implementation specific Port 1 Rate counting
  6741. CSL_SRIO_DisableImpSpecificPortError (hSrio, 1);
  6742. ...
  6743. @endverbatim
  6744. * =============================================================================
  6745. */
  6746. static inline void CSL_SRIO_DisableImpSpecificPortError
  6747. (
  6748. CSL_SrioHandle hSrio,
  6749. Uint8 portNum
  6750. )
  6751. {
  6752. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_IMP_SPEC_EN, 0);
  6753. }
  6754. /** ============================================================================
  6755. * @n@b CSL_SRIO_EnableControlSymBadCRCPortError
  6756. *
  6757. * @b Description
  6758. * @n The function is used to enable the error rate counting for Received
  6759. * Control Symbol with a bad CRC
  6760. *
  6761. * @b Arguments
  6762. @verbatim
  6763. hSrio Handle of the SRIO device
  6764. portNum SRIO Port Number
  6765. @endverbatim
  6766. *
  6767. * <b> Return Value </b>
  6768. * @n None
  6769. *
  6770. * <b> Pre Condition </b>
  6771. * @n CSL_SRIO_Open() must be called
  6772. *
  6773. * <b> Post Condition </b>
  6774. * @n None
  6775. *
  6776. * @b Writes
  6777. * @n SRIO_RIO_SP_RATE_EN_CS_CRC_EN=1
  6778. *
  6779. * @b Example
  6780. * @verbatim
  6781. CSL_SrioHandle hSrio;
  6782. // Open the CSL SRIO Module 0
  6783. hSrio = CSL_SRIO_Open (0);
  6784. // Enable the Control Symbol Bad CRC rate counting.
  6785. CSL_SRIO_EnableControlSymBadCRCPortError (hSrio, 1);
  6786. ...
  6787. @endverbatim
  6788. * =============================================================================
  6789. */
  6790. static inline void CSL_SRIO_EnableControlSymBadCRCPortError
  6791. (
  6792. CSL_SrioHandle hSrio,
  6793. Uint8 portNum
  6794. )
  6795. {
  6796. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_CS_CRC_EN, 1);
  6797. }
  6798. /** ============================================================================
  6799. * @n@b CSL_SRIO_DisableControlSymBadCRCPortError
  6800. *
  6801. * @b Description
  6802. * @n The function is used to disable the error rate counting for Received
  6803. * Control Symbol with a bad CRC
  6804. *
  6805. * @b Arguments
  6806. @verbatim
  6807. hSrio Handle of the SRIO device
  6808. portNum SRIO Port Number
  6809. @endverbatim
  6810. *
  6811. * <b> Return Value </b>
  6812. * @n None
  6813. *
  6814. * <b> Pre Condition </b>
  6815. * @n CSL_SRIO_Open() must be called
  6816. *
  6817. * <b> Post Condition </b>
  6818. * @n None
  6819. *
  6820. * @b Writes
  6821. * @n SRIO_RIO_SP_RATE_EN_CS_CRC_EN=0
  6822. *
  6823. * @b Example
  6824. * @verbatim
  6825. CSL_SrioHandle hSrio;
  6826. // Open the CSL SRIO Module 0
  6827. hSrio = CSL_SRIO_Open (0);
  6828. // Disable the Control Symbol Bad CRC rate counting.
  6829. CSL_SRIO_DisableControlSymBadCRCPortError (hSrio, 1);
  6830. ...
  6831. @endverbatim
  6832. * =============================================================================
  6833. */
  6834. static inline void CSL_SRIO_DisableControlSymBadCRCPortError
  6835. (
  6836. CSL_SrioHandle hSrio,
  6837. Uint8 portNum
  6838. )
  6839. {
  6840. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_CS_CRC_EN, 0);
  6841. }
  6842. /** ============================================================================
  6843. * @n@b CSL_SRIO_EnableUnexpectedAckIDPortError
  6844. *
  6845. * @b Description
  6846. * @n The function is used to enable the error rate counting for Received
  6847. * Control Symbol with an unexpected ACK ID
  6848. *
  6849. * @b Arguments
  6850. @verbatim
  6851. hSrio Handle of the SRIO device
  6852. portNum SRIO Port Number
  6853. @endverbatim
  6854. *
  6855. * <b> Return Value </b>
  6856. * @n None
  6857. *
  6858. * <b> Pre Condition </b>
  6859. * @n CSL_SRIO_Open() must be called
  6860. *
  6861. * <b> Post Condition </b>
  6862. * @n None
  6863. *
  6864. * @b Writes
  6865. * @n SRIO_RIO_SP_RATE_EN_CS_ILL_ID_EN=1
  6866. *
  6867. * @b Example
  6868. * @verbatim
  6869. CSL_SrioHandle hSrio;
  6870. // Open the CSL SRIO Module 0
  6871. hSrio = CSL_SRIO_Open (0);
  6872. // Enable the unexpected ACK ID Port Error
  6873. CSL_SRIO_EnableUnexpectedAckIDPortError (hSrio, 1);
  6874. ...
  6875. @endverbatim
  6876. * =============================================================================
  6877. */
  6878. static inline void CSL_SRIO_EnableUnexpectedAckIDPortError
  6879. (
  6880. CSL_SrioHandle hSrio,
  6881. Uint8 portNum
  6882. )
  6883. {
  6884. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_CS_ILL_ID_EN, 1);
  6885. }
  6886. /** ============================================================================
  6887. * @n@b CSL_SRIO_DisableUnexpectedAckIDPortError
  6888. *
  6889. * @b Description
  6890. * @n The function is used to disable the error rate counting for Received
  6891. * Control Symbol with an unexpected ACK ID
  6892. *
  6893. * @b Arguments
  6894. @verbatim
  6895. hSrio Handle of the SRIO device
  6896. portNum SRIO Port Number
  6897. @endverbatim
  6898. *
  6899. * <b> Return Value </b>
  6900. * @n None
  6901. *
  6902. * <b> Pre Condition </b>
  6903. * @n CSL_SRIO_Open() must be called
  6904. *
  6905. * <b> Post Condition </b>
  6906. * @n None
  6907. *
  6908. * @b Writes
  6909. * @n SRIO_RIO_SP_RATE_EN_CS_ILL_ID_EN=0
  6910. *
  6911. * @b Example
  6912. * @verbatim
  6913. CSL_SrioHandle hSrio;
  6914. // Open the CSL SRIO Module 0
  6915. hSrio = CSL_SRIO_Open (0);
  6916. // Disable the unexpected ACK ID Port Error
  6917. CSL_SRIO_DisableUnexpectedAckIDPortError (hSrio, 1);
  6918. ...
  6919. @endverbatim
  6920. * =============================================================================
  6921. */
  6922. static inline void CSL_SRIO_DisableUnexpectedAckIDPortError
  6923. (
  6924. CSL_SrioHandle hSrio,
  6925. Uint8 portNum
  6926. )
  6927. {
  6928. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_CS_ILL_ID_EN, 0);
  6929. }
  6930. /** ============================================================================
  6931. * @n@b CSL_SRIO_EnablePacketNotAcceptedPortError
  6932. *
  6933. * @b Description
  6934. * @n The function is used to enable the error rate counting for packet not
  6935. * accepted control symbol.
  6936. *
  6937. * @b Arguments
  6938. @verbatim
  6939. hSrio Handle of the SRIO device
  6940. portNum SRIO Port Number
  6941. @endverbatim
  6942. *
  6943. * <b> Return Value </b>
  6944. * @n None
  6945. *
  6946. * <b> Pre Condition </b>
  6947. * @n CSL_SRIO_Open() must be called
  6948. *
  6949. * <b> Post Condition </b>
  6950. * @n None
  6951. *
  6952. * @b Writes
  6953. * @n SRIO_RIO_SP_RATE_EN_CS_NOT_ACC_EN=1
  6954. *
  6955. * @b Example
  6956. * @verbatim
  6957. CSL_SrioHandle hSrio;
  6958. // Open the CSL SRIO Module 0
  6959. hSrio = CSL_SRIO_Open (0);
  6960. // Enable the packet not accepted port error
  6961. CSL_SRIO_EnablePacketNotAcceptedPortError (hSrio, 1);
  6962. ...
  6963. @endverbatim
  6964. * =============================================================================
  6965. */
  6966. static inline void CSL_SRIO_EnablePacketNotAcceptedPortError
  6967. (
  6968. CSL_SrioHandle hSrio,
  6969. Uint8 portNum
  6970. )
  6971. {
  6972. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_CS_NOT_ACC_EN, 1);
  6973. }
  6974. /** ============================================================================
  6975. * @n@b CSL_SRIO_DisablePacketNotAcceptedPortError
  6976. *
  6977. * @b Description
  6978. * @n The function is used to disable the error rate counting for packet not
  6979. * accepted control symbol.
  6980. *
  6981. * @b Arguments
  6982. @verbatim
  6983. hSrio Handle of the SRIO device
  6984. portNum SRIO Port Number
  6985. @endverbatim
  6986. *
  6987. * <b> Return Value </b>
  6988. * @n None
  6989. *
  6990. * <b> Pre Condition </b>
  6991. * @n CSL_SRIO_Open() must be called
  6992. *
  6993. * <b> Post Condition </b>
  6994. * @n None
  6995. *
  6996. * @b Writes
  6997. * @n SRIO_RIO_SP_RATE_EN_CS_NOT_ACC_EN=0
  6998. *
  6999. * @b Example
  7000. * @verbatim
  7001. CSL_SrioHandle hSrio;
  7002. // Open the CSL SRIO Module 0
  7003. hSrio = CSL_SRIO_Open (0);
  7004. // Disable the packet not accepted port error
  7005. CSL_SRIO_DisablePacketNotAcceptedPortError (hSrio, 1);
  7006. ...
  7007. @endverbatim
  7008. * =============================================================================
  7009. */
  7010. static inline void CSL_SRIO_DisablePacketNotAcceptedPortError
  7011. (
  7012. CSL_SrioHandle hSrio,
  7013. Uint8 portNum
  7014. )
  7015. {
  7016. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_CS_NOT_ACC_EN, 0);
  7017. }
  7018. /** ============================================================================
  7019. * @n@b CSL_SRIO_EnablePacketUnexpectedAckIdError
  7020. *
  7021. * @b Description
  7022. * @n The function is used to enable the error rate counting for packets with
  7023. * unexpected ack id
  7024. *
  7025. * @b Arguments
  7026. @verbatim
  7027. hSrio Handle of the SRIO device
  7028. portNum SRIO Port Number
  7029. @endverbatim
  7030. *
  7031. * <b> Return Value </b>
  7032. * @n None
  7033. *
  7034. * <b> Pre Condition </b>
  7035. * @n CSL_SRIO_Open() must be called
  7036. *
  7037. * <b> Post Condition </b>
  7038. * @n None
  7039. *
  7040. * @b Writes
  7041. * @n SRIO_RIO_SP_RATE_EN_PKT_ILL_ACKID_EN=1
  7042. *
  7043. * @b Example
  7044. * @verbatim
  7045. CSL_SrioHandle hSrio;
  7046. // Open the CSL SRIO Module 0
  7047. hSrio = CSL_SRIO_Open (0);
  7048. // Enable the packet with unexpected ack id rate counting
  7049. CSL_SRIO_EnablePacketUnexpectedAckIdError (hSrio, 1);
  7050. ...
  7051. @endverbatim
  7052. * =============================================================================
  7053. */
  7054. static inline void CSL_SRIO_EnablePacketUnexpectedAckIdError
  7055. (
  7056. CSL_SrioHandle hSrio,
  7057. Uint8 portNum
  7058. )
  7059. {
  7060. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_PKT_ILL_ACKID_EN, 1);
  7061. }
  7062. /** ============================================================================
  7063. * @n@b CSL_SRIO_DisablePacketUnexpectedAckIdError
  7064. *
  7065. * @b Description
  7066. * @n The function is used to disable the error rate counting for packets with
  7067. * unexpected ack id
  7068. *
  7069. * @b Arguments
  7070. @verbatim
  7071. hSrio Handle of the SRIO device
  7072. portNum SRIO Port Number
  7073. @endverbatim
  7074. *
  7075. * <b> Return Value </b>
  7076. * @n None
  7077. *
  7078. * <b> Pre Condition </b>
  7079. * @n CSL_SRIO_Open() must be called
  7080. *
  7081. * <b> Post Condition </b>
  7082. * @n None
  7083. *
  7084. * @b Writes
  7085. * @n SRIO_RIO_SP_RATE_EN_PKT_ILL_ACKID_EN=0
  7086. *
  7087. * @b Example
  7088. * @verbatim
  7089. CSL_SrioHandle hSrio;
  7090. // Open the CSL SRIO Module 0
  7091. hSrio = CSL_SRIO_Open (0);
  7092. // Disable the packet with unexpected ack id rate counting
  7093. CSL_SRIO_DisablePacketUnexpectedAckIdError (hSrio, 1);
  7094. ...
  7095. @endverbatim
  7096. * =============================================================================
  7097. */
  7098. static inline void CSL_SRIO_DisablePacketUnexpectedAckIdError
  7099. (
  7100. CSL_SrioHandle hSrio,
  7101. Uint8 portNum
  7102. )
  7103. {
  7104. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_PKT_ILL_ACKID_EN, 0);
  7105. }
  7106. /** ============================================================================
  7107. * @n@b CSL_SRIO_EnablePacketBadCRCError
  7108. *
  7109. * @b Description
  7110. * @n The function is used to enable the error rate counting for packets with
  7111. * bad CRC
  7112. *
  7113. * @b Arguments
  7114. @verbatim
  7115. hSrio Handle of the SRIO device
  7116. portNum SRIO Port Number
  7117. @endverbatim
  7118. *
  7119. * <b> Return Value </b>
  7120. * @n None
  7121. *
  7122. * <b> Pre Condition </b>
  7123. * @n CSL_SRIO_Open() must be called
  7124. *
  7125. * <b> Post Condition </b>
  7126. * @n None
  7127. *
  7128. * @b Writes
  7129. * @n SRIO_RIO_SP_RATE_EN_PKT_CRC_ERR_EN=1
  7130. *
  7131. * @b Example
  7132. * @verbatim
  7133. CSL_SrioHandle hSrio;
  7134. // Open the CSL SRIO Module 0
  7135. hSrio = CSL_SRIO_Open (0);
  7136. // Enable the packet with bad CRC error rate counting
  7137. CSL_SRIO_EnablePacketBadCRCError (hSrio, 1);
  7138. ...
  7139. @endverbatim
  7140. * =============================================================================
  7141. */
  7142. static inline void CSL_SRIO_EnablePacketBadCRCError
  7143. (
  7144. CSL_SrioHandle hSrio,
  7145. Uint8 portNum
  7146. )
  7147. {
  7148. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_PKT_CRC_ERR_EN, 1);
  7149. }
  7150. /** ============================================================================
  7151. * @n@b CSL_SRIO_DisablePacketBadCRCError
  7152. *
  7153. * @b Description
  7154. * @n The function is used to disable the error rate counting for packets with
  7155. * bad CRC
  7156. *
  7157. * @b Arguments
  7158. @verbatim
  7159. hSrio Handle of the SRIO device
  7160. portNum SRIO Port Number
  7161. @endverbatim
  7162. *
  7163. * <b> Return Value </b>
  7164. * @n None
  7165. *
  7166. * <b> Pre Condition </b>
  7167. * @n CSL_SRIO_Open() must be called
  7168. *
  7169. * <b> Post Condition </b>
  7170. * @n None
  7171. *
  7172. * @b Writes
  7173. * @n SRIO_RIO_SP_RATE_EN_PKT_CRC_ERR_EN=0
  7174. *
  7175. * @b Example
  7176. * @verbatim
  7177. CSL_SrioHandle hSrio;
  7178. // Open the CSL SRIO Module 0
  7179. hSrio = CSL_SRIO_Open (0);
  7180. // Disable the packet with bad CRC error rate counting
  7181. CSL_SRIO_DisablePacketBadCRCError (hSrio, 1);
  7182. ...
  7183. @endverbatim
  7184. * =============================================================================
  7185. */
  7186. static inline void CSL_SRIO_DisablePacketBadCRCError
  7187. (
  7188. CSL_SrioHandle hSrio,
  7189. Uint8 portNum
  7190. )
  7191. {
  7192. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_PKT_CRC_ERR_EN, 0);
  7193. }
  7194. /** ============================================================================
  7195. * @n@b CSL_SRIO_EnableIllegalSizePortError
  7196. *
  7197. * @b Description
  7198. * @n The function is used to enable the error rate counting for packets with
  7199. * illegal size
  7200. *
  7201. * @b Arguments
  7202. @verbatim
  7203. hSrio Handle of the SRIO device
  7204. portNum SRIO Port Number
  7205. @endverbatim
  7206. *
  7207. * <b> Return Value </b>
  7208. * @n None
  7209. *
  7210. * <b> Pre Condition </b>
  7211. * @n CSL_SRIO_Open() must be called
  7212. *
  7213. * <b> Post Condition </b>
  7214. * @n None
  7215. *
  7216. * @b Writes
  7217. * @n SRIO_RIO_SP_RATE_EN_PKT_ILL_SIZE_EN=1
  7218. *
  7219. * @b Example
  7220. * @verbatim
  7221. CSL_SrioHandle hSrio;
  7222. // Open the CSL SRIO Module 0
  7223. hSrio = CSL_SRIO_Open (0);
  7224. // Enable the rate counting of packets with illegal size error
  7225. CSL_SRIO_EnableIllegalSizePortError (hSrio, 1);
  7226. ...
  7227. @endverbatim
  7228. * =============================================================================
  7229. */
  7230. static inline void CSL_SRIO_EnableIllegalSizePortError
  7231. (
  7232. CSL_SrioHandle hSrio,
  7233. Uint8 portNum
  7234. )
  7235. {
  7236. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_PKT_ILL_SIZE_EN, 1);
  7237. }
  7238. /** ============================================================================
  7239. * @n@b CSL_SRIO_DisableIllegalSizePortError
  7240. *
  7241. * @b Description
  7242. * @n The function is used to disable the error rate counting for packets with
  7243. * illegal size
  7244. *
  7245. * @b Arguments
  7246. @verbatim
  7247. hSrio Handle of the SRIO device
  7248. portNum SRIO Port Number
  7249. @endverbatim
  7250. *
  7251. * <b> Return Value </b>
  7252. * @n None
  7253. *
  7254. * <b> Pre Condition </b>
  7255. * @n CSL_SRIO_Open() must be called
  7256. *
  7257. * <b> Post Condition </b>
  7258. * @n None
  7259. *
  7260. * @b Writes
  7261. * @n SRIO_RIO_SP_RATE_EN_PKT_ILL_SIZE_EN=0
  7262. *
  7263. * @b Example
  7264. * @verbatim
  7265. CSL_SrioHandle hSrio;
  7266. // Open the CSL SRIO Module 0
  7267. hSrio = CSL_SRIO_Open (0);
  7268. // Disable the rate counting of packets with illegal size error
  7269. CSL_SRIO_DisableIllegalSizePortError (hSrio, 1);
  7270. ...
  7271. @endverbatim
  7272. * =============================================================================
  7273. */
  7274. static inline void CSL_SRIO_DisableIllegalSizePortError
  7275. (
  7276. CSL_SrioHandle hSrio,
  7277. Uint8 portNum
  7278. )
  7279. {
  7280. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_PKT_ILL_SIZE_EN, 0);
  7281. }
  7282. /** ============================================================================
  7283. * @n@b CSL_SRIO_EnableDescramblingLOSPortError
  7284. *
  7285. * @b Description
  7286. * @n The function is used to enable the error rate counting of the loss of
  7287. * receiver de-scrambler synchronization when control symbol and packet data
  7288. * is being scrambled before transmission.
  7289. *
  7290. * @b Arguments
  7291. @verbatim
  7292. hSrio Handle of the SRIO device
  7293. portNum SRIO Port Number
  7294. @endverbatim
  7295. *
  7296. * <b> Return Value </b>
  7297. * @n None
  7298. *
  7299. * <b> Pre Condition </b>
  7300. * @n CSL_SRIO_Open() must be called
  7301. *
  7302. * <b> Post Condition </b>
  7303. * @n None
  7304. *
  7305. * @b Writes
  7306. * @n SRIO_RIO_SP_RATE_EN_DSCRAM_LOS_EN=1
  7307. *
  7308. * @b Example
  7309. * @verbatim
  7310. CSL_SrioHandle hSrio;
  7311. // Open the CSL SRIO Module 0
  7312. hSrio = CSL_SRIO_Open (0);
  7313. // Enable the error rate counting for the LOS Descrambling
  7314. CSL_SRIO_EnableDescramblingLOSPortError (hSrio, 1);
  7315. ...
  7316. @endverbatim
  7317. * =============================================================================
  7318. */
  7319. static inline void CSL_SRIO_EnableDescramblingLOSPortError
  7320. (
  7321. CSL_SrioHandle hSrio,
  7322. Uint8 portNum
  7323. )
  7324. {
  7325. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_DSCRAM_LOS_EN, 1);
  7326. }
  7327. /** ============================================================================
  7328. * @n@b CSL_SRIO_DisableDescramblingLOSPortError
  7329. *
  7330. * @b Description
  7331. * @n The function is used to disable the error rate counting of the loss of
  7332. * receiver de-scrambler synchronization when control symbol and packet data
  7333. * is being scrambled before transmission.
  7334. *
  7335. * @b Arguments
  7336. @verbatim
  7337. hSrio Handle of the SRIO device
  7338. portNum SRIO Port Number
  7339. @endverbatim
  7340. *
  7341. * <b> Return Value </b>
  7342. * @n None
  7343. *
  7344. * <b> Pre Condition </b>
  7345. * @n CSL_SRIO_Open() must be called
  7346. *
  7347. * <b> Post Condition </b>
  7348. * @n None
  7349. *
  7350. * @b Writes
  7351. * @n SRIO_RIO_SP_RATE_EN_DSCRAM_LOS_EN=0
  7352. *
  7353. * @b Example
  7354. * @verbatim
  7355. CSL_SrioHandle hSrio;
  7356. // Open the CSL SRIO Module 0
  7357. hSrio = CSL_SRIO_Open (0);
  7358. // Disable the error rate counting for the LOS Descrambling
  7359. CSL_SRIO_DisableDescramblingLOSPortError (hSrio, 1);
  7360. ...
  7361. @endverbatim
  7362. * =============================================================================
  7363. */
  7364. static inline void CSL_SRIO_DisableDescramblingLOSPortError
  7365. (
  7366. CSL_SrioHandle hSrio,
  7367. Uint8 portNum
  7368. )
  7369. {
  7370. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_DSCRAM_LOS_EN, 0);
  7371. }
  7372. /** ============================================================================
  7373. * @n@b CSL_SRIO_EnableIllegalAckIDPortError
  7374. *
  7375. * @b Description
  7376. * @n The function is used to enable the error rate counting for receiving an
  7377. * ACK ID that is not outstanding.
  7378. *
  7379. * @b Arguments
  7380. @verbatim
  7381. hSrio Handle of the SRIO device
  7382. portNum SRIO Port Number
  7383. @endverbatim
  7384. *
  7385. * <b> Return Value </b>
  7386. * @n None
  7387. *
  7388. * <b> Pre Condition </b>
  7389. * @n CSL_SRIO_Open() must be called
  7390. *
  7391. * <b> Post Condition </b>
  7392. * @n None
  7393. *
  7394. * @b Writes
  7395. * @n SRIO_RIO_SP_RATE_EN_LR_ACKID_ILL_EN=1
  7396. *
  7397. * @b Example
  7398. * @verbatim
  7399. CSL_SrioHandle hSrio;
  7400. // Open the CSL SRIO Module 0
  7401. hSrio = CSL_SRIO_Open (0);
  7402. // Enable the error rate counting for the illegal ACK ID.
  7403. CSL_SRIO_EnableIllegalAckIDPortError (hSrio, 1);
  7404. ...
  7405. @endverbatim
  7406. * =============================================================================
  7407. */
  7408. static inline void CSL_SRIO_EnableIllegalAckIDPortError
  7409. (
  7410. CSL_SrioHandle hSrio,
  7411. Uint8 portNum
  7412. )
  7413. {
  7414. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_LR_ACKID_ILL_EN, 1);
  7415. }
  7416. /** ============================================================================
  7417. * @n@b CSL_SRIO_DisableIllegalAckIDPortError
  7418. *
  7419. * @b Description
  7420. * @n The function is used to disable the error rate counting for receiving an
  7421. * ACK ID that is not outstanding.
  7422. *
  7423. * @b Arguments
  7424. @verbatim
  7425. hSrio Handle of the SRIO device
  7426. portNum SRIO Port Number
  7427. @endverbatim
  7428. *
  7429. * <b> Return Value </b>
  7430. * @n None
  7431. *
  7432. * <b> Pre Condition </b>
  7433. * @n CSL_SRIO_Open() must be called
  7434. *
  7435. * <b> Post Condition </b>
  7436. * @n None
  7437. *
  7438. * @b Writes
  7439. * @n SRIO_RIO_SP_RATE_EN_LR_ACKID_ILL_EN=0
  7440. *
  7441. * @b Example
  7442. * @verbatim
  7443. CSL_SrioHandle hSrio;
  7444. // Open the CSL SRIO Module 0
  7445. hSrio = CSL_SRIO_Open (0);
  7446. // Disable the error rate counting for the illegal ACK ID.
  7447. CSL_SRIO_DisableIllegalAckIDPortError (hSrio, 1);
  7448. ...
  7449. @endverbatim
  7450. * =============================================================================
  7451. */
  7452. static inline void CSL_SRIO_DisableIllegalAckIDPortError
  7453. (
  7454. CSL_SrioHandle hSrio,
  7455. Uint8 portNum
  7456. )
  7457. {
  7458. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_LR_ACKID_ILL_EN, 0);
  7459. }
  7460. /** ============================================================================
  7461. * @n@b CSL_SRIO_EnableProtocolPortError
  7462. *
  7463. * @b Description
  7464. * @n The function is used to enable the error rate counting for protocol
  7465. * errors
  7466. *
  7467. * @b Arguments
  7468. @verbatim
  7469. hSrio Handle of the SRIO device
  7470. portNum SRIO Port Number
  7471. @endverbatim
  7472. *
  7473. * <b> Return Value </b>
  7474. * @n None
  7475. *
  7476. * <b> Pre Condition </b>
  7477. * @n CSL_SRIO_Open() must be called
  7478. *
  7479. * <b> Post Condition </b>
  7480. * @n None
  7481. *
  7482. * @b Writes
  7483. * @n SRIO_RIO_SP_RATE_EN_PROT_ERR_EN=1
  7484. *
  7485. * @b Example
  7486. * @verbatim
  7487. CSL_SrioHandle hSrio;
  7488. // Open the CSL SRIO Module 0
  7489. hSrio = CSL_SRIO_Open (0);
  7490. // Enable the error rate counting for protocol errors.
  7491. CSL_SRIO_EnableProtocolPortError (hSrio, 1);
  7492. ...
  7493. @endverbatim
  7494. * =============================================================================
  7495. */
  7496. static inline void CSL_SRIO_EnableProtocolPortError
  7497. (
  7498. CSL_SrioHandle hSrio,
  7499. Uint8 portNum
  7500. )
  7501. {
  7502. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_PROT_ERR_EN, 1);
  7503. }
  7504. /** ============================================================================
  7505. * @n@b CSL_SRIO_DisableProtocolPortError
  7506. *
  7507. * @b Description
  7508. * @n The function is used to disable the error rate counting for protocol
  7509. * errors
  7510. *
  7511. * @b Arguments
  7512. @verbatim
  7513. hSrio Handle of the SRIO device
  7514. portNum SRIO Port Number
  7515. @endverbatim
  7516. *
  7517. * <b> Return Value </b>
  7518. * @n None
  7519. *
  7520. * <b> Pre Condition </b>
  7521. * @n CSL_SRIO_Open() must be called
  7522. *
  7523. * <b> Post Condition </b>
  7524. * @n None
  7525. *
  7526. * @b Writes
  7527. * @n SRIO_RIO_SP_RATE_EN_PROT_ERR_EN=0
  7528. *
  7529. * @b Example
  7530. * @verbatim
  7531. CSL_SrioHandle hSrio;
  7532. // Open the CSL SRIO Module 0
  7533. hSrio = CSL_SRIO_Open (0);
  7534. // Disable the error rate counting for protocol errors.
  7535. CSL_SRIO_DisableProtocolPortError (hSrio, 1);
  7536. ...
  7537. @endverbatim
  7538. * =============================================================================
  7539. */
  7540. static inline void CSL_SRIO_DisableProtocolPortError
  7541. (
  7542. CSL_SrioHandle hSrio,
  7543. Uint8 portNum
  7544. )
  7545. {
  7546. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_PROT_ERR_EN, 0);
  7547. }
  7548. /** ============================================================================
  7549. * @n@b CSL_SRIO_EnableDelineationPortError
  7550. *
  7551. * @b Description
  7552. * @n The function is used to enable the error rate counting for delineation
  7553. * errors
  7554. *
  7555. * @b Arguments
  7556. @verbatim
  7557. hSrio Handle of the SRIO device
  7558. portNum SRIO Port Number
  7559. @endverbatim
  7560. *
  7561. * <b> Return Value </b>
  7562. * @n None
  7563. *
  7564. * <b> Pre Condition </b>
  7565. * @n CSL_SRIO_Open() must be called
  7566. *
  7567. * <b> Post Condition </b>
  7568. * @n None
  7569. *
  7570. * @b Writes
  7571. * @n SRIO_RIO_SP_RATE_EN_DELIN_ERR_EN=1
  7572. *
  7573. * @b Example
  7574. * @verbatim
  7575. CSL_SrioHandle hSrio;
  7576. // Open the CSL SRIO Module 0
  7577. hSrio = CSL_SRIO_Open (0);
  7578. // Enable the error rate counting for delineation errors.
  7579. CSL_SRIO_EnableDelineationPortError (hSrio, 1);
  7580. ...
  7581. @endverbatim
  7582. * =============================================================================
  7583. */
  7584. static inline void CSL_SRIO_EnableDelineationPortError
  7585. (
  7586. CSL_SrioHandle hSrio,
  7587. Uint8 portNum
  7588. )
  7589. {
  7590. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_DELIN_ERR_EN, 1);
  7591. }
  7592. /** ============================================================================
  7593. * @n@b CSL_SRIO_DisableDelineationPortError
  7594. *
  7595. * @b Description
  7596. * @n The function is used to disable the error rate counting for delineation
  7597. * errors
  7598. *
  7599. * @b Arguments
  7600. @verbatim
  7601. hSrio Handle of the SRIO device
  7602. portNum SRIO Port Number
  7603. @endverbatim
  7604. *
  7605. * <b> Return Value </b>
  7606. * @n None
  7607. *
  7608. * <b> Pre Condition </b>
  7609. * @n CSL_SRIO_Open() must be called
  7610. *
  7611. * <b> Post Condition </b>
  7612. * @n None
  7613. *
  7614. * @b Writes
  7615. * @n SRIO_RIO_SP_RATE_EN_DELIN_ERR_EN=0
  7616. *
  7617. * @b Example
  7618. * @verbatim
  7619. CSL_SrioHandle hSrio;
  7620. // Open the CSL SRIO Module 0
  7621. hSrio = CSL_SRIO_Open (0);
  7622. // Disable the error rate counting for delineation errors.
  7623. CSL_SRIO_DisableDelineationPortError (hSrio, 1);
  7624. ...
  7625. @endverbatim
  7626. * =============================================================================
  7627. */
  7628. static inline void CSL_SRIO_DisableDelineationPortError
  7629. (
  7630. CSL_SrioHandle hSrio,
  7631. Uint8 portNum
  7632. )
  7633. {
  7634. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_DELIN_ERR_EN, 0);
  7635. }
  7636. /** ============================================================================
  7637. * @n@b CSL_SRIO_EnableIllegalCSPortError
  7638. *
  7639. * @b Description
  7640. * @n The function is used to enable the error rate counting for illegal control
  7641. * symbols.
  7642. *
  7643. * @b Arguments
  7644. @verbatim
  7645. hSrio Handle of the SRIO device
  7646. portNum SRIO Port Number
  7647. @endverbatim
  7648. *
  7649. * <b> Return Value </b>
  7650. * @n None
  7651. *
  7652. * <b> Pre Condition </b>
  7653. * @n CSL_SRIO_Open() must be called
  7654. *
  7655. * <b> Post Condition </b>
  7656. * @n None
  7657. *
  7658. * @b Writes
  7659. * @n SRIO_RIO_SP_RATE_EN_CS_ACK_ILL_EN=1
  7660. *
  7661. * @b Example
  7662. * @verbatim
  7663. CSL_SrioHandle hSrio;
  7664. // Open the CSL SRIO Module 0
  7665. hSrio = CSL_SRIO_Open (0);
  7666. // Enable the error rate counting for illegal control symbols.
  7667. CSL_SRIO_EnableIllegalCSPortError (hSrio, 1);
  7668. ...
  7669. @endverbatim
  7670. * =============================================================================
  7671. */
  7672. static inline void CSL_SRIO_EnableIllegalCSPortError
  7673. (
  7674. CSL_SrioHandle hSrio,
  7675. Uint8 portNum
  7676. )
  7677. {
  7678. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_CS_ACK_ILL_EN, 1);
  7679. }
  7680. /** ============================================================================
  7681. * @n@b CSL_SRIO_DisableIllegalCSPortError
  7682. *
  7683. * @b Description
  7684. * @n The function is used to disable the error rate counting for illegal control
  7685. * symbols.
  7686. *
  7687. * @b Arguments
  7688. @verbatim
  7689. hSrio Handle of the SRIO device
  7690. portNum SRIO Port Number
  7691. @endverbatim
  7692. *
  7693. * <b> Return Value </b>
  7694. * @n None
  7695. *
  7696. * <b> Pre Condition </b>
  7697. * @n CSL_SRIO_Open() must be called
  7698. *
  7699. * <b> Post Condition </b>
  7700. * @n None
  7701. *
  7702. * @b Writes
  7703. * @n SRIO_RIO_SP_RATE_EN_CS_ACK_ILL_EN=0
  7704. *
  7705. * @b Example
  7706. * @verbatim
  7707. CSL_SrioHandle hSrio;
  7708. // Open the CSL SRIO Module 0
  7709. hSrio = CSL_SRIO_Open (0);
  7710. // Disable the error rate counting for illegal control symbols.
  7711. CSL_SRIO_DisableIllegalCSPortError (hSrio, 1);
  7712. ...
  7713. @endverbatim
  7714. * =============================================================================
  7715. */
  7716. static inline void CSL_SRIO_DisableIllegalCSPortError
  7717. (
  7718. CSL_SrioHandle hSrio,
  7719. Uint8 portNum
  7720. )
  7721. {
  7722. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_CS_ACK_ILL_EN, 0);
  7723. }
  7724. /** ============================================================================
  7725. * @n@b CSL_SRIO_EnableLinkTimeoutPortError
  7726. *
  7727. * @b Description
  7728. * @n The function is used to enable the error rate counting for link responses
  7729. * not received within the specific timeout.
  7730. *
  7731. * @b Arguments
  7732. @verbatim
  7733. hSrio Handle of the SRIO device
  7734. portNum SRIO Port Number
  7735. @endverbatim
  7736. *
  7737. * <b> Return Value </b>
  7738. * @n None
  7739. *
  7740. * <b> Pre Condition </b>
  7741. * @n CSL_SRIO_Open() must be called
  7742. *
  7743. * <b> Post Condition </b>
  7744. * @n None
  7745. *
  7746. * @b Writes
  7747. * @n SRIO_RIO_SP_RATE_EN_LINK_TO_EN=1
  7748. *
  7749. * @b Example
  7750. * @verbatim
  7751. CSL_SrioHandle hSrio;
  7752. // Open the CSL SRIO Module 0
  7753. hSrio = CSL_SRIO_Open (0);
  7754. // Enable the error rate counting for link timeout errors.
  7755. CSL_SRIO_EnableLinkTimeoutPortError (hSrio, 1);
  7756. ...
  7757. @endverbatim
  7758. * =============================================================================
  7759. */
  7760. static inline void CSL_SRIO_EnableLinkTimeoutPortError
  7761. (
  7762. CSL_SrioHandle hSrio,
  7763. Uint8 portNum
  7764. )
  7765. {
  7766. CSL_FINS (hSrio->RIO_SP_ERR[portNum].RIO_SP_RATE_EN, SRIO_RIO_SP_RATE_EN_LINK_TO_EN, 1);
  7767. }
  7768. /** ============================================================================
  7769. * @n@b CSL_SRIO_GetErrorCaptureInfo
  7770. *
  7771. * @b Description
  7772. * @n The function is used to get the error capture information.
  7773. *
  7774. * @b Arguments
  7775. @verbatim
  7776. hSrio Handle of the SRIO device
  7777. portNum SRIO Port Number
  7778. infoType Error Information Type
  7779. errType Encoded Value of the the captured error bits
  7780. implDep Implementation Dependent Error Information
  7781. valCapt Capture Valid Information
  7782. @endverbatim
  7783. *
  7784. * <b> Return Value </b>
  7785. * @n None
  7786. *
  7787. * <b> Pre Condition </b>
  7788. * @n CSL_SRIO_Open() must be called
  7789. *
  7790. * <b> Post Condition </b>
  7791. * @n None
  7792. *
  7793. * @b Reads
  7794. * @n SRIO_RIO_SP_ERR_ATTR_CAPT_INFO_TYPE,SRIO_RIO_SP_ERR_ATTR_CAPT_ERR_TYPE,SRIO_RIO_SP_ERR_ATTR_CAPT_IMPL_DEP,SRIO_RIO_SP_ERR_ATTR_CAPT_VAL_CAPT
  7795. *
  7796. * @b Example
  7797. * @verbatim
  7798. CSL_SrioHandle hSrio;
  7799. Uint8 infoType;
  7800. Uint8 errType;
  7801. Uint32 implDep;
  7802. Uint8 valCapt;
  7803. // Open the CSL SRIO Module 0
  7804. hSrio = CSL_SRIO_Open (0);
  7805. // Get the error capture information
  7806. CSL_SRIO_GetErrorCaptureInfo (hSrio, 1, &infoType, &errType, &implDep, &valCapt);
  7807. ...
  7808. @endverbatim
  7809. * =============================================================================
  7810. */
  7811. static inline void CSL_SRIO_GetErrorCaptureInfo
  7812. (
  7813. CSL_SrioHandle hSrio,
  7814. Uint8 portNum,
  7815. Uint8* infoType,
  7816. Uint8* errType,
  7817. Uint32* implDep,
  7818. Uint8* valCapt
  7819. )
  7820. {
  7821. *infoType = CSL_FEXT(hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_ATTR_CAPT, SRIO_RIO_SP_ERR_ATTR_CAPT_INFO_TYPE);
  7822. *errType = CSL_FEXT(hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_ATTR_CAPT, SRIO_RIO_SP_ERR_ATTR_CAPT_ERR_TYPE);
  7823. *implDep = CSL_FEXT(hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_ATTR_CAPT, SRIO_RIO_SP_ERR_ATTR_CAPT_IMPL_DEP);
  7824. *valCapt = CSL_FEXT(hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_ATTR_CAPT, SRIO_RIO_SP_ERR_ATTR_CAPT_VAL_CAPT);
  7825. }
  7826. /** ============================================================================
  7827. * @n@b CSL_SRIO_GetErrorCapture
  7828. *
  7829. * @b Description
  7830. * @n The function is used to get the error capture information.
  7831. *
  7832. * @b Arguments
  7833. @verbatim
  7834. hSrio Handle of the SRIO device
  7835. portNum SRIO Port Number
  7836. errCap0 Error 0 Capture Information
  7837. errCap1 Error 1 Capture Information
  7838. errCap2 Error 2 Capture Information
  7839. errCap3 Error 3 Capture Information
  7840. @endverbatim
  7841. *
  7842. * <b> Return Value </b>
  7843. * @n None
  7844. *
  7845. * <b> Pre Condition </b>
  7846. * @n CSL_SRIO_Open() must be called
  7847. *
  7848. * <b> Post Condition </b>
  7849. * @n None
  7850. *
  7851. * @b Reads
  7852. * @n SRIO_RIO_SP_ERR_CAPT_0,SRIO_RIO_SP_ERR_CAPT_1,
  7853. * @n SRIO_RIO_SP_ERR_CAPT_2,SRIO_RIO_SP_ERR_CAPT_3
  7854. *
  7855. * @b Example
  7856. * @verbatim
  7857. CSL_SrioHandle hSrio;
  7858. Uint32 errCap0;
  7859. Uint32 errCap1;
  7860. Uint32 errCap2;
  7861. Uint32 errCap3;
  7862. // Open the CSL SRIO Module 0
  7863. hSrio = CSL_SRIO_Open (0);
  7864. // Get the error capture information
  7865. CSL_SRIO_GetErrorCapture (hSrio, 1, &errCap0, &errCap1, &errCap2, &errCap3);
  7866. ...
  7867. @endverbatim
  7868. * =============================================================================
  7869. */
  7870. static inline void CSL_SRIO_GetErrorCapture
  7871. (
  7872. CSL_SrioHandle hSrio,
  7873. Uint8 portNum,
  7874. Uint32* errCap0,
  7875. Uint32* errCap1,
  7876. Uint32* errCap2,
  7877. Uint32* errCap3
  7878. )
  7879. {
  7880. *errCap0 = hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_CAPT_0;
  7881. *errCap1 = hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_CAPT_1;
  7882. *errCap2 = hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_CAPT_2;
  7883. *errCap3 = hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_CAPT_3;
  7884. }
  7885. /** ============================================================================
  7886. * @n@b CSL_SRIO_GetErrorRateCSR
  7887. *
  7888. * @b Description
  7889. * @n The function is used to get the error rate CSR which is used to monitor
  7890. * and control the reporting of the Port Physical layer errors.
  7891. *
  7892. * @b Arguments
  7893. @verbatim
  7894. hSrio Handle of the SRIO device
  7895. portNum SRIO Port Number
  7896. ptrErrorRate Error Rate configuration.
  7897. @endverbatim
  7898. *
  7899. * <b> Return Value </b>
  7900. * @n None
  7901. *
  7902. * <b> Pre Condition </b>
  7903. * @n CSL_SRIO_Open() must be called
  7904. *
  7905. * <b> Post Condition </b>
  7906. * @n None
  7907. *
  7908. * @b Reads
  7909. * @n SRIO_RIO_SP_ERR_RATE_ERR_RB,SRIO_RIO_SP_ERR_RATE_ERR_RR,
  7910. * @n SRIO_RIO_SP_ERR_RATE_ERR_PEAK,SRIO_RIO_SP_ERR_RATE_ERR_RATE_CNT
  7911. *
  7912. * @b Example
  7913. * @verbatim
  7914. CSL_SrioHandle hSrio;
  7915. SRIO_ERR_RATE errorRate;
  7916. // Open the CSL SRIO Module 0
  7917. hSrio = CSL_SRIO_Open (0);
  7918. // Get the Error Rate CSR Information.
  7919. CSL_SRIO_GetErrorRateCSR (hSrio, 1, &errorRate);
  7920. ...
  7921. @endverbatim
  7922. * =============================================================================
  7923. */
  7924. static inline void CSL_SRIO_GetErrorRateCSR
  7925. (
  7926. CSL_SrioHandle hSrio,
  7927. Uint8 portNum,
  7928. SRIO_ERR_RATE* ptrErrorRate
  7929. )
  7930. {
  7931. ptrErrorRate->errRateBias = CSL_FEXT (hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_RATE,SRIO_RIO_SP_ERR_RATE_ERR_RB);
  7932. ptrErrorRate->errRateRecovery = CSL_FEXT (hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_RATE,SRIO_RIO_SP_ERR_RATE_ERR_RR);
  7933. ptrErrorRate->peak = CSL_FEXT (hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_RATE,SRIO_RIO_SP_ERR_RATE_ERR_PEAK);
  7934. ptrErrorRate->errRateCnt = CSL_FEXT (hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_RATE,SRIO_RIO_SP_ERR_RATE_ERR_RATE_CNT);
  7935. }
  7936. /** ============================================================================
  7937. * @n@b CSL_SRIO_SetErrorRateCSR
  7938. *
  7939. * @b Description
  7940. * @n The function is used to set the error rate CSR which is used to monitor
  7941. * and control the reporting of the Port Physical layer errors.
  7942. *
  7943. * @b Arguments
  7944. @verbatim
  7945. hSrio Handle of the SRIO device
  7946. portNum SRIO Port Number
  7947. ptrErrorRate Error Rate configuration.
  7948. @endverbatim
  7949. *
  7950. * <b> Return Value </b>
  7951. * @n None
  7952. *
  7953. * <b> Pre Condition </b>
  7954. * @n CSL_SRIO_Open() must be called
  7955. *
  7956. * <b> Post Condition </b>
  7957. * @n None
  7958. *
  7959. * @b Writes
  7960. * @n SRIO_RIO_SP_ERR_RATE_ERR_RB,SRIO_RIO_SP_ERR_RATE_ERR_RR,
  7961. * @n SRIO_RIO_SP_ERR_RATE_ERR_PEAK,SRIO_RIO_SP_ERR_RATE_ERR_RATE_CNT
  7962. *
  7963. * @b Example
  7964. * @verbatim
  7965. CSL_SrioHandle hSrio;
  7966. SRIO_ERR_RATE errorRate;
  7967. // Open the CSL SRIO Module 0
  7968. hSrio = CSL_SRIO_Open (0);
  7969. // Get the Error Rate CSR Information.
  7970. CSL_SRIO_GetErrorRateCSR (hSrio, 1, &errorRate);
  7971. // Modify the configuration to not decrement the error rate counter
  7972. errorRate.errRateBias = 0x0;
  7973. CSL_SRIO_SetErrorRateCSR (hSrio, 1, &errorRate);
  7974. ...
  7975. @endverbatim
  7976. * =============================================================================
  7977. */
  7978. static inline void CSL_SRIO_SetErrorRateCSR
  7979. (
  7980. CSL_SrioHandle hSrio,
  7981. Uint8 portNum,
  7982. SRIO_ERR_RATE* ptrErrorRate
  7983. )
  7984. {
  7985. hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_RATE =
  7986. CSL_FMK (SRIO_RIO_SP_ERR_RATE_ERR_RB, ptrErrorRate->errRateBias) |
  7987. CSL_FMK (SRIO_RIO_SP_ERR_RATE_ERR_RR, ptrErrorRate->errRateRecovery) |
  7988. CSL_FMK (SRIO_RIO_SP_ERR_RATE_ERR_PEAK,ptrErrorRate->peak) |
  7989. CSL_FMK (SRIO_RIO_SP_ERR_RATE_ERR_RATE_CNT, ptrErrorRate->errRateCnt);
  7990. }
  7991. /** ============================================================================
  7992. * @n@b CSL_SRIO_GetErrorRateThreshold
  7993. *
  7994. * @b Description
  7995. * @n The function is used to get the error rate threshold.
  7996. *
  7997. * @b Arguments
  7998. @verbatim
  7999. hSrio Handle of the SRIO device
  8000. portNum SRIO Port Number
  8001. errRateFailedThreshold Threshold value for reporting an error condition
  8002. due to possibly broken link
  8003. errRateDegradeThreshold Threshold value for reporting an error condition
  8004. due to a degrading link.
  8005. @endverbatim
  8006. *
  8007. * <b> Return Value </b>
  8008. * @n None
  8009. *
  8010. * <b> Pre Condition </b>
  8011. * @n CSL_SRIO_Open() must be called
  8012. *
  8013. * <b> Post Condition </b>
  8014. * @n None
  8015. *
  8016. * @b Reads
  8017. * @n SRIO_RIO_SP_ERR_THRESH_ERR_RFT, SRIO_RIO_SP_ERR_THRESH_ERR_RDT
  8018. *
  8019. * @b Example
  8020. * @verbatim
  8021. CSL_SrioHandle hSrio;
  8022. Uint8 errRateFailedThreshold;
  8023. Uint8 errRateDegradeThreshold;
  8024. // Open the CSL SRIO Module 0
  8025. hSrio = CSL_SRIO_Open (0);
  8026. // Get the Error Rate Threshold Information.
  8027. CSL_SRIO_GetErrorRateThreshold (hSrio, 1, &errRateFailedThreshold, &errRateDegradeThreshold);
  8028. ...
  8029. @endverbatim
  8030. * =============================================================================
  8031. */
  8032. static inline void CSL_SRIO_GetErrorRateThreshold
  8033. (
  8034. CSL_SrioHandle hSrio,
  8035. Uint8 portNum,
  8036. Uint8* errRateFailedThreshold,
  8037. Uint8* errRateDegradeThreshold
  8038. )
  8039. {
  8040. *errRateFailedThreshold = CSL_FEXT (hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_THRESH, SRIO_RIO_SP_ERR_THRESH_ERR_RFT);
  8041. *errRateDegradeThreshold = CSL_FEXT (hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_THRESH, SRIO_RIO_SP_ERR_THRESH_ERR_RDT);
  8042. }
  8043. /** ============================================================================
  8044. * @n@b CSL_SRIO_SetErrorRateThreshold
  8045. *
  8046. * @b Description
  8047. * @n The function is used to set the error rate threshold.
  8048. *
  8049. * @b Arguments
  8050. @verbatim
  8051. hSrio Handle of the SRIO device
  8052. portNum SRIO Port Number
  8053. errRateFailedThreshold Threshold value for reporting an error condition
  8054. due to possibly broken link
  8055. errRateDegradeThreshold Threshold value for reporting an error condition
  8056. due to a degrading link.
  8057. @endverbatim
  8058. *
  8059. * <b> Return Value </b>
  8060. * @n None
  8061. *
  8062. * <b> Pre Condition </b>
  8063. * @n CSL_SRIO_Open() must be called
  8064. *
  8065. * <b> Post Condition </b>
  8066. * @n None
  8067. *
  8068. * @b Writes
  8069. * @n SRIO_RIO_SP_ERR_THRESH_ERR_RFT, SRIO_RIO_SP_ERR_THRESH_ERR_RDT
  8070. *
  8071. * @b Example
  8072. * @verbatim
  8073. CSL_SrioHandle hSrio;
  8074. // Open the CSL SRIO Module 0
  8075. hSrio = CSL_SRIO_Open (0);
  8076. // Set the Error Rate Threshold Information disabling both failed &
  8077. // degraded triggers
  8078. CSL_SRIO_SetErrorRateThreshold (hSrio, 1, 0x0, 0x0);
  8079. ...
  8080. @endverbatim
  8081. * =============================================================================
  8082. */
  8083. static inline void CSL_SRIO_SetErrorRateThreshold
  8084. (
  8085. CSL_SrioHandle hSrio,
  8086. Uint8 portNum,
  8087. Uint8 errRateFailedThreshold,
  8088. Uint8 errRateDegradeThreshold
  8089. )
  8090. {
  8091. hSrio->RIO_SP_ERR[portNum].RIO_SP_ERR_THRESH =
  8092. CSL_FMK (SRIO_RIO_SP_ERR_THRESH_ERR_RFT, errRateFailedThreshold) |
  8093. CSL_FMK (SRIO_RIO_SP_ERR_THRESH_ERR_RDT, errRateDegradeThreshold);
  8094. }
  8095. /** ============================================================================
  8096. * @n@b CSL_SRIO_GetLaneStatus
  8097. *
  8098. * @b Description
  8099. * @n The function is used to get the lane status information.
  8100. *
  8101. * @b Arguments
  8102. @verbatim
  8103. hSrio Handle of the SRIO device
  8104. portNum SRIO Port Number
  8105. ptrLaneStatus Pointer to the Lane status
  8106. @endverbatim
  8107. *
  8108. * <b> Return Value </b>
  8109. * @n None
  8110. *
  8111. * <b> Pre Condition </b>
  8112. * @n CSL_SRIO_Open() must be called
  8113. *
  8114. * <b> Post Condition </b>
  8115. * @n None
  8116. *
  8117. * @b Reads
  8118. * @n SRIO_RIO_LANE_STAT0_PORT_NUM, SRIO_RIO_LANE_STAT0_LANE_NUM,
  8119. * @n SRIO_RIO_LANE_STAT0_TX_TYPE, SRIO_RIO_LANE_STAT0_TX_MODE,
  8120. * @n SRIO_RIO_LANE_STAT0_RX_TYPE, SRIO_RIO_LANE_STAT0_RX_INV,
  8121. * @n SRIO_RIO_LANE_STAT0_RX_TRN, SRIO_RIO_LANE_STAT0_RX_SYNC,
  8122. * @n SRIO_RIO_LANE_STAT0_RX_RDY, SRIO_RIO_LANE_STAT0_ERR_CNT,
  8123. * @n SRIO_RIO_LANE_STAT0_CHG_SYNC, SRIO_RIO_LANE_STAT0_CHG_TRN,
  8124. * @n SRIO_RIO_LANE_STAT0_STAT1, SRIO_RIO_LANE_STAT0_STAT2_7,
  8125. * @n SRIO_RIO_LANE_STAT1_IDLE2, SRIO_RIO_LANE_STAT1_INFO_OK,
  8126. * @n SRIO_RIO_LANE_STAT1_CHG, SRIO_RIO_LANE_STAT1_IMPL_SPEC,
  8127. * @n SRIO_RIO_LANE_STAT1_LP_RX_TRN, SRIO_RIO_LANE_STAT1_LP_WIDTH,
  8128. * @n SRIO_RIO_LANE_STAT1_LP_LANE_NUM, SRIO_RIO_LANE_STAT1_LP_TAP_M1,
  8129. * @n SRIO_RIO_LANE_STAT1_LP_TAP_P1, SRIO_RIO_LANE_STAT1_LP_SCRM
  8130. *
  8131. * @b Example
  8132. * @verbatim
  8133. CSL_SrioHandle hSrio;
  8134. SRIO_LANE_STATUS laneStatus;
  8135. // Open the CSL SRIO Module 0
  8136. hSrio = CSL_SRIO_Open (0);
  8137. // Get the Lane Status Information.
  8138. CSL_SRIO_GetLaneStatus (hSrio, 1, &laneStatus);
  8139. ...
  8140. @endverbatim
  8141. * =============================================================================
  8142. */
  8143. static inline void CSL_SRIO_GetLaneStatus
  8144. (
  8145. CSL_SrioHandle hSrio,
  8146. Uint8 portNum,
  8147. SRIO_LANE_STATUS* ptrLaneStatus
  8148. )
  8149. {
  8150. Uint32 value = hSrio->RIO_LANE[portNum].RIO_LANE_STAT0;
  8151. /* Populate the lane status */
  8152. ptrLaneStatus->portNum = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_PORT_NUM);
  8153. ptrLaneStatus->laneNum = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_LANE_NUM);
  8154. ptrLaneStatus->txType = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_TX_TYPE);
  8155. ptrLaneStatus->txMode = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_TX_MODE);
  8156. ptrLaneStatus->rxType = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_RX_TYPE);
  8157. ptrLaneStatus->rxInv = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_RX_INV);
  8158. ptrLaneStatus->rxTrn = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_RX_TRN);
  8159. ptrLaneStatus->rxSync = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_RX_SYNC);
  8160. ptrLaneStatus->rxReady = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_RX_RDY);
  8161. ptrLaneStatus->errCnt = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_ERR_CNT);
  8162. ptrLaneStatus->chgSync = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_CHG_SYNC);
  8163. ptrLaneStatus->chgTrn = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_CHG_TRN);
  8164. ptrLaneStatus->stat1 = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_STAT1);
  8165. ptrLaneStatus->stat2_7 = CSL_FEXT (value, SRIO_RIO_LANE_STAT0_STAT2_7);
  8166. /* Get the lane status 1 */
  8167. value = hSrio->RIO_LANE[portNum].RIO_LANE_STAT1;
  8168. /* Populate the lane status */
  8169. ptrLaneStatus->idle2 = CSL_FEXT (value, SRIO_RIO_LANE_STAT1_IDLE2);
  8170. ptrLaneStatus->infoOk = CSL_FEXT (value, SRIO_RIO_LANE_STAT1_INFO_OK);
  8171. ptrLaneStatus->chg = CSL_FEXT (value, SRIO_RIO_LANE_STAT1_CHG);
  8172. ptrLaneStatus->implSpecific = CSL_FEXT (value, SRIO_RIO_LANE_STAT1_IMPL_SPEC);
  8173. ptrLaneStatus->lpRxTrn = CSL_FEXT (value, SRIO_RIO_LANE_STAT1_LP_RX_TRN);
  8174. ptrLaneStatus->lpWidth = CSL_FEXT (value, SRIO_RIO_LANE_STAT1_LP_WIDTH);
  8175. ptrLaneStatus->lpLaneNum = CSL_FEXT (value, SRIO_RIO_LANE_STAT1_LP_LANE_NUM);
  8176. ptrLaneStatus->lpTapM1 = CSL_FEXT (value, SRIO_RIO_LANE_STAT1_LP_TAP_M1);
  8177. ptrLaneStatus->lpTapP1 = CSL_FEXT (value, SRIO_RIO_LANE_STAT1_LP_TAP_P1);
  8178. ptrLaneStatus->lpScrm = CSL_FEXT (value, SRIO_RIO_LANE_STAT1_LP_SCRM);
  8179. }
  8180. /** ============================================================================
  8181. * @n@b CSL_SRIO_GetPortPLMImplSpecificControl
  8182. *
  8183. * @b Description
  8184. * @n The function is used to get the PLM Implementation Specific control
  8185. *
  8186. * @b Arguments
  8187. @verbatim
  8188. hSrio Handle of the SRIO device
  8189. portNum SRIO Port Number
  8190. ptrPLMControl Pointer to the PLM Implementation specific control
  8191. @endverbatim
  8192. *
  8193. * <b> Return Value </b>
  8194. * @n None
  8195. *
  8196. * <b> Pre Condition </b>
  8197. * @n CSL_SRIO_Open() must be called
  8198. *
  8199. * <b> Post Condition </b>
  8200. * @n None
  8201. *
  8202. * @b Reads
  8203. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_PAYL_CAP, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_USE_IDLE2,
  8204. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_USE_IDLE1, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_DLB_EN,
  8205. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_FORCE_REINIT, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SOFT_RST_PORT,
  8206. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_TX_BYPASS, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_LLB_EN,
  8207. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_PORT_SELF_RST, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SELF_RST,
  8208. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SWAP_TX, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SWAP_RX,
  8209. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_DLT_THRESH
  8210. *
  8211. * @b Example
  8212. * @verbatim
  8213. CSL_SrioHandle hSrio;
  8214. SRIO_PLM_IMPL_CONTROL implControl;
  8215. // Open the CSL SRIO Module 0
  8216. hSrio = CSL_SRIO_Open (0);
  8217. // Get the PLM Implementation specific control
  8218. CSL_SRIO_GetPortPLMImplSpecificControl (hSrio, 1, &implControl);
  8219. ...
  8220. @endverbatim
  8221. * =============================================================================
  8222. */
  8223. static inline void CSL_SRIO_GetPortPLMImplSpecificControl
  8224. (
  8225. CSL_SrioHandle hSrio,
  8226. Uint8 portNum,
  8227. SRIO_PLM_IMPL_CONTROL* ptrPLMControl
  8228. )
  8229. {
  8230. Uint32 value = hSrio->RIO_PLM[portNum].RIO_PLM_SP_IMP_SPEC_CTL;
  8231. /* Populate the PLM implementation specific control */
  8232. ptrPLMControl->payloadCapture = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_PAYL_CAP);
  8233. ptrPLMControl->useIdle2 = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_USE_IDLE2);
  8234. ptrPLMControl->useIdle1 = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_USE_IDLE1);
  8235. ptrPLMControl->dlbEn = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_DLB_EN);
  8236. ptrPLMControl->forceReinit = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_FORCE_REINIT);
  8237. ptrPLMControl->softRstPort = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SOFT_RST_PORT);
  8238. ptrPLMControl->txBypass = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_TX_BYPASS);
  8239. ptrPLMControl->lineLoopbackMode = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_LLB_EN);
  8240. ptrPLMControl->portSelfReset = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_PORT_SELF_RST);
  8241. ptrPLMControl->selfReset = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SELF_RST);
  8242. ptrPLMControl->swapTx = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SWAP_TX);
  8243. ptrPLMControl->swapRx = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SWAP_RX);
  8244. ptrPLMControl->dltThresh = CSL_FEXT (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_DLT_THRESH);
  8245. }
  8246. /** ============================================================================
  8247. * @n@b CSL_SRIO_SetPLMPortImplSpecificControl
  8248. *
  8249. * @b Description
  8250. * @n The function is used to set the PLM Implementation Specific control
  8251. *
  8252. * @b Arguments
  8253. @verbatim
  8254. hSrio Handle of the SRIO device
  8255. portNum SRIO Port Number
  8256. ptrPLMControl Pointer to the PLM Implementation specific control
  8257. @endverbatim
  8258. *
  8259. * <b> Return Value </b>
  8260. * @n None
  8261. *
  8262. * <b> Pre Condition </b>
  8263. * @n CSL_SRIO_Open() must be called
  8264. *
  8265. * <b> Post Condition </b>
  8266. * @n None
  8267. *
  8268. * @b Writes
  8269. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_PAYL_CAP, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_USE_IDLE2,
  8270. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_USE_IDLE1, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_DLB_EN,
  8271. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_FORCE_REINIT, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SOFT_RST_PORT,
  8272. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_TX_BYPASS, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_LLB_EN,
  8273. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_PORT_SELF_RST, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SELF_RST,
  8274. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SWAP_TX, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SWAP_RX,
  8275. * @n SRIO_RIO_PLM_SP_IMP_SPEC_CTL_DLT_THRESH
  8276. *
  8277. * @b Example
  8278. * @verbatim
  8279. CSL_SrioHandle hSrio;
  8280. SRIO_PLM_IMPL_CONTROL implControl;
  8281. // Open the CSL SRIO Module 0
  8282. hSrio = CSL_SRIO_Open (0);
  8283. // Get the PLM Implementation specific control
  8284. CSL_SRIO_GetPortPLMImplSpecificControl (hSrio, 1, &implControl);
  8285. // Bypass the tx clock crossing the FIFO
  8286. implControl.txBypass = 1;
  8287. CSL_SRIO_SetPLMPortImplSpecificControl (hSrio, 1, &implControl);
  8288. ...
  8289. @endverbatim
  8290. * =============================================================================
  8291. */
  8292. static inline void CSL_SRIO_SetPLMPortImplSpecificControl
  8293. (
  8294. CSL_SrioHandle hSrio,
  8295. Uint8 portNum,
  8296. SRIO_PLM_IMPL_CONTROL* ptrPLMControl
  8297. )
  8298. {
  8299. Uint32 value = 0;
  8300. /* Populate the PLM implementation specific control */
  8301. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_PAYL_CAP, ptrPLMControl->payloadCapture);
  8302. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_USE_IDLE2, ptrPLMControl->useIdle2);
  8303. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_USE_IDLE1, ptrPLMControl->useIdle1);
  8304. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_DLB_EN, ptrPLMControl->dlbEn);
  8305. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_FORCE_REINIT, ptrPLMControl->forceReinit);
  8306. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SOFT_RST_PORT, ptrPLMControl->softRstPort);
  8307. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_TX_BYPASS, ptrPLMControl->txBypass);
  8308. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_LLB_EN, ptrPLMControl->lineLoopbackMode);
  8309. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_PORT_SELF_RST, ptrPLMControl->portSelfReset);
  8310. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SELF_RST, ptrPLMControl->selfReset);
  8311. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SWAP_TX, ptrPLMControl->swapTx);
  8312. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_SWAP_RX, ptrPLMControl->swapRx);
  8313. CSL_FINS (value, SRIO_RIO_PLM_SP_IMP_SPEC_CTL_DLT_THRESH, ptrPLMControl->dltThresh);
  8314. hSrio->RIO_PLM[portNum].RIO_PLM_SP_IMP_SPEC_CTL = value;
  8315. }
  8316. /** ============================================================================
  8317. * @n@b CSL_SRIO_GetPLMPortPowerDownControl
  8318. *
  8319. * @b Description
  8320. * @n The function is used to get the PLM Port Power Down status
  8321. *
  8322. * @b Arguments
  8323. @verbatim
  8324. hSrio Handle of the SRIO device
  8325. portNum SRIO Port Number
  8326. powerDownStatus Power Down Status
  8327. @endverbatim
  8328. *
  8329. * <b> Return Value </b>
  8330. * @n None
  8331. *
  8332. * <b> Pre Condition </b>
  8333. * @n CSL_SRIO_Open() must be called
  8334. *
  8335. * <b> Post Condition </b>
  8336. * @n None
  8337. *
  8338. * @b Reads
  8339. * @n SRIO_RIO_PLM_SP_PWDN_CTL_PWDN_PORT
  8340. *
  8341. * @b Example
  8342. * @verbatim
  8343. CSL_SrioHandle hSrio;
  8344. Uint8 powerDownStatus;
  8345. // Open the CSL SRIO Module 0
  8346. hSrio = CSL_SRIO_Open (0);
  8347. // Get the PLM Power Down Status
  8348. CSL_SRIO_GetPLMPortPowerDownControl (hSrio, 1, &powerDownStatus);
  8349. ...
  8350. @endverbatim
  8351. * =============================================================================
  8352. */
  8353. static inline void CSL_SRIO_GetPLMPortPowerDownControl
  8354. (
  8355. CSL_SrioHandle hSrio,
  8356. Uint8 portNum,
  8357. Uint8* powerDownStatus
  8358. )
  8359. {
  8360. *powerDownStatus = CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_PWDN_CTL, SRIO_RIO_PLM_SP_PWDN_CTL_PWDN_PORT);
  8361. }
  8362. /** ============================================================================
  8363. * @n@b CSL_SRIO_SetPLMPortPowerDownControl
  8364. *
  8365. * @b Description
  8366. * @n The function is used to set the PLM Port Power Down status
  8367. *
  8368. * @b Arguments
  8369. @verbatim
  8370. hSrio Handle of the SRIO device
  8371. portNum SRIO Port Number
  8372. powerDownStatus Power Down Status
  8373. @endverbatim
  8374. *
  8375. * <b> Return Value </b>
  8376. * @n None
  8377. *
  8378. * <b> Pre Condition </b>
  8379. * @n CSL_SRIO_Open() must be called
  8380. *
  8381. * <b> Post Condition </b>
  8382. * @n None
  8383. *
  8384. * @b Writes
  8385. * @n SRIO_RIO_PLM_SP_PWDN_CTL_PWDN_PORT
  8386. *
  8387. * @b Example
  8388. * @verbatim
  8389. CSL_SrioHandle hSrio;
  8390. // Open the CSL SRIO Module 0
  8391. hSrio = CSL_SRIO_Open (0);
  8392. // Set the PLM Port to be powered down
  8393. CSL_SRIO_SetPLMPortPowerDownControl (hSrio, 1, 1);
  8394. ...
  8395. @endverbatim
  8396. * =============================================================================
  8397. */
  8398. static inline void CSL_SRIO_SetPLMPortPowerDownControl
  8399. (
  8400. CSL_SrioHandle hSrio,
  8401. Uint8 portNum,
  8402. Uint8 powerDownStatus
  8403. )
  8404. {
  8405. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_PWDN_CTL, SRIO_RIO_PLM_SP_PWDN_CTL_PWDN_PORT, powerDownStatus);
  8406. }
  8407. /** ============================================================================
  8408. * @n@b CSL_SRIO_IsPLMPortMaxDenialErrorSet
  8409. *
  8410. * @b Description
  8411. * @n The function is used to check if the PLM Port Max. Denial error set.
  8412. *
  8413. * @b Arguments
  8414. @verbatim
  8415. hSrio Handle of the SRIO device
  8416. portNum SRIO Port Number
  8417. @endverbatim
  8418. *
  8419. * <b> Return Value </b>
  8420. * @n TRUE - Max. Denial Error is set
  8421. * @n FALSE - Max. Denial Error is not set
  8422. *
  8423. * <b> Pre Condition </b>
  8424. * @n CSL_SRIO_Open() must be called
  8425. *
  8426. * <b> Post Condition </b>
  8427. * @n None
  8428. *
  8429. * @b Reads
  8430. * @n SRIO_RIO_PLM_SP_STATUS_MAX_DENIAL
  8431. *
  8432. * @b Example
  8433. * @verbatim
  8434. CSL_SrioHandle hSrio;
  8435. // Open the CSL SRIO Module 0
  8436. hSrio = CSL_SRIO_Open (0);
  8437. // Is the MAX Denial Error set?
  8438. if (CSL_SRIO_IsPLMPortMaxDenialErrorSet (hSrio, 1) == TRUE)
  8439. {
  8440. // MAX Denial error is set
  8441. }
  8442. else
  8443. {
  8444. // MAX Denial error is NOT set
  8445. }
  8446. ...
  8447. @endverbatim
  8448. * =============================================================================
  8449. */
  8450. static inline Bool CSL_SRIO_IsPLMPortMaxDenialErrorSet
  8451. (
  8452. CSL_SrioHandle hSrio,
  8453. Uint8 portNum
  8454. )
  8455. {
  8456. if (CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_MAX_DENIAL) == 1)
  8457. return TRUE;
  8458. return FALSE;
  8459. }
  8460. /** ============================================================================
  8461. * @n@b CSL_SRIO_ClearPLMPortMaxDenialErrorSet
  8462. *
  8463. * @b Description
  8464. * @n The function is used to clear the PLM Port Max. Denial error
  8465. *
  8466. * @b Arguments
  8467. @verbatim
  8468. hSrio Handle of the SRIO device
  8469. portNum SRIO Port Number
  8470. @endverbatim
  8471. *
  8472. * <b> Return Value </b>
  8473. * @n None
  8474. *
  8475. * <b> Pre Condition </b>
  8476. * @n CSL_SRIO_Open() must be called
  8477. *
  8478. * <b> Post Condition </b>
  8479. * @n None
  8480. *
  8481. * @b Writes
  8482. * @n SRIO_RIO_PLM_SP_STATUS_MAX_DENIAL=1
  8483. *
  8484. * @b Affects
  8485. * @n SRIO_RIO_PLM_SP_STATUS_MAX_DENIAL=0
  8486. *
  8487. * @b Example
  8488. * @verbatim
  8489. CSL_SrioHandle hSrio;
  8490. // Open the CSL SRIO Module 0
  8491. hSrio = CSL_SRIO_Open (0);
  8492. // Is the MAX Denial Error set?
  8493. if (CSL_SRIO_IsPLMPortMaxDenialErrorSet (hSrio, 1) == TRUE)
  8494. {
  8495. // MAX Denial error is set
  8496. ...
  8497. // Clear the MAX Denial Error
  8498. CSL_SRIO_ClearPLMPortMaxDenialErrorSet (hSrio, 1);
  8499. }
  8500. else
  8501. {
  8502. // MAX Denial error is NOT set
  8503. }
  8504. ...
  8505. @endverbatim
  8506. * =============================================================================
  8507. */
  8508. static inline void CSL_SRIO_ClearPLMPortMaxDenialErrorSet
  8509. (
  8510. CSL_SrioHandle hSrio,
  8511. Uint8 portNum
  8512. )
  8513. {
  8514. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_MAX_DENIAL, (Uint32)1);
  8515. }
  8516. /** ============================================================================
  8517. * @n@b CSL_SRIO_IsPLMPortLinkInitialized
  8518. *
  8519. * @b Description
  8520. * @n The function is used to check if the PLM Port Link Initialized
  8521. *
  8522. * @b Arguments
  8523. @verbatim
  8524. hSrio Handle of the SRIO device
  8525. portNum SRIO Port Number
  8526. @endverbatim
  8527. *
  8528. * <b> Return Value </b>
  8529. * @n TRUE - Port Link Initialized is set
  8530. * @n FALSE - Port Link Initialized is not set
  8531. *
  8532. * <b> Pre Condition </b>
  8533. * @n CSL_SRIO_Open() must be called
  8534. *
  8535. * <b> Post Condition </b>
  8536. * @n None
  8537. *
  8538. * @b Reads
  8539. * @n SRIO_RIO_PLM_SP_STATUS_LINK_INIT
  8540. *
  8541. * @b Example
  8542. * @verbatim
  8543. CSL_SrioHandle hSrio;
  8544. // Open the CSL SRIO Module 0
  8545. hSrio = CSL_SRIO_Open (0);
  8546. // Is the PLM Port Link Initialized?
  8547. if (CSL_SRIO_IsPLMPortLinkInitialized (hSrio, 1) == TRUE)
  8548. {
  8549. // PLM Port Link is initialized
  8550. }
  8551. else
  8552. {
  8553. // PLM Port Link is NOT initialized
  8554. }
  8555. ...
  8556. @endverbatim
  8557. * =============================================================================
  8558. */
  8559. static inline Bool CSL_SRIO_IsPLMPortLinkInitialized
  8560. (
  8561. CSL_SrioHandle hSrio,
  8562. Uint8 portNum
  8563. )
  8564. {
  8565. if (CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_LINK_INIT) == 1)
  8566. return TRUE;
  8567. return FALSE;
  8568. }
  8569. /** ============================================================================
  8570. * @n@b CSL_SRIO_ClearPLMPortLinkInitialized
  8571. *
  8572. * @b Description
  8573. * @n The function is used to clear the PLM Port Link Initialization notification
  8574. *
  8575. * @b Arguments
  8576. @verbatim
  8577. hSrio Handle of the SRIO device
  8578. portNum SRIO Port Number
  8579. @endverbatim
  8580. *
  8581. * <b> Return Value </b>
  8582. * @n None
  8583. *
  8584. * <b> Pre Condition </b>
  8585. * @n CSL_SRIO_Open() must be called
  8586. *
  8587. * <b> Post Condition </b>
  8588. * @n None
  8589. *
  8590. * @b Writes
  8591. * @n SRIO_RIO_PLM_SP_STATUS_LINK_INIT=1
  8592. *
  8593. * @b Affects
  8594. * @n SRIO_RIO_PLM_SP_STATUS_LINK_INIT=0
  8595. *
  8596. * @b Example
  8597. * @verbatim
  8598. CSL_SrioHandle hSrio;
  8599. // Open the CSL SRIO Module 0
  8600. hSrio = CSL_SRIO_Open (0);
  8601. // Is the PLM Link Initialized?
  8602. if (CSL_SRIO_IsPLMPortLinkInitialized (hSrio, 1) == TRUE)
  8603. {
  8604. // Link is initialized
  8605. ...
  8606. // Clear the Link initialization notification
  8607. CSL_SRIO_ClearPLMPortMaxDenialErrorSet (hSrio, 1);
  8608. }
  8609. else
  8610. {
  8611. // Link is not initialized
  8612. }
  8613. ...
  8614. @endverbatim
  8615. * =============================================================================
  8616. */
  8617. static inline void CSL_SRIO_ClearPLMPortLinkInitialized
  8618. (
  8619. CSL_SrioHandle hSrio,
  8620. Uint8 portNum
  8621. )
  8622. {
  8623. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_LINK_INIT, 1);
  8624. }
  8625. /** ============================================================================
  8626. * @n@b CSL_SRIO_IsPLMPortDeadLink
  8627. *
  8628. * @b Description
  8629. * @n The function is used to check if the PLM Port has detected that the link
  8630. * partner has been removed
  8631. *
  8632. * @b Arguments
  8633. @verbatim
  8634. hSrio Handle of the SRIO device
  8635. portNum SRIO Port Number
  8636. @endverbatim
  8637. *
  8638. * <b> Return Value </b>
  8639. * @n TRUE - Link partner has been removed
  8640. * @n FALSE - Link partner has not been removed
  8641. *
  8642. * <b> Pre Condition </b>
  8643. * @n CSL_SRIO_Open() must be called
  8644. *
  8645. * <b> Post Condition </b>
  8646. * @n None
  8647. *
  8648. * @b Reads
  8649. * @n SRIO_RIO_PLM_SP_STATUS_DLT
  8650. *
  8651. * @b Example
  8652. * @verbatim
  8653. CSL_SrioHandle hSrio;
  8654. // Open the CSL SRIO Module 0
  8655. hSrio = CSL_SRIO_Open (0);
  8656. // Is the PLM Port Dead Link detected?
  8657. if (CSL_SRIO_IsPLMPortDeadLink (hSrio, 1) == TRUE)
  8658. {
  8659. // PLM Port Dead Link detected
  8660. }
  8661. else
  8662. {
  8663. // PLM Port Dead Link NOT detected
  8664. }
  8665. ...
  8666. @endverbatim
  8667. * =============================================================================
  8668. */
  8669. static inline Bool CSL_SRIO_IsPLMPortDeadLink
  8670. (
  8671. CSL_SrioHandle hSrio,
  8672. Uint8 portNum
  8673. )
  8674. {
  8675. if (CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_DLT) == 1)
  8676. return TRUE;
  8677. return FALSE;
  8678. }
  8679. /** ============================================================================
  8680. * @n@b CSL_SRIO_ClearPLMPortDeadLink
  8681. *
  8682. * @b Description
  8683. * @n The function is used to clear the PLM Port Dead Link event
  8684. *
  8685. * @b Arguments
  8686. @verbatim
  8687. hSrio Handle of the SRIO device
  8688. portNum SRIO Port Number
  8689. @endverbatim
  8690. *
  8691. * <b> Return Value </b>
  8692. * @n None
  8693. *
  8694. * <b> Pre Condition </b>
  8695. * @n CSL_SRIO_Open() must be called
  8696. *
  8697. * <b> Post Condition </b>
  8698. * @n None
  8699. *
  8700. * @b Writes
  8701. * @n SRIO_RIO_PLM_SP_STATUS_DLT=1
  8702. *
  8703. * @b Affects
  8704. * @n SRIO_RIO_PLM_SP_STATUS_DLT=0
  8705. *
  8706. * @b Example
  8707. * @verbatim
  8708. CSL_SrioHandle hSrio;
  8709. // Open the CSL SRIO Module 0
  8710. hSrio = CSL_SRIO_Open (0);
  8711. // Is the PLM Port Dead Link detected?
  8712. if (CSL_SRIO_IsPLMPortDeadLink (hSrio, 1) == TRUE)
  8713. {
  8714. // PLM Port Dead Link detected
  8715. ...
  8716. // Clear the Dead Link Event
  8717. CSL_SRIO_ClearPLMPortDeadLink (hSrio, 1);
  8718. }
  8719. else
  8720. {
  8721. // PLM Port Dead Link NOT detected
  8722. }
  8723. ...
  8724. @endverbatim
  8725. * =============================================================================
  8726. */
  8727. static inline void CSL_SRIO_ClearPLMPortDeadLink
  8728. (
  8729. CSL_SrioHandle hSrio,
  8730. Uint8 portNum
  8731. )
  8732. {
  8733. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_DLT, 1);
  8734. }
  8735. /** ============================================================================
  8736. * @n@b CSL_SRIO_IsPLMPortError
  8737. *
  8738. * @b Description
  8739. * @n The function is used to check if the PLM Port has detected an error
  8740. *
  8741. * @b Arguments
  8742. @verbatim
  8743. hSrio Handle of the SRIO device
  8744. portNum SRIO Port Number
  8745. @endverbatim
  8746. *
  8747. * <b> Return Value </b>
  8748. * @n TRUE - Link error has been detected
  8749. * @n FALSE - Link error has NOT been detected
  8750. *
  8751. * <b> Pre Condition </b>
  8752. * @n CSL_SRIO_Open() must be called
  8753. *
  8754. * <b> Post Condition </b>
  8755. * @n None
  8756. *
  8757. * @b Reads
  8758. * @n SRIO_RIO_PLM_SP_STATUS_PORT_ERR
  8759. *
  8760. * @b Example
  8761. * @verbatim
  8762. CSL_SrioHandle hSrio;
  8763. // Open the CSL SRIO Module 0
  8764. hSrio = CSL_SRIO_Open (0);
  8765. // Is the PLM Port error detected?
  8766. if (CSL_SRIO_IsPLMPortError (hSrio, 1) == TRUE)
  8767. {
  8768. // PLM Port error detected
  8769. }
  8770. else
  8771. {
  8772. // PLM Port error NOT detected
  8773. }
  8774. ...
  8775. @endverbatim
  8776. * =============================================================================
  8777. */
  8778. static inline Bool CSL_SRIO_IsPLMPortError
  8779. (
  8780. CSL_SrioHandle hSrio,
  8781. Uint8 portNum
  8782. )
  8783. {
  8784. if (CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_PORT_ERR) == 1)
  8785. return TRUE;
  8786. return FALSE;
  8787. }
  8788. /** ============================================================================
  8789. * @n@b CSL_SRIO_ClearPLMPortError
  8790. *
  8791. * @b Description
  8792. * @n The function is used to clear the PLM Port Error
  8793. *
  8794. * @b Arguments
  8795. @verbatim
  8796. hSrio Handle of the SRIO device
  8797. portNum SRIO Port Number
  8798. @endverbatim
  8799. *
  8800. * <b> Return Value </b>
  8801. * @n None
  8802. *
  8803. * <b> Pre Condition </b>
  8804. * @n CSL_SRIO_Open() must be called
  8805. *
  8806. * <b> Post Condition </b>
  8807. * @n None
  8808. *
  8809. * @b Writes
  8810. * @n SRIO_RIO_PLM_SP_STATUS_PORT_ERR=1
  8811. *
  8812. * @b Affects
  8813. * @n SRIO_RIO_PLM_SP_STATUS_PORT_ERR=0
  8814. *
  8815. * @b Example
  8816. * @verbatim
  8817. CSL_SrioHandle hSrio;
  8818. // Open the CSL SRIO Module 0
  8819. hSrio = CSL_SRIO_Open (0);
  8820. // Is the PLM Port error detected?
  8821. if (CSL_SRIO_IsPLMPortError (hSrio, 1) == TRUE)
  8822. {
  8823. // PLM Port error detected
  8824. ...
  8825. // Clear the PLM Port Error.
  8826. CSL_SRIO_ClearPLMPortError(hSrio, 1);
  8827. }
  8828. else
  8829. {
  8830. // PLM Port error NOT detected
  8831. }
  8832. ...
  8833. @endverbatim
  8834. * =============================================================================
  8835. */
  8836. static inline void CSL_SRIO_ClearPLMPortError
  8837. (
  8838. CSL_SrioHandle hSrio,
  8839. Uint8 portNum
  8840. )
  8841. {
  8842. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_PORT_ERR, 1);
  8843. }
  8844. /** ============================================================================
  8845. * @n@b CSL_SRIO_IsPLMPortOutputFail
  8846. *
  8847. * @b Description
  8848. * @n The function is used to check if the PLM Port has detected an output fail
  8849. *
  8850. * @b Arguments
  8851. @verbatim
  8852. hSrio Handle of the SRIO device
  8853. portNum SRIO Port Number
  8854. @endverbatim
  8855. *
  8856. * <b> Return Value </b>
  8857. * @n TRUE - Output fail has been detected
  8858. * @n FALSE - Output fail has NOT been detected
  8859. *
  8860. * <b> Pre Condition </b>
  8861. * @n CSL_SRIO_Open() must be called
  8862. *
  8863. * <b> Post Condition </b>
  8864. * @n None
  8865. *
  8866. * @b Reads
  8867. * @n SRIO_RIO_PLM_SP_STATUS_OUTPUT_FAIL
  8868. *
  8869. * @b Example
  8870. * @verbatim
  8871. CSL_SrioHandle hSrio;
  8872. // Open the CSL SRIO Module 0
  8873. hSrio = CSL_SRIO_Open (0);
  8874. // Is the PLM Port Output fail detected?
  8875. if (CSL_SRIO_IsPLMPortOutputFail (hSrio, 1) == TRUE)
  8876. {
  8877. // PLM Port Output fail detected
  8878. }
  8879. else
  8880. {
  8881. // PLM Port Output fail NOT detected
  8882. }
  8883. ...
  8884. @endverbatim
  8885. * =============================================================================
  8886. */
  8887. static inline Bool CSL_SRIO_IsPLMPortOutputFail
  8888. (
  8889. CSL_SrioHandle hSrio,
  8890. Uint8 portNum
  8891. )
  8892. {
  8893. if (CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_OUTPUT_FAIL) == 1)
  8894. return TRUE;
  8895. return FALSE;
  8896. }
  8897. /** ============================================================================
  8898. * @n@b CSL_SRIO_ClearPLMPortOutputFail
  8899. *
  8900. * @b Description
  8901. * @n The function is used to clear the PLM Output Fail Port Error
  8902. *
  8903. * @b Arguments
  8904. @verbatim
  8905. hSrio Handle of the SRIO device
  8906. portNum SRIO Port Number
  8907. @endverbatim
  8908. *
  8909. * <b> Return Value </b>
  8910. * @n None
  8911. *
  8912. * <b> Pre Condition </b>
  8913. * @n CSL_SRIO_Open() must be called
  8914. *
  8915. * <b> Post Condition </b>
  8916. * @n None
  8917. *
  8918. * @b Writes
  8919. * @n SRIO_RIO_PLM_SP_STATUS_OUTPUT_FAIL=1
  8920. *
  8921. * @b Affects
  8922. * @n SRIO_RIO_PLM_SP_STATUS_OUTPUT_FAIL=0
  8923. *
  8924. * @b Example
  8925. * @verbatim
  8926. CSL_SrioHandle hSrio;
  8927. // Open the CSL SRIO Module 0
  8928. hSrio = CSL_SRIO_Open (0);
  8929. // Is the PLM Port Output fail detected?
  8930. if (CSL_SRIO_IsPLMPortOutputFail (hSrio, 1) == TRUE)
  8931. {
  8932. // PLM Port Output fail detected
  8933. ...
  8934. // Clear the PLM Outport error
  8935. CSL_SRIO_ClearPLMPortOutputFail (hSrio, 1);
  8936. }
  8937. else
  8938. {
  8939. // PLM Port Output fail NOT detected
  8940. }
  8941. ...
  8942. @endverbatim
  8943. * =============================================================================
  8944. */
  8945. static inline void CSL_SRIO_ClearPLMPortOutputFail
  8946. (
  8947. CSL_SrioHandle hSrio,
  8948. Uint8 portNum
  8949. )
  8950. {
  8951. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_OUTPUT_FAIL, 1);
  8952. }
  8953. /** ============================================================================
  8954. * @n@b CSL_SRIO_IsPLMPortOutputDegrade
  8955. *
  8956. * @b Description
  8957. * @n The function is used to check if the PLM Port has detected an output
  8958. * degrade
  8959. *
  8960. * @b Arguments
  8961. @verbatim
  8962. hSrio Handle of the SRIO device
  8963. portNum SRIO Port Number
  8964. @endverbatim
  8965. *
  8966. * <b> Return Value </b>
  8967. * @n TRUE - Output degrade has been detected
  8968. * @n FALSE - Output degrade has NOT been detected
  8969. *
  8970. * <b> Pre Condition </b>
  8971. * @n CSL_SRIO_Open() must be called
  8972. *
  8973. * <b> Post Condition </b>
  8974. * @n None
  8975. *
  8976. * @b Reads
  8977. * @n SRIO_RIO_PLM_SP_STATUS_OUTPUT_DEGR
  8978. *
  8979. * @b Example
  8980. * @verbatim
  8981. CSL_SrioHandle hSrio;
  8982. // Open the CSL SRIO Module 0
  8983. hSrio = CSL_SRIO_Open (0);
  8984. // Is the PLM Port Output degrade detected?
  8985. if (CSL_SRIO_IsPLMPortOutputDegrade (hSrio, 1) == TRUE)
  8986. {
  8987. // PLM Port Output degrade detected
  8988. }
  8989. else
  8990. {
  8991. // PLM Port Output degrade NOT detected
  8992. }
  8993. ...
  8994. @endverbatim
  8995. * =============================================================================
  8996. */
  8997. static inline Bool CSL_SRIO_IsPLMPortOutputDegrade
  8998. (
  8999. CSL_SrioHandle hSrio,
  9000. Uint8 portNum
  9001. )
  9002. {
  9003. if (CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_OUTPUT_DEGR) == 1)
  9004. return TRUE;
  9005. return FALSE;
  9006. }
  9007. /** ============================================================================
  9008. * @n@b CSL_SRIO_ClearPLMPortOutputDegrade
  9009. *
  9010. * @b Description
  9011. * @n The function is used to clear the PLM Output Degrade Port Error
  9012. *
  9013. * @b Arguments
  9014. @verbatim
  9015. hSrio Handle of the SRIO device
  9016. portNum SRIO Port Number
  9017. @endverbatim
  9018. *
  9019. * <b> Return Value </b>
  9020. * @n None
  9021. *
  9022. * <b> Pre Condition </b>
  9023. * @n CSL_SRIO_Open() must be called
  9024. *
  9025. * <b> Post Condition </b>
  9026. * @n None
  9027. *
  9028. * @b Writes
  9029. * @n SRIO_RIO_PLM_SP_STATUS_OUTPUT_DEGR=1
  9030. *
  9031. * @b Affects
  9032. * @n SRIO_RIO_PLM_SP_STATUS_OUTPUT_DEGR=0
  9033. *
  9034. * @b Example
  9035. * @verbatim
  9036. CSL_SrioHandle hSrio;
  9037. // Open the CSL SRIO Module 0
  9038. hSrio = CSL_SRIO_Open (0);
  9039. // Is the PLM Port Output degrade detected?
  9040. if (CSL_SRIO_IsPLMPortOutputDegrade (hSrio, 1) == TRUE)
  9041. {
  9042. // PLM Port Output degrade detected
  9043. ...
  9044. // Clear the PLM Output degrade condition
  9045. CSL_SRIO_ClearPLMPortOutputDegrade (hSrio, 1);
  9046. }
  9047. else
  9048. {
  9049. // PLM Port Output degrade NOT detected
  9050. }
  9051. ...
  9052. @endverbatim
  9053. * =============================================================================
  9054. */
  9055. static inline void CSL_SRIO_ClearPLMPortOutputDegrade
  9056. (
  9057. CSL_SrioHandle hSrio,
  9058. Uint8 portNum
  9059. )
  9060. {
  9061. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_OUTPUT_DEGR, 1);
  9062. }
  9063. /** ============================================================================
  9064. * @n@b CSL_SRIO_IsPLMPortMulticastCSDetected
  9065. *
  9066. * @b Description
  9067. * @n The function is used to check if the PLM Port Multicast event control
  9068. * symbol detected
  9069. *
  9070. * @b Arguments
  9071. @verbatim
  9072. hSrio Handle of the SRIO device
  9073. portNum SRIO Port Number
  9074. @endverbatim
  9075. *
  9076. * <b> Return Value </b>
  9077. * @n TRUE - Multicast event control symbol has been detected
  9078. * @n FALSE - Multicast event control symbol has NOT been detected
  9079. *
  9080. * <b> Pre Condition </b>
  9081. * @n CSL_SRIO_Open() must be called
  9082. *
  9083. * <b> Post Condition </b>
  9084. * @n None
  9085. *
  9086. * @b Reads
  9087. * @n SRIO_RIO_PLM_SP_STATUS_MECS
  9088. *
  9089. * @b Example
  9090. * @verbatim
  9091. CSL_SrioHandle hSrio;
  9092. // Open the CSL SRIO Module 0
  9093. hSrio = CSL_SRIO_Open (0);
  9094. // Is the PLM Port Multicast Event Control Symbol detected?
  9095. if (CSL_SRIO_IsPLMPortMulticastCSDetected (hSrio, 1) == TRUE)
  9096. {
  9097. // PLM Port Multicast Event Control Symbol detected
  9098. }
  9099. else
  9100. {
  9101. // PLM Port Multicast Event Control Symbol NOT detected
  9102. }
  9103. ...
  9104. @endverbatim
  9105. * =============================================================================
  9106. */
  9107. static inline Bool CSL_SRIO_IsPLMPortMulticastCSDetected
  9108. (
  9109. CSL_SrioHandle hSrio,
  9110. Uint8 portNum
  9111. )
  9112. {
  9113. if (CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_MECS) == 1)
  9114. return TRUE;
  9115. return FALSE;
  9116. }
  9117. /** ============================================================================
  9118. * @n@b CSL_SRIO_ClearPLMPortMulticastCS
  9119. *
  9120. * @b Description
  9121. * @n The function is used to clear the PLM Port Multicast Control Symbol
  9122. *
  9123. * @b Arguments
  9124. @verbatim
  9125. hSrio Handle of the SRIO device
  9126. portNum SRIO Port Number
  9127. @endverbatim
  9128. *
  9129. * <b> Return Value </b>
  9130. * @n None
  9131. *
  9132. * <b> Pre Condition </b>
  9133. * @n CSL_SRIO_Open() must be called
  9134. *
  9135. * <b> Post Condition </b>
  9136. * @n None
  9137. *
  9138. * @b Writes
  9139. * @n SRIO_RIO_PLM_SP_STATUS_MECS=1
  9140. *
  9141. * @b Affects
  9142. * @n SRIO_RIO_PLM_SP_STATUS_MECS=0
  9143. *
  9144. * @b Example
  9145. * @verbatim
  9146. CSL_SrioHandle hSrio;
  9147. // Open the CSL SRIO Module 0
  9148. hSrio = CSL_SRIO_Open (0);
  9149. // Is the PLM Port Multicast Event Control Symbol detected?
  9150. if (CSL_SRIO_IsPLMPortMulticastCSDetected (hSrio, 1) == TRUE)
  9151. {
  9152. // PLM Port Multicast Event Control Symbol detected
  9153. ...
  9154. // Clear the PLM Port Multicast Event Control Symbol
  9155. CSL_SRIO_ClearPLMPortMulticastCS (hSrio, 1);
  9156. }
  9157. else
  9158. {
  9159. // PLM Port Multicast Event Control Symbol NOT detected
  9160. }
  9161. ...
  9162. @endverbatim
  9163. * =============================================================================
  9164. */
  9165. static inline void CSL_SRIO_ClearPLMPortMulticastCS
  9166. (
  9167. CSL_SrioHandle hSrio,
  9168. Uint8 portNum
  9169. )
  9170. {
  9171. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_STATUS, SRIO_RIO_PLM_SP_STATUS_MECS, 1);
  9172. }
  9173. /** ============================================================================
  9174. * @n@b CSL_SRIO_GetPLMPortInterrupts
  9175. *
  9176. * @b Description
  9177. * @n The function is used to get the current status of the PLM Port Interrupts
  9178. *
  9179. * @b Arguments
  9180. @verbatim
  9181. hSrio Handle of the SRIO device
  9182. portNum SRIO Port Number
  9183. intStatus Current Interrupt status of the PLM port interrupts
  9184. @endverbatim
  9185. *
  9186. * <b> Return Value </b>
  9187. * @n None
  9188. *
  9189. * <b> Pre Condition </b>
  9190. * @n CSL_SRIO_Open() must be called
  9191. *
  9192. * <b> Post Condition </b>
  9193. * @n None
  9194. *
  9195. * @b Reads
  9196. * @n SRIO_RIO_PLM_SP_INT_ENABLE
  9197. *
  9198. * @b Example
  9199. * @verbatim
  9200. CSL_SrioHandle hSrio;
  9201. Uint8 intStatus;
  9202. // Open the CSL SRIO Module 0
  9203. hSrio = CSL_SRIO_Open (0);
  9204. // Get the current interrupt status
  9205. CSL_SRIO_GetPLMPortInterrupts(hSrio, 1, &intStatus);
  9206. ...
  9207. @endverbatim
  9208. * =============================================================================
  9209. */
  9210. static inline void CSL_SRIO_GetPLMPortInterrupts
  9211. (
  9212. CSL_SrioHandle hSrio,
  9213. Uint8 portNum,
  9214. Uint8* intStatus
  9215. )
  9216. {
  9217. *intStatus = hSrio->RIO_PLM[portNum].RIO_PLM_SP_INT_ENABLE;
  9218. }
  9219. /** ============================================================================
  9220. * @n@b CSL_SRIO_SetPLMPortInterrupts
  9221. *
  9222. * @b Description
  9223. * @n The function is used to set the current status of the PLM Port Interrupts
  9224. *
  9225. * @b Arguments
  9226. @verbatim
  9227. hSrio Handle of the SRIO device
  9228. portNum SRIO Port Number
  9229. intStatus Interrupt status to be configured
  9230. @endverbatim
  9231. *
  9232. * <b> Return Value </b>
  9233. * @n None
  9234. *
  9235. * <b> Pre Condition </b>
  9236. * @n CSL_SRIO_Open() must be called
  9237. *
  9238. * <b> Post Condition </b>
  9239. * @n None
  9240. *
  9241. * @b Writes
  9242. * @n SRIO_RIO_PLM_SP_INT_ENABLE
  9243. *
  9244. * @b Example
  9245. * @verbatim
  9246. CSL_SrioHandle hSrio;
  9247. Uint8 intStatus;
  9248. // Open the CSL SRIO Module 0
  9249. hSrio = CSL_SRIO_Open (0);
  9250. // Get the current interrupt status
  9251. CSL_SRIO_GetPLMPortInterrupts(hSrio, 1, &intStatus);
  9252. // Enable the Max Denial interrupt.
  9253. intStatus = intStatus | 0x1;
  9254. CSL_SRIO_SetPLMPortInterrupts(hSrio, 1, intStatus);
  9255. ...
  9256. @endverbatim
  9257. * =============================================================================
  9258. */
  9259. static inline void CSL_SRIO_SetPLMPortInterrupts
  9260. (
  9261. CSL_SrioHandle hSrio,
  9262. Uint8 portNum,
  9263. Uint8 intStatus
  9264. )
  9265. {
  9266. hSrio->RIO_PLM[portNum].RIO_PLM_SP_INT_ENABLE = intStatus;
  9267. }
  9268. /** ============================================================================
  9269. * @n@b CSL_SRIO_GetPLMPortWriteEnables
  9270. *
  9271. * @b Description
  9272. * @n The function is used to get the current status of the PLM Port Write
  9273. * enables. These events will enable a port write notification
  9274. *
  9275. * @b Arguments
  9276. @verbatim
  9277. hSrio Handle of the SRIO device
  9278. portNum SRIO Port Number
  9279. portWriteStatus Current port write event status
  9280. @endverbatim
  9281. *
  9282. * <b> Return Value </b>
  9283. * @n None
  9284. *
  9285. * <b> Pre Condition </b>
  9286. * @n CSL_SRIO_Open() must be called
  9287. *
  9288. * <b> Post Condition </b>
  9289. * @n None
  9290. *
  9291. * @b Reads
  9292. * @n SRIO_RIO_PLM_SP_PW_ENABLE
  9293. *
  9294. * @b Example
  9295. * @verbatim
  9296. CSL_SrioHandle hSrio;
  9297. Uint8 portWriteStatus;
  9298. // Open the CSL SRIO Module 0
  9299. hSrio = CSL_SRIO_Open (0);
  9300. // Get the current interrupt status
  9301. CSL_SRIO_GetPLMPortWriteEnables(hSrio, 1, &portWriteStatus);
  9302. ...
  9303. @endverbatim
  9304. * =============================================================================
  9305. */
  9306. static inline void CSL_SRIO_GetPLMPortWriteEnables
  9307. (
  9308. CSL_SrioHandle hSrio,
  9309. Uint8 portNum,
  9310. Uint8* portWriteStatus
  9311. )
  9312. {
  9313. *portWriteStatus = hSrio->RIO_PLM[portNum].RIO_PLM_SP_PW_ENABLE;
  9314. }
  9315. /** ============================================================================
  9316. * @n@b CSL_SRIO_SetPLMPortWriteEnables
  9317. *
  9318. * @b Description
  9319. * @n The function is used to set the current status of the PLM Port Write
  9320. * enables. These events will enable a port write notification
  9321. *
  9322. * @b Arguments
  9323. @verbatim
  9324. hSrio Handle of the SRIO device
  9325. portNum SRIO Port Number
  9326. portWriteStatus Port write status to be configured
  9327. @endverbatim
  9328. *
  9329. * <b> Return Value </b>
  9330. * @n None
  9331. *
  9332. * <b> Pre Condition </b>
  9333. * @n CSL_SRIO_Open() must be called
  9334. *
  9335. * <b> Post Condition </b>
  9336. * @n None
  9337. *
  9338. * @b Writes
  9339. * @n SRIO_RIO_PLM_SP_PW_ENABLE
  9340. *
  9341. * @b Example
  9342. * @verbatim
  9343. CSL_SrioHandle hSrio;
  9344. Uint8 portWriteStatus;
  9345. // Open the CSL SRIO Module 0
  9346. hSrio = CSL_SRIO_Open (0);
  9347. // Get the current interrupt status
  9348. CSL_SRIO_GetPLMPortWriteEnables(hSrio, 1, &portWriteStatus);
  9349. // Ensure that Max Denial port write notification is set.
  9350. portWriteStatus = portWriteStatus | 0x1;
  9351. CSL_SRIO_SetPLMPortWriteEnables (hSrio, 1, portWriteStatus);
  9352. ...
  9353. @endverbatim
  9354. * =============================================================================
  9355. */
  9356. static inline void CSL_SRIO_SetPLMPortWriteEnables
  9357. (
  9358. CSL_SrioHandle hSrio,
  9359. Uint8 portNum,
  9360. Uint8 portWriteStatus
  9361. )
  9362. {
  9363. hSrio->RIO_PLM[portNum].RIO_PLM_SP_PW_ENABLE = portWriteStatus;
  9364. }
  9365. /** ============================================================================
  9366. * @n@b CSL_SRIO_GetPLMPortEventGenerate
  9367. *
  9368. * @b Description
  9369. * @n The function is used to get the current status of the PLM events.
  9370. *
  9371. * @b Arguments
  9372. @verbatim
  9373. hSrio Handle of the SRIO device
  9374. portNum SRIO Port Number
  9375. eventStatus Current PLM event status
  9376. @endverbatim
  9377. *
  9378. * <b> Return Value </b>
  9379. * @n None
  9380. *
  9381. * <b> Pre Condition </b>
  9382. * @n CSL_SRIO_Open() must be called
  9383. *
  9384. * <b> Post Condition </b>
  9385. * @n None
  9386. *
  9387. * @b Reads
  9388. * @n SRIO_RIO_PLM_SP_EVENT_GEN
  9389. *
  9390. * @b Example
  9391. * @verbatim
  9392. CSL_SrioHandle hSrio;
  9393. Uint8 eventStatus;
  9394. // Open the CSL SRIO Module 0
  9395. hSrio = CSL_SRIO_Open (0);
  9396. // Get the current PLM event generate
  9397. CSL_SRIO_GetPLMPortEventGenerate(hSrio, 1, &eventStatus);
  9398. ...
  9399. @endverbatim
  9400. * =============================================================================
  9401. */
  9402. static inline void CSL_SRIO_GetPLMPortEventGenerate
  9403. (
  9404. CSL_SrioHandle hSrio,
  9405. Uint8 portNum,
  9406. Uint8* eventStatus
  9407. )
  9408. {
  9409. *eventStatus = hSrio->RIO_PLM[portNum].RIO_PLM_SP_EVENT_GEN;
  9410. }
  9411. /** ============================================================================
  9412. * @n@b CSL_SRIO_SetPLMPortEventGenerate
  9413. *
  9414. * @b Description
  9415. * @n The function is used to set the current status of the PLM events.
  9416. *
  9417. * @b Arguments
  9418. @verbatim
  9419. hSrio Handle of the SRIO device
  9420. portNum SRIO Port Number
  9421. eventStatus PLM event status to be configured
  9422. @endverbatim
  9423. *
  9424. * <b> Return Value </b>
  9425. * @n None
  9426. *
  9427. * <b> Pre Condition </b>
  9428. * @n CSL_SRIO_Open() must be called
  9429. *
  9430. * <b> Post Condition </b>
  9431. * @n None
  9432. *
  9433. * @b Writes
  9434. * @n SRIO_RIO_PLM_SP_EVENT_GEN
  9435. *
  9436. * @b Example
  9437. * @verbatim
  9438. CSL_SrioHandle hSrio;
  9439. Uint8 eventStatus;
  9440. // Open the CSL SRIO Module 0
  9441. hSrio = CSL_SRIO_Open (0);
  9442. // Get the current PLM event generate
  9443. CSL_SRIO_GetPLMPortEventGenerate(hSrio, 1, &eventStatus);
  9444. // Ensure MAX Denial event is set
  9445. eventStatus = eventStatus | 0x1;
  9446. CSL_SRIO_SetPLMPortEventGenerate (hSrio, 1, eventStatus);
  9447. ...
  9448. @endverbatim
  9449. * =============================================================================
  9450. */
  9451. static inline void CSL_SRIO_SetPLMPortEventGenerate
  9452. (
  9453. CSL_SrioHandle hSrio,
  9454. Uint8 portNum,
  9455. Uint8 eventStatus
  9456. )
  9457. {
  9458. hSrio->RIO_PLM[portNum].RIO_PLM_SP_EVENT_GEN = eventStatus;
  9459. }
  9460. /** ============================================================================
  9461. * @n@b CSL_SRIO_EnablePLMPortAllInterrupts
  9462. *
  9463. * @b Description
  9464. * @n The function is used to enable all interrupts
  9465. *
  9466. * @b Arguments
  9467. @verbatim
  9468. hSrio Handle of the SRIO device
  9469. portNum SRIO Port Number
  9470. @endverbatim
  9471. *
  9472. * <b> Return Value </b>
  9473. * @n None
  9474. *
  9475. * <b> Pre Condition </b>
  9476. * @n CSL_SRIO_Open() must be called
  9477. *
  9478. * <b> Post Condition </b>
  9479. * @n None
  9480. *
  9481. * @b Writes
  9482. * @n SRIO_RIO_PLM_SP_ALL_INT_EN_IRQ_EN=1
  9483. *
  9484. * @b Example
  9485. * @verbatim
  9486. CSL_SrioHandle hSrio;
  9487. // Open the CSL SRIO Module 0
  9488. hSrio = CSL_SRIO_Open (0);
  9489. // Enable all PLM Interrupts
  9490. CSL_SRIO_EnablePLMPortAllInterrupts(hSrio, 1);
  9491. ...
  9492. @endverbatim
  9493. * =============================================================================
  9494. */
  9495. static inline void CSL_SRIO_EnablePLMPortAllInterrupts
  9496. (
  9497. CSL_SrioHandle hSrio,
  9498. Uint8 portNum
  9499. )
  9500. {
  9501. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_ALL_INT_EN, SRIO_RIO_PLM_SP_ALL_INT_EN_IRQ_EN, 1);
  9502. }
  9503. /** ============================================================================
  9504. * @n@b CSL_SRIO_DisablePLMPortAllInterrupts
  9505. *
  9506. * @b Description
  9507. * @n The function is used to disable all interrupts
  9508. *
  9509. * @b Arguments
  9510. @verbatim
  9511. hSrio Handle of the SRIO device
  9512. portNum SRIO Port Number
  9513. @endverbatim
  9514. *
  9515. * <b> Return Value </b>
  9516. * @n None
  9517. *
  9518. * <b> Pre Condition </b>
  9519. * @n CSL_SRIO_Open() must be called
  9520. *
  9521. * <b> Post Condition </b>
  9522. * @n None
  9523. *
  9524. * @b Writes
  9525. * @n SRIO_RIO_PLM_SP_ALL_INT_EN_IRQ_EN=0
  9526. *
  9527. * @b Example
  9528. * @verbatim
  9529. CSL_SrioHandle hSrio;
  9530. // Open the CSL SRIO Module 0
  9531. hSrio = CSL_SRIO_Open (0);
  9532. // Disable all PLM Interrupts
  9533. CSL_SRIO_DisablePLMPortAllInterrupts(hSrio, 1);
  9534. ...
  9535. @endverbatim
  9536. * =============================================================================
  9537. */
  9538. static inline void CSL_SRIO_DisablePLMPortAllInterrupts
  9539. (
  9540. CSL_SrioHandle hSrio,
  9541. Uint8 portNum
  9542. )
  9543. {
  9544. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_ALL_INT_EN, SRIO_RIO_PLM_SP_ALL_INT_EN_IRQ_EN, 0);
  9545. }
  9546. /** ============================================================================
  9547. * @n@b CSL_SRIO_IsPLMPortAllInterruptsEnabled
  9548. *
  9549. * @b Description
  9550. * @n The function is used to check if the PLM port all interrupts are enabled
  9551. * or not?
  9552. *
  9553. * @b Arguments
  9554. @verbatim
  9555. hSrio Handle of the SRIO device
  9556. portNum SRIO Port Number
  9557. @endverbatim
  9558. *
  9559. * <b> Return Value </b>
  9560. * @n TRUE - PLM Port all interrupts are enabled
  9561. * @n FALSE - PLM Port all interrupts are disabled
  9562. *
  9563. * <b> Pre Condition </b>
  9564. * @n CSL_SRIO_Open() must be called
  9565. *
  9566. * <b> Post Condition </b>
  9567. * @n None
  9568. *
  9569. * @b Reads
  9570. * @n SRIO_RIO_PLM_SP_ALL_INT_EN_IRQ_EN
  9571. *
  9572. * @b Example
  9573. * @verbatim
  9574. CSL_SrioHandle hSrio;
  9575. // Open the CSL SRIO Module 0
  9576. hSrio = CSL_SRIO_Open (0);
  9577. // Check if PLM Interrupts are enabled or not?
  9578. if (CSL_SRIO_IsPLMPortAllInterruptsEnabled(hSrio, 1) == TRUE)
  9579. {
  9580. // PLM Interrupts are enabled.
  9581. }
  9582. else
  9583. {
  9584. // PLM Interrupts are disabled.
  9585. }
  9586. ...
  9587. @endverbatim
  9588. * =============================================================================
  9589. */
  9590. static inline Bool CSL_SRIO_IsPLMPortAllInterruptsEnabled
  9591. (
  9592. CSL_SrioHandle hSrio,
  9593. Uint8 portNum
  9594. )
  9595. {
  9596. if (CSL_FEXT(hSrio->RIO_PLM[portNum].RIO_PLM_SP_ALL_INT_EN, SRIO_RIO_PLM_SP_ALL_INT_EN_IRQ_EN) == 1)
  9597. return TRUE;
  9598. return FALSE;
  9599. }
  9600. /** ============================================================================
  9601. * @n@b CSL_SRIO_EnablePLMPortAllPortWrites
  9602. *
  9603. * @b Description
  9604. * @n The function is used to enable all port writes
  9605. *
  9606. * @b Arguments
  9607. @verbatim
  9608. hSrio Handle of the SRIO device
  9609. portNum SRIO Port Number
  9610. @endverbatim
  9611. *
  9612. * <b> Return Value </b>
  9613. * @n None
  9614. *
  9615. * <b> Pre Condition </b>
  9616. * @n CSL_SRIO_Open() must be called
  9617. *
  9618. * <b> Post Condition </b>
  9619. * @n None
  9620. *
  9621. * @b Writes
  9622. * @n SRIO_RIO_PLM_SP_ALL_PW_EN_PW_EN=1
  9623. *
  9624. * @b Example
  9625. * @verbatim
  9626. CSL_SrioHandle hSrio;
  9627. // Open the CSL SRIO Module 0
  9628. hSrio = CSL_SRIO_Open (0);
  9629. // Enable all PLM Port Writes
  9630. CSL_SRIO_EnablePLMPortAllPortWrites(hSrio, 1);
  9631. ...
  9632. @endverbatim
  9633. * =============================================================================
  9634. */
  9635. static inline void CSL_SRIO_EnablePLMPortAllPortWrites
  9636. (
  9637. CSL_SrioHandle hSrio,
  9638. Uint8 portNum
  9639. )
  9640. {
  9641. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_ALL_PW_EN, SRIO_RIO_PLM_SP_ALL_PW_EN_PW_EN, 1);
  9642. }
  9643. /** ============================================================================
  9644. * @n@b CSL_SRIO_DisablePLMPortAllPortWrites
  9645. *
  9646. * @b Description
  9647. * @n The function is used to disable all port writes
  9648. *
  9649. * @b Arguments
  9650. @verbatim
  9651. hSrio Handle of the SRIO device
  9652. portNum SRIO Port Number
  9653. @endverbatim
  9654. *
  9655. * <b> Return Value </b>
  9656. * @n None
  9657. *
  9658. * <b> Pre Condition </b>
  9659. * @n CSL_SRIO_Open() must be called
  9660. *
  9661. * <b> Post Condition </b>
  9662. * @n None
  9663. *
  9664. * @b Writes
  9665. * @n SRIO_RIO_PLM_SP_ALL_PW_EN_PW_EN=0
  9666. *
  9667. * @b Example
  9668. * @verbatim
  9669. CSL_SrioHandle hSrio;
  9670. // Open the CSL SRIO Module 0
  9671. hSrio = CSL_SRIO_Open (0);
  9672. // Disable all PLM Port Writes
  9673. CSL_SRIO_DisablePLMPortAllPortWrites(hSrio, 1);
  9674. ...
  9675. @endverbatim
  9676. * =============================================================================
  9677. */
  9678. static inline void CSL_SRIO_DisablePLMPortAllPortWrites
  9679. (
  9680. CSL_SrioHandle hSrio,
  9681. Uint8 portNum
  9682. )
  9683. {
  9684. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_ALL_PW_EN, SRIO_RIO_PLM_SP_ALL_PW_EN_PW_EN, 0);
  9685. }
  9686. /** ============================================================================
  9687. * @n@b CSL_SRIO_IsPLMPortAllPortWritesEnabled
  9688. *
  9689. * @b Description
  9690. * @n The function is used to disable all port writes
  9691. *
  9692. * @b Arguments
  9693. @verbatim
  9694. hSrio Handle of the SRIO device
  9695. portNum SRIO Port Number
  9696. @endverbatim
  9697. *
  9698. * <b> Return Value </b>
  9699. * @n TRUE - PLM Port all Port Writes are enabled
  9700. * @n TRUE - PLM Port all Port Writes are disabled
  9701. *
  9702. * <b> Pre Condition </b>
  9703. * @n CSL_SRIO_Open() must be called
  9704. *
  9705. * <b> Post Condition </b>
  9706. * @n None
  9707. *
  9708. * @b Reads
  9709. * @n SRIO_RIO_PLM_SP_ALL_PW_EN_PW_EN
  9710. *
  9711. * @b Example
  9712. * @verbatim
  9713. CSL_SrioHandle hSrio;
  9714. // Open the CSL SRIO Module 0
  9715. hSrio = CSL_SRIO_Open (0);
  9716. // Check if all PLM Port Writes are enabled or not?
  9717. if (CSL_SRIO_IsPLMPortAllPortWritesEnabled(hSrio, 1) == TRUE)
  9718. {
  9719. // PLM Port All Port Writes are enabled
  9720. }
  9721. else
  9722. {
  9723. // PLM Port All Port Writes are disabled
  9724. }
  9725. ...
  9726. @endverbatim
  9727. * =============================================================================
  9728. */
  9729. static inline Bool CSL_SRIO_IsPLMPortAllPortWritesEnabled
  9730. (
  9731. CSL_SrioHandle hSrio,
  9732. Uint8 portNum
  9733. )
  9734. {
  9735. if (CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_ALL_PW_EN, SRIO_RIO_PLM_SP_ALL_PW_EN_PW_EN) == 1)
  9736. return TRUE;
  9737. return FALSE;
  9738. }
  9739. /** ============================================================================
  9740. * @n@b CSL_SRIO_GetPLMPortPathControl
  9741. *
  9742. * @b Description
  9743. * @n The function is used to get the PLM Port Path control
  9744. *
  9745. * @b Arguments
  9746. @verbatim
  9747. hSrio Handle of the SRIO device
  9748. portNum SRIO Port Number
  9749. pathID Identifies the Path in which this port resides.
  9750. pathConfig Indicates the Path’s configuration
  9751. pathMode The mode of the path
  9752. @endverbatim
  9753. *
  9754. * <b> Return Value </b>
  9755. * @n None
  9756. *
  9757. * <b> Pre Condition </b>
  9758. * @n CSL_SRIO_Open() must be called
  9759. *
  9760. * <b> Post Condition </b>
  9761. * @n None
  9762. *
  9763. * @b Reads
  9764. * @n SRIO_RIO_PLM_SP_PATH_CTL_PATH_ID,SRIO_RIO_PLM_SP_PATH_CTL_PATH_CONFIGURATION,
  9765. * @n SRIO_RIO_PLM_SP_PATH_CTL_PATH_MODE
  9766. *
  9767. * @b Example
  9768. * @verbatim
  9769. CSL_SrioHandle hSrio;
  9770. Uint8 pathID;
  9771. Uint8 pathConfig;
  9772. Uint8 pathMode;
  9773. // Open the CSL SRIO Module 0
  9774. hSrio = CSL_SRIO_Open (0);
  9775. // Get the PLM Port1 Path Control
  9776. CSL_SRIO_GetPLMPortPathControl(hSrio, 1, &pathID, &pathConfig, &pathMode);
  9777. ...
  9778. @endverbatim
  9779. * =============================================================================
  9780. */
  9781. static inline void CSL_SRIO_GetPLMPortPathControl
  9782. (
  9783. CSL_SrioHandle hSrio,
  9784. Uint8 portNum,
  9785. Uint8* pathID,
  9786. Uint8* pathConfig,
  9787. Uint8* pathMode
  9788. )
  9789. {
  9790. Uint32 value = hSrio->RIO_PLM[portNum].RIO_PLM_SP_PATH_CTL;
  9791. *pathID = CSL_FEXT (value, SRIO_RIO_PLM_SP_PATH_CTL_PATH_ID);
  9792. *pathConfig = CSL_FEXT (value, SRIO_RIO_PLM_SP_PATH_CTL_PATH_CONFIGURATION);
  9793. *pathMode = CSL_FEXT (value, SRIO_RIO_PLM_SP_PATH_CTL_PATH_MODE);
  9794. }
  9795. /** ============================================================================
  9796. * @n@b CSL_SRIO_SetPLMPortPathControlMode
  9797. *
  9798. * @b Description
  9799. * @n The function is used to get the PLM Port Path control mode
  9800. *
  9801. * @b Arguments
  9802. @verbatim
  9803. hSrio Handle of the SRIO device
  9804. portNum SRIO Port Number
  9805. pathMode The mode of the path
  9806. @endverbatim
  9807. *
  9808. * <b> Return Value </b>
  9809. * @n None
  9810. *
  9811. * <b> Pre Condition </b>
  9812. * @n CSL_SRIO_Open() must be called
  9813. *
  9814. * <b> Post Condition </b>
  9815. * @n None
  9816. *
  9817. * @b Writes
  9818. * @n SRIO_RIO_PLM_SP_PATH_CTL_PATH_MODE
  9819. *
  9820. * @b Example
  9821. * @verbatim
  9822. CSL_SrioHandle hSrio;
  9823. // Open the CSL SRIO Module 0
  9824. hSrio = CSL_SRIO_Open (0);
  9825. // Set the path mode for PLM Port 1 as 0
  9826. CSL_SRIO_SetPLMPortPathControlMode(hSrio, 1, 0x0);
  9827. ...
  9828. @endverbatim
  9829. * =============================================================================
  9830. */
  9831. static inline void CSL_SRIO_SetPLMPortPathControlMode
  9832. (
  9833. CSL_SrioHandle hSrio,
  9834. Uint8 portNum,
  9835. Uint8 pathMode
  9836. )
  9837. {
  9838. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_PATH_CTL, SRIO_RIO_PLM_SP_PATH_CTL_PATH_MODE, pathMode);
  9839. }
  9840. /** ============================================================================
  9841. * @n@b CSL_SRIO_GetPLMPortDiscoveryTimer
  9842. *
  9843. * @b Description
  9844. * @n The function is used to get the PLM Port Discovery timer
  9845. *
  9846. * @b Arguments
  9847. @verbatim
  9848. hSrio Handle of the SRIO device
  9849. portNum SRIO Port Number
  9850. portDiscoveryTimer PLM Port Discovery Timer
  9851. @endverbatim
  9852. *
  9853. * <b> Return Value </b>
  9854. * @n None
  9855. *
  9856. * <b> Pre Condition </b>
  9857. * @n CSL_SRIO_Open() must be called
  9858. *
  9859. * <b> Post Condition </b>
  9860. * @n None
  9861. *
  9862. * @b Reads
  9863. * @n SRIO_RIO_PLM_SP_DISCOVERY_TIMER_DISCOVERY_TIMER
  9864. *
  9865. * @b Example
  9866. * @verbatim
  9867. CSL_SrioHandle hSrio;
  9868. Uint8 portDiscoveryTimer;
  9869. // Open the CSL SRIO Module 0
  9870. hSrio = CSL_SRIO_Open (0);
  9871. // Get the PLM Discovery Timer
  9872. CSL_SRIO_GetPLMPortDiscoveryTimer(hSrio, 1, &portDiscoveryTimer);
  9873. ...
  9874. @endverbatim
  9875. * =============================================================================
  9876. */
  9877. static inline void CSL_SRIO_GetPLMPortDiscoveryTimer
  9878. (
  9879. CSL_SrioHandle hSrio,
  9880. Uint8 portNum,
  9881. Uint8* portDiscoveryTimer
  9882. )
  9883. {
  9884. *portDiscoveryTimer = CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_DISCOVERY_TIMER,
  9885. SRIO_RIO_PLM_SP_DISCOVERY_TIMER_DISCOVERY_TIMER);
  9886. }
  9887. /** ============================================================================
  9888. * @n@b CSL_SRIO_SetPLMPortDiscoveryTimer
  9889. *
  9890. * @b Description
  9891. * @n The function is used to set the PLM Port Discovery timer
  9892. *
  9893. * @b Arguments
  9894. @verbatim
  9895. hSrio Handle of the SRIO device
  9896. portNum SRIO Port Number
  9897. portDiscoveryTimer PLM Port Discovery Timer
  9898. @endverbatim
  9899. *
  9900. * <b> Return Value </b>
  9901. * @n None
  9902. *
  9903. * <b> Pre Condition </b>
  9904. * @n CSL_SRIO_Open() must be called
  9905. *
  9906. * <b> Post Condition </b>
  9907. * @n None
  9908. *
  9909. * @b Writes
  9910. * @n SRIO_RIO_PLM_SP_DISCOVERY_TIMER_DISCOVERY_TIMER
  9911. *
  9912. * @b Example
  9913. * @verbatim
  9914. CSL_SrioHandle hSrio;
  9915. // Open the CSL SRIO Module 0
  9916. hSrio = CSL_SRIO_Open (0);
  9917. // Set the PLM Discovery Timer
  9918. CSL_SRIO_SetPLMPortDiscoveryTimer(hSrio, 1, 0x5);
  9919. ...
  9920. @endverbatim
  9921. * =============================================================================
  9922. */
  9923. static inline void CSL_SRIO_SetPLMPortDiscoveryTimer
  9924. (
  9925. CSL_SrioHandle hSrio,
  9926. Uint8 portNum,
  9927. Uint8 portDiscoveryTimer
  9928. )
  9929. {
  9930. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_DISCOVERY_TIMER, SRIO_RIO_PLM_SP_DISCOVERY_TIMER_DISCOVERY_TIMER,
  9931. portDiscoveryTimer);
  9932. }
  9933. /** ============================================================================
  9934. * @n@b CSL_SRIO_GetPLMPortSilenceTimer
  9935. *
  9936. * @b Description
  9937. * @n The function is used to get the PLM Port Silence timer
  9938. *
  9939. * @b Arguments
  9940. @verbatim
  9941. hSrio Handle of the SRIO device
  9942. portNum SRIO Port Number
  9943. portSilenceTimer PLM Port Silence Timer
  9944. @endverbatim
  9945. *
  9946. * <b> Return Value </b>
  9947. * @n None
  9948. *
  9949. * <b> Pre Condition </b>
  9950. * @n CSL_SRIO_Open() must be called
  9951. *
  9952. * <b> Post Condition </b>
  9953. * @n None
  9954. *
  9955. * @b Reads
  9956. * @n SRIO_RIO_PLM_SP_SILENCE_TIMER_SILENCE_TIMER
  9957. *
  9958. * @b Example
  9959. * @verbatim
  9960. CSL_SrioHandle hSrio;
  9961. Uint8 portSilenceTimer;
  9962. // Open the CSL SRIO Module 0
  9963. hSrio = CSL_SRIO_Open (0);
  9964. // Get the PLM Silence Timer
  9965. CSL_SRIO_GetPLMPortSilenceTimer(hSrio, 1, &portSilenceTimer);
  9966. ...
  9967. @endverbatim
  9968. * =============================================================================
  9969. */
  9970. static inline void CSL_SRIO_GetPLMPortSilenceTimer
  9971. (
  9972. CSL_SrioHandle hSrio,
  9973. Uint8 portNum,
  9974. Uint8* portSilenceTimer
  9975. )
  9976. {
  9977. *portSilenceTimer = CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_SILENCE_TIMER,
  9978. SRIO_RIO_PLM_SP_SILENCE_TIMER_SILENCE_TIMER);
  9979. }
  9980. /** ============================================================================
  9981. * @n@b CSL_SRIO_SetPLMPortSilenceTimer
  9982. *
  9983. * @b Description
  9984. * @n The function is used to set up the PLM Port Silence timer value.
  9985. *
  9986. * @b Arguments
  9987. @verbatim
  9988. hSrio Handle of the SRIO device
  9989. portNum SRIO Port Number
  9990. portSilenceTimer PLM Port Silence Timer value to configure
  9991. @endverbatim
  9992. *
  9993. * <b> Return Value </b>
  9994. * @n None
  9995. *
  9996. * <b> Pre Condition </b>
  9997. * @n CSL_SRIO_Open() must be called
  9998. *
  9999. * <b> Post Condition </b>
  10000. * @n None
  10001. *
  10002. * @b Affects
  10003. * @n SRIO_RIO_PLM_SP_SILENCE_TIMER_SILENCE_TIMER=0
  10004. *
  10005. * @b Example
  10006. * @verbatim
  10007. CSL_SrioHandle hSrio;
  10008. Uint8 portSilenceTimer;
  10009. // Open the CSL SRIO Module 0
  10010. hSrio = CSL_SRIO_Open (0);
  10011. // Get the PLM Silence Timer
  10012. CSL_SRIO_GetPLMPortSilenceTimer(hSrio, 1, &portSilenceTimer);
  10013. ...
  10014. // Set the PLM Silence Timer
  10015. CSL_SRIO_SetPLMPortSilenceTimer(hSrio, 1, &portSilenceTimer);
  10016. @endverbatim
  10017. * =============================================================================
  10018. */
  10019. static inline void CSL_SRIO_SetPLMPortSilenceTimer
  10020. (
  10021. CSL_SrioHandle hSrio,
  10022. Uint8 portNum,
  10023. Uint8 portSilenceTimer
  10024. )
  10025. {
  10026. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_SILENCE_TIMER,
  10027. SRIO_RIO_PLM_SP_SILENCE_TIMER_SILENCE_TIMER, portSilenceTimer);
  10028. }
  10029. /** ============================================================================
  10030. * @n@b CSL_SRIO_GetPLMPortVMinExponentConfig
  10031. *
  10032. * @b Description
  10033. * @n The function is used to get the PLM Port VMin Export configuration
  10034. *
  10035. * @b Arguments
  10036. @verbatim
  10037. hSrio Handle of the SRIO device
  10038. portNum SRIO Port Number
  10039. ptrVminExponent PLM Port VMin Exponent configuration
  10040. @endverbatim
  10041. *
  10042. * <b> Return Value </b>
  10043. * @n None
  10044. *
  10045. * <b> Pre Condition </b>
  10046. * @n CSL_SRIO_Open() must be called
  10047. *
  10048. * <b> Post Condition </b>
  10049. * @n None
  10050. *
  10051. * @b Reads
  10052. * @n SRIO_RIO_PLM_SP_VMIN_EXP_VMIN_EXP, SRIO_RIO_PLM_SP_VMIN_EXP_IMAX,
  10053. * @n SRIO_RIO_PLM_SP_VMIN_EXP_MMAX
  10054. *
  10055. * @b Example
  10056. * @verbatim
  10057. CSL_SrioHandle hSrio;
  10058. SRIO_PLM_VMIN_EXPONENT vminExponentConfig;
  10059. // Open the CSL SRIO Module 0
  10060. hSrio = CSL_SRIO_Open (0);
  10061. // Get the PLM Port VMin Exponent Configuration.
  10062. CSL_SRIO_GetPLMPortVMinExponentConfig(hSrio, 1, &vminExponentConfig);
  10063. ...
  10064. @endverbatim
  10065. * =============================================================================
  10066. */
  10067. static inline void CSL_SRIO_GetPLMPortVMinExponentConfig
  10068. (
  10069. CSL_SrioHandle hSrio,
  10070. Uint8 portNum,
  10071. SRIO_PLM_VMIN_EXPONENT* ptrVminExponent
  10072. )
  10073. {
  10074. Uint32 value = hSrio->RIO_PLM[portNum].RIO_PLM_SP_VMIN_EXP;
  10075. ptrVminExponent->vminExp = CSL_FEXT (value, SRIO_RIO_PLM_SP_VMIN_EXP_VMIN_EXP);
  10076. ptrVminExponent->imax = CSL_FEXT (value, SRIO_RIO_PLM_SP_VMIN_EXP_IMAX);
  10077. ptrVminExponent->mmax = CSL_FEXT (value, SRIO_RIO_PLM_SP_VMIN_EXP_MMAX);
  10078. }
  10079. /** ============================================================================
  10080. * @n@b CSL_SRIO_SetPLMPortVMinExponentConfig
  10081. *
  10082. * @b Description
  10083. * @n The function is used to set the PLM Port VMin Export configuration
  10084. *
  10085. * @b Arguments
  10086. @verbatim
  10087. hSrio Handle of the SRIO device
  10088. portNum SRIO Port Number
  10089. ptrVminExponent PLM Port VMin Exponent configuration
  10090. @endverbatim
  10091. *
  10092. * <b> Return Value </b>
  10093. * @n None
  10094. *
  10095. * <b> Pre Condition </b>
  10096. * @n CSL_SRIO_Open() must be called
  10097. *
  10098. * <b> Post Condition </b>
  10099. * @n None
  10100. *
  10101. * @b Writes
  10102. * @n SRIO_RIO_PLM_SP_VMIN_EXP_VMIN_EXP, SRIO_RIO_PLM_SP_VMIN_EXP_IMAX,
  10103. * @n SRIO_RIO_PLM_SP_VMIN_EXP_MMAX
  10104. *
  10105. * @b Example
  10106. * @verbatim
  10107. CSL_SrioHandle hSrio;
  10108. SRIO_PLM_VMIN_EXPONENT vminExponentConfig;
  10109. // Open the CSL SRIO Module 0
  10110. hSrio = CSL_SRIO_Open (0);
  10111. // Get the PLM Port VMin Exponent Configuration.
  10112. CSL_SRIO_GetPLMPortVMinExponentConfig(hSrio, 1, &vminExponentConfig);
  10113. vminExponentConfig.imax = 2;
  10114. CSL_SRIO_SetPLMPortVMinExponentConfig(hSrio, 1, &vminExponentConfig);
  10115. ...
  10116. @endverbatim
  10117. * =============================================================================
  10118. */
  10119. static inline void CSL_SRIO_SetPLMPortVMinExponentConfig
  10120. (
  10121. CSL_SrioHandle hSrio,
  10122. Uint8 portNum,
  10123. SRIO_PLM_VMIN_EXPONENT* ptrVminExponent
  10124. )
  10125. {
  10126. hSrio->RIO_PLM[portNum].RIO_PLM_SP_VMIN_EXP =
  10127. CSL_FMK (SRIO_RIO_PLM_SP_VMIN_EXP_VMIN_EXP, ptrVminExponent->vminExp) |
  10128. CSL_FMK (SRIO_RIO_PLM_SP_VMIN_EXP_IMAX, ptrVminExponent->imax) |
  10129. CSL_FMK (SRIO_RIO_PLM_SP_VMIN_EXP_MMAX, ptrVminExponent->mmax);
  10130. }
  10131. /** ============================================================================
  10132. * @n@b CSL_SRIO_GetPLMPortPolarityControl
  10133. *
  10134. * @b Description
  10135. * @n The function is used to get the PLM Port Polarity Control
  10136. *
  10137. * @b Arguments
  10138. @verbatim
  10139. hSrio Handle of the SRIO device
  10140. portNum SRIO Port Number
  10141. ptrPolarityConfig PLM Port Polarity configuration
  10142. @endverbatim
  10143. *
  10144. * <b> Return Value </b>
  10145. * @n None
  10146. *
  10147. * <b> Pre Condition </b>
  10148. * @n CSL_SRIO_Open() must be called
  10149. *
  10150. * <b> Post Condition </b>
  10151. * @n None
  10152. *
  10153. * @b Reads
  10154. * @n SRIO_RIO_PLM_SP_POL_CTL_TX3_POL, SRIO_RIO_PLM_SP_POL_CTL_TX2_POL,
  10155. * @n SRIO_RIO_PLM_SP_POL_CTL_TX1_POL, SRIO_RIO_PLM_SP_POL_CTL_TX0_POL,
  10156. * @n SRIO_RIO_PLM_SP_POL_CTL_RX3_POL, SRIO_RIO_PLM_SP_POL_CTL_RX2_POL,
  10157. * @n SRIO_RIO_PLM_SP_POL_CTL_RX1_POL, SRIO_RIO_PLM_SP_POL_CTL_RX0_POL
  10158. *
  10159. * @b Example
  10160. * @verbatim
  10161. CSL_SrioHandle hSrio;
  10162. SRIO_PLM_POLARITY_CONTROL polarityControlConfig;
  10163. // Open the CSL SRIO Module 0
  10164. hSrio = CSL_SRIO_Open (0);
  10165. // Get the PLM Port Polarity Control Configuration.
  10166. CSL_SRIO_GetPLMPortPolarityControl(hSrio, 1, &polarityControlConfig);
  10167. ...
  10168. @endverbatim
  10169. * =============================================================================
  10170. */
  10171. static inline void CSL_SRIO_GetPLMPortPolarityControl
  10172. (
  10173. CSL_SrioHandle hSrio,
  10174. Uint8 portNum,
  10175. SRIO_PLM_POLARITY_CONTROL* ptrPolarityConfig
  10176. )
  10177. {
  10178. Uint32 value = hSrio->RIO_PLM[portNum].RIO_PLM_SP_POL_CTL;
  10179. ptrPolarityConfig->tx3Pol = CSL_FEXT (value, SRIO_RIO_PLM_SP_POL_CTL_TX3_POL);
  10180. ptrPolarityConfig->tx2Pol = CSL_FEXT (value, SRIO_RIO_PLM_SP_POL_CTL_TX2_POL);
  10181. ptrPolarityConfig->tx1Pol = CSL_FEXT (value, SRIO_RIO_PLM_SP_POL_CTL_TX1_POL);
  10182. ptrPolarityConfig->tx0Pol = CSL_FEXT (value, SRIO_RIO_PLM_SP_POL_CTL_TX0_POL);
  10183. ptrPolarityConfig->rx3Pol = CSL_FEXT (value, SRIO_RIO_PLM_SP_POL_CTL_RX3_POL);
  10184. ptrPolarityConfig->rx2Pol = CSL_FEXT (value, SRIO_RIO_PLM_SP_POL_CTL_RX2_POL);
  10185. ptrPolarityConfig->rx1Pol = CSL_FEXT (value, SRIO_RIO_PLM_SP_POL_CTL_RX1_POL);
  10186. ptrPolarityConfig->rx0Pol = CSL_FEXT (value, SRIO_RIO_PLM_SP_POL_CTL_RX0_POL);
  10187. }
  10188. /** ============================================================================
  10189. * @n@b CSL_SRIO_SetPLMPortPolarityControl
  10190. *
  10191. * @b Description
  10192. * @n The function is used to set the PLM Port Polarity Control
  10193. *
  10194. * @b Arguments
  10195. @verbatim
  10196. hSrio Handle of the SRIO device
  10197. portNum SRIO Port Number
  10198. ptrPolarityConfig PLM Port Polarity configuration
  10199. @endverbatim
  10200. *
  10201. * <b> Return Value </b>
  10202. * @n None
  10203. *
  10204. * <b> Pre Condition </b>
  10205. * @n CSL_SRIO_Open() must be called
  10206. *
  10207. * <b> Post Condition </b>
  10208. * @n None
  10209. *
  10210. * @b Writes
  10211. * @n SRIO_RIO_PLM_SP_POL_CTL_TX3_POL, SRIO_RIO_PLM_SP_POL_CTL_TX2_POL,
  10212. * @n SRIO_RIO_PLM_SP_POL_CTL_TX1_POL, SRIO_RIO_PLM_SP_POL_CTL_TX0_POL,
  10213. * @n SRIO_RIO_PLM_SP_POL_CTL_RX3_POL, SRIO_RIO_PLM_SP_POL_CTL_RX2_POL,
  10214. * @n SRIO_RIO_PLM_SP_POL_CTL_RX1_POL, SRIO_RIO_PLM_SP_POL_CTL_RX0_POL
  10215. *
  10216. * @b Example
  10217. * @verbatim
  10218. CSL_SrioHandle hSrio;
  10219. SRIO_PLM_POLARITY_CONTROL polarityControlConfig;
  10220. // Open the CSL SRIO Module 0
  10221. hSrio = CSL_SRIO_Open (0);
  10222. // Get the PLM Port Polarity Control Configuration.
  10223. CSL_SRIO_GetPLMPortPolarityControl(hSrio, 1, &polarityControlConfig);
  10224. // Make sure that the TX3 Polarity is reversed
  10225. polarityControlConfig.tx3Pol = 1;
  10226. CSL_SRIO_SetPLMPortPolarityControl(hSrio, 1, &polarityControlConfig);
  10227. ...
  10228. @endverbatim
  10229. * =============================================================================
  10230. */
  10231. static inline void CSL_SRIO_SetPLMPortPolarityControl
  10232. (
  10233. CSL_SrioHandle hSrio,
  10234. Uint8 portNum,
  10235. SRIO_PLM_POLARITY_CONTROL* ptrPolarityConfig
  10236. )
  10237. {
  10238. hSrio->RIO_PLM[portNum].RIO_PLM_SP_POL_CTL =
  10239. CSL_FMK (SRIO_RIO_PLM_SP_POL_CTL_TX3_POL, ptrPolarityConfig->tx3Pol) |
  10240. CSL_FMK (SRIO_RIO_PLM_SP_POL_CTL_TX2_POL, ptrPolarityConfig->tx2Pol) |
  10241. CSL_FMK (SRIO_RIO_PLM_SP_POL_CTL_TX1_POL, ptrPolarityConfig->tx1Pol) |
  10242. CSL_FMK (SRIO_RIO_PLM_SP_POL_CTL_TX0_POL, ptrPolarityConfig->tx0Pol) |
  10243. CSL_FMK (SRIO_RIO_PLM_SP_POL_CTL_RX3_POL, ptrPolarityConfig->rx3Pol) |
  10244. CSL_FMK (SRIO_RIO_PLM_SP_POL_CTL_RX2_POL, ptrPolarityConfig->rx2Pol) |
  10245. CSL_FMK (SRIO_RIO_PLM_SP_POL_CTL_RX1_POL, ptrPolarityConfig->rx1Pol) |
  10246. CSL_FMK (SRIO_RIO_PLM_SP_POL_CTL_RX0_POL, ptrPolarityConfig->rx0Pol);
  10247. }
  10248. /** ============================================================================
  10249. * @n@b CSL_SRIO_GetPLMPortPacketDenialControl
  10250. *
  10251. * @b Description
  10252. * @n The function is used to get the PLM Port Packet Denial.
  10253. *
  10254. * @b Arguments
  10255. @verbatim
  10256. hSrio Handle of the SRIO device
  10257. portNum SRIO Port Number
  10258. cntPacketNotAccepted Controls whether Packet-Not-Accepted control
  10259. symbols count toward the packet denial threshold value
  10260. cntRetry Controls whether Retry control symbols count toward
  10261. the packet denial threshold value
  10262. denialThreshold Sets the threshold for reporting too many consecutive retries
  10263. @endverbatim
  10264. *
  10265. * <b> Return Value </b>
  10266. * @n None
  10267. *
  10268. * <b> Pre Condition </b>
  10269. * @n CSL_SRIO_Open() must be called
  10270. *
  10271. * <b> Post Condition </b>
  10272. * @n None
  10273. *
  10274. * @b Reads
  10275. * @n SRIO_RIO_PLM_SP_DENIAL_CTL_CNT_PNA, SRIO_RIO_PLM_SP_DENIAL_CTL_CNT_RTY,
  10276. * @n SRIO_RIO_PLM_SP_DENIAL_CTL_DENIAL_THRESH
  10277. *
  10278. * @b Example
  10279. * @verbatim
  10280. CSL_SrioHandle hSrio;
  10281. Uint8 cntPacketNotAccepted;
  10282. Uint8 cntRetry;
  10283. Uint8 denialThreshold;
  10284. // Open the CSL SRIO Module 0
  10285. hSrio = CSL_SRIO_Open (0);
  10286. // Get the PLM Port Packet Denial
  10287. CSL_SRIO_GetPLMPortPacketDenialControl(hSrio, 1, &cntPacketNotAccepted, &cntRetry, &denialThreshold);
  10288. ...
  10289. @endverbatim
  10290. * =============================================================================
  10291. */
  10292. static inline void CSL_SRIO_GetPLMPortPacketDenialControl
  10293. (
  10294. CSL_SrioHandle hSrio,
  10295. Uint8 portNum,
  10296. Uint8* cntPacketNotAccepted,
  10297. Uint8* cntRetry,
  10298. Uint8* denialThreshold
  10299. )
  10300. {
  10301. Uint32 value = hSrio->RIO_PLM[portNum].RIO_PLM_SP_DENIAL_CTL;
  10302. *cntPacketNotAccepted = CSL_FEXT (value, SRIO_RIO_PLM_SP_DENIAL_CTL_CNT_PNA);
  10303. *cntRetry = CSL_FEXT (value, SRIO_RIO_PLM_SP_DENIAL_CTL_CNT_RTY);
  10304. *denialThreshold = CSL_FEXT (value, SRIO_RIO_PLM_SP_DENIAL_CTL_DENIAL_THRESH);
  10305. }
  10306. /** ============================================================================
  10307. * @n@b CSL_SRIO_SetPLMPortPacketDenialControl
  10308. *
  10309. * @b Description
  10310. * @n The function is used to set the PLM Port Packet Denial.
  10311. *
  10312. * @b Arguments
  10313. @verbatim
  10314. hSrio Handle of the SRIO device
  10315. portNum SRIO Port Number
  10316. cntPacketNotAccepted Controls whether Packet-Not-Accepted control
  10317. symbols count toward the packet denial threshold value
  10318. cntRetry Controls whether Retry control symbols count toward
  10319. the packet denial threshold value
  10320. denialThreshold Sets the threshold for reporting too many consecutive retries
  10321. @endverbatim
  10322. *
  10323. * <b> Return Value </b>
  10324. * @n None
  10325. *
  10326. * <b> Pre Condition </b>
  10327. * @n CSL_SRIO_Open() must be called
  10328. *
  10329. * <b> Post Condition </b>
  10330. * @n None
  10331. *
  10332. * @b Writes
  10333. * @n SRIO_RIO_PLM_SP_DENIAL_CTL_CNT_PNA, SRIO_RIO_PLM_SP_DENIAL_CTL_CNT_RTY,
  10334. * @n SRIO_RIO_PLM_SP_DENIAL_CTL_DENIAL_THRESH
  10335. *
  10336. * @b Example
  10337. * @verbatim
  10338. CSL_SrioHandle hSrio;
  10339. // Open the CSL SRIO Module 0
  10340. hSrio = CSL_SRIO_Open (0);
  10341. // Set the PLM Port Packet Denial
  10342. CSL_SRIO_SetPLMPortPacketDenialControl(hSrio, 1, 1, 1, 2);
  10343. ...
  10344. @endverbatim
  10345. * =============================================================================
  10346. */
  10347. static inline void CSL_SRIO_SetPLMPortPacketDenialControl
  10348. (
  10349. CSL_SrioHandle hSrio,
  10350. Uint8 portNum,
  10351. Uint8 cntPacketNotAccepted,
  10352. Uint8 cntRetry,
  10353. Uint8 denialThreshold
  10354. )
  10355. {
  10356. hSrio->RIO_PLM[portNum].RIO_PLM_SP_DENIAL_CTL =
  10357. CSL_FMK (SRIO_RIO_PLM_SP_DENIAL_CTL_CNT_PNA, cntPacketNotAccepted) |
  10358. CSL_FMK (SRIO_RIO_PLM_SP_DENIAL_CTL_CNT_RTY, cntRetry) |
  10359. CSL_FMK (SRIO_RIO_PLM_SP_DENIAL_CTL_DENIAL_THRESH, denialThreshold);
  10360. }
  10361. /** ============================================================================
  10362. * @n@b CSL_SRIO_GetPLMPortMECSStatus
  10363. *
  10364. * @b Description
  10365. * @n The function is used to get the PLM Port MECS status
  10366. *
  10367. * @b Arguments
  10368. @verbatim
  10369. hSrio Handle of the SRIO device
  10370. portNum SRIO Port Number
  10371. cmd Indicates which MECS commands have been received.
  10372. @endverbatim
  10373. *
  10374. * <b> Return Value </b>
  10375. * @n None
  10376. *
  10377. * <b> Pre Condition </b>
  10378. * @n CSL_SRIO_Open() must be called
  10379. *
  10380. * <b> Post Condition </b>
  10381. * @n None
  10382. *
  10383. * @b Reads
  10384. * @n SRIO_RIO_PLM_SP_RCVD_MECS_CMD_STAT
  10385. *
  10386. * @b Example
  10387. * @verbatim
  10388. CSL_SrioHandle hSrio;
  10389. Uint8 cmd;
  10390. // Open the CSL SRIO Module 0
  10391. hSrio = CSL_SRIO_Open (0);
  10392. // Get the PLM Port MECS Status
  10393. CSL_SRIO_GetPLMPortMECSStatus(hSrio, 1, &cmd);
  10394. ...
  10395. @endverbatim
  10396. * =============================================================================
  10397. */
  10398. static inline void CSL_SRIO_GetPLMPortMECSStatus
  10399. (
  10400. CSL_SrioHandle hSrio,
  10401. Uint8 portNum,
  10402. Uint8* cmd
  10403. )
  10404. {
  10405. *cmd = CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_RCVD_MECS, SRIO_RIO_PLM_SP_RCVD_MECS_CMD_STAT);
  10406. }
  10407. /** ============================================================================
  10408. * @n@b CSL_SRIO_ClearPLMPortMECSStatus
  10409. *
  10410. * @b Description
  10411. * @n The function is used to clear the PLM Port MECS status
  10412. *
  10413. * @b Arguments
  10414. @verbatim
  10415. hSrio Handle of the SRIO device
  10416. portNum SRIO Port Number
  10417. cmd Indicates which MECS commands need to be cleared.
  10418. @endverbatim
  10419. *
  10420. * <b> Return Value </b>
  10421. * @n None
  10422. *
  10423. * <b> Pre Condition </b>
  10424. * @n CSL_SRIO_Open() must be called
  10425. *
  10426. * <b> Post Condition </b>
  10427. * @n None
  10428. *
  10429. * @b Writes
  10430. * @n SRIO_RIO_PLM_SP_RCVD_MECS_CMD_STAT
  10431. *
  10432. * @b Affects
  10433. * @n SRIO_RIO_PLM_SP_RCVD_MECS_CMD_STAT=0
  10434. *
  10435. * @b Example
  10436. * @verbatim
  10437. CSL_SrioHandle hSrio;
  10438. Uint8 cmd;
  10439. // Open the CSL SRIO Module 0
  10440. hSrio = CSL_SRIO_Open (0);
  10441. // Get the PLM Port MECS Status
  10442. CSL_SRIO_GetPLMPortMECSStatus(hSrio, 1, &cmd);
  10443. ...
  10444. // Clear the PLM Port MECS Status.
  10445. CSL_SRIO_ClearPLMPortMECSStatus(hSrio, 1, cmd);
  10446. ...
  10447. @endverbatim
  10448. * =============================================================================
  10449. */
  10450. static inline void CSL_SRIO_ClearPLMPortMECSStatus
  10451. (
  10452. CSL_SrioHandle hSrio,
  10453. Uint8 portNum,
  10454. Uint8 cmd
  10455. )
  10456. {
  10457. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_RCVD_MECS, SRIO_RIO_PLM_SP_RCVD_MECS_CMD_STAT, cmd);
  10458. }
  10459. /** ============================================================================
  10460. * @n@b CSL_SRIO_GetPLMPortMECSForwarding
  10461. *
  10462. * @b Description
  10463. * @n The function is used to get the PLM Port MECS Forwarding
  10464. *
  10465. * @b Arguments
  10466. @verbatim
  10467. hSrio Handle of the SRIO device
  10468. portNum SRIO Port Number
  10469. subscription Specifies which MECS cmd values the port
  10470. should forward to its link
  10471. @endverbatim
  10472. *
  10473. * <b> Return Value </b>
  10474. * @n None
  10475. *
  10476. * <b> Pre Condition </b>
  10477. * @n CSL_SRIO_Open() must be called
  10478. *
  10479. * <b> Post Condition </b>
  10480. * @n None
  10481. *
  10482. * @b Reads
  10483. * @n SRIO_RIO_PLM_SP_MECS_FWD_SUBSCRIPTION
  10484. *
  10485. * @b Example
  10486. * @verbatim
  10487. CSL_SrioHandle hSrio;
  10488. Uint8 subscription;
  10489. // Open the CSL SRIO Module 0
  10490. hSrio = CSL_SRIO_Open (0);
  10491. // Get the PLM Port MECS Forwarding
  10492. CSL_SRIO_GetPLMPortMECSForwarding(hSrio, 1, &subscription);
  10493. ...
  10494. @endverbatim
  10495. * =============================================================================
  10496. */
  10497. static inline void CSL_SRIO_GetPLMPortMECSForwarding
  10498. (
  10499. CSL_SrioHandle hSrio,
  10500. Uint8 portNum,
  10501. Uint8* subscription
  10502. )
  10503. {
  10504. *subscription = CSL_FEXT (hSrio->RIO_PLM[portNum].RIO_PLM_SP_MECS_FWD,
  10505. SRIO_RIO_PLM_SP_MECS_FWD_SUBSCRIPTION);
  10506. }
  10507. /** ============================================================================
  10508. * @n@b CSL_SRIO_SetPLMPortMECSForwarding
  10509. *
  10510. * @b Description
  10511. * @n The function is used to set the PLM Port MECS Forwarding
  10512. *
  10513. * @b Arguments
  10514. @verbatim
  10515. hSrio Handle of the SRIO device
  10516. portNum SRIO Port Number
  10517. subscription Specifies which MECS cmd values the port
  10518. should forward to its link
  10519. @endverbatim
  10520. *
  10521. * <b> Return Value </b>
  10522. * @n None
  10523. *
  10524. * <b> Pre Condition </b>
  10525. * @n CSL_SRIO_Open() must be called
  10526. *
  10527. * <b> Post Condition </b>
  10528. * @n None
  10529. *
  10530. * @b Writes
  10531. * @n SRIO_RIO_PLM_SP_MECS_FWD_SUBSCRIPTION
  10532. *
  10533. * @b Example
  10534. * @verbatim
  10535. CSL_SrioHandle hSrio;
  10536. // Open the CSL SRIO Module 0
  10537. hSrio = CSL_SRIO_Open (0);
  10538. // Set the PLM Port MECS Forwarding
  10539. CSL_SRIO_SetPLMPortMECSForwarding(hSrio, 1, 0x1);
  10540. ...
  10541. @endverbatim
  10542. * =============================================================================
  10543. */
  10544. static inline void CSL_SRIO_SetPLMPortMECSForwarding
  10545. (
  10546. CSL_SrioHandle hSrio,
  10547. Uint8 portNum,
  10548. Uint8 subscription
  10549. )
  10550. {
  10551. CSL_FINS (hSrio->RIO_PLM[portNum].RIO_PLM_SP_MECS_FWD, SRIO_RIO_PLM_SP_MECS_FWD_SUBSCRIPTION, subscription);
  10552. }
  10553. /** ============================================================================
  10554. * @n@b CSL_SRIO_GetPLMPortCSTransmit
  10555. *
  10556. * @b Description
  10557. * @n The function is used to get the Control Symbol Transmit1
  10558. *
  10559. * @b Arguments
  10560. @verbatim
  10561. hSrio Handle of the SRIO device
  10562. portNum SRIO Port Number
  10563. ptrCSTransmit Control Symbol Transmit Configuration
  10564. @endverbatim
  10565. *
  10566. * <b> Return Value </b>
  10567. * @n None
  10568. *
  10569. * <b> Pre Condition </b>
  10570. * @n CSL_SRIO_Open() must be called
  10571. *
  10572. * <b> Post Condition </b>
  10573. * @n None
  10574. *
  10575. * @b Reads
  10576. * @n SRIO_RIO_PLM_SP_LONG_CS_TX1_STYPE_0, SRIO_RIO_PLM_SP_LONG_CS_TX1_PAR_0,
  10577. * @n SRIO_RIO_PLM_SP_LONG_CS_TX1_PAR_1, SRIO_RIO_PLM_SP_LONG_CS_TX1_CS_EMB,
  10578. * @n SRIO_RIO_PLM_SP_LONG_CS_TX1_STYPE_1, SRIO_RIO_PLM_SP_LONG_CS_TX1_CMD,
  10579. * @n SRIO_RIO_PLM_SP_LONG_CS_TX2_STYPE_2, SRIO_RIO_PLM_SP_LONG_CS_TX2_PARM
  10580. *
  10581. * @b Example
  10582. * @verbatim
  10583. CSL_SrioHandle hSrio;
  10584. SRIO_PLM_CONTROL_SYMBOL cntlSymbol;
  10585. // Open the CSL SRIO Module 0
  10586. hSrio = CSL_SRIO_Open (0);
  10587. // Get the PLM Port Control Symbol Transmit Configuration
  10588. CSL_SRIO_GetPLMPortCSTransmit(hSrio, 1, &cntlSymbol);
  10589. ...
  10590. @endverbatim
  10591. * =============================================================================
  10592. */
  10593. static inline void CSL_SRIO_GetPLMPortCSTransmit
  10594. (
  10595. CSL_SrioHandle hSrio,
  10596. Uint8 portNum,
  10597. SRIO_PLM_CONTROL_SYMBOL* ptrCSTransmit
  10598. )
  10599. {
  10600. Uint32 value = hSrio->RIO_PLM[portNum].RIO_PLM_SP_LONG_CS_TX1;
  10601. ptrCSTransmit->stype0 = CSL_FEXT (value,SRIO_RIO_PLM_SP_LONG_CS_TX1_STYPE_0);
  10602. ptrCSTransmit->par0 = CSL_FEXT (value,SRIO_RIO_PLM_SP_LONG_CS_TX1_PAR_0);
  10603. ptrCSTransmit->par1 = CSL_FEXT (value,SRIO_RIO_PLM_SP_LONG_CS_TX1_PAR_1);
  10604. ptrCSTransmit->csEmb = CSL_FEXT (value,SRIO_RIO_PLM_SP_LONG_CS_TX1_CS_EMB);
  10605. ptrCSTransmit->stype1 = CSL_FEXT (value,SRIO_RIO_PLM_SP_LONG_CS_TX1_STYPE_1);
  10606. ptrCSTransmit->cmd = CSL_FEXT (value,SRIO_RIO_PLM_SP_LONG_CS_TX1_CMD);
  10607. /* Get the value from the Control Symbol Transmit2 register */
  10608. value = hSrio->RIO_PLM[portNum].RIO_PLM_SP_LONG_CS_TX2;
  10609. ptrCSTransmit->stype2 = CSL_FEXT (value,SRIO_RIO_PLM_SP_LONG_CS_TX2_STYPE_2);
  10610. ptrCSTransmit->parm = CSL_FEXT (value,SRIO_RIO_PLM_SP_LONG_CS_TX2_PARM);
  10611. }
  10612. /** ============================================================================
  10613. * @n@b CSL_SRIO_SetPLMPortCSTransmit
  10614. *
  10615. * @b Description
  10616. * @n The function is used to set the Control Symbol Transmit1
  10617. *
  10618. * @b Arguments
  10619. @verbatim
  10620. hSrio Handle of the SRIO device
  10621. portNum SRIO Port Number
  10622. ptrCSTransmit Control Symbol Transmit Configuration
  10623. @endverbatim
  10624. *
  10625. * <b> Return Value </b>
  10626. * @n None
  10627. *
  10628. * <b> Pre Condition </b>
  10629. * @n CSL_SRIO_Open() must be called
  10630. *
  10631. * <b> Post Condition </b>
  10632. * @n None
  10633. *
  10634. * @b Writes
  10635. * @n SRIO_RIO_PLM_SP_LONG_CS_TX1_STYPE_0, SRIO_RIO_PLM_SP_LONG_CS_TX1_PAR_0,
  10636. * @n SRIO_RIO_PLM_SP_LONG_CS_TX1_PAR_1, SRIO_RIO_PLM_SP_LONG_CS_TX1_CS_EMB,
  10637. * @n SRIO_RIO_PLM_SP_LONG_CS_TX1_STYPE_1, SRIO_RIO_PLM_SP_LONG_CS_TX1_CMD,
  10638. * @n SRIO_RIO_PLM_SP_LONG_CS_TX2_STYPE_2, SRIO_RIO_PLM_SP_LONG_CS_TX2_PARM
  10639. *
  10640. * @b Example
  10641. * @verbatim
  10642. CSL_SrioHandle hSrio;
  10643. SRIO_PLM_CONTROL_SYMBOL cntlSymbol;
  10644. // Open the CSL SRIO Module 0
  10645. hSrio = CSL_SRIO_Open (0);
  10646. // Set the PLM Port Control Symbol Transmit Configuration
  10647. CSL_SRIO_SetPLMPortCSTransmit(hSrio, 1, &cntlSymbol);
  10648. ...
  10649. @endverbatim
  10650. * =============================================================================
  10651. */
  10652. static inline void CSL_SRIO_SetPLMPortCSTransmit
  10653. (
  10654. CSL_SrioHandle hSrio,
  10655. Uint8 portNum,
  10656. SRIO_PLM_CONTROL_SYMBOL* ptrCSTransmit
  10657. )
  10658. {
  10659. hSrio->RIO_PLM[portNum].RIO_PLM_SP_LONG_CS_TX1 =
  10660. CSL_FMK (SRIO_RIO_PLM_SP_LONG_CS_TX1_STYPE_0, ptrCSTransmit->stype0) |
  10661. CSL_FMK (SRIO_RIO_PLM_SP_LONG_CS_TX1_PAR_0, ptrCSTransmit->par0) |
  10662. CSL_FMK (SRIO_RIO_PLM_SP_LONG_CS_TX1_PAR_1, ptrCSTransmit->par1) |
  10663. CSL_FMK (SRIO_RIO_PLM_SP_LONG_CS_TX1_CS_EMB, ptrCSTransmit->csEmb) |
  10664. CSL_FMK (SRIO_RIO_PLM_SP_LONG_CS_TX1_STYPE_1, ptrCSTransmit->stype1) |
  10665. CSL_FMK (SRIO_RIO_PLM_SP_LONG_CS_TX1_CMD, ptrCSTransmit->cmd);
  10666. hSrio->RIO_PLM[portNum].RIO_PLM_SP_LONG_CS_TX2 =
  10667. CSL_FMK (SRIO_RIO_PLM_SP_LONG_CS_TX2_STYPE_2, ptrCSTransmit->stype2) |
  10668. CSL_FMK (SRIO_RIO_PLM_SP_LONG_CS_TX2_PARM, ptrCSTransmit->parm);
  10669. }
  10670. /** ============================================================================
  10671. * @n@b CSL_SRIO_GetTLMPortControl
  10672. *
  10673. * @b Description
  10674. * @n The function is used to get the TLM port control
  10675. *
  10676. * @b Arguments
  10677. @verbatim
  10678. hSrio Handle of the SRIO device
  10679. portNum SRIO Port Number
  10680. ptrTLMControl TLM Port Control
  10681. @endverbatim
  10682. *
  10683. * <b> Return Value </b>
  10684. * @n None
  10685. *
  10686. * <b> Pre Condition </b>
  10687. * @n CSL_SRIO_Open() must be called
  10688. *
  10689. * <b> Post Condition </b>
  10690. * @n None
  10691. *
  10692. * @b Reads
  10693. * @n SRIO_RIO_TLM_SP_CONTROL_PORTGROUP_SELECT, SRIO_RIO_TLM_SP_CONTROL_VOQ_SELECT,
  10694. * @n SRIO_RIO_TLM_SP_CONTROL_TGT_ID_DIS, SRIO_RIO_TLM_SP_CONTROL_MTC_TGT_ID_DIS,
  10695. * @n SRIO_RIO_TLM_SP_CONTROL_LENGTH
  10696. *
  10697. * @b Example
  10698. * @verbatim
  10699. CSL_SrioHandle hSrio;
  10700. SRIO_TLM_CONTROL tlmCntlSymbol;
  10701. // Open the CSL SRIO Module 0
  10702. hSrio = CSL_SRIO_Open (0);
  10703. // Get the TLM Port Control Configuration
  10704. CSL_SRIO_GetTLMPortControl(hSrio, 1, &tlmCntlSymbol);
  10705. ...
  10706. @endverbatim
  10707. * =============================================================================
  10708. */
  10709. static inline void CSL_SRIO_GetTLMPortControl
  10710. (
  10711. CSL_SrioHandle hSrio,
  10712. Uint8 portNum,
  10713. SRIO_TLM_CONTROL* ptrTLMControl
  10714. )
  10715. {
  10716. Uint32 value = hSrio->RIO_TLM[portNum].RIO_TLM_SP_CONTROL;
  10717. ptrTLMControl->portGroupSelect = CSL_FEXT (value,SRIO_RIO_TLM_SP_CONTROL_PORTGROUP_SELECT);
  10718. ptrTLMControl->voqSelect = CSL_FEXT (value,SRIO_RIO_TLM_SP_CONTROL_VOQ_SELECT);
  10719. ptrTLMControl->tgtIDDis = CSL_FEXT (value,SRIO_RIO_TLM_SP_CONTROL_TGT_ID_DIS);
  10720. ptrTLMControl->mtcTgtIDDis = CSL_FEXT (value,SRIO_RIO_TLM_SP_CONTROL_MTC_TGT_ID_DIS);
  10721. ptrTLMControl->length = CSL_FEXT (value,SRIO_RIO_TLM_SP_CONTROL_LENGTH);
  10722. }
  10723. /** ============================================================================
  10724. * @n@b CSL_SRIO_SetTLMPortControl
  10725. *
  10726. * @b Description
  10727. * @n The function is used to set the TLM port control
  10728. *
  10729. * @b Arguments
  10730. @verbatim
  10731. hSrio Handle of the SRIO device
  10732. portNum SRIO Port Number
  10733. ptrTLMControl TLM Port Control
  10734. @endverbatim
  10735. *
  10736. * <b> Return Value </b>
  10737. * @n None
  10738. *
  10739. * <b> Pre Condition </b>
  10740. * @n CSL_SRIO_Open() must be called
  10741. *
  10742. * <b> Post Condition </b>
  10743. * @n None
  10744. *
  10745. * @b Writes
  10746. * @n SRIO_RIO_TLM_SP_CONTROL_PORTGROUP_SELECT, SRIO_RIO_TLM_SP_CONTROL_VOQ_SELECT,
  10747. * @n SRIO_RIO_TLM_SP_CONTROL_TGT_ID_DIS, SRIO_RIO_TLM_SP_CONTROL_MTC_TGT_ID_DIS
  10748. *
  10749. * @b Example
  10750. * @verbatim
  10751. CSL_SrioHandle hSrio;
  10752. SRIO_TLM_CONTROL tlmCntlSymbol;
  10753. // Open the CSL SRIO Module 0
  10754. hSrio = CSL_SRIO_Open (0);
  10755. // Get the TLM Port Control Configuration
  10756. CSL_SRIO_GetTLMPortControl(hSrio, 1, &tlmCntlSymbol);
  10757. // Set Promiscuous mode.
  10758. tlmCntlSymbol.tgtIDDis = 1;
  10759. tlmCntlSymbol.mtcTgtIDDis = 1;
  10760. CSL_SRIO_SetTLMPortControl (hSrio, 1, &tlmCntlSymbol);
  10761. ...
  10762. @endverbatim
  10763. * =============================================================================
  10764. */
  10765. static inline void CSL_SRIO_SetTLMPortControl
  10766. (
  10767. CSL_SrioHandle hSrio,
  10768. Uint8 portNum,
  10769. SRIO_TLM_CONTROL* ptrTLMControl
  10770. )
  10771. {
  10772. hSrio->RIO_TLM[portNum].RIO_TLM_SP_CONTROL =
  10773. CSL_FMK (SRIO_RIO_TLM_SP_CONTROL_PORTGROUP_SELECT, ptrTLMControl->portGroupSelect) |
  10774. CSL_FMK (SRIO_RIO_TLM_SP_CONTROL_VOQ_SELECT, ptrTLMControl->voqSelect) |
  10775. CSL_FMK (SRIO_RIO_TLM_SP_CONTROL_TGT_ID_DIS, ptrTLMControl->tgtIDDis) |
  10776. CSL_FMK (SRIO_RIO_TLM_SP_CONTROL_MTC_TGT_ID_DIS, ptrTLMControl->mtcTgtIDDis);
  10777. }
  10778. /** ============================================================================
  10779. * @n@b CSL_SRIO_GetTLMPortStatus
  10780. *
  10781. * @b Description
  10782. * @n The function is used to get the TLM port status
  10783. *
  10784. * @b Arguments
  10785. @verbatim
  10786. hSrio Handle of the SRIO device
  10787. portNum SRIO Port Number
  10788. igBadVC Detected an inbound packet with the VC bit set
  10789. igBrrFilter Discarded an inbound transaction based on the BRR
  10790. @endverbatim
  10791. *
  10792. * <b> Return Value </b>
  10793. * @n None
  10794. *
  10795. * <b> Pre Condition </b>
  10796. * @n CSL_SRIO_Open() must be called
  10797. *
  10798. * <b> Post Condition </b>
  10799. * @n None
  10800. *
  10801. * @b Reads
  10802. * @n SRIO_RIO_TLM_SP_STATUS_IG_BAD_VC, SRIO_RIO_TLM_SP_STATUS_IG_BRR_FILTER
  10803. *
  10804. * @b Example
  10805. * @verbatim
  10806. CSL_SrioHandle hSrio;
  10807. Uint8 igBadVC;
  10808. Uint8 igBrrFilter;
  10809. // Open the CSL SRIO Module 0
  10810. hSrio = CSL_SRIO_Open (0);
  10811. // Get the TLM Port Status
  10812. CSL_SRIO_GetTLMPortStatus(hSrio, 1, &igBadVC, &igBrrFilter);
  10813. ...
  10814. @endverbatim
  10815. * =============================================================================
  10816. */
  10817. static inline void CSL_SRIO_GetTLMPortStatus
  10818. (
  10819. CSL_SrioHandle hSrio,
  10820. Uint8 portNum,
  10821. Uint8* igBadVC,
  10822. Uint8* igBrrFilter
  10823. )
  10824. {
  10825. Uint32 value = hSrio->RIO_TLM[portNum].RIO_TLM_SP_STATUS;
  10826. *igBadVC = CSL_FEXT (value, SRIO_RIO_TLM_SP_STATUS_IG_BAD_VC);
  10827. *igBrrFilter = CSL_FEXT (value, SRIO_RIO_TLM_SP_STATUS_IG_BRR_FILTER);
  10828. }
  10829. /** ============================================================================
  10830. * @n@b CSL_SRIO_ClearTLMPortStatus
  10831. *
  10832. * @b Description
  10833. * @n The function is used to clear the TLM port status
  10834. *
  10835. * @b Arguments
  10836. @verbatim
  10837. hSrio Handle of the SRIO device
  10838. portNum SRIO Port Number
  10839. igBadVC Detected an inbound packet with the VC bit set
  10840. igBrrFilter Discarded an inbound transaction based on the BRR
  10841. @endverbatim
  10842. *
  10843. * <b> Return Value </b>
  10844. * @n None
  10845. *
  10846. * <b> Pre Condition </b>
  10847. * @n CSL_SRIO_Open() must be called
  10848. *
  10849. * <b> Post Condition </b>
  10850. * @n None
  10851. *
  10852. * @b Writes
  10853. * @n SRIO_RIO_TLM_SP_STATUS_IG_BAD_VC=1, SRIO_RIO_TLM_SP_STATUS_IG_BRR_FILTER=1
  10854. *
  10855. * @b Affects
  10856. * @n SRIO_RIO_TLM_SP_STATUS_IG_BAD_VC=0, SRIO_RIO_TLM_SP_STATUS_IG_BRR_FILTER=0
  10857. *
  10858. * @b Example
  10859. * @verbatim
  10860. CSL_SrioHandle hSrio;
  10861. Uint8 igBadVC;
  10862. Uint8 igBrrFilter;
  10863. // Open the CSL SRIO Module 0
  10864. hSrio = CSL_SRIO_Open (0);
  10865. // Get the TLM Port Status
  10866. CSL_SRIO_GetTLMPortStatus(hSrio, 1, &igBadVC, &igBrrFilter);
  10867. ...
  10868. // Clear the TLM Port Status
  10869. CSL_SRIO_ClearTLMPortStatus (hSrio, 1, igBadVC, igBrrFilter);
  10870. ...
  10871. @endverbatim
  10872. * =============================================================================
  10873. */
  10874. static inline void CSL_SRIO_ClearTLMPortStatus
  10875. (
  10876. CSL_SrioHandle hSrio,
  10877. Uint8 portNum,
  10878. Uint8 igBadVC,
  10879. Uint8 igBrrFilter
  10880. )
  10881. {
  10882. hSrio->RIO_TLM[portNum].RIO_TLM_SP_STATUS =
  10883. CSL_FMK (SRIO_RIO_TLM_SP_STATUS_IG_BAD_VC, igBadVC) |
  10884. CSL_FMK (SRIO_RIO_TLM_SP_STATUS_IG_BRR_FILTER, igBrrFilter);
  10885. }
  10886. /** ============================================================================
  10887. * @n@b CSL_SRIO_GetTLMPortInterrupts
  10888. *
  10889. * @b Description
  10890. * @n The function is used to get the TLM port interrupt status
  10891. *
  10892. * @b Arguments
  10893. @verbatim
  10894. hSrio Handle of the SRIO device
  10895. portNum SRIO Port Number
  10896. igBadVC Detected an inbound packet with the VC bit set
  10897. igBrrFilter Discarded an inbound transaction based on the BRR
  10898. @endverbatim
  10899. *
  10900. * <b> Return Value </b>
  10901. * @n None
  10902. *
  10903. * <b> Pre Condition </b>
  10904. * @n CSL_SRIO_Open() must be called
  10905. *
  10906. * <b> Post Condition </b>
  10907. * @n None
  10908. *
  10909. * @b Reads
  10910. * @n SRIO_RIO_TLM_SP_INT_ENABLE_IG_BAD_VC,
  10911. * @n SRIO_RIO_TLM_SP_INT_ENABLE_IG_BRR_FILTER
  10912. *
  10913. * @b Example
  10914. * @verbatim
  10915. CSL_SrioHandle hSrio;
  10916. Uint8 igBadVC;
  10917. Uint8 igBrrFilter;
  10918. // Open the CSL SRIO Module 0
  10919. hSrio = CSL_SRIO_Open (0);
  10920. // Get the TLM Port Interrupt Status
  10921. CSL_SRIO_GetTLMPortInterrupts(hSrio, 1, &igBadVC, &igBrrFilter);
  10922. ...
  10923. @endverbatim
  10924. * =============================================================================
  10925. */
  10926. static inline void CSL_SRIO_GetTLMPortInterrupts
  10927. (
  10928. CSL_SrioHandle hSrio,
  10929. Uint8 portNum,
  10930. Uint8* igBadVC,
  10931. Uint8* igBrrFilter
  10932. )
  10933. {
  10934. Uint32 value = hSrio->RIO_TLM[portNum].RIO_TLM_SP_INT_ENABLE;
  10935. *igBadVC = CSL_FEXT (value, SRIO_RIO_TLM_SP_INT_ENABLE_IG_BAD_VC);
  10936. *igBrrFilter = CSL_FEXT (value, SRIO_RIO_TLM_SP_INT_ENABLE_IG_BRR_FILTER);
  10937. }
  10938. /** ============================================================================
  10939. * @n@b CSL_SRIO_SetTLMPortInterrupts
  10940. *
  10941. * @b Description
  10942. * @n The function is used to set the TLM Port Interrupts
  10943. *
  10944. * @b Arguments
  10945. @verbatim
  10946. hSrio Handle of the SRIO device
  10947. portNum SRIO Port Number
  10948. igBadVC Detected an inbound packet with the VC bit set
  10949. igBrrFilter Discarded an inbound transaction based on the BRR
  10950. @endverbatim
  10951. *
  10952. * <b> Return Value </b>
  10953. * @n None
  10954. *
  10955. * <b> Pre Condition </b>
  10956. * @n CSL_SRIO_Open() must be called
  10957. *
  10958. * <b> Post Condition </b>
  10959. * @n None
  10960. *
  10961. * @b Writes
  10962. * @n SRIO_RIO_TLM_SP_INT_ENABLE_IG_BAD_VC,
  10963. * @n SRIO_RIO_TLM_SP_INT_ENABLE_IG_BRR_FILTER
  10964. *
  10965. * @b Example
  10966. * @verbatim
  10967. CSL_SrioHandle hSrio;
  10968. Uint8 igBadVC;
  10969. Uint8 igBrrFilter;
  10970. // Open the CSL SRIO Module 0
  10971. hSrio = CSL_SRIO_Open (0);
  10972. // Enable BadVC Interrupt & Disable BRR Filter Interrupts
  10973. CSL_SRIO_SetTLMPortInterrupts(hSrio, 1, 1, 0);
  10974. ...
  10975. @endverbatim
  10976. * =============================================================================
  10977. */
  10978. static inline void CSL_SRIO_SetTLMPortInterrupts
  10979. (
  10980. CSL_SrioHandle hSrio,
  10981. Uint8 portNum,
  10982. Uint8 igBadVC,
  10983. Uint8 igBrrFilter
  10984. )
  10985. {
  10986. hSrio->RIO_TLM[portNum].RIO_TLM_SP_INT_ENABLE =
  10987. CSL_FMK (SRIO_RIO_TLM_SP_INT_ENABLE_IG_BAD_VC, igBadVC) |
  10988. CSL_FMK (SRIO_RIO_TLM_SP_INT_ENABLE_IG_BRR_FILTER, igBrrFilter);
  10989. }
  10990. /** ============================================================================
  10991. * @n@b CSL_SRIO_GetTLMPortWriteEnable
  10992. *
  10993. * @b Description
  10994. * @n The function is used to get the TLM port write enable status
  10995. *
  10996. * @b Arguments
  10997. @verbatim
  10998. hSrio Handle of the SRIO device
  10999. portNum SRIO Port Number
  11000. igBadVC Detected an inbound packet with the VC bit set
  11001. igBrrFilter Discarded an inbound transaction based on the BRR
  11002. @endverbatim
  11003. *
  11004. * <b> Return Value </b>
  11005. * @n None
  11006. *
  11007. * <b> Pre Condition </b>
  11008. * @n CSL_SRIO_Open() must be called
  11009. *
  11010. * <b> Post Condition </b>
  11011. * @n None
  11012. *
  11013. * @b Reads
  11014. * @n SRIO_RIO_TLM_SP_PW_ENABLE_IG_BAD_VC,
  11015. * @n SRIO_RIO_TLM_SP_PW_ENABLE_IG_BRR_FILTER
  11016. *
  11017. * @b Example
  11018. * @verbatim
  11019. CSL_SrioHandle hSrio;
  11020. Uint8 igBadVC;
  11021. Uint8 igBrrFilter;
  11022. // Open the CSL SRIO Module 0
  11023. hSrio = CSL_SRIO_Open (0);
  11024. // Get the TLM Port Write Enable status
  11025. CSL_SRIO_GetTLMPortWriteEnable(hSrio, 1, &igBadVC, &igBrrFilter);
  11026. ...
  11027. @endverbatim
  11028. * =============================================================================
  11029. */
  11030. static inline void CSL_SRIO_GetTLMPortWriteEnable
  11031. (
  11032. CSL_SrioHandle hSrio,
  11033. Uint8 portNum,
  11034. Uint8* igBadVC,
  11035. Uint8* igBrrFilter
  11036. )
  11037. {
  11038. Uint32 value = hSrio->RIO_TLM[portNum].RIO_TLM_SP_PW_ENABLE;
  11039. *igBadVC = CSL_FEXT (value, SRIO_RIO_TLM_SP_PW_ENABLE_IG_BAD_VC);
  11040. *igBrrFilter = CSL_FEXT (value, SRIO_RIO_TLM_SP_PW_ENABLE_IG_BRR_FILTER);
  11041. }
  11042. /** ============================================================================
  11043. * @n@b CSL_SRIO_SetTLMPortWriteEnable
  11044. *
  11045. * @b Description
  11046. * @n The function is used to set the TLM port write enable status
  11047. *
  11048. * @b Arguments
  11049. @verbatim
  11050. hSrio Handle of the SRIO device
  11051. portNum SRIO Port Number
  11052. igBadVC Detected an inbound packet with the VC bit set
  11053. igBrrFilter Discarded an inbound transaction based on the BRR
  11054. @endverbatim
  11055. *
  11056. * <b> Return Value </b>
  11057. * @n None
  11058. *
  11059. * <b> Pre Condition </b>
  11060. * @n CSL_SRIO_Open() must be called
  11061. *
  11062. * <b> Post Condition </b>
  11063. * @n None
  11064. *
  11065. * @b Writes
  11066. * @n SRIO_RIO_TLM_SP_PW_ENABLE_IG_BAD_VC,
  11067. * @n SRIO_RIO_TLM_SP_PW_ENABLE_IG_BRR_FILTER
  11068. *
  11069. * @b Example
  11070. * @verbatim
  11071. CSL_SrioHandle hSrio;
  11072. // Open the CSL SRIO Module 0
  11073. hSrio = CSL_SRIO_Open (0);
  11074. // Set the TLM Port Write Enable status for BAD VC and NOT for BRR Filter
  11075. CSL_SRIO_SetTLMPortWriteEnable(hSrio, 1, 1, 0);
  11076. ...
  11077. @endverbatim
  11078. * =============================================================================
  11079. */
  11080. static inline void CSL_SRIO_SetTLMPortWriteEnable
  11081. (
  11082. CSL_SrioHandle hSrio,
  11083. Uint8 portNum,
  11084. Uint8 igBadVC,
  11085. Uint8 igBrrFilter
  11086. )
  11087. {
  11088. hSrio->RIO_TLM[portNum].RIO_TLM_SP_PW_ENABLE =
  11089. CSL_FMK (SRIO_RIO_TLM_SP_PW_ENABLE_IG_BAD_VC, igBadVC) |
  11090. CSL_FMK (SRIO_RIO_TLM_SP_PW_ENABLE_IG_BRR_FILTER, igBrrFilter);
  11091. }
  11092. /** ============================================================================
  11093. * @n@b CSL_SRIO_SetTLMPortEventGenerate
  11094. *
  11095. * @b Description
  11096. * @n The function is used to set the TLM port event generates
  11097. *
  11098. * @b Arguments
  11099. @verbatim
  11100. hSrio Handle of the SRIO device
  11101. portNum SRIO Port Number
  11102. igBadVC Detected an inbound packet with the VC bit set
  11103. igBrrFilter Discarded an inbound transaction based on the BRR
  11104. @endverbatim
  11105. *
  11106. * <b> Return Value </b>
  11107. * @n None
  11108. *
  11109. * <b> Pre Condition </b>
  11110. * @n CSL_SRIO_Open() must be called
  11111. *
  11112. * <b> Post Condition </b>
  11113. * @n None
  11114. *
  11115. * @b Writes
  11116. * @n SRIO_RIO_TLM_SP_EVENT_GEN_IG_BAD_VC,
  11117. * @n SRIO_RIO_TLM_SP_EVENT_GEN_IG_BRR_FILTER
  11118. *
  11119. * @b Affects
  11120. * @n SRIO_RIO_TLM_SP_STATUS_IG_BAD_VC=1, SRIO_RIO_TLM_SP_STATUS_IG_BRR_FILTER=1
  11121. *
  11122. * @b Example
  11123. * @verbatim
  11124. CSL_SrioHandle hSrio;
  11125. Uint8 igBadVC;
  11126. Uint8 igBrrFilter;
  11127. // Open the CSL SRIO Module 0
  11128. hSrio = CSL_SRIO_Open (0);
  11129. // Set the TLM Port Event Generate Status
  11130. CSL_SRIO_SetTLMPortEventGenerate(hSrio, 1, 1, 0);
  11131. ...
  11132. @endverbatim
  11133. * =============================================================================
  11134. */
  11135. static inline void CSL_SRIO_SetTLMPortEventGenerate
  11136. (
  11137. CSL_SrioHandle hSrio,
  11138. Uint8 portNum,
  11139. Uint8 igBadVC,
  11140. Uint8 igBrrFilter
  11141. )
  11142. {
  11143. hSrio->RIO_TLM[portNum].RIO_TLM_SP_EVENT_GEN =
  11144. CSL_FMK (SRIO_RIO_TLM_SP_EVENT_GEN_IG_BAD_VC, igBadVC) |
  11145. CSL_FMK (SRIO_RIO_TLM_SP_EVENT_GEN_IG_BRR_FILTER, igBrrFilter);
  11146. }
  11147. /** ============================================================================
  11148. * @n@b CSL_SRIO_GetTLMPortBaseRoutingInfo
  11149. *
  11150. * @b Description
  11151. * @n The function is used to get the TLM Base Routing Information
  11152. *
  11153. * @b Arguments
  11154. @verbatim
  11155. hSrio Handle of the SRIO device
  11156. portNum SRIO Port Number
  11157. brrNum BRR Number for which this configuration is applied.
  11158. enableStatus Status of the BRR for accepting & routing packets
  11159. maintRouting Maintainance Packet Routing Status
  11160. privateStatus Status of the BRR to be used by its port or by all
  11161. ports
  11162. @endverbatim
  11163. *
  11164. * <b> Return Value </b>
  11165. * @n None
  11166. *
  11167. * <b> Pre Condition </b>
  11168. * @n CSL_SRIO_Open() must be called
  11169. *
  11170. * <b> Post Condition </b>
  11171. * @n None
  11172. *
  11173. * @b Reads
  11174. * @n SRIO_RIO_TLM_SP_BRR_0_CTL_ENABLE, SRIO_RIO_TLM_SP_BRR_0_CTL_ROUTE_MR_TO_LLM,
  11175. * @n SRIO_RIO_TLM_SP_BRR_0_CTL_PRIVATE;
  11176. * @n SRIO_RIO_TLM_SP_BRR_1_CTL_ENABLE, SRIO_RIO_TLM_SP_BRR_1_CTL_ROUTE_MR_TO_LLM,
  11177. * @n SRIO_RIO_TLM_SP_BRR_1_CTL_PRIVATE;
  11178. * @n SRIO_RIO_TLM_SP_BRR_2_CTL_ENABLE, SRIO_RIO_TLM_SP_BRR_2_CTL_ROUTE_MR_TO_LLM,
  11179. * @n SRIO_RIO_TLM_SP_BRR_2_CTL_PRIVATE;
  11180. * @n SRIO_RIO_TLM_SP_BRR_3_CTL_ENABLE, SRIO_RIO_TLM_SP_BRR_3_CTL_ROUTE_MR_TO_LLM,
  11181. * @n SRIO_RIO_TLM_SP_BRR_3_CTL_PRIVATE
  11182. *
  11183. * @b Example
  11184. * @verbatim
  11185. CSL_SrioHandle hSrio;
  11186. Uint8 enableStatus;
  11187. Uint8 maintRouting;
  11188. Uint8 privateStatus;
  11189. // Open the CSL SRIO Module 0
  11190. hSrio = CSL_SRIO_Open (0);
  11191. // Get the TLM Port Base routing information.
  11192. CSL_SRIO_GetTLMPortBaseRoutingInfo(hSrio, 1, 0, &enableStatus, &maintRouting, &privateStatus);
  11193. ...
  11194. @endverbatim
  11195. * =============================================================================
  11196. */
  11197. static inline void CSL_SRIO_GetTLMPortBaseRoutingInfo
  11198. (
  11199. CSL_SrioHandle hSrio,
  11200. Uint8 portNum,
  11201. Uint8 brrNum,
  11202. Uint8* enableStatus,
  11203. Uint8* maintRouting,
  11204. Uint8* privateStatus
  11205. )
  11206. {
  11207. Uint32 value = hSrio->RIO_TLM[portNum].brr[brrNum].RIO_TLM_SP_BRR_CTL;
  11208. *enableStatus = CSL_FEXT (value, SRIO_RIO_TLM_SP_BRR_0_CTL_ENABLE);
  11209. *maintRouting = CSL_FEXT (value, SRIO_RIO_TLM_SP_BRR_0_CTL_ROUTE_MR_TO_LLM);
  11210. *privateStatus = CSL_FEXT (value, SRIO_RIO_TLM_SP_BRR_0_CTL_PRIVATE);
  11211. }
  11212. /** ============================================================================
  11213. * @n@b CSL_SRIO_SetTLMPortBaseRoutingInfo
  11214. *
  11215. * @b Description
  11216. * @n The function is used to set the TLM Base Routing Information
  11217. *
  11218. * @b Arguments
  11219. @verbatim
  11220. hSrio Handle of the SRIO device
  11221. portNum SRIO Port Number
  11222. brrNum BRR Number for which this configuration is applied.
  11223. enableStatus Status of the BRR for accepting & routing packets
  11224. maintRouting Maintainance Packet Routing Status
  11225. privateStatus Status of the BRR to be used by its port or by all
  11226. ports
  11227. @endverbatim
  11228. *
  11229. * <b> Return Value </b>
  11230. * @n None
  11231. *
  11232. * <b> Pre Condition </b>
  11233. * @n CSL_SRIO_Open() must be called
  11234. *
  11235. * <b> Post Condition </b>
  11236. * @n None
  11237. *
  11238. * @b Writes
  11239. * @n SRIO_RIO_TLM_SP_BRR_0_CTL_ENABLE, SRIO_RIO_TLM_SP_BRR_0_CTL_ROUTE_MR_TO_LLM,
  11240. * @n SRIO_RIO_TLM_SP_BRR_0_CTL_PRIVATE;
  11241. * @n SRIO_RIO_TLM_SP_BRR_1_CTL_ENABLE, SRIO_RIO_TLM_SP_BRR_1_CTL_ROUTE_MR_TO_LLM,
  11242. * @n SRIO_RIO_TLM_SP_BRR_1_CTL_PRIVATE;
  11243. * @n SRIO_RIO_TLM_SP_BRR_2_CTL_ENABLE, SRIO_RIO_TLM_SP_BRR_2_CTL_ROUTE_MR_TO_LLM,
  11244. * @n SRIO_RIO_TLM_SP_BRR_2_CTL_PRIVATE;
  11245. * @n SRIO_RIO_TLM_SP_BRR_3_CTL_ENABLE, SRIO_RIO_TLM_SP_BRR_3_CTL_ROUTE_MR_TO_LLM,
  11246. * @n SRIO_RIO_TLM_SP_BRR_3_CTL_PRIVATE
  11247. *
  11248. * @b Example
  11249. * @verbatim
  11250. CSL_SrioHandle hSrio;
  11251. // Open the CSL SRIO Module 0
  11252. hSrio = CSL_SRIO_Open (0);
  11253. // Set the TLM Port Base routing information.
  11254. CSL_SRIO_SetTLMPortBaseRoutingInfo(hSrio, 1, 0, 1, 0, 1);
  11255. ...
  11256. @endverbatim
  11257. * =============================================================================
  11258. */
  11259. static inline void CSL_SRIO_SetTLMPortBaseRoutingInfo
  11260. (
  11261. CSL_SrioHandle hSrio,
  11262. Uint8 portNum,
  11263. Uint8 brrNum,
  11264. Uint8 enableStatus,
  11265. Uint8 maintRouting,
  11266. Uint8 privateStatus
  11267. )
  11268. {
  11269. hSrio->RIO_TLM[portNum].brr[brrNum].RIO_TLM_SP_BRR_CTL =
  11270. CSL_FMK (SRIO_RIO_TLM_SP_BRR_0_CTL_ENABLE, enableStatus) |
  11271. CSL_FMK (SRIO_RIO_TLM_SP_BRR_0_CTL_ROUTE_MR_TO_LLM, maintRouting) |
  11272. CSL_FMK (SRIO_RIO_TLM_SP_BRR_0_CTL_PRIVATE, privateStatus);
  11273. }
  11274. /** ============================================================================
  11275. * @n@b CSL_SRIO_GetTLMPortBaseRoutingPatternMatch
  11276. *
  11277. * @b Description
  11278. * @n The function is used to get the TLM Base Routing Pattern Match information
  11279. *
  11280. * @b Arguments
  11281. @verbatim
  11282. hSrio Handle of the SRIO device
  11283. portNum SRIO Port Number
  11284. brrNum BRR Number for which this configuration is applied.
  11285. pattern 16 bit ID used for comparison.
  11286. match Indicates which of the 16bits should be used
  11287. @endverbatim
  11288. *
  11289. * <b> Return Value </b>
  11290. * @n None
  11291. *
  11292. * <b> Pre Condition </b>
  11293. * @n CSL_SRIO_Open() must be called
  11294. *
  11295. * <b> Post Condition </b>
  11296. * @n None
  11297. *
  11298. * @b Reads
  11299. * @n SRIO_RIO_TLM_SP_BRR_0_PATTERN_MATCH_PATTERN, SRIO_RIO_TLM_SP_BRR_0_PATTERN_MATCH_MATCH;
  11300. * @n SRIO_RIO_TLM_SP_BRR_1_PATTERN_MATCH_PATTERN, SRIO_RIO_TLM_SP_BRR_1_PATTERN_MATCH_MATCH;
  11301. * @n SRIO_RIO_TLM_SP_BRR_2_PATTERN_MATCH_PATTERN, SRIO_RIO_TLM_SP_BRR_2_PATTERN_MATCH_MATCH;
  11302. * @n SRIO_RIO_TLM_SP_BRR_3_PATTERN_MATCH_PATTERN, SRIO_RIO_TLM_SP_BRR_3_PATTERN_MATCH_MATCH
  11303. *
  11304. * @b Example
  11305. * @verbatim
  11306. CSL_SrioHandle hSrio;
  11307. Uint16 pattern;
  11308. Uint16 match;
  11309. // Open the CSL SRIO Module 0
  11310. hSrio = CSL_SRIO_Open (0);
  11311. // Get the TLM Port Base routing pattern match information
  11312. CSL_SRIO_GetTLMPortBaseRoutingPatternMatch(hSrio, 1, &pattern, &match);
  11313. ...
  11314. @endverbatim
  11315. * =============================================================================
  11316. */
  11317. static inline void CSL_SRIO_GetTLMPortBaseRoutingPatternMatch
  11318. (
  11319. CSL_SrioHandle hSrio,
  11320. Uint8 portNum,
  11321. Uint8 brrNum,
  11322. Uint16* pattern,
  11323. Uint16* match
  11324. )
  11325. {
  11326. Uint32 value = hSrio->RIO_TLM[portNum].brr[brrNum].RIO_TLM_SP_BRR_PATTERN_MATCH;
  11327. *pattern = CSL_FEXT (value, SRIO_RIO_TLM_SP_BRR_0_PATTERN_MATCH_PATTERN);
  11328. *match = CSL_FEXT (value, SRIO_RIO_TLM_SP_BRR_0_PATTERN_MATCH_MATCH);
  11329. }
  11330. /** ============================================================================
  11331. * @n@b CSL_SRIO_SetTLMPortBaseRoutingPatternMatch
  11332. *
  11333. * @b Description
  11334. * @n The function is used to set the TLM Base Routing Pattern Match information
  11335. *
  11336. * @b Arguments
  11337. @verbatim
  11338. hSrio Handle of the SRIO device
  11339. portNum SRIO Port Number
  11340. brrNum BRR Number for which this configuration is applied.
  11341. pattern 16 bit ID used for comparison.
  11342. match Indicates which of the 16bits should be used
  11343. @endverbatim
  11344. *
  11345. * <b> Return Value </b>
  11346. * @n None
  11347. *
  11348. * <b> Pre Condition </b>
  11349. * @n CSL_SRIO_Open() must be called
  11350. *
  11351. * <b> Post Condition </b>
  11352. * @n None
  11353. *
  11354. * @b Writes
  11355. * @n SRIO_RIO_TLM_SP_BRR_0_PATTERN_MATCH_PATTERN, SRIO_RIO_TLM_SP_BRR_0_PATTERN_MATCH_MATCH;
  11356. * @n SRIO_RIO_TLM_SP_BRR_1_PATTERN_MATCH_PATTERN, SRIO_RIO_TLM_SP_BRR_1_PATTERN_MATCH_MATCH;
  11357. * @n SRIO_RIO_TLM_SP_BRR_2_PATTERN_MATCH_PATTERN, SRIO_RIO_TLM_SP_BRR_2_PATTERN_MATCH_MATCH;
  11358. * @n SRIO_RIO_TLM_SP_BRR_3_PATTERN_MATCH_PATTERN, SRIO_RIO_TLM_SP_BRR_3_PATTERN_MATCH_MATCH
  11359. *
  11360. * @b Example
  11361. * @verbatim
  11362. CSL_SrioHandle hSrio;
  11363. Uint16 pattern;
  11364. Uint16 match;
  11365. // Open the CSL SRIO Module 0
  11366. hSrio = CSL_SRIO_Open (0);
  11367. // Set the TLM Port Base routing pattern match information
  11368. CSL_SRIO_SetTLMPortBaseRoutingPatternMatch(hSrio, 1, &pattern, &match);
  11369. ...
  11370. @endverbatim
  11371. * =============================================================================
  11372. */
  11373. static inline void CSL_SRIO_SetTLMPortBaseRoutingPatternMatch
  11374. (
  11375. CSL_SrioHandle hSrio,
  11376. Uint8 portNum,
  11377. Uint8 brrNum,
  11378. Uint16 pattern,
  11379. Uint16 match
  11380. )
  11381. {
  11382. hSrio->RIO_TLM[portNum].brr[brrNum].RIO_TLM_SP_BRR_PATTERN_MATCH =
  11383. CSL_FMK (SRIO_RIO_TLM_SP_BRR_0_PATTERN_MATCH_PATTERN, pattern) |
  11384. CSL_FMK (SRIO_RIO_TLM_SP_BRR_0_PATTERN_MATCH_MATCH, match);
  11385. }
  11386. /** ============================================================================
  11387. * @n@b CSL_SRIO_GetPBMPortControl
  11388. *
  11389. * @b Description
  11390. * @n The function is used to get the PBM Port Control information
  11391. *
  11392. * @b Arguments
  11393. @verbatim
  11394. hSrio Handle of the SRIO device
  11395. portNum SRIO Port Number
  11396. egReorderMode Reorder Mode
  11397. egReorderStick Number of repeat times the CRQ is reordered
  11398. @endverbatim
  11399. *
  11400. * <b> Return Value </b>
  11401. * @n None
  11402. *
  11403. * <b> Pre Condition </b>
  11404. * @n CSL_SRIO_Open() must be called
  11405. *
  11406. * <b> Post Condition </b>
  11407. * @n None
  11408. *
  11409. * @b Reads
  11410. * @n SRIO_RIO_PBM_SP_CONTROL_EG_REORDER_MODE, SRIO_RIO_PBM_SP_CONTROL_EG_REORDER_STICK
  11411. *
  11412. * @b Example
  11413. * @verbatim
  11414. CSL_SrioHandle hSrio;
  11415. Uint8 egReorderMode;
  11416. Uint8 egReorderStick;
  11417. // Open the CSL SRIO Module 0
  11418. hSrio = CSL_SRIO_Open (0);
  11419. // Get the PBM Port Control Information.
  11420. CSL_SRIO_GetPBMPortControl(hSrio, 1, &egReorderMode, &egReorderStick);
  11421. ...
  11422. @endverbatim
  11423. * =============================================================================
  11424. */
  11425. static inline void CSL_SRIO_GetPBMPortControl
  11426. (
  11427. CSL_SrioHandle hSrio,
  11428. Uint8 portNum,
  11429. Uint8* egReorderMode,
  11430. Uint8* egReorderStick
  11431. )
  11432. {
  11433. Uint32 value = hSrio->RIO_PBM[portNum].RIO_PBM_SP_CONTROL;
  11434. *egReorderMode = CSL_FEXT (value, SRIO_RIO_PBM_SP_CONTROL_EG_REORDER_MODE);
  11435. *egReorderStick = CSL_FEXT (value, SRIO_RIO_PBM_SP_CONTROL_EG_REORDER_STICK);
  11436. }
  11437. /** ============================================================================
  11438. * @n@b CSL_SRIO_SetPBMPortControl
  11439. *
  11440. * @b Description
  11441. * @n The function is used to set the PBM Port Control information
  11442. *
  11443. * @b Arguments
  11444. @verbatim
  11445. hSrio Handle of the SRIO device
  11446. portNum SRIO Port Number
  11447. egReorderMode Reorder Mode
  11448. egReorderStick Number of repeat times the CRQ is reordered
  11449. @endverbatim
  11450. *
  11451. * <b> Return Value </b>
  11452. * @n None
  11453. *
  11454. * <b> Pre Condition </b>
  11455. * @n CSL_SRIO_Open() must be called
  11456. *
  11457. * <b> Post Condition </b>
  11458. * @n None
  11459. *
  11460. * @b Writes
  11461. * @n SRIO_RIO_PBM_SP_CONTROL_EG_REORDER_MODE, SRIO_RIO_PBM_SP_CONTROL_EG_REORDER_STICK
  11462. *
  11463. * @b Example
  11464. * @verbatim
  11465. CSL_SrioHandle hSrio;
  11466. // Open the CSL SRIO Module 0
  11467. hSrio = CSL_SRIO_Open (0);
  11468. // Set the PBM Port Control Information.
  11469. CSL_SRIO_GetPBMPortControl(hSrio, 1, 1, 1);
  11470. ...
  11471. @endverbatim
  11472. * =============================================================================
  11473. */
  11474. static inline void CSL_SRIO_SetPBMPortControl
  11475. (
  11476. CSL_SrioHandle hSrio,
  11477. Uint8 portNum,
  11478. Uint8 egReorderMode,
  11479. Uint8 egReorderStick
  11480. )
  11481. {
  11482. hSrio->RIO_PBM[portNum].RIO_PBM_SP_CONTROL =
  11483. CSL_FMK (SRIO_RIO_PBM_SP_CONTROL_EG_REORDER_MODE, egReorderMode) |
  11484. CSL_FMK (SRIO_RIO_PBM_SP_CONTROL_EG_REORDER_STICK, egReorderStick);
  11485. }
  11486. /** ============================================================================
  11487. * @n@b CSL_SRIO_GetPBMPortStatus
  11488. *
  11489. * @b Description
  11490. * @n The function is used to get the PBM Port Status
  11491. *
  11492. * @b Arguments
  11493. @verbatim
  11494. hSrio Handle of the SRIO device
  11495. portNum SRIO Port Number
  11496. igEmpty PBMi Queue Status
  11497. egEmpty PBMe Queue Status
  11498. egDataOverflow PBMe received a request to enqueue a packet
  11499. for which it did not have enough data storage.
  11500. egCRQOverflow PBMe received a request to enqueue a packet
  11501. for which it did not have CRQ Entry.
  11502. egBadChannel PBMe received a request to enqueue a packet
  11503. on a channel enqueue interface which should be
  11504. unused for the path’s Mode.
  11505. egBabblePacket PBMe detected a packet that exceeded 276 bytes
  11506. on its enqueue interface
  11507. @endverbatim
  11508. *
  11509. * <b> Return Value </b>
  11510. * @n None
  11511. *
  11512. * <b> Pre Condition </b>
  11513. * @n CSL_SRIO_Open() must be called
  11514. *
  11515. * <b> Post Condition </b>
  11516. * @n None
  11517. *
  11518. * @b Reads
  11519. * @n SRIO_RIO_PBM_SP_STATUS_IG_EMPTY, SRIO_RIO_PBM_SP_STATUS_EG_EMPTY,
  11520. * @n SRIO_RIO_PBM_SP_STATUS_EG_DATA_OVERFLOW, SRIO_RIO_PBM_SP_STATUS_EG_CRQ_OVERFLOW,
  11521. * @n SRIO_RIO_PBM_SP_STATUS_EG_BAD_CHANNEL, SRIO_RIO_PBM_SP_STATUS_EG_BABBLE_PACKET
  11522. *
  11523. * @b Example
  11524. * @verbatim
  11525. CSL_SrioHandle hSrio;
  11526. Uint8 igEmpty;
  11527. Uint8 egEmpty;
  11528. Uint8 egDataOverflow;
  11529. Uint8 egCRQOverflow;
  11530. Uint8 egBadChannel;
  11531. Uint8 egBabblePacket;
  11532. // Open the CSL SRIO Module 0
  11533. hSrio = CSL_SRIO_Open (0);
  11534. // Get the PBM Port Status
  11535. CSL_SRIO_GetPBMPortStatus(hSrio, 1, &igEmpty, &egEmpty,
  11536. &egDataOverflow, &egCRQOverflow, &egBadChannel, &egBabblePacket);
  11537. ...
  11538. @endverbatim
  11539. * =============================================================================
  11540. */
  11541. static inline void CSL_SRIO_GetPBMPortStatus
  11542. (
  11543. CSL_SrioHandle hSrio,
  11544. Uint8 portNum,
  11545. Uint8* igEmpty,
  11546. Uint8* egEmpty,
  11547. Uint8* egDataOverflow,
  11548. Uint8* egCRQOverflow,
  11549. Uint8* egBadChannel,
  11550. Uint8* egBabblePacket
  11551. )
  11552. {
  11553. Uint32 value = hSrio->RIO_PBM[portNum].RIO_PBM_SP_STATUS;
  11554. *igEmpty = CSL_FEXT (value, SRIO_RIO_PBM_SP_STATUS_IG_EMPTY);
  11555. *egEmpty = CSL_FEXT (value, SRIO_RIO_PBM_SP_STATUS_EG_EMPTY);
  11556. *egDataOverflow = CSL_FEXT (value, SRIO_RIO_PBM_SP_STATUS_EG_DATA_OVERFLOW);
  11557. *egCRQOverflow = CSL_FEXT (value, SRIO_RIO_PBM_SP_STATUS_EG_CRQ_OVERFLOW);
  11558. *egBadChannel = CSL_FEXT (value, SRIO_RIO_PBM_SP_STATUS_EG_BAD_CHANNEL);
  11559. *egBabblePacket = CSL_FEXT (value, SRIO_RIO_PBM_SP_STATUS_EG_BABBLE_PACKET);
  11560. }
  11561. /** ============================================================================
  11562. * @n@b CSL_SRIO_ClearPBMPortStatus
  11563. *
  11564. * @b Description
  11565. * @n The function is used to clear the PBM Port Status
  11566. *
  11567. * @b Arguments
  11568. @verbatim
  11569. hSrio Handle of the SRIO device
  11570. portNum SRIO Port Number
  11571. egDataOverflow PBMe received a request to enqueue a packet
  11572. for which it did not have enough data storage.
  11573. egCRQOverflow PBMe received a request to enqueue a packet
  11574. for which it did not have CRQ Entry.
  11575. egBadChannel PBMe received a request to enqueue a packet
  11576. on a channel enqueue interface which should be
  11577. unused for the path’s Mode.
  11578. egBabblePacket PBMe detected a packet that exceeded 276 bytes
  11579. on its enqueue interface
  11580. @endverbatim
  11581. *
  11582. * <b> Return Value </b>
  11583. * @n None
  11584. *
  11585. * <b> Pre Condition </b>
  11586. * @n CSL_SRIO_Open() must be called
  11587. *
  11588. * <b> Post Condition </b>
  11589. * @n None
  11590. *
  11591. * @b Writes
  11592. * @n SRIO_RIO_PBM_SP_STATUS_EG_DATA_OVERFLOW=1, SRIO_RIO_PBM_SP_STATUS_EG_CRQ_OVERFLOW=1,
  11593. * @n SRIO_RIO_PBM_SP_STATUS_EG_BAD_CHANNEL=1, SRIO_RIO_PBM_SP_STATUS_EG_BABBLE_PACKET=1
  11594. *
  11595. * @b Affects
  11596. * @n SRIO_RIO_PBM_SP_STATUS_EG_DATA_OVERFLOW=0, SRIO_RIO_PBM_SP_STATUS_EG_CRQ_OVERFLOW=0,
  11597. * @n SRIO_RIO_PBM_SP_STATUS_EG_BAD_CHANNEL=0, SRIO_RIO_PBM_SP_STATUS_EG_BABBLE_PACKET=0
  11598. *
  11599. * @b Example
  11600. * @verbatim
  11601. CSL_SrioHandle hSrio;
  11602. Uint8 igEmpty;
  11603. Uint8 egEmpty;
  11604. Uint8 egDataOverflow;
  11605. Uint8 egCRQOverflow;
  11606. Uint8 egBadChannel;
  11607. Uint8 egBabblePacket;
  11608. // Open the CSL SRIO Module 0
  11609. hSrio = CSL_SRIO_Open (0);
  11610. // Get the PBM Port Status
  11611. CSL_SRIO_GetPBMPortStatus(hSrio, 1, &igEmpty, &egEmpty,
  11612. &egDataOverflow, &egCRQOverflow, &egBadChannel, &egBabblePacket);
  11613. ...
  11614. // Clear the PBM Port Status
  11615. CSL_SRIO_ClearPBMPortStatus(hSrio, 1, egDataOverflow, egCRQOverflow, egBadChannel, egBabblePacket);
  11616. ...
  11617. @endverbatim
  11618. * =============================================================================
  11619. */
  11620. static inline void CSL_SRIO_ClearPBMPortStatus
  11621. (
  11622. CSL_SrioHandle hSrio,
  11623. Uint8 portNum,
  11624. Uint8 egDataOverflow,
  11625. Uint8 egCRQOverflow,
  11626. Uint8 egBadChannel,
  11627. Uint8 egBabblePacket
  11628. )
  11629. {
  11630. hSrio->RIO_PBM[portNum].RIO_PBM_SP_STATUS =
  11631. CSL_FMK (SRIO_RIO_PBM_SP_STATUS_EG_DATA_OVERFLOW, egDataOverflow) |
  11632. CSL_FMK (SRIO_RIO_PBM_SP_STATUS_EG_CRQ_OVERFLOW, egCRQOverflow) |
  11633. CSL_FMK (SRIO_RIO_PBM_SP_STATUS_EG_BAD_CHANNEL, egBadChannel) |
  11634. CSL_FMK (SRIO_RIO_PBM_SP_STATUS_EG_BABBLE_PACKET, egBabblePacket);
  11635. }
  11636. /** ============================================================================
  11637. * @n@b CSL_SRIO_GetPBMPortInterrupts
  11638. *
  11639. * @b Description
  11640. * @n The function is used to get the PBM Port Interrupt status
  11641. *
  11642. * @b Arguments
  11643. @verbatim
  11644. hSrio Handle of the SRIO device
  11645. portNum SRIO Port Number
  11646. egDataOverflow PBMe received a request to enqueue a packet
  11647. for which it did not have enough data storage.
  11648. egCRQOverflow PBMe received a request to enqueue a packet
  11649. for which it did not have CRQ Entry.
  11650. egBadChannel PBMe received a request to enqueue a packet
  11651. on a channel enqueue interface which should be
  11652. unused for the path’s Mode.
  11653. egBabblePacket PBMe detected a packet that exceeded 276 bytes
  11654. on its enqueue interface
  11655. @endverbatim
  11656. *
  11657. * <b> Return Value </b>
  11658. * @n None
  11659. *
  11660. * <b> Pre Condition </b>
  11661. * @n CSL_SRIO_Open() must be called
  11662. *
  11663. * <b> Post Condition </b>
  11664. * @n None
  11665. *
  11666. * @b Reads
  11667. * @n SRIO_RIO_PBM_SP_INT_ENABLE_EG_DATA_OVERFLOW,
  11668. * @n SRIO_RIO_PBM_SP_INT_ENABLE_EG_CRQ_OVERFLOW,
  11669. * @n SRIO_RIO_PBM_SP_INT_ENABLE_EG_BAD_CHANNEL,
  11670. * @n SRIO_RIO_PBM_SP_INT_ENABLE_EG_BABBLE_PACKET
  11671. *
  11672. * @b Example
  11673. * @verbatim
  11674. CSL_SrioHandle hSrio;
  11675. Uint8 egDataOverflow;
  11676. Uint8 egCRQOverflow;
  11677. Uint8 egBadChannel;
  11678. Uint8 egBabblePacket;
  11679. // Open the CSL SRIO Module 0
  11680. hSrio = CSL_SRIO_Open (0);
  11681. // Get the PBM Port Interrupts
  11682. CSL_SRIO_GetPBMPortInterrupts(hSrio, 1, &egDataOverflow, &egCRQOverflow,
  11683. &egBadChannel, &egBabblePacket);
  11684. ...
  11685. @endverbatim
  11686. * =============================================================================
  11687. */
  11688. static inline void CSL_SRIO_GetPBMPortInterrupts
  11689. (
  11690. CSL_SrioHandle hSrio,
  11691. Uint8 portNum,
  11692. Uint8* egDataOverflow,
  11693. Uint8* egCRQOverflow,
  11694. Uint8* egBadChannel,
  11695. Uint8* egBabblePacket
  11696. )
  11697. {
  11698. Uint32 value = hSrio->RIO_PBM[portNum].RIO_PBM_SP_INT_ENABLE;
  11699. *egDataOverflow = CSL_FEXT (value, SRIO_RIO_PBM_SP_INT_ENABLE_EG_DATA_OVERFLOW);
  11700. *egCRQOverflow = CSL_FEXT (value, SRIO_RIO_PBM_SP_INT_ENABLE_EG_CRQ_OVERFLOW);
  11701. *egBadChannel = CSL_FEXT (value, SRIO_RIO_PBM_SP_INT_ENABLE_EG_BAD_CHANNEL);
  11702. *egBabblePacket = CSL_FEXT (value, SRIO_RIO_PBM_SP_INT_ENABLE_EG_BABBLE_PACKET);
  11703. }
  11704. /** ============================================================================
  11705. * @n@b CSL_SRIO_SetPBMPortInterrupts
  11706. *
  11707. * @b Description
  11708. * @n The function is used to set the PBM Port Interrupt status
  11709. *
  11710. * @b Arguments
  11711. @verbatim
  11712. hSrio Handle of the SRIO device
  11713. portNum SRIO Port Number
  11714. egDataOverflow PBMe received a request to enqueue a packet
  11715. for which it did not have enough data storage.
  11716. egCRQOverflow PBMe received a request to enqueue a packet
  11717. for which it did not have CRQ Entry.
  11718. egBadChannel PBMe received a request to enqueue a packet
  11719. on a channel enqueue interface which should be
  11720. unused for the path’s Mode.
  11721. egBabblePacket PBMe detected a packet that exceeded 276 bytes
  11722. on its enqueue interface
  11723. @endverbatim
  11724. *
  11725. * <b> Return Value </b>
  11726. * @n None
  11727. *
  11728. * <b> Pre Condition </b>
  11729. * @n CSL_SRIO_Open() must be called
  11730. *
  11731. * <b> Post Condition </b>
  11732. * @n None
  11733. *
  11734. * @b Writes
  11735. * @n SRIO_RIO_PBM_SP_INT_ENABLE_EG_DATA_OVERFLOW,
  11736. * @n SRIO_RIO_PBM_SP_INT_ENABLE_EG_CRQ_OVERFLOW,
  11737. * @n SRIO_RIO_PBM_SP_INT_ENABLE_EG_BAD_CHANNEL,
  11738. * @n SRIO_RIO_PBM_SP_INT_ENABLE_EG_BABBLE_PACKET
  11739. *
  11740. * @b Example
  11741. * @verbatim
  11742. CSL_SrioHandle hSrio;
  11743. // Open the CSL SRIO Module 0
  11744. hSrio = CSL_SRIO_Open (0);
  11745. // Set the PBM Port Interrupts for Data Overflow only
  11746. CSL_SRIO_SetPBMPortInterrupts(hSrio, 1, 1, 0, 0, 0);
  11747. ...
  11748. @endverbatim
  11749. * =============================================================================
  11750. */
  11751. static inline void CSL_SRIO_SetPBMPortInterrupts
  11752. (
  11753. CSL_SrioHandle hSrio,
  11754. Uint8 portNum,
  11755. Uint8 egDataOverflow,
  11756. Uint8 egCRQOverflow,
  11757. Uint8 egBadChannel,
  11758. Uint8 egBabblePacket
  11759. )
  11760. {
  11761. hSrio->RIO_PBM[portNum].RIO_PBM_SP_INT_ENABLE =
  11762. CSL_FMK (SRIO_RIO_PBM_SP_INT_ENABLE_EG_DATA_OVERFLOW, egDataOverflow) |
  11763. CSL_FMK (SRIO_RIO_PBM_SP_INT_ENABLE_EG_CRQ_OVERFLOW, egCRQOverflow) |
  11764. CSL_FMK (SRIO_RIO_PBM_SP_INT_ENABLE_EG_BAD_CHANNEL, egBadChannel) |
  11765. CSL_FMK (SRIO_RIO_PBM_SP_INT_ENABLE_EG_BABBLE_PACKET, egBabblePacket);
  11766. }
  11767. /** ============================================================================
  11768. * @n@b CSL_SRIO_GetPBMPortWriteEnables
  11769. *
  11770. * @b Description
  11771. * @n The function is used to get the PBM Port Write Enables
  11772. *
  11773. * @b Arguments
  11774. @verbatim
  11775. hSrio Handle of the SRIO device
  11776. portNum SRIO Port Number
  11777. egDataOverflow PBMe received a request to enqueue a packet
  11778. for which it did not have enough data storage.
  11779. egCRQOverflow PBMe received a request to enqueue a packet
  11780. for which it did not have CRQ Entry.
  11781. egBadChannel PBMe received a request to enqueue a packet
  11782. on a channel enqueue interface which should be
  11783. unused for the path’s Mode.
  11784. egBabblePacket PBMe detected a packet that exceeded 276 bytes
  11785. on its enqueue interface
  11786. @endverbatim
  11787. *
  11788. * <b> Return Value </b>
  11789. * @n None
  11790. *
  11791. * <b> Pre Condition </b>
  11792. * @n CSL_SRIO_Open() must be called
  11793. *
  11794. * <b> Post Condition </b>
  11795. * @n None
  11796. *
  11797. * @b Reads
  11798. * @n SRIO_RIO_PBM_SP_PW_ENABLE_EG_DATA_OVERFLOW,
  11799. * @n SRIO_RIO_PBM_SP_PW_ENABLE_EG_CRQ_OVERFLOW,
  11800. * @n SRIO_RIO_PBM_SP_PW_ENABLE_EG_BAD_CHANNEL,
  11801. * @n SRIO_RIO_PBM_SP_PW_ENABLE_EG_BABBLE_PACKET
  11802. *
  11803. * @b Example
  11804. * @verbatim
  11805. CSL_SrioHandle hSrio;
  11806. Uint8 egDataOverflow;
  11807. Uint8 egCRQOverflow;
  11808. Uint8 egBadChannel;
  11809. Uint8 egBabblePacket;
  11810. // Open the CSL SRIO Module 0
  11811. hSrio = CSL_SRIO_Open (0);
  11812. // Get the PBM Port Write Enables
  11813. CSL_SRIO_GetPBMPortWriteEnables(hSrio, 1, &egDataOverflow, &egCRQOverflow,
  11814. &egBadChannel, &egBabblePacket);
  11815. ...
  11816. @endverbatim
  11817. * =============================================================================
  11818. */
  11819. static inline void CSL_SRIO_GetPBMPortWriteEnables
  11820. (
  11821. CSL_SrioHandle hSrio,
  11822. Uint8 portNum,
  11823. Uint8* egDataOverflow,
  11824. Uint8* egCRQOverflow,
  11825. Uint8* egBadChannel,
  11826. Uint8* egBabblePacket
  11827. )
  11828. {
  11829. Uint32 value = hSrio->RIO_PBM[portNum].RIO_PBM_SP_PW_ENABLE;
  11830. *egDataOverflow = CSL_FEXT (value, SRIO_RIO_PBM_SP_PW_ENABLE_EG_DATA_OVERFLOW);
  11831. *egCRQOverflow = CSL_FEXT (value, SRIO_RIO_PBM_SP_PW_ENABLE_EG_CRQ_OVERFLOW);
  11832. *egBadChannel = CSL_FEXT (value, SRIO_RIO_PBM_SP_PW_ENABLE_EG_BAD_CHANNEL);
  11833. *egBabblePacket = CSL_FEXT (value, SRIO_RIO_PBM_SP_PW_ENABLE_EG_BABBLE_PACKET);
  11834. }
  11835. /** ============================================================================
  11836. * @n@b CSL_SRIO_SetPBMPortWriteEnables
  11837. *
  11838. * @b Description
  11839. * @n The function is used to set the PBM Port Write Enables
  11840. *
  11841. * @b Arguments
  11842. @verbatim
  11843. hSrio Handle of the SRIO device
  11844. portNum SRIO Port Number
  11845. egDataOverflow PBMe received a request to enqueue a packet
  11846. for which it did not have enough data storage.
  11847. egCRQOverflow PBMe received a request to enqueue a packet
  11848. for which it did not have CRQ Entry.
  11849. egBadChannel PBMe received a request to enqueue a packet
  11850. on a channel enqueue interface which should be
  11851. unused for the path’s Mode.
  11852. egBabblePacket PBMe detected a packet that exceeded 276 bytes
  11853. on its enqueue interface
  11854. @endverbatim
  11855. *
  11856. * <b> Return Value </b>
  11857. * @n None
  11858. *
  11859. * <b> Pre Condition </b>
  11860. * @n CSL_SRIO_Open() must be called
  11861. *
  11862. * <b> Post Condition </b>
  11863. * @n None
  11864. *
  11865. * @b Writes
  11866. * @n SRIO_RIO_PBM_SP_PW_ENABLE_EG_DATA_OVERFLOW,
  11867. * @n SRIO_RIO_PBM_SP_PW_ENABLE_EG_CRQ_OVERFLOW,
  11868. * @n SRIO_RIO_PBM_SP_PW_ENABLE_EG_BAD_CHANNEL,
  11869. * @n SRIO_RIO_PBM_SP_PW_ENABLE_EG_BABBLE_PACKET
  11870. *
  11871. * @b Example
  11872. * @verbatim
  11873. CSL_SrioHandle hSrio;
  11874. // Open the CSL SRIO Module 0
  11875. hSrio = CSL_SRIO_Open (0);
  11876. // Set the PBM Port Write Enables for Data Overflow only
  11877. CSL_SRIO_SetPBMPortWriteEnables(hSrio, 1, 1, 0, 0, 0);
  11878. ...
  11879. @endverbatim
  11880. * =============================================================================
  11881. */
  11882. static inline void CSL_SRIO_SetPBMPortWriteEnables
  11883. (
  11884. CSL_SrioHandle hSrio,
  11885. Uint8 portNum,
  11886. Uint8 egDataOverflow,
  11887. Uint8 egCRQOverflow,
  11888. Uint8 egBadChannel,
  11889. Uint8 egBabblePacket
  11890. )
  11891. {
  11892. hSrio->RIO_PBM[portNum].RIO_PBM_SP_PW_ENABLE =
  11893. CSL_FMK (SRIO_RIO_PBM_SP_PW_ENABLE_EG_DATA_OVERFLOW, egDataOverflow) |
  11894. CSL_FMK (SRIO_RIO_PBM_SP_PW_ENABLE_EG_CRQ_OVERFLOW, egCRQOverflow) |
  11895. CSL_FMK (SRIO_RIO_PBM_SP_PW_ENABLE_EG_BAD_CHANNEL, egBadChannel) |
  11896. CSL_FMK (SRIO_RIO_PBM_SP_PW_ENABLE_EG_BABBLE_PACKET, egBabblePacket);
  11897. }
  11898. /** ============================================================================
  11899. * @n@b CSL_SRIO_GetPBMPortEventGenerate
  11900. *
  11901. * @b Description
  11902. * @n The function is used to get the PBM Port Event generates
  11903. *
  11904. * @b Arguments
  11905. @verbatim
  11906. hSrio Handle of the SRIO device
  11907. portNum SRIO Port Number
  11908. egDataOverflow PBMe received a request to enqueue a packet
  11909. for which it did not have enough data storage.
  11910. egCRQOverflow PBMe received a request to enqueue a packet
  11911. for which it did not have CRQ Entry.
  11912. egBadChannel PBMe received a request to enqueue a packet
  11913. on a channel enqueue interface which should be
  11914. unused for the path’s Mode.
  11915. egBabblePacket PBMe detected a packet that exceeded 276 bytes
  11916. on its enqueue interface
  11917. @endverbatim
  11918. *
  11919. * <b> Return Value </b>
  11920. * @n None
  11921. *
  11922. * <b> Pre Condition </b>
  11923. * @n CSL_SRIO_Open() must be called
  11924. *
  11925. * <b> Post Condition </b>
  11926. * @n None
  11927. *
  11928. * @b Reads
  11929. * @n SRIO_RIO_PBM_SP_EVENT_GEN_EG_DATA_OVERFLOW,
  11930. * @n SRIO_RIO_PBM_SP_EVENT_GEN_EG_CRQ_OVERFLOW,
  11931. * @n SRIO_RIO_PBM_SP_EVENT_GEN_EG_BAD_CHANNEL,
  11932. * @n SRIO_RIO_PBM_SP_EVENT_GEN_EG_BABBLE_PACKET
  11933. *
  11934. * @b Example
  11935. * @verbatim
  11936. CSL_SrioHandle hSrio;
  11937. Uint8 egDataOverflow;
  11938. Uint8 egCRQOverflow;
  11939. Uint8 egBadChannel;
  11940. Uint8 egBabblePacket;
  11941. // Open the CSL SRIO Module 0
  11942. hSrio = CSL_SRIO_Open (0);
  11943. // Get the PBM Port Event Generates
  11944. CSL_SRIO_GetPBMPortEventGenerate(hSrio, 1, &egDataOverflow, &egCRQOverflow,
  11945. &egBadChannel, &egBabblePacket);
  11946. ...
  11947. @endverbatim
  11948. * =============================================================================
  11949. */
  11950. static inline void CSL_SRIO_GetPBMPortEventGenerate
  11951. (
  11952. CSL_SrioHandle hSrio,
  11953. Uint8 portNum,
  11954. Uint8* egDataOverflow,
  11955. Uint8* egCRQOverflow,
  11956. Uint8* egBadChannel,
  11957. Uint8* egBabblePacket
  11958. )
  11959. {
  11960. Uint32 value = hSrio->RIO_PBM[portNum].RIO_PBM_SP_EVENT_GEN;
  11961. *egDataOverflow = CSL_FEXT (value, SRIO_RIO_PBM_SP_EVENT_GEN_EG_DATA_OVERFLOW);
  11962. *egCRQOverflow = CSL_FEXT (value, SRIO_RIO_PBM_SP_EVENT_GEN_EG_CRQ_OVERFLOW);
  11963. *egBadChannel = CSL_FEXT (value, SRIO_RIO_PBM_SP_EVENT_GEN_EG_BAD_CHANNEL);
  11964. *egBabblePacket = CSL_FEXT (value, SRIO_RIO_PBM_SP_EVENT_GEN_EG_BABBLE_PACKET);
  11965. }
  11966. /** ============================================================================
  11967. * @n@b CSL_SRIO_SetPBMPortEventGenerate
  11968. *
  11969. * @b Description
  11970. * @n The function is used to set the PBM Port Event generates
  11971. *
  11972. * @b Arguments
  11973. @verbatim
  11974. hSrio Handle of the SRIO device
  11975. portNum SRIO Port Number
  11976. egDataOverflow PBMe received a request to enqueue a packet
  11977. for which it did not have enough data storage.
  11978. egCRQOverflow PBMe received a request to enqueue a packet
  11979. for which it did not have CRQ Entry.
  11980. egBadChannel PBMe received a request to enqueue a packet
  11981. on a channel enqueue interface which should be
  11982. unused for the path’s Mode.
  11983. egBabblePacket PBMe detected a packet that exceeded 276 bytes
  11984. on its enqueue interface
  11985. @endverbatim
  11986. *
  11987. * <b> Return Value </b>
  11988. * @n None
  11989. *
  11990. * <b> Pre Condition </b>
  11991. * @n CSL_SRIO_Open() must be called
  11992. *
  11993. * <b> Post Condition </b>
  11994. * @n None
  11995. *
  11996. * @b Writes
  11997. * @n SRIO_RIO_PBM_SP_EVENT_GEN_EG_DATA_OVERFLOW,
  11998. * @n SRIO_RIO_PBM_SP_EVENT_GEN_EG_CRQ_OVERFLOW,
  11999. * @n SRIO_RIO_PBM_SP_EVENT_GEN_EG_BAD_CHANNEL,
  12000. * @n SRIO_RIO_PBM_SP_EVENT_GEN_EG_BABBLE_PACKET
  12001. *
  12002. * @b Affects
  12003. * @n SRIO_RIO_PBM_SP_STATUS_EG_DATA_OVERFLOW=1, SRIO_RIO_PBM_SP_STATUS_EG_CRQ_OVERFLOW=1,
  12004. * @n SRIO_RIO_PBM_SP_STATUS_EG_BAD_CHANNEL=1, SRIO_RIO_PBM_SP_STATUS_EG_BABBLE_PACKET=1
  12005. *
  12006. * @b Example
  12007. * @verbatim
  12008. CSL_SrioHandle hSrio;
  12009. // Open the CSL SRIO Module 0
  12010. hSrio = CSL_SRIO_Open (0);
  12011. // Set the PBM Port Event Generates for Data overflow only
  12012. CSL_SRIO_SetPBMPortEventGenerate(hSrio, 1, 1, 0, 0, 0);
  12013. ...
  12014. @endverbatim
  12015. * =============================================================================
  12016. */
  12017. static inline void CSL_SRIO_SetPBMPortEventGenerate
  12018. (
  12019. CSL_SrioHandle hSrio,
  12020. Uint8 portNum,
  12021. Uint8 egDataOverflow,
  12022. Uint8 egCRQOverflow,
  12023. Uint8 egBadChannel,
  12024. Uint8 egBabblePacket
  12025. )
  12026. {
  12027. hSrio->RIO_PBM[portNum].RIO_PBM_SP_EVENT_GEN =
  12028. CSL_FMK (SRIO_RIO_PBM_SP_EVENT_GEN_EG_DATA_OVERFLOW, egDataOverflow) |
  12029. CSL_FMK (SRIO_RIO_PBM_SP_EVENT_GEN_EG_CRQ_OVERFLOW, egCRQOverflow) |
  12030. CSL_FMK (SRIO_RIO_PBM_SP_EVENT_GEN_EG_BAD_CHANNEL, egBadChannel) |
  12031. CSL_FMK (SRIO_RIO_PBM_SP_EVENT_GEN_EG_BABBLE_PACKET, egBabblePacket);
  12032. }
  12033. /** ============================================================================
  12034. * @n@b CSL_SRIO_GetPBMPortIngressResources
  12035. *
  12036. * @b Description
  12037. * @n The function is used to get the PBM Port Ingress resources
  12038. *
  12039. * @b Arguments
  12040. @verbatim
  12041. hSrio Handle of the SRIO device
  12042. portNum SRIO Port Number
  12043. dataNodes Indicates the number of Data Nodes
  12044. implemented in the PBMi for packet storage
  12045. tags Indicates the number of Tags implemented in
  12046. the PBMi for packet storage for the port
  12047. @endverbatim
  12048. *
  12049. * <b> Return Value </b>
  12050. * @n None
  12051. *
  12052. * <b> Pre Condition </b>
  12053. * @n CSL_SRIO_Open() must be called
  12054. *
  12055. * <b> Post Condition </b>
  12056. * @n None
  12057. *
  12058. * @b Reads
  12059. * @n SRIO_RIO_PBM_SP_IG_RESOURCES_DATANODES,
  12060. * @n SRIO_RIO_PBM_SP_IG_RESOURCES_TAGS
  12061. *
  12062. * @b Example
  12063. * @verbatim
  12064. CSL_SrioHandle hSrio;
  12065. Uint16 dataNodes;
  12066. Uint16 tags;
  12067. // Open the CSL SRIO Module 0
  12068. hSrio = CSL_SRIO_Open (0);
  12069. // Get the PBM Port Ingress Resources
  12070. CSL_SRIO_GetPBMPortIngressResources(hSrio, 1, &dataNodes, &tags);
  12071. ...
  12072. @endverbatim
  12073. * =============================================================================
  12074. */
  12075. static inline void CSL_SRIO_GetPBMPortIngressResources
  12076. (
  12077. CSL_SrioHandle hSrio,
  12078. Uint8 portNum,
  12079. Uint16* dataNodes,
  12080. Uint16* tags
  12081. )
  12082. {
  12083. Uint32 value = hSrio->RIO_PBM[portNum].RIO_PBM_SP_IG_RESOURCES;
  12084. *dataNodes = CSL_FEXT (value, SRIO_RIO_PBM_SP_IG_RESOURCES_DATANODES);
  12085. *tags = CSL_FEXT (value, SRIO_RIO_PBM_SP_IG_RESOURCES_TAGS);
  12086. }
  12087. /** ============================================================================
  12088. * @n@b CSL_SRIO_GetPBMPortEgressResources
  12089. *
  12090. * @b Description
  12091. * @n The function is used to get the PBM Port Egress resources
  12092. *
  12093. * @b Arguments
  12094. @verbatim
  12095. hSrio Handle of the SRIO device
  12096. portNum SRIO Port Number
  12097. dataNodes Indicates the number of Data Nodes
  12098. implemented in the PBMe for packet storage
  12099. crqEntries Indicates the number of CRQ Entries implemented in
  12100. the PBMe for packet storage for the port
  12101. @endverbatim
  12102. *
  12103. * <b> Return Value </b>
  12104. * @n None
  12105. *
  12106. * <b> Pre Condition </b>
  12107. * @n CSL_SRIO_Open() must be called
  12108. *
  12109. * <b> Post Condition </b>
  12110. * @n None
  12111. *
  12112. * @b Reads
  12113. * @n SRIO_RIO_PBM_SP_EG_RESOURCES_DATANODES,
  12114. * @n SRIO_RIO_PBM_SP_EG_RESOURCES_CRQ_ENTRIES
  12115. *
  12116. * @b Example
  12117. * @verbatim
  12118. CSL_SrioHandle hSrio;
  12119. Uint16 dataNodes;
  12120. Uint8 crqEntries;
  12121. // Open the CSL SRIO Module 0
  12122. hSrio = CSL_SRIO_Open (0);
  12123. // Get the PBM Port Egress Resources
  12124. CSL_SRIO_GetPBMPortEgressResources(hSrio, 1, &dataNodes, &crqEntries);
  12125. ...
  12126. @endverbatim
  12127. * =============================================================================
  12128. */
  12129. static inline void CSL_SRIO_GetPBMPortEgressResources
  12130. (
  12131. CSL_SrioHandle hSrio,
  12132. Uint8 portNum,
  12133. Uint16* dataNodes,
  12134. Uint8* crqEntries
  12135. )
  12136. {
  12137. Uint32 value = hSrio->RIO_PBM[portNum].RIO_PBM_SP_EG_RESOURCES;
  12138. *dataNodes = CSL_FEXT (value, SRIO_RIO_PBM_SP_EG_RESOURCES_DATANODES);
  12139. *crqEntries = CSL_FEXT (value, SRIO_RIO_PBM_SP_EG_RESOURCES_CRQ_ENTRIES);
  12140. }
  12141. /** ============================================================================
  12142. * @n@b CSL_SRIO_GetPBMPortIngressPriorityWatermark
  12143. *
  12144. * @b Description
  12145. * @n The function is used to get the PBM Port Ingress Priority Watermark
  12146. * configuration
  12147. *
  12148. * @b Arguments
  12149. @verbatim
  12150. hSrio Handle of the SRIO device
  12151. portNum SRIO Port Number
  12152. priority Priority 0,1,2 or 3
  12153. crfWatermark CRF Watermark
  12154. priWatermark Priority Watermark
  12155. @endverbatim
  12156. *
  12157. * <b> Return Value </b>
  12158. * @n None
  12159. *
  12160. * <b> Pre Condition </b>
  12161. * @n CSL_SRIO_Open() must be called
  12162. *
  12163. * <b> Post Condition </b>
  12164. * @n None
  12165. *
  12166. * @b Reads
  12167. * @n SRIO_RIO_PBM_SP_IG_WATERMARK0_PRIO0CRF_WM, SRIO_RIO_PBM_SP_IG_WATERMARK0_PRIO0_WM;
  12168. * @n SRIO_RIO_PBM_SP_IG_WATERMARK1_PRIO1CRF_WM, SRIO_RIO_PBM_SP_IG_WATERMARK1_PRIO1_WM;
  12169. * @n SRIO_RIO_PBM_SP_IG_WATERMARK2_PRIO2CRF_WM, SRIO_RIO_PBM_SP_IG_WATERMARK2_PRIO2_WM;
  12170. * @n SRIO_RIO_PBM_SP_IG_WATERMARK3_PRIO3CRF_WM, SRIO_RIO_PBM_SP_IG_WATERMARK3_PRIO3_WM
  12171. *
  12172. * @b Example
  12173. * @verbatim
  12174. CSL_SrioHandle hSrio;
  12175. Uint16 crfWatermark;
  12176. Uint16 priWatermark;
  12177. // Open the CSL SRIO Module 0
  12178. hSrio = CSL_SRIO_Open (0);
  12179. // Get the PBM Port Ingress 0 Watermarks
  12180. CSL_SRIO_GetPBMPortIngressPriorityWatermark(hSrio, 1, 0, &crfWatermark, &priWatermark);
  12181. ...
  12182. @endverbatim
  12183. * =============================================================================
  12184. */
  12185. static inline void CSL_SRIO_GetPBMPortIngressPriorityWatermark
  12186. (
  12187. CSL_SrioHandle hSrio,
  12188. Uint8 portNum,
  12189. Uint8 priority,
  12190. Uint16* crfWatermark,
  12191. Uint16* priWatermark
  12192. )
  12193. {
  12194. Uint32 value;
  12195. switch (priority)
  12196. {
  12197. case 0:
  12198. {
  12199. value = hSrio->RIO_PBM[portNum].RIO_PBM_SP_IG_WATERMARK0;
  12200. *crfWatermark = CSL_FEXT (value, SRIO_RIO_PBM_SP_IG_WATERMARK0_PRIO0CRF_WM);
  12201. *priWatermark = CSL_FEXT (value, SRIO_RIO_PBM_SP_IG_WATERMARK0_PRIO0_WM);
  12202. break;
  12203. }
  12204. case 1:
  12205. {
  12206. value = hSrio->RIO_PBM[portNum].RIO_PBM_SP_IG_WATERMARK1;
  12207. *crfWatermark = CSL_FEXT (value, SRIO_RIO_PBM_SP_IG_WATERMARK1_PRIO1CRF_WM);
  12208. *priWatermark = CSL_FEXT (value, SRIO_RIO_PBM_SP_IG_WATERMARK1_PRIO1_WM);
  12209. break;
  12210. }
  12211. case 2:
  12212. {
  12213. value = hSrio->RIO_PBM[portNum].RIO_PBM_SP_IG_WATERMARK2;
  12214. *crfWatermark = CSL_FEXT (value, SRIO_RIO_PBM_SP_IG_WATERMARK2_PRIO2CRF_WM);
  12215. *priWatermark = CSL_FEXT (value, SRIO_RIO_PBM_SP_IG_WATERMARK2_PRIO2_WM);
  12216. break;
  12217. }
  12218. case 3:
  12219. {
  12220. value = hSrio->RIO_PBM[portNum].RIO_PBM_SP_IG_WATERMARK3;
  12221. *crfWatermark = CSL_FEXT (value, SRIO_RIO_PBM_SP_IG_WATERMARK3_PRIO3CRF_WM);
  12222. *priWatermark = CSL_FEXT (value, SRIO_RIO_PBM_SP_IG_WATERMARK3_PRIO3_WM);
  12223. break;
  12224. }
  12225. }
  12226. }
  12227. /** ============================================================================
  12228. * @n@b CSL_SRIO_SetPBMPortIngressPriorityWatermark
  12229. *
  12230. * @b Description
  12231. * @n The function is used to set the PBM Port Ingress Priority Watermark
  12232. * configuration
  12233. *
  12234. * @b Arguments
  12235. @verbatim
  12236. hSrio Handle of the SRIO device
  12237. portNum SRIO Port Number
  12238. priority Priority 0,1,2 or 3
  12239. crfWatermark CRF Watermark
  12240. priWatermark Priority Watermark
  12241. @endverbatim
  12242. *
  12243. * <b> Return Value </b>
  12244. * @n None
  12245. *
  12246. * <b> Pre Condition </b>
  12247. * @n CSL_SRIO_Open() must be called
  12248. *
  12249. * <b> Post Condition </b>
  12250. * @n None
  12251. *
  12252. * @b Writes
  12253. * @n SRIO_RIO_PBM_SP_IG_WATERMARK0_PRIO0CRF_WM, SRIO_RIO_PBM_SP_IG_WATERMARK0_PRIO0_WM;
  12254. * @n SRIO_RIO_PBM_SP_IG_WATERMARK1_PRIO1CRF_WM, SRIO_RIO_PBM_SP_IG_WATERMARK1_PRIO1_WM;
  12255. * @n SRIO_RIO_PBM_SP_IG_WATERMARK2_PRIO2CRF_WM, SRIO_RIO_PBM_SP_IG_WATERMARK2_PRIO2_WM;
  12256. * @n SRIO_RIO_PBM_SP_IG_WATERMARK3_PRIO3CRF_WM, SRIO_RIO_PBM_SP_IG_WATERMARK3_PRIO3_WM
  12257. *
  12258. * @b Example
  12259. * @verbatim
  12260. CSL_SrioHandle hSrio;
  12261. // Open the CSL SRIO Module 0
  12262. hSrio = CSL_SRIO_Open (0);
  12263. // Set the PBM Port Ingress 0 Watermarks
  12264. CSL_SRIO_SetPBMPortIngressPriorityWatermark(hSrio, 1, 0, 10, 12);
  12265. ...
  12266. @endverbatim
  12267. * =============================================================================
  12268. */
  12269. static inline void CSL_SRIO_SetPBMPortIngressPriorityWatermark
  12270. (
  12271. CSL_SrioHandle hSrio,
  12272. Uint8 portNum,
  12273. Uint8 priority,
  12274. Uint16 crfWatermark,
  12275. Uint16 priWatermark
  12276. )
  12277. {
  12278. switch (priority)
  12279. {
  12280. case 0:
  12281. {
  12282. hSrio->RIO_PBM[portNum].RIO_PBM_SP_IG_WATERMARK0 =
  12283. CSL_FMK (SRIO_RIO_PBM_SP_IG_WATERMARK0_PRIO0CRF_WM, crfWatermark) |
  12284. CSL_FMK (SRIO_RIO_PBM_SP_IG_WATERMARK0_PRIO0_WM, priWatermark);
  12285. break;
  12286. }
  12287. case 1:
  12288. {
  12289. hSrio->RIO_PBM[portNum].RIO_PBM_SP_IG_WATERMARK1 =
  12290. CSL_FMK (SRIO_RIO_PBM_SP_IG_WATERMARK1_PRIO1CRF_WM, crfWatermark) |
  12291. CSL_FMK (SRIO_RIO_PBM_SP_IG_WATERMARK1_PRIO1_WM, priWatermark);
  12292. break;
  12293. }
  12294. case 2:
  12295. {
  12296. hSrio->RIO_PBM[portNum].RIO_PBM_SP_IG_WATERMARK2 =
  12297. CSL_FMK (SRIO_RIO_PBM_SP_IG_WATERMARK2_PRIO2CRF_WM, crfWatermark) |
  12298. CSL_FMK (SRIO_RIO_PBM_SP_IG_WATERMARK2_PRIO2_WM, priWatermark);
  12299. break;
  12300. }
  12301. case 3:
  12302. {
  12303. hSrio->RIO_PBM[portNum].RIO_PBM_SP_IG_WATERMARK3 =
  12304. CSL_FMK (SRIO_RIO_PBM_SP_IG_WATERMARK3_PRIO3CRF_WM, crfWatermark) |
  12305. CSL_FMK (SRIO_RIO_PBM_SP_IG_WATERMARK3_PRIO3_WM, priWatermark);
  12306. break;
  12307. }
  12308. }
  12309. }
  12310. /** ============================================================================
  12311. * @n@b CSL_SRIO_GetEventMgmtInterruptStatus
  12312. *
  12313. * @b Description
  12314. * @n The function is used to get the Event Management Interrupt Status
  12315. *
  12316. * @b Arguments
  12317. @verbatim
  12318. hSrio Handle of the SRIO device
  12319. intStatus Event Management Interrupt Status
  12320. @endverbatim
  12321. *
  12322. * <b> Return Value </b>
  12323. * @n None
  12324. *
  12325. * <b> Pre Condition </b>
  12326. * @n CSL_SRIO_Open() must be called
  12327. *
  12328. * <b> Post Condition </b>
  12329. * @n None
  12330. *
  12331. * @b Reads
  12332. * @n SRIO_RIO_EM_INT_STAT
  12333. *
  12334. * @b Example
  12335. * @verbatim
  12336. CSL_SrioHandle hSrio;
  12337. Uint32 intStatus;
  12338. // Open the CSL SRIO Module 0
  12339. hSrio = CSL_SRIO_Open (0);
  12340. // Get the Event Management Interrupt Status
  12341. CSL_SRIO_GetEventMgmtInterruptStatus(hSrio, &intStatus);
  12342. ...
  12343. @endverbatim
  12344. * =============================================================================
  12345. */
  12346. static inline void CSL_SRIO_GetEventMgmtInterruptStatus
  12347. (
  12348. CSL_SrioHandle hSrio,
  12349. Uint32* intStatus
  12350. )
  12351. {
  12352. *intStatus = hSrio->RIO_EM_INT_STAT;
  12353. }
  12354. /** ============================================================================
  12355. * @n@b CSL_SRIO_GetEventMgmtInterrupts
  12356. *
  12357. * @b Description
  12358. * @n The function is used to get the Event Management Interrupts
  12359. *
  12360. * @b Arguments
  12361. @verbatim
  12362. hSrio Handle of the SRIO device
  12363. log When set, this field enables a logical layer event
  12364. detected in the User Core to cause an interrupt
  12365. mecs When set, this field enables an interrupt to be raised
  12366. upon reception of an MECS with a command value that is
  12367. enabled
  12368. pwRx When set, this field enables the reception of a port-write
  12369. to cause an interrupt
  12370. localLog When set, this field enables an implementation-specific
  12371. Logical/Transport Layer Error to cause an interrupt
  12372. @endverbatim
  12373. *
  12374. * <b> Return Value </b>
  12375. * @n None
  12376. *
  12377. * <b> Pre Condition </b>
  12378. * @n CSL_SRIO_Open() must be called
  12379. *
  12380. * <b> Post Condition </b>
  12381. * @n None
  12382. *
  12383. * @b Reads
  12384. * @n SRIO_RIO_EM_INT_ENABLE_LOG, SRIO_RIO_EM_INT_ENABLE_MECS,
  12385. * @n SRIO_RIO_EM_INT_ENABLE_PW_RX, SRIO_RIO_EM_INT_ENABLE_LOCALOG
  12386. *
  12387. * @b Example
  12388. * @verbatim
  12389. CSL_SrioHandle hSrio;
  12390. Uint8 log;
  12391. Uint8 mecs;
  12392. Uint8 pwRx;
  12393. Uint8 localLog;
  12394. // Open the CSL SRIO Module 0
  12395. hSrio = CSL_SRIO_Open (0);
  12396. // Get the Event Management Interrupts
  12397. CSL_SRIO_GetEventMgmtInterrupts(hSrio, &log, &mecs, &pwRx, &localLog);
  12398. ...
  12399. @endverbatim
  12400. * =============================================================================
  12401. */
  12402. static inline void CSL_SRIO_GetEventMgmtInterrupts
  12403. (
  12404. CSL_SrioHandle hSrio,
  12405. Uint8* log,
  12406. Uint8* mecs,
  12407. Uint8* pwRx,
  12408. Uint8* localLog
  12409. )
  12410. {
  12411. Uint32 value = hSrio->RIO_EM_INT_ENABLE;
  12412. *log = CSL_FEXT (value, SRIO_RIO_EM_INT_ENABLE_LOG);
  12413. *mecs = CSL_FEXT (value, SRIO_RIO_EM_INT_ENABLE_MECS);
  12414. *pwRx = CSL_FEXT (value, SRIO_RIO_EM_INT_ENABLE_PW_RX);
  12415. *localLog = CSL_FEXT (value, SRIO_RIO_EM_INT_ENABLE_LOCALOG);
  12416. }
  12417. /** ============================================================================
  12418. * @n@b CSL_SRIO_SetEventMgmtInterrupts
  12419. *
  12420. * @b Description
  12421. * @n The function is used to set the Event Management Interrupts
  12422. *
  12423. * @b Arguments
  12424. @verbatim
  12425. hSrio Handle of the SRIO device
  12426. log When set, this field enables a logical layer event
  12427. detected in the User Core to cause an interrupt
  12428. mecs When set, this field enables an interrupt to be raised
  12429. upon reception of an MECS with a command value that is
  12430. enabled
  12431. pwRx When set, this field enables the reception of a port-write
  12432. to cause an interrupt
  12433. localLog When set, this field enables an implementation-specific
  12434. Logical/Transport Layer Error to cause an interrupt
  12435. @endverbatim
  12436. *
  12437. * <b> Return Value </b>
  12438. * @n None
  12439. *
  12440. * <b> Pre Condition </b>
  12441. * @n CSL_SRIO_Open() must be called
  12442. *
  12443. * <b> Post Condition </b>
  12444. * @n None
  12445. *
  12446. * @b Writes
  12447. * @n SRIO_RIO_EM_INT_ENABLE_LOG, SRIO_RIO_EM_INT_ENABLE_MECS,
  12448. * @n SRIO_RIO_EM_INT_ENABLE_PW_RX, SRIO_RIO_EM_INT_ENABLE_LOCALOG
  12449. *
  12450. * @b Example
  12451. * @verbatim
  12452. CSL_SrioHandle hSrio;
  12453. // Open the CSL SRIO Module 0
  12454. hSrio = CSL_SRIO_Open (0);
  12455. // Set the Event Management Interrupts for logical layer events only
  12456. CSL_SRIO_SetEventMgmtInterrupts(hSrio, 1, 0, 0, 0);
  12457. ...
  12458. @endverbatim
  12459. * =============================================================================
  12460. */
  12461. static inline void CSL_SRIO_SetEventMgmtInterrupts
  12462. (
  12463. CSL_SrioHandle hSrio,
  12464. Uint8 log,
  12465. Uint8 mecs,
  12466. Uint8 pwRx,
  12467. Uint8 localLog
  12468. )
  12469. {
  12470. hSrio->RIO_EM_INT_ENABLE =
  12471. CSL_FMK (SRIO_RIO_EM_INT_ENABLE_LOG, log) |
  12472. CSL_FMK (SRIO_RIO_EM_INT_ENABLE_MECS, mecs) |
  12473. CSL_FMK (SRIO_RIO_EM_INT_ENABLE_PW_RX, pwRx) |
  12474. CSL_FMK (SRIO_RIO_EM_INT_ENABLE_LOCALOG, localLog);
  12475. }
  12476. /** ============================================================================
  12477. * @n@b CSL_SRIO_GetEventMgmtInterruptPortStatus
  12478. *
  12479. * @b Description
  12480. * @n The function is used to get the Event Management Interrupt port status
  12481. *
  12482. * @b Arguments
  12483. @verbatim
  12484. hSrio Handle of the SRIO device
  12485. irqPending Per-port interrupt pending status
  12486. @endverbatim
  12487. *
  12488. * <b> Return Value </b>
  12489. * @n None
  12490. *
  12491. * <b> Pre Condition </b>
  12492. * @n CSL_SRIO_Open() must be called
  12493. *
  12494. * <b> Post Condition </b>
  12495. * @n None
  12496. *
  12497. * @b Reads
  12498. * @n SRIO_RIO_EM_INT_PORT_STAT_IRQ_PENDING
  12499. *
  12500. * @b Example
  12501. * @verbatim
  12502. CSL_SrioHandle hSrio;
  12503. Uint8 irqPending;
  12504. // Open the CSL SRIO Module 0
  12505. hSrio = CSL_SRIO_Open (0);
  12506. // Get the Event Management Port Interrupt Status
  12507. CSL_SRIO_GetEventMgmtInterruptPortStatus(hSrio, &irqPending);
  12508. ...
  12509. @endverbatim
  12510. * =============================================================================
  12511. */
  12512. static inline void CSL_SRIO_GetEventMgmtInterruptPortStatus
  12513. (
  12514. CSL_SrioHandle hSrio,
  12515. Uint8* irqPending
  12516. )
  12517. {
  12518. *irqPending = CSL_FEXT (hSrio->RIO_EM_INT_PORT_STAT, SRIO_RIO_EM_INT_PORT_STAT_IRQ_PENDING);
  12519. }
  12520. /** ============================================================================
  12521. * @n@b CSL_SRIO_GetEventMgmtPortWriteStatus
  12522. *
  12523. * @b Description
  12524. * @n The function is used to get the Event Management Port Write Status
  12525. *
  12526. * @b Arguments
  12527. @verbatim
  12528. hSrio Handle of the SRIO device
  12529. port When set, a port-specific event has been detected
  12530. log An enabled logical layer event has been detected
  12531. rcs A reset request has been detected by a port
  12532. multiportErr Indicates that multiple ports have detected errors
  12533. which use port-write notification
  12534. localLog Implementation-specific local Logical/Transport Layer Error
  12535. @endverbatim
  12536. *
  12537. * <b> Return Value </b>
  12538. * @n None
  12539. *
  12540. * <b> Pre Condition </b>
  12541. * @n CSL_SRIO_Open() must be called
  12542. *
  12543. * <b> Post Condition </b>
  12544. * @n None
  12545. *
  12546. * @b Reads
  12547. * @n SRIO_RIO_EM_PW_STAT_PORT, SRIO_RIO_EM_PW_STAT_LOG,
  12548. * @n SRIO_RIO_EM_PW_STAT_RCS, SRIO_RIO_EM_PW_STAT_MULTIPORT_ERR,
  12549. * @n SRIO_RIO_EM_PW_STAT_LOCALOG
  12550. *
  12551. * @b Example
  12552. * @verbatim
  12553. CSL_SrioHandle hSrio;
  12554. Uint8 port;
  12555. Uint8 log;
  12556. Uint8 rcs;
  12557. Uint8 multiportErr;
  12558. Uint8 localLog;
  12559. // Open the CSL SRIO Module 0
  12560. hSrio = CSL_SRIO_Open (0);
  12561. // Get the Event Management Port Status
  12562. CSL_SRIO_GetEventMgmtPortWriteStatus(hSrio, &port, &log, &rcs, &multiportErr, &localLog);
  12563. ...
  12564. @endverbatim
  12565. * =============================================================================
  12566. */
  12567. static inline void CSL_SRIO_GetEventMgmtPortWriteStatus
  12568. (
  12569. CSL_SrioHandle hSrio,
  12570. Uint8* port,
  12571. Uint8* log,
  12572. Uint8* rcs,
  12573. Uint8* multiportErr,
  12574. Uint8* localLog
  12575. )
  12576. {
  12577. Uint32 value = hSrio->RIO_EM_PW_STAT;
  12578. *port = CSL_FEXT (value, SRIO_RIO_EM_PW_STAT_PORT);
  12579. *log = CSL_FEXT (value, SRIO_RIO_EM_PW_STAT_LOG);
  12580. *rcs = CSL_FEXT (value, SRIO_RIO_EM_PW_STAT_RCS);
  12581. *multiportErr = CSL_FEXT (value, SRIO_RIO_EM_PW_STAT_MULTIPORT_ERR);
  12582. *localLog = CSL_FEXT (value, SRIO_RIO_EM_PW_STAT_LOCALOG);
  12583. }
  12584. /** ============================================================================
  12585. * @n@b CSL_SRIO_GetEventMgmtPortWriteEnable
  12586. *
  12587. * @b Description
  12588. * @n The function is used to get the Event Management Port Write Enable
  12589. *
  12590. * @b Arguments
  12591. @verbatim
  12592. hSrio Handle of the SRIO device
  12593. log When set, this field enables a logical layer event
  12594. to cause a port-write to be sent.
  12595. localLog When set, this field enables an implementation-specific
  12596. Logical/Transport Layer Error to cause a port-write
  12597. to be sent
  12598. @endverbatim
  12599. *
  12600. * <b> Return Value </b>
  12601. * @n None
  12602. *
  12603. * <b> Pre Condition </b>
  12604. * @n CSL_SRIO_Open() must be called
  12605. *
  12606. * <b> Post Condition </b>
  12607. * @n None
  12608. *
  12609. * @b Reads
  12610. * @n SRIO_RIO_EM_PW_EN_LOG, SRIO_RIO_EM_PW_EN_LOCALOG
  12611. *
  12612. * @b Example
  12613. * @verbatim
  12614. CSL_SrioHandle hSrio;
  12615. Uint8 log;
  12616. Uint8 localLog;
  12617. // Open the CSL SRIO Module 0
  12618. hSrio = CSL_SRIO_Open (0);
  12619. // Get the Event Management Port Enable
  12620. CSL_SRIO_GetEventMgmtPortWriteEnable(hSrio, &log, &localLog);
  12621. ...
  12622. @endverbatim
  12623. * =============================================================================
  12624. */
  12625. static inline void CSL_SRIO_GetEventMgmtPortWriteEnable
  12626. (
  12627. CSL_SrioHandle hSrio,
  12628. Uint8* log,
  12629. Uint8* localLog
  12630. )
  12631. {
  12632. Uint32 value = hSrio->RIO_EM_PW_EN;
  12633. *log = CSL_FEXT (value, SRIO_RIO_EM_PW_EN_LOG);
  12634. *localLog = CSL_FEXT (value, SRIO_RIO_EM_PW_EN_LOCALOG);
  12635. }
  12636. /** ============================================================================
  12637. * @n@b CSL_SRIO_SetEventMgmtPortWriteEnable
  12638. *
  12639. * @b Description
  12640. * @n The function is used to set the Event Management Port Write Enable
  12641. *
  12642. * @b Arguments
  12643. @verbatim
  12644. hSrio Handle of the SRIO device
  12645. log When set, this field enables a logical layer event
  12646. to cause a port-write to be sent.
  12647. localLog When set, this field enables an implementation-specific
  12648. Logical/Transport Layer Error to cause a port-write
  12649. to be sent
  12650. @endverbatim
  12651. *
  12652. * <b> Return Value </b>
  12653. * @n None
  12654. *
  12655. * <b> Pre Condition </b>
  12656. * @n CSL_SRIO_Open() must be called
  12657. *
  12658. * <b> Post Condition </b>
  12659. * @n None
  12660. *
  12661. * @b Writes
  12662. * @n SRIO_RIO_EM_PW_EN_LOG, SRIO_RIO_EM_PW_EN_LOCALOG
  12663. *
  12664. * @b Example
  12665. * @verbatim
  12666. CSL_SrioHandle hSrio;
  12667. // Open the CSL SRIO Module 0
  12668. hSrio = CSL_SRIO_Open (0);
  12669. // Set the Event Management Port Enable for Log only events
  12670. CSL_SRIO_SetEventMgmtPortWriteEnable(hSrio, 1, 0);
  12671. ...
  12672. @endverbatim
  12673. * =============================================================================
  12674. */
  12675. static inline void CSL_SRIO_SetEventMgmtPortWriteEnable
  12676. (
  12677. CSL_SrioHandle hSrio,
  12678. Uint8 log,
  12679. Uint8 localLog
  12680. )
  12681. {
  12682. hSrio->RIO_EM_PW_EN =
  12683. CSL_FMK (SRIO_RIO_EM_PW_EN_LOG, log) |
  12684. CSL_FMK (SRIO_RIO_EM_PW_EN_LOCALOG, localLog);
  12685. }
  12686. /** ============================================================================
  12687. * @n@b CSL_SRIO_GetEventMgmtPortWritePendingStatus
  12688. *
  12689. * @b Description
  12690. * @n The function is used to get the Event Management Port Write Status
  12691. *
  12692. * @b Arguments
  12693. @verbatim
  12694. hSrio Handle of the SRIO device
  12695. pwPending Per-port Port Write pending status
  12696. @endverbatim
  12697. *
  12698. * <b> Return Value </b>
  12699. * @n None
  12700. *
  12701. * <b> Pre Condition </b>
  12702. * @n CSL_SRIO_Open() must be called
  12703. *
  12704. * <b> Post Condition </b>
  12705. * @n None
  12706. *
  12707. * @b Reads
  12708. * @n SRIO_RIO_EM_PW_PORT_STAT_PW_PENDING
  12709. *
  12710. * @b Example
  12711. * @verbatim
  12712. CSL_SrioHandle hSrio;
  12713. Uint8 pwPending;
  12714. // Open the CSL SRIO Module 0
  12715. hSrio = CSL_SRIO_Open (0);
  12716. // Get the Event Management Port Write status
  12717. CSL_SRIO_GetEventMgmtPortWritePendingStatus(hSrio, &pwPending);
  12718. ...
  12719. @endverbatim
  12720. * =============================================================================
  12721. */
  12722. static inline void CSL_SRIO_GetEventMgmtPortWritePendingStatus
  12723. (
  12724. CSL_SrioHandle hSrio,
  12725. Uint8* pwPending
  12726. )
  12727. {
  12728. *pwPending = CSL_FEXT (hSrio->RIO_EM_PW_PORT_STAT, SRIO_RIO_EM_PW_PORT_STAT_PW_PENDING);
  12729. }
  12730. /** ============================================================================
  12731. * @n@b CSL_SRIO_EnableEventMgmtInterrupts
  12732. *
  12733. * @b Description
  12734. * @n The function is used to enable the Event Management Interrupts
  12735. *
  12736. * @b Arguments
  12737. @verbatim
  12738. hSrio Handle of the SRIO device
  12739. @endverbatim
  12740. *
  12741. * <b> Return Value </b>
  12742. * @n None
  12743. *
  12744. * <b> Pre Condition </b>
  12745. * @n CSL_SRIO_Open() must be called
  12746. *
  12747. * <b> Post Condition </b>
  12748. * @n None
  12749. *
  12750. * @b Writes
  12751. * @n SRIO_RIO_EM_DEV_INT_EN_INT_EN=1
  12752. *
  12753. * @b Example
  12754. * @verbatim
  12755. CSL_SrioHandle hSrio;
  12756. // Open the CSL SRIO Module 0
  12757. hSrio = CSL_SRIO_Open (0);
  12758. // Enable the Event Management Interrupts
  12759. CSL_SRIO_EnableEventMgmtInterrupts(hSrio);
  12760. ...
  12761. @endverbatim
  12762. * =============================================================================
  12763. */
  12764. static inline void CSL_SRIO_EnableEventMgmtInterrupts
  12765. (
  12766. CSL_SrioHandle hSrio
  12767. )
  12768. {
  12769. CSL_FINS (hSrio->RIO_EM_DEV_INT_EN, SRIO_RIO_EM_DEV_INT_EN_INT_EN, 1);
  12770. }
  12771. /** ============================================================================
  12772. * @n@b CSL_SRIO_DisableEventMgmtInterrupts
  12773. *
  12774. * @b Description
  12775. * @n The function is used to disable the Event Management Interrupts
  12776. *
  12777. * @b Arguments
  12778. @verbatim
  12779. hSrio Handle of the SRIO device
  12780. @endverbatim
  12781. *
  12782. * <b> Return Value </b>
  12783. * @n None
  12784. *
  12785. * <b> Pre Condition </b>
  12786. * @n CSL_SRIO_Open() must be called
  12787. *
  12788. * <b> Post Condition </b>
  12789. * @n None
  12790. *
  12791. * @b Writes
  12792. * @n SRIO_RIO_EM_DEV_INT_EN_INT_EN=0
  12793. *
  12794. * @b Example
  12795. * @verbatim
  12796. CSL_SrioHandle hSrio;
  12797. // Open the CSL SRIO Module 0
  12798. hSrio = CSL_SRIO_Open (0);
  12799. // Disable the Event Management Interrupts
  12800. CSL_SRIO_DisableEventMgmtInterrupts(hSrio);
  12801. ...
  12802. @endverbatim
  12803. * =============================================================================
  12804. */
  12805. static inline void CSL_SRIO_DisableEventMgmtInterrupts
  12806. (
  12807. CSL_SrioHandle hSrio
  12808. )
  12809. {
  12810. CSL_FINS (hSrio->RIO_EM_DEV_INT_EN, SRIO_RIO_EM_DEV_INT_EN_INT_EN, 0);
  12811. }
  12812. /** ============================================================================
  12813. * @n@b CSL_SRIO_IsEventMgmtInterruptsEnabled
  12814. *
  12815. * @b Description
  12816. * @n The function is used to check if the Event Management Interrupts are
  12817. * enabled or disabled?
  12818. *
  12819. * @b Arguments
  12820. @verbatim
  12821. hSrio Handle of the SRIO device
  12822. @endverbatim
  12823. *
  12824. * <b> Return Value </b>
  12825. * @n TRUE - Event Management Interrupts are enabled
  12826. * @n FALSE - Event Management Interrupts are disabled
  12827. *
  12828. * <b> Pre Condition </b>
  12829. * @n CSL_SRIO_Open() must be called
  12830. *
  12831. * <b> Post Condition </b>
  12832. * @n None
  12833. *
  12834. * @b Reads
  12835. * @n SRIO_RIO_EM_DEV_INT_EN_INT_EN
  12836. *
  12837. * @b Example
  12838. * @verbatim
  12839. CSL_SrioHandle hSrio;
  12840. // Open the CSL SRIO Module 0
  12841. hSrio = CSL_SRIO_Open (0);
  12842. // Disable the Event Management Interrupts
  12843. if (CSL_SRIO_IsEventMgmtInterruptsEnabled(hSrio) == TRUE)
  12844. {
  12845. // Event Management Interrupts Enabled
  12846. }
  12847. else
  12848. {
  12849. // Event Management Interrupts Disabled
  12850. }
  12851. ...
  12852. @endverbatim
  12853. * =============================================================================
  12854. */
  12855. static inline Bool CSL_SRIO_IsEventMgmtInterruptsEnabled
  12856. (
  12857. CSL_SrioHandle hSrio
  12858. )
  12859. {
  12860. if (CSL_FEXT(hSrio->RIO_EM_DEV_INT_EN, SRIO_RIO_EM_DEV_INT_EN_INT_EN) == 1)
  12861. return TRUE;
  12862. return FALSE;
  12863. }
  12864. /** ============================================================================
  12865. * @n@b CSL_SRIO_EnableEventMgmtPortWrite
  12866. *
  12867. * @b Description
  12868. * @n The function is used to enable the Event Management Port Write
  12869. *
  12870. * @b Arguments
  12871. @verbatim
  12872. hSrio Handle of the SRIO device
  12873. @endverbatim
  12874. *
  12875. * <b> Return Value </b>
  12876. * @n None
  12877. *
  12878. * <b> Pre Condition </b>
  12879. * @n CSL_SRIO_Open() must be called
  12880. *
  12881. * <b> Post Condition </b>
  12882. * @n None
  12883. *
  12884. * @b Writes
  12885. * @n SRIO_RIO_EM_DEV_PW_EN_PW_EN=1
  12886. *
  12887. * @b Example
  12888. * @verbatim
  12889. CSL_SrioHandle hSrio;
  12890. // Open the CSL SRIO Module 0
  12891. hSrio = CSL_SRIO_Open (0);
  12892. // Enable the Event Management Port Writes
  12893. CSL_SRIO_EnableEventMgmtPortWrite(hSrio);
  12894. ...
  12895. @endverbatim
  12896. * =============================================================================
  12897. */
  12898. static inline void CSL_SRIO_EnableEventMgmtPortWrite
  12899. (
  12900. CSL_SrioHandle hSrio
  12901. )
  12902. {
  12903. CSL_FINS (hSrio->RIO_EM_DEV_PW_EN, SRIO_RIO_EM_DEV_PW_EN_PW_EN, 1);
  12904. }
  12905. /** ============================================================================
  12906. * @n@b CSL_SRIO_DisableEventMgmtPortWrite
  12907. *
  12908. * @b Description
  12909. * @n The function is used to disable the Event Management Port Write
  12910. *
  12911. * @b Arguments
  12912. @verbatim
  12913. hSrio Handle of the SRIO device
  12914. @endverbatim
  12915. *
  12916. * <b> Return Value </b>
  12917. * @n None
  12918. *
  12919. * <b> Pre Condition </b>
  12920. * @n CSL_SRIO_Open() must be called
  12921. *
  12922. * <b> Post Condition </b>
  12923. * @n None
  12924. *
  12925. * @b Writes
  12926. * @n SRIO_RIO_EM_DEV_PW_EN_PW_EN=0
  12927. *
  12928. * @b Example
  12929. * @verbatim
  12930. CSL_SrioHandle hSrio;
  12931. // Open the CSL SRIO Module 0
  12932. hSrio = CSL_SRIO_Open (0);
  12933. // Disable the Event Management Port Writes
  12934. CSL_SRIO_DisableEventMgmtPortWrite(hSrio);
  12935. ...
  12936. @endverbatim
  12937. * =============================================================================
  12938. */
  12939. static inline void CSL_SRIO_DisableEventMgmtPortWrite
  12940. (
  12941. CSL_SrioHandle hSrio
  12942. )
  12943. {
  12944. CSL_FINS (hSrio->RIO_EM_DEV_PW_EN, SRIO_RIO_EM_DEV_PW_EN_PW_EN, 0);
  12945. }
  12946. /** ============================================================================
  12947. * @n@b CSL_SRIO_IsEventMgmtPortWriteEnabled
  12948. *
  12949. * @b Description
  12950. * @n The function is used to check if the Event Management Port Write is
  12951. * enabled or not?
  12952. *
  12953. * @b Arguments
  12954. @verbatim
  12955. hSrio Handle of the SRIO device
  12956. @endverbatim
  12957. *
  12958. * <b> Return Value </b>
  12959. * @n None
  12960. *
  12961. * <b> Pre Condition </b>
  12962. * @n CSL_SRIO_Open() must be called
  12963. *
  12964. * <b> Post Condition </b>
  12965. * @n None
  12966. *
  12967. * @b Reads
  12968. * @n SRIO_RIO_EM_DEV_PW_EN_PW_EN
  12969. *
  12970. * @b Example
  12971. * @verbatim
  12972. CSL_SrioHandle hSrio;
  12973. // Open the CSL SRIO Module 0
  12974. hSrio = CSL_SRIO_Open (0);
  12975. // Check if the Event Management Port Writes are enabled or not?
  12976. if (CSL_SRIO_IsEventMgmtPortWriteEnabled(hSrio) == TRUE)
  12977. {
  12978. // Event Management Port Writes are enabled
  12979. }
  12980. else
  12981. {
  12982. // Event Management Port Writes are disabled
  12983. }
  12984. ...
  12985. @endverbatim
  12986. * =============================================================================
  12987. */
  12988. static inline Bool CSL_SRIO_IsEventMgmtPortWriteEnabled
  12989. (
  12990. CSL_SrioHandle hSrio
  12991. )
  12992. {
  12993. if (CSL_FEXT(hSrio->RIO_EM_DEV_PW_EN, SRIO_RIO_EM_DEV_PW_EN_PW_EN) == 1)
  12994. return TRUE;
  12995. return FALSE;
  12996. }
  12997. /** ============================================================================
  12998. * @n@b CSL_SRIO_GetEventMgmtMECSStatus
  12999. *
  13000. * @b Description
  13001. * @n The function is used to get the event management MECS status
  13002. *
  13003. * @b Arguments
  13004. @verbatim
  13005. hSrio Handle of the SRIO device
  13006. mecsStatus MECS Command received by any SRIO port
  13007. @endverbatim
  13008. *
  13009. * <b> Return Value </b>
  13010. * @n None
  13011. *
  13012. * <b> Pre Condition </b>
  13013. * @n CSL_SRIO_Open() must be called
  13014. *
  13015. * <b> Post Condition </b>
  13016. * @n None
  13017. *
  13018. * @b Reads
  13019. * @n SRIO_RIO_EM_MECS_STAT_CMD_STAT
  13020. *
  13021. * @b Example
  13022. * @verbatim
  13023. CSL_SrioHandle hSrio;
  13024. Uint8 mecsStatus;
  13025. // Open the CSL SRIO Module 0
  13026. hSrio = CSL_SRIO_Open (0);
  13027. // Get the Event Management MECS Status
  13028. CSL_SRIO_GetEventMgmtMECSStatus(hSrio, &mecsStatus);
  13029. ...
  13030. @endverbatim
  13031. * =============================================================================
  13032. */
  13033. static inline void CSL_SRIO_GetEventMgmtMECSStatus
  13034. (
  13035. CSL_SrioHandle hSrio,
  13036. Uint8* mecsStatus
  13037. )
  13038. {
  13039. *mecsStatus = CSL_FEXT (hSrio->RIO_EM_MECS_STAT, SRIO_RIO_EM_MECS_STAT_CMD_STAT);
  13040. }
  13041. /** ============================================================================
  13042. * @n@b CSL_SRIO_ClearEventMgmtMECSStatus
  13043. *
  13044. * @b Description
  13045. * @n The function is used to clear the event management MECS status
  13046. *
  13047. * @b Arguments
  13048. @verbatim
  13049. hSrio Handle of the SRIO device
  13050. mecsStatus MECS Command received by any SRIO port
  13051. @endverbatim
  13052. *
  13053. * <b> Return Value </b>
  13054. * @n None
  13055. *
  13056. * <b> Pre Condition </b>
  13057. * @n CSL_SRIO_Open() must be called
  13058. *
  13059. * <b> Post Condition </b>
  13060. * @n None
  13061. *
  13062. * @b Writes
  13063. * @n SRIO_RIO_EM_MECS_STAT_CMD_STAT
  13064. *
  13065. * @b Affects
  13066. * @n SRIO_RIO_EM_MECS_STAT_CMD_STAT=0
  13067. *
  13068. * @b Example
  13069. * @verbatim
  13070. CSL_SrioHandle hSrio;
  13071. Uint8 mecsStatus;
  13072. // Open the CSL SRIO Module 0
  13073. hSrio = CSL_SRIO_Open (0);
  13074. // Get the Event Management MECS Status
  13075. CSL_SRIO_GetEventMgmtMECSStatus(hSrio, &mecsStatus);
  13076. if (mecsStatus != 0)
  13077. {
  13078. // MECS with a command has been received.
  13079. ...
  13080. // Clear the MECS Event Management Status
  13081. CSL_SRIO_ClearEventMgmtMECSStatus (hSrio, mecsStatus);
  13082. }
  13083. ...
  13084. @endverbatim
  13085. * =============================================================================
  13086. */
  13087. static inline void CSL_SRIO_ClearEventMgmtMECSStatus
  13088. (
  13089. CSL_SrioHandle hSrio,
  13090. Uint8 mecsStatus
  13091. )
  13092. {
  13093. CSL_FINS(hSrio->RIO_EM_MECS_STAT, SRIO_RIO_EM_MECS_STAT_CMD_STAT, mecsStatus);
  13094. }
  13095. /** ============================================================================
  13096. * @n@b CSL_SRIO_GetEventMgmtMECSInterrupt
  13097. *
  13098. * @b Description
  13099. * @n The function is used to get the event management MECS interrupt enable
  13100. * status
  13101. *
  13102. * @b Arguments
  13103. @verbatim
  13104. hSrio Handle of the SRIO device
  13105. mecsStatus Enables MECS with set cmd to raise an interrupt request
  13106. @endverbatim
  13107. *
  13108. * <b> Return Value </b>
  13109. * @n None
  13110. *
  13111. * <b> Pre Condition </b>
  13112. * @n CSL_SRIO_Open() must be called
  13113. *
  13114. * <b> Post Condition </b>
  13115. * @n None
  13116. *
  13117. * @b Reads
  13118. * @n SRIO_RIO_EM_MECS_INT_EN_CMD_EN
  13119. *
  13120. * @b Example
  13121. * @verbatim
  13122. CSL_SrioHandle hSrio;
  13123. Uint8 mecsStatus;
  13124. // Open the CSL SRIO Module 0
  13125. hSrio = CSL_SRIO_Open (0);
  13126. // Get the Event Management MECS Interrupt status
  13127. CSL_SRIO_GetEventMgmtMECSInterrupt(hSrio, &mecsStatus);
  13128. ...
  13129. @endverbatim
  13130. * =============================================================================
  13131. */
  13132. static inline void CSL_SRIO_GetEventMgmtMECSInterrupt
  13133. (
  13134. CSL_SrioHandle hSrio,
  13135. Uint8* mecsStatus
  13136. )
  13137. {
  13138. *mecsStatus = CSL_FEXT (hSrio->RIO_EM_MECS_INT_EN, SRIO_RIO_EM_MECS_INT_EN_CMD_EN);
  13139. }
  13140. /** ============================================================================
  13141. * @n@b CSL_SRIO_SetEventMgmtMECSInterrupt
  13142. *
  13143. * @b Description
  13144. * @n The function is used to set the event management MECS interrupt enable
  13145. * status
  13146. *
  13147. * @b Arguments
  13148. @verbatim
  13149. hSrio Handle of the SRIO device
  13150. mecsStatus Enables MECS with set cmd to raise an interrupt request
  13151. @endverbatim
  13152. *
  13153. * <b> Return Value </b>
  13154. * @n None
  13155. *
  13156. * <b> Pre Condition </b>
  13157. * @n CSL_SRIO_Open() must be called
  13158. *
  13159. * <b> Post Condition </b>
  13160. * @n None
  13161. *
  13162. * @b Writes
  13163. * @n SRIO_RIO_EM_MECS_INT_EN_CMD_EN
  13164. *
  13165. * @b Example
  13166. * @verbatim
  13167. CSL_SrioHandle hSrio;
  13168. // Open the CSL SRIO Module 0
  13169. hSrio = CSL_SRIO_Open (0);
  13170. // Set the Event Management MECS Interrupt status for all cmds
  13171. CSL_SRIO_SetEventMgmtMECSInterrupt(hSrio, 0xFF);
  13172. ...
  13173. @endverbatim
  13174. * =============================================================================
  13175. */
  13176. static inline void CSL_SRIO_SetEventMgmtMECSInterrupt
  13177. (
  13178. CSL_SrioHandle hSrio,
  13179. Uint8 mecsStatus
  13180. )
  13181. {
  13182. CSL_FINS (hSrio->RIO_EM_MECS_INT_EN, SRIO_RIO_EM_MECS_INT_EN_CMD_EN, mecsStatus);
  13183. }
  13184. /** ============================================================================
  13185. * @n@b CSL_SRIO_GetEventMgmtMECSCaptureOut
  13186. *
  13187. * @b Description
  13188. * @n The function is used to get the event management MECS capture out
  13189. *
  13190. * @b Arguments
  13191. @verbatim
  13192. hSrio Handle of the SRIO device
  13193. cmdEn Enables the associated bit to toggle
  13194. @endverbatim
  13195. *
  13196. * <b> Return Value </b>
  13197. * @n None
  13198. *
  13199. * <b> Pre Condition </b>
  13200. * @n CSL_SRIO_Open() must be called
  13201. *
  13202. * <b> Post Condition </b>
  13203. * @n None
  13204. *
  13205. * @b Reads
  13206. * @n SRIO_RIO_EM_MECS_CAP_EN_CMD_EN
  13207. *
  13208. * @b Example
  13209. * @verbatim
  13210. CSL_SrioHandle hSrio;
  13211. Uint8 cmdEn;
  13212. // Open the CSL SRIO Module 0
  13213. hSrio = CSL_SRIO_Open (0);
  13214. // Get the Event Management MECS Capture out
  13215. CSL_SRIO_GetEventMgmtMECSCaptureOut(hSrio, &cmdEn);
  13216. ...
  13217. @endverbatim
  13218. * =============================================================================
  13219. */
  13220. static inline void CSL_SRIO_GetEventMgmtMECSCaptureOut
  13221. (
  13222. CSL_SrioHandle hSrio,
  13223. Uint8* cmdEn
  13224. )
  13225. {
  13226. *cmdEn = CSL_FEXT (hSrio->RIO_EM_MECS_CAP_EN, SRIO_RIO_EM_MECS_CAP_EN_CMD_EN);
  13227. }
  13228. /** ============================================================================
  13229. * @n@b CSL_SRIO_SetEventMgmtMECSCaptureOut
  13230. *
  13231. * @b Description
  13232. * @n The function is used to set the event management MECS capture out
  13233. *
  13234. * @b Arguments
  13235. @verbatim
  13236. hSrio Handle of the SRIO device
  13237. cmdEn Enables the associated bit to toggle
  13238. @endverbatim
  13239. *
  13240. * <b> Return Value </b>
  13241. * @n None
  13242. *
  13243. * <b> Pre Condition </b>
  13244. * @n CSL_SRIO_Open() must be called
  13245. *
  13246. * <b> Post Condition </b>
  13247. * @n None
  13248. *
  13249. * @b Writes
  13250. * @n SRIO_RIO_EM_MECS_CAP_EN_CMD_EN
  13251. *
  13252. * @b Example
  13253. * @verbatim
  13254. CSL_SrioHandle hSrio;
  13255. // Open the CSL SRIO Module 0
  13256. hSrio = CSL_SRIO_Open (0);
  13257. // Set the Event Management MECS Capture out for all commands
  13258. CSL_SRIO_SetEventMgmtMECSCaptureOut(hSrio, 0xFF);
  13259. ...
  13260. @endverbatim
  13261. * =============================================================================
  13262. */
  13263. static inline void CSL_SRIO_SetEventMgmtMECSCaptureOut
  13264. (
  13265. CSL_SrioHandle hSrio,
  13266. Uint8 cmdEn
  13267. )
  13268. {
  13269. CSL_FINS (hSrio->RIO_EM_MECS_CAP_EN, SRIO_RIO_EM_MECS_CAP_EN_CMD_EN, cmdEn);
  13270. }
  13271. /** ============================================================================
  13272. * @n@b CSL_SRIO_GetEventMgmtMECSTriggerIn
  13273. *
  13274. * @b Description
  13275. * @n The function is used to get the event management MECS Trigger In
  13276. *
  13277. * @b Arguments
  13278. @verbatim
  13279. hSrio Handle of the SRIO device
  13280. cmdStat Bit is set whenever an edge is detected on corresponding
  13281. cmdEn Enables the associated bit to trigger a MECS command
  13282. @endverbatim
  13283. *
  13284. * <b> Return Value </b>
  13285. * @n None
  13286. *
  13287. * <b> Pre Condition </b>
  13288. * @n CSL_SRIO_Open() must be called
  13289. *
  13290. * <b> Post Condition </b>
  13291. * @n None
  13292. *
  13293. * @b Reads
  13294. * @n SRIO_RIO_EM_MECS_TRIG_EN_CMD_STAT, SRIO_RIO_EM_MECS_TRIG_EN_CMD_EN
  13295. *
  13296. * @b Example
  13297. * @verbatim
  13298. CSL_SrioHandle hSrio;
  13299. Uint8 cmdEn;
  13300. Uint8 cmdStat;
  13301. // Open the CSL SRIO Module 0
  13302. hSrio = CSL_SRIO_Open (0);
  13303. // Get the Event Management MECS Trigger In
  13304. CSL_SRIO_GetEventMgmtMECSTriggerIn(hSrio, &cmdStat, &cmdEn);
  13305. ...
  13306. @endverbatim
  13307. * =============================================================================
  13308. */
  13309. static inline void CSL_SRIO_GetEventMgmtMECSTriggerIn
  13310. (
  13311. CSL_SrioHandle hSrio,
  13312. Uint8* cmdStat,
  13313. Uint8* cmdEn
  13314. )
  13315. {
  13316. Uint32 value = hSrio->RIO_EM_MECS_TRIG_EN;
  13317. *cmdStat = CSL_FEXT (value, SRIO_RIO_EM_MECS_TRIG_EN_CMD_STAT);
  13318. *cmdEn = CSL_FEXT (value, SRIO_RIO_EM_MECS_TRIG_EN_CMD_EN);
  13319. }
  13320. /** ============================================================================
  13321. * @n@b CSL_SRIO_SetEventMgmtMECSTriggerIn
  13322. *
  13323. * @b Description
  13324. * @n The function is used to set the event management MECS Trigger In
  13325. *
  13326. * @b Arguments
  13327. @verbatim
  13328. hSrio Handle of the SRIO device
  13329. cmdStat Bit is set whenever an edge is detected on corresponding
  13330. cmdEn Enables the associated bit to trigger a MECS command
  13331. @endverbatim
  13332. *
  13333. * <b> Return Value </b>
  13334. * @n None
  13335. *
  13336. * <b> Pre Condition </b>
  13337. * @n CSL_SRIO_Open() must be called
  13338. *
  13339. * <b> Post Condition </b>
  13340. * @n None
  13341. *
  13342. * @b Writes
  13343. * @n SRIO_RIO_EM_MECS_TRIG_EN_CMD_STAT, SRIO_RIO_EM_MECS_TRIG_EN_CMD_EN
  13344. *
  13345. * @b Example
  13346. * @verbatim
  13347. CSL_SrioHandle hSrio;
  13348. Uint8 cmdEn;
  13349. Uint8 cmdStat;
  13350. // Open the CSL SRIO Module 0
  13351. hSrio = CSL_SRIO_Open (0);
  13352. // Get the Event Management MECS Trigger In
  13353. CSL_SRIO_GetEventMgmtMECSTriggerIn(hSrio, &cmdStat, &cmdEn);
  13354. ...
  13355. // Set the Event Management MECS Trigger In to enable all MECS cmds
  13356. CSL_SRIO_SetEventMgmtMECSTriggerIn(hSrio, cmdStat, 0xFF);
  13357. ...
  13358. @endverbatim
  13359. * =============================================================================
  13360. */
  13361. static inline void CSL_SRIO_SetEventMgmtMECSTriggerIn
  13362. (
  13363. CSL_SrioHandle hSrio,
  13364. Uint8 cmdStat,
  13365. Uint8 cmdEn
  13366. )
  13367. {
  13368. hSrio->RIO_EM_MECS_TRIG_EN =
  13369. CSL_FMK (SRIO_RIO_EM_MECS_TRIG_EN_CMD_STAT, cmdStat) |
  13370. CSL_FMK (SRIO_RIO_EM_MECS_TRIG_EN_CMD_EN, cmdEn);
  13371. }
  13372. /** ============================================================================
  13373. * @n@b CSL_SRIO_GetEventMgmtMECSRequest
  13374. *
  13375. * @b Description
  13376. * @n The function is used to get the event management MECS Request
  13377. *
  13378. * @b Arguments
  13379. @verbatim
  13380. hSrio Handle of the SRIO device
  13381. sendStatus Send Status
  13382. cmd MECS command to be sent
  13383. @endverbatim
  13384. *
  13385. * <b> Return Value </b>
  13386. * @n None
  13387. *
  13388. * <b> Pre Condition </b>
  13389. * @n CSL_SRIO_Open() must be called
  13390. *
  13391. * <b> Post Condition </b>
  13392. * @n None
  13393. *
  13394. * @b Reads
  13395. * @n SRIO_RIO_EM_MECS_REQ_SEND, SRIO_RIO_EM_MECS_REQ_CMD
  13396. *
  13397. * @b Example
  13398. * @verbatim
  13399. CSL_SrioHandle hSrio;
  13400. Uint8 sendStatus;
  13401. Uint8 cmd;
  13402. // Open the CSL SRIO Module 0
  13403. hSrio = CSL_SRIO_Open (0);
  13404. // Get the Event Management MECS Trigger In
  13405. CSL_SRIO_GetEventMgmtMECSRequest(hSrio, &cmdStat, &cmdEn);
  13406. ...
  13407. @endverbatim
  13408. * =============================================================================
  13409. */
  13410. static inline void CSL_SRIO_GetEventMgmtMECSRequest
  13411. (
  13412. CSL_SrioHandle hSrio,
  13413. Uint8* sendStatus,
  13414. Uint8* cmd
  13415. )
  13416. {
  13417. Uint32 value = hSrio->RIO_EM_MECS_REQ;
  13418. *sendStatus = CSL_FEXT (value, SRIO_RIO_EM_MECS_REQ_SEND);
  13419. *cmd = CSL_FEXT (value, SRIO_RIO_EM_MECS_REQ_CMD);
  13420. }
  13421. /** ============================================================================
  13422. * @n@b CSL_SRIO_SetEventMgmtMECSRequest
  13423. *
  13424. * @b Description
  13425. * @n The function is used to set the event management MECS Request
  13426. *
  13427. * @b Arguments
  13428. @verbatim
  13429. hSrio Handle of the SRIO device
  13430. sendStatus Send Status
  13431. cmd MECS command to be sent
  13432. @endverbatim
  13433. *
  13434. * <b> Return Value </b>
  13435. * @n None
  13436. *
  13437. * <b> Pre Condition </b>
  13438. * @n CSL_SRIO_Open() must be called
  13439. *
  13440. * <b> Post Condition </b>
  13441. * @n None
  13442. *
  13443. * @b Writes
  13444. * @n SRIO_RIO_EM_MECS_REQ_SEND, SRIO_RIO_EM_MECS_REQ_CMD
  13445. *
  13446. * @b Example
  13447. * @verbatim
  13448. CSL_SrioHandle hSrio;
  13449. Uint8 sendStatus;
  13450. Uint8 cmd;
  13451. // Open the CSL SRIO Module 0
  13452. hSrio = CSL_SRIO_Open (0);
  13453. // Send the MECS Command 2.
  13454. CSL_SRIO_SetEventMgmtMECSRequest(hSrio, 0x1, 0x2);
  13455. ...
  13456. @endverbatim
  13457. * =============================================================================
  13458. */
  13459. static inline void CSL_SRIO_SetEventMgmtMECSRequest
  13460. (
  13461. CSL_SrioHandle hSrio,
  13462. Uint8 sendStatus,
  13463. Uint8 cmd
  13464. )
  13465. {
  13466. hSrio->RIO_EM_MECS_REQ =
  13467. CSL_FMK (SRIO_RIO_EM_MECS_REQ_SEND, sendStatus) |
  13468. CSL_FMK (SRIO_RIO_EM_MECS_REQ_CMD, cmd);
  13469. }
  13470. /** ============================================================================
  13471. * @n@b CSL_SRIO_GetEventMgmtMECSPortStatus
  13472. *
  13473. * @b Description
  13474. * @n The function is used to get the event management MECS Port Status
  13475. *
  13476. * @b Arguments
  13477. @verbatim
  13478. hSrio Handle of the SRIO device
  13479. port MECS Received Status
  13480. @endverbatim
  13481. *
  13482. * <b> Return Value </b>
  13483. * @n None
  13484. *
  13485. * <b> Pre Condition </b>
  13486. * @n CSL_SRIO_Open() must be called
  13487. *
  13488. * <b> Post Condition </b>
  13489. * @n None
  13490. *
  13491. * @b Reads
  13492. * @n SRIO_RIO_EM_MECS_PORT_STAT_PORT
  13493. *
  13494. * @b Example
  13495. * @verbatim
  13496. CSL_SrioHandle hSrio;
  13497. Uint8 port;
  13498. // Open the CSL SRIO Module 0
  13499. hSrio = CSL_SRIO_Open (0);
  13500. // Get the Event Management MECS Port Status
  13501. CSL_SRIO_GetEventMgmtMECSPortStatus(hSrio, &port);
  13502. ...
  13503. @endverbatim
  13504. * =============================================================================
  13505. */
  13506. static inline void CSL_SRIO_GetEventMgmtMECSPortStatus
  13507. (
  13508. CSL_SrioHandle hSrio,
  13509. Uint8* port
  13510. )
  13511. {
  13512. *port = CSL_FEXT (hSrio->RIO_EM_MECS_PORT_STAT, SRIO_RIO_EM_MECS_PORT_STAT_PORT);
  13513. }
  13514. /** ============================================================================
  13515. * @n@b CSL_SRIO_SetEventMgmtMECSPortStatus
  13516. *
  13517. * @b Description
  13518. * @n The function is used to set the event management MECS Port Status
  13519. *
  13520. * @b Arguments
  13521. @verbatim
  13522. hSrio Handle of the SRIO device
  13523. port MECS Received Status
  13524. @endverbatim
  13525. *
  13526. * <b> Return Value </b>
  13527. * @n None
  13528. *
  13529. * <b> Pre Condition </b>
  13530. * @n CSL_SRIO_Open() must be called
  13531. *
  13532. * <b> Post Condition </b>
  13533. * @n None
  13534. *
  13535. * @b Writes
  13536. * @n SRIO_RIO_EM_MECS_PORT_STAT_PORT
  13537. *
  13538. * @b Example
  13539. * @verbatim
  13540. CSL_SrioHandle hSrio;
  13541. Uint8 port;
  13542. // Open the CSL SRIO Module 0
  13543. hSrio = CSL_SRIO_Open (0);
  13544. // Get the Event Management MECS Port Status
  13545. CSL_SRIO_GetEventMgmtMECSPortStatus(hSrio, &port);
  13546. ...
  13547. // Clear the Event Management MECS Port Status
  13548. CSL_SRIO_SetEventMgmtMECSPortStatus (hSrio, port);
  13549. ...
  13550. @endverbatim
  13551. * =============================================================================
  13552. */
  13553. static inline void CSL_SRIO_SetEventMgmtMECSPortStatus
  13554. (
  13555. CSL_SrioHandle hSrio,
  13556. Uint8 port
  13557. )
  13558. {
  13559. CSL_FINS(hSrio->RIO_EM_MECS_PORT_STAT, SRIO_RIO_EM_MECS_PORT_STAT_PORT, port);
  13560. }
  13561. /** ============================================================================
  13562. * @n@b CSL_SRIO_GetEventMgmtCmdStatus
  13563. *
  13564. * @b Description
  13565. * @n The function is used to get the event management command status
  13566. *
  13567. * @b Arguments
  13568. @verbatim
  13569. hSrio Handle of the SRIO device
  13570. cmdStat MECS Command which were received
  13571. @endverbatim
  13572. *
  13573. * <b> Return Value </b>
  13574. * @n None
  13575. *
  13576. * <b> Pre Condition </b>
  13577. * @n CSL_SRIO_Open() must be called
  13578. *
  13579. * <b> Post Condition </b>
  13580. * @n None
  13581. *
  13582. * @b Reads
  13583. * @n SRIO_RIO_EM_RST_PORT_STAT_RST_REQ
  13584. *
  13585. * @b Example
  13586. * @verbatim
  13587. CSL_SrioHandle hSrio;
  13588. Uint8 cmdStat;
  13589. // Open the CSL SRIO Module 0
  13590. hSrio = CSL_SRIO_Open (0);
  13591. // Get the Event Management Command Status
  13592. CSL_SRIO_GetEventMgmtCmdStatus(hSrio, &cmdStat);
  13593. ...
  13594. @endverbatim
  13595. * =============================================================================
  13596. */
  13597. static inline void CSL_SRIO_GetEventMgmtCmdStatus
  13598. (
  13599. CSL_SrioHandle hSrio,
  13600. Uint8* cmdStat
  13601. )
  13602. {
  13603. *cmdStat = CSL_FEXT (hSrio->RIO_EM_MECS_STAT, SRIO_RIO_EM_MECS_STAT_CMD_STAT);
  13604. }
  13605. /** ============================================================================
  13606. * @n@b CSL_SRIO_SetEventMgmtCmdStatus
  13607. *
  13608. * @b Description
  13609. * @n The function is used to set the event management command status
  13610. *
  13611. * @b Arguments
  13612. @verbatim
  13613. hSrio Handle of the SRIO device
  13614. cmdStat MECS Command to be configured
  13615. @endverbatim
  13616. *
  13617. * <b> Return Value </b>
  13618. * @n None
  13619. *
  13620. * <b> Pre Condition </b>
  13621. * @n CSL_SRIO_Open() must be called
  13622. *
  13623. * <b> Post Condition </b>
  13624. * @n None
  13625. *
  13626. * @b Writes
  13627. * @n SRIO_RIO_EM_MECS_STAT_CMD_STAT
  13628. *
  13629. * @b Example
  13630. * @verbatim
  13631. CSL_SrioHandle hSrio;
  13632. Uint8 cmdStat;
  13633. // Open the CSL SRIO Module 0
  13634. hSrio = CSL_SRIO_Open (0);
  13635. // Get the Event Management Command Status
  13636. CSL_SRIO_GetEventMgmtCmdStatus(hSrio, &cmdStat);
  13637. ...
  13638. // Clear the Event Management Command Status
  13639. CSL_SRIO_SetEventMgmtCmdStatus(hSrio, cmdStat);
  13640. ...
  13641. @endverbatim
  13642. * =============================================================================
  13643. */
  13644. static inline void CSL_SRIO_SetEventMgmtCmdStatus
  13645. (
  13646. CSL_SrioHandle hSrio,
  13647. Uint8 cmdStat
  13648. )
  13649. {
  13650. CSL_FINS (hSrio->RIO_EM_MECS_STAT, SRIO_RIO_EM_MECS_STAT_CMD_STAT, cmdStat);
  13651. }
  13652. /** ============================================================================
  13653. * @n@b CSL_SRIO_GetEventMgmtResetRequest
  13654. *
  13655. * @b Description
  13656. * @n The function is used to get the event management reset request
  13657. *
  13658. * @b Arguments
  13659. @verbatim
  13660. hSrio Handle of the SRIO device
  13661. rstReq Per-port Reset Control Symbol event received status
  13662. @endverbatim
  13663. *
  13664. * <b> Return Value </b>
  13665. * @n None
  13666. *
  13667. * <b> Pre Condition </b>
  13668. * @n CSL_SRIO_Open() must be called
  13669. *
  13670. * <b> Post Condition </b>
  13671. * @n None
  13672. *
  13673. * @b Reads
  13674. * @n SRIO_RIO_EM_RST_PORT_STAT_RST_REQ
  13675. *
  13676. * @b Example
  13677. * @verbatim
  13678. CSL_SrioHandle hSrio;
  13679. Uint8 rstReq;
  13680. // Open the CSL SRIO Module 0
  13681. hSrio = CSL_SRIO_Open (0);
  13682. // Get the Event Management Reset Request Status
  13683. CSL_SRIO_GetEventMgmtResetRequest(hSrio, &rstReq);
  13684. ...
  13685. @endverbatim
  13686. * =============================================================================
  13687. */
  13688. static inline void CSL_SRIO_GetEventMgmtResetRequest
  13689. (
  13690. CSL_SrioHandle hSrio,
  13691. Uint8* rstReq
  13692. )
  13693. {
  13694. *rstReq = CSL_FEXT (hSrio->RIO_EM_RST_PORT_STAT, SRIO_RIO_EM_RST_PORT_STAT_RST_REQ);
  13695. }
  13696. /** ============================================================================
  13697. * @n@b CSL_SRIO_SetEventMgmtResetRequest
  13698. *
  13699. * @b Description
  13700. * @n The function is used to set the event management reset request
  13701. *
  13702. * @b Arguments
  13703. @verbatim
  13704. hSrio Handle of the SRIO device
  13705. rstReq Per-port Reset Control Symbol event received status
  13706. @endverbatim
  13707. *
  13708. * <b> Return Value </b>
  13709. * @n None
  13710. *
  13711. * <b> Pre Condition </b>
  13712. * @n CSL_SRIO_Open() must be called
  13713. *
  13714. * <b> Post Condition </b>
  13715. * @n None
  13716. *
  13717. * @b Writes
  13718. * @n SRIO_RIO_EM_RST_PORT_STAT_RST_REQ
  13719. *
  13720. * @b Example
  13721. * @verbatim
  13722. CSL_SrioHandle hSrio;
  13723. Uint8 rstReq;
  13724. // Open the CSL SRIO Module 0
  13725. hSrio = CSL_SRIO_Open (0);
  13726. // Set the Event Management Reset Request Status
  13727. // and clear all the reset events
  13728. CSL_SRIO_SetEventMgmtResetRequest(hSrio, 0xFF);
  13729. ...
  13730. @endverbatim
  13731. * =============================================================================
  13732. */
  13733. static inline void CSL_SRIO_SetEventMgmtResetRequest
  13734. (
  13735. CSL_SrioHandle hSrio,
  13736. Uint8 rstReq
  13737. )
  13738. {
  13739. CSL_FINS (hSrio->RIO_EM_RST_PORT_STAT, SRIO_RIO_EM_RST_PORT_STAT_RST_REQ, rstReq);
  13740. }
  13741. /** ============================================================================
  13742. * @n@b CSL_SRIO_GetEventMgmtResetRequestInterrupt
  13743. *
  13744. * @b Description
  13745. * @n The function is used to get the event management reset request interrupt
  13746. * enable status
  13747. *
  13748. * @b Arguments
  13749. @verbatim
  13750. hSrio Handle of the SRIO device
  13751. rstIntEn Per-port Reset Request event interrupt enable
  13752. @endverbatim
  13753. *
  13754. * <b> Return Value </b>
  13755. * @n None
  13756. *
  13757. * <b> Pre Condition </b>
  13758. * @n CSL_SRIO_Open() must be called
  13759. *
  13760. * <b> Post Condition </b>
  13761. * @n None
  13762. *
  13763. * @b Reads
  13764. * @n SRIO_RIO_EM_RST_INT_EN_RST_INT_EN
  13765. *
  13766. * @b Example
  13767. * @verbatim
  13768. CSL_SrioHandle hSrio;
  13769. Uint8 rstReq;
  13770. // Open the CSL SRIO Module 0
  13771. hSrio = CSL_SRIO_Open (0);
  13772. // Get the Event Management MECS Reset Request Status
  13773. CSL_SRIO_GetEventMgmtResetRequestInterrupt(hSrio, &rstReq);
  13774. ...
  13775. @endverbatim
  13776. * =============================================================================
  13777. */
  13778. static inline void CSL_SRIO_GetEventMgmtResetRequestInterrupt
  13779. (
  13780. CSL_SrioHandle hSrio,
  13781. Uint8* rstIntEn
  13782. )
  13783. {
  13784. *rstIntEn = CSL_FEXT (hSrio->RIO_EM_RST_INT_EN, SRIO_RIO_EM_RST_INT_EN_RST_INT_EN);
  13785. }
  13786. /** ============================================================================
  13787. * @n@b CSL_SRIO_SetEventMgmtResetRequestInterrupt
  13788. *
  13789. * @b Description
  13790. * @n The function is used to set the event management reset request interrupt
  13791. * enable status
  13792. *
  13793. * @b Arguments
  13794. @verbatim
  13795. hSrio Handle of the SRIO device
  13796. rstIntEn Per-port Reset Request event interrupt enable
  13797. @endverbatim
  13798. *
  13799. * <b> Return Value </b>
  13800. * @n None
  13801. *
  13802. * <b> Pre Condition </b>
  13803. * @n CSL_SRIO_Open() must be called
  13804. *
  13805. * <b> Post Condition </b>
  13806. * @n None
  13807. *
  13808. * @b Writes
  13809. * @n SRIO_RIO_EM_RST_INT_EN_RST_INT_EN
  13810. *
  13811. * @b Example
  13812. * @verbatim
  13813. CSL_SrioHandle hSrio;
  13814. // Open the CSL SRIO Module 0
  13815. hSrio = CSL_SRIO_Open (0);
  13816. // Set the Event Management Reset Request Interrupt Enable for all ports
  13817. CSL_SRIO_SetEventMgmtResetRequestInterrupt(hSrio, 0xF);
  13818. ...
  13819. @endverbatim
  13820. * =============================================================================
  13821. */
  13822. static inline void CSL_SRIO_SetEventMgmtResetRequestInterrupt
  13823. (
  13824. CSL_SrioHandle hSrio,
  13825. Uint8 rstIntEn
  13826. )
  13827. {
  13828. CSL_FINS (hSrio->RIO_EM_RST_INT_EN, SRIO_RIO_EM_RST_INT_EN_RST_INT_EN, rstIntEn);
  13829. }
  13830. /** ============================================================================
  13831. * @n@b CSL_SRIO_GetEventMgmtResetRequestPortWrite
  13832. *
  13833. * @b Description
  13834. * @n The function is used to get the event management reset request port write
  13835. * enable status
  13836. *
  13837. * @b Arguments
  13838. @verbatim
  13839. hSrio Handle of the SRIO device
  13840. rstPwEn Per-port Reset Request port-write enable
  13841. @endverbatim
  13842. *
  13843. * <b> Return Value </b>
  13844. * @n None
  13845. *
  13846. * <b> Pre Condition </b>
  13847. * @n CSL_SRIO_Open() must be called
  13848. *
  13849. * <b> Post Condition </b>
  13850. * @n None
  13851. *
  13852. * @b Reads
  13853. * @n SRIO_RIO_EM_RST_PW_EN_RST_PW_EN
  13854. *
  13855. * @b Example
  13856. * @verbatim
  13857. CSL_SrioHandle hSrio;
  13858. Uint8 rstReq;
  13859. // Open the CSL SRIO Module 0
  13860. hSrio = CSL_SRIO_Open (0);
  13861. // Get the Event Management MECS Reset Request Port Write Status
  13862. CSL_SRIO_GetEventMgmtResetRequestPortWrite(hSrio, &rstReq);
  13863. ...
  13864. @endverbatim
  13865. * =============================================================================
  13866. */
  13867. static inline void CSL_SRIO_GetEventMgmtResetRequestPortWrite
  13868. (
  13869. CSL_SrioHandle hSrio,
  13870. Uint8* rstPwEn
  13871. )
  13872. {
  13873. *rstPwEn = CSL_FEXT (hSrio->RIO_EM_RST_PW_EN, SRIO_RIO_EM_RST_PW_EN_RST_PW_EN);
  13874. }
  13875. /** ============================================================================
  13876. * @n@b CSL_SRIO_SetEventMgmtResetRequestPortWrite
  13877. *
  13878. * @b Description
  13879. * @n The function is used to set the event management reset request port write
  13880. * enable status
  13881. *
  13882. * @b Arguments
  13883. @verbatim
  13884. hSrio Handle of the SRIO device
  13885. rstPwEn Per-port Reset Request port-write enable
  13886. @endverbatim
  13887. *
  13888. * <b> Return Value </b>
  13889. * @n None
  13890. *
  13891. * <b> Pre Condition </b>
  13892. * @n CSL_SRIO_Open() must be called
  13893. *
  13894. * <b> Post Condition </b>
  13895. * @n None
  13896. *
  13897. * @b Writes
  13898. * @n SRIO_RIO_EM_RST_PW_EN_RST_PW_EN
  13899. *
  13900. * @b Example
  13901. * @verbatim
  13902. CSL_SrioHandle hSrio;
  13903. Uint8 rstReq;
  13904. // Open the CSL SRIO Module 0
  13905. hSrio = CSL_SRIO_Open (0);
  13906. // Set the Event Management MECS Reset Request Port Write Status to
  13907. // enable sending port write for reset request on all ports
  13908. CSL_SRIO_SetEventMgmtResetRequestPortWrite(hSrio, 0xF);
  13909. ...
  13910. @endverbatim
  13911. * =============================================================================
  13912. */
  13913. static inline void CSL_SRIO_SetEventMgmtResetRequestPortWrite
  13914. (
  13915. CSL_SrioHandle hSrio,
  13916. Uint8 rstPwEn
  13917. )
  13918. {
  13919. CSL_FINS (hSrio->RIO_EM_RST_PW_EN, SRIO_RIO_EM_RST_PW_EN_RST_PW_EN, rstPwEn);
  13920. }
  13921. /** ============================================================================
  13922. * @n@b CSL_SRIO_GetPortWriteControl
  13923. *
  13924. * @b Description
  13925. * @n The function is used to get the port write control information
  13926. *
  13927. * @b Arguments
  13928. @verbatim
  13929. hSrio Handle of the SRIO device
  13930. pwTimer Port Write Timer
  13931. pwcMode Port Write Capture Mode
  13932. @endverbatim
  13933. *
  13934. * <b> Return Value </b>
  13935. * @n None
  13936. *
  13937. * <b> Pre Condition </b>
  13938. * @n CSL_SRIO_Open() must be called
  13939. *
  13940. * <b> Post Condition </b>
  13941. * @n None
  13942. *
  13943. * @b Reads
  13944. * @n SRIO_RIO_PW_CTL_PW_TIMER, SRIO_RIO_PW_CTL_PWC_MODE
  13945. *
  13946. * @b Example
  13947. * @verbatim
  13948. CSL_SrioHandle hSrio;
  13949. Uint8 pwTimer;
  13950. Uint8 pwcMode;
  13951. // Open the CSL SRIO Module 0
  13952. hSrio = CSL_SRIO_Open (0);
  13953. // Get the Port Write Control
  13954. CSL_SRIO_GetPortWriteControl(hSrio, &pwTimer, &pwcMode);
  13955. ...
  13956. @endverbatim
  13957. * =============================================================================
  13958. */
  13959. static inline void CSL_SRIO_GetPortWriteControl
  13960. (
  13961. CSL_SrioHandle hSrio,
  13962. Uint8* pwTimer,
  13963. Uint8* pwcMode
  13964. )
  13965. {
  13966. *pwTimer = CSL_FEXT (hSrio->RIO_PW_CTL, SRIO_RIO_PW_CTL_PW_TIMER);
  13967. *pwcMode = CSL_FEXT (hSrio->RIO_PW_CTL, SRIO_RIO_PW_CTL_PWC_MODE);
  13968. }
  13969. /** ============================================================================
  13970. * @n@b CSL_SRIO_SetPortWriteControl
  13971. *
  13972. * @b Description
  13973. * @n The function is used to set the port write control information
  13974. *
  13975. * @b Arguments
  13976. @verbatim
  13977. hSrio Handle of the SRIO device
  13978. pwTimer Port Write Timer
  13979. pwcMode Port Write Capture Mode
  13980. @endverbatim
  13981. *
  13982. * <b> Return Value </b>
  13983. * @n None
  13984. *
  13985. * <b> Pre Condition </b>
  13986. * @n CSL_SRIO_Open() must be called
  13987. *
  13988. * <b> Post Condition </b>
  13989. * @n None
  13990. *
  13991. * @b Writes
  13992. * @n SRIO_RIO_PW_CTL_PW_TIMER, SRIO_RIO_PW_CTL_PWC_MODE
  13993. *
  13994. * @b Example
  13995. * @verbatim
  13996. CSL_SrioHandle hSrio;
  13997. // Open the CSL SRIO Module 0
  13998. hSrio = CSL_SRIO_Open (0);
  13999. // Set the Port Write Control to disable port write timer and to enable
  14000. // continuous port capture
  14001. CSL_SRIO_SetPortWriteControl(hSrio, 0, 0);
  14002. ...
  14003. @endverbatim
  14004. * =============================================================================
  14005. */
  14006. static inline void CSL_SRIO_SetPortWriteControl
  14007. (
  14008. CSL_SrioHandle hSrio,
  14009. Uint8 pwTimer,
  14010. Uint8 pwcMode
  14011. )
  14012. {
  14013. hSrio->RIO_PW_CTL =
  14014. CSL_FMK (SRIO_RIO_PW_CTL_PW_TIMER, pwTimer) |
  14015. CSL_FMK (SRIO_RIO_PW_CTL_PWC_MODE, pwcMode);
  14016. }
  14017. /** ============================================================================
  14018. * @n@b CSL_SRIO_GetPortWriteRouting
  14019. *
  14020. * @b Description
  14021. * @n The function is used to get the port write routing
  14022. *
  14023. * @b Arguments
  14024. @verbatim
  14025. hSrio Handle of the SRIO device
  14026. port Indicates if a port-write should be sent to this port.
  14027. @endverbatim
  14028. *
  14029. * <b> Return Value </b>
  14030. * @n None
  14031. *
  14032. * <b> Pre Condition </b>
  14033. * @n CSL_SRIO_Open() must be called
  14034. *
  14035. * <b> Post Condition </b>
  14036. * @n None
  14037. *
  14038. * @b Reads
  14039. * @n SRIO_RIO_PW_ROUTE_PORT
  14040. *
  14041. * @b Example
  14042. * @verbatim
  14043. CSL_SrioHandle hSrio;
  14044. Uint8 port;
  14045. // Open the CSL SRIO Module 0
  14046. hSrio = CSL_SRIO_Open (0);
  14047. // Get the Port Write Control
  14048. CSL_SRIO_GetPortWriteRouting(hSrio, &port);
  14049. ...
  14050. @endverbatim
  14051. * =============================================================================
  14052. */
  14053. static inline void CSL_SRIO_GetPortWriteRouting
  14054. (
  14055. CSL_SrioHandle hSrio,
  14056. Uint8* port
  14057. )
  14058. {
  14059. *port = CSL_FEXT (hSrio->RIO_PW_ROUTE, SRIO_RIO_PW_ROUTE_PORT);
  14060. }
  14061. /** ============================================================================
  14062. * @n@b CSL_SRIO_SetPortWriteRouting
  14063. *
  14064. * @b Description
  14065. * @n The function is used to set the port write routing
  14066. *
  14067. * @b Arguments
  14068. @verbatim
  14069. hSrio Handle of the SRIO device
  14070. port Indicates if a port-write should be sent to this port.
  14071. @endverbatim
  14072. *
  14073. * <b> Return Value </b>
  14074. * @n None
  14075. *
  14076. * <b> Pre Condition </b>
  14077. * @n CSL_SRIO_Open() must be called
  14078. *
  14079. * <b> Post Condition </b>
  14080. * @n None
  14081. *
  14082. * @b Writes
  14083. * @n SRIO_RIO_PW_ROUTE_PORT
  14084. *
  14085. * @b Example
  14086. * @verbatim
  14087. CSL_SrioHandle hSrio;
  14088. Uint8 port;
  14089. // Open the CSL SRIO Module 0
  14090. hSrio = CSL_SRIO_Open (0);
  14091. // Set the Port Write Routing to ensure port writes are sent on all ports
  14092. CSL_SRIO_SetPortWriteRouting(hSrio, 0xF);
  14093. ...
  14094. @endverbatim
  14095. * =============================================================================
  14096. */
  14097. static inline void CSL_SRIO_SetPortWriteRouting
  14098. (
  14099. CSL_SrioHandle hSrio,
  14100. Uint8 port
  14101. )
  14102. {
  14103. CSL_FINS (hSrio->RIO_PW_ROUTE, SRIO_RIO_PW_ROUTE_PORT, port);
  14104. }
  14105. /** ============================================================================
  14106. * @n@b CSL_SRIO_GetPortWriteReceptionStatus
  14107. *
  14108. * @b Description
  14109. * @n The function is used to get the port write reception status
  14110. *
  14111. * @b Arguments
  14112. @verbatim
  14113. hSrio Handle of the SRIO device
  14114. wrSize WRSIZE, in combination with WDPTR, are used to
  14115. determine the maximum size of the port-write which has
  14116. been received
  14117. wdPtr WDPTR, in combination with WRSIZE, are used to
  14118. determine the maximum size of the port-write which has
  14119. been received
  14120. pwDisc Port-write was discarded
  14121. pwVal Port-write data registers contain valid data
  14122. @endverbatim
  14123. *
  14124. * <b> Return Value </b>
  14125. * @n None
  14126. *
  14127. * <b> Pre Condition </b>
  14128. * @n CSL_SRIO_Open() must be called
  14129. *
  14130. * <b> Post Condition </b>
  14131. * @n None
  14132. *
  14133. * @b Reads
  14134. * @n SRIO_RIO_PW_RX_STAT_WR_SIZE, SRIO_RIO_PW_RX_STAT_WDPTR,
  14135. * @n SRIO_RIO_PW_RX_STAT_PW_DISC, SRIO_RIO_PW_RX_STAT_PW_VAL,
  14136. *
  14137. * @b Example
  14138. * @verbatim
  14139. CSL_SrioHandle hSrio;
  14140. Uint8 wrSize;
  14141. Uint8 wdPtr;
  14142. Uint8 pwDisc;
  14143. Uint8 pwVal;
  14144. // Open the CSL SRIO Module 0
  14145. hSrio = CSL_SRIO_Open (0);
  14146. // Get the Port Write Reception Status
  14147. CSL_SRIO_GetPortWriteReceptionStatus(hSrio, &wrSize, &wdPtr, &pwDisc, &pwVal);
  14148. ...
  14149. @endverbatim
  14150. * =============================================================================
  14151. */
  14152. static inline void CSL_SRIO_GetPortWriteReceptionStatus
  14153. (
  14154. CSL_SrioHandle hSrio,
  14155. Uint8* wrSize,
  14156. Uint8* wdPtr,
  14157. Uint8* pwDisc,
  14158. Uint8* pwVal
  14159. )
  14160. {
  14161. Uint32 value = hSrio->RIO_PW_RX_STAT;
  14162. *wrSize = CSL_FEXT (value, SRIO_RIO_PW_RX_STAT_WR_SIZE);
  14163. *wdPtr = CSL_FEXT (value, SRIO_RIO_PW_RX_STAT_WDPTR);
  14164. *pwDisc = CSL_FEXT (value, SRIO_RIO_PW_RX_STAT_PW_DISC);
  14165. *pwVal = CSL_FEXT (value, SRIO_RIO_PW_RX_STAT_PW_VAL);
  14166. }
  14167. /** ============================================================================
  14168. * @n@b CSL_SRIO_GetPortWriteEventGenerate
  14169. *
  14170. * @b Description
  14171. * @n The function is used to get the port write reception status
  14172. *
  14173. * @b Arguments
  14174. @verbatim
  14175. hSrio Handle of the SRIO device
  14176. pwDisc Port-write discard event generate status
  14177. pwVal Port-write data event generate status
  14178. @endverbatim
  14179. *
  14180. * <b> Return Value </b>
  14181. * @n None
  14182. *
  14183. * <b> Pre Condition </b>
  14184. * @n CSL_SRIO_Open() must be called
  14185. *
  14186. * <b> Post Condition </b>
  14187. * @n None
  14188. *
  14189. * @b Reads
  14190. * @n SRIO_RIO_PW_RX_EVENT_GEN_PW_DISC, SRIO_RIO_PW_RX_EVENT_GEN_PW_VAL
  14191. *
  14192. * @b Example
  14193. * @verbatim
  14194. CSL_SrioHandle hSrio;
  14195. Uint8 pwDisc;
  14196. Uint8 pwVal;
  14197. // Open the CSL SRIO Module 0
  14198. hSrio = CSL_SRIO_Open (0);
  14199. // Get the Port Write Event Generate Status
  14200. CSL_SRIO_GetPortWriteEventGenerate(hSrio, &pwDisc, &pwVal);
  14201. ...
  14202. @endverbatim
  14203. * =============================================================================
  14204. */
  14205. static inline void CSL_SRIO_GetPortWriteEventGenerate
  14206. (
  14207. CSL_SrioHandle hSrio,
  14208. Uint8* pwDisc,
  14209. Uint8* pwVal
  14210. )
  14211. {
  14212. Uint32 value = hSrio->RIO_PW_RX_EVENT_GEN;
  14213. *pwDisc = CSL_FEXT (value, SRIO_RIO_PW_RX_EVENT_GEN_PW_DISC);
  14214. *pwVal = CSL_FEXT (value, SRIO_RIO_PW_RX_EVENT_GEN_PW_VAL);
  14215. }
  14216. /** ============================================================================
  14217. * @n@b CSL_SRIO_SetPortWriteEventGenerate
  14218. *
  14219. * @b Description
  14220. * @n The function is used to set the port write reception status
  14221. *
  14222. * @b Arguments
  14223. @verbatim
  14224. hSrio Handle of the SRIO device
  14225. pwDisc Port-write discard event generate status
  14226. pwVal Port-write data event generate status
  14227. @endverbatim
  14228. *
  14229. * <b> Return Value </b>
  14230. * @n None
  14231. *
  14232. * <b> Pre Condition </b>
  14233. * @n CSL_SRIO_Open() must be called
  14234. *
  14235. * <b> Post Condition </b>
  14236. * @n None
  14237. *
  14238. * @b Writes
  14239. * @n SRIO_RIO_PW_RX_EVENT_GEN_PW_DISC, SRIO_RIO_PW_RX_EVENT_GEN_PW_VAL
  14240. *
  14241. * @b Affects
  14242. * @n SRIO_RIO_PW_RX_STAT_PW_DISC=1, SRIO_RIO_PW_RX_STAT_PW_VAL=1
  14243. *
  14244. * @b Example
  14245. * @verbatim
  14246. CSL_SrioHandle hSrio;
  14247. // Open the CSL SRIO Module 0
  14248. hSrio = CSL_SRIO_Open (0);
  14249. // Set the Port Write Event Generate Status
  14250. CSL_SRIO_SetPortWriteEventGenerate(hSrio, 1, 1);
  14251. ...
  14252. @endverbatim
  14253. * =============================================================================
  14254. */
  14255. static inline void CSL_SRIO_SetPortWriteEventGenerate
  14256. (
  14257. CSL_SrioHandle hSrio,
  14258. Uint8 pwDisc,
  14259. Uint8 pwVal
  14260. )
  14261. {
  14262. hSrio->RIO_PW_RX_EVENT_GEN = CSL_FMK(SRIO_RIO_PW_RX_EVENT_GEN_PW_DISC, pwDisc) |
  14263. CSL_FMK(SRIO_RIO_PW_RX_EVENT_GEN_PW_VAL, pwVal);
  14264. }
  14265. /** ============================================================================
  14266. * @n@b CSL_SRIO_GetPortWriteReceptionCapture
  14267. *
  14268. * @b Description
  14269. * @n The function is used to get the port write reception capture
  14270. *
  14271. * @b Arguments
  14272. @verbatim
  14273. hSrio Handle of the SRIO device
  14274. cap0 Reception Capture 0
  14275. cap1 Reception Capture 1
  14276. cap2 Reception Capture 2
  14277. cap3 Reception Capture 3
  14278. @endverbatim
  14279. *
  14280. * <b> Return Value </b>
  14281. * @n None
  14282. *
  14283. * <b> Pre Condition </b>
  14284. * @n CSL_SRIO_Open() must be called
  14285. *
  14286. * <b> Post Condition </b>
  14287. * @n None
  14288. *
  14289. * @b Reads
  14290. * @n SRIO_RIO_PW_RX_CAPT
  14291. *
  14292. * @b Example
  14293. * @verbatim
  14294. CSL_SrioHandle hSrio;
  14295. Uint32 cap0;
  14296. Uint32 cap1;
  14297. Uint32 cap2;
  14298. Uint32 cap3;
  14299. // Open the CSL SRIO Module 0
  14300. hSrio = CSL_SRIO_Open (0);
  14301. // Get the Port Write Reception Capture
  14302. CSL_SRIO_GetPortWriteReceptionCapture(hSrio, &cap0, &cap1, &cap2, &cap3);
  14303. ...
  14304. @endverbatim
  14305. * =============================================================================
  14306. */
  14307. static inline void CSL_SRIO_GetPortWriteReceptionCapture
  14308. (
  14309. CSL_SrioHandle hSrio,
  14310. Uint32* cap0,
  14311. Uint32* cap1,
  14312. Uint32* cap2,
  14313. Uint32* cap3
  14314. )
  14315. {
  14316. *cap0 = hSrio->RIO_PW_RX_CAPT[0];
  14317. *cap1 = hSrio->RIO_PW_RX_CAPT[1];
  14318. *cap2 = hSrio->RIO_PW_RX_CAPT[2];
  14319. *cap3 = hSrio->RIO_PW_RX_CAPT[3];
  14320. }
  14321. /** ============================================================================
  14322. * @n@b CSL_SRIO_SetPortWriteReceptionCapture
  14323. *
  14324. * @b Description
  14325. * @n The function is used to set the port write reception capture
  14326. *
  14327. * @b Arguments
  14328. @verbatim
  14329. hSrio Handle of the SRIO device
  14330. port Port number for which the write reception capture needs
  14331. to be configured.
  14332. cap Reception Capture value
  14333. @endverbatim
  14334. *
  14335. * <b> Return Value </b>
  14336. * @n None
  14337. *
  14338. * <b> Pre Condition </b>
  14339. * @n CSL_SRIO_Open() must be called
  14340. *
  14341. * <b> Post Condition </b>
  14342. * @n None
  14343. *
  14344. * @b Affects
  14345. * @n SRIO_RIO_PW_RX_CAPT=0
  14346. *
  14347. * @b Example
  14348. * @verbatim
  14349. CSL_SrioHandle hSrio;
  14350. Uint32 cap0;
  14351. Uint32 cap1;
  14352. Uint32 cap2;
  14353. Uint32 cap3;
  14354. // Open the CSL SRIO Module 0
  14355. hSrio = CSL_SRIO_Open (0);
  14356. // Get the Port Write Reception Capture
  14357. CSL_SRIO_GetPortWriteReceptionCapture(hSrio, &cap0, &cap1, &cap2, &cap3);
  14358. ...
  14359. // Set the Port Write Reception Capture for port 0
  14360. CSL_SRIO_SetPortWriteReceptionCapture(hSrio, 0, cap0);
  14361. ...
  14362. @endverbatim
  14363. * =============================================================================
  14364. */
  14365. static inline void CSL_SRIO_SetPortWriteReceptionCapture
  14366. (
  14367. CSL_SrioHandle hSrio,
  14368. Uint8 port,
  14369. Uint32 cap
  14370. )
  14371. {
  14372. CSL_FINS (hSrio->RIO_PW_RX_CAPT[port], SRIO_RIO_PW_RX_CAPT_PW_CAPT, cap);
  14373. }
  14374. /** ============================================================================
  14375. * @n@b CSL_SRIO_GetPortNumberInfo
  14376. *
  14377. * @b Description
  14378. * @n The function is used to get the port number information
  14379. *
  14380. * @b Arguments
  14381. @verbatim
  14382. hSrio Handle of the SRIO device
  14383. portNum Port Number
  14384. totalPort Total number of ports
  14385. @endverbatim
  14386. *
  14387. * <b> Return Value </b>
  14388. * @n None
  14389. *
  14390. * <b> Pre Condition </b>
  14391. * @n CSL_SRIO_Open() must be called
  14392. *
  14393. * <b> Post Condition </b>
  14394. * @n None
  14395. *
  14396. * @b Reads
  14397. * @n SRIO_RIO_PORT_NUMBER_PORT_NUM,SRIO_RIO_PORT_NUMBER_PORT_TOTAL
  14398. *
  14399. * @b Example
  14400. * @verbatim
  14401. CSL_SrioHandle hSrio;
  14402. Uint8 portNum;
  14403. Uint8 totalPort;
  14404. // Open the CSL SRIO Module 0
  14405. hSrio = CSL_SRIO_Open (0);
  14406. // Get the Port Information
  14407. CSL_SRIO_GetPortNumberInfo(hSrio, &portNum, &totalPort);
  14408. ...
  14409. @endverbatim
  14410. * =============================================================================
  14411. */
  14412. static inline void CSL_SRIO_GetPortNumberInfo
  14413. (
  14414. CSL_SrioHandle hSrio,
  14415. Uint8* portNum,
  14416. Uint8* totalPort
  14417. )
  14418. {
  14419. Uint32 value = hSrio->RIO_PORT_NUMBER;
  14420. *portNum = CSL_FEXT(value, SRIO_RIO_PORT_NUMBER_PORT_NUM);
  14421. *totalPort = CSL_FEXT(value, SRIO_RIO_PORT_NUMBER_PORT_TOTAL);
  14422. }
  14423. /** ============================================================================
  14424. * @n@b CSL_SRIO_GetLLMPortIPPrescalar
  14425. *
  14426. * @b Description
  14427. * @n The function is used to get the LLM Port IP Prescalar
  14428. *
  14429. * @b Arguments
  14430. @verbatim
  14431. hSrio Handle of the SRIO device
  14432. prescalarClock Prescalar clock
  14433. @endverbatim
  14434. *
  14435. * <b> Return Value </b>
  14436. * @n None
  14437. *
  14438. * <b> Pre Condition </b>
  14439. * @n CSL_SRIO_Open() must be called
  14440. *
  14441. * <b> Post Condition </b>
  14442. * @n None
  14443. *
  14444. * @b Reads
  14445. * @n SRIO_RIO_PRESCALAR_SRV_CLK_PRESCALAR_SRV_CLK
  14446. *
  14447. * @b Example
  14448. * @verbatim
  14449. CSL_SrioHandle hSrio;
  14450. Uint8 prescalarClock;
  14451. // Open the CSL SRIO Module 0
  14452. hSrio = CSL_SRIO_Open (0);
  14453. // Get the LLM Port IP Prescalar Clock.
  14454. CSL_SRIO_GetLLMPortIPPrescalar(hSrio, &prescalarClock);
  14455. ...
  14456. @endverbatim
  14457. * =============================================================================
  14458. */
  14459. static inline void CSL_SRIO_GetLLMPortIPPrescalar
  14460. (
  14461. CSL_SrioHandle hSrio,
  14462. Uint8* prescalarClock
  14463. )
  14464. {
  14465. *prescalarClock = CSL_FEXT (hSrio->RIO_PRESCALAR_SRV_CLK, SRIO_RIO_PRESCALAR_SRV_CLK_PRESCALAR_SRV_CLK);
  14466. }
  14467. /** ============================================================================
  14468. * @n@b CSL_SRIO_SetLLMPortIPPrescalar
  14469. *
  14470. * @b Description
  14471. * @n The function is used to set the LLM Port IP Prescalar
  14472. *
  14473. * @b Arguments
  14474. @verbatim
  14475. hSrio Handle of the SRIO device
  14476. prescalarClock Prescalar clock
  14477. @endverbatim
  14478. *
  14479. * <b> Return Value </b>
  14480. * @n None
  14481. *
  14482. * <b> Pre Condition </b>
  14483. * @n CSL_SRIO_Open() must be called
  14484. *
  14485. * <b> Post Condition </b>
  14486. * @n None
  14487. *
  14488. * @b Writes
  14489. * @n SRIO_RIO_PRESCALAR_SRV_CLK_PRESCALAR_SRV_CLK
  14490. *
  14491. * @b Example
  14492. * @verbatim
  14493. CSL_SrioHandle hSrio;
  14494. Uint8 prescalarClock;
  14495. // Open the CSL SRIO Module 0
  14496. hSrio = CSL_SRIO_Open (0);
  14497. // Set the LLM Port IP Prescalar Clock to the default value
  14498. CSL_SRIO_SetLLMPortIPPrescalar(hSrio, 31);
  14499. ...
  14500. @endverbatim
  14501. * =============================================================================
  14502. */
  14503. static inline void CSL_SRIO_SetLLMPortIPPrescalar
  14504. (
  14505. CSL_SrioHandle hSrio,
  14506. Uint8 prescalarClock
  14507. )
  14508. {
  14509. CSL_FINS (hSrio->RIO_PRESCALAR_SRV_CLK, SRIO_RIO_PRESCALAR_SRV_CLK_PRESCALAR_SRV_CLK, prescalarClock);
  14510. }
  14511. /** ============================================================================
  14512. * @n@b CSL_SRIO_GetLLMResetControl
  14513. *
  14514. * @b Description
  14515. * @n The function is used to get the LLM Reset Control CSR
  14516. *
  14517. * @b Arguments
  14518. @verbatim
  14519. hSrio Handle of the SRIO device
  14520. clearSticky Allows the SELF_RST and PWDN_PORT resets to
  14521. clear sticky register bits in addition to the
  14522. normal configuration registers
  14523. @endverbatim
  14524. *
  14525. * <b> Return Value </b>
  14526. * @n None
  14527. *
  14528. * <b> Pre Condition </b>
  14529. * @n CSL_SRIO_Open() must be called
  14530. *
  14531. * <b> Post Condition </b>
  14532. * @n None
  14533. *
  14534. * @b Reads
  14535. * @n SRIO_RIO_REG_RST_CTL_CLEAR_STICKY
  14536. *
  14537. * @b Example
  14538. * @verbatim
  14539. CSL_SrioHandle hSrio;
  14540. Uint8 clearSticky;
  14541. // Open the CSL SRIO Module 0
  14542. hSrio = CSL_SRIO_Open (0);
  14543. // Get the LLM Port Reset Control CSR
  14544. CSL_SRIO_GetLLMResetControl(hSrio, &clearSticky);
  14545. ...
  14546. @endverbatim
  14547. * =============================================================================
  14548. */
  14549. static inline void CSL_SRIO_GetLLMResetControl
  14550. (
  14551. CSL_SrioHandle hSrio,
  14552. Uint8* clearSticky
  14553. )
  14554. {
  14555. *clearSticky = CSL_FEXT (hSrio->RIO_REG_RST_CTL, SRIO_RIO_REG_RST_CTL_CLEAR_STICKY);
  14556. }
  14557. /** ============================================================================
  14558. * @n@b CSL_SRIO_SetLLMResetControl
  14559. *
  14560. * @b Description
  14561. * @n The function is used to set the LLM Reset Control CSR
  14562. *
  14563. * @b Arguments
  14564. @verbatim
  14565. hSrio Handle of the SRIO device
  14566. clearSticky Allows the SELF_RST and PWDN_PORT resets to
  14567. clear sticky register bits in addition to the
  14568. normal configuration registers
  14569. @endverbatim
  14570. *
  14571. * <b> Return Value </b>
  14572. * @n None
  14573. *
  14574. * <b> Pre Condition </b>
  14575. * @n CSL_SRIO_Open() must be called
  14576. *
  14577. * <b> Post Condition </b>
  14578. * @n None
  14579. *
  14580. * @b Writes
  14581. * @n SRIO_RIO_REG_RST_CTL_CLEAR_STICKY
  14582. *
  14583. * @b Example
  14584. * @verbatim
  14585. CSL_SrioHandle hSrio;
  14586. // Open the CSL SRIO Module 0
  14587. hSrio = CSL_SRIO_Open (0);
  14588. // Set the LLM Port Reset Control CSR
  14589. CSL_SRIO_SetLLMResetControl(hSrio, 1);
  14590. ...
  14591. @endverbatim
  14592. * =============================================================================
  14593. */
  14594. static inline void CSL_SRIO_SetLLMResetControl
  14595. (
  14596. CSL_SrioHandle hSrio,
  14597. Uint8 clearSticky
  14598. )
  14599. {
  14600. CSL_FINS (hSrio->RIO_REG_RST_CTL, SRIO_RIO_REG_RST_CTL_CLEAR_STICKY, clearSticky);
  14601. }
  14602. /** ============================================================================
  14603. * @n@b CSL_SRIO_GetErrorDetect
  14604. *
  14605. * @b Description
  14606. * @n The function is used to get the error detect CSR
  14607. *
  14608. * @b Arguments
  14609. @verbatim
  14610. hSrio Handle of the SRIO device
  14611. illID Illegal transaction target error
  14612. illType Unsupported Transaction
  14613. @endverbatim
  14614. *
  14615. * <b> Return Value </b>
  14616. * @n None
  14617. *
  14618. * <b> Pre Condition </b>
  14619. * @n CSL_SRIO_Open() must be called
  14620. *
  14621. * <b> Post Condition </b>
  14622. * @n None
  14623. *
  14624. * @b Reads
  14625. * @n SRIO_RIO_LOCAL_ERR_DET_ILL_ID, SRIO_RIO_LOCAL_ERR_DET_ILL_TYPE
  14626. *
  14627. * @b Example
  14628. * @verbatim
  14629. CSL_SrioHandle hSrio;
  14630. Uint8 illID;
  14631. Uint8 illType;
  14632. // Open the CSL SRIO Module 0
  14633. hSrio = CSL_SRIO_Open (0);
  14634. // Get the Error Detect CSR Information
  14635. CSL_SRIO_GetErrorDetect(hSrio, &illID, &illType);
  14636. ...
  14637. @endverbatim
  14638. * =============================================================================
  14639. */
  14640. static inline void CSL_SRIO_GetErrorDetect
  14641. (
  14642. CSL_SrioHandle hSrio,
  14643. Uint8* illID,
  14644. Uint8* illType
  14645. )
  14646. {
  14647. Uint32 value = hSrio->RIO_LOCAL_ERR_DET;
  14648. *illID = CSL_FEXT (value, SRIO_RIO_LOCAL_ERR_DET_ILL_ID);
  14649. *illType = CSL_FEXT (value, SRIO_RIO_LOCAL_ERR_DET_ILL_TYPE);
  14650. }
  14651. /** ============================================================================
  14652. * @n@b CSL_SRIO_SetErrorDetect
  14653. *
  14654. * @b Description
  14655. * @n The function is used to set the error detect CSR.
  14656. *
  14657. * @b Arguments
  14658. @verbatim
  14659. hSrio Handle of the SRIO device
  14660. illID Illegal transaction target error
  14661. illType Unsupported Transaction
  14662. @endverbatim
  14663. *
  14664. * <b> Return Value </b>
  14665. * @n None
  14666. *
  14667. * <b> Pre Condition </b>
  14668. * @n CSL_SRIO_Open() must be called
  14669. *
  14670. * <b> Post Condition </b>
  14671. * @n None
  14672. *
  14673. * @b Writes
  14674. * @n SRIO_RIO_LOCAL_ERR_DET_ILL_ID, SRIO_RIO_LOCAL_ERR_DET_ILL_TYPE
  14675. *
  14676. * @b Example
  14677. * @verbatim
  14678. CSL_SrioHandle hSrio;
  14679. // Open the CSL SRIO Module 0
  14680. hSrio = CSL_SRIO_Open (0);
  14681. // Set the Error Detect CSR Information for illegal type
  14682. CSL_SRIO_SetErrorDetect(hSrio, 0, 1);
  14683. ...
  14684. @endverbatim
  14685. * =============================================================================
  14686. */
  14687. static inline void CSL_SRIO_SetErrorDetect
  14688. (
  14689. CSL_SrioHandle hSrio,
  14690. Uint8 illID,
  14691. Uint8 illType
  14692. )
  14693. {
  14694. hSrio->RIO_LOCAL_ERR_DET =
  14695. CSL_FMK (SRIO_RIO_LOCAL_ERR_DET_ILL_ID, illID) |
  14696. CSL_FMK (SRIO_RIO_LOCAL_ERR_DET_ILL_TYPE, illType);
  14697. }
  14698. /** ============================================================================
  14699. * @n@b CSL_SRIO_GetErrorDetectEnable
  14700. *
  14701. * @b Description
  14702. * @n The function is used to get the error detect enable CSR
  14703. *
  14704. * @b Arguments
  14705. @verbatim
  14706. hSrio Handle of the SRIO device
  14707. illID Illegal transaction target error
  14708. illType Unsupported Transaction
  14709. @endverbatim
  14710. *
  14711. * <b> Return Value </b>
  14712. * @n None
  14713. *
  14714. * <b> Pre Condition </b>
  14715. * @n CSL_SRIO_Open() must be called
  14716. *
  14717. * <b> Post Condition </b>
  14718. * @n None
  14719. *
  14720. * @b Reads
  14721. * @n SRIO_RIO_LOCAL_ERR_EN_ILL_ID_EN, SRIO_RIO_LOCAL_ERR_EN_ILL_TYPE_EN
  14722. *
  14723. * @b Example
  14724. * @verbatim
  14725. CSL_SrioHandle hSrio;
  14726. Uint8 illID;
  14727. Uint8 illType;
  14728. // Open the CSL SRIO Module 0
  14729. hSrio = CSL_SRIO_Open (0);
  14730. // Get the Error Detect Enable CSR Information
  14731. CSL_SRIO_GetErrorDetectEnable(hSrio, &illID, &illType);
  14732. ...
  14733. @endverbatim
  14734. * =============================================================================
  14735. */
  14736. static inline void CSL_SRIO_GetErrorDetectEnable
  14737. (
  14738. CSL_SrioHandle hSrio,
  14739. Uint8* illID,
  14740. Uint8* illType
  14741. )
  14742. {
  14743. Uint32 value = hSrio->RIO_LOCAL_ERR_EN;
  14744. *illID = CSL_FEXT (value, SRIO_RIO_LOCAL_ERR_EN_ILL_ID_EN);
  14745. *illType = CSL_FEXT (value, SRIO_RIO_LOCAL_ERR_EN_ILL_TYPE_EN);
  14746. }
  14747. /** ============================================================================
  14748. * @n@b CSL_SRIO_SetErrorDetectEnable
  14749. *
  14750. * @b Description
  14751. * @n The function is used to set the error detect enable CSR
  14752. *
  14753. * @b Arguments
  14754. @verbatim
  14755. hSrio Handle of the SRIO device
  14756. illID Illegal transaction target error
  14757. illType Unsupported Transaction
  14758. @endverbatim
  14759. *
  14760. * <b> Return Value </b>
  14761. * @n None
  14762. *
  14763. * <b> Pre Condition </b>
  14764. * @n CSL_SRIO_Open() must be called
  14765. *
  14766. * <b> Post Condition </b>
  14767. * @n None
  14768. *
  14769. * @b Writes
  14770. * @n SRIO_RIO_LOCAL_ERR_EN_ILL_ID_EN, SRIO_RIO_LOCAL_ERR_EN_ILL_TYPE_EN
  14771. *
  14772. * @b Example
  14773. * @verbatim
  14774. CSL_SrioHandle hSrio;
  14775. // Open the CSL SRIO Module 0
  14776. hSrio = CSL_SRIO_Open (0);
  14777. // Set the Error Detect Enable CSR Information for both illegal id and type
  14778. CSL_SRIO_SetErrorDetectEnable(hSrio, 1, 1);
  14779. ...
  14780. @endverbatim
  14781. * =============================================================================
  14782. */
  14783. static inline void CSL_SRIO_SetErrorDetectEnable
  14784. (
  14785. CSL_SrioHandle hSrio,
  14786. Uint8 illID,
  14787. Uint8 illType
  14788. )
  14789. {
  14790. hSrio->RIO_LOCAL_ERR_EN =
  14791. CSL_FMK (SRIO_RIO_LOCAL_ERR_EN_ILL_ID_EN, illID) |
  14792. CSL_FMK (SRIO_RIO_LOCAL_ERR_EN_ILL_TYPE_EN, illType);
  14793. }
  14794. /** ============================================================================
  14795. * @n@b CSL_SRIO_GetHiAddressCapture
  14796. *
  14797. * @b Description
  14798. * @n The function is used to get the High Address capture CSR information.
  14799. * The contents of this register are only valid when the device is using
  14800. * 50- or 66-bit addressing
  14801. *
  14802. * @b Arguments
  14803. @verbatim
  14804. hSrio Handle of the SRIO device
  14805. address Address Capture information
  14806. @endverbatim
  14807. *
  14808. * <b> Return Value </b>
  14809. * @n None
  14810. *
  14811. * <b> Pre Condition </b>
  14812. * @n CSL_SRIO_Open() must be called
  14813. *
  14814. * <b> Post Condition </b>
  14815. * @n None
  14816. *
  14817. * @b Reads
  14818. * @n SRIO_RIO_LOCAL_H_ADDR_CAPT
  14819. *
  14820. * @b Example
  14821. * @verbatim
  14822. CSL_SrioHandle hSrio;
  14823. Uint32 address;
  14824. // Open the CSL SRIO Module 0
  14825. hSrio = CSL_SRIO_Open (0);
  14826. // Get the Address Capture Information
  14827. CSL_SRIO_GetHiAddressCapture(hSrio, &address);
  14828. ...
  14829. @endverbatim
  14830. * =============================================================================
  14831. */
  14832. static inline void CSL_SRIO_GetHiAddressCapture
  14833. (
  14834. CSL_SrioHandle hSrio,
  14835. Uint32* address
  14836. )
  14837. {
  14838. *address = hSrio->RIO_LOCAL_H_ADDR_CAPT;
  14839. }
  14840. /** ============================================================================
  14841. * @n@b CSL_SRIO_GetLoAddressCapture
  14842. *
  14843. * @b Description
  14844. * @n The function is used to get the Low Address capture CSR information.
  14845. *
  14846. * @b Arguments
  14847. @verbatim
  14848. hSrio Handle of the SRIO device
  14849. address Address Capture information
  14850. xambs Extended address bits of the address associated
  14851. with the error
  14852. @endverbatim
  14853. *
  14854. * <b> Return Value </b>
  14855. * @n None
  14856. *
  14857. * <b> Pre Condition </b>
  14858. * @n CSL_SRIO_Open() must be called
  14859. *
  14860. * <b> Post Condition </b>
  14861. * @n None
  14862. *
  14863. * @b Reads
  14864. * @n SRIO_RIO_LOCAL_ADDR_CAPT_ADDR, SRIO_RIO_LOCAL_ADDR_CAPT_XAMSBS
  14865. *
  14866. * @b Example
  14867. * @verbatim
  14868. CSL_SrioHandle hSrio;
  14869. Uint32 address;
  14870. Uint8 xambs;
  14871. // Open the CSL SRIO Module 0
  14872. hSrio = CSL_SRIO_Open (0);
  14873. // Get the Address Capture Information
  14874. CSL_SRIO_GetLoAddressCapture(hSrio, &address, &xambs);
  14875. ...
  14876. @endverbatim
  14877. * =============================================================================
  14878. */
  14879. static inline void CSL_SRIO_GetLoAddressCapture
  14880. (
  14881. CSL_SrioHandle hSrio,
  14882. Uint32* address,
  14883. Uint8* xambs
  14884. )
  14885. {
  14886. Uint32 value = hSrio->RIO_LOCAL_ADDR_CAPT;
  14887. *address = CSL_FEXT (value, SRIO_RIO_LOCAL_ADDR_CAPT_ADDR);
  14888. *xambs = CSL_FEXT (value, SRIO_RIO_LOCAL_ADDR_CAPT_XAMSBS);
  14889. }
  14890. /** ============================================================================
  14891. * @n@b CSL_SRIO_ClearLoAddressCapture
  14892. *
  14893. * @b Description
  14894. * @n The function is used to clear the Low Address capture CSR information.
  14895. *
  14896. * @b Arguments
  14897. @verbatim
  14898. hSrio Handle of the SRIO device
  14899. @endverbatim
  14900. *
  14901. * <b> Return Value </b>
  14902. * @n None
  14903. *
  14904. * <b> Pre Condition </b>
  14905. * @n CSL_SRIO_Open() must be called
  14906. *
  14907. * <b> Post Condition </b>
  14908. * @n None
  14909. *
  14910. * @b Writes
  14911. * @n SRIO_RIO_LOCAL_ADDR_CAPT=0
  14912. *
  14913. * @b Example
  14914. * @verbatim
  14915. CSL_SrioHandle hSrio;
  14916. Uint32 address;
  14917. Uint8 xambs;
  14918. // Open the CSL SRIO Module 0
  14919. hSrio = CSL_SRIO_Open (0);
  14920. // Get the Address Capture Information
  14921. CSL_SRIO_GetLoAddressCapture(hSrio, &address, &xambs);
  14922. ...
  14923. // Clear the Address capture information
  14924. CSL_SRIO_ClearLoAddressCapture(hSrio);
  14925. ...
  14926. @endverbatim
  14927. * =============================================================================
  14928. */
  14929. static inline void CSL_SRIO_ClearLoAddressCapture
  14930. (
  14931. CSL_SrioHandle hSrio
  14932. )
  14933. {
  14934. hSrio->RIO_LOCAL_ADDR_CAPT = 0;
  14935. }
  14936. /** ============================================================================
  14937. * @n@b CSL_SRIO_GetDeviceIDCapture
  14938. *
  14939. * @b Description
  14940. * @n The function is used to get the Device ID capture CSR information.
  14941. *
  14942. * @b Arguments
  14943. @verbatim
  14944. hSrio Handle of the SRIO device
  14945. msbDstID MSB Destination ID
  14946. lsbDstID LSB Destination ID
  14947. msbSrcID MSB Source ID
  14948. lsbSrcID LSB Source ID
  14949. @endverbatim
  14950. *
  14951. * <b> Return Value </b>
  14952. * @n None
  14953. *
  14954. * <b> Pre Condition </b>
  14955. * @n CSL_SRIO_Open() must be called
  14956. *
  14957. * <b> Post Condition </b>
  14958. * @n None
  14959. *
  14960. * @b Reads
  14961. * @n SRIO_RIO_LOCAL_ID_CAPT_MSB_DEST_ID, SRIO_RIO_LOCAL_ID_CAPT_DEST_ID,SRIO_RIO_LOCAL_ID_CAPT_MSB_SRC_ID, SRIO_RIO_LOCAL_ID_CAPT_SRC_ID
  14962. *
  14963. * @b Example
  14964. * @verbatim
  14965. CSL_SrioHandle hSrio;
  14966. Uint8 msbDstID;
  14967. Uint8 lsbDstID;
  14968. Uint8 msbSrcID;
  14969. Uint8 lsbSrcID;
  14970. // Open the CSL SRIO Module 0
  14971. hSrio = CSL_SRIO_Open (0);
  14972. // Get the Device ID Capture information
  14973. CSL_SRIO_GetDeviceIDCapture(hSrio, &msbDstID, &lsbDstID, &msbSrcID, &lsbSrcID);
  14974. ...
  14975. @endverbatim
  14976. * =============================================================================
  14977. */
  14978. static inline void CSL_SRIO_GetDeviceIDCapture
  14979. (
  14980. CSL_SrioHandle hSrio,
  14981. Uint8* msbDstID,
  14982. Uint8* lsbDstID,
  14983. Uint8* msbSrcID,
  14984. Uint8* lsbSrcID
  14985. )
  14986. {
  14987. Uint32 value = hSrio->RIO_LOCAL_ID_CAPT;
  14988. *msbDstID = CSL_FEXT (value, SRIO_RIO_LOCAL_ID_CAPT_MSB_DEST_ID);
  14989. *lsbDstID = CSL_FEXT (value, SRIO_RIO_LOCAL_ID_CAPT_DEST_ID);
  14990. *msbSrcID = CSL_FEXT (value, SRIO_RIO_LOCAL_ID_CAPT_MSB_SRC_ID);
  14991. *lsbSrcID = CSL_FEXT (value, SRIO_RIO_LOCAL_ID_CAPT_SRC_ID);
  14992. }
  14993. /** ============================================================================
  14994. * @n@b CSL_SRIO_ClearDeviceIDCapture
  14995. *
  14996. * @b Description
  14997. * @n The function is used to clear the Device ID capture CSR information
  14998. *
  14999. * @b Arguments
  15000. @verbatim
  15001. hSrio Handle of the SRIO device
  15002. @endverbatim
  15003. *
  15004. * <b> Return Value </b>
  15005. * @n None
  15006. *
  15007. * <b> Pre Condition </b>
  15008. * @n CSL_SRIO_Open() must be called
  15009. *
  15010. * <b> Post Condition </b>
  15011. * @n None
  15012. *
  15013. * @b Writes
  15014. * @n SRIO_RIO_LOCAL_ID_CAPT=0
  15015. *
  15016. * @b Example
  15017. * @verbatim
  15018. CSL_SrioHandle hSrio;
  15019. Uint8 msbDstID;
  15020. Uint8 lsbDstID;
  15021. Uint8 msbSrcID;
  15022. Uint8 lsbSrcID;
  15023. // Open the CSL SRIO Module 0
  15024. hSrio = CSL_SRIO_Open (0);
  15025. // Get the Device ID Capture information
  15026. CSL_SRIO_GetDeviceIDCapture(hSrio, &msbDstID, &lsbDstID, &msbSrcID, &lsbSrcID);
  15027. ...
  15028. // Clear the Address capture information
  15029. CSL_SRIO_ClearDeviceIDCapture(hSrio);
  15030. ...
  15031. @endverbatim
  15032. * =============================================================================
  15033. */
  15034. static inline void CSL_SRIO_ClearDeviceIDCapture
  15035. (
  15036. CSL_SrioHandle hSrio
  15037. )
  15038. {
  15039. hSrio->RIO_LOCAL_ID_CAPT = 0;
  15040. }
  15041. /** ============================================================================
  15042. * @n@b CSL_SRIO_GetLocalControlCapture
  15043. *
  15044. * @b Description
  15045. * @n The function is used to get the Local Control capture CSR information
  15046. *
  15047. * @b Arguments
  15048. @verbatim
  15049. hSrio Handle of the SRIO device
  15050. ftype FTYPE associated with the error.
  15051. ttype TTYPE associated with the error.
  15052. msgInfo Messages are not generated by SRIO-TEV2 and message
  15053. information is not logged
  15054. @endverbatim
  15055. *
  15056. * <b> Return Value </b>
  15057. * @n None
  15058. *
  15059. * <b> Pre Condition </b>
  15060. * @n CSL_SRIO_Open() must be called
  15061. *
  15062. * <b> Post Condition </b>
  15063. * @n None
  15064. *
  15065. * @b Reads
  15066. * @n SRIO_RIO_LOCAL_CTRL_CAPT_FTYPE,SRIO_RIO_LOCAL_CTRL_CAPT_TTYPE,
  15067. * @n SRIO_RIO_LOCAL_CTRL_CAPT_MESSAGE_INFO
  15068. *
  15069. * @b Example
  15070. * @verbatim
  15071. CSL_SrioHandle hSrio;
  15072. Uint8 ftype;
  15073. Uint8 ttype;
  15074. Uint8 msgInfo;
  15075. // Open the CSL SRIO Module 0
  15076. hSrio = CSL_SRIO_Open (0);
  15077. // Get the Device ID Capture information
  15078. CSL_SRIO_GetLocalControlCapture(hSrio, &ftype, &ttype, &msgInfo);
  15079. ...
  15080. @endverbatim
  15081. * =============================================================================
  15082. */
  15083. static inline void CSL_SRIO_GetLocalControlCapture
  15084. (
  15085. CSL_SrioHandle hSrio,
  15086. Uint8* ftype,
  15087. Uint8* ttype,
  15088. Uint8* msgInfo
  15089. )
  15090. {
  15091. Uint32 value = hSrio->RIO_LOCAL_CTRL_CAPT;
  15092. *ftype = CSL_FEXT (value, SRIO_RIO_LOCAL_CTRL_CAPT_FTYPE);
  15093. *ttype = CSL_FEXT (value, SRIO_RIO_LOCAL_CTRL_CAPT_TTYPE);
  15094. *msgInfo = CSL_FEXT (value, SRIO_RIO_LOCAL_CTRL_CAPT_MESSAGE_INFO);
  15095. }
  15096. /** ============================================================================
  15097. * @n@b CSL_SRIO_ClearLocalControlCapture
  15098. *
  15099. * @b Description
  15100. * @n The function is used to clear the Local Control capture CSR information
  15101. *
  15102. * @b Arguments
  15103. @verbatim
  15104. hSrio Handle of the SRIO device
  15105. @endverbatim
  15106. *
  15107. * <b> Return Value </b>
  15108. * @n None
  15109. *
  15110. * <b> Pre Condition </b>
  15111. * @n CSL_SRIO_Open() must be called
  15112. *
  15113. * <b> Post Condition </b>
  15114. * @n None
  15115. *
  15116. * @b Writes
  15117. * @n SRIO_RIO_LOCAL_CTRL_CAPT=0
  15118. *
  15119. * @b Example
  15120. * @verbatim
  15121. CSL_SrioHandle hSrio;
  15122. Uint8 ftype;
  15123. Uint8 ttype;
  15124. Uint8 msgInfo;
  15125. // Open the CSL SRIO Module 0
  15126. hSrio = CSL_SRIO_Open (0);
  15127. // Get the Local control Capture information
  15128. CSL_SRIO_GetLocalControlCapture(hSrio, &ftype, &ttype, &msgInfo);
  15129. ...
  15130. // Clear the local control capture
  15131. CSL_SRIO_ClearLocalControlCapture(hSrio);
  15132. ...
  15133. @endverbatim
  15134. * =============================================================================
  15135. */
  15136. static inline void CSL_SRIO_ClearLocalControlCapture
  15137. (
  15138. CSL_SrioHandle hSrio
  15139. )
  15140. {
  15141. hSrio->RIO_LOCAL_CTRL_CAPT = 0;
  15142. }
  15143. /** ============================================================================
  15144. * @n@b CSL_SRIO_GetFabricControlStatus
  15145. *
  15146. * @b Description
  15147. * @n The function is used to get the Fabric control status information.
  15148. *
  15149. * @b Arguments
  15150. @verbatim
  15151. hSrio Handle of the SRIO device
  15152. igLLMBackPressure Ingress LLM backpressure indication
  15153. igUCBackPressure Ingress User Core backpressure indication
  15154. @endverbatim
  15155. *
  15156. * <b> Return Value </b>
  15157. * @n None
  15158. *
  15159. * <b> Pre Condition </b>
  15160. * @n CSL_SRIO_Open() must be called
  15161. *
  15162. * <b> Post Condition </b>
  15163. * @n None
  15164. *
  15165. * @b Reads
  15166. * @n SRIO_RIO_FABRIC_CSR_IG_LLM_BACKPRESSURE,SRIO_RIO_FABRIC_CSR_IG_UC_BACKPRESSURE
  15167. *
  15168. * @b Example
  15169. * @verbatim
  15170. CSL_SrioHandle hSrio;
  15171. Uint8 igLLMBackPressure;
  15172. Uint8 igUCBackPressure;
  15173. // Open the CSL SRIO Module 0
  15174. hSrio = CSL_SRIO_Open (0);
  15175. // Get the Fabric Control Status
  15176. CSL_SRIO_GetFabricControlStatus(hSrio, &igLLMBackPressure, &igUCBackPressure);
  15177. ...
  15178. @endverbatim
  15179. * =============================================================================
  15180. */
  15181. static inline void CSL_SRIO_GetFabricControlStatus
  15182. (
  15183. CSL_SrioHandle hSrio,
  15184. Uint8* igLLMBackPressure,
  15185. Uint8* igUCBackPressure
  15186. )
  15187. {
  15188. Uint32 value = hSrio->RIO_FABRIC_CSR;
  15189. *igLLMBackPressure = CSL_FEXT (value, SRIO_RIO_FABRIC_CSR_IG_LLM_BACKPRESSURE);
  15190. *igUCBackPressure = CSL_FEXT (value, SRIO_RIO_FABRIC_CSR_IG_UC_BACKPRESSURE);
  15191. }
  15192. /** ============================================================================
  15193. * @n@b CSL_SRIO_GetFabricControlPortStatus
  15194. *
  15195. * @b Description
  15196. * @n The function is used to get the Fabric control port status information.
  15197. *
  15198. * @b Arguments
  15199. @verbatim
  15200. hSrio Handle of the SRIO device
  15201. port SRIO port number
  15202. igPktEnableStatus PBMi Packet Enable Indication
  15203. egPktEnableStatus PBMe Packet Enable Indication
  15204. @endverbatim
  15205. *
  15206. * <b> Return Value </b>
  15207. * @n None
  15208. *
  15209. * <b> Pre Condition </b>
  15210. * @n CSL_SRIO_Open() must be called
  15211. *
  15212. * <b> Post Condition </b>
  15213. * @n None
  15214. *
  15215. * @b Reads
  15216. * @n SRIO_RIO_SP_FABRIC_STATUS_IG_PKT_ENABLE_STATUS,
  15217. * @n SRIO_RIO_SP_FABRIC_STATUS_EG_PKT_ENABLE_STATUS
  15218. *
  15219. * @b Example
  15220. * @verbatim
  15221. CSL_SrioHandle hSrio;
  15222. Uint8 igPktEnableStatus;
  15223. Uint8 egPktEnableStatus;
  15224. // Open the CSL SRIO Module 0
  15225. hSrio = CSL_SRIO_Open (0);
  15226. // Get the Fabric Control Port Status
  15227. CSL_SRIO_GetFabricControlPortStatus(hSrio, 1, &igPktEnableStatus, &egPktEnableStatus);
  15228. ...
  15229. @endverbatim
  15230. * =============================================================================
  15231. */
  15232. static inline void CSL_SRIO_GetFabricControlPortStatus
  15233. (
  15234. CSL_SrioHandle hSrio,
  15235. Uint8 port,
  15236. Uint8* igPktEnableStatus,
  15237. Uint8* egPktEnableStatus
  15238. )
  15239. {
  15240. Uint32 value = hSrio->RIO_SP_FABRIC_STATUS[port];
  15241. *igPktEnableStatus = CSL_FEXT (value, SRIO_RIO_SP_FABRIC_STATUS_IG_PKT_ENABLE_STATUS);
  15242. *egPktEnableStatus = CSL_FEXT (value, SRIO_RIO_SP_FABRIC_STATUS_EG_PKT_ENABLE_STATUS);
  15243. }
  15244. /**
  15245. @}
  15246. */
  15247. #ifdef __cplusplus
  15248. }
  15249. #endif
  15250. #endif /* CSL_SRIO_AUX_PHY_LAYER_H_ */