12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524 |
- /**
- * @file csl_msmcAux.h
- *
- * @brief
- * This is the MSMC Auxilary Header File which exposes the various
- * CSL Functional Layer API's to configure the MSMC Module.
- *
- * \par
- * ============================================================================
- * @n (C) Copyright 2008, 2009, Texas Instruments, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of Texas Instruments Incorporated nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
- #ifndef CSL_MSMCAUX_H_
- #define CSL_MSMCAUX_H_
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include <ti/csl/csl_msmc.h>
- /** @addtogroup CSL_MSMC_FUNCTION
- @{ */
- /** ============================================================================
- * @n@b CSL_MSMC_getPID
- *
- * @b Description
- * @n This function gets the peripheral ID register for the MSMC IP.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_PID
- *
- * @b Example
- * @verbatim
- Uint32 pid;
- // Get the Mode change progress flag
- mcpFlag = CSL_MSMC_getModeChangeProgress ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getPID (void)
- {
- return hMsmc->PID;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getModeChangeProgress
- *
- * @b Description
- * @n This function gets the mode change progress flag
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMCC_MCP
- *
- * @b Example
- * @verbatim
- Uint8 mcpFlag;
- // Get the Mode change progress flag
- mcpFlag = CSL_MSMC_getModeChangeProgress ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint8 CSL_MSMC_getModeChangeProgress (void)
- {
- return CSL_FEXT (hMsmc->SMCC, MSMC_SMCC_MCP);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getSoftErrorAddress
- *
- * @b Description
- * @n When ECM bit is 1 in SMCFG register this function gets the corrupted
- * location error address.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * Sof Error Address.
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMCERRAR_SEADDR
- *
- * @b Example
- * @verbatim
- Uint32 errAddr;
- errAddr = CSL_MSMC_getSoftErrorAddress ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getSoftErrorAddress (void)
- {
- return CSL_FEXT (hMsmc->SMCERRAR, MSMC_SMCERRAR_SEADDR);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getSoftErrorAddressExtension
- *
- * @b Description
- * @n This function gets the address extension used for the faulting address.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * Soft Address Extension.
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMCERRXR_ESYN, MSMC_SMCERRXR_SEEADDR, MSMC_SMCERRXR_SEPID,MSMC_SMCERRXR_SER
- *
- * @b Example
- * @verbatim
- Uint8 esyn;
- Uint8 errAddrExt;
- Uint8 sepId;
- Uint8 ser;
- CSL_MSMC_getSoftErrorAddressExtension (&esyn, &errAddrExt, &sepId, &ser);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getSoftErrorAddressExtension
- (
- Uint8* esyn,
- Uint8* address,
- Uint8* sepId,
- Uint8* ser
- )
- {
- Uint32 value = hMsmc->SMCERRXR;
- *esyn = CSL_FEXT (value, MSMC_SMCERRXR_ESYN);
- *address = CSL_FEXT (value, MSMC_SMCERRXR_SEEADDR);
- *sepId = CSL_FEXT (value, MSMC_SMCERRXR_SEPID);
- *ser = CSL_FEXT (value, MSMC_SMCERRXR_SER);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setCounterBankRefreshRead
- *
- * @b Description
- * @n This function programs REFDEL counter to the number of MSMC clock cycles
- * between each bank refresh read access.
- *
- * @b Arguments
- @verbatim
- refdel number of MSMC clock cycles
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMEDCC_REFDEL
- *
- * @b Example
- * @verbatim
- CSL_MSMC_setCounterBankRefreshRead (1);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setCounterBankRefreshRead (Uint32 refdel)
- {
- CSL_FINS (hMsmc->SMEDCC, MSMC_SMEDCC_REFDEL, refdel);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getCounterBankRefreshRead
- *
- * @b Description
- * @n This function gets REFDEL counter to the number of MSMC clock cycles
- * between each bank refresh read access.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * REFDEL counter
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMEDCC_REFDEL
- *
- * @b Example
- * @verbatim
- Uint32 refdel;
- refdel = CSL_MSMC_getCounterBankRefreshRead ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getCounterBankRefreshRead (void)
- {
- return CSL_FEXT (hMsmc->SMEDCC, MSMC_SMEDCC_REFDEL);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getParityRAM
- *
- * @b Description
- * @n This function programs gets the parity RAM status
- *
- * @b Arguments
- @verbatim
- None
- @endverbatim
- *
- * <b> Return Value </b>
- * @n Parity RAM
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMEDCC_PRR
- *
- * @b Example
- * @verbatim
- Uint8 parityRAM;
- parityRAM = CSL_MSMC_getParityRAM ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint8 CSL_MSMC_getParityRAM (void)
- {
- return CSL_FEXT (hMsmc->SMEDCC, MSMC_SMEDCC_PRR);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getCSE
- *
- * @b Description
- * @n This function programs reads the CSE bit to determine if there is a parity
- * mismatch
- *
- * @b Arguments
- @verbatim
- None
- @endverbatim
- *
- * <b> Return Value </b>
- * @n CSE Status
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMEDCC_CSE
- *
- * @b Example
- * @verbatim
- Uint8 cse;
- cse = CSL_MSMC_getCSE ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint8 CSL_MSMC_getCSE (void)
- {
- return CSL_FEXT (hMsmc->SMEDCC, MSMC_SMEDCC_CSE);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setCSE
- *
- * @b Description
- * @n This function programs sets the CSE bit
- *
- * @b Arguments
- @verbatim
- None
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMEDCC_CSE
- *
- * @b Example
- * @verbatim
- // Clear the CSE Bit.
- CSL_MSMC_setCSE (0);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setCSE (Uint8 cse)
- {
- CSL_FINS(hMsmc->SMEDCC, MSMC_SMEDCC_CSE, cse);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getECM
- *
- * @b Description
- * @n This function programs gets the status of the error correcting mode
- *
- * @b Arguments
- @verbatim
- None
- @endverbatim
- *
- * <b> Return Value </b>
- * @n ECM Mode
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMEDCC_ECM
- *
- * @b Example
- * @verbatim
- Uint8 ecm;
- ecm = CSL_MSMC_getECM ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint8 CSL_MSMC_getECM (void)
- {
- return CSL_FEXT (hMsmc->SMEDCC, MSMC_SMEDCC_ECM);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setECM
- *
- * @b Description
- * @n This function programs sets the error correcting mode.
- *
- * @b Arguments
- @verbatim
- None
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMEDCC_ECM
- *
- * @b Example
- * @verbatim
- // Set Error Correcting Mode
- CSL_MSMC_setECM (0);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setECM (Uint8 ecm)
- {
- CSL_FINS(hMsmc->SMEDCC, MSMC_SMEDCC_ECM, ecm);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_enableScrubbingEngine
- *
- * @b Description
- * @n This function enables the scrubbing engine.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n Scrubbing Engine is enabled.
- *
- * @b Writes
- * @n MSMC_SMEDCC_SEN=0
- *
- * @b Example
- * @verbatim
- CSL_MSMC_enableScrubbingEngine ();
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_enableScrubbingEngine (void)
- {
- CSL_FINS (hMsmc->SMEDCC, MSMC_SMEDCC_SEN, 0x0);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_disableScrubbingEngine
- *
- * @b Description
- * @n This function disables the scrubbing engine.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n Scrubbing Engine is disabled.
- *
- * @b Writes
- * @n MSMC_SMEDCC_SEN=1
- *
- * @b Example
- * @verbatim
- CSL_MSMC_disableScrubbingEngine ();
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_disableScrubbingEngine (void)
- {
- CSL_FINS (hMsmc->SMEDCC, MSMC_SMEDCC_SEN, (Uint32)1);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getScrubbingEngineState
- *
- * @b Description
- * @n This function gets the state of scrubbing engine, if it is
- * enabled/disabled.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @li 1 - Scrubbing Engine is enabled.
- * @li 0 - Scrubbing Engine is disabled.
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMEDCC_SEN
- *
- * @b Example
- * @verbatim
- Uint32 stateSE;
- stateSE = CSL_MSMC_getScrubbingEngineState ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getScrubbingEngineState (void)
- {
- return CSL_FEXT (hMsmc->SMEDCC, MSMC_SMEDCC_SEN);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getScrubErrorCorrectedAddress
- *
- * @b Description
- * @n This function gets address of the location whose contents have been
- * corrected by the scrubbing engine.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b> Uint32
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMCEA_SECA
- *
- * @b Example
- * @verbatim
- Uint32 correctedAddr;
- correctedAddr = CSL_MSMC_getScrubErrorCorrectedAddress ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getScrubErrorCorrectedAddress (void)
- {
- return CSL_FEXT (hMsmc->SMCEA, MSMC_SMCEA_SECA);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getSyndromeValue
- *
- * @b Description
- * @n This function gets the syndrome value that identifies the erroneous bit
- * in the data which the scrubbing engine has corrected.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n ESYN Field
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n SMSECA register configured with the value zero.
- *
- * @b Reads
- * @n MSMC_SMCEA_ESYN
- *
- * @b Example
- * @verbatim
- Uint8 esynValue;
- esynValue = CSL_MSMC_getSyndromeValue ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint8 CSL_MSMC_getSyndromeValue (void)
- {
- return CSL_FEXT (hMsmc->SMCEA, MSMC_SMCEA_ESYN);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getScrubCorrectableErrorCounter
- *
- * @b Description
- * @n This function gets the Scrubbing Engine Correctable Error Counter.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b> Uint32
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMSECC_SCEC
- *
- * @b Example
- * @verbatim
- Uint32 cCounter;
- cCounter = CSL_MSMC_getScrubCorrectableErrorCounter ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getScrubCorrectableErrorCounter (void)
- {
- return CSL_FEXT (hMsmc->SMSECC, MSMC_SMSECC_SCEC);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_clearScrubCorrectableErrorCounter
- *
- * @b Description
- * @n This function clears the Scrub Correctable Error Counter.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n SMSECC register configured with the value passed.
- *
- * @b Writes
- * @n MSMC_SMSECC_SCEC=0
- *
- * @b Example
- * @verbatim
- CSL_MSMC_clearScrubCorrectableErrorCounter ();
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_clearScrubCorrectableErrorCounter (void)
- {
- CSL_FINS (hMsmc->SMSECC, MSMC_SMSECC_SCEC, 0);
- return;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getScrubNonCorrectableErrorCounter
- *
- * @b Description
- * @n This function gets the Scrubbing Engine NonCorrectable Error Counter.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b> Uint32
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMSECC_SNCEC
- *
- * @b Example
- * @verbatim
- Uint32 ncCounter;
- ncCounter = CSL_MSMC_getScrubNonCorrectableErrorCounter ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getScrubNonCorrectableErrorCounter (void)
- {
- return CSL_FEXT (hMsmc->SMSECC, MSMC_SMSECC_SNCEC);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_clearScrubNonCorrectableErrorCounter
- *
- * @b Description
- * @n his function clears the Scrub Non Correctable Error Counter.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n SMSECC register configured with the value passed.
- *
- * @b Writes
- * @n MSMC_SMSECC_SNCEC=0
- *
- * @b Example
- * @verbatim
- CSL_MSMC_clearScrubNonCorrectableErrorCounter ();
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_clearScrubNonCorrectableErrorCounter (void)
- {
- CSL_FINS (hMsmc->SMSECC, MSMC_SMSECC_SNCEC, 0);
- return;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getFaultAddress
- *
- * @b Description
- * @n This function gets the access address causing the fault.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * Fault Address
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMPFAR_FAULT_ADDRESS
- *
- * @b Example
- * @verbatim
- Uint32 faultAddr;
- faultAddr = CSL_MSMC_getFaultAddress ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getFaultAddress (void)
- {
- return CSL_FEXT (hMsmc->SMPFAR, MSMC_SMPFAR_FAULT_ADDRESS);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getFaultAddressNMStatus
- *
- * @b Description
- * @n This function gets the NM Status which is set if the access address
- * causing the fault does not match any of the segment BADDR
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * Fault Address NM Status
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMPFXR_NM
- *
- * @b Example
- * @verbatim
- Uint8 faultNMStatus;
- faultNMStatus = CSL_MSMC_getFaultAddressNMStatus ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint8 CSL_MSMC_getFaultAddressNMStatus(void)
- {
- return CSL_FEXT (hMsmc->SMPFXR, MSMC_SMPFXR_NM);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getFaultInfo
- *
- * @b Description
- * @n This function gets the MSMC fault information. This include the event
- * bits event bits for all PrivID's and the Master ID which caused the
- * fault.
- *
- * @b Arguments
- * @verbatim
- faultPrivID Fault Priv ID populated by this API.
- faultMstID Fault Master ID populated by this API.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMPFR_FPID, MSMC_SMPFR_FMSTID
- *
- * @b Example
- * @verbatim
- Uint8 faultPrivID;
- Uint8 faultMstID;
- // Get the fault information.
- CSL_MSMC_getFaultInfo &faultPrivID, &faultMstID);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getFaultInfo (Uint8* faultPrivID, Uint8* faultMstID)
- {
- Uint32 value = hMsmc->SMPFR;
- *faultPrivID = CSL_FEXT (value, MSMC_SMPFR_FPID);
- *faultMstID = CSL_FEXT (value, MSMC_SMPFR_FMSTID);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_clearFaultPrivID
- *
- * @b Description
- * @n This function clears the faulted PrivID bit set in SMPFV register.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n Fault ID is cleared.
- *
- * @b Writes
- * @n MSMC_SMPFCR_CLR=1
- *
- * @b Example
- * @verbatim
- CSL_MSMC_clearFaultPrivID ();
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_clearFaultPrivID (void)
- {
- CSL_FINS (hMsmc->SMPFCR, MSMC_SMPFCR_CLR, 1);
- return;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setStarvationBoundCGEM
- *
- * @b Description
- * @n This function sets the starvation bound for CCGEM slaves.
- *
- * @b Arguments
- @verbatim
- index CGEM slave to configure starvation bound for
- strvEmifArbiter Starvation bound to be configured for the EMIF Arbiter
- strvRAMArbiter Starvation bound to be configured for the RAM Bank Arbiter
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SBNDC0_SCNTCE, MSMC_SBNDC0_SCNTCM
- *
- * @b Example
- * @verbatim
- CSL_MSMC_setStarvationBoundCGEM (1,1,1);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setStarvationBoundCGEM
- (
- Uint32 index,
- Uint8 strvEmifArbiter,
- Uint8 strvRAMArbiter
- )
- {
- hMsmc->SBND[index] = CSL_FMK (MSMC_SBNDC0_SCNTCE, strvEmifArbiter) |
- CSL_FMK (MSMC_SBNDC0_SCNTCM, strvRAMArbiter);
- return;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getStarvationBoundCGEM
- *
- * @b Description
- * @n This function gets the starvation bound for CCGEM slaves.
- *
- * @b Arguments
- @verbatim
- index CGEM slave index
- strvEmifArbiter Starvation bound for the EMIF Arbiter
- strvRAMArbiter Starvation bound for the RAM Bank Arbiter
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SBNDC0_SCNTCE, MSMC_SBNDC0_SCNTCM
- *
- * @b Example
- * @verbatim
- Uint8 strvEMIF;
- Uint8 strvRAM;
- CSL_MSMC_getStarvationBoundCGEM (1, &strvEMIF, &strvRAM);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getStarvationBoundCGEM
- (
- Uint32 index,
- Uint8* strvEmifArbiter,
- Uint8* strvRAMArbiter
- )
- {
- Uint32 value = hMsmc->SBND[index];
- *strvEmifArbiter = CSL_FEXT (value, MSMC_SBNDC0_SCNTCE);
- *strvRAMArbiter = CSL_FEXT (value, MSMC_SBNDC0_SCNTCM);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setStarvationBoundSMS
- *
- * @b Description
- * @n This function sets the starvation bound for SMS port.
- *
- * @b Arguments
- @verbatim
- sbnd starvation bound to be configured
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n Starvation Count for the SMS Port is configured.
- *
- * @b Writes
- * @n MSMC_SBNDM_SCNTMM
- *
- * @b Example
- * @verbatim
- CSL_MSMC_setStarvationBoundSMS (1);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setStarvationBoundSMS (Uint32 sbnd)
- {
- CSL_FINS (hMsmc->SBNDM, MSMC_SBNDM_SCNTMM, sbnd);
- return;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getStarvationBoundSMS
- *
- * @b Description
- * @n This function gets the starvation bound for SMS port.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * Starvation Bound for the SMS Port.
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SBNDM_SCNTMM
- *
- * @b Example
- * @verbatim
- Uint32 sbndm;
- sbndm = CSL_MSMC_getStarvationBoundSMS ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getStarvationBoundSMS (void)
- {
- return CSL_FEXT (hMsmc->SBNDM, MSMC_SBNDM_SCNTMM);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setStarvationBoundSES
- *
- * @b Description
- * @n This function sets the starvation bound for SES port.
- *
- * @b Arguments
- @verbatim
- sbnd starvation bound to be configured
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n Starvation count for the SES port is configured
- *
- * @b Writes
- * @n MSMC_SBNDE_SCNTEM
- *
- * @b Example
- * @verbatim
- CSL_MSMC_setStarvationBoundSES (1);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setStarvationBoundSES (Uint32 sbnd)
- {
- CSL_FINS (hMsmc->SBNDE, MSMC_SBNDE_SCNTEM, sbnd);
- return;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getStarvationBoundSES
- *
- * @b Description
- * @n This function gets the starvation bound for SES port.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * Starvation Bound for the SES Port.
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SBNDE_SCNTEM
- *
- * @b Example
- * @verbatim
- Uint32 sbnde;
- sbnde = CSL_MSMC_getStarvationBoundSES ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getStarvationBoundSES (void)
- {
- return CSL_FEXT (hMsmc->SBNDE, MSMC_SBNDE_SCNTEM);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setSMSMPAXH
- *
- * @b Description
- * @n This function sets the contents of SMS_MPAXH register.
- *
- * @b Arguments
- @verbatim
- privid PrivID
- index Index into the set of 8 registers for this particular
- PrivID
- mpaxh CSL_MSMC_SMSMPAXH structure that needs to be set into the
- register
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n SMS MPAXH register for the PrivID configured with the value passed.
- *
- * @b Writes
- * @n MSMC_SMS_MPAXH_0_SEGSZ..MSMC_SMS_MPAXH_7_SEGSZ,
- * MSMC_SMS_MPAXH_0_BADDR..MSMC_SMS_MPAXH_7_BADDR
- *
- * @b Example
- * @verbatim
- Uint32 privid = 1;
- Uint32 index = 0;
- CSL_MSMC_SMSMPAXH mpaxh;
- mpaxh.segSz = 4;
- mpaxh.baddr = 0x10;
- CSL_MSMC_setSMSMPAXH (privid, index, &mpaxh);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setSMSMPAXH
- (
- Uint32 privid,
- Uint32 index,
- CSL_MSMC_SMSMPAXH* mpaxh
- )
- {
- hMsmc->SMS_MPAX_PER_PRIVID[privid].SMS[index].MPAXH =
- CSL_FMK (MSMC_SMS_MPAXH_0_SEGSZ, mpaxh->segSz) |
- CSL_FMK (MSMC_SMS_MPAXH_0_BADDR, mpaxh->baddr);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getSMSMPAXH
- *
- * @b Description
- * @n This function gets the contents of SMS_MPAXH register.
- *
- * @b Arguments
- @verbatim
- privid PrivID
- index Index into the set of 8 registers for this particular
- PrivID
- mpaxh CSL_MSMC_SMSMPAXH structure that needs to be set into the
- register
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMS_MPAXH_0_SEGSZ..MSMC_SMS_MPAXH_7_SEGSZ,
- * MSMC_SMS_MPAXH_0_BADDR..MSMC_SMS_MPAXH_7_BADDR
- *
- * @b Example
- * @verbatim
- Uint32 privid = 1;
- Uint32 index = 0;
- CSL_MSMC_SMSMPAXH mpaxh;
- CSL_MSMC_getSMSMPAXH (privid, index, &mpaxh);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getSMSMPAXH (
- Uint32 privid,
- Uint32 index,
- CSL_MSMC_SMSMPAXH* mpaxh
- )
- {
- Uint32 value = hMsmc->SMS_MPAX_PER_PRIVID[privid].SMS[index].MPAXH;
- mpaxh->segSz = CSL_FEXT (value, MSMC_SMS_MPAXH_0_SEGSZ);
- mpaxh->baddr = CSL_FEXT (value, MSMC_SMS_MPAXH_0_BADDR);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setSMSMPAXL
- *
- * @b Description
- * @n This function sets the contents of SMS_MPAXL register.
- *
- * @b Arguments
- @verbatim
- privid PrivID
- index Index into the set of 8 registers for this particular
- PrivID
- mpaxl CSL_MSMC_SMSMPAXL structure that needs to be set into the
- register
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n SMS MPAXL register for the PrivID configured with the value passed.
- *
- * @b Writes
- * @n MSMC_SMS_MPAXL_0_UX..MSMC_SMS_MPAXL_7_UX,
- * MSMC_SMS_MPAXL_0_UW..MSMC_SMS_MPAXL_7_UW,
- * MSMC_SMS_MPAXL_0_UR..MSMC_SMS_MPAXL_7_UR,
- * MSMC_SMS_MPAXL_0_SX..MSMC_SMS_MPAXL_7_SX,
- * MSMC_SMS_MPAXL_0_SW..MSMC_SMS_MPAXL_7_SW,
- * MSMC_SMS_MPAXL_0_SR..MSMC_SMS_MPAXL_7_SR,
- * MSMC_SMS_MPAXL_0_RADDR..MSMC_SMS_MPAXL_7_RADDR,
- *
- * @b Example
- * @verbatim
- Uint32 privid = 1;
- Uint32 index = 0;
- CSL_MSMC_SMSMPAXL mpaxl;
- mpaxl.ux = 1;
- mpaxl.uw = 1;
- mpaxl.ur = 1;
- mpaxl.sx = 1;
- mpaxl.sw = 1;
- mpaxl.sr = 1;
- mpaxl.emu = 0;
- mpaxl.ns = 1;
- mpaxl.raddr = 0x100;
- CSL_MSMC_setSMSMPAXL (privid, index, &mpaxl);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setSMSMPAXL
- (
- Uint32 privid,
- Uint32 index,
- CSL_MSMC_SMSMPAXL* mpaxl
- )
- {
- Uint32 value = 0;
- CSL_FINS (value, MSMC_SMS_MPAXL_0_UX, mpaxl->ux);
- CSL_FINS (value, MSMC_SMS_MPAXL_0_UW, mpaxl->uw);
- CSL_FINS (value, MSMC_SMS_MPAXL_0_UR, mpaxl->ur);
- CSL_FINS (value, MSMC_SMS_MPAXL_0_SX, mpaxl->sx);
- CSL_FINS (value, MSMC_SMS_MPAXL_0_SW, mpaxl->sw);
- CSL_FINS (value, MSMC_SMS_MPAXL_0_SR, mpaxl->sr);
- CSL_FINS (value, MSMC_SMS_MPAXL_0_RADDR, mpaxl->raddr);
- hMsmc->SMS_MPAX_PER_PRIVID[privid].SMS[index].MPAXL = value;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getSMSMPAXL
- *
- * @b Description
- * @n This function gets the contents of SMS_MPAXL register.
- *
- * @b Arguments
- @verbatim
- privid PrivID
- index Index into the set of 8 registers for this particular
- PrivID
- mpaxl CSL_MSMC_SMSMPAXL structure that needs to be set into the
- register
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMS_MPAXL_0_UX..MSMC_SMS_MPAXL_7_UX,
- * MSMC_SMS_MPAXL_0_UW..MSMC_SMS_MPAXL_7_UW,
- * MSMC_SMS_MPAXL_0_UR..MSMC_SMS_MPAXL_7_UR,
- * MSMC_SMS_MPAXL_0_SX..MSMC_SMS_MPAXL_7_SX,
- * MSMC_SMS_MPAXL_0_SW..MSMC_SMS_MPAXL_7_SW,
- * MSMC_SMS_MPAXL_0_SR..MSMC_SMS_MPAXL_7_SR,
- * MSMC_SMS_MPAXL_0_RADDR..MSMC_SMS_MPAXL_7_RADDR,
- *
- * @b Example
- * @verbatim
- Uint32 privid = 1;
- Uint32 index = 0;
- CSL_MSMC_SMSMPAXL mpaxl;
- CSL_MSMC_getSMSMPAXL (privid, index, &mpaxl);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getSMSMPAXL
- (
- Uint32 privid,
- Uint32 index,
- CSL_MSMC_SMSMPAXL* mpaxl
- )
- {
- Uint32 value = hMsmc->SMS_MPAX_PER_PRIVID[privid].SMS[index].MPAXL;
- mpaxl->raddr = CSL_FEXT (value, MSMC_SMS_MPAXL_0_RADDR);
- mpaxl->sr = CSL_FEXT (value, MSMC_SMS_MPAXL_0_SR);
- mpaxl->sw = CSL_FEXT (value, MSMC_SMS_MPAXL_0_SW);
- mpaxl->sx = CSL_FEXT (value, MSMC_SMS_MPAXL_0_SX);
- mpaxl->ur = CSL_FEXT (value, MSMC_SMS_MPAXL_0_UR);
- mpaxl->uw = CSL_FEXT (value, MSMC_SMS_MPAXL_0_UW);
- mpaxl->ux = CSL_FEXT (value, MSMC_SMS_MPAXL_0_UX);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setSESMPAXH
- *
- * @b Description
- * @n This function sets the contents of SES_MPAXH register.
- *
- * @b Arguments
- @verbatim
- privid PrivID
- index Index into the set of 8 registers for this particular
- PrivID
- mpaxh CSL_MSMC_SESMPAXH structure that needs to be set into the
- register
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n SES MPAXH register for the PrivID configured with the value passed.
- *
- * @b Writes
- * @n MSMC_SES_MPAXH_0_BE..MSMC_SES_MPAXH_7_BE,
- * MSMC_SES_MPAXH_0_AI..MSMC_SES_MPAXH_7_AI,
- * MSMC_SES_MPAXH_0_SEGSZ..MSMC_SES_MPAXH_7_SEGSZ,
- * MSMC_SES_MPAXH_0_BADDR..MSMC_SES_MPAXH_7_BADDR
- *
- * @b Example
- * @verbatim
- Uint32 privid = 1;
- Uint32 index = 0;
- CSL_MSMC_SESMPAXH mpaxh;
- mpaxh.segSize = 4;
- mpaxh.baseAddress = 0x100;
- mpaxh.be = 1;
- mpaxh.ai = 1;
- CSL_MSMC_setSESMPAXH (privid, index, &mpaxh);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setSESMPAXH
- (
- Uint32 privid,
- Uint32 index,
- CSL_MSMC_SESMPAXH* mpaxh
- )
- {
- Uint32 value = 0;
- CSL_FINS (value, MSMC_SES_MPAXH_0_BE, mpaxh->be);
- CSL_FINS (value, MSMC_SES_MPAXH_0_AI, mpaxh->ai);
- CSL_FINS (value, MSMC_SES_MPAXH_0_SEGSZ, mpaxh->segSz);
- CSL_FINS (value, MSMC_SES_MPAXH_0_BADDR, mpaxh->baddr);
- hMsmc->SES_MPAX_PER_PRIVID[privid].SES[index].MPAXH = value;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getSESMPAXH
- *
- * @b Description
- * @n This function gets the contents of SES_MPAXH register.
- *
- * @b Arguments
- @verbatim
- privid PrivID
- index Index into the set of 8 registers for this particular
- PrivID
- mpaxh CSL_MSMC_SESMPAXH structure that needs to be set into the
- register
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SES_MPAXH_0_BE..MSMC_SES_MPAXH_7_BE,
- * MSMC_SES_MPAXH_0_AI..MSMC_SES_MPAXH_7_AI,
- * MSMC_SES_MPAXH_0_SEGSZ..MSMC_SES_MPAXH_7_SEGSZ,
- * MSMC_SES_MPAXH_0_BADDR..MSMC_SES_MPAXH_7_BADDR
- *
- * @b Example
- * @verbatim
- Uint32 privid = 1;
- Uint32 index = 0;
- CSL_MSMC_SESMPAXH mpaxh;
- CSL_MSMC_getSESMPAXH (privid, index, &mpaxh);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getSESMPAXH
- (
- Uint32 privid,
- Uint32 index,
- CSL_MSMC_SESMPAXH* mpaxh
- )
- {
- Uint32 value = hMsmc->SES_MPAX_PER_PRIVID[privid].SES[index].MPAXH;
- mpaxh->be = CSL_FEXT (value, MSMC_SES_MPAXH_0_BE);
- mpaxh->ai = CSL_FEXT (value, MSMC_SES_MPAXH_0_AI);
- mpaxh->segSz = CSL_FEXT (value, MSMC_SES_MPAXH_0_SEGSZ);
- mpaxh->baddr = CSL_FEXT (value, MSMC_SES_MPAXH_0_BADDR);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setSESMPAXL
- *
- * @b Description
- * @n This function sets the contents of SES_MPAXL register.
- *
- * @b Arguments
- @verbatim
- privid PrivID
- index Index into the set of 8 registers for this particular
- PrivID
- mpaxl CSL_MSMC_SESMPAXL structure that needs to be set into the
- register
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n SES MPAXL register for the PrivID configured with the value passed.
- *
- * @b Writes
- * @n MSMC_SES_MPAXL_0_UX..MSMC_SES_MPAXL_7_UX,
- * MSMC_SES_MPAXL_0_UW..MSMC_SES_MPAXL_7_UW,
- * MSMC_SES_MPAXL_0_UR..MSMC_SES_MPAXL_7_UR,
- * MSMC_SES_MPAXL_0_SX..MSMC_SES_MPAXL_7_SX,
- * MSMC_SES_MPAXL_0_SW..MSMC_SES_MPAXL_7_SW,
- * MSMC_SES_MPAXL_0_SR..MSMC_SES_MPAXL_7_SR,
- * MSMC_SES_MPAXL_0_RADDR..MSMC_SES_MPAXL_7_RADDR
- *
- * @b Example
- * @verbatim
- Uint32 privid = 1;
- Uint32 index = 0;
- CSL_MSMC_SESMPAXL mpaxl;
- mpaxl.ux = 1;
- mpaxl.uw = 1;
- mpaxl.ur = 1;
- mpaxl.sx = 1;
- mpaxl.sw = 1;
- mpaxl.sr = 1;
- mpaxl.raddr = 0x4000;
- CSL_MSMC_setSESMPAXL (privid, index, &mpaxl);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setSESMPAXL
- (
- Uint32 privid,
- Uint32 index,
- CSL_MSMC_SESMPAXL* mpaxl
- )
- {
- Uint32 value = 0;
- CSL_FINS (value, MSMC_SES_MPAXL_0_UX, mpaxl->ux);
- CSL_FINS (value, MSMC_SES_MPAXL_0_UW, mpaxl->uw);
- CSL_FINS (value, MSMC_SES_MPAXL_0_UR, mpaxl->ur);
- CSL_FINS (value, MSMC_SES_MPAXL_0_SX, mpaxl->sx);
- CSL_FINS (value, MSMC_SES_MPAXL_0_SW, mpaxl->sw);
- CSL_FINS (value, MSMC_SES_MPAXL_0_SR, mpaxl->sr);
- CSL_FINS (value, MSMC_SES_MPAXL_0_RADDR, mpaxl->raddr);
- hMsmc->SES_MPAX_PER_PRIVID[privid].SES[index].MPAXL = value;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getSESMPAXL
- *
- * @b Description
- * @n This function gets the contents of SES_MPAXL register.
- *
- * @b Arguments
- @verbatim
- privid PrivID
- index Index into the set of 8 registers for this particular
- PrivID
- mpaxl CSL_MSMC_SESMPAXL structure that needs to be set into the
- register
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SES_MPAXL_0_UX..MSMC_SES_MPAXL_7_UX,
- * MSMC_SES_MPAXL_0_UW..MSMC_SES_MPAXL_7_UW,
- * MSMC_SES_MPAXL_0_UR..MSMC_SES_MPAXL_7_UR,
- * MSMC_SES_MPAXL_0_SX..MSMC_SES_MPAXL_7_SX,
- * MSMC_SES_MPAXL_0_SW..MSMC_SES_MPAXL_7_SW,
- * MSMC_SES_MPAXL_0_SR..MSMC_SES_MPAXL_7_SR,
- * MSMC_SES_MPAXL_0_RADDR..MSMC_SES_MPAXL_7_RADDR
- *
- * @b Example
- * @verbatim
- Uint32 privid = 1;
- Uint32 index = 0;
- CSL_MSMC_SESMPAXL mpaxl;
- CSL_MSMC_getSESMPAXL (privid, index, &mpaxl);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getSESMPAXL
- (
- Uint32 privid,
- Uint32 index,
- CSL_MSMC_SESMPAXL* mpaxl
- )
- {
- Uint32 value = hMsmc->SES_MPAX_PER_PRIVID[privid].SES[index].MPAXL;
- mpaxl->raddr = CSL_FEXT (value, MSMC_SES_MPAXL_0_RADDR);
- mpaxl->sr = CSL_FEXT (value, MSMC_SES_MPAXL_0_SR);
- mpaxl->sw = CSL_FEXT (value, MSMC_SES_MPAXL_0_SW);
- mpaxl->sx = CSL_FEXT (value, MSMC_SES_MPAXL_0_SX);
- mpaxl->ur = CSL_FEXT (value, MSMC_SES_MPAXL_0_UR);
- mpaxl->uw = CSL_FEXT (value, MSMC_SES_MPAXL_0_UW);
- mpaxl->ux = CSL_FEXT (value, MSMC_SES_MPAXL_0_UX);
- return;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_lockNonMPAX
- *
- * @b Description
- * @n This function locks the write access for all non MPAX registers.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n All the non MPAX registers are locked for write-access.
- *
- * @b Writes
- * @n MSMC_CFGLCK_MGCID=0x2CD00000,MSMC_CFGLCK_WLCK=1
- *
- * @b Example
- * @verbatim
- CSL_MSMC_lockNonMPAX ();
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_lockNonMPAX (void)
- {
- hMsmc->CFGLCK = CSL_FMK(MSMC_CFGLCK_MGCID, 0x2CD0) | CSL_FMK(MSMC_CFGLCK_WLCK, 1);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_isNonMPAXLocked
- *
- * @b Description
- * @n This function gets the status of the lock for non MPAX registers.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n TRUE - Non MPAX Register Write Access is locked
- * @n FALSE - Non MPAX Register Write Access is unlocked
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_CFGLCKSTAT_WSTAT
- *
- * @b Example
- * @verbatim
- if (CSL_MSMC_isNonMPAXLocked () == TRUE)
- {
- // Non MPAX Registers are locked.
- }
- else
- {
- // MPAX Registers are not locked.
- }
- @endverbatim
- * =============================================================================
- */
- static inline Bool CSL_MSMC_isNonMPAXLocked (void)
- {
- return (Bool)CSL_FEXT (hMsmc->CFGLCKSTAT, MSMC_CFGLCKSTAT_WSTAT);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_unlockNonMPAX
- *
- * @b Description
- * @n This function unlocks the write access for all non MPAX registers.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n @a CSL_MSMC_lockNonMPAX() must be called.
- *
- * <b> Post Condition </b>
- * @n All the non MPAX registers are available for write-access.
- *
- * @b Writes
- * @n MSMC_CFGULCK_MGCID=0x2CD00000,MSMC_CFGULCK_WEN=1
- *
- * @b Example
- * @verbatim
- if (CSL_MSMC_isNonMPAXLocked () == TRUE)
- {
- // Non MPAX Registers are locked
- ...
- // Unlock the Non-MPAX registers.
- CSL_MSMC_unlockNonMPAX ();
- }
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_unlockNonMPAX (void)
- {
- hMsmc->CFGULCK = CSL_FMK(MSMC_CFGULCK_MGCID, 0x2CD0) | CSL_FMK(MSMC_CFGULCK_WEN, 1);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_lockSMS
- *
- * @b Description
- * @n This function locks the write access for all SMS MPAX registers.
- *
- * @b Arguments
- @verbatim
- privid PrivID for which the SMS MPAX registers will be locked.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n All the SMS MPAX registers for the specific PrivID are locked for
- * write-access.
- *
- * @b Writes
- * @n MSMC_SMS_MPAX_LCK_MGCID=0x2CD10000, MSMC_SMS_MPAX_LCK_WLCK
- *
- * @b Example
- * @verbatim
- // Lock SMS MPAX registers for priv-id 1.
- CSL_MSMC_lockSMS (1);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_lockSMS (Uint32 privid)
- {
- hMsmc->SMS_MPAX_LCK = CSL_FMK(MSMC_SMS_MPAX_LCK_MGCID, 0x2CD1) | CSL_FMKR (privid, privid, 1);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_isSMSLocked
- *
- * @b Description
- * @n This function gets the status of the lock for SMS MPAX registers for the
- * specific priv-id
- *
- * @b Arguments
- @verbatim
- privid PrivID for which the status is required.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n TRUE - SMS MPAX Register Write Access is locked for the priv-id
- * @n FALSE - SMS MPAX Register Write Access is unlocked for the priv-id
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMS_MPAX_LCKSTAT_WSTAT
- *
- * @b Example
- * @verbatim
- if (CSL_MSMC_isSMSLocked (1) == TRUE)
- {
- // SMS MPAX Registers for Priv-ID 1 are locked.
- }
- else
- {
- // SMS MPAX Registers for Priv-ID 1 are not locked.
- }
- @endverbatim
- * =============================================================================
- */
- static inline Bool CSL_MSMC_isSMSLocked (Uint32 privId)
- {
- return (Bool)CSL_FEXTR (hMsmc->SMS_MPAX_LCKSTAT, privId, privId);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_unlockSMS
- *
- * @b Description
- * @n This function unlocks the write access for all SMS MPAX registers.
- *
- * @b Arguments
- @verbatim
- privid PrivID for which the SMS MPAX registers will be unlocked.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n @a CSL_MSMC_lockSMS() must be called.
- *
- * <b> Post Condition </b>
- * @n All the SMS MPAX registers for the specific PrivID are unlocked for
- * write-access.
- *
- * @b Writes
- * @n MSMC_SMS_MPAX_ULCK_MGCID=0x2CD10000,MSMC_SMS_MPAX_ULCK_WEN
- *
- * @b Example
- * @verbatim
- ...
- if (CSL_MSMC_isSMSLocked (1) == TRUE)
- {
- // SMS MPAX Registers for Priv-ID 1 are locked.
- ...
- // Unlock SMS MPAX registers for priv-id 1.
- CSL_MSMC_unlockSMS (1);
- }
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_unlockSMS (Uint32 privid)
- {
- hMsmc->SMS_MPAX_ULCK = CSL_FMK(MSMC_SMS_MPAX_ULCK_MGCID, 0x2CD1) | CSL_FMKR (privid, privid, 1);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_lockSES
- *
- * @b Description
- * @n This function locks the write access for all SES MPAX registers.
- *
- * @b Arguments
- @verbatim
- privid PrivID for which the SES MPAX registers will be locked.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n All the SES MPAX registers for the specific PrivID are locked for
- * write-access.
- *
- * @b Writes
- * @n MSMC_SES_MPAX_LCK_MGCID=0x2CD20000,MSMC_SES_MPAX_LCK_WLCK
- *
- * @b Example
- * @verbatim
- // Lock SES MPAX registers for priv-id 1.
- CSL_MSMC_lockSES (1);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_lockSES (Uint32 privid)
- {
- hMsmc->SES_MPAX_LCK = CSL_FMK(MSMC_SES_MPAX_LCK_MGCID, 0x2CD2) | CSL_FMKR (privid, privid, 1);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_isSESLocked
- *
- * @b Description
- * @n This function gets the status of the lock for SES MPAX registers for the
- * specific priv-id
- *
- * @b Arguments
- @verbatim
- privid PrivID for which the status is required.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n TRUE - SES MPAX Register Write Access is locked for the priv-id
- * @n FALSE - SES MPAX Register Write Access is unlocked for the priv-id
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SES_MPAX_LCKSTAT_WSTAT
- *
- * @b Example
- * @verbatim
- if (CSL_MSMC_isSESLocked (1) == TRUE)
- {
- // SES MPAX Registers for Priv-ID 1 are locked.
- }
- else
- {
- // SES MPAX Registers for Priv-ID 1 are not locked.
- }
- @endverbatim
- * =============================================================================
- */
- static inline Bool CSL_MSMC_isSESLocked (Uint32 privId)
- {
- return (Bool)CSL_FEXTR (hMsmc->SES_MPAX_LCKSTAT, privId, privId);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_unlockSES
- *
- * @b Description
- * @n This function unlocks the write access for all SES MPAX registers.
- *
- * @b Arguments
- @verbatim
- privid PrivID for which the SES MPAX registers will be unlocked.
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n @a CSL_MSMC_lockSES() must be called.
- *
- * <b> Post Condition </b>
- * @n All the SES MPAX registers for the specific PrivID are unlocked for
- * write-access.
- *
- * @b Writes
- * @n MSMC_SES_MPAX_ULCK_MGCID=0x2CD20000,MSMC_SES_MPAX_ULCK_WEN
- *
- * @b Example
- * @verbatim
- ...
- if (CSL_MSMC_isSESLocked (1) == TRUE)
- {
- // SES MPAX Registers for Priv-ID 1 are locked.
- ...
- // Unlock SES MPAX registers for priv-id 1.
- CSL_MSMC_unlockSES (1);
- }
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_unlockSES (Uint32 privid)
- {
- hMsmc->SES_MPAX_ULCK = CSL_FMK(MSMC_SES_MPAX_ULCK_MGCID, 0x2CD2) | CSL_FMKR (privid, privid, 1);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getPendingInterrupts
- *
- * @b Description
- * @n This function gets the status of all pending interrupts i.e. which have
- * been enabled and an interrupt has occurred.
- *
- * @b Arguments
- @verbatim
- pfeStat Protection Fault Status
- cees Correctable EDC Error
- ncees Non-Correctable EDC Error
- cses Correctable Scrubbing Error
- nces Non-Correctable Scrubbing Error
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMESTAT_PFESTAT, MSMC_SMESTAT_CEES, MSMC_SMESTAT_NCEES,
- * @n MSMC_SMESTAT_CSES, MSMC_SMESTAT_NCSES
- *
- * @b Example
- * @verbatim
- Uint16 pfeStat;
- Uint8 cees;
- Uint8 ncees;
- Uint8 cses;
- Uint8 ncses;
- // Get the MSMC Pending Interrupt Status
- CSL_MSMC_getPendingInterrupts (&pfeStat,&cees, &ncees, &cses, &ncses);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getPendingInterrupts
- (
- Uint16* pfeStat,
- Uint8* cees,
- Uint8* ncees,
- Uint8* cses,
- Uint8* ncses
- )
- {
- Uint32 value = hMsmc->SMESTAT;
- *pfeStat = CSL_FEXT (value, MSMC_SMESTAT_PFESTAT);
- *cees = CSL_FEXT (value, MSMC_SMESTAT_CEES);
- *ncees = CSL_FEXT (value, MSMC_SMESTAT_NCEES);
- *cses = CSL_FEXT (value, MSMC_SMESTAT_CSES);
- *ncses = CSL_FEXT (value, MSMC_SMESTAT_NCSES);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getRawInterruptStatus
- *
- * @b Description
- * @n This function gets the RAW Interrupt Status.
- *
- * @b Arguments
- @verbatim
- pfeStat Protection Fault Status
- cees Correctable EDC Error
- ncees Non-Correctable EDC Error
- cses Correctable Scrubbing Error
- nces Non-Correctable Scrubbing Error
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMIRSTAT_PFESTAT, MSMC_SMIRSTAT_CEES, MSMC_SMIRSTAT_NCEES,
- * @n MSMC_SMIRSTAT_CSES, MSMC_SMIRSTAT_NCSES
- *
- * @b Example
- * @verbatim
- Uint16 pfeStat;
- Uint8 cees;
- Uint8 ncees;
- Uint8 cses;
- Uint8 ncses;
- // Get the MSMC Raw Interrupt Status
- CSL_MSMC_getRawInterruptStatus (&pfeStat, &cees, &ncees, &cses, &ncses);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getRawInterruptStatus
- (
- Uint16* pfeStat,
- Uint8* cees,
- Uint8* ncees,
- Uint8* cses,
- Uint8* ncses
- )
- {
- Uint32 value = hMsmc->SMIRSTAT;
- *pfeStat = CSL_FEXT (value, MSMC_SMIRSTAT_PFESTAT);
- *cees = CSL_FEXT (value, MSMC_SMIRSTAT_CEES);
- *ncees = CSL_FEXT (value, MSMC_SMIRSTAT_NCEES);
- *cses = CSL_FEXT (value, MSMC_SMIRSTAT_CSES);
- *ncses = CSL_FEXT (value, MSMC_SMIRSTAT_NCSES);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setRawInterruptStatus
- *
- * @b Description
- * @n This function sets the RAW Interrupt Status.
- *
- * @b Arguments
- @verbatim
- pfiStat Protection Fault Status
- cei Correctable EDC Error
- ncei Non-Correctable EDC Error
- csi Correctable Scrubbing Error
- ncsi Non-Correctable Scrubbing Error
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMIRSTAT_PFESTAT, MSMC_SMIRSTAT_CEES, MSMC_SMIRSTAT_NCEES,
- * @n MSMC_SMIRSTAT_CSES, MSMC_SMIRSTAT_NCSES
- *
- * @b Example
- * @verbatim
- // Ensure only the Correctable EDC Errors is set
- CSL_MSMC_setRawInterruptStatus (0x0, 0x1, 0x0, 0x0, 0x0);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setRawInterruptStatus
- (
- Uint16 pfiStat,
- Uint8 cei,
- Uint8 ncei,
- Uint8 csi,
- Uint8 ncsi
- )
- {
- hMsmc->SMIRSTAT = CSL_FMK (MSMC_SMIRSTAT_PFESTAT, pfiStat) |
- CSL_FMK (MSMC_SMIRSTAT_CEES, cei) |
- CSL_FMK (MSMC_SMIRSTAT_NCEES, ncei) |
- CSL_FMK (MSMC_SMIRSTAT_CSES, csi) |
- CSL_FMK (MSMC_SMIRSTAT_NCSES, ncsi);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_clearRawInterruptStatus
- *
- * @b Description
- * @n This function clears the RAW Interrupt Status.
- *
- * @b Arguments
- @verbatim
- pfiStat Protection Fault Status
- cei Correctable EDC Error
- ncei Non-Correctable EDC Error
- csi Correctable Scrubbing Error
- ncsi Non-Correctable Scrubbing Error
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMIRC_PFIC, MSMC_SMIRC_MPEC, MSMC_SMIRC_CEC,
- * @n MSMC_SMIRC_NCEC, MSMC_SMIRC_CSC, MSMC_SMIRC_NCSC
- *
- * @b Example
- * @verbatim
- Uint16 pfiStat;
- Uint8 cei;
- Uint8 ncei;
- Uint8 csi;
- Uint8 ncsi;
- // Get the MSMC Raw Interrupt Status
- CSL_MSMC_getRawInterruptStatus (&pfiStat, &cei, &ncei, &csi, &ncsi);
- ...
- // Clear the MSMC Interrupt Status.
- CSL_MSMC_clearRawInterruptStatus (pfiStat, cei, ncei, csi, ncsi);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_clearRawInterruptStatus
- (
- Uint16 pfiStat,
- Uint8 cei,
- Uint8 ncei,
- Uint8 csi,
- Uint8 ncsi
- )
- {
- hMsmc->SMIRC = CSL_FMK (MSMC_SMIRC_PFIC, pfiStat) |
- CSL_FMK (MSMC_SMIRC_CEC, cei) |
- CSL_FMK (MSMC_SMIRC_NCEC, ncei) |
- CSL_FMK (MSMC_SMIRC_CSC, csi) |
- CSL_FMK (MSMC_SMIRC_NCSC, ncsi);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getInterruptEnableStatus
- *
- * @b Description
- * @n This function is used to get the interrupt enable/disable status
- *
- * @b Arguments
- @verbatim
- pfiStat Protection Fault Status
- cei Correctable EDC Error
- ncei Non-Correctable EDC Error
- csi Correctable Scrubbing Error
- ncsi Non-Correctable Scrubbing Error
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMIESTAT_PFIESTAT, MSMC_SMIESTAT_CEIE, MSMC_SMIESTAT_NCEIE,
- * @n MSMC_SMIESTAT_CSIE,MSMC_SMIESTAT_NCSIE
- *
- * @b Example
- * @verbatim
- Uint16 pfiStat;
- Uint8 cei;
- Uint8 ncei;
- Uint8 csi;
- Uint8 ncsi;
- // Get the interrupt enable status.
- CSL_MSMC_getInterruptEnableStatus (&pfiStat, &cei, &ncei, &csi, &ncsi);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getInterruptEnableStatus
- (
- Uint16* pfiStat,
- Uint8* cei,
- Uint8* ncei,
- Uint8* csi,
- Uint8* ncsi
- )
- {
- Uint32 value = hMsmc->SMIESTAT;
- *pfiStat = CSL_FEXT (value, MSMC_SMIESTAT_PFIESTAT);
- *cei = CSL_FEXT (value, MSMC_SMIESTAT_CEIE);
- *ncei = CSL_FEXT (value, MSMC_SMIESTAT_NCEIE);
- *csi = CSL_FEXT (value, MSMC_SMIESTAT_CSIE);
- *ncsi = CSL_FEXT (value, MSMC_SMIESTAT_NCSIE);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_enableInterrupts
- *
- * @b Description
- * @n This function enables the MSMC interrupts
- *
- * @b Arguments
- @verbatim
- pfiStat Protection Fault Status
- cei Correctable EDC Error
- ncei Non-Correctable EDC Error
- csi Correctable Scrubbing Error
- ncsi Non-Correctable Scrubbing Error
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMIESTAT_PFIESTAT, MSMC_SMIESTAT_CEIE, MSMC_SMIESTAT_NCEIE,
- * @n MSMC_SMIESTAT_CSIE,MSMC_SMIESTAT_NCSIE
- *
- * @b Example
- * @verbatim
- // Enable all interrupts except the scrubbing errors.
- CSL_MSMC_enableInterrupts (0xFFFF, 0x1, 0x1, 0x0, 0x0);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_enableInterrupts
- (
- Uint16 pfiStat,
- Uint8 cei,
- Uint8 ncei,
- Uint8 csi,
- Uint8 ncsi
- )
- {
- hMsmc->SMIESTAT = CSL_FMK (MSMC_SMIESTAT_PFIESTAT, pfiStat) |
- CSL_FMK (MSMC_SMIESTAT_CEIE, cei) |
- CSL_FMK (MSMC_SMIESTAT_NCEIE, ncei) |
- CSL_FMK (MSMC_SMIESTAT_CSIE, csi) |
- CSL_FMK (MSMC_SMIESTAT_NCSIE, ncsi);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_disableInterrupts
- *
- * @b Description
- * @n This function disables the MSMC interrupts
- *
- * @b Arguments
- @verbatim
- pfiStat Protection Fault Status
- cei Correctable EDC Error
- ncei Non-Correctable EDC Error
- csi Correctable Scrubbing Error
- ncsi Non-Correctable Scrubbing Error
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMIEC_PFIEC, MSMC_SMIEC_CEEC, MSMC_SMIEC_NCEEC,
- * @n MSMC_SMIEC_CSEC, MSMC_SMIEC_NCSEC
- *
- * @b Example
- * @verbatim
- // Disable all interrupts except the scrubbing errors.
- CSL_MSMC_disableInterrupts (0xFFFF, 0x1, 0x1, 0x0, 0x0);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_disableInterrupts
- (
- Uint16 pfiStat,
- Uint8 cei,
- Uint8 ncei,
- Uint8 csi,
- Uint8 ncsi
- )
- {
- hMsmc->SMIEC = CSL_FMK (MSMC_SMIEC_PFIEC, pfiStat) |
- CSL_FMK (MSMC_SMIEC_CEEC, cei) |
- CSL_FMK (MSMC_SMIEC_NCEEC, ncei) |
- CSL_FMK (MSMC_SMIEC_CSEC, csi) |
- CSL_FMK (MSMC_SMIEC_NCSEC, ncsi);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getTransmitHeader
- *
- * @b Description
- * @n This function gets the transmit header for analysis counter state
- * export through STM
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n Transmit Header
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMATH
- *
- * @b Example
- * @verbatim
- Uint32 transmitHeader;
- // Get the Transmit Header
- transmitHeader = CSL_MSMC_getTransmitHeader();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getTransmitHeader (void)
- {
- return hMsmc->SMATH;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setTransmitHeader
- *
- * @b Description
- * @n This function sets the transmit header for analysis counter state
- * export through STM
- *
- * @b Arguments
- @verbatim
- transmitHeader Transmit header to be configured
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMATH
- *
- * @b Example
- * @verbatim
- // Set the Transmit Header
- CSL_MSMC_getTransmitHeader(0x100);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setTransmitHeader (Uint32 transmitHeader)
- {
- hMsmc->SMATH = transmitHeader;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getHitCounter
- *
- * @b Description
- * @n This function gets the hit counter for the cache. If the HM bit in SMAC
- * is set, it is a counter for Cache hits+SRAM accesses
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n Hit Counter
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMAH_HCNT
- *
- * @b Example
- * @verbatim
- Uint32 hitCounter;
- // Get the Hit Counter
- hitCounter = CSL_MSMC_getHitCounter();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getHitCounter (void)
- {
- return CSL_FEXT (hMsmc->SMAH, MSMC_SMAH_HCNT);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setHitCounter
- *
- * @b Description
- * @n This function sets the hit counter for the cache. If the HM bit in SMAC
- * is set, it is a counter for Cache hits+SRAM accesses
- *
- * @b Arguments
- * @n hitCounter - Hit Counter to be configured.
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMAH_HCNT
- *
- * @b Example
- * @verbatim
- // Reset the hit counter
- CSL_MSMC_setHitCounter(0);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setHitCounter (Uint32 hitCounter)
- {
- CSL_FINS (hMsmc->SMAH, MSMC_SMAH_HCNT, hitCounter);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getMissCounter
- *
- * @b Description
- * @n This function gets the reads/write miss counters
- *
- * @b Arguments
- @verbatim
- readMissCntr Read Miss Counter
- writeMissCntr Write Miss Counter
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMARM_RMCNT,MSMC_SMAWM_WMCNT
- *
- * @b Example
- * @verbatim
- Uint32 readMiss;
- Uint32 writeMiss;
- // Get the Read and Write Miss Counters
- CSL_MSMC_getMissCounter(&readMiss, &writeMiss);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getMissCounter (Uint32* readMiss, Uint32* writeMiss)
- {
- *readMiss = CSL_FEXT (hMsmc->SMARM, MSMC_SMARM_RMCNT);
- *writeMiss = CSL_FEXT (hMsmc->SMAWM, MSMC_SMAWM_WMCNT);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setMissCounter
- *
- * @b Description
- * @n This function sets the reads/write miss counters
- *
- * @b Arguments
- @verbatim
- readMissCntr Read Miss Counter
- writeMissCntr Write Miss Counter
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMARM_RMCNT, MSMC_SMAWM_WMCNT
- *
- * @b Example
- * @verbatim
- // Clear the Read & Write Miss Counters
- CSL_MSMC_getMissCounter(&readMiss, &writeMiss);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setMissCounter (Uint32 readMiss, Uint32 writeMiss)
- {
- CSL_FINS (hMsmc->SMARM, MSMC_SMARM_RMCNT, readMiss);
- CSL_FINS (hMsmc->SMAWM, MSMC_SMAWM_WMCNT, writeMiss);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getVictimCounter
- *
- * @b Description
- * @n This function gets the victim counter
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n Victim Counter
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMAV_VCNT
- *
- * @b Example
- * @verbatim
- Uint32 victimCounter;
- // Get the Victim Counter
- victimCounter = CSL_MSMC_getVictimCounter();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getVictimCounter (void)
- {
- return CSL_FEXT (hMsmc->SMAV, MSMC_SMAV_VCNT);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setVictimCounter
- *
- * @b Description
- * @n This function sets the victim counter
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n Victim Counter
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMAV_VCNT
- *
- * @b Example
- * @verbatim
- // Reset the Victim Counter
- CSL_MSMC_setVictimCounter(0);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setVictimCounter (Uint32 victimCounter)
- {
- CSL_FINS (hMsmc->SMAV, MSMC_SMAV_VCNT, victimCounter);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getMemoryArbiterCounters
- *
- * @b Description
- * @n This function gets the performance counters for the memory arbiters
- * (all banks).
- *
- * @b Arguments
- @verbatim
- priorityElevationCounter Priority Elevation Counter
- accCyclesCounter Accumulated Cycles counter
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMAMP_MPECNT, MSMC_SMAMP_ACWM
- *
- * @b Example
- * @verbatim
- Uint8 priorityElevationCounter;
- Uint32 accCyclesCounter;
- // Get the Memory Arbiter Counters
- CSL_MSMC_getMemoryArbiterCounters(&priorityElevationCounter, &accCyclesCounter);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getMemoryArbiterCounters
- (
- Uint8* priorityElevationCounter,
- Uint32* accCyclesCounter
- )
- {
- *priorityElevationCounter = CSL_FEXT (hMsmc->SMAMP, MSMC_SMAMP_MPECNT);
- *accCyclesCounter = CSL_FEXT (hMsmc->SMAMP, MSMC_SMAMP_ACWM);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setMemoryArbiterCounters
- *
- * @b Description
- * @n This function sets the performance counters for the memory arbiters
- * (all banks).
- *
- * @b Arguments
- @verbatim
- accCyclesCounter Accumulated Cycles counter
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMAMP_ACWM
- *
- * @b Example
- * @verbatim
- // Clear the Memory Arbiter Counters
- CSL_MSMC_setMemoryArbiterCounters(0);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setMemoryArbiterCounters(Uint32 accCyclesCounter)
- {
- CSL_FINS (hMsmc->SMAMP, MSMC_SMAMP_ACWM, accCyclesCounter);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getPortArbiterCounters
- *
- * @b Description
- * @n This function gets the performance counters for the port arbiters
- *
- * @b Arguments
- @verbatim
- priorityElevationCounter Priority Elevation Counter
- accCyclesCounter Accumulated Cycles counter
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMAEP_EPECNT, MSMC_SMAEP_ACWE
- *
- * @b Example
- * @verbatim
- Uint8 priorityElevationCounter;
- Uint32 accCyclesCounter;
- // Get the Port Arbiter Counters
- CSL_MSMC_getPortArbiterCounters(&priorityElevationCounter, &accCyclesCounter);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getPortArbiterCounters
- (
- Uint8* priorityElevationCounter,
- Uint32* accCyclesCounter
- )
- {
- *priorityElevationCounter = CSL_FEXT (hMsmc->SMAEP, MSMC_SMAEP_EPECNT);
- *accCyclesCounter = CSL_FEXT (hMsmc->SMAEP, MSMC_SMAEP_ACWE);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setPortArbiterCounters
- *
- * @b Description
- * @n This function sets the performance counters for the port arbiters
- *
- * @b Arguments
- @verbatim
- accCyclesCounter Accumulated Cycles counter
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMAEP_ACWE
- *
- * @b Example
- * @verbatim
- // Reset the Port Arbiter Counters
- CSL_MSMC_setPortArbiterCounters(0);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setPortArbiterCounters(Uint32 accCyclesCounter)
- {
- CSL_FINS (hMsmc->SMAEP, MSMC_SMAEP_ACWE, accCyclesCounter);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getPerfFilters
- *
- * @b Description
- * @n This function gets the performance counters filters
- *
- * @b Arguments
- @verbatim
- ccf CPU filter for counters
- pidf System request PrivID filter for counters
- hm Selects if SMAH:HCNT counts only cache hits or SRAM accesses
- pth Priority threshold filter
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMAC_CCF, MSMC_SMAC_PIDF, MSMC_SMAC_HM, MSMC_SMAC_PTH
- *
- * @b Example
- * @verbatim
- Uint8 ccf;
- Uint16 pidf;
- Uint8 hm;
- Uint8 pth;
- // Get the Performance Filters
- CSL_MSMC_getPerfFilters(&ccf, &pidf, &hm, &pth);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getPerfFilters
- (
- Uint8* ccf,
- Uint16* pidf,
- Uint8* hm,
- Uint8* pth
- )
- {
- Uint32 value = hMsmc->SMAC;
- *ccf = CSL_FEXT (value, MSMC_SMAC_CCF);
- *pidf = CSL_FEXT (value, MSMC_SMAC_PIDF);
- *hm = CSL_FEXT (value, MSMC_SMAC_HM);
- *pth = CSL_FEXT (value, MSMC_SMAC_PTH);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setPerfFilters
- *
- * @b Description
- * @n This function sets the performance counters filters
- *
- * @b Arguments
- @verbatim
- ccf CPU filter for counters
- pidf System request PrivID filter for counters
- hm Selects if SMAH:HCNT counts only cache hits or SRAM accesses
- pth Priority threshold filter
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMAC_CCF, MSMC_SMAC_PIDF, MSMC_SMAC_HM, MSMC_SMAC_PTH
- *
- * @b Example
- * @verbatim
- Uint8 ccf;
- Uint16 pidf;
- Uint8 hm;
- Uint8 pth;
- // Get the Performance Filters
- CSL_MSMC_getPerfFilters(&ccf, &pidf, &hm, &pth);
- ...
- // Make sure we counter SRAM access also.
- CSL_MSMC_setPerfFilters(ccf, pidf, 1, pth);
- ...
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setPerfFilters
- (
- Uint8 ccf,
- Uint16 pidf,
- Uint8 hm,
- Uint8 pth
- )
- {
- hMsmc->SMAC = CSL_FMK(MSMC_SMAC_CCF, ccf) |
- CSL_FMK(MSMC_SMAC_PIDF, pidf) |
- CSL_FMK(MSMC_SMAC_HM, hm) |
- CSL_FMK(MSMC_SMAC_PTH, pth);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_enableAnalysisCounter
- *
- * @b Description
- * @n This function enables the analysis counters
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMAC_AEN=1
- *
- * @b Example
- * @verbatim
-
- // Enables the performance analysis counter
- CSL_MSMC_enableAnalysisCounter();
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_enableAnalysisCounter (void)
- {
- CSL_FINS (hMsmc->SMAC, MSMC_SMAC_AEN, 1);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_disableAnalysisCounter
- *
- * @b Description
- * @n This function disables the analysis counters
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMAC_AEN=0
- *
- * @b Example
- * @verbatim
-
- // Disables the performance analysis counter
- CSL_MSMC_disableAnalysisCounter();
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_disableAnalysisCounter (void)
- {
- CSL_FINS (hMsmc->SMAC, MSMC_SMAC_AEN, 0);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getPriorityLevel
- *
- * @b Description
- * @n This function gets the priority level used for software initiated
- * global invalidate
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMCFG_INVP
- *
- * @b Example
- * @verbatim
- Uint8 priorityLevel;
- // Get the priority Level.
- priorityLevel = CSL_MSMC_getPriorityLevel ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint8 CSL_MSMC_getPriorityLevel (void)
- {
- return CSL_FEXT (hMsmc->SMCFG, MSMC_SMCFG_INVP);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setPriorityLevel
- *
- * @b Description
- * @n This function sets the priority level used for software initiated
- * global invalidate
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMCFG_INVP
- *
- * @b Example
- * @verbatim
- // Set the priority Level.
- CSL_MSMC_setPriorityLevel (0x1);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setPriorityLevel (Uint8 priorityLevel)
- {
- CSL_FINS (hMsmc->SMCFG, MSMC_SMCFG_INVP, priorityLevel);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_freezeCache
- *
- * @b Description
- * @n This function freezes the MSMC cache
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMCFG_EFZ=1
- *
- * @b Example
- * @verbatim
- // Freeze the MSMC Cache
- CSL_MSMC_freezeCache ();
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_freezeCache (void)
- {
- CSL_FINS (hMsmc->SMCFG, MSMC_SMCFG_EFZ, 1);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_unFreezeCache
- *
- * @b Description
- * @n This function unfreezes the MSMC cache
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Writes
- * @n MSMC_SMCFG_EFZ=0
- *
- * @b Example
- * @verbatim
- // Unfreeze the MSMC Cache
- CSL_MSMC_unFreezeCache ();
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_unFreezeCache (void)
- {
- CSL_FINS (hMsmc->SMCFG, MSMC_SMCFG_EFZ, 0);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_isCacheFrozen
- *
- * @b Description
- * @n This function checks if the MSMC cache is frozen or not?
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n TRUE - Cache is frozen
- * @n FALSE - Cache is not frozen
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMCFG_EFZ
- *
- * @b Example
- * @verbatim
- // Check the status of the cache
- if (CSL_MSMC_isCacheFrozen () == TRUE)
- {
- // Cache is frozen.
- }
- else
- {
- // Cache is NOT frozen.
- }
- @endverbatim
- * =============================================================================
- */
- static inline Bool CSL_MSMC_isCacheFrozen (void)
- {
- if (CSL_FEXT (hMsmc->SMCFG, MSMC_SMCFG_EFZ) == 1)
- return TRUE;
- return FALSE;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_invalidateCache
- *
- * @b Description
- * @n This function does a global invalidation of all the lines in the cache.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n All Cache lines are invalidated.
- *
- * @b Writes
- * @n MSMC_SMCFG_GIW=1
- *
- * @b Example
- * @verbatim
- CSL_MSMC_invalidateCache ();
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_invalidateCache (void)
- {
- CSL_FINS (hMsmc->SMCFG, MSMC_SMCFG_GIW, 1);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getInvalidateCacheStatus
- *
- * @b Description
- * @n This function returns the value of invalidate bit in SMCFG register.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMCFG_GIW
- *
- * @b Example
- * @verbatim
- Uint32 invStatus;
- invStatus = CSL_MSMC_getInvalidateCacheStatus ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getInvalidateCacheStatus (void)
- {
- return CSL_FEXT (hMsmc->SMCFG, MSMC_SMCFG_GIW);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_setCacheSize
- *
- * @b Description
- * @n This function sets the amount of memory configured as cache.
- *
- * @b Arguments
- @verbatim
- cmode size of cache
- @endverbatim
- *
- * <b> Return Value </b>
- * @n None
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n MSMC Cache Memory Size is configured.
- *
- * @b Writes
- * @n MSMC_SMCFG_CMODE
- *
- * @b Example
- * @verbatim
- CSL_MSMC_setCacheSize (2);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_setCacheSize (Uint32 cmode)
- {
- CSL_FINS (hMsmc->SMCFG, MSMC_SMCFG_CMODE, cmode);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getCacheSize
- *
- * @b Description
- * @n This function returns the amount of memory configured as cache.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n Cache Size
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMCFG_CMODE
- *
- * @b Example
- * @verbatim
- Uint32 cacheSize;
- cacheSize = CSL_MSMC_getCacheSize ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getCacheSize (void)
- {
- return CSL_FEXT (hMsmc->SMCFG, MSMC_SMCFG_CMODE);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getSharedMemoryErrorAddress
- *
- * @b Description
- * @n This function returns the lower 32 bits of the 36 bit address used in the
- * accessing the corrupted location.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n Shared Memory Error Address
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMNCERRAR
- *
- * @b Example
- * @verbatim
- Uint32 memErrAddress;
- memErrAddress = CSL_MSMC_getSharedMemoryErrorAddress ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getSharedMemoryErrorAddress (void)
- {
- return hMsmc->SMNCERRAR;
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getSharedMemoryErrorAddressExtendedInfo
- *
- * @b Description
- * @n This function returns extended information i.e. upper 4 bits, priv id
- * which caused the error which accessing the corrupted location.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n Shared Memory Extended Information
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMNCERRXR_SEEADDR, MSMC_SMNCERRXR_SEPID, MSMC_SMNCERRXR_SER
- *
- * @b Example
- * @verbatim
- Uint8 seeAddr;
- Uint8 sepId;
- Uint8 ser;
- CSL_MSMC_getSharedMemoryErrorAddressExtendedInfo (&seeAddr, &sepId, &ser);
- @endverbatim
- * =============================================================================
- */
- static inline void CSL_MSMC_getSharedMemoryErrorAddressExtendedInfo
- (
- Uint8* seeAddr,
- Uint8* sepId,
- Uint8* ser
- )
- {
- Uint32 value = hMsmc->SMNCERRXR;
- *seeAddr = CSL_FEXT (value, MSMC_SMNCERRXR_SEEADDR);
- *sepId = CSL_FEXT (value, MSMC_SMNCERRXR_SEPID);
- *ser = CSL_FEXT (value, MSMC_SMNCERRXR_SER);
- }
- /** ============================================================================
- * @n@b CSL_MSMC_getScrubbingEngineErrorAddress
- *
- * @b Description
- * @n This function returns the scrubbing engine address after a 2-bit non
- * correctable address is detected.
- *
- * @b Arguments
- * @n None
- *
- * <b> Return Value </b>
- * @n Address which caused the error
- *
- * <b> Pre Condition </b>
- * @n None
- *
- * <b> Post Condition </b>
- * @n None
- *
- * @b Reads
- * @n MSMC_SMNCEA_SENCA
- *
- * @b Example
- * @verbatim
- Uint32 errAddress;
- errAddress = CSL_MSMC_getScrubbingEngineErrorAddress ();
- @endverbatim
- * =============================================================================
- */
- static inline Uint32 CSL_MSMC_getScrubbingEngineErrorAddress()
- {
- return CSL_FEXT (hMsmc->SMNCEA, MSMC_SMNCEA_SENCA);
- }
- /* @} */
- #ifdef __cplusplus
- }
- #endif
- #endif /* CSL_MSMCAUX_H_ */
|