1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833 |
- #ifndef LANGUAGE
- # ifdef __ASSEMBLY__
- # define LANGUAGE Assembly
- # else
- # define LANGUAGE C
- # endif
- #endif
- #ifndef io_p2v
- #define io_p2v(PhAdd) (PhAdd)
- #endif
- #include <asm/arch-sa1100/bitfield.h>
- #define C 0
- #define Assembly 1
- #if LANGUAGE == C
- typedef unsigned short Word16 ;
- typedef unsigned int Word32 ;
- typedef Word32 Word ;
- typedef Word Quad [4] ;
- typedef void *Address ;
- typedef void (*ExcpHndlr) (void) ;
- #endif
- #define MemBnkSp 0x08000000
- #define StMemBnkSp MemBnkSp
- #define StMemBnk0Sp StMemBnkSp
-
- #define StMemBnk1Sp StMemBnkSp
-
- #define StMemBnk2Sp StMemBnkSp
-
- #define StMemBnk3Sp StMemBnkSp
-
- #define DRAMBnkSp MemBnkSp
- #define DRAMBnk0Sp DRAMBnkSp
- #define DRAMBnk1Sp DRAMBnkSp
- #define DRAMBnk2Sp DRAMBnkSp
- #define DRAMBnk3Sp DRAMBnkSp
- #define ZeroMemSp MemBnkSp
- #define _StMemBnk(Nb) \
- (0x00000000 + (Nb)*StMemBnkSp)
- #define _StMemBnk0 _StMemBnk (0)
- #define _StMemBnk1 _StMemBnk (1)
- #define _StMemBnk2 _StMemBnk (2)
- #define _StMemBnk3 _StMemBnk (3)
- #if LANGUAGE == C
- typedef Quad StMemBnkType [StMemBnkSp/sizeof (Quad)] ;
- #define StMemBnk \
- ((StMemBnkType *) io_p2v (_StMemBnk (0)))
- #define StMemBnk0 (StMemBnk [0])
- #define StMemBnk1 (StMemBnk [1])
- #define StMemBnk2 (StMemBnk [2])
- #define StMemBnk3 (StMemBnk [3])
- #endif
- #define _DRAMBnk(Nb) \
- (0xC0000000 + (Nb)*DRAMBnkSp)
- #define _DRAMBnk0 _DRAMBnk (0)
- #define _DRAMBnk1 _DRAMBnk (1)
- #define _DRAMBnk2 _DRAMBnk (2)
- #define _DRAMBnk3 _DRAMBnk (3)
- #if LANGUAGE == C
- typedef Quad DRAMBnkType [DRAMBnkSp/sizeof (Quad)] ;
- #define DRAMBnk \
- ((DRAMBnkType *) io_p2v (_DRAMBnk (0)))
- #define DRAMBnk0 (DRAMBnk [0])
- #define DRAMBnk1 (DRAMBnk [1])
- #define DRAMBnk2 (DRAMBnk [2])
- #define DRAMBnk3 (DRAMBnk [3])
- #endif
- #define _ZeroMem 0xE0000000
- #if LANGUAGE == C
- typedef Quad ZeroMemType [ZeroMemSp/sizeof (Quad)] ;
- #define ZeroMem \
- (*((ZeroMemType *) io_p2v (_ZeroMem)))
- #endif
- #define PCMCIAPrtSp 0x04000000
- #define PCMCIASp (4*PCMCIAPrtSp)
- #define PCMCIAIOSp PCMCIAPrtSp
- #define PCMCIAAttrSp PCMCIAPrtSp
- #define PCMCIAMemSp PCMCIAPrtSp
- #define PCMCIA0Sp PCMCIASp
- #define PCMCIA0IOSp PCMCIAIOSp
- #define PCMCIA0AttrSp PCMCIAAttrSp
- #define PCMCIA0MemSp PCMCIAMemSp
- #define PCMCIA1Sp PCMCIASp
- #define PCMCIA1IOSp PCMCIAIOSp
- #define PCMCIA1AttrSp PCMCIAAttrSp
- #define PCMCIA1MemSp PCMCIAMemSp
- #define _PCMCIA(Nb) \
- (0x20000000 + (Nb)*PCMCIASp)
- #define _PCMCIAIO(Nb) _PCMCIA (Nb)
- #define _PCMCIAAttr(Nb) \
- (_PCMCIA (Nb) + 2*PCMCIAPrtSp)
- #define _PCMCIAMem(Nb) \
- (_PCMCIA (Nb) + 3*PCMCIAPrtSp)
- #define _PCMCIA0 _PCMCIA (0)
- #define _PCMCIA0IO _PCMCIAIO (0)
- #define _PCMCIA0Attr _PCMCIAAttr (0)
- #define _PCMCIA0Mem _PCMCIAMem (0)
- #define _PCMCIA1 _PCMCIA (1)
- #define _PCMCIA1IO _PCMCIAIO (1)
- #define _PCMCIA1Attr _PCMCIAAttr (1)
- #define _PCMCIA1Mem _PCMCIAMem (1)
- #if LANGUAGE == C
- typedef Quad PCMCIAPrtType [PCMCIAPrtSp/sizeof (Quad)] ;
- typedef PCMCIAPrtType PCMCIAType [PCMCIASp/PCMCIAPrtSp] ;
- #define PCMCIA0 \
- (*((PCMCIAType *) io_p2v (_PCMCIA0)))
- #define PCMCIA0IO \
- (*((PCMCIAPrtType *) io_p2v (_PCMCIA0IO)))
- #define PCMCIA0Attr \
- (*((PCMCIAPrtType *) io_p2v (_PCMCIA0Attr)))
- #define PCMCIA0Mem \
- (*((PCMCIAPrtType *) io_p2v (_PCMCIA0Mem)))
- #define PCMCIA1 \
- (*((PCMCIAType *) io_p2v (_PCMCIA1)))
- #define PCMCIA1IO \
- (*((PCMCIAPrtType *) io_p2v (_PCMCIA1IO)))
- #define PCMCIA1Attr \
- (*((PCMCIAPrtType *) io_p2v (_PCMCIA1Attr)))
- #define PCMCIA1Mem \
- (*((PCMCIAPrtType *) io_p2v (_PCMCIA1Mem)))
- #endif
- #define _Ser0UDCCR 0x80000000
- #define _Ser0UDCAR 0x80000004
- #define _Ser0UDCOMP 0x80000008
-
- #define _Ser0UDCIMP 0x8000000C
-
- #define _Ser0UDCCS0 0x80000010
-
- #define _Ser0UDCCS1 0x80000014
-
- #define _Ser0UDCCS2 0x80000018
-
- #define _Ser0UDCD0 0x8000001C
-
- #define _Ser0UDCWC 0x80000020
-
- #define _Ser0UDCDR 0x80000028
- #define _Ser0UDCSR 0x80000030
- #if LANGUAGE == C
- #define Ser0UDCCR \
- (*((volatile Word *) io_p2v (_Ser0UDCCR)))
- #define Ser0UDCAR \
- (*((volatile Word *) io_p2v (_Ser0UDCAR)))
- #define Ser0UDCOMP \
- \
- (*((volatile Word *) io_p2v (_Ser0UDCOMP)))
- #define Ser0UDCIMP \
- \
- (*((volatile Word *) io_p2v (_Ser0UDCIMP)))
- #define Ser0UDCCS0 \
- \
- (*((volatile Word *) io_p2v (_Ser0UDCCS0)))
- #define Ser0UDCCS1 \
- \
- (*((volatile Word *) io_p2v (_Ser0UDCCS1)))
- #define Ser0UDCCS2 \
- \
- (*((volatile Word *) io_p2v (_Ser0UDCCS2)))
- #define Ser0UDCD0 \
- \
- (*((volatile Word *) io_p2v (_Ser0UDCD0)))
- #define Ser0UDCWC \
- \
- (*((volatile Word *) io_p2v (_Ser0UDCWC)))
- #define Ser0UDCDR \
- (*((volatile Word *) io_p2v (_Ser0UDCDR)))
- #define Ser0UDCSR \
- (*((volatile Word *) io_p2v (_Ser0UDCSR)))
- #endif
- #define UDCCR_UDD 0x00000001
- #define UDCCR_UDA 0x00000002
- #define UDCCR_RESIM 0x00000004
- #define UDCCR_EIM 0x00000008
-
- #define UDCCR_RIM 0x00000010
-
- #define UDCCR_TIM 0x00000020
-
- #define UDCCR_SRM 0x00000040
-
- #define UDCCR_SUSIM UDCCR_SRM
- #define UDCCR_REM 0x00000080
- #define UDCAR_ADD Fld (7, 0)
- #define UDCOMP_OUTMAXP Fld (8, 0)
-
- #define UDCOMP_OutMaxPkt(Size) \
- \
- (((Size) - 1) << FShft (UDCOMP_OUTMAXP))
- #define UDCIMP_INMAXP Fld (8, 0)
-
- #define UDCIMP_InMaxPkt(Size) \
- \
- (((Size) - 1) << FShft (UDCIMP_INMAXP))
- #define UDCCS0_OPR 0x00000001
- #define UDCCS0_IPR 0x00000002
- #define UDCCS0_SST 0x00000004
- #define UDCCS0_FST 0x00000008
- #define UDCCS0_DE 0x00000010
- #define UDCCS0_SE 0x00000020
- #define UDCCS0_SO 0x00000040
-
- #define UDCCS0_SSE 0x00000080
- #define UDCCS1_RFS 0x00000001
-
- #define UDCCS1_RPC 0x00000002
- #define UDCCS1_RPE 0x00000004
- #define UDCCS1_SST 0x00000008
- #define UDCCS1_FST 0x00000010
- #define UDCCS1_RNE 0x00000020
- #define UDCCS2_TFS 0x00000001
-
- #define UDCCS2_TPC 0x00000002
- #define UDCCS2_TPE 0x00000004
- #define UDCCS2_TUR 0x00000008
- #define UDCCS2_SST 0x00000010
- #define UDCCS2_FST 0x00000020
- #define UDCD0_DATA Fld (8, 0)
- #define UDCWC_WC Fld (4, 0)
- #define UDCDR_DATA Fld (8, 0)
- #define UDCSR_EIR 0x00000001
- #define UDCSR_RIR 0x00000002
- #define UDCSR_TIR 0x00000004
- #define UDCSR_SUSIR 0x00000008
- #define UDCSR_RESIR 0x00000010
- #define UDCSR_RSTIR 0x00000020
- #define _UTCR0(Nb) \
- (0x80010000 + ((Nb) - 1)*0x00020000)
- #define _UTCR1(Nb) \
- (0x80010004 + ((Nb) - 1)*0x00020000)
- #define _UTCR2(Nb) \
- (0x80010008 + ((Nb) - 1)*0x00020000)
- #define _UTCR3(Nb) \
- (0x8001000C + ((Nb) - 1)*0x00020000)
- #define _UTCR4(Nb) \
- (0x80010010 + ((Nb) - 1)*0x00020000)
- #define _UTDR(Nb) \
- (0x80010014 + ((Nb) - 1)*0x00020000)
- #define _UTSR0(Nb) \
- (0x8001001C + ((Nb) - 1)*0x00020000)
- #define _UTSR1(Nb) \
- (0x80010020 + ((Nb) - 1)*0x00020000)
- #define _Ser1UTCR0 _UTCR0 (1)
- #define _Ser1UTCR1 _UTCR1 (1)
- #define _Ser1UTCR2 _UTCR2 (1)
- #define _Ser1UTCR3 _UTCR3 (1)
- #define _Ser1UTDR _UTDR (1)
- #define _Ser1UTSR0 _UTSR0 (1)
- #define _Ser1UTSR1 _UTSR1 (1)
- #define _Ser2UTCR0 _UTCR0 (2)
- #define _Ser2UTCR1 _UTCR1 (2)
- #define _Ser2UTCR2 _UTCR2 (2)
- #define _Ser2UTCR3 _UTCR3 (2)
- #define _Ser2UTCR4 _UTCR4 (2)
- #define _Ser2UTDR _UTDR (2)
- #define _Ser2UTSR0 _UTSR0 (2)
- #define _Ser2UTSR1 _UTSR1 (2)
- #define _Ser3UTCR0 _UTCR0 (3)
- #define _Ser3UTCR1 _UTCR1 (3)
- #define _Ser3UTCR2 _UTCR2 (3)
- #define _Ser3UTCR3 _UTCR3 (3)
- #define _Ser3UTDR _UTDR (3)
- #define _Ser3UTSR0 _UTSR0 (3)
- #define _Ser3UTSR1 _UTSR1 (3)
- #if LANGUAGE == C
- #define Ser1UTCR0 \
- (*((volatile Word *) io_p2v (_Ser1UTCR0)))
- #define Ser1UTCR1 \
- (*((volatile Word *) io_p2v (_Ser1UTCR1)))
- #define Ser1UTCR2 \
- (*((volatile Word *) io_p2v (_Ser1UTCR2)))
- #define Ser1UTCR3 \
- (*((volatile Word *) io_p2v (_Ser1UTCR3)))
- #define Ser1UTDR \
- (*((volatile Word *) io_p2v (_Ser1UTDR)))
- #define Ser1UTSR0 \
- (*((volatile Word *) io_p2v (_Ser1UTSR0)))
- #define Ser1UTSR1 \
- (*((volatile Word *) io_p2v (_Ser1UTSR1)))
- #define Ser2UTCR0 \
- (*((volatile Word *) io_p2v (_Ser2UTCR0)))
- #define Ser2UTCR1 \
- (*((volatile Word *) io_p2v (_Ser2UTCR1)))
- #define Ser2UTCR2 \
- (*((volatile Word *) io_p2v (_Ser2UTCR2)))
- #define Ser2UTCR3 \
- (*((volatile Word *) io_p2v (_Ser2UTCR3)))
- #define Ser2UTCR4 \
- (*((volatile Word *) io_p2v (_Ser2UTCR4)))
- #define Ser2UTDR \
- (*((volatile Word *) io_p2v (_Ser2UTDR)))
- #define Ser2UTSR0 \
- (*((volatile Word *) io_p2v (_Ser2UTSR0)))
- #define Ser2UTSR1 \
- (*((volatile Word *) io_p2v (_Ser2UTSR1)))
- #define Ser3UTCR0 \
- (*((volatile Word *) io_p2v (_Ser3UTCR0)))
- #define Ser3UTCR1 \
- (*((volatile Word *) io_p2v (_Ser3UTCR1)))
- #define Ser3UTCR2 \
- (*((volatile Word *) io_p2v (_Ser3UTCR2)))
- #define Ser3UTCR3 \
- (*((volatile Word *) io_p2v (_Ser3UTCR3)))
- #define Ser3UTDR \
- (*((volatile Word *) io_p2v (_Ser3UTDR)))
- #define Ser3UTSR0 \
- (*((volatile Word *) io_p2v (_Ser3UTSR0)))
- #define Ser3UTSR1 \
- (*((volatile Word *) io_p2v (_Ser3UTSR1)))
- #elif LANGUAGE == Assembly
- #define Ser1UTCR0 ( io_p2v (_Ser1UTCR0))
- #define Ser1UTCR1 ( io_p2v (_Ser1UTCR1))
- #define Ser1UTCR2 ( io_p2v (_Ser1UTCR2))
- #define Ser1UTCR3 ( io_p2v (_Ser1UTCR3))
- #define Ser1UTDR ( io_p2v (_Ser1UTDR))
- #define Ser1UTSR0 ( io_p2v (_Ser1UTSR0))
- #define Ser1UTSR1 ( io_p2v (_Ser1UTSR1))
- #define Ser2UTCR0 ( io_p2v (_Ser2UTCR0))
- #define Ser2UTCR1 ( io_p2v (_Ser2UTCR1))
- #define Ser2UTCR2 ( io_p2v (_Ser2UTCR2))
- #define Ser2UTCR3 ( io_p2v (_Ser2UTCR3))
- #define Ser2UTCR4 ( io_p2v (_Ser2UTCR4))
- #define Ser2UTDR ( io_p2v (_Ser2UTDR))
- #define Ser2UTSR0 ( io_p2v (_Ser2UTSR0))
- #define Ser2UTSR1 ( io_p2v (_Ser2UTSR1))
- #define Ser3UTCR0 ( io_p2v (_Ser3UTCR0))
- #define Ser3UTCR1 ( io_p2v (_Ser3UTCR1))
- #define Ser3UTCR2 ( io_p2v (_Ser3UTCR2))
- #define Ser3UTCR3 ( io_p2v (_Ser3UTCR3))
- #define Ser3UTDR ( io_p2v (_Ser3UTDR))
- #define Ser3UTSR0 ( io_p2v (_Ser3UTSR0))
- #define Ser3UTSR1 ( io_p2v (_Ser3UTSR1))
- #endif
- #define UTCR0_PE 0x00000001
- #define UTCR0_OES 0x00000002
- #define UTCR0_OddPar (UTCR0_OES*0)
- #define UTCR0_EvenPar (UTCR0_OES*1)
- #define UTCR0_SBS 0x00000004
- #define UTCR0_1StpBit (UTCR0_SBS*0)
- #define UTCR0_2StpBit (UTCR0_SBS*1)
- #define UTCR0_DSS 0x00000008
- #define UTCR0_7BitData (UTCR0_DSS*0)
- #define UTCR0_8BitData (UTCR0_DSS*1)
- #define UTCR0_SCE 0x00000010
-
-
- #define UTCR0_RCE 0x00000020
- #define UTCR0_RcRsEdg (UTCR0_RCE*0)
- #define UTCR0_RcFlEdg (UTCR0_RCE*1)
- #define UTCR0_TCE 0x00000040
- #define UTCR0_TrRsEdg (UTCR0_TCE*0)
- #define UTCR0_TrFlEdg (UTCR0_TCE*1)
- #define UTCR0_Ser2IrDA \
- (UTCR0_1StpBit + UTCR0_8BitData)
- #define UTCR1_BRD Fld (4, 0)
- #define UTCR2_BRD Fld (8, 0)
-
-
- #define UTCR1_BdRtDiv(Div) \
- (((Div) - 16)/16 >> FSize (UTCR2_BRD) << \
- FShft (UTCR1_BRD))
- #define UTCR2_BdRtDiv(Div) \
- (((Div) - 16)/16 & FAlnMsk (UTCR2_BRD) << \
- FShft (UTCR2_BRD))
-
-
- #define UTCR1_CeilBdRtDiv(Div) \
- (((Div) - 1)/16 >> FSize (UTCR2_BRD) << \
- FShft (UTCR1_BRD))
- #define UTCR2_CeilBdRtDiv(Div) \
- (((Div) - 1)/16 & FAlnMsk (UTCR2_BRD) << \
- FShft (UTCR2_BRD))
-
-
- #define UTCR3_RXE 0x00000001
- #define UTCR3_TXE 0x00000002
- #define UTCR3_BRK 0x00000004
- #define UTCR3_RIE 0x00000008
-
- #define UTCR3_TIE 0x00000010
-
- #define UTCR3_LBM 0x00000020
- #define UTCR3_Ser2IrDA \
- \
- (UTCR3_RXE + UTCR3_TXE)
- #define UTCR4_HSE 0x00000001
-
- #define UTCR4_NRZ (UTCR4_HSE*0)
- #define UTCR4_HPSIR (UTCR4_HSE*1)
- #define UTCR4_LPM 0x00000002
- #define UTCR4_Z3_16Bit (UTCR4_LPM*0)
- #define UTCR4_Z1_6us (UTCR4_LPM*1)
- #define UTDR_DATA Fld (8, 0)
- #if 0
- #define UTDR_PRE 0x00000100
- #define UTDR_FRE 0x00000200
- #define UTDR_ROR 0x00000400
- #endif
- #define UTSR0_TFS 0x00000001
-
- #define UTSR0_RFS 0x00000002
-
- #define UTSR0_RID 0x00000004
- #define UTSR0_RBB 0x00000008
- #define UTSR0_REB 0x00000010
- #define UTSR0_EIF 0x00000020
- #define UTSR1_TBY 0x00000001
- #define UTSR1_RNE 0x00000002
- #define UTSR1_TNF 0x00000004
- #define UTSR1_PRE 0x00000008
- #define UTSR1_FRE 0x00000010
- #define UTSR1_ROR 0x00000020
- #define _Ser1SDCR0 0x80020060
- #define _Ser1SDCR1 0x80020064
- #define _Ser1SDCR2 0x80020068
- #define _Ser1SDCR3 0x8002006C
- #define _Ser1SDCR4 0x80020070
- #define _Ser1SDDR 0x80020078
- #define _Ser1SDSR0 0x80020080
- #define _Ser1SDSR1 0x80020084
- #if LANGUAGE == C
- #define Ser1SDCR0 \
- (*((volatile Word *) io_p2v (_Ser1SDCR0)))
- #define Ser1SDCR1 \
- (*((volatile Word *) io_p2v (_Ser1SDCR1)))
- #define Ser1SDCR2 \
- (*((volatile Word *) io_p2v (_Ser1SDCR2)))
- #define Ser1SDCR3 \
- (*((volatile Word *) io_p2v (_Ser1SDCR3)))
- #define Ser1SDCR4 \
- (*((volatile Word *) io_p2v (_Ser1SDCR4)))
- #define Ser1SDDR \
- (*((volatile Word *) io_p2v (_Ser1SDDR)))
- #define Ser1SDSR0 \
- (*((volatile Word *) io_p2v (_Ser1SDSR0)))
- #define Ser1SDSR1 \
- (*((volatile Word *) io_p2v (_Ser1SDSR1)))
- #endif
- #define SDCR0_SUS 0x00000001
- #define SDCR0_SDLC (SDCR0_SUS*0)
- #define SDCR0_UART (SDCR0_SUS*1)
- #define SDCR0_SDF 0x00000002
- #define SDCR0_SglFlg (SDCR0_SDF*0)
- #define SDCR0_DblFlg (SDCR0_SDF*1)
- #define SDCR0_LBM 0x00000004
- #define SDCR0_BMS 0x00000008
- #define SDCR0_FM0 (SDCR0_BMS*0)
- #define SDCR0_NRZ (SDCR0_BMS*1)
- #define SDCR0_SCE 0x00000010
- #define SDCR0_SCD 0x00000020
-
- #define SDCR0_SClkIn (SDCR0_SCD*0)
- #define SDCR0_SClkOut (SDCR0_SCD*1)
- #define SDCR0_RCE 0x00000040
- #define SDCR0_RcRsEdg (SDCR0_RCE*0)
- #define SDCR0_RcFlEdg (SDCR0_RCE*1)
- #define SDCR0_TCE 0x00000080
- #define SDCR0_TrRsEdg (SDCR0_TCE*0)
- #define SDCR0_TrFlEdg (SDCR0_TCE*1)
- #define SDCR1_AAF 0x00000001
-
- #define SDCR1_TXE 0x00000002
- #define SDCR1_RXE 0x00000004
- #define SDCR1_RIE 0x00000008
-
- #define SDCR1_TIE 0x00000010
-
- #define SDCR1_AME 0x00000020
- #define SDCR1_TUS 0x00000040
- #define SDCR1_EFrmURn (SDCR1_TUS*0)
- #define SDCR1_AbortURn (SDCR1_TUS*1)
- #define SDCR1_RAE 0x00000080
- #define SDCR2_AMV Fld (8, 0)
- #define SDCR3_BRD Fld (4, 0)
- #define SDCR4_BRD Fld (8, 0)
-
-
- #define SDCR3_BdRtDiv(Div) \
- (((Div) - 16)/16 >> FSize (SDCR4_BRD) << \
- FShft (SDCR3_BRD))
- #define SDCR4_BdRtDiv(Div) \
- (((Div) - 16)/16 & FAlnMsk (SDCR4_BRD) << \
- FShft (SDCR4_BRD))
-
-
- #define SDCR3_CeilBdRtDiv(Div) \
- (((Div) - 1)/16 >> FSize (SDCR4_BRD) << \
- FShft (SDCR3_BRD))
- #define SDCR4_CeilBdRtDiv(Div) \
- (((Div) - 1)/16 & FAlnMsk (SDCR4_BRD) << \
- FShft (SDCR4_BRD))
-
-
- #define SDDR_DATA Fld (8, 0)
- #if 0
- #define SDDR_EOF 0x00000100
- #define SDDR_CRE 0x00000200
- #define SDDR_ROR 0x00000400
- #endif
- #define SDSR0_EIF 0x00000001
- #define SDSR0_TUR 0x00000002
- #define SDSR0_RAB 0x00000004
- #define SDSR0_TFS 0x00000008
-
- #define SDSR0_RFS 0x00000010
-
- #define SDSR1_RSY 0x00000001
- #define SDSR1_TBY 0x00000002
- #define SDSR1_RNE 0x00000004
- #define SDSR1_TNF 0x00000008
- #define SDSR1_RTD 0x00000010
- #define SDSR1_EOF 0x00000020
- #define SDSR1_CRE 0x00000040
- #define SDSR1_ROR 0x00000080
- #define _Ser2HSCR0 0x80040060
- #define _Ser2HSCR1 0x80040064
- #define _Ser2HSDR 0x8004006C
- #define _Ser2HSSR0 0x80040074
- #define _Ser2HSSR1 0x80040078
- #define _Ser2HSCR2 0x90060028
- #if LANGUAGE == C
- #define Ser2HSCR0 \
- (*((volatile Word *) io_p2v (_Ser2HSCR0)))
- #define Ser2HSCR1 \
- (*((volatile Word *) io_p2v (_Ser2HSCR1)))
- #define Ser2HSDR \
- (*((volatile Word *) io_p2v (_Ser2HSDR)))
- #define Ser2HSSR0 \
- (*((volatile Word *) io_p2v (_Ser2HSSR0)))
- #define Ser2HSSR1 \
- (*((volatile Word *) io_p2v (_Ser2HSSR1)))
- #define Ser2HSCR2 \
- (*((volatile Word *) io_p2v (_Ser2HSCR2)))
- #endif
- #define HSCR0_ITR 0x00000001
- #define HSCR0_UART (HSCR0_ITR*0)
- #define HSCR0_HSSP (HSCR0_ITR*1)
- #define HSCR0_LBM 0x00000002
- #define HSCR0_TUS 0x00000004
- #define HSCR0_EFrmURn (HSCR0_TUS*0)
- #define HSCR0_AbortURn (HSCR0_TUS*1)
- #define HSCR0_TXE 0x00000008
- #define HSCR0_RXE 0x00000010
- #define HSCR0_RIE 0x00000020
-
- #define HSCR0_TIE 0x00000040
-
- #define HSCR0_AME 0x00000080
- #define HSCR1_AMV Fld (8, 0)
- #define HSDR_DATA Fld (8, 0)
- #if 0
- #define HSDR_EOF 0x00000100
- #define HSDR_CRE 0x00000200
- #define HSDR_ROR 0x00000400
- #endif
- #define HSSR0_EIF 0x00000001
- #define HSSR0_TUR 0x00000002
- #define HSSR0_RAB 0x00000004
- #define HSSR0_TFS 0x00000008
-
- #define HSSR0_RFS 0x00000010
-
- #define HSSR0_FRE 0x00000020
- #define HSSR1_RSY 0x00000001
- #define HSSR1_TBY 0x00000002
- #define HSSR1_RNE 0x00000004
- #define HSSR1_TNF 0x00000008
- #define HSSR1_EOF 0x00000010
- #define HSSR1_CRE 0x00000020
- #define HSSR1_ROR 0x00000040
- #define HSCR2_TXP 0x00040000
- #define HSCR2_TrDataL (HSCR2_TXP*0)
-
- #define HSCR2_TrDataH (HSCR2_TXP*1)
-
- #define HSCR2_RXP 0x00080000
- #define HSCR2_RcDataL (HSCR2_RXP*0)
-
- #define HSCR2_RcDataH (HSCR2_RXP*1)
-
- #define _Ser4MCCR0 0x80060000
- #define _Ser4MCDR0 0x80060008
-
- #define _Ser4MCDR1 0x8006000C
-
- #define _Ser4MCDR2 0x80060010
-
- #define _Ser4MCSR 0x80060018
- #define _Ser4MCCR1 0x90060030
- #if LANGUAGE == C
- #define Ser4MCCR0 \
- (*((volatile Word *) io_p2v (_Ser4MCCR0)))
- #define Ser4MCDR0 \
- \
- (*((volatile Word *) io_p2v (_Ser4MCDR0)))
- #define Ser4MCDR1 \
- \
- (*((volatile Word *) io_p2v (_Ser4MCDR1)))
- #define Ser4MCDR2 \
- \
- (*((volatile Word *) io_p2v (_Ser4MCDR2)))
- #define Ser4MCSR \
- (*((volatile Word *) io_p2v (_Ser4MCSR)))
- #define Ser4MCCR1 \
- (*((volatile Word *) io_p2v (_Ser4MCCR1)))
- #endif
- #define MCCR0_ASD Fld (7, 0)
-
-
-
- #define MCCR0_AudSmpDiv(Div) \
- \
- ((Div)/32 << FShft (MCCR0_ASD))
-
-
- #define MCCR0_CeilAudSmpDiv(Div) \
- (((Div) + 31)/32 << FShft (MCCR0_ASD))
-
-
- #define MCCR0_TSD Fld (7, 8)
-
-
-
- #define MCCR0_TcmSmpDiv(Div) \
- \
- ((Div)/32 << FShft (MCCR0_TSD))
-
-
- #define MCCR0_CeilTcmSmpDiv(Div) \
- (((Div) + 31)/32 << FShft (MCCR0_TSD))
-
-
- #define MCCR0_MCE 0x00010000
- #define MCCR0_ECS 0x00020000
- #define MCCR0_IntClk (MCCR0_ECS*0)
- #define MCCR0_ExtClk (MCCR0_ECS*1)
- #define MCCR0_ADM 0x00040000
-
- #define MCCR0_VldBit (MCCR0_ADM*0)
- #define MCCR0_SmpCnt (MCCR0_ADM*1)
- #define MCCR0_TTE 0x00080000
-
- #define MCCR0_TRE 0x00100000
-
- #define MCCR0_ATE 0x00200000
-
- #define MCCR0_ARE 0x00400000
-
- #define MCCR0_LBM 0x00800000
- #define MCCR0_ECP Fld (2, 24)
- #define MCCR0_ExtClkDiv(Div) \
- (((Div) - 1) << FShft (MCCR0_ECP))
- #define MCDR0_DATA Fld (12, 4)
-
- #define MCDR1_DATA Fld (14, 2)
-
-
-
- #define MCDR2_DATA Fld (16, 0)
- #define MCDR2_RW 0x00010000
- #define MCDR2_Rd (MCDR2_RW*0)
- #define MCDR2_Wr (MCDR2_RW*1)
- #define MCDR2_ADD Fld (4, 17)
- #define MCSR_ATS 0x00000001
-
- #define MCSR_ARS 0x00000002
-
- #define MCSR_TTS 0x00000004
-
- #define MCSR_TRS 0x00000008
-
- #define MCSR_ATU 0x00000010
- #define MCSR_ARO 0x00000020
- #define MCSR_TTU 0x00000040
- #define MCSR_TRO 0x00000080
- #define MCSR_ANF 0x00000100
-
- #define MCSR_ANE 0x00000200
-
- #define MCSR_TNF 0x00000400
-
- #define MCSR_TNE 0x00000800
-
- #define MCSR_CWC 0x00001000
-
- #define MCSR_CRC 0x00002000
-
- #define MCSR_ACE 0x00004000
- #define MCSR_TCE 0x00008000
- #define MCCR1_CFS 0x00100000
- #define MCCR1_F12MHz (MCCR1_CFS*0)
-
- #define MCCR1_F10MHz (MCCR1_CFS*1)
-
- #define _Ser4SSCR0 0x80070060
- #define _Ser4SSCR1 0x80070064
- #define _Ser4SSDR 0x8007006C
- #define _Ser4SSSR 0x80070074
- #if LANGUAGE == C
- #define Ser4SSCR0 \
- (*((volatile Word *) io_p2v (_Ser4SSCR0)))
- #define Ser4SSCR1 \
- (*((volatile Word *) io_p2v (_Ser4SSCR1)))
- #define Ser4SSDR \
- (*((volatile Word *) io_p2v (_Ser4SSDR)))
- #define Ser4SSSR \
- (*((volatile Word *) io_p2v (_Ser4SSSR)))
- #endif
- #define SSCR0_DSS Fld (4, 0)
- #define SSCR0_DataSize(Size) \
- (((Size) - 1) << FShft (SSCR0_DSS))
- #define SSCR0_FRF Fld (2, 4)
- #define SSCR0_Motorola \
- \
- (0 << FShft (SSCR0_FRF))
- #define SSCR0_TI \
- \
- (1 << FShft (SSCR0_FRF))
- #define SSCR0_National \
- (2 << FShft (SSCR0_FRF))
- #define SSCR0_SSE 0x00000080
- #define SSCR0_SCR Fld (8, 8)
-
-
- #define SSCR0_SerClkDiv(Div) \
- (((Div) - 2)/2 << FShft (SSCR0_SCR))
-
-
- #define SSCR0_CeilSerClkDiv(Div) \
- (((Div) - 1)/2 << FShft (SSCR0_SCR))
-
-
- #define SSCR1_RIE 0x00000001
-
- #define SSCR1_TIE 0x00000002
-
- #define SSCR1_LBM 0x00000004
- #define SSCR1_SPO 0x00000008
- #define SSCR1_SClkIactL (SSCR1_SPO*0)
- #define SSCR1_SClkIactH (SSCR1_SPO*1)
- #define SSCR1_SP 0x00000010
- #define SSCR1_SClk1P (SSCR1_SP*0)
-
- #define SSCR1_SClk1_2P (SSCR1_SP*1)
-
- #define SSCR1_ECS 0x00000020
- #define SSCR1_IntClk (SSCR1_ECS*0)
- #define SSCR1_ExtClk (SSCR1_ECS*1)
- #define SSDR_DATA Fld (16, 0)
- #define SSSR_TNF 0x00000002
- #define SSSR_RNE 0x00000004
- #define SSSR_BSY 0x00000008
- #define SSSR_TFS 0x00000010
-
- #define SSSR_RFS 0x00000020
-
- #define SSSR_ROR 0x00000040
- #define _OSMR(Nb) \
- (0x90000000 + (Nb)*4)
- #define _OSMR0 _OSMR (0)
- #define _OSMR1 _OSMR (1)
- #define _OSMR2 _OSMR (2)
- #define _OSMR3 _OSMR (3)
- #define _OSCR 0x90000010
- #define _OSSR 0x90000014
- #define _OWER 0x90000018
- #define _OIER 0x9000001C
- #if LANGUAGE == C
- #define OSMR \
- ((volatile Word *) io_p2v (_OSMR (0)))
- #define OSMR0 (OSMR [0])
- #define OSMR1 (OSMR [1])
- #define OSMR2 (OSMR [2])
- #define OSMR3 (OSMR [3])
- #define OSCR \
- (*((volatile Word *) io_p2v (_OSCR)))
- #define OSSR \
- (*((volatile Word *) io_p2v (_OSSR)))
- #define OWER \
- (*((volatile Word *) io_p2v (_OWER)))
- #define OIER \
- (*((volatile Word *) io_p2v (_OIER)))
- #endif
- #define OSSR_M(Nb) \
- (0x00000001 << (Nb))
- #define OSSR_M0 OSSR_M (0)
- #define OSSR_M1 OSSR_M (1)
- #define OSSR_M2 OSSR_M (2)
- #define OSSR_M3 OSSR_M (3)
- #define OWER_WME 0x00000001
-
- #define OIER_E(Nb) \
- (0x00000001 << (Nb))
- #define OIER_E0 OIER_E (0)
- #define OIER_E1 OIER_E (1)
- #define OIER_E2 OIER_E (2)
- #define OIER_E3 OIER_E (3)
- #define _RTAR 0x90010000
- #define _RCNR 0x90010004
- #define _RTTR 0x90010008
- #define _RTSR 0x90010010
- #if LANGUAGE == C
- #define RTAR \
- (*((volatile Word *) io_p2v (_RTAR)))
- #define RCNR \
- (*((volatile Word *) io_p2v (_RCNR)))
- #define RTTR \
- (*((volatile Word *) io_p2v (_RTTR)))
- #define RTSR \
- (*((volatile Word *) io_p2v (_RTSR)))
- #endif
- #define RTTR_C Fld (16, 0)
- #define RTTR_D Fld (10, 16)
-
-
-
-
- #define RTSR_AL 0x00000001
- #define RTSR_HZ 0x00000002
- #define RTSR_ALE 0x00000004
- #define RTSR_HZE 0x00000008
- #define _PMCR 0x90020000
- #define _PSSR 0x90020004
- #define _PSPR 0x90020008
- #define _PWER 0x9002000C
- #define _PCFR 0x90020010
- #define _PPCR 0x90020014
- #define _PGSR 0x90020018
- #define _POSR 0x9002001C
- #if LANGUAGE == C
- #define PMCR \
- (*((volatile Word *) io_p2v (_PMCR)))
- #define PSSR \
- (*((volatile Word *) io_p2v (_PSSR)))
- #define PSPR \
- (*((volatile Word *) io_p2v (_PSPR)))
- #define PWER \
- (*((volatile Word *) io_p2v (_PWER)))
- #define PCFR \
- (*((volatile Word *) io_p2v (_PCFR)))
- #define PPCR \
- (*((volatile Word *) io_p2v (_PPCR)))
- #define PGSR \
- (*((volatile Word *) io_p2v (_PGSR)))
- #define POSR \
- (*((volatile Word *) io_p2v (_POSR)))
- #elif LANGUAGE == Assembly
- #define PMCR (io_p2v (_PMCR))
- #define PSSR (io_p2v (_PSSR))
- #define PSPR (io_p2v (_PSPR))
- #define PWER (io_p2v (_PWER))
- #define PCFR (io_p2v (_PCFR))
- #define PPCR (io_p2v (_PPCR))
- #define PGSR (io_p2v (_PGSR))
- #define POSR (io_p2v (_POSR))
- #endif
- #define PMCR_SF 0x00000001
- #define PSSR_SS 0x00000001
- #define PSSR_BFS 0x00000002
-
- #define PSSR_VFS 0x00000004
- #define PSSR_DH 0x00000008
- #define PSSR_PH 0x00000010
- #define PWER_GPIO(Nb) GPIO_GPIO (Nb)
- #define PWER_GPIO0 PWER_GPIO (0)
- #define PWER_GPIO1 PWER_GPIO (1)
- #define PWER_GPIO2 PWER_GPIO (2)
- #define PWER_GPIO3 PWER_GPIO (3)
- #define PWER_GPIO4 PWER_GPIO (4)
- #define PWER_GPIO5 PWER_GPIO (5)
- #define PWER_GPIO6 PWER_GPIO (6)
- #define PWER_GPIO7 PWER_GPIO (7)
- #define PWER_GPIO8 PWER_GPIO (8)
- #define PWER_GPIO9 PWER_GPIO (9)
- #define PWER_GPIO10 PWER_GPIO (10)
- #define PWER_GPIO11 PWER_GPIO (11)
- #define PWER_GPIO12 PWER_GPIO (12)
- #define PWER_GPIO13 PWER_GPIO (13)
- #define PWER_GPIO14 PWER_GPIO (14)
- #define PWER_GPIO15 PWER_GPIO (15)
- #define PWER_GPIO16 PWER_GPIO (16)
- #define PWER_GPIO17 PWER_GPIO (17)
- #define PWER_GPIO18 PWER_GPIO (18)
- #define PWER_GPIO19 PWER_GPIO (19)
- #define PWER_GPIO20 PWER_GPIO (20)
- #define PWER_GPIO21 PWER_GPIO (21)
- #define PWER_GPIO22 PWER_GPIO (22)
- #define PWER_GPIO23 PWER_GPIO (23)
- #define PWER_GPIO24 PWER_GPIO (24)
- #define PWER_GPIO25 PWER_GPIO (25)
- #define PWER_GPIO26 PWER_GPIO (26)
- #define PWER_GPIO27 PWER_GPIO (27)
- #define PWER_RTC 0x80000000
- #define PCFR_OPDE 0x00000001
- #define PCFR_ClkRun (PCFR_OPDE*0)
- #define PCFR_ClkStp (PCFR_OPDE*1)
- #define PCFR_FP 0x00000002
- #define PCFR_PCMCIANeg (PCFR_FP*0)
- #define PCFR_PCMCIAFlt (PCFR_FP*1)
- #define PCFR_FS 0x00000004
- #define PCFR_StMemNeg (PCFR_FS*0)
- #define PCFR_StMemFlt (PCFR_FS*1)
- #define PCFR_FO 0x00000008
-
- #define PPCR_CCF Fld (5, 0)
- #define PPCR_Fx16 \
- (0x00 << FShft (PPCR_CCF))
- #define PPCR_Fx20 \
- (0x01 << FShft (PPCR_CCF))
- #define PPCR_Fx24 \
- (0x02 << FShft (PPCR_CCF))
- #define PPCR_Fx28 \
- (0x03 << FShft (PPCR_CCF))
- #define PPCR_Fx32 \
- (0x04 << FShft (PPCR_CCF))
- #define PPCR_Fx36 \
- (0x05 << FShft (PPCR_CCF))
- #define PPCR_Fx40 \
- (0x06 << FShft (PPCR_CCF))
- #define PPCR_Fx44 \
- (0x07 << FShft (PPCR_CCF))
- #define PPCR_Fx48 \
- (0x08 << FShft (PPCR_CCF))
- #define PPCR_Fx52 \
- (0x09 << FShft (PPCR_CCF))
- #define PPCR_Fx56 \
- (0x0A << FShft (PPCR_CCF))
- #define PPCR_Fx60 \
- (0x0B << FShft (PPCR_CCF))
- #define PPCR_Fx64 \
- (0x0C << FShft (PPCR_CCF))
- #define PPCR_Fx68 \
- (0x0D << FShft (PPCR_CCF))
- #define PPCR_Fx72 \
- (0x0E << FShft (PPCR_CCF))
- #define PPCR_Fx76 \
- (0x0F << FShft (PPCR_CCF))
-
- #define PPCR_F59_0MHz PPCR_Fx16
- #define PPCR_F73_7MHz PPCR_Fx20
- #define PPCR_F88_5MHz PPCR_Fx24
- #define PPCR_F103_2MHz PPCR_Fx28
- #define PPCR_F118_0MHz PPCR_Fx32
- #define PPCR_F132_7MHz PPCR_Fx36
- #define PPCR_F147_5MHz PPCR_Fx40
- #define PPCR_F162_2MHz PPCR_Fx44
- #define PPCR_F176_9MHz PPCR_Fx48
- #define PPCR_F191_7MHz PPCR_Fx52
- #define PPCR_F206_4MHz PPCR_Fx56
- #define PPCR_F221_2MHz PPCR_Fx60
- #define PPCR_F239_6MHz PPCR_Fx64
- #define PPCR_F250_7MHz PPCR_Fx68
- #define PPCR_F265_4MHz PPCR_Fx72
- #define PPCR_F280_2MHz PPCR_Fx76
-
- #define PPCR_F57_3MHz PPCR_Fx16
- #define PPCR_F71_6MHz PPCR_Fx20
- #define PPCR_F85_9MHz PPCR_Fx24
- #define PPCR_F100_2MHz PPCR_Fx28
- #define PPCR_F114_5MHz PPCR_Fx32
- #define PPCR_F128_9MHz PPCR_Fx36
- #define PPCR_F143_2MHz PPCR_Fx40
- #define PPCR_F157_5MHz PPCR_Fx44
- #define PPCR_F171_8MHz PPCR_Fx48
- #define PPCR_F186_1MHz PPCR_Fx52
- #define PPCR_F200_5MHz PPCR_Fx56
- #define PPCR_F214_8MHz PPCR_Fx60
- #define PPCR_F229_1MHz PPCR_Fx64
- #define PPCR_F243_4MHz PPCR_Fx68
- #define PPCR_F257_7MHz PPCR_Fx72
- #define PPCR_F272_0MHz PPCR_Fx76
- #define POSR_OOK 0x00000001
- #define _RSRR 0x90030000
- #define _RCSR 0x90030004
- #if LANGUAGE == C
- #define RSRR \
- (*((volatile Word *) io_p2v (_RSRR)))
- #define RCSR \
- (*((volatile Word *) io_p2v (_RCSR)))
- #endif
- #define RSRR_SWR 0x00000001
- #define RCSR_HWR 0x00000001
- #define RCSR_SWR 0x00000002
- #define RCSR_WDR 0x00000004
- #define RCSR_SMR 0x00000008
- #define _TUCR 0x90030008
- #if LANGUAGE == C
- #define TUCR \
- (*((volatile Word *) io_p2v (_TUCR)))
- #endif
- #define TUCR_TIC 0x00000040
- #define TUCR_TTST 0x00000080
- #define TUCR_RCRC 0x00000100
-
- #define TUCR_PMD 0x00000200
- #define TUCR_MR 0x00000400
- #define TUCR_NoMB (TUCR_MR*0)
- #define TUCR_MBGPIO (TUCR_MR*1)
-
- #define TUCR_CTB Fld (3, 20)
- #define TUCR_FDC 0x00800000
- #define TUCR_FMC 0x01000000
- #define TUCR_TMC 0x02000000
- #define TUCR_DPS 0x04000000
- #define TUCR_TSEL Fld (3, 29)
- #define TUCR_32_768kHz \
- (0 << FShft (TUCR_TSEL))
- #define TUCR_3_6864MHz \
- (1 << FShft (TUCR_TSEL))
- #define TUCR_VDD \
- (2 << FShft (TUCR_TSEL))
- #define TUCR_96MHzPLL \
- (3 << FShft (TUCR_TSEL))
- #define TUCR_Clock \
- \
- (4 << FShft (TUCR_TSEL))
- #define TUCR_3_6864MHzA \
- \
- (5 << FShft (TUCR_TSEL))
- #define TUCR_MainPLL \
- (6 << FShft (TUCR_TSEL))
- #define TUCR_VDDL \
- (7 << FShft (TUCR_TSEL))
- #define _GPLR 0x90040000
- #define _GPDR 0x90040004
- #define _GPSR 0x90040008
- #define _GPCR 0x9004000C
- #define _GRER 0x90040010
- #define _GFER 0x90040014
- #define _GEDR 0x90040018
- #define _GAFR 0x9004001C
- #if LANGUAGE == C
- #define GPLR \
- (*((volatile Word *) io_p2v (_GPLR)))
- #define GPDR \
- (*((volatile Word *) io_p2v (_GPDR)))
- #define GPSR \
- (*((volatile Word *) io_p2v (_GPSR)))
- #define GPCR \
- (*((volatile Word *) io_p2v (_GPCR)))
- #define GRER \
- (*((volatile Word *) io_p2v (_GRER)))
- #define GFER \
- (*((volatile Word *) io_p2v (_GFER)))
- #define GEDR \
- (*((volatile Word *) io_p2v (_GEDR)))
- #define GAFR \
- (*((volatile Word *) io_p2v (_GAFR)))
- #elif LANGUAGE == Assembly
- #define GPLR (io_p2v (_GPLR))
- #define GPDR (io_p2v (_GPDR))
- #define GPSR (io_p2v (_GPSR))
- #define GPCR (io_p2v (_GPCR))
- #define GRER (io_p2v (_GRER))
- #define GFER (io_p2v (_GFER))
- #define GEDR (io_p2v (_GEDR))
- #define GAFR (io_p2v (_GAFR))
- #endif
- #define GPIO_MIN (0)
- #define GPIO_MAX (27)
- #define GPIO_GPIO(Nb) \
- (0x00000001 << (Nb))
- #define GPIO_GPIO0 GPIO_GPIO (0)
- #define GPIO_GPIO1 GPIO_GPIO (1)
- #define GPIO_GPIO2 GPIO_GPIO (2)
- #define GPIO_GPIO3 GPIO_GPIO (3)
- #define GPIO_GPIO4 GPIO_GPIO (4)
- #define GPIO_GPIO5 GPIO_GPIO (5)
- #define GPIO_GPIO6 GPIO_GPIO (6)
- #define GPIO_GPIO7 GPIO_GPIO (7)
- #define GPIO_GPIO8 GPIO_GPIO (8)
- #define GPIO_GPIO9 GPIO_GPIO (9)
- #define GPIO_GPIO10 GPIO_GPIO (10)
- #define GPIO_GPIO11 GPIO_GPIO (11)
- #define GPIO_GPIO12 GPIO_GPIO (12)
- #define GPIO_GPIO13 GPIO_GPIO (13)
- #define GPIO_GPIO14 GPIO_GPIO (14)
- #define GPIO_GPIO15 GPIO_GPIO (15)
- #define GPIO_GPIO16 GPIO_GPIO (16)
- #define GPIO_GPIO17 GPIO_GPIO (17)
- #define GPIO_GPIO18 GPIO_GPIO (18)
- #define GPIO_GPIO19 GPIO_GPIO (19)
- #define GPIO_GPIO20 GPIO_GPIO (20)
- #define GPIO_GPIO21 GPIO_GPIO (21)
- #define GPIO_GPIO22 GPIO_GPIO (22)
- #define GPIO_GPIO23 GPIO_GPIO (23)
- #define GPIO_GPIO24 GPIO_GPIO (24)
- #define GPIO_GPIO25 GPIO_GPIO (25)
- #define GPIO_GPIO26 GPIO_GPIO (26)
- #define GPIO_GPIO27 GPIO_GPIO (27)
- #define GPIO_LDD(Nb) \
- GPIO_GPIO ((Nb) - 6)
- #define GPIO_LDD8 GPIO_LDD (8)
- #define GPIO_LDD9 GPIO_LDD (9)
- #define GPIO_LDD10 GPIO_LDD (10)
- #define GPIO_LDD11 GPIO_LDD (11)
- #define GPIO_LDD12 GPIO_LDD (12)
- #define GPIO_LDD13 GPIO_LDD (13)
- #define GPIO_LDD14 GPIO_LDD (14)
- #define GPIO_LDD15 GPIO_LDD (15)
-
- #define GPIO_SSP_TXD GPIO_GPIO (10)
- #define GPIO_SSP_RXD GPIO_GPIO (11)
- #define GPIO_SSP_SCLK GPIO_GPIO (12)
- #define GPIO_SSP_SFRM GPIO_GPIO (13)
-
- #define GPIO_UART_TXD GPIO_GPIO (14)
- #define GPIO_UART_RXD GPIO_GPIO (15)
- #define GPIO_SDLC_SCLK GPIO_GPIO (16)
- #define GPIO_SDLC_AAF GPIO_GPIO (17)
- #define GPIO_UART_SCLK1 GPIO_GPIO (18)
-
- #define GPIO_SSP_CLK GPIO_GPIO (19)
-
- #define GPIO_UART_SCLK3 GPIO_GPIO (20)
-
- #define GPIO_MCP_CLK GPIO_GPIO (21)
-
- #define GPIO_TIC_ACK GPIO_GPIO (21)
- #define GPIO_MBGNT GPIO_GPIO (21)
- #define GPIO_TREQA GPIO_GPIO (22)
- #define GPIO_MBREQ GPIO_GPIO (22)
- #define GPIO_TREQB GPIO_GPIO (23)
- #define GPIO_1Hz GPIO_GPIO (25)
- #define GPIO_RCLK GPIO_GPIO (26)
- #define GPIO_32_768kHz GPIO_GPIO (27)
- #define GPDR_In 0
- #define GPDR_Out 1
- #define _ICIP 0x90050000
- #define _ICMR 0x90050004
- #define _ICLR 0x90050008
- #define _ICCR 0x9005000C
- #define _ICFP 0x90050010
- #define _ICPR 0x90050020
- #if LANGUAGE == C
- #define ICIP \
- (*((volatile Word *) io_p2v (_ICIP)))
- #define ICMR \
- (*((volatile Word *) io_p2v (_ICMR)))
- #define ICLR \
- (*((volatile Word *) io_p2v (_ICLR)))
- #define ICCR \
- (*((volatile Word *) io_p2v (_ICCR)))
- #define ICFP \
- (*((volatile Word *) io_p2v (_ICFP)))
- #define ICPR \
- (*((volatile Word *) io_p2v (_ICPR)))
- #endif
- #define IC_GPIO(Nb) \
- (0x00000001 << (Nb))
- #define IC_GPIO0 IC_GPIO (0)
- #define IC_GPIO1 IC_GPIO (1)
- #define IC_GPIO2 IC_GPIO (2)
- #define IC_GPIO3 IC_GPIO (3)
- #define IC_GPIO4 IC_GPIO (4)
- #define IC_GPIO5 IC_GPIO (5)
- #define IC_GPIO6 IC_GPIO (6)
- #define IC_GPIO7 IC_GPIO (7)
- #define IC_GPIO8 IC_GPIO (8)
- #define IC_GPIO9 IC_GPIO (9)
- #define IC_GPIO10 IC_GPIO (10)
- #define IC_GPIO11_27 0x00000800
- #define IC_LCD 0x00001000
- #define IC_Ser0UDC 0x00002000
- #define IC_Ser1SDLC 0x00004000
- #define IC_Ser1UART 0x00008000
- #define IC_Ser2ICP 0x00010000
- #define IC_Ser3UART 0x00020000
- #define IC_Ser4MCP 0x00040000
- #define IC_Ser4SSP 0x00080000
- #define IC_DMA(Nb) \
- (0x00100000 << (Nb))
- #define IC_DMA0 IC_DMA (0)
- #define IC_DMA1 IC_DMA (1)
- #define IC_DMA2 IC_DMA (2)
- #define IC_DMA3 IC_DMA (3)
- #define IC_DMA4 IC_DMA (4)
- #define IC_DMA5 IC_DMA (5)
- #define IC_OST(Nb) \
- (0x04000000 << (Nb))
- #define IC_OST0 IC_OST (0)
- #define IC_OST1 IC_OST (1)
- #define IC_OST2 IC_OST (2)
- #define IC_OST3 IC_OST (3)
- #define IC_RTC1Hz 0x40000000
- #define IC_RTCAlrm 0x80000000
- #define ICLR_IRQ 0
- #define ICLR_FIQ 1
- #define ICCR_DIM 0x00000001
-
- #define ICCR_IdleAllInt (ICCR_DIM*0)
-
- #define ICCR_IdleMskInt (ICCR_DIM*1)
-
- #define _PPDR 0x90060000
- #define _PPSR 0x90060004
- #define _PPAR 0x90060008
- #define _PSDR 0x9006000C
-
- #define _PPFR 0x90060010
- #if LANGUAGE == C
- #define PPDR \
- (*((volatile Word *) io_p2v (_PPDR)))
- #define PPSR \
- (*((volatile Word *) io_p2v (_PPSR)))
- #define PPAR \
- (*((volatile Word *) io_p2v (_PPAR)))
- #define PSDR \
- \
- (*((volatile Word *) io_p2v (_PSDR)))
- #define PPFR \
- (*((volatile Word *) io_p2v (_PPFR)))
- #endif
- #define PPC_LDD(Nb) \
- (0x00000001 << (Nb))
- #define PPC_LDD0 PPC_LDD (0)
- #define PPC_LDD1 PPC_LDD (1)
- #define PPC_LDD2 PPC_LDD (2)
- #define PPC_LDD3 PPC_LDD (3)
- #define PPC_LDD4 PPC_LDD (4)
- #define PPC_LDD5 PPC_LDD (5)
- #define PPC_LDD6 PPC_LDD (6)
- #define PPC_LDD7 PPC_LDD (7)
- #define PPC_L_PCLK 0x00000100
- #define PPC_L_LCLK 0x00000200
- #define PPC_L_FCLK 0x00000400
- #define PPC_L_BIAS 0x00000800
-
- #define PPC_TXD1 0x00001000
- #define PPC_RXD1 0x00002000
-
- #define PPC_TXD2 0x00004000
- #define PPC_RXD2 0x00008000
-
- #define PPC_TXD3 0x00010000
- #define PPC_RXD3 0x00020000
-
- #define PPC_TXD4 0x00040000
- #define PPC_RXD4 0x00080000
- #define PPC_SCLK 0x00100000
- #define PPC_SFRM 0x00200000
- #define PPDR_In 0
- #define PPDR_Out 1
-
- #define PPAR_UPR 0x00001000
- #define PPAR_UARTTR (PPAR_UPR*0)
- #define PPAR_UARTGPIO (PPAR_UPR*1)
-
- #define PPAR_SPR 0x00040000
- #define PPAR_SSPTRSS (PPAR_SPR*0)
-
- #define PPAR_SSPGPIO (PPAR_SPR*1)
- #define PSDR_OutL 0
- #define PSDR_Flt 1
- #define PPFR_LCD 0x00000001
- #define PPFR_SP1TX 0x00001000
- #define PPFR_SP1RX 0x00002000
- #define PPFR_SP2TX 0x00004000
- #define PPFR_SP2RX 0x00008000
- #define PPFR_SP3TX 0x00010000
- #define PPFR_SP3RX 0x00020000
- #define PPFR_SP4 0x00040000
- #define PPFR_PerEn 0
- #define PPFR_PPCEn 1
-
- #define _MDCNFG 0xA0000000
- #define _MDCAS(Nb) \
- (0xA0000004 + (Nb)*4)
- #define _MDCAS0 _MDCAS (0)
- #define _MDCAS1 _MDCAS (1)
- #define _MDCAS2 _MDCAS (2)
- #if LANGUAGE == C
-
- #define MDCNFG \
- (*((volatile Word *) io_p2v (_MDCNFG)))
- #define MDCAS \
- ((volatile Word *) io_p2v (_MDCAS (0)))
- #define MDCAS0 (MDCAS [0])
- #define MDCAS1 (MDCAS [1])
- #define MDCAS2 (MDCAS [2])
- #elif LANGUAGE == Assembly
- #define MDCNFG (io_p2v(_MDCNFG))
- #endif
- #define MDCNFG_DE(Nb) \
- (0x00000001 << (Nb))
- #define MDCNFG_DE0 MDCNFG_DE (0)
- #define MDCNFG_DE1 MDCNFG_DE (1)
- #define MDCNFG_DE2 MDCNFG_DE (2)
- #define MDCNFG_DE3 MDCNFG_DE (3)
- #define MDCNFG_DRAC Fld (2, 4)
- #define MDCNFG_RowAdd(Add) \
- (((Add) - 9) << FShft (MDCNFG_DRAC))
- #define MDCNFG_CDB2 0x00000040
-
- #define MDCNFG_TRP Fld (4, 7)
- #define MDCNFG_PrChrg(Tcpu) \
- (((Tcpu) - 2)/2 << FShft (MDCNFG_TRP))
- #define MDCNFG_CeilPrChrg(Tcpu) \
- (((Tcpu) - 1)/2 << FShft (MDCNFG_TRP))
- #define MDCNFG_TRASR Fld (4, 11)
- #define MDCNFG_Ref(Tcpu) \
- (((Tcpu) - 2)/2 << FShft (MDCNFG_TRASR))
- #define MDCNFG_CeilRef(Tcpu) \
- (((Tcpu) - 1)/2 << FShft (MDCNFG_TRASR))
- #define MDCNFG_TDL Fld (2, 15)
- #define MDCNFG_DataLtch(Tcpu) \
- ((Tcpu) << FShft (MDCNFG_TDL))
- #define MDCNFG_DRI Fld (15, 17)
-
- #define MDCNFG_RefInt(Tcpu) \
- \
- ((Tcpu)/8 << FShft (MDCNFG_DRI))
- #define MDCNFG_SA1110_DE0 0x00000001
- #define MDCNFG_SA1110_DE1 0x00000002
- #define MDCNFG_SA1110_DTIM0 0x00000004
- #define MDCNFG_SA1110_DWID0 0x00000008
- #define MDCNFG_SA1110_DRAC0 Fld(3, 4)
-
- #define MDCNFG_SA1110_CDB20 0x00000080
- #define MDCNFG_SA1110_TRP0 Fld(3, 8)
- #define MDCNFG_SA1110_TDL0 Fld(2, 12)
-
- #define MDCNFG_SA1110_TWR0 Fld(2, 14)
- #define MDCNFG_SA1110_DE2 0x00010000
- #define MDCNFG_SA1110_DE3 0x00020000
- #define MDCNFG_SA1110_DTIM2 0x00040000
- #define MDCNFG_SA1110_DWID2 0x00080000
- #define MDCNFG_SA1110_DRAC2 Fld(3, 20)
-
- #define MDCNFG_SA1110_CDB22 0x00800000
- #define MDCNFG_SA1110_TRP2 Fld(3, 24)
- #define MDCNFG_SA1110_TDL2 Fld(2, 28)
-
- #define MDCNFG_SA1110_TWR2 Fld(2, 30)
-
- #define _MSC(Nb) \
- \
- (0xA0000010 + (Nb)*4)
- #define _MSC0 _MSC (0)
- #define _MSC1 _MSC (1)
- #define _MSC2 0xA000002C
- #if LANGUAGE == C
-
- #define MSC \
- \
- ((volatile Word *) io_p2v (_MSC (0)))
- #define MSC0 (MSC [0])
- #define MSC1 (MSC [1])
- #define MSC2 (*(volatile Word *) io_p2v (_MSC2))
- #elif LANGUAGE == Assembly
- #define MSC0 io_p2v(0xa0000010)
- #define MSC1 io_p2v(0xa0000014)
- #define MSC2 io_p2v(0xa000002c)
- #endif
- #define MSC_Bnk(Nb) \
- Fld (16, ((Nb) Modulo 2)*16)
- #define MSC0_Bnk0 MSC_Bnk (0)
- #define MSC0_Bnk1 MSC_Bnk (1)
- #define MSC1_Bnk2 MSC_Bnk (2)
- #define MSC1_Bnk3 MSC_Bnk (3)
- #define MSC_RT Fld (2, 0)
- #define MSC_NonBrst \
- (0 << FShft (MSC_RT))
- #define MSC_SRAM \
- (1 << FShft (MSC_RT))
- #define MSC_Brst4 \
- (2 << FShft (MSC_RT))
- #define MSC_Brst8 \
- (3 << FShft (MSC_RT))
- #define MSC_RBW 0x0004
- #define MSC_32BitStMem (MSC_RBW*0)
- #define MSC_16BitStMem (MSC_RBW*1)
- #define MSC_RDF Fld (5, 3)
-
- #define MSC_1stRdAcc(Tcpu) \
- \
- ((((Tcpu) - 3)/2) << FShft (MSC_RDF))
- #define MSC_Ceil1stRdAcc(Tcpu) \
- ((((Tcpu) - 2)/2) << FShft (MSC_RDF))
- #define MSC_RdAcc(Tcpu) \
- \
- ((((Tcpu) - 2)/2) << FShft (MSC_RDF))
- #define MSC_CeilRdAcc(Tcpu) \
- ((((Tcpu) - 1)/2) << FShft (MSC_RDF))
- #define MSC_RDN Fld (5, 8)
-
- #define MSC_NxtRdAcc(Tcpu) \
- \
- ((((Tcpu) - 2)/2) << FShft (MSC_RDN))
- #define MSC_CeilNxtRdAcc(Tcpu) \
- ((((Tcpu) - 1)/2) << FShft (MSC_RDN))
- #define MSC_WrAcc(Tcpu) \
- \
- ((((Tcpu) - 2)/2) << FShft (MSC_RDN))
- #define MSC_CeilWrAcc(Tcpu) \
- ((((Tcpu) - 1)/2) << FShft (MSC_RDN))
- #define MSC_RRR Fld (3, 13)
-
- #define MSC_Rec(Tcpu) \
- (((Tcpu)/4) << FShft (MSC_RRR))
- #define MSC_CeilRec(Tcpu) \
- ((((Tcpu) + 3)/4) << FShft (MSC_RRR))
-
- #define _MECR 0xA0000018
-
- #if LANGUAGE == C
-
- #define MECR \
- \
- (*((volatile Word *) io_p2v (_MECR)))
- #endif
- #define MECR_PCMCIA(Nb) \
- Fld (15, (Nb)*16)
- #define MECR_PCMCIA0 MECR_PCMCIA (0)
- #define MECR_PCMCIA1 MECR_PCMCIA (1)
- #define MECR_BSIO Fld (5, 0)
- #define MECR_IOClk(Tcpu) \
- ((((Tcpu) - 2)/2) << FShft (MECR_BSIO))
- #define MECR_CeilIOClk(Tcpu) \
- ((((Tcpu) - 1)/2) << FShft (MECR_BSIO))
- #define MECR_BSA Fld (5, 5)
-
- #define MECR_AttrClk(Tcpu) \
- ((((Tcpu) - 2)/2) << FShft (MECR_BSA))
- #define MECR_CeilAttrClk(Tcpu) \
- ((((Tcpu) - 1)/2) << FShft (MECR_BSA))
- #define MECR_BSM Fld (5, 10)
- #define MECR_MemClk(Tcpu) \
- ((((Tcpu) - 2)/2) << FShft (MECR_BSM))
- #define MECR_CeilMemClk(Tcpu) \
- ((((Tcpu) - 1)/2) << FShft (MECR_BSM))
- #define _MDREFR 0xA000001C
- #if LANGUAGE == C
-
- #define MDREFR \
- (*((volatile Word *) io_p2v (_MDREFR)))
- #elif LANGUAGE == Assembly
- #define MDREFR (io_p2v(_MDREFR))
- #endif
- #define MDREFR_TRASR Fld (4, 0)
- #define MDREFR_DRI Fld (12, 4)
- #define MDREFR_E0PIN (1 << 16)
- #define MDREFR_K0RUN (1 << 17)
- #define MDREFR_K0DB2 (1 << 18)
- #define MDREFR_E1PIN (1 << 20)
- #define MDREFR_K1RUN (1 << 21)
- #define MDREFR_K1DB2 (1 << 22)
- #define MDREFR_K2RUN (1 << 25)
- #define MDREFR_K2DB2 (1 << 26)
- #define MDREFR_EAPD (1 << 28)
- #define MDREFR_KAPD (1 << 29)
- #define MDREFR_SLFRSH (1 << 31)
- #define DMASp 0x00000020
- #define _DDAR(Nb) \
- \
- (0xB0000000 + (Nb)*DMASp)
- #define _SetDCSR(Nb) \
- \
- (0xB0000004 + (Nb)*DMASp)
- #define _ClrDCSR(Nb) \
- \
- (0xB0000008 + (Nb)*DMASp)
- #define _RdDCSR(Nb) \
- \
- (0xB000000C + (Nb)*DMASp)
- #define _DBSA(Nb) \
- \
- (0xB0000010 + (Nb)*DMASp)
- #define _DBTA(Nb) \
- \
- (0xB0000014 + (Nb)*DMASp)
- #define _DBSB(Nb) \
- \
- (0xB0000018 + (Nb)*DMASp)
- #define _DBTB(Nb) \
- \
- (0xB000001C + (Nb)*DMASp)
- #define _DDAR0 _DDAR (0)
-
- #define _SetDCSR0 _SetDCSR (0)
-
- #define _ClrDCSR0 _ClrDCSR (0)
-
- #define _RdDCSR0 _RdDCSR (0)
-
- #define _DBSA0 _DBSA (0)
-
- #define _DBTA0 _DBTA (0)
-
- #define _DBSB0 _DBSB (0)
-
- #define _DBTB0 _DBTB (0)
-
- #define _DDAR1 _DDAR (1)
-
- #define _SetDCSR1 _SetDCSR (1)
-
- #define _ClrDCSR1 _ClrDCSR (1)
-
- #define _RdDCSR1 _RdDCSR (1)
-
- #define _DBSA1 _DBSA (1)
-
- #define _DBTA1 _DBTA (1)
-
- #define _DBSB1 _DBSB (1)
-
- #define _DBTB1 _DBTB (1)
-
- #define _DDAR2 _DDAR (2)
-
- #define _SetDCSR2 _SetDCSR (2)
-
- #define _ClrDCSR2 _ClrDCSR (2)
-
- #define _RdDCSR2 _RdDCSR (2)
-
- #define _DBSA2 _DBSA (2)
-
- #define _DBTA2 _DBTA (2)
-
- #define _DBSB2 _DBSB (2)
-
- #define _DBTB2 _DBTB (2)
-
- #define _DDAR3 _DDAR (3)
-
- #define _SetDCSR3 _SetDCSR (3)
-
- #define _ClrDCSR3 _ClrDCSR (3)
-
- #define _RdDCSR3 _RdDCSR (3)
-
- #define _DBSA3 _DBSA (3)
-
- #define _DBTA3 _DBTA (3)
-
- #define _DBSB3 _DBSB (3)
-
- #define _DBTB3 _DBTB (3)
-
- #define _DDAR4 _DDAR (4)
-
- #define _SetDCSR4 _SetDCSR (4)
-
- #define _ClrDCSR4 _ClrDCSR (4)
-
- #define _RdDCSR4 _RdDCSR (4)
-
- #define _DBSA4 _DBSA (4)
-
- #define _DBTA4 _DBTA (4)
-
- #define _DBSB4 _DBSB (4)
-
- #define _DBTB4 _DBTB (4)
-
- #define _DDAR5 _DDAR (5)
-
- #define _SetDCSR5 _SetDCSR (5)
-
- #define _ClrDCSR5 _ClrDCSR (5)
-
- #define _RdDCSR5 _RdDCSR (5)
-
- #define _DBSA5 _DBSA (5)
-
- #define _DBTA5 _DBTA (5)
-
- #define _DBSB5 _DBSB (5)
-
- #define _DBTB5 _DBTB (5)
-
- #if LANGUAGE == C
- #define DDAR0 \
- \
- (*((volatile Word *) io_p2v (_DDAR0)))
- #define SetDCSR0 \
- \
- (*((volatile Word *) io_p2v (_SetDCSR0)))
- #define ClrDCSR0 \
- \
- (*((volatile Word *) io_p2v (_ClrDCSR0)))
- #define RdDCSR0 \
- \
- (*((volatile Word *) io_p2v (_RdDCSR0)))
- #define DBSA0 \
- \
- (*((volatile Address *) io_p2v (_DBSA0)))
- #define DBTA0 \
- \
- (*((volatile Word *) io_p2v (_DBTA0)))
- #define DBSB0 \
- \
- (*((volatile Address *) io_p2v (_DBSB0)))
- #define DBTB0 \
- \
- (*((volatile Word *) io_p2v (_DBTB0)))
- #define DDAR1 \
- \
- (*((volatile Word *) io_p2v (_DDAR1)))
- #define SetDCSR1 \
- \
- (*((volatile Word *) io_p2v (_SetDCSR1)))
- #define ClrDCSR1 \
- \
- (*((volatile Word *) io_p2v (_ClrDCSR1)))
- #define RdDCSR1 \
- \
- (*((volatile Word *) io_p2v (_RdDCSR1)))
- #define DBSA1 \
- \
- (*((volatile Address *) io_p2v (_DBSA1)))
- #define DBTA1 \
- \
- (*((volatile Word *) io_p2v (_DBTA1)))
- #define DBSB1 \
- \
- (*((volatile Address *) io_p2v (_DBSB1)))
- #define DBTB1 \
- \
- (*((volatile Word *) io_p2v (_DBTB1)))
- #define DDAR2 \
- \
- (*((volatile Word *) io_p2v (_DDAR2)))
- #define SetDCSR2 \
- \
- (*((volatile Word *) io_p2v (_SetDCSR2)))
- #define ClrDCSR2 \
- \
- (*((volatile Word *) io_p2v (_ClrDCSR2)))
- #define RdDCSR2 \
- \
- (*((volatile Word *) io_p2v (_RdDCSR2)))
- #define DBSA2 \
- \
- (*((volatile Address *) io_p2v (_DBSA2)))
- #define DBTA2 \
- \
- (*((volatile Word *) io_p2v (_DBTA2)))
- #define DBSB2 \
- \
- (*((volatile Address *) io_p2v (_DBSB2)))
- #define DBTB2 \
- \
- (*((volatile Word *) io_p2v (_DBTB2)))
- #define DDAR3 \
- \
- (*((volatile Word *) io_p2v (_DDAR3)))
- #define SetDCSR3 \
- \
- (*((volatile Word *) io_p2v (_SetDCSR3)))
- #define ClrDCSR3 \
- \
- (*((volatile Word *) io_p2v (_ClrDCSR3)))
- #define RdDCSR3 \
- \
- (*((volatile Word *) io_p2v (_RdDCSR3)))
- #define DBSA3 \
- \
- (*((volatile Address *) io_p2v (_DBSA3)))
- #define DBTA3 \
- \
- (*((volatile Word *) io_p2v (_DBTA3)))
- #define DBSB3 \
- \
- (*((volatile Address *) io_p2v (_DBSB3)))
- #define DBTB3 \
- \
- (*((volatile Word *) io_p2v (_DBTB3)))
- #define DDAR4 \
- \
- (*((volatile Word *) io_p2v (_DDAR4)))
- #define SetDCSR4 \
- \
- (*((volatile Word *) io_p2v (_SetDCSR4)))
- #define ClrDCSR4 \
- \
- (*((volatile Word *) io_p2v (_ClrDCSR4)))
- #define RdDCSR4 \
- \
- (*((volatile Word *) io_p2v (_RdDCSR4)))
- #define DBSA4 \
- \
- (*((volatile Address *) io_p2v (_DBSA4)))
- #define DBTA4 \
- \
- (*((volatile Word *) io_p2v (_DBTA4)))
- #define DBSB4 \
- \
- (*((volatile Address *) io_p2v (_DBSB4)))
- #define DBTB4 \
- \
- (*((volatile Word *) io_p2v (_DBTB4)))
- #define DDAR5 \
- \
- (*((volatile Word *) io_p2v (_DDAR5)))
- #define SetDCSR5 \
- \
- (*((volatile Word *) io_p2v (_SetDCSR5)))
- #define ClrDCSR5 \
- \
- (*((volatile Word *) io_p2v (_ClrDCSR5)))
- #define RdDCSR5 \
- \
- (*((volatile Word *) io_p2v (_RdDCSR5)))
- #define DBSA5 \
- \
- (*((volatile Address *) io_p2v (_DBSA5)))
- #define DBTA5 \
- \
- (*((volatile Word *) io_p2v (_DBTA5)))
- #define DBSB5 \
- \
- (*((volatile Address *) io_p2v (_DBSB5)))
- #define DBTB5 \
- \
- (*((volatile Word *) io_p2v (_DBTB5)))
- #endif
- #define DDAR_RW 0x00000001
- #define DDAR_DevWr (DDAR_RW*0)
-
- #define DDAR_DevRd (DDAR_RW*1)
-
- #define DDAR_E 0x00000002
- #define DDAR_LtlEnd (DDAR_E*0)
- #define DDAR_BigEnd (DDAR_E*1)
- #define DDAR_BS 0x00000004
- #define DDAR_Brst4 (DDAR_BS*0)
- #define DDAR_Brst8 (DDAR_BS*1)
- #define DDAR_DW 0x00000008
- #define DDAR_8BitDev (DDAR_DW*0)
- #define DDAR_16BitDev (DDAR_DW*1)
- #define DDAR_DS Fld (4, 4)
- #define DDAR_Ser0UDCTr \
- (0x0 << FShft (DDAR_DS))
- #define DDAR_Ser0UDCRc \
- (0x1 << FShft (DDAR_DS))
- #define DDAR_Ser1SDLCTr \
- (0x2 << FShft (DDAR_DS))
- #define DDAR_Ser1SDLCRc \
- (0x3 << FShft (DDAR_DS))
- #define DDAR_Ser1UARTTr \
- (0x4 << FShft (DDAR_DS))
- #define DDAR_Ser1UARTRc \
- (0x5 << FShft (DDAR_DS))
- #define DDAR_Ser2ICPTr \
- (0x6 << FShft (DDAR_DS))
- #define DDAR_Ser2ICPRc \
- (0x7 << FShft (DDAR_DS))
- #define DDAR_Ser3UARTTr \
- (0x8 << FShft (DDAR_DS))
- #define DDAR_Ser3UARTRc \
- (0x9 << FShft (DDAR_DS))
- #define DDAR_Ser4MCP0Tr \
- \
- (0xA << FShft (DDAR_DS))
- #define DDAR_Ser4MCP0Rc \
- \
- (0xB << FShft (DDAR_DS))
- #define DDAR_Ser4MCP1Tr \
- \
- (0xC << FShft (DDAR_DS))
- #define DDAR_Ser4MCP1Rc \
- \
- (0xD << FShft (DDAR_DS))
- #define DDAR_Ser4SSPTr \
- (0xE << FShft (DDAR_DS))
- #define DDAR_Ser4SSPRc \
- (0xF << FShft (DDAR_DS))
- #define DDAR_DA Fld (24, 8)
- #define DDAR_DevAdd(Add) \
- (((Add) & 0xF0000000) | \
- (((Add) & 0X003FFFFC) << (FShft (DDAR_DA) - 2)))
- #define DDAR_Ser0UDCWr \
- (DDAR_DevWr + DDAR_Brst8 + DDAR_8BitDev + \
- DDAR_Ser0UDCTr + DDAR_DevAdd (_Ser0UDCDR))
- #define DDAR_Ser0UDCRd \
- (DDAR_DevRd + DDAR_Brst8 + DDAR_8BitDev + \
- DDAR_Ser0UDCRc + DDAR_DevAdd (_Ser0UDCDR))
- #define DDAR_Ser1UARTWr \
- (DDAR_DevWr + DDAR_Brst4 + DDAR_8BitDev + \
- DDAR_Ser1UARTTr + DDAR_DevAdd (_Ser1UTDR))
- #define DDAR_Ser1UARTRd \
- (DDAR_DevRd + DDAR_Brst4 + DDAR_8BitDev + \
- DDAR_Ser1UARTRc + DDAR_DevAdd (_Ser1UTDR))
- #define DDAR_Ser1SDLCWr \
- (DDAR_DevWr + DDAR_Brst4 + DDAR_8BitDev + \
- DDAR_Ser1SDLCTr + DDAR_DevAdd (_Ser1SDDR))
- #define DDAR_Ser1SDLCRd \
- (DDAR_DevRd + DDAR_Brst4 + DDAR_8BitDev + \
- DDAR_Ser1SDLCRc + DDAR_DevAdd (_Ser1SDDR))
- #define DDAR_Ser2UARTWr \
- (DDAR_DevWr + DDAR_Brst4 + DDAR_8BitDev + \
- DDAR_Ser2ICPTr + DDAR_DevAdd (_Ser2UTDR))
- #define DDAR_Ser2UARTRd \
- (DDAR_DevRd + DDAR_Brst4 + DDAR_8BitDev + \
- DDAR_Ser2ICPRc + DDAR_DevAdd (_Ser2UTDR))
- #define DDAR_Ser2HSSPWr \
- (DDAR_DevWr + DDAR_Brst8 + DDAR_8BitDev + \
- DDAR_Ser2ICPTr + DDAR_DevAdd (_Ser2HSDR))
- #define DDAR_Ser2HSSPRd \
- (DDAR_DevRd + DDAR_Brst8 + DDAR_8BitDev + \
- DDAR_Ser2ICPRc + DDAR_DevAdd (_Ser2HSDR))
- #define DDAR_Ser3UARTWr \
- (DDAR_DevWr + DDAR_Brst4 + DDAR_8BitDev + \
- DDAR_Ser3UARTTr + DDAR_DevAdd (_Ser3UTDR))
- #define DDAR_Ser3UARTRd \
- (DDAR_DevRd + DDAR_Brst4 + DDAR_8BitDev + \
- DDAR_Ser3UARTRc + DDAR_DevAdd (_Ser3UTDR))
- #define DDAR_Ser4MCP0Wr \
- (DDAR_DevWr + DDAR_Brst4 + DDAR_16BitDev + \
- DDAR_Ser4MCP0Tr + DDAR_DevAdd (_Ser4MCDR0))
- #define DDAR_Ser4MCP0Rd \
- (DDAR_DevRd + DDAR_Brst4 + DDAR_16BitDev + \
- DDAR_Ser4MCP0Rc + DDAR_DevAdd (_Ser4MCDR0))
- #define DDAR_Ser4MCP1Wr \
- \
- (DDAR_DevWr + DDAR_Brst4 + DDAR_16BitDev + \
- DDAR_Ser4MCP1Tr + DDAR_DevAdd (_Ser4MCDR1))
- #define DDAR_Ser4MCP1Rd \
- \
- (DDAR_DevRd + DDAR_Brst4 + DDAR_16BitDev + \
- DDAR_Ser4MCP1Rc + DDAR_DevAdd (_Ser4MCDR1))
- #define DDAR_Ser4SSPWr \
- (DDAR_DevWr + DDAR_Brst4 + DDAR_16BitDev + \
- DDAR_Ser4SSPTr + DDAR_DevAdd (_Ser4SSDR))
- #define DDAR_Ser4SSPRd \
- (DDAR_DevRd + DDAR_Brst4 + DDAR_16BitDev + \
- DDAR_Ser4SSPRc + DDAR_DevAdd (_Ser4SSDR))
- #define DCSR_RUN 0x00000001
- #define DCSR_IE 0x00000002
- #define DCSR_ERROR 0x00000004
- #define DCSR_DONEA 0x00000008
- #define DCSR_STRTA 0x00000010
- #define DCSR_DONEB 0x00000020
- #define DCSR_STRTB 0x00000040
- #define DCSR_BIU 0x00000080
- #define DCSR_BufA (DCSR_BIU*0)
- #define DCSR_BufB (DCSR_BIU*1)
- #define DBT_TC Fld (13, 0)
- #define DBTA_TCA DBT_TC
- #define DBTB_TCB DBT_TC
- #define LCD_PEntrySp 2
- #define LCD_4BitPSp \
- \
- (16*LCD_PEntrySp)
- #define LCD_8BitPSp \
- \
- (256*LCD_PEntrySp)
- #define LCD_12_16BitPSp \
- \
- (16*LCD_PEntrySp)
- #define LCD_PGrey Fld (4, 0)
- #define LCD_PBlue Fld (4, 0)
- #define LCD_PGreen Fld (4, 4)
- #define LCD_PRed Fld (4, 8)
- #define LCD_PBS Fld (2, 12)
- #define LCD_4Bit \
- (0 << FShft (LCD_PBS))
- #define LCD_8Bit \
- (1 << FShft (LCD_PBS))
- #define LCD_12_16Bit \
- (2 << FShft (LCD_PBS))
- #define LCD_Int0_0 0x0
- #define LCD_Int11_1 0x1
- #define LCD_Int20_0 0x2
- #define LCD_Int26_7 0x3
- #define LCD_Int33_3 0x4
- #define LCD_Int40_0 0x5
- #define LCD_Int44_4 0x6
- #define LCD_Int50_0 0x7
- #define LCD_Int55_6 0x8
- #define LCD_Int60_0 0x9
- #define LCD_Int66_7 0xA
- #define LCD_Int73_3 0xB
- #define LCD_Int80_0 0xC
- #define LCD_Int88_9 0xD
- #define LCD_Int100_0 0xE
- #define LCD_Int100_0A 0xF
-
- #define _LCCR0 0xB0100000
- #define _LCSR 0xB0100004
- #define _DBAR1 0xB0100010
-
- #define _DCAR1 0xB0100014
-
- #define _DBAR2 0xB0100018
-
- #define _DCAR2 0xB010001C
-
- #define _LCCR1 0xB0100020
- #define _LCCR2 0xB0100024
- #define _LCCR3 0xB0100028
- #if LANGUAGE == C
- #define LCCR0 \
- (*((volatile Word *) io_p2v (_LCCR0)))
- #define LCSR \
- (*((volatile Word *) io_p2v (_LCSR)))
- #define DBAR1 \
- \
- (*((volatile Address *) io_p2v (_DBAR1)))
- #define DCAR1 \
- \
- (*((volatile Address *) io_p2v (_DCAR1)))
- #define DBAR2 \
- \
- (*((volatile Address *) io_p2v (_DBAR2)))
- #define DCAR2 \
- \
- (*((volatile Address *) io_p2v (_DCAR2)))
- #define LCCR1 \
- (*((volatile Word *) io_p2v (_LCCR1)))
- #define LCCR2 \
- (*((volatile Word *) io_p2v (_LCCR2)))
- #define LCCR3 \
- (*((volatile Word *) io_p2v (_LCCR3)))
- #endif
- #define LCCR0_LEN 0x00000001
- #define LCCR0_CMS 0x00000002
- #define LCCR0_Color (LCCR0_CMS*0)
- #define LCCR0_Mono (LCCR0_CMS*1)
- #define LCCR0_SDS 0x00000004
-
- #define LCCR0_Sngl (LCCR0_SDS*0)
- #define LCCR0_Dual (LCCR0_SDS*1)
- #define LCCR0_LDM 0x00000008
-
- #define LCCR0_BAM 0x00000010
-
- #define LCCR0_ERM 0x00000020
-
-
- #define LCCR0_PAS 0x00000080
- #define LCCR0_Pas (LCCR0_PAS*0)
- #define LCCR0_Act (LCCR0_PAS*1)
- #define LCCR0_BLE 0x00000100
- #define LCCR0_LtlEnd (LCCR0_BLE*0)
- #define LCCR0_BigEnd (LCCR0_BLE*1)
- #define LCCR0_DPD 0x00000200
-
- #define LCCR0_4PixMono (LCCR0_DPD*0)
-
- #define LCCR0_8PixMono (LCCR0_DPD*1)
-
- #define LCCR0_PDD Fld (8, 12)
-
- #define LCCR0_DMADel(Tcpu) \
- \
- ((Tcpu)/2 << FShft (LCCR0_PDD))
- #define LCSR_LDD 0x00000001
- #define LCSR_BAU 0x00000002
- #define LCSR_BER 0x00000004
- #define LCSR_ABC 0x00000008
- #define LCSR_IOL 0x00000010
-
- #define LCSR_IUL 0x00000020
-
- #define LCSR_IOU 0x00000040
-
- #define LCSR_IUU 0x00000080
-
- #define LCSR_OOL 0x00000100
-
- #define LCSR_OUL 0x00000200
-
- #define LCSR_OOU 0x00000400
-
- #define LCSR_OUU 0x00000800
-
- #define LCCR1_PPL Fld (6, 4)
- #define LCCR1_DisWdth(Pixel) \
- (((Pixel) - 16)/16 << FShft (LCCR1_PPL))
- #define LCCR1_HSW Fld (6, 10)
-
- #define LCCR1_HorSnchWdth(Tpix) \
- \
- (((Tpix) - 2) << FShft (LCCR1_HSW))
- #define LCCR1_ELW Fld (8, 16)
-
- #define LCCR1_EndLnDel(Tpix) \
- \
- (((Tpix) - 1) << FShft (LCCR1_ELW))
- #define LCCR1_BLW Fld (8, 24)
-
- #define LCCR1_BegLnDel(Tpix) \
- \
- (((Tpix) - 1) << FShft (LCCR1_BLW))
- #define LCCR2_LPP Fld (10, 0)
- #define LCCR2_DisHght(Line) \
- (((Line) - 1) << FShft (LCCR2_LPP))
- #define LCCR2_VSW Fld (6, 10)
-
- #define LCCR2_VrtSnchWdth(Tln) \
- \
- (((Tln) - 1) << FShft (LCCR2_VSW))
- #define LCCR2_EFW Fld (8, 16)
-
- #define LCCR2_EndFrmDel(Tln) \
- \
- ((Tln) << FShft (LCCR2_EFW))
- #define LCCR2_BFW Fld (8, 24)
-
- #define LCCR2_BegFrmDel(Tln) \
- \
- ((Tln) << FShft (LCCR2_BFW))
- #define LCCR3_PCD Fld (8, 0)
-
-
-
- #define LCCR3_PixClkDiv(Div) \
- (((Div) - 4)/2 << FShft (LCCR3_PCD))
-
-
- #define LCCR3_CeilPixClkDiv(Div) \
- (((Div) - 3)/2 << FShft (LCCR3_PCD))
-
-
- #define LCCR3_ACB Fld (8, 8)
-
- #define LCCR3_ACBsDiv(Div) \
- (((Div) - 2)/2 << FShft (LCCR3_ACB))
-
-
- #define LCCR3_CeilACBsDiv(Div) \
- (((Div) - 1)/2 << FShft (LCCR3_ACB))
-
-
- #define LCCR3_API Fld (4, 16)
-
- #define LCCR3_ACBsCntOff \
- \
- (0 << FShft (LCCR3_API))
- #define LCCR3_ACBsCnt(Trans) \
- \
- ((Trans) << FShft (LCCR3_API))
- #define LCCR3_VSP 0x00100000
-
- #define LCCR3_VrtSnchH (LCCR3_VSP*0)
-
- #define LCCR3_VrtSnchL (LCCR3_VSP*1)
-
- #define LCCR3_HSP 0x00200000
-
- #define LCCR3_HorSnchH (LCCR3_HSP*0)
-
- #define LCCR3_HorSnchL (LCCR3_HSP*1)
-
- #define LCCR3_PCP 0x00400000
- #define LCCR3_PixRsEdg (LCCR3_PCP*0)
- #define LCCR3_PixFlEdg (LCCR3_PCP*1)
- #define LCCR3_OEP 0x00800000
-
- #define LCCR3_OutEnH (LCCR3_OEP*0)
- #define LCCR3_OutEnL (LCCR3_OEP*1)
- #undef C
- #undef Assembly
|