| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752 |
- --- a/MAINTAINERS
- +++ b/MAINTAINERS
- @@ -2690,12 +2690,10 @@
- S: Maintained
-
- MARVELL MV643XX ETHERNET DRIVER
- -P: Dale Farnsworth
- -M: [email protected]
- -P: Manish Lachwani
- -M: [email protected]
- +P: Lennert Buytenhek
- +M: [email protected]
- L: [email protected]
- -S: Odd Fixes for 2.4; Maintained for 2.6.
- +S: Supported
-
- MATROX FRAMEBUFFER DRIVER
- P: Petr Vandrovec
- --- a/arch/arm/Kconfig
- +++ b/arch/arm/Kconfig
- @@ -84,6 +84,11 @@
- bool
- default y
-
- +config HAVE_LATENCYTOP_SUPPORT
- + bool
- + depends on !SMP
- + default y
- +
- config LOCKDEP_SUPPORT
- bool
- default y
- @@ -347,6 +352,16 @@
- If you have any questions or comments about the Linux kernel port
- to this board, send e-mail to <[email protected]>.
-
- +config ARCH_KIRKWOOD
- + bool "Marvell Kirkwood"
- + select PCI
- + select GENERIC_TIME
- + select GENERIC_CLOCKEVENTS
- + select PLAT_ORION
- + help
- + Support for the following Marvell Kirkwood series SoCs:
- + 88F6180, 88F6192 and 88F6281.
- +
- config ARCH_KS8695
- bool "Micrel/Kendin KS8695"
- select GENERIC_GPIO
- @@ -365,6 +380,24 @@
-
- <http://www.digi.com/products/microprocessors/index.jsp>
-
- +config ARCH_LOKI
- + bool "Marvell Loki (88RC8480)"
- + select GENERIC_TIME
- + select GENERIC_CLOCKEVENTS
- + select PLAT_ORION
- + help
- + Support for the Marvell Loki (88RC8480) SoC.
- +
- +config ARCH_MV78XX0
- + bool "Marvell MV78xx0"
- + select PCI
- + select GENERIC_TIME
- + select GENERIC_CLOCKEVENTS
- + select PLAT_ORION
- + help
- + Support for the following Marvell MV78xx0 series SoCs:
- + MV781x0, MV782x0.
- +
- config ARCH_MXC
- bool "Freescale MXC/iMX-based"
- select ARCH_MTD_XIP
- @@ -381,7 +414,8 @@
- select PLAT_ORION
- help
- Support for the following Marvell Orion 5x series SoCs:
- - Orion-1 (5181), Orion-NAS (5182), Orion-2 (5281.)
- + Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
- + Orion-2 (5281).
-
- config ARCH_PNX4008
- bool "Philips Nexperia PNX4008 Mobile"
- @@ -502,6 +536,10 @@
-
- source "arch/arm/mach-ixp23xx/Kconfig"
-
- +source "arch/arm/mach-loki/Kconfig"
- +
- +source "arch/arm/mach-mv78xx0/Kconfig"
- +
- source "arch/arm/mach-pxa/Kconfig"
-
- source "arch/arm/mach-sa1100/Kconfig"
- @@ -514,6 +552,8 @@
-
- source "arch/arm/mach-orion5x/Kconfig"
-
- +source "arch/arm/mach-kirkwood/Kconfig"
- +
- source "arch/arm/plat-s3c24xx/Kconfig"
- source "arch/arm/plat-s3c/Kconfig"
-
- --- a/arch/arm/Makefile
- +++ b/arch/arm/Makefile
- @@ -135,11 +135,14 @@
- machine-$(CONFIG_ARCH_NETX) := netx
- machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx
- machine-$(CONFIG_ARCH_DAVINCI) := davinci
- + machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood
- machine-$(CONFIG_ARCH_KS8695) := ks8695
- incdir-$(CONFIG_ARCH_MXC) := mxc
- machine-$(CONFIG_ARCH_MX3) := mx3
- machine-$(CONFIG_ARCH_ORION5X) := orion5x
- machine-$(CONFIG_ARCH_MSM7X00A) := msm
- + machine-$(CONFIG_ARCH_LOKI) := loki
- + machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
-
- ifeq ($(CONFIG_ARCH_EBSA110),y)
- # This is what happens if you forget the IOCS16 line.
- --- a/arch/arm/boot/compressed/head.S
- +++ b/arch/arm/boot/compressed/head.S
- @@ -623,8 +623,8 @@
- b __armv4_mmu_cache_off
- b __armv4_mmu_cache_flush
-
- - .word 0x56055310 @ Feroceon
- - .word 0xfffffff0
- + .word 0x56050000 @ Feroceon
- + .word 0xff0f0000
- b __armv4_mmu_cache_on
- b __armv4_mmu_cache_off
- b __armv5tej_mmu_cache_flush
- --- /dev/null
- +++ b/arch/arm/configs/kirkwood_defconfig
- @@ -0,0 +1,1426 @@
- +#
- +# Automatically generated make config: don't edit
- +# Linux kernel version: 2.6.26-rc5
- +# Sun Jun 22 15:51:25 2008
- +#
- +CONFIG_ARM=y
- +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
- +CONFIG_GENERIC_GPIO=y
- +CONFIG_GENERIC_TIME=y
- +CONFIG_GENERIC_CLOCKEVENTS=y
- +CONFIG_MMU=y
- +# CONFIG_NO_IOPORT is not set
- +CONFIG_GENERIC_HARDIRQS=y
- +CONFIG_STACKTRACE_SUPPORT=y
- +CONFIG_HAVE_LATENCYTOP_SUPPORT=y
- +CONFIG_LOCKDEP_SUPPORT=y
- +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
- +CONFIG_HARDIRQS_SW_RESEND=y
- +CONFIG_GENERIC_IRQ_PROBE=y
- +CONFIG_RWSEM_GENERIC_SPINLOCK=y
- +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
- +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
- +CONFIG_GENERIC_HWEIGHT=y
- +CONFIG_GENERIC_CALIBRATE_DELAY=y
- +CONFIG_ARCH_SUPPORTS_AOUT=y
- +CONFIG_ZONE_DMA=y
- +CONFIG_VECTORS_BASE=0xffff0000
- +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
- +
- +#
- +# General setup
- +#
- +CONFIG_EXPERIMENTAL=y
- +CONFIG_BROKEN_ON_SMP=y
- +CONFIG_LOCK_KERNEL=y
- +CONFIG_INIT_ENV_ARG_LIMIT=32
- +CONFIG_LOCALVERSION=""
- +CONFIG_LOCALVERSION_AUTO=y
- +CONFIG_SWAP=y
- +CONFIG_SYSVIPC=y
- +CONFIG_SYSVIPC_SYSCTL=y
- +# CONFIG_POSIX_MQUEUE is not set
- +# CONFIG_BSD_PROCESS_ACCT is not set
- +# CONFIG_TASKSTATS is not set
- +# CONFIG_AUDIT is not set
- +# CONFIG_IKCONFIG is not set
- +CONFIG_LOG_BUF_SHIFT=14
- +# CONFIG_CGROUPS is not set
- +# CONFIG_GROUP_SCHED is not set
- +# CONFIG_SYSFS_DEPRECATED_V2 is not set
- +# CONFIG_RELAY is not set
- +# CONFIG_NAMESPACES is not set
- +# CONFIG_BLK_DEV_INITRD is not set
- +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
- +CONFIG_SYSCTL=y
- +CONFIG_EMBEDDED=y
- +CONFIG_UID16=y
- +CONFIG_SYSCTL_SYSCALL=y
- +CONFIG_SYSCTL_SYSCALL_CHECK=y
- +CONFIG_KALLSYMS=y
- +# CONFIG_KALLSYMS_ALL is not set
- +# CONFIG_KALLSYMS_EXTRA_PASS is not set
- +CONFIG_HOTPLUG=y
- +CONFIG_PRINTK=y
- +CONFIG_BUG=y
- +CONFIG_ELF_CORE=y
- +CONFIG_COMPAT_BRK=y
- +CONFIG_BASE_FULL=y
- +CONFIG_FUTEX=y
- +CONFIG_ANON_INODES=y
- +CONFIG_EPOLL=y
- +CONFIG_SIGNALFD=y
- +CONFIG_TIMERFD=y
- +CONFIG_EVENTFD=y
- +CONFIG_SHMEM=y
- +CONFIG_VM_EVENT_COUNTERS=y
- +CONFIG_SLAB=y
- +# CONFIG_SLUB is not set
- +# CONFIG_SLOB is not set
- +CONFIG_PROFILING=y
- +# CONFIG_MARKERS is not set
- +CONFIG_OPROFILE=y
- +CONFIG_HAVE_OPROFILE=y
- +CONFIG_KPROBES=y
- +CONFIG_KRETPROBES=y
- +CONFIG_HAVE_KPROBES=y
- +CONFIG_HAVE_KRETPROBES=y
- +# CONFIG_HAVE_DMA_ATTRS is not set
- +CONFIG_PROC_PAGE_MONITOR=y
- +CONFIG_SLABINFO=y
- +CONFIG_RT_MUTEXES=y
- +# CONFIG_TINY_SHMEM is not set
- +CONFIG_BASE_SMALL=0
- +CONFIG_MODULES=y
- +# CONFIG_MODULE_FORCE_LOAD is not set
- +CONFIG_MODULE_UNLOAD=y
- +# CONFIG_MODULE_FORCE_UNLOAD is not set
- +# CONFIG_MODVERSIONS is not set
- +# CONFIG_MODULE_SRCVERSION_ALL is not set
- +# CONFIG_KMOD is not set
- +CONFIG_BLOCK=y
- +# CONFIG_LBD is not set
- +# CONFIG_BLK_DEV_IO_TRACE is not set
- +# CONFIG_LSF is not set
- +# CONFIG_BLK_DEV_BSG is not set
- +
- +#
- +# IO Schedulers
- +#
- +CONFIG_IOSCHED_NOOP=y
- +CONFIG_IOSCHED_AS=y
- +CONFIG_IOSCHED_DEADLINE=y
- +CONFIG_IOSCHED_CFQ=y
- +# CONFIG_DEFAULT_AS is not set
- +# CONFIG_DEFAULT_DEADLINE is not set
- +CONFIG_DEFAULT_CFQ=y
- +# CONFIG_DEFAULT_NOOP is not set
- +CONFIG_DEFAULT_IOSCHED="cfq"
- +CONFIG_CLASSIC_RCU=y
- +
- +#
- +# System Type
- +#
- +# CONFIG_ARCH_AAEC2000 is not set
- +# CONFIG_ARCH_INTEGRATOR is not set
- +# CONFIG_ARCH_REALVIEW is not set
- +# CONFIG_ARCH_VERSATILE is not set
- +# CONFIG_ARCH_AT91 is not set
- +# CONFIG_ARCH_CLPS7500 is not set
- +# CONFIG_ARCH_CLPS711X is not set
- +# CONFIG_ARCH_CO285 is not set
- +# CONFIG_ARCH_EBSA110 is not set
- +# CONFIG_ARCH_EP93XX is not set
- +# CONFIG_ARCH_FOOTBRIDGE is not set
- +# CONFIG_ARCH_NETX is not set
- +# CONFIG_ARCH_H720X is not set
- +# CONFIG_ARCH_IMX is not set
- +# CONFIG_ARCH_IOP13XX is not set
- +# CONFIG_ARCH_IOP32X is not set
- +# CONFIG_ARCH_IOP33X is not set
- +# CONFIG_ARCH_IXP23XX is not set
- +# CONFIG_ARCH_IXP2000 is not set
- +# CONFIG_ARCH_IXP4XX is not set
- +# CONFIG_ARCH_L7200 is not set
- +CONFIG_ARCH_KIRKWOOD=y
- +# CONFIG_ARCH_KS8695 is not set
- +# CONFIG_ARCH_NS9XXX is not set
- +# CONFIG_ARCH_LOKI is not set
- +# CONFIG_ARCH_MV78XX0 is not set
- +# CONFIG_ARCH_MXC is not set
- +# CONFIG_ARCH_ORION5X is not set
- +# CONFIG_ARCH_PNX4008 is not set
- +# CONFIG_ARCH_PXA is not set
- +# CONFIG_ARCH_RPC is not set
- +# CONFIG_ARCH_SA1100 is not set
- +# CONFIG_ARCH_S3C2410 is not set
- +# CONFIG_ARCH_SHARK is not set
- +# CONFIG_ARCH_LH7A40X is not set
- +# CONFIG_ARCH_DAVINCI is not set
- +# CONFIG_ARCH_OMAP is not set
- +# CONFIG_ARCH_MSM7X00A is not set
- +
- +#
- +# Marvell Kirkwood Implementations
- +#
- +CONFIG_MACH_DB88F6281_BP=y
- +CONFIG_MACH_RD88F6192_NAS=y
- +CONFIG_MACH_RD88F6281=y
- +
- +#
- +# Boot options
- +#
- +
- +#
- +# Power management
- +#
- +CONFIG_PLAT_ORION=y
- +
- +#
- +# Processor Type
- +#
- +CONFIG_CPU_32=y
- +CONFIG_CPU_FEROCEON=y
- +# CONFIG_CPU_FEROCEON_OLD_ID is not set
- +CONFIG_CPU_32v5=y
- +CONFIG_CPU_ABRT_EV5T=y
- +CONFIG_CPU_PABRT_NOIFAR=y
- +CONFIG_CPU_CACHE_VIVT=y
- +CONFIG_CPU_COPY_FEROCEON=y
- +CONFIG_CPU_TLB_FEROCEON=y
- +CONFIG_CPU_CP15=y
- +CONFIG_CPU_CP15_MMU=y
- +
- +#
- +# Processor Features
- +#
- +CONFIG_ARM_THUMB=y
- +# CONFIG_CPU_ICACHE_DISABLE is not set
- +# CONFIG_CPU_DCACHE_DISABLE is not set
- +CONFIG_OUTER_CACHE=y
- +CONFIG_CACHE_FEROCEON_L2=y
- +
- +#
- +# Bus support
- +#
- +CONFIG_PCI=y
- +CONFIG_PCI_SYSCALL=y
- +# CONFIG_ARCH_SUPPORTS_MSI is not set
- +CONFIG_PCI_LEGACY=y
- +# CONFIG_PCI_DEBUG is not set
- +# CONFIG_PCCARD is not set
- +
- +#
- +# Kernel Features
- +#
- +CONFIG_TICK_ONESHOT=y
- +CONFIG_NO_HZ=y
- +CONFIG_HIGH_RES_TIMERS=y
- +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
- +CONFIG_PREEMPT=y
- +CONFIG_HZ=100
- +CONFIG_AEABI=y
- +# CONFIG_OABI_COMPAT is not set
- +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
- +CONFIG_SELECT_MEMORY_MODEL=y
- +CONFIG_FLATMEM_MANUAL=y
- +# CONFIG_DISCONTIGMEM_MANUAL is not set
- +# CONFIG_SPARSEMEM_MANUAL is not set
- +CONFIG_FLATMEM=y
- +CONFIG_FLAT_NODE_MEM_MAP=y
- +# CONFIG_SPARSEMEM_STATIC is not set
- +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
- +CONFIG_PAGEFLAGS_EXTENDED=y
- +CONFIG_SPLIT_PTLOCK_CPUS=4096
- +# CONFIG_RESOURCES_64BIT is not set
- +CONFIG_ZONE_DMA_FLAG=1
- +CONFIG_BOUNCE=y
- +CONFIG_VIRT_TO_BUS=y
- +CONFIG_ALIGNMENT_TRAP=y
- +
- +#
- +# Boot options
- +#
- +CONFIG_ZBOOT_ROM_TEXT=0x0
- +CONFIG_ZBOOT_ROM_BSS=0x0
- +CONFIG_CMDLINE=""
- +# CONFIG_XIP_KERNEL is not set
- +# CONFIG_KEXEC is not set
- +
- +#
- +# Floating point emulation
- +#
- +
- +#
- +# At least one emulation must be selected
- +#
- +# CONFIG_VFP is not set
- +
- +#
- +# Userspace binary formats
- +#
- +CONFIG_BINFMT_ELF=y
- +# CONFIG_BINFMT_AOUT is not set
- +# CONFIG_BINFMT_MISC is not set
- +
- +#
- +# Power management options
- +#
- +# CONFIG_PM is not set
- +CONFIG_ARCH_SUSPEND_POSSIBLE=y
- +
- +#
- +# Networking
- +#
- +CONFIG_NET=y
- +
- +#
- +# Networking options
- +#
- +CONFIG_PACKET=y
- +CONFIG_PACKET_MMAP=y
- +CONFIG_UNIX=y
- +CONFIG_XFRM=y
- +# CONFIG_XFRM_USER is not set
- +# CONFIG_XFRM_SUB_POLICY is not set
- +# CONFIG_XFRM_MIGRATE is not set
- +# CONFIG_XFRM_STATISTICS is not set
- +# CONFIG_NET_KEY is not set
- +CONFIG_INET=y
- +CONFIG_IP_MULTICAST=y
- +# CONFIG_IP_ADVANCED_ROUTER is not set
- +CONFIG_IP_FIB_HASH=y
- +CONFIG_IP_PNP=y
- +CONFIG_IP_PNP_DHCP=y
- +CONFIG_IP_PNP_BOOTP=y
- +# CONFIG_IP_PNP_RARP is not set
- +# CONFIG_NET_IPIP is not set
- +# CONFIG_NET_IPGRE is not set
- +# CONFIG_IP_MROUTE is not set
- +# CONFIG_ARPD is not set
- +# CONFIG_SYN_COOKIES is not set
- +# CONFIG_INET_AH is not set
- +# CONFIG_INET_ESP is not set
- +# CONFIG_INET_IPCOMP is not set
- +# CONFIG_INET_XFRM_TUNNEL is not set
- +# CONFIG_INET_TUNNEL is not set
- +CONFIG_INET_XFRM_MODE_TRANSPORT=y
- +CONFIG_INET_XFRM_MODE_TUNNEL=y
- +CONFIG_INET_XFRM_MODE_BEET=y
- +# CONFIG_INET_LRO is not set
- +CONFIG_INET_DIAG=y
- +CONFIG_INET_TCP_DIAG=y
- +# CONFIG_TCP_CONG_ADVANCED is not set
- +CONFIG_TCP_CONG_CUBIC=y
- +CONFIG_DEFAULT_TCP_CONG="cubic"
- +# CONFIG_TCP_MD5SIG is not set
- +# CONFIG_IPV6 is not set
- +# CONFIG_NETWORK_SECMARK is not set
- +# CONFIG_NETFILTER is not set
- +# CONFIG_IP_DCCP is not set
- +# CONFIG_IP_SCTP is not set
- +# CONFIG_TIPC is not set
- +# CONFIG_ATM is not set
- +# CONFIG_BRIDGE is not set
- +# CONFIG_VLAN_8021Q is not set
- +# CONFIG_DECNET is not set
- +# CONFIG_LLC2 is not set
- +# CONFIG_IPX is not set
- +# CONFIG_ATALK is not set
- +# CONFIG_X25 is not set
- +# CONFIG_LAPB is not set
- +# CONFIG_ECONET is not set
- +# CONFIG_WAN_ROUTER is not set
- +# CONFIG_NET_SCHED is not set
- +
- +#
- +# Network testing
- +#
- +CONFIG_NET_PKTGEN=m
- +# CONFIG_NET_TCPPROBE is not set
- +# CONFIG_HAMRADIO is not set
- +# CONFIG_CAN is not set
- +# CONFIG_IRDA is not set
- +# CONFIG_BT is not set
- +# CONFIG_AF_RXRPC is not set
- +
- +#
- +# Wireless
- +#
- +# CONFIG_CFG80211 is not set
- +CONFIG_WIRELESS_EXT=y
- +# CONFIG_MAC80211 is not set
- +# CONFIG_IEEE80211 is not set
- +# CONFIG_RFKILL is not set
- +# CONFIG_NET_9P is not set
- +
- +#
- +# Device Drivers
- +#
- +
- +#
- +# Generic Driver Options
- +#
- +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
- +CONFIG_STANDALONE=y
- +CONFIG_PREVENT_FIRMWARE_BUILD=y
- +CONFIG_FW_LOADER=y
- +# CONFIG_DEBUG_DRIVER is not set
- +# CONFIG_DEBUG_DEVRES is not set
- +# CONFIG_SYS_HYPERVISOR is not set
- +# CONFIG_CONNECTOR is not set
- +CONFIG_MTD=y
- +# CONFIG_MTD_DEBUG is not set
- +# CONFIG_MTD_CONCAT is not set
- +CONFIG_MTD_PARTITIONS=y
- +# CONFIG_MTD_REDBOOT_PARTS is not set
- +CONFIG_MTD_CMDLINE_PARTS=y
- +# CONFIG_MTD_AFS_PARTS is not set
- +# CONFIG_MTD_AR7_PARTS is not set
- +
- +#
- +# User Modules And Translation Layers
- +#
- +CONFIG_MTD_CHAR=y
- +CONFIG_MTD_BLKDEVS=y
- +CONFIG_MTD_BLOCK=y
- +# CONFIG_FTL is not set
- +# CONFIG_NFTL is not set
- +# CONFIG_INFTL is not set
- +# CONFIG_RFD_FTL is not set
- +# CONFIG_SSFDC is not set
- +# CONFIG_MTD_OOPS is not set
- +
- +#
- +# RAM/ROM/Flash chip drivers
- +#
- +CONFIG_MTD_CFI=y
- +CONFIG_MTD_JEDECPROBE=y
- +CONFIG_MTD_GEN_PROBE=y
- +CONFIG_MTD_CFI_ADV_OPTIONS=y
- +CONFIG_MTD_CFI_NOSWAP=y
- +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
- +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
- +CONFIG_MTD_CFI_GEOMETRY=y
- +CONFIG_MTD_MAP_BANK_WIDTH_1=y
- +CONFIG_MTD_MAP_BANK_WIDTH_2=y
- +# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
- +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
- +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
- +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
- +CONFIG_MTD_CFI_I1=y
- +CONFIG_MTD_CFI_I2=y
- +# CONFIG_MTD_CFI_I4 is not set
- +# CONFIG_MTD_CFI_I8 is not set
- +# CONFIG_MTD_OTP is not set
- +CONFIG_MTD_CFI_INTELEXT=y
- +# CONFIG_MTD_CFI_AMDSTD is not set
- +CONFIG_MTD_CFI_STAA=y
- +CONFIG_MTD_CFI_UTIL=y
- +# CONFIG_MTD_RAM is not set
- +# CONFIG_MTD_ROM is not set
- +# CONFIG_MTD_ABSENT is not set
- +
- +#
- +# Mapping drivers for chip access
- +#
- +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
- +CONFIG_MTD_PHYSMAP=y
- +CONFIG_MTD_PHYSMAP_START=0x0
- +CONFIG_MTD_PHYSMAP_LEN=0x0
- +CONFIG_MTD_PHYSMAP_BANKWIDTH=0
- +# CONFIG_MTD_ARM_INTEGRATOR is not set
- +# CONFIG_MTD_IMPA7 is not set
- +# CONFIG_MTD_INTEL_VR_NOR is not set
- +# CONFIG_MTD_PLATRAM is not set
- +
- +#
- +# Self-contained MTD device drivers
- +#
- +# CONFIG_MTD_PMC551 is not set
- +# CONFIG_MTD_DATAFLASH is not set
- +CONFIG_MTD_M25P80=y
- +CONFIG_M25PXX_USE_FAST_READ=y
- +# CONFIG_MTD_SLRAM is not set
- +# CONFIG_MTD_PHRAM is not set
- +# CONFIG_MTD_MTDRAM is not set
- +# CONFIG_MTD_BLOCK2MTD is not set
- +
- +#
- +# Disk-On-Chip Device Drivers
- +#
- +# CONFIG_MTD_DOC2000 is not set
- +# CONFIG_MTD_DOC2001 is not set
- +# CONFIG_MTD_DOC2001PLUS is not set
- +CONFIG_MTD_NAND=y
- +CONFIG_MTD_NAND_VERIFY_WRITE=y
- +# CONFIG_MTD_NAND_ECC_SMC is not set
- +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
- +CONFIG_MTD_NAND_IDS=y
- +# CONFIG_MTD_NAND_DISKONCHIP is not set
- +# CONFIG_MTD_NAND_CAFE is not set
- +# CONFIG_MTD_NAND_NANDSIM is not set
- +# CONFIG_MTD_NAND_PLATFORM is not set
- +# CONFIG_MTD_ALAUDA is not set
- +CONFIG_MTD_NAND_ORION=y
- +# CONFIG_MTD_ONENAND is not set
- +
- +#
- +# UBI - Unsorted block images
- +#
- +# CONFIG_MTD_UBI is not set
- +# CONFIG_PARPORT is not set
- +CONFIG_BLK_DEV=y
- +# CONFIG_BLK_CPQ_DA is not set
- +# CONFIG_BLK_CPQ_CISS_DA is not set
- +# CONFIG_BLK_DEV_DAC960 is not set
- +# CONFIG_BLK_DEV_UMEM is not set
- +# CONFIG_BLK_DEV_COW_COMMON is not set
- +CONFIG_BLK_DEV_LOOP=y
- +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
- +# CONFIG_BLK_DEV_NBD is not set
- +# CONFIG_BLK_DEV_SX8 is not set
- +# CONFIG_BLK_DEV_UB is not set
- +# CONFIG_BLK_DEV_RAM is not set
- +# CONFIG_CDROM_PKTCDVD is not set
- +# CONFIG_ATA_OVER_ETH is not set
- +# CONFIG_MISC_DEVICES is not set
- +CONFIG_HAVE_IDE=y
- +# CONFIG_IDE is not set
- +
- +#
- +# SCSI device support
- +#
- +# CONFIG_RAID_ATTRS is not set
- +CONFIG_SCSI=y
- +CONFIG_SCSI_DMA=y
- +# CONFIG_SCSI_TGT is not set
- +# CONFIG_SCSI_NETLINK is not set
- +# CONFIG_SCSI_PROC_FS is not set
- +
- +#
- +# SCSI support type (disk, tape, CD-ROM)
- +#
- +CONFIG_BLK_DEV_SD=y
- +# CONFIG_CHR_DEV_ST is not set
- +# CONFIG_CHR_DEV_OSST is not set
- +CONFIG_BLK_DEV_SR=m
- +# CONFIG_BLK_DEV_SR_VENDOR is not set
- +CONFIG_CHR_DEV_SG=m
- +# CONFIG_CHR_DEV_SCH is not set
- +
- +#
- +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
- +#
- +# CONFIG_SCSI_MULTI_LUN is not set
- +# CONFIG_SCSI_CONSTANTS is not set
- +# CONFIG_SCSI_LOGGING is not set
- +# CONFIG_SCSI_SCAN_ASYNC is not set
- +CONFIG_SCSI_WAIT_SCAN=m
- +
- +#
- +# SCSI Transports
- +#
- +# CONFIG_SCSI_SPI_ATTRS is not set
- +# CONFIG_SCSI_FC_ATTRS is not set
- +# CONFIG_SCSI_ISCSI_ATTRS is not set
- +# CONFIG_SCSI_SAS_LIBSAS is not set
- +# CONFIG_SCSI_SRP_ATTRS is not set
- +CONFIG_SCSI_LOWLEVEL=y
- +# CONFIG_ISCSI_TCP is not set
- +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
- +# CONFIG_SCSI_3W_9XXX is not set
- +# CONFIG_SCSI_ACARD is not set
- +# CONFIG_SCSI_AACRAID is not set
- +# CONFIG_SCSI_AIC7XXX is not set
- +# CONFIG_SCSI_AIC7XXX_OLD is not set
- +# CONFIG_SCSI_AIC79XX is not set
- +# CONFIG_SCSI_AIC94XX is not set
- +# CONFIG_SCSI_DPT_I2O is not set
- +# CONFIG_SCSI_ADVANSYS is not set
- +# CONFIG_SCSI_ARCMSR is not set
- +# CONFIG_MEGARAID_NEWGEN is not set
- +# CONFIG_MEGARAID_LEGACY is not set
- +# CONFIG_MEGARAID_SAS is not set
- +# CONFIG_SCSI_HPTIOP is not set
- +# CONFIG_SCSI_DMX3191D is not set
- +# CONFIG_SCSI_FUTURE_DOMAIN is not set
- +# CONFIG_SCSI_IPS is not set
- +# CONFIG_SCSI_INITIO is not set
- +# CONFIG_SCSI_INIA100 is not set
- +# CONFIG_SCSI_MVSAS is not set
- +# CONFIG_SCSI_STEX is not set
- +# CONFIG_SCSI_SYM53C8XX_2 is not set
- +# CONFIG_SCSI_IPR is not set
- +# CONFIG_SCSI_QLOGIC_1280 is not set
- +# CONFIG_SCSI_QLA_FC is not set
- +# CONFIG_SCSI_QLA_ISCSI is not set
- +# CONFIG_SCSI_LPFC is not set
- +# CONFIG_SCSI_DC395x is not set
- +# CONFIG_SCSI_DC390T is not set
- +# CONFIG_SCSI_NSP32 is not set
- +# CONFIG_SCSI_DEBUG is not set
- +# CONFIG_SCSI_SRP is not set
- +CONFIG_ATA=y
- +# CONFIG_ATA_NONSTANDARD is not set
- +CONFIG_SATA_PMP=y
- +# CONFIG_SATA_AHCI is not set
- +# CONFIG_SATA_SIL24 is not set
- +CONFIG_ATA_SFF=y
- +# CONFIG_SATA_SVW is not set
- +# CONFIG_ATA_PIIX is not set
- +CONFIG_SATA_MV=y
- +# CONFIG_SATA_NV is not set
- +# CONFIG_PDC_ADMA is not set
- +# CONFIG_SATA_QSTOR is not set
- +# CONFIG_SATA_PROMISE is not set
- +# CONFIG_SATA_SX4 is not set
- +# CONFIG_SATA_SIL is not set
- +# CONFIG_SATA_SIS is not set
- +# CONFIG_SATA_ULI is not set
- +# CONFIG_SATA_VIA is not set
- +# CONFIG_SATA_VITESSE is not set
- +# CONFIG_SATA_INIC162X is not set
- +# CONFIG_PATA_ALI is not set
- +# CONFIG_PATA_AMD is not set
- +# CONFIG_PATA_ARTOP is not set
- +# CONFIG_PATA_ATIIXP is not set
- +# CONFIG_PATA_CMD640_PCI is not set
- +# CONFIG_PATA_CMD64X is not set
- +# CONFIG_PATA_CS5520 is not set
- +# CONFIG_PATA_CS5530 is not set
- +# CONFIG_PATA_CYPRESS is not set
- +# CONFIG_PATA_EFAR is not set
- +# CONFIG_ATA_GENERIC is not set
- +# CONFIG_PATA_HPT366 is not set
- +# CONFIG_PATA_HPT37X is not set
- +# CONFIG_PATA_HPT3X2N is not set
- +# CONFIG_PATA_HPT3X3 is not set
- +# CONFIG_PATA_IT821X is not set
- +# CONFIG_PATA_IT8213 is not set
- +# CONFIG_PATA_JMICRON is not set
- +# CONFIG_PATA_TRIFLEX is not set
- +# CONFIG_PATA_MARVELL is not set
- +# CONFIG_PATA_MPIIX is not set
- +# CONFIG_PATA_OLDPIIX is not set
- +# CONFIG_PATA_NETCELL is not set
- +# CONFIG_PATA_NINJA32 is not set
- +# CONFIG_PATA_NS87410 is not set
- +# CONFIG_PATA_NS87415 is not set
- +# CONFIG_PATA_OPTI is not set
- +# CONFIG_PATA_OPTIDMA is not set
- +# CONFIG_PATA_PDC_OLD is not set
- +# CONFIG_PATA_RADISYS is not set
- +# CONFIG_PATA_RZ1000 is not set
- +# CONFIG_PATA_SC1200 is not set
- +# CONFIG_PATA_SERVERWORKS is not set
- +# CONFIG_PATA_PDC2027X is not set
- +# CONFIG_PATA_SIL680 is not set
- +# CONFIG_PATA_SIS is not set
- +# CONFIG_PATA_VIA is not set
- +# CONFIG_PATA_WINBOND is not set
- +# CONFIG_PATA_PLATFORM is not set
- +# CONFIG_PATA_SCH is not set
- +# CONFIG_MD is not set
- +# CONFIG_FUSION is not set
- +
- +#
- +# IEEE 1394 (FireWire) support
- +#
- +# CONFIG_FIREWIRE is not set
- +# CONFIG_IEEE1394 is not set
- +# CONFIG_I2O is not set
- +CONFIG_NETDEVICES=y
- +# CONFIG_NETDEVICES_MULTIQUEUE is not set
- +# CONFIG_DUMMY is not set
- +# CONFIG_BONDING is not set
- +# CONFIG_MACVLAN is not set
- +# CONFIG_EQUALIZER is not set
- +# CONFIG_TUN is not set
- +# CONFIG_VETH is not set
- +# CONFIG_ARCNET is not set
- +# CONFIG_PHYLIB is not set
- +CONFIG_NET_ETHERNET=y
- +CONFIG_MII=y
- +# CONFIG_AX88796 is not set
- +# CONFIG_HAPPYMEAL is not set
- +# CONFIG_SUNGEM is not set
- +# CONFIG_CASSINI is not set
- +# CONFIG_NET_VENDOR_3COM is not set
- +# CONFIG_SMC91X is not set
- +# CONFIG_DM9000 is not set
- +# CONFIG_ENC28J60 is not set
- +# CONFIG_NET_TULIP is not set
- +# CONFIG_HP100 is not set
- +# CONFIG_IBM_NEW_EMAC_ZMII is not set
- +# CONFIG_IBM_NEW_EMAC_RGMII is not set
- +# CONFIG_IBM_NEW_EMAC_TAH is not set
- +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
- +CONFIG_NET_PCI=y
- +# CONFIG_PCNET32 is not set
- +# CONFIG_AMD8111_ETH is not set
- +# CONFIG_ADAPTEC_STARFIRE is not set
- +# CONFIG_B44 is not set
- +# CONFIG_FORCEDETH is not set
- +# CONFIG_EEPRO100 is not set
- +# CONFIG_E100 is not set
- +# CONFIG_FEALNX is not set
- +# CONFIG_NATSEMI is not set
- +# CONFIG_NE2K_PCI is not set
- +# CONFIG_8139CP is not set
- +# CONFIG_8139TOO is not set
- +# CONFIG_R6040 is not set
- +# CONFIG_SIS900 is not set
- +# CONFIG_EPIC100 is not set
- +# CONFIG_SUNDANCE is not set
- +# CONFIG_TLAN is not set
- +# CONFIG_VIA_RHINE is not set
- +# CONFIG_SC92031 is not set
- +CONFIG_NETDEV_1000=y
- +# CONFIG_ACENIC is not set
- +# CONFIG_DL2K is not set
- +CONFIG_E1000=y
- +CONFIG_E1000_NAPI=y
- +# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
- +# CONFIG_E1000E is not set
- +# CONFIG_E1000E_ENABLED is not set
- +# CONFIG_IP1000 is not set
- +# CONFIG_IGB is not set
- +# CONFIG_NS83820 is not set
- +# CONFIG_HAMACHI is not set
- +# CONFIG_YELLOWFIN is not set
- +# CONFIG_R8169 is not set
- +# CONFIG_SIS190 is not set
- +# CONFIG_SKGE is not set
- +# CONFIG_SKY2 is not set
- +# CONFIG_VIA_VELOCITY is not set
- +# CONFIG_TIGON3 is not set
- +# CONFIG_BNX2 is not set
- +CONFIG_MV643XX_ETH=y
- +# CONFIG_QLA3XXX is not set
- +# CONFIG_ATL1 is not set
- +# CONFIG_NETDEV_10000 is not set
- +# CONFIG_TR is not set
- +
- +#
- +# Wireless LAN
- +#
- +# CONFIG_WLAN_PRE80211 is not set
- +# CONFIG_WLAN_80211 is not set
- +# CONFIG_IWLWIFI_LEDS is not set
- +
- +#
- +# USB Network Adapters
- +#
- +# CONFIG_USB_CATC is not set
- +# CONFIG_USB_KAWETH is not set
- +# CONFIG_USB_PEGASUS is not set
- +# CONFIG_USB_RTL8150 is not set
- +# CONFIG_USB_USBNET is not set
- +# CONFIG_WAN is not set
- +# CONFIG_FDDI is not set
- +# CONFIG_HIPPI is not set
- +# CONFIG_PPP is not set
- +# CONFIG_SLIP is not set
- +# CONFIG_NET_FC is not set
- +# CONFIG_NETCONSOLE is not set
- +# CONFIG_NETPOLL is not set
- +# CONFIG_NET_POLL_CONTROLLER is not set
- +# CONFIG_ISDN is not set
- +
- +#
- +# Input device support
- +#
- +CONFIG_INPUT=y
- +# CONFIG_INPUT_FF_MEMLESS is not set
- +# CONFIG_INPUT_POLLDEV is not set
- +
- +#
- +# Userland interfaces
- +#
- +CONFIG_INPUT_MOUSEDEV=y
- +CONFIG_INPUT_MOUSEDEV_PSAUX=y
- +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
- +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
- +# CONFIG_INPUT_JOYDEV is not set
- +# CONFIG_INPUT_EVDEV is not set
- +# CONFIG_INPUT_EVBUG is not set
- +
- +#
- +# Input Device Drivers
- +#
- +# CONFIG_INPUT_KEYBOARD is not set
- +# CONFIG_INPUT_MOUSE is not set
- +# CONFIG_INPUT_JOYSTICK is not set
- +# CONFIG_INPUT_TABLET is not set
- +# CONFIG_INPUT_TOUCHSCREEN is not set
- +# CONFIG_INPUT_MISC is not set
- +
- +#
- +# Hardware I/O ports
- +#
- +# CONFIG_SERIO is not set
- +# CONFIG_GAMEPORT is not set
- +
- +#
- +# Character devices
- +#
- +# CONFIG_VT is not set
- +# CONFIG_DEVKMEM is not set
- +# CONFIG_SERIAL_NONSTANDARD is not set
- +# CONFIG_NOZOMI is not set
- +
- +#
- +# Serial drivers
- +#
- +CONFIG_SERIAL_8250=y
- +CONFIG_SERIAL_8250_CONSOLE=y
- +# CONFIG_SERIAL_8250_PCI is not set
- +CONFIG_SERIAL_8250_NR_UARTS=4
- +CONFIG_SERIAL_8250_RUNTIME_UARTS=2
- +# CONFIG_SERIAL_8250_EXTENDED is not set
- +
- +#
- +# Non-8250 serial port support
- +#
- +CONFIG_SERIAL_CORE=y
- +CONFIG_SERIAL_CORE_CONSOLE=y
- +# CONFIG_SERIAL_JSM is not set
- +CONFIG_UNIX98_PTYS=y
- +CONFIG_LEGACY_PTYS=y
- +CONFIG_LEGACY_PTY_COUNT=16
- +# CONFIG_IPMI_HANDLER is not set
- +# CONFIG_HW_RANDOM is not set
- +# CONFIG_NVRAM is not set
- +# CONFIG_R3964 is not set
- +# CONFIG_APPLICOM is not set
- +# CONFIG_RAW_DRIVER is not set
- +# CONFIG_TCG_TPM is not set
- +CONFIG_DEVPORT=y
- +CONFIG_I2C=y
- +CONFIG_I2C_BOARDINFO=y
- +CONFIG_I2C_CHARDEV=y
- +
- +#
- +# I2C Hardware Bus support
- +#
- +# CONFIG_I2C_ALI1535 is not set
- +# CONFIG_I2C_ALI1563 is not set
- +# CONFIG_I2C_ALI15X3 is not set
- +# CONFIG_I2C_AMD756 is not set
- +# CONFIG_I2C_AMD8111 is not set
- +# CONFIG_I2C_GPIO is not set
- +# CONFIG_I2C_I801 is not set
- +# CONFIG_I2C_I810 is not set
- +# CONFIG_I2C_PIIX4 is not set
- +# CONFIG_I2C_NFORCE2 is not set
- +# CONFIG_I2C_OCORES is not set
- +# CONFIG_I2C_PARPORT_LIGHT is not set
- +# CONFIG_I2C_PROSAVAGE is not set
- +# CONFIG_I2C_SAVAGE4 is not set
- +# CONFIG_I2C_SIMTEC is not set
- +# CONFIG_I2C_SIS5595 is not set
- +# CONFIG_I2C_SIS630 is not set
- +# CONFIG_I2C_SIS96X is not set
- +# CONFIG_I2C_TAOS_EVM is not set
- +# CONFIG_I2C_STUB is not set
- +# CONFIG_I2C_TINY_USB is not set
- +# CONFIG_I2C_VIA is not set
- +# CONFIG_I2C_VIAPRO is not set
- +# CONFIG_I2C_VOODOO3 is not set
- +# CONFIG_I2C_PCA_PLATFORM is not set
- +CONFIG_I2C_MV64XXX=y
- +
- +#
- +# Miscellaneous I2C Chip support
- +#
- +# CONFIG_DS1682 is not set
- +# CONFIG_SENSORS_EEPROM is not set
- +# CONFIG_SENSORS_PCF8574 is not set
- +# CONFIG_PCF8575 is not set
- +# CONFIG_SENSORS_PCF8591 is not set
- +# CONFIG_SENSORS_MAX6875 is not set
- +# CONFIG_SENSORS_TSL2550 is not set
- +# CONFIG_I2C_DEBUG_CORE is not set
- +# CONFIG_I2C_DEBUG_ALGO is not set
- +# CONFIG_I2C_DEBUG_BUS is not set
- +# CONFIG_I2C_DEBUG_CHIP is not set
- +CONFIG_SPI=y
- +# CONFIG_SPI_DEBUG is not set
- +CONFIG_SPI_MASTER=y
- +
- +#
- +# SPI Master Controller Drivers
- +#
- +# CONFIG_SPI_BITBANG is not set
- +CONFIG_SPI_ORION=y
- +
- +#
- +# SPI Protocol Masters
- +#
- +# CONFIG_SPI_AT25 is not set
- +# CONFIG_SPI_SPIDEV is not set
- +# CONFIG_SPI_TLE62X0 is not set
- +# CONFIG_W1 is not set
- +# CONFIG_POWER_SUPPLY is not set
- +# CONFIG_HWMON is not set
- +# CONFIG_WATCHDOG is not set
- +
- +#
- +# Sonics Silicon Backplane
- +#
- +CONFIG_SSB_POSSIBLE=y
- +# CONFIG_SSB is not set
- +
- +#
- +# Multifunction device drivers
- +#
- +# CONFIG_MFD_SM501 is not set
- +# CONFIG_MFD_ASIC3 is not set
- +# CONFIG_HTC_PASIC3 is not set
- +
- +#
- +# Multimedia devices
- +#
- +
- +#
- +# Multimedia core support
- +#
- +# CONFIG_VIDEO_DEV is not set
- +# CONFIG_DVB_CORE is not set
- +# CONFIG_VIDEO_MEDIA is not set
- +
- +#
- +# Multimedia drivers
- +#
- +# CONFIG_DAB is not set
- +
- +#
- +# Graphics support
- +#
- +# CONFIG_DRM is not set
- +# CONFIG_VGASTATE is not set
- +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
- +# CONFIG_FB is not set
- +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
- +
- +#
- +# Display device support
- +#
- +# CONFIG_DISPLAY_SUPPORT is not set
- +
- +#
- +# Sound
- +#
- +# CONFIG_SOUND is not set
- +CONFIG_HID_SUPPORT=y
- +CONFIG_HID=y
- +# CONFIG_HID_DEBUG is not set
- +# CONFIG_HIDRAW is not set
- +
- +#
- +# USB Input Devices
- +#
- +CONFIG_USB_HID=y
- +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
- +# CONFIG_HID_FF is not set
- +# CONFIG_USB_HIDDEV is not set
- +CONFIG_USB_SUPPORT=y
- +CONFIG_USB_ARCH_HAS_HCD=y
- +CONFIG_USB_ARCH_HAS_OHCI=y
- +CONFIG_USB_ARCH_HAS_EHCI=y
- +CONFIG_USB=y
- +# CONFIG_USB_DEBUG is not set
- +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
- +
- +#
- +# Miscellaneous USB options
- +#
- +CONFIG_USB_DEVICEFS=y
- +CONFIG_USB_DEVICE_CLASS=y
- +# CONFIG_USB_DYNAMIC_MINORS is not set
- +# CONFIG_USB_OTG is not set
- +# CONFIG_USB_OTG_WHITELIST is not set
- +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
- +
- +#
- +# USB Host Controller Drivers
- +#
- +# CONFIG_USB_C67X00_HCD is not set
- +CONFIG_USB_EHCI_HCD=y
- +CONFIG_USB_EHCI_ROOT_HUB_TT=y
- +CONFIG_USB_EHCI_TT_NEWSCHED=y
- +# CONFIG_USB_ISP116X_HCD is not set
- +# CONFIG_USB_ISP1760_HCD is not set
- +# CONFIG_USB_OHCI_HCD is not set
- +# CONFIG_USB_UHCI_HCD is not set
- +# CONFIG_USB_SL811_HCD is not set
- +# CONFIG_USB_R8A66597_HCD is not set
- +
- +#
- +# USB Device Class drivers
- +#
- +# CONFIG_USB_ACM is not set
- +CONFIG_USB_PRINTER=y
- +# CONFIG_USB_WDM is not set
- +
- +#
- +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
- +#
- +
- +#
- +# may also be needed; see USB_STORAGE Help for more information
- +#
- +CONFIG_USB_STORAGE=y
- +# CONFIG_USB_STORAGE_DEBUG is not set
- +CONFIG_USB_STORAGE_DATAFAB=y
- +CONFIG_USB_STORAGE_FREECOM=y
- +# CONFIG_USB_STORAGE_ISD200 is not set
- +CONFIG_USB_STORAGE_DPCM=y
- +# CONFIG_USB_STORAGE_USBAT is not set
- +CONFIG_USB_STORAGE_SDDR09=y
- +CONFIG_USB_STORAGE_SDDR55=y
- +CONFIG_USB_STORAGE_JUMPSHOT=y
- +# CONFIG_USB_STORAGE_ALAUDA is not set
- +# CONFIG_USB_STORAGE_ONETOUCH is not set
- +# CONFIG_USB_STORAGE_KARMA is not set
- +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
- +# CONFIG_USB_LIBUSUAL is not set
- +
- +#
- +# USB Imaging devices
- +#
- +# CONFIG_USB_MDC800 is not set
- +# CONFIG_USB_MICROTEK is not set
- +# CONFIG_USB_MON is not set
- +
- +#
- +# USB port drivers
- +#
- +# CONFIG_USB_SERIAL is not set
- +
- +#
- +# USB Miscellaneous drivers
- +#
- +# CONFIG_USB_EMI62 is not set
- +# CONFIG_USB_EMI26 is not set
- +# CONFIG_USB_ADUTUX is not set
- +# CONFIG_USB_AUERSWALD is not set
- +# CONFIG_USB_RIO500 is not set
- +# CONFIG_USB_LEGOTOWER is not set
- +# CONFIG_USB_LCD is not set
- +# CONFIG_USB_BERRY_CHARGE is not set
- +# CONFIG_USB_LED is not set
- +# CONFIG_USB_CYPRESS_CY7C63 is not set
- +# CONFIG_USB_CYTHERM is not set
- +# CONFIG_USB_PHIDGET is not set
- +# CONFIG_USB_IDMOUSE is not set
- +# CONFIG_USB_FTDI_ELAN is not set
- +# CONFIG_USB_APPLEDISPLAY is not set
- +# CONFIG_USB_SISUSBVGA is not set
- +# CONFIG_USB_LD is not set
- +# CONFIG_USB_TRANCEVIBRATOR is not set
- +# CONFIG_USB_IOWARRIOR is not set
- +# CONFIG_USB_TEST is not set
- +# CONFIG_USB_ISIGHTFW is not set
- +# CONFIG_USB_GADGET is not set
- +# CONFIG_MMC is not set
- +CONFIG_NEW_LEDS=y
- +# CONFIG_LEDS_CLASS is not set
- +
- +#
- +# LED drivers
- +#
- +
- +#
- +# LED Triggers
- +#
- +# CONFIG_LEDS_TRIGGERS is not set
- +CONFIG_RTC_LIB=y
- +CONFIG_RTC_CLASS=y
- +# CONFIG_RTC_DEBUG is not set
- +
- +#
- +# RTC interfaces
- +#
- +CONFIG_RTC_INTF_SYSFS=y
- +CONFIG_RTC_INTF_PROC=y
- +CONFIG_RTC_INTF_DEV=y
- +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
- +# CONFIG_RTC_DRV_TEST is not set
- +
- +#
- +# I2C RTC drivers
- +#
- +# CONFIG_RTC_DRV_DS1307 is not set
- +# CONFIG_RTC_DRV_DS1374 is not set
- +# CONFIG_RTC_DRV_DS1672 is not set
- +# CONFIG_RTC_DRV_MAX6900 is not set
- +CONFIG_RTC_DRV_MV=y
- +# CONFIG_RTC_DRV_RS5C372 is not set
- +# CONFIG_RTC_DRV_ISL1208 is not set
- +# CONFIG_RTC_DRV_X1205 is not set
- +# CONFIG_RTC_DRV_PCF8563 is not set
- +# CONFIG_RTC_DRV_PCF8583 is not set
- +# CONFIG_RTC_DRV_M41T80 is not set
- +# CONFIG_RTC_DRV_S35390A is not set
- +
- +#
- +# SPI RTC drivers
- +#
- +# CONFIG_RTC_DRV_MAX6902 is not set
- +# CONFIG_RTC_DRV_R9701 is not set
- +# CONFIG_RTC_DRV_RS5C348 is not set
- +
- +#
- +# Platform RTC drivers
- +#
- +# CONFIG_RTC_DRV_CMOS is not set
- +# CONFIG_RTC_DRV_DS1511 is not set
- +# CONFIG_RTC_DRV_DS1553 is not set
- +# CONFIG_RTC_DRV_DS1742 is not set
- +# CONFIG_RTC_DRV_STK17TA8 is not set
- +# CONFIG_RTC_DRV_M48T86 is not set
- +# CONFIG_RTC_DRV_M48T59 is not set
- +# CONFIG_RTC_DRV_V3020 is not set
- +
- +#
- +# on-CPU RTC drivers
- +#
- +CONFIG_DMADEVICES=y
- +
- +#
- +# DMA Devices
- +#
- +CONFIG_MV_XOR=y
- +CONFIG_DMA_ENGINE=y
- +
- +#
- +# DMA Clients
- +#
- +# CONFIG_NET_DMA is not set
- +# CONFIG_UIO is not set
- +
- +#
- +# File systems
- +#
- +CONFIG_EXT2_FS=y
- +# CONFIG_EXT2_FS_XATTR is not set
- +# CONFIG_EXT2_FS_XIP is not set
- +CONFIG_EXT3_FS=y
- +# CONFIG_EXT3_FS_XATTR is not set
- +# CONFIG_EXT4DEV_FS is not set
- +CONFIG_JBD=y
- +# CONFIG_REISERFS_FS is not set
- +# CONFIG_JFS_FS is not set
- +# CONFIG_FS_POSIX_ACL is not set
- +CONFIG_XFS_FS=y
- +# CONFIG_XFS_QUOTA is not set
- +# CONFIG_XFS_POSIX_ACL is not set
- +# CONFIG_XFS_RT is not set
- +# CONFIG_XFS_DEBUG is not set
- +# CONFIG_OCFS2_FS is not set
- +CONFIG_DNOTIFY=y
- +CONFIG_INOTIFY=y
- +CONFIG_INOTIFY_USER=y
- +# CONFIG_QUOTA is not set
- +# CONFIG_AUTOFS_FS is not set
- +# CONFIG_AUTOFS4_FS is not set
- +# CONFIG_FUSE_FS is not set
- +
- +#
- +# CD-ROM/DVD Filesystems
- +#
- +CONFIG_ISO9660_FS=y
- +CONFIG_JOLIET=y
- +# CONFIG_ZISOFS is not set
- +CONFIG_UDF_FS=m
- +CONFIG_UDF_NLS=y
- +
- +#
- +# DOS/FAT/NT Filesystems
- +#
- +CONFIG_FAT_FS=y
- +CONFIG_MSDOS_FS=y
- +CONFIG_VFAT_FS=y
- +CONFIG_FAT_DEFAULT_CODEPAGE=437
- +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
- +# CONFIG_NTFS_FS is not set
- +
- +#
- +# Pseudo filesystems
- +#
- +CONFIG_PROC_FS=y
- +CONFIG_PROC_SYSCTL=y
- +CONFIG_SYSFS=y
- +CONFIG_TMPFS=y
- +# CONFIG_TMPFS_POSIX_ACL is not set
- +# CONFIG_HUGETLB_PAGE is not set
- +# CONFIG_CONFIGFS_FS is not set
- +
- +#
- +# Miscellaneous filesystems
- +#
- +# CONFIG_ADFS_FS is not set
- +# CONFIG_AFFS_FS is not set
- +# CONFIG_HFS_FS is not set
- +# CONFIG_HFSPLUS_FS is not set
- +# CONFIG_BEFS_FS is not set
- +# CONFIG_BFS_FS is not set
- +# CONFIG_EFS_FS is not set
- +CONFIG_JFFS2_FS=y
- +CONFIG_JFFS2_FS_DEBUG=0
- +CONFIG_JFFS2_FS_WRITEBUFFER=y
- +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
- +# CONFIG_JFFS2_SUMMARY is not set
- +# CONFIG_JFFS2_FS_XATTR is not set
- +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
- +CONFIG_JFFS2_ZLIB=y
- +# CONFIG_JFFS2_LZO is not set
- +CONFIG_JFFS2_RTIME=y
- +# CONFIG_JFFS2_RUBIN is not set
- +CONFIG_CRAMFS=y
- +# CONFIG_VXFS_FS is not set
- +# CONFIG_MINIX_FS is not set
- +# CONFIG_HPFS_FS is not set
- +# CONFIG_QNX4FS_FS is not set
- +# CONFIG_ROMFS_FS is not set
- +# CONFIG_SYSV_FS is not set
- +# CONFIG_UFS_FS is not set
- +CONFIG_NETWORK_FILESYSTEMS=y
- +CONFIG_NFS_FS=y
- +CONFIG_NFS_V3=y
- +# CONFIG_NFS_V3_ACL is not set
- +# CONFIG_NFS_V4 is not set
- +# CONFIG_NFSD is not set
- +CONFIG_ROOT_NFS=y
- +CONFIG_LOCKD=y
- +CONFIG_LOCKD_V4=y
- +CONFIG_NFS_COMMON=y
- +CONFIG_SUNRPC=y
- +# CONFIG_SUNRPC_BIND34 is not set
- +# CONFIG_RPCSEC_GSS_KRB5 is not set
- +# CONFIG_RPCSEC_GSS_SPKM3 is not set
- +# CONFIG_SMB_FS is not set
- +# CONFIG_CIFS is not set
- +# CONFIG_NCP_FS is not set
- +# CONFIG_CODA_FS is not set
- +# CONFIG_AFS_FS is not set
- +
- +#
- +# Partition Types
- +#
- +CONFIG_PARTITION_ADVANCED=y
- +# CONFIG_ACORN_PARTITION is not set
- +# CONFIG_OSF_PARTITION is not set
- +# CONFIG_AMIGA_PARTITION is not set
- +# CONFIG_ATARI_PARTITION is not set
- +# CONFIG_MAC_PARTITION is not set
- +CONFIG_MSDOS_PARTITION=y
- +# CONFIG_BSD_DISKLABEL is not set
- +# CONFIG_MINIX_SUBPARTITION is not set
- +# CONFIG_SOLARIS_X86_PARTITION is not set
- +# CONFIG_UNIXWARE_DISKLABEL is not set
- +# CONFIG_LDM_PARTITION is not set
- +# CONFIG_SGI_PARTITION is not set
- +# CONFIG_ULTRIX_PARTITION is not set
- +# CONFIG_SUN_PARTITION is not set
- +# CONFIG_KARMA_PARTITION is not set
- +# CONFIG_EFI_PARTITION is not set
- +# CONFIG_SYSV68_PARTITION is not set
- +CONFIG_NLS=y
- +CONFIG_NLS_DEFAULT="iso8859-1"
- +CONFIG_NLS_CODEPAGE_437=y
- +# CONFIG_NLS_CODEPAGE_737 is not set
- +# CONFIG_NLS_CODEPAGE_775 is not set
- +CONFIG_NLS_CODEPAGE_850=y
- +# CONFIG_NLS_CODEPAGE_852 is not set
- +# CONFIG_NLS_CODEPAGE_855 is not set
- +# CONFIG_NLS_CODEPAGE_857 is not set
- +# CONFIG_NLS_CODEPAGE_860 is not set
- +# CONFIG_NLS_CODEPAGE_861 is not set
- +# CONFIG_NLS_CODEPAGE_862 is not set
- +# CONFIG_NLS_CODEPAGE_863 is not set
- +# CONFIG_NLS_CODEPAGE_864 is not set
- +# CONFIG_NLS_CODEPAGE_865 is not set
- +# CONFIG_NLS_CODEPAGE_866 is not set
- +# CONFIG_NLS_CODEPAGE_869 is not set
- +# CONFIG_NLS_CODEPAGE_936 is not set
- +# CONFIG_NLS_CODEPAGE_950 is not set
- +# CONFIG_NLS_CODEPAGE_932 is not set
- +# CONFIG_NLS_CODEPAGE_949 is not set
- +# CONFIG_NLS_CODEPAGE_874 is not set
- +# CONFIG_NLS_ISO8859_8 is not set
- +# CONFIG_NLS_CODEPAGE_1250 is not set
- +# CONFIG_NLS_CODEPAGE_1251 is not set
- +# CONFIG_NLS_ASCII is not set
- +CONFIG_NLS_ISO8859_1=y
- +CONFIG_NLS_ISO8859_2=y
- +# CONFIG_NLS_ISO8859_3 is not set
- +# CONFIG_NLS_ISO8859_4 is not set
- +# CONFIG_NLS_ISO8859_5 is not set
- +# CONFIG_NLS_ISO8859_6 is not set
- +# CONFIG_NLS_ISO8859_7 is not set
- +# CONFIG_NLS_ISO8859_9 is not set
- +# CONFIG_NLS_ISO8859_13 is not set
- +# CONFIG_NLS_ISO8859_14 is not set
- +# CONFIG_NLS_ISO8859_15 is not set
- +# CONFIG_NLS_KOI8_R is not set
- +# CONFIG_NLS_KOI8_U is not set
- +CONFIG_NLS_UTF8=y
- +# CONFIG_DLM is not set
- +
- +#
- +# Kernel hacking
- +#
- +# CONFIG_PRINTK_TIME is not set
- +CONFIG_ENABLE_WARN_DEPRECATED=y
- +CONFIG_ENABLE_MUST_CHECK=y
- +CONFIG_FRAME_WARN=1024
- +CONFIG_MAGIC_SYSRQ=y
- +# CONFIG_UNUSED_SYMBOLS is not set
- +# CONFIG_DEBUG_FS is not set
- +# CONFIG_HEADERS_CHECK is not set
- +CONFIG_DEBUG_KERNEL=y
- +# CONFIG_DEBUG_SHIRQ is not set
- +CONFIG_DETECT_SOFTLOCKUP=y
- +# CONFIG_SCHED_DEBUG is not set
- +# CONFIG_SCHEDSTATS is not set
- +# CONFIG_TIMER_STATS is not set
- +# CONFIG_DEBUG_OBJECTS is not set
- +# CONFIG_DEBUG_SLAB is not set
- +# CONFIG_DEBUG_PREEMPT is not set
- +# CONFIG_DEBUG_RT_MUTEXES is not set
- +# CONFIG_RT_MUTEX_TESTER is not set
- +# CONFIG_DEBUG_SPINLOCK is not set
- +# CONFIG_DEBUG_MUTEXES is not set
- +# CONFIG_DEBUG_LOCK_ALLOC is not set
- +# CONFIG_PROVE_LOCKING is not set
- +# CONFIG_LOCK_STAT is not set
- +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
- +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
- +# CONFIG_DEBUG_KOBJECT is not set
- +# CONFIG_DEBUG_BUGVERBOSE is not set
- +CONFIG_DEBUG_INFO=y
- +# CONFIG_DEBUG_VM is not set
- +# CONFIG_DEBUG_WRITECOUNT is not set
- +# CONFIG_DEBUG_LIST is not set
- +# CONFIG_DEBUG_SG is not set
- +CONFIG_FRAME_POINTER=y
- +# CONFIG_BOOT_PRINTK_DELAY is not set
- +# CONFIG_RCU_TORTURE_TEST is not set
- +# CONFIG_KPROBES_SANITY_TEST is not set
- +# CONFIG_BACKTRACE_SELF_TEST is not set
- +# CONFIG_LKDTM is not set
- +# CONFIG_FAULT_INJECTION is not set
- +# CONFIG_LATENCYTOP is not set
- +# CONFIG_SAMPLES is not set
- +CONFIG_DEBUG_USER=y
- +CONFIG_DEBUG_ERRORS=y
- +# CONFIG_DEBUG_STACK_USAGE is not set
- +CONFIG_DEBUG_LL=y
- +# CONFIG_DEBUG_ICEDCC is not set
- +
- +#
- +# Security options
- +#
- +# CONFIG_KEYS is not set
- +# CONFIG_SECURITY is not set
- +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
- +CONFIG_ASYNC_CORE=y
- +CONFIG_CRYPTO=y
- +
- +#
- +# Crypto core or helper
- +#
- +CONFIG_CRYPTO_ALGAPI=m
- +CONFIG_CRYPTO_BLKCIPHER=m
- +CONFIG_CRYPTO_MANAGER=m
- +# CONFIG_CRYPTO_GF128MUL is not set
- +# CONFIG_CRYPTO_NULL is not set
- +# CONFIG_CRYPTO_CRYPTD is not set
- +# CONFIG_CRYPTO_AUTHENC is not set
- +# CONFIG_CRYPTO_TEST is not set
- +
- +#
- +# Authenticated Encryption with Associated Data
- +#
- +# CONFIG_CRYPTO_CCM is not set
- +# CONFIG_CRYPTO_GCM is not set
- +# CONFIG_CRYPTO_SEQIV is not set
- +
- +#
- +# Block modes
- +#
- +CONFIG_CRYPTO_CBC=m
- +# CONFIG_CRYPTO_CTR is not set
- +# CONFIG_CRYPTO_CTS is not set
- +CONFIG_CRYPTO_ECB=m
- +# CONFIG_CRYPTO_LRW is not set
- +CONFIG_CRYPTO_PCBC=m
- +# CONFIG_CRYPTO_XTS is not set
- +
- +#
- +# Hash modes
- +#
- +# CONFIG_CRYPTO_HMAC is not set
- +# CONFIG_CRYPTO_XCBC is not set
- +
- +#
- +# Digest
- +#
- +# CONFIG_CRYPTO_CRC32C is not set
- +# CONFIG_CRYPTO_MD4 is not set
- +# CONFIG_CRYPTO_MD5 is not set
- +# CONFIG_CRYPTO_MICHAEL_MIC is not set
- +# CONFIG_CRYPTO_SHA1 is not set
- +# CONFIG_CRYPTO_SHA256 is not set
- +# CONFIG_CRYPTO_SHA512 is not set
- +# CONFIG_CRYPTO_TGR192 is not set
- +# CONFIG_CRYPTO_WP512 is not set
- +
- +#
- +# Ciphers
- +#
- +# CONFIG_CRYPTO_AES is not set
- +# CONFIG_CRYPTO_ANUBIS is not set
- +# CONFIG_CRYPTO_ARC4 is not set
- +# CONFIG_CRYPTO_BLOWFISH is not set
- +# CONFIG_CRYPTO_CAMELLIA is not set
- +# CONFIG_CRYPTO_CAST5 is not set
- +# CONFIG_CRYPTO_CAST6 is not set
- +# CONFIG_CRYPTO_DES is not set
- +# CONFIG_CRYPTO_FCRYPT is not set
- +# CONFIG_CRYPTO_KHAZAD is not set
- +# CONFIG_CRYPTO_SALSA20 is not set
- +# CONFIG_CRYPTO_SEED is not set
- +# CONFIG_CRYPTO_SERPENT is not set
- +# CONFIG_CRYPTO_TEA is not set
- +# CONFIG_CRYPTO_TWOFISH is not set
- +
- +#
- +# Compression
- +#
- +# CONFIG_CRYPTO_DEFLATE is not set
- +# CONFIG_CRYPTO_LZO is not set
- +CONFIG_CRYPTO_HW=y
- +# CONFIG_CRYPTO_DEV_HIFN_795X is not set
- +
- +#
- +# Library routines
- +#
- +CONFIG_BITREVERSE=y
- +# CONFIG_GENERIC_FIND_FIRST_BIT is not set
- +# CONFIG_GENERIC_FIND_NEXT_BIT is not set
- +CONFIG_CRC_CCITT=y
- +CONFIG_CRC16=y
- +CONFIG_CRC_ITU_T=m
- +CONFIG_CRC32=y
- +# CONFIG_CRC7 is not set
- +CONFIG_LIBCRC32C=y
- +CONFIG_ZLIB_INFLATE=y
- +CONFIG_ZLIB_DEFLATE=y
- +CONFIG_PLIST=y
- +CONFIG_HAS_IOMEM=y
- +CONFIG_HAS_IOPORT=y
- +CONFIG_HAS_DMA=y
- --- /dev/null
- +++ b/arch/arm/configs/loki_defconfig
- @@ -0,0 +1,1147 @@
- +#
- +# Automatically generated make config: don't edit
- +# Linux kernel version: 2.6.26-rc5
- +# Fri Jun 13 03:07:49 2008
- +#
- +CONFIG_ARM=y
- +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
- +# CONFIG_GENERIC_GPIO is not set
- +CONFIG_GENERIC_TIME=y
- +CONFIG_GENERIC_CLOCKEVENTS=y
- +CONFIG_MMU=y
- +# CONFIG_NO_IOPORT is not set
- +CONFIG_GENERIC_HARDIRQS=y
- +CONFIG_STACKTRACE_SUPPORT=y
- +CONFIG_HAVE_LATENCYTOP_SUPPORT=y
- +CONFIG_LOCKDEP_SUPPORT=y
- +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
- +CONFIG_HARDIRQS_SW_RESEND=y
- +CONFIG_GENERIC_IRQ_PROBE=y
- +CONFIG_RWSEM_GENERIC_SPINLOCK=y
- +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
- +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
- +CONFIG_GENERIC_HWEIGHT=y
- +CONFIG_GENERIC_CALIBRATE_DELAY=y
- +CONFIG_ARCH_SUPPORTS_AOUT=y
- +CONFIG_ZONE_DMA=y
- +CONFIG_VECTORS_BASE=0xffff0000
- +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
- +
- +#
- +# General setup
- +#
- +CONFIG_EXPERIMENTAL=y
- +CONFIG_BROKEN_ON_SMP=y
- +CONFIG_LOCK_KERNEL=y
- +CONFIG_INIT_ENV_ARG_LIMIT=32
- +CONFIG_LOCALVERSION=""
- +CONFIG_LOCALVERSION_AUTO=y
- +CONFIG_SWAP=y
- +CONFIG_SYSVIPC=y
- +CONFIG_SYSVIPC_SYSCTL=y
- +# CONFIG_POSIX_MQUEUE is not set
- +# CONFIG_BSD_PROCESS_ACCT is not set
- +# CONFIG_TASKSTATS is not set
- +# CONFIG_AUDIT is not set
- +# CONFIG_IKCONFIG is not set
- +CONFIG_LOG_BUF_SHIFT=14
- +# CONFIG_CGROUPS is not set
- +# CONFIG_GROUP_SCHED is not set
- +# CONFIG_SYSFS_DEPRECATED_V2 is not set
- +# CONFIG_RELAY is not set
- +# CONFIG_NAMESPACES is not set
- +# CONFIG_BLK_DEV_INITRD is not set
- +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
- +CONFIG_SYSCTL=y
- +CONFIG_EMBEDDED=y
- +CONFIG_UID16=y
- +CONFIG_SYSCTL_SYSCALL=y
- +CONFIG_SYSCTL_SYSCALL_CHECK=y
- +CONFIG_KALLSYMS=y
- +# CONFIG_KALLSYMS_EXTRA_PASS is not set
- +CONFIG_HOTPLUG=y
- +CONFIG_PRINTK=y
- +CONFIG_BUG=y
- +CONFIG_ELF_CORE=y
- +CONFIG_COMPAT_BRK=y
- +CONFIG_BASE_FULL=y
- +CONFIG_FUTEX=y
- +CONFIG_ANON_INODES=y
- +CONFIG_EPOLL=y
- +CONFIG_SIGNALFD=y
- +CONFIG_TIMERFD=y
- +CONFIG_EVENTFD=y
- +CONFIG_SHMEM=y
- +CONFIG_VM_EVENT_COUNTERS=y
- +CONFIG_SLAB=y
- +# CONFIG_SLUB is not set
- +# CONFIG_SLOB is not set
- +# CONFIG_PROFILING is not set
- +# CONFIG_MARKERS is not set
- +CONFIG_HAVE_OPROFILE=y
- +# CONFIG_KPROBES is not set
- +CONFIG_HAVE_KPROBES=y
- +CONFIG_HAVE_KRETPROBES=y
- +# CONFIG_HAVE_DMA_ATTRS is not set
- +CONFIG_PROC_PAGE_MONITOR=y
- +CONFIG_SLABINFO=y
- +CONFIG_RT_MUTEXES=y
- +# CONFIG_TINY_SHMEM is not set
- +CONFIG_BASE_SMALL=0
- +CONFIG_MODULES=y
- +# CONFIG_MODULE_FORCE_LOAD is not set
- +CONFIG_MODULE_UNLOAD=y
- +# CONFIG_MODULE_FORCE_UNLOAD is not set
- +# CONFIG_MODVERSIONS is not set
- +# CONFIG_MODULE_SRCVERSION_ALL is not set
- +# CONFIG_KMOD is not set
- +CONFIG_BLOCK=y
- +# CONFIG_LBD is not set
- +# CONFIG_BLK_DEV_IO_TRACE is not set
- +# CONFIG_LSF is not set
- +# CONFIG_BLK_DEV_BSG is not set
- +
- +#
- +# IO Schedulers
- +#
- +CONFIG_IOSCHED_NOOP=y
- +CONFIG_IOSCHED_AS=y
- +CONFIG_IOSCHED_DEADLINE=y
- +CONFIG_IOSCHED_CFQ=y
- +# CONFIG_DEFAULT_AS is not set
- +# CONFIG_DEFAULT_DEADLINE is not set
- +CONFIG_DEFAULT_CFQ=y
- +# CONFIG_DEFAULT_NOOP is not set
- +CONFIG_DEFAULT_IOSCHED="cfq"
- +CONFIG_CLASSIC_RCU=y
- +
- +#
- +# System Type
- +#
- +# CONFIG_ARCH_AAEC2000 is not set
- +# CONFIG_ARCH_INTEGRATOR is not set
- +# CONFIG_ARCH_REALVIEW is not set
- +# CONFIG_ARCH_VERSATILE is not set
- +# CONFIG_ARCH_AT91 is not set
- +# CONFIG_ARCH_CLPS7500 is not set
- +# CONFIG_ARCH_CLPS711X is not set
- +# CONFIG_ARCH_CO285 is not set
- +# CONFIG_ARCH_EBSA110 is not set
- +# CONFIG_ARCH_EP93XX is not set
- +# CONFIG_ARCH_FOOTBRIDGE is not set
- +# CONFIG_ARCH_NETX is not set
- +# CONFIG_ARCH_H720X is not set
- +# CONFIG_ARCH_IMX is not set
- +# CONFIG_ARCH_IOP13XX is not set
- +# CONFIG_ARCH_IOP32X is not set
- +# CONFIG_ARCH_IOP33X is not set
- +# CONFIG_ARCH_IXP23XX is not set
- +# CONFIG_ARCH_IXP2000 is not set
- +# CONFIG_ARCH_IXP4XX is not set
- +# CONFIG_ARCH_L7200 is not set
- +# CONFIG_ARCH_KIRKWOOD is not set
- +# CONFIG_ARCH_KS8695 is not set
- +# CONFIG_ARCH_NS9XXX is not set
- +CONFIG_ARCH_LOKI=y
- +# CONFIG_ARCH_MV78XX0 is not set
- +# CONFIG_ARCH_MXC is not set
- +# CONFIG_ARCH_ORION5X is not set
- +# CONFIG_ARCH_PNX4008 is not set
- +# CONFIG_ARCH_PXA is not set
- +# CONFIG_ARCH_RPC is not set
- +# CONFIG_ARCH_SA1100 is not set
- +# CONFIG_ARCH_S3C2410 is not set
- +# CONFIG_ARCH_SHARK is not set
- +# CONFIG_ARCH_LH7A40X is not set
- +# CONFIG_ARCH_DAVINCI is not set
- +# CONFIG_ARCH_OMAP is not set
- +# CONFIG_ARCH_MSM7X00A is not set
- +
- +#
- +# Marvell Loki (88RC8480) Implementations
- +#
- +CONFIG_MACH_LB88RC8480=y
- +
- +#
- +# Boot options
- +#
- +
- +#
- +# Power management
- +#
- +CONFIG_PLAT_ORION=y
- +
- +#
- +# Processor Type
- +#
- +CONFIG_CPU_32=y
- +CONFIG_CPU_FEROCEON=y
- +# CONFIG_CPU_FEROCEON_OLD_ID is not set
- +CONFIG_CPU_32v5=y
- +CONFIG_CPU_ABRT_EV5T=y
- +CONFIG_CPU_PABRT_NOIFAR=y
- +CONFIG_CPU_CACHE_VIVT=y
- +CONFIG_CPU_COPY_FEROCEON=y
- +CONFIG_CPU_TLB_FEROCEON=y
- +CONFIG_CPU_CP15=y
- +CONFIG_CPU_CP15_MMU=y
- +
- +#
- +# Processor Features
- +#
- +CONFIG_ARM_THUMB=y
- +# CONFIG_CPU_ICACHE_DISABLE is not set
- +# CONFIG_CPU_DCACHE_DISABLE is not set
- +# CONFIG_OUTER_CACHE is not set
- +
- +#
- +# Bus support
- +#
- +# CONFIG_PCI_SYSCALL is not set
- +# CONFIG_ARCH_SUPPORTS_MSI is not set
- +# CONFIG_PCCARD is not set
- +
- +#
- +# Kernel Features
- +#
- +CONFIG_TICK_ONESHOT=y
- +CONFIG_NO_HZ=y
- +CONFIG_HIGH_RES_TIMERS=y
- +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
- +CONFIG_PREEMPT=y
- +CONFIG_HZ=100
- +CONFIG_AEABI=y
- +CONFIG_OABI_COMPAT=y
- +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
- +CONFIG_SELECT_MEMORY_MODEL=y
- +CONFIG_FLATMEM_MANUAL=y
- +# CONFIG_DISCONTIGMEM_MANUAL is not set
- +# CONFIG_SPARSEMEM_MANUAL is not set
- +CONFIG_FLATMEM=y
- +CONFIG_FLAT_NODE_MEM_MAP=y
- +# CONFIG_SPARSEMEM_STATIC is not set
- +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
- +CONFIG_PAGEFLAGS_EXTENDED=y
- +CONFIG_SPLIT_PTLOCK_CPUS=4096
- +# CONFIG_RESOURCES_64BIT is not set
- +CONFIG_ZONE_DMA_FLAG=1
- +CONFIG_BOUNCE=y
- +CONFIG_VIRT_TO_BUS=y
- +CONFIG_ALIGNMENT_TRAP=y
- +
- +#
- +# Boot options
- +#
- +CONFIG_ZBOOT_ROM_TEXT=0x0
- +CONFIG_ZBOOT_ROM_BSS=0x0
- +CONFIG_CMDLINE=""
- +# CONFIG_XIP_KERNEL is not set
- +# CONFIG_KEXEC is not set
- +
- +#
- +# Floating point emulation
- +#
- +
- +#
- +# At least one emulation must be selected
- +#
- +# CONFIG_FPE_NWFPE is not set
- +# CONFIG_FPE_FASTFPE is not set
- +# CONFIG_VFP is not set
- +
- +#
- +# Userspace binary formats
- +#
- +CONFIG_BINFMT_ELF=y
- +# CONFIG_BINFMT_AOUT is not set
- +# CONFIG_BINFMT_MISC is not set
- +
- +#
- +# Power management options
- +#
- +# CONFIG_PM is not set
- +CONFIG_ARCH_SUSPEND_POSSIBLE=y
- +
- +#
- +# Networking
- +#
- +CONFIG_NET=y
- +
- +#
- +# Networking options
- +#
- +CONFIG_PACKET=y
- +CONFIG_PACKET_MMAP=y
- +CONFIG_UNIX=y
- +CONFIG_XFRM=y
- +# CONFIG_XFRM_USER is not set
- +# CONFIG_XFRM_SUB_POLICY is not set
- +# CONFIG_XFRM_MIGRATE is not set
- +# CONFIG_XFRM_STATISTICS is not set
- +# CONFIG_NET_KEY is not set
- +CONFIG_INET=y
- +CONFIG_IP_MULTICAST=y
- +# CONFIG_IP_ADVANCED_ROUTER is not set
- +CONFIG_IP_FIB_HASH=y
- +CONFIG_IP_PNP=y
- +CONFIG_IP_PNP_DHCP=y
- +CONFIG_IP_PNP_BOOTP=y
- +# CONFIG_IP_PNP_RARP is not set
- +# CONFIG_NET_IPIP is not set
- +# CONFIG_NET_IPGRE is not set
- +# CONFIG_IP_MROUTE is not set
- +# CONFIG_ARPD is not set
- +# CONFIG_SYN_COOKIES is not set
- +# CONFIG_INET_AH is not set
- +# CONFIG_INET_ESP is not set
- +# CONFIG_INET_IPCOMP is not set
- +# CONFIG_INET_XFRM_TUNNEL is not set
- +# CONFIG_INET_TUNNEL is not set
- +CONFIG_INET_XFRM_MODE_TRANSPORT=y
- +CONFIG_INET_XFRM_MODE_TUNNEL=y
- +CONFIG_INET_XFRM_MODE_BEET=y
- +# CONFIG_INET_LRO is not set
- +CONFIG_INET_DIAG=y
- +CONFIG_INET_TCP_DIAG=y
- +# CONFIG_TCP_CONG_ADVANCED is not set
- +CONFIG_TCP_CONG_CUBIC=y
- +CONFIG_DEFAULT_TCP_CONG="cubic"
- +# CONFIG_TCP_MD5SIG is not set
- +# CONFIG_IPV6 is not set
- +# CONFIG_NETWORK_SECMARK is not set
- +# CONFIG_NETFILTER is not set
- +# CONFIG_IP_DCCP is not set
- +# CONFIG_IP_SCTP is not set
- +# CONFIG_TIPC is not set
- +# CONFIG_ATM is not set
- +# CONFIG_BRIDGE is not set
- +# CONFIG_VLAN_8021Q is not set
- +# CONFIG_DECNET is not set
- +# CONFIG_LLC2 is not set
- +# CONFIG_IPX is not set
- +# CONFIG_ATALK is not set
- +# CONFIG_X25 is not set
- +# CONFIG_LAPB is not set
- +# CONFIG_ECONET is not set
- +# CONFIG_WAN_ROUTER is not set
- +# CONFIG_NET_SCHED is not set
- +
- +#
- +# Network testing
- +#
- +CONFIG_NET_PKTGEN=m
- +# CONFIG_HAMRADIO is not set
- +# CONFIG_CAN is not set
- +# CONFIG_IRDA is not set
- +# CONFIG_BT is not set
- +# CONFIG_AF_RXRPC is not set
- +
- +#
- +# Wireless
- +#
- +# CONFIG_CFG80211 is not set
- +CONFIG_WIRELESS_EXT=y
- +# CONFIG_MAC80211 is not set
- +# CONFIG_IEEE80211 is not set
- +# CONFIG_RFKILL is not set
- +# CONFIG_NET_9P is not set
- +
- +#
- +# Device Drivers
- +#
- +
- +#
- +# Generic Driver Options
- +#
- +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
- +CONFIG_STANDALONE=y
- +CONFIG_PREVENT_FIRMWARE_BUILD=y
- +CONFIG_FW_LOADER=y
- +# CONFIG_SYS_HYPERVISOR is not set
- +# CONFIG_CONNECTOR is not set
- +CONFIG_MTD=y
- +# CONFIG_MTD_DEBUG is not set
- +# CONFIG_MTD_CONCAT is not set
- +CONFIG_MTD_PARTITIONS=y
- +# CONFIG_MTD_REDBOOT_PARTS is not set
- +CONFIG_MTD_CMDLINE_PARTS=y
- +# CONFIG_MTD_AFS_PARTS is not set
- +# CONFIG_MTD_AR7_PARTS is not set
- +
- +#
- +# User Modules And Translation Layers
- +#
- +CONFIG_MTD_CHAR=y
- +CONFIG_MTD_BLKDEVS=y
- +CONFIG_MTD_BLOCK=y
- +CONFIG_FTL=y
- +CONFIG_NFTL=y
- +# CONFIG_NFTL_RW is not set
- +# CONFIG_INFTL is not set
- +# CONFIG_RFD_FTL is not set
- +# CONFIG_SSFDC is not set
- +# CONFIG_MTD_OOPS is not set
- +
- +#
- +# RAM/ROM/Flash chip drivers
- +#
- +CONFIG_MTD_CFI=y
- +CONFIG_MTD_JEDECPROBE=y
- +CONFIG_MTD_GEN_PROBE=y
- +CONFIG_MTD_CFI_ADV_OPTIONS=y
- +CONFIG_MTD_CFI_NOSWAP=y
- +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
- +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
- +CONFIG_MTD_CFI_GEOMETRY=y
- +CONFIG_MTD_MAP_BANK_WIDTH_1=y
- +CONFIG_MTD_MAP_BANK_WIDTH_2=y
- +CONFIG_MTD_MAP_BANK_WIDTH_4=y
- +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
- +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
- +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
- +CONFIG_MTD_CFI_I1=y
- +CONFIG_MTD_CFI_I2=y
- +CONFIG_MTD_CFI_I4=y
- +# CONFIG_MTD_CFI_I8 is not set
- +# CONFIG_MTD_OTP is not set
- +CONFIG_MTD_CFI_INTELEXT=y
- +CONFIG_MTD_CFI_AMDSTD=y
- +CONFIG_MTD_CFI_STAA=y
- +CONFIG_MTD_CFI_UTIL=y
- +# CONFIG_MTD_RAM is not set
- +# CONFIG_MTD_ROM is not set
- +# CONFIG_MTD_ABSENT is not set
- +
- +#
- +# Mapping drivers for chip access
- +#
- +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
- +CONFIG_MTD_PHYSMAP=y
- +CONFIG_MTD_PHYSMAP_START=0x0
- +CONFIG_MTD_PHYSMAP_LEN=0x0
- +CONFIG_MTD_PHYSMAP_BANKWIDTH=0
- +# CONFIG_MTD_ARM_INTEGRATOR is not set
- +# CONFIG_MTD_IMPA7 is not set
- +# CONFIG_MTD_PLATRAM is not set
- +
- +#
- +# Self-contained MTD device drivers
- +#
- +# CONFIG_MTD_DATAFLASH is not set
- +CONFIG_MTD_M25P80=y
- +CONFIG_M25PXX_USE_FAST_READ=y
- +# CONFIG_MTD_SLRAM is not set
- +# CONFIG_MTD_PHRAM is not set
- +# CONFIG_MTD_MTDRAM is not set
- +# CONFIG_MTD_BLOCK2MTD is not set
- +
- +#
- +# Disk-On-Chip Device Drivers
- +#
- +# CONFIG_MTD_DOC2000 is not set
- +# CONFIG_MTD_DOC2001 is not set
- +# CONFIG_MTD_DOC2001PLUS is not set
- +CONFIG_MTD_NAND=y
- +CONFIG_MTD_NAND_VERIFY_WRITE=y
- +# CONFIG_MTD_NAND_ECC_SMC is not set
- +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
- +CONFIG_MTD_NAND_IDS=y
- +# CONFIG_MTD_NAND_DISKONCHIP is not set
- +# CONFIG_MTD_NAND_NANDSIM is not set
- +# CONFIG_MTD_NAND_PLATFORM is not set
- +# CONFIG_MTD_ALAUDA is not set
- +CONFIG_MTD_NAND_ORION=y
- +# CONFIG_MTD_ONENAND is not set
- +
- +#
- +# UBI - Unsorted block images
- +#
- +# CONFIG_MTD_UBI is not set
- +# CONFIG_PARPORT is not set
- +CONFIG_BLK_DEV=y
- +# CONFIG_BLK_DEV_COW_COMMON is not set
- +CONFIG_BLK_DEV_LOOP=y
- +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
- +# CONFIG_BLK_DEV_NBD is not set
- +# CONFIG_BLK_DEV_UB is not set
- +# CONFIG_BLK_DEV_RAM is not set
- +# CONFIG_CDROM_PKTCDVD is not set
- +# CONFIG_ATA_OVER_ETH is not set
- +# CONFIG_MISC_DEVICES is not set
- +CONFIG_HAVE_IDE=y
- +# CONFIG_IDE is not set
- +
- +#
- +# SCSI device support
- +#
- +# CONFIG_RAID_ATTRS is not set
- +CONFIG_SCSI=y
- +CONFIG_SCSI_DMA=y
- +# CONFIG_SCSI_TGT is not set
- +# CONFIG_SCSI_NETLINK is not set
- +# CONFIG_SCSI_PROC_FS is not set
- +
- +#
- +# SCSI support type (disk, tape, CD-ROM)
- +#
- +CONFIG_BLK_DEV_SD=y
- +# CONFIG_CHR_DEV_ST is not set
- +# CONFIG_CHR_DEV_OSST is not set
- +CONFIG_BLK_DEV_SR=m
- +# CONFIG_BLK_DEV_SR_VENDOR is not set
- +CONFIG_CHR_DEV_SG=m
- +# CONFIG_CHR_DEV_SCH is not set
- +
- +#
- +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
- +#
- +# CONFIG_SCSI_MULTI_LUN is not set
- +# CONFIG_SCSI_CONSTANTS is not set
- +# CONFIG_SCSI_LOGGING is not set
- +# CONFIG_SCSI_SCAN_ASYNC is not set
- +CONFIG_SCSI_WAIT_SCAN=m
- +
- +#
- +# SCSI Transports
- +#
- +# CONFIG_SCSI_SPI_ATTRS is not set
- +# CONFIG_SCSI_FC_ATTRS is not set
- +# CONFIG_SCSI_ISCSI_ATTRS is not set
- +# CONFIG_SCSI_SAS_LIBSAS is not set
- +# CONFIG_SCSI_SRP_ATTRS is not set
- +CONFIG_SCSI_LOWLEVEL=y
- +# CONFIG_ISCSI_TCP is not set
- +# CONFIG_SCSI_DEBUG is not set
- +CONFIG_ATA=y
- +# CONFIG_ATA_NONSTANDARD is not set
- +CONFIG_SATA_PMP=y
- +CONFIG_ATA_SFF=y
- +CONFIG_SATA_MV=y
- +# CONFIG_PATA_PLATFORM is not set
- +# CONFIG_MD is not set
- +CONFIG_NETDEVICES=y
- +# CONFIG_NETDEVICES_MULTIQUEUE is not set
- +# CONFIG_DUMMY is not set
- +# CONFIG_BONDING is not set
- +# CONFIG_MACVLAN is not set
- +# CONFIG_EQUALIZER is not set
- +# CONFIG_TUN is not set
- +# CONFIG_VETH is not set
- +# CONFIG_PHYLIB is not set
- +CONFIG_NET_ETHERNET=y
- +CONFIG_MII=y
- +# CONFIG_AX88796 is not set
- +# CONFIG_SMC91X is not set
- +# CONFIG_DM9000 is not set
- +# CONFIG_ENC28J60 is not set
- +# CONFIG_IBM_NEW_EMAC_ZMII is not set
- +# CONFIG_IBM_NEW_EMAC_RGMII is not set
- +# CONFIG_IBM_NEW_EMAC_TAH is not set
- +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
- +# CONFIG_B44 is not set
- +CONFIG_NETDEV_1000=y
- +# CONFIG_E1000E_ENABLED is not set
- +CONFIG_MV643XX_ETH=y
- +# CONFIG_NETDEV_10000 is not set
- +
- +#
- +# Wireless LAN
- +#
- +# CONFIG_WLAN_PRE80211 is not set
- +# CONFIG_WLAN_80211 is not set
- +# CONFIG_IWLWIFI_LEDS is not set
- +
- +#
- +# USB Network Adapters
- +#
- +# CONFIG_USB_CATC is not set
- +# CONFIG_USB_KAWETH is not set
- +# CONFIG_USB_PEGASUS is not set
- +# CONFIG_USB_RTL8150 is not set
- +# CONFIG_USB_USBNET is not set
- +# CONFIG_WAN is not set
- +# CONFIG_PPP is not set
- +# CONFIG_SLIP is not set
- +# CONFIG_NETCONSOLE is not set
- +# CONFIG_NETPOLL is not set
- +# CONFIG_NET_POLL_CONTROLLER is not set
- +# CONFIG_ISDN is not set
- +
- +#
- +# Input device support
- +#
- +CONFIG_INPUT=y
- +# CONFIG_INPUT_FF_MEMLESS is not set
- +# CONFIG_INPUT_POLLDEV is not set
- +
- +#
- +# Userland interfaces
- +#
- +CONFIG_INPUT_MOUSEDEV=y
- +CONFIG_INPUT_MOUSEDEV_PSAUX=y
- +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
- +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
- +# CONFIG_INPUT_JOYDEV is not set
- +# CONFIG_INPUT_EVDEV is not set
- +# CONFIG_INPUT_EVBUG is not set
- +
- +#
- +# Input Device Drivers
- +#
- +# CONFIG_INPUT_KEYBOARD is not set
- +# CONFIG_INPUT_MOUSE is not set
- +# CONFIG_INPUT_JOYSTICK is not set
- +# CONFIG_INPUT_TABLET is not set
- +# CONFIG_INPUT_TOUCHSCREEN is not set
- +# CONFIG_INPUT_MISC is not set
- +
- +#
- +# Hardware I/O ports
- +#
- +# CONFIG_SERIO is not set
- +# CONFIG_GAMEPORT is not set
- +
- +#
- +# Character devices
- +#
- +CONFIG_VT=y
- +CONFIG_VT_CONSOLE=y
- +CONFIG_HW_CONSOLE=y
- +# CONFIG_VT_HW_CONSOLE_BINDING is not set
- +CONFIG_DEVKMEM=y
- +# CONFIG_SERIAL_NONSTANDARD is not set
- +
- +#
- +# Serial drivers
- +#
- +CONFIG_SERIAL_8250=y
- +CONFIG_SERIAL_8250_CONSOLE=y
- +CONFIG_SERIAL_8250_NR_UARTS=4
- +CONFIG_SERIAL_8250_RUNTIME_UARTS=2
- +# CONFIG_SERIAL_8250_EXTENDED is not set
- +
- +#
- +# Non-8250 serial port support
- +#
- +CONFIG_SERIAL_CORE=y
- +CONFIG_SERIAL_CORE_CONSOLE=y
- +CONFIG_UNIX98_PTYS=y
- +CONFIG_LEGACY_PTYS=y
- +CONFIG_LEGACY_PTY_COUNT=16
- +# CONFIG_IPMI_HANDLER is not set
- +CONFIG_HW_RANDOM=m
- +# CONFIG_NVRAM is not set
- +# CONFIG_R3964 is not set
- +# CONFIG_RAW_DRIVER is not set
- +# CONFIG_TCG_TPM is not set
- +CONFIG_I2C=y
- +CONFIG_I2C_BOARDINFO=y
- +CONFIG_I2C_CHARDEV=y
- +
- +#
- +# I2C Hardware Bus support
- +#
- +# CONFIG_I2C_OCORES is not set
- +# CONFIG_I2C_PARPORT_LIGHT is not set
- +# CONFIG_I2C_SIMTEC is not set
- +# CONFIG_I2C_TAOS_EVM is not set
- +# CONFIG_I2C_STUB is not set
- +# CONFIG_I2C_TINY_USB is not set
- +# CONFIG_I2C_PCA_PLATFORM is not set
- +CONFIG_I2C_MV64XXX=y
- +
- +#
- +# Miscellaneous I2C Chip support
- +#
- +# CONFIG_DS1682 is not set
- +# CONFIG_SENSORS_EEPROM is not set
- +# CONFIG_SENSORS_PCF8574 is not set
- +# CONFIG_PCF8575 is not set
- +# CONFIG_SENSORS_PCF8591 is not set
- +# CONFIG_SENSORS_MAX6875 is not set
- +# CONFIG_SENSORS_TSL2550 is not set
- +# CONFIG_I2C_DEBUG_CORE is not set
- +# CONFIG_I2C_DEBUG_ALGO is not set
- +# CONFIG_I2C_DEBUG_BUS is not set
- +# CONFIG_I2C_DEBUG_CHIP is not set
- +CONFIG_SPI=y
- +CONFIG_SPI_MASTER=y
- +
- +#
- +# SPI Master Controller Drivers
- +#
- +# CONFIG_SPI_BITBANG is not set
- +
- +#
- +# SPI Protocol Masters
- +#
- +# CONFIG_SPI_AT25 is not set
- +# CONFIG_SPI_SPIDEV is not set
- +# CONFIG_SPI_TLE62X0 is not set
- +# CONFIG_W1 is not set
- +# CONFIG_POWER_SUPPLY is not set
- +# CONFIG_HWMON is not set
- +# CONFIG_WATCHDOG is not set
- +
- +#
- +# Sonics Silicon Backplane
- +#
- +CONFIG_SSB_POSSIBLE=y
- +# CONFIG_SSB is not set
- +
- +#
- +# Multifunction device drivers
- +#
- +# CONFIG_MFD_SM501 is not set
- +# CONFIG_MFD_ASIC3 is not set
- +# CONFIG_HTC_PASIC3 is not set
- +
- +#
- +# Multimedia devices
- +#
- +
- +#
- +# Multimedia core support
- +#
- +# CONFIG_VIDEO_DEV is not set
- +# CONFIG_DVB_CORE is not set
- +# CONFIG_VIDEO_MEDIA is not set
- +
- +#
- +# Multimedia drivers
- +#
- +# CONFIG_DAB is not set
- +
- +#
- +# Graphics support
- +#
- +# CONFIG_VGASTATE is not set
- +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
- +# CONFIG_FB is not set
- +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
- +
- +#
- +# Display device support
- +#
- +# CONFIG_DISPLAY_SUPPORT is not set
- +
- +#
- +# Console display driver support
- +#
- +# CONFIG_VGA_CONSOLE is not set
- +CONFIG_DUMMY_CONSOLE=y
- +
- +#
- +# Sound
- +#
- +# CONFIG_SOUND is not set
- +CONFIG_HID_SUPPORT=y
- +CONFIG_HID=y
- +# CONFIG_HID_DEBUG is not set
- +# CONFIG_HIDRAW is not set
- +
- +#
- +# USB Input Devices
- +#
- +CONFIG_USB_HID=y
- +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
- +# CONFIG_HID_FF is not set
- +# CONFIG_USB_HIDDEV is not set
- +CONFIG_USB_SUPPORT=y
- +CONFIG_USB_ARCH_HAS_HCD=y
- +# CONFIG_USB_ARCH_HAS_OHCI is not set
- +# CONFIG_USB_ARCH_HAS_EHCI is not set
- +CONFIG_USB=y
- +# CONFIG_USB_DEBUG is not set
- +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
- +
- +#
- +# Miscellaneous USB options
- +#
- +CONFIG_USB_DEVICEFS=y
- +CONFIG_USB_DEVICE_CLASS=y
- +# CONFIG_USB_DYNAMIC_MINORS is not set
- +# CONFIG_USB_OTG is not set
- +# CONFIG_USB_OTG_WHITELIST is not set
- +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
- +
- +#
- +# USB Host Controller Drivers
- +#
- +# CONFIG_USB_C67X00_HCD is not set
- +# CONFIG_USB_ISP116X_HCD is not set
- +# CONFIG_USB_ISP1760_HCD is not set
- +# CONFIG_USB_SL811_HCD is not set
- +# CONFIG_USB_R8A66597_HCD is not set
- +
- +#
- +# USB Device Class drivers
- +#
- +# CONFIG_USB_ACM is not set
- +CONFIG_USB_PRINTER=y
- +# CONFIG_USB_WDM is not set
- +
- +#
- +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
- +#
- +
- +#
- +# may also be needed; see USB_STORAGE Help for more information
- +#
- +CONFIG_USB_STORAGE=y
- +# CONFIG_USB_STORAGE_DEBUG is not set
- +CONFIG_USB_STORAGE_DATAFAB=y
- +CONFIG_USB_STORAGE_FREECOM=y
- +# CONFIG_USB_STORAGE_ISD200 is not set
- +CONFIG_USB_STORAGE_DPCM=y
- +# CONFIG_USB_STORAGE_USBAT is not set
- +CONFIG_USB_STORAGE_SDDR09=y
- +CONFIG_USB_STORAGE_SDDR55=y
- +CONFIG_USB_STORAGE_JUMPSHOT=y
- +# CONFIG_USB_STORAGE_ALAUDA is not set
- +# CONFIG_USB_STORAGE_ONETOUCH is not set
- +# CONFIG_USB_STORAGE_KARMA is not set
- +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
- +# CONFIG_USB_LIBUSUAL is not set
- +
- +#
- +# USB Imaging devices
- +#
- +# CONFIG_USB_MDC800 is not set
- +# CONFIG_USB_MICROTEK is not set
- +# CONFIG_USB_MON is not set
- +
- +#
- +# USB port drivers
- +#
- +# CONFIG_USB_SERIAL is not set
- +
- +#
- +# USB Miscellaneous drivers
- +#
- +# CONFIG_USB_EMI62 is not set
- +# CONFIG_USB_EMI26 is not set
- +# CONFIG_USB_ADUTUX is not set
- +# CONFIG_USB_AUERSWALD is not set
- +# CONFIG_USB_RIO500 is not set
- +# CONFIG_USB_LEGOTOWER is not set
- +# CONFIG_USB_LCD is not set
- +# CONFIG_USB_BERRY_CHARGE is not set
- +# CONFIG_USB_LED is not set
- +# CONFIG_USB_CYPRESS_CY7C63 is not set
- +# CONFIG_USB_CYTHERM is not set
- +# CONFIG_USB_PHIDGET is not set
- +# CONFIG_USB_IDMOUSE is not set
- +# CONFIG_USB_FTDI_ELAN is not set
- +# CONFIG_USB_APPLEDISPLAY is not set
- +# CONFIG_USB_LD is not set
- +# CONFIG_USB_TRANCEVIBRATOR is not set
- +# CONFIG_USB_IOWARRIOR is not set
- +# CONFIG_USB_TEST is not set
- +# CONFIG_USB_ISIGHTFW is not set
- +# CONFIG_USB_GADGET is not set
- +# CONFIG_MMC is not set
- +CONFIG_NEW_LEDS=y
- +# CONFIG_LEDS_CLASS is not set
- +
- +#
- +# LED drivers
- +#
- +
- +#
- +# LED Triggers
- +#
- +# CONFIG_LEDS_TRIGGERS is not set
- +CONFIG_RTC_LIB=y
- +# CONFIG_RTC_CLASS is not set
- +# CONFIG_UIO is not set
- +
- +#
- +# File systems
- +#
- +CONFIG_EXT2_FS=y
- +# CONFIG_EXT2_FS_XATTR is not set
- +# CONFIG_EXT2_FS_XIP is not set
- +CONFIG_EXT3_FS=y
- +# CONFIG_EXT3_FS_XATTR is not set
- +# CONFIG_EXT4DEV_FS is not set
- +CONFIG_JBD=y
- +# CONFIG_REISERFS_FS is not set
- +# CONFIG_JFS_FS is not set
- +# CONFIG_FS_POSIX_ACL is not set
- +CONFIG_XFS_FS=y
- +# CONFIG_XFS_QUOTA is not set
- +# CONFIG_XFS_POSIX_ACL is not set
- +# CONFIG_XFS_RT is not set
- +# CONFIG_XFS_DEBUG is not set
- +# CONFIG_OCFS2_FS is not set
- +CONFIG_DNOTIFY=y
- +CONFIG_INOTIFY=y
- +CONFIG_INOTIFY_USER=y
- +# CONFIG_QUOTA is not set
- +# CONFIG_AUTOFS_FS is not set
- +# CONFIG_AUTOFS4_FS is not set
- +# CONFIG_FUSE_FS is not set
- +
- +#
- +# CD-ROM/DVD Filesystems
- +#
- +CONFIG_ISO9660_FS=y
- +# CONFIG_JOLIET is not set
- +# CONFIG_ZISOFS is not set
- +CONFIG_UDF_FS=m
- +CONFIG_UDF_NLS=y
- +
- +#
- +# DOS/FAT/NT Filesystems
- +#
- +CONFIG_FAT_FS=y
- +CONFIG_MSDOS_FS=y
- +CONFIG_VFAT_FS=y
- +CONFIG_FAT_DEFAULT_CODEPAGE=437
- +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
- +# CONFIG_NTFS_FS is not set
- +
- +#
- +# Pseudo filesystems
- +#
- +CONFIG_PROC_FS=y
- +CONFIG_PROC_SYSCTL=y
- +CONFIG_SYSFS=y
- +CONFIG_TMPFS=y
- +# CONFIG_TMPFS_POSIX_ACL is not set
- +# CONFIG_HUGETLB_PAGE is not set
- +# CONFIG_CONFIGFS_FS is not set
- +
- +#
- +# Miscellaneous filesystems
- +#
- +# CONFIG_ADFS_FS is not set
- +# CONFIG_AFFS_FS is not set
- +# CONFIG_HFS_FS is not set
- +# CONFIG_HFSPLUS_FS is not set
- +# CONFIG_BEFS_FS is not set
- +# CONFIG_BFS_FS is not set
- +# CONFIG_EFS_FS is not set
- +CONFIG_JFFS2_FS=y
- +CONFIG_JFFS2_FS_DEBUG=0
- +CONFIG_JFFS2_FS_WRITEBUFFER=y
- +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
- +# CONFIG_JFFS2_SUMMARY is not set
- +# CONFIG_JFFS2_FS_XATTR is not set
- +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
- +CONFIG_JFFS2_ZLIB=y
- +# CONFIG_JFFS2_LZO is not set
- +CONFIG_JFFS2_RTIME=y
- +# CONFIG_JFFS2_RUBIN is not set
- +CONFIG_CRAMFS=y
- +# CONFIG_VXFS_FS is not set
- +# CONFIG_MINIX_FS is not set
- +# CONFIG_HPFS_FS is not set
- +# CONFIG_QNX4FS_FS is not set
- +# CONFIG_ROMFS_FS is not set
- +# CONFIG_SYSV_FS is not set
- +# CONFIG_UFS_FS is not set
- +CONFIG_NETWORK_FILESYSTEMS=y
- +CONFIG_NFS_FS=y
- +CONFIG_NFS_V3=y
- +# CONFIG_NFS_V3_ACL is not set
- +# CONFIG_NFS_V4 is not set
- +# CONFIG_NFSD is not set
- +CONFIG_ROOT_NFS=y
- +CONFIG_LOCKD=y
- +CONFIG_LOCKD_V4=y
- +CONFIG_NFS_COMMON=y
- +CONFIG_SUNRPC=y
- +# CONFIG_SUNRPC_BIND34 is not set
- +# CONFIG_RPCSEC_GSS_KRB5 is not set
- +# CONFIG_RPCSEC_GSS_SPKM3 is not set
- +# CONFIG_SMB_FS is not set
- +# CONFIG_CIFS is not set
- +# CONFIG_NCP_FS is not set
- +# CONFIG_CODA_FS is not set
- +# CONFIG_AFS_FS is not set
- +
- +#
- +# Partition Types
- +#
- +CONFIG_PARTITION_ADVANCED=y
- +# CONFIG_ACORN_PARTITION is not set
- +# CONFIG_OSF_PARTITION is not set
- +# CONFIG_AMIGA_PARTITION is not set
- +# CONFIG_ATARI_PARTITION is not set
- +# CONFIG_MAC_PARTITION is not set
- +CONFIG_MSDOS_PARTITION=y
- +CONFIG_BSD_DISKLABEL=y
- +CONFIG_MINIX_SUBPARTITION=y
- +CONFIG_SOLARIS_X86_PARTITION=y
- +CONFIG_UNIXWARE_DISKLABEL=y
- +CONFIG_LDM_PARTITION=y
- +CONFIG_LDM_DEBUG=y
- +# CONFIG_SGI_PARTITION is not set
- +# CONFIG_ULTRIX_PARTITION is not set
- +CONFIG_SUN_PARTITION=y
- +# CONFIG_KARMA_PARTITION is not set
- +# CONFIG_EFI_PARTITION is not set
- +# CONFIG_SYSV68_PARTITION is not set
- +CONFIG_NLS=y
- +CONFIG_NLS_DEFAULT="iso8859-1"
- +CONFIG_NLS_CODEPAGE_437=y
- +# CONFIG_NLS_CODEPAGE_737 is not set
- +# CONFIG_NLS_CODEPAGE_775 is not set
- +CONFIG_NLS_CODEPAGE_850=y
- +# CONFIG_NLS_CODEPAGE_852 is not set
- +# CONFIG_NLS_CODEPAGE_855 is not set
- +# CONFIG_NLS_CODEPAGE_857 is not set
- +# CONFIG_NLS_CODEPAGE_860 is not set
- +# CONFIG_NLS_CODEPAGE_861 is not set
- +# CONFIG_NLS_CODEPAGE_862 is not set
- +# CONFIG_NLS_CODEPAGE_863 is not set
- +# CONFIG_NLS_CODEPAGE_864 is not set
- +# CONFIG_NLS_CODEPAGE_865 is not set
- +# CONFIG_NLS_CODEPAGE_866 is not set
- +# CONFIG_NLS_CODEPAGE_869 is not set
- +# CONFIG_NLS_CODEPAGE_936 is not set
- +# CONFIG_NLS_CODEPAGE_950 is not set
- +# CONFIG_NLS_CODEPAGE_932 is not set
- +# CONFIG_NLS_CODEPAGE_949 is not set
- +# CONFIG_NLS_CODEPAGE_874 is not set
- +# CONFIG_NLS_ISO8859_8 is not set
- +# CONFIG_NLS_CODEPAGE_1250 is not set
- +# CONFIG_NLS_CODEPAGE_1251 is not set
- +# CONFIG_NLS_ASCII is not set
- +CONFIG_NLS_ISO8859_1=y
- +CONFIG_NLS_ISO8859_2=y
- +# CONFIG_NLS_ISO8859_3 is not set
- +# CONFIG_NLS_ISO8859_4 is not set
- +# CONFIG_NLS_ISO8859_5 is not set
- +# CONFIG_NLS_ISO8859_6 is not set
- +# CONFIG_NLS_ISO8859_7 is not set
- +# CONFIG_NLS_ISO8859_9 is not set
- +# CONFIG_NLS_ISO8859_13 is not set
- +# CONFIG_NLS_ISO8859_14 is not set
- +# CONFIG_NLS_ISO8859_15 is not set
- +# CONFIG_NLS_KOI8_R is not set
- +# CONFIG_NLS_KOI8_U is not set
- +# CONFIG_NLS_UTF8 is not set
- +# CONFIG_DLM is not set
- +
- +#
- +# Kernel hacking
- +#
- +# CONFIG_PRINTK_TIME is not set
- +CONFIG_ENABLE_WARN_DEPRECATED=y
- +CONFIG_ENABLE_MUST_CHECK=y
- +CONFIG_FRAME_WARN=1024
- +CONFIG_MAGIC_SYSRQ=y
- +# CONFIG_UNUSED_SYMBOLS is not set
- +# CONFIG_DEBUG_FS is not set
- +# CONFIG_HEADERS_CHECK is not set
- +# CONFIG_DEBUG_KERNEL is not set
- +# CONFIG_DEBUG_BUGVERBOSE is not set
- +CONFIG_FRAME_POINTER=y
- +# CONFIG_LATENCYTOP is not set
- +# CONFIG_SAMPLES is not set
- +CONFIG_DEBUG_USER=y
- +
- +#
- +# Security options
- +#
- +# CONFIG_KEYS is not set
- +# CONFIG_SECURITY is not set
- +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
- +CONFIG_CRYPTO=y
- +
- +#
- +# Crypto core or helper
- +#
- +CONFIG_CRYPTO_ALGAPI=m
- +CONFIG_CRYPTO_BLKCIPHER=m
- +CONFIG_CRYPTO_MANAGER=m
- +# CONFIG_CRYPTO_GF128MUL is not set
- +# CONFIG_CRYPTO_NULL is not set
- +# CONFIG_CRYPTO_CRYPTD is not set
- +# CONFIG_CRYPTO_AUTHENC is not set
- +# CONFIG_CRYPTO_TEST is not set
- +
- +#
- +# Authenticated Encryption with Associated Data
- +#
- +# CONFIG_CRYPTO_CCM is not set
- +# CONFIG_CRYPTO_GCM is not set
- +# CONFIG_CRYPTO_SEQIV is not set
- +
- +#
- +# Block modes
- +#
- +CONFIG_CRYPTO_CBC=m
- +# CONFIG_CRYPTO_CTR is not set
- +# CONFIG_CRYPTO_CTS is not set
- +CONFIG_CRYPTO_ECB=m
- +# CONFIG_CRYPTO_LRW is not set
- +CONFIG_CRYPTO_PCBC=m
- +# CONFIG_CRYPTO_XTS is not set
- +
- +#
- +# Hash modes
- +#
- +# CONFIG_CRYPTO_HMAC is not set
- +# CONFIG_CRYPTO_XCBC is not set
- +
- +#
- +# Digest
- +#
- +# CONFIG_CRYPTO_CRC32C is not set
- +# CONFIG_CRYPTO_MD4 is not set
- +# CONFIG_CRYPTO_MD5 is not set
- +# CONFIG_CRYPTO_MICHAEL_MIC is not set
- +# CONFIG_CRYPTO_SHA1 is not set
- +# CONFIG_CRYPTO_SHA256 is not set
- +# CONFIG_CRYPTO_SHA512 is not set
- +# CONFIG_CRYPTO_TGR192 is not set
- +# CONFIG_CRYPTO_WP512 is not set
- +
- +#
- +# Ciphers
- +#
- +# CONFIG_CRYPTO_AES is not set
- +# CONFIG_CRYPTO_ANUBIS is not set
- +# CONFIG_CRYPTO_ARC4 is not set
- +# CONFIG_CRYPTO_BLOWFISH is not set
- +# CONFIG_CRYPTO_CAMELLIA is not set
- +# CONFIG_CRYPTO_CAST5 is not set
- +# CONFIG_CRYPTO_CAST6 is not set
- +# CONFIG_CRYPTO_DES is not set
- +# CONFIG_CRYPTO_FCRYPT is not set
- +# CONFIG_CRYPTO_KHAZAD is not set
- +# CONFIG_CRYPTO_SALSA20 is not set
- +# CONFIG_CRYPTO_SEED is not set
- +# CONFIG_CRYPTO_SERPENT is not set
- +# CONFIG_CRYPTO_TEA is not set
- +# CONFIG_CRYPTO_TWOFISH is not set
- +
- +#
- +# Compression
- +#
- +# CONFIG_CRYPTO_DEFLATE is not set
- +# CONFIG_CRYPTO_LZO is not set
- +CONFIG_CRYPTO_HW=y
- +
- +#
- +# Library routines
- +#
- +CONFIG_BITREVERSE=y
- +# CONFIG_GENERIC_FIND_FIRST_BIT is not set
- +# CONFIG_GENERIC_FIND_NEXT_BIT is not set
- +CONFIG_CRC_CCITT=y
- +CONFIG_CRC16=y
- +CONFIG_CRC_ITU_T=m
- +CONFIG_CRC32=y
- +# CONFIG_CRC7 is not set
- +CONFIG_LIBCRC32C=y
- +CONFIG_ZLIB_INFLATE=y
- +CONFIG_ZLIB_DEFLATE=y
- +CONFIG_PLIST=y
- +CONFIG_HAS_IOMEM=y
- +CONFIG_HAS_IOPORT=y
- +CONFIG_HAS_DMA=y
- --- /dev/null
- +++ b/arch/arm/configs/mv78xx0_defconfig
- @@ -0,0 +1,1445 @@
- +#
- +# Automatically generated make config: don't edit
- +# Linux kernel version: 2.6.26-rc5
- +# Fri Jun 13 02:57:32 2008
- +#
- +CONFIG_ARM=y
- +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
- +# CONFIG_GENERIC_GPIO is not set
- +CONFIG_GENERIC_TIME=y
- +CONFIG_GENERIC_CLOCKEVENTS=y
- +CONFIG_MMU=y
- +# CONFIG_NO_IOPORT is not set
- +CONFIG_GENERIC_HARDIRQS=y
- +CONFIG_STACKTRACE_SUPPORT=y
- +CONFIG_HAVE_LATENCYTOP_SUPPORT=y
- +CONFIG_LOCKDEP_SUPPORT=y
- +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
- +CONFIG_HARDIRQS_SW_RESEND=y
- +CONFIG_GENERIC_IRQ_PROBE=y
- +CONFIG_RWSEM_GENERIC_SPINLOCK=y
- +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
- +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
- +CONFIG_GENERIC_HWEIGHT=y
- +CONFIG_GENERIC_CALIBRATE_DELAY=y
- +CONFIG_ARCH_SUPPORTS_AOUT=y
- +CONFIG_ZONE_DMA=y
- +CONFIG_VECTORS_BASE=0xffff0000
- +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
- +
- +#
- +# General setup
- +#
- +CONFIG_EXPERIMENTAL=y
- +CONFIG_BROKEN_ON_SMP=y
- +CONFIG_LOCK_KERNEL=y
- +CONFIG_INIT_ENV_ARG_LIMIT=32
- +CONFIG_LOCALVERSION=""
- +CONFIG_LOCALVERSION_AUTO=y
- +CONFIG_SWAP=y
- +CONFIG_SYSVIPC=y
- +CONFIG_SYSVIPC_SYSCTL=y
- +# CONFIG_POSIX_MQUEUE is not set
- +# CONFIG_BSD_PROCESS_ACCT is not set
- +# CONFIG_TASKSTATS is not set
- +# CONFIG_AUDIT is not set
- +# CONFIG_IKCONFIG is not set
- +CONFIG_LOG_BUF_SHIFT=14
- +# CONFIG_CGROUPS is not set
- +# CONFIG_GROUP_SCHED is not set
- +CONFIG_SYSFS_DEPRECATED=y
- +CONFIG_SYSFS_DEPRECATED_V2=y
- +# CONFIG_RELAY is not set
- +# CONFIG_NAMESPACES is not set
- +# CONFIG_BLK_DEV_INITRD is not set
- +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
- +CONFIG_SYSCTL=y
- +CONFIG_EMBEDDED=y
- +CONFIG_UID16=y
- +CONFIG_SYSCTL_SYSCALL=y
- +CONFIG_SYSCTL_SYSCALL_CHECK=y
- +CONFIG_KALLSYMS=y
- +CONFIG_KALLSYMS_ALL=y
- +# CONFIG_KALLSYMS_EXTRA_PASS is not set
- +CONFIG_HOTPLUG=y
- +CONFIG_PRINTK=y
- +CONFIG_BUG=y
- +CONFIG_ELF_CORE=y
- +CONFIG_COMPAT_BRK=y
- +CONFIG_BASE_FULL=y
- +CONFIG_FUTEX=y
- +CONFIG_ANON_INODES=y
- +CONFIG_EPOLL=y
- +CONFIG_SIGNALFD=y
- +CONFIG_TIMERFD=y
- +CONFIG_EVENTFD=y
- +CONFIG_SHMEM=y
- +CONFIG_VM_EVENT_COUNTERS=y
- +# CONFIG_SLUB_DEBUG is not set
- +# CONFIG_SLAB is not set
- +CONFIG_SLUB=y
- +# CONFIG_SLOB is not set
- +CONFIG_PROFILING=y
- +# CONFIG_MARKERS is not set
- +CONFIG_OPROFILE=y
- +CONFIG_HAVE_OPROFILE=y
- +CONFIG_KPROBES=y
- +CONFIG_KRETPROBES=y
- +CONFIG_HAVE_KPROBES=y
- +CONFIG_HAVE_KRETPROBES=y
- +# CONFIG_HAVE_DMA_ATTRS is not set
- +CONFIG_PROC_PAGE_MONITOR=y
- +CONFIG_RT_MUTEXES=y
- +# CONFIG_TINY_SHMEM is not set
- +CONFIG_BASE_SMALL=0
- +CONFIG_MODULES=y
- +# CONFIG_MODULE_FORCE_LOAD is not set
- +CONFIG_MODULE_UNLOAD=y
- +# CONFIG_MODULE_FORCE_UNLOAD is not set
- +# CONFIG_MODVERSIONS is not set
- +# CONFIG_MODULE_SRCVERSION_ALL is not set
- +# CONFIG_KMOD is not set
- +CONFIG_BLOCK=y
- +# CONFIG_LBD is not set
- +# CONFIG_BLK_DEV_IO_TRACE is not set
- +# CONFIG_LSF is not set
- +# CONFIG_BLK_DEV_BSG is not set
- +
- +#
- +# IO Schedulers
- +#
- +CONFIG_IOSCHED_NOOP=y
- +CONFIG_IOSCHED_AS=y
- +CONFIG_IOSCHED_DEADLINE=y
- +CONFIG_IOSCHED_CFQ=y
- +# CONFIG_DEFAULT_AS is not set
- +# CONFIG_DEFAULT_DEADLINE is not set
- +CONFIG_DEFAULT_CFQ=y
- +# CONFIG_DEFAULT_NOOP is not set
- +CONFIG_DEFAULT_IOSCHED="cfq"
- +CONFIG_CLASSIC_RCU=y
- +
- +#
- +# System Type
- +#
- +# CONFIG_ARCH_AAEC2000 is not set
- +# CONFIG_ARCH_INTEGRATOR is not set
- +# CONFIG_ARCH_REALVIEW is not set
- +# CONFIG_ARCH_VERSATILE is not set
- +# CONFIG_ARCH_AT91 is not set
- +# CONFIG_ARCH_CLPS7500 is not set
- +# CONFIG_ARCH_CLPS711X is not set
- +# CONFIG_ARCH_CO285 is not set
- +# CONFIG_ARCH_EBSA110 is not set
- +# CONFIG_ARCH_EP93XX is not set
- +# CONFIG_ARCH_FOOTBRIDGE is not set
- +# CONFIG_ARCH_NETX is not set
- +# CONFIG_ARCH_H720X is not set
- +# CONFIG_ARCH_IMX is not set
- +# CONFIG_ARCH_IOP13XX is not set
- +# CONFIG_ARCH_IOP32X is not set
- +# CONFIG_ARCH_IOP33X is not set
- +# CONFIG_ARCH_IXP23XX is not set
- +# CONFIG_ARCH_IXP2000 is not set
- +# CONFIG_ARCH_IXP4XX is not set
- +# CONFIG_ARCH_L7200 is not set
- +# CONFIG_ARCH_KIRKWOOD is not set
- +# CONFIG_ARCH_KS8695 is not set
- +# CONFIG_ARCH_NS9XXX is not set
- +# CONFIG_ARCH_LOKI is not set
- +CONFIG_ARCH_MV78XX0=y
- +# CONFIG_ARCH_MXC is not set
- +# CONFIG_ARCH_ORION5X is not set
- +# CONFIG_ARCH_PNX4008 is not set
- +# CONFIG_ARCH_PXA is not set
- +# CONFIG_ARCH_RPC is not set
- +# CONFIG_ARCH_SA1100 is not set
- +# CONFIG_ARCH_S3C2410 is not set
- +# CONFIG_ARCH_SHARK is not set
- +# CONFIG_ARCH_LH7A40X is not set
- +# CONFIG_ARCH_DAVINCI is not set
- +# CONFIG_ARCH_OMAP is not set
- +# CONFIG_ARCH_MSM7X00A is not set
- +
- +#
- +# Marvell MV78xx0 Implementations
- +#
- +CONFIG_MACH_DB78X00_BP=y
- +
- +#
- +# Boot options
- +#
- +
- +#
- +# Power management
- +#
- +CONFIG_PLAT_ORION=y
- +
- +#
- +# Processor Type
- +#
- +CONFIG_CPU_32=y
- +CONFIG_CPU_FEROCEON=y
- +CONFIG_CPU_FEROCEON_OLD_ID=y
- +CONFIG_CPU_32v5=y
- +CONFIG_CPU_ABRT_EV5T=y
- +CONFIG_CPU_PABRT_NOIFAR=y
- +CONFIG_CPU_CACHE_VIVT=y
- +CONFIG_CPU_COPY_FEROCEON=y
- +CONFIG_CPU_TLB_FEROCEON=y
- +CONFIG_CPU_CP15=y
- +CONFIG_CPU_CP15_MMU=y
- +
- +#
- +# Processor Features
- +#
- +CONFIG_ARM_THUMB=y
- +# CONFIG_CPU_ICACHE_DISABLE is not set
- +# CONFIG_CPU_DCACHE_DISABLE is not set
- +CONFIG_OUTER_CACHE=y
- +CONFIG_CACHE_FEROCEON_L2=y
- +
- +#
- +# Bus support
- +#
- +CONFIG_PCI=y
- +CONFIG_PCI_SYSCALL=y
- +# CONFIG_ARCH_SUPPORTS_MSI is not set
- +CONFIG_PCI_LEGACY=y
- +# CONFIG_PCI_DEBUG is not set
- +# CONFIG_PCCARD is not set
- +
- +#
- +# Kernel Features
- +#
- +CONFIG_TICK_ONESHOT=y
- +CONFIG_NO_HZ=y
- +CONFIG_HIGH_RES_TIMERS=y
- +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
- +CONFIG_PREEMPT=y
- +CONFIG_HZ=100
- +CONFIG_AEABI=y
- +CONFIG_OABI_COMPAT=y
- +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
- +CONFIG_SELECT_MEMORY_MODEL=y
- +CONFIG_FLATMEM_MANUAL=y
- +# CONFIG_DISCONTIGMEM_MANUAL is not set
- +# CONFIG_SPARSEMEM_MANUAL is not set
- +CONFIG_FLATMEM=y
- +CONFIG_FLAT_NODE_MEM_MAP=y
- +# CONFIG_SPARSEMEM_STATIC is not set
- +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
- +CONFIG_PAGEFLAGS_EXTENDED=y
- +CONFIG_SPLIT_PTLOCK_CPUS=4096
- +# CONFIG_RESOURCES_64BIT is not set
- +CONFIG_ZONE_DMA_FLAG=1
- +CONFIG_BOUNCE=y
- +CONFIG_VIRT_TO_BUS=y
- +CONFIG_ALIGNMENT_TRAP=y
- +
- +#
- +# Boot options
- +#
- +CONFIG_ZBOOT_ROM_TEXT=0x0
- +CONFIG_ZBOOT_ROM_BSS=0x0
- +CONFIG_CMDLINE=""
- +# CONFIG_XIP_KERNEL is not set
- +# CONFIG_KEXEC is not set
- +
- +#
- +# Floating point emulation
- +#
- +
- +#
- +# At least one emulation must be selected
- +#
- +CONFIG_FPE_NWFPE=y
- +# CONFIG_FPE_NWFPE_XP is not set
- +# CONFIG_FPE_FASTFPE is not set
- +CONFIG_VFP=y
- +
- +#
- +# Userspace binary formats
- +#
- +CONFIG_BINFMT_ELF=y
- +# CONFIG_BINFMT_AOUT is not set
- +# CONFIG_BINFMT_MISC is not set
- +
- +#
- +# Power management options
- +#
- +# CONFIG_PM is not set
- +CONFIG_ARCH_SUSPEND_POSSIBLE=y
- +
- +#
- +# Networking
- +#
- +CONFIG_NET=y
- +
- +#
- +# Networking options
- +#
- +CONFIG_PACKET=y
- +CONFIG_PACKET_MMAP=y
- +CONFIG_UNIX=y
- +CONFIG_XFRM=y
- +# CONFIG_XFRM_USER is not set
- +# CONFIG_XFRM_SUB_POLICY is not set
- +# CONFIG_XFRM_MIGRATE is not set
- +# CONFIG_XFRM_STATISTICS is not set
- +# CONFIG_NET_KEY is not set
- +CONFIG_INET=y
- +CONFIG_IP_MULTICAST=y
- +# CONFIG_IP_ADVANCED_ROUTER is not set
- +CONFIG_IP_FIB_HASH=y
- +CONFIG_IP_PNP=y
- +CONFIG_IP_PNP_DHCP=y
- +CONFIG_IP_PNP_BOOTP=y
- +# CONFIG_IP_PNP_RARP is not set
- +# CONFIG_NET_IPIP is not set
- +# CONFIG_NET_IPGRE is not set
- +# CONFIG_IP_MROUTE is not set
- +# CONFIG_ARPD is not set
- +# CONFIG_SYN_COOKIES is not set
- +# CONFIG_INET_AH is not set
- +# CONFIG_INET_ESP is not set
- +# CONFIG_INET_IPCOMP is not set
- +# CONFIG_INET_XFRM_TUNNEL is not set
- +# CONFIG_INET_TUNNEL is not set
- +CONFIG_INET_XFRM_MODE_TRANSPORT=y
- +CONFIG_INET_XFRM_MODE_TUNNEL=y
- +CONFIG_INET_XFRM_MODE_BEET=y
- +# CONFIG_INET_LRO is not set
- +CONFIG_INET_DIAG=y
- +CONFIG_INET_TCP_DIAG=y
- +# CONFIG_TCP_CONG_ADVANCED is not set
- +CONFIG_TCP_CONG_CUBIC=y
- +CONFIG_DEFAULT_TCP_CONG="cubic"
- +# CONFIG_TCP_MD5SIG is not set
- +# CONFIG_IPV6 is not set
- +# CONFIG_NETWORK_SECMARK is not set
- +# CONFIG_NETFILTER is not set
- +# CONFIG_IP_DCCP is not set
- +# CONFIG_IP_SCTP is not set
- +# CONFIG_TIPC is not set
- +# CONFIG_ATM is not set
- +# CONFIG_BRIDGE is not set
- +# CONFIG_VLAN_8021Q is not set
- +# CONFIG_DECNET is not set
- +# CONFIG_LLC2 is not set
- +# CONFIG_IPX is not set
- +# CONFIG_ATALK is not set
- +# CONFIG_X25 is not set
- +# CONFIG_LAPB is not set
- +# CONFIG_ECONET is not set
- +# CONFIG_WAN_ROUTER is not set
- +# CONFIG_NET_SCHED is not set
- +
- +#
- +# Network testing
- +#
- +CONFIG_NET_PKTGEN=m
- +# CONFIG_NET_TCPPROBE is not set
- +# CONFIG_HAMRADIO is not set
- +# CONFIG_CAN is not set
- +# CONFIG_IRDA is not set
- +# CONFIG_BT is not set
- +# CONFIG_AF_RXRPC is not set
- +
- +#
- +# Wireless
- +#
- +# CONFIG_CFG80211 is not set
- +CONFIG_WIRELESS_EXT=y
- +# CONFIG_MAC80211 is not set
- +# CONFIG_IEEE80211 is not set
- +# CONFIG_RFKILL is not set
- +# CONFIG_NET_9P is not set
- +
- +#
- +# Device Drivers
- +#
- +
- +#
- +# Generic Driver Options
- +#
- +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
- +CONFIG_STANDALONE=y
- +CONFIG_PREVENT_FIRMWARE_BUILD=y
- +CONFIG_FW_LOADER=y
- +# CONFIG_DEBUG_DRIVER is not set
- +# CONFIG_DEBUG_DEVRES is not set
- +# CONFIG_SYS_HYPERVISOR is not set
- +# CONFIG_CONNECTOR is not set
- +CONFIG_MTD=y
- +# CONFIG_MTD_DEBUG is not set
- +# CONFIG_MTD_CONCAT is not set
- +CONFIG_MTD_PARTITIONS=y
- +# CONFIG_MTD_REDBOOT_PARTS is not set
- +CONFIG_MTD_CMDLINE_PARTS=y
- +# CONFIG_MTD_AFS_PARTS is not set
- +# CONFIG_MTD_AR7_PARTS is not set
- +
- +#
- +# User Modules And Translation Layers
- +#
- +CONFIG_MTD_CHAR=y
- +CONFIG_MTD_BLKDEVS=y
- +CONFIG_MTD_BLOCK=y
- +# CONFIG_FTL is not set
- +# CONFIG_NFTL is not set
- +# CONFIG_INFTL is not set
- +# CONFIG_RFD_FTL is not set
- +# CONFIG_SSFDC is not set
- +# CONFIG_MTD_OOPS is not set
- +
- +#
- +# RAM/ROM/Flash chip drivers
- +#
- +CONFIG_MTD_CFI=y
- +CONFIG_MTD_JEDECPROBE=y
- +CONFIG_MTD_GEN_PROBE=y
- +CONFIG_MTD_CFI_ADV_OPTIONS=y
- +CONFIG_MTD_CFI_NOSWAP=y
- +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
- +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
- +CONFIG_MTD_CFI_GEOMETRY=y
- +CONFIG_MTD_MAP_BANK_WIDTH_1=y
- +CONFIG_MTD_MAP_BANK_WIDTH_2=y
- +CONFIG_MTD_MAP_BANK_WIDTH_4=y
- +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
- +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
- +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
- +CONFIG_MTD_CFI_I1=y
- +CONFIG_MTD_CFI_I2=y
- +# CONFIG_MTD_CFI_I4 is not set
- +# CONFIG_MTD_CFI_I8 is not set
- +# CONFIG_MTD_OTP is not set
- +CONFIG_MTD_CFI_INTELEXT=y
- +CONFIG_MTD_CFI_AMDSTD=y
- +# CONFIG_MTD_CFI_STAA is not set
- +CONFIG_MTD_CFI_UTIL=y
- +# CONFIG_MTD_RAM is not set
- +# CONFIG_MTD_ROM is not set
- +# CONFIG_MTD_ABSENT is not set
- +
- +#
- +# Mapping drivers for chip access
- +#
- +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
- +CONFIG_MTD_PHYSMAP=y
- +CONFIG_MTD_PHYSMAP_START=0x0
- +CONFIG_MTD_PHYSMAP_LEN=0x0
- +CONFIG_MTD_PHYSMAP_BANKWIDTH=0
- +# CONFIG_MTD_ARM_INTEGRATOR is not set
- +# CONFIG_MTD_IMPA7 is not set
- +# CONFIG_MTD_INTEL_VR_NOR is not set
- +# CONFIG_MTD_PLATRAM is not set
- +
- +#
- +# Self-contained MTD device drivers
- +#
- +# CONFIG_MTD_PMC551 is not set
- +# CONFIG_MTD_SLRAM is not set
- +# CONFIG_MTD_PHRAM is not set
- +# CONFIG_MTD_MTDRAM is not set
- +# CONFIG_MTD_BLOCK2MTD is not set
- +
- +#
- +# Disk-On-Chip Device Drivers
- +#
- +# CONFIG_MTD_DOC2000 is not set
- +# CONFIG_MTD_DOC2001 is not set
- +# CONFIG_MTD_DOC2001PLUS is not set
- +CONFIG_MTD_NAND=y
- +CONFIG_MTD_NAND_VERIFY_WRITE=y
- +# CONFIG_MTD_NAND_ECC_SMC is not set
- +# CONFIG_MTD_NAND_MUSEUM_IDS is not set
- +CONFIG_MTD_NAND_IDS=y
- +# CONFIG_MTD_NAND_DISKONCHIP is not set
- +# CONFIG_MTD_NAND_CAFE is not set
- +# CONFIG_MTD_NAND_NANDSIM is not set
- +# CONFIG_MTD_NAND_PLATFORM is not set
- +# CONFIG_MTD_ALAUDA is not set
- +CONFIG_MTD_NAND_ORION=y
- +# CONFIG_MTD_ONENAND is not set
- +
- +#
- +# UBI - Unsorted block images
- +#
- +# CONFIG_MTD_UBI is not set
- +# CONFIG_PARPORT is not set
- +CONFIG_BLK_DEV=y
- +# CONFIG_BLK_CPQ_DA is not set
- +# CONFIG_BLK_CPQ_CISS_DA is not set
- +# CONFIG_BLK_DEV_DAC960 is not set
- +# CONFIG_BLK_DEV_UMEM is not set
- +# CONFIG_BLK_DEV_COW_COMMON is not set
- +CONFIG_BLK_DEV_LOOP=y
- +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
- +# CONFIG_BLK_DEV_NBD is not set
- +# CONFIG_BLK_DEV_SX8 is not set
- +# CONFIG_BLK_DEV_UB is not set
- +# CONFIG_BLK_DEV_RAM is not set
- +# CONFIG_CDROM_PKTCDVD is not set
- +# CONFIG_ATA_OVER_ETH is not set
- +CONFIG_MISC_DEVICES=y
- +# CONFIG_PHANTOM is not set
- +# CONFIG_EEPROM_93CX6 is not set
- +# CONFIG_SGI_IOC4 is not set
- +# CONFIG_TIFM_CORE is not set
- +# CONFIG_ENCLOSURE_SERVICES is not set
- +CONFIG_HAVE_IDE=y
- +# CONFIG_IDE is not set
- +
- +#
- +# SCSI device support
- +#
- +# CONFIG_RAID_ATTRS is not set
- +CONFIG_SCSI=y
- +CONFIG_SCSI_DMA=y
- +# CONFIG_SCSI_TGT is not set
- +# CONFIG_SCSI_NETLINK is not set
- +# CONFIG_SCSI_PROC_FS is not set
- +
- +#
- +# SCSI support type (disk, tape, CD-ROM)
- +#
- +CONFIG_BLK_DEV_SD=y
- +# CONFIG_CHR_DEV_ST is not set
- +# CONFIG_CHR_DEV_OSST is not set
- +CONFIG_BLK_DEV_SR=m
- +# CONFIG_BLK_DEV_SR_VENDOR is not set
- +CONFIG_CHR_DEV_SG=m
- +# CONFIG_CHR_DEV_SCH is not set
- +
- +#
- +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
- +#
- +# CONFIG_SCSI_MULTI_LUN is not set
- +# CONFIG_SCSI_CONSTANTS is not set
- +# CONFIG_SCSI_LOGGING is not set
- +# CONFIG_SCSI_SCAN_ASYNC is not set
- +CONFIG_SCSI_WAIT_SCAN=m
- +
- +#
- +# SCSI Transports
- +#
- +# CONFIG_SCSI_SPI_ATTRS is not set
- +# CONFIG_SCSI_FC_ATTRS is not set
- +# CONFIG_SCSI_ISCSI_ATTRS is not set
- +# CONFIG_SCSI_SAS_LIBSAS is not set
- +# CONFIG_SCSI_SRP_ATTRS is not set
- +CONFIG_SCSI_LOWLEVEL=y
- +# CONFIG_ISCSI_TCP is not set
- +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
- +# CONFIG_SCSI_3W_9XXX is not set
- +# CONFIG_SCSI_ACARD is not set
- +# CONFIG_SCSI_AACRAID is not set
- +# CONFIG_SCSI_AIC7XXX is not set
- +# CONFIG_SCSI_AIC7XXX_OLD is not set
- +# CONFIG_SCSI_AIC79XX is not set
- +# CONFIG_SCSI_AIC94XX is not set
- +# CONFIG_SCSI_DPT_I2O is not set
- +# CONFIG_SCSI_ADVANSYS is not set
- +# CONFIG_SCSI_ARCMSR is not set
- +# CONFIG_MEGARAID_NEWGEN is not set
- +# CONFIG_MEGARAID_LEGACY is not set
- +# CONFIG_MEGARAID_SAS is not set
- +# CONFIG_SCSI_HPTIOP is not set
- +# CONFIG_SCSI_DMX3191D is not set
- +# CONFIG_SCSI_FUTURE_DOMAIN is not set
- +# CONFIG_SCSI_IPS is not set
- +# CONFIG_SCSI_INITIO is not set
- +# CONFIG_SCSI_INIA100 is not set
- +# CONFIG_SCSI_MVSAS is not set
- +# CONFIG_SCSI_STEX is not set
- +# CONFIG_SCSI_SYM53C8XX_2 is not set
- +# CONFIG_SCSI_IPR is not set
- +# CONFIG_SCSI_QLOGIC_1280 is not set
- +# CONFIG_SCSI_QLA_FC is not set
- +# CONFIG_SCSI_QLA_ISCSI is not set
- +# CONFIG_SCSI_LPFC is not set
- +# CONFIG_SCSI_DC395x is not set
- +# CONFIG_SCSI_DC390T is not set
- +# CONFIG_SCSI_NSP32 is not set
- +# CONFIG_SCSI_DEBUG is not set
- +# CONFIG_SCSI_SRP is not set
- +CONFIG_ATA=y
- +# CONFIG_ATA_NONSTANDARD is not set
- +CONFIG_SATA_PMP=y
- +# CONFIG_SATA_AHCI is not set
- +# CONFIG_SATA_SIL24 is not set
- +CONFIG_ATA_SFF=y
- +# CONFIG_SATA_SVW is not set
- +# CONFIG_ATA_PIIX is not set
- +CONFIG_SATA_MV=y
- +# CONFIG_SATA_NV is not set
- +# CONFIG_PDC_ADMA is not set
- +# CONFIG_SATA_QSTOR is not set
- +# CONFIG_SATA_PROMISE is not set
- +# CONFIG_SATA_SX4 is not set
- +# CONFIG_SATA_SIL is not set
- +# CONFIG_SATA_SIS is not set
- +# CONFIG_SATA_ULI is not set
- +# CONFIG_SATA_VIA is not set
- +# CONFIG_SATA_VITESSE is not set
- +# CONFIG_SATA_INIC162X is not set
- +# CONFIG_PATA_ALI is not set
- +# CONFIG_PATA_AMD is not set
- +# CONFIG_PATA_ARTOP is not set
- +# CONFIG_PATA_ATIIXP is not set
- +# CONFIG_PATA_CMD640_PCI is not set
- +# CONFIG_PATA_CMD64X is not set
- +# CONFIG_PATA_CS5520 is not set
- +# CONFIG_PATA_CS5530 is not set
- +# CONFIG_PATA_CYPRESS is not set
- +# CONFIG_PATA_EFAR is not set
- +# CONFIG_ATA_GENERIC is not set
- +# CONFIG_PATA_HPT366 is not set
- +# CONFIG_PATA_HPT37X is not set
- +# CONFIG_PATA_HPT3X2N is not set
- +# CONFIG_PATA_HPT3X3 is not set
- +# CONFIG_PATA_IT821X is not set
- +# CONFIG_PATA_IT8213 is not set
- +# CONFIG_PATA_JMICRON is not set
- +# CONFIG_PATA_TRIFLEX is not set
- +# CONFIG_PATA_MARVELL is not set
- +# CONFIG_PATA_MPIIX is not set
- +# CONFIG_PATA_OLDPIIX is not set
- +# CONFIG_PATA_NETCELL is not set
- +# CONFIG_PATA_NINJA32 is not set
- +# CONFIG_PATA_NS87410 is not set
- +# CONFIG_PATA_NS87415 is not set
- +# CONFIG_PATA_OPTI is not set
- +# CONFIG_PATA_OPTIDMA is not set
- +# CONFIG_PATA_PDC_OLD is not set
- +# CONFIG_PATA_RADISYS is not set
- +# CONFIG_PATA_RZ1000 is not set
- +# CONFIG_PATA_SC1200 is not set
- +# CONFIG_PATA_SERVERWORKS is not set
- +# CONFIG_PATA_PDC2027X is not set
- +# CONFIG_PATA_SIL680 is not set
- +# CONFIG_PATA_SIS is not set
- +# CONFIG_PATA_VIA is not set
- +# CONFIG_PATA_WINBOND is not set
- +# CONFIG_PATA_PLATFORM is not set
- +# CONFIG_PATA_SCH is not set
- +# CONFIG_MD is not set
- +# CONFIG_FUSION is not set
- +
- +#
- +# IEEE 1394 (FireWire) support
- +#
- +# CONFIG_FIREWIRE is not set
- +# CONFIG_IEEE1394 is not set
- +# CONFIG_I2O is not set
- +CONFIG_NETDEVICES=y
- +# CONFIG_NETDEVICES_MULTIQUEUE is not set
- +# CONFIG_DUMMY is not set
- +# CONFIG_BONDING is not set
- +# CONFIG_MACVLAN is not set
- +# CONFIG_EQUALIZER is not set
- +# CONFIG_TUN is not set
- +# CONFIG_VETH is not set
- +# CONFIG_ARCNET is not set
- +# CONFIG_PHYLIB is not set
- +CONFIG_NET_ETHERNET=y
- +CONFIG_MII=y
- +# CONFIG_AX88796 is not set
- +# CONFIG_HAPPYMEAL is not set
- +# CONFIG_SUNGEM is not set
- +# CONFIG_CASSINI is not set
- +# CONFIG_NET_VENDOR_3COM is not set
- +# CONFIG_SMC91X is not set
- +# CONFIG_DM9000 is not set
- +# CONFIG_NET_TULIP is not set
- +# CONFIG_HP100 is not set
- +# CONFIG_IBM_NEW_EMAC_ZMII is not set
- +# CONFIG_IBM_NEW_EMAC_RGMII is not set
- +# CONFIG_IBM_NEW_EMAC_TAH is not set
- +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
- +CONFIG_NET_PCI=y
- +# CONFIG_PCNET32 is not set
- +# CONFIG_AMD8111_ETH is not set
- +# CONFIG_ADAPTEC_STARFIRE is not set
- +# CONFIG_B44 is not set
- +# CONFIG_FORCEDETH is not set
- +# CONFIG_EEPRO100 is not set
- +# CONFIG_E100 is not set
- +# CONFIG_FEALNX is not set
- +# CONFIG_NATSEMI is not set
- +# CONFIG_NE2K_PCI is not set
- +# CONFIG_8139CP is not set
- +# CONFIG_8139TOO is not set
- +# CONFIG_R6040 is not set
- +# CONFIG_SIS900 is not set
- +# CONFIG_EPIC100 is not set
- +# CONFIG_SUNDANCE is not set
- +# CONFIG_TLAN is not set
- +# CONFIG_VIA_RHINE is not set
- +# CONFIG_SC92031 is not set
- +CONFIG_NETDEV_1000=y
- +# CONFIG_ACENIC is not set
- +# CONFIG_DL2K is not set
- +# CONFIG_E1000 is not set
- +# CONFIG_E1000E is not set
- +# CONFIG_E1000E_ENABLED is not set
- +# CONFIG_IP1000 is not set
- +# CONFIG_IGB is not set
- +# CONFIG_NS83820 is not set
- +# CONFIG_HAMACHI is not set
- +# CONFIG_YELLOWFIN is not set
- +# CONFIG_R8169 is not set
- +# CONFIG_SIS190 is not set
- +# CONFIG_SKGE is not set
- +# CONFIG_SKY2 is not set
- +# CONFIG_VIA_VELOCITY is not set
- +# CONFIG_TIGON3 is not set
- +# CONFIG_BNX2 is not set
- +CONFIG_MV643XX_ETH=y
- +# CONFIG_QLA3XXX is not set
- +# CONFIG_ATL1 is not set
- +# CONFIG_NETDEV_10000 is not set
- +# CONFIG_TR is not set
- +
- +#
- +# Wireless LAN
- +#
- +# CONFIG_WLAN_PRE80211 is not set
- +# CONFIG_WLAN_80211 is not set
- +# CONFIG_IWLWIFI_LEDS is not set
- +
- +#
- +# USB Network Adapters
- +#
- +# CONFIG_USB_CATC is not set
- +# CONFIG_USB_KAWETH is not set
- +# CONFIG_USB_PEGASUS is not set
- +# CONFIG_USB_RTL8150 is not set
- +# CONFIG_USB_USBNET is not set
- +# CONFIG_WAN is not set
- +# CONFIG_FDDI is not set
- +# CONFIG_HIPPI is not set
- +# CONFIG_PPP is not set
- +# CONFIG_SLIP is not set
- +# CONFIG_NET_FC is not set
- +# CONFIG_NETCONSOLE is not set
- +# CONFIG_NETPOLL is not set
- +# CONFIG_NET_POLL_CONTROLLER is not set
- +# CONFIG_ISDN is not set
- +
- +#
- +# Input device support
- +#
- +CONFIG_INPUT=y
- +# CONFIG_INPUT_FF_MEMLESS is not set
- +# CONFIG_INPUT_POLLDEV is not set
- +
- +#
- +# Userland interfaces
- +#
- +# CONFIG_INPUT_MOUSEDEV is not set
- +# CONFIG_INPUT_JOYDEV is not set
- +CONFIG_INPUT_EVDEV=y
- +# CONFIG_INPUT_EVBUG is not set
- +
- +#
- +# Input Device Drivers
- +#
- +# CONFIG_INPUT_KEYBOARD is not set
- +# CONFIG_INPUT_MOUSE is not set
- +# CONFIG_INPUT_JOYSTICK is not set
- +# CONFIG_INPUT_TABLET is not set
- +# CONFIG_INPUT_TOUCHSCREEN is not set
- +# CONFIG_INPUT_MISC is not set
- +
- +#
- +# Hardware I/O ports
- +#
- +# CONFIG_SERIO is not set
- +# CONFIG_GAMEPORT is not set
- +
- +#
- +# Character devices
- +#
- +# CONFIG_VT is not set
- +CONFIG_DEVKMEM=y
- +# CONFIG_SERIAL_NONSTANDARD is not set
- +# CONFIG_NOZOMI is not set
- +
- +#
- +# Serial drivers
- +#
- +CONFIG_SERIAL_8250=y
- +CONFIG_SERIAL_8250_CONSOLE=y
- +# CONFIG_SERIAL_8250_PCI is not set
- +CONFIG_SERIAL_8250_NR_UARTS=4
- +CONFIG_SERIAL_8250_RUNTIME_UARTS=2
- +# CONFIG_SERIAL_8250_EXTENDED is not set
- +
- +#
- +# Non-8250 serial port support
- +#
- +CONFIG_SERIAL_CORE=y
- +CONFIG_SERIAL_CORE_CONSOLE=y
- +# CONFIG_SERIAL_JSM is not set
- +CONFIG_UNIX98_PTYS=y
- +CONFIG_LEGACY_PTYS=y
- +CONFIG_LEGACY_PTY_COUNT=16
- +# CONFIG_IPMI_HANDLER is not set
- +# CONFIG_HW_RANDOM is not set
- +# CONFIG_NVRAM is not set
- +# CONFIG_R3964 is not set
- +# CONFIG_APPLICOM is not set
- +# CONFIG_RAW_DRIVER is not set
- +# CONFIG_TCG_TPM is not set
- +CONFIG_DEVPORT=y
- +CONFIG_I2C=y
- +CONFIG_I2C_BOARDINFO=y
- +CONFIG_I2C_CHARDEV=y
- +
- +#
- +# I2C Hardware Bus support
- +#
- +# CONFIG_I2C_ALI1535 is not set
- +# CONFIG_I2C_ALI1563 is not set
- +# CONFIG_I2C_ALI15X3 is not set
- +# CONFIG_I2C_AMD756 is not set
- +# CONFIG_I2C_AMD8111 is not set
- +# CONFIG_I2C_I801 is not set
- +# CONFIG_I2C_I810 is not set
- +# CONFIG_I2C_PIIX4 is not set
- +# CONFIG_I2C_NFORCE2 is not set
- +# CONFIG_I2C_OCORES is not set
- +# CONFIG_I2C_PARPORT_LIGHT is not set
- +# CONFIG_I2C_PROSAVAGE is not set
- +# CONFIG_I2C_SAVAGE4 is not set
- +# CONFIG_I2C_SIMTEC is not set
- +# CONFIG_I2C_SIS5595 is not set
- +# CONFIG_I2C_SIS630 is not set
- +# CONFIG_I2C_SIS96X is not set
- +# CONFIG_I2C_TAOS_EVM is not set
- +# CONFIG_I2C_STUB is not set
- +# CONFIG_I2C_TINY_USB is not set
- +# CONFIG_I2C_VIA is not set
- +# CONFIG_I2C_VIAPRO is not set
- +# CONFIG_I2C_VOODOO3 is not set
- +# CONFIG_I2C_PCA_PLATFORM is not set
- +CONFIG_I2C_MV64XXX=y
- +
- +#
- +# Miscellaneous I2C Chip support
- +#
- +# CONFIG_DS1682 is not set
- +# CONFIG_SENSORS_EEPROM is not set
- +# CONFIG_SENSORS_PCF8574 is not set
- +# CONFIG_PCF8575 is not set
- +# CONFIG_SENSORS_PCF8591 is not set
- +# CONFIG_SENSORS_MAX6875 is not set
- +# CONFIG_SENSORS_TSL2550 is not set
- +# CONFIG_I2C_DEBUG_CORE is not set
- +# CONFIG_I2C_DEBUG_ALGO is not set
- +# CONFIG_I2C_DEBUG_BUS is not set
- +# CONFIG_I2C_DEBUG_CHIP is not set
- +# CONFIG_SPI is not set
- +# CONFIG_W1 is not set
- +# CONFIG_POWER_SUPPLY is not set
- +CONFIG_HWMON=y
- +# CONFIG_HWMON_VID is not set
- +# CONFIG_SENSORS_AD7418 is not set
- +# CONFIG_SENSORS_ADM1021 is not set
- +# CONFIG_SENSORS_ADM1025 is not set
- +# CONFIG_SENSORS_ADM1026 is not set
- +# CONFIG_SENSORS_ADM1029 is not set
- +# CONFIG_SENSORS_ADM1031 is not set
- +# CONFIG_SENSORS_ADM9240 is not set
- +# CONFIG_SENSORS_ADT7470 is not set
- +# CONFIG_SENSORS_ADT7473 is not set
- +# CONFIG_SENSORS_ATXP1 is not set
- +# CONFIG_SENSORS_DS1621 is not set
- +# CONFIG_SENSORS_I5K_AMB is not set
- +# CONFIG_SENSORS_F71805F is not set
- +# CONFIG_SENSORS_F71882FG is not set
- +# CONFIG_SENSORS_F75375S is not set
- +# CONFIG_SENSORS_GL518SM is not set
- +# CONFIG_SENSORS_GL520SM is not set
- +# CONFIG_SENSORS_IT87 is not set
- +# CONFIG_SENSORS_LM63 is not set
- +# CONFIG_SENSORS_LM75 is not set
- +# CONFIG_SENSORS_LM77 is not set
- +# CONFIG_SENSORS_LM78 is not set
- +# CONFIG_SENSORS_LM80 is not set
- +# CONFIG_SENSORS_LM83 is not set
- +# CONFIG_SENSORS_LM85 is not set
- +# CONFIG_SENSORS_LM87 is not set
- +# CONFIG_SENSORS_LM90 is not set
- +# CONFIG_SENSORS_LM92 is not set
- +# CONFIG_SENSORS_LM93 is not set
- +# CONFIG_SENSORS_MAX1619 is not set
- +# CONFIG_SENSORS_MAX6650 is not set
- +# CONFIG_SENSORS_PC87360 is not set
- +# CONFIG_SENSORS_PC87427 is not set
- +# CONFIG_SENSORS_SIS5595 is not set
- +# CONFIG_SENSORS_DME1737 is not set
- +# CONFIG_SENSORS_SMSC47M1 is not set
- +# CONFIG_SENSORS_SMSC47M192 is not set
- +# CONFIG_SENSORS_SMSC47B397 is not set
- +# CONFIG_SENSORS_ADS7828 is not set
- +# CONFIG_SENSORS_THMC50 is not set
- +# CONFIG_SENSORS_VIA686A is not set
- +# CONFIG_SENSORS_VT1211 is not set
- +# CONFIG_SENSORS_VT8231 is not set
- +# CONFIG_SENSORS_W83781D is not set
- +# CONFIG_SENSORS_W83791D is not set
- +# CONFIG_SENSORS_W83792D is not set
- +# CONFIG_SENSORS_W83793 is not set
- +# CONFIG_SENSORS_W83L785TS is not set
- +# CONFIG_SENSORS_W83L786NG is not set
- +# CONFIG_SENSORS_W83627HF is not set
- +# CONFIG_SENSORS_W83627EHF is not set
- +# CONFIG_HWMON_DEBUG_CHIP is not set
- +# CONFIG_WATCHDOG is not set
- +
- +#
- +# Sonics Silicon Backplane
- +#
- +CONFIG_SSB_POSSIBLE=y
- +# CONFIG_SSB is not set
- +
- +#
- +# Multifunction device drivers
- +#
- +# CONFIG_MFD_SM501 is not set
- +# CONFIG_MFD_ASIC3 is not set
- +# CONFIG_HTC_PASIC3 is not set
- +
- +#
- +# Multimedia devices
- +#
- +
- +#
- +# Multimedia core support
- +#
- +# CONFIG_VIDEO_DEV is not set
- +# CONFIG_DVB_CORE is not set
- +# CONFIG_VIDEO_MEDIA is not set
- +
- +#
- +# Multimedia drivers
- +#
- +# CONFIG_DAB is not set
- +
- +#
- +# Graphics support
- +#
- +# CONFIG_DRM is not set
- +# CONFIG_VGASTATE is not set
- +# CONFIG_VIDEO_OUTPUT_CONTROL is not set
- +# CONFIG_FB is not set
- +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
- +
- +#
- +# Display device support
- +#
- +# CONFIG_DISPLAY_SUPPORT is not set
- +
- +#
- +# Sound
- +#
- +# CONFIG_SOUND is not set
- +CONFIG_HID_SUPPORT=y
- +CONFIG_HID=y
- +# CONFIG_HID_DEBUG is not set
- +# CONFIG_HIDRAW is not set
- +
- +#
- +# USB Input Devices
- +#
- +CONFIG_USB_HID=y
- +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
- +# CONFIG_HID_FF is not set
- +# CONFIG_USB_HIDDEV is not set
- +CONFIG_USB_SUPPORT=y
- +CONFIG_USB_ARCH_HAS_HCD=y
- +CONFIG_USB_ARCH_HAS_OHCI=y
- +CONFIG_USB_ARCH_HAS_EHCI=y
- +CONFIG_USB=y
- +# CONFIG_USB_DEBUG is not set
- +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
- +
- +#
- +# Miscellaneous USB options
- +#
- +CONFIG_USB_DEVICEFS=y
- +CONFIG_USB_DEVICE_CLASS=y
- +# CONFIG_USB_DYNAMIC_MINORS is not set
- +# CONFIG_USB_OTG is not set
- +# CONFIG_USB_OTG_WHITELIST is not set
- +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
- +
- +#
- +# USB Host Controller Drivers
- +#
- +# CONFIG_USB_C67X00_HCD is not set
- +CONFIG_USB_EHCI_HCD=y
- +CONFIG_USB_EHCI_ROOT_HUB_TT=y
- +CONFIG_USB_EHCI_TT_NEWSCHED=y
- +# CONFIG_USB_ISP116X_HCD is not set
- +# CONFIG_USB_ISP1760_HCD is not set
- +# CONFIG_USB_OHCI_HCD is not set
- +# CONFIG_USB_UHCI_HCD is not set
- +# CONFIG_USB_SL811_HCD is not set
- +# CONFIG_USB_R8A66597_HCD is not set
- +
- +#
- +# USB Device Class drivers
- +#
- +# CONFIG_USB_ACM is not set
- +CONFIG_USB_PRINTER=y
- +# CONFIG_USB_WDM is not set
- +
- +#
- +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
- +#
- +
- +#
- +# may also be needed; see USB_STORAGE Help for more information
- +#
- +CONFIG_USB_STORAGE=y
- +# CONFIG_USB_STORAGE_DEBUG is not set
- +CONFIG_USB_STORAGE_DATAFAB=y
- +CONFIG_USB_STORAGE_FREECOM=y
- +# CONFIG_USB_STORAGE_ISD200 is not set
- +CONFIG_USB_STORAGE_DPCM=y
- +# CONFIG_USB_STORAGE_USBAT is not set
- +CONFIG_USB_STORAGE_SDDR09=y
- +CONFIG_USB_STORAGE_SDDR55=y
- +CONFIG_USB_STORAGE_JUMPSHOT=y
- +# CONFIG_USB_STORAGE_ALAUDA is not set
- +# CONFIG_USB_STORAGE_ONETOUCH is not set
- +# CONFIG_USB_STORAGE_KARMA is not set
- +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
- +# CONFIG_USB_LIBUSUAL is not set
- +
- +#
- +# USB Imaging devices
- +#
- +# CONFIG_USB_MDC800 is not set
- +# CONFIG_USB_MICROTEK is not set
- +# CONFIG_USB_MON is not set
- +
- +#
- +# USB port drivers
- +#
- +# CONFIG_USB_SERIAL is not set
- +
- +#
- +# USB Miscellaneous drivers
- +#
- +# CONFIG_USB_EMI62 is not set
- +# CONFIG_USB_EMI26 is not set
- +# CONFIG_USB_ADUTUX is not set
- +# CONFIG_USB_AUERSWALD is not set
- +# CONFIG_USB_RIO500 is not set
- +# CONFIG_USB_LEGOTOWER is not set
- +# CONFIG_USB_LCD is not set
- +# CONFIG_USB_BERRY_CHARGE is not set
- +# CONFIG_USB_LED is not set
- +# CONFIG_USB_CYPRESS_CY7C63 is not set
- +# CONFIG_USB_CYTHERM is not set
- +# CONFIG_USB_PHIDGET is not set
- +# CONFIG_USB_IDMOUSE is not set
- +# CONFIG_USB_FTDI_ELAN is not set
- +# CONFIG_USB_APPLEDISPLAY is not set
- +# CONFIG_USB_SISUSBVGA is not set
- +# CONFIG_USB_LD is not set
- +# CONFIG_USB_TRANCEVIBRATOR is not set
- +# CONFIG_USB_IOWARRIOR is not set
- +# CONFIG_USB_TEST is not set
- +# CONFIG_USB_ISIGHTFW is not set
- +# CONFIG_USB_GADGET is not set
- +# CONFIG_MMC is not set
- +CONFIG_NEW_LEDS=y
- +CONFIG_LEDS_CLASS=y
- +
- +#
- +# LED drivers
- +#
- +
- +#
- +# LED Triggers
- +#
- +CONFIG_LEDS_TRIGGERS=y
- +CONFIG_LEDS_TRIGGER_TIMER=y
- +CONFIG_LEDS_TRIGGER_HEARTBEAT=y
- +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
- +CONFIG_RTC_LIB=y
- +CONFIG_RTC_CLASS=y
- +CONFIG_RTC_HCTOSYS=y
- +CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
- +# CONFIG_RTC_DEBUG is not set
- +
- +#
- +# RTC interfaces
- +#
- +CONFIG_RTC_INTF_SYSFS=y
- +CONFIG_RTC_INTF_PROC=y
- +CONFIG_RTC_INTF_DEV=y
- +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
- +# CONFIG_RTC_DRV_TEST is not set
- +
- +#
- +# I2C RTC drivers
- +#
- +CONFIG_RTC_DRV_DS1307=y
- +# CONFIG_RTC_DRV_DS1374 is not set
- +# CONFIG_RTC_DRV_DS1672 is not set
- +# CONFIG_RTC_DRV_MAX6900 is not set
- +CONFIG_RTC_DRV_RS5C372=y
- +# CONFIG_RTC_DRV_ISL1208 is not set
- +# CONFIG_RTC_DRV_X1205 is not set
- +# CONFIG_RTC_DRV_PCF8563 is not set
- +# CONFIG_RTC_DRV_PCF8583 is not set
- +CONFIG_RTC_DRV_M41T80=y
- +# CONFIG_RTC_DRV_M41T80_WDT is not set
- +# CONFIG_RTC_DRV_S35390A is not set
- +
- +#
- +# SPI RTC drivers
- +#
- +
- +#
- +# Platform RTC drivers
- +#
- +# CONFIG_RTC_DRV_CMOS is not set
- +# CONFIG_RTC_DRV_DS1511 is not set
- +# CONFIG_RTC_DRV_DS1553 is not set
- +# CONFIG_RTC_DRV_DS1742 is not set
- +# CONFIG_RTC_DRV_STK17TA8 is not set
- +# CONFIG_RTC_DRV_M48T86 is not set
- +# CONFIG_RTC_DRV_M48T59 is not set
- +# CONFIG_RTC_DRV_V3020 is not set
- +
- +#
- +# on-CPU RTC drivers
- +#
- +# CONFIG_UIO is not set
- +
- +#
- +# File systems
- +#
- +CONFIG_EXT2_FS=y
- +# CONFIG_EXT2_FS_XATTR is not set
- +# CONFIG_EXT2_FS_XIP is not set
- +CONFIG_EXT3_FS=y
- +# CONFIG_EXT3_FS_XATTR is not set
- +# CONFIG_EXT4DEV_FS is not set
- +CONFIG_JBD=y
- +# CONFIG_REISERFS_FS is not set
- +# CONFIG_JFS_FS is not set
- +# CONFIG_FS_POSIX_ACL is not set
- +# CONFIG_XFS_FS is not set
- +# CONFIG_OCFS2_FS is not set
- +CONFIG_DNOTIFY=y
- +CONFIG_INOTIFY=y
- +CONFIG_INOTIFY_USER=y
- +# CONFIG_QUOTA is not set
- +# CONFIG_AUTOFS_FS is not set
- +# CONFIG_AUTOFS4_FS is not set
- +# CONFIG_FUSE_FS is not set
- +
- +#
- +# CD-ROM/DVD Filesystems
- +#
- +CONFIG_ISO9660_FS=m
- +CONFIG_JOLIET=y
- +# CONFIG_ZISOFS is not set
- +CONFIG_UDF_FS=m
- +CONFIG_UDF_NLS=y
- +
- +#
- +# DOS/FAT/NT Filesystems
- +#
- +CONFIG_FAT_FS=y
- +CONFIG_MSDOS_FS=y
- +CONFIG_VFAT_FS=y
- +CONFIG_FAT_DEFAULT_CODEPAGE=437
- +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
- +# CONFIG_NTFS_FS is not set
- +
- +#
- +# Pseudo filesystems
- +#
- +CONFIG_PROC_FS=y
- +CONFIG_PROC_SYSCTL=y
- +CONFIG_SYSFS=y
- +CONFIG_TMPFS=y
- +# CONFIG_TMPFS_POSIX_ACL is not set
- +# CONFIG_HUGETLB_PAGE is not set
- +# CONFIG_CONFIGFS_FS is not set
- +
- +#
- +# Miscellaneous filesystems
- +#
- +# CONFIG_ADFS_FS is not set
- +# CONFIG_AFFS_FS is not set
- +# CONFIG_HFS_FS is not set
- +# CONFIG_HFSPLUS_FS is not set
- +# CONFIG_BEFS_FS is not set
- +# CONFIG_BFS_FS is not set
- +# CONFIG_EFS_FS is not set
- +CONFIG_JFFS2_FS=y
- +CONFIG_JFFS2_FS_DEBUG=0
- +CONFIG_JFFS2_FS_WRITEBUFFER=y
- +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
- +# CONFIG_JFFS2_SUMMARY is not set
- +# CONFIG_JFFS2_FS_XATTR is not set
- +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
- +CONFIG_JFFS2_ZLIB=y
- +# CONFIG_JFFS2_LZO is not set
- +CONFIG_JFFS2_RTIME=y
- +# CONFIG_JFFS2_RUBIN is not set
- +CONFIG_CRAMFS=y
- +# CONFIG_VXFS_FS is not set
- +# CONFIG_MINIX_FS is not set
- +# CONFIG_HPFS_FS is not set
- +# CONFIG_QNX4FS_FS is not set
- +# CONFIG_ROMFS_FS is not set
- +# CONFIG_SYSV_FS is not set
- +# CONFIG_UFS_FS is not set
- +CONFIG_NETWORK_FILESYSTEMS=y
- +CONFIG_NFS_FS=y
- +CONFIG_NFS_V3=y
- +# CONFIG_NFS_V3_ACL is not set
- +# CONFIG_NFS_V4 is not set
- +# CONFIG_NFSD is not set
- +CONFIG_ROOT_NFS=y
- +CONFIG_LOCKD=y
- +CONFIG_LOCKD_V4=y
- +CONFIG_NFS_COMMON=y
- +CONFIG_SUNRPC=y
- +# CONFIG_SUNRPC_BIND34 is not set
- +# CONFIG_RPCSEC_GSS_KRB5 is not set
- +# CONFIG_RPCSEC_GSS_SPKM3 is not set
- +# CONFIG_SMB_FS is not set
- +# CONFIG_CIFS is not set
- +# CONFIG_NCP_FS is not set
- +# CONFIG_CODA_FS is not set
- +# CONFIG_AFS_FS is not set
- +
- +#
- +# Partition Types
- +#
- +CONFIG_PARTITION_ADVANCED=y
- +# CONFIG_ACORN_PARTITION is not set
- +# CONFIG_OSF_PARTITION is not set
- +# CONFIG_AMIGA_PARTITION is not set
- +# CONFIG_ATARI_PARTITION is not set
- +# CONFIG_MAC_PARTITION is not set
- +CONFIG_MSDOS_PARTITION=y
- +CONFIG_BSD_DISKLABEL=y
- +# CONFIG_MINIX_SUBPARTITION is not set
- +# CONFIG_SOLARIS_X86_PARTITION is not set
- +# CONFIG_UNIXWARE_DISKLABEL is not set
- +# CONFIG_LDM_PARTITION is not set
- +# CONFIG_SGI_PARTITION is not set
- +# CONFIG_ULTRIX_PARTITION is not set
- +# CONFIG_SUN_PARTITION is not set
- +# CONFIG_KARMA_PARTITION is not set
- +# CONFIG_EFI_PARTITION is not set
- +# CONFIG_SYSV68_PARTITION is not set
- +CONFIG_NLS=y
- +CONFIG_NLS_DEFAULT="iso8859-1"
- +CONFIG_NLS_CODEPAGE_437=y
- +# CONFIG_NLS_CODEPAGE_737 is not set
- +# CONFIG_NLS_CODEPAGE_775 is not set
- +CONFIG_NLS_CODEPAGE_850=y
- +# CONFIG_NLS_CODEPAGE_852 is not set
- +# CONFIG_NLS_CODEPAGE_855 is not set
- +# CONFIG_NLS_CODEPAGE_857 is not set
- +# CONFIG_NLS_CODEPAGE_860 is not set
- +# CONFIG_NLS_CODEPAGE_861 is not set
- +# CONFIG_NLS_CODEPAGE_862 is not set
- +# CONFIG_NLS_CODEPAGE_863 is not set
- +# CONFIG_NLS_CODEPAGE_864 is not set
- +# CONFIG_NLS_CODEPAGE_865 is not set
- +# CONFIG_NLS_CODEPAGE_866 is not set
- +# CONFIG_NLS_CODEPAGE_869 is not set
- +# CONFIG_NLS_CODEPAGE_936 is not set
- +# CONFIG_NLS_CODEPAGE_950 is not set
- +# CONFIG_NLS_CODEPAGE_932 is not set
- +# CONFIG_NLS_CODEPAGE_949 is not set
- +# CONFIG_NLS_CODEPAGE_874 is not set
- +# CONFIG_NLS_ISO8859_8 is not set
- +# CONFIG_NLS_CODEPAGE_1250 is not set
- +# CONFIG_NLS_CODEPAGE_1251 is not set
- +# CONFIG_NLS_ASCII is not set
- +CONFIG_NLS_ISO8859_1=y
- +CONFIG_NLS_ISO8859_2=y
- +# CONFIG_NLS_ISO8859_3 is not set
- +# CONFIG_NLS_ISO8859_4 is not set
- +# CONFIG_NLS_ISO8859_5 is not set
- +# CONFIG_NLS_ISO8859_6 is not set
- +# CONFIG_NLS_ISO8859_7 is not set
- +# CONFIG_NLS_ISO8859_9 is not set
- +# CONFIG_NLS_ISO8859_13 is not set
- +# CONFIG_NLS_ISO8859_14 is not set
- +# CONFIG_NLS_ISO8859_15 is not set
- +# CONFIG_NLS_KOI8_R is not set
- +# CONFIG_NLS_KOI8_U is not set
- +# CONFIG_NLS_UTF8 is not set
- +# CONFIG_DLM is not set
- +
- +#
- +# Kernel hacking
- +#
- +# CONFIG_PRINTK_TIME is not set
- +CONFIG_ENABLE_WARN_DEPRECATED=y
- +CONFIG_ENABLE_MUST_CHECK=y
- +CONFIG_FRAME_WARN=1024
- +CONFIG_MAGIC_SYSRQ=y
- +# CONFIG_UNUSED_SYMBOLS is not set
- +# CONFIG_DEBUG_FS is not set
- +# CONFIG_HEADERS_CHECK is not set
- +CONFIG_DEBUG_KERNEL=y
- +# CONFIG_DEBUG_SHIRQ is not set
- +CONFIG_DETECT_SOFTLOCKUP=y
- +CONFIG_SCHED_DEBUG=y
- +CONFIG_SCHEDSTATS=y
- +# CONFIG_TIMER_STATS is not set
- +# CONFIG_DEBUG_OBJECTS is not set
- +CONFIG_DEBUG_PREEMPT=y
- +# CONFIG_DEBUG_RT_MUTEXES is not set
- +# CONFIG_RT_MUTEX_TESTER is not set
- +# CONFIG_DEBUG_SPINLOCK is not set
- +# CONFIG_DEBUG_MUTEXES is not set
- +# CONFIG_DEBUG_LOCK_ALLOC is not set
- +# CONFIG_PROVE_LOCKING is not set
- +# CONFIG_LOCK_STAT is not set
- +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
- +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
- +# CONFIG_DEBUG_KOBJECT is not set
- +# CONFIG_DEBUG_BUGVERBOSE is not set
- +CONFIG_DEBUG_INFO=y
- +# CONFIG_DEBUG_VM is not set
- +# CONFIG_DEBUG_WRITECOUNT is not set
- +# CONFIG_DEBUG_LIST is not set
- +# CONFIG_DEBUG_SG is not set
- +CONFIG_FRAME_POINTER=y
- +# CONFIG_BOOT_PRINTK_DELAY is not set
- +# CONFIG_RCU_TORTURE_TEST is not set
- +# CONFIG_KPROBES_SANITY_TEST is not set
- +# CONFIG_BACKTRACE_SELF_TEST is not set
- +# CONFIG_LKDTM is not set
- +# CONFIG_FAULT_INJECTION is not set
- +# CONFIG_LATENCYTOP is not set
- +# CONFIG_SAMPLES is not set
- +CONFIG_DEBUG_USER=y
- +CONFIG_DEBUG_ERRORS=y
- +# CONFIG_DEBUG_STACK_USAGE is not set
- +CONFIG_DEBUG_LL=y
- +# CONFIG_DEBUG_ICEDCC is not set
- +
- +#
- +# Security options
- +#
- +# CONFIG_KEYS is not set
- +# CONFIG_SECURITY is not set
- +# CONFIG_SECURITY_FILE_CAPABILITIES is not set
- +CONFIG_CRYPTO=y
- +
- +#
- +# Crypto core or helper
- +#
- +CONFIG_CRYPTO_ALGAPI=m
- +CONFIG_CRYPTO_BLKCIPHER=m
- +CONFIG_CRYPTO_MANAGER=m
- +# CONFIG_CRYPTO_GF128MUL is not set
- +# CONFIG_CRYPTO_NULL is not set
- +# CONFIG_CRYPTO_CRYPTD is not set
- +# CONFIG_CRYPTO_AUTHENC is not set
- +# CONFIG_CRYPTO_TEST is not set
- +
- +#
- +# Authenticated Encryption with Associated Data
- +#
- +# CONFIG_CRYPTO_CCM is not set
- +# CONFIG_CRYPTO_GCM is not set
- +# CONFIG_CRYPTO_SEQIV is not set
- +
- +#
- +# Block modes
- +#
- +CONFIG_CRYPTO_CBC=m
- +# CONFIG_CRYPTO_CTR is not set
- +# CONFIG_CRYPTO_CTS is not set
- +CONFIG_CRYPTO_ECB=m
- +# CONFIG_CRYPTO_LRW is not set
- +CONFIG_CRYPTO_PCBC=m
- +# CONFIG_CRYPTO_XTS is not set
- +
- +#
- +# Hash modes
- +#
- +# CONFIG_CRYPTO_HMAC is not set
- +# CONFIG_CRYPTO_XCBC is not set
- +
- +#
- +# Digest
- +#
- +# CONFIG_CRYPTO_CRC32C is not set
- +# CONFIG_CRYPTO_MD4 is not set
- +# CONFIG_CRYPTO_MD5 is not set
- +# CONFIG_CRYPTO_MICHAEL_MIC is not set
- +# CONFIG_CRYPTO_SHA1 is not set
- +# CONFIG_CRYPTO_SHA256 is not set
- +# CONFIG_CRYPTO_SHA512 is not set
- +# CONFIG_CRYPTO_TGR192 is not set
- +# CONFIG_CRYPTO_WP512 is not set
- +
- +#
- +# Ciphers
- +#
- +# CONFIG_CRYPTO_AES is not set
- +# CONFIG_CRYPTO_ANUBIS is not set
- +# CONFIG_CRYPTO_ARC4 is not set
- +# CONFIG_CRYPTO_BLOWFISH is not set
- +# CONFIG_CRYPTO_CAMELLIA is not set
- +# CONFIG_CRYPTO_CAST5 is not set
- +# CONFIG_CRYPTO_CAST6 is not set
- +# CONFIG_CRYPTO_DES is not set
- +# CONFIG_CRYPTO_FCRYPT is not set
- +# CONFIG_CRYPTO_KHAZAD is not set
- +# CONFIG_CRYPTO_SALSA20 is not set
- +# CONFIG_CRYPTO_SEED is not set
- +# CONFIG_CRYPTO_SERPENT is not set
- +# CONFIG_CRYPTO_TEA is not set
- +# CONFIG_CRYPTO_TWOFISH is not set
- +
- +#
- +# Compression
- +#
- +# CONFIG_CRYPTO_DEFLATE is not set
- +# CONFIG_CRYPTO_LZO is not set
- +CONFIG_CRYPTO_HW=y
- +# CONFIG_CRYPTO_DEV_HIFN_795X is not set
- +
- +#
- +# Library routines
- +#
- +CONFIG_BITREVERSE=y
- +# CONFIG_GENERIC_FIND_FIRST_BIT is not set
- +# CONFIG_GENERIC_FIND_NEXT_BIT is not set
- +# CONFIG_CRC_CCITT is not set
- +# CONFIG_CRC16 is not set
- +CONFIG_CRC_ITU_T=m
- +CONFIG_CRC32=y
- +# CONFIG_CRC7 is not set
- +# CONFIG_LIBCRC32C is not set
- +CONFIG_ZLIB_INFLATE=y
- +CONFIG_ZLIB_DEFLATE=y
- +CONFIG_PLIST=y
- +CONFIG_HAS_IOMEM=y
- +CONFIG_HAS_IOPORT=y
- +CONFIG_HAS_DMA=y
- --- a/arch/arm/configs/orion5x_defconfig
- +++ b/arch/arm/configs/orion5x_defconfig
- @@ -1,7 +1,7 @@
- #
- # Automatically generated make config: don't edit
- -# Linux kernel version: 2.6.24
- -# Thu Feb 7 14:10:30 2008
- +# Linux kernel version: 2.6.26-rc4
- +# Mon Jun 2 23:54:48 2008
- #
- CONFIG_ARM=y
- CONFIG_SYS_SUPPORTS_APM_EMULATION=y
- @@ -21,6 +21,7 @@
- # CONFIG_ARCH_HAS_ILOG2_U64 is not set
- CONFIG_GENERIC_HWEIGHT=y
- CONFIG_GENERIC_CALIBRATE_DELAY=y
- +CONFIG_ARCH_SUPPORTS_AOUT=y
- CONFIG_ZONE_DMA=y
- CONFIG_VECTORS_BASE=0xffff0000
- CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
- @@ -40,24 +41,24 @@
- # CONFIG_POSIX_MQUEUE is not set
- # CONFIG_BSD_PROCESS_ACCT is not set
- # CONFIG_TASKSTATS is not set
- -# CONFIG_USER_NS is not set
- -# CONFIG_PID_NS is not set
- # CONFIG_AUDIT is not set
- # CONFIG_IKCONFIG is not set
- CONFIG_LOG_BUF_SHIFT=14
- # CONFIG_CGROUPS is not set
- -CONFIG_FAIR_GROUP_SCHED=y
- -CONFIG_FAIR_USER_SCHED=y
- -# CONFIG_FAIR_CGROUP_SCHED is not set
- +# CONFIG_GROUP_SCHED is not set
- CONFIG_SYSFS_DEPRECATED=y
- +CONFIG_SYSFS_DEPRECATED_V2=y
- # CONFIG_RELAY is not set
- +# CONFIG_NAMESPACES is not set
- # CONFIG_BLK_DEV_INITRD is not set
- CONFIG_CC_OPTIMIZE_FOR_SIZE=y
- CONFIG_SYSCTL=y
- CONFIG_EMBEDDED=y
- CONFIG_UID16=y
- CONFIG_SYSCTL_SYSCALL=y
- +CONFIG_SYSCTL_SYSCALL_CHECK=y
- CONFIG_KALLSYMS=y
- +CONFIG_KALLSYMS_ALL=y
- # CONFIG_KALLSYMS_EXTRA_PASS is not set
- CONFIG_HOTPLUG=y
- CONFIG_PRINTK=y
- @@ -73,20 +74,25 @@
- CONFIG_EVENTFD=y
- CONFIG_SHMEM=y
- CONFIG_VM_EVENT_COUNTERS=y
- -CONFIG_SLAB=y
- -# CONFIG_SLUB is not set
- +# CONFIG_SLUB_DEBUG is not set
- +# CONFIG_SLAB is not set
- +CONFIG_SLUB=y
- # CONFIG_SLOB is not set
- -# CONFIG_PROFILING is not set
- +CONFIG_PROFILING=y
- # CONFIG_MARKERS is not set
- +CONFIG_OPROFILE=y
- CONFIG_HAVE_OPROFILE=y
- -# CONFIG_KPROBES is not set
- +CONFIG_KPROBES=y
- +CONFIG_KRETPROBES=y
- CONFIG_HAVE_KPROBES=y
- +CONFIG_HAVE_KRETPROBES=y
- +# CONFIG_HAVE_DMA_ATTRS is not set
- CONFIG_PROC_PAGE_MONITOR=y
- -CONFIG_SLABINFO=y
- CONFIG_RT_MUTEXES=y
- # CONFIG_TINY_SHMEM is not set
- CONFIG_BASE_SMALL=0
- CONFIG_MODULES=y
- +# CONFIG_MODULE_FORCE_LOAD is not set
- CONFIG_MODULE_UNLOAD=y
- # CONFIG_MODULE_FORCE_UNLOAD is not set
- # CONFIG_MODVERSIONS is not set
- @@ -111,7 +117,6 @@
- # CONFIG_DEFAULT_NOOP is not set
- CONFIG_DEFAULT_IOSCHED="cfq"
- CONFIG_CLASSIC_RCU=y
- -# CONFIG_PREEMPT_RCU is not set
-
- #
- # System Type
- @@ -160,6 +165,7 @@
- CONFIG_MACH_KUROBOX_PRO=y
- CONFIG_MACH_DNS323=y
- CONFIG_MACH_TS209=y
- +CONFIG_MACH_LINKSTATION_PRO=y
-
- #
- # Boot options
- @@ -168,6 +174,7 @@
- #
- # Power management
- #
- +CONFIG_PLAT_ORION=y
-
- #
- # Processor Type
- @@ -177,8 +184,9 @@
- CONFIG_CPU_FEROCEON_OLD_ID=y
- CONFIG_CPU_32v5=y
- CONFIG_CPU_ABRT_EV5T=y
- +CONFIG_CPU_PABRT_NOIFAR=y
- CONFIG_CPU_CACHE_VIVT=y
- -CONFIG_CPU_COPY_V4WB=y
- +CONFIG_CPU_COPY_FEROCEON=y
- CONFIG_CPU_TLB_V4WBI=y
- CONFIG_CPU_CP15=y
- CONFIG_CPU_CP15_MMU=y
- @@ -189,7 +197,6 @@
- CONFIG_ARM_THUMB=y
- # CONFIG_CPU_ICACHE_DISABLE is not set
- # CONFIG_CPU_DCACHE_DISABLE is not set
- -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
- # CONFIG_OUTER_CACHE is not set
-
- #
- @@ -199,6 +206,7 @@
- CONFIG_PCI_SYSCALL=y
- # CONFIG_ARCH_SUPPORTS_MSI is not set
- CONFIG_PCI_LEGACY=y
- +# CONFIG_PCI_DEBUG is not set
- # CONFIG_PCCARD is not set
-
- #
- @@ -221,6 +229,7 @@
- CONFIG_FLAT_NODE_MEM_MAP=y
- # CONFIG_SPARSEMEM_STATIC is not set
- # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
- +CONFIG_PAGEFLAGS_EXTENDED=y
- CONFIG_SPLIT_PTLOCK_CPUS=4096
- # CONFIG_RESOURCES_64BIT is not set
- CONFIG_ZONE_DMA_FLAG=1
- @@ -238,7 +247,6 @@
- CONFIG_CMDLINE=""
- # CONFIG_XIP_KERNEL is not set
- # CONFIG_KEXEC is not set
- -# CONFIG_ATAGS_PROC is not set
-
- #
- # Floating point emulation
- @@ -311,8 +319,6 @@
- CONFIG_DEFAULT_TCP_CONG="cubic"
- # CONFIG_TCP_MD5SIG is not set
- # CONFIG_IPV6 is not set
- -# CONFIG_INET6_XFRM_TUNNEL is not set
- -# CONFIG_INET6_TUNNEL is not set
- # CONFIG_NETWORK_SECMARK is not set
- # CONFIG_NETFILTER is not set
- # CONFIG_IP_DCCP is not set
- @@ -335,6 +341,7 @@
- # Network testing
- #
- CONFIG_NET_PKTGEN=m
- +# CONFIG_NET_TCPPROBE is not set
- # CONFIG_HAMRADIO is not set
- # CONFIG_CAN is not set
- # CONFIG_IRDA is not set
- @@ -362,6 +369,8 @@
- CONFIG_STANDALONE=y
- CONFIG_PREVENT_FIRMWARE_BUILD=y
- CONFIG_FW_LOADER=y
- +# CONFIG_DEBUG_DRIVER is not set
- +# CONFIG_DEBUG_DEVRES is not set
- # CONFIG_SYS_HYPERVISOR is not set
- # CONFIG_CONNECTOR is not set
- CONFIG_MTD=y
- @@ -371,6 +380,7 @@
- # CONFIG_MTD_REDBOOT_PARTS is not set
- CONFIG_MTD_CMDLINE_PARTS=y
- # CONFIG_MTD_AFS_PARTS is not set
- +# CONFIG_MTD_AR7_PARTS is not set
-
- #
- # User Modules And Translation Layers
- @@ -378,9 +388,8 @@
- CONFIG_MTD_CHAR=y
- CONFIG_MTD_BLKDEVS=y
- CONFIG_MTD_BLOCK=y
- -CONFIG_FTL=y
- -CONFIG_NFTL=y
- -# CONFIG_NFTL_RW is not set
- +# CONFIG_FTL is not set
- +# CONFIG_NFTL is not set
- # CONFIG_INFTL is not set
- # CONFIG_RFD_FTL is not set
- # CONFIG_SSFDC is not set
- @@ -405,12 +414,12 @@
- # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
- CONFIG_MTD_CFI_I1=y
- CONFIG_MTD_CFI_I2=y
- -CONFIG_MTD_CFI_I4=y
- +# CONFIG_MTD_CFI_I4 is not set
- # CONFIG_MTD_CFI_I8 is not set
- # CONFIG_MTD_OTP is not set
- CONFIG_MTD_CFI_INTELEXT=y
- CONFIG_MTD_CFI_AMDSTD=y
- -CONFIG_MTD_CFI_STAA=y
- +# CONFIG_MTD_CFI_STAA is not set
- CONFIG_MTD_CFI_UTIL=y
- # CONFIG_MTD_RAM is not set
- # CONFIG_MTD_ROM is not set
- @@ -481,6 +490,9 @@
- # CONFIG_EEPROM_93CX6 is not set
- # CONFIG_SGI_IOC4 is not set
- # CONFIG_TIFM_CORE is not set
- +# CONFIG_ENCLOSURE_SERVICES is not set
- +CONFIG_HAVE_IDE=y
- +# CONFIG_IDE is not set
-
- #
- # SCSI device support
- @@ -542,6 +554,7 @@
- # CONFIG_SCSI_IPS is not set
- # CONFIG_SCSI_INITIO is not set
- # CONFIG_SCSI_INIA100 is not set
- +# CONFIG_SCSI_MVSAS is not set
- # CONFIG_SCSI_STEX is not set
- # CONFIG_SCSI_SYM53C8XX_2 is not set
- # CONFIG_SCSI_IPR is not set
- @@ -556,7 +569,10 @@
- # CONFIG_SCSI_SRP is not set
- CONFIG_ATA=y
- # CONFIG_ATA_NONSTANDARD is not set
- +CONFIG_SATA_PMP=y
- # CONFIG_SATA_AHCI is not set
- +# CONFIG_SATA_SIL24 is not set
- +CONFIG_ATA_SFF=y
- # CONFIG_SATA_SVW is not set
- # CONFIG_ATA_PIIX is not set
- CONFIG_SATA_MV=y
- @@ -566,7 +582,6 @@
- # CONFIG_SATA_PROMISE is not set
- # CONFIG_SATA_SX4 is not set
- # CONFIG_SATA_SIL is not set
- -# CONFIG_SATA_SIL24 is not set
- # CONFIG_SATA_SIS is not set
- # CONFIG_SATA_ULI is not set
- # CONFIG_SATA_VIA is not set
- @@ -611,6 +626,7 @@
- # CONFIG_PATA_VIA is not set
- # CONFIG_PATA_WINBOND is not set
- # CONFIG_PATA_PLATFORM is not set
- +# CONFIG_PATA_SCH is not set
- # CONFIG_MD is not set
- # CONFIG_FUSION is not set
-
- @@ -652,7 +668,7 @@
- # CONFIG_B44 is not set
- # CONFIG_FORCEDETH is not set
- # CONFIG_EEPRO100 is not set
- -CONFIG_E100=y
- +# CONFIG_E100 is not set
- # CONFIG_FEALNX is not set
- # CONFIG_NATSEMI is not set
- # CONFIG_NE2K_PCI is not set
- @@ -668,9 +684,7 @@
- CONFIG_NETDEV_1000=y
- # CONFIG_ACENIC is not set
- # CONFIG_DL2K is not set
- -CONFIG_E1000=y
- -CONFIG_E1000_NAPI=y
- -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
- +# CONFIG_E1000 is not set
- # CONFIG_E1000E is not set
- # CONFIG_E1000E_ENABLED is not set
- # CONFIG_IP1000 is not set
- @@ -680,27 +694,15 @@
- # CONFIG_YELLOWFIN is not set
- # CONFIG_R8169 is not set
- # CONFIG_SIS190 is not set
- -CONFIG_SKGE=y
- -CONFIG_SKY2=y
- -# CONFIG_SK98LIN is not set
- +# CONFIG_SKGE is not set
- +# CONFIG_SKY2 is not set
- # CONFIG_VIA_VELOCITY is not set
- -CONFIG_TIGON3=y
- +# CONFIG_TIGON3 is not set
- # CONFIG_BNX2 is not set
- CONFIG_MV643XX_ETH=y
- # CONFIG_QLA3XXX is not set
- # CONFIG_ATL1 is not set
- -CONFIG_NETDEV_10000=y
- -# CONFIG_CHELSIO_T1 is not set
- -# CONFIG_CHELSIO_T3 is not set
- -# CONFIG_IXGBE is not set
- -# CONFIG_IXGB is not set
- -# CONFIG_S2IO is not set
- -# CONFIG_MYRI10GE is not set
- -# CONFIG_NETXEN_NIC is not set
- -# CONFIG_NIU is not set
- -# CONFIG_MLX4_CORE is not set
- -# CONFIG_TEHUTI is not set
- -# CONFIG_BNX2X is not set
- +# CONFIG_NETDEV_10000 is not set
- # CONFIG_TR is not set
-
- #
- @@ -708,6 +710,7 @@
- #
- # CONFIG_WLAN_PRE80211 is not set
- # CONFIG_WLAN_80211 is not set
- +# CONFIG_IWLWIFI_LEDS is not set
-
- #
- # USB Network Adapters
- @@ -738,12 +741,9 @@
- #
- # Userland interfaces
- #
- -CONFIG_INPUT_MOUSEDEV=y
- -CONFIG_INPUT_MOUSEDEV_PSAUX=y
- -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
- -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
- +# CONFIG_INPUT_MOUSEDEV is not set
- # CONFIG_INPUT_JOYDEV is not set
- -# CONFIG_INPUT_EVDEV is not set
- +CONFIG_INPUT_EVDEV=y
- # CONFIG_INPUT_EVBUG is not set
-
- #
- @@ -765,10 +765,8 @@
- #
- # Character devices
- #
- -CONFIG_VT=y
- -CONFIG_VT_CONSOLE=y
- -CONFIG_HW_CONSOLE=y
- -# CONFIG_VT_HW_CONSOLE_BINDING is not set
- +# CONFIG_VT is not set
- +CONFIG_DEVKMEM=y
- # CONFIG_SERIAL_NONSTANDARD is not set
- # CONFIG_NOZOMI is not set
-
- @@ -777,7 +775,7 @@
- #
- CONFIG_SERIAL_8250=y
- CONFIG_SERIAL_8250_CONSOLE=y
- -CONFIG_SERIAL_8250_PCI=y
- +# CONFIG_SERIAL_8250_PCI is not set
- CONFIG_SERIAL_8250_NR_UARTS=4
- CONFIG_SERIAL_8250_RUNTIME_UARTS=2
- # CONFIG_SERIAL_8250_EXTENDED is not set
- @@ -792,7 +790,7 @@
- CONFIG_LEGACY_PTYS=y
- CONFIG_LEGACY_PTY_COUNT=16
- # CONFIG_IPMI_HANDLER is not set
- -CONFIG_HW_RANDOM=m
- +# CONFIG_HW_RANDOM is not set
- # CONFIG_NVRAM is not set
- # CONFIG_R3964 is not set
- # CONFIG_APPLICOM is not set
- @@ -804,13 +802,6 @@
- CONFIG_I2C_CHARDEV=y
-
- #
- -# I2C Algorithms
- -#
- -# CONFIG_I2C_ALGOBIT is not set
- -# CONFIG_I2C_ALGOPCF is not set
- -# CONFIG_I2C_ALGOPCA is not set
- -
- -#
- # I2C Hardware Bus support
- #
- # CONFIG_I2C_ALI1535 is not set
- @@ -837,6 +828,7 @@
- # CONFIG_I2C_VIA is not set
- # CONFIG_I2C_VIAPRO is not set
- # CONFIG_I2C_VOODOO3 is not set
- +# CONFIG_I2C_PCA_PLATFORM is not set
- CONFIG_I2C_MV64XXX=y
-
- #
- @@ -847,19 +839,13 @@
- # CONFIG_SENSORS_PCF8574 is not set
- # CONFIG_PCF8575 is not set
- # CONFIG_SENSORS_PCF8591 is not set
- -# CONFIG_TPS65010 is not set
- # CONFIG_SENSORS_MAX6875 is not set
- # CONFIG_SENSORS_TSL2550 is not set
- # CONFIG_I2C_DEBUG_CORE is not set
- # CONFIG_I2C_DEBUG_ALGO is not set
- # CONFIG_I2C_DEBUG_BUS is not set
- # CONFIG_I2C_DEBUG_CHIP is not set
- -
- -#
- -# SPI support
- -#
- # CONFIG_SPI is not set
- -# CONFIG_SPI_MASTER is not set
- # CONFIG_W1 is not set
- # CONFIG_POWER_SUPPLY is not set
- CONFIG_HWMON=y
- @@ -872,6 +858,7 @@
- # CONFIG_SENSORS_ADM1031 is not set
- # CONFIG_SENSORS_ADM9240 is not set
- # CONFIG_SENSORS_ADT7470 is not set
- +# CONFIG_SENSORS_ADT7473 is not set
- # CONFIG_SENSORS_ATXP1 is not set
- # CONFIG_SENSORS_DS1621 is not set
- # CONFIG_SENSORS_I5K_AMB is not set
- @@ -901,6 +888,7 @@
- # CONFIG_SENSORS_SMSC47M1 is not set
- # CONFIG_SENSORS_SMSC47M192 is not set
- # CONFIG_SENSORS_SMSC47B397 is not set
- +# CONFIG_SENSORS_ADS7828 is not set
- # CONFIG_SENSORS_THMC50 is not set
- # CONFIG_SENSORS_VIA686A is not set
- # CONFIG_SENSORS_VT1211 is not set
- @@ -910,6 +898,7 @@
- # CONFIG_SENSORS_W83792D is not set
- # CONFIG_SENSORS_W83793 is not set
- # CONFIG_SENSORS_W83L785TS is not set
- +# CONFIG_SENSORS_W83L786NG is not set
- # CONFIG_SENSORS_W83627HF is not set
- # CONFIG_SENSORS_W83627EHF is not set
- # CONFIG_HWMON_DEBUG_CHIP is not set
- @@ -925,14 +914,24 @@
- # Multifunction device drivers
- #
- # CONFIG_MFD_SM501 is not set
- +# CONFIG_MFD_ASIC3 is not set
- +# CONFIG_HTC_PASIC3 is not set
-
- #
- # Multimedia devices
- #
- +
- +#
- +# Multimedia core support
- +#
- # CONFIG_VIDEO_DEV is not set
- # CONFIG_DVB_CORE is not set
- -CONFIG_DAB=y
- -# CONFIG_USB_DABUSB is not set
- +# CONFIG_VIDEO_MEDIA is not set
- +
- +#
- +# Multimedia drivers
- +#
- +# CONFIG_DAB is not set
-
- #
- # Graphics support
- @@ -949,12 +948,6 @@
- # CONFIG_DISPLAY_SUPPORT is not set
-
- #
- -# Console display driver support
- -#
- -# CONFIG_VGA_CONSOLE is not set
- -CONFIG_DUMMY_CONSOLE=y
- -
- -#
- # Sound
- #
- # CONFIG_SOUND is not set
- @@ -985,14 +978,18 @@
- CONFIG_USB_DEVICE_CLASS=y
- # CONFIG_USB_DYNAMIC_MINORS is not set
- # CONFIG_USB_OTG is not set
- +# CONFIG_USB_OTG_WHITELIST is not set
- +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
-
- #
- # USB Host Controller Drivers
- #
- +# CONFIG_USB_C67X00_HCD is not set
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_EHCI_ROOT_HUB_TT=y
- CONFIG_USB_EHCI_TT_NEWSCHED=y
- # CONFIG_USB_ISP116X_HCD is not set
- +# CONFIG_USB_ISP1760_HCD is not set
- # CONFIG_USB_OHCI_HCD is not set
- # CONFIG_USB_UHCI_HCD is not set
- # CONFIG_USB_SL811_HCD is not set
- @@ -1003,6 +1000,7 @@
- #
- # CONFIG_USB_ACM is not set
- CONFIG_USB_PRINTER=y
- +# CONFIG_USB_WDM is not set
-
- #
- # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
- @@ -1022,7 +1020,9 @@
- CONFIG_USB_STORAGE_SDDR55=y
- CONFIG_USB_STORAGE_JUMPSHOT=y
- # CONFIG_USB_STORAGE_ALAUDA is not set
- +# CONFIG_USB_STORAGE_ONETOUCH is not set
- # CONFIG_USB_STORAGE_KARMA is not set
- +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
- # CONFIG_USB_LIBUSUAL is not set
-
- #
- @@ -1060,6 +1060,7 @@
- # CONFIG_USB_TRANCEVIBRATOR is not set
- # CONFIG_USB_IOWARRIOR is not set
- # CONFIG_USB_TEST is not set
- +# CONFIG_USB_ISIGHTFW is not set
- # CONFIG_USB_GADGET is not set
- # CONFIG_MMC is not set
- CONFIG_NEW_LEDS=y
- @@ -1076,6 +1077,7 @@
- CONFIG_LEDS_TRIGGERS=y
- CONFIG_LEDS_TRIGGER_TIMER=y
- CONFIG_LEDS_TRIGGER_HEARTBEAT=y
- +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
- CONFIG_RTC_LIB=y
- CONFIG_RTC_CLASS=y
- CONFIG_RTC_HCTOSYS=y
- @@ -1105,6 +1107,7 @@
- # CONFIG_RTC_DRV_PCF8583 is not set
- CONFIG_RTC_DRV_M41T80=y
- # CONFIG_RTC_DRV_M41T80_WDT is not set
- +# CONFIG_RTC_DRV_S35390A is not set
-
- #
- # SPI RTC drivers
- @@ -1125,6 +1128,7 @@
- #
- # on-CPU RTC drivers
- #
- +# CONFIG_UIO is not set
-
- #
- # File systems
- @@ -1140,14 +1144,11 @@
- # CONFIG_JFS_FS is not set
- # CONFIG_FS_POSIX_ACL is not set
- # CONFIG_XFS_FS is not set
- -# CONFIG_GFS2_FS is not set
- # CONFIG_OCFS2_FS is not set
- -# CONFIG_MINIX_FS is not set
- -# CONFIG_ROMFS_FS is not set
- +CONFIG_DNOTIFY=y
- CONFIG_INOTIFY=y
- CONFIG_INOTIFY_USER=y
- # CONFIG_QUOTA is not set
- -CONFIG_DNOTIFY=y
- # CONFIG_AUTOFS_FS is not set
- # CONFIG_AUTOFS4_FS is not set
- # CONFIG_FUSE_FS is not set
- @@ -1155,8 +1156,8 @@
- #
- # CD-ROM/DVD Filesystems
- #
- -CONFIG_ISO9660_FS=y
- -# CONFIG_JOLIET is not set
- +CONFIG_ISO9660_FS=m
- +CONFIG_JOLIET=y
- # CONFIG_ZISOFS is not set
- CONFIG_UDF_FS=m
- CONFIG_UDF_NLS=y
- @@ -1205,8 +1206,10 @@
- # CONFIG_JFFS2_RUBIN is not set
- CONFIG_CRAMFS=y
- # CONFIG_VXFS_FS is not set
- +# CONFIG_MINIX_FS is not set
- # CONFIG_HPFS_FS is not set
- # CONFIG_QNX4FS_FS is not set
- +# CONFIG_ROMFS_FS is not set
- # CONFIG_SYSV_FS is not set
- # CONFIG_UFS_FS is not set
- CONFIG_NETWORK_FILESYSTEMS=y
- @@ -1214,7 +1217,6 @@
- CONFIG_NFS_V3=y
- # CONFIG_NFS_V3_ACL is not set
- # CONFIG_NFS_V4 is not set
- -# CONFIG_NFS_DIRECTIO is not set
- # CONFIG_NFSD is not set
- CONFIG_ROOT_NFS=y
- CONFIG_LOCKD=y
- @@ -1241,14 +1243,13 @@
- # CONFIG_MAC_PARTITION is not set
- CONFIG_MSDOS_PARTITION=y
- CONFIG_BSD_DISKLABEL=y
- -CONFIG_MINIX_SUBPARTITION=y
- -CONFIG_SOLARIS_X86_PARTITION=y
- -CONFIG_UNIXWARE_DISKLABEL=y
- -CONFIG_LDM_PARTITION=y
- -CONFIG_LDM_DEBUG=y
- +# CONFIG_MINIX_SUBPARTITION is not set
- +# CONFIG_SOLARIS_X86_PARTITION is not set
- +# CONFIG_UNIXWARE_DISKLABEL is not set
- +# CONFIG_LDM_PARTITION is not set
- # CONFIG_SGI_PARTITION is not set
- # CONFIG_ULTRIX_PARTITION is not set
- -CONFIG_SUN_PARTITION=y
- +# CONFIG_SUN_PARTITION is not set
- # CONFIG_KARMA_PARTITION is not set
- # CONFIG_EFI_PARTITION is not set
- # CONFIG_SYSV68_PARTITION is not set
- @@ -1300,15 +1301,48 @@
- # CONFIG_PRINTK_TIME is not set
- CONFIG_ENABLE_WARN_DEPRECATED=y
- CONFIG_ENABLE_MUST_CHECK=y
- -# CONFIG_MAGIC_SYSRQ is not set
- +CONFIG_FRAME_WARN=1024
- +CONFIG_MAGIC_SYSRQ=y
- # CONFIG_UNUSED_SYMBOLS is not set
- # CONFIG_DEBUG_FS is not set
- # CONFIG_HEADERS_CHECK is not set
- -# CONFIG_DEBUG_KERNEL is not set
- +CONFIG_DEBUG_KERNEL=y
- +# CONFIG_DEBUG_SHIRQ is not set
- +CONFIG_DETECT_SOFTLOCKUP=y
- +CONFIG_SCHED_DEBUG=y
- +CONFIG_SCHEDSTATS=y
- +# CONFIG_TIMER_STATS is not set
- +# CONFIG_DEBUG_OBJECTS is not set
- +CONFIG_DEBUG_PREEMPT=y
- +# CONFIG_DEBUG_RT_MUTEXES is not set
- +# CONFIG_RT_MUTEX_TESTER is not set
- +# CONFIG_DEBUG_SPINLOCK is not set
- +# CONFIG_DEBUG_MUTEXES is not set
- +# CONFIG_DEBUG_LOCK_ALLOC is not set
- +# CONFIG_PROVE_LOCKING is not set
- +# CONFIG_LOCK_STAT is not set
- +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
- +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
- +# CONFIG_DEBUG_KOBJECT is not set
- # CONFIG_DEBUG_BUGVERBOSE is not set
- +CONFIG_DEBUG_INFO=y
- +# CONFIG_DEBUG_VM is not set
- +# CONFIG_DEBUG_WRITECOUNT is not set
- +# CONFIG_DEBUG_LIST is not set
- +# CONFIG_DEBUG_SG is not set
- CONFIG_FRAME_POINTER=y
- +# CONFIG_BOOT_PRINTK_DELAY is not set
- +# CONFIG_RCU_TORTURE_TEST is not set
- +# CONFIG_KPROBES_SANITY_TEST is not set
- +# CONFIG_BACKTRACE_SELF_TEST is not set
- +# CONFIG_LKDTM is not set
- +# CONFIG_FAULT_INJECTION is not set
- # CONFIG_SAMPLES is not set
- CONFIG_DEBUG_USER=y
- +CONFIG_DEBUG_ERRORS=y
- +# CONFIG_DEBUG_STACK_USAGE is not set
- +CONFIG_DEBUG_LL=y
- +# CONFIG_DEBUG_ICEDCC is not set
-
- #
- # Security options
- @@ -1317,50 +1351,79 @@
- # CONFIG_SECURITY is not set
- # CONFIG_SECURITY_FILE_CAPABILITIES is not set
- CONFIG_CRYPTO=y
- +
- +#
- +# Crypto core or helper
- +#
- CONFIG_CRYPTO_ALGAPI=m
- CONFIG_CRYPTO_BLKCIPHER=m
- -# CONFIG_CRYPTO_SEQIV is not set
- CONFIG_CRYPTO_MANAGER=m
- +# CONFIG_CRYPTO_GF128MUL is not set
- +# CONFIG_CRYPTO_NULL is not set
- +# CONFIG_CRYPTO_CRYPTD is not set
- +# CONFIG_CRYPTO_AUTHENC is not set
- +# CONFIG_CRYPTO_TEST is not set
- +
- +#
- +# Authenticated Encryption with Associated Data
- +#
- +# CONFIG_CRYPTO_CCM is not set
- +# CONFIG_CRYPTO_GCM is not set
- +# CONFIG_CRYPTO_SEQIV is not set
- +
- +#
- +# Block modes
- +#
- +CONFIG_CRYPTO_CBC=m
- +# CONFIG_CRYPTO_CTR is not set
- +# CONFIG_CRYPTO_CTS is not set
- +CONFIG_CRYPTO_ECB=m
- +# CONFIG_CRYPTO_LRW is not set
- +CONFIG_CRYPTO_PCBC=m
- +# CONFIG_CRYPTO_XTS is not set
- +
- +#
- +# Hash modes
- +#
- # CONFIG_CRYPTO_HMAC is not set
- # CONFIG_CRYPTO_XCBC is not set
- -# CONFIG_CRYPTO_NULL is not set
- +
- +#
- +# Digest
- +#
- +# CONFIG_CRYPTO_CRC32C is not set
- # CONFIG_CRYPTO_MD4 is not set
- # CONFIG_CRYPTO_MD5 is not set
- +# CONFIG_CRYPTO_MICHAEL_MIC is not set
- # CONFIG_CRYPTO_SHA1 is not set
- # CONFIG_CRYPTO_SHA256 is not set
- # CONFIG_CRYPTO_SHA512 is not set
- -# CONFIG_CRYPTO_WP512 is not set
- # CONFIG_CRYPTO_TGR192 is not set
- -# CONFIG_CRYPTO_GF128MUL is not set
- -CONFIG_CRYPTO_ECB=m
- -CONFIG_CRYPTO_CBC=m
- -CONFIG_CRYPTO_PCBC=m
- -# CONFIG_CRYPTO_LRW is not set
- -# CONFIG_CRYPTO_XTS is not set
- -# CONFIG_CRYPTO_CTR is not set
- -# CONFIG_CRYPTO_GCM is not set
- -# CONFIG_CRYPTO_CCM is not set
- -# CONFIG_CRYPTO_CRYPTD is not set
- -# CONFIG_CRYPTO_DES is not set
- -# CONFIG_CRYPTO_FCRYPT is not set
- -# CONFIG_CRYPTO_BLOWFISH is not set
- -# CONFIG_CRYPTO_TWOFISH is not set
- -# CONFIG_CRYPTO_SERPENT is not set
- +# CONFIG_CRYPTO_WP512 is not set
- +
- +#
- +# Ciphers
- +#
- # CONFIG_CRYPTO_AES is not set
- +# CONFIG_CRYPTO_ANUBIS is not set
- +# CONFIG_CRYPTO_ARC4 is not set
- +# CONFIG_CRYPTO_BLOWFISH is not set
- +# CONFIG_CRYPTO_CAMELLIA is not set
- # CONFIG_CRYPTO_CAST5 is not set
- # CONFIG_CRYPTO_CAST6 is not set
- -# CONFIG_CRYPTO_TEA is not set
- -# CONFIG_CRYPTO_ARC4 is not set
- +# CONFIG_CRYPTO_DES is not set
- +# CONFIG_CRYPTO_FCRYPT is not set
- # CONFIG_CRYPTO_KHAZAD is not set
- -# CONFIG_CRYPTO_ANUBIS is not set
- -# CONFIG_CRYPTO_SEED is not set
- # CONFIG_CRYPTO_SALSA20 is not set
- +# CONFIG_CRYPTO_SEED is not set
- +# CONFIG_CRYPTO_SERPENT is not set
- +# CONFIG_CRYPTO_TEA is not set
- +# CONFIG_CRYPTO_TWOFISH is not set
- +
- +#
- +# Compression
- +#
- # CONFIG_CRYPTO_DEFLATE is not set
- -# CONFIG_CRYPTO_MICHAEL_MIC is not set
- -# CONFIG_CRYPTO_CRC32C is not set
- -# CONFIG_CRYPTO_CAMELLIA is not set
- -# CONFIG_CRYPTO_TEST is not set
- -# CONFIG_CRYPTO_AUTHENC is not set
- # CONFIG_CRYPTO_LZO is not set
- CONFIG_CRYPTO_HW=y
- # CONFIG_CRYPTO_DEV_HIFN_795X is not set
- @@ -1369,12 +1432,14 @@
- # Library routines
- #
- CONFIG_BITREVERSE=y
- -CONFIG_CRC_CCITT=y
- -CONFIG_CRC16=y
- -# CONFIG_CRC_ITU_T is not set
- +# CONFIG_GENERIC_FIND_FIRST_BIT is not set
- +# CONFIG_GENERIC_FIND_NEXT_BIT is not set
- +# CONFIG_CRC_CCITT is not set
- +# CONFIG_CRC16 is not set
- +CONFIG_CRC_ITU_T=m
- CONFIG_CRC32=y
- # CONFIG_CRC7 is not set
- -CONFIG_LIBCRC32C=y
- +# CONFIG_LIBCRC32C is not set
- CONFIG_ZLIB_INFLATE=y
- CONFIG_ZLIB_DEFLATE=y
- CONFIG_PLIST=y
- --- a/arch/arm/kernel/stacktrace.c
- +++ b/arch/arm/kernel/stacktrace.c
- @@ -36,6 +36,7 @@
- #ifdef CONFIG_STACKTRACE
- struct stack_trace_data {
- struct stack_trace *trace;
- + unsigned int no_sched_functions;
- unsigned int skip;
- };
-
- @@ -43,27 +44,52 @@
- {
- struct stack_trace_data *data = d;
- struct stack_trace *trace = data->trace;
- + unsigned long addr = frame->lr;
-
- + if (data->no_sched_functions && in_sched_functions(addr))
- + return 0;
- if (data->skip) {
- data->skip--;
- return 0;
- }
-
- - trace->entries[trace->nr_entries++] = frame->lr;
- + trace->entries[trace->nr_entries++] = addr;
-
- return trace->nr_entries >= trace->max_entries;
- }
-
- -void save_stack_trace(struct stack_trace *trace)
- +void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
- {
- struct stack_trace_data data;
- unsigned long fp, base;
-
- data.trace = trace;
- data.skip = trace->skip;
- - base = (unsigned long)task_stack_page(current);
- - asm("mov %0, fp" : "=r" (fp));
- + base = (unsigned long)task_stack_page(tsk);
- +
- + if (tsk != current) {
- +#ifdef CONFIG_SMP
- + /*
- + * What guarantees do we have here that 'tsk'
- + * is not running on another CPU?
- + */
- + BUG();
- +#else
- + data.no_sched_functions = 1;
- + fp = thread_saved_fp(tsk);
- +#endif
- + } else {
- + data.no_sched_functions = 0;
- + asm("mov %0, fp" : "=r" (fp));
- + }
-
- walk_stackframe(fp, base, base + THREAD_SIZE, save_trace, &data);
- + if (trace->nr_entries < trace->max_entries)
- + trace->entries[trace->nr_entries++] = ULONG_MAX;
- +}
- +
- +void save_stack_trace(struct stack_trace *trace)
- +{
- + save_stack_trace_tsk(current, trace);
- }
- #endif
- --- a/arch/arm/lib/copy_template.S
- +++ b/arch/arm/lib/copy_template.S
- @@ -13,14 +13,6 @@
- */
-
- /*
- - * This can be used to enable code to cacheline align the source pointer.
- - * Experiments on tested architectures (StrongARM and XScale) didn't show
- - * this a worthwhile thing to do. That might be different in the future.
- - */
- -//#define CALGN(code...) code
- -#define CALGN(code...)
- -
- -/*
- * Theory of operation
- * -------------------
- *
- @@ -82,7 +74,7 @@
- stmfd sp!, {r5 - r8}
- blt 5f
-
- - CALGN( ands ip, r1, #31 )
- + CALGN( ands ip, r0, #31 )
- CALGN( rsb r3, ip, #32 )
- CALGN( sbcnes r4, r3, r2 ) @ C is always set here
- CALGN( bcs 2f )
- @@ -168,7 +160,7 @@
- subs r2, r2, #28
- blt 14f
-
- - CALGN( ands ip, r1, #31 )
- + CALGN( ands ip, r0, #31 )
- CALGN( rsb ip, ip, #32 )
- CALGN( sbcnes r4, ip, r2 ) @ C is always set here
- CALGN( subcc r2, r2, ip )
- --- a/arch/arm/lib/memmove.S
- +++ b/arch/arm/lib/memmove.S
- @@ -13,14 +13,6 @@
- #include <linux/linkage.h>
- #include <asm/assembler.h>
-
- -/*
- - * This can be used to enable code to cacheline align the source pointer.
- - * Experiments on tested architectures (StrongARM and XScale) didn't show
- - * this a worthwhile thing to do. That might be different in the future.
- - */
- -//#define CALGN(code...) code
- -#define CALGN(code...)
- -
- .text
-
- /*
- @@ -55,11 +47,12 @@
- stmfd sp!, {r5 - r8}
- blt 5f
-
- - CALGN( ands ip, r1, #31 )
- + CALGN( ands ip, r0, #31 )
- CALGN( sbcnes r4, ip, r2 ) @ C is always set here
- CALGN( bcs 2f )
- CALGN( adr r4, 6f )
- CALGN( subs r2, r2, ip ) @ C is set here
- + CALGN( rsb ip, ip, #32 )
- CALGN( add pc, r4, ip )
-
- PLD( pld [r1, #-4] )
- @@ -138,8 +131,7 @@
- subs r2, r2, #28
- blt 14f
-
- - CALGN( ands ip, r1, #31 )
- - CALGN( rsb ip, ip, #32 )
- + CALGN( ands ip, r0, #31 )
- CALGN( sbcnes r4, ip, r2 ) @ C is always set here
- CALGN( subcc r2, r2, ip )
- CALGN( bcc 15f )
- --- a/arch/arm/lib/memset.S
- +++ b/arch/arm/lib/memset.S
- @@ -39,6 +39,9 @@
- mov r3, r1
- cmp r2, #16
- blt 4f
- +
- +#if ! CALGN(1)+0
- +
- /*
- * We need an extra register for this loop - save the return address and
- * use the LR
- @@ -64,6 +67,49 @@
- stmneia r0!, {r1, r3, ip, lr}
- ldr lr, [sp], #4
-
- +#else
- +
- +/*
- + * This version aligns the destination pointer in order to write
- + * whole cache lines at once.
- + */
- +
- + stmfd sp!, {r4-r7, lr}
- + mov r4, r1
- + mov r5, r1
- + mov r6, r1
- + mov r7, r1
- + mov ip, r1
- + mov lr, r1
- +
- + cmp r2, #96
- + tstgt r0, #31
- + ble 3f
- +
- + and ip, r0, #31
- + rsb ip, ip, #32
- + sub r2, r2, ip
- + movs ip, ip, lsl #(32 - 4)
- + stmcsia r0!, {r4, r5, r6, r7}
- + stmmiia r0!, {r4, r5}
- + tst ip, #(1 << 30)
- + mov ip, r1
- + strne r1, [r0], #4
- +
- +3: subs r2, r2, #64
- + stmgeia r0!, {r1, r3-r7, ip, lr}
- + stmgeia r0!, {r1, r3-r7, ip, lr}
- + bgt 3b
- + ldmeqfd sp!, {r4-r7, pc}
- +
- + tst r2, #32
- + stmneia r0!, {r1, r3-r7, ip, lr}
- + tst r2, #16
- + stmneia r0!, {r4-r7}
- + ldmfd sp!, {r4-r7, lr}
- +
- +#endif
- +
- 4: tst r2, #8
- stmneia r0!, {r1, r3}
- tst r2, #4
- --- a/arch/arm/lib/memzero.S
- +++ b/arch/arm/lib/memzero.S
- @@ -39,6 +39,9 @@
- */
- cmp r1, #16 @ 1 we can skip this chunk if we
- blt 4f @ 1 have < 16 bytes
- +
- +#if ! CALGN(1)+0
- +
- /*
- * We need an extra register for this loop - save the return address and
- * use the LR
- @@ -64,6 +67,47 @@
- stmneia r0!, {r2, r3, ip, lr} @ 4
- ldr lr, [sp], #4 @ 1
-
- +#else
- +
- +/*
- + * This version aligns the destination pointer in order to write
- + * whole cache lines at once.
- + */
- +
- + stmfd sp!, {r4-r7, lr}
- + mov r4, r2
- + mov r5, r2
- + mov r6, r2
- + mov r7, r2
- + mov ip, r2
- + mov lr, r2
- +
- + cmp r1, #96
- + andgts ip, r0, #31
- + ble 3f
- +
- + rsb ip, ip, #32
- + sub r1, r1, ip
- + movs ip, ip, lsl #(32 - 4)
- + stmcsia r0!, {r4, r5, r6, r7}
- + stmmiia r0!, {r4, r5}
- + movs ip, ip, lsl #2
- + strcs r2, [r0], #4
- +
- +3: subs r1, r1, #64
- + stmgeia r0!, {r2-r7, ip, lr}
- + stmgeia r0!, {r2-r7, ip, lr}
- + bgt 3b
- + ldmeqfd sp!, {r4-r7, pc}
- +
- + tst r1, #32
- + stmneia r0!, {r2-r7, ip, lr}
- + tst r1, #16
- + stmneia r0!, {r4-r7}
- + ldmfd sp!, {r4-r7, lr}
- +
- +#endif
- +
- 4: tst r1, #8 @ 1 8 bytes or more?
- stmneia r0!, {r2, r3} @ 2
- tst r1, #4 @ 1 4 bytes or more?
- --- /dev/null
- +++ b/arch/arm/mach-kirkwood/Kconfig
- @@ -0,0 +1,25 @@
- +if ARCH_KIRKWOOD
- +
- +menu "Marvell Kirkwood Implementations"
- +
- +config MACH_DB88F6281_BP
- + bool "Marvell DB-88F6281-BP Development Board"
- + help
- + Say 'Y' here if you want your kernel to support the
- + Marvell DB-88F6281-BP Development Board.
- +
- +config MACH_RD88F6192_NAS
- + bool "Marvell RD-88F6192-NAS Reference Board"
- + help
- + Say 'Y' here if you want your kernel to support the
- + Marvell RD-88F6192-NAS Reference Board.
- +
- +config MACH_RD88F6281
- + bool "Marvell RD-88F6281 Reference Board"
- + help
- + Say 'Y' here if you want your kernel to support the
- + Marvell RD-88F6281 Reference Board.
- +
- +endmenu
- +
- +endif
- --- /dev/null
- +++ b/arch/arm/mach-kirkwood/Makefile
- @@ -0,0 +1,5 @@
- +obj-y += common.o addr-map.o irq.o pcie.o
- +
- +obj-$(CONFIG_MACH_DB88F6281_BP) += db88f6281-bp-setup.o
- +obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
- +obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6281-setup.o
- --- /dev/null
- +++ b/arch/arm/mach-kirkwood/Makefile.boot
- @@ -0,0 +1,3 @@
- + zreladdr-y := 0x00008000
- +params_phys-y := 0x00000100
- +initrd_phys-y := 0x00800000
- --- /dev/null
- +++ b/arch/arm/mach-kirkwood/addr-map.c
- @@ -0,0 +1,139 @@
- +/*
- + * arch/arm/mach-kirkwood/addr-map.c
- + *
- + * Address map functions for Marvell Kirkwood SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/mbus.h>
- +#include <linux/io.h>
- +#include <asm/hardware.h>
- +#include "common.h"
- +
- +/*
- + * Generic Address Decode Windows bit settings
- + */
- +#define TARGET_DDR 0
- +#define TARGET_DEV_BUS 1
- +#define TARGET_PCIE 4
- +#define ATTR_DEV_SPI_ROM 0x1e
- +#define ATTR_DEV_BOOT 0x1d
- +#define ATTR_DEV_NAND 0x2f
- +#define ATTR_DEV_CS3 0x37
- +#define ATTR_DEV_CS2 0x3b
- +#define ATTR_DEV_CS1 0x3d
- +#define ATTR_DEV_CS0 0x3e
- +#define ATTR_PCIE_IO 0xe0
- +#define ATTR_PCIE_MEM 0xe8
- +
- +/*
- + * Helpers to get DDR bank info
- + */
- +#define DDR_BASE_CS_OFF(n) (0x0000 + ((n) << 3))
- +#define DDR_SIZE_CS_OFF(n) (0x0004 + ((n) << 3))
- +
- +/*
- + * CPU Address Decode Windows registers
- + */
- +#define WIN_OFF(n) (BRIDGE_VIRT_BASE + 0x0000 + ((n) << 4))
- +#define WIN_CTRL_OFF 0x0000
- +#define WIN_BASE_OFF 0x0004
- +#define WIN_REMAP_LO_OFF 0x0008
- +#define WIN_REMAP_HI_OFF 0x000c
- +
- +
- +struct mbus_dram_target_info kirkwood_mbus_dram_info;
- +
- +static int __init cpu_win_can_remap(int win)
- +{
- + if (win < 4)
- + return 1;
- +
- + return 0;
- +}
- +
- +static void __init setup_cpu_win(int win, u32 base, u32 size,
- + u8 target, u8 attr, int remap)
- +{
- + void __iomem *addr = (void __iomem *)WIN_OFF(win);
- + u32 ctrl;
- +
- + base &= 0xffff0000;
- + ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1;
- +
- + writel(base, addr + WIN_BASE_OFF);
- + writel(ctrl, addr + WIN_CTRL_OFF);
- + if (cpu_win_can_remap(win)) {
- + if (remap < 0)
- + remap = base;
- +
- + writel(remap & 0xffff0000, addr + WIN_REMAP_LO_OFF);
- + writel(0, addr + WIN_REMAP_HI_OFF);
- + }
- +}
- +
- +void __init kirkwood_setup_cpu_mbus(void)
- +{
- + void __iomem *addr;
- + int i;
- + int cs;
- +
- + /*
- + * First, disable and clear windows.
- + */
- + for (i = 0; i < 8; i++) {
- + addr = (void __iomem *)WIN_OFF(i);
- +
- + writel(0, addr + WIN_BASE_OFF);
- + writel(0, addr + WIN_CTRL_OFF);
- + if (cpu_win_can_remap(i)) {
- + writel(0, addr + WIN_REMAP_LO_OFF);
- + writel(0, addr + WIN_REMAP_HI_OFF);
- + }
- + }
- +
- + /*
- + * Setup windows for PCIe IO+MEM space.
- + */
- + setup_cpu_win(0, KIRKWOOD_PCIE_IO_PHYS_BASE, KIRKWOOD_PCIE_IO_SIZE,
- + TARGET_PCIE, ATTR_PCIE_IO, KIRKWOOD_PCIE_IO_BUS_BASE);
- + setup_cpu_win(1, KIRKWOOD_PCIE_MEM_PHYS_BASE, KIRKWOOD_PCIE_MEM_SIZE,
- + TARGET_PCIE, ATTR_PCIE_MEM, -1);
- +
- + /*
- + * Setup window for NAND controller.
- + */
- + setup_cpu_win(2, KIRKWOOD_NAND_MEM_PHYS_BASE, KIRKWOOD_NAND_MEM_SIZE,
- + TARGET_DEV_BUS, ATTR_DEV_NAND, -1);
- +
- + /*
- + * Setup MBUS dram target info.
- + */
- + kirkwood_mbus_dram_info.mbus_dram_target_id = TARGET_DDR;
- +
- + addr = (void __iomem *)DDR_WINDOW_CPU_BASE;
- +
- + for (i = 0, cs = 0; i < 4; i++) {
- + u32 base = readl(addr + DDR_BASE_CS_OFF(i));
- + u32 size = readl(addr + DDR_SIZE_CS_OFF(i));
- +
- + /*
- + * Chip select enabled?
- + */
- + if (size & 1) {
- + struct mbus_dram_window *w;
- +
- + w = &kirkwood_mbus_dram_info.cs[cs++];
- + w->cs_index = i;
- + w->mbus_attr = 0xf & ~(1 << i);
- + w->base = base & 0xffff0000;
- + w->size = (size | 0x0000ffff) + 1;
- + }
- + }
- + kirkwood_mbus_dram_info.num_cs = cs;
- +}
- --- /dev/null
- +++ b/arch/arm/mach-kirkwood/common.c
- @@ -0,0 +1,326 @@
- +/*
- + * arch/arm/mach-kirkwood/common.c
- + *
- + * Core functions for Marvell Kirkwood SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/serial_8250.h>
- +#include <linux/mbus.h>
- +#include <linux/mv643xx_eth.h>
- +#include <linux/ata_platform.h>
- +#include <asm/page.h>
- +#include <asm/timex.h>
- +#include <asm/mach/map.h>
- +#include <asm/mach/time.h>
- +#include <asm/arch/kirkwood.h>
- +#include <asm/plat-orion/cache-feroceon-l2.h>
- +#include <asm/plat-orion/ehci-orion.h>
- +#include <asm/plat-orion/orion_nand.h>
- +#include <asm/plat-orion/time.h>
- +#include "common.h"
- +
- +/*****************************************************************************
- + * I/O Address Mapping
- + ****************************************************************************/
- +static struct map_desc kirkwood_io_desc[] __initdata = {
- + {
- + .virtual = KIRKWOOD_PCIE_IO_VIRT_BASE,
- + .pfn = __phys_to_pfn(KIRKWOOD_PCIE_IO_PHYS_BASE),
- + .length = KIRKWOOD_PCIE_IO_SIZE,
- + .type = MT_DEVICE,
- + }, {
- + .virtual = KIRKWOOD_REGS_VIRT_BASE,
- + .pfn = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE),
- + .length = KIRKWOOD_REGS_SIZE,
- + .type = MT_DEVICE,
- + },
- +};
- +
- +void __init kirkwood_map_io(void)
- +{
- + iotable_init(kirkwood_io_desc, ARRAY_SIZE(kirkwood_io_desc));
- +}
- +
- +
- +/*****************************************************************************
- + * EHCI
- + ****************************************************************************/
- +static struct orion_ehci_data kirkwood_ehci_data = {
- + .dram = &kirkwood_mbus_dram_info,
- +};
- +
- +static u64 ehci_dmamask = 0xffffffffUL;
- +
- +
- +/*****************************************************************************
- + * EHCI0
- + ****************************************************************************/
- +static struct resource kirkwood_ehci_resources[] = {
- + {
- + .start = USB_PHYS_BASE,
- + .end = USB_PHYS_BASE + 0x0fff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_KIRKWOOD_USB,
- + .end = IRQ_KIRKWOOD_USB,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device kirkwood_ehci = {
- + .name = "orion-ehci",
- + .id = 0,
- + .dev = {
- + .dma_mask = &ehci_dmamask,
- + .coherent_dma_mask = 0xffffffff,
- + .platform_data = &kirkwood_ehci_data,
- + },
- + .resource = kirkwood_ehci_resources,
- + .num_resources = ARRAY_SIZE(kirkwood_ehci_resources),
- +};
- +
- +void __init kirkwood_ehci_init(void)
- +{
- + platform_device_register(&kirkwood_ehci);
- +}
- +
- +
- +/*****************************************************************************
- + * GE00
- + ****************************************************************************/
- +struct mv643xx_eth_shared_platform_data kirkwood_ge00_shared_data = {
- + .t_clk = KIRKWOOD_TCLK,
- + .dram = &kirkwood_mbus_dram_info,
- +};
- +
- +static struct resource kirkwood_ge00_shared_resources[] = {
- + {
- + .name = "ge00 base",
- + .start = GE00_PHYS_BASE + 0x2000,
- + .end = GE00_PHYS_BASE + 0x3fff,
- + .flags = IORESOURCE_MEM,
- + },
- +};
- +
- +static struct platform_device kirkwood_ge00_shared = {
- + .name = MV643XX_ETH_SHARED_NAME,
- + .id = 0,
- + .dev = {
- + .platform_data = &kirkwood_ge00_shared_data,
- + },
- + .num_resources = 1,
- + .resource = kirkwood_ge00_shared_resources,
- +};
- +
- +static struct resource kirkwood_ge00_resources[] = {
- + {
- + .name = "ge00 irq",
- + .start = IRQ_KIRKWOOD_GE00_SUM,
- + .end = IRQ_KIRKWOOD_GE00_SUM,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device kirkwood_ge00 = {
- + .name = MV643XX_ETH_NAME,
- + .id = 0,
- + .num_resources = 1,
- + .resource = kirkwood_ge00_resources,
- +};
- +
- +void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data)
- +{
- + eth_data->shared = &kirkwood_ge00_shared;
- + kirkwood_ge00.dev.platform_data = eth_data;
- +
- + platform_device_register(&kirkwood_ge00_shared);
- + platform_device_register(&kirkwood_ge00);
- +}
- +
- +
- +/*****************************************************************************
- + * SoC RTC
- + ****************************************************************************/
- +static struct resource kirkwood_rtc_resource = {
- + .start = RTC_PHYS_BASE,
- + .end = RTC_PHYS_BASE + SZ_16 - 1,
- + .flags = IORESOURCE_MEM,
- +};
- +
- +void __init kirkwood_rtc_init(void)
- +{
- + platform_device_register_simple("rtc-mv", -1, &kirkwood_rtc_resource, 1);
- +}
- +
- +
- +/*****************************************************************************
- + * SATA
- + ****************************************************************************/
- +static struct resource kirkwood_sata_resources[] = {
- + {
- + .name = "sata base",
- + .start = SATA_PHYS_BASE,
- + .end = SATA_PHYS_BASE + 0x5000 - 1,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .name = "sata irq",
- + .start = IRQ_KIRKWOOD_SATA,
- + .end = IRQ_KIRKWOOD_SATA,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device kirkwood_sata = {
- + .name = "sata_mv",
- + .id = 0,
- + .dev = {
- + .coherent_dma_mask = 0xffffffff,
- + },
- + .num_resources = ARRAY_SIZE(kirkwood_sata_resources),
- + .resource = kirkwood_sata_resources,
- +};
- +
- +void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data)
- +{
- + sata_data->dram = &kirkwood_mbus_dram_info;
- + kirkwood_sata.dev.platform_data = sata_data;
- + platform_device_register(&kirkwood_sata);
- +}
- +
- +
- +/*****************************************************************************
- + * UART0
- + ****************************************************************************/
- +static struct plat_serial8250_port kirkwood_uart0_data[] = {
- + {
- + .mapbase = UART0_PHYS_BASE,
- + .membase = (char *)UART0_VIRT_BASE,
- + .irq = IRQ_KIRKWOOD_UART_0,
- + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
- + .iotype = UPIO_MEM,
- + .regshift = 2,
- + .uartclk = KIRKWOOD_TCLK,
- + }, {
- + },
- +};
- +
- +static struct resource kirkwood_uart0_resources[] = {
- + {
- + .start = UART0_PHYS_BASE,
- + .end = UART0_PHYS_BASE + 0xff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_KIRKWOOD_UART_0,
- + .end = IRQ_KIRKWOOD_UART_0,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device kirkwood_uart0 = {
- + .name = "serial8250",
- + .id = 0,
- + .dev = {
- + .platform_data = kirkwood_uart0_data,
- + },
- + .resource = kirkwood_uart0_resources,
- + .num_resources = ARRAY_SIZE(kirkwood_uart0_resources),
- +};
- +
- +void __init kirkwood_uart0_init(void)
- +{
- + platform_device_register(&kirkwood_uart0);
- +}
- +
- +
- +/*****************************************************************************
- + * UART1
- + ****************************************************************************/
- +static struct plat_serial8250_port kirkwood_uart1_data[] = {
- + {
- + .mapbase = UART1_PHYS_BASE,
- + .membase = (char *)UART1_VIRT_BASE,
- + .irq = IRQ_KIRKWOOD_UART_1,
- + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
- + .iotype = UPIO_MEM,
- + .regshift = 2,
- + .uartclk = KIRKWOOD_TCLK,
- + }, {
- + },
- +};
- +
- +static struct resource kirkwood_uart1_resources[] = {
- + {
- + .start = UART1_PHYS_BASE,
- + .end = UART1_PHYS_BASE + 0xff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_KIRKWOOD_UART_1,
- + .end = IRQ_KIRKWOOD_UART_1,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device kirkwood_uart1 = {
- + .name = "serial8250",
- + .id = 1,
- + .dev = {
- + .platform_data = kirkwood_uart1_data,
- + },
- + .resource = kirkwood_uart1_resources,
- + .num_resources = ARRAY_SIZE(kirkwood_uart1_resources),
- +};
- +
- +void __init kirkwood_uart1_init(void)
- +{
- + platform_device_register(&kirkwood_uart1);
- +}
- +
- +
- +/*****************************************************************************
- + * Time handling
- + ****************************************************************************/
- +static void kirkwood_timer_init(void)
- +{
- + orion_time_init(IRQ_KIRKWOOD_BRIDGE, KIRKWOOD_TCLK);
- +}
- +
- +struct sys_timer kirkwood_timer = {
- + .init = kirkwood_timer_init,
- +};
- +
- +
- +/*****************************************************************************
- + * General
- + ****************************************************************************/
- +static char * __init kirkwood_id(void)
- +{
- + switch (readl(DEVICE_ID) & 0x3) {
- + case 0:
- + return "88F6180";
- + case 1:
- + return "88F6192";
- + case 2:
- + return "88F6281";
- + }
- +
- + return "unknown 88F6000 variant";
- +}
- +
- +void __init kirkwood_init(void)
- +{
- + printk(KERN_INFO "Kirkwood: %s, TCLK=%d.\n",
- + kirkwood_id(), KIRKWOOD_TCLK);
- +
- + kirkwood_setup_cpu_mbus();
- +
- +#ifdef CONFIG_CACHE_FEROCEON_L2
- + feroceon_l2_init(1);
- +#endif
- +}
- --- /dev/null
- +++ b/arch/arm/mach-kirkwood/common.h
- @@ -0,0 +1,42 @@
- +/*
- + * arch/arm/mach-kirkwood/common.h
- + *
- + * Core functions for Marvell Kirkwood SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ARCH_KIRKWOOD_COMMON_H
- +#define __ARCH_KIRKWOOD_COMMON_H
- +
- +struct mv643xx_eth_platform_data;
- +struct mv_sata_platform_data;
- +
- +/*
- + * Basic Kirkwood init functions used early by machine-setup.
- + */
- +void kirkwood_map_io(void);
- +void kirkwood_init(void);
- +void kirkwood_init_irq(void);
- +
- +extern struct mbus_dram_target_info kirkwood_mbus_dram_info;
- +void kirkwood_setup_cpu_mbus(void);
- +void kirkwood_setup_pcie_io_win(int window, u32 base, u32 size,
- + int maj, int min);
- +void kirkwood_setup_pcie_mem_win(int window, u32 base, u32 size,
- + int maj, int min);
- +
- +void kirkwood_ehci_init(void);
- +void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data);
- +void kirkwood_pcie_init(void);
- +void kirkwood_rtc_init(void);
- +void kirkwood_sata_init(struct mv_sata_platform_data *sata_data);
- +void kirkwood_uart0_init(void);
- +void kirkwood_uart1_init(void);
- +
- +extern struct sys_timer kirkwood_timer;
- +
- +
- +#endif
- --- /dev/null
- +++ b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
- @@ -0,0 +1,68 @@
- +/*
- + * arch/arm/mach-kirkwood/db88f6281-bp-setup.c
- + *
- + * Marvell DB-88F6281-BP Development Board Setup
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/pci.h>
- +#include <linux/irq.h>
- +#include <linux/mtd/physmap.h>
- +#include <linux/mtd/nand.h>
- +#include <linux/timer.h>
- +#include <linux/ata_platform.h>
- +#include <linux/mv643xx_eth.h>
- +#include <asm/mach-types.h>
- +#include <asm/mach/arch.h>
- +#include <asm/mach/pci.h>
- +#include <asm/arch/kirkwood.h>
- +#include "common.h"
- +
- +static struct mv643xx_eth_platform_data db88f6281_ge00_data = {
- + .phy_addr = 8,
- +};
- +
- +static struct mv_sata_platform_data db88f6281_sata_data = {
- + .n_ports = 2,
- +};
- +
- +static void __init db88f6281_init(void)
- +{
- + /*
- + * Basic setup. Needs to be called early.
- + */
- + kirkwood_init();
- +
- + kirkwood_ehci_init();
- + kirkwood_ge00_init(&db88f6281_ge00_data);
- + kirkwood_rtc_init();
- + kirkwood_sata_init(&db88f6281_sata_data);
- + kirkwood_uart0_init();
- + kirkwood_uart1_init();
- +}
- +
- +static int __init db88f6281_pci_init(void)
- +{
- + if (machine_is_db88f6281_bp())
- + kirkwood_pcie_init();
- +
- + return 0;
- +}
- +subsys_initcall(db88f6281_pci_init);
- +
- +MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board")
- + /* Maintainer: Saeed Bishara <[email protected]> */
- + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
- + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
- + .boot_params = 0x00000100,
- + .init_machine = db88f6281_init,
- + .map_io = kirkwood_map_io,
- + .init_irq = kirkwood_init_irq,
- + .timer = &kirkwood_timer,
- +MACHINE_END
- --- /dev/null
- +++ b/arch/arm/mach-kirkwood/irq.c
- @@ -0,0 +1,22 @@
- +/*
- + * arch/arm/mach-kirkwood/irq.c
- + *
- + * Kirkwood IRQ handling.
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/irq.h>
- +#include <linux/io.h>
- +#include <asm/plat-orion/irq.h>
- +#include "common.h"
- +
- +void __init kirkwood_init_irq(void)
- +{
- + orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF));
- + orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF));
- +}
- --- /dev/null
- +++ b/arch/arm/mach-kirkwood/pcie.c
- @@ -0,0 +1,180 @@
- +/*
- + * arch/arm/mach-kirkwood/pcie.c
- + *
- + * PCIe functions for Marvell Kirkwood SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/pci.h>
- +#include <linux/mbus.h>
- +#include <asm/mach/pci.h>
- +#include <asm/plat-orion/pcie.h>
- +#include "common.h"
- +
- +
- +#define PCIE_BASE ((void __iomem *)PCIE_VIRT_BASE)
- +
- +static int pcie_valid_config(int bus, int dev)
- +{
- + /*
- + * Don't go out when trying to access --
- + * 1. nonexisting device on local bus
- + * 2. where there's no device connected (no link)
- + */
- + if (bus == 0 && dev == 0)
- + return 1;
- +
- + if (!orion_pcie_link_up(PCIE_BASE))
- + return 0;
- +
- + if (bus == 0 && dev != 1)
- + return 0;
- +
- + return 1;
- +}
- +
- +
- +/*
- + * PCIe config cycles are done by programming the PCIE_CONF_ADDR register
- + * and then reading the PCIE_CONF_DATA register. Need to make sure these
- + * transactions are atomic.
- + */
- +static DEFINE_SPINLOCK(kirkwood_pcie_lock);
- +
- +static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
- + int size, u32 *val)
- +{
- + unsigned long flags;
- + int ret;
- +
- + if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) {
- + *val = 0xffffffff;
- + return PCIBIOS_DEVICE_NOT_FOUND;
- + }
- +
- + spin_lock_irqsave(&kirkwood_pcie_lock, flags);
- + ret = orion_pcie_rd_conf(PCIE_BASE, bus, devfn, where, size, val);
- + spin_unlock_irqrestore(&kirkwood_pcie_lock, flags);
- +
- + return ret;
- +}
- +
- +static int pcie_wr_conf(struct pci_bus *bus, u32 devfn,
- + int where, int size, u32 val)
- +{
- + unsigned long flags;
- + int ret;
- +
- + if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0)
- + return PCIBIOS_DEVICE_NOT_FOUND;
- +
- + spin_lock_irqsave(&kirkwood_pcie_lock, flags);
- + ret = orion_pcie_wr_conf(PCIE_BASE, bus, devfn, where, size, val);
- + spin_unlock_irqrestore(&kirkwood_pcie_lock, flags);
- +
- + return ret;
- +}
- +
- +static struct pci_ops pcie_ops = {
- + .read = pcie_rd_conf,
- + .write = pcie_wr_conf,
- +};
- +
- +
- +static int kirkwood_pcie_setup(int nr, struct pci_sys_data *sys)
- +{
- + struct resource *res;
- +
- + /*
- + * Generic PCIe unit setup.
- + */
- + orion_pcie_setup(PCIE_BASE, &kirkwood_mbus_dram_info);
- +
- + /*
- + * Request resources.
- + */
- + res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
- + if (!res)
- + panic("pcie_setup unable to alloc resources");
- +
- + /*
- + * IORESOURCE_IO
- + */
- + res[0].name = "PCIe I/O Space";
- + res[0].flags = IORESOURCE_IO;
- + res[0].start = KIRKWOOD_PCIE_IO_PHYS_BASE;
- + res[0].end = res[0].start + KIRKWOOD_PCIE_IO_SIZE - 1;
- + if (request_resource(&ioport_resource, &res[0]))
- + panic("Request PCIe IO resource failed\n");
- + sys->resource[0] = &res[0];
- +
- + /*
- + * IORESOURCE_MEM
- + */
- + res[1].name = "PCIe Memory Space";
- + res[1].flags = IORESOURCE_MEM;
- + res[1].start = KIRKWOOD_PCIE_MEM_PHYS_BASE;
- + res[1].end = res[1].start + KIRKWOOD_PCIE_MEM_SIZE - 1;
- + if (request_resource(&iomem_resource, &res[1]))
- + panic("Request PCIe Memory resource failed\n");
- + sys->resource[1] = &res[1];
- +
- + sys->resource[2] = NULL;
- + sys->io_offset = 0;
- +
- + return 1;
- +}
- +
- +static void __devinit rc_pci_fixup(struct pci_dev *dev)
- +{
- + /*
- + * Prevent enumeration of root complex.
- + */
- + if (dev->bus->parent == NULL && dev->devfn == 0) {
- + int i;
- +
- + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
- + dev->resource[i].start = 0;
- + dev->resource[i].end = 0;
- + dev->resource[i].flags = 0;
- + }
- + }
- +}
- +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup);
- +
- +static struct pci_bus __init *
- +kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys)
- +{
- + struct pci_bus *bus;
- +
- + if (nr == 0) {
- + bus = pci_scan_bus(sys->busnr, &pcie_ops, sys);
- + } else {
- + bus = NULL;
- + BUG();
- + }
- +
- + return bus;
- +}
- +
- +static int __init kirkwood_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
- +{
- + return IRQ_KIRKWOOD_PCIE;
- +}
- +
- +static struct hw_pci kirkwood_pci __initdata = {
- + .nr_controllers = 1,
- + .swizzle = pci_std_swizzle,
- + .setup = kirkwood_pcie_setup,
- + .scan = kirkwood_pcie_scan_bus,
- + .map_irq = kirkwood_pcie_map_irq,
- +};
- +
- +void __init kirkwood_pcie_init(void)
- +{
- + pci_common_init(&kirkwood_pci);
- +}
- --- /dev/null
- +++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
- @@ -0,0 +1,69 @@
- +/*
- + * arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
- + *
- + * Marvell RD-88F6192-NAS Reference Board Setup
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/pci.h>
- +#include <linux/irq.h>
- +#include <linux/mtd/physmap.h>
- +#include <linux/mtd/nand.h>
- +#include <linux/timer.h>
- +#include <linux/ata_platform.h>
- +#include <linux/mv643xx_eth.h>
- +#include <asm/mach-types.h>
- +#include <asm/mach/arch.h>
- +#include <asm/mach/pci.h>
- +#include <asm/arch/kirkwood.h>
- +#include "common.h"
- +
- +#define RD88F6192_GPIO_USB_VBUS 10
- +
- +static struct mv643xx_eth_platform_data rd88f6192_ge00_data = {
- + .phy_addr = 8,
- +};
- +
- +static struct mv_sata_platform_data rd88f6192_sata_data = {
- + .n_ports = 2,
- +};
- +
- +static void __init rd88f6192_init(void)
- +{
- + /*
- + * Basic setup. Needs to be called early.
- + */
- + kirkwood_init();
- +
- + kirkwood_ehci_init();
- + kirkwood_ge00_init(&rd88f6192_ge00_data);
- + kirkwood_rtc_init();
- + kirkwood_sata_init(&rd88f6192_sata_data);
- + kirkwood_uart0_init();
- +}
- +
- +static int __init rd88f6192_pci_init(void)
- +{
- + if (machine_is_rd88f6192_nas())
- + kirkwood_pcie_init();
- +
- + return 0;
- +}
- +subsys_initcall(rd88f6192_pci_init);
- +
- +MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board")
- + /* Maintainer: Saeed Bishara <[email protected]> */
- + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
- + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
- + .boot_params = 0x00000100,
- + .init_machine = rd88f6192_init,
- + .map_io = kirkwood_map_io,
- + .init_irq = kirkwood_init_irq,
- + .timer = &kirkwood_timer,
- +MACHINE_END
- --- /dev/null
- +++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c
- @@ -0,0 +1,112 @@
- +/*
- + * arch/arm/mach-kirkwood/rd88f6281-setup.c
- + *
- + * Marvell RD-88F6281 Reference Board Setup
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/pci.h>
- +#include <linux/irq.h>
- +#include <linux/mtd/physmap.h>
- +#include <linux/mtd/nand.h>
- +#include <linux/timer.h>
- +#include <linux/ata_platform.h>
- +#include <linux/mv643xx_eth.h>
- +#include <asm/mach-types.h>
- +#include <asm/mach/arch.h>
- +#include <asm/mach/pci.h>
- +#include <asm/arch/kirkwood.h>
- +#include <asm/plat-orion/orion_nand.h>
- +#include "common.h"
- +
- +static struct mtd_partition rd88f6281_nand_parts[] = {
- + {
- + .name = "u-boot",
- + .offset = 0,
- + .size = SZ_1M
- + }, {
- + .name = "uImage",
- + .offset = MTDPART_OFS_NXTBLK,
- + .size = SZ_2M
- + }, {
- + .name = "root",
- + .offset = MTDPART_OFS_NXTBLK,
- + .size = MTDPART_SIZ_FULL
- + },
- +};
- +
- +static struct resource rd88f6281_nand_resource = {
- + .flags = IORESOURCE_MEM,
- + .start = KIRKWOOD_NAND_MEM_PHYS_BASE,
- + .end = KIRKWOOD_NAND_MEM_PHYS_BASE +
- + KIRKWOOD_NAND_MEM_SIZE - 1,
- +};
- +
- +static struct orion_nand_data rd88f6281_nand_data = {
- + .parts = rd88f6281_nand_parts,
- + .nr_parts = ARRAY_SIZE(rd88f6281_nand_parts),
- + .cle = 0,
- + .ale = 1,
- + .width = 8,
- +};
- +
- +static struct platform_device rd88f6281_nand_flash = {
- + .name = "orion_nand",
- + .id = -1,
- + .dev = {
- + .platform_data = &rd88f6281_nand_data,
- + },
- + .resource = &rd88f6281_nand_resource,
- + .num_resources = 1,
- +};
- +
- +static struct mv643xx_eth_platform_data rd88f6281_ge00_data = {
- + .phy_addr = -1,
- +};
- +
- +static struct mv_sata_platform_data rd88f6281_sata_data = {
- + .n_ports = 2,
- +};
- +
- +static void __init rd88f6281_init(void)
- +{
- + /*
- + * Basic setup. Needs to be called early.
- + */
- + kirkwood_init();
- +
- + kirkwood_ehci_init();
- + kirkwood_ge00_init(&rd88f6281_ge00_data);
- + kirkwood_rtc_init();
- + kirkwood_sata_init(&rd88f6281_sata_data);
- + kirkwood_uart0_init();
- + kirkwood_uart1_init();
- +
- + platform_device_register(&rd88f6281_nand_flash);
- +}
- +
- +static int __init rd88f6281_pci_init(void)
- +{
- + if (machine_is_rd88f6281())
- + kirkwood_pcie_init();
- +
- + return 0;
- +}
- +subsys_initcall(rd88f6281_pci_init);
- +
- +MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board")
- + /* Maintainer: Saeed Bishara <[email protected]> */
- + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
- + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
- + .boot_params = 0x00000100,
- + .init_machine = rd88f6281_init,
- + .map_io = kirkwood_map_io,
- + .init_irq = kirkwood_init_irq,
- + .timer = &kirkwood_timer,
- +MACHINE_END
- --- /dev/null
- +++ b/arch/arm/mach-loki/Kconfig
- @@ -0,0 +1,13 @@
- +if ARCH_LOKI
- +
- +menu "Marvell Loki (88RC8480) Implementations"
- +
- +config MACH_LB88RC8480
- + bool "Marvell LB88RC8480 Development Board"
- + help
- + Say 'Y' here if you want your kernel to support the
- + Marvell LB88RC8480 Development Board.
- +
- +endmenu
- +
- +endif
- --- /dev/null
- +++ b/arch/arm/mach-loki/Makefile
- @@ -0,0 +1,3 @@
- +obj-y += common.o addr-map.o irq.o
- +
- +obj-$(CONFIG_MACH_LB88RC8480) += lb88rc8480-setup.o
- --- /dev/null
- +++ b/arch/arm/mach-loki/Makefile.boot
- @@ -0,0 +1,3 @@
- + zreladdr-y := 0x00008000
- +params_phys-y := 0x00000100
- +initrd_phys-y := 0x00800000
- --- /dev/null
- +++ b/arch/arm/mach-loki/addr-map.c
- @@ -0,0 +1,121 @@
- +/*
- + * arch/arm/mach-loki/addr-map.c
- + *
- + * Address map functions for Marvell Loki (88RC8480) SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/mbus.h>
- +#include <asm/hardware.h>
- +#include <asm/io.h>
- +#include "common.h"
- +
- +/*
- + * Generic Address Decode Windows bit settings
- + */
- +#define TARGET_DDR 0
- +#define TARGET_DEV_BUS 1
- +#define TARGET_PCIE0 3
- +#define TARGET_PCIE1 4
- +#define ATTR_DEV_BOOT 0x0f
- +#define ATTR_DEV_CS2 0x1b
- +#define ATTR_DEV_CS1 0x1d
- +#define ATTR_DEV_CS0 0x1e
- +#define ATTR_PCIE_IO 0x51
- +#define ATTR_PCIE_MEM 0x59
- +
- +/*
- + * Helpers to get DDR bank info
- + */
- +#define DDR_SIZE_CS(n) DDR_REG(0x1500 + ((n) << 3))
- +#define DDR_BASE_CS(n) DDR_REG(0x1504 + ((n) << 3))
- +
- +/*
- + * CPU Address Decode Windows registers
- + */
- +#define CPU_WIN_CTRL(n) BRIDGE_REG(0x000 | ((n) << 4))
- +#define CPU_WIN_BASE(n) BRIDGE_REG(0x004 | ((n) << 4))
- +#define CPU_WIN_REMAP_LO(n) BRIDGE_REG(0x008 | ((n) << 4))
- +#define CPU_WIN_REMAP_HI(n) BRIDGE_REG(0x00c | ((n) << 4))
- +
- +
- +struct mbus_dram_target_info loki_mbus_dram_info;
- +
- +static void __init setup_cpu_win(int win, u32 base, u32 size,
- + u8 target, u8 attr, int remap)
- +{
- + u32 ctrl;
- +
- + base &= 0xffff0000;
- + ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (1 << 5) | target;
- +
- + writel(base, CPU_WIN_BASE(win));
- + writel(ctrl, CPU_WIN_CTRL(win));
- + if (win < 2) {
- + if (remap < 0)
- + remap = base;
- +
- + writel(remap & 0xffff0000, CPU_WIN_REMAP_LO(win));
- + writel(0, CPU_WIN_REMAP_HI(win));
- + }
- +}
- +
- +void __init loki_setup_cpu_mbus(void)
- +{
- + int i;
- + int cs;
- +
- + /*
- + * First, disable and clear windows.
- + */
- + for (i = 0; i < 8; i++) {
- + writel(0, CPU_WIN_BASE(i));
- + writel(0, CPU_WIN_CTRL(i));
- + if (i < 2) {
- + writel(0, CPU_WIN_REMAP_LO(i));
- + writel(0, CPU_WIN_REMAP_HI(i));
- + }
- + }
- +
- + /*
- + * Setup windows for PCIe IO+MEM space.
- + */
- + setup_cpu_win(2, LOKI_PCIE0_MEM_PHYS_BASE, LOKI_PCIE0_MEM_SIZE,
- + TARGET_PCIE0, ATTR_PCIE_MEM, -1);
- + setup_cpu_win(3, LOKI_PCIE1_MEM_PHYS_BASE, LOKI_PCIE1_MEM_SIZE,
- + TARGET_PCIE1, ATTR_PCIE_MEM, -1);
- +
- + /*
- + * Setup MBUS dram target info.
- + */
- + loki_mbus_dram_info.mbus_dram_target_id = TARGET_DDR;
- +
- + for (i = 0, cs = 0; i < 4; i++) {
- + u32 base = readl(DDR_BASE_CS(i));
- + u32 size = readl(DDR_SIZE_CS(i));
- +
- + /*
- + * Chip select enabled?
- + */
- + if (size & 1) {
- + struct mbus_dram_window *w;
- +
- + w = &loki_mbus_dram_info.cs[cs++];
- + w->cs_index = i;
- + w->mbus_attr = 0xf & ~(1 << i);
- + w->base = base & 0xffff0000;
- + w->size = (size | 0x0000ffff) + 1;
- + }
- + }
- + loki_mbus_dram_info.num_cs = cs;
- +}
- +
- +void __init loki_setup_dev_boot_win(u32 base, u32 size)
- +{
- + setup_cpu_win(4, base, size, TARGET_DEV_BUS, ATTR_DEV_BOOT, -1);
- +}
- --- /dev/null
- +++ b/arch/arm/mach-loki/common.c
- @@ -0,0 +1,305 @@
- +/*
- + * arch/arm/mach-loki/common.c
- + *
- + * Core functions for Marvell Loki (88RC8480) SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/serial_8250.h>
- +#include <linux/mbus.h>
- +#include <linux/mv643xx_eth.h>
- +#include <asm/page.h>
- +#include <asm/timex.h>
- +#include <asm/mach/map.h>
- +#include <asm/mach/time.h>
- +#include <asm/arch/loki.h>
- +#include <asm/plat-orion/orion_nand.h>
- +#include <asm/plat-orion/time.h>
- +#include "common.h"
- +
- +/*****************************************************************************
- + * I/O Address Mapping
- + ****************************************************************************/
- +static struct map_desc loki_io_desc[] __initdata = {
- + {
- + .virtual = LOKI_REGS_VIRT_BASE,
- + .pfn = __phys_to_pfn(LOKI_REGS_PHYS_BASE),
- + .length = LOKI_REGS_SIZE,
- + .type = MT_DEVICE,
- + },
- +};
- +
- +void __init loki_map_io(void)
- +{
- + iotable_init(loki_io_desc, ARRAY_SIZE(loki_io_desc));
- +}
- +
- +
- +/*****************************************************************************
- + * GE0
- + ****************************************************************************/
- +struct mv643xx_eth_shared_platform_data loki_ge0_shared_data = {
- + .t_clk = LOKI_TCLK,
- + .dram = &loki_mbus_dram_info,
- +};
- +
- +static struct resource loki_ge0_shared_resources[] = {
- + {
- + .name = "ge0 base",
- + .start = GE0_PHYS_BASE + 0x2000,
- + .end = GE0_PHYS_BASE + 0x3fff,
- + .flags = IORESOURCE_MEM,
- + },
- +};
- +
- +static struct platform_device loki_ge0_shared = {
- + .name = MV643XX_ETH_SHARED_NAME,
- + .id = 0,
- + .dev = {
- + .platform_data = &loki_ge0_shared_data,
- + },
- + .num_resources = 1,
- + .resource = loki_ge0_shared_resources,
- +};
- +
- +static struct resource loki_ge0_resources[] = {
- + {
- + .name = "ge0 irq",
- + .start = IRQ_LOKI_GBE_A_INT,
- + .end = IRQ_LOKI_GBE_A_INT,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device loki_ge0 = {
- + .name = MV643XX_ETH_NAME,
- + .id = 0,
- + .num_resources = 1,
- + .resource = loki_ge0_resources,
- +};
- +
- +void __init loki_ge0_init(struct mv643xx_eth_platform_data *eth_data)
- +{
- + eth_data->shared = &loki_ge0_shared;
- + loki_ge0.dev.platform_data = eth_data;
- +
- + writel(0x00079220, GE0_VIRT_BASE + 0x20b0);
- + platform_device_register(&loki_ge0_shared);
- + platform_device_register(&loki_ge0);
- +}
- +
- +
- +/*****************************************************************************
- + * GE1
- + ****************************************************************************/
- +struct mv643xx_eth_shared_platform_data loki_ge1_shared_data = {
- + .t_clk = LOKI_TCLK,
- + .dram = &loki_mbus_dram_info,
- +};
- +
- +static struct resource loki_ge1_shared_resources[] = {
- + {
- + .name = "ge1 base",
- + .start = GE1_PHYS_BASE + 0x2000,
- + .end = GE1_PHYS_BASE + 0x3fff,
- + .flags = IORESOURCE_MEM,
- + },
- +};
- +
- +static struct platform_device loki_ge1_shared = {
- + .name = MV643XX_ETH_SHARED_NAME,
- + .id = 1,
- + .dev = {
- + .platform_data = &loki_ge1_shared_data,
- + },
- + .num_resources = 1,
- + .resource = loki_ge1_shared_resources,
- +};
- +
- +static struct resource loki_ge1_resources[] = {
- + {
- + .name = "ge1 irq",
- + .start = IRQ_LOKI_GBE_B_INT,
- + .end = IRQ_LOKI_GBE_B_INT,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device loki_ge1 = {
- + .name = MV643XX_ETH_NAME,
- + .id = 1,
- + .num_resources = 1,
- + .resource = loki_ge1_resources,
- +};
- +
- +void __init loki_ge1_init(struct mv643xx_eth_platform_data *eth_data)
- +{
- + eth_data->shared = &loki_ge1_shared;
- + loki_ge1.dev.platform_data = eth_data;
- +
- + writel(0x00079220, GE1_VIRT_BASE + 0x20b0);
- + platform_device_register(&loki_ge1_shared);
- + platform_device_register(&loki_ge1);
- +}
- +
- +
- +/*****************************************************************************
- + * SAS/SATA
- + ****************************************************************************/
- +static struct resource loki_sas_resources[] = {
- + {
- + .name = "mvsas0 mem",
- + .start = SAS0_PHYS_BASE,
- + .end = SAS0_PHYS_BASE + 0x01ff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .name = "mvsas0 irq",
- + .start = IRQ_LOKI_SAS_A,
- + .end = IRQ_LOKI_SAS_A,
- + .flags = IORESOURCE_IRQ,
- + }, {
- + .name = "mvsas1 mem",
- + .start = SAS1_PHYS_BASE,
- + .end = SAS1_PHYS_BASE + 0x01ff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .name = "mvsas1 irq",
- + .start = IRQ_LOKI_SAS_B,
- + .end = IRQ_LOKI_SAS_B,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device loki_sas = {
- + .name = "mvsas",
- + .id = 0,
- + .dev = {
- + .coherent_dma_mask = 0xffffffff,
- + },
- + .num_resources = ARRAY_SIZE(loki_sas_resources),
- + .resource = loki_sas_resources,
- +};
- +
- +void __init loki_sas_init(void)
- +{
- + writel(0x8300f707, DDR_REG(0x1424));
- + platform_device_register(&loki_sas);
- +}
- +
- +
- +/*****************************************************************************
- + * UART0
- + ****************************************************************************/
- +static struct plat_serial8250_port loki_uart0_data[] = {
- + {
- + .mapbase = UART0_PHYS_BASE,
- + .membase = (char *)UART0_VIRT_BASE,
- + .irq = IRQ_LOKI_UART0,
- + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
- + .iotype = UPIO_MEM,
- + .regshift = 2,
- + .uartclk = LOKI_TCLK,
- + }, {
- + },
- +};
- +
- +static struct resource loki_uart0_resources[] = {
- + {
- + .start = UART0_PHYS_BASE,
- + .end = UART0_PHYS_BASE + 0xff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_LOKI_UART0,
- + .end = IRQ_LOKI_UART0,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device loki_uart0 = {
- + .name = "serial8250",
- + .id = 0,
- + .dev = {
- + .platform_data = loki_uart0_data,
- + },
- + .resource = loki_uart0_resources,
- + .num_resources = ARRAY_SIZE(loki_uart0_resources),
- +};
- +
- +void __init loki_uart0_init(void)
- +{
- + platform_device_register(&loki_uart0);
- +}
- +
- +
- +/*****************************************************************************
- + * UART1
- + ****************************************************************************/
- +static struct plat_serial8250_port loki_uart1_data[] = {
- + {
- + .mapbase = UART1_PHYS_BASE,
- + .membase = (char *)UART1_VIRT_BASE,
- + .irq = IRQ_LOKI_UART1,
- + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
- + .iotype = UPIO_MEM,
- + .regshift = 2,
- + .uartclk = LOKI_TCLK,
- + }, {
- + },
- +};
- +
- +static struct resource loki_uart1_resources[] = {
- + {
- + .start = UART1_PHYS_BASE,
- + .end = UART1_PHYS_BASE + 0xff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_LOKI_UART1,
- + .end = IRQ_LOKI_UART1,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device loki_uart1 = {
- + .name = "serial8250",
- + .id = 1,
- + .dev = {
- + .platform_data = loki_uart1_data,
- + },
- + .resource = loki_uart1_resources,
- + .num_resources = ARRAY_SIZE(loki_uart1_resources),
- +};
- +
- +void __init loki_uart1_init(void)
- +{
- + platform_device_register(&loki_uart1);
- +}
- +
- +
- +/*****************************************************************************
- + * Time handling
- + ****************************************************************************/
- +static void loki_timer_init(void)
- +{
- + orion_time_init(IRQ_LOKI_BRIDGE, LOKI_TCLK);
- +}
- +
- +struct sys_timer loki_timer = {
- + .init = loki_timer_init,
- +};
- +
- +
- +/*****************************************************************************
- + * General
- + ****************************************************************************/
- +void __init loki_init(void)
- +{
- + printk(KERN_INFO "Loki ID: 88RC8480. TCLK=%d.\n", LOKI_TCLK);
- +
- + loki_setup_cpu_mbus();
- +}
- --- /dev/null
- +++ b/arch/arm/mach-loki/common.h
- @@ -0,0 +1,36 @@
- +/*
- + * arch/arm/mach-loki/common.h
- + *
- + * Core functions for Marvell Loki (88RC8480) SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ARCH_LOKI_COMMON_H
- +#define __ARCH_LOKI_COMMON_H
- +
- +struct mv643xx_eth_platform_data;
- +
- +/*
- + * Basic Loki init functions used early by machine-setup.
- + */
- +void loki_map_io(void);
- +void loki_init(void);
- +void loki_init_irq(void);
- +
- +extern struct mbus_dram_target_info loki_mbus_dram_info;
- +void loki_setup_cpu_mbus(void);
- +void loki_setup_dev_boot_win(u32 base, u32 size);
- +
- +void loki_ge0_init(struct mv643xx_eth_platform_data *eth_data);
- +void loki_ge1_init(struct mv643xx_eth_platform_data *eth_data);
- +void loki_sas_init(void);
- +void loki_uart0_init(void);
- +void loki_uart1_init(void);
- +
- +extern struct sys_timer loki_timer;
- +
- +
- +#endif
- --- /dev/null
- +++ b/arch/arm/mach-loki/irq.c
- @@ -0,0 +1,21 @@
- +/*
- + * arch/arm/mach-loki/irq.c
- + *
- + * Marvell Loki (88RC8480) IRQ handling.
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/irq.h>
- +#include <asm/io.h>
- +#include <asm/plat-orion/irq.h>
- +#include "common.h"
- +
- +void __init loki_init_irq(void)
- +{
- + orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_OFF));
- +}
- --- /dev/null
- +++ b/arch/arm/mach-loki/lb88rc8480-setup.c
- @@ -0,0 +1,100 @@
- +/*
- + * arch/arm/mach-loki/lb88rc8480-setup.c
- + *
- + * Marvell LB88RC8480 Development Board Setup
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/irq.h>
- +#include <linux/mtd/physmap.h>
- +#include <linux/mtd/nand.h>
- +#include <linux/timer.h>
- +#include <linux/ata_platform.h>
- +#include <linux/mv643xx_eth.h>
- +#include <asm/mach-types.h>
- +#include <asm/mach/arch.h>
- +#include <asm/arch/loki.h>
- +#include "common.h"
- +
- +#define LB88RC8480_FLASH_BOOT_CS_BASE 0xf8000000
- +#define LB88RC8480_FLASH_BOOT_CS_SIZE SZ_128M
- +
- +#define LB88RC8480_NOR_BOOT_BASE 0xff000000
- +#define LB88RC8480_NOR_BOOT_SIZE SZ_16M
- +
- +static struct mtd_partition lb88rc8480_boot_flash_parts[] = {
- + {
- + .name = "kernel",
- + .offset = 0,
- + .size = SZ_2M,
- + }, {
- + .name = "root-fs",
- + .offset = SZ_2M,
- + .size = (SZ_8M + SZ_4M + SZ_1M),
- + }, {
- + .name = "u-boot",
- + .offset = (SZ_8M + SZ_4M + SZ_2M + SZ_1M),
- + .size = SZ_1M,
- + },
- +};
- +
- +static struct physmap_flash_data lb88rc8480_boot_flash_data = {
- + .parts = lb88rc8480_boot_flash_parts,
- + .nr_parts = ARRAY_SIZE(lb88rc8480_boot_flash_parts),
- + .width = 1, /* 8 bit bus width */
- +};
- +
- +static struct resource lb88rc8480_boot_flash_resource = {
- + .flags = IORESOURCE_MEM,
- + .start = LB88RC8480_NOR_BOOT_BASE,
- + .end = LB88RC8480_NOR_BOOT_BASE + LB88RC8480_NOR_BOOT_SIZE - 1,
- +};
- +
- +static struct platform_device lb88rc8480_boot_flash = {
- + .name = "physmap-flash",
- + .id = 0,
- + .dev = {
- + .platform_data = &lb88rc8480_boot_flash_data,
- + },
- + .num_resources = 1,
- + .resource = &lb88rc8480_boot_flash_resource,
- +};
- +
- +static struct mv643xx_eth_platform_data lb88rc8480_ge0_data = {
- + .phy_addr = 1,
- + .mac_addr = { 0x00, 0x50, 0x43, 0x11, 0x22, 0x33 },
- +};
- +
- +static void __init lb88rc8480_init(void)
- +{
- + /*
- + * Basic setup. Needs to be called early.
- + */
- + loki_init();
- +
- + loki_ge0_init(&lb88rc8480_ge0_data);
- + loki_sas_init();
- + loki_uart0_init();
- + loki_uart1_init();
- +
- + loki_setup_dev_boot_win(LB88RC8480_FLASH_BOOT_CS_BASE,
- + LB88RC8480_FLASH_BOOT_CS_SIZE);
- + platform_device_register(&lb88rc8480_boot_flash);
- +}
- +
- +MACHINE_START(LB88RC8480, "Marvell LB88RC8480 Development Board")
- + /* Maintainer: Ke Wei <[email protected]> */
- + .phys_io = LOKI_REGS_PHYS_BASE,
- + .io_pg_offst = ((LOKI_REGS_VIRT_BASE) >> 18) & 0xfffc,
- + .boot_params = 0x00000100,
- + .init_machine = lb88rc8480_init,
- + .map_io = loki_map_io,
- + .init_irq = loki_init_irq,
- + .timer = &loki_timer,
- +MACHINE_END
- --- /dev/null
- +++ b/arch/arm/mach-mv78xx0/Kconfig
- @@ -0,0 +1,13 @@
- +if ARCH_MV78XX0
- +
- +menu "Marvell MV78xx0 Implementations"
- +
- +config MACH_DB78X00_BP
- + bool "Marvell DB-78x00-BP Development Board"
- + help
- + Say 'Y' here if you want your kernel to support the
- + Marvell DB-78x00-BP Development Board.
- +
- +endmenu
- +
- +endif
- --- /dev/null
- +++ b/arch/arm/mach-mv78xx0/Makefile
- @@ -0,0 +1,2 @@
- +obj-y += common.o addr-map.o irq.o pcie.o
- +obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o
- --- /dev/null
- +++ b/arch/arm/mach-mv78xx0/Makefile.boot
- @@ -0,0 +1,3 @@
- + zreladdr-y := 0x00008000
- +params_phys-y := 0x00000100
- +initrd_phys-y := 0x00800000
- --- /dev/null
- +++ b/arch/arm/mach-mv78xx0/addr-map.c
- @@ -0,0 +1,156 @@
- +/*
- + * arch/arm/mach-mv78xx0/addr-map.c
- + *
- + * Address map functions for Marvell MV78xx0 SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/mbus.h>
- +#include <asm/io.h>
- +#include "common.h"
- +
- +/*
- + * Generic Address Decode Windows bit settings
- + */
- +#define TARGET_DDR 0
- +#define TARGET_DEV_BUS 1
- +#define TARGET_PCIE0 4
- +#define TARGET_PCIE1 8
- +#define TARGET_PCIE(i) ((i) ? TARGET_PCIE1 : TARGET_PCIE0)
- +#define ATTR_DEV_SPI_ROM 0x1f
- +#define ATTR_DEV_BOOT 0x2f
- +#define ATTR_DEV_CS3 0x37
- +#define ATTR_DEV_CS2 0x3b
- +#define ATTR_DEV_CS1 0x3d
- +#define ATTR_DEV_CS0 0x3e
- +#define ATTR_PCIE_IO(l) (0xf0 & ~(0x10 << (l)))
- +#define ATTR_PCIE_MEM(l) (0xf8 & ~(0x10 << (l)))
- +
- +/*
- + * Helpers to get DDR bank info
- + */
- +#define DDR_BASE_CS_OFF(n) (0x0000 + ((n) << 3))
- +#define DDR_SIZE_CS_OFF(n) (0x0004 + ((n) << 3))
- +
- +/*
- + * CPU Address Decode Windows registers
- + */
- +#define WIN0_OFF(n) (BRIDGE_VIRT_BASE + 0x0000 + ((n) << 4))
- +#define WIN8_OFF(n) (BRIDGE_VIRT_BASE + 0x0900 + (((n) - 8) << 4))
- +#define WIN_CTRL_OFF 0x0000
- +#define WIN_BASE_OFF 0x0004
- +#define WIN_REMAP_LO_OFF 0x0008
- +#define WIN_REMAP_HI_OFF 0x000c
- +
- +
- +struct mbus_dram_target_info mv78xx0_mbus_dram_info;
- +
- +static void __init __iomem *win_cfg_base(int win)
- +{
- + /*
- + * Find the control register base address for this window.
- + *
- + * BRIDGE_VIRT_BASE points to the right (CPU0's or CPU1's)
- + * MBUS bridge depending on which CPU core we're running on,
- + * so we don't need to take that into account here.
- + */
- +
- + return (void __iomem *)((win < 8) ? WIN0_OFF(win) : WIN8_OFF(win));
- +}
- +
- +static int __init cpu_win_can_remap(int win)
- +{
- + if (win < 8)
- + return 1;
- +
- + return 0;
- +}
- +
- +static void __init setup_cpu_win(int win, u32 base, u32 size,
- + u8 target, u8 attr, int remap)
- +{
- + void __iomem *addr = win_cfg_base(win);
- + u32 ctrl;
- +
- + base &= 0xffff0000;
- + ctrl = ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1;
- +
- + writel(base, addr + WIN_BASE_OFF);
- + writel(ctrl, addr + WIN_CTRL_OFF);
- + if (cpu_win_can_remap(win)) {
- + if (remap < 0)
- + remap = base;
- +
- + writel(remap & 0xffff0000, addr + WIN_REMAP_LO_OFF);
- + writel(0, addr + WIN_REMAP_HI_OFF);
- + }
- +}
- +
- +void __init mv78xx0_setup_cpu_mbus(void)
- +{
- + void __iomem *addr;
- + int i;
- + int cs;
- +
- + /*
- + * First, disable and clear windows.
- + */
- + for (i = 0; i < 14; i++) {
- + addr = win_cfg_base(i);
- +
- + writel(0, addr + WIN_BASE_OFF);
- + writel(0, addr + WIN_CTRL_OFF);
- + if (cpu_win_can_remap(i)) {
- + writel(0, addr + WIN_REMAP_LO_OFF);
- + writel(0, addr + WIN_REMAP_HI_OFF);
- + }
- + }
- +
- + /*
- + * Setup MBUS dram target info.
- + */
- + mv78xx0_mbus_dram_info.mbus_dram_target_id = TARGET_DDR;
- +
- + if (mv78xx0_core_index() == 0)
- + addr = (void __iomem *)DDR_WINDOW_CPU0_BASE;
- + else
- + addr = (void __iomem *)DDR_WINDOW_CPU1_BASE;
- +
- + for (i = 0, cs = 0; i < 4; i++) {
- + u32 base = readl(addr + DDR_BASE_CS_OFF(i));
- + u32 size = readl(addr + DDR_SIZE_CS_OFF(i));
- +
- + /*
- + * Chip select enabled?
- + */
- + if (size & 1) {
- + struct mbus_dram_window *w;
- +
- + w = &mv78xx0_mbus_dram_info.cs[cs++];
- + w->cs_index = i;
- + w->mbus_attr = 0xf & ~(1 << i);
- + w->base = base & 0xffff0000;
- + w->size = (size | 0x0000ffff) + 1;
- + }
- + }
- + mv78xx0_mbus_dram_info.num_cs = cs;
- +}
- +
- +void __init mv78xx0_setup_pcie_io_win(int window, u32 base, u32 size,
- + int maj, int min)
- +{
- + setup_cpu_win(window, base, size, TARGET_PCIE(maj),
- + ATTR_PCIE_IO(min), -1);
- +}
- +
- +void __init mv78xx0_setup_pcie_mem_win(int window, u32 base, u32 size,
- + int maj, int min)
- +{
- + setup_cpu_win(window, base, size, TARGET_PCIE(maj),
- + ATTR_PCIE_MEM(min), -1);
- +}
- --- /dev/null
- +++ b/arch/arm/mach-mv78xx0/common.c
- @@ -0,0 +1,754 @@
- +/*
- + * arch/arm/mach-mv78xx0/common.c
- + *
- + * Core functions for Marvell MV78xx0 SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/serial_8250.h>
- +#include <linux/mbus.h>
- +#include <linux/mv643xx_eth.h>
- +#include <linux/ata_platform.h>
- +#include <asm/mach/map.h>
- +#include <asm/mach/time.h>
- +#include <asm/arch/mv78xx0.h>
- +#include <asm/plat-orion/cache-feroceon-l2.h>
- +#include <asm/plat-orion/ehci-orion.h>
- +#include <asm/plat-orion/orion_nand.h>
- +#include <asm/plat-orion/time.h>
- +#include "common.h"
- +
- +
- +/*****************************************************************************
- + * Common bits
- + ****************************************************************************/
- +int mv78xx0_core_index(void)
- +{
- + u32 extra;
- +
- + /*
- + * Read Extra Features register.
- + */
- + __asm__("mrc p15, 1, %0, c15, c1, 0" : "=r" (extra));
- +
- + return !!(extra & 0x00004000);
- +}
- +
- +static int get_hclk(void)
- +{
- + int hclk;
- +
- + /*
- + * HCLK tick rate is configured by DEV_D[7:5] pins.
- + */
- + switch ((readl(SAMPLE_AT_RESET_LOW) >> 5) & 7) {
- + case 0:
- + hclk = 166666667;
- + break;
- + case 1:
- + hclk = 200000000;
- + break;
- + case 2:
- + hclk = 266666667;
- + break;
- + case 3:
- + hclk = 333333333;
- + break;
- + case 4:
- + hclk = 400000000;
- + break;
- + default:
- + panic("unknown HCLK PLL setting: %.8x\n",
- + readl(SAMPLE_AT_RESET_LOW));
- + }
- +
- + return hclk;
- +}
- +
- +static void get_pclk_l2clk(int hclk, int core_index, int *pclk, int *l2clk)
- +{
- + u32 cfg;
- +
- + /*
- + * Core #0 PCLK/L2CLK is configured by bits [13:8], core #1
- + * PCLK/L2CLK by bits [19:14].
- + */
- + if (core_index == 0) {
- + cfg = (readl(SAMPLE_AT_RESET_LOW) >> 8) & 0x3f;
- + } else {
- + cfg = (readl(SAMPLE_AT_RESET_LOW) >> 14) & 0x3f;
- + }
- +
- + /*
- + * Bits [11:8] ([17:14] for core #1) configure the PCLK:HCLK
- + * ratio (1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6).
- + */
- + *pclk = ((u64)hclk * (2 + (cfg & 0xf))) >> 1;
- +
- + /*
- + * Bits [13:12] ([19:18] for core #1) configure the PCLK:L2CLK
- + * ratio (1, 2, 3).
- + */
- + *l2clk = *pclk / (((cfg >> 4) & 3) + 1);
- +}
- +
- +static int get_tclk(void)
- +{
- + int tclk;
- +
- + /*
- + * TCLK tick rate is configured by DEV_A[2:0] strap pins.
- + */
- + switch ((readl(SAMPLE_AT_RESET_HIGH) >> 6) & 7) {
- + case 1:
- + tclk = 166666667;
- + break;
- + case 3:
- + tclk = 200000000;
- + break;
- + default:
- + panic("unknown TCLK PLL setting: %.8x\n",
- + readl(SAMPLE_AT_RESET_HIGH));
- + }
- +
- + return tclk;
- +}
- +
- +
- +/*****************************************************************************
- + * I/O Address Mapping
- + ****************************************************************************/
- +static struct map_desc mv78xx0_io_desc[] __initdata = {
- + {
- + .virtual = MV78XX0_CORE_REGS_VIRT_BASE,
- + .pfn = 0,
- + .length = MV78XX0_CORE_REGS_SIZE,
- + .type = MT_DEVICE,
- + }, {
- + .virtual = MV78XX0_PCIE_IO_VIRT_BASE(0),
- + .pfn = __phys_to_pfn(MV78XX0_PCIE_IO_PHYS_BASE(0)),
- + .length = MV78XX0_PCIE_IO_SIZE * 8,
- + .type = MT_DEVICE,
- + }, {
- + .virtual = MV78XX0_REGS_VIRT_BASE,
- + .pfn = __phys_to_pfn(MV78XX0_REGS_PHYS_BASE),
- + .length = MV78XX0_REGS_SIZE,
- + .type = MT_DEVICE,
- + },
- +};
- +
- +void __init mv78xx0_map_io(void)
- +{
- + unsigned long phys;
- +
- + /*
- + * Map the right set of per-core registers depending on
- + * which core we are running on.
- + */
- + if (mv78xx0_core_index() == 0) {
- + phys = MV78XX0_CORE0_REGS_PHYS_BASE;
- + } else {
- + phys = MV78XX0_CORE1_REGS_PHYS_BASE;
- + }
- + mv78xx0_io_desc[0].pfn = __phys_to_pfn(phys);
- +
- + iotable_init(mv78xx0_io_desc, ARRAY_SIZE(mv78xx0_io_desc));
- +}
- +
- +
- +/*****************************************************************************
- + * EHCI
- + ****************************************************************************/
- +static struct orion_ehci_data mv78xx0_ehci_data = {
- + .dram = &mv78xx0_mbus_dram_info,
- +};
- +
- +static u64 ehci_dmamask = 0xffffffffUL;
- +
- +
- +/*****************************************************************************
- + * EHCI0
- + ****************************************************************************/
- +static struct resource mv78xx0_ehci0_resources[] = {
- + {
- + .start = USB0_PHYS_BASE,
- + .end = USB0_PHYS_BASE + 0x0fff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_MV78XX0_USB_0,
- + .end = IRQ_MV78XX0_USB_0,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device mv78xx0_ehci0 = {
- + .name = "orion-ehci",
- + .id = 0,
- + .dev = {
- + .dma_mask = &ehci_dmamask,
- + .coherent_dma_mask = 0xffffffff,
- + .platform_data = &mv78xx0_ehci_data,
- + },
- + .resource = mv78xx0_ehci0_resources,
- + .num_resources = ARRAY_SIZE(mv78xx0_ehci0_resources),
- +};
- +
- +void __init mv78xx0_ehci0_init(void)
- +{
- + platform_device_register(&mv78xx0_ehci0);
- +}
- +
- +
- +/*****************************************************************************
- + * EHCI1
- + ****************************************************************************/
- +static struct resource mv78xx0_ehci1_resources[] = {
- + {
- + .start = USB1_PHYS_BASE,
- + .end = USB1_PHYS_BASE + 0x0fff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_MV78XX0_USB_1,
- + .end = IRQ_MV78XX0_USB_1,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device mv78xx0_ehci1 = {
- + .name = "orion-ehci",
- + .id = 1,
- + .dev = {
- + .dma_mask = &ehci_dmamask,
- + .coherent_dma_mask = 0xffffffff,
- + .platform_data = &mv78xx0_ehci_data,
- + },
- + .resource = mv78xx0_ehci1_resources,
- + .num_resources = ARRAY_SIZE(mv78xx0_ehci1_resources),
- +};
- +
- +void __init mv78xx0_ehci1_init(void)
- +{
- + platform_device_register(&mv78xx0_ehci1);
- +}
- +
- +
- +/*****************************************************************************
- + * EHCI2
- + ****************************************************************************/
- +static struct resource mv78xx0_ehci2_resources[] = {
- + {
- + .start = USB2_PHYS_BASE,
- + .end = USB2_PHYS_BASE + 0x0fff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_MV78XX0_USB_2,
- + .end = IRQ_MV78XX0_USB_2,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device mv78xx0_ehci2 = {
- + .name = "orion-ehci",
- + .id = 2,
- + .dev = {
- + .dma_mask = &ehci_dmamask,
- + .coherent_dma_mask = 0xffffffff,
- + .platform_data = &mv78xx0_ehci_data,
- + },
- + .resource = mv78xx0_ehci2_resources,
- + .num_resources = ARRAY_SIZE(mv78xx0_ehci2_resources),
- +};
- +
- +void __init mv78xx0_ehci2_init(void)
- +{
- + platform_device_register(&mv78xx0_ehci2);
- +}
- +
- +
- +/*****************************************************************************
- + * GE00
- + ****************************************************************************/
- +struct mv643xx_eth_shared_platform_data mv78xx0_ge00_shared_data = {
- + .t_clk = 0,
- + .dram = &mv78xx0_mbus_dram_info,
- +};
- +
- +static struct resource mv78xx0_ge00_shared_resources[] = {
- + {
- + .name = "ge00 base",
- + .start = GE00_PHYS_BASE + 0x2000,
- + .end = GE00_PHYS_BASE + 0x3fff,
- + .flags = IORESOURCE_MEM,
- + },
- +};
- +
- +static struct platform_device mv78xx0_ge00_shared = {
- + .name = MV643XX_ETH_SHARED_NAME,
- + .id = 0,
- + .dev = {
- + .platform_data = &mv78xx0_ge00_shared_data,
- + },
- + .num_resources = 1,
- + .resource = mv78xx0_ge00_shared_resources,
- +};
- +
- +static struct resource mv78xx0_ge00_resources[] = {
- + {
- + .name = "ge00 irq",
- + .start = IRQ_MV78XX0_GE00_SUM,
- + .end = IRQ_MV78XX0_GE00_SUM,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device mv78xx0_ge00 = {
- + .name = MV643XX_ETH_NAME,
- + .id = 0,
- + .num_resources = 1,
- + .resource = mv78xx0_ge00_resources,
- +};
- +
- +void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data)
- +{
- + eth_data->shared = &mv78xx0_ge00_shared;
- + mv78xx0_ge00.dev.platform_data = eth_data;
- +
- + platform_device_register(&mv78xx0_ge00_shared);
- + platform_device_register(&mv78xx0_ge00);
- +}
- +
- +
- +/*****************************************************************************
- + * GE01
- + ****************************************************************************/
- +struct mv643xx_eth_shared_platform_data mv78xx0_ge01_shared_data = {
- + .t_clk = 0,
- + .dram = &mv78xx0_mbus_dram_info,
- +};
- +
- +static struct resource mv78xx0_ge01_shared_resources[] = {
- + {
- + .name = "ge01 base",
- + .start = GE01_PHYS_BASE + 0x2000,
- + .end = GE01_PHYS_BASE + 0x3fff,
- + .flags = IORESOURCE_MEM,
- + },
- +};
- +
- +static struct platform_device mv78xx0_ge01_shared = {
- + .name = MV643XX_ETH_SHARED_NAME,
- + .id = 1,
- + .dev = {
- + .platform_data = &mv78xx0_ge01_shared_data,
- + },
- + .num_resources = 1,
- + .resource = mv78xx0_ge01_shared_resources,
- +};
- +
- +static struct resource mv78xx0_ge01_resources[] = {
- + {
- + .name = "ge01 irq",
- + .start = IRQ_MV78XX0_GE01_SUM,
- + .end = IRQ_MV78XX0_GE01_SUM,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device mv78xx0_ge01 = {
- + .name = MV643XX_ETH_NAME,
- + .id = 1,
- + .num_resources = 1,
- + .resource = mv78xx0_ge01_resources,
- +};
- +
- +void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data)
- +{
- + eth_data->shared = &mv78xx0_ge01_shared;
- + eth_data->shared_smi = &mv78xx0_ge00_shared;
- + mv78xx0_ge01.dev.platform_data = eth_data;
- +
- + platform_device_register(&mv78xx0_ge01_shared);
- + platform_device_register(&mv78xx0_ge01);
- +}
- +
- +
- +/*****************************************************************************
- + * GE10
- + ****************************************************************************/
- +struct mv643xx_eth_shared_platform_data mv78xx0_ge10_shared_data = {
- + .t_clk = 0,
- + .dram = &mv78xx0_mbus_dram_info,
- +};
- +
- +static struct resource mv78xx0_ge10_shared_resources[] = {
- + {
- + .name = "ge10 base",
- + .start = GE10_PHYS_BASE + 0x2000,
- + .end = GE10_PHYS_BASE + 0x3fff,
- + .flags = IORESOURCE_MEM,
- + },
- +};
- +
- +static struct platform_device mv78xx0_ge10_shared = {
- + .name = MV643XX_ETH_SHARED_NAME,
- + .id = 2,
- + .dev = {
- + .platform_data = &mv78xx0_ge10_shared_data,
- + },
- + .num_resources = 1,
- + .resource = mv78xx0_ge10_shared_resources,
- +};
- +
- +static struct resource mv78xx0_ge10_resources[] = {
- + {
- + .name = "ge10 irq",
- + .start = IRQ_MV78XX0_GE10_SUM,
- + .end = IRQ_MV78XX0_GE10_SUM,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device mv78xx0_ge10 = {
- + .name = MV643XX_ETH_NAME,
- + .id = 2,
- + .num_resources = 1,
- + .resource = mv78xx0_ge10_resources,
- +};
- +
- +void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data)
- +{
- + eth_data->shared = &mv78xx0_ge10_shared;
- + eth_data->shared_smi = &mv78xx0_ge00_shared;
- + mv78xx0_ge10.dev.platform_data = eth_data;
- +
- + platform_device_register(&mv78xx0_ge10_shared);
- + platform_device_register(&mv78xx0_ge10);
- +}
- +
- +
- +/*****************************************************************************
- + * GE11
- + ****************************************************************************/
- +struct mv643xx_eth_shared_platform_data mv78xx0_ge11_shared_data = {
- + .t_clk = 0,
- + .dram = &mv78xx0_mbus_dram_info,
- +};
- +
- +static struct resource mv78xx0_ge11_shared_resources[] = {
- + {
- + .name = "ge11 base",
- + .start = GE11_PHYS_BASE + 0x2000,
- + .end = GE11_PHYS_BASE + 0x3fff,
- + .flags = IORESOURCE_MEM,
- + },
- +};
- +
- +static struct platform_device mv78xx0_ge11_shared = {
- + .name = MV643XX_ETH_SHARED_NAME,
- + .id = 3,
- + .dev = {
- + .platform_data = &mv78xx0_ge11_shared_data,
- + },
- + .num_resources = 1,
- + .resource = mv78xx0_ge11_shared_resources,
- +};
- +
- +static struct resource mv78xx0_ge11_resources[] = {
- + {
- + .name = "ge11 irq",
- + .start = IRQ_MV78XX0_GE11_SUM,
- + .end = IRQ_MV78XX0_GE11_SUM,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device mv78xx0_ge11 = {
- + .name = MV643XX_ETH_NAME,
- + .id = 3,
- + .num_resources = 1,
- + .resource = mv78xx0_ge11_resources,
- +};
- +
- +void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data)
- +{
- + eth_data->shared = &mv78xx0_ge11_shared;
- + eth_data->shared_smi = &mv78xx0_ge00_shared;
- + mv78xx0_ge11.dev.platform_data = eth_data;
- +
- + platform_device_register(&mv78xx0_ge11_shared);
- + platform_device_register(&mv78xx0_ge11);
- +}
- +
- +
- +/*****************************************************************************
- + * SATA
- + ****************************************************************************/
- +static struct resource mv78xx0_sata_resources[] = {
- + {
- + .name = "sata base",
- + .start = SATA_PHYS_BASE,
- + .end = SATA_PHYS_BASE + 0x5000 - 1,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .name = "sata irq",
- + .start = IRQ_MV78XX0_SATA,
- + .end = IRQ_MV78XX0_SATA,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device mv78xx0_sata = {
- + .name = "sata_mv",
- + .id = 0,
- + .dev = {
- + .coherent_dma_mask = 0xffffffff,
- + },
- + .num_resources = ARRAY_SIZE(mv78xx0_sata_resources),
- + .resource = mv78xx0_sata_resources,
- +};
- +
- +void __init mv78xx0_sata_init(struct mv_sata_platform_data *sata_data)
- +{
- + sata_data->dram = &mv78xx0_mbus_dram_info;
- + mv78xx0_sata.dev.platform_data = sata_data;
- + platform_device_register(&mv78xx0_sata);
- +}
- +
- +
- +/*****************************************************************************
- + * UART0
- + ****************************************************************************/
- +static struct plat_serial8250_port mv78xx0_uart0_data[] = {
- + {
- + .mapbase = UART0_PHYS_BASE,
- + .membase = (char *)UART0_VIRT_BASE,
- + .irq = IRQ_MV78XX0_UART_0,
- + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
- + .iotype = UPIO_MEM,
- + .regshift = 2,
- + .uartclk = 0,
- + }, {
- + },
- +};
- +
- +static struct resource mv78xx0_uart0_resources[] = {
- + {
- + .start = UART0_PHYS_BASE,
- + .end = UART0_PHYS_BASE + 0xff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_MV78XX0_UART_0,
- + .end = IRQ_MV78XX0_UART_0,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device mv78xx0_uart0 = {
- + .name = "serial8250",
- + .id = 0,
- + .dev = {
- + .platform_data = mv78xx0_uart0_data,
- + },
- + .resource = mv78xx0_uart0_resources,
- + .num_resources = ARRAY_SIZE(mv78xx0_uart0_resources),
- +};
- +
- +void __init mv78xx0_uart0_init(void)
- +{
- + platform_device_register(&mv78xx0_uart0);
- +}
- +
- +
- +/*****************************************************************************
- + * UART1
- + ****************************************************************************/
- +static struct plat_serial8250_port mv78xx0_uart1_data[] = {
- + {
- + .mapbase = UART1_PHYS_BASE,
- + .membase = (char *)UART1_VIRT_BASE,
- + .irq = IRQ_MV78XX0_UART_1,
- + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
- + .iotype = UPIO_MEM,
- + .regshift = 2,
- + .uartclk = 0,
- + }, {
- + },
- +};
- +
- +static struct resource mv78xx0_uart1_resources[] = {
- + {
- + .start = UART1_PHYS_BASE,
- + .end = UART1_PHYS_BASE + 0xff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_MV78XX0_UART_1,
- + .end = IRQ_MV78XX0_UART_1,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device mv78xx0_uart1 = {
- + .name = "serial8250",
- + .id = 1,
- + .dev = {
- + .platform_data = mv78xx0_uart1_data,
- + },
- + .resource = mv78xx0_uart1_resources,
- + .num_resources = ARRAY_SIZE(mv78xx0_uart1_resources),
- +};
- +
- +void __init mv78xx0_uart1_init(void)
- +{
- + platform_device_register(&mv78xx0_uart1);
- +}
- +
- +
- +/*****************************************************************************
- + * UART2
- + ****************************************************************************/
- +static struct plat_serial8250_port mv78xx0_uart2_data[] = {
- + {
- + .mapbase = UART2_PHYS_BASE,
- + .membase = (char *)UART2_VIRT_BASE,
- + .irq = IRQ_MV78XX0_UART_2,
- + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
- + .iotype = UPIO_MEM,
- + .regshift = 2,
- + .uartclk = 0,
- + }, {
- + },
- +};
- +
- +static struct resource mv78xx0_uart2_resources[] = {
- + {
- + .start = UART2_PHYS_BASE,
- + .end = UART2_PHYS_BASE + 0xff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_MV78XX0_UART_2,
- + .end = IRQ_MV78XX0_UART_2,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device mv78xx0_uart2 = {
- + .name = "serial8250",
- + .id = 2,
- + .dev = {
- + .platform_data = mv78xx0_uart2_data,
- + },
- + .resource = mv78xx0_uart2_resources,
- + .num_resources = ARRAY_SIZE(mv78xx0_uart2_resources),
- +};
- +
- +void __init mv78xx0_uart2_init(void)
- +{
- + platform_device_register(&mv78xx0_uart2);
- +}
- +
- +
- +/*****************************************************************************
- + * UART3
- + ****************************************************************************/
- +static struct plat_serial8250_port mv78xx0_uart3_data[] = {
- + {
- + .mapbase = UART3_PHYS_BASE,
- + .membase = (char *)UART3_VIRT_BASE,
- + .irq = IRQ_MV78XX0_UART_3,
- + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
- + .iotype = UPIO_MEM,
- + .regshift = 2,
- + .uartclk = 0,
- + }, {
- + },
- +};
- +
- +static struct resource mv78xx0_uart3_resources[] = {
- + {
- + .start = UART3_PHYS_BASE,
- + .end = UART3_PHYS_BASE + 0xff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_MV78XX0_UART_3,
- + .end = IRQ_MV78XX0_UART_3,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device mv78xx0_uart3 = {
- + .name = "serial8250",
- + .id = 3,
- + .dev = {
- + .platform_data = mv78xx0_uart3_data,
- + },
- + .resource = mv78xx0_uart3_resources,
- + .num_resources = ARRAY_SIZE(mv78xx0_uart3_resources),
- +};
- +
- +void __init mv78xx0_uart3_init(void)
- +{
- + platform_device_register(&mv78xx0_uart3);
- +}
- +
- +
- +/*****************************************************************************
- + * Time handling
- + ****************************************************************************/
- +static void mv78xx0_timer_init(void)
- +{
- + orion_time_init(IRQ_MV78XX0_TIMER_1, get_tclk());
- +}
- +
- +struct sys_timer mv78xx0_timer = {
- + .init = mv78xx0_timer_init,
- +};
- +
- +
- +/*****************************************************************************
- + * General
- + ****************************************************************************/
- +static int __init is_l2_writethrough(void)
- +{
- + return !!(readl(CPU_CONTROL) & L2_WRITETHROUGH);
- +}
- +
- +void __init mv78xx0_init(void)
- +{
- + int core_index;
- + int hclk;
- + int pclk;
- + int l2clk;
- + int tclk;
- +
- + core_index = mv78xx0_core_index();
- + hclk = get_hclk();
- + get_pclk_l2clk(hclk, core_index, &pclk, &l2clk);
- + tclk = get_tclk();
- +
- + printk(KERN_INFO "MV78xx0 core #%d, ", core_index);
- + printk("PCLK = %dMHz, ", (pclk + 499999) / 1000000);
- + printk("L2 = %dMHz, ", (l2clk + 499999) / 1000000);
- + printk("HCLK = %dMHz, ", (hclk + 499999) / 1000000);
- + printk("TCLK = %dMHz\n", (tclk + 499999) / 1000000);
- +
- + mv78xx0_setup_cpu_mbus();
- +
- +#ifdef CONFIG_CACHE_FEROCEON_L2
- + feroceon_l2_init(is_l2_writethrough());
- +#endif
- +
- + mv78xx0_ge00_shared_data.t_clk = tclk;
- + mv78xx0_ge01_shared_data.t_clk = tclk;
- + mv78xx0_ge10_shared_data.t_clk = tclk;
- + mv78xx0_ge11_shared_data.t_clk = tclk;
- + mv78xx0_uart0_data[0].uartclk = tclk;
- + mv78xx0_uart1_data[0].uartclk = tclk;
- + mv78xx0_uart2_data[0].uartclk = tclk;
- + mv78xx0_uart3_data[0].uartclk = tclk;
- +}
- --- /dev/null
- +++ b/arch/arm/mach-mv78xx0/common.h
- @@ -0,0 +1,49 @@
- +/*
- + * arch/arm/mach-mv78xx0/common.h
- + *
- + * Core functions for Marvell MV78xx0 SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ARCH_MV78XX0_COMMON_H
- +#define __ARCH_MV78XX0_COMMON_H
- +
- +struct mv643xx_eth_platform_data;
- +struct mv_sata_platform_data;
- +
- +/*
- + * Basic MV78xx0 init functions used early by machine-setup.
- + */
- +int mv78xx0_core_index(void);
- +void mv78xx0_map_io(void);
- +void mv78xx0_init(void);
- +void mv78xx0_init_irq(void);
- +
- +extern struct mbus_dram_target_info mv78xx0_mbus_dram_info;
- +void mv78xx0_setup_cpu_mbus(void);
- +void mv78xx0_setup_pcie_io_win(int window, u32 base, u32 size,
- + int maj, int min);
- +void mv78xx0_setup_pcie_mem_win(int window, u32 base, u32 size,
- + int maj, int min);
- +
- +void mv78xx0_ehci0_init(void);
- +void mv78xx0_ehci1_init(void);
- +void mv78xx0_ehci2_init(void);
- +void mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data);
- +void mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data);
- +void mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data);
- +void mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data);
- +void mv78xx0_pcie_init(int init_port0, int init_port1);
- +void mv78xx0_sata_init(struct mv_sata_platform_data *sata_data);
- +void mv78xx0_uart0_init(void);
- +void mv78xx0_uart1_init(void);
- +void mv78xx0_uart2_init(void);
- +void mv78xx0_uart3_init(void);
- +
- +extern struct sys_timer mv78xx0_timer;
- +
- +
- +#endif
- --- /dev/null
- +++ b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
- @@ -0,0 +1,94 @@
- +/*
- + * arch/arm/mach-mv78xx0/db78x00-bp-setup.c
- + *
- + * Marvell DB-78x00-BP Development Board Setup
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/ata_platform.h>
- +#include <linux/mv643xx_eth.h>
- +#include <asm/arch/mv78xx0.h>
- +#include <asm/mach-types.h>
- +#include <asm/mach/arch.h>
- +#include "common.h"
- +
- +static struct mv643xx_eth_platform_data db78x00_ge00_data = {
- + .phy_addr = 8,
- +};
- +
- +static struct mv643xx_eth_platform_data db78x00_ge01_data = {
- + .phy_addr = 9,
- +};
- +
- +static struct mv643xx_eth_platform_data db78x00_ge10_data = {
- + .phy_addr = -1,
- +};
- +
- +static struct mv643xx_eth_platform_data db78x00_ge11_data = {
- + .phy_addr = -1,
- +};
- +
- +static struct mv_sata_platform_data db78x00_sata_data = {
- + .n_ports = 2,
- +};
- +
- +static void __init db78x00_init(void)
- +{
- + /*
- + * Basic MV78xx0 setup. Needs to be called early.
- + */
- + mv78xx0_init();
- +
- + /*
- + * Partition on-chip peripherals between the two CPU cores.
- + */
- + if (mv78xx0_core_index() == 0) {
- + mv78xx0_ehci0_init();
- + mv78xx0_ehci1_init();
- + mv78xx0_ehci2_init();
- + mv78xx0_ge00_init(&db78x00_ge00_data);
- + mv78xx0_ge01_init(&db78x00_ge01_data);
- + mv78xx0_ge10_init(&db78x00_ge10_data);
- + mv78xx0_ge11_init(&db78x00_ge11_data);
- + mv78xx0_sata_init(&db78x00_sata_data);
- + mv78xx0_uart0_init();
- + mv78xx0_uart2_init();
- + } else {
- + mv78xx0_uart1_init();
- + mv78xx0_uart3_init();
- + }
- +}
- +
- +static int __init db78x00_pci_init(void)
- +{
- + if (machine_is_db78x00_bp()) {
- + /*
- + * Assign the x16 PCIe slot on the board to CPU core
- + * #0, and let CPU core #1 have the four x1 slots.
- + */
- + if (mv78xx0_core_index() == 0)
- + mv78xx0_pcie_init(0, 1);
- + else
- + mv78xx0_pcie_init(1, 0);
- + }
- +
- + return 0;
- +}
- +subsys_initcall(db78x00_pci_init);
- +
- +MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board")
- + /* Maintainer: Lennert Buytenhek <[email protected]> */
- + .phys_io = MV78XX0_REGS_PHYS_BASE,
- + .io_pg_offst = ((MV78XX0_REGS_VIRT_BASE) >> 18) & 0xfffc,
- + .boot_params = 0x00000100,
- + .init_machine = db78x00_init,
- + .map_io = mv78xx0_map_io,
- + .init_irq = mv78xx0_init_irq,
- + .timer = &mv78xx0_timer,
- +MACHINE_END
- --- /dev/null
- +++ b/arch/arm/mach-mv78xx0/irq.c
- @@ -0,0 +1,22 @@
- +/*
- + * arch/arm/mach-mv78xx0/irq.c
- + *
- + * MV78xx0 IRQ handling.
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/pci.h>
- +#include <asm/arch/mv78xx0.h>
- +#include <asm/plat-orion/irq.h>
- +#include "common.h"
- +
- +void __init mv78xx0_init_irq(void)
- +{
- + orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF));
- + orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF));
- +}
- --- /dev/null
- +++ b/arch/arm/mach-mv78xx0/pcie.c
- @@ -0,0 +1,312 @@
- +/*
- + * arch/arm/mach-mv78xx0/pcie.c
- + *
- + * PCIe functions for Marvell MV78xx0 SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/pci.h>
- +#include <linux/mbus.h>
- +#include <asm/mach/pci.h>
- +#include <asm/plat-orion/pcie.h>
- +#include "common.h"
- +
- +struct pcie_port {
- + u8 maj;
- + u8 min;
- + u8 root_bus_nr;
- + void __iomem *base;
- + spinlock_t conf_lock;
- + char io_space_name[16];
- + char mem_space_name[16];
- + struct resource res[2];
- +};
- +
- +static struct pcie_port pcie_port[8];
- +static int num_pcie_ports;
- +static struct resource pcie_io_space;
- +static struct resource pcie_mem_space;
- +
- +
- +static void __init mv78xx0_pcie_preinit(void)
- +{
- + int i;
- + u32 size_each;
- + u32 start;
- + int win;
- +
- + pcie_io_space.name = "PCIe I/O Space";
- + pcie_io_space.start = MV78XX0_PCIE_IO_PHYS_BASE(0);
- + pcie_io_space.end =
- + MV78XX0_PCIE_IO_PHYS_BASE(0) + MV78XX0_PCIE_IO_SIZE * 8 - 1;
- + pcie_io_space.flags = IORESOURCE_IO;
- + if (request_resource(&iomem_resource, &pcie_io_space))
- + panic("can't allocate PCIe I/O space");
- +
- + pcie_mem_space.name = "PCIe MEM Space";
- + pcie_mem_space.start = MV78XX0_PCIE_MEM_PHYS_BASE;
- + pcie_mem_space.end =
- + MV78XX0_PCIE_MEM_PHYS_BASE + MV78XX0_PCIE_MEM_SIZE - 1;
- + pcie_mem_space.flags = IORESOURCE_MEM;
- + if (request_resource(&iomem_resource, &pcie_mem_space))
- + panic("can't allocate PCIe MEM space");
- +
- + for (i = 0; i < num_pcie_ports; i++) {
- + struct pcie_port *pp = pcie_port + i;
- +
- + snprintf(pp->io_space_name, sizeof(pp->io_space_name),
- + "PCIe %d.%d I/O", pp->maj, pp->min);
- + pp->io_space_name[sizeof(pp->io_space_name) - 1] = 0;
- + pp->res[0].name = pp->io_space_name;
- + pp->res[0].start = MV78XX0_PCIE_IO_PHYS_BASE(i);
- + pp->res[0].end = pp->res[0].start + MV78XX0_PCIE_IO_SIZE - 1;
- + pp->res[0].flags = IORESOURCE_IO;
- +
- + snprintf(pp->mem_space_name, sizeof(pp->mem_space_name),
- + "PCIe %d.%d MEM", pp->maj, pp->min);
- + pp->mem_space_name[sizeof(pp->mem_space_name) - 1] = 0;
- + pp->res[1].name = pp->mem_space_name;
- + pp->res[1].flags = IORESOURCE_MEM;
- + }
- +
- + switch (num_pcie_ports) {
- + case 0:
- + size_each = 0;
- + break;
- +
- + case 1:
- + size_each = 0x30000000;
- + break;
- +
- + case 2 ... 3:
- + size_each = 0x10000000;
- + break;
- +
- + case 4 ... 6:
- + size_each = 0x08000000;
- + break;
- +
- + case 7:
- + size_each = 0x04000000;
- + break;
- +
- + default:
- + panic("invalid number of PCIe ports");
- + }
- +
- + start = MV78XX0_PCIE_MEM_PHYS_BASE;
- + for (i = 0; i < num_pcie_ports; i++) {
- + struct pcie_port *pp = pcie_port + i;
- +
- + pp->res[1].start = start;
- + pp->res[1].end = start + size_each - 1;
- + start += size_each;
- + }
- +
- + for (i = 0; i < num_pcie_ports; i++) {
- + struct pcie_port *pp = pcie_port + i;
- +
- + if (request_resource(&pcie_io_space, &pp->res[0]))
- + panic("can't allocate PCIe I/O sub-space");
- +
- + if (request_resource(&pcie_mem_space, &pp->res[1]))
- + panic("can't allocate PCIe MEM sub-space");
- + }
- +
- + win = 0;
- + for (i = 0; i < num_pcie_ports; i++) {
- + struct pcie_port *pp = pcie_port + i;
- +
- + mv78xx0_setup_pcie_io_win(win++, pp->res[0].start,
- + pp->res[0].end - pp->res[0].start + 1,
- + pp->maj, pp->min);
- +
- + mv78xx0_setup_pcie_mem_win(win++, pp->res[1].start,
- + pp->res[1].end - pp->res[1].start + 1,
- + pp->maj, pp->min);
- + }
- +}
- +
- +static int __init mv78xx0_pcie_setup(int nr, struct pci_sys_data *sys)
- +{
- + struct pcie_port *pp;
- +
- + if (nr >= num_pcie_ports)
- + return 0;
- +
- + pp = &pcie_port[nr];
- + pp->root_bus_nr = sys->busnr;
- +
- + /*
- + * Generic PCIe unit setup.
- + */
- + orion_pcie_set_local_bus_nr(pp->base, sys->busnr);
- + orion_pcie_setup(pp->base, &mv78xx0_mbus_dram_info);
- +
- + sys->resource[0] = &pp->res[0];
- + sys->resource[1] = &pp->res[1];
- + sys->resource[2] = NULL;
- +
- + return 1;
- +}
- +
- +static struct pcie_port *bus_to_port(int bus)
- +{
- + int i;
- +
- + for (i = num_pcie_ports - 1; i >= 0; i--) {
- + int rbus = pcie_port[i].root_bus_nr;
- + if (rbus != -1 && rbus <= bus)
- + break;
- + }
- +
- + return i >= 0 ? pcie_port + i : NULL;
- +}
- +
- +static int pcie_valid_config(struct pcie_port *pp, int bus, int dev)
- +{
- + /*
- + * Don't go out when trying to access nonexisting devices
- + * on the local bus.
- + */
- + if (bus == pp->root_bus_nr && dev > 1)
- + return 0;
- +
- + return 1;
- +}
- +
- +static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
- + int size, u32 *val)
- +{
- + struct pcie_port *pp = bus_to_port(bus->number);
- + unsigned long flags;
- + int ret;
- +
- + if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) {
- + *val = 0xffffffff;
- + return PCIBIOS_DEVICE_NOT_FOUND;
- + }
- +
- + spin_lock_irqsave(&pp->conf_lock, flags);
- + ret = orion_pcie_rd_conf(pp->base, bus, devfn, where, size, val);
- + spin_unlock_irqrestore(&pp->conf_lock, flags);
- +
- + return ret;
- +}
- +
- +static int pcie_wr_conf(struct pci_bus *bus, u32 devfn,
- + int where, int size, u32 val)
- +{
- + struct pcie_port *pp = bus_to_port(bus->number);
- + unsigned long flags;
- + int ret;
- +
- + if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0)
- + return PCIBIOS_DEVICE_NOT_FOUND;
- +
- + spin_lock_irqsave(&pp->conf_lock, flags);
- + ret = orion_pcie_wr_conf(pp->base, bus, devfn, where, size, val);
- + spin_unlock_irqrestore(&pp->conf_lock, flags);
- +
- + return ret;
- +}
- +
- +static struct pci_ops pcie_ops = {
- + .read = pcie_rd_conf,
- + .write = pcie_wr_conf,
- +};
- +
- +static void __devinit rc_pci_fixup(struct pci_dev *dev)
- +{
- + /*
- + * Prevent enumeration of root complex.
- + */
- + if (dev->bus->parent == NULL && dev->devfn == 0) {
- + int i;
- +
- + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
- + dev->resource[i].start = 0;
- + dev->resource[i].end = 0;
- + dev->resource[i].flags = 0;
- + }
- + }
- +}
- +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup);
- +
- +static struct pci_bus __init *
- +mv78xx0_pcie_scan_bus(int nr, struct pci_sys_data *sys)
- +{
- + struct pci_bus *bus;
- +
- + if (nr < num_pcie_ports) {
- + bus = pci_scan_bus(sys->busnr, &pcie_ops, sys);
- + } else {
- + bus = NULL;
- + BUG();
- + }
- +
- + return bus;
- +}
- +
- +static int __init mv78xx0_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
- +{
- + struct pcie_port *pp = bus_to_port(dev->bus->number);
- +
- + return IRQ_MV78XX0_PCIE_00 + (pp->maj << 2) + pp->min;
- +}
- +
- +static struct hw_pci mv78xx0_pci __initdata = {
- + .nr_controllers = 8,
- + .preinit = mv78xx0_pcie_preinit,
- + .swizzle = pci_std_swizzle,
- + .setup = mv78xx0_pcie_setup,
- + .scan = mv78xx0_pcie_scan_bus,
- + .map_irq = mv78xx0_pcie_map_irq,
- +};
- +
- +static void __init add_pcie_port(int maj, int min, unsigned long base)
- +{
- + printk(KERN_INFO "MV78xx0 PCIe port %d.%d: ", maj, min);
- +
- + if (orion_pcie_link_up((void __iomem *)base)) {
- + struct pcie_port *pp = &pcie_port[num_pcie_ports++];
- +
- + printk("link up\n");
- +
- + pp->maj = maj;
- + pp->min = min;
- + pp->root_bus_nr = -1;
- + pp->base = (void __iomem *)base;
- + spin_lock_init(&pp->conf_lock);
- + memset(pp->res, 0, sizeof(pp->res));
- + } else {
- + printk("link down, ignoring\n");
- + }
- +}
- +
- +void __init mv78xx0_pcie_init(int init_port0, int init_port1)
- +{
- + if (init_port0) {
- + add_pcie_port(0, 0, PCIE00_VIRT_BASE);
- + if (!orion_pcie_x4_mode((void __iomem *)PCIE00_VIRT_BASE)) {
- + add_pcie_port(0, 1, PCIE01_VIRT_BASE);
- + add_pcie_port(0, 2, PCIE02_VIRT_BASE);
- + add_pcie_port(0, 3, PCIE03_VIRT_BASE);
- + }
- + }
- +
- + if (init_port1) {
- + add_pcie_port(1, 0, PCIE10_VIRT_BASE);
- + if (!orion_pcie_x4_mode((void __iomem *)PCIE10_VIRT_BASE)) {
- + add_pcie_port(1, 1, PCIE11_VIRT_BASE);
- + add_pcie_port(1, 2, PCIE12_VIRT_BASE);
- + add_pcie_port(1, 3, PCIE13_VIRT_BASE);
- + }
- + }
- +
- + pci_common_init(&mv78xx0_pci);
- +}
- --- a/arch/arm/mach-orion5x/Kconfig
- +++ b/arch/arm/mach-orion5x/Kconfig
- @@ -44,6 +44,36 @@
- Buffalo Linkstation Pro/Live platform. Both v1 and
- v2 devices are supported.
-
- +config MACH_TS409
- + bool "QNAP TS-409"
- + help
- + Say 'Y' here if you want your kernel to support the
- + QNAP TS-409 platform.
- +
- +config MACH_WRT350N_V2
- + bool "Linksys WRT350N v2"
- + help
- + Say 'Y' here if you want your kernel to support the
- + Linksys WRT350N v2 platform.
- +
- +config MACH_TS78XX
- + bool "Technologic Systems TS-78xx"
- + help
- + Say 'Y' here if you want your kernel to support the
- + Technologic Systems TS-78xx platform.
- +
- +config MACH_MV2120
- + bool "HP Media Vault mv2120"
- + help
- + Say 'Y' here if you want your kernel to support the
- + HP Media Vault mv2120 or mv5100.
- +
- +config MACH_MSS2
- + bool "Maxtor Shared Storage II"
- + help
- + Say 'Y' here if you want your kernel to support the
- + Maxtor Shared Storage II platform.
- +
- endmenu
-
- endif
- --- a/arch/arm/mach-orion5x/Makefile
- +++ b/arch/arm/mach-orion5x/Makefile
- @@ -1,7 +1,12 @@
- -obj-y += common.o addr-map.o pci.o gpio.o irq.o
- +obj-y += common.o addr-map.o pci.o gpio.o irq.o mpp.o
- obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o
- obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o
- obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o
- obj-$(CONFIG_MACH_LINKSTATION_PRO) += kurobox_pro-setup.o
- obj-$(CONFIG_MACH_DNS323) += dns323-setup.o
- -obj-$(CONFIG_MACH_TS209) += ts209-setup.o
- +obj-$(CONFIG_MACH_TS209) += ts209-setup.o tsx09-common.o
- +obj-$(CONFIG_MACH_TS409) += ts409-setup.o tsx09-common.o
- +obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o
- +obj-$(CONFIG_MACH_TS78XX) += ts78xx-setup.o
- +obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o
- +obj-$(CONFIG_MACH_MSS2) += mss2-setup.o
- --- a/arch/arm/mach-orion5x/addr-map.c
- +++ b/arch/arm/mach-orion5x/addr-map.c
- @@ -70,6 +70,7 @@
-
-
- struct mbus_dram_target_info orion5x_mbus_dram_info;
- +static int __initdata win_alloc_count;
-
- static int __init orion5x_cpu_win_can_remap(int win)
- {
- @@ -87,16 +88,22 @@
- static void __init setup_cpu_win(int win, u32 base, u32 size,
- u8 target, u8 attr, int remap)
- {
- - orion5x_write(CPU_WIN_BASE(win), base & 0xffff0000);
- - orion5x_write(CPU_WIN_CTRL(win),
- - ((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1);
- + if (win >= 8) {
- + printk(KERN_ERR "setup_cpu_win: trying to allocate "
- + "window %d\n", win);
- + return;
- + }
- +
- + writel(base & 0xffff0000, CPU_WIN_BASE(win));
- + writel(((size - 1) & 0xffff0000) | (attr << 8) | (target << 4) | 1,
- + CPU_WIN_CTRL(win));
-
- if (orion5x_cpu_win_can_remap(win)) {
- if (remap < 0)
- remap = base;
-
- - orion5x_write(CPU_WIN_REMAP_LO(win), remap & 0xffff0000);
- - orion5x_write(CPU_WIN_REMAP_HI(win), 0);
- + writel(remap & 0xffff0000, CPU_WIN_REMAP_LO(win));
- + writel(0, CPU_WIN_REMAP_HI(win));
- }
- }
-
- @@ -109,11 +116,11 @@
- * First, disable and clear windows.
- */
- for (i = 0; i < 8; i++) {
- - orion5x_write(CPU_WIN_BASE(i), 0);
- - orion5x_write(CPU_WIN_CTRL(i), 0);
- + writel(0, CPU_WIN_BASE(i));
- + writel(0, CPU_WIN_CTRL(i));
- if (orion5x_cpu_win_can_remap(i)) {
- - orion5x_write(CPU_WIN_REMAP_LO(i), 0);
- - orion5x_write(CPU_WIN_REMAP_HI(i), 0);
- + writel(0, CPU_WIN_REMAP_LO(i));
- + writel(0, CPU_WIN_REMAP_HI(i));
- }
- }
-
- @@ -128,6 +135,7 @@
- TARGET_PCIE, ATTR_PCIE_MEM, -1);
- setup_cpu_win(3, ORION5X_PCI_MEM_PHYS_BASE, ORION5X_PCI_MEM_SIZE,
- TARGET_PCI, ATTR_PCI_MEM, -1);
- + win_alloc_count = 4;
-
- /*
- * Setup MBUS dram target info.
- @@ -147,8 +155,8 @@
- w = &orion5x_mbus_dram_info.cs[cs++];
- w->cs_index = i;
- w->mbus_attr = 0xf & ~(1 << i);
- - w->base = base & 0xff000000;
- - w->size = (size | 0x00ffffff) + 1;
- + w->base = base & 0xffff0000;
- + w->size = (size | 0x0000ffff) + 1;
- }
- }
- orion5x_mbus_dram_info.num_cs = cs;
- @@ -156,25 +164,30 @@
-
- void __init orion5x_setup_dev_boot_win(u32 base, u32 size)
- {
- - setup_cpu_win(4, base, size, TARGET_DEV_BUS, ATTR_DEV_BOOT, -1);
- + setup_cpu_win(win_alloc_count++, base, size,
- + TARGET_DEV_BUS, ATTR_DEV_BOOT, -1);
- }
-
- void __init orion5x_setup_dev0_win(u32 base, u32 size)
- {
- - setup_cpu_win(5, base, size, TARGET_DEV_BUS, ATTR_DEV_CS0, -1);
- + setup_cpu_win(win_alloc_count++, base, size,
- + TARGET_DEV_BUS, ATTR_DEV_CS0, -1);
- }
-
- void __init orion5x_setup_dev1_win(u32 base, u32 size)
- {
- - setup_cpu_win(6, base, size, TARGET_DEV_BUS, ATTR_DEV_CS1, -1);
- + setup_cpu_win(win_alloc_count++, base, size,
- + TARGET_DEV_BUS, ATTR_DEV_CS1, -1);
- }
-
- void __init orion5x_setup_dev2_win(u32 base, u32 size)
- {
- - setup_cpu_win(7, base, size, TARGET_DEV_BUS, ATTR_DEV_CS2, -1);
- + setup_cpu_win(win_alloc_count++, base, size,
- + TARGET_DEV_BUS, ATTR_DEV_CS2, -1);
- }
-
- void __init orion5x_setup_pcie_wa_win(u32 base, u32 size)
- {
- - setup_cpu_win(7, base, size, TARGET_PCIE, ATTR_PCIE_WA, -1);
- + setup_cpu_win(win_alloc_count++, base, size,
- + TARGET_PCIE, ATTR_PCIE_WA, -1);
- }
- --- a/arch/arm/mach-orion5x/common.c
- +++ b/arch/arm/mach-orion5x/common.c
- @@ -39,25 +39,22 @@
- .virtual = ORION5X_REGS_VIRT_BASE,
- .pfn = __phys_to_pfn(ORION5X_REGS_PHYS_BASE),
- .length = ORION5X_REGS_SIZE,
- - .type = MT_DEVICE
- - },
- - {
- + .type = MT_DEVICE,
- + }, {
- .virtual = ORION5X_PCIE_IO_VIRT_BASE,
- .pfn = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
- .length = ORION5X_PCIE_IO_SIZE,
- - .type = MT_DEVICE
- - },
- - {
- + .type = MT_DEVICE,
- + }, {
- .virtual = ORION5X_PCI_IO_VIRT_BASE,
- .pfn = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
- .length = ORION5X_PCI_IO_SIZE,
- - .type = MT_DEVICE
- - },
- - {
- + .type = MT_DEVICE,
- + }, {
- .virtual = ORION5X_PCIE_WA_VIRT_BASE,
- .pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE),
- .length = ORION5X_PCIE_WA_SIZE,
- - .type = MT_DEVICE
- + .type = MT_DEVICE,
- },
- };
-
- @@ -66,101 +63,32 @@
- iotable_init(orion5x_io_desc, ARRAY_SIZE(orion5x_io_desc));
- }
-
- +
- /*****************************************************************************
- - * UART
- + * EHCI
- ****************************************************************************/
- -
- -static struct resource orion5x_uart_resources[] = {
- - {
- - .start = UART0_PHYS_BASE,
- - .end = UART0_PHYS_BASE + 0xff,
- - .flags = IORESOURCE_MEM,
- - },
- - {
- - .start = IRQ_ORION5X_UART0,
- - .end = IRQ_ORION5X_UART0,
- - .flags = IORESOURCE_IRQ,
- - },
- - {
- - .start = UART1_PHYS_BASE,
- - .end = UART1_PHYS_BASE + 0xff,
- - .flags = IORESOURCE_MEM,
- - },
- - {
- - .start = IRQ_ORION5X_UART1,
- - .end = IRQ_ORION5X_UART1,
- - .flags = IORESOURCE_IRQ,
- - },
- -};
- -
- -static struct plat_serial8250_port orion5x_uart_data[] = {
- - {
- - .mapbase = UART0_PHYS_BASE,
- - .membase = (char *)UART0_VIRT_BASE,
- - .irq = IRQ_ORION5X_UART0,
- - .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
- - .iotype = UPIO_MEM,
- - .regshift = 2,
- - .uartclk = ORION5X_TCLK,
- - },
- - {
- - .mapbase = UART1_PHYS_BASE,
- - .membase = (char *)UART1_VIRT_BASE,
- - .irq = IRQ_ORION5X_UART1,
- - .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
- - .iotype = UPIO_MEM,
- - .regshift = 2,
- - .uartclk = ORION5X_TCLK,
- - },
- - { },
- +static struct orion_ehci_data orion5x_ehci_data = {
- + .dram = &orion5x_mbus_dram_info,
- };
-
- -static struct platform_device orion5x_uart = {
- - .name = "serial8250",
- - .id = PLAT8250_DEV_PLATFORM,
- - .dev = {
- - .platform_data = orion5x_uart_data,
- - },
- - .resource = orion5x_uart_resources,
- - .num_resources = ARRAY_SIZE(orion5x_uart_resources),
- -};
- +static u64 ehci_dmamask = 0xffffffffUL;
-
- -/*******************************************************************************
- - * USB Controller - 2 interfaces
- - ******************************************************************************/
-
- +/*****************************************************************************
- + * EHCI0
- + ****************************************************************************/
- static struct resource orion5x_ehci0_resources[] = {
- {
- .start = ORION5X_USB0_PHYS_BASE,
- .end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1,
- .flags = IORESOURCE_MEM,
- - },
- - {
- + }, {
- .start = IRQ_ORION5X_USB0_CTRL,
- .end = IRQ_ORION5X_USB0_CTRL,
- .flags = IORESOURCE_IRQ,
- },
- };
-
- -static struct resource orion5x_ehci1_resources[] = {
- - {
- - .start = ORION5X_USB1_PHYS_BASE,
- - .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1,
- - .flags = IORESOURCE_MEM,
- - },
- - {
- - .start = IRQ_ORION5X_USB1_CTRL,
- - .end = IRQ_ORION5X_USB1_CTRL,
- - .flags = IORESOURCE_IRQ,
- - },
- -};
- -
- -static struct orion_ehci_data orion5x_ehci_data = {
- - .dram = &orion5x_mbus_dram_info,
- -};
- -
- -static u64 ehci_dmamask = 0xffffffffUL;
- -
- static struct platform_device orion5x_ehci0 = {
- .name = "orion-ehci",
- .id = 0,
- @@ -173,6 +101,27 @@
- .num_resources = ARRAY_SIZE(orion5x_ehci0_resources),
- };
-
- +void __init orion5x_ehci0_init(void)
- +{
- + platform_device_register(&orion5x_ehci0);
- +}
- +
- +
- +/*****************************************************************************
- + * EHCI1
- + ****************************************************************************/
- +static struct resource orion5x_ehci1_resources[] = {
- + {
- + .start = ORION5X_USB1_PHYS_BASE,
- + .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_ORION5X_USB1_CTRL,
- + .end = IRQ_ORION5X_USB1_CTRL,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- static struct platform_device orion5x_ehci1 = {
- .name = "orion-ehci",
- .id = 1,
- @@ -185,11 +134,15 @@
- .num_resources = ARRAY_SIZE(orion5x_ehci1_resources),
- };
-
- +void __init orion5x_ehci1_init(void)
- +{
- + platform_device_register(&orion5x_ehci1);
- +}
- +
- +
- /*****************************************************************************
- - * Gigabit Ethernet port
- - * (The Orion and Discovery (MV643xx) families use the same Ethernet driver)
- + * GigE
- ****************************************************************************/
- -
- struct mv643xx_eth_shared_platform_data orion5x_eth_shared_data = {
- .dram = &orion5x_mbus_dram_info,
- .t_clk = ORION5X_TCLK,
- @@ -219,7 +172,7 @@
- .start = IRQ_ORION5X_ETH_SUM,
- .end = IRQ_ORION5X_ETH_SUM,
- .flags = IORESOURCE_IRQ,
- - }
- + },
- };
-
- static struct platform_device orion5x_eth = {
- @@ -238,11 +191,10 @@
- platform_device_register(&orion5x_eth);
- }
-
- +
- /*****************************************************************************
- - * I2C controller
- - * (The Orion and Discovery (MV643xx) families share the same I2C controller)
- + * I2C
- ****************************************************************************/
- -
- static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = {
- .freq_m = 8, /* assumes 166 MHz TCLK */
- .freq_n = 3,
- @@ -251,16 +203,15 @@
-
- static struct resource orion5x_i2c_resources[] = {
- {
- - .name = "i2c base",
- - .start = I2C_PHYS_BASE,
- - .end = I2C_PHYS_BASE + 0x20 -1,
- - .flags = IORESOURCE_MEM,
- - },
- - {
- - .name = "i2c irq",
- - .start = IRQ_ORION5X_I2C,
- - .end = IRQ_ORION5X_I2C,
- - .flags = IORESOURCE_IRQ,
- + .name = "i2c base",
- + .start = I2C_PHYS_BASE,
- + .end = I2C_PHYS_BASE + 0x1f,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .name = "i2c irq",
- + .start = IRQ_ORION5X_I2C,
- + .end = IRQ_ORION5X_I2C,
- + .flags = IORESOURCE_IRQ,
- },
- };
-
- @@ -270,36 +221,41 @@
- .num_resources = ARRAY_SIZE(orion5x_i2c_resources),
- .resource = orion5x_i2c_resources,
- .dev = {
- - .platform_data = &orion5x_i2c_pdata,
- + .platform_data = &orion5x_i2c_pdata,
- },
- };
-
- +void __init orion5x_i2c_init(void)
- +{
- + platform_device_register(&orion5x_i2c);
- +}
- +
- +
- /*****************************************************************************
- - * Sata port
- + * SATA
- ****************************************************************************/
- static struct resource orion5x_sata_resources[] = {
- - {
- - .name = "sata base",
- - .start = ORION5X_SATA_PHYS_BASE,
- - .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
- - .flags = IORESOURCE_MEM,
- - },
- {
- - .name = "sata irq",
- - .start = IRQ_ORION5X_SATA,
- - .end = IRQ_ORION5X_SATA,
- - .flags = IORESOURCE_IRQ,
- - },
- + .name = "sata base",
- + .start = ORION5X_SATA_PHYS_BASE,
- + .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .name = "sata irq",
- + .start = IRQ_ORION5X_SATA,
- + .end = IRQ_ORION5X_SATA,
- + .flags = IORESOURCE_IRQ,
- + },
- };
-
- static struct platform_device orion5x_sata = {
- - .name = "sata_mv",
- - .id = 0,
- + .name = "sata_mv",
- + .id = 0,
- .dev = {
- .coherent_dma_mask = 0xffffffff,
- },
- - .num_resources = ARRAY_SIZE(orion5x_sata_resources),
- - .resource = orion5x_sata_resources,
- + .num_resources = ARRAY_SIZE(orion5x_sata_resources),
- + .resource = orion5x_sata_resources,
- };
-
- void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data)
- @@ -309,23 +265,111 @@
- platform_device_register(&orion5x_sata);
- }
-
- +
- /*****************************************************************************
- - * Time handling
- + * UART0
- + ****************************************************************************/
- +static struct plat_serial8250_port orion5x_uart0_data[] = {
- + {
- + .mapbase = UART0_PHYS_BASE,
- + .membase = (char *)UART0_VIRT_BASE,
- + .irq = IRQ_ORION5X_UART0,
- + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
- + .iotype = UPIO_MEM,
- + .regshift = 2,
- + .uartclk = ORION5X_TCLK,
- + }, {
- + },
- +};
- +
- +static struct resource orion5x_uart0_resources[] = {
- + {
- + .start = UART0_PHYS_BASE,
- + .end = UART0_PHYS_BASE + 0xff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_ORION5X_UART0,
- + .end = IRQ_ORION5X_UART0,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device orion5x_uart0 = {
- + .name = "serial8250",
- + .id = PLAT8250_DEV_PLATFORM,
- + .dev = {
- + .platform_data = orion5x_uart0_data,
- + },
- + .resource = orion5x_uart0_resources,
- + .num_resources = ARRAY_SIZE(orion5x_uart0_resources),
- +};
- +
- +void __init orion5x_uart0_init(void)
- +{
- + platform_device_register(&orion5x_uart0);
- +}
- +
- +
- +/*****************************************************************************
- + * UART1
- ****************************************************************************/
- +static struct plat_serial8250_port orion5x_uart1_data[] = {
- + {
- + .mapbase = UART1_PHYS_BASE,
- + .membase = (char *)UART1_VIRT_BASE,
- + .irq = IRQ_ORION5X_UART1,
- + .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
- + .iotype = UPIO_MEM,
- + .regshift = 2,
- + .uartclk = ORION5X_TCLK,
- + }, {
- + },
- +};
- +
- +static struct resource orion5x_uart1_resources[] = {
- + {
- + .start = UART1_PHYS_BASE,
- + .end = UART1_PHYS_BASE + 0xff,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = IRQ_ORION5X_UART1,
- + .end = IRQ_ORION5X_UART1,
- + .flags = IORESOURCE_IRQ,
- + },
- +};
- +
- +static struct platform_device orion5x_uart1 = {
- + .name = "serial8250",
- + .id = PLAT8250_DEV_PLATFORM1,
- + .dev = {
- + .platform_data = orion5x_uart1_data,
- + },
- + .resource = orion5x_uart1_resources,
- + .num_resources = ARRAY_SIZE(orion5x_uart1_resources),
- +};
- +
- +void __init orion5x_uart1_init(void)
- +{
- + platform_device_register(&orion5x_uart1);
- +}
- +
-
- +/*****************************************************************************
- + * Time handling
- + ****************************************************************************/
- static void orion5x_timer_init(void)
- {
- orion_time_init(IRQ_ORION5X_BRIDGE, ORION5X_TCLK);
- }
-
- struct sys_timer orion5x_timer = {
- - .init = orion5x_timer_init,
- + .init = orion5x_timer_init,
- };
-
- +
- /*****************************************************************************
- * General
- ****************************************************************************/
- -
- /*
- * Identify device ID and rev from PCIe configuration header space '0'.
- */
- @@ -350,8 +394,10 @@
- } else if (*dev == MV88F5181_DEV_ID) {
- if (*rev == MV88F5181_REV_B1) {
- *dev_name = "MV88F5181-Rev-B1";
- + } else if (*rev == MV88F5181L_REV_A1) {
- + *dev_name = "MV88F5181L-Rev-A1";
- } else {
- - *dev_name = "MV88F5181-Rev-Unsupported";
- + *dev_name = "MV88F5181(L)-Rev-Unsupported";
- }
- } else {
- *dev_name = "Device-Unknown";
- @@ -370,15 +416,6 @@
- * Setup Orion address map
- */
- orion5x_setup_cpu_mbus_bridge();
- -
- - /*
- - * Register devices.
- - */
- - platform_device_register(&orion5x_uart);
- - platform_device_register(&orion5x_ehci0);
- - if (dev == MV88F5182_DEV_ID)
- - platform_device_register(&orion5x_ehci1);
- - platform_device_register(&orion5x_i2c);
- }
-
- /*
- --- a/arch/arm/mach-orion5x/common.h
- +++ b/arch/arm/mach-orion5x/common.h
- @@ -1,10 +1,12 @@
- #ifndef __ARCH_ORION5X_COMMON_H
- #define __ARCH_ORION5X_COMMON_H
-
- +struct mv643xx_eth_platform_data;
- +struct mv_sata_platform_data;
- +
- /*
- * Basic Orion init functions used early by machine-setup.
- */
- -
- void orion5x_map_io(void);
- void orion5x_init_irq(void);
- void orion5x_init(void);
- @@ -23,13 +25,19 @@
- void orion5x_setup_dev2_win(u32 base, u32 size);
- void orion5x_setup_pcie_wa_win(u32 base, u32 size);
-
- +void orion5x_ehci0_init(void);
- +void orion5x_ehci1_init(void);
- +void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data);
- +void orion5x_i2c_init(void);
- +void orion5x_sata_init(struct mv_sata_platform_data *sata_data);
- +void orion5x_uart0_init(void);
- +void orion5x_uart1_init(void);
- +
- /*
- - * Shared code used internally by other Orion core functions.
- - * (/mach-orion/pci.c)
- + * PCIe/PCI functions.
- */
- -
- -struct pci_sys_data;
- struct pci_bus;
- +struct pci_sys_data;
-
- void orion5x_pcie_id(u32 *dev, u32 *rev);
- int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys);
- @@ -40,26 +48,9 @@
- * Valid GPIO pins according to MPP setup, used by machine-setup.
- * (/mach-orion/gpio.c).
- */
- -
- -void orion5x_gpio_set_valid_pins(u32 pins);
- +void orion5x_gpio_set_valid(unsigned pin, int valid);
- void gpio_display(void); /* debug */
-
- -/*
- - * Pull in Orion Ethernet platform_data, used by machine-setup
- - */
- -
- -struct mv643xx_eth_platform_data;
- -
- -void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data);
- -
- -/*
- - * Orion Sata platform_data, used by machine-setup
- - */
- -
- -struct mv_sata_platform_data;
- -
- -void orion5x_sata_init(struct mv_sata_platform_data *sata_data);
- -
- struct machine_desc;
- struct meminfo;
- struct tag;
- --- a/arch/arm/mach-orion5x/db88f5281-setup.c
- +++ b/arch/arm/mach-orion5x/db88f5281-setup.c
- @@ -27,6 +27,7 @@
- #include <asm/arch/orion5x.h>
- #include <asm/plat-orion/orion_nand.h>
- #include "common.h"
- +#include "mpp.h"
-
- /*****************************************************************************
- * DB-88F5281 on board devices
- @@ -86,7 +87,7 @@
- .name = "physmap-flash",
- .id = 0,
- .dev = {
- - .platform_data = &db88f5281_boot_flash_data,
- + .platform_data = &db88f5281_boot_flash_data,
- },
- .num_resources = 1,
- .resource = &db88f5281_boot_flash_resource,
- @@ -110,7 +111,7 @@
- .name = "physmap-flash",
- .id = 1,
- .dev = {
- - .platform_data = &db88f5281_nor_flash_data,
- + .platform_data = &db88f5281_nor_flash_data,
- },
- .num_resources = 1,
- .resource = &db88f5281_nor_flash_resource,
- @@ -125,18 +126,15 @@
- .name = "kernel",
- .offset = 0,
- .size = SZ_2M,
- - },
- - {
- + }, {
- .name = "root",
- .offset = SZ_2M,
- .size = (SZ_16M - SZ_2M),
- - },
- - {
- + }, {
- .name = "user",
- .offset = SZ_16M,
- .size = SZ_8M,
- - },
- - {
- + }, {
- .name = "recovery",
- .offset = (SZ_16M + SZ_8M),
- .size = SZ_8M,
- @@ -288,7 +286,6 @@
- ****************************************************************************/
- static struct mv643xx_eth_platform_data db88f5281_eth_data = {
- .phy_addr = 8,
- - .force_phy_addr = 1,
- };
-
- /*****************************************************************************
- @@ -301,11 +298,28 @@
- /*****************************************************************************
- * General Setup
- ****************************************************************************/
- -
- -static struct platform_device *db88f5281_devs[] __initdata = {
- - &db88f5281_boot_flash,
- - &db88f5281_nor_flash,
- - &db88f5281_nand_flash,
- +static struct orion5x_mpp_mode db88f5281_mpp_modes[] __initdata = {
- + { 0, MPP_GPIO }, /* USB Over Current */
- + { 1, MPP_GPIO }, /* USB Vbat input */
- + { 2, MPP_PCI_ARB }, /* PCI_REQn[2] */
- + { 3, MPP_PCI_ARB }, /* PCI_GNTn[2] */
- + { 4, MPP_PCI_ARB }, /* PCI_REQn[3] */
- + { 5, MPP_PCI_ARB }, /* PCI_GNTn[3] */
- + { 6, MPP_GPIO }, /* JP0, CON17.2 */
- + { 7, MPP_GPIO }, /* JP1, CON17.1 */
- + { 8, MPP_GPIO }, /* JP2, CON11.2 */
- + { 9, MPP_GPIO }, /* JP3, CON11.3 */
- + { 10, MPP_GPIO }, /* RTC int */
- + { 11, MPP_GPIO }, /* Baud Rate Generator */
- + { 12, MPP_GPIO }, /* PCI int 1 */
- + { 13, MPP_GPIO }, /* PCI int 2 */
- + { 14, MPP_NAND }, /* NAND_REn[2] */
- + { 15, MPP_NAND }, /* NAND_WEn[2] */
- + { 16, MPP_UART }, /* UART1_RX */
- + { 17, MPP_UART }, /* UART1_TX */
- + { 18, MPP_UART }, /* UART1_CTSn */
- + { 19, MPP_UART }, /* UART1_RTSn */
- + { -1 },
- };
-
- static void __init db88f5281_init(void)
- @@ -315,39 +329,31 @@
- */
- orion5x_init();
-
- + orion5x_mpp_conf(db88f5281_mpp_modes);
- + writel(0, MPP_DEV_CTRL); /* DEV_D[31:16] */
- +
- /*
- - * Setup the CPU address decode windows for our on-board devices
- + * Configure peripherals.
- */
- + orion5x_ehci0_init();
- + orion5x_eth_init(&db88f5281_eth_data);
- + orion5x_i2c_init();
- + orion5x_uart0_init();
- + orion5x_uart1_init();
- +
- orion5x_setup_dev_boot_win(DB88F5281_NOR_BOOT_BASE,
- DB88F5281_NOR_BOOT_SIZE);
- + platform_device_register(&db88f5281_boot_flash);
- +
- orion5x_setup_dev0_win(DB88F5281_7SEG_BASE, DB88F5281_7SEG_SIZE);
- - orion5x_setup_dev1_win(DB88F5281_NOR_BASE, DB88F5281_NOR_SIZE);
- - orion5x_setup_dev2_win(DB88F5281_NAND_BASE, DB88F5281_NAND_SIZE);
-
- - /*
- - * Setup Multiplexing Pins:
- - * MPP0: GPIO (USB Over Current) MPP1: GPIO (USB Vbat input)
- - * MPP2: PCI_REQn[2] MPP3: PCI_GNTn[2]
- - * MPP4: PCI_REQn[3] MPP5: PCI_GNTn[3]
- - * MPP6: GPIO (JP0, CON17.2) MPP7: GPIO (JP1, CON17.1)
- - * MPP8: GPIO (JP2, CON11.2) MPP9: GPIO (JP3, CON11.3)
- - * MPP10: GPIO (RTC int) MPP11: GPIO (Baud Rate Generator)
- - * MPP12: GPIO (PCI int 1) MPP13: GPIO (PCI int 2)
- - * MPP14: NAND_REn[2] MPP15: NAND_WEn[2]
- - * MPP16: UART1_RX MPP17: UART1_TX
- - * MPP18: UART1_CTS MPP19: UART1_RTS
- - * MPP-DEV: DEV_D[16:31]
- - */
- - orion5x_write(MPP_0_7_CTRL, 0x00222203);
- - orion5x_write(MPP_8_15_CTRL, 0x44000000);
- - orion5x_write(MPP_16_19_CTRL, 0);
- - orion5x_write(MPP_DEV_CTRL, 0);
- + orion5x_setup_dev1_win(DB88F5281_NOR_BASE, DB88F5281_NOR_SIZE);
- + platform_device_register(&db88f5281_nor_flash);
-
- - orion5x_gpio_set_valid_pins(0x00003fc3);
- + orion5x_setup_dev2_win(DB88F5281_NAND_BASE, DB88F5281_NAND_SIZE);
- + platform_device_register(&db88f5281_nand_flash);
-
- - platform_add_devices(db88f5281_devs, ARRAY_SIZE(db88f5281_devs));
- i2c_register_board_info(0, &db88f5281_i2c_rtc, 1);
- - orion5x_eth_init(&db88f5281_eth_data);
- }
-
- MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board")
- --- a/arch/arm/mach-orion5x/dns323-setup.c
- +++ b/arch/arm/mach-orion5x/dns323-setup.c
- @@ -27,6 +27,7 @@
- #include <asm/mach/pci.h>
- #include <asm/arch/orion5x.h>
- #include "common.h"
- +#include "mpp.h"
-
- #define DNS323_GPIO_LED_RIGHT_AMBER 1
- #define DNS323_GPIO_LED_LEFT_AMBER 2
- @@ -52,8 +53,6 @@
- if (irq != -1)
- return irq;
-
- - pr_err("%s: requested mapping for unknown device\n", __func__);
- -
- return -1;
- }
-
- @@ -81,7 +80,6 @@
-
- static struct mv643xx_eth_platform_data dns323_eth_data = {
- .phy_addr = 8,
- - .force_phy_addr = 1,
- };
-
- /****************************************************************************
- @@ -119,7 +117,7 @@
- .name = "u-boot",
- .size = 0x00030000,
- .offset = 0x007d0000,
- - }
- + },
- };
-
- static struct physmap_flash_data dns323_nor_flash_data = {
- @@ -137,7 +135,9 @@
- static struct platform_device dns323_nor_flash = {
- .name = "physmap-flash",
- .id = 0,
- - .dev = { .platform_data = &dns323_nor_flash_data, },
- + .dev = {
- + .platform_data = &dns323_nor_flash_data,
- + },
- .resource = &dns323_nor_flash_resource,
- .num_resources = 1,
- };
- @@ -170,7 +170,9 @@
- static struct platform_device dns323_gpio_leds = {
- .name = "leds-gpio",
- .id = -1,
- - .dev = { .platform_data = &dns323_led_data, },
- + .dev = {
- + .platform_data = &dns323_led_data,
- + },
- };
-
- /****************************************************************************
- @@ -183,35 +185,53 @@
- .gpio = DNS323_GPIO_KEY_RESET,
- .desc = "Reset Button",
- .active_low = 1,
- - },
- - {
- + }, {
- .code = KEY_POWER,
- .gpio = DNS323_GPIO_KEY_POWER,
- .desc = "Power Button",
- .active_low = 1,
- - }
- + },
- };
-
- static struct gpio_keys_platform_data dns323_button_data = {
- .buttons = dns323_buttons,
- - .nbuttons = ARRAY_SIZE(dns323_buttons),
- + .nbuttons = ARRAY_SIZE(dns323_buttons),
- };
-
- static struct platform_device dns323_button_device = {
- .name = "gpio-keys",
- .id = -1,
- .num_resources = 0,
- - .dev = { .platform_data = &dns323_button_data, },
- + .dev = {
- + .platform_data = &dns323_button_data,
- + },
- };
-
- /****************************************************************************
- * General Setup
- */
- -
- -static struct platform_device *dns323_plat_devices[] __initdata = {
- - &dns323_nor_flash,
- - &dns323_gpio_leds,
- - &dns323_button_device,
- +static struct orion5x_mpp_mode dns323_mpp_modes[] __initdata = {
- + { 0, MPP_PCIE_RST_OUTn },
- + { 1, MPP_GPIO }, /* right amber LED (sata ch0) */
- + { 2, MPP_GPIO }, /* left amber LED (sata ch1) */
- + { 3, MPP_UNUSED },
- + { 4, MPP_GPIO }, /* power button LED */
- + { 5, MPP_GPIO }, /* power button LED */
- + { 6, MPP_GPIO }, /* GMT G751-2f overtemp */
- + { 7, MPP_GPIO }, /* M41T80 nIRQ/OUT/SQW */
- + { 8, MPP_GPIO }, /* triggers power off */
- + { 9, MPP_GPIO }, /* power button switch */
- + { 10, MPP_GPIO }, /* reset button switch */
- + { 11, MPP_UNUSED },
- + { 12, MPP_UNUSED },
- + { 13, MPP_UNUSED },
- + { 14, MPP_UNUSED },
- + { 15, MPP_UNUSED },
- + { 16, MPP_UNUSED },
- + { 17, MPP_UNUSED },
- + { 18, MPP_UNUSED },
- + { 19, MPP_UNUSED },
- + { -1 },
- };
-
- /*
- @@ -225,17 +245,15 @@
- static struct i2c_board_info __initdata dns323_i2c_devices[] = {
- {
- I2C_BOARD_INFO("g760a", 0x3e),
- - },
- #if 0
- /* this entry requires the new-style driver model lm75 driver,
- * for the meantime "insmod lm75.ko force_lm75=0,0x48" is needed */
- - {
- + }, {
- I2C_BOARD_INFO("g751", 0x48),
- - },
- #endif
- - {
- + }, {
- I2C_BOARD_INFO("m41t80", 0x68),
- - }
- + },
- };
-
- /* DNS-323 specific power off method */
- @@ -250,62 +268,35 @@
- /* Setup basic Orion functions. Need to be called early. */
- orion5x_init();
-
- + orion5x_mpp_conf(dns323_mpp_modes);
- + writel(0, MPP_DEV_CTRL); /* DEV_D[31:16] */
- +
- + /*
- + * Configure peripherals.
- + */
- + orion5x_ehci0_init();
- + orion5x_eth_init(&dns323_eth_data);
- + orion5x_i2c_init();
- + orion5x_uart0_init();
- +
- /* setup flash mapping
- * CS3 holds a 8 MB Spansion S29GL064M90TFIR4
- */
- orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE);
- + platform_device_register(&dns323_nor_flash);
-
- - /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIe
- - *
- - * Open a special address decode windows for the PCIe WA.
- - */
- - orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
- - ORION5X_PCIE_WA_SIZE);
- -
- - /* set MPP to 0 as D-Link's 2.6.12.6 kernel did */
- - orion5x_write(MPP_0_7_CTRL, 0);
- - orion5x_write(MPP_8_15_CTRL, 0);
- - orion5x_write(MPP_16_19_CTRL, 0);
- - orion5x_write(MPP_DEV_CTRL, 0);
- -
- - /* Define used GPIO pins
- -
- - GPIO Map:
- -
- - | 0 | | PEX_RST_OUT (not controlled by GPIO)
- - | 1 | Out | right amber LED (= sata ch0 LED) (low-active)
- - | 2 | Out | left amber LED (= sata ch1 LED) (low-active)
- - | 3 | Out | //unknown//
- - | 4 | Out | power button LED (low-active, together with pin #5)
- - | 5 | Out | power button LED (low-active, together with pin #4)
- - | 6 | In | GMT G751-2f overtemp. shutdown signal (low-active)
- - | 7 | In | M41T80 nIRQ/OUT/SQW signal
- - | 8 | Out | triggers power off (high-active)
- - | 9 | In | power button switch (low-active)
- - | 10 | In | reset button switch (low-active)
- - | 11 | Out | //unknown//
- - | 12 | Out | //unknown//
- - | 13 | Out | //unknown//
- - | 14 | Out | //unknown//
- - | 15 | Out | //unknown//
- - */
- - orion5x_gpio_set_valid_pins(0x07f6);
- -
- - /* register dns323 specific power-off method */
- - if ((gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0)
- - || (gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0))
- - pr_err("DNS323: failed to setup power-off GPIO\n");
- -
- - pm_power_off = dns323_power_off;
- + platform_device_register(&dns323_gpio_leds);
-
- - /* register flash and other platform devices */
- - platform_add_devices(dns323_plat_devices,
- - ARRAY_SIZE(dns323_plat_devices));
- + platform_device_register(&dns323_button_device);
-
- i2c_register_board_info(0, dns323_i2c_devices,
- ARRAY_SIZE(dns323_i2c_devices));
-
- - orion5x_eth_init(&dns323_eth_data);
- + /* register dns323 specific power-off method */
- + if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
- + gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
- + pr_err("DNS323: failed to setup power-off GPIO\n");
- + pm_power_off = dns323_power_off;
- }
-
- /* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */
- --- a/arch/arm/mach-orion5x/gpio.c
- +++ b/arch/arm/mach-orion5x/gpio.c
- @@ -24,9 +24,12 @@
- static unsigned long gpio_valid[BITS_TO_LONGS(GPIO_MAX)];
- static const char *gpio_label[GPIO_MAX]; /* non null for allocated GPIOs */
-
- -void __init orion5x_gpio_set_valid_pins(u32 pins)
- +void __init orion5x_gpio_set_valid(unsigned pin, int valid)
- {
- - gpio_valid[0] = pins;
- + if (valid)
- + __set_bit(pin, gpio_valid);
- + else
- + __clear_bit(pin, gpio_valid);
- }
-
- /*
- @@ -93,10 +96,10 @@
- {
- int val, mask = 1 << pin;
-
- - if (orion5x_read(GPIO_IO_CONF) & mask)
- - val = orion5x_read(GPIO_DATA_IN) ^ orion5x_read(GPIO_IN_POL);
- + if (readl(GPIO_IO_CONF) & mask)
- + val = readl(GPIO_DATA_IN) ^ readl(GPIO_IN_POL);
- else
- - val = orion5x_read(GPIO_OUT);
- + val = readl(GPIO_OUT);
-
- return val & mask;
- }
- @@ -188,39 +191,39 @@
- printk("GPIO, free\n");
- } else {
- printk("GPIO, used by %s, ", gpio_label[i]);
- - if (orion5x_read(GPIO_IO_CONF) & (1 << i)) {
- + if (readl(GPIO_IO_CONF) & (1 << i)) {
- printk("input, active %s, level %s, edge %s\n",
- - ((orion5x_read(GPIO_IN_POL) >> i) & 1) ? "low" : "high",
- - ((orion5x_read(GPIO_LEVEL_MASK) >> i) & 1) ? "enabled" : "masked",
- - ((orion5x_read(GPIO_EDGE_MASK) >> i) & 1) ? "enabled" : "masked");
- + ((readl(GPIO_IN_POL) >> i) & 1) ? "low" : "high",
- + ((readl(GPIO_LEVEL_MASK) >> i) & 1) ? "enabled" : "masked",
- + ((readl(GPIO_EDGE_MASK) >> i) & 1) ? "enabled" : "masked");
- } else {
- - printk("output, val=%d\n", (orion5x_read(GPIO_OUT) >> i) & 1);
- + printk("output, val=%d\n", (readl(GPIO_OUT) >> i) & 1);
- }
- }
- }
-
- printk(KERN_DEBUG "MPP_0_7_CTRL (0x%08x) = 0x%08x\n",
- - MPP_0_7_CTRL, orion5x_read(MPP_0_7_CTRL));
- + MPP_0_7_CTRL, readl(MPP_0_7_CTRL));
- printk(KERN_DEBUG "MPP_8_15_CTRL (0x%08x) = 0x%08x\n",
- - MPP_8_15_CTRL, orion5x_read(MPP_8_15_CTRL));
- + MPP_8_15_CTRL, readl(MPP_8_15_CTRL));
- printk(KERN_DEBUG "MPP_16_19_CTRL (0x%08x) = 0x%08x\n",
- - MPP_16_19_CTRL, orion5x_read(MPP_16_19_CTRL));
- + MPP_16_19_CTRL, readl(MPP_16_19_CTRL));
- printk(KERN_DEBUG "MPP_DEV_CTRL (0x%08x) = 0x%08x\n",
- - MPP_DEV_CTRL, orion5x_read(MPP_DEV_CTRL));
- + MPP_DEV_CTRL, readl(MPP_DEV_CTRL));
- printk(KERN_DEBUG "GPIO_OUT (0x%08x) = 0x%08x\n",
- - GPIO_OUT, orion5x_read(GPIO_OUT));
- + GPIO_OUT, readl(GPIO_OUT));
- printk(KERN_DEBUG "GPIO_IO_CONF (0x%08x) = 0x%08x\n",
- - GPIO_IO_CONF, orion5x_read(GPIO_IO_CONF));
- + GPIO_IO_CONF, readl(GPIO_IO_CONF));
- printk(KERN_DEBUG "GPIO_BLINK_EN (0x%08x) = 0x%08x\n",
- - GPIO_BLINK_EN, orion5x_read(GPIO_BLINK_EN));
- + GPIO_BLINK_EN, readl(GPIO_BLINK_EN));
- printk(KERN_DEBUG "GPIO_IN_POL (0x%08x) = 0x%08x\n",
- - GPIO_IN_POL, orion5x_read(GPIO_IN_POL));
- + GPIO_IN_POL, readl(GPIO_IN_POL));
- printk(KERN_DEBUG "GPIO_DATA_IN (0x%08x) = 0x%08x\n",
- - GPIO_DATA_IN, orion5x_read(GPIO_DATA_IN));
- + GPIO_DATA_IN, readl(GPIO_DATA_IN));
- printk(KERN_DEBUG "GPIO_LEVEL_MASK (0x%08x) = 0x%08x\n",
- - GPIO_LEVEL_MASK, orion5x_read(GPIO_LEVEL_MASK));
- + GPIO_LEVEL_MASK, readl(GPIO_LEVEL_MASK));
- printk(KERN_DEBUG "GPIO_EDGE_CAUSE (0x%08x) = 0x%08x\n",
- - GPIO_EDGE_CAUSE, orion5x_read(GPIO_EDGE_CAUSE));
- + GPIO_EDGE_CAUSE, readl(GPIO_EDGE_CAUSE));
- printk(KERN_DEBUG "GPIO_EDGE_MASK (0x%08x) = 0x%08x\n",
- - GPIO_EDGE_MASK, orion5x_read(GPIO_EDGE_MASK));
- + GPIO_EDGE_MASK, readl(GPIO_EDGE_MASK));
- }
- --- a/arch/arm/mach-orion5x/irq.c
- +++ b/arch/arm/mach-orion5x/irq.c
- @@ -82,7 +82,7 @@
- int pin = irq_to_gpio(irq);
- struct irq_desc *desc;
-
- - if ((orion5x_read(GPIO_IO_CONF) & (1 << pin)) == 0) {
- + if ((readl(GPIO_IO_CONF) & (1 << pin)) == 0) {
- printk(KERN_ERR "orion5x_gpio_set_irq_type failed "
- "(irq %d, pin %d).\n", irq, pin);
- return -EINVAL;
- @@ -117,7 +117,7 @@
- /*
- * set initial polarity based on current input level
- */
- - if ((orion5x_read(GPIO_IN_POL) ^ orion5x_read(GPIO_DATA_IN))
- + if ((readl(GPIO_IN_POL) ^ readl(GPIO_DATA_IN))
- & (1 << pin))
- orion5x_setbits(GPIO_IN_POL, (1 << pin)); /* falling */
- else
- @@ -149,8 +149,8 @@
-
- BUG_ON(irq < IRQ_ORION5X_GPIO_0_7 || irq > IRQ_ORION5X_GPIO_24_31);
- offs = (irq - IRQ_ORION5X_GPIO_0_7) * 8;
- - cause = (orion5x_read(GPIO_DATA_IN) & orion5x_read(GPIO_LEVEL_MASK)) |
- - (orion5x_read(GPIO_EDGE_CAUSE) & orion5x_read(GPIO_EDGE_MASK));
- + cause = (readl(GPIO_DATA_IN) & readl(GPIO_LEVEL_MASK)) |
- + (readl(GPIO_EDGE_CAUSE) & readl(GPIO_EDGE_MASK));
-
- for (pin = offs; pin < offs + 8; pin++) {
- if (cause & (1 << pin)) {
- @@ -158,9 +158,9 @@
- desc = irq_desc + irq;
- if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQT_BOTHEDGE) {
- /* Swap polarity (race with GPIO line) */
- - u32 polarity = orion5x_read(GPIO_IN_POL);
- + u32 polarity = readl(GPIO_IN_POL);
- polarity ^= 1 << pin;
- - orion5x_write(GPIO_IN_POL, polarity);
- + writel(polarity, GPIO_IN_POL);
- }
- desc_handle_irq(irq, desc);
- }
- @@ -175,9 +175,9 @@
- /*
- * Mask and clear GPIO IRQ interrupts
- */
- - orion5x_write(GPIO_LEVEL_MASK, 0x0);
- - orion5x_write(GPIO_EDGE_MASK, 0x0);
- - orion5x_write(GPIO_EDGE_CAUSE, 0x0);
- + writel(0x0, GPIO_LEVEL_MASK);
- + writel(0x0, GPIO_EDGE_MASK);
- + writel(0x0, GPIO_EDGE_CAUSE);
-
- /*
- * Register chained level handlers for GPIO IRQs by default.
- --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
- +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
- @@ -13,10 +13,12 @@
- #include <linux/platform_device.h>
- #include <linux/pci.h>
- #include <linux/irq.h>
- +#include <linux/delay.h>
- #include <linux/mtd/physmap.h>
- #include <linux/mtd/nand.h>
- #include <linux/mv643xx_eth.h>
- #include <linux/i2c.h>
- +#include <linux/serial_reg.h>
- #include <linux/ata_platform.h>
- #include <asm/mach-types.h>
- #include <asm/gpio.h>
- @@ -25,6 +27,7 @@
- #include <asm/arch/orion5x.h>
- #include <asm/plat-orion/orion_nand.h>
- #include "common.h"
- +#include "mpp.h"
-
- /*****************************************************************************
- * KUROBOX-PRO Info
- @@ -53,13 +56,11 @@
- .name = "uImage",
- .offset = 0,
- .size = SZ_4M,
- - },
- - {
- + }, {
- .name = "rootfs",
- .offset = SZ_4M,
- .size = SZ_64M,
- - },
- - {
- + }, {
- .name = "extra",
- .offset = SZ_4M + SZ_64M,
- .size = SZ_256M - (SZ_4M + SZ_64M),
- @@ -132,8 +133,6 @@
- /*
- * PCI isn't used on the Kuro
- */
- - printk(KERN_ERR "kurobox_pro_pci_map_irq failed, unknown bus\n");
- -
- return -1;
- }
-
- @@ -161,7 +160,6 @@
-
- static struct mv643xx_eth_platform_data kurobox_pro_eth_data = {
- .phy_addr = 8,
- - .force_phy_addr = 1,
- };
-
- /*****************************************************************************
- @@ -175,12 +173,169 @@
- * SATA
- ****************************************************************************/
- static struct mv_sata_platform_data kurobox_pro_sata_data = {
- - .n_ports = 2,
- + .n_ports = 2,
- };
-
- /*****************************************************************************
- + * Kurobox Pro specific power off method via UART1-attached microcontroller
- + ****************************************************************************/
- +
- +#define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2))
- +
- +static int kurobox_pro_miconread(unsigned char *buf, int count)
- +{
- + int i;
- + int timeout;
- +
- + for (i = 0; i < count; i++) {
- + timeout = 10;
- +
- + while (!(readl(UART1_REG(LSR)) & UART_LSR_DR)) {
- + if (--timeout == 0)
- + break;
- + udelay(1000);
- + }
- +
- + if (timeout == 0)
- + break;
- + buf[i] = readl(UART1_REG(RX));
- + }
- +
- + /* return read bytes */
- + return i;
- +}
- +
- +static int kurobox_pro_miconwrite(const unsigned char *buf, int count)
- +{
- + int i = 0;
- +
- + while (count--) {
- + while (!(readl(UART1_REG(LSR)) & UART_LSR_THRE))
- + barrier();
- + writel(buf[i++], UART1_REG(TX));
- + }
- +
- + return 0;
- +}
- +
- +static int kurobox_pro_miconsend(const unsigned char *data, int count)
- +{
- + int i;
- + unsigned char checksum = 0;
- + unsigned char recv_buf[40];
- + unsigned char send_buf[40];
- + unsigned char correct_ack[3];
- + int retry = 2;
- +
- + /* Generate checksum */
- + for (i = 0; i < count; i++)
- + checksum -= data[i];
- +
- + do {
- + /* Send data */
- + kurobox_pro_miconwrite(data, count);
- +
- + /* send checksum */
- + kurobox_pro_miconwrite(&checksum, 1);
- +
- + if (kurobox_pro_miconread(recv_buf, sizeof(recv_buf)) <= 3) {
- + printk(KERN_ERR ">%s: receive failed.\n", __func__);
- +
- + /* send preamble to clear the receive buffer */
- + memset(&send_buf, 0xff, sizeof(send_buf));
- + kurobox_pro_miconwrite(send_buf, sizeof(send_buf));
- +
- + /* make dummy reads */
- + mdelay(100);
- + kurobox_pro_miconread(recv_buf, sizeof(recv_buf));
- + } else {
- + /* Generate expected ack */
- + correct_ack[0] = 0x01;
- + correct_ack[1] = data[1];
- + correct_ack[2] = 0x00;
- +
- + /* checksum Check */
- + if ((recv_buf[0] + recv_buf[1] + recv_buf[2] +
- + recv_buf[3]) & 0xFF) {
- + printk(KERN_ERR ">%s: Checksum Error : "
- + "Received data[%02x, %02x, %02x, %02x]"
- + "\n", __func__, recv_buf[0],
- + recv_buf[1], recv_buf[2], recv_buf[3]);
- + } else {
- + /* Check Received Data */
- + if (correct_ack[0] == recv_buf[0] &&
- + correct_ack[1] == recv_buf[1] &&
- + correct_ack[2] == recv_buf[2]) {
- + /* Interval for next command */
- + mdelay(10);
- +
- + /* Receive ACK */
- + return 0;
- + }
- + }
- + /* Received NAK or illegal Data */
- + printk(KERN_ERR ">%s: Error : NAK or Illegal Data "
- + "Received\n", __func__);
- + }
- + } while (retry--);
- +
- + /* Interval for next command */
- + mdelay(10);
- +
- + return -1;
- +}
- +
- +static void kurobox_pro_power_off(void)
- +{
- + const unsigned char watchdogkill[] = {0x01, 0x35, 0x00};
- + const unsigned char shutdownwait[] = {0x00, 0x0c};
- + const unsigned char poweroff[] = {0x00, 0x06};
- + /* 38400 baud divisor */
- + const unsigned divisor = ((ORION5X_TCLK + (8 * 38400)) / (16 * 38400));
- +
- + pr_info("%s: triggering power-off...\n", __func__);
- +
- + /* hijack uart1 and reset into sane state (38400,8n1,even parity) */
- + writel(0x83, UART1_REG(LCR));
- + writel(divisor & 0xff, UART1_REG(DLL));
- + writel((divisor >> 8) & 0xff, UART1_REG(DLM));
- + writel(0x1b, UART1_REG(LCR));
- + writel(0x00, UART1_REG(IER));
- + writel(0x07, UART1_REG(FCR));
- + writel(0x00, UART1_REG(MCR));
- +
- + /* Send the commands to shutdown the Kurobox Pro */
- + kurobox_pro_miconsend(watchdogkill, sizeof(watchdogkill)) ;
- + kurobox_pro_miconsend(shutdownwait, sizeof(shutdownwait)) ;
- + kurobox_pro_miconsend(poweroff, sizeof(poweroff));
- +}
- +
- +/*****************************************************************************
- * General Setup
- ****************************************************************************/
- +static struct orion5x_mpp_mode kurobox_pro_mpp_modes[] __initdata = {
- + { 0, MPP_UNUSED },
- + { 1, MPP_UNUSED },
- + { 2, MPP_GPIO }, /* GPIO Micon */
- + { 3, MPP_GPIO }, /* GPIO Rtc */
- + { 4, MPP_UNUSED },
- + { 5, MPP_UNUSED },
- + { 6, MPP_NAND }, /* NAND Flash REn */
- + { 7, MPP_NAND }, /* NAND Flash WEn */
- + { 8, MPP_UNUSED },
- + { 9, MPP_UNUSED },
- + { 10, MPP_UNUSED },
- + { 11, MPP_UNUSED },
- + { 12, MPP_SATA_LED }, /* SATA 0 presence */
- + { 13, MPP_SATA_LED }, /* SATA 1 presence */
- + { 14, MPP_SATA_LED }, /* SATA 0 active */
- + { 15, MPP_SATA_LED }, /* SATA 1 active */
- + { 16, MPP_UART }, /* UART1 RXD */
- + { 17, MPP_UART }, /* UART1 TXD */
- + { 18, MPP_UART }, /* UART1 CTSn */
- + { 19, MPP_UART }, /* UART1 RTSn */
- + { -1 },
- +};
-
- static void __init kurobox_pro_init(void)
- {
- @@ -189,46 +344,32 @@
- */
- orion5x_init();
-
- - /*
- - * Setup the CPU address decode windows for our devices
- - */
- - orion5x_setup_dev_boot_win(KUROBOX_PRO_NOR_BOOT_BASE,
- - KUROBOX_PRO_NOR_BOOT_SIZE);
- - orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, KUROBOX_PRO_NAND_SIZE);
- + orion5x_mpp_conf(kurobox_pro_mpp_modes);
-
- /*
- - * Open a special address decode windows for the PCIe WA.
- + * Configure peripherals.
- */
- - orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
- - ORION5X_PCIE_WA_SIZE);
- -
- - /*
- - * Setup Multiplexing Pins --
- - * MPP[0-1] Not used
- - * MPP[2] GPIO Micon
- - * MPP[3] GPIO RTC
- - * MPP[4-5] Not used
- - * MPP[6] Nand Flash REn
- - * MPP[7] Nand Flash WEn
- - * MPP[8-11] Not used
- - * MPP[12] SATA 0 presence Indication
- - * MPP[13] SATA 1 presence Indication
- - * MPP[14] SATA 0 active Indication
- - * MPP[15] SATA 1 active indication
- - * MPP[16-19] Not used
- - */
- - orion5x_write(MPP_0_7_CTRL, 0x44220003);
- - orion5x_write(MPP_8_15_CTRL, 0x55550000);
- - orion5x_write(MPP_16_19_CTRL, 0x0);
- -
- - orion5x_gpio_set_valid_pins(0x0000000c);
- + orion5x_ehci0_init();
- + orion5x_ehci1_init();
- + orion5x_eth_init(&kurobox_pro_eth_data);
- + orion5x_i2c_init();
- + orion5x_sata_init(&kurobox_pro_sata_data);
- + orion5x_uart0_init();
-
- + orion5x_setup_dev_boot_win(KUROBOX_PRO_NOR_BOOT_BASE,
- + KUROBOX_PRO_NOR_BOOT_SIZE);
- platform_device_register(&kurobox_pro_nor_flash);
- - if (machine_is_kurobox_pro())
- +
- + if (machine_is_kurobox_pro()) {
- + orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE,
- + KUROBOX_PRO_NAND_SIZE);
- platform_device_register(&kurobox_pro_nand_flash);
- + }
- +
- i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1);
- - orion5x_eth_init(&kurobox_pro_eth_data);
- - orion5x_sata_init(&kurobox_pro_sata_data);
- +
- + /* register Kurobox Pro specific power-off method */
- + pm_power_off = kurobox_pro_power_off;
- }
-
- #ifdef CONFIG_MACH_KUROBOX_PRO
- --- /dev/null
- +++ b/arch/arm/mach-orion5x/mpp.c
- @@ -0,0 +1,163 @@
- +/*
- + * arch/arm/mach-orion5x/mpp.c
- + *
- + * MPP functions for Marvell Orion 5x SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/mbus.h>
- +#include <asm/hardware.h>
- +#include <asm/io.h>
- +#include "common.h"
- +#include "mpp.h"
- +
- +static int is_5181l(void)
- +{
- + u32 dev;
- + u32 rev;
- +
- + orion5x_pcie_id(&dev, &rev);
- +
- + return !!(dev == MV88F5181_DEV_ID && rev >= MV88F5181L_REV_A0);
- +}
- +
- +static int is_5182(void)
- +{
- + u32 dev;
- + u32 rev;
- +
- + orion5x_pcie_id(&dev, &rev);
- +
- + return !!(dev == MV88F5182_DEV_ID);
- +}
- +
- +static int is_5281(void)
- +{
- + u32 dev;
- + u32 rev;
- +
- + orion5x_pcie_id(&dev, &rev);
- +
- + return !!(dev == MV88F5281_DEV_ID);
- +}
- +
- +static int __init determine_type_encoding(int mpp, enum orion5x_mpp_type type)
- +{
- + switch (type) {
- + case MPP_UNUSED:
- + case MPP_GPIO:
- + if (mpp == 0)
- + return 3;
- + if (mpp >= 1 && mpp <= 15)
- + return 0;
- + if (mpp >= 16 && mpp <= 19) {
- + if (is_5182())
- + return 5;
- + if (type == MPP_UNUSED)
- + return 0;
- + }
- + return -1;
- +
- + case MPP_PCIE_RST_OUTn:
- + if (mpp == 0)
- + return 0;
- + return -1;
- +
- + case MPP_PCI_ARB:
- + if (mpp >= 0 && mpp <= 7)
- + return 2;
- + return -1;
- +
- + case MPP_PCI_PMEn:
- + if (mpp == 2)
- + return 3;
- + return -1;
- +
- + case MPP_GIGE:
- + if (mpp >= 8 && mpp <= 19)
- + return 1;
- + return -1;
- +
- + case MPP_NAND:
- + if (is_5182() || is_5281()) {
- + if (mpp >= 4 && mpp <= 7)
- + return 4;
- + if (mpp >= 12 && mpp <= 17)
- + return 4;
- + }
- + return -1;
- +
- + case MPP_PCI_CLK:
- + if (is_5181l() && mpp >= 6 && mpp <= 7)
- + return 5;
- + return -1;
- +
- + case MPP_SATA_LED:
- + if (is_5182()) {
- + if (mpp >= 4 && mpp <= 7)
- + return 5;
- + if (mpp >= 12 && mpp <= 15)
- + return 5;
- + }
- + return -1;
- +
- + case MPP_UART:
- + if (mpp >= 16 && mpp <= 19)
- + return 0;
- + return -1;
- + }
- +
- + printk(KERN_INFO "unknown MPP type %d\n", type);
- +
- + return -1;
- +}
- +
- +void __init orion5x_mpp_conf(struct orion5x_mpp_mode *mode)
- +{
- + u32 mpp_0_7_ctrl = readl(MPP_0_7_CTRL);
- + u32 mpp_8_15_ctrl = readl(MPP_8_15_CTRL);
- + u32 mpp_16_19_ctrl = readl(MPP_16_19_CTRL);
- +
- + while (mode->mpp >= 0) {
- + u32 *reg;
- + int num_type;
- + int shift;
- +
- + if (mode->mpp >= 0 && mode->mpp <= 7)
- + reg = &mpp_0_7_ctrl;
- + else if (mode->mpp >= 8 && mode->mpp <= 15)
- + reg = &mpp_8_15_ctrl;
- + else if (mode->mpp >= 16 && mode->mpp <= 19)
- + reg = &mpp_16_19_ctrl;
- + else {
- + printk(KERN_ERR "orion5x_mpp_conf: invalid MPP "
- + "(%d)\n", mode->mpp);
- + continue;
- + }
- +
- + num_type = determine_type_encoding(mode->mpp, mode->type);
- + if (num_type < 0) {
- + printk(KERN_ERR "orion5x_mpp_conf: invalid MPP "
- + "combination (%d, %d)\n", mode->mpp,
- + mode->type);
- + continue;
- + }
- +
- + shift = (mode->mpp & 7) << 2;
- + *reg &= ~(0xf << shift);
- + *reg |= (num_type & 0xf) << shift;
- +
- + orion5x_gpio_set_valid(mode->mpp, !!(mode->type == MPP_GPIO));
- +
- + mode++;
- + }
- +
- + writel(mpp_0_7_ctrl, MPP_0_7_CTRL);
- + writel(mpp_8_15_ctrl, MPP_8_15_CTRL);
- + writel(mpp_16_19_ctrl, MPP_16_19_CTRL);
- +}
- --- /dev/null
- +++ b/arch/arm/mach-orion5x/mpp.h
- @@ -0,0 +1,74 @@
- +#ifndef __ARCH_ORION5X_MPP_H
- +#define __ARCH_ORION5X_MPP_H
- +
- +enum orion5x_mpp_type {
- + /*
- + * This MPP is unused.
- + */
- + MPP_UNUSED,
- +
- + /*
- + * This MPP pin is used as a generic GPIO pin. Valid for
- + * MPPs 0-15 and device bus data pins 16-31. On 5182, also
- + * valid for MPPs 16-19.
- + */
- + MPP_GPIO,
- +
- + /*
- + * This MPP is used as PCIe_RST_OUTn pin. Valid for
- + * MPP 0 only.
- + */
- + MPP_PCIE_RST_OUTn,
- +
- + /*
- + * This MPP is used as PCI arbiter pin (REQn/GNTn).
- + * Valid for MPPs 0-7 only.
- + */
- + MPP_PCI_ARB,
- +
- + /*
- + * This MPP is used as PCI_PMEn pin. Valid for MPP 2 only.
- + */
- + MPP_PCI_PMEn,
- +
- + /*
- + * This MPP is used as GigE half-duplex (COL, CRS) or GMII
- + * (RXERR, CRS, TXERR, TXD[7:4], RXD[7:4]) pin. Valid for
- + * MPPs 8-19 only.
- + */
- + MPP_GIGE,
- +
- + /*
- + * This MPP is used as NAND REn/WEn pin. Valid for MPPs
- + * 4-7 and 12-17 only, and only on the 5181l/5182/5281.
- + */
- + MPP_NAND,
- +
- + /*
- + * This MPP is used as a PCI clock output pin. Valid for
- + * MPPs 6-7 only, and only on the 5181l.
- + */
- + MPP_PCI_CLK,
- +
- + /*
- + * This MPP is used as a SATA presence/activity LED.
- + * Valid for MPPs 4-7 and 12-15 only, and only on the 5182.
- + */
- + MPP_SATA_LED,
- +
- + /*
- + * This MPP is used as UART1 RXD/TXD/CTSn/RTSn pin.
- + * Valid for MPPs 16-19 only.
- + */
- + MPP_UART,
- +};
- +
- +struct orion5x_mpp_mode {
- + int mpp;
- + enum orion5x_mpp_type type;
- +};
- +
- +void orion5x_mpp_conf(struct orion5x_mpp_mode *mode);
- +
- +
- +#endif
- --- /dev/null
- +++ b/arch/arm/mach-orion5x/mss2-setup.c
- @@ -0,0 +1,270 @@
- +/*
- + * Maxtor Shared Storage II Board Setup
- + *
- + * Maintainer: Sylver Bruneau <[email protected]>
- + *
- + * This program is free software; you can redistribute it and/or
- + * modify it under the terms of the GNU General Public License
- + * as published by the Free Software Foundation; either version
- + * 2 of the License, or (at your option) any later version.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/pci.h>
- +#include <linux/irq.h>
- +#include <linux/mtd/physmap.h>
- +#include <linux/mv643xx_eth.h>
- +#include <linux/leds.h>
- +#include <linux/gpio_keys.h>
- +#include <linux/input.h>
- +#include <linux/i2c.h>
- +#include <linux/ata_platform.h>
- +#include <linux/gpio.h>
- +#include <asm/mach-types.h>
- +#include <asm/mach/arch.h>
- +#include <asm/mach/pci.h>
- +#include <asm/arch/orion5x.h>
- +#include "common.h"
- +#include "mpp.h"
- +
- +#define MSS2_NOR_BOOT_BASE 0xff800000
- +#define MSS2_NOR_BOOT_SIZE SZ_256K
- +
- +/*****************************************************************************
- + * Maxtor Shared Storage II Info
- + ****************************************************************************/
- +
- +/*
- + * Maxtor Shared Storage II hardware :
- + * - Marvell 88F5182-A2 C500
- + * - Marvell 88E1111 Gigabit Ethernet PHY
- + * - RTC M41T81 (@0x68) on I2C bus
- + * - 256KB NOR flash
- + * - 64MB of RAM
- + */
- +
- +/*****************************************************************************
- + * 256KB NOR Flash on BOOT Device
- + ****************************************************************************/
- +
- +static struct physmap_flash_data mss2_nor_flash_data = {
- + .width = 1,
- +};
- +
- +static struct resource mss2_nor_flash_resource = {
- + .flags = IORESOURCE_MEM,
- + .start = MSS2_NOR_BOOT_BASE,
- + .end = MSS2_NOR_BOOT_BASE + MSS2_NOR_BOOT_SIZE - 1,
- +};
- +
- +static struct platform_device mss2_nor_flash = {
- + .name = "physmap-flash",
- + .id = 0,
- + .dev = {
- + .platform_data = &mss2_nor_flash_data,
- + },
- + .resource = &mss2_nor_flash_resource,
- + .num_resources = 1,
- +};
- +
- +/****************************************************************************
- + * PCI setup
- + ****************************************************************************/
- +static int __init mss2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
- +{
- + int irq;
- +
- + /*
- + * Check for devices with hard-wired IRQs.
- + */
- + irq = orion5x_pci_map_irq(dev, slot, pin);
- + if (irq != -1)
- + return irq;
- +
- + return -1;
- +}
- +
- +static struct hw_pci mss2_pci __initdata = {
- + .nr_controllers = 2,
- + .swizzle = pci_std_swizzle,
- + .setup = orion5x_pci_sys_setup,
- + .scan = orion5x_pci_sys_scan_bus,
- + .map_irq = mss2_pci_map_irq,
- +};
- +
- +static int __init mss2_pci_init(void)
- +{
- + if (machine_is_mss2())
- + pci_common_init(&mss2_pci);
- +
- + return 0;
- +}
- +subsys_initcall(mss2_pci_init);
- +
- +
- +/*****************************************************************************
- + * Ethernet
- + ****************************************************************************/
- +
- +static struct mv643xx_eth_platform_data mss2_eth_data = {
- + .phy_addr = 8,
- +};
- +
- +/*****************************************************************************
- + * SATA
- + ****************************************************************************/
- +
- +static struct mv_sata_platform_data mss2_sata_data = {
- + .n_ports = 2,
- +};
- +
- +/*****************************************************************************
- + * GPIO buttons
- + ****************************************************************************/
- +
- +#define MSS2_GPIO_KEY_RESET 12
- +#define MSS2_GPIO_KEY_POWER 11
- +
- +static struct gpio_keys_button mss2_buttons[] = {
- + {
- + .code = KEY_POWER,
- + .gpio = MSS2_GPIO_KEY_POWER,
- + .desc = "Power",
- + .active_low = 1,
- + }, {
- + .code = KEY_RESTART,
- + .gpio = MSS2_GPIO_KEY_RESET,
- + .desc = "Reset",
- + .active_low = 1,
- + },
- +};
- +
- +static struct gpio_keys_platform_data mss2_button_data = {
- + .buttons = mss2_buttons,
- + .nbuttons = ARRAY_SIZE(mss2_buttons),
- +};
- +
- +static struct platform_device mss2_button_device = {
- + .name = "gpio-keys",
- + .id = -1,
- + .dev = {
- + .platform_data = &mss2_button_data,
- + },
- +};
- +
- +/*****************************************************************************
- + * RTC m41t81 on I2C bus
- + ****************************************************************************/
- +
- +#define MSS2_GPIO_RTC_IRQ 3
- +
- +static struct i2c_board_info __initdata mss2_i2c_rtc = {
- + I2C_BOARD_INFO("m41t81", 0x68),
- +};
- +
- +/*****************************************************************************
- + * MSS2 power off method
- + ****************************************************************************/
- +/*
- + * On the Maxtor Shared Storage II, the shutdown process is the following :
- + * - Userland modifies U-boot env to tell U-boot to go idle at next boot
- + * - The board reboots
- + * - U-boot starts and go into an idle mode until the user press "power"
- + */
- +static void mss2_power_off(void)
- +{
- + u32 reg;
- +
- + /*
- + * Enable and issue soft reset
- + */
- + reg = readl(CPU_RESET_MASK);
- + reg |= 1 << 2;
- + writel(reg, CPU_RESET_MASK);
- +
- + reg = readl(CPU_SOFT_RESET);
- + reg |= 1;
- + writel(reg, CPU_SOFT_RESET);
- +}
- +
- +/****************************************************************************
- + * General Setup
- + ****************************************************************************/
- +static struct orion5x_mpp_mode mss2_mpp_modes[] __initdata = {
- + { 0, MPP_GPIO }, /* Power LED */
- + { 1, MPP_GPIO }, /* Error LED */
- + { 2, MPP_UNUSED },
- + { 3, MPP_GPIO }, /* RTC interrupt */
- + { 4, MPP_GPIO }, /* HDD ind. (Single/Dual)*/
- + { 5, MPP_GPIO }, /* HD0 5V control */
- + { 6, MPP_GPIO }, /* HD0 12V control */
- + { 7, MPP_GPIO }, /* HD1 5V control */
- + { 8, MPP_GPIO }, /* HD1 12V control */
- + { 9, MPP_UNUSED },
- + { 10, MPP_GPIO }, /* Fan control */
- + { 11, MPP_GPIO }, /* Power button */
- + { 12, MPP_GPIO }, /* Reset button */
- + { 13, MPP_UNUSED },
- + { 14, MPP_SATA_LED }, /* SATA 0 active */
- + { 15, MPP_SATA_LED }, /* SATA 1 active */
- + { 16, MPP_UNUSED },
- + { 17, MPP_UNUSED },
- + { 18, MPP_UNUSED },
- + { 19, MPP_UNUSED },
- + { -1 },
- +};
- +
- +static void __init mss2_init(void)
- +{
- + /* Setup basic Orion functions. Need to be called early. */
- + orion5x_init();
- +
- + orion5x_mpp_conf(mss2_mpp_modes);
- +
- + /*
- + * MPP[20] Unused
- + * MPP[21] PCI clock
- + * MPP[22] USB 0 over current
- + * MPP[23] USB 1 over current
- + */
- +
- + /*
- + * Configure peripherals.
- + */
- + orion5x_ehci0_init();
- + orion5x_ehci1_init();
- + orion5x_eth_init(&mss2_eth_data);
- + orion5x_i2c_init();
- + orion5x_sata_init(&mss2_sata_data);
- + orion5x_uart0_init();
- +
- + orion5x_setup_dev_boot_win(MSS2_NOR_BOOT_BASE, MSS2_NOR_BOOT_SIZE);
- + platform_device_register(&mss2_nor_flash);
- +
- + platform_device_register(&mss2_button_device);
- +
- + if (gpio_request(MSS2_GPIO_RTC_IRQ, "rtc") == 0) {
- + if (gpio_direction_input(MSS2_GPIO_RTC_IRQ) == 0)
- + mss2_i2c_rtc.irq = gpio_to_irq(MSS2_GPIO_RTC_IRQ);
- + else
- + gpio_free(MSS2_GPIO_RTC_IRQ);
- + }
- + i2c_register_board_info(0, &mss2_i2c_rtc, 1);
- +
- + /* register mss2 specific power-off method */
- + pm_power_off = mss2_power_off;
- +}
- +
- +MACHINE_START(MSS2, "Maxtor Shared Storage II")
- + /* Maintainer: Sylver Bruneau <[email protected]> */
- + .phys_io = ORION5X_REGS_PHYS_BASE,
- + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
- + .boot_params = 0x00000100,
- + .init_machine = mss2_init,
- + .map_io = orion5x_map_io,
- + .init_irq = orion5x_init_irq,
- + .timer = &orion5x_timer,
- + .fixup = tag_fixup_mem32
- +MACHINE_END
- --- /dev/null
- +++ b/arch/arm/mach-orion5x/mv2120-setup.c
- @@ -0,0 +1,194 @@
- +/*
- + * Copyright (C) 2007 Herbert Valerio Riedel <[email protected]>
- + * Copyright (C) 2008 Martin Michlmayr <[email protected]>
- + *
- + * This program is free software; you can redistribute it and/or modify
- + * it under the terms of the GNU Lesser General Public License as
- + * published by the Free Software Foundation; either version 2 of the
- + * License, or (at your option) any later version.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/irq.h>
- +#include <linux/mtd/physmap.h>
- +#include <linux/mv643xx_eth.h>
- +#include <linux/leds.h>
- +#include <linux/gpio_keys.h>
- +#include <linux/input.h>
- +#include <linux/i2c.h>
- +#include <linux/ata_platform.h>
- +#include <asm/mach-types.h>
- +#include <asm/gpio.h>
- +#include <asm/mach/arch.h>
- +#include <asm/arch/orion5x.h>
- +#include "common.h"
- +#include "mpp.h"
- +
- +#define MV2120_NOR_BOOT_BASE 0xf4000000
- +#define MV2120_NOR_BOOT_SIZE SZ_512K
- +
- +#define MV2120_GPIO_RTC_IRQ 3
- +#define MV2120_GPIO_KEY_RESET 17
- +#define MV2120_GPIO_KEY_POWER 18
- +#define MV2120_GPIO_POWER_OFF 19
- +
- +
- +/*****************************************************************************
- + * Ethernet
- + ****************************************************************************/
- +static struct mv643xx_eth_platform_data mv2120_eth_data = {
- + .phy_addr = 8,
- +};
- +
- +static struct mv_sata_platform_data mv2120_sata_data = {
- + .n_ports = 2,
- +};
- +
- +static struct mtd_partition mv2120_partitions[] = {
- + {
- + .name = "firmware",
- + .size = 0x00080000,
- + .offset = 0,
- + },
- +};
- +
- +static struct physmap_flash_data mv2120_nor_flash_data = {
- + .width = 1,
- + .parts = mv2120_partitions,
- + .nr_parts = ARRAY_SIZE(mv2120_partitions)
- +};
- +
- +static struct resource mv2120_nor_flash_resource = {
- + .flags = IORESOURCE_MEM,
- + .start = MV2120_NOR_BOOT_BASE,
- + .end = MV2120_NOR_BOOT_BASE + MV2120_NOR_BOOT_SIZE - 1,
- +};
- +
- +static struct platform_device mv2120_nor_flash = {
- + .name = "physmap-flash",
- + .id = 0,
- + .dev = {
- + .platform_data = &mv2120_nor_flash_data,
- + },
- + .resource = &mv2120_nor_flash_resource,
- + .num_resources = 1,
- +};
- +
- +static struct gpio_keys_button mv2120_buttons[] = {
- + {
- + .code = KEY_RESTART,
- + .gpio = MV2120_GPIO_KEY_RESET,
- + .desc = "reset",
- + .active_low = 1,
- + }, {
- + .code = KEY_POWER,
- + .gpio = MV2120_GPIO_KEY_POWER,
- + .desc = "power",
- + .active_low = 1,
- + },
- +};
- +
- +static struct gpio_keys_platform_data mv2120_button_data = {
- + .buttons = mv2120_buttons,
- + .nbuttons = ARRAY_SIZE(mv2120_buttons),
- +};
- +
- +static struct platform_device mv2120_button_device = {
- + .name = "gpio-keys",
- + .id = -1,
- + .num_resources = 0,
- + .dev = {
- + .platform_data = &mv2120_button_data,
- + },
- +};
- +
- +
- +/****************************************************************************
- + * General Setup
- + ****************************************************************************/
- +static struct orion5x_mpp_mode mv2120_mpp_modes[] __initdata = {
- + { 0, MPP_GPIO }, /* Sys status LED */
- + { 1, MPP_GPIO }, /* Sys error LED */
- + { 2, MPP_GPIO }, /* OverTemp interrupt */
- + { 3, MPP_GPIO }, /* RTC interrupt */
- + { 4, MPP_GPIO }, /* V_LED 5V */
- + { 5, MPP_GPIO }, /* V_LED 3.3V */
- + { 6, MPP_UNUSED },
- + { 7, MPP_UNUSED },
- + { 8, MPP_GPIO }, /* SATA 0 fail LED */
- + { 9, MPP_GPIO }, /* SATA 1 fail LED */
- + { 10, MPP_UNUSED },
- + { 11, MPP_UNUSED },
- + { 12, MPP_SATA_LED }, /* SATA 0 presence */
- + { 13, MPP_SATA_LED }, /* SATA 1 presence */
- + { 14, MPP_SATA_LED }, /* SATA 0 active */
- + { 15, MPP_SATA_LED }, /* SATA 1 active */
- + { 16, MPP_UNUSED },
- + { 17, MPP_GPIO }, /* Reset button */
- + { 18, MPP_GPIO }, /* Power button */
- + { 19, MPP_GPIO }, /* Power off */
- + { -1 },
- +};
- +
- +static struct i2c_board_info __initdata mv2120_i2c_rtc = {
- + I2C_BOARD_INFO("rtc-pcf8563", 0x51),
- + .irq = 0,
- +};
- +
- +static void mv2120_power_off(void)
- +{
- + pr_info("%s: triggering power-off...\n", __func__);
- + gpio_set_value(MV2120_GPIO_POWER_OFF, 0);
- +}
- +
- +static void __init mv2120_init(void)
- +{
- + /* Setup basic Orion functions. Need to be called early. */
- + orion5x_init();
- +
- + orion5x_mpp_conf(mv2120_mpp_modes);
- +
- + /*
- + * Configure peripherals.
- + */
- + orion5x_ehci0_init();
- + orion5x_ehci1_init();
- + orion5x_eth_init(&mv2120_eth_data);
- + orion5x_i2c_init();
- + orion5x_sata_init(&mv2120_sata_data);
- + orion5x_uart0_init();
- +
- + orion5x_setup_dev_boot_win(MV2120_NOR_BOOT_BASE, MV2120_NOR_BOOT_SIZE);
- + platform_device_register(&mv2120_nor_flash);
- +
- + platform_device_register(&mv2120_button_device);
- +
- + if (gpio_request(MV2120_GPIO_RTC_IRQ, "rtc") == 0) {
- + if (gpio_direction_input(MV2120_GPIO_RTC_IRQ) == 0)
- + mv2120_i2c_rtc.irq = gpio_to_irq(MV2120_GPIO_RTC_IRQ);
- + else
- + gpio_free(MV2120_GPIO_RTC_IRQ);
- + }
- + i2c_register_board_info(0, &mv2120_i2c_rtc, 1);
- +
- + /* register mv2120 specific power-off method */
- + if (gpio_request(MV2120_GPIO_POWER_OFF, "POWEROFF") != 0 ||
- + gpio_direction_output(MV2120_GPIO_POWER_OFF, 1) != 0)
- + pr_err("mv2120: failed to setup power-off GPIO\n");
- + pm_power_off = mv2120_power_off;
- +}
- +
- +/* Warning: HP uses a wrong mach-type (=526) in their bootloader */
- +MACHINE_START(MV2120, "HP Media Vault mv2120")
- + /* Maintainer: Martin Michlmayr <[email protected]> */
- + .phys_io = ORION5X_REGS_PHYS_BASE,
- + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
- + .boot_params = 0x00000100,
- + .init_machine = mv2120_init,
- + .map_io = orion5x_map_io,
- + .init_irq = orion5x_init_irq,
- + .timer = &orion5x_timer,
- + .fixup = tag_fixup_mem32
- +MACHINE_END
- --- a/arch/arm/mach-orion5x/pci.c
- +++ b/arch/arm/mach-orion5x/pci.c
- @@ -152,6 +152,8 @@
- if (dev == MV88F5181_DEV_ID || dev == MV88F5182_DEV_ID) {
- printk(KERN_NOTICE "Applying Orion-1/Orion-NAS PCIe config "
- "read transaction workaround\n");
- + orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
- + ORION5X_PCIE_WA_SIZE);
- pcie_ops.read = pcie_rd_conf_wa;
- }
-
- @@ -240,13 +242,13 @@
- * PCI Address Decode Windows registers
- */
- #define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc08) : \
- - ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
- - ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
- - ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0)
- -#define PCI_BAR_REMAP_DDR_CS(n) (((n) ==0) ? ORION5X_PCI_REG(0xc48) : \
- - ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
- - ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
- - ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0)
- + ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
- + ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
- + ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0)
- +#define PCI_BAR_REMAP_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc48) : \
- + ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
- + ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
- + ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0)
- #define PCI_BAR_ENABLE ORION5X_PCI_REG(0xc3c)
- #define PCI_ADDR_DECODE_CTRL ORION5X_PCI_REG(0xd3c)
-
- @@ -266,7 +268,7 @@
-
- static int orion5x_pci_local_bus_nr(void)
- {
- - u32 conf = orion5x_read(PCI_P2P_CONF);
- + u32 conf = readl(PCI_P2P_CONF);
- return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS);
- }
-
- @@ -276,11 +278,11 @@
- unsigned long flags;
- spin_lock_irqsave(&orion5x_pci_lock, flags);
-
- - orion5x_write(PCI_CONF_ADDR, PCI_CONF_BUS(bus) |
- - PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
- - PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN);
- + writel(PCI_CONF_BUS(bus) |
- + PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
- + PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
-
- - *val = orion5x_read(PCI_CONF_DATA);
- + *val = readl(PCI_CONF_DATA);
-
- if (size == 1)
- *val = (*val >> (8*(where & 0x3))) & 0xff;
- @@ -300,9 +302,9 @@
-
- spin_lock_irqsave(&orion5x_pci_lock, flags);
-
- - orion5x_write(PCI_CONF_ADDR, PCI_CONF_BUS(bus) |
- - PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
- - PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN);
- + writel(PCI_CONF_BUS(bus) |
- + PCI_CONF_DEV(dev) | PCI_CONF_REG(where) |
- + PCI_CONF_FUNC(func) | PCI_CONF_ADDR_EN, PCI_CONF_ADDR);
-
- if (size == 4) {
- __raw_writel(val, PCI_CONF_DATA);
- @@ -353,9 +355,9 @@
-
- static void __init orion5x_pci_set_bus_nr(int nr)
- {
- - u32 p2p = orion5x_read(PCI_P2P_CONF);
- + u32 p2p = readl(PCI_P2P_CONF);
-
- - if (orion5x_read(PCI_MODE) & PCI_MODE_PCIX) {
- + if (readl(PCI_MODE) & PCI_MODE_PCIX) {
- /*
- * PCI-X mode
- */
- @@ -372,7 +374,7 @@
- */
- p2p &= ~PCI_P2P_BUS_MASK;
- p2p |= (nr << PCI_P2P_BUS_OFFS);
- - orion5x_write(PCI_P2P_CONF, p2p);
- + writel(p2p, PCI_P2P_CONF);
- }
- }
-
- @@ -399,7 +401,7 @@
- * First, disable windows.
- */
- win_enable = 0xffffffff;
- - orion5x_write(PCI_BAR_ENABLE, win_enable);
- + writel(win_enable, PCI_BAR_ENABLE);
-
- /*
- * Setup windows for DDR banks.
- @@ -425,10 +427,10 @@
- */
- reg = PCI_CONF_REG_BAR_HI_CS(cs->cs_index);
- orion5x_pci_hw_wr_conf(bus, 0, func, reg, 4, 0);
- - orion5x_write(PCI_BAR_SIZE_DDR_CS(cs->cs_index),
- - (cs->size - 1) & 0xfffff000);
- - orion5x_write(PCI_BAR_REMAP_DDR_CS(cs->cs_index),
- - cs->base & 0xfffff000);
- + writel((cs->size - 1) & 0xfffff000,
- + PCI_BAR_SIZE_DDR_CS(cs->cs_index));
- + writel(cs->base & 0xfffff000,
- + PCI_BAR_REMAP_DDR_CS(cs->cs_index));
-
- /*
- * Enable decode window for this chip select.
- @@ -439,7 +441,7 @@
- /*
- * Re-enable decode windows.
- */
- - orion5x_write(PCI_BAR_ENABLE, win_enable);
- + writel(win_enable, PCI_BAR_ENABLE);
-
- /*
- * Disable automatic update of address remaping when writing to BARs.
- --- a/arch/arm/mach-orion5x/rd88f5182-setup.c
- +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
- @@ -26,6 +26,7 @@
- #include <asm/mach/pci.h>
- #include <asm/arch/orion5x.h>
- #include "common.h"
- +#include "mpp.h"
-
- /*****************************************************************************
- * RD-88F5182 Info
- @@ -125,6 +126,7 @@
-
- leds_event = rd88f5182_dbgled_event;
- }
- +
- return 0;
- }
-
- @@ -220,7 +222,6 @@
-
- static struct mv643xx_eth_platform_data rd88f5182_eth_data = {
- .phy_addr = 8,
- - .force_phy_addr = 1,
- };
-
- /*****************************************************************************
- @@ -234,15 +235,34 @@
- * Sata
- ****************************************************************************/
- static struct mv_sata_platform_data rd88f5182_sata_data = {
- - .n_ports = 2,
- + .n_ports = 2,
- };
-
- /*****************************************************************************
- * General Setup
- ****************************************************************************/
- -
- -static struct platform_device *rd88f5182_devices[] __initdata = {
- - &rd88f5182_nor_flash,
- +static struct orion5x_mpp_mode rd88f5182_mpp_modes[] __initdata = {
- + { 0, MPP_GPIO }, /* Debug Led */
- + { 1, MPP_GPIO }, /* Reset Switch */
- + { 2, MPP_UNUSED },
- + { 3, MPP_GPIO }, /* RTC Int */
- + { 4, MPP_GPIO },
- + { 5, MPP_GPIO },
- + { 6, MPP_GPIO }, /* PCI_intA */
- + { 7, MPP_GPIO }, /* PCI_intB */
- + { 8, MPP_UNUSED },
- + { 9, MPP_UNUSED },
- + { 10, MPP_UNUSED },
- + { 11, MPP_UNUSED },
- + { 12, MPP_SATA_LED }, /* SATA 0 presence */
- + { 13, MPP_SATA_LED }, /* SATA 1 presence */
- + { 14, MPP_SATA_LED }, /* SATA 0 active */
- + { 15, MPP_SATA_LED }, /* SATA 1 active */
- + { 16, MPP_UNUSED },
- + { 17, MPP_UNUSED },
- + { 18, MPP_UNUSED },
- + { 19, MPP_UNUSED },
- + { -1 },
- };
-
- static void __init rd88f5182_init(void)
- @@ -252,35 +272,9 @@
- */
- orion5x_init();
-
- - /*
- - * Setup the CPU address decode windows for our devices
- - */
- - orion5x_setup_dev_boot_win(RD88F5182_NOR_BOOT_BASE,
- - RD88F5182_NOR_BOOT_SIZE);
- - orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE);
- -
- - /*
- - * Open a special address decode windows for the PCIe WA.
- - */
- - orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
- - ORION5X_PCIE_WA_SIZE);
- + orion5x_mpp_conf(rd88f5182_mpp_modes);
-
- /*
- - * Setup Multiplexing Pins --
- - * MPP[0] Debug Led (GPIO - Out)
- - * MPP[1] Debug Led (GPIO - Out)
- - * MPP[2] N/A
- - * MPP[3] RTC_Int (GPIO - In)
- - * MPP[4] GPIO
- - * MPP[5] GPIO
- - * MPP[6] PCI_intA (GPIO - In)
- - * MPP[7] PCI_intB (GPIO - In)
- - * MPP[8-11] N/A
- - * MPP[12] SATA 0 presence Indication
- - * MPP[13] SATA 1 presence Indication
- - * MPP[14] SATA 0 active Indication
- - * MPP[15] SATA 1 active indication
- - * MPP[16-19] Not used
- * MPP[20] PCI Clock to MV88F5182
- * MPP[21] PCI Clock to mini PCI CON11
- * MPP[22] USB 0 over current indication
- @@ -289,16 +283,23 @@
- * MPP[25] USB 0 over current enable
- */
-
- - orion5x_write(MPP_0_7_CTRL, 0x00000003);
- - orion5x_write(MPP_8_15_CTRL, 0x55550000);
- - orion5x_write(MPP_16_19_CTRL, 0x5555);
- + /*
- + * Configure peripherals.
- + */
- + orion5x_ehci0_init();
- + orion5x_ehci1_init();
- + orion5x_eth_init(&rd88f5182_eth_data);
- + orion5x_i2c_init();
- + orion5x_sata_init(&rd88f5182_sata_data);
- + orion5x_uart0_init();
-
- - orion5x_gpio_set_valid_pins(0x000000fb);
- + orion5x_setup_dev_boot_win(RD88F5182_NOR_BOOT_BASE,
- + RD88F5182_NOR_BOOT_SIZE);
- +
- + orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE);
- + platform_device_register(&rd88f5182_nor_flash);
-
- - platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices));
- i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1);
- - orion5x_eth_init(&rd88f5182_eth_data);
- - orion5x_sata_init(&rd88f5182_sata_data);
- }
-
- MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")
- --- a/arch/arm/mach-orion5x/ts209-setup.c
- +++ b/arch/arm/mach-orion5x/ts209-setup.c
- @@ -28,6 +28,8 @@
- #include <asm/mach/pci.h>
- #include <asm/arch/orion5x.h>
- #include "common.h"
- +#include "mpp.h"
- +#include "tsx09-common.h"
-
- #define QNAP_TS209_NOR_BOOT_BASE 0xf4000000
- #define QNAP_TS209_NOR_BOOT_SIZE SZ_8M
- @@ -47,52 +49,54 @@
- ***************************************************************************/
- static struct mtd_partition qnap_ts209_partitions[] = {
- {
- - .name = "U-Boot",
- - .size = 0x00080000,
- - .offset = 0x00780000,
- - .mask_flags = MTD_WRITEABLE,
- + .name = "U-Boot",
- + .size = 0x00080000,
- + .offset = 0x00780000,
- + .mask_flags = MTD_WRITEABLE,
- }, {
- - .name = "Kernel",
- - .size = 0x00200000,
- - .offset = 0,
- + .name = "Kernel",
- + .size = 0x00200000,
- + .offset = 0,
- }, {
- - .name = "RootFS1",
- - .size = 0x00400000,
- - .offset = 0x00200000,
- + .name = "RootFS1",
- + .size = 0x00400000,
- + .offset = 0x00200000,
- }, {
- - .name = "RootFS2",
- - .size = 0x00100000,
- - .offset = 0x00600000,
- + .name = "RootFS2",
- + .size = 0x00100000,
- + .offset = 0x00600000,
- }, {
- - .name = "U-Boot Config",
- - .size = 0x00020000,
- - .offset = 0x00760000,
- + .name = "U-Boot Config",
- + .size = 0x00020000,
- + .offset = 0x00760000,
- }, {
- - .name = "NAS Config",
- - .size = 0x00060000,
- - .offset = 0x00700000,
- - .mask_flags = MTD_WRITEABLE,
- - }
- + .name = "NAS Config",
- + .size = 0x00060000,
- + .offset = 0x00700000,
- + .mask_flags = MTD_WRITEABLE,
- + },
- };
-
- static struct physmap_flash_data qnap_ts209_nor_flash_data = {
- - .width = 1,
- - .parts = qnap_ts209_partitions,
- - .nr_parts = ARRAY_SIZE(qnap_ts209_partitions)
- + .width = 1,
- + .parts = qnap_ts209_partitions,
- + .nr_parts = ARRAY_SIZE(qnap_ts209_partitions)
- };
-
- static struct resource qnap_ts209_nor_flash_resource = {
- - .flags = IORESOURCE_MEM,
- - .start = QNAP_TS209_NOR_BOOT_BASE,
- - .end = QNAP_TS209_NOR_BOOT_BASE + QNAP_TS209_NOR_BOOT_SIZE - 1,
- + .flags = IORESOURCE_MEM,
- + .start = QNAP_TS209_NOR_BOOT_BASE,
- + .end = QNAP_TS209_NOR_BOOT_BASE + QNAP_TS209_NOR_BOOT_SIZE - 1,
- };
-
- static struct platform_device qnap_ts209_nor_flash = {
- - .name = "physmap-flash",
- - .id = 0,
- - .dev = { .platform_data = &qnap_ts209_nor_flash_data, },
- - .resource = &qnap_ts209_nor_flash_resource,
- - .num_resources = 1,
- + .name = "physmap-flash",
- + .id = 0,
- + .dev = {
- + .platform_data = &qnap_ts209_nor_flash_data,
- + },
- + .resource = &qnap_ts209_nor_flash_resource,
- + .num_resources = 1,
- };
-
- /*****************************************************************************
- @@ -164,12 +168,12 @@
- }
-
- static struct hw_pci qnap_ts209_pci __initdata = {
- - .nr_controllers = 2,
- - .preinit = qnap_ts209_pci_preinit,
- - .swizzle = pci_std_swizzle,
- - .setup = orion5x_pci_sys_setup,
- - .scan = orion5x_pci_sys_scan_bus,
- - .map_irq = qnap_ts209_pci_map_irq,
- + .nr_controllers = 2,
- + .preinit = qnap_ts209_pci_preinit,
- + .swizzle = pci_std_swizzle,
- + .setup = orion5x_pci_sys_setup,
- + .scan = orion5x_pci_sys_scan_bus,
- + .map_irq = qnap_ts209_pci_map_irq,
- };
-
- static int __init qnap_ts209_pci_init(void)
- @@ -183,96 +187,6 @@
- subsys_initcall(qnap_ts209_pci_init);
-
- /*****************************************************************************
- - * Ethernet
- - ****************************************************************************/
- -
- -static struct mv643xx_eth_platform_data qnap_ts209_eth_data = {
- - .phy_addr = 8,
- - .force_phy_addr = 1,
- -};
- -
- -static int __init parse_hex_nibble(char n)
- -{
- - if (n >= '0' && n <= '9')
- - return n - '0';
- -
- - if (n >= 'A' && n <= 'F')
- - return n - 'A' + 10;
- -
- - if (n >= 'a' && n <= 'f')
- - return n - 'a' + 10;
- -
- - return -1;
- -}
- -
- -static int __init parse_hex_byte(const char *b)
- -{
- - int hi;
- - int lo;
- -
- - hi = parse_hex_nibble(b[0]);
- - lo = parse_hex_nibble(b[1]);
- -
- - if (hi < 0 || lo < 0)
- - return -1;
- -
- - return (hi << 4) | lo;
- -}
- -
- -static int __init check_mac_addr(const char *addr_str)
- -{
- - u_int8_t addr[6];
- - int i;
- -
- - for (i = 0; i < 6; i++) {
- - int byte;
- -
- - /*
- - * Enforce "xx:xx:xx:xx:xx:xx\n" format.
- - */
- - if (addr_str[(i * 3) + 2] != ((i < 5) ? ':' : '\n'))
- - return -1;
- -
- - byte = parse_hex_byte(addr_str + (i * 3));
- - if (byte < 0)
- - return -1;
- - addr[i] = byte;
- - }
- -
- - printk(KERN_INFO "ts209: found ethernet mac address ");
- - for (i = 0; i < 6; i++)
- - printk("%.2x%s", addr[i], (i < 5) ? ":" : ".\n");
- -
- - memcpy(qnap_ts209_eth_data.mac_addr, addr, 6);
- -
- - return 0;
- -}
- -
- -/*
- - * The 'NAS Config' flash partition has an ext2 filesystem which
- - * contains a file that has the ethernet MAC address in plain text
- - * (format "xx:xx:xx:xx:xx:xx\n".)
- - */
- -static void __init ts209_find_mac_addr(void)
- -{
- - unsigned long addr;
- -
- - for (addr = 0x00700000; addr < 0x00760000; addr += 1024) {
- - char *nor_page;
- - int ret = 0;
- -
- - nor_page = ioremap(QNAP_TS209_NOR_BOOT_BASE + addr, 1024);
- - if (nor_page != NULL) {
- - ret = check_mac_addr(nor_page);
- - iounmap(nor_page);
- - }
- -
- - if (ret == 0)
- - break;
- - }
- -}
- -
- -/*****************************************************************************
- * RTC S35390A on I2C bus
- ****************************************************************************/
-
- @@ -280,7 +194,7 @@
-
- static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = {
- I2C_BOARD_INFO("s35390a", 0x30),
- - .irq = 0,
- + .irq = 0,
- };
-
- /****************************************************************************
- @@ -297,70 +211,63 @@
- .gpio = QNAP_TS209_GPIO_KEY_MEDIA,
- .desc = "USB Copy Button",
- .active_low = 1,
- - },
- - {
- + }, {
- .code = KEY_POWER,
- .gpio = QNAP_TS209_GPIO_KEY_RESET,
- .desc = "Reset Button",
- .active_low = 1,
- - }
- + },
- };
-
- static struct gpio_keys_platform_data qnap_ts209_button_data = {
- .buttons = qnap_ts209_buttons,
- - .nbuttons = ARRAY_SIZE(qnap_ts209_buttons),
- + .nbuttons = ARRAY_SIZE(qnap_ts209_buttons),
- };
-
- static struct platform_device qnap_ts209_button_device = {
- .name = "gpio-keys",
- .id = -1,
- .num_resources = 0,
- - .dev = { .platform_data = &qnap_ts209_button_data, },
- + .dev = {
- + .platform_data = &qnap_ts209_button_data,
- + },
- };
-
- /*****************************************************************************
- * SATA
- ****************************************************************************/
- static struct mv_sata_platform_data qnap_ts209_sata_data = {
- - .n_ports = 2,
- + .n_ports = 2,
- };
-
- /*****************************************************************************
-
- * General Setup
- ****************************************************************************/
- -
- -static struct platform_device *qnap_ts209_devices[] __initdata = {
- - &qnap_ts209_nor_flash,
- - &qnap_ts209_button_device,
- +static struct orion5x_mpp_mode ts209_mpp_modes[] __initdata = {
- + { 0, MPP_UNUSED },
- + { 1, MPP_GPIO }, /* USB copy button */
- + { 2, MPP_GPIO }, /* Load defaults button */
- + { 3, MPP_GPIO }, /* GPIO RTC */
- + { 4, MPP_UNUSED },
- + { 5, MPP_UNUSED },
- + { 6, MPP_GPIO }, /* PCI Int A */
- + { 7, MPP_GPIO }, /* PCI Int B */
- + { 8, MPP_UNUSED },
- + { 9, MPP_UNUSED },
- + { 10, MPP_UNUSED },
- + { 11, MPP_UNUSED },
- + { 12, MPP_SATA_LED }, /* SATA 0 presence */
- + { 13, MPP_SATA_LED }, /* SATA 1 presence */
- + { 14, MPP_SATA_LED }, /* SATA 0 active */
- + { 15, MPP_SATA_LED }, /* SATA 1 active */
- + { 16, MPP_UART }, /* UART1 RXD */
- + { 17, MPP_UART }, /* UART1 TXD */
- + { 18, MPP_GPIO }, /* SW_RST */
- + { 19, MPP_UNUSED },
- + { -1 },
- };
-
- -/*
- - * QNAP TS-[12]09 specific power off method via UART1-attached PIC
- - */
- -
- -#define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2))
- -
- -static void qnap_ts209_power_off(void)
- -{
- - /* 19200 baud divisor */
- - const unsigned divisor = ((ORION5X_TCLK + (8 * 19200)) / (16 * 19200));
- -
- - pr_info("%s: triggering power-off...\n", __func__);
- -
- - /* hijack uart1 and reset into sane state (19200,8n1) */
- - orion5x_write(UART1_REG(LCR), 0x83);
- - orion5x_write(UART1_REG(DLL), divisor & 0xff);
- - orion5x_write(UART1_REG(DLM), (divisor >> 8) & 0xff);
- - orion5x_write(UART1_REG(LCR), 0x03);
- - orion5x_write(UART1_REG(IER), 0x00);
- - orion5x_write(UART1_REG(FCR), 0x00);
- - orion5x_write(UART1_REG(MCR), 0x00);
- -
- - /* send the power-off command 'A' to PIC */
- - orion5x_write(UART1_REG(TX), 'A');
- -}
- -
- static void __init qnap_ts209_init(void)
- {
- /*
- @@ -368,51 +275,33 @@
- */
- orion5x_init();
-
- - /*
- - * Setup flash mapping
- - */
- - orion5x_setup_dev_boot_win(QNAP_TS209_NOR_BOOT_BASE,
- - QNAP_TS209_NOR_BOOT_SIZE);
- -
- - /*
- - * Open a special address decode windows for the PCIe WA.
- - */
- - orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
- - ORION5X_PCIE_WA_SIZE);
- + orion5x_mpp_conf(ts209_mpp_modes);
-
- /*
- - * Setup Multiplexing Pins --
- - * MPP[0] Reserved
- - * MPP[1] USB copy button (0 active)
- - * MPP[2] Load defaults button (0 active)
- - * MPP[3] GPIO RTC
- - * MPP[4-5] Reserved
- - * MPP[6] PCI Int A
- - * MPP[7] PCI Int B
- - * MPP[8-11] Reserved
- - * MPP[12] SATA 0 presence
- - * MPP[13] SATA 1 presence
- - * MPP[14] SATA 0 active
- - * MPP[15] SATA 1 active
- - * MPP[16] UART1 RXD
- - * MPP[17] UART1 TXD
- - * MPP[18] SW_RST (0 active)
- - * MPP[19] Reserved
- * MPP[20] PCI clock 0
- * MPP[21] PCI clock 1
- * MPP[22] USB 0 over current
- * MPP[23-25] Reserved
- */
- - orion5x_write(MPP_0_7_CTRL, 0x3);
- - orion5x_write(MPP_8_15_CTRL, 0x55550000);
- - orion5x_write(MPP_16_19_CTRL, 0x5500);
- - orion5x_gpio_set_valid_pins(0x3cc0fff);
-
- - /* register ts209 specific power-off method */
- - pm_power_off = qnap_ts209_power_off;
- + /*
- + * Configure peripherals.
- + */
- + orion5x_ehci0_init();
- + orion5x_ehci1_init();
- + qnap_tsx09_find_mac_addr(QNAP_TS209_NOR_BOOT_BASE +
- + qnap_ts209_partitions[5].offset,
- + qnap_ts209_partitions[5].size);
- + orion5x_eth_init(&qnap_tsx09_eth_data);
- + orion5x_i2c_init();
- + orion5x_sata_init(&qnap_ts209_sata_data);
- + orion5x_uart0_init();
- +
- + orion5x_setup_dev_boot_win(QNAP_TS209_NOR_BOOT_BASE,
- + QNAP_TS209_NOR_BOOT_SIZE);
- + platform_device_register(&qnap_ts209_nor_flash);
-
- - platform_add_devices(qnap_ts209_devices,
- - ARRAY_SIZE(qnap_ts209_devices));
- + platform_device_register(&qnap_ts209_button_device);
-
- /* Get RTC IRQ and register the chip */
- if (gpio_request(TS209_RTC_GPIO, "rtc") == 0) {
- @@ -425,14 +314,12 @@
- pr_warning("qnap_ts209_init: failed to get RTC IRQ\n");
- i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1);
-
- - ts209_find_mac_addr();
- - orion5x_eth_init(&qnap_ts209_eth_data);
- -
- - orion5x_sata_init(&qnap_ts209_sata_data);
- + /* register tsx09 specific power-off method */
- + pm_power_off = qnap_tsx09_power_off;
- }
-
- MACHINE_START(TS209, "QNAP TS-109/TS-209")
- - /* Maintainer: Byron Bradley <[email protected]> */
- + /* Maintainer: Byron Bradley <[email protected]> */
- .phys_io = ORION5X_REGS_PHYS_BASE,
- .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
- .boot_params = 0x00000100,
- --- /dev/null
- +++ b/arch/arm/mach-orion5x/ts409-setup.c
- @@ -0,0 +1,273 @@
- +/*
- + * QNAP TS-409 Board Setup
- + *
- + * Maintainer: Sylver Bruneau <[email protected]>
- + *
- + * This program is free software; you can redistribute it and/or
- + * modify it under the terms of the GNU General Public License
- + * as published by the Free Software Foundation; either version
- + * 2 of the License, or (at your option) any later version.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/pci.h>
- +#include <linux/irq.h>
- +#include <linux/mtd/physmap.h>
- +#include <linux/mv643xx_eth.h>
- +#include <linux/gpio_keys.h>
- +#include <linux/input.h>
- +#include <linux/i2c.h>
- +#include <linux/serial_reg.h>
- +#include <asm/mach-types.h>
- +#include <asm/gpio.h>
- +#include <asm/mach/arch.h>
- +#include <asm/mach/pci.h>
- +#include <asm/arch/orion5x.h>
- +#include "common.h"
- +#include "mpp.h"
- +#include "tsx09-common.h"
- +
- +/*****************************************************************************
- + * QNAP TS-409 Info
- + ****************************************************************************/
- +
- +/*
- + * QNAP TS-409 hardware :
- + * - Marvell 88F5281-D0
- + * - Marvell 88SX7042 SATA controller (PCIe)
- + * - Marvell 88E1118 Gigabit Ethernet PHY
- + * - RTC S35390A (@0x30) on I2C bus
- + * - 8MB NOR flash
- + * - 256MB of DDR-2 RAM
- + */
- +
- +/*
- + * 8MB NOR flash Device bus boot chip select
- + */
- +
- +#define QNAP_TS409_NOR_BOOT_BASE 0xff800000
- +#define QNAP_TS409_NOR_BOOT_SIZE SZ_8M
- +
- +/****************************************************************************
- + * 8MiB NOR flash. The struct mtd_partition is not in the same order as the
- + * partitions on the device because we want to keep compatability with
- + * existing QNAP firmware.
- + *
- + * Layout as used by QNAP:
- + * [2] 0x00000000-0x00200000 : "Kernel"
- + * [3] 0x00200000-0x00600000 : "RootFS1"
- + * [4] 0x00600000-0x00700000 : "RootFS2"
- + * [6] 0x00700000-0x00760000 : "NAS Config" (read-only)
- + * [5] 0x00760000-0x00780000 : "U-Boot Config"
- + * [1] 0x00780000-0x00800000 : "U-Boot" (read-only)
- + ***************************************************************************/
- +static struct mtd_partition qnap_ts409_partitions[] = {
- + {
- + .name = "U-Boot",
- + .size = 0x00080000,
- + .offset = 0x00780000,
- + .mask_flags = MTD_WRITEABLE,
- + }, {
- + .name = "Kernel",
- + .size = 0x00200000,
- + .offset = 0,
- + }, {
- + .name = "RootFS1",
- + .size = 0x00400000,
- + .offset = 0x00200000,
- + }, {
- + .name = "RootFS2",
- + .size = 0x00100000,
- + .offset = 0x00600000,
- + }, {
- + .name = "U-Boot Config",
- + .size = 0x00020000,
- + .offset = 0x00760000,
- + }, {
- + .name = "NAS Config",
- + .size = 0x00060000,
- + .offset = 0x00700000,
- + .mask_flags = MTD_WRITEABLE,
- + },
- +};
- +
- +static struct physmap_flash_data qnap_ts409_nor_flash_data = {
- + .width = 1,
- + .parts = qnap_ts409_partitions,
- + .nr_parts = ARRAY_SIZE(qnap_ts409_partitions)
- +};
- +
- +static struct resource qnap_ts409_nor_flash_resource = {
- + .flags = IORESOURCE_MEM,
- + .start = QNAP_TS409_NOR_BOOT_BASE,
- + .end = QNAP_TS409_NOR_BOOT_BASE + QNAP_TS409_NOR_BOOT_SIZE - 1,
- +};
- +
- +static struct platform_device qnap_ts409_nor_flash = {
- + .name = "physmap-flash",
- + .id = 0,
- + .dev = { .platform_data = &qnap_ts409_nor_flash_data, },
- + .num_resources = 1,
- + .resource = &qnap_ts409_nor_flash_resource,
- +};
- +
- +/*****************************************************************************
- + * PCI
- + ****************************************************************************/
- +
- +static int __init qnap_ts409_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
- +{
- + int irq;
- +
- + /*
- + * Check for devices with hard-wired IRQs.
- + */
- + irq = orion5x_pci_map_irq(dev, slot, pin);
- + if (irq != -1)
- + return irq;
- +
- + /*
- + * PCI isn't used on the TS-409
- + */
- + return -1;
- +}
- +
- +static struct hw_pci qnap_ts409_pci __initdata = {
- + .nr_controllers = 2,
- + .swizzle = pci_std_swizzle,
- + .setup = orion5x_pci_sys_setup,
- + .scan = orion5x_pci_sys_scan_bus,
- + .map_irq = qnap_ts409_pci_map_irq,
- +};
- +
- +static int __init qnap_ts409_pci_init(void)
- +{
- + if (machine_is_ts409())
- + pci_common_init(&qnap_ts409_pci);
- +
- + return 0;
- +}
- +
- +subsys_initcall(qnap_ts409_pci_init);
- +
- +/*****************************************************************************
- + * RTC S35390A on I2C bus
- + ****************************************************************************/
- +
- +#define TS409_RTC_GPIO 10
- +
- +static struct i2c_board_info __initdata qnap_ts409_i2c_rtc = {
- + I2C_BOARD_INFO("s35390a", 0x30),
- +};
- +
- +/****************************************************************************
- + * GPIO Attached Keys
- + * Power button is attached to the PIC microcontroller
- + ****************************************************************************/
- +
- +#define QNAP_TS409_GPIO_KEY_MEDIA 15
- +
- +static struct gpio_keys_button qnap_ts409_buttons[] = {
- + {
- + .code = KEY_RESTART,
- + .gpio = QNAP_TS409_GPIO_KEY_MEDIA,
- + .desc = "USB Copy Button",
- + .active_low = 1,
- + },
- +};
- +
- +static struct gpio_keys_platform_data qnap_ts409_button_data = {
- + .buttons = qnap_ts409_buttons,
- + .nbuttons = ARRAY_SIZE(qnap_ts409_buttons),
- +};
- +
- +static struct platform_device qnap_ts409_button_device = {
- + .name = "gpio-keys",
- + .id = -1,
- + .num_resources = 0,
- + .dev = {
- + .platform_data = &qnap_ts409_button_data,
- + },
- +};
- +
- +/*****************************************************************************
- + * General Setup
- + ****************************************************************************/
- +static struct orion5x_mpp_mode ts409_mpp_modes[] __initdata = {
- + { 0, MPP_UNUSED },
- + { 1, MPP_UNUSED },
- + { 2, MPP_UNUSED },
- + { 3, MPP_UNUSED },
- + { 4, MPP_GPIO }, /* HDD 1 status */
- + { 5, MPP_GPIO }, /* HDD 2 status */
- + { 6, MPP_GPIO }, /* HDD 3 status */
- + { 7, MPP_GPIO }, /* HDD 4 status */
- + { 8, MPP_UNUSED },
- + { 9, MPP_UNUSED },
- + { 10, MPP_GPIO }, /* RTC int */
- + { 11, MPP_UNUSED },
- + { 12, MPP_UNUSED },
- + { 13, MPP_UNUSED },
- + { 14, MPP_GPIO }, /* SW_RST */
- + { 15, MPP_GPIO }, /* USB copy button */
- + { 16, MPP_UART }, /* UART1 RXD */
- + { 17, MPP_UART }, /* UART1 TXD */
- + { 18, MPP_UNUSED },
- + { 19, MPP_UNUSED },
- + { -1 },
- +};
- +
- +static void __init qnap_ts409_init(void)
- +{
- + /*
- + * Setup basic Orion functions. Need to be called early.
- + */
- + orion5x_init();
- +
- + orion5x_mpp_conf(ts409_mpp_modes);
- +
- + /*
- + * Configure peripherals.
- + */
- + orion5x_ehci0_init();
- + qnap_tsx09_find_mac_addr(QNAP_TS409_NOR_BOOT_BASE +
- + qnap_ts409_partitions[5].offset,
- + qnap_ts409_partitions[5].size);
- + orion5x_eth_init(&qnap_tsx09_eth_data);
- + orion5x_i2c_init();
- + orion5x_uart0_init();
- +
- + orion5x_setup_dev_boot_win(QNAP_TS409_NOR_BOOT_BASE,
- + QNAP_TS409_NOR_BOOT_SIZE);
- + platform_device_register(&qnap_ts409_nor_flash);
- +
- + platform_device_register(&qnap_ts409_button_device);
- +
- + /* Get RTC IRQ and register the chip */
- + if (gpio_request(TS409_RTC_GPIO, "rtc") == 0) {
- + if (gpio_direction_input(TS409_RTC_GPIO) == 0)
- + qnap_ts409_i2c_rtc.irq = gpio_to_irq(TS409_RTC_GPIO);
- + else
- + gpio_free(TS409_RTC_GPIO);
- + }
- + if (qnap_ts409_i2c_rtc.irq == 0)
- + pr_warning("qnap_ts409_init: failed to get RTC IRQ\n");
- + i2c_register_board_info(0, &qnap_ts409_i2c_rtc, 1);
- +
- + /* register tsx09 specific power-off method */
- + pm_power_off = qnap_tsx09_power_off;
- +}
- +
- +MACHINE_START(TS409, "QNAP TS-409")
- + /* Maintainer: Sylver Bruneau <[email protected]> */
- + .phys_io = ORION5X_REGS_PHYS_BASE,
- + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
- + .boot_params = 0x00000100,
- + .init_machine = qnap_ts409_init,
- + .map_io = orion5x_map_io,
- + .init_irq = orion5x_init_irq,
- + .timer = &orion5x_timer,
- + .fixup = tag_fixup_mem32,
- +MACHINE_END
- --- /dev/null
- +++ b/arch/arm/mach-orion5x/ts78xx-setup.c
- @@ -0,0 +1,277 @@
- +/*
- + * arch/arm/mach-orion5x/ts78xx-setup.c
- + *
- + * Maintainer: Alexander Clouter <[email protected]>
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/mtd/physmap.h>
- +#include <linux/mv643xx_eth.h>
- +#include <linux/ata_platform.h>
- +#include <linux/m48t86.h>
- +#include <asm/mach-types.h>
- +#include <asm/mach/arch.h>
- +#include <asm/mach/map.h>
- +#include <asm/arch/orion5x.h>
- +#include "common.h"
- +#include "mpp.h"
- +
- +/*****************************************************************************
- + * TS-78xx Info
- + ****************************************************************************/
- +
- +/*
- + * FPGA - lives where the PCI bus would be at ORION5X_PCI_MEM_PHYS_BASE
- + */
- +#define TS78XX_FPGA_REGS_PHYS_BASE 0xe8000000
- +#define TS78XX_FPGA_REGS_VIRT_BASE 0xff900000
- +#define TS78XX_FPGA_REGS_SIZE SZ_1M
- +
- +#define TS78XX_FPGA_REGS_SYSCON_ID (TS78XX_FPGA_REGS_VIRT_BASE | 0x000)
- +#define TS78XX_FPGA_REGS_SYSCON_LCDI (TS78XX_FPGA_REGS_VIRT_BASE | 0x004)
- +#define TS78XX_FPGA_REGS_SYSCON_LCDO (TS78XX_FPGA_REGS_VIRT_BASE | 0x008)
- +
- +#define TS78XX_FPGA_REGS_RTC_CTRL (TS78XX_FPGA_REGS_VIRT_BASE | 0x808)
- +#define TS78XX_FPGA_REGS_RTC_DATA (TS78XX_FPGA_REGS_VIRT_BASE | 0x80c)
- +
- +/*
- + * 512kB NOR flash Device
- + */
- +#define TS78XX_NOR_BOOT_BASE 0xff800000
- +#define TS78XX_NOR_BOOT_SIZE SZ_512K
- +
- +/*****************************************************************************
- + * I/O Address Mapping
- + ****************************************************************************/
- +static struct map_desc ts78xx_io_desc[] __initdata = {
- + {
- + .virtual = TS78XX_FPGA_REGS_VIRT_BASE,
- + .pfn = __phys_to_pfn(TS78XX_FPGA_REGS_PHYS_BASE),
- + .length = TS78XX_FPGA_REGS_SIZE,
- + .type = MT_DEVICE,
- + },
- +};
- +
- +void __init ts78xx_map_io(void)
- +{
- + orion5x_map_io();
- + iotable_init(ts78xx_io_desc, ARRAY_SIZE(ts78xx_io_desc));
- +}
- +
- +/*****************************************************************************
- + * 512kB NOR Boot Flash - the chip is a M25P40
- + ****************************************************************************/
- +static struct mtd_partition ts78xx_nor_boot_flash_resources[] = {
- + {
- + .name = "ts-bootrom",
- + .offset = 0,
- + /* only the first 256kB is used */
- + .size = SZ_256K,
- + .mask_flags = MTD_WRITEABLE,
- + },
- +};
- +
- +static struct physmap_flash_data ts78xx_nor_boot_flash_data = {
- + .width = 1,
- + .parts = ts78xx_nor_boot_flash_resources,
- + .nr_parts = ARRAY_SIZE(ts78xx_nor_boot_flash_resources),
- +};
- +
- +static struct resource ts78xx_nor_boot_flash_resource = {
- + .flags = IORESOURCE_MEM,
- + .start = TS78XX_NOR_BOOT_BASE,
- + .end = TS78XX_NOR_BOOT_BASE + TS78XX_NOR_BOOT_SIZE - 1,
- +};
- +
- +static struct platform_device ts78xx_nor_boot_flash = {
- + .name = "physmap-flash",
- + .id = -1,
- + .dev = {
- + .platform_data = &ts78xx_nor_boot_flash_data,
- + },
- + .num_resources = 1,
- + .resource = &ts78xx_nor_boot_flash_resource,
- +};
- +
- +/*****************************************************************************
- + * Ethernet
- + ****************************************************************************/
- +static struct mv643xx_eth_platform_data ts78xx_eth_data = {
- + .phy_addr = 0,
- + .force_phy_addr = 1,
- +};
- +
- +/*****************************************************************************
- + * RTC M48T86 - nicked^Wborrowed from arch/arm/mach-ep93xx/ts72xx.c
- + ****************************************************************************/
- +#ifdef CONFIG_RTC_DRV_M48T86
- +static unsigned char ts78xx_rtc_readbyte(unsigned long addr)
- +{
- + writeb(addr, TS78XX_FPGA_REGS_RTC_CTRL);
- + return readb(TS78XX_FPGA_REGS_RTC_DATA);
- +}
- +
- +static void ts78xx_rtc_writebyte(unsigned char value, unsigned long addr)
- +{
- + writeb(addr, TS78XX_FPGA_REGS_RTC_CTRL);
- + writeb(value, TS78XX_FPGA_REGS_RTC_DATA);
- +}
- +
- +static struct m48t86_ops ts78xx_rtc_ops = {
- + .readbyte = ts78xx_rtc_readbyte,
- + .writebyte = ts78xx_rtc_writebyte,
- +};
- +
- +static struct platform_device ts78xx_rtc_device = {
- + .name = "rtc-m48t86",
- + .id = -1,
- + .dev = {
- + .platform_data = &ts78xx_rtc_ops,
- + },
- + .num_resources = 0,
- +};
- +
- +/*
- + * TS uses some of the user storage space on the RTC chip so see if it is
- + * present; as it's an optional feature at purchase time and not all boards
- + * will have it present
- + *
- + * I've used the method TS use in their rtc7800.c example for the detection
- + *
- + * TODO: track down a guinea pig without an RTC to see if we can work out a
- + * better RTC detection routine
- + */
- +static int __init ts78xx_rtc_init(void)
- +{
- + unsigned char tmp_rtc0, tmp_rtc1;
- +
- + tmp_rtc0 = ts78xx_rtc_readbyte(126);
- + tmp_rtc1 = ts78xx_rtc_readbyte(127);
- +
- + ts78xx_rtc_writebyte(0x00, 126);
- + ts78xx_rtc_writebyte(0x55, 127);
- + if (ts78xx_rtc_readbyte(127) == 0x55) {
- + ts78xx_rtc_writebyte(0xaa, 127);
- + if (ts78xx_rtc_readbyte(127) == 0xaa
- + && ts78xx_rtc_readbyte(126) == 0x00) {
- + ts78xx_rtc_writebyte(tmp_rtc0, 126);
- + ts78xx_rtc_writebyte(tmp_rtc1, 127);
- + platform_device_register(&ts78xx_rtc_device);
- + return 1;
- + }
- + }
- +
- + return 0;
- +};
- +#else
- +static int __init ts78xx_rtc_init(void)
- +{
- + return 0;
- +}
- +#endif
- +
- +/*****************************************************************************
- + * SATA
- + ****************************************************************************/
- +static struct mv_sata_platform_data ts78xx_sata_data = {
- + .n_ports = 2,
- +};
- +
- +/*****************************************************************************
- + * print some information regarding the board
- + ****************************************************************************/
- +static void __init ts78xx_print_board_id(void)
- +{
- + unsigned int board_info;
- +
- + board_info = readl(TS78XX_FPGA_REGS_SYSCON_ID);
- + printk(KERN_INFO "TS-78xx Info: FPGA rev=%.2x, Board Magic=%.6x, ",
- + board_info & 0xff,
- + (board_info >> 8) & 0xffffff);
- + board_info = readl(TS78XX_FPGA_REGS_SYSCON_LCDI);
- + printk("JP1=%d, JP2=%d\n",
- + (board_info >> 30) & 0x1,
- + (board_info >> 31) & 0x1);
- +};
- +
- +/*****************************************************************************
- + * General Setup
- + ****************************************************************************/
- +static struct orion5x_mpp_mode ts78xx_mpp_modes[] __initdata = {
- + { 0, MPP_UNUSED },
- + { 1, MPP_GPIO }, /* JTAG Clock */
- + { 2, MPP_GPIO }, /* JTAG Data In */
- + { 3, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB2B */
- + { 4, MPP_GPIO }, /* JTAG Data Out */
- + { 5, MPP_GPIO }, /* JTAG TMS */
- + { 6, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB31A_CLK4+ */
- + { 7, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB22B */
- + { 8, MPP_UNUSED },
- + { 9, MPP_UNUSED },
- + { 10, MPP_UNUSED },
- + { 11, MPP_UNUSED },
- + { 12, MPP_UNUSED },
- + { 13, MPP_UNUSED },
- + { 14, MPP_UNUSED },
- + { 15, MPP_UNUSED },
- + { 16, MPP_UART },
- + { 17, MPP_UART },
- + { 18, MPP_UART },
- + { 19, MPP_UART },
- + { -1 },
- +};
- +
- +static void __init ts78xx_init(void)
- +{
- + /*
- + * Setup basic Orion functions. Need to be called early.
- + */
- + orion5x_init();
- +
- + ts78xx_print_board_id();
- +
- + orion5x_mpp_conf(ts78xx_mpp_modes);
- +
- + /*
- + * MPP[20] PCI Clock Out 1
- + * MPP[21] PCI Clock Out 0
- + * MPP[22] Unused
- + * MPP[23] Unused
- + * MPP[24] Unused
- + * MPP[25] Unused
- + */
- +
- + /*
- + * Configure peripherals.
- + */
- + orion5x_ehci0_init();
- + orion5x_ehci1_init();
- + orion5x_eth_init(&ts78xx_eth_data);
- + orion5x_sata_init(&ts78xx_sata_data);
- + orion5x_uart0_init();
- + orion5x_uart1_init();
- +
- + orion5x_setup_dev_boot_win(TS78XX_NOR_BOOT_BASE,
- + TS78XX_NOR_BOOT_SIZE);
- + platform_device_register(&ts78xx_nor_boot_flash);
- +
- + if (!ts78xx_rtc_init())
- + printk(KERN_INFO "TS-78xx RTC not detected or enabled\n");
- +}
- +
- +MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC")
- + /* Maintainer: Alexander Clouter <[email protected]> */
- + .phys_io = ORION5X_REGS_PHYS_BASE,
- + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
- + .boot_params = 0x00000100,
- + .init_machine = ts78xx_init,
- + .map_io = ts78xx_map_io,
- + .init_irq = orion5x_init_irq,
- + .timer = &orion5x_timer,
- +MACHINE_END
- --- /dev/null
- +++ b/arch/arm/mach-orion5x/tsx09-common.c
- @@ -0,0 +1,132 @@
- +/*
- + * QNAP TS-x09 Boards common functions
- + *
- + * Maintainers: Lennert Buytenhek <[email protected]>
- + * Byron Bradley <[email protected]>
- + *
- + * This program is free software; you can redistribute it and/or
- + * modify it under the terms of the GNU General Public License
- + * as published by the Free Software Foundation; either version
- + * 2 of the License, or (at your option) any later version.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/pci.h>
- +#include <linux/mv643xx_eth.h>
- +#include <linux/serial_reg.h>
- +#include "tsx09-common.h"
- +
- +/*****************************************************************************
- + * QNAP TS-x09 specific power off method via UART1-attached PIC
- + ****************************************************************************/
- +
- +#define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2))
- +
- +void qnap_tsx09_power_off(void)
- +{
- + /* 19200 baud divisor */
- + const unsigned divisor = ((ORION5X_TCLK + (8 * 19200)) / (16 * 19200));
- +
- + pr_info("%s: triggering power-off...\n", __func__);
- +
- + /* hijack uart1 and reset into sane state (19200,8n1) */
- + writel(0x83, UART1_REG(LCR));
- + writel(divisor & 0xff, UART1_REG(DLL));
- + writel((divisor >> 8) & 0xff, UART1_REG(DLM));
- + writel(0x03, UART1_REG(LCR));
- + writel(0x00, UART1_REG(IER));
- + writel(0x00, UART1_REG(FCR));
- + writel(0x00, UART1_REG(MCR));
- +
- + /* send the power-off command 'A' to PIC */
- + writel('A', UART1_REG(TX));
- +}
- +
- +/*****************************************************************************
- + * Ethernet
- + ****************************************************************************/
- +
- +struct mv643xx_eth_platform_data qnap_tsx09_eth_data = {
- + .phy_addr = 8,
- +};
- +
- +static int __init qnap_tsx09_parse_hex_nibble(char n)
- +{
- + if (n >= '0' && n <= '9')
- + return n - '0';
- +
- + if (n >= 'A' && n <= 'F')
- + return n - 'A' + 10;
- +
- + if (n >= 'a' && n <= 'f')
- + return n - 'a' + 10;
- +
- + return -1;
- +}
- +
- +static int __init qnap_tsx09_parse_hex_byte(const char *b)
- +{
- + int hi;
- + int lo;
- +
- + hi = qnap_tsx09_parse_hex_nibble(b[0]);
- + lo = qnap_tsx09_parse_hex_nibble(b[1]);
- +
- + if (hi < 0 || lo < 0)
- + return -1;
- +
- + return (hi << 4) | lo;
- +}
- +
- +static int __init qnap_tsx09_check_mac_addr(const char *addr_str)
- +{
- + u_int8_t addr[6];
- + int i;
- +
- + for (i = 0; i < 6; i++) {
- + int byte;
- +
- + /*
- + * Enforce "xx:xx:xx:xx:xx:xx\n" format.
- + */
- + if (addr_str[(i * 3) + 2] != ((i < 5) ? ':' : '\n'))
- + return -1;
- +
- + byte = qnap_tsx09_parse_hex_byte(addr_str + (i * 3));
- + if (byte < 0)
- + return -1;
- + addr[i] = byte;
- + }
- +
- + printk(KERN_INFO "tsx09: found ethernet mac address ");
- + for (i = 0; i < 6; i++)
- + printk("%.2x%s", addr[i], (i < 5) ? ":" : ".\n");
- +
- + memcpy(qnap_tsx09_eth_data.mac_addr, addr, 6);
- +
- + return 0;
- +}
- +
- +/*
- + * The 'NAS Config' flash partition has an ext2 filesystem which
- + * contains a file that has the ethernet MAC address in plain text
- + * (format "xx:xx:xx:xx:xx:xx\n").
- + */
- +void __init qnap_tsx09_find_mac_addr(u32 mem_base, u32 size)
- +{
- + unsigned long addr;
- +
- + for (addr = mem_base; addr < (mem_base + size); addr += 1024) {
- + char *nor_page;
- + int ret = 0;
- +
- + nor_page = ioremap(addr, 1024);
- + if (nor_page != NULL) {
- + ret = qnap_tsx09_check_mac_addr(nor_page);
- + iounmap(nor_page);
- + }
- +
- + if (ret == 0)
- + break;
- + }
- +}
- --- /dev/null
- +++ b/arch/arm/mach-orion5x/tsx09-common.h
- @@ -0,0 +1,20 @@
- +#ifndef __ARCH_ORION5X_TSX09_COMMON_H
- +#define __ARCH_ORION5X_TSX09_COMMON_H
- +
- +/*
- + * QNAP TS-x09 Boards power-off function
- + */
- +extern void qnap_tsx09_power_off(void);
- +
- +/*
- + * QNAP TS-x09 Boards function to find Ethernet MAC address in flash memory
- + */
- +extern void __init qnap_tsx09_find_mac_addr(u32 mem_base, u32 size);
- +
- +/*
- + * QNAP TS-x09 Boards ethernet declaration
- + */
- +extern struct mv643xx_eth_platform_data qnap_tsx09_eth_data;
- +
- +
- +#endif
- --- /dev/null
- +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
- @@ -0,0 +1,173 @@
- +/*
- + * arch/arm/mach-orion5x/wrt350n-v2-setup.c
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/kernel.h>
- +#include <linux/init.h>
- +#include <linux/platform_device.h>
- +#include <linux/pci.h>
- +#include <linux/irq.h>
- +#include <linux/delay.h>
- +#include <linux/mtd/physmap.h>
- +#include <linux/mv643xx_eth.h>
- +#include <asm/mach-types.h>
- +#include <asm/gpio.h>
- +#include <asm/mach/arch.h>
- +#include <asm/mach/pci.h>
- +#include <asm/arch/orion5x.h>
- +#include "common.h"
- +#include "mpp.h"
- +
- +static struct orion5x_mpp_mode wrt350n_v2_mpp_modes[] __initdata = {
- + { 0, MPP_GPIO }, /* Power LED green (0=on) */
- + { 1, MPP_GPIO }, /* Security LED (0=on) */
- + { 2, MPP_GPIO }, /* Internal Button (0=on) */
- + { 3, MPP_GPIO }, /* Reset Button (0=on) */
- + { 4, MPP_GPIO }, /* PCI int */
- + { 5, MPP_GPIO }, /* Power LED orange (0=on) */
- + { 6, MPP_GPIO }, /* USB LED (0=on) */
- + { 7, MPP_GPIO }, /* Wireless LED (0=on) */
- + { 8, MPP_UNUSED }, /* ??? */
- + { 9, MPP_GIGE }, /* GE_RXERR */
- + { 10, MPP_UNUSED }, /* ??? */
- + { 11, MPP_UNUSED }, /* ??? */
- + { 12, MPP_GIGE }, /* GE_TXD[4] */
- + { 13, MPP_GIGE }, /* GE_TXD[5] */
- + { 14, MPP_GIGE }, /* GE_TXD[6] */
- + { 15, MPP_GIGE }, /* GE_TXD[7] */
- + { 16, MPP_GIGE }, /* GE_RXD[4] */
- + { 17, MPP_GIGE }, /* GE_RXD[5] */
- + { 18, MPP_GIGE }, /* GE_RXD[6] */
- + { 19, MPP_GIGE }, /* GE_RXD[7] */
- + { -1 },
- +};
- +
- +/*
- + * 8M NOR flash Device bus boot chip select
- + */
- +#define WRT350N_V2_NOR_BOOT_BASE 0xf4000000
- +#define WRT350N_V2_NOR_BOOT_SIZE SZ_8M
- +
- +static struct mtd_partition wrt350n_v2_nor_flash_partitions[] = {
- + {
- + .name = "kernel",
- + .offset = 0x00000000,
- + .size = 0x00760000,
- + }, {
- + .name = "rootfs",
- + .offset = 0x001a0000,
- + .size = 0x005c0000,
- + }, {
- + .name = "lang",
- + .offset = 0x00760000,
- + .size = 0x00040000,
- + }, {
- + .name = "nvram",
- + .offset = 0x007a0000,
- + .size = 0x00020000,
- + }, {
- + .name = "u-boot",
- + .offset = 0x007c0000,
- + .size = 0x00040000,
- + },
- +};
- +
- +static struct physmap_flash_data wrt350n_v2_nor_flash_data = {
- + .width = 1,
- + .parts = wrt350n_v2_nor_flash_partitions,
- + .nr_parts = ARRAY_SIZE(wrt350n_v2_nor_flash_partitions),
- +};
- +
- +static struct resource wrt350n_v2_nor_flash_resource = {
- + .flags = IORESOURCE_MEM,
- + .start = WRT350N_V2_NOR_BOOT_BASE,
- + .end = WRT350N_V2_NOR_BOOT_BASE + WRT350N_V2_NOR_BOOT_SIZE - 1,
- +};
- +
- +static struct platform_device wrt350n_v2_nor_flash = {
- + .name = "physmap-flash",
- + .id = 0,
- + .dev = {
- + .platform_data = &wrt350n_v2_nor_flash_data,
- + },
- + .num_resources = 1,
- + .resource = &wrt350n_v2_nor_flash_resource,
- +};
- +
- +static struct mv643xx_eth_platform_data wrt350n_v2_eth_data = {
- + .phy_addr = -1,
- +};
- +
- +static void __init wrt350n_v2_init(void)
- +{
- + /*
- + * Setup basic Orion functions. Need to be called early.
- + */
- + orion5x_init();
- +
- + orion5x_mpp_conf(wrt350n_v2_mpp_modes);
- +
- + /*
- + * Configure peripherals.
- + */
- + orion5x_ehci0_init();
- + orion5x_eth_init(&wrt350n_v2_eth_data);
- + orion5x_uart0_init();
- +
- + orion5x_setup_dev_boot_win(WRT350N_V2_NOR_BOOT_BASE,
- + WRT350N_V2_NOR_BOOT_SIZE);
- + platform_device_register(&wrt350n_v2_nor_flash);
- +}
- +
- +static int __init wrt350n_v2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
- +{
- + int irq;
- +
- + /*
- + * Check for devices with hard-wired IRQs.
- + */
- + irq = orion5x_pci_map_irq(dev, slot, pin);
- + if (irq != -1)
- + return irq;
- +
- + /*
- + * Mini-PCI slot.
- + */
- + if (slot == 7)
- + return gpio_to_irq(4);
- +
- + return -1;
- +}
- +
- +static struct hw_pci wrt350n_v2_pci __initdata = {
- + .nr_controllers = 2,
- + .swizzle = pci_std_swizzle,
- + .setup = orion5x_pci_sys_setup,
- + .scan = orion5x_pci_sys_scan_bus,
- + .map_irq = wrt350n_v2_pci_map_irq,
- +};
- +
- +static int __init wrt350n_v2_pci_init(void)
- +{
- + if (machine_is_wrt350n_v2())
- + pci_common_init(&wrt350n_v2_pci);
- +
- + return 0;
- +}
- +subsys_initcall(wrt350n_v2_pci_init);
- +
- +MACHINE_START(WRT350N_V2, "Linksys WRT350N v2")
- + /* Maintainer: Lennert Buytenhek <[email protected]> */
- + .phys_io = ORION5X_REGS_PHYS_BASE,
- + .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
- + .boot_params = 0x00000100,
- + .init_machine = wrt350n_v2_init,
- + .map_io = orion5x_map_io,
- + .init_irq = orion5x_init_irq,
- + .timer = &orion5x_timer,
- + .fixup = tag_fixup_mem32,
- +MACHINE_END
- --- a/arch/arm/mm/Kconfig
- +++ b/arch/arm/mm/Kconfig
- @@ -365,7 +365,7 @@
- # Feroceon
- config CPU_FEROCEON
- bool
- - depends on ARCH_ORION5X
- + depends on ARCH_ORION5X || ARCH_LOKI || ARCH_KIRKWOOD || ARCH_MV78XX0
- default y
- select CPU_32v5
- select CPU_ABRT_EV5T
- @@ -373,7 +373,7 @@
- select CPU_CACHE_VIVT
- select CPU_CP15_MMU
- select CPU_COPY_FEROCEON if MMU
- - select CPU_TLB_V4WBI if MMU
- + select CPU_TLB_FEROCEON if MMU
-
- config CPU_FEROCEON_OLD_ID
- bool "Accept early Feroceon cores with an ARM926 ID"
- @@ -551,6 +551,11 @@
- ARM Architecture Version 4 TLB with writeback cache and invalidate
- instruction cache entry.
-
- +config CPU_TLB_FEROCEON
- + bool
- + help
- + Feroceon TLB (v4wbi with non-outer-cachable page table walks).
- +
- config CPU_TLB_V6
- bool
-
- @@ -709,6 +714,14 @@
- bool
- default n
-
- +config CACHE_FEROCEON_L2
- + bool "Enable the Feroceon L2 cache controller"
- + depends on ARCH_KIRKWOOD || ARCH_MV78XX0
- + default y
- + select OUTER_CACHE
- + help
- + This option enables the Feroceon L2 cache controller.
- +
- config CACHE_L2X0
- bool "Enable the L2x0 outer cache controller"
- depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176
- --- a/arch/arm/mm/Makefile
- +++ b/arch/arm/mm/Makefile
- @@ -46,6 +46,7 @@
- obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o
- obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o
- obj-$(CONFIG_CPU_TLB_V4WBI) += tlb-v4wbi.o
- +obj-$(CONFIG_CPU_TLB_FEROCEON) += tlb-v4wbi.o # reuse v4wbi TLB functions
- obj-$(CONFIG_CPU_TLB_V6) += tlb-v6.o
- obj-$(CONFIG_CPU_TLB_V7) += tlb-v7.o
-
- @@ -73,4 +74,5 @@
- obj-$(CONFIG_CPU_V6) += proc-v6.o
- obj-$(CONFIG_CPU_V7) += proc-v7.o
-
- +obj-$(CONFIG_CACHE_FEROCEON_L2) += cache-feroceon-l2.o
- obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
- --- /dev/null
- +++ b/arch/arm/mm/cache-feroceon-l2.c
- @@ -0,0 +1,318 @@
- +/*
- + * arch/arm/mm/cache-feroceon-l2.c - Feroceon L2 cache controller support
- + *
- + * Copyright (C) 2008 Marvell Semiconductor
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + *
- + * References:
- + * - Unified Layer 2 Cache for Feroceon CPU Cores,
- + * Document ID MV-S104858-00, Rev. A, October 23 2007.
- + */
- +
- +#include <linux/init.h>
- +#include <asm/cacheflush.h>
- +#include <asm/plat-orion/cache-feroceon-l2.h>
- +
- +
- +/*
- + * Low-level cache maintenance operations.
- + *
- + * As well as the regular 'clean/invalidate/flush L2 cache line by
- + * MVA' instructions, the Feroceon L2 cache controller also features
- + * 'clean/invalidate L2 range by MVA' operations.
- + *
- + * Cache range operations are initiated by writing the start and
- + * end addresses to successive cp15 registers, and process every
- + * cache line whose first byte address lies in the inclusive range
- + * [start:end].
- + *
- + * The cache range operations stall the CPU pipeline until completion.
- + *
- + * The range operations require two successive cp15 writes, in
- + * between which we don't want to be preempted.
- + */
- +static inline void l2_clean_pa(unsigned long addr)
- +{
- + __asm__("mcr p15, 1, %0, c15, c9, 3" : : "r" (addr));
- +}
- +
- +static inline void l2_clean_mva_range(unsigned long start, unsigned long end)
- +{
- + unsigned long flags;
- +
- + /*
- + * Make sure 'start' and 'end' reference the same page, as
- + * L2 is PIPT and range operations only do a TLB lookup on
- + * the start address.
- + */
- + BUG_ON((start ^ end) & ~(PAGE_SIZE - 1));
- +
- + raw_local_irq_save(flags);
- + __asm__("mcr p15, 1, %0, c15, c9, 4" : : "r" (start));
- + __asm__("mcr p15, 1, %0, c15, c9, 5" : : "r" (end));
- + raw_local_irq_restore(flags);
- +}
- +
- +static inline void l2_clean_pa_range(unsigned long start, unsigned long end)
- +{
- + l2_clean_mva_range(__phys_to_virt(start), __phys_to_virt(end));
- +}
- +
- +static inline void l2_clean_inv_pa(unsigned long addr)
- +{
- + __asm__("mcr p15, 1, %0, c15, c10, 3" : : "r" (addr));
- +}
- +
- +static inline void l2_inv_pa(unsigned long addr)
- +{
- + __asm__("mcr p15, 1, %0, c15, c11, 3" : : "r" (addr));
- +}
- +
- +static inline void l2_inv_mva_range(unsigned long start, unsigned long end)
- +{
- + unsigned long flags;
- +
- + /*
- + * Make sure 'start' and 'end' reference the same page, as
- + * L2 is PIPT and range operations only do a TLB lookup on
- + * the start address.
- + */
- + BUG_ON((start ^ end) & ~(PAGE_SIZE - 1));
- +
- + raw_local_irq_save(flags);
- + __asm__("mcr p15, 1, %0, c15, c11, 4" : : "r" (start));
- + __asm__("mcr p15, 1, %0, c15, c11, 5" : : "r" (end));
- + raw_local_irq_restore(flags);
- +}
- +
- +static inline void l2_inv_pa_range(unsigned long start, unsigned long end)
- +{
- + l2_inv_mva_range(__phys_to_virt(start), __phys_to_virt(end));
- +}
- +
- +
- +/*
- + * Linux primitives.
- + *
- + * Note that the end addresses passed to Linux primitives are
- + * noninclusive, while the hardware cache range operations use
- + * inclusive start and end addresses.
- + */
- +#define CACHE_LINE_SIZE 32
- +#define MAX_RANGE_SIZE 1024
- +
- +static int l2_wt_override;
- +
- +static unsigned long calc_range_end(unsigned long start, unsigned long end)
- +{
- + unsigned long range_end;
- +
- + BUG_ON(start & (CACHE_LINE_SIZE - 1));
- + BUG_ON(end & (CACHE_LINE_SIZE - 1));
- +
- + /*
- + * Try to process all cache lines between 'start' and 'end'.
- + */
- + range_end = end;
- +
- + /*
- + * Limit the number of cache lines processed at once,
- + * since cache range operations stall the CPU pipeline
- + * until completion.
- + */
- + if (range_end > start + MAX_RANGE_SIZE)
- + range_end = start + MAX_RANGE_SIZE;
- +
- + /*
- + * Cache range operations can't straddle a page boundary.
- + */
- + if (range_end > (start | (PAGE_SIZE - 1)) + 1)
- + range_end = (start | (PAGE_SIZE - 1)) + 1;
- +
- + return range_end;
- +}
- +
- +static void feroceon_l2_inv_range(unsigned long start, unsigned long end)
- +{
- + /*
- + * Clean and invalidate partial first cache line.
- + */
- + if (start & (CACHE_LINE_SIZE - 1)) {
- + l2_clean_inv_pa(start & ~(CACHE_LINE_SIZE - 1));
- + start = (start | (CACHE_LINE_SIZE - 1)) + 1;
- + }
- +
- + /*
- + * Clean and invalidate partial last cache line.
- + */
- + if (end & (CACHE_LINE_SIZE - 1)) {
- + l2_clean_inv_pa(end & ~(CACHE_LINE_SIZE - 1));
- + end &= ~(CACHE_LINE_SIZE - 1);
- + }
- +
- + /*
- + * Invalidate all full cache lines between 'start' and 'end'.
- + */
- + while (start != end) {
- + unsigned long range_end = calc_range_end(start, end);
- + l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE);
- + start = range_end;
- + }
- +
- + dsb();
- +}
- +
- +static void feroceon_l2_clean_range(unsigned long start, unsigned long end)
- +{
- + /*
- + * If L2 is forced to WT, the L2 will always be clean and we
- + * don't need to do anything here.
- + */
- + if (!l2_wt_override) {
- + start &= ~(CACHE_LINE_SIZE - 1);
- + end = (end + CACHE_LINE_SIZE - 1) & ~(CACHE_LINE_SIZE - 1);
- + while (start != end) {
- + unsigned long range_end = calc_range_end(start, end);
- + l2_clean_pa_range(start, range_end - CACHE_LINE_SIZE);
- + start = range_end;
- + }
- + }
- +
- + dsb();
- +}
- +
- +static void feroceon_l2_flush_range(unsigned long start, unsigned long end)
- +{
- + start &= ~(CACHE_LINE_SIZE - 1);
- + end = (end + CACHE_LINE_SIZE - 1) & ~(CACHE_LINE_SIZE - 1);
- + while (start != end) {
- + unsigned long range_end = calc_range_end(start, end);
- + if (!l2_wt_override)
- + l2_clean_pa_range(start, range_end - CACHE_LINE_SIZE);
- + l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE);
- + start = range_end;
- + }
- +
- + dsb();
- +}
- +
- +
- +/*
- + * Routines to disable and re-enable the D-cache and I-cache at run
- + * time. These are necessary because the L2 cache can only be enabled
- + * or disabled while the L1 Dcache and Icache are both disabled.
- + */
- +static void __init invalidate_and_disable_dcache(void)
- +{
- + u32 cr;
- +
- + cr = get_cr();
- + if (cr & CR_C) {
- + unsigned long flags;
- +
- + raw_local_irq_save(flags);
- + flush_cache_all();
- + set_cr(cr & ~CR_C);
- + raw_local_irq_restore(flags);
- + }
- +}
- +
- +static void __init enable_dcache(void)
- +{
- + u32 cr;
- +
- + cr = get_cr();
- + if (!(cr & CR_C))
- + set_cr(cr | CR_C);
- +}
- +
- +static void __init __invalidate_icache(void)
- +{
- + int dummy;
- +
- + __asm__ __volatile__("mcr p15, 0, %0, c7, c5, 0\n" : "=r" (dummy));
- +}
- +
- +static void __init invalidate_and_disable_icache(void)
- +{
- + u32 cr;
- +
- + cr = get_cr();
- + if (cr & CR_I) {
- + set_cr(cr & ~CR_I);
- + __invalidate_icache();
- + }
- +}
- +
- +static void __init enable_icache(void)
- +{
- + u32 cr;
- +
- + cr = get_cr();
- + if (!(cr & CR_I))
- + set_cr(cr | CR_I);
- +}
- +
- +static inline u32 read_extra_features(void)
- +{
- + u32 u;
- +
- + __asm__("mrc p15, 1, %0, c15, c1, 0" : "=r" (u));
- +
- + return u;
- +}
- +
- +static inline void write_extra_features(u32 u)
- +{
- + __asm__("mcr p15, 1, %0, c15, c1, 0" : : "r" (u));
- +}
- +
- +static void __init disable_l2_prefetch(void)
- +{
- + u32 u;
- +
- + /*
- + * Read the CPU Extra Features register and verify that the
- + * Disable L2 Prefetch bit is set.
- + */
- + u = read_extra_features();
- + if (!(u & 0x01000000)) {
- + printk(KERN_INFO "Feroceon L2: Disabling L2 prefetch.\n");
- + write_extra_features(u | 0x01000000);
- + }
- +}
- +
- +static void __init enable_l2(void)
- +{
- + u32 u;
- +
- + u = read_extra_features();
- + if (!(u & 0x00400000)) {
- + printk(KERN_INFO "Feroceon L2: Enabling L2\n");
- +
- + invalidate_and_disable_dcache();
- + invalidate_and_disable_icache();
- + write_extra_features(u | 0x00400000);
- + enable_icache();
- + enable_dcache();
- + }
- +}
- +
- +void __init feroceon_l2_init(int __l2_wt_override)
- +{
- + l2_wt_override = __l2_wt_override;
- +
- + disable_l2_prefetch();
- +
- + outer_cache.inv_range = feroceon_l2_inv_range;
- + outer_cache.clean_range = feroceon_l2_clean_range;
- + outer_cache.flush_range = feroceon_l2_flush_range;
- +
- + enable_l2();
- +
- + printk(KERN_INFO "Feroceon L2: Cache support initialised%s.\n",
- + l2_wt_override ? ", in WT override mode" : "");
- +}
- --- a/arch/arm/mm/proc-feroceon.S
- +++ b/arch/arm/mm/proc-feroceon.S
- @@ -44,11 +44,31 @@
- */
- #define CACHE_DLINESIZE 32
-
- + .bss
- + .align 3
- +__cache_params_loc:
- + .space 8
- +
- .text
- +__cache_params:
- + .word __cache_params_loc
- +
- /*
- * cpu_feroceon_proc_init()
- */
- ENTRY(cpu_feroceon_proc_init)
- + mrc p15, 0, r0, c0, c0, 1 @ read cache type register
- + ldr r1, __cache_params
- + mov r2, #(16 << 5)
- + tst r0, #(1 << 16) @ get way
- + mov r0, r0, lsr #18 @ get cache size order
- + movne r3, #((4 - 1) << 30) @ 4-way
- + and r0, r0, #0xf
- + moveq r3, #0 @ 1-way
- + mov r2, r2, lsl r0 @ actual cache size
- + movne r2, r2, lsr #2 @ turned into # of sets
- + sub r2, r2, #(1 << 5)
- + stmia r1, {r2, r3}
- mov pc, lr
-
- /*
- @@ -59,6 +79,13 @@
- mov ip, #PSR_F_BIT | PSR_I_BIT | SVC_MODE
- msr cpsr_c, ip
- bl feroceon_flush_kern_cache_all
- +
- +#if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
- + mov r0, #0
- + mcr p15, 1, r0, c15, c9, 0 @ clean L2
- + mcr p15, 0, r0, c7, c10, 4 @ drain WB
- +#endif
- +
- mrc p15, 0, r0, c1, c0, 0 @ ctrl register
- bic r0, r0, #0x1000 @ ...i............
- bic r0, r0, #0x000e @ ............wca.
- @@ -117,11 +144,19 @@
- */
- ENTRY(feroceon_flush_kern_cache_all)
- mov r2, #VM_EXEC
- - mov ip, #0
- +
- __flush_whole_cache:
- -1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate
- - bne 1b
- + ldr r1, __cache_params
- + ldmia r1, {r1, r3}
- +1: orr ip, r1, r3
- +2: mcr p15, 0, ip, c7, c14, 2 @ clean + invalidate D set/way
- + subs ip, ip, #(1 << 30) @ next way
- + bcs 2b
- + subs r1, r1, #(1 << 5) @ next set
- + bcs 1b
- +
- tst r2, #VM_EXEC
- + mov ip, #0
- mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache
- mcrne p15, 0, ip, c7, c10, 4 @ drain WB
- mov pc, lr
- @@ -138,7 +173,6 @@
- */
- .align 5
- ENTRY(feroceon_flush_user_cache_range)
- - mov ip, #0
- sub r3, r1, r0 @ calculate total size
- cmp r3, #CACHE_DLIMIT
- bgt __flush_whole_cache
- @@ -152,6 +186,7 @@
- cmp r0, r1
- blo 1b
- tst r2, #VM_EXEC
- + mov ip, #0
- mcrne p15, 0, ip, c7, c10, 4 @ drain WB
- mov pc, lr
-
- @@ -209,6 +244,20 @@
- mcr p15, 0, r0, c7, c10, 4 @ drain WB
- mov pc, lr
-
- + .align 5
- +ENTRY(feroceon_range_flush_kern_dcache_page)
- + mrs r2, cpsr
- + add r1, r0, #PAGE_SZ - CACHE_DLINESIZE @ top addr is inclusive
- + orr r3, r2, #PSR_I_BIT
- + msr cpsr_c, r3 @ disable interrupts
- + mcr p15, 5, r0, c15, c15, 0 @ D clean/inv range start
- + mcr p15, 5, r1, c15, c15, 1 @ D clean/inv range top
- + msr cpsr_c, r2 @ restore interrupts
- + mov r0, #0
- + mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache
- + mcr p15, 0, r0, c7, c10, 4 @ drain WB
- + mov pc, lr
- +
- /*
- * dma_inv_range(start, end)
- *
- @@ -225,10 +274,10 @@
- .align 5
- ENTRY(feroceon_dma_inv_range)
- tst r0, #CACHE_DLINESIZE - 1
- + bic r0, r0, #CACHE_DLINESIZE - 1
- mcrne p15, 0, r0, c7, c10, 1 @ clean D entry
- tst r1, #CACHE_DLINESIZE - 1
- mcrne p15, 0, r1, c7, c10, 1 @ clean D entry
- - bic r0, r0, #CACHE_DLINESIZE - 1
- 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
- add r0, r0, #CACHE_DLINESIZE
- cmp r0, r1
- @@ -236,6 +285,22 @@
- mcr p15, 0, r0, c7, c10, 4 @ drain WB
- mov pc, lr
-
- + .align 5
- +ENTRY(feroceon_range_dma_inv_range)
- + mrs r2, cpsr
- + tst r0, #CACHE_DLINESIZE - 1
- + mcrne p15, 0, r0, c7, c10, 1 @ clean D entry
- + tst r1, #CACHE_DLINESIZE - 1
- + mcrne p15, 0, r1, c7, c10, 1 @ clean D entry
- + cmp r1, r0
- + subne r1, r1, #1 @ top address is inclusive
- + orr r3, r2, #PSR_I_BIT
- + msr cpsr_c, r3 @ disable interrupts
- + mcr p15, 5, r0, c15, c14, 0 @ D inv range start
- + mcr p15, 5, r1, c15, c14, 1 @ D inv range top
- + msr cpsr_c, r2 @ restore interrupts
- + mov pc, lr
- +
- /*
- * dma_clean_range(start, end)
- *
- @@ -256,6 +321,19 @@
- mcr p15, 0, r0, c7, c10, 4 @ drain WB
- mov pc, lr
-
- + .align 5
- +ENTRY(feroceon_range_dma_clean_range)
- + mrs r2, cpsr
- + cmp r1, r0
- + subne r1, r1, #1 @ top address is inclusive
- + orr r3, r2, #PSR_I_BIT
- + msr cpsr_c, r3 @ disable interrupts
- + mcr p15, 5, r0, c15, c13, 0 @ D clean range start
- + mcr p15, 5, r1, c15, c13, 1 @ D clean range top
- + msr cpsr_c, r2 @ restore interrupts
- + mcr p15, 0, r0, c7, c10, 4 @ drain WB
- + mov pc, lr
- +
- /*
- * dma_flush_range(start, end)
- *
- @@ -274,6 +352,19 @@
- mcr p15, 0, r0, c7, c10, 4 @ drain WB
- mov pc, lr
-
- + .align 5
- +ENTRY(feroceon_range_dma_flush_range)
- + mrs r2, cpsr
- + cmp r1, r0
- + subne r1, r1, #1 @ top address is inclusive
- + orr r3, r2, #PSR_I_BIT
- + msr cpsr_c, r3 @ disable interrupts
- + mcr p15, 5, r0, c15, c15, 0 @ D clean/inv range start
- + mcr p15, 5, r1, c15, c15, 1 @ D clean/inv range top
- + msr cpsr_c, r2 @ restore interrupts
- + mcr p15, 0, r0, c7, c10, 4 @ drain WB
- + mov pc, lr
- +
- ENTRY(feroceon_cache_fns)
- .long feroceon_flush_kern_cache_all
- .long feroceon_flush_user_cache_all
- @@ -285,12 +376,33 @@
- .long feroceon_dma_clean_range
- .long feroceon_dma_flush_range
-
- +ENTRY(feroceon_range_cache_fns)
- + .long feroceon_flush_kern_cache_all
- + .long feroceon_flush_user_cache_all
- + .long feroceon_flush_user_cache_range
- + .long feroceon_coherent_kern_range
- + .long feroceon_coherent_user_range
- + .long feroceon_range_flush_kern_dcache_page
- + .long feroceon_range_dma_inv_range
- + .long feroceon_range_dma_clean_range
- + .long feroceon_range_dma_flush_range
- +
- .align 5
- ENTRY(cpu_feroceon_dcache_clean_area)
- +#if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
- + mov r2, r0
- + mov r3, r1
- +#endif
- 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
- add r0, r0, #CACHE_DLINESIZE
- subs r1, r1, #CACHE_DLINESIZE
- bhi 1b
- +#if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
- +1: mcr p15, 1, r2, c15, c9, 1 @ clean L2 entry
- + add r2, r2, #CACHE_DLINESIZE
- + subs r3, r3, #CACHE_DLINESIZE
- + bhi 1b
- +#endif
- mcr p15, 0, r0, c7, c10, 4 @ drain WB
- mov pc, lr
-
- @@ -306,16 +418,25 @@
- .align 5
- ENTRY(cpu_feroceon_switch_mm)
- #ifdef CONFIG_MMU
- - mov ip, #0
- -@ && 'Clean & Invalidate whole DCache'
- -1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate
- - bne 1b
- - mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache
- - mcr p15, 0, ip, c7, c10, 4 @ drain WB
- + /*
- + * Note: we wish to call __flush_whole_cache but we need to preserve
- + * lr to do so. The only way without touching main memory is to
- + * use r2 which is normally used to test the VM_EXEC flag, and
- + * compensate locally for the skipped ops if it is not set.
- + */
- + mov r2, lr @ abuse r2 to preserve lr
- + bl __flush_whole_cache
- + @ if r2 contains the VM_EXEC bit then the next 2 ops are done already
- + tst r2, #VM_EXEC
- + mcreq p15, 0, ip, c7, c5, 0 @ invalidate I cache
- + mcreq p15, 0, ip, c7, c10, 4 @ drain WB
- +
- mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
- mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
- -#endif
- + mov pc, r2
- +#else
- mov pc, lr
- +#endif
-
- /*
- * cpu_feroceon_set_pte_ext(ptep, pte, ext)
- @@ -345,6 +466,9 @@
- str r2, [r0] @ hardware version
- mov r0, r0
- mcr p15, 0, r0, c7, c10, 1 @ clean D entry
- +#if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
- + mcr p15, 1, r0, c15, c9, 1 @ clean L2 entry
- +#endif
- mcr p15, 0, r0, c7, c10, 4 @ drain WB
- #endif
- mov pc, lr
- @@ -414,6 +538,21 @@
- .asciz "Feroceon"
- .size cpu_feroceon_name, . - cpu_feroceon_name
-
- + .type cpu_88fr531_name, #object
- +cpu_88fr531_name:
- + .asciz "Feroceon 88FR531-vd"
- + .size cpu_88fr531_name, . - cpu_88fr531_name
- +
- + .type cpu_88fr571_name, #object
- +cpu_88fr571_name:
- + .asciz "Feroceon 88FR571-vd"
- + .size cpu_88fr571_name, . - cpu_88fr571_name
- +
- + .type cpu_88fr131_name, #object
- +cpu_88fr131_name:
- + .asciz "Feroceon 88FR131"
- + .size cpu_88fr131_name, . - cpu_88fr131_name
- +
- .align
-
- .section ".proc.info.init", #alloc, #execinstr
- @@ -421,15 +560,15 @@
- #ifdef CONFIG_CPU_FEROCEON_OLD_ID
- .type __feroceon_old_id_proc_info,#object
- __feroceon_old_id_proc_info:
- - .long 0x41069260
- - .long 0xfffffff0
- - .long PMD_TYPE_SECT | \
- + .long 0x41009260
- + .long 0xff00fff0
- + .long PMD_TYPE_SECT | \
- PMD_SECT_BUFFERABLE | \
- PMD_SECT_CACHEABLE | \
- PMD_BIT4 | \
- PMD_SECT_AP_WRITE | \
- PMD_SECT_AP_READ
- - .long PMD_TYPE_SECT | \
- + .long PMD_TYPE_SECT | \
- PMD_BIT4 | \
- PMD_SECT_AP_WRITE | \
- PMD_SECT_AP_READ
- @@ -445,17 +584,17 @@
- .size __feroceon_old_id_proc_info, . - __feroceon_old_id_proc_info
- #endif
-
- - .type __feroceon_proc_info,#object
- -__feroceon_proc_info:
- + .type __88fr531_proc_info,#object
- +__88fr531_proc_info:
- .long 0x56055310
- .long 0xfffffff0
- - .long PMD_TYPE_SECT | \
- + .long PMD_TYPE_SECT | \
- PMD_SECT_BUFFERABLE | \
- PMD_SECT_CACHEABLE | \
- PMD_BIT4 | \
- PMD_SECT_AP_WRITE | \
- PMD_SECT_AP_READ
- - .long PMD_TYPE_SECT | \
- + .long PMD_TYPE_SECT | \
- PMD_BIT4 | \
- PMD_SECT_AP_WRITE | \
- PMD_SECT_AP_READ
- @@ -463,9 +602,59 @@
- .long cpu_arch_name
- .long cpu_elf_name
- .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
- - .long cpu_feroceon_name
- + .long cpu_88fr531_name
- .long feroceon_processor_functions
- .long v4wbi_tlb_fns
- .long feroceon_user_fns
- .long feroceon_cache_fns
- - .size __feroceon_proc_info, . - __feroceon_proc_info
- + .size __88fr531_proc_info, . - __88fr531_proc_info
- +
- + .type __88fr571_proc_info,#object
- +__88fr571_proc_info:
- + .long 0x56155710
- + .long 0xfffffff0
- + .long PMD_TYPE_SECT | \
- + PMD_SECT_BUFFERABLE | \
- + PMD_SECT_CACHEABLE | \
- + PMD_BIT4 | \
- + PMD_SECT_AP_WRITE | \
- + PMD_SECT_AP_READ
- + .long PMD_TYPE_SECT | \
- + PMD_BIT4 | \
- + PMD_SECT_AP_WRITE | \
- + PMD_SECT_AP_READ
- + b __feroceon_setup
- + .long cpu_arch_name
- + .long cpu_elf_name
- + .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
- + .long cpu_88fr571_name
- + .long feroceon_processor_functions
- + .long v4wbi_tlb_fns
- + .long feroceon_user_fns
- + .long feroceon_range_cache_fns
- + .size __88fr571_proc_info, . - __88fr571_proc_info
- +
- + .type __88fr131_proc_info,#object
- +__88fr131_proc_info:
- + .long 0x56251310
- + .long 0xfffffff0
- + .long PMD_TYPE_SECT | \
- + PMD_SECT_BUFFERABLE | \
- + PMD_SECT_CACHEABLE | \
- + PMD_BIT4 | \
- + PMD_SECT_AP_WRITE | \
- + PMD_SECT_AP_READ
- + .long PMD_TYPE_SECT | \
- + PMD_BIT4 | \
- + PMD_SECT_AP_WRITE | \
- + PMD_SECT_AP_READ
- + b __feroceon_setup
- + .long cpu_arch_name
- + .long cpu_elf_name
- + .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
- + .long cpu_88fr131_name
- + .long feroceon_processor_functions
- + .long v4wbi_tlb_fns
- + .long feroceon_user_fns
- + .long feroceon_range_cache_fns
- + .size __88fr131_proc_info, . - __88fr131_proc_info
- --- a/arch/arm/plat-orion/irq.c
- +++ b/arch/arm/plat-orion/irq.c
- @@ -36,8 +36,8 @@
-
- static struct irq_chip orion_irq_chip = {
- .name = "orion_irq",
- - .ack = orion_irq_mask,
- .mask = orion_irq_mask,
- + .mask_ack = orion_irq_mask,
- .unmask = orion_irq_unmask,
- };
-
- @@ -59,6 +59,7 @@
- set_irq_chip(irq, &orion_irq_chip);
- set_irq_chip_data(irq, maskaddr);
- set_irq_handler(irq, handle_level_irq);
- + irq_desc[irq].status |= IRQ_LEVEL;
- set_irq_flags(irq, IRQF_VALID);
- }
- }
- --- a/arch/arm/plat-orion/pcie.c
- +++ b/arch/arm/plat-orion/pcie.c
- @@ -39,6 +39,7 @@
- #define PCIE_CONF_DATA_OFF 0x18fc
- #define PCIE_MASK_OFF 0x1910
- #define PCIE_CTRL_OFF 0x1a00
- +#define PCIE_CTRL_X1_MODE 0x0001
- #define PCIE_STAT_OFF 0x1a04
- #define PCIE_STAT_DEV_OFFS 20
- #define PCIE_STAT_DEV_MASK 0x1f
- @@ -62,6 +63,11 @@
- return !(readl(base + PCIE_STAT_OFF) & PCIE_STAT_LINK_DOWN);
- }
-
- +int __init orion_pcie_x4_mode(void __iomem *base)
- +{
- + return !(readl(base + PCIE_CTRL_OFF) & PCIE_CTRL_X1_MODE);
- +}
- +
- int orion_pcie_get_local_bus_nr(void __iomem *base)
- {
- u32 stat = readl(base + PCIE_STAT_OFF);
- --- a/arch/arm/plat-orion/time.c
- +++ b/arch/arm/plat-orion/time.c
- @@ -74,7 +74,7 @@
- /*
- * Clear and enable clockevent timer interrupt.
- */
- - writel(~BRIDGE_INT_TIMER1, BRIDGE_CAUSE);
- + writel(BRIDGE_INT_TIMER1_CLR, BRIDGE_CAUSE);
-
- u = readl(BRIDGE_MASK);
- u |= BRIDGE_INT_TIMER1;
- @@ -138,7 +138,7 @@
- /*
- * ACK pending timer interrupt.
- */
- - writel(~BRIDGE_INT_TIMER1, BRIDGE_CAUSE);
- + writel(BRIDGE_INT_TIMER1_CLR, BRIDGE_CAUSE);
-
- }
- local_irq_restore(flags);
- @@ -159,7 +159,7 @@
- /*
- * ACK timer interrupt and call event handler.
- */
- - writel(~BRIDGE_INT_TIMER1, BRIDGE_CAUSE);
- + writel(BRIDGE_INT_TIMER1_CLR, BRIDGE_CAUSE);
- orion_clkevt.event_handler(&orion_clkevt);
-
- return IRQ_HANDLED;
- --- a/drivers/net/mv643xx_eth.c
- +++ b/drivers/net/mv643xx_eth.c
- @@ -34,406 +34,145 @@
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
- +
- #include <linux/init.h>
- #include <linux/dma-mapping.h>
- #include <linux/in.h>
- -#include <linux/ip.h>
- #include <linux/tcp.h>
- #include <linux/udp.h>
- #include <linux/etherdevice.h>
- -
- -#include <linux/bitops.h>
- #include <linux/delay.h>
- #include <linux/ethtool.h>
- #include <linux/platform_device.h>
- -
- #include <linux/module.h>
- #include <linux/kernel.h>
- #include <linux/spinlock.h>
- #include <linux/workqueue.h>
- #include <linux/mii.h>
- -
- #include <linux/mv643xx_eth.h>
- -
- #include <asm/io.h>
- #include <asm/types.h>
- -#include <asm/pgtable.h>
- #include <asm/system.h>
- -#include <asm/delay.h>
- -#include <asm/dma-mapping.h>
-
- -#define MV643XX_CHECKSUM_OFFLOAD_TX
- -#define MV643XX_NAPI
- -#define MV643XX_TX_FAST_REFILL
- -#undef MV643XX_COAL
- -
- -#define MV643XX_TX_COAL 100
- -#ifdef MV643XX_COAL
- -#define MV643XX_RX_COAL 100
- -#endif
- +static char mv643xx_eth_driver_name[] = "mv643xx_eth";
- +static char mv643xx_eth_driver_version[] = "1.1";
-
- -#ifdef MV643XX_CHECKSUM_OFFLOAD_TX
- +#define MV643XX_ETH_CHECKSUM_OFFLOAD_TX
- +#define MV643XX_ETH_NAPI
- +#define MV643XX_ETH_TX_FAST_REFILL
- +
- +#ifdef MV643XX_ETH_CHECKSUM_OFFLOAD_TX
- #define MAX_DESCS_PER_SKB (MAX_SKB_FRAGS + 1)
- #else
- #define MAX_DESCS_PER_SKB 1
- #endif
-
- -#define ETH_VLAN_HLEN 4
- -#define ETH_FCS_LEN 4
- -#define ETH_HW_IP_ALIGN 2 /* hw aligns IP header */
- -#define ETH_WRAPPER_LEN (ETH_HW_IP_ALIGN + ETH_HLEN + \
- - ETH_VLAN_HLEN + ETH_FCS_LEN)
- -#define ETH_RX_SKB_SIZE (dev->mtu + ETH_WRAPPER_LEN + \
- - dma_get_cache_alignment())
- -
- /*
- * Registers shared between all ports.
- */
- -#define PHY_ADDR_REG 0x0000
- -#define SMI_REG 0x0004
- -#define WINDOW_BASE(i) (0x0200 + ((i) << 3))
- -#define WINDOW_SIZE(i) (0x0204 + ((i) << 3))
- -#define WINDOW_REMAP_HIGH(i) (0x0280 + ((i) << 2))
- -#define WINDOW_BAR_ENABLE 0x0290
- -#define WINDOW_PROTECT(i) (0x0294 + ((i) << 4))
- +#define PHY_ADDR 0x0000
- +#define SMI_REG 0x0004
- +#define WINDOW_BASE(w) (0x0200 + ((w) << 3))
- +#define WINDOW_SIZE(w) (0x0204 + ((w) << 3))
- +#define WINDOW_REMAP_HIGH(w) (0x0280 + ((w) << 2))
- +#define WINDOW_BAR_ENABLE 0x0290
- +#define WINDOW_PROTECT(w) (0x0294 + ((w) << 4))
-
- /*
- * Per-port registers.
- */
- -#define PORT_CONFIG_REG(p) (0x0400 + ((p) << 10))
- -#define PORT_CONFIG_EXTEND_REG(p) (0x0404 + ((p) << 10))
- -#define MAC_ADDR_LOW(p) (0x0414 + ((p) << 10))
- -#define MAC_ADDR_HIGH(p) (0x0418 + ((p) << 10))
- -#define SDMA_CONFIG_REG(p) (0x041c + ((p) << 10))
- -#define PORT_SERIAL_CONTROL_REG(p) (0x043c + ((p) << 10))
- -#define PORT_STATUS_REG(p) (0x0444 + ((p) << 10))
- -#define TRANSMIT_QUEUE_COMMAND_REG(p) (0x0448 + ((p) << 10))
- -#define MAXIMUM_TRANSMIT_UNIT(p) (0x0458 + ((p) << 10))
- -#define INTERRUPT_CAUSE_REG(p) (0x0460 + ((p) << 10))
- -#define INTERRUPT_CAUSE_EXTEND_REG(p) (0x0464 + ((p) << 10))
- -#define INTERRUPT_MASK_REG(p) (0x0468 + ((p) << 10))
- -#define INTERRUPT_EXTEND_MASK_REG(p) (0x046c + ((p) << 10))
- -#define TX_FIFO_URGENT_THRESHOLD_REG(p) (0x0474 + ((p) << 10))
- -#define RX_CURRENT_QUEUE_DESC_PTR_0(p) (0x060c + ((p) << 10))
- -#define RECEIVE_QUEUE_COMMAND_REG(p) (0x0680 + ((p) << 10))
- -#define TX_CURRENT_QUEUE_DESC_PTR_0(p) (0x06c0 + ((p) << 10))
- -#define MIB_COUNTERS_BASE(p) (0x1000 + ((p) << 7))
- -#define DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(p) (0x1400 + ((p) << 10))
- -#define DA_FILTER_OTHER_MULTICAST_TABLE_BASE(p) (0x1500 + ((p) << 10))
- -#define DA_FILTER_UNICAST_TABLE_BASE(p) (0x1600 + ((p) << 10))
- -
- -/* These macros describe Ethernet Port configuration reg (Px_cR) bits */
- -#define UNICAST_NORMAL_MODE (0 << 0)
- -#define UNICAST_PROMISCUOUS_MODE (1 << 0)
- -#define DEFAULT_RX_QUEUE(queue) ((queue) << 1)
- -#define DEFAULT_RX_ARP_QUEUE(queue) ((queue) << 4)
- -#define RECEIVE_BC_IF_NOT_IP_OR_ARP (0 << 7)
- -#define REJECT_BC_IF_NOT_IP_OR_ARP (1 << 7)
- -#define RECEIVE_BC_IF_IP (0 << 8)
- -#define REJECT_BC_IF_IP (1 << 8)
- -#define RECEIVE_BC_IF_ARP (0 << 9)
- -#define REJECT_BC_IF_ARP (1 << 9)
- -#define TX_AM_NO_UPDATE_ERROR_SUMMARY (1 << 12)
- -#define CAPTURE_TCP_FRAMES_DIS (0 << 14)
- -#define CAPTURE_TCP_FRAMES_EN (1 << 14)
- -#define CAPTURE_UDP_FRAMES_DIS (0 << 15)
- -#define CAPTURE_UDP_FRAMES_EN (1 << 15)
- -#define DEFAULT_RX_TCP_QUEUE(queue) ((queue) << 16)
- -#define DEFAULT_RX_UDP_QUEUE(queue) ((queue) << 19)
- -#define DEFAULT_RX_BPDU_QUEUE(queue) ((queue) << 22)
- -
- -#define PORT_CONFIG_DEFAULT_VALUE \
- - UNICAST_NORMAL_MODE | \
- - DEFAULT_RX_QUEUE(0) | \
- - DEFAULT_RX_ARP_QUEUE(0) | \
- - RECEIVE_BC_IF_NOT_IP_OR_ARP | \
- - RECEIVE_BC_IF_IP | \
- - RECEIVE_BC_IF_ARP | \
- - CAPTURE_TCP_FRAMES_DIS | \
- - CAPTURE_UDP_FRAMES_DIS | \
- - DEFAULT_RX_TCP_QUEUE(0) | \
- - DEFAULT_RX_UDP_QUEUE(0) | \
- - DEFAULT_RX_BPDU_QUEUE(0)
- -
- -/* These macros describe Ethernet Port configuration extend reg (Px_cXR) bits*/
- -#define CLASSIFY_EN (1 << 0)
- -#define SPAN_BPDU_PACKETS_AS_NORMAL (0 << 1)
- -#define SPAN_BPDU_PACKETS_TO_RX_QUEUE_7 (1 << 1)
- -#define PARTITION_DISABLE (0 << 2)
- -#define PARTITION_ENABLE (1 << 2)
- -
- -#define PORT_CONFIG_EXTEND_DEFAULT_VALUE \
- - SPAN_BPDU_PACKETS_AS_NORMAL | \
- - PARTITION_DISABLE
- -
- -/* These macros describe Ethernet Port Sdma configuration reg (SDCR) bits */
- -#define RIFB (1 << 0)
- -#define RX_BURST_SIZE_1_64BIT (0 << 1)
- -#define RX_BURST_SIZE_2_64BIT (1 << 1)
- +#define PORT_CONFIG(p) (0x0400 + ((p) << 10))
- +#define UNICAST_PROMISCUOUS_MODE 0x00000001
- +#define PORT_CONFIG_EXT(p) (0x0404 + ((p) << 10))
- +#define MAC_ADDR_LOW(p) (0x0414 + ((p) << 10))
- +#define MAC_ADDR_HIGH(p) (0x0418 + ((p) << 10))
- +#define SDMA_CONFIG(p) (0x041c + ((p) << 10))
- +#define PORT_SERIAL_CONTROL(p) (0x043c + ((p) << 10))
- +#define PORT_STATUS(p) (0x0444 + ((p) << 10))
- +#define TX_FIFO_EMPTY 0x00000400
- +#define TXQ_COMMAND(p) (0x0448 + ((p) << 10))
- +#define TXQ_FIX_PRIO_CONF(p) (0x044c + ((p) << 10))
- +#define TX_BW_RATE(p) (0x0450 + ((p) << 10))
- +#define TX_BW_MTU(p) (0x0458 + ((p) << 10))
- +#define TX_BW_BURST(p) (0x045c + ((p) << 10))
- +#define INT_CAUSE(p) (0x0460 + ((p) << 10))
- +#define INT_TX_END 0x07f80000
- +#define INT_RX 0x0007fbfc
- +#define INT_EXT 0x00000002
- +#define INT_CAUSE_EXT(p) (0x0464 + ((p) << 10))
- +#define INT_EXT_LINK 0x00100000
- +#define INT_EXT_PHY 0x00010000
- +#define INT_EXT_TX_ERROR_0 0x00000100
- +#define INT_EXT_TX_0 0x00000001
- +#define INT_EXT_TX 0x0000ffff
- +#define INT_MASK(p) (0x0468 + ((p) << 10))
- +#define INT_MASK_EXT(p) (0x046c + ((p) << 10))
- +#define TX_FIFO_URGENT_THRESHOLD(p) (0x0474 + ((p) << 10))
- +#define TXQ_FIX_PRIO_CONF_MOVED(p) (0x04dc + ((p) << 10))
- +#define TX_BW_RATE_MOVED(p) (0x04e0 + ((p) << 10))
- +#define TX_BW_MTU_MOVED(p) (0x04e8 + ((p) << 10))
- +#define TX_BW_BURST_MOVED(p) (0x04ec + ((p) << 10))
- +#define RXQ_CURRENT_DESC_PTR(p, q) (0x060c + ((p) << 10) + ((q) << 4))
- +#define RXQ_COMMAND(p) (0x0680 + ((p) << 10))
- +#define TXQ_CURRENT_DESC_PTR(p, q) (0x06c0 + ((p) << 10) + ((q) << 2))
- +#define TXQ_BW_TOKENS(p, q) (0x0700 + ((p) << 10) + ((q) << 4))
- +#define TXQ_BW_CONF(p, q) (0x0704 + ((p) << 10) + ((q) << 4))
- +#define TXQ_BW_WRR_CONF(p, q) (0x0708 + ((p) << 10) + ((q) << 4))
- +#define MIB_COUNTERS(p) (0x1000 + ((p) << 7))
- +#define SPECIAL_MCAST_TABLE(p) (0x1400 + ((p) << 10))
- +#define OTHER_MCAST_TABLE(p) (0x1500 + ((p) << 10))
- +#define UNICAST_TABLE(p) (0x1600 + ((p) << 10))
- +
- +
- +/*
- + * SDMA configuration register.
- + */
- #define RX_BURST_SIZE_4_64BIT (2 << 1)
- -#define RX_BURST_SIZE_8_64BIT (3 << 1)
- -#define RX_BURST_SIZE_16_64BIT (4 << 1)
- #define BLM_RX_NO_SWAP (1 << 4)
- -#define BLM_RX_BYTE_SWAP (0 << 4)
- #define BLM_TX_NO_SWAP (1 << 5)
- -#define BLM_TX_BYTE_SWAP (0 << 5)
- -#define DESCRIPTORS_BYTE_SWAP (1 << 6)
- -#define DESCRIPTORS_NO_SWAP (0 << 6)
- -#define IPG_INT_RX(value) (((value) & 0x3fff) << 8)
- -#define TX_BURST_SIZE_1_64BIT (0 << 22)
- -#define TX_BURST_SIZE_2_64BIT (1 << 22)
- #define TX_BURST_SIZE_4_64BIT (2 << 22)
- -#define TX_BURST_SIZE_8_64BIT (3 << 22)
- -#define TX_BURST_SIZE_16_64BIT (4 << 22)
-
- #if defined(__BIG_ENDIAN)
- #define PORT_SDMA_CONFIG_DEFAULT_VALUE \
- RX_BURST_SIZE_4_64BIT | \
- - IPG_INT_RX(0) | \
- TX_BURST_SIZE_4_64BIT
- #elif defined(__LITTLE_ENDIAN)
- #define PORT_SDMA_CONFIG_DEFAULT_VALUE \
- RX_BURST_SIZE_4_64BIT | \
- BLM_RX_NO_SWAP | \
- BLM_TX_NO_SWAP | \
- - IPG_INT_RX(0) | \
- TX_BURST_SIZE_4_64BIT
- #else
- #error One of __BIG_ENDIAN or __LITTLE_ENDIAN must be defined
- #endif
-
- -/* These macros describe Ethernet Port serial control reg (PSCR) bits */
- -#define SERIAL_PORT_DISABLE (0 << 0)
- -#define SERIAL_PORT_ENABLE (1 << 0)
- -#define DO_NOT_FORCE_LINK_PASS (0 << 1)
- -#define FORCE_LINK_PASS (1 << 1)
- -#define ENABLE_AUTO_NEG_FOR_DUPLX (0 << 2)
- -#define DISABLE_AUTO_NEG_FOR_DUPLX (1 << 2)
- -#define ENABLE_AUTO_NEG_FOR_FLOW_CTRL (0 << 3)
- -#define DISABLE_AUTO_NEG_FOR_FLOW_CTRL (1 << 3)
- -#define ADV_NO_FLOW_CTRL (0 << 4)
- -#define ADV_SYMMETRIC_FLOW_CTRL (1 << 4)
- -#define FORCE_FC_MODE_NO_PAUSE_DIS_TX (0 << 5)
- -#define FORCE_FC_MODE_TX_PAUSE_DIS (1 << 5)
- -#define FORCE_BP_MODE_NO_JAM (0 << 7)
- -#define FORCE_BP_MODE_JAM_TX (1 << 7)
- -#define FORCE_BP_MODE_JAM_TX_ON_RX_ERR (2 << 7)
- -#define SERIAL_PORT_CONTROL_RESERVED (1 << 9)
- -#define FORCE_LINK_FAIL (0 << 10)
- -#define DO_NOT_FORCE_LINK_FAIL (1 << 10)
- -#define RETRANSMIT_16_ATTEMPTS (0 << 11)
- -#define RETRANSMIT_FOREVER (1 << 11)
- -#define ENABLE_AUTO_NEG_SPEED_GMII (0 << 13)
- -#define DISABLE_AUTO_NEG_SPEED_GMII (1 << 13)
- -#define DTE_ADV_0 (0 << 14)
- -#define DTE_ADV_1 (1 << 14)
- -#define DISABLE_AUTO_NEG_BYPASS (0 << 15)
- -#define ENABLE_AUTO_NEG_BYPASS (1 << 15)
- -#define AUTO_NEG_NO_CHANGE (0 << 16)
- -#define RESTART_AUTO_NEG (1 << 16)
- -#define MAX_RX_PACKET_1518BYTE (0 << 17)
- +
- +/*
- + * Port serial control register.
- + */
- +#define SET_MII_SPEED_TO_100 (1 << 24)
- +#define SET_GMII_SPEED_TO_1000 (1 << 23)
- +#define SET_FULL_DUPLEX_MODE (1 << 21)
- #define MAX_RX_PACKET_1522BYTE (1 << 17)
- -#define MAX_RX_PACKET_1552BYTE (2 << 17)
- -#define MAX_RX_PACKET_9022BYTE (3 << 17)
- -#define MAX_RX_PACKET_9192BYTE (4 << 17)
- #define MAX_RX_PACKET_9700BYTE (5 << 17)
- #define MAX_RX_PACKET_MASK (7 << 17)
- -#define CLR_EXT_LOOPBACK (0 << 20)
- -#define SET_EXT_LOOPBACK (1 << 20)
- -#define SET_HALF_DUPLEX_MODE (0 << 21)
- -#define SET_FULL_DUPLEX_MODE (1 << 21)
- -#define DISABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX (0 << 22)
- -#define ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX (1 << 22)
- -#define SET_GMII_SPEED_TO_10_100 (0 << 23)
- -#define SET_GMII_SPEED_TO_1000 (1 << 23)
- -#define SET_MII_SPEED_TO_10 (0 << 24)
- -#define SET_MII_SPEED_TO_100 (1 << 24)
- +#define DISABLE_AUTO_NEG_SPEED_GMII (1 << 13)
- +#define DO_NOT_FORCE_LINK_FAIL (1 << 10)
- +#define SERIAL_PORT_CONTROL_RESERVED (1 << 9)
- +#define DISABLE_AUTO_NEG_FOR_FLOW_CTRL (1 << 3)
- +#define DISABLE_AUTO_NEG_FOR_DUPLEX (1 << 2)
- +#define FORCE_LINK_PASS (1 << 1)
- +#define SERIAL_PORT_ENABLE (1 << 0)
- +
- +#define DEFAULT_RX_QUEUE_SIZE 400
- +#define DEFAULT_TX_QUEUE_SIZE 800
-
- -#define PORT_SERIAL_CONTROL_DEFAULT_VALUE \
- - DO_NOT_FORCE_LINK_PASS | \
- - ENABLE_AUTO_NEG_FOR_DUPLX | \
- - DISABLE_AUTO_NEG_FOR_FLOW_CTRL | \
- - ADV_SYMMETRIC_FLOW_CTRL | \
- - FORCE_FC_MODE_NO_PAUSE_DIS_TX | \
- - FORCE_BP_MODE_NO_JAM | \
- - (1 << 9) /* reserved */ | \
- - DO_NOT_FORCE_LINK_FAIL | \
- - RETRANSMIT_16_ATTEMPTS | \
- - ENABLE_AUTO_NEG_SPEED_GMII | \
- - DTE_ADV_0 | \
- - DISABLE_AUTO_NEG_BYPASS | \
- - AUTO_NEG_NO_CHANGE | \
- - MAX_RX_PACKET_9700BYTE | \
- - CLR_EXT_LOOPBACK | \
- - SET_FULL_DUPLEX_MODE | \
- - ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX
- -
- -/* These macros describe Ethernet Serial Status reg (PSR) bits */
- -#define PORT_STATUS_MODE_10_BIT (1 << 0)
- -#define PORT_STATUS_LINK_UP (1 << 1)
- -#define PORT_STATUS_FULL_DUPLEX (1 << 2)
- -#define PORT_STATUS_FLOW_CONTROL (1 << 3)
- -#define PORT_STATUS_GMII_1000 (1 << 4)
- -#define PORT_STATUS_MII_100 (1 << 5)
- -/* PSR bit 6 is undocumented */
- -#define PORT_STATUS_TX_IN_PROGRESS (1 << 7)
- -#define PORT_STATUS_AUTONEG_BYPASSED (1 << 8)
- -#define PORT_STATUS_PARTITION (1 << 9)
- -#define PORT_STATUS_TX_FIFO_EMPTY (1 << 10)
- -/* PSR bits 11-31 are reserved */
- -
- -#define PORT_DEFAULT_TRANSMIT_QUEUE_SIZE 800
- -#define PORT_DEFAULT_RECEIVE_QUEUE_SIZE 400
- -
- -#define DESC_SIZE 64
- -
- -#define ETH_RX_QUEUES_ENABLED (1 << 0) /* use only Q0 for receive */
- -#define ETH_TX_QUEUES_ENABLED (1 << 0) /* use only Q0 for transmit */
- -
- -#define ETH_INT_CAUSE_RX_DONE (ETH_RX_QUEUES_ENABLED << 2)
- -#define ETH_INT_CAUSE_RX_ERROR (ETH_RX_QUEUES_ENABLED << 9)
- -#define ETH_INT_CAUSE_RX (ETH_INT_CAUSE_RX_DONE | ETH_INT_CAUSE_RX_ERROR)
- -#define ETH_INT_CAUSE_EXT 0x00000002
- -#define ETH_INT_UNMASK_ALL (ETH_INT_CAUSE_RX | ETH_INT_CAUSE_EXT)
- -
- -#define ETH_INT_CAUSE_TX_DONE (ETH_TX_QUEUES_ENABLED << 0)
- -#define ETH_INT_CAUSE_TX_ERROR (ETH_TX_QUEUES_ENABLED << 8)
- -#define ETH_INT_CAUSE_TX (ETH_INT_CAUSE_TX_DONE | ETH_INT_CAUSE_TX_ERROR)
- -#define ETH_INT_CAUSE_PHY 0x00010000
- -#define ETH_INT_CAUSE_STATE 0x00100000
- -#define ETH_INT_UNMASK_ALL_EXT (ETH_INT_CAUSE_TX | ETH_INT_CAUSE_PHY | \
- - ETH_INT_CAUSE_STATE)
- -
- -#define ETH_INT_MASK_ALL 0x00000000
- -#define ETH_INT_MASK_ALL_EXT 0x00000000
- -
- -#define PHY_WAIT_ITERATIONS 1000 /* 1000 iterations * 10uS = 10mS max */
- -#define PHY_WAIT_MICRO_SECONDS 10
- -
- -/* Buffer offset from buffer pointer */
- -#define RX_BUF_OFFSET 0x2
- -
- -/* Gigabit Ethernet Unit Global Registers */
- -
- -/* MIB Counters register definitions */
- -#define ETH_MIB_GOOD_OCTETS_RECEIVED_LOW 0x0
- -#define ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH 0x4
- -#define ETH_MIB_BAD_OCTETS_RECEIVED 0x8
- -#define ETH_MIB_INTERNAL_MAC_TRANSMIT_ERR 0xc
- -#define ETH_MIB_GOOD_FRAMES_RECEIVED 0x10
- -#define ETH_MIB_BAD_FRAMES_RECEIVED 0x14
- -#define ETH_MIB_BROADCAST_FRAMES_RECEIVED 0x18
- -#define ETH_MIB_MULTICAST_FRAMES_RECEIVED 0x1c
- -#define ETH_MIB_FRAMES_64_OCTETS 0x20
- -#define ETH_MIB_FRAMES_65_TO_127_OCTETS 0x24
- -#define ETH_MIB_FRAMES_128_TO_255_OCTETS 0x28
- -#define ETH_MIB_FRAMES_256_TO_511_OCTETS 0x2c
- -#define ETH_MIB_FRAMES_512_TO_1023_OCTETS 0x30
- -#define ETH_MIB_FRAMES_1024_TO_MAX_OCTETS 0x34
- -#define ETH_MIB_GOOD_OCTETS_SENT_LOW 0x38
- -#define ETH_MIB_GOOD_OCTETS_SENT_HIGH 0x3c
- -#define ETH_MIB_GOOD_FRAMES_SENT 0x40
- -#define ETH_MIB_EXCESSIVE_COLLISION 0x44
- -#define ETH_MIB_MULTICAST_FRAMES_SENT 0x48
- -#define ETH_MIB_BROADCAST_FRAMES_SENT 0x4c
- -#define ETH_MIB_UNREC_MAC_CONTROL_RECEIVED 0x50
- -#define ETH_MIB_FC_SENT 0x54
- -#define ETH_MIB_GOOD_FC_RECEIVED 0x58
- -#define ETH_MIB_BAD_FC_RECEIVED 0x5c
- -#define ETH_MIB_UNDERSIZE_RECEIVED 0x60
- -#define ETH_MIB_FRAGMENTS_RECEIVED 0x64
- -#define ETH_MIB_OVERSIZE_RECEIVED 0x68
- -#define ETH_MIB_JABBER_RECEIVED 0x6c
- -#define ETH_MIB_MAC_RECEIVE_ERROR 0x70
- -#define ETH_MIB_BAD_CRC_EVENT 0x74
- -#define ETH_MIB_COLLISION 0x78
- -#define ETH_MIB_LATE_COLLISION 0x7c
- -
- -/* Port serial status reg (PSR) */
- -#define ETH_INTERFACE_PCM 0x00000001
- -#define ETH_LINK_IS_UP 0x00000002
- -#define ETH_PORT_AT_FULL_DUPLEX 0x00000004
- -#define ETH_RX_FLOW_CTRL_ENABLED 0x00000008
- -#define ETH_GMII_SPEED_1000 0x00000010
- -#define ETH_MII_SPEED_100 0x00000020
- -#define ETH_TX_IN_PROGRESS 0x00000080
- -#define ETH_BYPASS_ACTIVE 0x00000100
- -#define ETH_PORT_AT_PARTITION_STATE 0x00000200
- -#define ETH_PORT_TX_FIFO_EMPTY 0x00000400
- -
- -/* SMI reg */
- -#define ETH_SMI_BUSY 0x10000000 /* 0 - Write, 1 - Read */
- -#define ETH_SMI_READ_VALID 0x08000000 /* 0 - Write, 1 - Read */
- -#define ETH_SMI_OPCODE_WRITE 0 /* Completion of Read */
- -#define ETH_SMI_OPCODE_READ 0x04000000 /* Operation is in progress */
- -
- -/* Interrupt Cause Register Bit Definitions */
- -
- -/* SDMA command status fields macros */
- -
- -/* Tx & Rx descriptors status */
- -#define ETH_ERROR_SUMMARY 0x00000001
- -
- -/* Tx & Rx descriptors command */
- -#define ETH_BUFFER_OWNED_BY_DMA 0x80000000
- -
- -/* Tx descriptors status */
- -#define ETH_LC_ERROR 0
- -#define ETH_UR_ERROR 0x00000002
- -#define ETH_RL_ERROR 0x00000004
- -#define ETH_LLC_SNAP_FORMAT 0x00000200
- -
- -/* Rx descriptors status */
- -#define ETH_OVERRUN_ERROR 0x00000002
- -#define ETH_MAX_FRAME_LENGTH_ERROR 0x00000004
- -#define ETH_RESOURCE_ERROR 0x00000006
- -#define ETH_VLAN_TAGGED 0x00080000
- -#define ETH_BPDU_FRAME 0x00100000
- -#define ETH_UDP_FRAME_OVER_IP_V_4 0x00200000
- -#define ETH_OTHER_FRAME_TYPE 0x00400000
- -#define ETH_LAYER_2_IS_ETH_V_2 0x00800000
- -#define ETH_FRAME_TYPE_IP_V_4 0x01000000
- -#define ETH_FRAME_HEADER_OK 0x02000000
- -#define ETH_RX_LAST_DESC 0x04000000
- -#define ETH_RX_FIRST_DESC 0x08000000
- -#define ETH_UNKNOWN_DESTINATION_ADDR 0x10000000
- -#define ETH_RX_ENABLE_INTERRUPT 0x20000000
- -#define ETH_LAYER_4_CHECKSUM_OK 0x40000000
- -
- -/* Rx descriptors byte count */
- -#define ETH_FRAME_FRAGMENTED 0x00000004
- -
- -/* Tx descriptors command */
- -#define ETH_LAYER_4_CHECKSUM_FIRST_DESC 0x00000400
- -#define ETH_FRAME_SET_TO_VLAN 0x00008000
- -#define ETH_UDP_FRAME 0x00010000
- -#define ETH_GEN_TCP_UDP_CHECKSUM 0x00020000
- -#define ETH_GEN_IP_V_4_CHECKSUM 0x00040000
- -#define ETH_ZERO_PADDING 0x00080000
- -#define ETH_TX_LAST_DESC 0x00100000
- -#define ETH_TX_FIRST_DESC 0x00200000
- -#define ETH_GEN_CRC 0x00400000
- -#define ETH_TX_ENABLE_INTERRUPT 0x00800000
- -#define ETH_AUTO_MODE 0x40000000
- -
- -#define ETH_TX_IHL_SHIFT 11
- -
- -/* typedefs */
- -
- -typedef enum _eth_func_ret_status {
- - ETH_OK, /* Returned as expected. */
- - ETH_ERROR, /* Fundamental error. */
- - ETH_RETRY, /* Could not process request. Try later.*/
- - ETH_END_OF_JOB, /* Ring has nothing to process. */
- - ETH_QUEUE_FULL, /* Ring resource error. */
- - ETH_QUEUE_LAST_RESOURCE /* Ring resources about to exhaust. */
- -} ETH_FUNC_RET_STATUS;
-
- -/* These are for big-endian machines. Little endian needs different
- - * definitions.
- +/*
- + * RX/TX descriptors.
- */
- #if defined(__BIG_ENDIAN)
- -struct eth_rx_desc {
- +struct rx_desc {
- u16 byte_cnt; /* Descriptor buffer byte count */
- u16 buf_size; /* Buffer size */
- u32 cmd_sts; /* Descriptor command status */
- @@ -441,7 +180,7 @@
- u32 buf_ptr; /* Descriptor buffer pointer */
- };
-
- -struct eth_tx_desc {
- +struct tx_desc {
- u16 byte_cnt; /* buffer byte count */
- u16 l4i_chk; /* CPU provided TCP checksum */
- u32 cmd_sts; /* Command/status field */
- @@ -449,7 +188,7 @@
- u32 buf_ptr; /* pointer to buffer for this descriptor*/
- };
- #elif defined(__LITTLE_ENDIAN)
- -struct eth_rx_desc {
- +struct rx_desc {
- u32 cmd_sts; /* Descriptor command status */
- u16 buf_size; /* Buffer size */
- u16 byte_cnt; /* Descriptor buffer byte count */
- @@ -457,7 +196,7 @@
- u32 next_desc_ptr; /* Next descriptor pointer */
- };
-
- -struct eth_tx_desc {
- +struct tx_desc {
- u32 cmd_sts; /* Command/status field */
- u16 l4i_chk; /* CPU provided TCP checksum */
- u16 byte_cnt; /* buffer byte count */
- @@ -468,18 +207,59 @@
- #error One of __BIG_ENDIAN or __LITTLE_ENDIAN must be defined
- #endif
-
- -/* Unified struct for Rx and Tx operations. The user is not required to */
- -/* be familier with neither Tx nor Rx descriptors. */
- -struct pkt_info {
- - unsigned short byte_cnt; /* Descriptor buffer byte count */
- - unsigned short l4i_chk; /* Tx CPU provided TCP Checksum */
- - unsigned int cmd_sts; /* Descriptor command status */
- - dma_addr_t buf_ptr; /* Descriptor buffer pointer */
- - struct sk_buff *return_info; /* User resource return information */
- +/* RX & TX descriptor command */
- +#define BUFFER_OWNED_BY_DMA 0x80000000
- +
- +/* RX & TX descriptor status */
- +#define ERROR_SUMMARY 0x00000001
- +
- +/* RX descriptor status */
- +#define LAYER_4_CHECKSUM_OK 0x40000000
- +#define RX_ENABLE_INTERRUPT 0x20000000
- +#define RX_FIRST_DESC 0x08000000
- +#define RX_LAST_DESC 0x04000000
- +
- +/* TX descriptor command */
- +#define TX_ENABLE_INTERRUPT 0x00800000
- +#define GEN_CRC 0x00400000
- +#define TX_FIRST_DESC 0x00200000
- +#define TX_LAST_DESC 0x00100000
- +#define ZERO_PADDING 0x00080000
- +#define GEN_IP_V4_CHECKSUM 0x00040000
- +#define GEN_TCP_UDP_CHECKSUM 0x00020000
- +#define UDP_FRAME 0x00010000
- +
- +#define TX_IHL_SHIFT 11
- +
- +
- +/* global *******************************************************************/
- +struct mv643xx_eth_shared_private {
- + /*
- + * Ethernet controller base address.
- + */
- + void __iomem *base;
- +
- + /*
- + * Protects access to SMI_REG, which is shared between ports.
- + */
- + spinlock_t phy_lock;
- +
- + /*
- + * Per-port MBUS window access register value.
- + */
- + u32 win_protect;
- +
- + /*
- + * Hardware-specific parameters.
- + */
- + unsigned int t_clk;
- + int extended_rx_coal_limit;
- + int tx_bw_control_moved;
- };
-
- -/* Ethernet port specific information */
- -struct mv643xx_mib_counters {
- +
- +/* per-port *****************************************************************/
- +struct mib_counters {
- u64 good_octets_received;
- u32 bad_octets_received;
- u32 internal_mac_transmit_err;
- @@ -512,461 +292,282 @@
- u32 late_collision;
- };
-
- -struct mv643xx_shared_private {
- - void __iomem *eth_base;
- -
- - /* used to protect SMI_REG, which is shared across ports */
- - spinlock_t phy_lock;
- -
- - u32 win_protect;
- -
- - unsigned int t_clk;
- -};
- -
- -struct mv643xx_private {
- - struct mv643xx_shared_private *shared;
- - int port_num; /* User Ethernet port number */
- -
- - struct mv643xx_shared_private *shared_smi;
- +struct rx_queue {
- + int index;
-
- - u32 rx_sram_addr; /* Base address of rx sram area */
- - u32 rx_sram_size; /* Size of rx sram area */
- - u32 tx_sram_addr; /* Base address of tx sram area */
- - u32 tx_sram_size; /* Size of tx sram area */
- + int rx_ring_size;
-
- - int rx_resource_err; /* Rx ring resource error flag */
- + int rx_desc_count;
- + int rx_curr_desc;
- + int rx_used_desc;
-
- - /* Tx/Rx rings managment indexes fields. For driver use */
- + struct rx_desc *rx_desc_area;
- + dma_addr_t rx_desc_dma;
- + int rx_desc_area_size;
- + struct sk_buff **rx_skb;
-
- - /* Next available and first returning Rx resource */
- - int rx_curr_desc_q, rx_used_desc_q;
- + struct timer_list rx_oom;
- +};
-
- - /* Next available and first returning Tx resource */
- - int tx_curr_desc_q, tx_used_desc_q;
- +struct tx_queue {
- + int index;
-
- -#ifdef MV643XX_TX_FAST_REFILL
- - u32 tx_clean_threshold;
- -#endif
- + int tx_ring_size;
-
- - struct eth_rx_desc *p_rx_desc_area;
- - dma_addr_t rx_desc_dma;
- - int rx_desc_area_size;
- - struct sk_buff **rx_skb;
- + int tx_desc_count;
- + int tx_curr_desc;
- + int tx_used_desc;
-
- - struct eth_tx_desc *p_tx_desc_area;
- + struct tx_desc *tx_desc_area;
- dma_addr_t tx_desc_dma;
- int tx_desc_area_size;
- struct sk_buff **tx_skb;
- +};
-
- - struct work_struct tx_timeout_task;
- +struct mv643xx_eth_private {
- + struct mv643xx_eth_shared_private *shared;
- + int port_num;
-
- struct net_device *dev;
- - struct napi_struct napi;
- - struct net_device_stats stats;
- - struct mv643xx_mib_counters mib_counters;
- +
- + struct mv643xx_eth_shared_private *shared_smi;
- + int phy_addr;
- +
- spinlock_t lock;
- - /* Size of Tx Ring per queue */
- - int tx_ring_size;
- - /* Number of tx descriptors in use */
- - int tx_desc_count;
- - /* Size of Rx Ring per queue */
- - int rx_ring_size;
- - /* Number of rx descriptors in use */
- - int rx_desc_count;
- +
- + struct mib_counters mib_counters;
- + struct work_struct tx_timeout_task;
- + struct mii_if_info mii;
-
- /*
- - * Used in case RX Ring is empty, which can be caused when
- - * system does not have resources (skb's)
- + * RX state.
- */
- - struct timer_list timeout;
- -
- - u32 rx_int_coal;
- - u32 tx_int_coal;
- - struct mii_if_info mii;
- -};
- + int default_rx_ring_size;
- + unsigned long rx_desc_sram_addr;
- + int rx_desc_sram_size;
- + u8 rxq_mask;
- + int rxq_primary;
- + struct napi_struct napi;
- + struct rx_queue rxq[8];
-
- -/* Static function declarations */
- -static void eth_port_init(struct mv643xx_private *mp);
- -static void eth_port_reset(struct mv643xx_private *mp);
- -static void eth_port_start(struct net_device *dev);
- -
- -static void ethernet_phy_reset(struct mv643xx_private *mp);
- -
- -static void eth_port_write_smi_reg(struct mv643xx_private *mp,
- - unsigned int phy_reg, unsigned int value);
- -
- -static void eth_port_read_smi_reg(struct mv643xx_private *mp,
- - unsigned int phy_reg, unsigned int *value);
- -
- -static void eth_clear_mib_counters(struct mv643xx_private *mp);
- -
- -static ETH_FUNC_RET_STATUS eth_port_receive(struct mv643xx_private *mp,
- - struct pkt_info *p_pkt_info);
- -static ETH_FUNC_RET_STATUS eth_rx_return_buff(struct mv643xx_private *mp,
- - struct pkt_info *p_pkt_info);
- -
- -static void eth_port_uc_addr_get(struct mv643xx_private *mp,
- - unsigned char *p_addr);
- -static void eth_port_uc_addr_set(struct mv643xx_private *mp,
- - unsigned char *p_addr);
- -static void eth_port_set_multicast_list(struct net_device *);
- -static void mv643xx_eth_port_enable_tx(struct mv643xx_private *mp,
- - unsigned int queues);
- -static void mv643xx_eth_port_enable_rx(struct mv643xx_private *mp,
- - unsigned int queues);
- -static unsigned int mv643xx_eth_port_disable_tx(struct mv643xx_private *mp);
- -static unsigned int mv643xx_eth_port_disable_rx(struct mv643xx_private *mp);
- -static int mv643xx_eth_open(struct net_device *);
- -static int mv643xx_eth_stop(struct net_device *);
- -static void eth_port_init_mac_tables(struct mv643xx_private *mp);
- -#ifdef MV643XX_NAPI
- -static int mv643xx_poll(struct napi_struct *napi, int budget);
- + /*
- + * TX state.
- + */
- + int default_tx_ring_size;
- + unsigned long tx_desc_sram_addr;
- + int tx_desc_sram_size;
- + u8 txq_mask;
- + int txq_primary;
- + struct tx_queue txq[8];
- +#ifdef MV643XX_ETH_TX_FAST_REFILL
- + int tx_clean_threshold;
- #endif
- -static int ethernet_phy_get(struct mv643xx_private *mp);
- -static void ethernet_phy_set(struct mv643xx_private *mp, int phy_addr);
- -static int ethernet_phy_detect(struct mv643xx_private *mp);
- -static int mv643xx_mdio_read(struct net_device *dev, int phy_id, int location);
- -static void mv643xx_mdio_write(struct net_device *dev, int phy_id, int location, int val);
- -static int mv643xx_eth_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
- -static const struct ethtool_ops mv643xx_ethtool_ops;
- +};
-
- -static char mv643xx_driver_name[] = "mv643xx_eth";
- -static char mv643xx_driver_version[] = "1.0";
-
- -static inline u32 rdl(struct mv643xx_private *mp, int offset)
- +/* port register accessors **************************************************/
- +static inline u32 rdl(struct mv643xx_eth_private *mp, int offset)
- {
- - return readl(mp->shared->eth_base + offset);
- + return readl(mp->shared->base + offset);
- }
-
- -static inline void wrl(struct mv643xx_private *mp, int offset, u32 data)
- +static inline void wrl(struct mv643xx_eth_private *mp, int offset, u32 data)
- {
- - writel(data, mp->shared->eth_base + offset);
- + writel(data, mp->shared->base + offset);
- }
-
- -/*
- - * Changes MTU (maximum transfer unit) of the gigabit ethenret port
- - *
- - * Input : pointer to ethernet interface network device structure
- - * new mtu size
- - * Output : 0 upon success, -EINVAL upon failure
- - */
- -static int mv643xx_eth_change_mtu(struct net_device *dev, int new_mtu)
- -{
- - if ((new_mtu > 9500) || (new_mtu < 64))
- - return -EINVAL;
- -
- - dev->mtu = new_mtu;
- - if (!netif_running(dev))
- - return 0;
- -
- - /*
- - * Stop and then re-open the interface. This will allocate RX
- - * skbs of the new MTU.
- - * There is a possible danger that the open will not succeed,
- - * due to memory being full, which might fail the open function.
- - */
- - mv643xx_eth_stop(dev);
- - if (mv643xx_eth_open(dev)) {
- - printk(KERN_ERR "%s: Fatal error on opening device\n",
- - dev->name);
- - }
- -
- - return 0;
- -}
-
- -/*
- - * mv643xx_eth_rx_refill_descs
- - *
- - * Fills / refills RX queue on a certain gigabit ethernet port
- - *
- - * Input : pointer to ethernet interface network device structure
- - * Output : N/A
- - */
- -static void mv643xx_eth_rx_refill_descs(struct net_device *dev)
- +/* rxq/txq helper functions *************************************************/
- +static struct mv643xx_eth_private *rxq_to_mp(struct rx_queue *rxq)
- {
- - struct mv643xx_private *mp = netdev_priv(dev);
- - struct pkt_info pkt_info;
- - struct sk_buff *skb;
- - int unaligned;
- -
- - while (mp->rx_desc_count < mp->rx_ring_size) {
- - skb = dev_alloc_skb(ETH_RX_SKB_SIZE + dma_get_cache_alignment());
- - if (!skb)
- - break;
- - mp->rx_desc_count++;
- - unaligned = (u32)skb->data & (dma_get_cache_alignment() - 1);
- - if (unaligned)
- - skb_reserve(skb, dma_get_cache_alignment() - unaligned);
- - pkt_info.cmd_sts = ETH_RX_ENABLE_INTERRUPT;
- - pkt_info.byte_cnt = ETH_RX_SKB_SIZE;
- - pkt_info.buf_ptr = dma_map_single(NULL, skb->data,
- - ETH_RX_SKB_SIZE, DMA_FROM_DEVICE);
- - pkt_info.return_info = skb;
- - if (eth_rx_return_buff(mp, &pkt_info) != ETH_OK) {
- - printk(KERN_ERR
- - "%s: Error allocating RX Ring\n", dev->name);
- - break;
- - }
- - skb_reserve(skb, ETH_HW_IP_ALIGN);
- - }
- - /*
- - * If RX ring is empty of SKB, set a timer to try allocating
- - * again at a later time.
- - */
- - if (mp->rx_desc_count == 0) {
- - printk(KERN_INFO "%s: Rx ring is empty\n", dev->name);
- - mp->timeout.expires = jiffies + (HZ / 10); /* 100 mSec */
- - add_timer(&mp->timeout);
- - }
- + return container_of(rxq, struct mv643xx_eth_private, rxq[rxq->index]);
- }
-
- -/*
- - * mv643xx_eth_rx_refill_descs_timer_wrapper
- - *
- - * Timer routine to wake up RX queue filling task. This function is
- - * used only in case the RX queue is empty, and all alloc_skb has
- - * failed (due to out of memory event).
- - *
- - * Input : pointer to ethernet interface network device structure
- - * Output : N/A
- - */
- -static inline void mv643xx_eth_rx_refill_descs_timer_wrapper(unsigned long data)
- +static struct mv643xx_eth_private *txq_to_mp(struct tx_queue *txq)
- {
- - mv643xx_eth_rx_refill_descs((struct net_device *)data);
- + return container_of(txq, struct mv643xx_eth_private, txq[txq->index]);
- }
-
- -/*
- - * mv643xx_eth_update_mac_address
- - *
- - * Update the MAC address of the port in the address table
- - *
- - * Input : pointer to ethernet interface network device structure
- - * Output : N/A
- - */
- -static void mv643xx_eth_update_mac_address(struct net_device *dev)
- +static void rxq_enable(struct rx_queue *rxq)
- {
- - struct mv643xx_private *mp = netdev_priv(dev);
- -
- - eth_port_init_mac_tables(mp);
- - eth_port_uc_addr_set(mp, dev->dev_addr);
- + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
- + wrl(mp, RXQ_COMMAND(mp->port_num), 1 << rxq->index);
- }
-
- -/*
- - * mv643xx_eth_set_rx_mode
- - *
- - * Change from promiscuos to regular rx mode
- - *
- - * Input : pointer to ethernet interface network device structure
- - * Output : N/A
- - */
- -static void mv643xx_eth_set_rx_mode(struct net_device *dev)
- +static void rxq_disable(struct rx_queue *rxq)
- {
- - struct mv643xx_private *mp = netdev_priv(dev);
- - u32 config_reg;
- -
- - config_reg = rdl(mp, PORT_CONFIG_REG(mp->port_num));
- - if (dev->flags & IFF_PROMISC)
- - config_reg |= (u32) UNICAST_PROMISCUOUS_MODE;
- - else
- - config_reg &= ~(u32) UNICAST_PROMISCUOUS_MODE;
- - wrl(mp, PORT_CONFIG_REG(mp->port_num), config_reg);
- + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
- + u8 mask = 1 << rxq->index;
-
- - eth_port_set_multicast_list(dev);
- + wrl(mp, RXQ_COMMAND(mp->port_num), mask << 8);
- + while (rdl(mp, RXQ_COMMAND(mp->port_num)) & mask)
- + udelay(10);
- }
-
- -/*
- - * mv643xx_eth_set_mac_address
- - *
- - * Change the interface's mac address.
- - * No special hardware thing should be done because interface is always
- - * put in promiscuous mode.
- - *
- - * Input : pointer to ethernet interface network device structure and
- - * a pointer to the designated entry to be added to the cache.
- - * Output : zero upon success, negative upon failure
- - */
- -static int mv643xx_eth_set_mac_address(struct net_device *dev, void *addr)
- +static void txq_enable(struct tx_queue *txq)
- {
- - int i;
- -
- - for (i = 0; i < 6; i++)
- - /* +2 is for the offset of the HW addr type */
- - dev->dev_addr[i] = ((unsigned char *)addr)[i + 2];
- - mv643xx_eth_update_mac_address(dev);
- - return 0;
- + struct mv643xx_eth_private *mp = txq_to_mp(txq);
- + wrl(mp, TXQ_COMMAND(mp->port_num), 1 << txq->index);
- }
-
- -/*
- - * mv643xx_eth_tx_timeout
- - *
- - * Called upon a timeout on transmitting a packet
- - *
- - * Input : pointer to ethernet interface network device structure.
- - * Output : N/A
- - */
- -static void mv643xx_eth_tx_timeout(struct net_device *dev)
- +static void txq_disable(struct tx_queue *txq)
- {
- - struct mv643xx_private *mp = netdev_priv(dev);
- -
- - printk(KERN_INFO "%s: TX timeout ", dev->name);
- + struct mv643xx_eth_private *mp = txq_to_mp(txq);
- + u8 mask = 1 << txq->index;
-
- - /* Do the reset outside of interrupt context */
- - schedule_work(&mp->tx_timeout_task);
- + wrl(mp, TXQ_COMMAND(mp->port_num), mask << 8);
- + while (rdl(mp, TXQ_COMMAND(mp->port_num)) & mask)
- + udelay(10);
- }
-
- -/*
- - * mv643xx_eth_tx_timeout_task
- - *
- - * Actual routine to reset the adapter when a timeout on Tx has occurred
- - */
- -static void mv643xx_eth_tx_timeout_task(struct work_struct *ugly)
- +static void __txq_maybe_wake(struct tx_queue *txq)
- {
- - struct mv643xx_private *mp = container_of(ugly, struct mv643xx_private,
- - tx_timeout_task);
- - struct net_device *dev = mp->dev;
- + struct mv643xx_eth_private *mp = txq_to_mp(txq);
-
- - if (!netif_running(dev))
- - return;
- + /*
- + * netif_{stop,wake}_queue() flow control only applies to
- + * the primary queue.
- + */
- + BUG_ON(txq->index != mp->txq_primary);
-
- - netif_stop_queue(dev);
- + if (txq->tx_ring_size - txq->tx_desc_count >= MAX_DESCS_PER_SKB)
- + netif_wake_queue(mp->dev);
- +}
-
- - eth_port_reset(mp);
- - eth_port_start(dev);
-
- - if (mp->tx_ring_size - mp->tx_desc_count >= MAX_DESCS_PER_SKB)
- - netif_wake_queue(dev);
- -}
- +/* rx ***********************************************************************/
- +static void txq_reclaim(struct tx_queue *txq, int force);
-
- -/**
- - * mv643xx_eth_free_tx_descs - Free the tx desc data for completed descriptors
- - *
- - * If force is non-zero, frees uncompleted descriptors as well
- - */
- -static int mv643xx_eth_free_tx_descs(struct net_device *dev, int force)
- +static void rxq_refill(struct rx_queue *rxq)
- {
- - struct mv643xx_private *mp = netdev_priv(dev);
- - struct eth_tx_desc *desc;
- - u32 cmd_sts;
- - struct sk_buff *skb;
- + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
- unsigned long flags;
- - int tx_index;
- - dma_addr_t addr;
- - int count;
- - int released = 0;
- -
- - while (mp->tx_desc_count > 0) {
- - spin_lock_irqsave(&mp->lock, flags);
- -
- - /* tx_desc_count might have changed before acquiring the lock */
- - if (mp->tx_desc_count <= 0) {
- - spin_unlock_irqrestore(&mp->lock, flags);
- - return released;
- - }
- -
- - tx_index = mp->tx_used_desc_q;
- - desc = &mp->p_tx_desc_area[tx_index];
- - cmd_sts = desc->cmd_sts;
-
- - if (!force && (cmd_sts & ETH_BUFFER_OWNED_BY_DMA)) {
- - spin_unlock_irqrestore(&mp->lock, flags);
- - return released;
- - }
- + spin_lock_irqsave(&mp->lock, flags);
-
- - mp->tx_used_desc_q = (tx_index + 1) % mp->tx_ring_size;
- - mp->tx_desc_count--;
- + while (rxq->rx_desc_count < rxq->rx_ring_size) {
- + int skb_size;
- + struct sk_buff *skb;
- + int unaligned;
- + int rx;
-
- - addr = desc->buf_ptr;
- - count = desc->byte_cnt;
- - skb = mp->tx_skb[tx_index];
- - if (skb)
- - mp->tx_skb[tx_index] = NULL;
- + /*
- + * Reserve 2+14 bytes for an ethernet header (the
- + * hardware automatically prepends 2 bytes of dummy
- + * data to each received packet), 4 bytes for a VLAN
- + * header, and 4 bytes for the trailing FCS -- 24
- + * bytes total.
- + */
- + skb_size = mp->dev->mtu + 24;
-
- - if (cmd_sts & ETH_ERROR_SUMMARY) {
- - printk("%s: Error in TX\n", dev->name);
- - dev->stats.tx_errors++;
- - }
- + skb = dev_alloc_skb(skb_size + dma_get_cache_alignment() - 1);
- + if (skb == NULL)
- + break;
-
- - spin_unlock_irqrestore(&mp->lock, flags);
- + unaligned = (u32)skb->data & (dma_get_cache_alignment() - 1);
- + if (unaligned)
- + skb_reserve(skb, dma_get_cache_alignment() - unaligned);
-
- - if (cmd_sts & ETH_TX_FIRST_DESC)
- - dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE);
- - else
- - dma_unmap_page(NULL, addr, count, DMA_TO_DEVICE);
- + rxq->rx_desc_count++;
- + rx = rxq->rx_used_desc;
- + rxq->rx_used_desc = (rx + 1) % rxq->rx_ring_size;
- +
- + rxq->rx_desc_area[rx].buf_ptr = dma_map_single(NULL, skb->data,
- + skb_size, DMA_FROM_DEVICE);
- + rxq->rx_desc_area[rx].buf_size = skb_size;
- + rxq->rx_skb[rx] = skb;
- + wmb();
- + rxq->rx_desc_area[rx].cmd_sts = BUFFER_OWNED_BY_DMA |
- + RX_ENABLE_INTERRUPT;
- + wmb();
-
- - if (skb)
- - dev_kfree_skb_irq(skb);
- + /*
- + * The hardware automatically prepends 2 bytes of
- + * dummy data to each received packet, so that the
- + * IP header ends up 16-byte aligned.
- + */
- + skb_reserve(skb, 2);
- + }
-
- - released = 1;
- + if (rxq->rx_desc_count != rxq->rx_ring_size) {
- + rxq->rx_oom.expires = jiffies + (HZ / 10);
- + add_timer(&rxq->rx_oom);
- }
-
- - return released;
- + spin_unlock_irqrestore(&mp->lock, flags);
- }
-
- -static void mv643xx_eth_free_completed_tx_descs(struct net_device *dev)
- +static inline void rxq_refill_timer_wrapper(unsigned long data)
- {
- - struct mv643xx_private *mp = netdev_priv(dev);
- -
- - if (mv643xx_eth_free_tx_descs(dev, 0) &&
- - mp->tx_ring_size - mp->tx_desc_count >= MAX_DESCS_PER_SKB)
- - netif_wake_queue(dev);
- + rxq_refill((struct rx_queue *)data);
- }
-
- -static void mv643xx_eth_free_all_tx_descs(struct net_device *dev)
- +static int rxq_process(struct rx_queue *rxq, int budget)
- {
- - mv643xx_eth_free_tx_descs(dev, 1);
- -}
- + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
- + struct net_device_stats *stats = &mp->dev->stats;
- + int rx;
-
- -/*
- - * mv643xx_eth_receive
- - *
- - * This function is forward packets that are received from the port's
- - * queues toward kernel core or FastRoute them to another interface.
- - *
- - * Input : dev - a pointer to the required interface
- - * max - maximum number to receive (0 means unlimted)
- - *
- - * Output : number of served packets
- - */
- -static int mv643xx_eth_receive_queue(struct net_device *dev, int budget)
- -{
- - struct mv643xx_private *mp = netdev_priv(dev);
- - struct net_device_stats *stats = &dev->stats;
- - unsigned int received_packets = 0;
- - struct sk_buff *skb;
- - struct pkt_info pkt_info;
- -
- - while (budget-- > 0 && eth_port_receive(mp, &pkt_info) == ETH_OK) {
- - dma_unmap_single(NULL, pkt_info.buf_ptr, ETH_RX_SKB_SIZE,
- - DMA_FROM_DEVICE);
- - mp->rx_desc_count--;
- - received_packets++;
- + rx = 0;
- + while (rx < budget) {
- + struct rx_desc *rx_desc;
- + unsigned int cmd_sts;
- + struct sk_buff *skb;
- + unsigned long flags;
- +
- + spin_lock_irqsave(&mp->lock, flags);
- +
- + rx_desc = &rxq->rx_desc_area[rxq->rx_curr_desc];
- +
- + cmd_sts = rx_desc->cmd_sts;
- + if (cmd_sts & BUFFER_OWNED_BY_DMA) {
- + spin_unlock_irqrestore(&mp->lock, flags);
- + break;
- + }
- + rmb();
- +
- + skb = rxq->rx_skb[rxq->rx_curr_desc];
- + rxq->rx_skb[rxq->rx_curr_desc] = NULL;
- +
- + rxq->rx_curr_desc = (rxq->rx_curr_desc + 1) % rxq->rx_ring_size;
- +
- + spin_unlock_irqrestore(&mp->lock, flags);
- +
- + dma_unmap_single(NULL, rx_desc->buf_ptr + 2,
- + mp->dev->mtu + 24, DMA_FROM_DEVICE);
- + rxq->rx_desc_count--;
- + rx++;
-
- /*
- * Update statistics.
- - * Note byte count includes 4 byte CRC count
- + *
- + * Note that the descriptor byte count includes 2 dummy
- + * bytes automatically inserted by the hardware at the
- + * start of the packet (which we don't count), and a 4
- + * byte CRC at the end of the packet (which we do count).
- */
- stats->rx_packets++;
- - stats->rx_bytes += pkt_info.byte_cnt;
- - skb = pkt_info.return_info;
- + stats->rx_bytes += rx_desc->byte_cnt - 2;
- +
- /*
- - * In case received a packet without first / last bits on OR
- - * the error summary bit is on, the packets needs to be dropeed.
- + * In case we received a packet without first / last bits
- + * on, or the error summary bit is set, the packet needs
- + * to be dropped.
- */
- - if (((pkt_info.cmd_sts
- - & (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) !=
- - (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC))
- - || (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)) {
- + if (((cmd_sts & (RX_FIRST_DESC | RX_LAST_DESC)) !=
- + (RX_FIRST_DESC | RX_LAST_DESC))
- + || (cmd_sts & ERROR_SUMMARY)) {
- stats->rx_dropped++;
- - if ((pkt_info.cmd_sts & (ETH_RX_FIRST_DESC |
- - ETH_RX_LAST_DESC)) !=
- - (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) {
- +
- + if ((cmd_sts & (RX_FIRST_DESC | RX_LAST_DESC)) !=
- + (RX_FIRST_DESC | RX_LAST_DESC)) {
- if (net_ratelimit())
- - printk(KERN_ERR
- - "%s: Received packet spread "
- - "on multiple descriptors\n",
- - dev->name);
- + dev_printk(KERN_ERR, &mp->dev->dev,
- + "received packet spanning "
- + "multiple descriptors\n");
- }
- - if (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)
- +
- + if (cmd_sts & ERROR_SUMMARY)
- stats->rx_errors++;
-
- dev_kfree_skb_irq(skb);
- @@ -975,668 +576,120 @@
- * The -4 is for the CRC in the trailer of the
- * received packet
- */
- - skb_put(skb, pkt_info.byte_cnt - 4);
- + skb_put(skb, rx_desc->byte_cnt - 2 - 4);
-
- - if (pkt_info.cmd_sts & ETH_LAYER_4_CHECKSUM_OK) {
- + if (cmd_sts & LAYER_4_CHECKSUM_OK) {
- skb->ip_summed = CHECKSUM_UNNECESSARY;
- skb->csum = htons(
- - (pkt_info.cmd_sts & 0x0007fff8) >> 3);
- + (cmd_sts & 0x0007fff8) >> 3);
- }
- - skb->protocol = eth_type_trans(skb, dev);
- -#ifdef MV643XX_NAPI
- + skb->protocol = eth_type_trans(skb, mp->dev);
- +#ifdef MV643XX_ETH_NAPI
- netif_receive_skb(skb);
- #else
- netif_rx(skb);
- #endif
- }
- - dev->last_rx = jiffies;
- +
- + mp->dev->last_rx = jiffies;
- }
- - mv643xx_eth_rx_refill_descs(dev); /* Fill RX ring with skb's */
-
- - return received_packets;
- + rxq_refill(rxq);
- +
- + return rx;
- }
-
- -/* Set the mv643xx port configuration register for the speed/duplex mode. */
- -static void mv643xx_eth_update_pscr(struct net_device *dev,
- - struct ethtool_cmd *ecmd)
- +#ifdef MV643XX_ETH_NAPI
- +static int mv643xx_eth_poll(struct napi_struct *napi, int budget)
- {
- - struct mv643xx_private *mp = netdev_priv(dev);
- - int port_num = mp->port_num;
- - u32 o_pscr, n_pscr;
- - unsigned int queues;
- + struct mv643xx_eth_private *mp;
- + int rx;
- + int i;
-
- - o_pscr = rdl(mp, PORT_SERIAL_CONTROL_REG(port_num));
- - n_pscr = o_pscr;
- + mp = container_of(napi, struct mv643xx_eth_private, napi);
-
- - /* clear speed, duplex and rx buffer size fields */
- - n_pscr &= ~(SET_MII_SPEED_TO_100 |
- - SET_GMII_SPEED_TO_1000 |
- - SET_FULL_DUPLEX_MODE |
- - MAX_RX_PACKET_MASK);
- -
- - if (ecmd->duplex == DUPLEX_FULL)
- - n_pscr |= SET_FULL_DUPLEX_MODE;
- -
- - if (ecmd->speed == SPEED_1000)
- - n_pscr |= SET_GMII_SPEED_TO_1000 |
- - MAX_RX_PACKET_9700BYTE;
- - else {
- - if (ecmd->speed == SPEED_100)
- - n_pscr |= SET_MII_SPEED_TO_100;
- - n_pscr |= MAX_RX_PACKET_1522BYTE;
- - }
- -
- - if (n_pscr != o_pscr) {
- - if ((o_pscr & SERIAL_PORT_ENABLE) == 0)
- - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), n_pscr);
- - else {
- - queues = mv643xx_eth_port_disable_tx(mp);
- +#ifdef MV643XX_ETH_TX_FAST_REFILL
- + if (++mp->tx_clean_threshold > 5) {
- + mp->tx_clean_threshold = 0;
- + for (i = 0; i < 8; i++)
- + if (mp->txq_mask & (1 << i))
- + txq_reclaim(mp->txq + i, 0);
- + }
- +#endif
-
- - o_pscr &= ~SERIAL_PORT_ENABLE;
- - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), o_pscr);
- - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), n_pscr);
- - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), n_pscr);
- - if (queues)
- - mv643xx_eth_port_enable_tx(mp, queues);
- - }
- + rx = 0;
- + for (i = 7; rx < budget && i >= 0; i--)
- + if (mp->rxq_mask & (1 << i))
- + rx += rxq_process(mp->rxq + i, budget - rx);
- +
- + if (rx < budget) {
- + netif_rx_complete(mp->dev, napi);
- + wrl(mp, INT_CAUSE(mp->port_num), 0);
- + wrl(mp, INT_CAUSE_EXT(mp->port_num), 0);
- + wrl(mp, INT_MASK(mp->port_num), INT_TX_END | INT_RX | INT_EXT);
- }
- +
- + return rx;
- }
- +#endif
-
- -/*
- - * mv643xx_eth_int_handler
- - *
- - * Main interrupt handler for the gigbit ethernet ports
- - *
- - * Input : irq - irq number (not used)
- - * dev_id - a pointer to the required interface's data structure
- - * regs - not used
- - * Output : N/A
- - */
-
- -static irqreturn_t mv643xx_eth_int_handler(int irq, void *dev_id)
- +/* tx ***********************************************************************/
- +static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb)
- {
- - struct net_device *dev = (struct net_device *)dev_id;
- - struct mv643xx_private *mp = netdev_priv(dev);
- - u32 eth_int_cause, eth_int_cause_ext = 0;
- - unsigned int port_num = mp->port_num;
- -
- - /* Read interrupt cause registers */
- - eth_int_cause = rdl(mp, INTERRUPT_CAUSE_REG(port_num)) &
- - ETH_INT_UNMASK_ALL;
- - if (eth_int_cause & ETH_INT_CAUSE_EXT) {
- - eth_int_cause_ext = rdl(mp,
- - INTERRUPT_CAUSE_EXTEND_REG(port_num)) &
- - ETH_INT_UNMASK_ALL_EXT;
- - wrl(mp, INTERRUPT_CAUSE_EXTEND_REG(port_num),
- - ~eth_int_cause_ext);
- - }
- -
- - /* PHY status changed */
- - if (eth_int_cause_ext & (ETH_INT_CAUSE_PHY | ETH_INT_CAUSE_STATE)) {
- - struct ethtool_cmd cmd;
- + int frag;
-
- - if (mii_link_ok(&mp->mii)) {
- - mii_ethtool_gset(&mp->mii, &cmd);
- - mv643xx_eth_update_pscr(dev, &cmd);
- - mv643xx_eth_port_enable_tx(mp, ETH_TX_QUEUES_ENABLED);
- - if (!netif_carrier_ok(dev)) {
- - netif_carrier_on(dev);
- - if (mp->tx_ring_size - mp->tx_desc_count >=
- - MAX_DESCS_PER_SKB)
- - netif_wake_queue(dev);
- - }
- - } else if (netif_carrier_ok(dev)) {
- - netif_stop_queue(dev);
- - netif_carrier_off(dev);
- - }
- + for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
- + skb_frag_t *fragp = &skb_shinfo(skb)->frags[frag];
- + if (fragp->size <= 8 && fragp->page_offset & 7)
- + return 1;
- }
-
- -#ifdef MV643XX_NAPI
- - if (eth_int_cause & ETH_INT_CAUSE_RX) {
- - /* schedule the NAPI poll routine to maintain port */
- - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_MASK_ALL);
- + return 0;
- +}
-
- - /* wait for previous write to complete */
- - rdl(mp, INTERRUPT_MASK_REG(port_num));
- +static int txq_alloc_desc_index(struct tx_queue *txq)
- +{
- + int tx_desc_curr;
-
- - netif_rx_schedule(dev, &mp->napi);
- - }
- -#else
- - if (eth_int_cause & ETH_INT_CAUSE_RX)
- - mv643xx_eth_receive_queue(dev, INT_MAX);
- -#endif
- - if (eth_int_cause_ext & ETH_INT_CAUSE_TX)
- - mv643xx_eth_free_completed_tx_descs(dev);
- + BUG_ON(txq->tx_desc_count >= txq->tx_ring_size);
-
- - /*
- - * If no real interrupt occured, exit.
- - * This can happen when using gigE interrupt coalescing mechanism.
- - */
- - if ((eth_int_cause == 0x0) && (eth_int_cause_ext == 0x0))
- - return IRQ_NONE;
- + tx_desc_curr = txq->tx_curr_desc;
- + txq->tx_curr_desc = (tx_desc_curr + 1) % txq->tx_ring_size;
-
- - return IRQ_HANDLED;
- -}
- -
- -#ifdef MV643XX_COAL
- -
- -/*
- - * eth_port_set_rx_coal - Sets coalescing interrupt mechanism on RX path
- - *
- - * DESCRIPTION:
- - * This routine sets the RX coalescing interrupt mechanism parameter.
- - * This parameter is a timeout counter, that counts in 64 t_clk
- - * chunks ; that when timeout event occurs a maskable interrupt
- - * occurs.
- - * The parameter is calculated using the tClk of the MV-643xx chip
- - * , and the required delay of the interrupt in usec.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet port
- - * unsigned int delay Delay in usec
- - *
- - * OUTPUT:
- - * Interrupt coalescing mechanism value is set in MV-643xx chip.
- - *
- - * RETURN:
- - * The interrupt coalescing value set in the gigE port.
- - *
- - */
- -static unsigned int eth_port_set_rx_coal(struct mv643xx_private *mp,
- - unsigned int delay)
- -{
- - unsigned int port_num = mp->port_num;
- - unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
- -
- - /* Set RX Coalescing mechanism */
- - wrl(mp, SDMA_CONFIG_REG(port_num),
- - ((coal & 0x3fff) << 8) |
- - (rdl(mp, SDMA_CONFIG_REG(port_num))
- - & 0xffc000ff));
- -
- - return coal;
- -}
- -#endif
- -
- -/*
- - * eth_port_set_tx_coal - Sets coalescing interrupt mechanism on TX path
- - *
- - * DESCRIPTION:
- - * This routine sets the TX coalescing interrupt mechanism parameter.
- - * This parameter is a timeout counter, that counts in 64 t_clk
- - * chunks ; that when timeout event occurs a maskable interrupt
- - * occurs.
- - * The parameter is calculated using the t_cLK frequency of the
- - * MV-643xx chip and the required delay in the interrupt in uSec
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet port
- - * unsigned int delay Delay in uSeconds
- - *
- - * OUTPUT:
- - * Interrupt coalescing mechanism value is set in MV-643xx chip.
- - *
- - * RETURN:
- - * The interrupt coalescing value set in the gigE port.
- - *
- - */
- -static unsigned int eth_port_set_tx_coal(struct mv643xx_private *mp,
- - unsigned int delay)
- -{
- - unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
- -
- - /* Set TX Coalescing mechanism */
- - wrl(mp, TX_FIFO_URGENT_THRESHOLD_REG(mp->port_num), coal << 4);
- -
- - return coal;
- -}
- -
- -/*
- - * ether_init_rx_desc_ring - Curve a Rx chain desc list and buffer in memory.
- - *
- - * DESCRIPTION:
- - * This function prepares a Rx chained list of descriptors and packet
- - * buffers in a form of a ring. The routine must be called after port
- - * initialization routine and before port start routine.
- - * The Ethernet SDMA engine uses CPU bus addresses to access the various
- - * devices in the system (i.e. DRAM). This function uses the ethernet
- - * struct 'virtual to physical' routine (set by the user) to set the ring
- - * with physical addresses.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port Control srtuct.
- - *
- - * OUTPUT:
- - * The routine updates the Ethernet port control struct with information
- - * regarding the Rx descriptors and buffers.
- - *
- - * RETURN:
- - * None.
- - */
- -static void ether_init_rx_desc_ring(struct mv643xx_private *mp)
- -{
- - volatile struct eth_rx_desc *p_rx_desc;
- - int rx_desc_num = mp->rx_ring_size;
- - int i;
- -
- - /* initialize the next_desc_ptr links in the Rx descriptors ring */
- - p_rx_desc = (struct eth_rx_desc *)mp->p_rx_desc_area;
- - for (i = 0; i < rx_desc_num; i++) {
- - p_rx_desc[i].next_desc_ptr = mp->rx_desc_dma +
- - ((i + 1) % rx_desc_num) * sizeof(struct eth_rx_desc);
- - }
- -
- - /* Save Rx desc pointer to driver struct. */
- - mp->rx_curr_desc_q = 0;
- - mp->rx_used_desc_q = 0;
- -
- - mp->rx_desc_area_size = rx_desc_num * sizeof(struct eth_rx_desc);
- -}
- -
- -/*
- - * ether_init_tx_desc_ring - Curve a Tx chain desc list and buffer in memory.
- - *
- - * DESCRIPTION:
- - * This function prepares a Tx chained list of descriptors and packet
- - * buffers in a form of a ring. The routine must be called after port
- - * initialization routine and before port start routine.
- - * The Ethernet SDMA engine uses CPU bus addresses to access the various
- - * devices in the system (i.e. DRAM). This function uses the ethernet
- - * struct 'virtual to physical' routine (set by the user) to set the ring
- - * with physical addresses.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port Control srtuct.
- - *
- - * OUTPUT:
- - * The routine updates the Ethernet port control struct with information
- - * regarding the Tx descriptors and buffers.
- - *
- - * RETURN:
- - * None.
- - */
- -static void ether_init_tx_desc_ring(struct mv643xx_private *mp)
- -{
- - int tx_desc_num = mp->tx_ring_size;
- - struct eth_tx_desc *p_tx_desc;
- - int i;
- -
- - /* Initialize the next_desc_ptr links in the Tx descriptors ring */
- - p_tx_desc = (struct eth_tx_desc *)mp->p_tx_desc_area;
- - for (i = 0; i < tx_desc_num; i++) {
- - p_tx_desc[i].next_desc_ptr = mp->tx_desc_dma +
- - ((i + 1) % tx_desc_num) * sizeof(struct eth_tx_desc);
- - }
- -
- - mp->tx_curr_desc_q = 0;
- - mp->tx_used_desc_q = 0;
- -
- - mp->tx_desc_area_size = tx_desc_num * sizeof(struct eth_tx_desc);
- -}
- -
- -static int mv643xx_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
- -{
- - struct mv643xx_private *mp = netdev_priv(dev);
- - int err;
- -
- - spin_lock_irq(&mp->lock);
- - err = mii_ethtool_sset(&mp->mii, cmd);
- - spin_unlock_irq(&mp->lock);
- -
- - return err;
- -}
- -
- -static int mv643xx_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
- -{
- - struct mv643xx_private *mp = netdev_priv(dev);
- - int err;
- -
- - spin_lock_irq(&mp->lock);
- - err = mii_ethtool_gset(&mp->mii, cmd);
- - spin_unlock_irq(&mp->lock);
- -
- - /* The PHY may support 1000baseT_Half, but the mv643xx does not */
- - cmd->supported &= ~SUPPORTED_1000baseT_Half;
- - cmd->advertising &= ~ADVERTISED_1000baseT_Half;
- -
- - return err;
- -}
- -
- -/*
- - * mv643xx_eth_open
- - *
- - * This function is called when openning the network device. The function
- - * should initialize all the hardware, initialize cyclic Rx/Tx
- - * descriptors chain and buffers and allocate an IRQ to the network
- - * device.
- - *
- - * Input : a pointer to the network device structure
- - *
- - * Output : zero of success , nonzero if fails.
- - */
- -
- -static int mv643xx_eth_open(struct net_device *dev)
- -{
- - struct mv643xx_private *mp = netdev_priv(dev);
- - unsigned int port_num = mp->port_num;
- - unsigned int size;
- - int err;
- -
- - /* Clear any pending ethernet port interrupts */
- - wrl(mp, INTERRUPT_CAUSE_REG(port_num), 0);
- - wrl(mp, INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
- - /* wait for previous write to complete */
- - rdl(mp, INTERRUPT_CAUSE_EXTEND_REG(port_num));
- -
- - err = request_irq(dev->irq, mv643xx_eth_int_handler,
- - IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev);
- - if (err) {
- - printk(KERN_ERR "%s: Can not assign IRQ\n", dev->name);
- - return -EAGAIN;
- - }
- -
- - eth_port_init(mp);
- -
- - memset(&mp->timeout, 0, sizeof(struct timer_list));
- - mp->timeout.function = mv643xx_eth_rx_refill_descs_timer_wrapper;
- - mp->timeout.data = (unsigned long)dev;
- -
- - /* Allocate RX and TX skb rings */
- - mp->rx_skb = kmalloc(sizeof(*mp->rx_skb) * mp->rx_ring_size,
- - GFP_KERNEL);
- - if (!mp->rx_skb) {
- - printk(KERN_ERR "%s: Cannot allocate Rx skb ring\n", dev->name);
- - err = -ENOMEM;
- - goto out_free_irq;
- - }
- - mp->tx_skb = kmalloc(sizeof(*mp->tx_skb) * mp->tx_ring_size,
- - GFP_KERNEL);
- - if (!mp->tx_skb) {
- - printk(KERN_ERR "%s: Cannot allocate Tx skb ring\n", dev->name);
- - err = -ENOMEM;
- - goto out_free_rx_skb;
- - }
- -
- - /* Allocate TX ring */
- - mp->tx_desc_count = 0;
- - size = mp->tx_ring_size * sizeof(struct eth_tx_desc);
- - mp->tx_desc_area_size = size;
- -
- - if (mp->tx_sram_size) {
- - mp->p_tx_desc_area = ioremap(mp->tx_sram_addr,
- - mp->tx_sram_size);
- - mp->tx_desc_dma = mp->tx_sram_addr;
- - } else
- - mp->p_tx_desc_area = dma_alloc_coherent(NULL, size,
- - &mp->tx_desc_dma,
- - GFP_KERNEL);
- -
- - if (!mp->p_tx_desc_area) {
- - printk(KERN_ERR "%s: Cannot allocate Tx Ring (size %d bytes)\n",
- - dev->name, size);
- - err = -ENOMEM;
- - goto out_free_tx_skb;
- - }
- - BUG_ON((u32) mp->p_tx_desc_area & 0xf); /* check 16-byte alignment */
- - memset((void *)mp->p_tx_desc_area, 0, mp->tx_desc_area_size);
- -
- - ether_init_tx_desc_ring(mp);
- -
- - /* Allocate RX ring */
- - mp->rx_desc_count = 0;
- - size = mp->rx_ring_size * sizeof(struct eth_rx_desc);
- - mp->rx_desc_area_size = size;
- -
- - if (mp->rx_sram_size) {
- - mp->p_rx_desc_area = ioremap(mp->rx_sram_addr,
- - mp->rx_sram_size);
- - mp->rx_desc_dma = mp->rx_sram_addr;
- - } else
- - mp->p_rx_desc_area = dma_alloc_coherent(NULL, size,
- - &mp->rx_desc_dma,
- - GFP_KERNEL);
- -
- - if (!mp->p_rx_desc_area) {
- - printk(KERN_ERR "%s: Cannot allocate Rx ring (size %d bytes)\n",
- - dev->name, size);
- - printk(KERN_ERR "%s: Freeing previously allocated TX queues...",
- - dev->name);
- - if (mp->rx_sram_size)
- - iounmap(mp->p_tx_desc_area);
- - else
- - dma_free_coherent(NULL, mp->tx_desc_area_size,
- - mp->p_tx_desc_area, mp->tx_desc_dma);
- - err = -ENOMEM;
- - goto out_free_tx_skb;
- - }
- - memset((void *)mp->p_rx_desc_area, 0, size);
- -
- - ether_init_rx_desc_ring(mp);
- -
- - mv643xx_eth_rx_refill_descs(dev); /* Fill RX ring with skb's */
- -
- -#ifdef MV643XX_NAPI
- - napi_enable(&mp->napi);
- -#endif
- -
- - eth_port_start(dev);
- -
- - /* Interrupt Coalescing */
- -
- -#ifdef MV643XX_COAL
- - mp->rx_int_coal =
- - eth_port_set_rx_coal(mp, MV643XX_RX_COAL);
- -#endif
- -
- - mp->tx_int_coal =
- - eth_port_set_tx_coal(mp, MV643XX_TX_COAL);
- -
- - /* Unmask phy and link status changes interrupts */
- - wrl(mp, INTERRUPT_EXTEND_MASK_REG(port_num), ETH_INT_UNMASK_ALL_EXT);
- -
- - /* Unmask RX buffer and TX end interrupt */
- - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_UNMASK_ALL);
- -
- - return 0;
- -
- -out_free_tx_skb:
- - kfree(mp->tx_skb);
- -out_free_rx_skb:
- - kfree(mp->rx_skb);
- -out_free_irq:
- - free_irq(dev->irq, dev);
- -
- - return err;
- -}
- -
- -static void mv643xx_eth_free_tx_rings(struct net_device *dev)
- -{
- - struct mv643xx_private *mp = netdev_priv(dev);
- -
- - /* Stop Tx Queues */
- - mv643xx_eth_port_disable_tx(mp);
- -
- - /* Free outstanding skb's on TX ring */
- - mv643xx_eth_free_all_tx_descs(dev);
- -
- - BUG_ON(mp->tx_used_desc_q != mp->tx_curr_desc_q);
- -
- - /* Free TX ring */
- - if (mp->tx_sram_size)
- - iounmap(mp->p_tx_desc_area);
- - else
- - dma_free_coherent(NULL, mp->tx_desc_area_size,
- - mp->p_tx_desc_area, mp->tx_desc_dma);
- -}
- -
- -static void mv643xx_eth_free_rx_rings(struct net_device *dev)
- -{
- - struct mv643xx_private *mp = netdev_priv(dev);
- - int curr;
- -
- - /* Stop RX Queues */
- - mv643xx_eth_port_disable_rx(mp);
- -
- - /* Free preallocated skb's on RX rings */
- - for (curr = 0; mp->rx_desc_count && curr < mp->rx_ring_size; curr++) {
- - if (mp->rx_skb[curr]) {
- - dev_kfree_skb(mp->rx_skb[curr]);
- - mp->rx_desc_count--;
- - }
- - }
- -
- - if (mp->rx_desc_count)
- - printk(KERN_ERR
- - "%s: Error in freeing Rx Ring. %d skb's still"
- - " stuck in RX Ring - ignoring them\n", dev->name,
- - mp->rx_desc_count);
- - /* Free RX ring */
- - if (mp->rx_sram_size)
- - iounmap(mp->p_rx_desc_area);
- - else
- - dma_free_coherent(NULL, mp->rx_desc_area_size,
- - mp->p_rx_desc_area, mp->rx_desc_dma);
- -}
- -
- -/*
- - * mv643xx_eth_stop
- - *
- - * This function is used when closing the network device.
- - * It updates the hardware,
- - * release all memory that holds buffers and descriptors and release the IRQ.
- - * Input : a pointer to the device structure
- - * Output : zero if success , nonzero if fails
- - */
- -
- -static int mv643xx_eth_stop(struct net_device *dev)
- -{
- - struct mv643xx_private *mp = netdev_priv(dev);
- - unsigned int port_num = mp->port_num;
- -
- - /* Mask all interrupts on ethernet port */
- - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_MASK_ALL);
- - /* wait for previous write to complete */
- - rdl(mp, INTERRUPT_MASK_REG(port_num));
- -
- -#ifdef MV643XX_NAPI
- - napi_disable(&mp->napi);
- -#endif
- - netif_carrier_off(dev);
- - netif_stop_queue(dev);
- -
- - eth_port_reset(mp);
- -
- - mv643xx_eth_free_tx_rings(dev);
- - mv643xx_eth_free_rx_rings(dev);
- -
- - free_irq(dev->irq, dev);
- -
- - return 0;
- -}
- -
- -#ifdef MV643XX_NAPI
- -/*
- - * mv643xx_poll
- - *
- - * This function is used in case of NAPI
- - */
- -static int mv643xx_poll(struct napi_struct *napi, int budget)
- -{
- - struct mv643xx_private *mp = container_of(napi, struct mv643xx_private, napi);
- - struct net_device *dev = mp->dev;
- - unsigned int port_num = mp->port_num;
- - int work_done;
- -
- -#ifdef MV643XX_TX_FAST_REFILL
- - if (++mp->tx_clean_threshold > 5) {
- - mv643xx_eth_free_completed_tx_descs(dev);
- - mp->tx_clean_threshold = 0;
- - }
- -#endif
- -
- - work_done = 0;
- - if ((rdl(mp, RX_CURRENT_QUEUE_DESC_PTR_0(port_num)))
- - != (u32) mp->rx_used_desc_q)
- - work_done = mv643xx_eth_receive_queue(dev, budget);
- -
- - if (work_done < budget) {
- - netif_rx_complete(dev, napi);
- - wrl(mp, INTERRUPT_CAUSE_REG(port_num), 0);
- - wrl(mp, INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
- - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_UNMASK_ALL);
- - }
- -
- - return work_done;
- -}
- -#endif
- -
- -/**
- - * has_tiny_unaligned_frags - check if skb has any small, unaligned fragments
- - *
- - * Hardware can't handle unaligned fragments smaller than 9 bytes.
- - * This helper function detects that case.
- - */
- -
- -static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb)
- -{
- - unsigned int frag;
- - skb_frag_t *fragp;
- -
- - for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
- - fragp = &skb_shinfo(skb)->frags[frag];
- - if (fragp->size <= 8 && fragp->page_offset & 0x7)
- - return 1;
- - }
- - return 0;
- -}
- -
- -/**
- - * eth_alloc_tx_desc_index - return the index of the next available tx desc
- - */
- -static int eth_alloc_tx_desc_index(struct mv643xx_private *mp)
- -{
- - int tx_desc_curr;
- -
- - BUG_ON(mp->tx_desc_count >= mp->tx_ring_size);
- -
- - tx_desc_curr = mp->tx_curr_desc_q;
- - mp->tx_curr_desc_q = (tx_desc_curr + 1) % mp->tx_ring_size;
- -
- - BUG_ON(mp->tx_curr_desc_q == mp->tx_used_desc_q);
- + BUG_ON(txq->tx_curr_desc == txq->tx_used_desc);
-
- return tx_desc_curr;
- }
-
- -/**
- - * eth_tx_fill_frag_descs - fill tx hw descriptors for an skb's fragments.
- - *
- - * Ensure the data for each fragment to be transmitted is mapped properly,
- - * then fill in descriptors in the tx hw queue.
- - */
- -static void eth_tx_fill_frag_descs(struct mv643xx_private *mp,
- - struct sk_buff *skb)
- +static void txq_submit_frag_skb(struct tx_queue *txq, struct sk_buff *skb)
- {
- + int nr_frags = skb_shinfo(skb)->nr_frags;
- int frag;
- - int tx_index;
- - struct eth_tx_desc *desc;
- -
- - for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
- - skb_frag_t *this_frag = &skb_shinfo(skb)->frags[frag];
-
- - tx_index = eth_alloc_tx_desc_index(mp);
- - desc = &mp->p_tx_desc_area[tx_index];
- + for (frag = 0; frag < nr_frags; frag++) {
- + skb_frag_t *this_frag;
- + int tx_index;
- + struct tx_desc *desc;
- +
- + this_frag = &skb_shinfo(skb)->frags[frag];
- + tx_index = txq_alloc_desc_index(txq);
- + desc = &txq->tx_desc_area[tx_index];
-
- - desc->cmd_sts = ETH_BUFFER_OWNED_BY_DMA;
- - /* Last Frag enables interrupt and frees the skb */
- - if (frag == (skb_shinfo(skb)->nr_frags - 1)) {
- - desc->cmd_sts |= ETH_ZERO_PADDING |
- - ETH_TX_LAST_DESC |
- - ETH_TX_ENABLE_INTERRUPT;
- - mp->tx_skb[tx_index] = skb;
- - } else
- - mp->tx_skb[tx_index] = NULL;
- + /*
- + * The last fragment will generate an interrupt
- + * which will free the skb on TX completion.
- + */
- + if (frag == nr_frags - 1) {
- + desc->cmd_sts = BUFFER_OWNED_BY_DMA |
- + ZERO_PADDING | TX_LAST_DESC |
- + TX_ENABLE_INTERRUPT;
- + txq->tx_skb[tx_index] = skb;
- + } else {
- + desc->cmd_sts = BUFFER_OWNED_BY_DMA;
- + txq->tx_skb[tx_index] = NULL;
- + }
-
- - desc = &mp->p_tx_desc_area[tx_index];
- desc->l4i_chk = 0;
- desc->byte_cnt = this_frag->size;
- desc->buf_ptr = dma_map_page(NULL, this_frag->page,
- @@ -1651,37 +704,28 @@
- return (__force __be16)sum;
- }
-
- -/**
- - * eth_tx_submit_descs_for_skb - submit data from an skb to the tx hw
- - *
- - * Ensure the data for an skb to be transmitted is mapped properly,
- - * then fill in descriptors in the tx hw queue and start the hardware.
- - */
- -static void eth_tx_submit_descs_for_skb(struct mv643xx_private *mp,
- - struct sk_buff *skb)
- +static void txq_submit_skb(struct tx_queue *txq, struct sk_buff *skb)
- {
- + int nr_frags = skb_shinfo(skb)->nr_frags;
- int tx_index;
- - struct eth_tx_desc *desc;
- + struct tx_desc *desc;
- u32 cmd_sts;
- int length;
- - int nr_frags = skb_shinfo(skb)->nr_frags;
-
- - cmd_sts = ETH_TX_FIRST_DESC | ETH_GEN_CRC | ETH_BUFFER_OWNED_BY_DMA;
- + cmd_sts = TX_FIRST_DESC | GEN_CRC | BUFFER_OWNED_BY_DMA;
-
- - tx_index = eth_alloc_tx_desc_index(mp);
- - desc = &mp->p_tx_desc_area[tx_index];
- + tx_index = txq_alloc_desc_index(txq);
- + desc = &txq->tx_desc_area[tx_index];
-
- if (nr_frags) {
- - eth_tx_fill_frag_descs(mp, skb);
- + txq_submit_frag_skb(txq, skb);
-
- length = skb_headlen(skb);
- - mp->tx_skb[tx_index] = NULL;
- + txq->tx_skb[tx_index] = NULL;
- } else {
- - cmd_sts |= ETH_ZERO_PADDING |
- - ETH_TX_LAST_DESC |
- - ETH_TX_ENABLE_INTERRUPT;
- + cmd_sts |= ZERO_PADDING | TX_LAST_DESC | TX_ENABLE_INTERRUPT;
- length = skb->len;
- - mp->tx_skb[tx_index] = skb;
- + txq->tx_skb[tx_index] = skb;
- }
-
- desc->byte_cnt = length;
- @@ -1690,13 +734,13 @@
- if (skb->ip_summed == CHECKSUM_PARTIAL) {
- BUG_ON(skb->protocol != htons(ETH_P_IP));
-
- - cmd_sts |= ETH_GEN_TCP_UDP_CHECKSUM |
- - ETH_GEN_IP_V_4_CHECKSUM |
- - ip_hdr(skb)->ihl << ETH_TX_IHL_SHIFT;
- + cmd_sts |= GEN_TCP_UDP_CHECKSUM |
- + GEN_IP_V4_CHECKSUM |
- + ip_hdr(skb)->ihl << TX_IHL_SHIFT;
-
- switch (ip_hdr(skb)->protocol) {
- case IPPROTO_UDP:
- - cmd_sts |= ETH_UDP_FRAME;
- + cmd_sts |= UDP_FRAME;
- desc->l4i_chk = ntohs(sum16_as_be(udp_hdr(skb)->check));
- break;
- case IPPROTO_TCP:
- @@ -1707,7 +751,7 @@
- }
- } else {
- /* Errata BTS #50, IHL must be 5 if no HW checksum */
- - cmd_sts |= 5 << ETH_TX_IHL_SHIFT;
- + cmd_sts |= 5 << TX_IHL_SHIFT;
- desc->l4i_chk = 0;
- }
-
- @@ -1717,1649 +761,1818 @@
-
- /* ensure all descriptors are written before poking hardware */
- wmb();
- - mv643xx_eth_port_enable_tx(mp, ETH_TX_QUEUES_ENABLED);
- + txq_enable(txq);
-
- - mp->tx_desc_count += nr_frags + 1;
- + txq->tx_desc_count += nr_frags + 1;
- }
-
- -/**
- - * mv643xx_eth_start_xmit - queue an skb to the hardware for transmission
- - *
- - */
- -static int mv643xx_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
- +static int mv643xx_eth_xmit(struct sk_buff *skb, struct net_device *dev)
- {
- - struct mv643xx_private *mp = netdev_priv(dev);
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
- struct net_device_stats *stats = &dev->stats;
- + struct tx_queue *txq;
- unsigned long flags;
-
- - BUG_ON(netif_queue_stopped(dev));
- -
- if (has_tiny_unaligned_frags(skb) && __skb_linearize(skb)) {
- stats->tx_dropped++;
- - printk(KERN_DEBUG "%s: failed to linearize tiny "
- - "unaligned fragment\n", dev->name);
- + dev_printk(KERN_DEBUG, &dev->dev,
- + "failed to linearize skb with tiny "
- + "unaligned fragment\n");
- return NETDEV_TX_BUSY;
- }
-
- spin_lock_irqsave(&mp->lock, flags);
-
- - if (mp->tx_ring_size - mp->tx_desc_count < MAX_DESCS_PER_SKB) {
- - printk(KERN_ERR "%s: transmit with queue full\n", dev->name);
- - netif_stop_queue(dev);
- + txq = mp->txq + mp->txq_primary;
- +
- + if (txq->tx_ring_size - txq->tx_desc_count < MAX_DESCS_PER_SKB) {
- spin_unlock_irqrestore(&mp->lock, flags);
- - return NETDEV_TX_BUSY;
- + if (txq->index == mp->txq_primary && net_ratelimit())
- + dev_printk(KERN_ERR, &dev->dev,
- + "primary tx queue full?!\n");
- + kfree_skb(skb);
- + return NETDEV_TX_OK;
- }
-
- - eth_tx_submit_descs_for_skb(mp, skb);
- + txq_submit_skb(txq, skb);
- stats->tx_bytes += skb->len;
- stats->tx_packets++;
- dev->trans_start = jiffies;
-
- - if (mp->tx_ring_size - mp->tx_desc_count < MAX_DESCS_PER_SKB)
- - netif_stop_queue(dev);
- + if (txq->index == mp->txq_primary) {
- + int entries_left;
- +
- + entries_left = txq->tx_ring_size - txq->tx_desc_count;
- + if (entries_left < MAX_DESCS_PER_SKB)
- + netif_stop_queue(dev);
- + }
-
- spin_unlock_irqrestore(&mp->lock, flags);
-
- return NETDEV_TX_OK;
- }
-
- -#ifdef CONFIG_NET_POLL_CONTROLLER
- -static void mv643xx_netpoll(struct net_device *netdev)
- +
- +/* tx rate control **********************************************************/
- +/*
- + * Set total maximum TX rate (shared by all TX queues for this port)
- + * to 'rate' bits per second, with a maximum burst of 'burst' bytes.
- + */
- +static void tx_set_rate(struct mv643xx_eth_private *mp, int rate, int burst)
- {
- - struct mv643xx_private *mp = netdev_priv(netdev);
- - int port_num = mp->port_num;
- + int token_rate;
- + int mtu;
- + int bucket_size;
- +
- + token_rate = ((rate / 1000) * 64) / (mp->shared->t_clk / 1000);
- + if (token_rate > 1023)
- + token_rate = 1023;
-
- - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_MASK_ALL);
- - /* wait for previous write to complete */
- - rdl(mp, INTERRUPT_MASK_REG(port_num));
- + mtu = (mp->dev->mtu + 255) >> 8;
- + if (mtu > 63)
- + mtu = 63;
-
- - mv643xx_eth_int_handler(netdev->irq, netdev);
- + bucket_size = (burst + 255) >> 8;
- + if (bucket_size > 65535)
- + bucket_size = 65535;
-
- - wrl(mp, INTERRUPT_MASK_REG(port_num), ETH_INT_UNMASK_ALL);
- + if (mp->shared->tx_bw_control_moved) {
- + wrl(mp, TX_BW_RATE_MOVED(mp->port_num), token_rate);
- + wrl(mp, TX_BW_MTU_MOVED(mp->port_num), mtu);
- + wrl(mp, TX_BW_BURST_MOVED(mp->port_num), bucket_size);
- + } else {
- + wrl(mp, TX_BW_RATE(mp->port_num), token_rate);
- + wrl(mp, TX_BW_MTU(mp->port_num), mtu);
- + wrl(mp, TX_BW_BURST(mp->port_num), bucket_size);
- + }
- }
- -#endif
-
- -static void mv643xx_init_ethtool_cmd(struct net_device *dev, int phy_address,
- - int speed, int duplex,
- - struct ethtool_cmd *cmd)
- +static void txq_set_rate(struct tx_queue *txq, int rate, int burst)
- {
- - struct mv643xx_private *mp = netdev_priv(dev);
- + struct mv643xx_eth_private *mp = txq_to_mp(txq);
- + int token_rate;
- + int bucket_size;
-
- - memset(cmd, 0, sizeof(*cmd));
- + token_rate = ((rate / 1000) * 64) / (mp->shared->t_clk / 1000);
- + if (token_rate > 1023)
- + token_rate = 1023;
-
- - cmd->port = PORT_MII;
- - cmd->transceiver = XCVR_INTERNAL;
- - cmd->phy_address = phy_address;
- + bucket_size = (burst + 255) >> 8;
- + if (bucket_size > 65535)
- + bucket_size = 65535;
-
- - if (speed == 0) {
- - cmd->autoneg = AUTONEG_ENABLE;
- - /* mii lib checks, but doesn't use speed on AUTONEG_ENABLE */
- - cmd->speed = SPEED_100;
- - cmd->advertising = ADVERTISED_10baseT_Half |
- - ADVERTISED_10baseT_Full |
- - ADVERTISED_100baseT_Half |
- - ADVERTISED_100baseT_Full;
- - if (mp->mii.supports_gmii)
- - cmd->advertising |= ADVERTISED_1000baseT_Full;
- - } else {
- - cmd->autoneg = AUTONEG_DISABLE;
- - cmd->speed = speed;
- - cmd->duplex = duplex;
- - }
- + wrl(mp, TXQ_BW_TOKENS(mp->port_num, txq->index), token_rate << 14);
- + wrl(mp, TXQ_BW_CONF(mp->port_num, txq->index),
- + (bucket_size << 10) | token_rate);
- }
-
- -/*/
- - * mv643xx_eth_probe
- - *
- - * First function called after registering the network device.
- - * It's purpose is to initialize the device as an ethernet device,
- - * fill the ethernet device structure with pointers * to functions,
- - * and set the MAC address of the interface
- - *
- - * Input : struct device *
- - * Output : -ENOMEM if failed , 0 if success
- - */
- -static int mv643xx_eth_probe(struct platform_device *pdev)
- +static void txq_set_fixed_prio_mode(struct tx_queue *txq)
- {
- - struct mv643xx_eth_platform_data *pd;
- - int port_num;
- - struct mv643xx_private *mp;
- - struct net_device *dev;
- - u8 *p;
- - struct resource *res;
- - int err;
- - struct ethtool_cmd cmd;
- - int duplex = DUPLEX_HALF;
- - int speed = 0; /* default to auto-negotiation */
- - DECLARE_MAC_BUF(mac);
- + struct mv643xx_eth_private *mp = txq_to_mp(txq);
- + int off;
- + u32 val;
-
- - pd = pdev->dev.platform_data;
- - if (pd == NULL) {
- - printk(KERN_ERR "No mv643xx_eth_platform_data\n");
- - return -ENODEV;
- - }
- + /*
- + * Turn on fixed priority mode.
- + */
- + if (mp->shared->tx_bw_control_moved)
- + off = TXQ_FIX_PRIO_CONF_MOVED(mp->port_num);
- + else
- + off = TXQ_FIX_PRIO_CONF(mp->port_num);
-
- - if (pd->shared == NULL) {
- - printk(KERN_ERR "No mv643xx_eth_platform_data->shared\n");
- - return -ENODEV;
- - }
- + val = rdl(mp, off);
- + val |= 1 << txq->index;
- + wrl(mp, off, val);
- +}
-
- - dev = alloc_etherdev(sizeof(struct mv643xx_private));
- - if (!dev)
- - return -ENOMEM;
- +static void txq_set_wrr(struct tx_queue *txq, int weight)
- +{
- + struct mv643xx_eth_private *mp = txq_to_mp(txq);
- + int off;
- + u32 val;
-
- - platform_set_drvdata(pdev, dev);
- + /*
- + * Turn off fixed priority mode.
- + */
- + if (mp->shared->tx_bw_control_moved)
- + off = TXQ_FIX_PRIO_CONF_MOVED(mp->port_num);
- + else
- + off = TXQ_FIX_PRIO_CONF(mp->port_num);
-
- - mp = netdev_priv(dev);
- - mp->dev = dev;
- -#ifdef MV643XX_NAPI
- - netif_napi_add(dev, &mp->napi, mv643xx_poll, 64);
- -#endif
- + val = rdl(mp, off);
- + val &= ~(1 << txq->index);
- + wrl(mp, off, val);
-
- - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- - BUG_ON(!res);
- - dev->irq = res->start;
- + /*
- + * Configure WRR weight for this queue.
- + */
- + off = TXQ_BW_WRR_CONF(mp->port_num, txq->index);
-
- - dev->open = mv643xx_eth_open;
- - dev->stop = mv643xx_eth_stop;
- - dev->hard_start_xmit = mv643xx_eth_start_xmit;
- - dev->set_mac_address = mv643xx_eth_set_mac_address;
- - dev->set_multicast_list = mv643xx_eth_set_rx_mode;
- + val = rdl(mp, off);
- + val = (val & ~0xff) | (weight & 0xff);
- + wrl(mp, off, val);
- +}
-
- - /* No need to Tx Timeout */
- - dev->tx_timeout = mv643xx_eth_tx_timeout;
-
- -#ifdef CONFIG_NET_POLL_CONTROLLER
- - dev->poll_controller = mv643xx_netpoll;
- -#endif
- +/* mii management interface *************************************************/
- +#define SMI_BUSY 0x10000000
- +#define SMI_READ_VALID 0x08000000
- +#define SMI_OPCODE_READ 0x04000000
- +#define SMI_OPCODE_WRITE 0x00000000
-
- - dev->watchdog_timeo = 2 * HZ;
- - dev->base_addr = 0;
- - dev->change_mtu = mv643xx_eth_change_mtu;
- - dev->do_ioctl = mv643xx_eth_do_ioctl;
- - SET_ETHTOOL_OPS(dev, &mv643xx_ethtool_ops);
- +static void smi_reg_read(struct mv643xx_eth_private *mp, unsigned int addr,
- + unsigned int reg, unsigned int *value)
- +{
- + void __iomem *smi_reg = mp->shared_smi->base + SMI_REG;
- + unsigned long flags;
- + int i;
- +
- + /* the SMI register is a shared resource */
- + spin_lock_irqsave(&mp->shared_smi->phy_lock, flags);
- +
- + /* wait for the SMI register to become available */
- + for (i = 0; readl(smi_reg) & SMI_BUSY; i++) {
- + if (i == 1000) {
- + printk("%s: PHY busy timeout\n", mp->dev->name);
- + goto out;
- + }
- + udelay(10);
- + }
- +
- + writel(SMI_OPCODE_READ | (reg << 21) | (addr << 16), smi_reg);
- +
- + /* now wait for the data to be valid */
- + for (i = 0; !(readl(smi_reg) & SMI_READ_VALID); i++) {
- + if (i == 1000) {
- + printk("%s: PHY read timeout\n", mp->dev->name);
- + goto out;
- + }
- + udelay(10);
- + }
- +
- + *value = readl(smi_reg) & 0xffff;
- +out:
- + spin_unlock_irqrestore(&mp->shared_smi->phy_lock, flags);
- +}
- +
- +static void smi_reg_write(struct mv643xx_eth_private *mp,
- + unsigned int addr,
- + unsigned int reg, unsigned int value)
- +{
- + void __iomem *smi_reg = mp->shared_smi->base + SMI_REG;
- + unsigned long flags;
- + int i;
- +
- + /* the SMI register is a shared resource */
- + spin_lock_irqsave(&mp->shared_smi->phy_lock, flags);
- +
- + /* wait for the SMI register to become available */
- + for (i = 0; readl(smi_reg) & SMI_BUSY; i++) {
- + if (i == 1000) {
- + printk("%s: PHY busy timeout\n", mp->dev->name);
- + goto out;
- + }
- + udelay(10);
- + }
- +
- + writel(SMI_OPCODE_WRITE | (reg << 21) |
- + (addr << 16) | (value & 0xffff), smi_reg);
- +out:
- + spin_unlock_irqrestore(&mp->shared_smi->phy_lock, flags);
- +}
- +
- +
- +/* mib counters *************************************************************/
- +static inline u32 mib_read(struct mv643xx_eth_private *mp, int offset)
- +{
- + return rdl(mp, MIB_COUNTERS(mp->port_num) + offset);
- +}
- +
- +static void mib_counters_clear(struct mv643xx_eth_private *mp)
- +{
- + int i;
- +
- + for (i = 0; i < 0x80; i += 4)
- + mib_read(mp, i);
- +}
- +
- +static void mib_counters_update(struct mv643xx_eth_private *mp)
- +{
- + struct mib_counters *p = &mp->mib_counters;
- +
- + p->good_octets_received += mib_read(mp, 0x00);
- + p->good_octets_received += (u64)mib_read(mp, 0x04) << 32;
- + p->bad_octets_received += mib_read(mp, 0x08);
- + p->internal_mac_transmit_err += mib_read(mp, 0x0c);
- + p->good_frames_received += mib_read(mp, 0x10);
- + p->bad_frames_received += mib_read(mp, 0x14);
- + p->broadcast_frames_received += mib_read(mp, 0x18);
- + p->multicast_frames_received += mib_read(mp, 0x1c);
- + p->frames_64_octets += mib_read(mp, 0x20);
- + p->frames_65_to_127_octets += mib_read(mp, 0x24);
- + p->frames_128_to_255_octets += mib_read(mp, 0x28);
- + p->frames_256_to_511_octets += mib_read(mp, 0x2c);
- + p->frames_512_to_1023_octets += mib_read(mp, 0x30);
- + p->frames_1024_to_max_octets += mib_read(mp, 0x34);
- + p->good_octets_sent += mib_read(mp, 0x38);
- + p->good_octets_sent += (u64)mib_read(mp, 0x3c) << 32;
- + p->good_frames_sent += mib_read(mp, 0x40);
- + p->excessive_collision += mib_read(mp, 0x44);
- + p->multicast_frames_sent += mib_read(mp, 0x48);
- + p->broadcast_frames_sent += mib_read(mp, 0x4c);
- + p->unrec_mac_control_received += mib_read(mp, 0x50);
- + p->fc_sent += mib_read(mp, 0x54);
- + p->good_fc_received += mib_read(mp, 0x58);
- + p->bad_fc_received += mib_read(mp, 0x5c);
- + p->undersize_received += mib_read(mp, 0x60);
- + p->fragments_received += mib_read(mp, 0x64);
- + p->oversize_received += mib_read(mp, 0x68);
- + p->jabber_received += mib_read(mp, 0x6c);
- + p->mac_receive_error += mib_read(mp, 0x70);
- + p->bad_crc_event += mib_read(mp, 0x74);
- + p->collision += mib_read(mp, 0x78);
- + p->late_collision += mib_read(mp, 0x7c);
- +}
- +
- +
- +/* ethtool ******************************************************************/
- +struct mv643xx_eth_stats {
- + char stat_string[ETH_GSTRING_LEN];
- + int sizeof_stat;
- + int netdev_off;
- + int mp_off;
- +};
- +
- +#define SSTAT(m) \
- + { #m, FIELD_SIZEOF(struct net_device_stats, m), \
- + offsetof(struct net_device, stats.m), -1 }
- +
- +#define MIBSTAT(m) \
- + { #m, FIELD_SIZEOF(struct mib_counters, m), \
- + -1, offsetof(struct mv643xx_eth_private, mib_counters.m) }
- +
- +static const struct mv643xx_eth_stats mv643xx_eth_stats[] = {
- + SSTAT(rx_packets),
- + SSTAT(tx_packets),
- + SSTAT(rx_bytes),
- + SSTAT(tx_bytes),
- + SSTAT(rx_errors),
- + SSTAT(tx_errors),
- + SSTAT(rx_dropped),
- + SSTAT(tx_dropped),
- + MIBSTAT(good_octets_received),
- + MIBSTAT(bad_octets_received),
- + MIBSTAT(internal_mac_transmit_err),
- + MIBSTAT(good_frames_received),
- + MIBSTAT(bad_frames_received),
- + MIBSTAT(broadcast_frames_received),
- + MIBSTAT(multicast_frames_received),
- + MIBSTAT(frames_64_octets),
- + MIBSTAT(frames_65_to_127_octets),
- + MIBSTAT(frames_128_to_255_octets),
- + MIBSTAT(frames_256_to_511_octets),
- + MIBSTAT(frames_512_to_1023_octets),
- + MIBSTAT(frames_1024_to_max_octets),
- + MIBSTAT(good_octets_sent),
- + MIBSTAT(good_frames_sent),
- + MIBSTAT(excessive_collision),
- + MIBSTAT(multicast_frames_sent),
- + MIBSTAT(broadcast_frames_sent),
- + MIBSTAT(unrec_mac_control_received),
- + MIBSTAT(fc_sent),
- + MIBSTAT(good_fc_received),
- + MIBSTAT(bad_fc_received),
- + MIBSTAT(undersize_received),
- + MIBSTAT(fragments_received),
- + MIBSTAT(oversize_received),
- + MIBSTAT(jabber_received),
- + MIBSTAT(mac_receive_error),
- + MIBSTAT(bad_crc_event),
- + MIBSTAT(collision),
- + MIBSTAT(late_collision),
- +};
- +
- +static int mv643xx_eth_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
- +{
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
- + int err;
- +
- + spin_lock_irq(&mp->lock);
- + err = mii_ethtool_gset(&mp->mii, cmd);
- + spin_unlock_irq(&mp->lock);
-
- -#ifdef MV643XX_CHECKSUM_OFFLOAD_TX
- -#ifdef MAX_SKB_FRAGS
- /*
- - * Zero copy can only work if we use Discovery II memory. Else, we will
- - * have to map the buffers to ISA memory which is only 16 MB
- + * The MAC does not support 1000baseT_Half.
- */
- - dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
- -#endif
- -#endif
- + cmd->supported &= ~SUPPORTED_1000baseT_Half;
- + cmd->advertising &= ~ADVERTISED_1000baseT_Half;
-
- - /* Configure the timeout task */
- - INIT_WORK(&mp->tx_timeout_task, mv643xx_eth_tx_timeout_task);
- + return err;
- +}
-
- - spin_lock_init(&mp->lock);
- +static int mv643xx_eth_get_settings_phyless(struct net_device *dev, struct ethtool_cmd *cmd)
- +{
- + cmd->supported = SUPPORTED_MII;
- + cmd->advertising = ADVERTISED_MII;
- + cmd->speed = SPEED_1000;
- + cmd->duplex = DUPLEX_FULL;
- + cmd->port = PORT_MII;
- + cmd->phy_address = 0;
- + cmd->transceiver = XCVR_INTERNAL;
- + cmd->autoneg = AUTONEG_DISABLE;
- + cmd->maxtxpkt = 1;
- + cmd->maxrxpkt = 1;
-
- - mp->shared = platform_get_drvdata(pd->shared);
- - port_num = mp->port_num = pd->port_number;
- + return 0;
- +}
-
- - if (mp->shared->win_protect)
- - wrl(mp, WINDOW_PROTECT(port_num), mp->shared->win_protect);
- +static int mv643xx_eth_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
- +{
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
- + int err;
-
- - mp->shared_smi = mp->shared;
- - if (pd->shared_smi != NULL)
- - mp->shared_smi = platform_get_drvdata(pd->shared_smi);
- -
- - /* set default config values */
- - eth_port_uc_addr_get(mp, dev->dev_addr);
- - mp->rx_ring_size = PORT_DEFAULT_RECEIVE_QUEUE_SIZE;
- - mp->tx_ring_size = PORT_DEFAULT_TRANSMIT_QUEUE_SIZE;
- + /*
- + * The MAC does not support 1000baseT_Half.
- + */
- + cmd->advertising &= ~ADVERTISED_1000baseT_Half;
-
- - if (is_valid_ether_addr(pd->mac_addr))
- - memcpy(dev->dev_addr, pd->mac_addr, 6);
- + spin_lock_irq(&mp->lock);
- + err = mii_ethtool_sset(&mp->mii, cmd);
- + spin_unlock_irq(&mp->lock);
-
- - if (pd->phy_addr || pd->force_phy_addr)
- - ethernet_phy_set(mp, pd->phy_addr);
- + return err;
- +}
-
- - if (pd->rx_queue_size)
- - mp->rx_ring_size = pd->rx_queue_size;
- +static int mv643xx_eth_set_settings_phyless(struct net_device *dev, struct ethtool_cmd *cmd)
- +{
- + return -EINVAL;
- +}
-
- - if (pd->tx_queue_size)
- - mp->tx_ring_size = pd->tx_queue_size;
- +static void mv643xx_eth_get_drvinfo(struct net_device *dev,
- + struct ethtool_drvinfo *drvinfo)
- +{
- + strncpy(drvinfo->driver, mv643xx_eth_driver_name, 32);
- + strncpy(drvinfo->version, mv643xx_eth_driver_version, 32);
- + strncpy(drvinfo->fw_version, "N/A", 32);
- + strncpy(drvinfo->bus_info, "platform", 32);
- + drvinfo->n_stats = ARRAY_SIZE(mv643xx_eth_stats);
- +}
- +
- +static int mv643xx_eth_nway_reset(struct net_device *dev)
- +{
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
-
- - if (pd->tx_sram_size) {
- - mp->tx_sram_size = pd->tx_sram_size;
- - mp->tx_sram_addr = pd->tx_sram_addr;
- + return mii_nway_restart(&mp->mii);
- +}
- +
- +static int mv643xx_eth_nway_reset_phyless(struct net_device *dev)
- +{
- + return -EINVAL;
- +}
- +
- +static u32 mv643xx_eth_get_link(struct net_device *dev)
- +{
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
- +
- + return mii_link_ok(&mp->mii);
- +}
- +
- +static u32 mv643xx_eth_get_link_phyless(struct net_device *dev)
- +{
- + return 1;
- +}
- +
- +static void mv643xx_eth_get_strings(struct net_device *dev,
- + uint32_t stringset, uint8_t *data)
- +{
- + int i;
- +
- + if (stringset == ETH_SS_STATS) {
- + for (i = 0; i < ARRAY_SIZE(mv643xx_eth_stats); i++) {
- + memcpy(data + i * ETH_GSTRING_LEN,
- + mv643xx_eth_stats[i].stat_string,
- + ETH_GSTRING_LEN);
- + }
- }
- +}
- +
- +static void mv643xx_eth_get_ethtool_stats(struct net_device *dev,
- + struct ethtool_stats *stats,
- + uint64_t *data)
- +{
- + struct mv643xx_eth_private *mp = dev->priv;
- + int i;
- +
- + mib_counters_update(mp);
- +
- + for (i = 0; i < ARRAY_SIZE(mv643xx_eth_stats); i++) {
- + const struct mv643xx_eth_stats *stat;
- + void *p;
- +
- + stat = mv643xx_eth_stats + i;
- +
- + if (stat->netdev_off >= 0)
- + p = ((void *)mp->dev) + stat->netdev_off;
- + else
- + p = ((void *)mp) + stat->mp_off;
-
- - if (pd->rx_sram_size) {
- - mp->rx_sram_size = pd->rx_sram_size;
- - mp->rx_sram_addr = pd->rx_sram_addr;
- + data[i] = (stat->sizeof_stat == 8) ?
- + *(uint64_t *)p : *(uint32_t *)p;
- }
- +}
-
- - duplex = pd->duplex;
- - speed = pd->speed;
- +static int mv643xx_eth_get_sset_count(struct net_device *dev, int sset)
- +{
- + if (sset == ETH_SS_STATS)
- + return ARRAY_SIZE(mv643xx_eth_stats);
-
- - /* Hook up MII support for ethtool */
- - mp->mii.dev = dev;
- - mp->mii.mdio_read = mv643xx_mdio_read;
- - mp->mii.mdio_write = mv643xx_mdio_write;
- - mp->mii.phy_id = ethernet_phy_get(mp);
- - mp->mii.phy_id_mask = 0x3f;
- - mp->mii.reg_num_mask = 0x1f;
- + return -EOPNOTSUPP;
- +}
-
- - err = ethernet_phy_detect(mp);
- - if (err) {
- - pr_debug("%s: No PHY detected at addr %d\n",
- - dev->name, ethernet_phy_get(mp));
- +static const struct ethtool_ops mv643xx_eth_ethtool_ops = {
- + .get_settings = mv643xx_eth_get_settings,
- + .set_settings = mv643xx_eth_set_settings,
- + .get_drvinfo = mv643xx_eth_get_drvinfo,
- + .nway_reset = mv643xx_eth_nway_reset,
- + .get_link = mv643xx_eth_get_link,
- + .set_sg = ethtool_op_set_sg,
- + .get_strings = mv643xx_eth_get_strings,
- + .get_ethtool_stats = mv643xx_eth_get_ethtool_stats,
- + .get_sset_count = mv643xx_eth_get_sset_count,
- +};
- +
- +static const struct ethtool_ops mv643xx_eth_ethtool_ops_phyless = {
- + .get_settings = mv643xx_eth_get_settings_phyless,
- + .set_settings = mv643xx_eth_set_settings_phyless,
- + .get_drvinfo = mv643xx_eth_get_drvinfo,
- + .nway_reset = mv643xx_eth_nway_reset_phyless,
- + .get_link = mv643xx_eth_get_link_phyless,
- + .set_sg = ethtool_op_set_sg,
- + .get_strings = mv643xx_eth_get_strings,
- + .get_ethtool_stats = mv643xx_eth_get_ethtool_stats,
- + .get_sset_count = mv643xx_eth_get_sset_count,
- +};
- +
- +
- +/* address handling *********************************************************/
- +static void uc_addr_get(struct mv643xx_eth_private *mp, unsigned char *addr)
- +{
- + unsigned int mac_h;
- + unsigned int mac_l;
- +
- + mac_h = rdl(mp, MAC_ADDR_HIGH(mp->port_num));
- + mac_l = rdl(mp, MAC_ADDR_LOW(mp->port_num));
- +
- + addr[0] = (mac_h >> 24) & 0xff;
- + addr[1] = (mac_h >> 16) & 0xff;
- + addr[2] = (mac_h >> 8) & 0xff;
- + addr[3] = mac_h & 0xff;
- + addr[4] = (mac_l >> 8) & 0xff;
- + addr[5] = mac_l & 0xff;
- +}
- +
- +static void init_mac_tables(struct mv643xx_eth_private *mp)
- +{
- + int i;
- +
- + for (i = 0; i < 0x100; i += 4) {
- + wrl(mp, SPECIAL_MCAST_TABLE(mp->port_num) + i, 0);
- + wrl(mp, OTHER_MCAST_TABLE(mp->port_num) + i, 0);
- + }
- +
- + for (i = 0; i < 0x10; i += 4)
- + wrl(mp, UNICAST_TABLE(mp->port_num) + i, 0);
- +}
- +
- +static void set_filter_table_entry(struct mv643xx_eth_private *mp,
- + int table, unsigned char entry)
- +{
- + unsigned int table_reg;
- +
- + /* Set "accepts frame bit" at specified table entry */
- + table_reg = rdl(mp, table + (entry & 0xfc));
- + table_reg |= 0x01 << (8 * (entry & 3));
- + wrl(mp, table + (entry & 0xfc), table_reg);
- +}
- +
- +static void uc_addr_set(struct mv643xx_eth_private *mp, unsigned char *addr)
- +{
- + unsigned int mac_h;
- + unsigned int mac_l;
- + int table;
- +
- + mac_l = (addr[4] << 8) | addr[5];
- + mac_h = (addr[0] << 24) | (addr[1] << 16) | (addr[2] << 8) | addr[3];
- +
- + wrl(mp, MAC_ADDR_LOW(mp->port_num), mac_l);
- + wrl(mp, MAC_ADDR_HIGH(mp->port_num), mac_h);
- +
- + table = UNICAST_TABLE(mp->port_num);
- + set_filter_table_entry(mp, table, addr[5] & 0x0f);
- +}
- +
- +static int mv643xx_eth_set_mac_address(struct net_device *dev, void *addr)
- +{
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
- +
- + /* +2 is for the offset of the HW addr type */
- + memcpy(dev->dev_addr, addr + 2, 6);
- +
- + init_mac_tables(mp);
- + uc_addr_set(mp, dev->dev_addr);
- +
- + return 0;
- +}
- +
- +static int addr_crc(unsigned char *addr)
- +{
- + int crc = 0;
- + int i;
- +
- + for (i = 0; i < 6; i++) {
- + int j;
- +
- + crc = (crc ^ addr[i]) << 8;
- + for (j = 7; j >= 0; j--) {
- + if (crc & (0x100 << j))
- + crc ^= 0x107 << j;
- + }
- + }
- +
- + return crc;
- +}
- +
- +static void mv643xx_eth_set_rx_mode(struct net_device *dev)
- +{
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
- + u32 port_config;
- + struct dev_addr_list *addr;
- + int i;
- +
- + port_config = rdl(mp, PORT_CONFIG(mp->port_num));
- + if (dev->flags & IFF_PROMISC)
- + port_config |= UNICAST_PROMISCUOUS_MODE;
- + else
- + port_config &= ~UNICAST_PROMISCUOUS_MODE;
- + wrl(mp, PORT_CONFIG(mp->port_num), port_config);
- +
- + if (dev->flags & (IFF_PROMISC | IFF_ALLMULTI)) {
- + int port_num = mp->port_num;
- + u32 accept = 0x01010101;
- +
- + for (i = 0; i < 0x100; i += 4) {
- + wrl(mp, SPECIAL_MCAST_TABLE(port_num) + i, accept);
- + wrl(mp, OTHER_MCAST_TABLE(port_num) + i, accept);
- + }
- + return;
- + }
- +
- + for (i = 0; i < 0x100; i += 4) {
- + wrl(mp, SPECIAL_MCAST_TABLE(mp->port_num) + i, 0);
- + wrl(mp, OTHER_MCAST_TABLE(mp->port_num) + i, 0);
- + }
- +
- + for (addr = dev->mc_list; addr != NULL; addr = addr->next) {
- + u8 *a = addr->da_addr;
- + int table;
- +
- + if (addr->da_addrlen != 6)
- + continue;
- +
- + if (memcmp(a, "\x01\x00\x5e\x00\x00", 5) == 0) {
- + table = SPECIAL_MCAST_TABLE(mp->port_num);
- + set_filter_table_entry(mp, table, a[5]);
- + } else {
- + int crc = addr_crc(a);
- +
- + table = OTHER_MCAST_TABLE(mp->port_num);
- + set_filter_table_entry(mp, table, crc);
- + }
- + }
- +}
- +
- +
- +/* rx/tx queue initialisation ***********************************************/
- +static int rxq_init(struct mv643xx_eth_private *mp, int index)
- +{
- + struct rx_queue *rxq = mp->rxq + index;
- + struct rx_desc *rx_desc;
- + int size;
- + int i;
- +
- + rxq->index = index;
- +
- + rxq->rx_ring_size = mp->default_rx_ring_size;
- +
- + rxq->rx_desc_count = 0;
- + rxq->rx_curr_desc = 0;
- + rxq->rx_used_desc = 0;
- +
- + size = rxq->rx_ring_size * sizeof(struct rx_desc);
- +
- + if (index == mp->rxq_primary && size <= mp->rx_desc_sram_size) {
- + rxq->rx_desc_area = ioremap(mp->rx_desc_sram_addr,
- + mp->rx_desc_sram_size);
- + rxq->rx_desc_dma = mp->rx_desc_sram_addr;
- + } else {
- + rxq->rx_desc_area = dma_alloc_coherent(NULL, size,
- + &rxq->rx_desc_dma,
- + GFP_KERNEL);
- + }
- +
- + if (rxq->rx_desc_area == NULL) {
- + dev_printk(KERN_ERR, &mp->dev->dev,
- + "can't allocate rx ring (%d bytes)\n", size);
- goto out;
- }
- + memset(rxq->rx_desc_area, 0, size);
-
- - ethernet_phy_reset(mp);
- - mp->mii.supports_gmii = mii_check_gmii_support(&mp->mii);
- - mv643xx_init_ethtool_cmd(dev, mp->mii.phy_id, speed, duplex, &cmd);
- - mv643xx_eth_update_pscr(dev, &cmd);
- - mv643xx_set_settings(dev, &cmd);
- + rxq->rx_desc_area_size = size;
- + rxq->rx_skb = kmalloc(rxq->rx_ring_size * sizeof(*rxq->rx_skb),
- + GFP_KERNEL);
- + if (rxq->rx_skb == NULL) {
- + dev_printk(KERN_ERR, &mp->dev->dev,
- + "can't allocate rx skb ring\n");
- + goto out_free;
- + }
-
- - SET_NETDEV_DEV(dev, &pdev->dev);
- - err = register_netdev(dev);
- - if (err)
- + rx_desc = (struct rx_desc *)rxq->rx_desc_area;
- + for (i = 0; i < rxq->rx_ring_size; i++) {
- + int nexti = (i + 1) % rxq->rx_ring_size;
- + rx_desc[i].next_desc_ptr = rxq->rx_desc_dma +
- + nexti * sizeof(struct rx_desc);
- + }
- +
- + init_timer(&rxq->rx_oom);
- + rxq->rx_oom.data = (unsigned long)rxq;
- + rxq->rx_oom.function = rxq_refill_timer_wrapper;
- +
- + return 0;
- +
- +
- +out_free:
- + if (index == mp->rxq_primary && size <= mp->rx_desc_sram_size)
- + iounmap(rxq->rx_desc_area);
- + else
- + dma_free_coherent(NULL, size,
- + rxq->rx_desc_area,
- + rxq->rx_desc_dma);
- +
- +out:
- + return -ENOMEM;
- +}
- +
- +static void rxq_deinit(struct rx_queue *rxq)
- +{
- + struct mv643xx_eth_private *mp = rxq_to_mp(rxq);
- + int i;
- +
- + rxq_disable(rxq);
- +
- + del_timer_sync(&rxq->rx_oom);
- +
- + for (i = 0; i < rxq->rx_ring_size; i++) {
- + if (rxq->rx_skb[i]) {
- + dev_kfree_skb(rxq->rx_skb[i]);
- + rxq->rx_desc_count--;
- + }
- + }
- +
- + if (rxq->rx_desc_count) {
- + dev_printk(KERN_ERR, &mp->dev->dev,
- + "error freeing rx ring -- %d skbs stuck\n",
- + rxq->rx_desc_count);
- + }
- +
- + if (rxq->index == mp->rxq_primary &&
- + rxq->rx_desc_area_size <= mp->rx_desc_sram_size)
- + iounmap(rxq->rx_desc_area);
- + else
- + dma_free_coherent(NULL, rxq->rx_desc_area_size,
- + rxq->rx_desc_area, rxq->rx_desc_dma);
- +
- + kfree(rxq->rx_skb);
- +}
- +
- +static int txq_init(struct mv643xx_eth_private *mp, int index)
- +{
- + struct tx_queue *txq = mp->txq + index;
- + struct tx_desc *tx_desc;
- + int size;
- + int i;
- +
- + txq->index = index;
- +
- + txq->tx_ring_size = mp->default_tx_ring_size;
- +
- + txq->tx_desc_count = 0;
- + txq->tx_curr_desc = 0;
- + txq->tx_used_desc = 0;
- +
- + size = txq->tx_ring_size * sizeof(struct tx_desc);
- +
- + if (index == mp->txq_primary && size <= mp->tx_desc_sram_size) {
- + txq->tx_desc_area = ioremap(mp->tx_desc_sram_addr,
- + mp->tx_desc_sram_size);
- + txq->tx_desc_dma = mp->tx_desc_sram_addr;
- + } else {
- + txq->tx_desc_area = dma_alloc_coherent(NULL, size,
- + &txq->tx_desc_dma,
- + GFP_KERNEL);
- + }
- +
- + if (txq->tx_desc_area == NULL) {
- + dev_printk(KERN_ERR, &mp->dev->dev,
- + "can't allocate tx ring (%d bytes)\n", size);
- goto out;
- + }
- + memset(txq->tx_desc_area, 0, size);
-
- - p = dev->dev_addr;
- - printk(KERN_NOTICE
- - "%s: port %d with MAC address %s\n",
- - dev->name, port_num, print_mac(mac, p));
- + txq->tx_desc_area_size = size;
- + txq->tx_skb = kmalloc(txq->tx_ring_size * sizeof(*txq->tx_skb),
- + GFP_KERNEL);
- + if (txq->tx_skb == NULL) {
- + dev_printk(KERN_ERR, &mp->dev->dev,
- + "can't allocate tx skb ring\n");
- + goto out_free;
- + }
-
- - if (dev->features & NETIF_F_SG)
- - printk(KERN_NOTICE "%s: Scatter Gather Enabled\n", dev->name);
- + tx_desc = (struct tx_desc *)txq->tx_desc_area;
- + for (i = 0; i < txq->tx_ring_size; i++) {
- + int nexti = (i + 1) % txq->tx_ring_size;
- + tx_desc[i].next_desc_ptr = txq->tx_desc_dma +
- + nexti * sizeof(struct tx_desc);
- + }
-
- - if (dev->features & NETIF_F_IP_CSUM)
- - printk(KERN_NOTICE "%s: TX TCP/IP Checksumming Supported\n",
- - dev->name);
- + return 0;
- +
- +
- +out_free:
- + if (index == mp->txq_primary && size <= mp->tx_desc_sram_size)
- + iounmap(txq->tx_desc_area);
- + else
- + dma_free_coherent(NULL, size,
- + txq->tx_desc_area,
- + txq->tx_desc_dma);
- +
- +out:
- + return -ENOMEM;
- +}
- +
- +static void txq_reclaim(struct tx_queue *txq, int force)
- +{
- + struct mv643xx_eth_private *mp = txq_to_mp(txq);
- + unsigned long flags;
- +
- + spin_lock_irqsave(&mp->lock, flags);
- + while (txq->tx_desc_count > 0) {
- + int tx_index;
- + struct tx_desc *desc;
- + u32 cmd_sts;
- + struct sk_buff *skb;
- + dma_addr_t addr;
- + int count;
- +
- + tx_index = txq->tx_used_desc;
- + desc = &txq->tx_desc_area[tx_index];
- + cmd_sts = desc->cmd_sts;
- +
- + if (!force && (cmd_sts & BUFFER_OWNED_BY_DMA))
- + break;
- +
- + txq->tx_used_desc = (tx_index + 1) % txq->tx_ring_size;
- + txq->tx_desc_count--;
- +
- + addr = desc->buf_ptr;
- + count = desc->byte_cnt;
- + skb = txq->tx_skb[tx_index];
- + txq->tx_skb[tx_index] = NULL;
- +
- + if (cmd_sts & ERROR_SUMMARY) {
- + dev_printk(KERN_INFO, &mp->dev->dev, "tx error\n");
- + mp->dev->stats.tx_errors++;
- + }
- +
- + /*
- + * Drop mp->lock while we free the skb.
- + */
- + spin_unlock_irqrestore(&mp->lock, flags);
-
- -#ifdef MV643XX_CHECKSUM_OFFLOAD_TX
- - printk(KERN_NOTICE "%s: RX TCP/UDP Checksum Offload ON \n", dev->name);
- + if (cmd_sts & TX_FIRST_DESC)
- + dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE);
- + else
- + dma_unmap_page(NULL, addr, count, DMA_TO_DEVICE);
- +
- + if (skb)
- + dev_kfree_skb_irq(skb);
- +
- + spin_lock_irqsave(&mp->lock, flags);
- + }
- + spin_unlock_irqrestore(&mp->lock, flags);
- +}
- +
- +static void txq_deinit(struct tx_queue *txq)
- +{
- + struct mv643xx_eth_private *mp = txq_to_mp(txq);
- +
- + txq_disable(txq);
- + txq_reclaim(txq, 1);
- +
- + BUG_ON(txq->tx_used_desc != txq->tx_curr_desc);
- +
- + if (txq->index == mp->txq_primary &&
- + txq->tx_desc_area_size <= mp->tx_desc_sram_size)
- + iounmap(txq->tx_desc_area);
- + else
- + dma_free_coherent(NULL, txq->tx_desc_area_size,
- + txq->tx_desc_area, txq->tx_desc_dma);
- +
- + kfree(txq->tx_skb);
- +}
- +
- +
- +/* netdev ops and related ***************************************************/
- +static void update_pscr(struct mv643xx_eth_private *mp, int speed, int duplex)
- +{
- + u32 pscr_o;
- + u32 pscr_n;
- +
- + pscr_o = rdl(mp, PORT_SERIAL_CONTROL(mp->port_num));
- +
- + /* clear speed, duplex and rx buffer size fields */
- + pscr_n = pscr_o & ~(SET_MII_SPEED_TO_100 |
- + SET_GMII_SPEED_TO_1000 |
- + SET_FULL_DUPLEX_MODE |
- + MAX_RX_PACKET_MASK);
- +
- + if (speed == SPEED_1000) {
- + pscr_n |= SET_GMII_SPEED_TO_1000 | MAX_RX_PACKET_9700BYTE;
- + } else {
- + if (speed == SPEED_100)
- + pscr_n |= SET_MII_SPEED_TO_100;
- + pscr_n |= MAX_RX_PACKET_1522BYTE;
- + }
- +
- + if (duplex == DUPLEX_FULL)
- + pscr_n |= SET_FULL_DUPLEX_MODE;
- +
- + if (pscr_n != pscr_o) {
- + if ((pscr_o & SERIAL_PORT_ENABLE) == 0)
- + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr_n);
- + else {
- + int i;
- +
- + for (i = 0; i < 8; i++)
- + if (mp->txq_mask & (1 << i))
- + txq_disable(mp->txq + i);
- +
- + pscr_o &= ~SERIAL_PORT_ENABLE;
- + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr_o);
- + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr_n);
- + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr_n);
- +
- + for (i = 0; i < 8; i++)
- + if (mp->txq_mask & (1 << i))
- + txq_enable(mp->txq + i);
- + }
- + }
- +}
- +
- +static irqreturn_t mv643xx_eth_irq(int irq, void *dev_id)
- +{
- + struct net_device *dev = (struct net_device *)dev_id;
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
- + u32 int_cause;
- + u32 int_cause_ext;
- + u32 txq_active;
- +
- + int_cause = rdl(mp, INT_CAUSE(mp->port_num)) &
- + (INT_TX_END | INT_RX | INT_EXT);
- + if (int_cause == 0)
- + return IRQ_NONE;
- +
- + int_cause_ext = 0;
- + if (int_cause & INT_EXT) {
- + int_cause_ext = rdl(mp, INT_CAUSE_EXT(mp->port_num))
- + & (INT_EXT_LINK | INT_EXT_PHY | INT_EXT_TX);
- + wrl(mp, INT_CAUSE_EXT(mp->port_num), ~int_cause_ext);
- + }
- +
- + if (int_cause_ext & (INT_EXT_PHY | INT_EXT_LINK)) {
- + if (mp->phy_addr == -1 || mii_link_ok(&mp->mii)) {
- + int i;
- +
- + if (mp->phy_addr != -1) {
- + struct ethtool_cmd cmd;
- +
- + mii_ethtool_gset(&mp->mii, &cmd);
- + update_pscr(mp, cmd.speed, cmd.duplex);
- + }
- +
- + for (i = 0; i < 8; i++)
- + if (mp->txq_mask & (1 << i))
- + txq_enable(mp->txq + i);
- +
- + if (!netif_carrier_ok(dev)) {
- + netif_carrier_on(dev);
- + __txq_maybe_wake(mp->txq + mp->txq_primary);
- + }
- + } else if (netif_carrier_ok(dev)) {
- + netif_stop_queue(dev);
- + netif_carrier_off(dev);
- + }
- + }
- +
- + /*
- + * RxBuffer or RxError set for any of the 8 queues?
- + */
- +#ifdef MV643XX_ETH_NAPI
- + if (int_cause & INT_RX) {
- + wrl(mp, INT_MASK(mp->port_num), 0x00000000);
- + rdl(mp, INT_MASK(mp->port_num));
- +
- + netif_rx_schedule(dev, &mp->napi);
- + }
- +#else
- + if (int_cause & INT_RX) {
- + int i;
- +
- + for (i = 7; i >= 0; i--)
- + if (mp->rxq_mask & (1 << i))
- + rxq_process(mp->rxq + i, INT_MAX);
- + }
- #endif
-
- -#ifdef MV643XX_COAL
- - printk(KERN_NOTICE "%s: TX and RX Interrupt Coalescing ON \n",
- - dev->name);
- -#endif
- + txq_active = rdl(mp, TXQ_COMMAND(mp->port_num));
- +
- + /*
- + * TxBuffer or TxError set for any of the 8 queues?
- + */
- + if (int_cause_ext & INT_EXT_TX) {
- + int i;
- +
- + for (i = 0; i < 8; i++)
- + if (mp->txq_mask & (1 << i))
- + txq_reclaim(mp->txq + i, 0);
- + }
- +
- + /*
- + * Any TxEnd interrupts?
- + */
- + if (int_cause & INT_TX_END) {
- + int i;
- +
- + wrl(mp, INT_CAUSE(mp->port_num), ~(int_cause & INT_TX_END));
- + for (i = 0; i < 8; i++) {
- + struct tx_queue *txq = mp->txq + i;
- + if (txq->tx_desc_count && !((txq_active >> i) & 1))
- + txq_enable(txq);
- + }
- + }
- +
- + /*
- + * Enough space again in the primary TX queue for a full packet?
- + */
- + if (int_cause_ext & INT_EXT_TX) {
- + struct tx_queue *txq = mp->txq + mp->txq_primary;
- + __txq_maybe_wake(txq);
- + }
- +
- + return IRQ_HANDLED;
- +}
- +
- +static void phy_reset(struct mv643xx_eth_private *mp)
- +{
- + unsigned int data;
- +
- + smi_reg_read(mp, mp->phy_addr, 0, &data);
- + data |= 0x8000;
- + smi_reg_write(mp, mp->phy_addr, 0, data);
- +
- + do {
- + udelay(1);
- + smi_reg_read(mp, mp->phy_addr, 0, &data);
- + } while (data & 0x8000);
- +}
- +
- +static void port_start(struct mv643xx_eth_private *mp)
- +{
- + u32 pscr;
- + int i;
- +
- + /*
- + * Configure basic link parameters.
- + */
- + pscr = rdl(mp, PORT_SERIAL_CONTROL(mp->port_num));
- + pscr &= ~(SERIAL_PORT_ENABLE | FORCE_LINK_PASS);
- + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr);
- + pscr |= DISABLE_AUTO_NEG_FOR_FLOW_CTRL |
- + DISABLE_AUTO_NEG_SPEED_GMII |
- + DISABLE_AUTO_NEG_FOR_DUPLEX |
- + DO_NOT_FORCE_LINK_FAIL |
- + SERIAL_PORT_CONTROL_RESERVED;
- + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr);
- + pscr |= SERIAL_PORT_ENABLE;
- + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), pscr);
- +
- + wrl(mp, SDMA_CONFIG(mp->port_num), PORT_SDMA_CONFIG_DEFAULT_VALUE);
- +
- + /*
- + * Perform PHY reset, if there is a PHY.
- + */
- + if (mp->phy_addr != -1) {
- + struct ethtool_cmd cmd;
- +
- + mv643xx_eth_get_settings(mp->dev, &cmd);
- + phy_reset(mp);
- + mv643xx_eth_set_settings(mp->dev, &cmd);
- + }
- +
- + /*
- + * Configure TX path and queues.
- + */
- + tx_set_rate(mp, 1000000000, 16777216);
- + for (i = 0; i < 8; i++) {
- + struct tx_queue *txq = mp->txq + i;
- + int off = TXQ_CURRENT_DESC_PTR(mp->port_num, i);
- + u32 addr;
- +
- + if ((mp->txq_mask & (1 << i)) == 0)
- + continue;
- +
- + addr = (u32)txq->tx_desc_dma;
- + addr += txq->tx_curr_desc * sizeof(struct tx_desc);
- + wrl(mp, off, addr);
- +
- + txq_set_rate(txq, 1000000000, 16777216);
- + txq_set_fixed_prio_mode(txq);
- + }
- +
- + /*
- + * Add configured unicast address to address filter table.
- + */
- + uc_addr_set(mp, mp->dev->dev_addr);
- +
- + /*
- + * Receive all unmatched unicast, TCP, UDP, BPDU and broadcast
- + * frames to RX queue #0.
- + */
- + wrl(mp, PORT_CONFIG(mp->port_num), 0x00000000);
-
- -#ifdef MV643XX_NAPI
- - printk(KERN_NOTICE "%s: RX NAPI Enabled \n", dev->name);
- -#endif
- + /*
- + * Treat BPDUs as normal multicasts, and disable partition mode.
- + */
- + wrl(mp, PORT_CONFIG_EXT(mp->port_num), 0x00000000);
-
- - if (mp->tx_sram_size > 0)
- - printk(KERN_NOTICE "%s: Using SRAM\n", dev->name);
- + /*
- + * Enable the receive queues.
- + */
- + for (i = 0; i < 8; i++) {
- + struct rx_queue *rxq = mp->rxq + i;
- + int off = RXQ_CURRENT_DESC_PTR(mp->port_num, i);
- + u32 addr;
-
- - return 0;
- + if ((mp->rxq_mask & (1 << i)) == 0)
- + continue;
-
- -out:
- - free_netdev(dev);
- + addr = (u32)rxq->rx_desc_dma;
- + addr += rxq->rx_curr_desc * sizeof(struct rx_desc);
- + wrl(mp, off, addr);
-
- - return err;
- + rxq_enable(rxq);
- + }
- }
-
- -static int mv643xx_eth_remove(struct platform_device *pdev)
- +static void set_rx_coal(struct mv643xx_eth_private *mp, unsigned int delay)
- {
- - struct net_device *dev = platform_get_drvdata(pdev);
- + unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
- + u32 val;
-
- - unregister_netdev(dev);
- - flush_scheduled_work();
- + val = rdl(mp, SDMA_CONFIG(mp->port_num));
- + if (mp->shared->extended_rx_coal_limit) {
- + if (coal > 0xffff)
- + coal = 0xffff;
- + val &= ~0x023fff80;
- + val |= (coal & 0x8000) << 10;
- + val |= (coal & 0x7fff) << 7;
- + } else {
- + if (coal > 0x3fff)
- + coal = 0x3fff;
- + val &= ~0x003fff00;
- + val |= (coal & 0x3fff) << 8;
- + }
- + wrl(mp, SDMA_CONFIG(mp->port_num), val);
- +}
-
- - free_netdev(dev);
- - platform_set_drvdata(pdev, NULL);
- - return 0;
- +static void set_tx_coal(struct mv643xx_eth_private *mp, unsigned int delay)
- +{
- + unsigned int coal = ((mp->shared->t_clk / 1000000) * delay) / 64;
- +
- + if (coal > 0x3fff)
- + coal = 0x3fff;
- + wrl(mp, TX_FIFO_URGENT_THRESHOLD(mp->port_num), (coal & 0x3fff) << 4);
- }
-
- -static void mv643xx_eth_conf_mbus_windows(struct mv643xx_shared_private *msp,
- - struct mbus_dram_target_info *dram)
- +static int mv643xx_eth_open(struct net_device *dev)
- {
- - void __iomem *base = msp->eth_base;
- - u32 win_enable;
- - u32 win_protect;
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
- + int err;
- int i;
-
- - for (i = 0; i < 6; i++) {
- - writel(0, base + WINDOW_BASE(i));
- - writel(0, base + WINDOW_SIZE(i));
- - if (i < 4)
- - writel(0, base + WINDOW_REMAP_HIGH(i));
- + wrl(mp, INT_CAUSE(mp->port_num), 0);
- + wrl(mp, INT_CAUSE_EXT(mp->port_num), 0);
- + rdl(mp, INT_CAUSE_EXT(mp->port_num));
- +
- + err = request_irq(dev->irq, mv643xx_eth_irq,
- + IRQF_SHARED | IRQF_SAMPLE_RANDOM,
- + dev->name, dev);
- + if (err) {
- + dev_printk(KERN_ERR, &dev->dev, "can't assign irq\n");
- + return -EAGAIN;
- }
-
- - win_enable = 0x3f;
- - win_protect = 0;
- -
- - for (i = 0; i < dram->num_cs; i++) {
- - struct mbus_dram_window *cs = dram->cs + i;
- + init_mac_tables(mp);
-
- - writel((cs->base & 0xffff0000) |
- - (cs->mbus_attr << 8) |
- - dram->mbus_dram_target_id, base + WINDOW_BASE(i));
- - writel((cs->size - 1) & 0xffff0000, base + WINDOW_SIZE(i));
- + for (i = 0; i < 8; i++) {
- + if ((mp->rxq_mask & (1 << i)) == 0)
- + continue;
- +
- + err = rxq_init(mp, i);
- + if (err) {
- + while (--i >= 0)
- + if (mp->rxq_mask & (1 << i))
- + rxq_deinit(mp->rxq + i);
- + goto out;
- + }
-
- - win_enable &= ~(1 << i);
- - win_protect |= 3 << (2 * i);
- + rxq_refill(mp->rxq + i);
- }
-
- - writel(win_enable, base + WINDOW_BAR_ENABLE);
- - msp->win_protect = win_protect;
- -}
- -
- -static int mv643xx_eth_shared_probe(struct platform_device *pdev)
- -{
- - static int mv643xx_version_printed = 0;
- - struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data;
- - struct mv643xx_shared_private *msp;
- - struct resource *res;
- - int ret;
- -
- - if (!mv643xx_version_printed++)
- - printk(KERN_NOTICE "MV-643xx 10/100/1000 Ethernet Driver\n");
- -
- - ret = -EINVAL;
- - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- - if (res == NULL)
- - goto out;
- + for (i = 0; i < 8; i++) {
- + if ((mp->txq_mask & (1 << i)) == 0)
- + continue;
- +
- + err = txq_init(mp, i);
- + if (err) {
- + while (--i >= 0)
- + if (mp->txq_mask & (1 << i))
- + txq_deinit(mp->txq + i);
- + goto out_free;
- + }
- + }
-
- - ret = -ENOMEM;
- - msp = kmalloc(sizeof(*msp), GFP_KERNEL);
- - if (msp == NULL)
- - goto out;
- - memset(msp, 0, sizeof(*msp));
- +#ifdef MV643XX_ETH_NAPI
- + napi_enable(&mp->napi);
- +#endif
-
- - msp->eth_base = ioremap(res->start, res->end - res->start + 1);
- - if (msp->eth_base == NULL)
- - goto out_free;
- + port_start(mp);
-
- - spin_lock_init(&msp->phy_lock);
- - msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000;
- + set_rx_coal(mp, 0);
- + set_tx_coal(mp, 0);
-
- - platform_set_drvdata(pdev, msp);
- + wrl(mp, INT_MASK_EXT(mp->port_num),
- + INT_EXT_LINK | INT_EXT_PHY | INT_EXT_TX);
-
- - /*
- - * (Re-)program MBUS remapping windows if we are asked to.
- - */
- - if (pd != NULL && pd->dram != NULL)
- - mv643xx_eth_conf_mbus_windows(msp, pd->dram);
- + wrl(mp, INT_MASK(mp->port_num), INT_TX_END | INT_RX | INT_EXT);
-
- return 0;
-
- +
- out_free:
- - kfree(msp);
- + for (i = 0; i < 8; i++)
- + if (mp->rxq_mask & (1 << i))
- + rxq_deinit(mp->rxq + i);
- out:
- - return ret;
- + free_irq(dev->irq, dev);
- +
- + return err;
- }
-
- -static int mv643xx_eth_shared_remove(struct platform_device *pdev)
- +static void port_reset(struct mv643xx_eth_private *mp)
- {
- - struct mv643xx_shared_private *msp = platform_get_drvdata(pdev);
- + unsigned int data;
- + int i;
-
- - iounmap(msp->eth_base);
- - kfree(msp);
- + for (i = 0; i < 8; i++) {
- + if (mp->rxq_mask & (1 << i))
- + rxq_disable(mp->rxq + i);
- + if (mp->txq_mask & (1 << i))
- + txq_disable(mp->txq + i);
- + }
- + while (!(rdl(mp, PORT_STATUS(mp->port_num)) & TX_FIFO_EMPTY))
- + udelay(10);
-
- - return 0;
- + /* Reset the Enable bit in the Configuration Register */
- + data = rdl(mp, PORT_SERIAL_CONTROL(mp->port_num));
- + data &= ~(SERIAL_PORT_ENABLE |
- + DO_NOT_FORCE_LINK_FAIL |
- + FORCE_LINK_PASS);
- + wrl(mp, PORT_SERIAL_CONTROL(mp->port_num), data);
- }
-
- -static void mv643xx_eth_shutdown(struct platform_device *pdev)
- +static int mv643xx_eth_stop(struct net_device *dev)
- {
- - struct net_device *dev = platform_get_drvdata(pdev);
- - struct mv643xx_private *mp = netdev_priv(dev);
- - unsigned int port_num = mp->port_num;
- -
- - /* Mask all interrupts on ethernet port */
- - wrl(mp, INTERRUPT_MASK_REG(port_num), 0);
- - rdl(mp, INTERRUPT_MASK_REG(port_num));
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
- + int i;
-
- - eth_port_reset(mp);
- -}
- + wrl(mp, INT_MASK(mp->port_num), 0x00000000);
- + rdl(mp, INT_MASK(mp->port_num));
-
- -static struct platform_driver mv643xx_eth_driver = {
- - .probe = mv643xx_eth_probe,
- - .remove = mv643xx_eth_remove,
- - .shutdown = mv643xx_eth_shutdown,
- - .driver = {
- - .name = MV643XX_ETH_NAME,
- - .owner = THIS_MODULE,
- - },
- -};
- +#ifdef MV643XX_ETH_NAPI
- + napi_disable(&mp->napi);
- +#endif
- + netif_carrier_off(dev);
- + netif_stop_queue(dev);
-
- -static struct platform_driver mv643xx_eth_shared_driver = {
- - .probe = mv643xx_eth_shared_probe,
- - .remove = mv643xx_eth_shared_remove,
- - .driver = {
- - .name = MV643XX_ETH_SHARED_NAME,
- - .owner = THIS_MODULE,
- - },
- -};
- + free_irq(dev->irq, dev);
-
- -/*
- - * mv643xx_init_module
- - *
- - * Registers the network drivers into the Linux kernel
- - *
- - * Input : N/A
- - *
- - * Output : N/A
- - */
- -static int __init mv643xx_init_module(void)
- -{
- - int rc;
- + port_reset(mp);
- + mib_counters_update(mp);
-
- - rc = platform_driver_register(&mv643xx_eth_shared_driver);
- - if (!rc) {
- - rc = platform_driver_register(&mv643xx_eth_driver);
- - if (rc)
- - platform_driver_unregister(&mv643xx_eth_shared_driver);
- + for (i = 0; i < 8; i++) {
- + if (mp->rxq_mask & (1 << i))
- + rxq_deinit(mp->rxq + i);
- + if (mp->txq_mask & (1 << i))
- + txq_deinit(mp->txq + i);
- }
- - return rc;
- -}
-
- -/*
- - * mv643xx_cleanup_module
- - *
- - * Registers the network drivers into the Linux kernel
- - *
- - * Input : N/A
- - *
- - * Output : N/A
- - */
- -static void __exit mv643xx_cleanup_module(void)
- -{
- - platform_driver_unregister(&mv643xx_eth_driver);
- - platform_driver_unregister(&mv643xx_eth_shared_driver);
- + return 0;
- }
-
- -module_init(mv643xx_init_module);
- -module_exit(mv643xx_cleanup_module);
- -
- -MODULE_LICENSE("GPL");
- -MODULE_AUTHOR( "Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, Manish Lachwani"
- - " and Dale Farnsworth");
- -MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX");
- -MODULE_ALIAS("platform:" MV643XX_ETH_NAME);
- -MODULE_ALIAS("platform:" MV643XX_ETH_SHARED_NAME);
- -
- -/*
- - * The second part is the low level driver of the gigE ethernet ports.
- - */
- -
- -/*
- - * Marvell's Gigabit Ethernet controller low level driver
- - *
- - * DESCRIPTION:
- - * This file introduce low level API to Marvell's Gigabit Ethernet
- - * controller. This Gigabit Ethernet Controller driver API controls
- - * 1) Operations (i.e. port init, start, reset etc').
- - * 2) Data flow (i.e. port send, receive etc').
- - * Each Gigabit Ethernet port is controlled via
- - * struct mv643xx_private.
- - * This struct includes user configuration information as well as
- - * driver internal data needed for its operations.
- - *
- - * Supported Features:
- - * - This low level driver is OS independent. Allocating memory for
- - * the descriptor rings and buffers are not within the scope of
- - * this driver.
- - * - The user is free from Rx/Tx queue managing.
- - * - This low level driver introduce functionality API that enable
- - * the to operate Marvell's Gigabit Ethernet Controller in a
- - * convenient way.
- - * - Simple Gigabit Ethernet port operation API.
- - * - Simple Gigabit Ethernet port data flow API.
- - * - Data flow and operation API support per queue functionality.
- - * - Support cached descriptors for better performance.
- - * - Enable access to all four DRAM banks and internal SRAM memory
- - * spaces.
- - * - PHY access and control API.
- - * - Port control register configuration API.
- - * - Full control over Unicast and Multicast MAC configurations.
- - *
- - * Operation flow:
- - *
- - * Initialization phase
- - * This phase complete the initialization of the the
- - * mv643xx_private struct.
- - * User information regarding port configuration has to be set
- - * prior to calling the port initialization routine.
- - *
- - * In this phase any port Tx/Rx activity is halted, MIB counters
- - * are cleared, PHY address is set according to user parameter and
- - * access to DRAM and internal SRAM memory spaces.
- - *
- - * Driver ring initialization
- - * Allocating memory for the descriptor rings and buffers is not
- - * within the scope of this driver. Thus, the user is required to
- - * allocate memory for the descriptors ring and buffers. Those
- - * memory parameters are used by the Rx and Tx ring initialization
- - * routines in order to curve the descriptor linked list in a form
- - * of a ring.
- - * Note: Pay special attention to alignment issues when using
- - * cached descriptors/buffers. In this phase the driver store
- - * information in the mv643xx_private struct regarding each queue
- - * ring.
- - *
- - * Driver start
- - * This phase prepares the Ethernet port for Rx and Tx activity.
- - * It uses the information stored in the mv643xx_private struct to
- - * initialize the various port registers.
- - *
- - * Data flow:
- - * All packet references to/from the driver are done using
- - * struct pkt_info.
- - * This struct is a unified struct used with Rx and Tx operations.
- - * This way the user is not required to be familiar with neither
- - * Tx nor Rx descriptors structures.
- - * The driver's descriptors rings are management by indexes.
- - * Those indexes controls the ring resources and used to indicate
- - * a SW resource error:
- - * 'current'
- - * This index points to the current available resource for use. For
- - * example in Rx process this index will point to the descriptor
- - * that will be passed to the user upon calling the receive
- - * routine. In Tx process, this index will point to the descriptor
- - * that will be assigned with the user packet info and transmitted.
- - * 'used'
- - * This index points to the descriptor that need to restore its
- - * resources. For example in Rx process, using the Rx buffer return
- - * API will attach the buffer returned in packet info to the
- - * descriptor pointed by 'used'. In Tx process, using the Tx
- - * descriptor return will merely return the user packet info with
- - * the command status of the transmitted buffer pointed by the
- - * 'used' index. Nevertheless, it is essential to use this routine
- - * to update the 'used' index.
- - * 'first'
- - * This index supports Tx Scatter-Gather. It points to the first
- - * descriptor of a packet assembled of multiple buffers. For
- - * example when in middle of Such packet we have a Tx resource
- - * error the 'curr' index get the value of 'first' to indicate
- - * that the ring returned to its state before trying to transmit
- - * this packet.
- - *
- - * Receive operation:
- - * The eth_port_receive API set the packet information struct,
- - * passed by the caller, with received information from the
- - * 'current' SDMA descriptor.
- - * It is the user responsibility to return this resource back
- - * to the Rx descriptor ring to enable the reuse of this source.
- - * Return Rx resource is done using the eth_rx_return_buff API.
- - *
- - * Prior to calling the initialization routine eth_port_init() the user
- - * must set the following fields under mv643xx_private struct:
- - * port_num User Ethernet port number.
- - * port_config User port configuration value.
- - * port_config_extend User port config extend value.
- - * port_sdma_config User port SDMA config value.
- - * port_serial_control User port serial control value.
- - *
- - * This driver data flow is done using the struct pkt_info which
- - * is a unified struct for Rx and Tx operations:
- - *
- - * byte_cnt Tx/Rx descriptor buffer byte count.
- - * l4i_chk CPU provided TCP Checksum. For Tx operation
- - * only.
- - * cmd_sts Tx/Rx descriptor command status.
- - * buf_ptr Tx/Rx descriptor buffer pointer.
- - * return_info Tx/Rx user resource return information.
- - */
- -
- -/* Ethernet Port routines */
- -static void eth_port_set_filter_table_entry(struct mv643xx_private *mp,
- - int table, unsigned char entry);
- -
- -/*
- - * eth_port_init - Initialize the Ethernet port driver
- - *
- - * DESCRIPTION:
- - * This function prepares the ethernet port to start its activity:
- - * 1) Completes the ethernet port driver struct initialization toward port
- - * start routine.
- - * 2) Resets the device to a quiescent state in case of warm reboot.
- - * 3) Enable SDMA access to all four DRAM banks as well as internal SRAM.
- - * 4) Clean MAC tables. The reset status of those tables is unknown.
- - * 5) Set PHY address.
- - * Note: Call this routine prior to eth_port_start routine and after
- - * setting user values in the user fields of Ethernet port control
- - * struct.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet port control struct
- - *
- - * OUTPUT:
- - * See description.
- - *
- - * RETURN:
- - * None.
- - */
- -static void eth_port_init(struct mv643xx_private *mp)
- +static int mv643xx_eth_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
- {
- - mp->rx_resource_err = 0;
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
-
- - eth_port_reset(mp);
- + if (mp->phy_addr != -1)
- + return generic_mii_ioctl(&mp->mii, if_mii(ifr), cmd, NULL);
-
- - eth_port_init_mac_tables(mp);
- + return -EOPNOTSUPP;
- }
-
- -/*
- - * eth_port_start - Start the Ethernet port activity.
- - *
- - * DESCRIPTION:
- - * This routine prepares the Ethernet port for Rx and Tx activity:
- - * 1. Initialize Tx and Rx Current Descriptor Pointer for each queue that
- - * has been initialized a descriptor's ring (using
- - * ether_init_tx_desc_ring for Tx and ether_init_rx_desc_ring for Rx)
- - * 2. Initialize and enable the Ethernet configuration port by writing to
- - * the port's configuration and command registers.
- - * 3. Initialize and enable the SDMA by writing to the SDMA's
- - * configuration and command registers. After completing these steps,
- - * the ethernet port SDMA can starts to perform Rx and Tx activities.
- - *
- - * Note: Each Rx and Tx queue descriptor's list must be initialized prior
- - * to calling this function (use ether_init_tx_desc_ring for Tx queues
- - * and ether_init_rx_desc_ring for Rx queues).
- - *
- - * INPUT:
- - * dev - a pointer to the required interface
- - *
- - * OUTPUT:
- - * Ethernet port is ready to receive and transmit.
- - *
- - * RETURN:
- - * None.
- - */
- -static void eth_port_start(struct net_device *dev)
- +static int mv643xx_eth_change_mtu(struct net_device *dev, int new_mtu)
- {
- - struct mv643xx_private *mp = netdev_priv(dev);
- - unsigned int port_num = mp->port_num;
- - int tx_curr_desc, rx_curr_desc;
- - u32 pscr;
- - struct ethtool_cmd ethtool_cmd;
- -
- - /* Assignment of Tx CTRP of given queue */
- - tx_curr_desc = mp->tx_curr_desc_q;
- - wrl(mp, TX_CURRENT_QUEUE_DESC_PTR_0(port_num),
- - (u32)((struct eth_tx_desc *)mp->tx_desc_dma + tx_curr_desc));
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
-
- - /* Assignment of Rx CRDP of given queue */
- - rx_curr_desc = mp->rx_curr_desc_q;
- - wrl(mp, RX_CURRENT_QUEUE_DESC_PTR_0(port_num),
- - (u32)((struct eth_rx_desc *)mp->rx_desc_dma + rx_curr_desc));
- -
- - /* Add the assigned Ethernet address to the port's address table */
- - eth_port_uc_addr_set(mp, dev->dev_addr);
- + if (new_mtu < 64 || new_mtu > 9500)
- + return -EINVAL;
-
- - /* Assign port configuration and command. */
- - wrl(mp, PORT_CONFIG_REG(port_num),
- - PORT_CONFIG_DEFAULT_VALUE);
- + dev->mtu = new_mtu;
- + tx_set_rate(mp, 1000000000, 16777216);
-
- - wrl(mp, PORT_CONFIG_EXTEND_REG(port_num),
- - PORT_CONFIG_EXTEND_DEFAULT_VALUE);
- + if (!netif_running(dev))
- + return 0;
-
- - pscr = rdl(mp, PORT_SERIAL_CONTROL_REG(port_num));
- + /*
- + * Stop and then re-open the interface. This will allocate RX
- + * skbs of the new MTU.
- + * There is a possible danger that the open will not succeed,
- + * due to memory being full.
- + */
- + mv643xx_eth_stop(dev);
- + if (mv643xx_eth_open(dev)) {
- + dev_printk(KERN_ERR, &dev->dev,
- + "fatal error on re-opening device after "
- + "MTU change\n");
- + }
-
- - pscr &= ~(SERIAL_PORT_ENABLE | FORCE_LINK_PASS);
- - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), pscr);
- + return 0;
- +}
-
- - pscr |= DISABLE_AUTO_NEG_FOR_FLOW_CTRL |
- - DISABLE_AUTO_NEG_SPEED_GMII |
- - DISABLE_AUTO_NEG_FOR_DUPLX |
- - DO_NOT_FORCE_LINK_FAIL |
- - SERIAL_PORT_CONTROL_RESERVED;
- +static void tx_timeout_task(struct work_struct *ugly)
- +{
- + struct mv643xx_eth_private *mp;
-
- - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), pscr);
- + mp = container_of(ugly, struct mv643xx_eth_private, tx_timeout_task);
- + if (netif_running(mp->dev)) {
- + netif_stop_queue(mp->dev);
-
- - pscr |= SERIAL_PORT_ENABLE;
- - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), pscr);
- + port_reset(mp);
- + port_start(mp);
-
- - /* Assign port SDMA configuration */
- - wrl(mp, SDMA_CONFIG_REG(port_num),
- - PORT_SDMA_CONFIG_DEFAULT_VALUE);
- -
- - /* Enable port Rx. */
- - mv643xx_eth_port_enable_rx(mp, ETH_RX_QUEUES_ENABLED);
- -
- - /* Disable port bandwidth limits by clearing MTU register */
- - wrl(mp, MAXIMUM_TRANSMIT_UNIT(port_num), 0);
- -
- - /* save phy settings across reset */
- - mv643xx_get_settings(dev, ðtool_cmd);
- - ethernet_phy_reset(mp);
- - mv643xx_set_settings(dev, ðtool_cmd);
- + __txq_maybe_wake(mp->txq + mp->txq_primary);
- + }
- }
-
- -/*
- - * eth_port_uc_addr_set - Write a MAC address into the port's hw registers
- - */
- -static void eth_port_uc_addr_set(struct mv643xx_private *mp,
- - unsigned char *p_addr)
- +static void mv643xx_eth_tx_timeout(struct net_device *dev)
- {
- - unsigned int port_num = mp->port_num;
- - unsigned int mac_h;
- - unsigned int mac_l;
- - int table;
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
-
- - mac_l = (p_addr[4] << 8) | (p_addr[5]);
- - mac_h = (p_addr[0] << 24) | (p_addr[1] << 16) | (p_addr[2] << 8) |
- - (p_addr[3] << 0);
- -
- - wrl(mp, MAC_ADDR_LOW(port_num), mac_l);
- - wrl(mp, MAC_ADDR_HIGH(port_num), mac_h);
- -
- - /* Accept frames with this address */
- - table = DA_FILTER_UNICAST_TABLE_BASE(port_num);
- - eth_port_set_filter_table_entry(mp, table, p_addr[5] & 0x0f);
- + dev_printk(KERN_INFO, &dev->dev, "tx timeout\n");
- +
- + schedule_work(&mp->tx_timeout_task);
- }
-
- -/*
- - * eth_port_uc_addr_get - Read the MAC address from the port's hw registers
- - */
- -static void eth_port_uc_addr_get(struct mv643xx_private *mp,
- - unsigned char *p_addr)
- +#ifdef CONFIG_NET_POLL_CONTROLLER
- +static void mv643xx_eth_netpoll(struct net_device *dev)
- {
- - unsigned int port_num = mp->port_num;
- - unsigned int mac_h;
- - unsigned int mac_l;
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
- +
- + wrl(mp, INT_MASK(mp->port_num), 0x00000000);
- + rdl(mp, INT_MASK(mp->port_num));
-
- - mac_h = rdl(mp, MAC_ADDR_HIGH(port_num));
- - mac_l = rdl(mp, MAC_ADDR_LOW(port_num));
- + mv643xx_eth_irq(dev->irq, dev);
-
- - p_addr[0] = (mac_h >> 24) & 0xff;
- - p_addr[1] = (mac_h >> 16) & 0xff;
- - p_addr[2] = (mac_h >> 8) & 0xff;
- - p_addr[3] = mac_h & 0xff;
- - p_addr[4] = (mac_l >> 8) & 0xff;
- - p_addr[5] = mac_l & 0xff;
- + wrl(mp, INT_MASK(mp->port_num), INT_TX_END | INT_RX | INT_CAUSE_EXT);
- }
- +#endif
-
- -/*
- - * The entries in each table are indexed by a hash of a packet's MAC
- - * address. One bit in each entry determines whether the packet is
- - * accepted. There are 4 entries (each 8 bits wide) in each register
- - * of the table. The bits in each entry are defined as follows:
- - * 0 Accept=1, Drop=0
- - * 3-1 Queue (ETH_Q0=0)
- - * 7-4 Reserved = 0;
- - */
- -static void eth_port_set_filter_table_entry(struct mv643xx_private *mp,
- - int table, unsigned char entry)
- +static int mv643xx_eth_mdio_read(struct net_device *dev, int addr, int reg)
- {
- - unsigned int table_reg;
- - unsigned int tbl_offset;
- - unsigned int reg_offset;
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
- + int val;
-
- - tbl_offset = (entry / 4) * 4; /* Register offset of DA table entry */
- - reg_offset = entry % 4; /* Entry offset within the register */
- + smi_reg_read(mp, addr, reg, &val);
-
- - /* Set "accepts frame bit" at specified table entry */
- - table_reg = rdl(mp, table + tbl_offset);
- - table_reg |= 0x01 << (8 * reg_offset);
- - wrl(mp, table + tbl_offset, table_reg);
- + return val;
- }
-
- -/*
- - * eth_port_mc_addr - Multicast address settings.
- - *
- - * The MV device supports multicast using two tables:
- - * 1) Special Multicast Table for MAC addresses of the form
- - * 0x01-00-5E-00-00-XX (where XX is between 0x00 and 0x_FF).
- - * The MAC DA[7:0] bits are used as a pointer to the Special Multicast
- - * Table entries in the DA-Filter table.
- - * 2) Other Multicast Table for multicast of another type. A CRC-8bit
- - * is used as an index to the Other Multicast Table entries in the
- - * DA-Filter table. This function calculates the CRC-8bit value.
- - * In either case, eth_port_set_filter_table_entry() is then called
- - * to set to set the actual table entry.
- - */
- -static void eth_port_mc_addr(struct mv643xx_private *mp, unsigned char *p_addr)
- +static void mv643xx_eth_mdio_write(struct net_device *dev, int addr, int reg, int val)
- {
- - unsigned int port_num = mp->port_num;
- - unsigned int mac_h;
- - unsigned int mac_l;
- - unsigned char crc_result = 0;
- - int table;
- - int mac_array[48];
- - int crc[8];
- - int i;
- + struct mv643xx_eth_private *mp = netdev_priv(dev);
- + smi_reg_write(mp, addr, reg, val);
- +}
-
- - if ((p_addr[0] == 0x01) && (p_addr[1] == 0x00) &&
- - (p_addr[2] == 0x5E) && (p_addr[3] == 0x00) && (p_addr[4] == 0x00)) {
- - table = DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(port_num);
- - eth_port_set_filter_table_entry(mp, table, p_addr[5]);
- - return;
- - }
-
- - /* Calculate CRC-8 out of the given address */
- - mac_h = (p_addr[0] << 8) | (p_addr[1]);
- - mac_l = (p_addr[2] << 24) | (p_addr[3] << 16) |
- - (p_addr[4] << 8) | (p_addr[5] << 0);
- -
- - for (i = 0; i < 32; i++)
- - mac_array[i] = (mac_l >> i) & 0x1;
- - for (i = 32; i < 48; i++)
- - mac_array[i] = (mac_h >> (i - 32)) & 0x1;
- -
- - crc[0] = mac_array[45] ^ mac_array[43] ^ mac_array[40] ^ mac_array[39] ^
- - mac_array[35] ^ mac_array[34] ^ mac_array[31] ^ mac_array[30] ^
- - mac_array[28] ^ mac_array[23] ^ mac_array[21] ^ mac_array[19] ^
- - mac_array[18] ^ mac_array[16] ^ mac_array[14] ^ mac_array[12] ^
- - mac_array[8] ^ mac_array[7] ^ mac_array[6] ^ mac_array[0];
- -
- - crc[1] = mac_array[46] ^ mac_array[45] ^ mac_array[44] ^ mac_array[43] ^
- - mac_array[41] ^ mac_array[39] ^ mac_array[36] ^ mac_array[34] ^
- - mac_array[32] ^ mac_array[30] ^ mac_array[29] ^ mac_array[28] ^
- - mac_array[24] ^ mac_array[23] ^ mac_array[22] ^ mac_array[21] ^
- - mac_array[20] ^ mac_array[18] ^ mac_array[17] ^ mac_array[16] ^
- - mac_array[15] ^ mac_array[14] ^ mac_array[13] ^ mac_array[12] ^
- - mac_array[9] ^ mac_array[6] ^ mac_array[1] ^ mac_array[0];
- -
- - crc[2] = mac_array[47] ^ mac_array[46] ^ mac_array[44] ^ mac_array[43] ^
- - mac_array[42] ^ mac_array[39] ^ mac_array[37] ^ mac_array[34] ^
- - mac_array[33] ^ mac_array[29] ^ mac_array[28] ^ mac_array[25] ^
- - mac_array[24] ^ mac_array[22] ^ mac_array[17] ^ mac_array[15] ^
- - mac_array[13] ^ mac_array[12] ^ mac_array[10] ^ mac_array[8] ^
- - mac_array[6] ^ mac_array[2] ^ mac_array[1] ^ mac_array[0];
- -
- - crc[3] = mac_array[47] ^ mac_array[45] ^ mac_array[44] ^ mac_array[43] ^
- - mac_array[40] ^ mac_array[38] ^ mac_array[35] ^ mac_array[34] ^
- - mac_array[30] ^ mac_array[29] ^ mac_array[26] ^ mac_array[25] ^
- - mac_array[23] ^ mac_array[18] ^ mac_array[16] ^ mac_array[14] ^
- - mac_array[13] ^ mac_array[11] ^ mac_array[9] ^ mac_array[7] ^
- - mac_array[3] ^ mac_array[2] ^ mac_array[1];
- -
- - crc[4] = mac_array[46] ^ mac_array[45] ^ mac_array[44] ^ mac_array[41] ^
- - mac_array[39] ^ mac_array[36] ^ mac_array[35] ^ mac_array[31] ^
- - mac_array[30] ^ mac_array[27] ^ mac_array[26] ^ mac_array[24] ^
- - mac_array[19] ^ mac_array[17] ^ mac_array[15] ^ mac_array[14] ^
- - mac_array[12] ^ mac_array[10] ^ mac_array[8] ^ mac_array[4] ^
- - mac_array[3] ^ mac_array[2];
- -
- - crc[5] = mac_array[47] ^ mac_array[46] ^ mac_array[45] ^ mac_array[42] ^
- - mac_array[40] ^ mac_array[37] ^ mac_array[36] ^ mac_array[32] ^
- - mac_array[31] ^ mac_array[28] ^ mac_array[27] ^ mac_array[25] ^
- - mac_array[20] ^ mac_array[18] ^ mac_array[16] ^ mac_array[15] ^
- - mac_array[13] ^ mac_array[11] ^ mac_array[9] ^ mac_array[5] ^
- - mac_array[4] ^ mac_array[3];
- -
- - crc[6] = mac_array[47] ^ mac_array[46] ^ mac_array[43] ^ mac_array[41] ^
- - mac_array[38] ^ mac_array[37] ^ mac_array[33] ^ mac_array[32] ^
- - mac_array[29] ^ mac_array[28] ^ mac_array[26] ^ mac_array[21] ^
- - mac_array[19] ^ mac_array[17] ^ mac_array[16] ^ mac_array[14] ^
- - mac_array[12] ^ mac_array[10] ^ mac_array[6] ^ mac_array[5] ^
- - mac_array[4];
- -
- - crc[7] = mac_array[47] ^ mac_array[44] ^ mac_array[42] ^ mac_array[39] ^
- - mac_array[38] ^ mac_array[34] ^ mac_array[33] ^ mac_array[30] ^
- - mac_array[29] ^ mac_array[27] ^ mac_array[22] ^ mac_array[20] ^
- - mac_array[18] ^ mac_array[17] ^ mac_array[15] ^ mac_array[13] ^
- - mac_array[11] ^ mac_array[7] ^ mac_array[6] ^ mac_array[5];
- +/* platform glue ************************************************************/
- +static void
- +mv643xx_eth_conf_mbus_windows(struct mv643xx_eth_shared_private *msp,
- + struct mbus_dram_target_info *dram)
- +{
- + void __iomem *base = msp->base;
- + u32 win_enable;
- + u32 win_protect;
- + int i;
-
- - for (i = 0; i < 8; i++)
- - crc_result = crc_result | (crc[i] << i);
- + for (i = 0; i < 6; i++) {
- + writel(0, base + WINDOW_BASE(i));
- + writel(0, base + WINDOW_SIZE(i));
- + if (i < 4)
- + writel(0, base + WINDOW_REMAP_HIGH(i));
- + }
-
- - table = DA_FILTER_OTHER_MULTICAST_TABLE_BASE(port_num);
- - eth_port_set_filter_table_entry(mp, table, crc_result);
- -}
- + win_enable = 0x3f;
- + win_protect = 0;
-
- -/*
- - * Set the entire multicast list based on dev->mc_list.
- - */
- -static void eth_port_set_multicast_list(struct net_device *dev)
- -{
- + for (i = 0; i < dram->num_cs; i++) {
- + struct mbus_dram_window *cs = dram->cs + i;
-
- - struct dev_mc_list *mc_list;
- - int i;
- - int table_index;
- - struct mv643xx_private *mp = netdev_priv(dev);
- - unsigned int eth_port_num = mp->port_num;
- -
- - /* If the device is in promiscuous mode or in all multicast mode,
- - * we will fully populate both multicast tables with accept.
- - * This is guaranteed to yield a match on all multicast addresses...
- - */
- - if ((dev->flags & IFF_PROMISC) || (dev->flags & IFF_ALLMULTI)) {
- - for (table_index = 0; table_index <= 0xFC; table_index += 4) {
- - /* Set all entries in DA filter special multicast
- - * table (Ex_dFSMT)
- - * Set for ETH_Q0 for now
- - * Bits
- - * 0 Accept=1, Drop=0
- - * 3-1 Queue ETH_Q0=0
- - * 7-4 Reserved = 0;
- - */
- - wrl(mp, DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);
- + writel((cs->base & 0xffff0000) |
- + (cs->mbus_attr << 8) |
- + dram->mbus_dram_target_id, base + WINDOW_BASE(i));
- + writel((cs->size - 1) & 0xffff0000, base + WINDOW_SIZE(i));
-
- - /* Set all entries in DA filter other multicast
- - * table (Ex_dFOMT)
- - * Set for ETH_Q0 for now
- - * Bits
- - * 0 Accept=1, Drop=0
- - * 3-1 Queue ETH_Q0=0
- - * 7-4 Reserved = 0;
- - */
- - wrl(mp, DA_FILTER_OTHER_MULTICAST_TABLE_BASE(eth_port_num) + table_index, 0x01010101);
- - }
- - return;
- + win_enable &= ~(1 << i);
- + win_protect |= 3 << (2 * i);
- }
-
- - /* We will clear out multicast tables every time we get the list.
- - * Then add the entire new list...
- - */
- - for (table_index = 0; table_index <= 0xFC; table_index += 4) {
- - /* Clear DA filter special multicast table (Ex_dFSMT) */
- - wrl(mp, DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE
- - (eth_port_num) + table_index, 0);
- -
- - /* Clear DA filter other multicast table (Ex_dFOMT) */
- - wrl(mp, DA_FILTER_OTHER_MULTICAST_TABLE_BASE
- - (eth_port_num) + table_index, 0);
- - }
- -
- - /* Get pointer to net_device multicast list and add each one... */
- - for (i = 0, mc_list = dev->mc_list;
- - (i < 256) && (mc_list != NULL) && (i < dev->mc_count);
- - i++, mc_list = mc_list->next)
- - if (mc_list->dmi_addrlen == 6)
- - eth_port_mc_addr(mp, mc_list->dmi_addr);
- + writel(win_enable, base + WINDOW_BAR_ENABLE);
- + msp->win_protect = win_protect;
- }
-
- -/*
- - * eth_port_init_mac_tables - Clear all entrance in the UC, SMC and OMC tables
- - *
- - * DESCRIPTION:
- - * Go through all the DA filter tables (Unicast, Special Multicast &
- - * Other Multicast) and set each entry to 0.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port.
- - *
- - * OUTPUT:
- - * Multicast and Unicast packets are rejected.
- - *
- - * RETURN:
- - * None.
- - */
- -static void eth_port_init_mac_tables(struct mv643xx_private *mp)
- +static void infer_hw_params(struct mv643xx_eth_shared_private *msp)
- {
- - unsigned int port_num = mp->port_num;
- - int table_index;
- + /*
- + * Check whether we have a 14-bit coal limit field in bits
- + * [21:8], or a 16-bit coal limit in bits [25,21:7] of the
- + * SDMA config register.
- + */
- + writel(0x02000000, msp->base + SDMA_CONFIG(0));
- + if (readl(msp->base + SDMA_CONFIG(0)) & 0x02000000)
- + msp->extended_rx_coal_limit = 1;
- + else
- + msp->extended_rx_coal_limit = 0;
-
- - /* Clear DA filter unicast table (Ex_dFUT) */
- - for (table_index = 0; table_index <= 0xC; table_index += 4)
- - wrl(mp, DA_FILTER_UNICAST_TABLE_BASE(port_num) +
- - table_index, 0);
- -
- - for (table_index = 0; table_index <= 0xFC; table_index += 4) {
- - /* Clear DA filter special multicast table (Ex_dFSMT) */
- - wrl(mp, DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE(port_num) +
- - table_index, 0);
- - /* Clear DA filter other multicast table (Ex_dFOMT) */
- - wrl(mp, DA_FILTER_OTHER_MULTICAST_TABLE_BASE(port_num) +
- - table_index, 0);
- - }
- + /*
- + * Check whether the TX rate control registers are in the
- + * old or the new place.
- + */
- + writel(1, msp->base + TX_BW_MTU_MOVED(0));
- + if (readl(msp->base + TX_BW_MTU_MOVED(0)) & 1)
- + msp->tx_bw_control_moved = 1;
- + else
- + msp->tx_bw_control_moved = 0;
- }
-
- -/*
- - * eth_clear_mib_counters - Clear all MIB counters
- - *
- - * DESCRIPTION:
- - * This function clears all MIB counters of a specific ethernet port.
- - * A read from the MIB counter will reset the counter.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port.
- - *
- - * OUTPUT:
- - * After reading all MIB counters, the counters resets.
- - *
- - * RETURN:
- - * MIB counter value.
- - *
- - */
- -static void eth_clear_mib_counters(struct mv643xx_private *mp)
- +static int mv643xx_eth_shared_probe(struct platform_device *pdev)
- {
- - unsigned int port_num = mp->port_num;
- - int i;
- -
- - /* Perform dummy reads from MIB counters */
- - for (i = ETH_MIB_GOOD_OCTETS_RECEIVED_LOW; i < ETH_MIB_LATE_COLLISION;
- - i += 4)
- - rdl(mp, MIB_COUNTERS_BASE(port_num) + i);
- -}
- + static int mv643xx_eth_version_printed = 0;
- + struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data;
- + struct mv643xx_eth_shared_private *msp;
- + struct resource *res;
- + int ret;
-
- -static inline u32 read_mib(struct mv643xx_private *mp, int offset)
- -{
- - return rdl(mp, MIB_COUNTERS_BASE(mp->port_num) + offset);
- -}
- + if (!mv643xx_eth_version_printed++)
- + printk(KERN_NOTICE "MV-643xx 10/100/1000 Ethernet Driver\n");
-
- -static void eth_update_mib_counters(struct mv643xx_private *mp)
- -{
- - struct mv643xx_mib_counters *p = &mp->mib_counters;
- - int offset;
- + ret = -EINVAL;
- + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- + if (res == NULL)
- + goto out;
-
- - p->good_octets_received +=
- - read_mib(mp, ETH_MIB_GOOD_OCTETS_RECEIVED_LOW);
- - p->good_octets_received +=
- - (u64)read_mib(mp, ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH) << 32;
- + ret = -ENOMEM;
- + msp = kmalloc(sizeof(*msp), GFP_KERNEL);
- + if (msp == NULL)
- + goto out;
- + memset(msp, 0, sizeof(*msp));
-
- - for (offset = ETH_MIB_BAD_OCTETS_RECEIVED;
- - offset <= ETH_MIB_FRAMES_1024_TO_MAX_OCTETS;
- - offset += 4)
- - *(u32 *)((char *)p + offset) += read_mib(mp, offset);
- + msp->base = ioremap(res->start, res->end - res->start + 1);
- + if (msp->base == NULL)
- + goto out_free;
-
- - p->good_octets_sent += read_mib(mp, ETH_MIB_GOOD_OCTETS_SENT_LOW);
- - p->good_octets_sent +=
- - (u64)read_mib(mp, ETH_MIB_GOOD_OCTETS_SENT_HIGH) << 32;
- + spin_lock_init(&msp->phy_lock);
-
- - for (offset = ETH_MIB_GOOD_FRAMES_SENT;
- - offset <= ETH_MIB_LATE_COLLISION;
- - offset += 4)
- - *(u32 *)((char *)p + offset) += read_mib(mp, offset);
- -}
- + /*
- + * (Re-)program MBUS remapping windows if we are asked to.
- + */
- + if (pd != NULL && pd->dram != NULL)
- + mv643xx_eth_conf_mbus_windows(msp, pd->dram);
-
- -/*
- - * ethernet_phy_detect - Detect whether a phy is present
- - *
- - * DESCRIPTION:
- - * This function tests whether there is a PHY present on
- - * the specified port.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port.
- - *
- - * OUTPUT:
- - * None
- - *
- - * RETURN:
- - * 0 on success
- - * -ENODEV on failure
- - *
- - */
- -static int ethernet_phy_detect(struct mv643xx_private *mp)
- -{
- - unsigned int phy_reg_data0;
- - int auto_neg;
- + /*
- + * Detect hardware parameters.
- + */
- + msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000;
- + infer_hw_params(msp);
-
- - eth_port_read_smi_reg(mp, 0, &phy_reg_data0);
- - auto_neg = phy_reg_data0 & 0x1000;
- - phy_reg_data0 ^= 0x1000; /* invert auto_neg */
- - eth_port_write_smi_reg(mp, 0, phy_reg_data0);
- -
- - eth_port_read_smi_reg(mp, 0, &phy_reg_data0);
- - if ((phy_reg_data0 & 0x1000) == auto_neg)
- - return -ENODEV; /* change didn't take */
- + platform_set_drvdata(pdev, msp);
-
- - phy_reg_data0 ^= 0x1000;
- - eth_port_write_smi_reg(mp, 0, phy_reg_data0);
- return 0;
- +
- +out_free:
- + kfree(msp);
- +out:
- + return ret;
- }
-
- -/*
- - * ethernet_phy_get - Get the ethernet port PHY address.
- - *
- - * DESCRIPTION:
- - * This routine returns the given ethernet port PHY address.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port.
- - *
- - * OUTPUT:
- - * None.
- - *
- - * RETURN:
- - * PHY address.
- - *
- - */
- -static int ethernet_phy_get(struct mv643xx_private *mp)
- +static int mv643xx_eth_shared_remove(struct platform_device *pdev)
- {
- - unsigned int reg_data;
- + struct mv643xx_eth_shared_private *msp = platform_get_drvdata(pdev);
-
- - reg_data = rdl(mp, PHY_ADDR_REG);
- + iounmap(msp->base);
- + kfree(msp);
-
- - return ((reg_data >> (5 * mp->port_num)) & 0x1f);
- + return 0;
- }
-
- -/*
- - * ethernet_phy_set - Set the ethernet port PHY address.
- - *
- - * DESCRIPTION:
- - * This routine sets the given ethernet port PHY address.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port.
- - * int phy_addr PHY address.
- - *
- - * OUTPUT:
- - * None.
- - *
- - * RETURN:
- - * None.
- - *
- - */
- -static void ethernet_phy_set(struct mv643xx_private *mp, int phy_addr)
- +static struct platform_driver mv643xx_eth_shared_driver = {
- + .probe = mv643xx_eth_shared_probe,
- + .remove = mv643xx_eth_shared_remove,
- + .driver = {
- + .name = MV643XX_ETH_SHARED_NAME,
- + .owner = THIS_MODULE,
- + },
- +};
- +
- +static void phy_addr_set(struct mv643xx_eth_private *mp, int phy_addr)
- {
- - u32 reg_data;
- int addr_shift = 5 * mp->port_num;
- + u32 data;
-
- - reg_data = rdl(mp, PHY_ADDR_REG);
- - reg_data &= ~(0x1f << addr_shift);
- - reg_data |= (phy_addr & 0x1f) << addr_shift;
- - wrl(mp, PHY_ADDR_REG, reg_data);
- + data = rdl(mp, PHY_ADDR);
- + data &= ~(0x1f << addr_shift);
- + data |= (phy_addr & 0x1f) << addr_shift;
- + wrl(mp, PHY_ADDR, data);
- }
-
- -/*
- - * ethernet_phy_reset - Reset Ethernet port PHY.
- - *
- - * DESCRIPTION:
- - * This routine utilizes the SMI interface to reset the ethernet port PHY.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port.
- - *
- - * OUTPUT:
- - * The PHY is reset.
- - *
- - * RETURN:
- - * None.
- - *
- - */
- -static void ethernet_phy_reset(struct mv643xx_private *mp)
- +static int phy_addr_get(struct mv643xx_eth_private *mp)
- {
- - unsigned int phy_reg_data;
- + unsigned int data;
-
- - /* Reset the PHY */
- - eth_port_read_smi_reg(mp, 0, &phy_reg_data);
- - phy_reg_data |= 0x8000; /* Set bit 15 to reset the PHY */
- - eth_port_write_smi_reg(mp, 0, phy_reg_data);
- + data = rdl(mp, PHY_ADDR);
-
- - /* wait for PHY to come out of reset */
- - do {
- - udelay(1);
- - eth_port_read_smi_reg(mp, 0, &phy_reg_data);
- - } while (phy_reg_data & 0x8000);
- + return (data >> (5 * mp->port_num)) & 0x1f;
- }
-
- -static void mv643xx_eth_port_enable_tx(struct mv643xx_private *mp,
- - unsigned int queues)
- +static void set_params(struct mv643xx_eth_private *mp,
- + struct mv643xx_eth_platform_data *pd)
- {
- - wrl(mp, TRANSMIT_QUEUE_COMMAND_REG(mp->port_num), queues);
- -}
- + struct net_device *dev = mp->dev;
-
- -static void mv643xx_eth_port_enable_rx(struct mv643xx_private *mp,
- - unsigned int queues)
- -{
- - wrl(mp, RECEIVE_QUEUE_COMMAND_REG(mp->port_num), queues);
- -}
- + if (is_valid_ether_addr(pd->mac_addr))
- + memcpy(dev->dev_addr, pd->mac_addr, 6);
- + else
- + uc_addr_get(mp, dev->dev_addr);
-
- -static unsigned int mv643xx_eth_port_disable_tx(struct mv643xx_private *mp)
- -{
- - unsigned int port_num = mp->port_num;
- - u32 queues;
- + if (pd->phy_addr == -1) {
- + mp->shared_smi = NULL;
- + mp->phy_addr = -1;
- + } else {
- + mp->shared_smi = mp->shared;
- + if (pd->shared_smi != NULL)
- + mp->shared_smi = platform_get_drvdata(pd->shared_smi);
- +
- + if (pd->force_phy_addr || pd->phy_addr) {
- + mp->phy_addr = pd->phy_addr & 0x3f;
- + phy_addr_set(mp, mp->phy_addr);
- + } else {
- + mp->phy_addr = phy_addr_get(mp);
- + }
- + }
-
- - /* Stop Tx port activity. Check port Tx activity. */
- - queues = rdl(mp, TRANSMIT_QUEUE_COMMAND_REG(port_num)) & 0xFF;
- - if (queues) {
- - /* Issue stop command for active queues only */
- - wrl(mp, TRANSMIT_QUEUE_COMMAND_REG(port_num), (queues << 8));
- + mp->default_rx_ring_size = DEFAULT_RX_QUEUE_SIZE;
- + if (pd->rx_queue_size)
- + mp->default_rx_ring_size = pd->rx_queue_size;
- + mp->rx_desc_sram_addr = pd->rx_sram_addr;
- + mp->rx_desc_sram_size = pd->rx_sram_size;
-
- - /* Wait for all Tx activity to terminate. */
- - /* Check port cause register that all Tx queues are stopped */
- - while (rdl(mp, TRANSMIT_QUEUE_COMMAND_REG(port_num)) & 0xFF)
- - udelay(PHY_WAIT_MICRO_SECONDS);
- + if (pd->rx_queue_mask)
- + mp->rxq_mask = pd->rx_queue_mask;
- + else
- + mp->rxq_mask = 0x01;
- + mp->rxq_primary = fls(mp->rxq_mask) - 1;
-
- - /* Wait for Tx FIFO to empty */
- - while (rdl(mp, PORT_STATUS_REG(port_num)) &
- - ETH_PORT_TX_FIFO_EMPTY)
- - udelay(PHY_WAIT_MICRO_SECONDS);
- - }
- + mp->default_tx_ring_size = DEFAULT_TX_QUEUE_SIZE;
- + if (pd->tx_queue_size)
- + mp->default_tx_ring_size = pd->tx_queue_size;
- + mp->tx_desc_sram_addr = pd->tx_sram_addr;
- + mp->tx_desc_sram_size = pd->tx_sram_size;
-
- - return queues;
- + if (pd->tx_queue_mask)
- + mp->txq_mask = pd->tx_queue_mask;
- + else
- + mp->txq_mask = 0x01;
- + mp->txq_primary = fls(mp->txq_mask) - 1;
- }
-
- -static unsigned int mv643xx_eth_port_disable_rx(struct mv643xx_private *mp)
- +static int phy_detect(struct mv643xx_eth_private *mp)
- {
- - unsigned int port_num = mp->port_num;
- - u32 queues;
- + unsigned int data;
- + unsigned int data2;
-
- - /* Stop Rx port activity. Check port Rx activity. */
- - queues = rdl(mp, RECEIVE_QUEUE_COMMAND_REG(port_num)) & 0xFF;
- - if (queues) {
- - /* Issue stop command for active queues only */
- - wrl(mp, RECEIVE_QUEUE_COMMAND_REG(port_num), (queues << 8));
- + smi_reg_read(mp, mp->phy_addr, 0, &data);
- + smi_reg_write(mp, mp->phy_addr, 0, data ^ 0x1000);
-
- - /* Wait for all Rx activity to terminate. */
- - /* Check port cause register that all Rx queues are stopped */
- - while (rdl(mp, RECEIVE_QUEUE_COMMAND_REG(port_num)) & 0xFF)
- - udelay(PHY_WAIT_MICRO_SECONDS);
- - }
- + smi_reg_read(mp, mp->phy_addr, 0, &data2);
- + if (((data ^ data2) & 0x1000) == 0)
- + return -ENODEV;
- +
- + smi_reg_write(mp, mp->phy_addr, 0, data);
-
- - return queues;
- + return 0;
- }
-
- -/*
- - * eth_port_reset - Reset Ethernet port
- - *
- - * DESCRIPTION:
- - * This routine resets the chip by aborting any SDMA engine activity and
- - * clearing the MIB counters. The Receiver and the Transmit unit are in
- - * idle state after this command is performed and the port is disabled.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port.
- - *
- - * OUTPUT:
- - * Channel activity is halted.
- - *
- - * RETURN:
- - * None.
- - *
- - */
- -static void eth_port_reset(struct mv643xx_private *mp)
- +static int phy_init(struct mv643xx_eth_private *mp,
- + struct mv643xx_eth_platform_data *pd)
- {
- - unsigned int port_num = mp->port_num;
- - unsigned int reg_data;
- -
- - mv643xx_eth_port_disable_tx(mp);
- - mv643xx_eth_port_disable_rx(mp);
- -
- - /* Clear all MIB counters */
- - eth_clear_mib_counters(mp);
- + struct ethtool_cmd cmd;
- + int err;
-
- - /* Reset the Enable bit in the Configuration Register */
- - reg_data = rdl(mp, PORT_SERIAL_CONTROL_REG(port_num));
- - reg_data &= ~(SERIAL_PORT_ENABLE |
- - DO_NOT_FORCE_LINK_FAIL |
- - FORCE_LINK_PASS);
- - wrl(mp, PORT_SERIAL_CONTROL_REG(port_num), reg_data);
- -}
- + err = phy_detect(mp);
- + if (err) {
- + dev_printk(KERN_INFO, &mp->dev->dev,
- + "no PHY detected at addr %d\n", mp->phy_addr);
- + return err;
- + }
- + phy_reset(mp);
-
- + mp->mii.phy_id = mp->phy_addr;
- + mp->mii.phy_id_mask = 0x3f;
- + mp->mii.reg_num_mask = 0x1f;
- + mp->mii.dev = mp->dev;
- + mp->mii.mdio_read = mv643xx_eth_mdio_read;
- + mp->mii.mdio_write = mv643xx_eth_mdio_write;
-
- -/*
- - * eth_port_read_smi_reg - Read PHY registers
- - *
- - * DESCRIPTION:
- - * This routine utilize the SMI interface to interact with the PHY in
- - * order to perform PHY register read.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port.
- - * unsigned int phy_reg PHY register address offset.
- - * unsigned int *value Register value buffer.
- - *
- - * OUTPUT:
- - * Write the value of a specified PHY register into given buffer.
- - *
- - * RETURN:
- - * false if the PHY is busy or read data is not in valid state.
- - * true otherwise.
- - *
- - */
- -static void eth_port_read_smi_reg(struct mv643xx_private *mp,
- - unsigned int phy_reg, unsigned int *value)
- -{
- - void __iomem *smi_reg = mp->shared_smi->eth_base + SMI_REG;
- - int phy_addr = ethernet_phy_get(mp);
- - unsigned long flags;
- - int i;
- + mp->mii.supports_gmii = mii_check_gmii_support(&mp->mii);
-
- - /* the SMI register is a shared resource */
- - spin_lock_irqsave(&mp->shared_smi->phy_lock, flags);
- + memset(&cmd, 0, sizeof(cmd));
-
- - /* wait for the SMI register to become available */
- - for (i = 0; readl(smi_reg) & ETH_SMI_BUSY; i++) {
- - if (i == PHY_WAIT_ITERATIONS) {
- - printk("%s: PHY busy timeout\n", mp->dev->name);
- - goto out;
- - }
- - udelay(PHY_WAIT_MICRO_SECONDS);
- + cmd.port = PORT_MII;
- + cmd.transceiver = XCVR_INTERNAL;
- + cmd.phy_address = mp->phy_addr;
- + if (pd->speed == 0) {
- + cmd.autoneg = AUTONEG_ENABLE;
- + cmd.speed = SPEED_100;
- + cmd.advertising = ADVERTISED_10baseT_Half |
- + ADVERTISED_10baseT_Full |
- + ADVERTISED_100baseT_Half |
- + ADVERTISED_100baseT_Full;
- + if (mp->mii.supports_gmii)
- + cmd.advertising |= ADVERTISED_1000baseT_Full;
- + } else {
- + cmd.autoneg = AUTONEG_DISABLE;
- + cmd.speed = pd->speed;
- + cmd.duplex = pd->duplex;
- }
-
- - writel((phy_addr << 16) | (phy_reg << 21) | ETH_SMI_OPCODE_READ,
- - smi_reg);
- -
- - /* now wait for the data to be valid */
- - for (i = 0; !(readl(smi_reg) & ETH_SMI_READ_VALID); i++) {
- - if (i == PHY_WAIT_ITERATIONS) {
- - printk("%s: PHY read timeout\n", mp->dev->name);
- - goto out;
- - }
- - udelay(PHY_WAIT_MICRO_SECONDS);
- - }
- + update_pscr(mp, cmd.speed, cmd.duplex);
- + mv643xx_eth_set_settings(mp->dev, &cmd);
-
- - *value = readl(smi_reg) & 0xffff;
- -out:
- - spin_unlock_irqrestore(&mp->shared_smi->phy_lock, flags);
- + return 0;
- }
-
- -/*
- - * eth_port_write_smi_reg - Write to PHY registers
- - *
- - * DESCRIPTION:
- - * This routine utilize the SMI interface to interact with the PHY in
- - * order to perform writes to PHY registers.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port.
- - * unsigned int phy_reg PHY register address offset.
- - * unsigned int value Register value.
- - *
- - * OUTPUT:
- - * Write the given value to the specified PHY register.
- - *
- - * RETURN:
- - * false if the PHY is busy.
- - * true otherwise.
- - *
- - */
- -static void eth_port_write_smi_reg(struct mv643xx_private *mp,
- - unsigned int phy_reg, unsigned int value)
- +static int mv643xx_eth_probe(struct platform_device *pdev)
- {
- - void __iomem *smi_reg = mp->shared_smi->eth_base + SMI_REG;
- - int phy_addr = ethernet_phy_get(mp);
- - unsigned long flags;
- - int i;
- + struct mv643xx_eth_platform_data *pd;
- + struct mv643xx_eth_private *mp;
- + struct net_device *dev;
- + struct resource *res;
- + DECLARE_MAC_BUF(mac);
- + int err;
-
- - /* the SMI register is a shared resource */
- - spin_lock_irqsave(&mp->shared_smi->phy_lock, flags);
- + pd = pdev->dev.platform_data;
- + if (pd == NULL) {
- + dev_printk(KERN_ERR, &pdev->dev,
- + "no mv643xx_eth_platform_data\n");
- + return -ENODEV;
- + }
-
- - /* wait for the SMI register to become available */
- - for (i = 0; readl(smi_reg) & ETH_SMI_BUSY; i++) {
- - if (i == PHY_WAIT_ITERATIONS) {
- - printk("%s: PHY busy timeout\n", mp->dev->name);
- - goto out;
- - }
- - udelay(PHY_WAIT_MICRO_SECONDS);
- + if (pd->shared == NULL) {
- + dev_printk(KERN_ERR, &pdev->dev,
- + "no mv643xx_eth_platform_data->shared\n");
- + return -ENODEV;
- }
-
- - writel((phy_addr << 16) | (phy_reg << 21) |
- - ETH_SMI_OPCODE_WRITE | (value & 0xffff), smi_reg);
- -out:
- - spin_unlock_irqrestore(&mp->shared_smi->phy_lock, flags);
- -}
- + dev = alloc_etherdev(sizeof(struct mv643xx_eth_private));
- + if (!dev)
- + return -ENOMEM;
-
- -/*
- - * Wrappers for MII support library.
- - */
- -static int mv643xx_mdio_read(struct net_device *dev, int phy_id, int location)
- -{
- - struct mv643xx_private *mp = netdev_priv(dev);
- - int val;
- + mp = netdev_priv(dev);
- + platform_set_drvdata(pdev, mp);
-
- - eth_port_read_smi_reg(mp, location, &val);
- - return val;
- -}
- + mp->shared = platform_get_drvdata(pd->shared);
- + mp->port_num = pd->port_number;
-
- -static void mv643xx_mdio_write(struct net_device *dev, int phy_id, int location, int val)
- -{
- - struct mv643xx_private *mp = netdev_priv(dev);
- - eth_port_write_smi_reg(mp, location, val);
- -}
- + mp->dev = dev;
- +#ifdef MV643XX_ETH_NAPI
- + netif_napi_add(dev, &mp->napi, mv643xx_eth_poll, 64);
- +#endif
-
- -/*
- - * eth_port_receive - Get received information from Rx ring.
- - *
- - * DESCRIPTION:
- - * This routine returns the received data to the caller. There is no
- - * data copying during routine operation. All information is returned
- - * using pointer to packet information struct passed from the caller.
- - * If the routine exhausts Rx ring resources then the resource error flag
- - * is set.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port Control srtuct.
- - * struct pkt_info *p_pkt_info User packet buffer.
- - *
- - * OUTPUT:
- - * Rx ring current and used indexes are updated.
- - *
- - * RETURN:
- - * ETH_ERROR in case the routine can not access Rx desc ring.
- - * ETH_QUEUE_FULL if Rx ring resources are exhausted.
- - * ETH_END_OF_JOB if there is no received data.
- - * ETH_OK otherwise.
- - */
- -static ETH_FUNC_RET_STATUS eth_port_receive(struct mv643xx_private *mp,
- - struct pkt_info *p_pkt_info)
- -{
- - int rx_next_curr_desc, rx_curr_desc, rx_used_desc;
- - volatile struct eth_rx_desc *p_rx_desc;
- - unsigned int command_status;
- - unsigned long flags;
- + set_params(mp, pd);
-
- - /* Do not process Rx ring in case of Rx ring resource error */
- - if (mp->rx_resource_err)
- - return ETH_QUEUE_FULL;
- + spin_lock_init(&mp->lock);
-
- - spin_lock_irqsave(&mp->lock, flags);
- + mib_counters_clear(mp);
- + INIT_WORK(&mp->tx_timeout_task, tx_timeout_task);
-
- - /* Get the Rx Desc ring 'curr and 'used' indexes */
- - rx_curr_desc = mp->rx_curr_desc_q;
- - rx_used_desc = mp->rx_used_desc_q;
- -
- - p_rx_desc = &mp->p_rx_desc_area[rx_curr_desc];
- -
- - /* The following parameters are used to save readings from memory */
- - command_status = p_rx_desc->cmd_sts;
- - rmb();
- + if (mp->phy_addr != -1) {
- + err = phy_init(mp, pd);
- + if (err)
- + goto out;
-
- - /* Nothing to receive... */
- - if (command_status & (ETH_BUFFER_OWNED_BY_DMA)) {
- - spin_unlock_irqrestore(&mp->lock, flags);
- - return ETH_END_OF_JOB;
- + SET_ETHTOOL_OPS(dev, &mv643xx_eth_ethtool_ops);
- + } else {
- + SET_ETHTOOL_OPS(dev, &mv643xx_eth_ethtool_ops_phyless);
- }
-
- - p_pkt_info->byte_cnt = (p_rx_desc->byte_cnt) - RX_BUF_OFFSET;
- - p_pkt_info->cmd_sts = command_status;
- - p_pkt_info->buf_ptr = (p_rx_desc->buf_ptr) + RX_BUF_OFFSET;
- - p_pkt_info->return_info = mp->rx_skb[rx_curr_desc];
- - p_pkt_info->l4i_chk = p_rx_desc->buf_size;
- -
- - /*
- - * Clean the return info field to indicate that the
- - * packet has been moved to the upper layers
- - */
- - mp->rx_skb[rx_curr_desc] = NULL;
-
- - /* Update current index in data structure */
- - rx_next_curr_desc = (rx_curr_desc + 1) % mp->rx_ring_size;
- - mp->rx_curr_desc_q = rx_next_curr_desc;
- + res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- + BUG_ON(!res);
- + dev->irq = res->start;
-
- - /* Rx descriptors exhausted. Set the Rx ring resource error flag */
- - if (rx_next_curr_desc == rx_used_desc)
- - mp->rx_resource_err = 1;
- + dev->hard_start_xmit = mv643xx_eth_xmit;
- + dev->open = mv643xx_eth_open;
- + dev->stop = mv643xx_eth_stop;
- + dev->set_multicast_list = mv643xx_eth_set_rx_mode;
- + dev->set_mac_address = mv643xx_eth_set_mac_address;
- + dev->do_ioctl = mv643xx_eth_ioctl;
- + dev->change_mtu = mv643xx_eth_change_mtu;
- + dev->tx_timeout = mv643xx_eth_tx_timeout;
- +#ifdef CONFIG_NET_POLL_CONTROLLER
- + dev->poll_controller = mv643xx_eth_netpoll;
- +#endif
- + dev->watchdog_timeo = 2 * HZ;
- + dev->base_addr = 0;
-
- - spin_unlock_irqrestore(&mp->lock, flags);
- +#ifdef MV643XX_ETH_CHECKSUM_OFFLOAD_TX
- + /*
- + * Zero copy can only work if we use Discovery II memory. Else, we will
- + * have to map the buffers to ISA memory which is only 16 MB
- + */
- + dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
- +#endif
-
- - return ETH_OK;
- -}
- + SET_NETDEV_DEV(dev, &pdev->dev);
-
- -/*
- - * eth_rx_return_buff - Returns a Rx buffer back to the Rx ring.
- - *
- - * DESCRIPTION:
- - * This routine returns a Rx buffer back to the Rx ring. It retrieves the
- - * next 'used' descriptor and attached the returned buffer to it.
- - * In case the Rx ring was in "resource error" condition, where there are
- - * no available Rx resources, the function resets the resource error flag.
- - *
- - * INPUT:
- - * struct mv643xx_private *mp Ethernet Port Control srtuct.
- - * struct pkt_info *p_pkt_info Information on returned buffer.
- - *
- - * OUTPUT:
- - * New available Rx resource in Rx descriptor ring.
- - *
- - * RETURN:
- - * ETH_ERROR in case the routine can not access Rx desc ring.
- - * ETH_OK otherwise.
- - */
- -static ETH_FUNC_RET_STATUS eth_rx_return_buff(struct mv643xx_private *mp,
- - struct pkt_info *p_pkt_info)
- -{
- - int used_rx_desc; /* Where to return Rx resource */
- - volatile struct eth_rx_desc *p_used_rx_desc;
- - unsigned long flags;
- + if (mp->shared->win_protect)
- + wrl(mp, WINDOW_PROTECT(mp->port_num), mp->shared->win_protect);
-
- - spin_lock_irqsave(&mp->lock, flags);
- + err = register_netdev(dev);
- + if (err)
- + goto out;
-
- - /* Get 'used' Rx descriptor */
- - used_rx_desc = mp->rx_used_desc_q;
- - p_used_rx_desc = &mp->p_rx_desc_area[used_rx_desc];
- + dev_printk(KERN_NOTICE, &dev->dev, "port %d with MAC address %s\n",
- + mp->port_num, print_mac(mac, dev->dev_addr));
-
- - p_used_rx_desc->buf_ptr = p_pkt_info->buf_ptr;
- - p_used_rx_desc->buf_size = p_pkt_info->byte_cnt;
- - mp->rx_skb[used_rx_desc] = p_pkt_info->return_info;
- + if (dev->features & NETIF_F_SG)
- + dev_printk(KERN_NOTICE, &dev->dev, "scatter/gather enabled\n");
-
- - /* Flush the write pipe */
- + if (dev->features & NETIF_F_IP_CSUM)
- + dev_printk(KERN_NOTICE, &dev->dev, "tx checksum offload\n");
-
- - /* Return the descriptor to DMA ownership */
- - wmb();
- - p_used_rx_desc->cmd_sts =
- - ETH_BUFFER_OWNED_BY_DMA | ETH_RX_ENABLE_INTERRUPT;
- - wmb();
- +#ifdef MV643XX_ETH_NAPI
- + dev_printk(KERN_NOTICE, &dev->dev, "napi enabled\n");
- +#endif
-
- - /* Move the used descriptor pointer to the next descriptor */
- - mp->rx_used_desc_q = (used_rx_desc + 1) % mp->rx_ring_size;
- + if (mp->tx_desc_sram_size > 0)
- + dev_printk(KERN_NOTICE, &dev->dev, "configured with sram\n");
-
- - /* Any Rx return cancels the Rx resource error status */
- - mp->rx_resource_err = 0;
- + return 0;
-
- - spin_unlock_irqrestore(&mp->lock, flags);
- +out:
- + free_netdev(dev);
-
- - return ETH_OK;
- + return err;
- }
-
- -/************* Begin ethtool support *************************/
- -
- -struct mv643xx_stats {
- - char stat_string[ETH_GSTRING_LEN];
- - int sizeof_stat;
- - int stat_offset;
- -};
- -
- -#define MV643XX_STAT(m) FIELD_SIZEOF(struct mv643xx_private, m), \
- - offsetof(struct mv643xx_private, m)
- -
- -static const struct mv643xx_stats mv643xx_gstrings_stats[] = {
- - { "rx_packets", MV643XX_STAT(stats.rx_packets) },
- - { "tx_packets", MV643XX_STAT(stats.tx_packets) },
- - { "rx_bytes", MV643XX_STAT(stats.rx_bytes) },
- - { "tx_bytes", MV643XX_STAT(stats.tx_bytes) },
- - { "rx_errors", MV643XX_STAT(stats.rx_errors) },
- - { "tx_errors", MV643XX_STAT(stats.tx_errors) },
- - { "rx_dropped", MV643XX_STAT(stats.rx_dropped) },
- - { "tx_dropped", MV643XX_STAT(stats.tx_dropped) },
- - { "good_octets_received", MV643XX_STAT(mib_counters.good_octets_received) },
- - { "bad_octets_received", MV643XX_STAT(mib_counters.bad_octets_received) },
- - { "internal_mac_transmit_err", MV643XX_STAT(mib_counters.internal_mac_transmit_err) },
- - { "good_frames_received", MV643XX_STAT(mib_counters.good_frames_received) },
- - { "bad_frames_received", MV643XX_STAT(mib_counters.bad_frames_received) },
- - { "broadcast_frames_received", MV643XX_STAT(mib_counters.broadcast_frames_received) },
- - { "multicast_frames_received", MV643XX_STAT(mib_counters.multicast_frames_received) },
- - { "frames_64_octets", MV643XX_STAT(mib_counters.frames_64_octets) },
- - { "frames_65_to_127_octets", MV643XX_STAT(mib_counters.frames_65_to_127_octets) },
- - { "frames_128_to_255_octets", MV643XX_STAT(mib_counters.frames_128_to_255_octets) },
- - { "frames_256_to_511_octets", MV643XX_STAT(mib_counters.frames_256_to_511_octets) },
- - { "frames_512_to_1023_octets", MV643XX_STAT(mib_counters.frames_512_to_1023_octets) },
- - { "frames_1024_to_max_octets", MV643XX_STAT(mib_counters.frames_1024_to_max_octets) },
- - { "good_octets_sent", MV643XX_STAT(mib_counters.good_octets_sent) },
- - { "good_frames_sent", MV643XX_STAT(mib_counters.good_frames_sent) },
- - { "excessive_collision", MV643XX_STAT(mib_counters.excessive_collision) },
- - { "multicast_frames_sent", MV643XX_STAT(mib_counters.multicast_frames_sent) },
- - { "broadcast_frames_sent", MV643XX_STAT(mib_counters.broadcast_frames_sent) },
- - { "unrec_mac_control_received", MV643XX_STAT(mib_counters.unrec_mac_control_received) },
- - { "fc_sent", MV643XX_STAT(mib_counters.fc_sent) },
- - { "good_fc_received", MV643XX_STAT(mib_counters.good_fc_received) },
- - { "bad_fc_received", MV643XX_STAT(mib_counters.bad_fc_received) },
- - { "undersize_received", MV643XX_STAT(mib_counters.undersize_received) },
- - { "fragments_received", MV643XX_STAT(mib_counters.fragments_received) },
- - { "oversize_received", MV643XX_STAT(mib_counters.oversize_received) },
- - { "jabber_received", MV643XX_STAT(mib_counters.jabber_received) },
- - { "mac_receive_error", MV643XX_STAT(mib_counters.mac_receive_error) },
- - { "bad_crc_event", MV643XX_STAT(mib_counters.bad_crc_event) },
- - { "collision", MV643XX_STAT(mib_counters.collision) },
- - { "late_collision", MV643XX_STAT(mib_counters.late_collision) },
- -};
- +static int mv643xx_eth_remove(struct platform_device *pdev)
- +{
- + struct mv643xx_eth_private *mp = platform_get_drvdata(pdev);
-
- -#define MV643XX_STATS_LEN ARRAY_SIZE(mv643xx_gstrings_stats)
- + unregister_netdev(mp->dev);
- + flush_scheduled_work();
- + free_netdev(mp->dev);
-
- -static void mv643xx_get_drvinfo(struct net_device *netdev,
- - struct ethtool_drvinfo *drvinfo)
- -{
- - strncpy(drvinfo->driver, mv643xx_driver_name, 32);
- - strncpy(drvinfo->version, mv643xx_driver_version, 32);
- - strncpy(drvinfo->fw_version, "N/A", 32);
- - strncpy(drvinfo->bus_info, "mv643xx", 32);
- - drvinfo->n_stats = MV643XX_STATS_LEN;
- -}
- + platform_set_drvdata(pdev, NULL);
-
- -static int mv643xx_get_sset_count(struct net_device *netdev, int sset)
- -{
- - switch (sset) {
- - case ETH_SS_STATS:
- - return MV643XX_STATS_LEN;
- - default:
- - return -EOPNOTSUPP;
- - }
- + return 0;
- }
-
- -static void mv643xx_get_ethtool_stats(struct net_device *netdev,
- - struct ethtool_stats *stats, uint64_t *data)
- +static void mv643xx_eth_shutdown(struct platform_device *pdev)
- {
- - struct mv643xx_private *mp = netdev->priv;
- - int i;
- + struct mv643xx_eth_private *mp = platform_get_drvdata(pdev);
-
- - eth_update_mib_counters(mp);
- + /* Mask all interrupts on ethernet port */
- + wrl(mp, INT_MASK(mp->port_num), 0);
- + rdl(mp, INT_MASK(mp->port_num));
-
- - for (i = 0; i < MV643XX_STATS_LEN; i++) {
- - char *p = (char *)mp+mv643xx_gstrings_stats[i].stat_offset;
- - data[i] = (mv643xx_gstrings_stats[i].sizeof_stat ==
- - sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p;
- - }
- + if (netif_running(mp->dev))
- + port_reset(mp);
- }
-
- -static void mv643xx_get_strings(struct net_device *netdev, uint32_t stringset,
- - uint8_t *data)
- -{
- - int i;
- -
- - switch(stringset) {
- - case ETH_SS_STATS:
- - for (i=0; i < MV643XX_STATS_LEN; i++) {
- - memcpy(data + i * ETH_GSTRING_LEN,
- - mv643xx_gstrings_stats[i].stat_string,
- - ETH_GSTRING_LEN);
- - }
- - break;
- - }
- -}
- +static struct platform_driver mv643xx_eth_driver = {
- + .probe = mv643xx_eth_probe,
- + .remove = mv643xx_eth_remove,
- + .shutdown = mv643xx_eth_shutdown,
- + .driver = {
- + .name = MV643XX_ETH_NAME,
- + .owner = THIS_MODULE,
- + },
- +};
-
- -static u32 mv643xx_eth_get_link(struct net_device *dev)
- +static int __init mv643xx_eth_init_module(void)
- {
- - struct mv643xx_private *mp = netdev_priv(dev);
- -
- - return mii_link_ok(&mp->mii);
- -}
- + int rc;
-
- -static int mv643xx_eth_nway_restart(struct net_device *dev)
- -{
- - struct mv643xx_private *mp = netdev_priv(dev);
- + rc = platform_driver_register(&mv643xx_eth_shared_driver);
- + if (!rc) {
- + rc = platform_driver_register(&mv643xx_eth_driver);
- + if (rc)
- + platform_driver_unregister(&mv643xx_eth_shared_driver);
- + }
-
- - return mii_nway_restart(&mp->mii);
- + return rc;
- }
- +module_init(mv643xx_eth_init_module);
-
- -static int mv643xx_eth_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
- +static void __exit mv643xx_eth_cleanup_module(void)
- {
- - struct mv643xx_private *mp = netdev_priv(dev);
- -
- - return generic_mii_ioctl(&mp->mii, if_mii(ifr), cmd, NULL);
- + platform_driver_unregister(&mv643xx_eth_driver);
- + platform_driver_unregister(&mv643xx_eth_shared_driver);
- }
- +module_exit(mv643xx_eth_cleanup_module);
-
- -static const struct ethtool_ops mv643xx_ethtool_ops = {
- - .get_settings = mv643xx_get_settings,
- - .set_settings = mv643xx_set_settings,
- - .get_drvinfo = mv643xx_get_drvinfo,
- - .get_link = mv643xx_eth_get_link,
- - .set_sg = ethtool_op_set_sg,
- - .get_sset_count = mv643xx_get_sset_count,
- - .get_ethtool_stats = mv643xx_get_ethtool_stats,
- - .get_strings = mv643xx_get_strings,
- - .nway_reset = mv643xx_eth_nway_restart,
- -};
- -
- -/************* End ethtool support *************************/
- +MODULE_AUTHOR("Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, "
- + "Manish Lachwani, Dale Farnsworth and Lennert Buytenhek");
- +MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX");
- +MODULE_LICENSE("GPL");
- +MODULE_ALIAS("platform:" MV643XX_ETH_SHARED_NAME);
- +MODULE_ALIAS("platform:" MV643XX_ETH_NAME);
- --- /dev/null
- +++ b/include/asm-arm/arch-kirkwood/debug-macro.S
- @@ -0,0 +1,20 @@
- +/*
- + * include/asm-arm/arch-kirkwood/debug-macro.S
- + *
- + * This program is free software; you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License version 2 as
- + * published by the Free Software Foundation.
- +*/
- +
- +#include <asm/arch/kirkwood.h>
- +
- + .macro addruart,rx
- + mrc p15, 0, \rx, c1, c0
- + tst \rx, #1 @ MMU enabled?
- + ldreq \rx, =KIRKWOOD_REGS_PHYS_BASE
- + ldrne \rx, =KIRKWOOD_REGS_VIRT_BASE
- + orr \rx, \rx, #0x00012000
- + .endm
- +
- +#define UART_SHIFT 2
- +#include <asm/hardware/debug-8250.S>
- --- /dev/null
- +++ b/include/asm-arm/arch-kirkwood/dma.h
- @@ -0,0 +1 @@
- +/* empty */
- --- /dev/null
- +++ b/include/asm-arm/arch-kirkwood/entry-macro.S
- @@ -0,0 +1,40 @@
- +/*
- + * include/asm-arm/arch-kirkwood/entry-macro.S
- + *
- + * Low-level IRQ helper macros for Marvell Kirkwood platforms
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <asm/arch/kirkwood.h>
- +
- + .macro disable_fiq
- + .endm
- +
- + .macro arch_ret_to_user, tmp1, tmp2
- + .endm
- +
- + .macro get_irqnr_preamble, base, tmp
- + ldr \base, =IRQ_VIRT_BASE
- + .endm
- +
- + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
- + @ check low interrupts
- + ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
- + ldr \tmp, [\base, #IRQ_MASK_LOW_OFF]
- + mov \irqnr, #31
- + ands \irqstat, \irqstat, \tmp
- + bne 1001f
- +
- + @ if no low interrupts set, check high interrupts
- + ldr \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
- + ldr \tmp, [\base, #IRQ_MASK_HIGH_OFF]
- + mov \irqnr, #63
- + ands \irqstat, \irqstat, \tmp
- +
- + @ find first active interrupt source
- +1001: clzne \irqstat, \irqstat
- + subne \irqnr, \irqnr, \irqstat
- + .endm
- --- /dev/null
- +++ b/include/asm-arm/arch-kirkwood/hardware.h
- @@ -0,0 +1,21 @@
- +/*
- + * include/asm-arm/arch-kirkwood/hardware.h
- + *
- + * This program is free software; you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License version 2 as
- + * published by the Free Software Foundation.
- + */
- +
- +#ifndef __ASM_ARCH_HARDWARE_H
- +#define __ASM_ARCH_HARDWARE_H
- +
- +#include "kirkwood.h"
- +
- +#define pcibios_assign_all_busses() 1
- +
- +#define PCIBIOS_MIN_IO 0x00001000
- +#define PCIBIOS_MIN_MEM 0x01000000
- +#define PCIMEM_BASE KIRKWOOD_PCIE_MEM_PHYS_BASE /* mem base for VGA */
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-kirkwood/io.h
- @@ -0,0 +1,26 @@
- +/*
- + * include/asm-arm/arch-kirkwood/io.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_IO_H
- +#define __ASM_ARCH_IO_H
- +
- +#include "kirkwood.h"
- +
- +#define IO_SPACE_LIMIT 0xffffffff
- +
- +static inline void __iomem *__io(unsigned long addr)
- +{
- + return (void __iomem *)((addr - KIRKWOOD_PCIE_IO_PHYS_BASE)
- + + KIRKWOOD_PCIE_IO_VIRT_BASE);
- +}
- +
- +#define __io(a) __io(a)
- +#define __mem_pci(a) (a)
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-kirkwood/irqs.h
- @@ -0,0 +1,63 @@
- +/*
- + * include/asm-arm/arch-kirkwood/irqs.h
- + *
- + * IRQ definitions for Marvell Kirkwood SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_IRQS_H
- +#define __ASM_ARCH_IRQS_H
- +
- +#include "kirkwood.h" /* need GPIO_MAX */
- +
- +/*
- + * Low Interrupt Controller
- + */
- +#define IRQ_KIRKWOOD_HIGH_SUM 0
- +#define IRQ_KIRKWOOD_BRIDGE 1
- +#define IRQ_KIRKWOOD_HOST2CPU 2
- +#define IRQ_KIRKWOOD_CPU2HOST 3
- +#define IRQ_KIRKWOOD_XOR_00 5
- +#define IRQ_KIRKWOOD_XOR_01 6
- +#define IRQ_KIRKWOOD_XOR_10 7
- +#define IRQ_KIRKWOOD_XOR_11 8
- +#define IRQ_KIRKWOOD_PCIE 9
- +#define IRQ_KIRKWOOD_GE00_SUM 11
- +#define IRQ_KIRKWOOD_GE01_SUM 15
- +#define IRQ_KIRKWOOD_USB 19
- +#define IRQ_KIRKWOOD_SATA 21
- +#define IRQ_KIRKWOOD_CRYPTO 22
- +#define IRQ_KIRKWOOD_SPI 23
- +#define IRQ_KIRKWOOD_I2S 24
- +#define IRQ_KIRKWOOD_TS_0 26
- +#define IRQ_KIRKWOOD_SDIO 28
- +#define IRQ_KIRKWOOD_TWSI 29
- +#define IRQ_KIRKWOOD_AVB 30
- +#define IRQ_KIRKWOOD_TDMI 31
- +
- +/*
- + * High Interrupt Controller
- + */
- +#define IRQ_KIRKWOOD_UART_0 33
- +#define IRQ_KIRKWOOD_UART_1 34
- +#define IRQ_KIRKWOOD_GPIO_LOW_0_7 35
- +#define IRQ_KIRKWOOD_GPIO_LOW_8_15 36
- +#define IRQ_KIRKWOOD_GPIO_LOW_16_23 37
- +#define IRQ_KIRKWOOD_GPIO_LOW_24_31 38
- +#define IRQ_KIRKWOOD_GPIO_HIGH_0_7 39
- +#define IRQ_KIRKWOOD_GPIO_HIGH_8_15 40
- +#define IRQ_KIRKWOOD_GPIO_HIGH_16_23 41
- +
- +/*
- + * KIRKWOOD General Purpose Pins
- + */
- +#define IRQ_KIRKWOOD_GPIO_START 64
- +#define NR_GPIO_IRQS GPIO_MAX
- +
- +#define NR_IRQS (IRQ_KIRKWOOD_GPIO_START + NR_GPIO_IRQS)
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-kirkwood/kirkwood.h
- @@ -0,0 +1,99 @@
- +/*
- + * include/asm-arm/arch-kirkwood/kirkwood.h
- + *
- + * Generic definitions for Marvell Kirkwood SoC flavors:
- + * 88F6180, 88F6192 and 88F6281.
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_KIRKWOOD_H
- +#define __ASM_ARCH_KIRKWOOD_H
- +
- +/*
- + * Marvell Kirkwood address maps.
- + *
- + * phys
- + * e0000000 PCIe Memory space
- + * f1000000 on-chip peripheral registers
- + * f2000000 PCIe I/O space
- + * f3000000 NAND controller address window
- + *
- + * virt phys size
- + * fee00000 f1000000 1M on-chip peripheral registers
- + * fef00000 f2000000 1M PCIe I/O space
- + */
- +
- +#define KIRKWOOD_NAND_MEM_PHYS_BASE 0xf3000000
- +#define KIRKWOOD_NAND_MEM_SIZE SZ_64K /* 1K is sufficient, but 64K
- + * is the minimal window size
- + */
- +
- +#define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000
- +#define KIRKWOOD_PCIE_IO_VIRT_BASE 0xfef00000
- +#define KIRKWOOD_PCIE_IO_BUS_BASE 0x00000000
- +#define KIRKWOOD_PCIE_IO_SIZE SZ_1M
- +
- +#define KIRKWOOD_REGS_PHYS_BASE 0xf1000000
- +#define KIRKWOOD_REGS_VIRT_BASE 0xfee00000
- +#define KIRKWOOD_REGS_SIZE SZ_1M
- +
- +#define KIRKWOOD_PCIE_MEM_PHYS_BASE 0xe0000000
- +#define KIRKWOOD_PCIE_MEM_SIZE SZ_128M
- +
- +/*
- + * MBUS bridge registers.
- + */
- +#define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000)
- +#define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104)
- +#define CPU_RESET 0x00000002
- +//#define L2_WRITETHROUGH 0x00020000
- +#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
- +#define SOFT_RESET_OUT_EN 0x00000004
- +#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
- +#define SOFT_RESET 0x00000001
- +#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
- +#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
- +#define BRIDGE_INT_TIMER0 0x0002
- +#define BRIDGE_INT_TIMER1 0x0004
- +#define BRIDGE_INT_TIMER1_CLR (~0x0004)
- +#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
- +#define IRQ_CAUSE_LOW_OFF 0x0000
- +#define IRQ_MASK_LOW_OFF 0x0004
- +#define IRQ_CAUSE_HIGH_OFF 0x0010
- +#define IRQ_MASK_HIGH_OFF 0x0014
- +#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
- +
- +/*
- + * Register Map
- + */
- +#define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x00000)
- +#define DDR_WINDOW_CPU_BASE (DDR_VIRT_BASE | 0x1500)
- +
- +#define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x10000)
- +#define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x10000)
- +#define SAMPLE_AT_RESET (DEV_BUS_VIRT_BASE | 0x0030)
- +#define DEVICE_ID (DEV_BUS_VIRT_BASE | 0x0034)
- +#define RTC_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0300)
- +#define SPI_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0600)
- +#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
- +#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
- +#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
- +#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
- +
- +#define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x40000)
- +
- +#define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x50000)
- +
- +#define GE00_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x70000)
- +#define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x74000)
- +
- +#define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000)
- +
- +
- +#define GPIO_MAX 50
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-kirkwood/memory.h
- @@ -0,0 +1,14 @@
- +/*
- + * include/asm-arm/arch-kirkwood/memory.h
- + */
- +
- +#ifndef __ASM_ARCH_MEMORY_H
- +#define __ASM_ARCH_MEMORY_H
- +
- +#define PHYS_OFFSET UL(0x00000000)
- +
- +#define __virt_to_bus(x) __virt_to_phys(x)
- +#define __bus_to_virt(x) __phys_to_virt(x)
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-kirkwood/system.h
- @@ -0,0 +1,37 @@
- +/*
- + * include/asm-arm/arch-kirkwood/system.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_SYSTEM_H
- +#define __ASM_ARCH_SYSTEM_H
- +
- +#include <asm/arch/hardware.h>
- +#include <asm/arch/kirkwood.h>
- +
- +static inline void arch_idle(void)
- +{
- + cpu_do_idle();
- +}
- +
- +static inline void arch_reset(char mode)
- +{
- + /*
- + * Enable soft reset to assert RSTOUTn.
- + */
- + writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
- +
- + /*
- + * Assert soft reset.
- + */
- + writel(SOFT_RESET, SYSTEM_SOFT_RESET);
- +
- + while (1)
- + ;
- +}
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-kirkwood/timex.h
- @@ -0,0 +1,11 @@
- +/*
- + * include/asm-arm/arch-kirkwood/timex.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#define CLOCK_TICK_RATE (100 * HZ)
- +
- +#define KIRKWOOD_TCLK 166666667
- --- /dev/null
- +++ b/include/asm-arm/arch-kirkwood/uncompress.h
- @@ -0,0 +1,47 @@
- +/*
- + * include/asm-arm/arch-kirkwood/uncompress.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/serial_reg.h>
- +#include <asm/arch/kirkwood.h>
- +
- +#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
- +
- +static void putc(const char c)
- +{
- + unsigned char *base = SERIAL_BASE;
- + int i;
- +
- + for (i = 0; i < 0x1000; i++) {
- + if (base[UART_LSR << 2] & UART_LSR_THRE)
- + break;
- + barrier();
- + }
- +
- + base[UART_TX << 2] = c;
- +}
- +
- +static void flush(void)
- +{
- + unsigned char *base = SERIAL_BASE;
- + unsigned char mask;
- + int i;
- +
- + mask = UART_LSR_TEMT | UART_LSR_THRE;
- +
- + for (i = 0; i < 0x1000; i++) {
- + if ((base[UART_LSR << 2] & mask) == mask)
- + break;
- + barrier();
- + }
- +}
- +
- +/*
- + * nothing to do
- + */
- +#define arch_decomp_setup()
- +#define arch_decomp_wdog()
- --- /dev/null
- +++ b/include/asm-arm/arch-kirkwood/vmalloc.h
- @@ -0,0 +1,5 @@
- +/*
- + * include/asm-arm/arch-kirkwood/vmalloc.h
- + */
- +
- +#define VMALLOC_END 0xfe800000
- --- /dev/null
- +++ b/include/asm-arm/arch-loki/debug-macro.S
- @@ -0,0 +1,20 @@
- +/*
- + * include/asm-arm/arch-loki/debug-macro.S
- + *
- + * This program is free software; you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License version 2 as
- + * published by the Free Software Foundation.
- +*/
- +
- +#include <asm/arch/loki.h>
- +
- + .macro addruart,rx
- + mrc p15, 0, \rx, c1, c0
- + tst \rx, #1 @ MMU enabled?
- + ldreq \rx, =LOKI_REGS_PHYS_BASE
- + ldrne \rx, =LOKI_REGS_VIRT_BASE
- + orr \rx, \rx, #0x00012000
- + .endm
- +
- +#define UART_SHIFT 2
- +#include <asm/hardware/debug-8250.S>
- --- /dev/null
- +++ b/include/asm-arm/arch-loki/dma.h
- @@ -0,0 +1 @@
- +/* empty */
- --- /dev/null
- +++ b/include/asm-arm/arch-loki/entry-macro.S
- @@ -0,0 +1,30 @@
- +/*
- + * include/asm-arm/arch-loki/entry-macro.S
- + *
- + * Low-level IRQ helper macros for Marvell Loki (88RC8480) platforms
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <asm/arch/loki.h>
- +
- + .macro disable_fiq
- + .endm
- +
- + .macro arch_ret_to_user, tmp1, tmp2
- + .endm
- +
- + .macro get_irqnr_preamble, base, tmp
- + ldr \base, =IRQ_VIRT_BASE
- + .endm
- +
- + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
- + ldr \irqstat, [\base, #IRQ_CAUSE_OFF]
- + ldr \tmp, [\base, #IRQ_MASK_OFF]
- + mov \irqnr, #0
- + ands \irqstat, \irqstat, \tmp
- + clzne \irqnr, \irqstat
- + rsbne \irqnr, \irqnr, #31
- + .endm
- --- /dev/null
- +++ b/include/asm-arm/arch-loki/hardware.h
- @@ -0,0 +1,15 @@
- +/*
- + * include/asm-arm/arch-loki/hardware.h
- + *
- + * This program is free software; you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License version 2 as
- + * published by the Free Software Foundation.
- + */
- +
- +#ifndef __ASM_ARCH_HARDWARE_H
- +#define __ASM_ARCH_HARDWARE_H
- +
- +#include "loki.h"
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-loki/io.h
- @@ -0,0 +1,26 @@
- +/*
- + * include/asm-arm/arch-loki/io.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_IO_H
- +#define __ASM_ARCH_IO_H
- +
- +#include "loki.h"
- +
- +#define IO_SPACE_LIMIT 0xffffffff
- +
- +static inline void __iomem *__io(unsigned long addr)
- +{
- + return (void __iomem *)((addr - LOKI_PCIE0_IO_PHYS_BASE)
- + + LOKI_PCIE0_IO_VIRT_BASE);
- +}
- +
- +#define __io(a) __io(a)
- +#define __mem_pci(a) (a)
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-loki/irqs.h
- @@ -0,0 +1,58 @@
- +/*
- + * include/asm-arm/arch-loki/irqs.h
- + *
- + * IRQ definitions for Marvell Loki (88RC8480) SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_IRQS_H
- +#define __ASM_ARCH_IRQS_H
- +
- +#include "loki.h" /* need GPIO_MAX */
- +
- +/*
- + * Interrupt Controller
- + */
- +#define IRQ_LOKI_PCIE_A_CPU_DRBL 0
- +#define IRQ_LOKI_CPU_PCIE_A_DRBL 1
- +#define IRQ_LOKI_PCIE_B_CPU_DRBL 2
- +#define IRQ_LOKI_CPU_PCIE_B_DRBL 3
- +#define IRQ_LOKI_COM_A_ERR 6
- +#define IRQ_LOKI_COM_A_IN 7
- +#define IRQ_LOKI_COM_A_OUT 8
- +#define IRQ_LOKI_COM_B_ERR 9
- +#define IRQ_LOKI_COM_B_IN 10
- +#define IRQ_LOKI_COM_B_OUT 11
- +#define IRQ_LOKI_DMA_A 12
- +#define IRQ_LOKI_DMA_B 13
- +#define IRQ_LOKI_SAS_A 14
- +#define IRQ_LOKI_SAS_B 15
- +#define IRQ_LOKI_DDR 16
- +#define IRQ_LOKI_XOR 17
- +#define IRQ_LOKI_BRIDGE 18
- +#define IRQ_LOKI_PCIE_A_ERR 20
- +#define IRQ_LOKI_PCIE_A_INT 21
- +#define IRQ_LOKI_PCIE_B_ERR 22
- +#define IRQ_LOKI_PCIE_B_INT 23
- +#define IRQ_LOKI_GBE_A_INT 24
- +#define IRQ_LOKI_GBE_B_INT 25
- +#define IRQ_LOKI_DEV_ERR 26
- +#define IRQ_LOKI_UART0 27
- +#define IRQ_LOKI_UART1 28
- +#define IRQ_LOKI_TWSI 29
- +#define IRQ_LOKI_GPIO_23_0 30
- +#define IRQ_LOKI_GPIO_25_24 31
- +
- +/*
- + * Loki General Purpose Pins
- + */
- +#define IRQ_LOKI_GPIO_START 32
- +#define NR_GPIO_IRQS GPIO_MAX
- +
- +#define NR_IRQS (IRQ_LOKI_GPIO_START + NR_GPIO_IRQS)
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-loki/loki.h
- @@ -0,0 +1,97 @@
- +/*
- + * include/asm-arm/arch-loki/loki.h
- + *
- + * Generic definitions for Marvell Loki (88RC8480) SoC flavors
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_LOKI_H
- +#define __ASM_ARCH_LOKI_H
- +
- +/*
- + * Marvell Loki (88RC8480) address maps.
- + *
- + * phys
- + * d0000000 on-chip peripheral registers
- + * e0000000 PCIe 0 Memory space
- + * e8000000 PCIe 1 Memory space
- + * f0000000 PCIe 0 I/O space
- + * f0100000 PCIe 1 I/O space
- + *
- + * virt phys size
- + * fed00000 d0000000 1M on-chip peripheral registers
- + * fee00000 f0000000 64K PCIe 0 I/O space
- + * fef00000 f0100000 64K PCIe 1 I/O space
- + */
- +
- +#define LOKI_REGS_PHYS_BASE 0xd0000000
- +#define LOKI_REGS_VIRT_BASE 0xfed00000
- +#define LOKI_REGS_SIZE SZ_1M
- +
- +#define LOKI_PCIE0_IO_PHYS_BASE 0xf0000000
- +#define LOKI_PCIE0_IO_VIRT_BASE 0xfee00000
- +#define LOKI_PCIE0_IO_BUS_BASE 0x00000000
- +#define LOKI_PCIE0_IO_SIZE SZ_64K
- +
- +#define LOKI_PCIE1_IO_PHYS_BASE 0xf0100000
- +#define LOKI_PCIE1_IO_VIRT_BASE 0xfef00000
- +#define LOKI_PCIE1_IO_BUS_BASE 0x00000000
- +#define LOKI_PCIE1_IO_SIZE SZ_64K
- +
- +#define LOKI_PCIE0_MEM_PHYS_BASE 0xe0000000
- +#define LOKI_PCIE0_MEM_SIZE SZ_128M
- +
- +#define LOKI_PCIE1_MEM_PHYS_BASE 0xe8000000
- +#define LOKI_PCIE1_MEM_SIZE SZ_128M
- +
- +/*
- + * Register Map
- + */
- +#define DEV_BUS_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x10000)
- +#define DEV_BUS_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x10000)
- +#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
- +#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
- +#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
- +#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
- +
- +#define BRIDGE_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x20000)
- +#define BRIDGE_REG(x) (BRIDGE_VIRT_BASE | (x))
- +#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
- +#define SOFT_RESET_OUT_EN 0x00000004
- +#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
- +#define SOFT_RESET 0x00000001
- +#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
- +#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
- +#define BRIDGE_INT_TIMER0 0x0002
- +#define BRIDGE_INT_TIMER1 0x0004
- +#define BRIDGE_INT_TIMER1_CLR 0x0004
- +#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
- +#define IRQ_CAUSE_OFF 0x0000
- +#define IRQ_MASK_OFF 0x0004
- +#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
- +
- +#define PCIE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x30000)
- +
- +#define PCIE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x40000)
- +
- +#define SAS0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x80000)
- +
- +#define SAS1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x90000)
- +
- +#define GE0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xa0000)
- +#define GE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xa0000)
- +
- +#define GE1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xb0000)
- +#define GE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xb0000)
- +
- +#define DDR_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xf0000)
- +#define DDR_REG(x) (DDR_VIRT_BASE | (x))
- +
- +
- +#define GPIO_MAX 8
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-loki/memory.h
- @@ -0,0 +1,14 @@
- +/*
- + * include/asm-arm/arch-loki/memory.h
- + */
- +
- +#ifndef __ASM_ARCH_MEMORY_H
- +#define __ASM_ARCH_MEMORY_H
- +
- +#define PHYS_OFFSET UL(0x00000000)
- +
- +#define __virt_to_bus(x) __virt_to_phys(x)
- +#define __bus_to_virt(x) __phys_to_virt(x)
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-loki/system.h
- @@ -0,0 +1,37 @@
- +/*
- + * include/asm-arm/arch-loki/system.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_SYSTEM_H
- +#define __ASM_ARCH_SYSTEM_H
- +
- +#include <asm/arch/hardware.h>
- +#include <asm/arch/loki.h>
- +
- +static inline void arch_idle(void)
- +{
- + cpu_do_idle();
- +}
- +
- +static inline void arch_reset(char mode)
- +{
- + /*
- + * Enable soft reset to assert RSTOUTn.
- + */
- + writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
- +
- + /*
- + * Assert soft reset.
- + */
- + writel(SOFT_RESET, SYSTEM_SOFT_RESET);
- +
- + while (1)
- + ;
- +}
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-loki/timex.h
- @@ -0,0 +1,11 @@
- +/*
- + * include/asm-arm/arch-loki/timex.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#define CLOCK_TICK_RATE (100 * HZ)
- +
- +#define LOKI_TCLK 180000000
- --- /dev/null
- +++ b/include/asm-arm/arch-loki/uncompress.h
- @@ -0,0 +1,47 @@
- +/*
- + * include/asm-arm/arch-loki/uncompress.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/serial_reg.h>
- +#include <asm/arch/loki.h>
- +
- +#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
- +
- +static void putc(const char c)
- +{
- + unsigned char *base = SERIAL_BASE;
- + int i;
- +
- + for (i = 0; i < 0x1000; i++) {
- + if (base[UART_LSR << 2] & UART_LSR_THRE)
- + break;
- + barrier();
- + }
- +
- + base[UART_TX << 2] = c;
- +}
- +
- +static void flush(void)
- +{
- + unsigned char *base = SERIAL_BASE;
- + unsigned char mask;
- + int i;
- +
- + mask = UART_LSR_TEMT | UART_LSR_THRE;
- +
- + for (i = 0; i < 0x1000; i++) {
- + if ((base[UART_LSR << 2] & mask) == mask)
- + break;
- + barrier();
- + }
- +}
- +
- +/*
- + * nothing to do
- + */
- +#define arch_decomp_setup()
- +#define arch_decomp_wdog()
- --- /dev/null
- +++ b/include/asm-arm/arch-loki/vmalloc.h
- @@ -0,0 +1,5 @@
- +/*
- + * include/asm-arm/arch-loki/vmalloc.h
- + */
- +
- +#define VMALLOC_END 0xfe800000
- --- /dev/null
- +++ b/include/asm-arm/arch-mv78xx0/debug-macro.S
- @@ -0,0 +1,20 @@
- +/*
- + * include/asm-arm/arch-mv78xx0/debug-macro.S
- + *
- + * This program is free software; you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License version 2 as
- + * published by the Free Software Foundation.
- +*/
- +
- +#include <asm/arch/mv78xx0.h>
- +
- + .macro addruart,rx
- + mrc p15, 0, \rx, c1, c0
- + tst \rx, #1 @ MMU enabled?
- + ldreq \rx, =MV78XX0_REGS_PHYS_BASE
- + ldrne \rx, =MV78XX0_REGS_VIRT_BASE
- + orr \rx, \rx, #0x00012000
- + .endm
- +
- +#define UART_SHIFT 2
- +#include <asm/hardware/debug-8250.S>
- --- /dev/null
- +++ b/include/asm-arm/arch-mv78xx0/dma.h
- @@ -0,0 +1 @@
- +/* empty */
- --- /dev/null
- +++ b/include/asm-arm/arch-mv78xx0/entry-macro.S
- @@ -0,0 +1,39 @@
- +/*
- + * include/asm-arm/arch-mv78xx0/entry-macro.S
- + *
- + * Low-level IRQ helper macros for Marvell MV78xx0 platforms
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <asm/arch/mv78xx0.h>
- +
- + .macro disable_fiq
- + .endm
- +
- + .macro arch_ret_to_user, tmp1, tmp2
- + .endm
- +
- + .macro get_irqnr_preamble, base, tmp
- + ldr \base, =IRQ_VIRT_BASE
- + .endm
- +
- + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
- + @ check low interrupts
- + ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
- + ldr \tmp, [\base, #IRQ_MASK_LOW_OFF]
- + mov \irqnr, #31
- + ands \irqstat, \irqstat, \tmp
- +
- + @ if no low interrupts set, check high interrupts
- + ldreq \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
- + ldreq \tmp, [\base, #IRQ_MASK_HIGH_OFF]
- + moveq \irqnr, #63
- + andeqs \irqstat, \irqstat, \tmp
- +
- + @ find first active interrupt source
- + clzne \irqstat, \irqstat
- + subne \irqnr, \irqnr, \irqstat
- + .endm
- --- /dev/null
- +++ b/include/asm-arm/arch-mv78xx0/hardware.h
- @@ -0,0 +1,21 @@
- +/*
- + * include/asm-arm/arch-mv78xx0/hardware.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_HARDWARE_H
- +#define __ASM_ARCH_HARDWARE_H
- +
- +#include "mv78xx0.h"
- +
- +#define pcibios_assign_all_busses() 1
- +
- +#define PCIBIOS_MIN_IO 0x00001000
- +#define PCIBIOS_MIN_MEM 0x01000000
- +#define PCIMEM_BASE MV78XX0_PCIE_MEM_PHYS_BASE /* mem base for VGA */
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-mv78xx0/io.h
- @@ -0,0 +1,26 @@
- +/*
- + * include/asm-arm/arch-mv78xx0/io.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_IO_H
- +#define __ASM_ARCH_IO_H
- +
- +#include "mv78xx0.h"
- +
- +#define IO_SPACE_LIMIT 0xffffffff
- +
- +static inline void __iomem *__io(unsigned long addr)
- +{
- + return (void __iomem *)((addr - MV78XX0_PCIE_IO_PHYS_BASE(0))
- + + MV78XX0_PCIE_IO_VIRT_BASE(0));
- +}
- +
- +#define __io(a) __io(a)
- +#define __mem_pci(a) (a)
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-mv78xx0/irqs.h
- @@ -0,0 +1,91 @@
- +/*
- + * include/asm-arm/arch-mv78xx0/irqs.h
- + *
- + * IRQ definitions for Marvell MV78xx0 SoCs
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_IRQS_H
- +#define __ASM_ARCH_IRQS_H
- +
- +#include "mv78xx0.h" /* need GPIO_MAX */
- +
- +/*
- + * MV78xx0 Low Interrupt Controller
- + */
- +#define IRQ_MV78XX0_ERR 0
- +#define IRQ_MV78XX0_SPI 1
- +#define IRQ_MV78XX0_I2C_0 2
- +#define IRQ_MV78XX0_I2C_1 3
- +#define IRQ_MV78XX0_IDMA_0 4
- +#define IRQ_MV78XX0_IDMA_1 5
- +#define IRQ_MV78XX0_IDMA_2 6
- +#define IRQ_MV78XX0_IDMA_3 7
- +#define IRQ_MV78XX0_TIMER_0 8
- +#define IRQ_MV78XX0_TIMER_1 9
- +#define IRQ_MV78XX0_TIMER_2 10
- +#define IRQ_MV78XX0_TIMER_3 11
- +#define IRQ_MV78XX0_UART_0 12
- +#define IRQ_MV78XX0_UART_1 13
- +#define IRQ_MV78XX0_UART_2 14
- +#define IRQ_MV78XX0_UART_3 15
- +#define IRQ_MV78XX0_USB_0 16
- +#define IRQ_MV78XX0_USB_1 17
- +#define IRQ_MV78XX0_USB_2 18
- +#define IRQ_MV78XX0_CRYPTO 19
- +#define IRQ_MV78XX0_SDIO_0 20
- +#define IRQ_MV78XX0_SDIO_1 21
- +#define IRQ_MV78XX0_XOR_0 22
- +#define IRQ_MV78XX0_XOR_1 23
- +#define IRQ_MV78XX0_I2S_0 24
- +#define IRQ_MV78XX0_I2S_1 25
- +#define IRQ_MV78XX0_SATA 26
- +#define IRQ_MV78XX0_TDMI 27
- +
- +/*
- + * MV78xx0 High Interrupt Controller
- + */
- +#define IRQ_MV78XX0_PCIE_00 32
- +#define IRQ_MV78XX0_PCIE_01 33
- +#define IRQ_MV78XX0_PCIE_02 34
- +#define IRQ_MV78XX0_PCIE_03 35
- +#define IRQ_MV78XX0_PCIE_10 36
- +#define IRQ_MV78XX0_PCIE_11 37
- +#define IRQ_MV78XX0_PCIE_12 38
- +#define IRQ_MV78XX0_PCIE_13 39
- +#define IRQ_MV78XX0_GE00_SUM 40
- +#define IRQ_MV78XX0_GE00_RX 41
- +#define IRQ_MV78XX0_GE00_TX 42
- +#define IRQ_MV78XX0_GE00_MISC 43
- +#define IRQ_MV78XX0_GE01_SUM 44
- +#define IRQ_MV78XX0_GE01_RX 45
- +#define IRQ_MV78XX0_GE01_TX 46
- +#define IRQ_MV78XX0_GE01_MISC 47
- +#define IRQ_MV78XX0_GE10_SUM 48
- +#define IRQ_MV78XX0_GE10_RX 49
- +#define IRQ_MV78XX0_GE10_TX 50
- +#define IRQ_MV78XX0_GE10_MISC 51
- +#define IRQ_MV78XX0_GE11_SUM 52
- +#define IRQ_MV78XX0_GE11_RX 53
- +#define IRQ_MV78XX0_GE11_TX 54
- +#define IRQ_MV78XX0_GE11_MISC 55
- +#define IRQ_MV78XX0_GPIO_0_7 56
- +#define IRQ_MV78XX0_GPIO_8_15 57
- +#define IRQ_MV78XX0_GPIO_16_23 58
- +#define IRQ_MV78XX0_GPIO_24_31 59
- +#define IRQ_MV78XX0_DB_IN 60
- +#define IRQ_MV78XX0_DB_OUT 61
- +
- +/*
- + * MV78XX0 General Purpose Pins
- + */
- +#define IRQ_MV78XX0_GPIO_START 64
- +#define NR_GPIO_IRQS GPIO_MAX
- +
- +#define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS)
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-mv78xx0/memory.h
- @@ -0,0 +1,14 @@
- +/*
- + * include/asm-arm/arch-mv78xx0/memory.h
- + */
- +
- +#ifndef __ASM_ARCH_MEMORY_H
- +#define __ASM_ARCH_MEMORY_H
- +
- +#define PHYS_OFFSET UL(0x00000000)
- +
- +#define __virt_to_bus(x) __virt_to_phys(x)
- +#define __bus_to_virt(x) __phys_to_virt(x)
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-mv78xx0/mv78xx0.h
- @@ -0,0 +1,126 @@
- +/*
- + * include/asm-arm/arch-mv78xx0/mv78xx0.h
- + *
- + * Generic definitions for Marvell MV78xx0 SoC flavors:
- + * MV781x0 and MV782x0.
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_MV78XX0_H
- +#define __ASM_ARCH_MV78XX0_H
- +
- +/*
- + * Marvell MV78xx0 address maps.
- + *
- + * phys
- + * c0000000 PCIe Memory space
- + * f0800000 PCIe #0 I/O space
- + * f0900000 PCIe #1 I/O space
- + * f0a00000 PCIe #2 I/O space
- + * f0b00000 PCIe #3 I/O space
- + * f0c00000 PCIe #4 I/O space
- + * f0d00000 PCIe #5 I/O space
- + * f0e00000 PCIe #6 I/O space
- + * f0f00000 PCIe #7 I/O space
- + * f1000000 on-chip peripheral registers
- + *
- + * virt phys size
- + * fe400000 f102x000 16K core-specific peripheral registers
- + * fe700000 f0800000 1M PCIe #0 I/O space
- + * fe800000 f0900000 1M PCIe #1 I/O space
- + * fe900000 f0a00000 1M PCIe #2 I/O space
- + * fea00000 f0b00000 1M PCIe #3 I/O space
- + * feb00000 f0c00000 1M PCIe #4 I/O space
- + * fec00000 f0d00000 1M PCIe #5 I/O space
- + * fed00000 f0e00000 1M PCIe #6 I/O space
- + * fee00000 f0f00000 1M PCIe #7 I/O space
- + * fef00000 f1000000 1M on-chip peripheral registers
- + */
- +#define MV78XX0_CORE0_REGS_PHYS_BASE 0xf1020000
- +#define MV78XX0_CORE1_REGS_PHYS_BASE 0xf1024000
- +#define MV78XX0_CORE_REGS_VIRT_BASE 0xfe400000
- +#define MV78XX0_CORE_REGS_SIZE SZ_16K
- +
- +#define MV78XX0_PCIE_IO_PHYS_BASE(i) (0xf0800000 + ((i) << 20))
- +#define MV78XX0_PCIE_IO_VIRT_BASE(i) (0xfe700000 + ((i) << 20))
- +#define MV78XX0_PCIE_IO_SIZE SZ_1M
- +
- +#define MV78XX0_REGS_PHYS_BASE 0xf1000000
- +#define MV78XX0_REGS_VIRT_BASE 0xfef00000
- +#define MV78XX0_REGS_SIZE SZ_1M
- +
- +#define MV78XX0_PCIE_MEM_PHYS_BASE 0xc0000000
- +#define MV78XX0_PCIE_MEM_SIZE 0x30000000
- +
- +/*
- + * Core-specific peripheral registers.
- + */
- +#define BRIDGE_VIRT_BASE (MV78XX0_CORE_REGS_VIRT_BASE)
- +#define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104)
- +#define L2_WRITETHROUGH 0x00020000
- +#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
- +#define SOFT_RESET_OUT_EN 0x00000004
- +#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
- +#define SOFT_RESET 0x00000001
- +#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
- +#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
- +#define BRIDGE_INT_TIMER0 0x0002
- +#define BRIDGE_INT_TIMER1 0x0004
- +#define BRIDGE_INT_TIMER1_CLR (~0x0004)
- +#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
- +#define IRQ_CAUSE_LOW_OFF 0x0004
- +#define IRQ_CAUSE_HIGH_OFF 0x0008
- +#define IRQ_MASK_LOW_OFF 0x0010
- +#define IRQ_MASK_HIGH_OFF 0x0014
- +#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
- +
- +/*
- + * Register Map
- + */
- +#define DDR_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x00000)
- +#define DDR_WINDOW_CPU0_BASE (DDR_VIRT_BASE | 0x1500)
- +#define DDR_WINDOW_CPU1_BASE (DDR_VIRT_BASE | 0x1700)
- +
- +#define DEV_BUS_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x10000)
- +#define DEV_BUS_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x10000)
- +#define SAMPLE_AT_RESET_LOW (DEV_BUS_VIRT_BASE | 0x0030)
- +#define SAMPLE_AT_RESET_HIGH (DEV_BUS_VIRT_BASE | 0x0034)
- +#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
- +#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
- +#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
- +#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
- +#define UART2_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2200)
- +#define UART2_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2200)
- +#define UART3_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2300)
- +#define UART3_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2300)
- +
- +#define GE10_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x30000)
- +#define GE11_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x34000)
- +
- +#define PCIE00_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x40000)
- +#define PCIE01_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x44000)
- +#define PCIE02_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x48000)
- +#define PCIE03_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x4c000)
- +
- +#define USB0_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x50000)
- +#define USB1_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x51000)
- +#define USB2_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x52000)
- +
- +#define GE00_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x70000)
- +#define GE01_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x74000)
- +
- +#define PCIE10_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x80000)
- +#define PCIE11_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x84000)
- +#define PCIE12_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x88000)
- +#define PCIE13_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x8c000)
- +
- +#define SATA_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0xa0000)
- +
- +
- +#define GPIO_MAX 32
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-mv78xx0/system.h
- @@ -0,0 +1,37 @@
- +/*
- + * include/asm-arm/arch-mv78xx0/system.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#ifndef __ASM_ARCH_SYSTEM_H
- +#define __ASM_ARCH_SYSTEM_H
- +
- +#include <asm/arch/hardware.h>
- +#include <asm/arch/mv78xx0.h>
- +
- +static inline void arch_idle(void)
- +{
- + cpu_do_idle();
- +}
- +
- +static inline void arch_reset(char mode)
- +{
- + /*
- + * Enable soft reset to assert RSTOUTn.
- + */
- + writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
- +
- + /*
- + * Assert soft reset.
- + */
- + writel(SOFT_RESET, SYSTEM_SOFT_RESET);
- +
- + while (1)
- + ;
- +}
- +
- +
- +#endif
- --- /dev/null
- +++ b/include/asm-arm/arch-mv78xx0/timex.h
- @@ -0,0 +1,9 @@
- +/*
- + * include/asm-arm/arch-mv78xx0/timex.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#define CLOCK_TICK_RATE (100 * HZ)
- --- /dev/null
- +++ b/include/asm-arm/arch-mv78xx0/uncompress.h
- @@ -0,0 +1,47 @@
- +/*
- + * include/asm-arm/arch-mv78xx0/uncompress.h
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +#include <linux/serial_reg.h>
- +#include <asm/arch/mv78xx0.h>
- +
- +#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
- +
- +static void putc(const char c)
- +{
- + unsigned char *base = SERIAL_BASE;
- + int i;
- +
- + for (i = 0; i < 0x1000; i++) {
- + if (base[UART_LSR << 2] & UART_LSR_THRE)
- + break;
- + barrier();
- + }
- +
- + base[UART_TX << 2] = c;
- +}
- +
- +static void flush(void)
- +{
- + unsigned char *base = SERIAL_BASE;
- + unsigned char mask;
- + int i;
- +
- + mask = UART_LSR_TEMT | UART_LSR_THRE;
- +
- + for (i = 0; i < 0x1000; i++) {
- + if ((base[UART_LSR << 2] & mask) == mask)
- + break;
- + barrier();
- + }
- +}
- +
- +/*
- + * nothing to do
- + */
- +#define arch_decomp_setup()
- +#define arch_decomp_wdog()
- --- /dev/null
- +++ b/include/asm-arm/arch-mv78xx0/vmalloc.h
- @@ -0,0 +1,5 @@
- +/*
- + * include/asm-arm/arch-mv78xx0/vmalloc.h
- + */
- +
- +#define VMALLOC_END 0xfe000000
- --- a/include/asm-arm/arch-orion5x/io.h
- +++ b/include/asm-arm/arch-orion5x/io.h
- @@ -14,7 +14,6 @@
- #include "orion5x.h"
-
- #define IO_SPACE_LIMIT 0xffffffff
- -#define IO_SPACE_REMAP ORION5X_PCI_SYS_IO_BASE
-
- static inline void __iomem *
- __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype)
- @@ -53,15 +52,12 @@
- /*****************************************************************************
- * Helpers to access Orion registers
- ****************************************************************************/
- -#define orion5x_read(r) __raw_readl(r)
- -#define orion5x_write(r, val) __raw_writel(val, r)
- -
- /*
- * These are not preempt-safe. Locks, if needed, must be taken
- * care of by the caller.
- */
- -#define orion5x_setbits(r, mask) orion5x_write((r), orion5x_read(r) | (mask))
- -#define orion5x_clrbits(r, mask) orion5x_write((r), orion5x_read(r) & ~(mask))
- +#define orion5x_setbits(r, mask) writel(readl(r) | (mask), (r))
- +#define orion5x_clrbits(r, mask) writel(readl(r) & ~(mask), (r))
-
-
- #endif
- --- a/include/asm-arm/arch-orion5x/orion5x.h
- +++ b/include/asm-arm/arch-orion5x/orion5x.h
- @@ -2,7 +2,7 @@
- * include/asm-arm/arch-orion5x/orion5x.h
- *
- * Generic definitions of Orion SoC flavors:
- - * Orion-1, Orion-NAS, Orion-VoIP, and Orion-2.
- + * Orion-1, Orion-VoIP, Orion-NAS, and Orion-2.
- *
- * Maintainer: Tzachi Perelstein <[email protected]>
- *
- @@ -63,9 +63,11 @@
- /*******************************************************************************
- * Supported Devices & Revisions
- ******************************************************************************/
- -/* Orion-1 (88F5181) */
- +/* Orion-1 (88F5181) and Orion-VoIP (88F5181L) */
- #define MV88F5181_DEV_ID 0x5181
- #define MV88F5181_REV_B1 3
- +#define MV88F5181L_REV_A0 8
- +#define MV88F5181L_REV_A1 9
- /* Orion-NAS (88F5182) */
- #define MV88F5182_DEV_ID 0x5182
- #define MV88F5182_REV_A2 2
- @@ -152,6 +154,7 @@
- #define BRIDGE_MASK ORION5X_BRIDGE_REG(0x114)
- #define BRIDGE_INT_TIMER0 0x0002
- #define BRIDGE_INT_TIMER1 0x0004
- +#define BRIDGE_INT_TIMER1_CLR (~0x0004)
- #define MAIN_IRQ_CAUSE ORION5X_BRIDGE_REG(0x200)
- #define MAIN_IRQ_MASK ORION5X_BRIDGE_REG(0x204)
-
- --- a/include/asm-arm/arch-orion5x/uncompress.h
- +++ b/include/asm-arm/arch-orion5x/uncompress.h
- @@ -8,23 +8,38 @@
- * warranty of any kind, whether express or implied.
- */
-
- +#include <linux/serial_reg.h>
- #include <asm/arch/orion5x.h>
-
- -#define MV_UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0))
- -#define MV_UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14))
- -
- -#define LSR_THRE 0x20
- +#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
-
- static void putc(const char c)
- {
- - int j = 0x1000;
- - while (--j && !(*MV_UART_LSR & LSR_THRE))
- + unsigned char *base = SERIAL_BASE;
- + int i;
- +
- + for (i = 0; i < 0x1000; i++) {
- + if (base[UART_LSR << 2] & UART_LSR_THRE)
- + break;
- barrier();
- - *MV_UART_THR = c;
- + }
- +
- + base[UART_TX << 2] = c;
- }
-
- static void flush(void)
- {
- + unsigned char *base = SERIAL_BASE;
- + unsigned char mask;
- + int i;
- +
- + mask = UART_LSR_TEMT | UART_LSR_THRE;
- +
- + for (i = 0; i < 0x1000; i++) {
- + if ((base[UART_LSR << 2] & mask) == mask)
- + break;
- + barrier();
- + }
- }
-
- /*
- --- a/include/asm-arm/assembler.h
- +++ b/include/asm-arm/assembler.h
- @@ -56,6 +56,21 @@
- #endif
-
- /*
- + * This can be used to enable code to cacheline align the destination
- + * pointer when bulk writing to memory. Experiments on StrongARM and
- + * XScale didn't show this a worthwhile thing to do when the cache is not
- + * set to write-allocate (this would need further testing on XScale when WA
- + * is used).
- + *
- + * On Feroceon there is much to gain however, regardless of cache mode.
- + */
- +#ifdef CONFIG_CPU_FEROCEON
- +#define CALGN(code...) code
- +#else
- +#define CALGN(code...)
- +#endif
- +
- +/*
- * Enable and disable interrupts
- */
- #if __LINUX_ARM_ARCH__ >= 6
- --- a/include/asm-arm/cacheflush.h
- +++ b/include/asm-arm/cacheflush.h
- @@ -95,11 +95,7 @@
- #endif
-
- #if defined(CONFIG_CPU_FEROCEON)
- -# ifdef _CACHE
- -# define MULTI_CACHE 1
- -# else
- -# define _CACHE feroceon
- -# endif
- +# define MULTI_CACHE 1
- #endif
-
- #if defined(CONFIG_CPU_V6)
- --- /dev/null
- +++ b/include/asm-arm/plat-orion/cache-feroceon-l2.h
- @@ -0,0 +1,11 @@
- +/*
- + * include/asm-arm/plat-orion/cache-feroceon-l2.h
- + *
- + * Copyright (C) 2008 Marvell Semiconductor
- + *
- + * This file is licensed under the terms of the GNU General Public
- + * License version 2. This program is licensed "as is" without any
- + * warranty of any kind, whether express or implied.
- + */
- +
- +extern void __init feroceon_l2_init(int l2_wt_override);
- --- a/include/asm-arm/plat-orion/pcie.h
- +++ b/include/asm-arm/plat-orion/pcie.h
- @@ -14,6 +14,7 @@
- u32 orion_pcie_dev_id(void __iomem *base);
- u32 orion_pcie_rev(void __iomem *base);
- int orion_pcie_link_up(void __iomem *base);
- +int orion_pcie_x4_mode(void __iomem *base);
- int orion_pcie_get_local_bus_nr(void __iomem *base);
- void orion_pcie_set_local_bus_nr(void __iomem *base, int nr);
- void orion_pcie_setup(void __iomem *base,
- --- a/include/asm-arm/tlbflush.h
- +++ b/include/asm-arm/tlbflush.h
- @@ -39,6 +39,7 @@
- #define TLB_V6_D_ASID (1 << 17)
- #define TLB_V6_I_ASID (1 << 18)
-
- +#define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */
- #define TLB_DCLEAN (1 << 30)
- #define TLB_WB (1 << 31)
-
- @@ -51,6 +52,7 @@
- * v4 - ARMv4 without write buffer
- * v4wb - ARMv4 with write buffer without I TLB flush entry instruction
- * v4wbi - ARMv4 with write buffer with I TLB flush entry instruction
- + * fr - Feroceon (v4wbi with non-outer-cacheable page table walks)
- * v6wbi - ARMv6 with write buffer with I TLB flush entry instruction
- */
- #undef _TLB
- @@ -103,6 +105,23 @@
- # define v4wbi_always_flags (-1UL)
- #endif
-
- +#define fr_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_L2CLEAN_FR | \
- + TLB_V4_I_FULL | TLB_V4_D_FULL | \
- + TLB_V4_I_PAGE | TLB_V4_D_PAGE)
- +
- +#ifdef CONFIG_CPU_TLB_FEROCEON
- +# define fr_possible_flags fr_tlb_flags
- +# define fr_always_flags fr_tlb_flags
- +# ifdef _TLB
- +# define MULTI_TLB 1
- +# else
- +# define _TLB v4wbi
- +# endif
- +#else
- +# define fr_possible_flags 0
- +# define fr_always_flags (-1UL)
- +#endif
- +
- #define v4wb_tlb_flags (TLB_WB | TLB_DCLEAN | \
- TLB_V4_I_FULL | TLB_V4_D_FULL | \
- TLB_V4_D_PAGE)
- @@ -245,12 +264,14 @@
- #define possible_tlb_flags (v3_possible_flags | \
- v4_possible_flags | \
- v4wbi_possible_flags | \
- + fr_possible_flags | \
- v4wb_possible_flags | \
- v6wbi_possible_flags)
-
- #define always_tlb_flags (v3_always_flags & \
- v4_always_flags & \
- v4wbi_always_flags & \
- + fr_always_flags & \
- v4wb_always_flags & \
- v6wbi_always_flags)
-
- @@ -417,6 +438,11 @@
- if (tlb_flag(TLB_DCLEAN))
- asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd"
- : : "r" (pmd) : "cc");
- +
- + if (tlb_flag(TLB_L2CLEAN_FR))
- + asm("mcr p15, 1, %0, c15, c9, 1 @ L2 flush_pmd"
- + : : "r" (pmd) : "cc");
- +
- if (tlb_flag(TLB_WB))
- dsb();
- }
- @@ -428,6 +454,10 @@
- if (tlb_flag(TLB_DCLEAN))
- asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd"
- : : "r" (pmd) : "cc");
- +
- + if (tlb_flag(TLB_L2CLEAN_FR))
- + asm("mcr p15, 1, %0, c15, c9, 1 @ L2 flush_pmd"
- + : : "r" (pmd) : "cc");
- }
-
- #undef tlb_flag
- --- a/include/linux/mv643xx_eth.h
- +++ b/include/linux/mv643xx_eth.h
- @@ -17,30 +17,59 @@
-
- struct mv643xx_eth_shared_platform_data {
- struct mbus_dram_target_info *dram;
- - unsigned int t_clk;
- + unsigned int t_clk;
- };
-
- struct mv643xx_eth_platform_data {
- + /*
- + * Pointer back to our parent instance, and our port number.
- + */
- struct platform_device *shared;
- - int port_number;
- + int port_number;
-
- + /*
- + * Whether a PHY is present, and if yes, at which address.
- + */
- struct platform_device *shared_smi;
- + int force_phy_addr;
- + int phy_addr;
-
- - u16 force_phy_addr; /* force override if phy_addr == 0 */
- - u16 phy_addr;
- -
- - /* If speed is 0, then speed and duplex are autonegotiated. */
- - int speed; /* 0, SPEED_10, SPEED_100, SPEED_1000 */
- - int duplex; /* DUPLEX_HALF or DUPLEX_FULL */
- -
- - /* non-zero values of the following fields override defaults */
- - u32 tx_queue_size;
- - u32 rx_queue_size;
- - u32 tx_sram_addr;
- - u32 tx_sram_size;
- - u32 rx_sram_addr;
- - u32 rx_sram_size;
- - u8 mac_addr[6]; /* mac address if non-zero*/
- + /*
- + * Use this MAC address if it is valid, overriding the
- + * address that is already in the hardware.
- + */
- + u8 mac_addr[6];
- +
- + /*
- + * If speed is 0, autonegotiation is enabled.
- + * Valid values for speed: 0, SPEED_10, SPEED_100, SPEED_1000.
- + * Valid values for duplex: DUPLEX_HALF, DUPLEX_FULL.
- + */
- + int speed;
- + int duplex;
- +
- + /*
- + * Which RX/TX queues to use.
- + */
- + int rx_queue_mask;
- + int tx_queue_mask;
- +
- + /*
- + * Override default RX/TX queue sizes if nonzero.
- + */
- + int rx_queue_size;
- + int tx_queue_size;
- +
- + /*
- + * Use on-chip SRAM for RX/TX descriptors if size is nonzero
- + * and sufficient to contain all descriptors for the requested
- + * ring sizes.
- + */
- + unsigned long rx_sram_addr;
- + int rx_sram_size;
- + unsigned long tx_sram_addr;
- + int tx_sram_size;
- };
-
- -#endif /* __LINUX_MV643XX_ETH_H */
- +
- +#endif
|