000-linux_mips.patch 788 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959
  1. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/au1xxx_irqmap.c linux-2.4.32-rc1.mips/arch/mips/au1000/common/au1xxx_irqmap.c
  2. --- linux-2.4.32-rc1/arch/mips/au1000/common/au1xxx_irqmap.c 2005-01-19 15:09:26.000000000 +0100
  3. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/au1xxx_irqmap.c 2005-01-30 09:01:27.000000000 +0100
  4. @@ -172,14 +172,14 @@
  5. { AU1550_PSC1_INT, INTC_INT_HIGH_LEVEL, 0},
  6. { AU1550_PSC2_INT, INTC_INT_HIGH_LEVEL, 0},
  7. { AU1550_PSC3_INT, INTC_INT_HIGH_LEVEL, 0},
  8. - { AU1550_TOY_INT, INTC_INT_RISE_EDGE, 0 },
  9. - { AU1550_TOY_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
  10. - { AU1550_TOY_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
  11. - { AU1550_TOY_MATCH2_INT, INTC_INT_RISE_EDGE, 1 },
  12. - { AU1550_RTC_INT, INTC_INT_RISE_EDGE, 0 },
  13. - { AU1550_RTC_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
  14. - { AU1550_RTC_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
  15. - { AU1550_RTC_MATCH2_INT, INTC_INT_RISE_EDGE, 0 },
  16. + { AU1000_TOY_INT, INTC_INT_RISE_EDGE, 0 },
  17. + { AU1000_TOY_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
  18. + { AU1000_TOY_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
  19. + { AU1000_TOY_MATCH2_INT, INTC_INT_RISE_EDGE, 1 },
  20. + { AU1000_RTC_INT, INTC_INT_RISE_EDGE, 0 },
  21. + { AU1000_RTC_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
  22. + { AU1000_RTC_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
  23. + { AU1000_RTC_MATCH2_INT, INTC_INT_RISE_EDGE, 0 },
  24. { AU1550_NAND_INT, INTC_INT_RISE_EDGE, 0},
  25. { AU1550_USB_DEV_REQ_INT, INTC_INT_HIGH_LEVEL, 0 },
  26. { AU1550_USB_DEV_SUS_INT, INTC_INT_RISE_EDGE, 0 },
  27. @@ -200,14 +200,14 @@
  28. { AU1200_PSC1_INT, INTC_INT_HIGH_LEVEL, 0},
  29. { AU1200_AES_INT, INTC_INT_HIGH_LEVEL, 0},
  30. { AU1200_CAMERA_INT, INTC_INT_HIGH_LEVEL, 0},
  31. - { AU1200_TOY_INT, INTC_INT_RISE_EDGE, 0 },
  32. - { AU1200_TOY_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
  33. - { AU1200_TOY_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
  34. - { AU1200_TOY_MATCH2_INT, INTC_INT_RISE_EDGE, 1 },
  35. - { AU1200_RTC_INT, INTC_INT_RISE_EDGE, 0 },
  36. - { AU1200_RTC_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
  37. - { AU1200_RTC_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
  38. - { AU1200_RTC_MATCH2_INT, INTC_INT_RISE_EDGE, 0 },
  39. + { AU1000_TOY_INT, INTC_INT_RISE_EDGE, 0 },
  40. + { AU1000_TOY_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
  41. + { AU1000_TOY_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
  42. + { AU1000_TOY_MATCH2_INT, INTC_INT_RISE_EDGE, 1 },
  43. + { AU1000_RTC_INT, INTC_INT_RISE_EDGE, 0 },
  44. + { AU1000_RTC_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
  45. + { AU1000_RTC_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
  46. + { AU1000_RTC_MATCH2_INT, INTC_INT_RISE_EDGE, 0 },
  47. { AU1200_NAND_INT, INTC_INT_RISE_EDGE, 0},
  48. { AU1200_USB_INT, INTC_INT_HIGH_LEVEL, 0 },
  49. { AU1200_LCD_INT, INTC_INT_HIGH_LEVEL, 0},
  50. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/cputable.c linux-2.4.32-rc1.mips/arch/mips/au1000/common/cputable.c
  51. --- linux-2.4.32-rc1/arch/mips/au1000/common/cputable.c 2005-01-19 15:09:26.000000000 +0100
  52. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/cputable.c 2005-01-30 09:01:27.000000000 +0100
  53. @@ -39,7 +39,8 @@
  54. { 0xffffffff, 0x02030203, "Au1100 BD", 0, 1 },
  55. { 0xffffffff, 0x02030204, "Au1100 BE", 0, 1 },
  56. { 0xffffffff, 0x03030200, "Au1550 AA", 0, 1 },
  57. - { 0xffffffff, 0x04030200, "Au1200 AA", 0, 1 },
  58. + { 0xffffffff, 0x04030200, "Au1200 AB", 0, 0 },
  59. + { 0xffffffff, 0x04030201, "Au1200 AC", 0, 0 },
  60. { 0x00000000, 0x00000000, "Unknown Au1xxx", 1, 0 },
  61. };
  62. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/dbdma.c linux-2.4.32-rc1.mips/arch/mips/au1000/common/dbdma.c
  63. --- linux-2.4.32-rc1/arch/mips/au1000/common/dbdma.c 2005-01-19 15:09:26.000000000 +0100
  64. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/dbdma.c 2005-02-08 07:28:37.000000000 +0100
  65. @@ -41,6 +41,8 @@
  66. #include <asm/au1xxx_dbdma.h>
  67. #include <asm/system.h>
  68. +#include <linux/module.h>
  69. +
  70. #if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200)
  71. /*
  72. @@ -60,37 +62,10 @@
  73. */
  74. #define ALIGN_ADDR(x, a) ((((u32)(x)) + (a-1)) & ~(a-1))
  75. -static volatile dbdma_global_t *dbdma_gptr = (dbdma_global_t *)DDMA_GLOBAL_BASE;
  76. -static int dbdma_initialized;
  77. +static dbdma_global_t *dbdma_gptr = (dbdma_global_t *)DDMA_GLOBAL_BASE;
  78. +static int dbdma_initialized=0;
  79. static void au1xxx_dbdma_init(void);
  80. -typedef struct dbdma_device_table {
  81. - u32 dev_id;
  82. - u32 dev_flags;
  83. - u32 dev_tsize;
  84. - u32 dev_devwidth;
  85. - u32 dev_physaddr; /* If FIFO */
  86. - u32 dev_intlevel;
  87. - u32 dev_intpolarity;
  88. -} dbdev_tab_t;
  89. -
  90. -typedef struct dbdma_chan_config {
  91. - u32 chan_flags;
  92. - u32 chan_index;
  93. - dbdev_tab_t *chan_src;
  94. - dbdev_tab_t *chan_dest;
  95. - au1x_dma_chan_t *chan_ptr;
  96. - au1x_ddma_desc_t *chan_desc_base;
  97. - au1x_ddma_desc_t *get_ptr, *put_ptr, *cur_ptr;
  98. - void *chan_callparam;
  99. - void (*chan_callback)(int, void *, struct pt_regs *);
  100. -} chan_tab_t;
  101. -
  102. -#define DEV_FLAGS_INUSE (1 << 0)
  103. -#define DEV_FLAGS_ANYUSE (1 << 1)
  104. -#define DEV_FLAGS_OUT (1 << 2)
  105. -#define DEV_FLAGS_IN (1 << 3)
  106. -
  107. static dbdev_tab_t dbdev_tab[] = {
  108. #ifdef CONFIG_SOC_AU1550
  109. /* UARTS */
  110. @@ -156,13 +131,13 @@
  111. { DSCR_CMD0_MAE_BOTH, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
  112. { DSCR_CMD0_LCD, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
  113. - { DSCR_CMD0_SDMS_TX0, DEV_FLAGS_OUT, 0, 0, 0x00000000, 0, 0 },
  114. - { DSCR_CMD0_SDMS_RX0, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
  115. - { DSCR_CMD0_SDMS_TX1, DEV_FLAGS_OUT, 0, 0, 0x00000000, 0, 0 },
  116. - { DSCR_CMD0_SDMS_RX1, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
  117. + { DSCR_CMD0_SDMS_TX0, DEV_FLAGS_OUT, 4, 8, 0x10600000, 0, 0 },
  118. + { DSCR_CMD0_SDMS_RX0, DEV_FLAGS_IN, 4, 8, 0x10600004, 0, 0 },
  119. + { DSCR_CMD0_SDMS_TX1, DEV_FLAGS_OUT, 4, 8, 0x10680000, 0, 0 },
  120. + { DSCR_CMD0_SDMS_RX1, DEV_FLAGS_IN, 4, 8, 0x10680004, 0, 0 },
  121. - { DSCR_CMD0_AES_TX, DEV_FLAGS_OUT, 0, 0, 0x00000000, 0, 0 },
  122. - { DSCR_CMD0_AES_RX, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
  123. + { DSCR_CMD0_AES_RX, DEV_FLAGS_IN , 4, 32, 0x10300008, 0, 0 },
  124. + { DSCR_CMD0_AES_TX, DEV_FLAGS_OUT, 4, 32, 0x10300004, 0, 0 },
  125. { DSCR_CMD0_PSC0_TX, DEV_FLAGS_OUT, 0, 0, 0x11a0001c, 0, 0 },
  126. { DSCR_CMD0_PSC0_RX, DEV_FLAGS_IN, 0, 0, 0x11a0001c, 0, 0 },
  127. @@ -172,9 +147,9 @@
  128. { DSCR_CMD0_PSC1_RX, DEV_FLAGS_IN, 0, 0, 0x11b0001c, 0, 0 },
  129. { DSCR_CMD0_PSC1_SYNC, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
  130. - { DSCR_CMD0_CIM_RXA, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
  131. - { DSCR_CMD0_CIM_RXB, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
  132. - { DSCR_CMD0_CIM_RXC, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
  133. + { DSCR_CMD0_CIM_RXA, DEV_FLAGS_IN, 0, 32, 0x14004020, 0, 0 },
  134. + { DSCR_CMD0_CIM_RXB, DEV_FLAGS_IN, 0, 32, 0x14004040, 0, 0 },
  135. + { DSCR_CMD0_CIM_RXC, DEV_FLAGS_IN, 0, 32, 0x14004060, 0, 0 },
  136. { DSCR_CMD0_CIM_SYNC, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
  137. { DSCR_CMD0_NAND_FLASH, DEV_FLAGS_IN, 0, 0, 0x00000000, 0, 0 },
  138. @@ -183,6 +158,24 @@
  139. { DSCR_CMD0_THROTTLE, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
  140. { DSCR_CMD0_ALWAYS, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
  141. +
  142. + /* Provide 16 user definable device types */
  143. + { 0, 0, 0, 0, 0, 0, 0 },
  144. + { 0, 0, 0, 0, 0, 0, 0 },
  145. + { 0, 0, 0, 0, 0, 0, 0 },
  146. + { 0, 0, 0, 0, 0, 0, 0 },
  147. + { 0, 0, 0, 0, 0, 0, 0 },
  148. + { 0, 0, 0, 0, 0, 0, 0 },
  149. + { 0, 0, 0, 0, 0, 0, 0 },
  150. + { 0, 0, 0, 0, 0, 0, 0 },
  151. + { 0, 0, 0, 0, 0, 0, 0 },
  152. + { 0, 0, 0, 0, 0, 0, 0 },
  153. + { 0, 0, 0, 0, 0, 0, 0 },
  154. + { 0, 0, 0, 0, 0, 0, 0 },
  155. + { 0, 0, 0, 0, 0, 0, 0 },
  156. + { 0, 0, 0, 0, 0, 0, 0 },
  157. + { 0, 0, 0, 0, 0, 0, 0 },
  158. + { 0, 0, 0, 0, 0, 0, 0 },
  159. };
  160. #define DBDEV_TAB_SIZE (sizeof(dbdev_tab) / sizeof(dbdev_tab_t))
  161. @@ -202,6 +195,30 @@
  162. return NULL;
  163. }
  164. +u32
  165. +au1xxx_ddma_add_device(dbdev_tab_t *dev)
  166. +{
  167. + u32 ret = 0;
  168. + dbdev_tab_t *p=NULL;
  169. + static u16 new_id=0x1000;
  170. +
  171. + p = find_dbdev_id(0);
  172. + if ( NULL != p )
  173. + {
  174. + memcpy(p, dev, sizeof(dbdev_tab_t));
  175. + p->dev_id = DSCR_DEV2CUSTOM_ID(new_id,dev->dev_id);
  176. + ret = p->dev_id;
  177. + new_id++;
  178. +#if 0
  179. + printk("add_device: id:%x flags:%x padd:%x\n",
  180. + p->dev_id, p->dev_flags, p->dev_physaddr );
  181. +#endif
  182. + }
  183. +
  184. + return ret;
  185. +}
  186. +EXPORT_SYMBOL(au1xxx_ddma_add_device);
  187. +
  188. /* Allocate a channel and return a non-zero descriptor if successful.
  189. */
  190. u32
  191. @@ -214,7 +231,7 @@
  192. int i;
  193. dbdev_tab_t *stp, *dtp;
  194. chan_tab_t *ctp;
  195. - volatile au1x_dma_chan_t *cp;
  196. + au1x_dma_chan_t *cp;
  197. /* We do the intialization on the first channel allocation.
  198. * We have to wait because of the interrupt handler initialization
  199. @@ -224,9 +241,6 @@
  200. au1xxx_dbdma_init();
  201. dbdma_initialized = 1;
  202. - if ((srcid > DSCR_NDEV_IDS) || (destid > DSCR_NDEV_IDS))
  203. - return 0;
  204. -
  205. if ((stp = find_dbdev_id(srcid)) == NULL) return 0;
  206. if ((dtp = find_dbdev_id(destid)) == NULL) return 0;
  207. @@ -268,9 +282,9 @@
  208. /* If kmalloc fails, it is caught below same
  209. * as a channel not available.
  210. */
  211. - ctp = (chan_tab_t *)kmalloc(sizeof(chan_tab_t), GFP_KERNEL);
  212. + ctp = (chan_tab_t *)
  213. + kmalloc(sizeof(chan_tab_t), GFP_KERNEL);
  214. chan_tab_ptr[i] = ctp;
  215. - ctp->chan_index = chan = i;
  216. break;
  217. }
  218. }
  219. @@ -278,10 +292,11 @@
  220. if (ctp != NULL) {
  221. memset(ctp, 0, sizeof(chan_tab_t));
  222. + ctp->chan_index = chan = i;
  223. dcp = DDMA_CHANNEL_BASE;
  224. dcp += (0x0100 * chan);
  225. ctp->chan_ptr = (au1x_dma_chan_t *)dcp;
  226. - cp = (volatile au1x_dma_chan_t *)dcp;
  227. + cp = (au1x_dma_chan_t *)dcp;
  228. ctp->chan_src = stp;
  229. ctp->chan_dest = dtp;
  230. ctp->chan_callback = callback;
  231. @@ -298,6 +313,9 @@
  232. i |= DDMA_CFG_DED;
  233. if (dtp->dev_intpolarity)
  234. i |= DDMA_CFG_DP;
  235. + if ((stp->dev_flags & DEV_FLAGS_SYNC) ||
  236. + (dtp->dev_flags & DEV_FLAGS_SYNC))
  237. + i |= DDMA_CFG_SYNC;
  238. cp->ddma_cfg = i;
  239. au_sync();
  240. @@ -308,14 +326,14 @@
  241. rv = (u32)(&chan_tab_ptr[chan]);
  242. }
  243. else {
  244. - /* Release devices.
  245. - */
  246. + /* Release devices */
  247. stp->dev_flags &= ~DEV_FLAGS_INUSE;
  248. dtp->dev_flags &= ~DEV_FLAGS_INUSE;
  249. }
  250. }
  251. return rv;
  252. }
  253. +EXPORT_SYMBOL(au1xxx_dbdma_chan_alloc);
  254. /* Set the device width if source or destination is a FIFO.
  255. * Should be 8, 16, or 32 bits.
  256. @@ -343,6 +361,7 @@
  257. return rv;
  258. }
  259. +EXPORT_SYMBOL(au1xxx_dbdma_set_devwidth);
  260. /* Allocate a descriptor ring, initializing as much as possible.
  261. */
  262. @@ -369,7 +388,8 @@
  263. * and if we try that first we are likely to not waste larger
  264. * slabs of memory.
  265. */
  266. - desc_base = (u32)kmalloc(entries * sizeof(au1x_ddma_desc_t), GFP_KERNEL);
  267. + desc_base = (u32)kmalloc(entries * sizeof(au1x_ddma_desc_t),
  268. + GFP_KERNEL|GFP_DMA);
  269. if (desc_base == 0)
  270. return 0;
  271. @@ -380,7 +400,7 @@
  272. kfree((const void *)desc_base);
  273. i = entries * sizeof(au1x_ddma_desc_t);
  274. i += (sizeof(au1x_ddma_desc_t) - 1);
  275. - if ((desc_base = (u32)kmalloc(i, GFP_KERNEL)) == 0)
  276. + if ((desc_base = (u32)kmalloc(i, GFP_KERNEL|GFP_DMA)) == 0)
  277. return 0;
  278. desc_base = ALIGN_ADDR(desc_base, sizeof(au1x_ddma_desc_t));
  279. @@ -460,9 +480,14 @@
  280. /* If source input is fifo, set static address.
  281. */
  282. if (stp->dev_flags & DEV_FLAGS_IN) {
  283. - src0 = stp->dev_physaddr;
  284. - src1 |= DSCR_SRC1_SAM(DSCR_xAM_STATIC);
  285. + if ( stp->dev_flags & DEV_FLAGS_BURSTABLE )
  286. + src1 |= DSCR_SRC1_SAM(DSCR_xAM_BURST);
  287. + else
  288. + src1 |= DSCR_SRC1_SAM(DSCR_xAM_STATIC);
  289. +
  290. }
  291. + if (stp->dev_physaddr)
  292. + src0 = stp->dev_physaddr;
  293. /* Set up dest1. For now, assume no stride and increment.
  294. * A channel attribute update can change this later.
  295. @@ -486,10 +511,18 @@
  296. /* If destination output is fifo, set static address.
  297. */
  298. if (dtp->dev_flags & DEV_FLAGS_OUT) {
  299. - dest0 = dtp->dev_physaddr;
  300. + if ( dtp->dev_flags & DEV_FLAGS_BURSTABLE )
  301. + dest1 |= DSCR_DEST1_DAM(DSCR_xAM_BURST);
  302. + else
  303. dest1 |= DSCR_DEST1_DAM(DSCR_xAM_STATIC);
  304. }
  305. + if (dtp->dev_physaddr)
  306. + dest0 = dtp->dev_physaddr;
  307. +#if 0
  308. + printk("did:%x sid:%x cmd0:%x cmd1:%x source0:%x source1:%x dest0:%x dest1:%x\n",
  309. + dtp->dev_id, stp->dev_id, cmd0, cmd1, src0, src1, dest0, dest1 );
  310. +#endif
  311. for (i=0; i<entries; i++) {
  312. dp->dscr_cmd0 = cmd0;
  313. dp->dscr_cmd1 = cmd1;
  314. @@ -498,6 +531,7 @@
  315. dp->dscr_dest0 = dest0;
  316. dp->dscr_dest1 = dest1;
  317. dp->dscr_stat = 0;
  318. + dp->sw_context = dp->sw_status = 0;
  319. dp->dscr_nxtptr = DSCR_NXTPTR(virt_to_phys(dp + 1));
  320. dp++;
  321. }
  322. @@ -510,13 +544,14 @@
  323. return (u32)(ctp->chan_desc_base);
  324. }
  325. +EXPORT_SYMBOL(au1xxx_dbdma_ring_alloc);
  326. /* Put a source buffer into the DMA ring.
  327. * This updates the source pointer and byte count. Normally used
  328. * for memory to fifo transfers.
  329. */
  330. u32
  331. -au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes)
  332. +_au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags)
  333. {
  334. chan_tab_t *ctp;
  335. au1x_ddma_desc_t *dp;
  336. @@ -543,24 +578,40 @@
  337. */
  338. dp->dscr_source0 = virt_to_phys(buf);
  339. dp->dscr_cmd1 = nbytes;
  340. - dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
  341. - ctp->chan_ptr->ddma_dbell = 0xffffffff; /* Make it go */
  342. -
  343. + /* Check flags */
  344. + if (flags & DDMA_FLAGS_IE)
  345. + dp->dscr_cmd0 |= DSCR_CMD0_IE;
  346. + if (flags & DDMA_FLAGS_NOIE)
  347. + dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
  348. /* Get next descriptor pointer.
  349. */
  350. ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
  351. + /*
  352. + * There is an errata on the Au1200/Au1550 parts that could result
  353. + * in "stale" data being DMA'd. It has to do with the snoop logic on
  354. + * the dache eviction buffer. NONCOHERENT_IO is on by default for
  355. + * these parts. If it is fixedin the future, these dma_cache_inv will
  356. + * just be nothing more than empty macros. See io.h.
  357. + * */
  358. + dma_cache_wback_inv(buf,nbytes);
  359. + dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
  360. + au_sync();
  361. + dma_cache_wback_inv(dp, sizeof(dp));
  362. + ctp->chan_ptr->ddma_dbell = 0;
  363. +
  364. /* return something not zero.
  365. */
  366. return nbytes;
  367. }
  368. +EXPORT_SYMBOL(_au1xxx_dbdma_put_source);
  369. /* Put a destination buffer into the DMA ring.
  370. * This updates the destination pointer and byte count. Normally used
  371. * to place an empty buffer into the ring for fifo to memory transfers.
  372. */
  373. u32
  374. -au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes)
  375. +_au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags)
  376. {
  377. chan_tab_t *ctp;
  378. au1x_ddma_desc_t *dp;
  379. @@ -582,11 +633,33 @@
  380. if (dp->dscr_cmd0 & DSCR_CMD0_V)
  381. return 0;
  382. - /* Load up buffer address and byte count.
  383. - */
  384. + /* Load up buffer address and byte count */
  385. +
  386. + /* Check flags */
  387. + if (flags & DDMA_FLAGS_IE)
  388. + dp->dscr_cmd0 |= DSCR_CMD0_IE;
  389. + if (flags & DDMA_FLAGS_NOIE)
  390. + dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
  391. +
  392. dp->dscr_dest0 = virt_to_phys(buf);
  393. dp->dscr_cmd1 = nbytes;
  394. +#if 0
  395. + printk("cmd0:%x cmd1:%x source0:%x source1:%x dest0:%x dest1:%x\n",
  396. + dp->dscr_cmd0, dp->dscr_cmd1, dp->dscr_source0,
  397. + dp->dscr_source1, dp->dscr_dest0, dp->dscr_dest1 );
  398. +#endif
  399. + /*
  400. + * There is an errata on the Au1200/Au1550 parts that could result in
  401. + * "stale" data being DMA'd. It has to do with the snoop logic on the
  402. + * dache eviction buffer. NONCOHERENT_IO is on by default for these
  403. + * parts. If it is fixedin the future, these dma_cache_inv will just
  404. + * be nothing more than empty macros. See io.h.
  405. + * */
  406. + dma_cache_inv(buf,nbytes);
  407. dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
  408. + au_sync();
  409. + dma_cache_wback_inv(dp, sizeof(dp));
  410. + ctp->chan_ptr->ddma_dbell = 0;
  411. /* Get next descriptor pointer.
  412. */
  413. @@ -596,6 +669,7 @@
  414. */
  415. return nbytes;
  416. }
  417. +EXPORT_SYMBOL(_au1xxx_dbdma_put_dest);
  418. /* Get a destination buffer into the DMA ring.
  419. * Normally used to get a full buffer from the ring during fifo
  420. @@ -645,7 +719,7 @@
  421. au1xxx_dbdma_stop(u32 chanid)
  422. {
  423. chan_tab_t *ctp;
  424. - volatile au1x_dma_chan_t *cp;
  425. + au1x_dma_chan_t *cp;
  426. int halt_timeout = 0;
  427. ctp = *((chan_tab_t **)chanid);
  428. @@ -665,6 +739,7 @@
  429. cp->ddma_stat |= (DDMA_STAT_DB | DDMA_STAT_V);
  430. au_sync();
  431. }
  432. +EXPORT_SYMBOL(au1xxx_dbdma_stop);
  433. /* Start using the current descriptor pointer. If the dbdma encounters
  434. * a not valid descriptor, it will stop. In this case, we can just
  435. @@ -674,17 +749,17 @@
  436. au1xxx_dbdma_start(u32 chanid)
  437. {
  438. chan_tab_t *ctp;
  439. - volatile au1x_dma_chan_t *cp;
  440. + au1x_dma_chan_t *cp;
  441. ctp = *((chan_tab_t **)chanid);
  442. -
  443. cp = ctp->chan_ptr;
  444. cp->ddma_desptr = virt_to_phys(ctp->cur_ptr);
  445. cp->ddma_cfg |= DDMA_CFG_EN; /* Enable channel */
  446. au_sync();
  447. - cp->ddma_dbell = 0xffffffff; /* Make it go */
  448. + cp->ddma_dbell = 0;
  449. au_sync();
  450. }
  451. +EXPORT_SYMBOL(au1xxx_dbdma_start);
  452. void
  453. au1xxx_dbdma_reset(u32 chanid)
  454. @@ -703,15 +778,21 @@
  455. do {
  456. dp->dscr_cmd0 &= ~DSCR_CMD0_V;
  457. + /* reset our SW status -- this is used to determine
  458. + * if a descriptor is in use by upper level SW. Since
  459. + * posting can reset 'V' bit.
  460. + */
  461. + dp->sw_status = 0;
  462. dp = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
  463. } while (dp != ctp->chan_desc_base);
  464. }
  465. +EXPORT_SYMBOL(au1xxx_dbdma_reset);
  466. u32
  467. au1xxx_get_dma_residue(u32 chanid)
  468. {
  469. chan_tab_t *ctp;
  470. - volatile au1x_dma_chan_t *cp;
  471. + au1x_dma_chan_t *cp;
  472. u32 rv;
  473. ctp = *((chan_tab_t **)chanid);
  474. @@ -746,15 +827,16 @@
  475. kfree(ctp);
  476. }
  477. +EXPORT_SYMBOL(au1xxx_dbdma_chan_free);
  478. static void
  479. dbdma_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  480. {
  481. - u32 intstat;
  482. + u32 intstat, flags;
  483. u32 chan_index;
  484. chan_tab_t *ctp;
  485. au1x_ddma_desc_t *dp;
  486. - volatile au1x_dma_chan_t *cp;
  487. + au1x_dma_chan_t *cp;
  488. intstat = dbdma_gptr->ddma_intstat;
  489. au_sync();
  490. @@ -773,18 +855,26 @@
  491. (ctp->chan_callback)(irq, ctp->chan_callparam, regs);
  492. ctp->cur_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
  493. -
  494. }
  495. -static void
  496. -au1xxx_dbdma_init(void)
  497. +static void au1xxx_dbdma_init(void)
  498. {
  499. + int irq_nr;
  500. +
  501. dbdma_gptr->ddma_config = 0;
  502. dbdma_gptr->ddma_throttle = 0;
  503. dbdma_gptr->ddma_inten = 0xffff;
  504. au_sync();
  505. - if (request_irq(AU1550_DDMA_INT, dbdma_interrupt, SA_INTERRUPT,
  506. +#if defined(CONFIG_SOC_AU1550)
  507. + irq_nr = AU1550_DDMA_INT;
  508. +#elif defined(CONFIG_SOC_AU1200)
  509. + irq_nr = AU1200_DDMA_INT;
  510. +#else
  511. + #error Unknown Au1x00 SOC
  512. +#endif
  513. +
  514. + if (request_irq(irq_nr, dbdma_interrupt, SA_INTERRUPT,
  515. "Au1xxx dbdma", (void *)dbdma_gptr))
  516. printk("Can't get 1550 dbdma irq");
  517. }
  518. @@ -795,7 +885,8 @@
  519. chan_tab_t *ctp;
  520. au1x_ddma_desc_t *dp;
  521. dbdev_tab_t *stp, *dtp;
  522. - volatile au1x_dma_chan_t *cp;
  523. + au1x_dma_chan_t *cp;
  524. + u32 i = 0;
  525. ctp = *((chan_tab_t **)chanid);
  526. stp = ctp->chan_src;
  527. @@ -820,15 +911,64 @@
  528. dp = ctp->chan_desc_base;
  529. do {
  530. - printk("dp %08x, cmd0 %08x, cmd1 %08x\n",
  531. - (u32)dp, dp->dscr_cmd0, dp->dscr_cmd1);
  532. - printk("src0 %08x, src1 %08x, dest0 %08x\n",
  533. - dp->dscr_source0, dp->dscr_source1, dp->dscr_dest0);
  534. - printk("dest1 %08x, stat %08x, nxtptr %08x\n",
  535. - dp->dscr_dest1, dp->dscr_stat, dp->dscr_nxtptr);
  536. + printk("Dp[%d]= %08x, cmd0 %08x, cmd1 %08x\n",
  537. + i++, (u32)dp, dp->dscr_cmd0, dp->dscr_cmd1);
  538. + printk("src0 %08x, src1 %08x, dest0 %08x, dest1 %08x\n",
  539. + dp->dscr_source0, dp->dscr_source1, dp->dscr_dest0, dp->dscr_dest1);
  540. + printk("stat %08x, nxtptr %08x\n",
  541. + dp->dscr_stat, dp->dscr_nxtptr);
  542. dp = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
  543. } while (dp != ctp->chan_desc_base);
  544. }
  545. +/* Put a descriptor into the DMA ring.
  546. + * This updates the source/destination pointers and byte count.
  547. + */
  548. +u32
  549. +au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr )
  550. +{
  551. + chan_tab_t *ctp;
  552. + au1x_ddma_desc_t *dp;
  553. + u32 nbytes=0;
  554. +
  555. + /* I guess we could check this to be within the
  556. + * range of the table......
  557. + */
  558. + ctp = *((chan_tab_t **)chanid);
  559. +
  560. + /* We should have multiple callers for a particular channel,
  561. + * an interrupt doesn't affect this pointer nor the descriptor,
  562. + * so no locking should be needed.
  563. + */
  564. + dp = ctp->put_ptr;
  565. +
  566. + /* If the descriptor is valid, we are way ahead of the DMA
  567. + * engine, so just return an error condition.
  568. + */
  569. + if (dp->dscr_cmd0 & DSCR_CMD0_V)
  570. + return 0;
  571. +
  572. + /* Load up buffer addresses and byte count.
  573. + */
  574. + dp->dscr_dest0 = dscr->dscr_dest0;
  575. + dp->dscr_source0 = dscr->dscr_source0;
  576. + dp->dscr_dest1 = dscr->dscr_dest1;
  577. + dp->dscr_source1 = dscr->dscr_source1;
  578. + dp->dscr_cmd1 = dscr->dscr_cmd1;
  579. + nbytes = dscr->dscr_cmd1;
  580. + /* Allow the caller to specifiy if an interrupt is generated */
  581. + dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
  582. + dp->dscr_cmd0 |= dscr->dscr_cmd0 | DSCR_CMD0_V;
  583. + ctp->chan_ptr->ddma_dbell = 0;
  584. +
  585. + /* Get next descriptor pointer.
  586. + */
  587. + ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
  588. +
  589. + /* return something not zero.
  590. + */
  591. + return nbytes;
  592. +}
  593. +
  594. #endif /* defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200) */
  595. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/gpio.c linux-2.4.32-rc1.mips/arch/mips/au1000/common/gpio.c
  596. --- linux-2.4.32-rc1/arch/mips/au1000/common/gpio.c 1970-01-01 01:00:00.000000000 +0100
  597. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/gpio.c 2005-01-30 09:01:27.000000000 +0100
  598. @@ -0,0 +1,118 @@
  599. +/*
  600. + * This program is free software; you can redistribute it and/or modify it
  601. + * under the terms of the GNU General Public License as published by the
  602. + * Free Software Foundation; either version 2 of the License, or (at your
  603. + * option) any later version.
  604. + *
  605. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  606. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  607. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  608. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  609. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  610. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  611. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  612. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  613. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  614. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  615. + *
  616. + * You should have received a copy of the GNU General Public License along
  617. + * with this program; if not, write to the Free Software Foundation, Inc.,
  618. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  619. + */
  620. +
  621. +#include <asm/au1000.h>
  622. +#include <asm/au1xxx_gpio.h>
  623. +
  624. +#define gpio1 sys
  625. +#if !defined(CONFIG_SOC_AU1000)
  626. +static AU1X00_GPIO2 * const gpio2 = (AU1X00_GPIO2 *)GPIO2_BASE;
  627. +
  628. +#define GPIO2_OUTPUT_ENABLE_MASK 0x00010000
  629. +
  630. +int au1xxx_gpio2_read(int signal)
  631. +{
  632. + signal -= 200;
  633. +/* gpio2->dir &= ~(0x01 << signal); //Set GPIO to input */
  634. + return ((gpio2->pinstate >> signal) & 0x01);
  635. +}
  636. +
  637. +void au1xxx_gpio2_write(int signal, int value)
  638. +{
  639. + signal -= 200;
  640. +
  641. + gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << signal) |
  642. + (value << signal);
  643. +}
  644. +
  645. +void au1xxx_gpio2_tristate(int signal)
  646. +{
  647. + signal -= 200;
  648. + gpio2->dir &= ~(0x01 << signal); /* Set GPIO to input */
  649. +}
  650. +#endif
  651. +
  652. +int au1xxx_gpio1_read(int signal)
  653. +{
  654. +/* gpio1->trioutclr |= (0x01 << signal); */
  655. + return ((gpio1->pinstaterd >> signal) & 0x01);
  656. +}
  657. +
  658. +void au1xxx_gpio1_write(int signal, int value)
  659. +{
  660. + if(value)
  661. + gpio1->outputset = (0x01 << signal);
  662. + else
  663. + gpio1->outputclr = (0x01 << signal); /* Output a Zero */
  664. +}
  665. +
  666. +void au1xxx_gpio1_tristate(int signal)
  667. +{
  668. + gpio1->trioutclr = (0x01 << signal); /* Tristate signal */
  669. +}
  670. +
  671. +
  672. +int au1xxx_gpio_read(int signal)
  673. +{
  674. + if(signal >= 200)
  675. +#if defined(CONFIG_SOC_AU1000)
  676. + return 0;
  677. +#else
  678. + return au1xxx_gpio2_read(signal);
  679. +#endif
  680. + else
  681. + return au1xxx_gpio1_read(signal);
  682. +}
  683. +
  684. +void au1xxx_gpio_write(int signal, int value)
  685. +{
  686. + if(signal >= 200)
  687. +#if defined(CONFIG_SOC_AU1000)
  688. + ;
  689. +#else
  690. + au1xxx_gpio2_write(signal, value);
  691. +#endif
  692. + else
  693. + au1xxx_gpio1_write(signal, value);
  694. +}
  695. +
  696. +void au1xxx_gpio_tristate(int signal)
  697. +{
  698. + if(signal >= 200)
  699. +#if defined(CONFIG_SOC_AU1000)
  700. + ;
  701. +#else
  702. + au1xxx_gpio2_tristate(signal);
  703. +#endif
  704. + else
  705. + au1xxx_gpio1_tristate(signal);
  706. +}
  707. +
  708. +void au1xxx_gpio1_set_inputs(void)
  709. +{
  710. + gpio1->pininputen = 0;
  711. +}
  712. +
  713. +EXPORT_SYMBOL(au1xxx_gpio1_set_inputs);
  714. +EXPORT_SYMBOL(au1xxx_gpio_tristate);
  715. +EXPORT_SYMBOL(au1xxx_gpio_write);
  716. +EXPORT_SYMBOL(au1xxx_gpio_read);
  717. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/irq.c linux-2.4.32-rc1.mips/arch/mips/au1000/common/irq.c
  718. --- linux-2.4.32-rc1/arch/mips/au1000/common/irq.c 2005-01-19 15:09:26.000000000 +0100
  719. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/irq.c 2005-03-13 08:56:57.000000000 +0100
  720. @@ -303,8 +303,30 @@
  721. };
  722. #ifdef CONFIG_PM
  723. -void startup_match20_interrupt(void)
  724. +void startup_match20_interrupt(void (*handler)(int, void *, struct pt_regs *))
  725. {
  726. + static struct irqaction action;
  727. + /* This is a big problem.... since we didn't use request_irq
  728. + when kernel/irq.c calls probe_irq_xxx this interrupt will
  729. + be probed for usage. This will end up disabling the device :(
  730. +
  731. + Give it a bogus "action" pointer -- this will keep it from
  732. + getting auto-probed!
  733. +
  734. + By setting the status to match that of request_irq() we
  735. + can avoid it. --cgray
  736. + */
  737. + action.dev_id = handler;
  738. + action.flags = 0;
  739. + action.mask = 0;
  740. + action.name = "Au1xxx TOY";
  741. + action.handler = handler;
  742. + action.next = NULL;
  743. +
  744. + irq_desc[AU1000_TOY_MATCH2_INT].action = &action;
  745. + irq_desc[AU1000_TOY_MATCH2_INT].status
  746. + &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
  747. +
  748. local_enable_irq(AU1000_TOY_MATCH2_INT);
  749. }
  750. #endif
  751. @@ -508,6 +530,7 @@
  752. if (!intc0_req0) return;
  753. +#ifdef AU1000_USB_DEV_REQ_INT
  754. /*
  755. * Because of the tight timing of SETUP token to reply
  756. * transactions, the USB devices-side packet complete
  757. @@ -518,6 +541,7 @@
  758. do_IRQ(AU1000_USB_DEV_REQ_INT, regs);
  759. return;
  760. }
  761. +#endif
  762. irq = au_ffs(intc0_req0) - 1;
  763. intc0_req0 &= ~(1<<irq);
  764. @@ -536,17 +560,7 @@
  765. irq = au_ffs(intc0_req1) - 1;
  766. intc0_req1 &= ~(1<<irq);
  767. -#ifdef CONFIG_PM
  768. - if (irq == AU1000_TOY_MATCH2_INT) {
  769. - mask_and_ack_rise_edge_irq(irq);
  770. - counter0_irq(irq, NULL, regs);
  771. - local_enable_irq(irq);
  772. - }
  773. - else
  774. -#endif
  775. - {
  776. - do_IRQ(irq, regs);
  777. - }
  778. + do_IRQ(irq, regs);
  779. }
  780. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/Makefile linux-2.4.32-rc1.mips/arch/mips/au1000/common/Makefile
  781. --- linux-2.4.32-rc1/arch/mips/au1000/common/Makefile 2005-01-19 15:09:26.000000000 +0100
  782. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/Makefile 2005-01-30 09:01:27.000000000 +0100
  783. @@ -19,9 +19,9 @@
  784. export-objs = prom.o clocks.o power.o usbdev.o
  785. obj-y := prom.o int-handler.o irq.o puts.o time.o reset.o cputable.o \
  786. - au1xxx_irqmap.o clocks.o power.o setup.o sleeper.o dma.o dbdma.o
  787. + au1xxx_irqmap.o clocks.o power.o setup.o sleeper.o dma.o dbdma.o gpio.o
  788. -export-objs += dma.o dbdma.o
  789. +export-objs += dma.o dbdma.o gpio.o
  790. obj-$(CONFIG_AU1X00_USB_DEVICE) += usbdev.o
  791. obj-$(CONFIG_KGDB) += dbg_io.o
  792. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/pci_fixup.c linux-2.4.32-rc1.mips/arch/mips/au1000/common/pci_fixup.c
  793. --- linux-2.4.32-rc1/arch/mips/au1000/common/pci_fixup.c 2005-01-19 15:09:26.000000000 +0100
  794. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/pci_fixup.c 2004-12-03 09:00:32.000000000 +0100
  795. @@ -75,9 +75,13 @@
  796. #ifdef CONFIG_NONCOHERENT_IO
  797. /*
  798. - * Set the NC bit in controller for pre-AC silicon
  799. + * Set the NC bit in controller for Au1500 pre-AC silicon
  800. */
  801. - au_writel( 1<<16 | au_readl(Au1500_PCI_CFG), Au1500_PCI_CFG);
  802. + u32 prid = read_c0_prid();
  803. + if ( (prid & 0xFF000000) == 0x01000000 && prid < 0x01030202) {
  804. + au_writel( 1<<16 | au_readl(Au1500_PCI_CFG), Au1500_PCI_CFG);
  805. + printk("Non-coherent PCI accesses enabled\n");
  806. + }
  807. printk("Non-coherent PCI accesses enabled\n");
  808. #endif
  809. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/pci_ops.c linux-2.4.32-rc1.mips/arch/mips/au1000/common/pci_ops.c
  810. --- linux-2.4.32-rc1/arch/mips/au1000/common/pci_ops.c 2004-02-18 14:36:30.000000000 +0100
  811. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/pci_ops.c 2005-02-27 23:14:24.000000000 +0100
  812. @@ -162,6 +162,7 @@
  813. static int config_access(unsigned char access_type, struct pci_dev *dev,
  814. unsigned char where, u32 * data)
  815. {
  816. + int error = PCIBIOS_SUCCESSFUL;
  817. #if defined( CONFIG_SOC_AU1500 ) || defined( CONFIG_SOC_AU1550 )
  818. unsigned char bus = dev->bus->number;
  819. unsigned int dev_fn = dev->devfn;
  820. @@ -170,7 +171,6 @@
  821. unsigned long offset, status;
  822. unsigned long cfg_base;
  823. unsigned long flags;
  824. - int error = PCIBIOS_SUCCESSFUL;
  825. unsigned long entryLo0, entryLo1;
  826. if (device > 19) {
  827. @@ -205,9 +205,8 @@
  828. last_entryLo0 = last_entryLo1 = 0xffffffff;
  829. }
  830. - /* Since the Au1xxx doesn't do the idsel timing exactly to spec,
  831. - * many board vendors implement their own off-chip idsel, so call
  832. - * it now. If it doesn't succeed, may as well bail out at this point.
  833. + /* Allow board vendors to implement their own off-chip idsel.
  834. + * If it doesn't succeed, may as well bail out at this point.
  835. */
  836. if (board_pci_idsel) {
  837. if (board_pci_idsel(device, 1) == 0) {
  838. @@ -271,8 +270,11 @@
  839. }
  840. local_irq_restore(flags);
  841. - return error;
  842. +#else
  843. + /* Fake out Config space access with no responder */
  844. + *data = 0xFFFFFFFF;
  845. #endif
  846. + return error;
  847. }
  848. #endif
  849. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/power.c linux-2.4.32-rc1.mips/arch/mips/au1000/common/power.c
  850. --- linux-2.4.32-rc1/arch/mips/au1000/common/power.c 2005-01-19 15:09:26.000000000 +0100
  851. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/power.c 2005-04-07 02:37:19.000000000 +0200
  852. @@ -50,7 +50,6 @@
  853. static void calibrate_delay(void);
  854. -extern void set_au1x00_speed(unsigned int new_freq);
  855. extern unsigned int get_au1x00_speed(void);
  856. extern unsigned long get_au1x00_uart_baud_base(void);
  857. extern void set_au1x00_uart_baud_base(unsigned long new_baud_base);
  858. @@ -116,6 +115,7 @@
  859. sleep_uart0_clkdiv = au_readl(UART0_ADDR + UART_CLK);
  860. sleep_uart0_enable = au_readl(UART0_ADDR + UART_MOD_CNTRL);
  861. +#ifndef CONFIG_SOC_AU1200
  862. /* Shutdown USB host/device.
  863. */
  864. sleep_usbhost_enable = au_readl(USB_HOST_CONFIG);
  865. @@ -127,6 +127,7 @@
  866. sleep_usbdev_enable = au_readl(USBD_ENABLE);
  867. au_writel(0, USBD_ENABLE); au_sync();
  868. +#endif
  869. /* Save interrupt controller state.
  870. */
  871. @@ -212,14 +213,12 @@
  872. int au_sleep(void)
  873. {
  874. unsigned long wakeup, flags;
  875. - extern void save_and_sleep(void);
  876. + extern unsigned int save_and_sleep(void);
  877. spin_lock_irqsave(&pm_lock,flags);
  878. save_core_regs();
  879. - flush_cache_all();
  880. -
  881. /** The code below is all system dependent and we should probably
  882. ** have a function call out of here to set this up. You need
  883. ** to configure the GPIO or timer interrupts that will bring
  884. @@ -227,27 +226,26 @@
  885. ** For testing, the TOY counter wakeup is useful.
  886. **/
  887. -#if 0
  888. +#if 1
  889. au_writel(au_readl(SYS_PINSTATERD) & ~(1 << 11), SYS_PINSTATERD);
  890. /* gpio 6 can cause a wake up event */
  891. wakeup = au_readl(SYS_WAKEMSK);
  892. wakeup &= ~(1 << 8); /* turn off match20 wakeup */
  893. - wakeup |= 1 << 6; /* turn on gpio 6 wakeup */
  894. + wakeup = 1 << 5; /* turn on gpio 6 wakeup */
  895. #else
  896. - /* For testing, allow match20 to wake us up.
  897. - */
  898. + /* For testing, allow match20 to wake us up. */
  899. #ifdef SLEEP_TEST_TIMEOUT
  900. wakeup_counter0_set(sleep_ticks);
  901. #endif
  902. wakeup = 1 << 8; /* turn on match20 wakeup */
  903. wakeup = 0;
  904. #endif
  905. - au_writel(1, SYS_WAKESRC); /* clear cause */
  906. + au_writel(0, SYS_WAKESRC); /* clear cause */
  907. au_sync();
  908. au_writel(wakeup, SYS_WAKEMSK);
  909. au_sync();
  910. -
  911. + DPRINTK("Entering sleep!\n");
  912. save_and_sleep();
  913. /* after a wakeup, the cpu vectors back to 0x1fc00000 so
  914. @@ -255,6 +253,7 @@
  915. */
  916. restore_core_regs();
  917. spin_unlock_irqrestore(&pm_lock, flags);
  918. + DPRINTK("Leaving sleep!\n");
  919. return 0;
  920. }
  921. @@ -285,7 +284,6 @@
  922. if (retval)
  923. return retval;
  924. -
  925. au_sleep();
  926. retval = pm_send_all(PM_RESUME, (void *) 0);
  927. }
  928. @@ -296,7 +294,6 @@
  929. void *buffer, size_t * len)
  930. {
  931. int retval = 0;
  932. - void au1k_wait(void);
  933. if (!write) {
  934. *len = 0;
  935. @@ -305,119 +302,9 @@
  936. if (retval)
  937. return retval;
  938. suspend_mode = 1;
  939. - au1k_wait();
  940. - retval = pm_send_all(PM_RESUME, (void *) 0);
  941. - }
  942. - return retval;
  943. -}
  944. -
  945. -static int pm_do_freq(ctl_table * ctl, int write, struct file *file,
  946. - void *buffer, size_t * len)
  947. -{
  948. - int retval = 0, i;
  949. - unsigned long val, pll;
  950. -#define TMPBUFLEN 64
  951. -#define MAX_CPU_FREQ 396
  952. - char buf[TMPBUFLEN], *p;
  953. - unsigned long flags, intc0_mask, intc1_mask;
  954. - unsigned long old_baud_base, old_cpu_freq, baud_rate, old_clk,
  955. - old_refresh;
  956. - unsigned long new_baud_base, new_cpu_freq, new_clk, new_refresh;
  957. -
  958. - spin_lock_irqsave(&pm_lock, flags);
  959. - if (!write) {
  960. - *len = 0;
  961. - } else {
  962. - /* Parse the new frequency */
  963. - if (*len > TMPBUFLEN - 1) {
  964. - spin_unlock_irqrestore(&pm_lock, flags);
  965. - return -EFAULT;
  966. - }
  967. - if (copy_from_user(buf, buffer, *len)) {
  968. - spin_unlock_irqrestore(&pm_lock, flags);
  969. - return -EFAULT;
  970. - }
  971. - buf[*len] = 0;
  972. - p = buf;
  973. - val = simple_strtoul(p, &p, 0);
  974. - if (val > MAX_CPU_FREQ) {
  975. - spin_unlock_irqrestore(&pm_lock, flags);
  976. - return -EFAULT;
  977. - }
  978. -
  979. - pll = val / 12;
  980. - if ((pll > 33) || (pll < 7)) { /* 396 MHz max, 84 MHz min */
  981. - /* revisit this for higher speed cpus */
  982. - spin_unlock_irqrestore(&pm_lock, flags);
  983. - return -EFAULT;
  984. - }
  985. -
  986. - old_baud_base = get_au1x00_uart_baud_base();
  987. - old_cpu_freq = get_au1x00_speed();
  988. -
  989. - new_cpu_freq = pll * 12 * 1000000;
  990. - new_baud_base = (new_cpu_freq / (2 * ((int)(au_readl(SYS_POWERCTRL)&0x03) + 2) * 16));
  991. - set_au1x00_speed(new_cpu_freq);
  992. - set_au1x00_uart_baud_base(new_baud_base);
  993. -
  994. - old_refresh = au_readl(MEM_SDREFCFG) & 0x1ffffff;
  995. - new_refresh =
  996. - ((old_refresh * new_cpu_freq) /
  997. - old_cpu_freq) | (au_readl(MEM_SDREFCFG) & ~0x1ffffff);
  998. -
  999. - au_writel(pll, SYS_CPUPLL);
  1000. - au_sync_delay(1);
  1001. - au_writel(new_refresh, MEM_SDREFCFG);
  1002. - au_sync_delay(1);
  1003. -
  1004. - for (i = 0; i < 4; i++) {
  1005. - if (au_readl
  1006. - (UART_BASE + UART_MOD_CNTRL +
  1007. - i * 0x00100000) == 3) {
  1008. - old_clk =
  1009. - au_readl(UART_BASE + UART_CLK +
  1010. - i * 0x00100000);
  1011. - // baud_rate = baud_base/clk
  1012. - baud_rate = old_baud_base / old_clk;
  1013. - /* we won't get an exact baud rate and the error
  1014. - * could be significant enough that our new
  1015. - * calculation will result in a clock that will
  1016. - * give us a baud rate that's too far off from
  1017. - * what we really want.
  1018. - */
  1019. - if (baud_rate > 100000)
  1020. - baud_rate = 115200;
  1021. - else if (baud_rate > 50000)
  1022. - baud_rate = 57600;
  1023. - else if (baud_rate > 30000)
  1024. - baud_rate = 38400;
  1025. - else if (baud_rate > 17000)
  1026. - baud_rate = 19200;
  1027. - else
  1028. - (baud_rate = 9600);
  1029. - // new_clk = new_baud_base/baud_rate
  1030. - new_clk = new_baud_base / baud_rate;
  1031. - au_writel(new_clk,
  1032. - UART_BASE + UART_CLK +
  1033. - i * 0x00100000);
  1034. - au_sync_delay(10);
  1035. - }
  1036. - }
  1037. + retval = pm_send_all(PM_RESUME, (void *) 0);
  1038. }
  1039. -
  1040. -
  1041. - /* We don't want _any_ interrupts other than
  1042. - * match20. Otherwise our calibrate_delay()
  1043. - * calculation will be off, potentially a lot.
  1044. - */
  1045. - intc0_mask = save_local_and_disable(0);
  1046. - intc1_mask = save_local_and_disable(1);
  1047. - local_enable_irq(AU1000_TOY_MATCH2_INT);
  1048. - spin_unlock_irqrestore(&pm_lock, flags);
  1049. - calibrate_delay();
  1050. - restore_local_and_enable(0, intc0_mask);
  1051. - restore_local_and_enable(1, intc1_mask);
  1052. return retval;
  1053. }
  1054. @@ -425,7 +312,6 @@
  1055. static struct ctl_table pm_table[] = {
  1056. {ACPI_S1_SLP_TYP, "suspend", NULL, 0, 0600, NULL, &pm_do_suspend},
  1057. {ACPI_SLEEP, "sleep", NULL, 0, 0600, NULL, &pm_do_sleep},
  1058. - {CTL_ACPI, "freq", NULL, 0, 0600, NULL, &pm_do_freq},
  1059. {0}
  1060. };
  1061. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/reset.c linux-2.4.32-rc1.mips/arch/mips/au1000/common/reset.c
  1062. --- linux-2.4.32-rc1/arch/mips/au1000/common/reset.c 2005-01-19 15:09:26.000000000 +0100
  1063. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/reset.c 2005-03-19 08:17:51.000000000 +0100
  1064. @@ -37,8 +37,6 @@
  1065. #include <asm/system.h>
  1066. #include <asm/au1000.h>
  1067. -extern int au_sleep(void);
  1068. -
  1069. void au1000_restart(char *command)
  1070. {
  1071. /* Set all integrated peripherals to disabled states */
  1072. @@ -144,6 +142,26 @@
  1073. au_writel(0x00, 0xb1900064); /* sys_auxpll */
  1074. au_writel(0x00, 0xb1900100); /* sys_pininputen */
  1075. break;
  1076. + case 0x04000000: /* Au1200 */
  1077. + au_writel(0x00, 0xb400300c); /* ddma */
  1078. + au_writel(0x00, 0xb1a00004); /* psc 0 */
  1079. + au_writel(0x00, 0xb1b00004); /* psc 1 */
  1080. + au_writel(0x00d02000, 0xb4020004); /* ehci, ohci, udc, otg */
  1081. + au_writel(0x00, 0xb5000004); /* lcd */
  1082. + au_writel(0x00, 0xb060000c); /* sd0 */
  1083. + au_writel(0x00, 0xb068000c); /* sd1 */
  1084. + au_writel(0x00, 0xb1100100); /* swcnt */
  1085. + au_writel(0x00, 0xb0300000); /* aes */
  1086. + au_writel(0x00, 0xb4004000); /* cim */
  1087. + au_writel(0x00, 0xb1100100); /* uart0_enable */
  1088. + au_writel(0x00, 0xb1200100); /* uart1_enable */
  1089. + au_writel(0x00, 0xb1900020); /* sys_freqctrl0 */
  1090. + au_writel(0x00, 0xb1900024); /* sys_freqctrl1 */
  1091. + au_writel(0x00, 0xb1900028); /* sys_clksrc */
  1092. + au_writel(0x10, 0xb1900060); /* sys_cpupll */
  1093. + au_writel(0x00, 0xb1900064); /* sys_auxpll */
  1094. + au_writel(0x00, 0xb1900100); /* sys_pininputen */
  1095. + break;
  1096. default:
  1097. break;
  1098. @@ -163,32 +181,23 @@
  1099. void au1000_halt(void)
  1100. {
  1101. -#if defined(CONFIG_MIPS_PB1550)
  1102. - /* power off system */
  1103. - printk("\n** Powering off Pb1550\n");
  1104. - au_writew(au_readw(0xAF00001C) | (3<<14), 0xAF00001C);
  1105. - au_sync();
  1106. - while(1); /* should not get here */
  1107. -#endif
  1108. - printk(KERN_NOTICE "\n** You can safely turn off the power\n");
  1109. -#ifdef CONFIG_MIPS_MIRAGE
  1110. - au_writel((1 << 26) | (1 << 10), GPIO2_OUTPUT);
  1111. -#endif
  1112. -#ifdef CONFIG_PM
  1113. - au_sleep();
  1114. -
  1115. - /* should not get here */
  1116. - printk(KERN_ERR "Unable to put cpu in sleep mode\n");
  1117. - while(1);
  1118. -#else
  1119. - while (1)
  1120. + /* Use WAIT in a low-power infinite spin loop */
  1121. + while (1) {
  1122. __asm__(".set\tmips3\n\t"
  1123. "wait\n\t"
  1124. ".set\tmips0");
  1125. -#endif
  1126. + }
  1127. }
  1128. void au1000_power_off(void)
  1129. {
  1130. + extern void board_power_off (void);
  1131. +
  1132. + printk(KERN_NOTICE "\n** You can safely turn off the power\n");
  1133. +
  1134. + /* Give board a chance to power-off */
  1135. + board_power_off();
  1136. +
  1137. + /* If board can't power-off, spin forever */
  1138. au1000_halt();
  1139. }
  1140. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/setup.c linux-2.4.32-rc1.mips/arch/mips/au1000/common/setup.c
  1141. --- linux-2.4.32-rc1/arch/mips/au1000/common/setup.c 2005-01-19 15:09:26.000000000 +0100
  1142. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/setup.c 2005-01-30 09:01:27.000000000 +0100
  1143. @@ -174,6 +174,40 @@
  1144. initrd_end = (unsigned long)&__rd_end;
  1145. #endif
  1146. +#if defined(CONFIG_SOC_AU1200)
  1147. +#ifdef CONFIG_USB_EHCI_HCD
  1148. + if ((argptr = strstr(argptr, "usb_ehci=")) == NULL) {
  1149. + char usb_args[80];
  1150. + argptr = prom_getcmdline();
  1151. + memset(usb_args, 0, sizeof(usb_args));
  1152. + sprintf(usb_args, " usb_ehci=base:0x%x,len:0x%x,irq:%d",
  1153. + USB_EHCI_BASE, USB_EHCI_LEN, AU1000_USB_HOST_INT);
  1154. + strcat(argptr, usb_args);
  1155. + }
  1156. +#ifdef CONFIG_USB_AMD5536UDC
  1157. + /* enable EHC + OHC + UDC clocks, memory and bus mastering */
  1158. +/* au_writel( 0x00DF207F, USB_MSR_BASE + 4); */
  1159. + au_writel( 0xC0DF207F, USB_MSR_BASE + 4); // incl. prefetch
  1160. +#else
  1161. + /* enable EHC + OHC clocks, memory and bus mastering */
  1162. +/* au_writel( 0x00DB200F, USB_MSR_BASE + 4); */
  1163. + au_writel( 0xC0DB200F, USB_MSR_BASE + 4); /* incl. prefetch */
  1164. +#endif
  1165. + udelay(1000);
  1166. +
  1167. +#else /* CONFIG_USB_EHCI_HCD */
  1168. +
  1169. +#ifdef CONFIG_USB_AMD5536UDC
  1170. +#ifndef CONFIG_USB_OHCI
  1171. + /* enable UDC clocks, memory and bus mastering */
  1172. +/* au_writel( 0x00DC2070, USB_MSR_BASE + 4); */
  1173. + au_writel( 0xC0DC2070, USB_MSR_BASE + 4); // incl. prefetch
  1174. + udelay(1000);
  1175. +#endif
  1176. +#endif
  1177. +#endif /* CONFIG_USB_EHCI_HCD */
  1178. +#endif /* CONFIG_SOC_AU1200 */
  1179. +
  1180. #if defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
  1181. #ifdef CONFIG_USB_OHCI
  1182. if ((argptr = strstr(argptr, "usb_ohci=")) == NULL) {
  1183. @@ -187,19 +221,38 @@
  1184. #endif
  1185. #ifdef CONFIG_USB_OHCI
  1186. - // enable host controller and wait for reset done
  1187. +#if defined(CONFIG_SOC_AU1200)
  1188. +#ifndef CONFIG_USB_EHCI_HCD
  1189. +#ifdef CONFIG_USB_AMD5536UDC
  1190. + /* enable OHC + UDC clocks, memory and bus mastering */
  1191. +/* au_writel( 0x00DD2073, USB_MSR_BASE + 4); */
  1192. + au_writel( 0xC0DD2073, USB_MSR_BASE + 4); // incl. prefetch
  1193. +#else
  1194. + /* enable OHC clocks, memory and bus mastering */
  1195. + au_writel( 0x00D12003, USB_MSR_BASE + 4);
  1196. +#endif
  1197. + udelay(1000);
  1198. +printk("DEBUG: Reading Au1200 USB2 reg 0x%x\n", au_readl(USB_MSR_BASE + 4));
  1199. +#endif
  1200. +#else
  1201. + /* Au1000, Au1500, Au1100, Au1550 */
  1202. + /* enable host controller and wait for reset done */
  1203. au_writel(0x08, USB_HOST_CONFIG);
  1204. udelay(1000);
  1205. au_writel(0x0E, USB_HOST_CONFIG);
  1206. udelay(1000);
  1207. - au_readl(USB_HOST_CONFIG); // throw away first read
  1208. + au_readl(USB_HOST_CONFIG); /* throw away first read */
  1209. while (!(au_readl(USB_HOST_CONFIG) & 0x10))
  1210. au_readl(USB_HOST_CONFIG);
  1211. +#endif /* CONFIG_SOC_AU1200 */
  1212. #endif
  1213. -#endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
  1214. +#else
  1215. +
  1216. +#endif /* defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) */
  1217. +
  1218. #ifdef CONFIG_FB
  1219. - // Needed if PCI video card in use
  1220. + /* Needed if PCI video card in use */
  1221. conswitchp = &dummy_con;
  1222. #endif
  1223. @@ -209,8 +262,7 @@
  1224. #endif
  1225. #ifdef CONFIG_BLK_DEV_IDE
  1226. - /* Board setup takes precedence for unique devices.
  1227. - */
  1228. + /* Board setup takes precedence for unique devices. */
  1229. if ((ide_ops == NULL) || (ide_ops == &no_ide_ops))
  1230. ide_ops = &std_ide_ops;
  1231. #endif
  1232. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/sleeper.S linux-2.4.32-rc1.mips/arch/mips/au1000/common/sleeper.S
  1233. --- linux-2.4.32-rc1/arch/mips/au1000/common/sleeper.S 2004-02-18 14:36:30.000000000 +0100
  1234. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/sleeper.S 2005-01-30 09:01:27.000000000 +0100
  1235. @@ -15,17 +15,48 @@
  1236. #include <asm/addrspace.h>
  1237. #include <asm/regdef.h>
  1238. #include <asm/stackframe.h>
  1239. +#include <asm/au1000.h>
  1240. +
  1241. +/*
  1242. + * Note: This file is *not* conditional on CONFIG_PM since Alchemy sleep
  1243. + * need not be tied to any particular power management scheme.
  1244. + */
  1245. +
  1246. + .extern ___flush_cache_all
  1247. .text
  1248. - .set macro
  1249. - .set noat
  1250. .align 5
  1251. -/* Save all of the processor general registers and go to sleep.
  1252. - * A wakeup condition will get us back here to restore the registers.
  1253. +/*
  1254. + * Save the processor general registers and go to sleep. A wakeup
  1255. + * condition will get us back here to restore the registers.
  1256. */
  1257. -LEAF(save_and_sleep)
  1258. +/* still need to fix alignment issues here */
  1259. +save_and_sleep_frmsz = 48
  1260. +NESTED(save_and_sleep, save_and_sleep_frmsz, ra)
  1261. + .set noreorder
  1262. + .set nomacro
  1263. + .set noat
  1264. + subu sp, save_and_sleep_frmsz
  1265. + sw ra, save_and_sleep_frmsz-4(sp)
  1266. + sw s0, save_and_sleep_frmsz-8(sp)
  1267. + sw s1, save_and_sleep_frmsz-12(sp)
  1268. + sw s2, save_and_sleep_frmsz-16(sp)
  1269. + sw s3, save_and_sleep_frmsz-20(sp)
  1270. + sw s4, save_and_sleep_frmsz-24(sp)
  1271. + sw s5, save_and_sleep_frmsz-28(sp)
  1272. + sw s6, save_and_sleep_frmsz-32(sp)
  1273. + sw s7, save_and_sleep_frmsz-36(sp)
  1274. + sw s8, save_and_sleep_frmsz-40(sp)
  1275. + sw gp, save_and_sleep_frmsz-44(sp)
  1276. +
  1277. + /* We only need to save the registers that the calling function
  1278. + * hasn't saved for us. 0 is always zero. 8 - 15, 24 and 25 are
  1279. + * temporaries and can be used without saving. 26 and 27 are reserved
  1280. + * for interrupt/trap handling and expected to change. 29 is the
  1281. + * stack pointer which is handled as a special case here.
  1282. + */
  1283. subu sp, PT_SIZE
  1284. sw $1, PT_R1(sp)
  1285. sw $2, PT_R2(sp)
  1286. @@ -34,14 +65,6 @@
  1287. sw $5, PT_R5(sp)
  1288. sw $6, PT_R6(sp)
  1289. sw $7, PT_R7(sp)
  1290. - sw $8, PT_R8(sp)
  1291. - sw $9, PT_R9(sp)
  1292. - sw $10, PT_R10(sp)
  1293. - sw $11, PT_R11(sp)
  1294. - sw $12, PT_R12(sp)
  1295. - sw $13, PT_R13(sp)
  1296. - sw $14, PT_R14(sp)
  1297. - sw $15, PT_R15(sp)
  1298. sw $16, PT_R16(sp)
  1299. sw $17, PT_R17(sp)
  1300. sw $18, PT_R18(sp)
  1301. @@ -50,32 +73,47 @@
  1302. sw $21, PT_R21(sp)
  1303. sw $22, PT_R22(sp)
  1304. sw $23, PT_R23(sp)
  1305. - sw $24, PT_R24(sp)
  1306. - sw $25, PT_R25(sp)
  1307. - sw $26, PT_R26(sp)
  1308. - sw $27, PT_R27(sp)
  1309. sw $28, PT_R28(sp)
  1310. - sw $29, PT_R29(sp)
  1311. sw $30, PT_R30(sp)
  1312. sw $31, PT_R31(sp)
  1313. +#define PT_C0STATUS PT_LO
  1314. +#define PT_CONTEXT PT_HI
  1315. +#define PT_PAGEMASK PT_EPC
  1316. +#define PT_CONFIG PT_BVADDR
  1317. mfc0 k0, CP0_STATUS
  1318. - sw k0, 0x20(sp)
  1319. + sw k0, PT_C0STATUS(sp) // 0x20
  1320. mfc0 k0, CP0_CONTEXT
  1321. - sw k0, 0x1c(sp)
  1322. + sw k0, PT_CONTEXT(sp) // 0x1c
  1323. mfc0 k0, CP0_PAGEMASK
  1324. - sw k0, 0x18(sp)
  1325. + sw k0, PT_PAGEMASK(sp) // 0x18
  1326. mfc0 k0, CP0_CONFIG
  1327. - sw k0, 0x14(sp)
  1328. + sw k0, PT_CONFIG(sp) // 0x14
  1329. +
  1330. + .set macro
  1331. + .set at
  1332. +
  1333. + li t0, SYS_SLPPWR
  1334. + sw zero, 0(t0) /* Get the processor ready to sleep */
  1335. + sync
  1336. /* Now set up the scratch registers so the boot rom will
  1337. * return to this point upon wakeup.
  1338. + * sys_scratch0 : SP
  1339. + * sys_scratch1 : RA
  1340. + */
  1341. + li t0, SYS_SCRATCH0
  1342. + li t1, SYS_SCRATCH1
  1343. + sw sp, 0(t0)
  1344. + la k0, resume_from_sleep
  1345. + sw k0, 0(t1)
  1346. +
  1347. +/*
  1348. + * Flush DCACHE to make sure context is in memory
  1349. */
  1350. - la k0, 1f
  1351. - lui k1, 0xb190
  1352. - ori k1, 0x18
  1353. - sw sp, 0(k1)
  1354. - ori k1, 0x1c
  1355. - sw k0, 0(k1)
  1356. + la t1,___flush_cache_all /* _flush_cache_all is a function pointer */
  1357. + lw t0,0(t1)
  1358. + jal t0
  1359. + nop
  1360. /* Put SDRAM into self refresh. Preload instructions into cache,
  1361. * issue a precharge, then auto refresh, then sleep commands to it.
  1362. @@ -88,30 +126,65 @@
  1363. cache 0x14, 96(t0)
  1364. .set mips0
  1365. + /* Put SDRAM to sleep */
  1366. sdsleep:
  1367. - lui k0, 0xb400
  1368. - sw zero, 0x001c(k0) /* Precharge */
  1369. - sw zero, 0x0020(k0) /* Auto refresh */
  1370. - sw zero, 0x0030(k0) /* SDRAM sleep */
  1371. + li a0, MEM_PHYS_ADDR
  1372. + or a0, a0, 0xA0000000
  1373. +#if defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100) || defined(CONFIG_SOC_AU1500)
  1374. + lw k0, MEM_SDMODE0(a0)
  1375. + sw zero, MEM_SDPRECMD(a0) /* Precharge */
  1376. + sw zero, MEM_SDAUTOREF(a0) /* Auto Refresh */
  1377. + sw zero, MEM_SDSLEEP(a0) /* Sleep */
  1378. sync
  1379. -
  1380. - lui k1, 0xb190
  1381. - sw zero, 0x0078(k1) /* get ready to sleep */
  1382. +#endif
  1383. +#if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200)
  1384. + sw zero, MEM_SDPRECMD(a0) /* Precharge */
  1385. + sw zero, MEM_SDSREF(a0)
  1386. +
  1387. + #lw t0, MEM_SDSTAT(a0)
  1388. + #and t0, t0, 0x01000000
  1389. + li t0, 0x01000000
  1390. +refresh_not_set:
  1391. + lw t1, MEM_SDSTAT(a0)
  1392. + and t2, t1, t0
  1393. + beq zero, t2, refresh_not_set
  1394. + nop
  1395. +
  1396. + li t0, ~0x30000000
  1397. + lw t1, MEM_SDCONFIGA(a0)
  1398. + and t1, t0, t1
  1399. + sw t1, MEM_SDCONFIGA(a0)
  1400. sync
  1401. - sw zero, 0x007c(k1) /* Put processor to sleep */
  1402. +#endif
  1403. +
  1404. + li t0, SYS_SLEEP
  1405. + sw zero, 0(t0) /* Put processor to sleep */
  1406. sync
  1407. + nop
  1408. + nop
  1409. + nop
  1410. + nop
  1411. + nop
  1412. + nop
  1413. + nop
  1414. + nop
  1415. +
  1416. /* This is where we return upon wakeup.
  1417. * Reload all of the registers and return.
  1418. */
  1419. -1: nop
  1420. - lw k0, 0x20(sp)
  1421. +resume_from_sleep:
  1422. + nop
  1423. + .set nomacro
  1424. + .set noat
  1425. +
  1426. + lw k0, PT_C0STATUS(sp) // 0x20
  1427. mtc0 k0, CP0_STATUS
  1428. - lw k0, 0x1c(sp)
  1429. + lw k0, PT_CONTEXT(sp) // 0x1c
  1430. mtc0 k0, CP0_CONTEXT
  1431. - lw k0, 0x18(sp)
  1432. + lw k0, PT_PAGEMASK(sp) // 0x18
  1433. mtc0 k0, CP0_PAGEMASK
  1434. - lw k0, 0x14(sp)
  1435. + lw k0, PT_CONFIG(sp) // 0x14
  1436. mtc0 k0, CP0_CONFIG
  1437. lw $1, PT_R1(sp)
  1438. lw $2, PT_R2(sp)
  1439. @@ -120,14 +193,6 @@
  1440. lw $5, PT_R5(sp)
  1441. lw $6, PT_R6(sp)
  1442. lw $7, PT_R7(sp)
  1443. - lw $8, PT_R8(sp)
  1444. - lw $9, PT_R9(sp)
  1445. - lw $10, PT_R10(sp)
  1446. - lw $11, PT_R11(sp)
  1447. - lw $12, PT_R12(sp)
  1448. - lw $13, PT_R13(sp)
  1449. - lw $14, PT_R14(sp)
  1450. - lw $15, PT_R15(sp)
  1451. lw $16, PT_R16(sp)
  1452. lw $17, PT_R17(sp)
  1453. lw $18, PT_R18(sp)
  1454. @@ -136,15 +201,36 @@
  1455. lw $21, PT_R21(sp)
  1456. lw $22, PT_R22(sp)
  1457. lw $23, PT_R23(sp)
  1458. - lw $24, PT_R24(sp)
  1459. - lw $25, PT_R25(sp)
  1460. - lw $26, PT_R26(sp)
  1461. - lw $27, PT_R27(sp)
  1462. lw $28, PT_R28(sp)
  1463. - lw $29, PT_R29(sp)
  1464. lw $30, PT_R30(sp)
  1465. lw $31, PT_R31(sp)
  1466. +
  1467. + .set macro
  1468. + .set at
  1469. +
  1470. + /* clear the wake source, but save it as the return value of the function */
  1471. + li t0, SYS_WAKESRC
  1472. + lw v0, 0(t0)
  1473. + sw v0, PT_R2(sp)
  1474. + sw zero, 0(t0)
  1475. +
  1476. addiu sp, PT_SIZE
  1477. + lw gp, save_and_sleep_frmsz-44(sp)
  1478. + lw s8, save_and_sleep_frmsz-40(sp)
  1479. + lw s7, save_and_sleep_frmsz-36(sp)
  1480. + lw s6, save_and_sleep_frmsz-32(sp)
  1481. + lw s5, save_and_sleep_frmsz-28(sp)
  1482. + lw s4, save_and_sleep_frmsz-24(sp)
  1483. + lw s3, save_and_sleep_frmsz-20(sp)
  1484. + lw s2, save_and_sleep_frmsz-16(sp)
  1485. + lw s1, save_and_sleep_frmsz-12(sp)
  1486. + lw s0, save_and_sleep_frmsz-8(sp)
  1487. + lw ra, save_and_sleep_frmsz-4(sp)
  1488. +
  1489. + addu sp, save_and_sleep_frmsz
  1490. jr ra
  1491. + nop
  1492. + .set reorder
  1493. END(save_and_sleep)
  1494. +
  1495. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/common/time.c linux-2.4.32-rc1.mips/arch/mips/au1000/common/time.c
  1496. --- linux-2.4.32-rc1/arch/mips/au1000/common/time.c 2005-01-19 15:09:26.000000000 +0100
  1497. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/common/time.c 2005-04-08 10:33:17.000000000 +0200
  1498. @@ -50,7 +50,6 @@
  1499. #include <linux/mc146818rtc.h>
  1500. #include <linux/timex.h>
  1501. -extern void startup_match20_interrupt(void);
  1502. extern void do_softirq(void);
  1503. extern volatile unsigned long wall_jiffies;
  1504. unsigned long missed_heart_beats = 0;
  1505. @@ -59,14 +58,14 @@
  1506. static unsigned long r4k_cur; /* What counter should be at next timer irq */
  1507. extern rwlock_t xtime_lock;
  1508. int no_au1xxx_32khz;
  1509. -void (*au1k_wait_ptr)(void);
  1510. +extern int allow_au1k_wait; /* default off for CP0 Counter */
  1511. /* Cycle counter value at the previous timer interrupt.. */
  1512. static unsigned int timerhi = 0, timerlo = 0;
  1513. #ifdef CONFIG_PM
  1514. #define MATCH20_INC 328
  1515. -extern void startup_match20_interrupt(void);
  1516. +extern void startup_match20_interrupt(void (*handler)(int, void *, struct pt_regs *));
  1517. static unsigned long last_pc0, last_match20;
  1518. #endif
  1519. @@ -385,7 +384,6 @@
  1520. {
  1521. unsigned int est_freq;
  1522. extern unsigned long (*do_gettimeoffset)(void);
  1523. - extern void au1k_wait(void);
  1524. printk("calculating r4koff... ");
  1525. r4k_offset = cal_r4koff();
  1526. @@ -437,9 +435,6 @@
  1527. au_writel(0, SYS_TOYWRITE);
  1528. while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C0S);
  1529. - au_writel(au_readl(SYS_WAKEMSK) | (1<<8), SYS_WAKEMSK);
  1530. - au_writel(~0, SYS_WAKESRC);
  1531. - au_sync();
  1532. while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20);
  1533. /* setup match20 to interrupt once every 10ms */
  1534. @@ -447,13 +442,13 @@
  1535. au_writel(last_match20 + MATCH20_INC, SYS_TOYMATCH2);
  1536. au_sync();
  1537. while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20);
  1538. - startup_match20_interrupt();
  1539. + startup_match20_interrupt(counter0_irq);
  1540. do_gettimeoffset = do_fast_pm_gettimeoffset;
  1541. /* We can use the real 'wait' instruction.
  1542. */
  1543. - au1k_wait_ptr = au1k_wait;
  1544. + allow_au1k_wait = 1;
  1545. }
  1546. #else
  1547. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/db1x00/board_setup.c linux-2.4.32-rc1.mips/arch/mips/au1000/db1x00/board_setup.c
  1548. --- linux-2.4.32-rc1/arch/mips/au1000/db1x00/board_setup.c 2005-01-19 15:09:26.000000000 +0100
  1549. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/db1x00/board_setup.c 2005-03-19 08:17:51.000000000 +0100
  1550. @@ -46,10 +46,22 @@
  1551. #include <asm/au1000.h>
  1552. #include <asm/db1x00.h>
  1553. -extern struct rtc_ops no_rtc_ops;
  1554. +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX) && defined(CONFIG_MIPS_DB1550)
  1555. +#include <asm/au1xxx_dbdma.h>
  1556. +extern struct ide_ops *ide_ops;
  1557. +extern struct ide_ops au1xxx_ide_ops;
  1558. +extern u32 au1xxx_ide_virtbase;
  1559. +extern u64 au1xxx_ide_physbase;
  1560. +extern int au1xxx_ide_irq;
  1561. +
  1562. +/* Ddma */
  1563. +chan_tab_t *ide_read_ch, *ide_write_ch;
  1564. +u32 au1xxx_ide_ddma_enable = 0, switch4ddma = 1; // PIO+ddma
  1565. +
  1566. +dbdev_tab_t new_dbdev_tab_element = { DSCR_CMD0_THROTTLE, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 };
  1567. +#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX */
  1568. -/* not correct for db1550 */
  1569. -static BCSR * const bcsr = (BCSR *)0xAE000000;
  1570. +extern struct rtc_ops no_rtc_ops;
  1571. void board_reset (void)
  1572. {
  1573. @@ -57,6 +69,13 @@
  1574. au_writel(0x00000000, 0xAE00001C);
  1575. }
  1576. +void board_power_off (void)
  1577. +{
  1578. +#ifdef CONFIG_MIPS_MIRAGE
  1579. + au_writel((1 << 26) | (1 << 10), GPIO2_OUTPUT);
  1580. +#endif
  1581. +}
  1582. +
  1583. void __init board_setup(void)
  1584. {
  1585. u32 pin_func;
  1586. @@ -108,8 +127,42 @@
  1587. au_writel(0x02000200, GPIO2_OUTPUT);
  1588. #endif
  1589. +#if defined(CONFIG_AU1XXX_SMC91111)
  1590. +#define CPLD_CONTROL (0xAF00000C)
  1591. + {
  1592. + extern uint32_t au1xxx_smc91111_base;
  1593. + extern unsigned int au1xxx_smc91111_irq;
  1594. + extern int au1xxx_smc91111_nowait;
  1595. +
  1596. + au1xxx_smc91111_base = 0xAC000300;
  1597. + au1xxx_smc91111_irq = AU1000_GPIO_8;
  1598. + au1xxx_smc91111_nowait = 1;
  1599. +
  1600. + /* set up the Static Bus timing - only 396Mhz */
  1601. + bcsr->resets |= 0x7;
  1602. + au_writel(0x00010003, MEM_STCFG0);
  1603. + au_writel(0x000c00c0, MEM_STCFG2);
  1604. + au_writel(0x85E1900D, MEM_STTIME2);
  1605. + }
  1606. +#endif /* end CONFIG_SMC91111 */
  1607. au_sync();
  1608. +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX) && defined(CONFIG_MIPS_DB1550)
  1609. + /*
  1610. + * Iniz IDE parameters
  1611. + */
  1612. + ide_ops = &au1xxx_ide_ops;
  1613. + au1xxx_ide_irq = DAUGHTER_CARD_IRQ;
  1614. + au1xxx_ide_physbase = AU1XXX_ATA_PHYS_ADDR;
  1615. + au1xxx_ide_virtbase = KSEG1ADDR(AU1XXX_ATA_PHYS_ADDR);
  1616. +
  1617. + /*
  1618. + * change PIO or PIO+Ddma
  1619. + * check the GPIO-6 pin condition. db1550:s6_dot
  1620. + */
  1621. + switch4ddma = (au_readl(SYS_PINSTATERD) & (1 << 6)) ? 1 : 0;
  1622. +#endif
  1623. +
  1624. #ifdef CONFIG_MIPS_DB1000
  1625. printk("AMD Alchemy Au1000/Db1000 Board\n");
  1626. #endif
  1627. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/db1x00/irqmap.c linux-2.4.32-rc1.mips/arch/mips/au1000/db1x00/irqmap.c
  1628. --- linux-2.4.32-rc1/arch/mips/au1000/db1x00/irqmap.c 2005-01-19 15:09:26.000000000 +0100
  1629. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/db1x00/irqmap.c 2005-01-30 09:06:19.000000000 +0100
  1630. @@ -53,6 +53,7 @@
  1631. #ifdef CONFIG_MIPS_DB1550
  1632. { AU1000_GPIO_3, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card 0 IRQ#
  1633. { AU1000_GPIO_5, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card 1 IRQ#
  1634. + { AU1000_GPIO_8, INTC_INT_LOW_LEVEL, 0 }, // Daughtercard IRQ#
  1635. #else
  1636. { AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card 0 Fully_Interted#
  1637. { AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card 0 STSCHG#
  1638. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/db1x00/Makefile linux-2.4.32-rc1.mips/arch/mips/au1000/db1x00/Makefile
  1639. --- linux-2.4.32-rc1/arch/mips/au1000/db1x00/Makefile 2005-01-19 15:09:26.000000000 +0100
  1640. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/db1x00/Makefile 2005-01-30 09:06:19.000000000 +0100
  1641. @@ -17,4 +17,11 @@
  1642. obj-y := init.o board_setup.o irqmap.o
  1643. obj-$(CONFIG_WM97XX_COMODULE) += mirage_ts.o
  1644. +ifdef CONFIG_MIPS_DB1100
  1645. +ifdef CONFIG_MMC
  1646. +obj-y += mmc_support.o
  1647. +export-objs += mmc_support.o
  1648. +endif
  1649. +endif
  1650. +
  1651. include $(TOPDIR)/Rules.make
  1652. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/db1x00/mmc_support.c linux-2.4.32-rc1.mips/arch/mips/au1000/db1x00/mmc_support.c
  1653. --- linux-2.4.32-rc1/arch/mips/au1000/db1x00/mmc_support.c 1970-01-01 01:00:00.000000000 +0100
  1654. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/db1x00/mmc_support.c 2005-01-30 09:07:01.000000000 +0100
  1655. @@ -0,0 +1,126 @@
  1656. +/*
  1657. + * BRIEF MODULE DESCRIPTION
  1658. + *
  1659. + * MMC support routines for DB1100.
  1660. + *
  1661. + *
  1662. + * Copyright (c) 2003-2004 Embedded Edge, LLC.
  1663. + * Author: Embedded Edge, LLC.
  1664. + * Contact: [email protected]
  1665. + *
  1666. + * This program is free software; you can redistribute it and/or modify it
  1667. + * under the terms of the GNU General Public License as published by the
  1668. + * Free Software Foundation; either version 2 of the License, or (at your
  1669. + * option) any later version.
  1670. + *
  1671. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  1672. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  1673. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  1674. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  1675. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  1676. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  1677. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  1678. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  1679. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  1680. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1681. + *
  1682. + * You should have received a copy of the GNU General Public License along
  1683. + * with this program; if not, write to the Free Software Foundation, Inc.,
  1684. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  1685. + *
  1686. + */
  1687. +
  1688. +
  1689. +#include <linux/config.h>
  1690. +#include <linux/kernel.h>
  1691. +#include <linux/module.h>
  1692. +#include <linux/init.h>
  1693. +
  1694. +#include <asm/irq.h>
  1695. +#include <asm/au1000.h>
  1696. +#include <asm/au1100_mmc.h>
  1697. +#include <asm/db1x00.h>
  1698. +
  1699. +
  1700. +/* SD/MMC controller support functions */
  1701. +
  1702. +/*
  1703. + * Detect card.
  1704. + */
  1705. +void mmc_card_inserted(int _n_, int *_res_)
  1706. +{
  1707. + u32 gpios = au_readl(SYS_PINSTATERD);
  1708. + u32 emptybit = (_n_) ? (1<<20) : (1<<19);
  1709. + *_res_ = ((gpios & emptybit) == 0);
  1710. +}
  1711. +
  1712. +/*
  1713. + * Check card write protection.
  1714. + */
  1715. +void mmc_card_writable(int _n_, int *_res_)
  1716. +{
  1717. + BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  1718. + unsigned long mmc_wp, board_specific;
  1719. +
  1720. + if (_n_) {
  1721. + mmc_wp = BCSR_BOARD_SD1_WP;
  1722. + } else {
  1723. + mmc_wp = BCSR_BOARD_SD0_WP;
  1724. + }
  1725. +
  1726. + board_specific = au_readl((unsigned long)(&bcsr->specific));
  1727. +
  1728. + if (!(board_specific & mmc_wp)) {/* low means card writable */
  1729. + *_res_ = 1;
  1730. + } else {
  1731. + *_res_ = 0;
  1732. + }
  1733. +}
  1734. +
  1735. +/*
  1736. + * Apply power to card slot.
  1737. + */
  1738. +void mmc_power_on(int _n_)
  1739. +{
  1740. + BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  1741. + unsigned long mmc_pwr, board_specific;
  1742. +
  1743. + if (_n_) {
  1744. + mmc_pwr = BCSR_BOARD_SD1_PWR;
  1745. + } else {
  1746. + mmc_pwr = BCSR_BOARD_SD0_PWR;
  1747. + }
  1748. +
  1749. + board_specific = au_readl((unsigned long)(&bcsr->specific));
  1750. + board_specific |= mmc_pwr;
  1751. +
  1752. + au_writel(board_specific, (int)(&bcsr->specific));
  1753. + au_sync_delay(1);
  1754. +}
  1755. +
  1756. +/*
  1757. + * Remove power from card slot.
  1758. + */
  1759. +void mmc_power_off(int _n_)
  1760. +{
  1761. + BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  1762. + unsigned long mmc_pwr, board_specific;
  1763. +
  1764. + if (_n_) {
  1765. + mmc_pwr = BCSR_BOARD_SD1_PWR;
  1766. + } else {
  1767. + mmc_pwr = BCSR_BOARD_SD0_PWR;
  1768. + }
  1769. +
  1770. + board_specific = au_readl((unsigned long)(&bcsr->specific));
  1771. + board_specific &= ~mmc_pwr;
  1772. +
  1773. + au_writel(board_specific, (int)(&bcsr->specific));
  1774. + au_sync_delay(1);
  1775. +}
  1776. +
  1777. +EXPORT_SYMBOL(mmc_card_inserted);
  1778. +EXPORT_SYMBOL(mmc_card_writable);
  1779. +EXPORT_SYMBOL(mmc_power_on);
  1780. +EXPORT_SYMBOL(mmc_power_off);
  1781. +
  1782. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/ficmmp/au1200_ibutton.c linux-2.4.32-rc1.mips/arch/mips/au1000/ficmmp/au1200_ibutton.c
  1783. --- linux-2.4.32-rc1/arch/mips/au1000/ficmmp/au1200_ibutton.c 1970-01-01 01:00:00.000000000 +0100
  1784. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/ficmmp/au1200_ibutton.c 2005-02-03 07:35:29.000000000 +0100
  1785. @@ -0,0 +1,270 @@
  1786. +/* ----------------------------------------------------------------------
  1787. + * mtwilson_keys.c
  1788. + *
  1789. + * Copyright (C) 2003 Intrinsyc Software Inc.
  1790. + *
  1791. + * Intel Personal Media Player buttons
  1792. + *
  1793. + * This program is free software; you can redistribute it and/or modify
  1794. + * it under the terms of the GNU General Public License version 2 as
  1795. + * published by the Free Software Foundation.
  1796. + *
  1797. + * May 02, 2003 : Initial version [FB]
  1798. + *
  1799. + ------------------------------------------------------------------------*/
  1800. +
  1801. +#include <linux/config.h>
  1802. +#include <linux/module.h>
  1803. +#include <linux/kernel.h>
  1804. +#include <linux/init.h>
  1805. +#include <linux/fs.h>
  1806. +#include <linux/sched.h>
  1807. +#include <linux/miscdevice.h>
  1808. +#include <linux/errno.h>
  1809. +#include <linux/poll.h>
  1810. +#include <linux/delay.h>
  1811. +#include <linux/input.h>
  1812. +
  1813. +#include <asm/au1000.h>
  1814. +#include <asm/uaccess.h>
  1815. +#include <asm/au1xxx_gpio.h>
  1816. +#include <asm/irq.h>
  1817. +#include <asm/keyboard.h>
  1818. +#include <linux/time.h>
  1819. +
  1820. +#define DRIVER_VERSION "V1.0"
  1821. +#define DRIVER_AUTHOR "FIC"
  1822. +#define DRIVER_DESC "FIC Travis Media Player Button Driver"
  1823. +#define DRIVER_NAME "Au1200Button"
  1824. +
  1825. +#define BUTTON_MAIN (1<<1)
  1826. +#define BUTTON_SELECT (1<<6)
  1827. +#define BUTTON_GUIDE (1<<12)
  1828. +#define BUTTON_DOWN (1<<17)
  1829. +#define BUTTON_LEFT (1<<19)
  1830. +#define BUTTON_RIGHT (1<<26)
  1831. +#define BUTTON_UP (1<<28)
  1832. +
  1833. +#define BUTTON_MASK (\
  1834. + BUTTON_MAIN \
  1835. + | BUTTON_SELECT \
  1836. + | BUTTON_GUIDE \
  1837. + | BUTTON_DOWN \
  1838. + | BUTTON_LEFT \
  1839. + | BUTTON_RIGHT \
  1840. + | BUTTON_UP \
  1841. + )
  1842. +
  1843. +#define BUTTON_INVERT (\
  1844. + BUTTON_MAIN \
  1845. + | 0 \
  1846. + | BUTTON_GUIDE \
  1847. + | 0 \
  1848. + | 0 \
  1849. + | 0 \
  1850. + | 0 \
  1851. + )
  1852. +
  1853. +char button_map[32]={0,KEY_S,0,0,0,0,KEY_ENTER,0,0,0,0,0,KEY_G,0,0,0,0,KEY_DOWN,0,KEY_LEFT,0,0,0,0,0,0,KEY_RIGHT,0,KEY_UP,0,0,0};
  1854. +//char button_map[32]={0,0,0,0,0,0,KEY_ENTER,0,0,0,0,0,KEY_G,0,0,0,0,KEY_DOWN,0,KEY_LEFT,0,0,0,0,0,0,KEY_RIGHT,0,KEY_UP,0,0,0};
  1855. +
  1856. +//char button_map[32]={0,KEY_TAB,0,0,0,0,KEY_M,0,0,0,0,0,KEY_S,0,0,0,0,KEY_DOWN,0,KEY_LEFT,0,0,0,0,0,0,KEY_RIGHT,0,KEY_UP,0,0,0};
  1857. +//char button_map[32]={0,0,0,0,0,0,KEY_M,0,0,0,0,0,KEY_S,0,0,0,0,KEY_DOWN,0,KEY_LEFT,0,0,0,0,0,0,KEY_RIGHT,0,KEY_UP,0,0,0};
  1858. +
  1859. +#define BUTTON_COUNT (sizeof (button_map) / sizeof (button_map[0]))
  1860. +
  1861. +struct input_dev dev;
  1862. +struct timeval cur_tv;
  1863. +
  1864. +static unsigned int old_tv_usec = 0;
  1865. +
  1866. +static unsigned int read_button_state(void)
  1867. +{
  1868. + unsigned int state;
  1869. +
  1870. + state = au_readl(SYS_PINSTATERD) & BUTTON_MASK; /* get gpio status */
  1871. +
  1872. + state ^= BUTTON_INVERT; /* invert main & guide button */
  1873. +
  1874. + /* printk("au1200_ibutton.c: button state [0x%X]\r\n",state); */
  1875. + return state;
  1876. +}
  1877. +
  1878. +//This function returns 0 if the allowed microseconds have elapsed since the last call to ths function, otherwise it returns 1 to indicate a bounce condition
  1879. +static unsigned int bounce()
  1880. +{
  1881. +
  1882. + unsigned int elapsed_time;
  1883. +
  1884. + do_gettimeofday (&cur_tv);
  1885. +
  1886. + if (!old_tv_usec) {
  1887. + old_tv_usec = cur_tv.tv_usec;
  1888. + return 0;
  1889. + }
  1890. +
  1891. + if(cur_tv.tv_usec > old_tv_usec) {
  1892. + /* If there hasn't been rollover */
  1893. + elapsed_time = ((cur_tv.tv_usec - old_tv_usec));
  1894. + }
  1895. + else {
  1896. + /* Accounting for rollover */
  1897. + elapsed_time = ((1000000 - old_tv_usec + cur_tv.tv_usec));
  1898. + }
  1899. +
  1900. + if (elapsed_time > 250000) {
  1901. + old_tv_usec = 0; /* reset the bounce time */
  1902. + return 0;
  1903. + }
  1904. +
  1905. + return 1;
  1906. +}
  1907. +
  1908. +/* button interrupt handler */
  1909. +static void button_interrupt(int irq, void *dev, struct pt_regs *regs)
  1910. +{
  1911. +
  1912. + unsigned int i,bit_mask, key_choice;
  1913. + u32 button_state;
  1914. +
  1915. + /* Report state to upper level */
  1916. +
  1917. + button_state = read_button_state() & BUTTON_MASK; /* get new gpio status */
  1918. +
  1919. + /* Return if this is a repeated (bouncing) event */
  1920. + if(bounce())
  1921. + return;
  1922. +
  1923. + /* we want to make keystrokes */
  1924. + for( i=0; i< BUTTON_COUNT; i++) {
  1925. + bit_mask = 1<<i;
  1926. + if (button_state & bit_mask) {
  1927. + key_choice = button_map[i];
  1928. + /* toggle key down */
  1929. + input_report_key(dev, key_choice, 1);
  1930. + /* toggle key up */
  1931. + input_report_key(dev, key_choice, 0);
  1932. + printk("ibutton gpio %d stat %x scan code %d\r\n",
  1933. + i, button_state, key_choice);
  1934. + /* Only report the first key event; it doesn't make
  1935. + * sense for two keys to be pressed at the same time,
  1936. + * and causes problems with the directional keys
  1937. + * return;
  1938. + */
  1939. + }
  1940. + }
  1941. +}
  1942. +
  1943. +static int
  1944. +button_translate(unsigned char scancode, unsigned char *keycode, char raw_mode)
  1945. +{
  1946. + static int prev_scancode;
  1947. +
  1948. + printk( "ibutton.c: translate: scancode=%x raw_mode=%x\n",
  1949. + scancode, raw_mode);
  1950. +
  1951. + if (scancode == 0xe0 || scancode == 0xe1) {
  1952. + prev_scancode = scancode;
  1953. + return 0;
  1954. + }
  1955. +
  1956. + if (scancode == 0x00 || scancode == 0xff) {
  1957. + prev_scancode = 0;
  1958. + return 0;
  1959. + }
  1960. +
  1961. + *keycode = scancode;
  1962. +
  1963. + return 1;
  1964. +}
  1965. +
  1966. +/* init button hardware */
  1967. +static int button_hw_init(void)
  1968. +{
  1969. + unsigned int ipinfunc=0;
  1970. +
  1971. + printk("au1200_ibutton.c: Initializing buttons hardware\n");
  1972. +
  1973. + // initialize GPIO pin function assignments
  1974. +
  1975. + ipinfunc = au_readl(SYS_PINFUNC);
  1976. +
  1977. + ipinfunc &= ~(SYS_PINFUNC_DMA | SYS_PINFUNC_S0A | SYS_PINFUNC_S0B);
  1978. + au_writel( ipinfunc ,SYS_PINFUNC);
  1979. +
  1980. + ipinfunc |= (SYS_PINFUNC_S0C);
  1981. + au_writel( ipinfunc ,SYS_PINFUNC);
  1982. +
  1983. + return 0;
  1984. +}
  1985. +
  1986. +/* button driver init */
  1987. +static int __init button_init(void)
  1988. +{
  1989. + int ret, i;
  1990. + unsigned int flag=0;
  1991. +
  1992. + printk("au1200_ibutton.c: button_init()\r\n");
  1993. +
  1994. + button_hw_init();
  1995. +
  1996. + /* register all button irq handler */
  1997. +
  1998. + for(i=0; i< sizeof(button_map)/sizeof(button_map[0]); i++)
  1999. + {
  2000. + /* register irq <-- gpio 1 ,6 ,12 , 17 ,19 , 26 ,28 */
  2001. + if(button_map[i] != 0)
  2002. + {
  2003. + ret = request_irq(AU1000_GPIO_0 + i ,
  2004. + &button_interrupt , SA_INTERRUPT ,
  2005. + DRIVER_NAME , &dev);
  2006. + if(ret) flag |= 1<<i;
  2007. + }
  2008. + }
  2009. +
  2010. + printk("au1200_ibutton.c: request_irq,ret:0x%x\r\n",ret);
  2011. +
  2012. + if (ret) {
  2013. + printk("au1200_ibutton.c: request_irq:%X failed\r\n",flag);
  2014. + return ret;
  2015. + }
  2016. +
  2017. + dev.name = DRIVER_NAME;
  2018. + dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
  2019. +
  2020. + for (i=0;i<sizeof(button_map)/sizeof(button_map[0]);i++)
  2021. + {
  2022. + dev.keybit[LONG(button_map[i])] |= BIT(button_map[i]);
  2023. + }
  2024. +
  2025. + input_register_device(&dev);
  2026. +
  2027. + /* ready to receive interrupts */
  2028. +
  2029. + return 0;
  2030. +}
  2031. +
  2032. +/* button driver exit */
  2033. +static void __exit button_exit(void)
  2034. +{
  2035. + int i;
  2036. +
  2037. + for(i=0;i<sizeof(button_map)/sizeof(button_map[0]);i++)
  2038. + {
  2039. + if(button_map[i] != 0)
  2040. + {
  2041. + free_irq( AU1000_GPIO_0 + i, &dev);
  2042. + }
  2043. + }
  2044. +
  2045. + input_unregister_device(&dev);
  2046. +
  2047. + printk("au1200_ibutton.c: button_exit()\r\n");
  2048. +}
  2049. +
  2050. +module_init(button_init);
  2051. +module_exit(button_exit);
  2052. +
  2053. +MODULE_AUTHOR( DRIVER_AUTHOR );
  2054. +MODULE_DESCRIPTION( DRIVER_DESC );
  2055. +MODULE_LICENSE("GPL");
  2056. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/ficmmp/au1xxx_dock.c linux-2.4.32-rc1.mips/arch/mips/au1000/ficmmp/au1xxx_dock.c
  2057. --- linux-2.4.32-rc1/arch/mips/au1000/ficmmp/au1xxx_dock.c 1970-01-01 01:00:00.000000000 +0100
  2058. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/ficmmp/au1xxx_dock.c 2005-01-30 09:01:27.000000000 +0100
  2059. @@ -0,0 +1,261 @@
  2060. +/*
  2061. + * Copyright (C) 2003 Metrowerks, All Rights Reserved.
  2062. + *
  2063. + * This program is free software; you can redistribute it and/or modify
  2064. + * it under the terms of the GNU General Public License version 2 as
  2065. + * published by the Free Software Foundation.
  2066. + */
  2067. +
  2068. +#include <linux/config.h>
  2069. +#include <linux/module.h>
  2070. +#include <linux/init.h>
  2071. +#include <linux/fs.h>
  2072. +#include <linux/sched.h>
  2073. +#include <linux/miscdevice.h>
  2074. +#include <linux/errno.h>
  2075. +#include <linux/poll.h>
  2076. +#include <asm/au1000.h>
  2077. +#include <asm/uaccess.h>
  2078. +#include <asm/au1xxx_gpio.h>
  2079. +
  2080. +
  2081. +#if defined(CONFIG_MIPS_FICMMP)
  2082. + #define DOCK_GPIO 215
  2083. +#else
  2084. + #error Unsupported Au1xxx Platform
  2085. +#endif
  2086. +
  2087. +#define MAKE_FLAG 0x20
  2088. +
  2089. +#undef DEBUG
  2090. +
  2091. +#define DEBUG 0
  2092. +//#define DEBUG 1
  2093. +
  2094. +#if DEBUG
  2095. +#define DPRINTK(format, args...) printk(__FUNCTION__ ": " format, ## args)
  2096. +#else
  2097. +#define DPRINTK(format, args...) do { } while (0)
  2098. +#endif
  2099. +
  2100. +/* Please note that this driver is based on a timer and is not interrupt
  2101. + * driven. If you are going to make use of this driver, you will need to have
  2102. + * your application open the dock listing from the /dev directory first.
  2103. + */
  2104. +
  2105. +struct au1xxx_dock {
  2106. + struct fasync_struct *fasync;
  2107. + wait_queue_head_t read_wait;
  2108. + int open_count;
  2109. + unsigned int debounce;
  2110. + unsigned int current;
  2111. + unsigned int last;
  2112. +};
  2113. +
  2114. +static struct au1xxx_dock dock_info;
  2115. +
  2116. +
  2117. +static void dock_timer_periodic(void *data);
  2118. +
  2119. +static struct tq_struct dock_task = {
  2120. + routine: dock_timer_periodic,
  2121. + data: NULL
  2122. +};
  2123. +
  2124. +static int cleanup_flag = 0;
  2125. +static DECLARE_WAIT_QUEUE_HEAD(cleanup_wait_queue);
  2126. +
  2127. +
  2128. +static unsigned int read_dock_state(void)
  2129. +{
  2130. + u32 state;
  2131. +
  2132. + state = au1xxx_gpio_read(DOCK_GPIO);
  2133. +
  2134. + /* printk( "Current Dock State: %d\n", state ); */
  2135. +
  2136. + return state;
  2137. +}
  2138. +
  2139. +
  2140. +static void dock_timer_periodic(void *data)
  2141. +{
  2142. + struct au1xxx_dock *dock = (struct au1xxx_dock *)data;
  2143. + unsigned long dock_state;
  2144. +
  2145. + /* If cleanup wants us to die */
  2146. + if (cleanup_flag) {
  2147. + /* now cleanup_module can return */
  2148. + wake_up(&cleanup_wait_queue);
  2149. + } else {
  2150. + /* put ourselves back in the task queue */
  2151. + queue_task(&dock_task, &tq_timer);
  2152. + }
  2153. +
  2154. + /* read current dock */
  2155. + dock_state = read_dock_state();
  2156. +
  2157. + /* if dock states hasn't changed */
  2158. + /* save time and be done. */
  2159. + if (dock_state == dock->current) {
  2160. + return;
  2161. + }
  2162. +
  2163. + if (dock_state == dock->debounce) {
  2164. + dock->current = dock_state;
  2165. + } else {
  2166. + dock->debounce = dock_state;
  2167. + }
  2168. + if (dock->current != dock->last) {
  2169. + if (waitqueue_active(&dock->read_wait)) {
  2170. + wake_up_interruptible(&dock->read_wait);
  2171. + }
  2172. + }
  2173. +}
  2174. +
  2175. +
  2176. +static ssize_t au1xxx_dock_read(struct file *filp, char *buffer, size_t count, loff_t *ppos)
  2177. +{
  2178. + struct au1xxx_dock *dock = filp->private_data;
  2179. + char event[3];
  2180. + int last;
  2181. + int cur;
  2182. + int err;
  2183. +
  2184. +try_again:
  2185. +
  2186. + while (dock->current == dock->last) {
  2187. + if (filp->f_flags & O_NONBLOCK) {
  2188. + return -EAGAIN;
  2189. + }
  2190. + interruptible_sleep_on(&dock->read_wait);
  2191. + if (signal_pending(current)) {
  2192. + return -ERESTARTSYS;
  2193. + }
  2194. + }
  2195. +
  2196. + cur = dock->current;
  2197. + last = dock->last;
  2198. +
  2199. + if(cur != last)
  2200. + {
  2201. + event[0] = cur ? 'D' : 'U';
  2202. + event[1] = '\r';
  2203. + event[2] = '\n';
  2204. + }
  2205. + else
  2206. + goto try_again;
  2207. +
  2208. + dock->last = cur;
  2209. + err = copy_to_user(buffer, &event, 3);
  2210. + if (err) {
  2211. + return err;
  2212. + }
  2213. +
  2214. + return 3;
  2215. +}
  2216. +
  2217. +
  2218. +static int au1xxx_dock_open(struct inode *inode, struct file *filp)
  2219. +{
  2220. + struct au1xxx_dock *dock = &dock_info;
  2221. +
  2222. + MOD_INC_USE_COUNT;
  2223. +
  2224. + filp->private_data = dock;
  2225. +
  2226. + if (dock->open_count++ == 0) {
  2227. + dock_task.data = dock;
  2228. + cleanup_flag = 0;
  2229. + queue_task(&dock_task, &tq_timer);
  2230. + }
  2231. +
  2232. + return 0;
  2233. +}
  2234. +
  2235. +
  2236. +static unsigned int au1xxx_dock_poll(struct file *filp, poll_table *wait)
  2237. +{
  2238. + struct au1xxx_dock *dock = filp->private_data;
  2239. + int ret = 0;
  2240. +
  2241. + DPRINTK("start\n");
  2242. + poll_wait(filp, &dock->read_wait, wait);
  2243. + if (dock->current != dock->last) {
  2244. + ret = POLLIN | POLLRDNORM;
  2245. + }
  2246. + return ret;
  2247. +}
  2248. +
  2249. +
  2250. +static int au1xxx_dock_release(struct inode *inode, struct file *filp)
  2251. +{
  2252. + struct au1xxx_dock *dock = filp->private_data;
  2253. +
  2254. + DPRINTK("start\n");
  2255. +
  2256. + if (--dock->open_count == 0) {
  2257. + cleanup_flag = 1;
  2258. + sleep_on(&cleanup_wait_queue);
  2259. + }
  2260. + MOD_DEC_USE_COUNT;
  2261. +
  2262. + return 0;
  2263. +}
  2264. +
  2265. +
  2266. +
  2267. +static struct file_operations au1xxx_dock_fops = {
  2268. + owner: THIS_MODULE,
  2269. + read: au1xxx_dock_read,
  2270. + poll: au1xxx_dock_poll,
  2271. + open: au1xxx_dock_open,
  2272. + release: au1xxx_dock_release,
  2273. +};
  2274. +
  2275. +/*
  2276. + * The au1xxx dock is a misc device:
  2277. + * Major 10 char
  2278. + * Minor 22 /dev/dock
  2279. + *
  2280. + * This is /dev/misc/dock if devfs is used.
  2281. + */
  2282. +
  2283. +static struct miscdevice au1xxx_dock_dev = {
  2284. + minor: 23,
  2285. + name: "dock",
  2286. + fops: &au1xxx_dock_fops,
  2287. +};
  2288. +
  2289. +static int __init au1xxx_dock_init(void)
  2290. +{
  2291. + struct au1xxx_dock *dock = &dock_info;
  2292. + int ret;
  2293. +
  2294. + DPRINTK("Initializing dock driver\n");
  2295. + dock->open_count = 0;
  2296. + cleanup_flag = 0;
  2297. + init_waitqueue_head(&dock->read_wait);
  2298. +
  2299. +
  2300. + /* yamon configures GPIO pins for the dock
  2301. + * no initialization needed
  2302. + */
  2303. +
  2304. + ret = misc_register(&au1xxx_dock_dev);
  2305. +
  2306. + DPRINTK("dock driver fully initialized.\n");
  2307. +
  2308. + return ret;
  2309. +}
  2310. +
  2311. +
  2312. +static void __exit au1xxx_dock_exit(void)
  2313. +{
  2314. + DPRINTK("unloading dock driver\n");
  2315. + misc_deregister(&au1xxx_dock_dev);
  2316. +}
  2317. +
  2318. +
  2319. +module_init(au1xxx_dock_init);
  2320. +module_exit(au1xxx_dock_exit);
  2321. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/ficmmp/board_setup.c linux-2.4.32-rc1.mips/arch/mips/au1000/ficmmp/board_setup.c
  2322. --- linux-2.4.32-rc1/arch/mips/au1000/ficmmp/board_setup.c 1970-01-01 01:00:00.000000000 +0100
  2323. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/ficmmp/board_setup.c 2005-03-19 08:17:51.000000000 +0100
  2324. @@ -0,0 +1,226 @@
  2325. +/*
  2326. + *
  2327. + * BRIEF MODULE DESCRIPTION
  2328. + * Alchemy Pb1200 board setup.
  2329. + *
  2330. + * This program is free software; you can redistribute it and/or modify it
  2331. + * under the terms of the GNU General Public License as published by the
  2332. + * Free Software Foundation; either version 2 of the License, or (at your
  2333. + * option) any later version.
  2334. + *
  2335. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  2336. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  2337. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  2338. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  2339. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  2340. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  2341. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  2342. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  2343. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  2344. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  2345. + *
  2346. + * You should have received a copy of the GNU General Public License along
  2347. + * with this program; if not, write to the Free Software Foundation, Inc.,
  2348. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  2349. + */
  2350. +#include <linux/config.h>
  2351. +#include <linux/init.h>
  2352. +#include <linux/sched.h>
  2353. +#include <linux/ioport.h>
  2354. +#include <linux/mm.h>
  2355. +#include <linux/console.h>
  2356. +#include <linux/mc146818rtc.h>
  2357. +#include <linux/delay.h>
  2358. +#include <linux/ide.h>
  2359. +
  2360. +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
  2361. +#include <linux/ide.h>
  2362. +#endif
  2363. +
  2364. +#include <asm/cpu.h>
  2365. +#include <asm/bootinfo.h>
  2366. +#include <asm/irq.h>
  2367. +#include <asm/keyboard.h>
  2368. +#include <asm/mipsregs.h>
  2369. +#include <asm/reboot.h>
  2370. +#include <asm/pgtable.h>
  2371. +#include <asm/au1000.h>
  2372. +#include <asm/ficmmp.h>
  2373. +#include <asm/au1xxx_dbdma.h>
  2374. +#include <asm/au1xxx_gpio.h>
  2375. +
  2376. +extern struct rtc_ops no_rtc_ops;
  2377. +
  2378. +/* value currently in the board configuration register */
  2379. +u16 ficmmp_config = 0;
  2380. +
  2381. +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
  2382. +extern struct ide_ops *ide_ops;
  2383. +extern struct ide_ops au1xxx_ide_ops;
  2384. +extern u32 au1xxx_ide_virtbase;
  2385. +extern u64 au1xxx_ide_physbase;
  2386. +extern int au1xxx_ide_irq;
  2387. +
  2388. +u32 led_base_addr;
  2389. +/* Ddma */
  2390. +chan_tab_t *ide_read_ch, *ide_write_ch;
  2391. +u32 au1xxx_ide_ddma_enable = 0, switch4ddma = 1; // PIO+ddma
  2392. +
  2393. +dbdev_tab_t new_dbdev_tab_element = { DSCR_CMD0_THROTTLE, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 };
  2394. +#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX */
  2395. +
  2396. +void board_reset (void)
  2397. +{
  2398. + au_writel(0, 0xAD80001C);
  2399. +}
  2400. +
  2401. +void board_power_off (void)
  2402. +{
  2403. +}
  2404. +
  2405. +void __init board_setup(void)
  2406. +{
  2407. + char *argptr = NULL;
  2408. + u32 pin_func;
  2409. + rtc_ops = &no_rtc_ops;
  2410. +
  2411. + ficmmp_config_init(); //Initialize FIC control register
  2412. +
  2413. +#if 0
  2414. + /* Enable PSC1 SYNC for AC97. Normaly done in audio driver,
  2415. + * but it is board specific code, so put it here.
  2416. + */
  2417. + pin_func = au_readl(SYS_PINFUNC);
  2418. + au_sync();
  2419. + pin_func |= SYS_PF_MUST_BE_SET | SYS_PF_PSC1_S1;
  2420. + au_writel(pin_func, SYS_PINFUNC);
  2421. +
  2422. + au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */
  2423. + au_sync();
  2424. +#endif
  2425. +
  2426. +#if defined( CONFIG_I2C_ALGO_AU1550 )
  2427. + {
  2428. + u32 freq0, clksrc;
  2429. +
  2430. + /* Select SMBUS in CPLD */
  2431. + /* bcsr->resets &= ~(BCSR_RESETS_PCS0MUX); */
  2432. +
  2433. + pin_func = au_readl(SYS_PINFUNC);
  2434. + au_sync();
  2435. + pin_func &= ~(3<<17 | 1<<4);
  2436. + /* Set GPIOs correctly */
  2437. + pin_func |= 2<<17;
  2438. + au_writel(pin_func, SYS_PINFUNC);
  2439. + au_sync();
  2440. +
  2441. + /* The i2c driver depends on 50Mhz clock */
  2442. + freq0 = au_readl(SYS_FREQCTRL0);
  2443. + au_sync();
  2444. + freq0 &= ~(SYS_FC_FRDIV1_MASK | SYS_FC_FS1 | SYS_FC_FE1);
  2445. + freq0 |= (3<<SYS_FC_FRDIV1_BIT);
  2446. + /* 396Mhz / (3+1)*2 == 49.5Mhz */
  2447. + au_writel(freq0, SYS_FREQCTRL0);
  2448. + au_sync();
  2449. + freq0 |= SYS_FC_FE1;
  2450. + au_writel(freq0, SYS_FREQCTRL0);
  2451. + au_sync();
  2452. +
  2453. + clksrc = au_readl(SYS_CLKSRC);
  2454. + au_sync();
  2455. + clksrc &= ~0x01f00000;
  2456. + /* bit 22 is EXTCLK0 for PSC0 */
  2457. + clksrc |= (0x3 << 22);
  2458. + au_writel(clksrc, SYS_CLKSRC);
  2459. + au_sync();
  2460. + }
  2461. +#endif
  2462. +
  2463. +#ifdef CONFIG_FB_AU1200
  2464. + argptr = prom_getcmdline();
  2465. + strcat(argptr, " video=au1200fb:");
  2466. +#endif
  2467. +
  2468. +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
  2469. + /*
  2470. + * Iniz IDE parameters
  2471. + */
  2472. + ide_ops = &au1xxx_ide_ops;
  2473. + au1xxx_ide_irq = FICMMP_IDE_INT;
  2474. + au1xxx_ide_physbase = AU1XXX_ATA_PHYS_ADDR;
  2475. + au1xxx_ide_virtbase = KSEG1ADDR(AU1XXX_ATA_PHYS_ADDR);
  2476. + switch4ddma = 0;
  2477. + /*
  2478. + ide_ops = &au1xxx_ide_ops;
  2479. + au1xxx_ide_irq = FICMMP_IDE_INT;
  2480. + au1xxx_ide_base = KSEG1ADDR(AU1XXX_ATA_BASE);
  2481. + */
  2482. + au1xxx_gpio_write(9, 1);
  2483. + printk("B4001010: %X\n", *((u32*)0xB4001010));
  2484. + printk("B4001014: %X\n", *((u32*)0xB4001014));
  2485. + printk("B4001018: %X\n", *((u32*)0xB4001018));
  2486. + printk("B1900100: %X\n", *((u32*)0xB1900100));
  2487. +
  2488. +#if 0
  2489. + ficmmp_config_clear(FICMMP_CONFIG_IDERST);
  2490. + mdelay(100);
  2491. + ficmmp_config_set(FICMMP_CONFIG_IDERST);
  2492. + mdelay(100);
  2493. +#endif
  2494. + /*
  2495. + * change PIO or PIO+Ddma
  2496. + * check the GPIO-5 pin condition. pb1200:s18_dot
  2497. + */
  2498. +/* switch4ddma = 0; //(au_readl(SYS_PINSTATERD) & (1 << 5)) ? 1 : 0; */
  2499. +#endif
  2500. +
  2501. + /* The Pb1200 development board uses external MUX for PSC0 to
  2502. + support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI
  2503. + */
  2504. +#if defined(CONFIG_AU1550_PSC_SPI) && defined(CONFIG_I2C_ALGO_AU1550)
  2505. + #error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\
  2506. + Refer to Pb1200 documentation.
  2507. +#elif defined( CONFIG_AU1550_PSC_SPI )
  2508. + //bcsr->resets |= BCSR_RESETS_PCS0MUX;
  2509. +#elif defined( CONFIG_I2C_ALGO_AU1550 )
  2510. + //bcsr->resets &= (~BCSR_RESETS_PCS0MUX);
  2511. +#endif
  2512. + au_sync();
  2513. +
  2514. + printk("FIC Multimedia Player Board\n");
  2515. + au1xxx_gpio_tristate(5);
  2516. + printk("B1900100: %X\n", *((volatile u32*)0xB1900100));
  2517. + printk("B190002C: %X\n", *((volatile u32*)0xB190002C));
  2518. +}
  2519. +
  2520. +int
  2521. +board_au1200fb_panel (void)
  2522. +{
  2523. + au1xxx_gpio_tristate(6);
  2524. +
  2525. + if (au1xxx_gpio_read(12) == 0)
  2526. + return 9; /* FS453_640x480 (Composite/S-Video) */
  2527. + else
  2528. + return 7; /* Sharp 320x240 TFT */
  2529. +}
  2530. +
  2531. +int
  2532. +board_au1200fb_panel_init (void)
  2533. +{
  2534. + /*Enable data buffers*/
  2535. + ficmmp_config_clear(FICMMP_CONFIG_LCMDATAOUT);
  2536. + /*Take LCD out of reset*/
  2537. + ficmmp_config_set(FICMMP_CONFIG_LCMPWREN | FICMMP_CONFIG_LCMEN);
  2538. + return 0;
  2539. +}
  2540. +
  2541. +int
  2542. +board_au1200fb_panel_shutdown (void)
  2543. +{
  2544. + /*Disable data buffers*/
  2545. + ficmmp_config_set(FICMMP_CONFIG_LCMDATAOUT);
  2546. + /*Put LCD in reset, remove power*/
  2547. + ficmmp_config_clear(FICMMP_CONFIG_LCMEN | FICMMP_CONFIG_LCMPWREN);
  2548. + return 0;
  2549. +}
  2550. +
  2551. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/ficmmp/init.c linux-2.4.32-rc1.mips/arch/mips/au1000/ficmmp/init.c
  2552. --- linux-2.4.32-rc1/arch/mips/au1000/ficmmp/init.c 1970-01-01 01:00:00.000000000 +0100
  2553. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/ficmmp/init.c 2005-01-30 09:01:27.000000000 +0100
  2554. @@ -0,0 +1,76 @@
  2555. +/*
  2556. + *
  2557. + * BRIEF MODULE DESCRIPTION
  2558. + * PB1200 board setup
  2559. + *
  2560. + * This program is free software; you can redistribute it and/or modify it
  2561. + * under the terms of the GNU General Public License as published by the
  2562. + * Free Software Foundation; either version 2 of the License, or (at your
  2563. + * option) any later version.
  2564. + *
  2565. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  2566. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  2567. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  2568. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  2569. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  2570. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  2571. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  2572. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  2573. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  2574. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  2575. + *
  2576. + * You should have received a copy of the GNU General Public License along
  2577. + * with this program; if not, write to the Free Software Foundation, Inc.,
  2578. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  2579. + */
  2580. +
  2581. +#include <linux/init.h>
  2582. +#include <linux/mm.h>
  2583. +#include <linux/sched.h>
  2584. +#include <linux/bootmem.h>
  2585. +#include <asm/addrspace.h>
  2586. +#include <asm/bootinfo.h>
  2587. +#include <linux/config.h>
  2588. +#include <linux/string.h>
  2589. +#include <linux/kernel.h>
  2590. +#include <linux/sched.h>
  2591. +
  2592. +int prom_argc;
  2593. +char **prom_argv, **prom_envp;
  2594. +extern void __init prom_init_cmdline(void);
  2595. +extern char *prom_getenv(char *envname);
  2596. +
  2597. +const char *get_system_type(void)
  2598. +{
  2599. + return "FIC Multimedia Player (Au1200)";
  2600. +}
  2601. +
  2602. +u32 mae_memsize = 0;
  2603. +
  2604. +int __init prom_init(int argc, char **argv, char **envp, int *prom_vec)
  2605. +{
  2606. + unsigned char *memsize_str;
  2607. + unsigned long memsize;
  2608. +
  2609. + prom_argc = argc;
  2610. + prom_argv = argv;
  2611. + prom_envp = envp;
  2612. +
  2613. + mips_machgroup = MACH_GROUP_ALCHEMY;
  2614. + mips_machtype = MACH_PB1000; /* set the platform # */
  2615. + prom_init_cmdline();
  2616. +
  2617. + memsize_str = prom_getenv("memsize");
  2618. + if (!memsize_str) {
  2619. + memsize = 0x08000000;
  2620. + } else {
  2621. + memsize = simple_strtol(memsize_str, NULL, 0);
  2622. + }
  2623. +
  2624. + /* reserved 32MB for MAE driver */
  2625. + memsize -= (32 * 1024 * 1024);
  2626. + add_memory_region(0, memsize, BOOT_MEM_RAM);
  2627. + mae_memsize = memsize; /* for drivers/char/au1xxx_mae.c */
  2628. + return 0;
  2629. +}
  2630. +
  2631. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/ficmmp/irqmap.c linux-2.4.32-rc1.mips/arch/mips/au1000/ficmmp/irqmap.c
  2632. --- linux-2.4.32-rc1/arch/mips/au1000/ficmmp/irqmap.c 1970-01-01 01:00:00.000000000 +0100
  2633. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/ficmmp/irqmap.c 2005-01-30 09:01:27.000000000 +0100
  2634. @@ -0,0 +1,61 @@
  2635. +/*
  2636. + * BRIEF MODULE DESCRIPTION
  2637. + * Au1xxx irq map table
  2638. + *
  2639. + * This program is free software; you can redistribute it and/or modify it
  2640. + * under the terms of the GNU General Public License as published by the
  2641. + * Free Software Foundation; either version 2 of the License, or (at your
  2642. + * option) any later version.
  2643. + *
  2644. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  2645. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  2646. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  2647. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  2648. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  2649. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  2650. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  2651. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  2652. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  2653. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  2654. + *
  2655. + * You should have received a copy of the GNU General Public License along
  2656. + * with this program; if not, write to the Free Software Foundation, Inc.,
  2657. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  2658. + */
  2659. +#include <linux/errno.h>
  2660. +#include <linux/init.h>
  2661. +#include <linux/irq.h>
  2662. +#include <linux/kernel_stat.h>
  2663. +#include <linux/module.h>
  2664. +#include <linux/signal.h>
  2665. +#include <linux/sched.h>
  2666. +#include <linux/types.h>
  2667. +#include <linux/interrupt.h>
  2668. +#include <linux/ioport.h>
  2669. +#include <linux/timex.h>
  2670. +#include <linux/slab.h>
  2671. +#include <linux/random.h>
  2672. +#include <linux/delay.h>
  2673. +
  2674. +#include <asm/bitops.h>
  2675. +#include <asm/bootinfo.h>
  2676. +#include <asm/io.h>
  2677. +#include <asm/mipsregs.h>
  2678. +#include <asm/system.h>
  2679. +#include <asm/au1000.h>
  2680. +#include <asm/ficmmp.h>
  2681. +
  2682. +au1xxx_irq_map_t au1xxx_irq_map[] = {
  2683. + { FICMMP_IDE_INT, INTC_INT_HIGH_LEVEL, 0 },
  2684. + { AU1XXX_SMC91111_IRQ, INTC_INT_HIGH_LEVEL, 0 },
  2685. + { AU1000_GPIO_1 , INTC_INT_FALL_EDGE, 0 }, // main button
  2686. + { AU1000_GPIO_6 , INTC_INT_RISE_EDGE, 0 }, // select button
  2687. + { AU1000_GPIO_12, INTC_INT_FALL_EDGE, 0 }, // guide button
  2688. + { AU1000_GPIO_17, INTC_INT_RISE_EDGE, 0 }, // down button
  2689. + { AU1000_GPIO_19, INTC_INT_RISE_EDGE, 0 }, // left button
  2690. + { AU1000_GPIO_26, INTC_INT_RISE_EDGE, 0 }, // right button
  2691. + { AU1000_GPIO_28, INTC_INT_RISE_EDGE, 0 }, // up button
  2692. +};
  2693. +
  2694. +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t);
  2695. +
  2696. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/ficmmp/Makefile linux-2.4.32-rc1.mips/arch/mips/au1000/ficmmp/Makefile
  2697. --- linux-2.4.32-rc1/arch/mips/au1000/ficmmp/Makefile 1970-01-01 01:00:00.000000000 +0100
  2698. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/ficmmp/Makefile 2005-01-30 09:01:27.000000000 +0100
  2699. @@ -0,0 +1,25 @@
  2700. +#
  2701. +# Copyright 2000 MontaVista Software Inc.
  2702. +# Author: MontaVista Software, Inc.
  2703. +# [email protected] or [email protected]
  2704. +#
  2705. +# Makefile for the Alchemy Semiconductor FIC board.
  2706. +#
  2707. +# Note! Dependencies are done automagically by 'make dep', which also
  2708. +# removes any old dependencies. DON'T put your own dependencies here
  2709. +# unless it's something special (ie not a .c file).
  2710. +#
  2711. +
  2712. +USE_STANDARD_AS_RULE := true
  2713. +
  2714. +O_TARGET := ficmmp.o
  2715. +
  2716. +obj-y := init.o board_setup.o irqmap.o au1200_ibutton.o au1xxx_dock.o
  2717. +
  2718. +ifdef CONFIG_MMC
  2719. +obj-y += mmc_support.o
  2720. +export-objs +=mmc_support.o
  2721. +endif
  2722. +
  2723. +
  2724. +include $(TOPDIR)/Rules.make
  2725. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/hydrogen3/board_setup.c linux-2.4.32-rc1.mips/arch/mips/au1000/hydrogen3/board_setup.c
  2726. --- linux-2.4.32-rc1/arch/mips/au1000/hydrogen3/board_setup.c 2005-01-19 15:09:26.000000000 +0100
  2727. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/hydrogen3/board_setup.c 2005-03-19 08:17:51.000000000 +0100
  2728. @@ -51,12 +51,19 @@
  2729. {
  2730. }
  2731. +void board_power_off (void)
  2732. +{
  2733. +}
  2734. +
  2735. void __init board_setup(void)
  2736. {
  2737. u32 pin_func;
  2738. rtc_ops = &no_rtc_ops;
  2739. + /* Set GPIO14 high to make CD/DAT1 high for MMC to work */
  2740. + au_writel(1<<14, SYS_OUTPUTSET);
  2741. +
  2742. #ifdef CONFIG_AU1X00_USB_DEVICE
  2743. // 2nd USB port is USB device
  2744. pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000);
  2745. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/hydrogen3/buttons.c linux-2.4.32-rc1.mips/arch/mips/au1000/hydrogen3/buttons.c
  2746. --- linux-2.4.32-rc1/arch/mips/au1000/hydrogen3/buttons.c 1970-01-01 01:00:00.000000000 +0100
  2747. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/hydrogen3/buttons.c 2005-02-11 22:09:55.000000000 +0100
  2748. @@ -0,0 +1,308 @@
  2749. +/*
  2750. + * Copyright (C) 2003 Metrowerks, All Rights Reserved.
  2751. + *
  2752. + * This program is free software; you can redistribute it and/or modify
  2753. + * it under the terms of the GNU General Public License version 2 as
  2754. + * published by the Free Software Foundation.
  2755. + */
  2756. +
  2757. +#include <linux/config.h>
  2758. +#include <linux/module.h>
  2759. +#include <linux/init.h>
  2760. +#include <linux/fs.h>
  2761. +#include <linux/sched.h>
  2762. +#include <linux/miscdevice.h>
  2763. +#include <linux/errno.h>
  2764. +#include <linux/poll.h>
  2765. +#include <asm/au1000.h>
  2766. +#include <asm/uaccess.h>
  2767. +
  2768. +#define BUTTON_SELECT (1<<1)
  2769. +#define BUTTON_1 (1<<2)
  2770. +#define BUTTON_2 (1<<3)
  2771. +#define BUTTON_ONOFF (1<<6)
  2772. +#define BUTTON_3 (1<<7)
  2773. +#define BUTTON_4 (1<<8)
  2774. +#define BUTTON_LEFT (1<<9)
  2775. +#define BUTTON_DOWN (1<<10)
  2776. +#define BUTTON_RIGHT (1<<11)
  2777. +#define BUTTON_UP (1<<12)
  2778. +
  2779. +#define BUTTON_MASK (\
  2780. + BUTTON_SELECT \
  2781. + | BUTTON_1 \
  2782. + | BUTTON_2 \
  2783. + | BUTTON_ONOFF \
  2784. + | BUTTON_3 \
  2785. + | BUTTON_4 \
  2786. + | BUTTON_LEFT \
  2787. + | BUTTON_DOWN \
  2788. + | BUTTON_RIGHT \
  2789. + | BUTTON_UP \
  2790. + )
  2791. +
  2792. +#define BUTTON_INVERT (\
  2793. + BUTTON_SELECT \
  2794. + | BUTTON_1 \
  2795. + | BUTTON_2 \
  2796. + | BUTTON_3 \
  2797. + | BUTTON_4 \
  2798. + | BUTTON_LEFT \
  2799. + | BUTTON_DOWN \
  2800. + | BUTTON_RIGHT \
  2801. + | BUTTON_UP \
  2802. + )
  2803. +
  2804. +
  2805. +
  2806. +#define MAKE_FLAG 0x20
  2807. +
  2808. +#undef DEBUG
  2809. +
  2810. +#define DEBUG 0
  2811. +//#define DEBUG 1
  2812. +
  2813. +#if DEBUG
  2814. +#define DPRINTK(format, args...) printk(__FUNCTION__ ": " format, ## args)
  2815. +#else
  2816. +#define DPRINTK(format, args...) do { } while (0)
  2817. +#endif
  2818. +
  2819. +/* Please note that this driver is based on a timer and is not interrupt
  2820. + * driven. If you are going to make use of this driver, you will need to have
  2821. + * your application open the buttons listing from the /dev directory first.
  2822. + */
  2823. +
  2824. +struct hydrogen3_buttons {
  2825. + struct fasync_struct *fasync;
  2826. + wait_queue_head_t read_wait;
  2827. + int open_count;
  2828. + unsigned int debounce;
  2829. + unsigned int current;
  2830. + unsigned int last;
  2831. +};
  2832. +
  2833. +static struct hydrogen3_buttons buttons_info;
  2834. +
  2835. +
  2836. +static void button_timer_periodic(void *data);
  2837. +
  2838. +static struct tq_struct button_task = {
  2839. + routine: button_timer_periodic,
  2840. + data: NULL
  2841. +};
  2842. +
  2843. +static int cleanup_flag = 0;
  2844. +static DECLARE_WAIT_QUEUE_HEAD(cleanup_wait_queue);
  2845. +
  2846. +
  2847. +static unsigned int read_button_state(void)
  2848. +{
  2849. + unsigned long state;
  2850. +
  2851. + state = inl(SYS_PINSTATERD) & BUTTON_MASK;
  2852. + state ^= BUTTON_INVERT;
  2853. +
  2854. + DPRINTK( "Current Button State: %d\n", state );
  2855. +
  2856. + return state;
  2857. +}
  2858. +
  2859. +
  2860. +static void button_timer_periodic(void *data)
  2861. +{
  2862. + struct hydrogen3_buttons *buttons = (struct hydrogen3_buttons *)data;
  2863. + unsigned long button_state;
  2864. +
  2865. + // If cleanup wants us to die
  2866. + if (cleanup_flag) {
  2867. + wake_up(&cleanup_wait_queue); // now cleanup_module can return
  2868. + } else {
  2869. + queue_task(&button_task, &tq_timer); // put ourselves back in the task queue
  2870. + }
  2871. +
  2872. + // read current buttons
  2873. + button_state = read_button_state();
  2874. +
  2875. + // if no buttons are down and nothing to do then
  2876. + // save time and be done.
  2877. + if ((button_state == 0) && (buttons->current == 0)) {
  2878. + return;
  2879. + }
  2880. +
  2881. + if (button_state == buttons->debounce) {
  2882. + buttons->current = button_state;
  2883. + } else {
  2884. + buttons->debounce = button_state;
  2885. + }
  2886. +// printk("0x%04x\n", button_state);
  2887. + if (buttons->current != buttons->last) {
  2888. + if (waitqueue_active(&buttons->read_wait)) {
  2889. + wake_up_interruptible(&buttons->read_wait);
  2890. + }
  2891. + }
  2892. +}
  2893. +
  2894. +
  2895. +static ssize_t hydrogen3_buttons_read(struct file *filp, char *buffer, size_t count, loff_t *ppos)
  2896. +{
  2897. + struct hydrogen3_buttons *buttons = filp->private_data;
  2898. + char events[16];
  2899. + int index;
  2900. + int last;
  2901. + int cur;
  2902. + int bit;
  2903. + int bit_mask;
  2904. + int err;
  2905. +
  2906. + DPRINTK("start\n");
  2907. +
  2908. +try_again:
  2909. +
  2910. + while (buttons->current == buttons->last) {
  2911. + if (filp->f_flags & O_NONBLOCK) {
  2912. + return -EAGAIN;
  2913. + }
  2914. + interruptible_sleep_on(&buttons->read_wait);
  2915. + if (signal_pending(current)) {
  2916. + return -ERESTARTSYS;
  2917. + }
  2918. + }
  2919. +
  2920. + cur = buttons->current;
  2921. + last = buttons->last;
  2922. +
  2923. + index = 0;
  2924. + bit_mask = 1;
  2925. + for (bit = 0; (bit < 16) && count; bit++) {
  2926. + if ((cur ^ last) & bit_mask) {
  2927. + if (cur & bit_mask) {
  2928. + events[index] = (bit | MAKE_FLAG) + 'A';
  2929. + last |= bit_mask;
  2930. + } else {
  2931. + events[index] = bit + 'A';
  2932. + last &= ~bit_mask;
  2933. + }
  2934. + index++;
  2935. + count--;
  2936. + }
  2937. + bit_mask <<= 1;
  2938. + }
  2939. + buttons->last = last;
  2940. +
  2941. + if (index == 0) {
  2942. + goto try_again;
  2943. + }
  2944. +
  2945. + err = copy_to_user(buffer, events, index);
  2946. + if (err) {
  2947. + return err;
  2948. + }
  2949. +
  2950. + return index;
  2951. +}
  2952. +
  2953. +
  2954. +static int hydrogen3_buttons_open(struct inode *inode, struct file *filp)
  2955. +{
  2956. + struct hydrogen3_buttons *buttons = &buttons_info;
  2957. +
  2958. + DPRINTK("start\n");
  2959. + MOD_INC_USE_COUNT;
  2960. +
  2961. + filp->private_data = buttons;
  2962. +
  2963. + if (buttons->open_count++ == 0) {
  2964. + button_task.data = buttons;
  2965. + cleanup_flag = 0;
  2966. + queue_task(&button_task, &tq_timer);
  2967. + }
  2968. +
  2969. + return 0;
  2970. +}
  2971. +
  2972. +
  2973. +static unsigned int hydrogen3_buttons_poll(struct file *filp, poll_table *wait)
  2974. +{
  2975. + struct hydrogen3_buttons *buttons = filp->private_data;
  2976. + int ret = 0;
  2977. +
  2978. + DPRINTK("start\n");
  2979. + poll_wait(filp, &buttons->read_wait, wait);
  2980. + if (buttons->current != buttons->last) {
  2981. + ret = POLLIN | POLLRDNORM;
  2982. + }
  2983. + return ret;
  2984. +}
  2985. +
  2986. +
  2987. +static int hydrogen3_buttons_release(struct inode *inode, struct file *filp)
  2988. +{
  2989. + struct hydrogen3_buttons *buttons = filp->private_data;
  2990. +
  2991. + DPRINTK("start\n");
  2992. +
  2993. + if (--buttons->open_count == 0) {
  2994. + cleanup_flag = 1;
  2995. + sleep_on(&cleanup_wait_queue);
  2996. + }
  2997. + MOD_DEC_USE_COUNT;
  2998. +
  2999. + return 0;
  3000. +}
  3001. +
  3002. +
  3003. +
  3004. +static struct file_operations hydrogen3_buttons_fops = {
  3005. + owner: THIS_MODULE,
  3006. + read: hydrogen3_buttons_read,
  3007. + poll: hydrogen3_buttons_poll,
  3008. + open: hydrogen3_buttons_open,
  3009. + release: hydrogen3_buttons_release,
  3010. +};
  3011. +
  3012. +/*
  3013. + * The hydrogen3 buttons is a misc device:
  3014. + * Major 10 char
  3015. + * Minor 22 /dev/buttons
  3016. + *
  3017. + * This is /dev/misc/buttons if devfs is used.
  3018. + */
  3019. +
  3020. +static struct miscdevice hydrogen3_buttons_dev = {
  3021. + minor: 22,
  3022. + name: "buttons",
  3023. + fops: &hydrogen3_buttons_fops,
  3024. +};
  3025. +
  3026. +static int __init hydrogen3_buttons_init(void)
  3027. +{
  3028. + struct hydrogen3_buttons *buttons = &buttons_info;
  3029. + int ret;
  3030. +
  3031. + DPRINTK("Initializing buttons driver\n");
  3032. + buttons->open_count = 0;
  3033. + cleanup_flag = 0;
  3034. + init_waitqueue_head(&buttons->read_wait);
  3035. +
  3036. +
  3037. + // yamon configures GPIO pins for the buttons
  3038. + // no initialization needed
  3039. +
  3040. + ret = misc_register(&hydrogen3_buttons_dev);
  3041. +
  3042. + DPRINTK("Buttons driver fully initialized.\n");
  3043. +
  3044. + return ret;
  3045. +}
  3046. +
  3047. +
  3048. +static void __exit hydrogen3_buttons_exit(void)
  3049. +{
  3050. + DPRINTK("unloading buttons driver\n");
  3051. + misc_deregister(&hydrogen3_buttons_dev);
  3052. +}
  3053. +
  3054. +
  3055. +module_init(hydrogen3_buttons_init);
  3056. +module_exit(hydrogen3_buttons_exit);
  3057. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/hydrogen3/Makefile linux-2.4.32-rc1.mips/arch/mips/au1000/hydrogen3/Makefile
  3058. --- linux-2.4.32-rc1/arch/mips/au1000/hydrogen3/Makefile 2005-01-19 15:09:26.000000000 +0100
  3059. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/hydrogen3/Makefile 2005-02-11 22:09:55.000000000 +0100
  3060. @@ -14,6 +14,11 @@
  3061. O_TARGET := hydrogen3.o
  3062. -obj-y := init.o board_setup.o irqmap.o
  3063. +obj-y := init.o board_setup.o irqmap.o buttons.o
  3064. +
  3065. +ifdef CONFIG_MMC
  3066. +obj-y += mmc_support.o
  3067. +export-objs +=mmc_support.o
  3068. +endif
  3069. include $(TOPDIR)/Rules.make
  3070. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/hydrogen3/mmc_support.c linux-2.4.32-rc1.mips/arch/mips/au1000/hydrogen3/mmc_support.c
  3071. --- linux-2.4.32-rc1/arch/mips/au1000/hydrogen3/mmc_support.c 1970-01-01 01:00:00.000000000 +0100
  3072. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/hydrogen3/mmc_support.c 2005-02-02 05:27:06.000000000 +0100
  3073. @@ -0,0 +1,89 @@
  3074. +/*
  3075. + * BRIEF MODULE DESCRIPTION
  3076. + *
  3077. + * MMC support routines for Hydrogen3.
  3078. + *
  3079. + *
  3080. + * Copyright (c) 2003-2004 Embedded Edge, LLC.
  3081. + * Author: Embedded Edge, LLC.
  3082. + * Contact: [email protected]
  3083. + *
  3084. + * This program is free software; you can redistribute it and/or modify it
  3085. + * under the terms of the GNU General Public License as published by the
  3086. + * Free Software Foundation; either version 2 of the License, or (at your
  3087. + * option) any later version.
  3088. + *
  3089. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  3090. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  3091. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  3092. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  3093. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  3094. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  3095. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  3096. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  3097. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  3098. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  3099. + *
  3100. + * You should have received a copy of the GNU General Public License along
  3101. + * with this program; if not, write to the Free Software Foundation, Inc.,
  3102. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  3103. + *
  3104. + */
  3105. +
  3106. +
  3107. +#include <linux/config.h>
  3108. +#include <linux/kernel.h>
  3109. +#include <linux/module.h>
  3110. +#include <linux/init.h>
  3111. +
  3112. +#include <asm/irq.h>
  3113. +#include <asm/au1000.h>
  3114. +#include <asm/au1100_mmc.h>
  3115. +
  3116. +#define GPIO_17_WP 0x20000
  3117. +
  3118. +/* SD/MMC controller support functions */
  3119. +
  3120. +/*
  3121. + * Detect card.
  3122. + */
  3123. +void mmc_card_inserted(int _n_, int *_res_)
  3124. +{
  3125. + u32 gpios = au_readl(SYS_PINSTATERD);
  3126. + u32 emptybit = (1<<16);
  3127. + *_res_ = ((gpios & emptybit) == 0);
  3128. +}
  3129. +
  3130. +/*
  3131. + * Check card write protection.
  3132. + */
  3133. +void mmc_card_writable(int _n_, int *_res_)
  3134. +{
  3135. + unsigned long mmc_wp, board_specific;
  3136. + board_specific = au_readl(SYS_OUTPUTSET);
  3137. + mmc_wp=GPIO_17_WP;
  3138. + if (!(board_specific & mmc_wp)) {/* low means card writable */
  3139. + *_res_ = 1;
  3140. + } else {
  3141. + *_res_ = 0;
  3142. + }
  3143. +}
  3144. +/*
  3145. + * Apply power to card slot.
  3146. + */
  3147. +void mmc_power_on(int _n_)
  3148. +{
  3149. +}
  3150. +
  3151. +/*
  3152. + * Remove power from card slot.
  3153. + */
  3154. +void mmc_power_off(int _n_)
  3155. +{
  3156. +}
  3157. +
  3158. +EXPORT_SYMBOL(mmc_card_inserted);
  3159. +EXPORT_SYMBOL(mmc_card_writable);
  3160. +EXPORT_SYMBOL(mmc_power_on);
  3161. +EXPORT_SYMBOL(mmc_power_off);
  3162. +
  3163. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/mtx-1/board_setup.c linux-2.4.32-rc1.mips/arch/mips/au1000/mtx-1/board_setup.c
  3164. --- linux-2.4.32-rc1/arch/mips/au1000/mtx-1/board_setup.c 2004-02-18 14:36:30.000000000 +0100
  3165. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/mtx-1/board_setup.c 2004-11-26 09:37:16.000000000 +0100
  3166. @@ -48,6 +48,12 @@
  3167. extern struct rtc_ops no_rtc_ops;
  3168. +void board_reset (void)
  3169. +{
  3170. + /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
  3171. + au_writel(0x00000000, 0xAE00001C);
  3172. +}
  3173. +
  3174. void __init board_setup(void)
  3175. {
  3176. rtc_ops = &no_rtc_ops;
  3177. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/mtx-1/irqmap.c linux-2.4.32-rc1.mips/arch/mips/au1000/mtx-1/irqmap.c
  3178. --- linux-2.4.32-rc1/arch/mips/au1000/mtx-1/irqmap.c 2005-01-19 15:09:26.000000000 +0100
  3179. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/mtx-1/irqmap.c 2004-11-26 09:37:16.000000000 +0100
  3180. @@ -72,10 +72,10 @@
  3181. * A B C D
  3182. */
  3183. {
  3184. - {INTA, INTB, INTC, INTD}, /* IDSEL 0 */
  3185. - {INTA, INTB, INTC, INTD}, /* IDSEL 1 */
  3186. - {INTA, INTB, INTC, INTD}, /* IDSEL 2 */
  3187. - {INTA, INTB, INTC, INTD}, /* IDSEL 3 */
  3188. + {INTA, INTB, INTX, INTX}, /* IDSEL 0 */
  3189. + {INTB, INTA, INTX, INTX}, /* IDSEL 1 */
  3190. + {INTC, INTD, INTX, INTX}, /* IDSEL 2 */
  3191. + {INTD, INTC, INTX, INTX}, /* IDSEL 3 */
  3192. };
  3193. const long min_idsel = 0, max_idsel = 3, irqs_per_slot = 4;
  3194. return PCI_IRQ_TABLE_LOOKUP;
  3195. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/pb1000/board_setup.c linux-2.4.32-rc1.mips/arch/mips/au1000/pb1000/board_setup.c
  3196. --- linux-2.4.32-rc1/arch/mips/au1000/pb1000/board_setup.c 2005-01-19 15:09:26.000000000 +0100
  3197. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/pb1000/board_setup.c 2005-03-19 08:17:51.000000000 +0100
  3198. @@ -58,6 +58,10 @@
  3199. {
  3200. }
  3201. +void board_power_off (void)
  3202. +{
  3203. +}
  3204. +
  3205. void __init board_setup(void)
  3206. {
  3207. u32 pin_func, static_cfg0;
  3208. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/pb1100/board_setup.c linux-2.4.32-rc1.mips/arch/mips/au1000/pb1100/board_setup.c
  3209. --- linux-2.4.32-rc1/arch/mips/au1000/pb1100/board_setup.c 2005-01-19 15:09:26.000000000 +0100
  3210. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/pb1100/board_setup.c 2005-03-19 08:17:51.000000000 +0100
  3211. @@ -62,6 +62,10 @@
  3212. au_writel(0x00000000, 0xAE00001C);
  3213. }
  3214. +void board_power_off (void)
  3215. +{
  3216. +}
  3217. +
  3218. void __init board_setup(void)
  3219. {
  3220. u32 pin_func;
  3221. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/pb1100/Makefile linux-2.4.32-rc1.mips/arch/mips/au1000/pb1100/Makefile
  3222. --- linux-2.4.32-rc1/arch/mips/au1000/pb1100/Makefile 2003-08-25 13:44:39.000000000 +0200
  3223. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/pb1100/Makefile 2005-01-30 09:10:29.000000000 +0100
  3224. @@ -16,4 +16,10 @@
  3225. obj-y := init.o board_setup.o irqmap.o
  3226. +
  3227. +ifdef CONFIG_MMC
  3228. +obj-y += mmc_support.o
  3229. +export-objs += mmc_support.o
  3230. +endif
  3231. +
  3232. include $(TOPDIR)/Rules.make
  3233. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/pb1100/mmc_support.c linux-2.4.32-rc1.mips/arch/mips/au1000/pb1100/mmc_support.c
  3234. --- linux-2.4.32-rc1/arch/mips/au1000/pb1100/mmc_support.c 1970-01-01 01:00:00.000000000 +0100
  3235. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/pb1100/mmc_support.c 2005-01-30 09:10:29.000000000 +0100
  3236. @@ -0,0 +1,126 @@
  3237. +/*
  3238. + * BRIEF MODULE DESCRIPTION
  3239. + *
  3240. + * MMC support routines for PB1100.
  3241. + *
  3242. + *
  3243. + * Copyright (c) 2003-2004 Embedded Edge, LLC.
  3244. + * Author: Embedded Edge, LLC.
  3245. + * Contact: [email protected]
  3246. + *
  3247. + * This program is free software; you can redistribute it and/or modify it
  3248. + * under the terms of the GNU General Public License as published by the
  3249. + * Free Software Foundation; either version 2 of the License, or (at your
  3250. + * option) any later version.
  3251. + *
  3252. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  3253. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  3254. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  3255. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  3256. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  3257. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  3258. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  3259. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  3260. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  3261. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  3262. + *
  3263. + * You should have received a copy of the GNU General Public License along
  3264. + * with this program; if not, write to the Free Software Foundation, Inc.,
  3265. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  3266. + *
  3267. + */
  3268. +
  3269. +
  3270. +#include <linux/config.h>
  3271. +#include <linux/kernel.h>
  3272. +#include <linux/module.h>
  3273. +#include <linux/init.h>
  3274. +
  3275. +#include <asm/irq.h>
  3276. +#include <asm/au1000.h>
  3277. +#include <asm/au1100_mmc.h>
  3278. +#include <asm/pb1100.h>
  3279. +
  3280. +
  3281. +/* SD/MMC controller support functions */
  3282. +
  3283. +/*
  3284. + * Detect card.
  3285. + */
  3286. +void mmc_card_inserted(int _n_, int *_res_)
  3287. +{
  3288. + u32 gpios = au_readl(SYS_PINSTATERD);
  3289. + u32 emptybit = (_n_) ? (1<<15) : (1<<14);
  3290. + *_res_ = ((gpios & emptybit) == 0);
  3291. +}
  3292. +
  3293. +/*
  3294. + * Check card write protection.
  3295. + */
  3296. +void mmc_card_writable(int _n_, int *_res_)
  3297. +{
  3298. + BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  3299. + unsigned long mmc_wp, board_specific;
  3300. +
  3301. + if (_n_) {
  3302. + mmc_wp = BCSR_PCMCIA_SD1_WP;
  3303. + } else {
  3304. + mmc_wp = BCSR_PCMCIA_SD0_WP;
  3305. + }
  3306. +
  3307. + board_specific = au_readl((unsigned long)(&bcsr->pcmcia));
  3308. +
  3309. + if (!(board_specific & mmc_wp)) {/* low means card writable */
  3310. + *_res_ = 1;
  3311. + } else {
  3312. + *_res_ = 0;
  3313. + }
  3314. +}
  3315. +
  3316. +/*
  3317. + * Apply power to card slot.
  3318. + */
  3319. +void mmc_power_on(int _n_)
  3320. +{
  3321. + BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  3322. + unsigned long mmc_pwr, board_specific;
  3323. +
  3324. + if (_n_) {
  3325. + mmc_pwr = BCSR_PCMCIA_SD1_PWR;
  3326. + } else {
  3327. + mmc_pwr = BCSR_PCMCIA_SD0_PWR;
  3328. + }
  3329. +
  3330. + board_specific = au_readl((unsigned long)(&bcsr->pcmcia));
  3331. + board_specific |= mmc_pwr;
  3332. +
  3333. + au_writel(board_specific, (int)(&bcsr->pcmcia));
  3334. + au_sync_delay(1);
  3335. +}
  3336. +
  3337. +/*
  3338. + * Remove power from card slot.
  3339. + */
  3340. +void mmc_power_off(int _n_)
  3341. +{
  3342. + BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  3343. + unsigned long mmc_pwr, board_specific;
  3344. +
  3345. + if (_n_) {
  3346. + mmc_pwr = BCSR_PCMCIA_SD1_PWR;
  3347. + } else {
  3348. + mmc_pwr = BCSR_PCMCIA_SD0_PWR;
  3349. + }
  3350. +
  3351. + board_specific = au_readl((unsigned long)(&bcsr->pcmcia));
  3352. + board_specific &= ~mmc_pwr;
  3353. +
  3354. + au_writel(board_specific, (int)(&bcsr->pcmcia));
  3355. + au_sync_delay(1);
  3356. +}
  3357. +
  3358. +EXPORT_SYMBOL(mmc_card_inserted);
  3359. +EXPORT_SYMBOL(mmc_card_writable);
  3360. +EXPORT_SYMBOL(mmc_power_on);
  3361. +EXPORT_SYMBOL(mmc_power_off);
  3362. +
  3363. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/pb1200/board_setup.c linux-2.4.32-rc1.mips/arch/mips/au1000/pb1200/board_setup.c
  3364. --- linux-2.4.32-rc1/arch/mips/au1000/pb1200/board_setup.c 1970-01-01 01:00:00.000000000 +0100
  3365. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/pb1200/board_setup.c 2005-03-19 08:17:51.000000000 +0100
  3366. @@ -0,0 +1,221 @@
  3367. +/*
  3368. + *
  3369. + * BRIEF MODULE DESCRIPTION
  3370. + * Alchemy Pb1200 board setup.
  3371. + *
  3372. + * This program is free software; you can redistribute it and/or modify it
  3373. + * under the terms of the GNU General Public License as published by the
  3374. + * Free Software Foundation; either version 2 of the License, or (at your
  3375. + * option) any later version.
  3376. + *
  3377. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  3378. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  3379. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  3380. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  3381. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  3382. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  3383. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  3384. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  3385. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  3386. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  3387. + *
  3388. + * You should have received a copy of the GNU General Public License along
  3389. + * with this program; if not, write to the Free Software Foundation, Inc.,
  3390. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  3391. + */
  3392. +#include <linux/config.h>
  3393. +#include <linux/init.h>
  3394. +#include <linux/sched.h>
  3395. +#include <linux/ioport.h>
  3396. +#include <linux/mm.h>
  3397. +#include <linux/console.h>
  3398. +#include <linux/mc146818rtc.h>
  3399. +#include <linux/delay.h>
  3400. +
  3401. +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
  3402. +#include <linux/ide.h>
  3403. +#endif
  3404. +
  3405. +#include <asm/cpu.h>
  3406. +#include <asm/bootinfo.h>
  3407. +#include <asm/irq.h>
  3408. +#include <asm/keyboard.h>
  3409. +#include <asm/mipsregs.h>
  3410. +#include <asm/reboot.h>
  3411. +#include <asm/pgtable.h>
  3412. +#include <asm/au1000.h>
  3413. +#include <asm/au1xxx_dbdma.h>
  3414. +
  3415. +#ifdef CONFIG_MIPS_PB1200
  3416. +#include <asm/pb1200.h>
  3417. +#endif
  3418. +
  3419. +#ifdef CONFIG_MIPS_DB1200
  3420. +#include <asm/db1200.h>
  3421. +#define PB1200_ETH_INT DB1200_ETH_INT
  3422. +#define PB1200_IDE_INT DB1200_IDE_INT
  3423. +#endif
  3424. +
  3425. +extern struct rtc_ops no_rtc_ops;
  3426. +
  3427. +extern void _board_init_irq(void);
  3428. +extern void (*board_init_irq)(void);
  3429. +
  3430. +#ifdef CONFIG_BLK_DEV_IDE_AU1XXX
  3431. +extern struct ide_ops *ide_ops;
  3432. +extern struct ide_ops au1xxx_ide_ops;
  3433. +extern u32 au1xxx_ide_virtbase;
  3434. +extern u64 au1xxx_ide_physbase;
  3435. +extern int au1xxx_ide_irq;
  3436. +
  3437. +u32 led_base_addr;
  3438. +/* Ddma */
  3439. +chan_tab_t *ide_read_ch, *ide_write_ch;
  3440. +u32 au1xxx_ide_ddma_enable = 0, switch4ddma = 1; // PIO+ddma
  3441. +
  3442. +dbdev_tab_t new_dbdev_tab_element = { DSCR_CMD0_THROTTLE, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 };
  3443. +#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX */
  3444. +
  3445. +void board_reset (void)
  3446. +{
  3447. + bcsr->resets = 0;
  3448. +}
  3449. +
  3450. +void board_power_off (void)
  3451. +{
  3452. + bcsr->resets = 0xC000;
  3453. +}
  3454. +
  3455. +void __init board_setup(void)
  3456. +{
  3457. + char *argptr = NULL;
  3458. + u32 pin_func;
  3459. + rtc_ops = &no_rtc_ops;
  3460. +
  3461. +#if 0
  3462. + /* Enable PSC1 SYNC for AC97. Normaly done in audio driver,
  3463. + * but it is board specific code, so put it here.
  3464. + */
  3465. + pin_func = au_readl(SYS_PINFUNC);
  3466. + au_sync();
  3467. + pin_func |= SYS_PF_MUST_BE_SET | SYS_PF_PSC1_S1;
  3468. + au_writel(pin_func, SYS_PINFUNC);
  3469. +
  3470. + au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */
  3471. + au_sync();
  3472. +#endif
  3473. +
  3474. +#if defined( CONFIG_I2C_ALGO_AU1550 )
  3475. + {
  3476. + u32 freq0, clksrc;
  3477. +
  3478. + /* Select SMBUS in CPLD */
  3479. + bcsr->resets &= ~(BCSR_RESETS_PCS0MUX);
  3480. +
  3481. + pin_func = au_readl(SYS_PINFUNC);
  3482. + au_sync();
  3483. + pin_func &= ~(3<<17 | 1<<4);
  3484. + /* Set GPIOs correctly */
  3485. + pin_func |= 2<<17;
  3486. + au_writel(pin_func, SYS_PINFUNC);
  3487. + au_sync();
  3488. +
  3489. + /* The i2c driver depends on 50Mhz clock */
  3490. + freq0 = au_readl(SYS_FREQCTRL0);
  3491. + au_sync();
  3492. + freq0 &= ~(SYS_FC_FRDIV1_MASK | SYS_FC_FS1 | SYS_FC_FE1);
  3493. + freq0 |= (3<<SYS_FC_FRDIV1_BIT);
  3494. + /* 396Mhz / (3+1)*2 == 49.5Mhz */
  3495. + au_writel(freq0, SYS_FREQCTRL0);
  3496. + au_sync();
  3497. + freq0 |= SYS_FC_FE1;
  3498. + au_writel(freq0, SYS_FREQCTRL0);
  3499. + au_sync();
  3500. +
  3501. + clksrc = au_readl(SYS_CLKSRC);
  3502. + au_sync();
  3503. + clksrc &= ~0x01f00000;
  3504. + /* bit 22 is EXTCLK0 for PSC0 */
  3505. + clksrc |= (0x3 << 22);
  3506. + au_writel(clksrc, SYS_CLKSRC);
  3507. + au_sync();
  3508. + }
  3509. +#endif
  3510. +
  3511. +#ifdef CONFIG_FB_AU1200
  3512. + argptr = prom_getcmdline();
  3513. + strcat(argptr, " video=au1200fb:");
  3514. +#endif
  3515. +
  3516. +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
  3517. + /*
  3518. + * Iniz IDE parameters
  3519. + */
  3520. + ide_ops = &au1xxx_ide_ops;
  3521. + au1xxx_ide_irq = PB1200_IDE_INT;
  3522. + au1xxx_ide_physbase = AU1XXX_ATA_PHYS_ADDR;
  3523. + au1xxx_ide_virtbase = KSEG1ADDR(AU1XXX_ATA_PHYS_ADDR);
  3524. + /*
  3525. + * change PIO or PIO+Ddma
  3526. + * check the GPIO-5 pin condition. pb1200:s18_dot */
  3527. + switch4ddma = (au_readl(SYS_PINSTATERD) & (1 << 5)) ? 1 : 0;
  3528. +#endif
  3529. +
  3530. + /* The Pb1200 development board uses external MUX for PSC0 to
  3531. + support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI
  3532. + */
  3533. +#if defined(CONFIG_AU1550_PSC_SPI) && defined(CONFIG_I2C_ALGO_AU1550)
  3534. + #error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\
  3535. + Refer to Pb1200/Db1200 documentation.
  3536. +#elif defined( CONFIG_AU1550_PSC_SPI )
  3537. + bcsr->resets |= BCSR_RESETS_PCS0MUX;
  3538. +#elif defined( CONFIG_I2C_ALGO_AU1550 )
  3539. + bcsr->resets &= (~BCSR_RESETS_PCS0MUX);
  3540. +#endif
  3541. + au_sync();
  3542. +
  3543. +#ifdef CONFIG_MIPS_PB1200
  3544. + printk("AMD Alchemy Pb1200 Board\n");
  3545. +#endif
  3546. +#ifdef CONFIG_MIPS_DB1200
  3547. + printk("AMD Alchemy Db1200 Board\n");
  3548. +#endif
  3549. +
  3550. + /* Setup Pb1200 External Interrupt Controller */
  3551. + {
  3552. + extern void (*board_init_irq)(void);
  3553. + extern void _board_init_irq(void);
  3554. + board_init_irq = _board_init_irq;
  3555. + }
  3556. +}
  3557. +
  3558. +int
  3559. +board_au1200fb_panel (void)
  3560. +{
  3561. + BCSR *bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  3562. + int p;
  3563. +
  3564. + p = bcsr->switches;
  3565. + p >>= 8;
  3566. + p &= 0x0F;
  3567. + return p;
  3568. +}
  3569. +
  3570. +int
  3571. +board_au1200fb_panel_init (void)
  3572. +{
  3573. + /* Apply power */
  3574. + BCSR *bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  3575. + bcsr->board |= (BCSR_BOARD_LCDVEE | BCSR_BOARD_LCDVDD | BCSR_BOARD_LCDBL);
  3576. + return 0;
  3577. +}
  3578. +
  3579. +int
  3580. +board_au1200fb_panel_shutdown (void)
  3581. +{
  3582. + /* Remove power */
  3583. + BCSR *bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  3584. + bcsr->board &= ~(BCSR_BOARD_LCDVEE | BCSR_BOARD_LCDVDD | BCSR_BOARD_LCDBL);
  3585. + return 0;
  3586. +}
  3587. +
  3588. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/pb1200/init.c linux-2.4.32-rc1.mips/arch/mips/au1000/pb1200/init.c
  3589. --- linux-2.4.32-rc1/arch/mips/au1000/pb1200/init.c 1970-01-01 01:00:00.000000000 +0100
  3590. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/pb1200/init.c 2005-01-30 09:01:28.000000000 +0100
  3591. @@ -0,0 +1,72 @@
  3592. +/*
  3593. + *
  3594. + * BRIEF MODULE DESCRIPTION
  3595. + * PB1200 board setup
  3596. + *
  3597. + * This program is free software; you can redistribute it and/or modify it
  3598. + * under the terms of the GNU General Public License as published by the
  3599. + * Free Software Foundation; either version 2 of the License, or (at your
  3600. + * option) any later version.
  3601. + *
  3602. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  3603. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  3604. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  3605. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  3606. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  3607. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  3608. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  3609. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  3610. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  3611. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  3612. + *
  3613. + * You should have received a copy of the GNU General Public License along
  3614. + * with this program; if not, write to the Free Software Foundation, Inc.,
  3615. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  3616. + */
  3617. +
  3618. +#include <linux/init.h>
  3619. +#include <linux/mm.h>
  3620. +#include <linux/sched.h>
  3621. +#include <linux/bootmem.h>
  3622. +#include <asm/addrspace.h>
  3623. +#include <asm/bootinfo.h>
  3624. +#include <linux/config.h>
  3625. +#include <linux/string.h>
  3626. +#include <linux/kernel.h>
  3627. +#include <linux/sched.h>
  3628. +
  3629. +int prom_argc;
  3630. +char **prom_argv, **prom_envp;
  3631. +extern void __init prom_init_cmdline(void);
  3632. +extern char *prom_getenv(char *envname);
  3633. +
  3634. +const char *get_system_type(void)
  3635. +{
  3636. + return "AMD Alchemy Au1200/Pb1200";
  3637. +}
  3638. +
  3639. +u32 mae_memsize = 0;
  3640. +
  3641. +int __init prom_init(int argc, char **argv, char **envp, int *prom_vec)
  3642. +{
  3643. + unsigned char *memsize_str;
  3644. + unsigned long memsize;
  3645. +
  3646. + prom_argc = argc;
  3647. + prom_argv = argv;
  3648. + prom_envp = envp;
  3649. +
  3650. + mips_machgroup = MACH_GROUP_ALCHEMY;
  3651. + mips_machtype = MACH_PB1000; /* set the platform # */
  3652. + prom_init_cmdline();
  3653. +
  3654. + memsize_str = prom_getenv("memsize");
  3655. + if (!memsize_str) {
  3656. + memsize = 0x08000000;
  3657. + } else {
  3658. + memsize = simple_strtol(memsize_str, NULL, 0);
  3659. + }
  3660. + add_memory_region(0, memsize, BOOT_MEM_RAM);
  3661. + return 0;
  3662. +}
  3663. +
  3664. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/pb1200/irqmap.c linux-2.4.32-rc1.mips/arch/mips/au1000/pb1200/irqmap.c
  3665. --- linux-2.4.32-rc1/arch/mips/au1000/pb1200/irqmap.c 1970-01-01 01:00:00.000000000 +0100
  3666. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/pb1200/irqmap.c 2005-01-30 09:01:28.000000000 +0100
  3667. @@ -0,0 +1,180 @@
  3668. +/*
  3669. + * BRIEF MODULE DESCRIPTION
  3670. + * Au1xxx irq map table
  3671. + *
  3672. + * This program is free software; you can redistribute it and/or modify it
  3673. + * under the terms of the GNU General Public License as published by the
  3674. + * Free Software Foundation; either version 2 of the License, or (at your
  3675. + * option) any later version.
  3676. + *
  3677. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  3678. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  3679. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  3680. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  3681. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  3682. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  3683. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  3684. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  3685. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  3686. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  3687. + *
  3688. + * You should have received a copy of the GNU General Public License along
  3689. + * with this program; if not, write to the Free Software Foundation, Inc.,
  3690. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  3691. + */
  3692. +#include <linux/errno.h>
  3693. +#include <linux/init.h>
  3694. +#include <linux/irq.h>
  3695. +#include <linux/kernel_stat.h>
  3696. +#include <linux/module.h>
  3697. +#include <linux/signal.h>
  3698. +#include <linux/sched.h>
  3699. +#include <linux/types.h>
  3700. +#include <linux/interrupt.h>
  3701. +#include <linux/ioport.h>
  3702. +#include <linux/timex.h>
  3703. +#include <linux/slab.h>
  3704. +#include <linux/random.h>
  3705. +#include <linux/delay.h>
  3706. +
  3707. +#include <asm/bitops.h>
  3708. +#include <asm/bootinfo.h>
  3709. +#include <asm/io.h>
  3710. +#include <asm/mipsregs.h>
  3711. +#include <asm/system.h>
  3712. +#include <asm/au1000.h>
  3713. +
  3714. +#ifdef CONFIG_MIPS_PB1200
  3715. +#include <asm/pb1200.h>
  3716. +#endif
  3717. +
  3718. +#ifdef CONFIG_MIPS_DB1200
  3719. +#include <asm/db1200.h>
  3720. +#define PB1200_INT_BEGIN DB1200_INT_BEGIN
  3721. +#define PB1200_INT_END DB1200_INT_END
  3722. +#endif
  3723. +
  3724. +au1xxx_irq_map_t au1xxx_irq_map[] = {
  3725. + { AU1000_GPIO_7, INTC_INT_LOW_LEVEL, 0 }, // This is exteranl interrupt cascade
  3726. +};
  3727. +
  3728. +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t);
  3729. +
  3730. +/*
  3731. + * Support for External interrupts on the PbAu1200 Development platform.
  3732. + */
  3733. +static volatile int pb1200_cascade_en=0;
  3734. +
  3735. +void pb1200_cascade_handler( int irq, void *dev_id, struct pt_regs *regs)
  3736. +{
  3737. + unsigned short bisr = bcsr->int_status;
  3738. + int extirq_nr = 0;
  3739. +
  3740. + /* Clear all the edge interrupts. This has no effect on level */
  3741. + bcsr->int_status = bisr;
  3742. + for( ; bisr; bisr &= (bisr-1) )
  3743. + {
  3744. + extirq_nr = (PB1200_INT_BEGIN-1) + au_ffs(bisr);
  3745. + /* Ack and dispatch IRQ */
  3746. + do_IRQ(extirq_nr,regs);
  3747. + }
  3748. +}
  3749. +
  3750. +inline void pb1200_enable_irq(unsigned int irq_nr)
  3751. +{
  3752. + bcsr->intset_mask = 1<<(irq_nr - PB1200_INT_BEGIN);
  3753. + bcsr->intset = 1<<(irq_nr - PB1200_INT_BEGIN);
  3754. +}
  3755. +
  3756. +inline void pb1200_disable_irq(unsigned int irq_nr)
  3757. +{
  3758. + bcsr->intclr_mask = 1<<(irq_nr - PB1200_INT_BEGIN);
  3759. + bcsr->intclr = 1<<(irq_nr - PB1200_INT_BEGIN);
  3760. +}
  3761. +
  3762. +static unsigned int pb1200_startup_irq( unsigned int irq_nr )
  3763. +{
  3764. + if (++pb1200_cascade_en == 1)
  3765. + {
  3766. + request_irq(AU1000_GPIO_7, &pb1200_cascade_handler,
  3767. + 0, "Pb1200 Cascade", &pb1200_cascade_handler );
  3768. +#ifdef CONFIG_MIPS_PB1200
  3769. + /* We have a problem with CPLD rev3. Enable a workaround */
  3770. + if( ((bcsr->whoami & BCSR_WHOAMI_CPLD)>>4) <= 3)
  3771. + {
  3772. + printk("\nWARNING!!!\n");
  3773. + printk("\nWARNING!!!\n");
  3774. + printk("\nWARNING!!!\n");
  3775. + printk("\nWARNING!!!\n");
  3776. + printk("\nWARNING!!!\n");
  3777. + printk("\nWARNING!!!\n");
  3778. + printk("Pb1200 must be at CPLD rev4. Please have Pb1200\n");
  3779. + printk("updated to latest revision. This software will not\n");
  3780. + printk("work on anything less than CPLD rev4\n");
  3781. + printk("\nWARNING!!!\n");
  3782. + printk("\nWARNING!!!\n");
  3783. + printk("\nWARNING!!!\n");
  3784. + printk("\nWARNING!!!\n");
  3785. + printk("\nWARNING!!!\n");
  3786. + printk("\nWARNING!!!\n");
  3787. + while(1);
  3788. + }
  3789. +#endif
  3790. + }
  3791. + pb1200_enable_irq(irq_nr);
  3792. + return 0;
  3793. +}
  3794. +
  3795. +static void pb1200_shutdown_irq( unsigned int irq_nr )
  3796. +{
  3797. + pb1200_disable_irq(irq_nr);
  3798. + if (--pb1200_cascade_en == 0)
  3799. + {
  3800. + free_irq(AU1000_GPIO_7,&pb1200_cascade_handler );
  3801. + }
  3802. + return;
  3803. +}
  3804. +
  3805. +static inline void pb1200_mask_and_ack_irq(unsigned int irq_nr)
  3806. +{
  3807. + pb1200_disable_irq( irq_nr );
  3808. +}
  3809. +
  3810. +static void pb1200_end_irq(unsigned int irq_nr)
  3811. +{
  3812. + if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS))) {
  3813. + pb1200_enable_irq(irq_nr);
  3814. + }
  3815. +}
  3816. +
  3817. +static struct hw_interrupt_type external_irq_type =
  3818. +{
  3819. +#ifdef CONFIG_MIPS_PB1200
  3820. + "Pb1200 Ext",
  3821. +#endif
  3822. +#ifdef CONFIG_MIPS_DB1200
  3823. + "Db1200 Ext",
  3824. +#endif
  3825. + pb1200_startup_irq,
  3826. + pb1200_shutdown_irq,
  3827. + pb1200_enable_irq,
  3828. + pb1200_disable_irq,
  3829. + pb1200_mask_and_ack_irq,
  3830. + pb1200_end_irq,
  3831. + NULL
  3832. +};
  3833. +
  3834. +void _board_init_irq(void)
  3835. +{
  3836. + int irq_nr;
  3837. +
  3838. + for (irq_nr = PB1200_INT_BEGIN; irq_nr <= PB1200_INT_END; irq_nr++)
  3839. + {
  3840. + irq_desc[irq_nr].handler = &external_irq_type;
  3841. + pb1200_disable_irq(irq_nr);
  3842. + }
  3843. +
  3844. + /* GPIO_7 can not be hooked here, so it is hooked upon first
  3845. + request of any source attached to the cascade */
  3846. +}
  3847. +
  3848. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/pb1200/Makefile linux-2.4.32-rc1.mips/arch/mips/au1000/pb1200/Makefile
  3849. --- linux-2.4.32-rc1/arch/mips/au1000/pb1200/Makefile 1970-01-01 01:00:00.000000000 +0100
  3850. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/pb1200/Makefile 2005-01-30 09:01:27.000000000 +0100
  3851. @@ -0,0 +1,25 @@
  3852. +#
  3853. +# Copyright 2000 MontaVista Software Inc.
  3854. +# Author: MontaVista Software, Inc.
  3855. +# [email protected] or [email protected]
  3856. +#
  3857. +# Makefile for the Alchemy Semiconductor PB1000 board.
  3858. +#
  3859. +# Note! Dependencies are done automagically by 'make dep', which also
  3860. +# removes any old dependencies. DON'T put your own dependencies here
  3861. +# unless it's something special (ie not a .c file).
  3862. +#
  3863. +
  3864. +USE_STANDARD_AS_RULE := true
  3865. +
  3866. +O_TARGET := pb1200.o
  3867. +
  3868. +obj-y := init.o board_setup.o irqmap.o
  3869. +
  3870. +ifdef CONFIG_MMC
  3871. +obj-y += mmc_support.o
  3872. +export-objs +=mmc_support.o
  3873. +endif
  3874. +
  3875. +
  3876. +include $(TOPDIR)/Rules.make
  3877. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/pb1200/mmc_support.c linux-2.4.32-rc1.mips/arch/mips/au1000/pb1200/mmc_support.c
  3878. --- linux-2.4.32-rc1/arch/mips/au1000/pb1200/mmc_support.c 1970-01-01 01:00:00.000000000 +0100
  3879. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/pb1200/mmc_support.c 2005-01-30 09:01:28.000000000 +0100
  3880. @@ -0,0 +1,141 @@
  3881. +/*
  3882. + * BRIEF MODULE DESCRIPTION
  3883. + *
  3884. + * MMC support routines for PB1200.
  3885. + *
  3886. + *
  3887. + * Copyright (c) 2003-2004 Embedded Edge, LLC.
  3888. + * Author: Embedded Edge, LLC.
  3889. + * Contact: [email protected]
  3890. + *
  3891. + * This program is free software; you can redistribute it and/or modify it
  3892. + * under the terms of the GNU General Public License as published by the
  3893. + * Free Software Foundation; either version 2 of the License, or (at your
  3894. + * option) any later version.
  3895. + *
  3896. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  3897. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  3898. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  3899. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  3900. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  3901. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  3902. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  3903. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  3904. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  3905. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  3906. + *
  3907. + * You should have received a copy of the GNU General Public License along
  3908. + * with this program; if not, write to the Free Software Foundation, Inc.,
  3909. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  3910. + *
  3911. + */
  3912. +
  3913. +
  3914. +#include <linux/config.h>
  3915. +#include <linux/kernel.h>
  3916. +#include <linux/module.h>
  3917. +#include <linux/init.h>
  3918. +
  3919. +#include <asm/irq.h>
  3920. +#include <asm/au1000.h>
  3921. +#include <asm/au1100_mmc.h>
  3922. +
  3923. +#ifdef CONFIG_MIPS_PB1200
  3924. +#include <asm/pb1200.h>
  3925. +#endif
  3926. +
  3927. +#ifdef CONFIG_MIPS_DB1200
  3928. +/* NOTE: DB1200 only has SD0 pinned out and usable */
  3929. +#include <asm/db1200.h>
  3930. +#endif
  3931. +
  3932. +/* SD/MMC controller support functions */
  3933. +
  3934. +/*
  3935. + * Detect card.
  3936. + */
  3937. +void mmc_card_inserted(int socket, int *result)
  3938. +{
  3939. + u16 mask;
  3940. +
  3941. + if (socket)
  3942. +#ifdef CONFIG_MIPS_DB1200
  3943. + mask = 0;
  3944. +#else
  3945. + mask = BCSR_INT_SD1INSERT;
  3946. +#endif
  3947. + else
  3948. + mask = BCSR_INT_SD0INSERT;
  3949. +
  3950. + *result = ((bcsr->sig_status & mask) != 0);
  3951. +}
  3952. +
  3953. +/*
  3954. + * Check card write protection.
  3955. + */
  3956. +void mmc_card_writable(int socket, int *result)
  3957. +{
  3958. + u16 mask;
  3959. +
  3960. + if (socket)
  3961. +#ifdef CONFIG_MIPS_DB1200
  3962. + mask = 0;
  3963. +#else
  3964. + mask = BCSR_STATUS_SD1WP;
  3965. +#endif
  3966. + else
  3967. + mask = BCSR_STATUS_SD0WP;
  3968. +
  3969. + /* low means card writable */
  3970. + if (!(bcsr->status & mask)) {
  3971. + *result = 1;
  3972. + } else {
  3973. + *result = 0;
  3974. + }
  3975. +}
  3976. +
  3977. +/*
  3978. + * Apply power to card slot.
  3979. + */
  3980. +void mmc_power_on(int socket)
  3981. +{
  3982. + u16 mask;
  3983. +
  3984. + if (socket)
  3985. +#ifdef CONFIG_MIPS_DB1200
  3986. + mask = 0;
  3987. +#else
  3988. + mask = BCSR_BOARD_SD1PWR;
  3989. +#endif
  3990. + else
  3991. + mask = BCSR_BOARD_SD0PWR;
  3992. +
  3993. + bcsr->board |= mask;
  3994. + au_sync_delay(1);
  3995. +}
  3996. +
  3997. +/*
  3998. + * Remove power from card slot.
  3999. + */
  4000. +void mmc_power_off(int socket)
  4001. +{
  4002. + u16 mask;
  4003. +
  4004. + if (socket)
  4005. +#ifdef CONFIG_MIPS_DB1200
  4006. + mask = 0;
  4007. +#else
  4008. + mask = BCSR_BOARD_SD1PWR;
  4009. +#endif
  4010. + else
  4011. + mask = BCSR_BOARD_SD0PWR;
  4012. +
  4013. + bcsr->board &= ~mask;
  4014. + au_sync_delay(1);
  4015. +}
  4016. +
  4017. +EXPORT_SYMBOL(mmc_card_inserted);
  4018. +EXPORT_SYMBOL(mmc_card_writable);
  4019. +EXPORT_SYMBOL(mmc_power_on);
  4020. +EXPORT_SYMBOL(mmc_power_off);
  4021. +
  4022. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/pb1500/board_setup.c linux-2.4.32-rc1.mips/arch/mips/au1000/pb1500/board_setup.c
  4023. --- linux-2.4.32-rc1/arch/mips/au1000/pb1500/board_setup.c 2005-01-19 15:09:26.000000000 +0100
  4024. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/pb1500/board_setup.c 2005-03-19 08:17:51.000000000 +0100
  4025. @@ -62,6 +62,10 @@
  4026. au_writel(0x00000000, 0xAE00001C);
  4027. }
  4028. +void board_power_off (void)
  4029. +{
  4030. +}
  4031. +
  4032. void __init board_setup(void)
  4033. {
  4034. u32 pin_func;
  4035. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/pb1550/board_setup.c linux-2.4.32-rc1.mips/arch/mips/au1000/pb1550/board_setup.c
  4036. --- linux-2.4.32-rc1/arch/mips/au1000/pb1550/board_setup.c 2005-01-19 15:09:26.000000000 +0100
  4037. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/pb1550/board_setup.c 2005-03-19 08:17:51.000000000 +0100
  4038. @@ -48,12 +48,31 @@
  4039. extern struct rtc_ops no_rtc_ops;
  4040. +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
  4041. +extern struct ide_ops *ide_ops;
  4042. +extern struct ide_ops au1xxx_ide_ops;
  4043. +extern u32 au1xxx_ide_virtbase;
  4044. +extern u64 au1xxx_ide_physbase;
  4045. +extern unsigned int au1xxx_ide_irq;
  4046. +
  4047. +u32 au1xxx_ide_ddma_enable = 0, switch4ddma = 1; // PIO+ddma
  4048. +#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX */
  4049. +
  4050. void board_reset (void)
  4051. {
  4052. /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
  4053. au_writew(au_readw(0xAF00001C) & ~(1<<15), 0xAF00001C);
  4054. }
  4055. +void board_power_off (void)
  4056. +{
  4057. + /* power off system */
  4058. + printk("\n** Powering off Pb1550\n");
  4059. + au_writew(au_readw(0xAF00001C) | (3<<14), 0xAF00001C);
  4060. + au_sync();
  4061. + while(1); /* should not get here */
  4062. +}
  4063. +
  4064. void __init board_setup(void)
  4065. {
  4066. u32 pin_func;
  4067. @@ -78,5 +97,36 @@
  4068. au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */
  4069. au_sync();
  4070. +#if defined(CONFIG_AU1XXX_SMC91111)
  4071. +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
  4072. +#error "Resource conflict occured. Disable either Ethernet or IDE daughter card."
  4073. +#else
  4074. +#define CPLD_CONTROL (0xAF00000C)
  4075. + {
  4076. + /* set up the Static Bus timing */
  4077. + /* only 396Mhz */
  4078. + /* reset the DC */
  4079. + au_writew(au_readw(CPLD_CONTROL) | 0x0f, CPLD_CONTROL);
  4080. + au_writel(0x00010003, MEM_STCFG0);
  4081. + au_writel(0x000c00c0, MEM_STCFG2);
  4082. + au_writel(0x85E1900D, MEM_STTIME2);
  4083. + }
  4084. +#endif
  4085. +#endif /* end CONFIG_SMC91111 */
  4086. +
  4087. +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
  4088. + /*
  4089. + * Iniz IDE parameters
  4090. + */
  4091. + ide_ops = &au1xxx_ide_ops;
  4092. + au1xxx_ide_irq = DAUGHTER_CARD_IRQ;;
  4093. + au1xxx_ide_physbase = AU1XXX_ATA_PHYS_ADDR;
  4094. + au1xxx_ide_virtbase = KSEG1ADDR(AU1XXX_ATA_PHYS_ADDR);
  4095. + /*
  4096. + * change PIO or PIO+Ddma
  4097. + * check the GPIO-6 pin condition. pb1550:s15_dot
  4098. + */
  4099. + switch4ddma = (au_readl(SYS_PINSTATERD) & (1 << 6)) ? 1 : 0;
  4100. +#endif
  4101. printk("AMD Alchemy Pb1550 Board\n");
  4102. }
  4103. diff -Nur linux-2.4.32-rc1/arch/mips/au1000/pb1550/irqmap.c linux-2.4.32-rc1.mips/arch/mips/au1000/pb1550/irqmap.c
  4104. --- linux-2.4.32-rc1/arch/mips/au1000/pb1550/irqmap.c 2005-01-19 15:09:26.000000000 +0100
  4105. +++ linux-2.4.32-rc1.mips/arch/mips/au1000/pb1550/irqmap.c 2005-01-30 09:01:28.000000000 +0100
  4106. @@ -50,6 +50,9 @@
  4107. au1xxx_irq_map_t au1xxx_irq_map[] = {
  4108. { AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 },
  4109. { AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 },
  4110. +#ifdef CONFIG_AU1XXX_SMC91111
  4111. + { AU1000_GPIO_3, INTC_INT_LOW_LEVEL, 0 },
  4112. +#endif
  4113. };
  4114. int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t);
  4115. diff -Nur linux-2.4.32-rc1/arch/mips/config-shared.in linux-2.4.32-rc1.mips/arch/mips/config-shared.in
  4116. --- linux-2.4.32-rc1/arch/mips/config-shared.in 2005-01-19 15:09:27.000000000 +0100
  4117. +++ linux-2.4.32-rc1.mips/arch/mips/config-shared.in 2005-01-30 09:01:26.000000000 +0100
  4118. @@ -21,16 +21,19 @@
  4119. comment 'Machine selection'
  4120. dep_bool 'Support for Acer PICA 1 chipset (EXPERIMENTAL)' CONFIG_ACER_PICA_61 $CONFIG_EXPERIMENTAL
  4121. dep_bool 'Support for Alchemy Bosporus board' CONFIG_MIPS_BOSPORUS $CONFIG_MIPS32
  4122. +dep_bool 'Support for FIC Multimedia Player board' CONFIG_MIPS_FICMMP $CONFIG_MIPS32
  4123. dep_bool 'Support for Alchemy Mirage board' CONFIG_MIPS_MIRAGE $CONFIG_MIPS32
  4124. dep_bool 'Support for Alchemy Db1000 board' CONFIG_MIPS_DB1000 $CONFIG_MIPS32
  4125. dep_bool 'Support for Alchemy Db1100 board' CONFIG_MIPS_DB1100 $CONFIG_MIPS32
  4126. dep_bool 'Support for Alchemy Db1500 board' CONFIG_MIPS_DB1500 $CONFIG_MIPS32
  4127. dep_bool 'Support for Alchemy Db1550 board' CONFIG_MIPS_DB1550 $CONFIG_MIPS32
  4128. +dep_bool 'Support for Alchemy Db1200 board' CONFIG_MIPS_DB1200 $CONFIG_MIPS32
  4129. dep_bool 'Support for Alchemy PB1000 board' CONFIG_MIPS_PB1000 $CONFIG_MIPS32
  4130. dep_bool 'Support for Alchemy PB1100 board' CONFIG_MIPS_PB1100 $CONFIG_MIPS32
  4131. dep_bool 'Support for Alchemy PB1500 board' CONFIG_MIPS_PB1500 $CONFIG_MIPS32
  4132. -dep_bool 'Support for Alchemy Hydrogen3 board' CONFIG_MIPS_HYDROGEN3 $CONFIG_MIPS32
  4133. dep_bool 'Support for Alchemy PB1550 board' CONFIG_MIPS_PB1550 $CONFIG_MIPS32
  4134. +dep_bool 'Support for Alchemy PB1200 board' CONFIG_MIPS_PB1200 $CONFIG_MIPS32
  4135. +dep_bool 'Support for Alchemy Hydrogen3 board' CONFIG_MIPS_HYDROGEN3 $CONFIG_MIPS32
  4136. dep_bool 'Support for MyCable XXS1500 board' CONFIG_MIPS_XXS1500 $CONFIG_MIPS32
  4137. dep_bool 'Support for 4G Systems MTX-1 board' CONFIG_MIPS_MTX1 $CONFIG_MIPS32
  4138. dep_bool 'Support for Cogent CSB250 board' CONFIG_COGENT_CSB250 $CONFIG_MIPS32
  4139. @@ -249,6 +252,12 @@
  4140. define_bool CONFIG_PC_KEYB y
  4141. define_bool CONFIG_NONCOHERENT_IO y
  4142. fi
  4143. +if [ "$CONFIG_MIPS_FICMMP" = "y" ]; then
  4144. + define_bool CONFIG_SOC_AU1X00 y
  4145. + define_bool CONFIG_SOC_AU1200 y
  4146. + define_bool CONFIG_NONCOHERENT_IO y
  4147. + define_bool CONFIG_PC_KEYB y
  4148. +fi
  4149. if [ "$CONFIG_MIPS_BOSPORUS" = "y" ]; then
  4150. define_bool CONFIG_SOC_AU1X00 y
  4151. define_bool CONFIG_SOC_AU1500 y
  4152. @@ -263,6 +272,12 @@
  4153. define_bool CONFIG_SWAP_IO_SPACE_W y
  4154. define_bool CONFIG_SWAP_IO_SPACE_L y
  4155. fi
  4156. +if [ "$CONFIG_MIPS_PB1500" = "y" ]; then
  4157. + define_bool CONFIG_SOC_AU1X00 y
  4158. + define_bool CONFIG_SOC_AU1500 y
  4159. + define_bool CONFIG_NONCOHERENT_IO y
  4160. + define_bool CONFIG_PC_KEYB y
  4161. +fi
  4162. if [ "$CONFIG_MIPS_PB1100" = "y" ]; then
  4163. define_bool CONFIG_SOC_AU1X00 y
  4164. define_bool CONFIG_SOC_AU1100 y
  4165. @@ -271,9 +286,15 @@
  4166. define_bool CONFIG_SWAP_IO_SPACE_W y
  4167. define_bool CONFIG_SWAP_IO_SPACE_L y
  4168. fi
  4169. -if [ "$CONFIG_MIPS_PB1500" = "y" ]; then
  4170. +if [ "$CONFIG_MIPS_PB1550" = "y" ]; then
  4171. define_bool CONFIG_SOC_AU1X00 y
  4172. - define_bool CONFIG_SOC_AU1500 y
  4173. + define_bool CONFIG_SOC_AU1550 y
  4174. + define_bool CONFIG_NONCOHERENT_IO n
  4175. + define_bool CONFIG_PC_KEYB y
  4176. +fi
  4177. +if [ "$CONFIG_MIPS_PB1200" = "y" ]; then
  4178. + define_bool CONFIG_SOC_AU1X00 y
  4179. + define_bool CONFIG_SOC_AU1200 y
  4180. define_bool CONFIG_NONCOHERENT_IO y
  4181. define_bool CONFIG_PC_KEYB y
  4182. fi
  4183. @@ -290,18 +311,24 @@
  4184. define_bool CONFIG_NONCOHERENT_IO y
  4185. define_bool CONFIG_PC_KEYB y
  4186. fi
  4187. +if [ "$CONFIG_MIPS_DB1100" = "y" ]; then
  4188. + define_bool CONFIG_SOC_AU1X00 y
  4189. + define_bool CONFIG_SOC_AU1100 y
  4190. + define_bool CONFIG_NONCOHERENT_IO y
  4191. + define_bool CONFIG_PC_KEYB y
  4192. + define_bool CONFIG_SWAP_IO_SPACE y
  4193. +fi
  4194. if [ "$CONFIG_MIPS_DB1550" = "y" ]; then
  4195. define_bool CONFIG_SOC_AU1X00 y
  4196. define_bool CONFIG_SOC_AU1550 y
  4197. define_bool CONFIG_NONCOHERENT_IO y
  4198. define_bool CONFIG_PC_KEYB y
  4199. fi
  4200. -if [ "$CONFIG_MIPS_DB1100" = "y" ]; then
  4201. +if [ "$CONFIG_MIPS_DB1200" = "y" ]; then
  4202. define_bool CONFIG_SOC_AU1X00 y
  4203. - define_bool CONFIG_SOC_AU1100 y
  4204. + define_bool CONFIG_SOC_AU1200 y
  4205. define_bool CONFIG_NONCOHERENT_IO y
  4206. define_bool CONFIG_PC_KEYB y
  4207. - define_bool CONFIG_SWAP_IO_SPACE y
  4208. fi
  4209. if [ "$CONFIG_MIPS_HYDROGEN3" = "y" ]; then
  4210. define_bool CONFIG_SOC_AU1X00 y
  4211. @@ -327,12 +354,6 @@
  4212. define_bool CONFIG_NONCOHERENT_IO y
  4213. define_bool CONFIG_PC_KEYB y
  4214. fi
  4215. -if [ "$CONFIG_MIPS_PB1550" = "y" ]; then
  4216. - define_bool CONFIG_SOC_AU1X00 y
  4217. - define_bool CONFIG_SOC_AU1550 y
  4218. - define_bool CONFIG_NONCOHERENT_IO n
  4219. - define_bool CONFIG_PC_KEYB y
  4220. -fi
  4221. if [ "$CONFIG_MIPS_COBALT" = "y" ]; then
  4222. define_bool CONFIG_BOOT_ELF32 y
  4223. define_bool CONFIG_COBALT_LCD y
  4224. @@ -729,6 +750,13 @@
  4225. "$CONFIG_MIPS_PB1000" = "y" -o \
  4226. "$CONFIG_MIPS_PB1100" = "y" -o \
  4227. "$CONFIG_MIPS_PB1500" = "y" -o \
  4228. + "$CONFIG_MIPS_PB1550" = "y" -o \
  4229. + "$CONFIG_MIPS_PB1200" = "y" -o \
  4230. + "$CONFIG_MIPS_DB1000" = "y" -o \
  4231. + "$CONFIG_MIPS_DB1100" = "y" -o \
  4232. + "$CONFIG_MIPS_DB1500" = "y" -o \
  4233. + "$CONFIG_MIPS_DB1550" = "y" -o \
  4234. + "$CONFIG_MIPS_DB1200" = "y" -o \
  4235. "$CONFIG_NEC_OSPREY" = "y" -o \
  4236. "$CONFIG_NEC_EAGLE" = "y" -o \
  4237. "$CONFIG_NINO" = "y" -o \
  4238. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig linux-2.4.32-rc1.mips/arch/mips/defconfig
  4239. --- linux-2.4.32-rc1/arch/mips/defconfig 2005-01-19 15:09:27.000000000 +0100
  4240. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig 2005-03-18 13:13:21.000000000 +0100
  4241. @@ -30,8 +30,8 @@
  4242. # CONFIG_MIPS_PB1000 is not set
  4243. # CONFIG_MIPS_PB1100 is not set
  4244. # CONFIG_MIPS_PB1500 is not set
  4245. -# CONFIG_MIPS_HYDROGEN3 is not set
  4246. # CONFIG_MIPS_PB1550 is not set
  4247. +# CONFIG_MIPS_HYDROGEN3 is not set
  4248. # CONFIG_MIPS_XXS1500 is not set
  4249. # CONFIG_MIPS_MTX1 is not set
  4250. # CONFIG_COGENT_CSB250 is not set
  4251. @@ -235,11 +235,6 @@
  4252. #
  4253. # CONFIG_IPX is not set
  4254. # CONFIG_ATALK is not set
  4255. -
  4256. -#
  4257. -# Appletalk devices
  4258. -#
  4259. -# CONFIG_DEV_APPLETALK is not set
  4260. # CONFIG_DECNET is not set
  4261. # CONFIG_BRIDGE is not set
  4262. # CONFIG_X25 is not set
  4263. @@ -319,9 +314,11 @@
  4264. # CONFIG_SCSI_MEGARAID is not set
  4265. # CONFIG_SCSI_MEGARAID2 is not set
  4266. # CONFIG_SCSI_SATA is not set
  4267. +# CONFIG_SCSI_SATA_AHCI is not set
  4268. # CONFIG_SCSI_SATA_SVW is not set
  4269. # CONFIG_SCSI_ATA_PIIX is not set
  4270. # CONFIG_SCSI_SATA_NV is not set
  4271. +# CONFIG_SCSI_SATA_QSTOR is not set
  4272. # CONFIG_SCSI_SATA_PROMISE is not set
  4273. # CONFIG_SCSI_SATA_SX4 is not set
  4274. # CONFIG_SCSI_SATA_SIL is not set
  4275. @@ -465,7 +462,6 @@
  4276. # CONFIG_SERIAL is not set
  4277. # CONFIG_SERIAL_EXTENDED is not set
  4278. # CONFIG_SERIAL_NONSTANDARD is not set
  4279. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  4280. CONFIG_UNIX98_PTYS=y
  4281. CONFIG_UNIX98_PTY_COUNT=256
  4282. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-atlas linux-2.4.32-rc1.mips/arch/mips/defconfig-atlas
  4283. --- linux-2.4.32-rc1/arch/mips/defconfig-atlas 2005-01-19 15:09:27.000000000 +0100
  4284. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-atlas 2005-03-18 13:13:21.000000000 +0100
  4285. @@ -28,8 +28,8 @@
  4286. # CONFIG_MIPS_PB1000 is not set
  4287. # CONFIG_MIPS_PB1100 is not set
  4288. # CONFIG_MIPS_PB1500 is not set
  4289. -# CONFIG_MIPS_HYDROGEN3 is not set
  4290. # CONFIG_MIPS_PB1550 is not set
  4291. +# CONFIG_MIPS_HYDROGEN3 is not set
  4292. # CONFIG_MIPS_XXS1500 is not set
  4293. # CONFIG_MIPS_MTX1 is not set
  4294. # CONFIG_COGENT_CSB250 is not set
  4295. @@ -235,11 +235,6 @@
  4296. #
  4297. # CONFIG_IPX is not set
  4298. # CONFIG_ATALK is not set
  4299. -
  4300. -#
  4301. -# Appletalk devices
  4302. -#
  4303. -# CONFIG_DEV_APPLETALK is not set
  4304. # CONFIG_DECNET is not set
  4305. # CONFIG_BRIDGE is not set
  4306. # CONFIG_X25 is not set
  4307. @@ -317,9 +312,11 @@
  4308. # CONFIG_SCSI_MEGARAID is not set
  4309. # CONFIG_SCSI_MEGARAID2 is not set
  4310. # CONFIG_SCSI_SATA is not set
  4311. +# CONFIG_SCSI_SATA_AHCI is not set
  4312. # CONFIG_SCSI_SATA_SVW is not set
  4313. # CONFIG_SCSI_ATA_PIIX is not set
  4314. # CONFIG_SCSI_SATA_NV is not set
  4315. +# CONFIG_SCSI_SATA_QSTOR is not set
  4316. # CONFIG_SCSI_SATA_PROMISE is not set
  4317. # CONFIG_SCSI_SATA_SX4 is not set
  4318. # CONFIG_SCSI_SATA_SIL is not set
  4319. @@ -528,7 +525,6 @@
  4320. CONFIG_SERIAL_CONSOLE=y
  4321. # CONFIG_SERIAL_EXTENDED is not set
  4322. # CONFIG_SERIAL_NONSTANDARD is not set
  4323. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  4324. CONFIG_UNIX98_PTYS=y
  4325. CONFIG_UNIX98_PTY_COUNT=256
  4326. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-bosporus linux-2.4.32-rc1.mips/arch/mips/defconfig-bosporus
  4327. --- linux-2.4.32-rc1/arch/mips/defconfig-bosporus 2005-01-19 15:09:27.000000000 +0100
  4328. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-bosporus 2005-03-18 13:13:21.000000000 +0100
  4329. @@ -30,8 +30,8 @@
  4330. # CONFIG_MIPS_PB1000 is not set
  4331. # CONFIG_MIPS_PB1100 is not set
  4332. # CONFIG_MIPS_PB1500 is not set
  4333. -# CONFIG_MIPS_HYDROGEN3 is not set
  4334. # CONFIG_MIPS_PB1550 is not set
  4335. +# CONFIG_MIPS_HYDROGEN3 is not set
  4336. # CONFIG_MIPS_XXS1500 is not set
  4337. # CONFIG_MIPS_MTX1 is not set
  4338. # CONFIG_COGENT_CSB250 is not set
  4339. @@ -208,9 +208,7 @@
  4340. CONFIG_MTD_BOSPORUS=y
  4341. # CONFIG_MTD_XXS1500 is not set
  4342. # CONFIG_MTD_MTX1 is not set
  4343. -# CONFIG_MTD_DB1X00 is not set
  4344. # CONFIG_MTD_PB1550 is not set
  4345. -# CONFIG_MTD_HYDROGEN3 is not set
  4346. # CONFIG_MTD_MIRAGE is not set
  4347. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  4348. # CONFIG_MTD_OCELOT is not set
  4349. @@ -229,7 +227,6 @@
  4350. #
  4351. # Disk-On-Chip Device Drivers
  4352. #
  4353. -# CONFIG_MTD_DOC1000 is not set
  4354. # CONFIG_MTD_DOC2000 is not set
  4355. # CONFIG_MTD_DOC2001 is not set
  4356. # CONFIG_MTD_DOCPROBE is not set
  4357. @@ -373,11 +370,6 @@
  4358. #
  4359. # CONFIG_IPX is not set
  4360. # CONFIG_ATALK is not set
  4361. -
  4362. -#
  4363. -# Appletalk devices
  4364. -#
  4365. -# CONFIG_DEV_APPLETALK is not set
  4366. # CONFIG_DECNET is not set
  4367. # CONFIG_BRIDGE is not set
  4368. # CONFIG_X25 is not set
  4369. @@ -457,9 +449,11 @@
  4370. # CONFIG_SCSI_MEGARAID is not set
  4371. # CONFIG_SCSI_MEGARAID2 is not set
  4372. # CONFIG_SCSI_SATA is not set
  4373. +# CONFIG_SCSI_SATA_AHCI is not set
  4374. # CONFIG_SCSI_SATA_SVW is not set
  4375. # CONFIG_SCSI_ATA_PIIX is not set
  4376. # CONFIG_SCSI_SATA_NV is not set
  4377. +# CONFIG_SCSI_SATA_QSTOR is not set
  4378. # CONFIG_SCSI_SATA_PROMISE is not set
  4379. # CONFIG_SCSI_SATA_SX4 is not set
  4380. # CONFIG_SCSI_SATA_SIL is not set
  4381. @@ -681,7 +675,6 @@
  4382. # CONFIG_AU1X00_USB_TTY is not set
  4383. # CONFIG_AU1X00_USB_RAW is not set
  4384. # CONFIG_TXX927_SERIAL is not set
  4385. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  4386. CONFIG_UNIX98_PTYS=y
  4387. CONFIG_UNIX98_PTY_COUNT=256
  4388. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-capcella linux-2.4.32-rc1.mips/arch/mips/defconfig-capcella
  4389. --- linux-2.4.32-rc1/arch/mips/defconfig-capcella 2005-01-19 15:09:27.000000000 +0100
  4390. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-capcella 2005-03-18 13:13:21.000000000 +0100
  4391. @@ -30,8 +30,8 @@
  4392. # CONFIG_MIPS_PB1000 is not set
  4393. # CONFIG_MIPS_PB1100 is not set
  4394. # CONFIG_MIPS_PB1500 is not set
  4395. -# CONFIG_MIPS_HYDROGEN3 is not set
  4396. # CONFIG_MIPS_PB1550 is not set
  4397. +# CONFIG_MIPS_HYDROGEN3 is not set
  4398. # CONFIG_MIPS_XXS1500 is not set
  4399. # CONFIG_MIPS_MTX1 is not set
  4400. # CONFIG_COGENT_CSB250 is not set
  4401. @@ -228,11 +228,6 @@
  4402. #
  4403. # CONFIG_IPX is not set
  4404. # CONFIG_ATALK is not set
  4405. -
  4406. -#
  4407. -# Appletalk devices
  4408. -#
  4409. -# CONFIG_DEV_APPLETALK is not set
  4410. # CONFIG_DECNET is not set
  4411. # CONFIG_BRIDGE is not set
  4412. # CONFIG_X25 is not set
  4413. @@ -472,7 +467,6 @@
  4414. CONFIG_SERIAL_CONSOLE=y
  4415. # CONFIG_SERIAL_EXTENDED is not set
  4416. # CONFIG_SERIAL_NONSTANDARD is not set
  4417. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  4418. # CONFIG_VR41XX_KIU is not set
  4419. CONFIG_UNIX98_PTYS=y
  4420. CONFIG_UNIX98_PTY_COUNT=256
  4421. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-cobalt linux-2.4.32-rc1.mips/arch/mips/defconfig-cobalt
  4422. --- linux-2.4.32-rc1/arch/mips/defconfig-cobalt 2005-01-19 15:09:28.000000000 +0100
  4423. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-cobalt 2005-03-18 13:13:21.000000000 +0100
  4424. @@ -28,8 +28,8 @@
  4425. # CONFIG_MIPS_PB1000 is not set
  4426. # CONFIG_MIPS_PB1100 is not set
  4427. # CONFIG_MIPS_PB1500 is not set
  4428. -# CONFIG_MIPS_HYDROGEN3 is not set
  4429. # CONFIG_MIPS_PB1550 is not set
  4430. +# CONFIG_MIPS_HYDROGEN3 is not set
  4431. # CONFIG_MIPS_XXS1500 is not set
  4432. # CONFIG_MIPS_MTX1 is not set
  4433. # CONFIG_COGENT_CSB250 is not set
  4434. @@ -222,11 +222,6 @@
  4435. #
  4436. # CONFIG_IPX is not set
  4437. # CONFIG_ATALK is not set
  4438. -
  4439. -#
  4440. -# Appletalk devices
  4441. -#
  4442. -# CONFIG_DEV_APPLETALK is not set
  4443. # CONFIG_DECNET is not set
  4444. # CONFIG_BRIDGE is not set
  4445. # CONFIG_X25 is not set
  4446. @@ -505,7 +500,6 @@
  4447. CONFIG_SERIAL_CONSOLE=y
  4448. # CONFIG_SERIAL_EXTENDED is not set
  4449. # CONFIG_SERIAL_NONSTANDARD is not set
  4450. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  4451. CONFIG_UNIX98_PTYS=y
  4452. CONFIG_UNIX98_PTY_COUNT=16
  4453. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-csb250 linux-2.4.32-rc1.mips/arch/mips/defconfig-csb250
  4454. --- linux-2.4.32-rc1/arch/mips/defconfig-csb250 2005-01-19 15:09:28.000000000 +0100
  4455. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-csb250 2005-03-18 13:13:21.000000000 +0100
  4456. @@ -30,8 +30,8 @@
  4457. # CONFIG_MIPS_PB1000 is not set
  4458. # CONFIG_MIPS_PB1100 is not set
  4459. # CONFIG_MIPS_PB1500 is not set
  4460. -# CONFIG_MIPS_HYDROGEN3 is not set
  4461. # CONFIG_MIPS_PB1550 is not set
  4462. +# CONFIG_MIPS_HYDROGEN3 is not set
  4463. # CONFIG_MIPS_XXS1500 is not set
  4464. # CONFIG_MIPS_MTX1 is not set
  4465. CONFIG_COGENT_CSB250=y
  4466. @@ -268,11 +268,6 @@
  4467. #
  4468. # CONFIG_IPX is not set
  4469. # CONFIG_ATALK is not set
  4470. -
  4471. -#
  4472. -# Appletalk devices
  4473. -#
  4474. -# CONFIG_DEV_APPLETALK is not set
  4475. # CONFIG_DECNET is not set
  4476. # CONFIG_BRIDGE is not set
  4477. # CONFIG_X25 is not set
  4478. @@ -556,7 +551,6 @@
  4479. # CONFIG_AU1X00_USB_TTY is not set
  4480. # CONFIG_AU1X00_USB_RAW is not set
  4481. # CONFIG_TXX927_SERIAL is not set
  4482. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  4483. CONFIG_UNIX98_PTYS=y
  4484. CONFIG_UNIX98_PTY_COUNT=256
  4485. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-db1000 linux-2.4.32-rc1.mips/arch/mips/defconfig-db1000
  4486. --- linux-2.4.32-rc1/arch/mips/defconfig-db1000 2005-01-19 15:09:28.000000000 +0100
  4487. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-db1000 2005-03-18 13:13:21.000000000 +0100
  4488. @@ -30,8 +30,8 @@
  4489. # CONFIG_MIPS_PB1000 is not set
  4490. # CONFIG_MIPS_PB1100 is not set
  4491. # CONFIG_MIPS_PB1500 is not set
  4492. -# CONFIG_MIPS_HYDROGEN3 is not set
  4493. # CONFIG_MIPS_PB1550 is not set
  4494. +# CONFIG_MIPS_HYDROGEN3 is not set
  4495. # CONFIG_MIPS_XXS1500 is not set
  4496. # CONFIG_MIPS_MTX1 is not set
  4497. # CONFIG_COGENT_CSB250 is not set
  4498. @@ -214,11 +214,7 @@
  4499. # CONFIG_MTD_BOSPORUS is not set
  4500. # CONFIG_MTD_XXS1500 is not set
  4501. # CONFIG_MTD_MTX1 is not set
  4502. -CONFIG_MTD_DB1X00=y
  4503. -CONFIG_MTD_DB1X00_BOOT=y
  4504. -CONFIG_MTD_DB1X00_USER=y
  4505. # CONFIG_MTD_PB1550 is not set
  4506. -# CONFIG_MTD_HYDROGEN3 is not set
  4507. # CONFIG_MTD_MIRAGE is not set
  4508. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  4509. # CONFIG_MTD_OCELOT is not set
  4510. @@ -237,7 +233,6 @@
  4511. #
  4512. # Disk-On-Chip Device Drivers
  4513. #
  4514. -# CONFIG_MTD_DOC1000 is not set
  4515. # CONFIG_MTD_DOC2000 is not set
  4516. # CONFIG_MTD_DOC2001 is not set
  4517. # CONFIG_MTD_DOCPROBE is not set
  4518. @@ -342,11 +337,6 @@
  4519. #
  4520. # CONFIG_IPX is not set
  4521. # CONFIG_ATALK is not set
  4522. -
  4523. -#
  4524. -# Appletalk devices
  4525. -#
  4526. -# CONFIG_DEV_APPLETALK is not set
  4527. # CONFIG_DECNET is not set
  4528. # CONFIG_BRIDGE is not set
  4529. # CONFIG_X25 is not set
  4530. @@ -636,7 +626,6 @@
  4531. # CONFIG_AU1X00_USB_TTY is not set
  4532. # CONFIG_AU1X00_USB_RAW is not set
  4533. # CONFIG_TXX927_SERIAL is not set
  4534. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  4535. CONFIG_UNIX98_PTYS=y
  4536. CONFIG_UNIX98_PTY_COUNT=256
  4537. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-db1100 linux-2.4.32-rc1.mips/arch/mips/defconfig-db1100
  4538. --- linux-2.4.32-rc1/arch/mips/defconfig-db1100 2005-01-19 15:09:28.000000000 +0100
  4539. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-db1100 2005-03-18 13:13:21.000000000 +0100
  4540. @@ -30,8 +30,8 @@
  4541. # CONFIG_MIPS_PB1000 is not set
  4542. # CONFIG_MIPS_PB1100 is not set
  4543. # CONFIG_MIPS_PB1500 is not set
  4544. -# CONFIG_MIPS_HYDROGEN3 is not set
  4545. # CONFIG_MIPS_PB1550 is not set
  4546. +# CONFIG_MIPS_HYDROGEN3 is not set
  4547. # CONFIG_MIPS_XXS1500 is not set
  4548. # CONFIG_MIPS_MTX1 is not set
  4549. # CONFIG_COGENT_CSB250 is not set
  4550. @@ -214,11 +214,7 @@
  4551. # CONFIG_MTD_BOSPORUS is not set
  4552. # CONFIG_MTD_XXS1500 is not set
  4553. # CONFIG_MTD_MTX1 is not set
  4554. -CONFIG_MTD_DB1X00=y
  4555. -# CONFIG_MTD_DB1X00_BOOT is not set
  4556. -CONFIG_MTD_DB1X00_USER=y
  4557. # CONFIG_MTD_PB1550 is not set
  4558. -# CONFIG_MTD_HYDROGEN3 is not set
  4559. # CONFIG_MTD_MIRAGE is not set
  4560. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  4561. # CONFIG_MTD_OCELOT is not set
  4562. @@ -237,7 +233,6 @@
  4563. #
  4564. # Disk-On-Chip Device Drivers
  4565. #
  4566. -# CONFIG_MTD_DOC1000 is not set
  4567. # CONFIG_MTD_DOC2000 is not set
  4568. # CONFIG_MTD_DOC2001 is not set
  4569. # CONFIG_MTD_DOCPROBE is not set
  4570. @@ -342,11 +337,6 @@
  4571. #
  4572. # CONFIG_IPX is not set
  4573. # CONFIG_ATALK is not set
  4574. -
  4575. -#
  4576. -# Appletalk devices
  4577. -#
  4578. -# CONFIG_DEV_APPLETALK is not set
  4579. # CONFIG_DECNET is not set
  4580. # CONFIG_BRIDGE is not set
  4581. # CONFIG_X25 is not set
  4582. @@ -636,7 +626,6 @@
  4583. # CONFIG_AU1X00_USB_TTY is not set
  4584. # CONFIG_AU1X00_USB_RAW is not set
  4585. # CONFIG_TXX927_SERIAL is not set
  4586. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  4587. CONFIG_UNIX98_PTYS=y
  4588. CONFIG_UNIX98_PTY_COUNT=256
  4589. @@ -884,6 +873,7 @@
  4590. # CONFIG_FB_PM2 is not set
  4591. # CONFIG_FB_PM3 is not set
  4592. # CONFIG_FB_CYBER2000 is not set
  4593. +CONFIG_FB_AU1100=y
  4594. # CONFIG_FB_MATROX is not set
  4595. # CONFIG_FB_ATY is not set
  4596. # CONFIG_FB_RADEON is not set
  4597. @@ -895,7 +885,6 @@
  4598. # CONFIG_FB_VOODOO1 is not set
  4599. # CONFIG_FB_TRIDENT is not set
  4600. # CONFIG_FB_E1356 is not set
  4601. -CONFIG_FB_AU1100=y
  4602. # CONFIG_FB_IT8181 is not set
  4603. # CONFIG_FB_VIRTUAL is not set
  4604. CONFIG_FBCON_ADVANCED=y
  4605. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-db1200 linux-2.4.32-rc1.mips/arch/mips/defconfig-db1200
  4606. --- linux-2.4.32-rc1/arch/mips/defconfig-db1200 1970-01-01 01:00:00.000000000 +0100
  4607. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-db1200 2005-03-18 13:13:21.000000000 +0100
  4608. @@ -0,0 +1,1032 @@
  4609. +#
  4610. +# Automatically generated make config: don't edit
  4611. +#
  4612. +CONFIG_MIPS=y
  4613. +CONFIG_MIPS32=y
  4614. +# CONFIG_MIPS64 is not set
  4615. +
  4616. +#
  4617. +# Code maturity level options
  4618. +#
  4619. +CONFIG_EXPERIMENTAL=y
  4620. +
  4621. +#
  4622. +# Loadable module support
  4623. +#
  4624. +CONFIG_MODULES=y
  4625. +# CONFIG_MODVERSIONS is not set
  4626. +CONFIG_KMOD=y
  4627. +
  4628. +#
  4629. +# Machine selection
  4630. +#
  4631. +# CONFIG_ACER_PICA_61 is not set
  4632. +# CONFIG_MIPS_BOSPORUS is not set
  4633. +# CONFIG_MIPS_MIRAGE is not set
  4634. +# CONFIG_MIPS_DB1000 is not set
  4635. +# CONFIG_MIPS_DB1100 is not set
  4636. +# CONFIG_MIPS_DB1500 is not set
  4637. +# CONFIG_MIPS_DB1550 is not set
  4638. +# CONFIG_MIPS_PB1000 is not set
  4639. +# CONFIG_MIPS_PB1100 is not set
  4640. +# CONFIG_MIPS_PB1500 is not set
  4641. +# CONFIG_MIPS_PB1550 is not set
  4642. +# CONFIG_MIPS_HYDROGEN3 is not set
  4643. +# CONFIG_MIPS_XXS1500 is not set
  4644. +# CONFIG_MIPS_MTX1 is not set
  4645. +# CONFIG_COGENT_CSB250 is not set
  4646. +# CONFIG_BAGET_MIPS is not set
  4647. +# CONFIG_CASIO_E55 is not set
  4648. +# CONFIG_MIPS_COBALT is not set
  4649. +# CONFIG_DECSTATION is not set
  4650. +# CONFIG_MIPS_EV64120 is not set
  4651. +# CONFIG_MIPS_EV96100 is not set
  4652. +# CONFIG_MIPS_IVR is not set
  4653. +# CONFIG_HP_LASERJET is not set
  4654. +# CONFIG_IBM_WORKPAD is not set
  4655. +# CONFIG_LASAT is not set
  4656. +# CONFIG_MIPS_ITE8172 is not set
  4657. +# CONFIG_MIPS_ATLAS is not set
  4658. +# CONFIG_MIPS_MAGNUM_4000 is not set
  4659. +# CONFIG_MIPS_MALTA is not set
  4660. +# CONFIG_MIPS_SEAD is not set
  4661. +# CONFIG_MOMENCO_OCELOT is not set
  4662. +# CONFIG_MOMENCO_OCELOT_G is not set
  4663. +# CONFIG_MOMENCO_OCELOT_C is not set
  4664. +# CONFIG_MOMENCO_JAGUAR_ATX is not set
  4665. +# CONFIG_PMC_BIG_SUR is not set
  4666. +# CONFIG_PMC_STRETCH is not set
  4667. +# CONFIG_PMC_YOSEMITE is not set
  4668. +# CONFIG_DDB5074 is not set
  4669. +# CONFIG_DDB5476 is not set
  4670. +# CONFIG_DDB5477 is not set
  4671. +# CONFIG_NEC_OSPREY is not set
  4672. +# CONFIG_NEC_EAGLE is not set
  4673. +# CONFIG_OLIVETTI_M700 is not set
  4674. +# CONFIG_NINO is not set
  4675. +# CONFIG_SGI_IP22 is not set
  4676. +# CONFIG_SGI_IP27 is not set
  4677. +# CONFIG_SIBYTE_SB1xxx_SOC is not set
  4678. +# CONFIG_SNI_RM200_PCI is not set
  4679. +# CONFIG_TANBAC_TB0226 is not set
  4680. +# CONFIG_TANBAC_TB0229 is not set
  4681. +# CONFIG_TOSHIBA_JMR3927 is not set
  4682. +# CONFIG_TOSHIBA_RBTX4927 is not set
  4683. +# CONFIG_VICTOR_MPC30X is not set
  4684. +# CONFIG_ZAO_CAPCELLA is not set
  4685. +# CONFIG_HIGHMEM is not set
  4686. +CONFIG_RWSEM_GENERIC_SPINLOCK=y
  4687. +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
  4688. +# CONFIG_MIPS_AU1000 is not set
  4689. +
  4690. +#
  4691. +# CPU selection
  4692. +#
  4693. +CONFIG_CPU_MIPS32=y
  4694. +# CONFIG_CPU_MIPS64 is not set
  4695. +# CONFIG_CPU_R3000 is not set
  4696. +# CONFIG_CPU_TX39XX is not set
  4697. +# CONFIG_CPU_VR41XX is not set
  4698. +# CONFIG_CPU_R4300 is not set
  4699. +# CONFIG_CPU_R4X00 is not set
  4700. +# CONFIG_CPU_TX49XX is not set
  4701. +# CONFIG_CPU_R5000 is not set
  4702. +# CONFIG_CPU_R5432 is not set
  4703. +# CONFIG_CPU_R6000 is not set
  4704. +# CONFIG_CPU_NEVADA is not set
  4705. +# CONFIG_CPU_R8000 is not set
  4706. +# CONFIG_CPU_R10000 is not set
  4707. +# CONFIG_CPU_RM7000 is not set
  4708. +# CONFIG_CPU_RM9000 is not set
  4709. +# CONFIG_CPU_SB1 is not set
  4710. +CONFIG_PAGE_SIZE_4KB=y
  4711. +# CONFIG_PAGE_SIZE_16KB is not set
  4712. +# CONFIG_PAGE_SIZE_64KB is not set
  4713. +CONFIG_CPU_HAS_PREFETCH=y
  4714. +# CONFIG_VTAG_ICACHE is not set
  4715. +CONFIG_64BIT_PHYS_ADDR=y
  4716. +# CONFIG_CPU_ADVANCED is not set
  4717. +CONFIG_CPU_HAS_LLSC=y
  4718. +# CONFIG_CPU_HAS_LLDSCD is not set
  4719. +# CONFIG_CPU_HAS_WB is not set
  4720. +CONFIG_CPU_HAS_SYNC=y
  4721. +
  4722. +#
  4723. +# General setup
  4724. +#
  4725. +CONFIG_CPU_LITTLE_ENDIAN=y
  4726. +# CONFIG_BUILD_ELF64 is not set
  4727. +CONFIG_NET=y
  4728. +CONFIG_PCI=y
  4729. +CONFIG_PCI_NEW=y
  4730. +CONFIG_PCI_AUTO=y
  4731. +# CONFIG_PCI_NAMES is not set
  4732. +# CONFIG_ISA is not set
  4733. +# CONFIG_TC is not set
  4734. +# CONFIG_MCA is not set
  4735. +# CONFIG_SBUS is not set
  4736. +CONFIG_HOTPLUG=y
  4737. +
  4738. +#
  4739. +# PCMCIA/CardBus support
  4740. +#
  4741. +CONFIG_PCMCIA=m
  4742. +# CONFIG_CARDBUS is not set
  4743. +# CONFIG_TCIC is not set
  4744. +# CONFIG_I82092 is not set
  4745. +# CONFIG_I82365 is not set
  4746. +
  4747. +#
  4748. +# PCI Hotplug Support
  4749. +#
  4750. +# CONFIG_HOTPLUG_PCI is not set
  4751. +# CONFIG_HOTPLUG_PCI_COMPAQ is not set
  4752. +# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
  4753. +# CONFIG_HOTPLUG_PCI_SHPC is not set
  4754. +# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
  4755. +# CONFIG_HOTPLUG_PCI_PCIE is not set
  4756. +# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
  4757. +CONFIG_SYSVIPC=y
  4758. +# CONFIG_BSD_PROCESS_ACCT is not set
  4759. +CONFIG_SYSCTL=y
  4760. +CONFIG_KCORE_ELF=y
  4761. +# CONFIG_KCORE_AOUT is not set
  4762. +# CONFIG_BINFMT_AOUT is not set
  4763. +CONFIG_BINFMT_ELF=y
  4764. +# CONFIG_MIPS32_COMPAT is not set
  4765. +# CONFIG_MIPS32_O32 is not set
  4766. +# CONFIG_MIPS32_N32 is not set
  4767. +# CONFIG_BINFMT_ELF32 is not set
  4768. +# CONFIG_BINFMT_MISC is not set
  4769. +# CONFIG_OOM_KILLER is not set
  4770. +CONFIG_CMDLINE_BOOL=y
  4771. +CONFIG_CMDLINE="mem=96M"
  4772. +
  4773. +#
  4774. +# Memory Technology Devices (MTD)
  4775. +#
  4776. +# CONFIG_MTD is not set
  4777. +
  4778. +#
  4779. +# Parallel port support
  4780. +#
  4781. +# CONFIG_PARPORT is not set
  4782. +
  4783. +#
  4784. +# Plug and Play configuration
  4785. +#
  4786. +# CONFIG_PNP is not set
  4787. +# CONFIG_ISAPNP is not set
  4788. +
  4789. +#
  4790. +# Block devices
  4791. +#
  4792. +# CONFIG_BLK_DEV_FD is not set
  4793. +# CONFIG_BLK_DEV_XD is not set
  4794. +# CONFIG_PARIDE is not set
  4795. +# CONFIG_BLK_CPQ_DA is not set
  4796. +# CONFIG_BLK_CPQ_CISS_DA is not set
  4797. +# CONFIG_CISS_SCSI_TAPE is not set
  4798. +# CONFIG_CISS_MONITOR_THREAD is not set
  4799. +# CONFIG_BLK_DEV_DAC960 is not set
  4800. +# CONFIG_BLK_DEV_UMEM is not set
  4801. +# CONFIG_BLK_DEV_SX8 is not set
  4802. +CONFIG_BLK_DEV_LOOP=y
  4803. +# CONFIG_BLK_DEV_NBD is not set
  4804. +# CONFIG_BLK_DEV_RAM is not set
  4805. +# CONFIG_BLK_DEV_INITRD is not set
  4806. +# CONFIG_BLK_STATS is not set
  4807. +
  4808. +#
  4809. +# Multi-device support (RAID and LVM)
  4810. +#
  4811. +# CONFIG_MD is not set
  4812. +# CONFIG_BLK_DEV_MD is not set
  4813. +# CONFIG_MD_LINEAR is not set
  4814. +# CONFIG_MD_RAID0 is not set
  4815. +# CONFIG_MD_RAID1 is not set
  4816. +# CONFIG_MD_RAID5 is not set
  4817. +# CONFIG_MD_MULTIPATH is not set
  4818. +# CONFIG_BLK_DEV_LVM is not set
  4819. +
  4820. +#
  4821. +# Networking options
  4822. +#
  4823. +CONFIG_PACKET=y
  4824. +# CONFIG_PACKET_MMAP is not set
  4825. +# CONFIG_NETLINK_DEV is not set
  4826. +CONFIG_NETFILTER=y
  4827. +# CONFIG_NETFILTER_DEBUG is not set
  4828. +CONFIG_FILTER=y
  4829. +CONFIG_UNIX=y
  4830. +CONFIG_INET=y
  4831. +CONFIG_IP_MULTICAST=y
  4832. +# CONFIG_IP_ADVANCED_ROUTER is not set
  4833. +CONFIG_IP_PNP=y
  4834. +# CONFIG_IP_PNP_DHCP is not set
  4835. +CONFIG_IP_PNP_BOOTP=y
  4836. +# CONFIG_IP_PNP_RARP is not set
  4837. +# CONFIG_NET_IPIP is not set
  4838. +# CONFIG_NET_IPGRE is not set
  4839. +# CONFIG_IP_MROUTE is not set
  4840. +# CONFIG_ARPD is not set
  4841. +# CONFIG_INET_ECN is not set
  4842. +# CONFIG_SYN_COOKIES is not set
  4843. +
  4844. +#
  4845. +# IP: Netfilter Configuration
  4846. +#
  4847. +# CONFIG_IP_NF_CONNTRACK is not set
  4848. +# CONFIG_IP_NF_QUEUE is not set
  4849. +# CONFIG_IP_NF_IPTABLES is not set
  4850. +# CONFIG_IP_NF_ARPTABLES is not set
  4851. +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
  4852. +# CONFIG_IP_NF_COMPAT_IPFWADM is not set
  4853. +
  4854. +#
  4855. +# IP: Virtual Server Configuration
  4856. +#
  4857. +# CONFIG_IP_VS is not set
  4858. +# CONFIG_IPV6 is not set
  4859. +# CONFIG_KHTTPD is not set
  4860. +
  4861. +#
  4862. +# SCTP Configuration (EXPERIMENTAL)
  4863. +#
  4864. +# CONFIG_IP_SCTP is not set
  4865. +# CONFIG_ATM is not set
  4866. +# CONFIG_VLAN_8021Q is not set
  4867. +
  4868. +#
  4869. +#
  4870. +#
  4871. +# CONFIG_IPX is not set
  4872. +# CONFIG_ATALK is not set
  4873. +# CONFIG_DECNET is not set
  4874. +# CONFIG_BRIDGE is not set
  4875. +# CONFIG_X25 is not set
  4876. +# CONFIG_LAPB is not set
  4877. +# CONFIG_LLC is not set
  4878. +# CONFIG_NET_DIVERT is not set
  4879. +# CONFIG_ECONET is not set
  4880. +# CONFIG_WAN_ROUTER is not set
  4881. +# CONFIG_NET_FASTROUTE is not set
  4882. +# CONFIG_NET_HW_FLOWCONTROL is not set
  4883. +
  4884. +#
  4885. +# QoS and/or fair queueing
  4886. +#
  4887. +# CONFIG_NET_SCHED is not set
  4888. +
  4889. +#
  4890. +# Network testing
  4891. +#
  4892. +# CONFIG_NET_PKTGEN is not set
  4893. +
  4894. +#
  4895. +# Telephony Support
  4896. +#
  4897. +# CONFIG_PHONE is not set
  4898. +# CONFIG_PHONE_IXJ is not set
  4899. +# CONFIG_PHONE_IXJ_PCMCIA is not set
  4900. +
  4901. +#
  4902. +# ATA/IDE/MFM/RLL support
  4903. +#
  4904. +CONFIG_IDE=y
  4905. +
  4906. +#
  4907. +# IDE, ATA and ATAPI Block devices
  4908. +#
  4909. +CONFIG_BLK_DEV_IDE=y
  4910. +
  4911. +#
  4912. +# Please see Documentation/ide.txt for help/info on IDE drives
  4913. +#
  4914. +# CONFIG_BLK_DEV_HD_IDE is not set
  4915. +# CONFIG_BLK_DEV_HD is not set
  4916. +# CONFIG_BLK_DEV_IDE_SATA is not set
  4917. +CONFIG_BLK_DEV_IDEDISK=y
  4918. +CONFIG_IDEDISK_MULTI_MODE=y
  4919. +CONFIG_IDEDISK_STROKE=y
  4920. +CONFIG_BLK_DEV_IDECS=m
  4921. +# CONFIG_BLK_DEV_DELKIN is not set
  4922. +# CONFIG_BLK_DEV_IDECD is not set
  4923. +# CONFIG_BLK_DEV_IDETAPE is not set
  4924. +# CONFIG_BLK_DEV_IDEFLOPPY is not set
  4925. +# CONFIG_BLK_DEV_IDESCSI is not set
  4926. +# CONFIG_IDE_TASK_IOCTL is not set
  4927. +
  4928. +#
  4929. +# IDE chipset support/bugfixes
  4930. +#
  4931. +# CONFIG_BLK_DEV_CMD640 is not set
  4932. +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
  4933. +# CONFIG_BLK_DEV_ISAPNP is not set
  4934. +# CONFIG_BLK_DEV_IDEPCI is not set
  4935. +# CONFIG_IDE_CHIPSETS is not set
  4936. +# CONFIG_IDEDMA_AUTO is not set
  4937. +# CONFIG_DMA_NONPCI is not set
  4938. +# CONFIG_BLK_DEV_ATARAID is not set
  4939. +# CONFIG_BLK_DEV_ATARAID_PDC is not set
  4940. +# CONFIG_BLK_DEV_ATARAID_HPT is not set
  4941. +# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
  4942. +# CONFIG_BLK_DEV_ATARAID_SII is not set
  4943. +
  4944. +#
  4945. +# SCSI support
  4946. +#
  4947. +CONFIG_SCSI=y
  4948. +
  4949. +#
  4950. +# SCSI support type (disk, tape, CD-ROM)
  4951. +#
  4952. +CONFIG_BLK_DEV_SD=y
  4953. +CONFIG_SD_EXTRA_DEVS=40
  4954. +CONFIG_CHR_DEV_ST=y
  4955. +# CONFIG_CHR_DEV_OSST is not set
  4956. +CONFIG_BLK_DEV_SR=y
  4957. +# CONFIG_BLK_DEV_SR_VENDOR is not set
  4958. +CONFIG_SR_EXTRA_DEVS=2
  4959. +# CONFIG_CHR_DEV_SG is not set
  4960. +
  4961. +#
  4962. +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  4963. +#
  4964. +# CONFIG_SCSI_DEBUG_QUEUES is not set
  4965. +# CONFIG_SCSI_MULTI_LUN is not set
  4966. +CONFIG_SCSI_CONSTANTS=y
  4967. +# CONFIG_SCSI_LOGGING is not set
  4968. +
  4969. +#
  4970. +# SCSI low-level drivers
  4971. +#
  4972. +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
  4973. +# CONFIG_SCSI_7000FASST is not set
  4974. +# CONFIG_SCSI_ACARD is not set
  4975. +# CONFIG_SCSI_AHA152X is not set
  4976. +# CONFIG_SCSI_AHA1542 is not set
  4977. +# CONFIG_SCSI_AHA1740 is not set
  4978. +# CONFIG_SCSI_AACRAID is not set
  4979. +# CONFIG_SCSI_AIC7XXX is not set
  4980. +# CONFIG_SCSI_AIC79XX is not set
  4981. +# CONFIG_SCSI_AIC7XXX_OLD is not set
  4982. +# CONFIG_SCSI_DPT_I2O is not set
  4983. +# CONFIG_SCSI_ADVANSYS is not set
  4984. +# CONFIG_SCSI_IN2000 is not set
  4985. +# CONFIG_SCSI_AM53C974 is not set
  4986. +# CONFIG_SCSI_MEGARAID is not set
  4987. +# CONFIG_SCSI_MEGARAID2 is not set
  4988. +# CONFIG_SCSI_SATA is not set
  4989. +# CONFIG_SCSI_SATA_AHCI is not set
  4990. +# CONFIG_SCSI_SATA_SVW is not set
  4991. +# CONFIG_SCSI_ATA_PIIX is not set
  4992. +# CONFIG_SCSI_SATA_NV is not set
  4993. +# CONFIG_SCSI_SATA_QSTOR is not set
  4994. +# CONFIG_SCSI_SATA_PROMISE is not set
  4995. +# CONFIG_SCSI_SATA_SX4 is not set
  4996. +# CONFIG_SCSI_SATA_SIL is not set
  4997. +# CONFIG_SCSI_SATA_SIS is not set
  4998. +# CONFIG_SCSI_SATA_ULI is not set
  4999. +# CONFIG_SCSI_SATA_VIA is not set
  5000. +# CONFIG_SCSI_SATA_VITESSE is not set
  5001. +# CONFIG_SCSI_BUSLOGIC is not set
  5002. +# CONFIG_SCSI_CPQFCTS is not set
  5003. +# CONFIG_SCSI_DMX3191D is not set
  5004. +# CONFIG_SCSI_DTC3280 is not set
  5005. +# CONFIG_SCSI_EATA is not set
  5006. +# CONFIG_SCSI_EATA_DMA is not set
  5007. +# CONFIG_SCSI_EATA_PIO is not set
  5008. +# CONFIG_SCSI_FUTURE_DOMAIN is not set
  5009. +# CONFIG_SCSI_GDTH is not set
  5010. +# CONFIG_SCSI_GENERIC_NCR5380 is not set
  5011. +# CONFIG_SCSI_INITIO is not set
  5012. +# CONFIG_SCSI_INIA100 is not set
  5013. +# CONFIG_SCSI_NCR53C406A is not set
  5014. +# CONFIG_SCSI_NCR53C7xx is not set
  5015. +# CONFIG_SCSI_SYM53C8XX_2 is not set
  5016. +# CONFIG_SCSI_NCR53C8XX is not set
  5017. +# CONFIG_SCSI_SYM53C8XX is not set
  5018. +# CONFIG_SCSI_PAS16 is not set
  5019. +# CONFIG_SCSI_PCI2000 is not set
  5020. +# CONFIG_SCSI_PCI2220I is not set
  5021. +# CONFIG_SCSI_PSI240I is not set
  5022. +# CONFIG_SCSI_QLOGIC_FAS is not set
  5023. +# CONFIG_SCSI_QLOGIC_ISP is not set
  5024. +# CONFIG_SCSI_QLOGIC_FC is not set
  5025. +# CONFIG_SCSI_QLOGIC_1280 is not set
  5026. +# CONFIG_SCSI_SIM710 is not set
  5027. +# CONFIG_SCSI_SYM53C416 is not set
  5028. +# CONFIG_SCSI_DC390T is not set
  5029. +# CONFIG_SCSI_T128 is not set
  5030. +# CONFIG_SCSI_U14_34F is not set
  5031. +# CONFIG_SCSI_NSP32 is not set
  5032. +# CONFIG_SCSI_DEBUG is not set
  5033. +
  5034. +#
  5035. +# PCMCIA SCSI adapter support
  5036. +#
  5037. +# CONFIG_SCSI_PCMCIA is not set
  5038. +
  5039. +#
  5040. +# Fusion MPT device support
  5041. +#
  5042. +# CONFIG_FUSION is not set
  5043. +# CONFIG_FUSION_BOOT is not set
  5044. +# CONFIG_FUSION_ISENSE is not set
  5045. +# CONFIG_FUSION_CTL is not set
  5046. +# CONFIG_FUSION_LAN is not set
  5047. +
  5048. +#
  5049. +# IEEE 1394 (FireWire) support (EXPERIMENTAL)
  5050. +#
  5051. +# CONFIG_IEEE1394 is not set
  5052. +
  5053. +#
  5054. +# I2O device support
  5055. +#
  5056. +# CONFIG_I2O is not set
  5057. +# CONFIG_I2O_PCI is not set
  5058. +# CONFIG_I2O_BLOCK is not set
  5059. +# CONFIG_I2O_LAN is not set
  5060. +# CONFIG_I2O_SCSI is not set
  5061. +# CONFIG_I2O_PROC is not set
  5062. +
  5063. +#
  5064. +# Network device support
  5065. +#
  5066. +CONFIG_NETDEVICES=y
  5067. +
  5068. +#
  5069. +# ARCnet devices
  5070. +#
  5071. +# CONFIG_ARCNET is not set
  5072. +# CONFIG_DUMMY is not set
  5073. +# CONFIG_BONDING is not set
  5074. +# CONFIG_EQUALIZER is not set
  5075. +# CONFIG_TUN is not set
  5076. +# CONFIG_ETHERTAP is not set
  5077. +
  5078. +#
  5079. +# Ethernet (10 or 100Mbit)
  5080. +#
  5081. +CONFIG_NET_ETHERNET=y
  5082. +# CONFIG_SUNLANCE is not set
  5083. +# CONFIG_HAPPYMEAL is not set
  5084. +# CONFIG_SUNBMAC is not set
  5085. +# CONFIG_SUNQE is not set
  5086. +# CONFIG_SUNGEM is not set
  5087. +# CONFIG_NET_VENDOR_3COM is not set
  5088. +# CONFIG_LANCE is not set
  5089. +# CONFIG_NET_VENDOR_SMC is not set
  5090. +# CONFIG_NET_VENDOR_RACAL is not set
  5091. +# CONFIG_HP100 is not set
  5092. +# CONFIG_NET_ISA is not set
  5093. +# CONFIG_NET_PCI is not set
  5094. +# CONFIG_NET_POCKET is not set
  5095. +
  5096. +#
  5097. +# Ethernet (1000 Mbit)
  5098. +#
  5099. +# CONFIG_ACENIC is not set
  5100. +# CONFIG_DL2K is not set
  5101. +# CONFIG_E1000 is not set
  5102. +# CONFIG_MYRI_SBUS is not set
  5103. +# CONFIG_NS83820 is not set
  5104. +# CONFIG_HAMACHI is not set
  5105. +# CONFIG_YELLOWFIN is not set
  5106. +# CONFIG_R8169 is not set
  5107. +# CONFIG_SK98LIN is not set
  5108. +# CONFIG_TIGON3 is not set
  5109. +# CONFIG_FDDI is not set
  5110. +# CONFIG_HIPPI is not set
  5111. +# CONFIG_PLIP is not set
  5112. +# CONFIG_PPP is not set
  5113. +# CONFIG_SLIP is not set
  5114. +
  5115. +#
  5116. +# Wireless LAN (non-hamradio)
  5117. +#
  5118. +# CONFIG_NET_RADIO is not set
  5119. +
  5120. +#
  5121. +# Token Ring devices
  5122. +#
  5123. +# CONFIG_TR is not set
  5124. +# CONFIG_NET_FC is not set
  5125. +# CONFIG_RCPCI is not set
  5126. +# CONFIG_SHAPER is not set
  5127. +
  5128. +#
  5129. +# Wan interfaces
  5130. +#
  5131. +# CONFIG_WAN is not set
  5132. +
  5133. +#
  5134. +# PCMCIA network device support
  5135. +#
  5136. +# CONFIG_NET_PCMCIA is not set
  5137. +
  5138. +#
  5139. +# Amateur Radio support
  5140. +#
  5141. +# CONFIG_HAMRADIO is not set
  5142. +
  5143. +#
  5144. +# IrDA (infrared) support
  5145. +#
  5146. +# CONFIG_IRDA is not set
  5147. +
  5148. +#
  5149. +# ISDN subsystem
  5150. +#
  5151. +# CONFIG_ISDN is not set
  5152. +
  5153. +#
  5154. +# Input core support
  5155. +#
  5156. +CONFIG_INPUT=y
  5157. +CONFIG_INPUT_KEYBDEV=y
  5158. +CONFIG_INPUT_MOUSEDEV=y
  5159. +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
  5160. +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
  5161. +# CONFIG_INPUT_JOYDEV is not set
  5162. +CONFIG_INPUT_EVDEV=y
  5163. +# CONFIG_INPUT_UINPUT is not set
  5164. +
  5165. +#
  5166. +# Character devices
  5167. +#
  5168. +CONFIG_VT=y
  5169. +# CONFIG_VT_CONSOLE is not set
  5170. +# CONFIG_SERIAL is not set
  5171. +# CONFIG_SERIAL_EXTENDED is not set
  5172. +CONFIG_SERIAL_NONSTANDARD=y
  5173. +# CONFIG_COMPUTONE is not set
  5174. +# CONFIG_ROCKETPORT is not set
  5175. +# CONFIG_CYCLADES is not set
  5176. +# CONFIG_DIGIEPCA is not set
  5177. +# CONFIG_DIGI is not set
  5178. +# CONFIG_ESPSERIAL is not set
  5179. +# CONFIG_MOXA_INTELLIO is not set
  5180. +# CONFIG_MOXA_SMARTIO is not set
  5181. +# CONFIG_ISI is not set
  5182. +# CONFIG_SYNCLINK is not set
  5183. +# CONFIG_SYNCLINKMP is not set
  5184. +# CONFIG_N_HDLC is not set
  5185. +# CONFIG_RISCOM8 is not set
  5186. +# CONFIG_SPECIALIX is not set
  5187. +# CONFIG_SX is not set
  5188. +# CONFIG_RIO is not set
  5189. +# CONFIG_STALDRV is not set
  5190. +# CONFIG_SERIAL_TX3912 is not set
  5191. +# CONFIG_SERIAL_TX3912_CONSOLE is not set
  5192. +# CONFIG_SERIAL_TXX9 is not set
  5193. +# CONFIG_SERIAL_TXX9_CONSOLE is not set
  5194. +# CONFIG_TXX927_SERIAL is not set
  5195. +CONFIG_UNIX98_PTYS=y
  5196. +CONFIG_UNIX98_PTY_COUNT=256
  5197. +
  5198. +#
  5199. +# I2C support
  5200. +#
  5201. +# CONFIG_I2C is not set
  5202. +
  5203. +#
  5204. +# Mice
  5205. +#
  5206. +# CONFIG_BUSMOUSE is not set
  5207. +# CONFIG_MOUSE is not set
  5208. +
  5209. +#
  5210. +# Joysticks
  5211. +#
  5212. +# CONFIG_INPUT_GAMEPORT is not set
  5213. +# CONFIG_INPUT_NS558 is not set
  5214. +# CONFIG_INPUT_LIGHTNING is not set
  5215. +# CONFIG_INPUT_PCIGAME is not set
  5216. +# CONFIG_INPUT_CS461X is not set
  5217. +# CONFIG_INPUT_EMU10K1 is not set
  5218. +# CONFIG_INPUT_SERIO is not set
  5219. +# CONFIG_INPUT_SERPORT is not set
  5220. +
  5221. +#
  5222. +# Joysticks
  5223. +#
  5224. +# CONFIG_INPUT_ANALOG is not set
  5225. +# CONFIG_INPUT_A3D is not set
  5226. +# CONFIG_INPUT_ADI is not set
  5227. +# CONFIG_INPUT_COBRA is not set
  5228. +# CONFIG_INPUT_GF2K is not set
  5229. +# CONFIG_INPUT_GRIP is not set
  5230. +# CONFIG_INPUT_INTERACT is not set
  5231. +# CONFIG_INPUT_TMDC is not set
  5232. +# CONFIG_INPUT_SIDEWINDER is not set
  5233. +# CONFIG_INPUT_IFORCE_USB is not set
  5234. +# CONFIG_INPUT_IFORCE_232 is not set
  5235. +# CONFIG_INPUT_WARRIOR is not set
  5236. +# CONFIG_INPUT_MAGELLAN is not set
  5237. +# CONFIG_INPUT_SPACEORB is not set
  5238. +# CONFIG_INPUT_SPACEBALL is not set
  5239. +# CONFIG_INPUT_STINGER is not set
  5240. +# CONFIG_INPUT_DB9 is not set
  5241. +# CONFIG_INPUT_GAMECON is not set
  5242. +# CONFIG_INPUT_TURBOGRAFX is not set
  5243. +# CONFIG_QIC02_TAPE is not set
  5244. +# CONFIG_IPMI_HANDLER is not set
  5245. +# CONFIG_IPMI_PANIC_EVENT is not set
  5246. +# CONFIG_IPMI_DEVICE_INTERFACE is not set
  5247. +# CONFIG_IPMI_KCS is not set
  5248. +# CONFIG_IPMI_WATCHDOG is not set
  5249. +
  5250. +#
  5251. +# Watchdog Cards
  5252. +#
  5253. +# CONFIG_WATCHDOG is not set
  5254. +# CONFIG_SCx200 is not set
  5255. +# CONFIG_SCx200_GPIO is not set
  5256. +# CONFIG_AMD_PM768 is not set
  5257. +# CONFIG_NVRAM is not set
  5258. +# CONFIG_RTC is not set
  5259. +# CONFIG_DTLK is not set
  5260. +# CONFIG_R3964 is not set
  5261. +# CONFIG_APPLICOM is not set
  5262. +
  5263. +#
  5264. +# Ftape, the floppy tape device driver
  5265. +#
  5266. +# CONFIG_FTAPE is not set
  5267. +# CONFIG_AGP is not set
  5268. +
  5269. +#
  5270. +# Direct Rendering Manager (XFree86 DRI support)
  5271. +#
  5272. +# CONFIG_DRM is not set
  5273. +
  5274. +#
  5275. +# PCMCIA character devices
  5276. +#
  5277. +# CONFIG_PCMCIA_SERIAL_CS is not set
  5278. +# CONFIG_SYNCLINK_CS is not set
  5279. +
  5280. +#
  5281. +# File systems
  5282. +#
  5283. +# CONFIG_QUOTA is not set
  5284. +# CONFIG_QFMT_V2 is not set
  5285. +CONFIG_AUTOFS_FS=y
  5286. +# CONFIG_AUTOFS4_FS is not set
  5287. +# CONFIG_REISERFS_FS is not set
  5288. +# CONFIG_REISERFS_CHECK is not set
  5289. +# CONFIG_REISERFS_PROC_INFO is not set
  5290. +# CONFIG_ADFS_FS is not set
  5291. +# CONFIG_ADFS_FS_RW is not set
  5292. +# CONFIG_AFFS_FS is not set
  5293. +# CONFIG_HFS_FS is not set
  5294. +# CONFIG_HFSPLUS_FS is not set
  5295. +# CONFIG_BEFS_FS is not set
  5296. +# CONFIG_BEFS_DEBUG is not set
  5297. +# CONFIG_BFS_FS is not set
  5298. +CONFIG_EXT3_FS=y
  5299. +CONFIG_JBD=y
  5300. +# CONFIG_JBD_DEBUG is not set
  5301. +CONFIG_FAT_FS=y
  5302. +CONFIG_MSDOS_FS=y
  5303. +# CONFIG_UMSDOS_FS is not set
  5304. +CONFIG_VFAT_FS=y
  5305. +# CONFIG_EFS_FS is not set
  5306. +# CONFIG_JFFS_FS is not set
  5307. +# CONFIG_JFFS2_FS is not set
  5308. +# CONFIG_CRAMFS is not set
  5309. +CONFIG_TMPFS=y
  5310. +CONFIG_RAMFS=y
  5311. +# CONFIG_ISO9660_FS is not set
  5312. +# CONFIG_JOLIET is not set
  5313. +# CONFIG_ZISOFS is not set
  5314. +# CONFIG_JFS_FS is not set
  5315. +# CONFIG_JFS_DEBUG is not set
  5316. +# CONFIG_JFS_STATISTICS is not set
  5317. +# CONFIG_MINIX_FS is not set
  5318. +# CONFIG_VXFS_FS is not set
  5319. +# CONFIG_NTFS_FS is not set
  5320. +# CONFIG_NTFS_RW is not set
  5321. +# CONFIG_HPFS_FS is not set
  5322. +CONFIG_PROC_FS=y
  5323. +# CONFIG_DEVFS_FS is not set
  5324. +# CONFIG_DEVFS_MOUNT is not set
  5325. +# CONFIG_DEVFS_DEBUG is not set
  5326. +CONFIG_DEVPTS_FS=y
  5327. +# CONFIG_QNX4FS_FS is not set
  5328. +# CONFIG_QNX4FS_RW is not set
  5329. +# CONFIG_ROMFS_FS is not set
  5330. +CONFIG_EXT2_FS=y
  5331. +# CONFIG_SYSV_FS is not set
  5332. +# CONFIG_UDF_FS is not set
  5333. +# CONFIG_UDF_RW is not set
  5334. +# CONFIG_UFS_FS is not set
  5335. +# CONFIG_UFS_FS_WRITE is not set
  5336. +# CONFIG_XFS_FS is not set
  5337. +# CONFIG_XFS_QUOTA is not set
  5338. +# CONFIG_XFS_RT is not set
  5339. +# CONFIG_XFS_TRACE is not set
  5340. +# CONFIG_XFS_DEBUG is not set
  5341. +
  5342. +#
  5343. +# Network File Systems
  5344. +#
  5345. +# CONFIG_CODA_FS is not set
  5346. +# CONFIG_INTERMEZZO_FS is not set
  5347. +CONFIG_NFS_FS=y
  5348. +CONFIG_NFS_V3=y
  5349. +# CONFIG_NFS_DIRECTIO is not set
  5350. +CONFIG_ROOT_NFS=y
  5351. +# CONFIG_NFSD is not set
  5352. +# CONFIG_NFSD_V3 is not set
  5353. +# CONFIG_NFSD_TCP is not set
  5354. +CONFIG_SUNRPC=y
  5355. +CONFIG_LOCKD=y
  5356. +CONFIG_LOCKD_V4=y
  5357. +# CONFIG_SMB_FS is not set
  5358. +# CONFIG_NCP_FS is not set
  5359. +# CONFIG_NCPFS_PACKET_SIGNING is not set
  5360. +# CONFIG_NCPFS_IOCTL_LOCKING is not set
  5361. +# CONFIG_NCPFS_STRONG is not set
  5362. +# CONFIG_NCPFS_NFS_NS is not set
  5363. +# CONFIG_NCPFS_OS2_NS is not set
  5364. +# CONFIG_NCPFS_SMALLDOS is not set
  5365. +# CONFIG_NCPFS_NLS is not set
  5366. +# CONFIG_NCPFS_EXTRAS is not set
  5367. +# CONFIG_ZISOFS_FS is not set
  5368. +
  5369. +#
  5370. +# Partition Types
  5371. +#
  5372. +# CONFIG_PARTITION_ADVANCED is not set
  5373. +CONFIG_MSDOS_PARTITION=y
  5374. +# CONFIG_SMB_NLS is not set
  5375. +CONFIG_NLS=y
  5376. +
  5377. +#
  5378. +# Native Language Support
  5379. +#
  5380. +CONFIG_NLS_DEFAULT="iso8859-1"
  5381. +# CONFIG_NLS_CODEPAGE_437 is not set
  5382. +# CONFIG_NLS_CODEPAGE_737 is not set
  5383. +# CONFIG_NLS_CODEPAGE_775 is not set
  5384. +# CONFIG_NLS_CODEPAGE_850 is not set
  5385. +# CONFIG_NLS_CODEPAGE_852 is not set
  5386. +# CONFIG_NLS_CODEPAGE_855 is not set
  5387. +# CONFIG_NLS_CODEPAGE_857 is not set
  5388. +# CONFIG_NLS_CODEPAGE_860 is not set
  5389. +# CONFIG_NLS_CODEPAGE_861 is not set
  5390. +# CONFIG_NLS_CODEPAGE_862 is not set
  5391. +# CONFIG_NLS_CODEPAGE_863 is not set
  5392. +# CONFIG_NLS_CODEPAGE_864 is not set
  5393. +# CONFIG_NLS_CODEPAGE_865 is not set
  5394. +# CONFIG_NLS_CODEPAGE_866 is not set
  5395. +# CONFIG_NLS_CODEPAGE_869 is not set
  5396. +# CONFIG_NLS_CODEPAGE_936 is not set
  5397. +# CONFIG_NLS_CODEPAGE_950 is not set
  5398. +# CONFIG_NLS_CODEPAGE_932 is not set
  5399. +# CONFIG_NLS_CODEPAGE_949 is not set
  5400. +# CONFIG_NLS_CODEPAGE_874 is not set
  5401. +# CONFIG_NLS_ISO8859_8 is not set
  5402. +# CONFIG_NLS_CODEPAGE_1250 is not set
  5403. +# CONFIG_NLS_CODEPAGE_1251 is not set
  5404. +# CONFIG_NLS_ISO8859_1 is not set
  5405. +# CONFIG_NLS_ISO8859_2 is not set
  5406. +# CONFIG_NLS_ISO8859_3 is not set
  5407. +# CONFIG_NLS_ISO8859_4 is not set
  5408. +# CONFIG_NLS_ISO8859_5 is not set
  5409. +# CONFIG_NLS_ISO8859_6 is not set
  5410. +# CONFIG_NLS_ISO8859_7 is not set
  5411. +# CONFIG_NLS_ISO8859_9 is not set
  5412. +# CONFIG_NLS_ISO8859_13 is not set
  5413. +# CONFIG_NLS_ISO8859_14 is not set
  5414. +# CONFIG_NLS_ISO8859_15 is not set
  5415. +# CONFIG_NLS_KOI8_R is not set
  5416. +# CONFIG_NLS_KOI8_U is not set
  5417. +# CONFIG_NLS_UTF8 is not set
  5418. +
  5419. +#
  5420. +# Multimedia devices
  5421. +#
  5422. +# CONFIG_VIDEO_DEV is not set
  5423. +
  5424. +#
  5425. +# Console drivers
  5426. +#
  5427. +# CONFIG_VGA_CONSOLE is not set
  5428. +# CONFIG_MDA_CONSOLE is not set
  5429. +
  5430. +#
  5431. +# Frame-buffer support
  5432. +#
  5433. +CONFIG_FB=y
  5434. +CONFIG_DUMMY_CONSOLE=y
  5435. +# CONFIG_FB_RIVA is not set
  5436. +# CONFIG_FB_CLGEN is not set
  5437. +# CONFIG_FB_PM2 is not set
  5438. +# CONFIG_FB_PM3 is not set
  5439. +# CONFIG_FB_CYBER2000 is not set
  5440. +# CONFIG_FB_MATROX is not set
  5441. +# CONFIG_FB_ATY is not set
  5442. +# CONFIG_FB_RADEON is not set
  5443. +# CONFIG_FB_ATY128 is not set
  5444. +# CONFIG_FB_INTEL is not set
  5445. +# CONFIG_FB_SIS is not set
  5446. +# CONFIG_FB_NEOMAGIC is not set
  5447. +# CONFIG_FB_3DFX is not set
  5448. +# CONFIG_FB_VOODOO1 is not set
  5449. +# CONFIG_FB_TRIDENT is not set
  5450. +# CONFIG_FB_E1356 is not set
  5451. +# CONFIG_FB_IT8181 is not set
  5452. +# CONFIG_FB_VIRTUAL is not set
  5453. +CONFIG_FBCON_ADVANCED=y
  5454. +# CONFIG_FBCON_MFB is not set
  5455. +# CONFIG_FBCON_CFB2 is not set
  5456. +# CONFIG_FBCON_CFB4 is not set
  5457. +# CONFIG_FBCON_CFB8 is not set
  5458. +CONFIG_FBCON_CFB16=y
  5459. +# CONFIG_FBCON_CFB24 is not set
  5460. +CONFIG_FBCON_CFB32=y
  5461. +# CONFIG_FBCON_AFB is not set
  5462. +# CONFIG_FBCON_ILBM is not set
  5463. +# CONFIG_FBCON_IPLAN2P2 is not set
  5464. +# CONFIG_FBCON_IPLAN2P4 is not set
  5465. +# CONFIG_FBCON_IPLAN2P8 is not set
  5466. +# CONFIG_FBCON_MAC is not set
  5467. +# CONFIG_FBCON_VGA_PLANES is not set
  5468. +# CONFIG_FBCON_VGA is not set
  5469. +# CONFIG_FBCON_HGA is not set
  5470. +# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
  5471. +CONFIG_FBCON_FONTS=y
  5472. +CONFIG_FONT_8x8=y
  5473. +CONFIG_FONT_8x16=y
  5474. +# CONFIG_FONT_SUN8x16 is not set
  5475. +# CONFIG_FONT_SUN12x22 is not set
  5476. +# CONFIG_FONT_6x11 is not set
  5477. +# CONFIG_FONT_PEARL_8x8 is not set
  5478. +# CONFIG_FONT_ACORN_8x8 is not set
  5479. +
  5480. +#
  5481. +# Sound
  5482. +#
  5483. +CONFIG_SOUND=y
  5484. +# CONFIG_SOUND_ALI5455 is not set
  5485. +# CONFIG_SOUND_BT878 is not set
  5486. +# CONFIG_SOUND_CMPCI is not set
  5487. +# CONFIG_SOUND_EMU10K1 is not set
  5488. +# CONFIG_MIDI_EMU10K1 is not set
  5489. +# CONFIG_SOUND_FUSION is not set
  5490. +# CONFIG_SOUND_CS4281 is not set
  5491. +# CONFIG_SOUND_ES1370 is not set
  5492. +# CONFIG_SOUND_ES1371 is not set
  5493. +# CONFIG_SOUND_ESSSOLO1 is not set
  5494. +# CONFIG_SOUND_MAESTRO is not set
  5495. +# CONFIG_SOUND_MAESTRO3 is not set
  5496. +# CONFIG_SOUND_FORTE is not set
  5497. +# CONFIG_SOUND_ICH is not set
  5498. +# CONFIG_SOUND_RME96XX is not set
  5499. +# CONFIG_SOUND_SONICVIBES is not set
  5500. +# CONFIG_SOUND_TRIDENT is not set
  5501. +# CONFIG_SOUND_MSNDCLAS is not set
  5502. +# CONFIG_SOUND_MSNDPIN is not set
  5503. +# CONFIG_SOUND_VIA82CXXX is not set
  5504. +# CONFIG_MIDI_VIA82CXXX is not set
  5505. +# CONFIG_SOUND_OSS is not set
  5506. +# CONFIG_SOUND_TVMIXER is not set
  5507. +# CONFIG_SOUND_AD1980 is not set
  5508. +# CONFIG_SOUND_WM97XX is not set
  5509. +
  5510. +#
  5511. +# USB support
  5512. +#
  5513. +CONFIG_USB=y
  5514. +# CONFIG_USB_DEBUG is not set
  5515. +
  5516. +#
  5517. +# Miscellaneous USB options
  5518. +#
  5519. +CONFIG_USB_DEVICEFS=y
  5520. +# CONFIG_USB_BANDWIDTH is not set
  5521. +
  5522. +#
  5523. +# USB Host Controller Drivers
  5524. +#
  5525. +# CONFIG_USB_EHCI_HCD is not set
  5526. +# CONFIG_USB_UHCI is not set
  5527. +# CONFIG_USB_UHCI_ALT is not set
  5528. +CONFIG_USB_OHCI=y
  5529. +
  5530. +#
  5531. +# USB Device Class drivers
  5532. +#
  5533. +# CONFIG_USB_AUDIO is not set
  5534. +# CONFIG_USB_EMI26 is not set
  5535. +# CONFIG_USB_BLUETOOTH is not set
  5536. +# CONFIG_USB_MIDI is not set
  5537. +CONFIG_USB_STORAGE=y
  5538. +# CONFIG_USB_STORAGE_DEBUG is not set
  5539. +# CONFIG_USB_STORAGE_DATAFAB is not set
  5540. +# CONFIG_USB_STORAGE_FREECOM is not set
  5541. +# CONFIG_USB_STORAGE_ISD200 is not set
  5542. +# CONFIG_USB_STORAGE_DPCM is not set
  5543. +# CONFIG_USB_STORAGE_HP8200e is not set
  5544. +# CONFIG_USB_STORAGE_SDDR09 is not set
  5545. +# CONFIG_USB_STORAGE_SDDR55 is not set
  5546. +# CONFIG_USB_STORAGE_JUMPSHOT is not set
  5547. +# CONFIG_USB_ACM is not set
  5548. +# CONFIG_USB_PRINTER is not set
  5549. +
  5550. +#
  5551. +# USB Human Interface Devices (HID)
  5552. +#
  5553. +CONFIG_USB_HID=y
  5554. +CONFIG_USB_HIDINPUT=y
  5555. +CONFIG_USB_HIDDEV=y
  5556. +# CONFIG_USB_AIPTEK is not set
  5557. +# CONFIG_USB_WACOM is not set
  5558. +# CONFIG_USB_KBTAB is not set
  5559. +# CONFIG_USB_POWERMATE is not set
  5560. +
  5561. +#
  5562. +# USB Imaging devices
  5563. +#
  5564. +# CONFIG_USB_DC2XX is not set
  5565. +# CONFIG_USB_MDC800 is not set
  5566. +# CONFIG_USB_SCANNER is not set
  5567. +# CONFIG_USB_MICROTEK is not set
  5568. +# CONFIG_USB_HPUSBSCSI is not set
  5569. +
  5570. +#
  5571. +# USB Multimedia devices
  5572. +#
  5573. +
  5574. +#
  5575. +# Video4Linux support is needed for USB Multimedia device support
  5576. +#
  5577. +
  5578. +#
  5579. +# USB Network adaptors
  5580. +#
  5581. +# CONFIG_USB_PEGASUS is not set
  5582. +# CONFIG_USB_RTL8150 is not set
  5583. +# CONFIG_USB_KAWETH is not set
  5584. +# CONFIG_USB_CATC is not set
  5585. +# CONFIG_USB_CDCETHER is not set
  5586. +# CONFIG_USB_USBNET is not set
  5587. +
  5588. +#
  5589. +# USB port drivers
  5590. +#
  5591. +# CONFIG_USB_USS720 is not set
  5592. +
  5593. +#
  5594. +# USB Serial Converter support
  5595. +#
  5596. +# CONFIG_USB_SERIAL is not set
  5597. +
  5598. +#
  5599. +# USB Miscellaneous drivers
  5600. +#
  5601. +# CONFIG_USB_RIO500 is not set
  5602. +# CONFIG_USB_AUERSWALD is not set
  5603. +# CONFIG_USB_TIGL is not set
  5604. +# CONFIG_USB_BRLVGER is not set
  5605. +# CONFIG_USB_LCD is not set
  5606. +
  5607. +#
  5608. +# Support for USB gadgets
  5609. +#
  5610. +# CONFIG_USB_GADGET is not set
  5611. +
  5612. +#
  5613. +# Bluetooth support
  5614. +#
  5615. +# CONFIG_BLUEZ is not set
  5616. +
  5617. +#
  5618. +# Kernel hacking
  5619. +#
  5620. +CONFIG_CROSSCOMPILE=y
  5621. +# CONFIG_RUNTIME_DEBUG is not set
  5622. +# CONFIG_KGDB is not set
  5623. +# CONFIG_GDB_CONSOLE is not set
  5624. +# CONFIG_DEBUG_INFO is not set
  5625. +# CONFIG_MAGIC_SYSRQ is not set
  5626. +# CONFIG_MIPS_UNCACHED is not set
  5627. +CONFIG_LOG_BUF_SHIFT=0
  5628. +
  5629. +#
  5630. +# Cryptographic options
  5631. +#
  5632. +# CONFIG_CRYPTO is not set
  5633. +
  5634. +#
  5635. +# Library routines
  5636. +#
  5637. +# CONFIG_CRC32 is not set
  5638. +CONFIG_ZLIB_INFLATE=m
  5639. +CONFIG_ZLIB_DEFLATE=m
  5640. +# CONFIG_FW_LOADER is not set
  5641. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-db1500 linux-2.4.32-rc1.mips/arch/mips/defconfig-db1500
  5642. --- linux-2.4.32-rc1/arch/mips/defconfig-db1500 2005-01-19 15:09:28.000000000 +0100
  5643. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-db1500 2005-03-18 13:13:21.000000000 +0100
  5644. @@ -30,8 +30,8 @@
  5645. # CONFIG_MIPS_PB1000 is not set
  5646. # CONFIG_MIPS_PB1100 is not set
  5647. # CONFIG_MIPS_PB1500 is not set
  5648. -# CONFIG_MIPS_HYDROGEN3 is not set
  5649. # CONFIG_MIPS_PB1550 is not set
  5650. +# CONFIG_MIPS_HYDROGEN3 is not set
  5651. # CONFIG_MIPS_XXS1500 is not set
  5652. # CONFIG_MIPS_MTX1 is not set
  5653. # CONFIG_COGENT_CSB250 is not set
  5654. @@ -267,11 +267,6 @@
  5655. #
  5656. # CONFIG_IPX is not set
  5657. # CONFIG_ATALK is not set
  5658. -
  5659. -#
  5660. -# Appletalk devices
  5661. -#
  5662. -# CONFIG_DEV_APPLETALK is not set
  5663. # CONFIG_DECNET is not set
  5664. # CONFIG_BRIDGE is not set
  5665. # CONFIG_X25 is not set
  5666. @@ -555,7 +550,6 @@
  5667. # CONFIG_AU1X00_USB_TTY is not set
  5668. # CONFIG_AU1X00_USB_RAW is not set
  5669. # CONFIG_TXX927_SERIAL is not set
  5670. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  5671. CONFIG_UNIX98_PTYS=y
  5672. CONFIG_UNIX98_PTY_COUNT=256
  5673. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-db1550 linux-2.4.32-rc1.mips/arch/mips/defconfig-db1550
  5674. --- linux-2.4.32-rc1/arch/mips/defconfig-db1550 2005-01-19 15:09:28.000000000 +0100
  5675. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-db1550 2005-03-18 13:13:21.000000000 +0100
  5676. @@ -30,8 +30,8 @@
  5677. # CONFIG_MIPS_PB1000 is not set
  5678. # CONFIG_MIPS_PB1100 is not set
  5679. # CONFIG_MIPS_PB1500 is not set
  5680. -# CONFIG_MIPS_HYDROGEN3 is not set
  5681. # CONFIG_MIPS_PB1550 is not set
  5682. +# CONFIG_MIPS_HYDROGEN3 is not set
  5683. # CONFIG_MIPS_XXS1500 is not set
  5684. # CONFIG_MIPS_MTX1 is not set
  5685. # CONFIG_COGENT_CSB250 is not set
  5686. @@ -213,11 +213,9 @@
  5687. # CONFIG_MTD_BOSPORUS is not set
  5688. # CONFIG_MTD_XXS1500 is not set
  5689. # CONFIG_MTD_MTX1 is not set
  5690. -# CONFIG_MTD_DB1X00 is not set
  5691. CONFIG_MTD_PB1550=y
  5692. CONFIG_MTD_PB1550_BOOT=y
  5693. CONFIG_MTD_PB1550_USER=y
  5694. -# CONFIG_MTD_HYDROGEN3 is not set
  5695. # CONFIG_MTD_MIRAGE is not set
  5696. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  5697. # CONFIG_MTD_OCELOT is not set
  5698. @@ -236,7 +234,6 @@
  5699. #
  5700. # Disk-On-Chip Device Drivers
  5701. #
  5702. -# CONFIG_MTD_DOC1000 is not set
  5703. # CONFIG_MTD_DOC2000 is not set
  5704. # CONFIG_MTD_DOC2001 is not set
  5705. # CONFIG_MTD_DOCPROBE is not set
  5706. @@ -343,11 +340,6 @@
  5707. #
  5708. # CONFIG_IPX is not set
  5709. # CONFIG_ATALK is not set
  5710. -
  5711. -#
  5712. -# Appletalk devices
  5713. -#
  5714. -# CONFIG_DEV_APPLETALK is not set
  5715. # CONFIG_DECNET is not set
  5716. # CONFIG_BRIDGE is not set
  5717. # CONFIG_X25 is not set
  5718. @@ -633,7 +625,6 @@
  5719. # CONFIG_AU1X00_USB_TTY is not set
  5720. # CONFIG_AU1X00_USB_RAW is not set
  5721. # CONFIG_TXX927_SERIAL is not set
  5722. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  5723. CONFIG_UNIX98_PTYS=y
  5724. CONFIG_UNIX98_PTY_COUNT=256
  5725. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-ddb5476 linux-2.4.32-rc1.mips/arch/mips/defconfig-ddb5476
  5726. --- linux-2.4.32-rc1/arch/mips/defconfig-ddb5476 2005-01-19 15:09:28.000000000 +0100
  5727. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-ddb5476 2005-03-18 13:13:21.000000000 +0100
  5728. @@ -28,8 +28,8 @@
  5729. # CONFIG_MIPS_PB1000 is not set
  5730. # CONFIG_MIPS_PB1100 is not set
  5731. # CONFIG_MIPS_PB1500 is not set
  5732. -# CONFIG_MIPS_HYDROGEN3 is not set
  5733. # CONFIG_MIPS_PB1550 is not set
  5734. +# CONFIG_MIPS_HYDROGEN3 is not set
  5735. # CONFIG_MIPS_XXS1500 is not set
  5736. # CONFIG_MIPS_MTX1 is not set
  5737. # CONFIG_COGENT_CSB250 is not set
  5738. @@ -226,11 +226,6 @@
  5739. #
  5740. # CONFIG_IPX is not set
  5741. # CONFIG_ATALK is not set
  5742. -
  5743. -#
  5744. -# Appletalk devices
  5745. -#
  5746. -# CONFIG_DEV_APPLETALK is not set
  5747. # CONFIG_DECNET is not set
  5748. # CONFIG_BRIDGE is not set
  5749. # CONFIG_X25 is not set
  5750. @@ -517,7 +512,6 @@
  5751. CONFIG_SERIAL_CONSOLE=y
  5752. # CONFIG_SERIAL_EXTENDED is not set
  5753. # CONFIG_SERIAL_NONSTANDARD is not set
  5754. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  5755. CONFIG_UNIX98_PTYS=y
  5756. CONFIG_UNIX98_PTY_COUNT=256
  5757. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-ddb5477 linux-2.4.32-rc1.mips/arch/mips/defconfig-ddb5477
  5758. --- linux-2.4.32-rc1/arch/mips/defconfig-ddb5477 2005-01-19 15:09:28.000000000 +0100
  5759. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-ddb5477 2005-03-18 13:13:21.000000000 +0100
  5760. @@ -28,8 +28,8 @@
  5761. # CONFIG_MIPS_PB1000 is not set
  5762. # CONFIG_MIPS_PB1100 is not set
  5763. # CONFIG_MIPS_PB1500 is not set
  5764. -# CONFIG_MIPS_HYDROGEN3 is not set
  5765. # CONFIG_MIPS_PB1550 is not set
  5766. +# CONFIG_MIPS_HYDROGEN3 is not set
  5767. # CONFIG_MIPS_XXS1500 is not set
  5768. # CONFIG_MIPS_MTX1 is not set
  5769. # CONFIG_COGENT_CSB250 is not set
  5770. @@ -226,11 +226,6 @@
  5771. #
  5772. # CONFIG_IPX is not set
  5773. # CONFIG_ATALK is not set
  5774. -
  5775. -#
  5776. -# Appletalk devices
  5777. -#
  5778. -# CONFIG_DEV_APPLETALK is not set
  5779. # CONFIG_DECNET is not set
  5780. # CONFIG_BRIDGE is not set
  5781. # CONFIG_X25 is not set
  5782. @@ -434,7 +429,6 @@
  5783. CONFIG_SERIAL_CONSOLE=y
  5784. # CONFIG_SERIAL_EXTENDED is not set
  5785. # CONFIG_SERIAL_NONSTANDARD is not set
  5786. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  5787. CONFIG_UNIX98_PTYS=y
  5788. CONFIG_UNIX98_PTY_COUNT=256
  5789. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-decstation linux-2.4.32-rc1.mips/arch/mips/defconfig-decstation
  5790. --- linux-2.4.32-rc1/arch/mips/defconfig-decstation 2005-01-19 15:09:28.000000000 +0100
  5791. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-decstation 2005-03-18 13:13:21.000000000 +0100
  5792. @@ -30,8 +30,8 @@
  5793. # CONFIG_MIPS_PB1000 is not set
  5794. # CONFIG_MIPS_PB1100 is not set
  5795. # CONFIG_MIPS_PB1500 is not set
  5796. -# CONFIG_MIPS_HYDROGEN3 is not set
  5797. # CONFIG_MIPS_PB1550 is not set
  5798. +# CONFIG_MIPS_HYDROGEN3 is not set
  5799. # CONFIG_MIPS_XXS1500 is not set
  5800. # CONFIG_MIPS_MTX1 is not set
  5801. # CONFIG_COGENT_CSB250 is not set
  5802. @@ -223,11 +223,6 @@
  5803. #
  5804. # CONFIG_IPX is not set
  5805. # CONFIG_ATALK is not set
  5806. -
  5807. -#
  5808. -# Appletalk devices
  5809. -#
  5810. -# CONFIG_DEV_APPLETALK is not set
  5811. # CONFIG_DECNET is not set
  5812. # CONFIG_BRIDGE is not set
  5813. # CONFIG_X25 is not set
  5814. @@ -306,9 +301,11 @@
  5815. # CONFIG_SCSI_MEGARAID is not set
  5816. # CONFIG_SCSI_MEGARAID2 is not set
  5817. # CONFIG_SCSI_SATA is not set
  5818. +# CONFIG_SCSI_SATA_AHCI is not set
  5819. # CONFIG_SCSI_SATA_SVW is not set
  5820. # CONFIG_SCSI_ATA_PIIX is not set
  5821. # CONFIG_SCSI_SATA_NV is not set
  5822. +# CONFIG_SCSI_SATA_QSTOR is not set
  5823. # CONFIG_SCSI_SATA_PROMISE is not set
  5824. # CONFIG_SCSI_SATA_SX4 is not set
  5825. # CONFIG_SCSI_SATA_SIL is not set
  5826. @@ -477,7 +474,6 @@
  5827. CONFIG_SERIAL_DEC_CONSOLE=y
  5828. CONFIG_DZ=y
  5829. CONFIG_ZS=y
  5830. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  5831. CONFIG_UNIX98_PTYS=y
  5832. CONFIG_UNIX98_PTY_COUNT=256
  5833. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-e55 linux-2.4.32-rc1.mips/arch/mips/defconfig-e55
  5834. --- linux-2.4.32-rc1/arch/mips/defconfig-e55 2005-01-19 15:09:28.000000000 +0100
  5835. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-e55 2005-03-18 13:13:21.000000000 +0100
  5836. @@ -30,8 +30,8 @@
  5837. # CONFIG_MIPS_PB1000 is not set
  5838. # CONFIG_MIPS_PB1100 is not set
  5839. # CONFIG_MIPS_PB1500 is not set
  5840. -# CONFIG_MIPS_HYDROGEN3 is not set
  5841. # CONFIG_MIPS_PB1550 is not set
  5842. +# CONFIG_MIPS_HYDROGEN3 is not set
  5843. # CONFIG_MIPS_XXS1500 is not set
  5844. # CONFIG_MIPS_MTX1 is not set
  5845. # CONFIG_COGENT_CSB250 is not set
  5846. @@ -222,11 +222,6 @@
  5847. #
  5848. # CONFIG_IPX is not set
  5849. # CONFIG_ATALK is not set
  5850. -
  5851. -#
  5852. -# Appletalk devices
  5853. -#
  5854. -# CONFIG_DEV_APPLETALK is not set
  5855. # CONFIG_DECNET is not set
  5856. # CONFIG_BRIDGE is not set
  5857. # CONFIG_X25 is not set
  5858. @@ -426,7 +421,6 @@
  5859. # CONFIG_SERIAL_MULTIPORT is not set
  5860. # CONFIG_HUB6 is not set
  5861. # CONFIG_SERIAL_NONSTANDARD is not set
  5862. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  5863. # CONFIG_VR41XX_KIU is not set
  5864. CONFIG_UNIX98_PTYS=y
  5865. CONFIG_UNIX98_PTY_COUNT=256
  5866. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-eagle linux-2.4.32-rc1.mips/arch/mips/defconfig-eagle
  5867. --- linux-2.4.32-rc1/arch/mips/defconfig-eagle 2005-01-19 15:09:28.000000000 +0100
  5868. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-eagle 2005-03-18 13:13:21.000000000 +0100
  5869. @@ -30,8 +30,8 @@
  5870. # CONFIG_MIPS_PB1000 is not set
  5871. # CONFIG_MIPS_PB1100 is not set
  5872. # CONFIG_MIPS_PB1500 is not set
  5873. -# CONFIG_MIPS_HYDROGEN3 is not set
  5874. # CONFIG_MIPS_PB1550 is not set
  5875. +# CONFIG_MIPS_HYDROGEN3 is not set
  5876. # CONFIG_MIPS_XXS1500 is not set
  5877. # CONFIG_MIPS_MTX1 is not set
  5878. # CONFIG_COGENT_CSB250 is not set
  5879. @@ -208,8 +208,8 @@
  5880. # Mapping drivers for chip access
  5881. #
  5882. CONFIG_MTD_PHYSMAP=y
  5883. -CONFIG_MTD_PHYSMAP_START=1c000000
  5884. -CONFIG_MTD_PHYSMAP_LEN=2000000
  5885. +CONFIG_MTD_PHYSMAP_START=0x1c000000
  5886. +CONFIG_MTD_PHYSMAP_LEN=0x2000000
  5887. CONFIG_MTD_PHYSMAP_BUSWIDTH=4
  5888. # CONFIG_MTD_PB1000 is not set
  5889. # CONFIG_MTD_PB1500 is not set
  5890. @@ -217,9 +217,7 @@
  5891. # CONFIG_MTD_BOSPORUS is not set
  5892. # CONFIG_MTD_XXS1500 is not set
  5893. # CONFIG_MTD_MTX1 is not set
  5894. -# CONFIG_MTD_DB1X00 is not set
  5895. # CONFIG_MTD_PB1550 is not set
  5896. -# CONFIG_MTD_HYDROGEN3 is not set
  5897. # CONFIG_MTD_MIRAGE is not set
  5898. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  5899. # CONFIG_MTD_OCELOT is not set
  5900. @@ -238,7 +236,6 @@
  5901. #
  5902. # Disk-On-Chip Device Drivers
  5903. #
  5904. -# CONFIG_MTD_DOC1000 is not set
  5905. # CONFIG_MTD_DOC2000 is not set
  5906. # CONFIG_MTD_DOC2001 is not set
  5907. # CONFIG_MTD_DOCPROBE is not set
  5908. @@ -327,11 +324,6 @@
  5909. #
  5910. # CONFIG_IPX is not set
  5911. # CONFIG_ATALK is not set
  5912. -
  5913. -#
  5914. -# Appletalk devices
  5915. -#
  5916. -# CONFIG_DEV_APPLETALK is not set
  5917. # CONFIG_DECNET is not set
  5918. # CONFIG_BRIDGE is not set
  5919. # CONFIG_X25 is not set
  5920. @@ -587,7 +579,6 @@
  5921. CONFIG_SERIAL_CONSOLE=y
  5922. # CONFIG_SERIAL_EXTENDED is not set
  5923. # CONFIG_SERIAL_NONSTANDARD is not set
  5924. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  5925. # CONFIG_VR41XX_KIU is not set
  5926. CONFIG_UNIX98_PTYS=y
  5927. CONFIG_UNIX98_PTY_COUNT=256
  5928. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-ev64120 linux-2.4.32-rc1.mips/arch/mips/defconfig-ev64120
  5929. --- linux-2.4.32-rc1/arch/mips/defconfig-ev64120 2005-01-19 15:09:28.000000000 +0100
  5930. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-ev64120 2005-03-18 13:13:21.000000000 +0100
  5931. @@ -30,8 +30,8 @@
  5932. # CONFIG_MIPS_PB1000 is not set
  5933. # CONFIG_MIPS_PB1100 is not set
  5934. # CONFIG_MIPS_PB1500 is not set
  5935. -# CONFIG_MIPS_HYDROGEN3 is not set
  5936. # CONFIG_MIPS_PB1550 is not set
  5937. +# CONFIG_MIPS_HYDROGEN3 is not set
  5938. # CONFIG_MIPS_XXS1500 is not set
  5939. # CONFIG_MIPS_MTX1 is not set
  5940. # CONFIG_COGENT_CSB250 is not set
  5941. @@ -230,11 +230,6 @@
  5942. #
  5943. # CONFIG_IPX is not set
  5944. # CONFIG_ATALK is not set
  5945. -
  5946. -#
  5947. -# Appletalk devices
  5948. -#
  5949. -# CONFIG_DEV_APPLETALK is not set
  5950. # CONFIG_DECNET is not set
  5951. # CONFIG_BRIDGE is not set
  5952. # CONFIG_X25 is not set
  5953. @@ -443,7 +438,6 @@
  5954. # CONFIG_SERIAL_CONSOLE is not set
  5955. # CONFIG_SERIAL_EXTENDED is not set
  5956. # CONFIG_SERIAL_NONSTANDARD is not set
  5957. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  5958. CONFIG_UNIX98_PTYS=y
  5959. CONFIG_UNIX98_PTY_COUNT=256
  5960. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-ev96100 linux-2.4.32-rc1.mips/arch/mips/defconfig-ev96100
  5961. --- linux-2.4.32-rc1/arch/mips/defconfig-ev96100 2005-01-19 15:09:28.000000000 +0100
  5962. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-ev96100 2005-03-18 13:13:21.000000000 +0100
  5963. @@ -30,8 +30,8 @@
  5964. # CONFIG_MIPS_PB1000 is not set
  5965. # CONFIG_MIPS_PB1100 is not set
  5966. # CONFIG_MIPS_PB1500 is not set
  5967. -# CONFIG_MIPS_HYDROGEN3 is not set
  5968. # CONFIG_MIPS_PB1550 is not set
  5969. +# CONFIG_MIPS_HYDROGEN3 is not set
  5970. # CONFIG_MIPS_XXS1500 is not set
  5971. # CONFIG_MIPS_MTX1 is not set
  5972. # CONFIG_COGENT_CSB250 is not set
  5973. @@ -232,11 +232,6 @@
  5974. #
  5975. # CONFIG_IPX is not set
  5976. # CONFIG_ATALK is not set
  5977. -
  5978. -#
  5979. -# Appletalk devices
  5980. -#
  5981. -# CONFIG_DEV_APPLETALK is not set
  5982. # CONFIG_DECNET is not set
  5983. # CONFIG_BRIDGE is not set
  5984. # CONFIG_X25 is not set
  5985. @@ -441,7 +436,6 @@
  5986. CONFIG_SERIAL_CONSOLE=y
  5987. # CONFIG_SERIAL_EXTENDED is not set
  5988. # CONFIG_SERIAL_NONSTANDARD is not set
  5989. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  5990. CONFIG_UNIX98_PTYS=y
  5991. CONFIG_UNIX98_PTY_COUNT=256
  5992. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-ficmmp linux-2.4.32-rc1.mips/arch/mips/defconfig-ficmmp
  5993. --- linux-2.4.32-rc1/arch/mips/defconfig-ficmmp 1970-01-01 01:00:00.000000000 +0100
  5994. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-ficmmp 2005-03-18 13:13:21.000000000 +0100
  5995. @@ -0,0 +1,862 @@
  5996. +#
  5997. +# Automatically generated make config: don't edit
  5998. +#
  5999. +CONFIG_MIPS=y
  6000. +CONFIG_MIPS32=y
  6001. +# CONFIG_MIPS64 is not set
  6002. +
  6003. +#
  6004. +# Code maturity level options
  6005. +#
  6006. +CONFIG_EXPERIMENTAL=y
  6007. +
  6008. +#
  6009. +# Loadable module support
  6010. +#
  6011. +CONFIG_MODULES=y
  6012. +# CONFIG_MODVERSIONS is not set
  6013. +CONFIG_KMOD=y
  6014. +
  6015. +#
  6016. +# Machine selection
  6017. +#
  6018. +# CONFIG_ACER_PICA_61 is not set
  6019. +# CONFIG_MIPS_BOSPORUS is not set
  6020. +# CONFIG_MIPS_MIRAGE is not set
  6021. +# CONFIG_MIPS_DB1000 is not set
  6022. +# CONFIG_MIPS_DB1100 is not set
  6023. +# CONFIG_MIPS_DB1500 is not set
  6024. +# CONFIG_MIPS_DB1550 is not set
  6025. +# CONFIG_MIPS_PB1000 is not set
  6026. +# CONFIG_MIPS_PB1100 is not set
  6027. +# CONFIG_MIPS_PB1500 is not set
  6028. +# CONFIG_MIPS_PB1550 is not set
  6029. +# CONFIG_MIPS_HYDROGEN3 is not set
  6030. +# CONFIG_MIPS_XXS1500 is not set
  6031. +# CONFIG_MIPS_MTX1 is not set
  6032. +# CONFIG_COGENT_CSB250 is not set
  6033. +# CONFIG_BAGET_MIPS is not set
  6034. +# CONFIG_CASIO_E55 is not set
  6035. +# CONFIG_MIPS_COBALT is not set
  6036. +# CONFIG_DECSTATION is not set
  6037. +# CONFIG_MIPS_EV64120 is not set
  6038. +# CONFIG_MIPS_EV96100 is not set
  6039. +# CONFIG_MIPS_IVR is not set
  6040. +# CONFIG_HP_LASERJET is not set
  6041. +# CONFIG_IBM_WORKPAD is not set
  6042. +# CONFIG_LASAT is not set
  6043. +# CONFIG_MIPS_ITE8172 is not set
  6044. +# CONFIG_MIPS_ATLAS is not set
  6045. +# CONFIG_MIPS_MAGNUM_4000 is not set
  6046. +# CONFIG_MIPS_MALTA is not set
  6047. +# CONFIG_MIPS_SEAD is not set
  6048. +# CONFIG_MOMENCO_OCELOT is not set
  6049. +# CONFIG_MOMENCO_OCELOT_G is not set
  6050. +# CONFIG_MOMENCO_OCELOT_C is not set
  6051. +# CONFIG_MOMENCO_JAGUAR_ATX is not set
  6052. +# CONFIG_PMC_BIG_SUR is not set
  6053. +# CONFIG_PMC_STRETCH is not set
  6054. +# CONFIG_PMC_YOSEMITE is not set
  6055. +# CONFIG_DDB5074 is not set
  6056. +# CONFIG_DDB5476 is not set
  6057. +# CONFIG_DDB5477 is not set
  6058. +# CONFIG_NEC_OSPREY is not set
  6059. +# CONFIG_NEC_EAGLE is not set
  6060. +# CONFIG_OLIVETTI_M700 is not set
  6061. +# CONFIG_NINO is not set
  6062. +# CONFIG_SGI_IP22 is not set
  6063. +# CONFIG_SGI_IP27 is not set
  6064. +# CONFIG_SIBYTE_SB1xxx_SOC is not set
  6065. +# CONFIG_SNI_RM200_PCI is not set
  6066. +# CONFIG_TANBAC_TB0226 is not set
  6067. +# CONFIG_TANBAC_TB0229 is not set
  6068. +# CONFIG_TOSHIBA_JMR3927 is not set
  6069. +# CONFIG_TOSHIBA_RBTX4927 is not set
  6070. +# CONFIG_VICTOR_MPC30X is not set
  6071. +# CONFIG_ZAO_CAPCELLA is not set
  6072. +# CONFIG_HIGHMEM is not set
  6073. +CONFIG_RWSEM_GENERIC_SPINLOCK=y
  6074. +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
  6075. +# CONFIG_MIPS_AU1000 is not set
  6076. +
  6077. +#
  6078. +# CPU selection
  6079. +#
  6080. +CONFIG_CPU_MIPS32=y
  6081. +# CONFIG_CPU_MIPS64 is not set
  6082. +# CONFIG_CPU_R3000 is not set
  6083. +# CONFIG_CPU_TX39XX is not set
  6084. +# CONFIG_CPU_VR41XX is not set
  6085. +# CONFIG_CPU_R4300 is not set
  6086. +# CONFIG_CPU_R4X00 is not set
  6087. +# CONFIG_CPU_TX49XX is not set
  6088. +# CONFIG_CPU_R5000 is not set
  6089. +# CONFIG_CPU_R5432 is not set
  6090. +# CONFIG_CPU_R6000 is not set
  6091. +# CONFIG_CPU_NEVADA is not set
  6092. +# CONFIG_CPU_R8000 is not set
  6093. +# CONFIG_CPU_R10000 is not set
  6094. +# CONFIG_CPU_RM7000 is not set
  6095. +# CONFIG_CPU_RM9000 is not set
  6096. +# CONFIG_CPU_SB1 is not set
  6097. +CONFIG_PAGE_SIZE_4KB=y
  6098. +# CONFIG_PAGE_SIZE_16KB is not set
  6099. +# CONFIG_PAGE_SIZE_64KB is not set
  6100. +CONFIG_CPU_HAS_PREFETCH=y
  6101. +# CONFIG_VTAG_ICACHE is not set
  6102. +CONFIG_64BIT_PHYS_ADDR=y
  6103. +# CONFIG_CPU_ADVANCED is not set
  6104. +CONFIG_CPU_HAS_LLSC=y
  6105. +# CONFIG_CPU_HAS_LLDSCD is not set
  6106. +# CONFIG_CPU_HAS_WB is not set
  6107. +CONFIG_CPU_HAS_SYNC=y
  6108. +
  6109. +#
  6110. +# General setup
  6111. +#
  6112. +CONFIG_CPU_LITTLE_ENDIAN=y
  6113. +# CONFIG_BUILD_ELF64 is not set
  6114. +CONFIG_NET=y
  6115. +# CONFIG_PCI is not set
  6116. +# CONFIG_PCI_NEW is not set
  6117. +CONFIG_PCI_AUTO=y
  6118. +# CONFIG_ISA is not set
  6119. +# CONFIG_TC is not set
  6120. +# CONFIG_MCA is not set
  6121. +# CONFIG_SBUS is not set
  6122. +# CONFIG_HOTPLUG is not set
  6123. +# CONFIG_PCMCIA is not set
  6124. +# CONFIG_HOTPLUG_PCI is not set
  6125. +CONFIG_SYSVIPC=y
  6126. +# CONFIG_BSD_PROCESS_ACCT is not set
  6127. +CONFIG_SYSCTL=y
  6128. +CONFIG_KCORE_ELF=y
  6129. +# CONFIG_KCORE_AOUT is not set
  6130. +# CONFIG_BINFMT_AOUT is not set
  6131. +CONFIG_BINFMT_ELF=y
  6132. +# CONFIG_MIPS32_COMPAT is not set
  6133. +# CONFIG_MIPS32_O32 is not set
  6134. +# CONFIG_MIPS32_N32 is not set
  6135. +# CONFIG_BINFMT_ELF32 is not set
  6136. +# CONFIG_BINFMT_MISC is not set
  6137. +# CONFIG_OOM_KILLER is not set
  6138. +CONFIG_CMDLINE_BOOL=y
  6139. +CONFIG_CMDLINE="ide3=dma mem=96M root=/dev/hda2 rootflags=data=journal"
  6140. +
  6141. +#
  6142. +# Memory Technology Devices (MTD)
  6143. +#
  6144. +# CONFIG_MTD is not set
  6145. +
  6146. +#
  6147. +# Parallel port support
  6148. +#
  6149. +# CONFIG_PARPORT is not set
  6150. +
  6151. +#
  6152. +# Plug and Play configuration
  6153. +#
  6154. +# CONFIG_PNP is not set
  6155. +# CONFIG_ISAPNP is not set
  6156. +
  6157. +#
  6158. +# Block devices
  6159. +#
  6160. +# CONFIG_BLK_DEV_FD is not set
  6161. +# CONFIG_BLK_DEV_XD is not set
  6162. +# CONFIG_PARIDE is not set
  6163. +# CONFIG_BLK_CPQ_DA is not set
  6164. +# CONFIG_BLK_CPQ_CISS_DA is not set
  6165. +# CONFIG_CISS_SCSI_TAPE is not set
  6166. +# CONFIG_CISS_MONITOR_THREAD is not set
  6167. +# CONFIG_BLK_DEV_DAC960 is not set
  6168. +# CONFIG_BLK_DEV_UMEM is not set
  6169. +# CONFIG_BLK_DEV_SX8 is not set
  6170. +CONFIG_BLK_DEV_LOOP=y
  6171. +# CONFIG_BLK_DEV_NBD is not set
  6172. +# CONFIG_BLK_DEV_RAM is not set
  6173. +# CONFIG_BLK_DEV_INITRD is not set
  6174. +# CONFIG_BLK_STATS is not set
  6175. +
  6176. +#
  6177. +# Multi-device support (RAID and LVM)
  6178. +#
  6179. +# CONFIG_MD is not set
  6180. +# CONFIG_BLK_DEV_MD is not set
  6181. +# CONFIG_MD_LINEAR is not set
  6182. +# CONFIG_MD_RAID0 is not set
  6183. +# CONFIG_MD_RAID1 is not set
  6184. +# CONFIG_MD_RAID5 is not set
  6185. +# CONFIG_MD_MULTIPATH is not set
  6186. +# CONFIG_BLK_DEV_LVM is not set
  6187. +
  6188. +#
  6189. +# Networking options
  6190. +#
  6191. +CONFIG_PACKET=y
  6192. +# CONFIG_PACKET_MMAP is not set
  6193. +# CONFIG_NETLINK_DEV is not set
  6194. +CONFIG_NETFILTER=y
  6195. +# CONFIG_NETFILTER_DEBUG is not set
  6196. +CONFIG_FILTER=y
  6197. +CONFIG_UNIX=y
  6198. +CONFIG_INET=y
  6199. +CONFIG_IP_MULTICAST=y
  6200. +# CONFIG_IP_ADVANCED_ROUTER is not set
  6201. +# CONFIG_IP_PNP is not set
  6202. +# CONFIG_NET_IPIP is not set
  6203. +# CONFIG_NET_IPGRE is not set
  6204. +# CONFIG_IP_MROUTE is not set
  6205. +# CONFIG_ARPD is not set
  6206. +# CONFIG_INET_ECN is not set
  6207. +# CONFIG_SYN_COOKIES is not set
  6208. +
  6209. +#
  6210. +# IP: Netfilter Configuration
  6211. +#
  6212. +# CONFIG_IP_NF_CONNTRACK is not set
  6213. +# CONFIG_IP_NF_QUEUE is not set
  6214. +# CONFIG_IP_NF_IPTABLES is not set
  6215. +# CONFIG_IP_NF_ARPTABLES is not set
  6216. +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
  6217. +# CONFIG_IP_NF_COMPAT_IPFWADM is not set
  6218. +
  6219. +#
  6220. +# IP: Virtual Server Configuration
  6221. +#
  6222. +# CONFIG_IP_VS is not set
  6223. +# CONFIG_IPV6 is not set
  6224. +# CONFIG_KHTTPD is not set
  6225. +
  6226. +#
  6227. +# SCTP Configuration (EXPERIMENTAL)
  6228. +#
  6229. +# CONFIG_IP_SCTP is not set
  6230. +# CONFIG_ATM is not set
  6231. +# CONFIG_VLAN_8021Q is not set
  6232. +
  6233. +#
  6234. +#
  6235. +#
  6236. +# CONFIG_IPX is not set
  6237. +# CONFIG_ATALK is not set
  6238. +# CONFIG_DECNET is not set
  6239. +# CONFIG_BRIDGE is not set
  6240. +# CONFIG_X25 is not set
  6241. +# CONFIG_LAPB is not set
  6242. +# CONFIG_LLC is not set
  6243. +# CONFIG_NET_DIVERT is not set
  6244. +# CONFIG_ECONET is not set
  6245. +# CONFIG_WAN_ROUTER is not set
  6246. +# CONFIG_NET_FASTROUTE is not set
  6247. +# CONFIG_NET_HW_FLOWCONTROL is not set
  6248. +
  6249. +#
  6250. +# QoS and/or fair queueing
  6251. +#
  6252. +# CONFIG_NET_SCHED is not set
  6253. +
  6254. +#
  6255. +# Network testing
  6256. +#
  6257. +# CONFIG_NET_PKTGEN is not set
  6258. +
  6259. +#
  6260. +# Telephony Support
  6261. +#
  6262. +# CONFIG_PHONE is not set
  6263. +# CONFIG_PHONE_IXJ is not set
  6264. +# CONFIG_PHONE_IXJ_PCMCIA is not set
  6265. +
  6266. +#
  6267. +# ATA/IDE/MFM/RLL support
  6268. +#
  6269. +CONFIG_IDE=y
  6270. +
  6271. +#
  6272. +# IDE, ATA and ATAPI Block devices
  6273. +#
  6274. +CONFIG_BLK_DEV_IDE=y
  6275. +
  6276. +#
  6277. +# Please see Documentation/ide.txt for help/info on IDE drives
  6278. +#
  6279. +CONFIG_BLK_DEV_HD_IDE=y
  6280. +CONFIG_BLK_DEV_HD=y
  6281. +# CONFIG_BLK_DEV_IDE_SATA is not set
  6282. +CONFIG_BLK_DEV_IDEDISK=y
  6283. +CONFIG_IDEDISK_MULTI_MODE=y
  6284. +CONFIG_IDEDISK_STROKE=y
  6285. +# CONFIG_BLK_DEV_IDECS is not set
  6286. +# CONFIG_BLK_DEV_DELKIN is not set
  6287. +# CONFIG_BLK_DEV_IDECD is not set
  6288. +# CONFIG_BLK_DEV_IDETAPE is not set
  6289. +# CONFIG_BLK_DEV_IDEFLOPPY is not set
  6290. +# CONFIG_BLK_DEV_IDESCSI is not set
  6291. +# CONFIG_IDE_TASK_IOCTL is not set
  6292. +
  6293. +#
  6294. +# IDE chipset support/bugfixes
  6295. +#
  6296. +# CONFIG_BLK_DEV_CMD640 is not set
  6297. +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
  6298. +# CONFIG_BLK_DEV_ISAPNP is not set
  6299. +# CONFIG_IDE_CHIPSETS is not set
  6300. +# CONFIG_IDEDMA_AUTO is not set
  6301. +# CONFIG_DMA_NONPCI is not set
  6302. +# CONFIG_BLK_DEV_ATARAID is not set
  6303. +# CONFIG_BLK_DEV_ATARAID_PDC is not set
  6304. +# CONFIG_BLK_DEV_ATARAID_HPT is not set
  6305. +# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
  6306. +# CONFIG_BLK_DEV_ATARAID_SII is not set
  6307. +
  6308. +#
  6309. +# SCSI support
  6310. +#
  6311. +CONFIG_SCSI=y
  6312. +
  6313. +#
  6314. +# SCSI support type (disk, tape, CD-ROM)
  6315. +#
  6316. +CONFIG_BLK_DEV_SD=y
  6317. +CONFIG_SD_EXTRA_DEVS=40
  6318. +CONFIG_CHR_DEV_ST=y
  6319. +# CONFIG_CHR_DEV_OSST is not set
  6320. +CONFIG_BLK_DEV_SR=y
  6321. +# CONFIG_BLK_DEV_SR_VENDOR is not set
  6322. +CONFIG_SR_EXTRA_DEVS=2
  6323. +# CONFIG_CHR_DEV_SG is not set
  6324. +
  6325. +#
  6326. +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  6327. +#
  6328. +# CONFIG_SCSI_DEBUG_QUEUES is not set
  6329. +# CONFIG_SCSI_MULTI_LUN is not set
  6330. +CONFIG_SCSI_CONSTANTS=y
  6331. +# CONFIG_SCSI_LOGGING is not set
  6332. +
  6333. +#
  6334. +# SCSI low-level drivers
  6335. +#
  6336. +# CONFIG_SCSI_7000FASST is not set
  6337. +# CONFIG_SCSI_ACARD is not set
  6338. +# CONFIG_SCSI_AHA152X is not set
  6339. +# CONFIG_SCSI_AHA1542 is not set
  6340. +# CONFIG_SCSI_AHA1740 is not set
  6341. +# CONFIG_SCSI_AACRAID is not set
  6342. +# CONFIG_SCSI_AIC7XXX is not set
  6343. +# CONFIG_SCSI_AIC79XX is not set
  6344. +# CONFIG_SCSI_AIC7XXX_OLD is not set
  6345. +# CONFIG_SCSI_DPT_I2O is not set
  6346. +# CONFIG_SCSI_ADVANSYS is not set
  6347. +# CONFIG_SCSI_IN2000 is not set
  6348. +# CONFIG_SCSI_AM53C974 is not set
  6349. +# CONFIG_SCSI_MEGARAID is not set
  6350. +# CONFIG_SCSI_MEGARAID2 is not set
  6351. +# CONFIG_SCSI_SATA is not set
  6352. +# CONFIG_SCSI_SATA_AHCI is not set
  6353. +# CONFIG_SCSI_SATA_SVW is not set
  6354. +# CONFIG_SCSI_ATA_PIIX is not set
  6355. +# CONFIG_SCSI_SATA_NV is not set
  6356. +# CONFIG_SCSI_SATA_QSTOR is not set
  6357. +# CONFIG_SCSI_SATA_PROMISE is not set
  6358. +# CONFIG_SCSI_SATA_SX4 is not set
  6359. +# CONFIG_SCSI_SATA_SIL is not set
  6360. +# CONFIG_SCSI_SATA_SIS is not set
  6361. +# CONFIG_SCSI_SATA_ULI is not set
  6362. +# CONFIG_SCSI_SATA_VIA is not set
  6363. +# CONFIG_SCSI_SATA_VITESSE is not set
  6364. +# CONFIG_SCSI_BUSLOGIC is not set
  6365. +# CONFIG_SCSI_DMX3191D is not set
  6366. +# CONFIG_SCSI_DTC3280 is not set
  6367. +# CONFIG_SCSI_EATA is not set
  6368. +# CONFIG_SCSI_EATA_DMA is not set
  6369. +# CONFIG_SCSI_EATA_PIO is not set
  6370. +# CONFIG_SCSI_FUTURE_DOMAIN is not set
  6371. +# CONFIG_SCSI_GDTH is not set
  6372. +# CONFIG_SCSI_GENERIC_NCR5380 is not set
  6373. +# CONFIG_SCSI_INITIO is not set
  6374. +# CONFIG_SCSI_INIA100 is not set
  6375. +# CONFIG_SCSI_NCR53C406A is not set
  6376. +# CONFIG_SCSI_NCR53C7xx is not set
  6377. +# CONFIG_SCSI_PAS16 is not set
  6378. +# CONFIG_SCSI_PCI2000 is not set
  6379. +# CONFIG_SCSI_PCI2220I is not set
  6380. +# CONFIG_SCSI_PSI240I is not set
  6381. +# CONFIG_SCSI_QLOGIC_FAS is not set
  6382. +# CONFIG_SCSI_SIM710 is not set
  6383. +# CONFIG_SCSI_SYM53C416 is not set
  6384. +# CONFIG_SCSI_T128 is not set
  6385. +# CONFIG_SCSI_U14_34F is not set
  6386. +# CONFIG_SCSI_NSP32 is not set
  6387. +# CONFIG_SCSI_DEBUG is not set
  6388. +
  6389. +#
  6390. +# Fusion MPT device support
  6391. +#
  6392. +# CONFIG_FUSION is not set
  6393. +# CONFIG_FUSION_BOOT is not set
  6394. +# CONFIG_FUSION_ISENSE is not set
  6395. +# CONFIG_FUSION_CTL is not set
  6396. +# CONFIG_FUSION_LAN is not set
  6397. +
  6398. +#
  6399. +# Network device support
  6400. +#
  6401. +CONFIG_NETDEVICES=y
  6402. +
  6403. +#
  6404. +# ARCnet devices
  6405. +#
  6406. +# CONFIG_ARCNET is not set
  6407. +# CONFIG_DUMMY is not set
  6408. +# CONFIG_BONDING is not set
  6409. +# CONFIG_EQUALIZER is not set
  6410. +# CONFIG_TUN is not set
  6411. +# CONFIG_ETHERTAP is not set
  6412. +
  6413. +#
  6414. +# Ethernet (10 or 100Mbit)
  6415. +#
  6416. +CONFIG_NET_ETHERNET=y
  6417. +# CONFIG_SUNLANCE is not set
  6418. +# CONFIG_SUNBMAC is not set
  6419. +# CONFIG_SUNQE is not set
  6420. +# CONFIG_SUNGEM is not set
  6421. +# CONFIG_NET_VENDOR_3COM is not set
  6422. +# CONFIG_LANCE is not set
  6423. +# CONFIG_NET_VENDOR_SMC is not set
  6424. +# CONFIG_NET_VENDOR_RACAL is not set
  6425. +# CONFIG_NET_ISA is not set
  6426. +# CONFIG_NET_PCI is not set
  6427. +# CONFIG_NET_POCKET is not set
  6428. +
  6429. +#
  6430. +# Ethernet (1000 Mbit)
  6431. +#
  6432. +# CONFIG_ACENIC is not set
  6433. +# CONFIG_DL2K is not set
  6434. +# CONFIG_E1000 is not set
  6435. +# CONFIG_MYRI_SBUS is not set
  6436. +# CONFIG_NS83820 is not set
  6437. +# CONFIG_HAMACHI is not set
  6438. +# CONFIG_YELLOWFIN is not set
  6439. +# CONFIG_R8169 is not set
  6440. +# CONFIG_SK98LIN is not set
  6441. +# CONFIG_TIGON3 is not set
  6442. +# CONFIG_FDDI is not set
  6443. +# CONFIG_HIPPI is not set
  6444. +# CONFIG_PLIP is not set
  6445. +# CONFIG_PPP is not set
  6446. +# CONFIG_SLIP is not set
  6447. +
  6448. +#
  6449. +# Wireless LAN (non-hamradio)
  6450. +#
  6451. +# CONFIG_NET_RADIO is not set
  6452. +
  6453. +#
  6454. +# Token Ring devices
  6455. +#
  6456. +# CONFIG_TR is not set
  6457. +# CONFIG_NET_FC is not set
  6458. +# CONFIG_RCPCI is not set
  6459. +# CONFIG_SHAPER is not set
  6460. +
  6461. +#
  6462. +# Wan interfaces
  6463. +#
  6464. +# CONFIG_WAN is not set
  6465. +
  6466. +#
  6467. +# Amateur Radio support
  6468. +#
  6469. +# CONFIG_HAMRADIO is not set
  6470. +
  6471. +#
  6472. +# IrDA (infrared) support
  6473. +#
  6474. +# CONFIG_IRDA is not set
  6475. +
  6476. +#
  6477. +# ISDN subsystem
  6478. +#
  6479. +# CONFIG_ISDN is not set
  6480. +
  6481. +#
  6482. +# Input core support
  6483. +#
  6484. +CONFIG_INPUT=y
  6485. +CONFIG_INPUT_KEYBDEV=y
  6486. +CONFIG_INPUT_MOUSEDEV=y
  6487. +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
  6488. +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
  6489. +# CONFIG_INPUT_JOYDEV is not set
  6490. +CONFIG_INPUT_EVDEV=y
  6491. +# CONFIG_INPUT_UINPUT is not set
  6492. +
  6493. +#
  6494. +# Character devices
  6495. +#
  6496. +CONFIG_VT=y
  6497. +CONFIG_VT_CONSOLE=y
  6498. +# CONFIG_SERIAL is not set
  6499. +# CONFIG_SERIAL_EXTENDED is not set
  6500. +CONFIG_SERIAL_NONSTANDARD=y
  6501. +# CONFIG_COMPUTONE is not set
  6502. +# CONFIG_ROCKETPORT is not set
  6503. +# CONFIG_CYCLADES is not set
  6504. +# CONFIG_DIGIEPCA is not set
  6505. +# CONFIG_DIGI is not set
  6506. +# CONFIG_ESPSERIAL is not set
  6507. +# CONFIG_MOXA_INTELLIO is not set
  6508. +# CONFIG_MOXA_SMARTIO is not set
  6509. +# CONFIG_ISI is not set
  6510. +# CONFIG_SYNCLINK is not set
  6511. +# CONFIG_SYNCLINKMP is not set
  6512. +# CONFIG_N_HDLC is not set
  6513. +# CONFIG_RISCOM8 is not set
  6514. +# CONFIG_SPECIALIX is not set
  6515. +# CONFIG_SX is not set
  6516. +# CONFIG_RIO is not set
  6517. +# CONFIG_STALDRV is not set
  6518. +# CONFIG_SERIAL_TX3912 is not set
  6519. +# CONFIG_SERIAL_TX3912_CONSOLE is not set
  6520. +# CONFIG_SERIAL_TXX9 is not set
  6521. +# CONFIG_SERIAL_TXX9_CONSOLE is not set
  6522. +# CONFIG_TXX927_SERIAL is not set
  6523. +CONFIG_UNIX98_PTYS=y
  6524. +CONFIG_UNIX98_PTY_COUNT=256
  6525. +
  6526. +#
  6527. +# I2C support
  6528. +#
  6529. +CONFIG_I2C=y
  6530. +# CONFIG_I2C_ALGOBIT is not set
  6531. +# CONFIG_SCx200_ACB is not set
  6532. +# CONFIG_I2C_ALGOPCF is not set
  6533. +# CONFIG_I2C_CHARDEV is not set
  6534. +# CONFIG_I2C_PROC is not set
  6535. +
  6536. +#
  6537. +# Mice
  6538. +#
  6539. +# CONFIG_BUSMOUSE is not set
  6540. +# CONFIG_MOUSE is not set
  6541. +
  6542. +#
  6543. +# Joysticks
  6544. +#
  6545. +# CONFIG_INPUT_GAMEPORT is not set
  6546. +# CONFIG_INPUT_NS558 is not set
  6547. +# CONFIG_INPUT_LIGHTNING is not set
  6548. +# CONFIG_INPUT_PCIGAME is not set
  6549. +# CONFIG_INPUT_CS461X is not set
  6550. +# CONFIG_INPUT_EMU10K1 is not set
  6551. +# CONFIG_INPUT_SERIO is not set
  6552. +# CONFIG_INPUT_SERPORT is not set
  6553. +
  6554. +#
  6555. +# Joysticks
  6556. +#
  6557. +# CONFIG_INPUT_ANALOG is not set
  6558. +# CONFIG_INPUT_A3D is not set
  6559. +# CONFIG_INPUT_ADI is not set
  6560. +# CONFIG_INPUT_COBRA is not set
  6561. +# CONFIG_INPUT_GF2K is not set
  6562. +# CONFIG_INPUT_GRIP is not set
  6563. +# CONFIG_INPUT_INTERACT is not set
  6564. +# CONFIG_INPUT_TMDC is not set
  6565. +# CONFIG_INPUT_SIDEWINDER is not set
  6566. +# CONFIG_INPUT_IFORCE_USB is not set
  6567. +# CONFIG_INPUT_IFORCE_232 is not set
  6568. +# CONFIG_INPUT_WARRIOR is not set
  6569. +# CONFIG_INPUT_MAGELLAN is not set
  6570. +# CONFIG_INPUT_SPACEORB is not set
  6571. +# CONFIG_INPUT_SPACEBALL is not set
  6572. +# CONFIG_INPUT_STINGER is not set
  6573. +# CONFIG_INPUT_DB9 is not set
  6574. +# CONFIG_INPUT_GAMECON is not set
  6575. +# CONFIG_INPUT_TURBOGRAFX is not set
  6576. +# CONFIG_QIC02_TAPE is not set
  6577. +# CONFIG_IPMI_HANDLER is not set
  6578. +# CONFIG_IPMI_PANIC_EVENT is not set
  6579. +# CONFIG_IPMI_DEVICE_INTERFACE is not set
  6580. +# CONFIG_IPMI_KCS is not set
  6581. +# CONFIG_IPMI_WATCHDOG is not set
  6582. +
  6583. +#
  6584. +# Watchdog Cards
  6585. +#
  6586. +# CONFIG_WATCHDOG is not set
  6587. +# CONFIG_SCx200 is not set
  6588. +# CONFIG_SCx200_GPIO is not set
  6589. +# CONFIG_AMD_PM768 is not set
  6590. +# CONFIG_NVRAM is not set
  6591. +# CONFIG_RTC is not set
  6592. +# CONFIG_DTLK is not set
  6593. +# CONFIG_R3964 is not set
  6594. +# CONFIG_APPLICOM is not set
  6595. +
  6596. +#
  6597. +# Ftape, the floppy tape device driver
  6598. +#
  6599. +# CONFIG_FTAPE is not set
  6600. +# CONFIG_AGP is not set
  6601. +
  6602. +#
  6603. +# Direct Rendering Manager (XFree86 DRI support)
  6604. +#
  6605. +# CONFIG_DRM is not set
  6606. +
  6607. +#
  6608. +# File systems
  6609. +#
  6610. +# CONFIG_QUOTA is not set
  6611. +# CONFIG_QFMT_V2 is not set
  6612. +CONFIG_AUTOFS_FS=y
  6613. +# CONFIG_AUTOFS4_FS is not set
  6614. +# CONFIG_REISERFS_FS is not set
  6615. +# CONFIG_REISERFS_CHECK is not set
  6616. +# CONFIG_REISERFS_PROC_INFO is not set
  6617. +# CONFIG_ADFS_FS is not set
  6618. +# CONFIG_ADFS_FS_RW is not set
  6619. +# CONFIG_AFFS_FS is not set
  6620. +# CONFIG_HFS_FS is not set
  6621. +# CONFIG_HFSPLUS_FS is not set
  6622. +# CONFIG_BEFS_FS is not set
  6623. +# CONFIG_BEFS_DEBUG is not set
  6624. +# CONFIG_BFS_FS is not set
  6625. +CONFIG_EXT3_FS=y
  6626. +CONFIG_JBD=y
  6627. +# CONFIG_JBD_DEBUG is not set
  6628. +CONFIG_FAT_FS=y
  6629. +CONFIG_MSDOS_FS=y
  6630. +# CONFIG_UMSDOS_FS is not set
  6631. +CONFIG_VFAT_FS=y
  6632. +# CONFIG_EFS_FS is not set
  6633. +# CONFIG_JFFS_FS is not set
  6634. +# CONFIG_JFFS2_FS is not set
  6635. +# CONFIG_CRAMFS is not set
  6636. +# CONFIG_TMPFS is not set
  6637. +CONFIG_RAMFS=y
  6638. +# CONFIG_ISO9660_FS is not set
  6639. +# CONFIG_JOLIET is not set
  6640. +# CONFIG_ZISOFS is not set
  6641. +# CONFIG_JFS_FS is not set
  6642. +# CONFIG_JFS_DEBUG is not set
  6643. +# CONFIG_JFS_STATISTICS is not set
  6644. +# CONFIG_MINIX_FS is not set
  6645. +# CONFIG_VXFS_FS is not set
  6646. +# CONFIG_NTFS_FS is not set
  6647. +# CONFIG_NTFS_RW is not set
  6648. +# CONFIG_HPFS_FS is not set
  6649. +CONFIG_PROC_FS=y
  6650. +# CONFIG_DEVFS_FS is not set
  6651. +# CONFIG_DEVFS_MOUNT is not set
  6652. +# CONFIG_DEVFS_DEBUG is not set
  6653. +CONFIG_DEVPTS_FS=y
  6654. +# CONFIG_QNX4FS_FS is not set
  6655. +# CONFIG_QNX4FS_RW is not set
  6656. +# CONFIG_ROMFS_FS is not set
  6657. +CONFIG_EXT2_FS=y
  6658. +# CONFIG_SYSV_FS is not set
  6659. +# CONFIG_UDF_FS is not set
  6660. +# CONFIG_UDF_RW is not set
  6661. +# CONFIG_UFS_FS is not set
  6662. +# CONFIG_UFS_FS_WRITE is not set
  6663. +# CONFIG_XFS_FS is not set
  6664. +# CONFIG_XFS_QUOTA is not set
  6665. +# CONFIG_XFS_RT is not set
  6666. +# CONFIG_XFS_TRACE is not set
  6667. +# CONFIG_XFS_DEBUG is not set
  6668. +
  6669. +#
  6670. +# Network File Systems
  6671. +#
  6672. +# CONFIG_CODA_FS is not set
  6673. +# CONFIG_INTERMEZZO_FS is not set
  6674. +# CONFIG_NFS_FS is not set
  6675. +# CONFIG_NFS_V3 is not set
  6676. +# CONFIG_NFS_DIRECTIO is not set
  6677. +# CONFIG_ROOT_NFS is not set
  6678. +# CONFIG_NFSD is not set
  6679. +# CONFIG_NFSD_V3 is not set
  6680. +# CONFIG_NFSD_TCP is not set
  6681. +# CONFIG_SUNRPC is not set
  6682. +# CONFIG_LOCKD is not set
  6683. +# CONFIG_SMB_FS is not set
  6684. +# CONFIG_NCP_FS is not set
  6685. +# CONFIG_NCPFS_PACKET_SIGNING is not set
  6686. +# CONFIG_NCPFS_IOCTL_LOCKING is not set
  6687. +# CONFIG_NCPFS_STRONG is not set
  6688. +# CONFIG_NCPFS_NFS_NS is not set
  6689. +# CONFIG_NCPFS_OS2_NS is not set
  6690. +# CONFIG_NCPFS_SMALLDOS is not set
  6691. +# CONFIG_NCPFS_NLS is not set
  6692. +# CONFIG_NCPFS_EXTRAS is not set
  6693. +# CONFIG_ZISOFS_FS is not set
  6694. +
  6695. +#
  6696. +# Partition Types
  6697. +#
  6698. +# CONFIG_PARTITION_ADVANCED is not set
  6699. +CONFIG_MSDOS_PARTITION=y
  6700. +# CONFIG_SMB_NLS is not set
  6701. +CONFIG_NLS=y
  6702. +
  6703. +#
  6704. +# Native Language Support
  6705. +#
  6706. +CONFIG_NLS_DEFAULT="iso8859-1"
  6707. +# CONFIG_NLS_CODEPAGE_437 is not set
  6708. +# CONFIG_NLS_CODEPAGE_737 is not set
  6709. +# CONFIG_NLS_CODEPAGE_775 is not set
  6710. +# CONFIG_NLS_CODEPAGE_850 is not set
  6711. +# CONFIG_NLS_CODEPAGE_852 is not set
  6712. +# CONFIG_NLS_CODEPAGE_855 is not set
  6713. +# CONFIG_NLS_CODEPAGE_857 is not set
  6714. +# CONFIG_NLS_CODEPAGE_860 is not set
  6715. +# CONFIG_NLS_CODEPAGE_861 is not set
  6716. +# CONFIG_NLS_CODEPAGE_862 is not set
  6717. +# CONFIG_NLS_CODEPAGE_863 is not set
  6718. +# CONFIG_NLS_CODEPAGE_864 is not set
  6719. +# CONFIG_NLS_CODEPAGE_865 is not set
  6720. +# CONFIG_NLS_CODEPAGE_866 is not set
  6721. +# CONFIG_NLS_CODEPAGE_869 is not set
  6722. +# CONFIG_NLS_CODEPAGE_936 is not set
  6723. +# CONFIG_NLS_CODEPAGE_950 is not set
  6724. +# CONFIG_NLS_CODEPAGE_932 is not set
  6725. +# CONFIG_NLS_CODEPAGE_949 is not set
  6726. +# CONFIG_NLS_CODEPAGE_874 is not set
  6727. +# CONFIG_NLS_ISO8859_8 is not set
  6728. +# CONFIG_NLS_CODEPAGE_1250 is not set
  6729. +# CONFIG_NLS_CODEPAGE_1251 is not set
  6730. +# CONFIG_NLS_ISO8859_1 is not set
  6731. +# CONFIG_NLS_ISO8859_2 is not set
  6732. +# CONFIG_NLS_ISO8859_3 is not set
  6733. +# CONFIG_NLS_ISO8859_4 is not set
  6734. +# CONFIG_NLS_ISO8859_5 is not set
  6735. +# CONFIG_NLS_ISO8859_6 is not set
  6736. +# CONFIG_NLS_ISO8859_7 is not set
  6737. +# CONFIG_NLS_ISO8859_9 is not set
  6738. +# CONFIG_NLS_ISO8859_13 is not set
  6739. +# CONFIG_NLS_ISO8859_14 is not set
  6740. +# CONFIG_NLS_ISO8859_15 is not set
  6741. +# CONFIG_NLS_KOI8_R is not set
  6742. +# CONFIG_NLS_KOI8_U is not set
  6743. +# CONFIG_NLS_UTF8 is not set
  6744. +
  6745. +#
  6746. +# Multimedia devices
  6747. +#
  6748. +# CONFIG_VIDEO_DEV is not set
  6749. +
  6750. +#
  6751. +# Console drivers
  6752. +#
  6753. +# CONFIG_VGA_CONSOLE is not set
  6754. +# CONFIG_MDA_CONSOLE is not set
  6755. +
  6756. +#
  6757. +# Frame-buffer support
  6758. +#
  6759. +CONFIG_FB=y
  6760. +CONFIG_DUMMY_CONSOLE=y
  6761. +# CONFIG_FB_CYBER2000 is not set
  6762. +# CONFIG_FB_VIRTUAL is not set
  6763. +CONFIG_FBCON_ADVANCED=y
  6764. +# CONFIG_FBCON_MFB is not set
  6765. +# CONFIG_FBCON_CFB2 is not set
  6766. +# CONFIG_FBCON_CFB4 is not set
  6767. +# CONFIG_FBCON_CFB8 is not set
  6768. +CONFIG_FBCON_CFB16=y
  6769. +# CONFIG_FBCON_CFB24 is not set
  6770. +# CONFIG_FBCON_CFB32 is not set
  6771. +# CONFIG_FBCON_AFB is not set
  6772. +# CONFIG_FBCON_ILBM is not set
  6773. +# CONFIG_FBCON_IPLAN2P2 is not set
  6774. +# CONFIG_FBCON_IPLAN2P4 is not set
  6775. +# CONFIG_FBCON_IPLAN2P8 is not set
  6776. +# CONFIG_FBCON_MAC is not set
  6777. +# CONFIG_FBCON_VGA_PLANES is not set
  6778. +# CONFIG_FBCON_VGA is not set
  6779. +# CONFIG_FBCON_HGA is not set
  6780. +# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
  6781. +CONFIG_FBCON_FONTS=y
  6782. +CONFIG_FONT_8x8=y
  6783. +CONFIG_FONT_8x16=y
  6784. +# CONFIG_FONT_SUN8x16 is not set
  6785. +# CONFIG_FONT_SUN12x22 is not set
  6786. +# CONFIG_FONT_6x11 is not set
  6787. +# CONFIG_FONT_PEARL_8x8 is not set
  6788. +# CONFIG_FONT_ACORN_8x8 is not set
  6789. +
  6790. +#
  6791. +# Sound
  6792. +#
  6793. +CONFIG_SOUND=y
  6794. +# CONFIG_SOUND_ALI5455 is not set
  6795. +# CONFIG_SOUND_BT878 is not set
  6796. +# CONFIG_SOUND_CMPCI is not set
  6797. +# CONFIG_SOUND_EMU10K1 is not set
  6798. +# CONFIG_MIDI_EMU10K1 is not set
  6799. +# CONFIG_SOUND_FUSION is not set
  6800. +# CONFIG_SOUND_CS4281 is not set
  6801. +# CONFIG_SOUND_ES1370 is not set
  6802. +# CONFIG_SOUND_ES1371 is not set
  6803. +# CONFIG_SOUND_ESSSOLO1 is not set
  6804. +# CONFIG_SOUND_MAESTRO is not set
  6805. +# CONFIG_SOUND_MAESTRO3 is not set
  6806. +# CONFIG_SOUND_FORTE is not set
  6807. +# CONFIG_SOUND_ICH is not set
  6808. +# CONFIG_SOUND_RME96XX is not set
  6809. +# CONFIG_SOUND_SONICVIBES is not set
  6810. +# CONFIG_SOUND_TRIDENT is not set
  6811. +# CONFIG_SOUND_MSNDCLAS is not set
  6812. +# CONFIG_SOUND_MSNDPIN is not set
  6813. +# CONFIG_SOUND_VIA82CXXX is not set
  6814. +# CONFIG_MIDI_VIA82CXXX is not set
  6815. +# CONFIG_SOUND_OSS is not set
  6816. +# CONFIG_SOUND_TVMIXER is not set
  6817. +# CONFIG_SOUND_AD1980 is not set
  6818. +# CONFIG_SOUND_WM97XX is not set
  6819. +
  6820. +#
  6821. +# USB support
  6822. +#
  6823. +# CONFIG_USB is not set
  6824. +
  6825. +#
  6826. +# Support for USB gadgets
  6827. +#
  6828. +# CONFIG_USB_GADGET is not set
  6829. +
  6830. +#
  6831. +# Bluetooth support
  6832. +#
  6833. +# CONFIG_BLUEZ is not set
  6834. +
  6835. +#
  6836. +# Kernel hacking
  6837. +#
  6838. +CONFIG_CROSSCOMPILE=y
  6839. +# CONFIG_RUNTIME_DEBUG is not set
  6840. +# CONFIG_KGDB is not set
  6841. +# CONFIG_GDB_CONSOLE is not set
  6842. +# CONFIG_DEBUG_INFO is not set
  6843. +# CONFIG_MAGIC_SYSRQ is not set
  6844. +# CONFIG_MIPS_UNCACHED is not set
  6845. +CONFIG_LOG_BUF_SHIFT=0
  6846. +
  6847. +#
  6848. +# Cryptographic options
  6849. +#
  6850. +# CONFIG_CRYPTO is not set
  6851. +
  6852. +#
  6853. +# Library routines
  6854. +#
  6855. +# CONFIG_CRC32 is not set
  6856. +CONFIG_ZLIB_INFLATE=m
  6857. +CONFIG_ZLIB_DEFLATE=m
  6858. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-hp-lj linux-2.4.32-rc1.mips/arch/mips/defconfig-hp-lj
  6859. --- linux-2.4.32-rc1/arch/mips/defconfig-hp-lj 2005-01-19 15:09:28.000000000 +0100
  6860. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-hp-lj 2005-03-18 13:13:21.000000000 +0100
  6861. @@ -30,8 +30,8 @@
  6862. # CONFIG_MIPS_PB1000 is not set
  6863. # CONFIG_MIPS_PB1100 is not set
  6864. # CONFIG_MIPS_PB1500 is not set
  6865. -# CONFIG_MIPS_HYDROGEN3 is not set
  6866. # CONFIG_MIPS_PB1550 is not set
  6867. +# CONFIG_MIPS_HYDROGEN3 is not set
  6868. # CONFIG_MIPS_XXS1500 is not set
  6869. # CONFIG_MIPS_MTX1 is not set
  6870. # CONFIG_COGENT_CSB250 is not set
  6871. @@ -184,8 +184,8 @@
  6872. # Mapping drivers for chip access
  6873. #
  6874. CONFIG_MTD_PHYSMAP=y
  6875. -CONFIG_MTD_PHYSMAP_START=10040000
  6876. -CONFIG_MTD_PHYSMAP_LEN=00fc0000
  6877. +CONFIG_MTD_PHYSMAP_START=0x10040000
  6878. +CONFIG_MTD_PHYSMAP_LEN=0x00fc0000
  6879. CONFIG_MTD_PHYSMAP_BUSWIDTH=4
  6880. # CONFIG_MTD_PB1000 is not set
  6881. # CONFIG_MTD_PB1500 is not set
  6882. @@ -193,9 +193,7 @@
  6883. # CONFIG_MTD_BOSPORUS is not set
  6884. # CONFIG_MTD_XXS1500 is not set
  6885. # CONFIG_MTD_MTX1 is not set
  6886. -# CONFIG_MTD_DB1X00 is not set
  6887. # CONFIG_MTD_PB1550 is not set
  6888. -# CONFIG_MTD_HYDROGEN3 is not set
  6889. # CONFIG_MTD_MIRAGE is not set
  6890. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  6891. # CONFIG_MTD_OCELOT is not set
  6892. @@ -214,7 +212,6 @@
  6893. #
  6894. # Disk-On-Chip Device Drivers
  6895. #
  6896. -# CONFIG_MTD_DOC1000 is not set
  6897. # CONFIG_MTD_DOC2000 is not set
  6898. # CONFIG_MTD_DOC2001 is not set
  6899. # CONFIG_MTD_DOCPROBE is not set
  6900. @@ -304,11 +301,6 @@
  6901. #
  6902. # CONFIG_IPX is not set
  6903. # CONFIG_ATALK is not set
  6904. -
  6905. -#
  6906. -# Appletalk devices
  6907. -#
  6908. -# CONFIG_DEV_APPLETALK is not set
  6909. # CONFIG_DECNET is not set
  6910. # CONFIG_BRIDGE is not set
  6911. # CONFIG_X25 is not set
  6912. @@ -604,7 +596,6 @@
  6913. CONFIG_SERIAL_CONSOLE=y
  6914. # CONFIG_SERIAL_EXTENDED is not set
  6915. # CONFIG_SERIAL_NONSTANDARD is not set
  6916. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  6917. # CONFIG_UNIX98_PTYS is not set
  6918. #
  6919. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-hydrogen3 linux-2.4.32-rc1.mips/arch/mips/defconfig-hydrogen3
  6920. --- linux-2.4.32-rc1/arch/mips/defconfig-hydrogen3 2005-01-19 15:09:28.000000000 +0100
  6921. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-hydrogen3 2005-03-18 13:13:21.000000000 +0100
  6922. @@ -30,8 +30,8 @@
  6923. # CONFIG_MIPS_PB1000 is not set
  6924. # CONFIG_MIPS_PB1100 is not set
  6925. # CONFIG_MIPS_PB1500 is not set
  6926. -CONFIG_MIPS_HYDROGEN3=y
  6927. # CONFIG_MIPS_PB1550 is not set
  6928. +CONFIG_MIPS_HYDROGEN3=y
  6929. # CONFIG_MIPS_XXS1500 is not set
  6930. # CONFIG_MIPS_MTX1 is not set
  6931. # CONFIG_COGENT_CSB250 is not set
  6932. @@ -214,9 +214,7 @@
  6933. # CONFIG_MTD_BOSPORUS is not set
  6934. # CONFIG_MTD_XXS1500 is not set
  6935. # CONFIG_MTD_MTX1 is not set
  6936. -# CONFIG_MTD_DB1X00 is not set
  6937. # CONFIG_MTD_PB1550 is not set
  6938. -CONFIG_MTD_HYDROGEN3=y
  6939. # CONFIG_MTD_MIRAGE is not set
  6940. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  6941. # CONFIG_MTD_OCELOT is not set
  6942. @@ -235,7 +233,6 @@
  6943. #
  6944. # Disk-On-Chip Device Drivers
  6945. #
  6946. -# CONFIG_MTD_DOC1000 is not set
  6947. # CONFIG_MTD_DOC2000 is not set
  6948. # CONFIG_MTD_DOC2001 is not set
  6949. # CONFIG_MTD_DOCPROBE is not set
  6950. @@ -340,11 +337,6 @@
  6951. #
  6952. # CONFIG_IPX is not set
  6953. # CONFIG_ATALK is not set
  6954. -
  6955. -#
  6956. -# Appletalk devices
  6957. -#
  6958. -# CONFIG_DEV_APPLETALK is not set
  6959. # CONFIG_DECNET is not set
  6960. # CONFIG_BRIDGE is not set
  6961. # CONFIG_X25 is not set
  6962. @@ -590,7 +582,6 @@
  6963. # CONFIG_AU1X00_USB_TTY is not set
  6964. # CONFIG_AU1X00_USB_RAW is not set
  6965. # CONFIG_TXX927_SERIAL is not set
  6966. -CONFIG_MIPS_HYDROGEN3_BUTTONS=y
  6967. CONFIG_UNIX98_PTYS=y
  6968. CONFIG_UNIX98_PTY_COUNT=256
  6969. @@ -838,6 +829,7 @@
  6970. # CONFIG_FB_PM2 is not set
  6971. # CONFIG_FB_PM3 is not set
  6972. # CONFIG_FB_CYBER2000 is not set
  6973. +CONFIG_FB_AU1100=y
  6974. # CONFIG_FB_MATROX is not set
  6975. # CONFIG_FB_ATY is not set
  6976. # CONFIG_FB_RADEON is not set
  6977. @@ -849,7 +841,6 @@
  6978. # CONFIG_FB_VOODOO1 is not set
  6979. # CONFIG_FB_TRIDENT is not set
  6980. # CONFIG_FB_E1356 is not set
  6981. -CONFIG_FB_AU1100=y
  6982. # CONFIG_FB_IT8181 is not set
  6983. # CONFIG_FB_VIRTUAL is not set
  6984. CONFIG_FBCON_ADVANCED=y
  6985. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-ip22 linux-2.4.32-rc1.mips/arch/mips/defconfig-ip22
  6986. --- linux-2.4.32-rc1/arch/mips/defconfig-ip22 2005-01-19 15:09:28.000000000 +0100
  6987. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-ip22 2005-03-18 13:13:21.000000000 +0100
  6988. @@ -30,8 +30,8 @@
  6989. # CONFIG_MIPS_PB1000 is not set
  6990. # CONFIG_MIPS_PB1100 is not set
  6991. # CONFIG_MIPS_PB1500 is not set
  6992. -# CONFIG_MIPS_HYDROGEN3 is not set
  6993. # CONFIG_MIPS_PB1550 is not set
  6994. +# CONFIG_MIPS_HYDROGEN3 is not set
  6995. # CONFIG_MIPS_XXS1500 is not set
  6996. # CONFIG_MIPS_MTX1 is not set
  6997. # CONFIG_COGENT_CSB250 is not set
  6998. @@ -235,11 +235,6 @@
  6999. #
  7000. # CONFIG_IPX is not set
  7001. # CONFIG_ATALK is not set
  7002. -
  7003. -#
  7004. -# Appletalk devices
  7005. -#
  7006. -# CONFIG_DEV_APPLETALK is not set
  7007. # CONFIG_DECNET is not set
  7008. # CONFIG_BRIDGE is not set
  7009. # CONFIG_X25 is not set
  7010. @@ -319,9 +314,11 @@
  7011. # CONFIG_SCSI_MEGARAID is not set
  7012. # CONFIG_SCSI_MEGARAID2 is not set
  7013. # CONFIG_SCSI_SATA is not set
  7014. +# CONFIG_SCSI_SATA_AHCI is not set
  7015. # CONFIG_SCSI_SATA_SVW is not set
  7016. # CONFIG_SCSI_ATA_PIIX is not set
  7017. # CONFIG_SCSI_SATA_NV is not set
  7018. +# CONFIG_SCSI_SATA_QSTOR is not set
  7019. # CONFIG_SCSI_SATA_PROMISE is not set
  7020. # CONFIG_SCSI_SATA_SX4 is not set
  7021. # CONFIG_SCSI_SATA_SIL is not set
  7022. @@ -465,7 +462,6 @@
  7023. # CONFIG_SERIAL is not set
  7024. # CONFIG_SERIAL_EXTENDED is not set
  7025. # CONFIG_SERIAL_NONSTANDARD is not set
  7026. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7027. CONFIG_UNIX98_PTYS=y
  7028. CONFIG_UNIX98_PTY_COUNT=256
  7029. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-it8172 linux-2.4.32-rc1.mips/arch/mips/defconfig-it8172
  7030. --- linux-2.4.32-rc1/arch/mips/defconfig-it8172 2005-01-19 15:09:28.000000000 +0100
  7031. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-it8172 2005-03-18 13:13:21.000000000 +0100
  7032. @@ -30,8 +30,8 @@
  7033. # CONFIG_MIPS_PB1000 is not set
  7034. # CONFIG_MIPS_PB1100 is not set
  7035. # CONFIG_MIPS_PB1500 is not set
  7036. -# CONFIG_MIPS_HYDROGEN3 is not set
  7037. # CONFIG_MIPS_PB1550 is not set
  7038. +# CONFIG_MIPS_HYDROGEN3 is not set
  7039. # CONFIG_MIPS_XXS1500 is not set
  7040. # CONFIG_MIPS_MTX1 is not set
  7041. # CONFIG_COGENT_CSB250 is not set
  7042. @@ -186,8 +186,8 @@
  7043. # Mapping drivers for chip access
  7044. #
  7045. CONFIG_MTD_PHYSMAP=y
  7046. -CONFIG_MTD_PHYSMAP_START=8000000
  7047. -CONFIG_MTD_PHYSMAP_LEN=2000000
  7048. +CONFIG_MTD_PHYSMAP_START=0x8000000
  7049. +CONFIG_MTD_PHYSMAP_LEN=0x2000000
  7050. CONFIG_MTD_PHYSMAP_BUSWIDTH=4
  7051. # CONFIG_MTD_PB1000 is not set
  7052. # CONFIG_MTD_PB1500 is not set
  7053. @@ -195,9 +195,7 @@
  7054. # CONFIG_MTD_BOSPORUS is not set
  7055. # CONFIG_MTD_XXS1500 is not set
  7056. # CONFIG_MTD_MTX1 is not set
  7057. -# CONFIG_MTD_DB1X00 is not set
  7058. # CONFIG_MTD_PB1550 is not set
  7059. -# CONFIG_MTD_HYDROGEN3 is not set
  7060. # CONFIG_MTD_MIRAGE is not set
  7061. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  7062. # CONFIG_MTD_OCELOT is not set
  7063. @@ -216,7 +214,6 @@
  7064. #
  7065. # Disk-On-Chip Device Drivers
  7066. #
  7067. -# CONFIG_MTD_DOC1000 is not set
  7068. # CONFIG_MTD_DOC2000 is not set
  7069. # CONFIG_MTD_DOC2001 is not set
  7070. # CONFIG_MTD_DOCPROBE is not set
  7071. @@ -304,11 +301,6 @@
  7072. #
  7073. # CONFIG_IPX is not set
  7074. # CONFIG_ATALK is not set
  7075. -
  7076. -#
  7077. -# Appletalk devices
  7078. -#
  7079. -# CONFIG_DEV_APPLETALK is not set
  7080. # CONFIG_DECNET is not set
  7081. # CONFIG_BRIDGE is not set
  7082. # CONFIG_X25 is not set
  7083. @@ -592,7 +584,6 @@
  7084. CONFIG_PC_KEYB=y
  7085. # CONFIG_IT8172_SCR0 is not set
  7086. # CONFIG_IT8172_SCR1 is not set
  7087. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7088. CONFIG_UNIX98_PTYS=y
  7089. CONFIG_UNIX98_PTY_COUNT=256
  7090. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-ivr linux-2.4.32-rc1.mips/arch/mips/defconfig-ivr
  7091. --- linux-2.4.32-rc1/arch/mips/defconfig-ivr 2005-01-19 15:09:28.000000000 +0100
  7092. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-ivr 2005-03-18 13:13:21.000000000 +0100
  7093. @@ -30,8 +30,8 @@
  7094. # CONFIG_MIPS_PB1000 is not set
  7095. # CONFIG_MIPS_PB1100 is not set
  7096. # CONFIG_MIPS_PB1500 is not set
  7097. -# CONFIG_MIPS_HYDROGEN3 is not set
  7098. # CONFIG_MIPS_PB1550 is not set
  7099. +# CONFIG_MIPS_HYDROGEN3 is not set
  7100. # CONFIG_MIPS_XXS1500 is not set
  7101. # CONFIG_MIPS_MTX1 is not set
  7102. # CONFIG_COGENT_CSB250 is not set
  7103. @@ -226,11 +226,6 @@
  7104. #
  7105. # CONFIG_IPX is not set
  7106. # CONFIG_ATALK is not set
  7107. -
  7108. -#
  7109. -# Appletalk devices
  7110. -#
  7111. -# CONFIG_DEV_APPLETALK is not set
  7112. # CONFIG_DECNET is not set
  7113. # CONFIG_BRIDGE is not set
  7114. # CONFIG_X25 is not set
  7115. @@ -516,7 +511,6 @@
  7116. CONFIG_QTRONIX_KEYBOARD=y
  7117. CONFIG_IT8172_CIR=y
  7118. # CONFIG_IT8172_SCR0 is not set
  7119. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7120. CONFIG_UNIX98_PTYS=y
  7121. CONFIG_UNIX98_PTY_COUNT=256
  7122. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-jmr3927 linux-2.4.32-rc1.mips/arch/mips/defconfig-jmr3927
  7123. --- linux-2.4.32-rc1/arch/mips/defconfig-jmr3927 2005-01-19 15:09:28.000000000 +0100
  7124. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-jmr3927 2005-03-18 13:13:21.000000000 +0100
  7125. @@ -28,8 +28,8 @@
  7126. # CONFIG_MIPS_PB1000 is not set
  7127. # CONFIG_MIPS_PB1100 is not set
  7128. # CONFIG_MIPS_PB1500 is not set
  7129. -# CONFIG_MIPS_HYDROGEN3 is not set
  7130. # CONFIG_MIPS_PB1550 is not set
  7131. +# CONFIG_MIPS_HYDROGEN3 is not set
  7132. # CONFIG_MIPS_XXS1500 is not set
  7133. # CONFIG_MIPS_MTX1 is not set
  7134. # CONFIG_COGENT_CSB250 is not set
  7135. @@ -225,11 +225,6 @@
  7136. #
  7137. # CONFIG_IPX is not set
  7138. # CONFIG_ATALK is not set
  7139. -
  7140. -#
  7141. -# Appletalk devices
  7142. -#
  7143. -# CONFIG_DEV_APPLETALK is not set
  7144. # CONFIG_DECNET is not set
  7145. # CONFIG_BRIDGE is not set
  7146. # CONFIG_X25 is not set
  7147. @@ -454,7 +449,6 @@
  7148. # CONFIG_SERIAL_TXX9_CONSOLE is not set
  7149. CONFIG_TXX927_SERIAL=y
  7150. CONFIG_TXX927_SERIAL_CONSOLE=y
  7151. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7152. # CONFIG_UNIX98_PTYS is not set
  7153. #
  7154. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-lasat linux-2.4.32-rc1.mips/arch/mips/defconfig-lasat
  7155. --- linux-2.4.32-rc1/arch/mips/defconfig-lasat 2005-01-19 15:09:28.000000000 +0100
  7156. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-lasat 2005-03-18 13:13:21.000000000 +0100
  7157. @@ -30,8 +30,8 @@
  7158. # CONFIG_MIPS_PB1000 is not set
  7159. # CONFIG_MIPS_PB1100 is not set
  7160. # CONFIG_MIPS_PB1500 is not set
  7161. -# CONFIG_MIPS_HYDROGEN3 is not set
  7162. # CONFIG_MIPS_PB1550 is not set
  7163. +# CONFIG_MIPS_HYDROGEN3 is not set
  7164. # CONFIG_MIPS_XXS1500 is not set
  7165. # CONFIG_MIPS_MTX1 is not set
  7166. # CONFIG_COGENT_CSB250 is not set
  7167. @@ -198,9 +198,7 @@
  7168. # CONFIG_MTD_BOSPORUS is not set
  7169. # CONFIG_MTD_XXS1500 is not set
  7170. # CONFIG_MTD_MTX1 is not set
  7171. -# CONFIG_MTD_DB1X00 is not set
  7172. # CONFIG_MTD_PB1550 is not set
  7173. -# CONFIG_MTD_HYDROGEN3 is not set
  7174. # CONFIG_MTD_MIRAGE is not set
  7175. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  7176. # CONFIG_MTD_OCELOT is not set
  7177. @@ -219,7 +217,6 @@
  7178. #
  7179. # Disk-On-Chip Device Drivers
  7180. #
  7181. -# CONFIG_MTD_DOC1000 is not set
  7182. # CONFIG_MTD_DOC2000 is not set
  7183. # CONFIG_MTD_DOC2001 is not set
  7184. # CONFIG_MTD_DOCPROBE is not set
  7185. @@ -303,11 +300,6 @@
  7186. #
  7187. # CONFIG_IPX is not set
  7188. # CONFIG_ATALK is not set
  7189. -
  7190. -#
  7191. -# Appletalk devices
  7192. -#
  7193. -# CONFIG_DEV_APPLETALK is not set
  7194. # CONFIG_DECNET is not set
  7195. # CONFIG_BRIDGE is not set
  7196. # CONFIG_X25 is not set
  7197. @@ -584,7 +576,6 @@
  7198. CONFIG_SERIAL_CONSOLE=y
  7199. # CONFIG_SERIAL_EXTENDED is not set
  7200. # CONFIG_SERIAL_NONSTANDARD is not set
  7201. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7202. CONFIG_UNIX98_PTYS=y
  7203. CONFIG_UNIX98_PTY_COUNT=256
  7204. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-malta linux-2.4.32-rc1.mips/arch/mips/defconfig-malta
  7205. --- linux-2.4.32-rc1/arch/mips/defconfig-malta 2005-01-19 15:09:28.000000000 +0100
  7206. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-malta 2005-04-19 14:19:34.000000000 +0200
  7207. @@ -22,16 +22,19 @@
  7208. #
  7209. # CONFIG_ACER_PICA_61 is not set
  7210. # CONFIG_MIPS_BOSPORUS is not set
  7211. +# CONFIG_MIPS_FICMMP is not set
  7212. # CONFIG_MIPS_MIRAGE is not set
  7213. # CONFIG_MIPS_DB1000 is not set
  7214. # CONFIG_MIPS_DB1100 is not set
  7215. # CONFIG_MIPS_DB1500 is not set
  7216. # CONFIG_MIPS_DB1550 is not set
  7217. +# CONFIG_MIPS_DB1200 is not set
  7218. # CONFIG_MIPS_PB1000 is not set
  7219. # CONFIG_MIPS_PB1100 is not set
  7220. # CONFIG_MIPS_PB1500 is not set
  7221. -# CONFIG_MIPS_HYDROGEN3 is not set
  7222. # CONFIG_MIPS_PB1550 is not set
  7223. +# CONFIG_MIPS_PB1200 is not set
  7224. +# CONFIG_MIPS_HYDROGEN3 is not set
  7225. # CONFIG_MIPS_XXS1500 is not set
  7226. # CONFIG_MIPS_MTX1 is not set
  7227. # CONFIG_COGENT_CSB250 is not set
  7228. @@ -237,11 +240,6 @@
  7229. #
  7230. # CONFIG_IPX is not set
  7231. # CONFIG_ATALK is not set
  7232. -
  7233. -#
  7234. -# Appletalk devices
  7235. -#
  7236. -# CONFIG_DEV_APPLETALK is not set
  7237. # CONFIG_DECNET is not set
  7238. # CONFIG_BRIDGE is not set
  7239. # CONFIG_X25 is not set
  7240. @@ -273,8 +271,83 @@
  7241. #
  7242. # ATA/IDE/MFM/RLL support
  7243. #
  7244. -# CONFIG_IDE is not set
  7245. +CONFIG_IDE=y
  7246. +
  7247. +#
  7248. +# IDE, ATA and ATAPI Block devices
  7249. +#
  7250. +CONFIG_BLK_DEV_IDE=y
  7251. +
  7252. +#
  7253. +# Please see Documentation/ide.txt for help/info on IDE drives
  7254. +#
  7255. +# CONFIG_BLK_DEV_HD_IDE is not set
  7256. # CONFIG_BLK_DEV_HD is not set
  7257. +# CONFIG_BLK_DEV_IDE_SATA is not set
  7258. +CONFIG_BLK_DEV_IDEDISK=y
  7259. +# CONFIG_IDEDISK_MULTI_MODE is not set
  7260. +# CONFIG_IDEDISK_STROKE is not set
  7261. +# CONFIG_BLK_DEV_IDECS is not set
  7262. +# CONFIG_BLK_DEV_DELKIN is not set
  7263. +CONFIG_BLK_DEV_IDECD=y
  7264. +CONFIG_BLK_DEV_IDETAPE=y
  7265. +CONFIG_BLK_DEV_IDEFLOPPY=y
  7266. +CONFIG_BLK_DEV_IDESCSI=y
  7267. +# CONFIG_IDE_TASK_IOCTL is not set
  7268. +
  7269. +#
  7270. +# IDE chipset support/bugfixes
  7271. +#
  7272. +# CONFIG_BLK_DEV_CMD640 is not set
  7273. +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
  7274. +# CONFIG_BLK_DEV_ISAPNP is not set
  7275. +CONFIG_BLK_DEV_IDEPCI=y
  7276. +CONFIG_BLK_DEV_GENERIC=y
  7277. +CONFIG_IDEPCI_SHARE_IRQ=y
  7278. +CONFIG_BLK_DEV_IDEDMA_PCI=y
  7279. +# CONFIG_BLK_DEV_OFFBOARD is not set
  7280. +CONFIG_BLK_DEV_IDEDMA_FORCED=y
  7281. +CONFIG_IDEDMA_PCI_AUTO=y
  7282. +# CONFIG_IDEDMA_ONLYDISK is not set
  7283. +CONFIG_BLK_DEV_IDEDMA=y
  7284. +# CONFIG_IDEDMA_PCI_WIP is not set
  7285. +# CONFIG_BLK_DEV_ADMA100 is not set
  7286. +# CONFIG_BLK_DEV_AEC62XX is not set
  7287. +# CONFIG_BLK_DEV_ALI15X3 is not set
  7288. +# CONFIG_WDC_ALI15X3 is not set
  7289. +# CONFIG_BLK_DEV_AMD74XX is not set
  7290. +# CONFIG_AMD74XX_OVERRIDE is not set
  7291. +# CONFIG_BLK_DEV_ATIIXP is not set
  7292. +# CONFIG_BLK_DEV_CMD64X is not set
  7293. +# CONFIG_BLK_DEV_TRIFLEX is not set
  7294. +# CONFIG_BLK_DEV_CY82C693 is not set
  7295. +# CONFIG_BLK_DEV_CS5530 is not set
  7296. +# CONFIG_BLK_DEV_HPT34X is not set
  7297. +# CONFIG_HPT34X_AUTODMA is not set
  7298. +# CONFIG_BLK_DEV_HPT366 is not set
  7299. +CONFIG_BLK_DEV_PIIX=y
  7300. +# CONFIG_BLK_DEV_NS87415 is not set
  7301. +# CONFIG_BLK_DEV_OPTI621 is not set
  7302. +# CONFIG_BLK_DEV_PDC202XX_OLD is not set
  7303. +# CONFIG_PDC202XX_BURST is not set
  7304. +# CONFIG_BLK_DEV_PDC202XX_NEW is not set
  7305. +# CONFIG_BLK_DEV_RZ1000 is not set
  7306. +# CONFIG_BLK_DEV_SC1200 is not set
  7307. +# CONFIG_BLK_DEV_SVWKS is not set
  7308. +# CONFIG_BLK_DEV_SIIMAGE is not set
  7309. +# CONFIG_BLK_DEV_SIS5513 is not set
  7310. +# CONFIG_BLK_DEV_SLC90E66 is not set
  7311. +# CONFIG_BLK_DEV_TRM290 is not set
  7312. +# CONFIG_BLK_DEV_VIA82CXXX is not set
  7313. +# CONFIG_IDE_CHIPSETS is not set
  7314. +CONFIG_IDEDMA_AUTO=y
  7315. +# CONFIG_IDEDMA_IVB is not set
  7316. +# CONFIG_DMA_NONPCI is not set
  7317. +# CONFIG_BLK_DEV_ATARAID is not set
  7318. +# CONFIG_BLK_DEV_ATARAID_PDC is not set
  7319. +# CONFIG_BLK_DEV_ATARAID_HPT is not set
  7320. +# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
  7321. +# CONFIG_BLK_DEV_ATARAID_SII is not set
  7322. #
  7323. # SCSI support
  7324. @@ -319,9 +392,11 @@
  7325. # CONFIG_SCSI_MEGARAID is not set
  7326. # CONFIG_SCSI_MEGARAID2 is not set
  7327. # CONFIG_SCSI_SATA is not set
  7328. +# CONFIG_SCSI_SATA_AHCI is not set
  7329. # CONFIG_SCSI_SATA_SVW is not set
  7330. # CONFIG_SCSI_ATA_PIIX is not set
  7331. # CONFIG_SCSI_SATA_NV is not set
  7332. +# CONFIG_SCSI_SATA_QSTOR is not set
  7333. # CONFIG_SCSI_SATA_PROMISE is not set
  7334. # CONFIG_SCSI_SATA_SX4 is not set
  7335. # CONFIG_SCSI_SATA_SIL is not set
  7336. @@ -524,7 +599,6 @@
  7337. CONFIG_SERIAL_CONSOLE=y
  7338. # CONFIG_SERIAL_EXTENDED is not set
  7339. # CONFIG_SERIAL_NONSTANDARD is not set
  7340. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7341. CONFIG_UNIX98_PTYS=y
  7342. CONFIG_UNIX98_PTY_COUNT=256
  7343. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-mirage linux-2.4.32-rc1.mips/arch/mips/defconfig-mirage
  7344. --- linux-2.4.32-rc1/arch/mips/defconfig-mirage 2005-01-19 15:09:28.000000000 +0100
  7345. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-mirage 2005-03-18 13:13:21.000000000 +0100
  7346. @@ -30,8 +30,8 @@
  7347. # CONFIG_MIPS_PB1000 is not set
  7348. # CONFIG_MIPS_PB1100 is not set
  7349. # CONFIG_MIPS_PB1500 is not set
  7350. -# CONFIG_MIPS_HYDROGEN3 is not set
  7351. # CONFIG_MIPS_PB1550 is not set
  7352. +# CONFIG_MIPS_HYDROGEN3 is not set
  7353. # CONFIG_MIPS_XXS1500 is not set
  7354. # CONFIG_MIPS_MTX1 is not set
  7355. # CONFIG_COGENT_CSB250 is not set
  7356. @@ -209,9 +209,7 @@
  7357. # CONFIG_MTD_BOSPORUS is not set
  7358. # CONFIG_MTD_XXS1500 is not set
  7359. # CONFIG_MTD_MTX1 is not set
  7360. -# CONFIG_MTD_DB1X00 is not set
  7361. # CONFIG_MTD_PB1550 is not set
  7362. -# CONFIG_MTD_HYDROGEN3 is not set
  7363. CONFIG_MTD_MIRAGE=y
  7364. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  7365. # CONFIG_MTD_OCELOT is not set
  7366. @@ -230,7 +228,6 @@
  7367. #
  7368. # Disk-On-Chip Device Drivers
  7369. #
  7370. -# CONFIG_MTD_DOC1000 is not set
  7371. # CONFIG_MTD_DOC2000 is not set
  7372. # CONFIG_MTD_DOC2001 is not set
  7373. # CONFIG_MTD_DOCPROBE is not set
  7374. @@ -335,11 +332,6 @@
  7375. #
  7376. # CONFIG_IPX is not set
  7377. # CONFIG_ATALK is not set
  7378. -
  7379. -#
  7380. -# Appletalk devices
  7381. -#
  7382. -# CONFIG_DEV_APPLETALK is not set
  7383. # CONFIG_DECNET is not set
  7384. # CONFIG_BRIDGE is not set
  7385. # CONFIG_X25 is not set
  7386. @@ -560,7 +552,6 @@
  7387. # CONFIG_AU1X00_USB_TTY is not set
  7388. # CONFIG_AU1X00_USB_RAW is not set
  7389. # CONFIG_TXX927_SERIAL is not set
  7390. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7391. CONFIG_UNIX98_PTYS=y
  7392. CONFIG_UNIX98_PTY_COUNT=256
  7393. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-mpc30x linux-2.4.32-rc1.mips/arch/mips/defconfig-mpc30x
  7394. --- linux-2.4.32-rc1/arch/mips/defconfig-mpc30x 2005-01-19 15:09:28.000000000 +0100
  7395. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-mpc30x 2005-03-18 13:13:21.000000000 +0100
  7396. @@ -30,8 +30,8 @@
  7397. # CONFIG_MIPS_PB1000 is not set
  7398. # CONFIG_MIPS_PB1100 is not set
  7399. # CONFIG_MIPS_PB1500 is not set
  7400. -# CONFIG_MIPS_HYDROGEN3 is not set
  7401. # CONFIG_MIPS_PB1550 is not set
  7402. +# CONFIG_MIPS_HYDROGEN3 is not set
  7403. # CONFIG_MIPS_XXS1500 is not set
  7404. # CONFIG_MIPS_MTX1 is not set
  7405. # CONFIG_COGENT_CSB250 is not set
  7406. @@ -228,11 +228,6 @@
  7407. #
  7408. # CONFIG_IPX is not set
  7409. # CONFIG_ATALK is not set
  7410. -
  7411. -#
  7412. -# Appletalk devices
  7413. -#
  7414. -# CONFIG_DEV_APPLETALK is not set
  7415. # CONFIG_DECNET is not set
  7416. # CONFIG_BRIDGE is not set
  7417. # CONFIG_X25 is not set
  7418. @@ -400,7 +395,6 @@
  7419. CONFIG_SERIAL_CONSOLE=y
  7420. # CONFIG_SERIAL_EXTENDED is not set
  7421. # CONFIG_SERIAL_NONSTANDARD is not set
  7422. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7423. # CONFIG_VR41XX_KIU is not set
  7424. CONFIG_UNIX98_PTYS=y
  7425. CONFIG_UNIX98_PTY_COUNT=256
  7426. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-mtx-1 linux-2.4.32-rc1.mips/arch/mips/defconfig-mtx-1
  7427. --- linux-2.4.32-rc1/arch/mips/defconfig-mtx-1 2005-01-19 15:09:28.000000000 +0100
  7428. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-mtx-1 2005-03-18 13:13:21.000000000 +0100
  7429. @@ -30,8 +30,8 @@
  7430. # CONFIG_MIPS_PB1000 is not set
  7431. # CONFIG_MIPS_PB1100 is not set
  7432. # CONFIG_MIPS_PB1500 is not set
  7433. -# CONFIG_MIPS_HYDROGEN3 is not set
  7434. # CONFIG_MIPS_PB1550 is not set
  7435. +# CONFIG_MIPS_HYDROGEN3 is not set
  7436. # CONFIG_MIPS_XXS1500 is not set
  7437. CONFIG_MIPS_MTX1=y
  7438. # CONFIG_COGENT_CSB250 is not set
  7439. @@ -193,9 +193,7 @@
  7440. # CONFIG_MTD_BOSPORUS is not set
  7441. # CONFIG_MTD_XXS1500 is not set
  7442. CONFIG_MTD_MTX1=y
  7443. -# CONFIG_MTD_DB1X00 is not set
  7444. # CONFIG_MTD_PB1550 is not set
  7445. -# CONFIG_MTD_HYDROGEN3 is not set
  7446. # CONFIG_MTD_MIRAGE is not set
  7447. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  7448. # CONFIG_MTD_OCELOT is not set
  7449. @@ -214,7 +212,6 @@
  7450. #
  7451. # Disk-On-Chip Device Drivers
  7452. #
  7453. -# CONFIG_MTD_DOC1000 is not set
  7454. # CONFIG_MTD_DOC2000 is not set
  7455. # CONFIG_MTD_DOC2001 is not set
  7456. # CONFIG_MTD_DOCPROBE is not set
  7457. @@ -371,11 +368,6 @@
  7458. #
  7459. # CONFIG_IPX is not set
  7460. # CONFIG_ATALK is not set
  7461. -
  7462. -#
  7463. -# Appletalk devices
  7464. -#
  7465. -# CONFIG_DEV_APPLETALK is not set
  7466. # CONFIG_DECNET is not set
  7467. CONFIG_BRIDGE=m
  7468. # CONFIG_X25 is not set
  7469. @@ -479,9 +471,11 @@
  7470. # CONFIG_SCSI_MEGARAID is not set
  7471. # CONFIG_SCSI_MEGARAID2 is not set
  7472. # CONFIG_SCSI_SATA is not set
  7473. +# CONFIG_SCSI_SATA_AHCI is not set
  7474. # CONFIG_SCSI_SATA_SVW is not set
  7475. # CONFIG_SCSI_ATA_PIIX is not set
  7476. # CONFIG_SCSI_SATA_NV is not set
  7477. +# CONFIG_SCSI_SATA_QSTOR is not set
  7478. # CONFIG_SCSI_SATA_PROMISE is not set
  7479. # CONFIG_SCSI_SATA_SX4 is not set
  7480. # CONFIG_SCSI_SATA_SIL is not set
  7481. @@ -700,7 +694,6 @@
  7482. # CONFIG_AU1X00_USB_TTY is not set
  7483. # CONFIG_AU1X00_USB_RAW is not set
  7484. # CONFIG_TXX927_SERIAL is not set
  7485. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7486. CONFIG_UNIX98_PTYS=y
  7487. CONFIG_UNIX98_PTY_COUNT=256
  7488. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-nino linux-2.4.32-rc1.mips/arch/mips/defconfig-nino
  7489. --- linux-2.4.32-rc1/arch/mips/defconfig-nino 2005-01-19 15:09:28.000000000 +0100
  7490. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-nino 2005-03-18 13:13:21.000000000 +0100
  7491. @@ -30,8 +30,8 @@
  7492. # CONFIG_MIPS_PB1000 is not set
  7493. # CONFIG_MIPS_PB1100 is not set
  7494. # CONFIG_MIPS_PB1500 is not set
  7495. -# CONFIG_MIPS_HYDROGEN3 is not set
  7496. # CONFIG_MIPS_PB1550 is not set
  7497. +# CONFIG_MIPS_HYDROGEN3 is not set
  7498. # CONFIG_MIPS_XXS1500 is not set
  7499. # CONFIG_MIPS_MTX1 is not set
  7500. # CONFIG_COGENT_CSB250 is not set
  7501. @@ -226,11 +226,6 @@
  7502. #
  7503. # CONFIG_IPX is not set
  7504. # CONFIG_ATALK is not set
  7505. -
  7506. -#
  7507. -# Appletalk devices
  7508. -#
  7509. -# CONFIG_DEV_APPLETALK is not set
  7510. # CONFIG_DECNET is not set
  7511. # CONFIG_BRIDGE is not set
  7512. # CONFIG_X25 is not set
  7513. @@ -339,7 +334,6 @@
  7514. # CONFIG_SERIAL_TXX9 is not set
  7515. # CONFIG_SERIAL_TXX9_CONSOLE is not set
  7516. # CONFIG_TXX927_SERIAL is not set
  7517. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7518. # CONFIG_UNIX98_PTYS is not set
  7519. #
  7520. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-ocelot linux-2.4.32-rc1.mips/arch/mips/defconfig-ocelot
  7521. --- linux-2.4.32-rc1/arch/mips/defconfig-ocelot 2005-01-19 15:09:28.000000000 +0100
  7522. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-ocelot 2005-03-18 13:13:21.000000000 +0100
  7523. @@ -28,8 +28,8 @@
  7524. # CONFIG_MIPS_PB1000 is not set
  7525. # CONFIG_MIPS_PB1100 is not set
  7526. # CONFIG_MIPS_PB1500 is not set
  7527. -# CONFIG_MIPS_HYDROGEN3 is not set
  7528. # CONFIG_MIPS_PB1550 is not set
  7529. +# CONFIG_MIPS_HYDROGEN3 is not set
  7530. # CONFIG_MIPS_XXS1500 is not set
  7531. # CONFIG_MIPS_MTX1 is not set
  7532. # CONFIG_COGENT_CSB250 is not set
  7533. @@ -194,9 +194,7 @@
  7534. # CONFIG_MTD_BOSPORUS is not set
  7535. # CONFIG_MTD_XXS1500 is not set
  7536. # CONFIG_MTD_MTX1 is not set
  7537. -# CONFIG_MTD_DB1X00 is not set
  7538. # CONFIG_MTD_PB1550 is not set
  7539. -# CONFIG_MTD_HYDROGEN3 is not set
  7540. # CONFIG_MTD_MIRAGE is not set
  7541. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  7542. CONFIG_MTD_OCELOT=y
  7543. @@ -215,7 +213,6 @@
  7544. #
  7545. # Disk-On-Chip Device Drivers
  7546. #
  7547. -# CONFIG_MTD_DOC1000 is not set
  7548. CONFIG_MTD_DOC2000=y
  7549. # CONFIG_MTD_DOC2001 is not set
  7550. CONFIG_MTD_DOCPROBE=y
  7551. @@ -307,11 +304,6 @@
  7552. #
  7553. # CONFIG_IPX is not set
  7554. # CONFIG_ATALK is not set
  7555. -
  7556. -#
  7557. -# Appletalk devices
  7558. -#
  7559. -# CONFIG_DEV_APPLETALK is not set
  7560. # CONFIG_DECNET is not set
  7561. # CONFIG_BRIDGE is not set
  7562. # CONFIG_X25 is not set
  7563. @@ -513,7 +505,6 @@
  7564. CONFIG_SERIAL_CONSOLE=y
  7565. # CONFIG_SERIAL_EXTENDED is not set
  7566. # CONFIG_SERIAL_NONSTANDARD is not set
  7567. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7568. CONFIG_UNIX98_PTYS=y
  7569. CONFIG_UNIX98_PTY_COUNT=256
  7570. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-osprey linux-2.4.32-rc1.mips/arch/mips/defconfig-osprey
  7571. --- linux-2.4.32-rc1/arch/mips/defconfig-osprey 2005-01-19 15:09:28.000000000 +0100
  7572. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-osprey 2005-03-18 13:13:21.000000000 +0100
  7573. @@ -30,8 +30,8 @@
  7574. # CONFIG_MIPS_PB1000 is not set
  7575. # CONFIG_MIPS_PB1100 is not set
  7576. # CONFIG_MIPS_PB1500 is not set
  7577. -# CONFIG_MIPS_HYDROGEN3 is not set
  7578. # CONFIG_MIPS_PB1550 is not set
  7579. +# CONFIG_MIPS_HYDROGEN3 is not set
  7580. # CONFIG_MIPS_XXS1500 is not set
  7581. # CONFIG_MIPS_MTX1 is not set
  7582. # CONFIG_COGENT_CSB250 is not set
  7583. @@ -227,11 +227,6 @@
  7584. #
  7585. # CONFIG_IPX is not set
  7586. # CONFIG_ATALK is not set
  7587. -
  7588. -#
  7589. -# Appletalk devices
  7590. -#
  7591. -# CONFIG_DEV_APPLETALK is not set
  7592. # CONFIG_DECNET is not set
  7593. # CONFIG_BRIDGE is not set
  7594. # CONFIG_X25 is not set
  7595. @@ -388,7 +383,6 @@
  7596. # CONFIG_SERIAL_MULTIPORT is not set
  7597. # CONFIG_HUB6 is not set
  7598. # CONFIG_SERIAL_NONSTANDARD is not set
  7599. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7600. # CONFIG_VR41XX_KIU is not set
  7601. CONFIG_UNIX98_PTYS=y
  7602. CONFIG_UNIX98_PTY_COUNT=256
  7603. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-pb1000 linux-2.4.32-rc1.mips/arch/mips/defconfig-pb1000
  7604. --- linux-2.4.32-rc1/arch/mips/defconfig-pb1000 2005-01-19 15:09:28.000000000 +0100
  7605. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-pb1000 2005-03-18 13:13:21.000000000 +0100
  7606. @@ -30,8 +30,8 @@
  7607. CONFIG_MIPS_PB1000=y
  7608. # CONFIG_MIPS_PB1100 is not set
  7609. # CONFIG_MIPS_PB1500 is not set
  7610. -# CONFIG_MIPS_HYDROGEN3 is not set
  7611. # CONFIG_MIPS_PB1550 is not set
  7612. +# CONFIG_MIPS_HYDROGEN3 is not set
  7613. # CONFIG_MIPS_XXS1500 is not set
  7614. # CONFIG_MIPS_MTX1 is not set
  7615. # CONFIG_COGENT_CSB250 is not set
  7616. @@ -215,9 +215,7 @@
  7617. # CONFIG_MTD_BOSPORUS is not set
  7618. # CONFIG_MTD_XXS1500 is not set
  7619. # CONFIG_MTD_MTX1 is not set
  7620. -# CONFIG_MTD_DB1X00 is not set
  7621. # CONFIG_MTD_PB1550 is not set
  7622. -# CONFIG_MTD_HYDROGEN3 is not set
  7623. # CONFIG_MTD_MIRAGE is not set
  7624. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  7625. # CONFIG_MTD_OCELOT is not set
  7626. @@ -236,7 +234,6 @@
  7627. #
  7628. # Disk-On-Chip Device Drivers
  7629. #
  7630. -# CONFIG_MTD_DOC1000 is not set
  7631. # CONFIG_MTD_DOC2000 is not set
  7632. # CONFIG_MTD_DOC2001 is not set
  7633. # CONFIG_MTD_DOCPROBE is not set
  7634. @@ -324,11 +321,6 @@
  7635. #
  7636. # CONFIG_IPX is not set
  7637. # CONFIG_ATALK is not set
  7638. -
  7639. -#
  7640. -# Appletalk devices
  7641. -#
  7642. -# CONFIG_DEV_APPLETALK is not set
  7643. # CONFIG_DECNET is not set
  7644. # CONFIG_BRIDGE is not set
  7645. # CONFIG_X25 is not set
  7646. @@ -622,7 +614,6 @@
  7647. # CONFIG_AU1X00_USB_TTY is not set
  7648. # CONFIG_AU1X00_USB_RAW is not set
  7649. # CONFIG_TXX927_SERIAL is not set
  7650. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7651. CONFIG_UNIX98_PTYS=y
  7652. CONFIG_UNIX98_PTY_COUNT=256
  7653. @@ -707,7 +698,7 @@
  7654. #
  7655. # CONFIG_PCMCIA_SERIAL_CS is not set
  7656. # CONFIG_SYNCLINK_CS is not set
  7657. -CONFIG_AU1X00_GPIO=m
  7658. +CONFIG_AU1X00_GPIO=y
  7659. # CONFIG_TS_AU1X00_ADS7846 is not set
  7660. #
  7661. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-pb1100 linux-2.4.32-rc1.mips/arch/mips/defconfig-pb1100
  7662. --- linux-2.4.32-rc1/arch/mips/defconfig-pb1100 2005-01-19 15:09:28.000000000 +0100
  7663. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-pb1100 2005-03-18 13:13:21.000000000 +0100
  7664. @@ -30,8 +30,8 @@
  7665. # CONFIG_MIPS_PB1000 is not set
  7666. CONFIG_MIPS_PB1100=y
  7667. # CONFIG_MIPS_PB1500 is not set
  7668. -# CONFIG_MIPS_HYDROGEN3 is not set
  7669. # CONFIG_MIPS_PB1550 is not set
  7670. +# CONFIG_MIPS_HYDROGEN3 is not set
  7671. # CONFIG_MIPS_XXS1500 is not set
  7672. # CONFIG_MIPS_MTX1 is not set
  7673. # CONFIG_COGENT_CSB250 is not set
  7674. @@ -198,9 +198,7 @@
  7675. # CONFIG_MTD_MTX1 is not set
  7676. CONFIG_MTD_PB1500_BOOT=y
  7677. CONFIG_MTD_PB1500_USER=y
  7678. -# CONFIG_MTD_DB1X00 is not set
  7679. # CONFIG_MTD_PB1550 is not set
  7680. -# CONFIG_MTD_HYDROGEN3 is not set
  7681. # CONFIG_MTD_MIRAGE is not set
  7682. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  7683. # CONFIG_MTD_OCELOT is not set
  7684. @@ -219,7 +217,6 @@
  7685. #
  7686. # Disk-On-Chip Device Drivers
  7687. #
  7688. -# CONFIG_MTD_DOC1000 is not set
  7689. # CONFIG_MTD_DOC2000 is not set
  7690. # CONFIG_MTD_DOC2001 is not set
  7691. # CONFIG_MTD_DOCPROBE is not set
  7692. @@ -324,11 +321,6 @@
  7693. #
  7694. # CONFIG_IPX is not set
  7695. # CONFIG_ATALK is not set
  7696. -
  7697. -#
  7698. -# Appletalk devices
  7699. -#
  7700. -# CONFIG_DEV_APPLETALK is not set
  7701. # CONFIG_DECNET is not set
  7702. # CONFIG_BRIDGE is not set
  7703. # CONFIG_X25 is not set
  7704. @@ -613,7 +605,6 @@
  7705. # CONFIG_AU1X00_USB_TTY is not set
  7706. # CONFIG_AU1X00_USB_RAW is not set
  7707. # CONFIG_TXX927_SERIAL is not set
  7708. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  7709. CONFIG_UNIX98_PTYS=y
  7710. CONFIG_UNIX98_PTY_COUNT=256
  7711. @@ -859,6 +850,7 @@
  7712. # CONFIG_FB_PM2 is not set
  7713. # CONFIG_FB_PM3 is not set
  7714. # CONFIG_FB_CYBER2000 is not set
  7715. +CONFIG_FB_AU1100=y
  7716. # CONFIG_FB_MATROX is not set
  7717. # CONFIG_FB_ATY is not set
  7718. # CONFIG_FB_RADEON is not set
  7719. @@ -870,7 +862,6 @@
  7720. # CONFIG_FB_VOODOO1 is not set
  7721. # CONFIG_FB_TRIDENT is not set
  7722. # CONFIG_FB_E1356 is not set
  7723. -CONFIG_FB_AU1100=y
  7724. # CONFIG_FB_IT8181 is not set
  7725. # CONFIG_FB_VIRTUAL is not set
  7726. CONFIG_FBCON_ADVANCED=y
  7727. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-pb1200 linux-2.4.32-rc1.mips/arch/mips/defconfig-pb1200
  7728. --- linux-2.4.32-rc1/arch/mips/defconfig-pb1200 1970-01-01 01:00:00.000000000 +0100
  7729. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-pb1200 2005-03-18 13:13:21.000000000 +0100
  7730. @@ -0,0 +1,1060 @@
  7731. +#
  7732. +# Automatically generated make config: don't edit
  7733. +#
  7734. +CONFIG_MIPS=y
  7735. +CONFIG_MIPS32=y
  7736. +# CONFIG_MIPS64 is not set
  7737. +
  7738. +#
  7739. +# Code maturity level options
  7740. +#
  7741. +CONFIG_EXPERIMENTAL=y
  7742. +
  7743. +#
  7744. +# Loadable module support
  7745. +#
  7746. +CONFIG_MODULES=y
  7747. +# CONFIG_MODVERSIONS is not set
  7748. +CONFIG_KMOD=y
  7749. +
  7750. +#
  7751. +# Machine selection
  7752. +#
  7753. +# CONFIG_ACER_PICA_61 is not set
  7754. +# CONFIG_MIPS_BOSPORUS is not set
  7755. +# CONFIG_MIPS_MIRAGE is not set
  7756. +# CONFIG_MIPS_DB1000 is not set
  7757. +# CONFIG_MIPS_DB1100 is not set
  7758. +# CONFIG_MIPS_DB1500 is not set
  7759. +# CONFIG_MIPS_DB1550 is not set
  7760. +# CONFIG_MIPS_PB1000 is not set
  7761. +# CONFIG_MIPS_PB1100 is not set
  7762. +# CONFIG_MIPS_PB1500 is not set
  7763. +# CONFIG_MIPS_PB1550 is not set
  7764. +# CONFIG_MIPS_HYDROGEN3 is not set
  7765. +# CONFIG_MIPS_XXS1500 is not set
  7766. +# CONFIG_MIPS_MTX1 is not set
  7767. +# CONFIG_COGENT_CSB250 is not set
  7768. +# CONFIG_BAGET_MIPS is not set
  7769. +# CONFIG_CASIO_E55 is not set
  7770. +# CONFIG_MIPS_COBALT is not set
  7771. +# CONFIG_DECSTATION is not set
  7772. +# CONFIG_MIPS_EV64120 is not set
  7773. +# CONFIG_MIPS_EV96100 is not set
  7774. +# CONFIG_MIPS_IVR is not set
  7775. +# CONFIG_HP_LASERJET is not set
  7776. +# CONFIG_IBM_WORKPAD is not set
  7777. +# CONFIG_LASAT is not set
  7778. +# CONFIG_MIPS_ITE8172 is not set
  7779. +# CONFIG_MIPS_ATLAS is not set
  7780. +# CONFIG_MIPS_MAGNUM_4000 is not set
  7781. +# CONFIG_MIPS_MALTA is not set
  7782. +# CONFIG_MIPS_SEAD is not set
  7783. +# CONFIG_MOMENCO_OCELOT is not set
  7784. +# CONFIG_MOMENCO_OCELOT_G is not set
  7785. +# CONFIG_MOMENCO_OCELOT_C is not set
  7786. +# CONFIG_MOMENCO_JAGUAR_ATX is not set
  7787. +# CONFIG_PMC_BIG_SUR is not set
  7788. +# CONFIG_PMC_STRETCH is not set
  7789. +# CONFIG_PMC_YOSEMITE is not set
  7790. +# CONFIG_DDB5074 is not set
  7791. +# CONFIG_DDB5476 is not set
  7792. +# CONFIG_DDB5477 is not set
  7793. +# CONFIG_NEC_OSPREY is not set
  7794. +# CONFIG_NEC_EAGLE is not set
  7795. +# CONFIG_OLIVETTI_M700 is not set
  7796. +# CONFIG_NINO is not set
  7797. +# CONFIG_SGI_IP22 is not set
  7798. +# CONFIG_SGI_IP27 is not set
  7799. +# CONFIG_SIBYTE_SB1xxx_SOC is not set
  7800. +# CONFIG_SNI_RM200_PCI is not set
  7801. +# CONFIG_TANBAC_TB0226 is not set
  7802. +# CONFIG_TANBAC_TB0229 is not set
  7803. +# CONFIG_TOSHIBA_JMR3927 is not set
  7804. +# CONFIG_TOSHIBA_RBTX4927 is not set
  7805. +# CONFIG_VICTOR_MPC30X is not set
  7806. +# CONFIG_ZAO_CAPCELLA is not set
  7807. +# CONFIG_HIGHMEM is not set
  7808. +CONFIG_RWSEM_GENERIC_SPINLOCK=y
  7809. +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
  7810. +CONFIG_SOC_AU1X00=y
  7811. +CONFIG_SOC_AU1200=y
  7812. +CONFIG_NONCOHERENT_IO=y
  7813. +CONFIG_PC_KEYB=y
  7814. +# CONFIG_MIPS_AU1000 is not set
  7815. +
  7816. +#
  7817. +# CPU selection
  7818. +#
  7819. +CONFIG_CPU_MIPS32=y
  7820. +# CONFIG_CPU_MIPS64 is not set
  7821. +# CONFIG_CPU_R3000 is not set
  7822. +# CONFIG_CPU_TX39XX is not set
  7823. +# CONFIG_CPU_VR41XX is not set
  7824. +# CONFIG_CPU_R4300 is not set
  7825. +# CONFIG_CPU_R4X00 is not set
  7826. +# CONFIG_CPU_TX49XX is not set
  7827. +# CONFIG_CPU_R5000 is not set
  7828. +# CONFIG_CPU_R5432 is not set
  7829. +# CONFIG_CPU_R6000 is not set
  7830. +# CONFIG_CPU_NEVADA is not set
  7831. +# CONFIG_CPU_R8000 is not set
  7832. +# CONFIG_CPU_R10000 is not set
  7833. +# CONFIG_CPU_RM7000 is not set
  7834. +# CONFIG_CPU_RM9000 is not set
  7835. +# CONFIG_CPU_SB1 is not set
  7836. +CONFIG_PAGE_SIZE_4KB=y
  7837. +# CONFIG_PAGE_SIZE_16KB is not set
  7838. +# CONFIG_PAGE_SIZE_64KB is not set
  7839. +CONFIG_CPU_HAS_PREFETCH=y
  7840. +# CONFIG_VTAG_ICACHE is not set
  7841. +CONFIG_64BIT_PHYS_ADDR=y
  7842. +# CONFIG_CPU_ADVANCED is not set
  7843. +CONFIG_CPU_HAS_LLSC=y
  7844. +# CONFIG_CPU_HAS_LLDSCD is not set
  7845. +# CONFIG_CPU_HAS_WB is not set
  7846. +CONFIG_CPU_HAS_SYNC=y
  7847. +
  7848. +#
  7849. +# General setup
  7850. +#
  7851. +CONFIG_CPU_LITTLE_ENDIAN=y
  7852. +# CONFIG_BUILD_ELF64 is not set
  7853. +CONFIG_NET=y
  7854. +CONFIG_PCI=y
  7855. +CONFIG_PCI_NEW=y
  7856. +CONFIG_PCI_AUTO=y
  7857. +# CONFIG_PCI_NAMES is not set
  7858. +# CONFIG_ISA is not set
  7859. +# CONFIG_TC is not set
  7860. +# CONFIG_MCA is not set
  7861. +# CONFIG_SBUS is not set
  7862. +CONFIG_HOTPLUG=y
  7863. +
  7864. +#
  7865. +# PCMCIA/CardBus support
  7866. +#
  7867. +CONFIG_PCMCIA=m
  7868. +# CONFIG_CARDBUS is not set
  7869. +# CONFIG_TCIC is not set
  7870. +# CONFIG_I82092 is not set
  7871. +# CONFIG_I82365 is not set
  7872. +CONFIG_PCMCIA_AU1X00=m
  7873. +
  7874. +#
  7875. +# PCI Hotplug Support
  7876. +#
  7877. +# CONFIG_HOTPLUG_PCI is not set
  7878. +# CONFIG_HOTPLUG_PCI_COMPAQ is not set
  7879. +# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
  7880. +# CONFIG_HOTPLUG_PCI_SHPC is not set
  7881. +# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
  7882. +# CONFIG_HOTPLUG_PCI_PCIE is not set
  7883. +# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
  7884. +CONFIG_SYSVIPC=y
  7885. +# CONFIG_BSD_PROCESS_ACCT is not set
  7886. +CONFIG_SYSCTL=y
  7887. +CONFIG_KCORE_ELF=y
  7888. +# CONFIG_KCORE_AOUT is not set
  7889. +# CONFIG_BINFMT_AOUT is not set
  7890. +CONFIG_BINFMT_ELF=y
  7891. +# CONFIG_MIPS32_COMPAT is not set
  7892. +# CONFIG_MIPS32_O32 is not set
  7893. +# CONFIG_MIPS32_N32 is not set
  7894. +# CONFIG_BINFMT_ELF32 is not set
  7895. +# CONFIG_BINFMT_MISC is not set
  7896. +# CONFIG_OOM_KILLER is not set
  7897. +CONFIG_CMDLINE_BOOL=y
  7898. +CONFIG_CMDLINE="mem=96M"
  7899. +# CONFIG_PM is not set
  7900. +
  7901. +#
  7902. +# Memory Technology Devices (MTD)
  7903. +#
  7904. +# CONFIG_MTD is not set
  7905. +
  7906. +#
  7907. +# Parallel port support
  7908. +#
  7909. +# CONFIG_PARPORT is not set
  7910. +
  7911. +#
  7912. +# Plug and Play configuration
  7913. +#
  7914. +# CONFIG_PNP is not set
  7915. +# CONFIG_ISAPNP is not set
  7916. +
  7917. +#
  7918. +# Block devices
  7919. +#
  7920. +# CONFIG_BLK_DEV_FD is not set
  7921. +# CONFIG_BLK_DEV_XD is not set
  7922. +# CONFIG_PARIDE is not set
  7923. +# CONFIG_BLK_CPQ_DA is not set
  7924. +# CONFIG_BLK_CPQ_CISS_DA is not set
  7925. +# CONFIG_CISS_SCSI_TAPE is not set
  7926. +# CONFIG_CISS_MONITOR_THREAD is not set
  7927. +# CONFIG_BLK_DEV_DAC960 is not set
  7928. +# CONFIG_BLK_DEV_UMEM is not set
  7929. +# CONFIG_BLK_DEV_SX8 is not set
  7930. +CONFIG_BLK_DEV_LOOP=y
  7931. +# CONFIG_BLK_DEV_NBD is not set
  7932. +# CONFIG_BLK_DEV_RAM is not set
  7933. +# CONFIG_BLK_DEV_INITRD is not set
  7934. +# CONFIG_BLK_STATS is not set
  7935. +
  7936. +#
  7937. +# Multi-device support (RAID and LVM)
  7938. +#
  7939. +# CONFIG_MD is not set
  7940. +# CONFIG_BLK_DEV_MD is not set
  7941. +# CONFIG_MD_LINEAR is not set
  7942. +# CONFIG_MD_RAID0 is not set
  7943. +# CONFIG_MD_RAID1 is not set
  7944. +# CONFIG_MD_RAID5 is not set
  7945. +# CONFIG_MD_MULTIPATH is not set
  7946. +# CONFIG_BLK_DEV_LVM is not set
  7947. +
  7948. +#
  7949. +# Networking options
  7950. +#
  7951. +CONFIG_PACKET=y
  7952. +# CONFIG_PACKET_MMAP is not set
  7953. +# CONFIG_NETLINK_DEV is not set
  7954. +CONFIG_NETFILTER=y
  7955. +# CONFIG_NETFILTER_DEBUG is not set
  7956. +CONFIG_FILTER=y
  7957. +CONFIG_UNIX=y
  7958. +CONFIG_INET=y
  7959. +CONFIG_IP_MULTICAST=y
  7960. +# CONFIG_IP_ADVANCED_ROUTER is not set
  7961. +CONFIG_IP_PNP=y
  7962. +# CONFIG_IP_PNP_DHCP is not set
  7963. +CONFIG_IP_PNP_BOOTP=y
  7964. +# CONFIG_IP_PNP_RARP is not set
  7965. +# CONFIG_NET_IPIP is not set
  7966. +# CONFIG_NET_IPGRE is not set
  7967. +# CONFIG_IP_MROUTE is not set
  7968. +# CONFIG_ARPD is not set
  7969. +# CONFIG_INET_ECN is not set
  7970. +# CONFIG_SYN_COOKIES is not set
  7971. +
  7972. +#
  7973. +# IP: Netfilter Configuration
  7974. +#
  7975. +# CONFIG_IP_NF_CONNTRACK is not set
  7976. +# CONFIG_IP_NF_QUEUE is not set
  7977. +# CONFIG_IP_NF_IPTABLES is not set
  7978. +# CONFIG_IP_NF_ARPTABLES is not set
  7979. +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
  7980. +# CONFIG_IP_NF_COMPAT_IPFWADM is not set
  7981. +
  7982. +#
  7983. +# IP: Virtual Server Configuration
  7984. +#
  7985. +# CONFIG_IP_VS is not set
  7986. +# CONFIG_IPV6 is not set
  7987. +# CONFIG_KHTTPD is not set
  7988. +
  7989. +#
  7990. +# SCTP Configuration (EXPERIMENTAL)
  7991. +#
  7992. +# CONFIG_IP_SCTP is not set
  7993. +# CONFIG_ATM is not set
  7994. +# CONFIG_VLAN_8021Q is not set
  7995. +
  7996. +#
  7997. +#
  7998. +#
  7999. +# CONFIG_IPX is not set
  8000. +# CONFIG_ATALK is not set
  8001. +# CONFIG_DECNET is not set
  8002. +# CONFIG_BRIDGE is not set
  8003. +# CONFIG_X25 is not set
  8004. +# CONFIG_LAPB is not set
  8005. +# CONFIG_LLC is not set
  8006. +# CONFIG_NET_DIVERT is not set
  8007. +# CONFIG_ECONET is not set
  8008. +# CONFIG_WAN_ROUTER is not set
  8009. +# CONFIG_NET_FASTROUTE is not set
  8010. +# CONFIG_NET_HW_FLOWCONTROL is not set
  8011. +
  8012. +#
  8013. +# QoS and/or fair queueing
  8014. +#
  8015. +# CONFIG_NET_SCHED is not set
  8016. +
  8017. +#
  8018. +# Network testing
  8019. +#
  8020. +# CONFIG_NET_PKTGEN is not set
  8021. +
  8022. +#
  8023. +# Telephony Support
  8024. +#
  8025. +# CONFIG_PHONE is not set
  8026. +# CONFIG_PHONE_IXJ is not set
  8027. +# CONFIG_PHONE_IXJ_PCMCIA is not set
  8028. +
  8029. +#
  8030. +# ATA/IDE/MFM/RLL support
  8031. +#
  8032. +CONFIG_IDE=y
  8033. +
  8034. +#
  8035. +# IDE, ATA and ATAPI Block devices
  8036. +#
  8037. +CONFIG_BLK_DEV_IDE=y
  8038. +
  8039. +#
  8040. +# Please see Documentation/ide.txt for help/info on IDE drives
  8041. +#
  8042. +# CONFIG_BLK_DEV_HD_IDE is not set
  8043. +# CONFIG_BLK_DEV_HD is not set
  8044. +# CONFIG_BLK_DEV_IDE_SATA is not set
  8045. +CONFIG_BLK_DEV_IDEDISK=y
  8046. +CONFIG_IDEDISK_MULTI_MODE=y
  8047. +CONFIG_IDEDISK_STROKE=y
  8048. +CONFIG_BLK_DEV_IDECS=m
  8049. +# CONFIG_BLK_DEV_DELKIN is not set
  8050. +# CONFIG_BLK_DEV_IDECD is not set
  8051. +# CONFIG_BLK_DEV_IDETAPE is not set
  8052. +# CONFIG_BLK_DEV_IDEFLOPPY is not set
  8053. +# CONFIG_BLK_DEV_IDESCSI is not set
  8054. +# CONFIG_IDE_TASK_IOCTL is not set
  8055. +
  8056. +#
  8057. +# IDE chipset support/bugfixes
  8058. +#
  8059. +# CONFIG_BLK_DEV_CMD640 is not set
  8060. +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
  8061. +# CONFIG_BLK_DEV_ISAPNP is not set
  8062. +# CONFIG_BLK_DEV_IDEPCI is not set
  8063. +# CONFIG_IDE_CHIPSETS is not set
  8064. +# CONFIG_IDEDMA_AUTO is not set
  8065. +# CONFIG_DMA_NONPCI is not set
  8066. +# CONFIG_BLK_DEV_ATARAID is not set
  8067. +# CONFIG_BLK_DEV_ATARAID_PDC is not set
  8068. +# CONFIG_BLK_DEV_ATARAID_HPT is not set
  8069. +# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
  8070. +# CONFIG_BLK_DEV_ATARAID_SII is not set
  8071. +
  8072. +#
  8073. +# SCSI support
  8074. +#
  8075. +CONFIG_SCSI=y
  8076. +
  8077. +#
  8078. +# SCSI support type (disk, tape, CD-ROM)
  8079. +#
  8080. +CONFIG_BLK_DEV_SD=y
  8081. +CONFIG_SD_EXTRA_DEVS=40
  8082. +CONFIG_CHR_DEV_ST=y
  8083. +# CONFIG_CHR_DEV_OSST is not set
  8084. +CONFIG_BLK_DEV_SR=y
  8085. +# CONFIG_BLK_DEV_SR_VENDOR is not set
  8086. +CONFIG_SR_EXTRA_DEVS=2
  8087. +# CONFIG_CHR_DEV_SG is not set
  8088. +
  8089. +#
  8090. +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  8091. +#
  8092. +# CONFIG_SCSI_DEBUG_QUEUES is not set
  8093. +# CONFIG_SCSI_MULTI_LUN is not set
  8094. +CONFIG_SCSI_CONSTANTS=y
  8095. +# CONFIG_SCSI_LOGGING is not set
  8096. +
  8097. +#
  8098. +# SCSI low-level drivers
  8099. +#
  8100. +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
  8101. +# CONFIG_SCSI_7000FASST is not set
  8102. +# CONFIG_SCSI_ACARD is not set
  8103. +# CONFIG_SCSI_AHA152X is not set
  8104. +# CONFIG_SCSI_AHA1542 is not set
  8105. +# CONFIG_SCSI_AHA1740 is not set
  8106. +# CONFIG_SCSI_AACRAID is not set
  8107. +# CONFIG_SCSI_AIC7XXX is not set
  8108. +# CONFIG_SCSI_AIC79XX is not set
  8109. +# CONFIG_SCSI_AIC7XXX_OLD is not set
  8110. +# CONFIG_SCSI_DPT_I2O is not set
  8111. +# CONFIG_SCSI_ADVANSYS is not set
  8112. +# CONFIG_SCSI_IN2000 is not set
  8113. +# CONFIG_SCSI_AM53C974 is not set
  8114. +# CONFIG_SCSI_MEGARAID is not set
  8115. +# CONFIG_SCSI_MEGARAID2 is not set
  8116. +# CONFIG_SCSI_SATA is not set
  8117. +# CONFIG_SCSI_SATA_AHCI is not set
  8118. +# CONFIG_SCSI_SATA_SVW is not set
  8119. +# CONFIG_SCSI_ATA_PIIX is not set
  8120. +# CONFIG_SCSI_SATA_NV is not set
  8121. +# CONFIG_SCSI_SATA_QSTOR is not set
  8122. +# CONFIG_SCSI_SATA_PROMISE is not set
  8123. +# CONFIG_SCSI_SATA_SX4 is not set
  8124. +# CONFIG_SCSI_SATA_SIL is not set
  8125. +# CONFIG_SCSI_SATA_SIS is not set
  8126. +# CONFIG_SCSI_SATA_ULI is not set
  8127. +# CONFIG_SCSI_SATA_VIA is not set
  8128. +# CONFIG_SCSI_SATA_VITESSE is not set
  8129. +# CONFIG_SCSI_BUSLOGIC is not set
  8130. +# CONFIG_SCSI_CPQFCTS is not set
  8131. +# CONFIG_SCSI_DMX3191D is not set
  8132. +# CONFIG_SCSI_DTC3280 is not set
  8133. +# CONFIG_SCSI_EATA is not set
  8134. +# CONFIG_SCSI_EATA_DMA is not set
  8135. +# CONFIG_SCSI_EATA_PIO is not set
  8136. +# CONFIG_SCSI_FUTURE_DOMAIN is not set
  8137. +# CONFIG_SCSI_GDTH is not set
  8138. +# CONFIG_SCSI_GENERIC_NCR5380 is not set
  8139. +# CONFIG_SCSI_INITIO is not set
  8140. +# CONFIG_SCSI_INIA100 is not set
  8141. +# CONFIG_SCSI_NCR53C406A is not set
  8142. +# CONFIG_SCSI_NCR53C7xx is not set
  8143. +# CONFIG_SCSI_SYM53C8XX_2 is not set
  8144. +# CONFIG_SCSI_NCR53C8XX is not set
  8145. +# CONFIG_SCSI_SYM53C8XX is not set
  8146. +# CONFIG_SCSI_PAS16 is not set
  8147. +# CONFIG_SCSI_PCI2000 is not set
  8148. +# CONFIG_SCSI_PCI2220I is not set
  8149. +# CONFIG_SCSI_PSI240I is not set
  8150. +# CONFIG_SCSI_QLOGIC_FAS is not set
  8151. +# CONFIG_SCSI_QLOGIC_ISP is not set
  8152. +# CONFIG_SCSI_QLOGIC_FC is not set
  8153. +# CONFIG_SCSI_QLOGIC_1280 is not set
  8154. +# CONFIG_SCSI_SIM710 is not set
  8155. +# CONFIG_SCSI_SYM53C416 is not set
  8156. +# CONFIG_SCSI_DC390T is not set
  8157. +# CONFIG_SCSI_T128 is not set
  8158. +# CONFIG_SCSI_U14_34F is not set
  8159. +# CONFIG_SCSI_NSP32 is not set
  8160. +# CONFIG_SCSI_DEBUG is not set
  8161. +
  8162. +#
  8163. +# PCMCIA SCSI adapter support
  8164. +#
  8165. +# CONFIG_SCSI_PCMCIA is not set
  8166. +
  8167. +#
  8168. +# Fusion MPT device support
  8169. +#
  8170. +# CONFIG_FUSION is not set
  8171. +# CONFIG_FUSION_BOOT is not set
  8172. +# CONFIG_FUSION_ISENSE is not set
  8173. +# CONFIG_FUSION_CTL is not set
  8174. +# CONFIG_FUSION_LAN is not set
  8175. +
  8176. +#
  8177. +# IEEE 1394 (FireWire) support (EXPERIMENTAL)
  8178. +#
  8179. +# CONFIG_IEEE1394 is not set
  8180. +
  8181. +#
  8182. +# I2O device support
  8183. +#
  8184. +# CONFIG_I2O is not set
  8185. +# CONFIG_I2O_PCI is not set
  8186. +# CONFIG_I2O_BLOCK is not set
  8187. +# CONFIG_I2O_LAN is not set
  8188. +# CONFIG_I2O_SCSI is not set
  8189. +# CONFIG_I2O_PROC is not set
  8190. +
  8191. +#
  8192. +# Network device support
  8193. +#
  8194. +CONFIG_NETDEVICES=y
  8195. +
  8196. +#
  8197. +# ARCnet devices
  8198. +#
  8199. +# CONFIG_ARCNET is not set
  8200. +# CONFIG_DUMMY is not set
  8201. +# CONFIG_BONDING is not set
  8202. +# CONFIG_EQUALIZER is not set
  8203. +# CONFIG_TUN is not set
  8204. +# CONFIG_ETHERTAP is not set
  8205. +
  8206. +#
  8207. +# Ethernet (10 or 100Mbit)
  8208. +#
  8209. +CONFIG_NET_ETHERNET=y
  8210. +# CONFIG_MIPS_AU1X00_ENET is not set
  8211. +# CONFIG_SUNLANCE is not set
  8212. +# CONFIG_HAPPYMEAL is not set
  8213. +# CONFIG_SUNBMAC is not set
  8214. +# CONFIG_SUNQE is not set
  8215. +# CONFIG_SUNGEM is not set
  8216. +# CONFIG_NET_VENDOR_3COM is not set
  8217. +# CONFIG_LANCE is not set
  8218. +# CONFIG_NET_VENDOR_SMC is not set
  8219. +# CONFIG_NET_VENDOR_RACAL is not set
  8220. +# CONFIG_HP100 is not set
  8221. +# CONFIG_NET_ISA is not set
  8222. +# CONFIG_NET_PCI is not set
  8223. +# CONFIG_NET_POCKET is not set
  8224. +
  8225. +#
  8226. +# Ethernet (1000 Mbit)
  8227. +#
  8228. +# CONFIG_ACENIC is not set
  8229. +# CONFIG_DL2K is not set
  8230. +# CONFIG_E1000 is not set
  8231. +# CONFIG_MYRI_SBUS is not set
  8232. +# CONFIG_NS83820 is not set
  8233. +# CONFIG_HAMACHI is not set
  8234. +# CONFIG_YELLOWFIN is not set
  8235. +# CONFIG_R8169 is not set
  8236. +# CONFIG_SK98LIN is not set
  8237. +# CONFIG_TIGON3 is not set
  8238. +# CONFIG_FDDI is not set
  8239. +# CONFIG_HIPPI is not set
  8240. +# CONFIG_PLIP is not set
  8241. +CONFIG_PPP=m
  8242. +CONFIG_PPP_MULTILINK=y
  8243. +# CONFIG_PPP_FILTER is not set
  8244. +CONFIG_PPP_ASYNC=m
  8245. +# CONFIG_PPP_SYNC_TTY is not set
  8246. +CONFIG_PPP_DEFLATE=m
  8247. +# CONFIG_PPP_BSDCOMP is not set
  8248. +CONFIG_PPPOE=m
  8249. +# CONFIG_SLIP is not set
  8250. +
  8251. +#
  8252. +# Wireless LAN (non-hamradio)
  8253. +#
  8254. +# CONFIG_NET_RADIO is not set
  8255. +
  8256. +#
  8257. +# Token Ring devices
  8258. +#
  8259. +# CONFIG_TR is not set
  8260. +# CONFIG_NET_FC is not set
  8261. +# CONFIG_RCPCI is not set
  8262. +# CONFIG_SHAPER is not set
  8263. +
  8264. +#
  8265. +# Wan interfaces
  8266. +#
  8267. +# CONFIG_WAN is not set
  8268. +
  8269. +#
  8270. +# PCMCIA network device support
  8271. +#
  8272. +# CONFIG_NET_PCMCIA is not set
  8273. +
  8274. +#
  8275. +# Amateur Radio support
  8276. +#
  8277. +# CONFIG_HAMRADIO is not set
  8278. +
  8279. +#
  8280. +# IrDA (infrared) support
  8281. +#
  8282. +# CONFIG_IRDA is not set
  8283. +
  8284. +#
  8285. +# ISDN subsystem
  8286. +#
  8287. +# CONFIG_ISDN is not set
  8288. +
  8289. +#
  8290. +# Input core support
  8291. +#
  8292. +CONFIG_INPUT=y
  8293. +CONFIG_INPUT_KEYBDEV=y
  8294. +CONFIG_INPUT_MOUSEDEV=y
  8295. +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
  8296. +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
  8297. +# CONFIG_INPUT_JOYDEV is not set
  8298. +CONFIG_INPUT_EVDEV=y
  8299. +# CONFIG_INPUT_UINPUT is not set
  8300. +
  8301. +#
  8302. +# Character devices
  8303. +#
  8304. +CONFIG_VT=y
  8305. +# CONFIG_VT_CONSOLE is not set
  8306. +# CONFIG_SERIAL is not set
  8307. +# CONFIG_SERIAL_EXTENDED is not set
  8308. +CONFIG_SERIAL_NONSTANDARD=y
  8309. +# CONFIG_COMPUTONE is not set
  8310. +# CONFIG_ROCKETPORT is not set
  8311. +# CONFIG_CYCLADES is not set
  8312. +# CONFIG_DIGIEPCA is not set
  8313. +# CONFIG_DIGI is not set
  8314. +# CONFIG_ESPSERIAL is not set
  8315. +# CONFIG_MOXA_INTELLIO is not set
  8316. +# CONFIG_MOXA_SMARTIO is not set
  8317. +# CONFIG_ISI is not set
  8318. +# CONFIG_SYNCLINK is not set
  8319. +# CONFIG_SYNCLINKMP is not set
  8320. +# CONFIG_N_HDLC is not set
  8321. +# CONFIG_RISCOM8 is not set
  8322. +# CONFIG_SPECIALIX is not set
  8323. +# CONFIG_SX is not set
  8324. +# CONFIG_RIO is not set
  8325. +# CONFIG_STALDRV is not set
  8326. +# CONFIG_SERIAL_TX3912 is not set
  8327. +# CONFIG_SERIAL_TX3912_CONSOLE is not set
  8328. +# CONFIG_SERIAL_TXX9 is not set
  8329. +# CONFIG_SERIAL_TXX9_CONSOLE is not set
  8330. +CONFIG_AU1X00_UART=y
  8331. +CONFIG_AU1X00_SERIAL_CONSOLE=y
  8332. +# CONFIG_AU1X00_USB_TTY is not set
  8333. +# CONFIG_AU1X00_USB_RAW is not set
  8334. +# CONFIG_TXX927_SERIAL is not set
  8335. +CONFIG_UNIX98_PTYS=y
  8336. +CONFIG_UNIX98_PTY_COUNT=256
  8337. +
  8338. +#
  8339. +# I2C support
  8340. +#
  8341. +CONFIG_I2C=y
  8342. +# CONFIG_I2C_ALGOBIT is not set
  8343. +# CONFIG_SCx200_ACB is not set
  8344. +# CONFIG_I2C_ALGOPCF is not set
  8345. +# CONFIG_I2C_CHARDEV is not set
  8346. +CONFIG_I2C_PROC=y
  8347. +
  8348. +#
  8349. +# Mice
  8350. +#
  8351. +# CONFIG_BUSMOUSE is not set
  8352. +# CONFIG_MOUSE is not set
  8353. +
  8354. +#
  8355. +# Joysticks
  8356. +#
  8357. +# CONFIG_INPUT_GAMEPORT is not set
  8358. +# CONFIG_INPUT_NS558 is not set
  8359. +# CONFIG_INPUT_LIGHTNING is not set
  8360. +# CONFIG_INPUT_PCIGAME is not set
  8361. +# CONFIG_INPUT_CS461X is not set
  8362. +# CONFIG_INPUT_EMU10K1 is not set
  8363. +# CONFIG_INPUT_SERIO is not set
  8364. +# CONFIG_INPUT_SERPORT is not set
  8365. +
  8366. +#
  8367. +# Joysticks
  8368. +#
  8369. +# CONFIG_INPUT_ANALOG is not set
  8370. +# CONFIG_INPUT_A3D is not set
  8371. +# CONFIG_INPUT_ADI is not set
  8372. +# CONFIG_INPUT_COBRA is not set
  8373. +# CONFIG_INPUT_GF2K is not set
  8374. +# CONFIG_INPUT_GRIP is not set
  8375. +# CONFIG_INPUT_INTERACT is not set
  8376. +# CONFIG_INPUT_TMDC is not set
  8377. +# CONFIG_INPUT_SIDEWINDER is not set
  8378. +# CONFIG_INPUT_IFORCE_USB is not set
  8379. +# CONFIG_INPUT_IFORCE_232 is not set
  8380. +# CONFIG_INPUT_WARRIOR is not set
  8381. +# CONFIG_INPUT_MAGELLAN is not set
  8382. +# CONFIG_INPUT_SPACEORB is not set
  8383. +# CONFIG_INPUT_SPACEBALL is not set
  8384. +# CONFIG_INPUT_STINGER is not set
  8385. +# CONFIG_INPUT_DB9 is not set
  8386. +# CONFIG_INPUT_GAMECON is not set
  8387. +# CONFIG_INPUT_TURBOGRAFX is not set
  8388. +# CONFIG_QIC02_TAPE is not set
  8389. +# CONFIG_IPMI_HANDLER is not set
  8390. +# CONFIG_IPMI_PANIC_EVENT is not set
  8391. +# CONFIG_IPMI_DEVICE_INTERFACE is not set
  8392. +# CONFIG_IPMI_KCS is not set
  8393. +# CONFIG_IPMI_WATCHDOG is not set
  8394. +
  8395. +#
  8396. +# Watchdog Cards
  8397. +#
  8398. +# CONFIG_WATCHDOG is not set
  8399. +# CONFIG_SCx200 is not set
  8400. +# CONFIG_SCx200_GPIO is not set
  8401. +# CONFIG_AMD_PM768 is not set
  8402. +# CONFIG_NVRAM is not set
  8403. +# CONFIG_RTC is not set
  8404. +# CONFIG_DTLK is not set
  8405. +# CONFIG_R3964 is not set
  8406. +# CONFIG_APPLICOM is not set
  8407. +
  8408. +#
  8409. +# Ftape, the floppy tape device driver
  8410. +#
  8411. +# CONFIG_FTAPE is not set
  8412. +# CONFIG_AGP is not set
  8413. +
  8414. +#
  8415. +# Direct Rendering Manager (XFree86 DRI support)
  8416. +#
  8417. +# CONFIG_DRM is not set
  8418. +
  8419. +#
  8420. +# PCMCIA character devices
  8421. +#
  8422. +# CONFIG_PCMCIA_SERIAL_CS is not set
  8423. +# CONFIG_SYNCLINK_CS is not set
  8424. +# CONFIG_AU1X00_GPIO is not set
  8425. +# CONFIG_TS_AU1X00_ADS7846 is not set
  8426. +
  8427. +#
  8428. +# File systems
  8429. +#
  8430. +# CONFIG_QUOTA is not set
  8431. +# CONFIG_QFMT_V2 is not set
  8432. +CONFIG_AUTOFS_FS=y
  8433. +# CONFIG_AUTOFS4_FS is not set
  8434. +# CONFIG_REISERFS_FS is not set
  8435. +# CONFIG_REISERFS_CHECK is not set
  8436. +# CONFIG_REISERFS_PROC_INFO is not set
  8437. +# CONFIG_ADFS_FS is not set
  8438. +# CONFIG_ADFS_FS_RW is not set
  8439. +# CONFIG_AFFS_FS is not set
  8440. +# CONFIG_HFS_FS is not set
  8441. +# CONFIG_HFSPLUS_FS is not set
  8442. +# CONFIG_BEFS_FS is not set
  8443. +# CONFIG_BEFS_DEBUG is not set
  8444. +# CONFIG_BFS_FS is not set
  8445. +CONFIG_EXT3_FS=y
  8446. +CONFIG_JBD=y
  8447. +# CONFIG_JBD_DEBUG is not set
  8448. +CONFIG_FAT_FS=y
  8449. +CONFIG_MSDOS_FS=y
  8450. +# CONFIG_UMSDOS_FS is not set
  8451. +CONFIG_VFAT_FS=y
  8452. +# CONFIG_EFS_FS is not set
  8453. +# CONFIG_JFFS_FS is not set
  8454. +# CONFIG_JFFS2_FS is not set
  8455. +# CONFIG_CRAMFS is not set
  8456. +CONFIG_TMPFS=y
  8457. +CONFIG_RAMFS=y
  8458. +# CONFIG_ISO9660_FS is not set
  8459. +# CONFIG_JOLIET is not set
  8460. +# CONFIG_ZISOFS is not set
  8461. +# CONFIG_JFS_FS is not set
  8462. +# CONFIG_JFS_DEBUG is not set
  8463. +# CONFIG_JFS_STATISTICS is not set
  8464. +# CONFIG_MINIX_FS is not set
  8465. +# CONFIG_VXFS_FS is not set
  8466. +# CONFIG_NTFS_FS is not set
  8467. +# CONFIG_NTFS_RW is not set
  8468. +# CONFIG_HPFS_FS is not set
  8469. +CONFIG_PROC_FS=y
  8470. +# CONFIG_DEVFS_FS is not set
  8471. +# CONFIG_DEVFS_MOUNT is not set
  8472. +# CONFIG_DEVFS_DEBUG is not set
  8473. +CONFIG_DEVPTS_FS=y
  8474. +# CONFIG_QNX4FS_FS is not set
  8475. +# CONFIG_QNX4FS_RW is not set
  8476. +# CONFIG_ROMFS_FS is not set
  8477. +CONFIG_EXT2_FS=y
  8478. +# CONFIG_SYSV_FS is not set
  8479. +# CONFIG_UDF_FS is not set
  8480. +# CONFIG_UDF_RW is not set
  8481. +# CONFIG_UFS_FS is not set
  8482. +# CONFIG_UFS_FS_WRITE is not set
  8483. +# CONFIG_XFS_FS is not set
  8484. +# CONFIG_XFS_QUOTA is not set
  8485. +# CONFIG_XFS_RT is not set
  8486. +# CONFIG_XFS_TRACE is not set
  8487. +# CONFIG_XFS_DEBUG is not set
  8488. +
  8489. +#
  8490. +# Network File Systems
  8491. +#
  8492. +# CONFIG_CODA_FS is not set
  8493. +# CONFIG_INTERMEZZO_FS is not set
  8494. +CONFIG_NFS_FS=y
  8495. +CONFIG_NFS_V3=y
  8496. +# CONFIG_NFS_DIRECTIO is not set
  8497. +CONFIG_ROOT_NFS=y
  8498. +# CONFIG_NFSD is not set
  8499. +# CONFIG_NFSD_V3 is not set
  8500. +# CONFIG_NFSD_TCP is not set
  8501. +CONFIG_SUNRPC=y
  8502. +CONFIG_LOCKD=y
  8503. +CONFIG_LOCKD_V4=y
  8504. +# CONFIG_SMB_FS is not set
  8505. +# CONFIG_NCP_FS is not set
  8506. +# CONFIG_NCPFS_PACKET_SIGNING is not set
  8507. +# CONFIG_NCPFS_IOCTL_LOCKING is not set
  8508. +# CONFIG_NCPFS_STRONG is not set
  8509. +# CONFIG_NCPFS_NFS_NS is not set
  8510. +# CONFIG_NCPFS_OS2_NS is not set
  8511. +# CONFIG_NCPFS_SMALLDOS is not set
  8512. +# CONFIG_NCPFS_NLS is not set
  8513. +# CONFIG_NCPFS_EXTRAS is not set
  8514. +# CONFIG_ZISOFS_FS is not set
  8515. +
  8516. +#
  8517. +# Partition Types
  8518. +#
  8519. +# CONFIG_PARTITION_ADVANCED is not set
  8520. +CONFIG_MSDOS_PARTITION=y
  8521. +# CONFIG_SMB_NLS is not set
  8522. +CONFIG_NLS=y
  8523. +
  8524. +#
  8525. +# Native Language Support
  8526. +#
  8527. +CONFIG_NLS_DEFAULT="iso8859-1"
  8528. +# CONFIG_NLS_CODEPAGE_437 is not set
  8529. +# CONFIG_NLS_CODEPAGE_737 is not set
  8530. +# CONFIG_NLS_CODEPAGE_775 is not set
  8531. +# CONFIG_NLS_CODEPAGE_850 is not set
  8532. +# CONFIG_NLS_CODEPAGE_852 is not set
  8533. +# CONFIG_NLS_CODEPAGE_855 is not set
  8534. +# CONFIG_NLS_CODEPAGE_857 is not set
  8535. +# CONFIG_NLS_CODEPAGE_860 is not set
  8536. +# CONFIG_NLS_CODEPAGE_861 is not set
  8537. +# CONFIG_NLS_CODEPAGE_862 is not set
  8538. +# CONFIG_NLS_CODEPAGE_863 is not set
  8539. +# CONFIG_NLS_CODEPAGE_864 is not set
  8540. +# CONFIG_NLS_CODEPAGE_865 is not set
  8541. +# CONFIG_NLS_CODEPAGE_866 is not set
  8542. +# CONFIG_NLS_CODEPAGE_869 is not set
  8543. +# CONFIG_NLS_CODEPAGE_936 is not set
  8544. +# CONFIG_NLS_CODEPAGE_950 is not set
  8545. +# CONFIG_NLS_CODEPAGE_932 is not set
  8546. +# CONFIG_NLS_CODEPAGE_949 is not set
  8547. +# CONFIG_NLS_CODEPAGE_874 is not set
  8548. +# CONFIG_NLS_ISO8859_8 is not set
  8549. +# CONFIG_NLS_CODEPAGE_1250 is not set
  8550. +# CONFIG_NLS_CODEPAGE_1251 is not set
  8551. +# CONFIG_NLS_ISO8859_1 is not set
  8552. +# CONFIG_NLS_ISO8859_2 is not set
  8553. +# CONFIG_NLS_ISO8859_3 is not set
  8554. +# CONFIG_NLS_ISO8859_4 is not set
  8555. +# CONFIG_NLS_ISO8859_5 is not set
  8556. +# CONFIG_NLS_ISO8859_6 is not set
  8557. +# CONFIG_NLS_ISO8859_7 is not set
  8558. +# CONFIG_NLS_ISO8859_9 is not set
  8559. +# CONFIG_NLS_ISO8859_13 is not set
  8560. +# CONFIG_NLS_ISO8859_14 is not set
  8561. +# CONFIG_NLS_ISO8859_15 is not set
  8562. +# CONFIG_NLS_KOI8_R is not set
  8563. +# CONFIG_NLS_KOI8_U is not set
  8564. +# CONFIG_NLS_UTF8 is not set
  8565. +
  8566. +#
  8567. +# Multimedia devices
  8568. +#
  8569. +# CONFIG_VIDEO_DEV is not set
  8570. +
  8571. +#
  8572. +# Console drivers
  8573. +#
  8574. +# CONFIG_VGA_CONSOLE is not set
  8575. +# CONFIG_MDA_CONSOLE is not set
  8576. +
  8577. +#
  8578. +# Frame-buffer support
  8579. +#
  8580. +CONFIG_FB=y
  8581. +CONFIG_DUMMY_CONSOLE=y
  8582. +# CONFIG_FB_RIVA is not set
  8583. +# CONFIG_FB_CLGEN is not set
  8584. +# CONFIG_FB_PM2 is not set
  8585. +# CONFIG_FB_PM3 is not set
  8586. +# CONFIG_FB_CYBER2000 is not set
  8587. +# CONFIG_FB_MATROX is not set
  8588. +# CONFIG_FB_ATY is not set
  8589. +# CONFIG_FB_RADEON is not set
  8590. +# CONFIG_FB_ATY128 is not set
  8591. +# CONFIG_FB_INTEL is not set
  8592. +# CONFIG_FB_SIS is not set
  8593. +# CONFIG_FB_NEOMAGIC is not set
  8594. +# CONFIG_FB_3DFX is not set
  8595. +# CONFIG_FB_VOODOO1 is not set
  8596. +# CONFIG_FB_TRIDENT is not set
  8597. +# CONFIG_FB_E1356 is not set
  8598. +# CONFIG_FB_IT8181 is not set
  8599. +# CONFIG_FB_VIRTUAL is not set
  8600. +CONFIG_FBCON_ADVANCED=y
  8601. +# CONFIG_FBCON_MFB is not set
  8602. +# CONFIG_FBCON_CFB2 is not set
  8603. +# CONFIG_FBCON_CFB4 is not set
  8604. +# CONFIG_FBCON_CFB8 is not set
  8605. +CONFIG_FBCON_CFB16=y
  8606. +# CONFIG_FBCON_CFB24 is not set
  8607. +CONFIG_FBCON_CFB32=y
  8608. +# CONFIG_FBCON_AFB is not set
  8609. +# CONFIG_FBCON_ILBM is not set
  8610. +# CONFIG_FBCON_IPLAN2P2 is not set
  8611. +# CONFIG_FBCON_IPLAN2P4 is not set
  8612. +# CONFIG_FBCON_IPLAN2P8 is not set
  8613. +# CONFIG_FBCON_MAC is not set
  8614. +# CONFIG_FBCON_VGA_PLANES is not set
  8615. +# CONFIG_FBCON_VGA is not set
  8616. +# CONFIG_FBCON_HGA is not set
  8617. +# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
  8618. +CONFIG_FBCON_FONTS=y
  8619. +CONFIG_FONT_8x8=y
  8620. +CONFIG_FONT_8x16=y
  8621. +# CONFIG_FONT_SUN8x16 is not set
  8622. +# CONFIG_FONT_SUN12x22 is not set
  8623. +# CONFIG_FONT_6x11 is not set
  8624. +# CONFIG_FONT_PEARL_8x8 is not set
  8625. +# CONFIG_FONT_ACORN_8x8 is not set
  8626. +
  8627. +#
  8628. +# Sound
  8629. +#
  8630. +CONFIG_SOUND=y
  8631. +# CONFIG_SOUND_ALI5455 is not set
  8632. +# CONFIG_SOUND_BT878 is not set
  8633. +# CONFIG_SOUND_CMPCI is not set
  8634. +# CONFIG_SOUND_EMU10K1 is not set
  8635. +# CONFIG_MIDI_EMU10K1 is not set
  8636. +# CONFIG_SOUND_FUSION is not set
  8637. +# CONFIG_SOUND_CS4281 is not set
  8638. +# CONFIG_SOUND_ES1370 is not set
  8639. +# CONFIG_SOUND_ES1371 is not set
  8640. +# CONFIG_SOUND_ESSSOLO1 is not set
  8641. +# CONFIG_SOUND_MAESTRO is not set
  8642. +# CONFIG_SOUND_MAESTRO3 is not set
  8643. +# CONFIG_SOUND_FORTE is not set
  8644. +# CONFIG_SOUND_ICH is not set
  8645. +# CONFIG_SOUND_RME96XX is not set
  8646. +# CONFIG_SOUND_SONICVIBES is not set
  8647. +# CONFIG_SOUND_AU1X00 is not set
  8648. +CONFIG_SOUND_AU1550_PSC=y
  8649. +# CONFIG_SOUND_AU1550_I2S is not set
  8650. +# CONFIG_SOUND_TRIDENT is not set
  8651. +# CONFIG_SOUND_MSNDCLAS is not set
  8652. +# CONFIG_SOUND_MSNDPIN is not set
  8653. +# CONFIG_SOUND_VIA82CXXX is not set
  8654. +# CONFIG_MIDI_VIA82CXXX is not set
  8655. +# CONFIG_SOUND_OSS is not set
  8656. +# CONFIG_SOUND_TVMIXER is not set
  8657. +# CONFIG_SOUND_AD1980 is not set
  8658. +# CONFIG_SOUND_WM97XX is not set
  8659. +
  8660. +#
  8661. +# USB support
  8662. +#
  8663. +CONFIG_USB=y
  8664. +# CONFIG_USB_DEBUG is not set
  8665. +
  8666. +#
  8667. +# Miscellaneous USB options
  8668. +#
  8669. +CONFIG_USB_DEVICEFS=y
  8670. +# CONFIG_USB_BANDWIDTH is not set
  8671. +
  8672. +#
  8673. +# USB Host Controller Drivers
  8674. +#
  8675. +# CONFIG_USB_EHCI_HCD is not set
  8676. +# CONFIG_USB_UHCI is not set
  8677. +# CONFIG_USB_UHCI_ALT is not set
  8678. +CONFIG_USB_OHCI=y
  8679. +
  8680. +#
  8681. +# USB Device Class drivers
  8682. +#
  8683. +# CONFIG_USB_AUDIO is not set
  8684. +# CONFIG_USB_EMI26 is not set
  8685. +# CONFIG_USB_BLUETOOTH is not set
  8686. +# CONFIG_USB_MIDI is not set
  8687. +CONFIG_USB_STORAGE=y
  8688. +# CONFIG_USB_STORAGE_DEBUG is not set
  8689. +# CONFIG_USB_STORAGE_DATAFAB is not set
  8690. +# CONFIG_USB_STORAGE_FREECOM is not set
  8691. +# CONFIG_USB_STORAGE_ISD200 is not set
  8692. +# CONFIG_USB_STORAGE_DPCM is not set
  8693. +# CONFIG_USB_STORAGE_HP8200e is not set
  8694. +# CONFIG_USB_STORAGE_SDDR09 is not set
  8695. +# CONFIG_USB_STORAGE_SDDR55 is not set
  8696. +# CONFIG_USB_STORAGE_JUMPSHOT is not set
  8697. +# CONFIG_USB_ACM is not set
  8698. +# CONFIG_USB_PRINTER is not set
  8699. +
  8700. +#
  8701. +# USB Human Interface Devices (HID)
  8702. +#
  8703. +CONFIG_USB_HID=y
  8704. +CONFIG_USB_HIDINPUT=y
  8705. +CONFIG_USB_HIDDEV=y
  8706. +# CONFIG_USB_AIPTEK is not set
  8707. +# CONFIG_USB_WACOM is not set
  8708. +# CONFIG_USB_KBTAB is not set
  8709. +# CONFIG_USB_POWERMATE is not set
  8710. +
  8711. +#
  8712. +# USB Imaging devices
  8713. +#
  8714. +# CONFIG_USB_DC2XX is not set
  8715. +# CONFIG_USB_MDC800 is not set
  8716. +# CONFIG_USB_SCANNER is not set
  8717. +# CONFIG_USB_MICROTEK is not set
  8718. +# CONFIG_USB_HPUSBSCSI is not set
  8719. +
  8720. +#
  8721. +# USB Multimedia devices
  8722. +#
  8723. +
  8724. +#
  8725. +# Video4Linux support is needed for USB Multimedia device support
  8726. +#
  8727. +
  8728. +#
  8729. +# USB Network adaptors
  8730. +#
  8731. +# CONFIG_USB_PEGASUS is not set
  8732. +# CONFIG_USB_RTL8150 is not set
  8733. +# CONFIG_USB_KAWETH is not set
  8734. +# CONFIG_USB_CATC is not set
  8735. +# CONFIG_USB_CDCETHER is not set
  8736. +# CONFIG_USB_USBNET is not set
  8737. +
  8738. +#
  8739. +# USB port drivers
  8740. +#
  8741. +# CONFIG_USB_USS720 is not set
  8742. +
  8743. +#
  8744. +# USB Serial Converter support
  8745. +#
  8746. +# CONFIG_USB_SERIAL is not set
  8747. +
  8748. +#
  8749. +# USB Miscellaneous drivers
  8750. +#
  8751. +# CONFIG_USB_RIO500 is not set
  8752. +# CONFIG_USB_AUERSWALD is not set
  8753. +# CONFIG_USB_TIGL is not set
  8754. +# CONFIG_USB_BRLVGER is not set
  8755. +# CONFIG_USB_LCD is not set
  8756. +
  8757. +#
  8758. +# Support for USB gadgets
  8759. +#
  8760. +# CONFIG_USB_GADGET is not set
  8761. +
  8762. +#
  8763. +# Bluetooth support
  8764. +#
  8765. +# CONFIG_BLUEZ is not set
  8766. +
  8767. +#
  8768. +# Kernel hacking
  8769. +#
  8770. +CONFIG_CROSSCOMPILE=y
  8771. +# CONFIG_RUNTIME_DEBUG is not set
  8772. +# CONFIG_KGDB is not set
  8773. +# CONFIG_GDB_CONSOLE is not set
  8774. +# CONFIG_DEBUG_INFO is not set
  8775. +# CONFIG_MAGIC_SYSRQ is not set
  8776. +# CONFIG_MIPS_UNCACHED is not set
  8777. +CONFIG_LOG_BUF_SHIFT=0
  8778. +
  8779. +#
  8780. +# Cryptographic options
  8781. +#
  8782. +# CONFIG_CRYPTO is not set
  8783. +
  8784. +#
  8785. +# Library routines
  8786. +#
  8787. +# CONFIG_CRC32 is not set
  8788. +CONFIG_ZLIB_INFLATE=m
  8789. +CONFIG_ZLIB_DEFLATE=m
  8790. +# CONFIG_FW_LOADER is not set
  8791. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-pb1500 linux-2.4.32-rc1.mips/arch/mips/defconfig-pb1500
  8792. --- linux-2.4.32-rc1/arch/mips/defconfig-pb1500 2005-01-19 15:09:28.000000000 +0100
  8793. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-pb1500 2005-03-18 13:13:21.000000000 +0100
  8794. @@ -30,8 +30,8 @@
  8795. # CONFIG_MIPS_PB1000 is not set
  8796. # CONFIG_MIPS_PB1100 is not set
  8797. CONFIG_MIPS_PB1500=y
  8798. -# CONFIG_MIPS_HYDROGEN3 is not set
  8799. # CONFIG_MIPS_PB1550 is not set
  8800. +# CONFIG_MIPS_HYDROGEN3 is not set
  8801. # CONFIG_MIPS_XXS1500 is not set
  8802. # CONFIG_MIPS_MTX1 is not set
  8803. # CONFIG_COGENT_CSB250 is not set
  8804. @@ -215,9 +215,7 @@
  8805. # CONFIG_MTD_MTX1 is not set
  8806. CONFIG_MTD_PB1500_BOOT=y
  8807. # CONFIG_MTD_PB1500_USER is not set
  8808. -# CONFIG_MTD_DB1X00 is not set
  8809. # CONFIG_MTD_PB1550 is not set
  8810. -# CONFIG_MTD_HYDROGEN3 is not set
  8811. # CONFIG_MTD_MIRAGE is not set
  8812. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  8813. # CONFIG_MTD_OCELOT is not set
  8814. @@ -236,7 +234,6 @@
  8815. #
  8816. # Disk-On-Chip Device Drivers
  8817. #
  8818. -# CONFIG_MTD_DOC1000 is not set
  8819. # CONFIG_MTD_DOC2000 is not set
  8820. # CONFIG_MTD_DOC2001 is not set
  8821. # CONFIG_MTD_DOCPROBE is not set
  8822. @@ -341,11 +338,6 @@
  8823. #
  8824. # CONFIG_IPX is not set
  8825. # CONFIG_ATALK is not set
  8826. -
  8827. -#
  8828. -# Appletalk devices
  8829. -#
  8830. -# CONFIG_DEV_APPLETALK is not set
  8831. # CONFIG_DECNET is not set
  8832. # CONFIG_BRIDGE is not set
  8833. # CONFIG_X25 is not set
  8834. @@ -675,7 +667,6 @@
  8835. # CONFIG_AU1X00_USB_TTY is not set
  8836. # CONFIG_AU1X00_USB_RAW is not set
  8837. # CONFIG_TXX927_SERIAL is not set
  8838. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  8839. CONFIG_UNIX98_PTYS=y
  8840. CONFIG_UNIX98_PTY_COUNT=256
  8841. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-pb1550 linux-2.4.32-rc1.mips/arch/mips/defconfig-pb1550
  8842. --- linux-2.4.32-rc1/arch/mips/defconfig-pb1550 2005-01-19 15:09:29.000000000 +0100
  8843. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-pb1550 2005-03-18 13:13:21.000000000 +0100
  8844. @@ -30,8 +30,8 @@
  8845. # CONFIG_MIPS_PB1000 is not set
  8846. # CONFIG_MIPS_PB1100 is not set
  8847. # CONFIG_MIPS_PB1500 is not set
  8848. -# CONFIG_MIPS_HYDROGEN3 is not set
  8849. CONFIG_MIPS_PB1550=y
  8850. +# CONFIG_MIPS_HYDROGEN3 is not set
  8851. # CONFIG_MIPS_XXS1500 is not set
  8852. # CONFIG_MIPS_MTX1 is not set
  8853. # CONFIG_COGENT_CSB250 is not set
  8854. @@ -213,11 +213,9 @@
  8855. # CONFIG_MTD_BOSPORUS is not set
  8856. # CONFIG_MTD_XXS1500 is not set
  8857. # CONFIG_MTD_MTX1 is not set
  8858. -# CONFIG_MTD_DB1X00 is not set
  8859. CONFIG_MTD_PB1550=y
  8860. CONFIG_MTD_PB1550_BOOT=y
  8861. CONFIG_MTD_PB1550_USER=y
  8862. -# CONFIG_MTD_HYDROGEN3 is not set
  8863. # CONFIG_MTD_MIRAGE is not set
  8864. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  8865. # CONFIG_MTD_OCELOT is not set
  8866. @@ -236,7 +234,6 @@
  8867. #
  8868. # Disk-On-Chip Device Drivers
  8869. #
  8870. -# CONFIG_MTD_DOC1000 is not set
  8871. # CONFIG_MTD_DOC2000 is not set
  8872. # CONFIG_MTD_DOC2001 is not set
  8873. # CONFIG_MTD_DOCPROBE is not set
  8874. @@ -343,11 +340,6 @@
  8875. #
  8876. # CONFIG_IPX is not set
  8877. # CONFIG_ATALK is not set
  8878. -
  8879. -#
  8880. -# Appletalk devices
  8881. -#
  8882. -# CONFIG_DEV_APPLETALK is not set
  8883. # CONFIG_DECNET is not set
  8884. # CONFIG_BRIDGE is not set
  8885. # CONFIG_X25 is not set
  8886. @@ -633,7 +625,6 @@
  8887. # CONFIG_AU1X00_USB_TTY is not set
  8888. # CONFIG_AU1X00_USB_RAW is not set
  8889. # CONFIG_TXX927_SERIAL is not set
  8890. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  8891. CONFIG_UNIX98_PTYS=y
  8892. CONFIG_UNIX98_PTY_COUNT=256
  8893. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-rbtx4927 linux-2.4.32-rc1.mips/arch/mips/defconfig-rbtx4927
  8894. --- linux-2.4.32-rc1/arch/mips/defconfig-rbtx4927 2005-01-19 15:09:29.000000000 +0100
  8895. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-rbtx4927 2005-03-18 13:13:21.000000000 +0100
  8896. @@ -28,8 +28,8 @@
  8897. # CONFIG_MIPS_PB1000 is not set
  8898. # CONFIG_MIPS_PB1100 is not set
  8899. # CONFIG_MIPS_PB1500 is not set
  8900. -# CONFIG_MIPS_HYDROGEN3 is not set
  8901. # CONFIG_MIPS_PB1550 is not set
  8902. +# CONFIG_MIPS_HYDROGEN3 is not set
  8903. # CONFIG_MIPS_XXS1500 is not set
  8904. # CONFIG_MIPS_MTX1 is not set
  8905. # CONFIG_COGENT_CSB250 is not set
  8906. @@ -223,11 +223,6 @@
  8907. #
  8908. # CONFIG_IPX is not set
  8909. # CONFIG_ATALK is not set
  8910. -
  8911. -#
  8912. -# Appletalk devices
  8913. -#
  8914. -# CONFIG_DEV_APPLETALK is not set
  8915. # CONFIG_DECNET is not set
  8916. # CONFIG_BRIDGE is not set
  8917. # CONFIG_X25 is not set
  8918. @@ -466,7 +461,6 @@
  8919. CONFIG_SERIAL_TXX9=y
  8920. CONFIG_SERIAL_TXX9_CONSOLE=y
  8921. # CONFIG_TXX927_SERIAL is not set
  8922. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  8923. # CONFIG_UNIX98_PTYS is not set
  8924. #
  8925. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-rm200 linux-2.4.32-rc1.mips/arch/mips/defconfig-rm200
  8926. --- linux-2.4.32-rc1/arch/mips/defconfig-rm200 2005-01-19 15:09:29.000000000 +0100
  8927. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-rm200 2005-03-18 13:13:21.000000000 +0100
  8928. @@ -30,8 +30,8 @@
  8929. # CONFIG_MIPS_PB1000 is not set
  8930. # CONFIG_MIPS_PB1100 is not set
  8931. # CONFIG_MIPS_PB1500 is not set
  8932. -# CONFIG_MIPS_HYDROGEN3 is not set
  8933. # CONFIG_MIPS_PB1550 is not set
  8934. +# CONFIG_MIPS_HYDROGEN3 is not set
  8935. # CONFIG_MIPS_XXS1500 is not set
  8936. # CONFIG_MIPS_MTX1 is not set
  8937. # CONFIG_COGENT_CSB250 is not set
  8938. @@ -229,11 +229,6 @@
  8939. #
  8940. # CONFIG_IPX is not set
  8941. # CONFIG_ATALK is not set
  8942. -
  8943. -#
  8944. -# Appletalk devices
  8945. -#
  8946. -# CONFIG_DEV_APPLETALK is not set
  8947. # CONFIG_DECNET is not set
  8948. # CONFIG_BRIDGE is not set
  8949. # CONFIG_X25 is not set
  8950. @@ -340,7 +335,6 @@
  8951. # CONFIG_SERIAL is not set
  8952. # CONFIG_SERIAL_EXTENDED is not set
  8953. # CONFIG_SERIAL_NONSTANDARD is not set
  8954. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  8955. CONFIG_UNIX98_PTYS=y
  8956. CONFIG_UNIX98_PTY_COUNT=256
  8957. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-sb1250-swarm linux-2.4.32-rc1.mips/arch/mips/defconfig-sb1250-swarm
  8958. --- linux-2.4.32-rc1/arch/mips/defconfig-sb1250-swarm 2005-01-19 15:09:29.000000000 +0100
  8959. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-sb1250-swarm 2005-03-18 13:13:21.000000000 +0100
  8960. @@ -30,8 +30,8 @@
  8961. # CONFIG_MIPS_PB1000 is not set
  8962. # CONFIG_MIPS_PB1100 is not set
  8963. # CONFIG_MIPS_PB1500 is not set
  8964. -# CONFIG_MIPS_HYDROGEN3 is not set
  8965. # CONFIG_MIPS_PB1550 is not set
  8966. +# CONFIG_MIPS_HYDROGEN3 is not set
  8967. # CONFIG_MIPS_XXS1500 is not set
  8968. # CONFIG_MIPS_MTX1 is not set
  8969. # CONFIG_COGENT_CSB250 is not set
  8970. @@ -90,6 +90,7 @@
  8971. # CONFIG_SIBYTE_TBPROF is not set
  8972. CONFIG_SIBYTE_GENBUS_IDE=y
  8973. CONFIG_SMP_CAPABLE=y
  8974. +CONFIG_MIPS_RTC=y
  8975. # CONFIG_SNI_RM200_PCI is not set
  8976. # CONFIG_TANBAC_TB0226 is not set
  8977. # CONFIG_TANBAC_TB0229 is not set
  8978. @@ -253,11 +254,6 @@
  8979. #
  8980. # CONFIG_IPX is not set
  8981. # CONFIG_ATALK is not set
  8982. -
  8983. -#
  8984. -# Appletalk devices
  8985. -#
  8986. -# CONFIG_DEV_APPLETALK is not set
  8987. # CONFIG_DECNET is not set
  8988. # CONFIG_BRIDGE is not set
  8989. # CONFIG_X25 is not set
  8990. @@ -469,7 +465,6 @@
  8991. CONFIG_SIBYTE_SB1250_DUART=y
  8992. CONFIG_SIBYTE_SB1250_DUART_CONSOLE=y
  8993. CONFIG_SERIAL_CONSOLE=y
  8994. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  8995. CONFIG_UNIX98_PTYS=y
  8996. CONFIG_UNIX98_PTY_COUNT=256
  8997. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-sead linux-2.4.32-rc1.mips/arch/mips/defconfig-sead
  8998. --- linux-2.4.32-rc1/arch/mips/defconfig-sead 2005-01-19 15:09:29.000000000 +0100
  8999. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-sead 2005-03-18 13:13:21.000000000 +0100
  9000. @@ -28,8 +28,8 @@
  9001. # CONFIG_MIPS_PB1000 is not set
  9002. # CONFIG_MIPS_PB1100 is not set
  9003. # CONFIG_MIPS_PB1500 is not set
  9004. -# CONFIG_MIPS_HYDROGEN3 is not set
  9005. # CONFIG_MIPS_PB1550 is not set
  9006. +# CONFIG_MIPS_HYDROGEN3 is not set
  9007. # CONFIG_MIPS_XXS1500 is not set
  9008. # CONFIG_MIPS_MTX1 is not set
  9009. # CONFIG_COGENT_CSB250 is not set
  9010. @@ -244,7 +244,6 @@
  9011. CONFIG_SERIAL_CONSOLE=y
  9012. # CONFIG_SERIAL_EXTENDED is not set
  9013. # CONFIG_SERIAL_NONSTANDARD is not set
  9014. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  9015. # CONFIG_UNIX98_PTYS is not set
  9016. #
  9017. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-stretch linux-2.4.32-rc1.mips/arch/mips/defconfig-stretch
  9018. --- linux-2.4.32-rc1/arch/mips/defconfig-stretch 2005-01-19 15:09:29.000000000 +0100
  9019. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-stretch 2005-03-18 13:13:21.000000000 +0100
  9020. @@ -30,8 +30,8 @@
  9021. # CONFIG_MIPS_PB1000 is not set
  9022. # CONFIG_MIPS_PB1100 is not set
  9023. # CONFIG_MIPS_PB1500 is not set
  9024. -# CONFIG_MIPS_HYDROGEN3 is not set
  9025. # CONFIG_MIPS_PB1550 is not set
  9026. +# CONFIG_MIPS_HYDROGEN3 is not set
  9027. # CONFIG_MIPS_XXS1500 is not set
  9028. # CONFIG_MIPS_MTX1 is not set
  9029. # CONFIG_COGENT_CSB250 is not set
  9030. @@ -240,11 +240,6 @@
  9031. #
  9032. # CONFIG_IPX is not set
  9033. # CONFIG_ATALK is not set
  9034. -
  9035. -#
  9036. -# Appletalk devices
  9037. -#
  9038. -# CONFIG_DEV_APPLETALK is not set
  9039. # CONFIG_DECNET is not set
  9040. # CONFIG_BRIDGE is not set
  9041. # CONFIG_X25 is not set
  9042. @@ -324,9 +319,11 @@
  9043. # CONFIG_SCSI_MEGARAID is not set
  9044. # CONFIG_SCSI_MEGARAID2 is not set
  9045. # CONFIG_SCSI_SATA is not set
  9046. +# CONFIG_SCSI_SATA_AHCI is not set
  9047. # CONFIG_SCSI_SATA_SVW is not set
  9048. # CONFIG_SCSI_ATA_PIIX is not set
  9049. # CONFIG_SCSI_SATA_NV is not set
  9050. +# CONFIG_SCSI_SATA_QSTOR is not set
  9051. # CONFIG_SCSI_SATA_PROMISE is not set
  9052. # CONFIG_SCSI_SATA_SX4 is not set
  9053. # CONFIG_SCSI_SATA_SIL is not set
  9054. @@ -516,7 +513,6 @@
  9055. # CONFIG_SERIAL_TXX9 is not set
  9056. # CONFIG_SERIAL_TXX9_CONSOLE is not set
  9057. # CONFIG_TXX927_SERIAL is not set
  9058. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  9059. CONFIG_UNIX98_PTYS=y
  9060. CONFIG_UNIX98_PTY_COUNT=256
  9061. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-tb0226 linux-2.4.32-rc1.mips/arch/mips/defconfig-tb0226
  9062. --- linux-2.4.32-rc1/arch/mips/defconfig-tb0226 2005-01-19 15:09:29.000000000 +0100
  9063. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-tb0226 2005-03-18 13:13:21.000000000 +0100
  9064. @@ -30,8 +30,8 @@
  9065. # CONFIG_MIPS_PB1000 is not set
  9066. # CONFIG_MIPS_PB1100 is not set
  9067. # CONFIG_MIPS_PB1500 is not set
  9068. -# CONFIG_MIPS_HYDROGEN3 is not set
  9069. # CONFIG_MIPS_PB1550 is not set
  9070. +# CONFIG_MIPS_HYDROGEN3 is not set
  9071. # CONFIG_MIPS_XXS1500 is not set
  9072. # CONFIG_MIPS_MTX1 is not set
  9073. # CONFIG_COGENT_CSB250 is not set
  9074. @@ -228,11 +228,6 @@
  9075. #
  9076. # CONFIG_IPX is not set
  9077. # CONFIG_ATALK is not set
  9078. -
  9079. -#
  9080. -# Appletalk devices
  9081. -#
  9082. -# CONFIG_DEV_APPLETALK is not set
  9083. # CONFIG_DECNET is not set
  9084. # CONFIG_BRIDGE is not set
  9085. # CONFIG_X25 is not set
  9086. @@ -312,9 +307,11 @@
  9087. # CONFIG_SCSI_MEGARAID is not set
  9088. # CONFIG_SCSI_MEGARAID2 is not set
  9089. # CONFIG_SCSI_SATA is not set
  9090. +# CONFIG_SCSI_SATA_AHCI is not set
  9091. # CONFIG_SCSI_SATA_SVW is not set
  9092. # CONFIG_SCSI_ATA_PIIX is not set
  9093. # CONFIG_SCSI_SATA_NV is not set
  9094. +# CONFIG_SCSI_SATA_QSTOR is not set
  9095. # CONFIG_SCSI_SATA_PROMISE is not set
  9096. # CONFIG_SCSI_SATA_SX4 is not set
  9097. # CONFIG_SCSI_SATA_SIL is not set
  9098. @@ -518,7 +515,6 @@
  9099. CONFIG_SERIAL_CONSOLE=y
  9100. # CONFIG_SERIAL_EXTENDED is not set
  9101. # CONFIG_SERIAL_NONSTANDARD is not set
  9102. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  9103. # CONFIG_VR41XX_KIU is not set
  9104. CONFIG_UNIX98_PTYS=y
  9105. CONFIG_UNIX98_PTY_COUNT=256
  9106. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-tb0229 linux-2.4.32-rc1.mips/arch/mips/defconfig-tb0229
  9107. --- linux-2.4.32-rc1/arch/mips/defconfig-tb0229 2005-01-19 15:09:29.000000000 +0100
  9108. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-tb0229 2005-03-18 13:13:21.000000000 +0100
  9109. @@ -30,8 +30,8 @@
  9110. # CONFIG_MIPS_PB1000 is not set
  9111. # CONFIG_MIPS_PB1100 is not set
  9112. # CONFIG_MIPS_PB1500 is not set
  9113. -# CONFIG_MIPS_HYDROGEN3 is not set
  9114. # CONFIG_MIPS_PB1550 is not set
  9115. +# CONFIG_MIPS_HYDROGEN3 is not set
  9116. # CONFIG_MIPS_XXS1500 is not set
  9117. # CONFIG_MIPS_MTX1 is not set
  9118. # CONFIG_COGENT_CSB250 is not set
  9119. @@ -230,11 +230,6 @@
  9120. #
  9121. # CONFIG_IPX is not set
  9122. # CONFIG_ATALK is not set
  9123. -
  9124. -#
  9125. -# Appletalk devices
  9126. -#
  9127. -# CONFIG_DEV_APPLETALK is not set
  9128. # CONFIG_DECNET is not set
  9129. # CONFIG_BRIDGE is not set
  9130. # CONFIG_X25 is not set
  9131. @@ -445,7 +440,6 @@
  9132. CONFIG_SERIAL_CONSOLE=y
  9133. # CONFIG_SERIAL_EXTENDED is not set
  9134. # CONFIG_SERIAL_NONSTANDARD is not set
  9135. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  9136. # CONFIG_VR41XX_KIU is not set
  9137. CONFIG_UNIX98_PTYS=y
  9138. CONFIG_UNIX98_PTY_COUNT=256
  9139. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-ti1500 linux-2.4.32-rc1.mips/arch/mips/defconfig-ti1500
  9140. --- linux-2.4.32-rc1/arch/mips/defconfig-ti1500 2005-01-19 15:09:29.000000000 +0100
  9141. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-ti1500 2005-03-18 13:13:21.000000000 +0100
  9142. @@ -30,8 +30,8 @@
  9143. # CONFIG_MIPS_PB1000 is not set
  9144. # CONFIG_MIPS_PB1100 is not set
  9145. # CONFIG_MIPS_PB1500 is not set
  9146. -# CONFIG_MIPS_HYDROGEN3 is not set
  9147. # CONFIG_MIPS_PB1550 is not set
  9148. +# CONFIG_MIPS_HYDROGEN3 is not set
  9149. CONFIG_MIPS_XXS1500=y
  9150. # CONFIG_MIPS_MTX1 is not set
  9151. # CONFIG_COGENT_CSB250 is not set
  9152. @@ -213,9 +213,7 @@
  9153. # CONFIG_MTD_BOSPORUS is not set
  9154. CONFIG_MTD_XXS1500=y
  9155. # CONFIG_MTD_MTX1 is not set
  9156. -# CONFIG_MTD_DB1X00 is not set
  9157. # CONFIG_MTD_PB1550 is not set
  9158. -# CONFIG_MTD_HYDROGEN3 is not set
  9159. # CONFIG_MTD_MIRAGE is not set
  9160. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  9161. # CONFIG_MTD_OCELOT is not set
  9162. @@ -234,7 +232,6 @@
  9163. #
  9164. # Disk-On-Chip Device Drivers
  9165. #
  9166. -# CONFIG_MTD_DOC1000 is not set
  9167. # CONFIG_MTD_DOC2000 is not set
  9168. # CONFIG_MTD_DOC2001 is not set
  9169. # CONFIG_MTD_DOCPROBE is not set
  9170. @@ -339,11 +336,6 @@
  9171. #
  9172. # CONFIG_IPX is not set
  9173. # CONFIG_ATALK is not set
  9174. -
  9175. -#
  9176. -# Appletalk devices
  9177. -#
  9178. -# CONFIG_DEV_APPLETALK is not set
  9179. # CONFIG_DECNET is not set
  9180. # CONFIG_BRIDGE is not set
  9181. # CONFIG_X25 is not set
  9182. @@ -600,7 +592,6 @@
  9183. # CONFIG_AU1X00_USB_TTY is not set
  9184. # CONFIG_AU1X00_USB_RAW is not set
  9185. # CONFIG_TXX927_SERIAL is not set
  9186. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  9187. CONFIG_UNIX98_PTYS=y
  9188. CONFIG_UNIX98_PTY_COUNT=256
  9189. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-workpad linux-2.4.32-rc1.mips/arch/mips/defconfig-workpad
  9190. --- linux-2.4.32-rc1/arch/mips/defconfig-workpad 2005-01-19 15:09:29.000000000 +0100
  9191. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-workpad 2005-03-18 13:13:21.000000000 +0100
  9192. @@ -30,8 +30,8 @@
  9193. # CONFIG_MIPS_PB1000 is not set
  9194. # CONFIG_MIPS_PB1100 is not set
  9195. # CONFIG_MIPS_PB1500 is not set
  9196. -# CONFIG_MIPS_HYDROGEN3 is not set
  9197. # CONFIG_MIPS_PB1550 is not set
  9198. +# CONFIG_MIPS_HYDROGEN3 is not set
  9199. # CONFIG_MIPS_XXS1500 is not set
  9200. # CONFIG_MIPS_MTX1 is not set
  9201. # CONFIG_COGENT_CSB250 is not set
  9202. @@ -222,11 +222,6 @@
  9203. #
  9204. # CONFIG_IPX is not set
  9205. # CONFIG_ATALK is not set
  9206. -
  9207. -#
  9208. -# Appletalk devices
  9209. -#
  9210. -# CONFIG_DEV_APPLETALK is not set
  9211. # CONFIG_DECNET is not set
  9212. # CONFIG_BRIDGE is not set
  9213. # CONFIG_X25 is not set
  9214. @@ -426,7 +421,6 @@
  9215. # CONFIG_SERIAL_MULTIPORT is not set
  9216. # CONFIG_HUB6 is not set
  9217. # CONFIG_SERIAL_NONSTANDARD is not set
  9218. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  9219. # CONFIG_VR41XX_KIU is not set
  9220. CONFIG_UNIX98_PTYS=y
  9221. CONFIG_UNIX98_PTY_COUNT=256
  9222. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-xxs1500 linux-2.4.32-rc1.mips/arch/mips/defconfig-xxs1500
  9223. --- linux-2.4.32-rc1/arch/mips/defconfig-xxs1500 2005-01-19 15:09:29.000000000 +0100
  9224. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-xxs1500 2005-03-18 13:13:21.000000000 +0100
  9225. @@ -30,8 +30,8 @@
  9226. # CONFIG_MIPS_PB1000 is not set
  9227. # CONFIG_MIPS_PB1100 is not set
  9228. # CONFIG_MIPS_PB1500 is not set
  9229. -# CONFIG_MIPS_HYDROGEN3 is not set
  9230. # CONFIG_MIPS_PB1550 is not set
  9231. +# CONFIG_MIPS_HYDROGEN3 is not set
  9232. CONFIG_MIPS_XXS1500=y
  9233. # CONFIG_MIPS_MTX1 is not set
  9234. # CONFIG_COGENT_CSB250 is not set
  9235. @@ -213,9 +213,7 @@
  9236. # CONFIG_MTD_BOSPORUS is not set
  9237. CONFIG_MTD_XXS1500=y
  9238. # CONFIG_MTD_MTX1 is not set
  9239. -# CONFIG_MTD_DB1X00 is not set
  9240. # CONFIG_MTD_PB1550 is not set
  9241. -# CONFIG_MTD_HYDROGEN3 is not set
  9242. # CONFIG_MTD_MIRAGE is not set
  9243. # CONFIG_MTD_CSTM_MIPS_IXX is not set
  9244. # CONFIG_MTD_OCELOT is not set
  9245. @@ -234,7 +232,6 @@
  9246. #
  9247. # Disk-On-Chip Device Drivers
  9248. #
  9249. -# CONFIG_MTD_DOC1000 is not set
  9250. # CONFIG_MTD_DOC2000 is not set
  9251. # CONFIG_MTD_DOC2001 is not set
  9252. # CONFIG_MTD_DOCPROBE is not set
  9253. @@ -339,11 +336,6 @@
  9254. #
  9255. # CONFIG_IPX is not set
  9256. # CONFIG_ATALK is not set
  9257. -
  9258. -#
  9259. -# Appletalk devices
  9260. -#
  9261. -# CONFIG_DEV_APPLETALK is not set
  9262. # CONFIG_DECNET is not set
  9263. # CONFIG_BRIDGE is not set
  9264. # CONFIG_X25 is not set
  9265. @@ -671,7 +663,6 @@
  9266. # CONFIG_AU1X00_USB_TTY is not set
  9267. # CONFIG_AU1X00_USB_RAW is not set
  9268. # CONFIG_TXX927_SERIAL is not set
  9269. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  9270. CONFIG_UNIX98_PTYS=y
  9271. CONFIG_UNIX98_PTY_COUNT=256
  9272. diff -Nur linux-2.4.32-rc1/arch/mips/defconfig-yosemite linux-2.4.32-rc1.mips/arch/mips/defconfig-yosemite
  9273. --- linux-2.4.32-rc1/arch/mips/defconfig-yosemite 2005-01-19 15:09:29.000000000 +0100
  9274. +++ linux-2.4.32-rc1.mips/arch/mips/defconfig-yosemite 2005-03-18 13:13:21.000000000 +0100
  9275. @@ -30,8 +30,8 @@
  9276. # CONFIG_MIPS_PB1000 is not set
  9277. # CONFIG_MIPS_PB1100 is not set
  9278. # CONFIG_MIPS_PB1500 is not set
  9279. -# CONFIG_MIPS_HYDROGEN3 is not set
  9280. # CONFIG_MIPS_PB1550 is not set
  9281. +# CONFIG_MIPS_HYDROGEN3 is not set
  9282. # CONFIG_MIPS_XXS1500 is not set
  9283. # CONFIG_MIPS_MTX1 is not set
  9284. # CONFIG_COGENT_CSB250 is not set
  9285. @@ -227,11 +227,6 @@
  9286. #
  9287. # CONFIG_IPX is not set
  9288. # CONFIG_ATALK is not set
  9289. -
  9290. -#
  9291. -# Appletalk devices
  9292. -#
  9293. -# CONFIG_DEV_APPLETALK is not set
  9294. # CONFIG_DECNET is not set
  9295. # CONFIG_BRIDGE is not set
  9296. # CONFIG_X25 is not set
  9297. @@ -310,9 +305,11 @@
  9298. # CONFIG_SCSI_MEGARAID is not set
  9299. # CONFIG_SCSI_MEGARAID2 is not set
  9300. # CONFIG_SCSI_SATA is not set
  9301. +# CONFIG_SCSI_SATA_AHCI is not set
  9302. # CONFIG_SCSI_SATA_SVW is not set
  9303. # CONFIG_SCSI_ATA_PIIX is not set
  9304. # CONFIG_SCSI_SATA_NV is not set
  9305. +# CONFIG_SCSI_SATA_QSTOR is not set
  9306. # CONFIG_SCSI_SATA_PROMISE is not set
  9307. # CONFIG_SCSI_SATA_SX4 is not set
  9308. # CONFIG_SCSI_SATA_SIL is not set
  9309. @@ -477,7 +474,6 @@
  9310. # CONFIG_SERIAL_TXX9 is not set
  9311. # CONFIG_SERIAL_TXX9_CONSOLE is not set
  9312. # CONFIG_TXX927_SERIAL is not set
  9313. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  9314. CONFIG_UNIX98_PTYS=y
  9315. CONFIG_UNIX98_PTY_COUNT=256
  9316. diff -Nur linux-2.4.32-rc1/arch/mips/kernel/cpu-probe.c linux-2.4.32-rc1.mips/arch/mips/kernel/cpu-probe.c
  9317. --- linux-2.4.32-rc1/arch/mips/kernel/cpu-probe.c 2005-01-19 15:09:29.000000000 +0100
  9318. +++ linux-2.4.32-rc1.mips/arch/mips/kernel/cpu-probe.c 2005-05-25 15:33:22.000000000 +0200
  9319. @@ -34,21 +34,16 @@
  9320. ".set\tmips0");
  9321. }
  9322. -/* The Au1xxx wait is available only if we run CONFIG_PM and
  9323. - * the timer setup found we had a 32KHz counter available.
  9324. - * There are still problems with functions that may call au1k_wait
  9325. - * directly, but that will be discovered pretty quickly.
  9326. - */
  9327. -extern void (*au1k_wait_ptr)(void);
  9328. -void au1k_wait(void)
  9329. +/* The Au1xxx wait is available only if using 32khz counter or
  9330. + * external timer source, but specifically not CP0 Counter. */
  9331. +int allow_au1k_wait;
  9332. +
  9333. +static void au1k_wait(void)
  9334. {
  9335. -#ifdef CONFIG_PM
  9336. - unsigned long addr;
  9337. /* using the wait instruction makes CP0 counter unusable */
  9338. - __asm__("la %0,au1k_wait\n\t"
  9339. - ".set mips3\n\t"
  9340. - "cache 0x14,0(%0)\n\t"
  9341. - "cache 0x14,32(%0)\n\t"
  9342. + __asm__(".set mips3\n\t"
  9343. + "cache 0x14, 0(%0)\n\t"
  9344. + "cache 0x14, 32(%0)\n\t"
  9345. "sync\n\t"
  9346. "nop\n\t"
  9347. "wait\n\t"
  9348. @@ -57,11 +52,7 @@
  9349. "nop\n\t"
  9350. "nop\n\t"
  9351. ".set mips0\n\t"
  9352. - : : "r" (addr));
  9353. -#else
  9354. - __asm__("nop\n\t"
  9355. - "nop");
  9356. -#endif
  9357. + : : "r" (au1k_wait));
  9358. }
  9359. static inline void check_wait(void)
  9360. @@ -100,20 +91,17 @@
  9361. cpu_wait = r4k_wait;
  9362. printk(" available.\n");
  9363. break;
  9364. -#ifdef CONFIG_PM
  9365. case CPU_AU1000:
  9366. case CPU_AU1100:
  9367. case CPU_AU1500:
  9368. case CPU_AU1550:
  9369. - if (au1k_wait_ptr != NULL) {
  9370. - cpu_wait = au1k_wait_ptr;
  9371. + case CPU_AU1200:
  9372. + if (allow_au1k_wait) {
  9373. + cpu_wait = au1k_wait;
  9374. printk(" available.\n");
  9375. - }
  9376. - else {
  9377. + } else
  9378. printk(" unavailable.\n");
  9379. - }
  9380. break;
  9381. -#endif
  9382. default:
  9383. printk(" unavailable.\n");
  9384. break;
  9385. diff -Nur linux-2.4.32-rc1/arch/mips/kernel/head.S linux-2.4.32-rc1.mips/arch/mips/kernel/head.S
  9386. --- linux-2.4.32-rc1/arch/mips/kernel/head.S 2005-01-19 15:09:29.000000000 +0100
  9387. +++ linux-2.4.32-rc1.mips/arch/mips/kernel/head.S 2004-11-22 14:38:23.000000000 +0100
  9388. @@ -43,9 +43,9 @@
  9389. /* Cache Error */
  9390. LEAF(except_vec2_generic)
  9391. + .set push
  9392. .set noreorder
  9393. .set noat
  9394. - .set mips0
  9395. /*
  9396. * This is a very bad place to be. Our cache error
  9397. * detection has triggered. If we have write-back data
  9398. @@ -64,10 +64,9 @@
  9399. j cache_parity_error
  9400. nop
  9401. + .set pop
  9402. END(except_vec2_generic)
  9403. - .set at
  9404. -
  9405. /*
  9406. * Special interrupt vector for embedded MIPS. This is a
  9407. * dedicated interrupt vector which reduces interrupt processing
  9408. @@ -76,8 +75,11 @@
  9409. * size!
  9410. */
  9411. NESTED(except_vec4, 0, sp)
  9412. + .set push
  9413. + .set noreorder
  9414. 1: j 1b /* Dummy, will be replaced */
  9415. nop
  9416. + .set pop
  9417. END(except_vec4)
  9418. /*
  9419. @@ -87,8 +89,11 @@
  9420. * unconditional jump to this vector.
  9421. */
  9422. NESTED(except_vec_ejtag_debug, 0, sp)
  9423. + .set push
  9424. + .set noreorder
  9425. j ejtag_debug_handler
  9426. nop
  9427. + .set pop
  9428. END(except_vec_ejtag_debug)
  9429. __FINIT
  9430. @@ -97,6 +102,7 @@
  9431. * EJTAG debug exception handler.
  9432. */
  9433. NESTED(ejtag_debug_handler, PT_SIZE, sp)
  9434. + .set push
  9435. .set noat
  9436. .set noreorder
  9437. mtc0 k0, CP0_DESAVE
  9438. @@ -120,7 +126,7 @@
  9439. deret
  9440. .set mips0
  9441. nop
  9442. - .set at
  9443. + .set pop
  9444. END(ejtag_debug_handler)
  9445. __INIT
  9446. @@ -132,13 +138,17 @@
  9447. * unconditional jump to this vector.
  9448. */
  9449. NESTED(except_vec_nmi, 0, sp)
  9450. + .set push
  9451. + .set noreorder
  9452. j nmi_handler
  9453. nop
  9454. + .set pop
  9455. END(except_vec_nmi)
  9456. __FINIT
  9457. NESTED(nmi_handler, PT_SIZE, sp)
  9458. + .set push
  9459. .set noat
  9460. .set noreorder
  9461. .set mips3
  9462. @@ -147,8 +157,7 @@
  9463. move a0, sp
  9464. RESTORE_ALL
  9465. eret
  9466. - .set at
  9467. - .set mips0
  9468. + .set pop
  9469. END(nmi_handler)
  9470. __INIT
  9471. @@ -157,7 +166,20 @@
  9472. * Kernel entry point
  9473. */
  9474. NESTED(kernel_entry, 16, sp)
  9475. + .set push
  9476. + /*
  9477. + * For the moment disable interrupts and mark the kernel mode.
  9478. + * A full initialization of the CPU's status register is done
  9479. + * later in per_cpu_trap_init().
  9480. + */
  9481. + mfc0 t0, CP0_STATUS
  9482. + or t0, ST0_CU0|0x1f
  9483. + xor t0, 0x1f
  9484. + mtc0 t0, CP0_STATUS
  9485. +
  9486. .set noreorder
  9487. + sll zero,3 # ehb
  9488. + .set reorder
  9489. /*
  9490. * The firmware/bootloader passes argc/argp/envp
  9491. @@ -170,8 +192,8 @@
  9492. la t1, (_end - 4)
  9493. 1:
  9494. addiu t0, 4
  9495. + sw zero, (t0)
  9496. bne t0, t1, 1b
  9497. - sw zero, (t0)
  9498. /*
  9499. * Stack for kernel and init, current variable
  9500. @@ -182,7 +204,7 @@
  9501. sw t0, kernelsp
  9502. jal init_arch
  9503. - nop
  9504. + .set pop
  9505. END(kernel_entry)
  9506. @@ -193,17 +215,26 @@
  9507. * function after setting up the stack and gp registers.
  9508. */
  9509. LEAF(smp_bootstrap)
  9510. - .set push
  9511. - .set noreorder
  9512. - mtc0 zero, CP0_WIRED
  9513. - CLI
  9514. + .set push
  9515. + /*
  9516. + * For the moment disable interrupts and bootstrap exception
  9517. + * vectors and mark the kernel mode. A full initialization of
  9518. + * the CPU's status register is done later in
  9519. + * per_cpu_trap_init().
  9520. + */
  9521. mfc0 t0, CP0_STATUS
  9522. - li t1, ~(ST0_CU1|ST0_CU2|ST0_CU3|ST0_KX|ST0_SX|ST0_UX)
  9523. - and t0, t1
  9524. - or t0, (ST0_CU0);
  9525. + or t0, ST0_CU0|ST0_BEV|0x1f
  9526. + xor t0, ST0_BEV|0x1f
  9527. + mtc0 t0, CP0_STATUS
  9528. +
  9529. + .set noreorder
  9530. + sll zero,3 # ehb
  9531. + .set reorder
  9532. +
  9533. + mtc0 zero, CP0_WIRED
  9534. +
  9535. jal start_secondary
  9536. - mtc0 t0, CP0_STATUS
  9537. - .set pop
  9538. + .set pop
  9539. END(smp_bootstrap)
  9540. #endif
  9541. diff -Nur linux-2.4.32-rc1/arch/mips/kernel/process.c linux-2.4.32-rc1.mips/arch/mips/kernel/process.c
  9542. --- linux-2.4.32-rc1/arch/mips/kernel/process.c 2003-08-25 13:44:40.000000000 +0200
  9543. +++ linux-2.4.32-rc1.mips/arch/mips/kernel/process.c 2005-04-14 12:41:44.000000000 +0200
  9544. @@ -128,6 +128,26 @@
  9545. return 1;
  9546. }
  9547. +void dump_regs(elf_greg_t *gp, struct pt_regs *regs)
  9548. +{
  9549. + int i;
  9550. +
  9551. + for (i = 0; i < EF_REG0; i++)
  9552. + gp[i] = 0;
  9553. + gp[EF_REG0] = 0;
  9554. + for (i = 1; i <= 31; i++)
  9555. + gp[EF_REG0 + i] = regs->regs[i];
  9556. + gp[EF_REG26] = 0;
  9557. + gp[EF_REG27] = 0;
  9558. + gp[EF_LO] = regs->lo;
  9559. + gp[EF_HI] = regs->hi;
  9560. + gp[EF_CP0_EPC] = regs->cp0_epc;
  9561. + gp[EF_CP0_BADVADDR] = regs->cp0_badvaddr;
  9562. + gp[EF_CP0_STATUS] = regs->cp0_status;
  9563. + gp[EF_CP0_CAUSE] = regs->cp0_cause;
  9564. + gp[EF_UNUSED0] = 0;
  9565. +}
  9566. +
  9567. /*
  9568. * Create a kernel thread
  9569. */
  9570. diff -Nur linux-2.4.32-rc1/arch/mips/kernel/scall_o32.S linux-2.4.32-rc1.mips/arch/mips/kernel/scall_o32.S
  9571. --- linux-2.4.32-rc1/arch/mips/kernel/scall_o32.S 2005-01-19 15:09:29.000000000 +0100
  9572. +++ linux-2.4.32-rc1.mips/arch/mips/kernel/scall_o32.S 2005-02-07 22:21:53.000000000 +0100
  9573. @@ -121,15 +121,14 @@
  9574. trace_a_syscall:
  9575. SAVE_STATIC
  9576. - sw t2, PT_R1(sp)
  9577. + move s0, t2
  9578. jal syscall_trace
  9579. - lw t2, PT_R1(sp)
  9580. lw a0, PT_R4(sp) # Restore argument registers
  9581. lw a1, PT_R5(sp)
  9582. lw a2, PT_R6(sp)
  9583. lw a3, PT_R7(sp)
  9584. - jalr t2
  9585. + jalr s0
  9586. li t0, -EMAXERRNO - 1 # error?
  9587. sltu t0, t0, v0
  9588. diff -Nur linux-2.4.32-rc1/arch/mips/kernel/setup.c linux-2.4.32-rc1.mips/arch/mips/kernel/setup.c
  9589. --- linux-2.4.32-rc1/arch/mips/kernel/setup.c 2005-01-19 15:09:29.000000000 +0100
  9590. +++ linux-2.4.32-rc1.mips/arch/mips/kernel/setup.c 2005-01-13 22:15:57.000000000 +0100
  9591. @@ -5,7 +5,7 @@
  9592. *
  9593. * Copyright (C) 1995 Linus Torvalds
  9594. * Copyright (C) 1995 Waldorf Electronics
  9595. - * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 Ralf Baechle
  9596. + * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 01, 05 Ralf Baechle
  9597. * Copyright (C) 1996 Stoned Elipot
  9598. * Copyright (C) 2000, 2001, 2002 Maciej W. Rozycki
  9599. */
  9600. @@ -71,6 +71,8 @@
  9601. extern struct rtc_ops no_rtc_ops;
  9602. struct rtc_ops *rtc_ops;
  9603. +EXPORT_SYMBOL(rtc_ops);
  9604. +
  9605. #ifdef CONFIG_PC_KEYB
  9606. struct kbd_ops *kbd_ops;
  9607. #endif
  9608. @@ -132,10 +134,6 @@
  9609. */
  9610. load_mmu();
  9611. - /* Disable coprocessors and set FPU for 16/32 FPR register model */
  9612. - clear_c0_status(ST0_CU1|ST0_CU2|ST0_CU3|ST0_KX|ST0_SX|ST0_FR);
  9613. - set_c0_status(ST0_CU0);
  9614. -
  9615. start_kernel();
  9616. }
  9617. diff -Nur linux-2.4.32-rc1/arch/mips/kernel/traps.c linux-2.4.32-rc1.mips/arch/mips/kernel/traps.c
  9618. --- linux-2.4.32-rc1/arch/mips/kernel/traps.c 2005-01-19 15:09:29.000000000 +0100
  9619. +++ linux-2.4.32-rc1.mips/arch/mips/kernel/traps.c 2005-04-12 22:25:34.000000000 +0200
  9620. @@ -452,9 +452,10 @@
  9621. }
  9622. ll_task = current;
  9623. + compute_return_epc(regs);
  9624. +
  9625. regs->regs[(opcode & RT) >> 16] = value;
  9626. - compute_return_epc(regs);
  9627. return;
  9628. sig:
  9629. @@ -485,8 +486,8 @@
  9630. goto sig;
  9631. }
  9632. if (ll_bit == 0 || ll_task != current) {
  9633. - regs->regs[reg] = 0;
  9634. compute_return_epc(regs);
  9635. + regs->regs[reg] = 0;
  9636. return;
  9637. }
  9638. @@ -495,9 +496,9 @@
  9639. goto sig;
  9640. }
  9641. + compute_return_epc(regs);
  9642. regs->regs[reg] = 1;
  9643. - compute_return_epc(regs);
  9644. return;
  9645. sig:
  9646. @@ -887,12 +888,18 @@
  9647. void __init per_cpu_trap_init(void)
  9648. {
  9649. unsigned int cpu = smp_processor_id();
  9650. + unsigned int status_set = ST0_CU0;
  9651. - /* Some firmware leaves the BEV flag set, clear it. */
  9652. - clear_c0_status(ST0_CU3|ST0_CU2|ST0_CU1|ST0_BEV|ST0_KX|ST0_SX|ST0_UX);
  9653. -
  9654. + /*
  9655. + * Disable coprocessors and 64-bit addressing and set FPU for
  9656. + * the 16/32 FPR register model. Reset the BEV flag that some
  9657. + * firmware may have left set and the TS bit (for IP27). Set
  9658. + * XX for ISA IV code to work.
  9659. + */
  9660. if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV)
  9661. - set_c0_status(ST0_XX);
  9662. + status_set |= ST0_XX;
  9663. + change_c0_status(ST0_CU|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
  9664. + status_set);
  9665. /*
  9666. * Some MIPS CPUs have a dedicated interrupt vector which reduces the
  9667. @@ -902,7 +909,7 @@
  9668. set_c0_cause(CAUSEF_IV);
  9669. cpu_data[cpu].asid_cache = ASID_FIRST_VERSION;
  9670. - write_c0_context(cpu << 23);
  9671. + TLBMISS_HANDLER_SETUP();
  9672. atomic_inc(&init_mm.mm_count);
  9673. current->active_mm = &init_mm;
  9674. @@ -918,8 +925,6 @@
  9675. extern char except_vec4;
  9676. unsigned long i;
  9677. - per_cpu_trap_init();
  9678. -
  9679. /* Copy the generic exception handler code to it's final destination. */
  9680. memcpy((void *)(KSEG0 + 0x80), &except_vec1_generic, 0x80);
  9681. @@ -1020,10 +1025,5 @@
  9682. flush_icache_range(KSEG0, KSEG0 + 0x400);
  9683. - atomic_inc(&init_mm.mm_count); /* XXX UP? */
  9684. - current->active_mm = &init_mm;
  9685. -
  9686. - /* XXX Must be done for all CPUs */
  9687. - current_cpu_data.asid_cache = ASID_FIRST_VERSION;
  9688. - TLBMISS_HANDLER_SETUP();
  9689. + per_cpu_trap_init();
  9690. }
  9691. diff -Nur linux-2.4.32-rc1/arch/mips/lib/rtc-no.c linux-2.4.32-rc1.mips/arch/mips/lib/rtc-no.c
  9692. --- linux-2.4.32-rc1/arch/mips/lib/rtc-no.c 2004-02-18 14:36:30.000000000 +0100
  9693. +++ linux-2.4.32-rc1.mips/arch/mips/lib/rtc-no.c 2005-01-13 22:15:57.000000000 +0100
  9694. @@ -6,10 +6,9 @@
  9695. * Stub RTC routines to keep Linux from crashing on machine which don't
  9696. * have a RTC chip.
  9697. *
  9698. - * Copyright (C) 1998, 2001 by Ralf Baechle
  9699. + * Copyright (C) 1998, 2001, 2005 by Ralf Baechle
  9700. */
  9701. #include <linux/kernel.h>
  9702. -#include <linux/module.h>
  9703. #include <linux/mc146818rtc.h>
  9704. static unsigned int shouldnt_happen(void)
  9705. @@ -29,5 +28,3 @@
  9706. .rtc_write_data = (void *) &shouldnt_happen,
  9707. .rtc_bcd_mode = (void *) &shouldnt_happen
  9708. };
  9709. -
  9710. -EXPORT_SYMBOL(rtc_ops);
  9711. diff -Nur linux-2.4.32-rc1/arch/mips/lib/rtc-std.c linux-2.4.32-rc1.mips/arch/mips/lib/rtc-std.c
  9712. --- linux-2.4.32-rc1/arch/mips/lib/rtc-std.c 2004-02-18 14:36:30.000000000 +0100
  9713. +++ linux-2.4.32-rc1.mips/arch/mips/lib/rtc-std.c 2005-01-13 22:15:57.000000000 +0100
  9714. @@ -5,9 +5,8 @@
  9715. *
  9716. * RTC routines for PC style attached Dallas chip.
  9717. *
  9718. - * Copyright (C) 1998, 2001 by Ralf Baechle
  9719. + * Copyright (C) 1998, 2001, 05 by Ralf Baechle
  9720. */
  9721. -#include <linux/module.h>
  9722. #include <linux/mc146818rtc.h>
  9723. #include <asm/io.h>
  9724. @@ -33,5 +32,3 @@
  9725. &std_rtc_write_data,
  9726. &std_rtc_bcd_mode
  9727. };
  9728. -
  9729. -EXPORT_SYMBOL(rtc_ops);
  9730. diff -Nur linux-2.4.32-rc1/arch/mips/Makefile linux-2.4.32-rc1.mips/arch/mips/Makefile
  9731. --- linux-2.4.32-rc1/arch/mips/Makefile 2005-01-19 15:09:26.000000000 +0100
  9732. +++ linux-2.4.32-rc1.mips/arch/mips/Makefile 2005-01-30 09:01:26.000000000 +0100
  9733. @@ -211,7 +211,7 @@
  9734. endif
  9735. #
  9736. -# Au1000 (Alchemy Semi PB1000) eval board
  9737. +# Au1x AMD Alchemy eval boards
  9738. #
  9739. ifdef CONFIG_MIPS_PB1000
  9740. LIBS += arch/mips/au1000/pb1000/pb1000.o \
  9741. @@ -220,9 +220,6 @@
  9742. LOADADDR := 0x80100000
  9743. endif
  9744. -#
  9745. -# Au1100 (Alchemy Semi PB1100) eval board
  9746. -#
  9747. ifdef CONFIG_MIPS_PB1100
  9748. LIBS += arch/mips/au1000/pb1100/pb1100.o \
  9749. arch/mips/au1000/common/au1000.o
  9750. @@ -230,9 +227,6 @@
  9751. LOADADDR += 0x80100000
  9752. endif
  9753. -#
  9754. -# Au1500 (Alchemy Semi PB1500) eval board
  9755. -#
  9756. ifdef CONFIG_MIPS_PB1500
  9757. LIBS += arch/mips/au1000/pb1500/pb1500.o \
  9758. arch/mips/au1000/common/au1000.o
  9759. @@ -240,9 +234,6 @@
  9760. LOADADDR := 0x80100000
  9761. endif
  9762. -#
  9763. -# Au1x00 (AMD/Alchemy) eval boards
  9764. -#
  9765. ifdef CONFIG_MIPS_DB1000
  9766. LIBS += arch/mips/au1000/db1x00/db1x00.o \
  9767. arch/mips/au1000/common/au1000.o
  9768. @@ -313,6 +304,27 @@
  9769. LOADADDR += 0x80100000
  9770. endif
  9771. +ifdef CONFIG_MIPS_PB1200
  9772. +LIBS += arch/mips/au1000/pb1200/pb1200.o \
  9773. + arch/mips/au1000/common/au1000.o
  9774. +SUBDIRS += arch/mips/au1000/pb1200 arch/mips/au1000/common
  9775. +LOADADDR += 0x80100000
  9776. +endif
  9777. +
  9778. +ifdef CONFIG_MIPS_DB1200
  9779. +LIBS += arch/mips/au1000/pb1200/pb1200.o \
  9780. + arch/mips/au1000/common/au1000.o
  9781. +SUBDIRS += arch/mips/au1000/pb1200 arch/mips/au1000/common
  9782. +LOADADDR += 0x80100000
  9783. +endif
  9784. +
  9785. +ifdef CONFIG_MIPS_FICMMP
  9786. +LIBS += arch/mips/au1000/ficmmp/ficmmp.o \
  9787. + arch/mips/au1000/common/au1000.o
  9788. +SUBDIRS += arch/mips/au1000/ficmmp arch/mips/au1000/common
  9789. +LOADADDR += 0x80100000
  9790. +endif
  9791. +
  9792. #
  9793. # Cogent CSB250
  9794. diff -Nur linux-2.4.32-rc1/arch/mips/mm/cerr-sb1.c linux-2.4.32-rc1.mips/arch/mips/mm/cerr-sb1.c
  9795. --- linux-2.4.32-rc1/arch/mips/mm/cerr-sb1.c 2004-02-18 14:36:30.000000000 +0100
  9796. +++ linux-2.4.32-rc1.mips/arch/mips/mm/cerr-sb1.c 2004-12-13 18:37:23.000000000 +0100
  9797. @@ -252,14 +252,14 @@
  9798. /* Masks to select bits for Hamming parity, mask_72_64[i] for bit[i] */
  9799. static const uint64_t mask_72_64[8] = {
  9800. - 0x0738C808099264FFL,
  9801. - 0x38C808099264FF07L,
  9802. - 0xC808099264FF0738L,
  9803. - 0x08099264FF0738C8L,
  9804. - 0x099264FF0738C808L,
  9805. - 0x9264FF0738C80809L,
  9806. - 0x64FF0738C8080992L,
  9807. - 0xFF0738C808099264L
  9808. + 0x0738C808099264FFULL,
  9809. + 0x38C808099264FF07ULL,
  9810. + 0xC808099264FF0738ULL,
  9811. + 0x08099264FF0738C8ULL,
  9812. + 0x099264FF0738C808ULL,
  9813. + 0x9264FF0738C80809ULL,
  9814. + 0x64FF0738C8080992ULL,
  9815. + 0xFF0738C808099264ULL
  9816. };
  9817. /* Calculate the parity on a range of bits */
  9818. @@ -331,9 +331,9 @@
  9819. ((lru >> 4) & 0x3),
  9820. ((lru >> 6) & 0x3));
  9821. }
  9822. - va = (taglo & 0xC0000FFFFFFFE000) | addr;
  9823. + va = (taglo & 0xC0000FFFFFFFE000ULL) | addr;
  9824. if ((taglo & (1 << 31)) && (((taglo >> 62) & 0x3) == 3))
  9825. - va |= 0x3FFFF00000000000;
  9826. + va |= 0x3FFFF00000000000ULL;
  9827. valid = ((taghi >> 29) & 1);
  9828. if (valid) {
  9829. tlo_tmp = taglo & 0xfff3ff;
  9830. @@ -474,7 +474,7 @@
  9831. : "r" ((way << 13) | addr));
  9832. taglo = ((unsigned long long)taglohi << 32) | taglolo;
  9833. - pa = (taglo & 0xFFFFFFE000) | addr;
  9834. + pa = (taglo & 0xFFFFFFE000ULL) | addr;
  9835. if (way == 0) {
  9836. lru = (taghi >> 14) & 0xff;
  9837. prom_printf("[Bank %d Set 0x%02x] LRU > %d %d %d %d > MRU\n",
  9838. diff -Nur linux-2.4.32-rc1/arch/mips/mm/c-r4k.c linux-2.4.32-rc1.mips/arch/mips/mm/c-r4k.c
  9839. --- linux-2.4.32-rc1/arch/mips/mm/c-r4k.c 2005-01-19 15:09:29.000000000 +0100
  9840. +++ linux-2.4.32-rc1.mips/arch/mips/mm/c-r4k.c 2005-02-06 22:55:42.000000000 +0100
  9841. @@ -867,9 +867,16 @@
  9842. * normally they'd suffer from aliases but magic in the hardware deals
  9843. * with that for us so we don't need to take care ourselves.
  9844. */
  9845. - if (c->cputype != CPU_R10000 && c->cputype != CPU_R12000)
  9846. - if (c->dcache.waysize > PAGE_SIZE)
  9847. - c->dcache.flags |= MIPS_CACHE_ALIASES;
  9848. + switch (c->cputype) {
  9849. + case CPU_R10000:
  9850. + case CPU_R12000:
  9851. + break;
  9852. + case CPU_24K:
  9853. + if (!(read_c0_config7() & (1 << 16)))
  9854. + default:
  9855. + if (c->dcache.waysize > PAGE_SIZE)
  9856. + c->dcache.flags |= MIPS_CACHE_ALIASES;
  9857. + }
  9858. switch (c->cputype) {
  9859. case CPU_20KC:
  9860. @@ -1069,9 +1076,6 @@
  9861. probe_pcache();
  9862. setup_scache();
  9863. - if (c->dcache.sets * c->dcache.ways > PAGE_SIZE)
  9864. - c->dcache.flags |= MIPS_CACHE_ALIASES;
  9865. -
  9866. r4k_blast_dcache_page_setup();
  9867. r4k_blast_dcache_page_indexed_setup();
  9868. r4k_blast_dcache_setup();
  9869. diff -Nur linux-2.4.32-rc1/arch/mips/mm/tlbex-mips32.S linux-2.4.32-rc1.mips/arch/mips/mm/tlbex-mips32.S
  9870. --- linux-2.4.32-rc1/arch/mips/mm/tlbex-mips32.S 2004-02-18 14:36:30.000000000 +0100
  9871. +++ linux-2.4.32-rc1.mips/arch/mips/mm/tlbex-mips32.S 2004-11-29 00:33:15.000000000 +0100
  9872. @@ -196,7 +196,7 @@
  9873. .set noat; \
  9874. SAVE_ALL; \
  9875. mfc0 a2, CP0_BADVADDR; \
  9876. - STI; \
  9877. + KMODE; \
  9878. .set at; \
  9879. move a0, sp; \
  9880. jal do_page_fault; \
  9881. diff -Nur linux-2.4.32-rc1/arch/mips/mm/tlbex-r4k.S linux-2.4.32-rc1.mips/arch/mips/mm/tlbex-r4k.S
  9882. --- linux-2.4.32-rc1/arch/mips/mm/tlbex-r4k.S 2004-02-18 14:36:30.000000000 +0100
  9883. +++ linux-2.4.32-rc1.mips/arch/mips/mm/tlbex-r4k.S 2005-06-06 16:46:22.000000000 +0200
  9884. @@ -184,13 +184,10 @@
  9885. P_MTC0 k0, CP0_ENTRYLO0 # load it
  9886. PTE_SRL k1, k1, 6 # convert to entrylo1
  9887. P_MTC0 k1, CP0_ENTRYLO1 # load it
  9888. - b 1f
  9889. - rm9000_tlb_hazard
  9890. + mtc0_tlbw_hazard
  9891. tlbwr # write random tlb entry
  9892. -1:
  9893. - nop
  9894. - rm9000_tlb_hazard
  9895. - eret # return from trap
  9896. + tlbw_eret_hazard
  9897. + eret
  9898. END(except_vec0_r4000)
  9899. /* TLB refill, EXL == 0, R4600 version */
  9900. @@ -468,13 +465,9 @@
  9901. PTE_PRESENT(k0, k1, nopage_tlbl)
  9902. PTE_MAKEVALID(k0, k1)
  9903. PTE_RELOAD(k1, k0)
  9904. - rm9000_tlb_hazard
  9905. - nop
  9906. - b 1f
  9907. - tlbwi
  9908. -1:
  9909. - nop
  9910. - rm9000_tlb_hazard
  9911. + mtc0_tlbw_hazard
  9912. + tlbwi
  9913. + tlbw_eret_hazard
  9914. .set mips3
  9915. eret
  9916. .set mips0
  9917. @@ -496,13 +489,9 @@
  9918. PTE_WRITABLE(k0, k1, nopage_tlbs)
  9919. PTE_MAKEWRITE(k0, k1)
  9920. PTE_RELOAD(k1, k0)
  9921. - rm9000_tlb_hazard
  9922. - nop
  9923. - b 1f
  9924. - tlbwi
  9925. -1:
  9926. - nop
  9927. - rm9000_tlb_hazard
  9928. + mtc0_tlbw_hazard
  9929. + tlbwi
  9930. + tlbw_eret_hazard
  9931. .set mips3
  9932. eret
  9933. .set mips0
  9934. @@ -529,13 +518,9 @@
  9935. /* Now reload the entry into the tlb. */
  9936. PTE_RELOAD(k1, k0)
  9937. - rm9000_tlb_hazard
  9938. - nop
  9939. - b 1f
  9940. - tlbwi
  9941. -1:
  9942. - rm9000_tlb_hazard
  9943. - nop
  9944. + mtc0_tlbw_hazard
  9945. + tlbwi
  9946. + tlbw_eret_hazard
  9947. .set mips3
  9948. eret
  9949. .set mips0
  9950. diff -Nur linux-2.4.32-rc1/arch/mips/mm/tlb-r4k.c linux-2.4.32-rc1.mips/arch/mips/mm/tlb-r4k.c
  9951. --- linux-2.4.32-rc1/arch/mips/mm/tlb-r4k.c 2005-01-19 15:09:29.000000000 +0100
  9952. +++ linux-2.4.32-rc1.mips/arch/mips/mm/tlb-r4k.c 2004-11-25 23:18:38.000000000 +0100
  9953. @@ -3,17 +3,12 @@
  9954. * License. See the file "COPYING" in the main directory of this archive
  9955. * for more details.
  9956. *
  9957. - * r4xx0.c: R4000 processor variant specific MMU/Cache routines.
  9958. - *
  9959. * Copyright (C) 1996 David S. Miller ([email protected])
  9960. * Copyright (C) 1997, 1998, 1999, 2000 Ralf Baechle [email protected]
  9961. - *
  9962. - * To do:
  9963. - *
  9964. - * - this code is a overbloated pig
  9965. - * - many of the bug workarounds are not efficient at all, but at
  9966. - * least they are functional ...
  9967. + * Carsten Langgaard, [email protected]
  9968. + * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved.
  9969. */
  9970. +#include <linux/config.h>
  9971. #include <linux/init.h>
  9972. #include <linux/sched.h>
  9973. #include <linux/mm.h>
  9974. @@ -25,9 +20,6 @@
  9975. #include <asm/pgtable.h>
  9976. #include <asm/system.h>
  9977. -#undef DEBUG_TLB
  9978. -#undef DEBUG_TLBUPDATE
  9979. -
  9980. extern char except_vec0_nevada, except_vec0_r4000, except_vec0_r4600;
  9981. /* CP0 hazard avoidance. */
  9982. @@ -41,33 +33,23 @@
  9983. unsigned long old_ctx;
  9984. int entry;
  9985. -#ifdef DEBUG_TLB
  9986. - printk("[tlball]");
  9987. -#endif
  9988. -
  9989. local_irq_save(flags);
  9990. /* Save old context and create impossible VPN2 value */
  9991. old_ctx = read_c0_entryhi();
  9992. write_c0_entrylo0(0);
  9993. write_c0_entrylo1(0);
  9994. - BARRIER;
  9995. entry = read_c0_wired();
  9996. /* Blast 'em all away. */
  9997. while (entry < current_cpu_data.tlbsize) {
  9998. - /*
  9999. - * Make sure all entries differ. If they're not different
  10000. - * MIPS32 will take revenge ...
  10001. - */
  10002. write_c0_entryhi(KSEG0 + entry*0x2000);
  10003. write_c0_index(entry);
  10004. - BARRIER;
  10005. + mtc0_tlbw_hazard();
  10006. tlb_write_indexed();
  10007. - BARRIER;
  10008. entry++;
  10009. }
  10010. - BARRIER;
  10011. + tlbw_use_hazard();
  10012. write_c0_entryhi(old_ctx);
  10013. local_irq_restore(flags);
  10014. }
  10015. @@ -76,12 +58,8 @@
  10016. {
  10017. int cpu = smp_processor_id();
  10018. - if (cpu_context(cpu, mm) != 0) {
  10019. -#ifdef DEBUG_TLB
  10020. - printk("[tlbmm<%d>]", cpu_context(cpu, mm));
  10021. -#endif
  10022. + if (cpu_context(cpu, mm) != 0)
  10023. drop_mmu_context(mm,cpu);
  10024. - }
  10025. }
  10026. void local_flush_tlb_range(struct mm_struct *mm, unsigned long start,
  10027. @@ -93,10 +71,6 @@
  10028. unsigned long flags;
  10029. int size;
  10030. -#ifdef DEBUG_TLB
  10031. - printk("[tlbrange<%02x,%08lx,%08lx>]",
  10032. - cpu_asid(cpu, mm), start, end);
  10033. -#endif
  10034. local_irq_save(flags);
  10035. size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
  10036. size = (size + 1) >> 1;
  10037. @@ -112,7 +86,7 @@
  10038. write_c0_entryhi(start | newpid);
  10039. start += (PAGE_SIZE << 1);
  10040. - BARRIER;
  10041. + mtc0_tlbw_hazard();
  10042. tlb_probe();
  10043. BARRIER;
  10044. idx = read_c0_index();
  10045. @@ -122,10 +96,10 @@
  10046. continue;
  10047. /* Make sure all entries differ. */
  10048. write_c0_entryhi(KSEG0 + idx*0x2000);
  10049. - BARRIER;
  10050. + mtc0_tlbw_hazard();
  10051. tlb_write_indexed();
  10052. - BARRIER;
  10053. }
  10054. + tlbw_use_hazard();
  10055. write_c0_entryhi(oldpid);
  10056. } else {
  10057. drop_mmu_context(mm, cpu);
  10058. @@ -138,34 +112,30 @@
  10059. {
  10060. int cpu = smp_processor_id();
  10061. - if (!vma || cpu_context(cpu, vma->vm_mm) != 0) {
  10062. + if (cpu_context(cpu, vma->vm_mm) != 0) {
  10063. unsigned long flags;
  10064. - int oldpid, newpid, idx;
  10065. + unsigned long oldpid, newpid, idx;
  10066. -#ifdef DEBUG_TLB
  10067. - printk("[tlbpage<%d,%08lx>]", cpu_context(cpu, vma->vm_mm),
  10068. - page);
  10069. -#endif
  10070. newpid = cpu_asid(cpu, vma->vm_mm);
  10071. page &= (PAGE_MASK << 1);
  10072. local_irq_save(flags);
  10073. oldpid = read_c0_entryhi();
  10074. write_c0_entryhi(page | newpid);
  10075. - BARRIER;
  10076. + mtc0_tlbw_hazard();
  10077. tlb_probe();
  10078. BARRIER;
  10079. idx = read_c0_index();
  10080. write_c0_entrylo0(0);
  10081. write_c0_entrylo1(0);
  10082. - if(idx < 0)
  10083. + if (idx < 0)
  10084. goto finish;
  10085. /* Make sure all entries differ. */
  10086. write_c0_entryhi(KSEG0+idx*0x2000);
  10087. - BARRIER;
  10088. + mtc0_tlbw_hazard();
  10089. tlb_write_indexed();
  10090. + tlbw_use_hazard();
  10091. finish:
  10092. - BARRIER;
  10093. write_c0_entryhi(oldpid);
  10094. local_irq_restore(flags);
  10095. }
  10096. @@ -185,7 +155,7 @@
  10097. local_irq_save(flags);
  10098. write_c0_entryhi(page);
  10099. - BARRIER;
  10100. + mtc0_tlbw_hazard();
  10101. tlb_probe();
  10102. BARRIER;
  10103. idx = read_c0_index();
  10104. @@ -194,18 +164,19 @@
  10105. if (idx >= 0) {
  10106. /* Make sure all entries differ. */
  10107. write_c0_entryhi(KSEG0+idx*0x2000);
  10108. + mtc0_tlbw_hazard();
  10109. tlb_write_indexed();
  10110. + tlbw_use_hazard();
  10111. }
  10112. - BARRIER;
  10113. write_c0_entryhi(oldpid);
  10114. +
  10115. local_irq_restore(flags);
  10116. }
  10117. EXPORT_SYMBOL(local_flush_tlb_one);
  10118. -/* We will need multiple versions of update_mmu_cache(), one that just
  10119. - * updates the TLB with the new pte(s), and another which also checks
  10120. - * for the R4k "end of page" hardware bug and does the needy.
  10121. +/*
  10122. + * Updates the TLB with the new pte(s).
  10123. */
  10124. void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte)
  10125. {
  10126. @@ -223,25 +194,16 @@
  10127. pid = read_c0_entryhi() & ASID_MASK;
  10128. -#ifdef DEBUG_TLB
  10129. - if ((pid != cpu_asid(cpu, vma->vm_mm)) ||
  10130. - (cpu_context(vma->vm_mm) == 0)) {
  10131. - printk("update_mmu_cache: Wheee, bogus tlbpid mmpid=%d "
  10132. - "tlbpid=%d\n", (int) (cpu_asid(cpu, vma->vm_mm)), pid);
  10133. - }
  10134. -#endif
  10135. -
  10136. local_irq_save(flags);
  10137. address &= (PAGE_MASK << 1);
  10138. write_c0_entryhi(address | pid);
  10139. pgdp = pgd_offset(vma->vm_mm, address);
  10140. - BARRIER;
  10141. + mtc0_tlbw_hazard();
  10142. tlb_probe();
  10143. BARRIER;
  10144. pmdp = pmd_offset(pgdp, address);
  10145. idx = read_c0_index();
  10146. ptep = pte_offset(pmdp, address);
  10147. - BARRIER;
  10148. #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32)
  10149. write_c0_entrylo0(ptep->pte_high);
  10150. ptep++;
  10151. @@ -251,15 +213,13 @@
  10152. write_c0_entrylo1(pte_val(*ptep) >> 6);
  10153. #endif
  10154. write_c0_entryhi(address | pid);
  10155. - BARRIER;
  10156. - if (idx < 0) {
  10157. + mtc0_tlbw_hazard();
  10158. + if (idx < 0)
  10159. tlb_write_random();
  10160. - } else {
  10161. + else
  10162. tlb_write_indexed();
  10163. - }
  10164. - BARRIER;
  10165. + tlbw_use_hazard();
  10166. write_c0_entryhi(pid);
  10167. - BARRIER;
  10168. local_irq_restore(flags);
  10169. }
  10170. @@ -279,24 +239,26 @@
  10171. asid = read_c0_entryhi() & ASID_MASK;
  10172. write_c0_entryhi(address | asid);
  10173. pgdp = pgd_offset(vma->vm_mm, address);
  10174. + mtc0_tlbw_hazard();
  10175. tlb_probe();
  10176. + BARRIER;
  10177. pmdp = pmd_offset(pgdp, address);
  10178. idx = read_c0_index();
  10179. ptep = pte_offset(pmdp, address);
  10180. write_c0_entrylo0(pte_val(*ptep++) >> 6);
  10181. write_c0_entrylo1(pte_val(*ptep) >> 6);
  10182. - BARRIER;
  10183. + mtc0_tlbw_hazard();
  10184. if (idx < 0)
  10185. tlb_write_random();
  10186. else
  10187. tlb_write_indexed();
  10188. - BARRIER;
  10189. + tlbw_use_hazard();
  10190. local_irq_restore(flags);
  10191. }
  10192. #endif
  10193. void __init add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
  10194. - unsigned long entryhi, unsigned long pagemask)
  10195. + unsigned long entryhi, unsigned long pagemask)
  10196. {
  10197. unsigned long flags;
  10198. unsigned long wired;
  10199. @@ -315,9 +277,9 @@
  10200. write_c0_entryhi(entryhi);
  10201. write_c0_entrylo0(entrylo0);
  10202. write_c0_entrylo1(entrylo1);
  10203. - BARRIER;
  10204. + mtc0_tlbw_hazard();
  10205. tlb_write_indexed();
  10206. - BARRIER;
  10207. + tlbw_use_hazard();
  10208. write_c0_entryhi(old_ctx);
  10209. BARRIER;
  10210. @@ -355,17 +317,15 @@
  10211. }
  10212. write_c0_index(temp_tlb_entry);
  10213. - BARRIER;
  10214. write_c0_pagemask(pagemask);
  10215. write_c0_entryhi(entryhi);
  10216. write_c0_entrylo0(entrylo0);
  10217. write_c0_entrylo1(entrylo1);
  10218. - BARRIER;
  10219. + mtc0_tlbw_hazard();
  10220. tlb_write_indexed();
  10221. - BARRIER;
  10222. + tlbw_use_hazard();
  10223. write_c0_entryhi(old_ctx);
  10224. - BARRIER;
  10225. write_c0_pagemask(old_pagemask);
  10226. out:
  10227. local_irq_restore(flags);
  10228. @@ -375,7 +335,7 @@
  10229. static void __init probe_tlb(unsigned long config)
  10230. {
  10231. struct cpuinfo_mips *c = &current_cpu_data;
  10232. - unsigned int reg;
  10233. + unsigned int config1;
  10234. /*
  10235. * If this isn't a MIPS32 / MIPS64 compliant CPU. Config 1 register
  10236. @@ -385,16 +345,16 @@
  10237. if ((c->processor_id & 0xff0000) == PRID_COMP_LEGACY)
  10238. return;
  10239. - reg = read_c0_config1();
  10240. + config1 = read_c0_config1();
  10241. if (!((config >> 7) & 3))
  10242. panic("No TLB present");
  10243. - c->tlbsize = ((reg >> 25) & 0x3f) + 1;
  10244. + c->tlbsize = ((config1 >> 25) & 0x3f) + 1;
  10245. }
  10246. void __init r4k_tlb_init(void)
  10247. {
  10248. - u32 config = read_c0_config();
  10249. + unsigned int config = read_c0_config();
  10250. /*
  10251. * You should never change this register:
  10252. diff -Nur linux-2.4.32-rc1/arch/mips64/defconfig linux-2.4.32-rc1.mips/arch/mips64/defconfig
  10253. --- linux-2.4.32-rc1/arch/mips64/defconfig 2005-01-19 15:09:30.000000000 +0100
  10254. +++ linux-2.4.32-rc1.mips/arch/mips64/defconfig 2005-03-18 13:13:23.000000000 +0100
  10255. @@ -30,8 +30,8 @@
  10256. # CONFIG_MIPS_PB1000 is not set
  10257. # CONFIG_MIPS_PB1100 is not set
  10258. # CONFIG_MIPS_PB1500 is not set
  10259. -# CONFIG_MIPS_HYDROGEN3 is not set
  10260. # CONFIG_MIPS_PB1550 is not set
  10261. +# CONFIG_MIPS_HYDROGEN3 is not set
  10262. # CONFIG_MIPS_XXS1500 is not set
  10263. # CONFIG_MIPS_MTX1 is not set
  10264. # CONFIG_COGENT_CSB250 is not set
  10265. @@ -470,9 +470,11 @@
  10266. # CONFIG_SCSI_MEGARAID is not set
  10267. # CONFIG_SCSI_MEGARAID2 is not set
  10268. # CONFIG_SCSI_SATA is not set
  10269. +# CONFIG_SCSI_SATA_AHCI is not set
  10270. # CONFIG_SCSI_SATA_SVW is not set
  10271. # CONFIG_SCSI_ATA_PIIX is not set
  10272. # CONFIG_SCSI_SATA_NV is not set
  10273. +# CONFIG_SCSI_SATA_QSTOR is not set
  10274. # CONFIG_SCSI_SATA_PROMISE is not set
  10275. # CONFIG_SCSI_SATA_SX4 is not set
  10276. # CONFIG_SCSI_SATA_SIL is not set
  10277. @@ -658,7 +660,6 @@
  10278. CONFIG_SERIAL_CONSOLE=y
  10279. # CONFIG_SERIAL_EXTENDED is not set
  10280. # CONFIG_SERIAL_NONSTANDARD is not set
  10281. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  10282. CONFIG_UNIX98_PTYS=y
  10283. CONFIG_UNIX98_PTY_COUNT=256
  10284. diff -Nur linux-2.4.32-rc1/arch/mips64/defconfig-atlas linux-2.4.32-rc1.mips/arch/mips64/defconfig-atlas
  10285. --- linux-2.4.32-rc1/arch/mips64/defconfig-atlas 2005-01-19 15:09:30.000000000 +0100
  10286. +++ linux-2.4.32-rc1.mips/arch/mips64/defconfig-atlas 2005-03-18 13:13:23.000000000 +0100
  10287. @@ -28,8 +28,8 @@
  10288. # CONFIG_MIPS_PB1000 is not set
  10289. # CONFIG_MIPS_PB1100 is not set
  10290. # CONFIG_MIPS_PB1500 is not set
  10291. -# CONFIG_MIPS_HYDROGEN3 is not set
  10292. # CONFIG_MIPS_PB1550 is not set
  10293. +# CONFIG_MIPS_HYDROGEN3 is not set
  10294. # CONFIG_MIPS_XXS1500 is not set
  10295. # CONFIG_MIPS_MTX1 is not set
  10296. # CONFIG_COGENT_CSB250 is not set
  10297. @@ -232,11 +232,6 @@
  10298. #
  10299. # CONFIG_IPX is not set
  10300. # CONFIG_ATALK is not set
  10301. -
  10302. -#
  10303. -# Appletalk devices
  10304. -#
  10305. -# CONFIG_DEV_APPLETALK is not set
  10306. # CONFIG_DECNET is not set
  10307. # CONFIG_BRIDGE is not set
  10308. # CONFIG_X25 is not set
  10309. @@ -314,9 +309,11 @@
  10310. # CONFIG_SCSI_MEGARAID is not set
  10311. # CONFIG_SCSI_MEGARAID2 is not set
  10312. # CONFIG_SCSI_SATA is not set
  10313. +# CONFIG_SCSI_SATA_AHCI is not set
  10314. # CONFIG_SCSI_SATA_SVW is not set
  10315. # CONFIG_SCSI_ATA_PIIX is not set
  10316. # CONFIG_SCSI_SATA_NV is not set
  10317. +# CONFIG_SCSI_SATA_QSTOR is not set
  10318. # CONFIG_SCSI_SATA_PROMISE is not set
  10319. # CONFIG_SCSI_SATA_SX4 is not set
  10320. # CONFIG_SCSI_SATA_SIL is not set
  10321. @@ -474,7 +471,6 @@
  10322. CONFIG_SERIAL_CONSOLE=y
  10323. # CONFIG_SERIAL_EXTENDED is not set
  10324. # CONFIG_SERIAL_NONSTANDARD is not set
  10325. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  10326. CONFIG_UNIX98_PTYS=y
  10327. CONFIG_UNIX98_PTY_COUNT=256
  10328. diff -Nur linux-2.4.32-rc1/arch/mips64/defconfig-decstation linux-2.4.32-rc1.mips/arch/mips64/defconfig-decstation
  10329. --- linux-2.4.32-rc1/arch/mips64/defconfig-decstation 2005-01-19 15:09:30.000000000 +0100
  10330. +++ linux-2.4.32-rc1.mips/arch/mips64/defconfig-decstation 2005-03-18 13:13:23.000000000 +0100
  10331. @@ -28,8 +28,8 @@
  10332. # CONFIG_MIPS_PB1000 is not set
  10333. # CONFIG_MIPS_PB1100 is not set
  10334. # CONFIG_MIPS_PB1500 is not set
  10335. -# CONFIG_MIPS_HYDROGEN3 is not set
  10336. # CONFIG_MIPS_PB1550 is not set
  10337. +# CONFIG_MIPS_HYDROGEN3 is not set
  10338. # CONFIG_MIPS_XXS1500 is not set
  10339. # CONFIG_MIPS_MTX1 is not set
  10340. # CONFIG_COGENT_CSB250 is not set
  10341. @@ -224,11 +224,6 @@
  10342. #
  10343. # CONFIG_IPX is not set
  10344. # CONFIG_ATALK is not set
  10345. -
  10346. -#
  10347. -# Appletalk devices
  10348. -#
  10349. -# CONFIG_DEV_APPLETALK is not set
  10350. # CONFIG_DECNET is not set
  10351. # CONFIG_BRIDGE is not set
  10352. # CONFIG_X25 is not set
  10353. @@ -307,9 +302,11 @@
  10354. # CONFIG_SCSI_MEGARAID is not set
  10355. # CONFIG_SCSI_MEGARAID2 is not set
  10356. # CONFIG_SCSI_SATA is not set
  10357. +# CONFIG_SCSI_SATA_AHCI is not set
  10358. # CONFIG_SCSI_SATA_SVW is not set
  10359. # CONFIG_SCSI_ATA_PIIX is not set
  10360. # CONFIG_SCSI_SATA_NV is not set
  10361. +# CONFIG_SCSI_SATA_QSTOR is not set
  10362. # CONFIG_SCSI_SATA_PROMISE is not set
  10363. # CONFIG_SCSI_SATA_SX4 is not set
  10364. # CONFIG_SCSI_SATA_SIL is not set
  10365. @@ -477,7 +474,6 @@
  10366. CONFIG_SERIAL_DEC_CONSOLE=y
  10367. # CONFIG_DZ is not set
  10368. CONFIG_ZS=y
  10369. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  10370. CONFIG_UNIX98_PTYS=y
  10371. CONFIG_UNIX98_PTY_COUNT=256
  10372. diff -Nur linux-2.4.32-rc1/arch/mips64/defconfig-ip22 linux-2.4.32-rc1.mips/arch/mips64/defconfig-ip22
  10373. --- linux-2.4.32-rc1/arch/mips64/defconfig-ip22 2005-01-19 15:09:31.000000000 +0100
  10374. +++ linux-2.4.32-rc1.mips/arch/mips64/defconfig-ip22 2005-03-18 13:13:23.000000000 +0100
  10375. @@ -30,8 +30,8 @@
  10376. # CONFIG_MIPS_PB1000 is not set
  10377. # CONFIG_MIPS_PB1100 is not set
  10378. # CONFIG_MIPS_PB1500 is not set
  10379. -# CONFIG_MIPS_HYDROGEN3 is not set
  10380. # CONFIG_MIPS_PB1550 is not set
  10381. +# CONFIG_MIPS_HYDROGEN3 is not set
  10382. # CONFIG_MIPS_XXS1500 is not set
  10383. # CONFIG_MIPS_MTX1 is not set
  10384. # CONFIG_COGENT_CSB250 is not set
  10385. @@ -235,11 +235,6 @@
  10386. #
  10387. # CONFIG_IPX is not set
  10388. # CONFIG_ATALK is not set
  10389. -
  10390. -#
  10391. -# Appletalk devices
  10392. -#
  10393. -# CONFIG_DEV_APPLETALK is not set
  10394. # CONFIG_DECNET is not set
  10395. # CONFIG_BRIDGE is not set
  10396. # CONFIG_X25 is not set
  10397. @@ -319,9 +314,11 @@
  10398. # CONFIG_SCSI_MEGARAID is not set
  10399. # CONFIG_SCSI_MEGARAID2 is not set
  10400. # CONFIG_SCSI_SATA is not set
  10401. +# CONFIG_SCSI_SATA_AHCI is not set
  10402. # CONFIG_SCSI_SATA_SVW is not set
  10403. # CONFIG_SCSI_ATA_PIIX is not set
  10404. # CONFIG_SCSI_SATA_NV is not set
  10405. +# CONFIG_SCSI_SATA_QSTOR is not set
  10406. # CONFIG_SCSI_SATA_PROMISE is not set
  10407. # CONFIG_SCSI_SATA_SX4 is not set
  10408. # CONFIG_SCSI_SATA_SIL is not set
  10409. @@ -488,7 +485,6 @@
  10410. # CONFIG_SERIAL_TXX9_CONSOLE is not set
  10411. # CONFIG_TXX927_SERIAL is not set
  10412. CONFIG_IP22_SERIAL=y
  10413. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  10414. CONFIG_UNIX98_PTYS=y
  10415. CONFIG_UNIX98_PTY_COUNT=256
  10416. diff -Nur linux-2.4.32-rc1/arch/mips64/defconfig-ip27 linux-2.4.32-rc1.mips/arch/mips64/defconfig-ip27
  10417. --- linux-2.4.32-rc1/arch/mips64/defconfig-ip27 2005-01-19 15:09:31.000000000 +0100
  10418. +++ linux-2.4.32-rc1.mips/arch/mips64/defconfig-ip27 2005-03-18 13:13:23.000000000 +0100
  10419. @@ -30,8 +30,8 @@
  10420. # CONFIG_MIPS_PB1000 is not set
  10421. # CONFIG_MIPS_PB1100 is not set
  10422. # CONFIG_MIPS_PB1500 is not set
  10423. -# CONFIG_MIPS_HYDROGEN3 is not set
  10424. # CONFIG_MIPS_PB1550 is not set
  10425. +# CONFIG_MIPS_HYDROGEN3 is not set
  10426. # CONFIG_MIPS_XXS1500 is not set
  10427. # CONFIG_MIPS_MTX1 is not set
  10428. # CONFIG_COGENT_CSB250 is not set
  10429. @@ -470,9 +470,11 @@
  10430. # CONFIG_SCSI_MEGARAID is not set
  10431. # CONFIG_SCSI_MEGARAID2 is not set
  10432. # CONFIG_SCSI_SATA is not set
  10433. +# CONFIG_SCSI_SATA_AHCI is not set
  10434. # CONFIG_SCSI_SATA_SVW is not set
  10435. # CONFIG_SCSI_ATA_PIIX is not set
  10436. # CONFIG_SCSI_SATA_NV is not set
  10437. +# CONFIG_SCSI_SATA_QSTOR is not set
  10438. # CONFIG_SCSI_SATA_PROMISE is not set
  10439. # CONFIG_SCSI_SATA_SX4 is not set
  10440. # CONFIG_SCSI_SATA_SIL is not set
  10441. @@ -658,7 +660,6 @@
  10442. CONFIG_SERIAL_CONSOLE=y
  10443. # CONFIG_SERIAL_EXTENDED is not set
  10444. # CONFIG_SERIAL_NONSTANDARD is not set
  10445. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  10446. CONFIG_UNIX98_PTYS=y
  10447. CONFIG_UNIX98_PTY_COUNT=256
  10448. diff -Nur linux-2.4.32-rc1/arch/mips64/defconfig-jaguar linux-2.4.32-rc1.mips/arch/mips64/defconfig-jaguar
  10449. --- linux-2.4.32-rc1/arch/mips64/defconfig-jaguar 2005-01-19 15:09:31.000000000 +0100
  10450. +++ linux-2.4.32-rc1.mips/arch/mips64/defconfig-jaguar 2005-03-18 13:13:23.000000000 +0100
  10451. @@ -30,8 +30,8 @@
  10452. # CONFIG_MIPS_PB1000 is not set
  10453. # CONFIG_MIPS_PB1100 is not set
  10454. # CONFIG_MIPS_PB1500 is not set
  10455. -# CONFIG_MIPS_HYDROGEN3 is not set
  10456. # CONFIG_MIPS_PB1550 is not set
  10457. +# CONFIG_MIPS_HYDROGEN3 is not set
  10458. # CONFIG_MIPS_XXS1500 is not set
  10459. # CONFIG_MIPS_MTX1 is not set
  10460. # CONFIG_COGENT_CSB250 is not set
  10461. @@ -227,11 +227,6 @@
  10462. #
  10463. # CONFIG_IPX is not set
  10464. # CONFIG_ATALK is not set
  10465. -
  10466. -#
  10467. -# Appletalk devices
  10468. -#
  10469. -# CONFIG_DEV_APPLETALK is not set
  10470. # CONFIG_DECNET is not set
  10471. # CONFIG_BRIDGE is not set
  10472. # CONFIG_X25 is not set
  10473. @@ -403,7 +398,6 @@
  10474. # CONFIG_SERIAL_TXX9 is not set
  10475. # CONFIG_SERIAL_TXX9_CONSOLE is not set
  10476. # CONFIG_TXX927_SERIAL is not set
  10477. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  10478. CONFIG_UNIX98_PTYS=y
  10479. CONFIG_UNIX98_PTY_COUNT=256
  10480. diff -Nur linux-2.4.32-rc1/arch/mips64/defconfig-malta linux-2.4.32-rc1.mips/arch/mips64/defconfig-malta
  10481. --- linux-2.4.32-rc1/arch/mips64/defconfig-malta 2005-01-19 15:09:31.000000000 +0100
  10482. +++ linux-2.4.32-rc1.mips/arch/mips64/defconfig-malta 2005-04-19 14:19:34.000000000 +0200
  10483. @@ -22,16 +22,19 @@
  10484. #
  10485. # CONFIG_ACER_PICA_61 is not set
  10486. # CONFIG_MIPS_BOSPORUS is not set
  10487. +# CONFIG_MIPS_FICMMP is not set
  10488. # CONFIG_MIPS_MIRAGE is not set
  10489. # CONFIG_MIPS_DB1000 is not set
  10490. # CONFIG_MIPS_DB1100 is not set
  10491. # CONFIG_MIPS_DB1500 is not set
  10492. # CONFIG_MIPS_DB1550 is not set
  10493. +# CONFIG_MIPS_DB1200 is not set
  10494. # CONFIG_MIPS_PB1000 is not set
  10495. # CONFIG_MIPS_PB1100 is not set
  10496. # CONFIG_MIPS_PB1500 is not set
  10497. -# CONFIG_MIPS_HYDROGEN3 is not set
  10498. # CONFIG_MIPS_PB1550 is not set
  10499. +# CONFIG_MIPS_PB1200 is not set
  10500. +# CONFIG_MIPS_HYDROGEN3 is not set
  10501. # CONFIG_MIPS_XXS1500 is not set
  10502. # CONFIG_MIPS_MTX1 is not set
  10503. # CONFIG_COGENT_CSB250 is not set
  10504. @@ -146,9 +149,9 @@
  10505. CONFIG_BINFMT_ELF=y
  10506. CONFIG_MIPS32_COMPAT=y
  10507. CONFIG_MIPS32_O32=y
  10508. -# CONFIG_MIPS32_N32 is not set
  10509. +CONFIG_MIPS32_N32=y
  10510. CONFIG_BINFMT_ELF32=y
  10511. -# CONFIG_BINFMT_MISC is not set
  10512. +CONFIG_BINFMT_MISC=y
  10513. # CONFIG_OOM_KILLER is not set
  10514. # CONFIG_CMDLINE_BOOL is not set
  10515. @@ -235,11 +238,6 @@
  10516. #
  10517. # CONFIG_IPX is not set
  10518. # CONFIG_ATALK is not set
  10519. -
  10520. -#
  10521. -# Appletalk devices
  10522. -#
  10523. -# CONFIG_DEV_APPLETALK is not set
  10524. # CONFIG_DECNET is not set
  10525. # CONFIG_BRIDGE is not set
  10526. # CONFIG_X25 is not set
  10527. @@ -271,8 +269,83 @@
  10528. #
  10529. # ATA/IDE/MFM/RLL support
  10530. #
  10531. -# CONFIG_IDE is not set
  10532. +CONFIG_IDE=y
  10533. +
  10534. +#
  10535. +# IDE, ATA and ATAPI Block devices
  10536. +#
  10537. +CONFIG_BLK_DEV_IDE=y
  10538. +
  10539. +#
  10540. +# Please see Documentation/ide.txt for help/info on IDE drives
  10541. +#
  10542. +# CONFIG_BLK_DEV_HD_IDE is not set
  10543. # CONFIG_BLK_DEV_HD is not set
  10544. +# CONFIG_BLK_DEV_IDE_SATA is not set
  10545. +CONFIG_BLK_DEV_IDEDISK=y
  10546. +# CONFIG_IDEDISK_MULTI_MODE is not set
  10547. +# CONFIG_IDEDISK_STROKE is not set
  10548. +# CONFIG_BLK_DEV_IDECS is not set
  10549. +# CONFIG_BLK_DEV_DELKIN is not set
  10550. +CONFIG_BLK_DEV_IDECD=y
  10551. +CONFIG_BLK_DEV_IDETAPE=y
  10552. +CONFIG_BLK_DEV_IDEFLOPPY=y
  10553. +# CONFIG_BLK_DEV_IDESCSI is not set
  10554. +# CONFIG_IDE_TASK_IOCTL is not set
  10555. +
  10556. +#
  10557. +# IDE chipset support/bugfixes
  10558. +#
  10559. +# CONFIG_BLK_DEV_CMD640 is not set
  10560. +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
  10561. +# CONFIG_BLK_DEV_ISAPNP is not set
  10562. +CONFIG_BLK_DEV_IDEPCI=y
  10563. +CONFIG_BLK_DEV_GENERIC=y
  10564. +CONFIG_IDEPCI_SHARE_IRQ=y
  10565. +CONFIG_BLK_DEV_IDEDMA_PCI=y
  10566. +# CONFIG_BLK_DEV_OFFBOARD is not set
  10567. +CONFIG_BLK_DEV_IDEDMA_FORCED=y
  10568. +CONFIG_IDEDMA_PCI_AUTO=y
  10569. +# CONFIG_IDEDMA_ONLYDISK is not set
  10570. +CONFIG_BLK_DEV_IDEDMA=y
  10571. +# CONFIG_IDEDMA_PCI_WIP is not set
  10572. +# CONFIG_BLK_DEV_ADMA100 is not set
  10573. +# CONFIG_BLK_DEV_AEC62XX is not set
  10574. +# CONFIG_BLK_DEV_ALI15X3 is not set
  10575. +# CONFIG_WDC_ALI15X3 is not set
  10576. +# CONFIG_BLK_DEV_AMD74XX is not set
  10577. +# CONFIG_AMD74XX_OVERRIDE is not set
  10578. +# CONFIG_BLK_DEV_ATIIXP is not set
  10579. +# CONFIG_BLK_DEV_CMD64X is not set
  10580. +# CONFIG_BLK_DEV_TRIFLEX is not set
  10581. +# CONFIG_BLK_DEV_CY82C693 is not set
  10582. +# CONFIG_BLK_DEV_CS5530 is not set
  10583. +# CONFIG_BLK_DEV_HPT34X is not set
  10584. +# CONFIG_HPT34X_AUTODMA is not set
  10585. +# CONFIG_BLK_DEV_HPT366 is not set
  10586. +CONFIG_BLK_DEV_PIIX=y
  10587. +# CONFIG_BLK_DEV_NS87415 is not set
  10588. +# CONFIG_BLK_DEV_OPTI621 is not set
  10589. +# CONFIG_BLK_DEV_PDC202XX_OLD is not set
  10590. +# CONFIG_PDC202XX_BURST is not set
  10591. +# CONFIG_BLK_DEV_PDC202XX_NEW is not set
  10592. +# CONFIG_BLK_DEV_RZ1000 is not set
  10593. +# CONFIG_BLK_DEV_SC1200 is not set
  10594. +# CONFIG_BLK_DEV_SVWKS is not set
  10595. +# CONFIG_BLK_DEV_SIIMAGE is not set
  10596. +# CONFIG_BLK_DEV_SIS5513 is not set
  10597. +# CONFIG_BLK_DEV_SLC90E66 is not set
  10598. +# CONFIG_BLK_DEV_TRM290 is not set
  10599. +# CONFIG_BLK_DEV_VIA82CXXX is not set
  10600. +# CONFIG_IDE_CHIPSETS is not set
  10601. +CONFIG_IDEDMA_AUTO=y
  10602. +# CONFIG_IDEDMA_IVB is not set
  10603. +# CONFIG_DMA_NONPCI is not set
  10604. +# CONFIG_BLK_DEV_ATARAID is not set
  10605. +# CONFIG_BLK_DEV_ATARAID_PDC is not set
  10606. +# CONFIG_BLK_DEV_ATARAID_HPT is not set
  10607. +# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
  10608. +# CONFIG_BLK_DEV_ATARAID_SII is not set
  10609. #
  10610. # SCSI support
  10611. @@ -317,9 +390,11 @@
  10612. # CONFIG_SCSI_MEGARAID is not set
  10613. # CONFIG_SCSI_MEGARAID2 is not set
  10614. # CONFIG_SCSI_SATA is not set
  10615. +# CONFIG_SCSI_SATA_AHCI is not set
  10616. # CONFIG_SCSI_SATA_SVW is not set
  10617. # CONFIG_SCSI_ATA_PIIX is not set
  10618. # CONFIG_SCSI_SATA_NV is not set
  10619. +# CONFIG_SCSI_SATA_QSTOR is not set
  10620. # CONFIG_SCSI_SATA_PROMISE is not set
  10621. # CONFIG_SCSI_SATA_SX4 is not set
  10622. # CONFIG_SCSI_SATA_SIL is not set
  10623. @@ -477,7 +552,6 @@
  10624. CONFIG_SERIAL_CONSOLE=y
  10625. # CONFIG_SERIAL_EXTENDED is not set
  10626. # CONFIG_SERIAL_NONSTANDARD is not set
  10627. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  10628. CONFIG_UNIX98_PTYS=y
  10629. CONFIG_UNIX98_PTY_COUNT=256
  10630. diff -Nur linux-2.4.32-rc1/arch/mips64/defconfig-ocelotc linux-2.4.32-rc1.mips/arch/mips64/defconfig-ocelotc
  10631. --- linux-2.4.32-rc1/arch/mips64/defconfig-ocelotc 2005-01-19 15:09:31.000000000 +0100
  10632. +++ linux-2.4.32-rc1.mips/arch/mips64/defconfig-ocelotc 2005-03-18 13:13:23.000000000 +0100
  10633. @@ -30,8 +30,8 @@
  10634. # CONFIG_MIPS_PB1000 is not set
  10635. # CONFIG_MIPS_PB1100 is not set
  10636. # CONFIG_MIPS_PB1500 is not set
  10637. -# CONFIG_MIPS_HYDROGEN3 is not set
  10638. # CONFIG_MIPS_PB1550 is not set
  10639. +# CONFIG_MIPS_HYDROGEN3 is not set
  10640. # CONFIG_MIPS_XXS1500 is not set
  10641. # CONFIG_MIPS_MTX1 is not set
  10642. # CONFIG_COGENT_CSB250 is not set
  10643. @@ -231,11 +231,6 @@
  10644. #
  10645. # CONFIG_IPX is not set
  10646. # CONFIG_ATALK is not set
  10647. -
  10648. -#
  10649. -# Appletalk devices
  10650. -#
  10651. -# CONFIG_DEV_APPLETALK is not set
  10652. # CONFIG_DECNET is not set
  10653. # CONFIG_BRIDGE is not set
  10654. # CONFIG_X25 is not set
  10655. @@ -453,7 +448,6 @@
  10656. # CONFIG_SERIAL_TXX9 is not set
  10657. # CONFIG_SERIAL_TXX9_CONSOLE is not set
  10658. # CONFIG_TXX927_SERIAL is not set
  10659. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  10660. CONFIG_UNIX98_PTYS=y
  10661. CONFIG_UNIX98_PTY_COUNT=256
  10662. diff -Nur linux-2.4.32-rc1/arch/mips64/defconfig-sb1250-swarm linux-2.4.32-rc1.mips/arch/mips64/defconfig-sb1250-swarm
  10663. --- linux-2.4.32-rc1/arch/mips64/defconfig-sb1250-swarm 2005-01-19 15:09:31.000000000 +0100
  10664. +++ linux-2.4.32-rc1.mips/arch/mips64/defconfig-sb1250-swarm 2005-03-18 13:13:23.000000000 +0100
  10665. @@ -30,8 +30,8 @@
  10666. # CONFIG_MIPS_PB1000 is not set
  10667. # CONFIG_MIPS_PB1100 is not set
  10668. # CONFIG_MIPS_PB1500 is not set
  10669. -# CONFIG_MIPS_HYDROGEN3 is not set
  10670. # CONFIG_MIPS_PB1550 is not set
  10671. +# CONFIG_MIPS_HYDROGEN3 is not set
  10672. # CONFIG_MIPS_XXS1500 is not set
  10673. # CONFIG_MIPS_MTX1 is not set
  10674. # CONFIG_COGENT_CSB250 is not set
  10675. @@ -90,6 +90,7 @@
  10676. # CONFIG_SIBYTE_TBPROF is not set
  10677. CONFIG_SIBYTE_GENBUS_IDE=y
  10678. CONFIG_SMP_CAPABLE=y
  10679. +CONFIG_MIPS_RTC=y
  10680. # CONFIG_SNI_RM200_PCI is not set
  10681. # CONFIG_TANBAC_TB0226 is not set
  10682. # CONFIG_TANBAC_TB0229 is not set
  10683. @@ -253,11 +254,6 @@
  10684. #
  10685. # CONFIG_IPX is not set
  10686. # CONFIG_ATALK is not set
  10687. -
  10688. -#
  10689. -# Appletalk devices
  10690. -#
  10691. -# CONFIG_DEV_APPLETALK is not set
  10692. # CONFIG_DECNET is not set
  10693. # CONFIG_BRIDGE is not set
  10694. # CONFIG_X25 is not set
  10695. @@ -432,7 +428,6 @@
  10696. CONFIG_SIBYTE_SB1250_DUART=y
  10697. CONFIG_SIBYTE_SB1250_DUART_CONSOLE=y
  10698. CONFIG_SERIAL_CONSOLE=y
  10699. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  10700. CONFIG_UNIX98_PTYS=y
  10701. CONFIG_UNIX98_PTY_COUNT=256
  10702. diff -Nur linux-2.4.32-rc1/arch/mips64/defconfig-sead linux-2.4.32-rc1.mips/arch/mips64/defconfig-sead
  10703. --- linux-2.4.32-rc1/arch/mips64/defconfig-sead 2005-01-19 15:09:31.000000000 +0100
  10704. +++ linux-2.4.32-rc1.mips/arch/mips64/defconfig-sead 2005-03-18 13:13:23.000000000 +0100
  10705. @@ -28,8 +28,8 @@
  10706. # CONFIG_MIPS_PB1000 is not set
  10707. # CONFIG_MIPS_PB1100 is not set
  10708. # CONFIG_MIPS_PB1500 is not set
  10709. -# CONFIG_MIPS_HYDROGEN3 is not set
  10710. # CONFIG_MIPS_PB1550 is not set
  10711. +# CONFIG_MIPS_HYDROGEN3 is not set
  10712. # CONFIG_MIPS_XXS1500 is not set
  10713. # CONFIG_MIPS_MTX1 is not set
  10714. # CONFIG_COGENT_CSB250 is not set
  10715. @@ -242,7 +242,6 @@
  10716. CONFIG_SERIAL_CONSOLE=y
  10717. # CONFIG_SERIAL_EXTENDED is not set
  10718. # CONFIG_SERIAL_NONSTANDARD is not set
  10719. -# CONFIG_MIPS_HYDROGEN3_BUTTONS is not set
  10720. # CONFIG_UNIX98_PTYS is not set
  10721. #
  10722. diff -Nur linux-2.4.32-rc1/arch/mips64/kernel/binfmt_elfn32.c linux-2.4.32-rc1.mips/arch/mips64/kernel/binfmt_elfn32.c
  10723. --- linux-2.4.32-rc1/arch/mips64/kernel/binfmt_elfn32.c 2003-08-25 13:44:40.000000000 +0200
  10724. +++ linux-2.4.32-rc1.mips/arch/mips64/kernel/binfmt_elfn32.c 2005-01-26 03:40:47.000000000 +0100
  10725. @@ -116,4 +116,7 @@
  10726. #undef MODULE_DESCRIPTION
  10727. #undef MODULE_AUTHOR
  10728. +#undef TASK_SIZE
  10729. +#define TASK_SIZE TASK_SIZE32
  10730. +
  10731. #include "../../../fs/binfmt_elf.c"
  10732. diff -Nur linux-2.4.32-rc1/arch/mips64/kernel/binfmt_elfo32.c linux-2.4.32-rc1.mips/arch/mips64/kernel/binfmt_elfo32.c
  10733. --- linux-2.4.32-rc1/arch/mips64/kernel/binfmt_elfo32.c 2003-08-25 13:44:40.000000000 +0200
  10734. +++ linux-2.4.32-rc1.mips/arch/mips64/kernel/binfmt_elfo32.c 2005-01-26 03:40:47.000000000 +0100
  10735. @@ -137,4 +137,7 @@
  10736. #undef MODULE_DESCRIPTION
  10737. #undef MODULE_AUTHOR
  10738. +#undef TASK_SIZE
  10739. +#define TASK_SIZE TASK_SIZE32
  10740. +
  10741. #include "../../../fs/binfmt_elf.c"
  10742. diff -Nur linux-2.4.32-rc1/arch/mips64/kernel/head.S linux-2.4.32-rc1.mips/arch/mips64/kernel/head.S
  10743. --- linux-2.4.32-rc1/arch/mips64/kernel/head.S 2004-02-18 14:36:30.000000000 +0100
  10744. +++ linux-2.4.32-rc1.mips/arch/mips64/kernel/head.S 2004-11-22 14:38:26.000000000 +0100
  10745. @@ -91,6 +91,21 @@
  10746. __INIT
  10747. NESTED(kernel_entry, 16, sp) # kernel entry point
  10748. + .set push
  10749. + /*
  10750. + * For the moment disable interrupts, mark the kernel mode and
  10751. + * set ST0_KX so that the CPU does not spit fire when using
  10752. + * 64-bit addresses. A full initialization of the CPU's status
  10753. + * register is done later in per_cpu_trap_init().
  10754. + */
  10755. + mfc0 t0, CP0_STATUS
  10756. + or t0, ST0_CU0|ST0_KX|0x1f
  10757. + xor t0, 0x1f
  10758. + mtc0 t0, CP0_STATUS
  10759. +
  10760. + .set noreorder
  10761. + sll zero,3 # ehb
  10762. + .set reorder
  10763. ori sp, 0xf # align stack on 16 byte.
  10764. xori sp, 0xf
  10765. @@ -103,8 +118,6 @@
  10766. ARC64_TWIDDLE_PC
  10767. - CLI # disable interrupts
  10768. -
  10769. /*
  10770. * The firmware/bootloader passes argc/argp/envp
  10771. * to us as arguments. But clear bss first because
  10772. @@ -125,6 +138,7 @@
  10773. dsubu sp, 4*SZREG # init stack pointer
  10774. j init_arch
  10775. + .set pop
  10776. END(kernel_entry)
  10777. #ifdef CONFIG_SMP
  10778. @@ -133,6 +147,23 @@
  10779. * function after setting up the stack and gp registers.
  10780. */
  10781. NESTED(smp_bootstrap, 16, sp)
  10782. + .set push
  10783. + /*
  10784. + * For the moment disable interrupts and bootstrap exception
  10785. + * vectors, mark the kernel mode and set ST0_KX so that the CPU
  10786. + * does not spit fire when using 64-bit addresses. A full
  10787. + * initialization of the CPU's status register is done later in
  10788. + * per_cpu_trap_init().
  10789. + */
  10790. + mfc0 t0, CP0_STATUS
  10791. + or t0, ST0_CU0|ST0_BEV|ST0_KX|0x1f
  10792. + xor t0, ST0_BEV|0x1f
  10793. + mtc0 t0, CP0_STATUS
  10794. +
  10795. + .set noreorder
  10796. + sll zero,3 # ehb
  10797. + .set reorder
  10798. +
  10799. #ifdef CONFIG_SGI_IP27
  10800. GET_NASID_ASM t1
  10801. dli t0, KLDIR_OFFSET + (KLI_KERN_VARS * KLDIR_ENT_SIZE) + \
  10802. @@ -146,19 +177,8 @@
  10803. ARC64_TWIDDLE_PC
  10804. #endif /* CONFIG_SGI_IP27 */
  10805. - CLI
  10806. -
  10807. - /*
  10808. - * For the moment set ST0_KU so the CPU will not spit fire when
  10809. - * executing 64-bit instructions. The full initialization of the
  10810. - * CPU's status register is done later in per_cpu_trap_init().
  10811. - */
  10812. - mfc0 t0, CP0_STATUS
  10813. - or t0, ST0_KX
  10814. - mtc0 t0, CP0_STATUS
  10815. -
  10816. jal start_secondary # XXX: IP27: cboot
  10817. -
  10818. + .set pop
  10819. END(smp_bootstrap)
  10820. #endif /* CONFIG_SMP */
  10821. diff -Nur linux-2.4.32-rc1/arch/mips64/kernel/ioctl32.c linux-2.4.32-rc1.mips/arch/mips64/kernel/ioctl32.c
  10822. --- linux-2.4.32-rc1/arch/mips64/kernel/ioctl32.c 2005-01-19 15:09:31.000000000 +0100
  10823. +++ linux-2.4.32-rc1.mips/arch/mips64/kernel/ioctl32.c 2005-01-26 03:36:17.000000000 +0100
  10824. @@ -2352,7 +2352,7 @@
  10825. IOCTL32_HANDLER(AUTOFS_IOC_SETTIMEOUT32, ioc_settimeout),
  10826. IOCTL32_DEFAULT(AUTOFS_IOC_EXPIRE),
  10827. IOCTL32_DEFAULT(AUTOFS_IOC_EXPIRE_MULTI),
  10828. - IOCTL32_DEFAULT(AUTOFS_IOC_PROTSUBVER),
  10829. + IOCTL32_DEFAULT(AUTOFS_IOC_PROTOSUBVER),
  10830. IOCTL32_DEFAULT(AUTOFS_IOC_ASKREGHOST),
  10831. IOCTL32_DEFAULT(AUTOFS_IOC_TOGGLEREGHOST),
  10832. IOCTL32_DEFAULT(AUTOFS_IOC_ASKUMOUNT),
  10833. diff -Nur linux-2.4.32-rc1/arch/mips64/kernel/linux32.c linux-2.4.32-rc1.mips/arch/mips64/kernel/linux32.c
  10834. --- linux-2.4.32-rc1/arch/mips64/kernel/linux32.c 2005-04-04 03:42:19.000000000 +0200
  10835. +++ linux-2.4.32-rc1.mips/arch/mips64/kernel/linux32.c 2005-04-22 15:01:00.000000000 +0200
  10836. @@ -1101,6 +1101,7 @@
  10837. * specially as they have atomicity guarantees and can handle
  10838. * iovec's natively
  10839. */
  10840. + inode = file->f_dentry->d_inode;
  10841. if (inode->i_sock) {
  10842. int err;
  10843. err = sock_readv_writev(type, inode, file, iov, count, tot_len);
  10844. @@ -1187,72 +1188,19 @@
  10845. lseek back to original location. They fail just like lseek does on
  10846. non-seekable files. */
  10847. -asmlinkage ssize_t sys32_pread(unsigned int fd, char * buf,
  10848. - size_t count, u32 unused, u64 a4, u64 a5)
  10849. +asmlinkage ssize_t sys32_pread(unsigned int fd, char *buf,
  10850. + size_t count, u32 unused, u64 a4, u64 a5)
  10851. {
  10852. - ssize_t ret;
  10853. - struct file * file;
  10854. - ssize_t (*read)(struct file *, char *, size_t, loff_t *);
  10855. - loff_t pos;
  10856. -
  10857. - ret = -EBADF;
  10858. - file = fget(fd);
  10859. - if (!file)
  10860. - goto bad_file;
  10861. - if (!(file->f_mode & FMODE_READ))
  10862. - goto out;
  10863. - pos = merge_64(a4, a5);
  10864. - ret = locks_verify_area(FLOCK_VERIFY_READ, file->f_dentry->d_inode,
  10865. - file, pos, count);
  10866. - if (ret)
  10867. - goto out;
  10868. - ret = -EINVAL;
  10869. - if (!file->f_op || !(read = file->f_op->read))
  10870. - goto out;
  10871. - if (pos < 0)
  10872. - goto out;
  10873. - ret = read(file, buf, count, &pos);
  10874. - if (ret > 0)
  10875. - dnotify_parent(file->f_dentry, DN_ACCESS);
  10876. -out:
  10877. - fput(file);
  10878. -bad_file:
  10879. - return ret;
  10880. + return sys_pread(fd, buf, count, merge_64(a4, a5));
  10881. }
  10882. asmlinkage ssize_t sys32_pwrite(unsigned int fd, const char * buf,
  10883. size_t count, u32 unused, u64 a4, u64 a5)
  10884. {
  10885. - ssize_t ret;
  10886. - struct file * file;
  10887. - ssize_t (*write)(struct file *, const char *, size_t, loff_t *);
  10888. - loff_t pos;
  10889. + return sys_pwrite(fd, buf, count, merge_64(a4, a5));
  10890. +}
  10891. - ret = -EBADF;
  10892. - file = fget(fd);
  10893. - if (!file)
  10894. - goto bad_file;
  10895. - if (!(file->f_mode & FMODE_WRITE))
  10896. - goto out;
  10897. - pos = merge_64(a4, a5);
  10898. - ret = locks_verify_area(FLOCK_VERIFY_WRITE, file->f_dentry->d_inode,
  10899. - file, pos, count);
  10900. - if (ret)
  10901. - goto out;
  10902. - ret = -EINVAL;
  10903. - if (!file->f_op || !(write = file->f_op->write))
  10904. - goto out;
  10905. - if (pos < 0)
  10906. - goto out;
  10907. - ret = write(file, buf, count, &pos);
  10908. - if (ret > 0)
  10909. - dnotify_parent(file->f_dentry, DN_MODIFY);
  10910. -out:
  10911. - fput(file);
  10912. -bad_file:
  10913. - return ret;
  10914. -}
  10915. /*
  10916. * Ooo, nasty. We need here to frob 32-bit unsigned longs to
  10917. * 64-bit unsigned longs.
  10918. diff -Nur linux-2.4.32-rc1/arch/mips64/kernel/process.c linux-2.4.32-rc1.mips/arch/mips64/kernel/process.c
  10919. --- linux-2.4.32-rc1/arch/mips64/kernel/process.c 2003-08-25 13:44:40.000000000 +0200
  10920. +++ linux-2.4.32-rc1.mips/arch/mips64/kernel/process.c 2005-04-14 12:41:44.000000000 +0200
  10921. @@ -125,6 +125,25 @@
  10922. return 1;
  10923. }
  10924. +void dump_regs(elf_greg_t *gp, struct pt_regs *regs)
  10925. +{
  10926. + int i;
  10927. +
  10928. + for (i = 0; i < EF_REG0; i++)
  10929. + gp[i] = 0;
  10930. + gp[EF_REG0] = 0;
  10931. + for (i = 1; i <= 31; i++)
  10932. + gp[EF_REG0 + i] = regs->regs[i];
  10933. + gp[EF_REG26] = 0;
  10934. + gp[EF_REG27] = 0;
  10935. + gp[EF_LO] = regs->lo;
  10936. + gp[EF_HI] = regs->hi;
  10937. + gp[EF_CP0_EPC] = regs->cp0_epc;
  10938. + gp[EF_CP0_BADVADDR] = regs->cp0_badvaddr;
  10939. + gp[EF_CP0_STATUS] = regs->cp0_status;
  10940. + gp[EF_CP0_CAUSE] = regs->cp0_cause;
  10941. +}
  10942. +
  10943. /*
  10944. * Create a kernel thread
  10945. */
  10946. diff -Nur linux-2.4.32-rc1/arch/mips64/kernel/scall_64.S linux-2.4.32-rc1.mips/arch/mips64/kernel/scall_64.S
  10947. --- linux-2.4.32-rc1/arch/mips64/kernel/scall_64.S 2005-01-19 15:09:32.000000000 +0100
  10948. +++ linux-2.4.32-rc1.mips/arch/mips64/kernel/scall_64.S 2005-02-07 22:21:54.000000000 +0100
  10949. @@ -102,15 +102,14 @@
  10950. trace_a_syscall:
  10951. SAVE_STATIC
  10952. - sd t2,PT_R1(sp)
  10953. + move s0, t2
  10954. jal syscall_trace
  10955. - ld t2,PT_R1(sp)
  10956. ld a0, PT_R4(sp) # Restore argument registers
  10957. ld a1, PT_R5(sp)
  10958. ld a2, PT_R6(sp)
  10959. ld a3, PT_R7(sp)
  10960. - jalr t2
  10961. + jalr s0
  10962. li t0, -EMAXERRNO - 1 # error?
  10963. sltu t0, t0, v0
  10964. diff -Nur linux-2.4.32-rc1/arch/mips64/kernel/scall_n32.S linux-2.4.32-rc1.mips/arch/mips64/kernel/scall_n32.S
  10965. --- linux-2.4.32-rc1/arch/mips64/kernel/scall_n32.S 2005-01-19 15:09:32.000000000 +0100
  10966. +++ linux-2.4.32-rc1.mips/arch/mips64/kernel/scall_n32.S 2005-02-07 22:21:54.000000000 +0100
  10967. @@ -106,15 +106,14 @@
  10968. trace_a_syscall:
  10969. SAVE_STATIC
  10970. - sd t2,PT_R1(sp)
  10971. + move s0, t2
  10972. jal syscall_trace
  10973. - ld t2,PT_R1(sp)
  10974. ld a0, PT_R4(sp) # Restore argument registers
  10975. ld a1, PT_R5(sp)
  10976. ld a2, PT_R6(sp)
  10977. ld a3, PT_R7(sp)
  10978. - jalr t2
  10979. + jalr s0
  10980. li t0, -EMAXERRNO - 1 # error?
  10981. sltu t0, t0, v0
  10982. diff -Nur linux-2.4.32-rc1/arch/mips64/kernel/scall_o32.S linux-2.4.32-rc1.mips/arch/mips64/kernel/scall_o32.S
  10983. --- linux-2.4.32-rc1/arch/mips64/kernel/scall_o32.S 2005-01-19 15:09:32.000000000 +0100
  10984. +++ linux-2.4.32-rc1.mips/arch/mips64/kernel/scall_o32.S 2005-02-14 04:52:57.000000000 +0100
  10985. @@ -118,9 +118,8 @@
  10986. sd a6, PT_R10(sp)
  10987. sd a7, PT_R11(sp)
  10988. - sd t2,PT_R1(sp)
  10989. + move s0, t2
  10990. jal syscall_trace
  10991. - ld t2,PT_R1(sp)
  10992. ld a0, PT_R4(sp) # Restore argument registers
  10993. ld a1, PT_R5(sp)
  10994. @@ -129,7 +128,7 @@
  10995. ld a4, PT_R8(sp)
  10996. ld a5, PT_R9(sp)
  10997. - jalr t2
  10998. + jalr s0
  10999. li t0, -EMAXERRNO - 1 # error?
  11000. sltu t0, t0, v0
  11001. @@ -576,6 +575,8 @@
  11002. sys_call_table:
  11003. syscalltable
  11004. + .purgem sys
  11005. +
  11006. .macro sys function, nargs
  11007. .byte \nargs
  11008. .endm
  11009. diff -Nur linux-2.4.32-rc1/arch/mips64/kernel/setup.c linux-2.4.32-rc1.mips/arch/mips64/kernel/setup.c
  11010. --- linux-2.4.32-rc1/arch/mips64/kernel/setup.c 2005-01-19 15:09:32.000000000 +0100
  11011. +++ linux-2.4.32-rc1.mips/arch/mips64/kernel/setup.c 2004-11-22 14:38:26.000000000 +0100
  11012. @@ -129,14 +129,6 @@
  11013. */
  11014. load_mmu();
  11015. - /*
  11016. - * On IP27, I am seeing the TS bit set when the kernel is loaded.
  11017. - * Maybe because the kernel is in ckseg0 and not xkphys? Clear it
  11018. - * anyway ...
  11019. - */
  11020. - clear_c0_status(ST0_BEV|ST0_TS|ST0_CU1|ST0_CU2|ST0_CU3);
  11021. - set_c0_status(ST0_CU0|ST0_KX|ST0_SX|ST0_FR);
  11022. -
  11023. start_kernel();
  11024. }
  11025. diff -Nur linux-2.4.32-rc1/arch/mips64/kernel/signal_n32.c linux-2.4.32-rc1.mips/arch/mips64/kernel/signal_n32.c
  11026. --- linux-2.4.32-rc1/arch/mips64/kernel/signal_n32.c 2005-01-19 15:09:33.000000000 +0100
  11027. +++ linux-2.4.32-rc1.mips/arch/mips64/kernel/signal_n32.c 2005-02-07 22:10:53.000000000 +0100
  11028. @@ -68,7 +68,7 @@
  11029. };
  11030. extern asmlinkage int restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc);
  11031. -extern int inline setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc);
  11032. +extern int setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc);
  11033. asmlinkage void sysn32_rt_sigreturn(abi64_no_regargs, struct pt_regs regs)
  11034. {
  11035. diff -Nur linux-2.4.32-rc1/arch/mips64/kernel/traps.c linux-2.4.32-rc1.mips/arch/mips64/kernel/traps.c
  11036. --- linux-2.4.32-rc1/arch/mips64/kernel/traps.c 2005-01-19 15:09:33.000000000 +0100
  11037. +++ linux-2.4.32-rc1.mips/arch/mips64/kernel/traps.c 2005-04-12 22:25:34.000000000 +0200
  11038. @@ -462,9 +462,10 @@
  11039. }
  11040. ll_task = current;
  11041. + compute_return_epc(regs);
  11042. +
  11043. regs->regs[(opcode & RT) >> 16] = value;
  11044. - compute_return_epc(regs);
  11045. return;
  11046. sig:
  11047. @@ -495,8 +496,8 @@
  11048. goto sig;
  11049. }
  11050. if (ll_bit == 0 || ll_task != current) {
  11051. - regs->regs[reg] = 0;
  11052. compute_return_epc(regs);
  11053. + regs->regs[reg] = 0;
  11054. return;
  11055. }
  11056. @@ -505,9 +506,9 @@
  11057. goto sig;
  11058. }
  11059. + compute_return_epc(regs);
  11060. regs->regs[reg] = 1;
  11061. - compute_return_epc(regs);
  11062. return;
  11063. sig:
  11064. @@ -809,13 +810,18 @@
  11065. void __init per_cpu_trap_init(void)
  11066. {
  11067. unsigned int cpu = smp_processor_id();
  11068. + unsigned int status_set = ST0_CU0|ST0_FR|ST0_KX|ST0_SX|ST0_UX;
  11069. - /* Some firmware leaves the BEV flag set, clear it. */
  11070. - clear_c0_status(ST0_CU1|ST0_CU2|ST0_CU3|ST0_BEV);
  11071. - set_c0_status(ST0_CU0|ST0_FR|ST0_KX|ST0_SX|ST0_UX);
  11072. -
  11073. + /*
  11074. + * Disable coprocessors, enable 64-bit addressing and set FPU
  11075. + * for the 32/32 FPR register model. Reset the BEV flag that
  11076. + * some firmware may have left set and the TS bit (for IP27).
  11077. + * Set XX for ISA IV code to work.
  11078. + */
  11079. if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV)
  11080. - set_c0_status(ST0_XX);
  11081. + status_set |= ST0_XX;
  11082. + change_c0_status(ST0_CU|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
  11083. + status_set);
  11084. /*
  11085. * Some MIPS CPUs have a dedicated interrupt vector which reduces the
  11086. @@ -825,13 +831,11 @@
  11087. set_c0_cause(CAUSEF_IV);
  11088. cpu_data[cpu].asid_cache = ASID_FIRST_VERSION;
  11089. - write_c0_context(((long)(&pgd_current[cpu])) << 23);
  11090. - write_c0_wired(0);
  11091. + TLBMISS_HANDLER_SETUP();
  11092. atomic_inc(&init_mm.mm_count);
  11093. current->active_mm = &init_mm;
  11094. - if (current->mm)
  11095. - BUG();
  11096. + BUG_ON(current->mm);
  11097. enter_lazy_tlb(&init_mm, current, cpu);
  11098. }
  11099. @@ -842,8 +846,6 @@
  11100. extern char except_vec4;
  11101. unsigned long i;
  11102. - per_cpu_trap_init();
  11103. -
  11104. /* Copy the generic exception handlers to their final destination. */
  11105. memcpy((void *) KSEG0 , &except_vec0_generic, 0x80);
  11106. memcpy((void *)(KSEG0 + 0x180), &except_vec3_generic, 0x80);
  11107. @@ -933,6 +935,5 @@
  11108. flush_icache_range(KSEG0, KSEG0 + 0x400);
  11109. - atomic_inc(&init_mm.mm_count); /* XXX UP? */
  11110. - current->active_mm = &init_mm;
  11111. + per_cpu_trap_init();
  11112. }
  11113. diff -Nur linux-2.4.32-rc1/arch/mips64/mm/cerr-sb1.c linux-2.4.32-rc1.mips/arch/mips64/mm/cerr-sb1.c
  11114. --- linux-2.4.32-rc1/arch/mips64/mm/cerr-sb1.c 2004-02-18 14:36:30.000000000 +0100
  11115. +++ linux-2.4.32-rc1.mips/arch/mips64/mm/cerr-sb1.c 2004-12-13 18:37:26.000000000 +0100
  11116. @@ -252,14 +252,14 @@
  11117. /* Masks to select bits for Hamming parity, mask_72_64[i] for bit[i] */
  11118. static const uint64_t mask_72_64[8] = {
  11119. - 0x0738C808099264FFL,
  11120. - 0x38C808099264FF07L,
  11121. - 0xC808099264FF0738L,
  11122. - 0x08099264FF0738C8L,
  11123. - 0x099264FF0738C808L,
  11124. - 0x9264FF0738C80809L,
  11125. - 0x64FF0738C8080992L,
  11126. - 0xFF0738C808099264L
  11127. + 0x0738C808099264FFULL,
  11128. + 0x38C808099264FF07ULL,
  11129. + 0xC808099264FF0738ULL,
  11130. + 0x08099264FF0738C8ULL,
  11131. + 0x099264FF0738C808ULL,
  11132. + 0x9264FF0738C80809ULL,
  11133. + 0x64FF0738C8080992ULL,
  11134. + 0xFF0738C808099264ULL
  11135. };
  11136. /* Calculate the parity on a range of bits */
  11137. @@ -331,9 +331,9 @@
  11138. ((lru >> 4) & 0x3),
  11139. ((lru >> 6) & 0x3));
  11140. }
  11141. - va = (taglo & 0xC0000FFFFFFFE000) | addr;
  11142. + va = (taglo & 0xC0000FFFFFFFE000ULL) | addr;
  11143. if ((taglo & (1 << 31)) && (((taglo >> 62) & 0x3) == 3))
  11144. - va |= 0x3FFFF00000000000;
  11145. + va |= 0x3FFFF00000000000ULL;
  11146. valid = ((taghi >> 29) & 1);
  11147. if (valid) {
  11148. tlo_tmp = taglo & 0xfff3ff;
  11149. @@ -474,7 +474,7 @@
  11150. : "r" ((way << 13) | addr));
  11151. taglo = ((unsigned long long)taglohi << 32) | taglolo;
  11152. - pa = (taglo & 0xFFFFFFE000) | addr;
  11153. + pa = (taglo & 0xFFFFFFE000ULL) | addr;
  11154. if (way == 0) {
  11155. lru = (taghi >> 14) & 0xff;
  11156. prom_printf("[Bank %d Set 0x%02x] LRU > %d %d %d %d > MRU\n",
  11157. diff -Nur linux-2.4.32-rc1/arch/mips64/mm/c-r4k.c linux-2.4.32-rc1.mips/arch/mips64/mm/c-r4k.c
  11158. --- linux-2.4.32-rc1/arch/mips64/mm/c-r4k.c 2005-01-19 15:09:33.000000000 +0100
  11159. +++ linux-2.4.32-rc1.mips/arch/mips64/mm/c-r4k.c 2005-02-06 22:55:42.000000000 +0100
  11160. @@ -867,9 +867,16 @@
  11161. * normally they'd suffer from aliases but magic in the hardware deals
  11162. * with that for us so we don't need to take care ourselves.
  11163. */
  11164. - if (c->cputype != CPU_R10000 && c->cputype != CPU_R12000)
  11165. - if (c->dcache.waysize > PAGE_SIZE)
  11166. - c->dcache.flags |= MIPS_CACHE_ALIASES;
  11167. + switch (c->cputype) {
  11168. + case CPU_R10000:
  11169. + case CPU_R12000:
  11170. + break;
  11171. + case CPU_24K:
  11172. + if (!(read_c0_config7() & (1 << 16)))
  11173. + default:
  11174. + if (c->dcache.waysize > PAGE_SIZE)
  11175. + c->dcache.flags |= MIPS_CACHE_ALIASES;
  11176. + }
  11177. switch (c->cputype) {
  11178. case CPU_20KC:
  11179. @@ -1070,9 +1077,6 @@
  11180. setup_scache();
  11181. coherency_setup();
  11182. - if (c->dcache.sets * c->dcache.ways > PAGE_SIZE)
  11183. - c->dcache.flags |= MIPS_CACHE_ALIASES;
  11184. -
  11185. r4k_blast_dcache_page_setup();
  11186. r4k_blast_dcache_page_indexed_setup();
  11187. r4k_blast_dcache_setup();
  11188. diff -Nur linux-2.4.32-rc1/arch/mips64/mm/tlbex-r4k.S linux-2.4.32-rc1.mips/arch/mips64/mm/tlbex-r4k.S
  11189. --- linux-2.4.32-rc1/arch/mips64/mm/tlbex-r4k.S 2004-02-18 14:36:30.000000000 +0100
  11190. +++ linux-2.4.32-rc1.mips/arch/mips64/mm/tlbex-r4k.S 2005-06-06 16:46:22.000000000 +0200
  11191. @@ -125,6 +125,33 @@
  11192. nop
  11193. END(except_vec1_r4k)
  11194. + __FINIT
  11195. +
  11196. + .align 5
  11197. +LEAF(handle_vec1_r4k)
  11198. + .set noat
  11199. + LOAD_PTE2 k1 k0 9f
  11200. + ld k0, 0(k1) # get even pte
  11201. + ld k1, 8(k1) # get odd pte
  11202. + PTE_RELOAD k0 k1
  11203. + mtc0_tlbw_hazard
  11204. + tlbwr
  11205. + tlbw_eret_hazard
  11206. + eret
  11207. +
  11208. +9: # handle the vmalloc range
  11209. + LOAD_KPTE2 k1 k0 invalid_vmalloc_address
  11210. + ld k0, 0(k1) # get even pte
  11211. + ld k1, 8(k1) # get odd pte
  11212. + PTE_RELOAD k0 k1
  11213. + mtc0_tlbw_hazard
  11214. + tlbwr
  11215. + tlbw_eret_hazard
  11216. + eret
  11217. +END(handle_vec1_r4k)
  11218. +
  11219. + __INIT
  11220. +
  11221. LEAF(except_vec1_sb1)
  11222. #if BCM1250_M3_WAR
  11223. dmfc0 k0, CP0_BADVADDR
  11224. @@ -134,28 +161,24 @@
  11225. bnez k0, 1f
  11226. #endif
  11227. .set noat
  11228. - dla k0, handle_vec1_r4k
  11229. + dla k0, handle_vec1_sb1
  11230. jr k0
  11231. nop
  11232. 1: eret
  11233. - nop
  11234. END(except_vec1_sb1)
  11235. __FINIT
  11236. .align 5
  11237. -LEAF(handle_vec1_r4k)
  11238. +LEAF(handle_vec1_sb1)
  11239. .set noat
  11240. LOAD_PTE2 k1 k0 9f
  11241. ld k0, 0(k1) # get even pte
  11242. ld k1, 8(k1) # get odd pte
  11243. PTE_RELOAD k0 k1
  11244. - rm9000_tlb_hazard
  11245. - b 1f
  11246. - tlbwr
  11247. -1: nop
  11248. - rm9000_tlb_hazard
  11249. + mtc0_tlbw_hazard
  11250. + tlbwr
  11251. eret
  11252. 9: # handle the vmalloc range
  11253. @@ -163,13 +186,10 @@
  11254. ld k0, 0(k1) # get even pte
  11255. ld k1, 8(k1) # get odd pte
  11256. PTE_RELOAD k0 k1
  11257. - rm9000_tlb_hazard
  11258. - b 1f
  11259. - tlbwr
  11260. -1: nop
  11261. - rm9000_tlb_hazard
  11262. + mtc0_tlbw_hazard
  11263. + tlbwr
  11264. eret
  11265. -END(handle_vec1_r4k)
  11266. +END(handle_vec1_sb1)
  11267. __INIT
  11268. @@ -195,10 +215,8 @@
  11269. ld k0, 0(k1) # get even pte
  11270. ld k1, 8(k1) # get odd pte
  11271. PTE_RELOAD k0 k1
  11272. - rm9000_tlb_hazard
  11273. - nop
  11274. + mtc0_tlbw_hazard
  11275. tlbwr
  11276. - rm9000_tlb_hazard
  11277. eret
  11278. 9: # handle the vmalloc range
  11279. @@ -206,10 +224,8 @@
  11280. ld k0, 0(k1) # get even pte
  11281. ld k1, 8(k1) # get odd pte
  11282. PTE_RELOAD k0 k1
  11283. - rm9000_tlb_hazard
  11284. - nop
  11285. + mtc0_tlbw_hazard
  11286. tlbwr
  11287. - rm9000_tlb_hazard
  11288. eret
  11289. END(handle_vec1_r10k)
  11290. diff -Nur linux-2.4.32-rc1/arch/mips64/mm/tlb-r4k.c linux-2.4.32-rc1.mips/arch/mips64/mm/tlb-r4k.c
  11291. --- linux-2.4.32-rc1/arch/mips64/mm/tlb-r4k.c 2005-01-19 15:09:33.000000000 +0100
  11292. +++ linux-2.4.32-rc1.mips/arch/mips64/mm/tlb-r4k.c 2004-11-25 23:18:38.000000000 +0100
  11293. @@ -1,24 +1,12 @@
  11294. /*
  11295. - * Carsten Langgaard, [email protected]
  11296. - * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved.
  11297. - *
  11298. - * This program is free software; you can distribute it and/or modify it
  11299. - * under the terms of the GNU General Public License (Version 2) as
  11300. - * published by the Free Software Foundation.
  11301. - *
  11302. - * This program is distributed in the hope it will be useful, but WITHOUT
  11303. - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11304. - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11305. + * This file is subject to the terms and conditions of the GNU General Public
  11306. + * License. See the file "COPYING" in the main directory of this archive
  11307. * for more details.
  11308. *
  11309. - * You should have received a copy of the GNU General Public License along
  11310. - * with this program; if not, write to the Free Software Foundation, Inc.,
  11311. - * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  11312. - *
  11313. - * MIPS64 CPU variant specific MMU routines.
  11314. - * These routine are not optimized in any way, they are done in a generic way
  11315. - * so they can be used on all MIPS64 compliant CPUs, and also done in an
  11316. - * attempt not to break anything for the R4xx0 style CPUs.
  11317. + * Copyright (C) 1996 David S. Miller ([email protected])
  11318. + * Copyright (C) 1997, 1998, 1999, 2000 Ralf Baechle [email protected]
  11319. + * Carsten Langgaard, [email protected]
  11320. + * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved.
  11321. */
  11322. #include <linux/init.h>
  11323. #include <linux/sched.h>
  11324. @@ -30,9 +18,6 @@
  11325. #include <asm/pgtable.h>
  11326. #include <asm/system.h>
  11327. -#undef DEBUG_TLB
  11328. -#undef DEBUG_TLBUPDATE
  11329. -
  11330. extern void except_vec1_r4k(void);
  11331. /* CP0 hazard avoidance. */
  11332. @@ -46,31 +31,23 @@
  11333. unsigned long old_ctx;
  11334. int entry;
  11335. -#ifdef DEBUG_TLB
  11336. - printk("[tlball]");
  11337. -#endif
  11338. -
  11339. local_irq_save(flags);
  11340. /* Save old context and create impossible VPN2 value */
  11341. old_ctx = read_c0_entryhi();
  11342. - write_c0_entryhi(XKPHYS);
  11343. write_c0_entrylo0(0);
  11344. write_c0_entrylo1(0);
  11345. - BARRIER;
  11346. entry = read_c0_wired();
  11347. /* Blast 'em all away. */
  11348. - while(entry < current_cpu_data.tlbsize) {
  11349. - /* Make sure all entries differ. */
  11350. - write_c0_entryhi(XKPHYS+entry*0x2000);
  11351. + while (entry < current_cpu_data.tlbsize) {
  11352. + write_c0_entryhi(XKPHYS + entry*0x2000);
  11353. write_c0_index(entry);
  11354. - BARRIER;
  11355. + mtc0_tlbw_hazard();
  11356. tlb_write_indexed();
  11357. - BARRIER;
  11358. entry++;
  11359. }
  11360. - BARRIER;
  11361. + tlbw_use_hazard();
  11362. write_c0_entryhi(old_ctx);
  11363. local_irq_restore(flags);
  11364. }
  11365. @@ -79,12 +56,8 @@
  11366. {
  11367. int cpu = smp_processor_id();
  11368. - if (cpu_context(cpu, mm) != 0) {
  11369. -#ifdef DEBUG_TLB
  11370. - printk("[tlbmm<%d>]", mm->context);
  11371. -#endif
  11372. + if (cpu_context(cpu, mm) != 0)
  11373. drop_mmu_context(mm,cpu);
  11374. - }
  11375. }
  11376. void local_flush_tlb_range(struct mm_struct *mm, unsigned long start,
  11377. @@ -96,10 +69,6 @@
  11378. unsigned long flags;
  11379. int size;
  11380. -#ifdef DEBUG_TLB
  11381. - printk("[tlbrange<%02x,%08lx,%08lx>]", (mm->context & ASID_MASK),
  11382. - start, end);
  11383. -#endif
  11384. local_irq_save(flags);
  11385. size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
  11386. size = (size + 1) >> 1;
  11387. @@ -110,25 +79,25 @@
  11388. start &= (PAGE_MASK << 1);
  11389. end += ((PAGE_SIZE << 1) - 1);
  11390. end &= (PAGE_MASK << 1);
  11391. - while(start < end) {
  11392. + while (start < end) {
  11393. int idx;
  11394. write_c0_entryhi(start | newpid);
  11395. start += (PAGE_SIZE << 1);
  11396. - BARRIER;
  11397. + mtc0_tlbw_hazard();
  11398. tlb_probe();
  11399. BARRIER;
  11400. idx = read_c0_index();
  11401. write_c0_entrylo0(0);
  11402. write_c0_entrylo1(0);
  11403. - if(idx < 0)
  11404. + if (idx < 0)
  11405. continue;
  11406. /* Make sure all entries differ. */
  11407. write_c0_entryhi(XKPHYS+idx*0x2000);
  11408. - BARRIER;
  11409. + mtc0_tlbw_hazard();
  11410. tlb_write_indexed();
  11411. - BARRIER;
  11412. }
  11413. + tlbw_use_hazard();
  11414. write_c0_entryhi(oldpid);
  11415. } else {
  11416. drop_mmu_context(mm, cpu);
  11417. @@ -145,28 +114,26 @@
  11418. unsigned long flags;
  11419. unsigned long oldpid, newpid, idx;
  11420. -#ifdef DEBUG_TLB
  11421. - printk("[tlbpage<%d,%08lx>]", vma->vm_mm->context, page);
  11422. -#endif
  11423. newpid = cpu_asid(cpu, vma->vm_mm);
  11424. page &= (PAGE_MASK << 1);
  11425. local_irq_save(flags);
  11426. oldpid = read_c0_entryhi();
  11427. write_c0_entryhi(page | newpid);
  11428. - BARRIER;
  11429. + mtc0_tlbw_hazard();
  11430. tlb_probe();
  11431. BARRIER;
  11432. idx = read_c0_index();
  11433. write_c0_entrylo0(0);
  11434. write_c0_entrylo1(0);
  11435. - if(idx < 0)
  11436. + if (idx < 0)
  11437. goto finish;
  11438. /* Make sure all entries differ. */
  11439. write_c0_entryhi(XKPHYS+idx*0x2000);
  11440. - BARRIER;
  11441. + mtc0_tlbw_hazard();
  11442. tlb_write_indexed();
  11443. + tlbw_use_hazard();
  11444. +
  11445. finish:
  11446. - BARRIER;
  11447. write_c0_entryhi(oldpid);
  11448. local_irq_restore(flags);
  11449. }
  11450. @@ -186,7 +153,7 @@
  11451. local_irq_save(flags);
  11452. write_c0_entryhi(page);
  11453. - BARRIER;
  11454. + mtc0_tlbw_hazard();
  11455. tlb_probe();
  11456. BARRIER;
  11457. idx = read_c0_index();
  11458. @@ -195,10 +162,12 @@
  11459. if (idx >= 0) {
  11460. /* Make sure all entries differ. */
  11461. write_c0_entryhi(KSEG0+idx*0x2000);
  11462. + mtc0_tlbw_hazard();
  11463. tlb_write_indexed();
  11464. + tlbw_use_hazard();
  11465. }
  11466. - BARRIER;
  11467. write_c0_entryhi(oldpid);
  11468. +
  11469. local_irq_restore(flags);
  11470. }
  11471. @@ -208,7 +177,6 @@
  11472. void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte)
  11473. {
  11474. unsigned long flags;
  11475. - unsigned int asid;
  11476. pgd_t *pgdp;
  11477. pmd_t *pmdp;
  11478. pte_t *ptep;
  11479. @@ -222,70 +190,58 @@
  11480. pid = read_c0_entryhi() & ASID_MASK;
  11481. -#ifdef DEBUG_TLB
  11482. - if ((pid != (cpu_asid(smp_processor_id(), vma->vm_mm))) ||
  11483. - (cpu_context(smp_processor_id(), vma->vm_mm) == 0)) {
  11484. - printk("update_mmu_cache: Wheee, bogus tlbpid mmpid=%d"
  11485. - "tlbpid=%d\n", (int) (cpu_context(smp_processor_id(),
  11486. - vma->vm_mm) & ASID_MASK), pid);
  11487. - }
  11488. -#endif
  11489. -
  11490. local_irq_save(flags);
  11491. address &= (PAGE_MASK << 1);
  11492. - write_c0_entryhi(address | (pid));
  11493. + write_c0_entryhi(address | pid);
  11494. pgdp = pgd_offset(vma->vm_mm, address);
  11495. - BARRIER;
  11496. + mtc0_tlbw_hazard();
  11497. tlb_probe();
  11498. BARRIER;
  11499. pmdp = pmd_offset(pgdp, address);
  11500. idx = read_c0_index();
  11501. ptep = pte_offset(pmdp, address);
  11502. - BARRIER;
  11503. write_c0_entrylo0(pte_val(*ptep++) >> 6);
  11504. write_c0_entrylo1(pte_val(*ptep) >> 6);
  11505. - write_c0_entryhi(address | (pid));
  11506. - BARRIER;
  11507. - if(idx < 0) {
  11508. + write_c0_entryhi(address | pid);
  11509. + mtc0_tlbw_hazard();
  11510. + if (idx < 0)
  11511. tlb_write_random();
  11512. - } else {
  11513. + else
  11514. tlb_write_indexed();
  11515. - }
  11516. - BARRIER;
  11517. + tlbw_use_hazard();
  11518. write_c0_entryhi(pid);
  11519. - BARRIER;
  11520. local_irq_restore(flags);
  11521. }
  11522. -void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
  11523. - unsigned long entryhi, unsigned long pagemask)
  11524. +void __init add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
  11525. + unsigned long entryhi, unsigned long pagemask)
  11526. {
  11527. - unsigned long flags;
  11528. - unsigned long wired;
  11529. - unsigned long old_pagemask;
  11530. - unsigned long old_ctx;
  11531. -
  11532. - local_irq_save(flags);
  11533. - /* Save old context and create impossible VPN2 value */
  11534. - old_ctx = (read_c0_entryhi() & ASID_MASK);
  11535. - old_pagemask = read_c0_pagemask();
  11536. - wired = read_c0_wired();
  11537. - write_c0_wired(wired + 1);
  11538. - write_c0_index(wired);
  11539. - BARRIER;
  11540. - write_c0_pagemask(pagemask);
  11541. - write_c0_entryhi(entryhi);
  11542. - write_c0_entrylo0(entrylo0);
  11543. - write_c0_entrylo1(entrylo1);
  11544. - BARRIER;
  11545. - tlb_write_indexed();
  11546. - BARRIER;
  11547. -
  11548. - write_c0_entryhi(old_ctx);
  11549. - BARRIER;
  11550. - write_c0_pagemask(old_pagemask);
  11551. - local_flush_tlb_all();
  11552. - local_irq_restore(flags);
  11553. + unsigned long flags;
  11554. + unsigned long wired;
  11555. + unsigned long old_pagemask;
  11556. + unsigned long old_ctx;
  11557. +
  11558. + local_irq_save(flags);
  11559. + /* Save old context and create impossible VPN2 value */
  11560. + old_ctx = read_c0_entryhi() & ASID_MASK;
  11561. + old_pagemask = read_c0_pagemask();
  11562. + wired = read_c0_wired();
  11563. + write_c0_wired(wired + 1);
  11564. + write_c0_index(wired);
  11565. + BARRIER;
  11566. + write_c0_pagemask(pagemask);
  11567. + write_c0_entryhi(entryhi);
  11568. + write_c0_entrylo0(entrylo0);
  11569. + write_c0_entrylo1(entrylo1);
  11570. + mtc0_tlbw_hazard();
  11571. + tlb_write_indexed();
  11572. + tlbw_use_hazard();
  11573. +
  11574. + write_c0_entryhi(old_ctx);
  11575. + BARRIER;
  11576. + write_c0_pagemask(old_pagemask);
  11577. + local_flush_tlb_all();
  11578. + local_irq_restore(flags);
  11579. }
  11580. /*
  11581. @@ -317,17 +273,15 @@
  11582. }
  11583. write_c0_index(temp_tlb_entry);
  11584. - BARRIER;
  11585. write_c0_pagemask(pagemask);
  11586. write_c0_entryhi(entryhi);
  11587. write_c0_entrylo0(entrylo0);
  11588. write_c0_entrylo1(entrylo1);
  11589. - BARRIER;
  11590. + mtc0_tlbw_hazard();
  11591. tlb_write_indexed();
  11592. - BARRIER;
  11593. + tlbw_use_hazard();
  11594. write_c0_entryhi(old_ctx);
  11595. - BARRIER;
  11596. write_c0_pagemask(old_pagemask);
  11597. out:
  11598. local_irq_restore(flags);
  11599. @@ -348,15 +302,23 @@
  11600. return;
  11601. config1 = read_c0_config1();
  11602. - if (!((config1 >> 7) & 3))
  11603. - panic("No MMU present");
  11604. + if (!((config >> 7) & 3))
  11605. + panic("No TLB present");
  11606. c->tlbsize = ((config1 >> 25) & 0x3f) + 1;
  11607. }
  11608. void __init r4k_tlb_init(void)
  11609. {
  11610. - unsigned long config = read_c0_config();
  11611. + unsigned int config = read_c0_config();
  11612. +
  11613. + /*
  11614. + * You should never change this register:
  11615. + * - On R4600 1.7 the tlbp never hits for pages smaller than
  11616. + * the value in the c0_pagemask register.
  11617. + * - The entire mm handling assumes the c0_pagemask register to
  11618. + * be set for 4kb pages.
  11619. + */
  11620. probe_tlb(config);
  11621. write_c0_pagemask(PM_DEFAULT_MASK);
  11622. write_c0_wired(0);
  11623. diff -Nur linux-2.4.32-rc1/drivers/char/au1000_gpio.c linux-2.4.32-rc1.mips/drivers/char/au1000_gpio.c
  11624. --- linux-2.4.32-rc1/drivers/char/au1000_gpio.c 2003-08-25 13:44:41.000000000 +0200
  11625. +++ linux-2.4.32-rc1.mips/drivers/char/au1000_gpio.c 2003-12-20 14:18:51.000000000 +0100
  11626. @@ -246,7 +246,7 @@
  11627. static struct miscdevice au1000gpio_miscdev =
  11628. {
  11629. - GPIO_MINOR,
  11630. + MISC_DYNAMIC_MINOR,
  11631. "au1000_gpio",
  11632. &au1000gpio_fops
  11633. };
  11634. diff -Nur linux-2.4.32-rc1/drivers/char/au1550_psc_spi.c linux-2.4.32-rc1.mips/drivers/char/au1550_psc_spi.c
  11635. --- linux-2.4.32-rc1/drivers/char/au1550_psc_spi.c 1970-01-01 01:00:00.000000000 +0100
  11636. +++ linux-2.4.32-rc1.mips/drivers/char/au1550_psc_spi.c 2005-02-11 21:37:24.000000000 +0100
  11637. @@ -0,0 +1,466 @@
  11638. +/*
  11639. + * Driver for Alchemy Au1550 SPI on the PSC.
  11640. + *
  11641. + * Copyright 2004 Embedded Edge, LLC.
  11642. + * [email protected]
  11643. + *
  11644. + * This program is free software; you can redistribute it and/or modify it
  11645. + * under the terms of the GNU General Public License as published by the
  11646. + * Free Software Foundation; either version 2 of the License, or (at your
  11647. + * option) any later version.
  11648. + *
  11649. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  11650. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  11651. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  11652. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  11653. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  11654. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  11655. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  11656. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  11657. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  11658. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  11659. + *
  11660. + * You should have received a copy of the GNU General Public License along
  11661. + * with this program; if not, write to the Free Software Foundation, Inc.,
  11662. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  11663. + */
  11664. +
  11665. +#include <linux/module.h>
  11666. +#include <linux/config.h>
  11667. +#include <linux/types.h>
  11668. +#include <linux/kernel.h>
  11669. +#include <linux/miscdevice.h>
  11670. +#include <linux/init.h>
  11671. +#include <asm/uaccess.h>
  11672. +#include <asm/io.h>
  11673. +#include <asm/au1000.h>
  11674. +#include <asm/au1550_spi.h>
  11675. +#include <asm/au1xxx_psc.h>
  11676. +
  11677. +#ifdef CONFIG_MIPS_PB1550
  11678. +#include <asm/pb1550.h>
  11679. +#endif
  11680. +
  11681. +#ifdef CONFIG_MIPS_DB1550
  11682. +#include <asm/db1x00.h>
  11683. +#endif
  11684. +
  11685. +#ifdef CONFIG_MIPS_PB1200
  11686. +#include <asm/pb1200.h>
  11687. +#endif
  11688. +
  11689. +/* This is just a simple programmed I/O SPI interface on the PSC of the 1550.
  11690. + * We support open, close, write, and ioctl. The SPI is a full duplex
  11691. + * interface, you can't read without writing. So, the write system call
  11692. + * copies the bytes out to the SPI, and whatever is returned is placed
  11693. + * in the same buffer. Kinda weird, maybe we'll change it, but for now
  11694. + * it works OK.
  11695. + * I didn't implement any DMA yet, and it's a debate about the necessity.
  11696. + * The SPI clocks are usually quite fast, so data is sent/received as
  11697. + * quickly as you can stuff the FIFO. The overhead of DMA and interrupts
  11698. + * are usually far greater than the data transfer itself. If, however,
  11699. + * we find applications that move large amounts of data, we may choose
  11700. + * use the overhead of buffering and DMA to do the work.
  11701. + */
  11702. +
  11703. +/* The maximum clock rate specified in the manual is 2mHz.
  11704. +*/
  11705. +#define MAX_BAUD_RATE (2 * 1000000)
  11706. +#define PSC_INTCLK_RATE (32 * 1000000)
  11707. +
  11708. +static int inuse;
  11709. +
  11710. +/* We have to know what the user requested for the data length
  11711. + * so we know how to stuff the fifo. The FIFO is 32 bits wide,
  11712. + * and we have to load it with the bits to go in a single transfer.
  11713. + */
  11714. +static uint spi_datalen;
  11715. +
  11716. +static int
  11717. +au1550spi_master_done( int ms )
  11718. +{
  11719. + int timeout=ms;
  11720. + volatile psc_spi_t *sp;
  11721. +
  11722. + sp = (volatile psc_spi_t *)SPI_PSC_BASE;
  11723. +
  11724. + /* Loop until MD is set or timeout has expired */
  11725. + while(!(sp->psc_spievent & PSC_SPIEVNT_MD) && timeout--) udelay(1000);
  11726. +
  11727. + if ( !timeout )
  11728. + return 0;
  11729. + else
  11730. + sp->psc_spievent |= PSC_SPIEVNT_MD;
  11731. +
  11732. + return 1;
  11733. +}
  11734. +
  11735. +static int
  11736. +au1550spi_open(struct inode *inode, struct file *file)
  11737. +{
  11738. + if (inuse)
  11739. + return -EBUSY;
  11740. +
  11741. + inuse = 1;
  11742. +
  11743. + MOD_INC_USE_COUNT;
  11744. +
  11745. + return 0;
  11746. +}
  11747. +
  11748. +static ssize_t
  11749. +au1550spi_write(struct file *fp, const char *bp, size_t count, loff_t *ppos)
  11750. +{
  11751. + int bytelen, i;
  11752. + size_t rcount, retval;
  11753. + unsigned char sb, *rp, *wp;
  11754. + uint fifoword, pcr, stat;
  11755. + volatile psc_spi_t *sp;
  11756. +
  11757. + /* Get the number of bytes per transfer.
  11758. + */
  11759. + bytelen = ((spi_datalen - 1) / 8) + 1;
  11760. +
  11761. + /* User needs to send us multiple of this count.
  11762. + */
  11763. + if ((count % bytelen) != 0)
  11764. + return -EINVAL;
  11765. +
  11766. + rp = wp = (unsigned char *)bp;
  11767. + retval = rcount = count;
  11768. +
  11769. + /* Reset the FIFO.
  11770. + */
  11771. + sp = (volatile psc_spi_t *)SPI_PSC_BASE;
  11772. + sp->psc_spipcr = (PSC_SPIPCR_RC | PSC_SPIPCR_TC);
  11773. + au_sync();
  11774. + do {
  11775. + pcr = sp->psc_spipcr;
  11776. + au_sync();
  11777. + } while (pcr != 0);
  11778. +
  11779. + /* Prime the transmit FIFO.
  11780. + */
  11781. + while (count > 0) {
  11782. + fifoword = 0;
  11783. + for (i=0; i<bytelen; i++) {
  11784. + fifoword <<= 8;
  11785. + if (get_user(sb, wp) < 0)
  11786. + return -EFAULT;
  11787. + fifoword |= sb;
  11788. + wp++;
  11789. + }
  11790. + count -= bytelen;
  11791. + if (count <= 0)
  11792. + fifoword |= PSC_SPITXRX_LC;
  11793. + sp->psc_spitxrx = fifoword;
  11794. + au_sync();
  11795. + stat = sp->psc_spistat;
  11796. + au_sync();
  11797. + if (stat & PSC_SPISTAT_TF)
  11798. + break;
  11799. + }
  11800. +
  11801. + /* Start the transfer.
  11802. + */
  11803. + sp->psc_spipcr = PSC_SPIPCR_MS;
  11804. + au_sync();
  11805. +
  11806. + /* Now, just keep the transmit fifo full and empty the receive.
  11807. + */
  11808. + while (count > 0) {
  11809. + stat = sp->psc_spistat;
  11810. + au_sync();
  11811. + while ((stat & PSC_SPISTAT_RE) == 0) {
  11812. + fifoword = sp->psc_spitxrx;
  11813. + au_sync();
  11814. + for (i=0; i<bytelen; i++) {
  11815. + sb = fifoword & 0xff;
  11816. + if (put_user(sb, rp) < 0)
  11817. + return -EFAULT;
  11818. + fifoword >>= 8;
  11819. + rp++;
  11820. + }
  11821. + rcount -= bytelen;
  11822. + stat = sp->psc_spistat;
  11823. + au_sync();
  11824. + }
  11825. + if ((stat & PSC_SPISTAT_TF) == 0) {
  11826. + fifoword = 0;
  11827. + for (i=0; i<bytelen; i++) {
  11828. + fifoword <<= 8;
  11829. + if (get_user(sb, wp) < 0)
  11830. + return -EFAULT;
  11831. + fifoword |= sb;
  11832. + wp++;
  11833. + }
  11834. + count -= bytelen;
  11835. + if (count <= 0)
  11836. + fifoword |= PSC_SPITXRX_LC;
  11837. + sp->psc_spitxrx = fifoword;
  11838. + au_sync();
  11839. + }
  11840. + }
  11841. +
  11842. + /* All of the bytes for transmit have been written. Hang
  11843. + * out waiting for any residual bytes that are yet to be
  11844. + * read from the fifo.
  11845. + */
  11846. + while (rcount > 0) {
  11847. + stat = sp->psc_spistat;
  11848. + au_sync();
  11849. + if ((stat & PSC_SPISTAT_RE) == 0) {
  11850. + fifoword = sp->psc_spitxrx;
  11851. + au_sync();
  11852. + for (i=0; i<bytelen; i++) {
  11853. + sb = fifoword & 0xff;
  11854. + if (put_user(sb, rp) < 0)
  11855. + return -EFAULT;
  11856. + fifoword >>= 8;
  11857. + rp++;
  11858. + }
  11859. + rcount -= bytelen;
  11860. + }
  11861. + }
  11862. +
  11863. + /* Wait for MasterDone event. 30ms timeout */
  11864. + if (!au1550spi_master_done(30) ) retval = -EFAULT;
  11865. + return retval;
  11866. +}
  11867. +
  11868. +static int
  11869. +au1550spi_release(struct inode *inode, struct file *file)
  11870. +{
  11871. + MOD_DEC_USE_COUNT;
  11872. +
  11873. + inuse = 0;
  11874. +
  11875. + return 0;
  11876. +}
  11877. +
  11878. +/* Set the baud rate closest to the request, then return the actual
  11879. + * value we are using.
  11880. + */
  11881. +static uint
  11882. +set_baud_rate(uint baud)
  11883. +{
  11884. + uint rate, tmpclk, brg, ctl, stat;
  11885. + volatile psc_spi_t *sp;
  11886. +
  11887. + /* For starters, the input clock is divided by two.
  11888. + */
  11889. + tmpclk = PSC_INTCLK_RATE/2;
  11890. +
  11891. + rate = tmpclk / baud;
  11892. +
  11893. + /* The dividers work as follows:
  11894. + * baud = tmpclk / (2 * (brg + 1))
  11895. + */
  11896. + brg = (rate/2) - 1;
  11897. +
  11898. + /* Test BRG to ensure it will fit into the 6 bits allocated.
  11899. + */
  11900. +
  11901. + /* Make sure the device is disabled while we make the change.
  11902. + */
  11903. + sp = (volatile psc_spi_t *)SPI_PSC_BASE;
  11904. + ctl = sp->psc_spicfg;
  11905. + au_sync();
  11906. + sp->psc_spicfg = ctl & ~PSC_SPICFG_DE_ENABLE;
  11907. + au_sync();
  11908. + ctl = PSC_SPICFG_CLR_BAUD(ctl);
  11909. + ctl |= PSC_SPICFG_SET_BAUD(brg);
  11910. + sp->psc_spicfg = ctl;
  11911. + au_sync();
  11912. +
  11913. + /* If the device was running prior to getting here, wait for
  11914. + * it to restart.
  11915. + */
  11916. + if (ctl & PSC_SPICFG_DE_ENABLE) {
  11917. + do {
  11918. + stat = sp->psc_spistat;
  11919. + au_sync();
  11920. + } while ((stat & PSC_SPISTAT_DR) == 0);
  11921. + }
  11922. +
  11923. + /* Return the actual value.
  11924. + */
  11925. + rate = tmpclk / (2 * (brg + 1));
  11926. +
  11927. + return(rate);
  11928. +}
  11929. +
  11930. +static uint
  11931. +set_word_len(uint len)
  11932. +{
  11933. + uint ctl, stat;
  11934. + volatile psc_spi_t *sp;
  11935. +
  11936. + if ((len < 4) || (len > 24))
  11937. + return -EINVAL;
  11938. +
  11939. + /* Make sure the device is disabled while we make the change.
  11940. + */
  11941. + sp = (volatile psc_spi_t *)SPI_PSC_BASE;
  11942. + ctl = sp->psc_spicfg;
  11943. + au_sync();
  11944. + sp->psc_spicfg = ctl & ~PSC_SPICFG_DE_ENABLE;
  11945. + au_sync();
  11946. + ctl = PSC_SPICFG_CLR_LEN(ctl);
  11947. + ctl |= PSC_SPICFG_SET_LEN(len);
  11948. + sp->psc_spicfg = ctl;
  11949. + au_sync();
  11950. +
  11951. + /* If the device was running prior to getting here, wait for
  11952. + * it to restart.
  11953. + */
  11954. + if (ctl & PSC_SPICFG_DE_ENABLE) {
  11955. + do {
  11956. + stat = sp->psc_spistat;
  11957. + au_sync();
  11958. + } while ((stat & PSC_SPISTAT_DR) == 0);
  11959. + }
  11960. +
  11961. + return 0;
  11962. +}
  11963. +
  11964. +static int
  11965. +au1550spi_ioctl(struct inode *inode, struct file *file,
  11966. + unsigned int cmd, unsigned long arg)
  11967. +{
  11968. + int status;
  11969. + u32 val;
  11970. +
  11971. + status = 0;
  11972. +
  11973. + switch(cmd) {
  11974. + case AU1550SPI_WORD_LEN:
  11975. + status = set_word_len(arg);
  11976. + break;
  11977. +
  11978. + case AU1550SPI_SET_BAUD:
  11979. + if (get_user(val, (u32 *)arg))
  11980. + return -EFAULT;
  11981. +
  11982. + val = set_baud_rate(val);
  11983. + if (put_user(val, (u32 *)arg))
  11984. + return -EFAULT;
  11985. + break;
  11986. +
  11987. + default:
  11988. + status = -ENOIOCTLCMD;
  11989. +
  11990. + }
  11991. +
  11992. + return status;
  11993. +}
  11994. +
  11995. +
  11996. +static struct file_operations au1550spi_fops =
  11997. +{
  11998. + owner: THIS_MODULE,
  11999. + write: au1550spi_write,
  12000. + ioctl: au1550spi_ioctl,
  12001. + open: au1550spi_open,
  12002. + release: au1550spi_release,
  12003. +};
  12004. +
  12005. +
  12006. +static struct miscdevice au1550spi_miscdev =
  12007. +{
  12008. + MISC_DYNAMIC_MINOR,
  12009. + "au1550_spi",
  12010. + &au1550spi_fops
  12011. +};
  12012. +
  12013. +
  12014. +int __init
  12015. +au1550spi_init(void)
  12016. +{
  12017. + uint clk, rate, stat;
  12018. + volatile psc_spi_t *sp;
  12019. +
  12020. + /* Wire up Freq3 as a clock for the SPI. The PSC does
  12021. + * factor of 2 divisor, so run a higher rate so we can
  12022. + * get some granularity to the clock speeds.
  12023. + * We can't do this in board set up because the frequency
  12024. + * is computed too late.
  12025. + */
  12026. + rate = get_au1x00_speed();
  12027. + rate /= PSC_INTCLK_RATE;
  12028. +
  12029. + /* The FRDIV in the frequency control is (FRDIV + 1) * 2
  12030. + */
  12031. + rate /=2;
  12032. + rate--;
  12033. + clk = au_readl(SYS_FREQCTRL1);
  12034. + au_sync();
  12035. + clk &= ~SYS_FC_FRDIV3_MASK;
  12036. + clk |= (rate << SYS_FC_FRDIV3_BIT);
  12037. + clk |= SYS_FC_FE3;
  12038. + au_writel(clk, SYS_FREQCTRL1);
  12039. + au_sync();
  12040. +
  12041. + /* Set up the clock source routing to get Freq3 to PSC0_intclk.
  12042. + */
  12043. + clk = au_readl(SYS_CLKSRC);
  12044. + au_sync();
  12045. + clk &= ~0x03e0;
  12046. + clk |= (5 << 7);
  12047. + au_writel(clk, SYS_CLKSRC);
  12048. + au_sync();
  12049. +
  12050. + /* Set up GPIO pin function to drive PSC0_SYNC1, which is
  12051. + * the SPI Select.
  12052. + */
  12053. + clk = au_readl(SYS_PINFUNC);
  12054. + au_sync();
  12055. + clk |= 1;
  12056. + au_writel(clk, SYS_PINFUNC);
  12057. + au_sync();
  12058. +
  12059. + /* Now, set up the PSC for SPI PIO mode.
  12060. + */
  12061. + sp = (volatile psc_spi_t *)SPI_PSC_BASE;
  12062. + sp->psc_ctrl = PSC_CTRL_DISABLE;
  12063. + au_sync();
  12064. + sp->psc_sel = PSC_SEL_PS_SPIMODE;
  12065. + sp->psc_spicfg = 0;
  12066. + au_sync();
  12067. + sp->psc_ctrl = PSC_CTRL_ENABLE;
  12068. + au_sync();
  12069. + do {
  12070. + stat = sp->psc_spistat;
  12071. + au_sync();
  12072. + } while ((stat & PSC_SPISTAT_SR) == 0);
  12073. +
  12074. + sp->psc_spicfg = (PSC_SPICFG_RT_FIFO8 | PSC_SPICFG_TT_FIFO8 |
  12075. + PSC_SPICFG_DD_DISABLE | PSC_SPICFG_MO);
  12076. + sp->psc_spicfg |= PSC_SPICFG_SET_LEN(8);
  12077. + spi_datalen = 8;
  12078. + sp->psc_spimsk = PSC_SPIMSK_ALLMASK;
  12079. + au_sync();
  12080. +
  12081. + set_baud_rate(1000000);
  12082. +
  12083. + sp->psc_spicfg |= PSC_SPICFG_DE_ENABLE;
  12084. + do {
  12085. + stat = sp->psc_spistat;
  12086. + au_sync();
  12087. + } while ((stat & PSC_SPISTAT_DR) == 0);
  12088. +
  12089. + misc_register(&au1550spi_miscdev);
  12090. + printk("Au1550 SPI driver\n");
  12091. + return 0;
  12092. +}
  12093. +
  12094. +
  12095. +void __exit
  12096. +au1550spi_exit(void)
  12097. +{
  12098. + misc_deregister(&au1550spi_miscdev);
  12099. +}
  12100. +
  12101. +
  12102. +module_init(au1550spi_init);
  12103. +module_exit(au1550spi_exit);
  12104. diff -Nur linux-2.4.32-rc1/drivers/char/Config.in linux-2.4.32-rc1.mips/drivers/char/Config.in
  12105. --- linux-2.4.32-rc1/drivers/char/Config.in 2004-08-08 01:26:04.000000000 +0200
  12106. +++ linux-2.4.32-rc1.mips/drivers/char/Config.in 2005-02-11 22:09:56.000000000 +0100
  12107. @@ -313,14 +313,11 @@
  12108. if [ "$CONFIG_OBSOLETE" = "y" -a "$CONFIG_ALPHA_BOOK1" = "y" ]; then
  12109. bool 'Tadpole ANA H8 Support (OBSOLETE)' CONFIG_H8
  12110. fi
  12111. -if [ "$CONFIG_MIPS" = "y" -a "$CONFIG_NEW_TIME_C" = "y" ]; then
  12112. - tristate 'Generic MIPS RTC Support' CONFIG_MIPS_RTC
  12113. -fi
  12114. if [ "$CONFIG_SGI_IP22" = "y" ]; then
  12115. - bool 'SGI DS1286 RTC support' CONFIG_SGI_DS1286
  12116. + tristate 'Dallas DS1286 RTC support' CONFIG_DS1286
  12117. fi
  12118. if [ "$CONFIG_SGI_IP27" = "y" ]; then
  12119. - bool 'SGI M48T35 RTC support' CONFIG_SGI_IP27_RTC
  12120. + tristate 'SGI M48T35 RTC support' CONFIG_SGI_IP27_RTC
  12121. fi
  12122. if [ "$CONFIG_TOSHIBA_RBTX4927" = "y" -o "$CONFIG_TOSHIBA_JMR3927" = "y" ]; then
  12123. tristate 'Dallas DS1742 RTC support' CONFIG_DS1742
  12124. @@ -383,6 +380,11 @@
  12125. source drivers/char/drm/Config.in
  12126. fi
  12127. fi
  12128. +
  12129. +if [ "$CONFIG_X86" = "y" ]; then
  12130. + tristate 'ACP Modem (Mwave) support' CONFIG_MWAVE
  12131. +fi
  12132. +
  12133. endmenu
  12134. if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
  12135. @@ -391,6 +393,7 @@
  12136. if [ "$CONFIG_SOC_AU1X00" = "y" ]; then
  12137. tristate ' Alchemy Au1x00 GPIO device support' CONFIG_AU1X00_GPIO
  12138. tristate ' Au1000/ADS7846 touchscreen support' CONFIG_TS_AU1X00_ADS7846
  12139. + #tristate ' Alchemy Au1550 PSC SPI support' CONFIG_AU1550_PSC_SPI
  12140. fi
  12141. if [ "$CONFIG_MIPS_ITE8172" = "y" ]; then
  12142. tristate ' ITE GPIO' CONFIG_ITE_GPIO
  12143. diff -Nur linux-2.4.32-rc1/drivers/char/decserial.c linux-2.4.32-rc1.mips/drivers/char/decserial.c
  12144. --- linux-2.4.32-rc1/drivers/char/decserial.c 2003-08-25 13:44:41.000000000 +0200
  12145. +++ linux-2.4.32-rc1.mips/drivers/char/decserial.c 2004-09-28 02:53:01.000000000 +0200
  12146. @@ -3,95 +3,105 @@
  12147. * choose the right serial device at boot time
  12148. *
  12149. * triemer 6-SEP-1998
  12150. - * sercons.c is designed to allow the three different kinds
  12151. + * sercons.c is designed to allow the three different kinds
  12152. * of serial devices under the decstation world to co-exist
  12153. - * in the same kernel. The idea here is to abstract
  12154. + * in the same kernel. The idea here is to abstract
  12155. * the pieces of the drivers that are common to this file
  12156. * so that they do not clash at compile time and runtime.
  12157. *
  12158. * HK 16-SEP-1998 v0.002
  12159. * removed the PROM console as this is not a real serial
  12160. * device. Added support for PROM console in drivers/char/tty_io.c
  12161. - * instead. Although it may work to enable more than one
  12162. + * instead. Although it may work to enable more than one
  12163. * console device I strongly recommend to use only one.
  12164. + *
  12165. + * Copyright (C) 2004 Maciej W. Rozycki
  12166. */
  12167. #include <linux/config.h>
  12168. +#include <linux/errno.h>
  12169. #include <linux/init.h>
  12170. +
  12171. #include <asm/dec/machtype.h>
  12172. +#include <asm/dec/serial.h>
  12173. +
  12174. +extern int register_zs_hook(unsigned int channel,
  12175. + struct dec_serial_hook *hook);
  12176. +extern int unregister_zs_hook(unsigned int channel);
  12177. +
  12178. +extern int register_dz_hook(unsigned int channel,
  12179. + struct dec_serial_hook *hook);
  12180. +extern int unregister_dz_hook(unsigned int channel);
  12181. +int register_dec_serial_hook(unsigned int channel,
  12182. + struct dec_serial_hook *hook)
  12183. +{
  12184. #ifdef CONFIG_ZS
  12185. -extern int zs_init(void);
  12186. + if (IOASIC)
  12187. + return register_zs_hook(channel, hook);
  12188. #endif
  12189. -
  12190. #ifdef CONFIG_DZ
  12191. -extern int dz_init(void);
  12192. + if (!IOASIC)
  12193. + return register_dz_hook(channel, hook);
  12194. #endif
  12195. + return 0;
  12196. +}
  12197. -#ifdef CONFIG_SERIAL_DEC_CONSOLE
  12198. -
  12199. +int unregister_dec_serial_hook(unsigned int channel)
  12200. +{
  12201. #ifdef CONFIG_ZS
  12202. -extern void zs_serial_console_init(void);
  12203. + if (IOASIC)
  12204. + return unregister_zs_hook(channel);
  12205. #endif
  12206. -
  12207. #ifdef CONFIG_DZ
  12208. -extern void dz_serial_console_init(void);
  12209. -#endif
  12210. -
  12211. + if (!IOASIC)
  12212. + return unregister_dz_hook(channel);
  12213. #endif
  12214. + return 0;
  12215. +}
  12216. -/* rs_init - starts up the serial interface -
  12217. - handle normal case of starting up the serial interface */
  12218. -#ifdef CONFIG_SERIAL_DEC
  12219. +extern int zs_init(void);
  12220. +extern int dz_init(void);
  12221. +/*
  12222. + * rs_init - starts up the serial interface -
  12223. + * handle normal case of starting up the serial interface
  12224. + */
  12225. int __init rs_init(void)
  12226. {
  12227. -
  12228. -#if defined(CONFIG_ZS) && defined(CONFIG_DZ)
  12229. - if (IOASIC)
  12230. - return zs_init();
  12231. - else
  12232. - return dz_init();
  12233. -#else
  12234. -
  12235. #ifdef CONFIG_ZS
  12236. - return zs_init();
  12237. + if (IOASIC)
  12238. + return zs_init();
  12239. #endif
  12240. -
  12241. #ifdef CONFIG_DZ
  12242. - return dz_init();
  12243. -#endif
  12244. -
  12245. + if (!IOASIC)
  12246. + return dz_init();
  12247. #endif
  12248. + return -ENXIO;
  12249. }
  12250. __initcall(rs_init);
  12251. -#endif
  12252. #ifdef CONFIG_SERIAL_DEC_CONSOLE
  12253. -/* dec_serial_console_init handles the special case of starting
  12254. - * up the console on the serial port
  12255. +extern void zs_serial_console_init(void);
  12256. +extern void dz_serial_console_init(void);
  12257. +
  12258. +/*
  12259. + * dec_serial_console_init handles the special case of starting
  12260. + * up the console on the serial port
  12261. */
  12262. void __init dec_serial_console_init(void)
  12263. {
  12264. -#if defined(CONFIG_ZS) && defined(CONFIG_DZ)
  12265. - if (IOASIC)
  12266. - zs_serial_console_init();
  12267. - else
  12268. - dz_serial_console_init();
  12269. -#else
  12270. -
  12271. #ifdef CONFIG_ZS
  12272. - zs_serial_console_init();
  12273. + if (IOASIC)
  12274. + zs_serial_console_init();
  12275. #endif
  12276. -
  12277. #ifdef CONFIG_DZ
  12278. - dz_serial_console_init();
  12279. -#endif
  12280. -
  12281. + if (!IOASIC)
  12282. + dz_serial_console_init();
  12283. #endif
  12284. }
  12285. diff -Nur linux-2.4.32-rc1/drivers/char/ds1286.c linux-2.4.32-rc1.mips/drivers/char/ds1286.c
  12286. --- linux-2.4.32-rc1/drivers/char/ds1286.c 2004-02-18 14:36:31.000000000 +0100
  12287. +++ linux-2.4.32-rc1.mips/drivers/char/ds1286.c 2004-01-10 06:21:39.000000000 +0100
  12288. @@ -1,6 +1,10 @@
  12289. /*
  12290. * DS1286 Real Time Clock interface for Linux
  12291. *
  12292. + * Copyright (C) 2003 TimeSys Corp.
  12293. + * S. James Hill ([email protected])
  12294. + * ([email protected])
  12295. + *
  12296. * Copyright (C) 1998, 1999, 2000 Ralf Baechle
  12297. *
  12298. * Based on code written by Paul Gortmaker.
  12299. @@ -29,6 +33,7 @@
  12300. #include <linux/types.h>
  12301. #include <linux/errno.h>
  12302. #include <linux/miscdevice.h>
  12303. +#include <linux/module.h>
  12304. #include <linux/slab.h>
  12305. #include <linux/ioport.h>
  12306. #include <linux/fcntl.h>
  12307. @@ -95,6 +100,12 @@
  12308. return -EIO;
  12309. }
  12310. +void rtc_ds1286_wait(void)
  12311. +{
  12312. + unsigned char sec = CMOS_READ(RTC_SECONDS);
  12313. + while (sec == CMOS_READ(RTC_SECONDS));
  12314. +}
  12315. +
  12316. static int ds1286_ioctl(struct inode *inode, struct file *file,
  12317. unsigned int cmd, unsigned long arg)
  12318. {
  12319. @@ -249,23 +260,22 @@
  12320. {
  12321. spin_lock_irq(&ds1286_lock);
  12322. - if (ds1286_status & RTC_IS_OPEN)
  12323. - goto out_busy;
  12324. + if (ds1286_status & RTC_IS_OPEN) {
  12325. + spin_unlock_irq(&ds1286_lock);
  12326. + return -EBUSY;
  12327. + }
  12328. ds1286_status |= RTC_IS_OPEN;
  12329. - spin_lock_irq(&ds1286_lock);
  12330. + spin_unlock_irq(&ds1286_lock);
  12331. return 0;
  12332. -
  12333. -out_busy:
  12334. - spin_lock_irq(&ds1286_lock);
  12335. - return -EBUSY;
  12336. }
  12337. static int ds1286_release(struct inode *inode, struct file *file)
  12338. {
  12339. + spin_lock_irq(&ds1286_lock);
  12340. ds1286_status &= ~RTC_IS_OPEN;
  12341. -
  12342. + spin_unlock_irq(&ds1286_lock);
  12343. return 0;
  12344. }
  12345. @@ -276,32 +286,6 @@
  12346. return 0;
  12347. }
  12348. -/*
  12349. - * The various file operations we support.
  12350. - */
  12351. -
  12352. -static struct file_operations ds1286_fops = {
  12353. - .llseek = no_llseek,
  12354. - .read = ds1286_read,
  12355. - .poll = ds1286_poll,
  12356. - .ioctl = ds1286_ioctl,
  12357. - .open = ds1286_open,
  12358. - .release = ds1286_release,
  12359. -};
  12360. -
  12361. -static struct miscdevice ds1286_dev=
  12362. -{
  12363. - .minor = RTC_MINOR,
  12364. - .name = "rtc",
  12365. - .fops = &ds1286_fops,
  12366. -};
  12367. -
  12368. -int __init ds1286_init(void)
  12369. -{
  12370. - printk(KERN_INFO "DS1286 Real Time Clock Driver v%s\n", DS1286_VERSION);
  12371. - return misc_register(&ds1286_dev);
  12372. -}
  12373. -
  12374. static char *days[] = {
  12375. "***", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
  12376. };
  12377. @@ -528,3 +512,38 @@
  12378. BCD_TO_BIN(alm_tm->tm_hour);
  12379. alm_tm->tm_sec = 0;
  12380. }
  12381. +
  12382. +static struct file_operations ds1286_fops = {
  12383. + .owner = THIS_MODULE,
  12384. + .llseek = no_llseek,
  12385. + .read = ds1286_read,
  12386. + .poll = ds1286_poll,
  12387. + .ioctl = ds1286_ioctl,
  12388. + .open = ds1286_open,
  12389. + .release = ds1286_release,
  12390. +};
  12391. +
  12392. +static struct miscdevice ds1286_dev =
  12393. +{
  12394. + .minor = RTC_MINOR,
  12395. + .name = "rtc",
  12396. + .fops = &ds1286_fops,
  12397. +};
  12398. +
  12399. +static int __init ds1286_init(void)
  12400. +{
  12401. + printk(KERN_INFO "DS1286 Real Time Clock Driver v%s\n", DS1286_VERSION);
  12402. + return misc_register(&ds1286_dev);
  12403. +}
  12404. +
  12405. +static void __exit ds1286_exit(void)
  12406. +{
  12407. + misc_deregister(&ds1286_dev);
  12408. +}
  12409. +
  12410. +module_init(ds1286_init);
  12411. +module_exit(ds1286_exit);
  12412. +EXPORT_NO_SYMBOLS;
  12413. +
  12414. +MODULE_AUTHOR("Ralf Baechle");
  12415. +MODULE_LICENSE("GPL");
  12416. diff -Nur linux-2.4.32-rc1/drivers/char/ds1742.c linux-2.4.32-rc1.mips/drivers/char/ds1742.c
  12417. --- linux-2.4.32-rc1/drivers/char/ds1742.c 2004-02-18 14:36:31.000000000 +0100
  12418. +++ linux-2.4.32-rc1.mips/drivers/char/ds1742.c 2004-01-09 20:27:16.000000000 +0100
  12419. @@ -142,6 +142,7 @@
  12420. CMOS_WRITE(RTC_WRITE, RTC_CONTROL);
  12421. /* convert */
  12422. + memset(&tm, 0, sizeof(struct rtc_time));
  12423. to_tm(t, &tm);
  12424. /* check each field one by one */
  12425. @@ -216,6 +217,7 @@
  12426. unsigned long curr_time;
  12427. curr_time = rtc_ds1742_get_time();
  12428. + memset(&tm, 0, sizeof(struct rtc_time));
  12429. to_tm(curr_time, &tm);
  12430. p = buf;
  12431. @@ -251,8 +253,8 @@
  12432. void rtc_ds1742_wait(void)
  12433. {
  12434. - while (CMOS_READ(RTC_SECONDS) & 1);
  12435. - while (!(CMOS_READ(RTC_SECONDS) & 1));
  12436. + unsigned char sec = CMOS_READ(RTC_SECONDS);
  12437. + while (sec == CMOS_READ(RTC_SECONDS));
  12438. }
  12439. static int ds1742_ioctl(struct inode *inode, struct file *file,
  12440. @@ -264,6 +266,7 @@
  12441. switch (cmd) {
  12442. case RTC_RD_TIME: /* Read the time/date from RTC */
  12443. curr_time = rtc_ds1742_get_time();
  12444. + memset(&rtc_tm, 0, sizeof(struct rtc_time));
  12445. to_tm(curr_time, &rtc_tm);
  12446. rtc_tm.tm_year -= 1900;
  12447. return copy_to_user((void *) arg, &rtc_tm, sizeof(rtc_tm)) ?
  12448. diff -Nur linux-2.4.32-rc1/drivers/char/dummy_keyb.c linux-2.4.32-rc1.mips/drivers/char/dummy_keyb.c
  12449. --- linux-2.4.32-rc1/drivers/char/dummy_keyb.c 2003-08-25 13:44:41.000000000 +0200
  12450. +++ linux-2.4.32-rc1.mips/drivers/char/dummy_keyb.c 2004-01-09 09:53:08.000000000 +0100
  12451. @@ -140,3 +140,7 @@
  12452. {
  12453. printk("Dummy keyboard driver installed.\n");
  12454. }
  12455. +#ifdef CONFIG_MAGIC_SYSRQ
  12456. +unsigned char kbd_sysrq_key;
  12457. +unsigned char kbd_sysrq_xlate[128];
  12458. +#endif
  12459. diff -Nur linux-2.4.32-rc1/drivers/char/dz.c linux-2.4.32-rc1.mips/drivers/char/dz.c
  12460. --- linux-2.4.32-rc1/drivers/char/dz.c 2005-01-19 15:09:44.000000000 +0100
  12461. +++ linux-2.4.32-rc1.mips/drivers/char/dz.c 2004-12-27 05:13:42.000000000 +0100
  12462. @@ -1,11 +1,13 @@
  12463. /*
  12464. - * dz.c: Serial port driver for DECStations equiped
  12465. + * dz.c: Serial port driver for DECstations equipped
  12466. * with the DZ chipset.
  12467. *
  12468. * Copyright (C) 1998 Olivier A. D. Lebaillif
  12469. *
  12470. * Email: [email protected]
  12471. *
  12472. + * Copyright (C) 2004 Maciej W. Rozycki
  12473. + *
  12474. * [31-AUG-98] triemer
  12475. * Changed IRQ to use Harald's dec internals interrupts.h
  12476. * removed base_addr code - moving address assignment to setup.c
  12477. @@ -24,6 +26,7 @@
  12478. #undef DEBUG_DZ
  12479. #include <linux/config.h>
  12480. +#include <linux/delay.h>
  12481. #include <linux/version.h>
  12482. #include <linux/kernel.h>
  12483. #include <linux/sched.h>
  12484. @@ -54,33 +57,56 @@
  12485. #include <asm/system.h>
  12486. #include <asm/uaccess.h>
  12487. -#define CONSOLE_LINE (3) /* for definition of struct console */
  12488. +#ifdef CONFIG_MAGIC_SYSRQ
  12489. +#include <linux/sysrq.h>
  12490. +#endif
  12491. #include "dz.h"
  12492. -#define DZ_INTR_DEBUG 1
  12493. -
  12494. DECLARE_TASK_QUEUE(tq_serial);
  12495. -static struct dz_serial *lines[4];
  12496. -static unsigned char tmp_buffer[256];
  12497. +static struct dz_serial multi[DZ_NB_PORT]; /* Four serial lines in the DZ chip */
  12498. +static struct tty_driver serial_driver, callout_driver;
  12499. +
  12500. +static struct tty_struct *serial_table[DZ_NB_PORT];
  12501. +static struct termios *serial_termios[DZ_NB_PORT];
  12502. +static struct termios *serial_termios_locked[DZ_NB_PORT];
  12503. +
  12504. +static int serial_refcount;
  12505. -#ifdef DEBUG_DZ
  12506. /*
  12507. - * debugging code to send out chars via prom
  12508. + * tmp_buf is used as a temporary buffer by serial_write. We need to
  12509. + * lock it in case the copy_from_user blocks while swapping in a page,
  12510. + * and some other program tries to do a serial write at the same time.
  12511. + * Since the lock will only come under contention when the system is
  12512. + * swapping and available memory is low, it makes sense to share one
  12513. + * buffer across all the serial ports, since it significantly saves
  12514. + * memory if large numbers of serial ports are open.
  12515. */
  12516. -static void debug_console(const char *s, int count)
  12517. -{
  12518. - unsigned i;
  12519. +static unsigned char *tmp_buf;
  12520. +static DECLARE_MUTEX(tmp_buf_sem);
  12521. - for (i = 0; i < count; i++) {
  12522. - if (*s == 10)
  12523. - prom_printf("%c", 13);
  12524. - prom_printf("%c", *s++);
  12525. - }
  12526. -}
  12527. +static char *dz_name __initdata = "DECstation DZ serial driver version ";
  12528. +static char *dz_version __initdata = "1.03";
  12529. +
  12530. +static struct dz_serial *lines[DZ_NB_PORT];
  12531. +static unsigned char tmp_buffer[256];
  12532. +
  12533. +#ifdef CONFIG_SERIAL_DEC_CONSOLE
  12534. +static struct console dz_sercons;
  12535. +#endif
  12536. +#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && \
  12537. + !defined(MODULE)
  12538. +static unsigned long break_pressed; /* break, really ... */
  12539. #endif
  12540. +static void change_speed (struct dz_serial *);
  12541. +
  12542. +static int baud_table[] = {
  12543. + 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
  12544. + 9600, 0
  12545. +};
  12546. +
  12547. /*
  12548. * ------------------------------------------------------------
  12549. * dz_in () and dz_out ()
  12550. @@ -94,15 +120,16 @@
  12551. {
  12552. volatile unsigned short *addr =
  12553. (volatile unsigned short *) (info->port + offset);
  12554. +
  12555. return *addr;
  12556. }
  12557. static inline void dz_out(struct dz_serial *info, unsigned offset,
  12558. unsigned short value)
  12559. {
  12560. -
  12561. volatile unsigned short *addr =
  12562. (volatile unsigned short *) (info->port + offset);
  12563. +
  12564. *addr = value;
  12565. }
  12566. @@ -143,25 +170,24 @@
  12567. tmp |= mask; /* set the TX flag */
  12568. dz_out(info, DZ_TCR, tmp);
  12569. -
  12570. }
  12571. /*
  12572. * ------------------------------------------------------------
  12573. - * Here starts the interrupt handling routines. All of the
  12574. - * following subroutines are declared as inline and are folded
  12575. - * into dz_interrupt. They were separated out for readability's
  12576. - * sake.
  12577. *
  12578. - * Note: rs_interrupt() is a "fast" interrupt, which means that it
  12579. + * Here starts the interrupt handling routines. All of the following
  12580. + * subroutines are declared as inline and are folded into
  12581. + * dz_interrupt(). They were separated out for readability's sake.
  12582. + *
  12583. + * Note: dz_interrupt() is a "fast" interrupt, which means that it
  12584. * runs with interrupts turned off. People who may want to modify
  12585. - * rs_interrupt() should try to keep the interrupt handler as fast as
  12586. + * dz_interrupt() should try to keep the interrupt handler as fast as
  12587. * possible. After you are done making modifications, it is not a bad
  12588. * idea to do:
  12589. *
  12590. * gcc -S -DKERNEL -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer dz.c
  12591. *
  12592. - * and look at the resulting assemble code in serial.s.
  12593. + * and look at the resulting assemble code in dz.s.
  12594. *
  12595. * ------------------------------------------------------------
  12596. */
  12597. @@ -188,101 +214,97 @@
  12598. * This routine deals with inputs from any lines.
  12599. * ------------------------------------------------------------
  12600. */
  12601. -static inline void receive_chars(struct dz_serial *info_in)
  12602. +static inline void receive_chars(struct dz_serial *info_in,
  12603. + struct pt_regs *regs)
  12604. {
  12605. -
  12606. struct dz_serial *info;
  12607. - struct tty_struct *tty = 0;
  12608. + struct tty_struct *tty;
  12609. struct async_icount *icount;
  12610. - int ignore = 0;
  12611. - unsigned short status, tmp;
  12612. - unsigned char ch;
  12613. -
  12614. - /* this code is going to be a problem...
  12615. - the call to tty_flip_buffer is going to need
  12616. - to be rethought...
  12617. - */
  12618. - do {
  12619. - status = dz_in(info_in, DZ_RBUF);
  12620. - info = lines[LINE(status)];
  12621. + int lines_rx[DZ_NB_PORT] = { [0 ... DZ_NB_PORT - 1] = 0 };
  12622. + unsigned short status;
  12623. + unsigned char ch, flag;
  12624. + int i;
  12625. - /* punt so we don't get duplicate characters */
  12626. - if (!(status & DZ_DVAL))
  12627. - goto ignore_char;
  12628. -
  12629. - ch = UCHAR(status); /* grab the char */
  12630. -
  12631. -#if 0
  12632. - if (info->is_console) {
  12633. - if (ch == 0)
  12634. - return; /* it's a break ... */
  12635. - }
  12636. -#endif
  12637. + while ((status = dz_in(info_in, DZ_RBUF)) & DZ_DVAL) {
  12638. + info = lines[LINE(status)];
  12639. + tty = info->tty; /* point to the proper dev */
  12640. - tty = info->tty; /* now tty points to the proper dev */
  12641. - icount = &info->icount;
  12642. + ch = UCHAR(status); /* grab the char */
  12643. - if (!tty)
  12644. - break;
  12645. - if (tty->flip.count >= TTY_FLIPBUF_SIZE)
  12646. - break;
  12647. + if (!tty && (!info->hook || !info->hook->rx_char))
  12648. + continue;
  12649. - *tty->flip.char_buf_ptr = ch;
  12650. - *tty->flip.flag_buf_ptr = 0;
  12651. + icount = &info->icount;
  12652. icount->rx++;
  12653. - /* keep track of the statistics */
  12654. - if (status & (DZ_OERR | DZ_FERR | DZ_PERR)) {
  12655. - if (status & DZ_PERR) /* parity error */
  12656. - icount->parity++;
  12657. - else if (status & DZ_FERR) /* frame error */
  12658. - icount->frame++;
  12659. - if (status & DZ_OERR) /* overrun error */
  12660. - icount->overrun++;
  12661. -
  12662. - /* check to see if we should ignore the character
  12663. - and mask off conditions that should be ignored
  12664. + flag = 0;
  12665. + if (status & DZ_FERR) { /* frame error */
  12666. + /*
  12667. + * There is no separate BREAK status bit, so
  12668. + * treat framing errors as BREAKs for Magic SysRq
  12669. + * and SAK; normally, otherwise.
  12670. */
  12671. -
  12672. - if (status & info->ignore_status_mask) {
  12673. - if (++ignore > 100)
  12674. - break;
  12675. - goto ignore_char;
  12676. +#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && \
  12677. + !defined(MODULE)
  12678. + if (info->line == dz_sercons.index) {
  12679. + if (!break_pressed)
  12680. + break_pressed = jiffies;
  12681. + continue;
  12682. }
  12683. - /* mask off the error conditions we want to ignore */
  12684. - tmp = status & info->read_status_mask;
  12685. -
  12686. - if (tmp & DZ_PERR) {
  12687. - *tty->flip.flag_buf_ptr = TTY_PARITY;
  12688. -#ifdef DEBUG_DZ
  12689. - debug_console("PERR\n", 5);
  12690. -#endif
  12691. - } else if (tmp & DZ_FERR) {
  12692. - *tty->flip.flag_buf_ptr = TTY_FRAME;
  12693. -#ifdef DEBUG_DZ
  12694. - debug_console("FERR\n", 5);
  12695. #endif
  12696. + flag = TTY_BREAK;
  12697. + if (info->flags & DZ_SAK)
  12698. + do_SAK(tty);
  12699. + else
  12700. + flag = TTY_FRAME;
  12701. + } else if (status & DZ_OERR) /* overrun error */
  12702. + flag = TTY_OVERRUN;
  12703. + else if (status & DZ_PERR) /* parity error */
  12704. + flag = TTY_PARITY;
  12705. +
  12706. +#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && \
  12707. + !defined(MODULE)
  12708. + if (break_pressed && info->line == dz_sercons.index) {
  12709. + if (time_before(jiffies, break_pressed + HZ * 5)) {
  12710. + handle_sysrq(ch, regs, NULL, NULL);
  12711. + break_pressed = 0;
  12712. + continue;
  12713. }
  12714. - if (tmp & DZ_OERR) {
  12715. -#ifdef DEBUG_DZ
  12716. - debug_console("OERR\n", 5);
  12717. + break_pressed = 0;
  12718. + }
  12719. #endif
  12720. - if (tty->flip.count < TTY_FLIPBUF_SIZE) {
  12721. - tty->flip.count++;
  12722. - tty->flip.flag_buf_ptr++;
  12723. - tty->flip.char_buf_ptr++;
  12724. - *tty->flip.flag_buf_ptr = TTY_OVERRUN;
  12725. - }
  12726. - }
  12727. +
  12728. + if (info->hook && info->hook->rx_char) {
  12729. + (*info->hook->rx_char)(ch, flag);
  12730. + return;
  12731. }
  12732. - tty->flip.flag_buf_ptr++;
  12733. - tty->flip.char_buf_ptr++;
  12734. - tty->flip.count++;
  12735. - ignore_char:
  12736. - } while (status & DZ_DVAL);
  12737. - if (tty)
  12738. - tty_flip_buffer_push(tty);
  12739. + /* keep track of the statistics */
  12740. + switch (flag) {
  12741. + case TTY_FRAME:
  12742. + icount->frame++;
  12743. + break;
  12744. + case TTY_PARITY:
  12745. + icount->parity++;
  12746. + break;
  12747. + case TTY_OVERRUN:
  12748. + icount->overrun++;
  12749. + break;
  12750. + case TTY_BREAK:
  12751. + icount->brk++;
  12752. + break;
  12753. + default:
  12754. + break;
  12755. + }
  12756. +
  12757. + if ((status & info->ignore_status_mask) == 0) {
  12758. + tty_insert_flip_char(tty, ch, flag);
  12759. + lines_rx[LINE(status)] = 1;
  12760. + }
  12761. + }
  12762. + for (i = 0; i < DZ_NB_PORT; i++)
  12763. + if (lines_rx[i])
  12764. + tty_flip_buffer_push(lines[i]->tty);
  12765. }
  12766. /*
  12767. @@ -292,20 +314,34 @@
  12768. * This routine deals with outputs to any lines.
  12769. * ------------------------------------------------------------
  12770. */
  12771. -static inline void transmit_chars(struct dz_serial *info)
  12772. +static inline void transmit_chars(struct dz_serial *info_in)
  12773. {
  12774. + struct dz_serial *info;
  12775. + unsigned short status;
  12776. unsigned char tmp;
  12777. + status = dz_in(info_in, DZ_CSR);
  12778. + info = lines[LINE(status)];
  12779. + if (info->hook || !info->tty) {
  12780. + unsigned short mask, tmp;
  12781. - if (info->x_char) { /* XON/XOFF chars */
  12782. + mask = 1 << info->line;
  12783. + tmp = dz_in(info, DZ_TCR); /* read the TX flag */
  12784. + tmp &= ~mask; /* clear the TX flag */
  12785. + dz_out(info, DZ_TCR, tmp);
  12786. + return;
  12787. + }
  12788. +
  12789. + if (info->x_char) { /* XON/XOFF chars */
  12790. dz_out(info, DZ_TDR, info->x_char);
  12791. info->icount.tx++;
  12792. info->x_char = 0;
  12793. return;
  12794. }
  12795. /* if nothing to do or stopped or hardware stopped */
  12796. - if ((info->xmit_cnt <= 0) || info->tty->stopped || info->tty->hw_stopped) {
  12797. + if (info->xmit_cnt <= 0 ||
  12798. + info->tty->stopped || info->tty->hw_stopped) {
  12799. dz_stop(info->tty);
  12800. return;
  12801. }
  12802. @@ -359,15 +395,14 @@
  12803. */
  12804. static void dz_interrupt(int irq, void *dev, struct pt_regs *regs)
  12805. {
  12806. - struct dz_serial *info;
  12807. + struct dz_serial *info = (struct dz_serial *)dev;
  12808. unsigned short status;
  12809. /* get the reason why we just got an irq */
  12810. - status = dz_in((struct dz_serial *) dev, DZ_CSR);
  12811. - info = lines[LINE(status)]; /* re-arrange info the proper port */
  12812. + status = dz_in(info, DZ_CSR);
  12813. if (status & DZ_RDONE)
  12814. - receive_chars(info); /* the receive function */
  12815. + receive_chars(info, regs);
  12816. if (status & DZ_TRDY)
  12817. transmit_chars(info);
  12818. @@ -514,7 +549,7 @@
  12819. info->cflags &= ~DZ_CREAD; /* turn off receive enable flag */
  12820. - dz_out(info, DZ_LPR, info->cflags);
  12821. + dz_out(info, DZ_LPR, info->cflags | info->line);
  12822. if (info->xmit_buf) { /* free Tx buffer */
  12823. free_page((unsigned long) info->xmit_buf);
  12824. @@ -545,18 +580,21 @@
  12825. {
  12826. unsigned long flags;
  12827. unsigned cflag;
  12828. - int baud;
  12829. + int baud, i;
  12830. - if (!info->tty || !info->tty->termios)
  12831. - return;
  12832. + if (!info->hook) {
  12833. + if (!info->tty || !info->tty->termios)
  12834. + return;
  12835. + cflag = info->tty->termios->c_cflag;
  12836. + } else {
  12837. + cflag = info->hook->cflags;
  12838. + }
  12839. save_flags(flags);
  12840. cli();
  12841. info->cflags = info->line;
  12842. - cflag = info->tty->termios->c_cflag;
  12843. -
  12844. switch (cflag & CSIZE) {
  12845. case CS5:
  12846. info->cflags |= DZ_CS5;
  12847. @@ -579,7 +617,16 @@
  12848. if (cflag & PARODD)
  12849. info->cflags |= DZ_PARODD;
  12850. - baud = tty_get_baud_rate(info->tty);
  12851. + i = cflag & CBAUD;
  12852. + if (i & CBAUDEX) {
  12853. + i &= ~CBAUDEX;
  12854. + if (!info->hook)
  12855. + info->tty->termios->c_cflag &= ~CBAUDEX;
  12856. + else
  12857. + info->hook->cflags &= ~CBAUDEX;
  12858. + }
  12859. + baud = baud_table[i];
  12860. +
  12861. switch (baud) {
  12862. case 50:
  12863. info->cflags |= DZ_B50;
  12864. @@ -629,16 +676,16 @@
  12865. }
  12866. info->cflags |= DZ_RXENAB;
  12867. - dz_out(info, DZ_LPR, info->cflags);
  12868. + dz_out(info, DZ_LPR, info->cflags | info->line);
  12869. /* setup accept flag */
  12870. info->read_status_mask = DZ_OERR;
  12871. - if (I_INPCK(info->tty))
  12872. + if (info->tty && I_INPCK(info->tty))
  12873. info->read_status_mask |= (DZ_FERR | DZ_PERR);
  12874. /* characters to ignore */
  12875. info->ignore_status_mask = 0;
  12876. - if (I_IGNPAR(info->tty))
  12877. + if (info->tty && I_IGNPAR(info->tty))
  12878. info->ignore_status_mask |= (DZ_FERR | DZ_PERR);
  12879. restore_flags(flags);
  12880. @@ -694,7 +741,7 @@
  12881. down(&tmp_buf_sem);
  12882. while (1) {
  12883. - c = MIN(count, MIN(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head));
  12884. + c = min(count, min(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head));
  12885. if (c <= 0)
  12886. break;
  12887. @@ -707,7 +754,7 @@
  12888. save_flags(flags);
  12889. cli();
  12890. - c = MIN(c, MIN(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head));
  12891. + c = min(c, min(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head));
  12892. memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c);
  12893. info->xmit_head = ((info->xmit_head + c) & (DZ_XMIT_SIZE - 1));
  12894. info->xmit_cnt += c;
  12895. @@ -727,7 +774,7 @@
  12896. save_flags(flags);
  12897. cli();
  12898. - c = MIN(count, MIN(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head));
  12899. + c = min(count, min(DZ_XMIT_SIZE - info->xmit_cnt - 1, DZ_XMIT_SIZE - info->xmit_head));
  12900. if (c <= 0) {
  12901. restore_flags(flags);
  12902. break;
  12903. @@ -845,7 +892,7 @@
  12904. /*
  12905. * ------------------------------------------------------------
  12906. - * rs_ioctl () and friends
  12907. + * dz_ioctl () and friends
  12908. * ------------------------------------------------------------
  12909. */
  12910. static int get_serial_info(struct dz_serial *info,
  12911. @@ -958,6 +1005,9 @@
  12912. struct dz_serial *info = (struct dz_serial *) tty->driver_data;
  12913. int retval;
  12914. + if (info->hook)
  12915. + return -ENODEV;
  12916. +
  12917. if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
  12918. (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD) &&
  12919. (cmd != TIOCSERSWILD) && (cmd != TIOCSERGSTRUCT)) {
  12920. @@ -1252,19 +1302,14 @@
  12921. int retval, line;
  12922. line = MINOR(tty->device) - tty->driver.minor_start;
  12923. -
  12924. - /* The dz lines for the mouse/keyboard must be
  12925. - * opened using their respective drivers.
  12926. - */
  12927. if ((line < 0) || (line >= DZ_NB_PORT))
  12928. return -ENODEV;
  12929. + info = lines[line];
  12930. - if ((line == DZ_KEYBOARD) || (line == DZ_MOUSE))
  12931. + if (info->hook)
  12932. return -ENODEV;
  12933. - info = lines[line];
  12934. info->count++;
  12935. -
  12936. tty->driver_data = info;
  12937. info->tty = tty;
  12938. @@ -1285,14 +1330,21 @@
  12939. else
  12940. *tty->termios = info->callout_termios;
  12941. change_speed(info);
  12942. -
  12943. }
  12944. +#ifdef CONFIG_SERIAL_DEC_CONSOLE
  12945. + if (dz_sercons.cflag && dz_sercons.index == line) {
  12946. + tty->termios->c_cflag = dz_sercons.cflag;
  12947. + dz_sercons.cflag = 0;
  12948. + change_speed(info);
  12949. + }
  12950. +#endif
  12951. +
  12952. info->session = current->session;
  12953. info->pgrp = current->pgrp;
  12954. return 0;
  12955. }
  12956. -static void show_serial_version(void)
  12957. +static void __init show_serial_version(void)
  12958. {
  12959. printk("%s%s\n", dz_name, dz_version);
  12960. }
  12961. @@ -1300,7 +1352,6 @@
  12962. int __init dz_init(void)
  12963. {
  12964. int i;
  12965. - long flags;
  12966. struct dz_serial *info;
  12967. /* Setup base handler, and timer table. */
  12968. @@ -1311,9 +1362,9 @@
  12969. memset(&serial_driver, 0, sizeof(struct tty_driver));
  12970. serial_driver.magic = TTY_DRIVER_MAGIC;
  12971. #if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
  12972. - serial_driver.name = "ttyS";
  12973. -#else
  12974. serial_driver.name = "tts/%d";
  12975. +#else
  12976. + serial_driver.name = "ttyS";
  12977. #endif
  12978. serial_driver.major = TTY_MAJOR;
  12979. serial_driver.minor_start = 64;
  12980. @@ -1352,9 +1403,9 @@
  12981. */
  12982. callout_driver = serial_driver;
  12983. #if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
  12984. - callout_driver.name = "cua";
  12985. -#else
  12986. callout_driver.name = "cua/%d";
  12987. +#else
  12988. + callout_driver.name = "cua";
  12989. #endif
  12990. callout_driver.major = TTYAUX_MAJOR;
  12991. callout_driver.subtype = SERIAL_TYPE_CALLOUT;
  12992. @@ -1363,25 +1414,27 @@
  12993. panic("Couldn't register serial driver");
  12994. if (tty_register_driver(&callout_driver))
  12995. panic("Couldn't register callout driver");
  12996. - save_flags(flags);
  12997. - cli();
  12998. for (i = 0; i < DZ_NB_PORT; i++) {
  12999. info = &multi[i];
  13000. lines[i] = info;
  13001. - info->magic = SERIAL_MAGIC;
  13002. -
  13003. + info->tty = 0;
  13004. + info->x_char = 0;
  13005. if (mips_machtype == MACH_DS23100 ||
  13006. mips_machtype == MACH_DS5100)
  13007. info->port = (unsigned long) KN01_DZ11_BASE;
  13008. else
  13009. info->port = (unsigned long) KN02_DZ11_BASE;
  13010. -
  13011. info->line = i;
  13012. - info->tty = 0;
  13013. +
  13014. + if (info->hook && info->hook->init_info) {
  13015. + (*info->hook->init_info)(info);
  13016. + continue;
  13017. + }
  13018. +
  13019. + info->magic = SERIAL_MAGIC;
  13020. info->close_delay = 50;
  13021. info->closing_wait = 3000;
  13022. - info->x_char = 0;
  13023. info->event = 0;
  13024. info->count = 0;
  13025. info->blocked_open = 0;
  13026. @@ -1393,25 +1446,16 @@
  13027. info->normal_termios = serial_driver.init_termios;
  13028. init_waitqueue_head(&info->open_wait);
  13029. init_waitqueue_head(&info->close_wait);
  13030. -
  13031. - /*
  13032. - * If we are pointing to address zero then punt - not correctly
  13033. - * set up in setup.c to handle this.
  13034. - */
  13035. - if (!info->port)
  13036. - return 0;
  13037. -
  13038. - printk("ttyS%02d at 0x%08x (irq = %d)\n", info->line,
  13039. - info->port, dec_interrupt[DEC_IRQ_DZ11]);
  13040. -
  13041. + printk("ttyS%02d at 0x%08x (irq = %d) is a DC7085 DZ\n",
  13042. + info->line, info->port, dec_interrupt[DEC_IRQ_DZ11]);
  13043. tty_register_devfs(&serial_driver, 0,
  13044. - serial_driver.minor_start + info->line);
  13045. + serial_driver.minor_start + info->line);
  13046. tty_register_devfs(&callout_driver, 0,
  13047. - callout_driver.minor_start + info->line);
  13048. + callout_driver.minor_start + info->line);
  13049. }
  13050. - /* reset the chip */
  13051. #ifndef CONFIG_SERIAL_DEC_CONSOLE
  13052. + /* reset the chip */
  13053. dz_out(info, DZ_CSR, DZ_CLR);
  13054. while (dz_in(info, DZ_CSR) & DZ_CLR);
  13055. iob();
  13056. @@ -1420,43 +1464,104 @@
  13057. dz_out(info, DZ_CSR, DZ_MSE);
  13058. #endif
  13059. - /* order matters here... the trick is that flags
  13060. - is updated... in request_irq - to immediatedly obliterate
  13061. - it is unwise. */
  13062. - restore_flags(flags);
  13063. -
  13064. -
  13065. if (request_irq(dec_interrupt[DEC_IRQ_DZ11], dz_interrupt,
  13066. - SA_INTERRUPT, "DZ", lines[0]))
  13067. + 0, "DZ", lines[0]))
  13068. panic("Unable to register DZ interrupt");
  13069. + for (i = 0; i < DZ_NB_PORT; i++)
  13070. + if (lines[i]->hook) {
  13071. + startup(lines[i]);
  13072. + if (lines[i]->hook->init_channel)
  13073. + (*lines[i]->hook->init_channel)(lines[i]);
  13074. + }
  13075. +
  13076. return 0;
  13077. }
  13078. -#ifdef CONFIG_SERIAL_DEC_CONSOLE
  13079. -static void dz_console_put_char(unsigned char ch)
  13080. +/*
  13081. + * polling I/O routines
  13082. + */
  13083. +static int dz_poll_tx_char(void *handle, unsigned char ch)
  13084. {
  13085. unsigned long flags;
  13086. - int loops = 2500;
  13087. - unsigned short tmp = ch;
  13088. - /* this code sends stuff out to serial device - spinning its
  13089. - wheels and waiting. */
  13090. + struct dz_serial *info = handle;
  13091. + unsigned short csr, tcr, trdy, mask;
  13092. + int loops = 10000;
  13093. + int ret;
  13094. - /* force the issue - point it at lines[3] */
  13095. - dz_console = &multi[CONSOLE_LINE];
  13096. + local_irq_save(flags);
  13097. + csr = dz_in(info, DZ_CSR);
  13098. + dz_out(info, DZ_CSR, csr & ~DZ_TIE);
  13099. + tcr = dz_in(info, DZ_TCR);
  13100. + tcr |= 1 << info->line;
  13101. + mask = tcr;
  13102. + dz_out(info, DZ_TCR, mask);
  13103. + iob();
  13104. + local_irq_restore(flags);
  13105. - save_flags(flags);
  13106. - cli();
  13107. + while (loops--) {
  13108. + trdy = dz_in(info, DZ_CSR);
  13109. + if (!(trdy & DZ_TRDY))
  13110. + continue;
  13111. + trdy = (trdy & DZ_TLINE) >> 8;
  13112. + if (trdy == info->line)
  13113. + break;
  13114. + mask &= ~(1 << trdy);
  13115. + dz_out(info, DZ_TCR, mask);
  13116. + iob();
  13117. + udelay(2);
  13118. + }
  13119. + if (loops) {
  13120. + dz_out(info, DZ_TDR, ch);
  13121. + ret = 0;
  13122. + } else
  13123. + ret = -EAGAIN;
  13124. - /* spin our wheels */
  13125. - while (((dz_in(dz_console, DZ_CSR) & DZ_TRDY) != DZ_TRDY) && loops--);
  13126. + dz_out(info, DZ_TCR, tcr);
  13127. + dz_out(info, DZ_CSR, csr);
  13128. - /* Actually transmit the character. */
  13129. - dz_out(dz_console, DZ_TDR, tmp);
  13130. + return ret;
  13131. +}
  13132. - restore_flags(flags);
  13133. +static int dz_poll_rx_char(void *handle)
  13134. +{
  13135. + return -ENODEV;
  13136. +}
  13137. +
  13138. +int register_dz_hook(unsigned int channel, struct dec_serial_hook *hook)
  13139. +{
  13140. + struct dz_serial *info = multi + channel;
  13141. +
  13142. + if (info->hook) {
  13143. + printk("%s: line %d has already a hook registered\n",
  13144. + __FUNCTION__, channel);
  13145. +
  13146. + return 0;
  13147. + } else {
  13148. + hook->poll_rx_char = dz_poll_rx_char;
  13149. + hook->poll_tx_char = dz_poll_tx_char;
  13150. + info->hook = hook;
  13151. +
  13152. + return 1;
  13153. + }
  13154. +}
  13155. +
  13156. +int unregister_dz_hook(unsigned int channel)
  13157. +{
  13158. + struct dz_serial *info = &multi[channel];
  13159. +
  13160. + if (info->hook) {
  13161. + info->hook = NULL;
  13162. + return 1;
  13163. + } else {
  13164. + printk("%s: trying to unregister hook on line %d,"
  13165. + " but none is registered\n", __FUNCTION__, channel);
  13166. + return 0;
  13167. + }
  13168. }
  13169. +
  13170. +#ifdef CONFIG_SERIAL_DEC_CONSOLE
  13171. /*
  13172. * -------------------------------------------------------------------
  13173. * dz_console_print ()
  13174. @@ -1465,17 +1570,19 @@
  13175. * The console must be locked when we get here.
  13176. * -------------------------------------------------------------------
  13177. */
  13178. -static void dz_console_print(struct console *cons,
  13179. +static void dz_console_print(struct console *co,
  13180. const char *str,
  13181. unsigned int count)
  13182. {
  13183. + struct dz_serial *info = multi + co->index;
  13184. +
  13185. #ifdef DEBUG_DZ
  13186. prom_printf((char *) str);
  13187. #endif
  13188. while (count--) {
  13189. if (*str == '\n')
  13190. - dz_console_put_char('\r');
  13191. - dz_console_put_char(*str++);
  13192. + dz_poll_tx_char(info, '\r');
  13193. + dz_poll_tx_char(info, *str++);
  13194. }
  13195. }
  13196. @@ -1486,12 +1593,12 @@
  13197. static int __init dz_console_setup(struct console *co, char *options)
  13198. {
  13199. + struct dz_serial *info = multi + co->index;
  13200. int baud = 9600;
  13201. int bits = 8;
  13202. int parity = 'n';
  13203. int cflag = CREAD | HUPCL | CLOCAL;
  13204. char *s;
  13205. - unsigned short mask, tmp;
  13206. if (options) {
  13207. baud = simple_strtoul(options, NULL, 10);
  13208. @@ -1542,44 +1649,31 @@
  13209. }
  13210. co->cflag = cflag;
  13211. - /* TOFIX: force to console line */
  13212. - dz_console = &multi[CONSOLE_LINE];
  13213. if ((mips_machtype == MACH_DS23100) || (mips_machtype == MACH_DS5100))
  13214. - dz_console->port = KN01_DZ11_BASE;
  13215. + info->port = KN01_DZ11_BASE;
  13216. else
  13217. - dz_console->port = KN02_DZ11_BASE;
  13218. - dz_console->line = CONSOLE_LINE;
  13219. + info->port = KN02_DZ11_BASE;
  13220. + info->line = co->index;
  13221. - dz_out(dz_console, DZ_CSR, DZ_CLR);
  13222. - while ((tmp = dz_in(dz_console, DZ_CSR)) & DZ_CLR);
  13223. + dz_out(info, DZ_CSR, DZ_CLR);
  13224. + while (dz_in(info, DZ_CSR) & DZ_CLR);
  13225. /* enable scanning */
  13226. - dz_out(dz_console, DZ_CSR, DZ_MSE);
  13227. + dz_out(info, DZ_CSR, DZ_MSE);
  13228. /* Set up flags... */
  13229. - dz_console->cflags = 0;
  13230. - dz_console->cflags |= DZ_B9600;
  13231. - dz_console->cflags |= DZ_CS8;
  13232. - dz_console->cflags |= DZ_PARENB;
  13233. - dz_out(dz_console, DZ_LPR, dz_console->cflags);
  13234. -
  13235. - mask = 1 << dz_console->line;
  13236. - tmp = dz_in(dz_console, DZ_TCR); /* read the TX flag */
  13237. - if (!(tmp & mask)) {
  13238. - tmp |= mask; /* set the TX flag */
  13239. - dz_out(dz_console, DZ_TCR, tmp);
  13240. - }
  13241. + dz_out(info, DZ_LPR, cflag | info->line);
  13242. +
  13243. return 0;
  13244. }
  13245. -static struct console dz_sercons =
  13246. -{
  13247. - .name = "ttyS",
  13248. - .write = dz_console_print,
  13249. - .device = dz_console_device,
  13250. - .setup = dz_console_setup,
  13251. - .flags = CON_CONSDEV | CON_PRINTBUFFER,
  13252. - .index = CONSOLE_LINE,
  13253. +static struct console dz_sercons = {
  13254. + .name = "ttyS",
  13255. + .write = dz_console_print,
  13256. + .device = dz_console_device,
  13257. + .setup = dz_console_setup,
  13258. + .flags = CON_PRINTBUFFER,
  13259. + .index = -1,
  13260. };
  13261. void __init dz_serial_console_init(void)
  13262. diff -Nur linux-2.4.32-rc1/drivers/char/dz.h linux-2.4.32-rc1.mips/drivers/char/dz.h
  13263. --- linux-2.4.32-rc1/drivers/char/dz.h 2002-08-03 02:39:43.000000000 +0200
  13264. +++ linux-2.4.32-rc1.mips/drivers/char/dz.h 2004-09-28 02:53:01.000000000 +0200
  13265. @@ -10,6 +10,8 @@
  13266. #ifndef DZ_SERIAL_H
  13267. #define DZ_SERIAL_H
  13268. +#include <asm/dec/serial.h>
  13269. +
  13270. #define SERIAL_MAGIC 0x5301
  13271. /*
  13272. @@ -17,6 +19,7 @@
  13273. */
  13274. #define DZ_TRDY 0x8000 /* Transmitter empty */
  13275. #define DZ_TIE 0x4000 /* Transmitter Interrupt Enable */
  13276. +#define DZ_TLINE 0x0300 /* Transmitter Line Number */
  13277. #define DZ_RDONE 0x0080 /* Receiver data ready */
  13278. #define DZ_RIE 0x0040 /* Receive Interrupt Enable */
  13279. #define DZ_MSE 0x0020 /* Master Scan Enable */
  13280. @@ -37,19 +40,30 @@
  13281. #define UCHAR(x) (unsigned char)(x & DZ_RBUF_MASK)
  13282. /*
  13283. - * Definitions for the Transmit Register.
  13284. + * Definitions for the Transmit Control Register.
  13285. */
  13286. #define DZ_LINE_KEYBOARD 0x0001
  13287. #define DZ_LINE_MOUSE 0x0002
  13288. #define DZ_LINE_MODEM 0x0004
  13289. #define DZ_LINE_PRINTER 0x0008
  13290. +#define DZ_MODEM_RTS 0x0800 /* RTS for the modem line (2) */
  13291. #define DZ_MODEM_DTR 0x0400 /* DTR for the modem line (2) */
  13292. +#define DZ_PRINT_RTS 0x0200 /* RTS for the printer line (3) */
  13293. +#define DZ_PRINT_DTR 0x0100 /* DTR for the printer line (3) */
  13294. +#define DZ_LNENB 0x000f /* Transmitter Line Enable */
  13295. /*
  13296. * Definitions for the Modem Status Register.
  13297. */
  13298. +#define DZ_MODEM_RI 0x0800 /* RI for the modem line (2) */
  13299. +#define DZ_MODEM_CD 0x0400 /* CD for the modem line (2) */
  13300. #define DZ_MODEM_DSR 0x0200 /* DSR for the modem line (2) */
  13301. +#define DZ_MODEM_CTS 0x0100 /* CTS for the modem line (2) */
  13302. +#define DZ_PRINT_RI 0x0008 /* RI for the printer line (2) */
  13303. +#define DZ_PRINT_CD 0x0004 /* CD for the printer line (2) */
  13304. +#define DZ_PRINT_DSR 0x0002 /* DSR for the printer line (2) */
  13305. +#define DZ_PRINT_CTS 0x0001 /* CTS for the printer line (2) */
  13306. /*
  13307. * Definitions for the Transmit Data Register.
  13308. @@ -115,9 +129,6 @@
  13309. #define DZ_EVENT_WRITE_WAKEUP 0
  13310. -#ifndef MIN
  13311. -#define MIN(a,b) ((a) < (b) ? (a) : (b))
  13312. -
  13313. #define DZ_INITIALIZED 0x80000000 /* Serial port was initialized */
  13314. #define DZ_CALLOUT_ACTIVE 0x40000000 /* Call out device is active */
  13315. #define DZ_NORMAL_ACTIVE 0x20000000 /* Normal device is active */
  13316. @@ -129,6 +140,7 @@
  13317. #define DZ_CLOSING_WAIT_INF 0
  13318. #define DZ_CLOSING_WAIT_NONE 65535
  13319. +#define DZ_SAK 0x0004 /* Secure Attention Key (Orange book) */
  13320. #define DZ_SPLIT_TERMIOS 0x0008 /* Separate termios for dialin/callout */
  13321. #define DZ_SESSION_LOCKOUT 0x0100 /* Lock out cua opens based on session */
  13322. #define DZ_PGRP_LOCKOUT 0x0200 /* Lock out cua opens based on pgrp */
  13323. @@ -166,79 +178,9 @@
  13324. long session; /* Session of opening process */
  13325. long pgrp; /* pgrp of opening process */
  13326. + struct dec_serial_hook *hook; /* Hook on this channel. */
  13327. unsigned char is_console; /* flag indicating a serial console */
  13328. unsigned char is_initialized;
  13329. };
  13330. -static struct dz_serial multi[DZ_NB_PORT]; /* Four serial lines in the DZ chip */
  13331. -static struct dz_serial *dz_console;
  13332. -static struct tty_driver serial_driver, callout_driver;
  13333. -
  13334. -static struct tty_struct *serial_table[DZ_NB_PORT];
  13335. -static struct termios *serial_termios[DZ_NB_PORT];
  13336. -static struct termios *serial_termios_locked[DZ_NB_PORT];
  13337. -
  13338. -static int serial_refcount;
  13339. -
  13340. -/*
  13341. - * tmp_buf is used as a temporary buffer by serial_write. We need to
  13342. - * lock it in case the copy_from_user blocks while swapping in a page,
  13343. - * and some other program tries to do a serial write at the same time.
  13344. - * Since the lock will only come under contention when the system is
  13345. - * swapping and available memory is low, it makes sense to share one
  13346. - * buffer across all the serial ports, since it significantly saves
  13347. - * memory if large numbers of serial ports are open.
  13348. - */
  13349. -static unsigned char *tmp_buf;
  13350. -static DECLARE_MUTEX(tmp_buf_sem);
  13351. -
  13352. -static char *dz_name = "DECstation DZ serial driver version ";
  13353. -static char *dz_version = "1.02";
  13354. -
  13355. -static inline unsigned short dz_in (struct dz_serial *, unsigned);
  13356. -static inline void dz_out (struct dz_serial *, unsigned, unsigned short);
  13357. -
  13358. -static inline void dz_sched_event (struct dz_serial *, int);
  13359. -static inline void receive_chars (struct dz_serial *);
  13360. -static inline void transmit_chars (struct dz_serial *);
  13361. -static inline void check_modem_status (struct dz_serial *);
  13362. -
  13363. -static void dz_stop (struct tty_struct *);
  13364. -static void dz_start (struct tty_struct *);
  13365. -static void dz_interrupt (int, void *, struct pt_regs *);
  13366. -static void do_serial_bh (void);
  13367. -static void do_softint (void *);
  13368. -static void do_serial_hangup (void *);
  13369. -static void change_speed (struct dz_serial *);
  13370. -static void dz_flush_chars (struct tty_struct *);
  13371. -static void dz_console_print (struct console *, const char *, unsigned int);
  13372. -static void dz_flush_buffer (struct tty_struct *);
  13373. -static void dz_throttle (struct tty_struct *);
  13374. -static void dz_unthrottle (struct tty_struct *);
  13375. -static void dz_send_xchar (struct tty_struct *, char);
  13376. -static void shutdown (struct dz_serial *);
  13377. -static void send_break (struct dz_serial *, int);
  13378. -static void dz_set_termios (struct tty_struct *, struct termios *);
  13379. -static void dz_close (struct tty_struct *, struct file *);
  13380. -static void dz_hangup (struct tty_struct *);
  13381. -static void show_serial_version (void);
  13382. -
  13383. -static int dz_write (struct tty_struct *, int, const unsigned char *, int);
  13384. -static int dz_write_room (struct tty_struct *);
  13385. -static int dz_chars_in_buffer (struct tty_struct *);
  13386. -static int startup (struct dz_serial *);
  13387. -static int get_serial_info (struct dz_serial *, struct serial_struct *);
  13388. -static int set_serial_info (struct dz_serial *, struct serial_struct *);
  13389. -static int get_lsr_info (struct dz_serial *, unsigned int *);
  13390. -static int dz_ioctl (struct tty_struct *, struct file *, unsigned int, unsigned long);
  13391. -static int block_til_ready (struct tty_struct *, struct file *, struct dz_serial *);
  13392. -static int dz_open (struct tty_struct *, struct file *);
  13393. -
  13394. -#ifdef MODULE
  13395. -int init_module (void)
  13396. -void cleanup_module (void)
  13397. -#endif
  13398. -
  13399. -#endif
  13400. -
  13401. #endif /* DZ_SERIAL_H */
  13402. diff -Nur linux-2.4.32-rc1/drivers/char/ibm_workpad_keymap.map linux-2.4.32-rc1.mips/drivers/char/ibm_workpad_keymap.map
  13403. --- linux-2.4.32-rc1/drivers/char/ibm_workpad_keymap.map 1970-01-01 01:00:00.000000000 +0100
  13404. +++ linux-2.4.32-rc1.mips/drivers/char/ibm_workpad_keymap.map 2003-12-20 15:20:44.000000000 +0100
  13405. @@ -0,0 +1,343 @@
  13406. +# Keymap for IBM Workpad z50
  13407. +# US Mapping
  13408. +#
  13409. +# by Michael Klar <[email protected]>
  13410. +#
  13411. +# This is a great big mess on account of how the Caps Lock key is handled as
  13412. +# LeftShift-RightShift. Right shift key had to be broken out, so don't use
  13413. +# use this map file as a basis for other keyboards that don't do the same
  13414. +# thing with Caps Lock.
  13415. +#
  13416. +# This file is subject to the terms and conditions of the GNU General Public
  13417. +# License. See the file "COPYING" in the main directory of this archive
  13418. +# for more details.
  13419. +
  13420. +keymaps 0-2,4-5,8,12,32-33,36-37
  13421. +strings as usual
  13422. +
  13423. +keycode 0 = F1 F11 Console_13
  13424. + shiftr keycode 0 = F11
  13425. + shift shiftr keycode 0 = F11
  13426. + control keycode 0 = F1
  13427. + alt keycode 0 = Console_1
  13428. + control alt keycode 0 = Console_1
  13429. +keycode 1 = F3 F13 Console_15
  13430. + shiftr keycode 1 = F13
  13431. + shift shiftr keycode 1 = F13
  13432. + control keycode 1 = F3
  13433. + alt keycode 1 = Console_3
  13434. + control alt keycode 1 = Console_3
  13435. +keycode 2 = F5 F15 Console_17
  13436. + shiftr keycode 2 = F15
  13437. + shift shiftr keycode 2 = F15
  13438. + control keycode 2 = F5
  13439. + alt keycode 2 = Console_5
  13440. + control alt keycode 2 = Console_5
  13441. +keycode 3 = F7 F17 Console_19
  13442. + shiftr keycode 3 = F17
  13443. + shift shiftr keycode 3 = F17
  13444. + control keycode 3 = F7
  13445. + alt keycode 3 = Console_7
  13446. + control alt keycode 3 = Console_7
  13447. +keycode 4 = F9 F19 Console_21
  13448. + shiftr keycode 4 = F19
  13449. + shift shiftr keycode 4 = F19
  13450. + control keycode 4 = F9
  13451. + alt keycode 4 = Console_9
  13452. + control alt keycode 4 = Console_9
  13453. +#keycode 5 is contrast down
  13454. +#keycode 6 is contrast up
  13455. +keycode 7 = F11 F11 Console_23
  13456. + shiftr keycode 7 = F11
  13457. + shift shiftr keycode 7 = F11
  13458. + control keycode 7 = F11
  13459. + alt keycode 7 = Console_11
  13460. + control alt keycode 7 = Console_11
  13461. +keycode 8 = F2 F12 Console_14
  13462. + shiftr keycode 8 = F12
  13463. + shift shiftr keycode 8 = F12
  13464. + control keycode 8 = F2
  13465. + alt keycode 8 = Console_2
  13466. + control alt keycode 8 = Console_2
  13467. +keycode 9 = F4 F14 Console_16
  13468. + shiftr keycode 9 = F14
  13469. + shift shiftr keycode 9 = F14
  13470. + control keycode 9 = F4
  13471. + alt keycode 9 = Console_4
  13472. + control alt keycode 9 = Console_4
  13473. +keycode 10 = F6 F16 Console_18
  13474. + shiftr keycode 10 = F16
  13475. + shift shiftr keycode 10 = F16
  13476. + control keycode 10 = F6
  13477. + alt keycode 10 = Console_6
  13478. + control alt keycode 10 = Console_6
  13479. +keycode 11 = F8 F18 Console_20
  13480. + shiftr keycode 11 = F18
  13481. + shift shiftr keycode 11 = F18
  13482. + control keycode 11 = F8
  13483. + alt keycode 11 = Console_8
  13484. + control alt keycode 11 = Console_8
  13485. +keycode 12 = F10 F20 Console_22
  13486. + shiftr keycode 12 = F20
  13487. + shift shiftr keycode 12 = F20
  13488. + control keycode 12 = F10
  13489. + alt keycode 12 = Console_10
  13490. + control alt keycode 12 = Console_10
  13491. +#keycode 13 is brightness down
  13492. +#keycode 14 is brightness up
  13493. +keycode 15 = F12 F12 Console_24
  13494. + shiftr keycode 15 = F12
  13495. + shift shiftr keycode 15 = F12
  13496. + control keycode 15 = F12
  13497. + alt keycode 15 = Console_12
  13498. + control alt keycode 15 = Console_12
  13499. +keycode 16 = apostrophe quotedbl
  13500. + shiftr keycode 16 = quotedbl
  13501. + shift shiftr keycode 16 = quotedbl
  13502. + control keycode 16 = Control_g
  13503. + alt keycode 16 = Meta_apostrophe
  13504. +keycode 17 = bracketleft braceleft
  13505. + shiftr keycode 17 = braceleft
  13506. + shift shiftr keycode 17 = braceleft
  13507. + control keycode 17 = Escape
  13508. + alt keycode 17 = Meta_bracketleft
  13509. +keycode 18 = minus underscore backslash
  13510. + shiftr keycode 18 = underscore
  13511. + shift shiftr keycode 18 = underscore
  13512. + control keycode 18 = Control_underscore
  13513. + shift control keycode 18 = Control_underscore
  13514. + shiftr control keycode 18 = Control_underscore
  13515. + shift shiftr control keycode 18 = Control_underscore
  13516. + alt keycode 18 = Meta_minus
  13517. +keycode 19 = zero parenright braceright
  13518. + shiftr keycode 19 = parenright
  13519. + shift shiftr keycode 19 = parenright
  13520. + alt keycode 19 = Meta_zero
  13521. +keycode 20 = p
  13522. + shiftr keycode 20 = +P
  13523. + shift shiftr keycode 20 = +p
  13524. +keycode 21 = semicolon colon
  13525. + shiftr keycode 21 = colon
  13526. + shift shiftr keycode 21 = colon
  13527. + alt keycode 21 = Meta_semicolon
  13528. +keycode 22 = Up Scroll_Backward
  13529. + shiftr keycode 22 = Scroll_Backward
  13530. + shift shiftr keycode 22 = Scroll_Backward
  13531. + alt keycode 22 = Prior
  13532. +keycode 23 = slash question
  13533. + shiftr keycode 23 = question
  13534. + shift shiftr keycode 23 = question
  13535. + control keycode 23 = Delete
  13536. + alt keycode 23 = Meta_slash
  13537. +
  13538. +keycode 27 = nine parenleft bracketright
  13539. + shiftr keycode 27 = parenleft
  13540. + shift shiftr keycode 27 = parenleft
  13541. + alt keycode 27 = Meta_nine
  13542. +keycode 28 = o
  13543. + shiftr keycode 28 = +O
  13544. + shift shiftr keycode 28 = +o
  13545. +keycode 29 = l
  13546. + shiftr keycode 29 = +L
  13547. + shift shiftr keycode 29 = +l
  13548. +keycode 30 = period greater
  13549. + shiftr keycode 30 = greater
  13550. + shift shiftr keycode 30 = greater
  13551. + control keycode 30 = Compose
  13552. + alt keycode 30 = Meta_period
  13553. +
  13554. +keycode 32 = Left Decr_Console
  13555. + shiftr keycode 32 = Decr_Console
  13556. + shift shiftr keycode 32 = Decr_Console
  13557. + alt keycode 32 = Home
  13558. +keycode 33 = bracketright braceright asciitilde
  13559. + shiftr keycode 33 = braceright
  13560. + shift shiftr keycode 33 = braceright
  13561. + control keycode 33 = Control_bracketright
  13562. + alt keycode 33 = Meta_bracketright
  13563. +keycode 34 = equal plus
  13564. + shiftr keycode 34 = plus
  13565. + shift shiftr keycode 34 = plus
  13566. + alt keycode 34 = Meta_equal
  13567. +keycode 35 = eight asterisk bracketleft
  13568. + shiftr keycode 35 = asterisk
  13569. + shift shiftr keycode 35 = asterisk
  13570. + control keycode 35 = Delete
  13571. + alt keycode 35 = Meta_eight
  13572. +keycode 36 = i
  13573. + shiftr keycode 36 = +I
  13574. + shift shiftr keycode 36 = +i
  13575. +keycode 37 = k
  13576. + shiftr keycode 37 = +K
  13577. + shift shiftr keycode 37 = +k
  13578. +keycode 38 = comma less
  13579. + shiftr keycode 38 = less
  13580. + shift shiftr keycode 38 = less
  13581. + alt keycode 38 = Meta_comma
  13582. +
  13583. +keycode 40 = h
  13584. + shiftr keycode 40 = +H
  13585. + shift shiftr keycode 40 = +h
  13586. +keycode 41 = y
  13587. + shiftr keycode 41 = +Y
  13588. + shift shiftr keycode 41 = +y
  13589. +keycode 42 = six asciicircum
  13590. + shiftr keycode 42 = asciicircum
  13591. + shift shiftr keycode 42 = asciicircum
  13592. + control keycode 42 = Control_asciicircum
  13593. + alt keycode 42 = Meta_six
  13594. +keycode 43 = seven ampersand braceleft
  13595. + shiftr keycode 43 = ampersand
  13596. + shift shiftr keycode 43 = ampersand
  13597. + control keycode 43 = Control_underscore
  13598. + alt keycode 43 = Meta_seven
  13599. +keycode 44 = u
  13600. + shiftr keycode 44 = +U
  13601. + shift shiftr keycode 44 = +u
  13602. +keycode 45 = j
  13603. + shiftr keycode 45 = +J
  13604. + shift shiftr keycode 45 = +j
  13605. +keycode 46 = m
  13606. + shiftr keycode 46 = +M
  13607. + shift shiftr keycode 46 = +m
  13608. +keycode 47 = n
  13609. + shiftr keycode 47 = +N
  13610. + shift shiftr keycode 47 = +n
  13611. +
  13612. +# This is the "Backspace" key:
  13613. +keycode 49 = Delete Delete
  13614. + shiftr keycode 49 = Delete
  13615. + shift shiftr keycode 49 = Delete
  13616. + control keycode 49 = BackSpace
  13617. + alt keycode 49 = Meta_Delete
  13618. +keycode 50 = Num_Lock
  13619. + shift keycode 50 = Bare_Num_Lock
  13620. + shiftr keycode 50 = Bare_Num_Lock
  13621. + shift shiftr keycode 50 = Bare_Num_Lock
  13622. +# This is the "Delete" key:
  13623. +keycode 51 = Remove
  13624. + control alt keycode 51 = Boot
  13625. +
  13626. +keycode 53 = backslash bar
  13627. + shiftr keycode 53 = bar
  13628. + shift shiftr keycode 53 = bar
  13629. + control keycode 53 = Control_backslash
  13630. + alt keycode 53 = Meta_backslash
  13631. +keycode 54 = Return
  13632. + alt keycode 54 = Meta_Control_m
  13633. +keycode 55 = space space
  13634. + shiftr keycode 55 = space
  13635. + shift shiftr keycode 55 = space
  13636. + control keycode 55 = nul
  13637. + alt keycode 55 = Meta_space
  13638. +keycode 56 = g
  13639. + shiftr keycode 56 = +G
  13640. + shift shiftr keycode 56 = +g
  13641. +keycode 57 = t
  13642. + shiftr keycode 57 = +T
  13643. + shift shiftr keycode 57 = +t
  13644. +keycode 58 = five percent
  13645. + shiftr keycode 58 = percent
  13646. + shift shiftr keycode 58 = percent
  13647. + control keycode 58 = Control_bracketright
  13648. + alt keycode 58 = Meta_five
  13649. +keycode 59 = four dollar dollar
  13650. + shiftr keycode 59 = dollar
  13651. + shift shiftr keycode 59 = dollar
  13652. + control keycode 59 = Control_backslash
  13653. + alt keycode 59 = Meta_four
  13654. +keycode 60 = r
  13655. + shiftr keycode 60 = +R
  13656. + shift shiftr keycode 60 = +r
  13657. +keycode 61 = f
  13658. + shiftr keycode 61 = +F
  13659. + shift shiftr keycode 61 = +f
  13660. + altgr keycode 61 = Hex_F
  13661. +keycode 62 = v
  13662. + shiftr keycode 62 = +V
  13663. + shift shiftr keycode 62 = +v
  13664. +keycode 63 = b
  13665. + shiftr keycode 63 = +B
  13666. + shift shiftr keycode 63 = +b
  13667. + altgr keycode 63 = Hex_B
  13668. +
  13669. +keycode 67 = three numbersign
  13670. + shiftr keycode 67 = numbersign
  13671. + shift shiftr keycode 67 = numbersign
  13672. + control keycode 67 = Escape
  13673. + alt keycode 67 = Meta_three
  13674. +keycode 68 = e
  13675. + shiftr keycode 68 = +E
  13676. + shift shiftr keycode 68 = +e
  13677. + altgr keycode 68 = Hex_E
  13678. +keycode 69 = d
  13679. + shiftr keycode 69 = +D
  13680. + shift shiftr keycode 69 = +d
  13681. + altgr keycode 69 = Hex_D
  13682. +keycode 70 = c
  13683. + shiftr keycode 70 = +C
  13684. + shift shiftr keycode 70 = +c
  13685. + altgr keycode 70 = Hex_C
  13686. +keycode 71 = Right Incr_Console
  13687. + shiftr keycode 71 = Incr_Console
  13688. + shift shiftr keycode 71 = Incr_Console
  13689. + alt keycode 71 = End
  13690. +
  13691. +keycode 75 = two at at
  13692. + shiftr keycode 75 = at
  13693. + shift shiftr keycode 75 = at
  13694. + control keycode 75 = nul
  13695. + shift control keycode 75 = nul
  13696. + shiftr control keycode 75 = nul
  13697. + shift shiftr control keycode 75 = nul
  13698. + alt keycode 75 = Meta_two
  13699. +keycode 76 = w
  13700. + shiftr keycode 76 = +W
  13701. + shift shiftr keycode 76 = +w
  13702. +keycode 77 = s
  13703. + shiftr keycode 77 = +S
  13704. + shift shiftr keycode 77 = +s
  13705. +keycode 78 = x
  13706. + shiftr keycode 78 = +X
  13707. + shift shiftr keycode 78 = +x
  13708. +keycode 79 = Down Scroll_Forward
  13709. + shiftr keycode 79 = Scroll_Forward
  13710. + shift shiftr keycode 79 = Scroll_Forward
  13711. + alt keycode 79 = Next
  13712. +keycode 80 = Escape Escape
  13713. + shiftr keycode 80 = Escape
  13714. + shift shiftr keycode 80 = Escape
  13715. + alt keycode 80 = Meta_Escape
  13716. +keycode 81 = Tab Tab
  13717. + shiftr keycode 81 = Tab
  13718. + shift shiftr keycode 81 = Tab
  13719. + alt keycode 81 = Meta_Tab
  13720. +keycode 82 = grave asciitilde
  13721. + shiftr keycode 82 = asciitilde
  13722. + shift shiftr keycode 82 = asciitilde
  13723. + control keycode 82 = nul
  13724. + alt keycode 82 = Meta_grave
  13725. +keycode 83 = one exclam
  13726. + shiftr keycode 83 = exclam
  13727. + shift shiftr keycode 83 = exclam
  13728. + alt keycode 83 = Meta_one
  13729. +keycode 84 = q
  13730. + shiftr keycode 84 = +Q
  13731. + shift shiftr keycode 84 = +q
  13732. +keycode 85 = a
  13733. + shiftr keycode 85 = +A
  13734. + shift shiftr keycode 85 = +a
  13735. + altgr keycode 85 = Hex_A
  13736. +keycode 86 = z
  13737. + shiftr keycode 86 = +Z
  13738. + shift shiftr keycode 86 = +z
  13739. +
  13740. +# This is the windows key:
  13741. +keycode 88 = Decr_Console
  13742. +keycode 89 = Shift
  13743. +keycode 90 = Control
  13744. +keycode 91 = Control
  13745. +keycode 92 = Alt
  13746. +keycode 93 = AltGr
  13747. +keycode 94 = ShiftR
  13748. + shift keycode 94 = Caps_Lock
  13749. diff -Nur linux-2.4.32-rc1/drivers/char/indydog.c linux-2.4.32-rc1.mips/drivers/char/indydog.c
  13750. --- linux-2.4.32-rc1/drivers/char/indydog.c 2003-08-25 13:44:41.000000000 +0200
  13751. +++ linux-2.4.32-rc1.mips/drivers/char/indydog.c 2004-06-22 17:32:07.000000000 +0200
  13752. @@ -1,5 +1,5 @@
  13753. /*
  13754. - * IndyDog 0.2 A Hardware Watchdog Device for SGI IP22
  13755. + * IndyDog 0.3 A Hardware Watchdog Device for SGI IP22
  13756. *
  13757. * (c) Copyright 2002 Guido Guenther <[email protected]>, All Rights Reserved.
  13758. *
  13759. @@ -7,10 +7,10 @@
  13760. * modify it under the terms of the GNU General Public License
  13761. * as published by the Free Software Foundation; either version
  13762. * 2 of the License, or (at your option) any later version.
  13763. - *
  13764. + *
  13765. * based on softdog.c by Alan Cox <[email protected]>
  13766. */
  13767. -
  13768. +
  13769. #include <linux/module.h>
  13770. #include <linux/config.h>
  13771. #include <linux/types.h>
  13772. @@ -19,13 +19,12 @@
  13773. #include <linux/mm.h>
  13774. #include <linux/miscdevice.h>
  13775. #include <linux/watchdog.h>
  13776. -#include <linux/smp_lock.h>
  13777. #include <linux/init.h>
  13778. #include <asm/uaccess.h>
  13779. #include <asm/sgi/mc.h>
  13780. -static unsigned long indydog_alive;
  13781. -static int expect_close = 0;
  13782. +#define PFX "indydog: "
  13783. +static int indydog_alive;
  13784. #ifdef CONFIG_WATCHDOG_NOWAYOUT
  13785. static int nowayout = 1;
  13786. @@ -33,10 +32,30 @@
  13787. static int nowayout = 0;
  13788. #endif
  13789. +#define WATCHDOG_TIMEOUT 30 /* 30 sec default timeout */
  13790. +
  13791. MODULE_PARM(nowayout,"i");
  13792. MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
  13793. -static inline void indydog_ping(void)
  13794. +static void indydog_start(void)
  13795. +{
  13796. + u32 mc_ctrl0 = sgimc->cpuctrl0;
  13797. +
  13798. + mc_ctrl0 = sgimc->cpuctrl0 | SGIMC_CCTRL0_WDOG;
  13799. + sgimc->cpuctrl0 = mc_ctrl0;
  13800. +}
  13801. +
  13802. +static void indydog_stop(void)
  13803. +{
  13804. + u32 mc_ctrl0 = sgimc->cpuctrl0;
  13805. +
  13806. + mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG;
  13807. + sgimc->cpuctrl0 = mc_ctrl0;
  13808. +
  13809. + printk(KERN_INFO PFX "Stopped watchdog timer.\n");
  13810. +}
  13811. +
  13812. +static void indydog_ping(void)
  13813. {
  13814. sgimc->watchdogt = 0;
  13815. }
  13816. @@ -46,18 +65,14 @@
  13817. */
  13818. static int indydog_open(struct inode *inode, struct file *file)
  13819. {
  13820. - u32 mc_ctrl0;
  13821. -
  13822. - if (test_and_set_bit(0,&indydog_alive))
  13823. + if (indydog_alive)
  13824. return -EBUSY;
  13825. - if (nowayout) {
  13826. + if (nowayout)
  13827. MOD_INC_USE_COUNT;
  13828. - }
  13829. /* Activate timer */
  13830. - mc_ctrl0 = sgimc->cpuctrl0 | SGIMC_CCTRL0_WDOG;
  13831. - sgimc->cpuctrl0 = mc_ctrl0;
  13832. + indydog_start();
  13833. indydog_ping();
  13834. indydog_alive = 1;
  13835. @@ -69,63 +84,48 @@
  13836. static int indydog_release(struct inode *inode, struct file *file)
  13837. {
  13838. /* Shut off the timer.
  13839. - * Lock it in if it's a module and we set nowayout. */
  13840. - lock_kernel();
  13841. - if (expect_close) {
  13842. - u32 mc_ctrl0 = sgimc->cpuctrl0;
  13843. + * Lock it in if it's a module and we defined ...NOWAYOUT */
  13844. + if (!nowayout) {
  13845. + u32 mc_ctrl0 = sgimc->cpuctrl0;
  13846. mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG;
  13847. sgimc->cpuctrl0 = mc_ctrl0;
  13848. printk(KERN_INFO "Stopped watchdog timer.\n");
  13849. - } else
  13850. - printk(KERN_CRIT "WDT device closed unexpectedly. WDT will not stop!\n");
  13851. - clear_bit(0, &indydog_alive);
  13852. - unlock_kernel();
  13853. + }
  13854. + indydog_alive = 0;
  13855. return 0;
  13856. }
  13857. static ssize_t indydog_write(struct file *file, const char *data, size_t len, loff_t *ppos)
  13858. {
  13859. - /* Can't seek (pwrite) on this device */
  13860. + /* Can't seek (pwrite) on this device */
  13861. if (ppos != &file->f_pos)
  13862. return -ESPIPE;
  13863. - /*
  13864. - * Refresh the timer.
  13865. - */
  13866. + /* Refresh the timer. */
  13867. if (len) {
  13868. - if (!nowayout) {
  13869. - size_t i;
  13870. -
  13871. - /* In case it was set long ago */
  13872. - expect_close = 0;
  13873. -
  13874. - for (i = 0; i != len; i++) {
  13875. - char c;
  13876. - if (get_user(c, data + i))
  13877. - return -EFAULT;
  13878. - if (c == 'V')
  13879. - expect_close = 1;
  13880. - }
  13881. - }
  13882. indydog_ping();
  13883. - return 1;
  13884. }
  13885. - return 0;
  13886. + return len;
  13887. }
  13888. static int indydog_ioctl(struct inode *inode, struct file *file,
  13889. unsigned int cmd, unsigned long arg)
  13890. {
  13891. + int options, retval = -EINVAL;
  13892. static struct watchdog_info ident = {
  13893. - options: WDIOF_MAGICCLOSE,
  13894. - identity: "Hardware Watchdog for SGI IP22",
  13895. + .options = WDIOF_KEEPALIVEPING |
  13896. + WDIOF_MAGICCLOSE,
  13897. + .firmware_version = 0,
  13898. + .identity = "Hardware Watchdog for SGI IP22",
  13899. };
  13900. +
  13901. switch (cmd) {
  13902. default:
  13903. return -ENOIOCTLCMD;
  13904. case WDIOC_GETSUPPORT:
  13905. - if(copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
  13906. + if (copy_to_user((struct watchdog_info *)arg,
  13907. + &ident, sizeof(ident)))
  13908. return -EFAULT;
  13909. return 0;
  13910. case WDIOC_GETSTATUS:
  13911. @@ -134,31 +134,53 @@
  13912. case WDIOC_KEEPALIVE:
  13913. indydog_ping();
  13914. return 0;
  13915. + case WDIOC_GETTIMEOUT:
  13916. + return put_user(WATCHDOG_TIMEOUT,(int *)arg);
  13917. + case WDIOC_SETOPTIONS:
  13918. + {
  13919. + if (get_user(options, (int *)arg))
  13920. + return -EFAULT;
  13921. +
  13922. + if (options & WDIOS_DISABLECARD) {
  13923. + indydog_stop();
  13924. + retval = 0;
  13925. + }
  13926. +
  13927. + if (options & WDIOS_ENABLECARD) {
  13928. + indydog_start();
  13929. + retval = 0;
  13930. + }
  13931. +
  13932. + return retval;
  13933. + }
  13934. }
  13935. }
  13936. static struct file_operations indydog_fops = {
  13937. - owner: THIS_MODULE,
  13938. - write: indydog_write,
  13939. - ioctl: indydog_ioctl,
  13940. - open: indydog_open,
  13941. - release: indydog_release,
  13942. + .owner = THIS_MODULE,
  13943. + .write = indydog_write,
  13944. + .ioctl = indydog_ioctl,
  13945. + .open = indydog_open,
  13946. + .release = indydog_release,
  13947. };
  13948. static struct miscdevice indydog_miscdev = {
  13949. - minor: WATCHDOG_MINOR,
  13950. - name: "watchdog",
  13951. - fops: &indydog_fops,
  13952. + .minor = WATCHDOG_MINOR,
  13953. + .name = "watchdog",
  13954. + .fops = &indydog_fops,
  13955. };
  13956. -static const char banner[] __initdata = KERN_INFO "Hardware Watchdog Timer for SGI IP22: 0.2\n";
  13957. +static char banner[] __initdata =
  13958. + KERN_INFO PFX "Hardware Watchdog Timer for SGI IP22: 0.3\n";
  13959. static int __init watchdog_init(void)
  13960. {
  13961. int ret = misc_register(&indydog_miscdev);
  13962. -
  13963. - if (ret)
  13964. + if (ret) {
  13965. + printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
  13966. + WATCHDOG_MINOR, ret);
  13967. return ret;
  13968. + }
  13969. printk(banner);
  13970. @@ -172,4 +194,7 @@
  13971. module_init(watchdog_init);
  13972. module_exit(watchdog_exit);
  13973. +
  13974. +MODULE_AUTHOR("Guido Guenther <[email protected]>");
  13975. +MODULE_DESCRIPTION("Hardware Watchdog Device for SGI IP22");
  13976. MODULE_LICENSE("GPL");
  13977. diff -Nur linux-2.4.32-rc1/drivers/char/ip27-rtc.c linux-2.4.32-rc1.mips/drivers/char/ip27-rtc.c
  13978. --- linux-2.4.32-rc1/drivers/char/ip27-rtc.c 2004-02-18 14:36:31.000000000 +0100
  13979. +++ linux-2.4.32-rc1.mips/drivers/char/ip27-rtc.c 2004-04-06 03:35:30.000000000 +0200
  13980. @@ -44,6 +44,7 @@
  13981. #include <asm/sn/klconfig.h>
  13982. #include <asm/sn/sn0/ip27.h>
  13983. #include <asm/sn/sn0/hub.h>
  13984. +#include <asm/sn/sn_private.h>
  13985. static int rtc_ioctl(struct inode *inode, struct file *file,
  13986. unsigned int cmd, unsigned long arg);
  13987. @@ -209,11 +210,8 @@
  13988. static int __init rtc_init(void)
  13989. {
  13990. - nasid_t nid;
  13991. -
  13992. - nid = get_nasid();
  13993. rtc = (struct m48t35_rtc *)
  13994. - (KL_CONFIG_CH_CONS_INFO(nid)->memory_base + IOC3_BYTEBUS_DEV0);
  13995. + (KL_CONFIG_CH_CONS_INFO(master_nasid)->memory_base + IOC3_BYTEBUS_DEV0);
  13996. printk(KERN_INFO "Real Time Clock Driver v%s\n", RTC_VERSION);
  13997. if (misc_register(&rtc_dev)) {
  13998. @@ -325,3 +323,7 @@
  13999. rtc_tm->tm_mon--;
  14000. }
  14001. +
  14002. +MODULE_AUTHOR("Ralf Baechle <[email protected]>");
  14003. +MODULE_DESCRIPTION("SGI IP27 M48T35 RTC driver");
  14004. +MODULE_LICENSE("GPL");
  14005. diff -Nur linux-2.4.32-rc1/drivers/char/Makefile linux-2.4.32-rc1.mips/drivers/char/Makefile
  14006. --- linux-2.4.32-rc1/drivers/char/Makefile 2004-08-08 01:26:04.000000000 +0200
  14007. +++ linux-2.4.32-rc1.mips/drivers/char/Makefile 2005-02-11 22:09:56.000000000 +0100
  14008. @@ -48,7 +48,12 @@
  14009. KEYBD =
  14010. endif
  14011. ifeq ($(CONFIG_VR41XX_KIU),y)
  14012. - KEYMAP =
  14013. + ifeq ($(CONFIG_IBM_WORKPAD),y)
  14014. + KEYMAP = ibm_workpad_keymap.o
  14015. + endif
  14016. + ifeq ($(CONFIG_VICTOR_MPC30X),y)
  14017. + KEYMAP = victor_mpc30x_keymap.o
  14018. + endif
  14019. KEYBD = vr41xx_keyb.o
  14020. endif
  14021. endif
  14022. @@ -251,7 +256,6 @@
  14023. obj-$(CONFIG_RTC) += rtc.o
  14024. obj-$(CONFIG_GEN_RTC) += genrtc.o
  14025. obj-$(CONFIG_EFI_RTC) += efirtc.o
  14026. -obj-$(CONFIG_SGI_DS1286) += ds1286.o
  14027. obj-$(CONFIG_MIPS_RTC) += mips_rtc.o
  14028. obj-$(CONFIG_SGI_IP27_RTC) += ip27-rtc.o
  14029. ifeq ($(CONFIG_PPC),)
  14030. @@ -259,6 +263,7 @@
  14031. endif
  14032. obj-$(CONFIG_TOSHIBA) += toshiba.o
  14033. obj-$(CONFIG_I8K) += i8k.o
  14034. +obj-$(CONFIG_DS1286) += ds1286.o
  14035. obj-$(CONFIG_DS1620) += ds1620.o
  14036. obj-$(CONFIG_DS1742) += ds1742.o
  14037. obj-$(CONFIG_INTEL_RNG) += i810_rng.o
  14038. @@ -269,6 +274,7 @@
  14039. obj-$(CONFIG_ITE_GPIO) += ite_gpio.o
  14040. obj-$(CONFIG_AU1X00_GPIO) += au1000_gpio.o
  14041. +obj-$(CONFIG_AU1550_PSC_SPI) += au1550_psc_spi.o
  14042. obj-$(CONFIG_AU1X00_USB_TTY) += au1000_usbtty.o
  14043. obj-$(CONFIG_AU1X00_USB_RAW) += au1000_usbraw.o
  14044. obj-$(CONFIG_COBALT_LCD) += lcd.o
  14045. @@ -353,3 +359,9 @@
  14046. qtronixmap.c: qtronixmap.map
  14047. set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@
  14048. +
  14049. +ibm_workpad_keymap.c: ibm_workpad_keymap.map
  14050. + set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@
  14051. +
  14052. +victor_mpc30x_keymap.c: victor_mpc30x_keymap.map
  14053. + set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@
  14054. diff -Nur linux-2.4.32-rc1/drivers/char/mips_rtc.c linux-2.4.32-rc1.mips/drivers/char/mips_rtc.c
  14055. --- linux-2.4.32-rc1/drivers/char/mips_rtc.c 2004-01-05 14:53:56.000000000 +0100
  14056. +++ linux-2.4.32-rc1.mips/drivers/char/mips_rtc.c 2004-06-28 14:54:53.000000000 +0200
  14057. @@ -53,14 +53,6 @@
  14058. #include <asm/io.h>
  14059. #include <asm/uaccess.h>
  14060. #include <asm/system.h>
  14061. -
  14062. -/*
  14063. - * Check machine
  14064. - */
  14065. -#if !defined(CONFIG_MIPS) || !defined(CONFIG_NEW_TIME_C)
  14066. -#error "This driver is for MIPS machines with CONFIG_NEW_TIME_C defined"
  14067. -#endif
  14068. -
  14069. #include <asm/time.h>
  14070. static unsigned long rtc_status = 0; /* bitmapped status byte. */
  14071. diff -Nur linux-2.4.32-rc1/drivers/char/sb1250_duart.c linux-2.4.32-rc1.mips/drivers/char/sb1250_duart.c
  14072. --- linux-2.4.32-rc1/drivers/char/sb1250_duart.c 2004-02-18 14:36:31.000000000 +0100
  14073. +++ linux-2.4.32-rc1.mips/drivers/char/sb1250_duart.c 2004-09-17 01:25:44.000000000 +0200
  14074. @@ -328,10 +328,11 @@
  14075. if (c <= 0) break;
  14076. if (from_user) {
  14077. + spin_unlock_irqrestore(&us->outp_lock, flags);
  14078. if (copy_from_user(us->outp_buf + us->outp_tail, buf, c)) {
  14079. - spin_unlock_irqrestore(&us->outp_lock, flags);
  14080. return -EFAULT;
  14081. }
  14082. + spin_lock_irqsave(&us->outp_lock, flags);
  14083. } else {
  14084. memcpy(us->outp_buf + us->outp_tail, buf, c);
  14085. }
  14086. @@ -498,9 +499,31 @@
  14087. duart_set_cflag(us->line, tty->termios->c_cflag);
  14088. }
  14089. +static int get_serial_info(uart_state_t *us, struct serial_struct * retinfo) {
  14090. +
  14091. + struct serial_struct tmp;
  14092. +
  14093. + memset(&tmp, 0, sizeof(tmp));
  14094. +
  14095. + tmp.type=PORT_SB1250;
  14096. + tmp.line=us->line;
  14097. + tmp.port=A_DUART_CHANREG(tmp.line,0);
  14098. + tmp.irq=K_INT_UART_0 + tmp.line;
  14099. + tmp.xmit_fifo_size=16; /* fixed by hw */
  14100. + tmp.baud_base=5000000;
  14101. + tmp.io_type=SERIAL_IO_MEM;
  14102. +
  14103. + if (copy_to_user(retinfo,&tmp,sizeof(*retinfo)))
  14104. + return -EFAULT;
  14105. +
  14106. + return 0;
  14107. +}
  14108. +
  14109. static int duart_ioctl(struct tty_struct *tty, struct file * file,
  14110. unsigned int cmd, unsigned long arg)
  14111. {
  14112. + uart_state_t *us = (uart_state_t *) tty->driver_data;
  14113. +
  14114. /* if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
  14115. return -ENODEV;*/
  14116. switch (cmd) {
  14117. @@ -517,7 +540,7 @@
  14118. printk("Ignoring TIOCMSET\n");
  14119. break;
  14120. case TIOCGSERIAL:
  14121. - printk("Ignoring TIOCGSERIAL\n");
  14122. + return get_serial_info(us,(struct serial_struct *) arg);
  14123. break;
  14124. case TIOCSSERIAL:
  14125. printk("Ignoring TIOCSSERIAL\n");
  14126. diff -Nur linux-2.4.32-rc1/drivers/char/serial.c linux-2.4.32-rc1.mips/drivers/char/serial.c
  14127. --- linux-2.4.32-rc1/drivers/char/serial.c 2005-10-24 11:33:29.000000000 +0200
  14128. +++ linux-2.4.32-rc1.mips/drivers/char/serial.c 2005-09-23 22:41:22.000000000 +0200
  14129. @@ -62,6 +62,12 @@
  14130. * Robert Schwebel <[email protected]>,
  14131. * Juergen Beisert <[email protected]>,
  14132. * Theodore Ts'o <[email protected]>
  14133. + *
  14134. + * 10/00: Added suport for MIPS Atlas board.
  14135. + * 11/00: Hooks for serial kernel debug port support added.
  14136. + * Kevin D. Kissell, [email protected] and Carsten Langgaard,
  14137. + * [email protected]
  14138. + * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
  14139. */
  14140. static char *serial_version = "5.05c";
  14141. @@ -413,6 +419,22 @@
  14142. return 0;
  14143. }
  14144. +#if defined(CONFIG_MIPS_ATLAS) || defined(CONFIG_MIPS_SEAD)
  14145. +
  14146. +#include <asm/mips-boards/atlas.h>
  14147. +
  14148. +static _INLINE_ unsigned int serial_in(struct async_struct *info, int offset)
  14149. +{
  14150. + return (*(volatile unsigned int *)(mips_io_port_base + ATLAS_UART_REGS_BASE + offset*8) & 0xff);
  14151. +}
  14152. +
  14153. +static _INLINE_ void serial_out(struct async_struct *info, int offset, int value)
  14154. +{
  14155. + *(volatile unsigned int *)(mips_io_port_base + ATLAS_UART_REGS_BASE + offset*8) = value;
  14156. +}
  14157. +
  14158. +#else
  14159. +
  14160. static _INLINE_ unsigned int serial_in(struct async_struct *info, int offset)
  14161. {
  14162. switch (info->io_type) {
  14163. @@ -447,6 +469,8 @@
  14164. outb(value, info->port+offset);
  14165. }
  14166. }
  14167. +#endif
  14168. +
  14169. /*
  14170. * We used to support using pause I/O for certain machines. We
  14171. diff -Nur linux-2.4.32-rc1/drivers/char/victor_mpc30x_keymap.map linux-2.4.32-rc1.mips/drivers/char/victor_mpc30x_keymap.map
  14172. --- linux-2.4.32-rc1/drivers/char/victor_mpc30x_keymap.map 1970-01-01 01:00:00.000000000 +0100
  14173. +++ linux-2.4.32-rc1.mips/drivers/char/victor_mpc30x_keymap.map 2004-02-05 18:04:42.000000000 +0100
  14174. @@ -0,0 +1,102 @@
  14175. +# Victor Interlink MP-C303/304 keyboard keymap
  14176. +#
  14177. +# Copyright (C) 2003 Yoichi Yuasa <[email protected]>
  14178. +#
  14179. +# This file is subject to the terms and conditions of the GNU General Public
  14180. +# License. See the file "COPYING" in the main directory of this archive
  14181. +# for more details.
  14182. +keymaps 0-1,4-5,8-9,12
  14183. +alt_is_meta
  14184. +strings as usual
  14185. +compose as usual for "iso-8859-1"
  14186. +
  14187. +# First line
  14188. +keycode 89 = Escape
  14189. +keycode 9 = Delete
  14190. +
  14191. +# 2nd line
  14192. +keycode 73 = one exclam
  14193. +keycode 18 = two quotedbl
  14194. +keycode 92 = three numbersign
  14195. + control keycode 92 = Escape
  14196. +keycode 53 = four dollar
  14197. + control keycode 53 = Control_backslash
  14198. +keycode 21 = five percent
  14199. + control keycode 21 = Control_bracketright
  14200. +keycode 50 = six ampersand
  14201. + control keycode 50 = Control_underscore
  14202. +keycode 48 = seven apostrophe
  14203. +keycode 51 = eight parenleft
  14204. +keycode 16 = nine parenright
  14205. +keycode 80 = zero asciitilde
  14206. + control keycode 80 = nul
  14207. +keycode 49 = minus equal
  14208. +keycode 30 = asciicircum asciitilde
  14209. + control keycode 30 = Control_asciicircum
  14210. +keycode 5 = backslash bar
  14211. + control keycode 5 = Control_backslash
  14212. +keycode 13 = BackSpace
  14213. +# 3rd line
  14214. +keycode 57 = Tab
  14215. +keycode 74 = q
  14216. +keycode 26 = w
  14217. +keycode 81 = e
  14218. +keycode 29 = r
  14219. +keycode 37 = t
  14220. +keycode 45 = y
  14221. +keycode 72 = u
  14222. +keycode 24 = i
  14223. +keycode 32 = o
  14224. +keycode 41 = p
  14225. +keycode 1 = at grave
  14226. + control keycode 1 = nul
  14227. +keycode 54 = bracketleft braceleft
  14228. +keycode 63 = Return
  14229. + alt keycode 63 = Meta_Control_m
  14230. +# 4th line
  14231. +keycode 23 = Caps_Lock
  14232. +keycode 34 = a
  14233. +keycode 66 = s
  14234. +keycode 52 = d
  14235. +keycode 20 = f
  14236. +keycode 84 = g
  14237. +keycode 67 = h
  14238. +keycode 64 = j
  14239. +keycode 17 = k
  14240. +keycode 83 = l
  14241. +keycode 22 = semicolon plus
  14242. +keycode 61 = colon asterisk
  14243. + control keycode 61 = Control_g
  14244. +keycode 65 = bracketright braceright
  14245. + control keycode 65 = Control_bracketright
  14246. +# 5th line
  14247. +keycode 91 = Shift
  14248. +keycode 76 = z
  14249. +keycode 68 = x
  14250. +keycode 28 = c
  14251. +keycode 36 = v
  14252. +keycode 44 = b
  14253. +keycode 19 = n
  14254. +keycode 27 = m
  14255. +keycode 35 = comma less
  14256. +keycode 3 = period greater
  14257. + control keycode 3 = Compose
  14258. +keycode 38 = slash question
  14259. + control keycode 38 = Delete
  14260. + shift control keycode 38 = Delete
  14261. +keycode 6 = backslash underscore
  14262. + control keycode 6 = Control_backslash
  14263. +keycode 55 = Up
  14264. + alt keycode 55 = PageUp
  14265. +keycode 14 = Shift
  14266. +# 6th line
  14267. +keycode 56 = Control
  14268. +keycode 42 = Alt
  14269. +keycode 33 = space
  14270. + control keycode 33 = nul
  14271. +keycode 7 = Left
  14272. + alt keycode 7 = Home
  14273. +keycode 31 = Down
  14274. + alt keycode 31 = PageDown
  14275. +keycode 47 = Right
  14276. + alt keycode 47 = End
  14277. diff -Nur linux-2.4.32-rc1/drivers/char/vr41xx_keyb.c linux-2.4.32-rc1.mips/drivers/char/vr41xx_keyb.c
  14278. --- linux-2.4.32-rc1/drivers/char/vr41xx_keyb.c 2004-02-18 14:36:31.000000000 +0100
  14279. +++ linux-2.4.32-rc1.mips/drivers/char/vr41xx_keyb.c 2004-02-17 13:08:55.000000000 +0100
  14280. @@ -308,7 +308,7 @@
  14281. if (found != 0) {
  14282. kiu_base = VRC4173_KIU_OFFSET;
  14283. mkiuintreg = VRC4173_MKIUINTREG_OFFSET;
  14284. - vrc4173_clock_supply(VRC4173_KIU_CLOCK);
  14285. + vrc4173_supply_clock(VRC4173_KIU_CLOCK);
  14286. }
  14287. }
  14288. #endif
  14289. @@ -325,7 +325,7 @@
  14290. if (current_cpu_data.cputype == CPU_VR4111 ||
  14291. current_cpu_data.cputype == CPU_VR4121)
  14292. - vr41xx_clock_supply(KIU_CLOCK);
  14293. + vr41xx_supply_clock(KIU_CLOCK);
  14294. kiu_writew(KIURST_KIURST, KIURST);
  14295. diff -Nur linux-2.4.32-rc1/drivers/i2c/Config.in linux-2.4.32-rc1.mips/drivers/i2c/Config.in
  14296. --- linux-2.4.32-rc1/drivers/i2c/Config.in 2004-04-14 15:05:29.000000000 +0200
  14297. +++ linux-2.4.32-rc1.mips/drivers/i2c/Config.in 2005-02-11 20:49:04.000000000 +0100
  14298. @@ -57,6 +57,10 @@
  14299. if [ "$CONFIG_SGI_IP22" = "y" ]; then
  14300. dep_tristate 'I2C SGI interfaces' CONFIG_I2C_ALGO_SGI $CONFIG_I2C
  14301. fi
  14302. +
  14303. + if [ "$CONFIG_SOC_AU1550" = "y" -o "$CONFIG_SOC_AU1200" ]; then
  14304. + dep_tristate 'Au1550/Au1200 SMBus interface' CONFIG_I2C_ALGO_AU1550 $CONFIG_I2C
  14305. + fi
  14306. # This is needed for automatic patch generation: sensors code starts here
  14307. # This is needed for automatic patch generation: sensors code ends here
  14308. diff -Nur linux-2.4.32-rc1/drivers/i2c/i2c-algo-au1550.c linux-2.4.32-rc1.mips/drivers/i2c/i2c-algo-au1550.c
  14309. --- linux-2.4.32-rc1/drivers/i2c/i2c-algo-au1550.c 1970-01-01 01:00:00.000000000 +0100
  14310. +++ linux-2.4.32-rc1.mips/drivers/i2c/i2c-algo-au1550.c 2005-02-11 20:49:04.000000000 +0100
  14311. @@ -0,0 +1,340 @@
  14312. +/*
  14313. + * i2c-algo-au1550.c: SMBus (i2c) driver algorithms for Alchemy PSC interface
  14314. + * Copyright (C) 2004 Embedded Edge, LLC <[email protected]>
  14315. + *
  14316. + * The documentation describes this as an SMBus controller, but it doesn't
  14317. + * understand any of the SMBus protocol in hardware. It's really an I2C
  14318. + * controller that could emulate most of the SMBus in software.
  14319. + */
  14320. +
  14321. +#include <linux/kernel.h>
  14322. +#include <linux/module.h>
  14323. +#include <linux/init.h>
  14324. +#include <linux/errno.h>
  14325. +#include <linux/delay.h>
  14326. +
  14327. +#include <asm/au1000.h>
  14328. +#include <asm/au1xxx_psc.h>
  14329. +
  14330. +#include <linux/i2c.h>
  14331. +#include <linux/i2c-algo-au1550.h>
  14332. +
  14333. +static int
  14334. +wait_xfer_done(struct i2c_algo_au1550_data *adap)
  14335. +{
  14336. + u32 stat;
  14337. + int i;
  14338. + volatile psc_smb_t *sp;
  14339. +
  14340. + sp = (volatile psc_smb_t *)(adap->psc_base);
  14341. +
  14342. + /* Wait for Tx FIFO Underflow.
  14343. + */
  14344. + for (i = 0; i < adap->xfer_timeout; i++) {
  14345. + stat = sp->psc_smbevnt;
  14346. + au_sync();
  14347. + if ((stat & PSC_SMBEVNT_TU) != 0) {
  14348. + /* Clear it. */
  14349. + sp->psc_smbevnt = PSC_SMBEVNT_TU;
  14350. + au_sync();
  14351. + return 0;
  14352. + }
  14353. + udelay(1);
  14354. + }
  14355. +
  14356. + return -ETIMEDOUT;
  14357. +}
  14358. +
  14359. +static int
  14360. +wait_ack(struct i2c_algo_au1550_data *adap)
  14361. +{
  14362. + u32 stat;
  14363. + volatile psc_smb_t *sp;
  14364. +
  14365. + if (wait_xfer_done(adap))
  14366. + return -ETIMEDOUT;
  14367. +
  14368. + sp = (volatile psc_smb_t *)(adap->psc_base);
  14369. +
  14370. + stat = sp->psc_smbevnt;
  14371. + au_sync();
  14372. +
  14373. + if ((stat & (PSC_SMBEVNT_DN | PSC_SMBEVNT_AN | PSC_SMBEVNT_AL)) != 0)
  14374. + return -ETIMEDOUT;
  14375. +
  14376. + return 0;
  14377. +}
  14378. +
  14379. +static int
  14380. +wait_master_done(struct i2c_algo_au1550_data *adap)
  14381. +{
  14382. + u32 stat;
  14383. + int i;
  14384. + volatile psc_smb_t *sp;
  14385. +
  14386. + sp = (volatile psc_smb_t *)(adap->psc_base);
  14387. +
  14388. + /* Wait for Master Done.
  14389. + */
  14390. + for (i = 0; i < adap->xfer_timeout; i++) {
  14391. + stat = sp->psc_smbevnt;
  14392. + au_sync();
  14393. + if ((stat & PSC_SMBEVNT_MD) != 0)
  14394. + return 0;
  14395. + udelay(1);
  14396. + }
  14397. +
  14398. + return -ETIMEDOUT;
  14399. +}
  14400. +
  14401. +static int
  14402. +do_address(struct i2c_algo_au1550_data *adap, unsigned int addr, int rd)
  14403. +{
  14404. + volatile psc_smb_t *sp;
  14405. + u32 stat;
  14406. +
  14407. + sp = (volatile psc_smb_t *)(adap->psc_base);
  14408. +
  14409. + /* Reset the FIFOs, clear events.
  14410. + */
  14411. + sp->psc_smbpcr = PSC_SMBPCR_DC;
  14412. + sp->psc_smbevnt = PSC_SMBEVNT_ALLCLR;
  14413. + au_sync();
  14414. + do {
  14415. + stat = sp->psc_smbpcr;
  14416. + au_sync();
  14417. + } while ((stat & PSC_SMBPCR_DC) != 0);
  14418. +
  14419. + /* Write out the i2c chip address and specify operation
  14420. + */
  14421. + addr <<= 1;
  14422. + if (rd)
  14423. + addr |= 1;
  14424. +
  14425. + /* Put byte into fifo, start up master.
  14426. + */
  14427. + sp->psc_smbtxrx = addr;
  14428. + au_sync();
  14429. + sp->psc_smbpcr = PSC_SMBPCR_MS;
  14430. + au_sync();
  14431. + if (wait_ack(adap))
  14432. + return -EIO;
  14433. + return 0;
  14434. +}
  14435. +
  14436. +static u32
  14437. +wait_for_rx_byte(struct i2c_algo_au1550_data *adap, u32 *ret_data)
  14438. +{
  14439. + int j;
  14440. + u32 data, stat;
  14441. + volatile psc_smb_t *sp;
  14442. +
  14443. + if (wait_xfer_done(adap))
  14444. + return -EIO;
  14445. +
  14446. + sp = (volatile psc_smb_t *)(adap->psc_base);
  14447. +
  14448. + j = adap->xfer_timeout * 100;
  14449. + do {
  14450. + j--;
  14451. + if (j <= 0)
  14452. + return -EIO;
  14453. +
  14454. + stat = sp->psc_smbstat;
  14455. + au_sync();
  14456. + if ((stat & PSC_SMBSTAT_RE) == 0)
  14457. + j = 0;
  14458. + else
  14459. + udelay(1);
  14460. + } while (j > 0);
  14461. + data = sp->psc_smbtxrx;
  14462. + au_sync();
  14463. + *ret_data = data;
  14464. +
  14465. + return 0;
  14466. +}
  14467. +
  14468. +static int
  14469. +i2c_read(struct i2c_algo_au1550_data *adap, unsigned char *buf,
  14470. + unsigned int len)
  14471. +{
  14472. + int i;
  14473. + u32 data;
  14474. + volatile psc_smb_t *sp;
  14475. +
  14476. + if (len == 0)
  14477. + return 0;
  14478. +
  14479. + /* A read is performed by stuffing the transmit fifo with
  14480. + * zero bytes for timing, waiting for bytes to appear in the
  14481. + * receive fifo, then reading the bytes.
  14482. + */
  14483. +
  14484. + sp = (volatile psc_smb_t *)(adap->psc_base);
  14485. +
  14486. + i = 0;
  14487. + while (i < (len-1)) {
  14488. + sp->psc_smbtxrx = 0;
  14489. + au_sync();
  14490. + if (wait_for_rx_byte(adap, &data))
  14491. + return -EIO;
  14492. +
  14493. + buf[i] = data;
  14494. + i++;
  14495. + }
  14496. +
  14497. + /* The last byte has to indicate transfer done.
  14498. + */
  14499. + sp->psc_smbtxrx = PSC_SMBTXRX_STP;
  14500. + au_sync();
  14501. + if (wait_master_done(adap))
  14502. + return -EIO;
  14503. +
  14504. + data = sp->psc_smbtxrx;
  14505. + au_sync();
  14506. + buf[i] = data;
  14507. + return 0;
  14508. +}
  14509. +
  14510. +static int
  14511. +i2c_write(struct i2c_algo_au1550_data *adap, unsigned char *buf,
  14512. + unsigned int len)
  14513. +{
  14514. + int i;
  14515. + u32 data;
  14516. + volatile psc_smb_t *sp;
  14517. +
  14518. + if (len == 0)
  14519. + return 0;
  14520. +
  14521. + sp = (volatile psc_smb_t *)(adap->psc_base);
  14522. +
  14523. + i = 0;
  14524. + while (i < (len-1)) {
  14525. + data = buf[i];
  14526. + sp->psc_smbtxrx = data;
  14527. + au_sync();
  14528. + if (wait_ack(adap))
  14529. + return -EIO;
  14530. + i++;
  14531. + }
  14532. +
  14533. + /* The last byte has to indicate transfer done.
  14534. + */
  14535. + data = buf[i];
  14536. + data |= PSC_SMBTXRX_STP;
  14537. + sp->psc_smbtxrx = data;
  14538. + au_sync();
  14539. + if (wait_master_done(adap))
  14540. + return -EIO;
  14541. + return 0;
  14542. +}
  14543. +
  14544. +static int
  14545. +au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
  14546. +{
  14547. + struct i2c_algo_au1550_data *adap = i2c_adap->algo_data;
  14548. + struct i2c_msg *p;
  14549. + int i, err = 0;
  14550. +
  14551. + for (i = 0; !err && i < num; i++) {
  14552. + p = &msgs[i];
  14553. + err = do_address(adap, p->addr, p->flags & I2C_M_RD);
  14554. + if (err || !p->len)
  14555. + continue;
  14556. + if (p->flags & I2C_M_RD)
  14557. + err = i2c_read(adap, p->buf, p->len);
  14558. + else
  14559. + err = i2c_write(adap, p->buf, p->len);
  14560. + }
  14561. +
  14562. + /* Return the number of messages processed, or the error code.
  14563. + */
  14564. + if (err == 0)
  14565. + err = num;
  14566. + return err;
  14567. +}
  14568. +
  14569. +static u32
  14570. +au1550_func(struct i2c_adapter *adap)
  14571. +{
  14572. + return I2C_FUNC_I2C;
  14573. +}
  14574. +
  14575. +static struct i2c_algorithm au1550_algo = {
  14576. + .name = "Au1550 algorithm",
  14577. + .id = I2C_ALGO_AU1550,
  14578. + .master_xfer = au1550_xfer,
  14579. + .functionality = au1550_func,
  14580. +};
  14581. +
  14582. +/*
  14583. + * registering functions to load algorithms at runtime
  14584. + * Prior to calling us, the 50MHz clock frequency and routing
  14585. + * must have been set up for the PSC indicated by the adapter.
  14586. + */
  14587. +int
  14588. +i2c_au1550_add_bus(struct i2c_adapter *i2c_adap)
  14589. +{
  14590. + struct i2c_algo_au1550_data *adap = i2c_adap->algo_data;
  14591. + volatile psc_smb_t *sp;
  14592. + u32 stat;
  14593. +
  14594. + i2c_adap->algo = &au1550_algo;
  14595. +
  14596. + /* Now, set up the PSC for SMBus PIO mode.
  14597. + */
  14598. + sp = (volatile psc_smb_t *)(adap->psc_base);
  14599. + sp->psc_ctrl = PSC_CTRL_DISABLE;
  14600. + au_sync();
  14601. + sp->psc_sel = PSC_SEL_PS_SMBUSMODE;
  14602. + sp->psc_smbcfg = 0;
  14603. + au_sync();
  14604. + sp->psc_ctrl = PSC_CTRL_ENABLE;
  14605. + au_sync();
  14606. + do {
  14607. + stat = sp->psc_smbstat;
  14608. + au_sync();
  14609. + } while ((stat & PSC_SMBSTAT_SR) == 0);
  14610. +
  14611. + sp->psc_smbcfg = (PSC_SMBCFG_RT_FIFO8 | PSC_SMBCFG_TT_FIFO8 |
  14612. + PSC_SMBCFG_DD_DISABLE);
  14613. +
  14614. + /* Divide by 8 to get a 6.25 MHz clock. The later protocol
  14615. + * timings are based on this clock.
  14616. + */
  14617. + sp->psc_smbcfg |= PSC_SMBCFG_SET_DIV(PSC_SMBCFG_DIV2);
  14618. + sp->psc_smbmsk = PSC_SMBMSK_ALLMASK;
  14619. + au_sync();
  14620. +
  14621. + /* Set the protocol timer values. See Table 71 in the
  14622. + * Au1550 Data Book for standard timing values.
  14623. + */
  14624. + sp->psc_smbtmr = PSC_SMBTMR_SET_TH(2) | PSC_SMBTMR_SET_PS(15) | \
  14625. + PSC_SMBTMR_SET_PU(11) | PSC_SMBTMR_SET_SH(11) | \
  14626. + PSC_SMBTMR_SET_SU(11) | PSC_SMBTMR_SET_CL(15) | \
  14627. + PSC_SMBTMR_SET_CH(11);
  14628. + au_sync();
  14629. +
  14630. + sp->psc_smbcfg |= PSC_SMBCFG_DE_ENABLE;
  14631. + do {
  14632. + stat = sp->psc_smbstat;
  14633. + au_sync();
  14634. + } while ((stat & PSC_SMBSTAT_DR) == 0);
  14635. +
  14636. + return i2c_add_adapter(i2c_adap);
  14637. +}
  14638. +
  14639. +
  14640. +int
  14641. +i2c_au1550_del_bus(struct i2c_adapter *adap)
  14642. +{
  14643. + return i2c_del_adapter(adap);
  14644. +}
  14645. +
  14646. +EXPORT_SYMBOL(i2c_au1550_add_bus);
  14647. +EXPORT_SYMBOL(i2c_au1550_del_bus);
  14648. +
  14649. +MODULE_AUTHOR("Dan Malek <[email protected]>");
  14650. +MODULE_DESCRIPTION("SMBus Au1550 algorithm");
  14651. +MODULE_LICENSE("GPL");
  14652. diff -Nur linux-2.4.32-rc1/drivers/i2c/i2c-au1550.c linux-2.4.32-rc1.mips/drivers/i2c/i2c-au1550.c
  14653. --- linux-2.4.32-rc1/drivers/i2c/i2c-au1550.c 1970-01-01 01:00:00.000000000 +0100
  14654. +++ linux-2.4.32-rc1.mips/drivers/i2c/i2c-au1550.c 2005-02-11 20:49:04.000000000 +0100
  14655. @@ -0,0 +1,154 @@
  14656. +/*
  14657. + * i2c-au1550.c: SMBus (i2c) adapter for Alchemy PSC interface
  14658. + * Copyright (C) 2004 Embedded Edge, LLC <[email protected]>
  14659. + *
  14660. + * This is just a skeleton adapter to use with the Au1550 PSC
  14661. + * algorithm. It was developed for the Pb1550, but will work with
  14662. + * any Au1550 board that has a similar PSC configuration.
  14663. + *
  14664. + * This program is free software; you can redistribute it and/or
  14665. + * modify it under the terms of the GNU General Public License
  14666. + * as published by the Free Software Foundation; either version 2
  14667. + * of the License, or (at your option) any later version.
  14668. + *
  14669. + * This program is distributed in the hope that it will be useful,
  14670. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14671. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14672. + * GNU General Public License for more details.
  14673. + *
  14674. + * You should have received a copy of the GNU General Public License
  14675. + * along with this program; if not, write to the Free Software
  14676. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  14677. + */
  14678. +
  14679. +#include <linux/config.h>
  14680. +#include <linux/kernel.h>
  14681. +#include <linux/module.h>
  14682. +#include <linux/init.h>
  14683. +#include <linux/errno.h>
  14684. +
  14685. +#include <asm/au1000.h>
  14686. +#include <asm/au1xxx_psc.h>
  14687. +#if defined( CONFIG_MIPS_PB1550 )
  14688. + #include <asm/pb1550.h>
  14689. +#endif
  14690. +#if defined( CONFIG_MIPS_PB1200 )
  14691. + #include <asm/pb1200.h>
  14692. +#endif
  14693. +#if defined( CONFIG_MIPS_DB1200 )
  14694. + #include <asm/db1200.h>
  14695. +#endif
  14696. +#if defined( CONFIG_MIPS_FICMMP )
  14697. + #include <asm/ficmmp.h>
  14698. +#endif
  14699. +
  14700. +#include <linux/i2c.h>
  14701. +#include <linux/i2c-algo-au1550.h>
  14702. +
  14703. +
  14704. +
  14705. +static int
  14706. +pb1550_reg(struct i2c_client *client)
  14707. +{
  14708. + return 0;
  14709. +}
  14710. +
  14711. +static int
  14712. +pb1550_unreg(struct i2c_client *client)
  14713. +{
  14714. + return 0;
  14715. +}
  14716. +
  14717. +static void
  14718. +pb1550_inc_use(struct i2c_adapter *adap)
  14719. +{
  14720. +#ifdef MODULE
  14721. + MOD_INC_USE_COUNT;
  14722. +#endif
  14723. +}
  14724. +
  14725. +static void
  14726. +pb1550_dec_use(struct i2c_adapter *adap)
  14727. +{
  14728. +#ifdef MODULE
  14729. + MOD_DEC_USE_COUNT;
  14730. +#endif
  14731. +}
  14732. +
  14733. +static struct i2c_algo_au1550_data pb1550_i2c_info = {
  14734. + SMBUS_PSC_BASE, 200, 200
  14735. +};
  14736. +
  14737. +static struct i2c_adapter pb1550_board_adapter = {
  14738. + name: "pb1550 adapter",
  14739. + id: I2C_HW_AU1550_PSC,
  14740. + algo: NULL,
  14741. + algo_data: &pb1550_i2c_info,
  14742. + inc_use: pb1550_inc_use,
  14743. + dec_use: pb1550_dec_use,
  14744. + client_register: pb1550_reg,
  14745. + client_unregister: pb1550_unreg,
  14746. + client_count: 0,
  14747. +};
  14748. +
  14749. +int __init
  14750. +i2c_pb1550_init(void)
  14751. +{
  14752. + /* This is where we would set up a 50MHz clock source
  14753. + * and routing. On the Pb1550, the SMBus is PSC2, which
  14754. + * uses a shared clock with USB. This has been already
  14755. + * configured by Yamon as a 48MHz clock, close enough
  14756. + * for our work.
  14757. + */
  14758. + if (i2c_au1550_add_bus(&pb1550_board_adapter) < 0)
  14759. + return -ENODEV;
  14760. +
  14761. + return 0;
  14762. +}
  14763. +
  14764. +/* BIG hack to support the control interface on the Wolfson WM8731
  14765. + * audio codec on the Pb1550 board. We get an address and two data
  14766. + * bytes to write, create an i2c message, and send it across the
  14767. + * i2c transfer function. We do this here because we have access to
  14768. + * the i2c adapter structure.
  14769. + */
  14770. +static struct i2c_msg wm_i2c_msg; /* We don't want this stuff on the stack */
  14771. +static u8 i2cbuf[2];
  14772. +
  14773. +int
  14774. +pb1550_wm_codec_write(u8 addr, u8 reg, u8 val)
  14775. +{
  14776. + wm_i2c_msg.addr = addr;
  14777. + wm_i2c_msg.flags = 0;
  14778. + wm_i2c_msg.buf = i2cbuf;
  14779. + wm_i2c_msg.len = 2;
  14780. + i2cbuf[0] = reg;
  14781. + i2cbuf[1] = val;
  14782. +
  14783. + return pb1550_board_adapter.algo->master_xfer(&pb1550_board_adapter, &wm_i2c_msg, 1);
  14784. +}
  14785. +
  14786. +/* the next function is needed by DVB driver. */
  14787. +int pb1550_i2c_xfer(struct i2c_msg msgs[], int num)
  14788. +{
  14789. + return pb1550_board_adapter.algo->master_xfer(&pb1550_board_adapter, msgs, num);
  14790. +}
  14791. +
  14792. +EXPORT_SYMBOL(pb1550_wm_codec_write);
  14793. +EXPORT_SYMBOL(pb1550_i2c_xfer);
  14794. +
  14795. +MODULE_AUTHOR("Dan Malek, Embedded Edge, LLC.");
  14796. +MODULE_DESCRIPTION("SMBus adapter Alchemy pb1550");
  14797. +MODULE_LICENSE("GPL");
  14798. +
  14799. +int
  14800. +init_module(void)
  14801. +{
  14802. + return i2c_pb1550_init();
  14803. +}
  14804. +
  14805. +void
  14806. +cleanup_module(void)
  14807. +{
  14808. + i2c_au1550_del_bus(&pb1550_board_adapter);
  14809. +}
  14810. diff -Nur linux-2.4.32-rc1/drivers/i2c/i2c-core.c linux-2.4.32-rc1.mips/drivers/i2c/i2c-core.c
  14811. --- linux-2.4.32-rc1/drivers/i2c/i2c-core.c 2005-06-01 02:56:56.000000000 +0200
  14812. +++ linux-2.4.32-rc1.mips/drivers/i2c/i2c-core.c 2005-05-23 14:12:30.000000000 +0200
  14813. @@ -1280,6 +1280,9 @@
  14814. #ifdef CONFIG_I2C_MAX1617
  14815. extern int i2c_max1617_init(void);
  14816. #endif
  14817. +#ifdef CONFIG_I2C_ALGO_AU1550
  14818. + extern int i2c_pb1550_init(void);
  14819. +#endif
  14820. #ifdef CONFIG_I2C_PROC
  14821. extern int sensors_init(void);
  14822. @@ -1335,6 +1338,10 @@
  14823. i2c_max1617_init();
  14824. #endif
  14825. +#ifdef CONFIG_I2C_ALGO_AU1550
  14826. + i2c_pb1550_init();
  14827. +#endif
  14828. +
  14829. /* -------------- proc interface ---- */
  14830. #ifdef CONFIG_I2C_PROC
  14831. sensors_init();
  14832. diff -Nur linux-2.4.32-rc1/drivers/i2c/Makefile linux-2.4.32-rc1.mips/drivers/i2c/Makefile
  14833. --- linux-2.4.32-rc1/drivers/i2c/Makefile 2004-02-18 14:36:31.000000000 +0100
  14834. +++ linux-2.4.32-rc1.mips/drivers/i2c/Makefile 2005-02-11 20:49:04.000000000 +0100
  14835. @@ -6,7 +6,7 @@
  14836. export-objs := i2c-core.o i2c-algo-bit.o i2c-algo-pcf.o \
  14837. i2c-algo-ite.o i2c-algo-sibyte.o i2c-algo-sgi.o \
  14838. - i2c-proc.o
  14839. + i2c-algo-au1550.o i2c-proc.o i2c-au1550.o
  14840. obj-$(CONFIG_I2C) += i2c-core.o
  14841. obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o
  14842. @@ -25,6 +25,7 @@
  14843. obj-$(CONFIG_I2C_ALGO_SIBYTE) += i2c-algo-sibyte.o i2c-sibyte.o
  14844. obj-$(CONFIG_I2C_MAX1617) += i2c-max1617.o
  14845. obj-$(CONFIG_I2C_ALGO_SGI) += i2c-algo-sgi.o
  14846. +obj-$(CONFIG_I2C_ALGO_AU1550) += i2c-algo-au1550.o i2c-au1550.o
  14847. # This is needed for automatic patch generation: sensors code starts here
  14848. # This is needed for automatic patch generation: sensors code ends here
  14849. diff -Nur linux-2.4.32-rc1/drivers/media/video/indycam.c linux-2.4.32-rc1.mips/drivers/media/video/indycam.c
  14850. --- linux-2.4.32-rc1/drivers/media/video/indycam.c 2004-02-18 14:36:31.000000000 +0100
  14851. +++ linux-2.4.32-rc1.mips/drivers/media/video/indycam.c 2004-12-09 21:32:05.000000000 +0100
  14852. @@ -50,13 +50,14 @@
  14853. 0x80, /* INDYCAM_GAMMA */
  14854. };
  14855. - int err = 0;
  14856. struct indycam *camera;
  14857. struct i2c_client *client;
  14858. + int err = 0;
  14859. client = kmalloc(sizeof(*client), GFP_KERNEL);
  14860. - if (!client)
  14861. + if (!client)
  14862. return -ENOMEM;
  14863. +
  14864. camera = kmalloc(sizeof(*camera), GFP_KERNEL);
  14865. if (!camera) {
  14866. err = -ENOMEM;
  14867. @@ -67,7 +68,7 @@
  14868. client->adapter = adap;
  14869. client->addr = addr;
  14870. client->driver = &i2c_driver_indycam;
  14871. - strcpy(client->name, "IndyCam client");
  14872. + strcpy(client->name, "IndyCam client");
  14873. camera->client = client;
  14874. err = i2c_attach_client(client);
  14875. @@ -75,18 +76,18 @@
  14876. goto out_free_camera;
  14877. camera->version = i2c_smbus_read_byte_data(client, INDYCAM_VERSION);
  14878. - if (camera->version != CAMERA_VERSION_INDY &&
  14879. - camera->version != CAMERA_VERSION_MOOSE) {
  14880. + if ((camera->version != CAMERA_VERSION_INDY) &&
  14881. + (camera->version != CAMERA_VERSION_MOOSE)) {
  14882. err = -ENODEV;
  14883. goto out_detach_client;
  14884. }
  14885. - printk(KERN_INFO "Indycam v%d.%d detected.\n",
  14886. + printk(KERN_INFO "IndyCam v%d.%d detected.\n",
  14887. INDYCAM_VERSION_MAJOR(camera->version),
  14888. INDYCAM_VERSION_MINOR(camera->version));
  14889. err = i2c_master_send(client, initseq, sizeof(initseq));
  14890. if (err)
  14891. - printk(KERN_INFO "IndyCam initalization failed\n");
  14892. + printk(KERN_ERR "IndyCam initalization failed.\n");
  14893. MOD_INC_USE_COUNT;
  14894. return 0;
  14895. diff -Nur linux-2.4.32-rc1/drivers/media/video/vino.c linux-2.4.32-rc1.mips/drivers/media/video/vino.c
  14896. --- linux-2.4.32-rc1/drivers/media/video/vino.c 2004-02-18 14:36:31.000000000 +0100
  14897. +++ linux-2.4.32-rc1.mips/drivers/media/video/vino.c 2004-12-10 05:02:54.000000000 +0100
  14898. @@ -5,6 +5,8 @@
  14899. * License version 2 as published by the Free Software Foundation.
  14900. *
  14901. * Copyright (C) 2003 Ladislav Michl <[email protected]>
  14902. + * Copyright (C) 2004 Mikael Nousiainen <[email protected]>
  14903. + *
  14904. */
  14905. #include <linux/module.h>
  14906. @@ -37,13 +39,23 @@
  14907. #define DEBUG(x...)
  14908. #endif
  14909. +/* Channels (who could have guessed) */
  14910. +#define VINO_CHAN_NONE 0
  14911. +#define VINO_CHAN_A 1
  14912. +#define VINO_CHAN_B 2
  14913. +
  14914. /* VINO video size */
  14915. #define VINO_PAL_WIDTH 768
  14916. #define VINO_PAL_HEIGHT 576
  14917. #define VINO_NTSC_WIDTH 646
  14918. #define VINO_NTSC_HEIGHT 486
  14919. -/* set this to some sensible values. note: VINO_MIN_WIDTH has to be 8*x */
  14920. +/* Minimum value for Y-clipping (for smaller values the images
  14921. + * will be corrupted) */
  14922. +#define VINO_MIN_Y_CLIPPING 2
  14923. +
  14924. +/* Set these to some sensible values.
  14925. + * Note: the picture width has to be divisible by 8 */
  14926. #define VINO_MIN_WIDTH 32
  14927. #define VINO_MIN_HEIGHT 32
  14928. @@ -64,9 +76,7 @@
  14929. struct vino_device {
  14930. struct video_device vdev;
  14931. -#define VINO_CHAN_A 1
  14932. -#define VINO_CHAN_B 2
  14933. - int chan;
  14934. + int chan; /* VINO_CHAN_NONE, VINO_CHAN_A or VINO_CHAN_B */
  14935. int alpha;
  14936. /* clipping... */
  14937. unsigned int left, right, top, bottom;
  14938. @@ -106,7 +116,7 @@
  14939. struct vino_client {
  14940. struct i2c_client *driver;
  14941. - int owner;
  14942. + int owner; /* VINO_CHAN_NONE, VINO_CHAN_A or VINO_CHAN_B */
  14943. };
  14944. struct vino_video {
  14945. @@ -362,6 +372,7 @@
  14946. static int dma_setup(struct vino_device *v)
  14947. {
  14948. u32 ctrl, intr;
  14949. + int ofs;
  14950. struct sgi_vino_channel *ch;
  14951. ch = (v->chan == VINO_CHAN_A) ? &vino->a : &vino->b;
  14952. @@ -377,14 +388,24 @@
  14953. ch->line_size = v->line_size - 8;
  14954. /* set the alpha register */
  14955. ch->alpha = v->alpha;
  14956. - /* set cliping registers */
  14957. - ch->clip_start = VINO_CLIP_ODD(v->top) | VINO_CLIP_EVEN(v->top+1) |
  14958. + /* Set the clipping registers, this is the constant source of fun :)
  14959. + * Y clipping start has to be >= 2 and end has to be start + height/2
  14960. + * The values of top and bottom are even so dividing is not a problem
  14961. + *
  14962. + * The docs say that clipping values for the even field should be
  14963. + * odd_end + something_to_skip_vertical_blanking + some_lines and
  14964. + * even_start + height/2, though the image is good this way also
  14965. + *
  14966. + * TODO: for analog sources (SAA7191), the clipping values are a bit
  14967. + * different and that case isn't yet handled
  14968. + */
  14969. + ofs = VINO_MIN_Y_CLIPPING; /* Should depend on input source */
  14970. + ch->clip_start = VINO_CLIP_ODD(ofs + v->top / 2) |
  14971. + VINO_CLIP_EVEN(ofs + v->top / 2 + 1) |
  14972. VINO_CLIP_X(v->left);
  14973. - ch->clip_end = VINO_CLIP_ODD(v->bottom) | VINO_CLIP_EVEN(v->bottom+1) |
  14974. + ch->clip_end = VINO_CLIP_ODD(ofs + v->bottom / 2 - 1) |
  14975. + VINO_CLIP_EVEN(ofs + v->bottom / 2) |
  14976. VINO_CLIP_X(v->right);
  14977. - /* FIXME: end-of-field bug workaround
  14978. - VINO_CLIP_X(VINO_PAL_WIDTH);
  14979. - */
  14980. /* init the frame rate and norm (full frame rate only for now...) */
  14981. ch->frame_rate = VINO_FRAMERT_RT(0x1fff) |
  14982. (get_capture_norm(v) == VIDEO_MODE_PAL ?
  14983. @@ -510,6 +531,7 @@
  14984. static void vino_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  14985. {
  14986. u32 intr, ctrl;
  14987. + int a_eof, b_eof;
  14988. spin_lock(&Vino->vino_lock);
  14989. ctrl = vino->control;
  14990. @@ -525,12 +547,14 @@
  14991. vino->control = ctrl;
  14992. clear_eod(&Vino->chB);
  14993. }
  14994. + a_eof = intr & VINO_INTSTAT_A_EOF;
  14995. + b_eof = intr & VINO_INTSTAT_B_EOF;
  14996. vino->intr_status = ~intr;
  14997. spin_unlock(&Vino->vino_lock);
  14998. - /* FIXME: For now we are assuming that interrupt means that frame is
  14999. - * done. That's not true, but we can live with such brokeness for
  15000. - * a while ;-) */
  15001. - field_done(&Vino->chA);
  15002. + if (a_eof)
  15003. + field_done(&Vino->chA);
  15004. + if (b_eof)
  15005. + field_done(&Vino->chB);
  15006. }
  15007. static int vino_grab(struct vino_device *v, int frame)
  15008. diff -Nur linux-2.4.32-rc1/drivers/mtd/devices/docprobe.c linux-2.4.32-rc1.mips/drivers/mtd/devices/docprobe.c
  15009. --- linux-2.4.32-rc1/drivers/mtd/devices/docprobe.c 2003-06-13 16:51:34.000000000 +0200
  15010. +++ linux-2.4.32-rc1.mips/drivers/mtd/devices/docprobe.c 2003-06-16 01:42:21.000000000 +0200
  15011. @@ -89,10 +89,10 @@
  15012. 0xe4000000,
  15013. #elif defined(CONFIG_MOMENCO_OCELOT)
  15014. 0x2f000000,
  15015. - 0xff000000,
  15016. + 0xff000000,
  15017. #elif defined(CONFIG_MOMENCO_OCELOT_G) || defined (CONFIG_MOMENCO_OCELOT_C)
  15018. - 0xff000000,
  15019. -##else
  15020. + 0xff000000,
  15021. +#else
  15022. #warning Unknown architecture for DiskOnChip. No default probe locations defined
  15023. #endif
  15024. 0 };
  15025. diff -Nur linux-2.4.32-rc1/drivers/mtd/devices/ms02-nv.c linux-2.4.32-rc1.mips/drivers/mtd/devices/ms02-nv.c
  15026. --- linux-2.4.32-rc1/drivers/mtd/devices/ms02-nv.c 2003-06-13 16:51:34.000000000 +0200
  15027. +++ linux-2.4.32-rc1.mips/drivers/mtd/devices/ms02-nv.c 2004-07-30 12:22:40.000000000 +0200
  15028. @@ -1,10 +1,10 @@
  15029. /*
  15030. - * Copyright (c) 2001 Maciej W. Rozycki
  15031. + * Copyright (c) 2001 Maciej W. Rozycki
  15032. *
  15033. - * This program is free software; you can redistribute it and/or
  15034. - * modify it under the terms of the GNU General Public License
  15035. - * as published by the Free Software Foundation; either version
  15036. - * 2 of the License, or (at your option) any later version.
  15037. + * This program is free software; you can redistribute it and/or
  15038. + * modify it under the terms of the GNU General Public License
  15039. + * as published by the Free Software Foundation; either version
  15040. + * 2 of the License, or (at your option) any later version.
  15041. *
  15042. * $Id: ms02-nv.c,v 1.2 2003/01/24 14:05:17 dwmw2 Exp $
  15043. */
  15044. @@ -29,18 +29,18 @@
  15045. static char version[] __initdata =
  15046. - "ms02-nv.c: v.1.0.0 13 Aug 2001 Maciej W. Rozycki.\n";
  15047. + "ms02-nv.c: v.1.0.0 13 Aug 2001 Maciej W. Rozycki.\n";
  15048. -MODULE_AUTHOR("Maciej W. Rozycki <[email protected]>");
  15049. +MODULE_AUTHOR("Maciej W. Rozycki <[email protected]>");
  15050. MODULE_DESCRIPTION("DEC MS02-NV NVRAM module driver");
  15051. MODULE_LICENSE("GPL");
  15052. /*
  15053. * Addresses we probe for an MS02-NV at. Modules may be located
  15054. - * at any 8MB boundary within a 0MB up to 112MB range or at any 32MB
  15055. - * boundary within a 0MB up to 448MB range. We don't support a module
  15056. - * at 0MB, though.
  15057. + * at any 8MiB boundary within a 0MiB up to 112MiB range or at any 32MiB
  15058. + * boundary within a 0MiB up to 448MiB range. We don't support a module
  15059. + * at 0MiB, though.
  15060. */
  15061. static ulong ms02nv_addrs[] __initdata = {
  15062. 0x07000000, 0x06800000, 0x06000000, 0x05800000, 0x05000000,
  15063. @@ -130,7 +130,7 @@
  15064. int ret = -ENODEV;
  15065. - /* The module decodes 8MB of address space. */
  15066. + /* The module decodes 8MiB of address space. */
  15067. mod_res = kmalloc(sizeof(*mod_res), GFP_KERNEL);
  15068. if (!mod_res)
  15069. return -ENOMEM;
  15070. @@ -233,7 +233,7 @@
  15071. goto err_out_csr_res;
  15072. }
  15073. - printk(KERN_INFO "mtd%d: %s at 0x%08lx, size %uMB.\n",
  15074. + printk(KERN_INFO "mtd%d: %s at 0x%08lx, size %uMiB.\n",
  15075. mtd->index, ms02nv_name, addr, size >> 20);
  15076. mp->next = root_ms02nv_mtd;
  15077. @@ -293,12 +293,12 @@
  15078. switch (mips_machtype) {
  15079. case MACH_DS5000_200:
  15080. - csr = (volatile u32 *)KN02_CSR_ADDR;
  15081. + csr = (volatile u32 *)KN02_CSR_BASE;
  15082. if (*csr & KN02_CSR_BNK32M)
  15083. stride = 2;
  15084. break;
  15085. case MACH_DS5000_2X0:
  15086. - case MACH_DS5000:
  15087. + case MACH_DS5900:
  15088. csr = (volatile u32 *)KN03_MCR_BASE;
  15089. if (*csr & KN03_MCR_BNK32M)
  15090. stride = 2;
  15091. diff -Nur linux-2.4.32-rc1/drivers/mtd/devices/ms02-nv.h linux-2.4.32-rc1.mips/drivers/mtd/devices/ms02-nv.h
  15092. --- linux-2.4.32-rc1/drivers/mtd/devices/ms02-nv.h 2002-11-29 00:53:13.000000000 +0100
  15093. +++ linux-2.4.32-rc1.mips/drivers/mtd/devices/ms02-nv.h 2004-07-30 12:22:40.000000000 +0200
  15094. @@ -1,32 +1,96 @@
  15095. /*
  15096. - * Copyright (c) 2001 Maciej W. Rozycki
  15097. + * Copyright (c) 2001, 2003 Maciej W. Rozycki
  15098. *
  15099. - * This program is free software; you can redistribute it and/or
  15100. - * modify it under the terms of the GNU General Public License
  15101. - * as published by the Free Software Foundation; either version
  15102. - * 2 of the License, or (at your option) any later version.
  15103. + * DEC MS02-NV (54-20948-01) battery backed-up NVRAM module for
  15104. + * DECstation/DECsystem 5000/2x0 and DECsystem 5900 and 5900/260
  15105. + * systems.
  15106. + *
  15107. + * This program is free software; you can redistribute it and/or
  15108. + * modify it under the terms of the GNU General Public License
  15109. + * as published by the Free Software Foundation; either version
  15110. + * 2 of the License, or (at your option) any later version.
  15111. + *
  15112. + * $Id: ms02-nv.h,v 1.3 2003/08/19 09:25:36 dwmw2 Exp $
  15113. */
  15114. #include <linux/ioport.h>
  15115. #include <linux/mtd/mtd.h>
  15116. +/*
  15117. + * Addresses are decoded as follows:
  15118. + *
  15119. + * 0x000000 - 0x3fffff SRAM
  15120. + * 0x400000 - 0x7fffff CSR
  15121. + *
  15122. + * Within the SRAM area the following ranges are forced by the system
  15123. + * firmware:
  15124. + *
  15125. + * 0x000000 - 0x0003ff diagnostic area, destroyed upon a reboot
  15126. + * 0x000400 - ENDofRAM storage area, available to operating systems
  15127. + *
  15128. + * but we can't really use the available area right from 0x000400 as
  15129. + * the first word is used by the firmware as a status flag passed
  15130. + * from an operating system. If anything but the valid data magic
  15131. + * ID value is found, the firmware considers the SRAM clean, i.e.
  15132. + * containing no valid data, and disables the battery resulting in
  15133. + * data being erased as soon as power is switched off. So the choice
  15134. + * for the start address of the user-available is 0x001000 which is
  15135. + * nicely page aligned. The area between 0x000404 and 0x000fff may
  15136. + * be used by the driver for own needs.
  15137. + *
  15138. + * The diagnostic area defines two status words to be read by an
  15139. + * operating system, a magic ID to distinguish a MS02-NV board from
  15140. + * anything else and a status information providing results of tests
  15141. + * as well as the size of SRAM available, which can be 1MiB or 2MiB
  15142. + * (that's what the firmware handles; no idea if 2MiB modules ever
  15143. + * existed).
  15144. + *
  15145. + * The firmware only handles the MS02-NV board if installed in the
  15146. + * last (15th) slot, so for any other location the status information
  15147. + * stored in the SRAM cannot be relied upon. But from the hardware
  15148. + * point of view there is no problem using up to 14 such boards in a
  15149. + * system -- only the 1st slot needs to be filled with a DRAM module.
  15150. + * The MS02-NV board is ECC-protected, like other MS02 memory boards.
  15151. + *
  15152. + * The state of the battery as provided by the CSR is reflected on
  15153. + * the two onboard LEDs. When facing the battery side of the board,
  15154. + * with the LEDs at the top left and the battery at the bottom right
  15155. + * (i.e. looking from the back side of the system box), their meaning
  15156. + * is as follows (the system has to be powered on):
  15157. + *
  15158. + * left LED battery disable status: lit = enabled
  15159. + * right LED battery condition status: lit = OK
  15160. + */
  15161. +
  15162. /* MS02-NV iomem register offsets. */
  15163. #define MS02NV_CSR 0x400000 /* control & status register */
  15164. +/* MS02-NV CSR status bits. */
  15165. +#define MS02NV_CSR_BATT_OK 0x01 /* battery OK */
  15166. +#define MS02NV_CSR_BATT_OFF 0x02 /* battery disabled */
  15167. +
  15168. +
  15169. /* MS02-NV memory offsets. */
  15170. #define MS02NV_DIAG 0x0003f8 /* diagnostic status */
  15171. #define MS02NV_MAGIC 0x0003fc /* MS02-NV magic ID */
  15172. -#define MS02NV_RAM 0x000400 /* general-purpose RAM start */
  15173. +#define MS02NV_VALID 0x000400 /* valid data magic ID */
  15174. +#define MS02NV_RAM 0x001000 /* user-exposed RAM start */
  15175. -/* MS02-NV diagnostic status constants. */
  15176. -#define MS02NV_DIAG_SIZE_MASK 0xf0 /* RAM size mask */
  15177. -#define MS02NV_DIAG_SIZE_SHIFT 0x10 /* RAM size shift (left) */
  15178. +/* MS02-NV diagnostic status bits. */
  15179. +#define MS02NV_DIAG_TEST 0x01 /* SRAM test done (?) */
  15180. +#define MS02NV_DIAG_RO 0x02 /* SRAM r/o test done */
  15181. +#define MS02NV_DIAG_RW 0x04 /* SRAM r/w test done */
  15182. +#define MS02NV_DIAG_FAIL 0x08 /* SRAM test failed */
  15183. +#define MS02NV_DIAG_SIZE_MASK 0xf0 /* SRAM size mask */
  15184. +#define MS02NV_DIAG_SIZE_SHIFT 0x10 /* SRAM size shift (left) */
  15185. /* MS02-NV general constants. */
  15186. #define MS02NV_ID 0x03021966 /* MS02-NV magic ID value */
  15187. +#define MS02NV_VALID_ID 0xbd100248 /* valid data magic ID value */
  15188. #define MS02NV_SLOT_SIZE 0x800000 /* size of the address space
  15189. decoded by the module */
  15190. +
  15191. typedef volatile u32 ms02nv_uint;
  15192. struct ms02nv_private {
  15193. diff -Nur linux-2.4.32-rc1/drivers/mtd/maps/Config.in linux-2.4.32-rc1.mips/drivers/mtd/maps/Config.in
  15194. --- linux-2.4.32-rc1/drivers/mtd/maps/Config.in 2003-06-13 16:51:34.000000000 +0200
  15195. +++ linux-2.4.32-rc1.mips/drivers/mtd/maps/Config.in 2004-02-26 01:46:35.000000000 +0100
  15196. @@ -51,11 +51,26 @@
  15197. dep_tristate ' Pb1000 MTD support' CONFIG_MTD_PB1000 $CONFIG_MIPS_PB1000
  15198. dep_tristate ' Pb1500 MTD support' CONFIG_MTD_PB1500 $CONFIG_MIPS_PB1500
  15199. dep_tristate ' Pb1100 MTD support' CONFIG_MTD_PB1100 $CONFIG_MIPS_PB1100
  15200. + dep_tristate ' Bosporus MTD support' CONFIG_MTD_BOSPORUS $CONFIG_MIPS_BOSPORUS
  15201. + dep_tristate ' XXS1500 boot flash device' CONFIG_MTD_XXS1500 $CONFIG_MIPS_XXS1500
  15202. + dep_tristate ' MTX-1 flash device' CONFIG_MTD_MTX1 $CONFIG_MIPS_MTX1
  15203. if [ "$CONFIG_MTD_PB1500" = "y" -o "$CONFIG_MTD_PB1500" = "m" \
  15204. -o "$CONFIG_MTD_PB1100" = "y" -o "$CONFIG_MTD_PB1100" = "m" ]; then
  15205. bool ' Pb[15]00 boot flash device' CONFIG_MTD_PB1500_BOOT
  15206. bool ' Pb[15]00 user flash device (2nd 32MiB bank)' CONFIG_MTD_PB1500_USER
  15207. fi
  15208. + tristate ' Db1x00 MTD support' CONFIG_MTD_DB1X00
  15209. + if [ "$CONFIG_MTD_DB1X00" = "y" -o "$CONFIG_MTD_DB1X00" = "m" ]; then
  15210. + bool ' Db1x00 boot flash device' CONFIG_MTD_DB1X00_BOOT
  15211. + bool ' Db1x00 user flash device (2nd bank)' CONFIG_MTD_DB1X00_USER
  15212. + fi
  15213. + tristate ' Pb1550 MTD support' CONFIG_MTD_PB1550
  15214. + if [ "$CONFIG_MTD_PB1550" = "y" -o "$CONFIG_MTD_PB1550" = "m" ]; then
  15215. + bool ' Pb1550 Boot Flash' CONFIG_MTD_PB1550_BOOT
  15216. + bool ' Pb1550 User Parameter Flash' CONFIG_MTD_PB1550_USER
  15217. + fi
  15218. + dep_tristate ' Hydrogen 3 MTD support' CONFIG_MTD_HYDROGEN3 $CONFIG_MIPS_HYDROGEN3
  15219. + dep_tristate ' Mirage MTD support' CONFIG_MTD_MIRAGE $CONFIG_MIPS_MIRAGE
  15220. dep_tristate ' Flash chip mapping on ITE QED-4N-S01B, Globespan IVR or custom board' CONFIG_MTD_CSTM_MIPS_IXX $CONFIG_MTD_CFI $CONFIG_MTD_JEDEC $CONFIG_MTD_PARTITIONS
  15221. if [ "$CONFIG_MTD_CSTM_MIPS_IXX" = "y" -o "$CONFIG_MTD_CSTM_MIPS_IXX" = "m" ]; then
  15222. hex ' Physical start address of flash mapping' CONFIG_MTD_CSTM_MIPS_IXX_START 0x8000000
  15223. diff -Nur linux-2.4.32-rc1/drivers/mtd/maps/db1x00-flash.c linux-2.4.32-rc1.mips/drivers/mtd/maps/db1x00-flash.c
  15224. --- linux-2.4.32-rc1/drivers/mtd/maps/db1x00-flash.c 1970-01-01 01:00:00.000000000 +0100
  15225. +++ linux-2.4.32-rc1.mips/drivers/mtd/maps/db1x00-flash.c 2005-02-03 07:35:29.000000000 +0100
  15226. @@ -0,0 +1,283 @@
  15227. +/*
  15228. + * Flash memory access on Alchemy Db1xxx boards
  15229. + *
  15230. + * (C) 2003 Pete Popov <[email protected]>
  15231. + *
  15232. + */
  15233. +
  15234. +#include <linux/config.h>
  15235. +#include <linux/module.h>
  15236. +#include <linux/types.h>
  15237. +#include <linux/kernel.h>
  15238. +
  15239. +#include <linux/mtd/mtd.h>
  15240. +#include <linux/mtd/map.h>
  15241. +#include <linux/mtd/partitions.h>
  15242. +
  15243. +#include <asm/io.h>
  15244. +#include <asm/au1000.h>
  15245. +#include <asm/db1x00.h>
  15246. +
  15247. +#ifdef DEBUG_RW
  15248. +#define DBG(x...) printk(x)
  15249. +#else
  15250. +#define DBG(x...)
  15251. +#endif
  15252. +
  15253. +static unsigned long window_addr;
  15254. +static unsigned long window_size;
  15255. +static unsigned long flash_size;
  15256. +
  15257. +__u8 physmap_read8(struct map_info *map, unsigned long ofs)
  15258. +{
  15259. + __u8 ret;
  15260. + ret = __raw_readb(map->map_priv_1 + ofs);
  15261. + DBG("read8 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  15262. + return ret;
  15263. +}
  15264. +
  15265. +__u16 physmap_read16(struct map_info *map, unsigned long ofs)
  15266. +{
  15267. + __u16 ret;
  15268. + ret = __raw_readw(map->map_priv_1 + ofs);
  15269. + DBG("read16 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  15270. + return ret;
  15271. +}
  15272. +
  15273. +__u32 physmap_read32(struct map_info *map, unsigned long ofs)
  15274. +{
  15275. + __u32 ret;
  15276. + ret = __raw_readl(map->map_priv_1 + ofs);
  15277. + DBG("read32 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  15278. + return ret;
  15279. +}
  15280. +
  15281. +void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
  15282. +{
  15283. + DBG("physmap_copy from %x to %x\n", (unsigned)from, (unsigned)to);
  15284. + memcpy_fromio(to, map->map_priv_1 + from, len);
  15285. +}
  15286. +
  15287. +void physmap_write8(struct map_info *map, __u8 d, unsigned long adr)
  15288. +{
  15289. + DBG("write8 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  15290. + __raw_writeb(d, map->map_priv_1 + adr);
  15291. + mb();
  15292. +}
  15293. +
  15294. +void physmap_write16(struct map_info *map, __u16 d, unsigned long adr)
  15295. +{
  15296. + DBG("write16 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  15297. + __raw_writew(d, map->map_priv_1 + adr);
  15298. + mb();
  15299. +}
  15300. +
  15301. +void physmap_write32(struct map_info *map, __u32 d, unsigned long adr)
  15302. +{
  15303. + DBG("write32 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  15304. + __raw_writel(d, map->map_priv_1 + adr);
  15305. + mb();
  15306. +}
  15307. +
  15308. +void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
  15309. +{
  15310. + DBG("physmap_copy_to %x from %x\n", (unsigned)to, (unsigned)from);
  15311. + memcpy_toio(map->map_priv_1 + to, from, len);
  15312. +}
  15313. +
  15314. +static struct map_info db1x00_map = {
  15315. + name: "Db1x00 flash",
  15316. + read8: physmap_read8,
  15317. + read16: physmap_read16,
  15318. + read32: physmap_read32,
  15319. + copy_from: physmap_copy_from,
  15320. + write8: physmap_write8,
  15321. + write16: physmap_write16,
  15322. + write32: physmap_write32,
  15323. + copy_to: physmap_copy_to,
  15324. +};
  15325. +
  15326. +static unsigned char flash_buswidth = 4;
  15327. +
  15328. +/*
  15329. + * The Db1x boards support different flash densities. We setup
  15330. + * the mtd_partition structures below for default of 64Mbit
  15331. + * flash densities, and override the partitions sizes, if
  15332. + * necessary, after we check the board status register.
  15333. + */
  15334. +
  15335. +#ifdef DB1X00_BOTH_BANKS
  15336. +/* both banks will be used. Combine the first bank and the first
  15337. + * part of the second bank together into a single jffs/jffs2
  15338. + * partition.
  15339. + */
  15340. +static struct mtd_partition db1x00_partitions[] = {
  15341. + {
  15342. + name: "User FS",
  15343. + size: 0x1c00000,
  15344. + offset: 0x0000000
  15345. + },{
  15346. + name: "yamon",
  15347. + size: 0x0100000,
  15348. + offset: MTDPART_OFS_APPEND,
  15349. + mask_flags: MTD_WRITEABLE
  15350. + },{
  15351. + name: "raw kernel",
  15352. + size: (0x300000-0x40000), /* last 256KB is yamon env */
  15353. + offset: MTDPART_OFS_APPEND,
  15354. + }
  15355. +};
  15356. +#elif defined(DB1X00_BOOT_ONLY)
  15357. +static struct mtd_partition db1x00_partitions[] = {
  15358. + {
  15359. + name: "User FS",
  15360. + size: 0x00c00000,
  15361. + offset: 0x0000000
  15362. + },{
  15363. + name: "yamon",
  15364. + size: 0x0100000,
  15365. + offset: MTDPART_OFS_APPEND,
  15366. + mask_flags: MTD_WRITEABLE
  15367. + },{
  15368. + name: "raw kernel",
  15369. + size: (0x300000-0x40000), /* last 256KB is yamon env */
  15370. + offset: MTDPART_OFS_APPEND,
  15371. + }
  15372. +};
  15373. +#elif defined(DB1X00_USER_ONLY)
  15374. +static struct mtd_partition db1x00_partitions[] = {
  15375. + {
  15376. + name: "User FS",
  15377. + size: 0x0e00000,
  15378. + offset: 0x0000000
  15379. + },{
  15380. + name: "raw kernel",
  15381. + size: MTDPART_SIZ_FULL,
  15382. + offset: MTDPART_OFS_APPEND,
  15383. + }
  15384. +};
  15385. +#else
  15386. +#error MTD_DB1X00 define combo error /* should never happen */
  15387. +#endif
  15388. +
  15389. +
  15390. +#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
  15391. +
  15392. +static struct mtd_partition *parsed_parts;
  15393. +static struct mtd_info *mymtd;
  15394. +
  15395. +/*
  15396. + * Probe the flash density and setup window address and size
  15397. + * based on user CONFIG options. There are times when we don't
  15398. + * want the MTD driver to be probing the boot or user flash,
  15399. + * so having the option to enable only one bank is important.
  15400. + */
  15401. +int setup_flash_params()
  15402. +{
  15403. + switch ((bcsr->status >> 14) & 0x3) {
  15404. + case 0: /* 64Mbit devices */
  15405. + flash_size = 0x800000; /* 8MB per part */
  15406. +#if defined(DB1X00_BOTH_BANKS)
  15407. + window_addr = 0x1E000000;
  15408. + window_size = 0x2000000;
  15409. +#elif defined(DB1X00_BOOT_ONLY)
  15410. + window_addr = 0x1F000000;
  15411. + window_size = 0x1000000;
  15412. +#else /* USER ONLY */
  15413. + window_addr = 0x1E000000;
  15414. + window_size = 0x1000000;
  15415. +#endif
  15416. + break;
  15417. + case 1:
  15418. + /* 128 Mbit devices */
  15419. + flash_size = 0x1000000; /* 16MB per part */
  15420. +#if defined(DB1X00_BOTH_BANKS)
  15421. + window_addr = 0x1C000000;
  15422. + window_size = 0x4000000;
  15423. + /* USERFS from 0x1C00 0000 to 0x1FC0 0000 */
  15424. + db1x00_partitions[0].size = 0x3C00000;
  15425. +#elif defined(DB1X00_BOOT_ONLY)
  15426. + window_addr = 0x1E000000;
  15427. + window_size = 0x2000000;
  15428. + /* USERFS from 0x1E00 0000 to 0x1FC0 0000 */
  15429. + db1x00_partitions[0].size = 0x1C00000;
  15430. +#else /* USER ONLY */
  15431. + window_addr = 0x1C000000;
  15432. + window_size = 0x2000000;
  15433. + /* USERFS from 0x1C00 0000 to 0x1DE00000 */
  15434. + db1x00_partitions[0].size = 0x1DE0000;
  15435. +#endif
  15436. + break;
  15437. + case 2:
  15438. + /* 256 Mbit devices */
  15439. + flash_size = 0x4000000; /* 64MB per part */
  15440. +#if defined(DB1X00_BOTH_BANKS)
  15441. + return 1;
  15442. +#elif defined(DB1X00_BOOT_ONLY)
  15443. + /* Boot ROM flash bank only; no user bank */
  15444. + window_addr = 0x1C000000;
  15445. + window_size = 0x4000000;
  15446. + /* USERFS from 0x1C00 0000 to 0x1FC00000 */
  15447. + db1x00_partitions[0].size = 0x3C00000;
  15448. +#else /* USER ONLY */
  15449. + return 1;
  15450. +#endif
  15451. + break;
  15452. + default:
  15453. + return 1;
  15454. + }
  15455. + return 0;
  15456. +}
  15457. +
  15458. +int __init db1x00_mtd_init(void)
  15459. +{
  15460. + struct mtd_partition *parts;
  15461. + int nb_parts = 0;
  15462. + char *part_type;
  15463. +
  15464. + /* Default flash buswidth */
  15465. + db1x00_map.buswidth = flash_buswidth;
  15466. +
  15467. + if (setup_flash_params())
  15468. + return -ENXIO;
  15469. +
  15470. + /*
  15471. + * Static partition definition selection
  15472. + */
  15473. + part_type = "static";
  15474. + parts = db1x00_partitions;
  15475. + nb_parts = NB_OF(db1x00_partitions);
  15476. + db1x00_map.size = window_size;
  15477. +
  15478. + /*
  15479. + * Now let's probe for the actual flash. Do it here since
  15480. + * specific machine settings might have been set above.
  15481. + */
  15482. + printk(KERN_NOTICE "Db1xxx flash: probing %d-bit flash bus\n",
  15483. + db1x00_map.buswidth*8);
  15484. + db1x00_map.map_priv_1 =
  15485. + (unsigned long)ioremap(window_addr, window_size);
  15486. + mymtd = do_map_probe("cfi_probe", &db1x00_map);
  15487. + if (!mymtd) return -ENXIO;
  15488. + mymtd->module = THIS_MODULE;
  15489. +
  15490. + add_mtd_partitions(mymtd, parts, nb_parts);
  15491. + return 0;
  15492. +}
  15493. +
  15494. +static void __exit db1x00_mtd_cleanup(void)
  15495. +{
  15496. + if (mymtd) {
  15497. + del_mtd_partitions(mymtd);
  15498. + map_destroy(mymtd);
  15499. + if (parsed_parts)
  15500. + kfree(parsed_parts);
  15501. + }
  15502. +}
  15503. +
  15504. +module_init(db1x00_mtd_init);
  15505. +module_exit(db1x00_mtd_cleanup);
  15506. +
  15507. +MODULE_AUTHOR("Pete Popov");
  15508. +MODULE_DESCRIPTION("Db1x00 mtd map driver");
  15509. +MODULE_LICENSE("GPL");
  15510. diff -Nur linux-2.4.32-rc1/drivers/mtd/maps/hydrogen3-flash.c linux-2.4.32-rc1.mips/drivers/mtd/maps/hydrogen3-flash.c
  15511. --- linux-2.4.32-rc1/drivers/mtd/maps/hydrogen3-flash.c 1970-01-01 01:00:00.000000000 +0100
  15512. +++ linux-2.4.32-rc1.mips/drivers/mtd/maps/hydrogen3-flash.c 2004-01-10 23:40:18.000000000 +0100
  15513. @@ -0,0 +1,189 @@
  15514. +/*
  15515. + * Flash memory access on Alchemy HydrogenIII boards
  15516. + *
  15517. + * (C) 2003 Pete Popov <[email protected]>
  15518. + *
  15519. + */
  15520. +
  15521. +#include <linux/config.h>
  15522. +#include <linux/module.h>
  15523. +#include <linux/types.h>
  15524. +#include <linux/kernel.h>
  15525. +
  15526. +#include <linux/mtd/mtd.h>
  15527. +#include <linux/mtd/map.h>
  15528. +#include <linux/mtd/partitions.h>
  15529. +
  15530. +#include <asm/io.h>
  15531. +#include <asm/au1000.h>
  15532. +
  15533. +#ifdef DEBUG_RW
  15534. +#define DBG(x...) printk(x)
  15535. +#else
  15536. +#define DBG(x...)
  15537. +#endif
  15538. +
  15539. +#define WINDOW_ADDR 0x1E000000
  15540. +#define WINDOW_SIZE 0x02000000
  15541. +
  15542. +
  15543. +__u8 physmap_read8(struct map_info *map, unsigned long ofs)
  15544. +{
  15545. + __u8 ret;
  15546. + ret = __raw_readb(map->map_priv_1 + ofs);
  15547. + DBG("read8 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  15548. + return ret;
  15549. +}
  15550. +
  15551. +__u16 physmap_read16(struct map_info *map, unsigned long ofs)
  15552. +{
  15553. + __u16 ret;
  15554. + ret = __raw_readw(map->map_priv_1 + ofs);
  15555. + DBG("read16 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  15556. + return ret;
  15557. +}
  15558. +
  15559. +__u32 physmap_read32(struct map_info *map, unsigned long ofs)
  15560. +{
  15561. + __u32 ret;
  15562. + ret = __raw_readl(map->map_priv_1 + ofs);
  15563. + DBG("read32 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  15564. + return ret;
  15565. +}
  15566. +
  15567. +void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
  15568. +{
  15569. + DBG("physmap_copy from %x to %x\n", (unsigned)from, (unsigned)to);
  15570. + memcpy_fromio(to, map->map_priv_1 + from, len);
  15571. +}
  15572. +
  15573. +void physmap_write8(struct map_info *map, __u8 d, unsigned long adr)
  15574. +{
  15575. + DBG("write8 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  15576. + __raw_writeb(d, map->map_priv_1 + adr);
  15577. + mb();
  15578. +}
  15579. +
  15580. +void physmap_write16(struct map_info *map, __u16 d, unsigned long adr)
  15581. +{
  15582. + DBG("write16 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  15583. + __raw_writew(d, map->map_priv_1 + adr);
  15584. + mb();
  15585. +}
  15586. +
  15587. +void physmap_write32(struct map_info *map, __u32 d, unsigned long adr)
  15588. +{
  15589. + DBG("write32 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  15590. + __raw_writel(d, map->map_priv_1 + adr);
  15591. + mb();
  15592. +}
  15593. +
  15594. +void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
  15595. +{
  15596. + DBG("physmap_copy_to %x from %x\n", (unsigned)to, (unsigned)from);
  15597. + memcpy_toio(map->map_priv_1 + to, from, len);
  15598. +}
  15599. +
  15600. +static struct map_info hydrogen3_map = {
  15601. + name: "HydrogenIII flash",
  15602. + read8: physmap_read8,
  15603. + read16: physmap_read16,
  15604. + read32: physmap_read32,
  15605. + copy_from: physmap_copy_from,
  15606. + write8: physmap_write8,
  15607. + write16: physmap_write16,
  15608. + write32: physmap_write32,
  15609. + copy_to: physmap_copy_to,
  15610. +};
  15611. +
  15612. +static unsigned char flash_buswidth = 4;
  15613. +
  15614. +/* MTDPART_OFS_APPEND is vastly preferred to any attempt at statically lining
  15615. + * up the offsets. */
  15616. +static struct mtd_partition hydrogen3_partitions[] = {
  15617. + {
  15618. + name: "User FS",
  15619. + size: 0x1c00000,
  15620. + offset: 0x0000000
  15621. + },{
  15622. + name: "yamon",
  15623. + size: 0x0100000,
  15624. + offset: MTDPART_OFS_APPEND,
  15625. + mask_flags: MTD_WRITEABLE
  15626. + },{
  15627. + name: "raw kernel",
  15628. + size: 0x02c0000,
  15629. + offset: MTDPART_OFS_APPEND
  15630. + }
  15631. +};
  15632. +
  15633. +#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
  15634. +
  15635. +static struct mtd_partition *parsed_parts;
  15636. +static struct mtd_info *mymtd;
  15637. +
  15638. +int __init hydrogen3_mtd_init(void)
  15639. +{
  15640. + struct mtd_partition *parts;
  15641. + int nb_parts = 0;
  15642. + char *part_type;
  15643. +
  15644. + /* Default flash buswidth */
  15645. + hydrogen3_map.buswidth = flash_buswidth;
  15646. +
  15647. + /*
  15648. + * Static partition definition selection
  15649. + */
  15650. + part_type = "static";
  15651. + parts = hydrogen3_partitions;
  15652. + nb_parts = NB_OF(hydrogen3_partitions);
  15653. + hydrogen3_map.size = WINDOW_SIZE;
  15654. +
  15655. + /*
  15656. + * Now let's probe for the actual flash. Do it here since
  15657. + * specific machine settings might have been set above.
  15658. + */
  15659. + printk(KERN_NOTICE "HydrogenIII flash: probing %d-bit flash bus\n",
  15660. + hydrogen3_map.buswidth*8);
  15661. + hydrogen3_map.map_priv_1 =
  15662. + (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
  15663. + mymtd = do_map_probe("cfi_probe", &hydrogen3_map);
  15664. + if (!mymtd) return -ENXIO;
  15665. + mymtd->module = THIS_MODULE;
  15666. +
  15667. + add_mtd_partitions(mymtd, parts, nb_parts);
  15668. + return 0;
  15669. +}
  15670. +
  15671. +static void __exit hydrogen3_mtd_cleanup(void)
  15672. +{
  15673. + if (mymtd) {
  15674. + del_mtd_partitions(mymtd);
  15675. + map_destroy(mymtd);
  15676. + if (parsed_parts)
  15677. + kfree(parsed_parts);
  15678. + }
  15679. +}
  15680. +
  15681. +/*#ifndef MODULE
  15682. +
  15683. +static int __init _bootflashonly(char *str)
  15684. +{
  15685. + bootflashonly = simple_strtol(str, NULL, 0);
  15686. + return 1;
  15687. +}
  15688. +
  15689. +
  15690. +__setup("bootflashonly=", _bootflashonly);
  15691. +
  15692. +#endif*/
  15693. +
  15694. +
  15695. +module_init(hydrogen3_mtd_init);
  15696. +module_exit(hydrogen3_mtd_cleanup);
  15697. +
  15698. +MODULE_PARM(bootflashonly, "i");
  15699. +MODULE_PARM_DESC(bootflashonly, "1=use \"boot flash only\"");
  15700. +MODULE_AUTHOR("Pete Popov");
  15701. +MODULE_DESCRIPTION("HydrogenIII mtd map driver");
  15702. +MODULE_LICENSE("GPL");
  15703. diff -Nur linux-2.4.32-rc1/drivers/mtd/maps/lasat.c linux-2.4.32-rc1.mips/drivers/mtd/maps/lasat.c
  15704. --- linux-2.4.32-rc1/drivers/mtd/maps/lasat.c 2003-06-13 16:51:34.000000000 +0200
  15705. +++ linux-2.4.32-rc1.mips/drivers/mtd/maps/lasat.c 2003-08-18 04:59:02.000000000 +0200
  15706. @@ -1,15 +1,6 @@
  15707. /*
  15708. * Flash device on lasat 100 and 200 boards
  15709. *
  15710. - * Presumably (C) 2002 Brian Murphy <[email protected]> or whoever he
  15711. - * works for.
  15712. - *
  15713. - * This program is free software; you can redistribute it and/or
  15714. - * modify it under the terms of the GNU General Public License version
  15715. - * 2 as published by the Free Software Foundation.
  15716. - *
  15717. - * $Id: lasat.c,v 1.1 2003/01/24 14:26:38 dwmw2 Exp $
  15718. - *
  15719. */
  15720. #include <linux/module.h>
  15721. @@ -21,7 +12,6 @@
  15722. #include <linux/mtd/partitions.h>
  15723. #include <linux/config.h>
  15724. #include <asm/lasat/lasat.h>
  15725. -#include <asm/lasat/lasat_mtd.h>
  15726. static struct mtd_info *mymtd;
  15727. @@ -69,30 +59,33 @@
  15728. }
  15729. static struct map_info sp_map = {
  15730. - .name = "SP flash",
  15731. - .buswidth = 4,
  15732. - .read8 = sp_read8,
  15733. - .read16 = sp_read16,
  15734. - .read32 = sp_read32,
  15735. - .copy_from = sp_copy_from,
  15736. - .write8 = sp_write8,
  15737. - .write16 = sp_write16,
  15738. - .write32 = sp_write32,
  15739. - .copy_to = sp_copy_to
  15740. + name: "SP flash",
  15741. + buswidth: 4,
  15742. + read8: sp_read8,
  15743. + read16: sp_read16,
  15744. + read32: sp_read32,
  15745. + copy_from: sp_copy_from,
  15746. + write8: sp_write8,
  15747. + write16: sp_write16,
  15748. + write32: sp_write32,
  15749. + copy_to: sp_copy_to
  15750. };
  15751. static struct mtd_partition partition_info[LASAT_MTD_LAST];
  15752. -static char *lasat_mtd_partnames[] = {"Bootloader", "Service", "Normal", "Filesystem", "Config"};
  15753. +static char *lasat_mtd_partnames[] = {"Bootloader", "Service", "Normal", "Config", "Filesystem"};
  15754. static int __init init_sp(void)
  15755. {
  15756. int i;
  15757. + int nparts = 0;
  15758. /* this does not play well with the old flash code which
  15759. * protects and uprotects the flash when necessary */
  15760. printk(KERN_NOTICE "Unprotecting flash\n");
  15761. *lasat_misc->flash_wp_reg |= 1 << lasat_misc->flash_wp_bit;
  15762. - sp_map.map_priv_1 = lasat_flash_partition_start(LASAT_MTD_BOOTLOADER);
  15763. + sp_map.map_priv_1 = ioremap_nocache(
  15764. + lasat_flash_partition_start(LASAT_MTD_BOOTLOADER),
  15765. + lasat_board_info.li_flash_size);
  15766. sp_map.size = lasat_board_info.li_flash_size;
  15767. printk(KERN_NOTICE "sp flash device: %lx at %lx\n",
  15768. @@ -109,12 +102,15 @@
  15769. for (i=0; i < LASAT_MTD_LAST; i++) {
  15770. size = lasat_flash_partition_size(i);
  15771. - partition_info[i].size = size;
  15772. - partition_info[i].offset = offset;
  15773. - offset += size;
  15774. + if (size != 0) {
  15775. + nparts++;
  15776. + partition_info[i].size = size;
  15777. + partition_info[i].offset = offset;
  15778. + offset += size;
  15779. + }
  15780. }
  15781. - add_mtd_partitions( mymtd, partition_info, LASAT_MTD_LAST );
  15782. + add_mtd_partitions( mymtd, partition_info, nparts );
  15783. return 0;
  15784. }
  15785. @@ -124,11 +120,11 @@
  15786. static void __exit cleanup_sp(void)
  15787. {
  15788. if (mymtd) {
  15789. - del_mtd_partitions(mymtd);
  15790. - map_destroy(mymtd);
  15791. + del_mtd_partitions(mymtd);
  15792. + map_destroy(mymtd);
  15793. }
  15794. if (sp_map.map_priv_1) {
  15795. - sp_map.map_priv_1 = 0;
  15796. + sp_map.map_priv_1 = 0;
  15797. }
  15798. }
  15799. diff -Nur linux-2.4.32-rc1/drivers/mtd/maps/Makefile linux-2.4.32-rc1.mips/drivers/mtd/maps/Makefile
  15800. --- linux-2.4.32-rc1/drivers/mtd/maps/Makefile 2003-06-13 16:51:34.000000000 +0200
  15801. +++ linux-2.4.32-rc1.mips/drivers/mtd/maps/Makefile 2004-02-26 01:46:35.000000000 +0100
  15802. @@ -52,7 +52,13 @@
  15803. obj-$(CONFIG_MTD_PB1000) += pb1xxx-flash.o
  15804. obj-$(CONFIG_MTD_PB1100) += pb1xxx-flash.o
  15805. obj-$(CONFIG_MTD_PB1500) += pb1xxx-flash.o
  15806. +obj-$(CONFIG_MTD_XXS1500) += xxs1500.o
  15807. +obj-$(CONFIG_MTD_MTX1) += mtx-1.o
  15808. obj-$(CONFIG_MTD_LASAT) += lasat.o
  15809. +obj-$(CONFIG_MTD_DB1X00) += db1x00-flash.o
  15810. +obj-$(CONFIG_MTD_PB1550) += pb1550-flash.o
  15811. +obj-$(CONFIG_MTD_HYDROGEN3) += hydrogen3-flash.o
  15812. +obj-$(CONFIG_MTD_BOSPORUS) += pb1xxx-flash.o
  15813. obj-$(CONFIG_MTD_AUTCPU12) += autcpu12-nvram.o
  15814. obj-$(CONFIG_MTD_EDB7312) += edb7312.o
  15815. obj-$(CONFIG_MTD_IMPA7) += impa7.o
  15816. @@ -61,5 +67,6 @@
  15817. obj-$(CONFIG_MTD_UCLINUX) += uclinux.o
  15818. obj-$(CONFIG_MTD_NETtel) += nettel.o
  15819. obj-$(CONFIG_MTD_SCB2_FLASH) += scb2_flash.o
  15820. +obj-$(CONFIG_MTD_MIRAGE) += mirage-flash.o
  15821. include $(TOPDIR)/Rules.make
  15822. diff -Nur linux-2.4.32-rc1/drivers/mtd/maps/mirage-flash.c linux-2.4.32-rc1.mips/drivers/mtd/maps/mirage-flash.c
  15823. --- linux-2.4.32-rc1/drivers/mtd/maps/mirage-flash.c 1970-01-01 01:00:00.000000000 +0100
  15824. +++ linux-2.4.32-rc1.mips/drivers/mtd/maps/mirage-flash.c 2003-12-22 04:37:22.000000000 +0100
  15825. @@ -0,0 +1,194 @@
  15826. +/*
  15827. + * Flash memory access on AMD Mirage board.
  15828. + *
  15829. + * (C) 2003 Embedded Edge
  15830. + * based on mirage-flash.c:
  15831. + * (C) 2003 Pete Popov <[email protected]>
  15832. + *
  15833. + */
  15834. +
  15835. +#include <linux/config.h>
  15836. +#include <linux/module.h>
  15837. +#include <linux/types.h>
  15838. +#include <linux/kernel.h>
  15839. +
  15840. +#include <linux/mtd/mtd.h>
  15841. +#include <linux/mtd/map.h>
  15842. +#include <linux/mtd/partitions.h>
  15843. +
  15844. +#include <asm/io.h>
  15845. +#include <asm/au1000.h>
  15846. +//#include <asm/mirage.h>
  15847. +
  15848. +#ifdef DEBUG_RW
  15849. +#define DBG(x...) printk(x)
  15850. +#else
  15851. +#define DBG(x...)
  15852. +#endif
  15853. +
  15854. +static unsigned long window_addr;
  15855. +static unsigned long window_size;
  15856. +static unsigned long flash_size;
  15857. +
  15858. +__u8 physmap_read8(struct map_info *map, unsigned long ofs)
  15859. +{
  15860. + __u8 ret;
  15861. + ret = __raw_readb(map->map_priv_1 + ofs);
  15862. + DBG("read8 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  15863. + return ret;
  15864. +}
  15865. +
  15866. +__u16 physmap_read16(struct map_info *map, unsigned long ofs)
  15867. +{
  15868. + __u16 ret;
  15869. + ret = __raw_readw(map->map_priv_1 + ofs);
  15870. + DBG("read16 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  15871. + return ret;
  15872. +}
  15873. +
  15874. +__u32 physmap_read32(struct map_info *map, unsigned long ofs)
  15875. +{
  15876. + __u32 ret;
  15877. + ret = __raw_readl(map->map_priv_1 + ofs);
  15878. + DBG("read32 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  15879. + return ret;
  15880. +}
  15881. +
  15882. +void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
  15883. +{
  15884. + DBG("physmap_copy from %x to %x\n", (unsigned)from, (unsigned)to);
  15885. + memcpy_fromio(to, map->map_priv_1 + from, len);
  15886. +}
  15887. +
  15888. +void physmap_write8(struct map_info *map, __u8 d, unsigned long adr)
  15889. +{
  15890. + DBG("write8 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  15891. + __raw_writeb(d, map->map_priv_1 + adr);
  15892. + mb();
  15893. +}
  15894. +
  15895. +void physmap_write16(struct map_info *map, __u16 d, unsigned long adr)
  15896. +{
  15897. + DBG("write16 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  15898. + __raw_writew(d, map->map_priv_1 + adr);
  15899. + mb();
  15900. +}
  15901. +
  15902. +void physmap_write32(struct map_info *map, __u32 d, unsigned long adr)
  15903. +{
  15904. + DBG("write32 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  15905. + __raw_writel(d, map->map_priv_1 + adr);
  15906. + mb();
  15907. +}
  15908. +
  15909. +void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
  15910. +{
  15911. + DBG("physmap_copy_to %x from %x\n", (unsigned)to, (unsigned)from);
  15912. + memcpy_toio(map->map_priv_1 + to, from, len);
  15913. +}
  15914. +
  15915. +static struct map_info mirage_map = {
  15916. + name: "Mirage flash",
  15917. + read8: physmap_read8,
  15918. + read16: physmap_read16,
  15919. + read32: physmap_read32,
  15920. + copy_from: physmap_copy_from,
  15921. + write8: physmap_write8,
  15922. + write16: physmap_write16,
  15923. + write32: physmap_write32,
  15924. + copy_to: physmap_copy_to,
  15925. +};
  15926. +
  15927. +static unsigned char flash_buswidth = 4;
  15928. +
  15929. +static struct mtd_partition mirage_partitions[] = {
  15930. + {
  15931. + name: "User FS",
  15932. + size: 0x1c00000,
  15933. + offset: 0x0000000
  15934. + },{
  15935. + name: "yamon",
  15936. + size: 0x0100000,
  15937. + offset: MTDPART_OFS_APPEND,
  15938. + mask_flags: MTD_WRITEABLE
  15939. + },{
  15940. + name: "raw kernel",
  15941. + size: (0x300000-0x40000), /* last 256KB is yamon env */
  15942. + offset: MTDPART_OFS_APPEND,
  15943. + }
  15944. +};
  15945. +
  15946. +#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
  15947. +
  15948. +static struct mtd_partition *parsed_parts;
  15949. +static struct mtd_info *mymtd;
  15950. +
  15951. +/*
  15952. + * Probe the flash density and setup window address and size
  15953. + * based on user CONFIG options. There are times when we don't
  15954. + * want the MTD driver to be probing the boot or user flash,
  15955. + * so having the option to enable only one bank is important.
  15956. + */
  15957. +int setup_flash_params()
  15958. +{
  15959. + flash_size = 0x4000000; /* 64MB per part */
  15960. + /* Boot ROM flash bank only; no user bank */
  15961. + window_addr = 0x1C000000;
  15962. + window_size = 0x4000000;
  15963. + /* USERFS from 0x1C00 0000 to 0x1FC00000 */
  15964. + mirage_partitions[0].size = 0x3C00000;
  15965. + return 0;
  15966. +}
  15967. +
  15968. +int __init mirage_mtd_init(void)
  15969. +{
  15970. + struct mtd_partition *parts;
  15971. + int nb_parts = 0;
  15972. + char *part_type;
  15973. +
  15974. + /* Default flash buswidth */
  15975. + mirage_map.buswidth = flash_buswidth;
  15976. +
  15977. + if (setup_flash_params())
  15978. + return -ENXIO;
  15979. +
  15980. + /*
  15981. + * Static partition definition selection
  15982. + */
  15983. + part_type = "static";
  15984. + parts = mirage_partitions;
  15985. + nb_parts = NB_OF(mirage_partitions);
  15986. + mirage_map.size = window_size;
  15987. +
  15988. + /*
  15989. + * Now let's probe for the actual flash. Do it here since
  15990. + * specific machine settings might have been set above.
  15991. + */
  15992. + printk(KERN_NOTICE "Mirage flash: probing %d-bit flash bus\n",
  15993. + mirage_map.buswidth*8);
  15994. + mirage_map.map_priv_1 =
  15995. + (unsigned long)ioremap(window_addr, window_size);
  15996. + mymtd = do_map_probe("cfi_probe", &mirage_map);
  15997. + if (!mymtd) return -ENXIO;
  15998. + mymtd->module = THIS_MODULE;
  15999. +
  16000. + add_mtd_partitions(mymtd, parts, nb_parts);
  16001. + return 0;
  16002. +}
  16003. +
  16004. +static void __exit mirage_mtd_cleanup(void)
  16005. +{
  16006. + if (mymtd) {
  16007. + del_mtd_partitions(mymtd);
  16008. + map_destroy(mymtd);
  16009. + if (parsed_parts)
  16010. + kfree(parsed_parts);
  16011. + }
  16012. +}
  16013. +
  16014. +module_init(mirage_mtd_init);
  16015. +module_exit(mirage_mtd_cleanup);
  16016. +
  16017. +MODULE_AUTHOR("Embedded Edge");
  16018. +MODULE_DESCRIPTION("Mirage mtd map driver");
  16019. +MODULE_LICENSE("GPL");
  16020. diff -Nur linux-2.4.32-rc1/drivers/mtd/maps/mtx-1.c linux-2.4.32-rc1.mips/drivers/mtd/maps/mtx-1.c
  16021. --- linux-2.4.32-rc1/drivers/mtd/maps/mtx-1.c 1970-01-01 01:00:00.000000000 +0100
  16022. +++ linux-2.4.32-rc1.mips/drivers/mtd/maps/mtx-1.c 2003-06-27 02:04:35.000000000 +0200
  16023. @@ -0,0 +1,181 @@
  16024. +/*
  16025. + * Flash memory access on 4G Systems MTX-1 board
  16026. + *
  16027. + * (C) 2003 Pete Popov <[email protected]>
  16028. + * Bruno Randolf <[email protected]>
  16029. + */
  16030. +
  16031. +#include <linux/config.h>
  16032. +#include <linux/module.h>
  16033. +#include <linux/types.h>
  16034. +#include <linux/kernel.h>
  16035. +
  16036. +#include <linux/mtd/mtd.h>
  16037. +#include <linux/mtd/map.h>
  16038. +#include <linux/mtd/partitions.h>
  16039. +
  16040. +#include <asm/io.h>
  16041. +#include <asm/au1000.h>
  16042. +
  16043. +#ifdef DEBUG_RW
  16044. +#define DBG(x...) printk(x)
  16045. +#else
  16046. +#define DBG(x...)
  16047. +#endif
  16048. +
  16049. +#ifdef CONFIG_MIPS_MTX1
  16050. +#define WINDOW_ADDR 0x1E000000
  16051. +#define WINDOW_SIZE 0x2000000
  16052. +#endif
  16053. +
  16054. +__u8 physmap_read8(struct map_info *map, unsigned long ofs)
  16055. +{
  16056. + __u8 ret;
  16057. + ret = __raw_readb(map->map_priv_1 + ofs);
  16058. + DBG("read8 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  16059. + return ret;
  16060. +}
  16061. +
  16062. +__u16 physmap_read16(struct map_info *map, unsigned long ofs)
  16063. +{
  16064. + __u16 ret;
  16065. + ret = __raw_readw(map->map_priv_1 + ofs);
  16066. + DBG("read16 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  16067. + return ret;
  16068. +}
  16069. +
  16070. +__u32 physmap_read32(struct map_info *map, unsigned long ofs)
  16071. +{
  16072. + __u32 ret;
  16073. + ret = __raw_readl(map->map_priv_1 + ofs);
  16074. + DBG("read32 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  16075. + return ret;
  16076. +}
  16077. +
  16078. +void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
  16079. +{
  16080. + DBG("physmap_copy from %x to %x\n", (unsigned)from, (unsigned)to);
  16081. + memcpy_fromio(to, map->map_priv_1 + from, len);
  16082. +}
  16083. +
  16084. +void physmap_write8(struct map_info *map, __u8 d, unsigned long adr)
  16085. +{
  16086. + DBG("write8 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  16087. + __raw_writeb(d, map->map_priv_1 + adr);
  16088. + mb();
  16089. +}
  16090. +
  16091. +void physmap_write16(struct map_info *map, __u16 d, unsigned long adr)
  16092. +{
  16093. + DBG("write16 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  16094. + __raw_writew(d, map->map_priv_1 + adr);
  16095. + mb();
  16096. +}
  16097. +
  16098. +void physmap_write32(struct map_info *map, __u32 d, unsigned long adr)
  16099. +{
  16100. + DBG("write32 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  16101. + __raw_writel(d, map->map_priv_1 + adr);
  16102. + mb();
  16103. +}
  16104. +
  16105. +void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
  16106. +{
  16107. + DBG("physmap_copy_to %x from %x\n", (unsigned)to, (unsigned)from);
  16108. + memcpy_toio(map->map_priv_1 + to, from, len);
  16109. +}
  16110. +
  16111. +
  16112. +
  16113. +static struct map_info mtx1_map = {
  16114. + name: "MTX-1 flash",
  16115. + read8: physmap_read8,
  16116. + read16: physmap_read16,
  16117. + read32: physmap_read32,
  16118. + copy_from: physmap_copy_from,
  16119. + write8: physmap_write8,
  16120. + write16: physmap_write16,
  16121. + write32: physmap_write32,
  16122. + copy_to: physmap_copy_to,
  16123. +};
  16124. +
  16125. +
  16126. +static unsigned long flash_size = 0x01000000;
  16127. +static unsigned char flash_buswidth = 4;
  16128. +static struct mtd_partition mtx1_partitions[] = {
  16129. + {
  16130. + name: "user fs",
  16131. + size: 0x1c00000,
  16132. + offset: 0,
  16133. + },{
  16134. + name: "yamon",
  16135. + size: 0x0100000,
  16136. + offset: MTDPART_OFS_APPEND,
  16137. + mask_flags: MTD_WRITEABLE
  16138. + },{
  16139. + name: "raw kernel",
  16140. + size: 0x02c0000,
  16141. + offset: MTDPART_OFS_APPEND,
  16142. + },{
  16143. + name: "yamon env vars",
  16144. + size: 0x0040000,
  16145. + offset: MTDPART_OFS_APPEND,
  16146. + mask_flags: MTD_WRITEABLE
  16147. + }
  16148. +};
  16149. +
  16150. +
  16151. +#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
  16152. +
  16153. +static struct mtd_partition *parsed_parts;
  16154. +static struct mtd_info *mymtd;
  16155. +
  16156. +int __init mtx1_mtd_init(void)
  16157. +{
  16158. + struct mtd_partition *parts;
  16159. + int nb_parts = 0;
  16160. + char *part_type;
  16161. +
  16162. + /* Default flash buswidth */
  16163. + mtx1_map.buswidth = flash_buswidth;
  16164. +
  16165. + /*
  16166. + * Static partition definition selection
  16167. + */
  16168. + part_type = "static";
  16169. + parts = mtx1_partitions;
  16170. + nb_parts = NB_OF(mtx1_partitions);
  16171. + mtx1_map.size = flash_size;
  16172. +
  16173. + /*
  16174. + * Now let's probe for the actual flash. Do it here since
  16175. + * specific machine settings might have been set above.
  16176. + */
  16177. + printk(KERN_NOTICE "MTX-1 flash: probing %d-bit flash bus\n",
  16178. + mtx1_map.buswidth*8);
  16179. + mtx1_map.map_priv_1 =
  16180. + (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
  16181. + mymtd = do_map_probe("cfi_probe", &mtx1_map);
  16182. + if (!mymtd) return -ENXIO;
  16183. + mymtd->module = THIS_MODULE;
  16184. +
  16185. + add_mtd_partitions(mymtd, parts, nb_parts);
  16186. + return 0;
  16187. +}
  16188. +
  16189. +static void __exit mtx1_mtd_cleanup(void)
  16190. +{
  16191. + if (mymtd) {
  16192. + del_mtd_partitions(mymtd);
  16193. + map_destroy(mymtd);
  16194. + if (parsed_parts)
  16195. + kfree(parsed_parts);
  16196. + }
  16197. +}
  16198. +
  16199. +module_init(mtx1_mtd_init);
  16200. +module_exit(mtx1_mtd_cleanup);
  16201. +
  16202. +MODULE_AUTHOR("Pete Popov");
  16203. +MODULE_DESCRIPTION("MTX-1 CFI map driver");
  16204. +MODULE_LICENSE("GPL");
  16205. diff -Nur linux-2.4.32-rc1/drivers/mtd/maps/pb1550-flash.c linux-2.4.32-rc1.mips/drivers/mtd/maps/pb1550-flash.c
  16206. --- linux-2.4.32-rc1/drivers/mtd/maps/pb1550-flash.c 1970-01-01 01:00:00.000000000 +0100
  16207. +++ linux-2.4.32-rc1.mips/drivers/mtd/maps/pb1550-flash.c 2004-02-26 01:48:48.000000000 +0100
  16208. @@ -0,0 +1,270 @@
  16209. +/*
  16210. + * Flash memory access on Alchemy Pb1550 board
  16211. + *
  16212. + * (C) 2004 Embedded Edge, LLC, based on pb1550-flash.c:
  16213. + * (C) 2003 Pete Popov <[email protected]>
  16214. + *
  16215. + */
  16216. +
  16217. +#include <linux/config.h>
  16218. +#include <linux/module.h>
  16219. +#include <linux/types.h>
  16220. +#include <linux/kernel.h>
  16221. +
  16222. +#include <linux/mtd/mtd.h>
  16223. +#include <linux/mtd/map.h>
  16224. +#include <linux/mtd/partitions.h>
  16225. +
  16226. +#include <asm/io.h>
  16227. +#include <asm/au1000.h>
  16228. +#include <asm/pb1550.h>
  16229. +
  16230. +#ifdef DEBUG_RW
  16231. +#define DBG(x...) printk(x)
  16232. +#else
  16233. +#define DBG(x...)
  16234. +#endif
  16235. +
  16236. +static unsigned long window_addr;
  16237. +static unsigned long window_size;
  16238. +
  16239. +__u8 physmap_read8(struct map_info *map, unsigned long ofs)
  16240. +{
  16241. + __u8 ret;
  16242. + ret = __raw_readb(map->map_priv_1 + ofs);
  16243. + DBG("read8 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  16244. + return ret;
  16245. +}
  16246. +
  16247. +__u16 physmap_read16(struct map_info *map, unsigned long ofs)
  16248. +{
  16249. + __u16 ret;
  16250. + ret = __raw_readw(map->map_priv_1 + ofs);
  16251. + DBG("read16 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  16252. + return ret;
  16253. +}
  16254. +
  16255. +__u32 physmap_read32(struct map_info *map, unsigned long ofs)
  16256. +{
  16257. + __u32 ret;
  16258. + ret = __raw_readl(map->map_priv_1 + ofs);
  16259. + DBG("read32 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  16260. + return ret;
  16261. +}
  16262. +
  16263. +void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
  16264. +{
  16265. + DBG("physmap_copy from %x to %x\n", (unsigned)from, (unsigned)to);
  16266. + memcpy_fromio(to, map->map_priv_1 + from, len);
  16267. +}
  16268. +
  16269. +void physmap_write8(struct map_info *map, __u8 d, unsigned long adr)
  16270. +{
  16271. + DBG("write8 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  16272. + __raw_writeb(d, map->map_priv_1 + adr);
  16273. + mb();
  16274. +}
  16275. +
  16276. +void physmap_write16(struct map_info *map, __u16 d, unsigned long adr)
  16277. +{
  16278. + DBG("write16 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  16279. + __raw_writew(d, map->map_priv_1 + adr);
  16280. + mb();
  16281. +}
  16282. +
  16283. +void physmap_write32(struct map_info *map, __u32 d, unsigned long adr)
  16284. +{
  16285. + DBG("write32 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  16286. + __raw_writel(d, map->map_priv_1 + adr);
  16287. + mb();
  16288. +}
  16289. +
  16290. +void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
  16291. +{
  16292. + DBG("physmap_copy_to %x from %x\n", (unsigned)to, (unsigned)from);
  16293. + memcpy_toio(map->map_priv_1 + to, from, len);
  16294. +}
  16295. +
  16296. +static struct map_info pb1550_map = {
  16297. + name: "Pb1550 flash",
  16298. + read8: physmap_read8,
  16299. + read16: physmap_read16,
  16300. + read32: physmap_read32,
  16301. + copy_from: physmap_copy_from,
  16302. + write8: physmap_write8,
  16303. + write16: physmap_write16,
  16304. + write32: physmap_write32,
  16305. + copy_to: physmap_copy_to,
  16306. +};
  16307. +
  16308. +static unsigned char flash_buswidth = 4;
  16309. +
  16310. +/*
  16311. + * Support only 64MB NOR Flash parts
  16312. + */
  16313. +
  16314. +#ifdef PB1550_BOTH_BANKS
  16315. +/* both banks will be used. Combine the first bank and the first
  16316. + * part of the second bank together into a single jffs/jffs2
  16317. + * partition.
  16318. + */
  16319. +static struct mtd_partition pb1550_partitions[] = {
  16320. + /* assume boot[2:0]:swap is '0000' or '1000', which translates to:
  16321. + * 1C00 0000 1FFF FFFF CE0 64MB Boot NOR Flash
  16322. + * 1800 0000 1BFF FFFF CE0 64MB Param NOR Flash
  16323. + */
  16324. + {
  16325. + name: "User FS",
  16326. + size: (0x1FC00000 - 0x18000000),
  16327. + offset: 0x0000000
  16328. + },{
  16329. + name: "yamon",
  16330. + size: 0x0100000,
  16331. + offset: MTDPART_OFS_APPEND,
  16332. + mask_flags: MTD_WRITEABLE
  16333. + },{
  16334. + name: "raw kernel",
  16335. + size: (0x300000 - 0x40000), /* last 256KB is yamon env */
  16336. + offset: MTDPART_OFS_APPEND,
  16337. + }
  16338. +};
  16339. +#elif defined(PB1550_BOOT_ONLY)
  16340. +static struct mtd_partition pb1550_partitions[] = {
  16341. + /* assume boot[2:0]:swap is '0000' or '1000', which translates to:
  16342. + * 1C00 0000 1FFF FFFF CE0 64MB Boot NOR Flash
  16343. + */
  16344. + {
  16345. + name: "User FS",
  16346. + size: 0x03c00000,
  16347. + offset: 0x0000000
  16348. + },{
  16349. + name: "yamon",
  16350. + size: 0x0100000,
  16351. + offset: MTDPART_OFS_APPEND,
  16352. + mask_flags: MTD_WRITEABLE
  16353. + },{
  16354. + name: "raw kernel",
  16355. + size: (0x300000-0x40000), /* last 256KB is yamon env */
  16356. + offset: MTDPART_OFS_APPEND,
  16357. + }
  16358. +};
  16359. +#elif defined(PB1550_USER_ONLY)
  16360. +static struct mtd_partition pb1550_partitions[] = {
  16361. + /* assume boot[2:0]:swap is '0000' or '1000', which translates to:
  16362. + * 1800 0000 1BFF FFFF CE0 64MB Param NOR Flash
  16363. + */
  16364. + {
  16365. + name: "User FS",
  16366. + size: (0x4000000 - 0x200000), /* reserve 2MB for raw kernel */
  16367. + offset: 0x0000000
  16368. + },{
  16369. + name: "raw kernel",
  16370. + size: MTDPART_SIZ_FULL,
  16371. + offset: MTDPART_OFS_APPEND,
  16372. + }
  16373. +};
  16374. +#else
  16375. +#error MTD_PB1550 define combo error /* should never happen */
  16376. +#endif
  16377. +
  16378. +#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
  16379. +
  16380. +static struct mtd_partition *parsed_parts;
  16381. +static struct mtd_info *mymtd;
  16382. +
  16383. +/*
  16384. + * Probe the flash density and setup window address and size
  16385. + * based on user CONFIG options. There are times when we don't
  16386. + * want the MTD driver to be probing the boot or user flash,
  16387. + * so having the option to enable only one bank is important.
  16388. + */
  16389. +int setup_flash_params()
  16390. +{
  16391. + u16 boot_swapboot;
  16392. + boot_swapboot = (au_readl(MEM_STSTAT) & (0x7<<1)) |
  16393. + ((bcsr->status >> 6) & 0x1);
  16394. + printk("Pb1550 MTD: boot:swap %d\n", boot_swapboot);
  16395. +
  16396. + switch (boot_swapboot) {
  16397. + case 0: /* 512Mbit devices, both enabled */
  16398. + case 1:
  16399. + case 8:
  16400. + case 9:
  16401. +#if defined(PB1550_BOTH_BANKS)
  16402. + window_addr = 0x18000000;
  16403. + window_size = 0x8000000;
  16404. +#elif defined(PB1550_BOOT_ONLY)
  16405. + window_addr = 0x1C000000;
  16406. + window_size = 0x4000000;
  16407. +#else /* USER ONLY */
  16408. + window_addr = 0x1E000000;
  16409. + window_size = 0x1000000;
  16410. +#endif
  16411. + break;
  16412. + case 0xC:
  16413. + case 0xD:
  16414. + case 0xE:
  16415. + case 0xF:
  16416. + /* 64 MB Boot NOR Flash is disabled */
  16417. + /* and the start address is moved to 0x0C00000 */
  16418. + window_addr = 0x0C000000;
  16419. + window_size = 0x4000000;
  16420. + default:
  16421. + printk("Pb1550 MTD: unsupported boot:swap setting\n");
  16422. + return 1;
  16423. + }
  16424. + return 0;
  16425. +}
  16426. +
  16427. +int __init pb1550_mtd_init(void)
  16428. +{
  16429. + struct mtd_partition *parts;
  16430. + int nb_parts = 0;
  16431. + char *part_type;
  16432. +
  16433. + /* Default flash buswidth */
  16434. + pb1550_map.buswidth = flash_buswidth;
  16435. +
  16436. + if (setup_flash_params())
  16437. + return -ENXIO;
  16438. +
  16439. + /*
  16440. + * Static partition definition selection
  16441. + */
  16442. + part_type = "static";
  16443. + parts = pb1550_partitions;
  16444. + nb_parts = NB_OF(pb1550_partitions);
  16445. + pb1550_map.size = window_size;
  16446. +
  16447. + /*
  16448. + * Now let's probe for the actual flash. Do it here since
  16449. + * specific machine settings might have been set above.
  16450. + */
  16451. + printk(KERN_NOTICE "Pb1550 flash: probing %d-bit flash bus\n",
  16452. + pb1550_map.buswidth*8);
  16453. + pb1550_map.map_priv_1 =
  16454. + (unsigned long)ioremap(window_addr, window_size);
  16455. + mymtd = do_map_probe("cfi_probe", &pb1550_map);
  16456. + if (!mymtd) return -ENXIO;
  16457. + mymtd->module = THIS_MODULE;
  16458. +
  16459. + add_mtd_partitions(mymtd, parts, nb_parts);
  16460. + return 0;
  16461. +}
  16462. +
  16463. +static void __exit pb1550_mtd_cleanup(void)
  16464. +{
  16465. + if (mymtd) {
  16466. + del_mtd_partitions(mymtd);
  16467. + map_destroy(mymtd);
  16468. + if (parsed_parts)
  16469. + kfree(parsed_parts);
  16470. + }
  16471. +}
  16472. +
  16473. +module_init(pb1550_mtd_init);
  16474. +module_exit(pb1550_mtd_cleanup);
  16475. +
  16476. +MODULE_AUTHOR("Embedded Edge, LLC");
  16477. +MODULE_DESCRIPTION("Pb1550 mtd map driver");
  16478. +MODULE_LICENSE("GPL");
  16479. diff -Nur linux-2.4.32-rc1/drivers/mtd/maps/pb1xxx-flash.c linux-2.4.32-rc1.mips/drivers/mtd/maps/pb1xxx-flash.c
  16480. --- linux-2.4.32-rc1/drivers/mtd/maps/pb1xxx-flash.c 2003-06-13 16:51:34.000000000 +0200
  16481. +++ linux-2.4.32-rc1.mips/drivers/mtd/maps/pb1xxx-flash.c 2003-05-19 08:27:22.000000000 +0200
  16482. @@ -192,6 +192,34 @@
  16483. #else
  16484. #error MTD_PB1500 define combo error /* should never happen */
  16485. #endif
  16486. +#elif defined(CONFIG_MTD_BOSPORUS)
  16487. +static unsigned char flash_buswidth = 2;
  16488. +static unsigned long flash_size = 0x02000000;
  16489. +#define WINDOW_ADDR 0x1F000000
  16490. +#define WINDOW_SIZE 0x2000000
  16491. +static struct mtd_partition pb1xxx_partitions[] = {
  16492. + {
  16493. + name: "User FS",
  16494. + size: 0x00400000,
  16495. + offset: 0x00000000,
  16496. + },{
  16497. + name: "Yamon-2",
  16498. + size: 0x00100000,
  16499. + offset: 0x00400000,
  16500. + },{
  16501. + name: "Root FS",
  16502. + size: 0x00700000,
  16503. + offset: 0x00500000,
  16504. + },{
  16505. + name: "Yamon-1",
  16506. + size: 0x00100000,
  16507. + offset: 0x00C00000,
  16508. + },{
  16509. + name: "Kernel",
  16510. + size: 0x00300000,
  16511. + offset: 0x00D00000,
  16512. + }
  16513. +};
  16514. #else
  16515. #error Unsupported board
  16516. #endif
  16517. diff -Nur linux-2.4.32-rc1/drivers/mtd/maps/xxs1500.c linux-2.4.32-rc1.mips/drivers/mtd/maps/xxs1500.c
  16518. --- linux-2.4.32-rc1/drivers/mtd/maps/xxs1500.c 1970-01-01 01:00:00.000000000 +0100
  16519. +++ linux-2.4.32-rc1.mips/drivers/mtd/maps/xxs1500.c 2003-08-02 04:06:01.000000000 +0200
  16520. @@ -0,0 +1,186 @@
  16521. +/*
  16522. + * Flash memory access on MyCable XXS1500 board
  16523. + *
  16524. + * (C) 2003 Pete Popov <[email protected]>
  16525. + *
  16526. + * $Id: xxs1500.c,v 1.1.2.1 2003/06/13 21:15:46 ppopov Exp $
  16527. + */
  16528. +
  16529. +#include <linux/config.h>
  16530. +#include <linux/module.h>
  16531. +#include <linux/types.h>
  16532. +#include <linux/kernel.h>
  16533. +
  16534. +#include <linux/mtd/mtd.h>
  16535. +#include <linux/mtd/map.h>
  16536. +#include <linux/mtd/partitions.h>
  16537. +
  16538. +#include <asm/io.h>
  16539. +#include <asm/au1000.h>
  16540. +
  16541. +#ifdef DEBUG_RW
  16542. +#define DBG(x...) printk(x)
  16543. +#else
  16544. +#define DBG(x...)
  16545. +#endif
  16546. +
  16547. +#ifdef CONFIG_MIPS_XXS1500
  16548. +#define WINDOW_ADDR 0x1F000000
  16549. +#define WINDOW_SIZE 0x1000000
  16550. +#endif
  16551. +
  16552. +__u8 physmap_read8(struct map_info *map, unsigned long ofs)
  16553. +{
  16554. + __u8 ret;
  16555. + ret = __raw_readb(map->map_priv_1 + ofs);
  16556. + DBG("read8 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  16557. + return ret;
  16558. +}
  16559. +
  16560. +__u16 physmap_read16(struct map_info *map, unsigned long ofs)
  16561. +{
  16562. + __u16 ret;
  16563. + ret = __raw_readw(map->map_priv_1 + ofs);
  16564. + DBG("read16 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  16565. + return ret;
  16566. +}
  16567. +
  16568. +__u32 physmap_read32(struct map_info *map, unsigned long ofs)
  16569. +{
  16570. + __u32 ret;
  16571. + ret = __raw_readl(map->map_priv_1 + ofs);
  16572. + DBG("read32 from %x, %x\n", (unsigned)(map->map_priv_1 + ofs), ret);
  16573. + return ret;
  16574. +}
  16575. +
  16576. +void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
  16577. +{
  16578. + DBG("physmap_copy from %x to %x\n", (unsigned)from, (unsigned)to);
  16579. + memcpy_fromio(to, map->map_priv_1 + from, len);
  16580. +}
  16581. +
  16582. +void physmap_write8(struct map_info *map, __u8 d, unsigned long adr)
  16583. +{
  16584. + DBG("write8 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  16585. + __raw_writeb(d, map->map_priv_1 + adr);
  16586. + mb();
  16587. +}
  16588. +
  16589. +void physmap_write16(struct map_info *map, __u16 d, unsigned long adr)
  16590. +{
  16591. + DBG("write16 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  16592. + __raw_writew(d, map->map_priv_1 + adr);
  16593. + mb();
  16594. +}
  16595. +
  16596. +void physmap_write32(struct map_info *map, __u32 d, unsigned long adr)
  16597. +{
  16598. + DBG("write32 at %x, %x\n", (unsigned)(map->map_priv_1 + adr), d);
  16599. + __raw_writel(d, map->map_priv_1 + adr);
  16600. + mb();
  16601. +}
  16602. +
  16603. +void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
  16604. +{
  16605. + DBG("physmap_copy_to %x from %x\n", (unsigned)to, (unsigned)from);
  16606. + memcpy_toio(map->map_priv_1 + to, from, len);
  16607. +}
  16608. +
  16609. +
  16610. +
  16611. +static struct map_info xxs1500_map = {
  16612. + name: "XXS1500 flash",
  16613. + read8: physmap_read8,
  16614. + read16: physmap_read16,
  16615. + read32: physmap_read32,
  16616. + copy_from: physmap_copy_from,
  16617. + write8: physmap_write8,
  16618. + write16: physmap_write16,
  16619. + write32: physmap_write32,
  16620. + copy_to: physmap_copy_to,
  16621. +};
  16622. +
  16623. +
  16624. +static unsigned long flash_size = 0x00800000;
  16625. +static unsigned char flash_buswidth = 4;
  16626. +static struct mtd_partition xxs1500_partitions[] = {
  16627. + {
  16628. + name: "kernel image",
  16629. + size: 0x00200000,
  16630. + offset: 0,
  16631. + },{
  16632. + name: "user fs 0",
  16633. + size: (0x00C00000-0x200000),
  16634. + offset: MTDPART_OFS_APPEND,
  16635. + },{
  16636. + name: "yamon",
  16637. + size: 0x00100000,
  16638. + offset: MTDPART_OFS_APPEND,
  16639. + mask_flags: MTD_WRITEABLE
  16640. + },{
  16641. + name: "user fs 1",
  16642. + size: 0x2c0000,
  16643. + offset: MTDPART_OFS_APPEND,
  16644. + },{
  16645. + name: "yamon env vars",
  16646. + size: 0x040000,
  16647. + offset: MTDPART_OFS_APPEND,
  16648. + mask_flags: MTD_WRITEABLE
  16649. + }
  16650. +};
  16651. +
  16652. +
  16653. +#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
  16654. +
  16655. +static struct mtd_partition *parsed_parts;
  16656. +static struct mtd_info *mymtd;
  16657. +
  16658. +int __init xxs1500_mtd_init(void)
  16659. +{
  16660. + struct mtd_partition *parts;
  16661. + int nb_parts = 0;
  16662. + char *part_type;
  16663. +
  16664. + /* Default flash buswidth */
  16665. + xxs1500_map.buswidth = flash_buswidth;
  16666. +
  16667. + /*
  16668. + * Static partition definition selection
  16669. + */
  16670. + part_type = "static";
  16671. + parts = xxs1500_partitions;
  16672. + nb_parts = NB_OF(xxs1500_partitions);
  16673. + xxs1500_map.size = flash_size;
  16674. +
  16675. + /*
  16676. + * Now let's probe for the actual flash. Do it here since
  16677. + * specific machine settings might have been set above.
  16678. + */
  16679. + printk(KERN_NOTICE "XXS1500 flash: probing %d-bit flash bus\n",
  16680. + xxs1500_map.buswidth*8);
  16681. + xxs1500_map.map_priv_1 =
  16682. + (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
  16683. + mymtd = do_map_probe("cfi_probe", &xxs1500_map);
  16684. + if (!mymtd) return -ENXIO;
  16685. + mymtd->module = THIS_MODULE;
  16686. +
  16687. + add_mtd_partitions(mymtd, parts, nb_parts);
  16688. + return 0;
  16689. +}
  16690. +
  16691. +static void __exit xxs1500_mtd_cleanup(void)
  16692. +{
  16693. + if (mymtd) {
  16694. + del_mtd_partitions(mymtd);
  16695. + map_destroy(mymtd);
  16696. + if (parsed_parts)
  16697. + kfree(parsed_parts);
  16698. + }
  16699. +}
  16700. +
  16701. +module_init(xxs1500_mtd_init);
  16702. +module_exit(xxs1500_mtd_cleanup);
  16703. +
  16704. +MODULE_AUTHOR("Pete Popov");
  16705. +MODULE_DESCRIPTION("XXS1500 CFI map driver");
  16706. +MODULE_LICENSE("GPL");
  16707. diff -Nur linux-2.4.32-rc1/drivers/net/defxx.c linux-2.4.32-rc1.mips/drivers/net/defxx.c
  16708. --- linux-2.4.32-rc1/drivers/net/defxx.c 2004-11-17 12:54:21.000000000 +0100
  16709. +++ linux-2.4.32-rc1.mips/drivers/net/defxx.c 2004-11-19 01:28:39.000000000 +0100
  16710. @@ -10,24 +10,18 @@
  16711. *
  16712. * Abstract:
  16713. * A Linux device driver supporting the Digital Equipment Corporation
  16714. - * FDDI EISA and PCI controller families. Supported adapters include:
  16715. + * FDDI TURBOchannel, EISA and PCI controller families. Supported
  16716. + * adapters include:
  16717. *
  16718. - * DEC FDDIcontroller/EISA (DEFEA)
  16719. - * DEC FDDIcontroller/PCI (DEFPA)
  16720. + * DEC FDDIcontroller/TURBOchannel (DEFTA)
  16721. + * DEC FDDIcontroller/EISA (DEFEA)
  16722. + * DEC FDDIcontroller/PCI (DEFPA)
  16723. *
  16724. - * Maintainers:
  16725. - * LVS Lawrence V. Stefani
  16726. - *
  16727. - * Contact:
  16728. - * The author may be reached at:
  16729. + * The original author:
  16730. + * LVS Lawrence V. Stefani <[email protected]>
  16731. *
  16732. - * Inet: [email protected]
  16733. - * (NOTE! this address no longer works -jgarzik)
  16734. - *
  16735. - * Mail: Digital Equipment Corporation
  16736. - * 550 King Street
  16737. - * M/S: LKG1-3/M07
  16738. - * Littleton, MA 01460
  16739. + * Maintainers:
  16740. + * macro Maciej W. Rozycki <[email protected]>
  16741. *
  16742. * Credits:
  16743. * I'd like to thank Patricia Cross for helping me get started with
  16744. @@ -197,16 +191,16 @@
  16745. * Sep 2000 tjeerd Fix leak on unload, cosmetic code cleanup
  16746. * Feb 2001 Skb allocation fixes
  16747. * Feb 2001 davej PCI enable cleanups.
  16748. + * 04 Aug 2003 macro Converted to the DMA API.
  16749. + * 14 Aug 2004 macro Fix device names reported.
  16750. + * 26 Sep 2004 macro TURBOchannel support.
  16751. */
  16752. /* Include files */
  16753. #include <linux/module.h>
  16754. -
  16755. #include <linux/kernel.h>
  16756. -#include <linux/sched.h>
  16757. #include <linux/string.h>
  16758. -#include <linux/ptrace.h>
  16759. #include <linux/errno.h>
  16760. #include <linux/ioport.h>
  16761. #include <linux/slab.h>
  16762. @@ -215,19 +209,33 @@
  16763. #include <linux/delay.h>
  16764. #include <linux/init.h>
  16765. #include <linux/netdevice.h>
  16766. +#include <linux/fddidevice.h>
  16767. +#include <linux/skbuff.h>
  16768. +
  16769. #include <asm/byteorder.h>
  16770. #include <asm/bitops.h>
  16771. #include <asm/io.h>
  16772. -#include <linux/fddidevice.h>
  16773. -#include <linux/skbuff.h>
  16774. +#ifdef CONFIG_TC
  16775. +#include <asm/dec/tc.h>
  16776. +#else
  16777. +static int search_tc_card(const char *name) { return -ENODEV; }
  16778. +static void claim_tc_card(int slot) { }
  16779. +static void release_tc_card(int slot) { }
  16780. +static unsigned long get_tc_base_addr(int slot) { return 0; }
  16781. +static unsigned long get_tc_irq_nr(int slot) { return -1; }
  16782. +#endif
  16783. #include "defxx.h"
  16784. -/* Version information string - should be updated prior to each new release!!! */
  16785. +/* Version information string should be updated prior to each new release! */
  16786. +#define DRV_NAME "defxx"
  16787. +#define DRV_VERSION "v1.07T"
  16788. +#define DRV_RELDATE "2004/09/26"
  16789. static char version[] __devinitdata =
  16790. - "defxx.c:v1.05e 2001/02/03 Lawrence V. Stefani and others\n";
  16791. + DRV_NAME ": " DRV_VERSION " " DRV_RELDATE
  16792. + " Lawrence V. Stefani and others\n";
  16793. #define DYNAMIC_BUFFERS 1
  16794. @@ -243,7 +251,7 @@
  16795. static void dfx_bus_init(struct net_device *dev);
  16796. static void dfx_bus_config_check(DFX_board_t *bp);
  16797. -static int dfx_driver_init(struct net_device *dev);
  16798. +static int dfx_driver_init(struct net_device *dev, const char *print_name);
  16799. static int dfx_adap_init(DFX_board_t *bp, int get_buffers);
  16800. static int dfx_open(struct net_device *dev);
  16801. @@ -337,48 +345,84 @@
  16802. int offset,
  16803. u8 data
  16804. )
  16805. +{
  16806. + if (bp->bus_type == DFX_BUS_TYPE_TC)
  16807. + {
  16808. + volatile u8 *addr = (void *)(bp->base_addr + offset);
  16809. + *addr = data;
  16810. + mb();
  16811. + }
  16812. + else
  16813. {
  16814. u16 port = bp->base_addr + offset;
  16815. outb(data, port);
  16816. }
  16817. +}
  16818. static inline void dfx_port_read_byte(
  16819. DFX_board_t *bp,
  16820. int offset,
  16821. u8 *data
  16822. )
  16823. +{
  16824. + if (bp->bus_type == DFX_BUS_TYPE_TC)
  16825. + {
  16826. + volatile u8 *addr = (void *)(bp->base_addr + offset);
  16827. + mb();
  16828. + *data = *addr;
  16829. + }
  16830. + else
  16831. {
  16832. u16 port = bp->base_addr + offset;
  16833. *data = inb(port);
  16834. }
  16835. +}
  16836. static inline void dfx_port_write_long(
  16837. DFX_board_t *bp,
  16838. int offset,
  16839. u32 data
  16840. )
  16841. +{
  16842. + if (bp->bus_type == DFX_BUS_TYPE_TC)
  16843. + {
  16844. + volatile u32 *addr = (void *)(bp->base_addr + offset);
  16845. + *addr = data;
  16846. + mb();
  16847. + }
  16848. + else
  16849. {
  16850. u16 port = bp->base_addr + offset;
  16851. outl(data, port);
  16852. }
  16853. +}
  16854. static inline void dfx_port_read_long(
  16855. DFX_board_t *bp,
  16856. int offset,
  16857. u32 *data
  16858. )
  16859. +{
  16860. + if (bp->bus_type == DFX_BUS_TYPE_TC)
  16861. + {
  16862. + volatile u32 *addr = (void *)(bp->base_addr + offset);
  16863. + mb();
  16864. + *data = *addr;
  16865. + }
  16866. + else
  16867. {
  16868. u16 port = bp->base_addr + offset;
  16869. *data = inl(port);
  16870. }
  16871. +}
  16872. /*
  16873. @@ -393,8 +437,9 @@
  16874. * Condition code
  16875. *
  16876. * Arguments:
  16877. - * pdev - pointer to pci device information (NULL for EISA)
  16878. - * ioaddr - pointer to port (NULL for PCI)
  16879. + * pdev - pointer to pci device information (NULL for EISA or TURBOchannel)
  16880. + * bus_type - bus type (one of DFX_BUS_TYPE_*)
  16881. + * handle - bus-specific data: slot (TC), pointer to port (EISA), NULL (PCI)
  16882. *
  16883. * Functional Description:
  16884. *
  16885. @@ -410,54 +455,68 @@
  16886. * initialized and the board resources are read and stored in
  16887. * the device structure.
  16888. */
  16889. -static int __devinit dfx_init_one_pci_or_eisa(struct pci_dev *pdev, long ioaddr)
  16890. +static int __devinit dfx_init_one_pci_or_eisa(struct pci_dev *pdev, u32 bus_type, long handle)
  16891. {
  16892. + static int version_disp;
  16893. + char *print_name = DRV_NAME;
  16894. struct net_device *dev;
  16895. DFX_board_t *bp; /* board pointer */
  16896. + long ioaddr; /* pointer to port */
  16897. + unsigned long len; /* resource length */
  16898. + int alloc_size; /* total buffer size used */
  16899. int err;
  16900. -#ifndef MODULE
  16901. - static int version_disp;
  16902. -
  16903. - if (!version_disp) /* display version info if adapter is found */
  16904. - {
  16905. + if (!version_disp) { /* display version info if adapter is found */
  16906. version_disp = 1; /* set display flag to TRUE so that */
  16907. printk(version); /* we only display this string ONCE */
  16908. }
  16909. -#endif
  16910. - /*
  16911. - * init_fddidev() allocates a device structure with private data, clears the device structure and private data,
  16912. - * and calls fddi_setup() and register_netdev(). Not much left to do for us here.
  16913. - */
  16914. - dev = init_fddidev(NULL, sizeof(*bp));
  16915. + if (pdev != NULL)
  16916. + print_name = pdev->slot_name;
  16917. +
  16918. + dev = alloc_fddidev(sizeof(*bp));
  16919. if (!dev) {
  16920. - printk (KERN_ERR "defxx: unable to allocate fddidev, aborting\n");
  16921. + printk(KERN_ERR "%s: unable to allocate fddidev, aborting\n",
  16922. + print_name);
  16923. return -ENOMEM;
  16924. }
  16925. /* Enable PCI device. */
  16926. - if (pdev != NULL) {
  16927. + if (bus_type == DFX_BUS_TYPE_PCI) {
  16928. err = pci_enable_device (pdev);
  16929. if (err) goto err_out;
  16930. ioaddr = pci_resource_start (pdev, 1);
  16931. }
  16932. SET_MODULE_OWNER(dev);
  16933. + SET_NETDEV_DEV(dev, &pdev->dev);
  16934. bp = dev->priv;
  16935. - if (!request_region (ioaddr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, dev->name)) {
  16936. - printk (KERN_ERR "%s: Cannot reserve I/O resource 0x%x @ 0x%lx, aborting\n",
  16937. - dev->name, PFI_K_CSR_IO_LEN, ioaddr);
  16938. + if (bus_type == DFX_BUS_TYPE_TC) {
  16939. + /* TURBOchannel board */
  16940. + bp->slot = handle;
  16941. + claim_tc_card(bp->slot);
  16942. + ioaddr = get_tc_base_addr(handle) + PI_TC_K_CSR_OFFSET;
  16943. + len = PI_TC_K_CSR_LEN;
  16944. + } else if (bus_type == DFX_BUS_TYPE_EISA) {
  16945. + /* EISA board */
  16946. + ioaddr = handle;
  16947. + len = PI_ESIC_K_CSR_IO_LEN;
  16948. + } else
  16949. + /* PCI board */
  16950. + len = PFI_K_CSR_IO_LEN;
  16951. + dev->base_addr = ioaddr; /* save port (I/O) base address */
  16952. +
  16953. + if (!request_region(ioaddr, len, print_name)) {
  16954. + printk(KERN_ERR "%s: Cannot reserve I/O resource "
  16955. + "0x%lx @ 0x%lx, aborting\n", print_name, len, ioaddr);
  16956. err = -EBUSY;
  16957. goto err_out;
  16958. }
  16959. /* Initialize new device structure */
  16960. - dev->base_addr = ioaddr; /* save port (I/O) base address */
  16961. -
  16962. dev->get_stats = dfx_ctl_get_stats;
  16963. dev->open = dfx_open;
  16964. dev->stop = dfx_close;
  16965. @@ -465,37 +524,54 @@
  16966. dev->set_multicast_list = dfx_ctl_set_multicast_list;
  16967. dev->set_mac_address = dfx_ctl_set_mac_address;
  16968. - if (pdev == NULL) {
  16969. - /* EISA board */
  16970. - bp->bus_type = DFX_BUS_TYPE_EISA;
  16971. + bp->bus_type = bus_type;
  16972. + if (bus_type == DFX_BUS_TYPE_TC || bus_type == DFX_BUS_TYPE_EISA) {
  16973. + /* TURBOchannel or EISA board */
  16974. bp->next = root_dfx_eisa_dev;
  16975. root_dfx_eisa_dev = dev;
  16976. } else {
  16977. /* PCI board */
  16978. - bp->bus_type = DFX_BUS_TYPE_PCI;
  16979. bp->pci_dev = pdev;
  16980. pci_set_drvdata (pdev, dev);
  16981. pci_set_master (pdev);
  16982. }
  16983. - if (dfx_driver_init(dev) != DFX_K_SUCCESS) {
  16984. +
  16985. + if (dfx_driver_init(dev, print_name) != DFX_K_SUCCESS) {
  16986. err = -ENODEV;
  16987. goto err_out_region;
  16988. }
  16989. + err = register_netdev(dev);
  16990. + if (err)
  16991. + goto err_out_kfree;
  16992. +
  16993. + printk("%s: registered as %s\n", print_name, dev->name);
  16994. return 0;
  16995. +err_out_kfree:
  16996. + alloc_size = sizeof(PI_DESCR_BLOCK) +
  16997. + PI_CMD_REQ_K_SIZE_MAX + PI_CMD_RSP_K_SIZE_MAX +
  16998. +#ifndef DYNAMIC_BUFFERS
  16999. + (bp->rcv_bufs_to_post * PI_RCV_DATA_K_SIZE_MAX) +
  17000. +#endif
  17001. + sizeof(PI_CONSUMER_BLOCK) +
  17002. + (PI_ALIGN_K_DESC_BLK - 1);
  17003. + if (bp->kmalloced)
  17004. + pci_free_consistent(pdev, alloc_size,
  17005. + bp->kmalloced, bp->kmalloced_dma);
  17006. err_out_region:
  17007. - release_region(ioaddr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN);
  17008. + release_region(ioaddr, len);
  17009. err_out:
  17010. - unregister_netdev(dev);
  17011. - kfree(dev);
  17012. + if (bp->bus_type == DFX_BUS_TYPE_TC)
  17013. + release_tc_card(bp->slot);
  17014. + free_netdev(dev);
  17015. return err;
  17016. }
  17017. static int __devinit dfx_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
  17018. {
  17019. - return dfx_init_one_pci_or_eisa(pdev, 0);
  17020. + return dfx_init_one_pci_or_eisa(pdev, DFX_BUS_TYPE_PCI, 0);
  17021. }
  17022. static int __init dfx_eisa_init(void)
  17023. @@ -507,6 +583,7 @@
  17024. DBG_printk("In dfx_eisa_init...\n");
  17025. +#ifdef CONFIG_EISA
  17026. /* Scan for FDDI EISA controllers */
  17027. for (i=0; i < DFX_MAX_EISA_SLOTS; i++) /* only scan for up to 16 EISA slots */
  17028. @@ -517,9 +594,27 @@
  17029. {
  17030. port = (i << 12); /* recalc base addr */
  17031. - if (dfx_init_one_pci_or_eisa(NULL, port) == 0) rc = 0;
  17032. + if (dfx_init_one_pci_or_eisa(NULL, DFX_BUS_TYPE_EISA, port) == 0) rc = 0;
  17033. }
  17034. }
  17035. +#endif
  17036. + return rc;
  17037. +}
  17038. +
  17039. +static int __init dfx_tc_init(void)
  17040. +{
  17041. + int rc = -ENODEV;
  17042. + int slot; /* TC slot number */
  17043. +
  17044. + DBG_printk("In dfx_tc_init...\n");
  17045. +
  17046. + /* Scan for FDDI TC controllers */
  17047. + while ((slot = search_tc_card("PMAF-F")) >= 0) {
  17048. + if (dfx_init_one_pci_or_eisa(NULL, DFX_BUS_TYPE_TC, slot) == 0)
  17049. + rc = 0;
  17050. + else
  17051. + break;
  17052. + }
  17053. return rc;
  17054. }
  17055. @@ -583,8 +678,9 @@
  17056. /* Initialize adapter based on bus type */
  17057. - if (bp->bus_type == DFX_BUS_TYPE_EISA)
  17058. - {
  17059. + if (bp->bus_type == DFX_BUS_TYPE_TC) {
  17060. + dev->irq = get_tc_irq_nr(bp->slot);
  17061. + } else if (bp->bus_type == DFX_BUS_TYPE_EISA) {
  17062. /* Get the interrupt level from the ESIC chip */
  17063. dfx_port_read_byte(bp, PI_ESIC_K_IO_CONFIG_STAT_0, &val);
  17064. @@ -766,6 +862,7 @@
  17065. *
  17066. * Arguments:
  17067. * dev - pointer to device information
  17068. + * print_name - printable device name
  17069. *
  17070. * Functional Description:
  17071. * This function allocates additional resources such as the host memory
  17072. @@ -780,20 +877,21 @@
  17073. * or read adapter MAC address
  17074. *
  17075. * Assumptions:
  17076. - * Memory allocated from kmalloc() call is physically contiguous, locked
  17077. - * memory whose physical address equals its virtual address.
  17078. + * Memory allocated from pci_alloc_consistent() call is physically
  17079. + * contiguous, locked memory.
  17080. *
  17081. * Side Effects:
  17082. * Adapter is reset and should be in DMA_UNAVAILABLE state before
  17083. * returning from this routine.
  17084. */
  17085. -static int __devinit dfx_driver_init(struct net_device *dev)
  17086. +static int __devinit dfx_driver_init(struct net_device *dev,
  17087. + const char *print_name)
  17088. {
  17089. DFX_board_t *bp = dev->priv;
  17090. int alloc_size; /* total buffer size needed */
  17091. char *top_v, *curr_v; /* virtual addrs into memory block */
  17092. - u32 top_p, curr_p; /* physical addrs into memory block */
  17093. + dma_addr_t top_p, curr_p; /* physical addrs into memory block */
  17094. u32 data; /* host data register value */
  17095. DBG_printk("In dfx_driver_init...\n");
  17096. @@ -837,26 +935,20 @@
  17097. /* Read the factory MAC address from the adapter then save it */
  17098. - if (dfx_hw_port_ctrl_req(bp,
  17099. - PI_PCTRL_M_MLA,
  17100. - PI_PDATA_A_MLA_K_LO,
  17101. - 0,
  17102. - &data) != DFX_K_SUCCESS)
  17103. - {
  17104. - printk("%s: Could not read adapter factory MAC address!\n", dev->name);
  17105. + if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_MLA, PI_PDATA_A_MLA_K_LO, 0,
  17106. + &data) != DFX_K_SUCCESS) {
  17107. + printk("%s: Could not read adapter factory MAC address!\n",
  17108. + print_name);
  17109. return(DFX_K_FAILURE);
  17110. - }
  17111. + }
  17112. memcpy(&bp->factory_mac_addr[0], &data, sizeof(u32));
  17113. - if (dfx_hw_port_ctrl_req(bp,
  17114. - PI_PCTRL_M_MLA,
  17115. - PI_PDATA_A_MLA_K_HI,
  17116. - 0,
  17117. - &data) != DFX_K_SUCCESS)
  17118. - {
  17119. - printk("%s: Could not read adapter factory MAC address!\n", dev->name);
  17120. + if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_MLA, PI_PDATA_A_MLA_K_HI, 0,
  17121. + &data) != DFX_K_SUCCESS) {
  17122. + printk("%s: Could not read adapter factory MAC address!\n",
  17123. + print_name);
  17124. return(DFX_K_FAILURE);
  17125. - }
  17126. + }
  17127. memcpy(&bp->factory_mac_addr[4], &data, sizeof(u16));
  17128. /*
  17129. @@ -867,28 +959,27 @@
  17130. */
  17131. memcpy(dev->dev_addr, bp->factory_mac_addr, FDDI_K_ALEN);
  17132. - if (bp->bus_type == DFX_BUS_TYPE_EISA)
  17133. - printk("%s: DEFEA at I/O addr = 0x%lX, IRQ = %d, Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n",
  17134. - dev->name,
  17135. - dev->base_addr,
  17136. - dev->irq,
  17137. - dev->dev_addr[0],
  17138. - dev->dev_addr[1],
  17139. - dev->dev_addr[2],
  17140. - dev->dev_addr[3],
  17141. - dev->dev_addr[4],
  17142. - dev->dev_addr[5]);
  17143. + if (bp->bus_type == DFX_BUS_TYPE_TC)
  17144. + printk("%s: DEFTA at addr = 0x%lX, IRQ = %d, "
  17145. + "Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n",
  17146. + print_name, dev->base_addr, dev->irq,
  17147. + dev->dev_addr[0], dev->dev_addr[1],
  17148. + dev->dev_addr[2], dev->dev_addr[3],
  17149. + dev->dev_addr[4], dev->dev_addr[5]);
  17150. + else if (bp->bus_type == DFX_BUS_TYPE_EISA)
  17151. + printk("%s: DEFEA at I/O addr = 0x%lX, IRQ = %d, "
  17152. + "Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n",
  17153. + print_name, dev->base_addr, dev->irq,
  17154. + dev->dev_addr[0], dev->dev_addr[1],
  17155. + dev->dev_addr[2], dev->dev_addr[3],
  17156. + dev->dev_addr[4], dev->dev_addr[5]);
  17157. else
  17158. - printk("%s: DEFPA at I/O addr = 0x%lX, IRQ = %d, Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n",
  17159. - dev->name,
  17160. - dev->base_addr,
  17161. - dev->irq,
  17162. - dev->dev_addr[0],
  17163. - dev->dev_addr[1],
  17164. - dev->dev_addr[2],
  17165. - dev->dev_addr[3],
  17166. - dev->dev_addr[4],
  17167. - dev->dev_addr[5]);
  17168. + printk("%s: DEFPA at I/O addr = 0x%lX, IRQ = %d, "
  17169. + "Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n",
  17170. + print_name, dev->base_addr, dev->irq,
  17171. + dev->dev_addr[0], dev->dev_addr[1],
  17172. + dev->dev_addr[2], dev->dev_addr[3],
  17173. + dev->dev_addr[4], dev->dev_addr[5]);
  17174. /*
  17175. * Get memory for descriptor block, consumer block, and other buffers
  17176. @@ -903,14 +994,15 @@
  17177. #endif
  17178. sizeof(PI_CONSUMER_BLOCK) +
  17179. (PI_ALIGN_K_DESC_BLK - 1);
  17180. - bp->kmalloced = top_v = (char *) kmalloc(alloc_size, GFP_KERNEL);
  17181. - if (top_v == NULL)
  17182. - {
  17183. - printk("%s: Could not allocate memory for host buffers and structures!\n", dev->name);
  17184. + bp->kmalloced = top_v = pci_alloc_consistent(bp->pci_dev, alloc_size,
  17185. + &bp->kmalloced_dma);
  17186. + if (top_v == NULL) {
  17187. + printk("%s: Could not allocate memory for host buffers "
  17188. + "and structures!\n", print_name);
  17189. return(DFX_K_FAILURE);
  17190. - }
  17191. + }
  17192. memset(top_v, 0, alloc_size); /* zero out memory before continuing */
  17193. - top_p = virt_to_bus(top_v); /* get physical address of buffer */
  17194. + top_p = bp->kmalloced_dma; /* get physical address of buffer */
  17195. /*
  17196. * To guarantee the 8K alignment required for the descriptor block, 8K - 1
  17197. @@ -924,7 +1016,7 @@
  17198. * for allocating the needed memory.
  17199. */
  17200. - curr_p = (u32) (ALIGN(top_p, PI_ALIGN_K_DESC_BLK));
  17201. + curr_p = ALIGN(top_p, PI_ALIGN_K_DESC_BLK);
  17202. curr_v = top_v + (curr_p - top_p);
  17203. /* Reserve space for descriptor block */
  17204. @@ -965,14 +1057,20 @@
  17205. /* Display virtual and physical addresses if debug driver */
  17206. - DBG_printk("%s: Descriptor block virt = %0lX, phys = %0X\n", dev->name, (long)bp->descr_block_virt, bp->descr_block_phys);
  17207. - DBG_printk("%s: Command Request buffer virt = %0lX, phys = %0X\n", dev->name, (long)bp->cmd_req_virt, bp->cmd_req_phys);
  17208. - DBG_printk("%s: Command Response buffer virt = %0lX, phys = %0X\n", dev->name, (long)bp->cmd_rsp_virt, bp->cmd_rsp_phys);
  17209. - DBG_printk("%s: Receive buffer block virt = %0lX, phys = %0X\n", dev->name, (long)bp->rcv_block_virt, bp->rcv_block_phys);
  17210. - DBG_printk("%s: Consumer block virt = %0lX, phys = %0X\n", dev->name, (long)bp->cons_block_virt, bp->cons_block_phys);
  17211. + DBG_printk("%s: Descriptor block virt = %0lX, phys = %0X\n",
  17212. + print_name,
  17213. + (long)bp->descr_block_virt, bp->descr_block_phys);
  17214. + DBG_printk("%s: Command Request buffer virt = %0lX, phys = %0X\n",
  17215. + print_name, (long)bp->cmd_req_virt, bp->cmd_req_phys);
  17216. + DBG_printk("%s: Command Response buffer virt = %0lX, phys = %0X\n",
  17217. + print_name, (long)bp->cmd_rsp_virt, bp->cmd_rsp_phys);
  17218. + DBG_printk("%s: Receive buffer block virt = %0lX, phys = %0X\n",
  17219. + print_name, (long)bp->rcv_block_virt, bp->rcv_block_phys);
  17220. + DBG_printk("%s: Consumer block virt = %0lX, phys = %0X\n",
  17221. + print_name, (long)bp->cons_block_virt, bp->cons_block_phys);
  17222. return(DFX_K_SUCCESS);
  17223. - }
  17224. +}
  17225. /*
  17226. @@ -1218,7 +1316,9 @@
  17227. /* Register IRQ - support shared interrupts by passing device ptr */
  17228. - ret = request_irq(dev->irq, (void *)dfx_interrupt, SA_SHIRQ, dev->name, dev);
  17229. + ret = request_irq(dev->irq, (void *)dfx_interrupt,
  17230. + (bp->bus_type == DFX_BUS_TYPE_TC) ? 0 : SA_SHIRQ,
  17231. + dev->name, dev);
  17232. if (ret) {
  17233. printk(KERN_ERR "%s: Requested IRQ %d is busy\n", dev->name, dev->irq);
  17234. return ret;
  17235. @@ -1737,7 +1837,7 @@
  17236. dfx_port_write_long(bp, PFI_K_REG_MODE_CTRL,
  17237. (PFI_MODE_M_PDQ_INT_ENB + PFI_MODE_M_DMA_ENB));
  17238. }
  17239. - else
  17240. + else if (bp->bus_type == DFX_BUS_TYPE_EISA)
  17241. {
  17242. /* Disable interrupts at the ESIC */
  17243. @@ -1755,6 +1855,13 @@
  17244. tmp |= PI_CONFIG_STAT_0_M_INT_ENB;
  17245. dfx_port_write_byte(bp, PI_ESIC_K_IO_CONFIG_STAT_0, tmp);
  17246. }
  17247. + else {
  17248. + /* TC doesn't share interrupts so no need to disable them */
  17249. +
  17250. + /* Call interrupt service routine for this adapter */
  17251. +
  17252. + dfx_int_common(dev);
  17253. + }
  17254. spin_unlock(&bp->lock);
  17255. }
  17256. @@ -2663,12 +2770,12 @@
  17257. static void my_skb_align(struct sk_buff *skb, int n)
  17258. {
  17259. - u32 x=(u32)skb->data; /* We only want the low bits .. */
  17260. - u32 v;
  17261. + unsigned long x = (unsigned long)skb->data;
  17262. + unsigned long v;
  17263. - v=(x+n-1)&~(n-1); /* Where we want to be */
  17264. + v = ALIGN(x, n); /* Where we want to be */
  17265. - skb_reserve(skb, v-x);
  17266. + skb_reserve(skb, v - x);
  17267. }
  17268. @@ -2745,7 +2852,10 @@
  17269. */
  17270. my_skb_align(newskb, 128);
  17271. - bp->descr_block_virt->rcv_data[i+j].long_1 = virt_to_bus(newskb->data);
  17272. + bp->descr_block_virt->rcv_data[i + j].long_1 =
  17273. + (u32)pci_map_single(bp->pci_dev, newskb->data,
  17274. + NEW_SKB_SIZE,
  17275. + PCI_DMA_FROMDEVICE);
  17276. /*
  17277. * p_rcv_buff_va is only used inside the
  17278. * kernel so we put the skb pointer here.
  17279. @@ -2859,9 +2969,17 @@
  17280. my_skb_align(newskb, 128);
  17281. skb = (struct sk_buff *)bp->p_rcv_buff_va[entry];
  17282. + pci_unmap_single(bp->pci_dev,
  17283. + bp->descr_block_virt->rcv_data[entry].long_1,
  17284. + NEW_SKB_SIZE,
  17285. + PCI_DMA_FROMDEVICE);
  17286. skb_reserve(skb, RCV_BUFF_K_PADDING);
  17287. bp->p_rcv_buff_va[entry] = (char *)newskb;
  17288. - bp->descr_block_virt->rcv_data[entry].long_1 = virt_to_bus(newskb->data);
  17289. + bp->descr_block_virt->rcv_data[entry].long_1 =
  17290. + (u32)pci_map_single(bp->pci_dev,
  17291. + newskb->data,
  17292. + NEW_SKB_SIZE,
  17293. + PCI_DMA_FROMDEVICE);
  17294. } else
  17295. skb = NULL;
  17296. } else
  17297. @@ -2934,7 +3052,7 @@
  17298. * is contained in a single physically contiguous buffer
  17299. * in which the virtual address of the start of packet
  17300. * (skb->data) can be converted to a physical address
  17301. - * by using virt_to_bus().
  17302. + * by using pci_map_single().
  17303. *
  17304. * Since the adapter architecture requires a three byte
  17305. * packet request header to prepend the start of packet,
  17306. @@ -3082,12 +3200,13 @@
  17307. * skb->data.
  17308. * 6. The physical address of the start of packet
  17309. * can be determined from the virtual address
  17310. - * by using virt_to_bus() and is only 32-bits
  17311. + * by using pci_map_single() and is only 32-bits
  17312. * wide.
  17313. */
  17314. p_xmt_descr->long_0 = (u32) (PI_XMT_DESCR_M_SOP | PI_XMT_DESCR_M_EOP | ((skb->len) << PI_XMT_DESCR_V_SEG_LEN));
  17315. - p_xmt_descr->long_1 = (u32) virt_to_bus(skb->data);
  17316. + p_xmt_descr->long_1 = (u32)pci_map_single(bp->pci_dev, skb->data,
  17317. + skb->len, PCI_DMA_TODEVICE);
  17318. /*
  17319. * Verify that descriptor is actually available
  17320. @@ -3171,6 +3290,7 @@
  17321. {
  17322. XMT_DRIVER_DESCR *p_xmt_drv_descr; /* ptr to transmit driver descriptor */
  17323. PI_TYPE_2_CONSUMER *p_type_2_cons; /* ptr to rcv/xmt consumer block register */
  17324. + u8 comp; /* local transmit completion index */
  17325. int freed = 0; /* buffers freed */
  17326. /* Service all consumed transmit frames */
  17327. @@ -3188,7 +3308,11 @@
  17328. bp->xmt_total_bytes += p_xmt_drv_descr->p_skb->len;
  17329. /* Return skb to operating system */
  17330. -
  17331. + comp = bp->rcv_xmt_reg.index.xmt_comp;
  17332. + pci_unmap_single(bp->pci_dev,
  17333. + bp->descr_block_virt->xmt_data[comp].long_1,
  17334. + p_xmt_drv_descr->p_skb->len,
  17335. + PCI_DMA_TODEVICE);
  17336. dev_kfree_skb_irq(p_xmt_drv_descr->p_skb);
  17337. /*
  17338. @@ -3297,6 +3421,7 @@
  17339. {
  17340. u32 prod_cons; /* rcv/xmt consumer block longword */
  17341. XMT_DRIVER_DESCR *p_xmt_drv_descr; /* ptr to transmit driver descriptor */
  17342. + u8 comp; /* local transmit completion index */
  17343. /* Flush all outstanding transmit frames */
  17344. @@ -3307,7 +3432,11 @@
  17345. p_xmt_drv_descr = &(bp->xmt_drv_descr_blk[bp->rcv_xmt_reg.index.xmt_comp]);
  17346. /* Return skb to operating system */
  17347. -
  17348. + comp = bp->rcv_xmt_reg.index.xmt_comp;
  17349. + pci_unmap_single(bp->pci_dev,
  17350. + bp->descr_block_virt->xmt_data[comp].long_1,
  17351. + p_xmt_drv_descr->p_skb->len,
  17352. + PCI_DMA_TODEVICE);
  17353. dev_kfree_skb(p_xmt_drv_descr->p_skb);
  17354. /* Increment transmit error counter */
  17355. @@ -3337,12 +3466,36 @@
  17356. static void __devexit dfx_remove_one_pci_or_eisa(struct pci_dev *pdev, struct net_device *dev)
  17357. {
  17358. - DFX_board_t *bp = dev->priv;
  17359. + DFX_board_t *bp = dev->priv;
  17360. + unsigned long len; /* resource length */
  17361. + int alloc_size; /* total buffer size used */
  17362. + if (bp->bus_type == DFX_BUS_TYPE_TC) {
  17363. + /* TURBOchannel board */
  17364. + len = PI_TC_K_CSR_LEN;
  17365. + } else if (bp->bus_type == DFX_BUS_TYPE_EISA) {
  17366. + /* EISA board */
  17367. + len = PI_ESIC_K_CSR_IO_LEN;
  17368. + } else {
  17369. + len = PFI_K_CSR_IO_LEN;
  17370. + }
  17371. unregister_netdev(dev);
  17372. - release_region(dev->base_addr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN );
  17373. - if (bp->kmalloced) kfree(bp->kmalloced);
  17374. - kfree(dev);
  17375. + release_region(dev->base_addr, len);
  17376. +
  17377. + if (bp->bus_type == DFX_BUS_TYPE_TC)
  17378. + release_tc_card(bp->slot);
  17379. +
  17380. + alloc_size = sizeof(PI_DESCR_BLOCK) +
  17381. + PI_CMD_REQ_K_SIZE_MAX + PI_CMD_RSP_K_SIZE_MAX +
  17382. +#ifndef DYNAMIC_BUFFERS
  17383. + (bp->rcv_bufs_to_post * PI_RCV_DATA_K_SIZE_MAX) +
  17384. +#endif
  17385. + sizeof(PI_CONSUMER_BLOCK) +
  17386. + (PI_ALIGN_K_DESC_BLK - 1);
  17387. + if (bp->kmalloced)
  17388. + pci_free_consistent(pdev, alloc_size, bp->kmalloced,
  17389. + bp->kmalloced_dma);
  17390. + free_netdev(dev);
  17391. }
  17392. static void __devexit dfx_remove_one (struct pci_dev *pdev)
  17393. @@ -3353,21 +3506,22 @@
  17394. pci_set_drvdata(pdev, NULL);
  17395. }
  17396. -static struct pci_device_id dfx_pci_tbl[] __devinitdata = {
  17397. +static struct pci_device_id dfx_pci_tbl[] = {
  17398. { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_FDDI, PCI_ANY_ID, PCI_ANY_ID, },
  17399. { 0, }
  17400. };
  17401. MODULE_DEVICE_TABLE(pci, dfx_pci_tbl);
  17402. static struct pci_driver dfx_driver = {
  17403. - name: "defxx",
  17404. - probe: dfx_init_one,
  17405. - remove: __devexit_p(dfx_remove_one),
  17406. - id_table: dfx_pci_tbl,
  17407. + .name = "defxx",
  17408. + .probe = dfx_init_one,
  17409. + .remove = __devexit_p(dfx_remove_one),
  17410. + .id_table = dfx_pci_tbl,
  17411. };
  17412. static int dfx_have_pci;
  17413. static int dfx_have_eisa;
  17414. +static int dfx_have_tc;
  17415. static void __exit dfx_eisa_cleanup(void)
  17416. @@ -3388,12 +3542,7 @@
  17417. static int __init dfx_init(void)
  17418. {
  17419. - int rc_pci, rc_eisa;
  17420. -
  17421. -/* when a module, this is printed whether or not devices are found in probe */
  17422. -#ifdef MODULE
  17423. - printk(version);
  17424. -#endif
  17425. + int rc_pci, rc_eisa, rc_tc;
  17426. rc_pci = pci_module_init(&dfx_driver);
  17427. if (rc_pci >= 0) dfx_have_pci = 1;
  17428. @@ -3401,20 +3550,27 @@
  17429. rc_eisa = dfx_eisa_init();
  17430. if (rc_eisa >= 0) dfx_have_eisa = 1;
  17431. - return ((rc_eisa < 0) ? 0 : rc_eisa) + ((rc_pci < 0) ? 0 : rc_pci);
  17432. + rc_tc = dfx_tc_init();
  17433. + if (rc_tc >= 0) dfx_have_tc = 1;
  17434. +
  17435. + return ((rc_tc < 0) ? 0 : rc_tc) +
  17436. + ((rc_eisa < 0) ? 0 : rc_eisa) +
  17437. + ((rc_pci < 0) ? 0 : rc_pci);
  17438. }
  17439. static void __exit dfx_cleanup(void)
  17440. {
  17441. if (dfx_have_pci)
  17442. pci_unregister_driver(&dfx_driver);
  17443. - if (dfx_have_eisa)
  17444. + if (dfx_have_eisa || dfx_have_tc)
  17445. dfx_eisa_cleanup();
  17446. -
  17447. }
  17448. module_init(dfx_init);
  17449. module_exit(dfx_cleanup);
  17450. +MODULE_AUTHOR("Lawrence V. Stefani");
  17451. +MODULE_DESCRIPTION("DEC FDDIcontroller EISA/PCI (DEFEA/DEFPA) driver "
  17452. + DRV_VERSION " " DRV_RELDATE);
  17453. MODULE_LICENSE("GPL");
  17454. diff -Nur linux-2.4.32-rc1/drivers/net/defxx.h linux-2.4.32-rc1.mips/drivers/net/defxx.h
  17455. --- linux-2.4.32-rc1/drivers/net/defxx.h 2001-02-13 22:15:05.000000000 +0100
  17456. +++ linux-2.4.32-rc1.mips/drivers/net/defxx.h 2004-10-03 20:06:48.000000000 +0200
  17457. @@ -12,17 +12,11 @@
  17458. * Contains all definitions specified by port specification and required
  17459. * by the defxx.c driver.
  17460. *
  17461. - * Maintainers:
  17462. - * LVS Lawrence V. Stefani
  17463. - *
  17464. - * Contact:
  17465. - * The author may be reached at:
  17466. + * The original author:
  17467. + * LVS Lawrence V. Stefani <[email protected]>
  17468. *
  17469. - * Inet: [email protected]
  17470. - * Mail: Digital Equipment Corporation
  17471. - * 550 King Street
  17472. - * M/S: LKG1-3/M07
  17473. - * Littleton, MA 01460
  17474. + * Maintainers:
  17475. + * macro Maciej W. Rozycki <[email protected]>
  17476. *
  17477. * Modification History:
  17478. * Date Name Description
  17479. @@ -30,6 +24,7 @@
  17480. * 09-Sep-96 LVS Added group_prom field. Moved read/write I/O
  17481. * macros to DEFXX.C.
  17482. * 12-Sep-96 LVS Removed packet request header pointers.
  17483. + * 04 Aug 2003 macro Converted to the DMA API.
  17484. */
  17485. #ifndef _DEFXX_H_
  17486. @@ -1467,6 +1462,11 @@
  17487. #endif /* #ifndef BIG_ENDIAN */
  17488. +/* Define TC PDQ CSR offset and length */
  17489. +
  17490. +#define PI_TC_K_CSR_OFFSET 0x100000
  17491. +#define PI_TC_K_CSR_LEN 0x80 /* 128 bytes */
  17492. +
  17493. /* Define EISA controller register offsets */
  17494. #define PI_ESIC_K_BURST_HOLDOFF 0x040
  17495. @@ -1634,6 +1634,7 @@
  17496. #define DFX_BUS_TYPE_PCI 0 /* type code for DEC FDDIcontroller/PCI */
  17497. #define DFX_BUS_TYPE_EISA 1 /* type code for DEC FDDIcontroller/EISA */
  17498. +#define DFX_BUS_TYPE_TC 2 /* type code for DEC FDDIcontroller/TURBOchannel */
  17499. #define DFX_FC_PRH2_PRH1_PRH0 0x54003820 /* Packet Request Header bytes + FC */
  17500. #define DFX_PRH0_BYTE 0x20 /* Packet Request Header byte 0 */
  17501. @@ -1704,17 +1705,19 @@
  17502. {
  17503. /* Keep virtual and physical pointers to locked, physically contiguous memory */
  17504. - char *kmalloced; /* kfree this on unload */
  17505. + char *kmalloced; /* pci_free_consistent this on unload */
  17506. + dma_addr_t kmalloced_dma;
  17507. + /* DMA handle for the above */
  17508. PI_DESCR_BLOCK *descr_block_virt; /* PDQ descriptor block virt address */
  17509. - u32 descr_block_phys; /* PDQ descriptor block phys address */
  17510. + dma_addr_t descr_block_phys; /* PDQ descriptor block phys address */
  17511. PI_DMA_CMD_REQ *cmd_req_virt; /* Command request buffer virt address */
  17512. - u32 cmd_req_phys; /* Command request buffer phys address */
  17513. + dma_addr_t cmd_req_phys; /* Command request buffer phys address */
  17514. PI_DMA_CMD_RSP *cmd_rsp_virt; /* Command response buffer virt address */
  17515. - u32 cmd_rsp_phys; /* Command response buffer phys address */
  17516. + dma_addr_t cmd_rsp_phys; /* Command response buffer phys address */
  17517. char *rcv_block_virt; /* LLC host receive queue buf blk virt */
  17518. - u32 rcv_block_phys; /* LLC host receive queue buf blk phys */
  17519. + dma_addr_t rcv_block_phys; /* LLC host receive queue buf blk phys */
  17520. PI_CONSUMER_BLOCK *cons_block_virt; /* PDQ consumer block virt address */
  17521. - u32 cons_block_phys; /* PDQ consumer block phys address */
  17522. + dma_addr_t cons_block_phys; /* PDQ consumer block phys address */
  17523. /* Keep local copies of Type 1 and Type 2 register data */
  17524. @@ -1758,8 +1761,9 @@
  17525. struct net_device *dev; /* pointer to device structure */
  17526. struct net_device *next;
  17527. - u32 bus_type; /* bus type (0 == PCI, 1 == EISA) */
  17528. - u16 base_addr; /* base I/O address (same as dev->base_addr) */
  17529. + u32 bus_type; /* bus type (0 == PCI, 1 == EISA, 2 == TC) */
  17530. + long base_addr; /* base I/O address (same as dev->base_addr) */
  17531. + int slot; /* TC slot number */
  17532. struct pci_dev * pci_dev;
  17533. u32 full_duplex_enb; /* FDDI Full Duplex enable (1 == on, 2 == off) */
  17534. u32 req_ttrt; /* requested TTRT value (in 80ns units) */
  17535. diff -Nur linux-2.4.32-rc1/drivers/net/hamradio/hdlcdrv.c linux-2.4.32-rc1.mips/drivers/net/hamradio/hdlcdrv.c
  17536. --- linux-2.4.32-rc1/drivers/net/hamradio/hdlcdrv.c 2002-02-25 20:37:59.000000000 +0100
  17537. +++ linux-2.4.32-rc1.mips/drivers/net/hamradio/hdlcdrv.c 2004-05-04 14:04:27.000000000 +0200
  17538. @@ -587,6 +587,8 @@
  17539. return -EINVAL;
  17540. s = (struct hdlcdrv_state *)dev->priv;
  17541. + netif_stop_queue(dev);
  17542. +
  17543. if (s->ops && s->ops->close)
  17544. i = s->ops->close(dev);
  17545. if (s->skb)
  17546. diff -Nur linux-2.4.32-rc1/drivers/net/irda/au1k_ir.c linux-2.4.32-rc1.mips/drivers/net/irda/au1k_ir.c
  17547. --- linux-2.4.32-rc1/drivers/net/irda/au1k_ir.c 2004-02-18 14:36:31.000000000 +0100
  17548. +++ linux-2.4.32-rc1.mips/drivers/net/irda/au1k_ir.c 2005-02-03 07:35:29.000000000 +0100
  17549. @@ -81,10 +81,6 @@
  17550. #define RUN_AT(x) (jiffies + (x))
  17551. -#if defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100)
  17552. -static BCSR * const bcsr = (BCSR *)0xAE000000;
  17553. -#endif
  17554. -
  17555. static spinlock_t ir_lock = SPIN_LOCK_UNLOCKED;
  17556. /*
  17557. diff -Nur linux-2.4.32-rc1/drivers/net/sgiseeq.c linux-2.4.32-rc1.mips/drivers/net/sgiseeq.c
  17558. --- linux-2.4.32-rc1/drivers/net/sgiseeq.c 2005-01-19 15:09:56.000000000 +0100
  17559. +++ linux-2.4.32-rc1.mips/drivers/net/sgiseeq.c 2005-09-23 16:35:27.000000000 +0200
  17560. @@ -24,16 +24,16 @@
  17561. #include <asm/io.h>
  17562. #include <asm/system.h>
  17563. #include <asm/bitops.h>
  17564. +#include <asm/paccess.h>
  17565. #include <asm/page.h>
  17566. #include <asm/pgtable.h>
  17567. +#include <asm/sgi/mc.h>
  17568. #include <asm/sgi/hpc3.h>
  17569. #include <asm/sgi/ip22.h>
  17570. #include <asm/sgialib.h>
  17571. #include "sgiseeq.h"
  17572. -static char *version = "sgiseeq.c: David S. Miller ([email protected])\n";
  17573. -
  17574. static char *sgiseeqstr = "SGI Seeq8003";
  17575. /*
  17576. @@ -113,9 +113,9 @@
  17577. static inline void hpc3_eth_reset(struct hpc3_ethregs *hregs)
  17578. {
  17579. - hregs->rx_reset = HPC3_ERXRST_CRESET | HPC3_ERXRST_CLRIRQ;
  17580. + hregs->reset = HPC3_ERST_CRESET | HPC3_ERST_CLRIRQ;
  17581. udelay(20);
  17582. - hregs->rx_reset = 0;
  17583. + hregs->reset = 0;
  17584. }
  17585. static inline void reset_hpc3_and_seeq(struct hpc3_ethregs *hregs,
  17586. @@ -238,7 +238,6 @@
  17587. #define TSTAT_INIT_SEEQ (SEEQ_TCMD_IPT|SEEQ_TCMD_I16|SEEQ_TCMD_IC|SEEQ_TCMD_IUF)
  17588. #define TSTAT_INIT_EDLC ((TSTAT_INIT_SEEQ) | SEEQ_TCMD_RB2)
  17589. -#define RDMACFG_INIT (HPC3_ERXDCFG_FRXDC | HPC3_ERXDCFG_FEOP | HPC3_ERXDCFG_FIRQ)
  17590. static int init_seeq(struct net_device *dev, struct sgiseeq_private *sp,
  17591. struct sgiseeq_regs *sregs)
  17592. @@ -260,8 +259,6 @@
  17593. sregs->tstat = TSTAT_INIT_SEEQ;
  17594. }
  17595. - hregs->rx_dconfig |= RDMACFG_INIT;
  17596. -
  17597. hregs->rx_ndptr = PHYSADDR(&sp->srings.rx_desc[0]);
  17598. hregs->tx_ndptr = PHYSADDR(&sp->srings.tx_desc[0]);
  17599. @@ -432,7 +429,7 @@
  17600. spin_lock(&sp->tx_lock);
  17601. /* Ack the IRQ and set software state. */
  17602. - hregs->rx_reset = HPC3_ERXRST_CLRIRQ;
  17603. + hregs->reset = HPC3_ERST_CLRIRQ;
  17604. /* Always check for received packets. */
  17605. sgiseeq_rx(dev, sp, hregs, sregs);
  17606. @@ -616,7 +613,7 @@
  17607. #define ALIGNED(x) ((((unsigned long)(x)) + 0xf) & ~(0xf))
  17608. -int sgiseeq_init(struct hpc3_regs* regs, int irq)
  17609. +int sgiseeq_init(struct hpc3_regs* hpcregs, int irq, int has_eeprom)
  17610. {
  17611. struct net_device *dev;
  17612. struct sgiseeq_private *sp;
  17613. @@ -629,7 +626,7 @@
  17614. goto err_out;
  17615. }
  17616. /* Make private data page aligned */
  17617. - sp = (struct sgiseeq_private *) get_zeroed_page(GFP_KERNEL);
  17618. + sp = (struct sgiseeq_private *) get_zeroed_page(GFP_KERNEL);
  17619. if (!sp) {
  17620. printk(KERN_ERR "Sgiseeq: Page alloc failed, aborting.\n");
  17621. err = -ENOMEM;
  17622. @@ -644,7 +641,9 @@
  17623. #define EADDR_NVOFS 250
  17624. for (i = 0; i < 3; i++) {
  17625. - unsigned short tmp = ip22_nvram_read(EADDR_NVOFS / 2 + i);
  17626. + unsigned short tmp = has_eeprom ?
  17627. + ip22_eeprom_read(&hpcregs->eeprom, EADDR_NVOFS / 2+i) :
  17628. + ip22_nvram_read(EADDR_NVOFS / 2+i);
  17629. dev->dev_addr[2 * i] = tmp >> 8;
  17630. dev->dev_addr[2 * i + 1] = tmp & 0xff;
  17631. @@ -654,8 +653,8 @@
  17632. gpriv = sp;
  17633. gdev = dev;
  17634. #endif
  17635. - sp->sregs = (struct sgiseeq_regs *) &hpc3c0->eth_ext[0];
  17636. - sp->hregs = &hpc3c0->ethregs;
  17637. + sp->sregs = (struct sgiseeq_regs *) &hpcregs->eth_ext[0];
  17638. + sp->hregs = &hpcregs->ethregs;
  17639. sp->name = sgiseeqstr;
  17640. sp->mode = SEEQ_RCMD_RBCAST;
  17641. @@ -672,6 +671,11 @@
  17642. setup_rx_ring(sp->srings.rx_desc, SEEQ_RX_BUFFERS);
  17643. setup_tx_ring(sp->srings.tx_desc, SEEQ_TX_BUFFERS);
  17644. + /* Setup PIO and DMA transfer timing */
  17645. + sp->hregs->pconfig = 0x161;
  17646. + sp->hregs->dconfig = HPC3_EDCFG_FIRQ | HPC3_EDCFG_FEOP |
  17647. + HPC3_EDCFG_FRXDC | HPC3_EDCFG_PTO | 0x026;
  17648. +
  17649. /* Reset the chip. */
  17650. hpc3_eth_reset(sp->hregs);
  17651. @@ -699,7 +703,7 @@
  17652. goto err_out_free_irq;
  17653. }
  17654. - printk(KERN_INFO "%s: SGI Seeq8003 ", dev->name);
  17655. + printk(KERN_INFO "%s: %s ", dev->name, sgiseeqstr);
  17656. for (i = 0; i < 6; i++)
  17657. printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
  17658. @@ -721,10 +725,22 @@
  17659. static int __init sgiseeq_probe(void)
  17660. {
  17661. - printk(version);
  17662. + unsigned int tmp, ret1, ret2 = 0;
  17663. /* On board adapter on 1st HPC is always present */
  17664. - return sgiseeq_init(hpc3c0, SGI_ENET_IRQ);
  17665. + ret1 = sgiseeq_init(hpc3c0, SGI_ENET_IRQ, 0);
  17666. + /* Let's see if second HPC is there */
  17667. + if (!(ip22_is_fullhouse()) &&
  17668. + get_dbe(tmp, (unsigned int *)&hpc3c1->pbdma[1]) == 0) {
  17669. + sgimc->giopar |= SGIMC_GIOPAR_MASTEREXP1 |
  17670. + SGIMC_GIOPAR_EXP164 |
  17671. + SGIMC_GIOPAR_HPC264;
  17672. + hpc3c1->pbus_piocfg[0][0] = 0x3ffff;
  17673. + /* interrupt/config register on Challenge S Mezz board */
  17674. + hpc3c1->pbus_extregs[0][0] = 0x30;
  17675. + ret2 = sgiseeq_init(hpc3c1, SGI_GIO_0_IRQ, 1);
  17676. + }
  17677. + return (ret1 & ret2) ? ret1 : 0;
  17678. }
  17679. static void __exit sgiseeq_exit(void)
  17680. @@ -747,4 +763,6 @@
  17681. module_init(sgiseeq_probe);
  17682. module_exit(sgiseeq_exit);
  17683. +MODULE_DESCRIPTION("SGI Seeq 8003 driver");
  17684. +MODULE_AUTHOR("David S. Miller");
  17685. MODULE_LICENSE("GPL");
  17686. diff -Nur linux-2.4.32-rc1/drivers/pci/pci.c linux-2.4.32-rc1.mips/drivers/pci/pci.c
  17687. --- linux-2.4.32-rc1/drivers/pci/pci.c 2004-11-17 12:54:21.000000000 +0100
  17688. +++ linux-2.4.32-rc1.mips/drivers/pci/pci.c 2004-11-19 01:28:41.000000000 +0100
  17689. @@ -1281,11 +1281,17 @@
  17690. {
  17691. unsigned int buses;
  17692. unsigned short cr;
  17693. + unsigned short bctl;
  17694. struct pci_bus *child;
  17695. int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS);
  17696. pci_read_config_dword(dev, PCI_PRIMARY_BUS, &buses);
  17697. DBG("Scanning behind PCI bridge %s, config %06x, pass %d\n", dev->slot_name, buses & 0xffffff, pass);
  17698. + /* Disable MasterAbortMode during probing to avoid reporting
  17699. + of bus errors (in some architectures) */
  17700. + pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &bctl);
  17701. + pci_write_config_word(dev, PCI_BRIDGE_CONTROL,
  17702. + bctl & ~PCI_BRIDGE_CTL_MASTER_ABORT);
  17703. if ((buses & 0xffff00) && !pcibios_assign_all_busses()) {
  17704. /*
  17705. * Bus already configured by firmware, process it in the first
  17706. @@ -1351,6 +1357,7 @@
  17707. pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max);
  17708. pci_write_config_word(dev, PCI_COMMAND, cr);
  17709. }
  17710. + pci_write_config_word(dev, PCI_BRIDGE_CONTROL, bctl);
  17711. sprintf(child->name, (is_cardbus ? "PCI CardBus #%02x" : "PCI Bus #%02x"), child->number);
  17712. return max;
  17713. }
  17714. diff -Nur linux-2.4.32-rc1/drivers/pcmcia/au1000_db1x00.c linux-2.4.32-rc1.mips/drivers/pcmcia/au1000_db1x00.c
  17715. --- linux-2.4.32-rc1/drivers/pcmcia/au1000_db1x00.c 2005-01-19 15:09:57.000000000 +0100
  17716. +++ linux-2.4.32-rc1.mips/drivers/pcmcia/au1000_db1x00.c 2005-02-03 07:35:30.000000000 +0100
  17717. @@ -1,6 +1,6 @@
  17718. /*
  17719. *
  17720. - * Alchemy Semi Db1x00 boards specific pcmcia routines.
  17721. + * AMD Alchemy DUAL-SLOT Db1x00 boards' specific pcmcia routines.
  17722. *
  17723. * Copyright 2002 MontaVista Software Inc.
  17724. * Author: MontaVista Software, Inc.
  17725. @@ -54,9 +54,20 @@
  17726. #include <asm/au1000.h>
  17727. #include <asm/au1000_pcmcia.h>
  17728. +#if defined(CONFIG_MIPS_PB1200)
  17729. +#include <asm/pb1200.h>
  17730. +#elif defined(CONFIG_MIPS_DB1200)
  17731. +#include <asm/db1200.h>
  17732. +#else
  17733. #include <asm/db1x00.h>
  17734. +#endif
  17735. -static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  17736. +#define PCMCIA_MAX_SOCK 1
  17737. +#define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1)
  17738. +
  17739. +/* VPP/VCC */
  17740. +#define SET_VCC_VPP(VCC, VPP, SLOT)\
  17741. + ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8))
  17742. static int db1x00_pcmcia_init(struct pcmcia_init *init)
  17743. {
  17744. @@ -76,7 +87,7 @@
  17745. db1x00_pcmcia_socket_state(unsigned sock, struct pcmcia_state *state)
  17746. {
  17747. u32 inserted;
  17748. - unsigned char vs;
  17749. + u16 vs;
  17750. if(sock > PCMCIA_MAX_SOCK) return -1;
  17751. @@ -87,11 +98,11 @@
  17752. if (sock == 0) {
  17753. vs = bcsr->status & 0x3;
  17754. - inserted = !(bcsr->status & (1<<4));
  17755. + inserted = BOARD_CARD_INSERTED(0);
  17756. }
  17757. else {
  17758. vs = (bcsr->status & 0xC)>>2;
  17759. - inserted = !(bcsr->status & (1<<5));
  17760. + inserted = BOARD_CARD_INSERTED(1);
  17761. }
  17762. DEBUG(KERN_DEBUG "db1x00 socket %d: inserted %d, vs %d\n",
  17763. @@ -144,16 +155,9 @@
  17764. if(info->sock > PCMCIA_MAX_SOCK) return -1;
  17765. if(info->sock == 0)
  17766. -#ifdef CONFIG_MIPS_DB1550
  17767. - info->irq = AU1000_GPIO_3;
  17768. + info->irq = BOARD_PC0_INT;
  17769. else
  17770. - info->irq = AU1000_GPIO_5;
  17771. -#else
  17772. - info->irq = AU1000_GPIO_2;
  17773. - else
  17774. - info->irq = AU1000_GPIO_5;
  17775. -#endif
  17776. -
  17777. + info->irq = BOARD_PC1_INT;
  17778. return 0;
  17779. }
  17780. diff -Nur linux-2.4.32-rc1/drivers/pcmcia/Config.in linux-2.4.32-rc1.mips/drivers/pcmcia/Config.in
  17781. --- linux-2.4.32-rc1/drivers/pcmcia/Config.in 2004-02-18 14:36:31.000000000 +0100
  17782. +++ linux-2.4.32-rc1.mips/drivers/pcmcia/Config.in 2004-02-22 06:21:34.000000000 +0100
  17783. @@ -30,16 +30,14 @@
  17784. dep_tristate ' M8xx support' CONFIG_PCMCIA_M8XX $CONFIG_PCMCIA
  17785. fi
  17786. if [ "$CONFIG_SOC_AU1X00" = "y" ]; then
  17787. - dep_tristate ' Au1x00 PCMCIA support' CONFIG_PCMCIA_AU1X00 $CONFIG_PCMCIA
  17788. - if [ "$CONFIG_PCMCIA_AU1X00" != "n" ]; then
  17789. - bool ' Pb1x00 board support' CONFIG_PCMCIA_PB1X00
  17790. - bool ' Db1x00 board support' CONFIG_PCMCIA_DB1X00
  17791. - bool ' XXS1500 board support' CONFIG_PCMCIA_XXS1500
  17792. - fi
  17793. + dep_tristate ' Au1x00 PCMCIA support' CONFIG_PCMCIA_AU1X00 $CONFIG_PCMCIA
  17794. fi
  17795. if [ "$CONFIG_SIBYTE_SB1xxx_SOC" = "y" ]; then
  17796. dep_bool ' SiByte PCMCIA support' CONFIG_PCMCIA_SIBYTE $CONFIG_PCMCIA $CONFIG_BLK_DEV_IDE_SIBYTE
  17797. fi
  17798. + if [ "$CONFIG_VRC4171" = "y" -o "$CONFIG_VRC4171" = "m" ]; then
  17799. + dep_tristate ' NEC VRC4171 Card Controllers support' CONFIG_PCMCIA_VRC4171 $CONFIG_PCMCIA
  17800. + fi
  17801. if [ "$CONFIG_VRC4173" = "y" -o "$CONFIG_VRC4173" = "m" ]; then
  17802. dep_tristate ' NEC VRC4173 CARDU support' CONFIG_PCMCIA_VRC4173 $CONFIG_PCMCIA
  17803. fi
  17804. diff -Nur linux-2.4.32-rc1/drivers/pcmcia/Makefile linux-2.4.32-rc1.mips/drivers/pcmcia/Makefile
  17805. --- linux-2.4.32-rc1/drivers/pcmcia/Makefile 2004-02-18 14:36:31.000000000 +0100
  17806. +++ linux-2.4.32-rc1.mips/drivers/pcmcia/Makefile 2005-02-03 07:35:30.000000000 +0100
  17807. @@ -61,9 +61,18 @@
  17808. obj-$(CONFIG_PCMCIA_AU1X00) += au1x00_ss.o
  17809. au1000_ss-objs-y := au1000_generic.o
  17810. -au1000_ss-objs-$(CONFIG_PCMCIA_PB1X00) += au1000_pb1x00.o
  17811. -au1000_ss-objs-$(CONFIG_PCMCIA_DB1X00) += au1000_db1x00.o
  17812. -au1000_ss-objs-$(CONFIG_PCMCIA_XXS1500) += au1000_xxs1500.o
  17813. +au1000_ss-objs-$(CONFIG_MIPS_PB1000) += au1000_pb1x00.o
  17814. +au1000_ss-objs-$(CONFIG_MIPS_PB1100) += au1000_pb1x00.o
  17815. +au1000_ss-objs-$(CONFIG_MIPS_PB1500) += au1000_pb1x00.o
  17816. +au1000_ss-objs-$(CONFIG_MIPS_PB1550) += au1000_pb1550.o
  17817. +au1000_ss-objs-$(CONFIG_MIPS_PB1200) += au1000_db1x00.o
  17818. +au1000_ss-objs-$(CONFIG_MIPS_DB1000) += au1000_db1x00.o
  17819. +au1000_ss-objs-$(CONFIG_MIPS_DB1100) += au1000_db1x00.o
  17820. +au1000_ss-objs-$(CONFIG_MIPS_DB1500) += au1000_db1x00.o
  17821. +au1000_ss-objs-$(CONFIG_MIPS_DB1550) += au1000_db1x00.o
  17822. +au1000_ss-objs-$(CONFIG_MIPS_DB1200) += au1000_db1x00.o
  17823. +au1000_ss-objs-$(CONFIG_MIPS_HYDROGEN3) += au1000_hydrogen3.o
  17824. +au1000_ss-objs-$(CONFIG_MIPS_XXS1500) += au1000_xxs1500.o
  17825. obj-$(CONFIG_PCMCIA_SA1100) += sa1100_cs.o
  17826. obj-$(CONFIG_PCMCIA_M8XX) += m8xx_pcmcia.o
  17827. @@ -89,6 +98,7 @@
  17828. sa1100_cs-objs-$(CONFIG_SA1100_XP860) += sa1100_xp860.o sa1111_generic.o
  17829. sa1100_cs-objs-$(CONFIG_SA1100_YOPY) += sa1100_yopy.o
  17830. +obj-$(CONFIG_PCMCIA_VRC4171) += vrc4171_card.o
  17831. obj-$(CONFIG_PCMCIA_VRC4173) += vrc4173_cardu.o
  17832. include $(TOPDIR)/Rules.make
  17833. diff -Nur linux-2.4.32-rc1/drivers/pcmcia/vrc4171_card.c linux-2.4.32-rc1.mips/drivers/pcmcia/vrc4171_card.c
  17834. --- linux-2.4.32-rc1/drivers/pcmcia/vrc4171_card.c 1970-01-01 01:00:00.000000000 +0100
  17835. +++ linux-2.4.32-rc1.mips/drivers/pcmcia/vrc4171_card.c 2004-01-19 16:54:58.000000000 +0100
  17836. @@ -0,0 +1,886 @@
  17837. +/*
  17838. + * vrc4171_card.c, NEC VRC4171 Card Controller driver for Socket Services.
  17839. + *
  17840. + * Copyright (C) 2003 Yoichi Yuasa <[email protected]>
  17841. + *
  17842. + * This program is free software; you can redistribute it and/or modify
  17843. + * it under the terms of the GNU General Public License as published by
  17844. + * the Free Software Foundation; either version 2 of the License, or
  17845. + * (at your option) any later version.
  17846. + *
  17847. + * This program is distributed in the hope that it will be useful,
  17848. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17849. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17850. + * GNU General Public License for more details.
  17851. + *
  17852. + * You should have received a copy of the GNU General Public License
  17853. + * along with this program; if not, write to the Free Software
  17854. + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17855. + */
  17856. +#include <linux/init.h>
  17857. +#include <linux/ioport.h>
  17858. +#include <linux/irq.h>
  17859. +#include <linux/module.h>
  17860. +#include <linux/spinlock.h>
  17861. +#include <linux/sched.h>
  17862. +#include <linux/types.h>
  17863. +
  17864. +#include <asm/io.h>
  17865. +#include <asm/vr41xx/vrc4171.h>
  17866. +
  17867. +#include <pcmcia/ss.h>
  17868. +
  17869. +#include "i82365.h"
  17870. +
  17871. +MODULE_DESCRIPTION("NEC VRC4171 Card Controllers driver for Socket Services");
  17872. +MODULE_AUTHOR("Yoichi Yuasa <[email protected]>");
  17873. +MODULE_LICENSE("GPL");
  17874. +
  17875. +#define CARD_MAX_SLOTS 2
  17876. +#define CARD_SLOTA 0
  17877. +#define CARD_SLOTB 1
  17878. +#define CARD_SLOTB_OFFSET 0x40
  17879. +
  17880. +#define CARD_MEM_START 0x10000000
  17881. +#define CARD_MEM_END 0x13ffffff
  17882. +#define CARD_MAX_MEM_OFFSET 0x3ffffff
  17883. +#define CARD_MAX_MEM_SPEED 1000
  17884. +
  17885. +#define CARD_CONTROLLER_INDEX 0x03e0
  17886. +#define CARD_CONTROLLER_DATA 0x03e1
  17887. +#define CARD_CONTROLLER_SIZE 2
  17888. + /* Power register */
  17889. + #define VPP_GET_VCC 0x01
  17890. + #define POWER_ENABLE 0x10
  17891. + #define CARD_VOLTAGE_SENSE 0x1f
  17892. + #define VCC_3VORXV_CAPABLE 0x00
  17893. + #define VCC_XV_ONLY 0x01
  17894. + #define VCC_3V_CAPABLE 0x02
  17895. + #define VCC_5V_ONLY 0x03
  17896. + #define CARD_VOLTAGE_SELECT 0x2f
  17897. + #define VCC_3V 0x01
  17898. + #define VCC_5V 0x00
  17899. + #define VCC_XV 0x02
  17900. + #define VCC_STATUS_3V 0x02
  17901. + #define VCC_STATUS_5V 0x01
  17902. + #define VCC_STATUS_XV 0x03
  17903. + #define GLOBAL_CONTROL 0x1e
  17904. + #define EXWRBK 0x04
  17905. + #define IRQPM_EN 0x08
  17906. + #define CLRPMIRQ 0x10
  17907. +
  17908. +#define IO_MAX_MAPS 2
  17909. +#define MEM_MAX_MAPS 5
  17910. +
  17911. +enum {
  17912. + SLOTB_PROBE = 0,
  17913. + SLOTB_NOPROBE_IO,
  17914. + SLOTB_NOPROBE_MEM,
  17915. + SLOTB_NOPROBE_ALL
  17916. +};
  17917. +
  17918. +typedef struct vrc4171_socket {
  17919. + int noprobe;
  17920. + void (*handler)(void *, unsigned int);
  17921. + void *info;
  17922. + socket_cap_t cap;
  17923. + spinlock_t event_lock;
  17924. + uint16_t events;
  17925. + struct socket_info_t *pcmcia_socket;
  17926. + struct tq_struct tq_task;
  17927. + char name[24];
  17928. + int csc_irq;
  17929. + int io_irq;
  17930. +} vrc4171_socket_t;
  17931. +
  17932. +static vrc4171_socket_t vrc4171_sockets[CARD_MAX_SLOTS];
  17933. +static int vrc4171_slotb = SLOTB_IS_NONE;
  17934. +static unsigned int vrc4171_irq;
  17935. +static uint16_t vrc4171_irq_mask = 0xdeb8;
  17936. +
  17937. +extern struct socket_info_t *pcmcia_register_socket(int slot,
  17938. + struct pccard_operations *vtable,
  17939. + int use_bus_pm);
  17940. +extern void pcmcia_unregister_socket(struct socket_info_t *s);
  17941. +
  17942. +static inline uint8_t exca_read_byte(int slot, uint8_t index)
  17943. +{
  17944. + if (slot == CARD_SLOTB)
  17945. + index += CARD_SLOTB_OFFSET;
  17946. +
  17947. + outb(index, CARD_CONTROLLER_INDEX);
  17948. + return inb(CARD_CONTROLLER_DATA);
  17949. +}
  17950. +
  17951. +static inline uint16_t exca_read_word(int slot, uint8_t index)
  17952. +{
  17953. + uint16_t data;
  17954. +
  17955. + if (slot == CARD_SLOTB)
  17956. + index += CARD_SLOTB_OFFSET;
  17957. +
  17958. + outb(index++, CARD_CONTROLLER_INDEX);
  17959. + data = inb(CARD_CONTROLLER_DATA);
  17960. +
  17961. + outb(index, CARD_CONTROLLER_INDEX);
  17962. + data |= ((uint16_t)inb(CARD_CONTROLLER_DATA)) << 8;
  17963. +
  17964. + return data;
  17965. +}
  17966. +
  17967. +static inline uint8_t exca_write_byte(int slot, uint8_t index, uint8_t data)
  17968. +{
  17969. + if (slot == CARD_SLOTB)
  17970. + index += CARD_SLOTB_OFFSET;
  17971. +
  17972. + outb(index, CARD_CONTROLLER_INDEX);
  17973. + outb(data, CARD_CONTROLLER_DATA);
  17974. +
  17975. + return data;
  17976. +}
  17977. +
  17978. +static inline uint16_t exca_write_word(int slot, uint8_t index, uint16_t data)
  17979. +{
  17980. + if (slot == CARD_SLOTB)
  17981. + index += CARD_SLOTB_OFFSET;
  17982. +
  17983. + outb(index++, CARD_CONTROLLER_INDEX);
  17984. + outb(data, CARD_CONTROLLER_DATA);
  17985. +
  17986. + outb(index, CARD_CONTROLLER_INDEX);
  17987. + outb((uint8_t)(data >> 8), CARD_CONTROLLER_DATA);
  17988. +
  17989. + return data;
  17990. +}
  17991. +
  17992. +static inline int search_nonuse_irq(void)
  17993. +{
  17994. + int i;
  17995. +
  17996. + for (i = 0; i < 16; i++) {
  17997. + if (vrc4171_irq_mask & (1 << i)) {
  17998. + vrc4171_irq_mask &= ~(1 << i);
  17999. + return i;
  18000. + }
  18001. + }
  18002. +
  18003. + return -1;
  18004. +}
  18005. +
  18006. +static int pccard_init(unsigned int slot)
  18007. +{
  18008. + vrc4171_socket_t *socket = &vrc4171_sockets[slot];
  18009. +
  18010. + socket->cap.features |= SS_CAP_PCCARD | SS_CAP_PAGE_REGS;
  18011. + socket->cap.irq_mask = 0;
  18012. + socket->cap.pci_irq = vrc4171_irq;
  18013. + socket->cap.map_size = 0x1000;
  18014. + socket->events = 0;
  18015. + spin_lock_init(socket->event_lock);
  18016. + socket->csc_irq = search_nonuse_irq();
  18017. + socket->io_irq = search_nonuse_irq();
  18018. +
  18019. + return 0;
  18020. +}
  18021. +
  18022. +static int pccard_suspend(unsigned int slot)
  18023. +{
  18024. + return -EINVAL;
  18025. +}
  18026. +
  18027. +static int pccard_register_callback(unsigned int slot,
  18028. + void (*handler)(void *, unsigned int),
  18029. + void *info)
  18030. +{
  18031. + vrc4171_socket_t *socket;
  18032. +
  18033. + if (slot >= CARD_MAX_SLOTS)
  18034. + return -EINVAL;
  18035. +
  18036. + socket = &vrc4171_sockets[slot];
  18037. +
  18038. + socket->handler = handler;
  18039. + socket->info = info;
  18040. +
  18041. + if (handler)
  18042. + MOD_INC_USE_COUNT;
  18043. + else
  18044. + MOD_DEC_USE_COUNT;
  18045. +
  18046. + return 0;
  18047. +}
  18048. +
  18049. +static int pccard_inquire_socket(unsigned int slot, socket_cap_t *cap)
  18050. +{
  18051. + vrc4171_socket_t *socket;
  18052. +
  18053. + if (slot >= CARD_MAX_SLOTS || cap == NULL)
  18054. + return -EINVAL;
  18055. +
  18056. + socket = &vrc4171_sockets[slot];
  18057. +
  18058. + *cap = socket->cap;
  18059. +
  18060. + return 0;
  18061. +}
  18062. +
  18063. +static int pccard_get_status(unsigned int slot, u_int *value)
  18064. +{
  18065. + uint8_t status, sense;
  18066. + u_int val = 0;
  18067. +
  18068. + if (slot >= CARD_MAX_SLOTS || value == NULL)
  18069. + return -EINVAL;
  18070. +
  18071. + status = exca_read_byte(slot, I365_STATUS);
  18072. + if (exca_read_byte(slot, I365_INTCTL) & I365_PC_IOCARD) {
  18073. + if (status & I365_CS_STSCHG)
  18074. + val |= SS_STSCHG;
  18075. + } else {
  18076. + if (!(status & I365_CS_BVD1))
  18077. + val |= SS_BATDEAD;
  18078. + else if ((status & (I365_CS_BVD1 | I365_CS_BVD2)) == I365_CS_BVD1)
  18079. + val |= SS_BATWARN;
  18080. + }
  18081. + if ((status & I365_CS_DETECT) == I365_CS_DETECT)
  18082. + val |= SS_DETECT;
  18083. + if (status & I365_CS_WRPROT)
  18084. + val |= SS_WRPROT;
  18085. + if (status & I365_CS_READY)
  18086. + val |= SS_READY;
  18087. + if (status & I365_CS_POWERON)
  18088. + val |= SS_POWERON;
  18089. +
  18090. + sense = exca_read_byte(slot, CARD_VOLTAGE_SENSE);
  18091. + switch (sense) {
  18092. + case VCC_3VORXV_CAPABLE:
  18093. + val |= SS_3VCARD | SS_XVCARD;
  18094. + break;
  18095. + case VCC_XV_ONLY:
  18096. + val |= SS_XVCARD;
  18097. + break;
  18098. + case VCC_3V_CAPABLE:
  18099. + val |= SS_3VCARD;
  18100. + break;
  18101. + default:
  18102. + /* 5V only */
  18103. + break;
  18104. + }
  18105. +
  18106. + *value = val;
  18107. +
  18108. + return 0;
  18109. +}
  18110. +
  18111. +static inline u_char get_Vcc_value(uint8_t voltage)
  18112. +{
  18113. + switch (voltage) {
  18114. + case VCC_STATUS_3V:
  18115. + return 33;
  18116. + case VCC_STATUS_5V:
  18117. + return 50;
  18118. + default:
  18119. + break;
  18120. + }
  18121. +
  18122. + return 0;
  18123. +}
  18124. +
  18125. +static inline u_char get_Vpp_value(uint8_t power, u_char Vcc)
  18126. +{
  18127. + if ((power & 0x03) == 0x01 || (power & 0x03) == 0x02)
  18128. + return Vcc;
  18129. +
  18130. + return 0;
  18131. +}
  18132. +
  18133. +static int pccard_get_socket(unsigned int slot, socket_state_t *state)
  18134. +{
  18135. + vrc4171_socket_t *socket;
  18136. + uint8_t power, voltage, control, cscint;
  18137. +
  18138. + if (slot >= CARD_MAX_SLOTS || state == NULL)
  18139. + return -EINVAL;
  18140. +
  18141. + socket = &vrc4171_sockets[slot];
  18142. +
  18143. + power = exca_read_byte(slot, I365_POWER);
  18144. + voltage = exca_read_byte(slot, CARD_VOLTAGE_SELECT);
  18145. +
  18146. + state->Vcc = get_Vcc_value(voltage);
  18147. + state->Vpp = get_Vpp_value(power, state->Vcc);
  18148. +
  18149. + state->flags = 0;
  18150. + if (power & POWER_ENABLE)
  18151. + state->flags |= SS_PWR_AUTO;
  18152. + if (power & I365_PWR_OUT)
  18153. + state->flags |= SS_OUTPUT_ENA;
  18154. +
  18155. + control = exca_read_byte(slot, I365_INTCTL);
  18156. + if (control & I365_PC_IOCARD)
  18157. + state->flags |= SS_IOCARD;
  18158. + if (!(control & I365_PC_RESET))
  18159. + state->flags |= SS_RESET;
  18160. +
  18161. + cscint = exca_read_byte(slot, I365_CSCINT);
  18162. + state->csc_mask = 0;
  18163. + if (state->flags & SS_IOCARD) {
  18164. + if (cscint & I365_CSC_STSCHG)
  18165. + state->flags |= SS_STSCHG;
  18166. + } else {
  18167. + if (cscint & I365_CSC_BVD1)
  18168. + state->csc_mask |= SS_BATDEAD;
  18169. + if (cscint & I365_CSC_BVD2)
  18170. + state->csc_mask |= SS_BATWARN;
  18171. + }
  18172. + if (cscint & I365_CSC_READY)
  18173. + state->csc_mask |= SS_READY;
  18174. + if (cscint & I365_CSC_DETECT)
  18175. + state->csc_mask |= SS_DETECT;
  18176. +
  18177. + return 0;
  18178. +}
  18179. +
  18180. +static inline uint8_t set_Vcc_value(u_char Vcc)
  18181. +{
  18182. + switch (Vcc) {
  18183. + case 33:
  18184. + return VCC_3V;
  18185. + case 50:
  18186. + return VCC_5V;
  18187. + }
  18188. +
  18189. + /* Small voltage is chosen for safety. */
  18190. + return VCC_3V;
  18191. +}
  18192. +
  18193. +static int pccard_set_socket(unsigned int slot, socket_state_t *state)
  18194. +{
  18195. + vrc4171_socket_t *socket;
  18196. + uint8_t voltage, power, control, cscint;
  18197. +
  18198. + if (slot >= CARD_MAX_SLOTS ||
  18199. + (state->Vpp != state->Vcc && state->Vpp != 0) ||
  18200. + (state->Vcc != 50 && state->Vcc != 33 && state->Vcc != 0))
  18201. + return -EINVAL;
  18202. +
  18203. + socket = &vrc4171_sockets[slot];
  18204. +
  18205. + spin_lock_irq(&socket->event_lock);
  18206. +
  18207. + voltage = set_Vcc_value(state->Vcc);
  18208. + exca_write_byte(slot, CARD_VOLTAGE_SELECT, voltage);
  18209. +
  18210. + power = POWER_ENABLE;
  18211. + if (state->Vpp == state->Vcc)
  18212. + power |= VPP_GET_VCC;
  18213. + if (state->flags & SS_OUTPUT_ENA)
  18214. + power |= I365_PWR_OUT;
  18215. + exca_write_byte(slot, I365_POWER, power);
  18216. +
  18217. + control = 0;
  18218. + if (state->io_irq != 0)
  18219. + control |= socket->io_irq;
  18220. + if (state->flags & SS_IOCARD)
  18221. + control |= I365_PC_IOCARD;
  18222. + if (state->flags & SS_RESET)
  18223. + control &= ~I365_PC_RESET;
  18224. + else
  18225. + control |= I365_PC_RESET;
  18226. + exca_write_byte(slot, I365_INTCTL, control);
  18227. +
  18228. + cscint = 0;
  18229. + exca_write_byte(slot, I365_CSCINT, cscint);
  18230. + exca_read_byte(slot, I365_CSC); /* clear CardStatus change */
  18231. + if (state->csc_mask != 0)
  18232. + cscint |= socket->csc_irq << 8;
  18233. + if (state->flags & SS_IOCARD) {
  18234. + if (state->csc_mask & SS_STSCHG)
  18235. + cscint |= I365_CSC_STSCHG;
  18236. + } else {
  18237. + if (state->csc_mask & SS_BATDEAD)
  18238. + cscint |= I365_CSC_BVD1;
  18239. + if (state->csc_mask & SS_BATWARN)
  18240. + cscint |= I365_CSC_BVD2;
  18241. + }
  18242. + if (state->csc_mask & SS_READY)
  18243. + cscint |= I365_CSC_READY;
  18244. + if (state->csc_mask & SS_DETECT)
  18245. + cscint |= I365_CSC_DETECT;
  18246. + exca_write_byte(slot, I365_CSCINT, cscint);
  18247. +
  18248. + spin_unlock_irq(&socket->event_lock);
  18249. +
  18250. + return 0;
  18251. +}
  18252. +
  18253. +static int pccard_get_io_map(unsigned int slot, struct pccard_io_map *io)
  18254. +{
  18255. + vrc4171_socket_t *socket;
  18256. + uint8_t ioctl, addrwin;
  18257. + u_char map;
  18258. +
  18259. + if (slot >= CARD_MAX_SLOTS || io == NULL ||
  18260. + io->map >= IO_MAX_MAPS)
  18261. + return -EINVAL;
  18262. +
  18263. + socket = &vrc4171_sockets[slot];
  18264. + map = io->map;
  18265. +
  18266. + io->start = exca_read_word(slot, I365_IO(map)+I365_W_START);
  18267. + io->stop = exca_read_word(slot, I365_IO(map)+I365_W_STOP);
  18268. +
  18269. + ioctl = exca_read_byte(slot, I365_IOCTL);
  18270. + if (io->flags & I365_IOCTL_WAIT(map))
  18271. + io->speed = 1;
  18272. + else
  18273. + io->speed = 0;
  18274. +
  18275. + io->flags = 0;
  18276. + if (ioctl & I365_IOCTL_16BIT(map))
  18277. + io->flags |= MAP_16BIT;
  18278. + if (ioctl & I365_IOCTL_IOCS16(map))
  18279. + io->flags |= MAP_AUTOSZ;
  18280. + if (ioctl & I365_IOCTL_0WS(map))
  18281. + io->flags |= MAP_0WS;
  18282. +
  18283. + addrwin = exca_read_byte(slot, I365_ADDRWIN);
  18284. + if (addrwin & I365_ENA_IO(map))
  18285. + io->flags |= MAP_ACTIVE;
  18286. +
  18287. + return 0;
  18288. +}
  18289. +
  18290. +static int pccard_set_io_map(unsigned int slot, struct pccard_io_map *io)
  18291. +{
  18292. + vrc4171_socket_t *socket;
  18293. + uint8_t ioctl, addrwin;
  18294. + u_char map;
  18295. +
  18296. + if (slot >= CARD_MAX_SLOTS ||
  18297. + io == NULL || io->map >= IO_MAX_MAPS ||
  18298. + io->start > 0xffff || io->stop > 0xffff || io->start > io->stop)
  18299. + return -EINVAL;
  18300. +
  18301. + socket = &vrc4171_sockets[slot];
  18302. + map = io->map;
  18303. +
  18304. + addrwin = exca_read_byte(slot, I365_ADDRWIN);
  18305. + if (addrwin & I365_ENA_IO(map)) {
  18306. + addrwin &= ~I365_ENA_IO(map);
  18307. + exca_write_byte(slot, I365_ADDRWIN, addrwin);
  18308. + }
  18309. +
  18310. + exca_write_word(slot, I365_IO(map)+I365_W_START, io->start);
  18311. + exca_write_word(slot, I365_IO(map)+I365_W_STOP, io->stop);
  18312. +
  18313. + ioctl = 0;
  18314. + if (io->speed > 0)
  18315. + ioctl |= I365_IOCTL_WAIT(map);
  18316. + if (io->flags & MAP_16BIT)
  18317. + ioctl |= I365_IOCTL_16BIT(map);
  18318. + if (io->flags & MAP_AUTOSZ)
  18319. + ioctl |= I365_IOCTL_IOCS16(map);
  18320. + if (io->flags & MAP_0WS)
  18321. + ioctl |= I365_IOCTL_0WS(map);
  18322. + exca_write_byte(slot, I365_IOCTL, ioctl);
  18323. +
  18324. + if (io->flags & MAP_ACTIVE) {
  18325. + addrwin |= I365_ENA_IO(map);
  18326. + exca_write_byte(slot, I365_ADDRWIN, addrwin);
  18327. + }
  18328. +
  18329. + return 0;
  18330. +}
  18331. +
  18332. +static int pccard_get_mem_map(unsigned int slot, struct pccard_mem_map *mem)
  18333. +{
  18334. + vrc4171_socket_t *socket;
  18335. + uint8_t addrwin;
  18336. + u_long start, stop;
  18337. + u_int offset;
  18338. + u_char map;
  18339. +
  18340. + if (slot >= CARD_MAX_SLOTS || mem == NULL || mem->map >= MEM_MAX_MAPS)
  18341. + return -EINVAL;
  18342. +
  18343. + socket = &vrc4171_sockets[slot];
  18344. + map = mem->map;
  18345. +
  18346. + mem->flags = 0;
  18347. + mem->speed = 0;
  18348. +
  18349. + addrwin = exca_read_byte(slot, I365_ADDRWIN);
  18350. + if (addrwin & I365_ENA_MEM(map))
  18351. + mem->flags |= MAP_ACTIVE;
  18352. +
  18353. + start = exca_read_word(slot, I365_MEM(map)+I365_W_START);
  18354. + if (start & I365_MEM_16BIT)
  18355. + mem->flags |= MAP_16BIT;
  18356. + mem->sys_start = (start & 0x3fffUL) << 12;
  18357. +
  18358. + stop = exca_read_word(slot, I365_MEM(map)+I365_W_STOP);
  18359. + if (start & I365_MEM_WS0)
  18360. + mem->speed += 1;
  18361. + if (start & I365_MEM_WS1)
  18362. + mem->speed += 2;
  18363. + mem->sys_stop = ((stop & 0x3fffUL) << 12) + 0xfffUL;
  18364. +
  18365. + offset = exca_read_word(slot, I365_MEM(map)+I365_W_OFF);
  18366. + if (offset & I365_MEM_REG)
  18367. + mem->flags |= MAP_ATTRIB;
  18368. + if (offset & I365_MEM_WRPROT)
  18369. + mem->flags |= MAP_WRPROT;
  18370. + mem->card_start = (offset & 0x3fffUL) << 12;
  18371. +
  18372. + mem->sys_start += CARD_MEM_START;
  18373. + mem->sys_stop += CARD_MEM_START;
  18374. +
  18375. + return 0;
  18376. +}
  18377. +
  18378. +static int pccard_set_mem_map(unsigned int slot, struct pccard_mem_map *mem)
  18379. +{
  18380. + vrc4171_socket_t *socket;
  18381. + uint16_t start, stop, offset;
  18382. + uint8_t addrwin;
  18383. + u_char map;
  18384. +
  18385. + if (slot >= CARD_MAX_SLOTS ||
  18386. + mem == NULL || mem->map >= MEM_MAX_MAPS ||
  18387. + mem->sys_start < CARD_MEM_START || mem->sys_start > CARD_MEM_END ||
  18388. + mem->sys_stop < CARD_MEM_START || mem->sys_stop > CARD_MEM_END ||
  18389. + mem->sys_start > mem->sys_stop ||
  18390. + mem->card_start > CARD_MAX_MEM_OFFSET ||
  18391. + mem->speed > CARD_MAX_MEM_SPEED)
  18392. + return -EINVAL;
  18393. +
  18394. + socket = &vrc4171_sockets[slot];
  18395. + map = mem->map;
  18396. +
  18397. + addrwin = exca_read_byte(slot, I365_ADDRWIN);
  18398. + if (addrwin & I365_ENA_MEM(map)) {
  18399. + addrwin &= ~I365_ENA_MEM(map);
  18400. + exca_write_byte(slot, I365_ADDRWIN, addrwin);
  18401. + }
  18402. +
  18403. + start = (mem->sys_start >> 12) & 0x3fff;
  18404. + if (mem->flags & MAP_16BIT)
  18405. + start |= I365_MEM_16BIT;
  18406. + exca_write_word(slot, I365_MEM(map)+I365_W_START, start);
  18407. +
  18408. + stop = (mem->sys_stop >> 12) & 0x3fff;
  18409. + switch (mem->speed) {
  18410. + case 0:
  18411. + break;
  18412. + case 1:
  18413. + stop |= I365_MEM_WS0;
  18414. + break;
  18415. + case 2:
  18416. + stop |= I365_MEM_WS1;
  18417. + break;
  18418. + default:
  18419. + stop |= I365_MEM_WS0 | I365_MEM_WS1;
  18420. + break;
  18421. + }
  18422. + exca_write_word(slot, I365_MEM(map)+I365_W_STOP, stop);
  18423. +
  18424. + offset = (mem->card_start >> 12) & 0x3fff;
  18425. + if (mem->flags & MAP_ATTRIB)
  18426. + offset |= I365_MEM_REG;
  18427. + if (mem->flags & MAP_WRPROT)
  18428. + offset |= I365_MEM_WRPROT;
  18429. + exca_write_word(slot, I365_MEM(map)+I365_W_OFF, offset);
  18430. +
  18431. + if (mem->flags & MAP_ACTIVE) {
  18432. + addrwin |= I365_ENA_MEM(map);
  18433. + exca_write_byte(slot, I365_ADDRWIN, addrwin);
  18434. + }
  18435. +
  18436. + return 0;
  18437. +}
  18438. +
  18439. +static void pccard_proc_setup(unsigned int slot, struct proc_dir_entry *base)
  18440. +{
  18441. +}
  18442. +
  18443. +static struct pccard_operations vrc4171_pccard_operations = {
  18444. + .init = pccard_init,
  18445. + .suspend = pccard_suspend,
  18446. + .register_callback = pccard_register_callback,
  18447. + .inquire_socket = pccard_inquire_socket,
  18448. + .get_status = pccard_get_status,
  18449. + .get_socket = pccard_get_socket,
  18450. + .set_socket = pccard_set_socket,
  18451. + .get_io_map = pccard_get_io_map,
  18452. + .set_io_map = pccard_set_io_map,
  18453. + .get_mem_map = pccard_get_mem_map,
  18454. + .set_mem_map = pccard_set_mem_map,
  18455. + .proc_setup = pccard_proc_setup,
  18456. +};
  18457. +
  18458. +static void pccard_bh(void *data)
  18459. +{
  18460. + vrc4171_socket_t *socket = (vrc4171_socket_t *)data;
  18461. + uint16_t events;
  18462. +
  18463. + spin_lock_irq(&socket->event_lock);
  18464. + events = socket->events;
  18465. + socket->events = 0;
  18466. + spin_unlock_irq(&socket->event_lock);
  18467. +
  18468. + if (socket->handler)
  18469. + socket->handler(socket->info, events);
  18470. +}
  18471. +
  18472. +static inline uint16_t get_events(int slot)
  18473. +{
  18474. + uint16_t events = 0;
  18475. + uint8_t status, csc;
  18476. +
  18477. + status = exca_read_byte(slot, I365_STATUS);
  18478. + csc = exca_read_byte(slot, I365_CSC);
  18479. +
  18480. + if (exca_read_byte(slot, I365_INTCTL) & I365_PC_IOCARD) {
  18481. + if ((csc & I365_CSC_STSCHG) && (status & I365_CS_STSCHG))
  18482. + events |= SS_STSCHG;
  18483. + } else {
  18484. + if (csc & (I365_CSC_BVD1 | I365_CSC_BVD2)) {
  18485. + if (!(status & I365_CS_BVD1))
  18486. + events |= SS_BATDEAD;
  18487. + else if ((status & (I365_CS_BVD1 | I365_CS_BVD2)) == I365_CS_BVD1)
  18488. + events |= SS_BATWARN;
  18489. + }
  18490. + }
  18491. + if ((csc & I365_CSC_READY) && (status & I365_CS_READY))
  18492. + events |= SS_READY;
  18493. + if ((csc & I365_CSC_DETECT) && ((status & I365_CS_DETECT) == I365_CS_DETECT))
  18494. + events |= SS_DETECT;
  18495. +
  18496. + return events;
  18497. +}
  18498. +
  18499. +static void pccard_status_change(int slot, vrc4171_socket_t *socket)
  18500. +{
  18501. + uint16_t events;
  18502. +
  18503. + socket->tq_task.routine = pccard_bh;
  18504. + socket->tq_task.data = socket;
  18505. +
  18506. + events = get_events(slot);
  18507. + if (events) {
  18508. + spin_lock(&socket->event_lock);
  18509. + socket->events |= events;
  18510. + spin_unlock(&socket->event_lock);
  18511. + schedule_task(&socket->tq_task);
  18512. + }
  18513. +}
  18514. +
  18515. +static void pccard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  18516. +{
  18517. + vrc4171_socket_t *socket;
  18518. + uint16_t status;
  18519. +
  18520. + status = vrc4171_get_irq_status();
  18521. + if (status & IRQ_A) {
  18522. + socket = &vrc4171_sockets[CARD_SLOTA];
  18523. + if (socket->noprobe == SLOTB_PROBE) {
  18524. + if (status & (1 << socket->csc_irq))
  18525. + pccard_status_change(CARD_SLOTA, socket);
  18526. + }
  18527. + }
  18528. +
  18529. + if (status & IRQ_B) {
  18530. + socket = &vrc4171_sockets[CARD_SLOTB];
  18531. + if (socket->noprobe == SLOTB_PROBE) {
  18532. + if (status & (1 << socket->csc_irq))
  18533. + pccard_status_change(CARD_SLOTB, socket);
  18534. + }
  18535. + }
  18536. +}
  18537. +
  18538. +static inline void reserve_using_irq(int slot)
  18539. +{
  18540. + unsigned int irq;
  18541. +
  18542. + irq = exca_read_byte(slot, I365_INTCTL);
  18543. + irq &= 0x0f;
  18544. + vrc4171_irq_mask &= ~(1 << irq);
  18545. +
  18546. + irq = exca_read_byte(slot, I365_CSCINT);
  18547. + irq = (irq & 0xf0) >> 4;
  18548. + vrc4171_irq_mask &= ~(1 << irq);
  18549. +}
  18550. +
  18551. +static int __devinit vrc4171_add_socket(int slot)
  18552. +{
  18553. + vrc4171_socket_t *socket;
  18554. +
  18555. + if (slot >= CARD_MAX_SLOTS)
  18556. + return -EINVAL;
  18557. +
  18558. + socket = &vrc4171_sockets[slot];
  18559. + if (socket->noprobe != SLOTB_PROBE) {
  18560. + uint8_t addrwin;
  18561. +
  18562. + switch (socket->noprobe) {
  18563. + case SLOTB_NOPROBE_MEM:
  18564. + addrwin = exca_read_byte(slot, I365_ADDRWIN);
  18565. + addrwin &= 0x1f;
  18566. + exca_write_byte(slot, I365_ADDRWIN, addrwin);
  18567. + break;
  18568. + case SLOTB_NOPROBE_IO:
  18569. + addrwin = exca_read_byte(slot, I365_ADDRWIN);
  18570. + addrwin &= 0xc0;
  18571. + exca_write_byte(slot, I365_ADDRWIN, addrwin);
  18572. + break;
  18573. + default:
  18574. + break;
  18575. + }
  18576. +
  18577. + reserve_using_irq(slot);
  18578. +
  18579. + return 0;
  18580. + }
  18581. +
  18582. + sprintf(socket->name, "NEC VRC4171 Card Slot %1c", 'A' + slot);
  18583. +
  18584. + socket->pcmcia_socket = pcmcia_register_socket(slot, &vrc4171_pccard_operations, 1);
  18585. + if (socket->pcmcia_socket == NULL)
  18586. + return -ENOMEM;
  18587. +
  18588. + exca_write_byte(slot, I365_ADDRWIN, 0);
  18589. +
  18590. + exca_write_byte(slot, GLOBAL_CONTROL, 0);
  18591. +
  18592. + return 0;
  18593. +}
  18594. +
  18595. +static void vrc4171_remove_socket(int slot)
  18596. +{
  18597. + vrc4171_socket_t *socket;
  18598. +
  18599. + if (slot >= CARD_MAX_SLOTS)
  18600. + return;
  18601. +
  18602. + socket = &vrc4171_sockets[slot];
  18603. +
  18604. + if (socket->pcmcia_socket != NULL) {
  18605. + pcmcia_unregister_socket(socket->pcmcia_socket);
  18606. + socket->pcmcia_socket = NULL;
  18607. + }
  18608. +}
  18609. +
  18610. +static int __devinit vrc4171_card_setup(char *options)
  18611. +{
  18612. + if (options == NULL || *options == '\0')
  18613. + return 0;
  18614. +
  18615. + if (strncmp(options, "irq:", 4) == 0) {
  18616. + int irq;
  18617. + options += 4;
  18618. + irq = simple_strtoul(options, &options, 0);
  18619. + if (irq >= 0 && irq < NR_IRQS)
  18620. + vrc4171_irq = irq;
  18621. +
  18622. + if (*options != ',')
  18623. + return 0;
  18624. + options++;
  18625. + }
  18626. +
  18627. + if (strncmp(options, "slota:", 6) == 0) {
  18628. + options += 6;
  18629. + if (*options != '\0') {
  18630. + if (strncmp(options, "noprobe", 7) == 0) {
  18631. + vrc4171_sockets[CARD_SLOTA].noprobe = 1;
  18632. + options += 7;
  18633. + }
  18634. +
  18635. + if (*options != ',')
  18636. + return 0;
  18637. + options++;
  18638. + } else
  18639. + return 0;
  18640. +
  18641. + }
  18642. +
  18643. + if (strncmp(options, "slotb:", 6) == 0) {
  18644. + options += 6;
  18645. + if (*options != '\0') {
  18646. + if (strncmp(options, "pccard", 6) == 0) {
  18647. + vrc4171_slotb = SLOTB_IS_PCCARD;
  18648. + options += 6;
  18649. + } else if (strncmp(options, "cf", 2) == 0) {
  18650. + vrc4171_slotb = SLOTB_IS_CF;
  18651. + options += 2;
  18652. + } else if (strncmp(options, "flashrom", 8) == 0) {
  18653. + vrc4171_slotb = SLOTB_IS_FLASHROM;
  18654. + options += 8;
  18655. + } else if (strncmp(options, "none", 4) == 0) {
  18656. + vrc4171_slotb = SLOTB_IS_NONE;
  18657. + options += 4;
  18658. + }
  18659. +
  18660. + if (*options != ',')
  18661. + return 0;
  18662. + options++;
  18663. +
  18664. + if ( strncmp(options, "memnoprobe", 10) == 0)
  18665. + vrc4171_sockets[CARD_SLOTB].noprobe = SLOTB_NOPROBE_MEM;
  18666. + if ( strncmp(options, "ionoprobe", 9) == 0)
  18667. + vrc4171_sockets[CARD_SLOTB].noprobe = SLOTB_NOPROBE_IO;
  18668. + if ( strncmp(options, "noprobe", 7) == 0)
  18669. + vrc4171_sockets[CARD_SLOTB].noprobe = SLOTB_NOPROBE_ALL;
  18670. + }
  18671. + }
  18672. +
  18673. + return 0;
  18674. +}
  18675. +
  18676. +__setup("vrc4171_card=", vrc4171_card_setup);
  18677. +
  18678. +static int __devinit vrc4171_card_init(void)
  18679. +{
  18680. + int retval, slot;
  18681. +
  18682. + vrc4171_set_multifunction_pin(vrc4171_slotb);
  18683. +
  18684. + if (request_region(CARD_CONTROLLER_INDEX, CARD_CONTROLLER_SIZE,
  18685. + "NEC VRC4171 Card Controller") == NULL)
  18686. + return -EBUSY;
  18687. +
  18688. + for (slot = 0; slot < CARD_MAX_SLOTS; slot++) {
  18689. + if (slot == CARD_SLOTB && vrc4171_slotb == SLOTB_IS_NONE)
  18690. + break;
  18691. +
  18692. + retval = vrc4171_add_socket(slot);
  18693. + if (retval != 0)
  18694. + return retval;
  18695. + }
  18696. +
  18697. + retval = request_irq(vrc4171_irq, pccard_interrupt, SA_SHIRQ,
  18698. + "NEC VRC4171 Card Controller", vrc4171_sockets);
  18699. + if (retval < 0) {
  18700. + for (slot = 0; slot < CARD_MAX_SLOTS; slot++)
  18701. + vrc4171_remove_socket(slot);
  18702. +
  18703. + return retval;
  18704. + }
  18705. +
  18706. + printk(KERN_INFO "NEC VRC4171 Card Controller, connected to IRQ %d\n", vrc4171_irq);
  18707. +
  18708. + return 0;
  18709. +}
  18710. +
  18711. +static void __devexit vrc4171_card_exit(void)
  18712. +{
  18713. + int slot;
  18714. +
  18715. + for (slot = 0; slot < CARD_MAX_SLOTS; slot++)
  18716. + vrc4171_remove_socket(slot);
  18717. +
  18718. + release_region(CARD_CONTROLLER_INDEX, CARD_CONTROLLER_SIZE);
  18719. +}
  18720. +
  18721. +module_init(vrc4171_card_init);
  18722. +module_exit(vrc4171_card_exit);
  18723. diff -Nur linux-2.4.32-rc1/drivers/scsi/NCR53C9x.h linux-2.4.32-rc1.mips/drivers/scsi/NCR53C9x.h
  18724. --- linux-2.4.32-rc1/drivers/scsi/NCR53C9x.h 2004-02-18 14:36:31.000000000 +0100
  18725. +++ linux-2.4.32-rc1.mips/drivers/scsi/NCR53C9x.h 2003-12-15 19:19:51.000000000 +0100
  18726. @@ -144,12 +144,7 @@
  18727. #ifndef MULTIPLE_PAD_SIZES
  18728. -#ifdef CONFIG_CPU_HAS_WB
  18729. -#include <asm/wbflush.h>
  18730. -#define esp_write(__reg, __val) do{(__reg) = (__val); wbflush();} while(0)
  18731. -#else
  18732. -#define esp_write(__reg, __val) ((__reg) = (__val))
  18733. -#endif
  18734. +#define esp_write(__reg, __val) do{(__reg) = (__val); iob();} while(0)
  18735. #define esp_read(__reg) (__reg)
  18736. struct ESP_regs {
  18737. diff -Nur linux-2.4.32-rc1/drivers/sound/au1550_i2s.c linux-2.4.32-rc1.mips/drivers/sound/au1550_i2s.c
  18738. --- linux-2.4.32-rc1/drivers/sound/au1550_i2s.c 2005-01-19 15:10:04.000000000 +0100
  18739. +++ linux-2.4.32-rc1.mips/drivers/sound/au1550_i2s.c 2005-02-08 08:07:50.000000000 +0100
  18740. @@ -41,6 +41,7 @@
  18741. * 675 Mass Ave, Cambridge, MA 02139, USA.
  18742. *
  18743. */
  18744. +
  18745. #include <linux/version.h>
  18746. #include <linux/module.h>
  18747. #include <linux/string.h>
  18748. @@ -62,7 +63,45 @@
  18749. #include <asm/uaccess.h>
  18750. #include <asm/hardirq.h>
  18751. #include <asm/au1000.h>
  18752. +
  18753. +#if defined(CONFIG_SOC_AU1550)
  18754. #include <asm/pb1550.h>
  18755. +#endif
  18756. +
  18757. +#if defined(CONFIG_MIPS_PB1200)
  18758. +#define WM8731
  18759. +#define WM_MODE_USB
  18760. +#include <asm/pb1200.h>
  18761. +#endif
  18762. +
  18763. +#if defined(CONFIG_MIPS_FICMMP)
  18764. +#define WM8721
  18765. +#define WM_MODE_NORMAL
  18766. +#include <asm/ficmmp.h>
  18767. +#endif
  18768. +
  18769. +
  18770. +#define WM_VOLUME_MIN 47
  18771. +#define WM_VOLUME_SCALE 80
  18772. +
  18773. +#if defined(WM8731)
  18774. + /* OSS interface to the wm i2s.. */
  18775. + #define CODEC_NAME "Wolfson WM8731 I2S"
  18776. + #define WM_I2S_STEREO_MASK (SOUND_MASK_PCM | SOUND_MASK_LINE)
  18777. + #define WM_I2S_SUPPORTED_MASK (WM_I2S_STEREO_MASK | SOUND_MASK_MIC)
  18778. + #define WM_I2S_RECORD_MASK (SOUND_MASK_MIC | SOUND_MASK_LINE1 | SOUND_MASK_LINE)
  18779. +#elif defined(WM8721)
  18780. + #define CODEC_NAME "Wolfson WM8721 I2S"
  18781. + #define WM_I2S_STEREO_MASK (SOUND_MASK_PCM)
  18782. + #define WM_I2S_SUPPORTED_MASK (WM_I2S_STEREO_MASK)
  18783. + #define WM_I2S_RECORD_MASK (0)
  18784. +#endif
  18785. +
  18786. +
  18787. +#define supported_mixer(FOO) ((FOO >= 0) && \
  18788. + (FOO < SOUND_MIXER_NRDEVICES) && \
  18789. + WM_I2S_SUPPORTED_MASK & (1<<FOO) )
  18790. +
  18791. #include <asm/au1xxx_psc.h>
  18792. #include <asm/au1xxx_dbdma.h>
  18793. @@ -98,13 +137,51 @@
  18794. * 0 = no VRA, 1 = use VRA if codec supports it
  18795. * The framework is here, but we currently force no VRA.
  18796. */
  18797. +#if defined(CONFIG_MIPS_PB1200) | defined(CONFIG_MIPS_PB1550)
  18798. static int vra = 0;
  18799. +#elif defined(CONFIG_MIPS_FICMMP)
  18800. +static int vra = 1;
  18801. +#endif
  18802. +
  18803. +#define WM_REG_L_HEADPHONE_OUT 0x02
  18804. +#define WM_REG_R_HEADPHONE_OUT 0x03
  18805. +#define WM_REG_ANALOGUE_AUDIO_PATH_CTRL 0x04
  18806. +#define WM_REG_DIGITAL_AUDIO_PATH_CTRL 0x05
  18807. +#define WM_REG_POWER_DOWN_CTRL 0x06
  18808. +#define WM_REG_DIGITAL_AUDIO_IF 0x07
  18809. +#define WM_REG_SAMPLING_CONTROL 0x08
  18810. +#define WM_REG_ACTIVE_CTRL 0x09
  18811. +#define WM_REG_RESET 0x0F
  18812. +#define WM_SC_SR_96000 (0x7<<2)
  18813. +#define WM_SC_SR_88200 (0xF<<2)
  18814. +#define WM_SC_SR_48000 (0x0<<2)
  18815. +#define WM_SC_SR_44100 (0x8<<2)
  18816. +#define WM_SC_SR_32000 (0x6<<2)
  18817. +#define WM_SC_SR_8018 (0x9<<2)
  18818. +#define WM_SC_SR_8000 (0x1<<2)
  18819. +#define WM_SC_MODE_USB 1
  18820. +#define WM_SC_MODE_NORMAL 0
  18821. +#define WM_SC_BOSR_250FS (0<<1)
  18822. +#define WM_SC_BOSR_272FS (1<<1)
  18823. +#define WM_SC_BOSR_256FS (0<<1)
  18824. +#define WM_SC_BOSR_128FS (0<<1)
  18825. +#define WM_SC_BOSR_384FS (1<<1)
  18826. +#define WM_SC_BOSR_192FS (1<<1)
  18827. +
  18828. +#define WS_64FS 31
  18829. +#define WS_96FS 47
  18830. +#define WS_128FS 63
  18831. +#define WS_192FS 95
  18832. +
  18833. +#define MIN_Q_COUNT 2
  18834. +
  18835. MODULE_PARM(vra, "i");
  18836. MODULE_PARM_DESC(vra, "if 1 use VRA if codec supports it");
  18837. static struct au1550_state {
  18838. /* soundcore stuff */
  18839. int dev_audio;
  18840. + int dev_mixer;
  18841. spinlock_t lock;
  18842. struct semaphore open_sem;
  18843. @@ -114,6 +191,11 @@
  18844. int no_vra;
  18845. volatile psc_i2s_t *psc_addr;
  18846. + int level_line;
  18847. + int level_mic;
  18848. + int level_left;
  18849. + int level_right;
  18850. +
  18851. struct dmabuf {
  18852. u32 dmanr;
  18853. unsigned sample_rate;
  18854. @@ -195,60 +277,224 @@
  18855. }
  18856. }
  18857. -/* Just a place holder. The Wolfson codec is a write only device,
  18858. - * so we would have to keep a local copy of the data.
  18859. - */
  18860. -#if 0
  18861. -static u8
  18862. -rdcodec(u8 addr)
  18863. -{
  18864. - return 0 /* data */;
  18865. -}
  18866. -#endif
  18867. -
  18868. -
  18869. static void
  18870. -wrcodec(u8 ctlreg, u8 val)
  18871. +wrcodec(u8 ctlreg, u16 val)
  18872. {
  18873. int rcnt;
  18874. extern int pb1550_wm_codec_write(u8 addr, u8 reg, u8 val);
  18875. -
  18876. /* The codec is a write only device, with a 16-bit control/data
  18877. * word. Although it is written as two bytes on the I2C, the
  18878. * format is actually 7 bits of register and 9 bits of data.
  18879. * The ls bit of the first byte is the ms bit of the data.
  18880. */
  18881. rcnt = 0;
  18882. - while ((pb1550_wm_codec_write((0x36 >> 1), ctlreg, val) != 1)
  18883. - && (rcnt < 50)) {
  18884. + while ((pb1550_wm_codec_write((0x36 >> 1),
  18885. + (ctlreg << 1) | ((val >> 8) & 0x01),
  18886. + (u8) (val & 0x00FF)) != 1) &&
  18887. + (rcnt < 50)) {
  18888. rcnt++;
  18889. -#if 0
  18890. - printk("Codec write retry %02x %02x\n", ctlreg, val);
  18891. -#endif
  18892. }
  18893. +
  18894. + au1550_delay(10);
  18895. +}
  18896. +
  18897. +static int
  18898. +au1550_open_mixdev(struct inode *inode, struct file *file)
  18899. +{
  18900. + file->private_data = &au1550_state;
  18901. + return 0;
  18902. +}
  18903. +
  18904. +static int
  18905. +au1550_release_mixdev(struct inode *inode, struct file *file)
  18906. +{
  18907. + return 0;
  18908. +}
  18909. +
  18910. +static int wm_i2s_read_mixer(struct au1550_state *s, int oss_channel)
  18911. +{
  18912. + int ret = 0;
  18913. +
  18914. + if (WM_I2S_STEREO_MASK & (1 << oss_channel)) {
  18915. + /* nice stereo mixers .. */
  18916. +
  18917. + ret = s->level_left | (s->level_right << 8);
  18918. + } else if (oss_channel == SOUND_MIXER_MIC) {
  18919. + ret = 0;
  18920. + /* TODO: Implement read mixer for input/output codecs */
  18921. + }
  18922. +
  18923. + return ret;
  18924. }
  18925. +static void wm_i2s_write_mixer(struct au1550_state *s, int oss_channel, unsigned int left, unsigned int right)
  18926. +{
  18927. + if (WM_I2S_STEREO_MASK & (1 << oss_channel)) {
  18928. + /* stereo mixers */
  18929. + s->level_left = left;
  18930. + s->level_right = right;
  18931. +
  18932. + right = (right * WM_VOLUME_SCALE) / 100;
  18933. + left = (left * WM_VOLUME_SCALE) / 100;
  18934. + if (right > WM_VOLUME_SCALE)
  18935. + right = WM_VOLUME_SCALE;
  18936. + if (left > WM_VOLUME_SCALE)
  18937. + left = WM_VOLUME_SCALE;
  18938. +
  18939. + right += WM_VOLUME_MIN;
  18940. + left += WM_VOLUME_MIN;
  18941. +
  18942. + wrcodec(WM_REG_L_HEADPHONE_OUT, left);
  18943. + wrcodec(WM_REG_R_HEADPHONE_OUT, right);
  18944. +
  18945. + }else if (oss_channel == SOUND_MIXER_MIC) {
  18946. + /* TODO: implement write mixer for input/output codecs */
  18947. + }
  18948. +}
  18949. +
  18950. +/* a thin wrapper for write_mixer */
  18951. +static void wm_i2s_set_mixer(struct au1550_state *s, unsigned int oss_mixer, unsigned int val )
  18952. +{
  18953. + unsigned int left,right;
  18954. +
  18955. + /* cleanse input a little */
  18956. + right = ((val >> 8) & 0xff) ;
  18957. + left = (val & 0xff) ;
  18958. +
  18959. + if (right > 100) right = 100;
  18960. + if (left > 100) left = 100;
  18961. +
  18962. + wm_i2s_write_mixer(s, oss_mixer, left, right);
  18963. +}
  18964. +
  18965. +static int
  18966. +au1550_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
  18967. +{
  18968. + struct au1550_state *s = (struct au1550_state *)file->private_data;
  18969. +
  18970. + int i, val = 0;
  18971. +
  18972. + if (cmd == SOUND_MIXER_INFO) {
  18973. + mixer_info info;
  18974. + strncpy(info.id, CODEC_NAME, sizeof(info.id));
  18975. + strncpy(info.name, CODEC_NAME, sizeof(info.name));
  18976. + info.modify_counter = 0;
  18977. + if (copy_to_user((void *)arg, &info, sizeof(info)))
  18978. + return -EFAULT;
  18979. + return 0;
  18980. + }
  18981. + if (cmd == SOUND_OLD_MIXER_INFO) {
  18982. + _old_mixer_info info;
  18983. + strncpy(info.id, CODEC_NAME, sizeof(info.id));
  18984. + strncpy(info.name, CODEC_NAME, sizeof(info.name));
  18985. + if (copy_to_user((void *)arg, &info, sizeof(info)))
  18986. + return -EFAULT;
  18987. + return 0;
  18988. + }
  18989. +
  18990. + if (_IOC_TYPE(cmd) != 'M' || _SIOC_SIZE(cmd) != sizeof(int))
  18991. + return -EINVAL;
  18992. +
  18993. + if (cmd == OSS_GETVERSION)
  18994. + return put_user(SOUND_VERSION, (int *)arg);
  18995. +
  18996. + if (_SIOC_DIR(cmd) == _SIOC_READ) {
  18997. + switch (_IOC_NR(cmd)) {
  18998. + case SOUND_MIXER_RECSRC: /* give them the current record src */
  18999. + val = 0;
  19000. + /*
  19001. + if (!codec->recmask_io) {
  19002. + val = 0;
  19003. + } else {
  19004. + val = codec->recmask_io(codec, 1, 0);
  19005. + }*/
  19006. + break;
  19007. +
  19008. + case SOUND_MIXER_DEVMASK: /* give them the supported mixers */
  19009. + val = WM_I2S_SUPPORTED_MASK;
  19010. + break;
  19011. +
  19012. + case SOUND_MIXER_RECMASK:
  19013. + /* Arg contains a bit for each supported recording
  19014. + * source */
  19015. + val = WM_I2S_RECORD_MASK;
  19016. + break;
  19017. +
  19018. + case SOUND_MIXER_STEREODEVS:
  19019. + /* Mixer channels supporting stereo */
  19020. + val = WM_I2S_STEREO_MASK;
  19021. + break;
  19022. +
  19023. + case SOUND_MIXER_CAPS:
  19024. + val = SOUND_CAP_EXCL_INPUT;
  19025. + break;
  19026. +
  19027. + default: /* read a specific mixer */
  19028. + i = _IOC_NR(cmd);
  19029. +
  19030. + if (!supported_mixer(i))
  19031. + return -EINVAL;
  19032. +
  19033. + val = wm_i2s_read_mixer(s, i);
  19034. + break;
  19035. + }
  19036. + return put_user(val, (int *)arg);
  19037. + }
  19038. +
  19039. + if (_SIOC_DIR(cmd) == (_SIOC_WRITE|_SIOC_READ)) {
  19040. + if (get_user(val, (int *)arg))
  19041. + return -EFAULT;
  19042. +
  19043. + switch (_IOC_NR(cmd)) {
  19044. + case SOUND_MIXER_RECSRC:
  19045. + /* Arg contains a bit for each recording source */
  19046. + if (!WM_I2S_RECORD_MASK)
  19047. + return -EINVAL;
  19048. + if (!val)
  19049. + return 0;
  19050. + if (!(val &= WM_I2S_RECORD_MASK))
  19051. + return -EINVAL;
  19052. +
  19053. + return 0;
  19054. + default: /* write a specific mixer */
  19055. + i = _IOC_NR(cmd);
  19056. +
  19057. + if (!supported_mixer(i))
  19058. + return -EINVAL;
  19059. +
  19060. + wm_i2s_set_mixer(s, i, val);
  19061. +
  19062. + return 0;
  19063. + }
  19064. +}
  19065. + return -EINVAL;
  19066. +}
  19067. +
  19068. +static loff_t
  19069. +au1550_llseek(struct file *file, loff_t offset, int origin)
  19070. +{
  19071. + return -ESPIPE;
  19072. +}
  19073. +
  19074. +static /*const */ struct file_operations au1550_mixer_fops = {
  19075. + owner:THIS_MODULE,
  19076. + llseek:au1550_llseek,
  19077. + ioctl:au1550_ioctl_mixdev,
  19078. + open:au1550_open_mixdev,
  19079. + release:au1550_release_mixdev,
  19080. +};
  19081. +
  19082. void
  19083. -codec_init(void)
  19084. +codec_init(struct au1550_state *s)
  19085. {
  19086. - wrcodec(0x1e, 0x00); /* Reset */
  19087. - au1550_delay(200);
  19088. - wrcodec(0x0c, 0x00); /* Power up everything */
  19089. - au1550_delay(10);
  19090. - wrcodec(0x12, 0x00); /* Deactivate codec */
  19091. - au1550_delay(10);
  19092. - wrcodec(0x08, 0x10); /* Select DAC outputs to line out */
  19093. - au1550_delay(10);
  19094. - wrcodec(0x0a, 0x00); /* Disable output mute */
  19095. - au1550_delay(10);
  19096. - wrcodec(0x05, 0x70); /* lower output volume on headphone */
  19097. - au1550_delay(10);
  19098. - wrcodec(0x0e, 0x02); /* Set slave, 16-bit, I2S modes */
  19099. - au1550_delay(10);
  19100. - wrcodec(0x10, 0x01); /* 12MHz (USB), 250fs */
  19101. - au1550_delay(10);
  19102. - wrcodec(0x12, 0x01); /* Activate codec */
  19103. - au1550_delay(10);
  19104. + wrcodec(WM_REG_RESET, 0x00); /* Reset */
  19105. + wrcodec(WM_REG_POWER_DOWN_CTRL, 0x00); /* Power up everything */
  19106. + wrcodec(WM_REG_ACTIVE_CTRL, 0x00); /* Deactivate codec */
  19107. + wrcodec(WM_REG_ANALOGUE_AUDIO_PATH_CTRL, 0x10); /* Select DAC outputs to line out */
  19108. + wrcodec(WM_REG_DIGITAL_AUDIO_PATH_CTRL, 0x00); /* Disable output mute */
  19109. + wm_i2s_write_mixer(s, SOUND_MIXER_PCM, 74, 74);
  19110. + wrcodec(WM_REG_DIGITAL_AUDIO_IF, 0x02); /* Set slave, 16-bit, I2S modes */
  19111. + wrcodec(WM_REG_ACTIVE_CTRL, 0x01); /* Activate codec */
  19112. }
  19113. /* stop the ADC before calling */
  19114. @@ -256,27 +502,16 @@
  19115. set_adc_rate(struct au1550_state *s, unsigned rate)
  19116. {
  19117. struct dmabuf *adc = &s->dma_adc;
  19118. - struct dmabuf *dac = &s->dma_dac;
  19119. - if (s->no_vra) {
  19120. - /* calc SRC factor
  19121. - */
  19122. + #if defined(WM_MODE_USB)
  19123. adc->src_factor = (((SAMP_RATE*2) / rate) + 1) >> 1;
  19124. adc->sample_rate = SAMP_RATE / adc->src_factor;
  19125. return;
  19126. - }
  19127. + #else
  19128. + //TODO: Need code for normal mode
  19129. + #endif
  19130. adc->src_factor = 1;
  19131. -
  19132. -
  19133. -#if 0
  19134. - rate = rate > SAMP_RATE ? SAMP_RATE : rate;
  19135. -
  19136. - wrcodec(0, 0); /* I don't yet know what to write here if we vra */
  19137. -
  19138. - adc->sample_rate = rate;
  19139. - dac->sample_rate = rate;
  19140. -#endif
  19141. }
  19142. /* stop the DAC before calling */
  19143. @@ -284,26 +519,89 @@
  19144. set_dac_rate(struct au1550_state *s, unsigned rate)
  19145. {
  19146. struct dmabuf *dac = &s->dma_dac;
  19147. - struct dmabuf *adc = &s->dma_adc;
  19148. - if (s->no_vra) {
  19149. - /* calc SRC factor
  19150. - */
  19151. - dac->src_factor = (((SAMP_RATE*2) / rate) + 1) >> 1;
  19152. - dac->sample_rate = SAMP_RATE / dac->src_factor;
  19153. - return;
  19154. + u16 sr, ws, div, bosr, mode;
  19155. + volatile psc_i2s_t* ip = (volatile psc_i2s_t *)I2S_PSC_BASE;
  19156. + u32 cfg;
  19157. +
  19158. + #if defined(CONFIG_MIPS_FICMMP)
  19159. + rate = ficmmp_set_i2s_sample_rate(rate);
  19160. + #endif
  19161. +
  19162. + switch(rate)
  19163. + {
  19164. + case 96000:
  19165. + sr = WM_SC_SR_96000;
  19166. + ws = WS_64FS;
  19167. + div = PSC_I2SCFG_DIV2;
  19168. + break;
  19169. + case 88200:
  19170. + sr = WM_SC_SR_88200;
  19171. + ws = WS_64FS;
  19172. + div = PSC_I2SCFG_DIV2;
  19173. + break;
  19174. + case 44100:
  19175. + sr = WM_SC_SR_44100;
  19176. + ws = WS_128FS;
  19177. + div = PSC_I2SCFG_DIV2;
  19178. + break;
  19179. + case 48000:
  19180. + sr = WM_SC_SR_48000;
  19181. + ws = WS_128FS;
  19182. + div = PSC_I2SCFG_DIV2;
  19183. + break;
  19184. + case 32000:
  19185. + sr = WM_SC_SR_32000;
  19186. + ws = WS_96FS;
  19187. + div = PSC_I2SCFG_DIV4;
  19188. + break;
  19189. + case 8018:
  19190. + sr = WM_SC_SR_8018;
  19191. + ws = WS_128FS;
  19192. + div = PSC_I2SCFG_DIV2;
  19193. + break;
  19194. + case 8000:
  19195. + default:
  19196. + sr = WM_SC_SR_8000;
  19197. + ws = WS_96FS;
  19198. + div = PSC_I2SCFG_DIV16;
  19199. + break;
  19200. }
  19201. + #if defined(WM_MODE_USB)
  19202. + mode = WM_SC_MODE_USB;
  19203. + #else
  19204. + mode = WM_SC_MODE_NORMAL;
  19205. + #endif
  19206. +
  19207. + bosr = 0;
  19208. +
  19209. dac->src_factor = 1;
  19210. + dac->sample_rate = rate;
  19211. -#if 0
  19212. - rate = rate > SAMP_RATE ? SAMP_RATE : rate;
  19213. + /* Deactivate codec */
  19214. + wrcodec(WM_REG_ACTIVE_CTRL, 0x00);
  19215. - wrcodec(0, 0); /* I don't yet know what to write here if we vra */
  19216. + /* Disable I2S controller */
  19217. + ip->psc_i2scfg &= ~PSC_I2SCFG_DE_ENABLE;
  19218. + /* Wait for device disabled */
  19219. + while ((ip->psc_i2sstat & PSC_I2SSTAT_DR) == 1);
  19220. +
  19221. + cfg = ip->psc_i2scfg;
  19222. + /* Clear WS and DIVIDER values */
  19223. + cfg &= ~(PSC_I2SCFG_WS_MASK | PSC_I2SCFG_DIV_MASK);
  19224. + cfg |= PSC_I2SCFG_WS(ws) | div;
  19225. + /* Reconfigure and enable */
  19226. + ip->psc_i2scfg = cfg | PSC_I2SCFG_DE_ENABLE;
  19227. - adc->sample_rate = rate;
  19228. - dac->sample_rate = rate;
  19229. -#endif
  19230. + /* Wait for device enabled */
  19231. + while ((ip->psc_i2sstat & PSC_I2SSTAT_DR) == 0);
  19232. +
  19233. + /* Set appropriate sampling rate */
  19234. + wrcodec(WM_REG_SAMPLING_CONTROL, bosr | mode | sr);
  19235. +
  19236. + /* Activate codec */
  19237. + wrcodec(WM_REG_ACTIVE_CTRL, 0x01);
  19238. }
  19239. static void
  19240. @@ -354,8 +652,7 @@
  19241. ip->psc_i2spcr = PSC_I2SPCR_RP;
  19242. au_sync();
  19243. - /* Wait for Receive Busy to show disabled.
  19244. - */
  19245. + /* Wait for Receive Busy to show disabled. */
  19246. do {
  19247. stat = ip->psc_i2sstat;
  19248. au_sync();
  19249. @@ -463,7 +760,6 @@
  19250. if (db->num_channels == 1)
  19251. db->cnt_factor *= 2;
  19252. db->cnt_factor *= db->src_factor;
  19253. -
  19254. db->count = 0;
  19255. db->dma_qcount = 0;
  19256. db->nextIn = db->nextOut = db->rawbuf;
  19257. @@ -546,12 +842,13 @@
  19258. if (i2s_stat & (PSC_I2SSTAT_TF | PSC_I2SSTAT_TR | PSC_I2SSTAT_TF))
  19259. dbg("I2S status = 0x%08x", i2s_stat);
  19260. #endif
  19261. +
  19262. db->dma_qcount--;
  19263. if (db->count >= db->fragsize) {
  19264. - if (au1xxx_dbdma_put_source(db->dmanr, db->nextOut,
  19265. - db->fragsize) == 0) {
  19266. - err("qcount < 2 and no ring room!");
  19267. + if (au1xxx_dbdma_put_source(db->dmanr, db->nextOut, db->fragsize) == 0)
  19268. + {
  19269. + err("qcount < MIN_Q_COUNT and no ring room!");
  19270. }
  19271. db->nextOut += db->fragsize;
  19272. if (db->nextOut >= db->rawbuf + db->dmasize)
  19273. @@ -606,65 +903,43 @@
  19274. }
  19275. -static loff_t
  19276. -au1550_llseek(struct file *file, loff_t offset, int origin)
  19277. -{
  19278. - return -ESPIPE;
  19279. -}
  19280. -
  19281. -
  19282. -#if 0
  19283. -static int
  19284. -au1550_open_mixdev(struct inode *inode, struct file *file)
  19285. -{
  19286. - file->private_data = &au1550_state;
  19287. - return 0;
  19288. -}
  19289. -
  19290. -static int
  19291. -au1550_release_mixdev(struct inode *inode, struct file *file)
  19292. -{
  19293. - return 0;
  19294. -}
  19295. -
  19296. -static int
  19297. -mixdev_ioctl(struct ac97_codec *codec, unsigned int cmd,
  19298. - unsigned long arg)
  19299. -{
  19300. - return codec->mixer_ioctl(codec, cmd, arg);
  19301. -}
  19302. -
  19303. -static int
  19304. -au1550_ioctl_mixdev(struct inode *inode, struct file *file,
  19305. - unsigned int cmd, unsigned long arg)
  19306. -{
  19307. - struct au1550_state *s = (struct au1550_state *)file->private_data;
  19308. - struct ac97_codec *codec = s->codec;
  19309. -
  19310. - return mixdev_ioctl(codec, cmd, arg);
  19311. -}
  19312. -
  19313. -static /*const */ struct file_operations au1550_mixer_fops = {
  19314. - owner:THIS_MODULE,
  19315. - llseek:au1550_llseek,
  19316. - ioctl:au1550_ioctl_mixdev,
  19317. - open:au1550_open_mixdev,
  19318. - release:au1550_release_mixdev,
  19319. -};
  19320. -#endif
  19321. -
  19322. static int
  19323. drain_dac(struct au1550_state *s, int nonblock)
  19324. {
  19325. unsigned long flags;
  19326. int count, tmo;
  19327. + struct dmabuf *db = &s->dma_dac;
  19328. +
  19329. + //DPRINTF();
  19330. if (s->dma_dac.mapped || !s->dma_dac.ready || s->dma_dac.stopped)
  19331. return 0;
  19332. for (;;) {
  19333. spin_lock_irqsave(&s->lock, flags);
  19334. - count = s->dma_dac.count;
  19335. + count = db->count;
  19336. +
  19337. + /* Pad the ddma buffer with zeros if the amount remaining
  19338. + * is not a multiple of fragsize */
  19339. + if(count % db->fragsize != 0)
  19340. + {
  19341. + int pad = db->fragsize - (count % db->fragsize);
  19342. + char* bufptr = db->nextIn;
  19343. + char* bufend = db->rawbuf + db->dmasize;
  19344. +
  19345. + if((bufend - bufptr) < pad)
  19346. + printk("Error! ddma padding is bigger than available ring space!\n");
  19347. + else
  19348. + {
  19349. + memset((void*)bufptr, 0, pad);
  19350. + count += pad;
  19351. + db->nextIn += pad;
  19352. + db->count += pad;
  19353. + if (db->dma_qcount == 0)
  19354. + start_dac(s);
  19355. + db->dma_qcount++;
  19356. + }
  19357. + }
  19358. spin_unlock_irqrestore(&s->lock, flags);
  19359. if (count <= 0)
  19360. break;
  19361. @@ -672,9 +947,9 @@
  19362. break;
  19363. if (nonblock)
  19364. return -EBUSY;
  19365. - tmo = 1000 * count / (s->no_vra ?
  19366. - SAMP_RATE : s->dma_dac.sample_rate);
  19367. + tmo = 1000 * count / s->dma_dac.sample_rate;
  19368. tmo /= s->dma_dac.dma_bytes_per_sample;
  19369. +
  19370. au1550_delay(tmo);
  19371. }
  19372. if (signal_pending(current))
  19373. @@ -698,8 +973,7 @@
  19374. * If interpolating (no VRA), duplicate every audio frame src_factor times.
  19375. */
  19376. static int
  19377. -translate_from_user(struct dmabuf *db, char* dmabuf, char* userbuf,
  19378. - int dmacount)
  19379. +translate_from_user(struct dmabuf *db, char* dmabuf, char* userbuf, int dmacount)
  19380. {
  19381. int sample, i;
  19382. int interp_bytes_per_sample;
  19383. @@ -737,11 +1011,12 @@
  19384. /* duplicate every audio frame src_factor times
  19385. */
  19386. - for (i = 0; i < db->src_factor; i++)
  19387. + for (i = 0; i < db->src_factor; i++) {
  19388. memcpy(dmabuf, dmasample, db->dma_bytes_per_sample);
  19389. + dmabuf += interp_bytes_per_sample;
  19390. + }
  19391. userbuf += db->user_bytes_per_sample;
  19392. - dmabuf += interp_bytes_per_sample;
  19393. }
  19394. return num_samples * interp_bytes_per_sample;
  19395. @@ -996,15 +1271,14 @@
  19396. * on the dma queue. If the queue count reaches zero,
  19397. * we know the dma has stopped.
  19398. */
  19399. - while ((db->dma_qcount < 2) && (db->count >= db->fragsize)) {
  19400. + while ((db->dma_qcount < MIN_Q_COUNT) && (db->count >= db->fragsize)) {
  19401. if (au1xxx_dbdma_put_source(db->dmanr, db->nextOut,
  19402. db->fragsize) == 0) {
  19403. - err("qcount < 2 and no ring room!");
  19404. + err("qcount < MIN_Q_COUNT and no ring room!");
  19405. }
  19406. db->nextOut += db->fragsize;
  19407. if (db->nextOut >= db->rawbuf + db->dmasize)
  19408. db->nextOut -= db->dmasize;
  19409. - db->count -= db->fragsize;
  19410. db->total_bytes += db->dma_fragsize;
  19411. if (db->dma_qcount == 0)
  19412. start_dac(s);
  19413. @@ -1017,7 +1291,6 @@
  19414. buffer += usercnt;
  19415. ret += usercnt;
  19416. } /* while (count > 0) */
  19417. -
  19418. out:
  19419. up(&s->sem);
  19420. out2:
  19421. @@ -1371,9 +1644,6 @@
  19422. s->dma_dac.cnt_factor;
  19423. abinfo.fragstotal = s->dma_dac.numfrag;
  19424. abinfo.fragments = abinfo.bytes >> s->dma_dac.fragshift;
  19425. -#ifdef AU1000_VERBOSE_DEBUG
  19426. - dbg("bytes=%d, fragments=%d", abinfo.bytes, abinfo.fragments);
  19427. -#endif
  19428. return copy_to_user((void *) arg, &abinfo,
  19429. sizeof(abinfo)) ? -EFAULT : 0;
  19430. @@ -1536,13 +1806,9 @@
  19431. case SNDCTL_DSP_SETSYNCRO:
  19432. case SOUND_PCM_READ_FILTER:
  19433. return -EINVAL;
  19434. + default: break;
  19435. }
  19436. -
  19437. -#if 0
  19438. - return mixdev_ioctl(s->codec, cmd, arg);
  19439. -#else
  19440. return 0;
  19441. -#endif
  19442. }
  19443. @@ -1664,15 +1930,15 @@
  19444. MODULE_AUTHOR("Advanced Micro Devices (AMD), [email protected]");
  19445. MODULE_DESCRIPTION("Au1550 Audio Driver");
  19446. +#if defined(WM_MODE_USB)
  19447. /* Set up an internal clock for the PSC3. This will then get
  19448. * driven out of the Au1550 as the master.
  19449. */
  19450. static void
  19451. intclk_setup(void)
  19452. {
  19453. - uint clk, rate, stat;
  19454. -
  19455. - /* Wire up Freq4 as a clock for the PSC3.
  19456. + uint clk, rate;
  19457. + /* Wire up Freq4 as a clock for the PSC.
  19458. * We know SMBus uses Freq3.
  19459. * By making changes to this rate, plus the word strobe
  19460. * size, we can make fine adjustments to the actual data rate.
  19461. @@ -1700,11 +1966,17 @@
  19462. */
  19463. clk = au_readl(SYS_CLKSRC);
  19464. au_sync();
  19465. +#if defined(CONFIG_SOC_AU1550)
  19466. clk &= ~0x01f00000;
  19467. clk |= (6 << 22);
  19468. +#elif defined(CONFIG_SOC_AU1200)
  19469. + clk &= ~0x3e000000;
  19470. + clk |= (6 << 27);
  19471. +#endif
  19472. au_writel(clk, SYS_CLKSRC);
  19473. au_sync();
  19474. }
  19475. +#endif
  19476. static int __devinit
  19477. au1550_probe(void)
  19478. @@ -1724,6 +1996,11 @@
  19479. init_MUTEX(&s->open_sem);
  19480. spin_lock_init(&s->lock);
  19481. + /* CPLD Mux for I2s */
  19482. +
  19483. +#if defined(CONFIG_MIPS_PB1200)
  19484. + bcsr->resets |= BCSR_RESETS_PCS1MUX;
  19485. +#endif
  19486. s->psc_addr = (volatile psc_i2s_t *)I2S_PSC_BASE;
  19487. ip = s->psc_addr;
  19488. @@ -1765,9 +2042,8 @@
  19489. if ((s->dev_audio = register_sound_dsp(&au1550_audio_fops, -1)) < 0)
  19490. goto err_dev1;
  19491. -#if 0
  19492. - if ((s->codec->dev_mixer =
  19493. - register_sound_mixer(&au1550_mixer_fops, -1)) < 0)
  19494. +#if 1
  19495. + if ((s->dev_mixer = register_sound_mixer(&au1550_mixer_fops, -1)) < 0)
  19496. goto err_dev2;
  19497. #endif
  19498. @@ -1777,7 +2053,6 @@
  19499. proc_au1550_dump, NULL);
  19500. #endif /* AU1550_DEBUG */
  19501. - intclk_setup();
  19502. /* The GPIO for the appropriate PSC was configured by the
  19503. * board specific start up.
  19504. @@ -1786,7 +2061,12 @@
  19505. */
  19506. ip->psc_ctrl = PSC_CTRL_DISABLE; /* Disable PSC */
  19507. au_sync();
  19508. +#if defined(WM_MODE_USB)
  19509. + intclk_setup();
  19510. ip->psc_sel = (PSC_SEL_CLK_INTCLK | PSC_SEL_PS_I2SMODE);
  19511. +#else
  19512. + ip->psc_sel = (PSC_SEL_CLK_EXTCLK | PSC_SEL_PS_I2SMODE);
  19513. +#endif
  19514. au_sync();
  19515. /* Enable PSC
  19516. @@ -1806,42 +2086,18 @@
  19517. * Actual I2S mode (first bit delayed by one clock).
  19518. * Master mode (We provide the clock from the PSC).
  19519. */
  19520. - val = PSC_I2SCFG_SET_LEN(16);
  19521. -#ifdef TRY_441KHz
  19522. - /* This really should be 250, but it appears that all of the
  19523. - * PLLs, dividers and so on in the chain shift it. That's the
  19524. - * problem with sourceing the clock instead of letting the very
  19525. - * stable codec provide it. But, the PSC doesn't appear to want
  19526. - * to work in slave mode, so this is what we get. It's not
  19527. - * studio quality timing, but it's good enough for listening
  19528. - * to mp3s.
  19529. - */
  19530. - val |= PSC_I2SCFG_SET_WS(252);
  19531. -#else
  19532. - val |= PSC_I2SCFG_SET_WS(250);
  19533. -#endif
  19534. - val |= PSC_I2SCFG_RT_FIFO8 | PSC_I2SCFG_TT_FIFO8 | \
  19535. +
  19536. + val = PSC_I2SCFG_SET_LEN(16) | PSC_I2SCFG_WS(WS_128FS) | PSC_I2SCFG_RT_FIFO8 | PSC_I2SCFG_TT_FIFO8 | \
  19537. PSC_I2SCFG_BI | PSC_I2SCFG_XM;
  19538. - ip->psc_i2scfg = val;
  19539. - au_sync();
  19540. - val |= PSC_I2SCFG_DE_ENABLE;
  19541. - ip->psc_i2scfg = val;
  19542. - au_sync();
  19543. + ip->psc_i2scfg = val | PSC_I2SCFG_DE_ENABLE;
  19544. - /* Wait for Device ready.
  19545. - */
  19546. - do {
  19547. - val = ip->psc_i2sstat;
  19548. - au_sync();
  19549. - } while ((val & PSC_I2SSTAT_DR) == 0);
  19550. + set_dac_rate(s, 8000); //Set default rate
  19551. - val = ip->psc_i2scfg;
  19552. - au_sync();
  19553. + codec_init(s);
  19554. - codec_init();
  19555. + s->no_vra = vra ? 0 : 1;
  19556. - s->no_vra = 1;
  19557. if (s->no_vra)
  19558. info("no VRA, interpolating and decimating");
  19559. @@ -1866,6 +2122,8 @@
  19560. err_dev2:
  19561. unregister_sound_dsp(s->dev_audio);
  19562. #endif
  19563. + err_dev2:
  19564. + unregister_sound_dsp(s->dev_audio);
  19565. err_dev1:
  19566. au1xxx_dbdma_chan_free(s->dma_adc.dmanr);
  19567. err_dma2:
  19568. diff -Nur linux-2.4.32-rc1/drivers/sound/au1550_psc.c linux-2.4.32-rc1.mips/drivers/sound/au1550_psc.c
  19569. --- linux-2.4.32-rc1/drivers/sound/au1550_psc.c 2005-01-19 15:10:04.000000000 +0100
  19570. +++ linux-2.4.32-rc1.mips/drivers/sound/au1550_psc.c 2005-01-30 09:01:28.000000000 +0100
  19571. @@ -30,6 +30,7 @@
  19572. * 675 Mass Ave, Cambridge, MA 02139, USA.
  19573. *
  19574. */
  19575. +
  19576. #include <linux/version.h>
  19577. #include <linux/module.h>
  19578. #include <linux/string.h>
  19579. @@ -63,6 +64,14 @@
  19580. #include <asm/db1x00.h>
  19581. #endif
  19582. +#ifdef CONFIG_MIPS_PB1200
  19583. +#include <asm/pb1200.h>
  19584. +#endif
  19585. +
  19586. +#ifdef CONFIG_MIPS_DB1200
  19587. +#include <asm/db1200.h>
  19588. +#endif
  19589. +
  19590. #undef OSS_DOCUMENTED_MIXER_SEMANTICS
  19591. #define AU1550_MODULE_NAME "Au1550 psc audio"
  19592. @@ -521,7 +530,14 @@
  19593. spin_unlock_irqrestore(&s->lock, flags);
  19594. }
  19595. -
  19596. +/*
  19597. + NOTE: The xmit slots cannot be changed on the fly when in full-duplex
  19598. + because the AC'97 block must be stopped/started. When using this driver
  19599. + in full-duplex (in & out at the same time), the DMA engine will stop if
  19600. + you disable the block.
  19601. + TODO: change implementation to properly restart adc/dac after setting
  19602. + xmit slots.
  19603. +*/
  19604. static void
  19605. set_xmit_slots(int num_channels)
  19606. {
  19607. @@ -565,6 +581,14 @@
  19608. } while ((stat & PSC_AC97STAT_DR) == 0);
  19609. }
  19610. +/*
  19611. + NOTE: The recv slots cannot be changed on the fly when in full-duplex
  19612. + because the AC'97 block must be stopped/started. When using this driver
  19613. + in full-duplex (in & out at the same time), the DMA engine will stop if
  19614. + you disable the block.
  19615. + TODO: change implementation to properly restart adc/dac after setting
  19616. + recv slots.
  19617. +*/
  19618. static void
  19619. set_recv_slots(int num_channels)
  19620. {
  19621. @@ -608,7 +632,6 @@
  19622. spin_lock_irqsave(&s->lock, flags);
  19623. - set_xmit_slots(db->num_channels);
  19624. au_writel(PSC_AC97PCR_TC, PSC_AC97PCR);
  19625. au_sync();
  19626. au_writel(PSC_AC97PCR_TS, PSC_AC97PCR);
  19627. @@ -640,7 +663,6 @@
  19628. db->nextIn -= db->dmasize;
  19629. }
  19630. - set_recv_slots(db->num_channels);
  19631. au1xxx_dbdma_start(db->dmanr);
  19632. au_writel(PSC_AC97PCR_RC, PSC_AC97PCR);
  19633. au_sync();
  19634. @@ -752,12 +774,16 @@
  19635. if (ac97c_stat & (AC97C_XU | AC97C_XO | AC97C_TE))
  19636. dbg("AC97C status = 0x%08x", ac97c_stat);
  19637. #endif
  19638. + /* There is a possiblity that we are getting 1 interrupt for
  19639. + multiple descriptors. Use ddma api to find out how many
  19640. + completed.
  19641. + */
  19642. db->dma_qcount--;
  19643. if (db->count >= db->fragsize) {
  19644. if (au1xxx_dbdma_put_source(db->dmanr, db->nextOut,
  19645. db->fragsize) == 0) {
  19646. - err("qcount < 2 and no ring room!");
  19647. + err("qcount < 2 and no ring room1!");
  19648. }
  19649. db->nextOut += db->fragsize;
  19650. if (db->nextOut >= db->rawbuf + db->dmasize)
  19651. @@ -941,11 +967,12 @@
  19652. /* duplicate every audio frame src_factor times
  19653. */
  19654. - for (i = 0; i < db->src_factor; i++)
  19655. + for (i = 0; i < db->src_factor; i++) {
  19656. memcpy(dmabuf, dmasample, db->dma_bytes_per_sample);
  19657. + dmabuf += interp_bytes_per_sample;
  19658. + }
  19659. userbuf += db->user_bytes_per_sample;
  19660. - dmabuf += interp_bytes_per_sample;
  19661. }
  19662. return num_samples * interp_bytes_per_sample;
  19663. @@ -1203,7 +1230,7 @@
  19664. while ((db->dma_qcount < 2) && (db->count >= db->fragsize)) {
  19665. if (au1xxx_dbdma_put_source(db->dmanr, db->nextOut,
  19666. db->fragsize) == 0) {
  19667. - err("qcount < 2 and no ring room!");
  19668. + err("qcount < 2 and no ring room!0");
  19669. }
  19670. db->nextOut += db->fragsize;
  19671. if (db->nextOut >= db->rawbuf + db->dmasize)
  19672. @@ -1481,6 +1508,7 @@
  19673. return -EINVAL;
  19674. stop_adc(s);
  19675. s->dma_adc.num_channels = val;
  19676. + set_recv_slots(val);
  19677. if ((ret = prog_dmabuf_adc(s)))
  19678. return ret;
  19679. }
  19680. @@ -1538,6 +1566,7 @@
  19681. }
  19682. s->dma_dac.num_channels = val;
  19683. + set_xmit_slots(val);
  19684. if ((ret = prog_dmabuf_dac(s)))
  19685. return ret;
  19686. }
  19687. @@ -1832,10 +1861,8 @@
  19688. down(&s->open_sem);
  19689. }
  19690. - stop_dac(s);
  19691. - stop_adc(s);
  19692. -
  19693. if (file->f_mode & FMODE_READ) {
  19694. + stop_adc(s);
  19695. s->dma_adc.ossfragshift = s->dma_adc.ossmaxfrags =
  19696. s->dma_adc.subdivision = s->dma_adc.total_bytes = 0;
  19697. s->dma_adc.num_channels = 1;
  19698. @@ -1846,6 +1873,7 @@
  19699. }
  19700. if (file->f_mode & FMODE_WRITE) {
  19701. + stop_dac(s);
  19702. s->dma_dac.ossfragshift = s->dma_dac.ossmaxfrags =
  19703. s->dma_dac.subdivision = s->dma_dac.total_bytes = 0;
  19704. s->dma_dac.num_channels = 1;
  19705. @@ -2091,6 +2119,9 @@
  19706. ac97_read_proc, &s->codec);
  19707. #endif
  19708. + set_xmit_slots(1);
  19709. + set_recv_slots(1);
  19710. +
  19711. return 0;
  19712. err_dev3:
  19713. diff -Nur linux-2.4.32-rc1/drivers/sound/Config.in linux-2.4.32-rc1.mips/drivers/sound/Config.in
  19714. --- linux-2.4.32-rc1/drivers/sound/Config.in 2005-01-19 15:10:04.000000000 +0100
  19715. +++ linux-2.4.32-rc1.mips/drivers/sound/Config.in 2005-04-21 07:53:07.000000000 +0200
  19716. @@ -72,10 +72,15 @@
  19717. if [ "$CONFIG_DDB5477" = "y" ]; then
  19718. dep_tristate ' NEC Vrc5477 AC97 sound' CONFIG_SOUND_VRC5477 $CONFIG_SOUND
  19719. fi
  19720. -if [ "$CONFIG_SOC_AU1X00" = "y" -o "$CONFIG_SOC_AU1500" = "y" ]; then
  19721. - dep_tristate ' Au1x00 Sound' CONFIG_SOUND_AU1X00 $CONFIG_SOUND
  19722. - dep_tristate ' Au1550 PSC Sound' CONFIG_SOUND_AU1550_PSC $CONFIG_SOUND
  19723. - dep_tristate ' Au1550 I2S Sound' CONFIG_SOUND_AU1550_I2S $CONFIG_SOUND
  19724. +if [ "$CONFIG_SOC_AU1000" = "y" -o \
  19725. + "$CONFIG_SOC_AU1500" = "y" -o \
  19726. + "$CONFIG_SOC_AU1100" = "y" ]; then
  19727. + dep_tristate ' Au1x00 AC97 Sound' CONFIG_SOUND_AU1X00 $CONFIG_SOUND
  19728. +fi
  19729. +if [ "$CONFIG_SOC_AU1550" = "y" -o \
  19730. + "$CONFIG_SOC_AU1200" = "y" ]; then
  19731. + dep_tristate ' Au1550/Au1200 PSC AC97 Sound' CONFIG_SOUND_AU1550_PSC $CONFIG_SOUND
  19732. + dep_tristate ' Au1550/Au1200 PSC I2S Sound' CONFIG_SOUND_AU1550_I2S $CONFIG_SOUND
  19733. fi
  19734. dep_tristate ' Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core' CONFIG_SOUND_TRIDENT $CONFIG_SOUND $CONFIG_PCI
  19735. diff -Nur linux-2.4.32-rc1/drivers/tc/lk201.c linux-2.4.32-rc1.mips/drivers/tc/lk201.c
  19736. --- linux-2.4.32-rc1/drivers/tc/lk201.c 2004-02-18 14:36:31.000000000 +0100
  19737. +++ linux-2.4.32-rc1.mips/drivers/tc/lk201.c 2004-09-28 02:53:04.000000000 +0200
  19738. @@ -5,7 +5,7 @@
  19739. * for more details.
  19740. *
  19741. * Copyright (C) 1999-2002 Harald Koerfgen <[email protected]>
  19742. - * Copyright (C) 2001, 2002, 2003 Maciej W. Rozycki <[email protected]>
  19743. + * Copyright (C) 2001, 2002, 2003, 2004 Maciej W. Rozycki
  19744. */
  19745. #include <linux/config.h>
  19746. @@ -23,8 +23,8 @@
  19747. #include <asm/keyboard.h>
  19748. #include <asm/dec/tc.h>
  19749. #include <asm/dec/machtype.h>
  19750. +#include <asm/dec/serial.h>
  19751. -#include "zs.h"
  19752. #include "lk201.h"
  19753. /*
  19754. @@ -55,19 +55,20 @@
  19755. unsigned char kbd_sysrq_key = -1;
  19756. #endif
  19757. -#define KEYB_LINE 3
  19758. +#define KEYB_LINE_ZS 3
  19759. +#define KEYB_LINE_DZ 0
  19760. -static int __init lk201_init(struct dec_serial *);
  19761. -static void __init lk201_info(struct dec_serial *);
  19762. -static void lk201_kbd_rx_char(unsigned char, unsigned char);
  19763. +static int __init lk201_init(void *);
  19764. +static void __init lk201_info(void *);
  19765. +static void lk201_rx_char(unsigned char, unsigned char);
  19766. -struct zs_hook lk201_kbdhook = {
  19767. +static struct dec_serial_hook lk201_hook = {
  19768. .init_channel = lk201_init,
  19769. .init_info = lk201_info,
  19770. .rx_char = NULL,
  19771. .poll_rx_char = NULL,
  19772. .poll_tx_char = NULL,
  19773. - .cflags = B4800 | CS8 | CSTOPB | CLOCAL
  19774. + .cflags = B4800 | CS8 | CSTOPB | CLOCAL,
  19775. };
  19776. /*
  19777. @@ -93,28 +94,28 @@
  19778. LK_CMD_ENB_BELL, LK_PARAM_VOLUME(4),
  19779. };
  19780. -static struct dec_serial* lk201kbd_info;
  19781. +static void *lk201_handle;
  19782. -static int lk201_send(struct dec_serial *info, unsigned char ch)
  19783. +static int lk201_send(unsigned char ch)
  19784. {
  19785. - if (info->hook->poll_tx_char(info, ch)) {
  19786. + if (lk201_hook.poll_tx_char(lk201_handle, ch)) {
  19787. printk(KERN_ERR "lk201: transmit timeout\n");
  19788. return -EIO;
  19789. }
  19790. return 0;
  19791. }
  19792. -static inline int lk201_get_id(struct dec_serial *info)
  19793. +static inline int lk201_get_id(void)
  19794. {
  19795. - return lk201_send(info, LK_CMD_REQ_ID);
  19796. + return lk201_send(LK_CMD_REQ_ID);
  19797. }
  19798. -static int lk201_reset(struct dec_serial *info)
  19799. +static int lk201_reset(void)
  19800. {
  19801. int i, r;
  19802. for (i = 0; i < sizeof(lk201_reset_string); i++) {
  19803. - r = lk201_send(info, lk201_reset_string[i]);
  19804. + r = lk201_send(lk201_reset_string[i]);
  19805. if (r < 0)
  19806. return r;
  19807. }
  19808. @@ -203,24 +204,26 @@
  19809. static int write_kbd_rate(struct kbd_repeat *rep)
  19810. {
  19811. - struct dec_serial* info = lk201kbd_info;
  19812. int delay, rate;
  19813. int i;
  19814. delay = rep->delay / 5;
  19815. rate = rep->rate;
  19816. for (i = 0; i < 4; i++) {
  19817. - if (info->hook->poll_tx_char(info, LK_CMD_RPT_RATE(i)))
  19818. + if (lk201_hook.poll_tx_char(lk201_handle,
  19819. + LK_CMD_RPT_RATE(i)))
  19820. return 1;
  19821. - if (info->hook->poll_tx_char(info, LK_PARAM_DELAY(delay)))
  19822. + if (lk201_hook.poll_tx_char(lk201_handle,
  19823. + LK_PARAM_DELAY(delay)))
  19824. return 1;
  19825. - if (info->hook->poll_tx_char(info, LK_PARAM_RATE(rate)))
  19826. + if (lk201_hook.poll_tx_char(lk201_handle,
  19827. + LK_PARAM_RATE(rate)))
  19828. return 1;
  19829. }
  19830. return 0;
  19831. }
  19832. -static int lk201kbd_rate(struct kbd_repeat *rep)
  19833. +static int lk201_kbd_rate(struct kbd_repeat *rep)
  19834. {
  19835. if (rep == NULL)
  19836. return -EINVAL;
  19837. @@ -237,10 +240,8 @@
  19838. return 0;
  19839. }
  19840. -static void lk201kd_mksound(unsigned int hz, unsigned int ticks)
  19841. +static void lk201_kd_mksound(unsigned int hz, unsigned int ticks)
  19842. {
  19843. - struct dec_serial* info = lk201kbd_info;
  19844. -
  19845. if (!ticks)
  19846. return;
  19847. @@ -253,20 +254,19 @@
  19848. ticks = 7;
  19849. ticks = 7 - ticks;
  19850. - if (info->hook->poll_tx_char(info, LK_CMD_ENB_BELL))
  19851. + if (lk201_hook.poll_tx_char(lk201_handle, LK_CMD_ENB_BELL))
  19852. return;
  19853. - if (info->hook->poll_tx_char(info, LK_PARAM_VOLUME(ticks)))
  19854. + if (lk201_hook.poll_tx_char(lk201_handle, LK_PARAM_VOLUME(ticks)))
  19855. return;
  19856. - if (info->hook->poll_tx_char(info, LK_CMD_BELL))
  19857. + if (lk201_hook.poll_tx_char(lk201_handle, LK_CMD_BELL))
  19858. return;
  19859. }
  19860. void kbd_leds(unsigned char leds)
  19861. {
  19862. - struct dec_serial* info = lk201kbd_info;
  19863. unsigned char l = 0;
  19864. - if (!info) /* FIXME */
  19865. + if (!lk201_handle) /* FIXME */
  19866. return;
  19867. /* FIXME -- Only Hold and Lock LEDs for now. --macro */
  19868. @@ -275,13 +275,13 @@
  19869. if (leds & LED_CAP)
  19870. l |= LK_LED_LOCK;
  19871. - if (info->hook->poll_tx_char(info, LK_CMD_LEDS_ON))
  19872. + if (lk201_hook.poll_tx_char(lk201_handle, LK_CMD_LEDS_ON))
  19873. return;
  19874. - if (info->hook->poll_tx_char(info, LK_PARAM_LED_MASK(l)))
  19875. + if (lk201_hook.poll_tx_char(lk201_handle, LK_PARAM_LED_MASK(l)))
  19876. return;
  19877. - if (info->hook->poll_tx_char(info, LK_CMD_LEDS_OFF))
  19878. + if (lk201_hook.poll_tx_char(lk201_handle, LK_CMD_LEDS_OFF))
  19879. return;
  19880. - if (info->hook->poll_tx_char(info, LK_PARAM_LED_MASK(~l)))
  19881. + if (lk201_hook.poll_tx_char(lk201_handle, LK_PARAM_LED_MASK(~l)))
  19882. return;
  19883. }
  19884. @@ -307,7 +307,7 @@
  19885. return 0x80;
  19886. }
  19887. -static void lk201_kbd_rx_char(unsigned char ch, unsigned char stat)
  19888. +static void lk201_rx_char(unsigned char ch, unsigned char fl)
  19889. {
  19890. static unsigned char id[6];
  19891. static int id_i;
  19892. @@ -316,9 +316,8 @@
  19893. static int prev_scancode;
  19894. unsigned char c = scancodeRemap[ch];
  19895. - if (stat && stat != TTY_OVERRUN) {
  19896. - printk(KERN_ERR "lk201: keyboard receive error: 0x%02x\n",
  19897. - stat);
  19898. + if (fl != TTY_NORMAL && fl != TTY_OVERRUN) {
  19899. + printk(KERN_ERR "lk201: keyboard receive error: 0x%02x\n", fl);
  19900. return;
  19901. }
  19902. @@ -335,7 +334,7 @@
  19903. /* OK, the power-up concluded. */
  19904. lk201_report(id);
  19905. if (id[2] == LK_STAT_PWRUP_OK)
  19906. - lk201_get_id(lk201kbd_info);
  19907. + lk201_get_id();
  19908. else {
  19909. id_i = 0;
  19910. printk(KERN_ERR "lk201: keyboard power-up "
  19911. @@ -345,7 +344,7 @@
  19912. /* We got the ID; report it and start operation. */
  19913. id_i = 0;
  19914. lk201_id(id);
  19915. - lk201_reset(lk201kbd_info);
  19916. + lk201_reset();
  19917. }
  19918. return;
  19919. }
  19920. @@ -398,29 +397,28 @@
  19921. tasklet_schedule(&keyboard_tasklet);
  19922. }
  19923. -static void __init lk201_info(struct dec_serial *info)
  19924. +static void __init lk201_info(void *handle)
  19925. {
  19926. }
  19927. -static int __init lk201_init(struct dec_serial *info)
  19928. +static int __init lk201_init(void *handle)
  19929. {
  19930. /* First install handlers. */
  19931. - lk201kbd_info = info;
  19932. - kbd_rate = lk201kbd_rate;
  19933. - kd_mksound = lk201kd_mksound;
  19934. + lk201_handle = handle;
  19935. + kbd_rate = lk201_kbd_rate;
  19936. + kd_mksound = lk201_kd_mksound;
  19937. - info->hook->rx_char = lk201_kbd_rx_char;
  19938. + lk201_hook.rx_char = lk201_rx_char;
  19939. /* Then just issue a reset -- the handlers will do the rest. */
  19940. - lk201_send(info, LK_CMD_POWER_UP);
  19941. + lk201_send(LK_CMD_POWER_UP);
  19942. return 0;
  19943. }
  19944. void __init kbd_init_hw(void)
  19945. {
  19946. - extern int register_zs_hook(unsigned int, struct zs_hook *);
  19947. - extern int unregister_zs_hook(unsigned int);
  19948. + int keyb_line;
  19949. /* Maxine uses LK501 at the Access.Bus. */
  19950. if (!LK_IFACE)
  19951. @@ -428,19 +426,15 @@
  19952. printk(KERN_INFO "lk201: DECstation LK keyboard driver v0.05.\n");
  19953. - if (LK_IFACE_ZS) {
  19954. - /*
  19955. - * kbd_init_hw() is being called before
  19956. - * rs_init() so just register the kbd hook
  19957. - * and let zs_init do the rest :-)
  19958. - */
  19959. - if(!register_zs_hook(KEYB_LINE, &lk201_kbdhook))
  19960. - unregister_zs_hook(KEYB_LINE);
  19961. - } else {
  19962. - /*
  19963. - * TODO: modify dz.c to allow similar hooks
  19964. - * for LK201 handling on DS2100, DS3100, and DS5000/200
  19965. - */
  19966. - printk(KERN_ERR "lk201: support for DZ11 not yet ready.\n");
  19967. - }
  19968. + /*
  19969. + * kbd_init_hw() is being called before
  19970. + * rs_init() so just register the kbd hook
  19971. + * and let zs_init do the rest :-)
  19972. + */
  19973. + if (LK_IFACE_ZS)
  19974. + keyb_line = KEYB_LINE_ZS;
  19975. + else
  19976. + keyb_line = KEYB_LINE_DZ;
  19977. + if (!register_dec_serial_hook(keyb_line, &lk201_hook))
  19978. + unregister_dec_serial_hook(keyb_line);
  19979. }
  19980. diff -Nur linux-2.4.32-rc1/drivers/tc/zs.c linux-2.4.32-rc1.mips/drivers/tc/zs.c
  19981. --- linux-2.4.32-rc1/drivers/tc/zs.c 2005-01-19 15:10:05.000000000 +0100
  19982. +++ linux-2.4.32-rc1.mips/drivers/tc/zs.c 2004-12-27 05:13:50.000000000 +0100
  19983. @@ -68,6 +68,8 @@
  19984. #include <asm/bitops.h>
  19985. #include <asm/uaccess.h>
  19986. #include <asm/bootinfo.h>
  19987. +#include <asm/dec/serial.h>
  19988. +
  19989. #ifdef CONFIG_DECSTATION
  19990. #include <asm/dec/interrupts.h>
  19991. #include <asm/dec/machtype.h>
  19992. @@ -160,8 +162,8 @@
  19993. #ifdef CONFIG_SERIAL_DEC_CONSOLE
  19994. static struct console sercons;
  19995. #endif
  19996. -#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) \
  19997. - && !defined(MODULE)
  19998. +#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && \
  19999. + !defined(MODULE)
  20000. static unsigned long break_pressed; /* break, really ... */
  20001. #endif
  20002. @@ -196,7 +198,6 @@
  20003. /*
  20004. * Debugging.
  20005. */
  20006. -#undef SERIAL_DEBUG_INTR
  20007. #undef SERIAL_DEBUG_OPEN
  20008. #undef SERIAL_DEBUG_FLOW
  20009. #undef SERIAL_DEBUG_THROTTLE
  20010. @@ -221,10 +222,6 @@
  20011. static struct termios *serial_termios[NUM_CHANNELS];
  20012. static struct termios *serial_termios_locked[NUM_CHANNELS];
  20013. -#ifndef MIN
  20014. -#define MIN(a,b) ((a) < (b) ? (a) : (b))
  20015. -#endif
  20016. -
  20017. /*
  20018. * tmp_buf is used as a temporary buffer by serial_write. We need to
  20019. * lock it in case the copy_from_user blocks while swapping in a page,
  20020. @@ -386,8 +383,6 @@
  20021. * -----------------------------------------------------------------------
  20022. */
  20023. -static int tty_break; /* Set whenever BREAK condition is detected. */
  20024. -
  20025. /*
  20026. * This routine is used by the interrupt handler to schedule
  20027. * processing in the software interrupt portion of the driver.
  20028. @@ -414,20 +409,15 @@
  20029. if (!tty && (!info->hook || !info->hook->rx_char))
  20030. continue;
  20031. - if (tty_break) {
  20032. - tty_break = 0;
  20033. -#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && !defined(MODULE)
  20034. - if (info->line == sercons.index) {
  20035. - if (!break_pressed) {
  20036. - break_pressed = jiffies;
  20037. - goto ignore_char;
  20038. - }
  20039. - break_pressed = 0;
  20040. - }
  20041. -#endif
  20042. + flag = TTY_NORMAL;
  20043. + if (info->tty_break) {
  20044. + info->tty_break = 0;
  20045. flag = TTY_BREAK;
  20046. if (info->flags & ZILOG_SAK)
  20047. do_SAK(tty);
  20048. + /* Ignore the null char got when BREAK is removed. */
  20049. + if (ch == 0)
  20050. + continue;
  20051. } else {
  20052. if (stat & Rx_OVR) {
  20053. flag = TTY_OVERRUN;
  20054. @@ -435,20 +425,22 @@
  20055. flag = TTY_FRAME;
  20056. } else if (stat & PAR_ERR) {
  20057. flag = TTY_PARITY;
  20058. - } else
  20059. - flag = 0;
  20060. - if (flag)
  20061. + }
  20062. + if (flag != TTY_NORMAL)
  20063. /* reset the error indication */
  20064. write_zsreg(info->zs_channel, R0, ERR_RES);
  20065. }
  20066. -#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && !defined(MODULE)
  20067. +#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && \
  20068. + !defined(MODULE)
  20069. if (break_pressed && info->line == sercons.index) {
  20070. - if (ch != 0 &&
  20071. - time_before(jiffies, break_pressed + HZ*5)) {
  20072. + /* Ignore the null char got when BREAK is removed. */
  20073. + if (ch == 0)
  20074. + continue;
  20075. + if (time_before(jiffies, break_pressed + HZ * 5)) {
  20076. handle_sysrq(ch, regs, NULL, NULL);
  20077. break_pressed = 0;
  20078. - goto ignore_char;
  20079. + continue;
  20080. }
  20081. break_pressed = 0;
  20082. }
  20083. @@ -459,23 +451,7 @@
  20084. return;
  20085. }
  20086. - if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
  20087. - static int flip_buf_ovf;
  20088. - ++flip_buf_ovf;
  20089. - continue;
  20090. - }
  20091. - tty->flip.count++;
  20092. - {
  20093. - static int flip_max_cnt;
  20094. - if (flip_max_cnt < tty->flip.count)
  20095. - flip_max_cnt = tty->flip.count;
  20096. - }
  20097. -
  20098. - *tty->flip.flag_buf_ptr++ = flag;
  20099. - *tty->flip.char_buf_ptr++ = ch;
  20100. -#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && !defined(MODULE)
  20101. - ignore_char:
  20102. -#endif
  20103. + tty_insert_flip_char(tty, ch, flag);
  20104. }
  20105. if (tty)
  20106. tty_flip_buffer_push(tty);
  20107. @@ -517,11 +493,15 @@
  20108. /* Get status from Read Register 0 */
  20109. stat = read_zsreg(info->zs_channel, R0);
  20110. - if (stat & BRK_ABRT) {
  20111. -#ifdef SERIAL_DEBUG_INTR
  20112. - printk("handling break....");
  20113. + if ((stat & BRK_ABRT) && !(info->read_reg_zero & BRK_ABRT)) {
  20114. +#if defined(CONFIG_SERIAL_DEC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) && \
  20115. + !defined(MODULE)
  20116. + if (info->line == sercons.index) {
  20117. + if (!break_pressed)
  20118. + break_pressed = jiffies;
  20119. + } else
  20120. #endif
  20121. - tty_break = 1;
  20122. + info->tty_break = 1;
  20123. }
  20124. if (info->zs_channel != info->zs_chan_a) {
  20125. @@ -957,7 +937,7 @@
  20126. save_flags(flags);
  20127. while (1) {
  20128. cli();
  20129. - c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
  20130. + c = min(count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
  20131. SERIAL_XMIT_SIZE - info->xmit_head));
  20132. if (c <= 0)
  20133. break;
  20134. @@ -965,7 +945,7 @@
  20135. if (from_user) {
  20136. down(&tmp_buf_sem);
  20137. copy_from_user(tmp_buf, buf, c);
  20138. - c = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
  20139. + c = min(c, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
  20140. SERIAL_XMIT_SIZE - info->xmit_head));
  20141. memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c);
  20142. up(&tmp_buf_sem);
  20143. @@ -1282,46 +1262,48 @@
  20144. }
  20145. switch (cmd) {
  20146. - case TIOCMGET:
  20147. - error = verify_area(VERIFY_WRITE, (void *) arg,
  20148. - sizeof(unsigned int));
  20149. - if (error)
  20150. - return error;
  20151. - return get_modem_info(info, (unsigned int *) arg);
  20152. - case TIOCMBIS:
  20153. - case TIOCMBIC:
  20154. - case TIOCMSET:
  20155. - return set_modem_info(info, cmd, (unsigned int *) arg);
  20156. - case TIOCGSERIAL:
  20157. - error = verify_area(VERIFY_WRITE, (void *) arg,
  20158. - sizeof(struct serial_struct));
  20159. - if (error)
  20160. - return error;
  20161. - return get_serial_info(info,
  20162. - (struct serial_struct *) arg);
  20163. - case TIOCSSERIAL:
  20164. - return set_serial_info(info,
  20165. - (struct serial_struct *) arg);
  20166. - case TIOCSERGETLSR: /* Get line status register */
  20167. - error = verify_area(VERIFY_WRITE, (void *) arg,
  20168. - sizeof(unsigned int));
  20169. - if (error)
  20170. - return error;
  20171. - else
  20172. - return get_lsr_info(info, (unsigned int *) arg);
  20173. + case TIOCMGET:
  20174. + error = verify_area(VERIFY_WRITE, (void *)arg,
  20175. + sizeof(unsigned int));
  20176. + if (error)
  20177. + return error;
  20178. + return get_modem_info(info, (unsigned int *)arg);
  20179. - case TIOCSERGSTRUCT:
  20180. - error = verify_area(VERIFY_WRITE, (void *) arg,
  20181. - sizeof(struct dec_serial));
  20182. - if (error)
  20183. - return error;
  20184. - copy_from_user((struct dec_serial *) arg,
  20185. - info, sizeof(struct dec_serial));
  20186. - return 0;
  20187. + case TIOCMBIS:
  20188. + case TIOCMBIC:
  20189. + case TIOCMSET:
  20190. + return set_modem_info(info, cmd, (unsigned int *)arg);
  20191. - default:
  20192. - return -ENOIOCTLCMD;
  20193. - }
  20194. + case TIOCGSERIAL:
  20195. + error = verify_area(VERIFY_WRITE, (void *)arg,
  20196. + sizeof(struct serial_struct));
  20197. + if (error)
  20198. + return error;
  20199. + return get_serial_info(info, (struct serial_struct *)arg);
  20200. +
  20201. + case TIOCSSERIAL:
  20202. + return set_serial_info(info, (struct serial_struct *)arg);
  20203. +
  20204. + case TIOCSERGETLSR: /* Get line status register */
  20205. + error = verify_area(VERIFY_WRITE, (void *)arg,
  20206. + sizeof(unsigned int));
  20207. + if (error)
  20208. + return error;
  20209. + else
  20210. + return get_lsr_info(info, (unsigned int *)arg);
  20211. +
  20212. + case TIOCSERGSTRUCT:
  20213. + error = verify_area(VERIFY_WRITE, (void *)arg,
  20214. + sizeof(struct dec_serial));
  20215. + if (error)
  20216. + return error;
  20217. + copy_from_user((struct dec_serial *)arg, info,
  20218. + sizeof(struct dec_serial));
  20219. + return 0;
  20220. +
  20221. + default:
  20222. + return -ENOIOCTLCMD;
  20223. + }
  20224. return 0;
  20225. }
  20226. @@ -1446,7 +1428,8 @@
  20227. static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
  20228. {
  20229. struct dec_serial *info = (struct dec_serial *) tty->driver_data;
  20230. - unsigned long orig_jiffies, char_time;
  20231. + unsigned long orig_jiffies;
  20232. + int char_time;
  20233. if (serial_paranoia_check(info, tty->device, "rs_wait_until_sent"))
  20234. return;
  20235. @@ -1462,7 +1445,7 @@
  20236. if (char_time == 0)
  20237. char_time = 1;
  20238. if (timeout)
  20239. - char_time = MIN(char_time, timeout);
  20240. + char_time = min(char_time, timeout);
  20241. while ((read_zsreg(info->zs_channel, 1) & Tx_BUF_EMP) == 0) {
  20242. current->state = TASK_INTERRUPTIBLE;
  20243. schedule_timeout(char_time);
  20244. @@ -1714,7 +1697,7 @@
  20245. static void __init show_serial_version(void)
  20246. {
  20247. - printk("DECstation Z8530 serial driver version 0.08\n");
  20248. + printk("DECstation Z8530 serial driver version 0.09\n");
  20249. }
  20250. /* Initialize Z8530s zs_channels
  20251. @@ -1994,8 +1977,9 @@
  20252. * polling I/O routines
  20253. */
  20254. static int
  20255. -zs_poll_tx_char(struct dec_serial *info, unsigned char ch)
  20256. +zs_poll_tx_char(void *handle, unsigned char ch)
  20257. {
  20258. + struct dec_serial *info = handle;
  20259. struct dec_zschannel *chan = info->zs_channel;
  20260. int ret;
  20261. @@ -2017,8 +2001,9 @@
  20262. }
  20263. static int
  20264. -zs_poll_rx_char(struct dec_serial *info)
  20265. +zs_poll_rx_char(void *handle)
  20266. {
  20267. + struct dec_serial *info = handle;
  20268. struct dec_zschannel *chan = info->zs_channel;
  20269. int ret;
  20270. @@ -2038,12 +2023,13 @@
  20271. return -ENODEV;
  20272. }
  20273. -unsigned int register_zs_hook(unsigned int channel, struct zs_hook *hook)
  20274. +int register_zs_hook(unsigned int channel, struct dec_serial_hook *hook)
  20275. {
  20276. struct dec_serial *info = &zs_soft[channel];
  20277. if (info->hook) {
  20278. - printk(__FUNCTION__": line %d has already a hook registered\n", channel);
  20279. + printk("%s: line %d has already a hook registered\n",
  20280. + __FUNCTION__, channel);
  20281. return 0;
  20282. } else {
  20283. @@ -2055,7 +2041,7 @@
  20284. }
  20285. }
  20286. -unsigned int unregister_zs_hook(unsigned int channel)
  20287. +int unregister_zs_hook(unsigned int channel)
  20288. {
  20289. struct dec_serial *info = &zs_soft[channel];
  20290. @@ -2063,8 +2049,8 @@
  20291. info->hook = NULL;
  20292. return 1;
  20293. } else {
  20294. - printk(__FUNCTION__": trying to unregister hook on line %d,"
  20295. - " but none is registered\n", channel);
  20296. + printk("%s: trying to unregister hook on line %d,"
  20297. + " but none is registered\n", __FUNCTION__, channel);
  20298. return 0;
  20299. }
  20300. }
  20301. @@ -2319,22 +2305,23 @@
  20302. write_zsreg(chan, 9, nine);
  20303. }
  20304. -static int kgdbhook_init_channel(struct dec_serial* info)
  20305. +static int kgdbhook_init_channel(void *handle)
  20306. {
  20307. return 0;
  20308. }
  20309. -static void kgdbhook_init_info(struct dec_serial* info)
  20310. +static void kgdbhook_init_info(void *handle)
  20311. {
  20312. }
  20313. -static void kgdbhook_rx_char(struct dec_serial* info,
  20314. - unsigned char ch, unsigned char stat)
  20315. +static void kgdbhook_rx_char(void *handle, unsigned char ch, unsigned char fl)
  20316. {
  20317. + struct dec_serial *info = handle;
  20318. +
  20319. + if (fl != TTY_NORMAL)
  20320. + return;
  20321. if (ch == 0x03 || ch == '$')
  20322. breakpoint();
  20323. - if (stat & (Rx_OVR|FRM_ERR|PAR_ERR))
  20324. - write_zsreg(info->zs_channel, 0, ERR_RES);
  20325. }
  20326. /* This sets up the serial port we're using, and turns on
  20327. @@ -2360,11 +2347,11 @@
  20328. * for /dev/ttyb which is determined in setup_arch() from the
  20329. * boot command line flags.
  20330. */
  20331. -struct zs_hook zs_kgdbhook = {
  20332. - init_channel : kgdbhook_init_channel,
  20333. - init_info : kgdbhook_init_info,
  20334. - cflags : B38400|CS8|CLOCAL,
  20335. - rx_char : kgdbhook_rx_char,
  20336. +struct dec_serial_hook zs_kgdbhook = {
  20337. + .init_channel = kgdbhook_init_channel,
  20338. + .init_info = kgdbhook_init_info,
  20339. + .rx_char = kgdbhook_rx_char,
  20340. + .cflags = B38400 | CS8 | CLOCAL,
  20341. }
  20342. void __init zs_kgdb_hook(int tty_num)
  20343. diff -Nur linux-2.4.32-rc1/drivers/tc/zs.h linux-2.4.32-rc1.mips/drivers/tc/zs.h
  20344. --- linux-2.4.32-rc1/drivers/tc/zs.h 2004-02-18 14:36:31.000000000 +0100
  20345. +++ linux-2.4.32-rc1.mips/drivers/tc/zs.h 2004-07-01 15:28:54.000000000 +0200
  20346. @@ -1,14 +1,18 @@
  20347. /*
  20348. - * macserial.h: Definitions for the Macintosh Z8530 serial driver.
  20349. + * drivers/tc/zs.h: Definitions for the DECstation Z85C30 serial driver.
  20350. *
  20351. * Adapted from drivers/sbus/char/sunserial.h by Paul Mackerras.
  20352. + * Adapted from drivers/macintosh/macserial.h by Harald Koerfgen.
  20353. *
  20354. * Copyright (C) 1996 Paul Mackerras ([email protected])
  20355. * Copyright (C) 1995 David S. Miller ([email protected])
  20356. + * Copyright (C) 2004 Maciej W. Rozycki
  20357. */
  20358. #ifndef _DECSERIAL_H
  20359. #define _DECSERIAL_H
  20360. +#include <asm/dec/serial.h>
  20361. +
  20362. #define NUM_ZSREGS 16
  20363. struct serial_struct {
  20364. @@ -89,63 +93,50 @@
  20365. unsigned char curregs[NUM_ZSREGS];
  20366. };
  20367. -struct dec_serial;
  20368. -
  20369. -struct zs_hook {
  20370. - int (*init_channel)(struct dec_serial* info);
  20371. - void (*init_info)(struct dec_serial* info);
  20372. - void (*rx_char)(unsigned char ch, unsigned char stat);
  20373. - int (*poll_rx_char)(struct dec_serial* info);
  20374. - int (*poll_tx_char)(struct dec_serial* info,
  20375. - unsigned char ch);
  20376. - unsigned cflags;
  20377. -};
  20378. -
  20379. struct dec_serial {
  20380. - struct dec_serial *zs_next; /* For IRQ servicing chain */
  20381. - struct dec_zschannel *zs_channel; /* Channel registers */
  20382. - struct dec_zschannel *zs_chan_a; /* A side registers */
  20383. - unsigned char read_reg_zero;
  20384. -
  20385. - char soft_carrier; /* Use soft carrier on this channel */
  20386. - char break_abort; /* Is serial console in, so process brk/abrt */
  20387. - struct zs_hook *hook; /* Hook on this channel */
  20388. - char is_cons; /* Is this our console. */
  20389. - unsigned char tx_active; /* character is being xmitted */
  20390. - unsigned char tx_stopped; /* output is suspended */
  20391. -
  20392. - /* We need to know the current clock divisor
  20393. - * to read the bps rate the chip has currently
  20394. - * loaded.
  20395. + struct dec_serial *zs_next; /* For IRQ servicing chain. */
  20396. + struct dec_zschannel *zs_channel; /* Channel registers. */
  20397. + struct dec_zschannel *zs_chan_a; /* A side registers. */
  20398. + unsigned char read_reg_zero;
  20399. +
  20400. + struct dec_serial_hook *hook; /* Hook on this channel. */
  20401. + int tty_break; /* Set on BREAK condition. */
  20402. + int is_cons; /* Is this our console. */
  20403. + int tx_active; /* Char is being xmitted. */
  20404. + int tx_stopped; /* Output is suspended. */
  20405. +
  20406. + /*
  20407. + * We need to know the current clock divisor
  20408. + * to read the bps rate the chip has currently loaded.
  20409. */
  20410. - unsigned char clk_divisor; /* May be 1, 16, 32, or 64 */
  20411. - int zs_baud;
  20412. + int clk_divisor; /* May be 1, 16, 32, or 64. */
  20413. + int zs_baud;
  20414. - char change_needed;
  20415. + char change_needed;
  20416. int magic;
  20417. int baud_base;
  20418. int port;
  20419. int irq;
  20420. - int flags; /* defined in tty.h */
  20421. - int type; /* UART type */
  20422. + int flags; /* Defined in tty.h. */
  20423. + int type; /* UART type. */
  20424. struct tty_struct *tty;
  20425. int read_status_mask;
  20426. int ignore_status_mask;
  20427. int timeout;
  20428. int xmit_fifo_size;
  20429. int custom_divisor;
  20430. - int x_char; /* xon/xoff character */
  20431. + int x_char; /* XON/XOFF character. */
  20432. int close_delay;
  20433. unsigned short closing_wait;
  20434. unsigned short closing_wait2;
  20435. unsigned long event;
  20436. unsigned long last_active;
  20437. int line;
  20438. - int count; /* # of fd on device */
  20439. - int blocked_open; /* # of blocked opens */
  20440. - long session; /* Session of opening process */
  20441. - long pgrp; /* pgrp of opening process */
  20442. + int count; /* # of fds on device. */
  20443. + int blocked_open; /* # of blocked opens. */
  20444. + long session; /* Sess of opening process. */
  20445. + long pgrp; /* Pgrp of opening process. */
  20446. unsigned char *xmit_buf;
  20447. int xmit_head;
  20448. int xmit_tail;
  20449. diff -Nur linux-2.4.32-rc1/drivers/video/au1200fb.c linux-2.4.32-rc1.mips/drivers/video/au1200fb.c
  20450. --- linux-2.4.32-rc1/drivers/video/au1200fb.c 1970-01-01 01:00:00.000000000 +0100
  20451. +++ linux-2.4.32-rc1.mips/drivers/video/au1200fb.c 2005-03-13 09:04:16.000000000 +0100
  20452. @@ -0,0 +1,1564 @@
  20453. +/*
  20454. + * BRIEF MODULE DESCRIPTION
  20455. + * Au1200 LCD Driver.
  20456. + *
  20457. + * Copyright 2004 AMD
  20458. + * Author: AMD
  20459. + *
  20460. + * Based on:
  20461. + * linux/drivers/video/skeletonfb.c -- Skeleton for a frame buffer device
  20462. + * Created 28 Dec 1997 by Geert Uytterhoeven
  20463. + *
  20464. + * This program is free software; you can redistribute it and/or modify it
  20465. + * under the terms of the GNU General Public License as published by the
  20466. + * Free Software Foundation; either version 2 of the License, or (at your
  20467. + * option) any later version.
  20468. + *
  20469. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  20470. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  20471. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  20472. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  20473. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  20474. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  20475. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  20476. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  20477. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  20478. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  20479. + *
  20480. + * You should have received a copy of the GNU General Public License along
  20481. + * with this program; if not, write to the Free Software Foundation, Inc.,
  20482. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  20483. + */
  20484. +
  20485. +#include <linux/module.h>
  20486. +#include <linux/kernel.h>
  20487. +#include <linux/errno.h>
  20488. +#include <linux/string.h>
  20489. +#include <linux/mm.h>
  20490. +#include <linux/tty.h>
  20491. +#include <linux/slab.h>
  20492. +#include <linux/delay.h>
  20493. +#include <linux/fb.h>
  20494. +#include <linux/init.h>
  20495. +#include <asm/uaccess.h>
  20496. +
  20497. +#include <asm/au1000.h>
  20498. +#include <asm/au1xxx_gpio.h>
  20499. +#include "au1200fb.h"
  20500. +
  20501. +#include <video/fbcon.h>
  20502. +#include <video/fbcon-cfb16.h>
  20503. +#include <video/fbcon-cfb32.h>
  20504. +#define CMAPSIZE 16
  20505. +
  20506. +#define AU1200_LCD_GET_WINENABLE 1
  20507. +#define AU1200_LCD_SET_WINENABLE 2
  20508. +#define AU1200_LCD_GET_WINLOCATION 3
  20509. +#define AU1200_LCD_SET_WINLOCATION 4
  20510. +#define AU1200_LCD_GET_WINSIZE 5
  20511. +#define AU1200_LCD_SET_WINSIZE 6
  20512. +#define AU1200_LCD_GET_BACKCOLOR 7
  20513. +#define AU1200_LCD_SET_BACKCOLOR 8
  20514. +#define AU1200_LCD_GET_COLORKEY 9
  20515. +#define AU1200_LCD_SET_COLORKEY 10
  20516. +#define AU1200_LCD_GET_PANEL 11
  20517. +#define AU1200_LCD_SET_PANEL 12
  20518. +
  20519. +typedef struct au1200_lcd_getset_t
  20520. +{
  20521. + unsigned int subcmd;
  20522. + union {
  20523. + struct {
  20524. + int enable;
  20525. + } winenable;
  20526. + struct {
  20527. + int x, y;
  20528. + } winlocation;
  20529. + struct {
  20530. + int hsz, vsz;
  20531. + } winsize;
  20532. + struct {
  20533. + unsigned int color;
  20534. + } backcolor;
  20535. + struct {
  20536. + unsigned int key;
  20537. + unsigned int mask;
  20538. + } colorkey;
  20539. + struct {
  20540. + int panel;
  20541. + char desc[80];
  20542. + } panel;
  20543. + };
  20544. +} au1200_lcd_getset_t;
  20545. +
  20546. +AU1200_LCD *lcd = (AU1200_LCD *)AU1200_LCD_ADDR;
  20547. +static int window_index = 0; /* default is zero */
  20548. +static int panel_index = -1; /* default is call board_au1200fb_panel */
  20549. +
  20550. +struct window_settings
  20551. +{
  20552. + unsigned char name[64];
  20553. + uint32 mode_backcolor;
  20554. + uint32 mode_colorkey;
  20555. + uint32 mode_colorkeymsk;
  20556. + struct
  20557. + {
  20558. + int xres;
  20559. + int yres;
  20560. + int xpos;
  20561. + int ypos;
  20562. + uint32 mode_winctrl1; /* winctrl1[FRM,CCO,PO,PIPE] */
  20563. + uint32 mode_winenable;
  20564. + } w[4];
  20565. +};
  20566. +
  20567. +struct panel_settings
  20568. +{
  20569. + unsigned char name[64];
  20570. + /* panel physical dimensions */
  20571. + uint32 Xres;
  20572. + uint32 Yres;
  20573. + /* panel timings */
  20574. + uint32 mode_screen;
  20575. + uint32 mode_horztiming;
  20576. + uint32 mode_verttiming;
  20577. + uint32 mode_clkcontrol;
  20578. + uint32 mode_pwmdiv;
  20579. + uint32 mode_pwmhi;
  20580. + uint32 mode_outmask;
  20581. + uint32 mode_fifoctrl;
  20582. + uint32 mode_toyclksrc;
  20583. + uint32 mode_backlight;
  20584. + uint32 mode_auxpll;
  20585. + int (*device_init)(void);
  20586. + int (*device_shutdown)(void);
  20587. +};
  20588. +
  20589. +#if defined(__BIG_ENDIAN)
  20590. +#define LCD_WINCTRL1_PO_16BPP LCD_WINCTRL1_PO_00
  20591. +#else
  20592. +#define LCD_WINCTRL1_PO_16BPP LCD_WINCTRL1_PO_01
  20593. +#endif
  20594. +
  20595. +extern int board_au1200fb_panel (void);
  20596. +extern int board_au1200fb_panel_init (void);
  20597. +extern int board_au1200fb_panel_shutdown (void);
  20598. +
  20599. +#if defined(CONFIG_FOCUS_ENHANCEMENTS)
  20600. +extern int board_au1200fb_focus_init_hdtv(void);
  20601. +extern int board_au1200fb_focus_init_component(void);
  20602. +extern int board_au1200fb_focus_init_cvsv(void);
  20603. +extern int board_au1200fb_focus_shutdown(void);
  20604. +#endif
  20605. +
  20606. +/*
  20607. + * Default window configurations
  20608. + */
  20609. +static struct window_settings windows[] =
  20610. +{
  20611. + { /* Index 0 */
  20612. + "0-FS gfx, 1-video, 2-ovly gfx, 3-ovly gfx",
  20613. + /* mode_backcolor */ 0x006600ff,
  20614. + /* mode_colorkey,msk*/ 0, 0,
  20615. + {
  20616. + {
  20617. + /* xres, yres, xpos, ypos */ 0, 0, 0, 0,
  20618. + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP,
  20619. + /* mode_winenable*/ LCD_WINENABLE_WEN0,
  20620. + },
  20621. + {
  20622. + /* xres, yres, xpos, ypos */ 0, 0, 0, 0,
  20623. + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP,
  20624. + /* mode_winenable*/ 0,
  20625. + },
  20626. + {
  20627. + /* xres, yres, xpos, ypos */ 0, 0, 0, 0,
  20628. + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP|LCD_WINCTRL1_PIPE,
  20629. + /* mode_winenable*/ 0,
  20630. + },
  20631. + {
  20632. + /* xres, yres, xpos, ypos */ 0, 0, 0, 0,
  20633. + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP|LCD_WINCTRL1_PIPE,
  20634. + /* mode_winenable*/ 0,
  20635. + },
  20636. + },
  20637. + },
  20638. +
  20639. + { /* Index 1 */
  20640. + "0-FS gfx, 1-video, 2-ovly gfx, 3-ovly gfx",
  20641. + /* mode_backcolor */ 0x006600ff,
  20642. + /* mode_colorkey,msk*/ 0, 0,
  20643. + {
  20644. + {
  20645. + /* xres, yres, xpos, ypos */ 320, 240, 5, 5,
  20646. +#if 0
  20647. + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP,
  20648. +#endif
  20649. + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_24BPP|LCD_WINCTRL1_PO_00,
  20650. + /* mode_winenable*/ LCD_WINENABLE_WEN0,
  20651. + },
  20652. + {
  20653. + /* xres, yres, xpos, ypos */ 0, 0, 0, 0,
  20654. + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP,
  20655. + /* mode_winenable*/ 0,
  20656. + },
  20657. + {
  20658. + /* xres, yres, xpos, ypos */ 100, 100, 0, 0,
  20659. + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP|LCD_WINCTRL1_PIPE,
  20660. + /* mode_winenable*/ 0/*LCD_WINENABLE_WEN2*/,
  20661. + },
  20662. + {
  20663. + /* xres, yres, xpos, ypos */ 200, 25, 0, 0,
  20664. + /* mode_winctrl1 */ LCD_WINCTRL1_FRM_16BPP565|LCD_WINCTRL1_PO_16BPP|LCD_WINCTRL1_PIPE,
  20665. + /* mode_winenable*/ 0,
  20666. + },
  20667. + },
  20668. + },
  20669. + /* Need VGA 640 @ 24bpp, @ 32bpp */
  20670. + /* Need VGA 800 @ 24bpp, @ 32bpp */
  20671. + /* Need VGA 1024 @ 24bpp, @ 32bpp */
  20672. +} ;
  20673. +
  20674. +/*
  20675. + * Controller configurations for various panels.
  20676. + */
  20677. +static struct panel_settings panels[] =
  20678. +{
  20679. + { /* Index 0: QVGA 320x240 H:33.3kHz V:110Hz */
  20680. + "VGA_320x240",
  20681. + 320, 240,
  20682. + /* mode_screen */ LCD_SCREEN_SX_N(320) | LCD_SCREEN_SY_N(240),
  20683. + /* mode_horztiming */ 0x00c4623b,
  20684. + /* mode_verttiming */ 0x00502814,
  20685. + /* mode_clkcontrol */ 0x00020002, /* /4=24Mhz */
  20686. + /* mode_pwmdiv */ 0x00000000,
  20687. + /* mode_pwmhi */ 0x00000000,
  20688. + /* mode_outmask */ 0x00FFFFFF,
  20689. + /* mode_fifoctrl */ 0x2f2f2f2f,
  20690. + /* mode_toyclksrc */ 0x00000004, /* 96MHz AUXPLL directly */
  20691. + /* mode_backlight */ 0x00000000,
  20692. + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
  20693. + /* device_init */ NULL,
  20694. + /* device_shutdown */ NULL,
  20695. + },
  20696. +
  20697. + { /* Index 1: VGA 640x480 H:30.3kHz V:58Hz */
  20698. + "VGA_640x480",
  20699. + 640, 480,
  20700. + /* mode_screen */ 0x13f9df80,
  20701. + /* mode_horztiming */ 0x003c5859,
  20702. + /* mode_verttiming */ 0x00741201,
  20703. + /* mode_clkcontrol */ 0x00020001, /* /4=24Mhz */
  20704. + /* mode_pwmdiv */ 0x00000000,
  20705. + /* mode_pwmhi */ 0x00000000,
  20706. + /* mode_outmask */ 0x00FFFFFF,
  20707. + /* mode_fifoctrl */ 0x2f2f2f2f,
  20708. + /* mode_toyclksrc */ 0x00000004, /* AUXPLL directly */
  20709. + /* mode_backlight */ 0x00000000,
  20710. + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
  20711. + /* device_init */ NULL,
  20712. + /* device_shutdown */ NULL,
  20713. + },
  20714. +
  20715. + { /* Index 2: SVGA 800x600 H:46.1kHz V:69Hz */
  20716. + "SVGA_800x600",
  20717. + 800, 600,
  20718. + /* mode_screen */ 0x18fa5780,
  20719. + /* mode_horztiming */ 0x00dc7e77,
  20720. + /* mode_verttiming */ 0x00584805,
  20721. + /* mode_clkcontrol */ 0x00020000, /* /2=48Mhz */
  20722. + /* mode_pwmdiv */ 0x00000000,
  20723. + /* mode_pwmhi */ 0x00000000,
  20724. + /* mode_outmask */ 0x00FFFFFF,
  20725. + /* mode_fifoctrl */ 0x2f2f2f2f,
  20726. + /* mode_toyclksrc */ 0x00000004, /* AUXPLL directly */
  20727. + /* mode_backlight */ 0x00000000,
  20728. + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
  20729. + /* device_init */ NULL,
  20730. + /* device_shutdown */ NULL,
  20731. + },
  20732. +
  20733. + { /* Index 3: XVGA 1024x768 H:56.2kHz V:70Hz */
  20734. + "XVGA_1024x768",
  20735. + 1024, 768,
  20736. + /* mode_screen */ 0x1ffaff80,
  20737. + /* mode_horztiming */ 0x007d0e57,
  20738. + /* mode_verttiming */ 0x00740a01,
  20739. + /* mode_clkcontrol */ 0x000A0000, /* /1 */
  20740. + /* mode_pwmdiv */ 0x00000000,
  20741. + /* mode_pwmhi */ 0x00000000,
  20742. + /* mode_outmask */ 0x00FFFFFF,
  20743. + /* mode_fifoctrl */ 0x2f2f2f2f,
  20744. + /* mode_toyclksrc */ 0x00000004, /* AUXPLL directly */
  20745. + /* mode_backlight */ 0x00000000,
  20746. + /* mode_auxpll */ 6, /* 72MHz AUXPLL */
  20747. + /* device_init */ NULL,
  20748. + /* device_shutdown */ NULL,
  20749. + },
  20750. +
  20751. + { /* Index 4: XVGA 1280x1024 H:68.5kHz V:65Hz */
  20752. + "XVGA_1280x1024",
  20753. + 1280, 1024,
  20754. + /* mode_screen */ 0x27fbff80,
  20755. + /* mode_horztiming */ 0x00cdb2c7,
  20756. + /* mode_verttiming */ 0x00600002,
  20757. + /* mode_clkcontrol */ 0x000A0000, /* /1 */
  20758. + /* mode_pwmdiv */ 0x00000000,
  20759. + /* mode_pwmhi */ 0x00000000,
  20760. + /* mode_outmask */ 0x00FFFFFF,
  20761. + /* mode_fifoctrl */ 0x2f2f2f2f,
  20762. + /* mode_toyclksrc */ 0x00000004, /* AUXPLL directly */
  20763. + /* mode_backlight */ 0x00000000,
  20764. + /* mode_auxpll */ 10, /* 120MHz AUXPLL */
  20765. + /* device_init */ NULL,
  20766. + /* device_shutdown */ NULL,
  20767. + },
  20768. +
  20769. + { /* Index 5: Samsung 1024x768 TFT */
  20770. + "Samsung_1024x768_TFT",
  20771. + 1024, 768,
  20772. + /* mode_screen */ 0x1ffaff80,
  20773. + /* mode_horztiming */ 0x018cc677,
  20774. + /* mode_verttiming */ 0x00241217,
  20775. + /* mode_clkcontrol */ 0x00000000, /* SCB 0x1 /4=24Mhz */
  20776. + /* mode_pwmdiv */ 0x8000063f, /* SCB 0x0 */
  20777. + /* mode_pwmhi */ 0x03400000, /* SCB 0x0 */
  20778. + /* mode_outmask */ 0x00fcfcfc,
  20779. + /* mode_fifoctrl */ 0x2f2f2f2f,
  20780. + /* mode_toyclksrc */ 0x00000004, /* 96MHz AUXPLL directly */
  20781. + /* mode_backlight */ 0x00000000,
  20782. + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
  20783. + /* device_init */ board_au1200fb_panel_init,
  20784. + /* device_shutdown */ board_au1200fb_panel_shutdown,
  20785. + },
  20786. +
  20787. + { /* Index 6: Toshiba 640x480 TFT */
  20788. + "Toshiba_640x480_TFT",
  20789. + 640, 480,
  20790. + /* mode_screen */ LCD_SCREEN_SX_N(640) | LCD_SCREEN_SY_N(480),
  20791. + /* mode_horztiming */ LCD_HORZTIMING_HPW_N(96) | LCD_HORZTIMING_HND1_N(13) | LCD_HORZTIMING_HND2_N(51),
  20792. + /* mode_verttiming */ LCD_VERTTIMING_VPW_N(2) | LCD_VERTTIMING_VND1_N(11) | LCD_VERTTIMING_VND2_N(32) ,
  20793. + /* mode_clkcontrol */ 0x00000000, /* /4=24Mhz */
  20794. + /* mode_pwmdiv */ 0x8000063f,
  20795. + /* mode_pwmhi */ 0x03400000,
  20796. + /* mode_outmask */ 0x00fcfcfc,
  20797. + /* mode_fifoctrl */ 0x2f2f2f2f,
  20798. + /* mode_toyclksrc */ 0x00000004, /* 96MHz AUXPLL directly */
  20799. + /* mode_backlight */ 0x00000000,
  20800. + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
  20801. + /* device_init */ board_au1200fb_panel_init,
  20802. + /* device_shutdown */ board_au1200fb_panel_shutdown,
  20803. + },
  20804. +
  20805. + { /* Index 7: Sharp 320x240 TFT */
  20806. + "Sharp_320x240_TFT",
  20807. + 320, 240,
  20808. + /* mode_screen */ LCD_SCREEN_SX_N(320) | LCD_SCREEN_SY_N(240),
  20809. + /* mode_horztiming */ LCD_HORZTIMING_HPW_N(60) | LCD_HORZTIMING_HND1_N(13) | LCD_HORZTIMING_HND2_N(2),
  20810. + /* mode_verttiming */ LCD_VERTTIMING_VPW_N(2) | LCD_VERTTIMING_VND1_N(2) | LCD_VERTTIMING_VND2_N(5) ,
  20811. + /* mode_clkcontrol */ LCD_CLKCONTROL_PCD_N(7), /* /16=6Mhz */
  20812. + /* mode_pwmdiv */ 0x8000063f,
  20813. + /* mode_pwmhi */ 0x03400000,
  20814. + /* mode_outmask */ 0x00fcfcfc,
  20815. + /* mode_fifoctrl */ 0x2f2f2f2f,
  20816. + /* mode_toyclksrc */ 0x00000004, /* 96MHz AUXPLL directly */
  20817. + /* mode_backlight */ 0x00000000,
  20818. + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
  20819. + /* device_init */ board_au1200fb_panel_init,
  20820. + /* device_shutdown */ board_au1200fb_panel_shutdown,
  20821. + },
  20822. + { /* Index 8: Toppoly TD070WGCB2 7" 854x480 TFT */
  20823. + "Toppoly_TD070WGCB2",
  20824. + 854, 480,
  20825. + /* mode_screen */ LCD_SCREEN_SX_N(854) | LCD_SCREEN_SY_N(480),
  20826. + /* mode_horztiming */ LCD_HORZTIMING_HND2_N(44) | LCD_HORZTIMING_HND1_N(44) | LCD_HORZTIMING_HPW_N(114),
  20827. + /* mode_verttiming */ LCD_VERTTIMING_VND2_N(20) | LCD_VERTTIMING_VND1_N(21) | LCD_VERTTIMING_VPW_N(4),
  20828. + /* mode_clkcontrol */ 0x00020001, /* /4=24Mhz */
  20829. + /* mode_pwmdiv */ 0x8000063f,
  20830. + /* mode_pwmhi */ 0x03400000,
  20831. + /* mode_outmask */ 0x00FCFCFC,
  20832. + /* mode_fifoctrl */ 0x2f2f2f2f,
  20833. + /* mode_toyclksrc */ 0x00000004, /* AUXPLL directly */
  20834. + /* mode_backlight */ 0x00000000,
  20835. + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
  20836. + /* device_init */ board_au1200fb_panel_init,
  20837. + /* device_shutdown */ board_au1200fb_panel_shutdown,
  20838. + },
  20839. +#if defined(CONFIG_FOCUS_ENHANCEMENTS)
  20840. + { /* Index 9: Focus FS453 TV-Out 640x480 */
  20841. + "FS453_640x480 (Composite/S-Video)",
  20842. + 640, 480,
  20843. + /* mode_screen */ LCD_SCREEN_SX_N(640) | LCD_SCREEN_SY_N(480),
  20844. + /* mode_horztiming */ LCD_HORZTIMING_HND2_N(143) | LCD_HORZTIMING_HND1_N(143) | LCD_HORZTIMING_HPW_N(10),
  20845. + /* mode_verttiming */ LCD_VERTTIMING_VND2_N(30) | LCD_VERTTIMING_VND1_N(30) | LCD_VERTTIMING_VPW_N(5),
  20846. + /* mode_clkcontrol */ 0x00480000 | (1<<17) | (1<<18), /* External Clock, 1:1 clock ratio */
  20847. + /* mode_pwmdiv */ 0x00000000,
  20848. + /* mode_pwmhi */ 0x00000000,
  20849. + /* mode_outmask */ 0x00FFFFFF,
  20850. + /* mode_fifoctrl */ 0x2f2f2f2f,
  20851. + /* mode_toyclksrc */ 0x00000000,
  20852. + /* mode_backlight */ 0x00000000,
  20853. + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
  20854. + /* device_init */ board_au1200fb_focus_init_cvsv,
  20855. + /* device_shutdown */ board_au1200fb_focus_shutdown,
  20856. + },
  20857. +
  20858. + { /* Index 10: Focus FS453 TV-Out 640x480 */
  20859. + "FS453_640x480 (Component Video)",
  20860. + 640, 480,
  20861. + /* mode_screen */ LCD_SCREEN_SX_N(640) | LCD_SCREEN_SY_N(480),
  20862. + /* mode_horztiming */ LCD_HORZTIMING_HND2_N(143) | LCD_HORZTIMING_HND1_N(143) | LCD_HORZTIMING_HPW_N(10),
  20863. + /* mode_verttiming */ LCD_VERTTIMING_VND2_N(30) | LCD_VERTTIMING_VND1_N(30) | LCD_VERTTIMING_VPW_N(5),
  20864. + /* mode_clkcontrol */ 0x00480000 | (1<<17) | (1<<18), /* External Clock, 1:1 clock ratio */
  20865. + /* mode_pwmdiv */ 0x00000000,
  20866. + /* mode_pwmhi */ 0x00000000,
  20867. + /* mode_outmask */ 0x00FFFFFF,
  20868. + /* mode_fifoctrl */ 0x2f2f2f2f,
  20869. + /* mode_toyclksrc */ 0x00000000,
  20870. + /* mode_backlight */ 0x00000000,
  20871. + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
  20872. + /* device_init */ board_au1200fb_focus_init_component,
  20873. + /* device_shutdown */ board_au1200fb_focus_shutdown,
  20874. + },
  20875. +
  20876. + { /* Index 11: Focus FS453 TV-Out 640x480 */
  20877. + "FS453_640x480 (HDTV)",
  20878. + 720, 480,
  20879. + /* mode_screen */ LCD_SCREEN_SX_N(720) | LCD_SCREEN_SY_N(480),
  20880. + /* mode_horztiming */ LCD_HORZTIMING_HND2_N(28) | LCD_HORZTIMING_HND1_N(46) | LCD_HORZTIMING_HPW_N(64),
  20881. + /* mode_verttiming */ LCD_VERTTIMING_VND2_N(7) | LCD_VERTTIMING_VND1_N(31) | LCD_VERTTIMING_VPW_N(7),
  20882. + /* mode_clkcontrol */ 0x00480000 | (1<<17) | (1<<18), /* External Clock, 1:1 clock ratio */
  20883. + /* mode_pwmdiv */ 0x00000000,
  20884. + /* mode_pwmhi */ 0x00000000,
  20885. + /* mode_outmask */ 0x00FFFFFF,
  20886. + /* mode_fifoctrl */ 0x2f2f2f2f,
  20887. + /* mode_toyclksrc */ 0x00000000,
  20888. + /* mode_backlight */ 0x00000000,
  20889. + /* mode_auxpll */ 8, /* 96MHz AUXPLL */
  20890. + /* device_init */ board_au1200fb_focus_init_hdtv,
  20891. + /* device_shutdown */ board_au1200fb_focus_shutdown,
  20892. + },
  20893. +#endif
  20894. +};
  20895. +
  20896. +#define NUM_PANELS (sizeof(panels) / sizeof(struct panel_settings))
  20897. +
  20898. +static struct window_settings *win;
  20899. +static struct panel_settings *panel;
  20900. +
  20901. +struct au1200fb_info {
  20902. + struct fb_info_gen gen;
  20903. + unsigned long fb_virt_start;
  20904. + unsigned long fb_size;
  20905. + unsigned long fb_phys;
  20906. + int mmaped;
  20907. + int nohwcursor;
  20908. + int noblanking;
  20909. +
  20910. + struct { unsigned red, green, blue, pad; } palette[256];
  20911. +
  20912. +#if defined(FBCON_HAS_CFB16)
  20913. + u16 fbcon_cmap16[16];
  20914. +#endif
  20915. +#if defined(FBCON_HAS_CFB32)
  20916. + u32 fbcon_cmap32[16];
  20917. +#endif
  20918. +};
  20919. +
  20920. +
  20921. +struct au1200fb_par {
  20922. + struct fb_var_screeninfo var;
  20923. +
  20924. + int line_length; /* in bytes */
  20925. + int cmap_len; /* color-map length */
  20926. +};
  20927. +
  20928. +#ifndef CONFIG_FB_AU1200_DEVS
  20929. +#define CONFIG_FB_AU1200_DEVS 1
  20930. +#endif
  20931. +
  20932. +static struct au1200fb_info fb_infos[CONFIG_FB_AU1200_DEVS];
  20933. +static struct au1200fb_par fb_pars[CONFIG_FB_AU1200_DEVS];
  20934. +static struct display disps[CONFIG_FB_AU1200_DEVS];
  20935. +
  20936. +int au1200fb_init(void);
  20937. +void au1200fb_setup(char *options, int *ints);
  20938. +static int au1200fb_mmap(struct fb_info *fb, struct file *file,
  20939. + struct vm_area_struct *vma);
  20940. +static int au1200_blank(int blank_mode, struct fb_info_gen *info);
  20941. +static int au1200fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
  20942. + u_long arg, int con, struct fb_info *info);
  20943. +
  20944. +void au1200_nocursor(struct display *p, int mode, int xx, int yy){};
  20945. +
  20946. +static int au1200_setlocation (int plane, int xpos, int ypos);
  20947. +static int au1200_setsize (int plane, int xres, int yres);
  20948. +static void au1200_setmode(int plane);
  20949. +static void au1200_setpanel (struct panel_settings *newpanel);
  20950. +
  20951. +static struct fb_ops au1200fb_ops = {
  20952. + owner: THIS_MODULE,
  20953. + fb_get_fix: fbgen_get_fix,
  20954. + fb_get_var: fbgen_get_var,
  20955. + fb_set_var: fbgen_set_var,
  20956. + fb_get_cmap: fbgen_get_cmap,
  20957. + fb_set_cmap: fbgen_set_cmap,
  20958. + fb_pan_display: fbgen_pan_display,
  20959. + fb_ioctl: au1200fb_ioctl,
  20960. + fb_mmap: au1200fb_mmap,
  20961. +};
  20962. +
  20963. +
  20964. +static int
  20965. +winbpp (unsigned int winctrl1)
  20966. +{
  20967. + /* how many bytes of memory are needed for each pixel format */
  20968. + switch (winctrl1 & LCD_WINCTRL1_FRM)
  20969. + {
  20970. + case LCD_WINCTRL1_FRM_1BPP: return 1; break;
  20971. + case LCD_WINCTRL1_FRM_2BPP: return 2; break;
  20972. + case LCD_WINCTRL1_FRM_4BPP: return 4; break;
  20973. + case LCD_WINCTRL1_FRM_8BPP: return 8; break;
  20974. + case LCD_WINCTRL1_FRM_12BPP: return 16; break;
  20975. + case LCD_WINCTRL1_FRM_16BPP655: return 16; break;
  20976. + case LCD_WINCTRL1_FRM_16BPP565: return 16; break;
  20977. + case LCD_WINCTRL1_FRM_16BPP556: return 16; break;
  20978. + case LCD_WINCTRL1_FRM_16BPPI1555: return 16; break;
  20979. + case LCD_WINCTRL1_FRM_16BPPI5551: return 16; break;
  20980. + case LCD_WINCTRL1_FRM_16BPPA1555: return 16; break;
  20981. + case LCD_WINCTRL1_FRM_16BPPA5551: return 16; break;
  20982. + case LCD_WINCTRL1_FRM_24BPP: return 32; break;
  20983. + case LCD_WINCTRL1_FRM_32BPP: return 32; break;
  20984. + default: return 0; break;
  20985. + }
  20986. +}
  20987. +
  20988. +static int
  20989. +fbinfo2index (struct fb_info *fb_info)
  20990. +{
  20991. + int i;
  20992. + for (i = 0; i < CONFIG_FB_AU1200_DEVS; ++i)
  20993. + {
  20994. + if (fb_info == (struct fb_info *)(&fb_infos[i]))
  20995. + return i;
  20996. + }
  20997. + printk("au1200fb: ERROR: fbinfo2index failed!\n");
  20998. + return -1;
  20999. +}
  21000. +
  21001. +static void au1200_detect(void)
  21002. +{
  21003. + /*
  21004. + * This function should detect the current video mode settings
  21005. + * and store it as the default video mode
  21006. + * Yeh, well, we're not going to change any settings so we're
  21007. + * always stuck with the default ...
  21008. + */
  21009. +}
  21010. +
  21011. +static int au1200_encode_fix(struct fb_fix_screeninfo *fix,
  21012. + const void *_par, struct fb_info_gen *_info)
  21013. +{
  21014. + struct au1200fb_info *info = (struct au1200fb_info *) _info;
  21015. + struct au1200fb_par *par = (struct au1200fb_par *) _par;
  21016. + int plane;
  21017. +
  21018. + plane = fbinfo2index(info);
  21019. +
  21020. + memset(fix, 0, sizeof(struct fb_fix_screeninfo));
  21021. +
  21022. + fix->smem_start = info->fb_phys;
  21023. + fix->smem_len = info->fb_size;
  21024. + fix->type = FB_TYPE_PACKED_PIXELS;
  21025. + fix->type_aux = 0;
  21026. + fix->visual = (par->var.bits_per_pixel == 8) ?
  21027. + FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
  21028. + fix->ywrapstep = 0;
  21029. + fix->xpanstep = 1;
  21030. + fix->ypanstep = 1;
  21031. + /* FIX!!!! why doesn't par->line_length work???? it does for au1100 */
  21032. + fix->line_length = fb_pars[plane].line_length; /*par->line_length;*/
  21033. + return 0;
  21034. +}
  21035. +
  21036. +static void set_color_bitfields(struct fb_var_screeninfo *var, int plane)
  21037. +{
  21038. + if (var->bits_per_pixel == 8)
  21039. + {
  21040. + var->red.offset = 0;
  21041. + var->red.length = 8;
  21042. + var->green.offset = 0;
  21043. + var->green.length = 8;
  21044. + var->blue.offset = 0;
  21045. + var->blue.length = 8;
  21046. + var->transp.offset = 0;
  21047. + var->transp.length = 0;
  21048. + }
  21049. + else
  21050. +
  21051. + if (var->bits_per_pixel == 16)
  21052. + {
  21053. + /* FIX!!! How does CCO affect this ? */
  21054. + /* FIX!!! Not exactly sure how many of these work with FB */
  21055. + switch (win->w[plane].mode_winctrl1 & LCD_WINCTRL1_FRM)
  21056. + {
  21057. + case LCD_WINCTRL1_FRM_16BPP655:
  21058. + var->red.offset = 10;
  21059. + var->red.length = 6;
  21060. + var->green.offset = 5;
  21061. + var->green.length = 5;
  21062. + var->blue.offset = 0;
  21063. + var->blue.length = 5;
  21064. + var->transp.offset = 0;
  21065. + var->transp.length = 0;
  21066. + break;
  21067. +
  21068. + case LCD_WINCTRL1_FRM_16BPP565:
  21069. + var->red.offset = 11;
  21070. + var->red.length = 5;
  21071. + var->green.offset = 5;
  21072. + var->green.length = 6;
  21073. + var->blue.offset = 0;
  21074. + var->blue.length = 5;
  21075. + var->transp.offset = 0;
  21076. + var->transp.length = 0;
  21077. + break;
  21078. +
  21079. + case LCD_WINCTRL1_FRM_16BPP556:
  21080. + var->red.offset = 11;
  21081. + var->red.length = 5;
  21082. + var->green.offset = 6;
  21083. + var->green.length = 5;
  21084. + var->blue.offset = 0;
  21085. + var->blue.length = 6;
  21086. + var->transp.offset = 0;
  21087. + var->transp.length = 0;
  21088. + break;
  21089. +
  21090. + case LCD_WINCTRL1_FRM_16BPPI1555:
  21091. + var->red.offset = 10;
  21092. + var->red.length = 5;
  21093. + var->green.offset = 5;
  21094. + var->green.length = 5;
  21095. + var->blue.offset = 0;
  21096. + var->blue.length = 5;
  21097. + var->transp.offset = 0;
  21098. + var->transp.length = 0;
  21099. + break;
  21100. +
  21101. + case LCD_WINCTRL1_FRM_16BPPI5551:
  21102. + var->red.offset = 11;
  21103. + var->red.length = 5;
  21104. + var->green.offset = 6;
  21105. + var->green.length = 5;
  21106. + var->blue.offset = 1;
  21107. + var->blue.length = 5;
  21108. + var->transp.offset = 0;
  21109. + var->transp.length = 0;
  21110. + break;
  21111. +
  21112. + case LCD_WINCTRL1_FRM_16BPPA1555:
  21113. + var->red.offset = 10;
  21114. + var->red.length = 5;
  21115. + var->green.offset = 5;
  21116. + var->green.length = 5;
  21117. + var->blue.offset = 0;
  21118. + var->blue.length = 5;
  21119. + var->transp.offset = 15;
  21120. + var->transp.length = 1;
  21121. + break;
  21122. +
  21123. + case LCD_WINCTRL1_FRM_16BPPA5551:
  21124. + var->red.offset = 11;
  21125. + var->red.length = 5;
  21126. + var->green.offset = 6;
  21127. + var->green.length = 5;
  21128. + var->blue.offset = 1;
  21129. + var->blue.length = 5;
  21130. + var->transp.offset = 0;
  21131. + var->transp.length = 1;
  21132. + break;
  21133. +
  21134. + default:
  21135. + printk("ERROR: Invalid PIXEL FORMAT!!!\n"); break;
  21136. + }
  21137. + }
  21138. + else
  21139. +
  21140. + if (var->bits_per_pixel == 32)
  21141. + {
  21142. + switch (win->w[plane].mode_winctrl1 & LCD_WINCTRL1_FRM)
  21143. + {
  21144. + case LCD_WINCTRL1_FRM_24BPP:
  21145. + var->red.offset = 16;
  21146. + var->red.length = 8;
  21147. + var->green.offset = 8;
  21148. + var->green.length = 8;
  21149. + var->blue.offset = 0;
  21150. + var->blue.length = 8;
  21151. + var->transp.offset = 0;
  21152. + var->transp.length = 0;
  21153. + break;
  21154. +
  21155. + case LCD_WINCTRL1_FRM_32BPP:
  21156. + var->red.offset = 16;
  21157. + var->red.length = 8;
  21158. + var->green.offset = 8;
  21159. + var->green.length = 8;
  21160. + var->blue.offset = 0;
  21161. + var->blue.length = 8;
  21162. + var->transp.offset = 24;
  21163. + var->transp.length = 8;
  21164. + break;
  21165. + }
  21166. + }
  21167. + var->red.msb_right = 0;
  21168. + var->green.msb_right = 0;
  21169. + var->blue.msb_right = 0;
  21170. + var->transp.msb_right = 0;
  21171. +#if 0
  21172. +printk("set_color_bitfields(a=%d, r=%d..%d, g=%d..%d, b=%d..%d)\n",
  21173. + var->transp.offset,
  21174. + var->red.offset+var->red.length-1, var->red.offset,
  21175. + var->green.offset+var->green.length-1, var->green.offset,
  21176. + var->blue.offset+var->blue.length-1, var->blue.offset);
  21177. +#endif
  21178. +}
  21179. +
  21180. +static int au1200_decode_var(const struct fb_var_screeninfo *var,
  21181. + void *_par, struct fb_info_gen *_info)
  21182. +{
  21183. + struct au1200fb_par *par = (struct au1200fb_par *)_par;
  21184. + int plane, bpp;
  21185. +
  21186. + plane = fbinfo2index((struct fb_info *)_info);
  21187. +
  21188. + /*
  21189. + * Don't allow setting any of these yet: xres and yres don't
  21190. + * make sense for LCD panels.
  21191. + */
  21192. + if (var->xres != win->w[plane].xres ||
  21193. + var->yres != win->w[plane].yres ||
  21194. + var->xres != win->w[plane].xres ||
  21195. + var->yres != win->w[plane].yres) {
  21196. + return -EINVAL;
  21197. + }
  21198. +
  21199. + bpp = winbpp(win->w[plane].mode_winctrl1);
  21200. + if(var->bits_per_pixel != bpp) {
  21201. + /* on au1200, window pixel format is independent of panel pixel */
  21202. + printk("WARNING: bits_per_pizel != panel->bpp\n");
  21203. + }
  21204. +
  21205. + memset(par, 0, sizeof(struct au1200fb_par));
  21206. + par->var = *var;
  21207. +
  21208. + /* FIX!!! */
  21209. + switch (var->bits_per_pixel) {
  21210. + case 8:
  21211. + par->var.bits_per_pixel = 8;
  21212. + break;
  21213. + case 16:
  21214. + par->var.bits_per_pixel = 16;
  21215. + break;
  21216. + case 24:
  21217. + case 32:
  21218. + par->var.bits_per_pixel = 32;
  21219. + break;
  21220. + default:
  21221. + printk("color depth %d bpp not supported\n",
  21222. + var->bits_per_pixel);
  21223. + return -EINVAL;
  21224. +
  21225. + }
  21226. + set_color_bitfields(&par->var, plane);
  21227. + /* FIX!!! what is this for 24/32bpp? */
  21228. + par->cmap_len = (par->var.bits_per_pixel == 8) ? 256 : 16;
  21229. + return 0;
  21230. +}
  21231. +
  21232. +static int au1200_encode_var(struct fb_var_screeninfo *var,
  21233. + const void *par, struct fb_info_gen *_info)
  21234. +{
  21235. + *var = ((struct au1200fb_par *)par)->var;
  21236. + return 0;
  21237. +}
  21238. +
  21239. +static void
  21240. +au1200_get_par(void *_par, struct fb_info_gen *_info)
  21241. +{
  21242. + int index;
  21243. +
  21244. + index = fbinfo2index((struct fb_info *)_info);
  21245. + *(struct au1200fb_par *)_par = fb_pars[index];
  21246. +}
  21247. +
  21248. +static void au1200_set_par(const void *par, struct fb_info_gen *info)
  21249. +{
  21250. + /* nothing to do: we don't change any settings */
  21251. +}
  21252. +
  21253. +static int au1200_getcolreg(unsigned regno, unsigned *red, unsigned *green,
  21254. + unsigned *blue, unsigned *transp,
  21255. + struct fb_info *info)
  21256. +{
  21257. + struct au1200fb_info* i = (struct au1200fb_info*)info;
  21258. +
  21259. + if (regno > 255)
  21260. + return 1;
  21261. +
  21262. + *red = i->palette[regno].red;
  21263. + *green = i->palette[regno].green;
  21264. + *blue = i->palette[regno].blue;
  21265. + *transp = 0;
  21266. +
  21267. + return 0;
  21268. +}
  21269. +
  21270. +static int au1200_setcolreg(unsigned regno, unsigned red, unsigned green,
  21271. + unsigned blue, unsigned transp,
  21272. + struct fb_info *info)
  21273. +{
  21274. + struct au1200fb_info* i = (struct au1200fb_info *)info;
  21275. + u32 rgbcol;
  21276. + int plane, bpp;
  21277. +
  21278. + plane = fbinfo2index((struct fb_info *)info);
  21279. + bpp = winbpp(win->w[plane].mode_winctrl1);
  21280. +
  21281. + if (regno > 255)
  21282. + return 1;
  21283. +
  21284. + i->palette[regno].red = red;
  21285. + i->palette[regno].green = green;
  21286. + i->palette[regno].blue = blue;
  21287. +
  21288. + switch(bpp) {
  21289. +#ifdef FBCON_HAS_CFB8
  21290. + case 8:
  21291. + red >>= 10;
  21292. + green >>= 10;
  21293. + blue >>= 10;
  21294. + panel_reg->lcd_pallettebase[regno] = (blue&0x1f) |
  21295. + ((green&0x3f)<<5) | ((red&0x1f)<<11);
  21296. + break;
  21297. +#endif
  21298. +#ifdef FBCON_HAS_CFB16
  21299. +/* FIX!!!! depends upon pixel format */
  21300. + case 16:
  21301. + i->fbcon_cmap16[regno] =
  21302. + ((red & 0xf800) >> 0) |
  21303. + ((green & 0xfc00) >> 5) |
  21304. + ((blue & 0xf800) >> 11);
  21305. + break;
  21306. +#endif
  21307. +#ifdef FBCON_HAS_CFB32
  21308. + case 32:
  21309. + i->fbcon_cmap32[regno] =
  21310. + (((u32 )transp & 0xff00) << 16) |
  21311. + (((u32 )red & 0xff00) << 8) |
  21312. + (((u32 )green & 0xff00)) |
  21313. + (((u32 )blue & 0xff00) >> 8);
  21314. + break;
  21315. +#endif
  21316. + default:
  21317. + printk("unsupported au1200_setcolreg(%d)\n", bpp);
  21318. + break;
  21319. + }
  21320. +
  21321. + return 0;
  21322. +}
  21323. +
  21324. +
  21325. +static int au1200_blank(int blank_mode, struct fb_info_gen *_info)
  21326. +{
  21327. + struct au1200fb_info *fb_info = (struct au1200fb_info *)_info;
  21328. + int plane;
  21329. +
  21330. + /* Short-circuit screen blanking */
  21331. + if (fb_info->noblanking)
  21332. + return 0;
  21333. +
  21334. + plane = fbinfo2index((struct fb_info *)_info);
  21335. +
  21336. + switch (blank_mode) {
  21337. + case VESA_NO_BLANKING:
  21338. + /* printk("turn on panel\n"); */
  21339. + au1200_setpanel(panel);
  21340. + break;
  21341. +
  21342. + case VESA_VSYNC_SUSPEND:
  21343. + case VESA_HSYNC_SUSPEND:
  21344. + case VESA_POWERDOWN:
  21345. + /* printk("turn off panel\n"); */
  21346. + au1200_setpanel(NULL);
  21347. + break;
  21348. + default:
  21349. + break;
  21350. +
  21351. + }
  21352. + return 0;
  21353. +}
  21354. +
  21355. +static void au1200_set_disp(const void *unused, struct display *disp,
  21356. + struct fb_info_gen *info)
  21357. +{
  21358. + struct au1200fb_info *fb_info;
  21359. + int plane;
  21360. +
  21361. + fb_info = (struct au1200fb_info *)info;
  21362. +
  21363. + disp->screen_base = (char *)fb_info->fb_virt_start;
  21364. +
  21365. + switch (disp->var.bits_per_pixel) {
  21366. +#ifdef FBCON_HAS_CFB8
  21367. + case 8:
  21368. + disp->dispsw = &fbcon_cfb8;
  21369. + if (fb_info->nohwcursor)
  21370. + fbcon_cfb8.cursor = au1200_nocursor;
  21371. + break;
  21372. +#endif
  21373. +#ifdef FBCON_HAS_CFB16
  21374. + case 16:
  21375. + disp->dispsw = &fbcon_cfb16;
  21376. + disp->dispsw_data = fb_info->fbcon_cmap16;
  21377. + if (fb_info->nohwcursor)
  21378. + fbcon_cfb16.cursor = au1200_nocursor;
  21379. + break;
  21380. +#endif
  21381. +#ifdef FBCON_HAS_CFB32
  21382. + case 32:
  21383. + disp->dispsw = &fbcon_cfb32;
  21384. + disp->dispsw_data = fb_info->fbcon_cmap32;
  21385. + if (fb_info->nohwcursor)
  21386. + fbcon_cfb32.cursor = au1200_nocursor;
  21387. + break;
  21388. +#endif
  21389. + default:
  21390. + disp->dispsw = &fbcon_dummy;
  21391. + disp->dispsw_data = NULL;
  21392. + break;
  21393. + }
  21394. +}
  21395. +
  21396. +static int
  21397. +au1200fb_mmap(struct fb_info *_fb,
  21398. + struct file *file,
  21399. + struct vm_area_struct *vma)
  21400. +{
  21401. + unsigned int len;
  21402. + unsigned long start=0, off;
  21403. +
  21404. + struct au1200fb_info *fb_info = (struct au1200fb_info *)_fb;
  21405. +
  21406. + if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {
  21407. + return -EINVAL;
  21408. + }
  21409. +
  21410. + start = fb_info->fb_phys & PAGE_MASK;
  21411. + len = PAGE_ALIGN((start & ~PAGE_MASK) + fb_info->fb_size);
  21412. +
  21413. + off = vma->vm_pgoff << PAGE_SHIFT;
  21414. +
  21415. + if ((vma->vm_end - vma->vm_start + off) > len) {
  21416. + return -EINVAL;
  21417. + }
  21418. +
  21419. + off += start;
  21420. + vma->vm_pgoff = off >> PAGE_SHIFT;
  21421. +
  21422. + pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK;
  21423. + pgprot_val(vma->vm_page_prot) |= _CACHE_UNCACHED;
  21424. +
  21425. + /* This is an IO map - tell maydump to skip this VMA */
  21426. + vma->vm_flags |= VM_IO;
  21427. +
  21428. + if (io_remap_page_range(vma->vm_start, off,
  21429. + vma->vm_end - vma->vm_start,
  21430. + vma->vm_page_prot)) {
  21431. + return -EAGAIN;
  21432. + }
  21433. +
  21434. + fb_info->mmaped = 1;
  21435. + return 0;
  21436. +}
  21437. +
  21438. +int au1200_pan_display(const struct fb_var_screeninfo *var,
  21439. + struct fb_info_gen *info)
  21440. +{
  21441. + return 0;
  21442. +}
  21443. +
  21444. +
  21445. +static int au1200fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
  21446. + u_long arg, int con, struct fb_info *info)
  21447. +{
  21448. + int plane;
  21449. +
  21450. + plane = fbinfo2index(info);
  21451. +
  21452. + /* printk("au1200fb: ioctl %d on plane %d\n", cmd, plane); */
  21453. +
  21454. + if (cmd == 0x46FF)
  21455. + {
  21456. + au1200_lcd_getset_t iodata;
  21457. +
  21458. + if (copy_from_user(&iodata, (void *) arg, sizeof(au1200_lcd_getset_t)))
  21459. + return -EFAULT;
  21460. +
  21461. + switch (iodata.subcmd)
  21462. + {
  21463. + case AU1200_LCD_GET_WINENABLE:
  21464. + iodata.winenable.enable = (lcd->winenable & (1<<plane)) ? 1 : 0;
  21465. + break;
  21466. + case AU1200_LCD_SET_WINENABLE:
  21467. + {
  21468. + u32 winenable;
  21469. + winenable = lcd->winenable;
  21470. + winenable &= ~(1<<plane);
  21471. + winenable |= (iodata.winenable.enable) ? (1<<plane) : 0;
  21472. + lcd->winenable = winenable;
  21473. + }
  21474. + break;
  21475. + case AU1200_LCD_GET_WINLOCATION:
  21476. + iodata.winlocation.x =
  21477. + (lcd->window[plane].winctrl0 & LCD_WINCTRL0_OX) >> 21;
  21478. + iodata.winlocation.y =
  21479. + (lcd->window[plane].winctrl0 & LCD_WINCTRL0_OY) >> 10;
  21480. + break;
  21481. + case AU1200_LCD_SET_WINLOCATION:
  21482. + au1200_setlocation(plane, iodata.winlocation.x, iodata.winlocation.y);
  21483. + break;
  21484. + case AU1200_LCD_GET_WINSIZE:
  21485. + iodata.winsize.hsz =
  21486. + (lcd->window[plane].winctrl1 & LCD_WINCTRL1_SZX) >> 11;
  21487. + iodata.winsize.vsz =
  21488. + (lcd->window[plane].winctrl0 & LCD_WINCTRL1_SZY) >> 0;
  21489. + break;
  21490. + case AU1200_LCD_SET_WINSIZE:
  21491. + au1200_setsize(plane, iodata.winsize.hsz, iodata.winsize.vsz);
  21492. + break;
  21493. + case AU1200_LCD_GET_BACKCOLOR:
  21494. + iodata.backcolor.color = lcd->backcolor;
  21495. + break;
  21496. + case AU1200_LCD_SET_BACKCOLOR:
  21497. + lcd->backcolor = iodata.backcolor.color;
  21498. + break;
  21499. + case AU1200_LCD_GET_COLORKEY:
  21500. + iodata.colorkey.key = lcd->colorkey;
  21501. + iodata.colorkey.mask = lcd->colorkeymsk;
  21502. + break;
  21503. + case AU1200_LCD_SET_COLORKEY:
  21504. + lcd->colorkey = iodata.colorkey.key;
  21505. + lcd->colorkeymsk = iodata.colorkey.mask;
  21506. + break;
  21507. + case AU1200_LCD_GET_PANEL:
  21508. + iodata.panel.panel = panel_index;
  21509. + break;
  21510. + case AU1200_LCD_SET_PANEL:
  21511. + if ((iodata.panel.panel >= 0) && (iodata.panel.panel < NUM_PANELS))
  21512. + {
  21513. + struct panel_settings *newpanel;
  21514. + panel_index = iodata.panel.panel;
  21515. + newpanel = &panels[panel_index];
  21516. + au1200_setpanel(newpanel);
  21517. + }
  21518. + break;
  21519. + }
  21520. +
  21521. + return copy_to_user((void *) arg, &iodata, sizeof(au1200_lcd_getset_t)) ? -EFAULT : 0;
  21522. + }
  21523. +
  21524. + return -EINVAL;
  21525. +}
  21526. +
  21527. +static struct fbgen_hwswitch au1200_switch = {
  21528. + au1200_detect,
  21529. + au1200_encode_fix,
  21530. + au1200_decode_var,
  21531. + au1200_encode_var,
  21532. + au1200_get_par,
  21533. + au1200_set_par,
  21534. + au1200_getcolreg,
  21535. + au1200_setcolreg,
  21536. + au1200_pan_display,
  21537. + au1200_blank,
  21538. + au1200_set_disp
  21539. +};
  21540. +
  21541. +static void au1200_setpanel (struct panel_settings *newpanel)
  21542. +{
  21543. + /*
  21544. + * Perform global setup/init of LCD controller
  21545. + */
  21546. + uint32 winenable;
  21547. +
  21548. + /* Make sure all windows disabled */
  21549. + winenable = lcd->winenable;
  21550. + lcd->winenable = 0;
  21551. +
  21552. + /*
  21553. + * Ensure everything is disabled before reconfiguring
  21554. + */
  21555. + if (lcd->screen & LCD_SCREEN_SEN)
  21556. + {
  21557. + /* Wait for vertical sync period */
  21558. + lcd->intstatus = LCD_INT_SS;
  21559. + while ((lcd->intstatus & LCD_INT_SS) == 0)
  21560. + ;
  21561. +
  21562. + lcd->screen &= ~LCD_SCREEN_SEN; /*disable the controller*/
  21563. +
  21564. + do
  21565. + {
  21566. + lcd->intstatus = lcd->intstatus; /*clear interrupts*/
  21567. + }
  21568. + /*wait for controller to shut down*/
  21569. + while ((lcd->intstatus & LCD_INT_SD) == 0);
  21570. +
  21571. + /* Call shutdown of current panel (if up) */
  21572. + /* this must occur last, because if an external clock is driving
  21573. + the controller, the clock cannot be turned off before first
  21574. + shutting down the controller.
  21575. + */
  21576. + if (panel->device_shutdown != NULL) panel->device_shutdown();
  21577. + }
  21578. +
  21579. + /* Check if only needing to turn off panel */
  21580. + if (panel == NULL) return;
  21581. +
  21582. + panel = newpanel;
  21583. +
  21584. + printk("Panel(%s), %dx%d\n", panel->name, panel->Xres, panel->Yres);
  21585. +
  21586. + /*
  21587. + * Setup clocking if internal LCD clock source (assumes sys_auxpll valid)
  21588. + */
  21589. + if (!(panel->mode_clkcontrol & LCD_CLKCONTROL_EXT))
  21590. + {
  21591. + uint32 sys_clksrc;
  21592. + /* WARNING! This should really be a check since other peripherals can
  21593. + be affected by changins sys_auxpll */
  21594. + au_writel(panel->mode_auxpll, SYS_AUXPLL);
  21595. + sys_clksrc = au_readl(SYS_CLKSRC) & ~0x0000001f;
  21596. + sys_clksrc |= panel->mode_toyclksrc;
  21597. + au_writel(sys_clksrc, SYS_CLKSRC);
  21598. + }
  21599. +
  21600. + /*
  21601. + * Configure panel timings
  21602. + */
  21603. + lcd->screen = panel->mode_screen;
  21604. + lcd->horztiming = panel->mode_horztiming;
  21605. + lcd->verttiming = panel->mode_verttiming;
  21606. + lcd->clkcontrol = panel->mode_clkcontrol;
  21607. + lcd->pwmdiv = panel->mode_pwmdiv;
  21608. + lcd->pwmhi = panel->mode_pwmhi;
  21609. + lcd->outmask = panel->mode_outmask;
  21610. + lcd->fifoctrl = panel->mode_fifoctrl;
  21611. + au_sync();
  21612. +
  21613. + /* FIX!!! Check window settings to make sure still valid for new geometry */
  21614. + au1200_setlocation(0, win->w[0].xpos, win->w[0].ypos);
  21615. + au1200_setlocation(1, win->w[1].xpos, win->w[1].ypos);
  21616. + au1200_setlocation(2, win->w[2].xpos, win->w[2].ypos);
  21617. + au1200_setlocation(3, win->w[3].xpos, win->w[3].ypos);
  21618. + lcd->winenable = winenable;
  21619. +
  21620. + /*
  21621. + * Re-enable screen now that it is configured
  21622. + */
  21623. + lcd->screen |= LCD_SCREEN_SEN;
  21624. + au_sync();
  21625. +
  21626. + /* Call init of panel */
  21627. + if (panel->device_init != NULL) panel->device_init();
  21628. +
  21629. +#if 0
  21630. +#define D(X) printk("%25s: %08X\n", #X, X)
  21631. + D(lcd->screen);
  21632. + D(lcd->horztiming);
  21633. + D(lcd->verttiming);
  21634. + D(lcd->clkcontrol);
  21635. + D(lcd->pwmdiv);
  21636. + D(lcd->pwmhi);
  21637. + D(lcd->outmask);
  21638. + D(lcd->fifoctrl);
  21639. + D(lcd->window[0].winctrl0);
  21640. + D(lcd->window[0].winctrl1);
  21641. + D(lcd->window[0].winctrl2);
  21642. + D(lcd->window[0].winbuf0);
  21643. + D(lcd->window[0].winbuf1);
  21644. + D(lcd->window[0].winbufctrl);
  21645. + D(lcd->window[1].winctrl0);
  21646. + D(lcd->window[1].winctrl1);
  21647. + D(lcd->window[1].winctrl2);
  21648. + D(lcd->window[1].winbuf0);
  21649. + D(lcd->window[1].winbuf1);
  21650. + D(lcd->window[1].winbufctrl);
  21651. + D(lcd->window[2].winctrl0);
  21652. + D(lcd->window[2].winctrl1);
  21653. + D(lcd->window[2].winctrl2);
  21654. + D(lcd->window[2].winbuf0);
  21655. + D(lcd->window[2].winbuf1);
  21656. + D(lcd->window[2].winbufctrl);
  21657. + D(lcd->window[3].winctrl0);
  21658. + D(lcd->window[3].winctrl1);
  21659. + D(lcd->window[3].winctrl2);
  21660. + D(lcd->window[3].winbuf0);
  21661. + D(lcd->window[3].winbuf1);
  21662. + D(lcd->window[3].winbufctrl);
  21663. + D(lcd->winenable);
  21664. + D(lcd->intenable);
  21665. + D(lcd->intstatus);
  21666. + D(lcd->backcolor);
  21667. + D(lcd->winenable);
  21668. + D(lcd->colorkey);
  21669. + D(lcd->colorkeymsk);
  21670. + D(lcd->hwc.cursorctrl);
  21671. + D(lcd->hwc.cursorpos);
  21672. + D(lcd->hwc.cursorcolor0);
  21673. + D(lcd->hwc.cursorcolor1);
  21674. + D(lcd->hwc.cursorcolor2);
  21675. + D(lcd->hwc.cursorcolor3);
  21676. +#endif
  21677. +}
  21678. +
  21679. +static int au1200_setsize (int plane, int xres, int yres)
  21680. +{
  21681. +#if 0
  21682. + uint32 winctrl0, winctrl1, winenable;
  21683. + int xsz, ysz;
  21684. +
  21685. + /* FIX!!! X*Y can not surpass allocated memory */
  21686. +
  21687. + printk("setsize: x %d y %d\n", xres, yres);
  21688. + winctrl1 = lcd->window[plane].winctrl1;
  21689. + printk("org winctrl1 %08X\n", winctrl1);
  21690. + winctrl1 &= ~(LCD_WINCTRL1_SZX | LCD_WINCTRL1_SZY);
  21691. +
  21692. + xres -= 1;
  21693. + yres -= 1;
  21694. + winctrl1 |= (xres << 11);
  21695. + winctrl1 |= (yres << 0);
  21696. +
  21697. + printk("new winctrl1 %08X\n", winctrl1);
  21698. +
  21699. + /*winenable = lcd->winenable & (1 << plane); */
  21700. + /*lcd->winenable &= ~(1 << plane); */
  21701. + lcd->window[plane].winctrl1 = winctrl1;
  21702. + /*lcd->winenable |= winenable; */
  21703. +#endif
  21704. + return 0;
  21705. +}
  21706. +
  21707. +static int au1200_setlocation (int plane, int xpos, int ypos)
  21708. +{
  21709. + uint32 winctrl0, winctrl1, winenable, fb_offset = 0;
  21710. + int xsz, ysz;
  21711. +
  21712. + /* FIX!!! NOT CHECKING FOR COMPLETE OFFSCREEN YET */
  21713. +
  21714. + winctrl0 = lcd->window[plane].winctrl0;
  21715. + winctrl1 = lcd->window[plane].winctrl1;
  21716. + winctrl0 &= (LCD_WINCTRL0_A | LCD_WINCTRL0_AEN);
  21717. + winctrl1 &= ~(LCD_WINCTRL1_SZX | LCD_WINCTRL1_SZY);
  21718. +
  21719. + /* Check for off-screen adjustments */
  21720. + xsz = win->w[plane].xres;
  21721. + ysz = win->w[plane].yres;
  21722. + if ((xpos + win->w[plane].xres) > panel->Xres)
  21723. + {
  21724. + /* Off-screen to the right */
  21725. + xsz = panel->Xres - xpos; /* off by 1 ??? */
  21726. + /*printk("off screen right\n");*/
  21727. + }
  21728. +
  21729. + if ((ypos + win->w[plane].yres) > panel->Yres)
  21730. + {
  21731. + /* Off-screen to the bottom */
  21732. + ysz = panel->Yres - ypos; /* off by 1 ??? */
  21733. + /*printk("off screen bottom\n");*/
  21734. + }
  21735. +
  21736. + if (xpos < 0)
  21737. + {
  21738. + /* Off-screen to the left */
  21739. + xsz = win->w[plane].xres + xpos;
  21740. + fb_offset += (((0 - xpos) * winbpp(lcd->window[plane].winctrl1))/8);
  21741. + xpos = 0;
  21742. + /*printk("off screen left\n");*/
  21743. + }
  21744. +
  21745. + if (ypos < 0)
  21746. + {
  21747. + /* Off-screen to the top */
  21748. + ysz = win->w[plane].yres + ypos;
  21749. + fb_offset += ((0 - ypos) * fb_pars[plane].line_length);
  21750. + ypos = 0;
  21751. + /*printk("off screen top\n");*/
  21752. + }
  21753. +
  21754. + /* record settings */
  21755. + win->w[plane].xpos = xpos;
  21756. + win->w[plane].ypos = ypos;
  21757. +
  21758. + xsz -= 1;
  21759. + ysz -= 1;
  21760. + winctrl0 |= (xpos << 21);
  21761. + winctrl0 |= (ypos << 10);
  21762. + winctrl1 |= (xsz << 11);
  21763. + winctrl1 |= (ysz << 0);
  21764. +
  21765. + /* Disable the window while making changes, then restore WINEN */
  21766. + winenable = lcd->winenable & (1 << plane);
  21767. + lcd->winenable &= ~(1 << plane);
  21768. + lcd->window[plane].winctrl0 = winctrl0;
  21769. + lcd->window[plane].winctrl1 = winctrl1;
  21770. + lcd->window[plane].winbuf0 =
  21771. + lcd->window[plane].winbuf1 = fb_infos[plane].fb_phys + fb_offset;
  21772. + lcd->window[plane].winbufctrl = 0; /* select winbuf0 */
  21773. + lcd->winenable |= winenable;
  21774. +
  21775. + return 0;
  21776. +}
  21777. +
  21778. +static void au1200_setmode(int plane)
  21779. +{
  21780. + /* Window/plane setup */
  21781. + lcd->window[plane].winctrl1 = ( 0
  21782. + | LCD_WINCTRL1_PRI_N(plane)
  21783. + | win->w[plane].mode_winctrl1 /* FRM,CCO,PO,PIPE */
  21784. + ) ;
  21785. +
  21786. + au1200_setlocation(plane, win->w[plane].xpos, win->w[plane].ypos);
  21787. +
  21788. + lcd->window[plane].winctrl2 = ( 0
  21789. + | LCD_WINCTRL2_CKMODE_00
  21790. + | LCD_WINCTRL2_DBM
  21791. +/* | LCD_WINCTRL2_RAM */
  21792. + | LCD_WINCTRL2_BX_N(fb_pars[plane].line_length)
  21793. + | LCD_WINCTRL2_SCX_1
  21794. + | LCD_WINCTRL2_SCY_1
  21795. + ) ;
  21796. + lcd->winenable |= win->w[plane].mode_winenable;
  21797. + au_sync();
  21798. +
  21799. +}
  21800. +
  21801. +static unsigned long
  21802. +au1200fb_alloc_fbmem (unsigned long size)
  21803. +{
  21804. + /* __get_free_pages() fulfills a max request of 2MB */
  21805. + /* do multiple requests to obtain large contigous mem */
  21806. +#define MAX_GFP 0x00200000
  21807. +
  21808. + unsigned long mem, amem, alloced = 0, allocsize;
  21809. +
  21810. + size += 0x1000;
  21811. + allocsize = (size < MAX_GFP) ? size : MAX_GFP;
  21812. +
  21813. + /* Get first chunk */
  21814. + mem = (unsigned long )
  21815. + __get_free_pages(GFP_ATOMIC | GFP_DMA, get_order(allocsize));
  21816. + if (mem != 0) alloced = allocsize;
  21817. +
  21818. + /* Get remaining, contiguous chunks */
  21819. + while (alloced < size)
  21820. + {
  21821. + amem = (unsigned long )
  21822. + __get_free_pages(GFP_ATOMIC | GFP_DMA, get_order(allocsize));
  21823. + if (amem != 0)
  21824. + alloced += allocsize;
  21825. +
  21826. + /* check for contiguous mem alloced */
  21827. + if ((amem == 0) || (amem + allocsize) != mem)
  21828. + break;
  21829. + else
  21830. + mem = amem;
  21831. + }
  21832. + return mem;
  21833. +}
  21834. +
  21835. +int __init au1200fb_init(void)
  21836. +{
  21837. + int num_panels = sizeof(panels)/sizeof(struct panel_settings);
  21838. + struct au1200fb_info *fb_info;
  21839. + struct display *disp;
  21840. + struct au1200fb_par *par;
  21841. + unsigned long page;
  21842. + int plane, bpp;
  21843. +
  21844. + /*
  21845. + * Get the panel information/display mode
  21846. + */
  21847. + if (panel_index < 0)
  21848. + panel_index = board_au1200fb_panel();
  21849. + if ((panel_index < 0) || (panel_index >= num_panels)) {
  21850. + printk("ERROR: INVALID PANEL %d\n", panel_index);
  21851. + return -EINVAL;
  21852. + }
  21853. + panel = &panels[panel_index];
  21854. + win = &windows[window_index];
  21855. +
  21856. + printk("au1200fb: Panel %d %s\n", panel_index, panel->name);
  21857. + printk("au1200fb: Win %d %s\n", window_index, win->name);
  21858. +
  21859. + /* Global setup/init */
  21860. + au1200_setpanel(panel);
  21861. + lcd->intenable = 0;
  21862. + lcd->intstatus = ~0;
  21863. + lcd->backcolor = win->mode_backcolor;
  21864. + lcd->winenable = 0;
  21865. +
  21866. + /* Setup Color Key - FIX!!! */
  21867. + lcd->colorkey = win->mode_colorkey;
  21868. + lcd->colorkeymsk = win->mode_colorkeymsk;
  21869. +
  21870. + /* Setup HWCursor - FIX!!! Need to support this eventually */
  21871. + lcd->hwc.cursorctrl = 0;
  21872. + lcd->hwc.cursorpos = 0;
  21873. + lcd->hwc.cursorcolor0 = 0;
  21874. + lcd->hwc.cursorcolor1 = 0;
  21875. + lcd->hwc.cursorcolor2 = 0;
  21876. + lcd->hwc.cursorcolor3 = 0;
  21877. +
  21878. + /* Register each plane as a frame buffer device */
  21879. + for (plane = 0; plane < CONFIG_FB_AU1200_DEVS; ++plane)
  21880. + {
  21881. + fb_info = &fb_infos[plane];
  21882. + disp = &disps[plane];
  21883. + par = &fb_pars[plane];
  21884. +
  21885. + bpp = winbpp(win->w[plane].mode_winctrl1);
  21886. + if (win->w[plane].xres == 0)
  21887. + win->w[plane].xres = panel->Xres;
  21888. + if (win->w[plane].yres == 0)
  21889. + win->w[plane].yres = panel->Yres;
  21890. +
  21891. + par->var.xres =
  21892. + par->var.xres_virtual = win->w[plane].xres;
  21893. + par->var.yres =
  21894. + par->var.yres_virtual = win->w[plane].yres;
  21895. + par->var.bits_per_pixel = bpp;
  21896. + par->line_length = win->w[plane].xres * bpp / 8; /* in bytes */
  21897. + /*
  21898. + * Allocate LCD framebuffer from system memory
  21899. + * Set page reserved so that mmap will work. This is necessary
  21900. + * since we'll be remapping normal memory.
  21901. + */
  21902. + fb_info->fb_size = (win->w[plane].xres * win->w[plane].yres * bpp) / 8;
  21903. + fb_info->fb_virt_start = au1200fb_alloc_fbmem(fb_info->fb_size);
  21904. + if (!fb_info->fb_virt_start) {
  21905. + printk("Unable to allocate fb memory\n");
  21906. + return -ENOMEM;
  21907. + }
  21908. + fb_info->fb_phys = virt_to_bus((void *)fb_info->fb_virt_start);
  21909. + for (page = fb_info->fb_virt_start;
  21910. + page < PAGE_ALIGN(fb_info->fb_virt_start + fb_info->fb_size);
  21911. + page += PAGE_SIZE) {
  21912. + SetPageReserved(virt_to_page(page));
  21913. + }
  21914. + /* Convert to kseg1 */
  21915. + fb_info->fb_virt_start =
  21916. + (void *)((u32)fb_info->fb_virt_start | 0xA0000000);
  21917. + /* FIX!!! may wish to avoid this to save startup time??? */
  21918. + memset((void *)fb_info->fb_virt_start, 0, fb_info->fb_size);
  21919. +
  21920. + fb_info->gen.parsize = sizeof(struct au1200fb_par);
  21921. + fb_info->gen.fbhw = &au1200_switch;
  21922. + strcpy(fb_info->gen.info.modename, "Au1200 LCD");
  21923. + fb_info->gen.info.changevar = NULL;
  21924. + fb_info->gen.info.node = -1;
  21925. +
  21926. + fb_info->gen.info.fbops = &au1200fb_ops;
  21927. + fb_info->gen.info.disp = disp;
  21928. + fb_info->gen.info.switch_con = &fbgen_switch;
  21929. + fb_info->gen.info.updatevar = &fbgen_update_var;
  21930. + fb_info->gen.info.blank = &fbgen_blank;
  21931. + fb_info->gen.info.flags = FBINFO_FLAG_DEFAULT;
  21932. +
  21933. + fb_info->nohwcursor = 1;
  21934. + fb_info->noblanking = 1;
  21935. +
  21936. + /* This should give a reasonable default video mode */
  21937. + fbgen_get_var(&disp->var, -1, &fb_info->gen.info);
  21938. + fbgen_do_set_var(&disp->var, 1, &fb_info->gen);
  21939. + fbgen_set_disp(-1, &fb_info->gen);
  21940. + fbgen_install_cmap(0, &fb_info->gen);
  21941. +
  21942. + /* Turn on plane */
  21943. + au1200_setmode(plane);
  21944. +
  21945. + if (register_framebuffer(&fb_info->gen.info) < 0)
  21946. + return -EINVAL;
  21947. +
  21948. + printk(KERN_INFO "fb%d: %s plane %d @ %08X (%d x %d x %d)\n",
  21949. + GET_FB_IDX(fb_info->gen.info.node),
  21950. + fb_info->gen.info.modename, plane, fb_info->fb_phys,
  21951. + win->w[plane].xres, win->w[plane].yres, bpp);
  21952. + }
  21953. + /* uncomment this if your driver cannot be unloaded */
  21954. + /* MOD_INC_USE_COUNT; */
  21955. + return 0;
  21956. +}
  21957. +
  21958. +void au1200fb_setup(char *options, int *ints)
  21959. +{
  21960. + char* this_opt;
  21961. + int i;
  21962. + int num_panels = sizeof(panels)/sizeof(struct panel_settings);
  21963. +
  21964. + if (!options || !*options)
  21965. + return;
  21966. +
  21967. + for(this_opt=strtok(options, ","); this_opt;
  21968. + this_opt=strtok(NULL, ",")) {
  21969. + if (!strncmp(this_opt, "panel:", 6)) {
  21970. + int i;
  21971. + long int li;
  21972. + char *endptr;
  21973. + this_opt += 6;
  21974. +
  21975. + /* Panel name can be name, "bs" for board-switch, or number/index */
  21976. + li = simple_strtol(this_opt, &endptr, 0);
  21977. + if (*endptr == '\0') {
  21978. + panel_index = (int)li;
  21979. + }
  21980. + else if (strcmp(this_opt, "bs") == 0) {
  21981. + panel_index = board_au1200fb_panel();
  21982. + }
  21983. + else
  21984. + for (i=0; i<num_panels; i++) {
  21985. + if (!strcmp(this_opt, panels[i].name)) {
  21986. + panel_index = i;
  21987. + break;
  21988. + }
  21989. + }
  21990. + }
  21991. + else if (!strncmp(this_opt, "nohwcursor", 10)) {
  21992. + printk("nohwcursor\n");
  21993. + fb_infos[0].nohwcursor = 1;
  21994. + }
  21995. + }
  21996. +
  21997. + printk("au1200fb: Panel %d %s\n", panel_index,
  21998. + panels[panel_index].name);
  21999. +}
  22000. +
  22001. +
  22002. +
  22003. +#ifdef MODULE
  22004. +MODULE_LICENSE("GPL");
  22005. +MODULE_DESCRIPTION("Au1200 LCD framebuffer driver");
  22006. +
  22007. +void au1200fb_cleanup(struct fb_info *info)
  22008. +{
  22009. + unregister_framebuffer(info);
  22010. +}
  22011. +
  22012. +module_init(au1200fb_init);
  22013. +module_exit(au1200fb_cleanup);
  22014. +#endif /* MODULE */
  22015. +
  22016. +
  22017. diff -Nur linux-2.4.32-rc1/drivers/video/au1200fb.h linux-2.4.32-rc1.mips/drivers/video/au1200fb.h
  22018. --- linux-2.4.32-rc1/drivers/video/au1200fb.h 1970-01-01 01:00:00.000000000 +0100
  22019. +++ linux-2.4.32-rc1.mips/drivers/video/au1200fb.h 2005-02-11 22:16:44.000000000 +0100
  22020. @@ -0,0 +1,288 @@
  22021. +/*
  22022. + * BRIEF MODULE DESCRIPTION
  22023. + * Hardware definitions for the Au1200 LCD controller
  22024. + *
  22025. + * Copyright 2004 AMD
  22026. + * Author: AMD
  22027. + *
  22028. + * This program is free software; you can redistribute it and/or modify it
  22029. + * under the terms of the GNU General Public License as published by the
  22030. + * Free Software Foundation; either version 2 of the License, or (at your
  22031. + * option) any later version.
  22032. + *
  22033. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  22034. + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  22035. + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  22036. + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  22037. + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  22038. + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  22039. + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  22040. + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22041. + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  22042. + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22043. + *
  22044. + * You should have received a copy of the GNU General Public License along
  22045. + * with this program; if not, write to the Free Software Foundation, Inc.,
  22046. + * 675 Mass Ave, Cambridge, MA 02139, USA.
  22047. + */
  22048. +
  22049. +#ifndef _AU1200LCD_H
  22050. +#define _AU1200LCD_H
  22051. +
  22052. +/********************************************************************/
  22053. +#define AU1200_LCD_ADDR 0xB5000000
  22054. +
  22055. +#define uint8 unsigned char
  22056. +#define uint32 unsigned int
  22057. +
  22058. +typedef volatile struct
  22059. +{
  22060. + uint32 reserved0;
  22061. + uint32 screen;
  22062. + uint32 backcolor;
  22063. + uint32 horztiming;
  22064. + uint32 verttiming;
  22065. + uint32 clkcontrol;
  22066. + uint32 pwmdiv;
  22067. + uint32 pwmhi;
  22068. + uint32 reserved1;
  22069. + uint32 winenable;
  22070. + uint32 colorkey;
  22071. + uint32 colorkeymsk;
  22072. + struct
  22073. + {
  22074. + uint32 cursorctrl;
  22075. + uint32 cursorpos;
  22076. + uint32 cursorcolor0;
  22077. + uint32 cursorcolor1;
  22078. + uint32 cursorcolor2;
  22079. + uint32 cursorcolor3;
  22080. + } hwc;
  22081. + uint32 intstatus;
  22082. + uint32 intenable;
  22083. + uint32 outmask;
  22084. + uint32 fifoctrl;
  22085. + uint32 reserved2[(0x0100-0x0058)/4];
  22086. + struct
  22087. + {
  22088. + uint32 winctrl0;
  22089. + uint32 winctrl1;
  22090. + uint32 winctrl2;
  22091. + uint32 winbuf0;
  22092. + uint32 winbuf1;
  22093. + uint32 winbufctrl;
  22094. + uint32 winreserved0;
  22095. + uint32 winreserved1;
  22096. + } window[4];
  22097. +
  22098. + uint32 reserved3[(0x0400-0x0180)/4];
  22099. +
  22100. + uint32 palette[(0x0800-0x0400)/4];
  22101. +
  22102. + uint8 cursorpattern[256];
  22103. +
  22104. +} AU1200_LCD;
  22105. +
  22106. +/* lcd_screen */
  22107. +#define LCD_SCREEN_SEN (1<<31)
  22108. +#define LCD_SCREEN_SX (0x07FF<<19)
  22109. +#define LCD_SCREEN_SY (0x07FF<< 8)
  22110. +#define LCD_SCREEN_SWP (1<<7)
  22111. +#define LCD_SCREEN_SWD (1<<6)
  22112. +#define LCD_SCREEN_ST (7<<0)
  22113. +#define LCD_SCREEN_ST_TFT (0<<0)
  22114. +#define LCD_SCREEN_SX_N(WIDTH) ((WIDTH-1)<<19)
  22115. +#define LCD_SCREEN_SY_N(HEIGHT) ((HEIGHT-1)<<8)
  22116. +#define LCD_SCREEN_ST_CSTN (1<<0)
  22117. +#define LCD_SCREEN_ST_CDSTN (2<<0)
  22118. +#define LCD_SCREEN_ST_M8STN (3<<0)
  22119. +#define LCD_SCREEN_ST_M4STN (4<<0)
  22120. +
  22121. +/* lcd_backcolor */
  22122. +#define LCD_BACKCOLOR_SBGR (0xFF<<16)
  22123. +#define LCD_BACKCOLOR_SBGG (0xFF<<8)
  22124. +#define LCD_BACKCOLOR_SBGB (0xFF<<0)
  22125. +#define LCD_BACKCOLOR_SBGR_N(N) ((N)<<16)
  22126. +#define LCD_BACKCOLOR_SBGG_N(N) ((N)<<8)
  22127. +#define LCD_BACKCOLOR_SBGB_N(N) ((N)<<0)
  22128. +
  22129. +/* lcd_winenable */
  22130. +#define LCD_WINENABLE_WEN3 (1<<3)
  22131. +#define LCD_WINENABLE_WEN2 (1<<2)
  22132. +#define LCD_WINENABLE_WEN1 (1<<1)
  22133. +#define LCD_WINENABLE_WEN0 (1<<0)
  22134. +
  22135. +/* lcd_colorkey */
  22136. +#define LCD_COLORKEY_CKR (0xFF<<16)
  22137. +#define LCD_COLORKEY_CKG (0xFF<<8)
  22138. +#define LCD_COLORKEY_CKB (0xFF<<0)
  22139. +#define LCD_COLORKEY_CKR_N(N) ((N)<<16)
  22140. +#define LCD_COLORKEY_CKG_N(N) ((N)<<8)
  22141. +#define LCD_COLORKEY_CKB_N(N) ((N)<<0)
  22142. +
  22143. +/* lcd_colorkeymsk */
  22144. +#define LCD_COLORKEYMSK_CKMR (0xFF<<16)
  22145. +#define LCD_COLORKEYMSK_CKMG (0xFF<<8)
  22146. +#define LCD_COLORKEYMSK_CKMB (0xFF<<0)
  22147. +#define LCD_COLORKEYMSK_CKMR_N(N) ((N)<<16)
  22148. +#define LCD_COLORKEYMSK_CKMG_N(N) ((N)<<8)
  22149. +#define LCD_COLORKEYMSK_CKMB_N(N) ((N)<<0)
  22150. +
  22151. +/* lcd windows control 0 */
  22152. +#define LCD_WINCTRL0_OX (0x07FF<<21)
  22153. +#define LCD_WINCTRL0_OY (0x07FF<<10)
  22154. +#define LCD_WINCTRL0_A (0x00FF<<2)
  22155. +#define LCD_WINCTRL0_AEN (1<<1)
  22156. +#define LCD_WINCTRL0_OX_N(N) ((N)<<21)
  22157. +#define LCD_WINCTRL0_OY_N(N) ((N)<<10)
  22158. +#define LCD_WINCTRL0_A_N(N) ((N)<<2)
  22159. +
  22160. +/* lcd windows control 1 */
  22161. +#define LCD_WINCTRL1_PRI (3<<30)
  22162. +#define LCD_WINCTRL1_PIPE (1<<29)
  22163. +#define LCD_WINCTRL1_FRM (0xF<<25)
  22164. +#define LCD_WINCTRL1_CCO (1<<24)
  22165. +#define LCD_WINCTRL1_PO (3<<22)
  22166. +#define LCD_WINCTRL1_SZX (0x07FF<<11)
  22167. +#define LCD_WINCTRL1_SZY (0x07FF<<0)
  22168. +#define LCD_WINCTRL1_FRM_1BPP (0<<25)
  22169. +#define LCD_WINCTRL1_FRM_2BPP (1<<25)
  22170. +#define LCD_WINCTRL1_FRM_4BPP (2<<25)
  22171. +#define LCD_WINCTRL1_FRM_8BPP (3<<25)
  22172. +#define LCD_WINCTRL1_FRM_12BPP (4<<25)
  22173. +#define LCD_WINCTRL1_FRM_16BPP655 (5<<25)
  22174. +#define LCD_WINCTRL1_FRM_16BPP565 (6<<25)
  22175. +#define LCD_WINCTRL1_FRM_16BPP556 (7<<25)
  22176. +#define LCD_WINCTRL1_FRM_16BPPI1555 (8<<25)
  22177. +#define LCD_WINCTRL1_FRM_16BPPI5551 (9<<25)
  22178. +#define LCD_WINCTRL1_FRM_16BPPA1555 (10<<25)
  22179. +#define LCD_WINCTRL1_FRM_16BPPA5551 (11<<25)
  22180. +#define LCD_WINCTRL1_FRM_24BPP (12<<25)
  22181. +#define LCD_WINCTRL1_FRM_32BPP (13<<25)
  22182. +#define LCD_WINCTRL1_PRI_N(N) ((N)<<30)
  22183. +#define LCD_WINCTRL1_PO_00 (0<<22)
  22184. +#define LCD_WINCTRL1_PO_01 (1<<22)
  22185. +#define LCD_WINCTRL1_PO_10 (2<<22)
  22186. +#define LCD_WINCTRL1_PO_11 (3<<22)
  22187. +#define LCD_WINCTRL1_SZX_N(N) ((N-1)<<11)
  22188. +#define LCD_WINCTRL1_SZY_N(N) ((N-1)<<0)
  22189. +
  22190. +/* lcd windows control 2 */
  22191. +#define LCD_WINCTRL2_CKMODE (3<<24)
  22192. +#define LCD_WINCTRL2_DBM (1<<23)
  22193. +#define LCD_WINCTRL2_RAM (3<<21)
  22194. +#define LCD_WINCTRL2_BX (0x1FFF<<8)
  22195. +#define LCD_WINCTRL2_SCX (0xF<<4)
  22196. +#define LCD_WINCTRL2_SCY (0xF<<0)
  22197. +#define LCD_WINCTRL2_CKMODE_00 (0<<24)
  22198. +#define LCD_WINCTRL2_CKMODE_01 (1<<24)
  22199. +#define LCD_WINCTRL2_CKMODE_10 (2<<24)
  22200. +#define LCD_WINCTRL2_CKMODE_11 (3<<24)
  22201. +#define LCD_WINCTRL2_RAM_NONE (0<<21)
  22202. +#define LCD_WINCTRL2_RAM_PALETTE (1<<21)
  22203. +#define LCD_WINCTRL2_RAM_GAMMA (2<<21)
  22204. +#define LCD_WINCTRL2_RAM_BUFFER (3<<21)
  22205. +#define LCD_WINCTRL2_BX_N(N) ((N)<<8)
  22206. +#define LCD_WINCTRL2_SCX_1 (0<<4)
  22207. +#define LCD_WINCTRL2_SCX_2 (1<<4)
  22208. +#define LCD_WINCTRL2_SCX_4 (2<<4)
  22209. +#define LCD_WINCTRL2_SCY_1 (0<<0)
  22210. +#define LCD_WINCTRL2_SCY_2 (1<<0)
  22211. +#define LCD_WINCTRL2_SCY_4 (2<<0)
  22212. +
  22213. +/* lcd windows buffer control */
  22214. +#define LCD_WINBUFCTRL_DB (1<<1)
  22215. +#define LCD_WINBUFCTRL_DBN (1<<0)
  22216. +
  22217. +/* lcd_intstatus, lcd_intenable */
  22218. +#define LCD_INT_IFO (0xF<<14)
  22219. +#define LCD_INT_IFU (0xF<<10)
  22220. +#define LCD_INT_OFO (1<<9)
  22221. +#define LCD_INT_OFU (1<<8)
  22222. +#define LCD_INT_WAIT (1<<3)
  22223. +#define LCD_INT_SD (1<<2)
  22224. +#define LCD_INT_SA (1<<1)
  22225. +#define LCD_INT_SS (1<<0)
  22226. +
  22227. +/* lcd_horztiming */
  22228. +#define LCD_HORZTIMING_HND2 (0x1FF<<18)
  22229. +#define LCD_HORZTIMING_HND1 (0x1FF<<9)
  22230. +#define LCD_HORZTIMING_HPW (0x1FF<<0)
  22231. +#define LCD_HORZTIMING_HND2_N(N)(((N)-1)<<18)
  22232. +#define LCD_HORZTIMING_HND1_N(N)(((N)-1)<<9)
  22233. +#define LCD_HORZTIMING_HPW_N(N) (((N)-1)<<0)
  22234. +
  22235. +/* lcd_verttiming */
  22236. +#define LCD_VERTTIMING_VND2 (0x1FF<<18)
  22237. +#define LCD_VERTTIMING_VND1 (0x1FF<<9)
  22238. +#define LCD_VERTTIMING_VPW (0x1FF<<0)
  22239. +#define LCD_VERTTIMING_VND2_N(N)(((N)-1)<<18)
  22240. +#define LCD_VERTTIMING_VND1_N(N)(((N)-1)<<9)
  22241. +#define LCD_VERTTIMING_VPW_N(N) (((N)-1)<<0)
  22242. +
  22243. +/* lcd_clkcontrol */
  22244. +#define LCD_CLKCONTROL_EXT (1<<22)
  22245. +#define LCD_CLKCONTROL_DELAY (3<<20)
  22246. +#define LCD_CLKCONTROL_CDD (1<<19)
  22247. +#define LCD_CLKCONTROL_IB (1<<18)
  22248. +#define LCD_CLKCONTROL_IC (1<<17)
  22249. +#define LCD_CLKCONTROL_IH (1<<16)
  22250. +#define LCD_CLKCONTROL_IV (1<<15)
  22251. +#define LCD_CLKCONTROL_BF (0x1F<<10)
  22252. +#define LCD_CLKCONTROL_PCD (0x3FF<<0)
  22253. +#define LCD_CLKCONTROL_BF_N(N) (((N)-1)<<10)
  22254. +#define LCD_CLKCONTROL_PCD_N(N) ((N)<<0)
  22255. +
  22256. +/* lcd_pwmdiv */
  22257. +#define LCD_PWMDIV_EN (1<<31)
  22258. +#define LCD_PWMDIV_PWMDIV (0x1FFFF<<0)
  22259. +#define LCD_PWMDIV_PWMDIV_N(N) ((N)<<0)
  22260. +
  22261. +/* lcd_pwmhi */
  22262. +#define LCD_PWMHI_PWMHI1 (0xFFFF<<16)
  22263. +#define LCD_PWMHI_PWMHI0 (0xFFFF<<0)
  22264. +#define LCD_PWMHI_PWMHI1_N(N) ((N)<<16)
  22265. +#define LCD_PWMHI_PWMHI0_N(N) ((N)<<0)
  22266. +
  22267. +/* lcd_hwccon */
  22268. +#define LCD_HWCCON_EN (1<<0)
  22269. +
  22270. +/* lcd_cursorpos */
  22271. +#define LCD_CURSORPOS_HWCXOFF (0x1F<<27)
  22272. +#define LCD_CURSORPOS_HWCXPOS (0x07FF<<16)
  22273. +#define LCD_CURSORPOS_HWCYOFF (0x1F<<11)
  22274. +#define LCD_CURSORPOS_HWCYPOS (0x07FF<<0)
  22275. +#define LCD_CURSORPOS_HWCXOFF_N(N) ((N)<<27)
  22276. +#define LCD_CURSORPOS_HWCXPOS_N(N) ((N)<<16)
  22277. +#define LCD_CURSORPOS_HWCYOFF_N(N) ((N)<<11)
  22278. +#define LCD_CURSORPOS_HWCYPOS_N(N) ((N)<<0)
  22279. +
  22280. +/* lcd_cursorcolor */
  22281. +#define LCD_CURSORCOLOR_HWCA (0xFF<<24)
  22282. +#define LCD_CURSORCOLOR_HWCR (0xFF<<16)
  22283. +#define LCD_CURSORCOLOR_HWCG (0xFF<<8)
  22284. +#define LCD_CURSORCOLOR_HWCB (0xFF<<0)
  22285. +#define LCD_CURSORCOLOR_HWCA_N(N) ((N)<<24)
  22286. +#define LCD_CURSORCOLOR_HWCR_N(N) ((N)<<16)
  22287. +#define LCD_CURSORCOLOR_HWCG_N(N) ((N)<<8)
  22288. +#define LCD_CURSORCOLOR_HWCB_N(N) ((N)<<0)
  22289. +
  22290. +/* lcd_fifoctrl */
  22291. +#define LCD_FIFOCTRL_F3IF (1<<29)
  22292. +#define LCD_FIFOCTRL_F3REQ (0x1F<<24)
  22293. +#define LCD_FIFOCTRL_F2IF (1<<29)
  22294. +#define LCD_FIFOCTRL_F2REQ (0x1F<<16)
  22295. +#define LCD_FIFOCTRL_F1IF (1<<29)
  22296. +#define LCD_FIFOCTRL_F1REQ (0x1F<<8)
  22297. +#define LCD_FIFOCTRL_F0IF (1<<29)
  22298. +#define LCD_FIFOCTRL_F0REQ (0x1F<<0)
  22299. +#define LCD_FIFOCTRL_F3REQ_N(N) ((N-1)<<24)
  22300. +#define LCD_FIFOCTRL_F2REQ_N(N) ((N-1)<<16)
  22301. +#define LCD_FIFOCTRL_F1REQ_N(N) ((N-1)<<8)
  22302. +#define LCD_FIFOCTRL_F0REQ_N(N) ((N-1)<<0)
  22303. +
  22304. +/* lcd_outmask */
  22305. +#define LCD_OUTMASK_MASK (0x00FFFFFF)
  22306. +
  22307. +/********************************************************************/
  22308. +#endif /* _AU1200LCD_H */
  22309. diff -Nur linux-2.4.32-rc1/drivers/video/Config.in linux-2.4.32-rc1.mips/drivers/video/Config.in
  22310. --- linux-2.4.32-rc1/drivers/video/Config.in 2004-02-18 14:36:31.000000000 +0100
  22311. +++ linux-2.4.32-rc1.mips/drivers/video/Config.in 2005-02-11 22:16:44.000000000 +0100
  22312. @@ -87,8 +87,8 @@
  22313. if [ "$CONFIG_HP300" = "y" ]; then
  22314. define_bool CONFIG_FB_HP300 y
  22315. fi
  22316. - if [ "$ARCH" = "alpha" ]; then
  22317. - tristate ' TGA framebuffer support' CONFIG_FB_TGA
  22318. + if [ "$ARCH" = "alpha" -o "$CONFIG_TC" = "y" ]; then
  22319. + tristate ' TGA/SFB+ framebuffer support' CONFIG_FB_TGA
  22320. fi
  22321. if [ "$CONFIG_X86" = "y" ]; then
  22322. bool ' VESA VGA graphics console' CONFIG_FB_VESA
  22323. @@ -121,6 +121,17 @@
  22324. hex ' Framebuffer Base Address' CONFIG_E1355_FB_BASE a8200000
  22325. fi
  22326. fi
  22327. + if [ "$CONFIG_SOC_AU1100" = "y" ]; then
  22328. + bool ' Au1100 LCD Driver' CONFIG_FB_AU1100
  22329. + fi
  22330. +
  22331. + if [ "$CONFIG_SOC_AU1200" = "y" ]; then
  22332. + bool ' Au1200 LCD Driver' CONFIG_FB_AU1200
  22333. + if [ "$CONFIG_FB_AU1200" = "y" ]; then
  22334. + int ' Number of planes (1 to 4)' CONFIG_FB_AU1200_DEVS 1
  22335. + fi
  22336. + fi
  22337. +
  22338. if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
  22339. if [ "$CONFIG_PCI" != "n" ]; then
  22340. tristate ' Matrox acceleration (EXPERIMENTAL)' CONFIG_FB_MATROX
  22341. @@ -178,9 +189,6 @@
  22342. bool ' Use CRT on Pb1100 ' CONFIG_PB1500_CRT
  22343. bool ' Use TFT Panel on Pb1100 ' CONFIG_PB1500_TFT
  22344. fi
  22345. - if [ "$CONFIG_SOC_AU1100" = "y" ]; then
  22346. - bool ' Au1100 LCD Driver' CONFIG_FB_AU1100
  22347. - fi
  22348. fi
  22349. fi
  22350. fi
  22351. diff -Nur linux-2.4.32-rc1/drivers/video/fbmem.c linux-2.4.32-rc1.mips/drivers/video/fbmem.c
  22352. --- linux-2.4.32-rc1/drivers/video/fbmem.c 2005-06-01 02:56:56.000000000 +0200
  22353. +++ linux-2.4.32-rc1.mips/drivers/video/fbmem.c 2005-05-25 19:14:24.000000000 +0200
  22354. @@ -139,6 +139,8 @@
  22355. extern int e1356fb_setup(char*);
  22356. extern int au1100fb_init(void);
  22357. extern int au1100fb_setup(char*);
  22358. +extern int au1200fb_init(void);
  22359. +extern int au1200fb_setup(char*);
  22360. extern int pvr2fb_init(void);
  22361. extern int pvr2fb_setup(char*);
  22362. extern int sstfb_init(void);
  22363. @@ -331,6 +333,9 @@
  22364. #ifdef CONFIG_FB_AU1100
  22365. { "au1100fb", au1100fb_init, au1100fb_setup },
  22366. #endif
  22367. +#ifdef CONFIG_FB_AU1200
  22368. + { "au1200fb", au1200fb_init, au1200fb_setup },
  22369. +#endif
  22370. #ifdef CONFIG_FB_IT8181
  22371. { "it8181fb", it8181fb_init, it8181fb_setup },
  22372. #endif
  22373. diff -Nur linux-2.4.32-rc1/drivers/video/ims332.h linux-2.4.32-rc1.mips/drivers/video/ims332.h
  22374. --- linux-2.4.32-rc1/drivers/video/ims332.h 1970-01-01 01:00:00.000000000 +0100
  22375. +++ linux-2.4.32-rc1.mips/drivers/video/ims332.h 2003-12-22 17:02:20.000000000 +0100
  22376. @@ -0,0 +1,275 @@
  22377. +/*
  22378. + * linux/drivers/video/ims332.h
  22379. + *
  22380. + * Copyright 2003 Thiemo Seufer <[email protected]>
  22381. + *
  22382. + * This file is subject to the terms and conditions of the GNU General
  22383. + * Public License. See the file COPYING in the main directory of this
  22384. + * archive for more details.
  22385. + */
  22386. +#include <linux/types.h>
  22387. +
  22388. +/*
  22389. + * IMS332 16-bit wide, 128-bit aligned registers.
  22390. + */
  22391. +struct _ims332_reg {
  22392. + volatile u16 r;
  22393. + u16 pad[7];
  22394. +};
  22395. +
  22396. +struct _ims332_regs {
  22397. +#define IMS332_BOOT_PLL_MUTLIPLIER 0x00001f
  22398. +#define IMS332_BOOT_CLOCK_SOURCE_SEL 0x000020
  22399. +#define IMS332_BOOT_ADDRESS_ALIGNMENT 0x000040
  22400. +#define IMS332_BOOT_WRITE_ZERO 0xffff80
  22401. + struct _ims332_reg boot;
  22402. + struct _ims332_reg pad0[0x020 - 0x000];
  22403. + struct _ims332_reg half_sync;
  22404. + struct _ims332_reg back_porch;
  22405. + struct _ims332_reg display;
  22406. + struct _ims332_reg short_display;
  22407. + struct _ims332_reg broad_pulse;
  22408. + struct _ims332_reg vsync;
  22409. + struct _ims332_reg vpre_equalise;
  22410. + struct _ims332_reg vpost_equalise;
  22411. + struct _ims332_reg vblank;
  22412. + struct _ims332_reg vdisplay;
  22413. + struct _ims332_reg line_time;
  22414. + struct _ims332_reg line_start;
  22415. + struct _ims332_reg mem_init;
  22416. + struct _ims332_reg transfer_delay;
  22417. + struct _ims332_reg pad1[0x03f - 0x02e];
  22418. + struct _ims332_reg pixel_address_mask;
  22419. + struct _ims332_reg pad2[0x05f - 0x040];
  22420. +
  22421. +#define IMS332_CTRL_A_BOOT_ENABLE_VTG 0x000001
  22422. +#define IMS332_CTRL_A_SCREEN_FORMAT 0x000002
  22423. +#define IMS332_CTRL_A_INTERLACED_STANDARD 0x000004
  22424. +#define IMS332_CTRL_A_OPERATING_MODE 0x000008
  22425. +#define IMS332_CTRL_A_FRAME_FLYBACK_PATTERN 0x000010
  22426. +#define IMS332_CTRL_A_DIGITAL_SYNC_FORMAT 0x000020
  22427. +#define IMS332_CTRL_A_ANALOGUE_VIDEO_FORMAT 0x000040
  22428. +#define IMS332_CTRL_A_BLANK_LEVEL 0x000080
  22429. +#define IMS332_CTRL_A_BLANK_IO 0x000100
  22430. +#define IMS332_CTRL_A_BLANK_FUNCTION_SWITCH 0x000200
  22431. +#define IMS332_CTRL_A_FORCE_BLANKING 0x000400
  22432. +#define IMS332_CTRL_A_TURN_OFF_BLANKING 0x000800
  22433. +#define IMS332_CTRL_A_VRAM_ADDRESS_INCREMENT 0x003000
  22434. +#define IMS332_CTRL_A_TURN_OFF_DMA 0x004000
  22435. +#define IMS332_CTRL_A_SYNC_DELAY 0x038000
  22436. +#define IMS332_CTRL_A_PIXEL_PORT_INTERLEAVING 0x040000
  22437. +#define IMS332_CTRL_A_DELAYED_SAMPLING 0x080000
  22438. +#define IMS332_CTRL_A_BITS_PER_PIXEL 0x700000
  22439. +#define IMS332_CTRL_A_CURSOR_DISABLE 0x800000
  22440. + struct _ims332_reg config_control_a;
  22441. + struct _ims332_reg pad3[0x06f - 0x060];
  22442. +
  22443. +#define IMS332_CTRL_B_WRITE_ZERO 0xffffff
  22444. + struct _ims332_reg config_control_b;
  22445. + struct _ims332_reg pad4[0x07f - 0x070];
  22446. + struct _ims332_reg screen_top;
  22447. + struct _ims332_reg pad5[0x0a0 - 0x080];
  22448. + /* cursor color palette, 3 entries, reg no. 0xa1 - 0xa3 */
  22449. + struct _ims332_reg cursor_color_palette0;
  22450. + struct _ims332_reg cursor_color_palette1;
  22451. + struct _ims332_reg cursor_color_palette2;
  22452. + struct _ims332_reg pad6[0x0bf - 0x0a3];
  22453. + struct _ims332_reg rgb_frame_checksum0;
  22454. + struct _ims332_reg rgb_frame_checksum1;
  22455. + struct _ims332_reg rgb_frame_checksum2;
  22456. + struct _ims332_reg pad7[0x0c6 - 0x0c2];
  22457. + struct _ims332_reg cursor_start;
  22458. + struct _ims332_reg pad8[0x0ff - 0x0c7];
  22459. + /* color palette, 256 entries of form 0x00BBGGRR, reg no. 0x100 - 0x1ff */
  22460. + struct _ims332_reg color_palette[0x1ff - 0x0ff];
  22461. + /* hardware cursor bitmap, reg no. 0x200 - 0x3ff */
  22462. + struct _ims332_reg cursor_ram[0x3ff - 0x1ff];
  22463. +};
  22464. +
  22465. +/*
  22466. + * In the functions below we use some weird looking helper variables to
  22467. + * access most members of this struct, otherwise the compiler splits
  22468. + * the read/write in two byte accesses.
  22469. + */
  22470. +struct ims332_regs {
  22471. + struct _ims332_regs rw;
  22472. + char pad0[0x80000 - sizeof (struct _ims332_regs)];
  22473. + struct _ims332_regs r;
  22474. + char pad1[0xa0000 - (sizeof (struct _ims332_regs) + 0x80000)];
  22475. + struct _ims332_regs w;
  22476. +} __attribute__((packed));
  22477. +
  22478. +static inline void ims332_control_reg_bits(struct ims332_regs *regs, u32 mask,
  22479. + u32 val)
  22480. +{
  22481. + volatile u16 *ctr = &(regs->r.config_control_a.r);
  22482. + volatile u16 *ctw = &(regs->w.config_control_a.r);
  22483. + u32 ctrl;
  22484. +
  22485. + mb();
  22486. + ctrl = *ctr;
  22487. + rmb();
  22488. + ctrl |= ((regs->rw.boot.r << 8) & 0x00ff0000);
  22489. + ctrl |= val & mask;
  22490. + ctrl &= ~(~val & mask);
  22491. + wmb();
  22492. + regs->rw.boot.r = (ctrl >> 8) & 0xff00;
  22493. + wmb();
  22494. + *ctw = ctrl & 0xffff;
  22495. +}
  22496. +
  22497. +/* FIXME: This is maxinefb specific. */
  22498. +static inline void ims332_bootstrap(struct ims332_regs *regs)
  22499. +{
  22500. + volatile u16 *ctw = &(regs->w.config_control_a.r);
  22501. + u32 ctrl = IMS332_CTRL_A_BOOT_ENABLE_VTG | IMS332_CTRL_A_TURN_OFF_DMA;
  22502. +
  22503. + /* bootstrap sequence */
  22504. + mb();
  22505. + regs->rw.boot.r = 0;
  22506. + wmb();
  22507. + *ctw = 0;
  22508. +
  22509. + /* init control A register */
  22510. + wmb();
  22511. + regs->rw.boot.r = (ctrl >> 8) & 0xff00;
  22512. + wmb();
  22513. + *ctw = ctrl & 0xffff;
  22514. +}
  22515. +
  22516. +static inline void ims332_blank_screen(struct ims332_regs *regs, int blank)
  22517. +{
  22518. + ims332_control_reg_bits(regs, IMS332_CTRL_A_FORCE_BLANKING,
  22519. + blank ? IMS332_CTRL_A_FORCE_BLANKING : 0);
  22520. +}
  22521. +
  22522. +static inline void ims332_set_color_depth(struct ims332_regs *regs, u32 depth)
  22523. +{
  22524. + u32 dp;
  22525. + u32 mask = (IMS332_CTRL_A_PIXEL_PORT_INTERLEAVING
  22526. + | IMS332_CTRL_A_DELAYED_SAMPLING
  22527. + | IMS332_CTRL_A_BITS_PER_PIXEL);
  22528. +
  22529. + switch (depth) {
  22530. + case 1: dp = 0 << 20; break;
  22531. + case 2: dp = 1 << 20; break;
  22532. + case 4: dp = 2 << 20; break;
  22533. + case 8: dp = 3 << 20; break;
  22534. + case 15: dp = (4 << 20) | IMS332_CTRL_A_PIXEL_PORT_INTERLEAVING; break;
  22535. + case 16: dp = (5 << 20) | IMS332_CTRL_A_PIXEL_PORT_INTERLEAVING; break;
  22536. + default: return;
  22537. + }
  22538. + ims332_control_reg_bits(regs, mask, dp);
  22539. +
  22540. + if (depth <= 8) {
  22541. + volatile u16 *pmask = &(regs->w.pixel_address_mask.r);
  22542. + u32 dm = (1 << depth) - 1;
  22543. +
  22544. + wmb();
  22545. + regs->rw.boot.r = dm << 8;
  22546. + wmb();
  22547. + *pmask = dm << 8 | dm;
  22548. + }
  22549. +}
  22550. +
  22551. +static inline void ims332_set_screen_top(struct ims332_regs *regs, u16 top)
  22552. +{
  22553. + volatile u16 *st = &(regs->w.screen_top.r);
  22554. +
  22555. + mb();
  22556. + *st = top & 0xffff;
  22557. +}
  22558. +
  22559. +static inline void ims332_enable_cursor(struct ims332_regs *regs, int on)
  22560. +{
  22561. + ims332_control_reg_bits(regs, IMS332_CTRL_A_CURSOR_DISABLE,
  22562. + on ? 0 : IMS332_CTRL_A_CURSOR_DISABLE);
  22563. +}
  22564. +
  22565. +static inline void ims332_position_cursor(struct ims332_regs *regs,
  22566. + u16 x, u16 y)
  22567. +{
  22568. + volatile u16 *cp = &(regs->w.cursor_start.r);
  22569. + u32 val = ((x & 0xfff) << 12) | (y & 0xfff);
  22570. +
  22571. + if (x > 2303 || y > 2303)
  22572. + return;
  22573. +
  22574. + mb();
  22575. + regs->rw.boot.r = (val >> 8) & 0xff00;
  22576. + wmb();
  22577. + *cp = val & 0xffff;
  22578. +}
  22579. +
  22580. +static inline void ims332_set_font(struct ims332_regs *regs, u8 fgc,
  22581. + u16 width, u16 height)
  22582. +{
  22583. + volatile u16 *cp0 = &(regs->w.cursor_color_palette0.r);
  22584. + int i;
  22585. +
  22586. + mb();
  22587. + for (i = 0; i < 0x200; i++) {
  22588. + volatile u16 *cram = &(regs->w.cursor_ram[i].r);
  22589. +
  22590. + if (height << 6 <= i << 3)
  22591. + *cram = 0x0000;
  22592. + else if (width <= i % 8 << 3)
  22593. + *cram = 0x0000;
  22594. + else if (((width >> 3) & 0xffff) > i % 8)
  22595. + *cram = 0x5555;
  22596. + else
  22597. + *cram = 0x5555 & ~(0xffff << (width % 8 << 1));
  22598. + wmb();
  22599. + }
  22600. + regs->rw.boot.r = fgc << 8;
  22601. + wmb();
  22602. + *cp0 = fgc << 8 | fgc;
  22603. +}
  22604. +
  22605. +static inline void ims332_read_cmap(struct ims332_regs *regs, u8 reg,
  22606. + u8* red, u8* green, u8* blue)
  22607. +{
  22608. + volatile u16 *rptr = &(regs->r.color_palette[reg].r);
  22609. + u16 val;
  22610. +
  22611. + mb();
  22612. + val = *rptr;
  22613. + *red = val & 0xff;
  22614. + *green = (val >> 8) & 0xff;
  22615. + rmb();
  22616. + *blue = (regs->rw.boot.r >> 8) & 0xff;
  22617. +}
  22618. +
  22619. +static inline void ims332_write_cmap(struct ims332_regs *regs, u8 reg,
  22620. + u8 red, u8 green, u8 blue)
  22621. +{
  22622. + volatile u16 *wptr = &(regs->w.color_palette[reg].r);
  22623. +
  22624. + mb();
  22625. + regs->rw.boot.r = blue << 8;
  22626. + wmb();
  22627. + *wptr = (green << 8) + red;
  22628. +}
  22629. +
  22630. +static inline void ims332_dump_regs(struct ims332_regs *regs)
  22631. +{
  22632. + int i;
  22633. +
  22634. + printk(__FUNCTION__);
  22635. + ims332_control_reg_bits(regs, IMS332_CTRL_A_BOOT_ENABLE_VTG, 0);
  22636. + for (i = 0; i < 0x100; i++) {
  22637. + volatile u16 *cpad = (u16 *)((char *)(&regs->r) + sizeof(struct _ims332_reg) * i);
  22638. + u32 val;
  22639. +
  22640. + val = *cpad;
  22641. + rmb();
  22642. + val |= regs->rw.boot.r << 8;
  22643. + rmb();
  22644. + if (! (i % 8))
  22645. + printk("\n%02x:", i);
  22646. + printk(" %06x", val);
  22647. + }
  22648. + ims332_control_reg_bits(regs, IMS332_CTRL_A_BOOT_ENABLE_VTG,
  22649. + IMS332_CTRL_A_BOOT_ENABLE_VTG);
  22650. + printk("\n");
  22651. +}
  22652. diff -Nur linux-2.4.32-rc1/drivers/video/Makefile linux-2.4.32-rc1.mips/drivers/video/Makefile
  22653. --- linux-2.4.32-rc1/drivers/video/Makefile 2004-02-18 14:36:31.000000000 +0100
  22654. +++ linux-2.4.32-rc1.mips/drivers/video/Makefile 2005-02-11 22:16:44.000000000 +0100
  22655. @@ -87,6 +87,7 @@
  22656. obj-$(CONFIG_FB_MAXINE) += maxinefb.o
  22657. obj-$(CONFIG_FB_TX3912) += tx3912fb.o
  22658. obj-$(CONFIG_FB_AU1100) += au1100fb.o fbgen.o
  22659. +obj-$(CONFIG_FB_AU1200) += au1200fb.o fbgen.o
  22660. obj-$(CONFIG_FB_IT8181) += it8181fb.o fbgen.o
  22661. subdir-$(CONFIG_STI_CONSOLE) += sti
  22662. diff -Nur linux-2.4.32-rc1/drivers/video/maxinefb.h linux-2.4.32-rc1.mips/drivers/video/maxinefb.h
  22663. --- linux-2.4.32-rc1/drivers/video/maxinefb.h 2003-08-25 13:44:42.000000000 +0200
  22664. +++ linux-2.4.32-rc1.mips/drivers/video/maxinefb.h 1970-01-01 01:00:00.000000000 +0100
  22665. @@ -1,38 +0,0 @@
  22666. -/*
  22667. - * linux/drivers/video/maxinefb.h
  22668. - *
  22669. - * DECstation 5000/xx onboard framebuffer support, Copyright (C) 1999 by
  22670. - * Michael Engel <[email protected]> and Karsten Merker <[email protected]>
  22671. - * This file is subject to the terms and conditions of the GNU General
  22672. - * Public License. See the file COPYING in the main directory of this
  22673. - * archive for more details.
  22674. - */
  22675. -
  22676. -#include <asm/addrspace.h>
  22677. -
  22678. -/*
  22679. - * IMS332 video controller register base address
  22680. - */
  22681. -#define MAXINEFB_IMS332_ADDRESS KSEG1ADDR(0x1c140000)
  22682. -
  22683. -/*
  22684. - * Begin of DECstation 5000/xx onboard framebuffer memory, default resolution
  22685. - * is 1024x768x8
  22686. - */
  22687. -#define DS5000_xx_ONBOARD_FBMEM_START KSEG1ADDR(0x0a000000)
  22688. -
  22689. -/*
  22690. - * The IMS 332 video controller used in the DECstation 5000/xx series
  22691. - * uses 32 bits wide registers; the following defines declare the
  22692. - * register numbers, to get the real offset, these have to be multiplied
  22693. - * by four.
  22694. - */
  22695. -
  22696. -#define IMS332_REG_CURSOR_RAM 0x200 /* hardware cursor bitmap */
  22697. -
  22698. -/*
  22699. - * The color palette entries have the form 0x00BBGGRR
  22700. - */
  22701. -#define IMS332_REG_COLOR_PALETTE 0x100 /* color palette, 256 entries */
  22702. -#define IMS332_REG_CURSOR_COLOR_PALETTE 0x0a1 /* cursor color palette, */
  22703. - /* 3 entries */
  22704. diff -Nur linux-2.4.32-rc1/drivers/video/newport_con.c linux-2.4.32-rc1.mips/drivers/video/newport_con.c
  22705. --- linux-2.4.32-rc1/drivers/video/newport_con.c 2003-08-25 13:44:42.000000000 +0200
  22706. +++ linux-2.4.32-rc1.mips/drivers/video/newport_con.c 2004-09-23 15:32:29.000000000 +0200
  22707. @@ -22,6 +22,7 @@
  22708. #include <linux/module.h>
  22709. #include <linux/slab.h>
  22710. +#include <asm/io.h>
  22711. #include <asm/uaccess.h>
  22712. #include <asm/system.h>
  22713. #include <asm/page.h>
  22714. @@ -77,7 +78,7 @@
  22715. static inline void newport_render_background(int xstart, int ystart,
  22716. int xend, int yend, int ci)
  22717. {
  22718. - newport_wait();
  22719. + newport_wait(npregs);
  22720. npregs->set.wrmask = 0xffffffff;
  22721. npregs->set.drawmode0 = (NPORT_DMODE0_DRAW | NPORT_DMODE0_BLOCK |
  22722. NPORT_DMODE0_DOSETUP | NPORT_DMODE0_STOPX
  22723. @@ -94,7 +95,7 @@
  22724. unsigned short i;
  22725. for (i = 0; i < 16; i++) {
  22726. - newport_bfwait();
  22727. + newport_bfwait(npregs);
  22728. newport_cmap_setaddr(npregs, color_table[i]);
  22729. newport_cmap_setrgb(npregs,
  22730. default_red[i],
  22731. @@ -107,7 +108,7 @@
  22732. unsigned long i;
  22733. for (i = 0; i < LINUX_LOGO_COLORS; i++) {
  22734. - newport_bfwait();
  22735. + newport_bfwait(npregs);
  22736. newport_cmap_setaddr(npregs, i + 0x20);
  22737. newport_cmap_setrgb(npregs,
  22738. linux_logo_red[i],
  22739. @@ -115,13 +116,13 @@
  22740. linux_logo_blue[i]);
  22741. }
  22742. - newport_wait();
  22743. + newport_wait(npregs);
  22744. npregs->set.drawmode0 = (NPORT_DMODE0_DRAW | NPORT_DMODE0_BLOCK |
  22745. NPORT_DMODE0_CHOST);
  22746. npregs->set.xystarti = ((newport_xsize - LOGO_W) << 16) | (0);
  22747. npregs->set.xyendi = ((newport_xsize - 1) << 16);
  22748. - newport_wait();
  22749. + newport_wait(npregs);
  22750. for (i = 0; i < LOGO_W * LOGO_H; i++)
  22751. npregs->go.hostrw0 = linux_logo[i] << 24;
  22752. @@ -133,7 +134,7 @@
  22753. if (logo_active)
  22754. return;
  22755. - newport_wait();
  22756. + newport_wait(npregs);
  22757. npregs->set.wrmask = 0xffffffff;
  22758. npregs->set.drawmode0 = (NPORT_DMODE0_DRAW | NPORT_DMODE0_BLOCK |
  22759. NPORT_DMODE0_DOSETUP | NPORT_DMODE0_STOPX
  22760. @@ -155,7 +156,7 @@
  22761. unsigned short treg;
  22762. int i;
  22763. - newport_wait();
  22764. + newport_wait(npregs);
  22765. treg = newport_vc2_get(npregs, VC2_IREG_CONTROL);
  22766. newport_vc2_set(npregs, VC2_IREG_CONTROL,
  22767. (treg | VC2_CTRL_EVIDEO));
  22768. @@ -165,7 +166,7 @@
  22769. npregs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_RAM |
  22770. NPORT_DMODE_W2 | VC2_PROTOCOL);
  22771. for (i = 0; i < 128; i++) {
  22772. - newport_bfwait();
  22773. + newport_bfwait(npregs);
  22774. if (i == 92 || i == 94)
  22775. npregs->set.dcbdata0.byshort.s1 = 0xff00;
  22776. else
  22777. @@ -205,7 +206,7 @@
  22778. npregs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_RAM |
  22779. NPORT_DMODE_W2 | VC2_PROTOCOL);
  22780. for (i = 0; i < 128; i++) {
  22781. - newport_bfwait();
  22782. + newport_bfwait(npregs);
  22783. linetable[i] = npregs->set.dcbdata0.byshort.s1;
  22784. }
  22785. @@ -216,12 +217,12 @@
  22786. npregs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_RAM |
  22787. NPORT_DMODE_W2 | VC2_PROTOCOL);
  22788. do {
  22789. - newport_bfwait();
  22790. + newport_bfwait(npregs);
  22791. treg = npregs->set.dcbdata0.byshort.s1;
  22792. if ((treg & 1) == 0)
  22793. cols += (treg >> 7) & 0xfe;
  22794. if ((treg & 0x80) == 0) {
  22795. - newport_bfwait();
  22796. + newport_bfwait(npregs);
  22797. treg = npregs->set.dcbdata0.byshort.s1;
  22798. }
  22799. } while ((treg & 0x8000) == 0);
  22800. @@ -291,16 +292,16 @@
  22801. if (!sgi_gfxaddr)
  22802. return NULL;
  22803. - npregs = (struct newport_regs *) (KSEG1 + sgi_gfxaddr);
  22804. + npregs = (struct newport_regs *) /* ioremap cannot fail */
  22805. + ioremap(sgi_gfxaddr, sizeof(struct newport_regs));
  22806. npregs->cset.config = NPORT_CFG_GD0;
  22807. - if (newport_wait()) {
  22808. - return NULL;
  22809. - }
  22810. + if (newport_wait(npregs))
  22811. + goto out_unmap;
  22812. npregs->set.xstarti = TESTVAL;
  22813. if (npregs->set._xstart.word != XSTI_TO_FXSTART(TESTVAL))
  22814. - return NULL;
  22815. + goto out_unmap;
  22816. for (i = 0; i < MAX_NR_CONSOLES; i++)
  22817. font_data[i] = FONT_DATA;
  22818. @@ -310,6 +311,10 @@
  22819. newport_get_screensize();
  22820. return "SGI Newport";
  22821. +
  22822. +out_unmap:
  22823. + iounmap((void *)npregs);
  22824. + return NULL;
  22825. }
  22826. static void newport_init(struct vc_data *vc, int init)
  22827. @@ -363,7 +368,7 @@
  22828. (charattr & 0xf0) >> 4);
  22829. /* Set the color and drawing mode. */
  22830. - newport_wait();
  22831. + newport_wait(npregs);
  22832. npregs->set.colori = charattr & 0xf;
  22833. npregs->set.drawmode0 = (NPORT_DMODE0_DRAW | NPORT_DMODE0_BLOCK |
  22834. NPORT_DMODE0_STOPX | NPORT_DMODE0_ZPENAB |
  22835. @@ -372,7 +377,7 @@
  22836. /* Set coordinates for bitmap operation. */
  22837. npregs->set.xystarti = (xpos << 16) | ((ypos + topscan) & 0x3ff);
  22838. npregs->set.xyendi = ((xpos + 7) << 16);
  22839. - newport_wait();
  22840. + newport_wait(npregs);
  22841. /* Go, baby, go... */
  22842. RENDER(npregs, p);
  22843. @@ -396,7 +401,7 @@
  22844. xpos + ((count - 1) << 3), ypos,
  22845. (charattr & 0xf0) >> 4);
  22846. - newport_wait();
  22847. + newport_wait(npregs);
  22848. /* Set the color and drawing mode. */
  22849. npregs->set.colori = charattr & 0xf;
  22850. @@ -407,7 +412,7 @@
  22851. for (i = 0; i < count; i++, xpos += 8) {
  22852. p = &font_data[vc->vc_num][(scr_readw(s++) & 0xff) << 4];
  22853. - newport_wait();
  22854. + newport_wait(npregs);
  22855. /* Set coordinates for bitmap operation. */
  22856. npregs->set.xystarti =
  22857. @@ -689,7 +694,7 @@
  22858. xe = xs;
  22859. xs = tmp;
  22860. }
  22861. - newport_wait();
  22862. + newport_wait(npregs);
  22863. npregs->set.drawmode0 = (NPORT_DMODE0_S2S | NPORT_DMODE0_BLOCK |
  22864. NPORT_DMODE0_DOSETUP | NPORT_DMODE0_STOPX
  22865. | NPORT_DMODE0_STOPY);
  22866. @@ -706,35 +711,35 @@
  22867. #define DUMMY (void *) newport_dummy
  22868. const struct consw newport_con = {
  22869. - con_startup: newport_startup,
  22870. - con_init: newport_init,
  22871. - con_deinit: newport_deinit,
  22872. - con_clear: newport_clear,
  22873. - con_putc: newport_putc,
  22874. - con_putcs: newport_putcs,
  22875. - con_cursor: newport_cursor,
  22876. - con_scroll: newport_scroll,
  22877. - con_bmove: newport_bmove,
  22878. - con_switch: newport_switch,
  22879. - con_blank: newport_blank,
  22880. - con_font_op: newport_font_op,
  22881. - con_set_palette: newport_set_palette,
  22882. - con_scrolldelta: newport_scrolldelta,
  22883. - con_set_origin: DUMMY,
  22884. - con_save_screen: DUMMY
  22885. + .con_startup = newport_startup,
  22886. + .con_init = newport_init,
  22887. + .con_deinit = newport_deinit,
  22888. + .con_clear = newport_clear,
  22889. + .con_putc = newport_putc,
  22890. + .con_putcs = newport_putcs,
  22891. + .con_cursor = newport_cursor,
  22892. + .con_scroll = newport_scroll,
  22893. + .con_bmove = newport_bmove,
  22894. + .con_switch = newport_switch,
  22895. + .con_blank = newport_blank,
  22896. + .con_font_op = newport_font_op,
  22897. + .con_set_palette = newport_set_palette,
  22898. + .con_scrolldelta = newport_scrolldelta,
  22899. + .con_set_origin = DUMMY,
  22900. + .con_save_screen = DUMMY
  22901. };
  22902. #ifdef MODULE
  22903. static int __init newport_console_init(void)
  22904. {
  22905. take_over_console(&newport_con, 0, MAX_NR_CONSOLES - 1, 1);
  22906. -
  22907. return 0;
  22908. }
  22909. static void __exit newport_console_exit(void)
  22910. {
  22911. give_up_console(&newport_con);
  22912. + iounmap((void *)npregs);
  22913. }
  22914. module_init(newport_console_init);
  22915. diff -Nur linux-2.4.32-rc1/drivers/video/tgafb.c linux-2.4.32-rc1.mips/drivers/video/tgafb.c
  22916. --- linux-2.4.32-rc1/drivers/video/tgafb.c 2001-11-14 23:52:20.000000000 +0100
  22917. +++ linux-2.4.32-rc1.mips/drivers/video/tgafb.c 2004-10-30 01:15:02.000000000 +0200
  22918. @@ -45,6 +45,15 @@
  22919. #include <linux/console.h>
  22920. #include <asm/io.h>
  22921. +#ifdef CONFIG_TC
  22922. +#include <asm/dec/tc.h>
  22923. +#else
  22924. +static int search_tc_card(const char *) { return -1; }
  22925. +static void claim_tc_card(int) { }
  22926. +static void release_tc_card(int) { }
  22927. +static unsigned long get_tc_base_addr(int) { return 0; }
  22928. +#endif
  22929. +
  22930. #include <video/fbcon.h>
  22931. #include <video/fbcon-cfb8.h>
  22932. #include <video/fbcon-cfb32.h>
  22933. @@ -84,10 +93,10 @@
  22934. };
  22935. static unsigned int deep_presets[4] = {
  22936. - 0x00014000,
  22937. - 0x0001440d,
  22938. + 0x00004000,
  22939. + 0x0000440d,
  22940. 0xffffffff,
  22941. - 0x0001441d
  22942. + 0x0000441d
  22943. };
  22944. static unsigned int rasterop_presets[4] = {
  22945. @@ -131,6 +140,13 @@
  22946. 0,
  22947. FB_VMODE_NONINTERLACED
  22948. }},
  22949. + { "1280x1024-72", { /* mode #0 of PMAGD boards */
  22950. + 1280, 1024, 1280, 1024, 0, 0, 0, 0,
  22951. + {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
  22952. + 0, 0, -1, -1, FB_ACCELF_TEXT, 7692, 232, 32, 34, 3, 160, 3,
  22953. + FB_SYNC_ON_GREEN,
  22954. + FB_VMODE_NONINTERLACED
  22955. + }},
  22956. { "800x600-56", {
  22957. 800, 600, 800, 600, 0, 0, 0, 0,
  22958. {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
  22959. @@ -488,7 +504,8 @@
  22960. continue;
  22961. mb();
  22962. - TGA_WRITE_REG(deep_presets[fb_info.tga_type], TGA_DEEP_REG);
  22963. + TGA_WRITE_REG(deep_presets[fb_info.tga_type] |
  22964. + (par->sync_on_green ? 0x0 : 0x00010000), TGA_DEEP_REG);
  22965. while (TGA_READ_REG(TGA_CMD_STAT_REG) & 1) /* wait for not busy */
  22966. continue;
  22967. mb();
  22968. @@ -548,7 +565,7 @@
  22969. BT463_WRITE(BT463_REG_ACC, BT463_CMD_REG_0, 0x40);
  22970. BT463_WRITE(BT463_REG_ACC, BT463_CMD_REG_1, 0x08);
  22971. BT463_WRITE(BT463_REG_ACC, BT463_CMD_REG_2,
  22972. - (par->sync_on_green ? 0x80 : 0x40));
  22973. + (par->sync_on_green ? 0xc0 : 0x40));
  22974. BT463_WRITE(BT463_REG_ACC, BT463_READ_MASK_0, 0xff);
  22975. BT463_WRITE(BT463_REG_ACC, BT463_READ_MASK_1, 0xff);
  22976. @@ -921,19 +938,34 @@
  22977. int __init tgafb_init(void)
  22978. {
  22979. struct pci_dev *pdev;
  22980. + int slot;
  22981. pdev = pci_find_device(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TGA, NULL);
  22982. if (!pdev)
  22983. + slot = search_tc_card("PMAGD");
  22984. + if (!pdev && slot < 0)
  22985. return -ENXIO;
  22986. /* divine board type */
  22987. - fb_info.tga_mem_base = (unsigned long)ioremap(pdev->resource[0].start, 0);
  22988. - fb_info.tga_type = (readl(fb_info.tga_mem_base) >> 12) & 0x0f;
  22989. - fb_info.tga_regs_base = fb_info.tga_mem_base + TGA_REGS_OFFSET;
  22990. - fb_info.tga_fb_base = (fb_info.tga_mem_base
  22991. + if (pdev) {
  22992. + fb_info.tga_mem_base = (unsigned long)ioremap(pdev->resource[0].start,
  22993. + 0);
  22994. + fb_info.tga_type = (readl(fb_info.tga_mem_base) >> 12) & 0x0f;
  22995. + fb_info.tga_regs_base = fb_info.tga_mem_base + TGA_REGS_OFFSET;
  22996. + fb_info.tga_fb_base = (fb_info.tga_mem_base
  22997. + fb_offset_presets[fb_info.tga_type]);
  22998. - pci_read_config_byte(pdev, PCI_REVISION_ID, &fb_info.tga_chip_rev);
  22999. + pci_read_config_byte(pdev, PCI_REVISION_ID, &fb_info.tga_chip_rev);
  23000. +
  23001. + } else {
  23002. + claim_tc_card(slot);
  23003. + fb_info.tga_mem_base = get_tc_base_addr(slot);
  23004. + fb_info.tga_type = (readl(fb_info.tga_mem_base) >> 12) & 0x0f; /* ? */
  23005. + fb_info.tga_regs_base = fb_info.tga_mem_base + TGA_REGS_OFFSET;
  23006. + fb_info.tga_fb_base = (fb_info.tga_mem_base
  23007. + + fb_offset_presets[fb_info.tga_type]);
  23008. + fb_info.tga_chip_rev = TGA_READ_REG(TGA_START_REG) & 0xff;
  23009. + }
  23010. /* setup framebuffer */
  23011. @@ -950,40 +982,62 @@
  23012. fb_info.gen.fbhw = &tgafb_hwswitch;
  23013. fb_info.gen.fbhw->detect();
  23014. - printk (KERN_INFO "tgafb: DC21030 [TGA] detected, rev=0x%02x\n", fb_info.tga_chip_rev);
  23015. - printk (KERN_INFO "tgafb: at PCI bus %d, device %d, function %d\n",
  23016. - pdev->bus->number, PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn));
  23017. + if (pdev) {
  23018. + printk (KERN_INFO "tgafb: DC21030 [TGA] detected, rev=0x%02x\n",
  23019. + fb_info.tga_chip_rev);
  23020. + printk (KERN_INFO "tgafb: at PCI bus %d, device %d, function %d\n",
  23021. + pdev->bus->number,
  23022. + PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn));
  23023. + } else {
  23024. + printk (KERN_INFO "tgafb: SFB+ detected, rev=0x%02x\n",
  23025. + fb_info.tga_chip_rev);
  23026. + }
  23027. switch (fb_info.tga_type)
  23028. {
  23029. case TGA_TYPE_8PLANE:
  23030. - strcpy (fb_info.gen.info.modename,"Digital ZLXp-E1");
  23031. + if (pdev)
  23032. + strcpy (fb_info.gen.info.modename,"Digital ZLXp-E1");
  23033. + else
  23034. + strcpy (fb_info.gen.info.modename,"Digital ZLX-E1");
  23035. break;
  23036. case TGA_TYPE_24PLANE:
  23037. - strcpy (fb_info.gen.info.modename,"Digital ZLXp-E2");
  23038. + if (pdev)
  23039. + strcpy (fb_info.gen.info.modename,"Digital ZLXp-E2");
  23040. + else
  23041. + strcpy (fb_info.gen.info.modename,"Digital ZLX-E2");
  23042. break;
  23043. case TGA_TYPE_24PLUSZ:
  23044. - strcpy (fb_info.gen.info.modename,"Digital ZLXp-E3");
  23045. + if (pdev)
  23046. + strcpy (fb_info.gen.info.modename,"Digital ZLXp-E3");
  23047. + else
  23048. + strcpy (fb_info.gen.info.modename,"Digital ZLX-E3");
  23049. break;
  23050. }
  23051. /* This should give a reasonable default video mode */
  23052. if (!default_var_valid) {
  23053. - default_var = tgafb_predefined[0].var;
  23054. + if (pdev)
  23055. + default_var = tgafb_predefined[0].var;
  23056. + else
  23057. + default_var = tgafb_predefined[1].var;
  23058. }
  23059. fbgen_get_var(&disp.var, -1, &fb_info.gen.info);
  23060. disp.var.activate = FB_ACTIVATE_NOW;
  23061. fbgen_do_set_var(&disp.var, 1, &fb_info.gen);
  23062. fbgen_set_disp(-1, &fb_info.gen);
  23063. fbgen_install_cmap(0, &fb_info.gen);
  23064. - if (register_framebuffer(&fb_info.gen.info) < 0)
  23065. + if (register_framebuffer(&fb_info.gen.info) < 0) {
  23066. + if (slot >= 0)
  23067. + release_tc_card(slot);
  23068. return -EINVAL;
  23069. - printk(KERN_INFO "fb%d: %s frame buffer device at 0x%lx\n",
  23070. + }
  23071. + printk(KERN_INFO "fb%d: %s frame buffer device at 0x%llx\n",
  23072. GET_FB_IDX(fb_info.gen.info.node), fb_info.gen.info.modename,
  23073. - pdev->resource[0].start);
  23074. + fb_info.tga_mem_base);
  23075. return 0;
  23076. }
  23077. diff -Nur linux-2.4.32-rc1/drivers/video/tgafb.h linux-2.4.32-rc1.mips/drivers/video/tgafb.h
  23078. --- linux-2.4.32-rc1/drivers/video/tgafb.h 2000-04-12 18:47:28.000000000 +0200
  23079. +++ linux-2.4.32-rc1.mips/drivers/video/tgafb.h 2004-10-30 01:15:02.000000000 +0200
  23080. @@ -36,6 +36,7 @@
  23081. #define TGA_RASTEROP_REG 0x0034
  23082. #define TGA_PIXELSHIFT_REG 0x0038
  23083. #define TGA_DEEP_REG 0x0050
  23084. +#define TGA_START_REG 0x0054
  23085. #define TGA_PIXELMASK_REG 0x005c
  23086. #define TGA_CURSOR_BASE_REG 0x0060
  23087. #define TGA_HORIZ_REG 0x0064
  23088. diff -Nur linux-2.4.32-rc1/fs/binfmt_elf.c linux-2.4.32-rc1.mips/fs/binfmt_elf.c
  23089. --- linux-2.4.32-rc1/fs/binfmt_elf.c 2005-06-01 02:56:56.000000000 +0200
  23090. +++ linux-2.4.32-rc1.mips/fs/binfmt_elf.c 2005-05-23 14:12:31.000000000 +0200
  23091. @@ -660,6 +660,9 @@
  23092. bprm->argc++;
  23093. }
  23094. }
  23095. + } else {
  23096. + /* Executables without an interpreter also need a personality */
  23097. + SET_PERSONALITY(elf_ex, ibcs2_interpreter);
  23098. }
  23099. /* Flush all traces of the currently running executable */
  23100. @@ -1211,7 +1214,11 @@
  23101. elf.e_entry = 0;
  23102. elf.e_phoff = sizeof(elf);
  23103. elf.e_shoff = 0;
  23104. +#ifdef ELF_CORE_EFLAGS
  23105. + elf.e_flags = ELF_CORE_EFLAGS;
  23106. +#else
  23107. elf.e_flags = 0;
  23108. +#endif
  23109. elf.e_ehsize = sizeof(elf);
  23110. elf.e_phentsize = sizeof(struct elf_phdr);
  23111. elf.e_phnum = segs+1; /* Include notes */
  23112. diff -Nur linux-2.4.32-rc1/fs/partitions/sgi.c linux-2.4.32-rc1.mips/fs/partitions/sgi.c
  23113. --- linux-2.4.32-rc1/fs/partitions/sgi.c 2001-10-02 05:03:26.000000000 +0200
  23114. +++ linux-2.4.32-rc1.mips/fs/partitions/sgi.c 2004-08-11 22:30:07.000000000 +0200
  23115. @@ -17,6 +17,11 @@
  23116. #include "check.h"
  23117. #include "sgi.h"
  23118. +#if CONFIG_BLK_DEV_MD
  23119. +extern void md_autodetect_dev(kdev_t dev);
  23120. +#endif
  23121. +
  23122. +
  23123. int sgi_partition(struct gendisk *hd, struct block_device *bdev, unsigned long first_sector, int current_minor)
  23124. {
  23125. int i, csum, magic;
  23126. @@ -77,6 +82,10 @@
  23127. if(!blocks)
  23128. continue;
  23129. add_gd_partition(hd, current_minor, start, blocks);
  23130. +#ifdef CONFIG_BLK_DEV_MD
  23131. + if (be32_to_cpu(p->type) == LINUX_RAID_PARTITION)
  23132. + md_autodetect_dev(MKDEV(hd->major, current_minor));
  23133. +#endif
  23134. current_minor++;
  23135. }
  23136. printk("\n");
  23137. diff -Nur linux-2.4.32-rc1/fs/proc/array.c linux-2.4.32-rc1.mips/fs/proc/array.c
  23138. --- linux-2.4.32-rc1/fs/proc/array.c 2005-01-19 15:10:11.000000000 +0100
  23139. +++ linux-2.4.32-rc1.mips/fs/proc/array.c 2004-11-29 18:47:18.000000000 +0100
  23140. @@ -368,15 +368,15 @@
  23141. task->cmin_flt,
  23142. task->maj_flt,
  23143. task->cmaj_flt,
  23144. - task->times.tms_utime,
  23145. - task->times.tms_stime,
  23146. - task->times.tms_cutime,
  23147. - task->times.tms_cstime,
  23148. + hz_to_std(task->times.tms_utime),
  23149. + hz_to_std(task->times.tms_stime),
  23150. + hz_to_std(task->times.tms_cutime),
  23151. + hz_to_std(task->times.tms_cstime),
  23152. priority,
  23153. nice,
  23154. 0UL /* removed */,
  23155. task->it_real_value,
  23156. - task->start_time,
  23157. + hz_to_std(task->start_time),
  23158. vsize,
  23159. mm ? mm->rss : 0, /* you might want to shift this left 3 */
  23160. task->rlim[RLIMIT_RSS].rlim_cur,
  23161. @@ -615,14 +615,14 @@
  23162. len = sprintf(buffer,
  23163. "cpu %lu %lu\n",
  23164. - task->times.tms_utime,
  23165. - task->times.tms_stime);
  23166. + hz_to_std(task->times.tms_utime),
  23167. + hz_to_std(task->times.tms_stime));
  23168. for (i = 0 ; i < smp_num_cpus; i++)
  23169. len += sprintf(buffer + len, "cpu%d %lu %lu\n",
  23170. i,
  23171. - task->per_cpu_utime[cpu_logical_map(i)],
  23172. - task->per_cpu_stime[cpu_logical_map(i)]);
  23173. + hz_to_std(task->per_cpu_utime[cpu_logical_map(i)]),
  23174. + hz_to_std(task->per_cpu_stime[cpu_logical_map(i)]));
  23175. return len;
  23176. }
  23177. diff -Nur linux-2.4.32-rc1/fs/proc/proc_misc.c linux-2.4.32-rc1.mips/fs/proc/proc_misc.c
  23178. --- linux-2.4.32-rc1/fs/proc/proc_misc.c 2004-08-08 01:26:06.000000000 +0200
  23179. +++ linux-2.4.32-rc1.mips/fs/proc/proc_misc.c 2004-08-14 20:39:01.000000000 +0200
  23180. @@ -308,16 +308,16 @@
  23181. {
  23182. int i, len = 0;
  23183. extern unsigned long total_forks;
  23184. - unsigned long jif = jiffies;
  23185. + unsigned long jif = hz_to_std(jiffies);
  23186. unsigned int sum = 0, user = 0, nice = 0, system = 0;
  23187. int major, disk;
  23188. for (i = 0 ; i < smp_num_cpus; i++) {
  23189. int cpu = cpu_logical_map(i), j;
  23190. - user += kstat.per_cpu_user[cpu];
  23191. - nice += kstat.per_cpu_nice[cpu];
  23192. - system += kstat.per_cpu_system[cpu];
  23193. + user += hz_to_std(kstat.per_cpu_user[cpu]);
  23194. + nice += hz_to_std(kstat.per_cpu_nice[cpu]);
  23195. + system += hz_to_std(kstat.per_cpu_system[cpu]);
  23196. #if !defined(CONFIG_ARCH_S390)
  23197. for (j = 0 ; j < NR_IRQS ; j++)
  23198. sum += kstat.irqs[cpu][j];
  23199. @@ -331,10 +331,10 @@
  23200. proc_sprintf(page, &off, &len,
  23201. "cpu%d %u %u %u %lu\n",
  23202. i,
  23203. - kstat.per_cpu_user[cpu_logical_map(i)],
  23204. - kstat.per_cpu_nice[cpu_logical_map(i)],
  23205. - kstat.per_cpu_system[cpu_logical_map(i)],
  23206. - jif - ( kstat.per_cpu_user[cpu_logical_map(i)] \
  23207. + hz_to_std(kstat.per_cpu_user[cpu_logical_map(i)]),
  23208. + hz_to_std(kstat.per_cpu_nice[cpu_logical_map(i)]),
  23209. + hz_to_std(kstat.per_cpu_system[cpu_logical_map(i)]),
  23210. + jif - hz_to_std( kstat.per_cpu_user[cpu_logical_map(i)] \
  23211. + kstat.per_cpu_nice[cpu_logical_map(i)] \
  23212. + kstat.per_cpu_system[cpu_logical_map(i)]));
  23213. proc_sprintf(page, &off, &len,
  23214. diff -Nur linux-2.4.32-rc1/include/asm-alpha/param.h linux-2.4.32-rc1.mips/include/asm-alpha/param.h
  23215. --- linux-2.4.32-rc1/include/asm-alpha/param.h 2000-11-08 08:37:31.000000000 +0100
  23216. +++ linux-2.4.32-rc1.mips/include/asm-alpha/param.h 2000-11-28 04:59:03.000000000 +0100
  23217. @@ -13,6 +13,9 @@
  23218. # else
  23219. # define HZ 1200
  23220. # endif
  23221. +#ifdef __KERNEL__
  23222. +# define hz_to_std(a) (a)
  23223. +#endif
  23224. #endif
  23225. #define EXEC_PAGESIZE 8192
  23226. diff -Nur linux-2.4.32-rc1/include/asm-i386/param.h linux-2.4.32-rc1.mips/include/asm-i386/param.h
  23227. --- linux-2.4.32-rc1/include/asm-i386/param.h 2000-10-27 20:04:43.000000000 +0200
  23228. +++ linux-2.4.32-rc1.mips/include/asm-i386/param.h 2000-11-23 03:00:55.000000000 +0100
  23229. @@ -3,6 +3,9 @@
  23230. #ifndef HZ
  23231. #define HZ 100
  23232. +#ifdef __KERNEL__
  23233. +#define hz_to_std(a) (a)
  23234. +#endif
  23235. #endif
  23236. #define EXEC_PAGESIZE 4096
  23237. diff -Nur linux-2.4.32-rc1/include/asm-ia64/param.h linux-2.4.32-rc1.mips/include/asm-ia64/param.h
  23238. --- linux-2.4.32-rc1/include/asm-ia64/param.h 2004-04-14 15:05:40.000000000 +0200
  23239. +++ linux-2.4.32-rc1.mips/include/asm-ia64/param.h 2004-04-16 05:14:20.000000000 +0200
  23240. @@ -7,9 +7,15 @@
  23241. * Based on <asm-i386/param.h>.
  23242. *
  23243. * Modified 1998, 1999, 2002-2003
  23244. - * David Mosberger-Tang <[email protected]>, Hewlett-Packard Co
  23245. + * David Mosberger-Tang <[email protected]>, Hewlett-Packard Co
  23246. */
  23247. +#include <linux/config.h>
  23248. +
  23249. +#ifdef __KERNEL__
  23250. +#define hz_to_std(a) (a)
  23251. +#endif
  23252. +
  23253. #define EXEC_PAGESIZE 65536
  23254. #ifndef NGROUPS
  23255. diff -Nur linux-2.4.32-rc1/include/asm-m68k/param.h linux-2.4.32-rc1.mips/include/asm-m68k/param.h
  23256. --- linux-2.4.32-rc1/include/asm-m68k/param.h 2001-01-04 22:00:55.000000000 +0100
  23257. +++ linux-2.4.32-rc1.mips/include/asm-m68k/param.h 2001-01-11 05:02:45.000000000 +0100
  23258. @@ -3,6 +3,9 @@
  23259. #ifndef HZ
  23260. #define HZ 100
  23261. +#ifdef __KERNEL__
  23262. +#define hz_to_std(a) (a)
  23263. +#endif
  23264. #endif
  23265. #define EXEC_PAGESIZE 8192
  23266. diff -Nur linux-2.4.32-rc1/include/asm-mips/au1000_gpio.h linux-2.4.32-rc1.mips/include/asm-mips/au1000_gpio.h
  23267. --- linux-2.4.32-rc1/include/asm-mips/au1000_gpio.h 2002-11-29 00:53:15.000000000 +0100
  23268. +++ linux-2.4.32-rc1.mips/include/asm-mips/au1000_gpio.h 2005-01-30 09:01:28.000000000 +0100
  23269. @@ -30,6 +30,13 @@
  23270. * 675 Mass Ave, Cambridge, MA 02139, USA.
  23271. */
  23272. +/*
  23273. + * Revision history
  23274. + * 01/31/02 0.01 Initial release. Steve Longerbeam, MontaVista
  23275. + * 10/12/03 0.1 Added Au1100/Au1500, GPIO2, and bit operations. K.C. Nishio, AMD
  23276. + * 08/05/04 0.11 Added Au1550 and Au1200. K.C. Nishio
  23277. + */
  23278. +
  23279. #ifndef __AU1000_GPIO_H
  23280. #define __AU1000_GPIO_H
  23281. @@ -44,13 +51,94 @@
  23282. #define AU1000GPIO_TRISTATE _IOW (AU1000GPIO_IOC_MAGIC, 4, int)
  23283. #define AU1000GPIO_AVAIL_MASK _IOR (AU1000GPIO_IOC_MAGIC, 5, int)
  23284. +// bit operations
  23285. +#define AU1000GPIO_BIT_READ _IOW (AU1000GPIO_IOC_MAGIC, 6, int)
  23286. +#define AU1000GPIO_BIT_SET _IOW (AU1000GPIO_IOC_MAGIC, 7, int)
  23287. +#define AU1000GPIO_BIT_CLEAR _IOW (AU1000GPIO_IOC_MAGIC, 8, int)
  23288. +#define AU1000GPIO_BIT_TRISTATE _IOW (AU1000GPIO_IOC_MAGIC, 9, int)
  23289. +#define AU1000GPIO_BIT_INIT _IOW (AU1000GPIO_IOC_MAGIC, 10, int)
  23290. +#define AU1000GPIO_BIT_TERM _IOW (AU1000GPIO_IOC_MAGIC, 11, int)
  23291. +
  23292. +/* set this major numer same as the CRIS GPIO driver */
  23293. +#define AU1X00_GPIO_MAJOR (120)
  23294. +
  23295. +#define ENABLED_ZERO (0)
  23296. +#define ENABLED_ONE (1)
  23297. +#define ENABLED_10 (0x2)
  23298. +#define ENABLED_11 (0x3)
  23299. +#define ENABLED_111 (0x7)
  23300. +#define NOT_AVAIL (-1)
  23301. +#define AU1X00_MAX_PRIMARY_GPIO (32)
  23302. +
  23303. +#define AU1000_GPIO_MINOR_MAX AU1X00_MAX_PRIMARY_GPIO
  23304. +/* Au1100, 1500, 1550 and 1200 have the secondary GPIO block */
  23305. +#define AU1XX0_GPIO_MINOR_MAX (48)
  23306. +
  23307. +#define AU1X00_GPIO_NAME "gpio"
  23308. +
  23309. +/* GPIO pins which are not multiplexed */
  23310. +#if defined(CONFIG_SOC_AU1000)
  23311. + #define NATIVE_GPIOPIN ((1 << 15) | (1 << 8) | (1 << 7) | (1 << 1) | (1 << 0))
  23312. + #define NATIVE_GPIO2PIN (0)
  23313. +#elif defined(CONFIG_SOC_AU1100)
  23314. + #define NATIVE_GPIOPIN ((1 << 23) | (1 << 22) | (1 << 21) | (1 << 20) | (1 << 19) | (1 << 18) | \
  23315. + (1 << 17) | (1 << 16) | (1 << 7) | (1 << 1) | (1 << 0))
  23316. + #define NATIVE_GPIO2PIN (0)
  23317. +#elif defined(CONFIG_SOC_AU1500)
  23318. + #define NATIVE_GPIOPIN ((1 << 15) | (1 << 8) | (1 << 7) | (1 << 1) | (1 << 0))
  23319. + /* exclude the PCI reset output signal: GPIO[200], DMA_REQ2 and DMA_REQ3 */
  23320. + #define NATIVE_GPIO2PIN (0xfffe & ~((1 << 9) | (1 << 8)))
  23321. +#elif defined(CONFIG_SOC_AU1550)
  23322. + #define NATIVE_GPIOPIN ((1 << 15) | (1 << 8) | (1 << 7) | (1 << 6) | (1 << 1) | (1 << 0))
  23323. + /* please refere Au1550 Data Book, chapter 15 */
  23324. + #define NATIVE_GPIO2PIN (1 << 5)
  23325. +#elif defined(CONFIG_SOC_AU1200)
  23326. + #define NATIVE_GPIOPIN ((1 << 7) | (1 << 5))
  23327. + #define NATIVE_GPIO2PIN (0)
  23328. +#endif
  23329. +
  23330. +/* minor as u32 */
  23331. +#define MINOR_TO_GPIOPIN(minor) ((minor < AU1X00_MAX_PRIMARY_GPIO) ? minor : (minor - AU1X00_MAX_PRIMARY_GPIO))
  23332. +#define IS_PRIMARY_GPIOPIN(minor) ((minor < AU1X00_MAX_PRIMARY_GPIO) ? 1 : 0)
  23333. +
  23334. +/*
  23335. + * pin to minor mapping.
  23336. + * GPIO0-GPIO31, minor=0-31.
  23337. + * GPIO200-GPIO215, minor=32-47.
  23338. + */
  23339. +typedef struct _au1x00_gpio_bit_ctl {
  23340. + int direction; // The direction of this GPIO pin. 0: IN, 1: OUT.
  23341. + int data; // Pin output when itized (0/1), or at the term. 0/1/-1 (tristate).
  23342. +} au1x00_gpio_bit_ctl;
  23343. +
  23344. +typedef struct _au1x00_gpio_driver {
  23345. + const char *driver_name;
  23346. + const char *name;
  23347. + int name_base; /* offset of printed name */
  23348. + short major; /* major device number */
  23349. + short minor_start; /* start of minor device number*/
  23350. + short num; /* number of devices */
  23351. +} au1x00_gpio_driver;
  23352. +
  23353. #ifdef __KERNEL__
  23354. -extern u32 get_au1000_avail_gpio_mask(void);
  23355. -extern int au1000gpio_tristate(u32 data);
  23356. -extern int au1000gpio_in(u32 *data);
  23357. -extern int au1000gpio_set(u32 data);
  23358. -extern int au1000gpio_clear(u32 data);
  23359. -extern int au1000gpio_out(u32 data);
  23360. +extern u32 get_au1000_avail_gpio_mask(u32 *avail_gpio2);
  23361. +extern int au1000gpio_tristate(u32 minor, u32 data);
  23362. +extern int au1000gpio_in(u32 minor, u32 *data);
  23363. +extern int au1000gpio_set(u32 minor, u32 data);
  23364. +extern int au1000gpio_clear(u32 minor, u32 data);
  23365. +extern int au1000gpio_out(u32 minor, u32 data);
  23366. +extern int au1000gpio_bit_read(u32 minor, u32 *read_data);
  23367. +extern int au1000gpio_bit_set(u32 minor);
  23368. +extern int au1000gpio_bit_clear(u32 minor);
  23369. +extern int au1000gpio_bit_tristate(u32 minor);
  23370. +extern int check_minor_to_gpio(u32 minor);
  23371. +extern int au1000gpio_bit_init(u32 minor, au1x00_gpio_bit_ctl *bit_opt);
  23372. +extern int au1000gpio_bit_term(u32 minor, au1x00_gpio_bit_ctl *bit_opt);
  23373. +
  23374. +extern void gpio_register_devfs (au1x00_gpio_driver *driver, unsigned int flags, unsigned minor);
  23375. +extern void gpio_unregister_devfs (au1x00_gpio_driver *driver, unsigned minor);
  23376. +extern int gpio_register_driver(au1x00_gpio_driver *driver);
  23377. +extern int gpio_unregister_driver(au1x00_gpio_driver *driver);
  23378. #endif
  23379. #endif
  23380. diff -Nur linux-2.4.32-rc1/include/asm-mips/au1000.h linux-2.4.32-rc1.mips/include/asm-mips/au1000.h
  23381. --- linux-2.4.32-rc1/include/asm-mips/au1000.h 2005-01-19 15:10:11.000000000 +0100
  23382. +++ linux-2.4.32-rc1.mips/include/asm-mips/au1000.h 2005-01-30 09:01:28.000000000 +0100
  23383. @@ -160,28 +160,356 @@
  23384. #define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5)
  23385. #endif
  23386. -/* SDRAM Controller */
  23387. +/*
  23388. + * SDRAM Register Offsets
  23389. + */
  23390. #if defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1100)
  23391. -#define MEM_SDMODE0 0xB4000000
  23392. -#define MEM_SDMODE1 0xB4000004
  23393. -#define MEM_SDMODE2 0xB4000008
  23394. -
  23395. -#define MEM_SDADDR0 0xB400000C
  23396. -#define MEM_SDADDR1 0xB4000010
  23397. -#define MEM_SDADDR2 0xB4000014
  23398. -
  23399. -#define MEM_SDREFCFG 0xB4000018
  23400. -#define MEM_SDPRECMD 0xB400001C
  23401. -#define MEM_SDAUTOREF 0xB4000020
  23402. -
  23403. -#define MEM_SDWRMD0 0xB4000024
  23404. -#define MEM_SDWRMD1 0xB4000028
  23405. -#define MEM_SDWRMD2 0xB400002C
  23406. +#define MEM_SDMODE0 (0x0000)
  23407. +#define MEM_SDMODE1 (0x0004)
  23408. +#define MEM_SDMODE2 (0x0008)
  23409. +#define MEM_SDADDR0 (0x000C)
  23410. +#define MEM_SDADDR1 (0x0010)
  23411. +#define MEM_SDADDR2 (0x0014)
  23412. +#define MEM_SDREFCFG (0x0018)
  23413. +#define MEM_SDPRECMD (0x001C)
  23414. +#define MEM_SDAUTOREF (0x0020)
  23415. +#define MEM_SDWRMD0 (0x0024)
  23416. +#define MEM_SDWRMD1 (0x0028)
  23417. +#define MEM_SDWRMD2 (0x002C)
  23418. +#define MEM_SDSLEEP (0x0030)
  23419. +#define MEM_SDSMCKE (0x0034)
  23420. +
  23421. +#ifndef ASSEMBLER
  23422. +/*typedef volatile struct
  23423. +{
  23424. + uint32 sdmode0;
  23425. + uint32 sdmode1;
  23426. + uint32 sdmode2;
  23427. + uint32 sdaddr0;
  23428. + uint32 sdaddr1;
  23429. + uint32 sdaddr2;
  23430. + uint32 sdrefcfg;
  23431. + uint32 sdautoref;
  23432. + uint32 sdwrmd0;
  23433. + uint32 sdwrmd1;
  23434. + uint32 sdwrmd2;
  23435. + uint32 sdsleep;
  23436. + uint32 sdsmcke;
  23437. +
  23438. +} AU1X00_SDRAM;*/
  23439. +#endif
  23440. +
  23441. +/*
  23442. + * MEM_SDMODE register content definitions
  23443. + */
  23444. +#define MEM_SDMODE_F (1<<22)
  23445. +#define MEM_SDMODE_SR (1<<21)
  23446. +#define MEM_SDMODE_BS (1<<20)
  23447. +#define MEM_SDMODE_RS (3<<18)
  23448. +#define MEM_SDMODE_CS (7<<15)
  23449. +#define MEM_SDMODE_TRAS (15<<11)
  23450. +#define MEM_SDMODE_TMRD (3<<9)
  23451. +#define MEM_SDMODE_TWR (3<<7)
  23452. +#define MEM_SDMODE_TRP (3<<5)
  23453. +#define MEM_SDMODE_TRCD (3<<3)
  23454. +#define MEM_SDMODE_TCL (7<<0)
  23455. +
  23456. +#define MEM_SDMODE_BS_2Bank (0<<20)
  23457. +#define MEM_SDMODE_BS_4Bank (1<<20)
  23458. +#define MEM_SDMODE_RS_11Row (0<<18)
  23459. +#define MEM_SDMODE_RS_12Row (1<<18)
  23460. +#define MEM_SDMODE_RS_13Row (2<<18)
  23461. +#define MEM_SDMODE_RS_N(N) ((N)<<18)
  23462. +#define MEM_SDMODE_CS_7Col (0<<15)
  23463. +#define MEM_SDMODE_CS_8Col (1<<15)
  23464. +#define MEM_SDMODE_CS_9Col (2<<15)
  23465. +#define MEM_SDMODE_CS_10Col (3<<15)
  23466. +#define MEM_SDMODE_CS_11Col (4<<15)
  23467. +#define MEM_SDMODE_CS_N(N) ((N)<<15)
  23468. +#define MEM_SDMODE_TRAS_N(N) ((N)<<11)
  23469. +#define MEM_SDMODE_TMRD_N(N) ((N)<<9)
  23470. +#define MEM_SDMODE_TWR_N(N) ((N)<<7)
  23471. +#define MEM_SDMODE_TRP_N(N) ((N)<<5)
  23472. +#define MEM_SDMODE_TRCD_N(N) ((N)<<3)
  23473. +#define MEM_SDMODE_TCL_N(N) ((N)<<0)
  23474. +
  23475. +/*
  23476. + * MEM_SDADDR register contents definitions
  23477. + */
  23478. +#define MEM_SDADDR_E (1<<20)
  23479. +#define MEM_SDADDR_CSBA (0x03FF<<10)
  23480. +#define MEM_SDADDR_CSMASK (0x03FF<<0)
  23481. +#define MEM_SDADDR_CSBA_N(N) ((N)&(0x03FF<<22)>>12)
  23482. +#define MEM_SDADDR_CSMASK_N(N) ((N)&(0x03FF<<22)>>22)
  23483. +
  23484. +/*
  23485. + * MEM_SDREFCFG register content definitions
  23486. + */
  23487. +#define MEM_SDREFCFG_TRC (15<<28)
  23488. +#define MEM_SDREFCFG_TRPM (3<<26)
  23489. +#define MEM_SDREFCFG_E (1<<25)
  23490. +#define MEM_SDREFCFG_RE (0x1ffffff<<0)
  23491. +#define MEM_SDREFCFG_TRC_N(N) ((N)<<MEM_SDREFCFG_TRC)
  23492. +#define MEM_SDREFCFG_TRPM_N(N) ((N)<<MEM_SDREFCFG_TRPM)
  23493. +#define MEM_SDREFCFG_REF_N(N) (N)
  23494. +#endif
  23495. +
  23496. +/***********************************************************************/
  23497. +
  23498. +/*
  23499. + * Au1550 SDRAM Register Offsets
  23500. + */
  23501. +
  23502. +/***********************************************************************/
  23503. +
  23504. +#if defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200)
  23505. +#define MEM_SDMODE0 (0x0800)
  23506. +#define MEM_SDMODE1 (0x0808)
  23507. +#define MEM_SDMODE2 (0x0810)
  23508. +#define MEM_SDADDR0 (0x0820)
  23509. +#define MEM_SDADDR1 (0x0828)
  23510. +#define MEM_SDADDR2 (0x0830)
  23511. +#define MEM_SDCONFIGA (0x0840)
  23512. +#define MEM_SDCONFIGB (0x0848)
  23513. +#define MEM_SDSTAT (0x0850)
  23514. +#define MEM_SDERRADDR (0x0858)
  23515. +#define MEM_SDSTRIDE0 (0x0860)
  23516. +#define MEM_SDSTRIDE1 (0x0868)
  23517. +#define MEM_SDSTRIDE2 (0x0870)
  23518. +#define MEM_SDWRMD0 (0x0880)
  23519. +#define MEM_SDWRMD1 (0x0888)
  23520. +#define MEM_SDWRMD2 (0x0890)
  23521. +#define MEM_SDPRECMD (0x08C0)
  23522. +#define MEM_SDAUTOREF (0x08C8)
  23523. +#define MEM_SDSREF (0x08D0)
  23524. +#define MEM_SDSLEEP MEM_SDSREF
  23525. +
  23526. +#ifndef ASSEMBLER
  23527. +/*typedef volatile struct
  23528. +{
  23529. + uint32 sdmode0;
  23530. + uint32 reserved0;
  23531. + uint32 sdmode1;
  23532. + uint32 reserved1;
  23533. + uint32 sdmode2;
  23534. + uint32 reserved2[3];
  23535. + uint32 sdaddr0;
  23536. + uint32 reserved3;
  23537. + uint32 sdaddr1;
  23538. + uint32 reserved4;
  23539. + uint32 sdaddr2;
  23540. + uint32 reserved5[3];
  23541. + uint32 sdconfiga;
  23542. + uint32 reserved6;
  23543. + uint32 sdconfigb;
  23544. + uint32 reserved7;
  23545. + uint32 sdstat;
  23546. + uint32 reserved8;
  23547. + uint32 sderraddr;
  23548. + uint32 reserved9;
  23549. + uint32 sdstride0;
  23550. + uint32 reserved10;
  23551. + uint32 sdstride1;
  23552. + uint32 reserved11;
  23553. + uint32 sdstride2;
  23554. + uint32 reserved12[3];
  23555. + uint32 sdwrmd0;
  23556. + uint32 reserved13;
  23557. + uint32 sdwrmd1;
  23558. + uint32 reserved14;
  23559. + uint32 sdwrmd2;
  23560. + uint32 reserved15[11];
  23561. + uint32 sdprecmd;
  23562. + uint32 reserved16;
  23563. + uint32 sdautoref;
  23564. + uint32 reserved17;
  23565. + uint32 sdsref;
  23566. +
  23567. +} AU1550_SDRAM;*/
  23568. +#endif
  23569. +#endif
  23570. +
  23571. +/*
  23572. + * Physical base addresses for integrated peripherals
  23573. + */
  23574. +
  23575. +#ifdef CONFIG_SOC_AU1000
  23576. +#define MEM_PHYS_ADDR 0x14000000
  23577. +#define STATIC_MEM_PHYS_ADDR 0x14001000
  23578. +#define DMA0_PHYS_ADDR 0x14002000
  23579. +#define DMA1_PHYS_ADDR 0x14002100
  23580. +#define DMA2_PHYS_ADDR 0x14002200
  23581. +#define DMA3_PHYS_ADDR 0x14002300
  23582. +#define DMA4_PHYS_ADDR 0x14002400
  23583. +#define DMA5_PHYS_ADDR 0x14002500
  23584. +#define DMA6_PHYS_ADDR 0x14002600
  23585. +#define DMA7_PHYS_ADDR 0x14002700
  23586. +#define IC0_PHYS_ADDR 0x10400000
  23587. +#define IC1_PHYS_ADDR 0x11800000
  23588. +#define AC97_PHYS_ADDR 0x10000000
  23589. +#define USBH_PHYS_ADDR 0x10100000
  23590. +#define USBD_PHYS_ADDR 0x10200000
  23591. +#define IRDA_PHYS_ADDR 0x10300000
  23592. +#define MAC0_PHYS_ADDR 0x10500000
  23593. +#define MAC1_PHYS_ADDR 0x10510000
  23594. +#define MACEN_PHYS_ADDR 0x10520000
  23595. +#define MACDMA0_PHYS_ADDR 0x14004000
  23596. +#define MACDMA1_PHYS_ADDR 0x14004200
  23597. +#define I2S_PHYS_ADDR 0x11000000
  23598. +#define UART0_PHYS_ADDR 0x11100000
  23599. +#define UART1_PHYS_ADDR 0x11200000
  23600. +#define UART2_PHYS_ADDR 0x11300000
  23601. +#define UART3_PHYS_ADDR 0x11400000
  23602. +#define SSI0_PHYS_ADDR 0x11600000
  23603. +#define SSI1_PHYS_ADDR 0x11680000
  23604. +#define SYS_PHYS_ADDR 0x11900000
  23605. +#define PCMCIA_IO_PHYS_ADDR 0xF00000000
  23606. +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
  23607. +#define PCMCIA_MEM_PHYS_ADDR 0xF80000000
  23608. +#endif
  23609. +
  23610. +/********************************************************************/
  23611. -#define MEM_SDSLEEP 0xB4000030
  23612. -#define MEM_SDSMCKE 0xB4000034
  23613. +#ifdef CONFIG_SOC_AU1500
  23614. +#define MEM_PHYS_ADDR 0x14000000
  23615. +#define STATIC_MEM_PHYS_ADDR 0x14001000
  23616. +#define DMA0_PHYS_ADDR 0x14002000
  23617. +#define DMA1_PHYS_ADDR 0x14002100
  23618. +#define DMA2_PHYS_ADDR 0x14002200
  23619. +#define DMA3_PHYS_ADDR 0x14002300
  23620. +#define DMA4_PHYS_ADDR 0x14002400
  23621. +#define DMA5_PHYS_ADDR 0x14002500
  23622. +#define DMA6_PHYS_ADDR 0x14002600
  23623. +#define DMA7_PHYS_ADDR 0x14002700
  23624. +#define IC0_PHYS_ADDR 0x10400000
  23625. +#define IC1_PHYS_ADDR 0x11800000
  23626. +#define AC97_PHYS_ADDR 0x10000000
  23627. +#define USBH_PHYS_ADDR 0x10100000
  23628. +#define USBD_PHYS_ADDR 0x10200000
  23629. +#define PCI_PHYS_ADDR 0x14005000
  23630. +#define MAC0_PHYS_ADDR 0x11500000
  23631. +#define MAC1_PHYS_ADDR 0x11510000
  23632. +#define MACEN_PHYS_ADDR 0x11520000
  23633. +#define MACDMA0_PHYS_ADDR 0x14004000
  23634. +#define MACDMA1_PHYS_ADDR 0x14004200
  23635. +#define I2S_PHYS_ADDR 0x11000000
  23636. +#define UART0_PHYS_ADDR 0x11100000
  23637. +#define UART3_PHYS_ADDR 0x11400000
  23638. +#define GPIO2_PHYS_ADDR 0x11700000
  23639. +#define SYS_PHYS_ADDR 0x11900000
  23640. +#define PCI_MEM_PHYS_ADDR 0x400000000
  23641. +#define PCI_IO_PHYS_ADDR 0x500000000
  23642. +#define PCI_CONFIG0_PHYS_ADDR 0x600000000
  23643. +#define PCI_CONFIG1_PHYS_ADDR 0x680000000
  23644. +#define PCMCIA_IO_PHYS_ADDR 0xF00000000
  23645. +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
  23646. +#define PCMCIA_MEM_PHYS_ADDR 0xF80000000
  23647. #endif
  23648. +/********************************************************************/
  23649. +
  23650. +#ifdef CONFIG_SOC_AU1100
  23651. +#define MEM_PHYS_ADDR 0x14000000
  23652. +#define STATIC_MEM_PHYS_ADDR 0x14001000
  23653. +#define DMA0_PHYS_ADDR 0x14002000
  23654. +#define DMA1_PHYS_ADDR 0x14002100
  23655. +#define DMA2_PHYS_ADDR 0x14002200
  23656. +#define DMA3_PHYS_ADDR 0x14002300
  23657. +#define DMA4_PHYS_ADDR 0x14002400
  23658. +#define DMA5_PHYS_ADDR 0x14002500
  23659. +#define DMA6_PHYS_ADDR 0x14002600
  23660. +#define DMA7_PHYS_ADDR 0x14002700
  23661. +#define IC0_PHYS_ADDR 0x10400000
  23662. +#define SD0_PHYS_ADDR 0x10600000
  23663. +#define SD1_PHYS_ADDR 0x10680000
  23664. +#define IC1_PHYS_ADDR 0x11800000
  23665. +#define AC97_PHYS_ADDR 0x10000000
  23666. +#define USBH_PHYS_ADDR 0x10100000
  23667. +#define USBD_PHYS_ADDR 0x10200000
  23668. +#define IRDA_PHYS_ADDR 0x10300000
  23669. +#define MAC0_PHYS_ADDR 0x10500000
  23670. +#define MACEN_PHYS_ADDR 0x10520000
  23671. +#define MACDMA0_PHYS_ADDR 0x14004000
  23672. +#define MACDMA1_PHYS_ADDR 0x14004200
  23673. +#define I2S_PHYS_ADDR 0x11000000
  23674. +#define UART0_PHYS_ADDR 0x11100000
  23675. +#define UART1_PHYS_ADDR 0x11200000
  23676. +#define UART3_PHYS_ADDR 0x11400000
  23677. +#define SSI0_PHYS_ADDR 0x11600000
  23678. +#define SSI1_PHYS_ADDR 0x11680000
  23679. +#define GPIO2_PHYS_ADDR 0x11700000
  23680. +#define SYS_PHYS_ADDR 0x11900000
  23681. +#define LCD_PHYS_ADDR 0x15000000
  23682. +#define PCMCIA_IO_PHYS_ADDR 0xF00000000
  23683. +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
  23684. +#define PCMCIA_MEM_PHYS_ADDR 0xF80000000
  23685. +#endif
  23686. +
  23687. +/***********************************************************************/
  23688. +
  23689. +#ifdef CONFIG_SOC_AU1550
  23690. +#define MEM_PHYS_ADDR 0x14000000
  23691. +#define STATIC_MEM_PHYS_ADDR 0x14001000
  23692. +#define IC0_PHYS_ADDR 0x10400000
  23693. +#define IC1_PHYS_ADDR 0x11800000
  23694. +#define USBH_PHYS_ADDR 0x14020000
  23695. +#define USBD_PHYS_ADDR 0x10200000
  23696. +#define PCI_PHYS_ADDR 0x14005000
  23697. +#define MAC0_PHYS_ADDR 0x10500000
  23698. +#define MAC1_PHYS_ADDR 0x10510000
  23699. +#define MACEN_PHYS_ADDR 0x10520000
  23700. +#define MACDMA0_PHYS_ADDR 0x14004000
  23701. +#define MACDMA1_PHYS_ADDR 0x14004200
  23702. +#define UART0_PHYS_ADDR 0x11100000
  23703. +#define UART1_PHYS_ADDR 0x11200000
  23704. +#define UART3_PHYS_ADDR 0x11400000
  23705. +#define GPIO2_PHYS_ADDR 0x11700000
  23706. +#define SYS_PHYS_ADDR 0x11900000
  23707. +#define DDMA_PHYS_ADDR 0x14002000
  23708. +#define PE_PHYS_ADDR 0x14008000
  23709. +#define PSC0_PHYS_ADDR 0x11A00000
  23710. +#define PSC1_PHYS_ADDR 0x11B00000
  23711. +#define PSC2_PHYS_ADDR 0x10A00000
  23712. +#define PSC3_PHYS_ADDR 0x10B00000
  23713. +#define PCI_MEM_PHYS_ADDR 0x400000000
  23714. +#define PCI_IO_PHYS_ADDR 0x500000000
  23715. +#define PCI_CONFIG0_PHYS_ADDR 0x600000000
  23716. +#define PCI_CONFIG1_PHYS_ADDR 0x680000000
  23717. +#define PCMCIA_IO_PHYS_ADDR 0xF00000000
  23718. +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
  23719. +#define PCMCIA_MEM_PHYS_ADDR 0xF80000000
  23720. +#endif
  23721. +
  23722. +/***********************************************************************/
  23723. +
  23724. +#ifdef CONFIG_SOC_AU1200
  23725. +#define MEM_PHYS_ADDR 0x14000000
  23726. +#define STATIC_MEM_PHYS_ADDR 0x14001000
  23727. +#define AES_PHYS_ADDR 0x10300000
  23728. +#define CIM_PHYS_ADDR 0x14004000
  23729. +#define IC0_PHYS_ADDR 0x10400000
  23730. +#define IC1_PHYS_ADDR 0x11800000
  23731. +#define USBM_PHYS_ADDR 0x14020000
  23732. +#define USBH_PHYS_ADDR 0x14020100
  23733. +#define UART0_PHYS_ADDR 0x11100000
  23734. +#define UART1_PHYS_ADDR 0x11200000
  23735. +#define GPIO2_PHYS_ADDR 0x11700000
  23736. +#define SYS_PHYS_ADDR 0x11900000
  23737. +#define DDMA_PHYS_ADDR 0x14002000
  23738. +#define PSC0_PHYS_ADDR 0x11A00000
  23739. +#define PSC1_PHYS_ADDR 0x11B00000
  23740. +#define PCMCIA_IO_PHYS_ADDR 0xF00000000
  23741. +#define PCMCIA_ATTR_PHYS_ADDR 0xF40000000
  23742. +#define PCMCIA_MEM_PHYS_ADDR 0xF80000000
  23743. +#define SD0_PHYS_ADDR 0x10600000
  23744. +#define SD1_PHYS_ADDR 0x10680000
  23745. +#define LCD_PHYS_ADDR 0x15000000
  23746. +#define SWCNT_PHYS_ADDR 0x1110010C
  23747. +#define MAEFE_PHYS_ADDR 0x14012000
  23748. +#define MAEBE_PHYS_ADDR 0x14010000
  23749. +#endif
  23750. +
  23751. +
  23752. /* Static Bus Controller */
  23753. #define MEM_STCFG0 0xB4001000
  23754. #define MEM_STTIME0 0xB4001004
  23755. @@ -367,7 +695,7 @@
  23756. #define AU1000_MAC0_ENABLE 0xB0520000
  23757. #define AU1000_MAC1_ENABLE 0xB0520004
  23758. #define NUM_ETH_INTERFACES 2
  23759. -#endif // CONFIG_SOC_AU1000
  23760. +#endif /* CONFIG_SOC_AU1000 */
  23761. /* Au1500 */
  23762. #ifdef CONFIG_SOC_AU1500
  23763. @@ -438,7 +766,7 @@
  23764. #define AU1500_MAC0_ENABLE 0xB1520000
  23765. #define AU1500_MAC1_ENABLE 0xB1520004
  23766. #define NUM_ETH_INTERFACES 2
  23767. -#endif // CONFIG_SOC_AU1500
  23768. +#endif /* CONFIG_SOC_AU1500 */
  23769. /* Au1100 */
  23770. #ifdef CONFIG_SOC_AU1100
  23771. @@ -483,6 +811,22 @@
  23772. #define AU1000_GPIO_13 45
  23773. #define AU1000_GPIO_14 46
  23774. #define AU1000_GPIO_15 47
  23775. +#define AU1000_GPIO_16 48
  23776. +#define AU1000_GPIO_17 49
  23777. +#define AU1000_GPIO_18 50
  23778. +#define AU1000_GPIO_19 51
  23779. +#define AU1000_GPIO_20 52
  23780. +#define AU1000_GPIO_21 53
  23781. +#define AU1000_GPIO_22 54
  23782. +#define AU1000_GPIO_23 55
  23783. +#define AU1000_GPIO_24 56
  23784. +#define AU1000_GPIO_25 57
  23785. +#define AU1000_GPIO_26 58
  23786. +#define AU1000_GPIO_27 59
  23787. +#define AU1000_GPIO_28 60
  23788. +#define AU1000_GPIO_29 61
  23789. +#define AU1000_GPIO_30 62
  23790. +#define AU1000_GPIO_31 63
  23791. #define UART0_ADDR 0xB1100000
  23792. #define UART1_ADDR 0xB1200000
  23793. @@ -494,7 +838,7 @@
  23794. #define AU1100_ETH0_BASE 0xB0500000
  23795. #define AU1100_MAC0_ENABLE 0xB0520000
  23796. #define NUM_ETH_INTERFACES 1
  23797. -#endif // CONFIG_SOC_AU1100
  23798. +#endif /* CONFIG_SOC_AU1100 */
  23799. #ifdef CONFIG_SOC_AU1550
  23800. #define AU1550_UART0_INT 0
  23801. @@ -511,14 +855,14 @@
  23802. #define AU1550_PSC1_INT 11
  23803. #define AU1550_PSC2_INT 12
  23804. #define AU1550_PSC3_INT 13
  23805. -#define AU1550_TOY_INT 14
  23806. -#define AU1550_TOY_MATCH0_INT 15
  23807. -#define AU1550_TOY_MATCH1_INT 16
  23808. -#define AU1550_TOY_MATCH2_INT 17
  23809. -#define AU1550_RTC_INT 18
  23810. -#define AU1550_RTC_MATCH0_INT 19
  23811. -#define AU1550_RTC_MATCH1_INT 20
  23812. -#define AU1550_RTC_MATCH2_INT 21
  23813. +#define AU1000_TOY_INT 14
  23814. +#define AU1000_TOY_MATCH0_INT 15
  23815. +#define AU1000_TOY_MATCH1_INT 16
  23816. +#define AU1000_TOY_MATCH2_INT 17
  23817. +#define AU1000_RTC_INT 18
  23818. +#define AU1000_RTC_MATCH0_INT 19
  23819. +#define AU1000_RTC_MATCH1_INT 20
  23820. +#define AU1000_RTC_MATCH2_INT 21
  23821. #define AU1550_NAND_INT 23
  23822. #define AU1550_USB_DEV_REQ_INT 24
  23823. #define AU1550_USB_DEV_SUS_INT 25
  23824. @@ -573,7 +917,7 @@
  23825. #define AU1550_MAC0_ENABLE 0xB0520000
  23826. #define AU1550_MAC1_ENABLE 0xB0520004
  23827. #define NUM_ETH_INTERFACES 2
  23828. -#endif // CONFIG_SOC_AU1550
  23829. +#endif /* CONFIG_SOC_AU1550 */
  23830. #ifdef CONFIG_SOC_AU1200
  23831. #define AU1200_UART0_INT 0
  23832. @@ -590,14 +934,14 @@
  23833. #define AU1200_PSC1_INT 11
  23834. #define AU1200_AES_INT 12
  23835. #define AU1200_CAMERA_INT 13
  23836. -#define AU1200_TOY_INT 14
  23837. -#define AU1200_TOY_MATCH0_INT 15
  23838. -#define AU1200_TOY_MATCH1_INT 16
  23839. -#define AU1200_TOY_MATCH2_INT 17
  23840. -#define AU1200_RTC_INT 18
  23841. -#define AU1200_RTC_MATCH0_INT 19
  23842. -#define AU1200_RTC_MATCH1_INT 20
  23843. -#define AU1200_RTC_MATCH2_INT 21
  23844. +#define AU1000_TOY_INT 14
  23845. +#define AU1000_TOY_MATCH0_INT 15
  23846. +#define AU1000_TOY_MATCH1_INT 16
  23847. +#define AU1000_TOY_MATCH2_INT 17
  23848. +#define AU1000_RTC_INT 18
  23849. +#define AU1000_RTC_MATCH0_INT 19
  23850. +#define AU1000_RTC_MATCH1_INT 20
  23851. +#define AU1000_RTC_MATCH2_INT 21
  23852. #define AU1200_NAND_INT 23
  23853. #define AU1200_GPIO_204 24
  23854. #define AU1200_GPIO_205 25
  23855. @@ -605,6 +949,7 @@
  23856. #define AU1200_GPIO_207 27
  23857. #define AU1200_GPIO_208_215 28 // Logical OR of 208:215
  23858. #define AU1200_USB_INT 29
  23859. +#define AU1000_USB_HOST_INT AU1200_USB_INT
  23860. #define AU1200_LCD_INT 30
  23861. #define AU1200_MAE_BOTH_INT 31
  23862. #define AU1000_GPIO_0 32
  23863. @@ -643,21 +988,36 @@
  23864. #define UART0_ADDR 0xB1100000
  23865. #define UART1_ADDR 0xB1200000
  23866. -#define USB_OHCI_BASE 0x14020000 // phys addr for ioremap
  23867. -#define USB_HOST_CONFIG 0xB4027ffc
  23868. +#define USB_UOC_BASE 0x14020020
  23869. +#define USB_UOC_LEN 0x20
  23870. +#define USB_OHCI_BASE 0x14020100
  23871. +#define USB_OHCI_LEN 0x100
  23872. +#define USB_EHCI_BASE 0x14020200
  23873. +#define USB_EHCI_LEN 0x100
  23874. +#define USB_UDC_BASE 0x14022000
  23875. +#define USB_UDC_LEN 0x2000
  23876. +#define USB_MSR_BASE 0xB4020000
  23877. +#define USB_MSR_MCFG 4
  23878. +#define USBMSRMCFG_OMEMEN 0
  23879. +#define USBMSRMCFG_OBMEN 1
  23880. +#define USBMSRMCFG_EMEMEN 2
  23881. +#define USBMSRMCFG_EBMEN 3
  23882. +#define USBMSRMCFG_DMEMEN 4
  23883. +#define USBMSRMCFG_DBMEN 5
  23884. +#define USBMSRMCFG_GMEMEN 6
  23885. +#define USBMSRMCFG_OHCCLKEN 16
  23886. +#define USBMSRMCFG_EHCCLKEN 17
  23887. +#define USBMSRMCFG_UDCCLKEN 18
  23888. +#define USBMSRMCFG_PHYPLLEN 19
  23889. +#define USBMSRMCFG_RDCOMB 30
  23890. +#define USBMSRMCFG_PFEN 31
  23891. -// these are here for prototyping on au1550 (do not exist on au1200)
  23892. -#define AU1200_ETH0_BASE 0xB0500000
  23893. -#define AU1200_ETH1_BASE 0xB0510000
  23894. -#define AU1200_MAC0_ENABLE 0xB0520000
  23895. -#define AU1200_MAC1_ENABLE 0xB0520004
  23896. -#define NUM_ETH_INTERFACES 2
  23897. -#endif // CONFIG_SOC_AU1200
  23898. +#endif /* CONFIG_SOC_AU1200 */
  23899. #define AU1000_LAST_INTC0_INT 31
  23900. +#define AU1000_LAST_INTC1_INT 63
  23901. #define AU1000_MAX_INTR 63
  23902. -
  23903. /* Programmable Counters 0 and 1 */
  23904. #define SYS_BASE 0xB1900000
  23905. #define SYS_COUNTER_CNTRL (SYS_BASE + 0x14)
  23906. @@ -728,6 +1088,8 @@
  23907. #define I2S_CONTROL_D (1<<1)
  23908. #define I2S_CONTROL_CE (1<<0)
  23909. +#ifndef CONFIG_SOC_AU1200
  23910. +
  23911. /* USB Host Controller */
  23912. #define USB_OHCI_LEN 0x00100000
  23913. @@ -773,6 +1135,8 @@
  23914. #define USBDEV_ENABLE (1<<1)
  23915. #define USBDEV_CE (1<<0)
  23916. +#endif /* !CONFIG_SOC_AU1200 */
  23917. +
  23918. /* Ethernet Controllers */
  23919. /* 4 byte offsets from AU1000_ETH_BASE */
  23920. @@ -1171,6 +1535,37 @@
  23921. #define SYS_PF_PSC1_S1 (1 << 1)
  23922. #define SYS_PF_MUST_BE_SET ((1 << 5) | (1 << 2))
  23923. +/* Au1200 Only */
  23924. +#ifdef CONFIG_SOC_AU1200
  23925. +#define SYS_PINFUNC_DMA (1<<31)
  23926. +#define SYS_PINFUNC_S0A (1<<30)
  23927. +#define SYS_PINFUNC_S1A (1<<29)
  23928. +#define SYS_PINFUNC_LP0 (1<<28)
  23929. +#define SYS_PINFUNC_LP1 (1<<27)
  23930. +#define SYS_PINFUNC_LD16 (1<<26)
  23931. +#define SYS_PINFUNC_LD8 (1<<25)
  23932. +#define SYS_PINFUNC_LD1 (1<<24)
  23933. +#define SYS_PINFUNC_LD0 (1<<23)
  23934. +#define SYS_PINFUNC_P1A (3<<21)
  23935. +#define SYS_PINFUNC_P1B (1<<20)
  23936. +#define SYS_PINFUNC_FS3 (1<<19)
  23937. +#define SYS_PINFUNC_P0A (3<<17)
  23938. +#define SYS_PINFUNC_CS (1<<16)
  23939. +#define SYS_PINFUNC_CIM (1<<15)
  23940. +#define SYS_PINFUNC_P1C (1<<14)
  23941. +#define SYS_PINFUNC_U1T (1<<12)
  23942. +#define SYS_PINFUNC_U1R (1<<11)
  23943. +#define SYS_PINFUNC_EX1 (1<<10)
  23944. +#define SYS_PINFUNC_EX0 (1<<9)
  23945. +#define SYS_PINFUNC_U0R (1<<8)
  23946. +#define SYS_PINFUNC_MC (1<<7)
  23947. +#define SYS_PINFUNC_S0B (1<<6)
  23948. +#define SYS_PINFUNC_S0C (1<<5)
  23949. +#define SYS_PINFUNC_P0B (1<<4)
  23950. +#define SYS_PINFUNC_U0T (1<<3)
  23951. +#define SYS_PINFUNC_S1B (1<<2)
  23952. +#endif
  23953. +
  23954. #define SYS_TRIOUTRD 0xB1900100
  23955. #define SYS_TRIOUTCLR 0xB1900100
  23956. #define SYS_OUTPUTRD 0xB1900108
  23957. @@ -1298,7 +1693,6 @@
  23958. #define SD1_XMIT_FIFO 0xB0680000
  23959. #define SD1_RECV_FIFO 0xB0680004
  23960. -
  23961. #if defined (CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550)
  23962. /* Au1500 PCI Controller */
  23963. #define Au1500_CFG_BASE 0xB4005000 // virtual, kseg0 addr
  23964. @@ -1388,9 +1782,60 @@
  23965. #endif
  23966. +#ifndef _LANGUAGE_ASSEMBLY
  23967. +typedef volatile struct
  23968. +{
  23969. + /* 0x0000 */ u32 toytrim;
  23970. + /* 0x0004 */ u32 toywrite;
  23971. + /* 0x0008 */ u32 toymatch0;
  23972. + /* 0x000C */ u32 toymatch1;
  23973. + /* 0x0010 */ u32 toymatch2;
  23974. + /* 0x0014 */ u32 cntrctrl;
  23975. + /* 0x0018 */ u32 scratch0;
  23976. + /* 0x001C */ u32 scratch1;
  23977. + /* 0x0020 */ u32 freqctrl0;
  23978. + /* 0x0024 */ u32 freqctrl1;
  23979. + /* 0x0028 */ u32 clksrc;
  23980. + /* 0x002C */ u32 pinfunc;
  23981. + /* 0x0030 */ u32 reserved0;
  23982. + /* 0x0034 */ u32 wakemsk;
  23983. + /* 0x0038 */ u32 endian;
  23984. + /* 0x003C */ u32 powerctrl;
  23985. + /* 0x0040 */ u32 toyread;
  23986. + /* 0x0044 */ u32 rtctrim;
  23987. + /* 0x0048 */ u32 rtcwrite;
  23988. + /* 0x004C */ u32 rtcmatch0;
  23989. + /* 0x0050 */ u32 rtcmatch1;
  23990. + /* 0x0054 */ u32 rtcmatch2;
  23991. + /* 0x0058 */ u32 rtcread;
  23992. + /* 0x005C */ u32 wakesrc;
  23993. + /* 0x0060 */ u32 cpupll;
  23994. + /* 0x0064 */ u32 auxpll;
  23995. + /* 0x0068 */ u32 reserved1;
  23996. + /* 0x006C */ u32 reserved2;
  23997. + /* 0x0070 */ u32 reserved3;
  23998. + /* 0x0074 */ u32 reserved4;
  23999. + /* 0x0078 */ u32 slppwr;
  24000. + /* 0x007C */ u32 sleep;
  24001. + /* 0x0080 */ u32 reserved5[32];
  24002. + /* 0x0100 */ u32 trioutrd;
  24003. +#define trioutclr trioutrd
  24004. + /* 0x0104 */ u32 reserved6;
  24005. + /* 0x0108 */ u32 outputrd;
  24006. +#define outputset outputrd
  24007. + /* 0x010C */ u32 outputclr;
  24008. + /* 0x0110 */ u32 pinstaterd;
  24009. +#define pininputen pinstaterd
  24010. +
  24011. +} AU1X00_SYS;
  24012. +
  24013. +static AU1X00_SYS* const sys = (AU1X00_SYS *)SYS_BASE;
  24014. +
  24015. +#endif
  24016. /* Processor information base on prid.
  24017. * Copied from PowerPC.
  24018. */
  24019. +#ifndef _LANGUAGE_ASSEMBLY
  24020. struct cpu_spec {
  24021. /* CPU is matched via (PRID & prid_mask) == prid_value */
  24022. unsigned int prid_mask;
  24023. @@ -1404,3 +1849,6 @@
  24024. extern struct cpu_spec cpu_specs[];
  24025. extern struct cpu_spec *cur_cpu_spec[];
  24026. #endif
  24027. +
  24028. +#endif
  24029. +
  24030. diff -Nur linux-2.4.32-rc1/include/asm-mips/au1000_pcmcia.h linux-2.4.32-rc1.mips/include/asm-mips/au1000_pcmcia.h
  24031. --- linux-2.4.32-rc1/include/asm-mips/au1000_pcmcia.h 2005-01-19 15:10:11.000000000 +0100
  24032. +++ linux-2.4.32-rc1.mips/include/asm-mips/au1000_pcmcia.h 2005-01-30 09:01:28.000000000 +0100
  24033. @@ -38,16 +38,41 @@
  24034. #define AU1X_SOCK0_PHYS_MEM 0xF80000000
  24035. /* pcmcia socket 1 needs external glue logic so the memory map
  24036. - * differs from board to board.
  24037. + * differs from board to board. the general rule is that
  24038. + * static bus address bit 26 should be used to decode socket 0
  24039. + * from socket 1. alas, some boards dont follow this...
  24040. + * These really belong in a board-specific header file...
  24041. */
  24042. -#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_PB1500)
  24043. -#define AU1X_SOCK1_IO 0xF08000000
  24044. -#define AU1X_SOCK1_PHYS_ATTR 0xF48000000
  24045. -#define AU1X_SOCK1_PHYS_MEM 0xF88000000
  24046. -#elif defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550)
  24047. -#define AU1X_SOCK1_IO 0xF04000000
  24048. -#define AU1X_SOCK1_PHYS_ATTR 0xF44000000
  24049. -#define AU1X_SOCK1_PHYS_MEM 0xF84000000
  24050. +#ifdef CONFIG_MIPS_PB1000
  24051. +#define SOCK1_DECODE (1<<27)
  24052. +#endif
  24053. +#ifdef CONFIG_MIPS_DB1000
  24054. +#define SOCK1_DECODE (1<<26)
  24055. +#endif
  24056. +#ifdef CONFIG_MIPS_DB1500
  24057. +#define SOCK1_DECODE (1<<26)
  24058. +#endif
  24059. +#ifdef CONFIG_MIPS_DB1100
  24060. +#define SOCK1_DECODE (1<<26)
  24061. +#endif
  24062. +#ifdef CONFIG_MIPS_DB1550
  24063. +#define SOCK1_DECODE (1<<26)
  24064. +#endif
  24065. +#ifdef CONFIG_MIPS_DB1200
  24066. +#define SOCK1_DECODE (1<<26)
  24067. +#endif
  24068. +#ifdef CONFIG_MIPS_PB1550
  24069. +#define SOCK1_DECODE (1<<26)
  24070. +#endif
  24071. +#ifdef CONFIG_MIPS_PB1200
  24072. +#define SOCK1_DECODE (1<<26)
  24073. +#endif
  24074. +
  24075. +/* The board has a second PCMCIA socket */
  24076. +#ifdef SOCK1_DECODE
  24077. +#define AU1X_SOCK1_IO (0xF00000000|SOCK1_DECODE)
  24078. +#define AU1X_SOCK1_PHYS_ATTR (0xF40000000|SOCK1_DECODE)
  24079. +#define AU1X_SOCK1_PHYS_MEM (0xF80000000|SOCK1_DECODE)
  24080. #endif
  24081. struct pcmcia_state {
  24082. diff -Nur linux-2.4.32-rc1/include/asm-mips/au1100_mmc.h linux-2.4.32-rc1.mips/include/asm-mips/au1100_mmc.h
  24083. --- linux-2.4.32-rc1/include/asm-mips/au1100_mmc.h 2005-01-19 15:10:11.000000000 +0100
  24084. +++ linux-2.4.32-rc1.mips/include/asm-mips/au1100_mmc.h 2005-01-30 09:01:28.000000000 +0100
  24085. @@ -39,16 +39,22 @@
  24086. #define __ASM_AU1100_MMC_H
  24087. -#define NUM_AU1100_MMC_CONTROLLERS 2
  24088. -
  24089. -
  24090. -#define AU1100_SD_IRQ 2
  24091. -
  24092. +#if defined(CONFIG_SOC_AU1100)
  24093. +#define NUM_MMC_CONTROLLERS 2
  24094. +#define AU1X_MMC_INT AU1100_SD_INT
  24095. +#endif
  24096. +
  24097. +#if defined(CONFIG_SOC_AU1200)
  24098. +#define NUM_MMC_CONTROLLERS 2
  24099. +#define AU1X_MMC_INT AU1200_SD_INT
  24100. +#endif
  24101. #define SD0_BASE 0xB0600000
  24102. #define SD1_BASE 0xB0680000
  24103. +
  24104. +
  24105. /*
  24106. * Register offsets.
  24107. */
  24108. @@ -201,5 +207,12 @@
  24109. #define SD_CMD_RT_1B (0x00810000)
  24110. +/* support routines required on a platform-specific basis */
  24111. +extern void mmc_card_inserted(int _n_, int *_res_);
  24112. +extern void mmc_card_writable(int _n_, int *_res_);
  24113. +extern void mmc_power_on(int _n_);
  24114. +extern void mmc_power_off(int _n_);
  24115. +
  24116. +
  24117. #endif /* __ASM_AU1100_MMC_H */
  24118. diff -Nur linux-2.4.32-rc1/include/asm-mips/au1xxx_dbdma.h linux-2.4.32-rc1.mips/include/asm-mips/au1xxx_dbdma.h
  24119. --- linux-2.4.32-rc1/include/asm-mips/au1xxx_dbdma.h 2005-01-19 15:10:11.000000000 +0100
  24120. +++ linux-2.4.32-rc1.mips/include/asm-mips/au1xxx_dbdma.h 2005-01-30 09:01:28.000000000 +0100
  24121. @@ -43,7 +43,7 @@
  24122. #define DDMA_GLOBAL_BASE 0xb4003000
  24123. #define DDMA_CHANNEL_BASE 0xb4002000
  24124. -typedef struct dbdma_global {
  24125. +typedef volatile struct dbdma_global {
  24126. u32 ddma_config;
  24127. u32 ddma_intstat;
  24128. u32 ddma_throttle;
  24129. @@ -60,7 +60,7 @@
  24130. /* The structure of a DMA Channel.
  24131. */
  24132. -typedef struct au1xxx_dma_channel {
  24133. +typedef volatile struct au1xxx_dma_channel {
  24134. u32 ddma_cfg; /* See below */
  24135. u32 ddma_desptr; /* 32-byte aligned pointer to descriptor */
  24136. u32 ddma_statptr; /* word aligned pointer to status word */
  24137. @@ -96,7 +96,7 @@
  24138. /* "Standard" DDMA Descriptor.
  24139. * Must be 32-byte aligned.
  24140. */
  24141. -typedef struct au1xxx_ddma_desc {
  24142. +typedef volatile struct au1xxx_ddma_desc {
  24143. u32 dscr_cmd0; /* See below */
  24144. u32 dscr_cmd1; /* See below */
  24145. u32 dscr_source0; /* source phys address */
  24146. @@ -105,6 +105,12 @@
  24147. u32 dscr_dest1; /* See below */
  24148. u32 dscr_stat; /* completion status */
  24149. u32 dscr_nxtptr; /* Next descriptor pointer (mostly) */
  24150. + /* First 32bytes are HW specific!!!
  24151. + Lets have some SW data following.. make sure its 32bytes
  24152. + */
  24153. + u32 sw_status;
  24154. + u32 sw_context;
  24155. + u32 sw_reserved[6];
  24156. } au1x_ddma_desc_t;
  24157. #define DSCR_CMD0_V (1 << 31) /* Descriptor valid */
  24158. @@ -123,6 +129,8 @@
  24159. #define DSCR_CMD0_CV (0x1 << 2) /* Clear Valid when done */
  24160. #define DSCR_CMD0_ST_MASK (0x3 << 0) /* Status instruction */
  24161. +#define SW_STATUS_INUSE (1<<0)
  24162. +
  24163. /* Command 0 device IDs.
  24164. */
  24165. #ifdef CONFIG_SOC_AU1550
  24166. @@ -169,8 +177,8 @@
  24167. #define DSCR_CMD0_SDMS_RX0 9
  24168. #define DSCR_CMD0_SDMS_TX1 10
  24169. #define DSCR_CMD0_SDMS_RX1 11
  24170. -#define DSCR_CMD0_AES_TX 12
  24171. -#define DSCR_CMD0_AES_RX 13
  24172. +#define DSCR_CMD0_AES_TX 13
  24173. +#define DSCR_CMD0_AES_RX 12
  24174. #define DSCR_CMD0_PSC0_TX 14
  24175. #define DSCR_CMD0_PSC0_RX 15
  24176. #define DSCR_CMD0_PSC1_TX 16
  24177. @@ -189,6 +197,10 @@
  24178. #define DSCR_CMD0_THROTTLE 30
  24179. #define DSCR_CMD0_ALWAYS 31
  24180. #define DSCR_NDEV_IDS 32
  24181. +/* THis macro is used to find/create custom device types */
  24182. +#define DSCR_DEV2CUSTOM_ID(x,d) (((((x)&0xFFFF)<<8)|0x32000000)|((d)&0xFF))
  24183. +#define DSCR_CUSTOM2DEV_ID(x) ((x)&0xFF)
  24184. +
  24185. #define DSCR_CMD0_SID(x) (((x) & 0x1f) << 25)
  24186. #define DSCR_CMD0_DID(x) (((x) & 0x1f) << 20)
  24187. @@ -277,6 +289,43 @@
  24188. */
  24189. #define NUM_DBDMA_CHANS 16
  24190. +/*
  24191. + * Ddma API definitions
  24192. + * FIXME: may not fit to this header file
  24193. + */
  24194. +typedef struct dbdma_device_table {
  24195. + u32 dev_id;
  24196. + u32 dev_flags;
  24197. + u32 dev_tsize;
  24198. + u32 dev_devwidth;
  24199. + u32 dev_physaddr; /* If FIFO */
  24200. + u32 dev_intlevel;
  24201. + u32 dev_intpolarity;
  24202. +} dbdev_tab_t;
  24203. +
  24204. +
  24205. +typedef struct dbdma_chan_config {
  24206. + spinlock_t lock;
  24207. +
  24208. + u32 chan_flags;
  24209. + u32 chan_index;
  24210. + dbdev_tab_t *chan_src;
  24211. + dbdev_tab_t *chan_dest;
  24212. + au1x_dma_chan_t *chan_ptr;
  24213. + au1x_ddma_desc_t *chan_desc_base;
  24214. + au1x_ddma_desc_t *get_ptr, *put_ptr, *cur_ptr;
  24215. + void *chan_callparam;
  24216. + void (*chan_callback)(int, void *, struct pt_regs *);
  24217. +} chan_tab_t;
  24218. +
  24219. +#define DEV_FLAGS_INUSE (1 << 0)
  24220. +#define DEV_FLAGS_ANYUSE (1 << 1)
  24221. +#define DEV_FLAGS_OUT (1 << 2)
  24222. +#define DEV_FLAGS_IN (1 << 3)
  24223. +#define DEV_FLAGS_BURSTABLE (1 << 4)
  24224. +#define DEV_FLAGS_SYNC (1 << 5)
  24225. +/* end Ddma API definitions */
  24226. +
  24227. /* External functions for drivers to use.
  24228. */
  24229. /* Use this to allocate a dbdma channel. The device ids are one of the
  24230. @@ -299,8 +348,8 @@
  24231. /* Put buffers on source/destination descriptors.
  24232. */
  24233. -u32 au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes);
  24234. -u32 au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes);
  24235. +u32 _au1xxx_dbdma_put_source(u32 chanid, void *buf, int nbytes, u32 flags);
  24236. +u32 _au1xxx_dbdma_put_dest(u32 chanid, void *buf, int nbytes, u32 flags);
  24237. /* Get a buffer from the destination descriptor.
  24238. */
  24239. @@ -314,5 +363,25 @@
  24240. void au1xxx_dbdma_chan_free(u32 chanid);
  24241. void au1xxx_dbdma_dump(u32 chanid);
  24242. +u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr );
  24243. +
  24244. +u32 au1xxx_ddma_add_device( dbdev_tab_t *dev );
  24245. +
  24246. +/*
  24247. + Some compatibilty macros --
  24248. + Needed to make changes to API without breaking existing drivers
  24249. +*/
  24250. +#define au1xxx_dbdma_put_source(chanid,buf,nbytes)_au1xxx_dbdma_put_source(chanid, buf, nbytes, DDMA_FLAGS_IE)
  24251. +#define au1xxx_dbdma_put_source_flags(chanid,buf,nbytes,flags) _au1xxx_dbdma_put_source(chanid, buf, nbytes, flags)
  24252. +
  24253. +#define au1xxx_dbdma_put_dest(chanid,buf,nbytes) _au1xxx_dbdma_put_dest(chanid, buf, nbytes, DDMA_FLAGS_IE)
  24254. +#define au1xxx_dbdma_put_dest_flags(chanid,buf,nbytes,flags) _au1xxx_dbdma_put_dest(chanid, buf, nbytes, flags)
  24255. +
  24256. +/*
  24257. + * Flags for the put_source/put_dest functions.
  24258. + */
  24259. +#define DDMA_FLAGS_IE (1<<0)
  24260. +#define DDMA_FLAGS_NOIE (1<<1)
  24261. +
  24262. #endif /* _LANGUAGE_ASSEMBLY */
  24263. #endif /* _AU1000_DBDMA_H_ */
  24264. diff -Nur linux-2.4.32-rc1/include/asm-mips/au1xxx_gpio.h linux-2.4.32-rc1.mips/include/asm-mips/au1xxx_gpio.h
  24265. --- linux-2.4.32-rc1/include/asm-mips/au1xxx_gpio.h 1970-01-01 01:00:00.000000000 +0100
  24266. +++ linux-2.4.32-rc1.mips/include/asm-mips/au1xxx_gpio.h 2005-01-30 09:01:28.000000000 +0100
  24267. @@ -0,0 +1,22 @@
  24268. +
  24269. +
  24270. +#ifndef __AU1XXX_GPIO_H
  24271. +#define __AU1XXX_GPIO_H
  24272. +
  24273. +void au1xxx_gpio1_set_inputs(void);
  24274. +void au1xxx_gpio_tristate(int signal);
  24275. +void au1xxx_gpio_write(int signal, int value);
  24276. +int au1xxx_gpio_read(int signal);
  24277. +
  24278. +typedef volatile struct
  24279. +{
  24280. + u32 dir;
  24281. + u32 reserved;
  24282. + u32 output;
  24283. + u32 pinstate;
  24284. + u32 inten;
  24285. + u32 enable;
  24286. +
  24287. +} AU1X00_GPIO2;
  24288. +
  24289. +#endif //__AU1XXX_GPIO_H
  24290. diff -Nur linux-2.4.32-rc1/include/asm-mips/au1xxx_psc.h linux-2.4.32-rc1.mips/include/asm-mips/au1xxx_psc.h
  24291. --- linux-2.4.32-rc1/include/asm-mips/au1xxx_psc.h 2005-01-19 15:10:11.000000000 +0100
  24292. +++ linux-2.4.32-rc1.mips/include/asm-mips/au1xxx_psc.h 2005-01-30 09:01:28.000000000 +0100
  24293. @@ -41,6 +41,11 @@
  24294. #define PSC3_BASE_ADDR 0xb0d00000
  24295. #endif
  24296. +#ifdef CONFIG_SOC_AU1200
  24297. +#define PSC0_BASE_ADDR 0xb1a00000
  24298. +#define PSC1_BASE_ADDR 0xb1b00000
  24299. +#endif
  24300. +
  24301. /* The PSC select and control registers are common to
  24302. * all protocols.
  24303. */
  24304. @@ -226,6 +231,8 @@
  24305. #define PSC_I2SCFG_DD_DISABLE (1 << 27)
  24306. #define PSC_I2SCFG_DE_ENABLE (1 << 26)
  24307. #define PSC_I2SCFG_SET_WS(x) (((((x) / 2) - 1) & 0x7f) << 16)
  24308. +#define PSC_I2SCFG_WS(n) ((n&0xFF)<<16)
  24309. +#define PSC_I2SCFG_WS_MASK (PSC_I2SCFG_WS(0x3F))
  24310. #define PSC_I2SCFG_WI (1 << 15)
  24311. #define PSC_I2SCFG_DIV_MASK (3 << 13)
  24312. diff -Nur linux-2.4.32-rc1/include/asm-mips/bootinfo.h linux-2.4.32-rc1.mips/include/asm-mips/bootinfo.h
  24313. --- linux-2.4.32-rc1/include/asm-mips/bootinfo.h 2004-02-18 14:36:32.000000000 +0100
  24314. +++ linux-2.4.32-rc1.mips/include/asm-mips/bootinfo.h 2005-01-30 09:01:28.000000000 +0100
  24315. @@ -180,6 +180,9 @@
  24316. #define MACH_MTX1 7 /* 4G MTX-1 Au1500-based board */
  24317. #define MACH_CSB250 8 /* Cogent Au1500 */
  24318. #define MACH_PB1550 9 /* Au1550-based eval board */
  24319. +#define MACH_PB1200 10 /* Au1200-based eval board */
  24320. +#define MACH_DB1550 11 /* Au1550-based eval board */
  24321. +#define MACH_DB1200 12 /* Au1200-based eval board */
  24322. /*
  24323. * Valid machtype for group NEC_VR41XX
  24324. diff -Nur linux-2.4.32-rc1/include/asm-mips/db1200.h linux-2.4.32-rc1.mips/include/asm-mips/db1200.h
  24325. --- linux-2.4.32-rc1/include/asm-mips/db1200.h 1970-01-01 01:00:00.000000000 +0100
  24326. +++ linux-2.4.32-rc1.mips/include/asm-mips/db1200.h 2005-01-30 09:02:45.000000000 +0100
  24327. @@ -0,0 +1,214 @@
  24328. +/*
  24329. + * AMD Alchemy DB1200 Referrence Board
  24330. + * Board Registers defines.
  24331. + *
  24332. + * ########################################################################
  24333. + *
  24334. + * This program is free software; you can distribute it and/or modify it
  24335. + * under the terms of the GNU General Public License (Version 2) as
  24336. + * published by the Free Software Foundation.
  24337. + *
  24338. + * This program is distributed in the hope it will be useful, but WITHOUT
  24339. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  24340. + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  24341. + * for more details.
  24342. + *
  24343. + * You should have received a copy of the GNU General Public License along
  24344. + * with this program; if not, write to the Free Software Foundation, Inc.,
  24345. + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  24346. + *
  24347. + * ########################################################################
  24348. + *
  24349. + *
  24350. + */
  24351. +#ifndef __ASM_DB1200_H
  24352. +#define __ASM_DB1200_H
  24353. +
  24354. +#include <linux/types.h>
  24355. +
  24356. +// This is defined in au1000.h with bogus value
  24357. +#undef AU1X00_EXTERNAL_INT
  24358. +
  24359. +#define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX
  24360. +#define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX
  24361. +#define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC1_TX
  24362. +#define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC1_RX
  24363. +
  24364. +/* SPI and SMB are muxed on the Pb1200 board.
  24365. + Refer to board documentation.
  24366. + */
  24367. +#define SPI_PSC_BASE PSC0_BASE_ADDR
  24368. +#define SMBUS_PSC_BASE PSC0_BASE_ADDR
  24369. +/* AC97 and I2S are muxed on the Pb1200 board.
  24370. + Refer to board documentation.
  24371. + */
  24372. +#define AC97_PSC_BASE PSC1_BASE_ADDR
  24373. +#define I2S_PSC_BASE PSC1_BASE_ADDR
  24374. +
  24375. +#define BCSR_KSEG1_ADDR 0xB9800000
  24376. +
  24377. +typedef volatile struct
  24378. +{
  24379. + /*00*/ u16 whoami;
  24380. + u16 reserved0;
  24381. + /*04*/ u16 status;
  24382. + u16 reserved1;
  24383. + /*08*/ u16 switches;
  24384. + u16 reserved2;
  24385. + /*0C*/ u16 resets;
  24386. + u16 reserved3;
  24387. +
  24388. + /*10*/ u16 pcmcia;
  24389. + u16 reserved4;
  24390. + /*14*/ u16 board;
  24391. + u16 reserved5;
  24392. + /*18*/ u16 disk_leds;
  24393. + u16 reserved6;
  24394. + /*1C*/ u16 system;
  24395. + u16 reserved7;
  24396. +
  24397. + /*20*/ u16 intclr;
  24398. + u16 reserved8;
  24399. + /*24*/ u16 intset;
  24400. + u16 reserved9;
  24401. + /*28*/ u16 intclr_mask;
  24402. + u16 reserved10;
  24403. + /*2C*/ u16 intset_mask;
  24404. + u16 reserved11;
  24405. +
  24406. + /*30*/ u16 sig_status;
  24407. + u16 reserved12;
  24408. + /*34*/ u16 int_status;
  24409. + u16 reserved13;
  24410. + /*38*/ u16 reserved14;
  24411. + u16 reserved15;
  24412. + /*3C*/ u16 reserved16;
  24413. + u16 reserved17;
  24414. +
  24415. +} BCSR;
  24416. +
  24417. +static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  24418. +
  24419. +/*
  24420. + * Register bit definitions for the BCSRs
  24421. + */
  24422. +#define BCSR_WHOAMI_DCID 0x000F
  24423. +#define BCSR_WHOAMI_CPLD 0x00F0
  24424. +#define BCSR_WHOAMI_BOARD 0x0F00
  24425. +
  24426. +#define BCSR_STATUS_PCMCIA0VS 0x0003
  24427. +#define BCSR_STATUS_PCMCIA1VS 0x000C
  24428. +#define BCSR_STATUS_SWAPBOOT 0x0040
  24429. +#define BCSR_STATUS_FLASHBUSY 0x0100
  24430. +#define BCSR_STATUS_IDECBLID 0x0200
  24431. +#define BCSR_STATUS_SD0WP 0x0400
  24432. +#define BCSR_STATUS_U0RXD 0x1000
  24433. +#define BCSR_STATUS_U1RXD 0x2000
  24434. +
  24435. +#define BCSR_SWITCHES_OCTAL 0x00FF
  24436. +#define BCSR_SWITCHES_DIP_1 0x0080
  24437. +#define BCSR_SWITCHES_DIP_2 0x0040
  24438. +#define BCSR_SWITCHES_DIP_3 0x0020
  24439. +#define BCSR_SWITCHES_DIP_4 0x0010
  24440. +#define BCSR_SWITCHES_DIP_5 0x0008
  24441. +#define BCSR_SWITCHES_DIP_6 0x0004
  24442. +#define BCSR_SWITCHES_DIP_7 0x0002
  24443. +#define BCSR_SWITCHES_DIP_8 0x0001
  24444. +#define BCSR_SWITCHES_ROTARY 0x0F00
  24445. +
  24446. +#define BCSR_RESETS_ETH 0x0001
  24447. +#define BCSR_RESETS_CAMERA 0x0002
  24448. +#define BCSR_RESETS_DC 0x0004
  24449. +#define BCSR_RESETS_IDE 0x0008
  24450. +#define BCSR_RESETS_TV 0x0010
  24451. +/* not resets but in the same register */
  24452. +#define BCSR_RESETS_PWMR1mUX 0x0800
  24453. +#define BCSR_RESETS_PCS0MUX 0x1000
  24454. +#define BCSR_RESETS_PCS1MUX 0x2000
  24455. +#define BCSR_RESETS_SPISEL 0x4000
  24456. +
  24457. +#define BCSR_PCMCIA_PC0VPP 0x0003
  24458. +#define BCSR_PCMCIA_PC0VCC 0x000C
  24459. +#define BCSR_PCMCIA_PC0DRVEN 0x0010
  24460. +#define BCSR_PCMCIA_PC0RST 0x0080
  24461. +#define BCSR_PCMCIA_PC1VPP 0x0300
  24462. +#define BCSR_PCMCIA_PC1VCC 0x0C00
  24463. +#define BCSR_PCMCIA_PC1DRVEN 0x1000
  24464. +#define BCSR_PCMCIA_PC1RST 0x8000
  24465. +
  24466. +#define BCSR_BOARD_LCDVEE 0x0001
  24467. +#define BCSR_BOARD_LCDVDD 0x0002
  24468. +#define BCSR_BOARD_LCDBL 0x0004
  24469. +#define BCSR_BOARD_CAMSNAP 0x0010
  24470. +#define BCSR_BOARD_CAMPWR 0x0020
  24471. +#define BCSR_BOARD_SD0PWR 0x0040
  24472. +
  24473. +#define BCSR_LEDS_DECIMALS 0x0003
  24474. +#define BCSR_LEDS_LED0 0x0100
  24475. +#define BCSR_LEDS_LED1 0x0200
  24476. +#define BCSR_LEDS_LED2 0x0400
  24477. +#define BCSR_LEDS_LED3 0x0800
  24478. +
  24479. +#define BCSR_SYSTEM_POWEROFF 0x4000
  24480. +#define BCSR_SYSTEM_RESET 0x8000
  24481. +
  24482. +/* Bit positions for the different interrupt sources */
  24483. +#define BCSR_INT_IDE 0x0001
  24484. +#define BCSR_INT_ETH 0x0002
  24485. +#define BCSR_INT_PC0 0x0004
  24486. +#define BCSR_INT_PC0STSCHG 0x0008
  24487. +#define BCSR_INT_PC1 0x0010
  24488. +#define BCSR_INT_PC1STSCHG 0x0020
  24489. +#define BCSR_INT_DC 0x0040
  24490. +#define BCSR_INT_FLASHBUSY 0x0080
  24491. +#define BCSR_INT_PC0INSERT 0x0100
  24492. +#define BCSR_INT_PC0EJECT 0x0200
  24493. +#define BCSR_INT_PC1INSERT 0x0400
  24494. +#define BCSR_INT_PC1EJECT 0x0800
  24495. +#define BCSR_INT_SD0INSERT 0x1000
  24496. +#define BCSR_INT_SD0EJECT 0x2000
  24497. +
  24498. +#define AU1XXX_SMC91111_PHYS_ADDR (0x19000300)
  24499. +#define AU1XXX_SMC91111_IRQ DB1200_ETH_INT
  24500. +
  24501. +#define AU1XXX_ATA_PHYS_ADDR (0x18800000)
  24502. +#define AU1XXX_ATA_PHYS_LEN (0x100)
  24503. +#define AU1XXX_ATA_REG_OFFSET (5)
  24504. +#define AU1XXX_ATA_INT DB1200_IDE_INT
  24505. +#define AU1XXX_ATA_DDMA_REQ DSCR_CMD0_DMA_REQ1;
  24506. +#define AU1XXX_ATA_RQSIZE 128
  24507. +
  24508. +#define NAND_PHYS_ADDR 0x20000000
  24509. +
  24510. +/*
  24511. + * External Interrupts for Pb1200 as of 8/6/2004.
  24512. + * Bit positions in the CPLD registers can be calculated by taking
  24513. + * the interrupt define and subtracting the DB1200_INT_BEGIN value.
  24514. + * *example: IDE bis pos is = 64 - 64
  24515. + ETH bit pos is = 65 - 64
  24516. + */
  24517. +#define DB1200_INT_BEGIN (AU1000_LAST_INTC1_INT + 1)
  24518. +#define DB1200_IDE_INT (DB1200_INT_BEGIN + 0)
  24519. +#define DB1200_ETH_INT (DB1200_INT_BEGIN + 1)
  24520. +#define DB1200_PC0_INT (DB1200_INT_BEGIN + 2)
  24521. +#define DB1200_PC0_STSCHG_INT (DB1200_INT_BEGIN + 3)
  24522. +#define DB1200_PC1_INT (DB1200_INT_BEGIN + 4)
  24523. +#define DB1200_PC1_STSCHG_INT (DB1200_INT_BEGIN + 5)
  24524. +#define DB1200_DC_INT (DB1200_INT_BEGIN + 6)
  24525. +#define DB1200_FLASHBUSY_INT (DB1200_INT_BEGIN + 7)
  24526. +#define DB1200_PC0_INSERT_INT (DB1200_INT_BEGIN + 8)
  24527. +#define DB1200_PC0_EJECT_INT (DB1200_INT_BEGIN + 9)
  24528. +#define DB1200_PC1_INSERT_INT (DB1200_INT_BEGIN + 10)
  24529. +#define DB1200_PC1_EJECT_INT (DB1200_INT_BEGIN + 11)
  24530. +#define DB1200_SD0_INSERT_INT (DB1200_INT_BEGIN + 12)
  24531. +#define DB1200_SD0_EJECT_INT (DB1200_INT_BEGIN + 13)
  24532. +
  24533. +#define DB1200_INT_END (DB1200_INT_BEGIN + 15)
  24534. +
  24535. +/* For drivers/pcmcia/au1000_db1x00.c */
  24536. +#define BOARD_PC0_INT DB1200_PC0_INT
  24537. +#define BOARD_PC1_INT DB1200_PC1_INT
  24538. +#define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1<<(8+(2*SOCKET)))
  24539. +
  24540. +#endif /* __ASM_DB1200_H */
  24541. +
  24542. diff -Nur linux-2.4.32-rc1/include/asm-mips/db1x00.h linux-2.4.32-rc1.mips/include/asm-mips/db1x00.h
  24543. --- linux-2.4.32-rc1/include/asm-mips/db1x00.h 2005-01-19 15:10:11.000000000 +0100
  24544. +++ linux-2.4.32-rc1.mips/include/asm-mips/db1x00.h 2005-01-30 09:06:19.000000000 +0100
  24545. @@ -1,5 +1,5 @@
  24546. /*
  24547. - * AMD Alchemy DB1x00 Reference Boards
  24548. + * AMD Alchemy DB1x00 Reference Boards (BUT NOT DB1200)
  24549. *
  24550. * Copyright 2001 MontaVista Software Inc.
  24551. * Author: MontaVista Software, Inc.
  24552. @@ -36,9 +36,18 @@
  24553. #define AC97_PSC_BASE PSC1_BASE_ADDR
  24554. #define SMBUS_PSC_BASE PSC2_BASE_ADDR
  24555. #define I2S_PSC_BASE PSC3_BASE_ADDR
  24556. +#define NAND_CS 1
  24557. +/* for drivers/pcmcia/au1000_db1x00.c */
  24558. +#define BOARD_PC0_INT AU1000_GPIO_3
  24559. +#define BOARD_PC1_INT AU1000_GPIO_5
  24560. +#define BOARD_CARD_INSERTED(SOCKET) !(bcsr->status & (1<<(4+SOCKET)))
  24561. #else
  24562. #define BCSR_KSEG1_ADDR 0xAE000000
  24563. +/* for drivers/pcmcia/au1000_db1x00.c */
  24564. +#define BOARD_PC0_INT AU1000_GPIO_2
  24565. +#define BOARD_PC1_INT AU1000_GPIO_5
  24566. +#define BOARD_CARD_INSERTED(SOCKET) !(bcsr->status & (1<<(4+SOCKET)))
  24567. #endif
  24568. /*
  24569. @@ -66,6 +75,7 @@
  24570. } BCSR;
  24571. +static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  24572. /*
  24573. * Register/mask bit definitions for the BCSRs
  24574. @@ -130,14 +140,6 @@
  24575. #define BCSR_SWRESET_RESET 0x0080
  24576. -/* PCMCIA Db1x00 specific defines */
  24577. -#define PCMCIA_MAX_SOCK 1
  24578. -#define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1)
  24579. -
  24580. -/* VPP/VCC */
  24581. -#define SET_VCC_VPP(VCC, VPP, SLOT)\
  24582. - ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8))
  24583. -
  24584. /* MTD CONFIG OPTIONS */
  24585. #if defined(CONFIG_MTD_DB1X00_BOOT) && defined(CONFIG_MTD_DB1X00_USER)
  24586. #define DB1X00_BOTH_BANKS
  24587. @@ -147,48 +149,15 @@
  24588. #define DB1X00_USER_ONLY
  24589. #endif
  24590. -/* SD controller macros */
  24591. -/*
  24592. - * Detect card.
  24593. - */
  24594. -#define mmc_card_inserted(_n_, _res_) \
  24595. - do { \
  24596. - BCSR * const bcsr = (BCSR *)0xAE000000; \
  24597. - unsigned long mmc_wp, board_specific; \
  24598. - if ((_n_)) { \
  24599. - mmc_wp = BCSR_BOARD_SD1_WP; \
  24600. - } else { \
  24601. - mmc_wp = BCSR_BOARD_SD0_WP; \
  24602. - } \
  24603. - board_specific = au_readl((unsigned long)(&bcsr->specific)); \
  24604. - if (!(board_specific & mmc_wp)) {/* low means card present */ \
  24605. - *(int *)(_res_) = 1; \
  24606. - } else { \
  24607. - *(int *)(_res_) = 0; \
  24608. - } \
  24609. - } while (0)
  24610. -
  24611. +#if defined(CONFIG_BLK_DEV_IDE_AU1XXX) && defined(CONFIG_MIPS_DB1550)
  24612. /*
  24613. - * Apply power to card slot(s).
  24614. + * Daughter card information.
  24615. */
  24616. -#define mmc_power_on(_n_) \
  24617. - do { \
  24618. - BCSR * const bcsr = (BCSR *)0xAE000000; \
  24619. - unsigned long mmc_pwr, mmc_wp, board_specific; \
  24620. - if ((_n_)) { \
  24621. - mmc_pwr = BCSR_BOARD_SD1_PWR; \
  24622. - mmc_wp = BCSR_BOARD_SD1_WP; \
  24623. - } else { \
  24624. - mmc_pwr = BCSR_BOARD_SD0_PWR; \
  24625. - mmc_wp = BCSR_BOARD_SD0_WP; \
  24626. - } \
  24627. - board_specific = au_readl((unsigned long)(&bcsr->specific)); \
  24628. - if (!(board_specific & mmc_wp)) {/* low means card present */ \
  24629. - board_specific |= mmc_pwr; \
  24630. - au_writel(board_specific, (int)(&bcsr->specific)); \
  24631. - au_sync(); \
  24632. - } \
  24633. - } while (0)
  24634. +#define DAUGHTER_CARD_IRQ (AU1000_GPIO_8)
  24635. +/* DC_IDE */
  24636. +#define AU1XXX_ATA_PHYS_ADDR (0x0C000000)
  24637. +#define AU1XXX_ATA_REG_OFFSET (5)
  24638. +#endif /* CONFIG_MIPS_DB1550 */
  24639. #endif /* __ASM_DB1X00_H */
  24640. diff -Nur linux-2.4.32-rc1/include/asm-mips/elf.h linux-2.4.32-rc1.mips/include/asm-mips/elf.h
  24641. --- linux-2.4.32-rc1/include/asm-mips/elf.h 2004-02-18 14:36:32.000000000 +0100
  24642. +++ linux-2.4.32-rc1.mips/include/asm-mips/elf.h 2005-04-14 12:41:44.000000000 +0200
  24643. @@ -66,9 +66,10 @@
  24644. #define USE_ELF_CORE_DUMP
  24645. #define ELF_EXEC_PAGESIZE PAGE_SIZE
  24646. -#define ELF_CORE_COPY_REGS(_dest,_regs) \
  24647. - memcpy((char *) &_dest, (char *) _regs, \
  24648. - sizeof(struct pt_regs));
  24649. +extern void dump_regs(elf_greg_t *, struct pt_regs *regs);
  24650. +
  24651. +#define ELF_CORE_COPY_REGS(elf_regs, regs) \
  24652. + dump_regs((elf_greg_t *)&(elf_regs), regs);
  24653. /* This yields a mask that user programs can use to figure out what
  24654. instruction set this cpu supports. This could be done in userspace,
  24655. diff -Nur linux-2.4.32-rc1/include/asm-mips/ficmmp.h linux-2.4.32-rc1.mips/include/asm-mips/ficmmp.h
  24656. --- linux-2.4.32-rc1/include/asm-mips/ficmmp.h 1970-01-01 01:00:00.000000000 +0100
  24657. +++ linux-2.4.32-rc1.mips/include/asm-mips/ficmmp.h 2005-01-30 09:01:28.000000000 +0100
  24658. @@ -0,0 +1,156 @@
  24659. +/*
  24660. + * FIC MMP
  24661. + *
  24662. + * ########################################################################
  24663. + *
  24664. + * This program is free software; you can distribute it and/or modify it
  24665. + * under the terms of the GNU General Public License (Version 2) as
  24666. + * published by the Free Software Foundation.
  24667. + *
  24668. + * This program is distributed in the hope it will be useful, but WITHOUT
  24669. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  24670. + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  24671. + * for more details.
  24672. + *
  24673. + * You should have received a copy of the GNU General Public License along
  24674. + * with this program; if not, write to the Free Software Foundation, Inc.,
  24675. + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  24676. + *
  24677. + * ########################################################################
  24678. + *
  24679. + *
  24680. + */
  24681. +#ifndef __ASM_FICMMP_H
  24682. +#define __ASM_FICMMP_H
  24683. +
  24684. +#include <linux/types.h>
  24685. +#include <asm/au1000.h>
  24686. +#include <asm/au1xxx_gpio.h>
  24687. +
  24688. +// This is defined in au1000.h with bogus value
  24689. +#undef AU1X00_EXTERNAL_INT
  24690. +
  24691. +#define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX
  24692. +#define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX
  24693. +#define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC1_TX
  24694. +#define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC1_RX
  24695. +/* SPI and SMB are muxed on the Pb1200 board.
  24696. + Refer to board documentation.
  24697. + */
  24698. +#define SPI_PSC_BASE PSC0_BASE_ADDR
  24699. +#define SMBUS_PSC_BASE PSC0_BASE_ADDR
  24700. +/* AC97 and I2S are muxed on the Pb1200 board.
  24701. + Refer to board documentation.
  24702. + */
  24703. +#define AC97_PSC_BASE PSC1_BASE_ADDR
  24704. +#define I2S_PSC_BASE PSC1_BASE_ADDR
  24705. +
  24706. +
  24707. +/*
  24708. + * SMSC LAN91C111
  24709. + */
  24710. +#define AU1XXX_SMC91111_PHYS_ADDR (0xAC000300)
  24711. +#define AU1XXX_SMC91111_IRQ AU1000_GPIO_5
  24712. +
  24713. +/* DC_IDE and DC_ETHERNET */
  24714. +#define FICMMP_IDE_INT AU1000_GPIO_4
  24715. +
  24716. +#define AU1XXX_ATA_PHYS_ADDR (0x0C800000)
  24717. +#define AU1XXX_ATA_REG_OFFSET (5)
  24718. +/*
  24719. +#define AU1XXX_ATA_BASE (0x0C800000)
  24720. +#define AU1XXX_ATA_END (0x0CFFFFFF)
  24721. +#define AU1XXX_ATA_MEM_SIZE (AU1XXX_ATA_END - AU1XXX_ATA_BASE +1)
  24722. +
  24723. +#define AU1XXX_ATA_REG_OFFSET (5)
  24724. +*/
  24725. +/* VPP/VCC */
  24726. +#define SET_VCC_VPP(VCC, VPP, SLOT)\
  24727. + ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8))
  24728. +
  24729. +
  24730. +#define FICMMP_CONFIG_BASE 0xAD000000
  24731. +#define FICMMP_CONFIG_ENABLE 13
  24732. +
  24733. +#define FICMMP_CONFIG_I2SFREQ(N) (N<<0)
  24734. +#define FICMMP_CONFIG_I2SXTAL0 (1<<0)
  24735. +#define FICMMP_CONFIG_I2SXTAL1 (1<<1)
  24736. +#define FICMMP_CONFIG_I2SXTAL2 (1<<2)
  24737. +#define FICMMP_CONFIG_I2SXTAL3 (1<<3)
  24738. +#define FICMMP_CONFIG_ADV1 (1<<4)
  24739. +#define FICMMP_CONFIG_IDERST (1<<5)
  24740. +#define FICMMP_CONFIG_LCMEN (1<<6)
  24741. +#define FICMMP_CONFIG_CAMPWDN (1<<7)
  24742. +#define FICMMP_CONFIG_USBPWREN (1<<8)
  24743. +#define FICMMP_CONFIG_LCMPWREN (1<<9)
  24744. +#define FICMMP_CONFIG_TVOUTPWREN (1<<10)
  24745. +#define FICMMP_CONFIG_RS232PWREN (1<<11)
  24746. +#define FICMMP_CONFIG_LCMDATAOUT (1<<12)
  24747. +#define FICMMP_CONFIG_TVODATAOUT (1<<13)
  24748. +#define FICMMP_CONFIG_ADV3 (1<<14)
  24749. +#define FICMMP_CONFIG_ADV4 (1<<15)
  24750. +
  24751. +#define I2S_FREQ_8_192 (0x0)
  24752. +#define I2S_FREQ_11_2896 (0x1)
  24753. +#define I2S_FREQ_12_288 (0x2)
  24754. +#define I2S_FREQ_24_576 (0x3)
  24755. +//#define I2S_FREQ_12_288 (0x4)
  24756. +#define I2S_FREQ_16_9344 (0x5)
  24757. +#define I2S_FREQ_18_432 (0x6)
  24758. +#define I2S_FREQ_36_864 (0x7)
  24759. +#define I2S_FREQ_16_384 (0x8)
  24760. +#define I2S_FREQ_22_5792 (0x9)
  24761. +//#define I2S_FREQ_24_576 (0x10)
  24762. +#define I2S_FREQ_49_152 (0x11)
  24763. +//#define I2S_FREQ_24_576 (0x12)
  24764. +#define I2S_FREQ_33_8688 (0x13)
  24765. +//#define I2S_FREQ_36_864 (0x14)
  24766. +#define I2S_FREQ_73_728 (0x15)
  24767. +
  24768. +#define FICMMP_IDE_PWR 9
  24769. +#define FICMMP_FOCUS_RST 2
  24770. +
  24771. +static __inline void ficmmp_config_set(u16 bits)
  24772. +{
  24773. + extern u16 ficmmp_config;
  24774. + //printk("set_config: %X, Old: %X, New: %X\n", bits, ficmmp_config, ficmmp_config | bits);
  24775. + ficmmp_config |= bits;
  24776. + *((u16*)FICMMP_CONFIG_BASE) = ficmmp_config;
  24777. +}
  24778. +
  24779. +static __inline void ficmmp_config_clear(u16 bits)
  24780. +{
  24781. + extern u16 ficmmp_config;
  24782. +// printk("clear_config: %X, Old: %X, New: %X\n", bits, ficmmp_config, ficmmp_config & ~bits);
  24783. + ficmmp_config &= ~bits;
  24784. + *((u16*)FICMMP_CONFIG_BASE) = ficmmp_config;
  24785. +}
  24786. +
  24787. +static __inline void ficmmp_config_init(void)
  24788. +{
  24789. + au1xxx_gpio_write(FICMMP_CONFIG_ENABLE, 0); //Enable configuration latch
  24790. + ficmmp_config_set(FICMMP_CONFIG_LCMDATAOUT | FICMMP_CONFIG_TVODATAOUT | FICMMP_CONFIG_IDERST); //Disable display data buffers
  24791. + ficmmp_config_set(FICMMP_CONFIG_I2SFREQ(I2S_FREQ_36_864));
  24792. +}
  24793. +
  24794. +static __inline u32 ficmmp_set_i2s_sample_rate(u32 rate)
  24795. +{
  24796. + u32 freq;
  24797. +
  24798. + switch(rate)
  24799. + {
  24800. + case 88200:
  24801. + case 44100:
  24802. + case 8018: freq = I2S_FREQ_11_2896; break;
  24803. + case 48000:
  24804. + case 32000: //freq = I2S_FREQ_18_432; break;
  24805. + case 8000: freq = I2S_FREQ_12_288; break;
  24806. + default: freq = I2S_FREQ_12_288; rate = 8000;
  24807. + }
  24808. + ficmmp_config_clear(FICMMP_CONFIG_I2SFREQ(0xF));
  24809. + ficmmp_config_set(FICMMP_CONFIG_I2SFREQ(freq));
  24810. + return rate;
  24811. +}
  24812. +
  24813. +#endif /* __ASM_FICMMP_H */
  24814. +
  24815. diff -Nur linux-2.4.32-rc1/include/asm-mips/hazards.h linux-2.4.32-rc1.mips/include/asm-mips/hazards.h
  24816. --- linux-2.4.32-rc1/include/asm-mips/hazards.h 2004-02-18 14:36:32.000000000 +0100
  24817. +++ linux-2.4.32-rc1.mips/include/asm-mips/hazards.h 2005-06-06 16:46:22.000000000 +0200
  24818. @@ -3,7 +3,7 @@
  24819. * License. See the file "COPYING" in the main directory of this archive
  24820. * for more details.
  24821. *
  24822. - * Copyright (C) 2003 Ralf Baechle
  24823. + * Copyright (C) 2003, 2004 Ralf Baechle
  24824. */
  24825. #ifndef _ASM_HAZARDS_H
  24826. #define _ASM_HAZARDS_H
  24827. @@ -12,38 +12,200 @@
  24828. #ifdef __ASSEMBLY__
  24829. + .macro _ssnop
  24830. + sll $0, $0, 1
  24831. + .endm
  24832. +
  24833. /*
  24834. * RM9000 hazards. When the JTLB is updated by tlbwi or tlbwr, a subsequent
  24835. * use of the JTLB for instructions should not occur for 4 cpu cycles and use
  24836. * for data translations should not occur for 3 cpu cycles.
  24837. */
  24838. #ifdef CONFIG_CPU_RM9000
  24839. -#define rm9000_tlb_hazard \
  24840. +
  24841. +#define mtc0_tlbw_hazard \
  24842. .set push; \
  24843. .set mips32; \
  24844. - ssnop; ssnop; ssnop; ssnop; \
  24845. + _ssnop; _ssnop; _ssnop; _ssnop; \
  24846. .set pop
  24847. +
  24848. +#define tlbw_eret_hazard \
  24849. + .set push; \
  24850. + .set mips32; \
  24851. + _ssnop; _ssnop; _ssnop; _ssnop; \
  24852. + .set pop
  24853. +
  24854. #else
  24855. -#define rm9000_tlb_hazard
  24856. +
  24857. +/*
  24858. + * The taken branch will result in a two cycle penalty for the two killed
  24859. + * instructions on R4000 / R4400. Other processors only have a single cycle
  24860. + * hazard so this is nice trick to have an optimal code for a range of
  24861. + * processors.
  24862. + */
  24863. +#define mtc0_tlbw_hazard \
  24864. + b . + 8
  24865. +#define tlbw_eret_hazard \
  24866. + nop
  24867. #endif
  24868. +/*
  24869. + * mtc0->mfc0 hazard
  24870. + * The 24K has a 2 cycle mtc0/mfc0 execution hazard.
  24871. + * It is a MIPS32R2 processor so ehb will clear the hazard.
  24872. + */
  24873. +
  24874. +#ifdef CONFIG_CPU_MIPSR2
  24875. +/*
  24876. + * Use a macro for ehb unless explicit support for MIPSR2 is enabled
  24877. + */
  24878. + .macro ehb
  24879. + sll $0, $0, 3
  24880. + .endm
  24881. +
  24882. +#define irq_enable_hazard \
  24883. + ehb # irq_enable_hazard
  24884. +
  24885. +#define irq_disable_hazard \
  24886. + ehb # irq_disable_hazard
  24887. +
  24888. +#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000)
  24889. +
  24890. +/*
  24891. + * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
  24892. + */
  24893. +
  24894. +#define irq_enable_hazard
  24895. +
  24896. +#define irq_disable_hazard
  24897. +
  24898. #else
  24899. /*
  24900. + * Classic MIPS needs 1 - 3 nops or ssnops
  24901. + */
  24902. +#define irq_enable_hazard
  24903. +#define irq_disable_hazard \
  24904. + _ssnop; _ssnop; _ssnop
  24905. +
  24906. +#endif
  24907. +
  24908. +#else /* __ASSEMBLY__ */
  24909. +
  24910. +/*
  24911. * RM9000 hazards. When the JTLB is updated by tlbwi or tlbwr, a subsequent
  24912. * use of the JTLB for instructions should not occur for 4 cpu cycles and use
  24913. * for data translations should not occur for 3 cpu cycles.
  24914. */
  24915. #ifdef CONFIG_CPU_RM9000
  24916. -#define rm9000_tlb_hazard() \
  24917. +
  24918. +#define mtc0_tlbw_hazard() \
  24919. __asm__ __volatile__( \
  24920. ".set\tmips32\n\t" \
  24921. - "ssnop; ssnop; ssnop; ssnop\n\t" \
  24922. + "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
  24923. + ".set\tmips0")
  24924. +
  24925. +#define tlbw_use_hazard() \
  24926. + __asm__ __volatile__( \
  24927. + ".set\tmips32\n\t" \
  24928. + "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
  24929. ".set\tmips0")
  24930. #else
  24931. -#define rm9000_tlb_hazard() do { } while (0)
  24932. +
  24933. +/*
  24934. + * Overkill warning ...
  24935. + */
  24936. +#define mtc0_tlbw_hazard() \
  24937. + __asm__ __volatile__( \
  24938. + ".set noreorder\n\t" \
  24939. + "nop; nop; nop; nop; nop; nop;\n\t" \
  24940. + ".set reorder\n\t")
  24941. +
  24942. +#define tlbw_use_hazard() \
  24943. + __asm__ __volatile__( \
  24944. + ".set noreorder\n\t" \
  24945. + "nop; nop; nop; nop; nop; nop;\n\t" \
  24946. + ".set reorder\n\t")
  24947. +
  24948. #endif
  24949. +/*
  24950. + * mtc0->mfc0 hazard
  24951. + * The 24K has a 2 cycle mtc0/mfc0 execution hazard.
  24952. + * It is a MIPS32R2 processor so ehb will clear the hazard.
  24953. + */
  24954. +
  24955. +#ifdef CONFIG_CPU_MIPSR2
  24956. +/*
  24957. + * Use a macro for ehb unless explicit support for MIPSR2 is enabled
  24958. + */
  24959. +__asm__(
  24960. + " .macro ehb \n\t"
  24961. + " sll $0, $0, 3 \n\t"
  24962. + " .endm \n\t"
  24963. + " \n\t"
  24964. + " .macro\tirq_enable_hazard \n\t"
  24965. + " ehb \n\t"
  24966. + " .endm \n\t"
  24967. + " \n\t"
  24968. + " .macro\tirq_disable_hazard \n\t"
  24969. + " ehb \n\t"
  24970. + " .endm");
  24971. +
  24972. +#define irq_enable_hazard() \
  24973. + __asm__ __volatile__( \
  24974. + "ehb\t\t\t\t# irq_enable_hazard")
  24975. +
  24976. +#define irq_disable_hazard() \
  24977. + __asm__ __volatile__( \
  24978. + "ehb\t\t\t\t# irq_disable_hazard")
  24979. +
  24980. +#elif defined(CONFIG_CPU_R10000)
  24981. +
  24982. +/*
  24983. + * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
  24984. + */
  24985. +
  24986. +__asm__(
  24987. + " .macro\tirq_enable_hazard \n\t"
  24988. + " .endm \n\t"
  24989. + " \n\t"
  24990. + " .macro\tirq_disable_hazard \n\t"
  24991. + " .endm");
  24992. +
  24993. +#define irq_enable_hazard() do { } while (0)
  24994. +#define irq_disable_hazard() do { } while (0)
  24995. +
  24996. +#else
  24997. +
  24998. +/*
  24999. + * Default for classic MIPS processors. Assume worst case hazards but don't
  25000. + * care about the irq_enable_hazard - sooner or later the hardware will
  25001. + * enable it and we don't care when exactly.
  25002. + */
  25003. +
  25004. +__asm__(
  25005. + " .macro _ssnop \n\t"
  25006. + " sll $0, $2, 1 \n\t"
  25007. + " .endm \n\t"
  25008. + " \n\t"
  25009. + " # \n\t"
  25010. + " # There is a hazard but we do not care \n\t"
  25011. + " # \n\t"
  25012. + " .macro\tirq_enable_hazard \n\t"
  25013. + " .endm \n\t"
  25014. + " \n\t"
  25015. + " .macro\tirq_disable_hazard \n\t"
  25016. + " _ssnop; _ssnop; _ssnop \n\t"
  25017. + " .endm");
  25018. +
  25019. +#define irq_enable_hazard() do { } while (0)
  25020. +#define irq_disable_hazard() \
  25021. + __asm__ __volatile__( \
  25022. + "_ssnop; _ssnop; _ssnop;\t\t# irq_disable_hazard")
  25023. +
  25024. #endif
  25025. +#endif /* __ASSEMBLY__ */
  25026. +
  25027. #endif /* _ASM_HAZARDS_H */
  25028. diff -Nur linux-2.4.32-rc1/include/asm-mips/ide.h linux-2.4.32-rc1.mips/include/asm-mips/ide.h
  25029. --- linux-2.4.32-rc1/include/asm-mips/ide.h 2003-08-25 13:44:43.000000000 +0200
  25030. +++ linux-2.4.32-rc1.mips/include/asm-mips/ide.h 2005-04-19 14:26:53.000000000 +0200
  25031. @@ -32,12 +32,12 @@
  25032. extern struct ide_ops *ide_ops;
  25033. -static __inline__ int ide_default_irq(ide_ioreg_t base)
  25034. +static inline int ide_default_irq(ide_ioreg_t base)
  25035. {
  25036. return ide_ops->ide_default_irq(base);
  25037. }
  25038. -static __inline__ ide_ioreg_t ide_default_io_base(int index)
  25039. +static inline ide_ioreg_t ide_default_io_base(int index)
  25040. {
  25041. return ide_ops->ide_default_io_base(index);
  25042. }
  25043. @@ -48,7 +48,7 @@
  25044. ide_ops->ide_init_hwif_ports(hw, data_port, ctrl_port, irq);
  25045. }
  25046. -static __inline__ void ide_init_default_hwifs(void)
  25047. +static inline void ide_init_default_hwifs(void)
  25048. {
  25049. #ifndef CONFIG_BLK_DEV_IDEPCI
  25050. hw_regs_t hw;
  25051. @@ -68,7 +68,89 @@
  25052. #define ide_ack_intr(hwif) ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1)
  25053. #endif
  25054. -#include <asm-generic/ide_iops.h>
  25055. +/* MIPS port and memory-mapped I/O string operations. */
  25056. +
  25057. +static inline void __ide_flush_dcache_range(unsigned long addr, unsigned long size)
  25058. +{
  25059. + if (cpu_has_dc_aliases) {
  25060. + unsigned long end = addr + size;
  25061. + for (; addr < end; addr += PAGE_SIZE)
  25062. + flush_dcache_page(virt_to_page(addr));
  25063. + }
  25064. +}
  25065. +
  25066. +static inline void __ide_insw(unsigned long port, void *addr,
  25067. + unsigned int count)
  25068. +{
  25069. + insw(port, addr, count);
  25070. + __ide_flush_dcache_range((unsigned long)addr, count * 2);
  25071. +}
  25072. +
  25073. +static inline void __ide_insl(unsigned long port, void *addr, unsigned int count)
  25074. +{
  25075. + insl(port, addr, count);
  25076. + __ide_flush_dcache_range((unsigned long)addr, count * 4);
  25077. +}
  25078. +
  25079. +static inline void __ide_outsw(unsigned long port, const void *addr,
  25080. + unsigned long count)
  25081. +{
  25082. + outsw(port, addr, count);
  25083. + __ide_flush_dcache_range((unsigned long)addr, count * 2);
  25084. +}
  25085. +
  25086. +static inline void __ide_outsl(unsigned long port, const void *addr,
  25087. + unsigned long count)
  25088. +{
  25089. + outsl(port, addr, count);
  25090. + __ide_flush_dcache_range((unsigned long)addr, count * 4);
  25091. +}
  25092. +
  25093. +static inline void __ide_mm_insw(unsigned long port, void *addr, u32 count)
  25094. +{
  25095. + unsigned long start = (unsigned long) addr;
  25096. +
  25097. + while (count--) {
  25098. + *(u16 *)addr = readw(port);
  25099. + addr += 2;
  25100. + }
  25101. + __ide_flush_dcache_range(start, count * 2);
  25102. +}
  25103. +
  25104. +static inline void __ide_mm_insl(unsigned long port, void *addr, u32 count)
  25105. +{
  25106. + unsigned long start = (unsigned long) addr;
  25107. +
  25108. + while (count--) {
  25109. + *(u32 *)addr = readl(port);
  25110. + addr += 4;
  25111. + }
  25112. + __ide_flush_dcache_range(start, count * 4);
  25113. +}
  25114. +
  25115. +static inline void __ide_mm_outsw(unsigned long port, const void *addr,
  25116. + u32 count)
  25117. +{
  25118. + unsigned long start = (unsigned long) addr;
  25119. +
  25120. + while (count--) {
  25121. + writew(*(u16 *)addr, port);
  25122. + addr += 2;
  25123. + }
  25124. + __ide_flush_dcache_range(start, count * 2);
  25125. +}
  25126. +
  25127. +static inline void __ide_mm_outsl(unsigned long port, const void *addr,
  25128. + u32 count)
  25129. +{
  25130. + unsigned long start = (unsigned long) addr;
  25131. +
  25132. + while (count--) {
  25133. + writel(*(u32 *)addr, port);
  25134. + addr += 4;
  25135. + }
  25136. + __ide_flush_dcache_range(start, count * 4);
  25137. +}
  25138. #endif /* __KERNEL__ */
  25139. diff -Nur linux-2.4.32-rc1/include/asm-mips/io.h linux-2.4.32-rc1.mips/include/asm-mips/io.h
  25140. --- linux-2.4.32-rc1/include/asm-mips/io.h 2003-08-25 13:44:43.000000000 +0200
  25141. +++ linux-2.4.32-rc1.mips/include/asm-mips/io.h 2005-04-19 14:24:16.000000000 +0200
  25142. @@ -392,7 +392,8 @@
  25143. return __ioswab32(__val);
  25144. }
  25145. -static inline void __outsb(unsigned long port, void *addr, unsigned int count)
  25146. +static inline void __outsb(unsigned long port, const void *addr,
  25147. + unsigned int count)
  25148. {
  25149. while (count--) {
  25150. outb(*(u8 *)addr, port);
  25151. @@ -408,7 +409,8 @@
  25152. }
  25153. }
  25154. -static inline void __outsw(unsigned long port, void *addr, unsigned int count)
  25155. +static inline void __outsw(unsigned long port, const void *addr,
  25156. + unsigned int count)
  25157. {
  25158. while (count--) {
  25159. outw(*(u16 *)addr, port);
  25160. @@ -424,7 +426,8 @@
  25161. }
  25162. }
  25163. -static inline void __outsl(unsigned long port, void *addr, unsigned int count)
  25164. +static inline void __outsl(unsigned long port, const void *addr,
  25165. + unsigned int count)
  25166. {
  25167. while (count--) {
  25168. outl(*(u32 *)addr, port);
  25169. diff -Nur linux-2.4.32-rc1/include/asm-mips/mipsregs.h linux-2.4.32-rc1.mips/include/asm-mips/mipsregs.h
  25170. --- linux-2.4.32-rc1/include/asm-mips/mipsregs.h 2005-01-19 15:10:12.000000000 +0100
  25171. +++ linux-2.4.32-rc1.mips/include/asm-mips/mipsregs.h 2005-02-06 22:24:22.000000000 +0100
  25172. @@ -757,10 +757,18 @@
  25173. #define read_c0_config1() __read_32bit_c0_register($16, 1)
  25174. #define read_c0_config2() __read_32bit_c0_register($16, 2)
  25175. #define read_c0_config3() __read_32bit_c0_register($16, 3)
  25176. +#define read_c0_config4() __read_32bit_c0_register($16, 4)
  25177. +#define read_c0_config5() __read_32bit_c0_register($16, 5)
  25178. +#define read_c0_config6() __read_32bit_c0_register($16, 6)
  25179. +#define read_c0_config7() __read_32bit_c0_register($16, 7)
  25180. #define write_c0_config(val) __write_32bit_c0_register($16, 0, val)
  25181. #define write_c0_config1(val) __write_32bit_c0_register($16, 1, val)
  25182. #define write_c0_config2(val) __write_32bit_c0_register($16, 2, val)
  25183. #define write_c0_config3(val) __write_32bit_c0_register($16, 3, val)
  25184. +#define write_c0_config4(val) __write_32bit_c0_register($16, 4, val)
  25185. +#define write_c0_config5(val) __write_32bit_c0_register($16, 5, val)
  25186. +#define write_c0_config6(val) __write_32bit_c0_register($16, 6, val)
  25187. +#define write_c0_config7(val) __write_32bit_c0_register($16, 7, val)
  25188. /*
  25189. * The WatchLo register. There may be upto 8 of them.
  25190. @@ -874,42 +882,34 @@
  25191. */
  25192. static inline void tlb_probe(void)
  25193. {
  25194. - rm9000_tlb_hazard();
  25195. __asm__ __volatile__(
  25196. ".set noreorder\n\t"
  25197. "tlbp\n\t"
  25198. ".set reorder");
  25199. - rm9000_tlb_hazard();
  25200. }
  25201. static inline void tlb_read(void)
  25202. {
  25203. - rm9000_tlb_hazard();
  25204. __asm__ __volatile__(
  25205. ".set noreorder\n\t"
  25206. "tlbr\n\t"
  25207. ".set reorder");
  25208. - rm9000_tlb_hazard();
  25209. }
  25210. static inline void tlb_write_indexed(void)
  25211. {
  25212. - rm9000_tlb_hazard();
  25213. __asm__ __volatile__(
  25214. ".set noreorder\n\t"
  25215. "tlbwi\n\t"
  25216. ".set reorder");
  25217. - rm9000_tlb_hazard();
  25218. }
  25219. static inline void tlb_write_random(void)
  25220. {
  25221. - rm9000_tlb_hazard();
  25222. __asm__ __volatile__(
  25223. ".set noreorder\n\t"
  25224. "tlbwr\n\t"
  25225. ".set reorder");
  25226. - rm9000_tlb_hazard();
  25227. }
  25228. /*
  25229. diff -Nur linux-2.4.32-rc1/include/asm-mips/mmu_context.h linux-2.4.32-rc1.mips/include/asm-mips/mmu_context.h
  25230. --- linux-2.4.32-rc1/include/asm-mips/mmu_context.h 2005-01-19 15:10:12.000000000 +0100
  25231. +++ linux-2.4.32-rc1.mips/include/asm-mips/mmu_context.h 2004-11-22 14:38:29.000000000 +0100
  25232. @@ -27,7 +27,7 @@
  25233. #define TLBMISS_HANDLER_SETUP_PGD(pgd) \
  25234. pgd_current[smp_processor_id()] = (unsigned long)(pgd)
  25235. #define TLBMISS_HANDLER_SETUP() \
  25236. - write_c0_context((unsigned long) smp_processor_id() << (23 + 3)); \
  25237. + write_c0_context((unsigned long) smp_processor_id() << 23); \
  25238. TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
  25239. extern unsigned long pgd_current[];
  25240. diff -Nur linux-2.4.32-rc1/include/asm-mips/pb1100.h linux-2.4.32-rc1.mips/include/asm-mips/pb1100.h
  25241. --- linux-2.4.32-rc1/include/asm-mips/pb1100.h 2003-08-25 13:44:44.000000000 +0200
  25242. +++ linux-2.4.32-rc1.mips/include/asm-mips/pb1100.h 2005-01-30 09:10:29.000000000 +0100
  25243. @@ -1,5 +1,5 @@
  25244. /*
  25245. - * Alchemy Semi PB1100 Referrence Board
  25246. + * AMD Alchemy PB1100 Reference Boards
  25247. *
  25248. * Copyright 2001 MontaVista Software Inc.
  25249. * Author: MontaVista Software, Inc.
  25250. @@ -27,55 +27,108 @@
  25251. #ifndef __ASM_PB1100_H
  25252. #define __ASM_PB1100_H
  25253. -#define PB1100_IDENT 0xAE000000
  25254. -#define BOARD_STATUS_REG 0xAE000004
  25255. - #define PB1100_ROM_SEL (1<<15)
  25256. - #define PB1100_ROM_SIZ (1<<14)
  25257. - #define PB1100_SWAP_BOOT (1<<13)
  25258. - #define PB1100_FLASH_WP (1<<12)
  25259. - #define PB1100_ROM_H_STS (1<<11)
  25260. - #define PB1100_ROM_L_STS (1<<10)
  25261. - #define PB1100_FLASH_H_STS (1<<9)
  25262. - #define PB1100_FLASH_L_STS (1<<8)
  25263. - #define PB1100_SRAM_SIZ (1<<7)
  25264. - #define PB1100_TSC_BUSY (1<<6)
  25265. - #define PB1100_PCMCIA_VS_MASK (3<<4)
  25266. - #define PB1100_RS232_CD (1<<3)
  25267. - #define PB1100_RS232_CTS (1<<2)
  25268. - #define PB1100_RS232_DSR (1<<1)
  25269. - #define PB1100_RS232_RI (1<<0)
  25270. -
  25271. -#define PB1100_IRDA_RS232 0xAE00000C
  25272. - #define PB1100_IRDA_FULL (0<<14) /* full power */
  25273. - #define PB1100_IRDA_SHUTDOWN (1<<14)
  25274. - #define PB1100_IRDA_TT (2<<14) /* 2/3 power */
  25275. - #define PB1100_IRDA_OT (3<<14) /* 1/3 power */
  25276. - #define PB1100_IRDA_FIR (1<<13)
  25277. -
  25278. -#define PCMCIA_BOARD_REG 0xAE000010
  25279. - #define PB1100_SD_WP1_RO (1<<15) /* read only */
  25280. - #define PB1100_SD_WP0_RO (1<<14) /* read only */
  25281. - #define PB1100_SD_PWR1 (1<<11) /* applies power to SD1 */
  25282. - #define PB1100_SD_PWR0 (1<<10) /* applies power to SD0 */
  25283. - #define PB1100_SEL_SD_CONN1 (1<<9)
  25284. - #define PB1100_SEL_SD_CONN0 (1<<8)
  25285. - #define PC_DEASSERT_RST (1<<7)
  25286. - #define PC_DRV_EN (1<<4)
  25287. -
  25288. -#define PB1100_G_CONTROL 0xAE000014 /* graphics control */
  25289. -
  25290. -#define PB1100_RST_VDDI 0xAE00001C
  25291. - #define PB1100_SOFT_RESET (1<<15) /* clear to reset the board */
  25292. - #define PB1100_VDDI_MASK (0x1F)
  25293. +#define BCSR_KSEG1_ADDR 0xAE000000
  25294. +
  25295. +/*
  25296. + * Overlay data structure of the Pb1100 board registers.
  25297. + * Registers located at physical 0E0000xx, KSEG1 0xAE0000xx
  25298. + */
  25299. +typedef volatile struct
  25300. +{
  25301. + /*00*/ unsigned short whoami;
  25302. + unsigned short reserved0;
  25303. + /*04*/ unsigned short status;
  25304. + unsigned short reserved1;
  25305. + /*08*/ unsigned short switches;
  25306. + unsigned short reserved2;
  25307. + /*0C*/ unsigned short resets;
  25308. + unsigned short reserved3;
  25309. + /*10*/ unsigned short pcmcia;
  25310. + unsigned short reserved4;
  25311. + /*14*/ unsigned short graphics;
  25312. + unsigned short reserved5;
  25313. + /*18*/ unsigned short leds;
  25314. + unsigned short reserved6;
  25315. + /*1C*/ unsigned short swreset;
  25316. + unsigned short reserved7;
  25317. +
  25318. +} BCSR;
  25319. -#define PB1100_LEDS 0xAE000018
  25320. -/* 11:8 is 4 discreet LEDs. Clearing a bit illuminates the LED.
  25321. - * 7:0 is the LED Display's decimal points.
  25322. +/*
  25323. + * Register/mask bit definitions for the BCSRs
  25324. */
  25325. -#define PB1100_HEX_LED 0xAE000018
  25326. +#define BCSR_WHOAMI_DCID 0x000F
  25327. +#define BCSR_WHOAMI_CPLD 0x00F0
  25328. +#define BCSR_WHOAMI_BOARD 0x0F00
  25329. +
  25330. +#define BCSR_STATUS_RS232_RI 0x0001
  25331. +#define BCSR_STATUS_RS232_DSR 0x0002
  25332. +#define BCSR_STATUS_RS232_CTS 0x0004
  25333. +#define BCSR_STATUS_RS232_CD 0x0008
  25334. +#define BCSR_STATUS_PCMCIA_VS_MASK 0x0030
  25335. +#define BCSR_STATUS_TSC_BUSY 0x0040
  25336. +#define BCSR_STATUS_SRAM_SIZ 0x0080
  25337. +#define BCSR_STATUS_FLASH_L_STS 0x0100
  25338. +#define BCSR_STATUS_FLASH_H_STS 0x0200
  25339. +#define BCSR_STATUS_ROM_H_STS 0x0400
  25340. +#define BCSR_STATUS_ROM_L_STS 0x0800
  25341. +#define BCSR_STATUS_FLASH_WP 0x1000
  25342. +#define BCSR_STATUS_SWAP_BOOT 0x2000
  25343. +#define BCSR_STATUS_ROM_SIZ 0x4000
  25344. +#define BCSR_STATUS_ROM_SEL 0x8000
  25345. +
  25346. +#define BCSR_SWITCHES_DIP 0x00FF
  25347. +#define BCSR_SWITCHES_DIP_1 0x0080
  25348. +#define BCSR_SWITCHES_DIP_2 0x0040
  25349. +#define BCSR_SWITCHES_DIP_3 0x0020
  25350. +#define BCSR_SWITCHES_DIP_4 0x0010
  25351. +#define BCSR_SWITCHES_DIP_5 0x0008
  25352. +#define BCSR_SWITCHES_DIP_6 0x0004
  25353. +#define BCSR_SWITCHES_DIP_7 0x0002
  25354. +#define BCSR_SWITCHES_DIP_8 0x0001
  25355. +#define BCSR_SWITCHES_ROTARY 0x0F00
  25356. +#define BCSR_SWITCHES_SDO_CL 0x8000
  25357. +
  25358. +#define BCSR_RESETS_PHY0 0x0001
  25359. +#define BCSR_RESETS_PHY1 0x0002
  25360. +#define BCSR_RESETS_DC 0x0004
  25361. +#define BCSR_RESETS_RS232_RTS 0x0100
  25362. +#define BCSR_RESETS_RS232_DTR 0x0200
  25363. +#define BCSR_RESETS_FIR_SEL 0x2000
  25364. +#define BCSR_RESETS_IRDA_MODE_MASK 0xC000
  25365. +#define BCSR_RESETS_IRDA_MODE_FULL 0x0000
  25366. +#define BCSR_RESETS_IRDA_MODE_OFF 0x4000
  25367. +#define BCSR_RESETS_IRDA_MODE_2_3 0x8000
  25368. +#define BCSR_RESETS_IRDA_MODE_1_3 0xC000
  25369. +
  25370. +#define BCSR_PCMCIA_PC0VPP 0x0003
  25371. +#define BCSR_PCMCIA_PC0VCC 0x000C
  25372. +#define BCSR_PCMCIA_PC0_DR_VEN 0x0010
  25373. +#define BCSR_PCMCIA_PC0RST 0x0080
  25374. +#define BCSR_PCMCIA_SEL_SD_CON0 0x0100
  25375. +#define BCSR_PCMCIA_SEL_SD_CON1 0x0200
  25376. +#define BCSR_PCMCIA_SD0_PWR 0x0400
  25377. +#define BCSR_PCMCIA_SD1_PWR 0x0800
  25378. +#define BCSR_PCMCIA_SD0_WP 0x4000
  25379. +#define BCSR_PCMCIA_SD1_WP 0x8000
  25380. +
  25381. +#define PB1100_G_CONTROL 0xAE000014
  25382. +#define BCSR_GRAPHICS_GPX_SMPASS 0x0010
  25383. +#define BCSR_GRAPHICS_GPX_BIG_ENDIAN 0x0020
  25384. +#define BCSR_GRAPHICS_GPX_RST 0x0040
  25385. +
  25386. +#define BCSR_LEDS_DECIMALS 0x00FF
  25387. +#define BCSR_LEDS_LED0 0x0100
  25388. +#define BCSR_LEDS_LED1 0x0200
  25389. +#define BCSR_LEDS_LED2 0x0400
  25390. +#define BCSR_LEDS_LED3 0x0800
  25391. +
  25392. +#define BCSR_SWRESET_RESET 0x0080
  25393. +#define BCSR_VDDI_VDI 0x001F
  25394. -/* PCMCIA PB1100 specific defines */
  25395. +
  25396. + /* PCMCIA Pb1x00 specific defines */
  25397. #define PCMCIA_MAX_SOCK 0
  25398. #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1)
  25399. @@ -83,3 +136,4 @@
  25400. #define SET_VCC_VPP(VCC, VPP) (((VCC)<<2) | ((VPP)<<0))
  25401. #endif /* __ASM_PB1100_H */
  25402. +
  25403. diff -Nur linux-2.4.32-rc1/include/asm-mips/pb1200.h linux-2.4.32-rc1.mips/include/asm-mips/pb1200.h
  25404. --- linux-2.4.32-rc1/include/asm-mips/pb1200.h 1970-01-01 01:00:00.000000000 +0100
  25405. +++ linux-2.4.32-rc1.mips/include/asm-mips/pb1200.h 2005-01-30 09:01:28.000000000 +0100
  25406. @@ -0,0 +1,244 @@
  25407. +/*
  25408. + * AMD Alchemy PB1200 Referrence Board
  25409. + * Board Registers defines.
  25410. + *
  25411. + * ########################################################################
  25412. + *
  25413. + * This program is free software; you can distribute it and/or modify it
  25414. + * under the terms of the GNU General Public License (Version 2) as
  25415. + * published by the Free Software Foundation.
  25416. + *
  25417. + * This program is distributed in the hope it will be useful, but WITHOUT
  25418. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  25419. + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  25420. + * for more details.
  25421. + *
  25422. + * You should have received a copy of the GNU General Public License along
  25423. + * with this program; if not, write to the Free Software Foundation, Inc.,
  25424. + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  25425. + *
  25426. + * ########################################################################
  25427. + *
  25428. + *
  25429. + */
  25430. +#ifndef __ASM_PB1200_H
  25431. +#define __ASM_PB1200_H
  25432. +
  25433. +#include <linux/types.h>
  25434. +
  25435. +// This is defined in au1000.h with bogus value
  25436. +#undef AU1X00_EXTERNAL_INT
  25437. +
  25438. +#define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX
  25439. +#define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX
  25440. +#define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC1_TX
  25441. +#define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC1_RX
  25442. +
  25443. +/* SPI and SMB are muxed on the Pb1200 board.
  25444. + Refer to board documentation.
  25445. + */
  25446. +#define SPI_PSC_BASE PSC0_BASE_ADDR
  25447. +#define SMBUS_PSC_BASE PSC0_BASE_ADDR
  25448. +/* AC97 and I2S are muxed on the Pb1200 board.
  25449. + Refer to board documentation.
  25450. + */
  25451. +#define AC97_PSC_BASE PSC1_BASE_ADDR
  25452. +#define I2S_PSC_BASE PSC1_BASE_ADDR
  25453. +
  25454. +#define BCSR_KSEG1_ADDR 0xAD800000
  25455. +
  25456. +typedef volatile struct
  25457. +{
  25458. + /*00*/ u16 whoami;
  25459. + u16 reserved0;
  25460. + /*04*/ u16 status;
  25461. + u16 reserved1;
  25462. + /*08*/ u16 switches;
  25463. + u16 reserved2;
  25464. + /*0C*/ u16 resets;
  25465. + u16 reserved3;
  25466. +
  25467. + /*10*/ u16 pcmcia;
  25468. + u16 reserved4;
  25469. + /*14*/ u16 board;
  25470. + u16 reserved5;
  25471. + /*18*/ u16 disk_leds;
  25472. + u16 reserved6;
  25473. + /*1C*/ u16 system;
  25474. + u16 reserved7;
  25475. +
  25476. + /*20*/ u16 intclr;
  25477. + u16 reserved8;
  25478. + /*24*/ u16 intset;
  25479. + u16 reserved9;
  25480. + /*28*/ u16 intclr_mask;
  25481. + u16 reserved10;
  25482. + /*2C*/ u16 intset_mask;
  25483. + u16 reserved11;
  25484. +
  25485. + /*30*/ u16 sig_status;
  25486. + u16 reserved12;
  25487. + /*34*/ u16 int_status;
  25488. + u16 reserved13;
  25489. + /*38*/ u16 reserved14;
  25490. + u16 reserved15;
  25491. + /*3C*/ u16 reserved16;
  25492. + u16 reserved17;
  25493. +
  25494. +} BCSR;
  25495. +
  25496. +static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
  25497. +
  25498. +/*
  25499. + * Register bit definitions for the BCSRs
  25500. + */
  25501. +#define BCSR_WHOAMI_DCID 0x000F
  25502. +#define BCSR_WHOAMI_CPLD 0x00F0
  25503. +#define BCSR_WHOAMI_BOARD 0x0F00
  25504. +
  25505. +#define BCSR_STATUS_PCMCIA0VS 0x0003
  25506. +#define BCSR_STATUS_PCMCIA1VS 0x000C
  25507. +#define BCSR_STATUS_SWAPBOOT 0x0040
  25508. +#define BCSR_STATUS_FLASHBUSY 0x0100
  25509. +#define BCSR_STATUS_IDECBLID 0x0200
  25510. +#define BCSR_STATUS_SD0WP 0x0400
  25511. +#define BCSR_STATUS_SD1WP 0x0800
  25512. +#define BCSR_STATUS_U0RXD 0x1000
  25513. +#define BCSR_STATUS_U1RXD 0x2000
  25514. +
  25515. +#define BCSR_SWITCHES_OCTAL 0x00FF
  25516. +#define BCSR_SWITCHES_DIP_1 0x0080
  25517. +#define BCSR_SWITCHES_DIP_2 0x0040
  25518. +#define BCSR_SWITCHES_DIP_3 0x0020
  25519. +#define BCSR_SWITCHES_DIP_4 0x0010
  25520. +#define BCSR_SWITCHES_DIP_5 0x0008
  25521. +#define BCSR_SWITCHES_DIP_6 0x0004
  25522. +#define BCSR_SWITCHES_DIP_7 0x0002
  25523. +#define BCSR_SWITCHES_DIP_8 0x0001
  25524. +#define BCSR_SWITCHES_ROTARY 0x0F00
  25525. +
  25526. +#define BCSR_RESETS_ETH 0x0001
  25527. +#define BCSR_RESETS_CAMERA 0x0002
  25528. +#define BCSR_RESETS_DC 0x0004
  25529. +#define BCSR_RESETS_IDE 0x0008
  25530. +/* not resets but in the same register */
  25531. +#define BCSR_RESETS_WSCFSM 0x0800
  25532. +#define BCSR_RESETS_PCS0MUX 0x1000
  25533. +#define BCSR_RESETS_PCS1MUX 0x2000
  25534. +#define BCSR_RESETS_SPISEL 0x4000
  25535. +#define BCSR_RESETS_SD1MUX 0x8000
  25536. +
  25537. +#define BCSR_PCMCIA_PC0VPP 0x0003
  25538. +#define BCSR_PCMCIA_PC0VCC 0x000C
  25539. +#define BCSR_PCMCIA_PC0DRVEN 0x0010
  25540. +#define BCSR_PCMCIA_PC0RST 0x0080
  25541. +#define BCSR_PCMCIA_PC1VPP 0x0300
  25542. +#define BCSR_PCMCIA_PC1VCC 0x0C00
  25543. +#define BCSR_PCMCIA_PC1DRVEN 0x1000
  25544. +#define BCSR_PCMCIA_PC1RST 0x8000
  25545. +
  25546. +#define BCSR_BOARD_LCDVEE 0x0001
  25547. +#define BCSR_BOARD_LCDVDD 0x0002
  25548. +#define BCSR_BOARD_LCDBL 0x0004
  25549. +#define BCSR_BOARD_CAMSNAP 0x0010
  25550. +#define BCSR_BOARD_CAMPWR 0x0020
  25551. +#define BCSR_BOARD_SD0PWR 0x0040
  25552. +#define BCSR_BOARD_SD1PWR 0x0080
  25553. +
  25554. +#define BCSR_LEDS_DECIMALS 0x00FF
  25555. +#define BCSR_LEDS_LED0 0x0100
  25556. +#define BCSR_LEDS_LED1 0x0200
  25557. +#define BCSR_LEDS_LED2 0x0400
  25558. +#define BCSR_LEDS_LED3 0x0800
  25559. +
  25560. +#define BCSR_SYSTEM_VDDI 0x001F
  25561. +#define BCSR_SYSTEM_POWEROFF 0x4000
  25562. +#define BCSR_SYSTEM_RESET 0x8000
  25563. +
  25564. +/* Bit positions for the different interrupt sources */
  25565. +#define BCSR_INT_IDE 0x0001
  25566. +#define BCSR_INT_ETH 0x0002
  25567. +#define BCSR_INT_PC0 0x0004
  25568. +#define BCSR_INT_PC0STSCHG 0x0008
  25569. +#define BCSR_INT_PC1 0x0010
  25570. +#define BCSR_INT_PC1STSCHG 0x0020
  25571. +#define BCSR_INT_DC 0x0040
  25572. +#define BCSR_INT_FLASHBUSY 0x0080
  25573. +#define BCSR_INT_PC0INSERT 0x0100
  25574. +#define BCSR_INT_PC0EJECT 0x0200
  25575. +#define BCSR_INT_PC1INSERT 0x0400
  25576. +#define BCSR_INT_PC1EJECT 0x0800
  25577. +#define BCSR_INT_SD0INSERT 0x1000
  25578. +#define BCSR_INT_SD0EJECT 0x2000
  25579. +#define BCSR_INT_SD1INSERT 0x4000
  25580. +#define BCSR_INT_SD1EJECT 0x8000
  25581. +
  25582. +#define AU1XXX_SMC91111_PHYS_ADDR (0x0D000300)
  25583. +#define AU1XXX_SMC91111_IRQ PB1200_ETH_INT
  25584. +
  25585. +#define AU1XXX_ATA_PHYS_ADDR (0x0C800000)
  25586. +#define AU1XXX_ATA_PHYS_LEN (0x100)
  25587. +#define AU1XXX_ATA_REG_OFFSET (5)
  25588. +#define AU1XXX_ATA_INT PB1200_IDE_INT
  25589. +#define AU1XXX_ATA_DDMA_REQ DSCR_CMD0_DMA_REQ1;
  25590. +#define AU1XXX_ATA_RQSIZE 128
  25591. +
  25592. +#define NAND_PHYS_ADDR 0x1C000000
  25593. +
  25594. +/* Timing values as described in databook, * ns value stripped of
  25595. + * lower 2 bits.
  25596. + * These defines are here rather than an SOC1200 generic file because
  25597. + * the parts chosen on another board may be different and may require
  25598. + * different timings.
  25599. + */
  25600. +#define NAND_T_H (18 >> 2)
  25601. +#define NAND_T_PUL (30 >> 2)
  25602. +#define NAND_T_SU (30 >> 2)
  25603. +#define NAND_T_WH (30 >> 2)
  25604. +
  25605. +/* Bitfield shift amounts */
  25606. +#define NAND_T_H_SHIFT 0
  25607. +#define NAND_T_PUL_SHIFT 4
  25608. +#define NAND_T_SU_SHIFT 8
  25609. +#define NAND_T_WH_SHIFT 12
  25610. +
  25611. +#define NAND_TIMING ((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \
  25612. + ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \
  25613. + ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \
  25614. + ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)
  25615. +
  25616. +
  25617. +/*
  25618. + * External Interrupts for Pb1200 as of 8/6/2004.
  25619. + * Bit positions in the CPLD registers can be calculated by taking
  25620. + * the interrupt define and subtracting the PB1200_INT_BEGIN value.
  25621. + * *example: IDE bis pos is = 64 - 64
  25622. + ETH bit pos is = 65 - 64
  25623. + */
  25624. +#define PB1200_INT_BEGIN (AU1000_LAST_INTC1_INT + 1)
  25625. +#define PB1200_IDE_INT (PB1200_INT_BEGIN + 0)
  25626. +#define PB1200_ETH_INT (PB1200_INT_BEGIN + 1)
  25627. +#define PB1200_PC0_INT (PB1200_INT_BEGIN + 2)
  25628. +#define PB1200_PC0_STSCHG_INT (PB1200_INT_BEGIN + 3)
  25629. +#define PB1200_PC1_INT (PB1200_INT_BEGIN + 4)
  25630. +#define PB1200_PC1_STSCHG_INT (PB1200_INT_BEGIN + 5)
  25631. +#define PB1200_DC_INT (PB1200_INT_BEGIN + 6)
  25632. +#define PB1200_FLASHBUSY_INT (PB1200_INT_BEGIN + 7)
  25633. +#define PB1200_PC0_INSERT_INT (PB1200_INT_BEGIN + 8)
  25634. +#define PB1200_PC0_EJECT_INT (PB1200_INT_BEGIN + 9)
  25635. +#define PB1200_PC1_INSERT_INT (PB1200_INT_BEGIN + 10)
  25636. +#define PB1200_PC1_EJECT_INT (PB1200_INT_BEGIN + 11)
  25637. +#define PB1200_SD0_INSERT_INT (PB1200_INT_BEGIN + 12)
  25638. +#define PB1200_SD0_EJECT_INT (PB1200_INT_BEGIN + 13)
  25639. +#define PB1200_SD1_INSERT_INT (PB1200_INT_BEGIN + 14)
  25640. +#define PB1200_SD1_EJECT_INT (PB1200_INT_BEGIN + 15)
  25641. +
  25642. +#define PB1200_INT_END (PB1200_INT_BEGIN + 15)
  25643. +
  25644. +/* For drivers/pcmcia/au1000_db1x00.c */
  25645. +#define BOARD_PC0_INT PB1200_PC0_INT
  25646. +#define BOARD_PC1_INT PB1200_PC1_INT
  25647. +#define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1<<(8+(2*SOCKET)))
  25648. +
  25649. +#endif /* __ASM_PB1200_H */
  25650. +
  25651. diff -Nur linux-2.4.32-rc1/include/asm-mips/pb1550.h linux-2.4.32-rc1.mips/include/asm-mips/pb1550.h
  25652. --- linux-2.4.32-rc1/include/asm-mips/pb1550.h 2005-01-19 15:10:12.000000000 +0100
  25653. +++ linux-2.4.32-rc1.mips/include/asm-mips/pb1550.h 2005-01-30 09:01:28.000000000 +0100
  25654. @@ -30,13 +30,11 @@
  25655. #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX
  25656. #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX
  25657. -#define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC3_TX
  25658. -#define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC3_RX
  25659. -
  25660. #define SPI_PSC_BASE PSC0_BASE_ADDR
  25661. #define AC97_PSC_BASE PSC1_BASE_ADDR
  25662. #define SMBUS_PSC_BASE PSC2_BASE_ADDR
  25663. #define I2S_PSC_BASE PSC3_BASE_ADDR
  25664. +#define NAND_CS 1
  25665. #define BCSR_PHYS_ADDR 0xAF000000
  25666. @@ -160,9 +158,23 @@
  25667. #define NAND_T_SU_SHIFT 8
  25668. #define NAND_T_WH_SHIFT 12
  25669. -#define NAND_TIMING ((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \
  25670. - ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \
  25671. - ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \
  25672. - ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)
  25673. +#define NAND_TIMING ((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \
  25674. + ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \
  25675. + ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \
  25676. + ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)
  25677. +
  25678. +/*
  25679. + * Daughter card information.
  25680. + */
  25681. +#define DAUGHTER_CARD_BASE (0xAC000000)
  25682. +#define DAUGHTER_CARD_MEM_SIZE (0xADFFFFFF - DAUGHTER_CARD_BASE + 1)
  25683. +#define DAUGHTER_CARD_IRQ (AU1000_GPIO_3)
  25684. +
  25685. +/* DC_IDE and DC_ETHERNET */
  25686. +#define AU1XXX_ATA_PHYS_ADDR (0x0C000000)
  25687. +#define AU1XXX_ATA_REG_OFFSET (5)
  25688. +
  25689. +#define AU1XXX_SMC91111_PHYS_ADDR (0x0C000300)
  25690. +#define AU1XXX_SMC91111_IRQ AU1000_GPIO_3
  25691. #endif /* __ASM_PB1550_H */
  25692. diff -Nur linux-2.4.32-rc1/include/asm-mips/reg.h linux-2.4.32-rc1.mips/include/asm-mips/reg.h
  25693. --- linux-2.4.32-rc1/include/asm-mips/reg.h 2002-08-03 02:39:45.000000000 +0200
  25694. +++ linux-2.4.32-rc1.mips/include/asm-mips/reg.h 2005-04-14 12:41:44.000000000 +0200
  25695. @@ -45,6 +45,9 @@
  25696. /*
  25697. * k0/k1 unsaved
  25698. */
  25699. +#define EF_REG26 32
  25700. +#define EF_REG27 33
  25701. +
  25702. #define EF_REG28 34
  25703. #define EF_REG29 35
  25704. #define EF_REG30 36
  25705. @@ -60,6 +63,7 @@
  25706. #define EF_CP0_BADVADDR 41
  25707. #define EF_CP0_STATUS 42
  25708. #define EF_CP0_CAUSE 43
  25709. +#define EF_UNUSED0 44
  25710. #define EF_SIZE 180 /* size in bytes */
  25711. diff -Nur linux-2.4.32-rc1/include/asm-mips/sgi/hpc3.h linux-2.4.32-rc1.mips/include/asm-mips/sgi/hpc3.h
  25712. --- linux-2.4.32-rc1/include/asm-mips/sgi/hpc3.h 2003-08-25 13:44:44.000000000 +0200
  25713. +++ linux-2.4.32-rc1.mips/include/asm-mips/sgi/hpc3.h 2005-09-23 16:35:27.000000000 +0200
  25714. @@ -128,26 +128,26 @@
  25715. volatile u32 rx_gfptr; /* current GIO fifo ptr */
  25716. volatile u32 rx_dfptr; /* current device fifo ptr */
  25717. u32 _unused1; /* padding */
  25718. - volatile u32 rx_reset; /* reset register */
  25719. -#define HPC3_ERXRST_CRESET 0x1 /* Reset dma channel and external controller */
  25720. -#define HPC3_ERXRST_CLRIRQ 0x2 /* Clear channel interrupt */
  25721. -#define HPC3_ERXRST_LBACK 0x4 /* Enable diagnostic loopback mode of Seeq8003 */
  25722. -
  25723. - volatile u32 rx_dconfig; /* DMA configuration register */
  25724. -#define HPC3_ERXDCFG_D1 0x0000f /* Cycles to spend in D1 state for PIO */
  25725. -#define HPC3_ERXDCFG_D2 0x000f0 /* Cycles to spend in D2 state for PIO */
  25726. -#define HPC3_ERXDCFG_D3 0x00f00 /* Cycles to spend in D3 state for PIO */
  25727. -#define HPC3_ERXDCFG_WCTRL 0x01000 /* Enable writes of desc into ex ctrl port */
  25728. -#define HPC3_ERXDCFG_FRXDC 0x02000 /* Clear eop stat bits upon rxdc, hw seeq fix */
  25729. -#define HPC3_ERXDCFG_FEOP 0x04000 /* Bad packet marker timeout enable */
  25730. -#define HPC3_ERXDCFG_FIRQ 0x08000 /* Another bad packet timeout enable */
  25731. -#define HPC3_ERXDCFG_PTO 0x30000 /* Programmed timeout value for above two */
  25732. -
  25733. - volatile u32 rx_pconfig; /* PIO configuration register */
  25734. -#define HPC3_ERXPCFG_P1 0x000f /* Cycles to spend in P1 state for PIO */
  25735. -#define HPC3_ERXPCFG_P2 0x00f0 /* Cycles to spend in P2 state for PIO */
  25736. -#define HPC3_ERXPCFG_P3 0x0f00 /* Cycles to spend in P3 state for PIO */
  25737. -#define HPC3_ERXPCFG_TST 0x1000 /* Diagnistic ram test feature bit */
  25738. + volatile u32 reset; /* reset register */
  25739. +#define HPC3_ERST_CRESET 0x1 /* Reset dma channel and external controller */
  25740. +#define HPC3_ERST_CLRIRQ 0x2 /* Clear channel interrupt */
  25741. +#define HPC3_ERST_LBACK 0x4 /* Enable diagnostic loopback mode of Seeq8003 */
  25742. +
  25743. + volatile u32 dconfig; /* DMA configuration register */
  25744. +#define HPC3_EDCFG_D1 0x0000f /* Cycles to spend in D1 state for PIO */
  25745. +#define HPC3_EDCFG_D2 0x000f0 /* Cycles to spend in D2 state for PIO */
  25746. +#define HPC3_EDCFG_D3 0x00f00 /* Cycles to spend in D3 state for PIO */
  25747. +#define HPC3_EDCFG_WCTRL 0x01000 /* Enable writes of desc into ex ctrl port */
  25748. +#define HPC3_EDCFG_FRXDC 0x02000 /* Clear eop stat bits upon rxdc, hw seeq fix */
  25749. +#define HPC3_EDCFG_FEOP 0x04000 /* Bad packet marker timeout enable */
  25750. +#define HPC3_EDCFG_FIRQ 0x08000 /* Another bad packet timeout enable */
  25751. +#define HPC3_EDCFG_PTO 0x30000 /* Programmed timeout value for above two */
  25752. +
  25753. + volatile u32 pconfig; /* PIO configuration register */
  25754. +#define HPC3_EPCFG_P1 0x000f /* Cycles to spend in P1 state for PIO */
  25755. +#define HPC3_EPCFG_P2 0x00f0 /* Cycles to spend in P2 state for PIO */
  25756. +#define HPC3_EPCFG_P3 0x0f00 /* Cycles to spend in P3 state for PIO */
  25757. +#define HPC3_EPCFG_TST 0x1000 /* Diagnistic ram test feature bit */
  25758. u32 _unused2[0x1000/4 - 8]; /* padding */
  25759. @@ -221,7 +221,7 @@
  25760. #define HPC3_BESTAT_PIDMASK 0x3f700 /* DMA channel parity identifier */
  25761. u32 _unused1[0x14000/4 - 5]; /* padding */
  25762. -
  25763. +
  25764. /* Now direct PIO per-HPC3 peripheral access to external regs. */
  25765. volatile u32 scsi0_ext[256]; /* SCSI channel 0 external regs */
  25766. u32 _unused2[0x7c00/4];
  25767. @@ -304,7 +304,7 @@
  25768. volatile u32 bbram[8192-50-14]; /* Battery backed ram */
  25769. };
  25770. -/*
  25771. +/*
  25772. * It is possible to have two HPC3's within the address space on
  25773. * one machine, though only having one is more likely on an Indy.
  25774. */
  25775. diff -Nur linux-2.4.32-rc1/include/asm-mips/tx4927/tx4927.h linux-2.4.32-rc1.mips/include/asm-mips/tx4927/tx4927.h
  25776. --- linux-2.4.32-rc1/include/asm-mips/tx4927/tx4927.h 2003-08-25 13:44:44.000000000 +0200
  25777. +++ linux-2.4.32-rc1.mips/include/asm-mips/tx4927/tx4927.h 2004-11-22 19:02:10.000000000 +0100
  25778. @@ -88,8 +88,8 @@
  25779. /* TX4927 Configuration registers (64-bit registers) */
  25780. -#define TX4927_CONFIG_BASE 0xe300
  25781. -#define TX4927_CONFIG_CCFG 0xe300
  25782. +#define TX4927_CONFIG_BASE 0xe000
  25783. +#define TX4927_CONFIG_CCFG 0xe000
  25784. #define TX4927_CONFIG_CCFG_RESERVED_42_63 BM_63_42
  25785. #define TX4927_CONFIG_CCFG_WDRST BM_41_41
  25786. #define TX4927_CONFIG_CCFG_WDREXEN BM_40_40
  25787. @@ -124,14 +124,14 @@
  25788. #define TX4927_CONFIG_CCFG_ENDIAN BM_02_02
  25789. #define TX4927_CONFIG_CCFG_ARMODE BM_01_01
  25790. #define TX4927_CONFIG_CCFG_ACEHOLD BM_00_00
  25791. -#define TX4927_CONFIG_REVID 0xe308
  25792. +#define TX4927_CONFIG_REVID 0xe008
  25793. #define TX4927_CONFIG_REVID_RESERVED_32_63 BM_32_63
  25794. #define TX4927_CONFIG_REVID_PCODE BM_16_31
  25795. #define TX4927_CONFIG_REVID_MJERREV BM_12_15
  25796. #define TX4927_CONFIG_REVID_MINEREV BM_08_11
  25797. #define TX4927_CONFIG_REVID_MJREV BM_04_07
  25798. #define TX4927_CONFIG_REVID_MINREV BM_00_03
  25799. -#define TX4927_CONFIG_PCFG 0xe310
  25800. +#define TX4927_CONFIG_PCFG 0xe010
  25801. #define TX4927_CONFIG_PCFG_RESERVED_57_63 BM_57_63
  25802. #define TX4927_CONFIG_PCFG_DRVDATA BM_56_56
  25803. #define TX4927_CONFIG_PCFG_DRVCB BM_55_55
  25804. @@ -197,10 +197,10 @@
  25805. #define TX4927_CONFIG_PCFG_DMASEL0_SIO1 BM_00_00
  25806. #define TX4927_CONFIG_PCFG_DMASEL0_ACLC0 BM_01_01
  25807. #define TX4927_CONFIG_PCFG_DMASEL0_ACLC2 BM_00_01
  25808. -#define TX4927_CONFIG_TOEA 0xe318
  25809. +#define TX4927_CONFIG_TOEA 0xe018
  25810. #define TX4927_CONFIG_TOEA_RESERVED_36_63 BM_36_63
  25811. #define TX4927_CONFIG_TOEA_TOEA BM_00_35
  25812. -#define TX4927_CONFIG_CLKCTR 0xe320
  25813. +#define TX4927_CONFIG_CLKCTR 0xe020
  25814. #define TX4927_CONFIG_CLKCTR_RESERVED_26_63 BM_26_63
  25815. #define TX4927_CONFIG_CLKCTR_ACLCKD BM_25_25
  25816. #define TX4927_CONFIG_CLKCTR_PIOCKD BM_24_24
  25817. @@ -223,7 +223,7 @@
  25818. #define TX4927_CONFIG_CLKCTR_TM2RST BM_02_02
  25819. #define TX4927_CONFIG_CLKCTR_SIO0RST BM_01_01
  25820. #define TX4927_CONFIG_CLKCTR_SIO1RST BM_00_00
  25821. -#define TX4927_CONFIG_GARBC 0xe330
  25822. +#define TX4927_CONFIG_GARBC 0xe030
  25823. #define TX4927_CONFIG_GARBC_RESERVED_10_63 BM_10_63
  25824. #define TX4927_CONFIG_GARBC_SET_09 BM_09_09
  25825. #define TX4927_CONFIG_GARBC_ARBMD BM_08_08
  25826. @@ -243,7 +243,7 @@
  25827. #define TX4927_CONFIG_GARBC_PRIORITY_H3_PDMAC BM_00_00
  25828. #define TX4927_CONFIG_GARBC_PRIORITY_H3_DMAC BM_01_01
  25829. #define TX4927_CONFIG_GARBC_PRIORITY_H3_BAD_VALUE BM_00_01
  25830. -#define TX4927_CONFIG_RAMP 0xe348
  25831. +#define TX4927_CONFIG_RAMP 0xe048
  25832. #define TX4927_CONFIG_RAMP_RESERVED_20_63 BM_20_63
  25833. #define TX4927_CONFIG_RAMP_RAMP BM_00_19
  25834. #define TX4927_CONFIG_LIMIT 0xefff
  25835. @@ -456,7 +456,7 @@
  25836. #define TX4927_ACLC_ACINTSTS 0xf710
  25837. #define TX4927_ACLC_ACINTMSTS 0xf714
  25838. #define TX4927_ACLC_ACINTEN 0xf718
  25839. -#define TX4927_ACLC_ACINTDIS 0xfR71c
  25840. +#define TX4927_ACLC_ACINTDIS 0xf71c
  25841. #define TX4927_ACLC_ACSEMAPH 0xf720
  25842. #define TX4927_ACLC_ACGPIDAT 0xf740
  25843. #define TX4927_ACLC_ACGPODAT 0xf744
  25844. diff -Nur linux-2.4.32-rc1/include/asm-mips/unistd.h linux-2.4.32-rc1.mips/include/asm-mips/unistd.h
  25845. --- linux-2.4.32-rc1/include/asm-mips/unistd.h 2005-01-19 15:10:12.000000000 +0100
  25846. +++ linux-2.4.32-rc1.mips/include/asm-mips/unistd.h 2004-11-24 21:30:06.000000000 +0100
  25847. @@ -760,7 +760,7 @@
  25848. if (__a3 == 0) \
  25849. return (type) __v0; \
  25850. errno = __v0; \
  25851. - return -1; \
  25852. + return (type)-1; \
  25853. }
  25854. /*
  25855. @@ -788,7 +788,7 @@
  25856. if (__a3 == 0) \
  25857. return (type) __v0; \
  25858. errno = __v0; \
  25859. - return -1; \
  25860. + return (type)-1; \
  25861. }
  25862. #define _syscall2(type,name,atype,a,btype,b) \
  25863. @@ -813,7 +813,7 @@
  25864. if (__a3 == 0) \
  25865. return (type) __v0; \
  25866. errno = __v0; \
  25867. - return -1; \
  25868. + return (type)-1; \
  25869. }
  25870. #define _syscall3(type,name,atype,a,btype,b,ctype,c) \
  25871. @@ -839,7 +839,7 @@
  25872. if (__a3 == 0) \
  25873. return (type) __v0; \
  25874. errno = __v0; \
  25875. - return -1; \
  25876. + return (type)-1; \
  25877. }
  25878. #define _syscall4(type,name,atype,a,btype,b,ctype,c,dtype,d) \
  25879. @@ -865,7 +865,7 @@
  25880. if (__a3 == 0) \
  25881. return (type) __v0; \
  25882. errno = __v0; \
  25883. - return -1; \
  25884. + return (type)-1; \
  25885. }
  25886. #if (_MIPS_SIM == _MIPS_SIM_ABI32)
  25887. @@ -902,7 +902,7 @@
  25888. if (__a3 == 0) \
  25889. return (type) __v0; \
  25890. errno = __v0; \
  25891. - return -1; \
  25892. + return (type)-1; \
  25893. }
  25894. #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \
  25895. @@ -935,7 +935,7 @@
  25896. if (__a3 == 0) \
  25897. return (type) __v0; \
  25898. errno = __v0; \
  25899. - return -1; \
  25900. + return (type)-1; \
  25901. }
  25902. #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
  25903. @@ -966,7 +966,7 @@
  25904. if (__a3 == 0) \
  25905. return (type) __v0; \
  25906. errno = __v0; \
  25907. - return -1; \
  25908. + return (type)-1; \
  25909. }
  25910. #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \
  25911. @@ -995,7 +995,7 @@
  25912. if (__a3 == 0) \
  25913. return (type) __v0; \
  25914. errno = __v0; \
  25915. - return -1; \
  25916. + return (type)-1; \
  25917. }
  25918. #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
  25919. diff -Nur linux-2.4.32-rc1/include/asm-mips64/checksum.h linux-2.4.32-rc1.mips/include/asm-mips64/checksum.h
  25920. --- linux-2.4.32-rc1/include/asm-mips64/checksum.h 2005-01-19 15:10:12.000000000 +0100
  25921. +++ linux-2.4.32-rc1.mips/include/asm-mips64/checksum.h 2005-09-20 12:58:50.000000000 +0200
  25922. @@ -144,7 +144,7 @@
  25923. "daddu\t%0, %4\n\t"
  25924. "dsll32\t$1, %0, 0\n\t"
  25925. "daddu\t%0, $1\n\t"
  25926. - "dsrl32\t%0, %0, 0\n\t"
  25927. + "dsra32\t%0, %0, 0\n\t"
  25928. ".set\tat"
  25929. : "=&r" (sum)
  25930. : "0" (daddr), "r"(saddr),
  25931. diff -Nur linux-2.4.32-rc1/include/asm-mips64/elf.h linux-2.4.32-rc1.mips/include/asm-mips64/elf.h
  25932. --- linux-2.4.32-rc1/include/asm-mips64/elf.h 2004-02-18 14:36:32.000000000 +0100
  25933. +++ linux-2.4.32-rc1.mips/include/asm-mips64/elf.h 2005-04-14 12:41:44.000000000 +0200
  25934. @@ -64,9 +64,10 @@
  25935. #define USE_ELF_CORE_DUMP
  25936. #define ELF_EXEC_PAGESIZE PAGE_SIZE
  25937. -#define ELF_CORE_COPY_REGS(_dest,_regs) \
  25938. - memcpy((char *) &_dest, (char *) _regs, \
  25939. - sizeof(struct pt_regs));
  25940. +extern void dump_regs(elf_greg_t *, struct pt_regs *regs);
  25941. +
  25942. +#define ELF_CORE_COPY_REGS(elf_regs, regs) \
  25943. + dump_regs((elf_greg_t *)&(elf_regs), regs);
  25944. /* This yields a mask that user programs can use to figure out what
  25945. instruction set this cpu supports. This could be done in userspace,
  25946. diff -Nur linux-2.4.32-rc1/include/asm-mips64/hazards.h linux-2.4.32-rc1.mips/include/asm-mips64/hazards.h
  25947. --- linux-2.4.32-rc1/include/asm-mips64/hazards.h 2004-02-18 14:36:32.000000000 +0100
  25948. +++ linux-2.4.32-rc1.mips/include/asm-mips64/hazards.h 2005-06-06 16:46:22.000000000 +0200
  25949. @@ -3,7 +3,7 @@
  25950. * License. See the file "COPYING" in the main directory of this archive
  25951. * for more details.
  25952. *
  25953. - * Copyright (C) 2003 Ralf Baechle
  25954. + * Copyright (C) 2003, 2004 Ralf Baechle
  25955. */
  25956. #ifndef _ASM_HAZARDS_H
  25957. #define _ASM_HAZARDS_H
  25958. @@ -12,37 +12,200 @@
  25959. #ifdef __ASSEMBLY__
  25960. + .macro _ssnop
  25961. + sll $0, $0, 1
  25962. + .endm
  25963. +
  25964. /*
  25965. * RM9000 hazards. When the JTLB is updated by tlbwi or tlbwr, a subsequent
  25966. * use of the JTLB for instructions should not occur for 4 cpu cycles and use
  25967. * for data translations should not occur for 3 cpu cycles.
  25968. */
  25969. #ifdef CONFIG_CPU_RM9000
  25970. -#define rm9000_tlb_hazard \
  25971. +
  25972. +#define mtc0_tlbw_hazard \
  25973. + .set push; \
  25974. .set mips32; \
  25975. - ssnop; ssnop; ssnop; ssnop; \
  25976. - .set mips0
  25977. + _ssnop; _ssnop; _ssnop; _ssnop; \
  25978. + .set pop
  25979. +
  25980. +#define tlbw_eret_hazard \
  25981. + .set push; \
  25982. + .set mips32; \
  25983. + _ssnop; _ssnop; _ssnop; _ssnop; \
  25984. + .set pop
  25985. +
  25986. #else
  25987. -#define rm9000_tlb_hazard
  25988. +
  25989. +/*
  25990. + * The taken branch will result in a two cycle penalty for the two killed
  25991. + * instructions on R4000 / R4400. Other processors only have a single cycle
  25992. + * hazard so this is nice trick to have an optimal code for a range of
  25993. + * processors.
  25994. + */
  25995. +#define mtc0_tlbw_hazard \
  25996. + b . + 8
  25997. +#define tlbw_eret_hazard \
  25998. + nop
  25999. #endif
  26000. +/*
  26001. + * mtc0->mfc0 hazard
  26002. + * The 24K has a 2 cycle mtc0/mfc0 execution hazard.
  26003. + * It is a MIPS32R2 processor so ehb will clear the hazard.
  26004. + */
  26005. +
  26006. +#ifdef CONFIG_CPU_MIPSR2
  26007. +/*
  26008. + * Use a macro for ehb unless explicit support for MIPSR2 is enabled
  26009. + */
  26010. + .macro ehb
  26011. + sll $0, $0, 3
  26012. + .endm
  26013. +
  26014. +#define irq_enable_hazard \
  26015. + ehb # irq_enable_hazard
  26016. +
  26017. +#define irq_disable_hazard \
  26018. + ehb # irq_disable_hazard
  26019. +
  26020. +#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000)
  26021. +
  26022. +/*
  26023. + * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
  26024. + */
  26025. +
  26026. +#define irq_enable_hazard
  26027. +
  26028. +#define irq_disable_hazard
  26029. +
  26030. #else
  26031. /*
  26032. + * Classic MIPS needs 1 - 3 nops or ssnops
  26033. + */
  26034. +#define irq_enable_hazard
  26035. +#define irq_disable_hazard \
  26036. + _ssnop; _ssnop; _ssnop
  26037. +
  26038. +#endif
  26039. +
  26040. +#else /* __ASSEMBLY__ */
  26041. +
  26042. +/*
  26043. * RM9000 hazards. When the JTLB is updated by tlbwi or tlbwr, a subsequent
  26044. * use of the JTLB for instructions should not occur for 4 cpu cycles and use
  26045. * for data translations should not occur for 3 cpu cycles.
  26046. */
  26047. #ifdef CONFIG_CPU_RM9000
  26048. -#define rm9000_tlb_hazard() \
  26049. +
  26050. +#define mtc0_tlbw_hazard() \
  26051. + __asm__ __volatile__( \
  26052. + ".set\tmips32\n\t" \
  26053. + "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
  26054. + ".set\tmips0")
  26055. +
  26056. +#define tlbw_use_hazard() \
  26057. __asm__ __volatile__( \
  26058. ".set\tmips32\n\t" \
  26059. - "ssnop; ssnop; ssnop; ssnop\n\t" \
  26060. + "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \
  26061. ".set\tmips0")
  26062. #else
  26063. -#define rm9000_tlb_hazard() do { } while (0)
  26064. +
  26065. +/*
  26066. + * Overkill warning ...
  26067. + */
  26068. +#define mtc0_tlbw_hazard() \
  26069. + __asm__ __volatile__( \
  26070. + ".set noreorder\n\t" \
  26071. + "nop; nop; nop; nop; nop; nop;\n\t" \
  26072. + ".set reorder\n\t")
  26073. +
  26074. +#define tlbw_use_hazard() \
  26075. + __asm__ __volatile__( \
  26076. + ".set noreorder\n\t" \
  26077. + "nop; nop; nop; nop; nop; nop;\n\t" \
  26078. + ".set reorder\n\t")
  26079. +
  26080. #endif
  26081. +/*
  26082. + * mtc0->mfc0 hazard
  26083. + * The 24K has a 2 cycle mtc0/mfc0 execution hazard.
  26084. + * It is a MIPS32R2 processor so ehb will clear the hazard.
  26085. + */
  26086. +
  26087. +#ifdef CONFIG_CPU_MIPSR2
  26088. +/*
  26089. + * Use a macro for ehb unless explicit support for MIPSR2 is enabled
  26090. + */
  26091. +__asm__(
  26092. + " .macro ehb \n\t"
  26093. + " sll $0, $0, 3 \n\t"
  26094. + " .endm \n\t"
  26095. + " \n\t"
  26096. + " .macro\tirq_enable_hazard \n\t"
  26097. + " ehb \n\t"
  26098. + " .endm \n\t"
  26099. + " \n\t"
  26100. + " .macro\tirq_disable_hazard \n\t"
  26101. + " ehb \n\t"
  26102. + " .endm");
  26103. +
  26104. +#define irq_enable_hazard() \
  26105. + __asm__ __volatile__( \
  26106. + "ehb\t\t\t\t# irq_enable_hazard")
  26107. +
  26108. +#define irq_disable_hazard() \
  26109. + __asm__ __volatile__( \
  26110. + "ehb\t\t\t\t# irq_disable_hazard")
  26111. +
  26112. +#elif defined(CONFIG_CPU_R10000)
  26113. +
  26114. +/*
  26115. + * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
  26116. + */
  26117. +
  26118. +__asm__(
  26119. + " .macro\tirq_enable_hazard \n\t"
  26120. + " .endm \n\t"
  26121. + " \n\t"
  26122. + " .macro\tirq_disable_hazard \n\t"
  26123. + " .endm");
  26124. +
  26125. +#define irq_enable_hazard() do { } while (0)
  26126. +#define irq_disable_hazard() do { } while (0)
  26127. +
  26128. +#else
  26129. +
  26130. +/*
  26131. + * Default for classic MIPS processors. Assume worst case hazards but don't
  26132. + * care about the irq_enable_hazard - sooner or later the hardware will
  26133. + * enable it and we don't care when exactly.
  26134. + */
  26135. +
  26136. +__asm__(
  26137. + " .macro _ssnop \n\t"
  26138. + " sll $0, $2, 1 \n\t"
  26139. + " .endm \n\t"
  26140. + " \n\t"
  26141. + " # \n\t"
  26142. + " # There is a hazard but we do not care \n\t"
  26143. + " # \n\t"
  26144. + " .macro\tirq_enable_hazard \n\t"
  26145. + " .endm \n\t"
  26146. + " \n\t"
  26147. + " .macro\tirq_disable_hazard \n\t"
  26148. + " _ssnop; _ssnop; _ssnop \n\t"
  26149. + " .endm");
  26150. +
  26151. +#define irq_enable_hazard() do { } while (0)
  26152. +#define irq_disable_hazard() \
  26153. + __asm__ __volatile__( \
  26154. + "_ssnop; _ssnop; _ssnop;\t\t# irq_disable_hazard")
  26155. +
  26156. #endif
  26157. +#endif /* __ASSEMBLY__ */
  26158. +
  26159. #endif /* _ASM_HAZARDS_H */
  26160. diff -Nur linux-2.4.32-rc1/include/asm-mips64/ide.h linux-2.4.32-rc1.mips/include/asm-mips64/ide.h
  26161. --- linux-2.4.32-rc1/include/asm-mips64/ide.h 2003-08-25 13:44:44.000000000 +0200
  26162. +++ linux-2.4.32-rc1.mips/include/asm-mips64/ide.h 2005-04-19 14:26:53.000000000 +0200
  26163. @@ -32,12 +32,12 @@
  26164. extern struct ide_ops *ide_ops;
  26165. -static __inline__ int ide_default_irq(ide_ioreg_t base)
  26166. +static inline int ide_default_irq(ide_ioreg_t base)
  26167. {
  26168. return ide_ops->ide_default_irq(base);
  26169. }
  26170. -static __inline__ ide_ioreg_t ide_default_io_base(int index)
  26171. +static inline ide_ioreg_t ide_default_io_base(int index)
  26172. {
  26173. return ide_ops->ide_default_io_base(index);
  26174. }
  26175. @@ -48,7 +48,7 @@
  26176. ide_ops->ide_init_hwif_ports(hw, data_port, ctrl_port, irq);
  26177. }
  26178. -static __inline__ void ide_init_default_hwifs(void)
  26179. +static inline void ide_init_default_hwifs(void)
  26180. {
  26181. #ifndef CONFIG_BLK_DEV_IDEPCI
  26182. hw_regs_t hw;
  26183. @@ -68,7 +68,89 @@
  26184. #define ide_ack_intr(hwif) ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1)
  26185. #endif
  26186. -#include <asm-generic/ide_iops.h>
  26187. +/* MIPS port and memory-mapped I/O string operations. */
  26188. +
  26189. +static inline void __ide_flush_dcache_range(unsigned long addr, unsigned long size)
  26190. +{
  26191. + if (cpu_has_dc_aliases) {
  26192. + unsigned long end = addr + size;
  26193. + for (; addr < end; addr += PAGE_SIZE)
  26194. + flush_dcache_page(virt_to_page(addr));
  26195. + }
  26196. +}
  26197. +
  26198. +static inline void __ide_insw(unsigned long port, void *addr,
  26199. + unsigned int count)
  26200. +{
  26201. + insw(port, addr, count);
  26202. + __ide_flush_dcache_range((unsigned long)addr, count * 2);
  26203. +}
  26204. +
  26205. +static inline void __ide_insl(unsigned long port, void *addr, unsigned int count)
  26206. +{
  26207. + insl(port, addr, count);
  26208. + __ide_flush_dcache_range((unsigned long)addr, count * 4);
  26209. +}
  26210. +
  26211. +static inline void __ide_outsw(unsigned long port, const void *addr,
  26212. + unsigned long count)
  26213. +{
  26214. + outsw(port, addr, count);
  26215. + __ide_flush_dcache_range((unsigned long)addr, count * 2);
  26216. +}
  26217. +
  26218. +static inline void __ide_outsl(unsigned long port, const void *addr,
  26219. + unsigned long count)
  26220. +{
  26221. + outsl(port, addr, count);
  26222. + __ide_flush_dcache_range((unsigned long)addr, count * 4);
  26223. +}
  26224. +
  26225. +static inline void __ide_mm_insw(unsigned long port, void *addr, u32 count)
  26226. +{
  26227. + unsigned long start = (unsigned long) addr;
  26228. +
  26229. + while (count--) {
  26230. + *(u16 *)addr = readw(port);
  26231. + addr += 2;
  26232. + }
  26233. + __ide_flush_dcache_range(start, count * 2);
  26234. +}
  26235. +
  26236. +static inline void __ide_mm_insl(unsigned long port, void *addr, u32 count)
  26237. +{
  26238. + unsigned long start = (unsigned long) addr;
  26239. +
  26240. + while (count--) {
  26241. + *(u32 *)addr = readl(port);
  26242. + addr += 4;
  26243. + }
  26244. + __ide_flush_dcache_range(start, count * 4);
  26245. +}
  26246. +
  26247. +static inline void __ide_mm_outsw(unsigned long port, const void *addr,
  26248. + u32 count)
  26249. +{
  26250. + unsigned long start = (unsigned long) addr;
  26251. +
  26252. + while (count--) {
  26253. + writew(*(u16 *)addr, port);
  26254. + addr += 2;
  26255. + }
  26256. + __ide_flush_dcache_range(start, count * 2);
  26257. +}
  26258. +
  26259. +static inline void __ide_mm_outsl(unsigned long port, const void *addr,
  26260. + u32 count)
  26261. +{
  26262. + unsigned long start = (unsigned long) addr;
  26263. +
  26264. + while (count--) {
  26265. + writel(*(u32 *)addr, port);
  26266. + addr += 4;
  26267. + }
  26268. + __ide_flush_dcache_range(start, count * 4);
  26269. +}
  26270. #endif /* __KERNEL__ */
  26271. diff -Nur linux-2.4.32-rc1/include/asm-mips64/io.h linux-2.4.32-rc1.mips/include/asm-mips64/io.h
  26272. --- linux-2.4.32-rc1/include/asm-mips64/io.h 2004-02-18 14:36:32.000000000 +0100
  26273. +++ linux-2.4.32-rc1.mips/include/asm-mips64/io.h 2005-04-19 14:24:53.000000000 +0200
  26274. @@ -414,7 +414,8 @@
  26275. return __ioswab32(__val);
  26276. }
  26277. -static inline void __outsb(unsigned long port, void *addr, unsigned int count)
  26278. +static inline void __outsb(unsigned long port, const void *addr,
  26279. + unsigned int count)
  26280. {
  26281. while (count--) {
  26282. outb(*(u8 *)addr, port);
  26283. @@ -430,7 +431,8 @@
  26284. }
  26285. }
  26286. -static inline void __outsw(unsigned long port, void *addr, unsigned int count)
  26287. +static inline void __outsw(unsigned long port, const void *addr,
  26288. + unsigned int count)
  26289. {
  26290. while (count--) {
  26291. outw(*(u16 *)addr, port);
  26292. @@ -446,7 +448,8 @@
  26293. }
  26294. }
  26295. -static inline void __outsl(unsigned long port, void *addr, unsigned int count)
  26296. +static inline void __outsl(unsigned long port, const void *addr,
  26297. + unsigned int count)
  26298. {
  26299. while (count--) {
  26300. outl(*(u32 *)addr, port);
  26301. diff -Nur linux-2.4.32-rc1/include/asm-mips64/mipsregs.h linux-2.4.32-rc1.mips/include/asm-mips64/mipsregs.h
  26302. --- linux-2.4.32-rc1/include/asm-mips64/mipsregs.h 2005-01-19 15:10:12.000000000 +0100
  26303. +++ linux-2.4.32-rc1.mips/include/asm-mips64/mipsregs.h 2005-02-06 22:24:22.000000000 +0100
  26304. @@ -757,10 +757,18 @@
  26305. #define read_c0_config1() __read_32bit_c0_register($16, 1)
  26306. #define read_c0_config2() __read_32bit_c0_register($16, 2)
  26307. #define read_c0_config3() __read_32bit_c0_register($16, 3)
  26308. +#define read_c0_config4() __read_32bit_c0_register($16, 4)
  26309. +#define read_c0_config5() __read_32bit_c0_register($16, 5)
  26310. +#define read_c0_config6() __read_32bit_c0_register($16, 6)
  26311. +#define read_c0_config7() __read_32bit_c0_register($16, 7)
  26312. #define write_c0_config(val) __write_32bit_c0_register($16, 0, val)
  26313. #define write_c0_config1(val) __write_32bit_c0_register($16, 1, val)
  26314. #define write_c0_config2(val) __write_32bit_c0_register($16, 2, val)
  26315. #define write_c0_config3(val) __write_32bit_c0_register($16, 3, val)
  26316. +#define write_c0_config4(val) __write_32bit_c0_register($16, 4, val)
  26317. +#define write_c0_config5(val) __write_32bit_c0_register($16, 5, val)
  26318. +#define write_c0_config6(val) __write_32bit_c0_register($16, 6, val)
  26319. +#define write_c0_config7(val) __write_32bit_c0_register($16, 7, val)
  26320. /*
  26321. * The WatchLo register. There may be upto 8 of them.
  26322. @@ -856,42 +864,34 @@
  26323. */
  26324. static inline void tlb_probe(void)
  26325. {
  26326. - rm9000_tlb_hazard();
  26327. __asm__ __volatile__(
  26328. ".set noreorder\n\t"
  26329. "tlbp\n\t"
  26330. ".set reorder");
  26331. - rm9000_tlb_hazard();
  26332. }
  26333. static inline void tlb_read(void)
  26334. {
  26335. - rm9000_tlb_hazard();
  26336. __asm__ __volatile__(
  26337. ".set noreorder\n\t"
  26338. "tlbr\n\t"
  26339. ".set reorder");
  26340. - rm9000_tlb_hazard();
  26341. }
  26342. static inline void tlb_write_indexed(void)
  26343. {
  26344. - rm9000_tlb_hazard();
  26345. __asm__ __volatile__(
  26346. ".set noreorder\n\t"
  26347. "tlbwi\n\t"
  26348. ".set reorder");
  26349. - rm9000_tlb_hazard();
  26350. }
  26351. static inline void tlb_write_random(void)
  26352. {
  26353. - rm9000_tlb_hazard();
  26354. __asm__ __volatile__(
  26355. ".set noreorder\n\t"
  26356. "tlbwr\n\t"
  26357. ".set reorder");
  26358. - rm9000_tlb_hazard();
  26359. }
  26360. /*
  26361. diff -Nur linux-2.4.32-rc1/include/asm-mips64/reg.h linux-2.4.32-rc1.mips/include/asm-mips64/reg.h
  26362. --- linux-2.4.32-rc1/include/asm-mips64/reg.h 2003-08-25 13:44:44.000000000 +0200
  26363. +++ linux-2.4.32-rc1.mips/include/asm-mips64/reg.h 2005-04-14 12:41:44.000000000 +0200
  26364. @@ -46,6 +46,9 @@
  26365. /*
  26366. * k0/k1 unsaved
  26367. */
  26368. +#define EF_REG26 26
  26369. +#define EF_REG27 27
  26370. +
  26371. #define EF_REG28 28
  26372. #define EF_REG29 29
  26373. #define EF_REG30 30
  26374. diff -Nur linux-2.4.32-rc1/include/asm-mips64/sgi/hpc3.h linux-2.4.32-rc1.mips/include/asm-mips64/sgi/hpc3.h
  26375. --- linux-2.4.32-rc1/include/asm-mips64/sgi/hpc3.h 2003-08-25 13:44:44.000000000 +0200
  26376. +++ linux-2.4.32-rc1.mips/include/asm-mips64/sgi/hpc3.h 2005-09-23 16:35:27.000000000 +0200
  26377. @@ -128,26 +128,26 @@
  26378. volatile u32 rx_gfptr; /* current GIO fifo ptr */
  26379. volatile u32 rx_dfptr; /* current device fifo ptr */
  26380. u32 _unused1; /* padding */
  26381. - volatile u32 rx_reset; /* reset register */
  26382. -#define HPC3_ERXRST_CRESET 0x1 /* Reset dma channel and external controller */
  26383. -#define HPC3_ERXRST_CLRIRQ 0x2 /* Clear channel interrupt */
  26384. -#define HPC3_ERXRST_LBACK 0x4 /* Enable diagnostic loopback mode of Seeq8003 */
  26385. -
  26386. - volatile u32 rx_dconfig; /* DMA configuration register */
  26387. -#define HPC3_ERXDCFG_D1 0x0000f /* Cycles to spend in D1 state for PIO */
  26388. -#define HPC3_ERXDCFG_D2 0x000f0 /* Cycles to spend in D2 state for PIO */
  26389. -#define HPC3_ERXDCFG_D3 0x00f00 /* Cycles to spend in D3 state for PIO */
  26390. -#define HPC3_ERXDCFG_WCTRL 0x01000 /* Enable writes of desc into ex ctrl port */
  26391. -#define HPC3_ERXDCFG_FRXDC 0x02000 /* Clear eop stat bits upon rxdc, hw seeq fix */
  26392. -#define HPC3_ERXDCFG_FEOP 0x04000 /* Bad packet marker timeout enable */
  26393. -#define HPC3_ERXDCFG_FIRQ 0x08000 /* Another bad packet timeout enable */
  26394. -#define HPC3_ERXDCFG_PTO 0x30000 /* Programmed timeout value for above two */
  26395. -
  26396. - volatile u32 rx_pconfig; /* PIO configuration register */
  26397. -#define HPC3_ERXPCFG_P1 0x000f /* Cycles to spend in P1 state for PIO */
  26398. -#define HPC3_ERXPCFG_P2 0x00f0 /* Cycles to spend in P2 state for PIO */
  26399. -#define HPC3_ERXPCFG_P3 0x0f00 /* Cycles to spend in P3 state for PIO */
  26400. -#define HPC3_ERXPCFG_TST 0x1000 /* Diagnistic ram test feature bit */
  26401. + volatile u32 reset; /* reset register */
  26402. +#define HPC3_ERST_CRESET 0x1 /* Reset dma channel and external controller */
  26403. +#define HPC3_ERST_CLRIRQ 0x2 /* Clear channel interrupt */
  26404. +#define HPC3_ERST_LBACK 0x4 /* Enable diagnostic loopback mode of Seeq8003 */
  26405. +
  26406. + volatile u32 dconfig; /* DMA configuration register */
  26407. +#define HPC3_EDCFG_D1 0x0000f /* Cycles to spend in D1 state for PIO */
  26408. +#define HPC3_EDCFG_D2 0x000f0 /* Cycles to spend in D2 state for PIO */
  26409. +#define HPC3_EDCFG_D3 0x00f00 /* Cycles to spend in D3 state for PIO */
  26410. +#define HPC3_EDCFG_WCTRL 0x01000 /* Enable writes of desc into ex ctrl port */
  26411. +#define HPC3_EDCFG_FRXDC 0x02000 /* Clear eop stat bits upon rxdc, hw seeq fix */
  26412. +#define HPC3_EDCFG_FEOP 0x04000 /* Bad packet marker timeout enable */
  26413. +#define HPC3_EDCFG_FIRQ 0x08000 /* Another bad packet timeout enable */
  26414. +#define HPC3_EDCFG_PTO 0x30000 /* Programmed timeout value for above two */
  26415. +
  26416. + volatile u32 pconfig; /* PIO configuration register */
  26417. +#define HPC3_EPCFG_P1 0x000f /* Cycles to spend in P1 state for PIO */
  26418. +#define HPC3_EPCFG_P2 0x00f0 /* Cycles to spend in P2 state for PIO */
  26419. +#define HPC3_EPCFG_P3 0x0f00 /* Cycles to spend in P3 state for PIO */
  26420. +#define HPC3_EPCFG_TST 0x1000 /* Diagnistic ram test feature bit */
  26421. u32 _unused2[0x1000/4 - 8]; /* padding */
  26422. @@ -221,7 +221,7 @@
  26423. #define HPC3_BESTAT_PIDMASK 0x3f700 /* DMA channel parity identifier */
  26424. u32 _unused1[0x14000/4 - 5]; /* padding */
  26425. -
  26426. +
  26427. /* Now direct PIO per-HPC3 peripheral access to external regs. */
  26428. volatile u32 scsi0_ext[256]; /* SCSI channel 0 external regs */
  26429. u32 _unused2[0x7c00/4];
  26430. @@ -304,7 +304,7 @@
  26431. volatile u32 bbram[8192-50-14]; /* Battery backed ram */
  26432. };
  26433. -/*
  26434. +/*
  26435. * It is possible to have two HPC3's within the address space on
  26436. * one machine, though only having one is more likely on an Indy.
  26437. */
  26438. diff -Nur linux-2.4.32-rc1/include/asm-mips64/sn/nmi.h linux-2.4.32-rc1.mips/include/asm-mips64/sn/nmi.h
  26439. --- linux-2.4.32-rc1/include/asm-mips64/sn/nmi.h 2002-11-29 00:53:15.000000000 +0100
  26440. +++ linux-2.4.32-rc1.mips/include/asm-mips64/sn/nmi.h 2002-08-06 01:53:40.000000000 +0200
  26441. @@ -8,7 +8,7 @@
  26442. #ifndef __ASM_SN_NMI_H
  26443. #define __ASM_SN_NMI_H
  26444. -#ident "$Revision: 1.2.4.2 $"
  26445. +#ident "$Revision: 1.2.4.1 $"
  26446. #include <asm/sn/addrs.h>
  26447. diff -Nur linux-2.4.32-rc1/include/asm-mips64/unistd.h linux-2.4.32-rc1.mips/include/asm-mips64/unistd.h
  26448. --- linux-2.4.32-rc1/include/asm-mips64/unistd.h 2005-01-19 15:10:12.000000000 +0100
  26449. +++ linux-2.4.32-rc1.mips/include/asm-mips64/unistd.h 2004-11-24 21:30:06.000000000 +0100
  26450. @@ -760,7 +760,7 @@
  26451. if (__a3 == 0) \
  26452. return (type) __v0; \
  26453. errno = __v0; \
  26454. - return -1; \
  26455. + return (type)-1; \
  26456. }
  26457. /*
  26458. @@ -788,7 +788,7 @@
  26459. if (__a3 == 0) \
  26460. return (type) __v0; \
  26461. errno = __v0; \
  26462. - return -1; \
  26463. + return (type)-1; \
  26464. }
  26465. #define _syscall2(type,name,atype,a,btype,b) \
  26466. @@ -813,7 +813,7 @@
  26467. if (__a3 == 0) \
  26468. return (type) __v0; \
  26469. errno = __v0; \
  26470. - return -1; \
  26471. + return (type)-1; \
  26472. }
  26473. #define _syscall3(type,name,atype,a,btype,b,ctype,c) \
  26474. @@ -839,7 +839,7 @@
  26475. if (__a3 == 0) \
  26476. return (type) __v0; \
  26477. errno = __v0; \
  26478. - return -1; \
  26479. + return (type)-1; \
  26480. }
  26481. #define _syscall4(type,name,atype,a,btype,b,ctype,c,dtype,d) \
  26482. @@ -865,7 +865,7 @@
  26483. if (__a3 == 0) \
  26484. return (type) __v0; \
  26485. errno = __v0; \
  26486. - return -1; \
  26487. + return (type)-1; \
  26488. }
  26489. #if (_MIPS_SIM == _MIPS_SIM_ABI32)
  26490. @@ -902,7 +902,7 @@
  26491. if (__a3 == 0) \
  26492. return (type) __v0; \
  26493. errno = __v0; \
  26494. - return -1; \
  26495. + return (type)-1; \
  26496. }
  26497. #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \
  26498. @@ -935,7 +935,7 @@
  26499. if (__a3 == 0) \
  26500. return (type) __v0; \
  26501. errno = __v0; \
  26502. - return -1; \
  26503. + return (type)-1; \
  26504. }
  26505. #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
  26506. @@ -966,7 +966,7 @@
  26507. if (__a3 == 0) \
  26508. return (type) __v0; \
  26509. errno = __v0; \
  26510. - return -1; \
  26511. + return (type)-1; \
  26512. }
  26513. #define _syscall6(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e,ftype,f) \
  26514. @@ -995,7 +995,7 @@
  26515. if (__a3 == 0) \
  26516. return (type) __v0; \
  26517. errno = __v0; \
  26518. - return -1; \
  26519. + return (type)-1; \
  26520. }
  26521. #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
  26522. diff -Nur linux-2.4.32-rc1/include/asm-ppc/param.h linux-2.4.32-rc1.mips/include/asm-ppc/param.h
  26523. --- linux-2.4.32-rc1/include/asm-ppc/param.h 2003-06-13 16:51:38.000000000 +0200
  26524. +++ linux-2.4.32-rc1.mips/include/asm-ppc/param.h 2003-07-05 05:23:46.000000000 +0200
  26525. @@ -3,6 +3,9 @@
  26526. #ifndef HZ
  26527. #define HZ 100
  26528. +#ifdef __KERNEL__
  26529. +#define hz_to_std(a) (a)
  26530. +#endif
  26531. #endif
  26532. #define EXEC_PAGESIZE 4096
  26533. diff -Nur linux-2.4.32-rc1/include/asm-s390/param.h linux-2.4.32-rc1.mips/include/asm-s390/param.h
  26534. --- linux-2.4.32-rc1/include/asm-s390/param.h 2001-02-13 23:13:44.000000000 +0100
  26535. +++ linux-2.4.32-rc1.mips/include/asm-s390/param.h 2001-03-09 21:34:48.000000000 +0100
  26536. @@ -11,6 +11,9 @@
  26537. #ifndef HZ
  26538. #define HZ 100
  26539. +#ifdef __KERNEL__
  26540. +#define hz_to_std(a) (a)
  26541. +#endif
  26542. #endif
  26543. #define EXEC_PAGESIZE 4096
  26544. diff -Nur linux-2.4.32-rc1/include/asm-sh/param.h linux-2.4.32-rc1.mips/include/asm-sh/param.h
  26545. --- linux-2.4.32-rc1/include/asm-sh/param.h 2001-01-04 22:19:13.000000000 +0100
  26546. +++ linux-2.4.32-rc1.mips/include/asm-sh/param.h 2001-01-11 05:02:45.000000000 +0100
  26547. @@ -3,6 +3,9 @@
  26548. #ifndef HZ
  26549. #define HZ 100
  26550. +#ifdef __KERNEL__
  26551. +#define hz_to_std(a) (a)
  26552. +#endif
  26553. #endif
  26554. #define EXEC_PAGESIZE 4096
  26555. diff -Nur linux-2.4.32-rc1/include/asm-sparc/param.h linux-2.4.32-rc1.mips/include/asm-sparc/param.h
  26556. --- linux-2.4.32-rc1/include/asm-sparc/param.h 2000-10-30 23:34:12.000000000 +0100
  26557. +++ linux-2.4.32-rc1.mips/include/asm-sparc/param.h 2000-11-23 03:00:56.000000000 +0100
  26558. @@ -4,6 +4,9 @@
  26559. #ifndef HZ
  26560. #define HZ 100
  26561. +#ifdef __KERNEL__
  26562. +#define hz_to_std(a) (a)
  26563. +#endif
  26564. #endif
  26565. #define EXEC_PAGESIZE 8192 /* Thanks for sun4's we carry baggage... */
  26566. diff -Nur linux-2.4.32-rc1/include/asm-sparc64/param.h linux-2.4.32-rc1.mips/include/asm-sparc64/param.h
  26567. --- linux-2.4.32-rc1/include/asm-sparc64/param.h 2000-10-30 23:34:12.000000000 +0100
  26568. +++ linux-2.4.32-rc1.mips/include/asm-sparc64/param.h 2000-11-23 03:00:56.000000000 +0100
  26569. @@ -4,6 +4,9 @@
  26570. #ifndef HZ
  26571. #define HZ 100
  26572. +#ifdef __KERNEL__
  26573. +#define hz_to_std(a) (a)
  26574. +#endif
  26575. #endif
  26576. #define EXEC_PAGESIZE 8192 /* Thanks for sun4's we carry baggage... */
  26577. diff -Nur linux-2.4.32-rc1/include/linux/i2c-algo-au1550.h linux-2.4.32-rc1.mips/include/linux/i2c-algo-au1550.h
  26578. --- linux-2.4.32-rc1/include/linux/i2c-algo-au1550.h 1970-01-01 01:00:00.000000000 +0100
  26579. +++ linux-2.4.32-rc1.mips/include/linux/i2c-algo-au1550.h 2004-07-07 02:38:02.000000000 +0200
  26580. @@ -0,0 +1,31 @@
  26581. +/*
  26582. + * Copyright (C) 2004 Embedded Edge, LLC <[email protected]>
  26583. + *
  26584. + * This program is free software; you can redistribute it and/or modify
  26585. + * it under the terms of the GNU General Public License as published by
  26586. + * the Free Software Foundation; either version 2 of the License, or
  26587. + * (at your option) any later version.
  26588. + *
  26589. + * This program is distributed in the hope that it will be useful,
  26590. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26591. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26592. + * GNU General Public License for more details.
  26593. + *
  26594. + * You should have received a copy of the GNU General Public License
  26595. + * along with this program; if not, write to the Free Software
  26596. + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  26597. + */
  26598. +
  26599. +#ifndef I2C_ALGO_AU1550_H
  26600. +#define I2C_ALGO_AU1550_H 1
  26601. +
  26602. +struct i2c_algo_au1550_data {
  26603. + u32 psc_base;
  26604. + int xfer_timeout;
  26605. + int ack_timeout;
  26606. +};
  26607. +
  26608. +int i2c_au1550_add_bus(struct i2c_adapter *);
  26609. +int i2c_au1550_del_bus(struct i2c_adapter *);
  26610. +
  26611. +#endif /* I2C_ALGO_AU1550_H */
  26612. diff -Nur linux-2.4.32-rc1/include/linux/i2c-id.h linux-2.4.32-rc1.mips/include/linux/i2c-id.h
  26613. --- linux-2.4.32-rc1/include/linux/i2c-id.h 2004-02-18 14:36:32.000000000 +0100
  26614. +++ linux-2.4.32-rc1.mips/include/linux/i2c-id.h 2004-07-07 02:38:02.000000000 +0200
  26615. @@ -156,6 +156,8 @@
  26616. #define I2C_ALGO_SGI 0x130000 /* SGI algorithm */
  26617. +#define I2C_ALGO_AU1550 0x140000 /* Alchemy Au1550 PSC */
  26618. +
  26619. #define I2C_ALGO_EXP 0x800000 /* experimental */
  26620. #define I2C_ALGO_MASK 0xff0000 /* Mask for algorithms */
  26621. @@ -204,6 +206,9 @@
  26622. #define I2C_HW_SGI_VINO 0x00
  26623. #define I2C_HW_SGI_MACE 0x01
  26624. +/* --- Au1550 PSC adapters */
  26625. +#define I2C_HW_AU1550_PSC 0x00
  26626. +
  26627. /* --- SMBus only adapters */
  26628. #define I2C_HW_SMBUS_PIIX4 0x00
  26629. #define I2C_HW_SMBUS_ALI15X3 0x01
  26630. diff -Nur linux-2.4.32-rc1/include/linux/sched.h linux-2.4.32-rc1.mips/include/linux/sched.h
  26631. --- linux-2.4.32-rc1/include/linux/sched.h 2005-01-19 15:10:12.000000000 +0100
  26632. +++ linux-2.4.32-rc1.mips/include/linux/sched.h 2004-11-29 18:47:18.000000000 +0100
  26633. @@ -617,6 +617,10 @@
  26634. extern int in_group_p(gid_t);
  26635. extern int in_egroup_p(gid_t);
  26636. +extern ATTRIB_NORET void cpu_idle(void);
  26637. +
  26638. +extern void release_task(struct task_struct * p);
  26639. +
  26640. extern void proc_caches_init(void);
  26641. extern void flush_signals(struct task_struct *);
  26642. extern void flush_signal_handlers(struct task_struct *);
  26643. diff -Nur linux-2.4.32-rc1/include/linux/serial.h linux-2.4.32-rc1.mips/include/linux/serial.h
  26644. --- linux-2.4.32-rc1/include/linux/serial.h 2002-08-03 02:39:45.000000000 +0200
  26645. +++ linux-2.4.32-rc1.mips/include/linux/serial.h 2004-07-31 02:17:57.000000000 +0200
  26646. @@ -75,7 +75,8 @@
  26647. #define PORT_16654 11
  26648. #define PORT_16850 12
  26649. #define PORT_RSA 13 /* RSA-DV II/S card */
  26650. -#define PORT_MAX 13
  26651. +#define PORT_SB1250 14
  26652. +#define PORT_MAX 14
  26653. #define SERIAL_IO_PORT 0
  26654. #define SERIAL_IO_HUB6 1
  26655. diff -Nur linux-2.4.32-rc1/include/linux/swap.h linux-2.4.32-rc1.mips/include/linux/swap.h
  26656. --- linux-2.4.32-rc1/include/linux/swap.h 2005-01-19 15:10:12.000000000 +0100
  26657. +++ linux-2.4.32-rc1.mips/include/linux/swap.h 2004-11-29 18:47:18.000000000 +0100
  26658. @@ -1,6 +1,12 @@
  26659. #ifndef _LINUX_SWAP_H
  26660. #define _LINUX_SWAP_H
  26661. +#include <linux/config.h>
  26662. +
  26663. +#define MAX_SWAPFILES 32
  26664. +
  26665. +#ifdef __KERNEL__
  26666. +
  26667. #include <linux/spinlock.h>
  26668. #include <asm/page.h>
  26669. @@ -8,8 +14,6 @@
  26670. #define SWAP_FLAG_PRIO_MASK 0x7fff
  26671. #define SWAP_FLAG_PRIO_SHIFT 0
  26672. -#define MAX_SWAPFILES 32
  26673. -
  26674. /*
  26675. * Magic header for a swap area. The first part of the union is
  26676. * what the swap magic looks like for the old (limited to 128MB)
  26677. @@ -39,8 +43,6 @@
  26678. } info;
  26679. };
  26680. -#ifdef __KERNEL__
  26681. -
  26682. /*
  26683. * Max bad pages in the new format..
  26684. */
  26685. diff -Nur linux-2.4.32-rc1/include/video/newport.h linux-2.4.32-rc1.mips/include/video/newport.h
  26686. --- linux-2.4.32-rc1/include/video/newport.h 2001-04-12 21:20:31.000000000 +0200
  26687. +++ linux-2.4.32-rc1.mips/include/video/newport.h 2004-09-23 15:32:29.000000000 +0200
  26688. @@ -291,8 +291,6 @@
  26689. unsigned int _unused2[0x1ef];
  26690. struct newport_cregs cgo;
  26691. };
  26692. -extern struct newport_regs *npregs;
  26693. -
  26694. typedef struct {
  26695. unsigned int drawmode1;
  26696. @@ -450,38 +448,26 @@
  26697. /* Miscellaneous NEWPORT routines. */
  26698. #define BUSY_TIMEOUT 100000
  26699. -static __inline__ int newport_wait(void)
  26700. +static __inline__ int newport_wait(struct newport_regs *regs)
  26701. {
  26702. - int i = 0;
  26703. + int t = BUSY_TIMEOUT;
  26704. - while(i < BUSY_TIMEOUT)
  26705. - if(!(npregs->cset.status & NPORT_STAT_GBUSY))
  26706. + while (t--)
  26707. + if (!(regs->cset.status & NPORT_STAT_GBUSY))
  26708. break;
  26709. - if(i == BUSY_TIMEOUT)
  26710. - return 1;
  26711. - return 0;
  26712. + return !t;
  26713. }
  26714. -static __inline__ int newport_bfwait(void)
  26715. +static __inline__ int newport_bfwait(struct newport_regs *regs)
  26716. {
  26717. - int i = 0;
  26718. + int t = BUSY_TIMEOUT;
  26719. - while(i < BUSY_TIMEOUT)
  26720. - if(!(npregs->cset.status & NPORT_STAT_BBUSY))
  26721. + while (t--)
  26722. + if(!(regs->cset.status & NPORT_STAT_BBUSY))
  26723. break;
  26724. - if(i == BUSY_TIMEOUT)
  26725. - return 1;
  26726. - return 0;
  26727. + return !t;
  26728. }
  26729. -/* newport.c and cons_newport.c routines */
  26730. -extern struct graphics_ops *newport_probe (int, const char **);
  26731. -
  26732. -void newport_save (void *);
  26733. -void newport_restore (void *);
  26734. -void newport_reset (void);
  26735. -int newport_ioctl (int card, int cmd, unsigned long arg);
  26736. -
  26737. /*
  26738. * DCBMODE register defines:
  26739. */
  26740. @@ -564,7 +550,7 @@
  26741. {
  26742. rex->set.dcbmode = DCB_XMAP0 | XM9_CRS_FIFO_AVAIL |
  26743. DCB_DATAWIDTH_1 | R_DCB_XMAP9_PROTOCOL;
  26744. - newport_bfwait ();
  26745. + newport_bfwait (rex);
  26746. while ((rex->set.dcbdata0.bybytes.b3 & 3) != XM9_FIFO_EMPTY)
  26747. ;
  26748. diff -Nur linux-2.4.32-rc1/init/main.c linux-2.4.32-rc1.mips/init/main.c
  26749. --- linux-2.4.32-rc1/init/main.c 2004-11-17 12:54:22.000000000 +0100
  26750. +++ linux-2.4.32-rc1.mips/init/main.c 2004-11-19 01:28:52.000000000 +0100
  26751. @@ -296,7 +296,6 @@
  26752. extern void setup_arch(char **);
  26753. -extern void cpu_idle(void);
  26754. unsigned long wait_init_idle;
  26755. diff -Nur linux-2.4.32-rc1/kernel/exit.c linux-2.4.32-rc1.mips/kernel/exit.c
  26756. --- linux-2.4.32-rc1/kernel/exit.c 2002-11-29 00:53:15.000000000 +0100
  26757. +++ linux-2.4.32-rc1.mips/kernel/exit.c 2003-01-11 18:53:18.000000000 +0100
  26758. @@ -26,7 +26,7 @@
  26759. int getrusage(struct task_struct *, int, struct rusage *);
  26760. -static void release_task(struct task_struct * p)
  26761. +void release_task(struct task_struct * p)
  26762. {
  26763. if (p != current) {
  26764. #ifdef CONFIG_SMP
  26765. diff -Nur linux-2.4.32-rc1/kernel/signal.c linux-2.4.32-rc1.mips/kernel/signal.c
  26766. --- linux-2.4.32-rc1/kernel/signal.c 2004-02-18 14:36:32.000000000 +0100
  26767. +++ linux-2.4.32-rc1.mips/kernel/signal.c 2004-01-20 16:10:34.000000000 +0100
  26768. @@ -14,6 +14,7 @@
  26769. #include <linux/init.h>
  26770. #include <linux/sched.h>
  26771. +#include <asm/param.h>
  26772. #include <asm/uaccess.h>
  26773. /*
  26774. @@ -28,6 +29,14 @@
  26775. #define SIG_SLAB_DEBUG 0
  26776. #endif
  26777. +#define DEBUG_SIG 0
  26778. +
  26779. +#if DEBUG_SIG
  26780. +#define SIG_SLAB_DEBUG (SLAB_DEBUG_FREE | SLAB_RED_ZONE /* | SLAB_POISON */)
  26781. +#else
  26782. +#define SIG_SLAB_DEBUG 0
  26783. +#endif
  26784. +
  26785. static kmem_cache_t *sigqueue_cachep;
  26786. atomic_t nr_queued_signals;
  26787. @@ -270,6 +279,11 @@
  26788. signal_pending(current));
  26789. #endif
  26790. +#if DEBUG_SIG
  26791. +printk("SIG dequeue (%s:%d): %d ", current->comm, current->pid,
  26792. + signal_pending(current));
  26793. +#endif
  26794. +
  26795. sig = next_signal(current, mask);
  26796. if (sig) {
  26797. if (current->notifier) {
  26798. @@ -293,6 +307,10 @@
  26799. printk(" %d -> %d\n", signal_pending(current), sig);
  26800. #endif
  26801. +#if DEBUG_SIG
  26802. +printk(" %d -> %d\n", signal_pending(current), sig);
  26803. +#endif
  26804. +
  26805. return sig;
  26806. }
  26807. @@ -540,6 +558,11 @@
  26808. printk("SIG queue (%s:%d): %d ", t->comm, t->pid, sig);
  26809. #endif
  26810. +
  26811. +#if DEBUG_SIG
  26812. +printk("SIG queue (%s:%d): %d ", t->comm, t->pid, sig);
  26813. +#endif
  26814. +
  26815. ret = -EINVAL;
  26816. if (sig < 0 || sig > _NSIG)
  26817. goto out_nolock;
  26818. @@ -778,8 +801,8 @@
  26819. info.si_uid = tsk->uid;
  26820. /* FIXME: find out whether or not this is supposed to be c*time. */
  26821. - info.si_utime = tsk->times.tms_utime;
  26822. - info.si_stime = tsk->times.tms_stime;
  26823. + info.si_utime = hz_to_std(tsk->times.tms_utime);
  26824. + info.si_stime = hz_to_std(tsk->times.tms_stime);
  26825. status = tsk->exit_code & 0x7f;
  26826. why = SI_KERNEL; /* shouldn't happen */
  26827. diff -Nur linux-2.4.32-rc1/kernel/sys.c linux-2.4.32-rc1.mips/kernel/sys.c
  26828. --- linux-2.4.32-rc1/kernel/sys.c 2003-11-28 19:26:21.000000000 +0100
  26829. +++ linux-2.4.32-rc1.mips/kernel/sys.c 2003-11-17 02:07:47.000000000 +0100
  26830. @@ -801,16 +801,23 @@
  26831. asmlinkage long sys_times(struct tms * tbuf)
  26832. {
  26833. + struct tms temp;
  26834. +
  26835. /*
  26836. * In the SMP world we might just be unlucky and have one of
  26837. * the times increment as we use it. Since the value is an
  26838. * atomically safe type this is just fine. Conceptually its
  26839. * as if the syscall took an instant longer to occur.
  26840. */
  26841. - if (tbuf)
  26842. - if (copy_to_user(tbuf, &current->times, sizeof(struct tms)))
  26843. + if (tbuf) {
  26844. + temp.tms_utime = hz_to_std(current->times.tms_utime);
  26845. + temp.tms_stime = hz_to_std(current->times.tms_stime);
  26846. + temp.tms_cutime = hz_to_std(current->times.tms_cutime);
  26847. + temp.tms_cstime = hz_to_std(current->times.tms_cstime);
  26848. + if (copy_to_user(tbuf, &temp, sizeof(struct tms)))
  26849. return -EFAULT;
  26850. - return jiffies;
  26851. + }
  26852. + return hz_to_std(jiffies);
  26853. }
  26854. /*
  26855. diff -Nur linux-2.4.32-rc1/lib/Makefile linux-2.4.32-rc1.mips/lib/Makefile
  26856. --- linux-2.4.32-rc1/lib/Makefile 2004-04-14 15:05:40.000000000 +0200
  26857. +++ linux-2.4.32-rc1.mips/lib/Makefile 2004-04-16 05:14:21.000000000 +0200
  26858. @@ -27,6 +27,7 @@
  26859. subdir-$(CONFIG_ZLIB_INFLATE) += zlib_inflate
  26860. subdir-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate
  26861. +-include $(TOPDIR)/arch/$(ARCH)/Makefile.lib
  26862. include $(TOPDIR)/drivers/net/Makefile.lib
  26863. include $(TOPDIR)/drivers/usb/Makefile.lib
  26864. include $(TOPDIR)/drivers/bluetooth/Makefile.lib
  26865. diff -Nur linux-2.4.32-rc1/Makefile linux-2.4.32-rc1.mips/Makefile
  26866. --- linux-2.4.32-rc1/Makefile 2005-10-24 11:33:30.000000000 +0200
  26867. +++ linux-2.4.32-rc1.mips/Makefile 2005-09-23 22:41:15.000000000 +0200
  26868. @@ -462,10 +462,11 @@
  26869. $(MAKE) -C Documentation/DocBook mrproper
  26870. distclean: mrproper
  26871. - rm -f core `find . \( -not -type d \) -and \
  26872. - \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
  26873. - -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
  26874. - -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
  26875. + find . \( -not -type d \) -and \
  26876. + \( -name core -o -name '*.orig' -o -name '*.rej' \
  26877. + -o -name '*~' -o -name '*.bak' -o -name '#*#' \
  26878. + -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \
  26879. + -o -name TAGS -o -name tags \) -print | env -i xargs rm -f
  26880. backup: mrproper
  26881. cd .. && tar cf - linux/ | gzip -9 > backup.gz
  26882. @@ -492,7 +493,7 @@
  26883. $(MAKE) -C Documentation/DocBook man
  26884. sums:
  26885. - find . -type f -print | sort | xargs sum > .SUMS
  26886. + find . -type f -print | sort | env -i xargs sum > .SUMS
  26887. dep-files: scripts/mkdep archdep include/linux/version.h
  26888. rm -f .depend .hdepend